|
[Sponsors] |
March 20, 2009, 04:21 |
How to loop through all the field?
|
#1 |
New Member
Shui Pei
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
In fact I am trying th get the value of one internal face, I am a freshman so i try to write a program to loop and to choose. Is there any method or utilities to do so? And is there any function to loop through all the field, not only the boundary. Thank you very much.
|
|
March 20, 2009, 04:38 |
|
#2 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi Shui Pei
You need to elaborate significantly on your question, because it is not entirely clear what you are trying to achieve. Best regards, Niels |
|
March 20, 2009, 05:49 |
|
#3 |
New Member
Shui Pei
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Hmm, now I have a mesh, I want to use my program to loop all the grids in the mesh and to judge with their position and then to output the data in specified position, can I?
|
|
March 20, 2009, 07:11 |
|
#4 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi
You could do something like this: const vectorField & centers = mesh.C(); forAll(centers,ii) { if (<statement for your position>) { <Do what is needed> } } Best regards, Niels |
|
March 20, 2009, 20:41 |
|
#5 |
New Member
Shui Pei
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] Problem with Gmsh | nishant_hull | OpenFOAM Meshing & Mesh Conversion | 23 | August 5, 2015 02:09 |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 06:20 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 06:51 |
for loop inside a cell_loop? | MHDWill | FLUENT | 0 | September 26, 2007 21:24 |
NACA0012 geometry/design software needed | Franny | Main CFD Forum | 13 | July 7, 2007 15:57 |