Reference documentation for deal.II version 9.3.3
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Member Functions | Private Attributes | List of all members
mg::Matrix< VectorType > Class Template Referenceabstract

#include <deal.II/multigrid/mg_matrix.h>

Inheritance diagram for mg::Matrix< VectorType >:
[legend]

Public Member Functions

 Matrix ()=default
 
template<typename MatrixType >
 Matrix (const MGLevelObject< MatrixType > &M)
 
template<typename MatrixType >
void initialize (const MGLevelObject< MatrixType > &M)
 
void reset ()
 
const LinearOperator< VectorType > & operator[] (unsigned int level) const
 
virtual void vmult (const unsigned int level, VectorType &dst, const VectorType &src) const override
 
virtual void vmult_add (const unsigned int level, VectorType &dst, const VectorType &src) const override
 
virtual void Tvmult (const unsigned int level, VectorType &dst, const VectorType &src) const override
 
virtual void Tvmult_add (const unsigned int level, VectorType &dst, const VectorType &src) const override
 
virtual unsigned int get_minlevel () const override
 
virtual unsigned int get_maxlevel () const override
 
std::size_t memory_consumption () const
 
virtual void vmult (const unsigned int level, Vector< double > &dst, const Vector< double > &src) const=0
 
virtual void vmult_add (const unsigned int level, Vector< double > &dst, const Vector< double > &src) const=0
 
virtual void Tvmult (const unsigned int level, Vector< double > &dst, const Vector< double > &src) const=0
 
virtual void Tvmult_add (const unsigned int level, Vector< double > &dst, const Vector< double > &src) const=0
 

Private Attributes

MGLevelObject< LinearOperator< VectorType > > matrices
 

Subscriptor functionality

Classes derived from Subscriptor provide a facility to subscribe to this object. This is mostly used by the SmartPointer class.

std::atomic< unsigned intcounter
 
std::map< std::string, unsigned intcounter_map
 
std::vector< std::atomic< bool > * > validity_pointers
 
const std::type_info * object_info
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
unsigned int n_subscriptions () const
 
template<typename StreamType >
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
using map_value_type = decltype(counter_map)::value_type
 
using map_iterator = decltype(counter_map)::iterator
 
static std::mutex mutex
 
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
void check_no_subscribers () const noexcept
 

Detailed Description

template<typename VectorType = Vector<double>>
class mg::Matrix< VectorType >

Multilevel matrix. This matrix stores an MGLevelObject of LinearOperator objects. It implements the interface defined in MGMatrixBase, so that it can be used as a matrix in Multigrid.

Definition at line 44 of file mg_matrix.h.

Constructor & Destructor Documentation

◆ Matrix() [1/2]

template<typename VectorType = Vector<double>>
mg::Matrix< VectorType >::Matrix ( )
default

Default constructor for an empty object.

◆ Matrix() [2/2]

template<typename VectorType >
template<typename MatrixType >
mg::Matrix< VectorType >::Matrix ( const MGLevelObject< MatrixType > &  M)
inline

Constructor setting up pointers to the matrices in M by calling initialize().

Definition at line 230 of file mg_matrix.h.

Member Function Documentation

◆ initialize()

template<typename VectorType >
template<typename MatrixType >
void mg::Matrix< VectorType >::initialize ( const MGLevelObject< MatrixType > &  M)
inline

Initialize the object such that the level multiplication uses the matrices in M

Definition at line 202 of file mg_matrix.h.

◆ reset()

template<typename VectorType >
void mg::Matrix< VectorType >::reset
inline

Reset the object.

Definition at line 221 of file mg_matrix.h.

◆ operator[]()

template<typename VectorType >
const LinearOperator< VectorType > & mg::Matrix< VectorType >::operator[] ( unsigned int  level) const
inline

Access matrix on a level.

Definition at line 238 of file mg_matrix.h.

◆ vmult() [1/2]

template<typename VectorType >
void mg::Matrix< VectorType >::vmult ( const unsigned int  level,
VectorType &  dst,
const VectorType &  src 
) const
overridevirtual

Definition at line 248 of file mg_matrix.h.

◆ vmult_add() [1/2]

template<typename VectorType >
void mg::Matrix< VectorType >::vmult_add ( const unsigned int  level,
VectorType &  dst,
const VectorType &  src 
) const
overridevirtual

Definition at line 259 of file mg_matrix.h.

◆ Tvmult() [1/2]

template<typename VectorType >
void mg::Matrix< VectorType >::Tvmult ( const unsigned int  level,
VectorType &  dst,
const VectorType &  src 
) const
overridevirtual

Definition at line 270 of file mg_matrix.h.

◆ Tvmult_add() [1/2]

template<typename VectorType >
void mg::Matrix< VectorType >::Tvmult_add ( const unsigned int  level,
VectorType &  dst,
const VectorType &  src 
) const
overridevirtual

Definition at line 281 of file mg_matrix.h.

◆ get_minlevel()

template<typename VectorType >
unsigned int mg::Matrix< VectorType >::get_minlevel
overridevirtual

Return the minimal level for which matrices are stored.

Implements MGMatrixBase< Vector< double > >.

Definition at line 292 of file mg_matrix.h.

◆ get_maxlevel()

template<typename VectorType >
unsigned int mg::Matrix< VectorType >::get_maxlevel
overridevirtual

Return the minimal level for which matrices are stored.

Implements MGMatrixBase< Vector< double > >.

Definition at line 301 of file mg_matrix.h.

◆ memory_consumption()

template<typename VectorType >
std::size_t mg::Matrix< VectorType >::memory_consumption
inline

Memory used by this object.

Definition at line 310 of file mg_matrix.h.

◆ vmult() [2/2]

virtual void MGMatrixBase< Vector< double > >::vmult ( const unsigned int  level,
Vector< double > &  dst,
const Vector< double > &  src 
) const
pure virtualinherited

Matrix-vector-multiplication on a certain level.

◆ vmult_add() [2/2]

virtual void MGMatrixBase< Vector< double > >::vmult_add ( const unsigned int  level,
Vector< double > &  dst,
const Vector< double > &  src 
) const
pure virtualinherited

Adding matrix-vector-multiplication on a certain level.

◆ Tvmult() [2/2]

virtual void MGMatrixBase< Vector< double > >::Tvmult ( const unsigned int  level,
Vector< double > &  dst,
const Vector< double > &  src 
) const
pure virtualinherited

Transpose matrix-vector-multiplication on a certain level.

◆ Tvmult_add() [2/2]

virtual void MGMatrixBase< Vector< double > >::Tvmult_add ( const unsigned int  level,
Vector< double > &  dst,
const Vector< double > &  src 
) const
pure virtualinherited

Adding transpose matrix-vector-multiplication on a certain level.

Member Data Documentation

◆ matrices

template<typename VectorType = Vector<double>>
MGLevelObject<LinearOperator<VectorType> > mg::Matrix< VectorType >::matrices
private

Definition at line 106 of file mg_matrix.h.


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