Updateable mesh geometry and checking routines. More...
#include <polyMeshGeometry.H>
Public Member Functions | |
| ClassName ("polyMeshGeometry") | |
| polyMeshGeometry (const polyMesh &) | |
| Construct from mesh. | |
| const polyMesh & | mesh () const |
| const vectorField & | faceAreas () const |
| const vectorField & | faceCentres () const |
| const vectorField & | cellCentres () const |
| const scalarField & | cellVolumes () const |
| void | correct () |
| Take over properties from mesh. | |
| void | correct (const pointField &p, const labelList &changedFaces) |
| Recalculate on selected faces. Recalculates cell properties. | |
| bool | checkFaceDotProduct (const bool report, const scalar orthWarn, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr) const |
| bool | checkFacePyramids (const bool report, const scalar minPyrVol, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr) const |
| bool | checkFaceTets (const bool report, const scalar minTetQuality, const pointField &p, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr) const |
| bool | checkFaceWeights (const bool report, const scalar warnWeight, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr) const |
| bool | checkVolRatio (const bool report, const scalar warnRatio, const labelList &checkFaces, const List< labelPair > &baffles, labelHashSet *setPtr) const |
| bool | checkFaceAngles (const bool report, const scalar maxDeg, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr) const |
| bool | checkFaceTwist (const bool report, const scalar minTwist, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr) const |
| bool | checkTriangleTwist (const bool report, const scalar minTwist, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr) const |
| bool | checkFaceFlatness (const bool report, const scalar minFlatness, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr) const |
| bool | checkFaceArea (const bool report, const scalar minArea, const labelList &checkFaces, labelHashSet *setPtr) const |
| bool | checkCellDeterminant (const bool report, const scalar warnDet, const labelList &checkFaces, const labelList &affectedCells, labelHashSet *setPtr) const |
| bool | checkEdgeLength (const bool report, const scalar minEdgeLength, const labelList &checkFaces, labelHashSet *pointSetPtr) const |
Static Public Member Functions | |
| static labelList | affectedCells (const polyMesh &, const labelList &changedFaces) |
| Helper function: get affected cells from 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 | 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. | |
| 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 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 | 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 | 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 | 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 | 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 | checkFaceArea (const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr) |
| Small 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. | |
| static bool | checkEdgeLength (const bool report, const scalar minEdgeLength, const polyMesh &mesh, const labelList &checkFaces, labelHashSet *pointSetPtr) |
| Small edges. Optionally collects points of small edges. | |
Updateable mesh geometry and checking routines.
Definition at line 51 of file polyMeshGeometry.H.
|
explicit |
Construct from mesh.
Definition at line 354 of file polyMeshGeometry.C.
References correct(), and mesh().

| ClassName | ( | "polyMeshGeometry" | ) |
|
inline |
Definition at line 160 of file polyMeshGeometry.H.
Referenced by affectedCells(), checkCellDeterminant(), checkEdgeLength(), checkFaceAngles(), checkFaceArea(), checkFaceDotProduct(), checkFaceFlatness(), checkFacePyramids(), checkFaceSkewness(), checkFaceTets(), checkFaceTwist(), checkFaceWeights(), motionSmootherAlgo::checkMesh(), checkTriangleTwist(), checkVolRatio(), and polyMeshGeometry().

|
inline |
Definition at line 165 of file polyMeshGeometry.H.
Referenced by pointSmoother::calculate(), checkCellDeterminant(), checkFaceAngles(), checkFaceArea(), checkFaceDotProduct(), checkFaceFlatness(), checkFaceSkewness(), checkFaceTwist(), checkFaceWeights(), motionSmootherAlgo::checkMesh(), checkTriangleTwist(), and pointSmoother::update().

|
inline |
Definition at line 169 of file polyMeshGeometry.H.
Referenced by pointSmoother::calculate(), checkFaceFlatness(), checkFaceSkewness(), checkFaceTets(), checkFaceTwist(), checkFaceWeights(), motionSmootherAlgo::checkMesh(), checkTriangleTwist(), and pointSmoother::update().

|
inline |
Definition at line 173 of file polyMeshGeometry.H.
Referenced by pointSmoother::calculate(), checkFaceDotProduct(), checkFacePyramids(), checkFaceSkewness(), checkFaceTets(), checkFaceTwist(), checkFaceWeights(), motionSmootherAlgo::checkMesh(), and pointSmoother::update().

|
inline |
Definition at line 177 of file polyMeshGeometry.H.
Referenced by pointSmoother::calculate(), checkVolRatio(), and pointSmoother::update().

| void correct | ( | ) |
Take over properties from mesh.
Definition at line 364 of file polyMeshGeometry.C.
Referenced by polyMeshGeometry().

