eigen Subroutine

public subroutine eigen(A, eigenvalues, eigenvectors)

eigen

Description

Calculate the eigenvalues and eigenvectors of a real symmetric matrix A using LAPACK’s dsyev. The eigenvectors are stored in the columns of eigenvectors. The eigenvalues are stored in eigenvalues.

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(inout) :: A(:,:)
real(kind=pr), intent(out) :: eigenvalues(:)
real(kind=pr), intent(out), optional :: eigenvectors(:,:)

Variables

Type Visibility Attributes Name Initial
real(kind=pr), public :: Ain(size(A,1),size(A,1))
integer, public :: istat
integer, public :: n
real(kind=pr), public :: work(size(A,1)*10)

Interfaces

interface

  • subroutine dsyev(JOBZ, UPLO, N, A, lda, W, WORK, LWORK, INFO)

    Arguments

    Type IntentOptional Attributes Name
    character(len=1) :: JOBZ
    character(len=1) :: UPLO
    integer :: N
    double precision :: A(lda,*)
    integer :: lda
    double precision :: W(*)
    double precision :: WORK(*)
    integer :: LWORK
    integer :: INFO