AMDiS  0.3
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

template<class Basis >
 PetscMatrix (Basis const &rowBasis, Basis const &)
 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 Pattern >
void init (Pattern 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.
 

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: