dune-fem  2.4.1-rc
Public Types | Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
Dune::Fem::VectorDefault< Field, Vector > Class Template Reference

default implementation of VectorInterface More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/storage/vector.hh>

Inheritance diagram for Dune::Fem::VectorDefault< Field, Vector >:
Inheritance graph

Public Types

typedef BaseType::FieldType FieldType
 
typedef BaseType::VectorInterfaceType VectorInterfaceType
 
typedef BaseType::VectorType VectorType
 
typedef BaseType::ConstIteratorType ConstIteratorType
 
typedef BaseType::IteratorType IteratorType
 
typedef VectorDefaultTraits< Field, Vector > Traits
 
typedef FieldType value_type
 
typedef Traits::ArrayType ArrayType
 type of the implementation (Barton-Nackman) More...
 
typedef ThisType ArrayInterfaceType
 type of this interface More...
 
typedef Traits::ElementType ElementType
 type of the array elements More...
 
typedef ConstIteratorType const_iterator
 type of constant iterator More...
 
typedef IteratorType iterator
 type of (non-constant) iterator More...
 
typedef unsigned int size_type
 type of unsigned integral type of indexing More...
 

Public Member Functions

template<class T >
VectorTypeoperator+= (const VectorInterface< T > &v)
 Add another vector to this one. More...
 
template<class T >
VectorTypeoperator-= (const VectorInterface< T > &v)
 Subtract another vector from this one. More...
 
VectorTypeoperator*= (const FieldType s)
 Multiply this vector by a scalar. More...
 
template<class T >
VectorTypeaddScaled (const FieldType s, const VectorInterface< T > &v)
 Add a multiple of another vector to this one. More...
 
template<class T >
void assign (const VectorInterface< T > &v)
 copy another vector to this one More...
 
void assign (const FieldType s)
 Initialize all fields of this vector with a scalar. More...
 
void clear ()
 initialize the vector to 0 More...
 
ConstIteratorType begin () const
 obtain begin iterator More...
 
IteratorType begin ()
 obtain begin iterator More...
 
ConstIteratorType end () const
 obtain end iterator More...
 
IteratorType end ()
 obtain end iterator More...
 
const FieldTypeoperator[] (unsigned int index) const
 Returns a const reference to the field indexed by index. More...
 
FieldTypeoperator[] (unsigned int index)
 Returns a reference to the field indexed by index. More...
 
void assign (const ElementType &element)
 fill the array with copies of an element More...
 
void assign (const ArrayInterface< T > &other)
 copy another array to this one More...
 
unsigned int size () const
 Returns the vector's size. More...
 

Protected Member Functions

const VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayTypeasImp () const
 
VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayTypeasImp ()
 

Static Protected Member Functions

static const VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayTypeasImp (const ThisType &other)
 
static VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayTypeasImp (ThisType &other)
 

Detailed Description

template<class Field, class Vector>
class Dune::Fem::VectorDefault< Field, Vector >

default implementation of VectorInterface

Member Typedef Documentation

type of this interface

type of the implementation (Barton-Nackman)

type of constant iterator

template<class Field, class Vector>
typedef BaseType :: ConstIteratorType Dune::Fem::VectorDefault< Field, Vector >::ConstIteratorType

type of the array elements

template<class Field, class Vector>
typedef BaseType :: FieldType Dune::Fem::VectorDefault< Field, Vector >::FieldType

type of (non-constant) iterator

template<class Field, class Vector>
typedef BaseType :: IteratorType Dune::Fem::VectorDefault< Field, Vector >::IteratorType
typedef unsigned int Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > > >::size_type
inherited

type of unsigned integral type of indexing

typedef VectorDefaultTraits< Field, Vector > Dune::Fem::VectorInterface< VectorDefaultTraits< Field, Vector > >::Traits
inherited
typedef FieldType Dune::Fem::VectorInterface< VectorDefaultTraits< Field, Vector > >::value_type
inherited
template<class Field, class Vector>
typedef BaseType :: VectorInterfaceType Dune::Fem::VectorDefault< Field, Vector >::VectorInterfaceType
template<class Field, class Vector>
typedef BaseType :: VectorType Dune::Fem::VectorDefault< Field, Vector >::VectorType

Member Function Documentation

template<class Field, class Vector>
template<class T >
VectorType& Dune::Fem::VectorDefault< Field, Vector >::addScaled ( const FieldType  s,
const VectorInterface< T > &  v 
)
inline

Add a multiple of another vector to this one.

static const VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayType & Dune::Fem::BartonNackmanInterface< ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > > > , VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayType >::asImp ( const ThisType other)
inlinestaticprotectedinherited
static VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayType & Dune::Fem::BartonNackmanInterface< ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > > > , VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > >::ArrayType >::asImp ( ThisType other)
inlinestaticprotectedinherited
void Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > > >::assign ( const ElementType element)
inlineinherited

fill the array with copies of an element

Parameters
[in]elementelement wich shall be copied into every array entry
void Dune::Fem::ArrayInterface< VectorInterfaceArrayTraits< VectorDefaultTraits< Field, Vector > > >::assign ( const ArrayInterface< T > &  other)
inlineinherited

copy another array to this one

Copies the data from another array to this one. Both arrays must be of the same size.

Parameters
[in]otherarray to copy
template<class Field, class Vector>
template<class T >
void Dune::Fem::VectorDefault< Field, Vector >::assign ( const VectorInterface< T > &  v)
inline

copy another vector to this one

Copies the data from another vector to this one. Both vectors must be of the same size.

Parameters
[in]vvector to copy
template<class Field, class Vector>
void Dune::Fem::VectorDefault< Field, Vector >::assign ( const FieldType  s)
inline

Initialize all fields of this vector with a scalar.

template<class Field, class Vector>
ConstIteratorType Dune::Fem::VectorDefault< Field, Vector >::begin ( ) const
inline

obtain begin iterator

template<class Field, class Vector>
IteratorType Dune::Fem::VectorDefault< Field, Vector >::begin ( )
inline

obtain begin iterator

template<class Field, class Vector>
void Dune::Fem::VectorDefault< Field, Vector >::clear ( )
inline

initialize the vector to 0

template<class Field, class Vector>
ConstIteratorType Dune::Fem::VectorDefault< Field, Vector >::end ( ) const
inline

obtain end iterator

template<class Field, class Vector>
IteratorType Dune::Fem::VectorDefault< Field, Vector >::end ( )
inline

obtain end iterator

template<class Field, class Vector>
VectorType& Dune::Fem::VectorDefault< Field, Vector >::operator*= ( const FieldType  s)
inline

Multiply this vector by a scalar.

template<class Field, class Vector>
template<class T >
VectorType& Dune::Fem::VectorDefault< Field, Vector >::operator+= ( const VectorInterface< T > &  v)
inline

Add another vector to this one.

template<class Field, class Vector>
template<class T >
VectorType& Dune::Fem::VectorDefault< Field, Vector >::operator-= ( const VectorInterface< T > &  v)
inline

Subtract another vector from this one.

const FieldType& Dune::Fem::VectorInterface< VectorDefaultTraits< Field, Vector > >::operator[] ( unsigned int  index) const
inherited

Returns a const reference to the field indexed by index.

FieldType& Dune::Fem::VectorInterface< VectorDefaultTraits< Field, Vector > >::operator[] ( unsigned int  index)
inherited

Returns a reference to the field indexed by index.

unsigned int Dune::Fem::VectorInterface< VectorDefaultTraits< Field, Vector > >::size ( ) const
inherited

Returns the vector's size.


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