FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

SubField< Type > Class Template Reference

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

#include <OpenFOAM/SubField.H>


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 59 of file SubField.H.

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.

Member Typedef Documentation

typedef pTraits<Type>::cmptType cmptType

Component type.

Reimplemented in SubDimensionedField< Type, GeoMesh >.

Definition at line 68 of file SubField.H.


Constructor & Destructor Documentation

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

Construct from a SubList.

Definition at line 30 of file SubFieldI.H.

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

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

Definition at line 40 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 50 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 61 of file SubFieldI.H.

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

Construct as copy.

Definition at line 73 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 85 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 94 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 103 of file SubFieldI.H.

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

Assignment via UList operator. Takes linear time.

Definition at line 112 of file SubFieldI.H.

Referenced by SubDimensionedField< Type, GeoMesh >::operator=().

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

Allow cast to a const Field<Type>&.


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