AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
PetscMatrix< DofMap > Class Template Reference

The basic container that stores a base matrix. More...

#include <MatrixBackend.hpp>

Public Types

using BaseMatrix = ::Mat
 The matrix type of the underlying base matrix.
 
using value_type = PetscScalar
 The type of the elements of the DOFMatrix.
 
using size_type = PetscInt
 The index/size - type.
 

Public Member Functions

 PetscMatrix (DofMap const &rowDofMap, DofMap const &colDofMap)
 Constructor. Constructs new BaseMatrix.
 
 PetscMatrix (PetscMatrix const &)=delete
 
 PetscMatrix (PetscMatrix &&)=delete
 
PetscMatrixoperator= (PetscMatrix const &)=delete
 
PetscMatrixoperator= (PetscMatrix &&)=delete
 
BaseMatrixmatrix ()
 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
 

Detailed Description

template<class DofMap>
class AMDiS::PetscMatrix< DofMap >

The basic container that stores a base matrix.


The documentation for this class was generated from the following file: