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

Line of Code

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 21, 2010, 09:20
Default Line of Code
  #1
Senior Member
 
n/a
Join Date: Sep 2009
Posts: 198
Rep Power: 7
deji is on a distinguished road
Good morning FOAMers. I have a question about a style of coding I have seen quite common in OpenFOAM and I do not quite comprehend it, and here it is:

1)mesh.boundary()[patchi].name()
2)mesh.magSf().boundaryField()[patchi]

Can someone kindly explain these two lines of coding ?
deji is offline   Reply With Quote

Old   October 21, 2010, 11:05
Default
  #2
Senior Member
 
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 8
kathrin_kissling is on a distinguished road
Hi deji,

it might has been answered before...

mesh.boundary()[patchi].name():

You are taking your mesh (guessing fvMesh) and take a reference to your boundary mesh. .boundary()
[patchI] gives you the ith patch. I imagine this line within a forAll loop. So you are looping over all boundary patches and patchI is the actual one.
.name() gives you the name of it.

Cool?

More cool you can get all this information from the doxygen. If you go to the fvMesh class you will find the member function boundary(). And from there its easy.

Perhaps you can now try to figure out the second one on your own.


Hope this helps!
kathrin_kissling 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
Install problem in linux navaladi OpenFOAM Installation 11 July 17, 2008 02:24
OpenFOAM with IBM AIX matthias OpenFOAM Installation 20 March 25, 2008 03:36
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19
Design Integration with CFD? John C. Chien Main CFD Forum 19 May 17, 2001 15:56
What is the Better Way to Do CFD? John C. Chien Main CFD Forum 54 April 23, 2001 08:10


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