eigen_lapack Module

Eigenproblem module : to solve eigenvalue problem using LAPACK written by Son, Sang-Kil in Mar. 2005 davidson algorithm and interface to krylov library added by Ludger Inhester 2023 USAGE: H should be a regular N x N matrix. Eigenvectors are normalized after each subroutine. - SR get_eigenvalues( H, E ) for all ev. / standard eigen problem get_eigenvalues( A, B, E ) for all ev. / generalized eigen problem . SR get_all_ev_of_real_sym( H, E, yes_verbose ) . SR get_all_ev_of_real_nonsym( H, E, VL, VR, yes_verbose ) . SR get_all_ev_of_real_nonsym_simple( H, E, yes_verbose ) . SR get_all_ev_of_complex_Hermitian( H, E, yes_verbose ) . SR get_all_ev_of_complex_sym( H, E, yes_verbose ) . SR get_all_ev_of_complex_nonsym( H, E, VL, VR, yes_verbose ) . SR get_gen_all_ev_real_sym( A, B, E, yes_verbose ) . SR get_gen_all_ev_real_nonsym( A, B, E, VL, VR, yes_verbose ) - SR get_eigenvalues( H, E, m, E0, dE ) for selected ev. *** NOT YET IMPLEMENTED

for real symmetric matrix - DSYEV : all eigenvalues and eigenvectors - DSYEVD : all eigenvalues and eigenvectors by divide-and-conquer - DSYEVX : selected eigenvalues and eigenvectors - DSYEVR : selected eigenvalues and eigenvectors by divide-and-conquer - DSYGV : all eigenvalues/eigenvectors of generalized symmetric-definite

for real nonsymmetric matrix - DGEEV : all eigenvalues and left/right eigenvectors - DGEEVX : all eigenvalues and left/right eigenvectors with balancing - DGEGV / DGGEV : all eigenvalues/eigenvectors of generalized non-symmetric

for complex Hermitian matrix - ZHEEV : all eigenvalues and eigenvectors - ZHEEVD : all eigenvalues and eigenvectors by divide-and-conquer - ZHEEVX : selected eigenvalues and eigenvectors - ZHEEVR : selected eigenvalues and eigenvectors by divide-and-conquer

for complex non-Hermitian matrix - ZGEEV : all eigenvalues and left/right eigenvectors - ZGEEVX : all eigenvalues and left/right eigenvectors with balancing

URL: http://www.netlib.org/lapack/double/ http://www.netlib.org/lapack/complex16/




Interfaces

public interface get_eigenvalues

returns eigenvalues of square matrices

  • private subroutine get_all_ev_of_real_sym(h, e, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=long), intent(inout) :: h(:,:)
    real(kind=long), intent(inout) :: e(:)
    logical, intent(in), optional :: yes_verbose
  • private subroutine get_all_ev_of_real_nonsym(h, e, ql, qr, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=long), intent(inout) :: h(:,:)
    complex(kind=long), intent(out) :: e(:)
    complex(kind=long), intent(out) :: ql(:,:)
    complex(kind=long), intent(out) :: qr(:,:)
    logical, intent(in), optional :: yes_verbose
  • private subroutine get_all_ev_of_real_nonsym_simple(h, e, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=long), intent(inout) :: h(:,:)
    complex(kind=long), intent(out) :: e(:)
    logical, intent(in), optional :: yes_verbose
  • private subroutine get_all_ev_of_complex_hermitian(h, e, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=long), intent(inout) :: h(:,:)
    real(kind=long), intent(inout) :: e(:)
    logical, intent(in), optional :: yes_verbose
  • private subroutine get_all_ev_of_complex_sym(h, e, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=long), intent(inout) :: h(:,:)
    complex(kind=long), intent(inout) :: e(:)
    logical, intent(in), optional :: yes_verbose
  • private subroutine get_all_ev_of_complex_nonsym(h, e, vl, vr, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=long), intent(inout) :: h(:,:)
    complex(kind=long), intent(out) :: e(:)
    complex(kind=long), intent(out) :: vl(:,:)
    complex(kind=long), intent(out) :: vr(:,:)
    logical, intent(in), optional :: yes_verbose
  • private subroutine get_gen_all_ev_real_sym(a, b, e, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=long), intent(inout) :: a(:,:)
    real(kind=long), intent(inout) :: b(:,:)
    real(kind=long), intent(inout) :: e(:)
    logical, intent(in), optional :: yes_verbose
  • private subroutine get_gen_all_ev_real_nonsym(a, b, e, vl, vr, yes_verbose)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=long), intent(inout) :: a(:,:)
    real(kind=long), intent(inout) :: b(:,:)
    complex(kind=long), intent(inout) :: e(:)
    real(kind=long), intent(inout) :: vl(:,:)
    real(kind=long), intent(inout) :: vr(:,:)
    logical, intent(in), optional :: yes_verbose

