Go to the documentation of this file.
3 #ifndef DUNE_ISTL_BDMATRIX_HH
4 #define DUNE_ISTL_BDMATRIX_HH
8 #include <dune/common/rangeutilities.hh>
27 template <
class B,
class A=std::allocator<B> >
58 for (
int i=0; i<size; i++)
63 for (
int i=0; i<size; i++)
71 BDMatrix (std::initializer_list<B>
const &list)
75 for (
auto it = list.begin(); it != list.end(); ++it, ++i)
86 for (
auto i : range(size))
91 for (
auto i : range(size))
111 for (
int i=0; i<this->
N(); i++)
112 (*
this)[i][i].invert();
126 void endrowsizes () {}
128 void endindices () {}
@ random
Build entries randomly.
Definition: bcrsmatrix.hh:489
void invert()
Inverts the matrix.
Definition: bdmatrix.hh:110
BDMatrix(std::initializer_list< B > const &list)
Construct from a std::initializer_list.
Definition: bdmatrix.hh:71
B block_type
export the type representing the components
Definition: bdmatrix.hh:38
void setSize(size_type rows, size_type columns, size_type nnz=0)
Set the size of the matrix.
Definition: bcrsmatrix.hh:820
void addindex(size_type row, size_type col)
add index (row,col) to the matrix
Definition: bcrsmatrix.hh:1150
B::field_type field_type
export the type representing the field
Definition: bdmatrix.hh:35
BDMatrix & operator=(const BDMatrix &other)
assignment
Definition: bdmatrix.hh:98
A sparse block matrix with compressed row storage.
Definition: bcrsmatrix.hh:422
@ blocklevel
Definition: bdmatrix.hh:50
A block-diagonal matrix.
Definition: bdmatrix.hh:28
BDMatrix()
Default constructor.
Definition: bdmatrix.hh:53
A::size_type size_type
implement row_type with compressed vector
Definition: bdmatrix.hh:47
Implementation of the BCRSMatrix class.
size_type N() const
number of rows (counted in blocks)
Definition: bcrsmatrix.hh:1894
void endrowsizes()
indicate that size of all rows is defined
Definition: bcrsmatrix.hh:1108
void setrowsize(size_type i, size_type s)
Set number of indices in row i to s.
Definition: bcrsmatrix.hh:1076
BCRSMatrix & operator=(const BCRSMatrix &Mat)
assignment
Definition: bcrsmatrix.hh:870
BDMatrix(int size)
Definition: bdmatrix.hh:55
Definition: allocator.hh:7
Col col
Definition: matrixmatrix.hh:349
void setSize(size_type size)
Resize the matrix. Invalidates the content!
Definition: bdmatrix.hh:80
void endindices()
indicate that all indices are defined, check consistency
Definition: bcrsmatrix.hh:1207
A allocator_type
export the allocator type
Definition: bdmatrix.hh:41