Expv Taylor

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

Solver for calculating \( e^{t \mathbf{A}} \vec{b}\) using the Taylor series [1].

More specifically, it approximates the action of the matrix exponential as

\[ e^{t \mathbf{A}} \vec{b} = (e^{s \mathbf{A}} \vec{b})^s \]

where

\[ e^{s \mathbf{A}} \vec{v} \approx \sum_{k = 0}^m{\frac{1}{k!} \mathbf{A}^k \vec{v}} \]

The parameters s and m are selected in such a way to minimize the number of matrix-vector products while preserving the accuracy of the method. It is worth mentioning that \( s \sim \|t \mathbf{A}\|_1 \), and thus, if the entries of the matrix are very large, then this algorithm will be very expensive.

References:

[1] A. H. Al-Mohy and N. J. Higham, “Computing the Action of the Matrix Exponential, with an Application to Exponential Integrators”, SIAM Journal on Scientific Computing, vol. 33, no. 2, Art. no. 2, Mar. 2011, doi: 10.1137/100788860.

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

  • L – Location of the data.

Public Functions

inline ExpvTaylor(ExpvTaylorOptions params = ExpvTaylorOptions())

Initialize the solver with the parameters params.

Parameters:

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

inline void set_params(ExpvTaylorOptions params)

Set the parameters of the solver.

Parameters:

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

inline int num_steps() const
Returns:

The total number of steps used in the last run of the solver.

struct ExpvTaylorOptions

Parameters for the ExpvTaylor solver.

Public Members

double atol = 1E-6

Tolerance for terminating the taylor series early when \( c_{k + 1} + c_k \leq atol + rtol * \| x_k \|_\infty \) with \( c_k = \|\frac{1}{k!} \mathbf{A}^k \vec{v} \|_\infty \) and \( x_k = \sum_{j = 0}^{k - 1}{\frac{1}{j!} \mathbf{A}}^j \vec{v} \)

bool verbose = false

Show the iteration logs if verbose = true.