[Dune] Which set of elements does a particular vertex belong to?

Jayesh Badwaik jayesh.badwaik90 at gmail.com
Thu Aug 18 14:34:15 CEST 2011


Hi,

Thanks for your help....
however... my problem was getting the negihboring gradients.....
and hence, I would have to go to the expensive solution as suggested by
Jo....

My inability to come up with the method meant "not being able to redesign
the
algorithms so as to not need the functionality".......

Further, I was pointing out that this use case is the one where the feature
is required......
and was wondering whether there can be any changes in the grid so that the
process can be made
less expensive....

Cheers and Regards
Jayesh Vinay Badwaik
Electronics and Communication Engineering
VNIT, Nagpur
INDIA

-----------------------------------------------------------------------------------------------------------------------------------------------
"We are servants rather than masters in mathematics" -- Charles Hermite



On Thu, Aug 18, 2011 at 4:48 PM, Martin Nolte <
nolte at mathematik.uni-freiburg.de> wrote:

> Two std::vectors to store data in a vertex. One store the sum of all
> neighboring gradients, the other the sum of the weights.
> Then simply divide sum of the gradients by the sum of the weights in
> corresponding vertices and you have you averages.
>
> On 08/18/2011 01:15 PM, Jayesh Badwaik wrote:
> > Hi,
> >
> > Actually I wanted to calculate the gradient on unstructured grid data in
> the
> > way the
> > VTK people do...  For calculating the gradient at a vertex, they
> calculate the
> > gradients
> > in all the elements which the vertex belongs to and then take an
> average...
> > Hence, I needed the functionality.
> >
> > I am not able to come up with an alternative method.
> >
> > Cheers and Regards
> > Jayesh Vinay Badwaik
> > Electronics and Communication Engineering
> > VNIT, Nagpur
> > INDIA
> >
> >
> -----------------------------------------------------------------------------------------------------------------------------------------------
> > "We are servants rather than masters in mathematics" -- Charles Hermite
> >
> >
> >
> > On Sat, Aug 6, 2011 at 5:10 PM, Jö Fahlke <jorrit at jorrit.de
> > <mailto:jorrit at jorrit.de>> wrote:
> >
> >     > Is there any method to get a list of set of elements does a
> particular
> >     > vertex (entity of codim dim)
> >     > belong to?
> >
> >     Not directly.  If you really need it, you'll have to iterate through
> the whole
> >     grid and look whether the vertex you are looking for is a codim=dim
> subentity
> >     of the current element.  This is of course expensive.
> >
> >     Particular grid managers may provide this functionality directly, but
> I don't
> >     know of any and tis is of course outside the scope of the Dune
> interface.
> >
> >     Most finite element algorithms can be reorganized to not require
> something
> >     like this, however.
> >
> >     Bye,
> >     Jö.
> >
> >     --
> >     "Ich habe eine Maschine erfunden, die den Kommerz aus Weihnachten
> >     entfernt." -- "Lass uns ganz viele davon bauen und für viel Geld
> >     verkaufen."
> >     -- http://www.nichtlustig.de/toondb/021220.html
> >
> >     -----BEGIN PGP SIGNATURE-----
> >     Version: GnuPG v1.4.10 (GNU/Linux)
> >
> >     iQIVAwUBTj0oF+mx9CKgc0OWAQhXXxAAhEnikfruAiaR/lA3fEP5/UwXRjdPq9nR
> >     f4MtQxi2Wa9Zl2hPIKME6ztYvbzrovuVDGMclHrCxb5VEIk8tlgp79VkY7A/5gMt
> >     inbRcZxrmBu65Go5Dc2iR7VU/Q2/DP+Q0bWssvRwScQITOd3WFCKKrTLJdSTpBg9
> >     KvXX5abSQ9grMHSzxwimT64lqE+fSGKFFbH6FsxNXiDxi/a/6ATdR2wQsFp0GQna
> >     5TSIQ71gDxAU3kEkUo8Xs5+t7lJ1YzU0LIsdsaGfqY+feohJ+1UplFmZ0mwyD4N4
> >     /+TZDnCPbMGYQM9lKAC159+WbT2JzNrhsN5cRRmRaQdNYODR6kGGHz3D5MseC6+p
> >     K7vdFbY+vPQ/4dP/2RrQQkQ04LG7c3eEERq/rLkiPOanSIvqtUnRC8uEMoGg/hxt
> >     zTEBtnc4CDzgb1noAophTWfOvU5scmMns4MlI5E3TQNz5YzImJ4nuk1seN5LEAz0
> >     76NCBK5DN5VK78zvXl5mxlONharykdkIs1Vdy67laPcIPr4uxjwpQI/6hYTrBDoq
> >     OU5qnBRkQ0EyCT1dEMUKLjeBggVHqYN6EnZQ8uiVoSEhPpp2KbK03kjVF/CMl8dH
> >     liOIL5iGfuz8MYkdCcuxUwjhfSEwpYiLH3s6u/921CQ+p0iTa3dwFSrdYLdoc0MR
> >     XIyb+jj5up4=
> >     =kMSI
> >     -----END PGP SIGNATURE-----
> >
> >
> >
> >
> > _______________________________________________
> > Dune mailing list
> > Dune at dune-project.org
> > http://lists.dune-project.org/mailman/listinfo/dune
>
> --
> Martin Nolte <nolte at mathematik.uni-freiburg.de>
>
> Universität Freiburg                                   phone:
> +49-761-203-5630
> Abteilung für angewandte Mathematik                    fax:
> +49-761-203-5632
> Hermann-Herder-Straße 10
> 79104 Freiburg, Germany
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20110818/f39f67ff/attachment.htm>


More information about the Dune mailing list