Go to the documentation of this file.
26 #include "primitiveMesh.H"
54 Info<<
"bool primitiveMesh::checkClosedBoundary("
55 <<
"const bool) const: "
56 <<
"checking whether the boundary is closed" <<
endl;
62 vector sumClosed(vector::zero);
63 scalar sumMagClosedBoundary = 0;
65 for (
label faceI = nInternalFaces(); faceI < areas.size(); faceI++)
67 if (!internalOrCoupledFaces.
size() || !internalOrCoupledFaces[faceI])
69 sumClosed += areas[faceI];
70 sumMagClosedBoundary +=
mag(areas[faceI]);
77 vector openness = sumClosed/(sumMagClosedBoundary + VSMALL);
83 Info<<
" ***Boundary openness " << openness
84 <<
" possible hole in boundary description."
94 Info<<
" Boundary openness " << openness <<
" OK."
115 Info<<
"bool primitiveMesh::checkClosedCells("
116 <<
"const bool, labelHashSet*, labelHashSet*"
117 <<
", const Vector<label>&) const: "
118 <<
"checking whether cells are closed" <<
endl;
124 label nErrorClosed = 0;
128 const cell& curCell =
c[cI];
130 if (
min(curCell) < 0 ||
max(curCell) > nFaces())
141 if (nErrorClosed > 0)
145 Info<<
" ***Cells with invalid face labels found, number of cells "
146 << nErrorClosed <<
endl;
155 primitiveMeshTools::cellClosedness
166 scalar maxOpennessCell =
max(openness);
168 scalar maxAspectRatio =
max(aspectRatio);
173 if (openness[cellI] > closedThreshold_)
183 if (aspectRatio[cellI] > aspectThreshold_)
187 aspectSetPtr->
insert(cellI);
205 Info<<
" ***Open cells found, max cell openness: "
206 << maxOpennessCell <<
", number of open cells " << nOpen
217 Info<<
" ***High aspect ratio cells found, Max aspect ratio: "
219 <<
", number of cells " << nAspect
228 Info<<
" Max cell openness = " << maxOpennessCell <<
" OK." <<
nl
229 <<
" Max aspect ratio = " << maxAspectRatio <<
" OK."
241 const bool detailedReport,
247 Info<<
"bool primitiveMesh::checkFaceAreas("
248 <<
"const bool, labelHashSet*) const: "
249 <<
"checking face area magnitudes" <<
endl;
254 scalar minArea = GREAT;
255 scalar maxArea = -GREAT;
257 forAll(magFaceAreas, faceI)
259 if (magFaceAreas[faceI] < VSMALL)
267 if (isInternalFace(faceI))
269 Pout<<
"Zero or negative face area detected for "
270 <<
"internal face "<< faceI <<
" between cells "
271 << faceOwner()[faceI] <<
" and "
272 << faceNeighbour()[faceI]
273 <<
". Face area magnitude = " << magFaceAreas[faceI]
278 Pout<<
"Zero or negative face area detected for "
279 <<
"boundary face " << faceI <<
" next to cell "
280 << faceOwner()[faceI] <<
". Face area magnitude = "
281 << magFaceAreas[faceI] <<
endl;
286 minArea =
min(minArea, magFaceAreas[faceI]);
287 maxArea =
max(maxArea, magFaceAreas[faceI]);
293 if (minArea < VSMALL)
297 Info<<
" ***Zero or negative face area detected. "
298 "Minimum area: " << minArea <<
endl;
307 Info<<
" Minimum face area = " << minArea
308 <<
". Maximum face area = " << maxArea
309 <<
". Face area magnitudes OK." <<
endl;
321 const bool detailedReport,
327 Info<<
"bool primitiveMesh::checkCellVolumes("
328 <<
"const bool, labelHashSet*) const: "
329 <<
"checking cell volumes" <<
endl;
332 scalar minVolume = GREAT;
333 scalar maxVolume = -GREAT;
335 label nNegVolCells = 0;
339 if (vols[cellI] < VSMALL)
347 Pout<<
"Zero or negative cell volume detected for cell "
348 << cellI <<
". Volume = " << vols[cellI] <<
endl;
354 minVolume =
min(minVolume, vols[cellI]);
355 maxVolume =
max(maxVolume, vols[cellI]);
362 if (minVolume < VSMALL)
366 Info<<
" ***Zero or negative cell volume detected. "
367 <<
"Minimum negative volume: " << minVolume
368 <<
", Number of negative volume cells: " << nNegVolCells
378 Info<<
" Min volume = " << minVolume
379 <<
". Max volume = " << maxVolume
380 <<
". Total volume = " <<
gSum(vols)
381 <<
". Cell volumes OK." <<
endl;
399 Info<<
"bool primitiveMesh::checkFaceOrthogonality("
400 <<
"const bool, labelHashSet*) const: "
401 <<
"checking mesh non-orthogonality" <<
endl;
414 const scalar severeNonorthogonalityThreshold =
417 scalar minDDotS =
min(ortho);
419 scalar sumDDotS =
sum(ortho);
421 label severeNonOrth = 0;
423 label errorNonOrth = 0;
428 if (ortho[faceI] < severeNonorthogonalityThreshold)
430 if (ortho[faceI] > SMALL)
458 label neiSize = ortho.size();
465 Info<<
" Mesh non-orthogonality Max: "
472 if (severeNonOrth > 0)
474 Info<<
" *Number of severely non-orthogonal faces: "
475 << severeNonOrth <<
"." <<
endl;
479 if (errorNonOrth > 0)
483 Info<<
" ***Number of non-orthogonality errors: "
484 << errorNonOrth <<
"." <<
endl;
493 Info<<
" Non-orthogonality check OK." <<
endl;
506 const bool detailedReport,
507 const scalar minPyrVol,
513 Info<<
"bool primitiveMesh::checkFacePyramids("
514 <<
"const bool, const scalar, labelHashSet*) const: "
515 <<
"checking face orientation" <<
endl;
525 primitiveMeshTools::facePyramidVolume
535 label nErrorPyrs = 0;
539 if (ownPyrVol[faceI] < minPyrVol)
547 Pout<<
"Negative pyramid volume: " << ownPyrVol[faceI]
548 <<
" for face " << faceI <<
" " <<
f[faceI]
549 <<
" and owner cell: " << own[faceI] <<
endl
550 <<
"Owner cell vertex labels: "
551 <<
cells()[own[faceI]].labels(faces())
558 if (isInternalFace(faceI))
560 if (neiPyrVol[faceI] < minPyrVol)
568 Pout<<
"Negative pyramid volume: " << neiPyrVol[faceI]
569 <<
" for face " << faceI <<
" " <<
f[faceI]
570 <<
" and neighbour cell: " << nei[faceI] <<
nl
571 <<
"Neighbour cell vertex labels: "
572 <<
cells()[nei[faceI]].labels(faces())
586 Info<<
" ***Error in face pyramids: "
587 << nErrorPyrs <<
" faces are incorrectly oriented."
597 Info<<
" Face pyramids OK." <<
endl;
617 Info<<
"bool primitiveMesh::checkFaceSkewnesss("
618 <<
"const bool, labelHashSet*) const: "
619 <<
"checking face skewness" <<
endl;
635 scalar maxSkew =
max(skewness);
642 if (skewness[faceI] > skewThreshold_)
660 Info<<
" ***Max skewness = " << maxSkew
661 <<
", " << nWarnSkew <<
" highly skew faces detected"
662 " which may impair the quality of the results"
672 Info<<
" Max skewness = " << maxSkew <<
" OK." <<
endl;
695 Info<<
"bool primitiveMesh::checkFaceAngles"
696 <<
"(const bool, const scalar, labelHashSet*) const: "
697 <<
"checking face angles" <<
endl;
700 if (maxDeg < -SMALL || maxDeg > 180+SMALL)
703 <<
"maxDeg should be [0..180] but is now " << maxDeg
719 scalar maxEdgeSin =
max(faceAngles);
725 if (faceAngles[faceI] > SMALL)
741 scalar maxConcaveDegr =
746 Info<<
" *There are " << nConcave
747 <<
" faces with concave angles between consecutive"
748 <<
" edges. Max concave angle = " << maxConcaveDegr
749 <<
" degrees." <<
endl;
758 Info<<
" All angles in faces OK." <<
endl;
772 const scalar warnFlatness,
778 Info<<
"bool primitiveMesh::checkFaceFlatness"
779 <<
"(const bool, const scalar, labelHashSet*) const: "
780 <<
"checking face flatness" <<
endl;
783 if (warnFlatness < 0 || warnFlatness > 1)
786 <<
"warnFlatness should be [0..1] but is now " << warnFlatness
803 scalar minFlatness = GREAT;
804 scalar sumFlatness = 0;
808 forAll(faceFlatness, faceI)
810 if (fcs[faceI].size() > 3 && magAreas[faceI] > VSMALL)
812 sumFlatness += faceFlatness[faceI];
815 minFlatness =
min(minFlatness, faceFlatness[faceI]);
817 if (faceFlatness[faceI] < warnFlatness)
840 Info<<
" Face flatness (1 = flat, 0 = butterfly) : min = "
841 << minFlatness <<
" average = " << sumFlatness / nSummed
851 Info<<
" *There are " << nWarped
852 <<
" faces with ratio between projected and actual area < "
853 << warnFlatness <<
endl;
855 Info<<
" Minimum ratio (minimum flatness, maximum warpage) = "
856 << minFlatness <<
endl;
865 Info<<
" All face flatness OK." <<
endl;
883 Info<<
"bool primitiveMesh::checkConcaveCells(const bool"
884 <<
", labelHashSet*) const: "
885 <<
"checking for concave cells" <<
endl;
891 label nConcaveCells = 0;
895 const cell& cFaces =
c[cellI];
897 bool concave =
false;
906 label fI = cFaces[i];
908 const point& fC = fCentres[fI];
912 fN /=
max(
mag(fN), VSMALL);
916 if (fOwner[fI] != cellI)
928 label fJ = cFaces[j];
930 const point& pt = fCentres[fJ];
940 pC /=
max(
mag(pC), VSMALL);
942 if ((pC & fN) > -planarCosAngle_)
964 if (nConcaveCells > 0)
968 Info<<
" ***Concave cells (using face planes) found,"
969 <<
" number of cells: " << nConcaveCells <<
endl;
978 Info<<
" Concave cell check OK." <<
endl;
998 Info<<
"bool primitiveMesh::checkUpperTriangular("
999 <<
"const bool, labelHashSet*) const: "
1000 <<
"checking face ordering" <<
endl;
1014 label nMultipleCells =
false;
1018 for (
label faceI = 0; faceI <
internal; faceI++)
1020 if (own[faceI] >= nei[faceI])
1040 SortableList<label> nbr(curFaces.size());
1044 label faceI = curFaces[i];
1053 label nbrCellI = nei[faceI];
1055 if (nbrCellI == cellI)
1057 nbrCellI = own[faceI];
1060 if (cellI < nbrCellI)
1080 label prevCell = nbr[0];
1081 label prevFace = curFaces[nbr.indices()[0]];
1083 bool hasMultipleFaces =
false;
1085 for (
label i = 1; i < nbr.size(); i++)
1087 label thisCell = nbr[i];
1088 label thisFace = curFaces[nbr.indices()[i]];
1095 if (thisCell == prevCell)
1097 hasMultipleFaces =
true;
1101 setPtr->
insert(prevFace);
1102 setPtr->
insert(thisFace);
1105 else if (thisFace < prevFace)
1111 setPtr->
insert(thisFace);
1115 prevCell = thisCell;
1116 prevFace = thisFace;
1119 if (hasMultipleFaces)
1125 reduce(error, orOp<bool>());
1126 reduce(nMultipleCells, sumOp<label>());
1128 if ((debug || report) && nMultipleCells > 0)
1130 Info<<
" <<Found " << nMultipleCells
1131 <<
" neighbouring cells with multiple inbetween faces." <<
endl;
1136 if (debug || report)
1138 Info<<
" ***Faces not in upper triangular order." <<
endl;
1145 if (debug || report)
1147 Info<<
" Upper triangular ordering OK." <<
endl;
1163 Info<<
"bool primitiveMesh::checkCellsZipUp("
1164 <<
"const bool, labelHashSet*) const: "
1165 <<
"checking topological cell openness" <<
endl;
1168 label nOpenCells = 0;
1177 const edgeList cellEdges =
c[cellI].edges(
f);
1179 labelList edgeUsage(cellEdges.size(), 0);
1183 edgeList curFaceEdges =
f[curFaces[faceI]].edges();
1185 forAll(curFaceEdges, faceEdgeI)
1187 const edge& curEdge = curFaceEdges[faceEdgeI];
1189 forAll(cellEdges, cellEdgeI)
1191 if (cellEdges[cellEdgeI] == curEdge)
1193 edgeUsage[cellEdgeI]++;
1200 edgeList singleEdges(cellEdges.size());
1201 label nSingleEdges = 0;
1205 if (edgeUsage[edgeI] == 1)
1207 singleEdges[nSingleEdges] = cellEdges[edgeI];
1210 else if (edgeUsage[edgeI] != 2)
1214 setPtr->insert(cellI);
1219 if (nSingleEdges > 0)
1223 setPtr->insert(cellI);
1230 reduce(nOpenCells, sumOp<label>());
1234 if (debug || report)
1236 Info<<
" ***Open cells found, number of cells: " << nOpenCells
1237 <<
". This problem may be fixable using the zipUpMesh utility."
1245 if (debug || report)
1247 Info<<
" Topological cell zip-up check OK." <<
endl;
1264 Info<<
"bool primitiveMesh::checkFaceVertices("
1265 <<
"const bool, labelHashSet*) const: "
1266 <<
"checking face vertices" <<
endl;
1272 label nErrorFaces = 0;
1276 const face& curFace =
f[fI];
1293 bool inserted = facePoints.insert(curFace[fp]);
1307 reduce(nErrorFaces, sumOp<label>());
1309 if (nErrorFaces > 0)
1311 if (debug || report)
1313 Info<<
" Faces with invalid vertex labels found, "
1314 <<
" number of faces: " << nErrorFaces <<
endl;
1321 if (debug || report)
1323 Info<<
" Face vertices OK." <<
endl;
1339 Info<<
"bool primitiveMesh::checkPoints"
1340 <<
"(const bool, labelHashSet*) const: "
1341 <<
"checking points" <<
endl;
1344 label nFaceErrors = 0;
1345 label nCellErrors = 0;
1351 if (pf[pointI].empty())
1355 setPtr->insert(pointI);
1365 const labelList& pc = pointCells(pointI);
1371 setPtr->insert(pointI);
1378 reduce(nFaceErrors, sumOp<label>());
1379 reduce(nCellErrors, sumOp<label>());
1381 if (nFaceErrors > 0 || nCellErrors > 0)
1383 if (debug || report)
1385 Info<<
" ***Unused points found in the mesh, "
1386 "number unused by faces: " << nFaceErrors
1387 <<
" number unused by cells: " << nCellErrors
1395 if (debug || report)
1409 const Map<label>& nCommonPoints,
1410 label& nBaffleFaces,
1418 label nbFaceI = iter.key();
1419 label nCommon = iter();
1421 const face& curFace = faces()[faceI];
1422 const face& nbFace = faces()[nbFaceI];
1424 if (nCommon == nbFace.size() || nCommon == curFace.size())
1426 if (nbFace.size() != curFace.size())
1437 setPtr->insert(faceI);
1438 setPtr->insert(nbFaceI);
1451 const Map<label>& nCommonPoints,
1459 label nbFaceI = iter.key();
1460 label nCommon = iter();
1462 const face& curFace = faces()[faceI];
1463 const face& nbFace = faces()[nbFaceI];
1468 && nCommon != nbFace.size()
1469 && nCommon != curFace.size()
1489 label fpPlus1 = curFace.fcIndex(fp);
1490 label fpMin1 = curFace.rcIndex(fp);
1493 label nbPlus1 = nbFace.fcIndex(nb);
1494 label nbMin1 = nbFace.rcIndex(nb);
1501 if (nbFace[nbPlus1] == curFace[fpPlus1])
1506 else if (nbFace[nbPlus1] == curFace[fpMin1])
1511 else if (nbFace[nbMin1] == curFace[fpMin1])
1531 if (curFp >= curFace.size())
1537 curFp = curFace.size()-1;
1542 if (curNb >= nbFace.size())
1548 curNb = nbFace.size()-1;
1550 }
while (curFace[curFp] == nbFace[curNb]);
1559 for (
label commonI = 0; commonI < nCommon; commonI++)
1563 if (curFp >= curFace.size())
1569 curFp = curFace.size()-1;
1574 if (curNb >= nbFace.size())
1580 curNb = nbFace.size()-1;
1583 if (curFace[curFp] != nbFace[curNb])
1587 setPtr->insert(faceI);
1588 setPtr->insert(nbFaceI);
1619 Info<<
"bool primitiveMesh::checkFaceFaces(const bool, labelHashSet*)"
1620 <<
" const: " <<
"checking face-face connectivity" <<
endl;
1625 label nBaffleFaces = 0;
1626 label nErrorDuplicate = 0;
1627 label nErrorOrder = 0;
1628 Map<label> nCommonPoints(100);
1630 for (
label faceI = 0; faceI < nFaces(); faceI++)
1632 const face& curFace = faces()[faceI];
1636 nCommonPoints.clear();
1640 label pointI = curFace[fp];
1646 label nbFaceI = nbs[nbI];
1648 if (faceI < nbFaceI)
1654 if (fnd == nCommonPoints.end())
1657 nCommonPoints.insert(nbFaceI, 1);
1670 if (checkDuplicateFaces(faceI, nCommonPoints, nBaffleFaces, setPtr))
1676 if (checkCommonOrder(faceI, nCommonPoints, setPtr))
1682 reduce(nBaffleFaces, sumOp<label>());
1683 reduce(nErrorDuplicate, sumOp<label>());
1684 reduce(nErrorOrder, sumOp<label>());
1688 Info<<
" Number of identical duplicate faces (baffle faces): "
1689 << nBaffleFaces <<
endl;
1692 if (nErrorDuplicate > 0 || nErrorOrder > 0)
1695 if (nErrorDuplicate > 0)
1697 Info<<
" <<Number of duplicate (not baffle) faces found: "
1699 <<
". This might indicate a problem." <<
endl;
1702 if (nErrorOrder > 0)
1704 Info<<
" <<Number of faces with non-consecutive shared points: "
1705 << nErrorOrder <<
". This might indicate a problem." <<
endl;
1712 if (debug || report)
1714 Info<<
" Face-face connectivity OK." <<
endl;
1788 return checkFaceOrthogonality
1801 const scalar minPyrVol,
1838 const scalar maxDeg,
1856 const scalar warnFlatness,
1878 return checkConcaveCells
1890 label noFailedChecks = 0;
1896 if (checkFaceFaces(report)) noFailedChecks++;
1898 if (noFailedChecks == 0)
1900 if (debug || report)
1902 Info<<
" Mesh topology OK." <<
endl;
1909 if (debug || report)
1911 Info<<
" Failed " << noFailedChecks
1912 <<
" mesh topology checks." <<
endl;
1922 label noFailedChecks = 0;
1928 if (checkFaceOrthogonality(report)) noFailedChecks++;
1932 if (noFailedChecks == 0)
1934 if (debug || report)
1936 Info<<
" Mesh geometry OK." <<
endl;
1942 if (debug || report)
1944 Info<<
" Failed " << noFailedChecks
1945 <<
" mesh geometry checks." <<
endl;
1957 Info<<
"bool primitiveMesh::checkMesh(const bool report) const: "
1958 <<
"checking primitiveMesh" <<
endl;
1963 if (noFailedChecks == 0)
1965 if (debug || report)
1974 if (debug || report)
1976 Info<<
" Failed " << noFailedChecks
1977 <<
" mesh checks." <<
endl;
1987 scalar prev = closedThreshold_;
1988 closedThreshold_ = val;
1996 scalar prev = aspectThreshold_;
1997 aspectThreshold_ = val;
2005 scalar prev = nonOrthThreshold_;
2006 nonOrthThreshold_ = val;
2014 scalar prev = skewThreshold_;
2015 skewThreshold_ = val;
bool checkClosedBoundary(const polyMeshGen &, const bool report=false)
Check boundary closedness.
void checkFaceSkewness(const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL)
Check face skewness.
List< label > labelList
A List of labels.
bool checkMesh(const bool report=false) const
Check mesh for correctness. Returns false for no error.
#define forAll(list, i)
Loop across all elements in list.
A class for managing temporary objects.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
dimensionedScalar sin(const dimensionedScalar &ds)
bool checkFaceVertices(const bool report=false, labelHashSet *setPtr=NULL) const
Check uniqueness of face vertices.
static const label labelMax
virtual const labelList & faceOwner() const =0
Face face-owner addresing.
static scalar setSkewThreshold(const scalar)
Set the skewness warning threshold as percentage.
const cellList & cells() const
bool checkDuplicateFaces(const label, const Map< label > &, label &nBaffleFaces, labelHashSet *) const
Check if all points on face are shared with another face.
bool checkUpperTriangular(const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL)
Check face ordering.
label checkGeometry(const polyMesh &mesh, const bool allGeometry, const autoPtr< surfaceWriter > &)
Unit conversion functions.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type gSum(const FieldField< Field, Type > &f)
bool checkFaceAreas(const polyMeshGen &, const bool report=false, const scalar minFaceArea=VSMALL, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check for negative face areas.
dimensioned< scalar > mag(const dimensioned< Type > &)
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.
bool checkFaceAreas(const bool report=false, labelHashSet *setPtr=NULL) const
Check for negative face areas.
bool checkFaceVertices(const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL)
Check uniqueness of face vertices.
bool checkTopology(const bool report=false) const
Check mesh topology for correctness.
virtual const labelList & faceNeighbour() const =0
Face face-neighbour addressing.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool checkConcaveCells(const vectorField &fAreas, const pointField &fCentres, const bool report, labelHashSet *setPtr) const
Check for concave cells by the planes of faces.
bool checkFaceAngles(const polyMeshGen &, const bool report=false, const scalar maxDeg=10, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face angles.
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
static scalar setClosedThreshold(const scalar)
Set the closedness ratio warning threshold.
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
bool checkGeometry(const bool report=false) const
Check mesh geometry (& implicitly topology) for correctness.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static scalar setNonOrthThreshold(const scalar)
Set the non-orthogonality warning threshold in degrees.
bool checkFaceFlatness(const bool report, labelHashSet *setPtr) const
Check face warpage: decompose face and check ratio between.
HashTable< T, label, Hash< label > >::iterator iterator
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
bool checkCellsZipUp(const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL)
Check cell zip-up.
List< cell > cellList
list of cells
bool checkFaceOrthogonality(const bool report=false, labelHashSet *setPtr=NULL) const
Check for non-orthogonality.
bool checkPoints(const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL)
Check for unused points.
label nInternalFaces() const
static const debug::tolerancesSwitch aspectThreshold_
Aspect ratio warning threshold.
bool checkClosedBoundary(const bool report=false) const
Check boundary for closedness.
bool checkFaceSkewness(const bool report=false, labelHashSet *setPtr=NULL) const
Check face skewness.
bool checkUpperTriangular(const bool report=false, labelHashSet *setPtr=NULL) const
Check face ordering.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool checkFacePyramids(const polyMeshGen &, const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face pyramid volume.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
static const debug::tolerancesSwitch closedThreshold_
Static data to control mesh checking.
List< labelList > labelListList
A List of labelList.
bool checkClosedCells(const bool report=false, labelHashSet *setPtr=NULL, labelHashSet *highAspectSetPtr=NULL) const
Check cells for closedness.
static Foam::debug::tolerancesSwitch nonOrthThreshold_
Non-orthogonality warning threshold in deg.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
bool checkFaceAngles(const bool report=false, labelHashSet *setPtr=NULL) const
Check face angles.
static scalar planarCosAngle_
Threshold where faces are considered coplanar.
prefixOSstream Pout(cout, "Pout")
static scalar setAspectThreshold(const scalar)
Set the aspect ratio warning threshold.
bool checkCellVolumes(const polyMeshGen &, const bool report=false, labelHashSet *setPtr=NULL)
Check for negative cell volumes.
static const debug::tolerancesSwitch skewThreshold_
Skewness warning threshold.
bool checkCellVolumes(const bool report=false, labelHashSet *setPtr=NULL) const
Check for negative cell volumes.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool checkPoints(const bool report=false, labelHashSet *setPtr=NULL) const
Check for unused points.
dimensionedScalar acos(const dimensionedScalar &ds)
bool checkFaceFaces(const bool report=false, labelHashSet *setPtr=NULL) const
Check face-face connectivity.
bool insert(const Key &key)
Insert a new entry.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
scalar radToDeg(const scalar rad)
Conversion from radians to degrees.
const dimensionedScalar c
Speed of light in a vacuum.
Various functions to operate on Lists.
label size() const
Number of entries.
bool checkCellsZipUp(const bool report=false, labelHashSet *setPtr=NULL) const
Check cell zip-up.
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
bool checkFacePyramids(const bool report=false, const scalar minPyrVol=-SMALL, labelHashSet *setPtr=NULL) const
Check face pyramid volume.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
A cell is defined as a list of faces with extra functionality.
bool checkClosedCells(const polyMeshGen &, const bool report=false, const scalar aspectWarn=1000, labelHashSet *setPtr=NULL)
Check cells for closedness.
dimensionedScalar asin(const dimensionedScalar &ds)
label checkTopology(const polyMesh &, const bool, const bool, const autoPtr< surfaceWriter > &)
bool checkCommonOrder(const label, const Map< label > &, labelHashSet *) const
Check that shared points are in consecutive order.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
dimensionedScalar cos(const dimensionedScalar &ds)