Go to the documentation of this file.
54 label facei = changedFaces[i];
63 faceCentres_[facei] = (1.0/3.0)*(
p[
f[0]] +
p[
f[1]] +
p[
f[2]]);
64 faceAreas_[facei] = 0.5*((
p[
f[1]] -
p[
f[0]])^(
p[
f[2]] -
p[
f[0]]));
68 vector sumN = vector::zero;
70 vector sumAc = vector::zero;
93 faceCentres_[facei] = (1.0/3.0)*sumAc/(sumA + VSMALL);
94 faceAreas_[facei] = 0.5*sumN;
115 forAll(changedCells, changedCellI)
117 const label cellI(changedCells[changedCellI]);
123 vector cEst = vector::zero;
128 const point& fc = faceCentres_[cFaces[cFaceI]];
133 cEst /= cFaces.
size();
139 const label faceI(cFaces[cFaceI]);
142 scalar pyr3Vol = faceAreas_[faceI] & (faceCentres_[faceI] - cEst);
144 if (own[faceI] != cellI)
150 cellVolumes_[cellI] += pyr3Vol;
153 const vector pCtr = (3.0/4.0)*faceCentres_[faceI] + (1.0/4.0)*cEst;
156 cellCentres_[cellI] += pyr3Vol*pCtr;
161 if (
mag(cellVolumes_[cellI]) > VSMALL)
163 point cc = cellCentres_[cellI] / cellVolumes_[cellI];
170 cellCentres_[cellI] = cc;
174 cellCentres_[cellI] = cEst;
179 cellCentres_[cellI] = cEst;
182 cellVolumes_[cellI] *= (1.0/3.0);
200 label faceI = changedFaces[i];
202 affectedCells.
insert(own[faceI]);
204 if (
mesh.isInternalFace(faceI))
206 affectedCells.
insert(nei[faceI]);
209 return affectedCells.
toc();
217 const scalar severeNonorthogonalityThreshold,
222 label& severeNonOrth,
227 scalar dDotS = (d &
s)/(
mag(d)*
mag(
s) + VSMALL);
229 if (dDotS < severeNonorthogonalityThreshold)
233 if (
mesh.isInternalFace(faceI))
235 nei =
mesh.faceNeighbour()[faceI];
243 Pout<<
"Severe non-orthogonality for face " << faceI
244 <<
" between cells " <<
mesh.faceOwner()[faceI]
259 <<
"Severe non-orthogonality detected for face "
261 <<
" between cells " <<
mesh.faceOwner()[faceI]
285 const scalar minTetQuality,
306 if (tetQual < minTetQuality)
310 Pout<<
"bool polyMeshGeometry::checkFaceTets("
311 <<
"const bool, const scalar, const pointField&"
312 <<
", const pointField&"
313 <<
", const labelList&, labelHashSet*) : "
315 <<
" has a triangle that points the wrong way."
317 <<
"Tet quality: " << tetQual
349 faceAreas_ = mesh_.faceAreas();
350 faceCentres_ = mesh_.faceCentres();
351 cellCentres_ = mesh_.cellCentres();
352 cellVolumes_ = mesh_.cellVolumes();
364 updateFaceCentresAndAreas(
p, changedFaces);
366 updateCellCentresAndVols(affectedCells(mesh_, changedFaces), changedFaces);
373 const scalar orthWarn,
390 const scalar severeNonorthogonalityThreshold =
::cos(
degToRad(orthWarn));
402 scalar minDDotS = GREAT;
407 label severeNonOrth = 0;
409 label errorNonOrth = 0;
413 label faceI = checkFaces[i];
415 const point& ownCc = cellCentres[own[faceI]];
419 scalar dDotS = checkNonOrtho
423 severeNonorthogonalityThreshold,
426 cellCentres[nei[faceI]] - ownCc,
433 if (dDotS < minDDotS)
447 scalar dDotS = checkNonOrtho
451 severeNonorthogonalityThreshold,
461 if (dDotS < minDDotS)
474 label face0 = baffles[i].first();
475 label face1 = baffles[i].second();
477 const point& ownCc = cellCentres[own[face0]];
479 scalar dDotS = checkNonOrtho
483 severeNonorthogonalityThreshold,
486 cellCentres[own[face1]] - ownCc,
493 if (dDotS < minDDotS)
511 if (report && minDDotS < severeNonorthogonalityThreshold)
513 Info<<
"Number of non-orthogonality errors: " << errorNonOrth
514 <<
". Number of severely non-orthogonal faces: "
515 << severeNonOrth <<
"." <<
endl;
523 Info<<
"Mesh non-orthogonality Max: "
530 if (errorNonOrth > 0)
535 <<
"Error in non-orthogonality detected" <<
endl;
544 Info<<
"Non-orthogonality check OK.\n" <<
endl;
555 const scalar minPyrVol,
570 label nErrorPyrs = 0;
574 label faceI = checkFaces[i];
580 cellCentres[own[faceI]]
583 if (pyrVol > -minPyrVol)
587 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
588 <<
"const bool, const scalar, const pointField&"
589 <<
", const labelList&, labelHashSet*): "
590 <<
"face " << faceI <<
" points the wrong way. " <<
endl
591 <<
"Pyramid volume: " << -pyrVol
592 <<
" Face " <<
f[faceI] <<
" area: " <<
f[faceI].mag(
p)
593 <<
" Owner cell: " << own[faceI] <<
endl
594 <<
"Owner cell vertex labels: "
614 if (pyrVol < minPyrVol)
618 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
619 <<
"const bool, const scalar, const pointField&"
620 <<
", const labelList&, labelHashSet*): "
621 <<
"face " << faceI <<
" points the wrong way. " <<
endl
622 <<
"Pyramid volume: " << -pyrVol
623 <<
" Face " <<
f[faceI] <<
" area: " <<
f[faceI].mag(
p)
624 <<
" Neighbour cell: " << nei[faceI] <<
endl
625 <<
"Neighbour cell vertex labels: "
642 label face0 = baffles[i].first();
643 label face1 = baffles[i].second();
645 const point& ownCc = cellCentres[own[face0]];
654 if (pyrVolOwn > -minPyrVol)
658 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
659 <<
"const bool, const scalar, const pointField&"
660 <<
", const labelList&, labelHashSet*): "
661 <<
"face " << face0 <<
" points the wrong way. " <<
endl
662 <<
"Pyramid volume: " << -pyrVolOwn
663 <<
" Face " <<
f[face0] <<
" area: " <<
f[face0].mag(
p)
664 <<
" Owner cell: " << own[face0] <<
endl
665 <<
"Owner cell vertex labels: "
683 if (pyrVolNbr < minPyrVol)
687 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
688 <<
"const bool, const scalar, const pointField&"
689 <<
", const labelList&, labelHashSet*): "
690 <<
"face " << face0 <<
" points the wrong way. " <<
endl
691 <<
"Pyramid volume: " << -pyrVolNbr
692 <<
" Face " <<
f[face0] <<
" area: " <<
f[face0].mag(
p)
693 <<
" Neighbour cell: " << own[face1] <<
endl
694 <<
"Neighbour cell vertex labels: "
715 <<
"Error in face pyramids: faces pointing the wrong way."
725 Info<<
"Face pyramids OK.\n" <<
endl;
736 const scalar minTetQuality,
762 label nErrorTets = 0;
766 label faceI = checkFaces[i];
770 bool tetError = checkFaceTet
777 cellCentres[own[faceI]],
790 bool tetError = checkFaceTet
798 cellCentres[nei[faceI]],
878 label face0 = baffles[i].first();
879 label face1 = baffles[i].second();
881 bool tetError = checkFaceTet
888 cellCentres[own[face0]],
899 tetError = checkFaceTet
907 cellCentres[own[face1]],
922 cellCentres[own[face1]],
944 <<
"Error in face decomposition: negative tets."
965 const scalar internalSkew,
966 const scalar boundarySkew,
994 label faceI = checkFaces[i];
1006 cellCentres[own[faceI]],
1007 cellCentres[nei[faceI]]
1013 if (skewness > internalSkew)
1017 Pout<<
"Severe skewness for face " << faceI
1018 <<
" skewness = " << skewness <<
endl;
1029 maxSkew =
max(maxSkew, skewness);
1041 cellCentres[own[faceI]],
1048 if (skewness > internalSkew)
1052 Pout<<
"Severe skewness for coupled face " << faceI
1053 <<
" skewness = " << skewness <<
endl;
1064 maxSkew =
max(maxSkew, skewness);
1076 cellCentres[own[faceI]]
1083 if (skewness > boundarySkew)
1087 Pout<<
"Severe skewness for boundary face " << faceI
1088 <<
" skewness = " << skewness <<
endl;
1099 maxSkew =
max(maxSkew, skewness);
1105 label face0 = baffles[i].first();
1106 label face1 = baffles[i].second();
1108 const point& ownCc = cellCentres[own[face0]];
1109 const point& neiCc = cellCentres[own[face1]];
1126 if (skewness > internalSkew)
1130 Pout<<
"Severe skewness for face " << face0
1131 <<
" skewness = " << skewness <<
endl;
1142 maxSkew =
max(maxSkew, skewness);
1155 <<
" percent.\nThis may impair the quality of the result." <<
nl
1156 << nWarnSkew <<
" highly skew faces detected."
1166 Info<<
"Max skewness = " << 100*maxSkew
1167 <<
" percent. Face skewness OK.\n" <<
endl;
1178 const scalar warnWeight,
1204 scalar minWeight = GREAT;
1206 label nWarnWeight = 0;
1210 label faceI = checkFaces[i];
1212 const point& fc = faceCentres[faceI];
1213 const vector& fa = faceAreas[faceI];
1215 scalar dOwn =
mag(fa & (fc-cellCentres[own[faceI]]));
1219 scalar dNei =
mag(fa & (cellCentres[nei[faceI]]-fc));
1220 scalar weight =
min(dNei,dOwn)/(dNei+dOwn+VSMALL);
1222 if (weight < warnWeight)
1226 Pout<<
"Small weighting factor for face " << faceI
1227 <<
" weight = " << weight <<
endl;
1238 minWeight =
min(minWeight, weight);
1244 if (
patches[patchI].coupled())
1247 scalar weight =
min(dNei,dOwn)/(dNei+dOwn+VSMALL);
1249 if (weight < warnWeight)
1253 Pout<<
"Small weighting factor for face " << faceI
1254 <<
" weight = " << weight <<
endl;
1265 minWeight =
min(minWeight, weight);
1272 label face0 = baffles[i].first();
1273 label face1 = baffles[i].second();
1275 const point& ownCc = cellCentres[own[face0]];
1276 const point& fc = faceCentres[face0];
1277 const vector& fa = faceAreas[face0];
1279 scalar dOwn =
mag(fa & (fc-ownCc));
1280 scalar dNei =
mag(fa & (cellCentres[own[face1]]-fc));
1281 scalar weight =
min(dNei,dOwn)/(dNei+dOwn+VSMALL);
1283 if (weight < warnWeight)
1287 Pout<<
"Small weighting factor for face " << face0
1288 <<
" weight = " << weight <<
endl;
1299 minWeight =
min(minWeight, weight);
1305 if (minWeight < warnWeight)
1310 << minWeight <<
'.' <<
nl
1311 << nWarnWeight <<
" faces with small weights detected."
1321 Info<<
"Min weight = " << minWeight
1322 <<
". Weights OK.\n" <<
endl;
1333 const scalar warnRatio,
1357 scalar minRatio = GREAT;
1359 label nWarnRatio = 0;
1363 label faceI = checkFaces[i];
1365 scalar ownVol =
mag(cellVolumes[own[faceI]]);
1367 scalar neiVol = -GREAT;
1371 neiVol =
mag(cellVolumes[nei[faceI]]);
1377 if (
patches[patchI].coupled())
1385 scalar ratio =
min(ownVol, neiVol) / (
max(ownVol, neiVol) + VSMALL);
1387 if (ratio < warnRatio)
1391 Pout<<
"Small ratio for face " << faceI
1392 <<
" ratio = " << ratio <<
endl;
1403 minRatio =
min(minRatio, ratio);
1409 label face0 = baffles[i].first();
1410 label face1 = baffles[i].second();
1412 scalar ownVol =
mag(cellVolumes[own[face0]]);
1414 scalar neiVol =
mag(cellVolumes[own[face1]]);
1418 scalar ratio =
min(ownVol, neiVol) / (
max(ownVol, neiVol) + VSMALL);
1420 if (ratio < warnRatio)
1424 Pout<<
"Small ratio for face " << face0
1425 <<
" ratio = " << ratio <<
endl;
1436 minRatio =
min(minRatio, ratio);
1443 if (minRatio < warnRatio)
1448 << minRatio <<
'.' <<
nl
1449 << nWarnRatio <<
" faces with small ratios detected."
1459 Info<<
"Min ratio = " << minRatio
1460 <<
". Ratios OK.\n" <<
endl;
1475 const scalar maxDeg,
1483 if (maxDeg < -SMALL || maxDeg > 180+SMALL)
1486 <<
"maxDeg should be [0..180] but is now " << maxDeg
1494 scalar maxEdgeSin = 0.0;
1498 label errorFaceI = -1;
1502 label faceI = checkFaces[i];
1504 const face&
f = fcs[faceI];
1506 vector faceNormal = faceAreas[faceI];
1507 faceNormal /=
mag(faceNormal) + VSMALL;
1511 scalar magEPrev =
mag(ePrev);
1512 ePrev /= magEPrev + VSMALL;
1517 label fp1 =
f.fcIndex(fp0);
1521 scalar magE10 =
mag(e10);
1522 e10 /= magE10 + VSMALL;
1524 if (magEPrev > SMALL && magE10 > SMALL)
1526 vector edgeNormal = ePrev ^ e10;
1527 scalar magEdgeNormal =
mag(edgeNormal);
1529 if (magEdgeNormal < maxSin)
1536 edgeNormal /= magEdgeNormal;
1538 if ((edgeNormal & faceNormal) < SMALL)
1540 if (faceI != errorFaceI)
1552 maxEdgeSin =
max(maxEdgeSin, magEdgeNormal);
1567 if (maxEdgeSin > SMALL)
1569 scalar maxConcaveDegr =
1572 Info<<
"There are " << nConcave
1573 <<
" faces with concave angles between consecutive"
1574 <<
" edges. Max concave angle = " << maxConcaveDegr
1575 <<
" degrees.\n" <<
endl;
1579 Info<<
"All angles in faces are convex or less than " << maxDeg
1580 <<
" degrees concave.\n" <<
endl;
1589 << nConcave <<
" face points with severe concave angle (> "
1590 << maxDeg <<
" deg) found.\n"
1608 const scalar minTwist,
1618 if (minTwist < -1-SMALL || minTwist > 1+SMALL)
1621 <<
"minTwist should be [-1..1] but is now " << minTwist
1690 label faceI = checkFaces[i];
1692 const face&
f = fcs[faceI];
1700 nf = cellCentres[nei[faceI]] - cellCentres[own[faceI]];
1701 nf /=
mag(nf) + VSMALL;
1707 - cellCentres[own[faceI]];
1708 nf /=
mag(nf) + VSMALL;
1712 nf = faceCentres[faceI] - cellCentres[own[faceI]];
1713 nf /=
mag(nf) + VSMALL;
1718 const point& fc = faceCentres[faceI];
1727 p[
f.nextLabel(fpI)],
1732 scalar magTri =
mag(triArea);
1734 if (magTri > VSMALL && ((nf & triArea/magTri) < minTwist))
1756 Info<<
"There are " << nWarped
1757 <<
" faces with cosine of the angle"
1758 <<
" between triangle normal and face normal less than "
1759 << minTwist <<
nl <<
endl;
1763 Info<<
"All faces are flat in that the cosine of the angle"
1764 <<
" between triangle normal and face normal less than "
1765 << minTwist <<
nl <<
endl;
1774 << nWarped <<
" faces with severe warpage "
1775 <<
"(cosine of the angle between triangle normal and "
1776 <<
"face normal < " << minTwist <<
") found.\n"
1793 const scalar minTwist,
1802 if (minTwist < -1-SMALL || minTwist > 1+SMALL)
1805 <<
"minTwist should be [-1..1] but is now " << minTwist
1815 label faceI = checkFaces[i];
1817 const face&
f = fcs[faceI];
1821 const point& fc = faceCentres[faceI];
1836 scalar magTri =
mag(prevN);
1838 if (magTri > VSMALL)
1863 scalar magTri =
mag(triN);
1865 if (magTri > VSMALL)
1869 if ((prevN & triN) < minTwist)
1883 else if (minTwist > 0)
1895 while (fp != startFp);
1907 Info<<
"There are " << nWarped
1908 <<
" faces with cosine of the angle"
1909 <<
" between consecutive triangle normals less than "
1910 << minTwist <<
nl <<
endl;
1914 Info<<
"All faces are flat in that the cosine of the angle"
1915 <<
" between consecutive triangle normals is less than "
1916 << minTwist <<
nl <<
endl;
1925 << nWarped <<
" faces with severe warpage "
1926 <<
"(cosine of the angle between consecutive triangle normals"
1927 <<
" < " << minTwist <<
") found.\n"
1943 const scalar minFlatness,
1952 if (minFlatness < -SMALL || minFlatness > 1+SMALL)
1955 <<
"minFlatness should be [0..1] but is now " << minFlatness
1965 label faceI = checkFaces[i];
1967 const face&
f = fcs[faceI];
1971 const point& fc = faceCentres[faceI];
1974 scalar sumArea = 0.0;
1986 if (sumArea/
mag(faceAreas[faceI]) < minFlatness)
2004 Info<<
"There are " << nWarped
2005 <<
" faces with area of invidual triangles"
2006 <<
" compared to overall area less than "
2007 << minFlatness <<
nl <<
endl;
2011 Info<<
"All faces are flat in that the area of invidual triangles"
2012 <<
" compared to overall area is less than "
2013 << minFlatness <<
nl <<
endl;
2022 << nWarped <<
" non-flat faces "
2023 <<
"(area of invidual triangles"
2024 <<
" compared to overall area"
2025 <<
" < " << minFlatness <<
") found.\n"
2041 const scalar minArea,
2048 label nZeroArea = 0;
2052 label faceI = checkFaces[i];
2054 if (
mag(faceAreas[faceI]) < minArea)
2071 Info<<
"There are " << nZeroArea
2072 <<
" faces with area < " << minArea <<
'.' <<
nl <<
endl;
2076 Info<<
"All faces have area > " << minArea <<
'.' <<
nl <<
endl;
2085 << nZeroArea <<
" faces with area < " << minArea
2102 const scalar warnDet,
2112 scalar minDet = GREAT;
2113 scalar sumDet = 0.0;
2119 const cell& cFaces =
cells[affectedCells[i]];
2122 scalar magAreaSum = 0;
2126 label faceI = cFaces[cFaceI];
2128 scalar magArea =
mag(faceAreas[faceI]);
2130 magAreaSum += magArea;
2131 areaSum += faceAreas[faceI]*(faceAreas[faceI]/(magArea+VSMALL));
2134 scalar scaledDet =
det(areaSum/(magAreaSum+VSMALL))/0.037037037037037;
2136 minDet =
min(minDet, scaledDet);
2137 sumDet += scaledDet;
2140 if (scaledDet < warnDet)
2147 label faceI = cFaces[cFaceI];
2164 Info<<
"Cell determinant (1 = uniform cube) : average = "
2165 << sumDet / nSumDet <<
" min = " << minDet <<
endl;
2170 Info<<
"There are " << nWarnDet
2171 <<
" cells with determinant < " << warnDet <<
'.' <<
nl
2176 Info<<
"All faces have determinant > " << warnDet <<
'.' <<
nl
2186 << nWarnDet <<
" cells with determinant < " << warnDet
2203 const scalar orthWarn,
2226 const scalar minPyrVol,
2250 const scalar minTetQuality,
2257 return checkFaceTets
2301 const scalar warnWeight,
2307 return checkFaceWeights
2325 const scalar warnRatio,
2331 return checkVolRatio
2347 const scalar maxDeg,
2369 const scalar minTwist,
2375 return checkFaceTwist
2393 const scalar minTwist,
2399 return checkTriangleTwist
2416 const scalar minFlatness,
2439 const scalar minArea,
2444 return checkFaceArea
2459 const scalar warnDet,
2465 return checkCellDeterminant
static bool checkFaceDotProduct(const bool report, const scalar orthWarn, const polyMesh &, const vectorField &cellCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
See primitiveMesh.
Templated 3D tensor derived from VectorSpace adding construction from 9 components,...
const point & max() const
Maximum describing the bounding box.
List< Key > toc() const
Return the table of contents.
#define forAll(list, i)
Loop across all elements in list.
dimensionedScalar sin(const dimensionedScalar &ds)
void updateCellCentresAndVols(const labelList &changedCells, const labelList &changedFaces)
Update cell volumes and centres on selected cells. Requires.
static bool checkFaceWeights(const bool report, const scalar warnWeight, const polyMesh &mesh, const vectorField &cellCentres, const vectorField &faceCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Interpolation weights (0.5 for regular mesh)
const cellList & cells() const
Unit conversion functions.
static scalar checkNonOrtho(const polyMesh &mesh, const bool report, const scalar severeNonorthogonalityThreshold, const label faceI, const vector &s, const vector &d, label &severeNonOrth, label &errorNonOrth, labelHashSet *setPtr)
Detect&report non-ortho error for single face.
void correct()
Take over properties from mesh.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static bool checkFaceTets(const bool report, const scalar minPyrVol, const polyMesh &, const vectorField &cellCentres, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *)
See primitiveMesh.
polyMeshGeometry(const polyMesh &)
Construct from mesh.
dimensioned< scalar > mag(const dimensioned< Type > &)
static bool checkFaceTet(const polyMesh &, const bool report, const scalar minTetQuality, const pointField &p, const label faceI, const point &fc, const point &cc, labelHashSet *setPtr)
Detect&report incorrect face-triangle orientation.
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.
Mesh consisting of general polyhedral cells.
static bool checkFaceSkewness(const bool report, const scalar internalSkew, const scalar boundarySkew, const polyMesh &mesh, const pointField &points, const vectorField &cellCentres, const vectorField &faceCentres, const vectorField &faceAreas, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
See primitiveMesh.
static label findSharedBasePoint(const polyMesh &mesh, label fI, const point &nCc, scalar tol, bool report=false)
Find the first suitable base point to use for a minimum.
bool checkFaceAngles(const polyMeshGen &, const bool report=false, const scalar maxDeg=10, labelHashSet *setPtr=NULL, const boolList *changedFacePtr=NULL)
Check face angles.
A triangle primitive used to calculate face normals and swept volumes.
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
static label findBasePoint(const polyMesh &mesh, label fI, scalar tol, bool report=false)
Find the base point to use for a minimum triangle.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
static labelList affectedCells(const polyMesh &, const labelList &changedFaces)
Helper function: get affected cells from faces.
static bool checkFaceArea(const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
Small faces.
Pre-declare SubField and related Field type.
vector normal() const
Return vector normal.
virtual const labelList & faceOwner() const
Return face owner.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
void checkFaceDotProduct(const polyMeshGen &, scalarField &, const boolList *changedFacePtr=NULL)
Check for non-orthogonality.
void updateFaceCentresAndAreas(const pointField &p, const labelList &changedFaces)
Update face areas and centres on selected faces.
const point & min() const
Minimum describing the bounding box.
label nInternalFaces() const
tetrahedron< point, const point & > tetPointRef
errorManip< error > abort(error &err)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static bool checkFaceTwist(const bool report, const scalar minTwist, const polyMesh &, const vectorField &cellCentres, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Triangle (from face-centre decomposition) normal v.s.
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 bool checkFaceFlatness(const bool report, const scalar minFlatness, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Area of faces v.s. sum of triangle areas.
virtual const faceList & faces() const
Return raw faces.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
prefixOSstream Pout(cout, "Pout")
bool contains(const point &) const
Contains point? (inside or on edge)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
dimensionedScalar acos(const dimensionedScalar &ds)
bool insert(const Key &key)
Insert a new entry.
scalar radToDeg(const scalar rad)
Conversion from radians to degrees.
A bounding box defined in terms of the points at its extremities.
const dimensionedScalar c
Speed of light in a vacuum.
A List with indirect addressing.
A face is a list of labels corresponding to mesh vertices.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
static bool checkFacePyramids(const bool report, const scalar minPyrVol, const polyMesh &, const vectorField &cellCentres, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *)
See primitiveMesh.
void size(const label)
Override size to be inconsistent with allocated storage.
static bool checkCellDeterminant(const bool report, const scalar minDet, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, const labelList &affectedCells, labelHashSet *setPtr)
Area of internal faces v.s. boundary faces.
defineTypeNameAndDebug(combustionModel, 0)
static bool checkTriangleTwist(const bool report, const scalar minTwist, const polyMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
Consecutive triangle (from face-centre decomposition) normals.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
pyramid< point, const point &, const face & > pyramidPointFaceRef
#define WarningInFunction
Report a warning using Foam::Warning.
A cell is defined as a list of faces with extra functionality.
dimensionedScalar asin(const dimensionedScalar &ds)
virtual const labelList & faceNeighbour() const
Return face neighbour.
static bool checkVolRatio(const bool report, const scalar warnRatio, const polyMesh &mesh, const scalarField &cellVolumes, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr)
Cell volume ratio of neighbouring cells (1 for regular mesh)
triangle< point, const point & > triPointRef
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
dimensionedScalar cos(const dimensionedScalar &ds)
static bool checkFaceAngles(const bool report, const scalar maxDeg, const polyMesh &mesh, const vectorField &faceAreas, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
See primitiveMesh.