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.

Examples

call eigen(A, lambda, vectors)

Notes

The current implementation requests eigenvectors from LAPACK and assigns them to eigenvectors; provide this optional argument.

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(inout) :: A(:,:)

Symmetric matrix; overwritten by LAPACK work data.

real(kind=pr), intent(out) :: eigenvalues(:)

Eigenvalues in ascending order.

real(kind=pr), intent(out), optional :: eigenvectors(:,:)

Eigenvectors stored as columns.


Calls

proc~~eigen~~CallsGraph proc~eigen eigen none~dsyev dsyev proc~eigen->none~dsyev

Called by

proc~~eigen~~CalledByGraph proc~eigen eigen proc~lambda1 lambda1 proc~lambda1->proc~eigen proc~critical_line critical_line proc~critical_line->proc~lambda1 proc~f_critical F_critical proc~critical_line->proc~f_critical proc~df_critical df_critical proc~critical_line->proc~df_critical proc~look_for_cep look_for_cep proc~critical_line->proc~look_for_cep proc~critical_point critical_point proc~critical_point->proc~lambda1 proc~critical_point->proc~f_critical proc~critical_point->proc~df_critical proc~f_cep F_cep proc~f_cep->proc~lambda1 proc~f_critical->proc~lambda1 proc~df_cep df_cep proc~df_cep->proc~f_cep proc~df_critical->proc~f_critical proc~get_critical_constants get_critical_constants proc~get_critical_constants->proc~critical_point proc~look_for_cep->proc~f_cep proc~look_for_cep->proc~df_cep

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)

Numerical workspace.


Interfaces

interface

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

    LAPACK interface for a real symmetric eigenproblem.

    Arguments

    Type IntentOptional Attributes Name
    character(len=1) :: JOBZ

    Whether eigenvectors are computed.

    character(len=1) :: UPLO

    Triangle of the input matrix that is referenced.

    integer :: N

    Matrix order.

    double precision :: A(lda,*)

    Matrix/work array.

    integer :: lda

    Leading dimension of A.

    double precision :: W(*)

    Eigenvalues.

    double precision :: WORK(*)

    Workspace array.

    integer :: LWORK

    Workspace length.

    integer :: INFO

    LAPACK status code.