slepc4py.SLEPc.EPS — slepc4py 3.24.3 documentation

Skip to main content
`Ctrl`+`K`

# slepc4py.SLEPc.EPS

class slepc4py.SLEPc.EPS

  Bases: `Object`

  Eigenvalue Problem Solver.

  The Eigenvalue Problem Solver (`EPS`) is the object provided by slepc4py for specifying a linear eigenvalue problem, either in standard or generalized form. It provides uniform and efficient access to all of the linear eigensolvers included in the package.

  Enumerations

  `Balance` | EPS type of balancing used for non-Hermitian problems.
  `CISSExtraction` | EPS CISS extraction technique.
  `CISSQuadRule` | EPS CISS quadrature rule.
  `Conv` | EPS convergence test.
  `ConvergedReason` | EPS convergence reasons.
  `ErrorType` | EPS error type to assess accuracy of computed solutions.
  `Extraction` | EPS extraction technique.
  `KrylovSchurBSEType` | EPS Krylov-Schur method for BSE problems.
  `LanczosReorthogType` | EPS Lanczos reorthogonalization type.
  `PowerShiftType` | EPS Power shift type.
  `ProblemType` | EPS problem type.
  `Stop` | EPS stopping test.
  `Type` | EPS type.
  `Which` | EPS desired part of spectrum.

  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.
  `getArbitrarySelection`() | Get the arbitrary selection function.
  `getArnoldiDelayed`() | Get the type of reorthogonalization used during the Arnoldi iteration.
  `getBV`() | Get the basis vectors object 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` 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()`.
  `getEigenvalueComparison`() | Get the eigenvalue comparison function.
  `getEigenvector`(i[, Vr, Vi]) | Get the i-th right 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 test 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` 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) | Set vectors to form a 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 eigensolver.
  `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 a function to decide 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 | None) – The prefix string to prepend to all EPS option requests.

    Return type:

      None

    See also

    `setOptionsPrefix`, `getOptionsPrefix`, `EPSAppendOptionsPrefix`

    Source code at slepc4py/SLEPc/EPS.pyx:513

  cancelMonitor()

    Clear all monitors for an `EPS` object.

    Logically collective.

    See also

    `EPSMonitorCancel`

    Source code at slepc4py/SLEPc/EPS.pyx:1860

    Return type:

      None

  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.

    Parameters:

      - i (int) – Index of the solution to be considered.

      - etype (ErrorType | None) – The error type to compute.

    Returns:

      The error bound, computed in various ways from the residual norm \(\|Ax-\lambda Bx\|_2\) where \(\lambda\) is the eigenvalue and \(x\) is the eigenvector.

    Return type:

      `float`

    Notes

    The index `i` should be a value between `0` and `nconv-1` (see `getConverged()`).

    If the computation of left eigenvectors was enabled with `setTwoSided()`, then the error will be computed using the maximum of the value above and the left residual norm \(\|y^*A-\lambda y^*B\|_2\), where \(y\) is the approximate left eigenvector.

    See also

    `getErrorEstimate`, `setTwoSided`, `EPSComputeError`

    Source code at slepc4py/SLEPc/EPS.pyx:2213

  create(comm=None)

    Create the EPS object.

    Collective.

    Parameters:

      comm (Comm | None) – MPI communicator; if not provided, it defaults to all processes.

    Return type:

      Self

    See also

    `EPSCreate`

    Source code at slepc4py/SLEPc/EPS.pyx:396

  destroy()

    Destroy the EPS object.

    Collective.

    See also

    `EPSDestroy`

    Source code at slepc4py/SLEPc/EPS.pyx:370

    Return type:

      Self

  errorView(etype=None, viewer=None)

    Display the errors associated with the computed solution.

    Collective.

    Display the errors and the eigenvalues.

    Parameters:

      - etype (ErrorType | None) – The error type to compute.

      - viewer (petsc4py.PETSc.Viewer | None) – Visualization context; if not provided, the standard output is used.

    Return type:

      None

    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.

    See also

    `solve`, `valuesView`, `vectorsView`, `EPSErrorView`

    Source code at slepc4py/SLEPc/EPS.pyx:2256

  getArbitrarySelection()

    Get the arbitrary selection function.

    Not collective.

    Returns:

      The arbitrary selection function.

    Return type:

      `EPSArbitraryFunction`

    See also

    `setArbitrarySelection`

    Source code at slepc4py/SLEPc/EPS.pyx:1754

  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`

    See also

    `setArnoldiDelayed`, `EPSArnoldiGetDelayed`

    Source code at slepc4py/SLEPc/EPS.pyx:2411

  getBV()

    Get the basis vectors object associated to the eigensolver.

    Not collective.

    Returns:

      The basis vectors context.

    Return type:

      `BV`

    See also

    `setBV`, `EPSGetBV`

    Source code at slepc4py/SLEPc/EPS.pyx:1407

  getBalance()

    Get the balancing type used by the EPS, and the associated parameters.

    Not collective.

    Returns:

      - balance (`Balance`) – The balancing method.

      - iterations (`int`) – Number of iterations of the balancing algorithm.

      - cutoff (`float`) – Cutoff value.

    Return type:

      tuple[Balance, int, float]

    See also

    `setBalance`, `EPSGetBalance`

    Source code at slepc4py/SLEPc/EPS.pyx:693

  getCISSExtraction()

    Get the extraction technique used in the CISS solver.

    Not collective.

    Returns:

      The extraction technique.

    Return type:

      `CISSExtraction`

    See also

    `setCISSExtraction`, `EPSCISSGetExtraction`

    Source code at slepc4py/SLEPc/EPS.pyx:3957

  getCISSKSPs()

    Get the array of linear solver objects associated with the CISS solver.

    Not collective.

    Returns:

      The linear solver objects.

    Return type:

      `list` of `petsc4py.PETSc.KSP`

    Notes

    The number of `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.

    See also

    `setCISSSizes`, `EPSCISSGetKSPs`

    Source code at slepc4py/SLEPc/EPS.pyx:4238

  getCISSQuadRule()

    Get the quadrature rule used in the CISS solver.

    Not collective.

    Returns:

      The quadrature rule.

    Return type:

      `CISSQuadRule`

    See also

    `setCISSQuadRule`, `EPSCISSGetQuadRule`

    Source code at slepc4py/SLEPc/EPS.pyx:3994

  getCISSRefinement()

    Get the values of various refinement parameters in the CISS solver.

    Not collective.

    Returns:

      - inner (`int`) – Number of iterative refinement iterations (inner loop).

      - blsize (`int`) – Number of iterative refinement iterations (blocksize loop).

    Return type:

      tuple[int, int]

    See also

    `setCISSRefinement`, `EPSCISSGetRefinement`

    Source code at slepc4py/SLEPc/EPS.pyx:4169

  getCISSSizes()

    Get the values of various size parameters in the CISS solver.

    Not collective.

    Returns:

      - ip (`int`) – Number of integration points.

      - bs (`int`) – Block size.

      - ms (`int`) – Moment size.

      - npart (`int`) – Number of partitions when splitting the communicator.

      - bsmax (`int`) – Maximum block size.

      - realmats (`bool`) – `True` if A and B are real.

    Return type:

      tuple[int, int, int, int, int, bool]

    See also

    `setCISSSizes`, `EPSCISSGetSizes`

    Source code at slepc4py/SLEPc/EPS.pyx:4067

  getCISSThreshold()

    Get the values of various threshold parameters in the CISS solver.

    Not collective.

    Returns:

      - delta (`float`) – Threshold for numerical rank.

      - spur (`float`) – Spurious threshold (to discard spurious eigenpairs.

    Return type:

      tuple[float, float]

    See also

    `setCISSThreshold`, `EPSCISSGetThreshold`

    Source code at slepc4py/SLEPc/EPS.pyx:4124

  getCISSUseST()

    Get the flag indicating the use of the `ST` object in the CISS solver.

    Not collective.

    Returns:

      Whether to use the `ST` object or not.

    Return type:

      `bool`

    See also

    `setCISSUseST`, `EPSCISSGetUseST`

    Source code at slepc4py/SLEPc/EPS.pyx:4219

  getConverged()

    Get the number of converged eigenpairs.

    Not collective.

    Returns:

      nconv – Number of converged eigenpairs.

    Return type:

      `int`

    Notes

    This function should be called after `solve()` has finished.

    The value `nconv` may be different from the number of requested solutions `nev`, but not larger than `ncv`, see `setDimensions()`.

    See also

    `setDimensions`, `solve`, `getEigenpair`, `EPSGetConverged`

    Source code at slepc4py/SLEPc/EPS.pyx:1960

  getConvergedReason()

    Get the reason why the `solve()` iteration was stopped.

    Not collective.

    Returns:

      Negative value indicates diverged, positive value converged.

    Return type:

      `ConvergedReason`

    See also

    `setTolerances`, `solve`, `EPSGetConvergedReason`

    Source code at slepc4py/SLEPc/EPS.pyx:1941

  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`

    See also

    `setConvergenceTest`, `EPSGetConvergenceTest`

    Source code at slepc4py/SLEPc/EPS.pyx:1177

  getDS()

    Get the direct solver associated to the eigensolver.

    Not collective.

    Returns:

      The direct solver context.

    Return type:

      `DS`

    See also

    `setDS`, `EPSGetDS`

    Source code at slepc4py/SLEPc/EPS.pyx:1444

  getDimensions()

    Get number of eigenvalues to compute and the dimension of the subspace.

    Not collective.

    Returns:

      - nev (`int`) – Number of eigenvalues to compute.

      - ncv (`int`) – Maximum dimension of the subspace to be used by the solver.

      - mpd (`int`) – Maximum dimension allowed for the projected problem.

    Return type:

      tuple[int, int, int]

    See also

    `setDimensions`, `EPSGetDimensions`

    Source code at slepc4py/SLEPc/EPS.pyx:1290

  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.

    Parameters:

      - i (int) – Index of the solution to be obtained.

      - Vr (Vec | None) – Placeholder for the returned eigenvector (real part).

      - Vi (Vec | 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`

    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()`.

    The 2-norm of the eigenvector is one unless the problem is generalized Hermitian. In this case the eigenvector is normalized with respect to the norm defined by the B matrix.

    See also

    `solve`, `getConverged`, `setWhichEigenpairs`, `EPSGetEigenpair`

    Source code at slepc4py/SLEPc/EPS.pyx:2090

  getEigenvalue(i)

    Get the i-th eigenvalue as computed by `solve()`.

    Not collective.

    Parameters:

      i (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`

    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()`.

    See also

    `getConverged`, `setWhichEigenpairs`, `getEigenpair`, `EPSGetEigenvalue`

    Source code at slepc4py/SLEPc/EPS.pyx:1986

  getEigenvalueComparison()

    Get the eigenvalue comparison function.

    Not collective.

    Returns:

      The eigenvalue comparison function.

    Return type:

      `EPSEigenvalueComparison`

    See also

    `setEigenvalueComparison`

    Source code at slepc4py/SLEPc/EPS.pyx:1801

  getEigenvector(i, Vr=None, Vi=None)

    Get the i-th right eigenvector as computed by `solve()`.

    Collective.

    Parameters:

      - i (int) – Index of the solution to be obtained.

      - Vr (Vec | None) – Placeholder for the returned eigenvector (real part).

      - Vi (Vec | None) – Placeholder for the returned eigenvector (imaginary part).

    Return type:

      None

    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()`.

    The 2-norm of the eigenvector is one unless the problem is generalized Hermitian. In this case the eigenvector is normalized with respect to the norm defined by the B matrix.

    See also

    `getConverged`, `setWhichEigenpairs`, `getEigenpair`, `EPSGetEigenvector`

    Source code at slepc4py/SLEPc/EPS.pyx:2024

  getErrorEstimate(i)

    Get the error estimate associated to the i-th computed eigenpair.

    Not collective.

    Parameters:

      i (int) – Index of the solution to be considered.

    Returns:

      Error estimate.

    Return type:

      `float`

    Notes

    This is the error estimate used internally by the eigensolver. The actual error bound can be computed with `computeError()`.

    See also

    `computeError`, `EPSGetErrorEstimate`

    Source code at slepc4py/SLEPc/EPS.pyx:2184

  getExtraction()

    Get the extraction type used by the EPS object.

    Not collective.

    Returns:

      The method of extraction.

    Return type:

      `Extraction`

    See also

    `setExtraction`, `EPSGetExtraction`

    Source code at slepc4py/SLEPc/EPS.pyx:768

  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`

    See also

    `setGDBOrth`, `EPSGDGetBOrth`

    Source code at slepc4py/SLEPc/EPS.pyx:3334

  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`

    See also

    `setGDBlockSize`, `EPSGDGetBlockSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3193

  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`

    See also

    `setGDDoubleExpansion`, `EPSGDGetDoubleExpansion`

    Source code at slepc4py/SLEPc/EPS.pyx:3382

  getGDInitialSize()

    Get the initial size of the searching space.

    Not collective.

    Returns:

      The number of vectors of the initial searching subspace.

    Return type:

      `int`

    See also

    `setGDInitialSize`, `EPSGDGetInitialSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3294

  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`

    See also

    `setGDKrylovStart`, `EPSGDGetKrylovStart`

    Source code at slepc4py/SLEPc/EPS.pyx:3153

  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.

    Returns:

      - minv (`int`) – The number of vectors of the search subspace after restart.

      - plusk (`int`) – The number of vectors saved from the previous iteration.

    Return type:

      tuple[int, int]

    See also

    `setGDRestart`, `EPSGDGetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:3241

  getInterval()

    Get the computational interval for spectrum slicing.

    Not collective.

    Returns:

      - inta (`float`) – The left end of the interval.

      - intb (`float`) – The right end of the interval.

    Return type:

      tuple[float, float]

    Notes

    If the interval was not set by the user, then zeros are returned.

    See also

    `setInterval`, `EPSGetInterval`

    Source code at slepc4py/SLEPc/EPS.pyx:972

  getInvariantSubspace()

    Get an orthonormal basis of the computed invariant subspace.

    Collective.

    Returns:

      Basis of the invariant subspace.

    Return type:

      `list` of `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).

    See also

    `getEigenpair`, `getConverged`, `solve`, `EPSGetInvariantSubspace`

    Source code at slepc4py/SLEPc/EPS.pyx:2140

  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`

    See also

    `getConvergedReason`, `setTolerances`, `EPSGetIterationNumber`

    Source code at slepc4py/SLEPc/EPS.pyx:1919

  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`

    See also

    `setJDBOrth`, `EPSJDGetBOrth`

    Source code at slepc4py/SLEPc/EPS.pyx:3693

  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`

    See also

    `setJDBlockSize`, `EPSJDGetBlockSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3464

  getJDConstCorrectionTol()

    Get the flag indicating if the dynamic stopping is being used.

    Not collective.

    Returns:

      `True` if the dynamic stopping criterion is not being used.

    Return type:

      `bool`

    See also

    `setJDConstCorrectionTol`, `EPSJDGetConstCorrectionTol`

    Source code at slepc4py/SLEPc/EPS.pyx:3653

  getJDFix()

    Get the threshold for changing the target in the correction equation.

    Not collective.

    Returns:

      The threshold for changing the target.

    Return type:

      `float`

    See also

    `setJDFix`, `EPSJDGetFix`

    Source code at slepc4py/SLEPc/EPS.pyx:3608

  getJDInitialSize()

    Get the initial size of the searching space.

    Not collective.

    Returns:

      The number of vectors of the initial searching subspace.

    Return type:

      `int`

    See also

    `setJDInitialSize`, `EPSJDGetInitialSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3565

  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`

    See also

    `setJDKrylovStart`, `EPSJDGetKrylovStart`

    Source code at slepc4py/SLEPc/EPS.pyx:3424

  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.

    Returns:

      - minv (`int`) – The number of vectors of the search subspace after restart.

      - plusk (`int`) – The number of vectors saved from the previous iteration.

    Return type:

      tuple[int, int]

    See also

    `setJDRestart`, `EPSJDGetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:3512

  getKrylovSchurBSEType()

    Get the method used for BSE structured eigenproblems (Krylov-Schur).

    Not collective.

    Returns:

      The BSE method.

    Return type:

      `KrylovSchurBSEType`

    See also

    `setKrylovSchurBSEType`, `EPSKrylovSchurGetBSEType`

    Source code at slepc4py/SLEPc/EPS.pyx:2499

  getKrylovSchurDetectZeros()

    Get the flag that enforces zero detection in spectrum slicing.

    Not collective.

    Returns:

      The zero detection flag.

    Return type:

      `bool`

    See also

    `setKrylovSchurDetectZeros`, `EPSKrylovSchurGetDetectZeros`

    Source code at slepc4py/SLEPc/EPS.pyx:2693

  getKrylovSchurDimensions()

    Get the dimensions used for each subsolve step (spectrum slicing).

    Not collective.

    Returns:

      - nev (`int`) – Number of eigenvalues to compute.

      - ncv (`int`) – Maximum dimension of the subspace to be used by the solver.

      - mpd (`int`) – Maximum dimension allowed for the projected problem.

    Return type:

      tuple[int, int, int]

    See also

    `setKrylovSchurDimensions`, `EPSKrylovSchurGetDimensions`

    Source code at slepc4py/SLEPc/EPS.pyx:2752

  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.

    Returns:

      - shifts (`ArrayReal`) – The values of the shifts used internally in the solver.

      - inertias (`ArrayInt`) – The values of the inertia in each shift.

    Return type:

      tuple[ArrayReal, ArrayInt]

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    If called after `solve()`, all shifts used internally by the solver are returned (including both endpoints and any intermediate ones). If called before `solve()` and after `setUp()` then only the information of the endpoints of subintervals is available.

    See also

    `setInterval`, `setKrylovSchurSubintervals`, `EPSKrylovSchurGetInertias`

    Source code at slepc4py/SLEPc/EPS.pyx:3050

  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`

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    When invoked to compute all eigenvalues in an interval with spectrum slicing, `KRYLOVSCHUR` creates another `EPS` object internally that is used to compute eigenvalues by chunks near selected shifts. This function allows access to the `KSP` object associated to this internal `EPS` object.

    In case of having more than one partition, the returned `KSP` will be different in MPI processes belonging to different partitions. Hence, if required, `setKrylovSchurPartitions()` must be called BEFORE this function.

    See also

    `setInterval`, `setKrylovSchurPartitions`, `EPSKrylovSchurGetKSP`

    Source code at slepc4py/SLEPc/EPS.pyx:3094

  getKrylovSchurLocking()

    Get the locking flag used in the Krylov-Schur method.

    Not collective.

    Returns:

      The locking flag.

    Return type:

      `bool`

    See also

    `setKrylovSchurLocking`, `EPSKrylovSchurGetLocking`

    Source code at slepc4py/SLEPc/EPS.pyx:2586

  getKrylovSchurPartitions()

    Get the number of partitions of the communicator (spectrum slicing).

    Not collective.

    Returns:

      The number of partitions.

    Return type:

      `int`

    See also

    `setKrylovSchurPartitions`, `EPSKrylovSchurGetPartitions`

    Source code at slepc4py/SLEPc/EPS.pyx:2640

  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`

    See also

    `setKrylovSchurRestart`, `EPSKrylovSchurGetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:2542

  getKrylovSchurSubcommInfo()

    Get information related to the case of doing spectrum slicing.

    Collective on the subcommunicator.

    Get information related to the case of doing spectrum slicing for a computational interval with multiple communicators.

    Returns:

      - k (`int`) – Index of the subinterval for the calling process.

      - n (`int`) – Number of eigenvalues found in the `k`-th subinterval.

      - v (`petsc4py.PETSc.Vec`) – A vector owned by processes in the subcommunicator with dimensions compatible for locally computed eigenvectors.

    Return type:

      tuple[int, int, Vec]

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    See also

    `getKrylovSchurSubcommPairs`, `EPSKrylovSchurGetSubcommInfo`

    Source code at slepc4py/SLEPc/EPS.pyx:2777

  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.

    Returns:

      - A (`petsc4py.PETSc.Mat`) – The matrix associated with the eigensystem.

      - B (`petsc4py.PETSc.Mat`) – The second matrix in the case of generalized eigenproblems.

    Return type:

      tuple[Mat, Mat] | tuple[Mat, None]

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set. And is relevant only when the number of partitions (`setKrylovSchurPartitions()`) is larger than one.

    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.

    See also

    `setInterval`, `setKrylovSchurPartitions`, `EPSKrylovSchurGetSubcommMats`

    Source code at slepc4py/SLEPc/EPS.pyx:2855

  getKrylovSchurSubcommPairs(i, v=None)

    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.

    Parameters:

      - i (int) – Index of the solution to be obtained.

      - v (Vec | None) – Placeholder for the returned eigenvector.

    Returns:

      The computed eigenvalue.

    Return type:

      `Scalar`

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set. And is relevant only when the number of partitions (`setKrylovSchurPartitions()`) is larger than one.

    Argument `v` must be a valid `Vec` object, created by calling `getKrylovSchurSubcommInfo()`.

    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()`.

    See also

    `getKrylovSchurSubcommMats`, `EPSKrylovSchurGetSubcommPairs`

    Source code at slepc4py/SLEPc/EPS.pyx:2811

  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`

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    If the user passed values with `setKrylovSchurSubintervals()`, then the same values are returned here. Otherwise, the values computed internally are obtained.

    See also

    `setKrylovSchurSubintervals`, `EPSKrylovSchurGetSubintervals`

    Source code at slepc4py/SLEPc/EPS.pyx:3012

  getLOBPCGBlockSize()

    Get the block size used in the LOBPCG method.

    Not collective.

    Returns:

      The block size.

    Return type:

      `int`

    See also

    `setLOBPCGBlockSize`, `EPSLOBPCGGetBlockSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3777

  getLOBPCGLocking()

    Get the locking flag used in the LOBPCG method.

    Not collective.

    Returns:

      The locking flag.

    Return type:

      `bool`

    See also

    `setLOBPCGLocking`, `EPSLOBPCGGetLocking`

    Source code at slepc4py/SLEPc/EPS.pyx:3864

  getLOBPCGRestart()

    Get the restart parameter used in the LOBPCG method.

    Not collective.

    Returns:

      The restart parameter.

    Return type:

      `float`

    See also

    `setLOBPCGRestart`, `EPSLOBPCGGetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:3821

  getLanczosReorthogType()

    Get the type of reorthogonalization used during the Lanczos iteration.

    Not collective.

    Returns:

      The type of reorthogonalization.

    Return type:

      `LanczosReorthogType`

    See also

    `setLanczosReorthogType`, `EPSLanczosGetReorthog`

    Source code at slepc4py/SLEPc/EPS.pyx:2453

  getLeftEigenvector(i, Wr=None, Wi=None)

    Get the i-th left eigenvector as computed by `solve()`.

    Collective.

    Parameters:

      - i (int) – Index of the solution to be obtained.

      - Wr (Vec | None) – Placeholder for the returned left eigenvector (real part).

      - Wi (Vec | None) – Placeholder for the returned left eigenvector (imaginary part).

    Return type:

      None

    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()`.

    See also

    `getConverged`, `setWhichEigenpairs`, `getEigenpair`, `EPSGetLeftEigenvector`

    Source code at slepc4py/SLEPc/EPS.pyx:2058

  getLyapIIRanks()

    Get the rank values used for the Lyapunov step.

    Not collective.

    Returns:

      - rkc (`int`) – The compressed rank.

      - rkl (`int`) – The Lyapunov rank.

    Return type:

      tuple[int, int]

    See also

    `setLyapIIRanks`, `EPSLyapIIGetRanks`

    Source code at slepc4py/SLEPc/EPS.pyx:3915

  getMonitor()

    Get the list of monitor functions.

    Not collective.

    Returns:

      The list of monitor functions.

    Return type:

      `EPSMonitorFunction`

    See also

    `setMonitor`

    Source code at slepc4py/SLEPc/EPS.pyx:1843

  getOperators()

    Get the matrices associated with the eigenvalue problem.

    Collective.

    Returns:

      - A (`petsc4py.PETSc.Mat`) – The matrix associated with the eigensystem.

      - B (`petsc4py.PETSc.Mat`) – The second matrix in the case of generalized eigenproblems.

    Return type:

      tuple[Mat, Mat] | tuple[Mat, None]

    See also

    `setOperators`, `EPSGetOperators`

    Source code at slepc4py/SLEPc/EPS.pyx:1518

  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`

    See also

    `setOptionsPrefix`, `appendOptionsPrefix`, `EPSGetOptionsPrefix`

    Source code at slepc4py/SLEPc/EPS.pyx:463

  getPowerShiftType()

    Get the type of shifts used during the power iteration.

    Not collective.

    Returns:

      The type of shift.

    Return type:

      `PowerShiftType`

    See also

    `setPowerShiftType`, `EPSPowerGetShiftType`

    Source code at slepc4py/SLEPc/EPS.pyx:2364

  getProblemType()

    Get the problem type from the EPS object.

    Not collective.

    Returns:

      The problem type that was previously set.

    Return type:

      `ProblemType`

    See also

    `setProblemType`, `EPSGetProblemType`

    Source code at slepc4py/SLEPc/EPS.pyx:553

  getPurify()

    Get the flag indicating whether purification is activated or not.

    Not collective.

    Returns:

      Whether purification is activated or not.

    Return type:

      `bool`

    See also

    `setPurify`, `EPSGetPurify`

    Source code at slepc4py/SLEPc/EPS.pyx:1132

  getRG()

    Get the region object associated to the eigensolver.

    Not collective.

    Returns:

      The region context.

    Return type:

      `RG`

    See also

    `setRG`, `EPSGetRG`

    Source code at slepc4py/SLEPc/EPS.pyx:1481

  getRQCGReset()

    Get the reset parameter used in the RQCG method.

    Not collective.

    Returns:

      The number of iterations between resets.

    Return type:

      `int`

    See also

    `setRQCGReset`, `EPSRQCGGetReset`

    Source code at slepc4py/SLEPc/EPS.pyx:3740

  getST()

    Get the spectral transformation object associated to the eigensolver.

    Not collective.

    Returns:

      The spectral transformation.

    Return type:

      `ST`

    See also

    `setST`, `EPSGetST`

    Source code at slepc4py/SLEPc/EPS.pyx:1370

  getStoppingTest()

    Get the stopping test function.

    Not collective.

    Returns:

      The stopping test function.

    Return type:

      `EPSStoppingFunction`

    See also

    `setStoppingTest`

    Source code at slepc4py/SLEPc/EPS.pyx:1708

  getTarget()

    Get the value of the target.

    Not collective.

    Returns:

      The value of the target.

    Return type:

      `Scalar`

    Notes

    If the target was not set by the user, then zero is returned.

    See also

    `setTarget`, `EPSGetTarget`

    Source code at slepc4py/SLEPc/EPS.pyx:922

  getThreshold()

    Get the threshold used in the threshold stopping test.

    Not collective.

    Returns:

      - thres (`float`) – The threshold.

      - rel (`bool`) – Whether the threshold is relative or not.

    Return type:

      tuple[float, bool]

    See also

    `setThreshold`, `EPSGetThreshold`

    Source code at slepc4py/SLEPc/EPS.pyx:871

  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.

    Returns:

      - tol (`float`) – The convergence tolerance.

      - max_it (`int`) – The maximum number of iterations.

    Return type:

      tuple[float, int]

    See also

    `setTolerances`, `EPSGetTolerances`

    Source code at slepc4py/SLEPc/EPS.pyx:1032

  getTrackAll()

    Get the flag indicating if all residual norms must be computed or not.

    Not collective.

    Returns:

      Whether the solver computes all residuals or not.

    Return type:

      `bool`

    See also

    `setTrackAll`, `EPSGetTrackAll`

    Source code at slepc4py/SLEPc/EPS.pyx:1253

  getTrueResidual()

    Get the flag indicating if true residual must be computed explicitly.

    Not collective.

    Returns:

      Whether the solver computes true residuals or not.

    Return type:

      `bool`

    See also

    `setTrueResidual`, `EPSGetTrueResidual`

    Source code at slepc4py/SLEPc/EPS.pyx:1216

  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`

    See also

    `setTwoSided`, `EPSGetTwoSided`

    Source code at slepc4py/SLEPc/EPS.pyx:1085

  getType()

    Get the EPS type of this object.

    Not collective.

    Returns:

      The solver currently being used.

    Return type:

      `str`

    See also

    `setType`, `EPSGetType`

    Source code at slepc4py/SLEPc/EPS.pyx:444

  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`

    See also

    `setWhichEigenpairs`, `EPSGetWhichEigenpairs`

    Source code at slepc4py/SLEPc/EPS.pyx:815

  isGeneralized()

    Tell if the EPS object corresponds to a generalized eigenproblem.

    Not collective.

    Returns:

      `True` if the problem is generalized.

    Return type:

      `bool`

    See also

    `isHermitian`, `isPositive`, `isStructured`, `EPSIsGeneralized`

    Source code at slepc4py/SLEPc/EPS.pyx:608

  isHermitian()

    Tell if the EPS object corresponds to a Hermitian eigenproblem.

    Not collective.

    Returns:

      `True` if the problem is Hermitian.

    Return type:

      `bool`

    See also

    `isGeneralized`, `isPositive`, `isStructured`, `EPSIsHermitian`

    Source code at slepc4py/SLEPc/EPS.pyx:627

  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 is positive (semi-) definite.

    Return type:

      `bool`

    See also

    `isGeneralized`, `isHermitian`, `isStructured`, `EPSIsPositive`

    Source code at slepc4py/SLEPc/EPS.pyx:646

  isStructured()

    Tell if the EPS object corresponds to a structured eigenvalue problem.

    Not collective.

    Returns:

      `True` if the problem is structured.

    Return type:

      `bool`

    Notes

    The result will be `True` if the problem type has been set to some structured type such as `BSE`. This is independent of whether the input matrix has been built with a certain structure with a helper function.

    See also

    `isGeneralized`, `isHermitian`, `isPositive`, `EPSIsStructured`

    Source code at slepc4py/SLEPc/EPS.pyx:668

  reset()

    Reset the EPS object.

    Collective.

    See also

    `EPSReset`

    Source code at slepc4py/SLEPc/EPS.pyx:384

    Return type:

      None

  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.

    See also

    `getArbitrarySelection`, `EPSSetArbitrarySelection`

    Source code at slepc4py/SLEPc/EPS.pyx:1725

    Parameters:

      - arbitrary (EPSArbitraryFunction | None)

      - args (tuple[Any, ...] | None)

      - kargs (dict[str, Any] | None)

    Return type:

      None

  setArnoldiDelayed(delayed)

    Set (toggle) delayed reorthogonalization in the Arnoldi iteration.

    Logically collective.

    Parameters:

      delayed (bool) – `True` if delayed reorthogonalization is to be used.

    Return type:

      None

    Notes

    This call is only relevant if the type was set to `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 more slowly compared to the default algorithm.

    See also

    `getArnoldiDelayed`, `EPSArnoldiSetDelayed`

    Source code at slepc4py/SLEPc/EPS.pyx:2383

  setBV(bv)

    Set a basis vectors object associated to the eigensolver.

    Collective.

    Parameters:

      bv (BV) – The basis vectors context.

    Return type:

      None

    See also

    `getBV`, `EPSSetBV`

    Source code at slepc4py/SLEPc/EPS.pyx:1427

  setBalance(balance=None, iterations=None, cutoff=None)

    Set the balancing technique to be used by the eigensolver.

    Logically collective.

    Parameters:

      - balance (Balance | None) – The balancing method.

      - iterations (int | None) – Number of iterations of the balancing algorithm.

      - cutoff (float | None) – Cutoff value.

    Return type:

      None

    Notes

    When balancing is enabled, the solver works implicitly with matrix \(DAD^{-1}\), where \(D\) is an appropriate diagonal matrix. This improves the accuracy of the computed results in some cases.

    Balancing makes sense only for non-Hermitian problems when the required precision is high (i.e., with a small tolerance).

    By default, balancing is disabled. The two-sided method is much more effective than the one-sided counterpart, but it requires the system matrices to have the `Mat.multTranspose()` operation defined.

    The parameter `iterations` is the number of iterations performed by the method. The `cutoff` value is used only in the two-side variant.

    See also

    `setBalance`, `EPSGetBalance`

    Source code at slepc4py/SLEPc/EPS.pyx:718

  setCISSExtraction(extraction)

    Set the extraction technique used in the CISS solver.

    Logically collective.

    Parameters:

      extraction (CISSExtraction) – The extraction technique.

    Return type:

      None

    See also

    `getCISSExtraction`, `EPSCISSSetExtraction`

    Source code at slepc4py/SLEPc/EPS.pyx:3939

  setCISSQuadRule(quad)

    Set the quadrature rule used in the CISS solver.

    Logically collective.

    Parameters:

      quad (CISSQuadRule) – The quadrature rule.

    Return type:

      None

    See also

    `getCISSQuadRule`, `EPSCISSSetQuadRule`

    Source code at slepc4py/SLEPc/EPS.pyx:3976

  setCISSRefinement(inner=None, blsize=None)

    Set the values of various refinement parameters in the CISS solver.

    Logically collective.

    Parameters:

      - inner (int | None) – Number of iterative refinement iterations (inner loop).

      - blsize (int | None) – Number of iterative refinement iterations (blocksize loop).

    Return type:

      None

    See also

    `getCISSRefinement`, `EPSCISSSetRefinement`

    Source code at slepc4py/SLEPc/EPS.pyx:4146

  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.

    Parameters:

      - ip (int | None) – Number of integration points.

      - bs (int | None) – Block size.

      - ms (int | None) – Moment size.

      - npart (int | None) – Number of partitions when splitting the communicator.

      - bsmax (int | None) – Maximum block size.

      - realmats (bool) – `True` if A and B are real.

    Return type:

      None

    Notes

    The default number of partitions is 1. This means the internal `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` solves proceed simultaneously.

    See also

    `getCISSSizes`, `setCISSThreshold`, `setCISSRefinement`, `EPSCISSSetSizes`

    Source code at slepc4py/SLEPc/EPS.pyx:4013

  setCISSThreshold(delta=None, spur=None)

    Set the values of various threshold parameters in the CISS solver.

    Logically collective.

    Parameters:

      - delta (float | None) – Threshold for numerical rank.

      - spur (float | None) – Spurious threshold (to discard spurious eigenpairs).

    Return type:

      None

    See also

    `getCISSThreshold`, `EPSCISSSetThreshold`

    Source code at slepc4py/SLEPc/EPS.pyx:4101

  setCISSUseST(usest)

    Set a flag indicating that the CISS solver will use the `ST` object.

    Logically collective.

    Parameters:

      usest (bool) – Whether to use the `ST` object or not.

    Return type:

      None

    Notes

    When this option is set, the linear solves can be configured by setting options for the `petsc4py.PETSc.KSP` object obtained with `ST.getKSP()`. Otherwise, several `petsc4py.PETSc.KSP` objects are created, which can be accessed with `getCISSKSPs()`.

    The default is to use the `ST`, unless several partitions have been specified, see `setCISSSizes()`.

    See also

    `getCISSUseST`, `getCISSKSPs`, `setCISSSizes`, `EPSCISSSetUseST`

    Source code at slepc4py/SLEPc/EPS.pyx:4191

  setConvergenceTest(conv)

    Set how to compute the error estimate used in the convergence test.

    Logically collective.

    Parameters:

      conv (Conv) – The method used to compute the error estimate used in the convergence test.

    Return type:

      None

    See also

    `getConvergenceTest`, `EPSSetConvergenceTest`

    Source code at slepc4py/SLEPc/EPS.pyx:1197

  setDS(ds)

    Set a direct solver object associated to the eigensolver.

    Collective.

    Parameters:

      ds (DS) – The direct solver context.

    Return type:

      None

    See also

    `getDS`, `EPSSetDS`

    Source code at slepc4py/SLEPc/EPS.pyx:1464

  setDeflationSpace(space)

    Set vectors to form a basis of the deflation space.

    Collective.

    Parameters:

      space (Vec | list[Vec]) – Set of basis vectors of the deflation space.

    Return type:

      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).

    These vectors do not persist from one `solve()` call to the other, so the deflation space should be set every time.

    The vectors do not need to be mutually orthonormal, since they are explicitly orthonormalized internally.

    See also

    `setInitialSpace`, `EPSSetDeflationSpace`

    Source code at slepc4py/SLEPc/EPS.pyx:1576

  setDimensions(nev=None, ncv=None, mpd=None)

    Set number of eigenvalues to compute and the dimension of the subspace.

    Logically collective.

    Parameters:

      - nev (int | None) – Number of eigenvalues to compute.

      - ncv (int | None) – Maximum dimension of the subspace to be used by the solver.

      - mpd (int | None) – Maximum dimension allowed for the projected problem.

    Return type:

      None

    Notes

    Use `DETERMINE` 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.

    When computing all eigenvalues in an interval, see `setInterval()`, these parameters lose relevance, and tuning must be done with `setKrylovSchurDimensions()`.

    See also

    `getDimensions`, `setKrylovSchurDimensions`, `EPSSetDimensions`

    Source code at slepc4py/SLEPc/EPS.pyx:1315

  setEigenvalueComparison(comparison, args=None, kargs=None)

    Set an eigenvalue comparison function.

    Logically collective.

    Notes

    This eigenvalue comparison function is used when `setWhichEigenpairs()` is set to `EPS.Which.USER`.

    See also

    `getEigenvalueComparison`, `EPSSetEigenvalueComparison`

    Source code at slepc4py/SLEPc/EPS.pyx:1771

    Parameters:

      - comparison (EPSEigenvalueComparison | None)

      - args (tuple[Any, ...] | None)

      - kargs (dict[str, Any] | None)

    Return type:

      None

  setExtraction(extraction)

    Set the extraction type used by the eigensolver.

    Logically collective.

    Parameters:

      extraction (Extraction) – The extraction method to be used by the solver.

    Return type:

      None

    Notes

    Not all eigensolvers support all types of extraction.

    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()`.

    See also

    `getExtraction`, `setTarget`, `EPSSetExtraction`

    Source code at slepc4py/SLEPc/EPS.pyx:787

  setFromOptions()

    Set EPS options from the options database.

    Collective.

    Notes

    To see all options, run your program with the `-help` option.

    This routine must be called before `setUp()` if the user is to be allowed to set the solver type.

    See also

    `setOptionsPrefix`, `EPSSetFromOptions`

    Source code at slepc4py/SLEPc/EPS.pyx:532

    Return type:

      None

  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) – Whether to B-orthogonalize the search subspace.

    Return type:

      None

    See also

    `getGDBOrth`, `EPSGDSetBOrth`

    Source code at slepc4py/SLEPc/EPS.pyx:3313

  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) – The number of vectors added to the search space in every iteration.

    Return type:

      None

    See also

    `getGDBlockSize`, `EPSGDSetBlockSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3172

  setGDDoubleExpansion(doubleexp)

    Set that the search subspace is expanded with double expansion.

    Logically collective.

    Parameters:

      doubleexp (bool) – `True` if using double expansion.

    Return type:

      None

    Notes

    In the double expansion variant 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.

    See also

    `getGDDoubleExpansion`, `EPSGDSetDoubleExpansion`

    Source code at slepc4py/SLEPc/EPS.pyx:3356

  setGDInitialSize(initialsize)

    Set the initial size of the searching space.

    Logically collective.

    Parameters:

      initialsize (int) – The number of vectors of the initial searching subspace.

    Return type:

      None

    Notes

    If the flag in `setGDKrylovStart()` is set to `False` and the user provides vectors with `setInitialSpace()`, up to `initialsize` vectors will be used; and if the provided vectors are not enough, the solver completes the subspace with random vectors. In case the `setGDKrylovStart()` flag is `True`, the solver gets the first vector provided by the user or, if not available, a random vector, and expands the Krylov basis up to `initialsize` vectors.

    See also

    `setGDKrylovStart`, `getGDInitialSize`, `EPSGDSetInitialSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3266

  setGDKrylovStart(krylovstart=True)

    Set (toggle) starting the search subspace with a Krylov basis.

    Logically collective.

    Parameters:

      krylovstart (bool) – `True` if starting the search subspace with a Krylov basis.

    Return type:

      None

    See also

    `setGDInitialSize`, `getGDKrylovStart`, `EPSGDSetKrylovStart`

    Source code at slepc4py/SLEPc/EPS.pyx:3135

  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.

    Parameters:

      - minv (int) – The number of vectors of the search subspace after restart.

      - plusk (int) – The number of vectors saved from the previous iteration.

    Return type:

      None

    See also

    `getGDRestart`, `EPSGDSetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:3215

  setInitialSpace(space)

    Set the initial space from which the eigensolver starts to iterate.

    Collective.

    Parameters:

      space (Vec | list[Vec]) – Set of basis vectors of the initial space.

    Return type:

      None

    Notes

    Some solvers start to iterate on a single vector (initial vector). In that case, only the first vector is taken into account and the other vectors are ignored. But other solvers such as `SUBSPACE` are able to make use of the whole initial subspace as an initial guess.

    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.

    See also

    `setDeflationSpace`, `setLeftInitialSpace`, `EPSSetInitialSpace`

    Source code at slepc4py/SLEPc/EPS.pyx:1614

  setInterval(inta, intb)

    Set the computational interval for spectrum slicing.

    Logically collective.

    Parameters:

      - inta (float) – The left end of the interval.

      - intb (float) – The right end of the interval.

    Return type:

      None

    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`, see `setWhichEigenpairs()`.

    A computational interval is also needed when using polynomial filters, see `STFILTER`.

    See also

    `getInterval`, `setWhichEigenpairs`, `EPSSetInterval`, `STFILTER`

    Source code at slepc4py/SLEPc/EPS.pyx:998

  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) – Whether to B-orthogonalize the search subspace.

    Return type:

      None

    See also

    `getJDBOrth`, `EPSJDSetBOrth`

    Source code at slepc4py/SLEPc/EPS.pyx:3672

  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) – The number of vectors added to the search space in every iteration.

    Return type:

      None

    See also

    `getJDBlockSize`, `EPSJDSetBlockSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3443

  setJDConstCorrectionTol(constant)

    Deactivate the dynamic stopping criterion.

    Logically collective.

    Parameters:

      constant (bool) – If `False`, the `petsc4py.PETSc.KSP` relative tolerance is set to `0.5**i`.

    Return type:

      None

    Notes

    If this flag is set to `False`, then the `petsc4py.PETSc.KSP` relative tolerance is dynamically set to `0.5**i`, where `i` is the number of `EPS` iterations since the last converged value. By the default, a constant tolerance is used.

    See also

    `getJDConstCorrectionTol`, `EPSJDSetConstCorrectionTol`

    Source code at slepc4py/SLEPc/EPS.pyx:3627

  setJDFix(fix)

    Set the threshold for changing the target in the correction equation.

    Logically collective.

    Parameters:

      fix (float) – The threshold for changing the target.

    Return type:

      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.

    See also

    `getJDFix`, `EPSJDSetFix`

    Source code at slepc4py/SLEPc/EPS.pyx:3584

  setJDInitialSize(initialsize)

    Set the initial size of the searching space.

    Logically collective.

    Parameters:

      initialsize (int) – The number of vectors of the initial searching subspace.

    Return type:

      None

    Notes

    If the flag in `setJDKrylovStart()` is set to `False` and the user provides vectors with `setInitialSpace()`, up to `initialsize` vectors will be used; and if the provided vectors are not enough, the solver completes the subspace with random vectors. In case the `setJDKrylovStart()` flag is `True`, the solver gets the first vector provided by the user or, if not available, a random vector, and expands the Krylov basis up to `initialsize` vectors.

    See also

    `setJDKrylovStart`, `getJDInitialSize`, `EPSJDSetInitialSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3537

  setJDKrylovStart(krylovstart=True)

    Set (toggle) starting the search subspace with a Krylov basis.

    Logically collective.

    Parameters:

      krylovstart (bool) – `True` if starting the search subspace with a Krylov basis.

    Return type:

      None

    See also

    `setJDInitialSize`, `getJDKrylovStart`, `EPSJDSetKrylovStart`

    Source code at slepc4py/SLEPc/EPS.pyx:3406

  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.

    Parameters:

      - minv (int | None) – The number of vectors of the search subspace after restart.

      - plusk (int | None) – The number of vectors saved from the previous iteration.

    Return type:

      None

    See also

    `getJDRestart`, `EPSJDSetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:3486

  setKrylovSchurBSEType(bse)

    Set the Krylov-Schur variant used for BSE structured eigenproblems.

    Logically collective.

    Parameters:

      bse (KrylovSchurBSEType) – The BSE method.

    Return type:

      None

    Notes

    This call is only relevant if the type was set to `EPS.Type.KRYLOVSCHUR` with `setType()` and the problem type to `EPS.ProblemType.BSE` with `setProblemType()`.

    See also

    `createMatBSE`, `getKrylovSchurBSEType`, `EPSKrylovSchurSetBSEType`

    Source code at slepc4py/SLEPc/EPS.pyx:2475

  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) – `True` if zeros must checked for.

    Return type:

      None

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    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.

    See also

    `setInterval`, `getKrylovSchurDetectZeros`, `EPSKrylovSchurSetDetectZeros`

    Source code at slepc4py/SLEPc/EPS.pyx:2659

  setKrylovSchurDimensions(nev=None, ncv=None, mpd=None)

    Set the dimensions used for each subsolve step (spectrum slicing).

    Logically collective.

    Parameters:

      - nev (int | None) – Number of eigenvalues to compute.

      - ncv (int | None) – Maximum dimension of the subspace to be used by the solver.

      - mpd (int | None) – Maximum dimension allowed for the projected problem.

    Return type:

      None

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    The meaning of the parameters is the same as in `setDimensions()`, but the ones here apply to every subsolve done by the child `EPS` object.

    See also

    `setInterval`, `getKrylovSchurDimensions`, `EPSKrylovSchurSetDimensions`

    Source code at slepc4py/SLEPc/EPS.pyx:2712

  setKrylovSchurLocking(lock)

    Set (toggle) locking/non-locking variants of the Krylov-Schur method.

    Logically collective.

    Parameters:

      lock (bool) – `True` if the locking variant must be selected.

    Return type:

      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).

    See also

    `getKrylovSchurLocking`, `EPSKrylovSchurSetLocking`

    Source code at slepc4py/SLEPc/EPS.pyx:2561

  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) – The number of partitions.

    Return type:

      None

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    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.

    The interval is split proportionally unless the separation points are specified with `setKrylovSchurSubintervals()`.

    See also

    `setInterval`, `getKrylovSchurPartitions`, `EPSKrylovSchurSetPartitions`

    Source code at slepc4py/SLEPc/EPS.pyx:2605

  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) – The number of vectors to be kept at restart.

    Return type:

      None

    Notes

    Allowed values are in the range [0.1,0.9]. The default is 0.5.

    See also

    `getKrylovSchurRestart`, `EPSKrylovSchurSetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:2518

  setKrylovSchurSubintervals(subint)

    Set the subinterval boundaries.

    Logically collective.

    Set the subinterval boundaries for spectrum slicing with a computational interval with several partitions.

    Parameters:

      subint (Sequence[float]) – Real values specifying subintervals.

    Return type:

      None

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set.

    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 `setInterval()`. The subintervals are then defined by two consecutive points: `[subint_0,subint_1]`, `[subint_1,subint_2]`, and so on.

    See also

    `setInterval`, `setKrylovSchurPartitions`, `EPSKrylovSchurSetSubintervals`

    Source code at slepc4py/SLEPc/EPS.pyx:2968

  setLOBPCGBlockSize(bs)

    Set the block size of the LOBPCG method.

    Logically collective.

    Parameters:

      bs (int) – The block size.

    Return type:

      None

    See also

    `getLOBPCGBlockSize`, `EPSLOBPCGSetBlockSize`

    Source code at slepc4py/SLEPc/EPS.pyx:3759

  setLOBPCGLocking(lock)

    Toggle between locking and non-locking (LOBPCG method).

    Logically collective.

    Parameters:

      lock (bool) – `True` if the locking variant must be selected.

    Return type:

      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).

    See also

    `getLOBPCGLocking`, `EPSLOBPCGSetLocking`

    Source code at slepc4py/SLEPc/EPS.pyx:3840

  setLOBPCGRestart(restart)

    Set the restart parameter for the LOBPCG method.

    Logically collective.

    Parameters:

      restart (float) – The percentage of the block of vectors to force a restart.

    Return type:

      None

    Notes

    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. Allowed values are in the range [0.1,1.0]. The default is 0.9.

    See also

    `getLOBPCGRestart`, `EPSLOBPCGSetRestart`

    Source code at slepc4py/SLEPc/EPS.pyx:3796

  setLanczosReorthogType(reorthog)

    Set the type of reorthogonalization used during the Lanczos iteration.

    Logically collective.

    Parameters:

      reorthog (LanczosReorthogType) – The type of reorthogonalization.

    Return type:

      None

    Notes

    This call is only relevant if the type was set to `EPS.Type.LANCZOS` with `setType()`.

    See also

    `getLanczosReorthogType`, `EPSLanczosSetReorthog`

    Source code at slepc4py/SLEPc/EPS.pyx:2430

  setLeftInitialSpace(space)

    Set a left initial space from which the eigensolver starts to iterate.

    Collective.

    Parameters:

      space (Vec | list[Vec]) – Set of basis vectors of the left initial space.

    Return type:

      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.

    See also

    `setInitialSpace`, `setTwoSided`, `EPSSetLeftInitialSpace`

    Source code at slepc4py/SLEPc/EPS.pyx:1652

  setLyapIIRanks(rkc=None, rkl=None)

    Set the ranks used in the solution of the Lyapunov equation.

    Logically collective.

    Parameters:

      - rkc (int | None) – The compressed rank.

      - rkl (int | None) – The Lyapunov rank.

    Return type:

      None

    Notes

    Lyapunov inverse iteration needs to solve a large-scale Lyapunov equation at each iteration of the eigensolver. For this, an iterative solver (`LME`) is used, which requires to prescribe the rank of the solution matrix \(X\). This is the meaning of parameter `rkl`. Later, this matrix is compressed into another matrix of rank `rkc`. If not provided, `rkl` is a small multiple of `rkc`.

    See also

    `getLyapIIRanks`, `EPSLyapIISetRanks`

    Source code at slepc4py/SLEPc/EPS.pyx:3883

  setMonitor(monitor, args=None, kargs=None)

    Append a monitor function to the list of monitors.

    Logically collective.

    See also

    `getMonitor`, `cancelMonitor`, `EPSMonitorSet`

    Source code at slepc4py/SLEPc/EPS.pyx:1818

    Parameters:

      - monitor (EPSMonitorFunction | None)

      - args (tuple[Any, ...] | None)

      - kargs (dict[str, Any] | None)

    Return type:

      None

  setOperators(A, B=None)

    Set the matrices associated with the eigenvalue problem.

    Collective.

    Parameters:

      - A (Mat) – The matrix associated with the eigensystem.

      - B (Mat | None) – The second matrix in the case of generalized eigenproblems; if not provided, a standard eigenproblem is assumed.

    Return type:

      None

    Notes

    It must be called before `setUp()`. If it is called again after `setUp()` and the matrix sizes have changed then the `EPS` object is reset.

    For structured eigenproblem types such as `BSE`, see `setProblemType()`, the provided matrices must have been created with the corresponding helper function, i.e., `createMatBSE()`.

    See also

    `getOperators`, `solve`, `setUp`, `reset`, `setProblemType`, `EPSSetOperators`

    Source code at slepc4py/SLEPc/EPS.pyx:1545

  setOptionsPrefix(prefix=None)

    Set the prefix used for searching for all EPS options in the database.

    Logically collective.

    Parameters:

      prefix (str | None) – The prefix string to prepend to all EPS option requests.

    Return type:

      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_")

    See also

    `appendOptionsPrefix`, `getOptionsPrefix`, `EPSGetOptionsPrefix`

    Source code at slepc4py/SLEPc/EPS.pyx:482

  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) – The type of shift.

    Return type:

      None

    Notes

    This call is only relevant if the type was set to `EPS.Type.POWER` with `setType()`.

    By default, shifts are constant (`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` or `EPS.PowerShiftType.WILKINSON`). In this case, the iteration behaves rather like a cubic converging method as RQI.

    See also

    `getPowerShiftType`, `EPSPowerSetShiftType`

    Source code at slepc4py/SLEPc/EPS.pyx:2328

  setProblemType(problem_type)

    Set the type of the eigenvalue problem.

    Logically collective.

    Parameters:

      problem_type (ProblemType) – The problem type to be set.

    Return type:

      None

    Notes

    This function must be used to instruct SLEPc to exploit symmetry or other kind of structure. 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^*\)) or generalized Hermitian (i.e., \(A=A^*\), \(B=B^*\), and \(B\) positive definite) then it is recommended to set the problem type so that eigensolver can exploit these properties.

    If the user does not call this function, the solver will use a reasonable guess.

    For structured problem types such as `BSE`, the matrices passed in via `setOperators()` must have been created with the corresponding helper function, i.e., `createMatBSE()`.

    See also

    `setOperators`, `createMatBSE`, `getProblemType`, `EPSSetProblemType`

    Source code at slepc4py/SLEPc/EPS.pyx:572

  setPurify(purify=True)

    Set (toggle) eigenvector purification.

    Logically collective.

    Parameters:

      purify (bool) – `True` to activate purification (default).

    Return type:

      None

    Notes

    By default, eigenvectors of generalized symmetric eigenproblems are purified in order to purge directions in the nullspace of matrix \(B\). If the user knows that \(B\) is non-singular, then purification can be safely deactivated and some computational cost is avoided (this is particularly important in interval computations).

    See also

    `getPurify`, `setInterval`, `EPSSetPurify`

    Source code at slepc4py/SLEPc/EPS.pyx:1151

  setRG(rg)

    Set a region object associated to the eigensolver.

    Collective.

    Parameters:

      rg (RG) – The region context.

    Return type:

      None

    See also

    `getRG`, `EPSSetRG`

    Source code at slepc4py/SLEPc/EPS.pyx:1501

  setRQCGReset(nrest)

    Set the reset parameter of the RQCG iteration.

    Logically collective.

    Parameters:

      nrest (int) – The number of iterations between resets.

    Return type:

      None

    Notes

    Every `nrest` iterations the solver performs a Rayleigh-Ritz projection step.

    See also

    `getRQCGReset`, `EPSRQCGSetReset`

    Source code at slepc4py/SLEPc/EPS.pyx:3717

  setST(st)

    Set a spectral transformation object associated to the eigensolver.

    Collective.

    Parameters:

      st (ST) – The spectral transformation.

    Return type:

      None

    See also

    `getST`, `EPSSetST`

    Source code at slepc4py/SLEPc/EPS.pyx:1390

  setStoppingTest(stopping, args=None, kargs=None)

    Set a function to decide when to stop the outer iteration of the eigensolver.

    Logically collective.

    See also

    `getStoppingTest`, `EPSSetStoppingTestFunction`

    Source code at slepc4py/SLEPc/EPS.pyx:1684

    Parameters:

      - stopping (EPSStoppingFunction | None)

      - args (tuple[Any, ...] | None)

      - kargs (dict[str, Any] | None)

    Return type:

      None

  setTarget(target)

    Set the value of the target.

    Logically collective.

    Parameters:

      target (Scalar) – The value of the target.

    Return type:

      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()`.

    When PETSc is built with real scalars, it is not possible to specify a complex target.

    See also

    `getTarget`, `EPSSetTarget`

    Source code at slepc4py/SLEPc/EPS.pyx:945

  setThreshold(thres, rel=False)

    Set the threshold used in the threshold stopping test.

    Logically collective.

    Parameters:

      - thres (float) – The threshold.

      - rel (bool) – Whether the threshold is relative or not.

    Return type:

      None

    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). The details are given in `EPSSetThreshold`.

    See also

    `setStoppingTest`, `getThreshold`, `EPSSetThreshold`

    Source code at slepc4py/SLEPc/EPS.pyx:893

  setTolerances(tol=None, max_it=None)

    Set the tolerance and max. iter. used by the default EPS convergence tests.

    Logically collective.

    Parameters:

      - tol (float | None) – The convergence tolerance.

      - max_it (int | None) – The maximum number of iterations.

    Return type:

      None

    Notes

    Use `DETERMINE` for `max_it` to assign a reasonably good value, which is dependent on the solution method.

    See also

    `getTolerances`, `EPSSetTolerances`

    Source code at slepc4py/SLEPc/EPS.pyx:1057

  setTrackAll(trackall)

    Set if the solver must compute the residual of all approximate eigenpairs.

    Logically collective.

    Parameters:

      trackall (bool) – Whether to compute all residuals or not.

    Return type:

      None

    See also

    `getTrackAll`, `EPSSetTrackAll`

    Source code at slepc4py/SLEPc/EPS.pyx:1272

  setTrueResidual(trueres)

    Set if the solver must compute the true residual explicitly or not.

    Logically collective.

    Parameters:

      trueres (bool) – Whether the solver computes true residuals or not.

    Return type:

      None

    See also

    `getTrueResidual`, `EPSSetTrueResidual`

    Source code at slepc4py/SLEPc/EPS.pyx:1235

  setTwoSided(twosided)

    Set to use a two-sided variant that also computes left eigenvectors.

    Logically collective.

    Parameters:

      twosided (bool) – Whether the two-sided variant is to be used or not.

    Return type:

      None

    Notes

    If the user sets `twosided` to `True` then the solver uses a variant of the algorithm that computes both right and left eigenvectors. This is usually much more costly. This option is not available in all solvers.

    When using two-sided solvers, the problem matrices must have both the `Mat.mult` and `Mat.multTranspose` operations defined.

    See also

    `getTwoSided`, `getLeftEigenvector`, `EPSSetTwoSided`

    Source code at slepc4py/SLEPc/EPS.pyx:1104

  setType(eps_type)

    Set the particular solver to be used in the EPS object.

    Logically collective.

    Parameters:

      eps_type (Type | str) – The solver to be used.

    Return type:

      None

    Notes

    The default is `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.

    See also

    `getType`, `EPSSetType`

    Source code at slepc4py/SLEPc/EPS.pyx:417

  setUp()

    Set up all the internal data structures.

    Collective.

    Notes

    Sets up all the internal data structures necessary for the execution of the eigensolver. This includes the setup of the internal `ST` object.

    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.

    See also

    `solve`, `setInitialSpace`, `setDeflationSpace`, `EPSSetUp`

    Source code at slepc4py/SLEPc/EPS.pyx:1875

    Return type:

      None

  setWhichEigenpairs(which)

    Set which portion of the spectrum is to be sought.

    Logically collective.

    Parameters:

      which (Which) – The portion of the spectrum to be sought by the solver.

    Return type:

      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` and `EPS.Which.SMALLEST_IMAGINARY` use the absolute value of the imaginary part for eigenvalue selection.

    The target is a scalar value provided with `setTarget()`.

    The criterion `EPS.Which.TARGET_IMAGINARY` is available only in case PETSc and SLEPc have been built with complex scalars.

    `EPS.Which.ALL` is intended for use in combination with an interval (see `setInterval()`), when all eigenvalues within the interval are requested, or in the context of the `EPS.Type.CISS` solver for computing all eigenvalues in a region.

    See also

    `setTarget`, `setInterval`, `getWhichEigenpairs`, `EPSSetWhichEigenpairs`

    Source code at slepc4py/SLEPc/EPS.pyx:834

  solve()

    Solve the eigensystem.

    Collective.

    Notes

    The problem matrices are specified with `setOperators()`.

    `solve()` will return without generating an error regardless of whether all requested solutions were computed or not. Call `getConverged()` to get the actual number of computed solutions, and `getConvergedReason()` to determine if the solver converged or failed and why.

    See also

    `setUp`, `setOperators`, `getConverged`, `getConvergedReason`, `EPSSolve`

    Source code at slepc4py/SLEPc/EPS.pyx:1897

    Return type:

      None

  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.

    Parameters:

      - s (Scalar) – Scalar that multiplies the existing A matrix.

      - a (Scalar) – Scalar used in the axpy operation on A.

      - Au (petsc4py.PETSc.Mat | None) – The matrix used in the axpy operation on A.

      - t (Scalar) – Scalar that multiplies the existing B matrix.

      - b (Scalar) – Scalar used in the axpy operation on B.

      - Bu (petsc4py.PETSc.Mat | None) – The matrix used in the axpy operation on B.

      - structure (petsc4py.PETSc.Mat.Structure | None) – Either same, different, or a subset of the non-zero sparsity pattern.

      - globalup (bool) – Whether global matrices must be updated or not.

    Return type:

      None

    Notes

    This call makes sense only for spectrum slicing runs, that is, when an interval has been given with `setInterval()` and `SINVERT` is set. And is relevant only when the number of partitions (`setKrylovSchurPartitions()`) is larger than one.

    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` operations to perform the updates.

    If `globalup` is `True`, communication is carried out to reconstruct the updated matrices in the parent communicator.

    See also

    `setInterval`, `setKrylovSchurPartitions`, `EPSKrylovSchurUpdateSubcommMats`

    Source code at slepc4py/SLEPc/EPS.pyx:2897

  valuesView(viewer=None)

    Display the computed eigenvalues in a viewer.

    Collective.

    Parameters:

      viewer (Viewer | None) – Visualization context; if not provided, the standard output is used.

    Return type:

      None

    See also

    `solve`, `vectorsView`, `errorView`, `EPSValuesView`

    Source code at slepc4py/SLEPc/EPS.pyx:2288

  vectorsView(viewer=None)

    Output computed eigenvectors to a viewer.

    Collective.

    Parameters:

      viewer (Viewer | None) – Visualization context; if not provided, the standard output is used.

    Return type:

      None

    See also

    `solve`, `valuesView`, `errorView`, `EPSVectorsView`

    Source code at slepc4py/SLEPc/EPS.pyx:2307

  view(viewer=None)

    Print the EPS data structure.

    Collective.

    Parameters:

      viewer (Viewer | None) – Visualization context; if not provided, the standard output is used.

    Return type:

      None

    See also

    `EPSView`

    Source code at slepc4py/SLEPc/EPS.pyx:351

  Attributes Documentation

  bv

    The basis vectors (`BV`) object associated.

    Source code at slepc4py/SLEPc/EPS.pyx:4343

  ds

    The direct solver (`DS`) object associated.

    Source code at slepc4py/SLEPc/EPS.pyx:4357

  extraction

    The type of extraction technique to be employed.

    Source code at slepc4py/SLEPc/EPS.pyx:4273

  max_it

    The maximum iteration count.

    Source code at slepc4py/SLEPc/EPS.pyx:4301

  problem_type

    The type of the eigenvalue problem.

    Source code at slepc4py/SLEPc/EPS.pyx:4266

  purify

    Eigenvector purification.

    Source code at slepc4py/SLEPc/EPS.pyx:4322

  rg

    The region (`RG`) object associated.

    Source code at slepc4py/SLEPc/EPS.pyx:4350

  st

    The spectral transformation (`ST`) object associated.

    Source code at slepc4py/SLEPc/EPS.pyx:4336

  target

    The value of the target.

    Source code at slepc4py/SLEPc/EPS.pyx:4287

  tol

    The tolerance.

    Source code at slepc4py/SLEPc/EPS.pyx:4294

  track_all

    Compute the residual norm of all approximate eigenpairs.

    Source code at slepc4py/SLEPc/EPS.pyx:4329

  true_residual

    Compute the true residual explicitly.

    Source code at slepc4py/SLEPc/EPS.pyx:4315

  two_sided

    Two-sided that also computes left eigenvectors.

    Source code at slepc4py/SLEPc/EPS.pyx:4308

  which

    The portion of the spectrum to be sought.

    Source code at slepc4py/SLEPc/EPS.pyx:4280