Loading...
Searching...
No Matches
Sparse Matrix and Vector classes
Iterative Solvers Template Library (ISTL)

Matrix and Vector classes that support a block recursive structure capable of representing the natural structure from Finite Element discretisations. More...

Collaboration diagram for Sparse Matrix and Vector classes:

## Topics

| Block Recursive Iterative Kernels
| IO for matrices and vectors.
| Provides methods for reading and writing matrices and vectors in various formats.
| DenseMatVec

## Files

file | matrixmatrix.hh
| provides functions for sparse matrix matrix multiplication.
file | matrixutils.hh
| Some handy generic functions for ISTL matrices.

## Classes

struct | Dune::MatrixDimension< M >
struct | Dune::CompressionStatistics< size_type >
| Statistics about compression achieved in implicit mode. More...
class | Dune::ImplicitMatrixBuilder< M_ >
| A wrapper for uniform access to the BCRSMatrix during and after the build stage in implicit build mode. More...
class | Dune::BCRSMatrix< B, A >
| A sparse block matrix with compressed row storage. More...
struct | Dune::FieldTraits< BCRSMatrix< B, A > >
class | Dune::BDMatrix< B, A >
| A block-diagonal matrix. More...
struct | Dune::FieldTraits< BDMatrix< B, A > >
class | Dune::BTDMatrix< B, A >
| A block-tridiagonal matrix. More...
struct | Dune::FieldTraits< BTDMatrix< B, A > >
class | Dune::BlockVector< B, A >
| A vector of blocks with memory management. More...
class | Dune::Matrix< T, A >
| A generic dynamic dense matrix. More...
struct | Dune::FieldTraits< Matrix< T, A > >
struct | Dune::MatMultMatResult< M1, M2 >
| Helper TMP to get the result type of a sparse matrix matrix multiplication ( ). More...
struct | Dune::MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > >
struct | Dune::MatMultMatResult< BCRSMatrix< FieldMatrix< T, n, k >, A >, BCRSMatrix< FieldMatrix< T, k, m >, A1 > >
struct | Dune::TransposedMatMultMatResult< M1, M2 >
| Helper TMP to get the result type of a sparse matrix matrix multiplication ( ). More...
struct | Dune::TransposedMatMultMatResult< FieldMatrix< T, k, n >, FieldMatrix< T, k, m > >
struct | Dune::TransposedMatMultMatResult< BCRSMatrix< FieldMatrix< T, k, n >, A >, BCRSMatrix< FieldMatrix< T, k, m >, A1 > >
struct | Dune::CheckIfDiagonalPresent< Matrix, blocklevel, l >
| Check whether the a matrix has diagonal values on blocklevel recursion levels. More...
struct | Dune::CheckIfDiagonalPresent< Matrix, 0, l >
class | Dune::MultiTypeBlockMatrix< FirstRow, Args >
| A Matrix class to support different block types. More...
struct | Dune::CheckIfDiagonalPresent< MultiTypeBlockMatrix< T1, Args... >, blocklevel, l >
class | Dune::MultiTypeBlockVector< Args >
| A Vector class to support different block types. More...
struct | std::tuple_element< i, Dune::MultiTypeBlockVector< Args... > >
| Make std::tuple_element work for MultiTypeBlockVector. More...
struct | std::tuple_size< Dune::MultiTypeBlockVector< Args... > >
| Make std::tuple_size work for MultiTypeBlockVector. More...
class | Dune::VariableBlockVector< B, A >
| A Vector of blocks with different blocksizes. More...

## Typedefs