public interface check_normalized

Check if w.f. is normalized = 1 if k = k' = 0 if k /= k' with the matrix form wf' wf = I for a real matrix wf^T wf = I for a complex matrix


  • private subroutine check_normal_real_sym(wf, tol)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=long), intent(in) :: wf(:,:)
    real(kind=long), intent(in) :: tol
  • private subroutine check_normal_real_nonsym(wf_l, wf_r, tol)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=long), intent(in) :: wf_l(:,:)
    real(kind=long), intent(in) :: wf_r(:,:)
    real(kind=long), intent(in) :: tol
  • private subroutine check_normal_complex_hermitian(wf, tol)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=long), intent(in) :: wf(:,:)
    real(kind=long), intent(in) :: tol
  • private subroutine check_normal_complex_nonsym(wf_l, wf_r, tol)

    Arguments

    Type IntentOptional Attributes Name
    complex(kind=long), intent(in) :: wf_l(:,:)
    complex(kind=long), intent(in) :: wf_r(:,:)
    real(kind=long), intent(in) :: tol

Subroutines

public subroutine get_some_ev_of_real_sym(h, e, z, num, epsilon, yes_verbose)

Solve the eigenvalue problem of H(N,N) real symmetric matrix using dsyevx - matrix: real, H(N,N) - eigenvalues: real, E(num) - eigenvectors: real, Z(N,num) - num: number of eigenvectors and eigenvalues with lowest eigenvalues - epsilon: (optional) absolute tolerance Eigenvalues are stored in E(N)

Read more…

Arguments

Type IntentOptional Attributes Name
real(kind=long), intent(inout) :: h(:,:)
real(kind=long), intent(out) :: e(num)
real(kind=long), intent(out) :: z(size(h,1),num)
integer, intent(in) :: num
real(kind=long), intent(in), optional :: epsilon
logical, intent(in), optional :: yes_verbose

public subroutine get_eigenvalues_symmetry(m, e, irrep)

computes eigenvalues of square matrices under consideration that there a extra symmetries

Arguments

Type IntentOptional Attributes Name
real(kind=long), intent(inout) :: m(:,:)
real(kind=long), intent(inout) :: e(:)
integer, intent(in) :: irrep(:)

public subroutine get_some_eigenvalues_davpack(n, nev, nb, m, e, c, diag, mm, epsilon, output)

get some eigenvalues and eigenvectors using davpack

Arguments

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

full dimension

integer, intent(in) :: nev

number of ev to be found

integer, intent(in) :: nb

initial block size

integer, intent(in) :: m

maximum dimension <n

real(kind=long), intent(out) :: e(nev)

returned eigenvalues

real(kind=long), intent(inout) :: c(n,nev)

returned eigenvectors

real(kind=long), intent(in) :: diag(n)

diagonal elements of the matrix

private function mm(n, k, cin, cout) result(error)
Arguments
Type IntentOptional Attributes Name
integer, intent(in) :: n
integer, intent(in) :: k
real(kind=8), intent(in) :: cin(n,k)
real(kind=8), intent(out) :: cout(n,k)
Return Value integer
real(kind=long), intent(in) :: epsilon

convergence criterion

integer, intent(in), optional :: output

output