From 415cdb6a6300623c7b847e4d9eda862125123406 Mon Sep 17 00:00:00 2001 From: mattijs <mattijs> Date: Mon, 15 Apr 2013 16:55:59 +0100 Subject: [PATCH] ENH: checkMesh: check volume ratio and face interpolation weights --- .../manipulation/checkMesh/checkGeometry.C | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index ef521a257d2..cf503b05748 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -832,5 +832,39 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry) } } + if (allGeometry) + { + faceSet faces(mesh, "lowWeightFaces", mesh.nFaces()/100); + if (mesh.checkFaceWeight(true, 0.05, &faces)) + { + noFailedChecks++; + + label nFaces = returnReduce(faces.size(), sumOp<label>()); + + Info<< " <<Writing " << nFaces + << " faces with low interpolation weights to set " + << faces.name() << endl; + faces.instance() = mesh.pointsInstance(); + faces.write(); + } + } + + if (allGeometry) + { + faceSet faces(mesh, "lowVolRatioFaces", mesh.nFaces()/100); + if (mesh.checkVolRatio(true, 0.05, &faces)) + { + noFailedChecks++; + + label nFaces = returnReduce(faces.size(), sumOp<label>()); + + Info<< " <<Writing " << nFaces + << " faces with low volume ratio cells to set " + << faces.name() << endl; + faces.instance() = mesh.pointsInstance(); + faces.write(); + } + } + return noFailedChecks; } -- GitLab