Previous: svd Up: ../eispad.html Next: tql1


TINVIT(NM,N,D,E,E2,M,W,IND,Z,

       SUBROUTINE TINVIT(NM,N,D,E,E2,M,W,IND,Z,
      X                  IERR,RV1,RV2,RV3,RV4,RV6)
 C
       INTEGER I,J,M,N,P,Q,R,S,II,IP,JJ,NM,ITS,TAG,IERR,GROUP
       DOUBLE PRECISION D(N),E(N),E2(N),W(M),Z(NM,M),
      X       RV1(N),RV2(N),RV3(N),RV4(N),RV6(N)
       DOUBLE PRECISION U,V,UK,XU,X0,X1,EPS2,EPS3,EPS4,NORM,ORDER,EPSLON,
      X       PYTHAG
       INTEGER IND(M)
 C
 C     THIS SUBROUTINE IS A TRANSLATION OF THE INVERSE ITERATION TECH-
 C     NIQUE IN THE ALGOL PROCEDURE TRISTURM BY PETERS AND WILKINSON.
 C     HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 418-439(1971).
 C
 C     THIS SUBROUTINE FINDS THOSE EIGENVECTORS OF A TRIDIAGONAL
 C     SYMMETRIC MATRIX CORRESPONDING TO SPECIFIED EIGENVALUES,
 C     USING INVERSE ITERATION.
 C
 C     ON INPUT
 C
 C        NM MUST BE SET TO THE ROW DIMENSION OF TWO-DIMENSIONAL
 C          ARRAY PARAMETERS AS DECLARED IN THE CALLING PROGRAM
 C          DIMENSION STATEMENT.
 C
 C        N IS THE ORDER OF THE MATRIX.
 C
 C        D CONTAINS THE DIAGONAL ELEMENTS OF THE INPUT MATRIX.
 C
 C        E CONTAINS THE SUBDIAGONAL ELEMENTS OF THE INPUT MATRIX
 C          IN ITS LAST N-1 POSITIONS.  E(1) IS ARBITRARY.
 C
 C        E2 CONTAINS THE SQUARES OF THE CORRESPONDING ELEMENTS OF E,
 C          WITH ZEROS CORRESPONDING TO NEGLIGIBLE ELEMENTS OF E.
 C          E(I) IS CONSIDERED NEGLIGIBLE IF IT IS NOT LARGER THAN
 C          THE PRODUCT OF THE RELATIVE MACHINE PRECISION AND THE SUM
 C          OF THE MAGNITUDES OF D(I) AND D(I-1).  E2(1) MUST CONTAIN
 C          0.0D0 IF THE EIGENVALUES ARE IN ASCENDING ORDER, OR 2.0D0
 C          IF THE EIGENVALUES ARE IN DESCENDING ORDER.  IF  BISECT,
 C          TRIDIB, OR  IMTQLV  HAS BEEN USED TO FIND THE EIGENVALUES,
 C          THEIR OUTPUT E2 ARRAY IS EXACTLY WHAT IS EXPECTED HERE.
 C
 C        M IS THE NUMBER OF SPECIFIED EIGENVALUES.
 C
 C        W CONTAINS THE M EIGENVALUES IN ASCENDING OR DESCENDING ORDER.
 C
 C        IND CONTAINS IN ITS FIRST M POSITIONS THE SUBMATRIX INDICES
 C          ASSOCIATED WITH THE CORRESPONDING EIGENVALUES IN W --
 C          1 FOR EIGENVALUES BELONGING TO THE FIRST SUBMATRIX FROM
 C          THE TOP, 2 FOR THOSE BELONGING TO THE SECOND SUBMATRIX, ETC.
 C
 C     ON OUTPUT
 C
 C        ALL INPUT ARRAYS ARE UNALTERED.
 C
 C        Z CONTAINS THE ASSOCIATED SET OF ORTHONORMAL EIGENVECTORS.
 C          ANY VECTOR WHICH FAILS TO CONVERGE IS SET TO ZERO.
 C
 C        IERR IS SET TO
 C          ZERO       FOR NORMAL RETURN,
 C          -R         IF THE EIGENVECTOR CORRESPONDING TO THE R-TH
 C                     EIGENVALUE FAILS TO CONVERGE IN 5 ITERATIONS.
 C
 C        RV1, RV2, RV3, RV4, AND RV6 ARE TEMPORARY STORAGE ARRAYS.
 C
 C     CALLS PYTHAG FOR  DSQRT(A*A + B*B) .
 C
 C     QUESTIONS AND COMMENTS SHOULD BE DIRECTED TO BURTON S. GARBOW,
 C     MATHEMATICS AND COMPUTER SCIENCE DIV, ARGONNE NATIONAL LABORATORY
 C
 C     THIS VERSION DATED AUGUST 1983.
 C
 C     ------------------------------------------------------------------
 C