diff --git a/SimPEG/Data.py b/SimPEG/Data.py index fa37b09a..7a793065 100644 --- a/SimPEG/Data.py +++ b/SimPEG/Data.py @@ -56,12 +56,12 @@ class BaseData(object): Where P is a projection of the fields onto the data space. """ - if u is None: u = self.prob.field(m) - return Utils.mkvc(self.projectField(u)) + if u is None: u = self.prob.fields(m) + return Utils.mkvc(self.projectFields(u)) @Utils.count - def projectField(self, u): + def projectFields(self, u): """ This function projects the fields onto the data space. diff --git a/SimPEG/Examples/DC.py b/SimPEG/Examples/DC.py index 074f5e3d..ee8a427f 100644 --- a/SimPEG/Examples/DC.py +++ b/SimPEG/Examples/DC.py @@ -69,7 +69,7 @@ class DCProblem(Problem.BaseProblem): A = D*Msig*G return A.tocsc() - def field(self, m): + def fields(self, m): A = self.createMatrix(m) solve = Solver(A) phi = solve.solve(self.data.RHS) @@ -98,7 +98,7 @@ class DCProblem(Problem.BaseProblem): J(v) = - P ( A(m)^{-1} ( G\\text{sdiag}(Du)\\nabla_m(M(mT(m))) v ) ) """ if u is None: - u = self.field(m) + u = self.fields(m) u = self.data.reshapeFields(u) @@ -123,7 +123,7 @@ class DCProblem(Problem.BaseProblem): """Takes data, turns it into a model..ish""" if u is None: - u = self.field(m) + u = self.fields(m) u = self.data.reshapeFields(u) v = self.data.reshapeFields(v) @@ -214,7 +214,7 @@ if __name__ == '__main__': # Create some data data = prob.createSyntheticData(mSynth, std=0.05, P=P, RHS=q) - u = prob.field(mSynth) + u = prob.fields(mSynth) u = data.reshapeFields(u) M.plotImage(u[:,10]) plt.show() diff --git a/SimPEG/Examples/Linear.py b/SimPEG/Examples/Linear.py index a83b26f1..e18750c1 100644 --- a/SimPEG/Examples/Linear.py +++ b/SimPEG/Examples/Linear.py @@ -9,7 +9,7 @@ class LinearProblem(Problem.BaseProblem): Problem.BaseProblem.__init__(self, mesh, model, **kwargs) self.G = G - def field(self, m, u=None): + def fields(self, m, u=None): return self.G.dot(m) def J(self, m, v, u=None): diff --git a/SimPEG/ObjFunction.py b/SimPEG/ObjFunction.py index ea2fe831..91722b68 100644 --- a/SimPEG/ObjFunction.py +++ b/SimPEG/ObjFunction.py @@ -73,7 +73,7 @@ class BaseObjFunction(object): self.u_current = None self.m_current = m - u = self.data.prob.field(m) + u = self.data.prob.fields(m) self.u_current = u phi_d = self.dataObj(m, u=u) @@ -160,7 +160,7 @@ class BaseObjFunction(object): \\frac{\partial \mu_\\text{data}}{\partial \mathbf{m}} = \mathbf{J}^\\top \mathbf{W \circ R} """ - if u is None: u = self.data.prob.field(m) + if u is None: u = self.data.prob.fields(m) R = self.data.residualWeighted(m, u=u) @@ -204,7 +204,7 @@ class BaseObjFunction(object): \\frac{\partial^2 \mu_\\text{data}}{\partial^2 \mathbf{m}} = \mathbf{J}^\\top \mathbf{W \circ W J} """ - if u is None: u = self.data.prob.field(m) + if u is None: u = self.data.prob.fields(m) R = self.data.residualWeighted(m, u=u) diff --git a/SimPEG/Parameters.py b/SimPEG/Parameters.py index 2a07aa69..9b12d8d1 100644 --- a/SimPEG/Parameters.py +++ b/SimPEG/Parameters.py @@ -137,7 +137,7 @@ class BetaEstimate(Parameter): u = objFunc.u_current if u is None: - u = data.prob.field(m) + u = data.prob.fields(m) x0 = np.random.rand(*m.shape) t = x0.dot(objFunc.dataObj2Deriv(m,x0,u=u)) diff --git a/SimPEG/Problem.py b/SimPEG/Problem.py index 386fac9d..df37d05a 100644 --- a/SimPEG/Problem.py +++ b/SimPEG/Problem.py @@ -142,7 +142,7 @@ class BaseProblem(object): """ return self.Jt(m, v, u) - def field(self, m): + def fields(self, m): """ The field given the model.