AMDiS 2.10
The Adaptive Multi-Dimensional Simulation Toolbox
MTLSparseMatrix< T > Class Template Reference

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

#include <MatrixBackend.hpp>

Public Types

using BaseMatrix = mtl::compressed2D< T >
 The matrix type of the underlying base matrix.
 
using value_type = typename BaseMatrix::value_type
 The type of the elements of the DOFMatrix.
 
using size_type = typename BaseMatrix::size_type
 The index/size - type.
 

Public Member Functions

 MTLSparseMatrix (DefaultIndexDistribution const &, DefaultIndexDistribution const &)
 Constructor. Constructs new BaseMatrix.
 
BaseMatrixmatrix ()
 Return a reference to the data-matrix matrix.
 
BaseMatrix const & matrix () const
 Return a reference to the data-matrix matrix.
 
void init (Pattern const &pattern)
 
void init ()
 
void finish ()
 
void insert (size_type r, size_type c, value_type const &value)
 Returns an update-proxy of the inserter, to insert/update a value at position (r, c) in the matrix. Need an insertionMode inserter, that can be created by init and must be closed by finish after insertion.
 
template<class Ind , class LocalMat >
void scatter (Ind const &idx, LocalMat const &mat)
 
template<class RowInd , class ColInd , class LocalMat >
void scatter (RowInd const &rows, ColInd const &cols, LocalMat const &mat)
 
template<class RowInd , class ColInd >
void setUnitDiagonals (RowInd const &rowInd, ColInd const &colInd)
 
template<class RowInd , class ColInd >
void zeroRows (RowInd const &rowInd, ColInd const &colInd, bool diag)
 Set all entries of the specified rows to zero and the diagonal element to diag
 
template<class RowInd >
void zeroRows (RowInd const &rowInd, bool diag)
 
template<class RowInd , class ColInd >
void zeroRowsColumnsImpl (RowInd const &rowInd, ColInd const &colInd, bool diag, MTLVector< T > const *x=nullptr, MTLVector< T > *b=nullptr)
 Set all entries of the specified rows and columns to zero and the diagonal element to diag
 
template<class RowInd >
void zeroRowsColumns (RowInd const &rowInd, bool diag)
 
template<class RowInd >
void zeroRowsColumns (RowInd const &rowInd, bool diag, MTLVector< T > const &x, MTLVector< T > &b)
 
template<class RowInd , class ColInd >
void zeroRowsColumns (RowInd const &rowInd, ColInd const &colInd, bool diag)
 
template<class RowInd , class ColInd >
void zeroRowsColumns (RowInd const &rowInd, ColInd const &colInd, bool diag, MTLVector< T > const &x, MTLVector< T > &b)
 
std::size_t nnz () const
 Return the number of nonzeros in the matrix.
 
SymmetryStructure symmetry () const
 Symmetry of the matrix entries.
 

Detailed Description

template<class T>
class AMDiS::MTLSparseMatrix< T >

The basic container that stores a base matrix.

Member Function Documentation

◆ finish()

void finish ( )
inline

Delete inserter -> finish insertion. Must be called in order to fill the final construction of the matrix.

◆ init() [1/2]

void init ( )
inline

Create inserter. Assumes that no inserter is currently active on this matrix. Does not change matrix dimensions.

References MTLSparseMatrix< T >::nnz().

◆ init() [2/2]

void init ( Pattern const &  pattern)
inline

Create inserter. Assumes that no inserter is currently active on this matrix. Resizes the matrix according to the provided pattern.

References SlotSize::cols(), MTLSparseMatrix< T >::nnz(), SlotSize::rows(), SlotSize::rowSizeEstimate(), and SlotSize::symmetry().


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