(fn)
return setup_register[fn]
Register setup functions.

    This is a helper function to call the setup methods and avoids use of eval().
Register setup functions.
Register setup functions .
def _setup_call(fn):
    """Register setup functions.

    This is a helper function to call the setup methods and avoids use of eval().
    """
    setup_register = {
        'gauss_seidel':           setup_gauss_seidel,
        'jacobi':                 setup_jacobi,
        'schwarz':                setup_schwarz,
        'strength_based_schwarz': setup_strength_based_schwarz,
        'block_jacobi':           setup_block_jacobi,
        'block_gauss_seidel':     setup_block_gauss_seidel,
        'richardson':             setup_richardson,
        'sor':                    setup_sor,
        'chebyshev':              setup_chebyshev,
        'jacobi_ne':              setup_jacobi_ne,
        'gauss_seidel_ne':        setup_gauss_seidel_ne,
        'gauss_seidel_nr':        setup_gauss_seidel_nr,
        'gmres':                  setup_gmres,
        'cg':                     setup_cg,
        'cgne':                   setup_cgne,
        'cgnr':                   setup_cgnr,
        'none':                   setup_none,
    }

    if fn not in setup_register:
        raise ValueError(f'Function {fn} does not have a setup')

    return setup_register[fn]
def _setup_call ( fn ) : setup_register = { 'gauss_seidel' : setup_gauss_seidel , 'jacobi' : setup_jacobi , 'schwarz' : setup_schwarz , 'strength_based_schwarz' : setup_strength_based_schwarz , 'block_jacobi' : setup_block_jacobi , 'block_gauss_seidel' : setup_block_gauss_seidel , 'richardson' : setup_richardson , 'sor' : setup_sor , 'chebyshev' : setup_chebyshev , 'jacobi_ne' : setup_jacobi_ne , 'gauss_seidel_ne' : setup_gauss_seidel_ne , 'gauss_seidel_nr' : setup_gauss_seidel_nr , 'gmres' : setup_gmres , 'cg' : setup_cg , 'cgne' : setup_cgne , 'cgnr' : setup_cgnr , 'none' : setup_none , } if fn not in setup_register : raise ValueError ( f'Function {fn} does not have a setup' ) return setup_register [ fn ]