typedef BCRSMatrix< FieldMatrix< T, n, m >, A >::CreateIterator | Dune::SparsityPatternInitializer< T, A, n, m >::CreateIterator
typedef BCRSMatrix< FieldMatrix< T, n, m >, A >::size_type | Dune::SparsityPatternInitializer< T, A, n, m >::size_type
typedef Dune::BCRSMatrix< FieldMatrix< T, n, m >, TA > | Dune::MatrixInitializer< transpose, T, TA, n, m >::Matrix
typedef Matrix::CreateIterator | Dune::MatrixInitializer< transpose, T, TA, n, m >::CreateIterator
typedef Matrix::size_type | Dune::MatrixInitializer< transpose, T, TA, n, m >::size_type
typedef Dune::BCRSMatrix< Dune::FieldMatrix< T, n, m >, TA > | Dune::MatrixInitializer< 1, T, TA, n, m >::Matrix
typedef Matrix::CreateIterator | Dune::MatrixInitializer< 1, T, TA, n, m >::CreateIterator
typedef Matrix::size_type | Dune::MatrixInitializer< 1, T, TA, n, m >::size_type
typedef BCRSMatrix< FieldMatrix< T, n, m >, A > | Dune::EntryAccumulatorFather< T, A, n, m >::Matrix
typedef Matrix::RowIterator | Dune::EntryAccumulatorFather< T, A, n, m >::Row
typedef Matrix::ColIterator | Dune::EntryAccumulatorFather< T, A, n, m >::Col
typedef BCRSMatrix< FieldMatrix< T, n, m >, A > | Dune::EntryAccumulator< T, A, n, m, transpose >::Matrix
typedef Matrix::size_type | Dune::EntryAccumulator< T, A, n, m, transpose >::size_type
typedef BCRSMatrix< FieldMatrix< T, n, m >, A > | Dune::EntryAccumulator< T, A, n, m, 0 >::Matrix
typedef Matrix::size_type | Dune::EntryAccumulator< T, A, n, m, 0 >::size_type
typedef BCRSMatrix< FieldMatrix< T, n, m >, A > | Dune::EntryAccumulator< T, A, n, m, 1 >::Matrix
typedef Matrix::size_type | Dune::EntryAccumulator< T, A, n, m, 1 >::size_type
typedef BCRSMatrix< FieldMatrix< T, n, m >, A > | Dune::EntryAccumulator< T, A, n, m, 2 >::Matrix
typedef Matrix::size_type | Dune::EntryAccumulator< T, A, n, m, 2 >::size_type
typedef FieldMatrix< T, n, m > | Dune::MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > >::type
typedef BCRSMatrix< typename MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > >::type, std::allocator< typename MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > >::type > > | Dune::MatMultMatResult< BCRSMatrix< FieldMatrix< T, n, k >, A >, BCRSMatrix< FieldMatrix< T, k, m >, A1 > >::type
typedef FieldMatrix< T, n, m > | Dune::TransposedMatMultMatResult< FieldMatrix< T, k, n >, FieldMatrix< T, k, m > >::type
typedef BCRSMatrix< typename MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > >::type, std::allocator< typename MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > >::type > > | Dune::TransposedMatMultMatResult< BCRSMatrix< FieldMatrix< T, k, n >, A >, BCRSMatrix< FieldMatrix< T, k, m >, A1 > >::type
using | Dune::FieldTraits< MultiTypeBlockVector< Args... > >::field_type = typename MultiTypeBlockVector<Args...>::field_type
using | Dune::FieldTraits< MultiTypeBlockVector< Args... > >::real_type = typename MultiTypeBlockVector<Args...>::real_type
using | Dune::MultiTypeBlockVector< Args >::size_type = std::size_t
| Type used for vector sizes.
typedef MultiTypeBlockVector< Args... > | Dune::MultiTypeBlockVector< Args >::type
using | Dune::MultiTypeBlockVector< Args >::field_type = Std::detected_t<std::common_type_t, typename FieldTraits< std::decay_t<Args> >::field_type...>
| The type used for scalars.
using | Dune::MultiTypeBlockVector< Args >::real_type = Std::detected_t<std::common_type_t, typename FieldTraits< std::decay_t<Args> >::real_type...>
| The type used for real values.
using | std::tuple_element< i, Dune::MultiTypeBlockVector< Args... > >::type = typename std::tuple_element<i, std::tuple<Args...> >::type

## Enumerations

