Problems accessing owner cells
3 Attachment(s)
Hello foamers,
I want to access the owner cells of a partical face. Sorry for the wrong topic title. My mesh (see attached pictures) consists 72 nfaces with 24 nInternalFaces. With the following code, I'm gathering informations about points and faces for some other calculation. Code:
forAll(mesh.cells(), cellI) I'm a bit confused about the ordering. If I have a look at the constant/polyMesh/owner file (attached), I can see 72 entries which actually corresponds to the faceI range?! Can anybody help? P.S. I don't know if it's important, but the mesh was generated with Gmsh and converted via gmshToFoam. Kind regards Willy |
I've found out, that the first 24 entries in constant/polyMesh/owner are identical to the values stored in mesh.owner(). As far as I know the first entries in a faceList are internal faces. This means, that mesh.owner() just stores internalFaces. Since mesh.cells()[faceI] includes boundary faces it won't work accessing boundary faces in mesh.owner().
I guess, I have to include an additional condition, which checks whether the face is an internalFace or not. Something like this Code:
if(!mesh.isInternalFace(faceI)) continue; |
I've used the wrong function!
mesh.owner(): returns nInternalFaces (24) mesh.faceOwner(): returns nFaces (72) |
All times are GMT -4. The time now is 03:35. |