Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
VectorSpace Class Reference

Templated vector space. More...

Inheritance diagram for VectorSpace:
Inheritance graph
[legend]

Classes

class  ConstBlock
 

Public Types

typedef VectorSpace< Form, Cmpt, Ncmpts > vsType
 
typedef Cmpt cmptType
 
typedef Cmpt magType
 
typedef Cmpt * iterator
 

Public Member Functions

 VectorSpace ()=default
 
 VectorSpace (const Foam::zero)
 
 VectorSpace (const VectorSpace< Form, Cmpt, Ncmpts > &vs)
 
template<class Form2 , class Cmpt2 >
 VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
 
 VectorSpace (Istream &is)
 
const Cmpt & component (const direction) const
 
Cmpt & component (const direction)
 
void component (Cmpt &, const direction) const
 
void replace (const direction, const Cmpt &)
 
const Cmpt * cdata () const noexcept
 
Cmpt * data () noexcept
 
template<class SubVector , direction BStart>
const ConstBlock< SubVector, BStart > block () const
 
const Cmpt & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator+= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator-= (const VectorSpace< Form, Cmpt, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 
iterator begin () noexcept
 
iterator end () noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
const_iterator begin () const noexcept
 
const_iterator end () const noexcept
 
template<class SubVector , Foam::direction BStart>
const Foam::VectorSpace< Form, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 

Static Public Member Functions

static constexpr direction size () noexcept
 
static Form uniform (const Cmpt &s)
 

Public Attributes

const typedef Cmpt * const_iterator
 
Cmpt v_ [Ncmpts]
 

Static Public Attributes

static constexpr direction dim = 3
 
static constexpr direction nComponents = Ncmpts
 
static constexpr direction mRows = Ncmpts
 
static constexpr direction nCols = 1
 
static const char *const typeName
 
static const char *const componentNames []
 
static const Form zero
 
static const Form one
 
static const Form max
 
static const Form min
 
static const Form rootMax
 
static const Form rootMin
 

Friends

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

Detailed Description

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

◆ vsType

typedef VectorSpace<Form, Cmpt, Ncmpts> vsType

Definition at line 82 of file VectorSpace.H.

◆ cmptType

typedef Cmpt cmptType

Definition at line 85 of file VectorSpace.H.

◆ magType

typedef Cmpt magType

Definition at line 88 of file VectorSpace.H.

◆ iterator

typedef Cmpt* iterator

Definition at line 213 of file VectorSpace.H.

Constructor & Destructor Documentation

◆ VectorSpace() [1/5]

VectorSpace ( )
default

◆ VectorSpace() [2/5]

VectorSpace ( const Foam::zero  )
inline

Definition at line 31 of file VectorSpaceI.H.

◆ VectorSpace() [3/5]

VectorSpace ( const VectorSpace< Form, Cmpt, Ncmpts > &  vs)
inline

Definition at line 39 of file VectorSpaceI.H.

◆ VectorSpace() [4/5]

VectorSpace ( const VectorSpace< Form2, Cmpt2, Ncmpts > &  vs)
inlineexplicit

Definition at line 50 of file VectorSpaceI.H.

◆ VectorSpace() [5/5]

VectorSpace ( Istream is)
explicit

Definition at line 30 of file VectorSpace.C.

Member Function Documentation

◆ size()

static constexpr direction size ( )
inlinestaticconstexprnoexcept

Definition at line 172 of file VectorSpace.H.

Referenced by cell::mag(), streamLineParticle::move(), and Foam::zip().

Here is the caller graph for this function:

◆ component() [1/3]

const Cmpt& component ( const  direction) const
inline

◆ component() [2/3]

Cmpt& component ( const  direction)
inline

◆ component() [3/3]

void component ( Cmpt &  ,
const  direction 
) const
inline

◆ replace()

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

Definition at line 138 of file VectorSpaceI.H.

Referenced by particle< Type >::trackToMovingTri(), and particle< Type >::trackToStationaryTri().

Here is the caller graph for this function:

◆ cdata()

const Cmpt * cdata ( ) const
inlinenoexcept

Definition at line 185 of file VectorSpaceI.H.

◆ data()

Cmpt * data ( )
inlinenoexcept

Definition at line 178 of file VectorSpaceI.H.

◆ uniform()

Form uniform ( const Cmpt &  s)
inlinestatic

Definition at line 157 of file VectorSpaceI.H.

◆ block() [1/2]

const ConstBlock<SubVector, BStart> block ( ) const
inline

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

Cmpt& operator[] ( const  direction)
inline

◆ operator=() [1/2]

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

Referenced by MatrixSpace< BarycentricTensor< Cmpt >, Cmpt, 4, 3 >::operator=().

Here is the caller graph for this function:

◆ operator+=()

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

Definition at line 341 of file VectorSpaceI.H.

◆ operator-=()

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

Definition at line 351 of file VectorSpaceI.H.

◆ operator=() [2/2]

void operator= ( const Foam::zero  )
inline

Definition at line 360 of file VectorSpaceI.H.

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 368 of file VectorSpaceI.H.

◆ operator/=()

void operator/= ( const scalar  s)
inline

Definition at line 378 of file VectorSpaceI.H.

◆ begin() [1/2]

iterator begin ( )
inlinenoexcept

Referenced by Foam::eigenValues().

Here is the caller graph for this function:

◆ end() [1/2]

iterator end ( )
inlinenoexcept

Referenced by Foam::eigenValues().

Here is the caller graph for this function:

◆ cbegin()

const Cmpt * cbegin ( ) const
inlinenoexcept

Definition at line 206 of file VectorSpaceI.H.

◆ cend()

const Cmpt * cend ( ) const
inlinenoexcept

Definition at line 214 of file VectorSpaceI.H.

◆ begin() [2/2]

const_iterator begin ( ) const
inlinenoexcept

◆ end() [2/2]

const_iterator end ( ) const
inlinenoexcept

◆ block() [2/2]

const Foam::VectorSpace<Form, Cmpt, Ncmpts>::template ConstBlock<SubVector, BStart> block ( ) const
inline

Definition at line 169 of file VectorSpaceI.H.

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream ,
VectorSpace< Form, Cmpt, Ncmpts > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const VectorSpace< Form, Cmpt, Ncmpts > &   
)
friend

Member Data Documentation

◆ const_iterator

const typedef Cmpt* const_iterator

Definition at line 216 of file VectorSpace.H.

◆ v_

Cmpt v_[Ncmpts]

◆ dim

constexpr direction dim = 3
staticconstexpr

Definition at line 94 of file VectorSpace.H.

◆ nComponents

constexpr direction nComponents = Ncmpts
staticconstexpr

Definition at line 97 of file VectorSpace.H.

◆ mRows

constexpr direction mRows = Ncmpts
staticconstexpr

Definition at line 103 of file VectorSpace.H.

◆ nCols

constexpr direction nCols = 1
staticconstexpr

Definition at line 104 of file VectorSpace.H.

◆ typeName

const char* const typeName
static

Definition at line 109 of file VectorSpace.H.

◆ componentNames

const char* const componentNames[]
static

Definition at line 110 of file VectorSpace.H.

◆ zero

const Form zero
static

Definition at line 111 of file VectorSpace.H.

◆ one

const Form one
static

Definition at line 112 of file VectorSpace.H.

◆ max

const Form max
static

◆ min

const Form min
static

◆ rootMax

const Form rootMax
static

Definition at line 115 of file VectorSpace.H.

◆ rootMin

const Form rootMin
static

Definition at line 116 of file VectorSpace.H.


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