OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

Field< Type > Class Template Reference

Generic templated field type. More...

Inheritance diagram for Field< Type >:
Collaboration diagram for Field< Type >:

List of all members.


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 Xfer< List< Type > > &)
 Construct by transferring the List contents.
 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 Xfer< Field< Type > > &)
 Construct by transferring the Field contents.
 Field (const typename Field< Type >::subField &)
 Construct as copy of subField.
 Field (Istream &)
 Construct as copy of tmp<Field>.
 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.
void replace (const direction, const tmp< Field< cmptType > > &)
 Replace a component field of the field.
void replace (const direction, const 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.
template<class Form , class Cmpt , int nCmpt>
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
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 &)
template<class Type>
void operator= (const tmp< Field > &rhs)

Static Public Member Functions

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

Static Public Attributes

static const char *const typeName

Friends

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

Detailed Description

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

Generic templated field type.

Source files

Definition at line 73 of file Field.H.


Member Typedef Documentation

Declare type of subField.

Definition at line 85 of file Field.H.


Constructor & Destructor Documentation

Field (  )  [inline]

Construct null.

Used for temporary fields which are initialised after construction

Definition at line 37 of file Field.C.

Field ( const label  size  )  [inline, explicit]

Construct given size.

Used for temporary fields which are initialised after construction

Definition at line 44 of file Field.C.

Field ( const label  size,
const Type &  t 
) [inline]

Construct given size and initial value.

Definition at line 51 of file Field.C.

Field ( const UList< Type > &  list  )  [inline, explicit]

Construct as copy of a UList<Type>.

Definition at line 171 of file Field.C.

Field ( const Xfer< List< Type > > &  f  )  [inline, explicit]

Construct by transferring the List contents.

Definition at line 150 of file Field.C.

Field ( const UList< Type > &  mapF,
const labelList &  mapAddressing 
) [inline]

Construct by 1 to 1 mapping from the given field.

Definition at line 59 of file Field.C.

Field ( const tmp< Field< Type > > &  tmapF,
const labelList &  mapAddressing 
) [inline]

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

Definition at line 71 of file Field.C.

References Field< Type >::map().

Here is the call graph for this function:

Field ( const UList< Type > &  mapF,
const labelListList &  mapAddressing,
const scalarListList &  weights 
) [inline]

Construct by interpolative mapping from the given field.

Definition at line 84 of file Field.C.

Field ( const tmp< Field< Type > > &  tmapF,
const labelListList &  mapAddressing,
const scalarListList &  weights 
) [inline]

Construct by interpolative mapping from the given tmp field.

Definition at line 97 of file Field.C.

References Field< Type >::map().

Here is the call graph for this function:

Field ( const UList< Type > &  mapF,
const FieldMapper &  map 
) [inline]

Construct by mapping from the given field.

Definition at line 111 of file Field.C.

Field ( const tmp< Field< Type > > &  tmapF,
const FieldMapper &  map 
) [inline]

Construct by mapping from the given tmp field.

Definition at line 123 of file Field.C.

References Field< Type >::map().

Here is the call graph for this function:

Field ( const Field< Type > &  f  )  [inline]

Construct as copy.

Definition at line 135 of file Field.C.

References Field< Type >::map().

Here is the call graph for this function:

Field ( Field< Type > &  f,
bool  reUse 
) [inline]

Construct as copy or re-use as specified.

Definition at line 143 of file Field.C.

Field ( const Xfer< Field< Type > > &  f  )  [inline]

Construct by transferring the Field contents.

Definition at line 157 of file Field.C.

Field ( const typename Field< Type >::subField< Type > &  sf  )  [inline]

Construct as copy of subField.

Definition at line 164 of file Field.C.

Field ( Istream &  is  )  [inline]

Construct as copy of tmp<Field>.

Construct from Istream

Definition at line 190 of file Field.C.

References tf.

Field ( const word &  keyword,
const dictionary &  dict,
const label  size 
) [inline]

Construct from a dictionary entry.

Definition at line 198 of file Field.C.


Member Function Documentation

tmp< Field< Type > > clone (  )  const [inline]

Clone.

Reimplemented from List< Type >.

