CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > 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

Like Tree1Likes
  • 1 Post By jam

Reply
 
LinkBack Thread Tools Search this Thread 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: 17
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: 17
jam is on a distinguished road
I found it:

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

where PatchID is the patch number.

-Alain
Tobi likes this.
jam is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[blockMesh] Inconsistent number of faces derath OpenFOAM Meshing & Mesh Conversion 15 February 1, 2023 03:51
How to access to faces of a patch jaswi OpenFOAM Running, Solving & CFD 17 October 7, 2020 11:30
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 10:01
Number of Faces on a thread inside a UDF Nathan FLUENT 1 April 26, 2006 12: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 04:41.