Go to the documentation of this file.
63 const scalar maxNonOrtho
71 const scalar minTetQuality
75 const scalar maxConcave
83 const scalar maxIntSkew
87 const scalar maxBounSkew
91 const scalar minWeight
95 const scalar minVolRatio
103 const scalar minTriangleTwist
107 scalar minFaceFlatness = -1.0;
108 dict.readIfPresent(
"minFaceFlatness", minFaceFlatness,
true);
113 label nWrongFaces = 0;
115 Info<<
"Checking faces in error :" <<
endl;
118 if (maxNonOrtho < 180.0-SMALL)
134 Info<<
" non-orthogonality > "
135 <<
setw(3) << maxNonOrtho
137 << nNewWrongFaces-nWrongFaces <<
endl;
139 nWrongFaces = nNewWrongFaces;
158 Info<<
" faces with face pyramid volume < "
159 <<
setw(5) << minVol <<
" : "
160 << nNewWrongFaces-nWrongFaces <<
endl;
162 nWrongFaces = nNewWrongFaces;
165 if (minTetQuality > -GREAT)
167 polyMeshGeometry::checkFaceTets
182 Info<<
" faces with face-decomposition tet quality < "
183 <<
setw(5) << minTetQuality <<
" : "
184 << nNewWrongFaces-nWrongFaces <<
endl;
186 nWrongFaces = nNewWrongFaces;
189 if (maxConcave < 180.0-SMALL)
204 Info<<
" faces with concavity > "
205 <<
setw(3) << maxConcave
207 << nNewWrongFaces-nWrongFaces <<
endl;
209 nWrongFaces = nNewWrongFaces;
212 if (minArea > -SMALL)
214 polyMeshGeometry::checkFaceArea
226 Info<<
" faces with area < "
227 <<
setw(5) << minArea
229 << nNewWrongFaces-nWrongFaces <<
endl;
231 nWrongFaces = nNewWrongFaces;
234 if (maxIntSkew > 0 || maxBounSkew > 0)
253 Info<<
" faces with skewness > "
254 <<
setw(3) << maxIntSkew
255 <<
" (internal) or " <<
setw(3) << maxBounSkew
256 <<
" (boundary) : " << nNewWrongFaces-nWrongFaces <<
endl;
258 nWrongFaces = nNewWrongFaces;
261 if (minWeight >= 0 && minWeight < 1)
263 polyMeshGeometry::checkFaceWeights
278 Info<<
" faces with interpolation weights (0..1) < "
279 <<
setw(5) << minWeight
281 << nNewWrongFaces-nWrongFaces <<
endl;
283 nWrongFaces = nNewWrongFaces;
286 if (minVolRatio >= 0)
288 polyMeshGeometry::checkVolRatio
301 Info<<
" faces with volume ratio of neighbour cells < "
302 <<
setw(5) << minVolRatio
304 << nNewWrongFaces-nWrongFaces <<
endl;
306 nWrongFaces = nNewWrongFaces;
313 polyMeshGeometry::checkFaceTwist
328 Info<<
" faces with face twist < "
329 <<
setw(5) << minTwist
331 << nNewWrongFaces-nWrongFaces <<
endl;
333 nWrongFaces = nNewWrongFaces;
336 if (minTriangleTwist > -1)
340 polyMeshGeometry::checkTriangleTwist
354 Info<<
" faces with triangle twist < "
355 <<
setw(5) << minTriangleTwist
357 << nNewWrongFaces-nWrongFaces <<
endl;
359 nWrongFaces = nNewWrongFaces;
362 if (minFaceFlatness > -SMALL)
378 Info<<
" faces with flatness < "
379 <<
setw(5) << minFaceFlatness
381 << nNewWrongFaces-nWrongFaces <<
endl;
383 nWrongFaces = nNewWrongFaces;
388 polyMeshGeometry::checkCellDeterminant
395 polyMeshGeometry::affectedCells(
mesh, checkFaces),
401 Info<<
" faces on cells with determinant < "
402 <<
setw(5) << minDet <<
" : "
403 << nNewWrongFaces-nWrongFaces <<
endl;
405 nWrongFaces = nNewWrongFaces;
410 return nWrongFaces > 0;
468 const scalar maxNonOrtho
476 const scalar minTetQuality
480 const scalar maxConcave
488 const scalar maxIntSkew
492 const scalar maxBounSkew
496 const scalar minWeight
500 const scalar minVolRatio
504 const scalar minTwist
508 const scalar minTriangleTwist
512 scalar minFaceFlatness = -1.0;
513 dict.readIfPresent(
"minFaceFlatness", minFaceFlatness,
true);
518 label nWrongFaces = 0;
520 Info<<
"Checking faces in error :" <<
endl;
523 if (maxNonOrtho < 180.0-SMALL)
536 Info<<
" non-orthogonality > "
537 <<
setw(3) << maxNonOrtho
539 << nNewWrongFaces-nWrongFaces <<
endl;
541 nWrongFaces = nNewWrongFaces;
558 Info<<
" faces with face pyramid volume < "
559 <<
setw(5) << minVol <<
" : "
560 << nNewWrongFaces-nWrongFaces <<
endl;
562 nWrongFaces = nNewWrongFaces;
565 if (minTetQuality > -GREAT)
579 Info<<
" faces with face-decomposition tet quality < "
580 <<
setw(5) << minTetQuality <<
" : "
581 << nNewWrongFaces-nWrongFaces <<
endl;
583 nWrongFaces = nNewWrongFaces;
586 if (maxConcave < 180.0-SMALL)
599 Info<<
" faces with concavity > "
600 <<
setw(3) << maxConcave
602 << nNewWrongFaces-nWrongFaces <<
endl;
604 nWrongFaces = nNewWrongFaces;
607 if (minArea > -SMALL)
619 Info<<
" faces with area < "
620 <<
setw(5) << minArea
622 << nNewWrongFaces-nWrongFaces <<
endl;
624 nWrongFaces = nNewWrongFaces;
627 if (maxIntSkew > 0 || maxBounSkew > 0)
646 Info<<
" faces with skewness > "
647 <<
setw(3) << maxIntSkew
648 <<
" (internal) or " <<
setw(3) << maxBounSkew
649 <<
" (boundary) : " << nNewWrongFaces-nWrongFaces <<
endl;
651 nWrongFaces = nNewWrongFaces;
654 if (minWeight >= 0 && minWeight < 1)
667 Info<<
" faces with interpolation weights (0..1) < "
668 <<
setw(5) << minWeight
670 << nNewWrongFaces-nWrongFaces <<
endl;
672 nWrongFaces = nNewWrongFaces;
675 if (minVolRatio >= 0)
688 Info<<
" faces with volume ratio of neighbour cells < "
689 <<
setw(5) << minVolRatio
691 << nNewWrongFaces-nWrongFaces <<
endl;
693 nWrongFaces = nNewWrongFaces;
711 Info<<
" faces with face twist < "
712 <<
setw(5) << minTwist
714 << nNewWrongFaces-nWrongFaces <<
endl;
716 nWrongFaces = nNewWrongFaces;
719 if (minTriangleTwist > -1)
734 Info<<
" faces with triangle twist < "
735 <<
setw(5) << minTriangleTwist
737 << nNewWrongFaces-nWrongFaces <<
endl;
739 nWrongFaces = nNewWrongFaces;
742 if (minFaceFlatness > -SMALL)
755 Info<<
" faces with flatness < "
756 <<
setw(5) << minFaceFlatness
758 << nNewWrongFaces-nWrongFaces <<
endl;
760 nWrongFaces = nNewWrongFaces;
770 polyMeshGeometry::affectedCells(meshGeom.
mesh(), checkFaces),
776 Info<<
" faces on cells with determinant < "
777 <<
setw(5) << minDet <<
" : "
778 << nNewWrongFaces-nWrongFaces <<
endl;
780 nWrongFaces = nNewWrongFaces;
785 return nWrongFaces > 0;
static bool checkFaceDotProduct(const bool report, const scalar orthWarn, const polyMesh &, const vectorField &cellCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
See primitiveMesh.
const vectorField & faceAreas() const
bool checkMesh(const polyMeshGen &mesh, const bool report)
Check mesh for correctness. Returns false for no error.
void checkFaceSkewness(const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL)
Check face skewness.
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
static bool checkFaceWeights(const bool report, const scalar warnWeight, const polyMesh &mesh, const vectorField &cellCentres, const vectorField &faceCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Interpolation weights (0.5 for regular mesh)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool checkFaceTets(const bool report, const scalar minPyrVol, const polyMesh &, const vectorField &cellCentres, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *)
See primitiveMesh.
bool checkFaceFlatness(const polyMeshGen &, const bool report, const scalar warnFlatness, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face warpage: decompose face and check ratio between.
Mesh consisting of general polyhedral cells.
const vectorField & faceCentres() const
bool checkFaceAngles(const polyMeshGen &, const bool report=false, const scalar maxDeg=10, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face angles.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static bool checkFaceArea(const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
Small faces.
Pre-declare SubField and related Field type.
const polyMesh & mesh() const
Istream and Ostream manipulators taking arguments.
void checkFaceDotProduct(const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL)
Check for non-orthogonality.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
A list of keyword definitions, which are a keyword followed by any number of values (e....
label size() const
Return number of elements in table.
Omanip< int > setw(const int i)
static bool checkFaceTwist(const bool report, const scalar minTwist, const polyMesh &, const vectorField &cellCentres, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Triangle (from face-centre decomposition) normal v.s.
bool checkFacePyramids(const polyMeshGen &, const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face pyramid volume.
static bool checkFaceFlatness(const bool report, const scalar minFlatness, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Area of faces v.s. sum of triangle areas.
static bool checkMesh(const bool report, const polyMesh &mesh, const dictionary &dict, labelHashSet &wrongFaces)
Check mesh with mesh settings in dict. Collects incorrect faces.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Updateable mesh geometry and checking routines.
static bool checkFacePyramids(const bool report, const scalar minPyrVol, const polyMesh &, const vectorField &cellCentres, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *)
See primitiveMesh.
static bool checkCellDeterminant(const bool report, const scalar minDet, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, const labelList &affectedCells, labelHashSet *setPtr)
Area of internal faces v.s. boundary faces.
static bool checkTriangleTwist(const bool report, const scalar minTwist, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Consecutive triangle (from face-centre decomposition) normals.
const vectorField & cellCentres() const
static bool checkVolRatio(const bool report, const scalar warnRatio, const polyMesh &mesh, const scalarField &cellVolumes, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Cell volume ratio of neighbouring cells (1 for regular mesh)
static bool checkFaceAngles(const bool report, const scalar maxDeg, const polyMesh &mesh, const vectorField &faceAreas, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
See primitiveMesh.