slepc4py.SLEPc.NEP

Package slepc4py :: Module SLEPc :: Class NEP |
[hide private]
[frames] | no frames]

# Class NEP

NEP

Nested Classes | [hide private]
| CISSExtraction NEP CISS extraction technique
| Conv NEP convergence test
| ConvergedReason NEP convergence reasons
| ErrorType NEP error type to assess accuracy of computed solutions
| ProblemType NEP problem type
| Refine NEP refinement strategy
| RefineScheme NEP scheme for solving linear systems during iterative refinement
| Stop NEP stopping test
| Type NEP type
| Which NEP desired part of spectrum

Instance Methods | [hide private]
a new object with type S, a subtype of T |
__new__(S, ...) |
appendOptionsPrefix(self, prefix) Appends to the prefix used for searching for all NEP options in the database. |
applyResolvent(self, omega, Vec v, Vec r, RG rg=None) Applies the resolvent T^{-1}(z) to a given vector. |
cancelMonitor(self) Clears all monitors for a NEP object. |
computeError(self, int i, etype=None) Computes the error (based on the residual norm) associated with the i-th computed eigenpair. |
create(self, comm=None) Creates the NEP object. |
destroy(self) Destroys the NEP object. |
errorView(self, etype=None, Viewer viewer=None) Displays the errors associated with the computed solution (as well as the eigenvalues). |
getBV(self) Obtain the basis vectors object associated to the eigensolver. |
getCISSExtraction(self) Gets the extraction technique used in the CISS solver. |
getCISSKSPs(self) Retrieve the array of linear solver objects associated with the CISS solver. |
getCISSRefinement(self) Gets the values of various refinement parameters in the CISS solver. |
getCISSSizes(self) Gets the values of various size parameters in the CISS solver. |
getCISSThreshold(self) Gets the values of various threshold parameters in the CISS solver. |
getConverged(self) Gets the number of converged eigenpairs. |
getConvergedReason(self) Gets the reason why the solve() iteration was stopped. |
getConvergenceTest(self) Return the method used to compute the error estimate used in the convergence test. |
getDS(self) Obtain the direct solver associated to the eigensolver. |
getDimensions(self) Gets the number of eigenvalues to compute and the dimension of the subspace. |
getEigenpair(self, int i, Vec Vr=None, Vec Vi=None) Gets the i-th solution of the eigenproblem as computed by solve(). |
getErrorEstimate(self, int i) Returns the error estimate associated to the i-th computed eigenpair. |
getFunction(self) Returns the function to compute the nonlinear Function T(lambda) and the matrix. |
getInterpolInterpolation(self) Gets the tolerance and maximum degree when building the interpolation polynomial. |
getInterpolPEP(self) Retrieve the polynomial eigensolver object associated with the nonlinear eigensolver. |
getIterationNumber(self) Gets the current iteration number. |
getJacobian(self) Returns the function to compute the Jacobian T'(lambda) and the matrix. |
getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None) Gets the i-th left eigenvector as computed by solve(). |
getMonitor(self) Gets the list of monitor functions. |
getNArnoldiKSP(self) Retrieve the linear solver object associated with the nonlinear eigensolver. |
getNArnoldiLagPreconditioner(self) Indicates how often the preconditioner is rebuilt. |
getNLEIGSEPS(self) Retrieve the linear eigensolver object associated with the nonlinear eigensolver. |
getNLEIGSFullBasis(self) Gets the flag that indicates if NLEIGS is using the full-basis variant. |
getNLEIGSInterpolation(self) Gets the tolerance and maximum degree when building the interpolation via divided differences. |
getNLEIGSKSPs(self) Retrieve the array of linear solver objects associated with the NLEIGS solver. |
getNLEIGSLocking(self) Gets the locking flag used in the NLEIGS method. |
getNLEIGSRKShifts(self) Gets the list of shifts used in the Rational Krylov method. |
getNLEIGSRestart(self) Gets the restart parameter used in the NLEIGS method. |
getOptionsPrefix(self) Gets the prefix used for searching for all NEP options in the database. |
getProblemType(self) Gets the problem type from the NEP object. |
getRG(self) Obtain the region object associated to the eigensolver. |
getRIIConstCorrectionTol(self) Returns the constant tolerance flag. |
getRIIDeflationThreshold(self) Returns the threshold value that controls deflation. |
getRIIHermitian(self) Returns the flag about using the Hermitian version of the scalar nonlinear equation. |
getRIIKSP(self) Retrieve the linear solver object associated with the nonlinear eigensolver. |
getRIILagPreconditioner(self) Indicates how often the preconditioner is rebuilt. |
getRIIMaximumIterations(self) Gets the maximum number of inner iterations of RII. |
getRefine(self) Gets the refinement strategy used by the NEP object, and the associated parameters. |
getRefineKSP(self) Obtain the `KSP` object used by the eigensolver in the refinement phase. |
getSLPDeflationThreshold(self) Returns the threshold value that controls deflation. |
getSLPEPS(self) Retrieve the linear eigensolver object associated with the nonlinear eigensolver. |
getSLPEPSLeft(self) Retrieve the left eigensolver. |
getSLPKSP(self) Retrieve the linear solver object associated with the nonlinear eigensolver. |
getSplitOperator(self) Returns the operator of the nonlinear eigenvalue problem in split form. |
getSplitPreconditioner(self) Returns the operator of the split preconditioner. |
getStoppingTest(self) Gets the stopping function. |
getTarget(self) Gets the value of the target. |
getTolerances(self) Gets the tolerance and maximum iteration count used by the default NEP convergence tests. |
getTrackAll(self) Returns the flag indicating whether all residual norms must be computed or not. |
getTwoSided(self) Returns the flag indicating whether a two-sided variant of the algorithm is being used or not. |
getType(self) Gets the NEP type of this object. |
getWhichEigenpairs(self) Returns which portion of the spectrum is to be sought. |
reset(self) Resets the NEP object. |
setBV(self, BV bv) Associates a basis vectors object to the eigensolver. |
setCISSExtraction(self, extraction) Sets the extraction technique used in the CISS solver. |
setCISSRefinement(self, inner=None, blsize=None) Sets the values of various refinement parameters in the CISS solver. |
setCISSSizes(self, ip=None, bs=None, ms=None, npart=None, bsmax=None, realmats=False) Sets the values of various size parameters in the CISS solver. |
setCISSThreshold(self, delta=None, spur=None) Sets the values of various threshold parameters in the CISS solver. |
setConvergenceTest(self, conv) Specifies how to compute the error estimate used in the convergence test. |
setDS(self, DS ds) Associates a direct solver object to the eigensolver. |
setDimensions(self, nev=None, ncv=None, mpd=None) Sets the number of eigenvalues to compute and the dimension of the subspace. |
setFromOptions(self) Sets NEP options from the options database. |
setFunction(self, function, Mat F=None, Mat P=None, args=None, kargs=None) Sets the function to compute the nonlinear Function T(lambda) as well as the location to store the matrix. |
setInitialSpace(self, space) Sets the initial space from which the eigensolver starts to iterate. |
setInterpolInterpolation(self, tol=None, deg=None) Sets the tolerance and maximum degree when building the interpolation polynomial. |
setInterpolPEP(self, PEP pep) Associate a polynomial eigensolver object to the nonlinear eigensolver. |
setJacobian(self, jacobian, Mat J=None, args=None, kargs=None) Sets the function to compute the Jacobian T'(lambda) as well as the location to store the matrix. |
setMonitor(self, monitor, args=None, kargs=None) Appends a monitor function to the list of monitors. |
setNArnoldiKSP(self, KSP ksp) Associate a linear solver object to the nonlinear eigensolver. |
setNArnoldiLagPreconditioner(self, lag) Determines when the preconditioner is rebuilt in the nonlinear solve. |
setNLEIGSEPS(self, EPS eps) Associate a linear eigensolver object to the nonlinear eigensolver. |
setNLEIGSFullBasis(self, fullbasis=True) Choose between TOAR-basis (default) and full-basis variants of the NLEIGS method. |
setNLEIGSInterpolation(self, tol=None, deg=None) Sets the tolerance and maximum degree when building the interpolation via divided differences. |
setNLEIGSLocking(self, lock) Choose between locking and non-locking variants of the NLEIGS method. |
setNLEIGSRKShifts(self, shifts) Sets a list of shifts to be used in the Rational Krylov method. |
setNLEIGSRestart(self, keep) Sets the restart parameter for the NLEIGS method, in particular the proportion of basis vectors that must be kept after restart. |
setOptionsPrefix(self, prefix) Sets the prefix used for searching for all NEP options in the database. |
setProblemType(self, problem_type) Specifies the type of the eigenvalue problem. |
setRG(self, RG rg) Associates a region object to the eigensolver. |
setRIIConstCorrectionTol(self, cct) Sets a flag to keep the tolerance used in the linear solver constant. |
setRIIDeflationThreshold(self, deftol) Sets the threshold value used to switch between deflated and non-deflated iteration. |
setRIIHermitian(self, herm) Sets a flag to indicate if the Hermitian version of the scalar nonlinear equation must be used by the solver. |
setRIIKSP(self, KSP ksp) Associate a linear solver object to the nonlinear eigensolver. |
setRIILagPreconditioner(self, lag) Determines when the preconditioner is rebuilt in the nonlinear solve. |
setRIIMaximumIterations(self, its) Sets the maximum number of inner iterations to be used in the RII solver. |
setRefine(self, ref, npart=None, tol=None, its=None, scheme=None) Sets the refinement strategy used by the NEP object, and the associated parameters. |
setSLPDeflationThreshold(self, deftol) Sets the threshold value used to switch between deflated and non-deflated iteration. |
setSLPEPS(self, EPS eps) Associate a linear eigensolver object to the nonlinear eigensolver. |
setSLPEPSLeft(self, EPS eps) Associate a linear eigensolver object to the nonlinear eigensolver, used to compute left eigenvectors in the two-sided variant of SLP. |
setSLPKSP(self, KSP ksp) Associate a linear solver object to the nonlinear eigensolver. |
setSplitOperator(self, A, f, structure=None) Sets the operator of the nonlinear eigenvalue problem in split form. |
setSplitPreconditioner(self, P, structure=None) Sets the operator in split form from which to build the preconditioner to be used when solving the nonlinear eigenvalue problem in split form. |
setStoppingTest(self, stopping, args=None, kargs=None) Sets a function to decide when to stop the outer iteration of the eigensolver. |
setTarget(self, target) Sets the value of the target. |
setTolerances(self, tol=None, maxit=None) Sets the tolerance and maximum iteration count used in convergence tests. |
setTrackAll(self, trackall) Specifies if the solver must compute the residual of all approximate eigenpairs or not. |
setTwoSided(self, twosided) Sets the solver to use a two-sided variant so that left eigenvectors are also computed. |
setType(self, nep_type) Selects the particular solver to be used in the NEP object. |
setUp(self) Sets up all the internal data structures necessary for the execution of the eigensolver. |
setWhichEigenpairs(self, which) Specifies which portion of the spectrum is to be sought. |
solve(self) Solves the eigensystem. |
valuesView(self, Viewer viewer=None) Displays the computed eigenvalues in a viewer. |
vectorsView(self, Viewer viewer=None) Outputs computed eigenvectors to a viewer. |
view(self, Viewer viewer=None) Prints the NEP data structure. |
Inherited from `petsc4py.PETSc.Object`: `__copy__`, `__deepcopy__`, `__eq__`, `__ge__`, `__gt__`, `__le__`, `__lt__`, `__ne__`, `__nonzero__`, `compose`, `decRef`, `getAttr`, `getClassId`, `getClassName`, `getComm`, `getDict`, `getName`, `getRefCount`, `getTabLevel`, `incRef`, `incrementTabLevel`, `query`, `setAttr`, `setName`, `setTabLevel`, `stateGet`, `stateIncrease`, `stateSet`, `viewFromOptions` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
| bv
| ds
| max_it
| problem_type
| rg
| target
| tol
| track_all
| which
Inherited from `petsc4py.PETSc.Object`: `classid`, `comm`, `fortran`, `handle`, `klass`, `name`, `prefix`, `refcount`, `type` Inherited from `object`: `__class__`

