42 void Foam::wallDist::constructn()
const 57 patchDistMethod::patchTypes<vector>(
mesh(), patchIDs_)
65 for (
const label patchi : patchIDs_)
67 nbf[patchi] ==
patches[patchi].nf();
74 Foam::wallDist::wallDist
78 const word& patchTypeName
85 Foam::wallDist::wallDist
88 const word& defaultPatchDistMethod,
90 const word& patchTypeName
95 patchTypeName_(patchTypeName),
100 patchTypeName_ &
"Dist" 110 defaultPatchDistMethod
117 "y" & patchTypeName_,
127 updateInterval_(dict_.getOrDefault<label>(
"updateInterval", 1)),
128 nRequired_(dict_.getOrDefault(
"nRequired", false)),
140 Foam::wallDist::wallDist(
const fvMesh&
mesh,
const word& patchTypeName)
145 mesh.boundaryMesh().findPatchIDs<wallPolyPatch>(),
164 <<
"n requested but 'nRequired' not specified in the " 165 << (patchTypeName_ &
"Dist") <<
" dictionary" <<
nl 166 <<
" Recalculating y and n fields." <<
endl;
170 pdm_->correct(y_, n_.ref());
181 (updateInterval_ > 0)
182 && ((mesh_.time().timeIndex() % updateInterval_) == 0)
185 requireUpdate_ =
true;
188 if (requireUpdate_ && pdm_->movePoints())
192 requireUpdate_ =
false;
196 return pdm_->correct(y_, n_.ref());
200 return pdm_->correct(y_);
210 pdm_->updateMesh(mpm);
216 requireUpdate_ =
true;
const labelList patchIDs(pbm.patchSet(polyPatchNames, false, true).sortedToc())
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.
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.
GeometricBoundaryField< vector, fvPatchField, volMesh > Boundary
Type of boundary fields.
const dimensionSet dimless
Dimensionless.
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...
const fvMesh & mesh() const noexcept
Reference 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.
const Time & time() const noexcept
Return Time associated with the objectRegistry.
bool isNull(const T *ptr)
True if ptr is a pointer (of type T) to the nullObject.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
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.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
const polyBoundaryMesh & patches
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
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.
Do not request registration (bool: false)
PtrList< fvPatch > fvPatchList
Store lists of fvPatch as a PtrList.
static constexpr const zero Zero
Global zero (0)