Loading...
Searching...
No Matches
patchWave Class Reference

Takes a set of patches to start MeshWave from. After construction holds distance at cells and distance at patches. Is e.g. used by wallDist to construct volScalarField with correct distance to wall. More...

#include <patchWave.H>

Inheritance diagram for patchWave:
Collaboration diagram for patchWave:

Public Member Functions

 patchWave (const polyMesh &mesh, const labelHashSet &patchIDs, bool correctWalls=true, const labelList &sourceFaceIDs=labelList())
 Construct from mesh and patches to initialize to 0 and flag.
virtual ~patchWave ()
 Destructor.
virtual void correct ()
 Correct for mesh geom/topo changes.
label nUnset () const
const scalarFielddistance () const
scalarFielddistance ()
 Non const access so we can 'transfer' contents for efficiency.
const FieldField< Field, scalar > & patchDistance () const
FieldField< Field, scalar > & patchDistance ()
Public Member Functions inherited from cellDistFuncs
 ClassName ("cellDistFuncs")
 cellDistFuncs (const polyMesh &mesh)
 Construct from mesh.
const polyMeshmesh () 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

Additional Inherited Members

Static Public Attributes inherited from cellDistFuncs
static bool useCombinedWallPatch = true
 Use combined-wall-patches wall distance v.s. v2406 per-patch distance. Default is true.

Detailed Description

Takes a set of patches to start MeshWave from. After construction holds distance at cells and distance at patches. Is e.g. used by wallDist to construct volScalarField with correct distance to wall.

Source files

Definition at line 54 of file patchWave.H.

Constructor & Destructor Documentation

◆ patchWave()

patchWave ( const polyMesh & mesh,
const labelHashSet & patchIDs,
bool correctWalls = true,
const labelList & sourceFaceIDs = labelList() )

Construct from mesh and patches to initialize to 0 and flag.

whether or not to correct wall. Calculate for all cells. correctWalls : correct wall (face&point) cells for correct distance, searching neighbours.

Definition at line 143 of file patchWave.C.

References correct(), cellDistFuncs::mesh(), and patchIDs.

Here is the call graph for this function:

◆ ~patchWave()

~patchWave ( )
virtual

Destructor.

Definition at line 165 of file patchWave.C.

Member Function Documentation

◆ correct()

void correct ( )
virtual

Correct for mesh geom/topo changes.

Definition at line 171 of file patchWave.C.

References cellDistFuncs::correctBoundaryCells(), cellDistFuncs::correctBoundaryFaceCells(), cellDistFuncs::correctBoundaryPointCells(), mesh, cellDistFuncs::sumPatchSize(), and cellDistFuncs::useCombinedWallPatch.

Referenced by patchWave().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ nUnset()

label nUnset ( ) const
inline

Definition at line 147 of file patchWave.H.

Referenced by meshWave::correct().

Here is the caller graph for this function:

◆ distance() [1/2]

const scalarField & distance ( ) const
inline

Definition at line 152 of file patchWave.H.

Referenced by meshWave::correct().

Here is the caller graph for this function:

◆ distance() [2/2]

scalarField & distance ( )
inline

Non const access so we can 'transfer' contents for efficiency.

Definition at line 160 of file patchWave.H.

◆ patchDistance() [1/2]

const FieldField< Field, scalar > & patchDistance ( ) const
inline

Definition at line 165 of file patchWave.H.

Referenced by meshWave::correct().

Here is the caller graph for this function:

◆ patchDistance() [2/2]

FieldField< Field, scalar > & patchDistance ( )
inline

Definition at line 170 of file patchWave.H.


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