Collection of functions used in wall distance calculation. More...
Public Member Functions | |
ClassName ("cellDistFuncs") | |
cellDistFuncs (const polyMesh &mesh) | |
Construct from mesh. More... | |
const polyMesh & | mesh () const |
Access mesh. More... | |
labelHashSet | getPatchIDs (const wordReList &patchNames) const |
Return the set of patch IDs corresponding to the given names. More... | |
template<class Type > | |
labelHashSet | getPatchIDs () const |
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch') More... | |
scalar | smallestDist (const point &p, const polyPatch &patch, const label nWallFaces, const labelList &wallFaces, label &meshFaceI) const |
Calculate smallest true distance (and face index) More... | |
label | getPointNeighbours (const primitivePatch &, const label patchFaceI, labelList &) const |
Get faces sharing point with face on patch. More... | |
label | maxPatchSize (const labelHashSet &patchIDs) const |
Size of largest patch (out of supplied subset of patches) More... | |
label | sumPatchSize (const labelHashSet &patchIDs) const |
Sum of patch sizes (out of supplied subset of patches). More... | |
void | correctBoundaryFaceCells (const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const |
Correct all cells connected to boundary (via face). Sets values in. More... | |
void | correctBoundaryPointCells (const labelHashSet &patchIDs, scalarField &wallDistCorrected, Map< label > &nearestFace) const |
Correct all cells connected to wall (via point). Sets values in. More... | |
template<class Type > | |
Foam::labelHashSet | getPatchIDs () const |
Private Member Functions | |
cellDistFuncs (const cellDistFuncs &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const cellDistFuncs &) |
Disallow default bitwise assignment. More... | |
Static Private Member Functions | |
static label | findIndex (const label n, const labelList &, const label) |
Search for element in first n elements of labelList. Return index. More... | |
Private Attributes | |
const polyMesh & | mesh_ |
Reference to mesh. More... | |
Collection of functions used in wall distance calculation.
Definition at line 61 of file cellDistFuncs.H.
|
private |
Disallow default bitwise copy construct.
cellDistFuncs | ( | const polyMesh & | mesh | ) |
Construct from mesh.
Definition at line 62 of file cellDistFuncs.C.
|
staticprivate |
Search for element in first n elements of labelList. Return index.
or -1.
Definition at line 43 of file cellDistFuncs.C.
|
private |
Disallow default bitwise assignment.
ClassName | ( | "cellDistFuncs" | ) |
|
inline |
Access mesh.
Definition at line 95 of file cellDistFuncs.H.
References cellDistFuncs::mesh_.
Referenced by groundDist::correct(), cellDistFuncs::getPatchIDs(), and patchWave::getValues().
Foam::labelHashSet getPatchIDs | ( | const wordReList & | patchNames | ) | const |
Return the set of patch IDs corresponding to the given names.
Definition at line 71 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), mesh, patchNames(), and polyBoundaryMesh::patchSet().
Referenced by nearWallDist::calculate().
labelHashSet getPatchIDs | ( | ) | const |
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')
Uses isA, not isType
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 83 of file cellDistFuncs.C.
References PointHit::distance(), nWallFaces(), p, points, PrimitivePatch< Face, FaceList, PointField, PointType >::points(), and polyPatch::start().
Referenced by nearWallDist::calculate().
Foam::label getPointNeighbours | ( | const primitivePatch & | patch, |
const label | patchFaceI, | ||
labelList & | neighbours | ||
) | const |
Get faces sharing point with face on patch.
Definition at line 117 of file cellDistFuncs.C.
References Foam::abort(), Foam::endl(), HashTable::erase(), f(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceFaces(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, HashTable::found(), HashSet< Key, Hash >::insert(), PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), SeriousErrorInFunction, List::size(), HashTable::size(), and HashTable::toc().
Referenced by nearWallDist::calculate().
Foam::label maxPatchSize | ( | const labelHashSet & | patchIDs | ) | const |
Size of largest patch (out of supplied subset of patches)
Definition at line 229 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, HashTable::found(), Foam::max(), and mesh.
Referenced by nearWallDist::calculate().
Foam::label sumPatchSize | ( | const labelHashSet & | patchIDs | ) | const |
Sum of patch sizes (out of supplied subset of patches).
Used in sizing arrays.
Definition at line 250 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, HashTable::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 272 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::faceOwner(), forAll, HashTable::found(), 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 328 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), forAll, HashTable::found(), mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), primitiveMesh::pointCells(), PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), and List::size().
Foam::labelHashSet getPatchIDs | ( | ) | const |
Definition at line 34 of file cellDistFuncsTemplates.C.
References polyMesh::boundaryMesh(), forAll, HashSet< Key, Hash >::insert(), and cellDistFuncs::mesh().
|
private |
Reference to mesh.
Definition at line 66 of file cellDistFuncs.H.
Referenced by cellDistFuncs::mesh().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.