All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
meshWave Class Reference

Fast topological mesh-wave method for calculating the distance to nearest patch for all cells and boundary. More...

Inheritance diagram for meshWave:
Collaboration diagram for meshWave:

Public Member Functions

 TypeName ("meshWave")
 Runtime type information. More...
 
 meshWave (const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs)
 Construct from coefficients dictionary, mesh. More...
 
 meshWave (const fvMesh &mesh, const labelHashSet &patchIDs, const bool correctWalls=true)
 Construct from mesh, fixed-value patch set and flag specifying. More...
 
 meshWave (const meshWave &)=delete
 Disallow default bitwise copy construction. More...
 
label nUnset () const
 
virtual bool correct (volScalarField &y)
 Correct the given distance-to-patch field. More...
 
virtual bool correct (volScalarField &y, volVectorField &n)
 Correct the given distance-to-patch and normal-to-patch fields. More...
 
void operator= (const meshWave &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from patchDistMethod
 TypeName ("patchDistMethod")
 Runtime type information. More...
 
 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. More...
 
 patchDistMethod (const patchDistMethod &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~patchDistMethod ()
 Destructor. More...
 
const labelHashSetpatchIDs () const
 Return the patchIDs. More...
 
virtual bool movePoints ()
 Update cached geometry when the mesh moves. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update cached topology and geometry when the mesh changes. More...
 
void operator= (const patchDistMethod &)=delete
 Disallow default bitwise assignment. More...
 
template<class Type >
Foam::wordList patchTypes (const fvMesh &mesh, const labelHashSet &patchIDs)
 

Additional Inherited Members

- Static Public Member Functions inherited from patchDistMethod
static autoPtr< patchDistMethodNew (const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs)
 
template<class Type >
static wordList patchTypes (const fvMesh &mesh, const labelHashSet &patchIDs)
 Return the patch types for y and n. More...
 
- Protected Attributes inherited from patchDistMethod
const fvMeshmesh_
 Reference to the mesh. More...
 
const labelHashSet patchIDs_
 Set of patch IDs. More...
 

Detailed Description

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;
    }
See also
Foam::patchDistMethod::Poisson Foam::wallDist
Source files

Definition at line 73 of file meshWavePatchDistMethod.H.

Constructor & Destructor Documentation

◆ meshWave() [1/3]

meshWave ( const dictionary dict,
const fvMesh mesh,
const labelHashSet patchIDs 
)

Construct from coefficients dictionary, mesh.

and fixed-value patch set

Definition at line 49 of file meshWavePatchDistMethod.C.

◆ meshWave() [2/3]

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 62 of file meshWavePatchDistMethod.C.

◆ meshWave() [3/3]

meshWave ( const meshWave )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ TypeName()

TypeName ( "meshWave"  )

Runtime type information.

◆ nUnset()

label nUnset ( ) const
inline

Definition at line 120 of file meshWavePatchDistMethod.H.

References meshWave::correct(), n, meshWave::operator=(), and y.

Here is the call graph for this function:

◆ correct() [1/2]

bool correct ( volScalarField y)
virtual

Correct the given distance-to-patch field.

Implements patchDistMethod.

Definition at line 76 of file meshWavePatchDistMethod.C.

References GeometricField< Type, PatchField, GeoMesh >::boundaryFieldRef(), Foam::dimLength, patchWave::distance(), forAll, patchWave::nUnset(), patchWave::patchDistance(), patchi, and List< T >::transfer().

Referenced by meshWave::nUnset().

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

◆ correct() [2/2]

◆ operator=()

void operator= ( const meshWave )
delete

Disallow default bitwise assignment.

Referenced by meshWave::nUnset().

Here is the caller graph for this function:

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