[Paraview] Calculate with global data

Cory Quammen cory.quammen at kitware.com
Tue Nov 1 14:43:48 EDT 2016


Alan,

Not possible with the Calculator as far as I know.

With the Python Calculator, you can indeed *use* a global variable
defined in the field data of the data set with the expression:

inputs[0].FieldData['TMSTEP'][time_index]

Here, time_index is the timestep index, not the time value. The Python
Calculator does not let you store the result in a new global variable.

The Programmable Filter is the most flexible filter that lets you read
the global data and store a new result. At the moment, however, I
cannot recall how to obtain the current timestep in the programmable
filter.

Maybe someone else can chime in, or I'll get back to you on how to do
this with the Programmable Filter. It is definitely more involved than
the using the Python Calculator.

HTH,
Cory


On Fri, Oct 28, 2016 at 8:30 PM, Scott, W Alan <wascott at sandia.gov> wrote:
> Is there a way to use global data in the calculator, Python Calculator or
> Programmable Filter?
>
>
>
> For example, if I want to multiply a variable by the TMSTEP in can.exo, and
> put this back into a new variable, how do I do it?
>
>
>
> Thanks,
>
>
>
> Alan
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the ParaView mailing list