eig Interface

public interface eig

Computes the eigenvalue decomposition of a general square matrix.

Description

This interface provides methods to compute the solution to the eigenproblem , where $\mathbf{A}$ is a square real or complex matrix.

Result array lambda returns the eigenvalues of , while vecs returns the corresponding eigenvectors. Note that it follows the LAPACK convention when is real. The solver is based on LAPACK's *GEEV backends.

Syntax

call eig(A, vecs, lambda)

Arguments

A: real or complex square array containing the coefficient matrix. It is an intent(in) argument.

vecs: Square array of the same size, type, and kind as A containing the eigenvectors (following LAPACK's convention for real matrices). It is an intent(out) argument.

lambda: complex rank-1 array of the same kind as A containing the eigenvalues. It is an intent(out) argument.

Note

Due to the abstrct nature of the vector types defined in LightKrylov, it is unlikely that this implementation will be superseeded in favor of the stdlib one as the latter does not follow the LAPACK's convention.


Subroutines

private module subroutine eig_cdp(A, vecs, vals)

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(in) :: A(:,:)
complex(kind=dp), intent(out) :: vecs(:,:)
complex(kind=dp), intent(out) :: vals(:)

private module subroutine eig_csp(A, vecs, vals)

Arguments

Type IntentOptional Attributes Name
complex(kind=sp), intent(in) :: A(:,:)
complex(kind=sp), intent(out) :: vecs(:,:)
complex(kind=sp), intent(out) :: vals(:)

private module subroutine eig_rdp(A, vecs, vals)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: A(:,:)
real(kind=dp), intent(out) :: vecs(:,:)
complex(kind=dp), intent(out) :: vals(:)

private module subroutine eig_rsp(A, vecs, vals)

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: A(:,:)
real(kind=sp), intent(out) :: vecs(:,:)
complex(kind=sp), intent(out) :: vals(:)