eispack_module Module

Refactored SLATEC/EISPACK routines for computing eigenvalues and eigenvectors.


Uses

  • module~~eispack_module~~UsesGraph module~eispack_module eispack_module module~kind_module kind_module module~eispack_module->module~kind_module iso_fortran_env iso_fortran_env module~kind_module->iso_fortran_env

Used by

  • module~~eispack_module~~UsedByGraph module~eispack_module eispack_module module~fortran_astrodynamics_toolkit fortran_astrodynamics_toolkit module~fortran_astrodynamics_toolkit->module~eispack_module

Subroutines

private subroutine balanc(Nm, n, a, Low, Igh, Scale)

Balance a real general matrix and isolate eigenvalues whenever possible.

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: Nm
integer :: n
real(kind=wp) :: a(Nm,*)
integer :: Low
integer :: Igh
real(kind=wp) :: Scale(*)

private subroutine balbak(Nm, n, Low, Igh, Scale, m, z)

Form the eigenvectors of a real general matrix from the eigenvectors of matrix output from BALANC.

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: Nm
integer :: n
integer :: Low
integer :: Igh
real(kind=wp) :: Scale(*)
integer :: m
real(kind=wp) :: z(Nm,*)

private subroutine cdiv(Ar, Ai, Br, Bi, Cr, Ci)

Compute the complex quotient of two complex numbers.

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=wp) :: Ar
real(kind=wp) :: Ai
real(kind=wp) :: Br
real(kind=wp) :: Bi
real(kind=wp) :: Cr
real(kind=wp) :: Ci

private subroutine elmhes(Nm, n, Low, Igh, a, Intv)

Reduce a real general matrix to upper Hessenberg form using stabilized elementary similarity transformations.

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: Nm
integer :: n
integer :: Low
integer :: Igh
real(kind=wp) :: a(Nm,*)
integer :: Intv(*)

private subroutine eltran(Nm, n, Low, Igh, a, Int, z)

Accumulates the stabilized elementary similarity transformations used in the reduction of a real general matrix to upper Hessenberg form by ELMHES.

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: Nm
integer :: n
integer :: Low
integer :: Igh
real(kind=wp) :: a(Nm,*)
integer :: Int(*)
real(kind=wp) :: z(Nm,*)

private subroutine hqr(Nm, n, Low, Igh, h, Wr, Wi, Ierr)

Compute the eigenvalues of a real upper Hessenberg matrix using the QR method.

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: Nm
integer :: n
integer :: Low
integer :: Igh
real(kind=wp) :: h(Nm,*)
real(kind=wp) :: Wr(*)
real(kind=wp) :: Wi(*)
integer :: Ierr

private subroutine hqr2(Nm, n, Low, Igh, h, Wr, Wi, z, Ierr)

Compute the eigenvalues and eigenvectors of a real upper Hessenberg matrix using QR method.

Read more…

Arguments

Type IntentOptional Attributes Name
integer :: Nm
integer :: n
integer :: Low
integer :: Igh
real(kind=wp) :: h(Nm,*)
real(kind=wp) :: Wr(*)
real(kind=wp) :: Wi(*)
real(kind=wp) :: z(Nm,*)
integer :: Ierr

private subroutine rg(Nm, n, a, Wr, Wi, Matz, z, Iv1, Fv1, Ierr)

Compute the eigenvalues and, optionally, the eigenvectors of a real general matrix.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: Nm

must be set to the row dimension of the two-dimensional array parameters, A and Z, as declared in the calling program dimension statement.

integer, intent(in) :: n

the order of the matrix A. N must be less than or equal to NM.

real(kind=wp), intent(inout) :: a(Nm,*)

contains the real general matrix. dimensioned A(NM,N). Note: A is destroyed on output.

real(kind=wp), intent(out) :: Wr(*)

real part of the eigenvalues. The eigenvalues are unordered except that complex conjugate pairs of eigenvalues appear consecutively with the eigenvalue having the positive imaginary part first. If an error exit is made, the eigenvalues should be correct for indices IERR+1, IERR+2, ..., N. WR and WI are one-dimensional REAL arrays, dimensioned WR(N) and WI(N).

real(kind=wp), intent(out) :: Wi(*)

imaginary part of the eigenvalues.

integer, intent(in) :: Matz

an INTEGER variable set equal to zero if only eigenvalues are desired. Otherwise, it is set to any non-zero integer for both eigenvalues and eigenvectors.

real(kind=wp), intent(out) :: z(Nm,*)

contains the real and imaginary parts of the eigenvectors if MATZ is not zero. If the J-th eigenvalue is real, the J-th column of Z contains its eigenvector. If the J-th eigenvalue is complex with positive imaginary part, the J-th and (J+1)-th columns of Z contain the real and imaginary parts of its eigenvector. The conjugate of this vector is the eigenvector for the conjugate eigenvalue. Z is a two-dimensional REAL array, dimensioned Z(NM,N).

integer, intent(inout) :: Iv1(*)

one-dimensional temporary storage arrays of dimension N.

real(kind=wp), intent(inout) :: Fv1(*)

one-dimensional temporary storage arrays of dimension N.

integer, intent(out) :: Ierr

an INTEGER flag set to:

Read more…

public subroutine compute_eigenvalues_and_eigenvectors(n, a, w, z, ierr)

Compute the eigenvalues and, optionally, the eigenvectors of a real general matrix.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

the order of the matrix a

real(kind=wp), intent(in), dimension(n,n) :: a

contains the real general matrix

real(kind=wp), intent(out), dimension(n,2) :: w

real and imaginary parts of the eigenvalues

real(kind=wp), intent(out), dimension(n,n) :: z

real and imaginary parts of the eigenvectors

integer, intent(out) :: ierr

output flag from rg

public subroutine compute_real_eigenvalues_and_normalized_eigenvectors(n, a, e, v, n_results, ierr)

Returns only the real eigenvalues and the associated eigenvectors. Wrapper for compute_eigenvalues_and_eigenvectors.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

the order of the matrix a

real(kind=wp), intent(in), dimension(n,n) :: a

contains the real general matrix

real(kind=wp), intent(out), dimension(:), allocatable :: e

eigenvalues (size n_results)

real(kind=wp), intent(out), dimension(:,:), allocatable :: v

eigenvectors (size n,n_results)

integer, intent(out) :: n_results

number of real eigenvalues

integer, intent(out) :: ierr

output flag from rg

public subroutine eispack_test()

Unit test

Arguments

None