Collection of functions used in wall distance calculation. More...
#include <cellDistFuncs.H>

Public Member Functions | |
| ClassName ("cellDistFuncs") | |
| cellDistFuncs (const polyMesh &mesh) | |
| Construct from mesh. | |
| const polyMesh & | mesh () const |
| Access mesh. | |
| labelHashSet | getPatchIDs (const UList< wordRe > &patchNames) const |
| Return the set of patch IDs corresponding to the given names. | |
| template<class Type> | |
| labelHashSet | getPatchIDs () const |
| Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch'). | |
| template<class PatchType> | |
| scalar | smallestDist (const point &p, const PatchType &patch, const labelUList &wallFaces, label &patchFacei) const |
| Calculate smallest true distance (and patch face index). | |
| template<class PatchType> | |
| void | getPointNeighbours (const PatchType &, const label patchFacei, DynamicList< label > &) 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. | |
| void | correctBoundaryCells (const labelList &patchIDs, const bool doPointCells, scalarField &wallDistCorrected, Map< label > &nearestFace) const |
| Correct all cells connected to any of the patches in patchIDs. Sets. | |
| template<class Type> | |
| Foam::labelHashSet | getPatchIDs () const |
| template<class PatchType> | |
| Foam::scalar | smallestDist (const point &p, const PatchType &patch, const labelUList &wallFaces, label &minFacei) const |
Static Public Attributes | |
| static bool | useCombinedWallPatch = true |
| Use combined-wall-patches wall distance v.s. v2406 per-patch distance. Default is true. | |
Collection of functions used in wall distance calculation.
Definition at line 59 of file cellDistFuncs.H.
| cellDistFuncs | ( | const polyMesh & | mesh | ) |
Construct from mesh.
Definition at line 47 of file cellDistFuncs.C.
References mesh().

| ClassName | ( | "cellDistFuncs" | ) |
|
inline |
Access mesh.
Definition at line 108 of file cellDistFuncs.H.
Referenced by cellDistFuncs(), wallDistAddressing::ClassName(), wallDistData< TransferType >::correct(), getPatchIDs(), patchDataWave< TransferType, TrackingData >::patchDataWave(), patchWave::patchWave(), wallDistAddressing::wallDistAddressing(), wallDistAddressing::wallDistAddressing(), and wallDistData< TransferType >::wallDistData().

| Foam::labelHashSet getPatchIDs | ( | const UList< wordRe > & | patchNames | ) | const |
Return the set of patch IDs corresponding to the given names.
Definition at line 55 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), mesh, patchNames(), and polyBoundaryMesh::patchSet().
Referenced by wallDistData< TransferType >::correct().


| labelHashSet getPatchIDs | ( | ) | const |
Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch').
Uses isA, not isType
| scalar smallestDist | ( | const point & | p, |
| const PatchType & | patch, | ||
| const labelUList & | wallFaces, | ||
| label & | patchFacei ) const |
Calculate smallest true distance (and patch face index).
from pt to faces wallFaces.
Referenced by correctBoundaryCells(), correctBoundaryFaceCells(), and correctBoundaryPointCells().

| void getPointNeighbours | ( | const PatchType & | patch, |
| const label | patchFacei, | ||
| DynamicList< label > & | neighbours ) const |
Get faces sharing point with face on patch.
Definition at line 79 of file cellDistFuncsTemplates.C.
References Foam::abort(), DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), Foam::endl(), HashTable< T, Key, Hash >::erase(), f(), Foam::FatalError, FatalErrorInFunction, forAll, HashTable< T, Key, Hash >::found(), HashSet< Key, Hash >::insert(), DynamicList< T, SizeMin >::push_uniq(), SeriousErrorInFunction, HashTable< T, Key, Hash >::size(), and HashTable< T, Key, Hash >::toc().
Referenced by correctBoundaryCells(), and correctBoundaryFaceCells().


| Foam::label maxPatchSize | ( | const labelHashSet & | patchIDs | ) | const |
Size of largest patch (out of supplied subset of patches).
Definition at line 65 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, Foam::max(), mesh, and patchIDs.
Referenced by correctBoundaryFaceCells().


| Foam::label sumPatchSize | ( | const labelHashSet & | patchIDs | ) | const |
Sum of patch sizes (out of supplied subset of patches).
Used in sizing arrays.
Definition at line 86 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, mesh, patchIDs, and Foam::sum().
Referenced by patchDataWave< TransferType, TrackingData >::correct(), and patchWave::correct().


| 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 108 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::faceOwner(), forAll, getPointNeighbours(), HashTable< T, Key, Hash >::insert(), maxPatchSize(), mesh, patchIDs, pbm, and smallestDist().
Referenced by patchDataWave< TransferType, TrackingData >::correct(), patchWave::correct(), and wallDistAddressing::correct().


| 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 163 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), mesh, patchIDs, pbm, primitiveMesh::pointCells(), UList< T >::size(), smallestDist(), and bitSet::unset().
Referenced by patchDataWave< TransferType, TrackingData >::correct(), patchWave::correct(), and wallDistAddressing::correct().


| void correctBoundaryCells | ( | const labelList & | patchIDs, |
| const bool | doPointCells, | ||
| scalarField & | wallDistCorrected, | ||
| Map< label > & | nearestFace ) const |
Correct all cells connected to any of the patches in patchIDs. Sets.
Definition at line 237 of file cellDistFuncs.C.
References IndirectListBase< T, Addr >::addressing(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), faceLabels(), forAll, HashTable< T, Key, Hash >::found(), getPointNeighbours(), HashTable< T, Key, Hash >::insert(), PrimitivePatch< FaceList, PointField >::localFaces(), mesh, PrimitivePatch< FaceList, PointField >::meshPoints(), patchIDs, primitiveMesh::pointCells(), PrimitivePatch< FaceList, PointField >::pointFaces(), UPtrList< T >::size(), smallestDist(), and bitSet::unset().
Referenced by patchDataWave< TransferType, TrackingData >::correct(), patchWave::correct(), and wallDistAddressing::correct().


| Foam::labelHashSet getPatchIDs | ( | ) | const |
Definition at line 29 of file cellDistFuncsTemplates.C.
References polyMesh::boundaryMesh(), forAll, Foam::isA(), mesh(), and patchIDs.

| Foam::scalar smallestDist | ( | const point & | p, |
| const PatchType & | patch, | ||
| const labelUList & | wallFaces, | ||
| label & | minFacei ) const |
Definition at line 47 of file cellDistFuncsTemplates.C.
References PointHit< PointType >::distance(), p, and points.

|
static |
Use combined-wall-patches wall distance v.s. v2406 per-patch distance. Default is true.
Definition at line 92 of file cellDistFuncs.H.
Referenced by patchDataWave< TransferType, TrackingData >::correct(), patchWave::correct(), wallDistAddressing::correct(), and registerOptSwitch().