(lvl, tol=1e-12, maxiter=1, M=None, callback=None, residuals=None)
return smoother
Set up CG smoothing.
Set up CG smoothing.
Set up CG smoothing .
def setup_cg(lvl, tol=1e-12, maxiter=1, M=None, callback=None, residuals=None):
    """Set up CG smoothing."""
    def smoother(A, x, b):
        x[:] = (cg(A, b, x0=x, tol=tol, maxiter=maxiter, M=M,
                   callback=callback, residuals=residuals)[0]).reshape(x.shape)
    return smoother
def setup_cg ( lvl , tol = 1e-12 , maxiter = 1 , M = None , callback = None , residuals = None ) : def smoother ( A , x , b ) : x [ : ] = ( cg ( A , b , x0 = x , tol = tol , maxiter = maxiter , M = M , callback = callback , residuals = residuals ) [ 0 ] ) . reshape ( x . shape ) return smoother