Reimplemented in basicSymmetryFvPatchField< Type >, calculatedFvPatchField< Type >, coupledFvPatchField< Type >, directionMixedFvPatchField< Type >, fixedGradientFvPatchField< Type >, fixedValueFvPatchField< Type >, genericFvPatchField< Type >, mixedFvPatchField< Type >, slicedFvPatchField< Type >, transformFvPatchField< Type >, zeroGradientFvPatchField< Type >, cyclicFvPatchField< Type >, emptyFvPatchField< Type >, processorFvPatchField< Type >, symmetryFvPatchField< Type >, wedgeFvPatchField< Type >, advectiveFvPatchField< Type >, directMappedFixedValueFvPatchField< Type >, expDirectionMixedFvPatchField< Type >, fanFvPatchField< Type >, fixedInternalValueFvPatchField< Type >, fixedNormalSlipFvPatchField< Type >, freestreamFvPatchField< Type >, inletOutletFvPatchField< Type >, oscillatingFixedValueFvPatchField< Type >, outletInletFvPatchField< Type >, partialSlipFvPatchField< Type >, slipFvPatchField< Type >, timeVaryingMappedFixedValueFvPatchField< Type >, timeVaryingUniformFixedValueFvPatchField< Type >, turbulentInletFvPatchField< Type >, uniformFixedValueFvPatchField< Type >, waveTransmissiveFvPatchField< Type >, fvPatchField< Type >, calculatedFvsPatchField< Type >, coupledFvsPatchField< Type >, fixedValueFvsPatchField< Type >, slicedFvsPatchField< Type >, cyclicFvsPatchField< Type >, emptyFvsPatchField< Type >, processorFvsPatchField< Type >, symmetryFvsPatchField< Type >, wedgeFvsPatchField< Type >, fvsPatchField< Type >, cellMotionFvPatchField< Type >, surfaceSlipDisplacementFvPatchField< Type >, angularOscillatingDisplacementPointPatchVectorField, angularOscillatingVelocityPointPatchVectorField, oscillatingDisplacementPointPatchVectorField, oscillatingVelocityPointPatchVectorField, DimensionedField< Type, GeoMesh >, DynamicField< Type >, fixedValuePointPatchField< Type >, mixedPointPatchField< Type >, valuePointPatchField< Type >, timeVaryingUniformFixedValuePointPatchField< Type >, uniformFixedValuePointPatchField< Type >, epsilonWallFunctionFvPatchScalarField, kqRWallFunctionFvPatchField< Type >, omegaWallFunctionFvPatchScalarField, epsilonWallFunctionFvPatchScalarField, kqRWallFunctionFvPatchField< Type >, omegaWallFunctionFvPatchScalarField, mixedFixedValueSlipFvPatchField< Type >, phase, basicSymmetryFvPatchField< Type >, calculatedFvPatchField< Type >, coupledFvPatchField< Type >, fixedValueFvPatchField< Type >, mixedFvPatchField< Type >, transformFvPatchField< Type >, zeroGradientFvPatchField< scalar >, zeroGradientFvPatchField< Type >, cyclicFvPatchField< Type >, advectiveFvPatchField< Type >, fixedInternalValueFvPatchField< scalar >, inletOutletFvPatchField< Type >, slipFvPatchField< Type >, fvPatchField< scalar >, fvPatchField< Type >, coupledFvsPatchField< Type >, fvsPatchField< Type >, DimensionedField< scalar, volMesh >, DimensionedField< scalar, pointMesh >, DimensionedField< symmTensor, volMesh >, DimensionedField< vector, pointMesh >, DimensionedField< Type, GeoMesh >, DimensionedField< Type, volMesh >, DimensionedField< scalar, surfaceMesh >, DimensionedField< vector, volMesh >, DimensionedField< Type, pointMesh >, DimensionedField< Type, surfaceMesh >, DimensionedField< tensor, volMesh >, fixedValuePointPatchField< vector >, fixedValuePointPatchField< Type >, valuePointPatchField< Type >, and valuePointPatchField< vector >.

Definition at line 280 of file Field.C.

static 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 200 of file Field.H.

void map ( const UList< Type > &  mapF,
const labelList &  mapAddressing 
) [inline]

1 to 1 map from the given field

Definition at line 290 of file Field.C.

Referenced by Field< Type >::autoMap(), Field< Type >::Field(), and Field< Type >::map().

Here is the caller graph for this function:

void map ( const tmp< Field< Type > > &  tmapF,
const labelList &  mapAddressing 
) [inline]

1 to 1 map from the given tmp field

Definition at line 319 of file Field.C.

void map ( const UList< Type > &  mapF,
const labelListList &  mapAddressing,
const scalarListList &  weights 
) [inline]

Interpolative map from the given field.

Definition at line 331 of file Field.C.

References Field< Type >::map().

Here is the call graph for this function:

void map ( const tmp< Field< Type > > &  tmapF,
const labelListList &  mapAddressing,
const scalarListList &  weights 
) [inline]

Interpolative map from the given tmp field.

Definition at line 375 of file Field.C.

void map ( const UList< Type > &  mapF,
const FieldMapper &  map 
) [inline]

Map from the given field.

