DimensionedField< Type, GeoMesh > Class Template Reference

Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a reference to it is maintained. More...

Inheritance diagram for DimensionedField< Type, GeoMesh >:
[legend]

Public Types

typedef GeoMesh::Mesh Mesh
 Type of mesh on which this DimensionedField is instantiated. More...
 
typedef Field< Type > FieldType
 Type of the field from which this DimensionedField is derived. More...
 
typedef Field< Type >::cmptType cmptType
 Component type of the elements of the field. More...
 

Public Member Functions

 TypeName ("DimensionedField")
 Runtime type information. More...
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const dimensionSet &dims, const Field< Type > &field)
 Construct from components. More...
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const dimensionSet &dims, Field< Type > &&field)
 Construct from components, transferring initial field content. More...
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const dimensionSet &dims, List< Type > &&field)
 Construct from components, transferring initial field content. More...
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const dimensionSet &dims, const tmp< Field< Type >> &tfield)
 Construct from components, copy or transfer tmp content. More...
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const dimensionSet &dims, const bool checkIOFlags=true)
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const dimensioned< Type > &dt, const bool checkIOFlags=true)
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const word &fieldDictEntry="value")
 Construct from Istream. More...
 
 DimensionedField (const IOobject &io, const Mesh &mesh, const dictionary &fieldDict, const word &fieldDictEntry="value")
 Construct from dictionary. More...
 
 DimensionedField (const DimensionedField< Type, GeoMesh > &df)
 Copy construct. More...
 
 DimensionedField (DimensionedField< Type, GeoMesh > &&df)
 Move construct. More...
 
 DimensionedField (DimensionedField< Type, GeoMesh > &df, bool reuse)
 Copy construct or reuse (move) as specified. More...
 
 DimensionedField (const tmp< DimensionedField< Type, GeoMesh >> &tdf)
 Construct from tmp<DimensionedField> deleting argument. More...
 
 DimensionedField (const IOobject &io, const DimensionedField< Type, GeoMesh > &df)
 Copy construct, resetting IO parameters. More...
 
 DimensionedField (const IOobject &io, DimensionedField< Type, GeoMesh > &&df)
 Move construct, resetting IO parameters. More...
 
 DimensionedField (const IOobject &io, DimensionedField< Type, GeoMesh > &df, bool reuse)
 Copy or move construct, resetting IO parameters. More...
 
 DimensionedField (const IOobject &io, const tmp< DimensionedField< Type, GeoMesh >> &tdf)
 
 DimensionedField (const word &newName, const DimensionedField< Type, GeoMesh > &df)
 Copy construct with a new name. More...
 
 DimensionedField (const word &newName, DimensionedField< Type, GeoMesh > &&df)
 Move construct with a new name. More...
 
 DimensionedField (const word &newName, DimensionedField< Type, GeoMesh > &df, bool reuse)
 Copy or move construct, resetting name. More...
 
 DimensionedField (const word &newName, const tmp< DimensionedField< Type, GeoMesh >> &tdf)
 Construct with a new name from tmp<DimensionedField> More...
 
tmp< DimensionedField< Type, GeoMesh > > clone () const
 Clone. More...
 
virtual ~DimensionedField ()=default
 Destructor. More...
 
void readField (const dictionary &fieldDict, const word &fieldDictEntry="value")
 
const Meshmesh () const
 Return mesh. More...
 
const dimensionSetdimensions () const
 Return dimensions. More...
 
dimensionSetdimensions ()
 Return non-const access to dimensions. More...
 
const orientedTypeoriented () const
 Return oriented type. More...
 
orientedTypeoriented ()
 Return non-const access to the oriented type. More...
 
void setOriented (const bool oriented=true)
 Set the oriented flag. More...
 
const Field< Type > & field () const
 Return field. More...
 
Field< Type > & field ()
 Return field. More...
 
tmp< DimensionedField< cmptType, GeoMesh > > component (const direction d) const
 Return a component field of the field. More...
 
