znaupd

Interface for the Implicitly Restarted Arnoldi Iteration, to
compute a few eigenpairs of a complex linear operator OP with respect to a
semi-inner product defined by a hermitian positive semi-definite real
matrix B.
This function is obsolete. Please use eigs

Syntax

Arguments

IDO

Integer. (INPUT/OUTPUT)

Reverse communication flag. IDO must be zero on the first call
to znaupd. IDO will be set internally to indicate the type of
operation to be performed. Control is then given back to the calling
routine which has the responsibility to carry out the requested
operation and call znaupd with the result.

The operand is given in WORKD(IPNTR(1)), the result must be
put in WORKD(IPNTR(2)).

IDO = 0: first call to the reverse communication interface

IDO = -1: compute Y = OP * X where IPNTR(1) is the pointer
into WORKD for X, IPNTR(2) is the pointer into WORKD for Y.

This is for the initialization phase to force the starting
vector into the range of OP.

IDO = 1: compute Y = OP * X where IPNTR(1) is the pointer
into WORKD for X, IPNTR(2) is the pointer into WORKD for Y.

In mode 3, the vector B * X is already available in
WORKD(ipntr(3)). It does not need to be recomputed in forming OP
* X.

IDO = 2: compute Y = M * X where IPNTR(1) is the pointer
into WORKD for X, IPNTR(2) is the pointer into WORKD for
Y.

IDO = 3: compute and return the shifts in the first NP
locations of WORKL.

IDO = 99: done

After the initialization phase, when the routine is used in
the "shift-and-invert" mode, the vector M * X is already available
and does not need to be recomputed in forming OP*X.

BMAT

Character. (INPUT)

specifies the type of the matrix B that defines the
semi-inner product for the operator OP.

'I': standard eigenvalue problem A * x = lambda * x

'G': generalized eigenvalue problem A * x =
lambda * M * x

N

Integer. (INPUT)

Dimension of the eigenproblem.

WHICH

string of length 2. (INPUT)

'LM': want the NEV eigenvalues of largest
magnitude.

'SM': want the NEV eigenvalues of smallest
magnitude.

'LR': want the NEV eigenvalues of largest real
part.

'SR': want the NEV eigenvalues of smallest real part.

'LI': want the NEV eigenvalues of largest imaginary
part.

'SI': want the NEV eigenvalues of smallest imaginary
part.

NEV

Integer. (INPUT)

Number of eigenvalues of OP to be computed. 0 < NEV <
N - 1.

TOL

Double precision scalar. (INPUT)

Stopping criteria: the relative accuracy of the Ritz value is
considered acceptable if BOUNDS(I) .LE. TOL * ABS(RITZ(I)) where
ABS(RITZ(I)) is the magnitude when RITZ(I) is complex. DEFAULT =
dlamch('EPS') (machine precision as computed by the LAPACK auxiliary
subroutine dlamch).

Number of columns of the matrix V. NCV must satisfy the two
inequalities 2 <= NCV - NEV and NCV <= N.

This will indicate how many Arnoldi vectors are generated at
each iteration. After the startup phase in which NEV Arnoldi vectors
are generated, the algorithm generates approximately NCV - NEV Arnoldi
vectors at each subsequent update iteration. Most of the cost in
generating each Arnoldi vector is in the matrix-vector operation
OP * x. (See remark 4 below.)

V

Complex*16 array N by NCV. (OUTPUT)

Contains the final set of Arnoldi basis vectors.

IPARAM

Integer array of length 11. (INPUT/OUTPUT)

IPARAM(1) = ISHIFT: method for selecting the implicit
shifts. The shifts selected at each iteration are used to filter
out the components of the unwanted eigenvector.

ISHIFT = 0: the shifts are to be provided by the user
via reverse communication. The NCV eigenvalues of the
Hessenberg matrix H are returned in the part of WORKL array
corresponding to RITZ.

ISHIFT = 1: exact shifts with respect to the current
Hessenberg matrix H. This is equivalent to restarting the
iteration from the beginning after updating the starting
vector with a linear combination of Ritz vectors associated
with the "wanted" eigenvalues.

ISHIFT = 2: other choice of internal shift to be
defined.

IPARAM(2) = No longer referenced

IPARAM(3) = MXITER

On INPUT: maximum number of Arnoldi update iterations
allowed.

On OUTPUT: actual number of Arnoldi update iterations
taken.

IPARAM(4) = NB: blocksize to be used in the recurrence.
The code currently works only for NB = 1.

IPARAM(5) = NCONV: number of "converged" Ritz values. This
represents the number of Ritz values that satisfy the
convergence criterion.

Description

Reverse communication interface for the Implicitly Restarted Arnoldi
iteration. This is intended to be used to find a few eigenpairs of a
complex linear operator OP with respect to a semi-inner product defined by
a hermitian positive semi-definite real matrix B. B may be the identity
matrix.

NOTE: if both OP and B are real, then dsaupd or dnaupd should be
used.

The computed approximate eigenvalues are called Ritz values and the
corresponding approximate eigenvectors are called Ritz vectors. znaupd is
usually called iteratively to solve one of the following problems:

NOTE: The action of w <- inv[A - sigma * M] * v or w <- inv[M] * v
should be accomplished either by a direct method using a sparse matrix
factorization and solving

[A - sigma * M] * w = v or M * w = v,

or through an iterative method for solving these systems. If an
iterative method is used, the convergence test must be more stringent than
the accuracy requirements for the eigenvalue approximations.

