Hi,<br><br>Thanks for your help....<br>however... my problem was getting the negihboring gradients.....<br>and hence, I would have to go to the expensive solution as suggested by Jo....<br><br>My inability to come up with the method meant "not being able to redesign the <br>


algorithms so as to not need the functionality".......<br><br>Further, I was pointing out that this use case is the one where the feature is required...... <br>and was wondering whether there can be any changes in the grid so that the process can be made <br>


less expensive.... <br><br clear="all">Cheers and Regards<br>Jayesh Vinay Badwaik<br>Electronics and Communication Engineering<br>VNIT, Nagpur<br>INDIA<br><br>-----------------------------------------------------------------------------------------------------------------------------------------------<br>


"We are servants rather than masters in mathematics" -- Charles Hermite<br><br>
<br><br><div class="gmail_quote">On Thu, Aug 18, 2011 at 4:48 PM, Martin Nolte <span dir="ltr"><<a href="mailto:nolte@mathematik.uni-freiburg.de" target="_blank">nolte@mathematik.uni-freiburg.de</a>></span> wrote:<br>

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