loop over cells in parallel processing
Dear Foamers,
For my computations, I'm using a VolScalarField representing a mask, which is either 0 or 1. This mask was obtained previously with triSurface functions, and gives a representation of a volume geometry. This was done perfectly in parallel. Now, I want to define a new mask, named mask2, which defines the layer of cells surrounding the previous volume. Practically, for all the cells where mask = 0, and which have at least one neighbor where mask=1, then mask2=1. I've implemented it like that : Code:
const unallocLabelList & nei = mesh.neighbour(); Unfortunately, its not working in parallel, when the separation between two processors matches the volume interface. Some cells which must be in the surrounding layer are missing. I suppose it is because the owner proc is not finding the true value of the mask for the neighbors which are in another proc. How can I handle that ? Do I have to write the parallel communication by myself ? Thanks for your help. Mat |
Hi Foamers,
My error was that the condition "if (mesh.isInternalFace(faces[faceI]))" excludes all the faces between two processors in parallel. They are not internal faces in this case. By the way, I think it is not possible to define such a scalar field by looping over the cells in parallel, without implementing ourself the communications between processors. Another way to do so, its by using the gradient of the masks. However, I've realized that I do not obtain the same results for fvc:grad() in sequential and in parallel !! Why ? Best, Mat |
All times are GMT -4. The time now is 09:52. |