OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

DynamicField< Type > Class Template Reference

Dynamically sized Field. WIP. More...

Inheritance diagram for DynamicField< Type >:
Collaboration diagram for DynamicField< Type >:

List of all members.


Public Member Functions

 DynamicField ()
 Construct null.
 DynamicField (const label)
 Construct given size.
 DynamicField (const UList< Type > &)
 Construct as copy of a UList<Type>.
 DynamicField (const Xfer< List< Type > > &)
 Construct by transferring the List contents.
 DynamicField (const UList< Type > &mapF, const labelList &mapAddressing)
 Construct by 1 to 1 mapping from the given field.
 DynamicField (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 Construct by interpolative mapping from the given field.
 DynamicField (const UList< Type > &mapF, const FieldMapper &map)
 Construct by mapping from the given field.
 DynamicField (const DynamicField< Type > &)
 Construct as copy.
 DynamicField (DynamicField< Type > &, bool reUse)
 Construct as copy or re-use as specified.
 DynamicField (const Xfer< DynamicField< Type > > &)
 Construct by transferring the Field contents.
 DynamicField (Istream &)
 Construct from Istream.
tmp< DynamicField< Type > > clone () const
 Clone.
label capacity () const
 Size of the underlying storage.
void append (const Type &)
 Append an element at the end of the list.
void setSize (const label nElem)
 Alter the addressed list size.
void operator= (const DynamicField< Type > &)
void operator= (const UList< Type > &)
 Assignment from UList operator. Takes linear time.
void operator= (const tmp< DynamicField< Type > > &)
Type & operator[] (const label i)
 Return element of Field.
const Type & operator[] (const label) const
 Return element of constant Field.

Static Public Member Functions

static const DynamicField< Type > & null ()
 Return a null field.

Static Public Attributes

static const char *const typeName

Friends

Ostream & operator (Ostream &, const DynamicField< Type > &)
Ostream & operator (Ostream &, const tmp< DynamicField< Type > > &)
Istream & operator>> (Istream &, DynamicField< Type > &)

Detailed Description

template<class Type>
class Foam::DynamicField< Type >

Dynamically sized Field. WIP.

Source files

Definition at line 60 of file DynamicField.H.


Constructor & Destructor Documentation

DynamicField (  )  [inline]

Construct null.

Used for temporary fields which are initialised after construction

Definition at line 28 of file DynamicFieldI.H.

DynamicField ( const label  size  )  [inline, explicit]

Construct given size.

Used for temporary fields which are initialised after construction

Definition at line 36 of file DynamicFieldI.H.

DynamicField ( const UList< Type > &  lst  )  [inline, explicit]

Construct as copy of a UList<Type>.

Definition at line 47 of file DynamicFieldI.H.

References List< Type >::size().

Here is the call graph for this function:

DynamicField ( const Xfer< List< Type > > &  lst  )  [inline, explicit]

Construct by transferring the List contents.

Definition at line 58 of file DynamicFieldI.H.

DynamicField ( const UList< Type > &  mapF,
const labelList &  mapAddressing 
) [inline]

Construct by 1 to 1 mapping from the given field.

Definition at line 69 of file DynamicFieldI.H.

DynamicField ( const UList< Type > &  mapF,
const labelListList &  mapAddressing,
const scalarListList &  weights 
) [inline]

Construct by interpolative mapping from the given field.

Definition at line 81 of file DynamicFieldI.H.

DynamicField ( const UList< Type > &  mapF,
const FieldMapper &  map 
) [inline]

Construct by mapping from the given field.

Definition at line 95 of file DynamicFieldI.H.

DynamicField ( const DynamicField< Type > &  f  )  [inline]

Construct as copy.

Definition at line 106 of file DynamicFieldI.H.

DynamicField ( DynamicField< Type > &  f,
bool  reUse 
) [inline]

Construct as copy or re-use as specified.

Definition at line 114 of file DynamicFieldI.H.

DynamicField ( const Xfer< DynamicField< Type > > &  f  )  [inline]

Construct by transferring the Field contents.

Definition at line 122 of file DynamicFieldI.H.

DynamicField ( Istream &  is  )  [inline]

Construct from Istream.

Definition at line 34 of file DynamicField.C.


Member Function Documentation

static const DynamicField<Type>& null (  )  [inline, static]

Return a null field.

Reimplemented from Field< Type >.

Definition at line 92 of file DynamicField.H.

tmp< DynamicField< Type > > clone (  )  const [inline]

Clone.

Reimplemented from Field< Type >.

Definition at line 42 of file DynamicField.C.

Foam::label capacity (  )  const [inline]

Size of the underlying storage.

Definition at line 132 of file DynamicFieldI.H.

void append ( const Type &  t  )  [inline]

Append an element at the end of the list.

Definition at line 139 of file DynamicFieldI.H.

void setSize ( const label  nElem  )  [inline]

Alter the addressed list size.

New space will be allocated if required. Use this to resize the list prior to using the operator[] for setting values (as per List usage).

Reimplemented from List< Type >.

Definition at line 51 of file DynamicField.C.

void operator= ( const DynamicField< Type > &  rhs  )  [inline]

Definition at line 151 of file DynamicFieldI.H.

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

Assignment from UList operator. Takes linear time.

Reimplemented from Field< Type >.

Definition at line 166 of file DynamicFieldI.H.

void operator= ( const tmp< DynamicField< Type > > &   )  [inline]

Type & operator[] ( const label  i  )  [inline]

Return element of Field.

Reimplemented from UList< Type >.

Definition at line 192 of file DynamicFieldI.H.

Referenced by DynamicField< Type >::operator[]().

Here is the caller graph for this function:

const Type & operator[] ( const label  i  )  const [inline]

Return element of constant Field.

Reimplemented from UList< Type >.

Definition at line 199 of file DynamicFieldI.H.

References DynamicField< Type >::operator[]().

Here is the call graph for this function:


Friends And Related Function Documentation

Ostream& operator ( Ostream &  ,
const DynamicField< Type > &   
) [friend]

Ostream& operator ( Ostream &  ,
const tmp< DynamicField< Type > > &   
) [friend]

Istream& operator>> ( Istream &  ,
DynamicField< Type > &   
) [friend]

Definition at line 89 of file DynamicField.C.


Member Data Documentation

const char *const typeName [inline, static]

Reimplemented from Field< Type >.

Definition at line 86 of file DynamicField.H.


The documentation for this class was generated from the following files:
Copyright © 2000-2009 OpenCFD Ltd