# naginterfaces.library.matop.complex_​gen_​matrix_​actexp_​rcomm¶

naginterfaces.library.matop.complex_gen_matrix_actexp_rcomm(irevcm, b, t, b2, x, y, p, r, z, comm, tr=0.0)[source]

complex_gen_matrix_actexp_rcomm computes the action of the matrix exponential , on the matrix , where is a complex matrix, is a complex matrix and is a complex scalar. It uses reverse communication for evaluating matrix products, so that the matrix is not accessed explicitly.

For full information please refer to the NAG Library document for f01hb

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/f01/f01hbf.html

Parameters
irevcmint

On initial entry: must be set to .

bcomplex, ndarray, shape , modified in place

On initial entry: the matrix .

On intermediate exit: if , contains the matrix .

On intermediate entry: must not be changed.

On final exit: the matrix .

tcomplex

The scalar .

b2complex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate entry: if , must contain .

On final exit: the array is undefined.

xcomplex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate exit: if , contains the current matrix .

On intermediate entry: if , must contain .

On final exit: the array is undefined.

ycomplex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate exit: if , contains the current matrix .

On intermediate entry: if , must contain .

On final exit: the array is undefined.

pcomplex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate entry: if , must contain .

On final exit: the array is undefined.

rcomplex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate entry: if , must contain .

On final exit: the array is undefined.

zcomplex, ndarray, shape , modified in place

On initial entry: need not be set.

On intermediate exit: if or , contains the vector .

On intermediate entry: must not be changed.

On final exit: the array is undefined.

commdict, communication object, modified in place

Communication structure.

On initial entry: need not be set.

trcomplex, optional

The trace of . If this is not available then any number can be supplied ( is a reasonable default); however, in the trivial case, , the result is immediately returned in the first row of . See Further Comments.

Returns
irevcmint

On intermediate exit: , , , or . The calling program must:

1. if : evaluate , where is an matrix, and store the result in ;

if : evaluate , where and are matrices, and store the result in ;

if : evaluate and store the result in ;

if : evaluate and store the result in ;

if : evaluate and store the result in .

2. call complex_gen_matrix_actexp_rcomm again with all other parameters unchanged.

On final exit: .

Raises
NagValueError
(errno )

On initial entry, .

Constraint: .

(errno )

On initial entry, .

Constraint: .

(errno )

On intermediate re-entry, .

Constraint: , , , or .

(errno )

On initial entry, .

Constraint: .

Warns
NagAlgorithmicWarning
(errno )

has been computed using an IEEE double precision Taylor series, although the arithmetic precision is higher than IEEE double precision.

Notes

is computed using the algorithm described in Al–Mohy and Higham (2011) which uses a truncated Taylor series to compute the without explicitly forming .

The algorithm does not explicity need to access the elements of ; it only requires the result of matrix multiplications of the form or . A reverse communication interface is used, in which control is returned to the calling program whenever a matrix product is required.

References

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