nekStab / LightKrylov

Lightweight implementation of Krylov subspace techniques in Fortran.
BSD 3-Clause "New" or "Revised" License
18 stars 0 forks source link

QR + Block Arnoldi #55

Closed Simkern closed 8 months ago

Simkern commented 8 months ago

Here comes the updated block versions of the algorithms.

QR algorithm

Block Arnoldi

For now I have not touched the regular arnoldi algorithms. If we want we can either write an interface to choose the appropriate subroutine or replace the arnoldi entirely by the block version. The block size is an optional parameter for the subroutines.

Simkern commented 8 months ago

All the requests are implemented.

I was thinking to replace all the orthonormalisation loops with the calls of mat_mult so that they would easily generalize to their block version but it turns out that this is quite messy unless the algorithms are actually written with a (possibly unit-valued) block size. This is mainly due to the fact that mat_mult is defined for matrix/Krylov basis-valued inputs and outputs and one would have to artificially include the extra dimension even if it is singleton.

There are 3 alternatives:

  1. We simply leave the code as it is.
  2. We fully generalize the algorithms to their block versions (this might require a few minor changes)
  3. We generalize mat_mult with a specific procedure for rank 1 matrices, i.e. connect it to get_vec and the regular Kylov dot product.