I have a very large sparse matrix and I need to obtain its approximate inverse and save it as an sparse matrix too. Any of my efforts as could be seen in what follows fail for large n
ClearAll[n, s, f, aInv]
n = 100000;
s = SparseArray[{Band[{1, 120}] -> -2., Band[{950, 1}] -> -1.,
Band[{1, 1}] -> 20., Band[{1, 100}] -> 2.,
Band[{6, 800}] -> 1.1}, {n, n}, 0.];
f = LinearSolve[s];
aInv = f[SparseArray[{Band[{1, 1}] -> 1.}, {n, n},
0.]]; // AbsoluteTiming
The accuracy of the approximate inverse is not that important to me for the time being, if it could be obtained and saved in the sparse form then I can improve it by the existing iteration methods. Maybe the built-in pre-conditioners for large sparse matrices in Mathematica 8 could be good. I would be grateful if someone give me some hints to obtain an approximate inverse for such large sparse matrices.
Comments
Post a Comment