dune-fem  2.4.1-rc
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::ISTLBlockVector< DofBlock > Class Template Reference

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/function/blockvectors/defaultblockvectors.hh>

Inheritance diagram for Dune::Fem::ISTLBlockVector< DofBlock >:
Inheritance graph

Classes

class  Iterator
 

Public Types

enum  { blockSize = DofBlock :: dimension }
 
typedef ArrayType DofContainerType
 
typedef DofBlock::value_type FieldType
 
typedef Iterator< typename ArrayType::Iterator, FieldTypeIteratorType
 
typedef Iterator< typename ArrayType::ConstIterator, const FieldTypeConstIteratorType
 
typedef DofBlock DofBlockType
 
typedef const DofBlock ConstDofBlockType
 
typedef DofBlockTypeDofBlockPtrType
 
typedef ConstDofBlockTypeConstDofBlockPtrType
 
typedef ArrayType::size_type SizeType
 
typedef ArrayType::value_type value_type
 Typedef to make this class STL-compatible. More...
 

Public Member Functions

 ISTLBlockVector (ArrayType &array)
 Constructor; use this to create a block vector with 'size' blocks. More...
 
 ISTLBlockVector ()
 
const ThisTypeoperator= (const ThisType &other)
 Copy assignment operator. More...
 
DofBlockPtrType blockPtr (const unsigned int i)
 
ConstDofBlockPtrType blockPtr (const unsigned int i) const
 
DofBlockTypeoperator[] (const unsigned int i)
 
ConstDofBlockTypeoperator[] (const unsigned int i) const
 
IteratorType begin ()
 
ConstIteratorType begin () const
 
IteratorType end ()
 
ConstIteratorType end () const
 
SizeType size () const
 
void reserve (const int size)
 Reserve memory. More...
 
void resize (SizeType size)
 Resize the block vector. More...
 
ArrayTypearray ()
 
const ArrayTypearray () const
 
const ThisTypeoperator+= (const ThisType &other)
 Add another block vector to *this. More...
 
const ThisTypeoperator-= (const ThisType &other)
 Subtract another block vector from *this. More...
 
FieldType operator* (const ThisType &other) const
 Scalar product *this with another block vector. More...
 
const ThisTypeoperator*= (const FieldType &scalar)
 Scale this block vector. More...
 
void axpy (const FieldType &scalar, const ThisType &other)
 Add a scalar multiple of another block vector to this block vector. More...
 
void clear ()
 Clear this block vector, i.e. set each dof to 0. More...
 

Protected Types

typedef DebugCounter< size_t > CounterType
 

Protected Member Functions

void assign (const ThisType &other)
 
ThisTypeasImp ()
 
const ThisTypeasImp () const
 

Protected Attributes

ArrayTypearray_
 
CounterType sequence_
 

Member Typedef Documentation

template<class DofBlock >
typedef ConstDofBlockType* Dune::Fem::ISTLBlockVector< DofBlock >::ConstDofBlockPtrType
template<class DofBlock >
typedef const DofBlock Dune::Fem::ISTLBlockVector< DofBlock >::ConstDofBlockType
template<class DofBlock >
typedef Iterator< typename ArrayType::ConstIterator, const FieldType > Dune::Fem::ISTLBlockVector< DofBlock >::ConstIteratorType
typedef DebugCounter<size_t> Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::CounterType
protectedinherited
template<class DofBlock >
typedef DofBlockType* Dune::Fem::ISTLBlockVector< DofBlock >::DofBlockPtrType
template<class DofBlock >
typedef DofBlock Dune::Fem::ISTLBlockVector< DofBlock >::DofBlockType
template<class DofBlock >
typedef ArrayType Dune::Fem::ISTLBlockVector< DofBlock >::DofContainerType
template<class DofBlock >
typedef DofBlock :: value_type Dune::Fem::ISTLBlockVector< DofBlock >::FieldType
template<class DofBlock >
typedef Iterator< typename ArrayType::Iterator, FieldType > Dune::Fem::ISTLBlockVector< DofBlock >::IteratorType
template<class DofBlock >
typedef ArrayType::size_type Dune::Fem::ISTLBlockVector< DofBlock >::SizeType
template<class DofBlock >
typedef ArrayType::value_type Dune::Fem::ISTLBlockVector< DofBlock >::value_type

Typedef to make this class STL-compatible.

Member Enumeration Documentation

