Restarted Krylov

template<Number T, DataLocation L = Host>
class Krylov

A restarted Krylov method for computing \( f(\mathbf{A} t) \vec{b} \) from [1-2].

References:

[1] M. Eiermann and O. G. Ernst, “A Restarted Krylov Subspace Method for the Evaluation of Matrix Functions”, SIAM J. Numer. Anal., vol. 44, no. 6, pp. 2481–2504, Jan. 2006, doi: 10.1137/050633846.

[2] M. Afanasjew, M. Eiermann, O. G. Ernst, and S. Güttel, “Implementation of a restarted Krylov subspace method for the evaluation of matrix functions”, Linear Algebra and its Applications, vol. 429, no. 10, pp. 2293–2314, Nov. 2008, doi: 10.1016/j.laa.2008.06.029.

Template Parameters:
  • T – Data type used by the solver.

  • L – Location of the data.

Public Functions

inline Krylov(KrylovOptions params = KrylovOptions())

Initialize the solver with the parameters params.

Parameters:

params[in] solver parameters (optional). See KrylovOptions for all options.

void set_params(KrylovOptions params)

Set the parameters of the solver.

Parameters:

params[in] solver parameters. See ExpvTaylorOptions for all options.

inline int num_restarts() const
Returns:

The number of restarts of the last run of the solver.

struct KrylovOptions

Public Members

double atol = 1E-6

Tolerance. The algorithm terminates when \( \| (f(\mathbf{H}_{km}) \vec{e}_1)_{(k-1)m:km} \| \leq atol + rtol * \| \vec{f} \|_2 \) where \( \vec{f} \) is the approximation of \( f(\mathbf{A}) \vec{b} \) from the previous restart cycle.

int restart_length = 20

The size of the basis in each restart cycle.

int max_restarts = 40

Maximum number of restarts.

int num_ortho_vec = kAuto

If positive (k > 0), indicate the number of basis vectors to orthogonalize against (i.e., truncate the Arnoldi decomposition after k iterations). Otherwise, the method will perform the full orthogonalization. If the solver uses the Lanczos iteration, then this parameter has no effect.

OrthoMethod ortho_method = kArnoldiSGS

Orthogonalization method for the Krylov basis.

int verbose = 0

Set the verbosity level. 0 - No report. 1 - Report the update norm

\[ \| \vec{f}_k - \vec{f}_{k - 1} \|_2 \]
of the restart cycle k.