Пример #1
0
def cgs(*args, **kwargs):
    return  krylov.cgs(*args, **kwargs)
Пример #2
0
def cgs(*args, **kwargs):
    return krylov.cgs(*args, **kwargs)
Пример #3
0
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000)
print 'qmrs, K_none: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000, K_diag)
print 'qmrs, K_diag: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000, K_jac)
print 'qmrs, K_jac: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000, K_ssor)
print 'qmrs, K_ssor: ', info, iter, relres, resid(A, b, x)

x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000)
print 'cgs, K_none: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000, K_diag)
print 'cgs, K_diag: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000, K_jac)
print 'cgs, K_jac: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000, K_ssor)
print 'cgs, K_ssor: ', info, iter, relres, resid(A, b, x)

x = np.zeros(n, 'd')
info, iter, relres = bicgstab(A, b, x, 1e-6, 1000)
print 'bicgstab, K_none: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
Пример #4
0
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000)
print 'qmrs, K_none: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000, K_diag)
print 'qmrs, K_diag: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000, K_jac)
print 'qmrs, K_jac: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = qmrs(A, b, x, 1e-6, 1000, K_ssor)
print 'qmrs, K_ssor: ', info, iter, relres, resid(A, b, x)

x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000)
print 'cgs, K_none: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000, K_diag)
print 'cgs, K_diag: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000, K_jac)
print 'cgs, K_jac: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')
info, iter, relres = cgs(A, b, x, 1e-6, 1000, K_ssor)
print 'cgs, K_ssor: ', info, iter, relres, resid(A, b, x)

x = np.zeros(n, 'd')
info, iter, relres = bicgstab(A, b, x, 1e-6, 1000)
print 'bicgstab, K_none: ', info, iter, relres, resid(A, b, x)
x = np.zeros(n, 'd')