wallDistData< TransferType > Class Template Reference

Wall distance calculation. Like wallDist but also transports extra data (template argument). More...

Inheritance diagram for wallDistData< TransferType >:
[legend]
Collaboration diagram for wallDistData< TransferType >:
[legend]

Public Member Functions

 wallDistData (const fvMesh &mesh, GeometricField< Type, fvPatchField, volMesh > &, bool correctWalls=true)
 Construct from mesh and flag whether or not to correct wall. More...
 
virtual ~wallDistData ()
 Destructor. More...
 
const volScalarFieldy () const
 
label nUnset () const
 
const GeometricField< Type, fvPatchField, volMesh > & data () const
 Access field. More...
 
virtual void correct ()
 Correct for mesh geom/topo changes. More...
 
- Public Member Functions inherited from GeometricField< scalar, fvPatchField, volMesh >
 TypeName ("GeometricField")
 Runtime type information. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 Construct given IOobject, mesh, dimensions and patch type. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dimensionSet &ds, const wordList &wantedPatchTypes, const wordList &actualPatchTypes=wordList())
 Construct given IOobject, mesh, dimensions and patch types. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dimensioned< scalar > &dt, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 Construct given IOobject, mesh, dimensioned<Type> and patch type. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dimensioned< scalar > &dt, const wordList &wantedPatchTypes, const wordList &actualPatchTypes=wordList())
 Construct given IOobject, mesh, dimensioned<Type> and patch types. More...
 
 GeometricField (const IOobject &io, const Internal &diField, const PtrList< fvPatchField< scalar >> &ptfl)
 Copy construct from components. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dimensionSet &ds, const Field< scalar > &iField, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 Copy construct from internal field, with specified patch type. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dimensionSet &ds, Field< scalar > &&iField, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 Move construct from internal field, with specified patch type. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dimensionSet &ds, const Field< scalar > &iField, const PtrList< fvPatchField< scalar >> &ptfl)
 Copy construct from components. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const bool readOldTime=true)
 Construct and read given IOobject. More...
 
 GeometricField (const IOobject &io, const Mesh &mesh, const dictionary &dict)
 Construct from dictionary. More...
 
 GeometricField (const GeometricField< scalar, fvPatchField, volMesh > &gf)
 Copy construct. More...
 
 GeometricField (const tmp< GeometricField< scalar, fvPatchField, volMesh >> &tgf)
 Construct from tmp<GeometricField> deleting argument. More...
 
 GeometricField (const IOobject &io, const GeometricField< scalar, fvPatchField, volMesh > &gf)
 Construct as copy resetting IO parameters. More...
 
 GeometricField (const IOobject &io, const tmp< GeometricField< scalar, fvPatchField, volMesh >> &tgf)
 Construct as copy of tmp<GeometricField> resetting IO parameters. More...
 
 GeometricField (const word &newName, const GeometricField< scalar, fvPatchField, volMesh > &gf)
 Copy construct with a new name. More...
 
 GeometricField (const word &newName, const tmp< GeometricField< scalar, fvPatchField, volMesh >> &tgf)
 Construct with a new name from tmp<GeometricField> More...
 
 GeometricField (const IOobject &io, const GeometricField< scalar, fvPatchField, volMesh > &gf, const word &patchFieldType)
 Construct as copy resetting IO parameters and patch type. More...
 
 GeometricField (const IOobject &io, const GeometricField< scalar, fvPatchField, volMesh > &gf, const labelList &patchIDs, const word &patchFieldType)
 
 GeometricField (const IOobject &io, const GeometricField< scalar, fvPatchField, volMesh > &gf, const wordList &patchFieldTypes, const wordList &actualPatchTypes=wordList())
 Construct as copy resetting IO parameters and boundary types. More...
 
 GeometricField (const IOobject &io, const tmp< GeometricField< scalar, fvPatchField, volMesh >> &tgf, const wordList &patchFieldTypes, const wordList &actualPatchTypes=wordList())
 Construct as copy resetting IO parameters and boundary types. More...
 
tmp< GeometricField< scalar, fvPatchField, volMesh > > clone () const
 Clone. More...
 
virtual ~GeometricField ()
 Destructor. More...
 
