OpenFOAM logo
Open Source CFD Toolkit

Field Class Template Reference

Inheritance diagram for Field:

Inheritance graph
[legend]
Collaboration diagram for Field:

Collaboration graph
[legend]
List of all members.

template<class Type>
class Foam::Field< Type >


Public Types

typedef pTraits< Type >::cmptType cmptType
 Component type.
typedef SubField< Type > subField
 Declare type of subField.

Public Member Functions

 Field ()
 Construct null.
 Field (const label)
 Construct given size.
 Field (const label, const Type &)
 Construct given size and initial value.
 Field (const UList< Type > &)
 Construct as copy of a UList<Type>.
 Field (const UList< Type > &mapF, const labelList &mapAddressing)
 Construct by 1 to 1 mapping from the given field.
 Field (const tmp< Field< Type > > &tmapF, const labelList &mapAddressing)
 Construct by 1 to 1 mapping from the given tmp field.
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given field.
 Field (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given tmp field.
 Field (const UList< Type > &mapF, const FieldMapper &map)
 Construct by mapping from the given field.
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map)
 Construct by mapping from the given tmp field.
 Field (const Field< Type > &)
 Construct as copy.
 Field (Field< Type > &, bool reUse)
 Construct as copy or re-use as specified.
 Field (const typename Field< Type >::subField &)
 Construct as copy of subField.
 Field (Istream &)
 Construct as copy of tmp<Field> Construct from Istream.
 Field (const word &keyword, const dictionary &dict, const label size)
 Construct from a dictionary entry.
tmp< Field< Type > > clone () const
 Clone.
void map (const UList< Type > &mapF, const labelList &mapAddressing)
 1 to 1 map from the given field
void map (const tmp< Field< Type > > &tmapF, const labelList &mapAddressing)
 1 to 1 map from the given tmp field
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given field.
void map (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given tmp field.
void map (const UList< Type > &mapF, const FieldMapper &map)
 Map from the given field.
void map (const tmp< Field< Type > > &tmapF, const FieldMapper &map)
 Map from the given tmp field.
void autoMap (const FieldMapper &map)
 Map from self.
void rmap (const UList< Type > &mapF, const labelList &mapAddressing)
 1 to 1 reverse-map from the given field
void rmap (const tmp< Field< Type > > &tmapF, const labelList &mapAddressing)
 1 to 1 reverse-map from the given tmp field
void rmap (const UList< Type > &mapF, const labelList &mapAddressing, const scalarList &weights)
 Interpolative reverse map from the given field.
void rmap (const tmp< Field< Type > > &tmapF, const labelList &mapAddressing, const scalarList &weights)
 Interpolative reverse map from the given tmp field.
void negate ()
 Negate this field.
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field.
void replace (const direction, const UList< cmptType > &)
 Replace a component field of the field.
tmp< Field< Type > > T () const
 Return the field transpose (only defined for second rank tensors).
void writeEntry (const word &keyword, Ostream &os) const
 Write the field as a dictionary entry.
void operator= (const Field< Type > &)
void operator= (const UList< Type > &)
 Assignment from UList operator. Takes linear time.
void operator= (const SubField< Type > &)
void operator= (const tmp< Field< Type > > &)
void operator= (const Type &)
 Assignment of all entries to the given value.
void operator+= (const UList< Type > &)
void operator+= (const tmp< Field< Type > > &)
void operator-= (const UList< Type > &)
void operator-= (const tmp< Field< Type > > &)
void operator *= (const UList< scalar > &)
void operator *= (const tmp< Field< scalar > > &)
void operator/= (const UList< scalar > &)
void operator/= (const tmp< Field< scalar > > &)
void operator+= (const Type &)
void operator-= (const Type &)
void operator *= (const scalar &)
void operator/= (const scalar &)

Static Public Member Functions

template<class Type2>
tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 Return a pointer to a new calculatedFvPatchFieldField created on.
Field< Type > & null ()
 Return a null Field.

Static Public Attributes

const char *const typeName

Friends

Ostreamoperator (Ostream &, const Field< Type > &)
Ostreamoperator (Ostream &, const tmp< Field< Type > > &)

Member Typedef Documentation

typedef pTraits<Type>::cmptType cmptType
 

Component type.

Reimplemented in DimensionedField, GeometricField, DimensionedField< Type >, GeometricField< vector, fvPatchField, surfaceMesh >, GeometricField< scalar, fvPatchField, surfaceMesh >, GeometricField< Type, tetPolyPatchField, tetPointMesh >, GeometricField< Type, faPatchField, areaMesh >, GeometricField< vector, PatchField, surfaceMesh >, GeometricField< vector, PatchField, volMesh >, GeometricField< vector, faPatchField, edgeMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, faPatchField, edgeMesh >, GeometricField< Type, faPatchField, edgeMesh >, GeometricField< vector, faPatchField, areaMesh >, GeometricField< Type, fvPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, tetPolyPatchField, tetPointMesh >, GeometricField< scalar, tetPolyPatchField, elementMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< scalar, faPatchField, areaMesh >, and GeometricField< Type, fvPatchField, volMesh >.

Definition at line 88 of file Field.H.

typedef SubField<Type> subField
 

Declare type of subField.

Definition at line 91 of file Field.H.


Constructor & Destructor Documentation

Field  ) 
 

