From e98e41f34c510d0fc52942df8cb11881a08467e6 Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Fri, 15 Nov 2013 10:10:10 -0800 Subject: [PATCH] dpred --- SimPEG/forward/Richards.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/SimPEG/forward/Richards.py b/SimPEG/forward/Richards.py index d6d268be..780902ab 100644 --- a/SimPEG/forward/Richards.py +++ b/SimPEG/forward/Richards.py @@ -86,6 +86,20 @@ class RichardsProblem(Problem): self.doNewton = False # This also sets the rootFinder algorithm. setKwargs(self, **kwargs) + def dpred(self, m, u=None): + """ + Predicted data. + + .. math:: + d_\\text{pred} = Pu(m) + """ + if u is None: + u = self.field(m) + u = np.concatenate(u[1:]) + if self.dataType is 'saturation': + u = self.empirical.moistureContent(u) + return self.P*u + def field(self, m): self.empirical.setModel(m) Hs = range(self.numIts+1)