dune-istl
2.8.0
|
A wrapper for uniform access to the BCRSMatrix during and after the build stage in implicit build mode. More...
#include <dune/istl/bcrsmatrix.hh>
Classes | |
class | row_object |
Proxy row object for entry access. More... | |
Public Types | |
typedef M_ | Matrix |
The underlying matrix. More... | |
typedef Matrix::block_type | block_type |
The block_type of the underlying matrix. More... | |
typedef Matrix::size_type | size_type |
The size_type of the underlying matrix. More... | |
Public Member Functions | |
ImplicitMatrixBuilder (Matrix &m) | |
Creates an ImplicitMatrixBuilder for matrix m. More... | |
ImplicitMatrixBuilder (Matrix &m, size_type rows, size_type cols, size_type avg_cols_per_row, double overflow_fraction) | |
Sets up matrix m for implicit construction using the given parameters and creates an ImplicitBmatrixuilder for it. More... | |
row_object | operator[] (size_type i) const |
Returns a proxy for entries in row i. More... | |
size_type | N () const |
The number of rows in the matrix. More... | |
size_type | M () const |
The number of columns in the matrix. More... | |
A wrapper for uniform access to the BCRSMatrix during and after the build stage in implicit build mode.
The implicit build mode of Dune::BCRSMatrix handles matrices differently during assembly and afterwards. Using this class, one can wrap a BCRSMatrix to allow use with code that is not written for the new build mode specifically. The wrapper forwards any calls to operator[][] to the entry() method.The assembly code does not even necessarily need to know that the underlying matrix is sparse. Dune::AMG uses this to reassemble an existing matrix without code duplication. The compress() method of Dune::BCRSMatrix still has to be called from outside this wrapper after the pattern assembly is finished.
M_ | the matrix type |
typedef Matrix::block_type Dune::ImplicitMatrixBuilder< M_ >::block_type |
The block_type of the underlying matrix.
typedef M_ Dune::ImplicitMatrixBuilder< M_ >::Matrix |
The underlying matrix.
typedef Matrix::size_type Dune::ImplicitMatrixBuilder< M_ >::size_type |
The size_type of the underlying matrix.
|
inline |
Creates an ImplicitMatrixBuilder for matrix m.
|
inline |
Sets up matrix m for implicit construction using the given parameters and creates an ImplicitBmatrixuilder for it.
Using this constructor, you can perform the necessary matrix setup and the creation of the ImplicitMatrixBuilder in a single step. The matrix must still be in the build stage notAllocated, otherwise a BCRSMatrixError will be thrown. For a detailed explanation of the matrix parameters, see BCRSMatrix.
m | the matrix to be built |
rows | the number of matrix rows |
cols | the number of matrix columns |
avg_cols_per_row | the average number of non-zero columns per row |
overflow_fraction | the amount of overflow to reserve in the matrix |
|
inline |
The number of columns in the matrix.
|
inline |
The number of rows in the matrix.
|
inline |
Returns a proxy for entries in row i.