Dune Core Modules (2.4.2)

Dense Matrix and Vector Template Library

Type traits to retrieve the field and the real type of classes. More...

Files

file  densematrix.hh
 Implements a matrix constructed from a given type representing a field and a compile-time given number of rows and columns.
 
file  densevector.hh
 Implements the dense vector interface, with an exchangeable storage class.
 
file  dynmatrix.hh
 This file implements a dense matrix with dynamic numbers of rows and columns.
 
file  dynvector.hh
 This file implements a dense vector with a dynamic size.
 
file  fmatrix.hh
 Implements a matrix constructed from a given type representing a field and compile-time given number of rows and columns.
 
file  fvector.hh
 Implements a vector constructed from a given type representing a field and a compile-time given size.
 
file  identitymatrix.hh
 Implementation of an identity matrix that does not store any data.
 

Namespaces

namespace  Dune
 Dune namespace.
 

Classes

struct  Dune::DenseMatrixAssigner< DenseMatrix, RHS >
 you have to specialize this structure for any type that should be assignable to a DenseMatrix More...
 
class  Dune::FMatrixError
 Error thrown if operations of a FieldMatrix fail. More...
 
class  Dune::DenseMatrix< MAT >
 A dense n x m matrix. More...
 
class  Dune::DenseIterator< C, T, R >
 Generic iterator class for dense vector and matrix implementations. More...
 
class  Dune::DenseVector< V >
 Interface for a class of dense vectors over a given field. More...
 
class  Dune::DiagonalMatrix< K, n >
 A diagonal matrix of static size. More...
 
class  Dune::ContainerWrapperIterator< CW, T, R >
 Iterator class for sparse vector-like containers. More...
 
class  Dune::DynamicMatrix< K >
 Construct a matrix with a dynamic size. More...
 
class  Dune::DynamicVector< K, Allocator >
 Construct a vector with a dynamic size. More...
 
class  Dune::FieldMatrix< K, ROWS, COLS >
 A dense n x m matrix. More...
 
class  Dune::FieldVector< K, SIZE >
 vector space out of a tensor product of fields. More...
 
struct  Dune::IsFieldVectorSizeCorrect< C, SIZE >
 TMP to check the size of a DenseVectors statically, if possible. More...
 
class  Dune::FMatrixPrecision< ctype >
 Precisions for calculations with FieldMatrix and FieldVector. More...
 
class  Dune::IdentityMatrix< K, N >
 Read-only identity matrix. More...
 

Typedefs

typedef K Dune::DiagonalMatrix< K, n >::value_type
 export the type representing the field
 
typedef K Dune::DiagonalMatrix< K, n >::block_type
 export the type representing the components
 
typedef std::size_t Dune::DiagonalMatrix< K, n >::size_type
 The type used for the index access and size operations.
 
typedef DiagonalRowVector< K, n > Dune::DiagonalMatrix< K, n >::row_type
 Each row is implemented by a field vector.
 
typedef ContainerWrapperIterator< const WrapperType, reference, reference > Dune::DiagonalMatrix< K, n >::Iterator
 Iterator class for sequential access.
 
typedef Iterator Dune::DiagonalMatrix< K, n >::iterator
 typedef for stl compliant access
 
typedef Iterator Dune::DiagonalMatrix< K, n >::RowIterator
 rename the iterators for easier access
 
typedef row_type::Iterator Dune::DiagonalMatrix< K, n >::ColIterator
 rename the iterators for easier access
 
typedef ContainerWrapperIterator< const WrapperType, const_reference, const_reference > Dune::DiagonalMatrix< K, n >::ConstIterator
 Iterator class for sequential access.
 
typedef ConstIterator Dune::DiagonalMatrix< K, n >::const_iterator
 typedef for stl compliant access
 
typedef ConstIterator Dune::DiagonalMatrix< K, n >::ConstRowIterator
 rename the iterators for easier access
 
