mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: foamToEnsight: handle empty patches
This commit is contained in:
@ -194,6 +194,8 @@ void Foam::ensightMesh::correct()
|
||||
if (!noPatches_)
|
||||
{
|
||||
forAll(mesh_.boundary(), patchi)
|
||||
{
|
||||
if (mesh_.boundary()[patchi].size())
|
||||
{
|
||||
const polyPatch& p = mesh_.boundaryMesh()[patchi];
|
||||
|
||||
@ -232,6 +234,7 @@ void Foam::ensightMesh::correct()
|
||||
polys.setSize(nPolys);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
forAll(allPatchNames_, patchi)
|
||||
{
|
||||
@ -239,11 +242,14 @@ void Foam::ensightMesh::correct()
|
||||
nFacePrimitives nfp;
|
||||
|
||||
if (patchNames_.empty() || patchNames_.found(patchName))
|
||||
{
|
||||
if (mesh_.boundary()[patchi].size())
|
||||
{
|
||||
nfp.nTris = boundaryFaceSets_[patchi].tris.size();
|
||||
nfp.nQuads = boundaryFaceSets_[patchi].quads.size();
|
||||
nfp.nPolys = boundaryFaceSets_[patchi].polys.size();
|
||||
}
|
||||
}
|
||||
|
||||
reduce(nfp.nTris, sumOp<label>());
|
||||
reduce(nfp.nQuads, sumOp<label>());
|
||||
|
||||
Reference in New Issue
Block a user