CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM

Line of Code

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

LinkBack Thread Tools Display Modes
Old   October 21, 2010, 09:20
Default Line of Code
Senior Member
Join Date: Sep 2009
Posts: 199
Rep Power: 10
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:


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

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

it might has been answered before...


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.


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


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 19:45.