(lvl, iterations=DEFAULT_NITER, omega=1.0)
return smoother
Set up Richardson.
Set up Richardson.
Set up Richardson .
def setup_richardson(lvl, iterations=DEFAULT_NITER, omega=1.0):
    """Set up Richardson."""
    omega = omega/approximate_spectral_radius(lvl.A)

    def smoother(A, x, b):
        relaxation.polynomial(A, x, b, coefficients=[omega],
                              iterations=iterations)
    return smoother
def setup_richardson ( lvl , iterations = DEFAULT_NITER , omega = 1.0 ) : omega = omega / approximate_spectral_radius ( lvl . A ) def smoother ( A , x , b ) : relaxation . polynomial ( A , x , b , coefficients = [ omega ] , iterations = iterations ) return smoother