Skip to content
Snippets Groups Projects
Commit 2bfe3cef authored by laurence's avatar laurence
Browse files

ENH: Do not add empty patches to the patch list

parent a153b8ef
No related branches found
No related tags found
No related merge requests found
...@@ -1027,17 +1027,24 @@ void Foam::conformalVoronoiMesh::writeMesh ...@@ -1027,17 +1027,24 @@ void Foam::conformalVoronoiMesh::writeMesh
} }
else else
{ {
patches[nValidPatches] = polyPatch::New // Check that the patch is not empty on every processor
( label totalPatchSize = patchSizes[p];
patchTypes[p], reduce(totalPatchSize, sumOp<label>());
patchNames[p],
patchSizes[p], if (totalPatchSize > 0)
patchStarts[p], {
nValidPatches, patches[nValidPatches] = polyPatch::New
mesh.boundaryMesh() (
).ptr(); patchTypes[p],
patchNames[p],
patchSizes[p],
patchStarts[p],
nValidPatches,
mesh.boundaryMesh()
).ptr();
nValidPatches++; nValidPatches++;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment