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

Diff of /trunk/downunder/test/python/run_gravity.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 51  domainbuilder.setElementPadding(20) Line 51  domainbuilder.setElementPadding(20)
51  domainbuilder.setVerticalExtents(depth=50*U.km, air_layer=20*U.km, num_cells=25)  domainbuilder.setVerticalExtents(depth=50*U.km, air_layer=20*U.km, num_cells=25)
52    
53  inv=GravityInversion()  inv=GravityInversion()
54    inv.setup(domainbuilder)
55  inv.setSolverTolerance(1e-4)  inv.setSolverTolerance(1e-4)
56  inv.setSolverMaxIterations(40)  inv.setSolverMaxIterations(40)
57  inv.setTradeOffFactors(mu_model=10.)  inv.getCostFunction().setTradeOffFactorsModels(10)
 inv.setup(domainbuilder)  
58    
59  rho_new=inv.run()  rho_new=inv.run()
60  print "rho_new = ",rho_new  print "rho_new = ",rho_new
61  print "rho =", source.getReferenceProperty()  print "rho =", source.getReferenceProperty()
62  g, chi = inv.getForwardModel().getSurvey(0)  g, chi = inv.getCostFunction().getForwardModels()[0].getSurvey(0)
63  saveSilo(os.path.join(WORKDIR, 'gravinv'), density=rho_new, density_ref=source.getReferenceProperty(), g=g, chi=chi)  saveSilo(os.path.join(WORKDIR, 'gravinv'), density=rho_new, density_ref=source.getReferenceProperty(), g=g, chi=chi)
64    

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

  ViewVC Help
Powered by ViewVC 1.1.26