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.
396 lines
9.2 KiB
HTML
396 lines
9.2 KiB
HTML
17 years ago
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||
|
|
||
|
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
|
||
|
original version by: Nikos Drakos, CBLU, University of Leeds
|
||
|
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
|
||
|
* with significant contributions from:
|
||
|
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE>psb_krylov -- Krylov Methods Driver Routine</TITLE>
|
||
|
<META NAME="description" CONTENT="psb_krylov -- Krylov Methods Driver Routine">
|
||
|
<META NAME="keywords" CONTENT="userhtml">
|
||
|
<META NAME="resource-type" CONTENT="document">
|
||
|
<META NAME="distribution" CONTENT="global">
|
||
|
|
||
|
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
|
||
|
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
||
|
|
||
|
<LINK REL="STYLESHEET" HREF="userhtml.css">
|
||
|
|
||
|
<LINK REL="previous" HREF="node103.html">
|
||
|
<LINK REL="up" HREF="node103.html">
|
||
|
<LINK REL="next" HREF="node105.html">
|
||
|
</HEAD>
|
||
|
|
||
|
<BODY >
|
||
|
<!--Navigation Panel-->
|
||
|
<A NAME="tex2html1478"
|
||
|
HREF="node105.html">
|
||
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
||
|
SRC="file:/usr/share/latex2html/icons/next.png"></A>
|
||
|
<A NAME="tex2html1474"
|
||
|
HREF="node103.html">
|
||
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
||
|
SRC="file:/usr/share/latex2html/icons/up.png"></A>
|
||
|
<A NAME="tex2html1470"
|
||
|
HREF="node103.html">
|
||
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
||
|
SRC="file:/usr/share/latex2html/icons/prev.png"></A>
|
||
|
<A NAME="tex2html1476"
|
||
|
HREF="node1.html">
|
||
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
||
|
SRC="file:/usr/share/latex2html/icons/contents.png"></A>
|
||
|
<BR>
|
||
|
<B> Next:</B> <A NAME="tex2html1479"
|
||
|
HREF="node105.html">Bibliography</A>
|
||
|
<B> Up:</B> <A NAME="tex2html1475"
|
||
|
HREF="node103.html">Iterative Methods</A>
|
||
|
<B> Previous:</B> <A NAME="tex2html1471"
|
||
|
HREF="node103.html">Iterative Methods</A>
|
||
|
<B> <A NAME="tex2html1477"
|
||
|
HREF="node1.html">Contents</A></B>
|
||
|
<BR>
|
||
|
<BR>
|
||
|
<!--End of Navigation Panel-->
|
||
|
|
||
|
<H2><A NAME="SECTION000121000000000000000"></A><A NAME="krylov"></A>
|
||
|
<BR>
|
||
|
psb_krylov -- Krylov Methods Driver
|
||
|
Routine
|
||
|
</H2>
|
||
|
|
||
|
<P>
|
||
|
This subroutine is a driver that provides a general interface for all
|
||
|
the Krylov-Subspace family methods implemented in PSBLAS version 2.
|
||
|
|
||
|
<P>
|
||
|
The stopping criterion is the normwise backward error, in the infinity
|
||
|
norm, i.e. the iteration is stopped when
|
||
|
<BR><P></P>
|
||
|
<DIV ALIGN="CENTER">
|
||
|
<!-- MATH
|
||
|
\begin{displaymath}
|
||
|
err = \frac{\|r_i\|}{(\|A\|\|x_i\|+\|b\|)} < eps
|
||
|
\end{displaymath}
|
||
|
-->
|
||
|
|
||
|
<IMG
|
||
|
WIDTH="204" HEIGHT="44" BORDER="0"
|
||
|
SRC="img137.png"
|
||
|
ALT="\begin{displaymath}err = \frac{\Vert r_i\Vert}{(\Vert A\Vert\Vert x_i\Vert+\Vert b\Vert)} < eps \end{displaymath}">
|
||
|
</DIV>
|
||
|
<BR CLEAR="ALL">
|
||
|
<P></P>
|
||
|
or the 2-norm residual reduction
|
||
|
<BR><P></P>
|
||
|
<DIV ALIGN="CENTER">
|
||
|
<!-- MATH
|
||
|
\begin{displaymath}
|
||
|
err = \frac{\|r_i\|}{\|b\|_2} < eps
|
||
|
\end{displaymath}
|
||
|
-->
|
||
|
|
||
|
<IMG
|
||
|
WIDTH="121" HEIGHT="44" BORDER="0"
|
||
|
SRC="img138.png"
|
||
|
ALT="\begin{displaymath}err = \frac{\Vert r_i\Vert}{\Vert b\Vert _2} < eps \end{displaymath}">
|
||
|
</DIV>
|
||
|
<BR CLEAR="ALL">
|
||
|
<P></P>
|
||
|
according to the value passed through the istop argument (see
|
||
|
later). In the above formulae, <IMG
|
||
|
WIDTH="19" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
|
||
|
SRC="img139.png"
|
||
|
ALT="$x_i$"> is the tentative solution and
|
||
|
<IMG
|
||
|
WIDTH="90" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
|
||
|
SRC="img140.png"
|
||
|
ALT="$r_i=b-Ax_i$"> the corresponding residual at the <IMG
|
||
|
WIDTH="10" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
|
||
|
SRC="img3.png"
|
||
|
ALT="$i$">-th iteration.
|
||
|
|
||
|
<P>
|
||
|
<PRE>
|
||
|
call psb_krylov(method,a,prec,b,x,eps,desc_a,info,&
|
||
|
& itmax,iter,err,itrace,irst,istop,cond)
|
||
|
</PRE>
|
||
|
|
||
|
<P>
|
||
|
<DL>
|
||
|
<DT><STRONG>Type:</STRONG></DT>
|
||
|
<DD>Synchronous.
|
||
|
</DD>
|
||
|
<DT><STRONG><B>On Entry</B></STRONG></DT>
|
||
|
<DD>
|
||
|
</DD>
|
||
|
<DT><STRONG>method</STRONG></DT>
|
||
|
<DD>a string that defines the iterative method to be
|
||
|
used. Supported values are:
|
||
|
<DL>
|
||
|
<DT><STRONG>CG:</STRONG></DT>
|
||
|
<DD>the Conjugate Gradient method;
|
||
|
|
||
|
</DD>
|
||
|
<DT><STRONG>CGS:</STRONG></DT>
|
||
|
<DD>the Conjugate Gradient Stabilized method;
|
||
|
|
||
|
<P>
|
||
|
</DD>
|
||
|
<DT><STRONG>BICG:</STRONG></DT>
|
||
|
<DD>the Bi-Conjugate Gradient method;
|
||
|
|
||
|
</DD>
|
||
|
<DT><STRONG>BICGSTAB:</STRONG></DT>
|
||
|
<DD>the Bi-Conjugate Gradient Stabilized method;
|
||
|
|
||
|
</DD>
|
||
|
<DT><STRONG>BICGSTABL:</STRONG></DT>
|
||
|
<DD>the Bi-Conjugate Gradient Stabilized method with restarting;
|
||
|
|
||
|
</DD>
|
||
|
<DT><STRONG>RGMRES:</STRONG></DT>
|
||
|
<DD>the Generalized Minimal Residual method with restarting.
|
||
|
|
||
|
</DD>
|
||
|
</DL>
|
||
|
</DD>
|
||
|
<DT><STRONG>a</STRONG></DT>
|
||
|
<DD>the local portion of global sparse matrix
|
||
|
<IMG
|
||
|
WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||
|
SRC="img1.png"
|
||
|
ALT="$A$">.
|
||
|
<BR>
|
||
|
Scope: <B>local</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Specified as: a structured data of type spdata<TT>psb_spmat_type</TT>.
|
||
|
</DD>
|
||
|
<DT><STRONG>prec</STRONG></DT>
|
||
|
<DD>The data structure containing the preconditioner.
|
||
|
<BR>
|
||
|
Scope: <B>local</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Specified as: a structured data of type precdata<TT>psb_prec_type</TT>.
|
||
|
</DD>
|
||
|
<DT><STRONG>b</STRONG></DT>
|
||
|
<DD>The RHS vector.
|
||
|
<BR>
|
||
|
Scope: <B>local</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Specified as: a rank one array.
|
||
|
</DD>
|
||
|
<DT><STRONG>x</STRONG></DT>
|
||
|
<DD>The initial guess.
|
||
|
<BR>
|
||
|
Scope: <B>local</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>inout</B>.
|
||
|
<BR>
|
||
|
Specified as: a rank one array.
|
||
|
</DD>
|
||
|
<DT><STRONG>eps</STRONG></DT>
|
||
|
<DD>The stopping tolerance.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Specified as: a real number.
|
||
|
</DD>
|
||
|
<DT><STRONG>desc_a</STRONG></DT>
|
||
|
<DD>contains data structures for communications.
|
||
|
<BR>
|
||
|
Scope: <B>local</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Specified as: a structured data of type descdata<TT>psb_desc_type</TT>.
|
||
|
</DD>
|
||
|
<DT><STRONG>itmax</STRONG></DT>
|
||
|
<DD>The maximum number of iterations to perform.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>optional</B>
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Default: <IMG
|
||
|
WIDTH="100" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
|
||
|
SRC="img141.png"
|
||
|
ALT="$itmax = 1000$">.
|
||
|
<BR>
|
||
|
Specified as: an integer variable <IMG
|
||
|
WIDTH="75" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
|
||
|
SRC="img142.png"
|
||
|
ALT="$itmax \ge 1$">.
|
||
|
</DD>
|
||
|
<DT><STRONG>itrace</STRONG></DT>
|
||
|
<DD>If <IMG
|
||
|
WIDTH="29" HEIGHT="30" ALIGN="MIDDLE" BORDER="0"
|
||
|
SRC="img103.png"
|
||
|
ALT="$>0$"> print out an informational message about
|
||
|
convergence every <IMG
|
||
|
WIDTH="46" HEIGHT="17" ALIGN="BOTTOM" BORDER="0"
|
||
|
SRC="img143.png"
|
||
|
ALT="$itrace$"> iterations.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>optional</B>
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR></DD>
|
||
|
<DT><STRONG>irst</STRONG></DT>
|
||
|
<DD>An integer specifying the restart parameter.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>optional</B>.
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Values: <IMG
|
||
|
WIDTH="59" HEIGHT="29" ALIGN="MIDDLE" BORDER="0"
|
||
|
SRC="img144.png"
|
||
|
ALT="$irst>0$">. This is employed for the BiCGSTABL or RGMRES
|
||
|
methods, otherwise it is ignored.
|
||
|
|
||
|
<P>
|
||
|
</DD>
|
||
|
<DT><STRONG>istop</STRONG></DT>
|
||
|
<DD>An integer specifying the stopping criterion.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>optional</B>.
|
||
|
<BR>
|
||
|
Intent: <B>in</B>.
|
||
|
<BR>
|
||
|
Values: 1: use the normwise backward error, 2: use the scaled 2-norm
|
||
|
of the residual. Default: 2.
|
||
|
</DD>
|
||
|
<DT><STRONG><B>On Return</B></STRONG></DT>
|
||
|
<DD>
|
||
|
</DD>
|
||
|
<DT><STRONG>x</STRONG></DT>
|
||
|
<DD>The computed solution.
|
||
|
<BR>
|
||
|
Scope: <B>local</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>inout</B>.
|
||
|
<BR>
|
||
|
Specified as: a rank one array.
|
||
|
</DD>
|
||
|
<DT><STRONG>iter</STRONG></DT>
|
||
|
<DD>The number of iterations performed.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>optional</B>
|
||
|
<BR>
|
||
|
Intent: <B>out</B>.
|
||
|
<BR>
|
||
|
Returned as: an integer variable.
|
||
|
</DD>
|
||
|
<DT><STRONG>err</STRONG></DT>
|
||
|
<DD>The convergence estimate on exit.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>optional</B>
|
||
|
<BR>
|
||
|
Intent: <B>out</B>.
|
||
|
<BR>
|
||
|
Returned as: a real number.
|
||
|
</DD>
|
||
|
<DT><STRONG>cond</STRONG></DT>
|
||
|
<DD>An estimate of the condition number of matrix <IMG
|
||
|
WIDTH="16" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||
|
SRC="img1.png"
|
||
|
ALT="$A$">; only
|
||
|
available with the <IMG
|
||
|
WIDTH="29" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
||
|
SRC="img145.png"
|
||
|
ALT="$CG$"> method.
|
||
|
<BR>
|
||
|
Scope: <B>global</B>
|
||
|
<BR>
|
||
|
Type: <B>optional</B>
|
||
|
<BR>
|
||
|
Intent: <B>out</B>.
|
||
|
<BR>
|
||
|
Returned as: a real number.
|
||
|
</DD>
|
||
|
<DT><STRONG>info</STRONG></DT>
|
||
|
<DD>Error code.
|
||
|
<BR>
|
||
|
Scope: <B>local</B>
|
||
|
<BR>
|
||
|
Type: <B>required</B>
|
||
|
<BR>
|
||
|
Intent: <B>out</B>.
|
||
|
<BR>
|
||
|
An integer value; 0 means no error has been detected.
|
||
|
</DD>
|
||
|
</DL>
|
||
|
|
||
|
<P>
|
||
|
|
||
|
<P>
|
||
|
|
||
|
<P>
|
||
|
<HR>
|
||
|
<!--Navigation Panel-->
|
||
|
<A NAME="tex2html1478"
|
||
|
HREF="node105.html">
|
||
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
||
|
SRC="file:/usr/share/latex2html/icons/next.png"></A>
|
||
|
<A NAME="tex2html1474"
|
||
|
HREF="node103.html">
|
||
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
||
|
SRC="file:/usr/share/latex2html/icons/up.png"></A>
|
||
|
<A NAME="tex2html1470"
|
||
|
HREF="node103.html">
|
||
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
||
|
SRC="file:/usr/share/latex2html/icons/prev.png"></A>
|
||
|
<A NAME="tex2html1476"
|
||
|
HREF="node1.html">
|
||
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
||
|
SRC="file:/usr/share/latex2html/icons/contents.png"></A>
|
||
|
<BR>
|
||
|
<B> Next:</B> <A NAME="tex2html1479"
|
||
|
HREF="node105.html">Bibliography</A>
|
||
|
<B> Up:</B> <A NAME="tex2html1475"
|
||
|
HREF="node103.html">Iterative Methods</A>
|
||
|
<B> Previous:</B> <A NAME="tex2html1471"
|
||
|
HREF="node103.html">Iterative Methods</A>
|
||
|
<B> <A NAME="tex2html1477"
|
||
|
HREF="node1.html">Contents</A></B>
|
||
|
<!--End of Navigation Panel-->
|
||
|
|
||
|
</BODY>
|
||
|
</HTML>
|