Collection of static functions operating on primitiveMesh (mainly checks). More...
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. More... | |
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. More... | |
static void | makeFaceCentresAndAreas (const UList< face > &faces, const pointField &p, vectorField &fCtrs, vectorField &fAreas) |
Calculate face centres and areas for specified faces. More... | |
static void | makeFaceCentresAndAreas (const primitiveMesh &mesh, const pointField &p, vectorField &fCtrs, vectorField &fAreas) |
Calculate face centres and areas for all mesh faces. More... | |
static void | makeCellCentresAndVols (const primitiveMesh &mesh, const vectorField &fCtrs, const vectorField &fAreas, vectorField &cellCtrs, scalarField &cellVols) |
Calculate cell centres and volumes from face properties. More... | |
static tmp< scalarField > | faceOrthogonality (const primitiveMesh &mesh, const vectorField &fAreas, const vectorField &cellCtrs) |
Generate non-orthogonality field (internal faces only) More... | |
static void | facePyramidVolume (const primitiveMesh &mesh, const pointField &points, const vectorField &cellCtrs, scalarField &ownPyrVol, scalarField &neiPyrVol) |
Generate face pyramid volume fields. More... | |
static tmp< scalarField > | faceSkewness (const primitiveMesh &mesh, const pointField &points, const vectorField &fCtrs, const vectorField &fAreas, const vectorField &cellCtrs) |
Generate skewness field. More... | |
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. More... | |
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. More... | |
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) More... | |
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) More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
static scalar | faceOrthogonality (const point &ownCc, const point &neiCc, const vector &s) |
Orthogonality of single face. More... | |
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 32 of file primitiveMeshTools.C.
References Foam::constant::universal::c, f(), Foam::mag(), mesh, n, nPoints, p, Foam::constant::mathematical::pi(), and Foam::Zero.
Referenced by solidBodyFvGeometryScheme::movePoints().
|
static |
Update cell centres and volumes for the cells in the set cellIDs.
Definition at line 102 of file primitiveMeshTools.C.
References Foam::constant::universal::c, cellIDs, cells, cellVols, forAll, Foam::mag(), mesh, refPtr< Container< Type > >::ref(), and Foam::Zero.
Referenced by solidBodyFvGeometryScheme::movePoints(), and cyclicACMIPolyPatch::scalePatchFaceAreas().
|
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 198 of file primitiveMeshTools.C.
References Foam::constant::universal::c, f(), forAll, Foam::mag(), n, nPoints, p, Foam::constant::mathematical::pi(), List< T >::resize_nocopy(), UList< T >::size(), and Foam::Zero.
Referenced by primitiveMesh::calcFaceCentresAndAreas(), and polyMesh::checkMeshMotion().
|
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 266 of file primitiveMeshTools.C.
|
static |
Calculate cell centres and volumes from face properties.
Definition at line 278 of file primitiveMeshTools.C.
References cellVols, forAll, Foam::mag(), mesh, refPtr< Container< Type > >::ref(), and Foam::Zero.
Referenced by primitiveMesh::calcCellCentresAndVols(), polyMesh::checkMeshMotion(), and stabilisedFvGeometryScheme::movePoints().
|
static |
Generate non-orthogonality field (internal faces only)
Definition at line 495 of file primitiveMeshTools.C.
References forAll, mesh, and Foam::New().
|
static |
Generate face pyramid volume fields.
Definition at line 576 of file primitiveMeshTools.C.
References f(), forAll, mesh, points, and List< T >::setSize().
|
static |
Generate skewness field.
Definition at line 523 of file primitiveMeshTools.C.
References mesh, Foam::New(), p, and Foam::skew().
Referenced by polyMeshGeometry::checkFaceSkewness().
|
static |
Generate cell openness and cell aspect ratio field.
Definition at line 615 of file primitiveMeshTools.C.
References Foam::cmptMag(), Foam::cmptSum(), forAll, Foam::mag(), Foam::max(), mesh, Foam::min(), Foam::expressions::Detail::nComponents(), Foam::pow(), List< T >::setSize(), and Foam::Zero.
|
static |
Generate face concavity field. Returns per face the (sin of the) most concave angle between two consecutive edges.
Definition at line 709 of file primitiveMeshTools.C.
References f(), forAll, Foam::mag(), Foam::max(), mesh, Foam::New(), and p.
|
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 775 of file primitiveMeshTools.C.
References f(), forAll, Foam::mag(), mesh, n, Foam::New(), and p.
|
static |
Generate edge alignment field. Is per face the minimum aligned edge (does not use edge addressing)
|
static |
Generate cell determinant field. Normalised to 1 for an internal cube.
Definition at line 823 of file primitiveMeshTools.C.
References Foam::constant::universal::c, Foam::det(), forAll, Foam::mag(), mesh, Foam::expressions::Detail::nComponents(), Foam::New(), Foam::sqr(), bitSet::test(), SymmTensor< Cmpt >::xx(), SymmTensor< Cmpt >::yy(), Foam::Zero, and SymmTensor< Cmpt >::zz().
|
static |
Skewness of single face.
faces | The faces to consider |
p | Support points for faces |
Definition at line 374 of file primitiveMeshTools.C.
References f(), forAll, Foam::mag(), Foam::max(), p, and Foam::constant::mathematical::pi().
|
static |
Skewness of single boundary face.
faces | The faces to consider |
p | Support points for faces |
Definition at line 411 of file primitiveMeshTools.C.
References f(), forAll, Foam::mag(), Foam::max(), Foam::normalised(), p, and Foam::constant::mathematical::pi().
Referenced by polyMeshGeometry::checkFaceSkewness().
|
static |
Skewness of single face.
mesh | The mesh faces |
p | Support points for faces |
Definition at line 449 of file primitiveMeshTools.C.
|
static |
Skewness of single boundary face.
mesh | The mesh faces |
p | Support points for faces |
Definition at line 465 of file primitiveMeshTools.C.
|
static |
Orthogonality of single face.
Definition at line 480 of file primitiveMeshTools.C.
References Foam::mag(), and s.