DUNE ISTL (unstable)

Classes

class  Dune::MultiTypeBlockMatrix_Solver_Col< I, crow, ccol, remain_col >
 part of solvers for MultiTypeBlockVector & MultiTypeBlockMatrix types More...
 
class  Dune::MultiTypeBlockMatrix_Solver< I, crow, remain_row >
 solver for MultiTypeBlockVector & MultiTypeBlockMatrix types More...
 
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...
 

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 = Std::detected_t< std::common_type_t, typename FieldTraits< FirstRow >::field_type, typename FieldTraits< Args >::field_type... >
 The type used for scalars. More...
 
using Dune::MultiTypeBlockMatrix< FirstRow, Args >::real_type = Std::detected_t< std::common_type_t, typename FieldTraits< FirstRow >::real_type, typename FieldTraits< Args >::real_type... >
 The type used for real values. More...
 

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. More...
 
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. More...
 
template<typename T >
void Dune::MultiTypeBlockMatrix< FirstRow, Args >::operator= (const T &newval)
 
MultiTypeBlockMatrixDune::MultiTypeBlockMatrix< FirstRow, Args >::operator*= (const field_type &k)
 vector space multiplication with scalar
 
MultiTypeBlockMatrixDune::MultiTypeBlockMatrix< FirstRow, Args >::operator/= (const field_type &k)
 vector space division by scalar
 
MultiTypeBlockMatrixDune::MultiTypeBlockMatrix< FirstRow, Args >::operator+= (const MultiTypeBlockMatrix &b)
 Add the entries of another matrix to this one. More...
 
MultiTypeBlockMatrixDune::MultiTypeBlockMatrix< FirstRow, Args >::operator-= (const MultiTypeBlockMatrix &b)
 Subtract the entries of another matrix from this one. More...
 
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 More...
 
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 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 >::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 >::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 >::dbjac (const TMatrix &A, TVector &x, const TVector &b, const K &w)
 

Detailed Description

Typedef Documentation

◆ field_type

template<typename FirstRow , typename... Args>
using Dune::MultiTypeBlockMatrix< FirstRow, Args >::field_type = 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

template<typename FirstRow , typename... Args>
using Dune::MultiTypeBlockMatrix< FirstRow, Args >::real_type = 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.

◆ type

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

own class' type

Function Documentation

◆ bsorb()

template<int I, int crow, int remain_row>
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 
)
inlinestatic

◆ bsorf()

template<int I, int crow, int remain_row>
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 
)
inlinestatic

◆ calc_rhs()

template<int I, int crow, int ccol, int remain_col>
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 
)
inlinestatic

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

◆ dbgs()

template<int I, int crow, int remain_row>
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 
)
inlinestatic

Gauss-Seidel solver for MultiTypeBlockMatrix & MultiTypeBlockVector types

◆ dbjac()

template<int I, int crow, int remain_row>
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 
)
inlinestatic

Jacobi solver for MultiTypeBlockMatrix & MultiTypeBlockVector types

◆ 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
bThe 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
bThe matrix to subtract from this one. Its sparsity pattern has to be subset of the sparsity pattern of this matrix.

◆ 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.

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (May 27, 22:36, 2026)