31 template<
class DimensionedFieldType>
36 DimensionedFieldType& field
46 template<
class DimensionedFieldType>
51 DimensionedFieldType& field
55 fieldName_(dff.fieldName_),
56 funcPtr_(dff.funcPtr_, false),
61 template<
class DimensionedFieldType>
65 DimensionedFieldType& field
77 template<
class DimensionedFieldType>
86 this->field_.mesh().template lookupField<scalar>(fieldName_);
96 this->field_.dimensions(),
104 this->field_.primitiveFieldRef() = funcPtr_->value(tx().primitiveField());
108 template<
class DimensionedFieldType>
117 template<
class DimensionedFieldType>
129 if (dictPtr_.valid())
136 this->field_.mesh().template lookupField<scalar>(fieldName_);
142 this->field_.dimensions(),
Base class for run-time selectable internal and patch field initialisation evaluation and update with...
virtual autoPtr< DimensionedFieldFunction< DimensionedFieldType > > clone() const
Construct and return a clone for the specified field.
Field function which looks up another field and uses it as the argument to evaluate a given Foam::Fun...
virtual void evaluate()
Evaluate the function and set the field.
virtual void write(Ostream &os) const
Write data to dictionary stream.
virtual bool update()
Update the field for the current time.
FieldFunction(const dictionary &dict, DimensionedFieldType &field)
Construct with dictionary to initialise given field.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Run-time selectable general function of one variable.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for managing temporary objects.
A class for handling words, derived from string.
const unitSet & lookup(const word &unitName)
Lookup and return the named unit from the table.
void evaluate(GeometricField< Type, GeoMesh > &result, const Function1< Type > &func, const GeometricField< Type, GeoMesh > &x)
void writeEntry(Ostream &os, const word &key, const DimensionedFieldFunction< DimensionedFieldType > &f)