Public Types | Public Member Functions | Public Attributes | Friends | List of all members
VectorSpace< Form, Cmpt, nCmpt > Class Template Reference

Templated vector space. More...

Inheritance diagram for VectorSpace< Form, Cmpt, nCmpt >:
Inheritance graph
[legend]
Collaboration diagram for VectorSpace< Form, Cmpt, nCmpt >:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

 VectorSpace ()
 Construct null. More...
 
 VectorSpace (Istream &)
 Construct from Istream. More...
 
 VectorSpace (const VectorSpace< Form, Cmpt, nCmpt > &)
 Construct as copy. More...
 
template<class Form2 , class Cmpt2 >
 VectorSpace (const VectorSpace< Form2, Cmpt2, nCmpt > &)
 Construct as copy of another VectorSpace type of the same rank. More...
 
label size () const
 Return the number of elements in the VectorSpace = nCmpt. More...
 
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. More...
 

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 52 of file VectorSpace.H.

Member Typedef Documentation

typedef Cmpt cmptType

Component type.

Definition at line 80 of file VectorSpace.H.

Member Enumeration Documentation

anonymous enum
Enumerator
dim 

Dimensionality of space.

nComponents 

Number of components in this vector space.

Definition at line 85 of file VectorSpace.H.

Constructor & Destructor Documentation

VectorSpace ( )
inline

Construct null.

Definition at line 39 of file VectorSpaceI.H.

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

Here is the caller graph for this function:

VectorSpace ( Istream is)

Construct from Istream.

Definition at line 36 of file VectorSpace.C.

References IOstream::check(), Foam::name(), 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 45 of file VectorSpaceI.H.

References VectorSpaceOps< N, I >::eqOp(), and VectorSpace< Form, Cmpt, nCmpt >::VectorSpace().

Here is the call graph for this function:

VectorSpace ( const VectorSpace< Form2, Cmpt2, nCmpt > &  vs)
inline

Construct as copy of another VectorSpace type of the same rank.

Definition at line 56 of file VectorSpaceI.H.

References VectorSpaceOps< N, I >::eqOp().

Here is the call graph for this function:

Member Function Documentation

label size ( ) const
inline

Return the number of elements in the VectorSpace = nCmpt.

Definition at line 67 of file VectorSpaceI.H.

References VectorSpace< Form, Cmpt, nCmpt >::component().

Referenced by edgeCollapser::checkMeshQuality(), streamLineParticle::move(), and createShellMesh::setRefinement().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 96 of file VectorSpaceI.H.

References Foam::abort(), VectorSpace< Form, Cmpt, nCmpt >::component(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

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

Definition at line 115 of file VectorSpaceI.H.

References Foam::abort(), Foam::FatalError, FatalErrorIn, and VectorSpace< Form, Cmpt, nCmpt >::replace().

Here is the call graph for this function:

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

Definition at line 137 of file VectorSpaceI.H.

References Foam::abort(), Foam::constant::universal::c, Foam::FatalError, and FatalErrorIn.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 162 of file VectorSpaceI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

Cmpt & operator[] ( const direction  d)
inline

Definition at line 183 of file VectorSpaceI.H.

References Foam::abort(), Foam::FatalError, and FatalErrorIn.

Here is the call graph for this function:

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

Definition at line 202 of file VectorSpaceI.H.

References VectorSpaceOps< N, I >::eqOp().

Here is the call graph for this function:

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

Definition at line 212 of file VectorSpaceI.H.

References VectorSpaceOps< N, I >::eqOp().

Here is the call graph for this function:

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

Definition at line 222 of file VectorSpaceI.H.

References VectorSpaceOps< N, I >::eqOp().

Here is the call graph for this function:

void operator*= ( const scalar  s)
inline

Definition at line 232 of file VectorSpaceI.H.

References VectorSpaceOps< N, I >::eqOpS(), and s().

Here is the call graph for this function:

void operator/= ( const scalar  s)
inline

Definition at line 242 of file VectorSpaceI.H.

References VectorSpaceOps< N, I >::eqOpS(), s(), and Foam::setComponent().

Here is the call graph for this function:

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 documentation for this class was generated from the following files: