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

Diff of /trunk/downunder/test/python/run_magnetic3D.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 68  domainbuilder.setPadding(l_pad) Line 68  domainbuilder.setPadding(l_pad)
68  domainbuilder.fixSusceptibilityBelow(depth=THICKNESS+depth_offset)  domainbuilder.fixSusceptibilityBelow(depth=THICKNESS+depth_offset)
69    
70  inv=MagneticInversion()  inv=MagneticInversion()
71    inv.setup(domainbuilder)
72  inv.setSolverTolerance(1e-4)  inv.setSolverTolerance(1e-4)
73  inv.setSolverMaxIterations(10)  inv.setSolverMaxIterations(10)
74  inv.setTradeOffFactors(mu_model=mu)  inv.getCostFunction().setTradeOffFactorsModels(mu)
 inv.setup(domainbuilder)  
75    
76  k_new=inv.run()  k_new=inv.run()
77  print "k_new = ",k_new  print "k_new = ",k_new
78  print "k =", source.getReferenceProperty()  print "k =", source.getReferenceProperty()
79  B, chi = inv.getForwardModel().getSurvey(0)  B, chi = inv.getCostFunction().getForwardModels()[0].getSurvey(0)
80  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)
81    

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

  ViewVC Help
Powered by ViewVC 1.1.26