Solver base class defining interface and implementing simple solver (Richardson iteration)
#include <TSolver.hh>
Classes |
| struct | TInfo |
| | datatype to share iteration history More...
|
Public Member Functions |
|
| TSolver (const uint max_iter=100, const real abs_res_red=real(1e-8), const real rel_res_red=real(1e-8), const real rel_res_growth=real(1e6)) |
| | construct Richardson solver object with corresponding stop criteria
|
|
virtual | ~TSolver () |
| | dtor
|
|
virtual void | solve (const TMatrix *A, TVector *x, const TVector *b, const TMatrix *W=NULL, TInfo *data=NULL) const |
| | solve A·x = b with optional preconditioner W
|
|
virtual bool | stop (const uint it, const real norm, const real norm0, TInfo *info) const |
| | return true if stop condition is met
|
|
virtual void | set_stop_crit (const uint max_iter=100, const real abs_res_red=real(1e-8), const real rel_res_red=real(1e-8), const real rel_res_growth=real(1e6)) |
| | set stop criterion
|
Protected Attributes |
|
uint | _max_iter |
| | maximal number of iterations
|
|
real | _abs_res_reduct |
| | absolute reduction of residual norm
|
|
real | _rel_res_reduct |
| | relative reduction of residual norm compared to start residual
|
|
real | _rel_res_growth |
| | maximal relative growth of residual norm compared to start residual
|