Internals

Documentation for ExponentialAction.jl's internal functions.

See the Public Documentation section for documentation of the public interface.

Index

Internal Interface

ExponentialAction.expv_taylorMethod
expv_taylor(t, A, B, degree_max; tol)

Compute $\exp(tA)B$ using the truncated Taylor series with degree $m=$ degree_max.

Instead of computing the Taylor series $T_m(tA)$ of the matrix exponential directly, its action on $B$ is computed instead.

The series is truncated early if

\[\frac{\lVert \exp(t A) B - T_m(tA) B \rVert_1}{\lVert T_m(tA) B \rVert_1} \le \mathrm{tol},\]

where $\lVert X \rVert_1$ is the operator 1-norm of the matrix $X$. This condition is only approximately checked.

source
ExponentialAction.expv_taylor_cacheMethod
expv_taylor_cache(t, A, B, degree_max, k, Z; tol)

Compute $\exp(tkA)B$ using the truncated Taylor series with degree $m=$ degree_max.

This method stores all matrix products in a cache Z, where $Z_p = \frac{1}{(p-1)!} (t A)^{p-1} B$. This cache can be reused if $k$ changes but $t$, $A$, and $B$ are unchanged.

Z is a vector of arrays of the same shape as B and is not mutated; instead the (possibly updated) cache is returned.

Returns

  • F::AbstractMatrix: The action of the truncated Taylor series
  • Z::AbstractVector: The cache of matrix products of the same shape as F. If the cache is updated, then this is a different object than the input Z.

See expv_taylor.

source
ExponentialAction.parametersMethod
parameters(t, A, ncols_B; kwargs...) -> (degree_opt, scale)

Compute Taylor series parameters needed for $\exp(tA)B$.

This is Code Fragment 3.1 from [AlMohyHigham2011].

Keywords

  • tol: the desired relative tolerance
  • degree_max=55: the maximum degree of the truncated Taylor series that will be used. This is $m_{\mathrm{max}}$ in [AlMohyHigham2011], where they recommend a value of 55 in §3.
  • ℓ=2: the number of columns in the matrix that is multiplied for norm estimation (note: currently only used for control flow.). Recommended values are 1 or 2.

Returns

  • degree_opt: the degree of the truncated Taylor series that will be used. This is $m^*$ in [AlMohyHigham2011],
  • scale: the amount of scaling $s$ that will be applied to $A$. The truncated Taylor series of $\exp(t A / s)$ will be applied $s$ times to $B$.
source