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

Class MFN



MFN

Nested Classes [hide private]
  ConvergedReason
  Type
MFN type
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 MFN options in the database.
 
cancelMonitor(self)
Clears all monitors for an `MFN` object.
 
create(self, comm=None)
Creates the MFN object.
 
destroy(self)
Destroys the MFN object.
 
getBV(self)
Obtain the basis vector object associated to the MFN object.
 
getConvergedReason(self)
Gets the reason why the `solve()` iteration was stopped.
 
getDimensions(self)
Gets the dimension of the subspace used by the solver.
 
getErrorIfNotConverged(self)
Return a flag indicating whether `solve()` will generate an error if the solver does not converge.
 
getFN(self)
Obtain the math function object associated to the MFN object.
 
getIterationNumber(self)
Gets the current iteration number.
 
getMonitor(self)
Gets the list of monitor functions.
 
getOperator(self)
Gets the matrix associated with the MFN object.
 
getOptionsPrefix(self)
Gets the prefix used for searching for all MFN options in the database.
 
getTolerances(self)
Gets the tolerance and maximum iteration count used by the default MFN convergence tests.
 
getType(self)
Gets the MFN type of this object.
 
reset(self)
Resets the MFN object.
 
setBV(self, BV bv)
Associates a basis vector object to the MFN object.
 
setDimensions(self, ncv)
Sets the dimension of the subspace to be used by the solver.
 
setErrorIfNotConverged(self, flg=True)
Causes `solve()` to generate an error if the solver has not converged.
 
setFN(self, FN fn)
Associates a math function object to the MFN object.
 
setFromOptions(self)
Sets MFN options from the options database.
 
setMonitor(self, monitor, args=None, kargs=None)
Appends a monitor function to the list of monitors.
 
setOperator(self, Mat A)
Sets the matrix associated with the MFN object.
 
setOptionsPrefix(self, prefix)
Sets the prefix used for searching for all MFN options in the database.
 
setTolerances(self, tol=None, max_it=None)
Sets the tolerance and maximum iteration count used by the default MFN convergence tests.
 
setType(self, mfn_type)
Selects the particular solver to be used in the MFN object.
 
setUp(self)
Sets up all the internal data structures necessary for the execution of the eigensolver.
 
solve(self, Vec b, Vec x)
Solves the matrix function problem.
 
solveTranspose(self, Vec b, Vec x)
Solves the transpose matrix function problem.
 
view(self, Viewer viewer=None)
Prints the MFN 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, stateIncrease, viewFromOptions

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

Properties [hide private]
  bv
  fn
  max_it
  tol

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

Parameters
----------
prefix: string
    The prefix string to prepend to all MFN option requests.

create(self, comm=None)

 
Creates the MFN object.

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

destroy(self)

 
Destroys the MFN object.

Overrides: petsc4py.PETSc.Object.destroy

getBV(self)

 
Obtain the basis vector object associated to the MFN object.

Returns
-------
bv: BV
    The basis vectors context.

getConvergedReason(self)

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

Returns
-------
reason: `MFN.ConvergedReason` enumerate
    Negative value indicates diverged, positive value
    converged.

getDimensions(self)

 
Gets the dimension of the subspace used by the solver.

Returns
-------
ncv: int
    Maximum dimension of the subspace to be used by the solver.

getErrorIfNotConverged(self)

 
Return a flag indicating whether `solve()` will generate an
error if the solver does not converge.

Returns
-------
flg: bool
    True indicates you want the error generated.

getFN(self)

 
Obtain the math function object associated to the MFN object.

Returns
-------
fn: FN
    The math function 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.

getOperator(self)

 
Gets the matrix associated with the MFN object.

Returns
-------
A: Mat
    The matrix for which the matrix function is to be computed.

getOptionsPrefix(self)

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

Returns
-------
prefix: string
    The prefix string set for this MFN object.

Overrides: petsc4py.PETSc.Object.getOptionsPrefix

getTolerances(self)

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

Returns
-------
tol: float
    The convergence tolerance.
max_it: int
    The maximum number of iterations

getType(self)

 
Gets the MFN type of this object.

Returns
-------
type: `MFN.Type` enumerate
    The solver currently being used.

Overrides: petsc4py.PETSc.Object.getType

setBV(self, BV bv)

 
Associates a basis vector object to the MFN object.

Parameters
----------
bv: BV
    The basis vectors context.

setDimensions(self, ncv)

 
Sets the dimension of the subspace to be used by the solver.

Parameters
----------
ncv: int
    Maximum dimension of the subspace to be used by the
    solver.

setErrorIfNotConverged(self, flg=True)

 
Causes `solve()` to generate an error if the solver has not converged.

Parameters
----------
flg: bool
    True indicates you want the error generated.

setFN(self, FN fn)

 
Associates a math function object to the MFN object.

Parameters
----------
fn: FN
    The math function context.

setFromOptions(self)

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

Overrides: petsc4py.PETSc.Object.setFromOptions

setOperator(self, Mat A)

 
Sets the matrix associated with the MFN object.

Parameters
----------
A: Mat
    The problem matrix.

setOptionsPrefix(self, prefix)

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

Parameters
----------
prefix: string
    The prefix string to prepend to all MFN option requests.

Overrides: petsc4py.PETSc.Object.setOptionsPrefix

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

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

Parameters
----------
tol: float, optional
    The convergence tolerance.
max_it: int, optional
    The maximum number of iterations

setType(self, mfn_type)

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

Parameters
----------
mfn_type: `MFN.Type` enumerate
    The solver to be used.

solve(self, Vec b, Vec x)

 
Solves the matrix function problem. Given a vector b, the
vector x = f(A)*b is returned.

Parameters
----------
b: Vec
    The right hand side vector.
x: Vec
    The solution.

solveTranspose(self, Vec b, Vec x)

 
Solves the transpose matrix function problem. Given a vector b, the
vector x = f(A^T)*b is returned.

Parameters
----------
b: Vec
    The right hand side vector.
x: Vec
    The solution.

view(self, Viewer viewer=None)

 
Prints the MFN data structure.

Parameters
----------
viewer: Viewer, optional.
    Visualization context; if not provided, the standard
    output is used.

Overrides: petsc4py.PETSc.Object.view