#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 |
Same as above, but matrix-based.
Definition at line 202 of file multigrid_amg.h.
|
private |
Definition at line 205 of file multigrid_amg.h.
|
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.
|
inline |
Same as above, but taking a vector of TrilinosWrappers::SparseMatrix objects to be used in a multilevel context.
Definition at line 248 of file multigrid_amg.h.
References dealii::AmgProjector< dim, MatrixType, Number >::communicator, l(), MGLevelObject< class Object >::n_levels(), MGLevelObject< class Object >::resize(), and dealii::AmgProjector< dim, MatrixType, Number >::transfer_matrices.
|
inline |
Definition at line 367 of file multigrid_amg.h.
References Assert, dealii::AmgProjector< dim, MatrixType, Number >::communicator, l(), MGLevelObject< class Object >::max_level(), MGLevelObject< class Object >::min_level(), MGLevelObject< class Object >::n_levels(), and dealii::AmgProjector< dim, MatrixType, Number >::transfer_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.
|
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.
|
private |
MPI communicator used by Trilinos objects.
Definition at line 209 of file multigrid_amg.h.
Referenced by dealii::AmgProjector< dim, MatrixType, Number >::AmgProjector(), dealii::AmgProjector< dim, MatrixType, Number >::AmgProjector(), dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices(), dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices(), and dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices_as_linear_operators().
|
private |
Fine operator evaluation. Vector of (pointers of) Trilinos Matrices storing two-level projections.
Definition at line 219 of file multigrid_amg.h.
Referenced by dealii::AmgProjector< dim, MatrixType, Number >::AmgProjector(), dealii::AmgProjector< dim, MatrixType, Number >::AmgProjector(), dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices(), dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices(), and dealii::AmgProjector< dim, MatrixType, Number >::compute_level_matrices_as_linear_operators().