dune-fem 2.8.0
Loading...
Searching...
No Matches
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 <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 Hybrid::IndexRange< int, blockSizeBlockIndices
 
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.
 

Public Member Functions

 ISTLBlockVector (const ThisType &)=default
 
 ISTLBlockVector (ArrayType *array)
 Constructor.
 
 ISTLBlockVector ()=default
 
const ThisTypeoperator= (const ThisType &other)
 Copy assignment operator.
 
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
 
SizeType numDofs () const
 Number of dofs in the block vector.
 
void reserve (const int size)
 Reserve memory.
 
void resize (SizeType size)
 Resize the block vector.
 
ArrayType & array ()
 
const ArrayType & array () const
 
const ThisTypeoperator+= (const ThisType &other)
 Add another block vector to *this.
 
const ThisTypeoperator-= (const ThisType &other)
 Subtract another block vector from *this.
 
FieldType operator* (const ThisType &other) const
 Scalar product between *this and another block vector.
 
const ThisTypeoperator*= (const FieldType &scalar)
 Scale this block vector.
 
void axpy (const FieldType &scalar, const ThisType &other)
 Add a scalar multiple of another block vector to this block vector.
 
void clear ()
 Clear this block vector, i.e. set each dof to 0.
 
std::size_t usedMemorySize () const
 
void copyContent (const size_t newIndex, const size_t oldIndex)
 
void memMoveBackward (const size_t length, const size_t oldStartIdx, const size_t newStartIdx)
 move memory blocks backwards
 
void memMoveForward (const size_t length, const size_t oldStartIdx, const size_t newStartIdx)
 move memory blocks forward
 
void setMemoryFactor (const double memFactor)
 set memory overestimate factor, here does nothing
 

Protected Types

typedef DebugCounter< size_t > CounterType
 

Protected Member Functions

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

Protected Attributes

ArrayType * array_
 
CounterType sequence_
 

Member Typedef Documentation

◆ BlockIndices

template<class DofBlock >
typedef Hybrid::IndexRange< int, blockSize > Dune::Fem::ISTLBlockVector< DofBlock >::BlockIndices

◆ ConstDofBlockPtrType

template<class DofBlock >
typedef ConstDofBlockType* Dune::Fem::ISTLBlockVector< DofBlock >::ConstDofBlockPtrType

◆ ConstDofBlockType

template<class DofBlock >
typedef const DofBlock Dune::Fem::ISTLBlockVector< DofBlock >::ConstDofBlockType

◆ ConstIteratorType

template<class DofBlock >
typedef Iterator< typename ArrayType::ConstIterator, const FieldType > Dune::Fem::ISTLBlockVector< DofBlock >::ConstIteratorType

◆ CounterType

typedef DebugCounter<size_t> Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::CounterType
protectedinherited

◆ DofBlockPtrType

template<class DofBlock >
typedef DofBlockType* Dune::Fem::ISTLBlockVector< DofBlock >::DofBlockPtrType

◆ DofBlockType

template<class DofBlock >
typedef DofBlock Dune::Fem::ISTLBlockVector< DofBlock >::DofBlockType

◆ DofContainerType

template<class DofBlock >
typedef ArrayType Dune::Fem::ISTLBlockVector< DofBlock >::DofContainerType

◆ FieldType

template<class DofBlock >
typedef DofBlock::value_type Dune::Fem::ISTLBlockVector< DofBlock >::FieldType

◆ IteratorType

template<class DofBlock >
typedef Iterator< typename ArrayType::Iterator, FieldType > Dune::Fem::ISTLBlockVector< DofBlock >::IteratorType

◆ SizeType

template<class DofBlock >
typedef ArrayType::size_type Dune::Fem::ISTLBlockVector< DofBlock >::SizeType

◆ value_type

template<class DofBlock >
typedef ArrayType::value_type Dune::Fem::ISTLBlockVector< DofBlock >::value_type

Typedef to make this class STL-compatible.

Member Enumeration Documentation

◆ anonymous enum

template<class DofBlock >
anonymous enum
Enumerator
blockSize 

Constructor & Destructor Documentation

◆ ISTLBlockVector() [1/3]

template<class DofBlock >
Dune::Fem::ISTLBlockVector< DofBlock >::ISTLBlockVector ( const ThisType )
default