void replace (const direction d, const DimensionedField< cmptType, GeoMesh > &df)
 Replace a component field of the field. More...
 
void replace (const direction d, const tmp< DimensionedField< cmptType, GeoMesh >> &tdf)
 Replace a component field of the field. More...
 
tmp< DimensionedField< Type, GeoMesh > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
dimensioned< Type > average () const
 Calculate and return arithmetic average. More...
 
dimensioned< Type > weightedAverage (const DimensionedField< scalar, GeoMesh > &weightField) const
 Calculate and return weighted average. More...
 
dimensioned< Type > weightedAverage (const tmp< DimensionedField< scalar, GeoMesh >> &tweightField) const
 Calculate and return weighted average. More...
 
bool writeData (Ostream &os, const word &fieldDictEntry) const
 
bool writeData (Ostream &os) const
 
void operator= (const DimensionedField< Type, GeoMesh > &df)
 
void operator= (const tmp< DimensionedField< Type, GeoMesh >> &tdf)
 
void operator= (const dimensioned< Type > &dt)
 Assign dimensions and value. More...
 
void operator+= (const DimensionedField< Type, GeoMesh > &df)
 
void operator+= (const tmp< DimensionedField< Type, GeoMesh >> &tdf)
 
void operator-= (const DimensionedField< Type, GeoMesh > &df)
 
void operator-= (const tmp< DimensionedField< Type, GeoMesh >> &tdf)
 
void operator*= (const DimensionedField< scalar, GeoMesh > &df)
 
void operator*= (const tmp< DimensionedField< scalar, GeoMesh >> &tdf)
 
void operator/= (const DimensionedField< scalar, GeoMesh > &df)
 
void operator/= (const tmp< DimensionedField< scalar, GeoMesh >> &tdf)
 
void operator+= (const dimensioned< Type > &dt)
 
void operator-= (const dimensioned< Type > &dt)
 
void operator*= (const dimensioned< scalar > &dt)
 
void operator/= (const dimensioned< scalar > &dt)
 
template<>
const word typeName ("volScalarField::Internal")
 
template<>
const word typeName ("volVectorField::Internal")
 
template<>
const word typeName ("volSphericalTensorField::Internal")
 
template<>
const word typeName ("volSymmTensorField::Internal")
 
template<>
const word typeName ("volTensorField::Internal")
 

Static Public Member Functions

static const DimensionedField< Type, GeoMesh > & null ()
 Return a NullObjectRef DimensionedField. More...
 

Friends

Ostreamoperator (Ostream &os, const DimensionedField< Type, GeoMesh > &df)
 
Ostreamoperator (Ostream &os, const tmp< DimensionedField< Type, GeoMesh >> &tdf)
 

Detailed Description

template<class Type, class GeoMesh>
class Foam::DimensionedField< Type, GeoMesh >

Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a reference to it is maintained.

Source files

Definition at line 54 of file DimensionedField.H.

Member Typedef Documentation

◆ Mesh

Type of mesh on which this DimensionedField is instantiated.

Definition at line 86 of file DimensionedField.H.

◆ FieldType

typedef Field<Type> FieldType

Type of the field from which this DimensionedField is derived.

Definition at line 89 of file DimensionedField.H.

◆ cmptType

typedef Field<Type>::cmptType cmptType

Component type of the elements of the field.

Definition at line 92 of file DimensionedField.H.

Constructor & Destructor Documentation

◆ DimensionedField() [1/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const dimensionSet dims,
const Field< Type > &  field 
)

Construct from components.

Definition at line 71 of file DimensionedField.C.

◆ DimensionedField() [2/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const dimensionSet dims,
Field< Type > &&  field 
)

Construct from components, transferring initial field content.

Definition at line 90 of file DimensionedField.C.

◆ DimensionedField() [3/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const dimensionSet dims,
List< Type > &&  field 
)

Construct from components, transferring initial field content.

Definition at line 109 of file DimensionedField.C.

◆ DimensionedField() [4/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const dimensionSet dims,
const tmp< Field< Type >> &  tfield 
)

Construct from components, copy or transfer tmp content.

