Go to the documentation of this file.
42 void Foam::wallDist::constructn()
const
56 patchDistMethod::patchTypes<vector>(
mesh(), patchIDs_)
62 volVectorField::Boundary& nbf = n_.ref().boundaryFieldRef();
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_,
122 patchDistMethod::patchTypes<scalar>(
mesh, patchIDs_)
125 updateInterval_(dict_.getOrDefault<label>(
"updateInterval", 1)),
126 nRequired_(dict_.getOrDefault(
"nRequired",
false)),
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;
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual void updateMesh(const mapPolyMesh &)
Update the y-field when the mesh changes.
A class for handling words, derived from Foam::string.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero (0)
Selector class for finite volume differencing schemes. fvMesh is derived from fvSchemes so that all f...
static word timeName(const scalar t, const int precision=precision_)
IOobject(const IOobject &)=default
Copy construct.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Time & time() const
Return Time associated with the objectRegistry.
dimensioned< vector > dimensionedVector
Dimensioned vector obtained from generic dimensioned type.
PtrList< fvPatch > fvPatchList
container classes for fvPatch
Interface to run-time selectable methods to calculate the distance-to-wall and normal-to-wall fields.
const fvMesh & mesh() const
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool movePoints()
Update the y-field when the mesh moves.
const volVectorField & n() const
Return reference to cached normal-to-wall field.
Mesh data needed to do the Finite Volume discretisation.
GeometricField< vector, fvPatchField, volMesh > volVectorField
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
#define DebugInfo
Report an information message using Foam::Info.
static autoPtr< patchDistMethod > New(const dictionary &dict, const fvMesh &mesh, const labelHashSet &patchIDs, const word &defaultPatchDistMethod=word::null)
static const word null
An empty word.
const polyBoundaryMesh & patches
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const Time & time() const
Return the top-level database.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
bool isNull(const T *ptr)
True if ptr is a pointer (of type T) to the nullObject.
static const GeometricField< vector, fvPatchField, volMesh > & null()
Return a null geometric field.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
virtual ~wallDist()
Destructor.
const dimensionSet dimless
Dimensionless.