Loading...
Searching...
No Matches
matrixutils.hh
Go to the documentation of this file.
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef DUNE_ISTL_MATRIXUTILS_HH
#define DUNE_ISTL_MATRIXUTILS_HH
#include <set>
#include <vector>
#include <limits>
#include <dune/common/typetraits.hh>
#include <dune/common/fmatrix.hh>
#include <dune/common/dynmatrix.hh>
#include <dune/common/diagonalmatrix.hh>
#include <dune/common/scalarmatrixview.hh>
#include <dune/istl/scaledidmatrix.hh>
#include "istlexception.hh"
namespace Dune
{
#ifndef DOYXGEN
template<typename B, typename A>
class BCRSMatrix;
template<typename K, int n, int m>
class FieldMatrix;
template<class T, class A>
class Matrix;
#endif
template<class Matrix, std::size_t blocklevel, std::size_t l=blocklevel>
struct CheckIfDiagonalPresent
{
static void check([[maybe_unused]] const Matrix& mat)
{
#ifdef DUNE_ISTL_WITH_CHECKING
typedef typename Matrix::ConstRowIterator Row;
typedef typename Matrix::ConstColIterator Entry;
for(Row row = mat.begin(); row!=mat.end(); ++row) {
Entry diagonal = row->find(row.index());
if(diagonal==row->end())
DUNE_THROW(ISTLError, "Missing diagonal value in row "<<row.index()
<<" at block recursion level "<<l-blocklevel);
else{
auto m = Impl::asMatrix(*diagonal);
CheckIfDiagonalPresent<decltype(m),blocklevel-1,l>::check(m);
}
}
#endif
}
};
template<class Matrix, std::size_t l>
struct CheckIfDiagonalPresent<Matrix,0,l>
{
static void check(const Matrix& mat)
{
typedef typename Matrix::ConstRowIterator Row;
for(Row row = mat.begin(); row!=mat.end(); ++row) {
if(row->find(row.index())==row->end())
DUNE_THROW(ISTLError, "Missing diagonal value in row "<<row.index()
<<" at block recursion level "<<l);
}
}
};
template<typename FirstRow, typename... Args>
class MultiTypeBlockMatrix;
template<std::size_t blocklevel, std::size_t l, typename T1, typename... Args>
struct CheckIfDiagonalPresent<MultiTypeBlockMatrix<T1,Args...>,
blocklevel,l>
{
typedef MultiTypeBlockMatrix<T1,Args...> Matrix;
static void check(const Matrix& /* mat */)
{
#ifdef DUNE_ISTL_WITH_CHECKING
// TODO Implement check
#endif
}
};
template<class M>
inline auto countNonZeros(const M&,
[[maybe_unused]] typename std::enable_if_t<Dune::IsNumber<M>::value>* sfinae = nullptr)
{
return 1;
}
template<class M>
inline auto countNonZeros(const M& matrix,
[[maybe_unused]] typename std::enable_if_t<!Dune::IsNumber<M>::value>* sfinae = nullptr)
{
typename M::size_type nonZeros = 0;
for(auto&& row : matrix)
for(auto&& entry : row)
nonZeros += countNonZeros(entry);
return nonZeros;
}
/*
template<class M>
struct ProcessOnFieldsOfMatrix
*/
namespace
{
struct CompPair {
template<class G,class M>
bool operator()(const std::pair<G,M>& p1, const std::pair<G,M>& p2) const
{
return p1.first<p2.first;
}
};
}
template<class M, class C>
void printGlobalSparseMatrix(const M& mat, C& ooc, std::ostream& os)
{
typedef typename C::ParallelIndexSet::const_iterator IIter;
typedef typename C::OwnerSet OwnerSet;
typedef typename C::ParallelIndexSet::GlobalIndex GlobalIndex;
GlobalIndex gmax=0;
for(IIter idx=ooc.indexSet().begin(), eidx=ooc.indexSet().end();
idx!=eidx; ++idx)
gmax=std::max(gmax,idx->global());
gmax=ooc.communicator().max(gmax);
ooc.buildGlobalLookup();
for(IIter idx=ooc.indexSet().begin(), eidx=ooc.indexSet().end();
idx!=eidx; ++idx) {
if(OwnerSet::contains(idx->local().attribute()))
{
typedef typename M::block_type Block;
std::set<std::pair<GlobalIndex,Block>,CompPair> entries;
// sort rows
typedef typename M::ConstColIterator CIter;
for(CIter c=mat[idx->local()].begin(), cend=mat[idx->local()].end();
c!=cend; ++c) {
const typename C::ParallelIndexSet::IndexPair* pair
=ooc.globalLookup().pair(c.index());
assert(pair);
entries.insert(std::make_pair(pair->global(), *c));
}
//wait until its the rows turn.
GlobalIndex rowidx = idx->global();
GlobalIndex cur=std::numeric_limits<GlobalIndex>::max();
while(cur!=rowidx)
cur=ooc.communicator().min(rowidx);
// print rows
typedef typename std::set<std::pair<GlobalIndex,Block>,CompPair>::iterator SIter;
for(SIter s=entries.begin(), send=entries.end(); s!=send; ++s)
os<<idx->global()<<" "<<s->first<<" "<<s->second<<std::endl;
}
}
ooc.freeGlobalLookup();
// Wait until everybody is finished
GlobalIndex cur=std::numeric_limits<GlobalIndex>::max();
while(cur!=ooc.communicator().min(cur)) ;
}
// Default implementation for scalar types
template<typename M>
struct MatrixDimension
{
static_assert(IsNumber<M>::value, "MatrixDimension is not implemented for this type!");
static auto rowdim(const M& /*A*/)
{
return 1;
}
static auto coldim(const M& /*A*/)
{
return 1;
}
};
// Default implementation for scalar types
template<typename B, typename TA>
struct MatrixDimension<Matrix<B,TA> >
{
using block_type = typename Matrix<B,TA>::block_type;
using size_type = typename Matrix<B,TA>::size_type;
static size_type rowdim (const Matrix<B,TA>& A, size_type i)
{
return MatrixDimension<block_type>::rowdim(A[i][0]);
}
static size_type coldim (const Matrix<B,TA>& A, size_type c)
{
return MatrixDimension<block_type>::coldim(A[0][c]);
}
static size_type rowdim (const Matrix<B,TA>& A)
{
size_type nn=0;
for (size_type i=0; i<A.N(); i++)
nn += rowdim(A,i);
return nn;
}
static size_type coldim (const Matrix<B,TA>& A)
{
size_type nn=0;
for (size_type i=0; i<A.M(); i++)
nn += coldim(A,i);
return nn;
}
};
template<typename B, typename TA>
struct MatrixDimension<BCRSMatrix<B,TA> >
{
typedef BCRSMatrix<B,TA> Matrix;
typedef typename Matrix::block_type block_type;
typedef typename Matrix::size_type size_type;
static size_type rowdim (const Matrix& A, size_type i)
{
const B* row = A.r[i].getptr();
if(row)
return MatrixDimension<block_type>::rowdim(*row);
else
return 0;
}
static size_type coldim (const Matrix& A, size_type c)
{
// find an entry in column c
if (A.nnz_ > 0)
{
for (size_type k=0; k<A.nnz_; k++) {
if (A.j_.get()[k] == c) {
return MatrixDimension<block_type>::coldim(A.a[k]);
}
}
}
else
{
for (size_type i=0; i<A.N(); i++)
{
size_type* j = A.r[i].getindexptr();
B* a = A.r[i].getptr();
for (size_type k=0; k<A.r[i].getsize(); k++)
if (j[k]==c) {
return MatrixDimension<block_type>::coldim(a[k]);
}
}
}
// not found
return 0;
}
static size_type rowdim (const Matrix& A){
size_type nn=0;
for (size_type i=0; i<A.N(); i++)
nn += rowdim(A,i);
return nn;
}
static size_type coldim (const Matrix& A){
typedef typename Matrix::ConstRowIterator ConstRowIterator;
typedef typename Matrix::ConstColIterator ConstColIterator;
// The following code has a complexity of nnz, and
// typically a very small constant.
//
std::vector<size_type> coldims(A.M(),
std::numeric_limits<size_type>::max());
for (ConstRowIterator row=A.begin(); row!=A.end(); ++row)
for (ConstColIterator col=row->begin(); col!=row->end(); ++col)
// only compute blocksizes we don't already have
if (coldims[col.index()]==std::numeric_limits<size_type>::max())
coldims[col.index()] = MatrixDimension<block_type>::coldim(*col);
size_type sum = 0;
for (typename std::vector<size_type>::iterator it=coldims.begin();
it!=coldims.end(); ++it)
// skip rows for which no coldim could be determined
if ((*it)>=0)
sum += *it;
return sum;
}
};
template<typename B, int n, int m, typename TA>
struct MatrixDimension<BCRSMatrix<FieldMatrix<B,n,m> ,TA> >
{
typedef BCRSMatrix<FieldMatrix<B,n,m> ,TA> Matrix;
typedef typename Matrix::size_type size_type;
static size_type rowdim (const Matrix& /*A*/, size_type /*i*/)
{
return n;
}
static size_type coldim (const Matrix& /*A*/, size_type /*c*/)
{
return m;
}
static size_type rowdim (const Matrix& A) {
return A.N()*n;
}
static size_type coldim (const Matrix& A) {
return A.M()*m;
}
};
template<typename K, int n, int m>
struct MatrixDimension<FieldMatrix<K,n,m> >
{
typedef FieldMatrix<K,n,m> Matrix;
typedef typename Matrix::size_type size_type;
static size_type rowdim(const Matrix& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type coldim(const Matrix& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type rowdim(const Matrix& /*A*/)
{
return n;
}
static size_type coldim(const Matrix& /*A*/)
{
return m;
}
};
template <class T>
struct MatrixDimension<Dune::DynamicMatrix<T> >
{
typedef Dune::DynamicMatrix<T> MatrixType;
typedef typename MatrixType::size_type size_type;
static size_type rowdim(const MatrixType& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type coldim(const MatrixType& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type rowdim(const MatrixType& A)
{
return A.N();
}
static size_type coldim(const MatrixType& A)
{
return A.M();
}
};
template<typename K, int n, int m, typename TA>
struct MatrixDimension<Matrix<FieldMatrix<K,n,m>, TA> >
{
typedef Matrix<FieldMatrix<K,n,m>, TA> ThisMatrix;
typedef typename ThisMatrix::size_type size_type;
static size_type rowdim(const ThisMatrix& /*A*/, size_type /*r*/)
{
return n;
}
static size_type coldim(const ThisMatrix& /*A*/, size_type /*r*/)
{
return m;
}
static size_type rowdim(const ThisMatrix& A)
{
return A.N()*n;
}
static size_type coldim(const ThisMatrix& A)
{
return A.M()*m;
}
};
template<typename K, int n>
struct MatrixDimension<DiagonalMatrix<K,n> >
{
typedef DiagonalMatrix<K,n> Matrix;
typedef typename Matrix::size_type size_type;
static size_type rowdim(const Matrix& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type coldim(const Matrix& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type rowdim(const Matrix& /*A*/)
{
return n;
}
static size_type coldim(const Matrix& /*A*/)
{
return n;
}
};
template<typename K, int n>
struct MatrixDimension<ScaledIdentityMatrix<K,n> >
{
typedef ScaledIdentityMatrix<K,n> Matrix;
typedef typename Matrix::size_type size_type;
static size_type rowdim(const Matrix& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type coldim(const Matrix& /*A*/, size_type /*r*/)
{
return 1;
}
static size_type rowdim(const Matrix& /*A*/)
{
return n;
}
static size_type coldim(const Matrix& /*A*/)
{
return n;
}
};
template<typename T>
struct IsMatrix
{
enum {
value = false
};
};
template<typename T>
struct IsMatrix<DenseMatrix<T> >
{
enum {
value = true
};
};
template<typename T, typename A>
struct IsMatrix<BCRSMatrix<T,A> >
{
enum {
value = true
};
};
template<typename T>
struct [[deprecated("Use a lambda instead instead of PointerCompare!")]] PointerCompare
{
bool operator()(const T* l, const T* r)
{
return *l < *r;
}
};
}
#endif
scaledidmatrix.hh
This file implements a quadratic matrix of fixed size which is a multiple of the identity.
istlexception.hh
Dune::countNonZeros
auto countNonZeros(const M &, typename std::enable_if_t< Dune::IsNumber< M >::value > *sfinae=nullptr)
Get the number of nonzero fields in the matrix.
Definition matrixutils.hh:119
Dune
Definition allocator.hh:11
Dune::printGlobalSparseMatrix
void printGlobalSparseMatrix(const M &mat, C &ooc, std::ostream &os)
Definition matrixutils.hh:154
Dune::col
MatrixSparsityPatternGatherScatter< M, I >::ColIter MatrixSparsityPatternGatherScatter< M, I >::col
Definition matrixredistribute.hh:591
Dune::MatrixDimension
Definition matrixutils.hh:211
Dune::MatrixDimension::coldim
static auto coldim(const M &)
Definition matrixutils.hh:219
Dune::MatrixDimension::rowdim
static auto rowdim(const M &)
Definition matrixutils.hh:214
Dune::BCRSMatrix
A sparse block matrix with compressed row storage.
Definition bcrsmatrix.hh:467
Dune::BCRSMatrix::begin
Iterator begin()
Get iterator to first row.
Definition bcrsmatrix.hh:672
Dune::BCRSMatrix< B, TA >::ConstRowIterator
ConstIterator ConstRowIterator
Definition bcrsmatrix.hh:735
Dune::BCRSMatrix::nnz_
size_type nnz_
Definition bcrsmatrix.hh:2064
Dune::BCRSMatrix::a
B * a
Definition bcrsmatrix.hh:2072
Dune::BCRSMatrix::end
Iterator end()
Get iterator to one beyond last row.
Definition bcrsmatrix.hh:678
Dune::BCRSMatrix::r
row_type * r
Definition bcrsmatrix.hh:2069
Dune::BCRSMatrix< B, TA >::size_type
TA::size_type size_type
Definition bcrsmatrix.hh:498
Dune::BCRSMatrix< B, TA >::ConstColIterator
row_type::ConstIterator ConstColIterator
Definition bcrsmatrix.hh:738
Dune::BCRSMatrix::M
size_type M() const
number of columns (counted in blocks)
Definition bcrsmatrix.hh:2010
Dune::BCRSMatrix< B, TA >::block_type
B block_type
Definition bcrsmatrix.hh:492
Dune::BCRSMatrix::N
size_type N() const
number of rows (counted in blocks)
Definition bcrsmatrix.hh:2004
Dune::BCRSMatrix::j_
std::shared_ptr< size_type > j_
Definition bcrsmatrix.hh:2075
Dune::MultiTypeBlockMatrix
A Matrix class to support different block types.
Definition multitypeblockmatrix.hh:46
Dune::ISTLError
derive error class from the base class in common
Definition istlexception.hh:19
Dune::Matrix
A generic dynamic dense matrix.
Definition matrix.hh:561
Dune::Matrix::size_type
A::size_type size_type
Type for indices and sizes.
Definition matrix.hh:577
Dune::Matrix::ConstRowIterator
MatrixImp::DenseMatrixBase< T, A >::ConstIterator ConstRowIterator
Const iterator over the matrix rows.
Definition matrix.hh:586
Dune::Matrix::end
RowIterator end()
Get iterator to one beyond last row.
Definition matrix.hh:616
Dune::Matrix::begin
RowIterator begin()
Get iterator to first row.
Definition matrix.hh:610
Dune::Matrix::ConstColIterator
row_type::const_iterator ConstColIterator
Const iterator for the entries of each row.
Definition matrix.hh:589
Dune::Matrix::M
size_type M() const
Return the number of columns.
Definition matrix.hh:696
Dune::Matrix::block_type
T block_type
Export the type representing the components.
Definition matrix.hh:568
Dune::Matrix::N
size_type N() const
Return the number of rows.
Definition matrix.hh:691
Dune::FieldMatrix
Definition matrixutils.hh:27
Dune::CheckIfDiagonalPresent
Check whether the a matrix has diagonal values on blocklevel recursion levels.
Definition matrixutils.hh:48
Dune::CheckIfDiagonalPresent::check
static void check(const Matrix &mat)
Check whether the a matrix has diagonal values on blocklevel recursion levels.
Definition matrixutils.hh:53
Dune::CheckIfDiagonalPresent< Matrix, 0, l >::check
static void check(const Matrix &mat)
Definition matrixutils.hh:75
Dune::CheckIfDiagonalPresent< MultiTypeBlockMatrix< T1, Args... >, blocklevel, l >::check
static void check(const Matrix &)
Check whether the a matrix has diagonal values on blocklevel recursion levels.
Definition matrixutils.hh:99
Dune::CheckIfDiagonalPresent< MultiTypeBlockMatrix< T1, Args... >, blocklevel, l >::Matrix
MultiTypeBlockMatrix< T1, Args... > Matrix
Definition matrixutils.hh:93
Dune::MatrixDimension< Matrix< B, TA > >::rowdim
static size_type rowdim(const Matrix< B, TA > &A, size_type i)
Definition matrixutils.hh:232
Dune::MatrixDimension< Matrix< B, TA > >::coldim
static size_type coldim(const Matrix< B, TA > &A)
Definition matrixutils.hh:250
Dune::MatrixDimension< Matrix< B, TA > >::rowdim
static size_type rowdim(const Matrix< B, TA > &A)
Definition matrixutils.hh:242
Dune::MatrixDimension< Matrix< B, TA > >::size_type
typename Matrix< B, TA >::size_type size_type
Definition matrixutils.hh:230
Dune::MatrixDimension< Matrix< B, TA > >::coldim
static size_type coldim(const Matrix< B, TA > &A, size_type c)
Definition matrixutils.hh:237
Dune::MatrixDimension< Matrix< B, TA > >::block_type
typename Matrix< B, TA >::block_type block_type
Definition matrixutils.hh:229
Dune::MatrixDimension< BCRSMatrix< B, TA > >::Matrix
BCRSMatrix< B, TA > Matrix
Definition matrixutils.hh:263
Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim
static size_type coldim(const Matrix &A)
Definition matrixutils.hh:311
Dune::MatrixDimension< BCRSMatrix< B, TA > >::block_type
Matrix::block_type block_type
Definition matrixutils.hh:264
Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim
static size_type coldim(const Matrix &A, size_type c)
Definition matrixutils.hh:276
Dune::MatrixDimension< BCRSMatrix< B, TA > >::size_type
Matrix::size_type size_type
Definition matrixutils.hh:265
Dune::MatrixDimension< BCRSMatrix< B, TA > >::rowdim
static size_type rowdim(const Matrix &A, size_type i)
Definition matrixutils.hh:267
Dune::MatrixDimension< BCRSMatrix< B, TA > >::rowdim
static size_type rowdim(const Matrix &A)
Definition matrixutils.hh:304
Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::coldim
static size_type coldim(const Matrix &A)
Definition matrixutils.hh:359
Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::rowdim
static size_type rowdim(const Matrix &, size_type)
Definition matrixutils.hh:345
Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::rowdim
static size_type rowdim(const Matrix &A)
Definition matrixutils.hh:355
Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::size_type
Matrix::size_type size_type
Definition matrixutils.hh:343
Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::Matrix
BCRSMatrix< FieldMatrix< B, n, m >,TA > Matrix
Definition matrixutils.hh:342
Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::coldim
static size_type coldim(const Matrix &, size_type)
Definition matrixutils.hh:350
Dune::MatrixDimension< FieldMatrix< K, n, m > >::rowdim
static size_type rowdim(const Matrix &, size_type)
Definition matrixutils.hh:370
Dune::MatrixDimension< FieldMatrix< K, n, m > >::coldim
static size_type coldim(const Matrix &)
Definition matrixutils.hh:385
Dune::MatrixDimension< FieldMatrix< K, n, m > >::size_type
Matrix::size_type size_type
Definition matrixutils.hh:368
Dune::MatrixDimension< FieldMatrix< K, n, m > >::Matrix
FieldMatrix< K, n, m > Matrix
Definition matrixutils.hh:367
Dune::MatrixDimension< FieldMatrix< K, n, m > >::coldim
static size_type coldim(const Matrix &, size_type)
Definition matrixutils.hh:375
Dune::MatrixDimension< FieldMatrix< K, n, m > >::rowdim
static size_type rowdim(const Matrix &)
Definition matrixutils.hh:380
Dune::MatrixDimension< Dune::DynamicMatrix< T > >::coldim
static size_type coldim(const MatrixType &A)
Definition matrixutils.hh:412
Dune::MatrixDimension< Dune::DynamicMatrix< T > >::rowdim
static size_type rowdim(const MatrixType &A)
Definition matrixutils.hh:407
Dune::MatrixDimension< Dune::DynamicMatrix< T > >::rowdim
static size_type rowdim(const MatrixType &, size_type)
Definition matrixutils.hh:397
Dune::MatrixDimension< Dune::DynamicMatrix< T > >::size_type
MatrixType::size_type size_type
Definition matrixutils.hh:395
Dune::MatrixDimension< Dune::DynamicMatrix< T > >::coldim
static size_type coldim(const MatrixType &, size_type)
Definition matrixutils.hh:402
Dune::MatrixDimension< Dune::DynamicMatrix< T > >::MatrixType
Dune::DynamicMatrix< T > MatrixType
Definition matrixutils.hh:394
Dune::MatrixDimension< Matrix< FieldMatrix< K, n, m >, TA > >::coldim
static size_type coldim(const ThisMatrix &A)
Definition matrixutils.hh:439
Dune::MatrixDimension< Matrix< FieldMatrix< K, n, m >, TA > >::rowdim
static size_type rowdim(const ThisMatrix &A)
Definition matrixutils.hh:434
Dune::MatrixDimension< Matrix< FieldMatrix< K, n, m >, TA > >::ThisMatrix
Matrix< FieldMatrix< K, n, m >, TA > ThisMatrix
Definition matrixutils.hh:421
Dune::MatrixDimension< Matrix< FieldMatrix< K, n, m >, TA > >::coldim
static size_type coldim(const ThisMatrix &, size_type)
Definition matrixutils.hh:429
Dune::MatrixDimension< Matrix< FieldMatrix< K, n, m >, TA > >::rowdim
static size_type rowdim(const ThisMatrix &, size_type)
Definition matrixutils.hh:424
Dune::MatrixDimension< Matrix< FieldMatrix< K, n, m >, TA > >::size_type
ThisMatrix::size_type size_type
Definition matrixutils.hh:422
Dune::MatrixDimension< DiagonalMatrix< K, n > >::coldim
static size_type coldim(const Matrix &, size_type)
Definition matrixutils.hh:456
Dune::MatrixDimension< DiagonalMatrix< K, n > >::size_type
Matrix::size_type size_type
Definition matrixutils.hh:449
Dune::MatrixDimension< DiagonalMatrix< K, n > >::coldim
static size_type coldim(const Matrix &)
Definition matrixutils.hh:466
Dune::MatrixDimension< DiagonalMatrix< K, n > >::rowdim
static size_type rowdim(const Matrix &)
Definition matrixutils.hh:461
Dune::MatrixDimension< DiagonalMatrix< K, n > >::Matrix
DiagonalMatrix< K, n > Matrix
Definition matrixutils.hh:448
Dune::MatrixDimension< DiagonalMatrix< K, n > >::rowdim
static size_type rowdim(const Matrix &, size_type)
Definition matrixutils.hh:451
Dune::MatrixDimension< ScaledIdentityMatrix< K, n > >::coldim
static size_type coldim(const Matrix &)
Definition matrixutils.hh:493
Dune::MatrixDimension< ScaledIdentityMatrix< K, n > >::rowdim
static size_type rowdim(const Matrix &, size_type)
Definition matrixutils.hh:478
Dune::MatrixDimension< ScaledIdentityMatrix< K, n > >::coldim
static size_type coldim(const Matrix &, size_type)
Definition matrixutils.hh:483
Dune::MatrixDimension< ScaledIdentityMatrix< K, n > >::size_type
Matrix::size_type size_type
Definition matrixutils.hh:476
Dune::MatrixDimension< ScaledIdentityMatrix< K, n > >::Matrix
ScaledIdentityMatrix< K, n > Matrix
Definition matrixutils.hh:475
Dune::MatrixDimension< ScaledIdentityMatrix< K, n > >::rowdim
static size_type rowdim(const Matrix &)
Definition matrixutils.hh:488
Dune::IsMatrix
Test whether a type is an ISTL Matrix.
Definition matrixutils.hh:504
Dune::IsMatrix::value
@ value
True if T is an ISTL matrix.
Definition matrixutils.hh:509
Dune::IsMatrix< DenseMatrix< T > >::value
@ value
True if T is an ISTL matrix.
Definition matrixutils.hh:520
Dune::IsMatrix< BCRSMatrix< T, A > >::value
@ value
True if T is an ISTL matrix.
Definition matrixutils.hh:532
Dune::PointerCompare
Definition matrixutils.hh:538
Dune::PointerCompare::operator()
bool operator()(const T *l, const T *r)
Definition matrixutils.hh:539
Dune::ScaledIdentityMatrix
A multiple of the identity matrix of static size.
Definition scaledidmatrix.hh:42
Dune::ScaledIdentityMatrix::size_type
std::size_t size_type
The type used for the indices and sizes.
Definition scaledidmatrix.hh:55