mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: Do not add empty patches to the patch list
This commit is contained in:
@ -1027,17 +1027,24 @@ void Foam::conformalVoronoiMesh::writeMesh
|
||||
}
|
||||
else
|
||||
{
|
||||
patches[nValidPatches] = polyPatch::New
|
||||
(
|
||||
patchTypes[p],
|
||||
patchNames[p],
|
||||
patchSizes[p],
|
||||
patchStarts[p],
|
||||
nValidPatches,
|
||||
mesh.boundaryMesh()
|
||||
).ptr();
|
||||
// Check that the patch is not empty on every processor
|
||||
label totalPatchSize = patchSizes[p];
|
||||
reduce(totalPatchSize, sumOp<label>());
|
||||
|
||||
nValidPatches++;
|
||||
if (totalPatchSize > 0)
|
||||
{
|
||||
patches[nValidPatches] = polyPatch::New
|
||||
(
|
||||
patchTypes[p],
|
||||
patchNames[p],
|
||||
patchSizes[p],
|
||||
patchStarts[p],
|
||||
nValidPatches,
|
||||
mesh.boundaryMesh()
|
||||
).ptr();
|
||||
|
||||
nValidPatches++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user