Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
Field Class Reference

Generic templated field type. More...

Inheritance diagram for Field:
Inheritance graph
[legend]

Public Types

typedef pTraits< Type >::cmptType cmptType
 
typedef SubField< Type > subField
 

Public Member Functions

constexpr Field () noexcept
 
 Field (const label len)
 
 Field (const label len, const Type &val)
 
 Field (const label len, const Foam::zero)
 
 Field (const Foam::one, const Type &val)
 
 Field (const Foam::one, Type &&val)
 
 Field (const Foam::one, const Foam::zero)
 
 Field (const Field< Type > &fld)
 
 Field (const UList< Type > &list)
 
template<class Addr >
 Field (const IndirectListBase< Type, Addr > &list)
 
 Field (Field< Type > &&fld)
 
 Field (List< Type > &&list)
 
template<int SizeMin>
 Field (DynamicList< Type, SizeMin > &&list)
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (Field< Type > &fld, bool reuse)
 
 Field (const tmp< Field< Type >> &tfld)
 
 Field (Istream &is)
 
 Field (const word &keyword, const dictionary &dict, const label len)
 
tmp< Field< Type > > clone () const
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void map (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
void map (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void negate ()
 
tmp< Field< cmptType > > component (const direction) const
 
void replace (const direction, const UList< cmptType > &)
 
void replace (const direction, const tmp< Field< cmptType >> &)
 
void replace (const direction, const cmptType &)
 
template<class VSForm >
VSForm block (const label start) const
 
tmp< Field< Type > > T () const
 
void writeEntry (const word &keyword, Ostream &os) const
 
SubField< Type > slice (const label pos, label len=-1)
 
const SubField< Type > slice (const label pos, label len=-1) const
 
SubField< Type > slice (const labelRange &range)
 
const SubField< Type > slice (const labelRange &range) const
 
void operator= (const Field< Type > &)
 
void operator= (const tmp< Field< Type >> &)
 
void operator= (const UList< Type > &rhs)
 
void operator= (const SubField< Type > &rhs)
 
template<class Addr >
void operator= (const IndirectListBase< Type, Addr > &rhs)
 
void operator= (Field< Type > &&rhs)
 
void operator= (List< Type > &&rhs)
 
template<int SizeMin>
void operator= (DynamicList< Type, SizeMin > &&rhs)
 
void operator= (const Type &val)
 
void operator= (const Foam::zero)
 
template<class Form , class Cmpt , direction 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 >
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const word &keyword, const dictionary &dict, const label len)
 
template<class Type >
void operator= (const Field< Type > &rhs)
 
template<class Type >
void operator= (const tmp< Field > &rhs)
 
template<class Type >
constexpr Field () noexcept
 
template<class Type >
 Field (const label len)
 
template<class Type >
 Field (const label len, const Type &val)
 
template<class Type >
 Field (const label len, const Foam::zero)
 
template<class Type >
 Field (const Foam::one, const Type &val)
 
template<class Type >
 Field (const Foam::one, Type &&val)
 
template<class Type >
 Field (const Foam::one, const Foam::zero)
 
template<class Type >
 Field (const Field< Type > &fld)
 
template<class Type >
 Field (const UList< Type > &list)
 
template<class Type >
 Field (Field< Type > &&fld)
 
template<class Type >
 Field (List< Type > &&list)
 
template<class Type >
 Field (Field< Type > &fld, bool reuse)
 
template<class Type >
 Field (const tmp< Field< Type >> &tfld)
 
template<class Type >
 Field (Istream &is)
 
template<class Type >
void operator= (const UList< Type > &rhs)
 
template<class Type >
void operator= (const SubField< Type > &rhs)
 
template<class Type >
void operator= (Field< Type > &&rhs)
 
template<class Type >
void operator= (List< Type > &&rhs)
 
template<class Type >
void operator= (const Type &val)
 
template<class Type >
void operator= (const Foam::zero)
 

Static Public Member Functions

static const Field< Type > & null ()
 
static autoPtr< Field< Type > > New (Istream &is)
 
template<class Type2 >
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 

Friends

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

Detailed Description

Generic templated field type.

Source files

Definition at line 59 of file Field.H.

Member Typedef Documentation

◆ cmptType

typedef pTraits<Type>::cmptType cmptType

Definition at line 82 of file Field.H.

◆ subField

typedef SubField<Type> subField

Definition at line 85 of file Field.H.

Constructor & Destructor Documentation

◆ Field() [1/52]

constexpr Field ( )
inlineconstexprnoexcept

◆ Field() [2/52]

Field ( const label  len)
inlineexplicit

◆ Field() [3/52]

Field ( const label  len,
const Type &  val 
)
inline

◆ Field() [4/52]

Field ( const label  len,
const Foam::zero   
)
inline

◆ Field() [5/52]

Field ( const Foam::one  ,
const Type &  val 
)
inline

◆ Field() [6/52]

Field ( const Foam::one  ,
Type &&  val 
)
inline

◆ Field() [7/52]

Field ( const Foam::one  ,
const Foam::zero   
)
inline

◆ Field() [8/52]

Field ( const Field< Type > &  fld)
inline

◆ Field() [9/52]

Field ( const UList< Type > &  list)
inlineexplicit

◆ Field() [10/52]

Field ( const IndirectListBase< Type, Addr > &  list)
inlineexplicit

Definition at line 97 of file FieldI.H.

◆ Field() [11/52]

Field ( Field< Type > &&  fld)
inline

◆ Field() [12/52]

Field ( List< Type > &&  list)
inline

◆ Field() [13/52]

Field ( DynamicList< Type, SizeMin > &&  list)
inline

Definition at line 123 of file FieldI.H.

◆ Field() [14/52]

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

◆ Field() [15/52]

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

◆ Field() [16/52]

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

◆ Field() [17/52]

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

◆ Field() [18/52]

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

◆ Field() [19/52]

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

◆ Field() [20/52]

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

◆ Field() [21/52]

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

◆ Field() [22/52]

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

◆ Field() [23/52]

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

◆ Field() [24/52]

Field ( Field< Type > &  fld,
bool  reuse 
)
inline

◆ Field() [25/52]

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

◆ Field() [26/52]

Field ( Istream is)
inline

◆ Field() [27/52]

Field ( const word keyword,
const dictionary dict,
const label  len 
)

◆ Field() [28/52]

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

Definition at line 32 of file Field.C.

◆ Field() [29/52]

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

Definition at line 45 of file Field.C.

◆ Field() [30/52]

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

Definition at line 58 of file Field.C.

◆ Field() [31/52]

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

Definition at line 72 of file Field.C.

◆ Field() [32/52]

Field ( const UList< Type > &  mapF,
const FieldMapper mapper,
const bool  applyFlip 
)

Definition at line 86 of file Field.C.

◆ Field() [33/52]

Field ( const UList< Type > &  mapF,
const FieldMapper mapper,
const Type &  defaultValue,
const bool  applyFlip 
)

Definition at line 100 of file Field.C.

◆ Field() [34/52]

Field ( const UList< Type > &  mapF,
const FieldMapper mapper,
const UList< Type > &  defaultValues,
const bool  applyFlip 
)

Definition at line 115 of file Field.C.

◆ Field() [35/52]

Field ( const tmp< Field< Type >> &  tmapF,
const FieldMapper mapper,
const bool  applyFlip 
)

Definition at line 130 of file Field.C.

◆ Field() [36/52]

Field ( const tmp< Field< Type >> &  tmapF,
const FieldMapper mapper,
const Type &  defaultValue,
const bool  applyFlip 
)

Definition at line 144 of file Field.C.

◆ Field() [37/52]

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

Definition at line 159 of file Field.C.

◆ Field() [38/52]

Field ( const word keyword,
const dictionary dict,
const label  len 
)

Definition at line 174 of file Field.C.

◆ Field() [39/52]

constexpr Field ( )
inlineconstexprnoexcept

Definition at line 33 of file FieldI.H.

◆ Field() [40/52]

Field ( const label  len)
inline

Definition at line 40 of file FieldI.H.

◆ Field() [41/52]

Field ( const label  len,
const Type &  val 
)
inline

Definition at line 47 of file FieldI.H.

◆ Field() [42/52]

Field ( const label  len,
const Foam::zero   
)
inline

Definition at line 54 of file FieldI.H.

◆ Field() [43/52]

Field ( const Foam::one  ,
const Type &  val 
)
inline

Definition at line 61 of file FieldI.H.

◆ Field() [44/52]

Field ( const Foam::one  ,
Type &&  val 
)
inline

Definition at line 68 of file FieldI.H.

◆ Field() [45/52]

Field ( const Foam::one  ,
const Foam::zero   
)
inline

Definition at line 75 of file FieldI.H.

◆ Field() [46/52]

Field ( const Field< Type > &  fld)
inline

Definition at line 82 of file FieldI.H.

◆ Field() [47/52]

Field ( const UList< Type > &  list)
inline

Definition at line 89 of file FieldI.H.

◆ Field() [48/52]

Field ( Field< Type > &&  fld)
inline

Definition at line 104 of file FieldI.H.

◆ Field() [49/52]

Field ( List< Type > &&  list)
inline

Definition at line 113 of file FieldI.H.

◆ Field() [50/52]

Field ( Field< Type > &  fld,
bool  reuse 
)
inline

Definition at line 132 of file FieldI.H.

◆ Field() [51/52]

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

Definition at line 139 of file FieldI.H.

◆ Field() [52/52]

Field ( Istream is)
inline

Definition at line 148 of file FieldI.H.

Member Function Documentation

◆ null()

const Foam::Field< Type > & null ( )
inlinestatic

Definition at line 24 of file FieldI.H.

Referenced by meshedSurfRef::clear(), meshedSurf::emptySurface::points(), lumpedPointMovement::writeVTP(), and lumpedPointMovement::writeZonesVTP().

Here is the caller graph for this function:

◆ clone()

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

Definition at line 155 of file FieldI.H.

◆ New()

static autoPtr<Field<Type> > New ( Istream is)
inlinestatic

Definition at line 239 of file Field.H.

Referenced by Field< Foam::Vector2D >::NewCalculatedType().

Here is the caller graph for this function:

◆ NewCalculatedType()

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

Definition at line 247 of file Field.H.

◆ map() [1/6]

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

Definition at line 233 of file Field.C.

Referenced by conjugateGradient::computeCorrection(), sampledPatchInternalField::sampleOnFaces(), SR1::update(), DBFGS::update(), BFGS::update(), and polyMesh::updateMesh().

Here is the caller graph for this function:

◆ map() [2/6]

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

Definition at line 262 of file Field.C.

◆ map() [3/6]

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

◆ map() [4/6]

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

◆ map() [5/6]

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

◆ map() [6/6]

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

◆ autoMap()

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

◆ rmap() [1/4]

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

◆ rmap() [2/4]

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

Definition at line 480 of file Field.C.

◆ rmap() [3/4]

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

◆ rmap() [4/4]

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

◆ negate()

void negate ( )

Definition at line 523 of file Field.C.

Referenced by faMatrix< Type >::H(), and 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() [3/3]

void replace ( const  direction,
const cmptType  
)

◆ block()

VSForm block ( const label  start) const

◆ T()

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

◆ writeEntry()

void writeEntry ( const word keyword,
Ostream os 
) const

◆ slice() [1/4]

SubField<Type> slice ( const label  pos,
label  len = -1 
)

◆ slice() [2/4]

const SubField<Type> slice ( const label  pos,
label  len = -1 
) const

◆ slice() [3/4]

Foam::SubField< Type > slice ( const labelRange range)

Definition at line 198 of file SubField.H.

◆ slice() [4/4]

const Foam::SubField< Type > slice ( const labelRange range) const

Definition at line 206 of file SubField.H.

◆ operator=() [1/19]

void operator= ( const Field< Type > &  )

◆ operator=() [2/19]

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

◆ operator=() [3/19]

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

◆ operator=() [4/19]

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

◆ operator=() [5/19]

void operator= ( const IndirectListBase< Type, Addr > &  rhs)
inline

Definition at line 180 of file FieldI.H.

◆ operator=() [6/19]

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

◆ operator=() [7/19]

void operator= ( List< Type > &&  rhs)
inline

◆ operator=() [8/19]

void operator= ( DynamicList< Type, SizeMin > &&  rhs)
inline

Definition at line 204 of file FieldI.H.

◆ operator=() [9/19]

void operator= ( const Type &  val)
inline

◆ operator=() [10/19]

void operator= ( const Foam::zero  )
inline

◆ operator=() [11/19]

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

Definition at line 653 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=() [12/19]

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

Definition at line 628 of file Field.C.

◆ operator=() [13/19]

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

Definition at line 640 of file Field.C.

◆ operator=() [14/19]

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

Definition at line 164 of file FieldI.H.

◆ operator=() [15/19]

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

Definition at line 171 of file FieldI.H.

◆ operator=() [16/19]

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

Definition at line 189 of file FieldI.H.

◆ operator=() [17/19]

void operator= ( List< Type > &&  rhs)
inline

Definition at line 196 of file FieldI.H.

◆ operator=() [18/19]

void operator= ( const Type &  val)
inline

Definition at line 211 of file FieldI.H.

◆ operator=() [19/19]

void operator= ( const Foam::zero  )
inline

Definition at line 218 of file FieldI.H.

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

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