|
[Sponsors] |
December 4, 2013, 08:30 |
Problems accessing owner cells
|
#1 |
Member
Join Date: May 2012
Posts: 55
Rep Power: 15 |
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) { cell faces = mesh.cells()[cellI]; // contains face indices of cellI: cellI=0: 6(0 1 24 36 40 41)) forAll(faces, j) { label faceI = faces[j]; face points = mesh.faces()[faceI]; Info << mesh.owner().size() << endl; // size for this mesh is 24 label ownCell = mesh.owner()[faceI]; //this line causes an error during calculation } } 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 Last edited by styleworker; December 4, 2013 at 10:31. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Accessing neighbor cells fields | antoniofct | OpenFOAM Programming & Development | 7 | May 3, 2021 03:14 |
accessing neighbour cells in parallel computing | impecca | OpenFOAM Programming & Development | 4 | April 11, 2019 04:09 |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 08:54 |
killed "snappyHexMesh" | parkh32 | OpenFOAM Pre-Processing | 2 | April 8, 2012 17:12 |
[snappyHexMesh] external flow with snappyHexMesh | chelvistero | OpenFOAM Meshing & Mesh Conversion | 11 | January 15, 2010 19:43 |