Petsc is required and can be installed with\
git clone -b release https://gitlab.com/petsc/petsc.git petsc
git pull
Once downloaded, Petsc can be configured with
./configure --with-cc=gcc --with-cxx=g++ --download-mpich --download-f2cblaslapack --download-hdf5 --with-fc=0
and built according to the message given when the configuration is set up.
Note: Depending on what is already available on the system, it may not be necessary to download everything during the configuration. Further, hdf5 is only required for the tests or if you want to read in Matlab matrices to Petsc.
You may also follow the installation guidelines given on Petsc's website (https://petsc.org/release/install/install_tutorial/) but it is worth noting that this code does not require Fortran for anything and leaving it out during configuration may speed up build times.
This package solves problems of the form
expmv(PetscReal t, Mat A, Vec b,const char precision[], int mmax, int pmax, bool shift, bool balance)
Constructor for the expmv class
t,A,b are their counterparts in the expression
precision should be one of 'half', 'single', or 'double'. Default is 'double'.
mmax is the largest m allowed, as described in [1]. Default is 55.
shift decides if the matrix
balance decides if the matrix should be balanced before computations. Deafult is false.
void compute_action()
Computes the action x using the given instance variables. It is then possible to get x using Vec get_x().
[1] Al-Mohy, A.H. and Higham, N.J., 2011. Computing the action of the matrix exponential, with an application to exponential integrators. SIAM journal on scientific computing, 33(2), pp.488-511.