mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-30 15:00:41 +08:00
change to Jvec and Jtvec
This commit is contained in:
@@ -164,7 +164,7 @@ class BaseObjFunction(object):
|
||||
|
||||
R = self.data.residualWeighted(m, u=u)
|
||||
|
||||
dmisfit = self.data.prob.Jt(m, self.data.Wd * R, u=u)
|
||||
dmisfit = self.data.prob.Jtvec(m, self.data.Wd * R, u=u)
|
||||
|
||||
return dmisfit
|
||||
|
||||
@@ -209,7 +209,7 @@ class BaseObjFunction(object):
|
||||
R = self.data.residualWeighted(m, u=u)
|
||||
|
||||
# TODO: abstract to different norms a little cleaner.
|
||||
# \/ it goes here. in l2 it is the identity.
|
||||
dmisfit = self.data.prob.Jt_approx(m, self.data.Wd * self.data.Wd * self.data.prob.J_approx(m, v, u=u), u=u)
|
||||
# \/ it goes here. in l2 it is the identity.
|
||||
dmisfit = self.data.prob.Jtvec_approx(m, self.data.Wd * self.data.Wd * self.data.prob.Jvec_approx(m, v, u=u), u=u)
|
||||
|
||||
return dmisfit
|
||||
|
||||
+6
-6
@@ -70,7 +70,7 @@ class BaseProblem(object):
|
||||
def ispaired(self): return self.data is not None
|
||||
|
||||
@Utils.timeIt
|
||||
def J(self, m, v, u=None):
|
||||
def Jvec(self, m, v, u=None):
|
||||
"""
|
||||
:param numpy.array m: model
|
||||
:param numpy.array v: vector to multiply
|
||||
@@ -100,7 +100,7 @@ class BaseProblem(object):
|
||||
raise NotImplementedError('J is not yet implemented.')
|
||||
|
||||
@Utils.timeIt
|
||||
def Jt(self, m, v, u=None):
|
||||
def Jtvec(self, m, v, u=None):
|
||||
"""
|
||||
:param numpy.array m: model
|
||||
:param numpy.array v: vector to multiply
|
||||
@@ -114,7 +114,7 @@ class BaseProblem(object):
|
||||
|
||||
|
||||
@Utils.timeIt
|
||||
def J_approx(self, m, v, u=None):
|
||||
def Jvec_approx(self, m, v, u=None):
|
||||
"""
|
||||
|
||||
:param numpy.array m: model
|
||||
@@ -126,10 +126,10 @@ class BaseProblem(object):
|
||||
Approximate effect of J on a vector v
|
||||
|
||||
"""
|
||||
return self.J(m, v, u)
|
||||
return self.Jvec(m, v, u)
|
||||
|
||||
@Utils.timeIt
|
||||
def Jt_approx(self, m, v, u=None):
|
||||
def Jtvec_approx(self, m, v, u=None):
|
||||
"""
|
||||
:param numpy.array m: model
|
||||
:param numpy.array v: vector to multiply
|
||||
@@ -140,7 +140,7 @@ class BaseProblem(object):
|
||||
Approximate transpose of J*v
|
||||
|
||||
"""
|
||||
return self.Jt(m, v, u)
|
||||
return self.Jtvec(m, v, u)
|
||||
|
||||
def fields(self, m):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user