Previous: tridib Up: ../eispad.html First: cdiv


TSTURM(NM,N,EPS1,D,E,E2,LB,UB,MM,M,W,Z,

       SUBROUTINE TSTURM(NM,N,EPS1,D,E,E2,LB,UB,MM,M,W,Z,
      X                  IERR,RV1,RV2,RV3,RV4,RV5,RV6)
 C
       INTEGER I,J,K,M,N,P,Q,R,S,II,IP,JJ,MM,M1,M2,NM,ITS,
      X        IERR,GROUP,ISTURM
       DOUBLE PRECISION D(N),E(N),E2(N),W(MM),Z(NM,MM),
      X       RV1(N),RV2(N),RV3(N),RV4(N),RV5(N),RV6(N)
       DOUBLE PRECISION U,V,LB,T1,T2,UB,UK,XU,X0,X1,EPS1,EPS2,EPS3,EPS4,
      X       NORM,TST1,TST2,EPSLON,PYTHAG
 C
 C     THIS SUBROUTINE IS A TRANSLATION OF THE ALGOL PROCEDURE TRISTURM
 C     BY PETERS AND WILKINSON.
 C     HANDBOOK FOR AUTO. COMP., VOL.II-LINEAR ALGEBRA, 418-439(1971).
 C
 C     THIS SUBROUTINE FINDS THOSE EIGENVALUES OF A TRIDIAGONAL
 C     SYMMETRIC MATRIX WHICH LIE IN A SPECIFIED INTERVAL AND THEIR
 C     ASSOCIATED EIGENVECTORS, USING BISECTION AND 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        EPS1 IS AN ABSOLUTE ERROR TOLERANCE FOR THE COMPUTED
 C          EIGENVALUES.  IT SHOULD BE CHOSEN COMMENSURATE WITH
 C          RELATIVE PERTURBATIONS IN THE MATRIX ELEMENTS OF THE
 C          ORDER OF THE RELATIVE MACHINE PRECISION.  IF THE
 C          INPUT EPS1 IS NON-POSITIVE, IT IS RESET FOR EACH
 C          SUBMATRIX TO A DEFAULT VALUE, NAMELY, MINUS THE
 C          PRODUCT OF THE RELATIVE MACHINE PRECISION AND THE
 C          1-NORM OF THE SUBMATRIX.
 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          E2(1) IS ARBITRARY.
 C
 C        LB AND UB DEFINE THE INTERVAL TO BE SEARCHED FOR EIGENVALUES.
 C          IF LB IS NOT LESS THAN UB, NO EIGENVALUES WILL BE FOUND.
 C
 C        MM SHOULD BE SET TO AN UPPER BOUND FOR THE NUMBER OF
 C          EIGENVALUES IN THE INTERVAL.  WARNING. IF MORE THAN
 C          MM EIGENVALUES ARE DETERMINED TO LIE IN THE INTERVAL,
 C          AN ERROR RETURN IS MADE WITH NO VALUES OR VECTORS FOUND.
 C
 C     ON OUTPUT
 C
 C        EPS1 IS UNALTERED UNLESS IT HAS BEEN RESET TO ITS
 C          (LAST) DEFAULT VALUE.
 C
 C        D AND E ARE UNALTERED.
 C
 C        ELEMENTS OF E2, CORRESPONDING TO ELEMENTS OF E REGARDED
 C          AS NEGLIGIBLE, HAVE BEEN REPLACED BY ZERO CAUSING THE
 C          MATRIX TO SPLIT INTO A DIRECT SUM OF SUBMATRICES.
 C          E2(1) IS ALSO SET TO ZERO.
 C
 C        M IS THE NUMBER OF EIGENVALUES DETERMINED TO LIE IN (LB,UB).
 C
 C        W CONTAINS THE M EIGENVALUES IN ASCENDING ORDER IF THE MATRIX
 C          DOES NOT SPLIT.  IF THE MATRIX SPLITS, THE EIGENVALUES ARE
 C          IN ASCENDING ORDER FOR EACH SUBMATRIX.  IF A VECTOR ERROR
 C          EXIT IS MADE, W CONTAINS THOSE VALUES ALREADY FOUND.
 C
 C        Z CONTAINS THE ASSOCIATED SET OF ORTHONORMAL EIGENVECTORS.
 C          IF AN ERROR EXIT IS MADE, Z CONTAINS THOSE VECTORS
 C          ALREADY FOUND.
 C
 C        IERR IS SET TO
 C          ZERO       FOR NORMAL RETURN,
 C          3*N+1      IF M EXCEEDS MM.
 C          4*N+R      IF THE EIGENVECTOR CORRESPONDING TO THE R-TH
 C                     EIGENVALUE FAILS TO CONVERGE IN 5 ITERATIONS.
 C
 C        RV1, RV2, RV3, RV4, RV5, AND RV6 ARE TEMPORARY STORAGE ARRAYS.
 C
 C     THE ALGOL PROCEDURE STURMCNT CONTAINED IN TRISTURM
 C     APPEARS IN TSTURM IN-LINE.
 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