30 template<
class Type,
class GeoMesh>
40 new SlicedDimensionedField<Type, GeoPatch>
53 this->boundaryFieldRef()[
patchi]
61 template<
class Type,
class GeoMesh>
64 const dictionary&
dict
67 if (!
dict.isDict(funcName_))
return false;
71 DimensionedFieldFunction<DimensionedField<Type, GeoMesh>>::
New
73 dict.subDict(funcName_),
74 this->internalFieldRef()
87 DimensionedFieldFunction<DimensionedField<Type, GeoPatch>>::
New
89 dict.subDict(funcName_),
100 template<
class Type,
class GeoMesh>
103 const FunctionalGeometricField<Type, GeoMesh>& udff
106 if (!udff.internalFuncPtr_.valid())
return;
110 udff.internalFuncPtr_.clone
112 this->internalFieldRef()
125 udff.boundaryFuncPtrs_[
patchi].clone
137 template<
class Type,
class GeoMesh>
141 const word& funcName,
173 if (internalFuncPtr_.valid())
175 if (
mesh.time().completeCase())
177 internalFuncPtr_->evaluate();
183 patchFuncPtrs_[
patchi].evaluate();
197 template<
class Type,
class GeoMesh>
201 const word& funcName,
205 const Type& defaultValue
236 if (internalFuncPtr_.valid())
238 if (
mesh.time().completeCase())
240 internalFuncPtr_->evaluate();
246 patchFuncPtrs_[
patchi].evaluate();
260 template<
class Type,
class GeoMesh>
268 funcName_(udff.funcName_),
272 defaultValue_(udff.defaultValue_)
278 template<
class Type,
class GeoMesh>
285 funcName_(udff.funcName_),
289 defaultValue_(udff.defaultValue_)
297 template<
class Type,
class GeoMesh>
312 if (internalFuncPtr_.valid())
314 internalFuncPtr_->reset();
320 patchFuncPtrs_[
patchi].reset();
333 template<
class Type,
class GeoMesh>
336 if (internalFuncPtr_.valid())
340 result = internalFuncPtr_->update() || result;
346 result = patchFuncPtrs_[
patchi].update() || result;
361 template<
class Type,
class GeoMesh>
364 if (internalFuncPtr_.valid())
366 internalFuncPtr_->write(os);
371 template<
class Type,
class GeoMesh>
378 if (udff.internalFuncPtr_.valid())
380 writeEntry(os, udff.funcName_, udff.internalFuncPtr_());
384 writeEntry(os, udff.funcName_, udff.defaultValue_);
#define forAll(list, i)
Loop across all elements in list.
const dimensionSet & dimensions() const
Return dimensions.
const GeoMesh & mesh() const
Return mesh.
GeometricField with a corresponding run-time selected function to evaluate and update the field.
virtual bool write(const bool write=true) const
Write using setting from DB.
FunctionalGeometricField(const word &name, const word &funcName, const GeoMesh &, const dimensionSet &dimensions, const dictionary &)
Construct from name, mesh, dimensions, field and dictionary.
Generic GeometricField class.
void reset(const GeometricField< Type, GeoMesh, PrimitiveField2 > &)
Reset the field contents to the given field.
void correctBoundaryConditions()
Correct boundary field.
GeoMesh::template PatchField< Type > Patch
Type of the patch field of which the Boundary is composed.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Dimension set for the base types.
Generic dimensioned Type class.
Traits class for primitives.
A class for handling words, derived from string.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
U correctBoundaryConditions()
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)
faceListList boundary(nPatches)