Construct null.

Used for temporary fields which are initialised after construction

Field const   label  )  [explicit]
 

Construct given size.

Used for temporary fields which are initialised after construction

Field const   label,
const Type & 
 

Construct given size and initial value.

Field const UList< Type > &   )  [explicit]
 

Construct as copy of a UList<Type>.

Field const UList< Type > &  mapF,
const labelList mapAddressing
 

Construct by 1 to 1 mapping from the given field.

Field const tmp< Field< Type > > &  tmapF,
const labelList mapAddressing
 

Construct by 1 to 1 mapping from the given tmp field.

Field const UList< Type > &  mapF,
const labelListList mapAddressing,
const scalarListList weights
 

Construct by interpolative mapping from the given field.

Field const tmp< Field< Type > > &  tmapF,
const labelListList mapAddressing,
const scalarListList weights
 

Construct by interpolative mapping from the given tmp field.

Field const UList< Type > &  mapF,
const FieldMapper map
 

Construct by mapping from the given field.

Field const tmp< Field< Type > > &  tmapF,
const FieldMapper map
 

Construct by mapping from the given tmp field.

Field const Field< Type > &   ) 
 

Construct as copy.

Field Field< Type > &  ,
bool  reUse
 

Construct as copy or re-use as specified.

Field const typename Field< Type >::subField< Type > &   ) 
 

Construct as copy of subField.

Field Istream  ) 
 

Construct as copy of tmp<Field> Construct from Istream.

Field const word keyword,
const dictionary dict,
const label  size
 

Construct from a dictionary entry.


Member Function Documentation

void autoMap const FieldMapper map  ) 
 

Map from self.

tmp<Field<Type> > clone  )  const
 

Clone.

Reimplemented from List< Type >.

Reimplemented in BasicSymmetryPointPatchField, FixedValuePointPatchField, MixedPointPatchField, ValueStoredPointPatchField, SlipPointPatchField, SymmetryPointPatchField, curve, basicSymmetryFvPatchField, calculatedFvPatchField, coupledFvPatchField, defaultFvPatchField, emptyFvPatchField, fixedGradientFvPatchField, fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, transformFvPatchField, zeroGradientFvPatchField, cyclicFvPatchField, directionMixedFvPatchField, expDirectionMixedFvPatchField, freestreamFvPatchField, inletOutletFvPatchField, oscillatingFixedValueFvPatchField, outletInletFvPatchField, partialSlipFvPatchField, processorFvPatchField, slipFvPatchField, symmetryFvPatchField, timeVaryingUniformFixedValueFvPatchField, turbulentInletFvPatchField, uniformFixedValueFvPatchField, wedgeFvPatchField, fvPatchField, calculatedFaPatchField, coupledFaPatchField, emptyFaPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, zeroGradientFaPatchField, fixedValueOutflowFaPatchField, faPatchField, BasicSymmetryTetPointPatchField, FixedValueTetPointPatchField, MixedTetPointPatchField, ValueStoredTetPointPatchField, SlipTetPointPatchField, and SymmetryTetPointPatchField.

