Merge DFTK's implementation of LOBPCG into IterativeSolvers #329
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi!
Since the first time we discussed about the implementation of the LOBPCG algorithm (#246), we (and by that I mean @mfherbst and @antoine-levitt) have made some improvements on the algorithm currently used in the DFTK package. Currently, it is faster, more stable and a bit more readable (so hopefully, easy to maintain) then the current implementation in IterativeSolvers. We thought it would be nice to move our implementation of LOBPCG to IterativeSolvers, and this is the goal of this PR.
This implementation is based on Hetmaniuk and Lehoucq's paper "Basis selection in LOBPCG" (https://doi.org/10.1016/j.jcp.2006.02.007), but using double Cholesky factorizations to orthogonalize vectors (see https://arxiv.org/pdf/1809.11085.pdf) as it is fast and can be easily used in parallel computing.
This implementation is also GPU compatible: one can simply pass
A
andX
as GPU arrays and the resulting eigenvectors and eigenvalues will also be GPU arrays.There is probably a lot to talk about, and some more things to implement, like allowing the user to create and use his own callback method.