MeatClasses to make every SimPEG object saveable to an hdf5 file.

cleaned up imports in a lot of places.
Made solver not copy matrices around for GS preconditioning.
This commit is contained in:
rowanc1
2013-12-06 11:23:01 -08:00
parent c1767939bb
commit 5e0fb8642d
9 changed files with 188 additions and 76 deletions
+2 -4
View File
@@ -73,11 +73,9 @@ class Solver(object):
Jacobi = sdiag(1.0/M[1].diagonal())
options['M'] = Jacobi
elif M[0] is 'GS':
LL = sp.tril(M[1])
UU = sp.triu(M[1])
DD = sdiag(M[1].diagonal())
Uinv = Solver(UU, flag='U')
Linv = Solver(LL, flag='L')
Uinv = Solver(M[1], flag='U')
Linv = Solver(M[1], flag='L')
def GS(f):
return Uinv.solve(DD*Linv.solve(f))
options['M'] = sp.linalg.LinearOperator( A.shape, GS, dtype=A.dtype )