◆ ISTLBlockVector() [2/3]

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

Constructor.

◆ ISTLBlockVector() [3/3]

template<class DofBlock >
Dune::Fem::ISTLBlockVector< DofBlock >::ISTLBlockVector ( )
default

Member Function Documentation

◆ array() [1/2]

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

◆ array() [2/2]

template<class DofBlock >
const ArrayType & Dune::Fem::ISTLBlockVector< DofBlock >::array ( ) const
inline

◆ asImp() [1/2]

ThisType & Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::asImp ( )
inlineprotectedinherited

◆ asImp() [2/2]

const ThisType & Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::asImp ( ) const
inlineprotectedinherited

◆ assign()

void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::assign ( const ThisType other)
inlineprotectedinherited

◆ axpy()

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

◆ begin() [1/2]

template<class DofBlock >
IteratorType Dune::Fem::ISTLBlockVector< DofBlock >::begin ( )
inline

◆ begin() [2/2]

template<class DofBlock >
ConstIteratorType Dune::Fem::ISTLBlockVector< DofBlock >::begin ( ) const
inline

◆ blockPtr() [1/2]

template<class DofBlock >
DofBlockPtrType Dune::Fem::ISTLBlockVector< DofBlock >::blockPtr ( const unsigned int  i)
inline

◆ blockPtr() [2/2]

template<class DofBlock >
ConstDofBlockPtrType Dune::Fem::ISTLBlockVector< DofBlock >::blockPtr ( const unsigned int  i) const
inline

◆ clear()

void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::clear ( )
inlineinherited

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

◆ copyContent()

void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::copyContent ( const size_t  newIndex,
const size_t  oldIndex 
)
inlineinherited

implements array[ newIndex ] = array[ oldIndex ]

◆ end() [1/2]

template<class DofBlock >
IteratorType Dune::Fem::ISTLBlockVector< DofBlock >::end ( )
inline

◆ end() [2/2]

template<class DofBlock >
ConstIteratorType Dune::Fem::ISTLBlockVector< DofBlock >::end ( ) const
inline

◆ memMoveBackward()

void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::memMoveBackward ( const size_t  length,
const size_t  oldStartIdx,
const size_t  newStartIdx 
)
inlineinherited

move memory blocks backwards

◆ memMoveForward()

void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::memMoveForward ( const size_t  length,
const size_t  oldStartIdx,
const size_t  newStartIdx 
)
inlineinherited

move memory blocks forward

◆ numDofs()

template<class DofBlock >
SizeType Dune::Fem::ISTLBlockVector< DofBlock >::numDofs ( ) const
inline

Number of dofs in the block vector.

◆ operator*()

FieldType Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::operator* ( const ThisType other) const
inlineinherited

Scalar product between *this and another block vector.

◆ operator*=()

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

◆ operator+=()

const ThisType & Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::operator+= ( const ThisType other)
inlineinherited

Add another block vector to *this.

◆ operator-=()

const ThisType & Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::operator-= ( const ThisType other)
inlineinherited

Subtract another block vector from *this.

◆ operator=()

template<class DofBlock >
const ThisType & Dune::Fem::ISTLBlockVector< DofBlock >::operator= ( const ThisType other)
inline

Copy assignment operator.

◆ operator[]() [1/2]

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

◆ operator[]() [2/2]

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

◆ reserve()

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

◆ resize()

template<class DofBlock >
void Dune::Fem::ISTLBlockVector< DofBlock >::resize ( SizeType  size)
inline

Resize the block vector.

◆ setMemoryFactor()

void Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::setMemoryFactor ( const double  memFactor)
inlineinherited

set memory overestimate factor, here does nothing

◆ size()

template<class DofBlock >
SizeType Dune::Fem::ISTLBlockVector< DofBlock >::size ( ) const
inline

◆ usedMemorySize()

std::size_t Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::usedMemorySize ( ) const
inlineinherited

return memory used by this block vector

Member Data Documentation

◆ array_

template<class DofBlock >
ArrayType* Dune::Fem::ISTLBlockVector< DofBlock >::array_
protected

◆ sequence_

CounterType Dune::Fem::BlockVectorInterface< ISTLBlockVector< DofBlock > , DofBlock ::value_type >::sequence_
mutableprotectedinherited

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