ADAS Subroutine xxeign
SUBROUTINE XXEIGN(A,IA,N,RR,RI,VR,VI,IV1,FV1,IERR) C----------------------------------------------------------------------- C C ROUTINE: XXEIGN C C PURPOSE: FINDS THE EIGENVALUES AND EIGENVECTORS OF A GENERAL REAL C MATRIX. C C REPLACES NAG ROUTINE F02AGF ALTHOUGH THERE ARE SEVERAL C DIFFERENCES - YOU SHOULD COMPARE THE DOCUMENTATION. THIS C IS A FRONT-END TO THE NETLIB LIBRARY PROGRAM RG.F WHICH C FOLLOWS TOGETHER WITH ALL ITS DEPENDENCIES. C C *** N.B. THE EIGENVECTORS ARE NOT NORMALIZED TO UNIT LENGTH *** C C CALLING PROGRAM: GENERAL USE C C INPUT: C C (R*8) A(,) CONTAINS THE REAL GENERAL MATRIX. C C (I*4) IA THE ROW DIMENSION OF THE TWO-DIMENSIONAL C ARRAY PARAMETERS AS DECLARED IN THE CALLING C PROGRAM DIMENSION STATEMENT. C C (I*4) N THE ORDER OF THE MATRIX A. C (I*4) IV1() WORK ARRAY, DIMENSION = N. C (R*4) FV1() WORK ARRAY, DIMENSION = N. C C OUTPUT: C C (R*8) RR() REAL PART OF THE EIGENVALUES C (R*8) RI() IMAGINARY PART OF EIGENVALUES C COMPLEX CONJUGATE PAIRS OF EIGENVALUES APPEAR C CONSECUTIVELY WITH THE EIGENVALUE HAVING THE C POSITIVE IMAGINARY PART FIRST. C C (R*8) VR(,) REAL PARTS OF THE EIGENVECTORS. FIRST DIMENSION C = IA. C THE REAL PART OF THE EIGENVECTOR CORRESPONDING TO C THE I-TH EIGENVALUE IS IN VR(J,I), J=1...N C (R*8) VI(,) IMAGINARY PARTS OF THE EIGENVECTORS. FIRST C DIMENSION = IA C THE IMAGINARY PART OF THE EIGENVECTOR C CORRESPONDING TO THE I-TH EIGENVALUE IS IN C VR(J,I), J=1...N C (I*4) IERR AN ERROR CODE SET TO ZERO IF NO ERROR. SEE HRQ AND C HRQ2 FOR A DESCRIPTION OF THIS VARIABLE C C ROUTINES: C----------------------------------------------------------------------- C NAME SOURCE PURPOSE C----------------------------------------------------------------------- C RG NETLIB CALCULATES THE EIGENVALUES AND EIGENVECTORS C DPMPAR ADAS/NETLIB RETURNS MACHINE DEPENDANT PARAMETERS C----------------------------------------------------------------------- C C AUTHOR: WILLIAM OSBORN (TESSELLA SUPPORT SERVICES PLC.) C C DATE: 10/06/96 C C VERSION 1.1 DATE: 10/06/96 C MODIFIED: WILLIAM OSBORN C - FIRST VERSION C VERSION: 1.2 DATE:27/06/96 C MODIFIED: WILLIAM OSBORN C - REMOVED UNUSED VARIABLES C C VERSION: 1.3 DATE:27/06/96 C MODIFIED: WILLIAM OSBORN C - ADDED PDONE VARIABLE TO ELIMINATE THE NEED FOR ASSIGNMENT C TO A DO-LOOP COUNTER. C C VERSION: 1.4 DATE:17/05/07 C MODIFIED: Allan Whiteford C - Updated comments as part of subroutine documentation C procedure. C C----------------------------------------------------------------------- C INTEGER IA, IERR, IV1(N), N REAL*8 A(IA,N), FV1(N), RI(N), RR(N) REAL*8 VI(IA,N), VR(IA,N) DOUBLE PRECISION A(NM,N), FV1(N), WI(N), WR(N) DOUBLE PRECISION Z(NM,N) INTEGER IERR, IV1(N), MATZ, N INTEGER NM DOUBLE PRECISION A(NM,N), SCALE(N) INTEGER IGH, LOW, N, NM DOUBLE PRECISION SCALE(N), Z(NM,M) INTEGER IGH, LOW, M, N INTEGER NM DOUBLE PRECISION AI, AR, BI, BR DOUBLE PRECISION CI, CR DOUBLE PRECISION A(NM,N) INTEGER IGH, INT(IGH), LOW, N INTEGER NM DOUBLE PRECISION A(NM,IGH), Z(NM,N) INTEGER IGH, INT(IGH), LOW, N INTEGER NM DOUBLE PRECISION H(NM,N), WI(N), WR(N) INTEGER IERR, IGH, LOW, N INTEGER NM DOUBLE PRECISION H(NM,N), WI(N), WR(N), Z(NM,N) INTEGER IERR, IGH, LOW, N INTEGER NM