slepc4py.SLEPc.LME#
- class slepc4py.SLEPc.LME#
Bases:
Object
LME.
Enumerations
LME convergence reasons.
LME problem type.
LME type.
Methods Summary
Compute the error associated with the last equation solved.
appendOptionsPrefix
([prefix])Append to the prefix used for searching in the database.
Clear all monitors for an
LME
object.create
([comm])Create the LME object.
destroy
()Destroy the LME object.
getBV
()Get the basis vector object associated to the LME object.
Get the coefficient matrices of the matrix equation.
Get the reason why the
solve()
iteration was stopped.Get the dimension of the subspace used by the solver.
Get the error estimate obtained during solve.
Get if
solve()
generates an error if the solver does not converge.Get the current iteration number.
Get the list of monitor functions.
Get the prefix used for searching for all LME options in the database.
Get the LME problem type of this object.
getRHS
()Get the right-hand side of the matrix equation.
Get the solution of the matrix equation.
Get the tolerance and maximum iteration count.
getType
()Get the LME type of this object.
reset
()Reset the LME object.
setBV
(bv)Set a basis vector object to the LME object.
setCoefficients
(A[, B, D, E])Set the coefficient matrices.
setDimensions
(ncv)Set the dimension of the subspace to be used by the solver.
setErrorIfNotConverged
([flg])Set
solve()
to generate an error if the solver has not converged.Set LME options from the options database.
setMonitor
(monitor[, args, kargs])Append a monitor function to the list of monitors.
setOptionsPrefix
([prefix])Set the prefix used for searching for all LME options in the database.
setProblemType
(lme_problem_type)Set the LME problem type of this object.
setRHS
(C)Set the right-hand side of the matrix equation.
setSolution
(X)Set the placeholder for the solution of the matrix equation.
setTolerances
([tol, max_it])Set the tolerance and maximum iteration count.
setType
(lme_type)Set the particular solver to be used in the LME object.
setUp
()Set up all the internal necessary data structures.
solve
()Solve the linear matrix equation.
view
([viewer])Print the LME data structure.
Attributes Summary
The basis vectors (BV) object associated to the LME object.
The math function (FN) object associated to the LME object.
The maximum iteration count used by the LME convergence tests.
The tolerance value used by the LME convergence tests.
Methods Documentation
- LMEComputeError()#
Compute the error associated with the last equation solved.
Collective.
Computes the error (based on the residual norm) associated with the last equation solved.
- Returns:
The error
- Return type:
- appendOptionsPrefix(prefix=None)#
Append to the prefix used for searching in the database.
Logically collective.
Append to the prefix used for searching for all LME options in the database.
- cancelMonitor()#
Clear all monitors for an
LME
object.Source code at slepc4py/SLEPc/LME.pyx:508
- Return type:
- create(comm=None)#
Create the LME object.
Collective.
- destroy()#
Destroy the LME object.
Collective.
Source code at slepc4py/SLEPc/LME.pyx:73
- Return type:
- getBV()#
Get the basis vector object associated to the LME object.
Not collective.
- Returns:
The basis vectors context.
- Return type:
- getCoefficients()#
Get the coefficient matrices of the matrix equation.
Collective.
- Returns:
A
– First coefficient matrixB
– Second coefficient matrix, if availableD
– Third coefficient matrix, if availableE
– Fourth coefficient matrix, if available
- Return type:
- getConvergedReason()#
Get the reason why the
solve()
iteration was stopped.Not collective.
- Returns:
Negative value indicates diverged, positive value converged.
- Return type:
- getDimensions()#
Get the dimension of the subspace used by the solver.
Not collective.
- Returns:
Maximum dimension of the subspace to be used by the solver.
- Return type:
- getErrorEstimate()#
Get the error estimate obtained during solve.
Not collective.
- Returns:
The error estimate
- Return type:
- getErrorIfNotConverged()#
Get if
solve()
generates an error if the solver does not converge.Not collective.
Get a flag indicating whether
solve()
will generate an error if the solver does not converge.- Returns:
True indicates you want the error generated.
- Return type:
- 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:
- getMonitor()#
Get the list of monitor functions.
Source code at slepc4py/SLEPc/LME.pyx:502
- Return type:
- getOptionsPrefix()#
Get the prefix used for searching for all LME options in the database.
Not collective.
- Returns:
The prefix string set for this LME object.
- Return type:
- getProblemType()#
Get the LME problem type of this object.
Not collective.
- Returns:
The problem type currently being used.
- Return type:
- getRHS()#
Get the right-hand side of the matrix equation.
Collective.
- Returns:
The low-rank matrix
- Return type:
- getSolution()#
Get the solution of the matrix equation.
Collective.
- Returns:
The low-rank matrix
- Return type:
- getTolerances()#
Get the tolerance and maximum iteration count.
Not collective.
Get the tolerance and maximum iteration count used by the default LME convergence tests.
- Returns:
- Return type:
- getType()#
Get the LME type of this object.
Not collective.
- Returns:
The solver currently being used.
- Return type:
- reset()#
Reset the LME object.
Collective.
Source code at slepc4py/SLEPc/LME.pyx:83
- Return type:
- setBV(bv)#
Set a basis vector object to the LME object.
Collective.
- setCoefficients(A, B=None, D=None, E=None)#
Set the coefficient matrices.
Collective.
Set the coefficient matrices that define the linear matrix equation to be solved.
- Parameters:
- Return type:
- setDimensions(ncv)#
Set the dimension of the subspace to be used by the solver.
Logically collective.
- Parameters:
ncv (int) – Maximum dimension of the subspace to be used by the solver.
- Return type:
- setErrorIfNotConverged(flg=True)#
Set
solve()
to generate an error if the solver has not converged.Logically collective.
- setFromOptions()#
Set LME options from the options database.
Collective.
Sets LME options from the options database. This routine must be called before
setUp()
if the user is to be allowed to set the solver type.Source code at slepc4py/SLEPc/LME.pyx:368
- Return type:
- setMonitor(monitor, args=None, kargs=None)#
Append a monitor function to the list of monitors.
Logically collective.
- setOptionsPrefix(prefix=None)#
Set the prefix used for searching for all LME options in the database.
Logically collective.
- setProblemType(lme_problem_type)#
Set the LME problem type of this object.
Logically collective.
- Parameters:
lme_problem_type (ProblemType | str) – The problem type to be used.
- Return type:
- setRHS(C)#
Set the right-hand side of the matrix equation.
Collective.
Set the right-hand side of the matrix equation, as a low-rank matrix.
- setSolution(X)#
Set the placeholder for the solution of the matrix equation.
Collective.
Set the placeholder for the solution of the matrix equation, as a low-rank matrix.
- setTolerances(tol=None, max_it=None)#
Set the tolerance and maximum iteration count.
Logically collective.
Set the tolerance and maximum iteration count used by the default LME convergence tests.
- Parameters:
- Return type:
- setType(lme_type)#
Set the particular solver to be used in the LME object.
Logically collective.
- setUp()#
Set up all the internal necessary data structures.
Collective.
Set up all the internal data structures necessary for the execution of the eigensolver.
Source code at slepc4py/SLEPc/LME.pyx:515
- Return type:
- solve()#
Solve the linear matrix equation.
Collective.
Source code at slepc4py/SLEPc/LME.pyx:526
- Return type:
- view(viewer=None)#
Print the LME data structure.
Collective.
Attributes Documentation
- bv#
The basis vectors (BV) object associated to the LME object.
- fn#
The math function (FN) object associated to the LME object.
- max_it#
The maximum iteration count used by the LME convergence tests.
- tol#
The tolerance value used by the LME convergence tests.