Skip to content

Commit

Permalink
removed comment block and made deriv mD2 term consistent with eval call
Browse files Browse the repository at this point in the history
  • Loading branch information
lheagy committed Jul 4, 2015
1 parent 0b5453d commit 9900885
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions SimPEG/Regularization.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,6 @@ def W(self):
"""Full regularization matrix W"""
if getattr(self, '_W', None) is None:
wlist = (self.Ws, self.Wsmooth)
# if self.mesh.dim > 1:
# wlist += (self.Wy, self.Wyy)
# if self.mesh.dim > 2:
# wlist += (self.Wz, self.Wzz)
self._W = sp.vstack(wlist)
return self._W

Expand Down Expand Up @@ -314,12 +310,12 @@ def evalDeriv(self, m):
"""
if self.smoothModel == True:
mD1 = self.mapping.deriv(m)
mD2 = self.mapping.deriv(self.mref)
mD2 = self.mapping.deriv(m - self.mref)
r1 = self.Wsmooth * ( self.mapping * (m))
r2 = self.Ws * ( self.mapping * (m - self.mref) )
out1 = mD1.T * ( self.Wsmooth.T * r1 )
out2 = mD2.T * ( self.Ws.T * r2 )
out = out1-out2
out = out1+out2
elif self.smoothModel == False:
mD = self.mapping.deriv(m - self.mref)
r = self.W * ( self.mapping * (m - self.mref) )
Expand Down

0 comments on commit 9900885

Please sign in to comment.