[Paraview] Problem with Calculator filter in servermanager module

Andreas Maier andi.maier at mytum.de
Mon Jul 13 03:48:14 EDT 2009


Hi,

I have a problem with the Calculator filter using pvpython and the 
servermanager module.

My script works fine upto that point:


> from paraview import servermanager
> ...
> ...
># Point to Cell Data
> ptc=servermanager.filters.PointDataToCellData(Input=clip2)
> ptc.UpdatePipeline()
>
># Calculate von Mises Caucy stress and save in in celldata 'vMises_stress'
> calc_vM=servermanager.filters.Calculator(Input=ptc, AttributeMode=2, 
ResultArrayName='vMises', 
Function='0.70711*sqrt((eigenval1-eigenval2)^2+(eigenval2-eigenval3)^2+(eigenval3-eigenval1)^2)')
> calc_vM.UpdatePipeline()


and then I get the following error:

>ERROR: 
In /home/berk/Work/ReleaseBuilds/ParaView3/VTK/Common/vtkFunctionParser.cxx, 
line 1473
>vtkFunctionParser (0xa105428): Syntax error: expecting a variable name; see 
position 0

>ERROR: 
In /home/berk/Work/ReleaseBuilds/ParaView3/VTK/Common/vtkFunctionParser.cxx, 
line 1473
>vtkFunctionParser (0xa105428): Syntax error: expecting a variable name; see 
position 0

It must be something with the names of my cell 
arrays 'eigenval1',..,'eigenval3' because I do not get that error when using 
just scalars in Function (IE: Function='10000').

That same formula works fine when I use it in the paraview Calculator.

I hope that anybody can help me with that problem. Thanks in advance.


Best wishes,

Andi


More information about the ParaView mailing list