cellDistFuncs Class Reference

Collection of functions used in wall distance calculation. More...

Inheritance diagram for cellDistFuncs:
[legend]

Public Member Functions

 ClassName ("cellDistFuncs")
 
 cellDistFuncs (const polyMesh &mesh)
 Construct from mesh. More...
 
const polyMeshmesh () 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...
 
scalar smallestDist (const point &p, const polyPatch &patch, const labelUList &wallFaces, label &meshFacei) const
 Calculate smallest true distance (and face index) More...
 
void getPointNeighbours (const primitivePatch &, 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...
 
template<class Type >
Foam::labelHashSet getPatchIDs () const
 

Detailed Description

Collection of functions used in wall distance calculation.

Source files

Definition at line 63 of file cellDistFuncs.H.

Constructor & Destructor Documentation

◆ cellDistFuncs()

cellDistFuncs ( const polyMesh mesh)

Construct from mesh.

Definition at line 42 of file cellDistFuncs.C.

Member Function Documentation

◆ ClassName()

ClassName ( "cellDistFuncs"  )

◆ mesh()

const polyMesh & mesh ( ) const
inline

Access mesh.

Definition at line 92 of file cellDistFuncs.H.

Referenced by wallDistData< TransferType >::correct(), and cellDistFuncs::getPatchIDs().

Here is the caller graph for this function:

◆ getPatchIDs() [1/3]

Foam::labelHashSet getPatchIDs ( const UList< wordRe > &  patchNames) const

Return the set of patch IDs corresponding to the given names.

Definition at line 50 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), mesh, patchNames(), and polyBoundaryMesh::patchSet().

Here is the call graph for this function:

◆ getPatchIDs() [2/3]

labelHashSet getPatchIDs ( ) const

Get patchIDs of/derived off certain type (e.g. 'processorPolyPatch')

Uses isA, not isType

◆ smallestDist()

Foam::scalar smallestDist ( const point p,
const polyPatch patch,
const labelUList 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 62 of file cellDistFuncs.C.

References PointHit< PointType >::distance(), p, and points.

Here is the call graph for this function:

◆ getPointNeighbours()

void getPointNeighbours ( const primitivePatch patch,
const label  patchFacei,
DynamicList< label > &  neighbours 
) const

◆ maxPatchSize()

Foam::label maxPatchSize ( const labelHashSet patchIDs) const

Size of largest patch (out of supplied subset of patches)

Definition at line 188 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), forAll, HashTable< T, Key, Hash >::found(), Foam::max(), and mesh.

Here is the call graph for this function:

◆ sumPatchSize()

Foam::label sumPatchSize ( const labelHashSet patchIDs) const

Sum of patch sizes (out of supplied subset of patches).

Used in sizing arrays.

Definition at line 209 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), forAll, HashTable< T, Key, Hash >::found(), mesh, and Foam::sum().

Here is the call graph for this function:

◆ correctBoundaryFaceCells()

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 231 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), polyMesh::faceOwner(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), and mesh.

Here is the call graph for this function:

◆ correctBoundaryPointCells()

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 277 of file cellDistFuncs.C.

References polyMesh::boundaryMesh(), primitiveMesh::cellCentres(), forAll, HashTable< T, Key, Hash >::found(), HashTable< T, Key, Hash >::insert(), mesh, and primitiveMesh::pointCells().

Here is the call graph for this function:

◆ getPatchIDs() [3/3]

Foam::labelHashSet getPatchIDs ( ) const

Definition at line 36 of file cellDistFuncsTemplates.C.

References polyMesh::boundaryMesh(), forAll, HashSet< Key, Hash >::insert(), and cellDistFuncs::mesh().

Here is the call graph for this function:

The documentation for this class was generated from the following files: