Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
primitiveMeshGeometry Class Reference

Updateable mesh geometry + checking routines. More...

Collaboration diagram for primitiveMeshGeometry:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("primitiveMeshGeometry")
 
 primitiveMeshGeometry (const primitiveMesh &)
 Construct from mesh. More...
 
const primitiveMeshmesh () 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...
 
labelList affectedCells (const labelList &changedFaces) const
 Helper function: get affected cells from faces. More...
 
bool checkFaceDotProduct (const bool report, const scalar orthWarn, const labelList &checkFaces, labelHashSet *setPtr) const
 
bool checkFacePyramids (const bool report, const scalar minPyrVol, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr) const
 
bool checkFaceSkewness (const bool report, const scalar internalSkew, const scalar boundarySkew, const labelList &checkFaces, labelHashSet *setPtr) const
 
bool checkFaceWeights (const bool report, const scalar warnWeight, const labelList &checkFaces, 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 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 bool checkFaceDotProduct (const bool report, const scalar orthWarn, const primitiveMesh &, const vectorField &cellCentres, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
 
static bool checkFacePyramids (const bool report, const scalar minPyrVol, const primitiveMesh &, const vectorField &cellCentres, const pointField &p, const labelList &checkFaces, labelHashSet *)
 
static bool checkFaceSkewness (const bool report, const scalar internalSkew, const scalar boundarySkew, const primitiveMesh &mesh, const vectorField &cellCentres, const vectorField &faceCentres, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
 
static bool checkFaceWeights (const bool report, const scalar warnWeight, const primitiveMesh &mesh, const vectorField &cellCentres, const vectorField &faceCentres, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
 
static bool checkFaceAngles (const bool report, const scalar maxDeg, const primitiveMesh &mesh, const vectorField &faceAreas, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
 
static bool checkFaceTwist (const bool report, const scalar minTwist, const primitiveMesh &, const vectorField &faceAreas, const vectorField &faceCentres, const pointField &p, const labelList &checkFaces, labelHashSet *setPtr)
 
static bool checkFaceArea (const bool report, const scalar minArea, const primitiveMesh &, const vectorField &faceAreas, const labelList &checkFaces, labelHashSet *setPtr)
 
static bool checkCellDeterminant (const bool report, const scalar minDet, const primitiveMesh &, const vectorField &faceAreas, const labelList &checkFaces, const labelList &affectedCells, labelHashSet *setPtr)
 

Private Member Functions

void updateFaceCentresAndAreas (const pointField &p, const labelList &changedFaces)
 Update face areas and centres on selected faces. More...
 
void updateCellCentresAndVols (const labelList &changedCells, const labelList &changedFaces)
 Update cell volumes and centres on selected cells. Requires. More...
 

Private Attributes

const primitiveMeshmesh_
 Reference to primitiveMesh. More...
 
vectorField faceAreas_
 Uptodate copy of face areas. More...
 
vectorField faceCentres_
 Uptodate copy of face centres. More...
 
vectorField cellCentres_
 Uptodate copy of cell centres. More...
 
scalarField cellVolumes_
 Uptodate copy of cell volumes. More...
 

Detailed Description

Updateable mesh geometry + checking routines.

Source files

Definition at line 49 of file primitiveMeshGeometry.H.

Constructor & Destructor Documentation

◆ primitiveMeshGeometry()

Construct from mesh.

Definition at line 218 of file primitiveMeshGeometry.C.

References correct().

Here is the call graph for this function:

Member Function Documentation

◆ updateFaceCentresAndAreas()

void updateFaceCentresAndAreas ( const pointField p,
const labelList changedFaces 
)
private

Update face areas and centres on selected faces.

Definition at line 42 of file primitiveMeshGeometry.C.

References Foam::constant::universal::c, f(), forAll, Foam::mag(), n, nPoints, p, and Foam::constant::mathematical::pi().

Here is the call graph for this function:

◆ updateCellCentresAndVols()

void updateCellCentresAndVols ( const labelList changedCells,
const labelList changedFaces 
)
private

Update cell volumes and centres on selected cells. Requires.

cells and faces to be consistent set.

Definition at line 98 of file primitiveMeshGeometry.C.

References forAll, and Foam::max().

Here is the call graph for this function:

◆ ClassName()

ClassName ( "primitiveMeshGeometry"  )

◆ mesh()

const primitiveMesh& mesh ( ) const
inline

Definition at line 98 of file primitiveMeshGeometry.H.

References primitiveMeshGeometry::mesh_.

◆ faceAreas()

const vectorField& faceAreas ( ) const
inline

Definition at line 103 of file primitiveMeshGeometry.H.

References primitiveMeshGeometry::faceAreas_.

◆ faceCentres()

const vectorField& faceCentres ( ) const
inline

Definition at line 107 of file primitiveMeshGeometry.H.

References primitiveMeshGeometry::faceCentres_.

◆ cellCentres()

const vectorField& cellCentres ( ) const
inline

Definition at line 111 of file primitiveMeshGeometry.H.

References primitiveMeshGeometry::cellCentres_.

◆ cellVolumes()

const scalarField& cellVolumes ( ) const
inline

Definition at line 115 of file primitiveMeshGeometry.H.

References primitiveMeshGeometry::cellVolumes_.

◆ correct() [1/2]

void correct ( )

◆ correct() [2/2]

void correct ( const pointField p,
const labelList changedFaces 
)

Recalculate on selected faces. Recalculates cell properties.

Recalculate on selected faces.

on owner and neighbour of these cells.

Definition at line 245 of file primitiveMeshGeometry.C.

References p.

◆ affectedCells()

Foam::labelList affectedCells ( const labelList changedFaces) const

Helper function: get affected cells from faces.

Definition at line 189 of file primitiveMeshGeometry.C.

References forAll, HashSet< Key, Hash >::insert(), List::size(), and HashTable::toc().

Here is the call graph for this function:

◆ checkFaceDotProduct() [1/2]

bool checkFaceDotProduct ( const bool  report,
const scalar  orthWarn,
const primitiveMesh mesh,
const vectorField cellCentres,
const vectorField faceAreas,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkFacePyramids() [1/2]

bool checkFacePyramids ( const bool  report,
const scalar  minPyrVol,
const primitiveMesh mesh,
const vectorField cellCentres,
const pointField p,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkFaceSkewness() [1/2]

bool checkFaceSkewness ( const bool  report,
const scalar  internalSkew,
const scalar  boundarySkew,
const primitiveMesh mesh,
const vectorField cellCentres,
const vectorField faceCentres,
const vectorField faceAreas,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkFaceWeights() [1/2]

bool checkFaceWeights ( const bool  report,
const scalar  warnWeight,
const primitiveMesh mesh,
const vectorField cellCentres,
const vectorField faceCentres,
const vectorField faceAreas,
const labelList checkFaces,
labelHashSet setPtr 
)
static

◆ checkFaceAngles() [1/2]

bool checkFaceAngles ( const bool  report,
const scalar  maxDeg,
const primitiveMesh 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 primitiveMesh 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 primitiveMesh mesh,
const vectorField faceAreas,
const labelList checkFaces,
labelHashSet setPtr 
)
static

Definition at line 1110 of file primitiveMeshGeometry.C.

References Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::nl, Foam::reduce(), and WarningInFunction.

Here is the call graph for this function:

◆ checkCellDeterminant() [1/2]

bool checkCellDeterminant ( const bool  report,
const scalar  minDet,
const primitiveMesh 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,
labelHashSet setPtr 
) const

Definition at line 1272 of file primitiveMeshGeometry.C.

References Foam::polyMeshGenChecks::checkFaceDotProduct().

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,
labelHashSet setPtr 
) const

Definition at line 1293 of file primitiveMeshGeometry.C.

References Foam::polyMeshGenChecks::checkFacePyramids(), and p.

Here is the call graph for this function:

◆ checkFaceSkewness() [2/2]

bool checkFaceSkewness ( const bool  report,
const scalar  internalSkew,
const scalar  boundarySkew,
const labelList checkFaces,
labelHashSet setPtr 
) const

Definition at line 1315 of file primitiveMeshGeometry.C.

References Foam::polyMeshGenChecks::checkFaceSkewness().

Here is the call graph for this function:

◆ checkFaceWeights() [2/2]

bool checkFaceWeights ( const bool  report,
const scalar  warnWeight,
const labelList checkFaces,
labelHashSet setPtr 
) const

Definition at line 1339 of file primitiveMeshGeometry.C.

◆ checkFaceAngles() [2/2]

bool checkFaceAngles ( const bool  report,
const scalar  maxDeg,
const pointField p,
const labelList checkFaces,
labelHashSet setPtr 
) const

Definition at line 1361 of file primitiveMeshGeometry.C.

References Foam::polyMeshGenChecks::checkFaceAngles(), and p.

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 1406 of file primitiveMeshGeometry.C.

References p.

◆ checkFaceArea() [2/2]

bool checkFaceArea ( const bool  report,
const scalar  minArea,
const labelList checkFaces,
labelHashSet setPtr 
) const

Definition at line 1429 of file primitiveMeshGeometry.C.

◆ checkCellDeterminant() [2/2]

bool checkCellDeterminant ( const bool  report,
const scalar  warnDet,
const labelList checkFaces,
const labelList affectedCells,
labelHashSet setPtr 
) const

Definition at line 1449 of file primitiveMeshGeometry.C.

Field Documentation

◆ mesh_

const primitiveMesh& mesh_
private

Reference to primitiveMesh.

Definition at line 52 of file primitiveMeshGeometry.H.

Referenced by primitiveMeshGeometry::correct(), and primitiveMeshGeometry::mesh().

◆ faceAreas_

vectorField faceAreas_
private

Uptodate copy of face areas.

Definition at line 55 of file primitiveMeshGeometry.H.

Referenced by primitiveMeshGeometry::correct(), and primitiveMeshGeometry::faceAreas().

◆ faceCentres_

vectorField faceCentres_
private

Uptodate copy of face centres.

Definition at line 58 of file primitiveMeshGeometry.H.

Referenced by primitiveMeshGeometry::correct(), and primitiveMeshGeometry::faceCentres().

◆ cellCentres_

vectorField cellCentres_
private

Uptodate copy of cell centres.

Definition at line 61 of file primitiveMeshGeometry.H.

Referenced by primitiveMeshGeometry::cellCentres(), and primitiveMeshGeometry::correct().

◆ cellVolumes_

scalarField cellVolumes_
private

Uptodate copy of cell volumes.

Definition at line 64 of file primitiveMeshGeometry.H.

Referenced by primitiveMeshGeometry::cellVolumes(), and primitiveMeshGeometry::correct().


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