BiCGStab< T > Class Template Reference

Template for the preconditioned BiCGStab-method. More...

#include <BiCGStab.hpp>

Inheritance diagram for BiCGStab< T >:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BiCGStab (unsigned the_disp_type, double the_reduction, unsigned the_max_iter, double the_abs_prec, SysPrecond< T > *the_precond=NULL)
 for 'hard coded' values
 BiCGStab (SGParam *list, SysPrecond< T > *the_precond=NULL)
 Reads the values from the SG parameters.
void PreProcess (SysMatrix< T > &A)
 Prepares the solver for a given system matrix.
void PostProcess ()
 Releases the memory allocated in PreProcess, ...
bool Run (GridVec< T > &f, GridVec< T > &x)
 Solves the linear system with a right-hand side $ f $ and writes the solution to $ x $. Note that in some cases $ f $ and $ x $ must be physically different vectors, but they should have equal sizes. This function should throw exceptions on errors. The function returns nonzero if the prescribed precision has not been achieved.
void PrintParam ()
 Prints the name of the solver and (optionally) the parameters.

Detailed Description

template<typename T>
class BiCGStab< T >

Template for the preconditioned BiCGStab-method.

The BiCGStab-method is a solver linear systems $ \mathbf{A} u = f $ with SysMatrix<T>-matrices $\mathbf{A}$. The matrix $\mathbf{A}$ must be regular but not necessarily spd.

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

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>
BiCGStab< T >::BiCGStab ( 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 BiCGStab< T >::PreProcess ( SysMatrix< T > &  A  )  [inline, virtual]

Prepares the solver for a given system matrix.

This function must be called only once for a given system matrix. Then the solver can be applied to any right-hand side. This function does not return any value but may throw exceptions:

Parameters:
[in] A The system matrix hierarchy

Implements LinSolver< T >.

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

Releases the memory allocated in PreProcess, ...

After you called this function the solver cannot work before you call PreProcess again. This function does not return any value but may throw exceptions.

Implements LinSolver< T >.

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

Solves the linear system with a right-hand side $ f $ and writes the solution to $ x $. Note that in some cases $ f $ and $ x $ must be physically different vectors, but they should have equal sizes. This function should throw exceptions on errors. The function returns nonzero if the prescribed precision has not been achieved.

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

Implements LinSolver< T >.

template<typename T>
void BiCGStab< 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:05 2007 for SG2 by  doxygen 1.5.2