PHIPM: A Krylov subspace algorithm for evaluating the 
phi-functions appearing in exponential integrators


Installation
------------
Copy phipm.m and expmnorm.m to a directory where Matlab can find them.


Usage
-----
The PHIPM function solves the differential equation

   u' = Au + b_1 + t b_2 + 1/2 t^2 b_3 + ... + (t^(p-1) / (p-1)!) b_p,
   u(0) = b_0.

A call of the PHIPM function has the form

   [U, STATS] = PHIPM(T, A, B, TOL, SYMM, M)

There are three mandatory input arguments and one mandatory output
argument; the other arguments are optional. The first input argument
is T, the final time for the differential equation. This is generally
chosen to be T = 1 because the solution at that time equals

   phi_0(A) b_0 + phi_1(A) b_1 + phi_2(A) b_2 + ... + phi_p(A) b_p.

The second argument is the n-by-n matrix A. The third argument, B, is
an n-by-(p+1) matrix with columns representing the vectors b_0, b_1,
b_2, ..., b_p to be multiplied by the corresponding phi-functions.
There is one mandatory output argument: U, the numerical approximation
to the solution of the differential equation at the final time T.

There are three optional input arguments. The first one is the
tolerance TOL. The default tolerance is 10^(-7). Then comes SYMM, a
boolean indicating whether the matrix A is symmetric (SYMM=1) or not
(SYMM=0). If not supplied, the code determines itself whether A is
symmetric. The final input argument is M, the initial choice for the
dimension of the Krylov subspace. The initial choice is M = 10 by
default. There is also one optional output argument: STATS, for
providing the user with various statistics of the computation. It is a
vector with four entries: STATS(1) is the number of steps needed to
complete the integration, STATS(2) is the number of rejected steps,
STATS(3) is the number of matrix-vector products, and STATS(4) is the
number of matrix exponentials computed.


Files
-----
phipm.m		   Main algorithm varies stepsize and Krylov subspace
phip.m		   Similar to phipm.m except the Krylov subspace is constant
expmnorm.m  	   Computes matrix exponential and norm
README       	   This file

HestonTestSpeed.m  To produce Figure 1
FDHeston.m         Ditto
rhsheston.m        Ditto
Crank.m     	   Crank-Nicolson method
Douglas.m          ADI scheme due to Douglas and Rachford
Hundsdorfer.m      ADI scheme due to Hundsdorfer and Verwer

Experiment1.m 	   To produce Table 1
Experiment2.m  	   To produce Table 2

expv.m		   From expokit, for details see the wesite
		   http://www.maths.uq.edu.au/expokit/
phiv.m   	   Ditto

expmv.m            From Awad H. Al-Mohy and Nicholas J. Higham,
                   "Computing the Action of the Matrix Exponential, 
                   with an Application to Exponential Integrators."
                   http://eprints.ma.man.ac.uk/1536/
expmv_tspan.m      Ditto
normAm.m           Ditto
select_taylor_degree.m  Ditto
theta_taylor.mat   Ditto
          
orani678.mat	   Sparse matrix used in Experiment1 and Experiment2.
	      	   This matrix can be downloaded along with many more 
	      	   sparse matrices from the website 
	      	   http://www.cise.ufl.edu/research/sparse/matrices/
bcspwr10.mat   	   Ditto
gr_30_30.mat   	   Ditto
helm2d03.mat   	   Ditto
