Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
pyeicg.f
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file pyeicg.f
1 
2 C*********************************************************************
3 
4 C...PYEIGC
5 C...Finds eigenvalues of a general complex matrix
6 C
7 C THIS SUBROUTINE CALLS THE RECOMMENDED SEQUENCE OF
8 C SUBROUTINES FROM THE EIGENSYSTEM SUBROUTINE PACKAGE (EISPACK)
9 C TO FIND THE EIGENVALUES AND EIGENVECTORS (IF DESIRED)
10 C OF A COMPLEX GENERAL MATRIX.
11 C
12 C ON INPUT
13 C
14 C NM MUST BE SET TO THE ROW DIMENSION OF THE TWO-DIMENSIONAL
15 C ARRAY PARAMETERS AS DECLARED IN THE CALLING PROGRAM
16 C DIMENSION STATEMENT.
17 C
18 C N IS THE ORDER OF THE MATRIX A=(AR,AI).
19 C
20 C AR AND AI CONTAIN THE REAL AND IMAGINARY PARTS,
21 C RESPECTIVELY, OF THE COMPLEX GENERAL MATRIX.
22 C
23 C MATZ IS AN INTEGER VARIABLE SET EQUAL TO ZERO IF
24 C ONLY EIGENVALUES ARE DESIRED. OTHERWISE IT IS SET TO
25 C ANY NON-ZERO INTEGER FOR BOTH EIGENVALUES AND EIGENVECTORS.
26 C
27 C ON OUTPUT
28 C
29 C WR AND WI CONTAIN THE REAL AND IMAGINARY PARTS,
30 C RESPECTIVELY, OF THE EIGENVALUES.
31 C
32 C ZR AND ZI CONTAIN THE REAL AND IMAGINARY PARTS,
33 C RESPECTIVELY, OF THE EIGENVECTORS IF MATZ IS NOT ZERO.
34 C
35 C IERR IS AN INTEGER OUTPUT VARIABLE SET EQUAL TO AN ERROR
36 C COMPLETION CODE DESCRIBED IN THE DOCUMENTATION FOR COMQR
37 C AND COMQR2. THE NORMAL COMPLETION CODE IS ZERO.
38 C
39 C FV1, FV2, AND FV3 ARE TEMPORARY STORAGE ARRAYS.
40 C
41 C QUESTIONS AND COMMENTS SHOULD BE DIRECTED TO BURTON S. GARBOW,
42 C MATHEMATICS AND COMPUTER SCIENCE DIV, ARGONNE NATIONAL LABORATORY
43 C
44 C THIS VERSION DATED AUGUST 1983.
45 C
46 
47  SUBROUTINE pyeicg(NM,N,AR,AI,WR,WI,MATZ,ZR,ZI,FV1,FV2,FV3,IERR)
48 
49  INTEGER n,nm,is1,is2,ierr,matz
50  DOUBLE PRECISION ar(4,4),ai(4,4),wr(4),wi(4),zr(4,4),zi(4,4),
51  x fv1(4),fv2(4),fv3(4)
52  IF (n .LE. nm) goto 100
53  ierr = 10 * n
54  goto 120
55 C
56  100 CALL pycbal(nm,n,ar,ai,is1,is2,fv1)
57  CALL pycrth(nm,n,is1,is2,ar,ai,fv2,fv3)
58  IF (matz .NE. 0) goto 110
59 C .......... FIND EIGENVALUES ONLY ..........
60  CALL pycmqr(nm,n,is1,is2,ar,ai,wr,wi,ierr)
61  goto 120
62 C .......... FIND BOTH EIGENVALUES AND EIGENVECTORS ..........
63  110 CALL pycmq2(nm,n,is1,is2,fv2,fv3,ar,ai,wr,wi,zr,zi,ierr)
64  IF (ierr .NE. 0) goto 120
65  CALL pycba2(nm,n,is1,is2,fv1,n,zr,zi)
66  120 RETURN
67  END