enum | { Dune::SparsityPatternInitializer< T, A, n, m >::do_break =true }
enum | { Dune::MatrixInitializer< transpose, T, TA, n, m >::do_break =true }
enum | { Dune::MatrixInitializer< 1, T, TA, n, m >::do_break =false }
enum | { Dune::EntryAccumulatorFather< T, A, n, m >::do_break =false }

## Functions

template<class T, class A, class A1, class A2, int n, int m, int k>
void | Dune::matMultTransposeMat (BCRSMatrix< FieldMatrix< T, n, k >, A > &res, const BCRSMatrix< FieldMatrix< T, n, m >, A1 > &mat, const BCRSMatrix< FieldMatrix< T, k, m >, A2 > &matt, bool=false)
| Calculate product of a sparse matrix with a transposed sparse matrices ( ).
template<class T, class A, class A1, class A2, int n, int m, int k>
void | Dune::matMultMat (BCRSMatrix< FieldMatrix< T, n, m >, A > &res, const BCRSMatrix< FieldMatrix< T, n, k >, A1 > &mat, const BCRSMatrix< FieldMatrix< T, k, m >, A2 > &matt, bool=false)
| Calculate product of two sparse matrices ( ).
template<class T, class A, class A1, class A2, int n, int m, int k>
void | Dune::transposeMatMultMat (BCRSMatrix< FieldMatrix< T, n, m >, A > &res, const BCRSMatrix< FieldMatrix< T, k, n >, A1 > &mat, const BCRSMatrix< FieldMatrix< T, k, m >, A2 > &matt, bool=false)
| Calculate product of a transposed sparse matrix with another sparse matrices ( ).
template<class M>
auto | Dune::countNonZeros (const M &, typename std::enable_if_t< Dune::IsNumber< M >::value > *sfinae=nullptr)
| Get the number of nonzero fields in the matrix.
template<class M>
auto | Dune::countNonZeros (const M &matrix, typename std::enable_if_t<!Dune::IsNumber< M >::value > *sfinae=nullptr)
static constexpr size_type | Dune::MultiTypeBlockVector< Args >::size ()
| Return the number of non-zero vector entries.
static constexpr size_type | Dune::MultiTypeBlockVector< Args >::N ()
| Number of elements.
size_type | Dune::MultiTypeBlockVector< Args >::dim () const
| Number of scalar elements.
template<size_type index>
std::tuple_element< index, TupleType >::type & | Dune::MultiTypeBlockVector< Args >::operator[] (const std::integral_constant< size_type, index > indexVariable)
| Random-access operator.
template<size_type index>
const std::tuple_element< index, TupleType >::type & | Dune::MultiTypeBlockVector< Args >::operator[] (const std::integral_constant< size_type, index > indexVariable) const
| Const random-access operator.
template<typename T>
void | Dune::MultiTypeBlockVector< Args >::operator= (const T &newval)
| Assignment operator.
void | Dune::MultiTypeBlockVector< Args >::operator+= (const type &newv)
void | Dune::MultiTypeBlockVector< Args >::operator-= (const type &newv)
template<class T, std::enable_if_t< IsNumber< T >::value, int > = 0>
void | Dune::MultiTypeBlockVector< Args >::operator*= (const T &w)
| Multiplication with a scalar.
template<class T, std::enable_if_t< IsNumber< T >::value, int > = 0>
void | Dune::MultiTypeBlockVector< Args >::operator/= (const T &w)
| Division by a scalar.
field_type | Dune::MultiTypeBlockVector< Args >::operator* (const type &newv) const
field_type | Dune::MultiTypeBlockVector< Args >::dot (const type &newv) const
auto | Dune::MultiTypeBlockVector< Args >::one_norm () const
| Compute the 1-norm.
auto | Dune::MultiTypeBlockVector< Args >::one_norm_real () const
| Compute the simplified 1-norm (uses 1-norm also for complex values).
real_type | Dune::MultiTypeBlockVector< Args >::two_norm2 () const
| Compute the squared Euclidean norm.
real_type | Dune::MultiTypeBlockVector< Args >::two_norm () const
| Compute the Euclidean norm.
real_type | Dune::MultiTypeBlockVector< Args >::infinity_norm () const
| Compute the maximum norm.
real_type | Dune::MultiTypeBlockVector< Args >::infinity_norm_real () const
| Compute the simplified maximum norm (uses 1-norm for complex values).
template<typename Ta>
void | Dune::MultiTypeBlockVector< Args >::axpy (const Ta &a, const type &y)
| Axpy operation on this vector (*this += a * y).
template<typename... Args>
std::ostream & | Dune::operator<< (std::ostream &s, const MultiTypeBlockVector< Args... > &v)
| Send MultiTypeBlockVector to an outstream.

