owner - neighbour relations for processor boundaries
I am trying to save cell centred values of a volScalarField to two scalar lists (ownPsi and neighPsi) defined on the cell faces as in the following piece of code:
Thanks in advance!
You appear to be confused - a processor boundary is like any other patch. it does not contain any neighbour information (obviously, because it's a boundary).
In fact, you're pretty lucky to have your code run at all, because the mesh.neighbour() list ends at the number of internal faces in the mesh, and you'd have a nice, pretty seg-fault if the second part of your condition was ever executed.
What you can guarantee, however, is that the processor boundary of the other sub-domain (which talks to this boundary patch) will contain an identical number of faces, and both patches have the faces ordered identically within the patch, such that their zeroth points and face centres align geometrically. Since they point in opposite directions (always out of the domain), and the right-hand face-orientation rule, the 1st point corresponds to the (n-1)th point, the 2nd with the (n-2)th point, and so on for face-pairs...
thank you for your quick reply! I got it now -- I used to think that the faces of a processor patch would need the owner-neighbour relation. So thank you very much for the clarification! I realised that label mesh.neighbour()[gFaceI]; does not work in this case and forgot to delete it....
|All times are GMT -4. The time now is 07:10.|