My Project
|
A sparse matrix interface backend for BCRSMatrix from dune-istl. More...
#include <istlsparsematrixadapter.hh>
Public Member Functions | |
IstlSparseMatrixAdapter (const size_t rows, const size_t columns) | |
Constructor creating an empty matrix. | |
template<class Simulator > | |
IstlSparseMatrixAdapter (const Simulator &simulator) | |
Constructor taking simulator and creating an empty matrix . | |
template<class Set > | |
void | reserve (const std::vector< Set > &sparsityPattern) |
Allocate matrix structure give a sparsity pattern. | |
IstlMatrix & | istlMatrix () |
Return constant reference to matrix implementation. | |
const IstlMatrix & | istlMatrix () const |
size_t | rows () const |
Return number of rows of the matrix. | |
size_t | cols () const |
Return number of columns of the matrix. | |
void | clear () |
Set all matrix entries to zero. | |
void | clearRow (const size_t row, const Scalar diag=1.0) |
Set given row to zero except for the main-diagonal entry (if it exists). | |
void | block (const size_t rowIdx, const size_t colIdx, MatrixBlock &value) const |
Fill given block with entries stored in the matrix. | |
MatrixBlockType * | blockAddress (const size_t rowIdx, const size_t colIdx) const |
void | setBlock (const size_t rowIdx, const size_t colIdx, const MatrixBlock &value) |
Set matrix block to given block. | |
void | addToBlock (const size_t rowIdx, const size_t colIdx, const MatrixBlock &value) |
Add block to matrix block. | |
void | commit () |
Commit matrix from local caches into matrix native structure. | |
void | finalize () |
Finish modifying the matrix, i.e., convert the data structure from one tailored for linearization to one aimed at the linear solver. | |
Protected Attributes | |
size_t | rows_ |
size_t | columns_ |
std::unique_ptr< IstlMatrix > | istlMatrix_ |
A sparse matrix interface backend for BCRSMatrix from dune-istl.
|
inline |
Set given row to zero except for the main-diagonal entry (if it exists).
If the sparsity pattern of the matrix features an explicit block on the main diagonal, the diagonal on that block is set to the second agument of the function.
|
inline |
Commit matrix from local caches into matrix native structure.
For the ISTL adapter this is unnecessary because there is no caching mechanism.
|
inline |
Finish modifying the matrix, i.e., convert the data structure from one tailored for linearization to one aimed at the linear solver.
This may compress the matrix if the build mode is implicit. For the ISTL adapter this is not required.