AMDiS  0.3
The Adaptive Multi-Dimensional Simulation Toolbox
MatrixFacade< T, MatrixImpl > Class Template Reference

#include <MatrixFacade.hpp>

Public Member Functions

template<class RowBasis , class ColBasis >
 MatrixFacade (RowBasis const &rowBasis, ColBasis const &colBasis)
 
Impl const & impl () const
 Return the underlying matrix backend.
 
Implimpl ()
 
template<class SparsityPattern >
void init (SparsityPattern const &pattern)
 Initialize the matrix for insertion and allocate the non-zero pattern.
 
void init ()
 Initialize the matrix for insertion while keeping the pattern unchanged.
 
void finish ()
 Finish the matrix insertion, e.g. cleanup or final insertion.
 
template<class RowIndex , class ColIndex , REQUIRES(Concepts::MultiIndex< RowIndex >) , REQUIRES(Concepts::MultiIndex< ColIndex >) >
void insert (RowIndex const &row, ColIndex const &col, typename Impl::value_type const &value)
 Insert a single value into the matrix (add to existing value)
 
template<class RowLocalView , class ColLocalView , class LocalMatrix , REQUIRES(Concepts::LocalView< RowLocalView >) , REQUIRES(Concepts::LocalView< ColLocalView >) >
void scatter (RowLocalView const &r, ColLocalView const &c, LocalMatrix const &localMatrix)
 
std::size_t nnz () const
 Number of nonzeros in the matrix.
 

Protected Attributes

Impl impl_
 The matrix backend.
 

Detailed Description

template<class T, template< class > class MatrixImpl>
class AMDiS::MatrixFacade< T, MatrixImpl >

Basis implementation of DOFMatrix, i.e. a sparse matrix storing all the assembled Operators indexed with DOF indices. The matrix data is associated to a row and column global basis.

Template Parameters
TThe coefficient type of the matrix
MatrixImplA linear-algebra backend for the matrix storage

Constructor & Destructor Documentation

◆ MatrixFacade()

MatrixFacade ( RowBasis const &  rowBasis,
ColBasis const &  colBasis 
)
inline

Constructor. Forwards the bases to the implementation class and constructs a matrix sparsity pattern.

Member Function Documentation

◆ scatter()

void scatter ( RowLocalView const &  r,
ColLocalView const &  c,
LocalMatrix const &  localMatrix 
)
inline

Insert a block of values into the sparse matrix (add to existing values) The global matrix indices are determined by the corresponding localviews.


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