FieldField< Field, Type > Class Template Reference

Generic field type. More...

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

Public Types

typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 
- Public Types inherited from UPtrList< T >
typedef T value_type
 Type of values the UPtrList contains. More...
 
typedef Treference
 Type that can be used for storing into UPtrList::value_type objects. More...
 
typedef const Tconst_reference
 Type that can be used for storing into constant UPtrList::value_type. More...
 

Public Member Functions

 FieldField ()
 Construct null. More...
 
 FieldField (const label)
 Construct given size. More...
 
 FieldField (const word &, const FieldField< Field, Type > &)
 Construct using the Field sizes from the given FieldField. More...
 
 FieldField (const FieldField< Field, Type > &)
 Copy constructor. More...
 
 FieldField (FieldField< Field, Type > &&)
 Move constructor. More...
 
 FieldField (FieldField< Field, Type > &, bool reuse)
 Construct as copy or re-use as specified. More...
 
 FieldField (const PtrList< Field< Type >> &)
 Construct as copy of a PtrList<Field, Type> More...
 
 FieldField (const tmp< FieldField< Field, Type >> &)
 Construct as copy of tmp<FieldField> More...
 
 FieldField (Istream &)
 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 > &)
 
void operator= (FieldField< Field, Type > &&)
 
void operator= (const tmp< FieldField< Field, Type >> &)
 
void operator= (const Type &)
 
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 &)
 
- Public Member Functions inherited from refCount
int count () const
 Return the current reference count. More...
 
bool unique () const
 Return true if the reference count is zero. More...
 
void operator++ ()
 Increment the reference count. More...
 
void operator++ (int)
 Increment the reference count. More...
 
void operator-- ()
 Decrement the reference count. More...
 
void operator-- (int)
 Decrement the reference count. More...
 
- Public Member Functions inherited from PtrList< Field< Type > >
 PtrList ()
 Null Constructor. More...
 
 PtrList (const label)
 Construct with size specified. More...
 
 PtrList (const PtrList< Field< Type > > &)
 Copy constructor. More...
 
 PtrList (const PtrList< Field< Type > > &, const CloneArg &)
 Copy constructor with additional argument for clone. More...
 
 PtrList (PtrList< Field< Type > > &&)
 Move constructor. More...
 
 PtrList (PtrList< Field< Type > > &, bool reuse)
 Construct as copy or re-use as specified. More...
 
 PtrList (const SLPtrList< Field< Type > > &)
 Construct as copy of SLPtrList<T> More...
 
 PtrList (Istream &, const INew &)
 Construct from Istream using given Istream constructor class. More...
 
 PtrList (Istream &)
 Construct from Istream using default Istream constructor class. More...
 
 ~PtrList ()
 Destructor. More...
 
void setSize (const label)
 Reset size of PtrList. If extending the PtrList, new entries are. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void clear ()
 Clear the PtrList, i.e. set size to zero deleting all the. More...
 
void append (Field< Type > *)
 Append an element at the end of the list. More...
 
void append (const autoPtr< Field< Type > > &)
 
void append (const tmp< Field< Type > > &)
 
void transfer (PtrList< Field< Type > > &)
 Transfer the contents of the argument PtrList into this PtrList. More...
 
bool set (const label) const
 Is element set. More...
 
autoPtr< Field< Type > > set (const label, Field< Type > *)
 Set element to given T* and return old element (can be nullptr) More...
 
autoPtr< Field< Type > > set (const label, const autoPtr< Field< Type > > &)
 Set element to given autoPtr<T> and return old element. More...
 
autoPtr< Field< Type > > set (const label, const tmp< Field< Type > > &)
 Set element to given tmp<T> and return old element. More...
 
void reorder (const labelUList &oldToNew)
 Reorders elements. Ordering does not have to be done in. More...
 
void shuffle (const labelUList &newToOld)
 Reorders elements. Ordering does not have to be done in. More...
 
void operator= (const PtrList< Field< Type > > &)
 Assignment operator. More...
 
void operator= (PtrList< Field< Type > > &&)
 Move assignment operator. More...
 
- Public Member Functions inherited from UPtrList< T >
 UPtrList ()
 Null Constructor. More...
 
 UPtrList (const label)
 Construct with size specified. More...
 
 UPtrList (UPtrList< T > &, bool reuse)
 Construct as copy or re-use as specified. More...
 
label size () const
 Return the number of elements in the UPtrList. More...
 
bool empty () const
 Return true if the UPtrList is empty (ie, size() is zero) More...
 
Tfirst ()
 Return reference to the first element of the list. More...
 
const Tfirst () const
 Return reference to first element of the list. More...
 
Tlast ()
 Return reference to the last element of the list. More...
 
const Tlast () const
 Return reference to the last element of the list. More...
 
void setSize (const label)
 Reset size of UPtrList. This can only be used to set the size. More...
 
void resize (const label)
 Reset size of UPtrList. This can only be used to set the size. More...
 
