How to loop through all the field?
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.
|
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 |
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?
|
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 |
Thank you very much, it helps.
Quote:
|
All times are GMT -4. The time now is 00:19. |