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;
118 void readIfPresent(
const word& fieldDictEntry =
"value");
123 template<
class... Args>
190 const bool checkIOFlags =
true 201 const bool checkIOFlags =
true 212 const bool checkIOFlags =
true 220 const word& fieldDictEntry =
"value" 229 const word& fieldDictEntry =
"value" 458 template<
class AnyType>
471 template<
class AnyType>
491 const word& fieldDictEntry =
"value" 622 #include "DimensionedFieldI.H" 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...
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.
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 readField(const dictionary &fieldDict, const word &fieldDictEntry="value")
Resize to the mesh size and read the field from the dictionary. Internal implementation checks field ...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
static const DimensionedField< Type, GeoMesh > & null()
Return a NullObjectRef DimensionedField.
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 setOriented(bool on=true) noexcept
Set the oriented flag: on/off.
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)
friend Ostream & operator(Ostream &os, const DimensionedField< Type, GeoMesh > &df)
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.