f01haf computes the action of the matrix exponential ${e}^{tA}$, on the matrix $B$, where $A$ is a complex $n\times n$ matrix, $B$ is a complex $n\times m$ matrix and $t$ is a complex scalar.
The routine may be called by the names f01haf or nagf_matop_complex_gen_matrix_actexp.
3Description
${e}^{tA}B$ is computed using the algorithm described in Al–Mohy and Higham (2011) which uses a truncated Taylor series to compute the product ${e}^{tA}B$ without explicitly forming ${e}^{tA}$.
4References
Al–Mohy A H and Higham N J (2011) Computing the action of the matrix exponential, with an application to exponential integrators SIAM J. Sci. Statist. Comput.33(2) 488-511
Higham N J (2008) Functions of Matrices: Theory and Computation SIAM, Philadelphia, PA, USA
5Arguments
1: $\mathbf{n}$ – IntegerInput
On entry: $n$, the order of the matrix $A$.
Constraint:
${\mathbf{n}}\ge 0$.
2: $\mathbf{m}$ – IntegerInput
On entry: $m$, the number of columns of the matrix $B$.
Note: the second dimension of the array b
must be at least
${\mathbf{m}}$.
On entry: the $n\times m$ matrix $B$.
On exit: the $n\times m$ matrix ${e}^{tA}B$.
6: $\mathbf{ldb}$ – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which f01haf is called.
Constraint:
${\mathbf{ldb}}\ge {\mathbf{n}}$.
7: $\mathbf{t}$ – Complex (Kind=nag_wp)Input
On entry: the scalar $t$.
8: $\mathbf{ifail}$ – IntegerInput/Output
On entry: ifail must be set to $0$, $\mathrm{-1}$ or $1$ to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of $0$ causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of $\mathrm{-1}$ means that an error message is printed while a value of $1$ means that it is not.
If halting is not appropriate, the value $\mathrm{-1}$ or $1$ is recommended. If message printing is undesirable, then the value $1$ is recommended. Otherwise, the value $0$ is recommended. When the value $-\mathbf{1}$ or $\mathbf{1}$ is used it is essential to test the value of ifail on exit.
On exit: ${\mathbf{ifail}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).
6Error Indicators and Warnings
If on entry ${\mathbf{ifail}}=0$ or $\mathrm{-1}$, explanatory error messages are output on the current error message unit (as defined by x04aaf).
Errors or warnings detected by the routine:
${\mathbf{ifail}}=2$
${e}^{tA}B$ has been computed using an IEEE double precision Taylor series, although the arithmetic precision is higher than IEEE double precision.
${\mathbf{ifail}}=-1$
On entry, ${\mathbf{n}}=\u27e8\mathit{\text{value}}\u27e9$. Constraint: ${\mathbf{n}}\ge 0$.
${\mathbf{ifail}}=-2$
On entry, ${\mathbf{m}}=\u27e8\mathit{\text{value}}\u27e9$. Constraint: ${\mathbf{m}}\ge 0$.
${\mathbf{ifail}}=-4$
On entry, ${\mathbf{lda}}=\u27e8\mathit{\text{value}}\u27e9$ and ${\mathbf{n}}=\u27e8\mathit{\text{value}}\u27e9$. Constraint: ${\mathbf{lda}}\ge {\mathbf{n}}$.
${\mathbf{ifail}}=-6$
On entry, ${\mathbf{ldb}}=\u27e8\mathit{\text{value}}\u27e9$ and ${\mathbf{n}}=\u27e8\mathit{\text{value}}\u27e9$. Constraint: ${\mathbf{ldb}}\ge {\mathbf{n}}$.
${\mathbf{ifail}}=-99$
An unexpected error has been triggered by this routine. Please
contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.
7Accuracy
For a Hermitian matrix $A$ (for which ${A}^{\mathrm{H}}=A$) the computed matrix ${e}^{tA}B$ is guaranteed to be close to the exact matrix, that is, the method is forward stable. No such guarantee can be given for non-Hermitian matrices. See Section 4 of Al–Mohy and Higham (2011) for details and further discussion.
8Parallelism and Performance
f01haf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f01haf makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.
9Further Comments
The matrix ${e}^{tA}B$ could be computed by explicitly forming ${e}^{tA}$ using f01fcf and multiplying $B$ by the result. However, experiments show that it is usually both more accurate and quicker to use f01haf.
The cost of the algorithm is $\mathit{O}\left({n}^{2}m\right)$. The precise cost depends on $A$ since a combination of balancing, shifting and scaling is used prior to the Taylor series evaluation.
Approximately ${n}^{2}+(2m+8)n$ of complex allocatable memory is required by f01haf.
f01gaf can be used to compute ${e}^{tA}B$ for real $A$, $B$, and $t$. f01hbf provides an implementation of the algorithm with a reverse communication interface, which returns control to the calling program when matrix multiplications are required. This should be used if $A$ is large and sparse.