tmp<Field<cmptType> > component const   direction  )  const
 

Return a component field of the field.

Reimplemented in DimensionedField, GeometricField, DimensionedField< Type >, GeometricField< vector, fvPatchField, surfaceMesh >, GeometricField< scalar, fvPatchField, surfaceMesh >, GeometricField< Type, tetPolyPatchField, tetPointMesh >, GeometricField< Type, faPatchField, areaMesh >, GeometricField< vector, PatchField, surfaceMesh >, GeometricField< vector, PatchField, volMesh >, GeometricField< vector, faPatchField, edgeMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, faPatchField, edgeMesh >, GeometricField< Type, faPatchField, edgeMesh >, GeometricField< vector, faPatchField, areaMesh >, GeometricField< Type, fvPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, tetPolyPatchField, tetPointMesh >, GeometricField< scalar, tetPolyPatchField, elementMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< scalar, faPatchField, areaMesh >, and GeometricField< Type, fvPatchField, volMesh >.

void map const tmp< Field< Type > > &  tmapF,
const FieldMapper map
 

Map from the given tmp field.

void map const UList< Type > &  mapF,
const FieldMapper map
 

Map from the given field.

void map const tmp< Field< Type > > &  tmapF,
const labelListList mapAddressing,
const scalarListList weights
 

Interpolative map from the given tmp field.

void map const UList< Type > &  mapF,
const labelListList mapAddressing,
const scalarListList weights
 

Interpolative map from the given field.

void map const tmp< Field< Type > > &  tmapF,
const labelList mapAddressing
 

1 to 1 map from the given tmp field

void map const UList< Type > &  mapF,
const labelList mapAddressing
 

1 to 1 map from the given field

void negate  ) 
 

Negate this field.

Reimplemented in GeometricField, GeometricField< vector, fvPatchField, surfaceMesh >, GeometricField< scalar, fvPatchField, surfaceMesh >, GeometricField< Type, tetPolyPatchField, tetPointMesh >, GeometricField< Type, faPatchField, areaMesh >, GeometricField< vector, PatchField, surfaceMesh >, GeometricField< vector, PatchField, volMesh >, GeometricField< vector, faPatchField, edgeMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, faPatchField, edgeMesh >, GeometricField< Type, faPatchField, edgeMesh >, GeometricField< vector, faPatchField, areaMesh >, GeometricField< Type, fvPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, tetPolyPatchField, tetPointMesh >, GeometricField< scalar, tetPolyPatchField, elementMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< scalar, faPatchField, areaMesh >, and GeometricField< Type, fvPatchField, volMesh >.

tmp<Field<Type> > NewCalculatedType const Field< Type2 > &  f  )  [inline, static]
 

Return a pointer to a new calculatedFvPatchFieldField created on.

freestore without setting patchField values

Definition at line 192 of file Field.H.

Field<Type>& null  )  [static]
 

Return a null Field.

Reimplemented from List< Type >.

Reimplemented in GeometricField, GeometricField< vector, fvPatchField, surfaceMesh >, GeometricField< scalar, fvPatchField, surfaceMesh >, GeometricField< Type, tetPolyPatchField, tetPointMesh >, GeometricField< Type, faPatchField, areaMesh >, GeometricField< vector, PatchField, surfaceMesh >, GeometricField< vector, PatchField, volMesh >, GeometricField< vector, faPatchField, edgeMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, faPatchField, edgeMesh >, GeometricField< Type, faPatchField, edgeMesh >, GeometricField< vector, faPatchField, areaMesh >, GeometricField< Type, fvPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, tetPolyPatchField, tetPointMesh >, GeometricField< scalar, tetPolyPatchField, elementMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< scalar, faPatchField, areaMesh >, and GeometricField< Type, fvPatchField, volMesh >.

void operator *= const scalar &   ) 
 

void operator *= const tmp< Field< scalar > > &   ) 
 

void operator *= const UList< scalar > &   ) 
 

void operator+= const Type &   ) 
 

