DUNE-FEM (unstable)

A Vector of blocks with different blocksizes. More...

#include <dune/istl/vbvector.hh>

Classes

class  CreateIterator
 Iterator class for sequential creation of blocks. More...
 

Public Types

using field_type = typename Imp::BlockTraits< B >::field_type
 export the type representing the field
 
using allocator_type = A
 export the allocator type
 
using reference = window_type &
 Export type used for references to container entries. More...
 
using const_reference = const window_type &
 Export type used for const references to container entries. More...
 
using size_type = typename A::size_type
 The size type for the index access.
 
using value_type = BlockVector< B, A >
 Type of the elements of the outer vector, i.e., dynamic vectors of B. More...
 
using block_type = BlockVector< B, A >
 Same as value_type, here for historical reasons.
 
using iterator = Iterator
 Export the iterator type using std naming rules.
 
using ConstIterator = IndexedIterator< typename VectorWindows::const_iterator >
 Const iterator.
 
using const_iterator = ConstIterator
 Export the const iterator type using std naming rules.
 

Public Member Functions

 VariableBlockVector ()
 Constructor without arguments makes an empty vector. More...
 
 VariableBlockVector (size_type numBlocks)
 Construct a vector with given number of blocks, but size of each block is not yet known. More...
 
 VariableBlockVector (size_type numBlocks, size_type blockSize)
 Construct a vector with given number of blocks each having a constant size. More...
 
 VariableBlockVector (const VariableBlockVector &a)
 Copy constructor, has copy semantics.
 
 VariableBlockVector (VariableBlockVector &&tmp)
 Move constructor:
 
VariableBlockVectoroperator= (VariableBlockVector tmp)
 Copy and move assignment.
 
void swap (VariableBlockVector &other) noexcept
 Exchange the storage and internal state with other.
 
void resize (size_type numBlocks)
 same effect as constructor with same argument
 
void resize (size_type numBlocks, size_type blockSize)
 same effect as constructor with same argument
 
VariableBlockVectoroperator= (const field_type &k)
 Set all entries to the given scalar k.
 
CreateIterator createbegin ()
 get initial create iterator
 
CreateIterator createend ()
 get create iterator pointing to one after the last block
 
window_type & operator[] (size_type i)
 random access to blocks
 
const window_type & operator[] (size_type i) const
 same for read only access
 
Iterator begin ()
 begin Iterator
 
Iterator end ()
 end Iterator
 
Iterator beforeEnd ()
 
Iterator beforeBegin ()
 
ConstIterator begin () const
 begin ConstIterator
 
ConstIterator end () const
 end ConstIterator
 
ConstIterator beforeEnd () const
 
ConstIterator beforeBegin () const
 
ConstIterator rend () const
 end ConstIterator
 
Iterator find (size_type i)
 random access returning iterator (end if not contained)
 
ConstIterator find (size_type i) const
 random access returning iterator (end if not contained)
 
size_type N () const noexcept
 number of blocks in the vector (are of variable size here)
 
size_type size () const noexcept
 

Detailed Description

template<class B, class A = std::allocator<B>>
class Dune::VariableBlockVector< B, A >

A Vector of blocks with different blocksizes.

implements a vector consisting of a number of blocks (to
be given at run-time) which themselves consist of a number
of blocks (also given at run-time) of the given type B.

VariableBlockVector is a container of containers!

Member Typedef Documentation

◆ const_reference

template<class B , class A = std::allocator<B>>
using Dune::VariableBlockVector< B, A >::const_reference = const window_type&

Export type used for const references to container entries.

Note
This is not B&, but an internal proxy class!

◆ reference

template<class B , class A = std::allocator<B>>
using Dune::VariableBlockVector< B, A >::reference = window_type&

Export type used for references to container entries.

Note
This is not B&, but an internal proxy class!

◆ value_type

template<class B , class A = std::allocator<B>>
using Dune::VariableBlockVector< B, A >::value_type = BlockVector<B,A>

Type of the elements of the outer vector, i.e., dynamic vectors of B.

Note that this is not the type referred to by the iterators and random access operators, which return proxy objects.

Constructor & Destructor Documentation

◆ VariableBlockVector() [1/3]

template<class B , class A = std::allocator<B>>
Dune::VariableBlockVector< B, A >::VariableBlockVector ( )
inline

Constructor without arguments makes an empty vector.

Note
object cannot be used yet. The size and block sizes need to be initialized.

◆ VariableBlockVector() [2/3]

template<class B , class A = std::allocator<B>>
Dune::VariableBlockVector< B, A >::VariableBlockVector ( size_type  numBlocks)
inlineexplicit

Construct a vector with given number of blocks, but size of each block is not yet known.

Note
Object cannot be used yet. Needs to be initialized using the createbegin() and createend() create-iterators to fill the block sizes.

◆ VariableBlockVector() [3/3]

template<class B , class A = std::allocator<B>>
Dune::VariableBlockVector< B, A >::VariableBlockVector ( size_type  numBlocks,
size_type  blockSize 
)
inline

Construct a vector with given number of blocks each having a constant size.

Note
Object is fully usable after construction.
Parameters
numBlocksNumber of blocks
blockSizeNumber of elements in each block

Member Function Documentation

◆ beforeBegin() [1/2]

template<class B , class A = std::allocator<B>>
Iterator Dune::VariableBlockVector< B, A >::beforeBegin ( )
inline
Returns
an iterator that is positioned before the first entry of the vector.

◆ beforeBegin() [2/2]

template<class B , class A = std::allocator<B>>
ConstIterator Dune::VariableBlockVector< B, A >::beforeBegin ( ) const
inline
Returns
an iterator that is positioned before the first entry of the vector.

◆ beforeEnd() [1/2]

template<class B , class A = std::allocator<B>>
Iterator Dune::VariableBlockVector< B, A >::beforeEnd ( )
inline
Returns
an iterator that is positioned before the end iterator of the vector, i.e. at the last entry.

◆ beforeEnd() [2/2]

template<class B , class A = std::allocator<B>>
ConstIterator Dune::VariableBlockVector< B, A >::beforeEnd ( ) const
inline
Returns
an iterator that is positioned before the end iterator of the vector. i.e. at the last element.

◆ size()

template<class B , class A = std::allocator<B>>
size_type Dune::VariableBlockVector< B, A >::size ( ) const
inlinenoexcept

Number of blocks in the vector

Returns the same value as method N(), because the vector is dense


The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 20, 23:30, 2024)