dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize > Class Template Reference

#include <dune/fem/function/blockvectors/defaultblockvectors.hh>

Inheritance diagram for Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >:
Inheritance graph

Public Types

typedef BaseType::SizeType SizeType
 
enum  
 Size of each block. More...
 
typedef ArrayType DofContainerType
 
typedef ArrayType::value_type FieldType
 Type of the field the dofs lie in.
 
typedef ArrayType::iterator IteratorType
 Iterator to iterate over the dofs.
 
typedef ArrayType::const_iterator ConstIteratorType
 Constant iterator to iterate over the dofs.
 
typedef FieldType value_type
 Typedef to make this class STL-compatible.
 
typedef SizeType size_type
 Typedef to make this class STL-compatible.
 
typedef SubVector< DofContainerType, StaticOffsetSubMapper< BlockSize > > DofBlockType
 Type of one (mutable) block.
 
typedef DofBlockType ConstDofBlockType
 Type of one constant block.
 
typedef Fem::Envelope< DofBlockTypeDofBlockPtrType
 
typedef Fem::Envelope< ConstDofBlockTypeConstDofBlockPtrType
 
typedef Hybrid::IndexRange< int, blockSizeBlockIndices
 

Public Member Functions

 MutableBlockVector (SizeType size)
 Construct a block vector with 'size' blocks (not initialized)
 
 MutableBlockVector (const ThisType &other)
 Copy constructor.
 
void reserve (const int size)
 Reserve memory.
 
void resize (SizeType size)
 Resize the block vector.
 
ConstDofBlockType operator[] (const unsigned int i) const
 Constant access the i-th block.
 
DofBlockType operator[] (const unsigned int i)
 Access the i-th block.
 
ConstDofBlockPtrType blockPtr (const unsigned int i) const
 Constant access for the i-th block.
 
DofBlockPtrType blockPtr (const unsigned int i)
 Access the i-th block.
 
IteratorType begin ()
 Iterator pointing to the first dof.
 
ConstIteratorType begin () const
 Const-iterator pointing to the first dof.
 
IteratorType end ()
 Iterator pointing to the last dof.
 
ConstIteratorType end () const
 Const-iterator pointing to the last dof.
 
SizeType size () const
 Number of blocks.
 
SizeType numDofs () const
 Number of dofs in the block vector.
 
FieldTypedata ()
 
const FieldTypedata () const
 
const ArrayTypearray () const
 
ArrayTypearray ()
 
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 Member Functions

StaticContainerallocateContainer (const SizeType size)
 
void assign (const ThisType &other)
 
ThisTypeasImp ()
 
const ThisTypeasImp () const
 

Protected Attributes

std::unique_ptr< MutableContainercontainer_
 
ArrayTypearray_
 
CounterType sequence_
 

Member Typedef Documentation

◆ BlockIndices

typedef Hybrid::IndexRange< int, blockSize > Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::BlockIndices
inherited

◆ ConstDofBlockPtrType

typedef Fem::Envelope< ConstDofBlockType > Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::ConstDofBlockPtrType
inherited

◆ ConstDofBlockType

typedef DofBlockType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::ConstDofBlockType
inherited

Type of one constant block.

◆ ConstIteratorType

typedef ArrayType::const_iterator Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::ConstIteratorType
inherited

Constant iterator to iterate over the dofs.

◆ DofBlockPtrType

typedef Fem::Envelope< DofBlockType > Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::DofBlockPtrType
inherited

◆ DofBlockType

typedef SubVector< DofContainerType, StaticOffsetSubMapper< BlockSize > > Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::DofBlockType
inherited

Type of one (mutable) block.

◆ DofContainerType

typedef ArrayType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::DofContainerType
inherited

◆ FieldType

typedef ArrayType::value_type Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::FieldType
inherited

Type of the field the dofs lie in.

◆ IteratorType

typedef ArrayType::iterator Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::IteratorType
inherited

Iterator to iterate over the dofs.

◆ size_type

typedef SizeType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::size_type
inherited

Typedef to make this class STL-compatible.

◆ SizeType

template<class Field , unsigned int BlockSize>
typedef BaseType::SizeType Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >::SizeType

◆ value_type

typedef FieldType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::value_type
inherited

Typedef to make this class STL-compatible.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

Size of each block.

Constructor & Destructor Documentation

◆ MutableBlockVector() [1/2]

template<class Field , unsigned int BlockSize>
Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >::MutableBlockVector ( SizeType  size)
inlineexplicit

Construct a block vector with 'size' blocks (not initialized)

◆ MutableBlockVector() [2/2]

template<class Field , unsigned int BlockSize>
Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >::MutableBlockVector ( const ThisType other)
inline

Copy constructor.

Member Function Documentation

◆ allocateContainer()

template<class Field , unsigned int BlockSize>
StaticContainer & Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >::allocateContainer ( const SizeType  size)
inlineprotected

◆ array() [1/2]

ArrayType & Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::array ( )
inlineinherited

◆ array() [2/2]

const ArrayType & Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::array ( ) const
inlineinherited

◆ asImp() [1/2]

