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 UList< wordRe > &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... | |
| 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) More... | |
| template<class PatchType > | |
| void | getPointNeighbours (const PatchType &, const label patchFacei, DynamicList< label > &) 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... | |
| 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. More... | |
| 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. More... | |
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.
| ClassName | ( | "cellDistFuncs" | ) |
|
inline |
Access mesh.
Definition at line 108 of file cellDistFuncs.H.
Referenced by cellDistFuncs::getPatchIDs().

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

| 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.
| void getPointNeighbours | ( | const PatchType & | patch, |
| const label | patchFacei, | ||
| DynamicList< label > & | neighbours | ||
| ) | const |
Get faces sharing point with face on patch.
Definition at line 80 of file cellDistFuncsTemplates.C.
References Foam::abort(), DynamicList< T, SizeMin >::append(), DynamicList< T, SizeMin >::clear(), Foam::ensightOutput::debug, Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::foamVersion::patch, DynamicList< T, SizeMin >::push_uniq(), SeriousErrorInFunction, and UList< T >::size().

| Foam::label maxPatchSize | ( | const labelHashSet & | patchIDs | ) | const |
Size of largest patch (out of supplied subset of patches)
Definition at line 66 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, UList< T >::found(), Foam::max(), mesh, Foam::foamVersion::patch, and patchIDs().

| Foam::label sumPatchSize | ( | const labelHashSet & | patchIDs | ) | const |
Sum of patch sizes (out of supplied subset of patches).
Used in sizing arrays.
Definition at line 87 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), forAll, UList< T >::found(), mesh, Foam::foamVersion::patch, patchIDs(), 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 109 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::faceOwner(), forAll, UList< T >::found(), HashTable< T, Key, Hash >::insert(), mesh, Foam::foamVersion::patch, patchIDs(), and pbm.
Referenced by 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 164 of file cellDistFuncs.C.
References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), forAll, UList< T >::found(), HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), mesh, Foam::foamVersion::patch, patchIDs(), pbm, primitiveMesh::pointCells(), and UList< T >::size().
Referenced by 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 238 of file cellDistFuncs.C.
References List< T >::append(), polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), faceLabels(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), mesh, Foam::foamVersion::patch, patchIDs(), primitiveMesh::pointCells(), and UPtrList< T >::size().
Referenced by wallDistAddressing::correct().


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

| Foam::scalar smallestDist | ( | const point & | p, |
| const PatchType & | patch, | ||
| const labelUList & | wallFaces, | ||
| label & | minFacei | ||
| ) | const |
Definition at line 48 of file cellDistFuncsTemplates.C.
References PointHit< PointType >::distance(), p, Foam::foamVersion::patch, 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 patchWave::correct(), and wallDistAddressing::correct().