FieldField< Field, Type > Class Template Reference

A field of fields is a PtrList of fields with reference counting. More...

Inheritance diagram for FieldField< Field, Type >:
[legend]

Public Types

typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 

Public Member Functions

constexpr FieldField () noexcept
 Construct null. More...
 
 FieldField (const label size)
 Construct given size. More...
 
 FieldField (const word &type, const FieldField< Field, Type > &ff)
 Clone construct with new type. More...
 
 FieldField (const FieldField< Field, Type > &ff)
 Copy construct, cloning each element. More...
 
 FieldField (FieldField< Field, Type > &&ff)
 Move construct. More...
 
 FieldField (FieldField< Field, Type > &ff, bool reuse)
 Construct as copy or re-use as specified. More...
 
 FieldField (const PtrList< Field< Type >> &list)
 Copy construct from PtrList. More...
 
 FieldField (PtrList< Field< Type >> &&list)
 Move construct from PtrList. More...
 
 FieldField (const tmp< FieldField< Field, Type >> &tf)
 Move/copy construct from tmp<FieldField> More...
 
 FieldField (Istream &is)
 Construct from Istream. More...
 
tmp< FieldField< Field, Type > > clone () const
 Clone. More...
 
void negate ()
 Negate this field. More...
 
tmp< FieldField< Field, cmptType > > component (const direction) const
 Return a component field of the field. More...
 
