#include <MGPrecond.hpp>
Inheritance diagram for MGPrecond< T >:


Public Member Functions | |
| MGPrecond (unsigned the_disp_type, int the_gamma, LinSolver< T > &the_base_solver, SysTransfer< T > &the_transfer, SysPrecond< T > &the_pre_smoother, SysPrecond< T > &the_post_smoother, int the_pre_n=1, int the_post_n=1, T the_pre_damp=1, T the_post_damp=1) | |
| MGPrecond (LinSolver< T > &the_base_solver, SysTransfer< T > &the_transfer, SysPrecond< T > &the_pre_smoother, SysPrecond< T > &the_post_smoother, SGParam *list) | |
| Reads all the data from SG-parameters. | |
| void | PrintParam () |
| Prints the name of the preconditioner and (optionally) the parameters. | |
| void | PreProcess (SysPrecondCtxt &context, SysMatrix< T > &A) |
| Prepares the preconditioner for a given matrix hierarchy, i.e. creates the grid function hierarchy, checks the sizes of the matrices in the hierarchy. | |
| void | Run (SysPrecondCtxt &context, GridVec< T > &r, GridVec< T > &c) |
Applies the preconditioner to a given vector 'r', i.e. computes . | |
| void | PostProcess (SysPrecondCtxt &context) |
| Releases the allocated memory, postprocesses the smoothers. | |
| virtual | ~MGPrecond () |
| Virtual destructor. | |
The preconditioner does not create the grid hierarchy, but uses the existing one.
The templates depend on a type T. This type should satisfy the conditions listed in small_matrix.hpp for small matrices.
| MGPrecond< T >::MGPrecond | ( | unsigned | the_disp_type, | |
| int | the_gamma, | |||
| LinSolver< T > & | the_base_solver, | |||
| SysTransfer< T > & | the_transfer, | |||
| SysPrecond< T > & | the_pre_smoother, | |||
| SysPrecond< T > & | the_post_smoother, | |||
| int | the_pre_n = 1, |
|||
| int | the_post_n = 1, |
|||
| T | the_pre_damp = 1, |
|||
| T | the_post_damp = 1 | |||
| ) | [inline] |
Constructor which gets all the data from the arguments
| [in] | the_disp_type | The display type |
| [in] | the_gamma | The multi-grid cycle type (1 = V-cycle, ...) |
| [in] | the_base_solver | The coarse grid solver |
| [in] | the_transfer | The transfer operators |
| [in] | the_pre_smoother | The pre-smoother |
| [in] | the_post_smoother | The post-smoother |
| [in] | the_pre_n | The number of the pre-smoothing steps |
| [in] | the_post_n | The number of the post-smoothing steps |
| [in] | the_pre_damp | The damping factor for the pre-smoother |
| [in] | the_post_damp | The damping factor for the post-smoother |
| MGPrecond< T >::MGPrecond | ( | LinSolver< T > & | the_base_solver, | |
| SysTransfer< T > & | the_transfer, | |||
| SysPrecond< T > & | the_pre_smoother, | |||
| SysPrecond< T > & | the_post_smoother, | |||
| SGParam * | list | |||
| ) | [inline] |
Reads all the data from SG-parameters.
| [in] | the_base_solver | The coarse grid solver |
| [in] | the_transfer | The transfer operators |
| [in] | the_pre_smoother | The pre-smoother |
| [in] | the_post_smoother | The post-smoother |
| [in] | list | The list of parameters to read |
| void MGPrecond< T >::PrintParam | ( | ) | [inline, virtual] |
| void MGPrecond< T >::PreProcess | ( | SysPrecondCtxt & | context, | |
| SysMatrix< T > & | A | |||
| ) | [inline, virtual] |
Prepares the preconditioner for a given matrix hierarchy, i.e. creates the grid function hierarchy, checks the sizes of the matrices in the hierarchy.
This function must be called only once for a given matrix hierarchy. Then the preconditioner can be applied to any residual and any right-hand side. This function does not return any value but may throw exceptions
| [in] | context | The context to initialize |
| [in] | A | The system matrix hierarchy |
Implements SysPrecond< T >.
| void MGPrecond< T >::Run | ( | SysPrecondCtxt & | context, | |
| GridVec< T > & | r, | |||
| GridVec< T > & | c | |||
| ) | [inline, virtual] |
Applies the preconditioner to a given vector 'r', i.e. computes
.
| [in] | context | The context |
| [in] | r | The residual |
| [in] | c | The correction |
Implements SysPrecond< T >.
| void MGPrecond< T >::PostProcess | ( | SysPrecondCtxt & | context | ) | [inline, virtual] |
Releases the allocated memory, postprocesses the smoothers.
After you called this function the preconditioner cannot work before you call PreProcess again. This function does not return any value but may throw exceptions
| [in] | context | The context to release |
Implements SysPrecond< T >.
1.5.2