slepc4py.SLEPc.MFN#
- class slepc4py.SLEPc.MFN#
Bases:
Object
MFN.
Enumerations
MFN convergence reasons.
MFN type.
Methods Summary
appendOptionsPrefix
([prefix])Append to the prefix used for searching for all MFN options in the database.
Clear all monitors for an
MFN
object.create
([comm])Create the MFN object.
destroy
()Destroy the MFN object.
getBV
()Get the basis vector object associated to the MFN object.
Get the reason why the
solve()
iteration was stopped.Get the dimension of the subspace used by the solver.
Get if
solve()
generates an error if the solver does not converge.getFN
()Get the math function object associated to the MFN object.
Get the current iteration number.
Get the list of monitor functions.
Get the matrix associated with the MFN object.
Get the prefix used for searching for all MFN options in the database.
Get the tolerance and maximum iteration count.
getType
()Get the MFN type of this object.
reset
()Reset the MFN object.
setBV
(bv)Set a basis vector object associated to the MFN object.
setDimensions
(ncv)Set the dimension of the subspace to be used by the solver.
setErrorIfNotConverged
([flg])Set
solve()
to generate an error if the solver does not converge.setFN
(fn)Set a math function object associated to the MFN object.
Set MFN options from the options database.
setMonitor
(monitor[, args, kargs])Append a monitor function to the list of monitors.
setOperator
(A)Set the matrix associated with the MFN object.
setOptionsPrefix
([prefix])Set the prefix used for searching for all MFN options in the database.
setTolerances
([tol, max_it])Set the tolerance and maximum iteration count.
setType
(mfn_type)Set the particular solver to be used in the MFN object.
setUp
()Set up all the necessary internal data structures.
solve
(b, x)Solve the matrix function problem.
solveTranspose
(b, x)Solve the transpose matrix function problem.
view
([viewer])Print the MFN data structure.
Attributes Summary
The basis vectors (BV) object associated to the MFN object.
The math function (FN) object associated to the MFN object.
The maximum iteration count used by the MFN convergence tests.
The tolerance count used by the MFN convergence tests.
Methods Documentation
- appendOptionsPrefix(prefix=None)#
Append to the prefix used for searching for all MFN options in the database.
Logically collective.
- cancelMonitor()#
Clear all monitors for an
MFN
object.Logically collective.
Source code at slepc4py/SLEPc/MFN.pyx:367
- Return type:
- create(comm=None)#
Create the MFN object.
Collective.
- destroy()#
Destroy the MFN object.
Logically collective.
Source code at slepc4py/SLEPc/MFN.pyx:59
- Return type:
- getBV()#
Get the basis vector object associated to the MFN object.
Not collective.
- Returns:
The basis vectors context.
- 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:
- 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:
- getFN()#
Get the math function object associated to the MFN object.
Not collective.
- Returns:
The math function context.
- Return type:
- getIterationNumber()#
Get the current iteration number.
Not collective.
Get the current iteration number. If the call to
solve()
is complete, then it returns the number of iterations carried out by the solution method.- Returns:
Iteration number.
- Return type:
- getMonitor()#
Get the list of monitor functions.
Source code at slepc4py/SLEPc/MFN.pyx:363
- Return type:
- getOperator()#
Get the matrix associated with the MFN object.
Collective.
- Returns:
The matrix for which the matrix function is to be computed.
- Return type:
- getOptionsPrefix()#
Get the prefix used for searching for all MFN options in the database.
Not collective.
- Returns:
The prefix string set for this MFN object.
- Return type:
- getTolerances()#
Get the tolerance and maximum iteration count.
Not collective.
Get the tolerance and maximum iteration count used by the default MFN convergence tests.
- Returns:
- Return type:
- getType()#
Get the MFN type of this object.
Not collective.
- Returns:
The solver currently being used.
- Return type:
- reset()#
Reset the MFN object.
Collective.
Source code at slepc4py/SLEPc/MFN.pyx:69
- Return type:
- setBV(bv)#
Set a basis vector object associated to the MFN object.
Collective.
- 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 does not converge.Logically collective.
- setFN(fn)#
Set a math function object associated to the MFN object.
Collective.
- setFromOptions()#
Set MFN options from the options database.
Collective.
Set MFN options from the options database. This routine must be called before
setUp()
if the user is to be allowed to set the solver type.Source code at slepc4py/SLEPc/MFN.pyx:169
- Return type:
- setMonitor(monitor, args=None, kargs=None)#
Append a monitor function to the list of monitors.
Logically collective.
- setOperator(A)#
Set the matrix associated with the MFN object.
Collective.
- setOptionsPrefix(prefix=None)#
Set the prefix used for searching for all MFN options in the database.
Logically collective.
- setTolerances(tol=None, max_it=None)#
Set the tolerance and maximum iteration count.
Logically collective.
Set the tolerance and maximum iteration count used by the default MFN convergence tests.
- Parameters:
- Return type:
- setType(mfn_type)#
Set the particular solver to be used in the MFN object.
Logically collective.
- setUp()#
Set up all the necessary internal data structures.
Collective.
Set up all the internal data structures necessary for the execution of the eigensolver.
Source code at slepc4py/SLEPc/MFN.pyx:378
- Return type:
- solve(b, x)#
Solve the matrix function problem.
Collective.
Given a vector \(b\), the vector \(x = f(A) b\) is returned.
- solveTranspose(b, x)#
Solve the transpose matrix function problem.
Collective.
Given a vector \(b\), the vector \(x = f(A^T) b\) is returned.
- view(viewer=None)#
Print the MFN data structure.
Collective.
Attributes Documentation
- bv#
The basis vectors (BV) object associated to the MFN object.
- fn#
The math function (FN) object associated to the MFN object.
- max_it#
The maximum iteration count used by the MFN convergence tests.
- tol#
The tolerance count used by the MFN convergence tests.