numpy - Python library for Gauss-Seidel Iterative Solver? -
is there linear algebra library implements iterative gauss-seidel solve linear systems? or maybe preconditioned gradient solver?
thanks
edit: in end used kind of crude correct way solve it. had create matrix (for ax=b) anyway, partitioned matrix
a = m - n with
m = (d + l) , n = -u where d diagonal, l lower triangular section, , u upper triangular section. then
pinv = scipy.linalg.inv(m) x_k_1 = np.dot(pinv,np.dot(n,x_k)) + np.dot(pinv,b) also did convergence tests. works.
there example implementation go through various implementations here:
http://www.scipy.org/performancepython
another example here:
http://www.dur.ac.uk/physics.astrolab/py_source/kiusalaas/v1_with_numpy/gaussseidel.py
you might want check out python bindings petsc:
Comments
Post a Comment