Update IRLS directive to allow multiple GN iterations.

Remove modifications to the ProjGN solver.
Update IRLS example.
This commit is contained in:
D Fournier
2016-05-27 13:11:31 -07:00
parent fd3bde787f
commit 022e1f7660
4 changed files with 121 additions and 159 deletions
+7 -7
View File
@@ -20,7 +20,7 @@ def run(N=200, plotIt=True):
m0 = np.ones(mesh.nC) * 1e-4
mref = np.zeros(mesh.nC)
nk = 10
nk = 15
jk = np.linspace(1.,nk,nk)
p = -2.
q = 1.
@@ -59,7 +59,7 @@ def run(N=200, plotIt=True):
dmis = DataMisfit.l2_DataMisfit(survey)
dmis.Wd = 1./wd
opt = Optimization.ProjectedGNCG(maxIter=20,lower=-2.,upper=2., maxIterCG= 10, maxIterGN=1, tolCG = 1e-4)
opt = Optimization.ProjectedGNCG(maxIter=20,lower=-2.,upper=2., maxIterCG= 10, tolCG = 1e-4)
invProb = InvProblem.BaseInvProblem(dmis, reg, opt)
invProb.curModel = m0
@@ -83,18 +83,18 @@ def run(N=200, plotIt=True):
reg.cell_weights = wr
reg.mref = np.zeros(mesh.nC)
reg.eps_p = 5e-2
reg.eps_p = 1e-3
reg.eps_q = 1e-2
reg.norms = [0., 0., 2., 2.]
opt = Optimization.ProjectedGNCG(maxIter=10 ,lower=-2.,upper=2., maxIterLS = 20, maxIterCG= 10, tolCG = 1e-3)
opt = Optimization.ProjectedGNCG(maxIter=100 ,lower=-2.,upper=2., maxIterLS = 20, maxIterCG= 10, tolCG = 1e-3)
invProb = InvProblem.BaseInvProblem(dmis, reg, opt, beta = invProb.beta*2.)
beta = Directives.BetaSchedule(coolingFactor=1, coolingRate=1)
#betaest = Directives.BetaEstimate_ByEig()
update_beta = Directives.Scale_Beta(tol = 0.05, coolingRate=5)
target = Directives.TargetMisfit()
IRLS =Directives.Update_IRLS( phi_m_last = phim, phi_d_last = phid )
IRLS = Directives.Update_IRLS( phi_m_last = phim, phi_d_last = phid, coolingRate=5 )
inv = Inversion.BaseInversion(invProb, directiveList=[beta,IRLS])
inv = Inversion.BaseInversion(invProb, directiveList=[beta,IRLS,update_beta])
m0 = mrec