1
2      SUBROUTINE RSG(NM,N,A,B,W,MATZ,Z,FV1,FV2,IERR)
3C***BEGIN PROLOGUE  RSG
4C***DATE WRITTEN   760101   (YYMMDD)
5C***REVISION DATE  830518   (YYMMDD)
6C***CATEGORY NO.  D4B1
7C***KEYWORDS  EIGENVALUES,EIGENVECTORS,EISPACK
8C***AUTHOR  SMITH, B. T., ET AL.
9C***PURPOSE  Computes eigenvalues and, optionally, eigenvectors of
10C            symmetric generalized eigenproblem: A*X=(LAMBDA)*B*X
11C***DESCRIPTION
12C
13C     This subroutine calls the recommended sequence of
14C     subroutines from the eigensystem subroutine package (EISPACK)
15C     To find the eigenvalues and eigenvectors (if desired)
16C     for the REAL SYMMETRIC generalized eigenproblem  Ax = (LAMBDA)Bx.
17C
18C     On Input
19C
20C        NM  must be set to the row dimension of the two-dimensional
21C        array parameters as declared in the calling program
22C        dimension statement.
23C
24C        N  is the order of the matrices  A  and  B.
25C
26C        A  contains a real symmetric matrix.
27C
28C        B  contains a positive definite real symmetric matrix.
29C
30C        MATZ  is an integer variable set equal to zero if
31C        only eigenvalues are desired.  Otherwise it is set to
32C        any non-zero integer for both eigenvalues and eigenvectors.
33C
34C     On Output
35C
36C        W  contains the eigenvalues in ascending order.
37C
38C        Z  contains the eigenvectors if MATZ is not ZERO.
39C
40C        IERR  is an integer output variable set equal to an
41C        error completion code described in section 2B of the
42C        documentation.  The normal completion code is zero.
43C
44C        FV1  and  FV2  are temporary storage arrays.
45C
46C     Questions and comments should be directed to B. S. Garbow,
47C     APPLIED MATHEMATICS DIVISION, ARGONNE NATIONAL LABORATORY
48C     ------------------------------------------------------------------
49C***REFERENCES  B. T. SMITH, J. M. BOYLE, J. J. DONGARRA, B. S. GARBOW,
50C                 Y. IKEBE, V. C. KLEMA, C. B. MOLER, *MATRIX EIGEN-
51C                 SYSTEM ROUTINES - EISPACK GUIDE*, SPRINGER-VERLAG,
52C                 1976.
53C***ROUTINES CALLED  REBAK,REDUC,TQL2,TQLRAT,TRED1,TRED2
54C***END PROLOGUE  RSG
55
56
57