3 #ifndef CH_MATRIX_CLASSES__MINRES_HXX 4 #define CH_MATRIX_CLASSES__MINRES_HXX 57 MinRes(std::ostream* out=0,
int pril=-1);
100 virtual void set_out(std::ostream* in_out=0,
int in_print_level=1)
101 {myout=in_out;print_level=in_print_level;}
int Integer
all integer numbers in calculations and indexing are of this type
Definition: matop.hxx:40
Header declaring the abstract classes CH_Matrix_Classes::IterativeSystemObject and CH_Matrix_Classes:...
Matrix vecAv
result of matrix vector multiplictaion
Definition: minres.hxx:48
std::ostream * myout
everything is output to *myout, default: 0 for no output
Definition: minres.hxx:52
double Real
all real numbers in calculations are of this type
Definition: matop.hxx:50
void set_maxit(Integer in_maxit)
set maximum number of iterations
Definition: minres.hxx:69
MinRes method for solving Ax=b with symmetric (indefinite) matrix A and positive definite preconditio...
Definition: minres.hxx:30
Real termprec
absolute precision required in the last call
Definition: minres.hxx:37
Matrix veczcurr
current vector z
Definition: minres.hxx:46
Matrix veczprev
previous vector z
Definition: minres.hxx:47
Real avg_reduction
average over the reduction factors
Definition: minres.hxx:36
Integer stall
counts number of time reduction was less than .999
Definition: minres.hxx:50
virtual void set_out(std::ostream *in_out=0, int in_print_level=1)
set output stream and level of detail of log output (for debugging)
Definition: minres.hxx:100
Matrix vecvprev
previous vector v
Definition: minres.hxx:43
Integer get_maxit() const
get maximum number of iterations
Definition: minres.hxx:71
Integer get_nmult() const
returns the number of matrix-vector multiplications of the last call
Definition: minres.hxx:76
Real get_residual_norm() const
returns the residual norm of last call
Definition: minres.hxx:78
Matrix vecwcurr
current vector w
Definition: minres.hxx:44
int print_level
level of iteration information that should be displayed
Definition: minres.hxx:53
Matrix Classes and Linear Algebra. See Matrix Classes (namespace CH_Matrix_Classes) for a quick intro...
Definition: PSCOracle.hxx:20
Integer maxit
maximum number of matrix vector multiplications
Definition: minres.hxx:33
Integer nmult
number of matrix vector multiplications/iterations
Definition: minres.hxx:38
virtual Real get_termprec() const
return the (absolute) precision requirement for termination used in the last call ...
Definition: minres.hxx:82
Real old_resnorm
residual norm in the previous step
Definition: minres.hxx:35
Matrix vecwprev
previous vector w
Definition: minres.hxx:45
Abstract base class for supplying the system for an iterative solver.
Definition: IterativeSystemObject.hxx:37
Matrix class for real values of type Real
Definition: matrix.hxx:74
Matrix vecvcurr
current vector v
Definition: minres.hxx:42
virtual Real get_avg_reduction() const
returns the average of the achieved reduction factor per iteration
Definition: minres.hxx:80
int get_err() const
returns the error code of the last call
Definition: minres.hxx:74
int compute(IterativeSystemObject &system, Matrix &x, Real termprec, Matrix *storex=0, Integer storestep=0)
compute the solution for system into x with (absolute) residual precision termprec ...
Integer err
error code
Definition: minres.hxx:39
MinRes(std::ostream *out=0, int pril=-1)
default constructor
Abstract interface to iterative methods for solving Ax=b given by an IterativeSystemObject.
Definition: IterativeSystemObject.hxx:61
Real resnorm
residual norm
Definition: minres.hxx:34