CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   elemenst of surface scalerfield (

hawkeye321 October 21, 2012 16:23

elemenst of surface scalerfield
I have a surface scaler field named glS which is equal to
surfaceScalarField gLS = fvc::interpolate(gL);
wher gL in volscalerfield.

The loop for all (celli,gl) can check all the element of gL, is there a similar command to check the elements of surfacesclar field, gLS?

TNX for your help!

kathrin_kissling October 22, 2012 03:06


it works absolutely the same:

forAll(mySurfaceScalarField, faceI)

forAll(list, i) is just a function wrapping for (Foam::label i=0; i<(list).size(); i++)

its defined in UList.H

it works for all containers having a .size() function!



hawkeye321 October 24, 2012 09:30

kathrin, thanks for the comment!

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