Definition at line 128 of file DimensionedField.C.

◆ DimensionedField() [5/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const dimensionSet dims,
const bool  checkIOFlags = true 
)

Construct from components, setting the initial size and assigning the dimensions, but not initialising any field values.

Used for temporary fields which are initialised after construction

Definition at line 148 of file DimensionedField.C.

◆ DimensionedField() [6/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const dimensioned< Type > &  dt,
const bool  checkIOFlags = true 
)

Construct from components, setting the initial size and assigning both dimensions and values.

The internal name for the dimensioned<Type> has no influence.

Definition at line 170 of file DimensionedField.C.

◆ DimensionedField() [7/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const word fieldDictEntry = "value" 
)

Construct from Istream.

Definition at line 78 of file DimensionedFieldIO.C.

◆ DimensionedField() [8/20]

DimensionedField ( const IOobject io,
const Mesh mesh,
const dictionary fieldDict,
const word fieldDictEntry = "value" 
)

Construct from dictionary.

Definition at line 96 of file DimensionedFieldIO.C.

◆ DimensionedField() [9/20]

DimensionedField ( const DimensionedField< Type, GeoMesh > &  df)

Copy construct.

Definition at line 192 of file DimensionedField.C.

◆ DimensionedField() [10/20]

Move construct.

Definition at line 206 of file DimensionedField.C.

◆ DimensionedField() [11/20]

DimensionedField ( DimensionedField< Type, GeoMesh > &  df,
bool  reuse 
)

Copy construct or reuse (move) as specified.

Definition at line 216 of file DimensionedField.C.

◆ DimensionedField() [12/20]

DimensionedField ( const tmp< DimensionedField< Type, GeoMesh >> &  tdf)

Construct from tmp<DimensionedField> deleting argument.

Definition at line 231 of file DimensionedField.C.

◆ DimensionedField() [13/20]

DimensionedField ( const IOobject io,
const DimensionedField< Type, GeoMesh > &  df 
)

Copy construct, resetting IO parameters.

Definition at line 243 of file DimensionedField.C.

◆ DimensionedField() [14/20]

DimensionedField ( const IOobject io,
DimensionedField< Type, GeoMesh > &&  df 
)

Move construct, resetting IO parameters.

Definition at line 258 of file DimensionedField.C.

◆ DimensionedField() [15/20]

DimensionedField ( const IOobject io,
DimensionedField< Type, GeoMesh > &  df,
bool  reuse 
)

Copy or move construct, resetting IO parameters.

Definition at line 269 of file DimensionedField.C.

◆ DimensionedField() [16/20]

DimensionedField ( const IOobject io,
const tmp< DimensionedField< Type, GeoMesh >> &  tdf 
)

Construct from tmp<DimensionedField> deleting argument, resetting IO parameters.

Definition at line 285 of file DimensionedField.C.

◆ DimensionedField() [17/20]

DimensionedField ( const word newName,
const DimensionedField< Type, GeoMesh > &  df 
)

Copy construct with a new name.

Definition at line 298 of file DimensionedField.C.

◆ DimensionedField() [18/20]

DimensionedField ( const word newName,
DimensionedField< Type, GeoMesh > &&  df 
)

Move construct with a new name.

Definition at line 313 of file DimensionedField.C.

◆ DimensionedField() [19/20]

DimensionedField ( const word newName,
DimensionedField< Type, GeoMesh > &  df,
bool  reuse 
)

Copy or move construct, resetting name.

Definition at line 324 of file DimensionedField.C.

◆ DimensionedField() [20/20]

DimensionedField ( const word newName,
const tmp< DimensionedField< Type, GeoMesh >> &  tdf 
)

Construct with a new name from tmp<DimensionedField>

Definition at line 340 of file DimensionedField.C.

◆ ~DimensionedField()

virtual ~DimensionedField ( )
virtualdefault

Destructor.

Member Function Documentation

◆ TypeName()

TypeName ( "DimensionedField< Type, GeoMesh >"  )

Runtime type information.