Internalref (const bool updateAccessTime=true)
 Return a reference to the dimensioned internal field. More...
 
const InternalinternalField () const
 Return a const-reference to the dimensioned internal field. More...
 
const Internalv () const
 
Internal::FieldTypeprimitiveFieldRef (const bool updateAccessTime=true)
 Return a reference to the internal field. More...
 
const Internal::FieldTypeprimitiveField () const
 Return a const-reference to the internal field. More...
 
Boundary & boundaryFieldRef (const bool updateAccessTime=true)
 Return a reference to the boundary field. More...
 
const Boundary & boundaryField () const
 Return const-reference to the boundary field. More...
 
label timeIndex () const
 Return the time index of the field. More...
 
label & timeIndex ()
 Return the time index of the field. More...
 
void storeOldTimes () const
 Store the old-time fields. More...
 
void storeOldTime () const
 Store the old-time field. More...
 
label nOldTimes () const
 Return the number of old time fields stored. More...
 
const GeometricField< scalar, fvPatchField, volMesh > & oldTime () const
 Return old time field. More...
 
GeometricField< scalar, fvPatchField, volMesh > & oldTime ()
 Return non-const old time field. More...
 
void storePrevIter () const
 Store the field as the previous iteration value. More...
 
const GeometricField< scalar, fvPatchField, volMesh > & prevIter () const
 Return previous iteration field. More...
 
void correctBoundaryConditions ()
 Correct boundary field. More...
 
bool needReference () const
 Does the field need a reference level for solution. More...
 
tmp< GeometricField< cmptType, fvPatchField, volMesh > > component (const direction) const
 Return a component of the field. More...
 
tmp< GeometricField< scalar, faPatchField, areaMesh > > component (const direction) const
 
tmp< GeometricField< scalar, faPatchField, areaMesh > > component (const direction) const
 
tmp< GeometricField< scalar, fvPatchField, volMesh > > component (const direction) const
 
tmp< GeometricField< scalar, fvPatchField, volMesh > > component (const direction) const
 
bool writeData (Ostream &) const
 WriteData member function required by regIOobject. More...
 
tmp< GeometricField< scalar, fvPatchField, volMesh > > T () const
 Return transpose (only if it is a tensor field) More...
 
void relax (const scalar alpha)
 Relax field (for steady-state solution). More...
 
void relax ()
 Relax field (for steady-state solution). More...
 
