Thanks for the support.
I confirmed the smoothed aggregation and Krylov solvers can handle
complex numbers at your suggestion.
However, I encounterd a new non-convergent problem:
I downloaded a sample complex-valued matrix, young4c.mtx, from matrix
market web site.
http://math.nist.gov/MatrixMarket/data/Harwell-Boeing/acoust/young4c.html
I experienced a divergent problem, my python source is:
import numpy, scipy.io, scipy.sparse.linalg
import pyamg
from pyamg.util.linalg import norm
A = scipy.io.mmread("young4c.mtx").tocsr()
A_direct = A[:]
b = numpy.ones((A.shape[0], 1))
b_direct = b[:]
#Agg = pyamg.aggregation.standard_aggregation(A)
B = numpy.ones((A.shape[0], 1))
x0 = numpy.zeros((A.shape[0], 1))
residuals = []
ml =pyamg.smoothed_aggregation_solver(A,B,max_coarse=10)
x = ml.solve(b=b,x0=x0,tol=1e-14,residuals=residuals,accel='cg')
print ml
print "residuals[0]; residuals[-1] = ", residuals[0],"; ", residuals[-1]
print "norm(x) = ", norm(x)
x_direct = scipy.sparse.linalg.spsolve(A_direct, b_direct)
print "norm(x_direct) = ", norm(x_direct)
My output is:
$ python SpExp1_foo.py
multilevel_solver
Number of Levels: 4
Operator Complexity: 1.333
Grid Complexity: 1.206
Coarse Solver: 'pinv2'
level unknowns nonzeros
0 841 4089 [75.03%]
1 150 1212 [22.24%]
2 20 140 [ 2.57%]
3 3 9 [ 0.17%]
residuals[0]; residuals[-1] = 29.0 ; 60.5816600971
norm(x) = 0.445003361946
norm(x_direct) = 0.381460403374
Let me know whats wrong with me.
regards,
2010/7/10 Jacob <jacob.b....@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "pyamg-user" group.
> To post to this group, send email to pyamg...@googlegroups.com.
> To unsubscribe from this group, send email to pyamg-user+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pyamg-user?hl=en.
>
>