- rx.projectFields --> rx.eval

- rx.projectFieldsDeriv --> rx.evalDeriv
This commit is contained in:
Lindsey Heagy
2016-02-21 15:31:02 -08:00
parent 922bdf93e1
commit bcda60815e
14 changed files with 52 additions and 52 deletions
+2 -2
View File
@@ -204,8 +204,8 @@ class TDEM_bDerivTests(unittest.TestCase):
d = Survey.Data(survey,v=d_vec)
# Check that d.T*Q*f = f.T*Q.T*d
V1 = d_vec.dot(survey.projectFieldsDeriv(None, v=f).tovec())
V2 = f.tovec().dot(survey.projectFieldsDeriv(None, v=d, adjoint=True).tovec())
V1 = d_vec.dot(survey.evalDeriv(None, v=f).tovec())
V2 = f.tovec().dot(survey.evalDeriv(None, v=d, adjoint=True).tovec())
self.assertTrue((V1-V2)/np.abs(V1) < tol)
@@ -108,8 +108,8 @@ class TDEM_bDerivTests(unittest.TestCase):
d = Survey.Data(survey,v=d_vec)
# Check that d.T*Q*f = f.T*Q.T*d
V1 = d_vec.dot(survey.projectFieldsDeriv(None, v=f).tovec())
V2 = np.sum((f.tovec())*(survey.projectFieldsDeriv(None, v=d, adjoint=True).tovec()))
V1 = d_vec.dot(survey.evalDeriv(None, v=f).tovec())
V2 = np.sum((f.tovec())*(survey.evalDeriv(None, v=d, adjoint=True).tovec()))
self.assertTrue((V1-V2)/np.abs(V1) < 1e-6)
@@ -70,7 +70,7 @@ def appRes_TotalFieldNorm(sigmaHalf):
fields = problem.fields(sigma)
# Project the data
data = survey.projectFields(fields)
data = survey.eval(fields)
# Calculate the app res and phs
app_r = np.array(getAppResPhs(data))[:,0]
@@ -88,7 +88,7 @@ def appPhs_TotalFieldNorm(sigmaHalf):
fields = problem.fields(sigma)
# Project the data
data = survey.projectFields(fields)
data = survey.eval(fields)
# Calculate the app phs
app_p = np.array(getAppResPhs(data))[:,1]
@@ -106,7 +106,7 @@ def appRes_psFieldNorm(sigmaHalf):
fields = problem.fields(sigma)
# Project the data
data = survey.projectFields(fields)
data = survey.eval(fields)
# Calculate the app res and phs
app_r = np.array(getAppResPhs(data))[:,0]
@@ -124,7 +124,7 @@ def appPhs_psFieldNorm(sigmaHalf):
fields = problem.fields(sigma)
# Project the data
data = survey.projectFields(fields)
data = survey.eval(fields)
# Calculate the app phs
app_p = np.array(getAppResPhs(data))[:,1]
+1 -1
View File
@@ -210,7 +210,7 @@ def DerivProjfieldsTest(inputSetup,comp='All',freq=False):
f = problem.fieldsPair(survey.mesh,survey)
f[src,'e_pxSolution'] = u[:len(u)/2]
f[src,'e_pySolution'] = u[len(u)/2::]
return rx.projectFields(src,survey.mesh,f), lambda t: rx.projectFieldsDeriv(src,survey.mesh,f0,simpeg.mkvc(t,2))
return rx.eval(src,survey.mesh,f), lambda t: rx.evalDeriv(src,survey.mesh,f0,simpeg.mkvc(t,2))
return simpeg.Tests.checkDerivative(fun, u0, num=3, plotIt=False, eps=FLR)