typedef const_row_type::ConstIterator Dune::DiagonalMatrix< K, n >::ConstColIterator
 rename the iterators for easier access
 
typedef K Dune::DiagonalRowVectorConst< K, n >::field_type
 export the type representing the field
 
typedef K Dune::DiagonalRowVectorConst< K, n >::block_type
 export the type representing the components
 
typedef std::size_t Dune::DiagonalRowVectorConst< K, n >::size_type
 The type used for the index access and size operation.
 
typedef ContainerWrapperIterator< DiagonalRowVectorConst< K, n >, const K, const K & > Dune::DiagonalRowVectorConst< K, n >::ConstIterator
 ConstIterator class for sequential access.
 
typedef ConstIterator Dune::DiagonalRowVectorConst< K, n >::const_iterator
 typedef for stl compliant access
 
typedef K Dune::DiagonalRowVector< K, n >::field_type
 export the type representing the field
 
typedef K Dune::DiagonalRowVector< K, n >::block_type
 export the type representing the components
 
typedef std::size_t Dune::DiagonalRowVector< K, n >::size_type
 The type used for the index access and size operation.
 
typedef ContainerWrapperIterator< DiagonalRowVector< K, n >, K, K & > Dune::DiagonalRowVector< K, n >::Iterator
 Iterator class for sequential access.
 
typedef Iterator Dune::DiagonalRowVector< K, n >::iterator
 typedef for stl compliant access
 
typedef ContainerWrapperIterator< DiagonalRowVectorConst< K, n >, const K, const K & > Dune::DiagonalRowVector< K, n >::ConstIterator
 ConstIterator class for sequential access.
 
typedef ConstIterator Dune::DiagonalRowVector< K, n >::const_iterator
 typedef for stl compliant access
 

Enumerations

enum  { Dune::DiagonalMatrix< K, n >::blocklevel = 1 }
 We are at the leaf of the block recursion. More...
 
enum  { Dune::DiagonalMatrix< K, n >::rows = n , Dune::DiagonalMatrix< K, n >::cols = n }
 export size More...
 
enum  { Dune::DiagonalRowVectorConst< K, n >::blocklevel = 1 }
 We are at the leaf of the block recursion. More...
 
enum  { Dune::DiagonalRowVectorConst< K, n >::size = n }
 export size More...
 

Functions

template<typename MAT >
std::ostream & Dune::operator<< (std::ostream &s, const DenseMatrix< MAT > &a)
 Sends the matrix to an output stream.
 
 Dune::DiagonalMatrix< K, n >::DiagonalMatrix ()
 Default constructor.
 
 Dune::DiagonalMatrix< K, n >::DiagonalMatrix (const K &k)
 Constructor initializing the whole matrix with a scalar.
 
 Dune::DiagonalMatrix< K, n >::DiagonalMatrix (const FieldVector< K, n > &diag)
 Constructor initializing the diagonal with a vector.
 
 Dune::DiagonalMatrix< K, n >::DiagonalMatrix (std::initializer_list< K > const &l)
 Construct diagonal matrix from an initializer list. More...
 
DiagonalMatrixDune::DiagonalMatrix< K, n >::operator= (const K &k)
 Assignment from a scalar.
 
bool Dune::DiagonalMatrix< K, n >::identical (const DiagonalMatrix< K, n > &other) const
 Check if matrix is the same object as the other matrix.
 
Iterator Dune::DiagonalMatrix< K, n >::begin ()
 begin iterator
 
Iterator Dune::DiagonalMatrix< K, n >::end ()
 end iterator
 
Iterator Dune::DiagonalMatrix< K, n >::beforeEnd ()
 
Iterator Dune::DiagonalMatrix< K, n >::beforeBegin ()
 
ConstIterator Dune::DiagonalMatrix< K, n >::begin () const
 begin iterator
 
ConstIterator Dune::DiagonalMatrix< K, n >::end () const
 end iterator
 
