work on IP stuff

This commit is contained in:
seogi_macbook
2015-09-15 15:40:26 -07:00
parent e0d9c27d87
commit dea7eba5e0
6 changed files with 592 additions and 589 deletions
+582 -578
View File
File diff suppressed because one or more lines are too long
+6 -7
View File
@@ -245,15 +245,15 @@ class ProblemDC_CC(Problem.BaseProblem):
dCdm_x_v[:, i] = dAdsig * dsigdm_x_v
# Take derivative of $C(m,u)$ w.r.t. $u$
dCdu = self.A
dA_du = self.A
# Solve for $\deriv{u}{m}$
# dCdu_inv = self.Solver(dCdu, **self.solverOpts)
if self.Ainv is None:
self.Ainv = self.Solver(dCdu, **self.solverOpts)
self.Ainv = self.Solver(dA_du, **self.solverOpts)
P = self.survey.getP(self.mesh)
J_x_v = - P * mkvc( self.Ainv * dCdm_x_v )
return J_x_v
Jv = - P * mkvc( self.Ainv * dCdm_x_v )
return Jv
def Jtvec(self, m, v, u=None):
@@ -271,12 +271,11 @@ class ProblemDC_CC(Problem.BaseProblem):
D = self.mesh.faceDiv
G = self.mesh.cellGrad
A = self.A
dA_du = self.A
mT_dm = self.mapping.deriv(m)
# We probably always need this due to the linesearch .. (?)
dCdu = A.T
self.Ainv = self.Solver(dCdu, **self.solverOpts)
self.Ainv = self.Solver(dA_du.T, **self.solverOpts)
# if self.Ainv is None:
# self.Ainv = self.Solver(dCdu, **self.solverOpts)
+1 -1
View File
@@ -1,6 +1,6 @@
import unittest
from SimPEG import *
import simpegDC as DC
import simpegDCIP as DC
class DCProblemTests(unittest.TestCase):
@@ -1,5 +1,5 @@
import unittest
import simpegDC as DC
import simpegDCIP as DC
class DCAnalyticTests(unittest.TestCase):
+1 -1
View File
@@ -1,5 +1,5 @@
import unittest
import simpegDC as DC
import simpegDCIP as DC
from SimPEG import *
from pymatsolver import MumpsSolver
+1 -1
View File
@@ -1,6 +1,6 @@
import unittest
from SimPEG import *
import simpegDC as DC
import simpegDCIP as DC
from pymatsolver import MumpsSolver