[Paraview] Difference between "Compute Derivatives" and "Gradient (Unstructured)"...

Moreland, Kenneth kmorel at sandia.gov
Wed Jan 7 15:58:42 EST 2009


I took a look at this.  To answer the first question, compute derivatives and gradient (unstructured) are fairly similar.  The compute derivatives filter takes point scalars and computes the gradient in the centroid of each cell (thus producing cell data).  This is a fairly straightforward operation as the vtkCell classes can compute the gradient anywhere in the cell from point data.

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.  The algorithm for finding the cell-centered is similar to that in compute derivatives and should take about the same amount of time.  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.

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.  I just checked in a change that makes the check much faster.  However, because the gradient filter is doing more derivative calculations, it will always be slower than compute derivatives.

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.  Would anyone want that?

-Ken


On 1/7/09 2:44 AM, "Stefan Melber" <Stefan.Melber at DLR.de> wrote:

Hi,

i have a question regarding the filters "Compute Derivatives" and
"Gradient (Unstructured)". I have to calculate a equation on an
unstructured data set with some derivatives of the velocity.

Using the "Gradient (Unstructured)" it works, but it is really slow.
Using the "Compute Derivatives" and the convert the result back from
cell centers to points i can get nearly the same results - but much
faster (the most time takes the conversion from cell center to points!).

So i made a comparison of both results with an isosurface of the
magnitude of the difference between both gradients an i can only find
minor changes. So my question to the developers: Where is the difference
between both filters? Why is the "Gradient (Unstructured)" so much slower?

Best regards and thank you in advance,

     Stefan


---------------------------------------------------------------

                                        Stefan Melber-Wilkending
                          _/
                        _/_/            Fields of activities:
                      _/  _/            -) High-Lift Research
              _/_/_/_/_/_/_/_/_/_/      -) Complex Configurations
            _/    _/    _/    _/        -) Numerical Wind-Tunnel
          _/    _/    _/    _/          -) Supercomputing
        _/_/_/_/_/_/_/_/_/_/            -) Glider-Aerodynamics
              _/  _/  _      _
              _/_/   | \ |  |_|         German Aerospace Center, DLR
              _/     |_/ |_ | \         in the Helmholtz-Association

       Phone ..: +49 531/295-2836       Institute of Aerodynamics
       Fax. ...: +49 531/295-2320       and Flow Technology
       Email ..: Stefan.Melber at dlr.de   Lilienthalplatz 7
       Web ....: http://www.dlr.de/AS   D-38106 Braunschweig/Germany
---------------------------------------------------------------























_______________________________________________
ParaView mailing list
ParaView at paraview.org
http://www.paraview.org/mailman/listinfo/paraview




   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090107/e7b7b282/attachment.htm>


More information about the ParaView mailing list