Updateable mesh geometry + checking routines. More...
Public Member Functions | |
ClassName ("primitiveMeshGeometry") | |
primitiveMeshGeometry (const primitiveMesh &) | |
Construct from mesh. More... | |
const primitiveMesh & | 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... | |
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 primitiveMesh & | mesh_ |
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... | |
Updateable mesh geometry + checking routines.
Definition at line 49 of file primitiveMeshGeometry.H.
primitiveMeshGeometry | ( | const primitiveMesh & | mesh | ) |
Construct from mesh.
Definition at line 218 of file primitiveMeshGeometry.C.
References correct().
|
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().
|
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().
ClassName | ( | "primitiveMeshGeometry" | ) |
|
inline |
Definition at line 98 of file primitiveMeshGeometry.H.
References primitiveMeshGeometry::mesh_.
|
inline |
Definition at line 103 of file primitiveMeshGeometry.H.
References primitiveMeshGeometry::faceAreas_.
|
inline |
Definition at line 107 of file primitiveMeshGeometry.H.
References primitiveMeshGeometry::faceCentres_.
|
inline |
Definition at line 111 of file primitiveMeshGeometry.H.
References primitiveMeshGeometry::cellCentres_.
|
inline |
Definition at line 115 of file primitiveMeshGeometry.H.
References primitiveMeshGeometry::cellVolumes_.
void correct | ( | ) |
Take over properties from mesh.
Definition at line 234 of file primitiveMeshGeometry.C.
References primitiveMesh::cellCentres(), primitiveMeshGeometry::cellCentres_, primitiveMesh::cellVolumes(), primitiveMeshGeometry::cellVolumes_, primitiveMesh::faceAreas(), primitiveMeshGeometry::faceAreas_, primitiveMesh::faceCentres(), primitiveMeshGeometry::faceCentres_, and primitiveMeshGeometry::mesh_.
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.
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().
|
static |
Definition at line 258 of file primitiveMeshGeometry.C.
References Foam::acos(), Foam::cos(), Foam::degToRad(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), mesh, Foam::Pout, Foam::radToDeg(), Foam::reduce(), s(), SeriousErrorInFunction, List::size(), and WarningInFunction.
|
static |
Definition at line 401 of file primitiveMeshGeometry.C.
References primitiveMesh::cells(), Foam::endl(), f(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), mesh, p, Foam::Pout, Foam::reduce(), and SeriousErrorInFunction.
|
static |
Definition at line 513 of file primitiveMeshGeometry.C.
References Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), mesh, Foam::nl, Foam::Pout, Foam::reduce(), and WarningInFunction.
|
static |
Definition at line 653 of file primitiveMeshGeometry.C.
References Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), primitiveMesh::isInternalFace(), Foam::mag(), mesh, Foam::min(), Foam::nl, Foam::Pout, Foam::reduce(), and WarningInFunction.
|
static |
Definition at line 739 of file primitiveMeshGeometry.C.
References Foam::abort(), Foam::asin(), Foam::degToRad(), Foam::endl(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), Foam::max(), mesh, Foam::min(), p, Foam::radToDeg(), Foam::reduce(), Foam::sin(), and WarningInFunction.
|
static |
Definition at line 1002 of file primitiveMeshGeometry.C.
References Foam::abort(), Foam::endl(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh, Foam::nl, triangle::normal(), p, Foam::reduce(), List::size(), and WarningInFunction.
|
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.
|
static |
Definition at line 1171 of file primitiveMeshGeometry.C.
References cells, primitiveMesh::cells(), Foam::det(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::mag(), mesh, Foam::min(), Foam::nl, Foam::reduce(), WarningInFunction, and Tensor::zero.
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().
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.
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().
bool checkFaceWeights | ( | const bool | report, |
const scalar | warnWeight, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 1339 of file primitiveMeshGeometry.C.
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.
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.
bool checkFaceArea | ( | const bool | report, |
const scalar | minArea, | ||
const labelList & | checkFaces, | ||
labelHashSet * | setPtr | ||
) | const |
Definition at line 1429 of file primitiveMeshGeometry.C.
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.
|
private |
Reference to primitiveMesh.
Definition at line 52 of file primitiveMeshGeometry.H.
Referenced by primitiveMeshGeometry::correct(), and primitiveMeshGeometry::mesh().
|
private |
Uptodate copy of face areas.
Definition at line 55 of file primitiveMeshGeometry.H.
Referenced by primitiveMeshGeometry::correct(), and primitiveMeshGeometry::faceAreas().
|
private |
Uptodate copy of face centres.
Definition at line 58 of file primitiveMeshGeometry.H.
Referenced by primitiveMeshGeometry::correct(), and primitiveMeshGeometry::faceCentres().
|
private |
Uptodate copy of cell centres.
Definition at line 61 of file primitiveMeshGeometry.H.
Referenced by primitiveMeshGeometry::cellCentres(), and primitiveMeshGeometry::correct().
|
private |
Uptodate copy of cell volumes.
Definition at line 64 of file primitiveMeshGeometry.H.
Referenced by primitiveMeshGeometry::cellVolumes(), and primitiveMeshGeometry::correct().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.