Method Details | [hide private]

### __new__(S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__

### appendOptionsPrefix(self, prefix) |
Appends to the prefix used for searching for all NEP options in the database. # Parameters prefix: string The prefix string to prepend to all NEP option requests. Overrides: petsc4py.PETSc.Object.appendOptionsPrefix

### applyResolvent(self, omega, Vec v, Vec r, RG rg=None) |
Applies the resolvent T^{-1}(z) to a given vector. # Parameters omega: scalar Value where the resolvent must be evaluated. v: Vec Input vector. r: Vec Placeholder for the result vector. rg: RG object, optional Region.

### computeError(self, int i, etype=None) |
Computes 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: NEP.ErrorType enumerate The error type to compute. # Returns error: real The error bound, computed in various ways from the residual norm `||T(lambda)x||_2` where `lambda` is the eigenvalue and `x` is the eigenvector.

### create(self, comm=None) |
Creates the NEP object. # Parameters comm: Comm, optional. MPI communicator. If not provided, it defaults to all processes.

### destroy(self) |
Destroys the NEP object. Overrides: petsc4py.PETSc.Object.destroy

### errorView(self, etype=None, Viewer viewer=None) |
Displays the errors associated with the computed solution (as well as the eigenvalues). # Parameters etype: NEP.ErrorType enumerate, optional The error type to compute. viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. # Notes By default, this function checks the error of all eigenpairs and prints the eigenvalues if all of them are below the requested tolerance. If the viewer has format `ASCII_INFO_DETAIL` then a table with eigenvalues and corresponding errors is printed.

