Collection of static functions operating on primitiveMesh (mainly checks). More...
#include <primitiveMeshTools.H>

Static Public Member Functions | |
| static void | updateFaceCentresAndAreas (const primitiveMesh &mesh, const UList< label > &faceIDs, const pointField &p, vectorField &fCtrs, vectorField &fAreas) |
| Update face centres and areas for the faces in the set faceIDs. | |
| static void | updateCellCentresAndVols (const primitiveMesh &mesh, const vectorField &fCtrs, const vectorField &fAreas, const List< label > &cellIDs, const List< cell > &cells, vectorField &cellCtrs_s, scalarField &cellVols_s) |
| Update cell centres and volumes for the cells in the set cellIDs. | |
| static void | makeFaceCentresAndAreas (const UList< face > &faces, const pointField &p, vectorField &fCtrs, vectorField &fAreas) |
| Calculate face centres and areas for specified faces. | |
| static void | makeFaceCentresAndAreas (const primitiveMesh &mesh, const pointField &p, vectorField &fCtrs, vectorField &fAreas) |
| Calculate face centres and areas for all mesh faces. | |
| static void | makeCellCentresAndVols (const primitiveMesh &mesh, const vectorField &fCtrs, const vectorField &fAreas, vectorField &cellCtrs, scalarField &cellVols) |
| Calculate cell centres and volumes from face properties. | |
| static tmp< scalarField > | faceOrthogonality (const primitiveMesh &mesh, const vectorField &fAreas, const vectorField &cellCtrs) |
| Generate non-orthogonality field (internal faces only). | |
| static void | facePyramidVolume (const primitiveMesh &mesh, const pointField &points, const vectorField &cellCtrs, scalarField &ownPyrVol, scalarField &neiPyrVol) |
| Generate face pyramid volume fields. | |
| static tmp< scalarField > | faceSkewness (const primitiveMesh &mesh, const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs) |
| Generate skewness field. | |
| static void | cellClosedness (const primitiveMesh &mesh, const Vector< label > &meshD, const vectorField &areas, const scalarField &vols, scalarField &openness, scalarField &aratio) |
| Generate cell openness and cell aspect ratio field. | |
| static tmp< scalarField > | faceConcavity (const scalar maxSin, const primitiveMesh &mesh, const pointField &p, const vectorField &faceAreas) |
| Generate face concavity field. Returns per face the (sin of the) most concave angle between two consecutive edges. | |
| static tmp< scalarField > | faceFlatness (const primitiveMesh &mesh, const pointField &p, const vectorField &fCtrs, const vectorField &faceAreas) |
| Generate face flatness field. Compares the individual triangles' normals against the face average normal. Between 0 (fully warped) and 1 (fully flat). | |
| static tmp< scalarField > | edgeAlignment (const primitiveMesh &mesh, const Vector< label > &directions, const pointField &p) |
| Generate edge alignment field. Is per face the minimum aligned edge (does not use edge addressing). | |
| static tmp< scalarField > | cellDeterminant (const primitiveMesh &mesh, const Vector< label > &directions, const vectorField &faceAreas, const bitSet &internalOrCoupledFace) |
| Generate cell determinant field. Normalised to 1 for an internal cube. | |
| static scalar | faceSkewness (const UList< face > &faces, const pointField &p, const vectorField &fCtrs, const vectorField &fAreas, const label facei, const point &ownCc, const point &neiCc) |
| Skewness of single face. | |
| static scalar | boundaryFaceSkewness (const UList< face > &faces, const pointField &p, const vectorField &fCtrs, const vectorField &fAreas, const label facei, const point &ownCc) |
| Skewness of single boundary face. | |
| static scalar | faceSkewness (const primitiveMesh &mesh, const pointField &p, const vectorField &fCtrs, const vectorField &fAreas, const label facei, const point &ownCc, const point &neiCc) |
| Skewness of single face. | |
| static scalar | boundaryFaceSkewness (const primitiveMesh &mesh, const pointField &p, const vectorField &fCtrs, const vectorField &fAreas, const label facei, const point &ownCc) |
| Skewness of single boundary face. | |
| static scalar | faceOrthogonality (const point &ownCc, const point &neiCc, const vector &s) |
| Orthogonality of single face. | |
Collection of static functions operating on primitiveMesh (mainly checks).
Definition at line 54 of file primitiveMeshTools.H.
|
static |
Update face centres and areas for the faces in the set faceIDs.
Definition at line 61 of file primitiveMeshTools.C.
References triangle< Point, PointRef >::areaNormal(), triangle< Point, PointRef >::centre(), f(), Foam::mag(), mesh, n, nPoints, p, pi(), Foam::pointsAverage(), and Foam::Zero.
Referenced by solidBodyFvGeometryScheme::movePoints(), and solidBodyFvGeometryScheme::updateGeom().


|
static |
Update cell centres and volumes for the cells in the set cellIDs.
Definition at line 125 of file primitiveMeshTools.C.
References cells, cellVols, forAll, Foam::mag(), mesh, refPtr< T >::ref(), UList< T >::size(), and Foam::Zero.
Referenced by solidBodyFvGeometryScheme::movePoints(), cyclicACMIPolyPatch::scalePatchFaceAreas(), and solidBodyFvGeometryScheme::updateGeom().


|
static |
Calculate face centres and areas for specified faces.
Adjusts the lengths of centres and area normals if required.
| faces | The faces to consider | |
| p | Support points for faces | |
| [out] | fCtrs | The face centres |
| [out] | fAreas | The face area normals |
Definition at line 219 of file primitiveMeshTools.C.
References triangle< Point, PointRef >::areaNormal(), triangle< Point, PointRef >::centre(), f(), forAll, Foam::mag(), n, nPoints, p, pi(), Foam::pointsAverage(), List< T >::resize_nocopy(), UList< T >::size(), and Foam::Zero.
Referenced by primitiveMesh::calcFaceCentresAndAreas(), polyMesh::checkMeshMotion(), makeFaceCentresAndAreas(), basicFvGeometryScheme::updateGeom(), and parallelFvGeometryScheme::updateGeom().


|
static |
Calculate face centres and areas for all mesh faces.
Adjusts the lengths of centres and area normals if required.
| mesh | The mesh faces | |
| p | Support points for faces | |
| [out] | fCtrs | The face centres |
| [out] | fAreas | The face area normals |
Definition at line 284 of file primitiveMeshTools.C.
References makeFaceCentresAndAreas(), mesh, and p.

|
static |
Calculate cell centres and volumes from face properties.
Definition at line 296 of file primitiveMeshTools.C.
References cellVols, forAll, Foam::mag(), mesh, refPtr< T >::ref(), and Foam::Zero.
Referenced by primitiveMesh::calcCellCentresAndVols(), polyMesh::checkMeshMotion(), stabilisedFvGeometryScheme::movePoints(), basicFvGeometryScheme::updateGeom(), parallelFvGeometryScheme::updateGeom(), and stabilisedFvGeometryScheme::updateGeom().


|
static |
Generate non-orthogonality field (internal faces only).
Definition at line 513 of file primitiveMeshTools.C.
References faceOrthogonality(), forAll, mesh, and tmp< T >::New().
Referenced by primitiveMesh::checkFaceOrthogonality(), polyMeshTools::faceOrthogonality(), and faceOrthogonality().


|
static |
Generate face pyramid volume fields.
Definition at line 594 of file primitiveMeshTools.C.
References f(), forAll, pyramid< Point, PointRef, PolygonRef >::mag(), mesh, points, and List< T >::setSize().
Referenced by primitiveMesh::checkFacePyramids().


|
static |
Generate skewness field.
Definition at line 541 of file primitiveMeshTools.C.
References boundaryFaceSkewness(), faceSkewness(), mesh, tmp< T >::New(), p, and Foam::skew().
Referenced by polyMeshGeometry::checkFaceSkewness(), primitiveMesh::checkFaceSkewness(), polyMeshTools::faceSkewness(), faceSkewness(), and faceSkewness().


|
static |
Generate cell openness and cell aspect ratio field.
Definition at line 633 of file primitiveMeshTools.C.
References Foam::cmptMag(), Foam::cmptSum(), forAll, Foam::mag(), Foam::max(), mesh, Foam::min(), VectorSpace< Form, Cmpt, Ncmpts >::nComponents, Foam::pow(), List< T >::setSize(), and Foam::Zero.
Referenced by primitiveMesh::checkClosedCells().


|
static |
Generate face concavity field. Returns per face the (sin of the) most concave angle between two consecutive edges.
Definition at line 727 of file primitiveMeshTools.C.
References f(), forAll, Foam::mag(), Foam::max(), mesh, tmp< T >::New(), and p.
Referenced by primitiveMesh::checkFaceAngles().


|
static |
Generate face flatness field. Compares the individual triangles' normals against the face average normal. Between 0 (fully warped) and 1 (fully flat).
Definition at line 793 of file primitiveMeshTools.C.
References f(), faceFlatness(), forAll, Foam::mag(), mesh, n, tmp< T >::New(), and p.
Referenced by primitiveMesh::checkFaceFlatness(), and faceFlatness().


|
static |
|
static |
Generate cell determinant field. Normalised to 1 for an internal cube.
Definition at line 841 of file primitiveMeshTools.C.
References cellDeterminant(), Foam::det(), forAll, Foam::mag(), mesh, VectorSpace< Form, Cmpt, Ncmpts >::nComponents, tmp< T >::New(), Foam::sqr(), bitSet::test(), SymmTensor< Cmpt >::xx(), SymmTensor< Cmpt >::yy(), Foam::Zero, and SymmTensor< Cmpt >::zz().
Referenced by cellDeterminant().


|
static |
Skewness of single face.
| faces | The faces to consider |
| p | Support points for faces |
Definition at line 392 of file primitiveMeshTools.C.
References f(), forAll, Foam::mag(), Foam::max(), p, and pi().

|
static |
Skewness of single boundary face.
| faces | The faces to consider |
| p | Support points for faces |
Definition at line 429 of file primitiveMeshTools.C.
References f(), forAll, Foam::mag(), Foam::max(), Foam::normalised(), p, and pi().
Referenced by boundaryFaceSkewness(), polyMeshGeometry::checkFaceSkewness(), polyMeshTools::faceSkewness(), and faceSkewness().


|
static |
Skewness of single face.
Definition at line 467 of file primitiveMeshTools.C.
References faceSkewness(), mesh, and p.

|
static |
Skewness of single boundary face.
Definition at line 483 of file primitiveMeshTools.C.
References boundaryFaceSkewness(), mesh, and p.

|
static |
Orthogonality of single face.
Definition at line 498 of file primitiveMeshTools.C.
References Foam::mag(), and s().
