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,
172 if (internalFuncPtr_.valid())
174 if (
mesh.time().completeCase())
176 internalFuncPtr_->evaluate();
182 patchFuncPtrs_[
patchi].evaluate();
196 template<
class Type,
class GeoMesh>
200 const word& funcName,
204 const Type& defaultValue
235 if (internalFuncPtr_.valid())
237 if (
mesh.time().completeCase())
239 internalFuncPtr_->evaluate();
245 patchFuncPtrs_[
patchi].evaluate();
259 template<
class Type,
class GeoMesh>
267 funcName_(udff.funcName_),
271 defaultValue_(udff.defaultValue_)
277 template<
class Type,
class GeoMesh>
284 funcName_(udff.funcName_),
288 defaultValue_(udff.defaultValue_)
296 template<
class Type,
class GeoMesh>
311 if (internalFuncPtr_.valid())
313 internalFuncPtr_->reset();
319 patchFuncPtrs_[
patchi].reset();
332 template<
class Type,
class GeoMesh>
335 if (internalFuncPtr_.valid())
339 result = internalFuncPtr_->update() || result;
345 result = patchFuncPtrs_[
patchi].update() || result;
360 template<
class Type,
class GeoMesh>
363 if (internalFuncPtr_.valid())
365 internalFuncPtr_->write(os);
370 template<
class Type,
class GeoMesh>
377 if (udff.internalFuncPtr_.valid())
379 writeEntry(os, udff.funcName_, udff.internalFuncPtr_());
383 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.
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)