### getBV(self) |
Obtain the basis vectors object associated to the eigensolver. # Returns bv: BV The basis vectors context.

### getCISSExtraction(self) |
Gets the extraction technique used in the CISS solver. # Returns extraction: NEP.CISSExtraction enumerate The extraction technique.

### getCISSKSPs(self) |
Retrieve the array of linear solver objects associated with the CISS solver. # Returns ksp: list of `KSP` The linear solver objects. # Notes The number of `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.

### getCISSRefinement(self) |
Gets the values of various refinement parameters in the CISS solver. # Returns inner: int Number of iterative refinement iterations (inner loop). blsize: int Number of iterative refinement iterations (blocksize loop).

### getCISSSizes(self) |
Gets the values of various size parameters in the CISS solver. # 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.

### getCISSThreshold(self) |
Gets the values of various threshold parameters in the CISS solver. # Returns delta: float Threshold for numerical rank. spur: float Spurious threshold (to discard spurious eigenpairs.

### getConverged(self) |
Gets the number of converged eigenpairs. # Returns nconv: int Number of converged eigenpairs.

### getConvergedReason(self) |
Gets the reason why the solve() iteration was stopped. # Returns reason: NEP.ConvergedReason enumerate Negative value indicates diverged, positive value converged.

### getConvergenceTest(self) |
Return the method used to compute the error estimate used in the convergence test. # Returns conv: NEP.Conv The method used to compute the error estimate used in the convergence test.

### getDS(self) |
Obtain the direct solver associated to the eigensolver. # Returns ds: DS The direct solver context.

### getDimensions(self) |
Gets the number of eigenvalues to compute and the dimension of the subspace. # 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.

### getEigenpair(self, int i, Vec Vr=None, Vec Vi=None) |
Gets the i-th solution of the eigenproblem as computed by solve(). The solution consists of both the eigenvalue and the eigenvector. # Parameters i: int Index of the solution to be obtained. Vr: Vec, optional Placeholder for the returned eigenvector (real part). Vi: Vec, optional Placeholder for the returned eigenvector (imaginary part). # Returns e: scalar (possibly complex) The computed eigenvalue.

### getErrorEstimate(self, int i) |
Returns the error estimate associated to the i-th computed eigenpair. # Parameters i: int Index of the solution to be considered. # Returns error: real Error estimate.

### getFunction(self) |
Returns the function to compute the nonlinear Function T(lambda) and the matrix. # Parameters F: Mat Function matrix P: Mat preconditioner matrix (usually the same as the F) function: Function evaluation routine

### getInterpolInterpolation(self) |
Gets the tolerance and maximum degree when building the interpolation polynomial. # Returns tol: float The tolerance to stop computing polynomial coefficients. deg: int The maximum degree of interpolation.

### getInterpolPEP(self) |
Retrieve the polynomial eigensolver object associated with the nonlinear eigensolver. # Returns pep: PEP The polynomial eigensolver.

