Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends
Field Class Reference

Pre-declare SubField and related Field type. More...

Inheritance diagram for Field:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 Field ()
 Construct null. More...
 
 Field (const label)
 Construct given size. More...
 
 Field (const label, const Type &)
 Construct given size and initial value. More...
 
 Field (const UList< Type > &)
 Construct as copy of a UList<Type> More...
 
 Field (const Xfer< List< Type > > &)
 Construct by transferring the List contents. More...
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 Construct by 1 to 1 mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given tmp field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Construct by mapping from the given tmp field. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 Construct by mapping from the given tmp field. Supplied uniform. More...
 
 Field (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 Construct by mapping from the given tmp field. Supplied values. More...
 
 Field (const Field< Type > &)
 Construct as copy. More...
 
 Field (Field< Type > &, bool reUse)
 Construct as copy or re-use as specified. More...
 
 Field (const Xfer< Field< Type > > &)
 Construct by transferring the Field contents. More...
 
 Field (const tmp< Field< Type > > &)
 Construct as copy of tmp<Field> More...
 
 Field (Istream &)
 Construct from Istream. More...
 
 Field (const word &keyword, const dictionary &, const label size)
 Construct from a dictionary entry. More...
 
tmp< Field< Type > > clone () const
 Clone. More...
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 map from the given field More...
 
void map (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 1 to 1 map from the given tmp field More...
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given field. More...
 
void map (const tmp< Field< Type > > &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 Interpolative map from the given tmp field. More...
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given field. More...
 
void map (const tmp< Field< Type > > &tmapF, const FieldMapper &map, const bool applyFlip=true)
 Map from the given tmp field. More...
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 Map from self. More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given field More...
 
void rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing)
 1 to 1 reverse-map from the given tmp field More...
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given field. More...
 
void rmap (const tmp< Field< Type > > &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 Interpolative reverse map from the given tmp field. More...
 
void negate ()
 Negate this field. More...
 
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field. More...
 
void replace (const direction, const UList< cmptType > &)
 Replace a component field of the field. More...
 
void replace (const direction, const tmp< Field< cmptType > > &)
 Replace a component field of the field. More...
 
void replace (const direction, const cmptType &)
 Replace a component field of the field. More...
 
tmp< Field< Type > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
void writeEntry (const word &keyword, Ostream &os) const
 Write the field as a dictionary entry. More...
 
void operator= (const Field< Type > &)
 
void operator= (const UList< Type > &)
 
void operator= (const SubField< Type > &)
 
void operator= (const tmp< Field< Type > > &)
 
void operator= (const Type &)
 
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 Field< Type > &rhs)
 
template<class Type >
void operator= (const SubField< Type > &rhs)
 
template<class Type >
void operator= (const UList< Type > &rhs)
 
template<class Type >
void operator= (const tmp< Field > &rhs)
 
template<class Type >
void operator= (const Type &t)
 

Static Public Member Functions

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

Static Public Attributes

static const char *const typeName
 

Friends

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

Detailed Description

Pre-declare SubField and related Field type.

Generic templated field type.

Source files

Definition at line 57 of file Field.H.

Member Typedef Documentation

◆ cmptType

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 86 of file Field.H.

◆ subField

typedef SubField<Type> subField

Declare type of subField.

Definition at line 89 of file Field.H.

Constructor & Destructor Documentation

◆ Field() [1/21]

Field ( )

Construct null.

Used for temporary fields which are initialised after construction

Definition at line 42 of file Field.C.

◆ Field() [2/21]

Field ( const  label)
explicit

Construct given size.

Used for temporary fields which are initialised after construction

◆ Field() [3/21]

Field ( const  label,
const Type &   
)

Construct given size and initial value.

◆ Field() [4/21]

Field ( const UList< Type > &  )
explicit

Construct as copy of a UList<Type>

◆ Field() [5/21]

Field ( const Xfer< List< Type > > &  )
explicit

Construct by transferring the List contents.

◆ Field() [6/21]

Field ( const UList< Type > &  mapF,
const labelUList mapAddressing 
)

Construct by 1 to 1 mapping from the given field.

Definition at line 64 of file Field.C.

◆ Field() [7/21]

Field ( const tmp< Field< Type > > &  tmapF,
const labelUList mapAddressing 
)

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

Definition at line 77 of file Field.C.

◆ Field() [8/21]

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

Construct by interpolative mapping from the given field.

◆ Field() [9/21]

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

Construct by interpolative mapping from the given tmp field.

◆ Field() [10/21]

Field ( const UList< Type > &  mapF,
const FieldMapper map,
const bool  applyFlip = true 
)

Construct by mapping from the given field.

◆ Field() [11/21]

Field ( const UList< Type > &  mapF,
const FieldMapper map,
const Type &  defaultValue,
const bool  applyFlip = true 
)

Construct by mapping from the given field.

◆ Field() [12/21]

Field ( const UList< Type > &  mapF,
const FieldMapper map,
const UList< Type > &  defaultValues,
const bool  applyFlip = true 
)

Construct by mapping from the given field.

◆ Field() [13/21]

Field ( const tmp< Field< Type > > &  tmapF,
const FieldMapper map,
const bool  applyFlip = true 
)

Construct by mapping from the given tmp field.

◆ Field() [14/21]

Field ( const tmp< Field< Type > > &  tmapF,
const FieldMapper map,
const Type &  defaultValue,
const bool  applyFlip = true 
)

Construct by mapping from the given tmp field. Supplied uniform.

value for unmapped items

◆ Field() [15/21]

Field ( const tmp< Field< Type > > &  tmapF,
const FieldMapper map,
const UList< Type > &  defaultValues,
const bool  applyFlip = true 
)

Construct by mapping from the given tmp field. Supplied values.

for unmapped items

◆ Field() [16/21]

Field ( const Field< Type > &  )

Construct as copy.

◆ Field() [17/21]

Field ( Field< Type > &  ,
bool  reUse 
)

Construct as copy or re-use as specified.

◆ Field() [18/21]

Field ( const Xfer< Field< Type > > &  )

Construct by transferring the Field contents.

◆ Field() [19/21]

Field ( const tmp< Field< Type > > &  )

Construct as copy of tmp<Field>

◆ Field() [20/21]

Field ( Istream )

Construct from Istream.

◆ Field() [21/21]

Field ( const word keyword,
const dictionary ,
const label  size 
)

Construct from a dictionary entry.

Member Function Documentation

◆ null()

static const Field<Type>& null ( )
inlinestatic

◆ clone()

Foam::tmp< Foam::Field< Type > > clone ( ) const

Clone.

Definition at line 335 of file Field.C.

◆ NewCalculatedType()

static tmp<Field<Type> > NewCalculatedType ( const Field< Type2 > &  f)
inlinestatic

Return a pointer to a new calculatedFvPatchFieldField created on.

freestore without setting patchField values

Definition at line 235 of file Field.H.

◆ map() [1/6]

void map ( const UList< Type > &  mapF,
const labelUList mapAddressing 
)

1 to 1 map from the given field

Definition at line 345 of file Field.C.

Referenced by sampledPatchInternalField::sampleField(), and polyMesh::updateMesh().

Here is the caller graph for this function:

◆ map() [2/6]

void map ( const tmp< Field< Type > > &  tmapF,
const labelUList mapAddressing 
)

1 to 1 map from the given tmp field

Definition at line 374 of file Field.C.

◆ map() [3/6]

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

Interpolative map from the given field.

◆ map() [4/6]

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

Interpolative map from the given tmp field.

◆ map() [5/6]

void map ( const UList< Type > &  mapF,
const FieldMapper map,
const bool  applyFlip = true 
)

Map from the given field.

◆ map() [6/6]

void map ( const tmp< Field< Type > > &  tmapF,
const FieldMapper map,
const bool  applyFlip = true 
)

Map from the given tmp field.

◆ autoMap()

void autoMap ( const FieldMapper map,
const bool  applyFlip = true 
)

◆ rmap() [1/4]

void rmap ( const UList< Type > &  mapF,
const labelUList mapAddressing 
)

1 to 1 reverse-map from the given field

Definition at line 571 of file Field.C.

Referenced by extendedEdgeMesh::add(), extendedEdgeMesh::flipNormals(), fvMeshAdder::MapSurfaceField(), fvMeshAdder::MapVolField(), and fvPatchField< Type >::rmap().

Here is the caller graph for this function:

◆ rmap() [2/4]

void rmap ( const tmp< Field< Type > > &  tmapF,
const labelUList mapAddressing 
)

1 to 1 reverse-map from the given tmp field

Definition at line 592 of file Field.C.

◆ rmap() [3/4]

void rmap ( const UList< Type > &  mapF,
const labelUList mapAddressing,
const UList< scalar > &  weights 
)

Interpolative reverse map from the given field.

◆ rmap() [4/4]

void rmap ( const tmp< Field< Type > > &  tmapF,
const labelUList mapAddressing,
const UList< scalar > &  weights 
)

Interpolative reverse map from the given tmp field.

◆ negate()

void negate ( )

Negate this field.

Definition at line 635 of file Field.C.

Referenced by fvMatrix< Type >::H().

Here is the caller graph for this function:

◆ component()

Foam::tmp< Foam::Field< typename Foam::Field< Type >::cmptType > > component ( const direction  d) const

◆ replace() [1/3]

void replace ( const  direction,
const UList< cmptType > &   
)

◆ replace() [2/3]

void replace ( const  direction,
const tmp< Field< cmptType > > &   
)

Replace a component field of the field.

◆ replace() [3/3]

void replace ( const  direction,
const cmptType  
)

Replace a component field of the field.

◆ T()

Foam::tmp< Foam::Field< Type > > T ( ) const

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

Definition at line 691 of file Field.C.

Referenced by noiseFFT::noiseFFT(), filmPyrolysisTemperatureCoupledFvPatchScalarField::updateCoeffs(), and energyRegionCoupledFvPatchScalarField::updateInterfaceMatrix().

Here is the caller graph for this function:

◆ writeEntry()

void writeEntry ( const word keyword,
Ostream os 
) const

◆ operator=() [1/11]

void operator= ( const Field< Type > &  )

◆ operator=() [2/11]

void operator= ( const UList< Type > &  )

◆ operator=() [3/11]

void operator= ( const SubField< Type > &  )

◆ operator=() [4/11]

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

◆ operator=() [5/11]

void operator= ( const Type &  )

◆ operator=() [6/11]

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

Definition at line 791 of file Field.C.

◆ operator+=() [1/3]

void operator+= ( const UList< Type > &  )

◆ operator+=() [2/3]

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

◆ operator-=() [1/3]

void operator-= ( const UList< Type > &  )

◆ operator-=() [2/3]

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

◆ operator*=() [1/3]

void operator*= ( const UList< scalar > &  )

◆ operator*=() [2/3]

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

◆ operator/=() [1/3]

void operator/= ( const UList< scalar > &  )

◆ operator/=() [2/3]

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

◆ operator+=() [3/3]

void operator+= ( const Type &  )

◆ operator-=() [3/3]

void operator-= ( const Type &  )

◆ operator*=() [3/3]

void operator*= ( const scalar &  )

◆ operator/=() [3/3]

void operator/= ( const scalar &  )

◆ operator=() [7/11]

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

Definition at line 738 of file Field.C.

◆ operator=() [8/11]

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

Definition at line 752 of file Field.C.

◆ operator=() [9/11]

void operator= ( const UList< Type > &  rhs)

Definition at line 759 of file Field.C.

◆ operator=() [10/11]

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

Definition at line 766 of file Field.C.

◆ operator=() [11/11]

void operator= ( const Type &  t)

Definition at line 783 of file Field.C.

Friends And Related Function Documentation

◆ operator [1/2]

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

◆ operator [2/2]

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

Field Documentation

◆ typeName

const char *const typeName
static

Definition at line 94 of file Field.H.


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