|
[Sponsors] |
October 21, 2010, 09:20 |
Line of Code
|
#1 |
Senior Member
n/a
Join Date: Sep 2009
Posts: 199
Rep Power: 16 |
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 ? |
|
October 21, 2010, 11:05 |
|
#2 |
Senior Member
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 17 |
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! |
|
|
|
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 02: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 |