### getIterationNumber(self) |
Gets the current iteration number. If the call to solve() is complete, then it returns the number of iterations carried out by the solution method. # Returns its: int Iteration number.

### getJacobian(self) |
Returns the function to compute the Jacobian T'(lambda) and the matrix. # Parameters J: Mat Jacobian matrix jacobian: Jacobian evaluation routine

### getLeftEigenvector(self, int i, Vec Wr, Vec Wi=None) |
Gets the i-th left eigenvector as computed by solve(). # Parameters i: int Index of the solution to be obtained. Wr: Vec Placeholder for the returned eigenvector (real part). Wi: Vec, optional Placeholder for the returned eigenvector (imaginary part). # Notes The index `i` should be a value between `0` and `nconv-1` (see getConverged()). Eigensolutions are indexed according to the ordering criterion established with setWhichEigenpairs(). Left eigenvectors are available only if the twosided flag was set with setTwoSided().

### getNArnoldiKSP(self) |
Retrieve the linear solver object associated with the nonlinear eigensolver. # Returns ksp: `KSP` The linear solver object.

### getNArnoldiLagPreconditioner(self) |
Indicates how often the preconditioner is rebuilt. # Returns lag: int The lag parameter.

### getNLEIGSEPS(self) |
Retrieve the linear eigensolver object associated with the nonlinear eigensolver. # Returns eps: EPS The linear eigensolver.

### getNLEIGSFullBasis(self) |
Gets the flag that indicates if NLEIGS is using the full-basis variant. # Returns fullbasis: bool True if the full-basis variant must be selected.

### getNLEIGSInterpolation(self) |
Gets the tolerance and maximum degree when building the interpolation via divided differences. # Returns tol: float The tolerance to stop computing divided differences. deg: int The maximum degree of interpolation.

### getNLEIGSKSPs(self) |
Retrieve the array of linear solver objects associated with the NLEIGS solver. # Returns ksp: list of `KSP` The linear solver objects. # Notes The number of `KSP` solvers is equal to the number of shifts provided by the user, or 1 if the user did not provide shifts.

### getNLEIGSLocking(self) |
Gets the locking flag used in the NLEIGS method. # Returns lock: bool The locking flag.

### getNLEIGSRKShifts(self) |
Gets the list of shifts used in the Rational Krylov method. # Returns shifts: array of scalars The shift values.

### getNLEIGSRestart(self) |
Gets the restart parameter used in the NLEIGS method. # Returns keep: float The number of vectors to be kept at restart.

### getOptionsPrefix(self) |
Gets the prefix used for searching for all NEP options in the database. # Returns prefix: string The prefix string set for this NEP object. Overrides: petsc4py.PETSc.Object.getOptionsPrefix

### getProblemType(self) |
Gets the problem type from the NEP object. # Returns problem_type: NEP.ProblemType enumerate The problem type that was previously set.

### getRG(self) |
Obtain the region object associated to the eigensolver. # Returns rg: RG The region context.

### getRIIConstCorrectionTol(self) |
Returns the constant tolerance flag. # Returns cct: bool If True, the `KSP` relative tolerance is constant.

### getRIIDeflationThreshold(self) |
Returns the threshold value that controls deflation. # Returns deftol: float The threshold value.

### getRIIHermitian(self) |
Returns the flag about using the Hermitian version of the scalar nonlinear equation. # Returns herm: bool If True, the Hermitian version is used.

### getRIIKSP(self) |
Retrieve the linear solver object associated with the nonlinear eigensolver. # Returns ksp: `KSP` The linear solver object.

### getRIILagPreconditioner(self) |
Indicates how often the preconditioner is rebuilt. # Returns lag: int The lag parameter.

### getRIIMaximumIterations(self) |
Gets the maximum number of inner iterations of RII. # Returns its: int Maximum inner iterations.

### getRefine(self) |
Gets the refinement strategy used by the NEP object, and the associated parameters. # Returns ref: NEP.Refine The refinement type. npart: int The number of partitions of the communicator. tol: real The convergence tolerance. its: int The maximum number of refinement iterations. scheme: NEP.RefineScheme Scheme for solving linear systems

### getRefineKSP(self) |
Obtain the `KSP` object used by the eigensolver in the refinement phase. # Returns ksp: `KSP` The linear solver object.

