Loading...
Searching...
No Matches
DenseMatVec
Iterative Solvers Template Library (ISTL) » Sparse Matrix and Vector classes
Collaboration diagram for DenseMatVec:

## Classes

struct | Dune::FieldTraits< BlockVector< B, A > >
struct | Dune::FieldTraits< MultiTypeBlockMatrix< Rows... > >
struct | Dune::algmeta_itsteps< I, M >
class | Dune::MultiTypeBlockMatrix_Solver_Col< I, crow, ccol, remain_col >
| part of solvers for MultiTypeBlockVector & MultiTypeBlockMatrix types More...
class | Dune::MultiTypeBlockMatrix_Solver_Col< I, crow, ccol, 0 >
class | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >
| solver for MultiTypeBlockVector & MultiTypeBlockMatrix types More...
class | Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >
struct | std::tuple_element< i, Dune::MultiTypeBlockMatrix< Args... > >
| Make std::tuple_element work for MultiTypeBlockMatrix. More...
struct | std::tuple_size< Dune::MultiTypeBlockMatrix< Args... > >
| Make std::tuple_size work for MultiTypeBlockMatrix. More...
struct | Dune::FieldTraits< MultiTypeBlockVector< Args... > >
struct | Dune::FieldTraits< VariableBlockVector< B, A > >

## Typedefs

typedef MultiTypeBlockMatrix< FirstRow, Args... > | Dune::MultiTypeBlockMatrix< FirstRow, Args >::type
using | Dune::MultiTypeBlockMatrix< FirstRow, Args >::size_type = std::size_t
| Type used for sizes.
using | Dune::MultiTypeBlockMatrix< FirstRow, Args >::field_type
| The type used for scalars.
using | Dune::MultiTypeBlockMatrix< FirstRow, Args >::real_type
| The type used for real values.
using | Dune::FieldTraits< MultiTypeBlockMatrix< Rows... > >::field_type = typename MultiTypeBlockMatrix<Rows...>::field_type
using | Dune::FieldTraits< MultiTypeBlockMatrix< Rows... > >::real_type = typename MultiTypeBlockMatrix<Rows...>::real_type
using | std::tuple_element< i, Dune::MultiTypeBlockMatrix< Args... > >::type = typename std::tuple_element<i, std::tuple<Args...> >::type

## Functions

