ENH: checkMesh: have -writeSets option

- checkMesh has option to write faceSets or (outside of) cellSets as
sampledSurface format. It automatically reconstructs the set on the master
and writes it to the postProcessing folder (as any sampledSurface). E.g.

    mpirun -np 6 checkMesh -allTopology -allGeometry -writeSets vtk -parallel

- fixed order writing of symmTensor in Ensight writers
This commit is contained in:
mattijs
2015-11-23 15:24:33 +00:00
parent 9fd840c12a
commit 61dd625227
26 changed files with 976 additions and 253 deletions

View File

@ -7,6 +7,8 @@
#include "wedgePolyPatch.H"
#include "unitConversion.H"
#include "polyMeshTetDecomposition.H"
#include "surfaceWriter.H"
#include "checkTools.H"
// Find wedge with opposite orientation. Note: does not actually check that
@ -477,7 +479,12 @@ bool Foam::checkCoupledPoints
}
Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
Foam::label Foam::checkGeometry
(
const polyMesh& mesh,
const bool allGeometry,
const autoPtr<surfaceWriter>& writer
)
{
label noFailedChecks = 0;
@ -563,6 +570,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " non closed cells to set " << cells.name() << endl;
cells.instance() = mesh.pointsInstance();
cells.write();
if (writer.valid())
{
mergeAndWrite(writer(), cells);
}
}
}
@ -575,6 +586,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< aspectCells.name() << endl;
aspectCells.instance() = mesh.pointsInstance();
aspectCells.write();
if (writer.valid())
{
mergeAndWrite(writer(), aspectCells);
}
}
}
@ -592,6 +607,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " zero area faces to set " << faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
}
@ -610,6 +629,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " zero volume cells to set " << cells.name() << endl;
cells.instance() = mesh.pointsInstance();
cells.write();
if (writer.valid())
{
mergeAndWrite(writer(), cells);
}
}
}
}
@ -629,6 +652,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " non-orthogonal faces to set " << faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
@ -647,6 +674,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
}
@ -665,6 +696,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " skew faces to set " << faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
}
@ -685,6 +720,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
}
@ -714,6 +753,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< "decomposition tets to set " << faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
}
@ -774,6 +817,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
}
@ -793,6 +840,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " warped faces to set " << faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
}
@ -810,6 +861,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " under-determined cells to set " << cells.name() << endl;
cells.instance() = mesh.pointsInstance();
cells.write();
if (writer.valid())
{
mergeAndWrite(writer(), cells);
}
}
}
@ -826,6 +881,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< " concave cells to set " << cells.name() << endl;
cells.instance() = mesh.pointsInstance();
cells.write();
if (writer.valid())
{
mergeAndWrite(writer(), cells);
}
}
}
@ -843,6 +902,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}
@ -860,6 +923,10 @@ Foam::label Foam::checkGeometry(const polyMesh& mesh, const bool allGeometry)
<< faces.name() << endl;
faces.instance() = mesh.pointsInstance();
faces.write();
if (writer.valid())
{
mergeAndWrite(writer(), faces);
}
}
}