mirror of
https://github.com/wassname/simpeg.git
synced 2026-06-27 19:48:52 +08:00
Solver in Problem Class, now bfgs uses that.
This commit is contained in:
@@ -63,9 +63,9 @@ class BaseInvProblem(object):
|
||||
|
||||
self.curModel = m0
|
||||
|
||||
print 'SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv. \n ***Done using direct methods***'
|
||||
self.opt.bfgsH0 = Solver(self.reg.eval2Deriv(self.curModel))
|
||||
|
||||
print """SimPEG.InvProblem is setting bfgsH0 to the inverse of the eval2Deriv.
|
||||
***Done using same solver as the problem***"""
|
||||
self.opt.bfgsH0 = self.prob.Solver(self.reg.eval2Deriv(self.curModel))
|
||||
|
||||
@property
|
||||
def warmstart(self):
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import Utils, Survey, Models, numpy as np, scipy.sparse as sp
|
||||
Solver = Utils.SolverUtils.Solver
|
||||
import Maps, Mesh
|
||||
|
||||
|
||||
@@ -286,6 +287,9 @@ class BaseProblem(object):
|
||||
surveyPair = Survey.BaseSurvey #: A SimPEG.Survey Class
|
||||
mapPair = Maps.IdentityMap #: A SimPEG.Map Class
|
||||
|
||||
Solver = Solver #: A SimPEG Solver class.
|
||||
solverOpts = {} #: Sovler options as a kwarg dict
|
||||
|
||||
mapping = None #: A SimPEG.Map instance.
|
||||
mesh = None #: A SimPEG.Mesh instance.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user