word select (bool final) const
 Select the final iteration parameters if `final' is true. More...
 
void writeMinMax (Ostream &os) const
 Helper function to write the min and max to an Ostream. More...
 
void negate ()
 Negate the field inplace. More...
 
void replace (const direction d, const GeometricField< cmptType, fvPatchField, volMesh > &gcf)
 Replace specified field component with content from another field. More...
 
void replace (const direction d, const dimensioned< cmptType > &ds)
 Replace specified field component with specified value. More...
 
void replace (const direction, const GeometricField< scalar, faPatchField, areaMesh > &gsf)
 
void replace (const direction, const GeometricField< scalar, faPatchField, areaMesh > &sf)
 
void replace (const direction, const GeometricField< scalar, fvPatchField, volMesh > &gsf)
 
void replace (const direction, const GeometricField< scalar, fvPatchField, volMesh > &sf)
 
void min (const dimensioned< scalar > &dt)
 Use the minimum of the field and specified value. More...
 
void max (const dimensioned< scalar > &dt)
 Use the maximum of the field and specified value. More...
 
void clip (const dimensioned< MinMax< scalar >> &range)
 Clip the field to be bounded within the specified range. More...
 
void clip (const dimensioned< scalar > &minVal, const dimensioned< scalar > &maxVal)
 Clip the field to be bounded within the specified range. More...
 
void maxMin (const dimensioned< scalar > &minVal, const dimensioned< scalar > &maxVal)
 Deprecated(2019-01) identical to clip() More...
 
const Internaloperator() () const
 Return a const-reference to the dimensioned internal field. More...
 
void operator= (const GeometricField< scalar, fvPatchField, volMesh > &)
 
void operator= (const tmp< GeometricField< scalar, fvPatchField, volMesh >> &)
 
void operator= (const dimensioned< scalar > &)
 
void operator== (const tmp< GeometricField< scalar, fvPatchField, volMesh >> &)
 
void operator== (const dimensioned< scalar > &)
 
void operator+= (const GeometricField< scalar, fvPatchField, volMesh > &)
 
void operator+= (const tmp< GeometricField< scalar, fvPatchField, volMesh >> &)
 
void operator+= (const dimensioned< scalar > &)
 
void operator-= (const GeometricField< scalar, fvPatchField, volMesh > &)
 
void operator-= (const tmp< GeometricField< scalar, fvPatchField, volMesh >> &)
 
void operator-= (const dimensioned< scalar > &)
 
void operator*= (const GeometricField< scalar, fvPatchField, volMesh > &)
 
void operator*= (const tmp< GeometricField< scalar, fvPatchField, volMesh >> &)
 
void operator*= (const dimensioned< scalar > &)
 
void operator/= (const GeometricField< scalar, fvPatchField, volMesh > &)
 
void operator/= (const tmp< GeometricField< scalar, fvPatchField, volMesh >> &)
 
void operator/= (const dimensioned< scalar > &)
 
- Public Member Functions inherited from cellDistFuncs
 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
 

Additional Inherited Members

- Public Types inherited from GeometricField< scalar, fvPatchField, volMesh >
typedef volMesh ::Mesh Mesh
 Type of mesh on which this GeometricField is instantiated. More...
 
typedef volMesh ::BoundaryMesh BoundaryMesh
 
typedef DimensionedField< scalar, volMeshInternal
 Type of the internal field from which this GeometricField is derived. More...
 
typedef fvPatchField< scalar > Patch
 
typedef Field< scalar >::cmptType cmptType
 
- Static Public Member Functions inherited from GeometricField< scalar, fvPatchField, volMesh >
static const GeometricField< scalar, fvPatchField, volMesh > & null ()
 Return a null geometric field. More...
 
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New (const word &name, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 Return tmp field from name, mesh, dimensions and patch type. More...
 
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New (const word &name, const Mesh &mesh, const dimensionSet &ds, const Field< scalar > &iField, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New (const word &name, const Mesh &mesh, const dimensionSet &ds, Field< scalar > &&iField, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New (const word &name, const Mesh &mesh, const dimensioned< scalar > &dt, const word &patchFieldType=fvPatchField< scalar >::calculatedType())
 
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New (const word &name, const Mesh &mesh, const dimensioned< scalar > &dt, const wordList &patchFieldTypes, const wordList &actualPatchTypes=wordList())
 
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New (const word &newName, const tmp< GeometricField< scalar, fvPatchField, volMesh >> &tgf)
 Return renamed tmp field. More...
 
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New (const word &newName, const tmp< GeometricField< scalar, fvPatchField, volMesh >> &tgf, const wordList &patchFieldTypes, const wordList &actualPatchTypes=wordList())
 Rename tmp field and reset patch field types and return. More...
 

Detailed Description

template<class TransferType>
class Foam::wallDistData< TransferType >

Wall distance calculation. Like wallDist but also transports extra data (template argument).

Used for e.g reflection vector calculation or vanDriest damping.

Templated on two parameters:

  • TransferType: type of overall data transported (e.g. wallPointData<vector>)
Source files

Definition at line 59 of file wallDistData.H.

Constructor & Destructor Documentation

◆ wallDistData()

wallDistData ( const fvMesh mesh,
GeometricField< Type, fvPatchField, volMesh > &  field,
bool  correctWalls = true 
)

Construct from mesh 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 38 of file wallDistData.C.

References correct().

Here is the call graph for this function:

◆ ~wallDistData()

~wallDistData ( )
virtual

Destructor.

Definition at line 67 of file wallDistData.C.

Member Function Documentation

◆ y()

const volScalarField& y ( ) const
inline

Definition at line 113 of file wallDistData.H.

◆ nUnset()

label nUnset ( ) const
inline

Definition at line 118 of file wallDistData.H.

◆ data()

const GeometricField<Type, fvPatchField, volMesh>& data ( ) const
inline

Access field.

Definition at line 124 of file wallDistData.H.

◆ correct()

void correct ( )
virtual

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