|
dune-fem 2.12-git
|
Loading...
Searching...
No Matches
defaultblockvectors.hh
Go to the documentation of this file.
216 : public BlockVectorInterface< SimpleBlockVector< Container, BlockSize>, typename Container::value_type >
218 typedef BlockVectorInterface< SimpleBlockVector< Container, BlockSize>, typename Container::value_type > BaseType;
425 void doSetMemoryFactor( Dune::Fem::DynamicArray< T, Allocator >& array, const double memFactor )
523 typedef BlockVectorInterface< ISTLBlockVector< DofBlock >, typename DofBlock :: value_type > BaseType;
int size() const
iterator end()
iterator begin()
std::ptrdiff_t index() const
#define DUNE_THROW(E,...)
constexpr Iterator end()
void resize(size_type n, value_type c=value_type())
Base::size_type size_type
size_type size() const
Base::value_type value_type
void reserve(size_type n)
Definition hybrid.hh:86
Definition defaultblockvectors.hh:27
Definition defaultblockvectors.hh:41
CounterType sequence_
Definition defaultblockvectors.hh:202
void memMoveBackward(const size_t length, const size_t oldStartIdx, const size_t newStartIdx)
move memory blocks backwards
Definition defaultblockvectors.hh:158
Field FieldType
Type of the field the dofs lie in.
Definition defaultblockvectors.hh:51
Imp ThisType
Type of derived class (implementation)
Definition defaultblockvectors.hh:48
DebugCounter< size_t > CounterType
Definition defaultblockvectors.hh:43
std::size_t usedMemorySize() const
Definition defaultblockvectors.hh:146
void axpy(const FieldType &scalar, const ThisType &other)
Add a scalar multiple of another block vector to this block vector.
Definition defaultblockvectors.hh:127
const ThisType & operator*=(const FieldType &scalar)
Scale this block vector.
Definition defaultblockvectors.hh:110
void copyContent(const size_t newIndex, const size_t oldIndex)
Definition defaultblockvectors.hh:152
BlockVectorInterface()
Definition defaultblockvectors.hh:45
const ThisType & operator-=(const ThisType &other)
Subtract another block vector from *this.
Definition defaultblockvectors.hh:80
const ThisType & asImp() const
Definition defaultblockvectors.hh:200
const ThisType & operator+=(const ThisType &other)
Add another block vector to *this.
Definition defaultblockvectors.hh:67
void setMemoryFactor(const double memFactor)
set memory overestimate factor, here does nothing
Definition defaultblockvectors.hh:188
void memMoveForward(const size_t length, const size_t oldStartIdx, const size_t newStartIdx)
move memory blocks forward
Definition defaultblockvectors.hh:174
Field DofType
make consistent with discrete function
Definition defaultblockvectors.hh:53
FieldType operator*(const ThisType &other) const
Scalar product between *this and another block vector.
Definition defaultblockvectors.hh:93
void assign(const ThisType &other)
Definition defaultblockvectors.hh:193
void clear()
Clear this block vector, i.e. set each dof to 0.
Definition defaultblockvectors.hh:139
const ThisType & operator=(const ThisType &other)
Copy assignment operator.
Definition defaultblockvectors.hh:56
This is the reference implementation of a block vector as it is expected as the second template param...
Definition defaultblockvectors.hh:217
ArrayType::size_type SizeType
Used for indexing the blocks, for example.
Definition defaultblockvectors.hh:234
ConstIteratorType find(const SizeType dof) const
Iterator pointing to a given dof (non blocked numbering)
Definition defaultblockvectors.hh:337
SubVector< DofContainerType, StaticOffsetSubMapper< BlockSize > > DofBlockType
Type of one (mutable) block.
Definition defaultblockvectors.hh:242
Fem::Envelope< DofBlockType > DofBlockPtrType
Definition defaultblockvectors.hh:246
SizeType numDofs() const
Number of dofs in the block vector.
Definition defaultblockvectors.hh:343
SizeType size() const
Number of blocks.
Definition defaultblockvectors.hh:340
ConstIteratorType beforeBegin() const
Iterator pointing to before the first dof.
Definition defaultblockvectors.hh:331
ArrayType DofContainerType
Definition defaultblockvectors.hh:225
ArrayType::const_iterator ConstIteratorType
Constant iterator to iterate over the dofs.
Definition defaultblockvectors.hh:232
ConstIteratorType end() const
Const-iterator pointing to the last dof.
Definition defaultblockvectors.hh:319
ArrayType::value_type FieldType
Type of the field the dofs lie in.
Definition defaultblockvectors.hh:228
const ArrayType & array() const
Definition defaultblockvectors.hh:348
Hybrid::IndexRange< int, blockSize > BlockIndices
Definition defaultblockvectors.hh:252
ConstDofBlockPtrType blockPtr(const unsigned int i) const
Constant access for the i-th block.
Definition defaultblockvectors.hh:298
ConstIteratorType begin() const
Const-iterator pointing to the first dof.
Definition defaultblockvectors.hh:313
const ThisType & operator=(const ThisType &other)
Copy assignment operator.
Definition defaultblockvectors.hh:277
ArrayType::iterator IteratorType
Iterator to iterate over the dofs.
Definition defaultblockvectors.hh:230
IteratorType end()
Iterator pointing to the last dof.
Definition defaultblockvectors.hh:316
IteratorType beforeBegin()
Iterator pointing to before the first dof.
Definition defaultblockvectors.hh:328
SimpleBlockVector(ArrayType &array)
Constructor.
Definition defaultblockvectors.hh:272
DofBlockPtrType blockPtr(const unsigned int i)
Access the i-th block.
Definition defaultblockvectors.hh:304
SizeType size_type
Typedef to make this class STL-compatible.
Definition defaultblockvectors.hh:239
IteratorType beforeEnd()
Iterator pointing to last dof.
Definition defaultblockvectors.hh:322
FieldType value_type
Typedef to make this class STL-compatible.
Definition defaultblockvectors.hh:237
DofBlockType ConstDofBlockType
Type of one constant block.
Definition defaultblockvectors.hh:244
IteratorType find(const SizeType dof)
Iterator pointing to a given dof (non blocked numbering)
Definition defaultblockvectors.hh:334
IteratorType begin()
Iterator pointing to the first dof.
Definition defaultblockvectors.hh:310
ConstDofBlockType operator[](const unsigned int i) const
Constant access the i-th block.
Definition defaultblockvectors.hh:284
ConstIteratorType beforeEnd() const
Iterator pointing to last dof.
Definition defaultblockvectors.hh:325
Fem::Envelope< ConstDofBlockType > ConstDofBlockPtrType
Definition defaultblockvectors.hh:247
const FieldType * data() const
Definition defaultblockvectors.hh:346
Definition defaultblockvectors.hh:257
static const FieldType * data(const Array &array)
Definition defaultblockvectors.hh:259
static FieldType * data(Array &array)
Definition defaultblockvectors.hh:258
static const FieldType * data(const Array &array)
Definition defaultblockvectors.hh:267
static FieldType * data(Array &array)
Definition defaultblockvectors.hh:266
Dune::DynamicVector< K > Array
Definition defaultblockvectors.hh:265
Definition defaultblockvectors.hh:367
MutableBlockVector(const ThisType &other)
Copy constructor.
Definition defaultblockvectors.hh:386
void reserve(const int size)
Reserve memory.
Definition defaultblockvectors.hh:411
BaseType::SizeType SizeType
Definition defaultblockvectors.hh:378
~MutableBlockVector()
Definition defaultblockvectors.hh:392
MutableBlockVector(SizeType size)
Construct a block vector with 'size' blocks (not initialized)
Definition defaultblockvectors.hh:381
void resize(SizeType size)
Resize the block vector.
Definition defaultblockvectors.hh:417
void setMemoryFactor(const double memFactor)
set memory overestimate factor, here does nothing
Definition defaultblockvectors.hh:398
MutableBlockVector(const ThisType &other)
Copy constructor.
Definition defaultblockvectors.hh:469
void resize(SizeType size)
Resize the block vector.
Definition defaultblockvectors.hh:491
std::unique_ptr< MutableContainer > container_
Definition defaultblockvectors.hh:457
MutableBlockVector(SizeType size)
Construct a block vector with 'size' blocks (not initialized)
Definition defaultblockvectors.hh:463
BaseType::SizeType SizeType
Definition defaultblockvectors.hh:460
void reserve(const int size)
Reserve memory.
Definition defaultblockvectors.hh:484
StaticContainer & allocateContainer(const SizeType size)
Definition defaultblockvectors.hh:499
Definition defaultblockvectors.hh:515
const ThisType & operator=(const ThisType &other)
Copy assignment operator.
Definition defaultblockvectors.hh:627
ConstIteratorType begin() const
Definition defaultblockvectors.hh:647
ConstIteratorType beforeBegin() const
Definition defaultblockvectors.hh:676
IteratorType find(const SizeType dof)
Iterator pointing to a given dof (non blocked numbering)
Definition defaultblockvectors.hh:683
void reserve(const int size)
Reserve memory.
Definition defaultblockvectors.hh:719
ConstIteratorType beforeEnd() const
Definition defaultblockvectors.hh:664
DofBlock::value_type FieldType
Definition defaultblockvectors.hh:536
SizeType numDofs() const
Number of dofs in the block vector.
Definition defaultblockvectors.hh:709
ConstDofBlockType * ConstDofBlockPtrType
Definition defaultblockvectors.hh:613
ArrayType DofContainerType
Definition defaultblockvectors.hh:531
DofBlockType * DofBlockPtrType
Definition defaultblockvectors.hh:612
ISTLBlockVector(const ThisType &)=default
DofBlockType & operator[](const unsigned int i)
Definition defaultblockvectors.hh:639
ArrayType::value_type value_type
Typedef to make this class STL-compatible.
Definition defaultblockvectors.hh:617
const ArrayType & array() const
Definition defaultblockvectors.hh:732
ArrayType::size_type SizeType
Definition defaultblockvectors.hh:615
Iterator< typename ArrayType::ConstIterator, const FieldType > ConstIteratorType
Definition defaultblockvectors.hh:607
Hybrid::IndexRange< int, blockSize > BlockIndices
Definition defaultblockvectors.hh:534
DofBlockPtrType blockPtr(const unsigned int i)
Definition defaultblockvectors.hh:636
ISTLBlockVector()=default
Iterator< typename ArrayType::Iterator, FieldType > IteratorType
Definition defaultblockvectors.hh:606
IteratorType beforeBegin()
Definition defaultblockvectors.hh:670
ISTLBlockVector(ArrayType *array)
Constructor.
Definition defaultblockvectors.hh:620
const DofBlock ConstDofBlockType
Definition defaultblockvectors.hh:610
ConstDofBlockPtrType blockPtr(const unsigned int i) const
Definition defaultblockvectors.hh:637
ConstIteratorType find(const SizeType dof) const
Iterator pointing to a given dof (non blocked numbering)
Definition defaultblockvectors.hh:695
void resize(SizeType size)
Resize the block vector.
Definition defaultblockvectors.hh:725
Definition defaultblockvectors.hh:542
void increment()
go to next dof
Definition defaultblockvectors.hh:587
EmbeddedIterator end_
Definition defaultblockvectors.hh:548
bool equals(const Iterator &other) const
compare
Definition defaultblockvectors.hh:598
Iterator(const EmbeddedIterator &it, const EmbeddedIterator &end=EmbeddedIterator())
Default constructor.
Definition defaultblockvectors.hh:553
FieldType & dereference() const
return dof
Definition defaultblockvectors.hh:579
Iterator(const EmbeddedIterator &it, const int index, const EmbeddedIterator &end=EmbeddedIterator())
Default constructor.
Definition defaultblockvectors.hh:566
An implementation of DenseVector which uses a C-array of fixed size as storage.
Definition dynamicarray.hh:148
An implementation of DenseVector which uses a C-array of dynamic size as storage.
Definition dynamicarray.hh:244
Definition envelope.hh:11
An implementation of DenseVector to extract a portion, not necessarly contiguos, of a vector.
Definition subvector.hh:161
Index mapper with static size which simply adds an offset to the index.
Definition subvector.hh:121
T copy(T... args)
T fill(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8