next up previous contents
Next: Bibliography Up: Iterative Methods Previous: Iterative Methods   Contents


psb_krylov -- Krylov Methods Driver Routine

This subroutine is a driver that provides a general interface for all the Krylov-Subspace family methods implemented in PSBLAS version 2.

The stopping criterion can take the following values:

1
normwise backward error in the infinity norm; the iteration is stopped when

\begin{displaymath}err = \frac{\Vert r_i\Vert}{(\Vert A\Vert\Vert x_i\Vert+\Vert b\Vert)} < eps \end{displaymath}

2
Relative residual in the 2-norm; the iteration is stopped when

\begin{displaymath}err = \frac{\Vert r_i\Vert}{\Vert b\Vert _2} < eps \end{displaymath}

3
Relative residual reduction in the 2-norm; the iteration is stopped when

\begin{displaymath}err = \frac{\Vert r_i\Vert}{\Vert r_0\Vert _2} < eps \end{displaymath}

The behaviour is controlled by the istop argument (see later). In the above formulae, $x_i$ is the tentative solution and $r_i=b-Ax_i$ the corresponding residual at the $i$-th iteration.


\begin{lstlisting}
call psb_krylov(method,a,prec,b,x,eps,desc_a,info,&
& itmax,iter,err,itrace,irst,istop,cond)
\end{lstlisting}

Type:
Synchronous.
On Entry
method
a string that defines the iterative method to be used. Supported values are:
CG:
the Conjugate Gradient method;
CGS:
the Conjugate Gradient Stabilized method;

GCR:
the Generalized Conjugate Residual method;
FCG:
the Flexible Conjugate Gradient method4;

BICG:
the Bi-Conjugate Gradient method;
BICGSTAB:
the Bi-Conjugate Gradient Stabilized method;
BICGSTABL:
the Bi-Conjugate Gradient Stabilized method with restarting;
RGMRES:
the Generalized Minimal Residual method with restarting.
a
the local portion of global sparse matrix $A$.
Scope: local
Type: required
Intent: in.
Specified as: a structured data of type spdatapsb_Tspmat_type.
prec
The data structure containing the preconditioner.
Scope: local
Type: required
Intent: in.
Specified as: a structured data of type precdatapsb_prec_type.
b
The RHS vector.
Scope: local
Type: required
Intent: in.
Specified as: a rank one array or an object of type vdatapsb_T_vect_type.
x
The initial guess.
Scope: local
Type: required
Intent: inout.
Specified as: a rank one array or an object of type vdatapsb_T_vect_type.
eps
The stopping tolerance.
Scope: global
Type: required
Intent: in.
Specified as: a real number.
desc_a
contains data structures for communications.
Scope: local
Type: required
Intent: in.
Specified as: a structured data of type descdatapsb_desc_type.
itmax
The maximum number of iterations to perform.
Scope: global
Type: optional
Intent: in.
Default: $itmax = 1000$.
Specified as: an integer variable $itmax \ge 1$.
itrace
If $>0$ print out an informational message about convergence every $itrace$ iterations.
Scope: global
Type: optional
Intent: in.
irst
An integer specifying the restart parameter.
Scope: global
Type: optional.
Intent: in.
Values: $irst>0$. This is employed for the BiCGSTABL or RGMRES methods, otherwise it is ignored.

istop
An integer specifying the stopping criterion.
Scope: global
Type: optional.
Intent: in.
Values: 1: use the normwise backward error, 2: use the scaled 2-norm of the residual, 3: use the residual reduction in the 2-norm. Default: 2.
On Return
x
The computed solution.
Scope: local
Type: required
Intent: inout.
Specified as: a rank one array or an object of type vdatapsb_T_vect_type.
iter
The number of iterations performed.
Scope: global
Type: optional
Intent: out.
Returned as: an integer variable.
err
The convergence estimate on exit.
Scope: global
Type: optional
Intent: out.
Returned as: a real number.
cond
An estimate of the condition number of matrix $A$; only available with the $CG$ method on real data.
Scope: global
Type: optional
Intent: out.
Returned as: a real number. A correct result will be greater than or equal to one; if specified for non-real data, or an error occurred, zero is returned.
info
Error code.
Scope: local
Type: required
Intent: out.
An integer value; 0 means no error has been detected.


next up previous contents
Next: Bibliography Up: Iterative Methods Previous: Iterative Methods   Contents