CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

How to access the number of faces on a boundary

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 20, 2008, 13:01
Default Hi all, What is the function
  #1
jam
Member
 
Alain Martin
Join Date: Mar 2009
Posts: 40
Rep Power: 8
jam is on a distinguished road
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 is offline   Reply With Quote

Old   January 20, 2008, 14:13
Default I found it: scalar number
  #2
jam
Member
 
Alain Martin
Join Date: Mar 2009
Posts: 40
Rep Power: 8
jam is on a distinguished road
I found it:

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

where PatchID is the patch number.

-Alain
jam is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access to faces of a patch jaswi OpenFOAM Running, Solving & CFD 13 September 23, 2015 05:25
Inconsistent number of faces derath OpenFOAM Native Meshers: blockMesh 9 July 18, 2012 05:01
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
Number of Faces on a thread inside a UDF Nathan FLUENT 1 April 26, 2006 11:15
Access to name of a boundary stephan OpenFOAM Running, Solving & CFD 1 March 4, 2006 13:49


All times are GMT -4. The time now is 03:56.