Obtaining the number of faces contained in a patch.
Dear Foamers,
I had two questions related to the information depending on a certain patch.
Thank you for your reply! Francois. |
Francois, as regards your first question I don't what kind of class is nbr. I'll give you an example with a volScalarField:
T.boundaryField()[nbrPatchID].size() I think the solution is not far of this. Always remember to look in classes whose your interested in class inherits. In this case size() method is implemented in fvPatch class. Greetings from Argentina. |
Dear Santiago,
Thank you for your reply! Coincidentally, your example was exactly what I was looking for, as I am trying to modify the velocity field of a volVectorField. :) It works! nbrMesh is of type fvMesh, and from that object I'm read a velocity field which I want to adapt. I was trying to get the patch size from the mesh object through the use op some obscure function called .nFaces() contained in primitiveMesh, and inherited via via by fvMesh... :o How to make your life complicated... Thanks again for your efficient solution! Does anybody care to give me some hints on how to proceed with my second question? ;) Greetings from sunny Holland, Francois |
Try whichPatch and whichFace from boundaryMesh.
|
Thanks for the tip!
|
All times are GMT -4. The time now is 03:17. |