Reference documentation for deal.II version 8.1.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
MGSmootherRelaxation< MATRIX, RELAX, VECTOR > Class Template Reference

#include <mg_smoother.h>

Inheritance diagram for MGSmootherRelaxation< MATRIX, RELAX, VECTOR >:
[legend]

Public Member Functions

 MGSmootherRelaxation (const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
 
 MGSmootherRelaxation (VectorMemory< VECTOR > &mem, const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false) DEAL_II_DEPRECATED
 
template<class MATRIX2 >
void initialize (const MGLevelObject< MATRIX2 > &matrices, const typename RELAX::AdditionalData &additional_data=typename RELAX::AdditionalData())
 
template<class MATRIX2 , class DATA >
void initialize (const MGLevelObject< MATRIX2 > &matrices, const MGLevelObject< DATA > &additional_data)
 
template<class MATRIX2 , class DATA >
void initialize (const MGLevelObject< MATRIX2 > &matrices, const DATA &additional_data, const unsigned int block_row, const unsigned int block_col)
 
template<class MATRIX2 , class DATA >
void initialize (const MGLevelObject< MATRIX2 > &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, VECTOR &u, const VECTOR &rhs) const
 
std::size_t memory_consumption () const
 
- Public Member Functions inherited from MGSmoother< VECTOR >
 MGSmoother (const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
 
 MGSmoother (VectorMemory< VECTOR > &mem, const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false) DEAL_II_DEPRECATED
 
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< VECTOR >
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"<< "(Additional information: "<< arg3<< ")\n"<< "Note the entry in the Frequently Asked Questions of "<< "deal.II (linked to from http://www.dealii.org/) for "<< "more information on what this error means.")
 
 DeclException2 (ExcNoSubscriber, char *, char *,<< "No subscriber with identifier \""<< arg2<< "\" did subscribe to this object of class "<< arg1)
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Public Attributes

MGLevelObject< RELAX > smoothers
 

Private Attributes

MGLevelObject< PointerMatrix< MATRIX, VECTOR > > matrices
 

Additional Inherited Members

- Protected Attributes inherited from MGSmoother< VECTOR >
unsigned int steps
 
bool variable
 
bool symmetric
 
bool transpose
 
unsigned int debug
 
SmartPointer< VectorMemory< VECTOR >, MGSmoother< VECTOR > > mem
 

Detailed Description

template<class MATRIX, class RELAX, class VECTOR>
class MGSmootherRelaxation< MATRIX, RELAX, VECTOR >

Smoother using relaxation classes.

A relaxation class is an object that has two member functions,

void step(VECTOR& x, const VECTOR& d) const;
void Tstep(VECTOR& x, const VECTOR& d) const;

performing one step of the smoothing scheme.

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 Tstep instead of the regular step 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.

Note
If '–enable-mgcompatibility' was used on configuring deal.II, this class behaves like MGSmootherPrecondition.
Author
Guido Kanschat, 2003

Definition at line 358 of file mg_smoother.h.

Constructor & Destructor Documentation

template<class MATRIX , class RELAX , class VECTOR >
MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::MGSmootherRelaxation ( const unsigned int  steps = 1,
const bool  variable = false,
const bool  symmetric = false,
const bool  transpose = false 
)

Constructor. Sets smoothing parameters.

template<class MATRIX , class RELAX , class VECTOR >
MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::MGSmootherRelaxation ( VectorMemory< VECTOR > &  mem,
const unsigned int  steps = 1,
const bool  variable = false,
const bool  symmetric = false,
const bool  transpose = false 
)

Constructor. Sets memory and smoothing parameters.

Deprecated:
Use the constructor without the vector memory object

Member Function Documentation

template<class MATRIX , class RELAX , class VECTOR >
template<class MATRIX2 >
void MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::initialize ( const MGLevelObject< MATRIX2 > &  matrices,
const typename RELAX::AdditionalData &  additional_data = typename RELAX::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 RELAX::AdditionalData and is handed to the initialization function of the relaxation method.

template<class MATRIX , class RELAX , class VECTOR >
template<class MATRIX2 , class DATA >
void MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::initialize ( const MGLevelObject< MATRIX2 > &  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 RELAX::AdditionalData and is handed to the initialization function of the relaxation method.

template<class MATRIX , class RELAX , class VECTOR >
template<class MATRIX2 , class DATA >
void MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::initialize ( const MGLevelObject< MATRIX2 > &  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 RELAX::AdditionalData and is handed to the initialization function of the relaxation method.

template<class MATRIX , class RELAX , class VECTOR >
template<class MATRIX2 , class DATA >
void MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::initialize ( const MGLevelObject< MATRIX2 > &  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 RELAX::AdditionalData and is handed to the initialization function of the relaxation method.

template<class MATRIX , class RELAX , class VECTOR >
void MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::clear ( )
virtual

Empty all vectors.

Implements MGSmootherBase< VECTOR >.

template<class MATRIX , class RELAX , class VECTOR >
virtual void MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::smooth ( const unsigned int  level,
VECTOR &  u,
const VECTOR &  rhs 
) const
virtual

The actual smoothing method.

Implements MGSmootherBase< VECTOR >.

template<class MATRIX , class RELAX , class VECTOR >
std::size_t MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::memory_consumption ( ) const

Memory used by this object.

Member Data Documentation

template<class MATRIX , class RELAX , class VECTOR >
MGLevelObject<RELAX> MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::smoothers

Object containing relaxation methods.

Definition at line 488 of file mg_smoother.h.

template<class MATRIX , class RELAX , class VECTOR >
MGLevelObject<PointerMatrix<MATRIX, VECTOR> > MGSmootherRelaxation< MATRIX, RELAX, VECTOR >::matrices
private

Pointer to the matrices.

Definition at line 500 of file mg_smoother.h.


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