Merge branch 'dcip/spectralIP' of https://github.com/simpeg/simpeg into dcip/dev

Merge spectral IP stuff, and incorporate Lindsey's comments
This commit is contained in:
seogi_macbook
2016-05-25 14:22:58 -07:00
12 changed files with 1162 additions and 36 deletions
+3 -14
View File
@@ -77,7 +77,7 @@ class BaseDCProblem(BaseEMProblem):
dA_dmT = self.getADeriv(u_src, ATinvdf_duT, adjoint=True)
dRHS_dmT = self.getRHSDeriv(src, ATinvdf_duT, adjoint=True)
du_dmT = -dA_dmT + dRHS_dmT
Jtv += df_dmT + du_dmT
Jtv += (df_dmT + du_dmT).astype(float)
return Utils.mkvc(Jtv)
@@ -122,13 +122,12 @@ class Problem3D_CC(BaseDCProblem):
Make the A matrix for the cell centered DC resistivity problem
A = D MfRhoI D^\\top V
A = D MfRhoI G
"""
D = self.Div
G = self.Grad
# TODO: this won't work for full anisotropy
MfRhoI = self.MfRhoI
A = D * MfRhoI * G
@@ -144,13 +143,8 @@ class Problem3D_CC(BaseDCProblem):
MfRhoIDeriv = self.MfRhoIDeriv
if adjoint:
# if self._makeASymmetric is True:
# v = V * v
return(MfRhoIDeriv( G * u ).T) * ( D.T * v)
# I think we should deprecate this for DC problem.
# if self._makeASymmetric is True:
# return V.T * ( D * ( MfRhoIDeriv( D.T * ( V * u ) ) * v ) )
return D * (MfRhoIDeriv( G * u ) * v)
def getRHS(self):
@@ -162,10 +156,6 @@ class Problem3D_CC(BaseDCProblem):
RHS = self.getSourceTerm()
# I think we should deprecate this for DC problem.
# if self._makeASymmetric is True:
# return self.Vol.T * RHS
return RHS
def getRHSDeriv(self, src, v, adjoint=False):
@@ -255,11 +245,10 @@ class Problem3D_N(BaseDCProblem):
Make the A matrix for the cell centered DC resistivity problem
A = D MfRhoI D^\\top V
A = G.T MeSigma G
"""
# TODO: this won't work for full anisotropy
MeSigma = self.MeSigma
Grad = self.mesh.nodalGrad
A = Grad.T * MeSigma * Grad