42 void Foam::polyMeshGeometry::updateFaceCentresAndAreas
52 label facei = changedFaces[i];
55 label nPoints = f.size();
61 faceCentres_[facei] = (1.0/3.0)*(p[f[0]] + p[f[1]] + p[f[2]]);
62 faceAreas_[facei] = 0.5*((p[f[1]] - p[f[0]])^(p[f[2]] - p[f[0]]));
70 point fCentre = p[f[0]];
80 const point& nextPoint = p[f[(
pi + 1) % nPoints]];
82 vector c = p[f[
pi]] + nextPoint + fCentre;
83 vector n = (nextPoint - p[f[
pi]])^(fCentre - p[f[
pi]]);
91 faceCentres_[facei] = (1.0/3.0)*sumAc/(sumA + VSMALL);
92 faceAreas_[facei] = 0.5*sumN;
98 void Foam::polyMeshGeometry::updateCellCentresAndVols
105 UIndirectList<vector>(cellCentres_, changedCells) =
Zero;
106 UIndirectList<scalar>(cellVolumes_, changedCells) = 0.0;
108 const labelList& own = mesh_.faceOwner();
109 const labelList& nei = mesh_.faceNeighbour();
114 UIndirectList<vector>(cEst, changedCells) =
Zero;
116 UIndirectList<scalar>(nCellFaces, changedCells) = 0.0;
120 label facei = changedFaces[i];
121 cEst[own[facei]] += faceCentres_[facei];
122 nCellFaces[own[facei]] += 1;
124 if (mesh_.isInternalFace(facei))
126 cEst[nei[facei]] += faceCentres_[facei];
127 nCellFaces[nei[facei]] += 1;
133 label celli = changedCells[i];
134 cEst[celli] /= nCellFaces[celli];
139 label facei = changedFaces[i];
144 faceAreas_[facei] & (faceCentres_[facei] - cEst[own[facei]]),
149 vector pc = (3.0/4.0)*faceCentres_[facei] + (1.0/4.0)*cEst[own[facei]];
152 cellCentres_[own[facei]] += pyr3Vol*pc;
155 cellVolumes_[own[facei]] += pyr3Vol;
157 if (mesh_.isInternalFace(facei))
162 faceAreas_[facei] & (cEst[nei[facei]] - faceCentres_[facei]),
168 (3.0/4.0)*faceCentres_[facei]
169 + (1.0/4.0)*cEst[nei[facei]];
172 cellCentres_[nei[facei]] += pyr3Vol*pc;
175 cellVolumes_[nei[facei]] += pyr3Vol;
181 label celli = changedCells[i];
183 cellCentres_[celli] /= cellVolumes_[celli] + VSMALL;
184 cellVolumes_[celli] *= (1.0/3.0);
202 label facei = changedFaces[i];
204 affectedCells.insert(own[facei]);
208 affectedCells.insert(nei[facei]);
211 return affectedCells.toc();
215 Foam::scalar Foam::polyMeshGeometry::checkNonOrtho
219 const scalar severeNonorthogonalityThreshold,
224 label& severeNonOrth,
229 scalar dDotS = (d &
s)/(
mag(d)*
mag(s) + VSMALL);
231 if (dDotS < severeNonorthogonalityThreshold)
245 Pout<<
"Severe non-orthogonality for face " << facei
246 <<
" between cells " << mesh.
faceOwner()[facei]
261 <<
"Severe non-orthogonality detected for face " 263 <<
" between cells " << mesh.
faceOwner()[facei]
283 bool Foam::polyMeshGeometry::checkFaceTet
287 const scalar minTetQuality,
308 if (tetQual < minTetQuality)
312 Pout<<
"bool polyMeshGeometry::checkFaceTets(" 313 <<
"const bool, const scalar, const pointField&" 314 <<
", const pointField&" 315 <<
", const labelList&, labelHashSet*) : " 317 <<
" has a triangle that points the wrong way." 319 <<
"Tet quality: " << tetQual
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)
445 if (patches[patchi].coupled())
447 scalar dDotS = checkNonOrtho
451 severeNonorthogonalityThreshold,
461 if (dDotS < minDDotS)
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: " 595 << mesh.
cells()[own[facei]].labels(f)
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: " 626 << mesh.
cells()[nei[facei]].labels(f)
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: " 666 << mesh.
cells()[own[face0]].labels(f)
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: " 695 << mesh.
cells()[own[face1]].labels(f)
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]],
830 if (patches[patchi].coupled())
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);
1031 else if (patches[patches.
whichPatch(facei)].coupled())
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);
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);
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);
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;
1520 vector e10(p[f[fp1]] - p[f[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;
1703 else if (patches[patches.
whichPatch(facei)].coupled())
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];
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,
2301 const scalar warnWeight,
2325 const scalar warnRatio,
2347 const scalar maxDeg,
2369 const scalar minTwist,
2393 const scalar minTwist,
2416 const scalar minFlatness,
2439 const scalar minArea,
2459 const scalar warnDet,
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 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.
dimensionedScalar acos(const dimensionedScalar &ds)
#define forAll(list, i)
Loop across all elements in list.
A triangle primitive used to calculate face normals and swept volumes.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
scalar radToDeg(const scalar rad)
Conversion from radians to degrees.
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.
A face is a list of labels corresponding to mesh vertices.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
tetrahedron< point, const point & > tetPointRef
const vectorField & faceAreas() const
Unit conversion functions.
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.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Vector< scalar > vector
A scalar version of the templated Vector.
dimensionedScalar det(const dimensionedSphericalTensor &dt)
const vectorField & faceCentres() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
bool insert(const Key &key)
Insert a new entry.
T & first()
Return the first element of the list.
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)
const cellList & cells() const
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
dimensionedScalar asin(const dimensionedScalar &ds)
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.
scalar degToRad(const scalar deg)
Conversion from degrees to radians.
static label findBasePoint(const polyMesh &mesh, label fI, scalar tol, bool report=false)
Find the base point to use for a minimum triangle.
#define SeriousErrorInFunction
Report an error message using Foam::SeriousError.
label fcIndex(const label i) const
Return the forward circular index, i.e. the next index.
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))
vectorField pointField
pointField is a vectorField.
dimensionedScalar cos(const dimensionedScalar &ds)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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.
const vectorField & cellCentres() const
List< label > labelList
A List of labels.
pyramid< point, const point &, const face & > pyramidPointFaceRef
errorManip< error > abort(error &err)
prefixOSstream Pout(cout,"Pout")
dimensionedScalar sin(const dimensionedScalar &ds)
static bool checkFaceArea(const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
Small faces.
defineTypeNameAndDebug(combustionModel, 0)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
const scalarField & cellVolumes() const
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
A normal distribution model.
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.
virtual const labelList & faceNeighbour() const
Return face neighbour.
vector point
Point is a vector.
#define WarningInFunction
Report a warning using Foam::Warning.
A cell is defined as a list of faces with extra functionality.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
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.
const dimensionedScalar c
Speed of light in a vacuum.
triangle< point, const point & > triPointRef
void correct()
Take over properties from mesh.
static labelList affectedCells(const polyMesh &, const labelList &changedFaces)
Helper function: get affected cells from faces.
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)
dimensioned< scalar > mag(const dimensioned< Type > &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
label nextLabel(const label i) const
Next vertex on face.
Mesh consisting of general polyhedral cells.
static const Vector< scalar > zero
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.
virtual const labelList & faceOwner() const
Return face owner.
T & last()
Return the last element of the list.
virtual const faceList & faces() const
Return raw faces.
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.
label nInternalFaces() const
polyMeshGeometry(const polyMesh &)
Construct from mesh.