69 const scalar maxNonOrtho
71 get<scalar>(
dict,
"maxNonOrtho", dryRun, keyType::REGEX_RECURSIVE)
75 get<scalar>(
dict,
"minVol", dryRun, keyType::REGEX_RECURSIVE)
77 const scalar minTetQuality
79 get<scalar>(
dict,
"minTetQuality", dryRun, keyType::REGEX_RECURSIVE)
81 const scalar maxConcave
83 get<scalar>(
dict,
"maxConcave", dryRun, keyType::REGEX_RECURSIVE)
87 get<scalar>(
dict,
"minArea", dryRun, keyType::REGEX_RECURSIVE)
89 const scalar maxIntSkew
93 dict,
"maxInternalSkewness", dryRun, keyType::REGEX_RECURSIVE
96 const scalar maxBounSkew
100 dict,
"maxBoundarySkewness", dryRun, keyType::REGEX_RECURSIVE
103 const scalar minWeight
105 get<scalar>(
dict,
"minFaceWeight", dryRun, keyType::REGEX_RECURSIVE)
107 const scalar minVolRatio
109 get<scalar>(
dict,
"minVolRatio", dryRun, keyType::REGEX_RECURSIVE)
111 const scalar minTwist
113 get<scalar>(
dict,
"minTwist", dryRun, keyType::REGEX_RECURSIVE)
115 const scalar minTriangleTwist
117 get<scalar>(
dict,
"minTriangleTwist", dryRun, keyType::REGEX_RECURSIVE)
119 const scalar minFaceFlatness
121 dict.getOrDefault<scalar>
123 "minFaceFlatness", -1, keyType::REGEX_RECURSIVE
128 get<scalar>(
dict,
"minDeterminant", dryRun, keyType::REGEX_RECURSIVE)
137 if (errorMsg.size() || IOerrorMsg.size())
146 <<
"Missing/incorrect required dictionary entries:" <<
nl
148 << IOerrorMsg.c_str() <<
nl
149 << errorMsg.c_str() <<
nl
160 label nWrongFaces = 0;
162 Info<<
"Checking faces in error :" <<
endl;
165 if (maxNonOrtho < 180.0-SMALL)
167 polyMeshGeometry::checkFaceDotProduct
181 Info<<
" non-orthogonality > "
182 <<
setw(3) << maxNonOrtho
184 << nNewWrongFaces-nWrongFaces <<
endl;
186 nWrongFaces = nNewWrongFaces;
191 polyMeshGeometry::checkFacePyramids
205 Info<<
" faces with face pyramid volume < "
206 <<
setw(5) << minVol <<
" : "
207 << nNewWrongFaces-nWrongFaces <<
endl;
209 nWrongFaces = nNewWrongFaces;
212 if (minTetQuality > -GREAT)
214 polyMeshGeometry::checkFaceTets
229 Info<<
" faces with face-decomposition tet quality < "
230 <<
setw(5) << minTetQuality <<
" : "
231 << nNewWrongFaces-nWrongFaces <<
endl;
233 nWrongFaces = nNewWrongFaces;
236 if (maxConcave < 180.0-SMALL)
238 polyMeshGeometry::checkFaceAngles
251 Info<<
" faces with concavity > "
252 <<
setw(3) << maxConcave
254 << nNewWrongFaces-nWrongFaces <<
endl;
256 nWrongFaces = nNewWrongFaces;
259 if (minArea > -SMALL)
261 polyMeshGeometry::checkFaceArea
273 Info<<
" faces with area < "
274 <<
setw(5) << minArea
276 << nNewWrongFaces-nWrongFaces <<
endl;
278 nWrongFaces = nNewWrongFaces;
281 if (maxIntSkew > 0 || maxBounSkew > 0)
283 polyMeshGeometry::checkFaceSkewness
300 Info<<
" faces with skewness > "
301 <<
setw(3) << maxIntSkew
302 <<
" (internal) or " <<
setw(3) << maxBounSkew
303 <<
" (boundary) : " << nNewWrongFaces-nWrongFaces <<
endl;
305 nWrongFaces = nNewWrongFaces;
308 if (minWeight >= 0 && minWeight < 1)
310 polyMeshGeometry::checkFaceWeights
325 Info<<
" faces with interpolation weights (0..1) < "
326 <<
setw(5) << minWeight
328 << nNewWrongFaces-nWrongFaces <<
endl;
330 nWrongFaces = nNewWrongFaces;
333 if (minVolRatio >= 0)
335 polyMeshGeometry::checkVolRatio
348 Info<<
" faces with volume ratio of neighbour cells < "
349 <<
setw(5) << minVolRatio
351 << nNewWrongFaces-nWrongFaces <<
endl;
353 nWrongFaces = nNewWrongFaces;
360 polyMeshGeometry::checkFaceTwist
375 Info<<
" faces with face twist < "
376 <<
setw(5) << minTwist
378 << nNewWrongFaces-nWrongFaces <<
endl;
380 nWrongFaces = nNewWrongFaces;
383 if (minTriangleTwist > -1)
387 polyMeshGeometry::checkTriangleTwist
401 Info<<
" faces with triangle twist < "
402 <<
setw(5) << minTriangleTwist
404 << nNewWrongFaces-nWrongFaces <<
endl;
406 nWrongFaces = nNewWrongFaces;
409 if (minFaceFlatness > -SMALL)
411 polyMeshGeometry::checkFaceFlatness
425 Info<<
" faces with flatness < "
426 <<
setw(5) << minFaceFlatness
428 << nNewWrongFaces-nWrongFaces <<
endl;
430 nWrongFaces = nNewWrongFaces;
435 polyMeshGeometry::checkCellDeterminant
442 polyMeshGeometry::affectedCells(
mesh, checkFaces),
448 Info<<
" faces on cells with determinant < "
449 <<
setw(5) << minDet <<
" : "
450 << nNewWrongFaces-nWrongFaces <<
endl;
452 nWrongFaces = nNewWrongFaces;
457 return nWrongFaces > 0;
520 const scalar maxNonOrtho
522 get<scalar>(
dict,
"maxNonOrtho", dryRun, keyType::REGEX_RECURSIVE)
526 get<scalar>(
dict,
"minVol", dryRun, keyType::REGEX_RECURSIVE)
528 const scalar minTetQuality
530 get<scalar>(
dict,
"minTetQuality", dryRun, keyType::REGEX_RECURSIVE)
532 const scalar maxConcave
534 get<scalar>(
dict,
"maxConcave", dryRun, keyType::REGEX_RECURSIVE)
538 get<scalar>(
dict,
"minArea", dryRun, keyType::REGEX_RECURSIVE)
540 const scalar maxIntSkew
542 get<scalar>(
dict,
"maxInternalSkewness", dryRun, keyType::REGEX_RECURSIVE)
544 const scalar maxBounSkew
546 get<scalar>(
dict,
"maxBoundarySkewness", dryRun, keyType::REGEX_RECURSIVE)
548 const scalar minWeight
550 get<scalar>(
dict,
"minFaceWeight", dryRun, keyType::REGEX_RECURSIVE)
552 const scalar minVolRatio
554 get<scalar>(
dict,
"minVolRatio", dryRun, keyType::REGEX_RECURSIVE)
556 const scalar minTwist
558 get<scalar>(
dict,
"minTwist", dryRun, keyType::REGEX_RECURSIVE)
560 const scalar minTriangleTwist
562 get<scalar>(
dict,
"minTriangleTwist", dryRun, keyType::REGEX_RECURSIVE)
564 scalar minFaceFlatness = -1.0;
569 keyType::REGEX_RECURSIVE
573 get<scalar>(
dict,
"minDeterminant", dryRun, keyType::REGEX_RECURSIVE)
581 if (errorMsg.size() || IOerrorMsg.size())
589 <<
"Missing/incorrect required dictionary entries:" <<
nl
591 << IOerrorMsg.c_str() <<
nl
592 << errorMsg.c_str() <<
nl
603 label nWrongFaces = 0;
605 Info<<
"Checking faces in error :" <<
endl;
608 if (maxNonOrtho < 180.0-SMALL)
621 Info<<
" non-orthogonality > "
622 <<
setw(3) << maxNonOrtho
624 << nNewWrongFaces-nWrongFaces <<
endl;
626 nWrongFaces = nNewWrongFaces;
643 Info<<
" faces with face pyramid volume < "
644 <<
setw(5) << minVol <<
" : "
645 << nNewWrongFaces-nWrongFaces <<
endl;
647 nWrongFaces = nNewWrongFaces;
650 if (minTetQuality > -GREAT)
664 Info<<
" faces with face-decomposition tet quality < "
665 <<
setw(5) << minTetQuality <<
" : "
666 << nNewWrongFaces-nWrongFaces <<
endl;
668 nWrongFaces = nNewWrongFaces;
671 if (maxConcave < 180.0-SMALL)
684 Info<<
" faces with concavity > "
685 <<
setw(3) << maxConcave
687 << nNewWrongFaces-nWrongFaces <<
endl;
689 nWrongFaces = nNewWrongFaces;
692 if (minArea > -SMALL)
704 Info<<
" faces with area < "
705 <<
setw(5) << minArea
707 << nNewWrongFaces-nWrongFaces <<
endl;
709 nWrongFaces = nNewWrongFaces;
712 if (maxIntSkew > 0 || maxBounSkew > 0)
714 polyMeshGeometry::checkFaceSkewness
731 Info<<
" faces with skewness > "
732 <<
setw(3) << maxIntSkew
733 <<
" (internal) or " <<
setw(3) << maxBounSkew
734 <<
" (boundary) : " << nNewWrongFaces-nWrongFaces <<
endl;
736 nWrongFaces = nNewWrongFaces;
739 if (minWeight >= 0 && minWeight < 1)
752 Info<<
" faces with interpolation weights (0..1) < "
753 <<
setw(5) << minWeight
755 << nNewWrongFaces-nWrongFaces <<
endl;
757 nWrongFaces = nNewWrongFaces;
760 if (minVolRatio >= 0)
773 Info<<
" faces with volume ratio of neighbour cells < "
774 <<
setw(5) << minVolRatio
776 << nNewWrongFaces-nWrongFaces <<
endl;
778 nWrongFaces = nNewWrongFaces;
796 Info<<
" faces with face twist < "
797 <<
setw(5) << minTwist
799 << nNewWrongFaces-nWrongFaces <<
endl;
801 nWrongFaces = nNewWrongFaces;
804 if (minTriangleTwist > -1)
819 Info<<
" faces with triangle twist < "
820 <<
setw(5) << minTriangleTwist
822 << nNewWrongFaces-nWrongFaces <<
endl;
824 nWrongFaces = nNewWrongFaces;
827 if (minFaceFlatness > -SMALL)
840 Info<<
" faces with flatness < "
841 <<
setw(5) << minFaceFlatness
843 << nNewWrongFaces-nWrongFaces <<
endl;
845 nWrongFaces = nNewWrongFaces;
855 polyMeshGeometry::affectedCells(meshGeom.
mesh(), checkFaces),
861 Info<<
" faces on cells with determinant < "
862 <<
setw(5) << minDet <<
" : "
863 << nNewWrongFaces-nWrongFaces <<
endl;
865 nWrongFaces = nNewWrongFaces;
870 return nWrongFaces > 0;