5 #ifndef DUNE_DIAGONAL_MATRIX_HH 6 #define DUNE_DIAGONAL_MATRIX_HH 17 #include <initializer_list> 54 template<
class K,
int n>
85 constexpr
static int rows = n;
87 constexpr
static int cols = n;
121 std::copy_n(l.begin(), std::min<std::size_t>(
rows, l.size()),
126 template <
class OtherK>
139 template <
class OtherK>
149 return (
this==&other);
294 template<
class X,
class Y>
295 void mv (
const X& x, Y& y)
const 297 #ifdef DUNE_FMatrix_WITH_CHECKING 302 y[
i] = diag_[
i] * x[
i];
306 template<
class X,
class Y>
307 void mtv (
const X& x, Y& y)
const 313 template<
class X,
class Y>
314 void umv (
const X& x, Y& y)
const 316 #ifdef DUNE_FMatrix_WITH_CHECKING 321 y[
i] += diag_[
i] * x[
i];
325 template<
class X,
class Y>
326 void umtv (
const X& x, Y& y)
const 328 #ifdef DUNE_FMatrix_WITH_CHECKING 333 y[
i] += diag_[
i] * x[
i];
337 template<
class X,
class Y>
338 void umhv (
const X& x, Y& y)
const 340 #ifdef DUNE_FMatrix_WITH_CHECKING 349 template<
class X,
class Y>
350 void mmv (
const X& x, Y& y)
const 352 #ifdef DUNE_FMatrix_WITH_CHECKING 357 y[
i] -= diag_[
i] * x[
i];
361 template<
class X,
class Y>
362 void mmtv (
const X& x, Y& y)
const 364 #ifdef DUNE_FMatrix_WITH_CHECKING 369 y[
i] -= diag_[
i] * x[
i];
373 template<
class X,
class Y>
374 void mmhv (
const X& x, Y& y)
const 376 #ifdef DUNE_FMatrix_WITH_CHECKING 385 template<
class X,
class Y>
387 const X& x, Y& y)
const 389 #ifdef DUNE_FMatrix_WITH_CHECKING 394 y[
i] += alpha * diag_[
i] * x[
i];
398 template<
class X,
class Y>
400 const X& x, Y& y)
const 402 #ifdef DUNE_FMatrix_WITH_CHECKING 407 y[
i] += alpha * diag_[
i] * x[
i];
411 template<
class X,
class Y>
413 const X& x, Y& y)
const 415 #ifdef DUNE_FMatrix_WITH_CHECKING 457 for (
int i=0;
i<n;
i++)
458 x[
i] = b[
i]/diag_[
i];
465 for (
int i=0;
i<n;
i++)
466 diag_[
i] = real_type(1.0)/diag_[
i];
473 for (
int i=1;
i<n;
i++)
484 template <
class OtherScalar>
489 for(
int i=0;
i<n; ++
i)
503 template <
class OtherMatrix,
504 std::enable_if_t<(Impl::IsDenseMatrix<OtherMatrix>::value),
int> = 0,
505 std::enable_if_t<(not Impl::IsFieldMatrix<OtherMatrix>::value),
int> = 0>
507 const OtherMatrix& matrixB)
513 if constexpr (Impl::IsStaticSizeMatrix_v<OtherMatrix>) {
514 static_assert(n == OtherMatrix::rows);
517 assert(n == matrixB.N());
522 for (
int i = 0;
i < result.N(); ++
i)
523 for (
int j = 0; j < result.M(); ++j)
524 result[
i][j] = matrixA.
diagonal(
i) * matrixB[
i][j];
557 friend std::ostream& operator<< (std::ostream& s, const DiagonalMatrix<K,n>& a)
561 s << ((
i==j) ? a.diag_[
i] : 0) <<
" ";
609 template<
class K,
int n >
617 #ifndef DOXYGEN // hide specialization 626 typedef typename Base::size_type
size_type;
632 typedef typename Base::row_type
row_type;
639 constexpr
static int rows = 1;
642 constexpr
static int cols = 1;
651 (*this)[0][0] = scalar;
655 template <
class OtherK>
657 : Base(FieldMatrix<OtherK,1,1>(other))
663 return (*
this)[0][0];
669 return (*
this)[0][0];
673 const FieldVector<K,1>&
diagonal()
const 692 template <
class OtherScalar>
694 const DiagonalMatrix<OtherScalar, 1>& matrixB)
696 return DiagonalMatrix<typename PromotionTraits<K,OtherScalar>::PromotedType, 1>{matrixA.diagonal(0)*matrixB.diagonal(0)};
699 template <
class OtherMatrix,
700 std::enable_if_t<(Impl::IsDenseMatrix<OtherMatrix>::value),
int> = 0,
701 std::enable_if_t<(not Impl::IsFieldMatrix<OtherMatrix>::value),
int> = 0>
703 const OtherMatrix& matrixB)
709 if constexpr (Impl::IsStaticSizeMatrix_v<OtherMatrix>) {
710 static_assert(1 == OtherMatrix::rows);
711 return FieldMatrix<F, 1, OtherMatrix::cols>{};
713 assert(1 == matrixB.N());
714 return DynamicMatrix<F>{1,matrixB.M()};
718 for (
int i = 0;
i < result.N(); ++
i)
719 for (
int j = 0; j < result.M(); ++j)
720 result[
i][j] = matrixA.diagonal(
i) * matrixB[
i][j];
728 template<
class DiagonalMatrixType>
729 class DiagonalMatrixWrapper
731 typedef typename DiagonalMatrixType::reference reference;
732 typedef typename DiagonalMatrixType::const_reference const_reference;
733 typedef typename DiagonalMatrixType::field_type K;
734 typedef DiagonalRowVector<K, DiagonalMatrixType::rows> row_type;
735 typedef std::size_t size_type;
736 typedef DiagonalMatrixWrapper< DiagonalMatrixType> MyType;
748 mat_(const_cast<DiagonalMatrixType*>(mat))
764 return mat_==other.mat_;
769 mutable DiagonalMatrixType* mat_;
770 mutable row_type row_;
776 template<
class K,
int n >
777 class DiagonalRowVectorConst
779 template<
class DiagonalMatrixType>
831 return ((
p_ == other.p_)and (
row_ == other.row_));
868 return ((
p_==y.p_)and (
row_==y.row_));
906 return const_cast<K*
>(
p_);
919 template<
class K,
int n >
922 template<
class DiagonalMatrixType>
1028 template<
class K,
int n>
1034 template<
class K,
int n>
1040 template<
class K,
int n>
1046 template<
class K,
int n>
1076 template<
class CW,
class T,
class R>
1079 typedef typename std::remove_const<CW>::type NonConstCW;
1091 containerWrapper_(),
1096 containerWrapper_(containerWrapper),
1100 template<
class OtherContainerWrapperIteratorType>
1102 containerWrapper_(other.containerWrapper_),
1103 position_(other.position_)
1107 containerWrapper_(other.containerWrapper_),
1108 position_(other.position_)
1112 containerWrapper_(other.containerWrapper_),
1113 position_(other.position_)
1116 template<
class OtherContainerWrapperIteratorType>
1119 containerWrapper_ = other.containerWrapper_;
1120 position_ = other.position_;
1128 return containerWrapper_.pointer(position_);
1134 return position_ == other.position_ && containerWrapper_.identical(other.containerWrapper_);
1139 return position_ == other.position_ && containerWrapper_.identical(other.containerWrapper_);
1144 return *containerWrapper_.pointer(position_);
1161 return *containerWrapper_.pointer(position_+
i);
1166 position_=position_+n;
1169 template<
class OtherContainerWrapperIteratorType>
1170 std::ptrdiff_t
distanceTo(OtherContainerWrapperIteratorType& other)
const 1172 assert(containerWrapper_.identical(other));
1173 return other.position_ - position_;
1178 return containerWrapper_.realIndex(position_);
1182 NonConstCW containerWrapper_;
1186 template <
class DenseMatrix,
class field,
int N>
1190 #ifdef DUNE_CHECK_BOUNDS 1191 if (denseMatrix.
M() != N || denseMatrix.
N() != N)
1193 #endif // DUNE_CHECK_BOUNDS 1195 denseMatrix = field(0);
1196 for (
int i = 0;
i < N; ++
i)
DiagonalRowVector< K, n > type
Definition: diagonalmatrix.hh:1043
std::size_t size_type
The type used for the index access and size operations.
Definition: diagonalmatrix.hh:71
const K & operator[]([[maybe_unused]] size_type i) const
same for read only access
Definition: diagonalmatrix.hh:821
Type traits to determine the type of reals (when working with complex numbers)
ConstIterator const_iterator
typedef for stl compliant access
Definition: diagonalmatrix.hh:837
double frobenius_norm2() const
square of frobenius norm, need for block recursion
Definition: diagonalmatrix.hh:432
Implements a matrix constructed from a given type representing a field and compile-time given number ...
decltype(std::declval< T1 >()+std::declval< T2 >()) typedef PromotedType
Definition: promotiontraits.hh:28
friend auto operator*(const DiagonalMatrix &matrixA, const DiagonalMatrix< OtherScalar, n > &matrixB)
Matrix-matrix multiplication.
Definition: diagonalmatrix.hh:485
ContainerWrapperIterator< const WrapperType, const_reference, const_reference > ConstIterator
Iterator class for sequential access.
Definition: diagonalmatrix.hh:196
void usmhv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A^H x
Definition: diagonalmatrix.hh:412
DiagonalMatrix(std::initializer_list< K > const &l)
Construct diagonal matrix from an initializer list.
Definition: diagonalmatrix.hh:119
DiagonalMatrix & operator/=(const K &k)
vector space division by scalar
Definition: diagonalmatrix.hh:270
row_type row_reference
Definition: diagonalmatrix.hh:79
static constexpr size_type N()
number of blocks in row direction
Definition: diagonalmatrix.hh:531
void umv(const X &x, Y &y) const
y += A x
Definition: diagonalmatrix.hh:314
ConstIterator beforeEnd() const
Definition: diagonalmatrix.hh:853
constexpr size_type N() const
number of rows
Definition: densematrix.hh:702
const K & diagonal() const
the diagonal value
Definition: diagonalmatrix.hh:892
K block_type
export the type representing the components
Definition: diagonalmatrix.hh:935
std::size_t size_type
The type used for the index access and size operation.
Definition: diagonalmatrix.hh:798
A dense n x m matrix.
Definition: densematrix.hh:39
Iterator beforeEnd()
Definition: diagonalmatrix.hh:182
ConstIterator begin() const
begin iterator
Definition: diagonalmatrix.hh:205
DiagonalMatrix & operator-=(const DiagonalMatrix &y)
vector space subtraction
Definition: diagonalmatrix.hh:242
constexpr DiagonalMatrix()=default
Default constructor.
ConstIterator begin() const
begin ConstIterator
Definition: diagonalmatrix.hh:840
constexpr FieldTraits< vt >::real_type infinity_norm() const
infinity norm (maximum of absolute values of entries)
Definition: densevector.hh:676
row_type::Iterator ColIterator
rename the iterators for easier access
Definition: diagonalmatrix.hh:166
DiagonalMatrix & operator*=(const K &k)
vector space multiplication with scalar
Definition: diagonalmatrix.hh:263
void mv(const X &x, Y &y) const
y = A x
Definition: diagonalmatrix.hh:295
Compute type of the result of an arithmetic operation involving two different number types...
Definition: promotiontraits.hh:26
size_type row_
Definition: diagonalmatrix.hh:916
constexpr K conjugateComplex(const K &x)
compute conjugate complex of x
Definition: math.hh:146
DiagonalRowVector & operator=(const K &k)
Assignment operator for scalar.
Definition: diagonalmatrix.hh:950
bool equals(const MyType &other) const
Definition: diagonalmatrix.hh:1132
ContainerWrapperIterator(const MyType &other)
Definition: diagonalmatrix.hh:1106
DiagonalRowVectorConst(K *p, int col)
Constructor making vector with identical coordinates.
Definition: diagonalmatrix.hh:813
void solve(V &x, const V &b) const
Solve system A x = b.
Definition: diagonalmatrix.hh:455
you have to specialize this structure for any type that should be assignable to a DenseMatrix ...
Definition: densematrix.hh:61
void umhv(const X &x, Y &y) const
y += A^H x
Definition: diagonalmatrix.hh:338
constexpr FieldTraits< value_type >::real_type two_norm() const
two norm sqrt(sum over squared values of entries)
Definition: densevector.hh:656
Iterator beforeEnd()
Definition: diagonalmatrix.hh:984
ConstIterator const_iterator
typedef for stl compliant access
Definition: diagonalmatrix.hh:999
reference operator[](size_type i)
Return reference object as row replacement.
Definition: diagonalmatrix.hh:568
ContainerWrapperIterator(OtherContainerWrapperIteratorType &other)
Definition: diagonalmatrix.hh:1101
ConstIterator beforeBegin() const
Definition: diagonalmatrix.hh:860
double infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: diagonalmatrix.hh:444
DiagonalRowVectorConst()
Constructor making uninitialized vector.
Definition: diagonalmatrix.hh:807
static constexpr int size
The size of this vector.
Definition: diagonalmatrix.hh:804
bool operator==(const DiagonalMatrix &other) const
comparison operator
Definition: diagonalmatrix.hh:279
Iterator beforeBegin()
Definition: diagonalmatrix.hh:189
Definition: diagonalmatrix.hh:36
std::size_t size_type
The type used for the index access and size operation.
Definition: diagonalmatrix.hh:938
size_type dim() const
dimension of the vector space
Definition: diagonalmatrix.hh:880
K determinant() const
calculates the determinant of this matrix
Definition: diagonalmatrix.hh:470
bool identical(const DiagonalMatrix< K, n > &other) const
Check if matrix is the same object as the other matrix.
Definition: diagonalmatrix.hh:147
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition: boundschecking.hh:30
void increment()
Definition: diagonalmatrix.hh:1147
ContainerWrapperIterator & operator=(OtherContainerWrapperIteratorType &other)
Definition: diagonalmatrix.hh:1117
void usmtv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A^T x
Definition: diagonalmatrix.hh:399
DiagonalRowVector< K, n > type
Definition: diagonalmatrix.hh:1049
Iterator RowIterator
rename the iterators for easier access
Definition: diagonalmatrix.hh:164
bool operator==(const DiagonalRowVectorConst &y) const
Binary vector comparison.
Definition: diagonalmatrix.hh:866
std::ptrdiff_t distanceTo(OtherContainerWrapperIteratorType &other) const
Definition: diagonalmatrix.hh:1170
Iterator end()
end iterator
Definition: diagonalmatrix.hh:175
DiagonalRowVector * operator &()
Definition: diagonalmatrix.hh:1015
const_reference operator[](size_type i) const
Return const_reference object as row replacement.
Definition: diagonalmatrix.hh:574
I i
Definition: hybridmultiindex.hh:328
T real_type
export the type representing the real type of the field
Definition: ftraits.hh:30
Macro for wrapping boundary checks.
constexpr FieldTraits< vt >::real_type infinity_norm_real() const
simplified infinity norm (uses Manhattan norm for complex values)
Definition: densevector.hh:692
K & operator[]([[maybe_unused]] size_type i)
random access
Definition: diagonalmatrix.hh:959
static void apply(DenseMatrix &denseMatrix, DiagonalMatrix< field, N > const &rhs)
Definition: diagonalmatrix.hh:1188
Default exception class for range errors.
Definition: exceptions.hh:348
DiagonalRowVectorConst< K, n > const_row_type
Definition: diagonalmatrix.hh:80
Iterator class for sparse vector-like containers.
Definition: diagonalmatrix.hh:38
void mmtv(const X &x, Y &y) const
y -= A^T x
Definition: diagonalmatrix.hh:362
Iterator end()
end iterator
Definition: diagonalmatrix.hh:977
bool exists(size_type i, size_type j) const
return true when (i,j) is in pattern
Definition: diagonalmatrix.hh:547
Dune namespace
Definition: alignedallocator.hh:12
double frobenius_norm() const
frobenius norm: sqrt(sum over squared values of entries)
Definition: diagonalmatrix.hh:426
DiagonalMatrix & operator+=(const DiagonalMatrix &y)
vector space addition
Definition: diagonalmatrix.hh:235
This file implements a dense matrix with dynamic numbers of rows and columns.
Iterator begin()
begin iterator
Definition: diagonalmatrix.hh:169
const K & diagonal(size_type i) const
Get const reference to diagonal entry.
Definition: diagonalmatrix.hh:580
DiagonalMatrixWrapper(const DiagonalMatrixType *mat)
Definition: diagonalmatrix.hh:747
T * operator->() const
Definition: diagonalmatrix.hh:1126
ConstIterator const_iterator
typedef for stl compliant access
Definition: diagonalmatrix.hh:198
ContainerWrapperIterator(CW containerWrapper, int position)
Definition: diagonalmatrix.hh:1095
void decrement()
Definition: diagonalmatrix.hh:1153
static constexpr int dimension
Definition: diagonalmatrix.hh:785
const_row_type const_reference
Definition: diagonalmatrix.hh:81
const FieldVector< K, n > & diagonal() const
Get const reference to diagonal vector.
Definition: diagonalmatrix.hh:592
void invert()
Compute inverse.
Definition: diagonalmatrix.hh:462
static constexpr size_type size()
Definition: diagonalmatrix.hh:91
size_type realIndex([[maybe_unused]] int i) const
Definition: diagonalmatrix.hh:899
ContainerWrapperIterator< DiagonalRowVectorConst< K, n >, const K, const K & > ConstIterator
ConstIterator class for sequential access.
Definition: diagonalmatrix.hh:997
#define DUNE_THROW(E,...)
Definition: exceptions.hh:314
DiagonalRowVectorConst< K, n > type
Definition: diagonalmatrix.hh:1031
bool identical(const DiagonalMatrixWrapper &other) const
Definition: diagonalmatrix.hh:762
Construct a matrix with a dynamic size.
Definition: dynmatrix.hh:31
K * p_
Definition: diagonalmatrix.hh:915
A dense n x m matrix.
Definition: densematrix.hh:30
Facade class for stl conformant bidirectional iterators.
Definition: iteratorfacades.hh:274
get the 'mutable' version of a reference to a const object
Definition: genericiterator.hh:115
void advance(int n)
Definition: diagonalmatrix.hh:1164
size_type rowIndex() const
index of this row in surrounding matrix
Definition: diagonalmatrix.hh:886
ContainerWrapperIterator(const MyConstType &other)
Definition: diagonalmatrix.hh:1111
bool identical(const DiagonalRowVectorConst< K, n > &other) const
Definition: diagonalmatrix.hh:829
FieldVector< K, n > & diagonal()
Get reference to diagonal vector.
Definition: diagonalmatrix.hh:598
row_type * pointer(int i) const
Definition: diagonalmatrix.hh:756
void umtv(const X &x, Y &y) const
y += A^T x
Definition: diagonalmatrix.hh:326
constexpr FieldTraits< value_type >::real_type two_norm2() const
square of two norm (sum over squared values of entries), need for block recursion ...
Definition: densevector.hh:665
Definition: diagonalmatrix.hh:35
void mtv(const X &x, Y &y) const
y = A^T x
Definition: diagonalmatrix.hh:307
row_type reference
Definition: diagonalmatrix.hh:78
Definition: ftraits.hh:25
K value_type
export the type representing the field
Definition: diagonalmatrix.hh:64
Implements a vector constructed from a given type representing a field and a compile-time given size...
ContainerWrapperIterator< DiagonalRowVector< K, n >, K, K & > Iterator
Iterator class for sequential access.
Definition: diagonalmatrix.hh:966
ConstIterator beforeBegin() const
Definition: diagonalmatrix.hh:225
constexpr size_type M() const
number of columns
Definition: densematrix.hh:708
Iterator iterator
typedef for stl compliant access
Definition: diagonalmatrix.hh:968
K block_type
export the type representing the components
Definition: diagonalmatrix.hh:68
value_type field_type
Definition: diagonalmatrix.hh:65
Error thrown if operations of a FieldMatrix fail.
Definition: densematrix.hh:131
FieldTraits< K >::field_type field_type
Definition: diagonalmatrix.hh:612
A few common exception classes.
ConstIterator end() const
end ConstIterator
Definition: diagonalmatrix.hh:846
DiagonalRowVectorConst * operator &()
Definition: diagonalmatrix.hh:909
std::ptrdiff_t index() const
Definition: diagonalmatrix.hh:1176
K & diagonal(size_type i)
Get reference to diagonal entry.
Definition: diagonalmatrix.hh:586
FieldTraits< K >::real_type real_type
Definition: diagonalmatrix.hh:613
DiagonalRowVectorConst< K, n > type
Definition: diagonalmatrix.hh:1037
void mmhv(const X &x, Y &y) const
y -= A^H x
Definition: diagonalmatrix.hh:374
DiagonalRowVector(K *p, int col)
Constructor making vector with identical coordinates.
Definition: diagonalmatrix.hh:945
size_type realIndex(int i) const
Definition: diagonalmatrix.hh:751
static constexpr int rows
The number of rows.
Definition: diagonalmatrix.hh:85
T field_type
export the type representing the field
Definition: ftraits.hh:28
Definition: diagonalmatrix.hh:37
DiagonalMatrix(const FieldVector< K, n > &diag)
Constructor initializing the diagonal with a vector.
Definition: diagonalmatrix.hh:107
static constexpr size_type M()
number of blocks in column direction
Definition: diagonalmatrix.hh:537
DiagonalMatrix< K, n > transposed() const
Return transposed of the matrix as DiagonalMatrix.
Definition: diagonalmatrix.hh:153
ContainerWrapperIterator< DiagonalRowVectorConst< K, n >, const K, const K & > ConstIterator
ConstIterator class for sequential access.
Definition: diagonalmatrix.hh:835
DiagonalMatrix(const DiagonalMatrix< OtherK, n > &other)
Converting constructor.
Definition: diagonalmatrix.hh:127
void mmv(const X &x, Y &y) const
y -= A x
Definition: diagonalmatrix.hh:350
K field_type
export the type representing the field
Definition: diagonalmatrix.hh:932
DiagonalMatrixWrapper()
Definition: diagonalmatrix.hh:743
const_row_type::ConstIterator ConstColIterator
rename the iterators for easier access
Definition: diagonalmatrix.hh:202
DiagonalRowVector< K, n > row_type
Each row is implemented by a field vector.
Definition: diagonalmatrix.hh:77
R elementAt(int i) const
Definition: diagonalmatrix.hh:1159
Implements a matrix constructed from a given type representing a field and a compile-time given numbe...
bool operator!=(const DiagonalMatrix &other) const
incomparison operator
Definition: diagonalmatrix.hh:285
size_type N() const
number of blocks in the vector (are of size 1 here)
Definition: diagonalmatrix.hh:874
Get the 'const' version of a reference to a mutable object.
Definition: genericiterator.hh:86
ConstIterator beforeEnd() const
Definition: diagonalmatrix.hh:218
static constexpr int blocklevel
The number of block levels we contain. This is the leaf, that is, 1.
Definition: diagonalmatrix.hh:74
static constexpr int cols
The number of columns.
Definition: diagonalmatrix.hh:87
Iterator beforeBegin()
Definition: diagonalmatrix.hh:991
void usmv(const typename FieldTraits< Y >::field_type &alpha, const X &x, Y &y) const
y += alpha A x
Definition: diagonalmatrix.hh:386
Traits for type conversions and type information.
Implements a generic iterator class for writing stl conformant iterators.
A diagonal matrix of static size.
Definition: diagonalmatrix.hh:55
R dereference() const
Definition: diagonalmatrix.hh:1142
bool equals(const MyConstType &other) const
Definition: diagonalmatrix.hh:1137
ConstIterator end() const
end iterator
Definition: diagonalmatrix.hh:211
Iterator iterator
typedef for stl compliant access
Definition: diagonalmatrix.hh:162
Iterator begin()
begin iterator
Definition: diagonalmatrix.hh:971
K * pointer([[maybe_unused]] size_type i) const
Definition: diagonalmatrix.hh:904
ConstIterator ConstRowIterator
rename the iterators for easier access
Definition: diagonalmatrix.hh:200
const_row_type const_row_reference
Definition: diagonalmatrix.hh:82
DiagonalRowVector()
Constructor making uninitialized vector.
Definition: diagonalmatrix.hh:941
DiagonalMatrix(const K &k)
Constructor initializing the whole matrix with a scalar.
Definition: diagonalmatrix.hh:102
double infinity_norm() const
infinity norm (row sum norm, how to generalize for blocks?)
Definition: diagonalmatrix.hh:438
K block_type
export the type representing the components
Definition: diagonalmatrix.hh:795
K field_type
export the type representing the field
Definition: diagonalmatrix.hh:792
ContainerWrapperIterator< const WrapperType, reference, reference > Iterator
Iterator class for sequential access.
Definition: diagonalmatrix.hh:160
constexpr Iterator begin()
begin iterator
Definition: densevector.hh:362
DiagonalMatrix & operator=(const K &k)
Assignment from a scalar.
Definition: diagonalmatrix.hh:132
static constexpr int blocklevel
The number of block levels we contain.
Definition: diagonalmatrix.hh:801