static constexpr size_type | Dune::MultiTypeBlockMatrix< FirstRow, Args >::N ()
| Return the number of matrix rows.
static constexpr size_type | Dune::MultiTypeBlockMatrix< FirstRow, Args >::M ()
| Return the number of matrix columns.
template<size_type index>
auto | Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator[] (const std::integral_constant< size_type, index > indexVariable) -> decltype(std::get< index >(*this))
| Random-access operator.
template<size_type index>
auto | Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator[] (const std::integral_constant< size_type, index > indexVariable) const -> decltype(std::get< index >(*this))
| Const random-access operator.
template<typename T>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator= (const T &newval)
MultiTypeBlockMatrix & | Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator*= (const field_type &k)
| vector space multiplication with scalar
MultiTypeBlockMatrix & | Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator/= (const field_type &k)
| vector space division by scalar
MultiTypeBlockMatrix & | Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator+= (const MultiTypeBlockMatrix &b)
| Add the entries of another matrix to this one.
MultiTypeBlockMatrix & | Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator-= (const MultiTypeBlockMatrix &b)
| Subtract the entries of another matrix from this one.
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::mv (const X &x, Y &y) const
| y = A x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::umv (const X &x, Y &y) const
| y += A x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::mmv (const X &x, Y &y) const
| y -= A x
template<typename AlphaType, typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::usmv (const AlphaType &alpha, const X &x, Y &y) const
| y += alpha A x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::mtv (const X &x, Y &y) const
| y = A^T x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::umtv (const X &x, Y &y) const
| y += A^T x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::mmtv (const X &x, Y &y) const
| y -= A^T x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::usmtv (const field_type &alpha, const X &x, Y &y) const
| y += alpha A^T x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::umhv (const X &x, Y &y) const
| y += A^H x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::mmhv (const X &x, Y &y) const
| y -= A^H x
template<typename X, typename Y>
void | Dune::MultiTypeBlockMatrix< FirstRow, Args >::usmhv (const field_type &alpha, const X &x, Y &y) const
| y += alpha A^H x
real_type | Dune::MultiTypeBlockMatrix< FirstRow, Args >::frobenius_norm2 () const
| square of frobenius norm, need for block recursion
real_type | Dune::MultiTypeBlockMatrix< FirstRow, Args >::frobenius_norm () const
| frobenius norm: sqrt(sum over squared values of entries)
real_type | Dune::MultiTypeBlockMatrix< FirstRow, Args >::infinity_norm () const
| Bastardized version of the infinity-norm / row-sum norm.
real_type | Dune::MultiTypeBlockMatrix< FirstRow, Args >::infinity_norm_real () const
| Bastardized version of the infinity-norm / row-sum norm.
template<typename T1, typename... Args>
std::ostream & | Dune::operator<< (std::ostream &s, const MultiTypeBlockMatrix< T1, Args... > &m)
| << operator for a MultiTypeBlockMatrix
template<typename Trhs, typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver_Col< I, crow, ccol, remain_col >::calc_rhs (const TMatrix &A, TVector &x, TVector &v, Trhs &b, const K &w)
template<typename Trhs, typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver_Col< I, crow, ccol, 0 >::calc_rhs (const TMatrix &, TVector &, TVector &, Trhs &, const K &)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbgs (const TMatrix &A, TVector &x, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbgs (const TMatrix &A, TVector &x, TVector &v, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorf (const TMatrix &A, TVector &x, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorf (const TMatrix &A, TVector &x, TVector &v, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorb (const TMatrix &A, TVector &x, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorb (const TMatrix &A, TVector &x, TVector &v, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbjac (const TMatrix &A, TVector &x, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbjac (const TMatrix &A, TVector &x, TVector &v, const TVector &b, const K &w)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::dbgs (const TMatrix &, TVector &, TVector &, const TVector &, const K &)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::bsorf (const TMatrix &, TVector &, TVector &, const TVector &, const K &)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::bsorb (const TMatrix &, TVector &, TVector &, const TVector &, const K &)
template<typename TVector, typename TMatrix, typename K>
static void | Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::dbjac (const TMatrix &, TVector &, TVector &, const TVector &, const K &)

## Detailed Description

## Typedef Documentation

## field_type [1/2]

template<typename... Rows>

using Dune::FieldTraits< MultiTypeBlockMatrix< Rows... > >::field_type = typename MultiTypeBlockMatrix<Rows...>::field_type

## field_type [2/2]

template<typename FirstRow, typename... Args>

using Dune::MultiTypeBlockMatrix< FirstRow, Args >::field_type

Initial value:
Std::detected_t<std::common_type_t,
typename FieldTraits<FirstRow>::field_type, typename FieldTraits<Args>::field_type...>

The type used for scalars.

Use the std::common_type_t of the Args' field_type and use nonesuch if no implementation of std::common_type is provided for the given field_type arguments.

## real_type [1/2]

template<typename... Rows>

using Dune::FieldTraits< MultiTypeBlockMatrix< Rows... > >::real_type = typename MultiTypeBlockMatrix<Rows...>::real_type

## real_type [2/2]

template<typename FirstRow, typename... Args>

using Dune::MultiTypeBlockMatrix< FirstRow, Args >::real_type

Initial value:
Std::detected_t<std::common_type_t,
typename FieldTraits<FirstRow>::real_type, typename FieldTraits<Args>::real_type...>

The type used for real values.

Use the std::common_type_t of the Args' real_type and use nonesuch if no implementation of std::common_type is provided for the given real_type arguments.

## size_type

template<typename FirstRow, typename... Args>

using Dune::MultiTypeBlockMatrix< FirstRow, Args >::size_type = std::size_t

Type used for sizes.

## type [1/2]

template<typename FirstRow, typename... Args>

typedef MultiTypeBlockMatrix<FirstRow, Args...> Dune::MultiTypeBlockMatrix< FirstRow, Args >::type

own class' type

## type [2/2]

template<size_t i, typename... Args>

using std::tuple_element< i, Dune::MultiTypeBlockMatrix< Args... > >::type = typename std::tuple_element<i, std::tuple<Args...> >::type

## Function Documentation

## bsorb() [1/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorb | ( | const TMatrix & | A,
|  | TVector & | x,
|  | const TVector & | b,
|  | const K & | w )

inline static

bsorb for MultiTypeBlockMatrix & MultiTypeBlockVector types

## bsorb() [2/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorb | ( | const TMatrix & | A,
|  | TVector & | x,
|  | TVector & | v,
|  | const TVector & | b,
|  | const K & | w )

inline static

## bsorb() [3/3]

template<int I, int crow>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::bsorb | ( | const TMatrix & | ,
|  | TVector & | ,
|  | TVector & | ,
|  | const TVector & | ,
|  | const K & | )

inline static

## bsorf() [1/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorf | ( | const TMatrix & | A,
|  | TVector & | x,
|  | const TVector & | b,
|  | const K & | w )

inline static

bsorf for MultiTypeBlockMatrix & MultiTypeBlockVector types

## bsorf() [2/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::bsorf | ( | const TMatrix & | A,
|  | TVector & | x,
|  | TVector & | v,
|  | const TVector & | b,
|  | const K & | w )

inline static

## bsorf() [3/3]

template<int I, int crow>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::bsorf | ( | const TMatrix & | ,
|  | TVector & | ,
|  | TVector & | ,
|  | const TVector & | ,
|  | const K & | )

inline static

## calc_rhs() [1/2]

template<int I, int crow, int ccol, int remain_col>
template<typename Trhs, typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver_Col< I, crow, ccol, remain_col >::calc_rhs | ( | const TMatrix & | A,
|  | TVector & | x,
|  | TVector & | v,
|  | Trhs & | b,
|  | const K & | w )

inline static

iterating over one row in MultiTypeBlockMatrix to calculate right side b-A[i][j]*x[j]

## calc_rhs() [2/2]

template<int I, int crow, int ccol>
template<typename Trhs, typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver_Col< I, crow, ccol, 0 >::calc_rhs | ( | const TMatrix & | ,
|  | TVector & | ,
|  | TVector & | ,
|  | Trhs & | ,
|  | const K & | )

inline static

## dbgs() [1/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbgs | ( | const TMatrix & | A,
|  | TVector & | x,
|  | const TVector & | b,
|  | const K & | w )

inline static

Gauss-Seidel solver for MultiTypeBlockMatrix & MultiTypeBlockVector types

## dbgs() [2/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbgs | ( | const TMatrix & | A,
|  | TVector & | x,
|  | TVector & | v,
|  | const TVector & | b,
|  | const K & | w )

inline static

## dbgs() [3/3]

template<int I, int crow>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::dbgs | ( | const TMatrix & | ,
|  | TVector & | ,
|  | TVector & | ,
|  | const TVector & | ,
|  | const K & | )

inline static

## dbjac() [1/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbjac | ( | const TMatrix & | A,
|  | TVector & | x,
|  | const TVector & | b,
|  | const K & | w )

