From a44a993d27e566779b9108fa262fd6763f54b21d Mon Sep 17 00:00:00 2001 From: mattijs Date: Wed, 20 Apr 2011 10:51:48 +0100 Subject: [PATCH] ENH: emptyFvPatchField: moved check to checkMesh It now handles multiple empty patches --- .../manipulation/checkMesh/checkTopology.C | 58 ++++++++++++++----- .../constraint/empty/emptyFvPatchField.C | 29 +++++----- 2 files changed, 58 insertions(+), 29 deletions(-) diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C index 90e6a379e0..996e6fcb37 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkTopology.C @@ -6,6 +6,7 @@ #include "faceSet.H" #include "pointSet.H" #include "IOmanip.H" +#include "emptyPolyPatch.H" Foam::label Foam::checkTopology ( @@ -21,6 +22,29 @@ Foam::label Foam::checkTopology // Check if the boundary definition is unique mesh.boundaryMesh().checkDefinition(true); + // Check that empty patches cover all sides of the mesh + { + label nEmpty = 0; + forAll(mesh.boundaryMesh(), patchI) + { + if (isA(mesh.boundaryMesh()[patchI])) + { + nEmpty += mesh.boundaryMesh()[patchI].size(); + } + } + reduce(nEmpty, sumOp