### getSLPDeflationThreshold(self) |
Returns the threshold value that controls deflation. # Returns deftol: float The threshold value.

### getSLPEPS(self) |
Retrieve the linear eigensolver object associated with the nonlinear eigensolver. # Returns eps: EPS The linear eigensolver.

### getSLPEPSLeft(self) |
Retrieve the left eigensolver. # Returns eps: EPS The linear eigensolver.

### getSLPKSP(self) |
Retrieve the linear solver object associated with the nonlinear eigensolver. # Returns ksp: `KSP` The linear solver object.

### getSplitOperator(self) |
Returns the operator of the nonlinear eigenvalue problem in split form. # Returns A: sequence of Mat Coefficient matrices of the split form. f: sequence of FN Scalar functions of the split form. structure: `PETSc.Mat.Structure` enumerate Structure flag for matrices.

### getSplitPreconditioner(self) |
Returns the operator of the split preconditioner. # Returns P: sequence of Mat Coefficient matrices of the split preconditioner. structure: `PETSc.Mat.Structure` enumerate Structure flag for matrices.

### getTarget(self) |
Gets the value of the target. # Returns target: float (real or complex) The value of the target. # Notes If the target was not set by the user, then zero is returned.

### getTolerances(self) |
Gets the tolerance and maximum iteration count used by the default NEP convergence tests. # Returns tol: float The convergence tolerance. maxit: int The maximum number of iterations.

### getTrackAll(self) |
Returns the flag indicating whether all residual norms must be computed or not. # Returns trackall: bool Whether the solver compute all residuals or not.

### getTwoSided(self) |
Returns the flag indicating whether a two-sided variant of the algorithm is being used or not. # Returns twosided: bool Whether the two-sided variant is to be used or not.

### getType(self) |
Gets the NEP type of this object. # Returns type: NEP.Type enumerate The solver currently being used. Overrides: petsc4py.PETSc.Object.getType

### getWhichEigenpairs(self) |
Returns which portion of the spectrum is to be sought. # Returns which: NEP.Which enumerate The portion of the spectrum to be sought by the solver.

### setBV(self, BV bv) |
Associates a basis vectors object to the eigensolver. # Parameters bv: BV The basis vectors context.

### setCISSExtraction(self, extraction) |
Sets the extraction technique used in the CISS solver. # Parameters extraction: NEP.CISSExtraction enumerate The extraction technique.

### setCISSRefinement(self, inner=None, blsize=None) |
Sets the values of various refinement parameters in the CISS solver. # Parameters inner: int, optional Number of iterative refinement iterations (inner loop). blsize: int, optional Number of iterative refinement iterations (blocksize loop).

### setCISSSizes(self, ip=None, bs=None, ms=None, npart=None, bsmax=None, realmats=False) |
Sets the values of various size parameters in the CISS solver. # Parameters ip: int, optional Number of integration points. bs: int, optional Block size. ms: int, optional Moment size. npart: int, optional Number of partitions when splitting the communicator. bsmax: int, optional Maximum block size. realmats: bool, optional True if A and B are real. # Notes The default number of partitions is 1. This means the internal `KSP` object is shared among all processes of the NEP communicator. Otherwise, the communicator is split into npart communicators, so that `npart` `KSP` solves proceed simultaneously.

### setCISSThreshold(self, delta=None, spur=None) |
Sets the values of various threshold parameters in the CISS solver. # Parameters delta: float Threshold for numerical rank. spur: float Spurious threshold (to discard spurious eigenpairs).

### setConvergenceTest(self, conv) |
Specifies how to compute the error estimate used in the convergence test. # Parameters conv: NEP.Conv The method used to compute the error estimate used in the convergence test.

### setDS(self, DS ds) |
Associates a direct solver object to the eigensolver. # Parameters ds: DS The direct solver context.

### setDimensions(self, nev=None, ncv=None, mpd=None) |
Sets the number of eigenvalues to compute and the dimension of the subspace. # Parameters nev: int, optional Number of eigenvalues to compute. ncv: int, optional Maximum dimension of the subspace to be used by the solver. mpd: int, optional Maximum dimension allowed for the projected problem.

