52 const bitSet& internalOrCoupledFaces
61 solveScalar sumMagClosedBoundary = 0;
65 if (!internalOrCoupledFaces.
size() || !internalOrCoupledFaces[facei])
68 sumMagClosedBoundary +=
mag(areas[facei]);
81 Info<<
" ***Boundary openness " << openness
82 <<
" possible hole in boundary description." 91 Info<<
" Boundary openness " << openness <<
" OK." 106 const Vector<label>& meshD
114 label nErrorClosed = 0;
118 const cell& curCell =
c[cI];
120 if (
min(curCell) < 0 ||
max(curCell) > nFaces())
131 if (nErrorClosed > 0)
135 Info<<
" ***Cells with invalid face labels found, number of cells " 136 << nErrorClosed <<
endl;
156 scalar maxOpennessCell =
max(openness);
158 scalar maxAspectRatio =
max(aspectRatio);
163 if (openness[celli] > closedThreshold_)
167 setPtr->insert(celli);
173 if (aspectRatio[celli] > aspectThreshold_)
177 aspectSetPtr->insert(celli);
184 reduce(nOpen, sumOp<label>());
185 reduce(maxOpennessCell, maxOp<scalar>());
187 reduce(nAspect, sumOp<label>());
188 reduce(maxAspectRatio, maxOp<scalar>());
195 Info<<
" ***Open cells found, max cell openness: " 196 << maxOpennessCell <<
", number of open cells " << nOpen
207 Info<<
" ***High aspect ratio cells found, Max aspect ratio: " 209 <<
", number of cells " << nAspect
218 Info<<
" Max cell openness = " << maxOpennessCell <<
" OK." <<
nl 219 <<
" Max aspect ratio = " << maxAspectRatio <<
" OK." 231 const bool detailedReport,
239 scalar minArea = GREAT;
240 scalar maxArea = -GREAT;
242 forAll(magFaceAreas, facei)
244 if (magFaceAreas[facei] < VSMALL)
248 setPtr->insert(facei);
252 if (isInternalFace(facei))
254 Pout<<
"Zero or negative face area detected for " 255 <<
"internal face "<< facei <<
" between cells " 256 << faceOwner()[facei] <<
" and " 257 << faceNeighbour()[facei]
258 <<
". Face area magnitude = " << magFaceAreas[facei]
263 Pout<<
"Zero or negative face area detected for " 264 <<
"boundary face " << facei <<
" next to cell " 265 << faceOwner()[facei] <<
". Face area magnitude = " 266 << magFaceAreas[facei] <<
endl;
271 minArea =
min(minArea, magFaceAreas[facei]);
272 maxArea =
max(maxArea, magFaceAreas[facei]);
275 reduce(minArea, minOp<scalar>());
276 reduce(maxArea, maxOp<scalar>());
278 if (minArea < VSMALL)
282 Info<<
" ***Zero or negative face area detected. " 283 "Minimum area: " << minArea <<
endl;
291 Info<<
" Minimum face area = " << minArea
292 <<
". Maximum face area = " << maxArea
293 <<
". Face area magnitudes OK." <<
endl;
304 const bool detailedReport,
310 scalar minVolume = GREAT;
311 scalar maxVolume = -GREAT;
313 label nNegVolCells = 0;
317 if (vols[celli] < VSMALL)
321 setPtr->insert(celli);
325 Pout<<
"Zero or negative cell volume detected for cell " 326 << celli <<
". Volume = " << vols[celli] <<
endl;
332 minVolume =
min(minVolume, vols[celli]);
333 maxVolume =
max(maxVolume, vols[celli]);
336 reduce(minVolume, minOp<scalar>());
337 reduce(maxVolume, maxOp<scalar>());
338 reduce(nNegVolCells, sumOp<label>());
340 if (minVolume < VSMALL)
344 Info<<
" ***Zero or negative cell volume detected. " 345 <<
"Minimum negative volume: " << minVolume
346 <<
", Number of negative volume cells: " << nNegVolCells
355 Info<<
" Min volume = " << minVolume
356 <<
". Max volume = " << maxVolume
357 <<
". Total volume = " <<
gSum(vols)
358 <<
". Cell volumes OK." <<
endl;
384 const scalar severeNonorthogonalityThreshold =
387 scalar minDDotS =
min(ortho);
389 scalar sumDDotS =
sum(ortho);
391 label severeNonOrth = 0;
393 label errorNonOrth = 0;
398 if (ortho[facei] < severeNonorthogonalityThreshold)
400 if (ortho[facei] > SMALL)
404 setPtr->insert(facei);
413 setPtr->insert(facei);
421 reduce(minDDotS, minOp<scalar>());
422 reduce(sumDDotS, sumOp<scalar>());
423 reduce(severeNonOrth, sumOp<label>());
424 reduce(errorNonOrth, sumOp<label>());
428 const label neiSize =
returnReduce(ortho.size(), sumOp<label>());
434 Info<<
" Mesh non-orthogonality Max: " 441 if (severeNonOrth > 0)
443 Info<<
" *Number of severely non-orthogonal faces: " 444 << severeNonOrth <<
"." <<
endl;
448 if (errorNonOrth > 0)
452 Info<<
" ***Number of non-orthogonality errors: " 453 << errorNonOrth <<
"." <<
endl;
461 Info<<
" Non-orthogonality check OK." <<
endl;
473 const bool detailedReport,
474 const scalar minPyrVol,
497 label nErrorPyrs = 0;
501 if (ownPyrVol[facei] < minPyrVol)
505 setPtr->insert(facei);
509 Pout<<
"Negative pyramid volume: " << ownPyrVol[facei]
510 <<
" for face " << facei <<
" " <<
f[facei]
511 <<
" and owner cell: " << own[facei] <<
endl 512 <<
"Owner cell vertex labels: " 513 <<
cells()[own[facei]].labels(faces())
520 if (isInternalFace(facei))
522 if (neiPyrVol[facei] < minPyrVol)
526 setPtr->insert(facei);
530 Pout<<
"Negative pyramid volume: " << neiPyrVol[facei]
531 <<
" for face " << facei <<
" " <<
f[facei]
532 <<
" and neighbour cell: " << nei[facei] <<
nl 533 <<
"Neighbour cell vertex labels: " 534 <<
cells()[nei[facei]].labels(faces())
542 reduce(nErrorPyrs, sumOp<label>());
548 Info<<
" ***Error in face pyramids: " 549 << nErrorPyrs <<
" faces are incorrectly oriented." 558 Info<<
" Face pyramids OK." <<
endl;
590 scalar maxSkew =
max(skewness);
597 if (skewness[facei] > skewThreshold_)
601 setPtr->insert(facei);
608 reduce(maxSkew, maxOp<scalar>());
609 reduce(nWarnSkew, sumOp<label>());
615 Info<<
" ***Max skewness = " << maxSkew
616 <<
", " << nWarnSkew <<
" highly skew faces detected" 617 " which may impair the quality of the results" 626 Info<<
" Max skewness = " << maxSkew <<
" OK." <<
endl;
644 if (maxDeg < -SMALL || maxDeg > 180+SMALL)
647 <<
"maxDeg should be [0..180] but is now " << maxDeg
663 scalar maxEdgeSin =
max(faceAngles);
669 if (faceAngles[facei] > SMALL)
675 setPtr->insert(facei);
680 reduce(nConcave, sumOp<label>());
681 reduce(maxEdgeSin, maxOp<scalar>());
685 scalar maxConcaveDegr =
690 Info<<
" *There are " << nConcave
691 <<
" faces with concave angles between consecutive" 692 <<
" edges. Max concave angle = " << maxConcaveDegr
693 <<
" degrees." <<
endl;
701 Info<<
" All angles in faces OK." <<
endl;
714 const scalar warnFlatness,
720 if (warnFlatness < 0 || warnFlatness > 1)
723 <<
"warnFlatness should be [0..1] but is " << warnFlatness
740 scalar minFlatness = GREAT;
741 scalar sumFlatness = 0;
745 forAll(faceFlatness, facei)
747 if (fcs[facei].size() > 3 && magAreas[facei] > VSMALL)
749 sumFlatness += faceFlatness[facei];
752 minFlatness =
min(minFlatness, faceFlatness[facei]);
754 if (faceFlatness[facei] < warnFlatness)
760 setPtr->insert(facei);
767 reduce(nWarped, sumOp<label>());
768 reduce(minFlatness, minOp<scalar>());
770 reduce(nSummed, sumOp<label>());
771 reduce(sumFlatness, sumOp<scalar>());
777 Info<<
" Face flatness (1 = flat, 0 = butterfly) : min = " 778 << minFlatness <<
" average = " << sumFlatness / nSummed
788 Info<<
" *There are " << nWarped
789 <<
" faces with ratio between projected and actual area < " 790 << warnFlatness <<
endl;
792 Info<<
" Minimum ratio (minimum flatness, maximum warpage) = " 793 << minFlatness <<
endl;
801 Info<<
" All face flatness OK." <<
endl;
821 label nConcaveCells = 0;
825 const cell& cFaces =
c[celli];
827 bool concave =
false;
836 label fI = cFaces[i];
838 const point& fC = fCentres[fI];
842 fN /=
max(
mag(fN), VSMALL);
846 if (fOwner[fI] != celli)
858 label fJ = cFaces[j];
860 const point& pt = fCentres[fJ];
870 pC /=
max(
mag(pC), VSMALL);
872 if ((pC & fN) > -planarCosAngle_)
880 setPtr->insert(celli);
892 reduce(nConcaveCells, sumOp<label>());
894 if (nConcaveCells > 0)
898 Info<<
" ***Concave cells (using face planes) found," 899 <<
" number of cells: " << nConcaveCells <<
endl;
907 Info<<
" Concave cell check OK." <<
endl;
928 label
internal = nInternalFaces();
931 bool hasError =
false;
933 label nMultipleCells = 0;
937 for (label facei = 0; facei <
internal; facei++)
939 if (own[facei] >= nei[facei])
945 setPtr->insert(facei);
959 SortableList<label> nbr(curFaces.size());
963 label facei = curFaces[i];
965 if (facei >= nInternalFaces())
972 label nbrCelli = nei[facei];
974 if (nbrCelli == celli)
976 nbrCelli = own[facei];
979 if (celli < nbrCelli)
999 label prevCell = nbr[0];
1000 label prevFace = curFaces[nbr.indices()[0]];
1002 bool hasMultipleFaces =
false;
1004 for (label i = 1; i < nbr.size(); i++)
1006 label thisCell = nbr[i];
1007 label thisFace = curFaces[nbr.indices()[i]];
1014 if (thisCell == prevCell)
1016 hasMultipleFaces =
true;
1020 setPtr->insert(prevFace);
1021 setPtr->insert(thisFace);
1024 else if (thisFace < prevFace)
1030 setPtr->insert(thisFace);
1034 prevCell = thisCell;
1035 prevFace = thisFace;
1038 if (hasMultipleFaces)
1045 reduce(nMultipleCells, sumOp<label>());
1047 if ((
debug || report) && nMultipleCells > 0)
1049 Info<<
" <<Found " << nMultipleCells
1050 <<
" neighbouring cells with multiple inbetween faces." <<
endl;
1055 if (
debug || report)
1057 Info<<
" ***Faces not in upper triangular order." <<
endl;
1063 if (
debug || report)
1065 Info<<
" Upper triangular ordering OK." <<
endl;
1080 label nOpenCells = 0;
1089 const edgeList cellEdges =
c[celli].edges(
f);
1095 edgeList curFaceEdges =
f[curFaces[facei]].edges();
1097 forAll(curFaceEdges, faceEdgeI)
1099 const edge& curEdge = curFaceEdges[faceEdgeI];
1101 forAll(cellEdges, cellEdgeI)
1103 if (cellEdges[cellEdgeI] == curEdge)
1105 edgeUsage[cellEdgeI]++;
1112 edgeList singleEdges(cellEdges.size());
1113 label nSingleEdges = 0;
1117 if (edgeUsage[edgeI] == 1)
1119 singleEdges[nSingleEdges] = cellEdges[edgeI];
1122 else if (edgeUsage[edgeI] != 2)
1126 setPtr->insert(celli);
1131 if (nSingleEdges > 0)
1135 setPtr->insert(celli);
1142 reduce(nOpenCells, sumOp<label>());
1146 if (
debug || report)
1148 Info<<
" ***Open cells found, number of cells: " << nOpenCells
1149 <<
". This problem may be fixable using the zipUpMesh utility." 1156 if (
debug || report)
1158 Info<<
" Topological cell zip-up check OK." <<
endl;
1176 label nErrorFaces = 0;
1180 const face& curFace =
f[fI];
1197 bool inserted = facePoints.insert(curFace[fp]);
1211 reduce(nErrorFaces, sumOp<label>());
1213 if (nErrorFaces > 0)
1215 if (
debug || report)
1217 Info<<
" Faces with invalid vertex labels found, " 1218 <<
" number of faces: " << nErrorFaces <<
endl;
1224 if (
debug || report)
1226 Info<<
" Face vertices OK." <<
endl;
1241 label nFaceErrors = 0;
1242 label nCellErrors = 0;
1248 if (pf[pointi].empty())
1252 setPtr->insert(pointi);
1262 const labelList& pc = pointCells(pointi);
1268 setPtr->insert(pointi);
1275 reduce(nFaceErrors, sumOp<label>());
1276 reduce(nCellErrors, sumOp<label>());
1278 if (nFaceErrors > 0 || nCellErrors > 0)
1280 if (
debug || report)
1282 Info<<
" ***Unused points found in the mesh, " 1283 "number unused by faces: " << nFaceErrors
1284 <<
" number unused by cells: " << nCellErrors
1291 if (
debug || report)
1303 const Map<label>& nCommonPoints,
1304 label& nBaffleFaces,
1312 label nbFacei = iter.key();
1313 label nCommon = iter();
1315 const face& curFace = faces()[facei];
1316 const face& nbFace = faces()[nbFacei];
1318 if (nCommon == nbFace.size() || nCommon == curFace.size())
1320 if (nbFace.size() != curFace.size())
1331 setPtr->insert(facei);
1332 setPtr->insert(nbFacei);
1344 const Map<label>& nCommonPoints,
1352 label nbFacei = iter.key();
1353 label nCommon = iter();
1355 const face& curFace = faces()[facei];
1356 const face& nbFace = faces()[nbFacei];
1361 && nCommon != nbFace.size()
1362 && nCommon != curFace.size()
1368 label nb = nbFace.find(curFace[fp]);
1382 label fpPlus1 = curFace.fcIndex(fp);
1383 label fpMin1 = curFace.rcIndex(fp);
1386 label nbPlus1 = nbFace.fcIndex(nb);
1387 label nbMin1 = nbFace.rcIndex(nb);
1394 if (nbFace[nbPlus1] == curFace[fpPlus1])
1399 else if (nbFace[nbPlus1] == curFace[fpMin1])
1404 else if (nbFace[nbMin1] == curFace[fpMin1])
1424 if (curFp >= curFace.size())
1430 curFp = curFace.size()-1;
1435 if (curNb >= nbFace.size())
1441 curNb = nbFace.size()-1;
1443 }
while (curFace[curFp] == nbFace[curNb]);
1452 for (label commonI = 0; commonI < nCommon; commonI++)
1456 if (curFp >= curFace.size())
1462 curFp = curFace.size()-1;
1467 if (curNb >= nbFace.size())
1473 curNb = nbFace.size()-1;
1476 if (curFace[curFp] != nbFace[curNb])
1480 setPtr->insert(facei);
1481 setPtr->insert(nbFacei);
1512 label nBaffleFaces = 0;
1513 label nErrorDuplicate = 0;
1514 label nErrorOrder = 0;
1515 Map<label> nCommonPoints;
1517 for (label facei = 0; facei < nFaces(); facei++)
1519 const face& curFace = faces()[facei];
1523 nCommonPoints.
clear();
1527 label pointi = curFace[fp];
1533 label nbFacei = nbs[nbI];
1535 if (facei < nbFacei)
1538 ++(nCommonPoints(nbFacei, 0));
1546 if (checkDuplicateFaces(facei, nCommonPoints, nBaffleFaces, setPtr))
1552 if (checkCommonOrder(facei, nCommonPoints, setPtr))
1558 reduce(nBaffleFaces, sumOp<label>());
1559 reduce(nErrorDuplicate, sumOp<label>());
1560 reduce(nErrorOrder, sumOp<label>());
1564 Info<<
" Number of identical duplicate faces (baffle faces): " 1565 << nBaffleFaces <<
endl;
1568 if (nErrorDuplicate > 0 || nErrorOrder > 0)
1571 if (nErrorDuplicate > 0)
1573 Info<<
" <<Number of duplicate (not baffle) faces found: " 1575 <<
". This might indicate a problem." <<
endl;
1578 if (nErrorOrder > 0)
1580 Info<<
" <<Number of faces with non-consecutive shared points: " 1581 << nErrorOrder <<
". This might indicate a problem." <<
endl;
1587 if (
debug || report)
1589 Info<<
" Face-face connectivity OK." <<
endl;
1600 return checkClosedBoundary(faceAreas(), report,
bitSet());
1612 return checkClosedCells
1630 return checkFaceAreas
1646 return checkCellVolumes
1662 return checkFaceOrthogonality
1675 const scalar minPyrVol,
1679 return checkFacePyramids
1697 return checkFaceSkewness
1712 const scalar maxDeg,
1716 return checkFaceAngles
1730 const scalar warnFlatness,
1734 return checkFaceFlatness
1752 return checkConcaveCells
1764 label nFailedChecks = 0;
1766 if (checkPoints(report)) ++nFailedChecks;
1767 if (checkUpperTriangular(report)) ++nFailedChecks;
1768 if (checkCellsZipUp(report)) ++nFailedChecks;
1769 if (checkFaceVertices(report)) ++nFailedChecks;
1770 if (checkFaceFaces(report)) ++nFailedChecks;
1774 if (
debug || report)
1776 Info<<
" Failed " << nFailedChecks
1777 <<
" mesh topology checks." <<
endl;
1783 if (
debug || report)
1794 label nFailedChecks = 0;
1796 if (checkClosedBoundary(report)) ++nFailedChecks;
1797 if (checkClosedCells(report)) ++nFailedChecks;
1798 if (checkFaceAreas(report)) ++nFailedChecks;
1799 if (checkCellVolumes(report)) ++nFailedChecks;
1800 if (checkFaceOrthogonality(report)) ++nFailedChecks;
1801 if (checkFacePyramids(report)) ++nFailedChecks;
1802 if (checkFaceSkewness(report)) ++nFailedChecks;
1806 if (
debug || report)
1808 Info<<
" Failed " << nFailedChecks
1809 <<
" mesh geometry checks." <<
endl;
1815 if (
debug || report)
1832 if (
debug || report)
1834 Info<<
" Failed " << nFailedChecks
1835 <<
" mesh checks." <<
endl;
1841 if (
debug || report)
1852 scalar prev = closedThreshold_;
1853 closedThreshold_ = val;
1861 scalar prev = aspectThreshold_;
1862 aspectThreshold_ = val;
1870 scalar prev = nonOrthThreshold_;
1871 nonOrthThreshold_ = val;
1879 scalar prev = skewThreshold_;
1880 skewThreshold_ = val;
bool checkFaceAreas(const vectorField &faceAreas, const bool report, const bool detailedReport, labelHashSet *setPtr) const
Check for negative face areas.
static scalar aspectThreshold_
Aspect ratio warning threshold.
void size(const label n)
Older name for setAddressableSize.
dimensionedScalar acos(const dimensionedScalar &ds)
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1)
bool checkFaceAngles(const pointField &points, const vectorField &faceAreas, const bool report, const scalar maxDeg, labelHashSet *setPtr) const
Check face angles.
List< cell > cellList
List of cell.
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< edge > edgeList
List of edge.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Unit conversion functions.
constexpr char nl
The newline '\n' character (0x0a)
label checkTopology(const polyMesh &mesh, const bool allTopology, const bool allGeometry, autoPtr< surfaceWriter > &surfWriter, autoPtr< coordSetWriter > &setWriter, const bool writeBadEdges=false)
static scalar setClosedThreshold(const scalar)
Set the closedness ratio warning threshold.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static void reduceOr(bool &value, const label communicator=worldComm)
Logical (or) reduction (MPI_AllReduce)
T returnReduce(const T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
List< labelList > labelListList
List of labelList.
dimensionedScalar asin(const dimensionedScalar &ds)
static scalar setAspectThreshold(const scalar)
Set the aspect ratio warning threshold.
bool checkClosedBoundary(const vectorField &areas, const bool report, const bitSet &internalOrCoupledFaces) const
Check boundary for closedness.
Various functions to operate on Lists.
static scalar setSkewThreshold(const scalar)
Set the skewness warning threshold as percentage.
#define forAll(list, i)
Loop across all elements in list.
Class to handle errors and exceptions in a simple, consistent stream-based manner.
bool checkFaceSkewness(const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs, const bool report, labelHashSet *setPtr) const
Check face skewness.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
bool checkClosedCells(const vectorField &faceAreas, const scalarField &cellVolumes, const bool report, labelHashSet *setPtr, labelHashSet *aspectSetPtr, const Vector< label > &meshD) const
Check cells for closedness.
List< face > faceList
List of faces.
bool checkFacePyramids(const pointField &points, const vectorField &ctrs, const bool report, const bool detailedReport, const scalar minPyrVol, labelHashSet *setPtr) const
Check face pyramid volume.
vectorField pointField
pointField is a vectorField.
Type gSum(const FieldField< Field, Type > &f)
dimensionedScalar cos(const dimensionedScalar &ds)
bool checkFaceOrthogonality(const vectorField &fAreas, const vectorField &cellCtrs, const bool report, labelHashSet *setPtr) const
Check for non-orthogonality.
static scalar closedThreshold_
Static data to control mesh checking.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
#define DebugInFunction
Report an information message using Foam::Info.
void clear()
Remove all entries from table.
virtual bool checkMesh(const bool report=false) const
Check mesh for correctness. Returns false for no error.
label nInternalFaces() const noexcept
Number of internal faces.
static scalar setNonOrthThreshold(const scalar)
Set the non-orthogonality warning threshold in degrees.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
bool checkCellVolumes(const scalarField &vols, const bool report, const bool detailedReport, labelHashSet *setPtr) const
Check for negative cell volumes.
Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross-product operators.
static scalar planarCosAngle_
Threshold where faces are considered coplanar.
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
dimensionedScalar sin(const dimensionedScalar &ds)
int debug
Static debugging option.
virtual bool checkFaceVertices(const bool report=false, labelHashSet *setPtr=nullptr) const
Check uniqueness of face vertices.
virtual bool checkTopology(const bool report=false) const
Check mesh topology for correctness.
vector point
Point is a vector.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
bool checkConcaveCells(const vectorField &fAreas, const pointField &fCentres, const bool report, labelHashSet *setPtr) const
Check for concave cells by the planes of faces.
constexpr scalar radToDeg(const scalar rad) noexcept
Conversion from radians to degrees.
bool checkCommonOrder(const label, const Map< label > &, labelHashSet *) const
Check that shared points are in consecutive order.
const dimensionedScalar c
Speed of light in a vacuum.
bool checkDuplicateFaces(const label, const Map< label > &, label &nBaffleFaces, labelHashSet *) const
Check if all points on face are shared with another face.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual bool checkCellsZipUp(const bool report=false, labelHashSet *setPtr=nullptr) const
Check cell zip-up.
virtual bool checkUpperTriangular(const bool report=false, labelHashSet *setPtr=nullptr) const
Check face ordering.
virtual bool checkPoints(const bool report=false, labelHashSet *setPtr=nullptr) const
Check for unused points.
virtual bool checkGeometry(const bool report=false) const
Check mesh geometry (& implicitly topology) for correctness.
Field< vector > vectorField
Specialisation of Field<T> for vector.
bool checkFaceFlatness(const pointField &points, const vectorField &faceCentres, const vectorField &faceAreas, const bool report, const scalar warnFlatness, labelHashSet *setPtr) const
Check face warpage.
virtual bool checkFaceFaces(const bool report=false, labelHashSet *setPtr=nullptr) const
Check face-face connectivity.
static scalar skewThreshold_
Skewness warning threshold.
List< label > labelList
A List of labels.
static scalar nonOrthThreshold_
Non-orthogonality warning threshold in deg.
constexpr scalar degToRad(const scalar deg) noexcept
Conversion from degrees to radians.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
label size() const noexcept
Number of entries.
void reduce(T &value, const BinaryOp &bop, const int tag=UPstream::msgType(), const label comm=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce) using linear/tree communication schedule.
forAllConstIters(mixture.phases(), phase)
label checkGeometry(const polyMesh &mesh, const bool allGeometry, autoPtr< surfaceWriter > &surfWriter, autoPtr< coordSetWriter > &setWriter)
static constexpr const zero Zero
Global zero (0)