org.netlib.arpack
Class Dnaup2
java.lang.Object
org.netlib.arpack.Dnaup2
public class Dnaup2
- extends java.lang.Object
Following is the description from the original
Fortran source. For each array argument, the Java
version will include an integer offset parameter, so
the arguments may not match the description exactly.
Contact seymour@cs.utk.edu with any questions.
*\BeginDoc
\Name: dnaup2
\Description:
Intermediate level interface called by dnaupd.
\Usage:
call dnaup2
( IDO, BMAT, N, WHICH, NEV, NP, TOL, RESID, MODE, IUPD,
ISHIFT, MXITER, V, LDV, H, LDH, RITZR, RITZI, BOUNDS,
Q, LDQ, WORKL, IPNTR, WORKD, INFO )
\Arguments
IDO, BMAT, N, WHICH, NEV, TOL, RESID: same as defined in dnaupd.
MODE, ISHIFT, MXITER: see the definition of IPARAM in dnaupd.
NP Integer. (INPUT/OUTPUT)
Contains the number of implicit shifts to apply during
each Arnoldi iteration.
If ISHIFT=1, NP is adjusted dynamically at each iteration
to accelerate convergence and prevent stagnation.
This is also roughly equal to the number of matrix-vector
products (involving the operator OP) per Arnoldi iteration.
The logic for adjusting is contained within the current
subroutine.
If ISHIFT=0, NP is the number of shifts the user needs
to provide via reverse comunication. 0 < NP < NCV-NEV.
NP may be less than NCV-NEV for two reasons. The first, is
to keep complex conjugate pairs of "wanted" Ritz values
together. The second, is that a leading block of the current
upper Hessenberg matrix has split off and contains "unwanted"
Ritz values.
Upon termination of the IRA iteration, NP contains the number
of "converged" wanted Ritz values.
IUPD Integer. (INPUT)
IUPD .EQ. 0: use explicit restart instead implicit update.
IUPD .NE. 0: use implicit update.
V Double precision N by (NEV+NP) array. (INPUT/OUTPUT)
The Arnoldi basis vectors are returned in the first NEV
columns of V.
LDV Integer. (INPUT)
Leading dimension of V exactly as declared in the calling
program.
H Double precision (NEV+NP) by (NEV+NP) array. (OUTPUT)
H is used to store the generated upper Hessenberg matrix
LDH Integer. (INPUT)
Leading dimension of H exactly as declared in the calling
program.
RITZR, Double precision arrays of length NEV+NP. (OUTPUT)
RITZI RITZR(1:NEV) (resp. RITZI(1:NEV)) contains the real (resp.
imaginary) part of the computed Ritz values of OP.
BOUNDS Double precision array of length NEV+NP. (OUTPUT)
BOUNDS(1:NEV) contain the error bounds corresponding to
the computed Ritz values.
Q Double precision (NEV+NP) by (NEV+NP) array. (WORKSPACE)
Private (replicated) work array used to accumulate the
rotation in the shift application step.
LDQ Integer. (INPUT)
Leading dimension of Q exactly as declared in the calling
program.
WORKL Double precision work array of length at least
(NEV+NP)**2 + 3*(NEV+NP). (INPUT/WORKSPACE)
Private (replicated) array on each PE or array allocated on
the front end. It is used in shifts calculation, shifts
application and convergence checking.
On exit, the last 3*(NEV+NP) locations of WORKL contain
the Ritz values (real,imaginary) and associated Ritz
estimates of the current Hessenberg matrix. They are
listed in the same order as returned from dneigh.
If ISHIFT .EQ. O and IDO .EQ. 3, the first 2*NP locations
of WORKL are used in reverse communication to hold the user
supplied shifts.
IPNTR Integer array of length 3. (OUTPUT)
Pointer to mark the starting locations in the WORKD for
vectors used by the Arnoldi iteration.
-------------------------------------------------------------
IPNTR(1): pointer to the current operand vector X.
IPNTR(2): pointer to the current result vector Y.
IPNTR(3): pointer to the vector B * X when used in the
shift-and-invert mode. X is the current operand.
-------------------------------------------------------------
WORKD Double precision work array of length 3*N. (WORKSPACE)
Distributed array to be used in the basic Arnoldi iteration
for reverse communication. The user should not use WORKD
as temporary workspace during the iteration !!!!!!!!!!
See Data Distribution Note in DNAUPD.
INFO Integer. (INPUT/OUTPUT)
If INFO .EQ. 0, a randomly initial residual vector is used.
If INFO .NE. 0, RESID contains the initial residual vector,
possibly from a previous run.
Error flag on output.
= 0: Normal return.
= 1: Maximum number of iterations taken.
All possible eigenvalues of OP has been found.
NP returns the number of converged Ritz values.
= 2: No shifts could be applied.
= -8: Error return from LAPACK eigenvalue calculation;
This should never happen.
= -9: Starting vector is zero.
= -9999: Could not build an Arnoldi factorization.
Size that was built in returned in NP.
\EndDoc
-----------------------------------------------------------------------
\BeginLib
\Local variables:
xxxxxx real
\References:
1. D.C. Sorensen, "Implicit Application of Polynomial Filters in
a k-Step Arnoldi Method", SIAM J. Matr. Anal. Apps., 13 (1992),
pp 357-385.
2. R.B. Lehoucq, "Analysis and Implementation of an Implicitly
Restarted Arnoldi Iteration", Rice University Technical Report
TR95-13, Department of Computational and Applied Mathematics.
\Routines called:
dgetv0 ARPACK initial vector generation routine.
dnaitr ARPACK Arnoldi factorization routine.
dnapps ARPACK application of implicit shifts routine.
dnconv ARPACK convergence of Ritz values routine.
dneigh ARPACK compute Ritz values and error bounds routine.
dngets ARPACK reorder Ritz values and error bounds routine.
dsortc ARPACK sorting routine.
ivout ARPACK utility routine that prints integers.
second ARPACK utility routine for timing.
dmout ARPACK utility routine that prints matrices
dvout ARPACK utility routine that prints vectors.
dlamch LAPACK routine that determines machine constants.
dlapy2 LAPACK routine to compute sqrt(x**2+y**2) carefully.
dcopy Level 1 BLAS that copies one vector to another .
ddot Level 1 BLAS that computes the scalar product of two vectors.
dnrm2 Level 1 BLAS that computes the norm of a vector.
dswap Level 1 BLAS that swaps two vectors.
\Author
Danny Sorensen Phuong Vu
Richard Lehoucq CRPC / Rice University
Dept. of Computational & Houston, Texas
Applied Mathematics
Rice University
Houston, Texas
\SCCS Information: @(#)
FILE: naup2.F SID: 2.8 DATE OF SID: 10/17/00 RELEASE: 2
\Remarks
1. None
\EndLib
-----------------------------------------------------------------------
Field Summary |
static boolean |
cnorm
|
static double |
eps23
|
static boolean |
getv0
|
static boolean |
initv
|
static org.netlib.util.intW |
iter
|
static org.netlib.util.intW |
kplusp
|
static int |
msglvl
|
static org.netlib.util.intW |
nconv
|
static int |
nev0
|
static int |
nevbef
|
static int |
np0
|
static int |
numcnv
|
static org.netlib.util.doubleW |
rnorm
|
static org.netlib.util.floatW |
t0
|
static org.netlib.util.floatW |
t1
|
static org.netlib.util.floatW |
t2
|
static org.netlib.util.floatW |
t3
|
static float |
t4
|
static float |
t5
|
static boolean |
update
|
static boolean |
ushift
|
Method Summary |
static void |
dnaup2(org.netlib.util.intW ido,
java.lang.String bmat,
int n,
java.lang.String which,
org.netlib.util.intW nev,
org.netlib.util.intW np,
double tol,
double[] resid,
int _resid_offset,
int mode,
int iupd,
int ishift,
org.netlib.util.intW mxiter,
double[] v,
int _v_offset,
int ldv,
double[] h,
int _h_offset,
int ldh,
double[] ritzr,
int _ritzr_offset,
double[] ritzi,
int _ritzi_offset,
double[] bounds,
int _bounds_offset,
double[] q,
int _q_offset,
int ldq,
double[] workl,
int _workl_offset,
int[] ipntr,
int _ipntr_offset,
double[] workd,
int _workd_offset,
org.netlib.util.intW info)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
t0
public static org.netlib.util.floatW t0
t1
public static org.netlib.util.floatW t1
t2
public static org.netlib.util.floatW t2
t3
public static org.netlib.util.floatW t3
t4
public static float t4
t5
public static float t5
cnorm
public static boolean cnorm
getv0
public static boolean getv0
initv
public static boolean initv
update
public static boolean update
ushift
public static boolean ushift
iter
public static org.netlib.util.intW iter
kplusp
public static org.netlib.util.intW kplusp
msglvl
public static int msglvl
nconv
public static org.netlib.util.intW nconv
nevbef
public static int nevbef
nev0
public static int nev0
np0
public static int np0
numcnv
public static int numcnv
rnorm
public static org.netlib.util.doubleW rnorm
eps23
public static double eps23
Dnaup2
public Dnaup2()
dnaup2
public static void dnaup2(org.netlib.util.intW ido,
java.lang.String bmat,
int n,
java.lang.String which,
org.netlib.util.intW nev,
org.netlib.util.intW np,
double tol,
double[] resid,
int _resid_offset,
int mode,
int iupd,
int ishift,
org.netlib.util.intW mxiter,
double[] v,
int _v_offset,
int ldv,
double[] h,
int _h_offset,
int ldh,
double[] ritzr,
int _ritzr_offset,
double[] ritzi,
int _ritzi_offset,
double[] bounds,
int _bounds_offset,
double[] q,
int _q_offset,
int ldq,
double[] workl,
int _workl_offset,
int[] ipntr,
int _ipntr_offset,
double[] workd,
int _workd_offset,
org.netlib.util.intW info)