Calculator filter problem

I used calculator filter before and it worked fine. It created a new field which could be selected from the field list (‘Array Name’). Now I am doing the same steps as before and put the same formula as before but after applying the filter the new entry is not visible in the field list. Did something change and I should look for the results somewhere else?

@bdaqui, may have some insights here?

I will look into this. There has been a small change client-side to fix a separate bug, that may have had unintended consequences that we did not observe when testing the fix.

I would like to bring an update to this issue. We have been able to reproduce the problem and have isolated the point at which the regression was introduced. We will be working on fixing fixing this.

2 Likes

Was this bug resolved? I’ve noticed the only Solution Field (point data) item I can do calculations on is von_Mises_stress, displacement and total_strain won’t work - in the sense that the latter examples don’t produce a ‘Results’ entry in the Field drop-down.

It could do with some error feedback; at the moment the only way you know its not working is there’s no result field in the drop-down.

Can you point me to any documentation on the maths functions available?

Hi @Irving,

Thanks for your message. I took the liberty of checking one of your public projects. Concerning the issues you mention, I can provide the following feedback:

  • The displacement in the formula box does work for me:
  • The stress field is a tensor, and the ParaView calculator filter cannot be applied to it, which is analogous to what one expects from the desktop version of ParaView.
    What you can however do, is use the tensor components, for example:
stress_XX * 10 + stress_XY
or in general:
tensor_component * ...

  • Error reporting:
    You are right here. The calculator can be applied on either scalars (such as the components) or vectors (such as the displacement) and the failures are not currently being propagated all the way back to the user. This is unfortunately a limitation of the underlying back-end, which we are looking to address.

  • Calculator filter documentation
    I agree, this is something which is missing, as well as it may be useful for some other less intuitive actions. We will work on adding more about this in the online documentation.

A brief description of how it operates can be found on Beginning Filters - KitwarePublic
and a more in-depth, proper explanation can be found in the ParaView guide: http://www.paraview.org/paraview-downloads/download.php?submit=Download&version=v5.0&type=data&os=all&downloadFile=ParaViewGuide-CE-v5.0.0.pdf page 97. Where user interface is concerned, it refers mainly to the desktop version, however the math formulae as well as what kind of data is supported also apply to our online variant.

As an additional method (if not the most convenient) to understand which math functions are available to you, I could also suggest looking at the desktop version of ParaView and calling on the calculator filter.

Quoting from the guide:

• Clear: Erase the current function.
• /: Divide one scalar by another. The operands for this function are not required to be enclosed in parentheses.
• *: Multiply two scalars, or multiply a vector by a scalar (scalar multiple). The operands for this function are not
required to be enclosed in parentheses.
• -: Negate a scalar or vector (unary minus), or subtract one scalar or vector from another. The operands for this
function are not required to be enclosed in parentheses.
• +: Add two scalars or two vectors. The operands for this function are not required to be enclosed in parentheses.
• sin: Compute the sine of a scalar.
• cos: Compute the cosine of a scalar.
• tan: Compute the tangent of a scalar.
• asin: Compute the arcsine of a scalar.
• acos: Compute the arccosine of a scalar.
• atan: Compute the arctangent of a scalar.
• sinh: Compute the hyperbolic sine of a scalar.
• cosh: Compute the hyperbolic cosine of a scalar.
• tanh: Compute the hyperbolic tangent of a scalar.
• min: Compute minimum of two scalars.
• max: Compute maximum of two scalars.
• xˆy: Raise one scalar to the power of another scalar. The operands for this function are not required to be enclosed
in parentheses.
• sqrt: Compute the square root of a scalar.
• eˆx: Raise e to the power of a scalar.
• log10: Compute the logarithm of a scalar to the base 10.
• ln: Compute the logarithm of a scalar to the base e.
• ceil: Compute the ceiling of a scalar.
• floor: Compute the floor of a scalar.
• abs: Compute the absolute value of a scalar.
• v1.v2: Compute the dot product of two vectors. The operands for this function are not required to be enclosed in parentheses. cross: Compute cross product of two vectors. mag: Compute the magnitude of a vector. norm:
Normalize a vector. The operands are described below. The digits 0 - 9 and the decimal point are used to enter
constant scalar values.
• iHat, jHat, and kHat are vector constants representing unit vectors in the X, Y, and Z directions, respectively.

I hope I was able to clarify your questions at least to a certain extent, please do let us know if we can help you further.

3 Likes