### setFromOptions(self) |
Sets NEP options from the options database. This routine must be called before setUp() if the user is to be allowed to set the solver type. Overrides: petsc4py.PETSc.Object.setFromOptions

### setFunction(self, function, Mat F=None, Mat P=None, args=None, kargs=None) |
Sets the function to compute the nonlinear Function T(lambda) as well as the location to store the matrix. # Parameters function: Function evaluation routine F: Mat Function matrix P: Mat preconditioner matrix (usually the same as F)

### setInitialSpace(self, space) |
Sets the initial space from which the eigensolver starts to iterate. # Parameters space: Vec or sequence of Vec The initial space

### setInterpolInterpolation(self, tol=None, deg=None) |
Sets the tolerance and maximum degree when building the interpolation polynomial. # Parameters tol: float, optional The tolerance to stop computing polynomial coefficients. deg: int, optional The maximum degree of interpolation.

### setInterpolPEP(self, PEP pep) |
Associate a polynomial eigensolver object to the nonlinear eigensolver. # Parameters pep: PEP The polynomial eigensolver.

### setJacobian(self, jacobian, Mat J=None, args=None, kargs=None) |
Sets the function to compute the Jacobian T'(lambda) as well as the location to store the matrix. # Parameters jacobian: Jacobian evaluation routine J: Mat Jacobian matrix

### setNArnoldiKSP(self, KSP ksp) |
Associate a linear solver object to the nonlinear eigensolver. # Parameters ksp: `KSP` The linear solver object.

### setNArnoldiLagPreconditioner(self, lag) |
Determines when the preconditioner is rebuilt in the nonlinear solve. # Parameters lag: int 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within the nonlinear iteration, 2 means every second time the Jacobian is built, etc. # Notes The default is 1. The preconditioner is ALWAYS built in the first iteration of a nonlinear solve.

### setNLEIGSEPS(self, EPS eps) |
Associate a linear eigensolver object to the nonlinear eigensolver. # Parameters eps: EPS The linear eigensolver.

### setNLEIGSFullBasis(self, fullbasis=True) |
Choose between TOAR-basis (default) and full-basis variants of the NLEIGS method. # Parameters fullbasis: bool True if the full-basis variant must be selected.

### setNLEIGSInterpolation(self, tol=None, deg=None) |
Sets the tolerance and maximum degree when building the interpolation via divided differences. # Parameters tol: float, optional The tolerance to stop computing divided differences. deg: int, optional The maximum degree of interpolation.

### setNLEIGSLocking(self, lock) |
Choose between locking and non-locking variants of the NLEIGS method. # Parameters lock: bool True if the locking variant must be selected. # Notes The default is to lock converged eigenpairs when the method restarts. This behaviour can be changed so that all directions are kept in the working subspace even if already converged to working accuracy (the non-locking variant).

### setNLEIGSRKShifts(self, shifts) |
Sets a list of shifts to be used in the Rational Krylov method. # Parameters shifts: array of scalars Values specifying the shifts.

### setNLEIGSRestart(self, keep) |
Sets the restart parameter for the NLEIGS method, in particular the proportion of basis vectors that must be kept after restart. # Parameters keep: float The number of vectors to be kept at restart. # Notes Allowed values are in the range [0.1,0.9]. The default is 0.5.

### setOptionsPrefix(self, prefix) |
Sets the prefix used for searching for all NEP options in the database. # Parameters prefix: string The prefix string to prepend to all NEP option requests. Overrides: petsc4py.PETSc.Object.setOptionsPrefix

### setProblemType(self, problem_type) |
Specifies the type of the eigenvalue problem. # Parameters problem_type: NEP.ProblemType enumerate The problem type to be set.

### setRG(self, RG rg) |
Associates a region object to the eigensolver. # Parameters rg: RG The region context.

### setRIIConstCorrectionTol(self, cct) |
Sets a flag to keep the tolerance used in the linear solver constant. # Parameters cct: bool If True, the `KSP` relative tolerance is constant.

### setRIIDeflationThreshold(self, deftol) |
Sets the threshold value used to switch between deflated and non-deflated iteration. # Parameters deftol: float The threshold value.

### setRIIHermitian(self, herm) |
Sets a flag to indicate if the Hermitian version of the scalar nonlinear equation must be used by the solver. # Parameters herm: bool If True, the Hermitian version is used.

