PolyDEAL
 
Loading...
Searching...
No Matches
dealii::MGTransferAgglomeration< dim, VectorType > Class Template Reference

#include <multigrid_amg.h>

Inheritance diagram for dealii::MGTransferAgglomeration< dim, VectorType >:
MGTransferBase< VectorType > Subscriptor

Public Member Functions

 MGTransferAgglomeration (const MGLevelObject< TrilinosWrappers::SparseMatrix * > &transfer_matrices, const std::vector< DoFHandler< dim > * > &dof_handlers)
 
 MGTransferAgglomeration (const MGLevelObject< TrilinosWrappers::SparseMatrix > &transfer_matrices, const std::vector< DoFHandler< dim > * > &dof_handlers)
 
void prolongate (const unsigned int to_level, VectorType &dst, const VectorType &src) const override
 
void prolongate_and_add (const unsigned int to_level, VectorType &dst, const VectorType &src) const override
 
void restrict_and_add (const unsigned int from_level, VectorType &dst, const VectorType &src) const override
 
void copy_to_mg (const DoFHandler< dim > &dof_handler, MGLevelObject< VectorType > &dst, const VectorType &src) const
 
void copy_from_mg (const DoFHandler< dim > &dof_handler, VectorType &dst, const MGLevelObject< VectorType > &src) const
 
- Public Member Functions inherited from MGTransferBase< VectorType >
virtual ~MGTransferBase () override=default
 
void serialize (Archive &ar, const unsigned int version)
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void subscribe (std::atomic< bool > *const validity, const std::string &identifier="") const
 
void unsubscribe (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
 
unsigned int n_subscriptions () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
 Subscriptor (Subscriptor &&) noexcept
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
Subscriptoroperator= (Subscriptor &&) noexcept
 
void serialize (Archive &ar, const unsigned int version)
 
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
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 
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
 
void list_subscribers (StreamType &stream) const
 
void list_subscribers () const
 

Private Attributes

MGLevelObject< ObserverPointer< TrilinosWrappers::SparseMatrix > > transfer_matrices
 
std::vector< const DoFHandler< dim > * > dof_handlers
 

Additional Inherited Members

- Static Public Member Functions inherited from MGTransferBase< VectorType >
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 
- Static Public Member Functions inherited from Subscriptor
static ::ExceptionBaseExcInUse (int arg1, std::string arg2, std::string arg3)
 
static ::ExceptionBaseExcNoSubscriber (std::string arg1, std::string arg2)
 

Detailed Description

template<int dim, typename VectorType>
class dealii::MGTransferAgglomeration< dim, VectorType >

This class implements the transfer across possibly agglomerated multigrid levels. To perform this, it needs a sequence of transfer matrices and DoFHandlers which identify the degrees of freedom on each level.

Definition at line 409 of file multigrid_amg.h.

Constructor & Destructor Documentation

◆ MGTransferAgglomeration() [1/2]

template<int dim, typename VectorType >
dealii::MGTransferAgglomeration< dim, VectorType >::MGTransferAgglomeration ( const MGLevelObject< TrilinosWrappers::SparseMatrix * > & transfer_matrices,
const std::vector< DoFHandler< dim > * > & dof_handlers )

Constructor. It takes a sequence of transfer matrices from possibly agglomerated meshes.

Definition at line 23 of file multigrid_amg.cc.

References Assert, l(), MGLevelObject< class Object >::max_level(), MGLevelObject< class Object >::min_level(), and MGLevelObject< class Object >::n_levels().

◆ MGTransferAgglomeration() [2/2]

template<int dim, typename VectorType >
dealii::MGTransferAgglomeration< dim, VectorType >::MGTransferAgglomeration ( const MGLevelObject< TrilinosWrappers::SparseMatrix > & transfer_matrices,
const std::vector< DoFHandler< dim > * > & dof_handlers )

Same as above, but taking vectors of Trilinos::SparseMatrix objects, instead of pointers.

Definition at line 44 of file multigrid_amg.cc.

References Assert, l(), MGLevelObject< class Object >::max_level(), MGLevelObject< class Object >::min_level(), and MGLevelObject< class Object >::n_levels().

Member Function Documentation

◆ copy_from_mg()

template<int dim, typename VectorType >
void dealii::MGTransferAgglomeration< dim, VectorType >::copy_from_mg ( const DoFHandler< dim > & dof_handler,
VectorType & dst,
const MGLevelObject< VectorType > & src ) const

Transfer from multi-level vector to normal vector.

Definition at line 143 of file multigrid_amg.cc.

References DEAL_II_NOT_IMPLEMENTED, and MGLevelObject< class Object >::max_level().

◆ copy_to_mg()

template<int dim, typename VectorType >
void dealii::MGTransferAgglomeration< dim, VectorType >::copy_to_mg ( const DoFHandler< dim > & dof_handler,
MGLevelObject< VectorType > & dst,
const VectorType & src ) const

Transfer from a vector on the global grid to vectors defined on each of the levels separately for the active degrees of freedom. In particular, for a globally refined mesh only the finest level in dst is filled as a plain copy of src. All the other level objects are left untouched.

Definition at line 114 of file multigrid_amg.cc.

References DEAL_II_NOT_IMPLEMENTED, level, MGLevelObject< class Object >::max_level(), and MGLevelObject< class Object >::min_level().

◆ prolongate()

template<int dim, typename VectorType >
void dealii::MGTransferAgglomeration< dim, VectorType >::prolongate ( const unsigned int to_level,
VectorType & dst,
const VectorType & src ) const
overridevirtual

Perform prolongation from a coarse level vector src to a fine one dst. The previous content of dst is overwritten.

Implements MGTransferBase< VectorType >.

Definition at line 68 of file multigrid_amg.cc.

◆ prolongate_and_add()

template<int dim, typename VectorType >
void dealii::MGTransferAgglomeration< dim, VectorType >::prolongate_and_add ( const unsigned int to_level,
VectorType & dst,
const VectorType & src ) const
overridevirtual

Perform prolongation, summing into the previous content of dst.

Reimplemented from MGTransferBase< VectorType >.

Definition at line 81 of file multigrid_amg.cc.

References Assert.

◆ restrict_and_add()

template<int dim, typename VectorType >
void dealii::MGTransferAgglomeration< dim, VectorType >::restrict_and_add ( const unsigned int from_level,
VectorType & dst,
const VectorType & src ) const
overridevirtual

Perform restriction.

Implements MGTransferBase< VectorType >.

Definition at line 95 of file multigrid_amg.cc.

References Assert.

Member Data Documentation

◆ dof_handlers

template<int dim, typename VectorType >
std::vector<const DoFHandler<dim> *> dealii::MGTransferAgglomeration< dim, VectorType >::dof_handlers
private

Pointers to DoFHandler employe on the levels.

Definition at line 488 of file multigrid_amg.h.

◆ transfer_matrices

template<int dim, typename VectorType >
MGLevelObject<ObserverPointer<TrilinosWrappers::SparseMatrix> > dealii::MGTransferAgglomeration< dim, VectorType >::transfer_matrices
private

Sequence of transfer operators, stored as pointers to Trilinos matrices.

Definition at line 483 of file multigrid_amg.h.


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