(lvl, iterations=DEFAULT_NITER,
                                 sweep=DEFAULT_SWEEP)
return setup_schwarz(lvl, iterations=iterations, subdomain=subdomain,
                         subdomain_ptr=subdomain_ptr, sweep=sweep)
Set up strength-based Schwarz.
Set up strength-based Schwarz.
Set up strength - based Schwarz .
def setup_strength_based_schwarz(lvl, iterations=DEFAULT_NITER,
                                 sweep=DEFAULT_SWEEP):
    """Set up strength-based Schwarz."""
    # Use the overlapping regions defined by strength of connection matrix C
    # for the overlapping Schwarz method
    if not hasattr(lvl, 'C'):
        C = lvl.A.tocsr()
    else:
        C = lvl.C.tocsr()

    C.sort_indices()
    subdomain_ptr = C.indptr.copy()
    subdomain = C.indices.copy()

    return setup_schwarz(lvl, iterations=iterations, subdomain=subdomain,
                         subdomain_ptr=subdomain_ptr, sweep=sweep)
def setup_strength_based_schwarz ( lvl , iterations = DEFAULT_NITER , sweep = DEFAULT_SWEEP ) : # Use the overlapping regions defined by strength of connection matrix C # for the overlapping Schwarz method if not hasattr ( lvl , 'C' ) : C = lvl . A . tocsr ( ) else : C = lvl . C . tocsr ( ) C . sort_indices ( ) subdomain_ptr = C . indptr . copy ( ) subdomain = C . indices . copy ( ) return setup_schwarz ( lvl , iterations = iterations , subdomain = subdomain , subdomain_ptr = subdomain_ptr , sweep = sweep )