◆ null()

const Foam::DimensionedField< Type, GeoMesh > & null ( )
inlinestatic

Return a NullObjectRef DimensionedField.

Definition at line 33 of file DimensionedFieldI.H.

Referenced by basicSolidChemistryModel::calculateRR(), meshToMesh::mapSrcToTgt(), meshToMesh::mapTgtToSrc(), pointFieldReconstructor::reconstructField(), and basicSolidChemistryModel::RR().

Here is the caller graph for this function:

◆ clone()

Foam::tmp< Foam::DimensionedField< Type, GeoMesh > > clone ( ) const

Clone.

Definition at line 353 of file DimensionedField.C.

◆ readField()

void readField ( const dictionary fieldDict,
const word fieldDictEntry = "value" 
)

Definition at line 35 of file DimensionedFieldIO.C.

◆ mesh()

const GeoMesh::Mesh & mesh ( ) const
inline

◆ dimensions() [1/2]

const Foam::dimensionSet & dimensions ( ) const
inline

Return dimensions.

Definition at line 49 of file DimensionedFieldI.H.

Referenced by Foam::atan2(), Foam::checkMethod(), Foam::cmptAv(), Foam::fvc::domainIntegrate(), volPointInterpolation::interpolate(), Foam::mag(), Foam::magSqr(), DimensionedField< Type, Foam::pointMesh >::operator=(), Foam::pow(), Foam::sqr(), Foam::stabilise(), surfMesh::storeField(), and polySurface::storeField().

Here is the caller graph for this function:

◆ dimensions() [2/2]

Foam::dimensionSet & dimensions ( )
inline

Return non-const access to dimensions.

Definition at line 56 of file DimensionedFieldI.H.

◆ oriented() [1/2]

const Foam::orientedType & oriented ( ) const
inline

Return oriented type.

Definition at line 64 of file DimensionedFieldI.H.

Referenced by DimensionedField< Type, Foam::pointMesh >::operator=().

Here is the caller graph for this function:

◆ oriented() [2/2]

Foam::orientedType & oriented ( )
inline

Return non-const access to the oriented type.

Definition at line 71 of file DimensionedFieldI.H.

◆ setOriented()

void setOriented ( const bool  oriented = true)
inline

Set the oriented flag.

Definition at line 79 of file DimensionedFieldI.H.

◆ field() [1/2]

const Foam::Field< Type > & field ( ) const
inline

Return field.

Definition at line 89 of file DimensionedFieldI.H.

Referenced by Foam::atan2(), Foam::cmptAv(), Foam::mag(), Foam::magSqr(), Foam::pow(), fvFieldReconstructor::reconstructFvVolumeInternalField(), dynamicOversetFvMesh::solve(), Foam::sqr(), Foam::stabilise(), perturbedTemperatureDependentContactAngleForce::theta(), and Foam::fvc::volumeIntegrate().

Here is the caller graph for this function:

◆ field() [2/2]

Foam::Field< Type > & field ( )
inline

Return field.

Definition at line 97 of file DimensionedFieldI.H.

◆ component()

tmp<DimensionedField<cmptType, GeoMesh> > component ( const direction  d) const

Return a component field of the field.

◆ replace() [1/2]

void replace ( const direction  d,
const DimensionedField< cmptType, GeoMesh > &  df 
)

Replace a component field of the field.

◆ replace() [2/2]

void replace ( const direction  d,
const tmp< DimensionedField< cmptType, GeoMesh >> &  tdf 
)

Replace a component field of the field.

◆ T()

Foam::tmp< Foam::DimensionedField< Type, GeoMesh > > T ( ) const

Return the field transpose (only defined for second rank tensors)

Definition at line 426 of file DimensionedField.C.

◆ average()

Foam::dimensioned< Type > average ( ) const

Calculate and return arithmetic average.

Definition at line 447 of file DimensionedField.C.

◆ weightedAverage() [1/2]

Foam::dimensioned< Type > weightedAverage ( const DimensionedField< scalar, GeoMesh > &  weightField) const

