From a34ddef943efabcc0707cbdc8b88bb144360f59e Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 24 Feb 2022 16:42:39 +0000 Subject: [PATCH] snappyHexMesh: Check that input mesh is 3D, i.e. does not contain empty patches required for mesh relaxation after snapping. --- .../mesh/generation/snappyHexMesh/snappyHexMesh.C | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index fd9e452b8c..88f733ee0c 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -700,6 +700,18 @@ int main(int argc, char *argv[]) Info<< "Read mesh in = " << runTime.cpuTimeIncrement() << " s" << endl; + // Check that the read mesh is fully 3D + // as required for mesh relaxation after snapping + if (mesh.nSolutionD() != 3) + { + FatalErrorIn(args.executable()) + << "Mesh provided is not fully 3D" + " as required for mesh relaxation after snapping" << nl + << "Convert all empty patches to appropriate types for a 3D mesh," + " current patch types are" << nl << mesh.boundaryMesh().types() + << exit(FatalError); + } + // Check patches and faceZones are synchronised mesh.boundaryMesh().checkParallelSync(true); meshRefinement::checkCoupledFaceZones(mesh);