template<class DofBlock >
anonymous enum
Enumerator
blockSize 

Constructor & Destructor Documentation

template<class DofBlock >
Dune::Fem::ISTLBlockVector< DofBlock >::ISTLBlockVector ( ArrayType array)
inlineexplicit

Constructor; use this to create a block vector with 'size' blocks.

The dofs are not initialized.

Parameters
[in]sizeNumber of blocks
template<class DofBlock >
Dune::Fem::ISTLBlockVector< DofBlock >::ISTLBlockVector ( )
inline

Member Function Documentation

template<class DofBlock >
ArrayType& Dune::Fem::ISTLBlockVector< DofBlock >::array ( )
inline
template<class DofBlock >
const ArrayType& Dune::Fem::ISTLBlockVector< DofBlock >::array ( ) const
inline
ThisType& Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::asImp ( )
inlineprotectedinherited
const ThisType& Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::asImp ( ) const
inlineprotectedinherited
void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::assign ( const ThisType other)
inlineprotectedinherited
void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::axpy ( const FieldType scalar,
const ThisType other 
)
inlineinherited

Add a scalar multiple of another block vector to this block vector.

Semantic in pseudocode: " *this = *this + scalar*v "

Parameters
[in]scalarScalar factor by which v is multiplied before it is added to *this
[in]otherThe other block vector
template<class DofBlock >
IteratorType Dune::Fem::ISTLBlockVector< DofBlock >::begin ( )
inline
template<class DofBlock >
ConstIteratorType Dune::Fem::ISTLBlockVector< DofBlock >::begin ( ) const
inline
template<class DofBlock >
DofBlockPtrType Dune::Fem::ISTLBlockVector< DofBlock >::blockPtr ( const unsigned int  i)
inline
template<class DofBlock >
ConstDofBlockPtrType Dune::Fem::ISTLBlockVector< DofBlock >::blockPtr ( const unsigned int  i) const
inline
void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::clear ( )
inlineinherited

Clear this block vector, i.e. set each dof to 0.

template<class DofBlock >
IteratorType Dune::Fem::ISTLBlockVector< DofBlock >::end ( )
inline
template<class DofBlock >
ConstIteratorType Dune::Fem::ISTLBlockVector< DofBlock >::end ( ) const
inline
FieldType Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::operator* ( const ThisType other) const
inlineinherited

Scalar product *this with another block vector.

Parameters
[in]otherOther block vector
Returns
Returns the scalar product " (*this)*other"
const ThisType& Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::operator*= ( const FieldType scalar)
inlineinherited

Scale this block vector.

Parameters
[in]scalarFactor for the scaling
Returns
Constant reference to *this
const ThisType& Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::operator+= ( const ThisType other)
inlineinherited

Add another block vector to *this.

Parameters
[in]otherOther block vector to add
Returns
Constant reference to *this
const ThisType& Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::operator-= ( const ThisType other)
inlineinherited

Subtract another block vector from *this.

Parameters
[in]otherOther block vector to subtract
Returns
Constant reference to *this
template<class DofBlock >
const ThisType& Dune::Fem::ISTLBlockVector< DofBlock >::operator= ( const ThisType other)
inline

Copy assignment operator.

References Dune::Fem::ISTLBlockVector< DofBlock >::array().

template<class DofBlock >
DofBlockType& Dune::Fem::ISTLBlockVector< DofBlock >::operator[] ( const unsigned int  i)
inline
template<class DofBlock >
ConstDofBlockType& Dune::Fem::ISTLBlockVector< DofBlock >::operator[] ( const unsigned int  i) const
inline
template<class DofBlock >
void Dune::Fem::ISTLBlockVector< DofBlock >::reserve ( const int  size)
inline

Reserve memory.

This method is a no-op. It is defined here to make the block vector compatible to the managed dof storage mechanisms used by Dune::Fem::BlockVectorDiscreteFunction

Parameters
[in]sizeNumber of blocks
template<class DofBlock >
void Dune::Fem::ISTLBlockVector< DofBlock >::resize ( SizeType  size)
inline

Resize the block vector.

Parameters
[in]sizeNew number of blocks
template<class DofBlock >
SizeType Dune::Fem::ISTLBlockVector< DofBlock >::size ( ) const
inline

Member Data Documentation

template<class DofBlock >
ArrayType* Dune::Fem::ISTLBlockVector< DofBlock >::array_
protected
CounterType Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock::value_type >::sequence_
mutableprotectedinherited

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