We describe here the main algorithms implemented for the solution of and point to the relevant modules and subroutines in the library.
Let be an orthogonal matrix whose columns span an arbitrary Krylov subspace of dimension . We obtain an approximation of by
Different methods for the approximation of matrix functions are obtained for different choices of the projection spaces .
Given a set of scalars in the the extended complex plane , that are not eigenvalues of , let The rational Krylov subspace of order associated with , and is defined by where is the standard polynomial Krylov space.
By defining the matrices where are such that , it is known that the rational Krylov space can also be written as follows [1] This general formulation allows to recast most of the classical Krylov methods in terms of a rational Krylov method with a specific choice of and . In particular,
The extended Krylov method [2][3], in which is obtained by setting
The shift-and-invert rational Krylov [4][5], where is defined by taking and for each .
The PSFUN library contains the implementation of several flavour of these methods
that can be used for the computation of \eqref{eq:krylov_fA_approx}, the field
in the psfun_d_krylov type represent the options neeeded to for setting
up and applying the different implemented method for a given matrix function
fun
(represented by an object of type psfun_d_serial).
The following table has the info on the available methods.
Method | Class | Matrix type | "kname" | Source |
---|---|---|---|---|
Arnoldi | Polynomial | General | "ARNOLDI" | [6] |
Lanczos | Polynomial | Symmetric | "LANCZOS" | [6] |
This module makes use of the matrix function definition based on the Cauchy integral: given a closed contour lying in the region of analyticity of the function and containing the spectrum of , can be defined as By applying a quadrature formula on points to \eqref{eq:eq_ContourInt_quadrature}, with weights and nodes , it is possible to approximate \eqref{eq:eq_problem_to_solve} as that is then computationally equivalent to the solution of linear systems with the same right-hand side.
The construction of the quadrature module is made of several interconnected modules. The base module is the psfun_base_quadrature_mod, it contains the base module of which the different quadratures are extensions.
Then the functions for working with the quadrature formula having either
real (psb_dpk_
) or complex quadrature nodes and weights for
\eqref{eq:eq_QuadratureFormula} are contained in the relative modules
These two modules make use of abstract interface
for both the
dquadrule/zquadrule and the generic
function for which we compute the . This is implemented this way
to permit the user to implement its own quadrature rule and functions. An example
of how this can be achieved is contained in the functions included in the
submodules of psfun_z_quadrature_mod that implements the three routines
from 7.
[1] Güttel, Stefan. Rational Krylov approximation of matrix functions: numerical methods and optimal pole selection. GAMM-Mitt. 36 (2013), no. 1, 8--31.
[2] Druskin, Vladimir; Knizhnerman, Leonid. Extended Krylov subspaces: approximation of the matrix square root and related functions. SIAM J. Matrix Anal. Appl. 19 (1998), no. 3, 755--771.
[3] Knizhnerman, L.; Simoncini, V. A new investigation of the extended Krylov subspace method for matrix function evaluations. Numer. Linear Algebra Appl. 17 (2010), no. 4, 615--638.
[4] Moret, I.; Novati, P. RD-rational approximations of the matrix exponential. BIT 44 (2004), no. 3, 595--615.
[5] van den Eshof, Jasper; Hochbruck, Marlis. Preconditioning Lanczos approximations to the matrix exponential. SIAM J. Sci. Comput. 27 (2006), no. 4, 1438--1457.
[6] Saad, Y. Analysis of some Krylov subspace approximations to the matrix exponential operator. SIAM J. Numer. Anal. 29 (1992), no. 1, 209--228.
[7] Hale, Nicholas; Higham, Nicholas J.; Trefethen, Lloyd N. Computing , and related matrix functions by contour integrals. SIAM J. Numer. Anal. 46 (2008), no. 5, 2505--2523.