41 #ifndef Foam_DimensionedField_H 42 #define Foam_DimensionedField_H 55 template<
class Type,
class GeoMesh>
class DimensionedField;
57 template<
class Type,
class GeoMesh>
61 const DimensionedField<Type, GeoMesh>& df
64 template<
class Type,
class GeoMesh>
68 const tmp<DimensionedField<Type, GeoMesh>>& tdf
76 template<
class Type,
class GeoMesh>
77 class DimensionedField
116 void checkFieldSize()
const;
119 void readIfPresent(
const word& fieldDictEntry =
"value");
122 void readField(
const word& fieldDictEntry =
"value");
127 template<
class... Args>
147 return NullObjectRef<DimensionedField<Type, GeoMesh>>();
197 const bool checkIOFlags =
true 208 const bool checkIOFlags =
true 219 const bool checkIOFlags =
true 227 const word& fieldDictEntry =
"value" 236 const word& fieldDictEntry =
"value" 476 template<
class AnyType>
489 template<
class AnyType>
509 const word& fieldDictEntry =
"value" 621 friend Ostream& operator<< <Type, GeoMesh>
628 friend Ostream& operator<< <Type, GeoMesh>
tmp< DimensionedField< Type, GeoMesh > > clone() const
Clone.
dimensioned< Type > average() const
Calculate and return arithmetic average.
void replace(const direction d, const DimensionedField< cmptType, GeoMesh > &df)
Replace a component field of the field.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static const DimensionedField< Type, GeoMesh > & null() noexcept
Return a null DimensionedField (reference to a nullObject).
const word & name() const noexcept
Return the object name.
DimensionedField(const IOobject &io, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &field)
Construct from components, copy initial field content.
pTraits< Type >::cmptType cmptType
Component type.
bool is_oriented() const noexcept
True if field is ORIENTED.
orientedType oriented() const noexcept
Return oriented type.
void operator-=(const DimensionedField< Type, GeoMesh > &df)
Class to determine the 'oriented' status of surface fields.
Generic dimensioned Type class.
Field< Type >::cmptType cmptType
Component type of the field elements.
Field< Type > FieldType
Type of the field from which this DimensionedField is derived.
tmp< DimensionedField< cmptType, GeoMesh > > component(const direction d) const
Return a component field of the field.
void operator/=(const DimensionedField< scalar, GeoMesh > &df)
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Generic templated field type.
bool writeData(Ostream &os, const word &fieldDictEntry) const
Write dimensions, oriented flag (if valid) and the field data as a dictionary entry with the specifie...
A class for handling words, derived from Foam::string.
void operator*=(const DimensionedField< scalar, GeoMesh > &df)
void operator=(const DimensionedField< Type, GeoMesh > &df)
void setOriented(bool on=true) noexcept
Set the oriented flag: on/off.
void operator+=(const DimensionedField< Type, GeoMesh > &df)
tmp< DimensionedField< Type, GeoMesh > > T() const
Return the field transpose (only defined for second rank tensors)
TypeName("DimensionedField")
Runtime type information.
virtual ~DimensionedField()
Destructor.
GeoMesh::Mesh Mesh
The mesh type for the DimensionedField.
const Mesh & mesh() const noexcept
Return mesh.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const Field< Type > & field() const noexcept
Return const-reference to the field values.
registerOption
Enumeration for use with registerObject(). Values map to bool (false/true)
static tmp< DimensionedField< Type, GeoMesh > > New(const word &name, IOobjectOption::registerOption regOpt, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &iField)
Return tmp field (NO_READ, NO_WRITE) from name, mesh, dimensions, copy of internal field...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
dimensioned< Type > weightedAverage(const DimensionedField< scalar, GeoMesh > &weightField) const
Calculate and return weighted average.
DimensionedField< Type, GeoMesh > Internal
The DimensionedField is usually synonymous with an internal field.
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
Foam::argList args(argc, argv)
Defines the attributes of an object for which implicit objectRegistry management is supported...
const dimensionSet & dimensions() const noexcept
Return dimensions.