mirror of
https://github.com/wassname/simpeg.git
synced 2026-08-03 13:10:16 +08:00
Moved Regularization to inverse package.
This commit is contained in:
@@ -6,7 +6,6 @@ from SimPEG.forward import Problem
|
||||
from SimPEG.examples.DC import *
|
||||
from TestUtils import checkDerivative
|
||||
from scipy.sparse.linalg import dsolve
|
||||
from SimPEG.regularization import Regularization
|
||||
from SimPEG import inverse
|
||||
|
||||
|
||||
@@ -48,7 +47,7 @@ class DCProblemTests(unittest.TestCase):
|
||||
|
||||
# Now set up the problem to do some minimization
|
||||
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, data, beta0=1e4)
|
||||
|
||||
self.inv = inv
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import numpy as np
|
||||
import unittest
|
||||
from SimPEG.mesh import TensorMesh
|
||||
from SimPEG.forward import Problem
|
||||
from SimPEG.regularization import Regularization
|
||||
from SimPEG import mesh, forward, inverse
|
||||
from TestUtils import checkDerivative
|
||||
from scipy.sparse.linalg import dsolve
|
||||
|
||||
@@ -14,9 +12,9 @@ class ProblemTests(unittest.TestCase):
|
||||
a = np.array([1, 1, 1])
|
||||
b = np.array([1, 2])
|
||||
c = np.array([1, 4])
|
||||
self.mesh2 = TensorMesh([a, b], np.array([3, 5]))
|
||||
self.p2 = Problem(self.mesh2)
|
||||
self.reg = Regularization(self.mesh2)
|
||||
self.mesh2 = mesh.TensorMesh([a, b], np.array([3, 5]))
|
||||
self.p2 = forward.Problem(self.mesh2)
|
||||
self.reg = inverse.Regularization(self.mesh2)
|
||||
|
||||
def test_modelTransform(self):
|
||||
print 'SimPEG.forward.Problem: Testing Model Transform'
|
||||
|
||||
Reference in New Issue
Block a user