mirror of
https://github.com/wassname/simpeg.git
synced 2026-07-12 11:41:32 +08:00
callHooks generalizes some of the hook calling code in Optimize and Inversion
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from SimPEG.utils import sdiag, count, timeIt
|
||||
from SimPEG.utils import sdiag, count, timeIt, setKwargs
|
||||
import numpy as np
|
||||
|
||||
class Regularization(object):
|
||||
@@ -41,15 +41,17 @@ class Regularization(object):
|
||||
return self._Wz
|
||||
|
||||
alpha_s = 1e-6
|
||||
alpha_x = 1
|
||||
alpha_y = 1
|
||||
alpha_z = 1
|
||||
alpha_x = 1.0
|
||||
alpha_y = 1.0
|
||||
alpha_z = 1.0
|
||||
|
||||
counter = None
|
||||
|
||||
def __init__(self, mesh):
|
||||
def __init__(self, mesh, **kwargs):
|
||||
setKwargs(self, **kwargs)
|
||||
self.mesh = mesh
|
||||
|
||||
|
||||
def pnorm(self, r):
|
||||
return 0.5*r.dot(r)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user