[Dune] Which set of elements does a particular vertex belong to?
Martin Nolte
nolte at mathematik.uni-freiburg.de
Thu Aug 18 13:18:44 CEST 2011
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
More information about the Dune
mailing list