ConstIterator Dune::DiagonalMatrix< K, n >::beforeEnd () const
 
ConstIterator Dune::DiagonalMatrix< K, n >::beforeBegin () const
 
DiagonalMatrixDune::DiagonalMatrix< K, n >::operator+= (const DiagonalMatrix &y)
 vector space addition
 
DiagonalMatrixDune::DiagonalMatrix< K, n >::operator-= (const DiagonalMatrix &y)
 vector space subtraction
 
DiagonalMatrixDune::DiagonalMatrix< K, n >::operator+= (const K &k)
 vector space multiplication with scalar
 
DiagonalMatrixDune::DiagonalMatrix< K, n >::operator-= (const K &k)
 vector space division by scalar
 
DiagonalMatrixDune::DiagonalMatrix< K, n >::operator*= (const K &k)
 vector space multiplication with scalar
 
DiagonalMatrixDune::DiagonalMatrix< K, n >::operator/= (const K &k)
 vector space division by scalar
 
bool Dune::DiagonalMatrix< K, n >::operator== (const DiagonalMatrix &other) const
 comparison operator
 
bool Dune::DiagonalMatrix< K, n >::operator!= (const DiagonalMatrix &other) const
 incomparison operator
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::mv (const X &x, Y &y) const
 y = A x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::mtv (const X &x, Y &y) const
 y = A^T x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::umv (const X &x, Y &y) const
 y += A x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::umtv (const X &x, Y &y) const
 y += A^T x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::umhv (const X &x, Y &y) const
 y += A^H x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::mmv (const X &x, Y &y) const
 y -= A x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::mmtv (const X &x, Y &y) const
 y -= A^T x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::mmhv (const X &x, Y &y) const
 y -= A^H x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::usmv (const K &alpha, const X &x, Y &y) const
 y += alpha A x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::usmtv (const K &alpha, const X &x, Y &y) const
 y += alpha A^T x
 
template<class X , class Y >
void Dune::DiagonalMatrix< K, n >::usmhv (const K &alpha, const X &x, Y &y) const
 y += alpha A^H x
 
double Dune::DiagonalMatrix< K, n >::frobenius_norm () const
 frobenius norm: sqrt(sum over squared values of entries)
 
double Dune::DiagonalMatrix< K, n >::frobenius_norm2 () const
 square of frobenius norm, need for block recursion
 
double Dune::DiagonalMatrix< K, n >::infinity_norm () const
 infinity norm (row sum norm, how to generalize for blocks?)
 
double Dune::DiagonalMatrix< K, n >::infinity_norm_real () const
 simplified infinity norm (uses Manhattan norm for complex values)
 
template<class V >
void Dune::DiagonalMatrix< K, n >::solve (V &x, const V &b) const
 Solve system A x = b.
 
void Dune::DiagonalMatrix< K, n >::invert ()
 Compute inverse.
 
Dune::DiagonalMatrix< K, n >::determinant () const
 calculates the determinant of this matrix
 
size_type Dune::DiagonalMatrix< K, n >::N () const
 number of blocks in row direction
 
size_type Dune::DiagonalMatrix< K, n >::M () const
 number of blocks in column direction
 
bool Dune::DiagonalMatrix< K, n >::exists (size_type i, size_type j) const
 return true when (i,j) is in pattern
 
reference Dune::DiagonalMatrix< K, n >::operator[] (size_type i)
 Return reference object as row replacement.
 
const_reference Dune::DiagonalMatrix< K, n >::operator[] (size_type i) const
 Return const_reference object as row replacement.
 
const K & Dune::DiagonalMatrix< K, n >::diagonal (size_type i) const
 Get const reference to diagonal entry.
 
K & Dune::DiagonalMatrix< K, n >::diagonal (size_type i)
 Get reference to diagonal entry.
 
