31 template<
class DimensionedFieldType>
35 const objectRegistry& db = this->field_.mesh().db();
39 new searchableSurfaceList
45 searchableSurface::geometryDir(db.time()),
55 values_.setSize(surfacesPtr_().size());
65 this->field_.dimensions(),
66 surfacesDict_.subDict(surfacesPtr_()[i].
name())
75 template<
class DimensionedFieldType>
79 DimensionedFieldType& field
83 defaultValue_(
"defaultValue", this->field_.dimensions(),
dict),
84 surfacesDict_(
dict.subDict(
"surfaces"))
86 readSurfacesAndValues();
90 template<
class DimensionedFieldType>
94 DimensionedFieldType& field
98 defaultValue_(dff.defaultValue_),
99 surfacesDict_(dff.surfacesDict_)
101 readSurfacesAndValues();
105 template<
class DimensionedFieldType>
111 DimensionedFieldType& field
123 template<
class DimensionedFieldType>
126 this->field_ = defaultValue_;
134 typename DimensionedFieldType::GeoMesh_
143 this->field_.mesh().poly()
146 *(values_[i] - this->field_);
151 template<
class DimensionedFieldType>
158 writeEntry(os, surfacesDict_.dictName(), surfacesDict_);
#define forAll(list, i)
Loop across all elements in list.
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.
Dimensioned field function which sets constant values inside a set of surfaces, and a default value e...
Surfaces(const dictionary &dict, DimensionedFieldType &field)
Construct with dictionary to initialise given field.
virtual void evaluate()
Evaluate the function and set the field.
virtual void write(Ostream &os) const
Write data to dictionary stream.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
static word groupName(Name name, const word &group)
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.
tmp< scalarField > insideFraction(const searchableSurface &surface, const polyMesh &mesh)
Return a cell-field of the volume fraction inside the given surface.
const dimensionSet & dimless
String typeName(const std::type_info &info)
Return the un-mangled name given the standard type info.
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)