`Expokit.Expokit`

— ModuleMain module of `Expokit`

– Julia implementations of some routines contained in EXPOKIT.

Those routines allow an efficient calculation of the action of matrix exponentials on vectors for large sparse matrices. For more details about the methods see R.B. Sidje, ACM Trans. Math. Softw., 24(1):130-156, 1998 (or its preprint).

`Expokit.chbv`

— Method`chbv(A, vec)`

Calculate matrix exponential acting on some vector using the Chebyshev method.

**Input**

`A`

– matrix which can be dense or sparse`vec`

– vector on which the matrix exponential of`A`

is applied

**Notes**

This Julia implementation is based on Expokit's CHBV Matlab code by Roger B. Sidje, see below.

```
y = chbv( H, x )
CHBV computes the direct action of the matrix exponential on
a vector: y = exp(H) * x. It uses the partial fraction expansion of
the uniform rational Chebyshev approximation of type (14,14).
About 14-digit accuracy is expected if the matrix H is symmetric
negative definite. The algorithm may behave poorly otherwise.
See also PADM, EXPOKIT.
Roger B. Sidje (rbs@maths.uq.edu.au)
EXPOKIT: Software Package for Computing Matrix Exponentials.
ACM - Transactions On Mathematical Software, 24(1):130-156, 1998
```

`Expokit.expmv`

— Method`expmv{T}(t, A, vec; [tol], [m], [norm], [anorm])`

Calculate matrix exponential acting on some vector, $w = e^{tA}v$, using the Krylov subspace approximation.

See R.B. Sidje, ACM Trans. Math. Softw., 24(1):130-156, 1998 and http://www.maths.uq.edu.au/expokit

`Expokit.padm`

— Method`padm(A; p=6)`

Calculate matrix exponential using Pade approximants.

`padm`

uses the irreducible (p, p)-degree rational Pade approximation to the exponential function. The result is always a dense matrix.

**Input**

`A`

– matrix which can be dense or sparse`p`

– (optional, default: 6) degree of the rational Pade approximation to the exponential function

**Notes**

This Julia implementation originated from Expokit's PADM Matlab code by Roger B. Sidje, see below.

E = padm( A, p ) PADM computes the matrix exponential exp(A) using the irreducible (p,p)-degree rational Pade approximation to the exponential function.

E = padm( A ) p is internally set to 6 (recommended and generally satisfactory).

See also CHBV, EXPOKIT and the MATLAB supplied functions EXPM and EXPM1.

Roger B. Sidje (rbs@maths.uq.edu.au) EXPOKIT: Software Package for Computing Matrix Exponentials. ACM - Transactions On Mathematical Software, 24(1):130-156, 1998

`Expokit.phimv`

— Method`phimv{T}(t, A, u, vec; [tol], [m], [norm], [anorm])`

Calculate the solution of a nonhomogeneous linear ODE problem with constant input $w = e^{tA}v + tφ(tA)u$ using the Krylov subspace approximation.

**Input**

`A`

– matrix which can be dense or sparse`u`

– vector, constant input of the ODE`vec`

– vector on which the matrix exponential of $A$ is applied`tol`

– (optional, default: 1e-7) the requested accuracy tolerance on $w$`m`

– (optional, default: min(30, n)) maximum size of the Krylov basis

```
[w, err] = phiv( t, A, u, v, tol, m )
PHIV computes an approximation of ``w = exp(tA)v + t φ(tA)u``
for a general matrix A using Krylov subspace projection techniques.
Here, ``φ(z) = (\exp(z)-1)/z`` and ``w`` is the solution of the
nonhomogeneous linear ODE problem ``w' = Aw + u``, ``w(0) = v``.
It does not compute the matrix functions in isolation but instead,
it computes directly the action of these functions on the
operand vectors. This way of doing so allows for addressing large
sparse problems. The matrix under consideration interacts only
via matrix-vector products (matrix-free method).
Roger B. Sidje (rbs@maths.uq.edu.au)
EXPOKIT: Software Package for Computing Matrix Exponentials.
ACM - Transactions On Mathematical Software, 24(1):130-156, 1998
```