     Next: ARPACK subroutines Up: ARPACK Users' Guide: Solution Previous: Stopping Criterion

# Computational Routines

This chapter will discuss the implementation details of the main computational routines   of ARPACK. We first give an outline of the code structure. This shows how the Implicitly Restarted Arnoldi/Lanczos Method that was described in Algorithm 3 of Chapter 4 is modularized. Each of the basic steps described in the algorithm defines a subroutine module, i.e. a computational routine. The basic tasks and salient implementation details are presented here for each of these computational routines.

ARPACK relies heavily upon a number of basic operations and algorithms provided by the BLAS  and LAPACK . These have contributed greatly to the robustness, accuracy, and computational performance of ARPACK. The most important of these with respect to performance is the BLAS subroutine _gemv . For a fixed number nev of requested eigenvalues and a fixed length ncv Arnoldi basis, the computational cost   scales linearly with n, the order of the matrix. The rate of execution   (in FLOPS) for the IRA iteration is asymptotic to the rate of execution of _gemv.

In the outline of the implementation described in Figure 5.1, is a upper Hessenberg matrix, , and the residual vector is -orthogonal   to the columns of . For each j,

where OP and are defined with respect to one of the computational modes described in Chapter 3.

The integer k denotes the desired number of eigenvalue approximations and this may, at times, be greater than the users request for nev approximations. The integer will be the largest size factorization constructed. An eigenvalue of is a Ritz value of OP and is the corresponding Ritz vector when (A formal definition of Ritz value and vector is given in Chap. 4). The normalization is assumed throughout.

 Perform basic error checks, partition the internal workspace. Set and . Enter XYaup2. Generate a random initial vector by calling Xgetv0, unless the initial vector is provided by the caller. Call XYaitr to compute the initial Arnoldi/Lanczos factorization of length For iter maxiter , Call XYaitr to extend the length Arnoldi/Lanczos factorization to a length factorization. Reverse communication is performed to compute matrix-vector products with and possibly . Compute the eigenvalues of and the associated error bounds. Call Xseigt for the symmetric eigenvalue problem or Xneigh otherwise. Call XYgets to partition the eigenvalues into two sets and . The eigenvalues in the set are the desired approximations while the remaining eigenvalues in the set are to be used as shifts. Call XYconv to determine how many of the wanted Ritz values satisfy the convergence tolerance. Exit the loop if all eigenvalues in satisfy the convergence criterion, or if iter > maxiter. Possibly increment Determine shifts . If the exact shift strategy is used, the eigenvalues of are used as shifts, otherwise the shifts are provided through a reverse communication interface. If , exit the loop. Implicitly restart the Arnoldi/Lanczos factorization by calling XYapps. Perform steps of the implicitly shifted QR algorithm on with shifts to get where and are upper Hessenberg and orthogonal matrices, respectively. Let denote the matrix consisting of the first columns of and the leading principal submatrix of of order Update to get the new length Arnoldi factorization (See Algorithm 3, Chapter 4 ). End For Call XYeupd for computing Ritz and/or Schur vectors and for transforming the Ritz values of if a spectral transformation was used.     Next: ARPACK subroutines Up: ARPACK Users' Guide: Solution Previous: Stopping Criterion
Chao Yang
11/7/1997