const FieldVector< K, n > & Dune::DiagonalMatrix< K, n >::diagonal () const
 Get const reference to diagonal vector.
 
FieldVector< K, n > & Dune::DiagonalMatrix< K, n >::diagonal ()
 Get reference to diagonal vector.
 
 Dune::DiagonalRowVectorConst< K, n >::DiagonalRowVectorConst ()
 Constructor making uninitialized vector.
 
 Dune::DiagonalRowVectorConst< K, n >::DiagonalRowVectorConst (K *p, int col)
 Constructor making vector with identical coordinates.
 
const K & Dune::DiagonalRowVectorConst< K, n >::operator[] (size_type i) const
 same for read only access
 
ConstIterator Dune::DiagonalRowVectorConst< K, n >::begin () const
 begin ConstIterator
 
ConstIterator Dune::DiagonalRowVectorConst< K, n >::end () const
 end ConstIterator
 
ConstIterator Dune::DiagonalRowVectorConst< K, n >::beforeEnd () const
 
ConstIterator Dune::DiagonalRowVectorConst< K, n >::beforeBegin () const
 
bool Dune::DiagonalRowVectorConst< K, n >::operator== (const DiagonalRowVectorConst &y) const
 Binary vector comparison.
 
size_type Dune::DiagonalRowVectorConst< K, n >::N () const
 number of blocks in the vector (are of size 1 here)
 
size_type Dune::DiagonalRowVectorConst< K, n >::dim () const
 dimension of the vector space
 
size_type Dune::DiagonalRowVectorConst< K, n >::rowIndex () const
 index of this row in surrounding matrix
 
const K & Dune::DiagonalRowVectorConst< K, n >::diagonal () const
 the diagonal value
 
 Dune::DiagonalRowVector< K, n >::DiagonalRowVector ()
 Constructor making uninitialized vector.
 
 Dune::DiagonalRowVector< K, n >::DiagonalRowVector (K *p, int col)
 Constructor making vector with identical coordinates.
 
DiagonalRowVector & Dune::DiagonalRowVector< K, n >::operator= (const K &k)
 Assignment operator for scalar.
 
K & Dune::DiagonalRowVector< K, n >::operator[] (size_type i)
 random access
 
Iterator Dune::DiagonalRowVector< K, n >::begin ()
 begin iterator
 
Iterator Dune::DiagonalRowVector< K, n >::end ()
 end iterator
 
Iterator Dune::DiagonalRowVector< K, n >::beforeEnd ()
 
Iterator Dune::DiagonalRowVector< K, n >::beforeBegin ()
 
template<typename V >
std::ostream & operator<< (std::ostream &s, const DenseVector< V > &v)
 Write a DenseVector to an output stream. More...
 
template<class K , class Allocator >
std::istream & operator>> (std::istream &in, DynamicVector< K, Allocator > &v)
 Read a DynamicVector from an input stream. More...
 
template<class K , int SIZE>
std::istream & operator>> (std::istream &in, FieldVector< K, SIZE > &v)
 Read a FieldVector from an input stream. More...
 

Detailed Description

Type traits to retrieve the field and the real type of classes.

Type Traits to retrieve types associated with an implementation of Dune::DenseVector or Dune::DenseMatrix.

Type traits to retrieve the field and the real type of classes e.g. that of FieldVector or FieldMatrix

you have to specialize this class for every implementation of DenseVector or DenseMatrix.

typedef ... derived_type;
typedef ... value_type;
typedef ... size_type;

Enumeration Type Documentation

◆ anonymous enum

template<class K , int n>
anonymous enum

We are at the leaf of the block recursion.

Enumerator
blocklevel 

The number of block levels we contain. This is 1.

◆ anonymous enum

template<class K , int n>
anonymous enum

export size

Enumerator
rows 

The number of rows.

cols 

The number of columns.

◆ anonymous enum

template<class K , int n>
anonymous enum

We are at the leaf of the block recursion.

