LinIter< T > Class Template Reference

Template for the damped preconditioned linear iteration for solving linear systems $ \mathbf{A} u = f $ with SysMatrix<T>-matrices $ \mathbf{A} $. The iteration has the form $ u^{k+1} = u^k + \mathbf{W}^{-1} (f - \mathbf{A} u^k) $. Here $ u^k $ is the guess for the solution in the $ k $-th iteration, and $ \mathbf{W} $ is the preconditioner. More...

#include <LinIter.hpp>

Inheritance diagram for LinIter< T >:

Inheritance graph
[legend]
Collaboration diagram for LinIter< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LinIter (unsigned the_disp_type, double the_reduction, unsigned the_max_iter, double the_abs_prec, SysPrecond< T > *the_precond=NULL, T the_damp=1)
 Constructor for 'hard-coded' values.
 LinIter (SGParam *list, SysPrecond< T > *the_precond=NULL)
 Constructor for reading values from SG parameters.
void PreProcess (SysMatrix< T > &the_A)
 save the matrix, the corresponding routines of the preconditioner
void PostProcess ()
 Save the matrix, the corresponding routines of the preconditioner.
bool Run (GridVec< T > &f, GridVec< T > &x)
 The solver routine.
void PrintParam ()
 Prints the name of the solver and (optionally) the parameters.

Detailed Description

template<typename T>
class LinIter< T >

Template for the damped preconditioned linear iteration for solving linear systems $ \mathbf{A} u = f $ with SysMatrix<T>-matrices $ \mathbf{A} $. The iteration has the form $ u^{k+1} = u^k + \mathbf{W}^{-1} (f - \mathbf{A} u^k) $. Here $ u^k $ is the guess for the solution in the $ k $-th iteration, and $ \mathbf{W} $ is the preconditioner.

The templates depend on a type T. This type should satisfy the conditions listed in small_matrix.hpp for small matrices.


Constructor & Destructor Documentation

template<typename T>
LinIter< T >::LinIter ( unsigned  the_disp_type,
double  the_reduction,
unsigned  the_max_iter,
double  the_abs_prec,
SysPrecond< T > *  the_precond = NULL,
the_damp = 1 
) [inline]

Constructor for 'hard-coded' values.

Parameters:
[in] the_disp_type The display type
[in] the_reduction The desired reduction (0 to do 'max_iter' iter.)
[in] the_max_iter The maximum number of iterations
[in] the_abs_prec The minimum norm of the residual
[in] the_precond The preconditioner (NULL for none)
[in] the_damp The damping factor

template<typename T>
LinIter< T >::LinIter ( SGParam list,
SysPrecond< T > *  the_precond = NULL 
) [inline]

Constructor for reading values from SG parameters.

Additionally to the parameters from the base classes, there is a parameter 'LinDamp' for the damping factor.

Parameters:
[in] list The list of parameters to read
[in] the_precond The preconditioner (NULL for none)


Member Function Documentation

template<typename T>
void LinIter< T >::PreProcess ( SysMatrix< T > &  the_A  )  [inline, virtual]

save the matrix, the corresponding routines of the preconditioner

Implements LinSolver< T >.

template<typename T>
void LinIter< T >::PostProcess (  )  [inline, virtual]

Save the matrix, the corresponding routines of the preconditioner.

Implements LinSolver< T >.

template<typename T>
bool LinIter< T >::Run ( GridVec< T > &  f,
GridVec< T > &  x 
) [inline, virtual]

The solver routine.

Parameters:
[in] f The right-hand side
[in] x The solution (and the initial guess)

Implements LinSolver< T >.

template<typename T>
void LinIter< T >::PrintParam (  )  [inline, virtual]

Prints the name of the solver and (optionally) the parameters.

Implements LinSolver< T >.


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 12:34:17 2007 for SG2 by  doxygen 1.5.2