Reputation: 33
I'm doing with Ax = b
where A is very large (over 1m*1m size), non-symmetrical sparse matrix in matlab
. I build A
in sparse way. However, using A\b
directly is too slow. I tried gmres
. However, without pre-conditioner I cannot get the right answer and with pre-conditioner (ilu
for instance) it's also too slow.
How can I solve this problem efficiently? Thx.
Upvotes: 1
Views: 427
Reputation: 3886
It's difficult to give a definitive answer, since it depends on the particulars of the system you are solving. Unfortunately this involves a lot of trial and error on your side and there is no guaranteed method that will work for any system. Here are a few things to consider:
too slow
? 1M x 1M is a fairly large system, but the work depends on the number of non-zeros; so if your system has many nonzeros, then yes, it will take a while to run; another aspect that could lead to a long running time is the poor numerical conditioning of your system (see 1 and 2); preconditioning should help with this, as long as you use an effective preconditionerilu(0)
, crout
, ilutp
; Upvotes: 2