Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
FieldField< Field, Type > Class Template Reference

Generic field type. More...

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

Public Types

typedef pTraits< Type >::cmptType cmptType
 Component type. More...
 
- Public Types inherited from PtrList< Field< Type > >
typedef Field< Type > value_type
 Type of values the PtrList contains. More...
 
typedef Field< Type > & reference
 Type that can be used for storing into PtrList::value_type objects. More...
 
typedef const Field< Type > & const_reference
 Type that can be used for storing into constant PtrList::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 > &)
 Construct as copy. 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= (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
 refCount ()
 Construct null with zero count. More...
 
int count () const
 Return the reference count. More...
 
bool okToDelete () const
 Return true if the reference count is zero. More...
 
void resetRefCount ()
 Reset the reference count to 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 (const Xfer< PtrList< Field< Type > > > &)
 Construct by transferring the parameter contents. 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...
 
label size () const
 Return the number of elements in the PtrList. More...
 
bool empty () const
 Return true if the PtrList is empty (ie, size() is zero). More...
 
Field< Type > & first ()
 Return reference to the first element of the list. More...
 
const Field< Type > & first () const
 Return reference to first element of the list. More...
 
Field< Type > & last ()
 Return reference to the last element of the list. More...
 
const Field< Type > & last () const
 Return reference to the last element of the list. 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...
 
Xfer< PtrList< Field< Type > > > xfer ()
 Transfer contents to the Xfer container. More...
 
bool set (const label) const
 Is element set. More...
 
autoPtr< Field< Type > > set (const label, Field< Type > *)
 Set element. Return old element (can be NULL). More...
 
autoPtr< Field< Type > > set (const label, const autoPtr< Field< Type > > &)
 
autoPtr< Field< Type > > set (const label, const tmp< Field< Type > > &)
 
void reorder (const labelUList &)
 Reorders elements. Ordering does not have to be done in. More...
 
const Field< Type > & operator[] (const label) const
 Return element const reference. More...
 
Field< Type > & operator[] (const label)
 Return element reference. More...
 
const Field< Type > * operator() (const label) const
 Return element const pointer. More...
 
PtrList< Field< Type > > & operator= (const PtrList< Field< Type > > &)
 Assignment. More...
 
iterator begin ()
 Return an iterator to begin traversing the PtrList. More...
 
const_iterator begin () const
 Return an const_iterator to begin traversing the PtrList. More...
 
iterator end ()
 Return an iterator to end traversing the PtrList. More...
 
const_iterator end () const
 Return an const_iterator to end traversing the PtrList. More...
 
const_iterator cbegin () const
 Return an const_iterator to begin traversing the PtrList. More...
 
const_iterator cend () const
 Return an const_iterator to end traversing the PtrList. 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 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

typedef pTraits<Type>::cmptType cmptType

Component type.

Definition at line 82 of file FieldField.H.

Constructor & Destructor Documentation

Construct null.

Used for temporary fields which are initialised after construction

Definition at line 118 of file FieldField.C.

Referenced by FieldField< Field, Type >::FieldField().

Here is the caller graph for this function:

FieldField ( const label  size)
explicit

Construct given size.

Used for temporary fields which are initialised after construction

Definition at line 125 of file FieldField.C.

References FieldField< Field, Type >::FieldField().

Here is the call graph for this function:

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 133 of file FieldField.C.

References forAll, and Foam::compressible::New().

Here is the call graph for this function:

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

Construct as copy.

Definition at line 148 of file FieldField.C.

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

Construct as copy or re-use as specified.

Definition at line 156 of file FieldField.C.

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

Construct as copy of a PtrList<Field, Type>

Definition at line 164 of file FieldField.C.

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

Construct as copy of tmp<FieldField>

Definition at line 173 of file FieldField.C.

References refCount::resetRefCount(), and tf.

Here is the call graph for this function:

FieldField ( Istream is)

Construct from Istream.

Definition at line 187 of file FieldField.C.

Member Function Documentation

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

Clone.

Definition at line 194 of file FieldField.C.

References FieldField< Field, Type >::NewCalculatedType().

Here is the call graph for this function:

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

Negate this field.

Definition at line 224 of file FieldField.C.

References FieldField< Field, Type >::component(), forAll, and PtrList< Field< Type > >::operator[]().

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Return a component field of the field.

Definition at line 236 of file FieldField.C.

References Foam::component(), FieldField< Field, Type >::NewCalculatedType(), and FieldField< Field, Type >::replace().

Referenced by FieldField< Field, Type >::negate().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Replace a component field of the field.

Definition at line 254 of file FieldField.C.

References forAll, and PtrList< Field< Type > >::operator[]().

Referenced by FieldField< Field, Type >::component().

Here is the call graph for this function:

Here is the caller graph for this function:

void replace ( const direction  d,
const cmptType s 
)

Replace a component field of the field.

Definition at line 268 of file FieldField.C.

References forAll, and PtrList< Field< Type > >::operator[]().

Here is the call graph for this function:

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

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

Definition at line 281 of file FieldField.C.

References T.

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

Definition at line 335 of file FieldField.C.

References forAll, and PtrList< Field< Type > >::operator[]().

Here is the call graph for this function:

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

Definition at line 374 of file FieldField.C.

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

Definition at line 374 of file FieldField.C.

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

Definition at line 375 of file FieldField.C.

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

Definition at line 375 of file FieldField.C.

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

Definition at line 376 of file FieldField.C.

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

Definition at line 376 of file FieldField.C.

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

Definition at line 377 of file FieldField.C.

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

Definition at line 377 of file FieldField.C.

void operator+= ( const Type &  t)

Definition at line 374 of file FieldField.C.

void operator-= ( const Type &  t)

Definition at line 375 of file FieldField.C.

void operator*= ( const scalar &  t)

Definition at line 376 of file FieldField.C.

void operator/= ( const scalar &  t)

Definition at line 377 of file FieldField.C.

Friends And Related Function Documentation

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

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