42 void Foam::wallDist::constructn()
const 56 patchDistMethod::patchTypes<vector>(
mesh(), patchIDs_)
64 for (
const label patchi : patchIDs_)
66 nbf[patchi] ==
patches[patchi].nf();
73 Foam::wallDist::wallDist
77 const word& patchTypeName
84 Foam::wallDist::wallDist
87 const word& defaultPatchDistMethod,
89 const word& patchTypeName
94 patchTypeName_(patchTypeName),
99 patchTypeName_ &
"Dist" 109 defaultPatchDistMethod
116 "y" & patchTypeName_,
125 updateInterval_(dict_.getOrDefault<label>(
"updateInterval", 1)),
126 nRequired_(dict_.getOrDefault(
"nRequired", false)),
138 Foam::wallDist::wallDist(
const fvMesh&
mesh,
const word& patchTypeName)
143 mesh.boundaryMesh().findPatchIDs<wallPolyPatch>(),
162 <<
"n requested but 'nRequired' not specified in the " 163 << (patchTypeName_ &
"Dist") <<
" dictionary" <<
nl 164 <<
" Recalculating y and n fields." <<
endl;
168 pdm_->correct(y_, n_.ref());
179 (updateInterval_ != 0)
180 && ((mesh_.time().timeIndex() % updateInterval_) == 0)
183 requireUpdate_ =
true;
186 if (requireUpdate_ && pdm_->movePoints())
190 requireUpdate_ =
false;
194 return pdm_->correct(y_, n_.ref());
198 return pdm_->correct(y_);
208 pdm_->updateMesh(mpm);
214 requireUpdate_ =
true;
const volVectorField & n() const
Return reference to cached normal-to-wall field.
constexpr char nl
The newline '\n' character (0x0a)
wordList patchTypes(nPatches)
virtual ~wallDist()
Destructor.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
GeometricBoundaryField< vector, fvPatchField, volMesh > Boundary
Type of boundary fields.
const dimensionSet dimless
Dimensionless.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
GeometricField< vector, fvPatchField, volMesh > volVectorField
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
A class for handling words, derived from Foam::string.
virtual void updateMesh(const mapPolyMesh &)
Update the y-field when the mesh changes.
virtual bool movePoints()
Update the y-field when the mesh moves.
#define DebugInfo
Report an information message using Foam::Info.
bool isNull(const T *ptr)
True if ptr is a pointer (of type T) to the nullObject.
defineTypeNameAndDebug(combustionModel, 0)
const fvMesh & mesh() const
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
const Time & time() const
Return Time associated with the objectRegistry.
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
Mesh data needed to do the Finite Volume discretisation.
IOobject(const IOobject &)=default
Copy construct.
const polyBoundaryMesh & patches
Interface to run-time selectable methods to calculate the distance-to-wall and normal-to-wall fields...
Defines the attributes of an object for which implicit objectRegistry management is supported...
Specialisation of patchDist for wall distance calculation.
PtrList< fvPatch > fvPatchList
Store lists of fvPatch as a PtrList.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
static constexpr const zero Zero
Global zero (0)