| Subroutine | Method |
| JCG() | Jacobi Conjugate Gradient |
| JSI() | Jacobi Semi-Iteration |
| SOR() | Successive Overrelaxation |
| SSORCG() | Symmetric SOR Conjugate Gradient |
| SSORSI() | Symmetric SOR Semi-Iteration |
| RSCG() | Reduced System Conjugate Gradient |
| RSSI() | Reduced System Semi-Iteration |
and the calling sequence is:
where the parameters are defined in the following. Here ``input" means
that the subroutine expects the user to provide the necessary input data
and ``output" means that the routine passes back information in the
variable or array indicated. All parameters are linear arrays except
variables N, NW, and IER. Moreover, all parameters may
be altered by the subroutine call except variables N and
NW. (See Section 7 for additional details.)
The user may supply nondefault values for selected quantities in
IPARM(*) and
RPARM(*) by first executing
and then assigning the appropriate nondefault values before calling a
solution module of ITPACK.
The iterative algorithms used in ITPACK are quite complicated and some
knowledge of iterative methods is necessary to completely understand
them. The interested reader should consult the technical report [4]
and the book [6] for details. Important variables in this package
which may change adaptively are CME (estimate of M(B), the largest
eigenvalue of the Jacobi matrix), SME (estimate of m(B), the
smallest eigenvalue of the Jacobi matrix), OMEGA (overrelaxation
parameter
for the SOR and SSOR methods), SPECR (estimated spectral
radius of the SSOR matrix), BETAB (estimate for the spectral radius
of the matrix LU where L and U are strictly lower and upper
triangular matrices, respectively, such that the Jacobi matrix B=L+U).
The integer array IPARM(*) and real array RPARM(*) allow
the user to control certain parameters which affect the performance
of the iterative algorithms. Furthermore, these arrays allow the updated
parameters from the automatic adaptive procedures to be communicated
back to the user. The entries in IPARM(*) and RPARM(*) are:
| [<0: | no output on unit IPARM(4); |
| 0: | fatal error messages only; |
| 1: | warning messages and minimum output; |
| 2: | reasonable summary (progress of algorithm); |
| 3: | parameter values and informative comments; |
| 4: | approximate solution after each iteration (primarily useful for debugging); |
| 5: | original system] |
| [0: | implies certain values of IPARM(*) and RPARM(*) will be overwritten |
| to communicate parameters back to the user; | |
| only IPARM(1) and IPARM(8) will be reset.] |
| [0: | symmetric sparse storage; |
| 1: | nonsymmetric sparse storage] |
| [0: | fixed iterative parameters used for SME, CME, OMEGA, SPECR, and |
| BETAB (nonadaptive); | |
| 1: | fully adaptive procedures used for all parameters; |
| 2: | (SSOR methods only) SPECR determined adaptively and CME, BETAB, |
| and OMEGA fixed; | |
| 3: | (SSOR methods only) BETAB fixed and all other parameters determined |
| adaptively] |
(See [4,6] for details and
for CME, SME, OMEGA, SPECR,
BETAB, respectively. These parameters are set
by subroutine DFAULT() or by the user.)
| [ |
Case I: Fixed
|
| =2 | Case II: Use when it is known that
|
The case switch determines how the estimates for
SME and CME are recomputed adaptively. In
Case I, SME is fixed throughout and should be less
than or equal to m(B). In Case II, SME is set
to
which may adaptively change. As far as
the adaptive procedure is concerned, Case I is the most
general case and should be specified in the absence of
specific knowledge of the relationship between the
eigenvalues and their estimates. An example when Case II
is appropriate occurs when the Jacobi matrix has
Property A, since
m(B) = -M(B).6 Also, if A is an L-matrix,
then for the Jacobi matrix, we have
and SME is always
(Case II).
7 Selecting the
correct case may increase the rate of convergence of
the iterative method. (See [6] for additional
discussion on Case I and II. Also, see
for CME, SME,
respectively.)
| <0: | compute red-black indexing and permute system; |
| skip indexing--system already in red-black form; |
For other methods,
| <0: | skip indexing--system already in desired form; |
| compute red-black indexing and permute system] |
A negative integer value for IPARM(9) causes the equations to be handled in the most general way appropriate for the solution method being used. For methods other than RS methods this is the ``natural order" while for RS methods it is the ``red-black order." A non-negative value produces a red-black permutation for all methods except for the RS methods which are assumed to be in red-black order with the order of the black subsystem NB given. If reindexing is performed, IPARM(9) will contain the order of the black subsystem on output.
| [<0: | skip error analysis |
| 0: | compute DIGIT1 and DIGIT2 and
store in
|
| respectively; | |
| 1: | print DIGIT1 and DIGIT2; |
| 2: | print final approximate solution vector; |
| 3: | print final approximate residual vector; |
| 4: | print both solution and residual vectors; |
| otherwise: no printing] |
(If
,
no printing is done. See
for details on DIGIT1
and DIGIT2.)
DIGIT1 is determined from the actual stopping test computed on
the final iteration, whereas DIGIT2 is based on the computed
residual vector using the final approximate solution after the algorithm
has converged. If these values differ greatly, then either the stopping
test has not worked successfully or the original system is ill-conditioned.
(See [6] for additional details.)
For storage of certain intermediate results, the solution modules
require a real vector WKSP(*) and a corresponding variable NW
indicating the available space. The length of the workspace array varies
with each solution module and the maximum amount needed is given in
the following table.
Solution Module
Maximum Length of WKSP(*)
JCG()
![]()
JSI()
![]()
SOR()
![]()
SSORCG()
![]()
SSORSI()
![]()
RSCG()
![]()
RSSI()
![]()
The value of NCG is
for symmetric sparse storage
and
for nonsymmetric sparse storage. It should be noted
that the actual amount of workspace used may be somewhat less than these
upper limits since some of the latter are dependent on the maximum number
of iterations allowed, ITMAX, stored in IPARM(1). Clearly,
the array WKSP(*) must be dimensioned to at least the value of
NW.
Nonzero integer values of the error flag IER indicate that an error
condition was detected. These values are listed below according to
their numerical value and to the name of the routine in which the flag
was set.
Error Flag
Meaning
![]()
0,
Normal convergence was obtained.
=
,Invalid order of the system, N.
=
,Workspace array WKSP(*) is not large
enough. IPARM(8)
is set to the amount of required workspace,
NW.
=
,Failure to converge in IPARM(1)
iterations. RPARM(1)
is reset to the last stopping value computed.
=
,Invalid order of the black subsystem, NB.
=
101,
A diagonal element is not positive.
=
102,
No diagonal element in a row.
=
201,
Red-black indexing is not possible.
=
301,
No entry in a row of the original matrix.
=
302,
No entry in a row of the permuted matrix.
=
303,
Sorting error in a row of the permuted matrix.
=
401,
A diagonal element is not positive.
=
402,
No diagonal element in a row.
=
501,
Failure to converge in ITMAX
function evaluations.
=
502,
Function does not change sign at the endpoints.
=
601,
Successive iterates are not monotone increasing.
JCG(), JSI(), SOR(), SSORCG(), SSORSI(),
RSCG(), RSSI() assign values to Mth of 10,20,30,40,50,60,70,
respectively. SBELM(), PRBNDX(), PERMAT(),
SCAL(), ZBRENT(), EQRT1S() are subroutines with
error flags in the 100's, 200's, 300's, 400's, 500's, 600's, respectively.
These routines perform the following functions: SBELM() removes
rows and columns, PRBNDX() determines the red-black indexing,
SCAL() scales the system, ZBRENT() is a modified IMSL routine
for computing a zero of a function which changes sign in a given
interval, EQRT1S() is a modified IMSL routine for computing the
largest eigenvalue of a symmetric tridiagonal matrix.9
Next: User-Oriented Modules
Up: ITPACK 2C: A FORTRAN
Previous: Sparse Matrix Storage