Collection of functions used in wall distance calculation. More...
#include <meshTools/cellDistFuncs.H>
Collection of functions used in wall distance calculation.
Definition at line 62 of file cellDistFuncs.H.
Public Member Functions | |
ClassName ("cellDistFuncs") | |
cellDistFuncs (const polyMesh &mesh) | |
Construct from mesh.
| |
const polyMesh & | mesh () const |
Access mesh.
| |
labelHashSet | getPatchIDs (const wordList &) const |
Get patchIDs of named patches.
| |
template<class Type > | |
labelHashSet | getPatchIDs () const |
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
| |
scalar | smallestDist (const point &p, const polyPatch &patch, const label nWallFaces, const labelList &wallFaces, label &meshFaceI) const |
Calculate smallest true distance (and face index)
| |
label | getPointNeighbours (const primitivePatch &, const label patchFaceI, labelList &) const |
Get faces sharing point with face on patch.
| |
label | maxPatchSize (const labelHashSet &patchIDs) const |
Size of largest patch (out of supplied subset of patches)
| |
label | sumPatchSize (const labelHashSet &patchIDs) const |
Sum of patch sizes (out of supplied subset of patches).
| |
void | correctBoundaryFaceCells (const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const |
Correct all cells connected to boundary (via face). Sets values in.
| |
void | correctBoundaryPointCells (const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const |
Correct all cells connected to wall (via point). Sets values in.
|
cellDistFuncs | ( | const polyMesh & | mesh ) |
Construct from mesh.
Definition at line 65 of file cellDistFuncs.C.
ClassName | ( | "cellDistFuncs" | ) |
const polyMesh& mesh | ( | ) | const [inline]
|
Access mesh.
Definition at line 96 of file cellDistFuncs.H.
Referenced by wallDist::correct(), and cellDistFuncs::getPatchIDs().
Foam::labelHashSet getPatchIDs | ( | const wordList & | patchNames ) | const |
Get patchIDs of named patches.
Definition at line 75 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, mesh, patchIdentifier::name(), PtrList< T >::size(), and List< T >::size().
Foam::labelHashSet getPatchIDs | ( | ) | const |
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
Uses isA, not isType
Definition at line 34 of file cellDistFuncsTemplates.C.
References polyMesh::boundaryMesh(), forAll, cellDistFuncs::mesh(), and PtrList< T >::size().
Foam::scalar smallestDist | ( | const point & | p, |
const polyPatch & | patch, | ||
const label | nWallFaces, | ||
const labelList & | wallFaces, | ||
label & | meshFaceI | ||
) | const |
Calculate smallest true distance (and face index)
from pt to faces wallFaces. For efficiency reasons we still pass in patch instead of extracting it from mesh_
Definition at line 110 of file cellDistFuncs.C.
References PointHit< Point >::distance(), nWallFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::points(), points, and polyPatch::start().
Foam::label getPointNeighbours | ( | const primitivePatch & | patch, |
const label | patchFaceI, | ||
labelList & | neighbours | ||
) | const |
Get faces sharing point with face on patch.
Definition at line 144 of file cellDistFuncs.C.
References Foam::abort(), Foam::endl(), f(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceFaces(), Foam::FatalError, FatalErrorIn, Foam::findIndex(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), SeriousErrorIn, and List< T >::size().
Foam::label maxPatchSize | ( | const labelHashSet & | patchIDs ) | const |
Size of largest patch (out of supplied subset of patches)
Definition at line 255 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, HashTable< T, Key, Hash >::found(), Foam::max(), and mesh.
Foam::label sumPatchSize | ( | const labelHashSet & | patchIDs ) | const |
Sum of patch sizes (out of supplied subset of patches).
Used in sizing arrays.
Definition at line 274 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, HashTable< T, Key, Hash >::found(), mesh, and Foam::sum().
void correctBoundaryFaceCells | ( | const labelHashSet & | patchIDs, |
scalarField & | wallDistCorrected, | ||
Map< label > & | nearestFace | ||
) | const |
Correct all cells connected to boundary (via face). Sets values in.
wallDistCorrected. Sets nearest wallface in nearestFace.
Definition at line 294 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::faceOwner(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), mesh, and polyPatch::start().
void correctBoundaryPointCells | ( | const labelHashSet & | patchIDs, |
scalarField & | wallDistCorrected, | ||
Map< label > & | nearestFace | ||
) | const |
Correct all cells connected to wall (via point). Sets values in.
wallDistCorrected. Uses/sets nearest wallFace in nearestFace.
Definition at line 350 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), primitiveMesh::pointCells(), PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), and List< T >::size().