Is it possible to multiply point data by a global variable? How is it done?
Thanks team!
Is it possible to multiply point data by a global variable? How is it done?
Thanks team!
There’s nothing in the Calculator filter to access global variables stored in field data, but you can use the Python Calculator to do that.
As an example, if you open the can.exo file, you can add a Python Calculator with the Expression property set to inputs[0].FieldData['KE'][0] * ACCL
. Make sure you set the Array Association to “Point Data”.
Exactly what I was looking for. Thanks.
Cory, I believe your formula is incorrect. the [0] is forcing time step zero. What worked for me, using the can.exo dataset, is inputs[0].FieldData[‘NSTEPS’][time_index] * DISPL. I originally missed it, but this is documented in bottom of the ParaView Guide, section 5.9.2.4.
Note, to find the NSTEPS, I used the Annotate Global Data filter.
This is useful enough, and requested enough, that I added it into the SNL tutorial.