Calculator filter generates unexpected results

Hi all,

I’m working on a vtkPolyData file and I’m interested to write a formula based on some of the existing data arrays by using Calculator filter. One of the components of my formula is a vector (I’m pretty sure it is a vector and you could check it out in my file attached here) and the other one is the scalar. Let’s say the: “tangentialprojectiontraction_average” is a vector and “shearstress_average” is a scalar and I’m interested to calculate a new quantity of OSI as: OSI = “0.5*(1-((mag(tangentialprojectiontraction_average))/(shearstress_average)))”. But the ParaView version 5.6.0 downloaded from your official website as a pre-built binary complains that “tangentialprojectiontraction_average” is not a vector so I can’t apply mag operator on it despite the fact that indeed it is a vector for 100% sure. Any idea how to fix it? I attached my file here to reproduce this error. Thanks! Link to download the file:

Another unexpected behavior of Calculator filter is that even if you just write a simple formula: Result = “tangentialprojectiontraction_average” you would expect Result should just show “tangentialprojectiontraction_average” yes?! But, it’s not the case here cause it just passes 0 to Result:

Before Calculator filter:

After Calculator filter:

Interestingly, indeed “Result” data array that must be equal to “tangentialprojectiontraction_average” is not a vector…

Mehrdad, welcome to ParaView.

I can confirm there is a problem with your data in ParaView 5.6.0. Fortunately, using the expression 0.5*(1-((mag(tangentialprojectiontraction_average))/(shearstress_average))) in ParaView 5.7.0-RC1 works fine, so the bug appears to have been fixed in time for the ParaView 5.7.0 release in the next few weeks.

Thanks Cory, I would try ParaView 5.7.0-RC1 to see how it works.