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

VectorSpace< Form, Cmpt, nCmpt > Class Template Reference

Templated vector space. More...

Inheritance diagram for VectorSpace< Form, Cmpt, nCmpt >:
Collaboration diagram for VectorSpace< Form, Cmpt, nCmpt >:

List of all members.


Public Types

enum  { dim = 3, nComponents = nCmpt }
typedef Cmpt cmptType
 Component type.

Public Member Functions

 VectorSpace ()
 Construct null.
 VectorSpace (Istream &)
 Construct from Istream.
 VectorSpace (const VectorSpace< Form, Cmpt, nCmpt > &)
 Construct as copy.
label size () const
 Return the number of elements in the VectorSpace = nCmpt.
const Cmpt & component (const direction) const
Cmpt & component (const direction)
void component (Cmpt &, const direction) const
void replace (const direction, const Cmpt &)
const Cmpt & operator[] (const direction) const
Cmpt & operator[] (const direction)
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
void operator+= (const VectorSpace< Form, Cmpt, nCmpt > &)
void operator-= (const VectorSpace< Form, Cmpt, nCmpt > &)
void operator*= (const scalar)
void operator/= (const scalar)

Public Attributes

Cmpt v_ [nCmpt]
 The components of this vector space.

Friends

Istreamoperator>> (Istream &, VectorSpace< Form, Cmpt, nCmpt > &)
Ostreamoperator (Ostream &, const VectorSpace< Form, Cmpt, nCmpt > &)

Detailed Description

template<class Form, class Cmpt, int nCmpt>
class Foam::VectorSpace< Form, Cmpt, nCmpt >

Templated vector space.

Template arguments are the Form the vector space will be used to create, the type of the elements and the number of elements.

Source files

Definition at line 70 of file VectorSpace.H.


Member Typedef Documentation

typedef Cmpt cmptType

Component type.

Definition at line 76 of file VectorSpace.H.


Member Enumeration Documentation

anonymous enum

Enumerator:
dim 
nComponents 

Definition at line 81 of file VectorSpace.H.


Constructor & Destructor Documentation

VectorSpace (  )  [inline]

Construct null.

Definition at line 31 of file VectorSpaceI.H.

VectorSpace ( Istream is  )  [inline]

Construct from Istream.

Definition at line 28 of file VectorSpace.C.

References Istream::readBegin(), Istream::readEnd(), and VectorSpace< Form, Cmpt, nCmpt >::v_.

Here is the call graph for this function:

VectorSpace ( const VectorSpace< Form, Cmpt, nCmpt > &  vs  )  [inline]

Construct as copy.

Definition at line 37 of file VectorSpaceI.H.


Member Function Documentation

label size (  )  const [inline]

Return the number of elements in the VectorSpace = nCmpt.

Definition at line 48 of file VectorSpaceI.H.

const Cmpt & component ( const direction  d  )  const [inline]

Definition at line 56 of file VectorSpaceI.H.

Cmpt & component ( const direction  d  )  [inline]

Definition at line 77 of file VectorSpaceI.H.

void component ( Cmpt &  c,
const direction  d 
) const [inline]

Definition at line 96 of file VectorSpaceI.H.

void replace ( const direction  d,
const Cmpt &  c 
) [inline]

Definition at line 118 of file VectorSpaceI.H.

const Cmpt & operator[] ( const direction  d  )  const [inline]

Definition at line 143 of file VectorSpaceI.H.

Cmpt & operator[] ( const direction  d  )  [inline]

Definition at line 164 of file VectorSpaceI.H.

void operator= ( const VectorSpace< Form, Cmpt, nCmpt > &  vs  )  [inline]

Definition at line 183 of file VectorSpaceI.H.

void operator+= ( const VectorSpace< Form, Cmpt, nCmpt > &  vs  )  [inline]

Definition at line 193 of file VectorSpaceI.H.

void operator-= ( const VectorSpace< Form, Cmpt, nCmpt > &  vs  )  [inline]

Definition at line 203 of file VectorSpaceI.H.

void operator*= ( const scalar  s  )  [inline]

Definition at line 213 of file VectorSpaceI.H.

void operator/= ( const scalar  s  )  [inline]

Definition at line 223 of file VectorSpaceI.H.


Friends And Related Function Documentation

Istream& operator>> ( Istream ,
VectorSpace< Form, Cmpt, nCmpt > &   
) [friend]

Ostream& operator ( Ostream ,
const VectorSpace< Form, Cmpt, nCmpt > &   
) [friend]


Member Data Documentation

Cmpt v_[nCmpt]

The components of this vector space.

Definition at line 91 of file VectorSpace.H.

Referenced by VectorSpace< Form, Cmpt, nCmpt >::VectorSpace().


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