EVCCG

   more...
Computes all of the eigenvalues and eigenvectors of a complex matrix.
Required Arguments
A — Complex matrix of order N. (Input)
EVAL — Complex vector of length N containing the eigenvalues of A in decreasing order of magnitude. (Output)
EVEC — Complex matrix of order N. (Output)
The J-th eigenvector, corresponding to EVAL(J), is stored in the J-th column. Each vector is normalized to have Euclidean length equal to the value one.
Optional Arguments
N — Order of the matrix A. (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).
LDEVEC — Leading dimension of EVEC exactly as specified in the dimension statement in the calling program. (Input)
Default: LDEVEC = SIZE (EVEC,1).
FORTRAN 90 Interface
Generic: CALL EVCCG (A, EVAL, EVEC [,])
Specific: The specific interface names are S_EVCCG and D_EVCCG.
FORTRAN 77 Interface
Single: CALL EVCCG (N, A, LDA, EVAL, EVEC, LDEVEC)
Double: The double precision name is DEVCCG.
Description
Routine EVCCG computes the eigenvalues and eigenvectors of a complex matrix. The matrix is first balanced. Unitary similarity transformations are used to reduce this balanced matrix to a complex upper Hessenberg matrix. The QR algorithm is used to compute the eigenvalues and eigenvectors of this Hessenberg matrix. The eigenvectors of the original matrix are computed by transforming the eigenvectors of the complex upper Hessenberg matrix.
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.
Comments
1. Workspace may be explicitly provided, if desired, by use of E6CCG/DE6CCG. The reference is:
CALL E6CCG (N, A, LDA, EVAL, EVEC, LDEVEC, ACOPY, RWK, CWK, IWK)
The additional arguments are as follows:
ACOPY — Complex work array of length N2. The arrays A and ACOPY may be the same, in which case the first N2 elements of A will be destroyed.
RWK — Work array of length N.
CWK — Complex work array of length 2N.
IWK — Integer work array of length N.
2. Informational error
Type
Code
Description
4
1
The iteration for the eigenvalues failed to converge. No eigenvalues or eigenvectors are computed.
3. Integer Options with Chapter 11 Options Manager
1 This option uses eight values to solve memory bank conflict (access inefficiency) problems. In routine E6CCG, the internal or working leading dimensions of ACOPY and ECOPY are both increased by IVAL(3) when N is a multiple of IVAL(4). The values IVAL(3) and IVAL(4) are temporarily replaced by IVAL(1) and IVAL(2), respectively, in routine EVCCG. Additional memory allocation and option value restoration are automatically done in EVCCG. There is no requirement that users change existing applications that use EVCCG or E6CCG. Default values for the option are IVAL(*) = 1, 16, 0, 1, 1, 16, 0, 1. Items 5–8 in IVAL(*) are for the generalized eigenvalue problem and are not used in EVCCG.
Example
In this example, a DATA statement is used to set A to a matrix given by Gregory and Karney (1969, page 116). Its eigenvalues are known to be {1 + 5i, 2 + 6i, 3 + 7i, 4 + 8i}. The program computes the eigenvalues and eigenvectors of this matrix. The performance index is also computed and printed. This serves as a check on the computations, for more details, see IMSL routine EPICG.
 
USE EVCCG_INT
USE EPICG_INT
USE WRCRN_INT
USE UMACH_INT
 
IMPLICIT NONE
! Declare variables
INTEGER LDA, LDEVEC, N
PARAMETER (N=4, LDA=N, LDEVEC=N)
!
INTEGER NOUT
REAL PI
COMPLEX A(LDA,N), EVAL(N), EVEC(LDEVEC,N)
 
! Set values of A
!
! A = (5+9i 5+5i -6-6i -7-7i)
! (3+3i 6+10i -5-5i -6-6i)
! (2+2i 3+3i -1+3i -5-5i)
! (1+i 2+2i -3-3i 4i)
!
DATA A/(5.0,9.0), (3.0,3.0), (2.0,2.0), (1.0,1.0), (5.0,5.0), &
(6.0,10.0), (3.0,3.0), (2.0,2.0), (-6.0,-6.0), (-5.0,-5.0), &
(-1.0,3.0), (-3.0,-3.0), (-7.0,-7.0), (-6.0,-6.0), &
(-5.0,-5.0), (0.0,4.0)/
!
! Find eigenvalues and vectors of A
CALL EVCCG (A, EVAL, EVEC)
! Compute performance index
PI = EPICG(N,A,EVAL,EVEC)
! Print results
CALL UMACH (2, NOUT)
CALL WRCRN ('EVAL', EVAL, 1, N, 1)
CALL WRCRN ('EVEC', EVEC)
WRITE (NOUT,'(/,A,F6.3)') ' Performance index = ', PI
END
Output
EVAL
1 2 3 4
( 4.000, 8.000) ( 3.000, 7.000) ( 2.000, 6.000) ( 1.000, 5.000)
EVEC
1 2 3 4
1 ( 0.5774, 0.0000) ( 0.5774, 0.0000) ( 0.3780, 0.0000) ( 0.7559, 0.0000)
2 ( 0.5774,-0.0000) ( 0.5773,-0.0000) ( 0.7559, 0.0000) ( 0.3780, 0.0000)
3 ( 0.5774,-0.0000) (-0.0000,-0.0000) ( 0.3780, 0.0000) ( 0.3780, 0.0000)
4 ( 0.0000, 0.0000) ( 0.5774, 0.0000) ( 0.3780, 0.0000) ( 0.3780, 0.0000)
 
Performance index = 0.016
Published date: 03/19/2020
Last modified date: 03/19/2020