Given a symmetric or Hermitian linear operator , find matrices and such that
where is an orthogonal basis and is symmetric tridiagonal.
Algorithmic Features
References
call lanczos(A, X, T, info [, kstart] [, kend] [, tol])
A
: Symmetric or Hermitian linear operator derived from one the base types
provided by the AbstractLinops
module. It is an intent(in)
argument.
X
: Array of types derived from one the base types provided by the AbstractVectors
module. It needs to be consistent with the type of A
. On exit, it contains the
the computed Krylov vectors. The first entry X(1)
is the starting vector for
the Lanczos factorization. Additionally, the maximum number of Lanczos steps
is equal to size(X) - 1
. It is an intent(inout)
argument.
T
: real
or complex
rank-2 array. On exit, it contains the
symmetric tridiagonal matrix computed from the Arnoldi factorization. It is an
intent(inout)
argument.
info
: integer
variable. It is the LightKrylov
information flag. On exit, if
info
> 0, the Lanczos factorization experienced a lucky breakdown.
The array of Krylov vectors X
spans an -invariant subpsace of
dimension info
.
kstart
(optional): integer
value determining the index of the first Lanczos
step to be computed. By default, kstart = 1
.
kend
(optional): integer
value determining the index of the last Lanczos step
to be computed. By default, kend = size(X) - 1
.
tol
(optional): Numerical tolerance below which a subspace is considered
to be -invariant. By default tol = atol_sp
or
tol = atol_rp
depending on the kind of A
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_sym_linop_rsp), | intent(in) | :: | A | |||
class(abstract_vector_rsp), | intent(inout) | :: | X(:) | |||
real(kind=sp), | intent(inout) | :: | T(:,:) | |||
integer, | intent(out) | :: | info | |||
integer, | intent(in), | optional | :: | kstart | ||
integer, | intent(in), | optional | :: | kend | ||
real(kind=sp), | intent(in), | optional | :: | tol |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_sym_linop_rdp), | intent(in) | :: | A | |||
class(abstract_vector_rdp), | intent(inout) | :: | X(:) | |||
real(kind=dp), | intent(inout) | :: | T(:,:) | |||
integer, | intent(out) | :: | info | |||
integer, | intent(in), | optional | :: | kstart | ||
integer, | intent(in), | optional | :: | kend | ||
real(kind=dp), | intent(in), | optional | :: | tol |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_hermitian_linop_csp), | intent(in) | :: | A | |||
class(abstract_vector_csp), | intent(inout) | :: | X(:) | |||
complex(kind=sp), | intent(inout) | :: | T(:,:) | |||
integer, | intent(out) | :: | info | |||
integer, | intent(in), | optional | :: | kstart | ||
integer, | intent(in), | optional | :: | kend | ||
real(kind=sp), | intent(in), | optional | :: | tol |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(abstract_hermitian_linop_cdp), | intent(in) | :: | A | |||
class(abstract_vector_cdp), | intent(inout) | :: | X(:) | |||
complex(kind=dp), | intent(inout) | :: | T(:,:) | |||
integer, | intent(out) | :: | info | |||
integer, | intent(in), | optional | :: | kstart | ||
integer, | intent(in), | optional | :: | kend | ||
real(kind=dp), | intent(in), | optional | :: | tol |