53 const bitSet& internalOrCoupledFaces
62 solveScalar sumMagClosedBoundary(0);
66 if (!internalOrCoupledFaces.
size() || !internalOrCoupledFaces[facei])
68 sumClosed += areas[facei];
69 sumMagClosedBoundary +=
mag(areas[facei]);
76 solveVector openness = sumClosed/(sumMagClosedBoundary + VSMALL);
82 Info<<
" ***Boundary openness " << openness
83 <<
" possible hole in boundary description." 92 Info<<
" Boundary openness " << openness <<
" OK." 107 const Vector<label>& meshD
115 label nErrorClosed = 0;
119 const cell& curCell =
c[cI];
121 if (
min(curCell) < 0 ||
max(curCell) > nFaces())
132 if (nErrorClosed > 0)
136 Info<<
" ***Cells with invalid face labels found, number of cells " 137 << nErrorClosed <<
endl;
157 scalar maxOpennessCell =
max(openness);
159 scalar maxAspectRatio =
max(aspectRatio);
164 if (openness[celli] > closedThreshold_)
168 setPtr->insert(celli);
174 if (aspectRatio[celli] > aspectThreshold_)
178 aspectSetPtr->insert(celli);
185 reduce(nOpen, sumOp<label>());
186 reduce(maxOpennessCell, maxOp<scalar>());
188 reduce(nAspect, sumOp<label>());
189 reduce(maxAspectRatio, maxOp<scalar>());
196 Info<<
" ***Open cells found, max cell openness: " 197 << maxOpennessCell <<
", number of open cells " << nOpen
208 Info<<
" ***High aspect ratio cells found, Max aspect ratio: " 210 <<
", number of cells " << nAspect
219 Info<<
" Max cell openness = " << maxOpennessCell <<
" OK." <<
nl 220 <<
" Max aspect ratio = " << maxAspectRatio <<
" OK." 232 const bool detailedReport,
240 scalar minArea = GREAT;
241 scalar maxArea = -GREAT;
243 forAll(magFaceAreas, facei)
245 if (magFaceAreas[facei] < VSMALL)
249 setPtr->insert(facei);
253 if (isInternalFace(facei))
255 Pout<<
"Zero or negative face area detected for " 256 <<
"internal face "<< facei <<
" between cells " 257 << faceOwner()[facei] <<
" and " 258 << faceNeighbour()[facei]
259 <<
". Face area magnitude = " << magFaceAreas[facei]
264 Pout<<
"Zero or negative face area detected for " 265 <<
"boundary face " << facei <<
" next to cell " 266 << faceOwner()[facei] <<
". Face area magnitude = " 267 << magFaceAreas[facei] <<
endl;
272 minArea =
min(minArea, magFaceAreas[facei]);
273 maxArea =
max(maxArea, magFaceAreas[facei]);
276 reduce(minArea, minOp<scalar>());
277 reduce(maxArea, maxOp<scalar>());
279 if (minArea < VSMALL)
283 Info<<
" ***Zero or negative face area detected. " 284 "Minimum area: " << minArea <<
endl;
292 Info<<
" Minimum face area = " << minArea
293 <<
". Maximum face area = " << maxArea
294 <<
". Face area magnitudes OK." <<
endl;
305 const bool detailedReport,
311 scalar minVolume = GREAT;
312 scalar maxVolume = -GREAT;
314 label nNegVolCells = 0;
318 if (vols[celli] < VSMALL)
322 setPtr->insert(celli);
326 Pout<<
"Zero or negative cell volume detected for cell " 327 << celli <<
". Volume = " << vols[celli] <<
endl;
333 minVolume =
min(minVolume, vols[celli]);
334 maxVolume =
max(maxVolume, vols[celli]);
337 reduce(minVolume, minOp<scalar>());
338 reduce(maxVolume, maxOp<scalar>());
339 reduce(nNegVolCells, sumOp<label>());
341 if (minVolume < VSMALL)
345 Info<<
" ***Zero or negative cell volume detected. " 346 <<
"Minimum negative volume: " << minVolume
347 <<
", Number of negative volume cells: " << nNegVolCells
356 Info<<
" Min volume = " << minVolume
357 <<
". Max volume = " << maxVolume
358 <<
". Total volume = " <<
gSum(vols)
359 <<
". Cell volumes OK." <<
endl;
385 const scalar severeNonorthogonalityThreshold =
388 scalar minDDotS =
min(ortho);
390 scalar sumDDotS =
sum(ortho);
392 label severeNonOrth = 0;
394 label errorNonOrth = 0;
399 if (ortho[facei] < severeNonorthogonalityThreshold)
401 if (ortho[facei] > SMALL)
405 setPtr->insert(facei);
414 setPtr->insert(facei);
422 reduce(minDDotS, minOp<scalar>());
423 reduce(sumDDotS, sumOp<scalar>());
424 reduce(severeNonOrth, sumOp<label>());
425 reduce(errorNonOrth, sumOp<label>());
429 const label neiSize =
returnReduce(ortho.size(), sumOp<label>());
435 Info<<
" Mesh non-orthogonality Max: " 442 if (severeNonOrth > 0)
444 Info<<
" *Number of severely non-orthogonal faces: " 445 << severeNonOrth <<
"." <<
endl;
449 if (errorNonOrth > 0)
453 Info<<
" ***Number of non-orthogonality errors: " 454 << errorNonOrth <<
"." <<
endl;
462 Info<<
" Non-orthogonality check OK." <<
endl;
474 const bool detailedReport,
475 const scalar minPyrVol,
498 label nErrorPyrs = 0;
502 if (ownPyrVol[facei] < minPyrVol)
506 setPtr->insert(facei);
510 Pout<<
"Negative pyramid volume: " << ownPyrVol[facei]
511 <<
" for face " << facei <<
" " <<
f[facei]
512 <<
" and owner cell: " << own[facei] <<
endl 513 <<
"Owner cell vertex labels: " 514 <<
cells()[own[facei]].labels(faces())
521 if (isInternalFace(facei))
523 if (neiPyrVol[facei] < minPyrVol)
527 setPtr->insert(facei);
531 Pout<<
"Negative pyramid volume: " << neiPyrVol[facei]
532 <<
" for face " << facei <<
" " <<
f[facei]
533 <<
" and neighbour cell: " << nei[facei] <<
nl 534 <<
"Neighbour cell vertex labels: " 535 <<
cells()[nei[facei]].labels(faces())
543 reduce(nErrorPyrs, sumOp<label>());
549 Info<<
" ***Error in face pyramids: " 550 << nErrorPyrs <<
" faces are incorrectly oriented." 559 Info<<
" Face pyramids OK." <<
endl;
591 scalar maxSkew =
max(skewness);
598 if (skewness[facei] > skewThreshold_)
602 setPtr->insert(facei);
609 reduce(maxSkew, maxOp<scalar>());
610 reduce(nWarnSkew, sumOp<label>());
616 Info<<
" ***Max skewness = " << maxSkew
617 <<
", " << nWarnSkew <<
" highly skew faces detected" 618 " which may impair the quality of the results" 627 Info<<
" Max skewness = " << maxSkew <<
" OK." <<
endl;
645 if (maxDeg < -SMALL || maxDeg > 180+SMALL)
648 <<
"maxDeg should be [0..180] but is now " << maxDeg
664 scalar maxEdgeSin =
max(faceAngles);
670 if (faceAngles[facei] > SMALL)
676 setPtr->insert(facei);
681 reduce(nConcave, sumOp<label>());
682 reduce(maxEdgeSin, maxOp<scalar>());
686 scalar maxConcaveDegr =
691 Info<<
" *There are " << nConcave
692 <<
" faces with concave angles between consecutive" 693 <<
" edges. Max concave angle = " << maxConcaveDegr
694 <<
" degrees." <<
endl;
702 Info<<
" All angles in faces OK." <<
endl;
715 const scalar warnFlatness,
721 if (warnFlatness < 0 || warnFlatness > 1)
724 <<
"warnFlatness should be [0..1] but is " << warnFlatness
741 scalar minFlatness = GREAT;
742 scalar sumFlatness = 0;
746 forAll(faceFlatness, facei)
748 if (fcs[facei].size() > 3 && magAreas[facei] > VSMALL)
750 sumFlatness += faceFlatness[facei];
753 minFlatness =
min(minFlatness, faceFlatness[facei]);
755 if (faceFlatness[facei] < warnFlatness)
761 setPtr->insert(facei);
768 reduce(nWarped, sumOp<label>());
769 reduce(minFlatness, minOp<scalar>());
771 reduce(nSummed, sumOp<label>());
772 reduce(sumFlatness, sumOp<scalar>());
778 Info<<
" Face flatness (1 = flat, 0 = butterfly) : min = " 779 << minFlatness <<
" average = " << sumFlatness / nSummed
789 Info<<
" *There are " << nWarped
790 <<
" faces with ratio between projected and actual area < " 791 << warnFlatness <<
endl;
793 Info<<
" Minimum ratio (minimum flatness, maximum warpage) = " 794 << minFlatness <<
endl;
802 Info<<
" All face flatness OK." <<
endl;
822 label nConcaveCells = 0;
826 const cell& cFaces =
c[celli];
828 bool concave =
false;
837 label fI = cFaces[i];
839 const point& fC = fCentres[fI];
843 fN /=
max(
mag(fN), VSMALL);
847 if (fOwner[fI] != celli)
859 label fJ = cFaces[j];
861 const point& pt = fCentres[fJ];
871 pC /=
max(
mag(pC), VSMALL);
873 if ((pC & fN) > -planarCosAngle_)
881 setPtr->insert(celli);
893 reduce(nConcaveCells, sumOp<label>());
895 if (nConcaveCells > 0)
899 Info<<
" ***Concave cells (using face planes) found," 900 <<
" number of cells: " << nConcaveCells <<
endl;
908 Info<<
" Concave cell check OK." <<
endl;
929 label
internal = nInternalFaces();
932 bool hasError =
false;
934 label nMultipleCells = 0;
938 for (label facei = 0; facei <
internal; facei++)
940 if (own[facei] >= nei[facei])
946 setPtr->insert(facei);
960 SortableList<label> nbr(curFaces.size());
964 label facei = curFaces[i];
966 if (facei >= nInternalFaces())
973 label nbrCelli = nei[facei];
975 if (nbrCelli == celli)
977 nbrCelli = own[facei];
980 if (celli < nbrCelli)
1000 label prevCell = nbr[0];
1001 label prevFace = curFaces[nbr.indices()[0]];
1003 bool hasMultipleFaces =
false;
1005 for (label i = 1; i < nbr.size(); i++)
1007 label thisCell = nbr[i];
1008 label thisFace = curFaces[nbr.indices()[i]];
1015 if (thisCell == prevCell)
1017 hasMultipleFaces =
true;
1021 setPtr->insert(prevFace);
1022 setPtr->insert(thisFace);
1025 else if (thisFace < prevFace)
1031 setPtr->insert(thisFace);
1035 prevCell = thisCell;
1036 prevFace = thisFace;
1039 if (hasMultipleFaces)
1046 reduce(nMultipleCells, sumOp<label>());
1048 if ((
debug || report) && nMultipleCells > 0)
1050 Info<<
" <<Found " << nMultipleCells
1051 <<
" neighbouring cells with multiple inbetween faces." <<
endl;
1056 if (
debug || report)
1058 Info<<
" ***Faces not in upper triangular order." <<
endl;
1064 if (
debug || report)
1066 Info<<
" Upper triangular ordering OK." <<
endl;
1081 label nOpenCells = 0;
1090 const edgeList cellEdges =
c[celli].edges(
f);
1096 edgeList curFaceEdges =
f[curFaces[facei]].edges();
1098 forAll(curFaceEdges, faceEdgeI)
1100 const edge& curEdge = curFaceEdges[faceEdgeI];
1102 forAll(cellEdges, cellEdgeI)
1104 if (cellEdges[cellEdgeI] == curEdge)
1106 edgeUsage[cellEdgeI]++;
1113 edgeList singleEdges(cellEdges.size());
1114 label nSingleEdges = 0;
1118 if (edgeUsage[edgeI] == 1)
1120 singleEdges[nSingleEdges] = cellEdges[edgeI];
1123 else if (edgeUsage[edgeI] != 2)
1127 setPtr->insert(celli);
1132 if (nSingleEdges > 0)
1136 setPtr->insert(celli);
1143 reduce(nOpenCells, sumOp<label>());
1147 if (
debug || report)
1149 Info<<
" ***Open cells found, number of cells: " << nOpenCells
1150 <<
". This problem may be fixable using the zipUpMesh utility." 1157 if (
debug || report)
1159 Info<<
" Topological cell zip-up check OK." <<
endl;
1177 label nErrorFaces = 0;
1181 const face& curFace =
f[fI];
1198 bool inserted = facePoints.insert(curFace[fp]);
1212 reduce(nErrorFaces, sumOp<label>());
1214 if (nErrorFaces > 0)
1216 if (
debug || report)
1218 Info<<
" Faces with invalid vertex labels found, " 1219 <<
" number of faces: " << nErrorFaces <<
endl;
1225 if (
debug || report)
1227 Info<<
" Face vertices OK." <<
endl;
1242 label nFaceErrors = 0;
1243 label nCellErrors = 0;
1249 if (pf[pointi].empty())
1253 setPtr->insert(pointi);
1263 const labelList& pc = pointCells(pointi);
1269 setPtr->insert(pointi);
1276 reduce(nFaceErrors, sumOp<label>());
1277 reduce(nCellErrors, sumOp<label>());
1279 if (nFaceErrors > 0 || nCellErrors > 0)
1281 if (
debug || report)
1283 Info<<
" ***Unused points found in the mesh, " 1284 "number unused by faces: " << nFaceErrors
1285 <<
" number unused by cells: " << nCellErrors
1292 if (
debug || report)
1304 const Map<label>& nCommonPoints,
1305 label& nBaffleFaces,
1313 label nbFacei = iter.key();
1314 label nCommon = iter();
1316 const face& curFace = faces()[facei];
1317 const face& nbFace = faces()[nbFacei];
1319 if (nCommon == nbFace.size() || nCommon == curFace.size())
1321 if (nbFace.size() != curFace.size())
1332 setPtr->insert(facei);
1333 setPtr->insert(nbFacei);
1345 const Map<label>& nCommonPoints,
1353 label nbFacei = iter.key();
1354 label nCommon = iter();
1356 const face& curFace = faces()[facei];
1357 const face& nbFace = faces()[nbFacei];
1362 && nCommon != nbFace.size()
1363 && nCommon != curFace.size()
1369 label nb = nbFace.find(curFace[fp]);
1383 label fpPlus1 = curFace.fcIndex(fp);
1384 label fpMin1 = curFace.rcIndex(fp);
1387 label nbPlus1 = nbFace.fcIndex(nb);
1388 label nbMin1 = nbFace.rcIndex(nb);
1395 if (nbFace[nbPlus1] == curFace[fpPlus1])
1400 else if (nbFace[nbPlus1] == curFace[fpMin1])
1405 else if (nbFace[nbMin1] == curFace[fpMin1])
1425 if (curFp >= curFace.size())
1431 curFp = curFace.size()-1;
1436 if (curNb >= nbFace.size())
1442 curNb = nbFace.size()-1;
1444 }
while (curFace[curFp] == nbFace[curNb]);
1453 for (label commonI = 0; commonI < nCommon; commonI++)
1457 if (curFp >= curFace.size())
1463 curFp = curFace.size()-1;
1468 if (curNb >= nbFace.size())
1474 curNb = nbFace.size()-1;
1477 if (curFace[curFp] != nbFace[curNb])
1481 setPtr->insert(facei);
1482 setPtr->insert(nbFacei);
1513 label nBaffleFaces = 0;
1514 label nErrorDuplicate = 0;
1515 label nErrorOrder = 0;
1516 Map<label> nCommonPoints;
1518 for (label facei = 0; facei < nFaces(); facei++)
1520 const face& curFace = faces()[facei];
1524 nCommonPoints.
clear();
1528 label pointi = curFace[fp];
1534 label nbFacei = nbs[nbI];
1536 if (facei < nbFacei)
1539 ++(nCommonPoints(nbFacei, 0));
1547 if (checkDuplicateFaces(facei, nCommonPoints, nBaffleFaces, setPtr))
1553 if (checkCommonOrder(facei, nCommonPoints, setPtr))
1559 reduce(nBaffleFaces, sumOp<label>());
1560 reduce(nErrorDuplicate, sumOp<label>());
1561 reduce(nErrorOrder, sumOp<label>());
1565 Info<<
" Number of identical duplicate faces (baffle faces): " 1566 << nBaffleFaces <<
endl;
1569 if (nErrorDuplicate > 0 || nErrorOrder > 0)
1572 if (nErrorDuplicate > 0)
1574 Info<<
" <<Number of duplicate (not baffle) faces found: " 1576 <<
". This might indicate a problem." <<
endl;
1579 if (nErrorOrder > 0)
1581 Info<<
" <<Number of faces with non-consecutive shared points: " 1582 << nErrorOrder <<
". This might indicate a problem." <<
endl;
1588 if (
debug || report)
1590 Info<<
" Face-face connectivity OK." <<
endl;
1601 return checkClosedBoundary(faceAreas(), report,
bitSet());
1613 return checkClosedCells
1631 return checkFaceAreas
1647 return checkCellVolumes
1663 return checkFaceOrthogonality
1676 const scalar minPyrVol,
1680 return checkFacePyramids
1698 return checkFaceSkewness
1713 const scalar maxDeg,
1717 return checkFaceAngles
1731 const scalar warnFlatness,
1735 return checkFaceFlatness
1753 return checkConcaveCells
1765 label nFailedChecks = 0;
1767 if (checkPoints(report)) ++nFailedChecks;
1768 if (checkUpperTriangular(report)) ++nFailedChecks;
1769 if (checkCellsZipUp(report)) ++nFailedChecks;
1770 if (checkFaceVertices(report)) ++nFailedChecks;
1771 if (checkFaceFaces(report)) ++nFailedChecks;
1775 if (
debug || report)
1777 Info<<
" Failed " << nFailedChecks
1778 <<
" mesh topology checks." <<
endl;
1784 if (
debug || report)
1795 label nFailedChecks = 0;
1797 if (checkClosedBoundary(report)) ++nFailedChecks;
1798 if (checkClosedCells(report)) ++nFailedChecks;
1799 if (checkFaceAreas(report)) ++nFailedChecks;
1800 if (checkCellVolumes(report)) ++nFailedChecks;
1801 if (checkFaceOrthogonality(report)) ++nFailedChecks;
1802 if (checkFacePyramids(report)) ++nFailedChecks;
1803 if (checkFaceSkewness(report)) ++nFailedChecks;
1807 if (
debug || report)
1809 Info<<
" Failed " << nFailedChecks
1810 <<
" mesh geometry checks." <<
endl;
1816 if (
debug || report)
1836 label nFailedChecks =
1839 + checkBoundary(report);
1843 if (
debug || report)
1845 Info<<
" Failed " << nFailedChecks
1846 <<
" mesh checks." <<
endl;
1852 if (
debug || report)
1863 scalar prev = closedThreshold_;
1864 closedThreshold_ = val;
1872 scalar prev = aspectThreshold_;
1873 aspectThreshold_ = val;
1881 scalar prev = nonOrthThreshold_;
1882 nonOrthThreshold_ = val;
1890 scalar prev = skewThreshold_;
1891 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)
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 int communicator=UPstream::worldComm)
Logical (or) reduction (MPI_AllReduce)
List< labelList > labelListList
List of labelList.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1, const label comm)
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.
void reduce(T &value, [[maybe_unused]] BinaryOp bop, [[maybe_unused]] const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce)
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.
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
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.
const wordList edge
Standard (finite-area) edge field types (scalar, vector, tensor, etc)
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.
virtual bool checkBoundary(const bool report=false) const
Check boundary patches (e.g. empty and wedge) for correct.
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.
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)