[Paraview] Difference in dataset for multiple variables

Moreland, Kenneth kmorel at sandia.gov
Fri Mar 24 16:27:26 EDT 2017


The programmable filter just runs the Python script you give it. Use Python to iterate over all the fields in your dataset. Augmenting the example in the email you reference, use something like this to iterate over all the fields:

for field in inputs[0].PointData.keys():
    data0 = inputs[0].PointData[field]
    data1 = inputs[1].PointData[field]
    output.PointData.append(data0-data1, field + '-diff')

-Ken


From: ParaView [mailto:paraview-bounces at paraview.org] On Behalf Of John Haase
Sent: Friday, March 24, 2017 2:11 PM
To: ParaView <paraview at paraview.org>
Subject: [EXTERNAL] [Paraview] Difference in dataset for multiple variables

Hello Paraviewers,

I want to make sure my multivariable cyclic simulation has reached "steady state" so I am trying to match the corresponding timesteps and get the R^2 error. To take the difference between the two datasets, I was thinking of following the method laid out here

http://paraview.markmail.org/search/?q=difference#query:difference+page:1+mid:lc6a4ss2j5hi37ps+state:results

and using the ProgrammableFilter to take the difference. That works great for a single variable. However, is there a way to take the difference of all the variables in the data set? Or do I just have to have a ProgrammableFilter for each variable?

Thank you for the advice

Regards,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170324/1890cd2e/attachment.html>


More information about the ParaView mailing list