ConicBundle
Public Member Functions | Private Attributes | List of all members

PSQMR method for solving Ax=b with symmetric matrix A and symmetric preconditioner M=M1*M2 (M1 and M2 regular) where the preconditioned system is A'x'=b' with A'=M1^{-1}AM2^{-1}, x'=M2*x and b'=M1^{-1}b. System matrix and preconditioners are provided by a CH_Matrix_Classes::IterativeSystemObject. More...

#include <psqmr.hxx>

Inheritance diagram for CH_Matrix_Classes::Psqmr:
CH_Matrix_Classes::IterativeSolverObject

Public Member Functions

 Psqmr (std::ostream *out=0, int pril=-1)
 default constructor
 
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 More...
 
Set and Get Parameters

There should be no need to set any parameters, default values should be available and reasonable.

void set_maxit (Integer in_maxit)
 set maximum number of iterations
 
Integer get_maxit () const
 get maximum number of iterations
 
int get_err () const
 returns the error code of the last call
 
Integer get_nmult () const
 returns the number of matrix-vector multiplications of the last call
 
Real get_residual_norm () const
 returns the residual norm of last call
 
virtual Real get_avg_reduction () const
 returns the average of the achieved reduction factor per iteration
 
virtual Real get_termprec () const
 return the (absolute) precision requirement for termination used in the last call
 
Input/Output
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)
 
Set and Get Parameters

There should be no need to set any parameters, default values should be available and reasonable.

Input/Output

Private Attributes

Integer maxit
 maximum number of matrix vector multiplications
 
Real resnorm
 residual norm
 
Real old_resnorm
 residual norm in the previous step
 
Real avg_reduction
 average over the reduction factors
 
Real termprec
 absolute precision required in the last call
 
Integer nmult
 number of matrix vector multiplications/iterations
 
Integer err
 error code
 
std::ostream * myout
 everything is output to *myout, default: 0 for no output
 
int print_level
 level of iteration information that should be displayed
 

Detailed Description

PSQMR method for solving Ax=b with symmetric matrix A and symmetric preconditioner M=M1*M2 (M1 and M2 regular) where the preconditioned system is A'x'=b' with A'=M1^{-1}AM2^{-1}, x'=M2*x and b'=M1^{-1}b. System matrix and preconditioners are provided by a CH_Matrix_Classes::IterativeSystemObject.

Member Function Documentation

◆ compute()

int CH_Matrix_Classes::Psqmr::compute ( IterativeSystemObject system,
Matrix x,
Real  termprec,
Matrix storex = 0,
Integer  storestep = 0 
)
virtual

compute the solution for system into x with (absolute) residual precision termprec

Parameters
systemthe system informatin with precond
xon input: starting point (x.dim()==0 uses 0-vector), on output: approx. sol.,
termprec!absolute! termination precission, stop if residual norm<= termprec,
storexif not null, store initial x and the x of i*recordstep
storestepif 0 and xrecord!=0 store only the initial x

Implements CH_Matrix_Classes::IterativeSolverObject.

Referenced by get_termprec().


The documentation for this class was generated from the following file: