mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-19 11:28:00 +08:00
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:
@@ -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 )
|
||||
|
||||
Reference in New Issue
Block a user