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

SubField< Type > Class Template Reference

SubField is a Field obtained as a section of another Field. More...

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

List of all members.


Public Types

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

Public Member Functions

 SubField (const SubList< Type > &)
 Construct from a SubList.
 SubField (const UList< Type > &)
 Construct from a UList<Type>, using the entire size.
 SubField (const UList< Type > &list, const label subSize)
 Construct from a UList<Type> with a given size.
 SubField (const UList< Type > &list, const label subSize, const label startIndex)
 Construct from a UList<Type> with a given size and start index.
 SubField (const SubField< Type > &)
 Construct as copy.
tmp< Field< cmptType > > component (const direction) const
 Return a component field of the field.
tmp< Field< Type > > T () const
 Return the field transpose (only defined for second rank tensors).
void operator= (const SubField< Type > &)
 Assignment via UList operator. Takes linear time.
 operator const Field< Type > & () const
 Allow cast to a const Field<Type>&.

Static Public Member Functions

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

Detailed Description

template<class Type>
class Foam::SubField< Type >

SubField is a Field obtained as a section of another Field.

Thus it is itself unallocated so that no storage is allocated or deallocated during its use. To achieve this behaviour, SubField is derived from a SubList rather than a List.

Source files

Definition at line 54 of file SubField.H.


Member Typedef Documentation

Component type.

Reimplemented in SubDimensionedField< Type, GeoMesh >.

Definition at line 63 of file SubField.H.


Constructor & Destructor Documentation

SubField ( const SubList< Type > &  list  )  [inline]

Construct from a SubList.

Definition at line 22 of file SubFieldI.H.

SubField ( const UList< Type > &  list  )  [inline, explicit]

Construct from a UList<Type>, using the entire size.

Definition at line 32 of file SubFieldI.H.

SubField ( const UList< Type > &  list,
const label  subSize 
) [inline]

Construct from a UList<Type> with a given size.

Definition at line 42 of file SubFieldI.H.

SubField ( const UList< Type > &  list,
const label  subSize,
const label  startIndex 
) [inline]

Construct from a UList<Type> with a given size and start index.

Definition at line 53 of file SubFieldI.H.

SubField ( const SubField< Type > &  sfield  )  [inline]

Construct as copy.

Definition at line 65 of file SubFieldI.H.


Member Function Documentation

const Foam::SubField< Type > & null (  )  [inline, static]

Return a null SubField.

Reimplemented from SubList< Type >.

Reimplemented in SubDimensionedField< Type, GeoMesh >.

Definition at line 77 of file SubFieldI.H.

Foam::tmp< Foam::Field< typename Foam::SubField< Type >::cmptType > > component ( const direction  d  )  const [inline]

Return a component field of the field.

Reimplemented in SubDimensionedField< Type, GeoMesh >.

Definition at line 86 of file SubFieldI.H.

Foam::tmp< Foam::Field< Type > > T (  )  const [inline]

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

Reimplemented in SubDimensionedField< Type, GeoMesh >.

Definition at line 95 of file SubFieldI.H.

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

Assignment via UList operator. Takes linear time.

Definition at line 104 of file SubFieldI.H.

Referenced by SubDimensionedField< Type, GeoMesh >::operator const DimensionedField< Type, GeoMesh > &().

Here is the caller graph for this function:

operator const Field< Type > & (  )  const [inline]

Allow cast to a const Field<Type>&.


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