Closed loiseaujc closed 11 months ago
I have just added nev
args to eigs
, eighs
and svds
(see #32).
I have to think a bit more about the Krylov-Schur restart procedure to make it more re-usable. It would moreover work only for eigs
and eigsh
. If A
is a square linear operator, Krylov-Schur can be used to restart svds
as well. If A
is non-square, I ain't sure. Need to think about it.
At the moment, we have a very basic implementation for
eigs
and others. We compute the whole Krylov basis (or only part of it if we are lucky with the invariant subspace) and then compute the eigenvalues/eigenvectors. No restarting procedure whatsoever nor any control over how many eigenvalues the user would like to converge.We thus need two things:
n_converged == nev
.I have seen that you have already sketched a
krylov_schur
subroutine. I am not entirely sure we need a dedicated subroutine inKrylovDecomp.f90
for that or simply a subroutine likekrylov_schur_restart
which would compute the Schur decomposition of the Hessenberg matrix along with selecting the desired eigenvalues and rotate/truncate the Krylov basis accordingly. If so, theeigs
subroutine would readI don't quite like the
GOTO
statement but you get the point. We would also need to keep track of the total number of matrix-vector products computed to stop the computation if we exceed a user-defined limit. This limit could be included in theopts
(see #25).Defining a
krylov_schur_restart
procedure rather than a dedicatedkrylov_schur_factorization
like we did innekStab
would actually be more re-usable, e.g. we can directly re-usekrylov_schur_restart
for the Hermitian case (eighs
) without having to writekrylov_schur_spd_factorization
for instance.What do you think?