Reimplemented in fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, directionMixedFvPatchField, expDirectionMixedFvPatchField, partialSlipFvPatchField, fvPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, fixedValueOutflowFaPatchField, and faPatchField.

void operator+= const tmp< Field< Type > > &   ) 
 

void operator+= const UList< Type > &   ) 
 

void operator-= const Type &   ) 
 

Reimplemented in fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, directionMixedFvPatchField, expDirectionMixedFvPatchField, partialSlipFvPatchField, fvPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, fixedValueOutflowFaPatchField, and faPatchField.

void operator-= const tmp< Field< Type > > &   ) 
 

void operator-= const UList< Type > &   ) 
 

void operator/= const scalar &   ) 
 

void operator/= const tmp< Field< scalar > > &   ) 
 

void operator/= const UList< scalar > &   ) 
 

void operator= const Type &   ) 
 

Assignment of all entries to the given value.

Reimplemented from List< Type >.

Reimplemented in FixedValuePointPatchField, ValueStoredPointPatchField, fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, directionMixedFvPatchField, expDirectionMixedFvPatchField, partialSlipFvPatchField, fvPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, fixedValueOutflowFaPatchField, faPatchField, FixedValueTetPointPatchField, and ValueStoredTetPointPatchField.

void operator= const tmp< Field< Type > > &   ) 
 

void operator= const SubField< Type > &   ) 
 

void operator= const UList< Type > &   ) 
 

Assignment from UList operator. Takes linear time.

Reimplemented from List< Type >.

Reimplemented in fixedValueFvPatchField, mixedFvPatchField, slicedFvPatchField, partialSlipFvPatchField, fvPatchField, fixedGradientFaPatchField, fixedValueFaPatchField, fixedValueOutflowFaPatchField, and faPatchField.

void operator= const Field< Type > &   ) 
 

Reimplemented in IOField, FixedValuePointPatchField, ValueStoredPointPatchField, directionMixedFvPatchField, expDirectionMixedFvPatchField, FixedValueTetPointPatchField, ValueStoredTetPointPatchField, IOField< scalar >, and IOField< vector >.

void replace const   direction,
const UList< cmptType > & 
 

Replace a component field of the field.

void rmap const tmp< Field< Type > > &  tmapF,
const labelList mapAddressing,
const scalarList weights
 

Interpolative reverse map from the given tmp field.

void rmap const UList< Type > &  mapF,
const labelList mapAddressing,
const scalarList weights
 

Interpolative reverse map from the given field.

void rmap const tmp< Field< Type > > &  tmapF,
const labelList mapAddressing
 

1 to 1 reverse-map from the given tmp field

void rmap const UList< Type > &  mapF,
const labelList mapAddressing
 

1 to 1 reverse-map from the given field

tmp<Field<Type> > T  )  const
 

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

Reimplemented in DimensionedField, GeometricField, DimensionedField< Type >, GeometricField< vector, fvPatchField, surfaceMesh >, GeometricField< scalar, fvPatchField, surfaceMesh >, GeometricField< Type, tetPolyPatchField, tetPointMesh >, GeometricField< Type, faPatchField, areaMesh >, GeometricField< vector, PatchField, surfaceMesh >, GeometricField< vector, PatchField, volMesh >, GeometricField< vector, faPatchField, edgeMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, faPatchField, edgeMesh >, GeometricField< Type, faPatchField, edgeMesh >, GeometricField< vector, faPatchField, areaMesh >, GeometricField< Type, fvPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, tetPolyPatchField, tetPointMesh >, GeometricField< scalar, tetPolyPatchField, elementMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< scalar, faPatchField, areaMesh >, and GeometricField< Type, fvPatchField, volMesh >.

void writeEntry const word keyword,
Ostream os
const
 

Write the field as a dictionary entry.

Reimplemented from UList< Type >.


Friends And Related Function Documentation

Ostream& operator Ostream ,
const tmp< Field< Type > > & 
[friend]
 

Ostream& operator Ostream ,
const Field< Type > & 
[friend]
 


Member Data Documentation

const char* const typeName [static]
 

Definition at line 96 of file Field.H.


The documentation for this class was generated from the following file:
For further information go to www.openfoam.org