Computes the eigenvalue decomposition of a general square matrix.
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.
call eig(A, vecs, lambda)
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.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp), | intent(in) | :: | A(:,:) | |||
| complex(kind=dp), | intent(out) | :: | vecs(:,:) | |||
| complex(kind=dp), | intent(out) | :: | vals(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=sp), | intent(in) | :: | A(:,:) | |||
| complex(kind=sp), | intent(out) | :: | vecs(:,:) | |||
| complex(kind=sp), | intent(out) | :: | vals(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=dp), | intent(in) | :: | A(:,:) | |||
| real(kind=dp), | intent(out) | :: | vecs(:,:) | |||
| complex(kind=dp), | intent(out) | :: | vals(:) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=sp), | intent(in) | :: | A(:,:) | |||
| real(kind=sp), | intent(out) | :: | vecs(:,:) | |||
| complex(kind=sp), | intent(out) | :: | vals(:) |