getIndicesBlock typo.

This commit is contained in:
Rowan Cockett
2016-02-04 09:16:14 -08:00
parent 2a84f1556e
commit 9b65fa80c9
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -6,7 +6,7 @@ from pymatsolver import MumpsSolver
class IPforwardTests(unittest.TestCase):
def test_IPforward(self):
cs = 12.5
nc = 500/cs+1
hx = [(cs,7, -1.3),(cs,nc),(cs,7, 1.3)]
@@ -17,7 +17,7 @@ class IPforwardTests(unittest.TestCase):
sigma = np.ones(mesh.nC)*sighalf
p0 = np.r_[-50., 50., -50.]
p1 = np.r_[ 50.,-50., -150.]
blk_ind = Utils.ModelBuilder.getIndecesBlock(p0, p1, mesh.gridCC)
blk_ind = Utils.ModelBuilder.getIndicesBlock(p0, p1, mesh.gridCC)
sigma[blk_ind] = 1e-3
eta = np.zeros_like(sigma)
eta[blk_ind] = 0.1
@@ -36,7 +36,7 @@ class IPforwardTests(unittest.TestCase):
problem = DC.ProblemDC_CC(mesh, mapping= imap )
problem.Solver = MumpsSolver
problem.pair(survey)
phi0 = survey.dpred(sigma0)
phiInf = survey.dpred(sigmaInf)
@@ -49,7 +49,7 @@ class IPforwardTests(unittest.TestCase):
phiIP_approx = surveyIP.dpred(eta)
err = np.linalg.norm(phiIP_true-phiIP_approx) / np.linalg.norm(phiIP_true)
self.assertTrue(err < 0.02)
+1 -1
View File
@@ -19,7 +19,7 @@ class IPProblemTests(unittest.TestCase):
sigma = np.ones(mesh.nC)*sighalf
p0 = np.r_[-50., 50., -50.]
p1 = np.r_[ 50.,-50., -150.]
blk_ind = Utils.ModelBuilder.getIndecesBlock(p0, p1, mesh.gridCC)
blk_ind = Utils.ModelBuilder.getIndicesBlock(p0, p1, mesh.gridCC)
sigma[blk_ind] = 1e-3
eta = np.zeros_like(sigma)
eta[blk_ind] = 0.1