template<class Imp , class Field >
ThisType & Dune::Fem::BlockVectorInterface< Imp, Field >::asImp ( )
inlineprotectedinherited

◆ asImp() [2/2]

template<class Imp , class Field >
const ThisType & Dune::Fem::BlockVectorInterface< Imp, Field >::asImp ( ) const
inlineprotectedinherited

◆ assign()

template<class Imp , class Field >
void Dune::Fem::BlockVectorInterface< Imp, Field >::assign ( const ThisType other)
inlineprotectedinherited

◆ axpy()

template<class Imp , class Field >
void Dune::Fem::BlockVectorInterface< Imp, Field >::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]

IteratorType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::begin ( )
inlineinherited

Iterator pointing to the first dof.

◆ begin() [2/2]

ConstIteratorType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::begin ( ) const
inlineinherited

Const-iterator pointing to the first dof.

◆ blockPtr() [1/2]

DofBlockPtrType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::blockPtr ( const unsigned int  i)
inlineinherited

Access the i-th block.

◆ blockPtr() [2/2]

ConstDofBlockPtrType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::blockPtr ( const unsigned int  i) const
inlineinherited

Constant access for the i-th block.

◆ clear()

template<class Imp , class Field >
void Dune::Fem::BlockVectorInterface< Imp, Field >::clear ( )
inlineinherited

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

◆ copyContent()

template<class Imp , class Field >
void Dune::Fem::BlockVectorInterface< Imp, Field >::copyContent ( const size_t  newIndex,
const size_t  oldIndex 
)
inlineinherited

implements array[ newIndex ] = array[ oldIndex ]

◆ data() [1/2]

FieldType * Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::data ( )
inlineinherited

◆ data() [2/2]

const FieldType * Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::data ( ) const
inlineinherited

◆ end() [1/2]

IteratorType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::end ( )
inlineinherited

Iterator pointing to the last dof.

◆ end() [2/2]

ConstIteratorType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::end ( ) const
inlineinherited

Const-iterator pointing to the last dof.

◆ memMoveBackward()

template<class Imp , class Field >
void Dune::Fem::BlockVectorInterface< Imp, Field >::memMoveBackward ( const size_t  length,
const size_t  oldStartIdx,
const size_t  newStartIdx 
)
inlineinherited

move memory blocks backwards

◆ memMoveForward()

template<class Imp , class Field >
void Dune::Fem::BlockVectorInterface< Imp, Field >::memMoveForward ( const size_t  length,
const size_t  oldStartIdx,
const size_t  newStartIdx 
)
inlineinherited

move memory blocks forward

◆ numDofs()

SizeType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::numDofs ( ) const
inlineinherited

Number of dofs in the block vector.

◆ operator*()

template<class Imp , class Field >
FieldType Dune::Fem::BlockVectorInterface< Imp, Field >::operator* ( const ThisType other) const
inlineinherited

Scalar product between *this and another block vector.

◆ operator*=()

template<class Imp , class Field >
const ThisType & Dune::Fem::BlockVectorInterface< Imp, Field >::operator*= ( const FieldType scalar)
inlineinherited

Scale this block vector.

Parameters
[in]scalarFactor for the scaling
Returns
Constant reference to *this

◆ operator+=()

template<class Imp , class Field >
const ThisType & Dune::Fem::BlockVectorInterface< Imp, Field >::operator+= ( const ThisType other)
inlineinherited

Add another block vector to *this.

◆ operator-=()

template<class Imp , class Field >
const ThisType & Dune::Fem::BlockVectorInterface< Imp, Field >::operator-= ( const ThisType other)
inlineinherited

Subtract another block vector from *this.

◆ operator[]() [1/2]

DofBlockType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::operator[] ( const unsigned int  i)
inlineinherited

Access the i-th block.

◆ operator[]() [2/2]

ConstDofBlockType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::operator[] ( const unsigned int  i) const
inlineinherited

Constant access the i-th block.

◆ reserve()

template<class Field , unsigned int BlockSize>
void Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >::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 Field , unsigned int BlockSize>
void Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >::resize ( SizeType  size)
inline

Resize the block vector.

◆ setMemoryFactor()

template<class Imp , class Field >
void Dune::Fem::BlockVectorInterface< Imp, Field >::setMemoryFactor ( const double  memFactor)
inlineinherited

set memory overestimate factor, here does nothing

◆ size()

SizeType Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::size ( ) const
inlineinherited

Number of blocks.

◆ usedMemorySize()

template<class Imp , class Field >
std::size_t Dune::Fem::BlockVectorInterface< Imp, Field >::usedMemorySize ( ) const
inlineinherited

return memory used by this block vector

Member Data Documentation

◆ array_

ArrayType& Dune::Fem::SimpleBlockVector< StaticArray< Field > , BlockSize >::array_
protectedinherited

◆ container_

template<class Field , unsigned int BlockSize>
std::unique_ptr< MutableContainer > Dune::Fem::MutableBlockVector< DynamicArray< Field >, BlockSize >::container_
protected

◆ sequence_

template<class Imp , class Field >
CounterType Dune::Fem::BlockVectorInterface< Imp, Field >::sequence_
mutableprotectedinherited

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