mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-19 11:28:00 +08:00
Moved Regularization to inverse package.
This commit is contained in:
@@ -168,7 +168,6 @@ def genTxRxmat(nelec, spacelec, surfloc, elecini, mesh):
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
from SimPEG.regularization import Regularization
|
||||
from SimPEG import inverse
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
@@ -217,7 +216,7 @@ if __name__ == '__main__':
|
||||
m0 = mesh.gridCC[:,0]*0+sig2
|
||||
|
||||
opt = inverse.InexactGaussNewton(maxIterLS=20, maxIter=10, tolF=1e-6, tolX=1e-6, tolG=1e-6, maxIterCG=6)
|
||||
reg = Regularization(mesh)
|
||||
reg = inverse.Regularization(mesh)
|
||||
inv = inverse.Inversion(problem, reg, opt, beta0=1e4)
|
||||
|
||||
# Check Derivative
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from SimPEG import mesh, forward, inverse, regularization, np
|
||||
from SimPEG import mesh, forward, inverse, np
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ if __name__ == '__main__':
|
||||
prob, data = example(100)
|
||||
M = prob.mesh
|
||||
|
||||
reg = regularization.Regularization(M)
|
||||
reg = inverse.Regularization(M)
|
||||
opt = inverse.InexactGaussNewton(maxIter=20)
|
||||
inv = inverse.Inversion(prob,reg,opt,data)
|
||||
m0 = np.zeros_like(data.mtrue)
|
||||
|
||||
Reference in New Issue
Block a user