inline static

Jacobi solver for MultiTypeBlockMatrix & MultiTypeBlockVector types

## dbjac() [2/3]

template<int I, int crow, int remain_row>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >::dbjac | ( | const TMatrix & | A,
|  | TVector & | x,
|  | TVector & | v,
|  | const TVector & | b,
|  | const K & | w )

inline static

## dbjac() [3/3]

template<int I, int crow>
template<typename TVector, typename TMatrix, typename K>

void Dune::MultiTypeBlockMatrix_Solver< I, crow, 0 >::dbjac | ( | const TMatrix & | ,
|  | TVector & | ,
|  | TVector & | ,
|  | const TVector & | ,
|  | const K & | )

inline static

## frobenius_norm()

template<typename FirstRow, typename... Args>

real_type Dune::MultiTypeBlockMatrix< FirstRow, Args >::frobenius_norm | ( |  | ) | const

inline

frobenius norm: sqrt(sum over squared values of entries)

## frobenius_norm2()

template<typename FirstRow, typename... Args>

real_type Dune::MultiTypeBlockMatrix< FirstRow, Args >::frobenius_norm2 | ( |  | ) | const

inline

square of frobenius norm, need for block recursion

## infinity_norm()

template<typename FirstRow, typename... Args>

real_type Dune::MultiTypeBlockMatrix< FirstRow, Args >::infinity_norm | ( |  | ) | const

inline

Bastardized version of the infinity-norm / row-sum norm.

## infinity_norm_real()

template<typename FirstRow, typename... Args>

real_type Dune::MultiTypeBlockMatrix< FirstRow, Args >::infinity_norm_real | ( |  | ) | const

inline

Bastardized version of the infinity-norm / row-sum norm.

## M()

template<typename FirstRow, typename... Args>

constexpr size_type Dune::MultiTypeBlockMatrix< FirstRow, Args >::M | ( |  | ) |

