fipy.solvers.pysparseMatrixSolver¶
Classes
|
A class consolidating methods for solver packages which use _PysparseMeshMatrix for their matrix class. |
- class fipy.solvers.pysparseMatrixSolver.PysparseMatrixSolver(tolerance='default', criterion='default', iterations='default', precon='default')¶
Bases:
Solver
A class consolidating methods for solver packages which use _PysparseMeshMatrix for their matrix class.
Subclasses have a _solve_ method, which is called by _solve. Typically, _solve_ returns the new value of self.var to _solve and solve sets the var accordingly.
A solution function solveFnc, usually of the form solve(A, x, b), is implemented in most leaf-node child classes.
Attention
This class is abstract. Always create one of its subclasses.
Create a Solver object.
- Parameters:
tolerance (
float
) – Required residual tolerance.criterion (
{'default', 'initial', 'unscaled', 'RHS', 'matrix', 'solution', 'preconditioned', 'natural', 'legacy'}
, optional) – Interpretation oftolerance
. See Convergence for more information.iterations (
int
) – Maximum number of iterative steps to perform.precon (
Preconditioner
) – Preconditioner to use. Not all solver suites support preconditioners.
- DEFAULT_ITERATIONS = 1000¶
Default maximum number of iterative steps to perform
- DEFAULT_PRECONDITIONER = None¶
Default preconditioner to apply to the matrix
- DEFAULT_TOLERANCE = 1e-05¶
Default tolerance for linear solves unless criterion=”legacy”
- LEGACY_TOLERANCE = 1e-10¶
Default tolerance for linear solves if criterion=”legacy”
- __repr__()¶
Return repr(self).
- property default_tolerance¶
Default tolerance for linear solve