In parallel the sets are reconstructed. e.g. mpirun -np 6 checkMesh -parallel -allGeometry -allTopology -writeSets vtk will create a postProcessing/ folder with the vtk files of the (reconstructed) faceSets and cellSets. Also improved analysis of disconnected regions now also checks for point connectivity with is useful for detecting if AMI regions have duplicate points. Patch contributed by Mattijs Janssens
41 lines
961 B
C
41 lines
961 B
C
#include "checkMeshQuality.H"
|
|
#include "polyMesh.H"
|
|
#include "cellSet.H"
|
|
#include "faceSet.H"
|
|
#include "motionSmoother.H"
|
|
#include "surfaceWriter.H"
|
|
#include "checkTools.H"
|
|
|
|
Foam::label Foam::checkMeshQuality
|
|
(
|
|
const polyMesh& mesh,
|
|
const dictionary& dict,
|
|
const autoPtr<surfaceWriter>& writer
|
|
)
|
|
{
|
|
label noFailedChecks = 0;
|
|
|
|
{
|
|
faceSet faces(mesh, "meshQualityFaces", mesh.nFaces()/100+1);
|
|
motionSmoother::checkMesh(false, mesh, dict, faces);
|
|
|
|
label nFaces = returnReduce(faces.size(), sumOp<label>());
|
|
|
|
if (nFaces > 0)
|
|
{
|
|
noFailedChecks++;
|
|
|
|
Info<< " <<Writing " << nFaces
|
|
<< " faces in error to set " << faces.name() << endl;
|
|
faces.instance() = mesh.pointsInstance();
|
|
faces.write();
|
|
if (writer.valid())
|
|
{
|
|
mergeAndWrite(writer(), faces);
|
|
}
|
|
}
|
|
}
|
|
|
|
return noFailedChecks;
|
|
}
|