MantisBT - ParaView
View Issue Details
0014816ParaView(No Category)public2014-06-20 19:232015-06-04 18:28
Alan Scott 
Utkarsh Ayachit 
normalminorhave not tried
closedno change required 
git-master 
4.3 
Sandia
incorrect functionality
0014816: Python calculator doesn't create scalars properly
The python calculator isn't creating per point scalars properly. Here is how to replicate it.

* Local server, Linux, 4.1.
* Open can.exo. All variables on. Apply.
* Just for fun (and clarity), go one timestep forward, and color by ACCL.

Now, our goal is to create a maximum ACCL variable for every point.

* Python Calculator. Expression is max(ACCL). Apply.

Error message is as follows:
ERROR: In ...src/ParaView/4.1.0/ParaView4/VTK/Common/DataModel/vtkDataSet.cxx, line 414
vtkUnstructuredGrid (0x72ccc80): Point array result with 1 components, only has 3 tuples but there are 6724 points

So, what we really want to do is take this maximum, and create a scalar per point. There is a very poor way to do this - as follows:

Expression ((ACCL - ACCL)+1)*max(ACCL)

Either this needs to be fixed, or we need a new function, or a checkbox in the Python calculator, or something.
No tags attached.
Issue History
2014-06-20 19:23Alan ScottNew Issue
2014-12-14 12:19Utkarsh AyachitNote Added: 0033956
2014-12-14 12:19Utkarsh AyachitStatusbacklog => gatekeeper review
2014-12-14 12:19Utkarsh AyachitFixed in Version => git-master
2014-12-14 12:19Utkarsh AyachitResolutionopen => no change required
2014-12-14 12:19Utkarsh AyachitAssigned To => Utkarsh Ayachit
2014-12-14 12:19Utkarsh AyachitStatusgatekeeper review => customer review
2015-01-02 10:43Utkarsh AyachitFixed in Versiongit-master => 4.3
2015-06-04 18:28Alan ScottNote Added: 0034487
2015-06-04 18:28Alan ScottStatuscustomer review => closed

Notes
(0033956)
Utkarsh Ayachit   
2014-12-14 12:19   
This seems to work after the changes to the Python/VTK data processing infrastructure with 4.2. The original expression "max(ACCL)" works as expected -i.e. a new array, "result" is added to the output point-data with the a constant value.
(0034487)
Alan Scott   
2015-06-04 18:28   
Tested master, Linux, local server. My numpy is messed up remotely, thus can't test remote.