SLEPc for Python (slepc4py) is a Python package that provides convenient access to the functionality of SLEPc.
SLEPc [1], [2] implements algorithms and tools for the numerical solution of large, sparse eigenvalue problems on parallel computers. It can be used for linear eigenvalue problems in either standard or generalized form, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix, and to solve nonlinear eigenvalue problems (quadratic or general). Additionally, SLEPc provides solvers for the computation of the action of a matrix function on a vector.
SLEPc is intended for computing a subset of the spectrum of a matrix (or matrix pair). One can for instance approximate the largest magnitude eigenvalues, or the smallest ones, or even those eigenvalues located near a given region of the complex plane. Interior eigenvalues are harder to compute, so SLEPc provides different methodologies. One such method is to use a spectral transformation. Cheaper alternatives are also available.
[1] | C. Campos, J. E. Roman, E. Romero, A. Tomas. SLEPc Users Manual. DISC-II/24/02 - Revision 3.5 D. Sistemas Informáticos y Computación, Universitat Politècnica de València. 2014. |
[2] | Vicente Hernandez, Jose E. Roman and Vicente Vidal. SLEPc: A Scalable and Flexible Toolkit for the Solution of Eigenvalue Problems, ACM Trans. Math. Softw. 31(3), pp. 351-362, 2005. |
Currently, the following types of eigenproblems can be addressed:
For the eigenvalue problem, the following methods are available:
For singular value computations, the following alternatives can be used:
For quadratic eigenvalue problems, the following methods are available:
Computation of interior eigenvalues is supported by means of the following methodologies:
Other remarkable features include:
SLEPc provides the following components, which are mirrored by slepc4py for its use from Python.
EPS: | The Eigenvalue Problem Solver is the component that provides all the functionality necessary to define and solve an eigenproblem. It provides mechanisms for completely specifying the problem: the problem type (e.g. standard symmetric), number of eigenvalues to compute, part of the spectrum of interest. Once the problem has been defined, a collection of solvers can be used to compute the required solutions. The behaviour of the solvers can be tuned by means of a few parameters, such as the maximum dimension of the subspace to be used during the computation. |
---|---|
SVD: | This component is the analog of EPS for the case of Singular Value Decompositions. The user provides a rectangular matrix and specifies how many singular values and vectors are to be computed, whether the largest or smallest ones, as well as some other parameters for fine tuning the computation. Different solvers are available, as in the case of EPS. |
QEP: | This component is the analog of EPS for the case of Quadratic Eigenvalue Problems. The user provides three square matrices that define the problem. Several parameters can be specified, as in the case of EPS. It is also possible to indicate whether the problem belongs to a special type, e.g., symmetric or gyroscopic. |
NEP: | This component covers the case of general nonlinear eigenproblems, T(lambda)x=0. |
MFN: | This component provides the functionality for computing the action of a matrix function on a vector. Given a matrix A and a vector b, the call MFNSolve(mfn,b,x) computes x=f(A)b, where f is a function such as the exponential. |
ST: | The Spectral Transformation is a component that provides convenient implementations of common spectral transformations. These are simple transformations that map eigenvalues to different positions, in such a way that convergence to wanted eigenvalues is enhanced. The most common spectral transformation is shift-and-invert, that allows for the computation of eigenvalues closest to a given target value. |
IP: | This component encapsulates the concept of an Inner Product in a vector space, which can be either the standard Hermitian inner product x’y or the positive definite product x’By for a given SPD matrix B. This component provides convenient access to common operations such as orthogonalization of vectors. The IP component is usually not required by end-users. |