Public Member Functions | Private Attributes
mg::SmootherRelaxation< RELAX, VECTOR > Class Template Reference
Inheritance diagram for mg::SmootherRelaxation< RELAX, VECTOR >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 SmootherRelaxation (const unsigned int steps=1, const bool variable=false, const bool symmetric=false, const bool transpose=false)
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)
void clear ()
virtual void smooth (const unsigned int level, VECTOR &u, const VECTOR &rhs) const
unsigned int memory_consumption () const

Private Attributes

MGLevelObject< RELAX > smoothers

Detailed Description

template<class RELAX, class VECTOR>
class mg::SmootherRelaxation< 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.

Author:
Guido Kanschat,
Date:
2003, 2009, 2010

Constructor & Destructor Documentation

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

Constructor. Sets memory and smoothing parameters.


Member Function Documentation

template<class RELAX , class VECTOR >
template<class MATRIX2 >
void mg::SmootherRelaxation< RELAX, VECTOR >::initialize ( const MGLevelObject< MATRIX2 > &  matrices,
const typename RELAX::AdditionalData &  additional_data = typename RELAX::AdditionalData() 
)

Initialize for matrices. This function 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 RELAX , class VECTOR >
template<class MATRIX2 , class DATA >
void mg::SmootherRelaxation< RELAX, VECTOR >::initialize ( const MGLevelObject< MATRIX2 > &  matrices,
const MGLevelObject< DATA > &  additional_data 
)
template<class RELAX , class VECTOR >
void mg::SmootherRelaxation< RELAX, VECTOR >::clear ( ) [virtual]

Initialize for matrix blocks. This function 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. Empty all vectors.

Implements MGSmootherBase< VECTOR >.

template<class RELAX , class VECTOR >
virtual void mg::SmootherRelaxation< RELAX, VECTOR >::smooth ( const unsigned int  level,
VECTOR &  u,
const VECTOR &  rhs 
) const [virtual]

The actual smoothing method.

Implements MGSmootherBase< VECTOR >.

template<class RELAX , class VECTOR >
unsigned int mg::SmootherRelaxation< RELAX, VECTOR >::memory_consumption ( ) const

Memory used by this object.


Member Data Documentation

template<class RELAX , class VECTOR >
MGLevelObject<RELAX> mg::SmootherRelaxation< RELAX, VECTOR >::smoothers [private]

Object containing relaxation methods.


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

deal.II documentation generated on Fri Aug 12 2011 15:01:09 by doxygen 1.7.4