| void correct | ( | const pointField & | p, |
| const labelList & | changedFaces ) |
Recalculate on selected faces. Recalculates cell properties.
on owner and neighbour of these cells.
Definition at line 373 of file polyMeshGeometry.C.
References affectedCells(), and p.

|
static |
Helper function: get affected cells from faces.
Definition at line 209 of file polyMeshGeometry.C.
References affectedCells(), mesh(), and UList< T >::size().
Referenced by affectedCells(), checkCellDeterminant(), checkCellDeterminant(), motionSmootherAlgo::checkMesh(), motionSmootherAlgo::checkMesh(), and correct().


|
static |
See primitiveMesh.
Definition at line 386 of file polyMeshGeometry.C.
References Foam::acos(), cellCentres(), Foam::cos(), coupled, Foam::degToRad(), Foam::endl(), faceAreas(), Foam::Info, mesh(), patches, Foam::radToDeg(), Foam::reduce(), SeriousErrorInFunction, and syncTools::swapBoundaryFacePositions().
Referenced by checkFaceDotProduct(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
See primitiveMesh.
Definition at line 564 of file polyMeshGeometry.C.
References cellCentres(), Foam::endl(), f(), Foam::Info, HashSet< Key, Hash >::insert(), pyramid< Point, PointRef, PolygonRef >::mag(), mesh(), p, Foam::Pout, Foam::reduce(), and SeriousErrorInFunction.
Referenced by checkFacePyramids(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
See primitiveMesh.
Definition at line 735 of file polyMeshGeometry.C.
References cellCentres(), coupled, Foam::endl(), faceCentres(), polyMeshTetDecomposition::findBasePoint(), polyMeshTetDecomposition::findSharedBasePoint(), Foam::Info, HashSet< Key, Hash >::insert(), mesh(), p, patches, Foam::reduce(), SeriousErrorInFunction, and syncTools::swapBoundaryFacePositions().
Referenced by checkFaceTets(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
See primitiveMesh.
Definition at line 956 of file polyMeshGeometry.C.
References primitiveMeshTools::boundaryFaceSkewness(), cellCentres(), Foam::endl(), faceAreas(), faceCentres(), primitiveMeshTools::faceSkewness(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::max(), mesh(), Foam::nl, patches, points, Foam::Pout, Foam::reduce(), syncTools::swapBoundaryCellPositions(), and WarningInFunction.
Referenced by motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
Interpolation weights (0.5 for regular mesh).
Definition at line 1162 of file polyMeshGeometry.C.
References cellCentres(), coupled, Foam::endl(), faceAreas(), faceCentres(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh(), Foam::min(), Foam::nl, patches, Foam::Pout, Foam::reduce(), syncTools::swapBoundaryFacePositions(), and WarningInFunction.
Referenced by checkFaceWeights(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
Cell volume ratio of neighbouring cells (1 for regular mesh).
Definition at line 1310 of file polyMeshGeometry.C.
References cellVolumes(), coupled, Foam::endl(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), mesh(), Foam::min(), Foam::nl, patches, Foam::Pout, Foam::reduce(), syncTools::swapBoundaryFaceList(), and WarningInFunction.
Referenced by motionSmootherAlgo::checkMesh(), motionSmootherAlgo::checkMesh(), and checkVolRatio().


|
static |
See primitiveMesh.
Definition at line 1446 of file polyMeshGeometry.C.
References Foam::abort(), Foam::asin(), Foam::degToRad(), Foam::endl(), f(), faceAreas(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), mesh(), Foam::min(), Foam::normalised(), p, Foam::radToDeg(), Foam::reduce(), Foam::sin(), and WarningInFunction.
Referenced by checkFaceAngles(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
Triangle (from face-centre decomposition) normal v.s.
average face normal
Definition at line 1571 of file polyMeshGeometry.C.
References Foam::abort(), triangle< point, const point & >::areaNormal(), cellCentres(), Foam::endl(), f(), faceAreas(), faceCentres(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh(), Foam::nl, Foam::normalised(), p, patches, Foam::reduce(), syncTools::swapBoundaryFacePositions(), WarningInFunction, Foam::Zero, and VectorSpace< Form, Cmpt, Ncmpts >::zero.
Referenced by checkFaceTwist(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
Consecutive triangle (from face-centre decomposition) normals.
Definition at line 1717 of file polyMeshGeometry.C.
References Foam::abort(), triangle< point, const point & >::areaNormal(), triangle< point, const point & >::areaNormal(), Foam::endl(), f(), faceAreas(), faceCentres(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh(), Foam::nl, p, Foam::reduce(), and WarningInFunction.
Referenced by motionSmootherAlgo::checkMesh(), motionSmootherAlgo::checkMesh(), and checkTriangleTwist().


|
static |
Area of faces v.s. sum of triangle areas.
Definition at line 1863 of file polyMeshGeometry.C.
References Foam::abort(), Foam::endl(), f(), faceAreas(), faceCentres(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), triangle< Point, PointRef >::mag(), mesh(), Foam::nl, p, Foam::reduce(), and WarningInFunction.
Referenced by checkFaceFlatness(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
Small faces.
Definition at line 1956 of file polyMeshGeometry.C.
References Foam::endl(), faceAreas(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh(), Foam::nl, Foam::reduce(), and WarningInFunction.
Referenced by checkFaceArea(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
Area of internal faces v.s. boundary faces.
Definition at line 2013 of file polyMeshGeometry.C.
References affectedCells(), cells, Foam::det(), Foam::endl(), faceAreas(), Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh(), Foam::min(), Foam::nl, Foam::reduce(), WarningInFunction, and Foam::Zero.
Referenced by checkCellDeterminant(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


|
static |
Small edges. Optionally collects points of small edges.
Definition at line 2105 of file polyMeshGeometry.C.
References Foam::endl(), f(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::magSqr(), Foam::max(), mesh(), Foam::min(), points, Foam::reduce(), Foam::sqr(), and Foam::sqrt().
Referenced by checkEdgeLength(), motionSmootherAlgo::checkMesh(), and motionSmootherAlgo::checkMesh().


| bool checkFaceDotProduct | ( | const bool | report, |
| const scalar | orthWarn, | ||
| const labelList & | checkFaces, | ||
| const List< labelPair > & | baffles, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2174 of file polyMeshGeometry.C.
References checkFaceDotProduct().

| bool checkFacePyramids | ( | const bool | report, |
| const scalar | minPyrVol, | ||
| const pointField & | p, | ||
| const labelList & | checkFaces, | ||
| const List< labelPair > & | baffles, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2197 of file polyMeshGeometry.C.
References checkFacePyramids(), and p.

| bool checkFaceTets | ( | const bool | report, |
| const scalar | minTetQuality, | ||
| const pointField & | p, | ||
| const labelList & | checkFaces, | ||
| const List< labelPair > & | baffles, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2221 of file polyMeshGeometry.C.
References checkFaceTets(), and p.

| bool checkFaceWeights | ( | const bool | report, |
| const scalar | warnWeight, | ||
| const labelList & | checkFaces, | ||
| const List< labelPair > & | baffles, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2272 of file polyMeshGeometry.C.
References checkFaceWeights().

| bool checkVolRatio | ( | const bool | report, |
| const scalar | warnRatio, | ||
| const labelList & | checkFaces, | ||
| const List< labelPair > & | baffles, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2296 of file polyMeshGeometry.C.
References checkVolRatio().

| bool checkFaceAngles | ( | const bool | report, |
| const scalar | maxDeg, | ||
| const pointField & | p, | ||
| const labelList & | checkFaces, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2318 of file polyMeshGeometry.C.
References checkFaceAngles(), and p.

| bool checkFaceTwist | ( | const bool | report, |
| const scalar | minTwist, | ||
| const pointField & | p, | ||
| const labelList & | checkFaces, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2340 of file polyMeshGeometry.C.
References checkFaceTwist(), and p.

| bool checkTriangleTwist | ( | const bool | report, |
| const scalar | minTwist, | ||
| const pointField & | p, | ||
| const labelList & | checkFaces, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2364 of file polyMeshGeometry.C.
References checkTriangleTwist(), and p.

| bool checkFaceFlatness | ( | const bool | report, |
| const scalar | minFlatness, | ||
| const pointField & | p, | ||
| const labelList & | checkFaces, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2387 of file polyMeshGeometry.C.
References checkFaceFlatness(), and p.

| bool checkFaceArea | ( | const bool | report, |
| const scalar | minArea, | ||
| const labelList & | checkFaces, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2410 of file polyMeshGeometry.C.
References checkFaceArea().

| bool checkCellDeterminant | ( | const bool | report, |
| const scalar | warnDet, | ||
| const labelList & | checkFaces, | ||
| const labelList & | affectedCells, | ||
| labelHashSet * | setPtr ) const |
Definition at line 2430 of file polyMeshGeometry.C.
References affectedCells(), and checkCellDeterminant().

| bool checkEdgeLength | ( | const bool | report, |
| const scalar | minEdgeLength, | ||
| const labelList & | checkFaces, | ||
| labelHashSet * | pointSetPtr ) const |
Definition at line 2452 of file polyMeshGeometry.C.
References checkEdgeLength().
