47void Foam::polyMeshGeometry::updateFaceCentresAndAreas
50 const labelList& changedFaces
55 for (
const label facei : changedFaces)
57 const face&
f = fcs[facei];
64 faceCentres_[facei] = (1.0/3.0)*(
p[
f[0]] +
p[
f[1]] +
p[
f[2]]);
65 faceAreas_[facei] = 0.5*((
p[
f[1]] -
p[
f[0]])^(
p[
f[2]] -
p[
f[0]]));
70 solveScalar sumA =
Zero;
86 solveVector n = (nextPoint - thisPoint)^(fCentre - thisPoint);
87 solveScalar a =
mag(
n);
94 if (sumA < ROOTVSMALL)
96 faceCentres_[facei] = fCentre;
97 faceAreas_[facei] =
Zero;
101 faceCentres_[facei] = (1.0/3.0)*sumAc/sumA;
102 faceAreas_[facei] = 0.5*sumN;
109void Foam::polyMeshGeometry::updateCellCentresAndVols
119 UIndirectList<vector>(cellCentres_, changedCells) =
Zero;
120 UIndirectList<scalar>(cellVolumes_, changedCells) =
Zero;
124 for (
const label celli : changedCells)
132 for (
const label facei : cFaces)
134 const point& fc = faceCentres_[facei];
138 cEst /= cFaces.
size();
142 for (
const label facei : cFaces)
145 scalar pyr3Vol = faceAreas_[facei] & (faceCentres_[facei] - cEst);
147 if (own[facei] != celli)
153 cellVolumes_[celli] += pyr3Vol;
156 const vector pCtr = (3.0/4.0)*faceCentres_[facei] + (1.0/4.0)*cEst;
159 cellCentres_[celli] += pyr3Vol*pCtr;
164 if (
mag(cellVolumes_[celli]) > VSMALL)
166 point cc = cellCentres_[celli] / cellVolumes_[celli];
173 cellCentres_[celli] = cc;
177 cellCentres_[celli] = cEst;
182 cellCentres_[celli] = cEst;
185 cellVolumes_[celli] *= (1.0/3.0);
201 for (
const label facei : changedFaces)
203 affectedCells.
insert(own[facei]);
207 affectedCells.
insert(nei[facei]);
210 return affectedCells.
toc();
214Foam::scalar Foam::polyMeshGeometry::checkNonOrtho
218 const scalar severeNonorthogonalityThreshold,
223 label& severeNonOrth,
228 scalar dDotS = (d &
s)/(
mag(d)*
mag(
s) + VSMALL);
230 if (dDotS < severeNonorthogonalityThreshold)
244 Pout<<
"Severe non-orthogonality for face " << facei
260 <<
"Severe non-orthogonality detected for face "
282bool Foam::polyMeshGeometry::checkFaceTet
284 const polyMesh&
mesh,
286 const scalar minTetQuality,
307 if (tetQual < minTetQuality)
311 Pout<<
"bool polyMeshGeometry::checkFaceTets("
312 <<
"const bool, const scalar, const pointField&"
313 <<
", const pointField&"
314 <<
", const labelList&, labelHashSet*) : "
316 <<
" has a triangle that points the wrong way." <<
nl
317 <<
"Tet quality: " << tetQual
323 setPtr->insert(facei);
347 faceAreas_ = mesh_.faceAreas();
348 faceCentres_ = mesh_.faceCentres();
349 cellCentres_ = mesh_.cellCentres();
350 cellVolumes_ = mesh_.cellVolumes();
361 updateFaceCentresAndAreas(
p, changedFaces);
363 updateCellCentresAndVols(affectedCells(mesh_, changedFaces), changedFaces);
370 const scalar orthWarn,
387 const scalar severeNonorthogonalityThreshold =
::cos(
degToRad(orthWarn));
399 scalar minDDotS = GREAT;
404 label severeNonOrth = 0;
406 label errorNonOrth = 0;
408 for (
const label facei : checkFaces)
410 const point& ownCc = cellCentres[own[facei]];
414 scalar dDotS = checkNonOrtho
418 severeNonorthogonalityThreshold,
421 cellCentres[nei[facei]] - ownCc,
428 if (dDotS < minDDotS)
442 scalar dDotS = checkNonOrtho
446 severeNonorthogonalityThreshold,
456 if (dDotS < minDDotS)
469 const label face0 = baffle.first();
470 const label face1 = baffle.second();
472 const point& ownCc = cellCentres[own[face0]];
474 scalar dDotS = checkNonOrtho
478 severeNonorthogonalityThreshold,
481 cellCentres[own[face1]] - ownCc,
488 if (dDotS < minDDotS)
506 if (report && minDDotS < severeNonorthogonalityThreshold)
508 Info<<
"Number of non-orthogonality errors: " << errorNonOrth
509 <<
". Number of severely non-orthogonal faces: "
510 << severeNonOrth <<
"." <<
endl;
518 Info<<
"Mesh non-orthogonality Max: "
525 if (errorNonOrth > 0)
530 <<
"Error in non-orthogonality detected" <<
endl;
538 Info<<
"Non-orthogonality check OK.\n" <<
endl;
548 const scalar minPyrVol,
563 label nErrorPyrs = 0;
565 for (
const label facei : checkFaces)
571 cellCentres[own[facei]]
574 if (pyrVol > -minPyrVol)
580 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
581 <<
"const bool, const scalar, const pointField&"
582 <<
", const labelList&, labelHashSet*): "
583 <<
"face " << facei <<
" points the wrong way. " <<
endl
584 <<
"Pyramid volume: " << -pyrVol
585 <<
" Face " <<
f[facei] <<
" area: " <<
f[facei].mag(
p)
586 <<
" Owner cell: " << own[facei] <<
endl
587 <<
"Owner cell vertex labels: "
603 if (pyrVol < minPyrVol)
609 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
610 <<
"const bool, const scalar, const pointField&"
611 <<
", const labelList&, labelHashSet*): "
612 <<
"face " << facei <<
" points the wrong way. " <<
endl
613 <<
"Pyramid volume: " << -pyrVol
614 <<
" Face " <<
f[facei] <<
" area: " <<
f[facei].mag(
p)
615 <<
" Neighbour cell: " << nei[facei] <<
endl
616 <<
"Neighbour cell vertex labels: "
630 const label face0 = baffle.first();
631 const label face1 = baffle.second();
633 const point& ownCc = cellCentres[own[face0]];
642 if (pyrVolOwn > -minPyrVol)
648 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
649 <<
"const bool, const scalar, const pointField&"
650 <<
", const labelList&, labelHashSet*): "
651 <<
"face " << face0 <<
" points the wrong way. " <<
endl
652 <<
"Pyramid volume: " << -pyrVolOwn
653 <<
" Face " <<
f[face0] <<
" area: " <<
f[face0].mag(
p)
654 <<
" Owner cell: " << own[face0] <<
endl
655 <<
"Owner cell vertex labels: "
669 if (pyrVolNbr < minPyrVol)
675 Pout<<
"bool polyMeshGeometry::checkFacePyramids("
676 <<
"const bool, const scalar, const pointField&"
677 <<
", const labelList&, labelHashSet*): "
678 <<
"face " << face0 <<
" points the wrong way. " <<
endl
679 <<
"Pyramid volume: " << -pyrVolNbr
680 <<
" Face " <<
f[face0] <<
" area: " <<
f[face0].mag(
p)
681 <<
" Neighbour cell: " << own[face1] <<
endl
682 <<
"Neighbour cell vertex labels: "
700 <<
"Error in face pyramids: faces pointing the wrong way."
709 Info<<
"Face pyramids OK.\n" <<
endl;
719 const scalar minTetQuality,
745 label nErrorTets = 0;
747 for (
const label facei : checkFaces)
751 bool tetError = checkFaceTet
758 cellCentres[own[facei]],
771 bool tetError = checkFaceTet
779 cellCentres[nei[facei]],
856 const label face0 = baffle.first();
857 const label face1 = baffle.second();
859 bool tetError = checkFaceTet
866 cellCentres[own[face0]],
877 tetError = checkFaceTet
885 cellCentres[own[face1]],
900 cellCentres[own[face1]],
921 <<
"Error in face decomposition: negative tets."
940 const scalar internalSkew,
941 const scalar boundarySkew,
968 for (
const label facei : checkFaces)
980 cellCentres[own[facei]],
981 cellCentres[nei[facei]]
987 if (skewness > internalSkew)
993 Pout<<
"Severe skewness for face " << facei
994 <<
" skewness = " << skewness <<
endl;
1002 maxSkew =
max(maxSkew, skewness);
1014 cellCentres[own[facei]],
1021 if (skewness > internalSkew)
1027 Pout<<
"Severe skewness for coupled face " << facei
1028 <<
" skewness = " << skewness <<
endl;
1036 maxSkew =
max(maxSkew, skewness);
1048 cellCentres[own[facei]]
1055 if (skewness > boundarySkew)
1061 Pout<<
"Severe skewness for boundary face " << facei
1062 <<
" skewness = " << skewness <<
endl;
1070 maxSkew =
max(maxSkew, skewness);
1076 const label face0 = baffle.first();
1077 const label face1 = baffle.second();
1079 const point& ownCc = cellCentres[own[face0]];
1080 const point& neiCc = cellCentres[own[face1]];
1097 if (skewness > internalSkew)
1103 Pout<<
"Severe skewness for face " << face0
1104 <<
" skewness = " << skewness <<
endl;
1112 maxSkew =
max(maxSkew, skewness);
1125 <<
" percent.\nThis may impair the quality of the result." <<
nl
1126 << nWarnSkew <<
" highly skew faces detected."
1135 Info<<
"Max skewness = " << 100*maxSkew
1136 <<
" percent. Face skewness OK.\n" <<
endl;
1146 const scalar warnWeight,
1172 scalar minWeight = GREAT;
1174 label nWarnWeight = 0;
1176 for (
const label facei : checkFaces)
1178 const point& fc = faceCentres[facei];
1179 const vector& fa = faceAreas[facei];
1181 scalar dOwn =
mag(fa & (fc-cellCentres[own[facei]]));
1185 scalar dNei =
mag(fa & (cellCentres[nei[facei]]-fc));
1186 scalar weight =
min(dNei,dOwn)/(dNei+dOwn+VSMALL);
1188 if (weight < warnWeight)
1194 Pout<<
"Small weighting factor for face " << facei
1195 <<
" weight = " << weight <<
endl;
1203 minWeight =
min(minWeight, weight);
1212 scalar weight =
min(dNei,dOwn)/(dNei+dOwn+VSMALL);
1214 if (weight < warnWeight)
1220 Pout<<
"Small weighting factor for face " << facei
1221 <<
" weight = " << weight <<
endl;
1229 minWeight =
min(minWeight, weight);
1236 const label face0 = baffle.first();
1237 const label face1 = baffle.second();
1239 const point& ownCc = cellCentres[own[face0]];
1240 const point& fc = faceCentres[face0];
1241 const vector& fa = faceAreas[face0];
1243 scalar dOwn =
mag(fa & (fc-ownCc));
1244 scalar dNei =
mag(fa & (cellCentres[own[face1]]-fc));
1245 scalar weight =
min(dNei,dOwn)/(dNei+dOwn+VSMALL);
1247 if (weight < warnWeight)
1253 Pout<<
"Small weighting factor for face " << face0
1254 <<
" weight = " << weight <<
endl;
1262 minWeight =
min(minWeight, weight);
1268 if (minWeight < warnWeight)
1273 << minWeight <<
'.' <<
nl
1274 << nWarnWeight <<
" faces with small weights detected."
1283 Info<<
"Min weight = " << minWeight
1284 <<
". Weights OK.\n" <<
endl;
1294 const scalar warnRatio,
1318 scalar minRatio = GREAT;
1320 label nWarnRatio = 0;
1322 for (
const label facei : checkFaces)
1324 scalar ownVol =
mag(cellVolumes[own[facei]]);
1326 scalar neiVol = -GREAT;
1330 neiVol =
mag(cellVolumes[nei[facei]]);
1344 scalar ratio =
min(ownVol, neiVol) / (
max(ownVol, neiVol) + VSMALL);
1346 if (ratio < warnRatio)
1352 Pout<<
"Small ratio for face " << facei
1353 <<
" ratio = " << ratio <<
endl;
1361 minRatio =
min(minRatio, ratio);
1367 const label face0 = baffle.first();
1368 const label face1 = baffle.second();
1370 scalar ownVol =
mag(cellVolumes[own[face0]]);
1372 scalar neiVol =
mag(cellVolumes[own[face1]]);
1376 scalar ratio =
min(ownVol, neiVol) / (
max(ownVol, neiVol) + VSMALL);
1378 if (ratio < warnRatio)
1384 Pout<<
"Small ratio for face " << face0
1385 <<
" ratio = " << ratio <<
endl;
1393 minRatio =
min(minRatio, ratio);
1400 if (minRatio < warnRatio)
1405 << minRatio <<
'.' <<
nl
1406 << nWarnRatio <<
" faces with small ratios detected."
1415 Info<<
"Min ratio = " << minRatio
1416 <<
". Ratios OK.\n" <<
endl;
1430 const scalar maxDeg,
1438 if (maxDeg < -SMALL || maxDeg > 180+SMALL)
1441 <<
"maxDeg should be [0..180] but is now " << maxDeg
1449 scalar maxEdgeSin = 0.0;
1453 label errorFacei = -1;
1455 for (
const label facei : checkFaces)
1457 const face&
f = fcs[facei];
1463 scalar magEPrev =
mag(ePrev);
1464 ePrev /= magEPrev + VSMALL;
1469 vector e10(
p[
f.nextLabel(fp0)] -
p[
f.thisLabel(fp0)]);
1470 scalar magE10 =
mag(e10);
1471 e10 /= magE10 + VSMALL;
1473 if (magEPrev > SMALL && magE10 > SMALL)
1475 vector edgeNormal = ePrev ^ e10;
1476 scalar magEdgeNormal =
mag(edgeNormal);
1478 if (magEdgeNormal < maxSin)
1485 edgeNormal /= magEdgeNormal;
1487 if ((edgeNormal & faceNormal) < SMALL)
1489 if (facei != errorFacei)
1496 maxEdgeSin =
max(maxEdgeSin, magEdgeNormal);
1516 if (maxEdgeSin > SMALL)
1518 scalar maxConcaveDegr =
1521 Info<<
"There are " << nConcave
1522 <<
" faces with concave angles between consecutive"
1523 <<
" edges. Max concave angle = " << maxConcaveDegr
1524 <<
" degrees.\n" <<
endl;
1528 Info<<
"All angles in faces are convex or less than " << maxDeg
1529 <<
" degrees concave.\n" <<
endl;
1538 << nConcave <<
" face points with severe concave angle (> "
1539 << maxDeg <<
" deg) found.\n"
1555 const scalar minTwist,
1565 if (minTwist < -1-SMALL || minTwist > 1+SMALL)
1568 <<
"minTwist should be [-1..1] but is now " << minTwist
1590 for (
const label facei : checkFaces)
1592 const face&
f = fcs[facei];
1603 cellCentres[nei[facei]]
1604 - cellCentres[own[facei]]
1613 - cellCentres[own[facei]]
1622 - cellCentres[own[facei]]
1628 const point& fc = faceCentres[facei];
1637 p[
f.nextLabel(fpI)],
1642 scalar magTri =
mag(triArea);
1644 if (magTri > VSMALL && ((nf & triArea/magTri) < minTwist))
1666 Info<<
"There are " << nWarped
1667 <<
" faces with cosine of the angle"
1668 <<
" between triangle normal and face normal less than "
1669 << minTwist <<
nl <<
endl;
1673 Info<<
"All faces are flat in that the cosine of the angle"
1674 <<
" between triangle normal and face normal less than "
1675 << minTwist <<
nl <<
endl;
1684 << nWarped <<
" faces with severe warpage "
1685 <<
"(cosine of the angle between triangle normal and "
1686 <<
"face normal < " << minTwist <<
") found.\n"
1701 const scalar minTwist,
1710 if (minTwist < -1-SMALL || minTwist > 1+SMALL)
1713 <<
"minTwist should be [-1..1] but is now " << minTwist
1721 for (
const label facei : checkFaces)
1723 const face&
f = fcs[facei];
1727 const point& fc = faceCentres[facei];
1742 scalar magTri =
mag(prevN);
1744 if (magTri > VSMALL)
1769 scalar magTri =
mag(triN);
1771 if (magTri > VSMALL)
1775 if ((prevN & triN) < minTwist)
1789 else if (minTwist > 0)
1801 while (fp != startFp);
1813 Info<<
"There are " << nWarped
1814 <<
" faces with cosine of the angle"
1815 <<
" between consecutive triangle normals less than "
1816 << minTwist <<
nl <<
endl;
1820 Info<<
"All faces are flat in that the cosine of the angle"
1821 <<
" between consecutive triangle normals is less than "
1822 << minTwist <<
nl <<
endl;
1831 << nWarped <<
" faces with severe warpage "
1832 <<
"(cosine of the angle between consecutive triangle normals"
1833 <<
" < " << minTwist <<
") found.\n"
1847 const scalar minFlatness,
1856 if (minFlatness < -SMALL || minFlatness > 1+SMALL)
1859 <<
"minFlatness should be [0..1] but is now " << minFlatness
1867 for (
const label facei : checkFaces)
1869 const face&
f = fcs[facei];
1873 const point& fc = faceCentres[facei];
1876 scalar sumArea = 0.0;
1888 if (sumArea/
mag(faceAreas[facei]) < minFlatness)
1905 Info<<
"There are " << nWarped
1906 <<
" faces with area of individual triangles"
1907 <<
" compared to overall area less than "
1908 << minFlatness <<
nl <<
endl;
1912 Info<<
"All faces are flat in that the area of individual triangles"
1913 <<
" compared to overall area is less than "
1914 << minFlatness <<
nl <<
endl;
1923 << nWarped <<
" non-flat faces "
1924 <<
"(area of individual triangles"
1925 <<
" compared to overall area"
1926 <<
" < " << minFlatness <<
") found.\n"
1940 const scalar minArea,
1947 label nZeroArea = 0;
1949 for (
const label facei : checkFaces)
1951 if (
mag(faceAreas[facei]) < minArea)
1968 Info<<
"There are " << nZeroArea
1969 <<
" faces with area < " << minArea <<
'.' <<
nl <<
endl;
1973 Info<<
"All faces have area > " << minArea <<
'.' <<
nl <<
endl;
1982 << nZeroArea <<
" faces with area < " << minArea
1997 const scalar warnDet,
2007 scalar minDet = GREAT;
2008 scalar sumDet = 0.0;
2012 for (
const label celli : affectedCells)
2017 scalar magAreaSum = 0;
2019 for (
const label facei : cFaces)
2021 scalar magArea =
mag(faceAreas[facei]);
2023 magAreaSum += magArea;
2024 areaSum += faceAreas[facei]*(faceAreas[facei]/(magArea+VSMALL));
2027 scalar scaledDet =
det(areaSum/(magAreaSum+VSMALL))/0.037037037037037;
2029 minDet =
min(minDet, scaledDet);
2030 sumDet += scaledDet;
2033 if (scaledDet < warnDet)
2052 Info<<
"Cell determinant (1 = uniform cube) : average = "
2053 << sumDet / nSumDet <<
" min = " << minDet <<
endl;
2058 Info<<
"There are " << nWarnDet
2059 <<
" cells with determinant < " << warnDet <<
'.' <<
nl
2064 Info<<
"All faces have determinant > " << warnDet <<
'.' <<
nl
2074 << nWarnDet <<
" cells with determinant < " << warnDet
2089 const scalar orthWarn,
2095 return checkFaceDotProduct
2112 const scalar minPyrVol,
2119 return checkFacePyramids
2136 const scalar minTetQuality,
2143 return checkFaceTets
2187 const scalar warnWeight,
2193 return checkFaceWeights
2211 const scalar warnRatio,
2217 return checkVolRatio
2233 const scalar maxDeg,
2239 return checkFaceAngles
2255 const scalar minTwist,
2261 return checkFaceTwist
2279 const scalar minTwist,
2285 return checkTriangleTwist
2302 const scalar minFlatness,
2308 return checkFaceFlatness
2325 const scalar minArea,
2330 return checkFaceArea
2345 const scalar warnDet,
2351 return checkCellDeterminant
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
List< Key > toc() const
The table of contents (the keys) in unsorted order.
T & first()
Return the first element of the list.
void size(const label n)
Older name for setAddressableSize.
T & last()
Return the last element of the list.
label fcIndex(const label i) const noexcept
static constexpr direction size() noexcept
The number of elements in the VectorSpace = Ncmpts.
static const boundBox invertedBox
A large inverted boundBox: min/max == +/- ROOTVGREAT.
tmp< scalarField > faceSkewness() const
Return face skewness.
A cell is defined as a list of faces with extra functionality.
A face is a list of labels corresponding to mesh vertices.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Updateable mesh geometry and checking routines.
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.
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.
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.
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.
void correct()
Take over properties from mesh.
static bool checkFaceArea(const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
Small faces.
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.
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.
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)
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)
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.
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.
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.
static labelList affectedCells(const polyMesh &, const labelList &changedFaces)
Helper function: get affected cells from faces.
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.
static label findBasePoint(const polyMesh &mesh, label fI, scalar tol, bool report=false)
Find the base point to use for a minimum triangle.
Mesh consisting of general polyhedral cells.
virtual const faceList & faces() const
Return raw faces.
virtual const labelList & faceOwner() const
Return face owner.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
virtual const labelList & faceNeighbour() const
Return face neighbour.
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
label nInternalFaces() const noexcept
Number of internal faces.
label nFaces() const noexcept
Number of mesh faces.
const cellList & cells() const
A triangle primitive used to calculate face normals and swept volumes.
vector areaNormal() const
The area normal - with magnitude equal to area of triangle.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
bool coupled(solutionDict.getOrDefault("coupledEnergyField", false))
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
#define WarningInFunction
Report a warning using Foam::Warning.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
constexpr scalar pi(M_PI)
const dimensionedScalar c
Speed of light in a vacuum.
pyramid< point, const point &, const face & > pyramidPointFaceRef
A pyramid using referred points and faces.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
tetrahedron< point, const point & > tetPointRef
A tetrahedron using referred points.
dimensionedScalar asin(const dimensionedScalar &ds)
List< label > labelList
A List of labels.
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
List< cell > cellList
A List of cells.
dimensionedScalar sin(const dimensionedScalar &ds)
messageStream Info
Information stream (stdout output on master, null elsewhere)
vectorField pointField
pointField is a vectorField.
vector point
Point is a vector.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
constexpr scalar radToDeg() noexcept
Multiplication factor for radians to degrees conversion.
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
triangle< point, const point & > triPointRef
A triangle using referred points.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
List< face > faceList
A List of faces.
Vector< solveScalar > solveVector
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
A non-counting (dummy) refCount.
Unit conversion functions.