CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to access the number of faces on a boundary (http://www.cfd-online.com/Forums/openfoam-solving/59218-how-access-number-faces-boundary.html)

jam January 20, 2008 13:01

Hi all, What is the function
 
Hi all,
What is the function to access the total number of faces ( triangles) on each boundary?
I have this function:
Info << "number " << mesh.boundaryMesh()[0] << endl;
which give:
patch
patch0
5506 945258


for patch no 0.
I would like to extract the number 5506 from this lot to do some calculation.
Thanks,
-Alain

jam January 20, 2008 14:13

I found it: scalar number
 
I found it:

scalar number = mesh.boundaryMesh()[PatchID].size() ;

where PatchID is the patch number.

-Alain


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