[Paraview] Calculator Filter -- Gradient

David E DeMarle dave.demarle at kitware.com
Fri Sep 10 13:24:56 EDT 2010


On Fri, Sep 10, 2010 at 1:10 PM,  <DParker at chromalloy.com> wrote:
> I have two somewhat related questions:
>
> 1. Is it possible to calculate a gradient vector using the calculator
> filter?

No. The calculator filter does only element wise (cell by cell or
point by point) computations. To compute the gradient you need
information from neighboring elements.

>
> 2. Is it possible to define a new data array using a Python script without
> the calculator filter? Currently, I am using several Calculator Filters to
> calculate CFD flow variables from the conservative variables. I use a Python
> script to create the Calculator Filters, but I'm wondering if I can avoid
> the Calculator Filter and directly generate new data arrays for plotting.
>

Not with a python script (under the python shell) since that runs on
the client and can't really manipulate the data (which lives on the
server) directly. However, the python programmable filter runs on the
server, and with that you can create new arrays, and access
neighboring elements as well.
See http://www.paraview.org/Wiki/Python_Programmable_Filter for examples.

> David Parker
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>


More information about the ParaView mailing list