void replace (const direction, const FieldField< 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< FieldField< Field, Type > > T () const
 Return the field transpose (only defined for second rank tensors) More...
 
void operator= (const FieldField< Field, Type > &)
 Copy assignment. More...
 
void operator= (FieldField< Field, Type > &&)
 Move assignment. More...
 
void operator= (const tmp< FieldField< Field, Type >> &)
 Move or clone assignment. More...
 
void operator= (const Type &val)
 Assign uniform value. More...
 
void operator+= (const FieldField< Field, Type > &)
 
void operator+= (const tmp< FieldField< Field, Type >> &)
 
void operator-= (const FieldField< Field, Type > &)
 
void operator-= (const tmp< FieldField< Field, Type >> &)
 
void operator*= (const FieldField< Field, scalar > &)
 
void operator*= (const tmp< FieldField< Field, scalar >> &)
 
void operator/= (const FieldField< Field, scalar > &)
 
void operator/= (const tmp< FieldField< 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 >
static tmp< FieldField< Field, Type > > NewCalculatedType (const FieldField< Field, Type2 > &ff)
 Return a pointer to a new calculatedFvPatchFieldField created on. More...
 

Friends

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

Detailed Description

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

A field of fields is a PtrList of fields with reference counting.

Source files

Definition at line 53 of file FieldField.H.

Member Typedef Documentation

◆ cmptType

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 84 of file FieldField.H.

Constructor & Destructor Documentation

◆ FieldField() [1/10]

constexpr FieldField ( )
constexprnoexcept

Construct null.

Used for temporary fields which are initialised after construction

Definition at line 108 of file FieldField.C.

◆ FieldField() [2/10]

FieldField ( const label  size)
explicit

Construct given size.

Used for temporary fields which are initialised after construction

Definition at line 115 of file FieldField.C.

◆ FieldField() [3/10]

FieldField ( const word type,
const FieldField< Field, Type > &  ff 
)

Clone construct with new type.

Definition at line 123 of file FieldField.C.

◆ FieldField() [4/10]

FieldField ( const FieldField< Field, Type > &  ff)

Copy construct, cloning each element.

Definition at line 138 of file FieldField.C.

◆ FieldField() [5/10]

FieldField ( FieldField< Field, Type > &&  ff)

Move construct.

Definition at line 145 of file FieldField.C.

◆ FieldField() [6/10]

FieldField ( FieldField< Field, Type > &  ff,
bool  reuse 
)

Construct as copy or re-use as specified.

Definition at line 152 of file FieldField.C.

◆ FieldField() [7/10]

FieldField ( const PtrList< Field< Type >> &  list)

Copy construct from PtrList.

Definition at line 159 of file FieldField.C.

◆ FieldField() [8/10]

FieldField ( PtrList< Field< Type >> &&  list)

Move construct from PtrList.

Definition at line 166 of file FieldField.C.

◆ FieldField() [9/10]

FieldField ( const tmp< FieldField< Field, Type >> &  tf)

Move/copy construct from tmp<FieldField>

Definition at line 173 of file FieldField.C.

◆ FieldField() [10/10]

FieldField ( Istream is)

Construct from Istream.

Definition at line 182 of file FieldField.C.

Member Function Documentation

◆ clone()

tmp< FieldField< Field, Type > > clone ( ) const

Clone.

Definition at line 189 of file FieldField.C.

◆ NewCalculatedType()

tmp< FieldField< Field, Type > > NewCalculatedType ( const FieldField< Field, Type2 > &  ff)
static

Return a pointer to a new calculatedFvPatchFieldField created on.

freestore without setting patchField values

Definition at line 198 of file FieldField.C.

Referenced by reuseTmpFieldField< Field, TypeR, Type1 >::New(), reuseTmpFieldField< Field, TypeR, TypeR >::New(), reuseTmpTmpFieldField< Field, TypeR, Type1, Type12, Type2 >::New(), reuseTmpTmpFieldField< Field, TypeR, Type1, Type12, TypeR >::New(), reuseTmpTmpFieldField< Field, TypeR, TypeR, TypeR, Type2 >::New(), and reuseTmpTmpFieldField< Field, TypeR, TypeR, TypeR, TypeR >::New().

Here is the caller graph for this function:

◆ negate()

void negate ( )

Negate this field.

Definition at line 219 of file FieldField.C.

◆ component()

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

Return a component field of the field.

Definition at line 231 of file FieldField.C.

◆ replace() [1/2]

void replace ( const direction  d,
const FieldField< Field, cmptType > &  sf 
)

Replace a component field of the field.

Definition at line 249 of file FieldField.C.

◆ replace() [2/2]

void replace ( const direction  d,
const cmptType s 
)

Replace a component field of the field.

Definition at line 263 of file FieldField.C.

◆ T()

tmp< FieldField< Field, Type > > T ( ) const

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

Definition at line 276 of file FieldField.C.

◆ operator=() [1/4]

void operator= ( const FieldField< Field, Type > &  ff)

Copy assignment.

Definition at line 291 of file FieldField.C.

Referenced by GeometricField< Type, PatchField, GeoMesh >::Boundary::operator=().

Here is the caller graph for this function:

◆ operator=() [2/4]

void operator= ( FieldField< Field, Type > &&  ff)

Move assignment.

Definition at line 308 of file FieldField.C.

◆ operator=() [3/4]

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

Move or clone assignment.

◆ operator=() [4/4]

void operator= ( const Type &  val)

Assign uniform value.

Definition at line 340 of file FieldField.C.

◆ operator+=() [1/3]

void operator+= ( const FieldField< Field, Type > &  f)

Definition at line 379 of file FieldField.C.

◆ operator+=() [2/3]

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

Definition at line 379 of file FieldField.C.

◆ operator-=() [1/3]

void operator-= ( const FieldField< Field, Type > &  f)

Definition at line 380 of file FieldField.C.

◆ operator-=() [2/3]

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

Definition at line 380 of file FieldField.C.

◆ operator*=() [1/3]

void operator*= ( const FieldField< Field, scalar > &  f)

Definition at line 381 of file FieldField.C.

◆ operator*=() [2/3]

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

Definition at line 381 of file FieldField.C.

◆ operator/=() [1/3]

void operator/= ( const FieldField< Field, scalar > &  f)

Definition at line 382 of file FieldField.C.

◆ operator/=() [2/3]

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

Definition at line 382 of file FieldField.C.

◆ operator+=() [3/3]

void operator+= ( const Type &  t)

Definition at line 379 of file FieldField.C.

◆ operator-=() [3/3]

void operator-= ( const Type &  t)

Definition at line 380 of file FieldField.C.

◆ operator*=() [3/3]

void operator*= ( const scalar &  t)

Definition at line 381 of file FieldField.C.

◆ operator/=() [3/3]

void operator/= ( const scalar &  t)

Definition at line 382 of file FieldField.C.

Friends And Related Function Documentation

◆ operator [1/2]

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

◆ operator [2/2]

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

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