/[escript]/trunk/downunder/test/python/run_magnetic2D.py
ViewVC logotype

Diff of /trunk/downunder/test/python/run_magnetic2D.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4121 by gross, Wed Dec 19 00:24:50 2012 UTC revision 4122 by gross, Thu Dec 20 05:42:35 2012 UTC
# Line 72  domainbuilder.fixSusceptibilityBelow(dep Line 72  domainbuilder.fixSusceptibilityBelow(dep
72  inv=MagneticInversion()  inv=MagneticInversion()
73  inv.setSolverTolerance(1e-4)  inv.setSolverTolerance(1e-4)
74  inv.setSolverMaxIterations(50)  inv.setSolverMaxIterations(50)
 inv.setTradeOffFactors(mu_model=mu)  
75  inv.setup(domainbuilder)  inv.setup(domainbuilder)
76    inv.getCostFunction().setTradeOffFactorsModels(mu)
77    
78  k_new=inv.run()  k_new=inv.run()
79  print "k_new = ",k_new  print "k_new = ",k_new
80  print "k =", source.getReferenceProperty()  print "k =", source.getReferenceProperty()
81  B, chi = inv.getForwardModel().getSurvey(0)  B, chi = inv.getCostFunction().getForwardModels()[0].getSurvey(0)
82  saveSilo(os.path.join(WORKDIR, 'maginv'), k=k_new, k_ref=source.getReferenceProperty(), B=B, chi=chi)  saveSilo(os.path.join(WORKDIR, 'maginv'), k=k_new, k_ref=source.getReferenceProperty(), B=B, chi=chi)
83    

Legend:
Removed from v.4121  
changed lines
  Added in v.4122

  ViewVC Help
Powered by ViewVC 1.1.26