inline static constexpr

Return the number of matrix columns.

## mmhv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::mmhv | ( | const X & | x,
|  | Y & | y ) const

inline

y -= A^H x

## mmtv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::mmtv | ( | const X & | x,
|  | Y & | y ) const

inline

y -= A^T x

## mmv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::mmv | ( | const X & | x,
|  | Y & | y ) const

inline

y -= A x

## mtv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::mtv | ( | const X & | x,
|  | Y & | y ) const

inline

y = A^T x

## mv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::mv | ( | const X & | x,
|  | Y & | y ) const

inline

y = A x

## N()

template<typename FirstRow, typename... Args>

constexpr size_type Dune::MultiTypeBlockMatrix< FirstRow, Args >::N | ( |  | ) |

inline static constexpr

Return the number of matrix rows.

## operator*=()

template<typename FirstRow, typename... Args>

MultiTypeBlockMatrix & Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator*= | ( | const field_type & | k | ) |

inline

vector space multiplication with scalar

## operator+=()

template<typename FirstRow, typename... Args>

MultiTypeBlockMatrix & Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator+= | ( | const MultiTypeBlockMatrix< FirstRow, Args > & | b | ) |

inline

Add the entries of another matrix to this one.

Parameters

  b | The matrix to add to this one. Its sparsity pattern has to be subset of the sparsity pattern of this matrix.

## operator-=()

template<typename FirstRow, typename... Args>

MultiTypeBlockMatrix & Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator-= | ( | const MultiTypeBlockMatrix< FirstRow, Args > & | b | ) |

inline

Subtract the entries of another matrix from this one.

Parameters

  b | The matrix to subtract from this one. Its sparsity pattern has to be subset of the sparsity pattern of this matrix.

## operator/=()

template<typename FirstRow, typename... Args>

MultiTypeBlockMatrix & Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator/= | ( | const field_type & | k | ) |

inline

vector space division by scalar

## operator<<()

template<typename T1, typename... Args>

std::ostream & Dune::operator<< | ( | std::ostream & | s,
|  | const MultiTypeBlockMatrix< T1, Args... > & | m )

<< operator for a MultiTypeBlockMatrix

operator<< for printing out a MultiTypeBlockMatrix

## operator=()

template<typename FirstRow, typename... Args>
template<typename T>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator= | ( | const T & | newval | ) |

inline

assignment operator

## operator[]() [1/2]

template<typename FirstRow, typename... Args>
template<size_type index>

auto Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator[] | ( | const std::integral_constant< size_type, index > | indexVariable | ) | ->decltype(std::get< index >(*this))

inline

Random-access operator.

This method mimics the behavior of normal vector access with square brackets like, e.g., m[5] = .... The problem is that the return type is different for each value of the argument in the brackets. Therefore we implement a trick using std::integral_constant. To access the first row of a MultiTypeBlockMatrix named m write

std::integral_constant<size_type,0> _0;
m[_0] = ...

The name '_0' used here as a static replacement of the integer number zero is arbitrary. Any other variable name can be used. If you don't like the separate variable, you can write

m[std::integral_constant<size_type,0>()] = ...

## operator[]() [2/2]

template<typename FirstRow, typename... Args>
template<size_type index>

auto Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator[] | ( | const std::integral_constant< size_type, index > | indexVariable | ) | const->decltype(std::get< index >(*this))

inline

Const random-access operator.

This is the const version of the random-access operator. See the non-const version for a full explanation of how to use it.

## umhv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::umhv | ( | const X & | x,
|  | Y & | y ) const

inline

y += A^H x

## umtv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::umtv | ( | const X & | x,
|  | Y & | y ) const

inline

y += A^T x

## umv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::umv | ( | const X & | x,
|  | Y & | y ) const

inline

y += A x

## usmhv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::usmhv | ( | const field_type & | alpha,
|  | const X & | x,
|  | Y & | y ) const

inline

y += alpha A^H x

## usmtv()

template<typename FirstRow, typename... Args>
template<typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::usmtv | ( | const field_type & | alpha,
|  | const X & | x,
|  | Y & | y ) const

inline

y += alpha A^T x

## usmv()

template<typename FirstRow, typename... Args>
template<typename AlphaType, typename X, typename Y>

void Dune::MultiTypeBlockMatrix< FirstRow, Args >::usmv | ( | const AlphaType & | alpha,
|  | const X & | x,
|  | Y & | y ) const

inline

y += alpha A x