GVLCG
Computes all of the eigenvalues of a generalized complex eigensystem Az = λBz.
Required Arguments
A — Complex matrix of order N. (Input)
B — Complex matrix of order N. (Input)
ALPHA — Complex vector of length N. Ultimately, alpha(i)/betav(i) (for i = 1, n), will be the eigenvalues of the system in decreasing order of magnitude. (Output)
BETAV — Complex vector of length N. (Output)
Optional Arguments
N — Order of the matrices A and B. (Input)
Default: N = SIZE (A,2).
LDA — Leading dimension of A exactly as specified in the dimension statement in the calling program. (Input)
Default: LDA = SIZE (A,1).
LDB — Leading dimension of B exactly as specified in the dimension statement in the calling program. (Input)
Default: LDB = SIZE (B,1).
FORTRAN 90 Interface
Generic: CALL GVLCG (A, B, ALPHA, BETAV [,…])
Specific: The specific interface names are S_GVLCG and D_GVLCG.
FORTRAN 77 Interface
Single: CALL GVLCG (N, A, LDA, B, LDB, ALPHA, BETAV)
Double: The double precision name is DGVLCG.
Description
Routine GVLCG computes the eigenvalues of the generalized eigensystem Ax = λBx, where A and B are complex matrices of order n. The eigenvalues for this problem can be infinite; so instead of returning λ, GVLCG returns α and β. If β is nonzero, then λ = α/β. If the eigenvectors are needed, then use GVCCG.
The underlying code is based on either EISPACK or LAPACK code depending upon which supporting libraries are used during linking. For a detailed explanation, see “
Using ScaLAPACK, LAPACK, LINPACK, and EISPACK” in the Introduction section of this manual. Some timing information is given in Hanson et al. (1990).
Comments
1. Workspace may be explicitly provided, if desired, by use of G3LCG/DG3LCG. The reference is:
CALL G3LCG (N, A, LDA, B, LDB, ALPHA, BETAV, ACOPY, BCOPY, CWK, WK, IWK)
The additional arguments are as follows:
ACOPY — Complex work array of length N2. A and ACOPY may be the same, in which case A will be destroyed.
BCOPY — Complex work array of length N2. B and BCOPY may be the same, in which case B will be destroyed.
CWK — Complex work array of length N.
WK — Real work array of length N.
IWK — Integer work array of length N.
2. Informational error
Type | Code | Description |
---|
4 | 1 | The iteration for the eigenvalues failed to converge. |
Example
In this example, DATA statements are used to set A and B. Then, the eigenvalues are computed and printed.
USE GVLCG_INT
USE WRCRN_INT
IMPLICIT NONE
! Declaration of variables
INTEGER LDA, LDB, N
PARAMETER (N=5, LDA=N, LDB=N)
!
INTEGER I
COMPLEX A(LDA,N), ALPHA(N), B(LDB,N), BETAV(N), EVAL(N)
!
! Define values of A and B
!
DATA A/(-238.0,-344.0), (76.0,152.0), (118.0,284.0), &
(-314.0,-160.0), (-54.0,-24.0), (86.0,178.0), &
(-96.0,-128.0), (55.0,-182.0), (132.0,78.0), &
(-205.0,-400.0), (164.0,240.0), (40.0,-32.0), &
(-13.0,460.0), (114.0,296.0), (109.0,148.0), &
(-166.0,-308.0), (60.0,184.0), (34.0,-192.0), &
(-90.0,-164.0), (158.0,312.0), (56.0,158.0), &
(-60.0,-136.0), (-176.0,-214.0), (-424.0,-374.0), &
(-38.0,-96.0)/
DATA B/(388.0,94.0), (-304.0,-76.0), (-658.0,-136.0), &
(-640.0,-10.0), (-162.0,-72.0), (-386.0,-122.0), &
(384.0,64.0), (-73.0,100.0), (204.0,-42.0), (631.0,158.0), &
(-250.0,-14.0), (-160.0,16.0), (-109.0,-250.0), &
(-692.0,-90.0), (131.0,52.0), (556.0,130.0), &
(-240.0,-92.0), (-118.0,100.0), (288.0,66.0), &
(-758.0,-184.0), (-396.0,-62.0), (240.0,68.0), &
(406.0,96.0), (-192.0,154.0), (278.0,76.0)/
!
CALL GVLCG (A, B, ALPHA, BETAV)
! Compute eigenvalues
EVAL = ALPHA/BETAV
! Print results
CALL WRCRN ('EVAL', EVAL, 1, N, 1)
STOP
END
Output
EVAL
1 2 3 4
(-1.000,-1.333) ( 0.765, 0.941) (-0.353, 0.412) (-0.353,-0.412)
5
(-0.353,-0.412)