Remarks

The computed Ritz values are approximate eigenvalues of OP. The
selection of WHICH should be made with this in mind when using Mode =
3. When operating in Mode = 3 setting WHICH = 'LM' will compute the
NEV eigenvalues of the original problem that are closest to the shift
SIGMA . After convergence, approximate eigenvalues of the original
problem may be obtained with the ARPACK subroutine zneupd.

If a basis for the invariant subspace corresponding to the
converged Ritz values is needed, the user must call zneupd immediately
following completion of znaupd. This is new starting with release 2 of
ARPACK.

If M can be factored into a Cholesky factorization M = LL` then
Mode = 2 should not be selected. Instead one should use Mode = 1 with
OP = inv(L) * A * inv(L`). Appropriate triangular linear systems should be
solved with L and L` rather than computing inverses. After
convergence, an approximate eigenvector z of the original problem is
recovered by solving L`z = x where x is a Ritz vector of OP.

At present there is no a-priori analysis to guide the selection
of NCV relative to NEV. The only formal requirement is that NCV >
NEV + 1. However, it is recommended that NCV .ge. 2 * NEV. If many
problems of the same type are to be solved, one should experiment with
increasing NCV while keeping NEV fixed for a given test problem. This
will usually decrease the required number of OP*x operations but it
also increases the work and storage required to maintain the
orthogonal basis vectors. The optimal "cross-over" with respect to CPU
time is problem dependent and must be determined empirically. See
Chapter 8 of Reference 2 for further information.

Eigenvalues of the current upper Hessenberg matrix are located
in WORKL(IPNTR(6)) through WORKL(IPNTR(6)+NCV-1). They are ordered
according to the order defined by WHICH. The associated Ritz estimates
are located in

WORKL(IPNTR(8)), WORKL(IPNTR(8)+1), ... ,
WORKL(IPNTR(8)+NCV-1).

Example

// The following sets dimensions for this problem.nx=10;nev=3;ncv=6;bmat='I';which='LM';// Local Arraysiparam=zeros(11,1);ipntr=zeros(14,1);_select=zeros(ncv,1);d=zeros(nev+1,1)+0*%i;z=zeros(nx,nev)+0*%i;resid=zeros(nx,1)+0*%i;v=zeros(nx,ncv)+0*%i;workd=zeros(3*nx,1)+0*%i;workev=zeros(2*ncv,1)+0*%i;rwork=zeros(ncv,1);workl=zeros(3*ncv*ncv+5*ncv,1)+0*%i;// Build the complex test matrixA=diag(10*ones(nx,1)+%i*ones(nx,1));A(1:$-1,2:$)=A(1:$-1,2:$)+diag(6*ones(nx-1,1));A(2:$,1:$-1)=A(2:$,1:$-1)+diag(-6*ones(nx-1,1));tol=0;ido=0;ishfts=1;maxitr=300;mode1=1;iparam(1)=ishfts;iparam(3)=maxitr;iparam(7)=mode1;sigma=complex(0);info_znaupd=0;// M A I N L O O P (Reverse communication)while(ido<>99)// Repeatedly call the routine ZNAUPD and take actions indicated by parameter IDO until// either convergence is indicated or maxitr has been exceeded.[ido,resid,v,iparam,ipntr,workd,workl,rwork,info_znaupd]=znaupd(ido,bmat,nx,which,nev,tol,resid,ncv,v,iparam,ipntr,workd,workl,rwork,info_znaupd);if(info_znaupd<0)printf('\nError with znaupd, info = %d\n',info_znaupd);printf('Check the documentation of znaupd\n\n');endif(ido==-1|ido==1)// Perform matrix vector multiplicationworkd(ipntr(2):ipntr(2)+nx-1)=A*workd(ipntr(1):ipntr(1)+nx-1);endend// Post-Process using ZNEUPD.rvec=1;howmany='A';info_zneupd=0;[d,z,resid,iparam,ipntr,workd,workl,rwork,info_zneupd]=zneupd(rvec,howmany,_select,d,z,sigma,workev,bmat,nx,which,nev,tol,resid,ncv,v,...iparam,ipntr,workd,workl,rwork,info_zneupd);if(info_zneupd<0)printf('\nError with zneupd, info = %d\n',info_zneupd);printf('Check the documentation of zneupd.\n\n');end// Done with program znsimp.printf('\nZNSIMP\n');printf('======\n');printf('\n');printf('Size of the matrix is %d\n',nx);printf('The number of Ritz values requested is %d\n',nev);printf('The number of Arnoldi vectors generated (NCV) is %d\n',ncv);printf('What portion of the spectrum: %s\n',which);printf('The number of Implicit Arnoldi update iterations taken is %d\n',iparam(3));printf('The number of OP*x is %d\n',iparam(9));printf('The convergence criterion is %d\n',tol);

See also

dnaupd — Interface for the Implicitly Restarted Arnoldi Iteration, to
compute approximations to a few eigenpairs of a real linear
operator
This function is obsolete. Please use eigs

dneupd — Interface for the Implicitly Restarted Arnoldi Iteration, to
compute approximations to a few eigenpairs of a real linear
operator
This function is obsolete. Please use eigs

zneupd — Interface for the Implicitly Restarted Arnoldi Iteration, to
compute approximations to a few eigenpairs of a real linear
operator
This function is obsolete. Please use eigs