CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   ParaView (https://www.cfd-online.com/Forums/paraview/)
-   -   [General] How to set an "active vector"? (https://www.cfd-online.com/Forums/paraview/188810-how-set-active-vector.html)

beral June 7, 2017 07:38

How to set an "active vector"?
 
Hi,

when applying the Transform filter, the vectors in the point/cell data are not transformed.

That seems to be an old problem in ParaView. It is not known, which 3-tuples are vectors and which are not, so the Transform filter just transformes the "active" one. Here is one of the Threads I found to the topic: http://vtk.1045678.n5.nabble.com/Pos....html#a5739364

Intuitively, the solution should be to set an option in the transform filter about which vectors to transform and which not. I cannot find such an option.

Since for my actual task I have only one vector which has to be transformed, it would be sufficient to set it as "active vector", as is mentioned in the solutions I found. But how to set an Array as the "active vector"?

beral June 8, 2017 06:03

Crazy Shit. There is no option to set the active vector. https://www.paraview.org/pipermail/p...ly/008620.html

The Voodoo to do it anyway is to apply a calculator before the transform filter and let the calculator just overwrite the vector with itself.

Code:

# Voodoo to set a vector as "active vector"
calculator1 = Calculator(Input=myDataToTransform)
calculator1.AttributeMode = 'Cell Data'
calculator1.ResultArrayName = 'MyArrayName'  # overwrite the array...
calculator1.Function = 'MyArrayName'          # ...with itself

# The vector 'MyArrayName' is now the "active vector".

transform1 = Transform(Input=calculator1)
...

It's really crazy. For ten years people are asking for an option to specify the vector-arrays which should (should not) be transformed by the transform filter. The transform filter can do the transformation, but there is no way to use this potential of the filter. It's all about an optional parameter in the transform filter constructor.


All times are GMT -4. The time now is 12:55.