Computes the leading eigenpairs of a symmetric operator using the Lanczos iterative process. Given a square linear operator , it finds the leading eigvalues and eigvectors such that:
The subspace is constructed via Lanczos factorization, resulting in a symmetric tridiagonal matrix . The eigenvalues of are approximated by those of and the eigenvectors are computed accordingly.
References
call eighs(A, X, eigvals, residuals, info [, kdim] [,tolerance])
A
: Linear operator derived from abstract_sym_linop_rsp
, abstract_sym_linop_rdp
,
abstract_hermitian_linop_csp
or abstract_hermitian_linop_cdp
whose leading
eigenpairs need to be computed. It is an intent(in)
argument.
X
: Array of abstract_vectors
with the same type and kind as A
. On exit, it
contains the leading eigenvectors of A
. Note that the dimension of X
fixes
the number of eigenpairs computed.
eigvals
: Rank-1 array of real
numbers. On exit, it contains the leading
eigenvalues of A
. It is an intent(out)
argument.
residuals
: Rank-1 array of real
numbers. On exit, it contains the residuals
associated with each eigenpairs. It is an intent(out)
argument.
info
: integer
Information flag.
kdim
(optional) : integer
, maximum dimension of the Krylov subspace used to
approximate the leading eigenpairs. It is an intent(in)
argument. By default, kdim = 4*size(X)
.
tolerance
(optional) : real
tolerance below which an eigenpair is considered as
being converged. It is an intent(in)
agument. By default,
tolerance = rtol_sp
or tolerance = rtol_dp
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_sym_linop_rsp), | intent(in) | :: | A |
Linear operator whose leading eigenpairs need to be computed. |
||
class(abstract_vector_rsp), | intent(out) | :: | X(:) |
Leading eigevectors of . |
||
real(kind=sp), | intent(out), | allocatable | :: | eigvals(:) |
Leading eigenvalues of . |
|
real(kind=sp), | intent(out), | allocatable | :: | residuals(:) |
Residuals associated to each Ritz eigenpairs. |
|
integer, | intent(out) | :: | info |
Information flag. |
||
integer, | intent(in), | optional | :: | kdim |
Desired number of eigenpairs. |
|
real(kind=sp), | intent(in), | optional | :: | tolerance |
Tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_sym_linop_rdp), | intent(in) | :: | A |
Linear operator whose leading eigenpairs need to be computed. |
||
class(abstract_vector_rdp), | intent(out) | :: | X(:) |
Leading eigevectors of . |
||
real(kind=dp), | intent(out), | allocatable | :: | eigvals(:) |
Leading eigenvalues of . |
|
real(kind=dp), | intent(out), | allocatable | :: | residuals(:) |
Residuals associated to each Ritz eigenpairs. |
|
integer, | intent(out) | :: | info |
Information flag. |
||
integer, | intent(in), | optional | :: | kdim |
Desired number of eigenpairs. |
|
real(kind=dp), | intent(in), | optional | :: | tolerance |
Tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_hermitian_linop_csp), | intent(in) | :: | A |
Linear operator whose leading eigenpairs need to be computed. |
||
class(abstract_vector_csp), | intent(out) | :: | X(:) |
Leading eigevectors of . |
||
real(kind=sp), | intent(out), | allocatable | :: | eigvals(:) |
Leading eigenvalues of . |
|
real(kind=sp), | intent(out), | allocatable | :: | residuals(:) |
Residuals associated to each Ritz eigenpairs. |
|
integer, | intent(out) | :: | info |
Information flag. |
||
integer, | intent(in), | optional | :: | kdim |
Desired number of eigenpairs. |
|
real(kind=sp), | intent(in), | optional | :: | tolerance |
Tolerance |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_hermitian_linop_cdp), | intent(in) | :: | A |
Linear operator whose leading eigenpairs need to be computed. |
||
class(abstract_vector_cdp), | intent(out) | :: | X(:) |
Leading eigevectors of . |
||
real(kind=dp), | intent(out), | allocatable | :: | eigvals(:) |
Leading eigenvalues of . |
|
real(kind=dp), | intent(out), | allocatable | :: | residuals(:) |
Residuals associated to each Ritz eigenpairs. |
|
integer, | intent(out) | :: | info |
Information flag. |
||
integer, | intent(in), | optional | :: | kdim |
Desired number of eigenpairs. |
|
real(kind=dp), | intent(in), | optional | :: | tolerance |
Tolerance |