Enumerator
blocklevel 

The number of block levels we contain.

◆ anonymous enum

template<class K , int n>
anonymous enum

export size

Enumerator
size 

The size of this vector.

Function Documentation

◆ beforeBegin() [1/4]

template<class K , int n>
Iterator Dune::DiagonalMatrix< K, n >::beforeBegin ( )
inline
Returns
an iterator that is positioned before the first row of the matrix.

◆ beforeBegin() [2/4]

template<class K , int n>
Iterator Dune::DiagonalRowVector< K, n >::beforeBegin ( )
inline
Returns
an iterator that is positioned before the first row of the matrix.

◆ beforeBegin() [3/4]

template<class K , int n>
ConstIterator Dune::DiagonalMatrix< K, n >::beforeBegin ( ) const
inline
Returns
an iterator that is positioned before the first row of the matrix.

◆ beforeBegin() [4/4]

template<class K , int n>
ConstIterator Dune::DiagonalRowVectorConst< K, n >::beforeBegin ( ) const
inline
Returns
an iterator that is positioned before the first row of the matrix.

◆ beforeEnd() [1/4]

template<class K , int n>
Iterator Dune::DiagonalMatrix< K, n >::beforeEnd ( )
inline
Returns
an iterator that is positioned before the end iterator of the rows, i.e. at the last row.

◆ beforeEnd() [2/4]

template<class K , int n>
Iterator Dune::DiagonalRowVector< K, n >::beforeEnd ( )
inline
Returns
an iterator that is positioned before the end iterator of the rows, i.e. at the last row.

◆ beforeEnd() [3/4]

template<class K , int n>
ConstIterator Dune::DiagonalMatrix< K, n >::beforeEnd ( ) const
inline
Returns
an iterator that is positioned before the end iterator of the rows. i.e. at the last row.

◆ beforeEnd() [4/4]

template<class K , int n>
ConstIterator Dune::DiagonalRowVectorConst< K, n >::beforeEnd ( ) const
inline
Returns
an iterator that is positioned before the end iterator of the rows. i.e. at the row.

◆ DiagonalMatrix()

template<class K , int n>
Dune::DiagonalMatrix< K, n >::DiagonalMatrix ( std::initializer_list< K > const &  l)
inline

Construct diagonal matrix from an initializer list.

The elements of the list are copied into the diagonal elements of the matrix. If the initializer list is shorter than the matrix diagonal (which has n elements), the remaining matrix diagonal elements are left uninitialized. If the initializer list is longer, than only the first n elements will be copied into the matrix diagonal.

References Dune::DenseVector< V >::begin(), and Dune::DiagonalMatrix< K, n >::rows.

◆ operator<<()

template<typename V >
std::ostream & operator<< ( std::ostream &  s,
const DenseVector< V > &  v 
)
related

Write a DenseVector to an output stream.

Parameters
[in]sstd :: ostream to write to
[in]vDenseVector to write
Returns
the output stream (s)

References Dune::DenseVector< V >::size().

◆ operator>>() [1/2]

template<class K , class Allocator >
std::istream & operator>> ( std::istream &  in,
DynamicVector< K, Allocator > &  v 
)
related

Read a DynamicVector from an input stream.

Note
This operator is STL compilant, i.e., the content of v is only changed if the read operation is successful.
Parameters
[in]instd :: istream to read from
[out]vDynamicVector to be read
Returns
the input stream (in)

References Dune::DenseVector< V >::size().

◆ operator>>() [2/2]

template<class K , int SIZE>
std::istream & operator>> ( std::istream &  in,
FieldVector< K, SIZE > &  v 
)
related

Read a FieldVector from an input stream.

Note
This operator is STL compliant, i.e., the content of v is only changed if the read operation is successful.
Parameters
[in]instd :: istream to read from
[out]vFieldVector to be read
Returns
the input stream (in)
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 10, 23:30, 2024)