Definition at line 388 of file Field.C.

References Field< Type >::map().

Here is the call graph for this function:

void map ( const tmp< Field< Type > > &  tmapF,
const FieldMapper &  map 
) [inline]

Map from the given tmp field.

Definition at line 410 of file Field.C.

void autoMap ( const FieldMapper &  map  )  [inline]

void rmap ( const UList< Type > &  mapF,
const labelList &  mapAddressing 
) [inline]

1 to 1 reverse-map from the given field

Definition at line 448 of file Field.C.

References setSize(), and FieldMapper::size().

Here is the call graph for this function:

void rmap ( const tmp< Field< Type > > &  tmapF,
const labelList &  mapAddressing 
) [inline]

1 to 1 reverse-map from the given tmp field

Definition at line 468 of file Field.C.

void rmap ( const UList< Type > &  mapF,
const labelList &  mapAddressing,
const scalarList &  weights 
) [inline]

Interpolative reverse map from the given field.

Definition at line 480 of file Field.C.

void rmap ( const tmp< Field< Type > > &  tmapF,
const labelList &  mapAddressing,
const scalarList &  weights 
) [inline]

Interpolative reverse map from the given tmp field.

Definition at line 498 of file Field.C.

void replace ( const direction  d,
const UList< cmptType > &  sf 
) [inline]

Replace a component field of the field.

Definition at line 530 of file Field.C.

References component().

Referenced by GeometricField< Type, PatchField, GeoMesh >::max(), GeometricField< Type, PatchField, GeoMesh >::replace(), FieldField< Field, Type >::replace(), Field< Type >::replace(), Field< Type >::T(), and FieldField< Field, Type >::T().

Here is the call graph for this function:

Here is the caller graph for this function:

void replace ( const direction  d,
const tmp< Field< cmptType > > &  tsf 
) [inline]

Replace a component field of the field.

Definition at line 542 of file Field.C.

References Field< Type >::replace(), sf(), and TFOR_ALL_F_OP_FUNC_S_F.

Here is the call graph for this function:

void replace ( const direction  d,
const cmptType &  c 
) [inline]

Replace a component field of the field.

Definition at line 554 of file Field.C.

void writeEntry ( const word &  keyword,
Ostream &  os 
) const [inline]

Write the field as a dictionary entry.

Reimplemented from UList< Type >.

Definition at line 574 of file Field.C.

References T.

void operator= ( const SubField< Type > &  rhs  )  [inline]

Definition at line 626 of file Field.C.

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

void operator= ( const VectorSpace< Form, Cmpt, nCmpt > &  vs  )  [inline]

Definition at line 665 of file Field.C.

void operator+= ( const UList< Type > &  f  )  [inline]

Definition at line 693 of file Field.C.

Referenced by fvPatchField< Type >::operator-=().

Here is the caller graph for this function:

void operator+= ( const tmp< Field< Type > > &  tf  )  [inline]

Definition at line 693 of file Field.C.

void operator-= ( const UList< Type > &  f  )  [inline]

Definition at line 694 of file Field.C.

Referenced by fvPatchField< Type >::operator*=().

Here is the caller graph for this function:

void operator-= ( const tmp< Field< Type > > &  tf  )  [inline]

Definition at line 694 of file Field.C.

void operator*= ( const UList< scalar > &  f  )  [inline]

Definition at line 695 of file Field.C.

Referenced by fvPatchField< Type >::operator/=().

Here is the caller graph for this function:

void operator*= ( const tmp< Field< scalar > > &  tf  )  [inline]

Definition at line 695 of file Field.C.

void operator/= ( const UList< scalar > &  f  )  [inline]

Definition at line 696 of file Field.C.

Referenced by fvPatchField< Type >::operator=(), and fvPatchField< Type >::operator==().

Here is the caller graph for this function:

void operator/= ( const tmp< Field< scalar > > &  tf  )  [inline]

Definition at line 696 of file Field.C.

void operator*= ( const scalar &  t  )  [inline]

Definition at line 695 of file Field.C.

void operator/= ( const scalar &  t  )  [inline]

Definition at line 696 of file Field.C.

void operator= ( const tmp< Field< Type > > &  rhs  )  [inline]

Definition at line 640 of file Field.C.


Friends And Related Function Documentation

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

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


Member Data Documentation

const char *const typeName [inline, static]

Reimplemented in DynamicField< Type >.

Definition at line 90 of file Field.H.

Referenced by Foam::MapGeometricFields().


The documentation for this class was generated from the following files:
  • src/OpenFOAM/fields/Fields/Field/Field.H
  • src/OpenFOAM/fields/Fields/Field/Field.C
Copyright © 2000-2009 OpenCFD Ltd