## Variables

Matrix & | Dune::EntryAccumulatorFather< T, A, n, m >::mat
Col | Dune::EntryAccumulatorFather< T, A, n, m >::col

## Detailed Description

Matrix and Vector classes that support a block recursive structure capable of representing the natural structure from Finite Element discretisations.

The interface of our matrices is designed according to what they represent from a mathematical point of view. The vector classes are representations of vector spaces:

- FieldVector represents a vector space where the field is represented by a numeric type (e.g. double, float, complex). is known at compile time.
- BlockVector represents a vector space where W is itself a vector space.
- VariableBlockVector represents a vector space having a two-level block structure of the form , i.e. it is constructed from vector spaces, .

The matrix classes represent linear maps from vector space to vector space the recursive block structure of the matrix rows and columns immediately follows from the recursive block structure of the vectors representing the domain and range of the mapping, respectively:

- FieldMatrix represents a linear map where and are vector spaces over the same field represented by a numerix type.
- BCRSMatrix represents a linear map where and where W is itself a vector space.
- VariableBCRSMatrix is not yet implemented.

## Typedef Documentation

## Col

template<class T, class A, int n, int m>

typedef Matrix::ColIterator Dune::EntryAccumulatorFather< T, A, n, m >::Col

## CreateIterator [1/3]

template<int transpose, class T, class TA, int n, int m>

typedef Matrix::CreateIterator Dune::MatrixInitializer< transpose, T, TA, n, m >::CreateIterator

## CreateIterator [2/3]

template<class T, class TA, int n, int m>

typedef Matrix::CreateIterator Dune::MatrixInitializer< 1, T, TA, n, m >::CreateIterator

## CreateIterator [3/3]

template<class T, class A, int n, int m>

typedef BCRSMatrix<FieldMatrix<T,n,m>,A>::CreateIterator Dune::SparsityPatternInitializer< T, A, n, m >::CreateIterator

## field_type [1/2]

template<typename... Args>

using Dune::FieldTraits< MultiTypeBlockVector< Args... > >::field_type = typename MultiTypeBlockVector<Args...>::field_type

## field_type [2/2]

template<typename... Args>

using Dune::MultiTypeBlockVector< Args >::field_type = Std::detected_t<std::common_type_t, typename FieldTraits< std::decay_t<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.

## Matrix [1/7]

template<class T, class A, int n, int m, int transpose>

typedef BCRSMatrix<FieldMatrix<T,n,m>,A> Dune::EntryAccumulator< T, A, n, m, transpose >::Matrix

## Matrix [2/7]

template<class T, class A, int n, int m>

typedef BCRSMatrix<FieldMatrix<T,n,m>,A> Dune::EntryAccumulator< T, A, n, m, 0 >::Matrix

## Matrix [3/7]

template<class T, class A, int n, int m>

typedef BCRSMatrix<FieldMatrix<T,n,m>,A> Dune::EntryAccumulator< T, A, n, m, 1 >::Matrix

## Matrix [4/7]

template<class T, class A, int n, int m>

typedef BCRSMatrix<FieldMatrix<T,n,m>,A> Dune::EntryAccumulator< T, A, n, m, 2 >::Matrix

## Matrix [5/7]

template<class T, class A, int n, int m>

typedef BCRSMatrix<FieldMatrix<T,n,m>,A> Dune::EntryAccumulatorFather< T, A, n, m >::Matrix

## Matrix [6/7]

