DUNE PDELab (2.8)
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. | |
typedef Matrix::block_type | block_type |
The block_type of the underlying matrix. | |
typedef Matrix::size_type | size_type |
The size_type of the underlying matrix. | |
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. | |
size_type | N () const |
The number of rows in the matrix. | |
size_type | M () const |
The number of columns in the matrix. | |
Detailed Description
class Dune::ImplicitMatrixBuilder< M_ >
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.
- Template Parameters
-
M_ the matrix type
Constructor & Destructor Documentation
◆ ImplicitMatrixBuilder() [1/2]
|
inline |
Creates an ImplicitMatrixBuilder for matrix m.
- Note
- You can only pass a completely set up matrix to this constructor: All of setBuildMode(), setImplicitBuildModeParameters() and setSize() must have been called with the correct values.
References DUNE_THROW.
◆ ImplicitMatrixBuilder() [2/2]
|
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.
- Parameters
-
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
- See also
- BCRSMatrix
References DUNE_THROW.
The documentation for this class was generated from the following file:
- dune/istl/bcrsmatrix.hh
![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/80x15.png)