Previous: reduc2 Up: ../eispad.html Next: rgg


RG(NM,N,A,WR,WI,MATZ,Z,IV1,FV1,IERR)

       SUBROUTINE RG(NM,N,A,WR,WI,MATZ,Z,IV1,FV1,IERR)
 C
       INTEGER N,NM,IS1,IS2,IERR,MATZ
       DOUBLE PRECISION A(NM,N),WR(N),WI(N),Z(NM,N),FV1(N)
       INTEGER IV1(N)
 C
 C     THIS SUBROUTINE CALLS THE RECOMMENDED SEQUENCE OF
 C     SUBROUTINES FROM THE EIGENSYSTEM SUBROUTINE PACKAGE (EISPACK)
 C     TO FIND THE EIGENVALUES AND EIGENVECTORS (IF DESIRED)
 C     OF A REAL GENERAL MATRIX.
 C
 C     ON INPUT
 C
 C        NM  MUST BE SET TO THE ROW DIMENSION OF THE TWO-DIMENSIONAL
 C        ARRAY PARAMETERS AS DECLARED IN THE CALLING PROGRAM
 C        DIMENSION STATEMENT.
 C
 C        N  IS THE ORDER OF THE MATRIX  A.
 C
 C        A  CONTAINS THE REAL GENERAL MATRIX.
 C
 C        MATZ  IS AN INTEGER VARIABLE SET EQUAL TO ZERO IF
 C        ONLY EIGENVALUES ARE DESIRED.  OTHERWISE IT IS SET TO
 C        ANY NON-ZERO INTEGER FOR BOTH EIGENVALUES AND EIGENVECTORS.
 C
 C     ON OUTPUT
 C
 C        WR  AND  WI  CONTAIN THE REAL AND IMAGINARY PARTS,
 C        RESPECTIVELY, OF THE EIGENVALUES.  COMPLEX CONJUGATE
 C        PAIRS OF EIGENVALUES APPEAR CONSECUTIVELY WITH THE
 C        EIGENVALUE HAVING THE POSITIVE IMAGINARY PART FIRST.
 C
 C        Z  CONTAINS THE REAL AND IMAGINARY PARTS OF THE EIGENVECTORS
 C        IF MATZ IS NOT ZERO.  IF THE J-TH EIGENVALUE IS REAL, THE
 C        J-TH COLUMN OF  Z  CONTAINS ITS EIGENVECTOR.  IF THE J-TH
 C        EIGENVALUE IS COMPLEX WITH POSITIVE IMAGINARY PART, THE
 C        J-TH AND (J+1)-TH COLUMNS OF  Z  CONTAIN THE REAL AND
 C        IMAGINARY PARTS OF ITS EIGENVECTOR.  THE CONJUGATE OF THIS
 C        VECTOR IS THE EIGENVECTOR FOR THE CONJUGATE EIGENVALUE.
 C
 C        IERR  IS AN INTEGER OUTPUT VARIABLE SET EQUAL TO AN ERROR
 C           COMPLETION CODE DESCRIBED IN THE DOCUMENTATION FOR HQR
 C           AND HQR2.  THE NORMAL COMPLETION CODE IS ZERO.
 C
 C        IV1  AND  FV1  ARE TEMPORARY STORAGE ARRAYS.
 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