### setRIIKSP(self, KSP ksp) |
Associate a linear solver object to the nonlinear eigensolver. # Parameters ksp: `KSP` The linear solver object.

### setRIILagPreconditioner(self, lag) |
Determines when the preconditioner is rebuilt in the nonlinear solve. # Parameters lag: int 0 indicates NEVER rebuild, 1 means rebuild every time the Jacobian is computed within the nonlinear iteration, 2 means every second time the Jacobian is built, etc.

### setRIIMaximumIterations(self, its) |
Sets the maximum number of inner iterations to be used in the RII solver. These are the Newton iterations related to the computation of the nonlinear Rayleigh functional. # Parameters its: int Maximum inner iterations.

### setRefine(self, ref, npart=None, tol=None, its=None, scheme=None) |
Sets the refinement strategy used by the NEP object, and the associated parameters. # Parameters ref: NEP.Refine The refinement type. npart: int, optional The number of partitions of the communicator. tol: real, optional The convergence tolerance. its: int, optional The maximum number of refinement iterations. scheme: NEP.RefineScheme, optional Scheme for linear system solves

### setSLPDeflationThreshold(self, deftol) |
Sets the threshold value used to switch between deflated and non-deflated iteration. # Parameters deftol: float The threshold value.

### setSLPEPS(self, EPS eps) |
Associate a linear eigensolver object to the nonlinear eigensolver. # Parameters eps: EPS The linear eigensolver.

### setSLPEPSLeft(self, EPS eps) |
Associate a linear eigensolver object to the nonlinear eigensolver, used to compute left eigenvectors in the two-sided variant of SLP. # Parameters eps: EPS The linear eigensolver.

### setSLPKSP(self, KSP ksp) |
Associate a linear solver object to the nonlinear eigensolver. # Parameters ksp: `KSP` The linear solver object.

### setSplitOperator(self, A, f, structure=None) |
Sets the operator of the nonlinear eigenvalue problem in split form. # Parameters A: Mat or sequence of Mat Coefficient matrices of the split form. f: sequence of FN Scalar functions of the split form. structure: `PETSc.Mat.Structure` enumerate, optional Structure flag for matrices.

### setSplitPreconditioner(self, P, structure=None) |
Sets the operator in split form from which to build the preconditioner to be used when solving the nonlinear eigenvalue problem in split form. # Parameters P: Mat or sequence of Mat Coefficient matrices of the split preconditioner. structure: `PETSc.Mat.Structure` enumerate, optional Structure flag for matrices.

### setTarget(self, target) |
Sets the value of the target. # Parameters target: float (real or complex) The value of the target. # Notes The target is a scalar value used to determine the portion of the spectrum of interest. It is used in combination with setWhichEigenpairs().

### setTolerances(self, tol=None, maxit=None) |
Sets the tolerance and maximum iteration count used in convergence tests. # Parameters tol: float, optional The convergence tolerance. maxit: int, optional The maximum number of iterations.

### setTrackAll(self, trackall) |
Specifies if the solver must compute the residual of all approximate eigenpairs or not. # Parameters trackall: bool Whether compute all residuals or not.

### setTwoSided(self, twosided) |
Sets the solver to use a two-sided variant so that left eigenvectors are also computed. # Parameters twosided: bool Whether the two-sided variant is to be used or not.

### setType(self, nep_type) |
Selects the particular solver to be used in the NEP object. # Parameters nep_type: NEP.Type enumerate The solver to be used.

### setWhichEigenpairs(self, which) |
Specifies which portion of the spectrum is to be sought. # Parameters which: NEP.Which enumerate The portion of the spectrum to be sought by the solver.

### valuesView(self, Viewer viewer=None) |
Displays the computed eigenvalues in a viewer. # Parameters viewer: Viewer, optional. Visualization context; if not provided, the standard output is used.

### vectorsView(self, Viewer viewer=None) |
Outputs computed eigenvectors to a viewer. # Parameters viewer: Viewer, optional. Visualization context; if not provided, the standard output is used.

### view(self, Viewer viewer=None) |
Prints the NEP data structure. # Parameters viewer: Viewer, optional. Visualization context; if not provided, the standard output is used. Overrides: petsc4py.PETSc.Object.view