def __init__(self, tolerance=1e-10, iterations=1000, steps=None, relaxation = 1.0, precon=None): """ The `Solver` class should not be invoked directly. :Parameters: - `tolerance`: The required error tolerance. - `iterations`: The maximum number of iterative steps to perform. - `steps`: A deprecated name for `iterations`. - `relaxation`: The relaxation. """ PysparseSolver.__init__(self, tolerance=tolerance, iterations=iterations, steps=steps, precon=precon) self.relaxation = relaxation
def __init__(self, tolerance=1e-10, iterations=10, steps=None, precon=None, maxIterations=10): """ Creates a `LinearLUSolver`. :Parameters: - `tolerance`: The required error tolerance. - `iterations`: The number of LU decompositions to perform. - `steps`: A deprecated name for `iterations`. For large systems a number of iterations is generally required. """ iterations = min(iterations, maxIterations) PysparseSolver.__init__(self, tolerance = tolerance, iterations=iterations, steps = steps, precon = precon)
def __init__(self, *args, **kwargs): import warnings warnings.warn("The PySparse CGS solver may return incorrect results for some matrices", UserWarning) PysparseSolver.__init__(self, *args, **kwargs)