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.


Module Procedures

private subroutine eig_rsp(A, vecs, vals)

Eigenvalue decomposition of a dense matrix using LAPACK.

Arguments

Type IntentOptional Attributes Name
real(kind=sp), intent(in) :: A(:,:)

Matrix to be factorized.

real(kind=sp), intent(out) :: vecs(:,:)

Eigenvectors.

complex(kind=sp), intent(out) :: vals(:)

private subroutine eig_rdp(A, vecs, vals)

Eigenvalue decomposition of a dense matrix using LAPACK.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: A(:,:)

Matrix to be factorized.

real(kind=dp), intent(out) :: vecs(:,:)

Eigenvectors.

complex(kind=dp), intent(out) :: vals(:)

private subroutine eig_csp(A, vecs, vals)

Eigenvalue decomposition of a dense matrix using LAPACK.

Arguments

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

Matrix to be factorized.

complex(kind=sp), intent(out) :: vecs(:,:)

Eigenvectors.

complex(kind=sp), intent(out) :: vals(:)

private subroutine eig_cdp(A, vecs, vals)

Eigenvalue decomposition of a dense matrix using LAPACK.

Arguments

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

Matrix to be factorized.

complex(kind=dp), intent(out) :: vecs(:,:)

Eigenvectors.

complex(kind=dp), intent(out) :: vals(:)