Previous: bandr Up: ../eispas.html Next: bisect


BANDV(NM,N,MBW,A,E21,M,W,Z,IERR,NV,RV,RV6)

       SUBROUTINE BANDV(NM,N,MBW,A,E21,M,W,Z,IERR,NV,RV,RV6)
 C
       INTEGER I,J,K,M,N,R,II,IJ,JJ,KJ,MB,M1,NM,NV,IJ1,ITS,KJ1,MBW,M21,
      X        IERR,MAXJ,MAXK,GROUP
       REAL A(NM,MBW),W(M),Z(NM,M),RV(NV),RV6(N)
       REAL U,V,UK,XU,X0,X1,E21,EPS2,EPS3,EPS4,NORM,ORDER,
      X       EPSLON,PYTHAG
 C
 C     THIS SUBROUTINE FINDS THOSE EIGENVECTORS OF A REAL SYMMETRIC
 C     BAND MATRIX CORRESPONDING TO SPECIFIED EIGENVALUES, USING INVERSE
 C     ITERATION.  THE SUBROUTINE MAY ALSO BE USED TO SOLVE SYSTEMS
 C     OF LINEAR EQUATIONS WITH A SYMMETRIC OR NON-SYMMETRIC BAND
 C     COEFFICIENT MATRIX.
 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        MBW IS THE NUMBER OF COLUMNS OF THE ARRAY A USED TO STORE THE
 C          BAND MATRIX.  IF THE MATRIX IS SYMMETRIC, MBW IS ITS (HALF)
 C          BAND WIDTH, DENOTED MB AND DEFINED AS THE NUMBER OF ADJACENT
 C          DIAGONALS, INCLUDING THE PRINCIPAL DIAGONAL, REQUIRED TO
 C          SPECIFY THE NON-ZERO PORTION OF THE LOWER TRIANGLE OF THE
 C          MATRIX.  IF THE SUBROUTINE IS BEING USED TO SOLVE SYSTEMS
 C          OF LINEAR EQUATIONS AND THE COEFFICIENT MATRIX IS NOT
 C          SYMMETRIC, IT MUST HOWEVER HAVE THE SAME NUMBER OF ADJACENT
 C          DIAGONALS ABOVE THE MAIN DIAGONAL AS BELOW, AND IN THIS
 C          CASE, MBW=2*MB-1.
 C
 C        A CONTAINS THE LOWER TRIANGLE OF THE SYMMETRIC BAND INPUT
 C          MATRIX STORED AS AN N BY MB ARRAY.  ITS LOWEST SUBDIAGONAL
 C          IS STORED IN THE LAST N+1-MB POSITIONS OF THE FIRST COLUMN,
 C          ITS NEXT SUBDIAGONAL IN THE LAST N+2-MB POSITIONS OF THE
 C          SECOND COLUMN, FURTHER SUBDIAGONALS SIMILARLY, AND FINALLY
 C          ITS PRINCIPAL DIAGONAL IN THE N POSITIONS OF COLUMN MB.
 C          IF THE SUBROUTINE IS BEING USED TO SOLVE SYSTEMS OF LINEAR
 C          EQUATIONS AND THE COEFFICIENT MATRIX IS NOT SYMMETRIC, A IS
 C          N BY 2*MB-1 INSTEAD WITH LOWER TRIANGLE AS ABOVE AND WITH
 C          ITS FIRST SUPERDIAGONAL STORED IN THE FIRST N-1 POSITIONS OF
 C          COLUMN MB+1, ITS SECOND SUPERDIAGONAL IN THE FIRST N-2
 C          POSITIONS OF COLUMN MB+2, FURTHER SUPERDIAGONALS SIMILARLY,
 C          AND FINALLY ITS HIGHEST SUPERDIAGONAL IN THE FIRST N+1-MB
 C          POSITIONS OF THE LAST COLUMN.
 C          CONTENTS OF STORAGES NOT PART OF THE MATRIX ARE ARBITRARY.
 C
 C        E21 SPECIFIES THE ORDERING OF THE EIGENVALUES AND CONTAINS
 C            0.0E0 IF THE EIGENVALUES ARE IN ASCENDING ORDER, OR
 C            2.0E0 IF THE EIGENVALUES ARE IN DESCENDING ORDER.
 C          IF THE SUBROUTINE IS BEING USED TO SOLVE SYSTEMS OF LINEAR
 C          EQUATIONS, E21 SHOULD BE SET TO 1.0E0 IF THE COEFFICIENT
 C          MATRIX IS SYMMETRIC AND TO -1.0E0 IF NOT.
 C
 C        M IS THE NUMBER OF SPECIFIED EIGENVALUES OR THE NUMBER OF
 C          SYSTEMS OF LINEAR EQUATIONS.
 C
 C        W CONTAINS THE M EIGENVALUES IN ASCENDING OR DESCENDING ORDER.
 C          IF THE SUBROUTINE IS BEING USED TO SOLVE SYSTEMS OF LINEAR
 C          EQUATIONS (A-W(R)*I)*X(R)=B(R), WHERE I IS THE IDENTITY
 C          MATRIX, W(R) SHOULD BE SET ACCORDINGLY, FOR R=1,2,...,M.
 C
 C        Z CONTAINS THE CONSTANT MATRIX COLUMNS (B(R),R=1,2,...,M), IF
 C          THE SUBROUTINE IS USED TO SOLVE SYSTEMS OF LINEAR EQUATIONS.
 C
 C        NV MUST BE SET TO THE DIMENSION OF THE ARRAY PARAMETER RV
 C          AS DECLARED IN THE CALLING PROGRAM DIMENSION STATEMENT.
 C
 C     ON OUTPUT
 C
 C        A AND W ARE UNALTERED.
 C
 C        Z CONTAINS THE ASSOCIATED SET OF ORTHOGONAL EIGENVECTORS.
 C          ANY VECTOR WHICH FAILS TO CONVERGE IS SET TO ZERO.  IF THE
 C          SUBROUTINE IS USED TO SOLVE SYSTEMS OF LINEAR EQUATIONS,
 C          Z CONTAINS THE SOLUTION MATRIX COLUMNS (X(R),R=1,2,...,M).
 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, OR IF THE R-TH
 C                     SYSTEM OF LINEAR EQUATIONS IS NEARLY SINGULAR.
 C
 C        RV AND RV6 ARE TEMPORARY STORAGE ARRAYS.  NOTE THAT RV IS
 C          OF DIMENSION AT LEAST N*(2*MB-1).  IF THE SUBROUTINE
 C          IS BEING USED TO SOLVE SYSTEMS OF LINEAR EQUATIONS, THE
 C          DETERMINANT (UP TO SIGN) OF A-W(M)*I IS AVAILABLE, UPON
 C          RETURN, AS THE PRODUCT OF THE FIRST N ELEMENTS OF RV.
 C
 C     CALLS PYTHAG FOR  SQRT(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