mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-15 11:26:09 +08:00
Merge branch 'master' of https://bitbucket.org/rcockett/simpeg into richards
Conflicts: SimPEG/inverse/Optimize.py SimPEG/regularization/Regularization.py
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from SimPEG.utils import sdiag
|
||||
from SimPEG.utils import sdiag, count, timeIt
|
||||
import numpy as np
|
||||
|
||||
class Regularization(object):
|
||||
@@ -40,21 +40,20 @@ class Regularization(object):
|
||||
self._Wz = sdiag(a)*self.mesh.cellGradz
|
||||
return self._Wz
|
||||
|
||||
alpha_s = 1e-6
|
||||
alpha_x = 1
|
||||
alpha_y = 1
|
||||
alpha_z = 1
|
||||
|
||||
counter = None
|
||||
|
||||
def __init__(self, mesh):
|
||||
self.mesh = mesh
|
||||
self._Wx = None
|
||||
self._Wy = None
|
||||
self._Wz = None
|
||||
self.alpha_s = 1e-6
|
||||
self.alpha_x = 1
|
||||
self.alpha_y = 1
|
||||
self.alpha_z = 1
|
||||
|
||||
def pnorm(self, r):
|
||||
return 0.5*r.dot(r)
|
||||
|
||||
@timeIt
|
||||
def modelObj(self, m):
|
||||
mresid = m - self.mref
|
||||
|
||||
@@ -69,6 +68,7 @@ class Regularization(object):
|
||||
|
||||
return mobj
|
||||
|
||||
@timeIt
|
||||
def modelObjDeriv(self, m):
|
||||
"""
|
||||
|
||||
@@ -104,6 +104,7 @@ class Regularization(object):
|
||||
return mobjDeriv
|
||||
|
||||
|
||||
@timeIt
|
||||
def modelObj2Deriv(self):
|
||||
|
||||
mobj2Deriv = self.alpha_s * self.Ws.T * self.Ws
|
||||
|
||||
Reference in New Issue
Block a user