<HTML>
<HEAD>
<TITLE>Re: [Paraview] Difference between &quot;Compute Derivatives&quot; and &quot;Gradient (Unstructured)&quot;...</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>I took a look at this. &nbsp;To answer the first question, compute derivatives and gradient (unstructured) are fairly similar. &nbsp;The compute derivatives filter takes point scalars and computes the gradient in the centroid of each cell (thus producing cell data). &nbsp;This is a fairly straightforward operation as the vtkCell classes can compute the gradient anywhere in the cell from point data.<BR>
<BR>
The gradient filter can take point data and find the data at the points or take cell data and find (an estimate of) the gradient at the cell centroids. &nbsp;The algorithm for finding the cell-centered is similar to that in compute derivatives and should take about the same amount of time. &nbsp;The algorithm for finding point-centered data is to find the gradient at each point of each cell and average the results at each point.<BR>
<BR>
On your prompting, I can the gradient filter through a performance monitor and realized that it was spending about half its time checking for degenerate cells. &nbsp;I just checked in a change that makes the check much faster. &nbsp;However, because the gradient filter is doing more derivative calculations, it will always be slower than compute derivatives.<BR>
<BR>
That said, I think it should be fairly easy to add a mode that approximates point gradients by computing cell gradients using the point data and then doint a point-to-cell conversion much like you were doing. &nbsp;Would anyone want that?<BR>
<BR>
-Ken<BR>
<BR>
<BR>
On 1/7/09 2:44 AM, &quot;Stefan Melber&quot; &lt;<a href="Stefan.Melber@DLR.de">Stefan.Melber@DLR.de</a>&gt; wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hi,<BR>
<BR>
i have a question regarding the filters &quot;Compute Derivatives&quot; and<BR>
&quot;Gradient (Unstructured)&quot;. I have to calculate a equation on an<BR>
unstructured data set with some derivatives of the velocity.<BR>
<BR>
Using the &quot;Gradient (Unstructured)&quot; it works, but it is really slow.<BR>
Using the &quot;Compute Derivatives&quot; and the convert the result back from<BR>
cell centers to points i can get nearly the same results - but much<BR>
faster (the most time takes the conversion from cell center to points!).<BR>
<BR>
So i made a comparison of both results with an isosurface of the<BR>
magnitude of the difference between both gradients an i can only find<BR>
minor changes. So my question to the developers: Where is the difference<BR>
between both filters? Why is the &quot;Gradient (Unstructured)&quot; so much slower?<BR>
<BR>
Best regards and thank you in advance,<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stefan<BR>
<BR>
<BR>
---------------------------------------------------------------<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Stefan Melber-Wilkending<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_/<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_/_/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fields of activities:<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_/ &nbsp;_/ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp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&nbsp;&nbsp;&nbsp;&nbsp;German Aerospace Center, DLR<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;_/ &nbsp;&nbsp;&nbsp;&nbsp;|_/ |_ | \ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;in the Helmholtz-Association<BR>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Phone ..: +49 531/295-2836 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Institute of Aerodynamics<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fax. ...: +49 531/295-2320 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;and Flow Technology<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Email ..: <a href="Stefan.Melber@dlr.de">Stefan.Melber@dlr.de</a> &nbsp;&nbsp;Lilienthalplatz 7<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Web ....: <a href="http://www.dlr.de/AS">http://www.dlr.de/AS</a> &nbsp;&nbsp;D-38106 Braunschweig/Germany<BR>
---------------------------------------------------------------<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
_______________________________________________<BR>
ParaView mailing list<BR>
<a href="ParaView@paraview.org">ParaView@paraview.org</a><BR>
<a href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><BR>
<BR>
<BR>
</SPAN></FONT></BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
&nbsp;&nbsp;&nbsp;**** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Kenneth Moreland<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sandia National Laboratories<BR>
*********** &nbsp;<BR>
*** *** *** &nbsp;email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** &nbsp;*** &nbsp;** &nbsp;phone: (505) 844-8919<BR>
&nbsp;&nbsp;&nbsp;&nbsp;*** &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;web: &nbsp;&nbsp;<a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>