PolyDEAL
 
Loading...
Searching...
No Matches
dealii::AmgProjector< dim, MatrixType, Number > Class Template Reference

#include <multigrid_amg.h>

Public Member Functions

 AmgProjector (const std::vector< TrilinosWrappers::SparseMatrix > &transfers_)
 
 AmgProjector (const MGLevelObject< TrilinosWrappers::SparseMatrix > &transfers_)
 
void compute_level_matrices (MGLevelObject< std::unique_ptr< MatrixType > > &mg_matrices)
 
void compute_level_matrices_as_linear_operators (MGLevelObject< std::unique_ptr< MatrixType > > &mg_matrices, MGLevelObject< LinearOperatorMG< LinearAlgebra::distributed::Vector< Number >, LinearAlgebra::distributed::Vector< Number > > > &multigrid_matrices_lo)
 
void compute_level_matrices (MGLevelObject< MatrixType > &mg_matrices)
 

Private Types

using VectorType = LinearAlgebra::distributed::Vector<Number>
 

Private Attributes

MPI_Comm communicator
 
std::vector< const MatrixType * > transfer_matrices
 

Detailed Description

template<int dim, typename MatrixType, typename Number = double>
class dealii::AmgProjector< dim, MatrixType, Number >

Same as above, but matrix-based.

Definition at line 202 of file multigrid_amg.h.

Member Typedef Documentation

◆ VectorType

template<int dim, typename MatrixType , typename Number = double>
using dealii::AmgProjector< dim, MatrixType, Number >::VectorType = LinearAlgebra::distributed::Vector<Number>
private

Definition at line 205 of file multigrid_amg.h.

Constructor & Destructor Documentation

◆ AmgProjector() [1/2]

template<int dim, typename MatrixType , typename Number = double>
dealii::AmgProjector< dim, MatrixType, Number >::AmgProjector ( const std::vector< TrilinosWrappers::SparseMatrix > & transfers_)
inline

Constructor. It takes the matrix-free operator evaluation on the finest level, and a series of transfers from levels.

Definition at line 228 of file multigrid_amg.h.

References dealii::AmgProjector< dim, MatrixType, Number >::communicator, LinearAlgebra::distributed::Vector< typename Number, typename MemorySpace >::get_mpi_communicator(), l(), and dealii::AmgProjector< dim, MatrixType, Number >::transfer_matrices.

◆ AmgProjector() [2/2]

template<int dim, typename MatrixType , typename Number = double>
dealii::AmgProjector< dim, MatrixType, Number >::AmgProjector ( const MGLevelObject< TrilinosWrappers::SparseMatrix > & transfers_)
inline

Member Function Documentation

◆ compute_level_matrices() [1/2]

template<int dim, typename MatrixType , typename Number = double>
void dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices ( MGLevelObject< MatrixType > & mg_matrices)
inline

◆ compute_level_matrices() [2/2]

template<int dim, typename MatrixType , typename Number = double>
void dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices ( MGLevelObject< std::unique_ptr< MatrixType > > & mg_matrices)
inline

Initialize level matrices using the operator evaluation and the transfer matrices provided in the constructor.

In particular, matrix[0]= A0, while for the other levels it holds that: matrix[l] = P_l^T A_l-1 P_l, being P_l the two-level injection.

Definition at line 275 of file multigrid_amg.h.

References Assert, dealii::AmgProjector< dim, MatrixType, Number >::communicator, l(), and dealii::AmgProjector< dim, MatrixType, Number >::transfer_matrices.

◆ compute_level_matrices_as_linear_operators()

template<int dim, typename MatrixType , typename Number = double>
void dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices_as_linear_operators ( MGLevelObject< std::unique_ptr< MatrixType > > & mg_matrices,
MGLevelObject< LinearOperatorMG< LinearAlgebra::distributed::Vector< Number >, LinearAlgebra::distributed::Vector< Number > > > & multigrid_matrices_lo )
inline

Similar to above, but wrapping all multigrid matrices in a LinearOperatorMG. This can be used if you want to use the matrix-free action on some levels, and the matrix-based version on other ones. Since the common thing between these approaches is the presence of a vmult() function, a LinearOperatorMG object can store both actions simultaneously.

Definition at line 321 of file multigrid_amg.h.

References Assert, dealii::AmgProjector< dim, MatrixType, Number >::communicator, l(), and dealii::AmgProjector< dim, MatrixType, Number >::transfer_matrices.

Member Data Documentation

◆ communicator

◆ transfer_matrices

template<int dim, typename MatrixType , typename Number = double>
std::vector<const MatrixType *> dealii::AmgProjector< dim, MatrixType, Number >::transfer_matrices
private

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