CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Extracting one component of a tensorField (https://www.cfd-online.com/Forums/openfoam-programming-development/113132-extracting-one-component-tensorfield.html)

anishtain4 February 13, 2013 03:58

Extracting one component of a tensorField
 
In a tensor T if you use T.xx() it returns the first component of it, and according to openfoam convention when you do it to a tensorField it should return a scalarField, like when you do it with a vectorField, but when I try to use it that just blows up and complain that no such a member is defined. How should I extract this field?

anishtain4 February 15, 2013 07:19

Please give me a guide, I rather not go through the forAll to access each point individually.

nimasam February 15, 2013 14:38

Hello Dear Mahdi

using following structure:
Quote:

T.component(tensor::XX);


All times are GMT -4. The time now is 20:24.