Public Member Functions | Static Public Member Functions | List of all members
polyMeshGeometry Class Reference

Updateable mesh geometry and checking routines. More...

Public Member Functions

 ClassName ("polyMeshGeometry")
 
 polyMeshGeometry (const polyMesh &)
 Construct from mesh. More...
 
const polyMeshmesh () const
 
const vectorFieldfaceAreas () const
 
const vectorFieldfaceCentres () const
 
const vectorFieldcellCentres () const
 
const scalarFieldcellVolumes () 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...
 

Detailed Description

Updateable mesh geometry and checking routines.

- non-ortho done across coupled faces.

Source files

Definition at line 52 of file polyMeshGeometry.H.

Constructor & Destructor Documentation

◆ polyMeshGeometry()

polyMeshGeometry ( const polyMesh mesh)

Construct from mesh.

Definition at line 338 of file polyMeshGeometry.C.

References polyMeshGeometry::correct().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "polyMeshGeometry"  )

◆ mesh()

const polyMesh& mesh ( ) const
inline

Definition at line 138 of file polyMeshGeometry.H.

Referenced by motionSmootherAlgo::checkMesh().

Here is the caller graph for this function:

◆ faceAreas()

const vectorField& faceAreas ( ) const
inline

Definition at line 143 of file polyMeshGeometry.H.

Referenced by polyMeshGeometry::cellVolumes().

Here is the caller graph for this function:

◆ faceCentres()

const vectorField& faceCentres ( ) const
inline

Definition at line 147 of file polyMeshGeometry.H.

Referenced by polyMeshGeometry::cellVolumes().

Here is the caller graph for this function:

◆ cellCentres()

const vectorField& cellCentres ( ) const
inline

Definition at line 151 of file polyMeshGeometry.H.

Referenced by polyMeshGeometry::cellVolumes().

Here is the caller graph for this function:

◆ cellVolumes()

const scalarField& cellVolumes ( ) const
inline

◆ correct() [1/2]

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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ correct() [2/2]

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().

Here is the call graph for this function:

◆ affectedCells()

Foam::labelList affectedCells ( const polyMesh mesh,
const labelList changedFaces 
)
static

◆ checkFaceDotProduct() [1/2]

bool checkFaceDotProduct ( const bool  report,
const scalar  orthWarn,
const polyMesh mesh,
const vectorField cellCentres,
const vectorField faceAreas,
const labelList checkFaces,
const List< labelPair > &  baffles,
labelHashSet setPtr 
)
static

◆ checkFacePyramids() [1/2]

bool checkFacePyramids ( const bool  report,
const scalar  minPyrVol,
const polyMesh mesh,
const vectorField cellCentres,
const pointField p,
const labelList checkFaces,
const List< labelPair > &  baffles,
labelHashSet setPtr 
)
static

◆ checkFaceTets() [1/2]

bool checkFaceTets ( const bool  report,
const scalar  minPyrVol,
const polyMesh mesh,
const vectorField cellCentres,
const vectorField faceCentres,
const pointField p,
const labelList checkFaces,
const List< labelPair > &  baffles,
labelHashSet setPtr 
)
static

◆ checkFaceSkewness()

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 
)
static

◆ checkFaceWeights() [1/2]

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 
)
static

◆ checkVolRatio() [1/2]

bool checkVolRatio ( const bool  report,
const scalar  warnRatio,
const polyMesh mesh,
const scalarField cellVolumes,
const labelList checkFaces,
const List< labelPair > &  baffles,
labelHashSet setPtr 
)
static

◆ checkFaceAngles() [1/2]

bool checkFaceAngles ( const bool  report,
const scalar  maxDeg,
const polyMesh mesh,
const vectorField faceAreas,
const pointField p,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkFaceTwist() [1/2]

bool checkFaceTwist ( const bool  report,
const scalar  minTwist,
const polyMesh mesh,
const vectorField cellCentres,
const vectorField faceAreas,
const vectorField faceCentres,
const pointField p,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkTriangleTwist() [1/2]

bool checkTriangleTwist ( const bool  report,
const scalar  minTwist,
const polyMesh mesh,
const vectorField faceAreas,
const vectorField faceCentres,
const pointField p,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkFaceFlatness() [1/2]

bool checkFaceFlatness ( const bool  report,
const scalar  minFlatness,
const polyMesh mesh,
const vectorField faceAreas,
const vectorField faceCentres,
const pointField p,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkFaceArea() [1/2]

bool checkFaceArea ( const bool  report,
const scalar  minArea,
const polyMesh mesh,
const vectorField faceAreas,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkCellDeterminant() [1/2]

bool checkCellDeterminant ( const bool  report,
const scalar  minDet,
const polyMesh mesh,
const vectorField faceAreas,
const labelList checkFaces,
const labelList affectedCells,
labelHashSet setPtr 
)
static

◆ checkFaceDotProduct() [2/2]

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().

Here is the call graph for this function:

◆ checkFacePyramids() [2/2]

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().

Here is the call graph for this function:

◆ checkFaceTets() [2/2]

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().

Here is the call graph for this function:

◆ checkFaceWeights() [2/2]

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().

Here is the call graph for this function:

◆ checkVolRatio() [2/2]

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().

Here is the call graph for this function:

◆ checkFaceAngles() [2/2]

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().

Here is the call graph for this function:

◆ checkFaceTwist() [2/2]

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().

Here is the call graph for this function:

◆ checkTriangleTwist() [2/2]

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().

Here is the call graph for this function:

◆ checkFaceFlatness() [2/2]

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().

Here is the call graph for this function:

◆ checkFaceArea() [2/2]

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().

Here is the call graph for this function:

◆ checkCellDeterminant() [2/2]

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().

Here is the call graph for this function:

The documentation for this class was generated from the following files: