(lvl, iterations=DEFAULT_NITER, subdomain=None,
                  subdomain_ptr=None, inv_subblock=None, inv_subblock_ptr=None,
                  sweep=DEFAULT_SWEEP)
return smoother
Set up Schwarz.
Set up Schwarz.
Set up Schwarz .
def setup_schwarz(lvl, iterations=DEFAULT_NITER, subdomain=None,
                  subdomain_ptr=None, inv_subblock=None, inv_subblock_ptr=None,
                  sweep=DEFAULT_SWEEP):
    """Set up Schwarz."""
    matrix_asformat(lvl, 'A', 'csr')
    lvl.Acsr.sort_indices()
    subdomain, subdomain_ptr, inv_subblock, inv_subblock_ptr = \
        relaxation.schwarz_parameters(lvl.Acsr, subdomain, subdomain_ptr,
                                      inv_subblock, inv_subblock_ptr)

    def smoother(A, x, b):
        relaxation.schwarz(lvl.Acsr, x, b, iterations=iterations,
                           subdomain=subdomain,
                           subdomain_ptr=subdomain_ptr,
                           inv_subblock=inv_subblock,
                           inv_subblock_ptr=inv_subblock_ptr, sweep=sweep)
    return smoother
def setup_schwarz ( lvl , iterations = DEFAULT_NITER , subdomain = None , subdomain_ptr = None , inv_subblock = None , inv_subblock_ptr = None , sweep = DEFAULT_SWEEP ) : matrix_asformat ( lvl , 'A' , 'csr' ) lvl . Acsr . sort_indices ( ) subdomain , subdomain_ptr , inv_subblock , inv_subblock_ptr = relaxation . schwarz_parameters ( lvl . Acsr , subdomain , subdomain_ptr , inv_subblock , inv_subblock_ptr ) def smoother ( A , x , b ) : relaxation . schwarz ( lvl . Acsr , x , b , iterations = iterations , subdomain = subdomain , subdomain_ptr = subdomain_ptr , inv_subblock = inv_subblock , inv_subblock_ptr = inv_subblock_ptr , sweep = sweep ) return smoother