42void Foam::wallDist::constructn()
const
65 for (
const label patchi : patchIDs_)
74Foam::wallDist::wallDist
85Foam::wallDist::wallDist
88 const word& defaultPatchDistMethod,
90 const word& patchTypeName
93 MeshObject_type(
mesh),
95 patchTypeName_(patchTypeName),
100 patchTypeName_ &
"Dist"
110 defaultPatchDistMethod
117 "y" & patchTypeName_,
127 updateInterval_(dict_.getOrDefault<label>(
"updateInterval", 1)),
128 nRequired_(dict_.getOrDefault(
"nRequired", false)),
140Foam::wallDist::wallDist(
const fvMesh&
mesh,
const word& patchTypeName)
145 mesh.boundaryMesh().findPatchIDs<wallPolyPatch>(),
166 return ptr->movePoints();
180 <<
"n requested but 'nRequired' not specified in the "
181 << (patchTypeName_ &
"Dist") <<
" dictionary" <<
nl
182 <<
" Recalculating y and n fields." <<
endl;
186 pdm_->correct(y_, n_.ref());
197 (updateInterval_ > 0)
198 && ((mesh_.time().timeIndex() % updateInterval_) == 0)
201 requireUpdate_ =
true;
204 if (requireUpdate_ && pdm_->movePoints())
208 requireUpdate_ =
false;
212 return pdm_->correct(y_, n_.ref());
216 return pdm_->correct(y_);
226 pdm_->updateMesh(mpm);
232 requireUpdate_ =
true;
GeometricBoundaryField< vector, fvPatchField, volMesh > Boundary
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
@ NO_REGISTER
Do not request registration (bool: false).
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
static FOAM_NO_DANGLING_REFERENCE const wallDist & New(const fvMesh &mesh, Args &&... args)
const fvMesh & mesh() const noexcept
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Mesh data needed to do the Finite Volume discretisation.
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Specialisation of patchDist for wall distance calculation.
static wordList patchTypes(const fvMesh &mesh, const labelHashSet &patchIDs)
Return the patch types for y and n.
Interface to run-time selectable methods to calculate the distance-to-wall and normal-to-wall fields.
virtual bool movePoints()
Update the y-field when the mesh moves.
static bool try_movePoints(const fvMesh &mesh)
Trigger update of y-field for the "wallDist" MeshObject on the given mesh. A no-op if the wallDist is...
virtual void updateMesh(const mapPolyMesh &)
Update the y-field when the mesh changes.
virtual ~wallDist()
Destructor.
const labelHashSet & patchIDs() const noexcept
Return the patchIDs.
const volVectorField & n() const
Return reference to cached normal-to-wall field.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
const polyBoundaryMesh & patches
#define DebugInfo
Report an information message using Foam::Info.
#define WarningInFunction
Report a warning using Foam::Warning.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const dimensionSet dimless
Dimensionless.
PtrList< fvPatch > fvPatchList
Store lists of fvPatch as a PtrList.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0).
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
bool isNull(const T *ptr) noexcept
True if ptr is a pointer (of type T) to the nullObject.
constexpr char nl
The newline '\n' character (0x0a).
wordList patchTypes(nPatches)