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...
Public Member Functions | |
patchWave (const polyMesh &mesh, const labelHashSet &patchIDs, bool correctWalls=true) | |
Construct from mesh and patches to initialize to 0 and flag. More... | |
virtual | ~patchWave () |
Destructor. More... | |
virtual void | correct () |
Correct for mesh geom/topo changes. More... | |
label | nUnset () const |
const scalarField & | distance () const |
scalarField & | distance () |
Non const access so we can 'transfer' contents for efficiency. More... | |
const FieldField< Field, scalar > & | patchDistance () const |
FieldField< Field, scalar > & | patchDistance () |
![]() | |
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 | |
void | setChangedFaces (const labelHashSet &patchIDs, labelList &changedFaces, List< wallPoint > &changedInfo) const |
Set initial set of changed faces (= all faces of patches in. More... | |
label | getValues (const MeshWave< wallPoint > &) |
Copy MeshWave cell values. Return number of illegal/unset. More... | |
Private Attributes | |
labelHashSet | patchIDs_ |
Current patch subset (stored as patchIDs) More... | |
bool | correctWalls_ |
Do accurate distance calculation for near-wall cells. More... | |
label | nUnset_ |
Number of cells/faces unset after MeshWave has finished. More... | |
scalarField | distance_ |
Distance at cell centres. More... | |
FieldField< Field, scalar > | patchDistance_ |
Distance at patch faces. More... | |
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.
Definition at line 56 of file patchWave.H.
patchWave | ( | const polyMesh & | mesh, |
const labelHashSet & | patchIDs, | ||
bool | correctWalls = true |
||
) |
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 135 of file patchWave.C.
References patchWave::correct().
|
virtual |
Destructor.
Definition at line 154 of file patchWave.C.
|
private |
Set initial set of changed faces (= all faces of patches in.
patchIDs). Set changedFaces to labels of changed faces, changedInfo to face centres.
Definition at line 34 of file patchWave.C.
References polyPatch::faceCentres(), forAll, HashTable::found(), mesh, and polyPatch::start().
|
private |
Copy MeshWave cell values. Return number of illegal/unset.
cells.
Definition at line 70 of file patchWave.C.
References MeshWave< Type, TrackingData >::allCellInfo(), MeshWave< Type, TrackingData >::allFaceInfo(), polyMesh::boundaryMesh(), MeshWave< Type, TrackingData >::data(), patchWave::distance_, forAll, cellDistFuncs::mesh(), patchWave::patchDistance_, Foam::sqrt(), and polyPatch::start().
|
virtual |
Correct for mesh geom/topo changes.
Definition at line 160 of file patchWave.C.
References mesh.
Referenced by patchWave::patchWave().
|
inline |
Definition at line 120 of file patchWave.H.
References patchWave::nUnset_.
Referenced by groundDist::correct(), and meshWave::correct().
|
inline |
Definition at line 125 of file patchWave.H.
References patchWave::distance_.
Referenced by groundDist::correct(), and meshWave::correct().
|
inline |
Non const access so we can 'transfer' contents for efficiency.
Definition at line 131 of file patchWave.H.
References patchWave::distance_.
|
inline |
Definition at line 136 of file patchWave.H.
References patchWave::patchDistance_.
Referenced by groundDist::correct(), and meshWave::correct().
|
inline |
Definition at line 141 of file patchWave.H.
References patchWave::patchDistance_.
|
private |
Current patch subset (stored as patchIDs)
Definition at line 63 of file patchWave.H.
|
private |
Do accurate distance calculation for near-wall cells.
Definition at line 66 of file patchWave.H.
|
private |
Number of cells/faces unset after MeshWave has finished.
Definition at line 69 of file patchWave.H.
Referenced by patchWave::nUnset().
|
private |
Distance at cell centres.
Definition at line 72 of file patchWave.H.
Referenced by patchWave::distance(), and patchWave::getValues().
|
private |
Distance at patch faces.
Definition at line 75 of file patchWave.H.
Referenced by patchWave::getValues(), and patchWave::patchDistance().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.