diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index cf09bb1132..fd9e452b8c 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -565,12 +565,8 @@ scalar getMergeDistance(const polyMesh& mesh, const scalar mergeTol) void removeZeroSizedPatches(fvMesh& mesh) { - // Remove any zero-sized ones. Assumes - // - processor patches are already only there if needed - // - all other patches are available on all processors - // - but coupled ones might still be needed, even if zero-size - // (e.g. processorCyclic) - // See also logic in createPatch. + // Remove non-constraint zero-sized patches + const polyBoundaryMesh& pbm = mesh.boundaryMesh(); labelList oldToNew(pbm.size(), -1); @@ -579,31 +575,16 @@ void removeZeroSizedPatches(fvMesh& mesh) { const polyPatch& pp = pbm[patchi]; - if (!isA(pp)) - { - if - ( - isA(pp) - || returnReduce(pp.size(), sumOp