Updateable mesh geometry and checking routines. More...
Public Member Functions | |
ClassName ("polyMeshGeometry") | |
polyMeshGeometry (const polyMesh &) | |
Construct from mesh. More... | |
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. More... | |
void | correct (const pointField &p, const labelList &changedFaces) |
Recalculate on selected faces. Recalculates cell properties. More... | |
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 |
Static Public Member Functions | |
static labelList | affectedCells (const polyMesh &, const labelList &changedFaces) |
Helper function: get affected cells from faces. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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) More... | |
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) More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static bool | checkFaceArea (const bool report, const scalar minArea, const polyMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr) |
Small faces. More... | |
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. More... | |
Updateable mesh geometry and checking routines.
- non-ortho done across coupled faces.
Definition at line 52 of file polyMeshGeometry.H.
polyMeshGeometry | ( | const polyMesh & | mesh | ) |
Construct from mesh.
Definition at line 338 of file polyMeshGeometry.C.
References polyMeshGeometry::correct().
ClassName | ( | "polyMeshGeometry" | ) |
|
inline |
Definition at line 138 of file polyMeshGeometry.H.
Referenced by motionSmootherAlgo::checkMesh().
|
inline |
Definition at line 143 of file polyMeshGeometry.H.
Referenced by polyMeshGeometry::cellVolumes().
|
inline |
Definition at line 147 of file polyMeshGeometry.H.
Referenced by polyMeshGeometry::cellVolumes().
|
inline |
Definition at line 151 of file polyMeshGeometry.H.
Referenced by polyMeshGeometry::cellVolumes().
|
inline |
Definition at line 155 of file polyMeshGeometry.H.
References polyMeshGeometry::affectedCells(), polyMeshGeometry::cellCentres(), polyMeshGeometry::checkCellDeterminant(), polyMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceArea(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFaceFlatness(), polyMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceTwist(), polyMeshGeometry::checkFaceWeights(), polyMeshGeometry::checkTriangleTwist(), polyMeshGeometry::checkVolRatio(), polyMeshGeometry::correct(), polyMeshGeometry::faceAreas(), polyMeshGeometry::faceCentres(), and points.
void correct | ( | ) |
Take over properties from mesh.
Definition at line 348 of file polyMeshGeometry.C.
References primitiveMesh::cellCentres(), primitiveMesh::cellVolumes(), primitiveMesh::faceAreas(), and primitiveMesh::faceCentres().
Referenced by polyMeshGeometry::cellVolumes(), and polyMeshGeometry::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 358 of file polyMeshGeometry.C.
References polyMeshGeometry::affectedCells(), and polyMeshGeometry::checkFaceDotProduct().
|
static |
Helper function: get affected cells from faces.
Definition at line 190 of file polyMeshGeometry.C.
References Foam::acos(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), forAll, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), face::nextLabel(), Foam::Pout, Foam::radToDeg(), s(), List< T >::size(), and WarningInFunction.
Referenced by polyMeshGeometry::cellVolumes(), motionSmootherAlgo::checkMesh(), and polyMeshGeometry::correct().
|
static |
See primitiveMesh.
Definition at line 371 of file polyMeshGeometry.C.
References Foam::acos(), polyMesh::boundaryMesh(), polyMeshGeometry::checkFacePyramids(), Foam::cos(), Foam::degToRad(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), UList< T >::first(), forAll, Foam::Info, primitiveMesh::isInternalFace(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patches, patchi, Foam::radToDeg(), Foam::reduce(), SeriousErrorInFunction, syncTools::swapBoundaryFacePositions(), and polyBoundaryMesh::whichPatch().
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkCellDeterminant(), polyMeshGeometry::checkFaceDotProduct(), motionSmootherAlgo::checkMesh(), and polyMeshGeometry::correct().
|
static |
See primitiveMesh.
Definition at line 553 of file polyMeshGeometry.C.
References primitiveMesh::cells(), polyMeshGeometry::checkFaceTets(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::Pout, Foam::reduce(), and SeriousErrorInFunction.
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceDotProduct(), polyMeshGeometry::checkFacePyramids(), and motionSmootherAlgo::checkMesh().
|
static |
See primitiveMesh.
Definition at line 734 of file polyMeshGeometry.C.
References polyMesh::boundaryMesh(), polyMeshGeometry::checkFaceSkewness(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMeshTetDecomposition::findBasePoint(), polyMeshTetDecomposition::findSharedBasePoint(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), patches, patchi, Foam::reduce(), SeriousErrorInFunction, syncTools::swapBoundaryFacePositions(), and polyBoundaryMesh::whichPatch().
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFacePyramids(), polyMeshGeometry::checkFaceTets(), and motionSmootherAlgo::checkMesh().
|
static |
See primitiveMesh.
Definition at line 963 of file polyMeshGeometry.C.
References primitiveMeshTools::boundaryFaceSkewness(), polyMesh::boundaryMesh(), polyMeshGeometry::checkFaceWeights(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), primitiveMeshTools::faceSkewness(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::max(), primitiveMesh::nInternalFaces(), Foam::nl, patches, Foam::Pout, Foam::reduce(), syncTools::swapBoundaryCellPositions(), WarningInFunction, and polyBoundaryMesh::whichPatch().
Referenced by polyMeshGeometry::cellVolumes(), and polyMeshGeometry::checkFaceTets().
|
static |
Interpolation weights (0.5 for regular mesh)
Definition at line 1176 of file polyMeshGeometry.C.
References polyMesh::boundaryMesh(), polyMeshGeometry::checkVolRatio(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), Foam::min(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, patches, patchi, Foam::Pout, Foam::reduce(), syncTools::swapBoundaryFacePositions(), WarningInFunction, and polyBoundaryMesh::whichPatch().
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceSkewness(), polyMeshGeometry::checkFaceTets(), polyMeshGeometry::checkFaceWeights(), and motionSmootherAlgo::checkMesh().
|
static |
Cell volume ratio of neighbouring cells (1 for regular mesh)
Definition at line 1331 of file polyMeshGeometry.C.
References polyMesh::boundaryMesh(), polyMeshGeometry::checkFaceAngles(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), Foam::max(), Foam::min(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, patches, patchi, Foam::Pout, Foam::reduce(), syncTools::swapBoundaryFaceList(), WarningInFunction, and polyBoundaryMesh::whichPatch().
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceWeights(), motionSmootherAlgo::checkMesh(), and polyMeshGeometry::checkVolRatio().
|
static |
See primitiveMesh.
Definition at line 1473 of file polyMeshGeometry.C.
References Foam::abort(), Foam::asin(), polyMeshGeometry::checkFaceTwist(), Foam::degToRad(), Foam::endl(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), UList< T >::first(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), UList< T >::last(), Foam::mag(), Foam::max(), Foam::min(), Foam::radToDeg(), Foam::reduce(), Foam::sin(), and WarningInFunction.
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceAngles(), motionSmootherAlgo::checkMesh(), and polyMeshGeometry::checkVolRatio().
|
static |
Triangle (from face-centre decomposition) normal v.s.
average face normal
Definition at line 1606 of file polyMeshGeometry.C.
References Foam::abort(), polyMesh::boundaryMesh(), polyMeshGeometry::checkTriangleTwist(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), face::nextLabel(), primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, patches, Foam::reduce(), List< T >::size(), syncTools::swapBoundaryFacePositions(), WarningInFunction, polyBoundaryMesh::whichPatch(), Foam::Zero, and VectorSpace< Vector< scalar >, scalar, 3 >::zero.
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceAngles(), polyMeshGeometry::checkFaceTwist(), and motionSmootherAlgo::checkMesh().
|
static |
Consecutive triangle (from face-centre decomposition) normals.
Definition at line 1791 of file polyMeshGeometry.C.
References Foam::abort(), polyMeshGeometry::checkFaceFlatness(), Foam::endl(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, UList< T >::fcIndex(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), face::nextLabel(), Foam::nl, Foam::reduce(), List< T >::size(), and WarningInFunction.
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceTwist(), motionSmootherAlgo::checkMesh(), and polyMeshGeometry::checkTriangleTwist().
|
static |
Area of faces v.s. sum of triangle areas.
Definition at line 1941 of file polyMeshGeometry.C.
References Foam::abort(), polyMeshGeometry::checkFaceArea(), Foam::endl(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), face::nextLabel(), Foam::nl, Foam::reduce(), List< T >::size(), and WarningInFunction.
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceFlatness(), motionSmootherAlgo::checkMesh(), and polyMeshGeometry::checkTriangleTwist().
|
static |
Small faces.
Definition at line 2039 of file polyMeshGeometry.C.
References polyMeshGeometry::checkCellDeterminant(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::nl, Foam::reduce(), and WarningInFunction.
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkFaceArea(), polyMeshGeometry::checkFaceFlatness(), and motionSmootherAlgo::checkMesh().
|
static |
Area of internal faces v.s. boundary faces.
Definition at line 2100 of file polyMeshGeometry.C.
References cells, primitiveMesh::cells(), polyMeshGeometry::checkFaceDotProduct(), Foam::det(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::min(), Foam::nl, Foam::reduce(), WarningInFunction, and Foam::Zero.
Referenced by polyMeshGeometry::cellVolumes(), polyMeshGeometry::checkCellDeterminant(), polyMeshGeometry::checkFaceArea(), and motionSmootherAlgo::checkMesh().
bool checkFaceDotProduct | ( | const bool | report, |
const scalar | orthWarn, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2201 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceDotProduct(), and polyMeshGeometry::checkFacePyramids().
bool checkFacePyramids | ( | const bool | report, |
const scalar | minPyrVol, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2224 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFacePyramids(), and polyMeshGeometry::checkFaceTets().
bool checkFaceTets | ( | const bool | report, |
const scalar | minTetQuality, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2248 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceTets(), and polyMeshGeometry::checkFaceWeights().
bool checkFaceWeights | ( | const bool | report, |
const scalar | warnWeight, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2299 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceWeights(), and polyMeshGeometry::checkVolRatio().
bool checkVolRatio | ( | const bool | report, |
const scalar | warnRatio, | ||
const labelList & | checkFaces, | ||
const List< labelPair > & | baffles, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2323 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceAngles(), and polyMeshGeometry::checkVolRatio().
bool checkFaceAngles | ( | const bool | report, |
const scalar | maxDeg, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2345 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceAngles(), and polyMeshGeometry::checkFaceTwist().
bool checkFaceTwist | ( | const bool | report, |
const scalar | minTwist, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2367 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceTwist(), and polyMeshGeometry::checkTriangleTwist().
bool checkTriangleTwist | ( | const bool | report, |
const scalar | minTwist, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2391 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceFlatness(), and polyMeshGeometry::checkTriangleTwist().
bool checkFaceFlatness | ( | const bool | report, |
const scalar | minFlatness, | ||
const pointField & | p, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2414 of file polyMeshGeometry.C.
References polyMeshGeometry::checkFaceArea(), and polyMeshGeometry::checkFaceFlatness().
bool checkFaceArea | ( | const bool | report, |
const scalar | minArea, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2437 of file polyMeshGeometry.C.
References polyMeshGeometry::checkCellDeterminant(), and polyMeshGeometry::checkFaceArea().
bool checkCellDeterminant | ( | const bool | report, |
const scalar | warnDet, | ||
const labelList & | checkFaces, | ||
const labelList & | affectedCells, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 2457 of file polyMeshGeometry.C.
References polyMeshGeometry::checkCellDeterminant().