accessing to parameters of a volVectorField
hi I want to access the parameters of a volVectorField I try this:
forAll( p,celli){ if ( p[celli] < 1.e-5 ) { ... } } it works for a volScalarField but I want to do something on u a volVectorField that has ux , uy , uz ,when (ux < 1.e-5 ) and I don't know how to do this? thanks to help me. |
luckily I can solve my problem first I try this:
forAll(U , celli){ if (U[celli] < vector(1.e-5 , 1.e-5 , 1.e-5) ) { ....... } } and it works, later I use this trick: volScalarField UU = U.component(0); // gives me Ux foaAll(UU , celli){ if (UU [celli] < 1.e-5 ) // check if Ux smaller than 1.e-5 { .......... } } and it works!:eek: |
All times are GMT -4. The time now is 07:18. |