template<int transpose, class T, class TA, int n, int m>

typedef Dune::BCRSMatrix<FieldMatrix<T,n,m>,TA> Dune::MatrixInitializer< transpose, T, TA, n, m >::Matrix

## Matrix [7/7]

template<class T, class TA, int n, int m>

typedef Dune::BCRSMatrix<Dune::FieldMatrix<T,n,m>,TA> Dune::MatrixInitializer< 1, T, TA, n, m >::Matrix

## real_type [1/2]

template<typename... Args>

using Dune::FieldTraits< MultiTypeBlockVector< Args... > >::real_type = typename MultiTypeBlockVector<Args...>::real_type

## real_type [2/2]

template<typename... Args>

using Dune::MultiTypeBlockVector< Args >::real_type = Std::detected_t<std::common_type_t, typename FieldTraits< std::decay_t<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.

## Row

template<class T, class A, int n, int m>

typedef Matrix::RowIterator Dune::EntryAccumulatorFather< T, A, n, m >::Row

## size_type [1/8]

template<class T, class A, int n, int m, int transpose>

typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, transpose >::size_type

## size_type [2/8]

template<class T, class A, int n, int m>

typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, 0 >::size_type

## size_type [3/8]

template<class T, class A, int n, int m>

typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, 1 >::size_type

## size_type [4/8]

template<class T, class A, int n, int m>

typedef Matrix::size_type Dune::EntryAccumulator< T, A, n, m, 2 >::size_type

## size_type [5/8]

template<int transpose, class T, class TA, int n, int m>

typedef Matrix::size_type Dune::MatrixInitializer< transpose, T, TA, n, m >::size_type

## size_type [6/8]

template<class T, class TA, int n, int m>

typedef Matrix::size_type Dune::MatrixInitializer< 1, T, TA, n, m >::size_type

## size_type [7/8]

template<typename... Args>

using Dune::MultiTypeBlockVector< Args >::size_type = std::size_t

Type used for vector sizes.

## size_type [8/8]

template<class T, class A, int n, int m>

typedef BCRSMatrix<FieldMatrix<T,n,m>,A>::size_type Dune::SparsityPatternInitializer< T, A, n, m >::size_type

## type [1/6]

template<typename T, typename A, typename A1, int n, int k, int m>

typedef BCRSMatrix<typename MatMultMatResult<FieldMatrix<T,n,k>,FieldMatrix<T,k,m> >::type, std::allocator<typename MatMultMatResult<FieldMatrix<T,n,k>,FieldMatrix<T,k,m> >::type> > Dune::MatMultMatResult< BCRSMatrix< FieldMatrix< T, n, k >, A >, BCRSMatrix< FieldMatrix< T, k, m >, A1 > >::type

## type [2/6]

template<typename T, int n, int k, int m>

typedef FieldMatrix<T,n,m> Dune::MatMultMatResult< FieldMatrix< T, n, k >, FieldMatrix< T, k, m > >::type

## type [3/6]

template<typename... Args>

typedef MultiTypeBlockVector<Args...> Dune::MultiTypeBlockVector< Args >::type

own class' type

## type [4/6]

template<typename T, typename A, typename A1, int n, int k, int m>

typedef BCRSMatrix<typename MatMultMatResult<FieldMatrix<T,n,k>,FieldMatrix<T,k,m> >::type, std::allocator<typename MatMultMatResult<FieldMatrix<T,n,k>,FieldMatrix<T,k,m> >::type> > Dune::TransposedMatMultMatResult< BCRSMatrix< FieldMatrix< T, k, n >, A >, BCRSMatrix< FieldMatrix< T, k, m >, A1 > >::type

## type [5/6]

template<typename T, int n, int k, int m>

typedef FieldMatrix<T,n,m> Dune::TransposedMatMultMatResult< FieldMatrix< T, k, n >, FieldMatrix< T, k, m > >::type

## type [6/6]

template<size_t i, typename... Args>

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

## Enumeration Type Documentation

## anonymous enum

template<class T, class A, int n, int m>

anonymous enum

