The basic container that stores a base matrix. More...
#include <MatrixBackend.hpp>
Public Member Functions | |
| PetscMatrix (DofMap const &rowDofMap, DofMap const &colDofMap) | |
| Constructor. Constructs new BaseMatrix. | |
| PetscMatrix (PetscMatrix const &)=delete | |
| PetscMatrix (PetscMatrix &&)=delete | |
| PetscMatrix & | operator= (PetscMatrix const &)=delete |
| PetscMatrix & | operator= (PetscMatrix &&)=delete |
| BaseMatrix & | matrix () |
| Return a reference to the data-matrix matrix. | |
| BaseMatrix const & | matrix () const |
| Return a reference to the data-matrix matrix. | |
| template<class RowIndex , class ColIndex > | |
| void | insert (RowIndex const &r, ColIndex const &c, PetscScalar value) |
| Insert a single value into the matrix. | |
| template<class LocalInd , class LocalMatrix > | |
| void | scatter (LocalInd const &localInd, LocalMatrix const &localMat) |
| Insert an element-matrix with row-indices == col-indices. | |
| template<class RowLocalInd , class ColLocalInd , class LocalMatrix > | |
| void | scatter (RowLocalInd const &rowLocalInd, ColLocalInd const &colLocalInd, LocalMatrix const &localMat) |
| Insert an element-matrix. | |
| template<class RowInd > | |
| void | zeroRows (std::vector< RowInd > const &rowLocalInd, bool diag) |
Set all entries of the specified rows to zero and the diagonal element to diag | |
| template<class RowInd , class ColInd > | |
| void | zeroRows (std::vector< RowInd > const &rowLocalInd, std::vector< ColInd > const &colLocalInd, bool diag) |
Set all entries of the specified rows to zero and the diagonal element to diag | |
| template<class RowInd > | |
| void | zeroRowsColumns (std::vector< RowInd > const &rowLocalInd, bool diag) |
Set all entries of the specified rows and columns to zero and the diagonal element to diag | |
| template<class RowInd > | |
| void | zeroRowsColumns (std::vector< RowInd > const &rowLocalInd, bool diag, PetscVector< DofMap > const &x, PetscVector< DofMap > &b) |
Set all entries of the specified rows and columns to zero and the diagonal element to diag | |
| template<class RowInd , class ColInd > | |
| void | zeroRowsColumns (std::vector< RowInd > const &rowLocalInd, std::vector< ColInd > const &colLocalInd, bool diag) |
Set all entries of the specified rows and columns to zero and the diagonal element to diag | |
| template<class RowInd , class ColInd > | |
| void | zeroRowsColumns (std::vector< RowInd > const &rowLocalInd, std::vector< ColInd > const &colLocalInd, bool diag, PetscVector< DofMap > const &x, PetscVector< DofMap > &b) |
Set all entries of the specified rows and columns to zero and the diagonal element to diag | |
| void | init (MatrixNnzStructure const &pattern) |
| Create and initialize the matrix. | |
| void | init () |
| Reuse the matrix pattern and set all entries to zero. | |
| void | finish () |
| Finish assembly. Must be called before matrix can be used in a KSP. | |
| std::size_t | nnz () const |
| Return the local number of nonzeros in the matrix. | |
| MPI_Comm | comm () const |
Friends | |
| template<class > | |
| class | Constraints |
The basic container that stores a base matrix.