You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
4.3 KiB
TeX
139 lines
4.3 KiB
TeX
19 years ago
|
\section{Iterative Methods}
|
||
|
\label{sec:methods}
|
||
|
|
||
|
In this chapter we provide routines for preconditioners and iterative
|
||
18 years ago
|
methods. The interfaces for Krylov subspace methods are available in
|
||
|
the module \verb|psb_krylov_mod|.
|
||
19 years ago
|
|
||
19 years ago
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||
|
%
|
||
|
% Krylov Methods driver routine
|
||
|
%
|
||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||
|
|
||
17 years ago
|
\clearpage\subsection*{psb\_krylov \label{krylov} --- Krylov Methods Driver
|
||
|
Routine}
|
||
|
\addcontentsline{toc}{subsection}{krylov}
|
||
19 years ago
|
|
||
|
This subroutine is a driver that provides a general interface for all
|
||
18 years ago
|
the Krylov-Subspace family methods implemented in PSBLAS version 2.
|
||
18 years ago
|
|
||
|
The stopping criterion is the normwise backward error, in the infinity
|
||
19 years ago
|
norm, i.e. the iteration is stopped when
|
||
18 years ago
|
\[ err = \frac{\|r_i\|}{(\|A\|\|x_i\|+\|b\|)} < eps \]
|
||
|
or the 2-norm residual reduction
|
||
|
\[ err = \frac{\|r_i\|}{\|b\|_2} < eps \]
|
||
|
according to the value passed through 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.
|
||
19 years ago
|
|
||
|
|
||
17 years ago
|
\begin{verbatim}
|
||
|
call psb_krylov(method,a,prec,b,x,eps,desc_a,info,&
|
||
|
& itmax,iter,err,itrace,irst,istop,cond)
|
||
|
\end{verbatim}
|
||
19 years ago
|
|
||
|
\begin{description}
|
||
18 years ago
|
\item[Type:] Synchronous.
|
||
19 years ago
|
\item[\bf On Entry]
|
||
|
\item[method] a string that defines the iterative method to be
|
||
18 years ago
|
used. Supported values are:
|
||
19 years ago
|
\begin{description}
|
||
17 years ago
|
\item[CG:] the Conjugate Gradient method;
|
||
|
\item[CGS:] the Conjugate Gradient Stabilized method;
|
||
19 years ago
|
|
||
17 years ago
|
\item[BICG:] the Bi-Conjugate Gradient method;
|
||
|
\item[BICGSTAB:] the Bi-Conjugate Gradient Stabilized method;
|
||
|
\item[BICGSTABL:] the Bi-Conjugate Gradient Stabilized method with restarting;
|
||
|
\item[RGMRES:] the Generalized Minimal Residual method with restarting.
|
||
19 years ago
|
\end{description}
|
||
|
\item[a] the local portion of global sparse matrix
|
||
|
$A$. \\
|
||
|
Scope: {\bf local} \\
|
||
|
Type: {\bf required}\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
19 years ago
|
Specified as: a structured data of type \spdata.
|
||
|
\item[prec] The data structure containing the preconditioner.\\
|
||
|
Scope: {\bf local} \\
|
||
|
Type: {\bf required}\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
19 years ago
|
Specified as: a structured data of type \precdata.
|
||
|
\item[b] The RHS vector. \\
|
||
|
Scope: {\bf local} \\
|
||
|
Type: {\bf required}\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
19 years ago
|
Specified as: a rank one array.
|
||
|
\item[x] The initial guess. \\
|
||
|
Scope: {\bf local} \\
|
||
|
Type: {\bf required}\\
|
||
18 years ago
|
Intent: {\bf inout}.\\
|
||
19 years ago
|
Specified as: a rank one array.
|
||
|
\item[eps] The stopping tolerance. \\
|
||
|
Scope: {\bf global} \\
|
||
|
Type: {\bf required}\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
19 years ago
|
Specified as: a real number.
|
||
|
\item[desc\_a] contains data structures for communications.\\
|
||
|
Scope: {\bf local} \\
|
||
|
Type: {\bf required}\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
19 years ago
|
Specified as: a structured data of type \descdata.
|
||
|
\item[itmax] The maximum number of iterations to perform.\\
|
||
|
Scope: {\bf global} \\
|
||
|
Type: {\bf optional}\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
19 years ago
|
Default: $itmax = 1000$.\\
|
||
|
Specified as: an integer variable $itmax \ge 1$.
|
||
|
\item[itrace] If $>0$ print out an informational message about
|
||
|
convergence every $itrace$ iterations.\\
|
||
|
Scope: {\bf global} \\
|
||
|
Type: {\bf optional}\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
18 years ago
|
\item[irst] An integer specifying the restart parameter.\\
|
||
|
Scope: {\bf global} \\
|
||
|
Type: {\bf optional}.\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
18 years ago
|
Values: $irst>0$. This is employed for the BiCGSTABL or RGMRES
|
||
|
methods, otherwise it is ignored.
|
||
|
|
||
19 years ago
|
\item[istop] An integer specifying the stopping criterion.\\
|
||
|
Scope: {\bf global} \\
|
||
18 years ago
|
Type: {\bf optional}.\\
|
||
18 years ago
|
Intent: {\bf in}.\\
|
||
18 years ago
|
Values: 1: use the normwise backward error, 2: use the scaled 2-norm
|
||
17 years ago
|
of the residual. Default: 2.
|
||
19 years ago
|
\item[\bf On Return]
|
||
|
\item[x] The computed solution. \\
|
||
|
Scope: {\bf local} \\
|
||
|
Type: {\bf required}\\
|
||
18 years ago
|
Intent: {\bf inout}.\\
|
||
19 years ago
|
Specified as: a rank one array.
|
||
|
\item[iter] The number of iterations performed.\\
|
||
|
Scope: {\bf global} \\
|
||
|
Type: {\bf optional}\\
|
||
18 years ago
|
Intent: {\bf out}.\\
|
||
19 years ago
|
Returned as: an integer variable.
|
||
18 years ago
|
\item[err] The convergence estimate on exit.\\
|
||
19 years ago
|
Scope: {\bf global} \\
|
||
|
Type: {\bf optional}\\
|
||
18 years ago
|
Intent: {\bf out}.\\
|
||
19 years ago
|
Returned as: a real number.
|
||
17 years ago
|
\item[cond] An estimate of the condition number of matrix $A$; only
|
||
|
available with the $CG$ method.\\
|
||
|
Scope: {\bf global} \\
|
||
|
Type: {\bf optional}\\
|
||
|
Intent: {\bf out}.\\
|
||
|
Returned as: a real number.
|
||
18 years ago
|
\item[info] Error code.\\
|
||
19 years ago
|
Scope: {\bf local} \\
|
||
18 years ago
|
Type: {\bf required} \\
|
||
18 years ago
|
Intent: {\bf out}.\\
|
||
18 years ago
|
An integer value; 0 means no error has been detected.
|
||
19 years ago
|
\end{description}
|
||
|
|
||
|
|
||
|
%%% Local Variables:
|
||
|
%%% mode: latex
|
||
|
%%% TeX-master: "userguide"
|
||
|
%%% End:
|