| SLEPC4PY(3) | slepc4py | SLEPC4PY(3) |
NAME¶
slepc4py - SLEPc for Python
- Authors
- Lisandro Dalcin, Jose E. Roman
- Contact
- <dalcinl@gmail.com>, <jroman@dsic.upv.es>
- Web Site
- <https://gitlab.com/slepc/slepc>
- Date
- Nov 23, 2025
Abstract¶
This document describes slepc4py <https://gitlab.com/slepc/slepc>, a Python <https://www.python.org> port to the SLEPc <https://slepc.upv.es> libraries.
SLEPc <https://slepc.upv.es> is a software package for the parallel solution of large-scale eigenvalue problems. It can be used for computing eigenvalues and eigenvectors of large, sparse matrices, or matrix pairs, and also for computing singular values and vectors of a rectangular matrix.
SLEPc <https://slepc.upv.es> relies on PETSc <https://petsc.org> for basic functionality such as the representation of matrices and vectors, and the solution of linear systems of equations. Thus, slepc4py <https://gitlab.com/slepc/slepc> must be used together with its companion petsc4py <https://gitlab.com/petsc/petsc>.
CONTENTS¶
Overview¶
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 (polynomial 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]
- J. E. Roman, C. Campos, L. Dalcin, E. Romero, A. Tomas. SLEPc Users Manual. DSIC-II/24/02 - Revision 3.24. D. Sistemas Informaticos y Computacion, Universitat Politecnica de Valencia. 2025.
- [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.
Features¶
Currently, the following types of eigenproblems can be addressed:
- Standard eigenvalue problem, Ax=kx, either for Hermitian or non-Hermitian matrices.
- Generalized eigenvalue problem, Ax=kBx, either Hermitian positive-definite or not.
- Partial singular value decomposition of a rectangular matrix, Au=sv.
- Polynomial eigenvalue problem, P(k)x=0.
- Nonlinear eigenvalue problem, T(k)x=0.
- Computing the action of a matrix function on a vector, w=f(alpha A)v.
For the linear eigenvalue problem, the following methods are available:
- Krylov eigensolvers, particularly Krylov-Schur, Arnoldi, and Lanczos.
- Davidson-type eigensolvers, including Generalized Davidson and Jacobi-Davidson.
- Subspace iteration and single vector iterations (inverse iteration, RQI).
- Conjugate gradient for the minimization of the Rayleigh quotient.
- A contour integral solver.
For singular value computations, the following alternatives can be used:
- Use an eigensolver via the cross-product matrix A’A or the cyclic matrix [0 A; A’ 0].
- Explicitly restarted Lanczos bidiagonalization.
- Implicitly restarted Lanczos bidiagonalization (thick-restart Lanczos).
For polynomial eigenvalue problems, the following methods are available:
- Use an eigensolver to solve the generalized eigenvalue problem obtained after linearization.
- TOAR and Q-Arnoldi, memory efficient variants of Arnoldi for polynomial eigenproblems.
For general nonlinear eigenvalue problems, the following methods can be used:
- Solve a polynomial eigenproblem obtained via polynomial interpolation.
- Rational interpolation and linearization (NLEIGS).
- Newton-type methods such as SLP or RII.
Computation of interior eigenvalues is supported by means of the following methodologies:
- Spectral transformations, such as shift-and-invert. This technique implicitly uses the inverse of the shifted matrix (A-tI) in order to compute eigenvalues closest to a given target value, t.
- Harmonic extraction, a cheap alternative to shift-and-invert that also tries to approximate eigenvalues closest to a target, t, but without requiring a matrix inversion.
Other remarkable features include:
- High computational efficiency, by using NumPy and SLEPc under the hood.
- Data-structure neutral implementation, by using efficient sparse matrix storage provided by PETSc. Implicit matrix representation is also available by providing basic operations such as matrix-vector products as user-defined Python functions.
- Run-time flexibility, by specifying numerous setting at the command line.
- Ability to do the computation in parallel.
Components¶
SLEPc provides the following components, which are mirrored by slepc4py for its use from Python. The first five components are solvers for different classes of problems, while the rest can be considered auxiliary object.
- 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 behavior 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.
- PEP
- This component is the analog of EPS for the case of Polynomial Eigenvalue Problems. The user provides the coefficient matrices of the polynomial. 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. The user provides the parameter-dependent matrix T via the split form or by means of callback functions.
- 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.
- LME
- This component provides the functionality for solving linear matrix equations such as Lyapunov or Sylvester where the solution has low rank.
- 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.
- BV
- This component encapsulates the concept of a set of Basis Vectors spanning a vector space. This component provides convenient access to common operations such as orthogonalization of vectors. The BV component is usually not required by end-users.
- DS
- The Dense System (or Direct Solver) component, used internally to solve dense eigenproblems of small size that appear in the course of iterative eigensolvers.
- FN
- A component used to define mathematical functions. This is required by the end-user for instance to define function T(.) when solving nonlinear eigenproblems with NEP in split form.
- RG
- A component used to define a region of the complex plane such as an ellipse or a rectangle. This is required by end-users in some cases such as contour-integral eigensolvers.
In addition to the above components, some extra functionality is provided in the :Sys: and :Util: sections.
Tutorial¶
This tutorial is intended for basic use of slepc4py. For more advanced use, the reader is referred to SLEPc tutorials as well as to slepc4py reference documentation.
Commented source of a simple example¶
In this section, we include the source code of example demo/ex1.py available in the slepc4py distribution, with comments inserted inline.
The first thing to do is initialize the libraries. This is normally not required, as it is done automatically at import time. However, if you want to gain access to the facilities for accessing command-line options, the following lines must be executed by the main script prior to any petsc4py or slepc4py calls:
import sys, slepc4py slepc4py.init(sys.argv)
Next, we have to import the relevant modules. Normally, both PETSc and SLEPc modules have to be imported in all slepc4py programs. It may be useful to import NumPy as well:
from petsc4py import PETSc from slepc4py import SLEPc import numpy
At this point, we can use any petsc4py and slepc4py operations. For instance, the following lines allow the user to specify an integer command-line argument n with a default value of 30 (see the next section for example usage of command-line options):
opts = PETSc.Options()
n = opts.getInt('n', 30)
It is necessary to build a matrix to define an eigenproblem (or two in the case of generalized eigenproblems). The following fragment of code creates the matrix object and then fills the non-zero elements one by one. The matrix of this particular example is tridiagonal, with value 2 in the diagonal, and -1 in off-diagonal positions. See petsc4py documentation for details about matrix objects:
A = PETSc.Mat().create() A.setSizes([n, n]) A.setFromOptions() A.setUp() rstart, rend = A.getOwnershipRange() # first row if rstart == 0:
A[0, :2] = [2, -1]
rstart += 1 # last row if rend == n:
A[n-1, -2:] = [-1, 2]
rend -= 1 # other rows for i in range(rstart, rend):
A[i, i-1:i+2] = [-1, 2, -1] A.assemble()
The solver object is created in a similar way as other objects in petsc4py:
E = SLEPc.EPS(); E.create()
Once the object is created, the eigenvalue problem must be specified. At least one matrix must be provided. The problem type must be indicated as well, in this case it is HEP (Hermitian eigenvalue problem). Apart from these, other settings could be provided here (for instance, the tolerance for the computation). After all options have been set, the user should call the setFromOptions() operation, so that any options specified at run time in the command line are passed to the solver object:
E.setOperators(A) E.setProblemType(SLEPc.EPS.ProblemType.HEP) E.setFromOptions()
After that, the solve() method will run the selected eigensolver, keeping the solution stored internally:
E.solve()
Once the computation has finished, we are ready to print the results. First, some informative data can be retrieved from the solver object:
Print = PETSc.Sys.Print
Print()
Print("******************************")
Print("*** SLEPc Solution Results ***")
Print("******************************")
Print()
its = E.getIterationNumber()
Print("Number of iterations of the method: %d" % its)
eps_type = E.getType()
Print("Solution method: %s" % eps_type)
nev, ncv, mpd = E.getDimensions()
Print("Number of requested eigenvalues: %d" % nev)
tol, maxit = E.getTolerances()
Print("Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit))
For retrieving the solution, it is necessary to find out how many eigenpairs have converged to the requested precision:
nconv = E.getConverged()
Print("Number of converged eigenpairs %d" % nconv)
For each of the nconv eigenpairs, we can retrieve the eigenvalue k, and the eigenvector, which is represented by means of two petsc4py vectors vr and vi (the real and imaginary part of the eigenvector, since for real matrices the eigenvalue and eigenvector may be complex). We also compute the corresponding relative errors in order to make sure that the computed solution is indeed correct:
if nconv > 0:
# Create the results vectors
vr, wr = A.getVecs()
vi, wi = A.getVecs()
#
Print()
Print(" k ||Ax-kx||/||kx|| ")
Print("----------------- ------------------")
for i in range(nconv):
k = E.getEigenpair(i, vr, vi)
error = E.computeError(i)
if k.imag != 0.0:
Print(" %9f%+9f j %12g" % (k.real, k.imag, error))
else:
Print(" %12f %12g" % (k.real, error))
Print()
Example of command-line usage¶
Now we illustrate how to specify command-line options in order to extract the full potential of slepc4py.
A simple execution of the demo/ex1.py script will result in the following output:
$ python demo/ex1.py ****************************** *** SLEPc Solution Results *** ****************************** Number of iterations of the method: 4 Solution method: krylovschur Number of requested eigenvalues: 1 Stopping condition: tol=1e-07, maxit=100 Number of converged eigenpairs 4
k ||Ax-kx||/||kx|| ----------------- ------------------
3.989739 5.76012e-09
3.959060 1.41957e-08
3.908279 6.74118e-08
3.837916 8.34269e-08
For specifying different setting for the solver parameters, we can use SLEPc command-line options with the -eps prefix. For instance, to change the number of requested eigenvalues and the tolerance:
$ python demo/ex1.py -eps_nev 10 -eps_tol 1e-11
The method used by the solver object can also be set at run time:
$ python demo/ex1.py -eps_type subspace
All the above settings can also be changed within the source code by making use of the appropriate slepc4py method. Since options can be set from within the code and the command-line, it is often useful to view the particular settings that are currently being used:
$ python demo/ex1.py -eps_view EPS Object: 1 MPI process
type: krylovschur
50% of basis vectors kept after restart
using the locking variant
problem type: symmetric eigenvalue problem
selected portion of the spectrum: largest eigenvalues in magnitude
number of eigenvalues (nev): 1
number of column vectors (ncv): 16
maximum dimension of projected problem (mpd): 16
maximum number of iterations: 100
tolerance: 1e-08
convergence test: relative to the eigenvalue BV Object: 1 MPI process
type: mat
17 columns of global length 30
orthogonalization method: classical Gram-Schmidt
orthogonalization refinement: if needed (eta: 0.7071)
block orthogonalization method: GS
doing matmult as a single matrix-matrix product DS Object: 1 MPI process
type: hep
solving the problem with: Implicit QR method (_steqr) ST Object: 1 MPI process
type: shift
shift: 0
number of matrices: 1
Note that for computing eigenvalues of smallest magnitude we can use the option -eps_smallest_magnitude, but for interior eigenvalues things are not so straightforward. One possibility is to try with harmonic extraction, for instance to get the eigenvalues closest to 0.6:
$ python demo/ex1.py -eps_harmonic -eps_target 0.6
Depending on the problem, harmonic extraction may fail to converge. In those cases, it is necessary to specify a spectral transformation other than the default. In the command-line, this is indicated with the -st_ prefix. For example, shift-and-invert with a value of the shift equal to 0.6 would be:
$ python demo/ex1.py -st_type sinvert -eps_target 0.6
Installation¶
Using pip or easy_install¶
You can use pip to install slepc4py <#module-slepc4py> and its dependencies (mpi4py <https://mpi4py.readthedocs.io/en/stable/mpi4py.html#module-mpi4py> is optional but highly recommended):
$ pip install [--user] numpy mpi4py $ pip install [--user] petsc petsc4py $ pip install [--user] slepc slepc4py
Alternatively, you can use easy_install (deprecated):
$ easy_install [--user] slepc4py
If you already have working PETSc and SLEPc installs, set environment variables SLEPC_DIR and PETSC_DIR (and perhaps PETSC_ARCH for non-prefix installs) to appropriate values and next use pip:
$ export SLEPC_DIR=/path/to/slepc $ export PETSC_DIR=/path/to/petsc $ export PETSC_ARCH=arch-linux2-c-opt $ pip install [--user] petsc4py slepc4py
Using distutils¶
Requirements¶
You need to have the following software properly installed in order to build SLEPc for Python:
- Any MPI <https://www.mpi-forum.org> implementation [1] (e.g., MPICH <https://www.mpich.org> or Open MPI <https://www.open-mpi.org>), built with shared libraries.
- A matching version of PETSc <https://petsc.org> built with shared libraries.
- A matching version of SLEPc <https://slepc.upv.es> built with shared libraries.
- NumPy <https://www.numpy.org> package.
- petsc4py <https://gitlab.com/petsc/petsc> package.
- [1]
- Unless you have appropriately configured and built SLEPc and PETSc without MPI (configure option --with-mpi=0).
- [2]
- You may need to use a parallelized version of the Python interpreter with some MPI-1 implementations (e.g. MPICH1).
Downloading¶
The SLEPc for Python package is available for download at the Python Package Index. You can use curl or wget to get a release tarball.
- •
- Using curl:
- •
- Using wget:
Building¶
After unpacking the release tarball:
$ tar -zxf slepc4py-X.Y.tar.gz $ cd slepc4py-X.Y
the distribution is ready for building.
Note:
$ export MACOSX_DEPLOYMENT_TARGET=10.6 $ export SDKROOT=/ $ export ARCHFLAGS='-arch x86_64'
Some environment configuration is needed to inform the location of PETSc and SLEPc. You can set (using setenv, export or what applies to you shell or system) the environment variables SLEPC_DIR, PETSC_DIR, and PETSC_ARCH indicating where you have built/installed SLEPc and PETSc:
$ export SLEPC_DIR=/usr/local/slepc $ export PETSC_DIR=/usr/local/petsc $ export PETSC_ARCH=arch-linux2-c-opt
Alternatively, you can edit the file setup.cfg and provide the required information below the [config] section:
[config] slepc_dir = /usr/local/slepc petsc_dir = /usr/local/petsc petsc_arch = arch-linux2-c-opt ...
Finally, you can build the distribution by typing:
$ python setup.py build
Installing¶
After building, the distribution is ready for installation.
If you have root privileges (either by log-in as the root user of by using sudo) and you want to install SLEPc for Python in your system for all users, just do:
$ python setup.py install
The previous steps will install the slepc4py <#module-slepc4py> package at standard location prefix/lib/pythonX.X/site-packages.
If you do not have root privileges or you want to install SLEPc for Python for your private use, just do:
$ python setup.py install --user
Citations¶
If SLEPc for Python been significant to a project that leads to an academic publication, please acknowledge that fact by citing the project.
- L. Dalcin, P. Kler, R. Paz, and A. Cosimo, Parallel Distributed Computing using Python, Advances in Water Resources, 34(9):1124-1139, 2011. <http://dx.doi.org/10.1016/j.advwatres.2011.04.013>
- V. Hernandez, J.E. Roman, and V. Vidal, SLEPc: A scalable and flexible toolkit for the solution of eigenvalue problems, ACM Transactions on Mathematical Software, 31(3):351-362, 2005. <http://dx.doi.org/10.1145/1089014.1089019>
Reference¶
| slepc4py <#module-slepc4py> | SLEPc for Python |
| slepc4py.typing <#module-slepc4py.typing> | Typing support. |
| slepc4py.SLEPc <#module-slepc4py.SLEPc> | Scalable Library for Eigenvalue Problem Computations |
slepc4py¶
SLEPc for Python¶
This package is an interface to SLEPc <https://slepc.upv.es> libraries.
SLEPc <https://slepc.upv.es> (the Scalable Library for Eigenvalue Problem Computations) is a software library for the solution of large scale sparse eigenvalue problems on parallel computers. It is an extension of PETSc <https://petsc.org> and can be used for either standard or generalized eigenproblems, with real or complex arithmetic. It can also be used for computing a partial SVD of a large, sparse, rectangular matrix.
Functions
| get_config <#slepc4py.get_config>() | |
| get_include <#slepc4py.get_include>() | Return the directory in the package that contains header files. |
| init <#slepc4py.init>([args, arch]) | Initialize SLEPc. |
slepc4py.get_config¶
slepc4py.get_include¶
- slepc4py.get_include()
- Return the directory in the package that contains header files.
Extension modules that need to compile against slepc4py should use this function to locate the appropriate include directory. Using Python distutils (or perhaps NumPy distutils):
import petscc4py, slepc4py
Extension('extension_name', ...
include_dirs=[...,
petsc4py.get_include(),
slepc4py.get_include(),])
slepc4py.init¶
- slepc4py.init(args=None, arch=None)
- Initialize SLEPc.
- Beyond sys.argv <https://docs.python.org/3/library/argparse.html#args>: command-line arguments, usually the ‘sys.argv’ list.
- arch: specific configuration to use.
- args (str <https://docs.python.org/3/library/stdtypes.html#str> | list <https://docs.python.org/3/library/stdtypes.html#list>[str <https://docs.python.org/3/library/stdtypes.html#str>] | None <https://docs.python.org/3/library/constants.html#None>)
- arch (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>)
Note:
slepc4py.typing¶
Typing support.
Attributes
| Scalar <#slepc4py.typing.Scalar> | Scalar type. |
| ArrayInt <#slepc4py.typing.ArrayInt> | Array of int <https://docs.python.org/3/library/functions.html#int>. |
| ArrayReal <#slepc4py.typing.ArrayReal> | Array of float <https://docs.python.org/3/library/functions.html#float>. |
| ArrayComplex <#slepc4py.typing.ArrayComplex> | Array of complex <https://docs.python.org/3/library/functions.html#complex>. |
| ArrayScalar <#slepc4py.typing.ArrayScalar> | Array of Scalar <#slepc4py.typing.Scalar> numbers. |
| LayoutSizeSpec <#slepc4py.typing.LayoutSizeSpec> | int <https://docs.python.org/3/library/functions.html#int> or 2-tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> describing the layout sizes. |
| EPSStoppingFunction <#slepc4py.typing.EPSStoppingFunction> | EPS <#slepc4py.SLEPc.EPS> stopping test callback. |
| EPSArbitraryFunction <#slepc4py.typing.EPSArbitraryFunction> | EPS <#slepc4py.SLEPc.EPS> arbitrary selection callback. |
| EPSEigenvalueComparison <#slepc4py.typing.EPSEigenvalueComparison> | EPS <#slepc4py.SLEPc.EPS> eigenvalue comparison callback. |
| EPSMonitorFunction <#slepc4py.typing.EPSMonitorFunction> | EPS <#slepc4py.SLEPc.EPS> monitor callback. |
| PEPStoppingFunction <#slepc4py.typing.PEPStoppingFunction> | PEP <#slepc4py.SLEPc.PEP> stopping test callback. |
| PEPMonitorFunction <#slepc4py.typing.PEPMonitorFunction> | PEP <#slepc4py.SLEPc.PEP> monitor callback. |
| NEPStoppingFunction <#slepc4py.typing.NEPStoppingFunction> | NEP <#slepc4py.SLEPc.NEP> stopping test callback. |
| NEPMonitorFunction <#slepc4py.typing.NEPMonitorFunction> | NEP <#slepc4py.SLEPc.NEP> monitor callback. |
| NEPFunction <#slepc4py.typing.NEPFunction> | NEP <#slepc4py.SLEPc.NEP> Function callback. |
| NEPJacobian <#slepc4py.typing.NEPJacobian> | NEP <#slepc4py.SLEPc.NEP> Jacobian callback. |
| SVDStoppingFunction <#slepc4py.typing.SVDStoppingFunction> | SVD <#slepc4py.SLEPc.SVD> stopping test callback. |
| SVDMonitorFunction <#slepc4py.typing.SVDMonitorFunction> | SVD <#slepc4py.SLEPc.SVD> monitor callback. |
| MFNMonitorFunction <#slepc4py.typing.MFNMonitorFunction> | MFN <#slepc4py.SLEPc.MFN> monitor callback. |
| LMEMonitorFunction <#slepc4py.typing.LMEMonitorFunction> | LME <#slepc4py.SLEPc.LME> monitor callback. |
slepc4py.typing.Scalar¶
- slepc4py.typing.Scalar = float | complex
- Scalar type.
Scalars can be either float <https://docs.python.org/3/library/functions.html#float> or complex <https://docs.python.org/3/library/functions.html#complex> (but not both) depending on how PETSc was configured (./configure --with-scalar-type=real|complex).
slepc4py.typing.ArrayInt¶
- slepc4py.typing.ArrayInt
- Array of int
<https://docs.python.org/3/library/functions.html#int>.
alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[int <https://docs.python.org/3/library/functions.html#int>]]
slepc4py.typing.ArrayReal¶
- slepc4py.typing.ArrayReal
- Array of float
<https://docs.python.org/3/library/functions.html#float>.
alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float>]]
slepc4py.typing.ArrayComplex¶
- slepc4py.typing.ArrayComplex
- Array of complex
<https://docs.python.org/3/library/functions.html#complex>.
alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[complex <https://docs.python.org/3/library/functions.html#complex>]]
slepc4py.typing.ArrayScalar¶
- slepc4py.typing.ArrayScalar
- Array of Scalar <#slepc4py.typing.Scalar> numbers.
alias of ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]]
slepc4py.typing.LayoutSizeSpec¶
- slepc4py.typing.LayoutSizeSpec = int | tuple[int, int]
- int <https://docs.python.org/3/library/functions.html#int> or
2-tuple
<https://docs.python.org/3/library/stdtypes.html#tuple> of
int <https://docs.python.org/3/library/functions.html#int>
describing the layout sizes.
A single int <https://docs.python.org/3/library/functions.html#int> indicates global size. A tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int> indicates (local_size, global_size).
slepc4py.typing.EPSStoppingFunction¶
- slepc4py.typing.EPSStoppingFunction
- EPS <#slepc4py.SLEPc.EPS> stopping test callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[EPS <#slepc4py.SLEPc.EPS>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>], ConvergedReason <#slepc4py.SLEPc.EPS.ConvergedReason>]
slepc4py.typing.EPSArbitraryFunction¶
- slepc4py.typing.EPSArbitraryFunction
- EPS <#slepc4py.SLEPc.EPS> arbitrary selection callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>, Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>], [float | complex, float | complex]]
slepc4py.typing.EPSEigenvalueComparison¶
- slepc4py.typing.EPSEigenvalueComparison
- EPS <#slepc4py.SLEPc.EPS> eigenvalue comparison callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>], int <https://docs.python.org/3/library/functions.html#int>]
slepc4py.typing.EPSMonitorFunction¶
- slepc4py.typing.EPSMonitorFunction
- EPS <#slepc4py.SLEPc.EPS> monitor callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[EPS <#slepc4py.SLEPc.EPS>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float>]], int <https://docs.python.org/3/library/functions.html#int>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.typing.PEPStoppingFunction¶
- slepc4py.typing.PEPStoppingFunction
- PEP <#slepc4py.SLEPc.PEP> stopping test callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[PEP <#slepc4py.SLEPc.PEP>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>], ConvergedReason <#slepc4py.SLEPc.PEP.ConvergedReason>]
slepc4py.typing.PEPMonitorFunction¶
- slepc4py.typing.PEPMonitorFunction
- PEP <#slepc4py.SLEPc.PEP> monitor callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[PEP <#slepc4py.SLEPc.PEP>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float>]], int <https://docs.python.org/3/library/functions.html#int>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.typing.NEPStoppingFunction¶
- slepc4py.typing.NEPStoppingFunction
- NEP <#slepc4py.SLEPc.NEP> stopping test callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[NEP <#slepc4py.SLEPc.NEP>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>], ConvergedReason <#slepc4py.SLEPc.NEP.ConvergedReason>]
slepc4py.typing.NEPMonitorFunction¶
- slepc4py.typing.NEPMonitorFunction
- NEP <#slepc4py.SLEPc.NEP> monitor callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[NEP <#slepc4py.SLEPc.NEP>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float>]], int <https://docs.python.org/3/library/functions.html#int>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.typing.NEPFunction¶
- slepc4py.typing.NEPFunction
- NEP <#slepc4py.SLEPc.NEP> Function callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[NEP <#slepc4py.SLEPc.NEP>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.typing.NEPJacobian¶
- slepc4py.typing.NEPJacobian
- NEP <#slepc4py.SLEPc.NEP> Jacobian callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[NEP <#slepc4py.SLEPc.NEP>, float <https://docs.python.org/3/library/functions.html#float> | complex <https://docs.python.org/3/library/functions.html#complex>, Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.typing.SVDStoppingFunction¶
- slepc4py.typing.SVDStoppingFunction
- SVD <#slepc4py.SLEPc.SVD> stopping test callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SVD <#slepc4py.SLEPc.SVD>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>], ConvergedReason <#slepc4py.SLEPc.SVD.ConvergedReason>]
slepc4py.typing.SVDMonitorFunction¶
- slepc4py.typing.SVDMonitorFunction
- SVD <#slepc4py.SLEPc.SVD> monitor callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[SVD <#slepc4py.SLEPc.SVD>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float>]], ndarray <https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html#numpy.ndarray>[tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any <https://docs.python.org/3/library/typing.html#typing.Any>, …], dtype <https://numpy.org/doc/stable/reference/generated/numpy.dtype.html#numpy.dtype>[float <https://docs.python.org/3/library/functions.html#float>]], int <https://docs.python.org/3/library/functions.html#int>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.typing.MFNMonitorFunction¶
- slepc4py.typing.MFNMonitorFunction
- MFN <#slepc4py.SLEPc.MFN> monitor callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[MFN <#slepc4py.SLEPc.MFN>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.typing.LMEMonitorFunction¶
- slepc4py.typing.LMEMonitorFunction
- LME <#slepc4py.SLEPc.LME> monitor callback.
alias of Callable <https://docs.python.org/3/library/typing.html#typing.Callable>[[LME <#slepc4py.SLEPc.LME>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>], None <https://docs.python.org/3/library/constants.html#None>]
slepc4py.SLEPc¶
Scalable Library for Eigenvalue Problem Computations
Classes
| BV <#slepc4py.SLEPc.BV> | BV. |
| BVSVDMethod <#slepc4py.SLEPc.BVSVDMethod> | BV methods for computing the SVD. |
| DS <#slepc4py.SLEPc.DS> | DS. |
| EPS <#slepc4py.SLEPc.EPS> | EPS. |
| EPSKrylovSchurBSEType <#slepc4py.SLEPc.EPSKrylovSchurBSEType> | EPS Krylov-Schur method for BSE problems. |
| FN <#slepc4py.SLEPc.FN> | FN. |
| LME <#slepc4py.SLEPc.LME> | LME. |
| MFN <#slepc4py.SLEPc.MFN> | MFN. |
| NEP <#slepc4py.SLEPc.NEP> | NEP. |
| PEP <#slepc4py.SLEPc.PEP> | PEP. |
| RG <#slepc4py.SLEPc.RG> | RG. |
| ST <#slepc4py.SLEPc.ST> | ST. |
| STFilterDamping <#slepc4py.SLEPc.STFilterDamping> | ST filter damping. |
| STFilterType <#slepc4py.SLEPc.STFilterType> | ST filter type. |
| SVD <#slepc4py.SLEPc.SVD> | SVD. |
| Sys <#slepc4py.SLEPc.Sys> | Sys. |
| Util <#slepc4py.SLEPc.Util> | Util. |
slepc4py.SLEPc.BV¶
- class slepc4py.SLEPc.BV
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
BV.
Enumerations
MatMultType <#slepc4py.SLEPc.BV.MatMultType> BV mat-mult types. OrthogBlockType <#slepc4py.SLEPc.BV.OrthogBlockType> BV block-orthogonalization types. OrthogRefineType <#slepc4py.SLEPc.BV.OrthogRefineType> BV orthogonalization refinement types. OrthogType <#slepc4py.SLEPc.BV.OrthogType> BV orthogonalization types. Type <#slepc4py.SLEPc.BV.Type> BV type.
slepc4py.SLEPc.BV.MatMultType¶
- class slepc4py.SLEPc.BV.MatMultType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
BV mat-mult types.
- VECS: Perform a matrix-vector multiply per each column.
- MAT: Carry out a Mat-Mat product with a dense matrix.
Attributes Summary
| MAT | Constant MAT of type int <https://docs.python.org/3/library/functions.html#int> |
| VECS | Constant VECS of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.BV.OrthogBlockType¶
- class slepc4py.SLEPc.BV.OrthogBlockType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
BV block-orthogonalization types.
- GS: Gram-Schmidt.
- CHOL: Cholesky.
- TSQR: Tall-skinny QR.
- TSQRCHOL: Tall-skinny QR with Cholesky.
- SVQB: SVQB.
Attributes Summary
| CHOL | Constant CHOL of type int <https://docs.python.org/3/library/functions.html#int> |
| GS | Constant GS of type int <https://docs.python.org/3/library/functions.html#int> |
| SVQB | Constant SVQB of type int <https://docs.python.org/3/library/functions.html#int> |
| TSQR | Constant TSQR of type int <https://docs.python.org/3/library/functions.html#int> |
| TSQRCHOL | Constant TSQRCHOL of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.BV.OrthogRefineType¶
- class slepc4py.SLEPc.BV.OrthogRefineType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
BV orthogonalization refinement types.
- IFNEEDED: Reorthogonalize if a criterion is satisfied.
- NEVER: Never reorthogonalize.
- ALWAYS: Always reorthogonalize.
Attributes Summary
| ALWAYS | Constant ALWAYS of type int <https://docs.python.org/3/library/functions.html#int> |
| IFNEEDED | Constant IFNEEDED of type int <https://docs.python.org/3/library/functions.html#int> |
| NEVER | Constant NEVER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.BV.OrthogType¶
- class slepc4py.SLEPc.BV.OrthogType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
BV orthogonalization types.
- CGS: Classical Gram-Schmidt.
- MGS: Modified Gram-Schmidt.
Attributes Summary
| CGS | Constant CGS of type int <https://docs.python.org/3/library/functions.html#int> |
| MGS | Constant MGS of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.BV.Type¶
- class slepc4py.SLEPc.BV.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
BV type.
Attributes Summary
CONTIGUOUS Object CONTIGUOUS of type str <https://docs.python.org/3/library/stdtypes.html#str> MAT Object MAT of type str <https://docs.python.org/3/library/stdtypes.html#str> SVEC Object SVEC of type str <https://docs.python.org/3/library/stdtypes.html#str> TENSOR Object TENSOR of type str <https://docs.python.org/3/library/stdtypes.html#str> VECS Object VECS of type str <https://docs.python.org/3/library/stdtypes.html#str> Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all BV options in the database. |
| applyMatrix(x, y) | Multiply a vector with the matrix associated to the bilinear form. |
| copy([result]) | Copy a basis vector object into another one. |
| copyColumn(j, i) | Copy the values from one of the columns to another one. |
| copyVec(j, v) | Copy one of the columns of a basis vectors object into a Vec. |
| create([comm]) | Create the BV object. |
| createFromMat(A) | Create a basis vectors object from a dense Mat object. |
| createMat() | Create a new Mat object of dense type and copy the contents of the BV. |
| createVec() | Create a Vec with the type and dimensions of the columns of the BV. |
| destroy() | Destroy the BV object. |
| dot(Y) | Compute the 'block-dot' product of two basis vectors objects. |
| dotColumn(j) | Dot products of a column against all the column vectors of a BV. |
| dotVec(v) | Dot products of a vector against all the column vectors of the BV. |
| duplicate() | Duplicate the BV object with the same type and dimensions. |
| duplicateResize(m) | Create a BV object of the same type and dimensions as an existing one. |
| getActiveColumns() | Get the current active dimensions. |
| getColumn(j) | Get a Vec object with the entries of the column of the BV object. |
| getDefiniteTolerance() | Get the tolerance to be used when checking a definite inner product. |
| getLeadingDimension() | Get the leading dimension. |
| getMat() | Get a Mat object of dense type that shares the memory of the BV object. |
| getMatMultMethod() | Get the method used for the matMult() operation. |
| getMatrix() | Get the matrix representation of the inner product. |
| getNumConstraints() | Get the number of constraints. |
| getOptionsPrefix() | Get the prefix used for searching for all BV options in the database. |
| getOrthogonalization() | Get the orthogonalization settings from the BV object. |
| getRandomContext() | Get the petsc4py.PETSc.Random <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Random.html#petsc4py.PETSc.Random> object associated with the BV. |
| getSizes() | Get the local and global sizes, and the number of columns. |
| getType() | Get the BV type of this object. |
| getVecType() | Get the vector type used by the basis vectors object. |
| insertConstraints(C) | Insert a set of vectors as constraints. |
| insertVec(j, w) | Insert a vector into the specified column. |
| insertVecs(s, W[, orth]) | Insert a set of vectors into specified columns. |
| matMult(A[, Y]) | Compute the matrix-vector product for each column, Y = A V. |
| matMultColumn(A, j) | Mat-vec product for a column, storing the result in the next column. |
| matMultHermitianTranspose(A[, Y]) | Pre-multiplication with the conjugate transpose of a matrix. |
| matMultHermitianTransposeColumn(A, j) | Conjugate-transpose matrix-vector product for a specified column. |
| matMultTransposeColumn(A, j) | Transpose matrix-vector product for a specified column. |
| matProject(A, Y) | Compute the projection of a matrix onto a subspace. |
| mult(alpha, beta, X, Q) | Compute Y = beta Y + alpha X Q. |
| multColumn(alpha, beta, j, q) | Compute y = beta y + alpha X q. |
| multInPlace(Q, s, e) | Update a set of vectors as V(:,s:e-1) = V Q(:,s:e-1). |
| multVec(alpha, beta, y, q) | Compute y = beta y + alpha X q. |
| norm([norm_type]) | Compute the matrix norm of the BV. |
| normColumn(j[, norm_type]) | Compute the vector norm of a selected column. |
| orthogonalize([R]) | Orthogonalize all columns (except leading ones) (QR decomposition). |
| orthogonalizeColumn(j) | Orthogonalize a column vector with respect to the previous ones. |
| orthogonalizeVec(v) | Orthogonalize a vector with respect to a set of vectors. |
| orthonormalizeColumn(j[, replace]) | Orthonormalize a column vector with respect to the previous ones. |
| resize(m[, copy]) | Change the number of columns. |
| restoreColumn(j, v) | Restore a column obtained with getColumn(). |
| restoreMat(A) | Restore the Mat obtained with getMat(). |
| scale(alpha) | Multiply the entries by a scalar value. |
| scaleColumn(j, alpha) | Scale column j by alpha. |
| setActiveColumns(l, k) | Set the columns that will be involved in operations. |
| setDefiniteTolerance(deftol) | Set the tolerance to be used when checking a definite inner product. |
| setFromOptions() | Set BV options from the options database. |
| setLeadingDimension(ld) | Set the leading dimension. |
| setMatMultMethod(method) | Set the method used for the matMult() operation. |
| setMatrix(mat[, indef]) | Set the bilinear form to be used for inner products. |
| setNumConstraints(nc) | Set the number of constraints. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all BV options in the database. |
| setOrthogonalization([otype, refine, eta, block]) | Set the method used for the (block-)orthogonalization of vectors. |
| setRandom() | Set the active columns of the BV to random numbers. |
| setRandomColumn(j) | Set one column of the BV to random numbers. |
| setRandomCond(condn) | Set the columns of a BV to random numbers. |
| setRandomContext(rnd) | Set the petsc4py.PETSc.Random <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Random.html#petsc4py.PETSc.Random> object associated with the BV. |
| setRandomNormal() | Set the active columns of the BV to normal random numbers. |
| setRandomSign() | Set the entries of a BV to values 1 or -1 with equal probability. |
| setSizes(sizes, m) | Set the local and global sizes, and the number of columns. |
| setSizesFromVec(w, m) | Set the local and global sizes, and the number of columns. |
| setType(bv_type) | Set the type for the BV object. |
| setVecType(vec_type) | Set the vector type. |
| view([viewer]) | Print the BV data structure. |
Attributes Summary
| column_size | Basis vectors column size. |
| local_size | Basis vectors local size. |
| size | Basis vectors global size. |
| sizes | Basis vectors local and global sizes, and the number of columns. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all BV options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all BV option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:413 <slepc4py/SLEPc/BV.pyx#L413>`
- applyMatrix(x, y)
- Multiply a vector with the matrix associated to the bilinear form.
Neighbor-wise collective.
- x (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The input vector.
- y (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The result vector.
Notes
If the bilinear form has no associated matrix this function copies the vector.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:605 <slepc4py/SLEPc/BV.pyx#L605>`
- copy(result=None)
- Copy a basis vector object into another one.
Logically collective.
- Parameters
- result (BV <#slepc4py.SLEPc.BV> | None <https://docs.python.org/3/library/constants.html#None>) – The copy.
- Return type
- BV <#slepc4py.SLEPc.BV>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:255 <slepc4py/SLEPc/BV.pyx#L255>`
- copyColumn(j, i)
- Copy the values from one of the columns to another one.
Logically collective.
- j (int <https://docs.python.org/3/library/functions.html#int>) – The number of the source column.
- i (int <https://docs.python.org/3/library/functions.html#int>) – The number of the destination column.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:866 <slepc4py/SLEPc/BV.pyx#L866>`
- copyVec(j, v)
- Copy one of the columns of a basis vectors object into a Vec.
Logically collective.
- j (int <https://docs.python.org/3/library/functions.html#int>) – The column number to be copied.
- v (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – A vector.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:850 <slepc4py/SLEPc/BV.pyx#L850>`
- create(comm=None)
- Create the BV object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:175 <slepc4py/SLEPc/BV.pyx#L175>`
- createFromMat(A)
- Create a basis vectors object from a dense Mat object.
Collective.
- Parameters
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – A dense tall-skinny matrix.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:193 <slepc4py/SLEPc/BV.pyx#L193>`
- createMat()
- Create a new Mat object of dense type and copy the contents of the BV.
Collective.
- Returns
- The new matrix.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:209 <slepc4py/SLEPc/BV.pyx#L209>`
- createVec()
- Create a Vec with the type and dimensions of the columns of the BV.
Collective.
- Returns
- New vector.
- Return type
- petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:810 <slepc4py/SLEPc/BV.pyx#L810>`
- destroy()
- Destroy the BV object.
Collective.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:165 <slepc4py/SLEPc/BV.pyx#L165>`
- dot(Y)
- Compute the ‘block-dot’ product of two basis vectors
objects.
Collective.
M = Y^H X (m_{ij} = y_i^H x_j) or M = Y^H B X
- Parameters
- Y (BV <#slepc4py.SLEPc.BV>) – Left basis vectors, can be the same as self, giving M = X^H X.
- Returns
- The resulting matrix.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
Notes
This is the generalization of VecDot() for a collection of vectors, M = Y^H X. The result is a matrix M whose entry m_{ij} is equal to y_i^H x_j (where y_i^H denotes the conjugate transpose of y_i).
X and Y can be the same object.
If a non-standard inner product has been specified with setMatrix(), then the result is M = Y^H B X. In this case, both X and Y must have the same associated matrix.
Only rows (resp. columns) of M starting from ly (resp. lx) are computed, where ly (resp. lx) is the number of leading columns of Y (resp. X).
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1064 <slepc4py/SLEPc/BV.pyx#L1064>`
- dotColumn(j)
- Dot products of a column against all the column vectors of a BV.
Collective.
- Parameters
- j (int <https://docs.python.org/3/library/functions.html#int>) – The index of the column.
- Returns
- The computed values.
- Return type
- ArrayScalar <#slepc4py.typing.ArrayScalar>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:948 <slepc4py/SLEPc/BV.pyx#L948>`
- dotVec(v)
- Dot products of a vector against all the column vectors of the BV.
Collective.
- Parameters
- v (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – A vector.
- Returns
- The computed values.
- Return type
- ArrayScalar <#slepc4py.typing.ArrayScalar>
Notes
This is analogue to VecMDot(), but using BV to represent a collection of vectors. The result is m = X^H y, so m_i is equal to x_j^H y. Note that here X is transposed as opposed to BVDot().
If a non-standard inner product has been specified with BVSetMatrix(), then the result is m = X^H B y.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:912 <slepc4py/SLEPc/BV.pyx#L912>`
- duplicate()
- Duplicate the BV object with the same type and dimensions.
Collective.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:224 <slepc4py/SLEPc/BV.pyx#L224>`
- Return type
- BV <#slepc4py.SLEPc.BV>
- duplicateResize(m)
- Create a BV object of the same type and dimensions as an existing one.
Collective.
- Parameters
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
- Return type
- BV <#slepc4py.SLEPc.BV>
Notes
With possibly different number of columns.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:234 <slepc4py/SLEPc/BV.pyx#L234>`
- getActiveColumns()
- Get the current active dimensions.
Not collective.
- l (int <https://docs.python.org/3/library/functions.html#int>) – The leading number of columns.
- k (int <https://docs.python.org/3/library/functions.html#int>) – The active number of columns.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:642 <slepc4py/SLEPc/BV.pyx#L642>`
- getColumn(j)
- Get a Vec object with the entries of the column of the BV object.
Logically collective.
- Parameters
- j (int <https://docs.python.org/3/library/functions.html#int>) – The index of the requested column.
- Returns
- The vector containing the jth column.
- Return type
- petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>
Notes
Modifying the returned Vec will change the BV entries as well.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:975 <slepc4py/SLEPc/BV.pyx#L975>`
- getDefiniteTolerance()
- Get the tolerance to be used when checking a definite inner product.
Not collective.
- Returns
- The tolerance.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:897 <slepc4py/SLEPc/BV.pyx#L897>`
- getLeadingDimension()
- Get the leading dimension.
Not collective.
- Returns
- The leading dimension.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:377 <slepc4py/SLEPc/BV.pyx#L377>`
- getMat()
- Get a Mat object of dense type that shares the memory of the BV object.
Collective.
- Returns
- The matrix.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
Notes
The returned matrix contains only the active columns. If the content of the Mat is modified, these changes are also done in the BV object. The user must call restoreMat() when no longer needed.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1022 <slepc4py/SLEPc/BV.pyx#L1022>`
- getMatMultMethod()
- Get the method used for the matMult() operation.
Not collective.
- Returns
- The method for the matMult() operation.
- Return type
- MatMultType <#slepc4py.SLEPc.BV.MatMultType>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:535 <slepc4py/SLEPc/BV.pyx#L535>`
- getMatrix()
- Get the matrix representation of the inner product.
Not collective.
- mat (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix of the inner product
- indef (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the matrix is indefinite
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, bool <https://docs.python.org/3/library/functions.html#bool>] | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[None <https://docs.python.org/3/library/constants.html#None>, bool <https://docs.python.org/3/library/functions.html#bool>]
:sources:`Source code at slepc4py/SLEPc/BV.pyx:566 <slepc4py/SLEPc/BV.pyx#L566>`
- getNumConstraints()
- Get the number of constraints.
Not collective.
- Returns
- The number of constraints.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:795 <slepc4py/SLEPc/BV.pyx#L795>`
- getOptionsPrefix()
- Get the prefix used for searching for all BV options in the database.
Not collective.
- Returns
- The prefix string set for this BV object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:428 <slepc4py/SLEPc/BV.pyx#L428>`
- getOrthogonalization()
- Get the orthogonalization settings from the BV object.
Not collective.
- type (OrthogType <#slepc4py.SLEPc.BV.OrthogType>) – The type of orthogonalization technique.
- refine (OrthogRefineType <#slepc4py.SLEPc.BV.OrthogRefineType>) – The type of refinement.
- eta (float <https://docs.python.org/3/library/functions.html#float>) – Parameter for selective refinement (used when the refinement type is BV.OrthogRefineType.IFNEEDED <#slepc4py.SLEPc.BV.OrthogRefineType.IFNEEDED>).
- block (OrthogBlockType <#slepc4py.SLEPc.BV.OrthogBlockType>) – The type of block orthogonalization .
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[OrthogType <#slepc4py.SLEPc.BV.OrthogType>, OrthogRefineType <#slepc4py.SLEPc.BV.OrthogRefineType>, float <https://docs.python.org/3/library/functions.html#float>, OrthogBlockType <#slepc4py.SLEPc.BV.OrthogBlockType>]
:sources:`Source code at slepc4py/SLEPc/BV.pyx:458 <slepc4py/SLEPc/BV.pyx#L458>`
- getRandomContext()
- Get the petsc4py.PETSc.Random
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Random.html#petsc4py.PETSc.Random>
object associated with the BV.
Collective.
- Returns
- The random number generator context.
- Return type
- petsc4py.PETSc.Random <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Random.html#petsc4py.PETSc.Random>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1554 <slepc4py/SLEPc/BV.pyx#L1554>`
- getSizes()
- Get the local and global sizes, and the number of columns.
Not collective.
- (n, N) (tuple <https://docs.python.org/3/library/stdtypes.html#tuple> of int <https://docs.python.org/3/library/functions.html#int>) – The local and global sizes
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[LayoutSizeSpec <#slepc4py.typing.LayoutSizeSpec>, int <https://docs.python.org/3/library/functions.html#int>]
:sources:`Source code at slepc4py/SLEPc/BV.pyx:346 <slepc4py/SLEPc/BV.pyx#L346>`
- getType()
- Get the BV type of this object.
Not collective.
- Returns
- The inner product type currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:288 <slepc4py/SLEPc/BV.pyx#L288>`
- getVecType()
- Get the vector type used by the basis vectors object.
Not collective.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:840 <slepc4py/SLEPc/BV.pyx#L840>`
- insertConstraints(C)
- Insert a set of vectors as constraints.
Collective.
- Parameters
- C (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>]) – Set of vectors to be inserted as constraints.
- Returns
- Number of constraints.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
Notes
The constraints are relevant only during orthogonalization. Constraint vectors span a subspace that is deflated in every orthogonalization operation, so they are intended for removing those directions from the orthogonal basis computed in regular BV columns.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:749 <slepc4py/SLEPc/BV.pyx#L749>`
- insertVec(j, w)
- Insert a vector into the specified column.
Logically collective.
- j (int <https://docs.python.org/3/library/functions.html#int>) – The column to be overwritten.
- w (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The vector to be copied.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:694 <slepc4py/SLEPc/BV.pyx#L694>`
- insertVecs(s, W, orth=False)
- Insert a set of vectors into specified columns.
Collective.
- s (int <https://docs.python.org/3/library/functions.html#int>) – The first column to be overwritten.
- W (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>]) – Set of vectors to be copied.
- orth (bool <https://docs.python.org/3/library/functions.html#bool>) – Flag indicating if the vectors must be orthogonalized.
- Returns
- Number of linearly independent vectors.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
Notes
Copies the contents of vectors W into self(:,s:s+n), where n is the length of W. If orthogonalization flag is set then the vectors are copied one by one then orthogonalized against the previous one. If any are linearly dependent then it is discared and the value of m is decreased.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:710 <slepc4py/SLEPc/BV.pyx#L710>`
- matMult(A, Y=None)
- Compute the matrix-vector product for each column, Y = A V.
Neighbor-wise collective.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix.
- Y (BV <#slepc4py.SLEPc.BV> | None <https://docs.python.org/3/library/constants.html#None>)
- Returns
- The result.
- Return type
- BV
Notes
Only active columns (excluding the leading ones) are processed.
It is possible to choose whether the computation is done column by column or using dense matrices using the options database keys:
The default is bv_matmult_mat.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1139 <slepc4py/SLEPc/BV.pyx#L1139>`
- matMultColumn(A, j)
- Mat-vec product for a column, storing the result in the next column.
Neighbor-wise collective.
v_{j+1} = A v_j.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix.
- j (int <https://docs.python.org/3/library/functions.html#int>) – Index of column.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1234 <slepc4py/SLEPc/BV.pyx#L1234>`
- matMultHermitianTranspose(A, Y=None)
- Pre-multiplication with the conjugate transpose of a matrix.
Neighbor-wise collective.
Y = A^H V.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix.
- Y (BV <#slepc4py.SLEPc.BV> | None <https://docs.python.org/3/library/constants.html#None>)
- Returns
- The result.
- Return type
- BV
Notes
Only active columns (excluding the leading ones) are processed.
As opoosed to matMult(), this operation is always done by column by column, with a sequence of calls to MatMultHermitianTranspose().
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1188 <slepc4py/SLEPc/BV.pyx#L1188>`
- matMultHermitianTransposeColumn(A, j)
- Conjugate-transpose matrix-vector product for a specified column.
Neighbor-wise collective.
Store the result in the next column: v_{j+1} = A^H v_j.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix.
- j (int <https://docs.python.org/3/library/functions.html#int>) – Index of column.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1270 <slepc4py/SLEPc/BV.pyx#L1270>`
- matMultTransposeColumn(A, j)
- Transpose matrix-vector product for a specified column.
Neighbor-wise collective.
Store the result in the next column: v_{j+1} = A^T v_j.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix.
- j (int <https://docs.python.org/3/library/functions.html#int>) – Index of column.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1252 <slepc4py/SLEPc/BV.pyx#L1252>`
- matProject(A, Y)
- Compute the projection of a matrix onto a subspace.
Collective.
M = Y^H A X
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – Matrix to be projected.
- Y (BV <#slepc4py.SLEPc.BV>) – Left basis vectors, can be the same as self, giving M = X^H A X.
- Returns
- Projection of the matrix A onto the subspace.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1109 <slepc4py/SLEPc/BV.pyx#L1109>`
- mult(alpha, beta, X, Q)
- Compute Y = beta Y + alpha X Q.
Logically collective.
- alpha (Scalar <#slepc4py.typing.Scalar>) – Coefficient that multiplies X.
- beta (Scalar <#slepc4py.typing.Scalar>) – Coefficient that multiplies Y.
- X (BV <#slepc4py.SLEPc.BV>) – Input basis vectors.
- Q (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – Input matrix, if not given the identity matrix is assumed.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1288 <slepc4py/SLEPc/BV.pyx#L1288>`
- multColumn(alpha, beta, j, q)
- Compute y = beta y + alpha X q.
Logically collective.
Compute y = beta y + alpha X q, where y is the j^{th} column.
- alpha (Scalar <#slepc4py.typing.Scalar>) – Coefficient that multiplies X.
- beta (Scalar <#slepc4py.typing.Scalar>) – Coefficient that multiplies y.
- j (int <https://docs.python.org/3/library/functions.html#int>) – The column index.
- q (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#slepc4py.typing.Scalar>]) – Input coefficients.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1329 <slepc4py/SLEPc/BV.pyx#L1329>`
- multInPlace(Q, s, e)
- Update a set of vectors as V(:,s:e-1) = V Q(:,s:e-1).
Logically collective.
- Q (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – A sequential dense matrix.
- s (int <https://docs.python.org/3/library/functions.html#int>) – First column to be overwritten.
- e (int <https://docs.python.org/3/library/functions.html#int>) – Last column to be overwritten.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1310 <slepc4py/SLEPc/BV.pyx#L1310>`
- multVec(alpha, beta, y, q)
- Compute y = beta y + alpha X q.
Logically collective.
- alpha (Scalar <#slepc4py.typing.Scalar>) – Coefficient that multiplies X.
- beta (Scalar <#slepc4py.typing.Scalar>) – Coefficient that multiplies y.
- y (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Input/output vector.
- q (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#slepc4py.typing.Scalar>]) – Input coefficients.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1360 <slepc4py/SLEPc/BV.pyx#L1360>`
- norm(norm_type=None)
- Compute the matrix norm of the BV.
Collective.
- Parameters
- norm_type (NormType <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.NormType.html#petsc4py.PETSc.NormType> | None <https://docs.python.org/3/library/constants.html#None>) – The norm type.
- Returns
- The norm.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
All active columns (except the leading ones) are considered as a matrix. The allowed norms are NORM_1, NORM_FROBENIUS, and NORM_INFINITY.
This operation fails if a non-standard inner product has been specified with BVSetMatrix().
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1420 <slepc4py/SLEPc/BV.pyx#L1420>`
- normColumn(j, norm_type=None)
- Compute the vector norm of a selected column.
Collective.
- j (int <https://docs.python.org/3/library/functions.html#int>) – Index of column.
- norm_type (NormType <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.NormType.html#petsc4py.PETSc.NormType> | None <https://docs.python.org/3/library/constants.html#None>) – The norm type.
- Returns
- The norm.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
The norm of V_j is computed (NORM_1, NORM_2, or NORM_INFINITY).
If a non-standard inner product has been specified with BVSetMatrix(), then the returned value is \sqrt{V_j^H B V_j}, where B is the inner product matrix (argument ‘type’ is ignored).
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1387 <slepc4py/SLEPc/BV.pyx#L1387>`
- orthogonalize(R=None, **kargs)
- Orthogonalize all columns (except leading ones) (QR decomposition).
Collective.
- R (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – A sequential dense matrix.
- kargs (Any <https://docs.python.org/3/library/typing.html#typing.Any>)
Notes
The output satisfies V_0 = V R (where V_0 represent the input V) and V' V = I.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1668 <slepc4py/SLEPc/BV.pyx#L1668>`
- orthogonalizeColumn(j)
- Orthogonalize a column vector with respect to the previous ones.
Collective.
- Parameters
- j (int <https://docs.python.org/3/library/functions.html#int>) – Index of the column to be orthogonalized.
- Returns
- norm (float <https://docs.python.org/3/library/functions.html#float>) – The norm of the resulting vector.
- lindep (bool <https://docs.python.org/3/library/functions.html#bool>) – Flag indicating that refinement did not improve the quality of orthogonalization.
Notes
This function applies an orthogonal projector to project vector V_j onto the orthogonal complement of the span of the columns V[0..j-1], where V[.] are the vectors of the BV. The columns V[0..j-1] are assumed to be mutually orthonormal.
This routine does not normalize the resulting vector.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1602 <slepc4py/SLEPc/BV.pyx#L1602>`
- orthogonalizeVec(v)
- Orthogonalize a vector with respect to a set of vectors.
Collective.
- Parameters
- v (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Vector to be orthogonalized, modified on return.
- Returns
- norm (float <https://docs.python.org/3/library/functions.html#float>) – The norm of the resulting vector.
- lindep (bool <https://docs.python.org/3/library/functions.html#bool>) – Flag indicating that refinement did not improve the quality of orthogonalization.
Notes
This function applies an orthogonal projector to project vector v onto the orthogonal complement of the span of the columns of the BV.
This routine does not normalize the resulting vector.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1570 <slepc4py/SLEPc/BV.pyx#L1570>`
- orthonormalizeColumn(j, replace=False)
- Orthonormalize a column vector with respect to the previous ones.
Collective.
This is equivalent to a call to orthogonalizeColumn() followed by a call to scaleColumn() with the reciprocal of the norm.
- j (int <https://docs.python.org/3/library/functions.html#int>) – Index of the column to be orthonormalized.
- replace (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether it is allowed to set the vector randomly.
- norm (float <https://docs.python.org/3/library/functions.html#float>) – The norm of the resulting vector.
- lindep (bool <https://docs.python.org/3/library/functions.html#bool>) – Flag indicating that refinement did not improve the quality of orthogonalization.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1636 <slepc4py/SLEPc/BV.pyx#L1636>`
- resize(m, copy=True)
- Change the number of columns.
Collective.
- m (int <https://docs.python.org/3/library/functions.html#int>) – The new number of columns.
- copy (bool <https://docs.python.org/3/library/functions.html#bool>) – A flag indicating whether current values should be kept.
Notes
Internal storage is reallocated. If copy is True, then the contents are copied to the leading part of the new space.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1451 <slepc4py/SLEPc/BV.pyx#L1451>`
- restoreColumn(j, v)
- Restore a column obtained with getColumn().
Logically collective.
- j (int <https://docs.python.org/3/library/functions.html#int>) – The index of the requested column.
- v (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The vector obtained with getColumn().
Notes
The arguments must match the corresponding call to getColumn().
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1001 <slepc4py/SLEPc/BV.pyx#L1001>`
- restoreMat(A)
- Restore the Mat obtained with getMat().
Logically collective.
- Parameters
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix obtained with getMat().
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A call to this function must match a previous call of getMat(). The effect is that the contents of the Mat are copied back to the BV internal data structures.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1044 <slepc4py/SLEPc/BV.pyx#L1044>`
- scale(alpha)
- Multiply the entries by a scalar value.
Logically collective.
- Parameters
- alpha (Scalar <#slepc4py.typing.Scalar>) – scaling factor.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
All active columns (except the leading ones) are scaled.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:676 <slepc4py/SLEPc/BV.pyx#L676>`
- scaleColumn(j, alpha)
- Scale column j by alpha.
Logically collective.
- j (int <https://docs.python.org/3/library/functions.html#int>) – column number to be scaled.
- alpha (Scalar <#slepc4py.typing.Scalar>) – scaling factor.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:659 <slepc4py/SLEPc/BV.pyx#L659>`
- setActiveColumns(l, k)
- Set the columns that will be involved in operations.
Logically collective.
- l (int <https://docs.python.org/3/library/functions.html#int>) – The leading number of columns.
- k (int <https://docs.python.org/3/library/functions.html#int>) – The active number of columns.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:625 <slepc4py/SLEPc/BV.pyx#L625>`
- setDefiniteTolerance(deftol)
- Set the tolerance to be used when checking a definite inner product.
Logically collective.
- Parameters
- deftol (float <https://docs.python.org/3/library/functions.html#float>) – The tolerance.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:883 <slepc4py/SLEPc/BV.pyx#L883>`
- setFromOptions()
- Set BV options from the options database.
Collective.
Notes
To see all options, run your program with the -help option.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:443 <slepc4py/SLEPc/BV.pyx#L443>`
- setLeadingDimension(ld)
- Set the leading dimension.
Not collective.
- Parameters
- ld (int <https://docs.python.org/3/library/functions.html#int>) – The leading dimension.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:363 <slepc4py/SLEPc/BV.pyx#L363>`
- setMatMultMethod(method)
- Set the method used for the matMult() operation.
Logically collective.
- Parameters
- method (MatMultType <#slepc4py.SLEPc.BV.MatMultType>) – The method for the matMult() operation.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:550 <slepc4py/SLEPc/BV.pyx#L550>`
- setMatrix(mat, indef=False)
- Set the bilinear form to be used for inner products.
Collective.
- mat (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix of the inner product.
- indef (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the matrix is indefinite
:sources:`Source code at slepc4py/SLEPc/BV.pyx:588 <slepc4py/SLEPc/BV.pyx#L588>`
- setNumConstraints(nc)
- Set the number of constraints.
Logically collective.
- Parameters
- nc (int <https://docs.python.org/3/library/functions.html#int>) – The number of constraints.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:781 <slepc4py/SLEPc/BV.pyx#L781>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all BV options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all BV option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:392 <slepc4py/SLEPc/BV.pyx#L392>`
- setOrthogonalization(otype=None, refine=None, eta=None, block=None)
- Set the method used for the (block-)orthogonalization of vectors.
Logically collective.
Ortogonalization of vectors (classical or modified Gram-Schmidt with or without refinement), and for the block-orthogonalization (simultaneous orthogonalization of a set of vectors).
- otype (OrthogType <#slepc4py.SLEPc.BV.OrthogType> | None <https://docs.python.org/3/library/constants.html#None>) – The type of orthogonalization technique.
- refine (OrthogRefineType <#slepc4py.SLEPc.BV.OrthogRefineType> | None <https://docs.python.org/3/library/constants.html#None>) – The type of refinement.
- eta (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Parameter for selective refinement.
- block (OrthogBlockType <#slepc4py.SLEPc.BV.OrthogBlockType> | None <https://docs.python.org/3/library/constants.html#None>) – The type of block orthogonalization.
Notes
The default settings work well for most problems.
The parameter eta should be a real value between 0 and 1 (or DETERMINE <#slepc4py.SLEPc.DETERMINE>). The value of eta is used only when the refinement type is BV.OrthogRefineType.IFNEEDED <#slepc4py.SLEPc.BV.OrthogRefineType.IFNEEDED>.
When using several processors, BV.OrthogType.MGS <#slepc4py.SLEPc.BV.OrthogType.MGS> is likely to result in bad scalability.
If the method set for block orthogonalization is GS, then the computation is done column by column with the vector orthogonalization.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:483 <slepc4py/SLEPc/BV.pyx#L483>`
- setRandom()
- Set the active columns of the BV to random numbers.
Logically collective.
Notes
All active columns (except the leading ones) are modified.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1473 <slepc4py/SLEPc/BV.pyx#L1473>`
- setRandomColumn(j)
- Set one column of the BV to random numbers.
Logically collective.
- Parameters
- j (int <https://docs.python.org/3/library/functions.html#int>) – Column number to be set.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1509 <slepc4py/SLEPc/BV.pyx#L1509>`
- setRandomCond(condn)
- Set the columns of a BV to random numbers.
Logically collective.
The generated matrix has a prescribed condition number.
- Parameters
- condn (float <https://docs.python.org/3/library/functions.html#float>) – Condition number.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1523 <slepc4py/SLEPc/BV.pyx#L1523>`
- setRandomContext(rnd)
- Set the petsc4py.PETSc.Random
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Random.html#petsc4py.PETSc.Random>
object associated with the BV.
Collective.
To be used in operations that need random numbers.
- Parameters
- rnd (Random <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Random.html#petsc4py.PETSc.Random>) – The random number generator context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1539 <slepc4py/SLEPc/BV.pyx#L1539>`
- setRandomNormal()
- Set the active columns of the BV to normal random numbers.
Logically collective.
Notes
All active columns (except the leading ones) are modified.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1485 <slepc4py/SLEPc/BV.pyx#L1485>`
- setRandomSign()
- Set the entries of a BV to values 1 or -1 with equal probability.
Logically collective.
Notes
All active columns (except the leading ones) are modified.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1497 <slepc4py/SLEPc/BV.pyx#L1497>`
- setSizes(sizes, m)
- Set the local and global sizes, and the number of columns.
Collective.
- sizes (LayoutSizeSpec <#slepc4py.typing.LayoutSizeSpec>) – The global size N or a two-tuple (n, N) with the local and global sizes.
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
Notes
Either n or N (but not both) can be PETSc.DECIDE or None to have it automatically set.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:303 <slepc4py/SLEPc/BV.pyx#L303>`
- setSizesFromVec(w, m)
- Set the local and global sizes, and the number of columns.
Collective.
Local and global sizes are specified indirectly by passing a template vector.
- w (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The template vector.
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:327 <slepc4py/SLEPc/BV.pyx#L327>`
- setType(bv_type)
- Set the type for the BV object.
Logically collective.
- Parameters
- bv_type (Type <#slepc4py.SLEPc.BV.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The inner product type to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:273 <slepc4py/SLEPc/BV.pyx#L273>`
- setVecType(vec_type)
- Set the vector type.
Collective.
- Parameters
- vec_type (petsc4py.PETSc.Vec.Type <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.Type.html#petsc4py.PETSc.Vec.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – Vector type used when creating vectors with createVec.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:825 <slepc4py/SLEPc/BV.pyx#L825>`
- view(viewer=None)
- Print the BV data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/BV.pyx:150 <slepc4py/SLEPc/BV.pyx#L150>`
Attributes Documentation
- column_size
- Basis vectors column size.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1705 <slepc4py/SLEPc/BV.pyx#L1705>`
- local_size
- Basis vectors local size.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1700 <slepc4py/SLEPc/BV.pyx#L1700>`
- size
- Basis vectors global size.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1695 <slepc4py/SLEPc/BV.pyx#L1695>`
- sizes
- Basis vectors local and global sizes, and the number of columns.
:sources:`Source code at slepc4py/SLEPc/BV.pyx:1690 <slepc4py/SLEPc/BV.pyx#L1690>`
slepc4py.SLEPc.BVSVDMethod¶
- class slepc4py.SLEPc.BVSVDMethod
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
BV methods for computing the SVD.
- •
- REFINE: Based on the SVD of the cross product matrix S^H S,
- with refinement.
- QR: Based on the SVD of the triangular factor of qr(S).
Attributes Summary
| QR | Constant QR of type int <https://docs.python.org/3/library/functions.html#int> |
| QR_CAA | Constant QR_CAA of type int <https://docs.python.org/3/library/functions.html#int> |
| REFINE | Constant REFINE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.DS¶
- class slepc4py.SLEPc.DS
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
DS.
Enumerations
MatType <#slepc4py.SLEPc.DS.MatType> To refer to one of the matrices stored internally in DS. ParallelType <#slepc4py.SLEPc.DS.ParallelType> DS parallel types. StateType <#slepc4py.SLEPc.DS.StateType> DS state types. Type <#slepc4py.SLEPc.DS.Type> DS type.
slepc4py.SLEPc.DS.MatType¶
- class slepc4py.SLEPc.DS.MatType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
To refer to one of the matrices stored internally in DS.
- A: first matrix of eigenproblem/singular value problem.
- B: second matrix of a generalized eigenproblem.
- C: third matrix of a quadratic eigenproblem.
- T: tridiagonal matrix.
- D: diagonal matrix.
- Q: orthogonal matrix of (right) Schur vectors.
- Z: orthogonal matrix of left Schur vectors.
- X: right eigenvectors.
- Y: left eigenvectors.
- U: left singular vectors.
- V: right singular vectors.
- W: workspace matrix.
Attributes Summary
| A | Constant A of type int <https://docs.python.org/3/library/functions.html#int> |
| B | Constant B of type int <https://docs.python.org/3/library/functions.html#int> |
| C | Constant C of type int <https://docs.python.org/3/library/functions.html#int> |
| D | Constant D of type int <https://docs.python.org/3/library/functions.html#int> |
| Q | Constant Q of type int <https://docs.python.org/3/library/functions.html#int> |
| T | Constant T of type int <https://docs.python.org/3/library/functions.html#int> |
| U | Constant U of type int <https://docs.python.org/3/library/functions.html#int> |
| V | Constant V of type int <https://docs.python.org/3/library/functions.html#int> |
| W | Constant W of type int <https://docs.python.org/3/library/functions.html#int> |
| X | Constant X of type int <https://docs.python.org/3/library/functions.html#int> |
| Y | Constant Y of type int <https://docs.python.org/3/library/functions.html#int> |
| Z | Constant Z of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.DS.ParallelType¶
- class slepc4py.SLEPc.DS.ParallelType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
DS parallel types.
- REDUNDANT: Every process performs the computation redundantly.
- SYNCHRONIZED: The first process sends the result to the rest.
Attributes Summary
| DISTRIBUTED | Constant DISTRIBUTED of type int <https://docs.python.org/3/library/functions.html#int> |
| REDUNDANT | Constant REDUNDANT of type int <https://docs.python.org/3/library/functions.html#int> |
| SYNCHRONIZED | Constant SYNCHRONIZED of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.DS.StateType¶
- class slepc4py.SLEPc.DS.StateType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
DS state types.
- RAW: Not processed yet.
- INTERMEDIATE: Reduced to Hessenberg or tridiagonal form (or equivalent).
- CONDENSED: Reduced to Schur or diagonal form (or equivalent).
- TRUNCATED: Condensed form truncated to a smaller size.
Attributes Summary
| CONDENSED | Constant CONDENSED of type int <https://docs.python.org/3/library/functions.html#int> |
| INTERMEDIATE | Constant INTERMEDIATE of type int <https://docs.python.org/3/library/functions.html#int> |
| RAW | Constant RAW of type int <https://docs.python.org/3/library/functions.html#int> |
| TRUNCATED | Constant TRUNCATED of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.DS.Type¶
- class slepc4py.SLEPc.DS.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
DS type.
Attributes Summary
GHEP Object GHEP of type str <https://docs.python.org/3/library/stdtypes.html#str> GHIEP Object GHIEP of type str <https://docs.python.org/3/library/stdtypes.html#str> GNHEP Object GNHEP of type str <https://docs.python.org/3/library/stdtypes.html#str> GSVD Object GSVD of type str <https://docs.python.org/3/library/stdtypes.html#str> HEP Object HEP of type str <https://docs.python.org/3/library/stdtypes.html#str> HSVD Object HSVD of type str <https://docs.python.org/3/library/stdtypes.html#str> NEP Object NEP of type str <https://docs.python.org/3/library/stdtypes.html#str> NHEP Object NHEP of type str <https://docs.python.org/3/library/stdtypes.html#str> NHEPTS Object NHEPTS of type str <https://docs.python.org/3/library/stdtypes.html#str> PEP Object PEP of type str <https://docs.python.org/3/library/stdtypes.html#str> SVD Object SVD of type str <https://docs.python.org/3/library/stdtypes.html#str> Attributes Documentation
Methods Summary
| allocate(ld) | Allocate memory for internal storage or matrices in DS. |
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all DS options in the database. |
| cond() | Compute the inf-norm condition number of the first matrix. |
| create([comm]) | Create the DS object. |
| destroy() | Destroy the DS object. |
| duplicate() | Duplicate the DS object with the same type and dimensions. |
| getBlockSize() | Get the block size. |
| getCompact() | Get the compact storage flag. |
| getDimensions() | Get the current dimensions. |
| getExtraRow() | Get the extra row flag. |
| getGSVDDimensions() | Get the number of columns and rows of a DS of type GSVD <#slepc4py.SLEPc.DS.Type.GSVD>. |
| getHSVDDimensions() | Get the number of columns of a DS of type HSVD <#slepc4py.SLEPc.DS.Type.HSVD>. |
| getLeadingDimension() | Get the leading dimension of the allocated matrices. |
| getMat(matname) | Get the requested matrix as a sequential dense Mat object. |
| getMethod() | Get the method currently used in the DS. |
| getOptionsPrefix() | Get the prefix used for searching for all DS options in the database. |
| getPEPCoefficients() | Get the polynomial basis coefficients of a DS of type PEP <#slepc4py.SLEPc.PEP>. |
| getPEPDegree() | Get the polynomial degree of a DS of type PEP <#slepc4py.SLEPc.PEP>. |
| getParallel() | Get the mode of operation in parallel runs. |
| getRefined() | Get the refined vectors flag. |
| getSVDDimensions() | Get the number of columns of a DS of type SVD <#slepc4py.SLEPc.SVD>. |
| getState() | Get the current state. |
| getType() | Get the DS type of this object. |
| reset() | Reset the DS object. |
| restoreMat(matname, mat) | Restore the previously seized matrix. |
| setBlockSize(bs) | Set the block size. |
| setCompact(comp) | Set the matrices' compact storage flag. |
| setDimensions([n, l, k]) | Set the matrices sizes in the DS object. |
| setExtraRow(ext) | Set a flag to indicate that the matrix has one extra row. |
| setFromOptions() | Set DS options from the options database. |
| setGSVDDimensions(m, p) | Set the number of columns and rows of a DS of type GSVD <#slepc4py.SLEPc.DS.Type.GSVD>. |
| setHSVDDimensions(m) | Set the number of columns of a DS of type HSVD <#slepc4py.SLEPc.DS.Type.HSVD>. |
| setIdentity(matname) | Set the identity on the active part of a matrix. |
| setMethod(meth) | Set the method to be used to solve the problem. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all DS options in the database. |
| setPEPCoefficients(pbc) | Set the polynomial basis coefficients of a DS of type PEP <#slepc4py.SLEPc.PEP>. |
| setPEPDegree(deg) | Set the polynomial degree of a DS of type PEP <#slepc4py.SLEPc.PEP>. |
| setParallel(pmode) | Set the mode of operation in parallel runs. |
| setRefined(ref) | Set a flag to indicate that refined vectors must be computed. |
| setSVDDimensions(m) | Set the number of columns of a DS of type SVD <#slepc4py.SLEPc.SVD>. |
| setState(state) | Set the state of the DS object. |
| setType(ds_type) | Set the type for the DS object. |
| solve() | Solve the problem. |
| truncate(n[, trim]) | Truncate the system represented in the DS object. |
| updateExtraRow() | Ensure that the extra row gets up-to-date after a call to DS.solve(). |
| vectors([matname]) | Compute vectors associated to the dense system such as eigenvectors. |
| view([viewer]) | Print the DS data structure. |
Attributes Summary
| block_size | The block size. |
| compact | Compact storage of matrices. |
| extra_row | If the matrix has one extra row. |
| method | The method to be used to solve the problem. |
| parallel | The mode of operation in parallel runs. |
| refined | If refined vectors must be computed. |
| state | The state of the DS object. |
Methods Documentation
- allocate(ld)
- Allocate memory for internal storage or matrices in DS.
Logically collective.
- Parameters
- ld (int <https://docs.python.org/3/library/functions.html#int>) – Leading dimension (maximum allowed dimension for the matrices, including the extra row if present).
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:245 <slepc4py/SLEPc/DS.pyx#L245>`
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all DS options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all DS option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:190 <slepc4py/SLEPc/DS.pyx#L190>`
- cond()
- Compute the inf-norm condition number of the first matrix.
Logically collective.
- Returns
- Condition number.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:654 <slepc4py/SLEPc/DS.pyx#L654>`
- create(comm=None)
- Create the DS object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:122 <slepc4py/SLEPc/DS.pyx#L122>`
- destroy()
- Destroy the DS object.
Collective.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:104 <slepc4py/SLEPc/DS.pyx#L104>`
- duplicate()
- Duplicate the DS object with the same type and dimensions.
Collective.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:233 <slepc4py/SLEPc/DS.pyx#L233>`
- Return type
- DS <#slepc4py.SLEPc.DS>
- getBlockSize()
- Get the block size.
Not collective.
- Returns
- The block size.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:409 <slepc4py/SLEPc/DS.pyx#L409>`
- getCompact()
- Get the compact storage flag.
Not collective.
- Returns
- The flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:477 <slepc4py/SLEPc/DS.pyx#L477>`
- getDimensions()
- Get the current dimensions.
Not collective.
- n (int <https://docs.python.org/3/library/functions.html#int>) – The new size.
- l (int <https://docs.python.org/3/library/functions.html#int>) – Number of locked (inactive) leading columns.
- k (int <https://docs.python.org/3/library/functions.html#int>) – Intermediate dimension (e.g., position of arrow).
- t (int <https://docs.python.org/3/library/functions.html#int>) – Truncated length.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>]
:sources:`Source code at slepc4py/SLEPc/DS.pyx:371 <slepc4py/SLEPc/DS.pyx#L371>`
- getExtraRow()
- Get the extra row flag.
Not collective.
- Returns
- The flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:516 <slepc4py/SLEPc/DS.pyx#L516>`
- getGSVDDimensions()
- Get the number of columns and rows of a DS of type GSVD
<#slepc4py.SLEPc.DS.Type.GSVD>.
Not collective.
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
- p (int <https://docs.python.org/3/library/functions.html#int>) – The number of rows for the second matrix.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:784 <slepc4py/SLEPc/DS.pyx#L784>`
- getHSVDDimensions()
- Get the number of columns of a DS of type HSVD
<#slepc4py.SLEPc.DS.Type.HSVD>.
Not collective.
- Returns
- The number of columns.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:752 <slepc4py/SLEPc/DS.pyx#L752>`
- getLeadingDimension()
- Get the leading dimension of the allocated matrices.
Not collective.
- Returns
- Leading dimension (maximum allowed dimension for the matrices).
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:260 <slepc4py/SLEPc/DS.pyx#L260>`
- getMat(matname)
- Get the requested matrix as a sequential dense Mat object.
Not collective.
- Parameters
- matname (MatType <#slepc4py.SLEPc.DS.MatType>) – The requested matrix.
- Returns
- The matrix.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:599 <slepc4py/SLEPc/DS.pyx#L599>`
- getMethod()
- Get the method currently used in the DS.
Not collective.
- Returns
- Identifier of the method.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:438 <slepc4py/SLEPc/DS.pyx#L438>`
- getOptionsPrefix()
- Get the prefix used for searching for all DS options in the database.
Not collective.
- Returns
- The prefix string set for this DS object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:205 <slepc4py/SLEPc/DS.pyx#L205>`
- getPEPCoefficients()
- Get the polynomial basis coefficients of a DS of type PEP
<#slepc4py.SLEPc.PEP>.
Not collective.
- Returns
- Coefficients.
- Return type
- ArrayReal <#slepc4py.typing.ArrayReal>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:847 <slepc4py/SLEPc/DS.pyx#L847>`
- getPEPDegree()
- Get the polynomial degree of a DS of type PEP
<#slepc4py.SLEPc.PEP>.
Not collective.
- Returns
- The polynomial degree.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:816 <slepc4py/SLEPc/DS.pyx#L816>`
- getParallel()
- Get the mode of operation in parallel runs.
Not collective.
- Returns
- The parallel mode.
- Return type
- ParallelType <#slepc4py.SLEPc.DS.ParallelType>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:329 <slepc4py/SLEPc/DS.pyx#L329>`
- getRefined()
- Get the refined vectors flag.
Not collective.
- Returns
- The flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:556 <slepc4py/SLEPc/DS.pyx#L556>`
- getSVDDimensions()
- Get the number of columns of a DS of type SVD
<#slepc4py.SLEPc.SVD>.
Not collective.
- Returns
- The number of columns.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:723 <slepc4py/SLEPc/DS.pyx#L723>`
- getState()
- Get the current state.
Not collective.
- Returns
- The current state.
- Return type
- StateType <#slepc4py.SLEPc.DS.StateType>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:300 <slepc4py/SLEPc/DS.pyx#L300>`
- getType()
- Get the DS type of this object.
Not collective.
- Returns
- The direct solver type currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:154 <slepc4py/SLEPc/DS.pyx#L154>`
- reset()
- Reset the DS object.
Collective.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:114 <slepc4py/SLEPc/DS.pyx#L114>`
- restoreMat(matname, mat)
- Restore the previously seized matrix.
Not collective.
- matname (MatType <#slepc4py.SLEPc.DS.MatType>) – The selected matrix.
- mat (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix previously obtained with getMat().
:sources:`Source code at slepc4py/SLEPc/DS.pyx:621 <slepc4py/SLEPc/DS.pyx#L621>`
- setBlockSize(bs)
- Set the block size.
Logically collective.
- Parameters
- bs (int <https://docs.python.org/3/library/functions.html#int>) – The block size.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:395 <slepc4py/SLEPc/DS.pyx#L395>`
- setCompact(comp)
- Set the matrices’ compact storage flag.
Logically collective.
- Parameters
- comp (bool <https://docs.python.org/3/library/functions.html#bool>) – True means compact storage.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Compact storage is used in some DS types such as DS.Type.HEP <#slepc4py.SLEPc.DS.Type.HEP> when the matrix is tridiagonal. This flag can be used to indicate whether the user provides the matrix entries via the compact form (the tridiagonal DS.MatType.T <#slepc4py.SLEPc.DS.MatType.T>) or the non-compact one (DS.MatType.A <#slepc4py.SLEPc.DS.MatType.A>).
The default is False.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:453 <slepc4py/SLEPc/DS.pyx#L453>`
- setDimensions(n=None, l=None, k=None)
- Set the matrices sizes in the DS object.
Logically collective.
- n (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The new size.
- l (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of locked (inactive) leading columns.
- k (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Intermediate dimension (e.g., position of arrow).
Notes
The internal arrays are not reallocated.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:344 <slepc4py/SLEPc/DS.pyx#L344>`
- setExtraRow(ext)
- Set a flag to indicate that the matrix has one extra row.
Logically collective.
- Parameters
- ext (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the matrix has extra row.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
In Krylov methods it is useful that the matrix representing the direct solver has one extra row, i.e., has dimension (n+1) n. If this flag is activated, all transformations applied to the right of the matrix also affect this additional row. In that case, (n+1) must be less or equal than the leading dimension.
The default is False.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:492 <slepc4py/SLEPc/DS.pyx#L492>`
- setFromOptions()
- Set DS options from the options database.
Collective.
Notes
To see all options, run your program with the -help option.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:220 <slepc4py/SLEPc/DS.pyx#L220>`
- setGSVDDimensions(m, p)
- Set the number of columns and rows of a DS of type GSVD
<#slepc4py.SLEPc.DS.Type.GSVD>.
Logically collective.
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
- p (int <https://docs.python.org/3/library/functions.html#int>) – The number of rows for the second matrix.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:767 <slepc4py/SLEPc/DS.pyx#L767>`
- setHSVDDimensions(m)
- Set the number of columns of a DS of type HSVD
<#slepc4py.SLEPc.DS.Type.HSVD>.
Logically collective.
- Parameters
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:738 <slepc4py/SLEPc/DS.pyx#L738>`
- setIdentity(matname)
- Set the identity on the active part of a matrix.
Logically collective.
- Parameters
- matname (MatType <#slepc4py.SLEPc.DS.MatType>) – The requested matrix.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:638 <slepc4py/SLEPc/DS.pyx#L638>`
- setMethod(meth)
- Set the method to be used to solve the problem.
Logically collective.
- Parameters
- meth (int <https://docs.python.org/3/library/functions.html#int>) – An index identifying the method.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:424 <slepc4py/SLEPc/DS.pyx#L424>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all DS options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all DS option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:169 <slepc4py/SLEPc/DS.pyx#L169>`
- setPEPCoefficients(pbc)
- Set the polynomial basis coefficients of a DS of type PEP
<#slepc4py.SLEPc.PEP>.
Logically collective.
- Parameters
- pbc (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) – Coefficients.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:831 <slepc4py/SLEPc/DS.pyx#L831>`
- setPEPDegree(deg)
- Set the polynomial degree of a DS of type PEP
<#slepc4py.SLEPc.PEP>.
Logically collective.
- Parameters
- deg (int <https://docs.python.org/3/library/functions.html#int>) – The polynomial degree.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:802 <slepc4py/SLEPc/DS.pyx#L802>`
- setParallel(pmode)
- Set the mode of operation in parallel runs.
Logically collective.
- Parameters
- pmode (ParallelType <#slepc4py.SLEPc.DS.ParallelType>) – The parallel mode.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:315 <slepc4py/SLEPc/DS.pyx#L315>`
- setRefined(ref)
- Set a flag to indicate that refined vectors must be computed.
Logically collective.
- Parameters
- ref (bool <https://docs.python.org/3/library/functions.html#bool>) – True if refined vectors must be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Normally the vectors returned in DS.MatType.X <#slepc4py.SLEPc.DS.MatType.X> are eigenvectors of the projected matrix. With this flag activated, vectors() will return the right singular vector of the smallest singular value of matrix At - theta I, where At is the extended (n+1) times n matrix and theta is the Ritz value. This is used in the refined Ritz approximation.
The default is False.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:531 <slepc4py/SLEPc/DS.pyx#L531>`
- setSVDDimensions(m)
- Set the number of columns of a DS of type SVD
<#slepc4py.SLEPc.SVD>.
Logically collective.
- Parameters
- m (int <https://docs.python.org/3/library/functions.html#int>) – The number of columns.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:709 <slepc4py/SLEPc/DS.pyx#L709>`
- setState(state)
- Set the state of the DS object.
Logically collective.
- Parameters
- state (StateType <#slepc4py.SLEPc.DS.StateType>) – The new state.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The state indicates that the dense system is in an initial state (raw), in an intermediate state (such as tridiagonal, Hessenberg or Hessenberg-triangular), in a condensed state (such as diagonal, Schur or generalized Schur), or in a truncated state.
This function is normally used to return to the raw state when the condensed structure is destroyed.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:275 <slepc4py/SLEPc/DS.pyx#L275>`
- setType(ds_type)
- Set the type for the DS object.
Logically collective.
- Parameters
- ds_type (Type <#slepc4py.SLEPc.DS.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The direct solver type to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:139 <slepc4py/SLEPc/DS.pyx#L139>`
- solve()
- Solve the problem.
Logically collective.
- Returns
- Eigenvalues or singular values.
- Return type
- ArrayScalar <#slepc4py.typing.ArrayScalar>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:669 <slepc4py/SLEPc/DS.pyx#L669>`
- truncate(n, trim=False)
- Truncate the system represented in the DS object.
Logically collective.
- n (int <https://docs.python.org/3/library/functions.html#int>) – The new size.
- trim (bool <https://docs.python.org/3/library/functions.html#bool>) – A flag to indicate if the factorization must be trimmed.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:571 <slepc4py/SLEPc/DS.pyx#L571>`
- updateExtraRow()
- Ensure that the extra row gets up-to-date after a call to
DS.solve().
Logically collective.
Perform all necessary operations so that the extra row gets up-to-date after a call to DS.solve().
:sources:`Source code at slepc4py/SLEPc/DS.pyx:588 <slepc4py/SLEPc/DS.pyx#L588>`
- vectors(matname=X)
- Compute vectors associated to the dense system such as eigenvectors.
Logically collective.
- Parameters
- matname (DS.MatType <#slepc4py.SLEPc.DS.MatType> enumerate) – The matrix, used to indicate which vectors are required.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:693 <slepc4py/SLEPc/DS.pyx#L693>`
- view(viewer=None)
- Print the DS data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/DS.pyx:89 <slepc4py/SLEPc/DS.pyx#L89>`
Attributes Documentation
- block_size
- The block size.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:885 <slepc4py/SLEPc/DS.pyx#L885>`
- compact
- Compact storage of matrices.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:899 <slepc4py/SLEPc/DS.pyx#L899>`
- extra_row
- If the matrix has one extra row.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:906 <slepc4py/SLEPc/DS.pyx#L906>`
- method
- The method to be used to solve the problem.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:892 <slepc4py/SLEPc/DS.pyx#L892>`
- parallel
- The mode of operation in parallel runs.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:878 <slepc4py/SLEPc/DS.pyx#L878>`
- refined
- If refined vectors must be computed.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:913 <slepc4py/SLEPc/DS.pyx#L913>`
- state
- The state of the DS object.
:sources:`Source code at slepc4py/SLEPc/DS.pyx:871 <slepc4py/SLEPc/DS.pyx#L871>`
slepc4py.SLEPc.EPS¶
- class slepc4py.SLEPc.EPS
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
EPS.
Enumerations
Balance <#slepc4py.SLEPc.EPS.Balance> EPS type of balancing used for non-Hermitian problems. CISSExtraction <#slepc4py.SLEPc.EPS.CISSExtraction> EPS CISS extraction technique. CISSQuadRule <#slepc4py.SLEPc.EPS.CISSQuadRule> EPS CISS quadrature rule. Conv <#slepc4py.SLEPc.EPS.Conv> EPS convergence test. ConvergedReason <#slepc4py.SLEPc.EPS.ConvergedReason> EPS convergence reasons. ErrorType <#slepc4py.SLEPc.EPS.ErrorType> EPS error type to assess accuracy of computed solutions. Extraction <#slepc4py.SLEPc.EPS.Extraction> EPS extraction technique. KrylovSchurBSEType <#slepc4py.SLEPc.EPS.KrylovSchurBSEType> EPS Krylov-Schur method for BSE problems. LanczosReorthogType <#slepc4py.SLEPc.EPS.LanczosReorthogType> EPS Lanczos reorthogonalization type. PowerShiftType <#slepc4py.SLEPc.EPS.PowerShiftType> EPS Power shift type. ProblemType <#slepc4py.SLEPc.EPS.ProblemType> EPS problem type. Stop <#slepc4py.SLEPc.EPS.Stop> EPS stopping test. Type <#slepc4py.SLEPc.EPS.Type> EPS type. Which <#slepc4py.SLEPc.EPS.Which> EPS desired part of spectrum.
slepc4py.SLEPc.EPS.Balance¶
- class slepc4py.SLEPc.EPS.Balance
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS type of balancing used for non-Hermitian problems.
- NONE: None.
- ONESIDE: One-sided balancing.
- TWOSIDE: Two-sided balancing.
- USER: User-provided balancing matrices.
Attributes Summary
| NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int> |
| ONESIDE | Constant ONESIDE of type int <https://docs.python.org/3/library/functions.html#int> |
| TWOSIDE | Constant TWOSIDE of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.CISSExtraction¶
- class slepc4py.SLEPc.EPS.CISSExtraction
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS CISS extraction technique.
- RITZ: Ritz extraction.
- HANKEL: Extraction via Hankel eigenproblem.
Attributes Summary
| HANKEL | Constant HANKEL of type int <https://docs.python.org/3/library/functions.html#int> |
| RITZ | Constant RITZ of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.CISSQuadRule¶
- class slepc4py.SLEPc.EPS.CISSQuadRule
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS CISS quadrature rule.
- TRAPEZOIDAL: Trapezoidal rule.
- CHEBYSHEV: Chebyshev points.
Attributes Summary
| CHEBYSHEV | Constant CHEBYSHEV of type int <https://docs.python.org/3/library/functions.html#int> |
| TRAPEZOIDAL | Constant TRAPEZOIDAL of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.Conv¶
- class slepc4py.SLEPc.EPS.Conv
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS convergence test.
- ABS: Absolute convergence test.
- REL: Convergence test relative to the eigenvalue.
- NORM: Convergence test relative to the matrix norms.
- USER: User-defined convergence test.
Attributes Summary
| ABS | Constant ABS of type int <https://docs.python.org/3/library/functions.html#int> |
| NORM | Constant NORM of type int <https://docs.python.org/3/library/functions.html#int> |
| REL | Constant REL of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.ConvergedReason¶
- class slepc4py.SLEPc.EPS.ConvergedReason
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS convergence reasons.
- CONVERGED_TOL: All eigenpairs converged to requested tolerance.
- CONVERGED_USER: User-defined convergence criterion satisfied.
- DIVERGED_ITS: Maximum number of iterations exceeded.
- DIVERGED_BREAKDOWN: Solver failed due to breakdown.
- DIVERGED_SYMMETRY_LOST: Lanczos-type method could not preserve symmetry.
- CONVERGED_ITERATING: Iteration not finished yet.
Attributes Summary
| CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_TOL | Constant CONVERGED_TOL of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_USER | Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_BREAKDOWN | Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_ITS | Constant DIVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_SYMMETRY_LOST | Constant DIVERGED_SYMMETRY_LOST of type int <https://docs.python.org/3/library/functions.html#int> |
| ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.ErrorType¶
- class slepc4py.SLEPc.EPS.ErrorType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS error type to assess accuracy of computed solutions.
- ABSOLUTE: Absolute error.
- RELATIVE: Relative error.
- BACKWARD: Backward error.
Attributes Summary
| ABSOLUTE | Constant ABSOLUTE of type int <https://docs.python.org/3/library/functions.html#int> |
| BACKWARD | Constant BACKWARD of type int <https://docs.python.org/3/library/functions.html#int> |
| RELATIVE | Constant RELATIVE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.Extraction¶
- class slepc4py.SLEPc.EPS.Extraction
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS extraction technique.
- RITZ: Standard Rayleigh-Ritz extraction.
- HARMONIC: Harmonic extraction.
- HARMONIC_RELATIVE: Harmonic extraction relative to the eigenvalue.
- HARMONIC_RIGHT: Harmonic extraction for rightmost eigenvalues.
- REFINED: Refined extraction.
- REFINED_HARMONIC: Refined harmonic extraction.
Attributes Summary
| HARMONIC | Constant HARMONIC of type int <https://docs.python.org/3/library/functions.html#int> |
| HARMONIC_LARGEST | Constant HARMONIC_LARGEST of type int <https://docs.python.org/3/library/functions.html#int> |
| HARMONIC_RELATIVE | Constant HARMONIC_RELATIVE of type int <https://docs.python.org/3/library/functions.html#int> |
| HARMONIC_RIGHT | Constant HARMONIC_RIGHT of type int <https://docs.python.org/3/library/functions.html#int> |
| REFINED | Constant REFINED of type int <https://docs.python.org/3/library/functions.html#int> |
| REFINED_HARMONIC | Constant REFINED_HARMONIC of type int <https://docs.python.org/3/library/functions.html#int> |
| RITZ | Constant RITZ of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.KrylovSchurBSEType¶
- class slepc4py.SLEPc.EPS.KrylovSchurBSEType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS Krylov-Schur method for BSE problems.
- SHAO: Lanczos recurrence for H square.
- GRUNING: Lanczos recurrence for H.
- PROJECTEDBSE: Lanczos where the projected problem has BSE structure.
Attributes Summary
| GRUNING | Constant GRUNING of type int <https://docs.python.org/3/library/functions.html#int> |
| PROJECTEDBSE | Constant PROJECTEDBSE of type int <https://docs.python.org/3/library/functions.html#int> |
| SHAO | Constant SHAO of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.LanczosReorthogType¶
- class slepc4py.SLEPc.EPS.LanczosReorthogType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS Lanczos reorthogonalization type.
- LOCAL: Local reorthogonalization only.
- FULL: Full reorthogonalization.
- SELECTIVE: Selective reorthogonalization.
- PERIODIC: Periodic reorthogonalization.
- PARTIAL: Partial reorthogonalization.
- DELAYED: Delayed reorthogonalization.
Attributes Summary
| DELAYED | Constant DELAYED of type int <https://docs.python.org/3/library/functions.html#int> |
| FULL | Constant FULL of type int <https://docs.python.org/3/library/functions.html#int> |
| LOCAL | Constant LOCAL of type int <https://docs.python.org/3/library/functions.html#int> |
| PARTIAL | Constant PARTIAL of type int <https://docs.python.org/3/library/functions.html#int> |
| PERIODIC | Constant PERIODIC of type int <https://docs.python.org/3/library/functions.html#int> |
| SELECTIVE | Constant SELECTIVE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.PowerShiftType¶
- class slepc4py.SLEPc.EPS.PowerShiftType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS Power shift type.
- CONSTANT: Constant shift.
- RAYLEIGH: Rayleigh quotient.
- WILKINSON: Wilkinson shift.
Attributes Summary
| CONSTANT | Constant CONSTANT of type int <https://docs.python.org/3/library/functions.html#int> |
| RAYLEIGH | Constant RAYLEIGH of type int <https://docs.python.org/3/library/functions.html#int> |
| WILKINSON | Constant WILKINSON of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.ProblemType¶
- class slepc4py.SLEPc.EPS.ProblemType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS problem type.
- HEP: Hermitian eigenproblem.
- NHEP: Non-Hermitian eigenproblem.
- GHEP: Generalized Hermitian eigenproblem.
- GNHEP: Generalized Non-Hermitian eigenproblem.
- PGNHEP: Generalized Non-Hermitian eigenproblem
- with positive definite B.
- GHIEP: Generalized Hermitian-indefinite eigenproblem.
- BSE: Structured Bethe-Salpeter eigenproblem.
- HAMILT: Hamiltonian eigenproblem.
Attributes Summary
| BSE | Constant BSE of type int <https://docs.python.org/3/library/functions.html#int> |
| GHEP | Constant GHEP of type int <https://docs.python.org/3/library/functions.html#int> |
| GHIEP | Constant GHIEP of type int <https://docs.python.org/3/library/functions.html#int> |
| GNHEP | Constant GNHEP of type int <https://docs.python.org/3/library/functions.html#int> |
| HAMILT | Constant HAMILT of type int <https://docs.python.org/3/library/functions.html#int> |
| HEP | Constant HEP of type int <https://docs.python.org/3/library/functions.html#int> |
| NHEP | Constant NHEP of type int <https://docs.python.org/3/library/functions.html#int> |
| PGNHEP | Constant PGNHEP of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.Stop¶
- class slepc4py.SLEPc.EPS.Stop
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS stopping test.
- BASIC: Default stopping test.
- USER: User-defined stopping test.
- THRESHOLD: Threshold stopping test.
Attributes Summary
| BASIC | Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int> |
| THRESHOLD | Constant THRESHOLD of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.EPS.Type¶
- class slepc4py.SLEPc.EPS.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS type.
Native sparse eigensolvers.
- POWER: Power Iteration, Inverse Iteration, RQI.
- SUBSPACE: Subspace Iteration.
- ARNOLDI: Arnoldi.
- LANCZOS: Lanczos.
- KRYLOVSCHUR: Krylov-Schur (default).
- GD: Generalized Davidson.
- JD: Jacobi-Davidson.
- RQCG: Rayleigh Quotient Conjugate Gradient.
- LOBPCG: Locally Optimal Block Preconditioned Conjugate Gradient.
- CISS: Contour Integral Spectrum Slicing.
- LYAPII: Lyapunov inverse iteration.
- LAPACK: Wrappers to dense eigensolvers in Lapack.
Wrappers to external eigensolvers (should be enabled during installation of SLEPc)
- ARPACK:
- BLOPEX:
- PRIMME:
- FEAST:
- SCALAPACK:
- ELPA:
- ELEMENTAL:
- EVSL:
- CHASE:
Attributes Summary
Attributes Documentation
slepc4py.SLEPc.EPS.Which¶
- class slepc4py.SLEPc.EPS.Which
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS desired part of spectrum.
- LARGEST_MAGNITUDE: Largest magnitude (default).
- SMALLEST_MAGNITUDE: Smallest magnitude.
- LARGEST_REAL: Largest real parts.
- SMALLEST_REAL: Smallest real parts.
- LARGEST_IMAGINARY: Largest imaginary parts in magnitude.
- SMALLEST_IMAGINARY: Smallest imaginary parts in magnitude.
- TARGET_MAGNITUDE: Closest to target (in magnitude).
- TARGET_REAL: Real part closest to target.
- TARGET_IMAGINARY: Imaginary part closest to target.
- ALL: All eigenvalues in an interval.
- USER: User defined selection.
Attributes Summary
| ALL | Constant ALL of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_IMAGINARY | Constant LARGEST_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_MAGNITUDE | Constant LARGEST_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_REAL | Constant LARGEST_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_IMAGINARY | Constant SMALLEST_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_MAGNITUDE | Constant SMALLEST_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_REAL | Constant SMALLEST_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_IMAGINARY | Constant TARGET_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_MAGNITUDE | Constant TARGET_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_REAL | Constant TARGET_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all EPS options in the database. |
| cancelMonitor() | Clear all monitors for an EPS object. |
| computeError(i[, etype]) | Compute the error associated with the i-th computed eigenpair. |
| create([comm]) | Create the EPS object. |
| destroy() | Destroy the EPS object. |
| errorView([etype, viewer]) | Display the errors associated with the computed solution. |
| getArnoldiDelayed() | Get the type of reorthogonalization used during the Arnoldi iteration. |
| getBV() | Get the basis vector objects associated to the eigensolver. |
| getBalance() | Get the balancing type used by the EPS, and the associated parameters. |
| getCISSExtraction() | Get the extraction technique used in the CISS solver. |
| getCISSKSPs() | Get the array of linear solver objects associated with the CISS solver. |
| getCISSQuadRule() | Get the quadrature rule used in the CISS solver. |
| getCISSRefinement() | Get the values of various refinement parameters in the CISS solver. |
| getCISSSizes() | Get the values of various size parameters in the CISS solver. |
| getCISSThreshold() | Get the values of various threshold parameters in the CISS solver. |
| getCISSUseST() | Get the flag indicating the use of the ST <#slepc4py.SLEPc.ST> object in the CISS solver. |
| getConverged() | Get the number of converged eigenpairs. |
| getConvergedReason() | Get the reason why the solve() iteration was stopped. |
| getConvergenceTest() | Get how to compute the error estimate used in the convergence test. |
| getDS() | Get the direct solver associated to the eigensolver. |
| getDimensions() | Get number of eigenvalues to compute and the dimension of the subspace. |
| getEigenpair(i[, Vr, Vi]) | Get the i-th solution of the eigenproblem as computed by solve(). |
| getEigenvalue(i) | Get the i-th eigenvalue as computed by solve(). |
| getEigenvector(i[, Vr, Vi]) | Get the i-th eigenvector as computed by solve(). |
| getErrorEstimate(i) | Get the error estimate associated to the i-th computed eigenpair. |
| getExtraction() | Get the extraction type used by the EPS object. |
| getGDBOrth() | Get the orthogonalization used in the search subspace. |
| getGDBlockSize() | Get the number of vectors to be added to the searching space. |
| getGDDoubleExpansion() | Get a flag indicating whether the double expansion variant is active. |
| getGDInitialSize() | Get the initial size of the searching space. |
| getGDKrylovStart() | Get a flag indicating if the search subspace is started with a Krylov basis. |
| getGDRestart() | Get the number of vectors of the search space after restart. |
| getInterval() | Get the computational interval for spectrum slicing. |
| getInvariantSubspace() | Get an orthonormal basis of the computed invariant subspace. |
| getIterationNumber() | Get the current iteration number. |
| getJDBOrth() | Get the orthogonalization used in the search subspace. |
| getJDBlockSize() | Get the number of vectors to be added to the searching space. |
| getJDConstCorrectionTol() | Get the flag indicating if the dynamic stopping is being used. |
| getJDFix() | Get the threshold for changing the target in the correction equation. |
| getJDInitialSize() | Get the initial size of the searching space. |
| getJDKrylovStart() | Get a flag indicating if the search subspace is started with a Krylov basis. |
| getJDRestart() | Get the number of vectors of the search space after restart. |
| getKrylovSchurBSEType() | Get the method used for BSE structured eigenproblems (Krylov-Schur). |
| getKrylovSchurDetectZeros() | Get the flag that enforces zero detection in spectrum slicing. |
| getKrylovSchurDimensions() | Get the dimensions used for each subsolve step (spectrum slicing). |
| getKrylovSchurInertias() | Get the values of the shifts and their corresponding inertias. |
| getKrylovSchurKSP() | Get the linear solver object associated with the internal EPS object. |
| getKrylovSchurLocking() | Get the locking flag used in the Krylov-Schur method. |
| getKrylovSchurPartitions() | Get the number of partitions of the communicator (spectrum slicing). |
| getKrylovSchurRestart() | Get the restart parameter used in the Krylov-Schur method. |
| getKrylovSchurSubcommInfo() | Get information related to the case of doing spectrum slicing. |
| getKrylovSchurSubcommMats() | Get the eigenproblem matrices stored in the subcommunicator. |
| getKrylovSchurSubcommPairs(i, V) | Get the i-th eigenpair stored in the multi-communicator of the process. |
| getKrylovSchurSubintervals() | Get the points that delimit the subintervals. |
| getLOBPCGBlockSize() | Get the block size used in the LOBPCG method. |
| getLOBPCGLocking() | Get the locking flag used in the LOBPCG method. |
| getLOBPCGRestart() | Get the restart parameter used in the LOBPCG method. |
| getLanczosReorthogType() | Get the type of reorthogonalization used during the Lanczos iteration. |
| getLeftEigenvector(i[, Wr, Wi]) | Get the i-th left eigenvector as computed by solve(). |
| getLyapIIRanks() | Get the rank values used for the Lyapunov step. |
| getMonitor() | Get the list of monitor functions. |
| getOperators() | Get the matrices associated with the eigenvalue problem. |
| getOptionsPrefix() | Get the prefix used for searching for all EPS options in the database. |
| getPowerShiftType() | Get the type of shifts used during the power iteration. |
| getProblemType() | Get the problem type from the EPS object. |
| getPurify() | Get the flag indicating whether purification is activated or not. |
| getRG() | Get the region object associated to the eigensolver. |
| getRQCGReset() | Get the reset parameter used in the RQCG method. |
| getST() | Get the spectral transformation object associated to the eigensolver. |
| getStoppingTest() | Get the stopping function. |
| getTarget() | Get the value of the target. |
| getThreshold() | Get the threshold used in the threshold stopping test. |
| getTolerances() | Get the tolerance and max. |
| getTrackAll() | Get the flag indicating if all residual norms must be computed or not. |
| getTrueResidual() | Get the flag indicating if true residual must be computed explicitly. |
| getTwoSided() | Get the flag indicating if a two-sided variant of the algorithm is being used. |
| getType() | Get the EPS type of this object. |
| getWhichEigenpairs() | Get which portion of the spectrum is to be sought. |
| isGeneralized() | Tell if the EPS object corresponds to a generalized eigenproblem. |
| isHermitian() | Tell if the EPS object corresponds to a Hermitian eigenproblem. |
| isPositive() | Eigenproblem requiring a positive (semi-) definite matrix B. |
| isStructured() | Tell if the EPS object corresponds to a structured eigenvalue problem. |
| reset() | Reset the EPS object. |
| setArbitrarySelection(arbitrary[, args, kargs]) | Set an arbitrary selection criterion function. |
| setArnoldiDelayed(delayed) | Set (toggle) delayed reorthogonalization in the Arnoldi iteration. |
| setBV(bv) | Set a basis vectors object associated to the eigensolver. |
| setBalance([balance, iterations, cutoff]) | Set the balancing technique to be used by the eigensolver. |
| setCISSExtraction(extraction) | Set the extraction technique used in the CISS solver. |
| setCISSQuadRule(quad) | Set the quadrature rule used in the CISS solver. |
| setCISSRefinement([inner, blsize]) | Set the values of various refinement parameters in the CISS solver. |
| setCISSSizes([ip, bs, ms, npart, bsmax, ...]) | Set the values of various size parameters in the CISS solver. |
| setCISSThreshold([delta, spur]) | Set the values of various threshold parameters in the CISS solver. |
| setCISSUseST(usest) | Set a flag indicating that the CISS solver will use the ST <#slepc4py.SLEPc.ST> object. |
| setConvergenceTest(conv) | Set how to compute the error estimate used in the convergence test. |
| setDS(ds) | Set a direct solver object associated to the eigensolver. |
| setDeflationSpace(space) | Add vectors to the basis of the deflation space. |
| setDimensions([nev, ncv, mpd]) | Set number of eigenvalues to compute and the dimension of the subspace. |
| setEigenvalueComparison(comparison[, args, ...]) | Set an eigenvalue comparison function. |
| setExtraction(extraction) | Set the extraction type used by the EPS object. |
| setFromOptions() | Set EPS options from the options database. |
| setGDBOrth(borth) | Set the orthogonalization that will be used in the search subspace. |
| setGDBlockSize(bs) | Set the number of vectors to be added to the searching space. |
| setGDDoubleExpansion(doubleexp) | Set that the search subspace is expanded with double expansion. |
| setGDInitialSize(initialsize) | Set the initial size of the searching space. |
| setGDKrylovStart([krylovstart]) | Set (toggle) starting the search subspace with a Krylov basis. |
| setGDRestart([minv, plusk]) | Set the number of vectors of the search space after restart. |
| setInitialSpace(space) | Set the initial space from which the eigensolver starts to iterate. |
| setInterval(inta, intb) | Set the computational interval for spectrum slicing. |
| setJDBOrth(borth) | Set the orthogonalization that will be used in the search subspace. |
| setJDBlockSize(bs) | Set the number of vectors to be added to the searching space. |
| setJDConstCorrectionTol(constant) | Deactivate the dynamic stopping criterion. |
| setJDFix(fix) | Set the threshold for changing the target in the correction equation. |
| setJDInitialSize(initialsize) | Set the initial size of the searching space. |
| setJDKrylovStart([krylovstart]) | Set (toggle) starting the search subspace with a Krylov basis. |
| setJDRestart([minv, plusk]) | Set the number of vectors of the search space after restart. |
| setKrylovSchurBSEType(bse) | Set the Krylov-Schur variant used for BSE structured eigenproblems. |
| setKrylovSchurDetectZeros(detect) | Set the flag that enforces zero detection in spectrum slicing. |
| setKrylovSchurDimensions([nev, ncv, mpd]) | Set the dimensions used for each subsolve step (spectrum slicing). |
| setKrylovSchurLocking(lock) | Set (toggle) locking/non-locking variants of the Krylov-Schur method. |
| setKrylovSchurPartitions(npart) | Set the number of partitions of the communicator (spectrum slicing). |
| setKrylovSchurRestart(keep) | Set the restart parameter for the Krylov-Schur method. |
| setKrylovSchurSubintervals(subint) | Set the subinterval boundaries. |
| setLOBPCGBlockSize(bs) | Set the block size of the LOBPCG method. |
| setLOBPCGLocking(lock) | Toggle between locking and non-locking (LOBPCG method). |
| setLOBPCGRestart(restart) | Set the restart parameter for the LOBPCG method. |
| setLanczosReorthogType(reorthog) | Set the type of reorthogonalization used during the Lanczos iteration. |
| setLeftInitialSpace(space) | Set a left initial space from which the eigensolver starts to iterate. |
| setLyapIIRanks([rkc, rkl]) | Set the ranks used in the solution of the Lyapunov equation. |
| setMonitor(monitor[, args, kargs]) | Append a monitor function to the list of monitors. |
| setOperators(A[, B]) | Set the matrices associated with the eigenvalue problem. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all EPS options in the database. |
| setPowerShiftType(shift) | Set the type of shifts used during the power iteration. |
| setProblemType(problem_type) | Set the type of the eigenvalue problem. |
| setPurify([purify]) | Set (toggle) eigenvector purification. |
| setRG(rg) | Set a region object associated to the eigensolver. |
| setRQCGReset(nrest) | Set the reset parameter of the RQCG iteration. |
| setST(st) | Set a spectral transformation object associated to the eigensolver. |
| setStoppingTest(stopping[, args, kargs]) | Set when to stop the outer iteration of the eigensolver. |
| setTarget(target) | Set the value of the target. |
| setThreshold(thres[, rel]) | Set the threshold used in the threshold stopping test. |
| setTolerances([tol, max_it]) | Set the tolerance and max. |
| setTrackAll(trackall) | Set if the solver must compute the residual of all approximate eigenpairs. |
| setTrueResidual(trueres) | Set if the solver must compute the true residual explicitly or not. |
| setTwoSided(twosided) | Set to use a two-sided variant that also computes left eigenvectors. |
| setType(eps_type) | Set the particular solver to be used in the EPS object. |
| setUp() | Set up all the internal data structures. |
| setWhichEigenpairs(which) | Set which portion of the spectrum is to be sought. |
| solve() | Solve the eigensystem. |
| updateKrylovSchurSubcommMats([s, a, Au, t, ...]) | Update the eigenproblem matrices stored internally in the communicator. |
| valuesView([viewer]) | Display the computed eigenvalues in a viewer. |
| vectorsView([viewer]) | Output computed eigenvectors to a viewer. |
| view([viewer]) | Print the EPS data structure. |
Attributes Summary
| bv | The basis vectors (BV) object associated. |
| ds | The direct solver (DS) object associated. |
| extraction | The type of extraction technique to be employed. |
| max_it | The maximum iteration count. |
| problem_type | The type of the eigenvalue problem. |
| purify | Eigenvector purification. |
| rg | The region (RG) object associated. |
| st | The spectral transformation (ST) object associated. |
| target | The value of the target. |
| tol | The tolerance. |
| track_all | Compute the residual norm of all approximate eigenpairs. |
| true_residual | Compute the true residual explicitly. |
| two_sided | Two-sided that also computes left eigenvectors. |
| which | The portion of the spectrum to be sought. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all EPS options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all EPS option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:421 <slepc4py/SLEPc/EPS.pyx#L421>`
- cancelMonitor()
- Clear all monitors for an EPS object.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1439 <slepc4py/SLEPc/EPS.pyx#L1439>`
- computeError(i, etype=None)
- Compute the error associated with the i-th computed eigenpair.
Collective.
Compute the error (based on the residual norm) associated with the i-th computed eigenpair.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be considered.
- etype (ErrorType <#slepc4py.SLEPc.EPS.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- Returns
- The error bound, computed in various ways from the residual norm \|Ax-kBx\|_2 where k is the eigenvalue and x is the eigenvector.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1722 <slepc4py/SLEPc/EPS.pyx#L1722>`
- create(comm=None)
- Create the EPS object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:323 <slepc4py/SLEPc/EPS.pyx#L323>`
- destroy()
- Destroy the EPS object.
Collective.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:305 <slepc4py/SLEPc/EPS.pyx#L305>`
- errorView(etype=None, viewer=None)
- Display the errors associated with the computed solution.
Collective.
Display the errors and the eigenvalues.
- etype (ErrorType <#slepc4py.SLEPc.EPS.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- viewer (petsc4py.PETSc.Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
Notes
By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1756 <slepc4py/SLEPc/EPS.pyx#L1756>`
- getArnoldiDelayed()
- Get the type of reorthogonalization used during the Arnoldi iteration.
Not collective.
- Returns
- True if delayed reorthogonalization is to be used.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1887 <slepc4py/SLEPc/EPS.pyx#L1887>`
- getBV()
- Get the basis vector objects associated to the eigensolver.
Not collective.
- Returns
- The basis vectors context.
- Return type
- BV <#slepc4py.SLEPc.BV>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1111 <slepc4py/SLEPc/EPS.pyx#L1111>`
- getBalance()
- Get the balancing type used by the EPS, and the associated parameters.
Not collective.
- balance (Balance <#slepc4py.SLEPc.EPS.Balance>) – The balancing method
- iterations (int <https://docs.python.org/3/library/functions.html#int>) – Number of iterations of the balancing algorithm
- cutoff (float <https://docs.python.org/3/library/functions.html#float>) – Cutoff value
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Balance <#slepc4py.SLEPc.EPS.Balance>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>]
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:560 <slepc4py/SLEPc/EPS.pyx#L560>`
- getCISSExtraction()
- Get the extraction technique used in the CISS solver.
Not collective.
- Returns
- The extraction technique.
- Return type
- CISSExtraction <#slepc4py.SLEPc.EPS.CISSExtraction>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3096 <slepc4py/SLEPc/EPS.pyx#L3096>`
- getCISSKSPs()
- Get the array of linear solver objects associated with the CISS solver.
Not collective.
- Returns
- The linear solver objects.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
Notes
The number of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> solvers is equal to the number of integration points divided by the number of partitions. This value is halved in the case of real matrices with a region centered at the real axis.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3326 <slepc4py/SLEPc/EPS.pyx#L3326>`
- getCISSQuadRule()
- Get the quadrature rule used in the CISS solver.
Not collective.
- Returns
- The quadrature rule.
- Return type
- CISSQuadRule <#slepc4py.SLEPc.EPS.CISSQuadRule>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3125 <slepc4py/SLEPc/EPS.pyx#L3125>`
- getCISSRefinement()
- Get the values of various refinement parameters in the CISS solver.
Not collective.
- inner (int <https://docs.python.org/3/library/functions.html#int>) – Number of iterative refinement iterations (inner loop).
- blsize (int <https://docs.python.org/3/library/functions.html#int>) – Number of iterative refinement iterations (blocksize loop).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3276 <slepc4py/SLEPc/EPS.pyx#L3276>`
- getCISSSizes()
- Get the values of various size parameters in the CISS solver.
Not collective.
- ip (int <https://docs.python.org/3/library/functions.html#int>) – Number of integration points.
- bs (int <https://docs.python.org/3/library/functions.html#int>) – Block size.
- ms (int <https://docs.python.org/3/library/functions.html#int>) – Moment size.
- npart (int <https://docs.python.org/3/library/functions.html#int>) – Number of partitions when splitting the communicator.
- bsmax (int <https://docs.python.org/3/library/functions.html#int>) – Maximum block size.
- realmats (bool <https://docs.python.org/3/library/functions.html#bool>) – True if A and B are real.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, bool <https://docs.python.org/3/library/functions.html#bool>]
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3190 <slepc4py/SLEPc/EPS.pyx#L3190>`
- getCISSThreshold()
- Get the values of various threshold parameters in the CISS solver.
Not collective.
- delta (float <https://docs.python.org/3/library/functions.html#float>) – Threshold for numerical rank.
- spur (float <https://docs.python.org/3/library/functions.html#float>) – Spurious threshold (to discard spurious eigenpairs.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3239 <slepc4py/SLEPc/EPS.pyx#L3239>`
- getCISSUseST()
- Get the flag indicating the use of the ST
<#slepc4py.SLEPc.ST> object in the CISS solver.
Not collective.
- Returns
- Whether to use the ST <#slepc4py.SLEPc.ST> object or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3311 <slepc4py/SLEPc/EPS.pyx#L3311>`
- getConverged()
- Get the number of converged eigenpairs.
Not collective.
- Returns
- Number of converged eigenpairs.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
Notes
This function should be called after solve() has finished.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1508 <slepc4py/SLEPc/EPS.pyx#L1508>`
- getConvergedReason()
- Get the reason why the solve() iteration was stopped.
Not collective.
- Returns
- Negative value indicates diverged, positive value converged.
- Return type
- ConvergedReason <#slepc4py.SLEPc.EPS.ConvergedReason>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1493 <slepc4py/SLEPc/EPS.pyx#L1493>`
- getConvergenceTest()
- Get how to compute the error estimate used in the convergence test.
Not collective.
- Returns
- The method used to compute the error estimate used in the convergence test.
- Return type
- Conv <#slepc4py.SLEPc.EPS.Conv>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:925 <slepc4py/SLEPc/EPS.pyx#L925>`
- getDS()
- Get the direct solver associated to the eigensolver.
Not collective.
- Returns
- The direct solver context.
- Return type
- DS <#slepc4py.SLEPc.DS>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1140 <slepc4py/SLEPc/EPS.pyx#L1140>`
- getDimensions()
- Get number of eigenvalues to compute and the dimension of the subspace.
Not collective.
- nev (int <https://docs.python.org/3/library/functions.html#int>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1014 <slepc4py/SLEPc/EPS.pyx#L1014>`
- getEigenpair(i, Vr=None, Vi=None)
- Get the i-th solution of the eigenproblem as computed by solve().
Collective.
The solution consists of both the eigenvalue and the eigenvector.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Vr (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (real part).
- Vi (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (imaginary part).
- Returns
- e – The computed eigenvalue. It will be a real variable in case of a Hermitian or generalized Hermitian eigenproblem. Otherwise it will be a complex variable (possibly with zero imaginary part).
- Return type
- Scalar <#slepc4py.typing.Scalar>
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()). Eigenpairs are indexed according to the ordering criterion established with setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1615 <slepc4py/SLEPc/EPS.pyx#L1615>`
- getEigenvalue(i)
- Get the i-th eigenvalue as computed by solve().
Not collective.
- Parameters
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Returns
- The computed eigenvalue. It will be a real variable in case of a Hermitian or generalized Hermitian eigenproblem. Otherwise it will be a complex variable (possibly with zero imaginary part).
- Return type
- Scalar <#slepc4py.typing.Scalar>
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()). Eigenpairs are indexed according to the ordering criterion established with setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1527 <slepc4py/SLEPc/EPS.pyx#L1527>`
- getEigenvector(i, Vr=None, Vi=None)
- Get the i-th eigenvector as computed by solve().
Collective.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Vr (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (real part).
- Vi (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (imaginary part).
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()). Eigenpairs are indexed according to the ordering criterion established with setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1561 <slepc4py/SLEPc/EPS.pyx#L1561>`
- getErrorEstimate(i)
- Get the error estimate associated to the i-th computed eigenpair.
Not collective.
- Parameters
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be considered.
- Returns
- Error estimate.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
This is the error estimate used internally by the eigensolver. The actual error bound can be computed with computeError().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1696 <slepc4py/SLEPc/EPS.pyx#L1696>`
- getExtraction()
- Get the extraction type used by the EPS object.
Not collective.
- Returns
- The method of extraction.
- Return type
- Extraction <#slepc4py.SLEPc.EPS.Extraction>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:613 <slepc4py/SLEPc/EPS.pyx#L613>`
- getGDBOrth()
- Get the orthogonalization used in the search subspace.
Not collective.
Get the orthogonalization used in the search subspace in case of generalized Hermitian problems.
- Returns
- Whether to B-orthogonalize the search subspace.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2608 <slepc4py/SLEPc/EPS.pyx#L2608>`
- getGDBlockSize()
- Get the number of vectors to be added to the searching space.
Not collective.
Get the number of vectors to be added to the searching space in every iteration.
- Returns
- The number of vectors added to the search space in every iteration.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2501 <slepc4py/SLEPc/EPS.pyx#L2501>`
- getGDDoubleExpansion()
- Get a flag indicating whether the double expansion variant is active.
Not collective.
Get a flag indicating whether the double expansion variant has been activated or not.
- Returns
- True if using double expansion.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2646 <slepc4py/SLEPc/EPS.pyx#L2646>`
- getGDInitialSize()
- Get the initial size of the searching space.
Not collective.
- Returns
- The number of vectors of the initial searching subspace.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2576 <slepc4py/SLEPc/EPS.pyx#L2576>`
- getGDKrylovStart()
- Get a flag indicating if the search subspace is started with a Krylov
basis.
Not collective.
- Returns
- True if starting the search subspace with a Krylov basis.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2469 <slepc4py/SLEPc/EPS.pyx#L2469>`
- getGDRestart()
- Get the number of vectors of the search space after restart.
Not collective.
Get the number of vectors of the search space after restart and the number of vectors saved from the previous iteration.
- minv (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors of the search subspace after restart.
- plusk (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors saved from the previous iteration.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2541 <slepc4py/SLEPc/EPS.pyx#L2541>`
- getInterval()
- Get the computational interval for spectrum slicing.
Not collective.
- inta (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- intb (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
Notes
If the interval was not set by the user, then zeros are returned.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:773 <slepc4py/SLEPc/EPS.pyx#L773>`
- getInvariantSubspace()
- Get an orthonormal basis of the computed invariant subspace.
Collective.
- Returns
- Basis of the invariant subspace.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>
Notes
This function should be called after solve() has finished.
The returned vectors span an invariant subspace associated with the computed eigenvalues. An invariant subspace X of A` satisfies ``A x in X for all x in X (a similar definition applies for generalized eigenproblems).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1657 <slepc4py/SLEPc/EPS.pyx#L1657>`
- getIterationNumber()
- Get the current iteration number.
Not collective.
If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.
- Returns
- Iteration number.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1475 <slepc4py/SLEPc/EPS.pyx#L1475>`
- getJDBOrth()
- Get the orthogonalization used in the search subspace.
Not collective.
Get the orthogonalization used in the search subspace in case of generalized Hermitian problems.
- Returns
- Whether to B-orthogonalize the search subspace.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2890 <slepc4py/SLEPc/EPS.pyx#L2890>`
- getJDBlockSize()
- Get the number of vectors to be added to the searching space.
Not collective.
Get the number of vectors to be added to the searching space in every iteration.
- Returns
- The number of vectors added to the search space in every iteration.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2712 <slepc4py/SLEPc/EPS.pyx#L2712>`
- getJDConstCorrectionTol()
- Get the flag indicating if the dynamic stopping is being used.
Not collective.
Get the flag indicating if the dynamic stopping is being used for solving the correction equation.
- Returns
- True if the dynamic stopping criterion is not being used.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2855 <slepc4py/SLEPc/EPS.pyx#L2855>`
- getJDFix()
- Get the threshold for changing the target in the correction equation.
Not collective.
- Returns
- The threshold for changing the target.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2822 <slepc4py/SLEPc/EPS.pyx#L2822>`
- getJDInitialSize()
- Get the initial size of the searching space.
Not collective.
- Returns
- The number of vectors of the initial searching subspace.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2787 <slepc4py/SLEPc/EPS.pyx#L2787>`
- getJDKrylovStart()
- Get a flag indicating if the search subspace is started with a Krylov
basis.
Not collective.
- Returns
- True if starting the search subspace with a Krylov basis.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2680 <slepc4py/SLEPc/EPS.pyx#L2680>`
- getJDRestart()
- Get the number of vectors of the search space after restart.
Not collective.
Get the number of vectors of the search space after restart and the number of vectors saved from the previous iteration.
- minv (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors of the search subspace after restart.
- plusk (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors saved from the previous iteration.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2752 <slepc4py/SLEPc/EPS.pyx#L2752>`
- getKrylovSchurBSEType()
- Get the method used for BSE structured eigenproblems (Krylov-Schur).
Not collective.
- Returns
- The BSE method.
- Return type
- KrylovSchurBSEType <#slepc4py.SLEPc.EPS.KrylovSchurBSEType>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1959 <slepc4py/SLEPc/EPS.pyx#L1959>`
- getKrylovSchurDetectZeros()
- Get the flag that enforces zero detection in spectrum slicing.
Not collective.
- Returns
- The zero detection flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2112 <slepc4py/SLEPc/EPS.pyx#L2112>`
- getKrylovSchurDimensions()
- Get the dimensions used for each subsolve step (spectrum slicing).
Not collective.
Get the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval.
- nev (int <https://docs.python.org/3/library/functions.html#int>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2159 <slepc4py/SLEPc/EPS.pyx#L2159>`
- getKrylovSchurInertias()
- Get the values of the shifts and their corresponding inertias.
Not collective.
Get the values of the shifts and their corresponding inertias in case of doing spectrum slicing for a computational interval.
- shifts (ArrayReal <#slepc4py.typing.ArrayReal>) – The values of the shifts used internally in the solver.
- inertias (ArrayInt <#slepc4py.typing.ArrayInt>) – The values of the inertia in each shift.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayReal <#slepc4py.typing.ArrayReal>, ArrayInt <#slepc4py.typing.ArrayInt>]
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2404 <slepc4py/SLEPc/EPS.pyx#L2404>`
- getKrylovSchurKSP()
- Get the linear solver object associated with the internal EPS
object.
Collective.
Get the linear solver object associated with the internal EPS object in case of doing spectrum slicing for a computational interval.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2434 <slepc4py/SLEPc/EPS.pyx#L2434>`
- getKrylovSchurLocking()
- Get the locking flag used in the Krylov-Schur method.
Not collective.
- Returns
- The locking flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2030 <slepc4py/SLEPc/EPS.pyx#L2030>`
- getKrylovSchurPartitions()
- Get the number of partitions of the communicator (spectrum slicing).
Not collective.
- Returns
- The number of partitions.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2070 <slepc4py/SLEPc/EPS.pyx#L2070>`
- getKrylovSchurRestart()
- Get the restart parameter used in the Krylov-Schur method.
Not collective.
- Returns
- The number of vectors to be kept at restart.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1994 <slepc4py/SLEPc/EPS.pyx#L1994>`
- getKrylovSchurSubcommInfo()
- Get information related to the case of doing spectrum slicing.
Collective on the subcommunicator (if v is given).
Get information related to the case of doing spectrum slicing for a computational interval with multiple communicators.
- k (int <https://docs.python.org/3/library/functions.html#int>) – Number of the subinterval for the calling process.
- n (int <https://docs.python.org/3/library/functions.html#int>) – Number of eigenvalues found in the k-th subinterval.
- v (petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – A vector owned by processes in the subcommunicator with dimensions compatible for locally computed eigenvectors.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>]
Notes
This function is only available for spectrum slicing runs.
The returned Vec should be destroyed by the user.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2183 <slepc4py/SLEPc/EPS.pyx#L2183>`
- getKrylovSchurSubcommMats()
- Get the eigenproblem matrices stored in the subcommunicator.
Collective on the subcommunicator.
Get the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs.
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix associated with the eigensystem.
- B (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The second matrix in the case of generalized eigenproblems.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>] | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, None <https://docs.python.org/3/library/constants.html#None>]
Notes
This is the analog of getOperators(), but returns the matrices distributed differently (in the subcommunicator rather than in the parent communicator).
These matrices should not be modified by the user.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2246 <slepc4py/SLEPc/EPS.pyx#L2246>`
- getKrylovSchurSubcommPairs(i, V)
- Get the i-th eigenpair stored in the multi-communicator of the process.
Collective on the subcommunicator (if v is given).
Get the i-th eigenpair stored internally in the multi-communicator to which the calling process belongs.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- V (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Placeholder for the returned eigenvector.
- Returns
- The computed eigenvalue.
- Return type
- Scalar <#slepc4py.typing.Scalar>
Notes
The index i should be a value between 0 and n-1, where n is the number of vectors in the local subinterval, see getKrylovSchurSubcommInfo().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2214 <slepc4py/SLEPc/EPS.pyx#L2214>`
- getKrylovSchurSubintervals()
- Get the points that delimit the subintervals.
Not collective.
Get the points that delimit the subintervals used in spectrum slicing with several partitions.
- Returns
- Real values specifying subintervals
- Return type
- ArrayReal <#slepc4py.typing.ArrayReal>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2379 <slepc4py/SLEPc/EPS.pyx#L2379>`
- getLOBPCGBlockSize()
- Get the block size used in the LOBPCG method.
Not collective.
- Returns
- The block size.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2956 <slepc4py/SLEPc/EPS.pyx#L2956>`
- getLOBPCGLocking()
- Get the locking flag used in the LOBPCG method.
Not collective.
- Returns
- The locking flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3028 <slepc4py/SLEPc/EPS.pyx#L3028>`
- getLOBPCGRestart()
- Get the restart parameter used in the LOBPCG method.
Not collective.
- Returns
- The restart parameter.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2993 <slepc4py/SLEPc/EPS.pyx#L2993>`
- getLanczosReorthogType()
- Get the type of reorthogonalization used during the Lanczos iteration.
Not collective.
- Returns
- The type of reorthogonalization.
- Return type
- LanczosReorthogType <#slepc4py.SLEPc.EPS.LanczosReorthogType>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1921 <slepc4py/SLEPc/EPS.pyx#L1921>`
- getLeftEigenvector(i, Wr=None, Wi=None)
- Get the i-th left eigenvector as computed by solve().
Collective.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Wr (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (real part).
- Wi (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (imaginary part).
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()). Eigensolutions are indexed according to the ordering criterion established with setWhichEigenpairs().
Left eigenvectors are available only if the twosided flag was set with setTwoSided().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1587 <slepc4py/SLEPc/EPS.pyx#L1587>`
- getLyapIIRanks()
- Get the rank values used for the Lyapunov step.
Not collective.
- rkc (int <https://docs.python.org/3/library/functions.html#int>) – The compressed rank.
- rkl (int <https://docs.python.org/3/library/functions.html#int>) – The Lyapunov rank.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3062 <slepc4py/SLEPc/EPS.pyx#L3062>`
- getMonitor()
- Get the list of monitor functions.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1435 <slepc4py/SLEPc/EPS.pyx#L1435>`
- Return type
- EPSMonitorFunction <#slepc4py.typing.EPSMonitorFunction>
- getOperators()
- Get the matrices associated with the eigenvalue problem.
Collective.
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix associated with the eigensystem.
- B (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The second matrix in the case of generalized eigenproblems.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>] | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, None <https://docs.python.org/3/library/constants.html#None>]
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1198 <slepc4py/SLEPc/EPS.pyx#L1198>`
- getOptionsPrefix()
- Get the prefix used for searching for all EPS options in the database.
Not collective.
- Returns
- The prefix string set for this EPS object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:379 <slepc4py/SLEPc/EPS.pyx#L379>`
- getPowerShiftType()
- Get the type of shifts used during the power iteration.
Not collective.
- Returns
- The type of shift.
- Return type
- PowerShiftType <#slepc4py.SLEPc.EPS.PowerShiftType>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1848 <slepc4py/SLEPc/EPS.pyx#L1848>`
- getProblemType()
- Get the problem type from the EPS object.
Not collective.
- Returns
- The problem type that was previously set.
- Return type
- ProblemType <#slepc4py.SLEPc.EPS.ProblemType>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:454 <slepc4py/SLEPc/EPS.pyx#L454>`
- getPurify()
- Get the flag indicating whether purification is activated or not.
Not collective.
- Returns
- Whether purification is activated or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:896 <slepc4py/SLEPc/EPS.pyx#L896>`
- getRG()
- Get the region object associated to the eigensolver.
Not collective.
- Returns
- The region context.
- Return type
- RG <#slepc4py.SLEPc.RG>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1169 <slepc4py/SLEPc/EPS.pyx#L1169>`
- getRQCGReset()
- Get the reset parameter used in the RQCG method.
Not collective.
- Returns
- The number of iterations between resets.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2927 <slepc4py/SLEPc/EPS.pyx#L2927>`
- getST()
- Get the spectral transformation object associated to the eigensolver.
Not collective.
- Returns
- The spectral transformation.
- Return type
- ST <#slepc4py.SLEPc.ST>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1082 <slepc4py/SLEPc/EPS.pyx#L1082>`
- getStoppingTest()
- Get the stopping function.
Not collective.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1353 <slepc4py/SLEPc/EPS.pyx#L1353>`
- Return type
- EPSStoppingFunction <#slepc4py.typing.EPSStoppingFunction>
- getTarget()
- Get the value of the target.
Not collective.
- Returns
- The value of the target.
- Return type
- Scalar <#slepc4py.typing.Scalar>
Notes
If the target was not set by the user, then zero is returned.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:734 <slepc4py/SLEPc/EPS.pyx#L734>`
- getThreshold()
- Get the threshold used in the threshold stopping test.
Not collective.
- thres (float <https://docs.python.org/3/library/functions.html#float>) – The threshold.
- rel (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the threshold is relative or not.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:691 <slepc4py/SLEPc/EPS.pyx#L691>`
- getTolerances()
- Get the tolerance and max. iter. count used for convergence tests.
Not collective.
Get the tolerance and iteration limit used by the default EPS convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of iterations.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:822 <slepc4py/SLEPc/EPS.pyx#L822>`
- getTrackAll()
- Get the flag indicating if all residual norms must be computed or not.
Not collective.
- Returns
- Whether the solver compute all residuals or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:985 <slepc4py/SLEPc/EPS.pyx#L985>`
- getTrueResidual()
- Get the flag indicating if true residual must be computed explicitly.
Not collective.
- Returns
- Whether the solver compute all residuals or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:956 <slepc4py/SLEPc/EPS.pyx#L956>`
- getTwoSided()
- Get the flag indicating if a two-sided variant of the algorithm is being
used.
Not collective.
- Returns
- Whether the two-sided variant is to be used or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:867 <slepc4py/SLEPc/EPS.pyx#L867>`
- getType()
- Get the EPS type of this object.
Not collective.
- Returns
- The solver currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:364 <slepc4py/SLEPc/EPS.pyx#L364>`
- getWhichEigenpairs()
- Get which portion of the spectrum is to be sought.
Not collective.
- Returns
- The portion of the spectrum to be sought by the solver.
- Return type
- Which <#slepc4py.SLEPc.EPS.Which>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:653 <slepc4py/SLEPc/EPS.pyx#L653>`
- isGeneralized()
- Tell if the EPS object corresponds to a generalized eigenproblem.
Not collective.
- Returns
- True if two matrices were set with setOperators().
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:497 <slepc4py/SLEPc/EPS.pyx#L497>`
- isHermitian()
- Tell if the EPS object corresponds to a Hermitian eigenproblem.
Not collective.
- Returns
- True if the problem type set with setProblemType() was Hermitian.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:512 <slepc4py/SLEPc/EPS.pyx#L512>`
- isPositive()
- Eigenproblem requiring a positive (semi-) definite matrix B.
Not collective.
Tell if the EPS corresponds to an eigenproblem requiring a positive (semi-) definite matrix B.
- Returns
- True if the problem type set with setProblemType() was positive.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:527 <slepc4py/SLEPc/EPS.pyx#L527>`
- isStructured()
- Tell if the EPS object corresponds to a structured eigenvalue problem.
Not collective.
- Returns
- True if the problem type set with setProblemType() was structured.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:545 <slepc4py/SLEPc/EPS.pyx#L545>`
- reset()
- Reset the EPS object.
Collective.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:315 <slepc4py/SLEPc/EPS.pyx#L315>`
- setArbitrarySelection(arbitrary, args=None, kargs=None)
- Set an arbitrary selection criterion function.
Logically collective.
Set a function to look for eigenvalues according to an arbitrary selection criterion. This criterion can be based on a computation involving the current eigenvector approximation.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1363 <slepc4py/SLEPc/EPS.pyx#L1363>`
- arbitrary (EPSArbitraryFunction <#slepc4py.typing.EPSArbitraryFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setArnoldiDelayed(delayed)
- Set (toggle) delayed reorthogonalization in the Arnoldi iteration.
Logically collective.
- Parameters
- delayed (bool <https://docs.python.org/3/library/functions.html#bool>) – True if delayed reorthogonalization is to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
This call is only relevant if the type was set to EPS.Type.ARNOLDI <#slepc4py.SLEPc.EPS.Type.ARNOLDI> with setType().
Delayed reorthogonalization is an aggressive optimization for the Arnoldi eigensolver than may provide better scalability, but sometimes makes the solver converge less than the default algorithm.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1863 <slepc4py/SLEPc/EPS.pyx#L1863>`
- setBV(bv)
- Set a basis vectors object associated to the eigensolver.
Collective.
- Parameters
- bv (BV <#slepc4py.SLEPc.BV>) – The basis vectors context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1127 <slepc4py/SLEPc/EPS.pyx#L1127>`
- setBalance(balance=None, iterations=None, cutoff=None)
- Set the balancing technique to be used by the eigensolver.
Logically collective.
Set the balancing technique to be used by the eigensolver, and some parameters associated to it.
- balance (Balance <#slepc4py.SLEPc.EPS.Balance> | None <https://docs.python.org/3/library/constants.html#None>) – The balancing method
- iterations (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of iterations of the balancing algorithm
- cutoff (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Cutoff value
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:581 <slepc4py/SLEPc/EPS.pyx#L581>`
- setCISSExtraction(extraction)
- Set the extraction technique used in the CISS solver.
Logically collective.
- Parameters
- extraction (CISSExtraction <#slepc4py.SLEPc.EPS.CISSExtraction>) – The extraction technique.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3082 <slepc4py/SLEPc/EPS.pyx#L3082>`
- setCISSQuadRule(quad)
- Set the quadrature rule used in the CISS solver.
Logically collective.
- Parameters
- quad (CISSQuadRule <#slepc4py.SLEPc.EPS.CISSQuadRule>) – The quadrature rule.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3111 <slepc4py/SLEPc/EPS.pyx#L3111>`
- setCISSRefinement(inner=None, blsize=None)
- Set the values of various refinement parameters in the CISS solver.
Logically collective.
- inner (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of iterative refinement iterations (inner loop).
- blsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of iterative refinement iterations (blocksize loop).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3257 <slepc4py/SLEPc/EPS.pyx#L3257>`
- setCISSSizes(ip=None, bs=None, ms=None, npart=None, bsmax=None, realmats=False)
- Set the values of various size parameters in the CISS solver.
Logically collective.
- ip (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of integration points.
- bs (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Block size.
- ms (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Moment size.
- npart (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of partitions when splitting the communicator.
- bsmax (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum block size.
- realmats (bool <https://docs.python.org/3/library/functions.html#bool>) – True if A and B are real.
Notes
The default number of partitions is 1. This means the internal petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> object is shared among all processes of the EPS communicator. Otherwise, the communicator is split into npart communicators, so that npart petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> solves proceed simultaneously.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3140 <slepc4py/SLEPc/EPS.pyx#L3140>`
- setCISSThreshold(delta=None, spur=None)
- Set the values of various threshold parameters in the CISS solver.
Logically collective.
- delta (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Threshold for numerical rank.
- spur (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Spurious threshold (to discard spurious eigenpairs).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3220 <slepc4py/SLEPc/EPS.pyx#L3220>`
- setCISSUseST(usest)
- Set a flag indicating that the CISS solver will use the ST
<#slepc4py.SLEPc.ST> object.
Logically collective.
Set a flag indicating that the CISS solver will use the ST <#slepc4py.SLEPc.ST> object for the linear solves.
- Parameters
- usest (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether to use the ST <#slepc4py.SLEPc.ST> object or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3294 <slepc4py/SLEPc/EPS.pyx#L3294>`
- setConvergenceTest(conv)
- Set how to compute the error estimate used in the convergence test.
Logically collective.
- Parameters
- conv (Conv <#slepc4py.SLEPc.EPS.Conv>) – The method used to compute the error estimate used in the convergence test.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:941 <slepc4py/SLEPc/EPS.pyx#L941>`
- setDS(ds)
- Set a direct solver object associated to the eigensolver.
Collective.
- Parameters
- ds (DS <#slepc4py.SLEPc.DS>) – The direct solver context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1156 <slepc4py/SLEPc/EPS.pyx#L1156>`
- setDeflationSpace(space)
- Add vectors to the basis of the deflation space.
Collective.
- Parameters
- space (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>]) – Set of basis vectors to be added to the deflation space.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
When a deflation space is given, the eigensolver seeks the eigensolution in the restriction of the problem to the orthogonal complement of this space. This can be used for instance in the case that an invariant subspace is known beforehand (such as the nullspace of the matrix).
The vectors do not need to be mutually orthonormal, since they are explicitly orthonormalized internally.
These vectors do not persist from one solve() call to the other, so the deflation space should be set every time.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1238 <slepc4py/SLEPc/EPS.pyx#L1238>`
- setDimensions(nev=None, ncv=None, mpd=None)
- Set number of eigenvalues to compute and the dimension of the subspace.
Logically collective.
- nev (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension allowed for the projected problem.
Notes
Use DECIDE <#slepc4py.SLEPc.DECIDE> for ncv and mpd to assign a reasonably good value, which is dependent on the solution method.
The parameters ncv and mpd are intimately related, so that the user is advised to set one of them at most. Normal usage is the following:
- In cases where nev is small, the user sets ncv (a reasonable default is 2 * nev).
- In cases where nev is large, the user sets mpd.
The value of ncv should always be between nev and (nev + mpd), typically ncv = nev + mpd. If nev is not too large, mpd = nev is a reasonable choice, otherwise a smaller value should be used.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1035 <slepc4py/SLEPc/EPS.pyx#L1035>`
- setEigenvalueComparison(comparison, args=None, kargs=None)
- Set an eigenvalue comparison function.
Logically collective.
Specify the eigenvalue comparison function when setWhichEigenpairs() is set to EPS.Which.USER <#slepc4py.SLEPc.EPS.Which.USER>.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1390 <slepc4py/SLEPc/EPS.pyx#L1390>`
- comparison (EPSEigenvalueComparison <#slepc4py.typing.EPSEigenvalueComparison> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setExtraction(extraction)
- Set the extraction type used by the EPS object.
Logically collective.
- Parameters
- extraction (Extraction <#slepc4py.SLEPc.EPS.Extraction>) – The extraction method to be used by the solver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Not all eigensolvers support all types of extraction. See the SLEPc documentation for details.
By default, a standard Rayleigh-Ritz extraction is used. Other extractions may be useful when computing interior eigenvalues.
Harmonic-type extractions are used in combination with a target. See setTarget().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:628 <slepc4py/SLEPc/EPS.pyx#L628>`
- setFromOptions()
- Set EPS options from the options database.
Collective.
This routine must be called before setUp() if the user is to be allowed to set the solver type.
Notes
To see all options, run your program with the -help option.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:436 <slepc4py/SLEPc/EPS.pyx#L436>`
- setGDBOrth(borth)
- Set the orthogonalization that will be used in the search subspace.
Logically collective.
Set the orthogonalization that will be used in the search subspace in case of generalized Hermitian problems.
- Parameters
- borth (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether to B-orthogonalize the search subspace.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2591 <slepc4py/SLEPc/EPS.pyx#L2591>`
- setGDBlockSize(bs)
- Set the number of vectors to be added to the searching space.
Logically collective.
Set the number of vectors to be added to the searching space in every iteration.
- Parameters
- bs (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors added to the search space in every iteration.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2484 <slepc4py/SLEPc/EPS.pyx#L2484>`
- setGDDoubleExpansion(doubleexp)
- Set that the search subspace is expanded with double expansion.
Logically collective.
Set a variant where the search subspace is expanded with K [A x, B x] (double expansion) instead of the classic K r, where K is the preconditioner, x the selected approximate eigenvector and r its associated residual vector.
- Parameters
- doubleexp (bool <https://docs.python.org/3/library/functions.html#bool>) – True if using double expansion.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2626 <slepc4py/SLEPc/EPS.pyx#L2626>`
- setGDInitialSize(initialsize)
- Set the initial size of the searching space.
Logically collective.
- Parameters
- initialsize (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors of the initial searching subspace.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2562 <slepc4py/SLEPc/EPS.pyx#L2562>`
- setGDKrylovStart(krylovstart=True)
- Set (toggle) starting the search subspace with a Krylov basis.
Logically collective.
- Parameters
- krylovstart (bool <https://docs.python.org/3/library/functions.html#bool>) – True if starting the search subspace with a Krylov basis.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2455 <slepc4py/SLEPc/EPS.pyx#L2455>`
- setGDRestart(minv=None, plusk=None)
- Set the number of vectors of the search space after restart.
Logically collective.
Set the number of vectors of the search space after restart and the number of vectors saved from the previous iteration.
- minv (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors of the search subspace after restart.
- plusk (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors saved from the previous iteration.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2519 <slepc4py/SLEPc/EPS.pyx#L2519>`
- setInitialSpace(space)
- Set the initial space from which the eigensolver starts to iterate.
Collective.
- Parameters
- space (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>]) – The initial space
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Some solvers start to iterate on a single vector (initial vector). In that case, the other vectors are ignored.
In contrast to setDeflationSpace(), these vectors do not persist from one solve() call to the other, so the initial space should be set every time.
The vectors do not need to be mutually orthonormal, since they are explicitly orthonormalized internally.
Common usage of this function is when the user can provide a rough approximation of the wanted eigenspace. Then, convergence may be faster.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1272 <slepc4py/SLEPc/EPS.pyx#L1272>`
- setInterval(inta, intb)
- Set the computational interval for spectrum slicing.
Logically collective.
- inta (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- intb (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
Notes
Spectrum slicing is a technique employed for computing all eigenvalues of symmetric eigenproblems in a given interval. This function provides the interval to be considered. It must be used in combination with EPS.Which.ALL <#slepc4py.SLEPc.EPS.Which.ALL>, see setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:795 <slepc4py/SLEPc/EPS.pyx#L795>`
- setJDBOrth(borth)
- Set the orthogonalization that will be used in the search subspace.
Logically collective.
Set the orthogonalization that will be used in the search subspace in case of generalized Hermitian problems.
- Parameters
- borth (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether to B-orthogonalize the search subspace.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2873 <slepc4py/SLEPc/EPS.pyx#L2873>`
- setJDBlockSize(bs)
- Set the number of vectors to be added to the searching space.
Logically collective.
Set the number of vectors to be added to the searching space in every iteration.
- Parameters
- bs (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors added to the search space in every iteration.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2695 <slepc4py/SLEPc/EPS.pyx#L2695>`
- setJDConstCorrectionTol(constant)
- Deactivate the dynamic stopping criterion.
Logically collective.
Deactivate the dynamic stopping criterion that sets the petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> relative tolerance to 0.5**i, where i is the number of EPS iterations from the last converged value.
- Parameters
- constant (bool <https://docs.python.org/3/library/functions.html#bool>) – If False, the petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> relative tolerance is set to 0.5**i.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2837 <slepc4py/SLEPc/EPS.pyx#L2837>`
- setJDFix(fix)
- Set the threshold for changing the target in the correction equation.
Logically collective.
- Parameters
- fix (float <https://docs.python.org/3/library/functions.html#float>) – The threshold for changing the target.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The target in the correction equation is fixed at the first iterations. When the norm of the residual vector is lower than the fix value, the target is set to the corresponding eigenvalue.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2802 <slepc4py/SLEPc/EPS.pyx#L2802>`
- setJDInitialSize(initialsize)
- Set the initial size of the searching space.
Logically collective.
- Parameters
- initialsize (int <https://docs.python.org/3/library/functions.html#int>) – The number of vectors of the initial searching subspace.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2773 <slepc4py/SLEPc/EPS.pyx#L2773>`
- setJDKrylovStart(krylovstart=True)
- Set (toggle) starting the search subspace with a Krylov basis.
Logically collective.
- Parameters
- krylovstart (bool <https://docs.python.org/3/library/functions.html#bool>) – True if starting the search subspace with a Krylov basis.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2666 <slepc4py/SLEPc/EPS.pyx#L2666>`
- setJDRestart(minv=None, plusk=None)
- Set the number of vectors of the search space after restart.
Logically collective.
Set the number of vectors of the search space after restart and the number of vectors saved from the previous iteration.
- minv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The number of vectors of the search subspace after restart.
- plusk (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The number of vectors saved from the previous iteration.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2730 <slepc4py/SLEPc/EPS.pyx#L2730>`
- setKrylovSchurBSEType(bse)
- Set the Krylov-Schur variant used for BSE structured eigenproblems.
Logically collective.
- Parameters
- bse (KrylovSchurBSEType <#slepc4py.SLEPc.EPS.KrylovSchurBSEType>) – The BSE method.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
This call is only relevant if the type was set to EPS.Type.KRYLOVSCHUR <#slepc4py.SLEPc.EPS.Type.KRYLOVSCHUR> with setType() and the problem type to EPS.ProblemType.BSE <#slepc4py.SLEPc.EPS.ProblemType.BSE> with setProblemType().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1939 <slepc4py/SLEPc/EPS.pyx#L1939>`
- setKrylovSchurDetectZeros(detect)
- Set the flag that enforces zero detection in spectrum slicing.
Logically collective.
Set a flag to enforce the detection of zeros during the factorizations throughout the spectrum slicing computation.
- Parameters
- detect (bool <https://docs.python.org/3/library/functions.html#bool>) – True if zeros must checked for.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A zero in the factorization indicates that a shift coincides with an eigenvalue.
This flag is turned off by default, and may be necessary in some cases, especially when several partitions are being used. This feature currently requires an external package for factorizations with support for zero detection, e.g. MUMPS.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2085 <slepc4py/SLEPc/EPS.pyx#L2085>`
- setKrylovSchurDimensions(nev=None, ncv=None, mpd=None)
- Set the dimensions used for each subsolve step (spectrum slicing).
Logically collective.
Set the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval. The meaning of the parameters is the same as in setDimensions().
- nev (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2127 <slepc4py/SLEPc/EPS.pyx#L2127>`
- setKrylovSchurLocking(lock)
- Set (toggle) locking/non-locking variants of the Krylov-Schur method.
Logically collective.
- Parameters
- lock (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the locking variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The default is to lock converged eigenpairs when the method restarts. This behavior can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2009 <slepc4py/SLEPc/EPS.pyx#L2009>`
- setKrylovSchurPartitions(npart)
- Set the number of partitions of the communicator (spectrum slicing).
Logically collective.
Set the number of partitions for the case of doing spectrum slicing for a computational interval with the communicator split in several sub-communicators.
- Parameters
- npart (int <https://docs.python.org/3/library/functions.html#int>) – The number of partitions.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
By default, npart=1 so all processes in the communicator participate in the processing of the whole interval. If npart>1 then the interval is divided into npart subintervals, each of them being processed by a subset of processes.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2045 <slepc4py/SLEPc/EPS.pyx#L2045>`
- setKrylovSchurRestart(keep)
- Set the restart parameter for the Krylov-Schur method.
Logically collective.
It is the proportion of basis vectors that must be kept after restart.
- Parameters
- keep (float <https://docs.python.org/3/library/functions.html#float>) – The number of vectors to be kept at restart.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are in the range [0.1,0.9]. The default is 0.5.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1974 <slepc4py/SLEPc/EPS.pyx#L1974>`
- setKrylovSchurSubintervals(subint)
- Set the subinterval boundaries.
Logically collective.
Set the subinterval boundaries for spectrum slicing with a computational interval.
- Parameters
- subint (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>]) – Real values specifying subintervals
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
This function must be called after setKrylovSchurPartitions(). For npart partitions, the argument subint must contain npart+1 real values sorted in ascending order: subint_0, subint_1, …, subint_npart, where the first and last values must coincide with the interval endpoints set with EPSSetInterval(). The subintervals are then defined by two consecutive points: [subint_0,subint_1], [subint_1,subint_2], and so on.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2342 <slepc4py/SLEPc/EPS.pyx#L2342>`
- setLOBPCGBlockSize(bs)
- Set the block size of the LOBPCG method.
Logically collective.
- Parameters
- bs (int <https://docs.python.org/3/library/functions.html#int>) – The block size.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2942 <slepc4py/SLEPc/EPS.pyx#L2942>`
- setLOBPCGLocking(lock)
- Toggle between locking and non-locking (LOBPCG method).
Logically collective.
- Parameters
- lock (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the locking variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
This flag refers to soft locking (converged vectors within the current block iterate), since hard locking is always used (when nev is larger than the block size).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3008 <slepc4py/SLEPc/EPS.pyx#L3008>`
- setLOBPCGRestart(restart)
- Set the restart parameter for the LOBPCG method.
Logically collective.
The meaning of this parameter is the proportion of vectors within the current block iterate that must have converged in order to force a restart with hard locking.
- Parameters
- restart (float <https://docs.python.org/3/library/functions.html#float>) – The percentage of the block of vectors to force a restart.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are in the range [0.1,1.0]. The default is 0.9.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2971 <slepc4py/SLEPc/EPS.pyx#L2971>`
- setLanczosReorthogType(reorthog)
- Set the type of reorthogonalization used during the Lanczos iteration.
Logically collective.
- Parameters
- reorthog (LanczosReorthogType <#slepc4py.SLEPc.EPS.LanczosReorthogType>) – The type of reorthogonalization.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
This call is only relevant if the type was set to EPS.Type.LANCZOS <#slepc4py.SLEPc.EPS.Type.LANCZOS> with setType().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1902 <slepc4py/SLEPc/EPS.pyx#L1902>`
- setLeftInitialSpace(space)
- Set a left initial space from which the eigensolver starts to iterate.
Collective.
- Parameters
- space (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>]) – The left initial space
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Left initial vectors are used to initiate the left search space in two-sided eigensolvers. Users should pass here an approximation of the left eigenspace, if available.
The same comments in setInitialSpace() are applicable here.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1305 <slepc4py/SLEPc/EPS.pyx#L1305>`
- setLyapIIRanks(rkc=None, rkl=None)
- Set the ranks used in the solution of the Lyapunov equation.
Logically collective.
- rkc (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The compressed rank.
- rkl (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The Lyapunov rank.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3043 <slepc4py/SLEPc/EPS.pyx#L3043>`
- setMonitor(monitor, args=None, kargs=None)
- Append a monitor function to the list of monitors.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1414 <slepc4py/SLEPc/EPS.pyx#L1414>`
- monitor (EPSMonitorFunction <#slepc4py.typing.EPSMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setOperators(A, B=None)
- Set the matrices associated with the eigenvalue problem.
Collective.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix associated with the eigensystem.
- B (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – The second matrix in the case of generalized eigenproblems; if not provided, a standard eigenproblem is assumed.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1221 <slepc4py/SLEPc/EPS.pyx#L1221>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all EPS options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all EPS option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.
For example, to distinguish between the runtime options for two different EPS contexts, one could call:
E1.setOptionsPrefix("eig1_")
E2.setOptionsPrefix("eig2_")
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:394 <slepc4py/SLEPc/EPS.pyx#L394>`
- setPowerShiftType(shift)
- Set the type of shifts used during the power iteration.
Logically collective.
This can be used to emulate the Rayleigh Quotient Iteration (RQI) method.
- Parameters
- shift (PowerShiftType <#slepc4py.SLEPc.EPS.PowerShiftType>) – The type of shift.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
This call is only relevant if the type was set to EPS.Type.POWER <#slepc4py.SLEPc.EPS.Type.POWER> with setType().
By default, shifts are constant (EPS.PowerShiftType.CONSTANT <#slepc4py.SLEPc.EPS.PowerShiftType.CONSTANT>) and the iteration is the simple power method (or inverse iteration if a shift-and-invert transformation is being used).
A variable shift can be specified (EPS.PowerShiftType.RAYLEIGH <#slepc4py.SLEPc.EPS.PowerShiftType.RAYLEIGH> or EPS.PowerShiftType.WILKINSON <#slepc4py.SLEPc.EPS.PowerShiftType.WILKINSON>). In this case, the iteration behaves rather like a cubic converging method as RQI.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1816 <slepc4py/SLEPc/EPS.pyx#L1816>`
- setProblemType(problem_type)
- Set the type of the eigenvalue problem.
Logically collective.
- Parameters
- problem_type (ProblemType <#slepc4py.SLEPc.EPS.ProblemType>) – The problem type to be set.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are: Hermitian (HEP), non-Hermitian (NHEP), generalized Hermitian (GHEP), generalized non-Hermitian (GNHEP), and generalized non-Hermitian with positive semi-definite B (PGNHEP).
This function must be used to instruct SLEPc to exploit symmetry. If no problem type is specified, by default a non-Hermitian problem is assumed (either standard or generalized). If the user knows that the problem is Hermitian (i.e. A=A^H) or generalized Hermitian (i.e. A=A^H, B=B^H, and B positive definite) then it is recommended to set the problem type so that eigensolver can exploit these properties.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:469 <slepc4py/SLEPc/EPS.pyx#L469>`
- setPurify(purify=True)
- Set (toggle) eigenvector purification.
Logically collective.
- Parameters
- purify (bool <https://docs.python.org/3/library/functions.html#bool>) – True to activate purification (default).
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:911 <slepc4py/SLEPc/EPS.pyx#L911>`
- setRG(rg)
- Set a region object associated to the eigensolver.
Collective.
- Parameters
- rg (RG <#slepc4py.SLEPc.RG>) – The region context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1185 <slepc4py/SLEPc/EPS.pyx#L1185>`
- setRQCGReset(nrest)
- Set the reset parameter of the RQCG iteration.
Logically collective.
Every nrest iterations the solver performs a Rayleigh-Ritz projection step.
- Parameters
- nrest (int <https://docs.python.org/3/library/functions.html#int>) – The number of iterations between resets.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2910 <slepc4py/SLEPc/EPS.pyx#L2910>`
- setST(st)
- Set a spectral transformation object associated to the eigensolver.
Collective.
- Parameters
- st (ST <#slepc4py.SLEPc.ST>) – The spectral transformation.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1098 <slepc4py/SLEPc/EPS.pyx#L1098>`
- setStoppingTest(stopping, args=None, kargs=None)
- Set when to stop the outer iteration of the eigensolver.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1333 <slepc4py/SLEPc/EPS.pyx#L1333>`
- stopping (EPSStoppingFunction <#slepc4py.typing.EPSStoppingFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setTarget(target)
- Set the value of the target.
Logically collective.
- Parameters
- target (Scalar <#slepc4py.typing.Scalar>) – The value of the target.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The target is a scalar value used to determine the portion of the spectrum of interest. It is used in combination with setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:753 <slepc4py/SLEPc/EPS.pyx#L753>`
- setThreshold(thres, rel=False)
- Set the threshold used in the threshold stopping test.
Logically collective.
- thres (float <https://docs.python.org/3/library/functions.html#float>) – The threshold.
- rel (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the threshold is relative or not.
Notes
This function internally sets a special stopping test based on the threshold, where eigenvalues are computed in sequence until one of the computed eigenvalues is below/above the threshold (depending on whether largest or smallest eigenvalues are computed).
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:709 <slepc4py/SLEPc/EPS.pyx#L709>`
- setTolerances(tol=None, max_it=None)
- Set the tolerance and max. iter. used by the default EPS convergence
tests.
Logically collective.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of iterations.
Notes
Use DECIDE <#slepc4py.SLEPc.DECIDE> for maxits to assign a reasonably good value, which is dependent on the solution method.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:843 <slepc4py/SLEPc/EPS.pyx#L843>`
- setTrackAll(trackall)
- Set if the solver must compute the residual of all approximate eigenpairs.
Logically collective.
- Parameters
- trackall (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether compute all residuals or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1000 <slepc4py/SLEPc/EPS.pyx#L1000>`
- setTrueResidual(trueres)
- Set if the solver must compute the true residual explicitly or not.
Logically collective.
- Parameters
- trueres (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether compute the true residual or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:971 <slepc4py/SLEPc/EPS.pyx#L971>`
- setTwoSided(twosided)
- Set to use a two-sided variant that also computes left eigenvectors.
Logically collective.
- Parameters
- twosided (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the two-sided variant is to be used or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:882 <slepc4py/SLEPc/EPS.pyx#L882>`
- setType(eps_type)
- Set the particular solver to be used in the EPS object.
Logically collective.
- Parameters
- eps_type (Type <#slepc4py.SLEPc.EPS.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The solver to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
See EPS.Type <#slepc4py.SLEPc.EPS.Type> for available methods. The default is EPS.Type.KRYLOVSCHUR <#slepc4py.SLEPc.EPS.Type.KRYLOVSCHUR>. Normally, it is best to use setFromOptions() and then set the EPS type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:340 <slepc4py/SLEPc/EPS.pyx#L340>`
- setUp()
- Set up all the internal data structures.
Collective.
Set up all the internal data structures necessary for the execution of the eigensolver.
Notes
This function need not be called explicitly in most cases, since solve() calls it. It can be useful when one wants to measure the set-up time separately from the solve time.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1450 <slepc4py/SLEPc/EPS.pyx#L1450>`
- setWhichEigenpairs(which)
- Set which portion of the spectrum is to be sought.
Logically collective.
- Parameters
- which (Which <#slepc4py.SLEPc.EPS.Which>) – The portion of the spectrum to be sought by the solver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Not all eigensolvers implemented in EPS account for all the possible values. Also, some values make sense only for certain types of problems. If SLEPc is compiled for real numbers EPS.Which.LARGEST_IMAGINARY <#slepc4py.SLEPc.EPS.Which.LARGEST_IMAGINARY> and EPS.Which.SMALLEST_IMAGINARY <#slepc4py.SLEPc.EPS.Which.SMALLEST_IMAGINARY> use the absolute value of the imaginary part for eigenvalue selection.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:668 <slepc4py/SLEPc/EPS.pyx#L668>`
- solve()
- Solve the eigensystem.
Collective.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1467 <slepc4py/SLEPc/EPS.pyx#L1467>`
- updateKrylovSchurSubcommMats(s=1.0, a=1.0, Au=None, t=1.0, b=1.0, Bu=None, structure=None, globalup=False)
- Update the eigenproblem matrices stored internally in the communicator.
Collective.
Update the eigenproblem matrices stored internally in the subcommunicator to which the calling process belongs.
- s (Scalar <#slepc4py.typing.Scalar>) – Scalar that multiplies the existing A matrix.
- a (Scalar <#slepc4py.typing.Scalar>) – Scalar used in the axpy operation on A.
- Au (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – The matrix used in the axpy operation on A.
- t (Scalar <#slepc4py.typing.Scalar>) – Scalar that multiplies the existing B matrix.
- b (Scalar <#slepc4py.typing.Scalar>) – Scalar used in the axpy operation on B.
- Bu (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – The matrix used in the axpy operation on B.
- structure (petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure> | None <https://docs.python.org/3/library/constants.html#None>) – Either same, different, or a subset of the non-zero sparsity pattern.
- globalup (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether global matrices must be updated or not.
Notes
This function modifies the eigenproblem matrices at subcommunicator level, and optionally updates the global matrices in the parent communicator. The updates are expressed as A \leftarrow s A + a Au, B \leftarrow t B + b Bu.
It is possible to update one of the matrices, or both.
The matrices Au and Bu must be equal in all subcommunicators.
The structure flag is passed to the petsc4py.PETSc.Mat.axpy <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat.axpy> operations to perform the updates.
If globalup is True, communication is carried out to reconstruct the updated matrices in the parent communicator.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:2279 <slepc4py/SLEPc/EPS.pyx#L2279>`
- valuesView(viewer=None)
- Display the computed eigenvalues in a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1784 <slepc4py/SLEPc/EPS.pyx#L1784>`
- vectorsView(viewer=None)
- Output computed eigenvectors to a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:1799 <slepc4py/SLEPc/EPS.pyx#L1799>`
- view(viewer=None)
- Print the EPS data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:290 <slepc4py/SLEPc/EPS.pyx#L290>`
Attributes Documentation
- bv
- The basis vectors (BV) object associated.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3427 <slepc4py/SLEPc/EPS.pyx#L3427>`
- ds
- The direct solver (DS) object associated.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3441 <slepc4py/SLEPc/EPS.pyx#L3441>`
- extraction
- The type of extraction technique to be employed.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3357 <slepc4py/SLEPc/EPS.pyx#L3357>`
- max_it
- The maximum iteration count.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3385 <slepc4py/SLEPc/EPS.pyx#L3385>`
- problem_type
- The type of the eigenvalue problem.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3350 <slepc4py/SLEPc/EPS.pyx#L3350>`
- purify
- Eigenvector purification.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3406 <slepc4py/SLEPc/EPS.pyx#L3406>`
- rg
- The region (RG) object associated.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3434 <slepc4py/SLEPc/EPS.pyx#L3434>`
- st
- The spectral transformation (ST) object associated.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3420 <slepc4py/SLEPc/EPS.pyx#L3420>`
- target
- The value of the target.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3371 <slepc4py/SLEPc/EPS.pyx#L3371>`
- tol
- The tolerance.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3378 <slepc4py/SLEPc/EPS.pyx#L3378>`
- track_all
- Compute the residual norm of all approximate eigenpairs.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3413 <slepc4py/SLEPc/EPS.pyx#L3413>`
- true_residual
- Compute the true residual explicitly.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3399 <slepc4py/SLEPc/EPS.pyx#L3399>`
- two_sided
- Two-sided that also computes left eigenvectors.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3392 <slepc4py/SLEPc/EPS.pyx#L3392>`
- which
- The portion of the spectrum to be sought.
:sources:`Source code at slepc4py/SLEPc/EPS.pyx:3364 <slepc4py/SLEPc/EPS.pyx#L3364>`
slepc4py.SLEPc.EPSKrylovSchurBSEType¶
- class slepc4py.SLEPc.EPSKrylovSchurBSEType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
EPS Krylov-Schur method for BSE problems.
- SHAO: Lanczos recurrence for H square.
- GRUNING: Lanczos recurrence for H.
- PROJECTEDBSE: Lanczos where the projected problem has BSE structure.
Attributes Summary
| GRUNING | Constant GRUNING of type int <https://docs.python.org/3/library/functions.html#int> |
| PROJECTEDBSE | Constant PROJECTEDBSE of type int <https://docs.python.org/3/library/functions.html#int> |
| SHAO | Constant SHAO of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.FN¶
- class slepc4py.SLEPc.FN
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
FN.
Enumerations
CombineType <#slepc4py.SLEPc.FN.CombineType> FN type of combination of child functions. ParallelType <#slepc4py.SLEPc.FN.ParallelType> FN parallel types. Type <#slepc4py.SLEPc.FN.Type> FN type.
slepc4py.SLEPc.FN.CombineType¶
- class slepc4py.SLEPc.FN.CombineType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
FN type of combination of child functions.
- ADD: Addition f(x) = f1(x)+f2(x)
- MULTIPLY: Multiplication f(x) = f1(x)*f2(x)
- DIVIDE: Division f(x) = f1(x)/f2(x)
- COMPOSE: Composition f(x) = f2(f1(x))
Attributes Summary
| ADD | Constant ADD of type int <https://docs.python.org/3/library/functions.html#int> |
| COMPOSE | Constant COMPOSE of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVIDE | Constant DIVIDE of type int <https://docs.python.org/3/library/functions.html#int> |
| MULTIPLY | Constant MULTIPLY of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.FN.ParallelType¶
- class slepc4py.SLEPc.FN.ParallelType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
FN parallel types.
- REDUNDANT: Every process performs the computation redundantly.
- SYNCHRONIZED: The first process sends the result to the rest.
Attributes Summary
| REDUNDANT | Constant REDUNDANT of type int <https://docs.python.org/3/library/functions.html#int> |
| SYNCHRONIZED | Constant SYNCHRONIZED of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.FN.Type¶
- class slepc4py.SLEPc.FN.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
FN type.
Attributes Summary
COMBINE Object COMBINE of type str <https://docs.python.org/3/library/stdtypes.html#str> EXP Object EXP of type str <https://docs.python.org/3/library/stdtypes.html#str> INVSQRT Object INVSQRT of type str <https://docs.python.org/3/library/stdtypes.html#str> LOG Object LOG of type str <https://docs.python.org/3/library/stdtypes.html#str> PHI Object PHI of type str <https://docs.python.org/3/library/stdtypes.html#str> RATIONAL Object RATIONAL of type str <https://docs.python.org/3/library/stdtypes.html#str> SQRT Object SQRT of type str <https://docs.python.org/3/library/stdtypes.html#str> Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all FN options in the database. |
| create([comm]) | Create the FN object. |
| destroy() | Destroy the FN object. |
| duplicate([comm]) | Duplicate the FN object copying all parameters. |
| evaluateDerivative(x) | Compute the value of the derivative f'(x) for a given x. |
| evaluateFunction(x) | Compute the value of the function f(x) for a given x. |
| evaluateFunctionMat(A[, B]) | Compute the value of the function f(A) for a given matrix A. |
| evaluateFunctionMatVec(A[, v]) | Compute the first column of the matrix f(A) for a given matrix A. |
| getCombineChildren() | Get the two child functions that constitute this combined function. |
| getMethod() | Get the method currently used for matrix functions. |
| getOptionsPrefix() | Get the prefix used for searching for all FN options in the database. |
| getParallel() | Get the mode of operation in parallel runs. |
| getPhiIndex() | Get the index of the phi-function. |
| getRationalDenominator() | Get the coefficients of the denominator of the rational function. |
| getRationalNumerator() | Get the coefficients of the numerator of the rational function. |
| getScale() | Get the scaling parameters that define the matematical function. |
| getType() | Get the FN type of this object. |
| setCombineChildren(comb, f1, f2) | Set the two child functions that constitute this combined function. |
| setFromOptions() | Set FN options from the options database. |
| setMethod(meth) | Set the method to be used to evaluate functions of matrices. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all FN options in the database. |
| setParallel(pmode) | Set the mode of operation in parallel runs. |
| setPhiIndex(k) | Set the index of the phi-function. |
| setRationalDenominator(alpha) | Set the coefficients of the denominator of the rational function. |
| setRationalNumerator(alpha) | Set the coefficients of the numerator of the rational function. |
| setScale([alpha, beta]) | Set the scaling parameters that define the matematical function. |
| setType(fn_type) | Set the type for the FN object. |
| view([viewer]) | Print the FN data structure. |
Attributes Summary
| method | The method to be used to evaluate functions of matrices. |
| parallel | The mode of operation in parallel runs. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all FN options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all FN option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:212 <slepc4py/SLEPc/FN.pyx#L212>`
- create(comm=None)
- Create the FN object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:144 <slepc4py/SLEPc/FN.pyx#L144>`
- destroy()
- Destroy the FN object.
Collective.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:134 <slepc4py/SLEPc/FN.pyx#L134>`
- duplicate(comm=None)
- Duplicate the FN object copying all parameters.
Collective.
Duplicate the FN object copying all parameters, possibly with a different communicator.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to the object’s communicator.
- Return type
- FN <#slepc4py.SLEPc.FN>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:255 <slepc4py/SLEPc/FN.pyx#L255>`
- evaluateDerivative(x)
- Compute the value of the derivative f'(x) for a given x.
Not collective.
- Parameters
- x (Scalar <#slepc4py.typing.Scalar>) – Value where the derivative must be evaluated.
- Returns
- The result of f'(x).
- Return type
- Scalar <#slepc4py.typing.Scalar>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:298 <slepc4py/SLEPc/FN.pyx#L298>`
- evaluateFunction(x)
- Compute the value of the function f(x) for a given x.
Not collective.
- Parameters
- x (Scalar <#slepc4py.typing.Scalar>) – Value where the function must be evaluated.
- Returns
- The result of f(x).
- Return type
- Scalar <#slepc4py.typing.Scalar>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:277 <slepc4py/SLEPc/FN.pyx#L277>`
- evaluateFunctionMat(A, B=None)
- Compute the value of the function f(A) for a given matrix A.
Logically collective.
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – Matrix on which the function must be evaluated.
- B (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the result.
- Returns
- The result of f(A).
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:319 <slepc4py/SLEPc/FN.pyx#L319>`
- evaluateFunctionMatVec(A, v=None)
- Compute the first column of the matrix f(A) for a given matrix A.
Logically collective.
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – Matrix on which the function must be evaluated.
- v (petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>)
- Returns
- The first column of the result f(A).
- Return type
- petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:341 <slepc4py/SLEPc/FN.pyx#L341>`
- getCombineChildren()
- Get the two child functions that constitute this combined function.
Not collective.
Get the two child functions that constitute this combined function, and the way they must be combined.
- comb (CombineType <#slepc4py.SLEPc.FN.CombineType>) – How to combine the functions (addition, multiplication, division, composition).
- f1 (FN) – First function.
- f2 (FN) – Second function.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[CombineType <#slepc4py.SLEPc.FN.CombineType>, FN <#slepc4py.SLEPc.FN>, FN <#slepc4py.SLEPc.FN>]
:sources:`Source code at slepc4py/SLEPc/FN.pyx:564 <slepc4py/SLEPc/FN.pyx#L564>`
- getMethod()
- Get the method currently used for matrix functions.
Not collective.
- Returns
- An index identifying the method.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:422 <slepc4py/SLEPc/FN.pyx#L422>`
- getOptionsPrefix()
- Get the prefix used for searching for all FN options in the database.
Not collective.
- Returns
- The prefix string set for this FN object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:227 <slepc4py/SLEPc/FN.pyx#L227>`
- getParallel()
- Get the mode of operation in parallel runs.
Not collective.
- Returns
- The parallel mode.
- Return type
- ParallelType <#slepc4py.SLEPc.FN.ParallelType>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:451 <slepc4py/SLEPc/FN.pyx#L451>`
- getPhiIndex()
- Get the index of the phi-function.
Not collective.
- Returns
- The index.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:605 <slepc4py/SLEPc/FN.pyx#L605>`
- getRationalDenominator()
- Get the coefficients of the denominator of the rational function.
Not collective.
- Returns
- Coefficients.
- Return type
- ArrayScalar <#slepc4py.typing.ArrayScalar>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:521 <slepc4py/SLEPc/FN.pyx#L521>`
- getRationalNumerator()
- Get the coefficients of the numerator of the rational function.
Not collective.
- Returns
- Coefficients.
- Return type
- ArrayScalar <#slepc4py.typing.ArrayScalar>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:484 <slepc4py/SLEPc/FN.pyx#L484>`
- getScale()
- Get the scaling parameters that define the matematical function.
Not collective.
- alpha (Scalar <#slepc4py.typing.Scalar>) – Inner scaling (argument).
- beta (Scalar <#slepc4py.typing.Scalar>) – Outer scaling (result).
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scalar <#slepc4py.typing.Scalar>, Scalar <#slepc4py.typing.Scalar>]
:sources:`Source code at slepc4py/SLEPc/FN.pyx:380 <slepc4py/SLEPc/FN.pyx#L380>`
- getType()
- Get the FN type of this object.
Not collective.
- Returns
- The inner product type currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:176 <slepc4py/SLEPc/FN.pyx#L176>`
- setCombineChildren(comb, f1, f2)
- Set the two child functions that constitute this combined function.
Logically collective.
Set the two child functions that constitute this combined function, and the way they must be combined.
- comb (CombineType <#slepc4py.SLEPc.FN.CombineType>) – How to combine the functions (addition, multiplication, division, composition).
- f1 (FN <#slepc4py.SLEPc.FN>) – First function.
- f2 (FN <#slepc4py.SLEPc.FN>) – Second function.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:542 <slepc4py/SLEPc/FN.pyx#L542>`
- setFromOptions()
- Set FN options from the options database.
Collective.
Notes
To see all options, run your program with the -help option.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:242 <slepc4py/SLEPc/FN.pyx#L242>`
- setMethod(meth)
- Set the method to be used to evaluate functions of matrices.
Logically collective.
- Parameters
- meth (int <https://docs.python.org/3/library/functions.html#int>) – An index identifying the method.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
In some FN types there are more than one algorithms available for computing matrix functions. In that case, this function allows choosing the wanted method.
If meth is currently set to 0 and the input argument of FN.evaluateFunctionMat() is a symmetric/Hermitian matrix, then the computation is done via the eigendecomposition, rather than with the general algorithm.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:397 <slepc4py/SLEPc/FN.pyx#L397>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all FN options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all FN option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:191 <slepc4py/SLEPc/FN.pyx#L191>`
- setParallel(pmode)
- Set the mode of operation in parallel runs.
Logically collective.
- Parameters
- pmode (ParallelType <#slepc4py.SLEPc.FN.ParallelType>) – The parallel mode.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:437 <slepc4py/SLEPc/FN.pyx#L437>`
- setPhiIndex(k)
- Set the index of the phi-function.
Logically collective.
- Parameters
- k (int <https://docs.python.org/3/library/functions.html#int>) – The index.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:591 <slepc4py/SLEPc/FN.pyx#L591>`
- setRationalDenominator(alpha)
- Set the coefficients of the denominator of the rational function.
Logically collective.
- Parameters
- alpha (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#slepc4py.typing.Scalar>]) – Coefficients.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:505 <slepc4py/SLEPc/FN.pyx#L505>`
- setRationalNumerator(alpha)
- Set the coefficients of the numerator of the rational function.
Logically collective.
- Parameters
- alpha (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#slepc4py.typing.Scalar>]) – Coefficients.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:468 <slepc4py/SLEPc/FN.pyx#L468>`
- setScale(alpha=None, beta=None)
- Set the scaling parameters that define the matematical function.
Logically collective.
- alpha (Scalar <#slepc4py.typing.Scalar> | None <https://docs.python.org/3/library/constants.html#None>) – Inner scaling (argument), default is 1.0.
- beta (Scalar <#slepc4py.typing.Scalar> | None <https://docs.python.org/3/library/constants.html#None>) – Outer scaling (result), default is 1.0.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:361 <slepc4py/SLEPc/FN.pyx#L361>`
- setType(fn_type)
- Set the type for the FN object.
Logically collective.
- Parameters
- fn_type (Type <#slepc4py.SLEPc.FN.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The inner product type to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:161 <slepc4py/SLEPc/FN.pyx#L161>`
- view(viewer=None)
- Print the FN data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/FN.pyx:119 <slepc4py/SLEPc/FN.pyx#L119>`
Attributes Documentation
- method
- The method to be used to evaluate functions of matrices.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:622 <slepc4py/SLEPc/FN.pyx#L622>`
- parallel
- The mode of operation in parallel runs.
:sources:`Source code at slepc4py/SLEPc/FN.pyx:629 <slepc4py/SLEPc/FN.pyx#L629>`
slepc4py.SLEPc.LME¶
- class slepc4py.SLEPc.LME
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
LME.
Enumerations
ConvergedReason <#slepc4py.SLEPc.LME.ConvergedReason> LME convergence reasons. ProblemType <#slepc4py.SLEPc.LME.ProblemType> LME problem type. Type <#slepc4py.SLEPc.LME.Type> LME type.
slepc4py.SLEPc.LME.ConvergedReason¶
- class slepc4py.SLEPc.LME.ConvergedReason
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
LME convergence reasons.
- CONVERGED_TOL: All eigenpairs converged to requested tolerance.
- DIVERGED_ITS: Maximum number of iterations exceeded.
- DIVERGED_BREAKDOWN: Solver failed due to breakdown.
- CONVERGED_ITERATING: Iteration not finished yet.
Attributes Summary
| CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_TOL | Constant CONVERGED_TOL of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_BREAKDOWN | Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_ITS | Constant DIVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int> |
| ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.LME.ProblemType¶
- class slepc4py.SLEPc.LME.ProblemType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
LME problem type.
- LYAPUNOV: Continuous-time Lyapunov.
- SYLVESTER: Continuous-time Sylvester.
- GEN_LYAPUNOV: Generalized Lyapunov.
- GEN_SYLVESTER: Generalized Sylvester.
- DT_LYAPUNOV: Discrete-time Lyapunov.
- STEIN: Stein.
Attributes Summary
| DT_LYAPUNOV | Constant DT_LYAPUNOV of type int <https://docs.python.org/3/library/functions.html#int> |
| GEN_LYAPUNOV | Constant GEN_LYAPUNOV of type int <https://docs.python.org/3/library/functions.html#int> |
| GEN_SYLVESTER | Constant GEN_SYLVESTER of type int <https://docs.python.org/3/library/functions.html#int> |
| LYAPUNOV | Constant LYAPUNOV of type int <https://docs.python.org/3/library/functions.html#int> |
| STEIN | Constant STEIN of type int <https://docs.python.org/3/library/functions.html#int> |
| SYLVESTER | Constant SYLVESTER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.LME.Type¶
- class slepc4py.SLEPc.LME.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
LME type.
- •
- KRYLOV: Restarted Krylov solver.
Attributes Summary
| KRYLOV | Object KRYLOV of type str <https://docs.python.org/3/library/stdtypes.html#str> |
Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching in the database. |
| cancelMonitor() | Clear all monitors for an LME object. |
| computeError() | Compute the error associated with the last equation solved. |
| create([comm]) | Create the LME object. |
| destroy() | Destroy the LME object. |
| getBV() | Get the basis vector object associated to the LME object. |
| getCoefficients() | Get the coefficient matrices of the matrix equation. |
| getConvergedReason() | Get the reason why the solve() iteration was stopped. |
| getDimensions() | Get the dimension of the subspace used by the solver. |
| getErrorEstimate() | Get the error estimate obtained during solve. |
| getErrorIfNotConverged() | Get if solve() generates an error if the solver does not converge. |
| getIterationNumber() | Get the current iteration number. |
| getMonitor() | Get the list of monitor functions. |
| getOptionsPrefix() | Get the prefix used for searching for all LME options in the database. |
| getProblemType() | Get the LME problem type of this object. |
| getRHS() | Get the right-hand side of the matrix equation. |
| getSolution() | Get the solution of the matrix equation. |
| getTolerances() | Get the tolerance and maximum iteration count. |
| getType() | Get the LME type of this object. |
| reset() | Reset the LME object. |
| setBV(bv) | Set a basis vector object to the LME object. |
| setCoefficients(A[, B, D, E]) | Set the coefficient matrices. |
| setDimensions(ncv) | Set the dimension of the subspace to be used by the solver. |
| setErrorIfNotConverged([flg]) | Set solve() to generate an error if the solver has not converged. |
| setFromOptions() | Set LME options from the options database. |
| setMonitor(monitor[, args, kargs]) | Append a monitor function to the list of monitors. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all LME options in the database. |
| setProblemType(lme_problem_type) | Set the LME problem type of this object. |
| setRHS(C) | Set the right-hand side of the matrix equation. |
| setSolution(X) | Set the placeholder for the solution of the matrix equation. |
| setTolerances([tol, max_it]) | Set the tolerance and maximum iteration count. |
| setType(lme_type) | Set the particular solver to be used in the LME object. |
| setUp() | Set up all the internal necessary data structures. |
| solve() | Solve the linear matrix equation. |
| view([viewer]) | Print the LME data structure. |
Attributes Summary
| bv | The basis vectors (BV) object associated to the LME object. |
| fn | The math function (FN) object associated to the LME object. |
| max_it | The maximum iteration count used by the LME convergence tests. |
| tol | The tolerance value used by the LME convergence tests. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching in the database.
Logically collective.
Append to the prefix used for searching for all LME options in the database.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all LME option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:350 <slepc4py/SLEPc/LME.pyx#L350>`
- cancelMonitor()
- Clear all monitors for an LME object.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:508 <slepc4py/SLEPc/LME.pyx#L508>`
- computeError()
- Compute the error associated with the last equation solved.
Collective.
Computes the error (based on the residual norm) associated with the last equation solved.
- Returns
- The error
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:302 <slepc4py/SLEPc/LME.pyx#L302>`
- create(comm=None)
- Create the LME object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator. If not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:91 <slepc4py/SLEPc/LME.pyx#L91>`
- destroy()
- Destroy the LME object.
Collective.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:73 <slepc4py/SLEPc/LME.pyx#L73>`
- getBV()
- Get the basis vector object associated to the LME object.
Not collective.
- Returns
- The basis vectors context.
- Return type
- BV <#slepc4py.SLEPc.BV>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:452 <slepc4py/SLEPc/LME.pyx#L452>`
- getCoefficients()
- Get the coefficient matrices of the matrix equation.
Collective.
- A – First coefficient matrix
- B – Second coefficient matrix, if available
- D – Third coefficient matrix, if available
- E – Fourth coefficient matrix, if available
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>, Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>, Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>]
:sources:`Source code at slepc4py/SLEPc/LME.pyx:193 <slepc4py/SLEPc/LME.pyx#L193>`
- getConvergedReason()
- Get the reason why the solve() iteration was stopped.
Not collective.
- Returns
- Negative value indicates diverged, positive value converged.
- Return type
- ConvergedReason <#slepc4py.SLEPc.LME.ConvergedReason>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:552 <slepc4py/SLEPc/LME.pyx#L552>`
- getDimensions()
- Get the dimension of the subspace used by the solver.
Not collective.
- Returns
- Maximum dimension of the subspace to be used by the solver.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:423 <slepc4py/SLEPc/LME.pyx#L423>`
- getErrorEstimate()
- Get the error estimate obtained during solve.
Not collective.
- Returns
- The error estimate
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:287 <slepc4py/SLEPc/LME.pyx#L287>`
- getErrorIfNotConverged()
- Get if solve() generates an error if the solver does not converge.
Not collective.
Get a flag indicating whether solve() will generate an error if the solver does not converge.
- Returns
- True indicates you want the error generated.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:581 <slepc4py/SLEPc/LME.pyx#L581>`
- getIterationNumber()
- Get the current iteration number.
Not collective.
If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.
- Returns
- Iteration number.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:534 <slepc4py/SLEPc/LME.pyx#L534>`
- getMonitor()
- Get the list of monitor functions.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:502 <slepc4py/SLEPc/LME.pyx#L502>`
- Return type
- LMEMonitorFunction <#slepc4py.typing.LMEMonitorFunction>
- getOptionsPrefix()
- Get the prefix used for searching for all LME options in the database.
Not collective.
- Returns
- The prefix string set for this LME object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:320 <slepc4py/SLEPc/LME.pyx#L320>`
- getProblemType()
- Get the LME problem type of this object.
Not collective.
- Returns
- The problem type currently being used.
- Return type
- ProblemType <#slepc4py.SLEPc.LME.ProblemType>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:152 <slepc4py/SLEPc/LME.pyx#L152>`
- getRHS()
- Get the right-hand side of the matrix equation.
Collective.
- Returns
- The low-rank matrix
- Return type
- C <#slepc4py.SLEPc.DS.MatType.C>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:239 <slepc4py/SLEPc/LME.pyx#L239>`
- getSolution()
- Get the solution of the matrix equation.
Collective.
- Returns
- The low-rank matrix
- Return type
- X <#slepc4py.SLEPc.DS.MatType.X>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:271 <slepc4py/SLEPc/LME.pyx#L271>`
- getTolerances()
- Get the tolerance and maximum iteration count.
Not collective.
Get the tolerance and maximum iteration count used by the default LME convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of iterations
:sources:`Source code at slepc4py/SLEPc/LME.pyx:380 <slepc4py/SLEPc/LME.pyx#L380>`
- getType()
- Get the LME type of this object.
Not collective.
- Returns
- The solver currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:123 <slepc4py/SLEPc/LME.pyx#L123>`
- reset()
- Reset the LME object.
Collective.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:83 <slepc4py/SLEPc/LME.pyx#L83>`
- setBV(bv)
- Set a basis vector object to the LME object.
Collective.
- Parameters
- bv (BV <#slepc4py.SLEPc.BV>) – The basis vectors context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:468 <slepc4py/SLEPc/LME.pyx#L468>`
- setCoefficients(A, B=None, D=None, E=None)
- Set the coefficient matrices.
Collective.
Set the coefficient matrices that define the linear matrix equation to be solved.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – First coefficient matrix
- B (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – Second coefficient matrix, optional
- D (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – Third coefficient matrix, optional
- E (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – Fourth coefficient matrix, optional
:sources:`Source code at slepc4py/SLEPc/LME.pyx:167 <slepc4py/SLEPc/LME.pyx#L167>`
- setDimensions(ncv)
- Set the dimension of the subspace to be used by the solver.
Logically collective.
- Parameters
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:438 <slepc4py/SLEPc/LME.pyx#L438>`
- setErrorIfNotConverged(flg=True)
- Set solve() to generate an error if the solver has not converged.
Logically collective.
- Parameters
- flg (bool <https://docs.python.org/3/library/functions.html#bool>) – True indicates you want the error generated.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:567 <slepc4py/SLEPc/LME.pyx#L567>`
- setFromOptions()
- Set LME options from the options database.
Collective.
Sets LME options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:368 <slepc4py/SLEPc/LME.pyx#L368>`
- setMonitor(monitor, args=None, kargs=None)
- Append a monitor function to the list of monitors.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:481 <slepc4py/SLEPc/LME.pyx#L481>`
- monitor (LMEMonitorFunction <#slepc4py.typing.LMEMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all LME options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all LME option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:335 <slepc4py/SLEPc/LME.pyx#L335>`
- setProblemType(lme_problem_type)
- Set the LME problem type of this object.
Logically collective.
- Parameters
- lme_problem_type (ProblemType <#slepc4py.SLEPc.LME.ProblemType> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The problem type to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:138 <slepc4py/SLEPc/LME.pyx#L138>`
- setRHS(C)
- Set the right-hand side of the matrix equation.
Collective.
Set the right-hand side of the matrix equation, as a low-rank matrix.
- Parameters
- C (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The right-hand side matrix
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:223 <slepc4py/SLEPc/LME.pyx#L223>`
- setSolution(X)
- Set the placeholder for the solution of the matrix equation.
Collective.
Set the placeholder for the solution of the matrix equation, as a low-rank matrix.
- Parameters
- X (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The solution matrix
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:255 <slepc4py/SLEPc/LME.pyx#L255>`
- setTolerances(tol=None, max_it=None)
- Set the tolerance and maximum iteration count.
Logically collective.
Set the tolerance and maximum iteration count used by the default LME convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of iterations
:sources:`Source code at slepc4py/SLEPc/LME.pyx:401 <slepc4py/SLEPc/LME.pyx#L401>`
- setType(lme_type)
- Set the particular solver to be used in the LME object.
Logically collective.
- Parameters
- lme_type (Type <#slepc4py.SLEPc.LME.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The solver to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:108 <slepc4py/SLEPc/LME.pyx#L108>`
- setUp()
- Set up all the internal necessary data structures.
Collective.
Set up all the internal data structures necessary for the execution of the eigensolver.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:515 <slepc4py/SLEPc/LME.pyx#L515>`
- solve()
- Solve the linear matrix equation.
Collective.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:526 <slepc4py/SLEPc/LME.pyx#L526>`
- view(viewer=None)
- Print the LME data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/LME.pyx:58 <slepc4py/SLEPc/LME.pyx#L58>`
Attributes Documentation
- bv
- The basis vectors (BV) object associated to the LME object.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:622 <slepc4py/SLEPc/LME.pyx#L622>`
- fn
- The math function (FN) object associated to the LME object.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:615 <slepc4py/SLEPc/LME.pyx#L615>`
- max_it
- The maximum iteration count used by the LME convergence tests.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:608 <slepc4py/SLEPc/LME.pyx#L608>`
- tol
- The tolerance value used by the LME convergence tests.
:sources:`Source code at slepc4py/SLEPc/LME.pyx:601 <slepc4py/SLEPc/LME.pyx#L601>`
slepc4py.SLEPc.MFN¶
- class slepc4py.SLEPc.MFN
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
MFN.
Enumerations
ConvergedReason <#slepc4py.SLEPc.MFN.ConvergedReason> MFN convergence reasons. Type <#slepc4py.SLEPc.MFN.Type> MFN type.
slepc4py.SLEPc.MFN.ConvergedReason¶
- class slepc4py.SLEPc.MFN.ConvergedReason
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
MFN convergence reasons.
- ‘MFN_CONVERGED_TOL’: All eigenpairs converged to requested tolerance.
- ‘MFN_CONVERGED_ITS’: Solver completed the requested number of steps.
- ‘MFN_DIVERGED_ITS’: Maximum number of iterations exceeded.
- ‘MFN_DIVERGED_BREAKDOWN’: Generic breakdown in method.
Attributes Summary
| CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_ITS | Constant CONVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_TOL | Constant CONVERGED_TOL of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_BREAKDOWN | Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_ITS | Constant DIVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int> |
| ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.MFN.Type¶
- class slepc4py.SLEPc.MFN.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
MFN type.
Action of a matrix function on a vector.
- KRYLOV: Restarted Krylov solver.
- EXPOKIT: Implementation of the method in Expokit.
Attributes Summary
| EXPOKIT | Object EXPOKIT of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| KRYLOV | Object KRYLOV of type str <https://docs.python.org/3/library/stdtypes.html#str> |
Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all MFN options in the database. |
| cancelMonitor() | Clear all monitors for an MFN object. |
| create([comm]) | Create the MFN object. |
| destroy() | Destroy the MFN object. |
| getBV() | Get the basis vector object associated to the MFN object. |
| getConvergedReason() | Get the reason why the solve() iteration was stopped. |
| getDimensions() | Get the dimension of the subspace used by the solver. |
| getErrorIfNotConverged() | Get if solve() generates an error if the solver does not converge. |
| getFN() | Get the math function object associated to the MFN object. |
| getIterationNumber() | Get the current iteration number. |
| getMonitor() | Get the list of monitor functions. |
| getOperator() | Get the matrix associated with the MFN object. |
| getOptionsPrefix() | Get the prefix used for searching for all MFN options in the database. |
| getTolerances() | Get the tolerance and maximum iteration count. |
| getType() | Get the MFN type of this object. |
| reset() | Reset the MFN object. |
| setBV(bv) | Set a basis vector object associated to the MFN object. |
| setDimensions(ncv) | Set the dimension of the subspace to be used by the solver. |
| setErrorIfNotConverged([flg]) | Set solve() to generate an error if the solver does not converge. |
| setFN(fn) | Set a math function object associated to the MFN object. |
| setFromOptions() | Set MFN options from the options database. |
| setMonitor(monitor[, args, kargs]) | Append a monitor function to the list of monitors. |
| setOperator(A) | Set the matrix associated with the MFN object. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all MFN options in the database. |
| setTolerances([tol, max_it]) | Set the tolerance and maximum iteration count. |
| setType(mfn_type) | Set the particular solver to be used in the MFN object. |
| setUp() | Set up all the necessary internal data structures. |
| solve(b, x) | Solve the matrix function problem. |
| solveTranspose(b, x) | Solve the transpose matrix function problem. |
| view([viewer]) | Print the MFN data structure. |
Attributes Summary
| bv | The basis vectors (BV) object associated to the MFN object. |
| fn | The math function (FN) object associated to the MFN object. |
| max_it | The maximum iteration count used by the MFN convergence tests. |
| tol | The tolerance count used by the MFN convergence tests. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all MFN options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all MFN option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:154 <slepc4py/SLEPc/MFN.pyx#L154>`
- cancelMonitor()
- Clear all monitors for an MFN object.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:367 <slepc4py/SLEPc/MFN.pyx#L367>`
- create(comm=None)
- Create the MFN object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator. If not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:77 <slepc4py/SLEPc/MFN.pyx#L77>`
- destroy()
- Destroy the MFN object.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:59 <slepc4py/SLEPc/MFN.pyx#L59>`
- getBV()
- Get the basis vector object associated to the MFN object.
Not collective.
- Returns
- The basis vectors context.
- Return type
- BV <#slepc4py.SLEPc.BV>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:282 <slepc4py/SLEPc/MFN.pyx#L282>`
- getConvergedReason()
- Get the reason why the solve() iteration was stopped.
Not collective.
- Returns
- Negative value indicates diverged, positive value converged.
- Return type
- ConvergedReason <#slepc4py.SLEPc.MFN.ConvergedReason>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:444 <slepc4py/SLEPc/MFN.pyx#L444>`
- getDimensions()
- Get the dimension of the subspace used by the solver.
Not collective.
- Returns
- Maximum dimension of the subspace to be used by the solver.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:224 <slepc4py/SLEPc/MFN.pyx#L224>`
- getErrorIfNotConverged()
- Get if solve() generates an error if the solver does not converge.
Not collective.
Get a flag indicating whether solve() will generate an error if the solver does not converge.
- Returns
- True indicates you want the error generated.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:473 <slepc4py/SLEPc/MFN.pyx#L473>`
- getFN()
- Get the math function object associated to the MFN object.
Not collective.
- Returns
- The math function context.
- Return type
- FN <#slepc4py.SLEPc.FN>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:253 <slepc4py/SLEPc/MFN.pyx#L253>`
- getIterationNumber()
- Get the current iteration number.
Not collective.
Get the current iteration number. If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.
- Returns
- Iteration number.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:425 <slepc4py/SLEPc/MFN.pyx#L425>`
- getMonitor()
- Get the list of monitor functions.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:363 <slepc4py/SLEPc/MFN.pyx#L363>`
- Return type
- MFNMonitorFunction <#slepc4py.typing.MFNMonitorFunction>
- getOperator()
- Get the matrix associated with the MFN object.
Collective.
- Returns
- The matrix for which the matrix function is to be computed.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:311 <slepc4py/SLEPc/MFN.pyx#L311>`
- getOptionsPrefix()
- Get the prefix used for searching for all MFN options in the database.
Not collective.
- Returns
- The prefix string set for this MFN object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:124 <slepc4py/SLEPc/MFN.pyx#L124>`
- getTolerances()
- Get the tolerance and maximum iteration count.
Not collective.
Get the tolerance and maximum iteration count used by the default MFN convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of iterations
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:181 <slepc4py/SLEPc/MFN.pyx#L181>`
- getType()
- Get the MFN type of this object.
Not collective.
- Returns
- The solver currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:109 <slepc4py/SLEPc/MFN.pyx#L109>`
- reset()
- Reset the MFN object.
Collective.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:69 <slepc4py/SLEPc/MFN.pyx#L69>`
- setBV(bv)
- Set a basis vector object associated to the MFN object.
Collective.
- Parameters
- bv (BV <#slepc4py.SLEPc.BV>) – The basis vectors context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:298 <slepc4py/SLEPc/MFN.pyx#L298>`
- setDimensions(ncv)
- Set the dimension of the subspace to be used by the solver.
Logically collective.
- Parameters
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:239 <slepc4py/SLEPc/MFN.pyx#L239>`
- setErrorIfNotConverged(flg=True)
- Set solve() to generate an error if the solver does not converge.
Logically collective.
- Parameters
- flg (bool <https://docs.python.org/3/library/functions.html#bool>) – True indicates you want the error generated.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:459 <slepc4py/SLEPc/MFN.pyx#L459>`
- setFN(fn)
- Set a math function object associated to the MFN object.
Collective.
- Parameters
- fn (FN <#slepc4py.SLEPc.FN>) – The math function context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:269 <slepc4py/SLEPc/MFN.pyx#L269>`
- setFromOptions()
- Set MFN options from the options database.
Collective.
Set MFN options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:169 <slepc4py/SLEPc/MFN.pyx#L169>`
- setMonitor(monitor, args=None, kargs=None)
- Append a monitor function to the list of monitors.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:342 <slepc4py/SLEPc/MFN.pyx#L342>`
- monitor (MFNMonitorFunction <#slepc4py.typing.MFNMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setOperator(A)
- Set the matrix associated with the MFN object.
Collective.
- Parameters
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The problem matrix.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:327 <slepc4py/SLEPc/MFN.pyx#L327>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all MFN options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all MFN option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:139 <slepc4py/SLEPc/MFN.pyx#L139>`
- setTolerances(tol=None, max_it=None)
- Set the tolerance and maximum iteration count.
Logically collective.
Set the tolerance and maximum iteration count used by the default MFN convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of iterations
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:202 <slepc4py/SLEPc/MFN.pyx#L202>`
- setType(mfn_type)
- Set the particular solver to be used in the MFN object.
Logically collective.
- Parameters
- mfn_type (Type <#slepc4py.SLEPc.MFN.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The solver to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:94 <slepc4py/SLEPc/MFN.pyx#L94>`
- setUp()
- Set up all the necessary internal data structures.
Collective.
Set up all the internal data structures necessary for the execution of the eigensolver.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:378 <slepc4py/SLEPc/MFN.pyx#L378>`
- solve(b, x)
- Solve the matrix function problem.
Collective.
Given a vector b, the vector x = f(A) b is returned.
- b (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The right hand side vector.
- x (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The solution.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:389 <slepc4py/SLEPc/MFN.pyx#L389>`
- solveTranspose(b, x)
- Solve the transpose matrix function problem.
Collective.
Given a vector b, the vector x = f(A^T) b is returned.
- b (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The right hand side vector.
- x (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The solution.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:407 <slepc4py/SLEPc/MFN.pyx#L407>`
- view(viewer=None)
- Print the MFN data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:44 <slepc4py/SLEPc/MFN.pyx#L44>`
Attributes Documentation
- bv
- The basis vectors (BV) object associated to the MFN object.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:514 <slepc4py/SLEPc/MFN.pyx#L514>`
- fn
- The math function (FN) object associated to the MFN object.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:507 <slepc4py/SLEPc/MFN.pyx#L507>`
- max_it
- The maximum iteration count used by the MFN convergence tests.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:500 <slepc4py/SLEPc/MFN.pyx#L500>`
- tol
- The tolerance count used by the MFN convergence tests.
:sources:`Source code at slepc4py/SLEPc/MFN.pyx:493 <slepc4py/SLEPc/MFN.pyx#L493>`
slepc4py.SLEPc.NEP¶
- class slepc4py.SLEPc.NEP
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
NEP.
Enumerations
CISSExtraction <#slepc4py.SLEPc.NEP.CISSExtraction> NEP CISS extraction technique. Conv <#slepc4py.SLEPc.NEP.Conv> NEP convergence test. ConvergedReason <#slepc4py.SLEPc.NEP.ConvergedReason> NEP convergence reasons. ErrorType <#slepc4py.SLEPc.NEP.ErrorType> NEP error type to assess accuracy of computed solutions. ProblemType <#slepc4py.SLEPc.NEP.ProblemType> NEP problem type. Refine <#slepc4py.SLEPc.NEP.Refine> NEP refinement strategy. RefineScheme <#slepc4py.SLEPc.NEP.RefineScheme> NEP scheme for solving linear systems during iterative refinement. Stop <#slepc4py.SLEPc.NEP.Stop> NEP stopping test. Type <#slepc4py.SLEPc.NEP.Type> NEP type. Which <#slepc4py.SLEPc.NEP.Which> NEP desired part of spectrum.
slepc4py.SLEPc.NEP.CISSExtraction¶
- class slepc4py.SLEPc.NEP.CISSExtraction
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP CISS extraction technique.
- RITZ: Ritz extraction.
- HANKEL: Extraction via Hankel eigenproblem.
- CAA: Communication-avoiding Arnoldi.
Attributes Summary
| CAA | Constant CAA of type int <https://docs.python.org/3/library/functions.html#int> |
| HANKEL | Constant HANKEL of type int <https://docs.python.org/3/library/functions.html#int> |
| RITZ | Constant RITZ of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.Conv¶
- class slepc4py.SLEPc.NEP.Conv
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP convergence test.
- ABS: Absolute convergence test.
- REL: Convergence test relative to the eigenvalue.
- NORM: Convergence test relative to the matrix norms.
- USER: User-defined convergence test.
Attributes Summary
| ABS | Constant ABS of type int <https://docs.python.org/3/library/functions.html#int> |
| NORM | Constant NORM of type int <https://docs.python.org/3/library/functions.html#int> |
| REL | Constant REL of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.ConvergedReason¶
- class slepc4py.SLEPc.NEP.ConvergedReason
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP convergence reasons.
- •
- •
- DIVERGED_ITS: Maximum number of iterations exceeded.
- DIVERGED_BREAKDOWN: Solver failed due to breakdown.
- DIVERGED_LINEAR_SOLVE: Inner linear solve failed.
- DIVERGED_SUBSPACE_EXHAUSTED: Run out of space for the basis in an
- unrestarted solver.
- •
- CONVERGED_ITERATING: Iteration not finished yet.
Attributes Summary
| CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_TOL | Constant CONVERGED_TOL of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_USER | Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_BREAKDOWN | Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_ITS | Constant DIVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_LINEAR_SOLVE | Constant DIVERGED_LINEAR_SOLVE of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_SUBSPACE_EXHAUSTED | Constant DIVERGED_SUBSPACE_EXHAUSTED of type int <https://docs.python.org/3/library/functions.html#int> |
| ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.ErrorType¶
- class slepc4py.SLEPc.NEP.ErrorType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP error type to assess accuracy of computed solutions.
- ABSOLUTE: Absolute error.
- RELATIVE: Relative error.
- BACKWARD: Backward error.
Attributes Summary
| ABSOLUTE | Constant ABSOLUTE of type int <https://docs.python.org/3/library/functions.html#int> |
| BACKWARD | Constant BACKWARD of type int <https://docs.python.org/3/library/functions.html#int> |
| RELATIVE | Constant RELATIVE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.ProblemType¶
- class slepc4py.SLEPc.NEP.ProblemType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP problem type.
- GENERAL: General nonlinear eigenproblem.
- RATIONAL: NEP defined in split form with all f_i rational.
Attributes Summary
| GENERAL | Constant GENERAL of type int <https://docs.python.org/3/library/functions.html#int> |
| RATIONAL | Constant RATIONAL of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.Refine¶
- class slepc4py.SLEPc.NEP.Refine
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP refinement strategy.
- NONE: No refinement.
- SIMPLE: Refine eigenpairs one by one.
- MULTIPLE: Refine all eigenpairs simultaneously (invariant pair).
Attributes Summary
| MULTIPLE | Constant MULTIPLE of type int <https://docs.python.org/3/library/functions.html#int> |
| NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int> |
| SIMPLE | Constant SIMPLE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.RefineScheme¶
- class slepc4py.SLEPc.NEP.RefineScheme
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP scheme for solving linear systems during iterative refinement.
- SCHUR: Schur complement.
- MBE: Mixed block elimination.
- EXPLICIT: Build the explicit matrix.
Attributes Summary
| EXPLICIT | Constant EXPLICIT of type int <https://docs.python.org/3/library/functions.html#int> |
| MBE | Constant MBE of type int <https://docs.python.org/3/library/functions.html#int> |
| SCHUR | Constant SCHUR of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.Stop¶
- class slepc4py.SLEPc.NEP.Stop
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP stopping test.
- BASIC: Default stopping test.
- USER: User-defined stopping test.
Attributes Summary
| BASIC | Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.NEP.Type¶
- class slepc4py.SLEPc.NEP.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP type.
Nonlinear eigensolvers.
- RII: Residual inverse iteration.
- SLP: Successive linear problems.
- NARNOLDI: Nonlinear Arnoldi.
- CISS: Contour integral spectrum slice.
- INTERPOL: Polynomial interpolation.
- NLEIGS: Fully rational Krylov method for nonlinear eigenproblems.
Attributes Summary
| CISS | Object CISS of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| INTERPOL | Object INTERPOL of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| NARNOLDI | Object NARNOLDI of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| NLEIGS | Object NLEIGS of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| RII | Object RII of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| SLP | Object SLP of type str <https://docs.python.org/3/library/stdtypes.html#str> |
Attributes Documentation
slepc4py.SLEPc.NEP.Which¶
- class slepc4py.SLEPc.NEP.Which
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
NEP desired part of spectrum.
- LARGEST_MAGNITUDE: Largest magnitude (default).
- SMALLEST_MAGNITUDE: Smallest magnitude.
- LARGEST_REAL: Largest real parts.
- SMALLEST_REAL: Smallest real parts.
- LARGEST_IMAGINARY: Largest imaginary parts in magnitude.
- SMALLEST_IMAGINARY: Smallest imaginary parts in magnitude.
- TARGET_MAGNITUDE: Closest to target (in magnitude).
- TARGET_REAL: Real part closest to target.
- TARGET_IMAGINARY: Imaginary part closest to target.
- ALL: All eigenvalues in a region.
- USER: User defined selection.
Attributes Summary
| ALL | Constant ALL of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_IMAGINARY | Constant LARGEST_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_MAGNITUDE | Constant LARGEST_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_REAL | Constant LARGEST_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_IMAGINARY | Constant SMALLEST_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_MAGNITUDE | Constant SMALLEST_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_REAL | Constant SMALLEST_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_IMAGINARY | Constant TARGET_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_MAGNITUDE | Constant TARGET_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_REAL | Constant TARGET_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all NEP options in the database. |
| applyResolvent(omega, v, r[, rg]) | Apply the resolvent T^{-1}(z) to a given vector. |
| cancelMonitor() | Clear all monitors for a NEP object. |
| computeError(i[, etype]) | Compute the error associated with the i-th computed eigenpair. |
| create([comm]) | Create the NEP object. |
| destroy() | Destroy the NEP object. |
| errorView([etype, viewer]) | Display the errors associated with the computed solution. |
| getBV() | Get the basis vectors object associated to the eigensolver. |
| getCISSExtraction() | Get the extraction technique used in the CISS solver. |
| getCISSKSPs() | Get the list of linear solver objects associated with the CISS solver. |
| getCISSRefinement() | Get the values of various refinement parameters in the CISS solver. |
| getCISSSizes() | Get the values of various size parameters in the CISS solver. |
| getCISSThreshold() | Get the values of various threshold parameters in the CISS solver. |
| getConverged() | Get the number of converged eigenpairs. |
| getConvergedReason() | Get the reason why the solve() iteration was stopped. |
| getConvergenceTest() | Get the method used to compute the error estimate used in the convergence test. |
| getDS() | Get the direct solver associated to the eigensolver. |
| getDimensions() | Get the number of eigenvalues to compute. |
| getEigenpair(i[, Vr, Vi]) | Get the i-th solution of the eigenproblem as computed by solve(). |
| getErrorEstimate(i) | Get the error estimate associated to the i-th computed eigenpair. |
| getFunction() | Get the function to compute the nonlinear Function T(\lambda). |
| getInterpolInterpolation() | Get the tolerance and maximum degree for the interpolation polynomial. |
| getInterpolPEP() | Get the associated polynomial eigensolver object. |
| getIterationNumber() | Get the current iteration number. |
| getJacobian() | Get the function to compute the Jacobian T'(\lambda) and J. |
| getLeftEigenvector(i, Wr[, Wi]) | Get the i-th left eigenvector as computed by solve(). |
| getMonitor() | Get the list of monitor functions. |
| getNArnoldiKSP() | Get the linear solver object associated with the nonlinear eigensolver. |
| getNArnoldiLagPreconditioner() | Get how often the preconditioner is rebuilt. |
| getNLEIGSEPS() | Get the linear eigensolver object associated with the nonlinear eigensolver. |
| getNLEIGSFullBasis() | Get the flag that indicates if NLEIGS is using the full-basis variant. |
| getNLEIGSInterpolation() | Get the tolerance and maximum degree for the interpolation polynomial. |
| getNLEIGSKSPs() | Get the list of linear solver objects associated with the NLEIGS solver. |
| getNLEIGSLocking() | Get the locking flag used in the NLEIGS method. |
| getNLEIGSRKShifts() | Get the list of shifts used in the Rational Krylov method. |
| getNLEIGSRestart() | Get the restart parameter used in the NLEIGS method. |
| getOptionsPrefix() | Get the prefix used for searching for all NEP options in the database. |
| getProblemType() | Get the problem type from the NEP object. |
| getRG() | Get the region object associated to the eigensolver. |
| getRIIConstCorrectionTol() | Get the constant tolerance flag. |
| getRIIDeflationThreshold() | Get the threshold value that controls deflation. |
| getRIIHermitian() | Get if the Hermitian version must be used by the solver. |
| getRIIKSP() | Get the linear solver object associated with the nonlinear eigensolver. |
| getRIILagPreconditioner() | Get how often the preconditioner is rebuilt. |
| getRIIMaximumIterations() | Get the maximum number of inner iterations of RII. |
| getRefine() | Get the refinement strategy used by the NEP object. |
| getRefineKSP() | Get the KSP object used by the eigensolver in the refinement phase. |
| getSLPDeflationThreshold() | Get the threshold value that controls deflation. |
| getSLPEPS() | Get the linear eigensolver object associated with the nonlinear eigensolver. |
| getSLPEPSLeft() | Get the left eigensolver. |
| getSLPKSP() | Get the linear solver object associated with the nonlinear eigensolver. |
| getSplitOperator() | Get the operator of the nonlinear eigenvalue problem in split form. |
| getSplitPreconditioner() | Get the operator of the split preconditioner. |
| getStoppingTest() | Get the stopping function. |
| getTarget() | Get the value of the target. |
| getTolerances() | Get the tolerance and maximum iteration count. |
| getTrackAll() | Get the flag indicating whether all residual norms must be computed. |
| getTwoSided() | Get the flag indicating if a two-sided variant is being used. |
| getType() | Get the NEP type of this object. |
| getWhichEigenpairs() | Get which portion of the spectrum is to be sought. |
| reset() | Reset the NEP object. |
| setBV(bv) | Set the basis vectors object associated to the eigensolver. |
| setCISSExtraction(extraction) | Set the extraction technique used in the CISS solver. |
| setCISSRefinement([inner, blsize]) | Set the values of various refinement parameters in the CISS solver. |
| setCISSSizes([ip, bs, ms, npart, bsmax, ...]) | Set the values of various size parameters in the CISS solver. |
| setCISSThreshold([delta, spur]) | Set the values of various threshold parameters in the CISS solver. |
| setConvergenceTest(conv) | Set how to compute the error estimate used in the convergence test. |
| setDS(ds) | Set a direct solver object associated to the eigensolver. |
| setDimensions([nev, ncv, mpd]) | Set the number of eigenvalues to compute. |
| setFromOptions() | Set NEP options from the options database. |
| setFunction(function[, F, P, args, kargs]) | Set the function to compute the nonlinear Function T(\lambda). |
| setInitialSpace(space) | Set the initial space from which the eigensolver starts to iterate. |
| setInterpolInterpolation([tol, deg]) | Set the tolerance and maximum degree for the interpolation polynomial. |
| setInterpolPEP(pep) | Set a polynomial eigensolver object associated to the nonlinear eigensolver. |
| setJacobian(jacobian[, J, args, kargs]) | Set the function to compute the Jacobian T'(\lambda). |
| setMonitor(monitor[, args, kargs]) | Append a monitor function to the list of monitors. |
| setNArnoldiKSP(ksp) | Set a linear solver object associated to the nonlinear eigensolver. |
| setNArnoldiLagPreconditioner(lag) | Set when the preconditioner is rebuilt in the nonlinear solve. |
| setNLEIGSEPS(eps) | Set a linear eigensolver object associated to the nonlinear eigensolver. |
| setNLEIGSFullBasis([fullbasis]) | Set TOAR-basis (default) or full-basis variants of the NLEIGS method. |
| setNLEIGSInterpolation([tol, deg]) | Set the tolerance and maximum degree for the interpolation polynomial. |
| setNLEIGSLocking(lock) | Toggle between locking and non-locking variants of the NLEIGS method. |
| setNLEIGSRKShifts(shifts) | Set a list of shifts to be used in the Rational Krylov method. |
| setNLEIGSRestart(keep) | Set the restart parameter for the NLEIGS method. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all NEP options in the database. |
| setProblemType(problem_type) | Set the type of the eigenvalue problem. |
| setRG(rg) | Set a region object associated to the eigensolver. |
| setRIIConstCorrectionTol(cct) | Set a flag to keep the tolerance used in the linear solver constant. |
| setRIIDeflationThreshold(deftol) | Set the threshold used to switch between deflated and non-deflated. |
| setRIIHermitian(herm) | Set a flag to use the Hermitian version of the solver. |
| setRIIKSP(ksp) | Set a linear solver object associated to the nonlinear eigensolver. |
| setRIILagPreconditioner(lag) | Set when the preconditioner is rebuilt in the nonlinear solve. |
| setRIIMaximumIterations(its) | Set the max. |
| setRefine(ref[, npart, tol, its, scheme]) | Set the refinement strategy used by the NEP object. |
| setSLPDeflationThreshold(deftol) | Set the threshold used to switch between deflated and non-deflated. |
| setSLPEPS(eps) | Set a linear eigensolver object associated to the nonlinear eigensolver. |
| setSLPEPSLeft(eps) | Set a linear eigensolver object associated to the nonlinear eigensolver. |
| setSLPKSP(ksp) | Set a linear solver object associated to the nonlinear eigensolver. |
| setSplitOperator(A, f[, structure]) | Set the operator of the nonlinear eigenvalue problem in split form. |
| setSplitPreconditioner(P[, structure]) | Set the operator in split form. |
| setStoppingTest(stopping[, args, kargs]) | Set a function to decide when to stop the outer iteration of the eigensolver. |
| setTarget(target) | Set the value of the target. |
| setTolerances([tol, maxit]) | Set the tolerance and max. |
| setTrackAll(trackall) | Set if the solver must compute the residual of all approximate eigenpairs. |
| setTwoSided(twosided) | Set the solver to use a two-sided variant. |
| setType(nep_type) | Set the particular solver to be used in the NEP object. |
| setUp() | Set up all the necessary internal data structures. |
| setWhichEigenpairs(which) | Set which portion of the spectrum is to be sought. |
| solve() | Solve the eigensystem. |
| valuesView([viewer]) | Display the computed eigenvalues in a viewer. |
| vectorsView([viewer]) | Output computed eigenvectors to a viewer. |
| view([viewer]) | Print the NEP data structure. |
Attributes Summary
| bv | The basis vectors (BV) object associated. |
| ds | The direct solver (DS) object associated. |
| max_it | The maximum iteration count used by the NEP convergence tests. |
| problem_type | The problem type from the NEP object. |
| rg | The region (RG) object associated. |
| target | The value of the target. |
| tol | The tolerance used by the NEP convergence tests. |
| track_all | Compute the residual of all approximate eigenpairs. |
| which | The portion of the spectrum to be sought. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all NEP options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all NEP option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:289 <slepc4py/SLEPc/NEP.pyx#L289>`
- applyResolvent(omega, v, r, rg=None)
- Apply the resolvent T^{-1}(z) to a given vector.
Collective.
- omega (Scalar <#slepc4py.typing.Scalar>) – Value where the resolvent must be evaluated.
- v (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Input vector.
- r (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Placeholder for the result vector.
- rg (RG <#slepc4py.SLEPc.RG> | None <https://docs.python.org/3/library/constants.html#None>) – Region.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1339 <slepc4py/SLEPc/NEP.pyx#L1339>`
- cancelMonitor()
- Clear all monitors for a NEP object.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:821 <slepc4py/SLEPc/NEP.pyx#L821>`
- computeError(i, etype=None)
- Compute the error associated with the i-th computed eigenpair.
Collective.
Compute the error (based on the residual norm) associated with the i-th computed eigenpair.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be considered.
- etype (ErrorType <#slepc4py.SLEPc.NEP.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- Returns
- The error bound, computed in various ways from the residual norm \|T(\lambda)x\|_2 where \lambda is the eigenvalue and x is the eigenvector.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:978 <slepc4py/SLEPc/NEP.pyx#L978>`
- create(comm=None)
- Create the NEP object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator. If not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:212 <slepc4py/SLEPc/NEP.pyx#L212>`
- destroy()
- Destroy the NEP object.
Collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:194 <slepc4py/SLEPc/NEP.pyx#L194>`
- errorView(etype=None, viewer=None)
- Display the errors associated with the computed solution.
Collective.
Display the eigenvalues and the errors associated with the computed solution
- etype (ErrorType <#slepc4py.SLEPc.NEP.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- viewer (petsc4py.PETSc.Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
Notes
By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1007 <slepc4py/SLEPc/NEP.pyx#L1007>`
- getBV()
- Get the basis vectors object associated to the eigensolver.
Not collective.
- Returns
- The basis vectors context.
- Return type
- BV <#slepc4py.SLEPc.BV>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:653 <slepc4py/SLEPc/NEP.pyx#L653>`
- getCISSExtraction()
- Get the extraction technique used in the CISS solver.
Not collective.
- Returns
- The extraction technique.
- Return type
- CISSExtraction <#slepc4py.SLEPc.NEP.CISSExtraction>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2068 <slepc4py/SLEPc/NEP.pyx#L2068>`
- getCISSKSPs()
- Get the list of linear solver objects associated with the CISS solver.
Collective.
- Returns
- The linear solver objects.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
Notes
The number of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> solvers is equal to the number of integration points divided by the number of partitions. This value is halved in the case of real matrices with a region centered at the real axis.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2237 <slepc4py/SLEPc/NEP.pyx#L2237>`
- getCISSRefinement()
- Get the values of various refinement parameters in the CISS solver.
Not collective.
- inner (int <https://docs.python.org/3/library/functions.html#int>) – Number of iterative refinement iterations (inner loop).
- blsize (int <https://docs.python.org/3/library/functions.html#int>) – Number of iterative refinement iterations (blocksize loop).
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2219 <slepc4py/SLEPc/NEP.pyx#L2219>`
- getCISSSizes()
- Get the values of various size parameters in the CISS solver.
Not collective.
- ip (int <https://docs.python.org/3/library/functions.html#int>) – Number of integration points.
- bs (int <https://docs.python.org/3/library/functions.html#int>) – Block size.
- ms (int <https://docs.python.org/3/library/functions.html#int>) – Moment size.
- npart (int <https://docs.python.org/3/library/functions.html#int>) – Number of partitions when splitting the communicator.
- bsmax (int <https://docs.python.org/3/library/functions.html#int>) – Maximum block size.
- realmats (bool <https://docs.python.org/3/library/functions.html#bool>) – True if A and B are real.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, bool <https://docs.python.org/3/library/functions.html#bool>]
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2133 <slepc4py/SLEPc/NEP.pyx#L2133>`
- getCISSThreshold()
- Get the values of various threshold parameters in the CISS solver.
Not collective.
- delta (float <https://docs.python.org/3/library/functions.html#float>) – Threshold for numerical rank.
- spur (float <https://docs.python.org/3/library/functions.html#float>) – Spurious threshold (to discard spurious eigenpairs.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2182 <slepc4py/SLEPc/NEP.pyx#L2182>`
- getConverged()
- Get the number of converged eigenpairs.
Not collective.
- Returns
- Number of converged eigenpairs.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:885 <slepc4py/SLEPc/NEP.pyx#L885>`
- getConvergedReason()
- Get the reason why the solve() iteration was stopped.
Not collective.
- Returns
- Negative value indicates diverged, positive value converged.
- Return type
- ConvergedReason <#slepc4py.SLEPc.NEP.ConvergedReason>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:869 <slepc4py/SLEPc/NEP.pyx#L869>`
- getConvergenceTest()
- Get the method used to compute the error estimate used in the convergence
test.
Not collective.
- Returns
- The method used to compute the error estimate used in the convergence test.
- Return type
- Conv <#slepc4py.SLEPc.NEP.Conv>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:452 <slepc4py/SLEPc/NEP.pyx#L452>`
- getDS()
- Get the direct solver associated to the eigensolver.
Not collective.
- Returns
- The direct solver context.
- Return type
- DS <#slepc4py.SLEPc.DS>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:711 <slepc4py/SLEPc/NEP.pyx#L711>`
- getDimensions()
- Get the number of eigenvalues to compute.
Not collective.
Get the number of eigenvalues to compute, and the dimension of the subspace.
- nev (int <https://docs.python.org/3/library/functions.html#int>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:598 <slepc4py/SLEPc/NEP.pyx#L598>`
- getEigenpair(i, Vr=None, Vi=None)
- Get the i-th solution of the eigenproblem as computed by solve().
Collective.
The solution consists of both the eigenvalue and the eigenvector.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Vr (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (real part).
- Vi (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (imaginary part).
- Returns
- The computed eigenvalue.
- Return type
- complex <https://docs.python.org/3/library/functions.html#complex>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:900 <slepc4py/SLEPc/NEP.pyx#L900>`
- getErrorEstimate(i)
- Get the error estimate associated to the i-th computed eigenpair.
Not collective.
- Parameters
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be considered.
- Returns
- Error estimate.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:958 <slepc4py/SLEPc/NEP.pyx#L958>`
- getFunction()
- Get the function to compute the nonlinear Function T(\lambda).
Collective.
Get the function to compute the nonlinear Function T(\lambda) and the matrix.
- F – Function matrix
- P – preconditioner matrix (usually the same as the F)
- function – Function evaluation routine
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, NEPFunction <#slepc4py.typing.NEPFunction>]
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1104 <slepc4py/SLEPc/NEP.pyx#L1104>`
- getInterpolInterpolation()
- Get the tolerance and maximum degree for the interpolation polynomial.
Not collective.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The tolerance to stop computing polynomial coefficients.
- deg (int <https://docs.python.org/3/library/functions.html#int>) – The maximum degree of interpolation.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1799 <slepc4py/SLEPc/NEP.pyx#L1799>`
- getInterpolPEP()
- Get the associated polynomial eigensolver object.
Collective.
Get the polynomial eigensolver object associated with the nonlinear eigensolver.
- Returns
- The polynomial eigensolver.
- Return type
- PEP <#slepc4py.SLEPc.PEP>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1758 <slepc4py/SLEPc/NEP.pyx#L1758>`
- getIterationNumber()
- Get the current iteration number.
Not collective.
If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.
- Returns
- Iteration number.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:851 <slepc4py/SLEPc/NEP.pyx#L851>`
- getJacobian()
- Get the function to compute the Jacobian T'(\lambda) and J.
Collective.
Get the function to compute the Jacobian T'(\lambda) and the matrix.
- J – Jacobian matrix
- jacobian – Jacobian evaluation routine
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, NEPJacobian <#slepc4py.typing.NEPJacobian>]
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1162 <slepc4py/SLEPc/NEP.pyx#L1162>`
- getLeftEigenvector(i, Wr, Wi=None)
- Get the i-th left eigenvector as computed by solve().
Collective.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Wr (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Placeholder for the returned eigenvector (real part).
- Wi (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (imaginary part).
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()). Eigensolutions are indexed according to the ordering criterion established with setWhichEigenpairs().
Left eigenvectors are available only if the twosided flag was set with setTwoSided().
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:929 <slepc4py/SLEPc/NEP.pyx#L929>`
- getMonitor()
- Get the list of monitor functions.
Not collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:813 <slepc4py/SLEPc/NEP.pyx#L813>`
- Return type
- NEPMonitorFunction <#slepc4py.typing.NEPMonitorFunction>
- getNArnoldiKSP()
- Get the linear solver object associated with the nonlinear eigensolver.
Collective.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1691 <slepc4py/SLEPc/NEP.pyx#L1691>`
- getNArnoldiLagPreconditioner()
- Get how often the preconditioner is rebuilt.
Not collective.
- Returns
- The lag parameter.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1728 <slepc4py/SLEPc/NEP.pyx#L1728>`
- getNLEIGSEPS()
- Get the linear eigensolver object associated with the nonlinear
eigensolver.
Collective.
- Returns
- The linear eigensolver.
- Return type
- EPS <#slepc4py.SLEPc.EPS>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1978 <slepc4py/SLEPc/NEP.pyx#L1978>`
- getNLEIGSFullBasis()
- Get the flag that indicates if NLEIGS is using the full-basis variant.
Not collective.
- Returns
- True if the full-basis variant must be selected.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1950 <slepc4py/SLEPc/NEP.pyx#L1950>`
- getNLEIGSInterpolation()
- Get the tolerance and maximum degree for the interpolation polynomial.
Not collective.
Get the tolerance and maximum degree when building the interpolation via divided differences.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The tolerance to stop computing divided differences.
- deg (int <https://docs.python.org/3/library/functions.html#int>) – The maximum degree of interpolation.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1912 <slepc4py/SLEPc/NEP.pyx#L1912>`
- getNLEIGSKSPs()
- Get the list of linear solver objects associated with the NLEIGS solver.
Collective.
- Returns
- The linear solver objects.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
Notes
The number of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> solvers is equal to the number of shifts provided by the user, or 1 if the user did not provide shifts.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2031 <slepc4py/SLEPc/NEP.pyx#L2031>`
- getNLEIGSLocking()
- Get the locking flag used in the NLEIGS method.
Not collective.
- Returns
- The locking flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1875 <slepc4py/SLEPc/NEP.pyx#L1875>`
- getNLEIGSRKShifts()
- Get the list of shifts used in the Rational Krylov method.
Not collective.
- Returns
- The shift values.
- Return type
- ArrayScalar <#slepc4py.typing.ArrayScalar>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2010 <slepc4py/SLEPc/NEP.pyx#L2010>`
- getNLEIGSRestart()
- Get the restart parameter used in the NLEIGS method.
Not collective.
- Returns
- The number of vectors to be kept at restart.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1839 <slepc4py/SLEPc/NEP.pyx#L1839>`
- getOptionsPrefix()
- Get the prefix used for searching for all NEP options in the database.
Not collective.
- Returns
- The prefix string set for this NEP object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:259 <slepc4py/SLEPc/NEP.pyx#L259>`
- getProblemType()
- Get the problem type from the NEP object.
Not collective.
- Returns
- The problem type that was previously set.
- Return type
- ProblemType <#slepc4py.SLEPc.NEP.ProblemType>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:315 <slepc4py/SLEPc/NEP.pyx#L315>`
- getRG()
- Get the region object associated to the eigensolver.
Not collective.
- Returns
- The region context.
- Return type
- RG <#slepc4py.SLEPc.RG>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:682 <slepc4py/SLEPc/NEP.pyx#L682>`
- getRIIConstCorrectionTol()
- Get the constant tolerance flag.
Not collective.
- Returns
- If True, the petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> relative tolerance is constant.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1413 <slepc4py/SLEPc/NEP.pyx#L1413>`
- getRIIDeflationThreshold()
- Get the threshold value that controls deflation.
Not collective.
- Returns
- The threshold value.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1512 <slepc4py/SLEPc/NEP.pyx#L1512>`
- getRIIHermitian()
- Get if the Hermitian version must be used by the solver.
Not collective.
Get the flag about using the Hermitian version of the scalar nonlinear equation.
- Returns
- If True, the Hermitian version is used.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1477 <slepc4py/SLEPc/NEP.pyx#L1477>`
- getRIIKSP()
- Get the linear solver object associated with the nonlinear eigensolver.
Collective.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1540 <slepc4py/SLEPc/NEP.pyx#L1540>`
- getRIILagPreconditioner()
- Get how often the preconditioner is rebuilt.
Not collective.
- Returns
- The lag parameter.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1384 <slepc4py/SLEPc/NEP.pyx#L1384>`
- getRIIMaximumIterations()
- Get the maximum number of inner iterations of RII.
Not collective.
- Returns
- Maximum inner iterations.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1445 <slepc4py/SLEPc/NEP.pyx#L1445>`
- getRefine()
- Get the refinement strategy used by the NEP object.
Not collective.
Get the refinement strategy used by the NEP object and the associated parameters.
- ref (Refine <#slepc4py.SLEPc.NEP.Refine>) – The refinement type.
- npart (int <https://docs.python.org/3/library/functions.html#int>) – The number of partitions of the communicator.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- its (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of refinement iterations.
- scheme (RefineScheme <#slepc4py.SLEPc.NEP.RefineScheme>) – Scheme for solving linear systems
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Refine <#slepc4py.SLEPc.NEP.Refine>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>, int <https://docs.python.org/3/library/functions.html#int>, RefineScheme <#slepc4py.SLEPc.NEP.RefineScheme>]
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:483 <slepc4py/SLEPc/NEP.pyx#L483>`
- getRefineKSP()
- Get the KSP object used by the eigensolver in the refinement phase.
Collective.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:553 <slepc4py/SLEPc/NEP.pyx#L553>`
- getSLPDeflationThreshold()
- Get the threshold value that controls deflation.
Not collective.
- Returns
- The threshold value.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1572 <slepc4py/SLEPc/NEP.pyx#L1572>`
- getSLPEPS()
- Get the linear eigensolver object associated with the nonlinear
eigensolver.
Collective.
- Returns
- The linear eigensolver.
- Return type
- EPS <#slepc4py.SLEPc.EPS>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1600 <slepc4py/SLEPc/NEP.pyx#L1600>`
- getSLPEPSLeft()
- Get the left eigensolver.
Collective.
- Returns
- The linear eigensolver.
- Return type
- EPS <#slepc4py.SLEPc.EPS>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1631 <slepc4py/SLEPc/NEP.pyx#L1631>`
- getSLPKSP()
- Get the linear solver object associated with the nonlinear eigensolver.
Collective.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1660 <slepc4py/SLEPc/NEP.pyx#L1660>`
- getSplitOperator()
- Get the operator of the nonlinear eigenvalue problem in split form.
Collective.
- A (list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – Coefficient matrices of the split form.
- f (list <https://docs.python.org/3/library/stdtypes.html#list> of FN <#slepc4py.SLEPc.FN>) – Scalar functions of the split form.
- structure (petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure>) – Structure flag for matrices.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>], list <https://docs.python.org/3/library/stdtypes.html#list>[FN <#slepc4py.SLEPc.FN>], petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure>]
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1218 <slepc4py/SLEPc/NEP.pyx#L1218>`
- getSplitPreconditioner()
- Get the operator of the split preconditioner.
Not collective.
- P (list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – Coefficient matrices of the split preconditioner.
- structure (petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure>) – Structure flag for matrices.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>], petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure>]
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1279 <slepc4py/SLEPc/NEP.pyx#L1279>`
- getStoppingTest()
- Get the stopping function.
Not collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:782 <slepc4py/SLEPc/NEP.pyx#L782>`
- Return type
- NEPStoppingFunction <#slepc4py.typing.NEPStoppingFunction>
- getTarget()
- Get the value of the target.
Not collective.
- Returns
- The value of the target.
- Return type
- Scalar <#slepc4py.typing.Scalar>
Notes
If the target was not set by the user, then zero is returned.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:373 <slepc4py/SLEPc/NEP.pyx#L373>`
- getTolerances()
- Get the tolerance and maximum iteration count.
Not collective.
Get the tolerance and maximum iteration count used by the default NEP convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- maxit (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of iterations.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:412 <slepc4py/SLEPc/NEP.pyx#L412>`
- getTrackAll()
- Get the flag indicating whether all residual norms must be computed.
Not collective.
- Returns
- Whether the solver compute all residuals or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:569 <slepc4py/SLEPc/NEP.pyx#L569>`
- getTwoSided()
- Get the flag indicating if a two-sided variant is being used.
Not collective.
Get the flag indicating whether a two-sided variant of the algorithm is being used or not.
- Returns
- Whether the two-sided variant is to be used or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1304 <slepc4py/SLEPc/NEP.pyx#L1304>`
- getType()
- Get the NEP type of this object.
Not collective.
- Returns
- The solver currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:244 <slepc4py/SLEPc/NEP.pyx#L244>`
- getWhichEigenpairs()
- Get which portion of the spectrum is to be sought.
Not collective.
- Returns
- The portion of the spectrum to be sought by the solver.
- Return type
- Which <#slepc4py.SLEPc.NEP.Which>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:344 <slepc4py/SLEPc/NEP.pyx#L344>`
- reset()
- Reset the NEP object.
Collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:204 <slepc4py/SLEPc/NEP.pyx#L204>`
- setBV(bv)
- Set the basis vectors object associated to the eigensolver.
Collective.
- Parameters
- bv (BV <#slepc4py.SLEPc.BV>) – The basis vectors context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:669 <slepc4py/SLEPc/NEP.pyx#L669>`
- setCISSExtraction(extraction)
- Set the extraction technique used in the CISS solver.
Logically collective.
- Parameters
- extraction (CISSExtraction <#slepc4py.SLEPc.NEP.CISSExtraction>) – The extraction technique.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2054 <slepc4py/SLEPc/NEP.pyx#L2054>`
- setCISSRefinement(inner=None, blsize=None)
- Set the values of various refinement parameters in the CISS solver.
Logically collective.
- inner (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of iterative refinement iterations (inner loop).
- blsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of iterative refinement iterations (blocksize loop).
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2200 <slepc4py/SLEPc/NEP.pyx#L2200>`
- setCISSSizes(ip=None, bs=None, ms=None, npart=None, bsmax=None, realmats=False)
- Set the values of various size parameters in the CISS solver.
Logically collective.
- ip (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of integration points.
- bs (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Block size.
- ms (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Moment size.
- npart (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of partitions when splitting the communicator.
- bsmax (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum block size.
- realmats (bool <https://docs.python.org/3/library/functions.html#bool>) – True if A and B are real.
Notes
The default number of partitions is 1. This means the internal petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> object is shared among all processes of the NEP communicator. Otherwise, the communicator is split into npart communicators, so that npart petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> solves proceed simultaneously.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2083 <slepc4py/SLEPc/NEP.pyx#L2083>`
- setCISSThreshold(delta=None, spur=None)
- Set the values of various threshold parameters in the CISS solver.
Logically collective.
- delta (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Threshold for numerical rank.
- spur (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Spurious threshold (to discard spurious eigenpairs).
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2163 <slepc4py/SLEPc/NEP.pyx#L2163>`
- setConvergenceTest(conv)
- Set how to compute the error estimate used in the convergence test.
Logically collective.
- Parameters
- conv (Conv <#slepc4py.SLEPc.NEP.Conv>) – The method used to compute the error estimate used in the convergence test.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:468 <slepc4py/SLEPc/NEP.pyx#L468>`
- setDS(ds)
- Set a direct solver object associated to the eigensolver.
Collective.
- Parameters
- ds (DS <#slepc4py.SLEPc.DS>) – The direct solver context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:727 <slepc4py/SLEPc/NEP.pyx#L727>`
- setDimensions(nev=None, ncv=None, mpd=None)
- Set the number of eigenvalues to compute.
Logically collective.
Set the number of eigenvalues to compute and the dimension of the subspace.
- nev (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:622 <slepc4py/SLEPc/NEP.pyx#L622>`
- setFromOptions()
- Set NEP options from the options database.
Collective.
This routine must be called before setUp() if the user is to be allowed to set the solver type.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:304 <slepc4py/SLEPc/NEP.pyx#L304>`
- setFunction(function, F=None, P=None, args=None, kargs=None)
- Set the function to compute the nonlinear Function T(\lambda).
Collective.
Set the function to compute the nonlinear Function T(\lambda) as well as the location to store the matrix.
- function (NEPFunction <#slepc4py.typing.NEPFunction>) – Function evaluation routine
- F (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – Function matrix
- P (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – preconditioner matrix (usually the same as F)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1068 <slepc4py/SLEPc/NEP.pyx#L1068>`
- setInitialSpace(space)
- Set the initial space from which the eigensolver starts to iterate.
Collective.
- Parameters
- space (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The initial space
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:742 <slepc4py/SLEPc/NEP.pyx#L742>`
- setInterpolInterpolation(tol=None, deg=None)
- Set the tolerance and maximum degree for the interpolation polynomial.
Collective.
Set the tolerance and maximum degree when building the interpolation polynomial.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The tolerance to stop computing polynomial coefficients.
- deg (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum degree of interpolation.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1777 <slepc4py/SLEPc/NEP.pyx#L1777>`
- setInterpolPEP(pep)
- Set a polynomial eigensolver object associated to the nonlinear
eigensolver.
Collective.
- Parameters
- pep (PEP <#slepc4py.SLEPc.PEP>) – The polynomial eigensolver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1745 <slepc4py/SLEPc/NEP.pyx#L1745>`
- setJacobian(jacobian, J=None, args=None, kargs=None)
- Set the function to compute the Jacobian T'(\lambda).
Collective.
Set the function to compute the Jacobian T'(\lambda) as well as the location to store the matrix.
- jacobian (NEPJacobian <#slepc4py.typing.NEPJacobian>) – Jacobian evaluation routine
- J (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – Jacobian matrix
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1130 <slepc4py/SLEPc/NEP.pyx#L1130>`
- setMonitor(monitor, args=None, kargs=None)
- Append a monitor function to the list of monitors.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:792 <slepc4py/SLEPc/NEP.pyx#L792>`
- monitor (NEPMonitorFunction <#slepc4py.typing.NEPMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setNArnoldiKSP(ksp)
- Set a linear solver object associated to the nonlinear eigensolver.
Collective.
- Parameters
- ksp (petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>) – The linear solver object.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1678 <slepc4py/SLEPc/NEP.pyx#L1678>`
- setNArnoldiLagPreconditioner(lag)
- Set when the preconditioner is rebuilt in the nonlinear solve.
Logically collective.
- Parameters
- lag (int <https://docs.python.org/3/library/functions.html#int>) – 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within the nonlinear iteration, 2 means every second time the Jacobian is built, etc.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The default is 1. The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1707 <slepc4py/SLEPc/NEP.pyx#L1707>`
- setNLEIGSEPS(eps)
- Set a linear eigensolver object associated to the nonlinear eigensolver.
Collective.
- Parameters
- eps (EPS <#slepc4py.SLEPc.EPS>) – The linear eigensolver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1965 <slepc4py/SLEPc/NEP.pyx#L1965>`
- setNLEIGSFullBasis(fullbasis=True)
- Set TOAR-basis (default) or full-basis variants of the NLEIGS method.
Logically collective.
Toggle between TOAR-basis (default) and full-basis variants of the NLEIGS method.
- Parameters
- fullbasis (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the full-basis variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1933 <slepc4py/SLEPc/NEP.pyx#L1933>`
- setNLEIGSInterpolation(tol=None, deg=None)
- Set the tolerance and maximum degree for the interpolation polynomial.
Collective.
Set the tolerance and maximum degree when building the interpolation via divided differences.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The tolerance to stop computing divided differences.
- deg (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum degree of interpolation.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1890 <slepc4py/SLEPc/NEP.pyx#L1890>`
- setNLEIGSLocking(lock)
- Toggle between locking and non-locking variants of the NLEIGS method.
Logically collective.
- Parameters
- lock (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the locking variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The default is to lock converged eigenpairs when the method restarts. This behavior can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1854 <slepc4py/SLEPc/NEP.pyx#L1854>`
- setNLEIGSRKShifts(shifts)
- Set a list of shifts to be used in the Rational Krylov method.
Collective.
- Parameters
- shifts (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#slepc4py.typing.Scalar>]) – Values specifying the shifts.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1994 <slepc4py/SLEPc/NEP.pyx#L1994>`
- setNLEIGSRestart(keep)
- Set the restart parameter for the NLEIGS method.
Logically collective.
The proportion of basis vectors that must be kept after restart.
- Parameters
- keep (float <https://docs.python.org/3/library/functions.html#float>) – The number of vectors to be kept at restart.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are in the range [0.1,0.9]. The default is 0.5.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1819 <slepc4py/SLEPc/NEP.pyx#L1819>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all NEP options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all NEP option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:274 <slepc4py/SLEPc/NEP.pyx#L274>`
- setProblemType(problem_type)
- Set the type of the eigenvalue problem.
Logically collective.
- Parameters
- problem_type (ProblemType <#slepc4py.SLEPc.NEP.ProblemType>) – The problem type to be set.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:330 <slepc4py/SLEPc/NEP.pyx#L330>`
- setRG(rg)
- Set a region object associated to the eigensolver.
Collective.
- Parameters
- rg (RG <#slepc4py.SLEPc.RG>) – The region context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:698 <slepc4py/SLEPc/NEP.pyx#L698>`
- setRIIConstCorrectionTol(cct)
- Set a flag to keep the tolerance used in the linear solver constant.
Logically collective.
- Parameters
- cct (bool <https://docs.python.org/3/library/functions.html#bool>) – If True, the petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> relative tolerance is constant.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1399 <slepc4py/SLEPc/NEP.pyx#L1399>`
- setRIIDeflationThreshold(deftol)
- Set the threshold used to switch between deflated and non-deflated.
Logically collective.
Set the threshold value used to switch between deflated and non-deflated iteration.
- Parameters
- deftol (float <https://docs.python.org/3/library/functions.html#float>) – The threshold value.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1495 <slepc4py/SLEPc/NEP.pyx#L1495>`
- setRIIHermitian(herm)
- Set a flag to use the Hermitian version of the solver.
Logically collective.
Set a flag to indicate if the Hermitian version of the scalar nonlinear equation must be used by the solver.
- Parameters
- herm (bool <https://docs.python.org/3/library/functions.html#bool>) – If True, the Hermitian version is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1460 <slepc4py/SLEPc/NEP.pyx#L1460>`
- setRIIKSP(ksp)
- Set a linear solver object associated to the nonlinear eigensolver.
Collective.
- Parameters
- ksp (petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>) – The linear solver object.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1527 <slepc4py/SLEPc/NEP.pyx#L1527>`
- setRIILagPreconditioner(lag)
- Set when the preconditioner is rebuilt in the nonlinear solve.
Logically collective.
- Parameters
- lag (int <https://docs.python.org/3/library/functions.html#int>) – 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within the nonlinear iteration, 2 means every second time the Jacobian is built, etc.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1368 <slepc4py/SLEPc/NEP.pyx#L1368>`
- setRIIMaximumIterations(its)
- Set the max. number of inner iterations to be used in the RII solver.
Logically collective.
These are the Newton iterations related to the computation of the nonlinear Rayleigh functional.
- Parameters
- its (int <https://docs.python.org/3/library/functions.html#int>) – Maximum inner iterations.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1428 <slepc4py/SLEPc/NEP.pyx#L1428>`
- setRefine(ref, npart=None, tol=None, its=None, scheme=None)
- Set the refinement strategy used by the NEP object.
Logically collective.
Set the refinement strategy used by the NEP object and the associated parameters.
- ref (Refine <#slepc4py.SLEPc.NEP.Refine>) – The refinement type.
- npart (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The number of partitions of the communicator.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- its (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of refinement iterations.
- scheme (RefineScheme <#slepc4py.SLEPc.NEP.RefineScheme> | None <https://docs.python.org/3/library/constants.html#None>) – Scheme for linear system solves
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:513 <slepc4py/SLEPc/NEP.pyx#L513>`
- setSLPDeflationThreshold(deftol)
- Set the threshold used to switch between deflated and non-deflated.
Logically collective.
- Parameters
- deftol (float <https://docs.python.org/3/library/functions.html#float>) – The threshold value.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1558 <slepc4py/SLEPc/NEP.pyx#L1558>`
- setSLPEPS(eps)
- Set a linear eigensolver object associated to the nonlinear eigensolver.
Collective.
- Parameters
- eps (EPS <#slepc4py.SLEPc.EPS>) – The linear eigensolver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1587 <slepc4py/SLEPc/NEP.pyx#L1587>`
- setSLPEPSLeft(eps)
- Set a linear eigensolver object associated to the nonlinear eigensolver.
Collective.
Used to compute left eigenvectors in the two-sided variant of SLP.
- Parameters
- eps (EPS <#slepc4py.SLEPc.EPS>) – The linear eigensolver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1616 <slepc4py/SLEPc/NEP.pyx#L1616>`
- setSLPKSP(ksp)
- Set a linear solver object associated to the nonlinear eigensolver.
Collective.
- Parameters
- ksp (petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>) – The linear solver object.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1647 <slepc4py/SLEPc/NEP.pyx#L1647>`
- setSplitOperator(A, f, structure=None)
- Set the operator of the nonlinear eigenvalue problem in split form.
Collective.
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | list <https://docs.python.org/3/library/stdtypes.html#list>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>]) – Coefficient matrices of the split form.
- f (FN <#slepc4py.SLEPc.FN> | list <https://docs.python.org/3/library/stdtypes.html#list>[FN <#slepc4py.SLEPc.FN>]) – Scalar functions of the split form.
- structure (petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure> | None <https://docs.python.org/3/library/constants.html#None>) – Structure flag for matrices.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1184 <slepc4py/SLEPc/NEP.pyx#L1184>`
- setSplitPreconditioner(P, structure=None)
- Set the operator in split form.
Collective.
Set the operator in split form from which to build the preconditioner to be used when solving the nonlinear eigenvalue problem in split form.
- P (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | list <https://docs.python.org/3/library/stdtypes.html#list>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>]) – Coefficient matrices of the split preconditioner.
- structure (petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure> | None <https://docs.python.org/3/library/constants.html#None>) – Structure flag for matrices.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1250 <slepc4py/SLEPc/NEP.pyx#L1250>`
- setStoppingTest(stopping, args=None, kargs=None)
- Set a function to decide when to stop the outer iteration of the
eigensolver.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:762 <slepc4py/SLEPc/NEP.pyx#L762>`
- stopping (NEPStoppingFunction <#slepc4py.typing.NEPStoppingFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setTarget(target)
- Set the value of the target.
Logically collective.
- Parameters
- target (Scalar <#slepc4py.typing.Scalar>) – The value of the target.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The target is a scalar value used to determine the portion of the spectrum of interest. It is used in combination with setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:392 <slepc4py/SLEPc/NEP.pyx#L392>`
- setTolerances(tol=None, maxit=None)
- Set the tolerance and max. iteration count used in convergence tests.
Logically collective.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- maxit (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of iterations.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:433 <slepc4py/SLEPc/NEP.pyx#L433>`
- setTrackAll(trackall)
- Set if the solver must compute the residual of all approximate eigenpairs.
Logically collective.
- Parameters
- trackall (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether compute all residuals or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:584 <slepc4py/SLEPc/NEP.pyx#L584>`
- setTwoSided(twosided)
- Set the solver to use a two-sided variant.
Logically collective.
Set the solver to use a two-sided variant so that left eigenvectors are also computed.
- Parameters
- twosided (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the two-sided variant is to be used or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1322 <slepc4py/SLEPc/NEP.pyx#L1322>`
- setType(nep_type)
- Set the particular solver to be used in the NEP object.
Logically collective.
- Parameters
- nep_type (Type <#slepc4py.SLEPc.NEP.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The solver to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:229 <slepc4py/SLEPc/NEP.pyx#L229>`
- setUp()
- Set up all the necessary internal data structures.
Collective.
Set up all the internal data structures necessary for the execution of the eigensolver.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:832 <slepc4py/SLEPc/NEP.pyx#L832>`
- setWhichEigenpairs(which)
- Set which portion of the spectrum is to be sought.
Logically collective.
- Parameters
- which (Which <#slepc4py.SLEPc.NEP.Which>) – The portion of the spectrum to be sought by the solver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:359 <slepc4py/SLEPc/NEP.pyx#L359>`
- solve()
- Solve the eigensystem.
Collective.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:843 <slepc4py/SLEPc/NEP.pyx#L843>`
- valuesView(viewer=None)
- Display the computed eigenvalues in a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1036 <slepc4py/SLEPc/NEP.pyx#L1036>`
- vectorsView(viewer=None)
- Output computed eigenvectors to a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:1051 <slepc4py/SLEPc/NEP.pyx#L1051>`
- view(viewer=None)
- Print the NEP data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:179 <slepc4py/SLEPc/NEP.pyx#L179>`
Attributes Documentation
- bv
- The basis vectors (BV) object associated.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2302 <slepc4py/SLEPc/NEP.pyx#L2302>`
- ds
- The direct solver (DS) object associated.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2316 <slepc4py/SLEPc/NEP.pyx#L2316>`
- max_it
- The maximum iteration count used by the NEP convergence tests.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2288 <slepc4py/SLEPc/NEP.pyx#L2288>`
- problem_type
- The problem type from the NEP object.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2260 <slepc4py/SLEPc/NEP.pyx#L2260>`
- rg
- The region (RG) object associated.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2309 <slepc4py/SLEPc/NEP.pyx#L2309>`
- target
- The value of the target.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2274 <slepc4py/SLEPc/NEP.pyx#L2274>`
- tol
- The tolerance used by the NEP convergence tests.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2281 <slepc4py/SLEPc/NEP.pyx#L2281>`
- track_all
- Compute the residual of all approximate eigenpairs.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2295 <slepc4py/SLEPc/NEP.pyx#L2295>`
- which
- The portion of the spectrum to be sought.
:sources:`Source code at slepc4py/SLEPc/NEP.pyx:2267 <slepc4py/SLEPc/NEP.pyx#L2267>`
slepc4py.SLEPc.PEP¶
- class slepc4py.SLEPc.PEP
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
PEP.
Enumerations
Basis <#slepc4py.SLEPc.PEP.Basis> PEP basis type for the representation of the polynomial. CISSExtraction <#slepc4py.SLEPc.PEP.CISSExtraction> PEP CISS extraction technique. Conv <#slepc4py.SLEPc.PEP.Conv> PEP convergence test. ConvergedReason <#slepc4py.SLEPc.PEP.ConvergedReason> PEP convergence reasons. ErrorType <#slepc4py.SLEPc.PEP.ErrorType> PEP error type to assess accuracy of computed solutions. Extract <#slepc4py.SLEPc.PEP.Extract> PEP extraction strategy used. JDProjection <#slepc4py.SLEPc.PEP.JDProjection> PEP type of projection to be used in the Jacobi-Davidson solver. ProblemType <#slepc4py.SLEPc.PEP.ProblemType> PEP problem type. Refine <#slepc4py.SLEPc.PEP.Refine> PEP refinement strategy. RefineScheme <#slepc4py.SLEPc.PEP.RefineScheme> PEP scheme for solving linear systems during iterative refinement. Scale <#slepc4py.SLEPc.PEP.Scale> PEP scaling strategy. Stop <#slepc4py.SLEPc.PEP.Stop> PEP stopping test. Type <#slepc4py.SLEPc.PEP.Type> PEP type. Which <#slepc4py.SLEPc.PEP.Which> PEP desired part of spectrum.
slepc4py.SLEPc.PEP.Basis¶
- class slepc4py.SLEPc.PEP.Basis
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP basis type for the representation of the polynomial.
- MONOMIAL: Monomials (default).
- CHEBYSHEV1: Chebyshev polynomials of the 1st kind.
- CHEBYSHEV2: Chebyshev polynomials of the 2nd kind.
- LEGENDRE: Legendre polynomials.
- LAGUERRE: Laguerre polynomials.
- HERMITE: Hermite polynomials.
Attributes Summary
| CHEBYSHEV1 | Constant CHEBYSHEV1 of type int <https://docs.python.org/3/library/functions.html#int> |
| CHEBYSHEV2 | Constant CHEBYSHEV2 of type int <https://docs.python.org/3/library/functions.html#int> |
| HERMITE | Constant HERMITE of type int <https://docs.python.org/3/library/functions.html#int> |
| LAGUERRE | Constant LAGUERRE of type int <https://docs.python.org/3/library/functions.html#int> |
| LEGENDRE | Constant LEGENDRE of type int <https://docs.python.org/3/library/functions.html#int> |
| MONOMIAL | Constant MONOMIAL of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.CISSExtraction¶
- class slepc4py.SLEPc.PEP.CISSExtraction
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP CISS extraction technique.
- RITZ: Ritz extraction.
- HANKEL: Extraction via Hankel eigenproblem.
- CAA: Communication-avoiding Arnoldi.
Attributes Summary
| CAA | Constant CAA of type int <https://docs.python.org/3/library/functions.html#int> |
| HANKEL | Constant HANKEL of type int <https://docs.python.org/3/library/functions.html#int> |
| RITZ | Constant RITZ of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.Conv¶
- class slepc4py.SLEPc.PEP.Conv
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP convergence test.
- ABS: Absolute convergence test.
- REL: Convergence test relative to the eigenvalue.
- NORM: Convergence test relative to the matrix norms.
- USER: User-defined convergence test.
Attributes Summary
| ABS | Constant ABS of type int <https://docs.python.org/3/library/functions.html#int> |
| NORM | Constant NORM of type int <https://docs.python.org/3/library/functions.html#int> |
| REL | Constant REL of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.ConvergedReason¶
- class slepc4py.SLEPc.PEP.ConvergedReason
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP convergence reasons.
- CONVERGED_TOL: All eigenpairs converged to requested tolerance.
- CONVERGED_USER: User-defined convergence criterion satisfied.
- DIVERGED_ITS: Maximum number of iterations exceeded.
- DIVERGED_BREAKDOWN: Solver failed due to breakdown.
- DIVERGED_SYMMETRY_LOST: Lanczos-type method could not preserve symmetry.
- CONVERGED_ITERATING: Iteration not finished yet.
Attributes Summary
| CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_TOL | Constant CONVERGED_TOL of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_USER | Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_BREAKDOWN | Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_ITS | Constant DIVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_SYMMETRY_LOST | Constant DIVERGED_SYMMETRY_LOST of type int <https://docs.python.org/3/library/functions.html#int> |
| ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.ErrorType¶
- class slepc4py.SLEPc.PEP.ErrorType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP error type to assess accuracy of computed solutions.
- ABSOLUTE: Absolute error.
- RELATIVE: Relative error.
- BACKWARD: Backward error.
Attributes Summary
| ABSOLUTE | Constant ABSOLUTE of type int <https://docs.python.org/3/library/functions.html#int> |
| BACKWARD | Constant BACKWARD of type int <https://docs.python.org/3/library/functions.html#int> |
| RELATIVE | Constant RELATIVE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.Extract¶
- class slepc4py.SLEPc.PEP.Extract
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP extraction strategy used.
PEP extraction strategy used to obtain eigenvectors of the PEP from the eigenvectors of the linearization.
- NONE: Use the first block.
- NORM: Use the first or last block depending on norm of H.
- RESIDUAL: Use the block with smallest residual.
- STRUCTURED: Combine all blocks in a certain way.
Attributes Summary
| NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int> |
| NORM | Constant NORM of type int <https://docs.python.org/3/library/functions.html#int> |
| RESIDUAL | Constant RESIDUAL of type int <https://docs.python.org/3/library/functions.html#int> |
| STRUCTURED | Constant STRUCTURED of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.JDProjection¶
- class slepc4py.SLEPc.PEP.JDProjection
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP type of projection to be used in the Jacobi-Davidson solver.
- HARMONIC: Harmonic projection.
- ORTHOGONAL: Orthogonal projection.
Attributes Summary
| HARMONIC | Constant HARMONIC of type int <https://docs.python.org/3/library/functions.html#int> |
| ORTHOGONAL | Constant ORTHOGONAL of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.ProblemType¶
- class slepc4py.SLEPc.PEP.ProblemType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP problem type.
- GENERAL: No structure.
- HERMITIAN: Hermitian structure.
- HYPERBOLIC: QEP with Hermitian matrices, M>0,
- (x^TCx)^2 > 4(x^TMx)(x^TKx).
- •
- GYROSCOPIC: QEP with M, K Hermitian,
- M>0, C skew-Hermitian.
Attributes Summary
| GENERAL | Constant GENERAL of type int <https://docs.python.org/3/library/functions.html#int> |
| GYROSCOPIC | Constant GYROSCOPIC of type int <https://docs.python.org/3/library/functions.html#int> |
| HERMITIAN | Constant HERMITIAN of type int <https://docs.python.org/3/library/functions.html#int> |
| HYPERBOLIC | Constant HYPERBOLIC of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.Refine¶
- class slepc4py.SLEPc.PEP.Refine
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP refinement strategy.
- NONE: No refinement.
- SIMPLE: Refine eigenpairs one by one.
- MULTIPLE: Refine all eigenpairs simultaneously (invariant pair).
Attributes Summary
| MULTIPLE | Constant MULTIPLE of type int <https://docs.python.org/3/library/functions.html#int> |
| NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int> |
| SIMPLE | Constant SIMPLE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.RefineScheme¶
- class slepc4py.SLEPc.PEP.RefineScheme
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP scheme for solving linear systems during iterative refinement.
- SCHUR: Schur complement.
- MBE: Mixed block elimination.
- EXPLICIT: Build the explicit matrix.
Attributes Summary
| EXPLICIT | Constant EXPLICIT of type int <https://docs.python.org/3/library/functions.html#int> |
| MBE | Constant MBE of type int <https://docs.python.org/3/library/functions.html#int> |
| SCHUR | Constant SCHUR of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.Scale¶
- class slepc4py.SLEPc.PEP.Scale
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP scaling strategy.
- NONE: No scaling.
- SCALAR: Parameter scaling.
- DIAGONAL: Diagonal scaling.
- BOTH: Both parameter and diagonal scaling.
Attributes Summary
| BOTH | Constant BOTH of type int <https://docs.python.org/3/library/functions.html#int> |
| DIAGONAL | Constant DIAGONAL of type int <https://docs.python.org/3/library/functions.html#int> |
| NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int> |
| SCALAR | Constant SCALAR of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.Stop¶
- class slepc4py.SLEPc.PEP.Stop
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP stopping test.
- BASIC: Default stopping test.
- USER: User-defined stopping test.
Attributes Summary
| BASIC | Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.PEP.Type¶
- class slepc4py.SLEPc.PEP.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP type.
Polynomial eigensolvers.
- LINEAR: Linearization via EPS.
- QARNOLDI: Q-Arnoldi for quadratic problems.
- TOAR: Two-level orthogonal Arnoldi.
- STOAR: Symmetric TOAR.
- JD: Polynomial Jacobi-Davidson.
- CISS: Contour integral spectrum slice.
Attributes Summary
| CISS | Object CISS of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| JD | Object JD of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| LINEAR | Object LINEAR of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| QARNOLDI | Object QARNOLDI of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| STOAR | Object STOAR of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| TOAR | Object TOAR of type str <https://docs.python.org/3/library/stdtypes.html#str> |
Attributes Documentation
slepc4py.SLEPc.PEP.Which¶
- class slepc4py.SLEPc.PEP.Which
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
PEP desired part of spectrum.
- LARGEST_MAGNITUDE: Largest magnitude (default).
- SMALLEST_MAGNITUDE: Smallest magnitude.
- LARGEST_REAL: Largest real parts.
- SMALLEST_REAL: Smallest real parts.
- LARGEST_IMAGINARY: Largest imaginary parts in magnitude.
- SMALLEST_IMAGINARY: Smallest imaginary parts in magnitude.
- TARGET_MAGNITUDE: Closest to target (in magnitude).
- TARGET_REAL: Real part closest to target.
- TARGET_IMAGINARY: Imaginary part closest to target.
- ALL: All eigenvalues in an interval.
- USER: User-defined criterion.
Attributes Summary
| ALL | Constant ALL of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_IMAGINARY | Constant LARGEST_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_MAGNITUDE | Constant LARGEST_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| LARGEST_REAL | Constant LARGEST_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_IMAGINARY | Constant SMALLEST_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_MAGNITUDE | Constant SMALLEST_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST_REAL | Constant SMALLEST_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_IMAGINARY | Constant TARGET_IMAGINARY of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_MAGNITUDE | Constant TARGET_MAGNITUDE of type int <https://docs.python.org/3/library/functions.html#int> |
| TARGET_REAL | Constant TARGET_REAL of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all PEP options in the database. |
| cancelMonitor() | Clear all monitors for a PEP object. |
| computeError(i[, etype]) | Compute the error associated with the i-th computed eigenpair. |
| create([comm]) | Create the PEP object. |
| destroy() | Destroy the PEP object. |
| errorView([etype, viewer]) | Display the errors associated with the computed solution. |
| getBV() | Get the basis vectors object associated to the eigensolver. |
| getBasis() | Get the type of polynomial basis used. |
| getCISSExtraction() | Get the extraction technique used in the CISS solver. |
| getCISSKSPs() | Get the array of linear solver objects associated with the CISS solver. |
| getCISSRefinement() | Get the values of various refinement parameters in the CISS solver. |
| getCISSSizes() | Get the values of various size parameters in the CISS solver. |
| getCISSThreshold() | Get the values of various threshold parameters in the CISS solver. |
| getConverged() | Get the number of converged eigenpairs. |
| getConvergedReason() | Get the reason why the solve() iteration was stopped. |
| getConvergenceTest() | Get the method used to compute the error estimate used in the convergence test. |
| getDS() | Get the direct solver associated to the eigensolver. |
| getDimensions() | Get the number of eigenvalues to compute and the dimension of the subspace. |
| getEigenpair(i[, Vr, Vi]) | Get the i-th solution of the eigenproblem as computed by solve(). |
| getErrorEstimate(i) | Get the error estimate associated to the i-th computed eigenpair. |
| getExtract() | Get the extraction technique used by the PEP object. |
| getInterval() | Get the computational interval for spectrum slicing. |
| getIterationNumber() | Get the current iteration number. |
| getJDFix() | Get threshold for changing the target in the correction equation. |
| getJDMinimalityIndex() | Get the maximum allowed value of the minimality index. |
| getJDProjection() | Get the type of projection to be used in the Jacobi-Davidson solver. |
| getJDRestart() | Get the restart parameter used in the Jacobi-Davidson method. |
| getJDReusePreconditioner() | Get the flag for reusing the preconditioner. |
| getLinearEPS() | Get the eigensolver object associated to the polynomial eigenvalue solver. |
| getLinearExplicitMatrix() | Get if the matrices A and B for the linearization are built explicitly. |
| getLinearLinearization() | Get the coeffs. |
| getMonitor() | Get the list of monitor functions. |
| getOperators() | Get the matrices associated with the eigenvalue problem. |
| getOptionsPrefix() | Get the prefix used for searching for all PEP options in the database. |
| getProblemType() | Get the problem type from the PEP object. |
| getQArnoldiLocking() | Get the locking flag used in the Q-Arnoldi method. |
| getQArnoldiRestart() | Get the restart parameter used in the Q-Arnoldi method. |
| getRG() | Get the region object associated to the eigensolver. |
| getRefine() | Get the refinement strategy used by the PEP object. |
| getRefineKSP() | Get the KSP object used by the eigensolver in the refinement phase. |
| getST() | Get the ST <#slepc4py.SLEPc.ST> object associated to the eigensolver object. |
| getSTOARCheckEigenvalueType() | Get the flag for the eigenvalue type check in spectrum slicing. |
| getSTOARDetectZeros() | Get the flag that enforces zero detection in spectrum slicing. |
| getSTOARDimensions() | Get the dimensions used for each subsolve step. |
| getSTOARInertias() | Get the values of the shifts and their corresponding inertias. |
| getSTOARLinearization() | Get the coefficients that define the linearization of a quadratic eigenproblem. |
| getSTOARLocking() | Get the locking flag used in the STOAR method. |
| getScale([Dl, Dr]) | Get the strategy used for scaling the polynomial eigenproblem. |
| getStoppingTest() | Get the stopping function. |
| getTOARLocking() | Get the locking flag used in the TOAR method. |
| getTOARRestart() | Get the restart parameter used in the TOAR method. |
| getTarget() | Get the value of the target. |
| getTolerances() | Get the tolerance and maximum iteration count. |
| getTrackAll() | Get the flag indicating whether all residual norms must be computed. |
| getType() | Get the PEP type of this object. |
| getWhichEigenpairs() | Get which portion of the spectrum is to be sought. |
| reset() | Reset the PEP object. |
| setBV(bv) | Set a basis vectors object associated to the eigensolver. |
| setBasis(basis) | Set the type of polynomial basis used. |
| setCISSExtraction(extraction) | Set the extraction technique used in the CISS solver. |
| setCISSRefinement([inner, blsize]) | Set the values of various refinement parameters in the CISS solver. |
| setCISSSizes([ip, bs, ms, npart, bsmax, ...]) | Set the values of various size parameters in the CISS solver. |
| setCISSThreshold([delta, spur]) | Set the values of various threshold parameters in the CISS solver. |
| setConvergenceTest(conv) | Set how to compute the error estimate used in the convergence test. |
| setDS(ds) | Set a direct solver object associated to the eigensolver. |
| setDimensions([nev, ncv, mpd]) | Set the number of eigenvalues to compute and the dimension of the subspace. |
| setExtract(extract) | Set the extraction strategy to be used. |
| setFromOptions() | Set PEP options from the options database. |
| setInitialSpace(space) | Set the initial space from which the eigensolver starts to iterate. |
| setInterval(inta, intb) | Set the computational interval for spectrum slicing. |
| setJDFix(fix) | Set the threshold for changing the target in the correction equation. |
| setJDMinimalityIndex(flag) | Set the maximum allowed value for the minimality index. |
| setJDProjection(proj) | Set the type of projection to be used in the Jacobi-Davidson solver. |
| setJDRestart(keep) | Set the restart parameter for the Jacobi-Davidson method. |
| setJDReusePreconditioner(flag) | Set a flag indicating whether the preconditioner must be reused or not. |
| setLinearEPS(eps) | Set an eigensolver object associated to the polynomial eigenvalue solver. |
| setLinearExplicitMatrix(flag) | Set flag to explicitly build the matrices A and B. |
| setLinearLinearization([alpha, beta]) | Set the coefficients that define the linearization of a quadratic eigenproblem. |
| setMonitor(monitor[, args, kargs]) | Append a monitor function to the list of monitors. |
| setOperators(operators) | Set the matrices associated with the eigenvalue problem. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all PEP options in the database. |
| setProblemType(problem_type) | Set the type of the eigenvalue problem. |
| setQArnoldiLocking(lock) | Toggle between locking and non-locking variants of the Q-Arnoldi method. |
| setQArnoldiRestart(keep) | Set the restart parameter for the Q-Arnoldi method. |
| setRG(rg) | Set a region object associated to the eigensolver. |
| setRefine(ref[, npart, tol, its, scheme]) | Set the refinement strategy used by the PEP object. |
| setST(st) | Set a spectral transformation object associated to the eigensolver. |
| setSTOARCheckEigenvalueType(flag) | Set flag to check if all eigenvalues have the same definite type. |
| setSTOARDetectZeros(detect) | Set flag to enforce detection of zeros during the factorizations. |
| setSTOARDimensions([nev, ncv, mpd]) | Set the dimensions used for each subsolve step. |
| setSTOARLinearization([alpha, beta]) | Set the coefficients that define the linearization of a quadratic eigenproblem. |
| setSTOARLocking(lock) | Toggle between locking and non-locking variants of the STOAR method. |
| setScale(scale[, alpha, Dl, Dr, its, lbda]) | Set the scaling strategy to be used. |
| setStoppingTest(stopping[, args, kargs]) | Set a function to decide when to stop the outer iteration of the eigensolver. |
| setTOARLocking(lock) | Toggle between locking and non-locking variants of the TOAR method. |
| setTOARRestart(keep) | Set the restart parameter for the TOAR method. |
| setTarget(target) | Set the value of the target. |
| setTolerances([tol, max_it]) | Set the tolerance and maximum iteration count. |
| setTrackAll(trackall) | Set flag to compute the residual of all approximate eigenpairs. |
| setType(pep_type) | Set the particular solver to be used in the PEP object. |
| setUp() | Set up all the necessary internal data structures. |
| setWhichEigenpairs(which) | Set which portion of the spectrum is to be sought. |
| solve() | Solve the eigensystem. |
| valuesView([viewer]) | Display the computed eigenvalues in a viewer. |
| vectorsView([viewer]) | Output computed eigenvectors to a viewer. |
| view([viewer]) | Print the PEP data structure. |
Attributes Summary
| bv | The basis vectors (BV) object associated. |
| ds | The direct solver (DS) object associated. |
| extract | The type of extraction technique to be employed. |
| max_it | The maximum iteration count. |
| problem_type | The type of the eigenvalue problem. |
| rg | The region (RG) object associated. |
| st | The spectral transformation (ST) object associated. |
| target | The value of the target. |
| tol | The tolerance. |
| track_all | Compute the residual norm of all approximate eigenpairs. |
| which | The portion of the spectrum to be sought. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all PEP options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all PEP option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:353 <slepc4py/SLEPc/PEP.pyx#L353>`
- cancelMonitor()
- Clear all monitors for a PEP object.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1162 <slepc4py/SLEPc/PEP.pyx#L1162>`
- computeError(i, etype=None)
- Compute the error associated with the i-th computed eigenpair.
Collective.
Compute the error (based on the residual norm) associated with the i-th computed eigenpair.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be considered.
- etype (ErrorType <#slepc4py.SLEPc.PEP.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- Returns
- The error bound, computed in various ways from the residual norm ||P(l)x||_2 where l is the eigenvalue and x is the eigenvector.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1290 <slepc4py/SLEPc/PEP.pyx#L1290>`
- create(comm=None)
- Create the PEP object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator. If not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:276 <slepc4py/SLEPc/PEP.pyx#L276>`
- destroy()
- Destroy the PEP object.
Collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:258 <slepc4py/SLEPc/PEP.pyx#L258>`
- errorView(etype=None, viewer=None)
- Display the errors associated with the computed solution.
Collective.
Display the errors and the eigenvalues.
- etype (ErrorType <#slepc4py.SLEPc.PEP.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- viewer (petsc4py.PETSc.Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
Notes
By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1324 <slepc4py/SLEPc/PEP.pyx#L1324>`
- getBV()
- Get the basis vectors object associated to the eigensolver.
Not collective.
- Returns
- The basis vectors context.
- Return type
- BV <#slepc4py.SLEPc.BV>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:954 <slepc4py/SLEPc/PEP.pyx#L954>`
- getBasis()
- Get the type of polynomial basis used.
Not collective.
Get the type of polynomial basis used to describe the polynomial eigenvalue problem.
- Returns
- The basis that was previously set.
- Return type
- Basis <#slepc4py.SLEPc.PEP.Basis>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:379 <slepc4py/SLEPc/PEP.pyx#L379>`
- getCISSExtraction()
- Get the extraction technique used in the CISS solver.
Not collective.
- Returns
- The extraction technique.
- Return type
- CISSExtraction <#slepc4py.SLEPc.PEP.CISSExtraction>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2049 <slepc4py/SLEPc/PEP.pyx#L2049>`
- getCISSKSPs()
- Get the array of linear solver objects associated with the CISS solver.
Collective.
- Returns
- The linear solver objects.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
Notes
The number of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> solvers is equal to the number of integration points divided by the number of partitions. This value is halved in the case of real matrices with a region centered at the real axis.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2218 <slepc4py/SLEPc/PEP.pyx#L2218>`
- getCISSRefinement()
- Get the values of various refinement parameters in the CISS solver.
Not collective.
- inner (int <https://docs.python.org/3/library/functions.html#int>) – Number of iterative refinement iterations (inner loop).
- blsize (int <https://docs.python.org/3/library/functions.html#int>) – Number of iterative refinement iterations (blocksize loop).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2200 <slepc4py/SLEPc/PEP.pyx#L2200>`
- getCISSSizes()
- Get the values of various size parameters in the CISS solver.
Not collective.
- ip (int <https://docs.python.org/3/library/functions.html#int>) – Number of integration points.
- bs (int <https://docs.python.org/3/library/functions.html#int>) – Block size.
- ms (int <https://docs.python.org/3/library/functions.html#int>) – Moment size.
- npart (int <https://docs.python.org/3/library/functions.html#int>) – Number of partitions when splitting the communicator.
- bsmax (int <https://docs.python.org/3/library/functions.html#int>) – Maximum block size.
- realmats (bool <https://docs.python.org/3/library/functions.html#bool>) – True if A and B are real.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, int <https://docs.python.org/3/library/functions.html#int>, bool <https://docs.python.org/3/library/functions.html#bool>]
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2114 <slepc4py/SLEPc/PEP.pyx#L2114>`
- getCISSThreshold()
- Get the values of various threshold parameters in the CISS solver.
Not collective.
- delta (float <https://docs.python.org/3/library/functions.html#float>) – Threshold for numerical rank.
- spur (float <https://docs.python.org/3/library/functions.html#float>) – Spurious threshold (to discard spurious eigenpairs.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2163 <slepc4py/SLEPc/PEP.pyx#L2163>`
- getConverged()
- Get the number of converged eigenpairs.
Not collective.
- Returns
- Number of converged eigenpairs.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1226 <slepc4py/SLEPc/PEP.pyx#L1226>`
- getConvergedReason()
- Get the reason why the solve() iteration was stopped.
Not collective.
- Returns
- Negative value indicates diverged, positive value converged.
- Return type
- ConvergedReason <#slepc4py.SLEPc.PEP.ConvergedReason>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1210 <slepc4py/SLEPc/PEP.pyx#L1210>`
- getConvergenceTest()
- Get the method used to compute the error estimate used in the convergence
test.
Not collective.
- Returns
- The method used to compute the error estimate used in the convergence test.
- Return type
- Conv <#slepc4py.SLEPc.PEP.Conv>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:601 <slepc4py/SLEPc/PEP.pyx#L601>`
- getDS()
- Get the direct solver associated to the eigensolver.
Not collective.
- Returns
- The direct solver context.
- Return type
- DS <#slepc4py.SLEPc.DS>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1012 <slepc4py/SLEPc/PEP.pyx#L1012>`
- getDimensions()
- Get the number of eigenvalues to compute and the dimension of the
subspace.
Not collective.
- nev (int <https://docs.python.org/3/library/functions.html#int>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:779 <slepc4py/SLEPc/PEP.pyx#L779>`
- getEigenpair(i, Vr=None, Vi=None)
- Get the i-th solution of the eigenproblem as computed by solve().
Collective.
The solution consists of both the eigenvalue and the eigenvector.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Vr (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (real part).
- Vi (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned eigenvector (imaginary part).
- Returns
- The computed eigenvalue.
- Return type
- complex <https://docs.python.org/3/library/functions.html#complex>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1241 <slepc4py/SLEPc/PEP.pyx#L1241>`
- getErrorEstimate(i)
- Get the error estimate associated to the i-th computed eigenpair.
Not collective.
- Parameters
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be considered.
- Returns
- Error estimate.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1270 <slepc4py/SLEPc/PEP.pyx#L1270>`
- getExtract()
- Get the extraction technique used by the PEP object.
Not collective.
- Returns
- The extraction strategy.
- Return type
- Extract <#slepc4py.SLEPc.PEP.Extract>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:732 <slepc4py/SLEPc/PEP.pyx#L732>`
- getInterval()
- Get the computational interval for spectrum slicing.
Not collective.
- inta (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- intb (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
Notes
If the interval was not set by the user, then zeros are returned.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:554 <slepc4py/SLEPc/PEP.pyx#L554>`
- getIterationNumber()
- Get the current iteration number.
Not collective.
If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.
- Returns
- Iteration number.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1192 <slepc4py/SLEPc/PEP.pyx#L1192>`
- getJDFix()
- Get threshold for changing the target in the correction equation.
Not collective.
- Returns
- The threshold for changing the target.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1931 <slepc4py/SLEPc/PEP.pyx#L1931>`
- getJDMinimalityIndex()
- Get the maximum allowed value of the minimality index.
Not collective.
- Returns
- The maximum minimality index.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1989 <slepc4py/SLEPc/PEP.pyx#L1989>`
- getJDProjection()
- Get the type of projection to be used in the Jacobi-Davidson solver.
Not collective.
- Returns
- The type of projection.
- Return type
- JDProjection <#slepc4py.SLEPc.PEP.JDProjection>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2018 <slepc4py/SLEPc/PEP.pyx#L2018>`
- getJDRestart()
- Get the restart parameter used in the Jacobi-Davidson method.
Not collective.
- Returns
- The number of vectors to be kept at restart.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1896 <slepc4py/SLEPc/PEP.pyx#L1896>`
- getJDReusePreconditioner()
- Get the flag for reusing the preconditioner.
Not collective.
- Returns
- The reuse flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1960 <slepc4py/SLEPc/PEP.pyx#L1960>`
- getLinearEPS()
- Get the eigensolver object associated to the polynomial eigenvalue solver.
Collective.
- Returns
- The linear eigensolver.
- Return type
- EPS <#slepc4py.SLEPc.EPS>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1398 <slepc4py/SLEPc/PEP.pyx#L1398>`
- getLinearExplicitMatrix()
- Get if the matrices A and B for the linearization are built explicitly.
Not collective.
Get the flag indicating if the matrices A and B for the linearization are built explicitly.
- Returns
- Boolean flag indicating if the matrices are built explicitly.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1472 <slepc4py/SLEPc/PEP.pyx#L1472>`
- getLinearLinearization()
- Get the coeffs. defining the linearization of a quadratic eigenproblem.
Not collective.
Return the coefficients that define the linearization of a quadratic eigenproblem.
- alpha (float <https://docs.python.org/3/library/functions.html#float>) – First parameter of the linearization.
- beta (float <https://docs.python.org/3/library/functions.html#float>) – Second parameter of the linearization.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1434 <slepc4py/SLEPc/PEP.pyx#L1434>`
- getMonitor()
- Get the list of monitor functions.
Not collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1154 <slepc4py/SLEPc/PEP.pyx#L1154>`
- Return type
- PEPMonitorFunction <#slepc4py.typing.PEPMonitorFunction>
- getOperators()
- Get the matrices associated with the eigenvalue problem.
Collective.
- Returns
- The matrices associated with the eigensystem.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1041 <slepc4py/SLEPc/PEP.pyx#L1041>`
- getOptionsPrefix()
- Get the prefix used for searching for all PEP options in the database.
Not collective.
- Returns
- The prefix string set for this PEP object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:323 <slepc4py/SLEPc/PEP.pyx#L323>`
- getProblemType()
- Get the problem type from the PEP object.
Not collective.
- Returns
- The problem type that was previously set.
- Return type
- ProblemType <#slepc4py.SLEPc.PEP.ProblemType>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:414 <slepc4py/SLEPc/PEP.pyx#L414>`
- getQArnoldiLocking()
- Get the locking flag used in the Q-Arnoldi method.
Not collective.
- Returns
- The locking flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1550 <slepc4py/SLEPc/PEP.pyx#L1550>`
- getQArnoldiRestart()
- Get the restart parameter used in the Q-Arnoldi method.
Not collective.
- Returns
- The number of vectors to be kept at restart.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1514 <slepc4py/SLEPc/PEP.pyx#L1514>`
- getRG()
- Get the region object associated to the eigensolver.
Not collective.
- Returns
- The region context.
- Return type
- RG <#slepc4py.SLEPc.RG>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:983 <slepc4py/SLEPc/PEP.pyx#L983>`
- getRefine()
- Get the refinement strategy used by the PEP object.
Not collective.
Get the refinement strategy used by the PEP object, and the associated parameters.
- ref (Refine <#slepc4py.SLEPc.PEP.Refine>) – The refinement type.
- npart (int <https://docs.python.org/3/library/functions.html#int>) – The number of partitions of the communicator.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- its (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of refinement iterations.
- scheme (RefineScheme <#slepc4py.SLEPc.PEP.RefineScheme>) – Scheme for solving linear systems
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Refine <#slepc4py.SLEPc.PEP.Refine>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>, int <https://docs.python.org/3/library/functions.html#int>, RefineScheme <#slepc4py.SLEPc.PEP.RefineScheme>]
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:632 <slepc4py/SLEPc/PEP.pyx#L632>`
- getRefineKSP()
- Get the KSP object used by the eigensolver in the refinement phase.
Collective.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:702 <slepc4py/SLEPc/PEP.pyx#L702>`
- getST()
- Get the ST <#slepc4py.SLEPc.ST> object associated to the
eigensolver object.
Not collective.
Get the spectral transformation object associated to the eigensolver object.
- Returns
- The spectral transformation.
- Return type
- ST <#slepc4py.SLEPc.ST>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:828 <slepc4py/SLEPc/PEP.pyx#L828>`
- getSTOARCheckEigenvalueType()
- Get the flag for the eigenvalue type check in spectrum slicing.
Not collective.
- Returns
- Whether the eigenvalue type is checked or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1857 <slepc4py/SLEPc/PEP.pyx#L1857>`
- getSTOARDetectZeros()
- Get the flag that enforces zero detection in spectrum slicing.
Not collective.
- Returns
- The zero detection flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1739 <slepc4py/SLEPc/PEP.pyx#L1739>`
- getSTOARDimensions()
- Get the dimensions used for each subsolve step.
Not collective.
Get the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval.
- nev (int <https://docs.python.org/3/library/functions.html#int>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1786 <slepc4py/SLEPc/PEP.pyx#L1786>`
- getSTOARInertias()
- Get the values of the shifts and their corresponding inertias.
Not collective.
Get the values of the shifts and their corresponding inertias in case of doing spectrum slicing for a computational interval.
- shifts (ArrayReal <#slepc4py.typing.ArrayReal>) – The values of the shifts used internally in the solver.
- inertias (ArrayInt <#slepc4py.typing.ArrayInt>) – The values of the inertia in each shift.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayReal <#slepc4py.typing.ArrayReal>, ArrayInt <#slepc4py.typing.ArrayInt>]
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1810 <slepc4py/SLEPc/PEP.pyx#L1810>`
- getSTOARLinearization()
- Get the coefficients that define the linearization of a quadratic
eigenproblem.
Not collective.
- alpha (float <https://docs.python.org/3/library/functions.html#float>) – First parameter of the linearization.
- beta (float <https://docs.python.org/3/library/functions.html#float>) – Second parameter of the linearization.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1659 <slepc4py/SLEPc/PEP.pyx#L1659>`
- getSTOARLocking()
- Get the locking flag used in the STOAR method.
Not collective.
- Returns
- The locking flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1698 <slepc4py/SLEPc/PEP.pyx#L1698>`
- getScale(Dl=None, Dr=None)
- Get the strategy used for scaling the polynomial eigenproblem.
Not collective.
- Dl (petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned left diagonal matrix.
- Dr (petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned right diagonal matrix.
- scale (Scale <#slepc4py.SLEPc.PEP.Scale>) – The scaling strategy.
- alpha (float <https://docs.python.org/3/library/functions.html#float>) – The scaling factor.
- its (int <https://docs.python.org/3/library/functions.html#int>) – The number of iteration of diagonal scaling.
- lbda (float <https://docs.python.org/3/library/functions.html#float>) – Approximation of the wanted eigenvalues (modulus).
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scale <#slepc4py.SLEPc.PEP.Scale>, float <https://docs.python.org/3/library/functions.html#float>, int <https://docs.python.org/3/library/functions.html#int>, float <https://docs.python.org/3/library/functions.html#float>]
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:860 <slepc4py/SLEPc/PEP.pyx#L860>`
- getStoppingTest()
- Get the stopping function.
Not collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1123 <slepc4py/SLEPc/PEP.pyx#L1123>`
- Return type
- PEPStoppingFunction <#slepc4py.typing.PEPStoppingFunction>
- getTOARLocking()
- Get the locking flag used in the TOAR method.
Not collective.
- Returns
- The locking flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1625 <slepc4py/SLEPc/PEP.pyx#L1625>`
- getTOARRestart()
- Get the restart parameter used in the TOAR method.
Not collective.
- Returns
- The number of vectors to be kept at restart.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1589 <slepc4py/SLEPc/PEP.pyx#L1589>`
- getTarget()
- Get the value of the target.
Not collective.
- Returns
- The value of the target.
- Return type
- Scalar <#slepc4py.typing.Scalar>
Notes
If the target was not set by the user, then zero is returned.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:472 <slepc4py/SLEPc/PEP.pyx#L472>`
- getTolerances()
- Get the tolerance and maximum iteration count.
Not collective.
Get the tolerance and maximum iteration count used by the default PEP convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of iterations
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:511 <slepc4py/SLEPc/PEP.pyx#L511>`
- getTrackAll()
- Get the flag indicating whether all residual norms must be computed.
Not collective.
- Returns
- Whether the solver compute all residuals or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:747 <slepc4py/SLEPc/PEP.pyx#L747>`
- getType()
- Get the PEP type of this object.
Not collective.
- Returns
- The solver currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:308 <slepc4py/SLEPc/PEP.pyx#L308>`
- getWhichEigenpairs()
- Get which portion of the spectrum is to be sought.
Not collective.
- Returns
- The portion of the spectrum to be sought by the solver.
- Return type
- Which <#slepc4py.SLEPc.PEP.Which>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:443 <slepc4py/SLEPc/PEP.pyx#L443>`
- reset()
- Reset the PEP object.
Collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:268 <slepc4py/SLEPc/PEP.pyx#L268>`
- setBV(bv)
- Set a basis vectors object associated to the eigensolver.
Collective.
- Parameters
- bv (BV <#slepc4py.SLEPc.BV>) – The basis vectors context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:970 <slepc4py/SLEPc/PEP.pyx#L970>`
- setBasis(basis)
- Set the type of polynomial basis used.
Logically collective.
Set the type of polynomial basis used to describe the polynomial eigenvalue problem.
- Parameters
- basis (Basis <#slepc4py.SLEPc.PEP.Basis>) – The basis to be set.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:397 <slepc4py/SLEPc/PEP.pyx#L397>`
- setCISSExtraction(extraction)
- Set the extraction technique used in the CISS solver.
Logically collective.
- Parameters
- extraction (CISSExtraction <#slepc4py.SLEPc.PEP.CISSExtraction>) – The extraction technique.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2035 <slepc4py/SLEPc/PEP.pyx#L2035>`
- setCISSRefinement(inner=None, blsize=None)
- Set the values of various refinement parameters in the CISS solver.
Logically collective.
- inner (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of iterative refinement iterations (inner loop).
- blsize (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of iterative refinement iterations (blocksize loop).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2181 <slepc4py/SLEPc/PEP.pyx#L2181>`
- setCISSSizes(ip=None, bs=None, ms=None, npart=None, bsmax=None, realmats=False)
- Set the values of various size parameters in the CISS solver.
Logically collective.
- ip (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of integration points.
- bs (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Block size.
- ms (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Moment size.
- npart (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of partitions when splitting the communicator.
- bsmax (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum block size.
- realmats (bool <https://docs.python.org/3/library/functions.html#bool>) – True if A and B are real.
Notes
The default number of partitions is 1. This means the internal petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> object is shared among all processes of the PEP communicator. Otherwise, the communicator is split into npart communicators, so that npart petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> solves proceed simultaneously.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2064 <slepc4py/SLEPc/PEP.pyx#L2064>`
- setCISSThreshold(delta=None, spur=None)
- Set the values of various threshold parameters in the CISS solver.
Logically collective.
- delta (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Threshold for numerical rank.
- spur (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Spurious threshold (to discard spurious eigenpairs).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2144 <slepc4py/SLEPc/PEP.pyx#L2144>`
- setConvergenceTest(conv)
- Set how to compute the error estimate used in the convergence test.
Logically collective.
- Parameters
- conv (Conv <#slepc4py.SLEPc.PEP.Conv>) – The method used to compute the error estimate used in the convergence test.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:617 <slepc4py/SLEPc/PEP.pyx#L617>`
- setDS(ds)
- Set a direct solver object associated to the eigensolver.
Collective.
- Parameters
- ds (DS <#slepc4py.SLEPc.DS>) – The direct solver context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1028 <slepc4py/SLEPc/PEP.pyx#L1028>`
- setDimensions(nev=None, ncv=None, mpd=None)
- Set the number of eigenvalues to compute and the dimension of the
subspace.
Logically collective.
- nev (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:800 <slepc4py/SLEPc/PEP.pyx#L800>`
- setExtract(extract)
- Set the extraction strategy to be used.
Logically collective.
- Parameters
- extract (Extract <#slepc4py.SLEPc.PEP.Extract>) – The extraction strategy.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:718 <slepc4py/SLEPc/PEP.pyx#L718>`
- setFromOptions()
- Set PEP options from the options database.
Collective.
This routine must be called before setUp() if the user is to be allowed to set the solver type.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:368 <slepc4py/SLEPc/PEP.pyx#L368>`
- setInitialSpace(space)
- Set the initial space from which the eigensolver starts to iterate.
Collective.
- Parameters
- space (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>]) – The initial space
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1083 <slepc4py/SLEPc/PEP.pyx#L1083>`
- setInterval(inta, intb)
- Set the computational interval for spectrum slicing.
Logically collective.
- inta (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- intb (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
Notes
Spectrum slicing is a technique employed for computing all eigenvalues of symmetric quadratic eigenproblems in a given interval. This function provides the interval to be considered. It must be used in combination with PEP.Which.ALL <#slepc4py.SLEPc.PEP.Which.ALL>, see setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:576 <slepc4py/SLEPc/PEP.pyx#L576>`
- setJDFix(fix)
- Set the threshold for changing the target in the correction equation.
Logically collective.
- Parameters
- fix (float <https://docs.python.org/3/library/functions.html#float>) – Threshold for changing the target.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The target in the correction equation is fixed at the first iterations. When the norm of the residual vector is lower than the fix value, the target is set to the corresponding eigenvalue.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1911 <slepc4py/SLEPc/PEP.pyx#L1911>`
- setJDMinimalityIndex(flag)
- Set the maximum allowed value for the minimality index.
Logically collective.
- Parameters
- flag (int <https://docs.python.org/3/library/functions.html#int>) – The maximum minimality index.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1975 <slepc4py/SLEPc/PEP.pyx#L1975>`
- setJDProjection(proj)
- Set the type of projection to be used in the Jacobi-Davidson solver.
Logically collective.
- Parameters
- proj (JDProjection <#slepc4py.SLEPc.PEP.JDProjection>) – The type of projection.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2004 <slepc4py/SLEPc/PEP.pyx#L2004>`
- setJDRestart(keep)
- Set the restart parameter for the Jacobi-Davidson method.
Logically collective.
Set the restart parameter for the Jacobi-Davidson method, in particular the proportion of basis vectors that must be kept after restart.
- Parameters
- keep (float <https://docs.python.org/3/library/functions.html#float>) – The number of vectors to be kept at restart.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are in the range [0.1,0.9]. The default is 0.5.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1874 <slepc4py/SLEPc/PEP.pyx#L1874>`
- setJDReusePreconditioner(flag)
- Set a flag indicating whether the preconditioner must be reused or not.
Logically collective.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – The reuse flag.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1946 <slepc4py/SLEPc/PEP.pyx#L1946>`
- setLinearEPS(eps)
- Set an eigensolver object associated to the polynomial eigenvalue solver.
Collective.
- Parameters
- eps (EPS <#slepc4py.SLEPc.EPS>) – The linear eigensolver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1385 <slepc4py/SLEPc/PEP.pyx#L1385>`
- setLinearExplicitMatrix(flag)
- Set flag to explicitly build the matrices A and B.
Logically collective.
Toggle if the matrices A and B for the linearization of the problem must be built explicitly.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – Boolean flag indicating if the matrices are built explicitly.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1455 <slepc4py/SLEPc/PEP.pyx#L1455>`
- setLinearLinearization(alpha=1.0, beta=0.0)
- Set the coefficients that define the linearization of a quadratic
eigenproblem.
Logically collective.
Set the coefficients that define the linearization of a quadratic eigenproblem.
- alpha (float <https://docs.python.org/3/library/functions.html#float>) – First parameter of the linearization.
- beta (float <https://docs.python.org/3/library/functions.html#float>) – Second parameter of the linearization.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1414 <slepc4py/SLEPc/PEP.pyx#L1414>`
- setMonitor(monitor, args=None, kargs=None)
- Append a monitor function to the list of monitors.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1133 <slepc4py/SLEPc/PEP.pyx#L1133>`
- monitor (PEPMonitorFunction <#slepc4py.typing.PEPMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setOperators(operators)
- Set the matrices associated with the eigenvalue problem.
Collective.
- Parameters
- operators (list <https://docs.python.org/3/library/stdtypes.html#list>[Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>]) – The matrices associated with the eigensystem.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1063 <slepc4py/SLEPc/PEP.pyx#L1063>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all PEP options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all PEP option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:338 <slepc4py/SLEPc/PEP.pyx#L338>`
- setProblemType(problem_type)
- Set the type of the eigenvalue problem.
Logically collective.
- Parameters
- problem_type (ProblemType <#slepc4py.SLEPc.PEP.ProblemType>) – The problem type to be set.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:429 <slepc4py/SLEPc/PEP.pyx#L429>`
- setQArnoldiLocking(lock)
- Toggle between locking and non-locking variants of the Q-Arnoldi method.
Logically collective.
- Parameters
- lock (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the locking variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The default is to lock converged eigenpairs when the method restarts. This behavior can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1529 <slepc4py/SLEPc/PEP.pyx#L1529>`
- setQArnoldiRestart(keep)
- Set the restart parameter for the Q-Arnoldi method.
Logically collective.
Set the restart parameter for the Q-Arnoldi method, in particular the proportion of basis vectors that must be kept after restart.
- Parameters
- keep (float <https://docs.python.org/3/library/functions.html#float>) – The number of vectors to be kept at restart.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are in the range [0.1,0.9]. The default is 0.5.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1492 <slepc4py/SLEPc/PEP.pyx#L1492>`
- setRG(rg)
- Set a region object associated to the eigensolver.
Collective.
- Parameters
- rg (RG <#slepc4py.SLEPc.RG>) – The region context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:999 <slepc4py/SLEPc/PEP.pyx#L999>`
- setRefine(ref, npart=None, tol=None, its=None, scheme=None)
- Set the refinement strategy used by the PEP object.
Logically collective.
Set the refinement strategy used by the PEP object, and the associated parameters.
- ref (Refine <#slepc4py.SLEPc.PEP.Refine>) – The refinement type.
- npart (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The number of partitions of the communicator.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- its (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of refinement iterations.
- scheme (RefineScheme <#slepc4py.SLEPc.PEP.RefineScheme> | None <https://docs.python.org/3/library/constants.html#None>) – Scheme for linear system solves
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:662 <slepc4py/SLEPc/PEP.pyx#L662>`
- setST(st)
- Set a spectral transformation object associated to the eigensolver.
Collective.
- Parameters
- st (ST <#slepc4py.SLEPc.ST>) – The spectral transformation.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:847 <slepc4py/SLEPc/PEP.pyx#L847>`
- setSTOARCheckEigenvalueType(flag)
- Set flag to check if all eigenvalues have the same definite type.
Logically collective.
Set a flag to check that all the eigenvalues obtained throughout the spectrum slicing computation have the same definite type.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the eigenvalue type is checked or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1840 <slepc4py/SLEPc/PEP.pyx#L1840>`
- setSTOARDetectZeros(detect)
- Set flag to enforce detection of zeros during the factorizations.
Logically collective.
Set a flag to enforce detection of zeros during the factorizations throughout the spectrum slicing computation.
- Parameters
- detect (bool <https://docs.python.org/3/library/functions.html#bool>) – True if zeros must checked for.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A zero in the factorization indicates that a shift coincides with an eigenvalue.
This flag is turned off by default, and may be necessary in some cases. This feature currently requires an external package for factorizations with support for zero detection, e.g. MUMPS.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1713 <slepc4py/SLEPc/PEP.pyx#L1713>`
- setSTOARDimensions(nev=None, ncv=None, mpd=None)
- Set the dimensions used for each subsolve step.
Logically collective.
Set the dimensions used for each subsolve step in case of doing spectrum slicing for a computational interval. The meaning of the parameters is the same as in setDimensions().
- nev (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of eigenvalues to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1754 <slepc4py/SLEPc/PEP.pyx#L1754>`
- setSTOARLinearization(alpha=1.0, beta=0.0)
- Set the coefficients that define the linearization of a quadratic
eigenproblem.
Logically collective.
- alpha (float <https://docs.python.org/3/library/functions.html#float>) – First parameter of the linearization.
- beta (float <https://docs.python.org/3/library/functions.html#float>) – Second parameter of the linearization.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1642 <slepc4py/SLEPc/PEP.pyx#L1642>`
- setSTOARLocking(lock)
- Toggle between locking and non-locking variants of the STOAR method.
Logically collective.
- Parameters
- lock (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the locking variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The default is to lock converged eigenpairs when the method restarts. This behavior can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1677 <slepc4py/SLEPc/PEP.pyx#L1677>`
- setScale(scale, alpha=None, Dl=None, Dr=None, its=None, lbda=None)
- Set the scaling strategy to be used.
Collective.
Set the scaling strategy to be used for scaling the polynomial problem before attempting to solve.
- scale (Scale <#slepc4py.SLEPc.PEP.Scale>) – The scaling strategy.
- alpha (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The scaling factor.
- Dl (petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – The left diagonal matrix.
- Dr (petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – The right diagonal matrix.
- its (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The number of iteration of diagonal scaling.
- lbda (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – Approximation of the wanted eigenvalues (modulus).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:909 <slepc4py/SLEPc/PEP.pyx#L909>`
- setStoppingTest(stopping, args=None, kargs=None)
- Set a function to decide when to stop the outer iteration of the
eigensolver.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1103 <slepc4py/SLEPc/PEP.pyx#L1103>`
- stopping (PEPStoppingFunction <#slepc4py.typing.PEPStoppingFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setTOARLocking(lock)
- Toggle between locking and non-locking variants of the TOAR method.
Logically collective.
- Parameters
- lock (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the locking variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The default is to lock converged eigenpairs when the method restarts. This behavior can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1604 <slepc4py/SLEPc/PEP.pyx#L1604>`
- setTOARRestart(keep)
- Set the restart parameter for the TOAR method.
Logically collective.
Set the restart parameter for the TOAR method, in particular the proportion of basis vectors that must be kept after restart.
- Parameters
- keep (float <https://docs.python.org/3/library/functions.html#float>) – The number of vectors to be kept at restart.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are in the range [0.1,0.9]. The default is 0.5.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1567 <slepc4py/SLEPc/PEP.pyx#L1567>`
- setTarget(target)
- Set the value of the target.
Logically collective.
- Parameters
- target (Scalar <#slepc4py.typing.Scalar>) – The value of the target.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The target is a scalar value used to determine the portion of the spectrum of interest. It is used in combination with setWhichEigenpairs().
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:491 <slepc4py/SLEPc/PEP.pyx#L491>`
- setTolerances(tol=None, max_it=None)
- Set the tolerance and maximum iteration count.
Logically collective.
Set the tolerance and maximum iteration count used by the default PEP convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of iterations
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:532 <slepc4py/SLEPc/PEP.pyx#L532>`
- setTrackAll(trackall)
- Set flag to compute the residual of all approximate eigenpairs.
Logically collective.
Set if the solver must compute the residual of all approximate eigenpairs or not.
- Parameters
- trackall (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether compute all residuals or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:762 <slepc4py/SLEPc/PEP.pyx#L762>`
- setType(pep_type)
- Set the particular solver to be used in the PEP object.
Logically collective.
- Parameters
- pep_type (Type <#slepc4py.SLEPc.PEP.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The solver to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:293 <slepc4py/SLEPc/PEP.pyx#L293>`
- setUp()
- Set up all the necessary internal data structures.
Collective.
Set up all the internal data structures necessary for the execution of the eigensolver.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1173 <slepc4py/SLEPc/PEP.pyx#L1173>`
- setWhichEigenpairs(which)
- Set which portion of the spectrum is to be sought.
Logically collective.
- Parameters
- which (Which <#slepc4py.SLEPc.PEP.Which>) – The portion of the spectrum to be sought by the solver.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:458 <slepc4py/SLEPc/PEP.pyx#L458>`
- solve()
- Solve the eigensystem.
Collective.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1184 <slepc4py/SLEPc/PEP.pyx#L1184>`
- valuesView(viewer=None)
- Display the computed eigenvalues in a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1353 <slepc4py/SLEPc/PEP.pyx#L1353>`
- vectorsView(viewer=None)
- Output computed eigenvectors to a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:1368 <slepc4py/SLEPc/PEP.pyx#L1368>`
- view(viewer=None)
- Print the PEP data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:243 <slepc4py/SLEPc/PEP.pyx#L243>`
Attributes Documentation
- bv
- The basis vectors (BV) object associated.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2299 <slepc4py/SLEPc/PEP.pyx#L2299>`
- ds
- The direct solver (DS) object associated.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2313 <slepc4py/SLEPc/PEP.pyx#L2313>`
- extract
- The type of extraction technique to be employed.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2264 <slepc4py/SLEPc/PEP.pyx#L2264>`
- max_it
- The maximum iteration count.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2278 <slepc4py/SLEPc/PEP.pyx#L2278>`
- problem_type
- The type of the eigenvalue problem.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2243 <slepc4py/SLEPc/PEP.pyx#L2243>`
- rg
- The region (RG) object associated.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2306 <slepc4py/SLEPc/PEP.pyx#L2306>`
- st
- The spectral transformation (ST) object associated.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2292 <slepc4py/SLEPc/PEP.pyx#L2292>`
- target
- The value of the target.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2257 <slepc4py/SLEPc/PEP.pyx#L2257>`
- tol
- The tolerance.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2271 <slepc4py/SLEPc/PEP.pyx#L2271>`
- track_all
- Compute the residual norm of all approximate eigenpairs.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2285 <slepc4py/SLEPc/PEP.pyx#L2285>`
- which
- The portion of the spectrum to be sought.
:sources:`Source code at slepc4py/SLEPc/PEP.pyx:2250 <slepc4py/SLEPc/PEP.pyx#L2250>`
slepc4py.SLEPc.RG¶
- class slepc4py.SLEPc.RG
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
RG.
Enumerations
QuadRule <#slepc4py.SLEPc.RG.QuadRule> RG quadrature rule for contour integral methods. Type <#slepc4py.SLEPc.RG.Type> RG type.
slepc4py.SLEPc.RG.QuadRule¶
- class slepc4py.SLEPc.RG.QuadRule
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
RG quadrature rule for contour integral methods.
- TRAPEZOIDAL: Trapezoidal rule.
- CHEBYSHEV: Chebyshev points.
Attributes Summary
| CHEBYSHEV | Constant CHEBYSHEV of type int <https://docs.python.org/3/library/functions.html#int> |
| TRAPEZOIDAL | Constant TRAPEZOIDAL of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.RG.Type¶
- class slepc4py.SLEPc.RG.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
RG type.
Attributes Summary
ELLIPSE Object ELLIPSE of type str <https://docs.python.org/3/library/stdtypes.html#str> INTERVAL Object INTERVAL of type str <https://docs.python.org/3/library/stdtypes.html#str> POLYGON Object POLYGON of type str <https://docs.python.org/3/library/stdtypes.html#str> RING Object RING of type str <https://docs.python.org/3/library/stdtypes.html#str> Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all RG options in the database. |
| canUseConjugates([realmats]) | Half of integration points can be avoided (use their conjugates). |
| checkInside(a) | Determine if a set of given points are inside the region or not. |
| computeBoundingBox() | Endpoints of a rectangle in the complex plane containing the region. |
| computeContour(n) | Compute the coordinates of several points of the contour on the region. |
| computeQuadrature(quad, n) | Compute the values of the parameters used in a quadrature rule. |
| create([comm]) | Create the RG object. |
| destroy() | Destroy the RG object. |
| getComplement() | Get the flag indicating whether the region is complemented or not. |
| getEllipseParameters() | Get the parameters that define the ellipse region. |
| getIntervalEndpoints() | Get the parameters that define the interval region. |
| getOptionsPrefix() | Get the prefix used for searching for all RG options in the database. |
| getPolygonVertices() | Get the parameters that define the interval region. |
| getRingParameters() | Get the parameters that define the ring region. |
| getScale() | Get the scaling factor. |
| getType() | Get the RG type of this object. |
| isAxisymmetric([vertical]) | Determine if the region is symmetric wrt. |
| isTrivial() | Tell whether it is the trivial region (whole complex plane). |
| setComplement([comp]) | Set a flag to indicate that the region is the complement of the specified one. |
| setEllipseParameters(center, radius[, vscale]) | Set the parameters defining the ellipse region. |
| setFromOptions() | Set RG options from the options database. |
| setIntervalEndpoints(a, b, c, d) | Set the parameters defining the interval region. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all RG options in the database. |
| setPolygonVertices(v) | Set the vertices that define the polygon region. |
| setRingParameters(center, radius, vscale, ...) | Set the parameters defining the ring region. |
| setScale([sfactor]) | Set the scaling factor to be used. |
| setType(rg_type) | Set the type for the RG object. |
| view([viewer]) | Print the RG data structure. |
Attributes Summary
| complement | If the region is the complement of the specified one. |
| scale | The scaling factor to be used. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all RG options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all RG option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:141 <slepc4py/SLEPc/RG.pyx#L141>`
- canUseConjugates(realmats=True)
- Half of integration points can be avoided (use their conjugates).
Not collective.
Used in contour integral methods to determine whether half of integration points can be avoided (use their conjugates).
- Parameters
- realmats (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the problem matrices are real.
- Returns
- Whether it is possible to use conjugates.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:361 <slepc4py/SLEPc/RG.pyx#L361>`
- checkInside(a)
- Determine if a set of given points are inside the region or not.
Not collective.
- Parameters
- a (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[complex <https://docs.python.org/3/library/functions.html#complex>]) – The coordinates of the points.
- Returns
- Computed result for each point (1=inside, 0=on the contour, -1=outside).
- Return type
- ArrayInt <#slepc4py.typing.ArrayInt>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:274 <slepc4py/SLEPc/RG.pyx#L274>`
- computeBoundingBox()
- Endpoints of a rectangle in the complex plane containing the region.
Not collective.
Determine the endpoints of a rectangle in the complex plane that contains the region.
- a (float <https://docs.python.org/3/library/functions.html#float>) – The left endpoint of the bounding box in the real axis
- b (float <https://docs.python.org/3/library/functions.html#float>) – The right endpoint of the bounding box in the real axis
- c (float <https://docs.python.org/3/library/functions.html#float>) – The left endpoint of the bounding box in the imaginary axis
- d (float <https://docs.python.org/3/library/functions.html#float>) – The right endpoint of the bounding box in the imaginary axis
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]
:sources:`Source code at slepc4py/SLEPc/RG.pyx:337 <slepc4py/SLEPc/RG.pyx#L337>`
- computeContour(n)
- Compute the coordinates of several points of the contour on the region.
Not collective.
Compute the coordinates of several points lying on the contour of the region.
- Parameters
- n (int <https://docs.python.org/3/library/functions.html#int>) – The number of points to compute.
- Returns
- Computed points.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of complex <https://docs.python.org/3/library/functions.html#complex>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:306 <slepc4py/SLEPc/RG.pyx#L306>`
- computeQuadrature(quad, n)
- Compute the values of the parameters used in a quadrature rule.
Not collective.
Compute the values of the parameters used in a quadrature rule for a contour integral around the boundary of the region.
- quad (QuadRule <#slepc4py.SLEPc.RG.QuadRule>) – The type of quadrature.
- n (int <https://docs.python.org/3/library/functions.html#int>) – The number of quadrature points to compute.
- z (ArrayScalar <#slepc4py.typing.ArrayScalar>) – Quadrature points.
- zn (ArrayScalar <#slepc4py.typing.ArrayScalar>) – Normalized quadrature points.
- w (ArrayScalar <#slepc4py.typing.ArrayScalar>) – Quadrature weights.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[ArrayScalar <#slepc4py.typing.ArrayScalar>, ArrayScalar <#slepc4py.typing.ArrayScalar>, ArrayScalar <#slepc4py.typing.ArrayScalar>]
:sources:`Source code at slepc4py/SLEPc/RG.pyx:385 <slepc4py/SLEPc/RG.pyx#L385>`
- create(comm=None)
- Create the RG object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:58 <slepc4py/SLEPc/RG.pyx#L58>`
- destroy()
- Destroy the RG object.
Collective.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:48 <slepc4py/SLEPc/RG.pyx#L48>`
- getComplement()
- Get the flag indicating whether the region is complemented or not.
Not collective.
- Returns
- Whether the region is complemented or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:212 <slepc4py/SLEPc/RG.pyx#L212>`
- getEllipseParameters()
- Get the parameters that define the ellipse region.
Not collective.
- center (Scalar <#slepc4py.typing.Scalar>) – The center.
- radius (float <https://docs.python.org/3/library/functions.html#float>) – The radius.
- vscale (float <https://docs.python.org/3/library/functions.html#float>) – The vertical scale.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scalar <#slepc4py.typing.Scalar>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]
:sources:`Source code at slepc4py/SLEPc/RG.pyx:442 <slepc4py/SLEPc/RG.pyx#L442>`
- getIntervalEndpoints()
- Get the parameters that define the interval region.
Not collective.
- a (float <https://docs.python.org/3/library/functions.html#float>) – The left endpoint in the real axis.
- b (float <https://docs.python.org/3/library/functions.html#float>) – The right endpoint in the real axis.
- c (float <https://docs.python.org/3/library/functions.html#float>) – The upper endpoint in the imaginary axis.
- d (float <https://docs.python.org/3/library/functions.html#float>) – The lower endpoint in the imaginary axis.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]
:sources:`Source code at slepc4py/SLEPc/RG.pyx:486 <slepc4py/SLEPc/RG.pyx#L486>`
- getOptionsPrefix()
- Get the prefix used for searching for all RG options in the database.
Not collective.
- Returns
- The prefix string set for this RG object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:126 <slepc4py/SLEPc/RG.pyx#L126>`
- getPolygonVertices()
- Get the parameters that define the interval region.
Not collective.
- Returns
- The vertices.
- Return type
- ArrayComplex <#slepc4py.typing.ArrayComplex>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:534 <slepc4py/SLEPc/RG.pyx#L534>`
- getRingParameters()
- Get the parameters that define the ring region.
Not collective.
- center (Scalar <#slepc4py.typing.Scalar>) – The center.
- radius (float <https://docs.python.org/3/library/functions.html#float>) – The radius.
- vscale (float <https://docs.python.org/3/library/functions.html#float>) – The vertical scale.
- start_ang (float <https://docs.python.org/3/library/functions.html#float>) – The right-hand side angle.
- end_ang (float <https://docs.python.org/3/library/functions.html#float>) – The left-hand side angle.
- width (float <https://docs.python.org/3/library/functions.html#float>) – The width of the ring.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Scalar <#slepc4py.typing.Scalar>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>, float <https://docs.python.org/3/library/functions.html#float>]
:sources:`Source code at slepc4py/SLEPc/RG.pyx:593 <slepc4py/SLEPc/RG.pyx#L593>`
- getScale()
- Get the scaling factor.
Not collective.
- Returns
- The scaling factor.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:259 <slepc4py/SLEPc/RG.pyx#L259>`
- getType()
- Get the RG type of this object.
Not collective.
- Returns
- The inner product type currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:90 <slepc4py/SLEPc/RG.pyx#L90>`
- isAxisymmetric(vertical=False)
- Determine if the region is symmetric wrt. the real or imaginary axis.
Not collective.
Determine if the region is symmetric with respect to the real or imaginary axis.
- Parameters
- vertical (bool <https://docs.python.org/3/library/functions.html#bool>) – True if symmetry must be checked against the vertical axis.
- Returns
- True if the region is axisymmetric.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:188 <slepc4py/SLEPc/RG.pyx#L188>`
- isTrivial()
- Tell whether it is the trivial region (whole complex plane).
Not collective.
- Returns
- True if the region is equal to the whole complex plane, e.g., an interval region with all four endpoints unbounded or an ellipse with infinite radius.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:171 <slepc4py/SLEPc/RG.pyx#L171>`
- setComplement(comp=True)
- Set a flag to indicate that the region is the complement of the specified
one.
Logically collective.
- Parameters
- comp (bool <https://docs.python.org/3/library/functions.html#bool>) – Activate/deactivate the complementation of the region.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:227 <slepc4py/SLEPc/RG.pyx#L227>`
- setEllipseParameters(center, radius, vscale=None)
- Set the parameters defining the ellipse region.
Logically collective.
- center (Scalar <#slepc4py.typing.Scalar>) – The center.
- radius (float <https://docs.python.org/3/library/functions.html#float>) – The radius.
- vscale (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The vertical scale.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:421 <slepc4py/SLEPc/RG.pyx#L421>`
- setFromOptions()
- Set RG options from the options database.
Collective.
Notes
To see all options, run your program with the -help option.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:156 <slepc4py/SLEPc/RG.pyx#L156>`
- setIntervalEndpoints(a, b, c, d)
- Set the parameters defining the interval region.
Logically collective.
- a (float <https://docs.python.org/3/library/functions.html#float>) – The left endpoint in the real axis.
- b (float <https://docs.python.org/3/library/functions.html#float>) – The right endpoint in the real axis.
- c (float <https://docs.python.org/3/library/functions.html#float>) – The upper endpoint in the imaginary axis.
- d (float <https://docs.python.org/3/library/functions.html#float>) – The lower endpoint in the imaginary axis.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:463 <slepc4py/SLEPc/RG.pyx#L463>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all RG options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all RG option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:105 <slepc4py/SLEPc/RG.pyx#L105>`
- setPolygonVertices(v)
- Set the vertices that define the polygon region.
Logically collective.
- Parameters
- v (Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[float <https://docs.python.org/3/library/functions.html#float>] | Sequence <https://docs.python.org/3/library/typing.html#typing.Sequence>[Scalar <#slepc4py.typing.Scalar>]) – The vertices.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:510 <slepc4py/SLEPc/RG.pyx#L510>`
- setRingParameters(center, radius, vscale, start_ang, end_ang, width)
- Set the parameters defining the ring region.
Logically collective.
- center (Scalar <#slepc4py.typing.Scalar>) – The center.
- radius (float <https://docs.python.org/3/library/functions.html#float>) – The radius.
- vscale (float <https://docs.python.org/3/library/functions.html#float>) – The vertical scale.
- start_ang (float <https://docs.python.org/3/library/functions.html#float>) – The right-hand side angle.
- end_ang (float <https://docs.python.org/3/library/functions.html#float>) – The left-hand side angle.
- width (float <https://docs.python.org/3/library/functions.html#float>) – The width of the ring.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:556 <slepc4py/SLEPc/RG.pyx#L556>`
- setScale(sfactor=None)
- Set the scaling factor to be used.
Logically collective.
Set the scaling factor to be used when checking that a point is inside the region and when computing the contour.
- Parameters
- sfactor (float <https://docs.python.org/3/library/functions.html#float>) – The scaling factor (default=1).
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:241 <slepc4py/SLEPc/RG.pyx#L241>`
- setType(rg_type)
- Set the type for the RG object.
Logically collective.
- Parameters
- rg_type (Type <#slepc4py.SLEPc.RG.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The inner product type to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:75 <slepc4py/SLEPc/RG.pyx#L75>`
- view(viewer=None)
- Print the RG data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/RG.pyx:33 <slepc4py/SLEPc/RG.pyx#L33>`
Attributes Documentation
- complement
- If the region is the complement of the specified one.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:625 <slepc4py/SLEPc/RG.pyx#L625>`
- scale
- The scaling factor to be used.
:sources:`Source code at slepc4py/SLEPc/RG.pyx:632 <slepc4py/SLEPc/RG.pyx#L632>`
slepc4py.SLEPc.ST¶
- class slepc4py.SLEPc.ST
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
ST.
Enumerations
FilterDamping <#slepc4py.SLEPc.ST.FilterDamping> ST filter damping. FilterType <#slepc4py.SLEPc.ST.FilterType> ST filter type. MatMode <#slepc4py.SLEPc.ST.MatMode> ST matrix mode. Type <#slepc4py.SLEPc.ST.Type> ST types.
slepc4py.SLEPc.ST.FilterDamping¶
- class slepc4py.SLEPc.ST.FilterDamping
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
ST filter damping.
- NONE: No damping
- JACKSON: Jackson damping
- LANCZOS: Lanczos damping
- FEJER: Fejer damping
Attributes Summary
| FEJER | Constant FEJER of type int <https://docs.python.org/3/library/functions.html#int> |
| JACKSON | Constant JACKSON of type int <https://docs.python.org/3/library/functions.html#int> |
| LANCZOS | Constant LANCZOS of type int <https://docs.python.org/3/library/functions.html#int> |
| NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.ST.FilterType¶
- class slepc4py.SLEPc.ST.FilterType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
ST filter type.
- FILTLAN: An adapted implementation of the Filtered Lanczos Package.
- CHEBYSEV: A polynomial filter based on a truncated Chebyshev series.
Attributes Summary
| CHEBYSHEV | Constant CHEBYSHEV of type int <https://docs.python.org/3/library/functions.html#int> |
| FILTLAN | Constant FILTLAN of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.ST.MatMode¶
- class slepc4py.SLEPc.ST.MatMode
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
ST matrix mode.
- COPY: A working copy of the matrix is created.
- INPLACE: The operation is computed in-place.
- SHELL: The matrix A - \sigma B is handled as an
- implicit matrix.
Attributes Summary
| COPY | Constant COPY of type int <https://docs.python.org/3/library/functions.html#int> |
| INPLACE | Constant INPLACE of type int <https://docs.python.org/3/library/functions.html#int> |
| SHELL | Constant SHELL of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.ST.Type¶
- class slepc4py.SLEPc.ST.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
ST types.
- SHELL: User-defined.
- SHIFT: Shift from origin.
- SINVERT: Shift-and-invert.
- CAYLEY: Cayley transform.
- PRECOND: Preconditioner.
- FILTER: Polynomial filter.
Attributes Summary
| CAYLEY | Object CAYLEY of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| FILTER | Object FILTER of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| PRECOND | Object PRECOND of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| SHELL | Object SHELL of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| SHIFT | Object SHIFT of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| SINVERT | Object SINVERT of type str <https://docs.python.org/3/library/stdtypes.html#str> |
Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all ST options in the database. |
| apply(x, y) | Apply the spectral transformation operator to a vector. |
| applyHermitianTranspose(x, y) | Apply the hermitian-transpose of the operator to a vector. |
| applyMat(x, y) | Apply the spectral transformation operator to a matrix. |
| applyTranspose(x, y) | Apply the transpose of the operator to a vector. |
| create([comm]) | Create the ST object. |
| destroy() | Destroy the ST object. |
| getCayleyAntishift() | Get the value of the anti-shift for the Cayley spectral transformation. |
| getFilterDamping() | Get the type of damping used in the polynomial filter. |
| getFilterDegree() | Get the degree of the filter polynomial. |
| getFilterInterval() | Get the interval containing the desired eigenvalues. |
| getFilterRange() | Get the interval containing all eigenvalues. |
| getFilterType() | Get the method to be used to build the polynomial filter. |
| getKSP() | Get the KSP object associated with the spectral transformation. |
| getMatMode() | Get a flag that indicates how the matrix is being shifted. |
| getMatStructure() | Get the internal Mat.Structure attribute. |
| getMatrices() | Get the matrices associated with the eigenvalue problem. |
| getOperator() | Get a shell matrix that represents the operator of the spectral transformation. |
| getOptionsPrefix() | Get the prefix used for searching for all ST options in the database. |
| getPreconditionerMat() | Get the matrix previously set by setPreconditionerMat(). |
| getShift() | Get the shift associated with the spectral transformation. |
| getSplitPreconditioner() | Get the matrices to be used to build the preconditioner. |
| getTransform() | Get the flag indicating whether the transformed matrices are computed or not. |
| getType() | Get the ST type of this object. |
| reset() | Reset the ST object. |
| restoreOperator(op) | Restore the previously seized operator matrix. |
| setCayleyAntishift(tau) | Set the value of the anti-shift for the Cayley spectral transformation. |
| setFilterDamping(damping) | Set the type of damping to be used in the polynomial filter. |
| setFilterDegree(deg) | Set the degree of the filter polynomial. |
| setFilterInterval(inta, intb) | Set the interval containing the desired eigenvalues. |
| setFilterRange(left, right) | Set the numerical range (or field of values) of the matrix. |
| setFilterType(filter_type) | Set the method to be used to build the polynomial filter. |
| setFromOptions() | Set ST options from the options database. |
| setKSP(ksp) | Set the KSP object associated with the spectral transformation. |
| setMatMode(mode) | Set a flag to indicate how the matrix is being shifted. |
| setMatStructure(structure) | Set an internal Mat.Structure attribute. |
| setMatrices(operators) | Set the matrices associated with the eigenvalue problem. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all ST options in the database. |
| setPreconditionerMat([P]) | Set the matrix to be used to build the preconditioner. |
| setShift(shift) | Set the shift associated with the spectral transformation. |
| setSplitPreconditioner(operators[, structure]) | Set the matrices to be used to build the preconditioner. |
| setTransform([flag]) | Set a flag to indicate whether the transformed matrices are computed or not. |
| setType(st_type) | Set the particular spectral transformation to be used. |
| setUp() | Prepare for the use of a spectral transformation. |
| view([viewer]) | Print the ST data structure. |
Attributes Summary
| ksp | KSP object associated with the spectral transformation. |
| mat_mode | How the transformed matrices are being stored in the ST. |
| mat_structure | Relation of the sparsity pattern of all ST matrices. |
| shift | Value of the shift. |
| transform | If the transformed matrices are computed. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all ST options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all ST option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:198 <slepc4py/SLEPc/ST.pyx#L198>`
- apply(x, y)
- Apply the spectral transformation operator to a vector.
Collective.
Apply the spectral transformation operator to a vector, for instance (A - s B)^{-1} B in the case of the shift-and-invert transformation and generalized eigenproblem.
- x (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The input vector.
- y (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The result vector.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:563 <slepc4py/SLEPc/ST.pyx#L563>`
- applyHermitianTranspose(x, y)
- Apply the hermitian-transpose of the operator to a vector.
Collective.
Apply the hermitian-transpose of the operator to a vector, for instance B^H(A - s B)^{-H} in the case of the shift-and-invert transformation and generalized eigenproblem.
- x (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The input vector.
- y (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The result vector.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:601 <slepc4py/SLEPc/ST.pyx#L601>`
- applyMat(x, y)
- Apply the spectral transformation operator to a matrix.
Collective.
Apply the spectral transformation operator to a matrix, for instance (A - s B)^{-1} B in the case of the shift-and-invert transformation and generalized eigenproblem.
- x (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The input matrix.
- y (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The result matrix.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:620 <slepc4py/SLEPc/ST.pyx#L620>`
- applyTranspose(x, y)
- Apply the transpose of the operator to a vector.
Collective.
Apply the transpose of the operator to a vector, for instance B^T(A - s B)^{-T} in the case of the shift-and-invert transformation and generalized eigenproblem.
- x (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The input vector.
- y (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – The result vector.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:582 <slepc4py/SLEPc/ST.pyx#L582>`
- create(comm=None)
- Create the ST object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:106 <slepc4py/SLEPc/ST.pyx#L106>`
- destroy()
- Destroy the ST object.
Collective.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:88 <slepc4py/SLEPc/ST.pyx#L88>`
- getCayleyAntishift()
- Get the value of the anti-shift for the Cayley spectral transformation.
Not collective.
- Returns
- The anti-shift.
- Return type
- Scalar <#slepc4py.typing.Scalar>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:692 <slepc4py/SLEPc/ST.pyx#L692>`
- getFilterDamping()
- Get the type of damping used in the polynomial filter.
Not collective.
- Returns
- The type of damping.
- Return type
- FilterDamping <#slepc4py.SLEPc.ST.FilterDamping>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:870 <slepc4py/SLEPc/ST.pyx#L870>`
- getFilterDegree()
- Get the degree of the filter polynomial.
Not collective.
- Returns
- The polynomial degree.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:841 <slepc4py/SLEPc/ST.pyx#L841>`
- getFilterInterval()
- Get the interval containing the desired eigenvalues.
Not collective.
- inta (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- intb (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:765 <slepc4py/SLEPc/ST.pyx#L765>`
- getFilterRange()
- Get the interval containing all eigenvalues.
Not collective.
- left (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- right (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:809 <slepc4py/SLEPc/ST.pyx#L809>`
- getFilterType()
- Get the method to be used to build the polynomial filter.
Not collective.
- Returns
- The type of filter.
- Return type
- FilterType <#slepc4py.SLEPc.ST.FilterType>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:721 <slepc4py/SLEPc/ST.pyx#L721>`
- getKSP()
- Get the KSP object associated with the spectral transformation.
Collective.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
Notes
On output, the internal value of petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP> can be NULL if the combination of eigenproblem type and selected transformation does not require to solve a linear system of equations.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:458 <slepc4py/SLEPc/ST.pyx#L458>`
- getMatMode()
- Get a flag that indicates how the matrix is being shifted.
Not collective.
Get a flag that indicates how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations.
- Returns
- The mode flag.
- Return type
- MatMode <#slepc4py.SLEPc.ST.MatMode>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:342 <slepc4py/SLEPc/ST.pyx#L342>`
- getMatStructure()
- Get the internal Mat.Structure attribute.
Not collective.
Get the internal Mat.Structure attribute to indicate which is the relation of the sparsity pattern of the matrices.
- Returns
- The structure flag.
- Return type
- petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:427 <slepc4py/SLEPc/ST.pyx#L427>`
- getMatrices()
- Get the matrices associated with the eigenvalue problem.
Collective.
- Returns
- The matrices associated with the eigensystem.
- Return type
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:378 <slepc4py/SLEPc/ST.pyx#L378>`
- getOperator()
- Get a shell matrix that represents the operator of the spectral
transformation.
Collective.
- Returns
- Operator matrix.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:639 <slepc4py/SLEPc/ST.pyx#L639>`
- getOptionsPrefix()
- Get the prefix used for searching for all ST options in the database.
Not collective.
- Returns
- The prefix string set for this ST object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:183 <slepc4py/SLEPc/ST.pyx#L183>`
- getPreconditionerMat()
- Get the matrix previously set by setPreconditionerMat().
Not collective.
- Returns
- The matrix that will be used in constructing the preconditioner.
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:494 <slepc4py/SLEPc/ST.pyx#L494>`
- getShift()
- Get the shift associated with the spectral transformation.
Not collective.
- Returns
- The value of the shift.
- Return type
- Scalar <#slepc4py.typing.Scalar>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:250 <slepc4py/SLEPc/ST.pyx#L250>`
- getSplitPreconditioner()
- Get the matrices to be used to build the preconditioner.
Not collective.
- list <https://docs.python.org/3/library/stdtypes.html#list> of petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> – The list of matrices associated with the preconditioner.
- petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure> – The structure flag.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[list <https://docs.python.org/3/library/stdtypes.html#list>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>], petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure>]
:sources:`Source code at slepc4py/SLEPc/ST.pyx:529 <slepc4py/SLEPc/ST.pyx#L529>`
- getTransform()
- Get the flag indicating whether the transformed matrices are computed or
not.
Not collective.
- Returns
- This flag is intended for the case of polynomial eigenproblems solved via linearization. If this flag is False (default) the spectral transformation is applied to the linearization (handled by the eigensolver), otherwise it is applied to the original problem.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:283 <slepc4py/SLEPc/ST.pyx#L283>`
- getType()
- Get the ST type of this object.
Not collective.
- Returns
- The spectral transformation currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:147 <slepc4py/SLEPc/ST.pyx#L147>`
- reset()
- Reset the ST object.
Collective.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:98 <slepc4py/SLEPc/ST.pyx#L98>`
- restoreOperator(op)
- Restore the previously seized operator matrix.
Logically collective.
- Parameters
- op (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – Operator matrix previously obtained with getOperator().
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:655 <slepc4py/SLEPc/ST.pyx#L655>`
- setCayleyAntishift(tau)
- Set the value of the anti-shift for the Cayley spectral transformation.
Logically collective.
- Parameters
- tau (Scalar <#slepc4py.typing.Scalar>) – The anti-shift.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
In the generalized Cayley transform, the operator can be expressed as OP = inv(A - \sigma B) (A + tau B). This function sets the value of tau. Use setShift() for setting \sigma.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:671 <slepc4py/SLEPc/ST.pyx#L671>`
- setFilterDamping(damping)
- Set the type of damping to be used in the polynomial filter.
Logically collective.
Parameter¶
- damping
- The type of damping.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:856 <slepc4py/SLEPc/ST.pyx#L856>`
- Parameters
- damping (FilterDamping <#slepc4py.SLEPc.ST.FilterDamping>)
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
- setFilterDegree(deg)
- Set the degree of the filter polynomial.
Logically collective.
- Parameters
- deg (int <https://docs.python.org/3/library/functions.html#int>) – The polynomial degree.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:827 <slepc4py/SLEPc/ST.pyx#L827>`
- setFilterInterval(inta, intb)
- Set the interval containing the desired eigenvalues.
Logically collective.
- inta (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- intb (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
Notes
The filter will be configured to emphasize eigenvalues contained in the given interval, and damp out eigenvalues outside it. If the interval is open, then the filter is low- or high-pass, otherwise it is mid-pass.
Common usage is to set the interval in EPS <#slepc4py.SLEPc.EPS> with EPS.setInterval() <#slepc4py.SLEPc.EPS.setInterval>.
The interval must be contained within the numerical range of the matrix, see ST.setFilterRange().
:sources:`Source code at slepc4py/SLEPc/ST.pyx:736 <slepc4py/SLEPc/ST.pyx#L736>`
- setFilterRange(left, right)
- Set the numerical range (or field of values) of the matrix.
Logically collective.
Set the numerical range (or field of values) of the matrix, that is, the interval containing all eigenvalues.
- left (float <https://docs.python.org/3/library/functions.html#float>) – The left end of the interval.
- right (float <https://docs.python.org/3/library/functions.html#float>) – The right end of the interval.
Notes
The filter will be most effective if the numerical range is tight, that is, left and right are good approximations to the leftmost and rightmost eigenvalues, respectively.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:783 <slepc4py/SLEPc/ST.pyx#L783>`
- setFilterType(filter_type)
- Set the method to be used to build the polynomial filter.
Logically collective.
Parameter¶
- filter_type
- The type of filter.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:707 <slepc4py/SLEPc/ST.pyx#L707>`
- Parameters
- filter_type (FilterType <#slepc4py.SLEPc.ST.FilterType>)
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
- setFromOptions()
- Set ST options from the options database.
Collective.
This routine must be called before setUp() if the user is to be allowed to set the solver type.
Notes
To see all options, run your program with the -help option.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:213 <slepc4py/SLEPc/ST.pyx#L213>`
- setKSP(ksp)
- Set the KSP object associated with the spectral transformation.
Collective.
- petsc4py.PETSc.KSP – The linear solver object.
- ksp (petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>)
:sources:`Source code at slepc4py/SLEPc/ST.pyx:445 <slepc4py/SLEPc/ST.pyx#L445>`
- setMatMode(mode)
- Set a flag to indicate how the matrix is being shifted.
Logically collective.
Set a flag to indicate how the matrix is being shifted in the shift-and-invert and Cayley spectral transformations.
- Parameters
- mode (MatMode <#slepc4py.SLEPc.ST.MatMode>) – The mode flag.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
By default (ST.MatMode.COPY <#slepc4py.SLEPc.ST.MatMode.COPY>), a copy of matrix A is made and then this copy is shifted explicitly, e.g. A \leftarrow (A - s B).
With ST.MatMode.INPLACE <#slepc4py.SLEPc.ST.MatMode.INPLACE>, the original matrix A is shifted at setUp() and unshifted at the end of the computations. With respect to the previous one, this mode avoids a copy of matrix A. However, a backdraw is that the recovered matrix might be slightly different from the original one (due to roundoff).
With ST.MatMode.SHELL <#slepc4py.SLEPc.ST.MatMode.SHELL>, the solver works with an implicit shell matrix that represents the shifted matrix. This mode is the most efficient in creating the shifted matrix but it places serious limitations to the linear solves performed in each iteration of the eigensolver (typically, only iterative solvers with Jacobi preconditioning can be used).
In the case of generalized problems, in the two first modes the matrix A - s B has to be computed explicitly. The efficiency of this computation can be controlled with setMatStructure().
:sources:`Source code at slepc4py/SLEPc/ST.pyx:302 <slepc4py/SLEPc/ST.pyx#L302>`
- setMatStructure(structure)
- Set an internal Mat.Structure attribute.
Logically collective.
Set an internal Mat.Structure attribute to indicate which is the relation of the sparsity pattern of the two matrices A and B constituting the generalized eigenvalue problem. This function has no effect in the case of standard eigenproblems.
- Parameters
- structure (petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure>) – Either same, different, or a subset of the non-zero sparsity pattern.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
By default, the sparsity patterns are assumed to be different. If the patterns are equal or a subset then it is recommended to set this attribute for efficiency reasons (in particular, for internal AXPY() matrix operations).
:sources:`Source code at slepc4py/SLEPc/ST.pyx:400 <slepc4py/SLEPc/ST.pyx#L400>`
- setMatrices(operators)
- Set the matrices associated with the eigenvalue problem.
Collective.
- Parameters
- operators (list <https://docs.python.org/3/library/stdtypes.html#list>[Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>]) – The matrices associated with the eigensystem.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:360 <slepc4py/SLEPc/ST.pyx#L360>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all ST options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all ST option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:162 <slepc4py/SLEPc/ST.pyx#L162>`
- setPreconditionerMat(P=None)
- Set the matrix to be used to build the preconditioner.
Collective.
- Parameters
- P (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – The matrix that will be used in constructing the preconditioner.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:480 <slepc4py/SLEPc/ST.pyx#L480>`
- setShift(shift)
- Set the shift associated with the spectral transformation.
Collective.
- Parameters
- shift (Scalar <#slepc4py.typing.Scalar>) – The value of the shift.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
In some spectral transformations, changing the shift may have associated a lot of work, for example recomputing a factorization.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:230 <slepc4py/SLEPc/ST.pyx#L230>`
- setSplitPreconditioner(operators, structure=None)
- Set the matrices to be used to build the preconditioner.
Collective.
- operators (list <https://docs.python.org/3/library/stdtypes.html#list>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>]) – The matrices associated with the preconditioner.
- structure (petsc4py.PETSc.Mat.Structure <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.Structure.html#petsc4py.PETSc.Mat.Structure> | None <https://docs.python.org/3/library/constants.html#None>)
:sources:`Source code at slepc4py/SLEPc/ST.pyx:510 <slepc4py/SLEPc/ST.pyx#L510>`
- setTransform(flag=True)
- Set a flag to indicate whether the transformed matrices are computed or
not.
Logically collective.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – This flag is intended for the case of polynomial eigenproblems solved via linearization. If this flag is False (default) the spectral transformation is applied to the linearization (handled by the eigensolver), otherwise it is applied to the original problem.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:265 <slepc4py/SLEPc/ST.pyx#L265>`
- setType(st_type)
- Set the particular spectral transformation to be used.
Logically collective.
- Parameters
- st_type (Type <#slepc4py.SLEPc.ST.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The spectral transformation to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
See ST.Type <#slepc4py.SLEPc.ST.Type> for available methods. The default is ST.Type.SHIFT <#slepc4py.SLEPc.ST.Type.SHIFT> with a zero shift. Normally, it is best to use setFromOptions() and then set the ST type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:123 <slepc4py/SLEPc/ST.pyx#L123>`
- setUp()
- Prepare for the use of a spectral transformation.
Collective.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:555 <slepc4py/SLEPc/ST.pyx#L555>`
- view(viewer=None)
- Print the ST data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/ST.pyx:73 <slepc4py/SLEPc/ST.pyx#L73>`
Attributes Documentation
- ksp
- KSP object associated with the spectral transformation.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:915 <slepc4py/SLEPc/ST.pyx#L915>`
- mat_mode
- How the transformed matrices are being stored in the ST.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:901 <slepc4py/SLEPc/ST.pyx#L901>`
- mat_structure
- Relation of the sparsity pattern of all ST matrices.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:908 <slepc4py/SLEPc/ST.pyx#L908>`
- shift
- Value of the shift.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:887 <slepc4py/SLEPc/ST.pyx#L887>`
- transform
- If the transformed matrices are computed.
:sources:`Source code at slepc4py/SLEPc/ST.pyx:894 <slepc4py/SLEPc/ST.pyx#L894>`
slepc4py.SLEPc.STFilterDamping¶
- class slepc4py.SLEPc.STFilterDamping
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
ST filter damping.
- NONE: No damping
- JACKSON: Jackson damping
- LANCZOS: Lanczos damping
- FEJER: Fejer damping
Attributes Summary
| FEJER | Constant FEJER of type int <https://docs.python.org/3/library/functions.html#int> |
| JACKSON | Constant JACKSON of type int <https://docs.python.org/3/library/functions.html#int> |
| LANCZOS | Constant LANCZOS of type int <https://docs.python.org/3/library/functions.html#int> |
| NONE | Constant NONE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.STFilterType¶
- class slepc4py.SLEPc.STFilterType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
ST filter type.
- FILTLAN: An adapted implementation of the Filtered Lanczos Package.
- CHEBYSEV: A polynomial filter based on a truncated Chebyshev series.
Attributes Summary
| CHEBYSHEV | Constant CHEBYSHEV of type int <https://docs.python.org/3/library/functions.html#int> |
| FILTLAN | Constant FILTLAN of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.SVD¶
- class slepc4py.SLEPc.SVD
- Bases: Object
<https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Object.html#petsc4py.PETSc.Object>
SVD.
Enumerations
Conv <#slepc4py.SLEPc.SVD.Conv> SVD convergence test. ConvergedReason <#slepc4py.SLEPc.SVD.ConvergedReason> SVD convergence reasons. ErrorType <#slepc4py.SLEPc.SVD.ErrorType> SVD error type to assess accuracy of computed solutions. ProblemType <#slepc4py.SLEPc.SVD.ProblemType> SVD problem type. Stop <#slepc4py.SLEPc.SVD.Stop> SVD stopping test. TRLanczosGBidiag <#slepc4py.SLEPc.SVD.TRLanczosGBidiag> SVD TRLanczos bidiagonalization choices for the GSVD case. Type <#slepc4py.SLEPc.SVD.Type> SVD types. Which <#slepc4py.SLEPc.SVD.Which> SVD desired part of spectrum.
slepc4py.SLEPc.SVD.Conv¶
- class slepc4py.SLEPc.SVD.Conv
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD convergence test.
- ABS: Absolute convergence test.
- REL: Convergence test relative to the singular value.
- NORM: Convergence test relative to the matrix norms.
- MAXIT: No convergence until maximum number of iterations has been reached.
- USER: User-defined convergence test.
Attributes Summary
| ABS | Constant ABS of type int <https://docs.python.org/3/library/functions.html#int> |
| MAXIT | Constant MAXIT of type int <https://docs.python.org/3/library/functions.html#int> |
| NORM | Constant NORM of type int <https://docs.python.org/3/library/functions.html#int> |
| REL | Constant REL of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.SVD.ConvergedReason¶
- class slepc4py.SLEPc.SVD.ConvergedReason
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD convergence reasons.
- •
- CONVERGED_USER: User-defined convergence criterion satisfied.
- CONVERGED_MAXIT: Maximum iterations completed in case MAXIT
- convergence criterion.
- DIVERGED_ITS: Maximum number of iterations exceeded.
- DIVERGED_BREAKDOWN: Solver failed due to breakdown.
- DIVERGED_SYMMETRY_LOST: Underlying indefinite eigensolver was not able
- to keep symmetry.
- •
- CONVERGED_ITERATING: Iteration not finished yet.
Attributes Summary
| CONVERGED_ITERATING | Constant CONVERGED_ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_MAXIT | Constant CONVERGED_MAXIT of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_TOL | Constant CONVERGED_TOL of type int <https://docs.python.org/3/library/functions.html#int> |
| CONVERGED_USER | Constant CONVERGED_USER of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_BREAKDOWN | Constant DIVERGED_BREAKDOWN of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_ITS | Constant DIVERGED_ITS of type int <https://docs.python.org/3/library/functions.html#int> |
| DIVERGED_SYMMETRY_LOST | Constant DIVERGED_SYMMETRY_LOST of type int <https://docs.python.org/3/library/functions.html#int> |
| ITERATING | Constant ITERATING of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.SVD.ErrorType¶
- class slepc4py.SLEPc.SVD.ErrorType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD error type to assess accuracy of computed solutions.
- ABSOLUTE: Absolute error.
- RELATIVE: Relative error.
- NORM: Error relative to the matrix norm.
Attributes Summary
| ABSOLUTE | Constant ABSOLUTE of type int <https://docs.python.org/3/library/functions.html#int> |
| NORM | Constant NORM of type int <https://docs.python.org/3/library/functions.html#int> |
| RELATIVE | Constant RELATIVE of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.SVD.ProblemType¶
- class slepc4py.SLEPc.SVD.ProblemType
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD problem type.
- STANDARD: Standard SVD.
- GENERALIZED: Generalized singular value decomposition (GSVD).
- HYPERBOLIC : Hyperbolic singular value decomposition (HSVD).
Attributes Summary
| GENERALIZED | Constant GENERALIZED of type int <https://docs.python.org/3/library/functions.html#int> |
| HYPERBOLIC | Constant HYPERBOLIC of type int <https://docs.python.org/3/library/functions.html#int> |
| STANDARD | Constant STANDARD of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.SVD.Stop¶
- class slepc4py.SLEPc.SVD.Stop
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD stopping test.
- BASIC: Default stopping test.
- USER: User-defined stopping test.
- THRESHOLD: Threshold stopping test.
Attributes Summary
| BASIC | Constant BASIC of type int <https://docs.python.org/3/library/functions.html#int> |
| THRESHOLD | Constant THRESHOLD of type int <https://docs.python.org/3/library/functions.html#int> |
| USER | Constant USER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.SVD.TRLanczosGBidiag¶
- class slepc4py.SLEPc.SVD.TRLanczosGBidiag
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD TRLanczos bidiagonalization choices for the GSVD case.
- SINGLE: Single bidiagonalization (Qa).
- •
Attributes Summary
| LOWER | Constant LOWER of type int <https://docs.python.org/3/library/functions.html#int> |
| SINGLE | Constant SINGLE of type int <https://docs.python.org/3/library/functions.html#int> |
| UPPER | Constant UPPER of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
slepc4py.SLEPc.SVD.Type¶
- class slepc4py.SLEPc.SVD.Type
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD types.
- CROSS: Eigenproblem with the cross-product matrix.
- CYCLIC: Eigenproblem with the cyclic matrix.
- LAPACK: Wrappers to dense SVD solvers in Lapack.
- LANCZOS: Lanczos.
- TRLANCZOS: Thick-restart Lanczos.
- RANDOMIZED: Iterative RSVD for low-rank matrices.
Wrappers to external SVD solvers (should be enabled during installation of SLEPc)
- SCALAPACK:
- KSVD:
- ELEMENTAL:
- PRIMME:
Attributes Summary
| CROSS | Object CROSS of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| CYCLIC | Object CYCLIC of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| ELEMENTAL | Object ELEMENTAL of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| KSVD | Object KSVD of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| LANCZOS | Object LANCZOS of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| LAPACK | Object LAPACK of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| PRIMME | Object PRIMME of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| RANDOMIZED | Object RANDOMIZED of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| SCALAPACK | Object SCALAPACK of type str <https://docs.python.org/3/library/stdtypes.html#str> |
| TRLANCZOS | Object TRLANCZOS of type str <https://docs.python.org/3/library/stdtypes.html#str> |
Attributes Documentation
slepc4py.SLEPc.SVD.Which¶
- class slepc4py.SLEPc.SVD.Which
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
SVD desired part of spectrum.
- LARGEST: Largest singular values.
- SMALLEST: Smallest singular values.
Attributes Summary
| LARGEST | Constant LARGEST of type int <https://docs.python.org/3/library/functions.html#int> |
| SMALLEST | Constant SMALLEST of type int <https://docs.python.org/3/library/functions.html#int> |
Attributes Documentation
Methods Summary
| appendOptionsPrefix([prefix]) | Append to the prefix used for searching for all SVD options in the database. |
| cancelMonitor() | Clear all monitors for an SVD object. |
| computeError(i[, etype]) | Compute the error associated with the i-th singular triplet. |
| create([comm]) | Create the SVD object. |
| destroy() | Destroy the SVD object. |
| errorView([etype, viewer]) | Display the errors associated with the computed solution. |
| getBV() | Get the basis vectors objects associated to the SVD object. |
| getConverged() | Get the number of converged singular triplets. |
| getConvergedReason() | Get the reason why the solve() iteration was stopped. |
| getConvergenceTest() | Get the method used to compute the error estimate used in the convergence test. |
| getCrossEPS() | Get the eigensolver object associated to the singular value solver. |
| getCrossExplicitMatrix() | Get the flag indicating if A^T*A is built explicitly. |
| getCyclicEPS() | Get the eigensolver object associated to the singular value solver. |
| getCyclicExplicitMatrix() | Get the flag indicating if H(A) is built explicitly. |
| getDS() | Get the direct solver associated to the singular value solver. |
| getDimensions() | Get the number of singular values to compute and the dimension of the subspace. |
| getImplicitTranspose() | Get the mode used to handle the transpose of the matrix associated. |
| getIterationNumber() | Get the current iteration number. |
| getLanczosOneSide() | Get if the variant of the Lanczos method to be used is one-sided or two-sided. |
| getMonitor() | Get the list of monitor functions. |
| getOperators() | Get the matrices associated with the singular value problem. |
| getOptionsPrefix() | Get the prefix used for searching for all SVD options in the database. |
| getProblemType() | Get the problem type from the SVD object. |
| getSignature([omega]) | Get the signature matrix defining a hyperbolic singular value problem. |
| getSingularTriplet(i[, U, V]) | Get the i-th triplet of the singular value decomposition. |
| getStoppingTest() | Get the stopping function. |
| getTRLanczosExplicitMatrix() | Get the flag indicating if Z=[A;B] is built explicitly. |
| getTRLanczosGBidiag() | Get bidiagonalization choice used in the GSVD TRLanczos solver. |
| getTRLanczosKSP() | Get the linear solver object associated with the SVD solver. |
| getTRLanczosLocking() | Get the locking flag used in the thick-restart Lanczos method. |
| getTRLanczosOneSide() | Get if the variant of the method to be used is one-sided or two-sided. |
| getTRLanczosRestart() | Get the restart parameter used in the thick-restart Lanczos method. |
| getThreshold() | Get the threshold used in the threshold stopping test. |
| getTolerances() | Get the tolerance and maximum iteration count. |
| getTrackAll() | Get the flag indicating if all residual norms must be computed or not. |
| getType() | Get the SVD type of this object. |
| getValue(i) | Get the i-th singular value as computed by solve(). |
| getVectors(i, U, V) | Get the i-th left and right singular vectors as computed by solve(). |
| getWhichSingularTriplets() | Get which singular triplets are to be sought. |
| isGeneralized() | Tell if the SVD corresponds to a generalized singular value problem. |
| isHyperbolic() | Tell whether the SVD object corresponds to a hyperbolic singular value problem. |
| reset() | Reset the SVD object. |
| setBV(V[, U]) | Set basis vectors objects associated to the SVD solver. |
| setConvergenceTest(conv) | Set how to compute the error estimate used in the convergence test. |
| setCrossEPS(eps) | Set an eigensolver object associated to the singular value solver. |
| setCrossExplicitMatrix([flag]) | Set if the eigensolver operator A^T A must be computed. |
| setCyclicEPS(eps) | Set an eigensolver object associated to the singular value solver. |
| setCyclicExplicitMatrix([flag]) | Set if the eigensolver operator H(A) must be computed explicitly. |
| setDS(ds) | Set a direct solver object associated to the singular value solver. |
| setDimensions([nsv, ncv, mpd]) | Set the number of singular values to compute and the dimension of the subspace. |
| setFromOptions() | Set SVD options from the options database. |
| setImplicitTranspose(mode) | Set how to handle the transpose of the matrix associated. |
| setInitialSpace([spaceright, spaceleft]) | Set the initial spaces from which the SVD solver starts to iterate. |
| setLanczosOneSide([flag]) | Set if the variant of the Lanczos method to be used is one-sided or two-sided. |
| setMonitor(monitor[, args, kargs]) | Append a monitor function to the list of monitors. |
| setOperators(A[, B]) | Set the matrices associated with the singular value problem. |
| setOptionsPrefix([prefix]) | Set the prefix used for searching for all SVD options in the database. |
| setProblemType(problem_type) | Set the type of the singular value problem. |
| setSignature([omega]) | Set the signature matrix defining a hyperbolic singular value problem. |
| setStoppingTest(stopping[, args, kargs]) | Set a function to decide when to stop the outer iteration of the eigensolver. |
| setTRLanczosExplicitMatrix([flag]) | Set if the matrix Z=[A;B] must be built explicitly. |
| setTRLanczosGBidiag(bidiag) | Set the bidiagonalization choice to use in the GSVD TRLanczos solver. |
| setTRLanczosKSP(ksp) | Set a linear solver object associated to the SVD solver. |
| setTRLanczosLocking(lock) | Toggle between locking and non-locking variants of the method. |
| setTRLanczosOneSide([flag]) | Set if the variant of the method to be used is one-sided or two-sided. |
| setTRLanczosRestart(keep) | Set the restart parameter for the thick-restart Lanczos method. |
| setThreshold(thres[, rel]) | Set the threshold used in the threshold stopping test. |
| setTolerances([tol, max_it]) | Set the tolerance and maximum iteration count used. |
| setTrackAll(trackall) | Set flag to compute the residual of all singular triplets. |
| setType(svd_type) | Set the particular solver to be used in the SVD object. |
| setUp() | Set up all the necessary internal data structures. |
| setWhichSingularTriplets(which) | Set which singular triplets are to be sought. |
| solve() | Solve the singular value problem. |
| valuesView([viewer]) | Display the computed singular values in a viewer. |
| vectorsView([viewer]) | Output computed singular vectors to a viewer. |
| view([viewer]) | Print the SVD data structure. |
Attributes Summary
| ds | The direct solver (DS) object associated. |
| max_it | The maximum iteration count. |
| problem_type | The type of the eigenvalue problem. |
| tol | The tolerance. |
| track_all | Compute the residual norm of all approximate eigenpairs. |
| transpose_mode | How to handle the transpose of the matrix. |
| which | The portion of the spectrum to be sought. |
Methods Documentation
- appendOptionsPrefix(prefix=None)
- Append to the prefix used for searching for all SVD options in the
database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all SVD option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:284 <slepc4py/SLEPc/SVD.pyx#L284>`
- cancelMonitor()
- Clear all monitors for an SVD object.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:912 <slepc4py/SLEPc/SVD.pyx#L912>`
- computeError(i, etype=None)
- Compute the error associated with the i-th singular triplet.
Collective.
Compute the error (based on the residual norm) associated with the i-th singular triplet.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be considered.
- etype (ErrorType <#slepc4py.SLEPc.SVD.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- Returns
- The relative error bound, computed in various ways from the residual norm \sqrt{n_1^2+n_2^2} where n_1 = \|A v - \sigma u\|_2, n_2 = \|A^T u - \sigma v\|_2, \sigma is the singular value, u and v are the left and right singular vectors.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
The index i should be a value between 0 and nconv-1 (see getConverged()).
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1091 <slepc4py/SLEPc/SVD.pyx#L1091>`
- create(comm=None)
- Create the SVD object.
Collective.
- Parameters
- comm (Comm <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Comm.html#petsc4py.PETSc.Comm> | None <https://docs.python.org/3/library/constants.html#None>) – MPI communicator; if not provided, it defaults to all processes.
- Return type
- Self <https://docs.python.org/3/library/typing.html#typing.Self>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:186 <slepc4py/SLEPc/SVD.pyx#L186>`
- destroy()
- Destroy the SVD object.
Collective.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:168 <slepc4py/SLEPc/SVD.pyx#L168>`
- errorView(etype=None, viewer=None)
- Display the errors associated with the computed solution.
Collective.
Display the errors and the eigenvalues.
- etype (ErrorType <#slepc4py.SLEPc.SVD.ErrorType> | None <https://docs.python.org/3/library/constants.html#None>) – The error type to compute.
- viewer (petsc4py.PETSc.Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
Notes
By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format ASCII_INFO_DETAIL then a table with eigenvalues and corresponding errors is printed.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1128 <slepc4py/SLEPc/SVD.pyx#L1128>`
- getBV()
- Get the basis vectors objects associated to the SVD object.
Not collective.
- V (BV <#slepc4py.SLEPc.BV>) – The basis vectors context for right singular vectors.
- U (BV <#slepc4py.SLEPc.BV>) – The basis vectors context for left singular vectors.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[BV <#slepc4py.SLEPc.BV>, BV <#slepc4py.SLEPc.BV>]
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:676 <slepc4py/SLEPc/SVD.pyx#L676>`
- getConverged()
- Get the number of converged singular triplets.
Not collective.
- Returns
- Number of converged singular triplets.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
Notes
This function should be called after solve() has finished.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:981 <slepc4py/SLEPc/SVD.pyx#L981>`
- getConvergedReason()
- Get the reason why the solve() iteration was stopped.
Not collective.
- Returns
- Negative value indicates diverged, positive value converged.
- Return type
- ConvergedReason <#slepc4py.SLEPc.SVD.ConvergedReason>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:966 <slepc4py/SLEPc/SVD.pyx#L966>`
- getConvergenceTest()
- Get the method used to compute the error estimate used in the convergence
test.
Not collective.
- Returns
- The method used to compute the error estimate used in the convergence test.
- Return type
- Conv <#slepc4py.SLEPc.SVD.Conv>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:546 <slepc4py/SLEPc/SVD.pyx#L546>`
- getCrossEPS()
- Get the eigensolver object associated to the singular value solver.
Collective.
- Returns
- The eigensolver object.
- Return type
- EPS <#slepc4py.SLEPc.EPS>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1202 <slepc4py/SLEPc/SVD.pyx#L1202>`
- getCrossExplicitMatrix()
- Get the flag indicating if A^T*A is built explicitly.
Not collective.
- Returns
- True if A^T*A is built explicitly.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1232 <slepc4py/SLEPc/SVD.pyx#L1232>`
- getCyclicEPS()
- Get the eigensolver object associated to the singular value solver.
Collective.
- Returns
- The eigensolver object.
- Return type
- EPS <#slepc4py.SLEPc.EPS>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1260 <slepc4py/SLEPc/SVD.pyx#L1260>`
- getCyclicExplicitMatrix()
- Get the flag indicating if H(A) is built explicitly.
Not collective.
Get the flag indicating if H(A) = [ 0\; A ; A^T\; 0 ] is built explicitly.
- Returns
- True if H(A) is built explicitly.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1293 <slepc4py/SLEPc/SVD.pyx#L1293>`
- getDS()
- Get the direct solver associated to the singular value solver.
Not collective.
- Returns
- The direct solver context.
- Return type
- DS <#slepc4py.SLEPc.DS>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:713 <slepc4py/SLEPc/SVD.pyx#L713>`
- getDimensions()
- Get the number of singular values to compute and the dimension of the
subspace.
Not collective.
- nsv (int <https://docs.python.org/3/library/functions.html#int>) – Number of singular values to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int>) – Maximum dimension allowed for the projected problem.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:609 <slepc4py/SLEPc/SVD.pyx#L609>`
- getImplicitTranspose()
- Get the mode used to handle the transpose of the matrix associated.
Not collective.
Get the mode used to handle the transpose of the matrix associated with the singular value problem.
- Returns
- How to handle the transpose (implicitly or not).
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:379 <slepc4py/SLEPc/SVD.pyx#L379>`
- getIterationNumber()
- Get the current iteration number.
Not collective.
If the call to solve() is complete, then it returns the number of iterations carried out by the solution method.
- Returns
- Iteration number.
- Return type
- int <https://docs.python.org/3/library/functions.html#int>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:948 <slepc4py/SLEPc/SVD.pyx#L948>`
- getLanczosOneSide()
- Get if the variant of the Lanczos method to be used is one-sided or
two-sided.
Not collective.
- Returns
- True if the method is one-sided.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1333 <slepc4py/SLEPc/SVD.pyx#L1333>`
- getMonitor()
- Get the list of monitor functions.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:908 <slepc4py/SLEPc/SVD.pyx#L908>`
- Return type
- SVDMonitorFunction <#slepc4py.typing.SVDMonitorFunction>
- getOperators()
- Get the matrices associated with the singular value problem.
Collective.
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix associated with the singular value problem.
- B (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The second matrix in the case of GSVD.
- Return type
- tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>] | tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>, None <https://docs.python.org/3/library/constants.html#None>]
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:742 <slepc4py/SLEPc/SVD.pyx#L742>`
- getOptionsPrefix()
- Get the prefix used for searching for all SVD options in the database.
Not collective.
- Returns
- The prefix string set for this SVD object.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:242 <slepc4py/SLEPc/SVD.pyx#L242>`
- getProblemType()
- Get the problem type from the SVD object.
Not collective.
- Returns
- The problem type that was previously set.
- Return type
- ProblemType <#slepc4py.SLEPc.SVD.ProblemType>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:315 <slepc4py/SLEPc/SVD.pyx#L315>`
- getSignature(omega=None)
- Get the signature matrix defining a hyperbolic singular value problem.
Collective.
- Parameters
- omega (petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Optional vector to store the diagonal elements of the signature matrix.
- Returns
- A vector containing the diagonal elements of the signature matrix.
- Return type
- petsc4py.PETSc.Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:782 <slepc4py/SLEPc/SVD.pyx#L782>`
- getSingularTriplet(i, U=None, V=None)
- Get the i-th triplet of the singular value decomposition.
Collective.
Get the i-th triplet of the singular value decomposition as computed by solve(). The solution consists of the singular value and its left and right singular vectors.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- U (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned left singular vector.
- V (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – Placeholder for the returned right singular vector.
- Returns
- The computed singular value.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
The index i should be a value between 0 and nconv-1 (see getConverged(). Singular triplets are indexed according to the ordering criterion established with setWhichSingularTriplets().
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1052 <slepc4py/SLEPc/SVD.pyx#L1052>`
- getStoppingTest()
- Get the stopping function.
Not collective.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:877 <slepc4py/SLEPc/SVD.pyx#L877>`
- Return type
- SVDStoppingFunction <#slepc4py.typing.SVDStoppingFunction>
- getTRLanczosExplicitMatrix()
- Get the flag indicating if Z=[A;B] is built explicitly.
Not collective.
- Returns
- True if Z=[A;B] is built explicitly.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1538 <slepc4py/SLEPc/SVD.pyx#L1538>`
- getTRLanczosGBidiag()
- Get bidiagonalization choice used in the GSVD TRLanczos solver.
Not collective.
- Returns
- The bidiagonalization choice.
- Return type
- TRLanczosGBidiag <#slepc4py.SLEPc.SVD.TRLanczosGBidiag>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1404 <slepc4py/SLEPc/SVD.pyx#L1404>`
- getTRLanczosKSP()
- Get the linear solver object associated with the SVD solver.
Collective.
- Returns
- The linear solver object.
- Return type
- petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1508 <slepc4py/SLEPc/SVD.pyx#L1508>`
- getTRLanczosLocking()
- Get the locking flag used in the thick-restart Lanczos method.
Not collective.
- Returns
- The locking flag.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1480 <slepc4py/SLEPc/SVD.pyx#L1480>`
- getTRLanczosOneSide()
- Get if the variant of the method to be used is one-sided or two-sided.
Not collective.
Get if the variant of the thick-restart Lanczos method to be used is one-sided or two-sided.
- Returns
- True if the method is one-sided.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1372 <slepc4py/SLEPc/SVD.pyx#L1372>`
- getTRLanczosRestart()
- Get the restart parameter used in the thick-restart Lanczos method.
Not collective.
- Returns
- The number of vectors to be kept at restart.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1441 <slepc4py/SLEPc/SVD.pyx#L1441>`
- getThreshold()
- Get the threshold used in the threshold stopping test.
Not collective.
- thres (float <https://docs.python.org/3/library/functions.html#float>) – The threshold.
- rel (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the threshold is relative or not.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:451 <slepc4py/SLEPc/SVD.pyx#L451>`
- getTolerances()
- Get the tolerance and maximum iteration count.
Not collective.
Get the tolerance and maximum iteration count used by the default SVD convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int>) – The maximum number of iterations
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:498 <slepc4py/SLEPc/SVD.pyx#L498>`
- getTrackAll()
- Get the flag indicating if all residual norms must be computed or not.
Not collective.
- Returns
- Whether the solver compute all residuals or not.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:577 <slepc4py/SLEPc/SVD.pyx#L577>`
- getType()
- Get the SVD type of this object.
Not collective.
- Returns
- The solver currently being used.
- Return type
- str <https://docs.python.org/3/library/stdtypes.html#str>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:227 <slepc4py/SLEPc/SVD.pyx#L227>`
- getValue(i)
- Get the i-th singular value as computed by solve().
Collective.
- Parameters
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- Returns
- The computed singular value.
- Return type
- float <https://docs.python.org/3/library/functions.html#float>
Notes
The index i should be a value between 0 and nconv-1 (see getConverged(). Singular triplets are indexed according to the ordering criterion established with setWhichSingularTriplets().
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1000 <slepc4py/SLEPc/SVD.pyx#L1000>`
- getVectors(i, U, V)
- Get the i-th left and right singular vectors as computed by
solve().
Collective.
- i (int <https://docs.python.org/3/library/functions.html#int>) – Index of the solution to be obtained.
- U (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Placeholder for the returned left singular vector.
- V (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>) – Placeholder for the returned right singular vector.
Notes
The index i should be a value between 0 and nconv-1 (see getConverged(). Singular triplets are indexed according to the ordering criterion established with setWhichSingularTriplets().
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1027 <slepc4py/SLEPc/SVD.pyx#L1027>`
- getWhichSingularTriplets()
- Get which singular triplets are to be sought.
Not collective.
- Returns
- The singular values to be sought (either largest or smallest).
- Return type
- Which <#slepc4py.SLEPc.SVD.Which>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:422 <slepc4py/SLEPc/SVD.pyx#L422>`
- isGeneralized()
- Tell if the SVD corresponds to a generalized singular value problem.
Not collective.
Tell whether the SVD object corresponds to a generalized singular value problem.
- Returns
- True if two matrices were set with setOperators().
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:344 <slepc4py/SLEPc/SVD.pyx#L344>`
- isHyperbolic()
- Tell whether the SVD object corresponds to a hyperbolic singular value
problem.
Not collective.
- Returns
- True if the problem was specified as hyperbolic.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:362 <slepc4py/SLEPc/SVD.pyx#L362>`
- reset()
- Reset the SVD object.
Collective.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:178 <slepc4py/SLEPc/SVD.pyx#L178>`
- setBV(V, U=None)
- Set basis vectors objects associated to the SVD solver.
Collective.
- V (BV <#slepc4py.SLEPc.BV>) – The basis vectors context for right singular vectors.
- U (BV <#slepc4py.SLEPc.BV> | None <https://docs.python.org/3/library/constants.html#None>) – The basis vectors context for left singular vectors.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:696 <slepc4py/SLEPc/SVD.pyx#L696>`
- setConvergenceTest(conv)
- Set how to compute the error estimate used in the convergence test.
Logically collective.
- Parameters
- conv (Conv <#slepc4py.SLEPc.SVD.Conv>) – The method used to compute the error estimate used in the convergence test.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:562 <slepc4py/SLEPc/SVD.pyx#L562>`
- setCrossEPS(eps)
- Set an eigensolver object associated to the singular value solver.
Collective.
- Parameters
- eps (EPS <#slepc4py.SLEPc.EPS>) – The eigensolver object.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1189 <slepc4py/SLEPc/SVD.pyx#L1189>`
- setCrossExplicitMatrix(flag=True)
- Set if the eigensolver operator A^T A must be computed.
Logically collective.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – True to build A^T A explicitly.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1218 <slepc4py/SLEPc/SVD.pyx#L1218>`
- setCyclicEPS(eps)
- Set an eigensolver object associated to the singular value solver.
Collective.
- Parameters
- eps (EPS <#slepc4py.SLEPc.EPS>) – The eigensolver object.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1247 <slepc4py/SLEPc/SVD.pyx#L1247>`
- setCyclicExplicitMatrix(flag=True)
- Set if the eigensolver operator H(A) must be computed explicitly.
Logically collective.
Set if the eigensolver operator H(A) = [ 0\; A ; A^T\; 0 ] must be computed explicitly.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – True if H(A) is built explicitly.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1276 <slepc4py/SLEPc/SVD.pyx#L1276>`
- setDS(ds)
- Set a direct solver object associated to the singular value solver.
Collective.
- Parameters
- ds (DS <#slepc4py.SLEPc.DS>) – The direct solver context.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:729 <slepc4py/SLEPc/SVD.pyx#L729>`
- setDimensions(nsv=None, ncv=None, mpd=None)
- Set the number of singular values to compute and the dimension of the
subspace.
Logically collective.
- nsv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Number of singular values to compute.
- ncv (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension of the subspace to be used by the solver.
- mpd (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – Maximum dimension allowed for the projected problem.
Notes
Use DECIDE <#slepc4py.SLEPc.DECIDE> for ncv and mpd to assign a reasonably good value, which is dependent on the solution method.
The parameters ncv and mpd are intimately related, so that the user is advised to set one of them at most. Normal usage is the following:
- In cases where nsv is small, the user sets ncv (a reasonable default is 2 * nsv).
- In cases where nsv is large, the user sets mpd.
The value of ncv should always be between nsv and (nsv + mpd), typically ncv = nsv + mpd. If nsv is not too large, mpd = nsv is a reasonable choice, otherwise a smaller value should be used.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:630 <slepc4py/SLEPc/SVD.pyx#L630>`
- setFromOptions()
- Set SVD options from the options database.
Collective.
This routine must be called before setUp() if the user is to be allowed to set the solver type.
Notes
To see all options, run your program with the -help option.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:299 <slepc4py/SLEPc/SVD.pyx#L299>`
- setImplicitTranspose(mode)
- Set how to handle the transpose of the matrix associated.
Logically collective.
Set how to handle the transpose of the matrix associated with the singular value problem.
- impl – How to handle the transpose (implicitly or not).
- mode (bool <https://docs.python.org/3/library/functions.html#bool>)
Notes
By default, the transpose of the matrix is explicitly built (if the matrix has defined the MatTranspose operation).
If this flag is set to true, the solver does not build the transpose, but handles it implicitly via MatMultTranspose().
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:397 <slepc4py/SLEPc/SVD.pyx#L397>`
- setInitialSpace(spaceright=None, spaceleft=None)
- Set the initial spaces from which the SVD solver starts to iterate.
Collective.
- spaceright (list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>] | None <https://docs.python.org/3/library/constants.html#None>) – The right initial space.
- spaceleft (list <https://docs.python.org/3/library/stdtypes.html#list>[Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec>] | None <https://docs.python.org/3/library/constants.html#None>) – The left initial space.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:823 <slepc4py/SLEPc/SVD.pyx#L823>`
- setLanczosOneSide(flag=True)
- Set if the variant of the Lanczos method to be used is one-sided or
two-sided.
Logically collective.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the method is one-sided.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
By default, a two-sided variant is selected, which is sometimes slightly more robust. However, the one-sided variant is faster because it avoids the orthogonalization associated to left singular vectors. It also saves the memory required for storing such vectors.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1311 <slepc4py/SLEPc/SVD.pyx#L1311>`
- setMonitor(monitor, args=None, kargs=None)
- Append a monitor function to the list of monitors.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:887 <slepc4py/SLEPc/SVD.pyx#L887>`
- monitor (SVDMonitorFunction <#slepc4py.typing.SVDMonitorFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setOperators(A, B=None)
- Set the matrices associated with the singular value problem.
Collective.
- A (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix associated with the singular value problem.
- B (Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat> | None <https://docs.python.org/3/library/constants.html#None>) – The second matrix in the case of GSVD; if not provided, a usual SVD is assumed.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:765 <slepc4py/SLEPc/SVD.pyx#L765>`
- setOptionsPrefix(prefix=None)
- Set the prefix used for searching for all SVD options in the database.
Logically collective.
- Parameters
- prefix (str <https://docs.python.org/3/library/stdtypes.html#str> | None <https://docs.python.org/3/library/constants.html#None>) – The prefix string to prepend to all SVD option requests.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
A hyphen (-) must NOT be given at the beginning of the prefix name. The first character of all runtime options is AUTOMATICALLY the hyphen.
For example, to distinguish between the runtime options for two different SVD contexts, one could call:
S1.setOptionsPrefix("svd1_")
S2.setOptionsPrefix("svd2_")
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:257 <slepc4py/SLEPc/SVD.pyx#L257>`
- setProblemType(problem_type)
- Set the type of the singular value problem.
Logically collective.
- Parameters
- problem_type (ProblemType <#slepc4py.SLEPc.SVD.ProblemType>) – The problem type to be set.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:330 <slepc4py/SLEPc/SVD.pyx#L330>`
- setSignature(omega=None)
- Set the signature matrix defining a hyperbolic singular value problem.
Collective.
- Parameters
- omega (Vec <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Vec.html#petsc4py.PETSc.Vec> | None <https://docs.python.org/3/library/constants.html#None>) – A vector containing the diagonal elements of the signature matrix.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:807 <slepc4py/SLEPc/SVD.pyx#L807>`
- setStoppingTest(stopping, args=None, kargs=None)
- Set a function to decide when to stop the outer iteration of the
eigensolver.
Logically collective.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:857 <slepc4py/SLEPc/SVD.pyx#L857>`
- stopping (SVDStoppingFunction <#slepc4py.typing.SVDStoppingFunction> | None <https://docs.python.org/3/library/constants.html#None>)
- args (tuple <https://docs.python.org/3/library/stdtypes.html#tuple>[Any, ...] | None <https://docs.python.org/3/library/constants.html#None>)
- kargs (dict <https://docs.python.org/3/library/stdtypes.html#dict>[str <https://docs.python.org/3/library/stdtypes.html#str>, Any] | None <https://docs.python.org/3/library/constants.html#None>)
- setTRLanczosExplicitMatrix(flag=True)
- Set if the matrix Z=[A;B] must be built explicitly.
Logically collective.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – True if Z=[A;B] is built explicitly.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1524 <slepc4py/SLEPc/SVD.pyx#L1524>`
- setTRLanczosGBidiag(bidiag)
- Set the bidiagonalization choice to use in the GSVD TRLanczos solver.
Logically collective.
- Parameters
- bidiag (TRLanczosGBidiag <#slepc4py.SLEPc.SVD.TRLanczosGBidiag>) – The bidiagonalization choice.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1390 <slepc4py/SLEPc/SVD.pyx#L1390>`
- setTRLanczosKSP(ksp)
- Set a linear solver object associated to the SVD solver.
Collective.
- Parameters
- ksp (petsc4py.PETSc.KSP <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.KSP.html#petsc4py.PETSc.KSP>) – The linear solver object.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1495 <slepc4py/SLEPc/SVD.pyx#L1495>`
- setTRLanczosLocking(lock)
- Toggle between locking and non-locking variants of the method.
Logically collective.
Toggle between locking and non-locking variants of the thick-restart Lanczos method.
- Parameters
- lock (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the locking variant must be selected.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
The default is to lock converged singular triplets when the method restarts. This behavior can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1456 <slepc4py/SLEPc/SVD.pyx#L1456>`
- setTRLanczosOneSide(flag=True)
- Set if the variant of the method to be used is one-sided or two-sided.
Logically collective.
Set if the variant of the thick-restart Lanczos method to be used is one-sided or two-sided.
- Parameters
- flag (bool <https://docs.python.org/3/library/functions.html#bool>) – True if the method is one-sided.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
By default, a two-sided variant is selected, which is sometimes slightly more robust. However, the one-sided variant is faster because it avoids the orthogonalization associated to left singular vectors.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1348 <slepc4py/SLEPc/SVD.pyx#L1348>`
- setTRLanczosRestart(keep)
- Set the restart parameter for the thick-restart Lanczos method.
Logically collective.
Set the restart parameter for the thick-restart Lanczos method, in particular the proportion of basis vectors that must be kept after restart.
- Parameters
- keep (float <https://docs.python.org/3/library/functions.html#float>) – The number of vectors to be kept at restart.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
Allowed values are in the range [0.1,0.9]. The default is 0.5.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1419 <slepc4py/SLEPc/SVD.pyx#L1419>`
- setThreshold(thres, rel=False)
- Set the threshold used in the threshold stopping test.
Logically collective.
- thres (float <https://docs.python.org/3/library/functions.html#float>) – The threshold.
- rel (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether the threshold is relative or not.
Notes
This function internally sets a special stopping test based on the threshold, where singular values are computed in sequence until one of the computed singular values is below/above the threshold (depending on whether largest or smallest singular values are computed).
In the case of largest singular values, the threshold can be made relative with respect to the largest singular value (i.e., the matrix norm).
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:469 <slepc4py/SLEPc/SVD.pyx#L469>`
- setTolerances(tol=None, max_it=None)
- Set the tolerance and maximum iteration count used.
Logically collective.
Set the tolerance and maximum iteration count used by the default SVD convergence tests.
- tol (float <https://docs.python.org/3/library/functions.html#float> | None <https://docs.python.org/3/library/constants.html#None>) – The convergence tolerance.
- max_it (int <https://docs.python.org/3/library/functions.html#int> | None <https://docs.python.org/3/library/constants.html#None>) – The maximum number of iterations
Notes
Use DECIDE <#slepc4py.SLEPc.DECIDE> for max_it to assign a reasonably good value, which is dependent on the solution method.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:519 <slepc4py/SLEPc/SVD.pyx#L519>`
- setTrackAll(trackall)
- Set flag to compute the residual of all singular triplets.
Logically collective.
Set if the solver must compute the residual of all approximate singular triplets or not.
- Parameters
- trackall (bool <https://docs.python.org/3/library/functions.html#bool>) – Whether compute all residuals or not.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:592 <slepc4py/SLEPc/SVD.pyx#L592>`
- setType(svd_type)
- Set the particular solver to be used in the SVD object.
Logically collective.
- Parameters
- svd_type (Type <#slepc4py.SLEPc.SVD.Type> | str <https://docs.python.org/3/library/stdtypes.html#str>) – The solver to be used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
Notes
See SVD.Type <#slepc4py.SLEPc.SVD.Type> for available methods. The default is CROSS. Normally, it is best to use setFromOptions() and then set the SVD type from the options database rather than by using this routine. Using the options database provides the user with maximum flexibility in evaluating the different available methods.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:203 <slepc4py/SLEPc/SVD.pyx#L203>`
- setUp()
- Set up all the necessary internal data structures.
Collective.
Set up all the internal data structures necessary for the execution of the singular value solver.
Notes
This function need not be called explicitly in most cases, since solve() calls it. It can be useful when one wants to measure the set-up time separately from the solve time.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:923 <slepc4py/SLEPc/SVD.pyx#L923>`
- setWhichSingularTriplets(which)
- Set which singular triplets are to be sought.
Logically collective.
- Parameters
- which (Which <#slepc4py.SLEPc.SVD.Which>) – The singular values to be sought (either largest or smallest).
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:437 <slepc4py/SLEPc/SVD.pyx#L437>`
- solve()
- Solve the singular value problem.
Collective.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:940 <slepc4py/SLEPc/SVD.pyx#L940>`
- valuesView(viewer=None)
- Display the computed singular values in a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1157 <slepc4py/SLEPc/SVD.pyx#L1157>`
- vectorsView(viewer=None)
- Output computed singular vectors to a viewer.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1172 <slepc4py/SLEPc/SVD.pyx#L1172>`
- view(viewer=None)
- Print the SVD data structure.
Collective.
- Parameters
- viewer (Viewer <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Viewer.html#petsc4py.PETSc.Viewer> | None <https://docs.python.org/3/library/constants.html#None>) – Visualization context; if not provided, the standard output is used.
- Return type
- None <https://docs.python.org/3/library/constants.html#None>
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:153 <slepc4py/SLEPc/SVD.pyx#L153>`
Attributes Documentation
- ds
- The direct solver (DS) object associated.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1599 <slepc4py/SLEPc/SVD.pyx#L1599>`
- max_it
- The maximum iteration count.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1585 <slepc4py/SLEPc/SVD.pyx#L1585>`
- problem_type
- The type of the eigenvalue problem.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1557 <slepc4py/SLEPc/SVD.pyx#L1557>`
- tol
- The tolerance.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1578 <slepc4py/SLEPc/SVD.pyx#L1578>`
- track_all
- Compute the residual norm of all approximate eigenpairs.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1592 <slepc4py/SLEPc/SVD.pyx#L1592>`
- transpose_mode
- How to handle the transpose of the matrix.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1564 <slepc4py/SLEPc/SVD.pyx#L1564>`
- which
- The portion of the spectrum to be sought.
:sources:`Source code at slepc4py/SLEPc/SVD.pyx:1571 <slepc4py/SLEPc/SVD.pyx#L1571>`
slepc4py.SLEPc.Sys¶
- class slepc4py.SLEPc.Sys
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
Sys.
Methods Summary
getVersion([devel, date, author]) Return SLEPc version information. getVersionInfo() Return SLEPc version information. hasExternalPackage(package) Return whether SLEPc has support for external package. isFinalized() Return whether SLEPc has been finalized. isInitialized() Return whether SLEPc has been initialized. Methods Documentation
- classmethod getVersion(devel=False, date=False, author=False)
- Return SLEPc version information.
Not collective.
- devel (bool <https://docs.python.org/3/library/functions.html#bool>) – Additionally, return whether using an in-development version.
- date (bool <https://docs.python.org/3/library/functions.html#bool>) – Additionally, return date information.
- author (bool <https://docs.python.org/3/library/functions.html#bool>) – Additionally, return author information.
- major (int <https://docs.python.org/3/library/functions.html#int>) – Major version number.
- minor (int <https://docs.python.org/3/library/functions.html#int>) – Minor version number.
- micro (int <https://docs.python.org/3/library/functions.html#int>) – Micro (or patch) version number.
See also:
:sources:`Source code at slepc4py/SLEPc/Sys.pyx:6 <slepc4py/SLEPc/Sys.pyx#L6>`
- classmethod getVersionInfo()
- Return SLEPc version information.
Not collective.
- Returns
- info – Dictionary with version information.
- Return type
- dict <https://docs.python.org/3/library/stdtypes.html#dict>
See also:
:sources:`Source code at slepc4py/SLEPc/Sys.pyx:62 <slepc4py/SLEPc/Sys.pyx#L62>`
- classmethod hasExternalPackage(package)
- Return whether SLEPc has support for external package.
Not collective.
- Parameters
- package (str <https://docs.python.org/3/library/stdtypes.html#str>) – The external package name.
- Return type
- bool <https://docs.python.org/3/library/functions.html#bool>
See also:
:sources:`Source code at slepc4py/SLEPc/Sys.pyx:116 <slepc4py/SLEPc/Sys.pyx#L116>`
- classmethod isFinalized()
- Return whether SLEPc has been finalized.
Not collective.
See also:
:sources:`Source code at slepc4py/SLEPc/Sys.pyx:101 <slepc4py/SLEPc/Sys.pyx#L101>`
- classmethod isInitialized()
- Return whether SLEPc has been initialized.
Not collective.
See also:
:sources:`Source code at slepc4py/SLEPc/Sys.pyx:88 <slepc4py/SLEPc/Sys.pyx#L88>`
slepc4py.SLEPc.Util¶
- class slepc4py.SLEPc.Util
- Bases: object
<https://docs.python.org/3/library/functions.html#object>
Util.
Methods Summary
createMatBSE(R, C) Create a matrix that can be used to define a BSE type problem. createMatHamiltonian(A, B, C) Create matrix to be used for a structured Hamiltonian eigenproblem. Methods Documentation
- classmethod createMatBSE(R, C)
- Create a matrix that can be used to define a BSE type problem.
Collective.
Create a matrix that can be used to define a structured eigenvalue problem of type BSE (Bethe-Salpeter Equation).
- R (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix for the diagonal block (resonant).
- C (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix for the off-diagonal block (coupling).
- Returns
- The matrix with the block form H = [ R\; C; {-C}^H\; {-R}^T ].
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/Util.pyx:6 <slepc4py/SLEPc/Util.pyx#L6>`
- classmethod createMatHamiltonian(A, B, C)
- Create matrix to be used for a structured Hamiltonian eigenproblem.
Collective.
- A (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix for (0,0) block.
- B (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix for (0,1) block, must be real symmetric or Hermitian.
- C (petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>) – The matrix for (1,0) block, must be real symmetric or Hermitian.
- Returns
- The matrix with the block form H = [ A B; C -A^* ].
- Return type
- petsc4py.PETSc.Mat <https://petsc.org/release/petsc4py/reference/petsc4py.PETSc.Mat.html#petsc4py.PETSc.Mat>
:sources:`Source code at slepc4py/SLEPc/Util.pyx:32 <slepc4py/SLEPc/Util.pyx#L32>`
Attributes
| DECIDE <#slepc4py.SLEPc.DECIDE> | Constant DECIDE of type int <https://docs.python.org/3/library/functions.html#int> |
| DEFAULT <#slepc4py.SLEPc.DEFAULT> | Constant DEFAULT of type int <https://docs.python.org/3/library/functions.html#int> |
| DETERMINE <#slepc4py.SLEPc.DETERMINE> | Constant DETERMINE of type int <https://docs.python.org/3/library/functions.html#int> |
| CURRENT <#slepc4py.SLEPc.CURRENT> | Constant CURRENT of type int <https://docs.python.org/3/library/functions.html#int> |
slepc4py.SLEPc.DECIDE¶
slepc4py.SLEPc.DEFAULT¶
slepc4py.SLEPc.DETERMINE¶
slepc4py.SLEPc.CURRENT¶
slepc4py demos¶
Standard symmetric eigenproblem for the Laplacian operator in 1-D¶
This tutorial is intended for basic use of slepc4py. For more advanced use, the reader is referred to SLEPc tutorials as well as to slepc4py reference documentation.
The source code for this demo can be downloaded here <../_static/ex1.py>
The first thing to do is initialize the libraries. This is normally not required, as it is done automatically at import time. However, if you want to gain access to the facilities for accessing command-line options, the following lines must be executed by the main script prior to any petsc4py or slepc4py calls:
import sys, slepc4py slepc4py.init(sys.argv)
Next, we have to import the relevant modules. Normally, both PETSc and SLEPc modules have to be imported in all slepc4py programs. It may be useful to import NumPy as well:
from petsc4py import PETSc from slepc4py import SLEPc import numpy
At this point, we can use any petsc4py and slepc4py operations. For instance, the following lines allow the user to specify an integer command-line argument n with a default value of 30 (see the next section for example usage of command-line options):
opts = PETSc.Options()
n = opts.getInt('n', 30)
It is necessary to build a matrix to define an eigenproblem (or two in the case of generalized eigenproblems). The following fragment of code creates the matrix object and then fills the non-zero elements one by one. The matrix of this particular example is tridiagonal, with value 2 in the diagonal, and -1 in off-diagonal positions. See petsc4py documentation for details about matrix objects:
A = PETSc.Mat(); A.create() A.setSizes([n, n]) A.setFromOptions() rstart, rend = A.getOwnershipRange() # first row if rstart == 0:
A[0, :2] = [2, -1]
rstart += 1 # last row if rend == n:
A[n-1, -2:] = [-1, 2]
rend -= 1 # other rows for i in range(rstart, rend):
A[i, i-1:i+2] = [-1, 2, -1] A.assemble()
The solver object is created in a similar way as other objects in petsc4py:
E = SLEPc.EPS(); E.create()
Once the object is created, the eigenvalue problem must be specified. At least one matrix must be provided. The problem type must be indicated as well, in this case it is HEP (Hermitian eigenvalue problem). Apart from these, other settings could be provided here (for instance, the tolerance for the computation). After all options have been set, the user should call the setFromOptions() <#slepc4py.SLEPc.EPS.setFromOptions> operation, so that any options specified at run time in the command line are passed to the solver object:
E.setOperators(A) E.setProblemType(SLEPc.EPS.ProblemType.HEP) history = [] def monitor(eps, its, nconv, eig, err):
if nconv<len(err): history.append(err[nconv]) E.setMonitor(monitor) E.setFromOptions()
After that, the solve() <#slepc4py.SLEPc.EPS.solve> method will run the selected eigensolver, keeping the solution stored internally:
E.solve()
Once the computation has finished, we are ready to print the results. First, some informative data can be retrieved from the solver object:
Print = PETSc.Sys.Print
Print()
Print("******************************")
Print("*** SLEPc Solution Results ***")
Print("******************************")
Print()
its = E.getIterationNumber()
Print( "Number of iterations of the method: %d" % its )
eps_type = E.getType()
Print( "Solution method: %s" % eps_type )
nev, ncv, mpd = E.getDimensions()
Print( "Number of requested eigenvalues: %d" % nev )
tol, maxit = E.getTolerances()
Print( "Stopping condition: tol=%.4g, maxit=%d" % (tol, maxit) )
For retrieving the solution, it is necessary to find out how many eigenpairs have converged to the requested precision:
nconv = E.getConverged() Print( "Number of converged eigenpairs %d" % nconv )
For each of the nconv eigenpairs, we can retrieve the eigenvalue k, and the eigenvector, which is represented by means of two petsc4py vectors vr and vi (the real and imaginary part of the eigenvector, since for real matrices the eigenvalue and eigenvector may be complex). We also compute the corresponding relative errors in order to make sure that the computed solution is indeed correct:
if nconv > 0:
# Create the results vectors
v, _ = A.createVecs()
#
Print()
Print(" k ||Ax-kx||/||kx|| ")
Print("----------------- ------------------")
for i in range(nconv):
k = E.getEigenpair(i, v)
error = E.computeError(i)
Print( " %12f %12g" % (k, error) )
Print()
Example of command-line usage¶
Now we illustrate how to specify command-line options in order to extract the full potential of slepc4py.
A simple execution of the demo/ex1.py script will result in the following output:
$ python demo/ex1.py ****************************** *** SLEPc Solution Results *** ****************************** Number of iterations of the method: 4 Solution method: krylovschur Number of requested eigenvalues: 1 Stopping condition: tol=1e-07, maxit=100 Number of converged eigenpairs 4
k ||Ax-kx||/||kx|| ----------------- ------------------
3.989739 5.76012e-09
3.959060 1.41957e-08
3.908279 6.74118e-08
3.837916 8.34269e-08
For specifying different setting for the solver parameters, we can use SLEPc command-line options with the -eps prefix. For instance, to change the number of requested eigenvalues and the tolerance:
$ python demo/ex1.py -eps_nev 10 -eps_tol 1e-11
The method used by the solver object can also be set at run time:
$ python demo/ex1.py -eps_type subspace
All the above settings can also be changed within the source code by making use of the appropriate slepc4py method. Since options can be set from within the code and the command-line, it is often useful to view the particular settings that are currently being used:
$ python demo/ex1.py -eps_view EPS Object: 1 MPI process
type: krylovschur
50% of basis vectors kept after restart
using the locking variant
problem type: symmetric eigenvalue problem
selected portion of the spectrum: largest eigenvalues in magnitude
number of eigenvalues (nev): 1
number of column vectors (ncv): 16
maximum dimension of projected problem (mpd): 16
maximum number of iterations: 100
tolerance: 1e-08
convergence test: relative to the eigenvalue BV Object: 1 MPI process
type: mat
17 columns of global length 30
orthogonalization method: classical Gram-Schmidt
orthogonalization refinement: if needed (eta: 0.7071)
block orthogonalization method: GS
doing matmult as a single matrix-matrix product DS Object: 1 MPI process
type: hep
solving the problem with: Implicit QR method (_steqr) ST Object: 1 MPI process
type: shift
shift: 0
number of matrices: 1
Note that for computing eigenvalues of smallest magnitude we can use the option -eps_smallest_magnitude, but for interior eigenvalues things are not so straightforward. One possibility is to try with harmonic extraction, for instance to get the eigenvalues closest to 0.6:
$ python demo/ex1.py -eps_harmonic -eps_target 0.6
Depending on the problem, harmonic extraction may fail to converge. In those cases, it is necessary to specify a spectral transformation other than the default. In the command-line, this is indicated with the -st_ prefix. For example, shift-and-invert with a value of the shift equal to 0.6 would be:
$ python demo/ex1.py -st_type sinvert -eps_target 0.6
Author¶
Lisandro Dalcin
| November 23, 2025 | 3.24 |