Enumerator
do_break |

## anonymous enum

template<int transpose, class T, class TA, int n, int m>

anonymous enum

Enumerator
do_break |

## anonymous enum

template<class T, class TA, int n, int m>

anonymous enum

Enumerator
do_break |

## anonymous enum

template<class T, class A, int n, int m>

anonymous enum

Enumerator
do_break |

## Function Documentation

## axpy()

template<typename... Args>
template<typename Ta>

void Dune::MultiTypeBlockVector< Args >::axpy | ( | const Ta & | a,
|  | const type & | y )

inline

Axpy operation on this vector (*this += a * y).

Template Parameters

  Ta | Type of the scalar 'a'

## countNonZeros() [1/2]

template<class M>

auto Dune::countNonZeros | ( | const M & | ,
|  | typename std::enable_if_t< Dune::IsNumber< M >::value > * | sfinae = nullptr )

inline

Get the number of nonzero fields in the matrix.

This is not the number of nonzero blocks, but the number of non zero scalar entries (on blocklevel 1) if the matrix is viewed as a flat matrix.

For FieldMatrix this is simply the number of columns times the number of rows, for a BCRSMatrix<FieldMatrix<K,n,m>> this is the number of nonzero blocks time n*m.

## countNonZeros() [2/2]

template<class M>

auto Dune::countNonZeros | ( | const M & | matrix,
|  | typename std::enable_if_t<!Dune::IsNumber< M >::value > * | sfinae = nullptr )

inline

## dim()

template<typename... Args>

size_type Dune::MultiTypeBlockVector< Args >::dim | ( |  | ) | const

inline

Number of scalar elements.

## dot()

template<typename... Args>

field_type Dune::MultiTypeBlockVector< Args >::dot | ( | const type & | newv | ) | const

inline

## infinity_norm()

template<typename... Args>

real_type Dune::MultiTypeBlockVector< Args >::infinity_norm | ( |  | ) | const

inline

Compute the maximum norm.

## infinity_norm_real()

template<typename... Args>

real_type Dune::MultiTypeBlockVector< Args >::infinity_norm_real | ( |  | ) | const

inline

Compute the simplified maximum norm (uses 1-norm for complex values).

## matMultMat()

template<class T, class A, class A1, class A2, int n, int m, int k>

void Dune::matMultMat | ( | BCRSMatrix< FieldMatrix< T, n, m >, A > & | res,
|  | const BCRSMatrix< FieldMatrix< T, n, k >, A1 > & | mat,
|  | const BCRSMatrix< FieldMatrix< T, k, m >, A2 > & | matt,
|  | bool | = false )

Calculate product of two sparse matrices ( ).

Parameters

  res | Matrix for the result of the computation.
  mat | Matrix A.
  matt | Matrix B.
  tryHard | ignored

## matMultTransposeMat()

template<class T, class A, class A1, class A2, int n, int m, int k>

void Dune::matMultTransposeMat | ( | BCRSMatrix< FieldMatrix< T, n, k >, A > & | res,
|  | const BCRSMatrix< FieldMatrix< T, n, m >, A1 > & | mat,
|  | const BCRSMatrix< FieldMatrix< T, k, m >, A2 > & | matt,
|  | bool | = false )

Calculate product of a sparse matrix with a transposed sparse matrices ( ).

Parameters

  res | Matrix for the result of the computation.
  mat | Matrix A.
  matt | Matrix B, which will be transposed before the multiplication.
  tryHard | ignored

## N()

template<typename... Args>

constexpr size_type Dune::MultiTypeBlockVector< Args >::N | ( |  | ) |

inline static constexpr

Number of elements.

## one_norm()

template<typename... Args>

auto Dune::MultiTypeBlockVector< Args >::one_norm | ( |  | ) | const

inline

Compute the 1-norm.

## one_norm_real()

template<typename... Args>

auto Dune::MultiTypeBlockVector< Args >::one_norm_real | ( |  | ) | const

inline

Compute the simplified 1-norm (uses 1-norm also for complex values).

## operator*()

