CGIter< T > Class Template Reference

Template for the CG iteration for solving linear systems with SysMatrix<T>-matrices. More...

#include <CGIter.hpp>

Inheritance diagram for CGIter< T >:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CGIter (unsigned the_disp_type, double the_reduction, unsigned the_max_iter, double the_abs_prec, SysPrecond< T > *the_precond=NULL)
 Constructor for 'hard coded' values.
 CGIter (SGParam *list, SysPrecond< T > *the_precond=NULL)
 Reads the values from the 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 CGIter< T >

Template for the CG iteration for solving linear systems with SysMatrix<T>-matrices.

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

Date:
Sep. 15, 2004 - created


Constructor & Destructor Documentation

template<typename T>
CGIter< T >::CGIter ( unsigned  the_disp_type,
double  the_reduction,
unsigned  the_max_iter,
double  the_abs_prec,
SysPrecond< T > *  the_precond = NULL 
) [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)

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

Reads the values from the SG parameters.

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


Member Function Documentation

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

Save the matrix, the corresponding routines of the preconditioner.

Implements LinSolver< T >.

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

Save the matrix, the corresponding routines of the preconditioner.

Implements LinSolver< T >.

template<typename T>
bool CGIter< 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 CGIter< 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:07 2007 for SG2 by  doxygen 1.5.2