Reference documentation for deal.II version 8.4.1
Public Member Functions | Public Attributes | Private Attributes | List of all members
MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType > Class Template Reference

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

Inheritance diagram for MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >:
[legend]

Public Member Functions

 MGSmootherPrecondition (const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
 
template<typename MatrixType2 >
void initialize (const MGLevelObject< MatrixType2 > &matrices, const typename PreconditionerType::AdditionalData &additional_data=typename PreconditionerType::AdditionalData())
 
template<typename MatrixType2 , class DATA >
void initialize (const MGLevelObject< MatrixType2 > &matrices, const MGLevelObject< DATA > &additional_data)
 
template<typename MatrixType2 , class DATA >
void initialize (const MGLevelObject< MatrixType2 > &matrices, const DATA &additional_data, const unsigned int block_row, const unsigned int block_col)
 
template<typename MatrixType2 , class DATA >
void initialize (const MGLevelObject< MatrixType2 > &matrices, const MGLevelObject< DATA > &additional_data, const unsigned int block_row, const unsigned int block_col)
 
void clear ()
 
virtual void smooth (const unsigned int level, VectorType &u, const VectorType &rhs) const
 
std::size_t memory_consumption () const
 
- Public Member Functions inherited from MGSmoother< VectorType >
 MGSmoother (const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
 
void set_steps (const unsigned int)
 
void set_variable (const bool)
 
void set_symmetric (const bool)
 
void set_transpose (const bool)
 
void set_debug (const unsigned int level)
 
- Public Member Functions inherited from MGSmootherBase< VectorType >
virtual ~MGSmootherBase ()
 
- Public Member Functions inherited from Subscriptor
 Subscriptor ()
 
 Subscriptor (const Subscriptor &)
 
virtual ~Subscriptor ()
 
Subscriptoroperator= (const Subscriptor &)
 
void subscribe (const char *identifier=0) const
 
void unsubscribe (const char *identifier=0) const
 
unsigned int n_subscriptions () const
 
void list_subscribers () const
 
 DeclException3 (ExcInUse, int, char *, std::string &,<< "Object of class "<< arg2<< " is still used by "<< arg1<< " other objects."<< "\n\n"<< "(Additional information: "<< arg3<< ")\n\n"<< "See the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "a lot more information on what this error means and "<< "how to fix programs in which it happens.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier <"<< arg2<< "> subscribes to this object of class "<< arg1<< ". Consequently, it cannot be unsubscribed.")
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Public Attributes

MGLevelObject< PreconditionerType > smoothers
 

Private Attributes

MGLevelObject< PointerMatrix< MatrixType, VectorType > > matrices
 

Additional Inherited Members

- Protected Attributes inherited from MGSmoother< VectorType >
GrowingVectorMemory< VectorType > vector_memory
 
unsigned int steps
 
bool variable
 
bool symmetric
 
bool transpose
 
unsigned int debug
 

Detailed Description

template<typename MatrixType, typename PreconditionerType, typename VectorType>
class MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >

Smoother using preconditioner classes.

This class performs smoothing on each level. The operation can be controlled by several parameters. First, the relaxation parameter omega is used in the underlying relaxation method. steps is the number of relaxation steps on the finest level (on all levels if variable is off). If variable is true, the number of smoothing steps is doubled on each coarser level. This results in a method having the complexity of the W-cycle, but saving grid transfers. This is the method proposed by Bramble at al.

The option symmetric switches on alternating between the smoother and its transpose in each step as proposed by Bramble.

transpose uses the transposed smoothing operation using Tvmult instead of the regular vmult of the relaxation scheme.

If you are using block matrices, the second initialize function offers the possibility to extract a single block for smoothing. In this case, the multigrid method must be used only with the vector associated to that single block.

The library contains instantiation for SparseMatrix<.> and Vector<.>, where the template arguments are all combinations of float and double. Additional instantiations may be created by including the file mg_smoother.templates.h.

Author
Guido Kanschat, 2009

Definition at line 396 of file mg_smoother.h.

Constructor & Destructor Documentation

template<typename MatrixType, typename PreconditionerType, typename VectorType>
MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::MGSmootherPrecondition ( const unsigned int  steps = 1,
const bool  variable = false,
const bool  symmetric = false,
const bool  transpose = false 
)

Constructor. Sets smoothing parameters.

Member Function Documentation

template<typename MatrixType, typename PreconditionerType, typename VectorType>
template<typename MatrixType2 >
void MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::initialize ( const MGLevelObject< MatrixType2 > &  matrices,
const typename PreconditionerType::AdditionalData &  additional_data = typename PreconditionerType::AdditionalData() 
)

Initialize for matrices. This function stores pointers to the level matrices and initializes the smoothing operator with the same smoother for each level.

additional_data is an object of type PreconditionerType::AdditionalData and is handed to the initialization function of the relaxation method.

template<typename MatrixType, typename PreconditionerType, typename VectorType>
template<typename MatrixType2 , class DATA >
void MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::initialize ( const MGLevelObject< MatrixType2 > &  matrices,
const MGLevelObject< DATA > &  additional_data 
)

Initialize for matrices. This function stores pointers to the level matrices and initializes the smoothing operator with the according smoother for each level.

additional_data is an object of type PreconditionerType::AdditionalData and is handed to the initialization function of the relaxation method.

template<typename MatrixType, typename PreconditionerType, typename VectorType>
template<typename MatrixType2 , class DATA >
void MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::initialize ( const MGLevelObject< MatrixType2 > &  matrices,
const DATA &  additional_data,
const unsigned int  block_row,
const unsigned int  block_col 
)

Initialize for single blocks of matrices. Of this block matrix, the block indicated by block_row and block_col is selected on each level. This function stores pointers to the level matrices and initializes the smoothing operator with the same smoother for each level.

additional_data is an object of type PreconditionerType::AdditionalData and is handed to the initialization function of the relaxation method.

template<typename MatrixType, typename PreconditionerType, typename VectorType>
template<typename MatrixType2 , class DATA >
void MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::initialize ( const MGLevelObject< MatrixType2 > &  matrices,
const MGLevelObject< DATA > &  additional_data,
const unsigned int  block_row,
const unsigned int  block_col 
)

Initialize for single blocks of matrices. Of this block matrix, the block indicated by block_row and block_col is selected on each level. This function stores pointers to the level matrices and initializes the smoothing operator with the according smoother for each level.

additional_data is an object of type PreconditionerType::AdditionalData and is handed to the initialization function of the relaxation method.

template<typename MatrixType, typename PreconditionerType, typename VectorType>
void MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::clear ( )
virtual

Empty all vectors.

Implements MGSmootherBase< VectorType >.

template<typename MatrixType, typename PreconditionerType, typename VectorType>
virtual void MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::smooth ( const unsigned int  level,
VectorType &  u,
const VectorType &  rhs 
) const
virtual

The actual smoothing method.

Implements MGSmootherBase< VectorType >.

template<typename MatrixType, typename PreconditionerType, typename VectorType>
std::size_t MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::memory_consumption ( ) const

Memory used by this object.

Member Data Documentation

template<typename MatrixType, typename PreconditionerType, typename VectorType>
MGLevelObject<PreconditionerType> MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::smoothers

Object containing relaxation methods.

Definition at line 480 of file mg_smoother.h.

template<typename MatrixType, typename PreconditionerType, typename VectorType>
MGLevelObject<PointerMatrix<MatrixType, VectorType> > MGSmootherPrecondition< MatrixType, PreconditionerType, VectorType >::matrices
private

Pointer to the matrices.

Definition at line 492 of file mg_smoother.h.


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