Fast topological mesh-wave method for calculating the distance to nearest patch for all cells and boundary. More...
#include <meshWavePatchDistMethod.H>


Public Member Functions | |
| TypeName ("meshWave") | |
| Runtime type information. | |
| meshWave (const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs) | |
| Construct from coefficients dictionary, mesh. | |
| meshWave (const fvMesh &mesh, const labelHashSet &patchIDs, const bool correctWalls=true) | |
| Construct from mesh, fixed-value patch set and flag specifying. | |
| virtual bool | correct (volScalarField &y) |
| Correct the given distance-to-patch field. | |
| virtual bool | correct (volScalarField &y, volVectorField &n) |
| Correct the given distance-to-patch and normal-to-patch fields. | |
| Public Member Functions inherited from patchDistMethod | |
| TypeName ("patchDistMethod") | |
| Runtime type information. | |
| declareRunTimeSelectionTable (autoPtr, patchDistMethod, dictionary,(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs),(dict, mesh, patchIDs)) | |
| patchDistMethod (const fvMesh &mesh, const labelHashSet &patchIDs) | |
| Construct from mesh and patch ID set. | |
| virtual | ~patchDistMethod () |
| Destructor. | |
| const labelHashSet & | patchIDs () const |
| Return the patchIDs. | |
| virtual bool | movePoints () |
| Update cached geometry when the mesh moves. | |
| virtual void | updateMesh (const mapPolyMesh &) |
| Update cached topology and geometry when the mesh changes. | |
| template<class Type> | |
| Foam::wordList | patchTypes (const fvMesh &mesh, const labelHashSet &patchIDs) |
Protected Attributes | |
| const bool | correctWalls_ |
| Do accurate distance calculation for near-wall cells. | |
| label | nUnset_ |
| Number of unset cells and faces. | |
| Protected Attributes inherited from patchDistMethod | |
| const fvMesh & | mesh_ |
| Reference to the mesh. | |
| const labelHashSet | patchIDs_ |
| Set of patch IDs. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from patchDistMethod | |
| static autoPtr< patchDistMethod > | New (const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs, const word &defaultPatchDistMethod=word::null) |
| template<class Type> | |
| static wordList | patchTypes (const fvMesh &mesh, const labelHashSet &patchIDs) |
| Return the patch types for y and n. | |
| Protected Member Functions inherited from patchDistMethod | |
| patchDistMethod (const patchDistMethod &)=delete | |
| No copy construct. | |
| void | operator= (const patchDistMethod &)=delete |
| No copy assignment. | |
Fast topological mesh-wave method for calculating the distance to nearest patch for all cells and boundary.
For regular/un-distorted meshes this method is accurate but for skewed, non-orthogonal meshes it is approximate with the error increasing with the degree of mesh distortion. The distance from the near-wall cells to the boundary may optionally be corrected for mesh distortion by setting correctWalls = true.
Example of the wallDist specification in fvSchemes:
wallDist
{
method meshWave;
// Optional entry enabling the calculation
// of the normal-to-wall field
nRequired false;
}
Definition at line 72 of file meshWavePatchDistMethod.H.
| meshWave | ( | const dictionary & | dict, |
| const fvMesh & | mesh, | ||
| const labelHashSet & | patchIDs ) |
Construct from coefficients dictionary, mesh.
and fixed-value patch set
Definition at line 44 of file meshWavePatchDistMethod.C.
References correctWalls_, dict, mesh, nUnset_, patchDistMethod::patchDistMethod(), and patchDistMethod::patchIDs().

| meshWave | ( | const fvMesh & | mesh, |
| const labelHashSet & | patchIDs, | ||
| const bool | correctWalls = true ) |
Construct from mesh, fixed-value patch set and flag specifying.
whether or not to correct wall. Calculate for all cells. correctWalls : correct wall (face&point) cells for correct distance, searching neighbours.
Definition at line 57 of file meshWavePatchDistMethod.C.
References correctWalls_, mesh, nUnset_, patchDistMethod::patchDistMethod(), and patchDistMethod::patchIDs().

| TypeName | ( | "meshWave" | ) |
Runtime type information.
References dict, mesh, n, patchDistMethod::patchIDs(), and y.

|
virtual |
Correct the given distance-to-patch field.
Implements patchDistMethod.
Reimplemented in directionalMeshWave.
Definition at line 72 of file meshWavePatchDistMethod.C.
References correctWalls_, Foam::dimLength, patchWave::distance(), forAll, Foam::isA(), patchDistMethod::mesh_, patchWave::nUnset(), nUnset_, patchWave::patchDistance(), patchDistMethod::patchIDs_, PtrList< T >::transfer(), and y.

|
virtual |
Correct the given distance-to-patch and normal-to-patch fields.
Implements patchDistMethod.
Reimplemented in directionalMeshWave.
Definition at line 105 of file meshWavePatchDistMethod.C.
References patchDataWave< TransferType, TrackingData >::cellData(), correctWalls_, Foam::dimLength, patchDataWave< TransferType, TrackingData >::distance(), forAll, Foam::isA(), patchDistMethod::mesh_, n, patchDataWave< TransferType, TrackingData >::nUnset(), nUnset_, patchDataWave< TransferType, TrackingData >::patchData(), patchDataWave< TransferType, TrackingData >::patchDistance(), patchDistMethod::patchIDs_, UPtrList< T >::set(), PtrList< T >::transfer(), and y.

|
protected |
Do accurate distance calculation for near-wall cells.
Definition at line 83 of file meshWavePatchDistMethod.H.
Referenced by directionalMeshWave::correct(), correct(), correct(), meshWave(), and meshWave().
|
mutableprotected |
Number of unset cells and faces.
Definition at line 88 of file meshWavePatchDistMethod.H.
Referenced by directionalMeshWave::correct(), correct(), correct(), meshWave(), and meshWave().