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

Class QEP


QEP
Nested Classes [hide private]
  ConvergedReason
  ProblemType
  Type
  Which
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 QEP options in the database.
 
cancelMonitor(self)
Clears all monitors for a QEP object.
 
computeRelativeError(self, int i)
Computes the relative error bound associated with the i-th computed eigenpair.
 
computeResidualNorm(self, int i)
Computes the norm of the residual vector associated with the i-th computed eigenpair.
 
create(self, comm=None)
Creates the QEP object.
 
destroy(self)
Destroys the QEP object.
 
getConverged(self)
Gets the number of converged eigenpairs.
 
getConvergedReason(self)
Gets the reason why the solve() iteration was stopped.
 
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.
 
getIP(self)
Obtain the inner product associated to the eigensolver.
 
getIterationNumber(self)
Gets the current iteration number.
 
getLeftVectorsWanted(self)
Returns the flag indicating whether left eigenvectors are required or not.
 
getOperationCounters(self)
Gets the total number of operator applications, inner product operations and linear iterations used by the QEP object during the last solve() call.
 
getOperators(self)
Gets the matrices associated with the eigenvalue problem.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all QEP options in the database.
 
getProblemType(self)
Gets the problem type from the QEP object.
 
getScaleFactor(self)
Gets the factor used for scaling the quadratic eigenproblem.
 
getTolerances(self)
Gets the tolerance and maximum iteration count used by the default QEP convergence tests.
 
getTrackAll(self)
Returns the flag indicating whether all residual norms must be computed or not.
 
getType(self)
Gets the QEP type of this object.
 
getWhichEigenpairs(self)
Returns which portion of the spectrum is to be sought.
 
reset(self)
Resets the QEP object.
 
setDimensions(self, nev=None, ncv=None, mpd=None)
Sets the number of eigenvalues to compute and the dimension of the subspace.
 
setFromOptions(self)
Sets QEP options from the options database.
 
setIP(self, IP ip)
Associates an inner product to the eigensolver.
 
setInitialSpace(self, space)
Sets the initial space from which the eigensolver starts to iterate.
 
setInitialSpaceLeft(self, space)
Sets the initial left space from which the solver starts to iterate.
 
setLeftVectorsWanted(self, wanted)
Specifies the flag indicating whether left eigenvectors are required or not.
 
setOperators(self, Mat M, Mat C, Mat K)
Sets the matrices associated with the eigenvalue problem.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all QEP options in the database.
 
setProblemType(self, problem_type)
Specifies the type of the eigenvalue problem.
 
setScaleFactor(self, alpha)
Sets the scaling factor to be used for scaling the quadratic problem before attempting to solve.
 
setTolerances(self, tol=None, max_it=None)
Sets the tolerance and maximum iteration count used by the default QEP convergence tests.
 
setTrackAll(self, trackall)
Specifies if the solver must compute the residual of all approximate eigenpairs or not.
 
setType(self, qep_type)
Selects the particular solver to be used in the QEP 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.
 
view(self, Viewer viewer=None)
Prints the QEP 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, incRef, query, setAttr, setName

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

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 QEP options in the database.

Parameters

prefix: string
The prefix string to prepend to all QEP option requests.

computeRelativeError(self, int i)

 

Computes the relative error bound associated with the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.

Returns

error: real
The relative error bound.

computeResidualNorm(self, int i)

 

Computes the norm of the residual vector associated with the i-th computed eigenpair.

Parameters

i: int
Index of the solution to be considered.

Returns

norm: real
The residual norm.

create(self, comm=None)

 

Creates the QEP object.

Parameters

comm: Comm, optional.
MPI communicator. If not provided, it defaults to all processes.

destroy(self)

 
Destroys the QEP object.
Overrides: petsc4py.PETSc.Object.destroy

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: QEP.ConvergedReason enumerate
Negative value indicates diverged, positive value converged.

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.

getIP(self)

 

Obtain the inner product associated to the eigensolver.

Returns

ip: IP
The inner product context.

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.

getLeftVectorsWanted(self)

 

Returns the flag indicating whether left eigenvectors are required or not.

Returns

wanted: boolean
Whether left eigenvectors are required or not.

getOperationCounters(self)

 

Gets the total number of operator applications, inner product operations and linear iterations used by the QEP object during the last solve() call.

Returns

ops: int
number of operator applications.
dots: int
number of inner product operations.
lits: int
number of linear iterations.

getOperators(self)

 

Gets the matrices associated with the eigenvalue problem.

Returns

M: Mat
The fist coefficient matrix.
C: Mat
The second coefficient matrix.
K: Mat
The third coefficient matrix.

getOptionsPrefix(self)

 

Gets the prefix used for searching for all QEP options in the database.

Returns

prefix: string
The prefix string set for this QEP object.
Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getProblemType(self)

 

Gets the problem type from the QEP object.

Returns

problem_type: QEP.ProblemType enumerate
The problem type that was previously set.

getScaleFactor(self)

 

Gets the factor used for scaling the quadratic eigenproblem.

Returns

alpha: real
The scaling factor.

getTolerances(self)

 

Gets the tolerance and maximum iteration count used by the default QEP convergence tests.

Returns

tol: float
The convergence tolerance.
max_it: 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.

getType(self)

 

Gets the QEP type of this object.

Returns

type: QEP.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: QEP.Which enumerate
The portion of the spectrum to be sought by the solver.

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 QEP 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

setIP(self, IP ip)

 

Associates an inner product to the eigensolver.

Parameters

ip: IP
The inner product context.

setInitialSpace(self, space)

 

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

Parameters

space: Vec or sequence of Vec
The initial space

setInitialSpaceLeft(self, space)

 

Sets the initial left space from which the solver starts to iterate.

Parameters

space: Vec or sequence of Vec
The initial left space

setLeftVectorsWanted(self, wanted)

 

Specifies the flag indicating whether left eigenvectors are required or not.

Parameters

wanted: boolean
Whether left eigenvectors are required or not.

setOperators(self, Mat M, Mat C, Mat K)

 

Sets the matrices associated with the eigenvalue problem.

Parameters

M: Mat
The fist coefficient matrix.
C: Mat
The second coefficient matrix.
K: Mat
The third coefficient matrix.

setOptionsPrefix(self, prefix)

 

Sets the prefix used for searching for all QEP options in the database.

Parameters

prefix: string
The prefix string to prepend to all QEP option requests.
Overrides: petsc4py.PETSc.Object.setOptionsPrefix

setProblemType(self, problem_type)

 

Specifies the type of the eigenvalue problem.

Parameters

problem_type: QEP.ProblemType enumerate
The problem type to be set.

setScaleFactor(self, alpha)

 

Sets the scaling factor to be used for scaling the quadratic problem before attempting to solve.

Parameters

alpha: real
The scaling factor.

setTolerances(self, tol=None, max_it=None)

 

Sets the tolerance and maximum iteration count used by the default QEP convergence tests.

Parameters

tol: float, optional
The convergence tolerance.
max_it: 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.

setType(self, qep_type)

 

Selects the particular solver to be used in the QEP object.

Parameters

qep_type: QEP.Type enumerate
T5he solver to be used.

setWhichEigenpairs(self, which)

 

Specifies which portion of the spectrum is to be sought.

Parameters

which: QEP.Which enumerate
The portion of the spectrum to be sought by the solver.

view(self, Viewer viewer=None)

 

Prints the QEP data structure.

Parameters

viewer: Viewer, optional.
Visualization context; if not provided, the standard output is used.
Overrides: petsc4py.PETSc.Object.view