Calculate and return weighted average.

Definition at line 461 of file DimensionedField.C.

Referenced by simple::continuityErrors(), and adjointSimple::continuityErrors().

Here is the caller graph for this function:

◆ weightedAverage() [2/2]

Foam::dimensioned< Type > weightedAverage ( const tmp< DimensionedField< scalar, GeoMesh >> &  tweightField) const

Calculate and return weighted average.

Definition at line 477 of file DimensionedField.C.

◆ writeData() [1/2]

bool writeData ( Ostream os,
const word fieldDictEntry 
) const

Definition at line 117 of file DimensionedFieldIO.C.

◆ writeData() [2/2]

bool writeData ( Ostream os) const

Definition at line 135 of file DimensionedFieldIO.C.

◆ operator=() [1/3]

void operator= ( const DimensionedField< Type, GeoMesh > &  df)

Definition at line 491 of file DimensionedField.C.

◆ operator=() [2/3]

void operator= ( const tmp< DimensionedField< Type, GeoMesh >> &  tdf)

Definition at line 510 of file DimensionedField.C.

◆ operator=() [3/3]

void operator= ( const dimensioned< Type > &  dt)

Assign dimensions and value.

Definition at line 532 of file DimensionedField.C.

◆ operator+=() [1/3]

void operator+= ( const DimensionedField< Type, GeoMesh > &  df)

Definition at line 576 of file DimensionedField.C.

◆ operator+=() [2/3]

void operator+= ( const tmp< DimensionedField< Type, GeoMesh >> &  tdf)

Definition at line 576 of file DimensionedField.C.

◆ operator-=() [1/3]

void operator-= ( const DimensionedField< Type, GeoMesh > &  df)

Definition at line 577 of file DimensionedField.C.

◆ operator-=() [2/3]

void operator-= ( const tmp< DimensionedField< Type, GeoMesh >> &  tdf)

Definition at line 577 of file DimensionedField.C.

◆ operator*=() [1/3]

void operator*= ( const DimensionedField< scalar, GeoMesh > &  df)

Definition at line 578 of file DimensionedField.C.

◆ operator*=() [2/3]

void operator*= ( const tmp< DimensionedField< scalar, GeoMesh >> &  tdf)

Definition at line 578 of file DimensionedField.C.

◆ operator/=() [1/3]

void operator/= ( const DimensionedField< scalar, GeoMesh > &  df)

Definition at line 579 of file DimensionedField.C.

◆ operator/=() [2/3]

void operator/= ( const tmp< DimensionedField< scalar, GeoMesh >> &  tdf)

Definition at line 579 of file DimensionedField.C.

◆ operator+=() [3/3]

void operator+= ( const dimensioned< Type > &  dt)

Definition at line 576 of file DimensionedField.C.

◆ operator-=() [3/3]

void operator-= ( const dimensioned< Type > &  dt)

Definition at line 577 of file DimensionedField.C.

◆ operator*=() [3/3]

void operator*= ( const dimensioned< scalar > &  dt)

Definition at line 578 of file DimensionedField.C.

◆ operator/=() [3/3]

void operator/= ( const dimensioned< scalar > &  dt)

Definition at line 579 of file DimensionedField.C.

◆ typeName() [1/5]

const word typeName ( "volScalarField::Internal"  )

◆ typeName() [2/5]

const word typeName ( "volVectorField::Internal"  )

◆ typeName() [3/5]

const word typeName ( "volSphericalTensorField::Internal"  )

◆ typeName() [4/5]

const word typeName ( "volSymmTensorField::Internal"  )

◆ typeName() [5/5]

const word typeName ( "volTensorField::Internal"  )

Friends And Related Function Documentation

◆ operator [1/2]

Ostream& operator ( Ostream os,
const DimensionedField< Type, GeoMesh > &  df 
)
friend

◆ operator [2/2]

Ostream& operator ( Ostream os,
const tmp< DimensionedField< Type, GeoMesh >> &  tdf 
)
friend

The documentation for this class was generated from the following files: