68 const scalar maxNonOrtho
70 get<scalar>(
dict,
"maxNonOrtho", dryRun, keyType::REGEX_RECURSIVE)
74 get<scalar>(
dict,
"minVol", dryRun, keyType::REGEX_RECURSIVE)
76 const scalar minTetQuality
78 get<scalar>(
dict,
"minTetQuality", dryRun, keyType::REGEX_RECURSIVE)
80 const scalar maxConcave
82 get<scalar>(
dict,
"maxConcave", dryRun, keyType::REGEX_RECURSIVE)
86 get<scalar>(
dict,
"minArea", dryRun, keyType::REGEX_RECURSIVE)
88 const scalar maxIntSkew
92 dict,
"maxInternalSkewness", dryRun, keyType::REGEX_RECURSIVE
95 const scalar maxBounSkew
99 dict,
"maxBoundarySkewness", dryRun, keyType::REGEX_RECURSIVE
102 const scalar minWeight
104 get<scalar>(
dict,
"minFaceWeight", dryRun, keyType::REGEX_RECURSIVE)
106 const scalar minVolRatio
108 get<scalar>(
dict,
"minVolRatio", dryRun, keyType::REGEX_RECURSIVE)
110 const scalar minTwist
112 get<scalar>(
dict,
"minTwist", dryRun, keyType::REGEX_RECURSIVE)
114 const scalar minTriangleTwist
116 get<scalar>(
dict,
"minTriangleTwist", dryRun, keyType::REGEX_RECURSIVE)
118 const scalar minFaceFlatness
120 dict.lookupOrDefault<scalar>
122 "minFaceFlatness", -1, keyType::REGEX_RECURSIVE
127 get<scalar>(
dict,
"minDeterminant", dryRun, keyType::REGEX_RECURSIVE)
136 if (errorMsg.size() || IOerrorMsg.size())
145 <<
"Missing/incorrect required dictionary entries:" <<
nl
147 << IOerrorMsg.c_str() <<
nl
148 << errorMsg.c_str() <<
nl
159 label nWrongFaces = 0;
161 Info<<
"Checking faces in error :" <<
endl;
164 if (maxNonOrtho < 180.0-SMALL)
166 polyMeshGeometry::checkFaceDotProduct
180 Info<<
" non-orthogonality > "
181 <<
setw(3) << maxNonOrtho
183 << nNewWrongFaces-nWrongFaces <<
endl;
185 nWrongFaces = nNewWrongFaces;
190 polyMeshGeometry::checkFacePyramids
204 Info<<
" faces with face pyramid volume < "
205 <<
setw(5) << minVol <<
" : "
206 << nNewWrongFaces-nWrongFaces <<
endl;
208 nWrongFaces = nNewWrongFaces;
211 if (minTetQuality > -GREAT)
213 polyMeshGeometry::checkFaceTets
228 Info<<
" faces with face-decomposition tet quality < "
229 <<
setw(5) << minTetQuality <<
" : "
230 << nNewWrongFaces-nWrongFaces <<
endl;
232 nWrongFaces = nNewWrongFaces;
235 if (maxConcave < 180.0-SMALL)
237 polyMeshGeometry::checkFaceAngles
250 Info<<
" faces with concavity > "
251 <<
setw(3) << maxConcave
253 << nNewWrongFaces-nWrongFaces <<
endl;
255 nWrongFaces = nNewWrongFaces;
258 if (minArea > -SMALL)
260 polyMeshGeometry::checkFaceArea
272 Info<<
" faces with area < "
273 <<
setw(5) << minArea
275 << nNewWrongFaces-nWrongFaces <<
endl;
277 nWrongFaces = nNewWrongFaces;
280 if (maxIntSkew > 0 || maxBounSkew > 0)
282 polyMeshGeometry::checkFaceSkewness
299 Info<<
" faces with skewness > "
300 <<
setw(3) << maxIntSkew
301 <<
" (internal) or " <<
setw(3) << maxBounSkew
302 <<
" (boundary) : " << nNewWrongFaces-nWrongFaces <<
endl;
304 nWrongFaces = nNewWrongFaces;
307 if (minWeight >= 0 && minWeight < 1)
309 polyMeshGeometry::checkFaceWeights
324 Info<<
" faces with interpolation weights (0..1) < "
325 <<
setw(5) << minWeight
327 << nNewWrongFaces-nWrongFaces <<
endl;
329 nWrongFaces = nNewWrongFaces;
332 if (minVolRatio >= 0)
334 polyMeshGeometry::checkVolRatio
347 Info<<
" faces with volume ratio of neighbour cells < "
348 <<
setw(5) << minVolRatio
350 << nNewWrongFaces-nWrongFaces <<
endl;
352 nWrongFaces = nNewWrongFaces;
359 polyMeshGeometry::checkFaceTwist
374 Info<<
" faces with face twist < "
375 <<
setw(5) << minTwist
377 << nNewWrongFaces-nWrongFaces <<
endl;
379 nWrongFaces = nNewWrongFaces;
382 if (minTriangleTwist > -1)
386 polyMeshGeometry::checkTriangleTwist
400 Info<<
" faces with triangle twist < "
401 <<
setw(5) << minTriangleTwist
403 << nNewWrongFaces-nWrongFaces <<
endl;
405 nWrongFaces = nNewWrongFaces;
408 if (minFaceFlatness > -SMALL)
410 polyMeshGeometry::checkFaceFlatness
424 Info<<
" faces with flatness < "
425 <<
setw(5) << minFaceFlatness
427 << nNewWrongFaces-nWrongFaces <<
endl;
429 nWrongFaces = nNewWrongFaces;
434 polyMeshGeometry::checkCellDeterminant
441 polyMeshGeometry::affectedCells(
mesh, checkFaces),
447 Info<<
" faces on cells with determinant < "
448 <<
setw(5) << minDet <<
" : "
449 << nNewWrongFaces-nWrongFaces <<
endl;
451 nWrongFaces = nNewWrongFaces;
456 return nWrongFaces > 0;
519 const scalar maxNonOrtho
521 get<scalar>(
dict,
"maxNonOrtho", dryRun, keyType::REGEX_RECURSIVE)
525 get<scalar>(
dict,
"minVol", dryRun, keyType::REGEX_RECURSIVE)
527 const scalar minTetQuality
529 get<scalar>(
dict,
"minTetQuality", dryRun, keyType::REGEX_RECURSIVE)
531 const scalar maxConcave
533 get<scalar>(
dict,
"maxConcave", dryRun, keyType::REGEX_RECURSIVE)
537 get<scalar>(
dict,
"minArea", dryRun, keyType::REGEX_RECURSIVE)
539 const scalar maxIntSkew
541 get<scalar>(
dict,
"maxInternalSkewness", dryRun, keyType::REGEX_RECURSIVE)
543 const scalar maxBounSkew
545 get<scalar>(
dict,
"maxBoundarySkewness", dryRun, keyType::REGEX_RECURSIVE)
547 const scalar minWeight
549 get<scalar>(
dict,
"minFaceWeight", dryRun, keyType::REGEX_RECURSIVE)
551 const scalar minVolRatio
553 get<scalar>(
dict,
"minVolRatio", dryRun, keyType::REGEX_RECURSIVE)
555 const scalar minTwist
557 get<scalar>(
dict,
"minTwist", dryRun, keyType::REGEX_RECURSIVE)
559 const scalar minTriangleTwist
561 get<scalar>(
dict,
"minTriangleTwist", dryRun, keyType::REGEX_RECURSIVE)
563 scalar minFaceFlatness = -1.0;
568 keyType::REGEX_RECURSIVE
572 get<scalar>(
dict,
"minDeterminant", dryRun, keyType::REGEX_RECURSIVE)
580 if (errorMsg.size() || IOerrorMsg.size())
588 <<
"Missing/incorrect required dictionary entries:" <<
nl
590 << IOerrorMsg.c_str() <<
nl
591 << errorMsg.c_str() <<
nl
602 label nWrongFaces = 0;
604 Info<<
"Checking faces in error :" <<
endl;
607 if (maxNonOrtho < 180.0-SMALL)
620 Info<<
" non-orthogonality > "
621 <<
setw(3) << maxNonOrtho
623 << nNewWrongFaces-nWrongFaces <<
endl;
625 nWrongFaces = nNewWrongFaces;
642 Info<<
" faces with face pyramid volume < "
643 <<
setw(5) << minVol <<
" : "
644 << nNewWrongFaces-nWrongFaces <<
endl;
646 nWrongFaces = nNewWrongFaces;
649 if (minTetQuality > -GREAT)
663 Info<<
" faces with face-decomposition tet quality < "
664 <<
setw(5) << minTetQuality <<
" : "
665 << nNewWrongFaces-nWrongFaces <<
endl;
667 nWrongFaces = nNewWrongFaces;
670 if (maxConcave < 180.0-SMALL)
683 Info<<
" faces with concavity > "
684 <<
setw(3) << maxConcave
686 << nNewWrongFaces-nWrongFaces <<
endl;
688 nWrongFaces = nNewWrongFaces;
691 if (minArea > -SMALL)
703 Info<<
" faces with area < "
704 <<
setw(5) << minArea
706 << nNewWrongFaces-nWrongFaces <<
endl;
708 nWrongFaces = nNewWrongFaces;
711 if (maxIntSkew > 0 || maxBounSkew > 0)
713 polyMeshGeometry::checkFaceSkewness
730 Info<<
" faces with skewness > "
731 <<
setw(3) << maxIntSkew
732 <<
" (internal) or " <<
setw(3) << maxBounSkew
733 <<
" (boundary) : " << nNewWrongFaces-nWrongFaces <<
endl;
735 nWrongFaces = nNewWrongFaces;
738 if (minWeight >= 0 && minWeight < 1)
751 Info<<
" faces with interpolation weights (0..1) < "
752 <<
setw(5) << minWeight
754 << nNewWrongFaces-nWrongFaces <<
endl;
756 nWrongFaces = nNewWrongFaces;
759 if (minVolRatio >= 0)
772 Info<<
" faces with volume ratio of neighbour cells < "
773 <<
setw(5) << minVolRatio
775 << nNewWrongFaces-nWrongFaces <<
endl;
777 nWrongFaces = nNewWrongFaces;
795 Info<<
" faces with face twist < "
796 <<
setw(5) << minTwist
798 << nNewWrongFaces-nWrongFaces <<
endl;
800 nWrongFaces = nNewWrongFaces;
803 if (minTriangleTwist > -1)
818 Info<<
" faces with triangle twist < "
819 <<
setw(5) << minTriangleTwist
821 << nNewWrongFaces-nWrongFaces <<
endl;
823 nWrongFaces = nNewWrongFaces;
826 if (minFaceFlatness > -SMALL)
839 Info<<
" faces with flatness < "
840 <<
setw(5) << minFaceFlatness
842 << nNewWrongFaces-nWrongFaces <<
endl;
844 nWrongFaces = nNewWrongFaces;
854 polyMeshGeometry::affectedCells(meshGeom.
mesh(), checkFaces),
860 Info<<
" faces on cells with determinant < "
861 <<
setw(5) << minDet <<
" : "
862 << nNewWrongFaces-nWrongFaces <<
endl;
864 nWrongFaces = nNewWrongFaces;
869 return nWrongFaces > 0;