template<typename... Args>

field_type Dune::MultiTypeBlockVector< Args >::operator* | ( | const type & | newv | ) | const

inline

## operator*=()

template<typename... Args>
template<class T, std::enable_if_t< IsNumber< T >::value, int > = 0>

void Dune::MultiTypeBlockVector< Args >::operator*= | ( | const T & | w | ) |

inline

Multiplication with a scalar.

## operator+=()

template<typename... Args>

void Dune::MultiTypeBlockVector< Args >::operator+= | ( | const type & | newv | ) |

inline

operator for MultiTypeBlockVector += MultiTypeBlockVector operations

## operator-=()

template<typename... Args>

void Dune::MultiTypeBlockVector< Args >::operator-= | ( | const type & | newv | ) |

inline

operator for MultiTypeBlockVector -= MultiTypeBlockVector operations

## operator/=()

template<typename... Args>
template<class T, std::enable_if_t< IsNumber< T >::value, int > = 0>

void Dune::MultiTypeBlockVector< Args >::operator/= | ( | const T & | w | ) |

inline

Division by a scalar.

## operator<<()

template<typename... Args>

std::ostream & Dune::operator<< | ( | std::ostream & | s,
|  | const MultiTypeBlockVector< Args... > & | v )

Send MultiTypeBlockVector to an outstream.

## operator=()

template<typename... Args>
template<typename T>

void Dune::MultiTypeBlockVector< Args >::operator= | ( | const T & | newval | ) |

inline

Assignment operator.

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

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

std::tuple_element< index, TupleType >::type & Dune::MultiTypeBlockVector< Args >::operator[] | ( | const std::integral_constant< size_type, index > | indexVariable | ) |

inline

Random-access operator.

This method mimics the behavior of normal vector access with square brackets like, e.g., v[5] = 1. 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 entry of a MultiTypeBlockVector named v write

MultiTypeBlockVector<A,B,C,D> v;
std::integral_constant<std::size_t,0> _0;
v[_0] = ...
Dune::MultiTypeBlockVector
A Vector class to support different block types.
Definition multitypeblockvector.hh:59

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 writee

MultiTypeBlockVector<A,B,C,D> v;
v[std::integral_constant<std::size_t,0>()] = ...

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

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

const std::tuple_element< index, TupleType >::type & Dune::MultiTypeBlockVector< Args >::operator[] | ( | const std::integral_constant< size_type, index > | indexVariable | ) | const

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.

## size()

template<typename... Args>

constexpr size_type Dune::MultiTypeBlockVector< Args >::size | ( |  | ) |

inline static constexpr

Return the number of non-zero vector entries.

As this is a dense vector data structure, all entries are non-zero, and hence 'size' returns the same number as 'N'.

## transposeMatMultMat()

template<class T, class A, class A1, class A2, int n, int m, int k>

void Dune::transposeMatMultMat | ( | BCRSMatrix< FieldMatrix< T, n, m >, A > & | res,
|  | const BCRSMatrix< FieldMatrix< T, k, n >, A1 > & | mat,
|  | const BCRSMatrix< FieldMatrix< T, k, m >, A2 > & | matt,
|  | bool | = false )

Calculate product of a transposed sparse matrix with another sparse matrices ( ).

Parameters

  res | Matrix for the result of the computation.
  mat | Matrix A, which will be transposed before the multiplication.
  matt | Matrix B.
  tryHard | ignored

## two_norm()

template<typename... Args>

real_type Dune::MultiTypeBlockVector< Args >::two_norm | ( |  | ) | const

inline

Compute the Euclidean norm.

## two_norm2()

template<typename... Args>

real_type Dune::MultiTypeBlockVector< Args >::two_norm2 | ( |  | ) | const

inline

Compute the squared Euclidean norm.

## Variable Documentation

## col

template<class T, class A, int n, int m>

Col Dune::EntryAccumulatorFather< T, A, n, m >::col

protected

## mat

template<class T, class A, int n, int m>

Matrix& Dune::EntryAccumulatorFather< T, A, n, m >::mat

protected