Department of Scientific Computing   
Institute for Numerical Simulation   
University of Bonn   
Documentation
Download
Programming References
Bug Reports / Suggestions
FAQ
Authors
Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Solver Struct Template Reference

struct Solver<I,DIM> provides several iterative methods to solve the arising linear systems. The basic interface to the linear systems is a pointer to an Operator<I,DIM>. The member function Apply() of this operator performs the matrix vector multiply.
The behaviour of the iterative solvers is controlled by the parameters StopCriterion, eps, maxiter, restart, print, prstep.
The auxiliary vectors needed by the iterative solvers must be set in advance. So the user has to care about the memory management. The numbers of required auxiliary vectors are geven below. More...

#include <Solver.hpp>

List of all members.

Public Types

enum  { NUMTMP_ = 100 }
enum  { NUMTMP_BICGSTAB2 = 11 }
 number of auxiliary vectors required by BICGSTAB2.

enum  { NUMTMP_CG = 4 }
 number of auxiliary vectors required by CG.


Public Methods

 Solver ()
 default constructor.

int BiCGSTAB2 (I *X, I *RHS)
 BiCGStab2 solver, returns number of iterations.


Public Attributes

Operator<I,DIM>* Op
 the operator, default NULL.

bool (* StopCriterion )(double currentresidual, double startresidual, double stopvalue)
 pointer to a function which checks whether to stop the iteration or not. Up to now there are:
StoppingCriterionAbsoluteResidual(double res, double , double eps): res<=eps ?
StoppingCriterionRelativeResidual(double res, double startres , double eps): res<=eps * startres ?

You must set a stopping criterion before you can use one of the solvers!


double eps
 stop value for StopCriterion, default 1e-15.

int maxiter
 max number of iterations , default 1000.

int restart
 enforce restart after <restart> iterations, default MAXINT.

char* print
 if !=NULL output each <prstep>-th iteration the iteration count, residual and some other informations, default NULL.

int prstep
 see above, default 10.

I* Tmp [NUMTMP_]
 for auxiliary vectors.

double startresidual
 the solvers store some status information like startresidual.

double finalresidual
 finalresidual.

int iterations
 number of iterations.

template<class I, int DIM> struct Solver


The documentation for this struct was generated from the following file:
Generated at Mon Aug 19 10:02:33 2002 for AWFD by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001