void clear ()
 Clear the UPtrList, i.e. set size to zero. More...
 
void transfer (UPtrList< T > &)
 Transfer the contents of the argument UPtrList into this. More...
 
bool set (const label) const
 Is element set. More...
 
Tset (const label, T *)
 Set element. Return old element (can be nullptr). More...
 
void reorder (const labelUList &oldToNew)
 Reorders elements. Ordering does not have to be done in. More...
 
void shuffle (const labelUList &newToOld)
 Reorders elements. Ordering does not have to be done in. More...
 
const Toperator[] (const label) const
 Return element const reference. More...
 
Toperator[] (const label)
 Return element reference. More...
 
const Toperator() (const label) const
 Return element const pointer. More...
 
iterator begin ()
 Return an iterator to begin traversing the UPtrList. More...
 
iterator end ()
 Return an iterator to end traversing the UPtrList. More...
 
const_iterator cbegin () const
 Return an const_iterator to begin traversing the UPtrList. More...
 
const_iterator cend () const
 Return an const_iterator to end traversing the UPtrList. More...
 
const_iterator begin () const
 Return an const_iterator to begin traversing the UPtrList. More...
 
const_iterator end () const
 Return an const_iterator to end traversing the UPtrList. More...
 

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 >> &)
 

Additional Inherited Members

- Protected Member Functions inherited from refCount
 refCount ()
 Construct null initialising count to 0. More...
 
- Protected Member Functions inherited from PtrList< Field< Type > >
void read (Istream &, const INew &inewt)
 Read from Istream using given Istream constructor class. More...
 

Detailed Description

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

Generic field type.

Source files

Definition at line 51 of file FieldField.H.

Member Typedef Documentation

◆ cmptType

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 82 of file FieldField.H.

Constructor & Destructor Documentation

◆ FieldField() [1/9]

Construct null.

Used for temporary fields which are initialised after construction

Definition at line 108 of file FieldField.C.

◆ FieldField() [2/9]

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/9]

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

Construct using the Field sizes from the given FieldField.

and the given Field type. Used for temporary fields which are initialised after construction

Definition at line 123 of file FieldField.C.

◆ FieldField() [4/9]

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

Copy constructor.

Definition at line 138 of file FieldField.C.

◆ FieldField() [5/9]

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

Move constructor.

Definition at line 146 of file FieldField.C.

◆ FieldField() [6/9]

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

Construct as copy or re-use as specified.

Definition at line 154 of file FieldField.C.

◆ FieldField() [7/9]

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

Construct as copy of a PtrList<Field, Type>

Definition at line 161 of file FieldField.C.

◆ FieldField() [8/9]

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

Construct as copy of tmp<FieldField>

Definition at line 168 of file FieldField.C.

◆ FieldField() [9/9]

FieldField ( Istream is)

Construct from Istream.

Definition at line 181 of file FieldField.C.

Member Function Documentation

◆ clone()

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

Clone.

Definition at line 188 of file FieldField.C.

◆ NewCalculatedType()

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

◆ negate()

void negate ( )

Negate this field.

Definition at line 218 of file FieldField.C.

Referenced by GaussSeidelSmoother::smooth(), symGaussSeidelSmoother::smooth(), and nonBlockingGaussSeidelSmoother::smooth().

Here is the caller graph for this function:

◆ component()

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

Return a component field of the field.

Definition at line 230 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 248 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 262 of file FieldField.C.

◆ T()

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

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

Definition at line 275 of file FieldField.C.

◆ operator=() [1/4]

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

◆ operator=() [2/4]

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

Definition at line 307 of file FieldField.C.

◆ operator=() [3/4]

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

◆ operator=() [4/4]

void operator= ( const Type &  t)

Definition at line 338 of file FieldField.C.

◆ operator+=() [1/3]

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

Definition at line 377 of file FieldField.C.

◆ operator+=() [2/3]

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

Definition at line 377 of file FieldField.C.

◆ operator-=() [1/3]

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

Definition at line 378 of file FieldField.C.

◆ operator-=() [2/3]

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

Definition at line 378 of file FieldField.C.

◆ operator*=() [1/3]

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

Definition at line 379 of file FieldField.C.

◆ operator*=() [2/3]

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

Definition at line 379 of file FieldField.C.

◆ operator/=() [1/3]

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

Definition at line 380 of file FieldField.C.

◆ operator/=() [2/3]

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

Definition at line 380 of file FieldField.C.

◆ operator+=() [3/3]

void operator+= ( const Type &  t)

Definition at line 377 of file FieldField.C.

◆ operator-=() [3/3]

void operator-= ( const Type &  t)

Definition at line 378 of file FieldField.C.

◆ operator*=() [3/3]

void operator*= ( const scalar &  t)

Definition at line 379 of file FieldField.C.

◆ operator/=() [3/3]

void operator/= ( const scalar &  t)

Definition at line 380 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: