|
dune-istl
2.2.1
|
A block-tridiagonal matrix. More...
#include <dune/istl/btdmatrix.hh>
Public Types | |
| enum | { blocklevel = B::blocklevel+1 } |
| increment block level counter More... | |
| typedef B::field_type | field_type |
| export the type representing the field More... | |
| typedef B | block_type |
| export the type representing the components More... | |
| typedef A | allocator_type |
| export the allocator type More... | |
| typedef A::size_type | size_type |
| implement row_type with compressed vector More... | |
| enum | { blocklevel = B::blocklevel+1 } |
| increment block level counter More... | |
| enum | BuildMode { row_wise, random, unknown } |
| we support two modes More... | |
| typedef CompressedBlockVectorWindow< B, A > | row_type |
| implement row_type with compressed vector More... | |
| typedef RealRowIterator< row_type > | iterator |
| The iterator over the (mutable matrix rows. More... | |
| typedef RealRowIterator< row_type > | Iterator |
| typedef Iterator | RowIterator |
| rename the iterators for easier access More... | |
| typedef row_type::Iterator | ColIterator |
| Iterator for the entries of each row. More... | |
| typedef RealRowIterator< const row_type > | const_iterator |
| The const iterator over the matrix rows. More... | |
| typedef RealRowIterator< const row_type > | ConstIterator |
| typedef ConstIterator | ConstRowIterator |
| rename the const row iterator for easier access More... | |
| typedef row_type::ConstIterator | ConstColIterator |
| Const iterator to the entries of a row. More... | |
Public Member Functions | |
| BTDMatrix () | |
| Default constructor. More... | |
| BTDMatrix (int size) | |
| BTDMatrix & | operator= (const BTDMatrix &other) |
| assignment More... | |
| BTDMatrix & | operator= (const field_type &k) |
| assignment from scalar More... | |
| template<class V > | |
| void | solve (V &x, const V &rhs) const |
| Use the Thomas algorithm to solve the system Ax=b in O(n) time. More... | |
| row_type & | operator[] (size_type i) |
| random access to the rows More... | |
| const row_type & | operator[] (size_type i) const |
| same for read only access More... | |
| Iterator | begin () |
| Get iterator to first row. More... | |
| ConstIterator | begin () const |
| Get const iterator to first row. More... | |
| Iterator | end () |
| Get iterator to one beyond last row. More... | |
| ConstIterator | end () const |
| Get const iterator to one beyond last row. More... | |
| Iterator | beforeEnd () |
| ConstIterator | beforeEnd () const |
| Iterator | beforeBegin () |
| ConstIterator | beforeBegin () const |
| void | setBuildMode (BuildMode bm) |
| Sets the build mode of the matrix. More... | |
| void | setSize (size_type rows, size_type columns, size_type nnz=0) |
| Set the size of the matrix. More... | |
| CreateIterator | createbegin () |
| get initial create iterator More... | |
| CreateIterator | createend () |
| get create iterator pointing to one after the last block More... | |
| size_type | getrowsize (size_type i) const |
| get current number of indices in row i More... | |
| void | incrementrowsize (size_type i, size_type s=1) |
| increment size of row i by s (1 by default) More... | |
| BCRSMatrix & | operator*= (const field_type &k) |
| vector space multiplication with scalar More... | |
| BCRSMatrix & | operator/= (const field_type &k) |
| vector space division by scalar More... | |
| BCRSMatrix & | operator+= (const BCRSMatrix &b) |
| Add the entries of another matrix to this one. More... | |
| BCRSMatrix & | operator-= (const BCRSMatrix &b) |
| Substract the entries of another matrix to this one. More... | |
| BCRSMatrix & | axpy (field_type alpha, const BCRSMatrix &b) |
| Add the scaled entries of another matrix to this one. More... | |
| template<class X , class Y > | |
| void | mv (const X &x, Y &y) const |
| y = A x More... | |
| template<class X , class Y > | |
| void | umv (const X &x, Y &y) const |
| y += A x More... | |
| template<class X , class Y > | |
| void | mmv (const X &x, Y &y) const |
| y -= A x More... | |
| template<class X , class Y > | |
| void | usmv (const field_type &alpha, const X &x, Y &y) const |
| y += alpha A x More... | |
| template<class X , class Y > | |
| void | mtv (const X &x, Y &y) const |
| y = A^T x More... | |
| template<class X , class Y > | |
| void | umtv (const X &x, Y &y) const |
| y += A^T x More... | |
| template<class X , class Y > | |
| void | mmtv (const X &x, Y &y) const |
| y -= A^T x More... | |
| template<class X , class Y > | |
| void | usmtv (const field_type &alpha, const X &x, Y &y) const |
| y += alpha A^T x More... | |
| template<class X , class Y > | |
| void | umhv (const X &x, Y &y) const |
| y += A^H x More... | |
| template<class X , class Y > | |
| void | mmhv (const X &x, Y &y) const |
| y -= A^H x More... | |
| template<class X , class Y > | |
| void | usmhv (const field_type &alpha, const X &x, Y &y) const |
| y += alpha A^H x More... | |
| double | frobenius_norm2 () const |
| square of frobenius norm, need for block recursion More... | |
| double | frobenius_norm () const |
| frobenius norm: sqrt(sum over squared values of entries) More... | |
| double | infinity_norm () const |
| infinity norm (row sum norm, how to generalize for blocks?) More... | |
| double | infinity_norm_real () const |
| simplified infinity norm (uses Manhattan norm for complex values) More... | |
| size_type | N () const |
| number of rows (counted in blocks) More... | |
| size_type | M () const |
| number of columns (counted in blocks) More... | |
| size_type | nonzeroes () const |
| number of blocks that are stored (the number of blocks that possibly are nonzero) More... | |
| bool | exists (size_type i, size_type j) const |
| return true if (i,j) is in pattern More... | |
A block-tridiagonal matrix.
| typedef A Dune::BTDMatrix< B, A >::allocator_type |
export the allocator type
| typedef B Dune::BTDMatrix< B, A >::block_type |
export the type representing the components
|
inherited |
Iterator for the entries of each row.
|
inherited |
The const iterator over the matrix rows.
|
inherited |
Const iterator to the entries of a row.
|
inherited |
|
inherited |
rename the const row iterator for easier access
| typedef B::field_type Dune::BTDMatrix< B, A >::field_type |
export the type representing the field
|
inherited |
The iterator over the (mutable matrix rows.
|
inherited |
|
inherited |
implement row_type with compressed vector
|
inherited |
rename the iterators for easier access
| typedef A::size_type Dune::BTDMatrix< B, A >::size_type |
implement row_type with compressed vector
The type for the index access and the size
|
inherited |
| anonymous enum |
|
inherited |
we support two modes
|
inline |
Default constructor.
|
inlineexplicit |
|
inlineinherited |
Add the scaled entries of another matrix to this one.
Matrix axpy operation: *this += alpha * b
| alpha | Scaling factor. |
| b | The matrix to add to this one. Its sparsity pattern has to be subset of the sparsity pattern of this matrix. |
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get iterator to first row.
Referenced by Dune::BCRSMatrix< B, A >::axpy(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim(), Dune::BCRSMatrix< B, A >::endindices(), Dune::BCRSMatrix< B, A >::endrowsizes(), Dune::BCRSMatrix< B, A >::frobenius_norm2(), Dune::BCRSMatrix< B, A >::infinity_norm(), Dune::BCRSMatrix< B, A >::infinity_norm_real(), Dune::BCRSMatrix< B, A >::mmhv(), Dune::BCRSMatrix< B, A >::mmtv(), Dune::BCRSMatrix< B, A >::mmv(), Dune::BCRSMatrix< B, A >::mv(), Dune::BCRSMatrix< B, A >::operator*=(), Dune::BCRSMatrix< B, A >::operator+=(), Dune::BCRSMatrix< B, A >::operator-=(), Dune::BCRSMatrix< B, A >::operator/=(), test_IO(), test_Iter(), Dune::BCRSMatrix< B, A >::umhv(), Dune::BCRSMatrix< B, A >::umtv(), Dune::BCRSMatrix< B, A >::umv(), Dune::BCRSMatrix< B, A >::usmhv(), Dune::BCRSMatrix< B, A >::usmtv(), and Dune::BCRSMatrix< B, A >::usmv().
|
inlineinherited |
Get const iterator to first row.
|
inlineinherited |
get initial create iterator
References Dune::BCRSMatrix< B, A >::CreateIterator.
Referenced by test_IO(), and test_Iter().
|
inlineinherited |
get create iterator pointing to one after the last block
References Dune::BCRSMatrix< B, A >::CreateIterator.
Referenced by test_IO(), and test_Iter().
|
inlineinherited |
Get iterator to one beyond last row.
Referenced by Dune::BCRSMatrix< B, A >::addindex(), Dune::BCRSMatrix< B, A >::axpy(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim(), Dune::BCRSMatrix< B, A >::endindices(), Dune::BCRSMatrix< B, A >::exists(), Dune::BCRSMatrix< B, A >::frobenius_norm2(), Dune::BCRSMatrix< B, A >::infinity_norm(), Dune::BCRSMatrix< B, A >::infinity_norm_real(), Dune::BCRSMatrix< B, A >::mmhv(), Dune::BCRSMatrix< B, A >::mmtv(), Dune::BCRSMatrix< B, A >::mmv(), Dune::BCRSMatrix< B, A >::mv(), Dune::BCRSMatrix< B, A >::operator*=(), Dune::BCRSMatrix< B, A >::operator+=(), Dune::BCRSMatrix< B, A >::operator-=(), Dune::BCRSMatrix< B, A >::operator/=(), Dune::DynamicMatrixSubdomainSolver< BCRSMatrix< FieldMatrix< K, n, n >, Al >, X, Y >::setSubMatrix(), test_IO(), test_Iter(), Dune::BCRSMatrix< B, A >::umhv(), Dune::BCRSMatrix< B, A >::umtv(), Dune::BCRSMatrix< B, A >::umv(), Dune::BCRSMatrix< B, A >::usmhv(), Dune::BCRSMatrix< B, A >::usmtv(), and Dune::BCRSMatrix< B, A >::usmv().
|
inlineinherited |
Get const iterator to one beyond last row.
|
inlineinherited |
return true if (i,j) is in pattern
References Dune::BCRSMatrix< B, A >::end().
|
inlineinherited |
frobenius norm: sqrt(sum over squared values of entries)
References Dune::BCRSMatrix< B, A >::frobenius_norm2().
|
inlineinherited |
square of frobenius norm, need for block recursion
References Dune::BCRSMatrix< B, A >::begin(), and Dune::BCRSMatrix< B, A >::end().
Referenced by Dune::BCRSMatrix< B, A >::frobenius_norm().
|
inlineinherited |
get current number of indices in row i
References Dune::CompressedBlockVectorWindow< B, A >::getsize().
|
inlineinherited |
increment size of row i by s (1 by default)
References Dune::BCRSMatrix< B, A >::random, and Dune::CompressedBlockVectorWindow< B, A >::setsize().
|
inlineinherited |
infinity norm (row sum norm, how to generalize for blocks?)
References Dune::BCRSMatrix< B, A >::begin(), and Dune::BCRSMatrix< B, A >::end().
|
inlineinherited |
simplified infinity norm (uses Manhattan norm for complex values)
References Dune::BCRSMatrix< B, A >::begin(), and Dune::BCRSMatrix< B, A >::end().
|
inlineinherited |
number of columns (counted in blocks)
Referenced by Dune::BCRSMatrix< B, A >::axpy(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim(), Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::coldim(), Dune::BCRSMatrix< B, A >::mmhv(), Dune::BCRSMatrix< B, A >::mmtv(), Dune::BCRSMatrix< B, A >::mmv(), Dune::BCRSMatrix< B, A >::mtv(), Dune::BCRSMatrix< B, A >::mv(), Dune::BCRSMatrix< B, A >::operator+=(), Dune::BCRSMatrix< B, A >::operator-=(), Dune::BCRSMatrix< B, A >::umhv(), Dune::BCRSMatrix< B, A >::umtv(), Dune::BCRSMatrix< B, A >::umv(), Dune::BCRSMatrix< B, A >::usmhv(), Dune::BCRSMatrix< B, A >::usmtv(), and Dune::BCRSMatrix< B, A >::usmv().
|
inlineinherited |
y -= A^H x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
y -= A^T x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
y -= A x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
Referenced by test_Iter().
|
inlineinherited |
y = A^T x
References Dune::BCRSMatrix< B, A >::M(), Dune::BCRSMatrix< B, A >::N(), and Dune::BCRSMatrix< B, A >::umtv().
|
inlineinherited |
|
inlineinherited |
number of rows (counted in blocks)
Referenced by Dune::BCRSMatrix< B, A >::axpy(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::coldim(), Dune::BDMatrix< B, A >::invert(), Dune::BCRSMatrix< B, A >::mmhv(), Dune::BCRSMatrix< B, A >::mmtv(), Dune::BCRSMatrix< B, A >::mmv(), Dune::BCRSMatrix< B, A >::mtv(), Dune::BCRSMatrix< B, A >::mv(), Dune::BCRSMatrix< B, A >::operator+=(), Dune::BCRSMatrix< B, A >::operator-=(), Dune::MatrixDimension< BCRSMatrix< B, TA > >::rowdim(), Dune::MatrixDimension< BCRSMatrix< FieldMatrix< B, n, m >, TA > >::rowdim(), Dune::BTDMatrix< B, A >::solve(), Dune::BCRSMatrix< B, A >::umhv(), Dune::BCRSMatrix< B, A >::umtv(), Dune::BCRSMatrix< B, A >::umv(), Dune::BCRSMatrix< B, A >::usmhv(), Dune::BCRSMatrix< B, A >::usmtv(), and Dune::BCRSMatrix< B, A >::usmv().
|
inlineinherited |
number of blocks that are stored (the number of blocks that possibly are nonzero)
|
inlineinherited |
vector space multiplication with scalar
References Dune::BCRSMatrix< B, A >::begin(), and Dune::BCRSMatrix< B, A >::end().
|
inlineinherited |
Add the entries of another matrix to this one.
| b | The matrix to add to this one. Its sparsity pattern has to be subset of the sparsity pattern of this matrix. |
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
Substract the entries of another matrix to this one.
| b | The matrix to add to this one. Its sparsity pattern has to be subset of the sparsity pattern of this matrix. |
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
vector space division by scalar
References Dune::BCRSMatrix< B, A >::begin(), and Dune::BCRSMatrix< B, A >::end().
|
inline |
assignment
References Dune::BCRSMatrix< B, A >::operator=().
|
inline |
assignment from scalar
References Dune::BCRSMatrix< B, A >::operator=().
|
inlineinherited |
random access to the rows
|
inlineinherited |
same for read only access
|
inlineinherited |
Sets the build mode of the matrix.
| bm | The build mode to use. |
|
inlineinherited |
Set the size of the matrix.
Sets the number of rows and columns of the matrix and allocates the memory needed for the storage of the matrix entries.
| rows | The number of rows the matrix should contain. |
| columns | the number of columns the matrix should contain. |
| nnz | The number of nonzero entries the matrix should hold (if omitted defaults to 0). |
|
inline |
Use the Thomas algorithm to solve the system Ax=b in O(n) time.
| ISTLError | if the matrix is singular |
References Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
y += A^H x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
y += A^T x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
Referenced by Dune::BCRSMatrix< B, A >::mtv().
|
inlineinherited |
y += A x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
Referenced by test_Iter().
|
inlineinherited |
y += alpha A^H x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
y += alpha A^T x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
|
inlineinherited |
y += alpha A x
References Dune::BCRSMatrix< B, A >::begin(), Dune::BCRSMatrix< B, A >::end(), Dune::BCRSMatrix< B, A >::M(), and Dune::BCRSMatrix< B, A >::N().
1.8.3.1