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

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

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

revision 4121 by gross, Tue Dec 18 04:49:37 2012 UTC revision 4122 by gross, Thu Dec 20 05:42:35 2012 UTC
# Line 67  domainbuilder.fixDensityBelow(depth=THIC Line 67  domainbuilder.fixDensityBelow(depth=THIC
67  inv=GravityInversion()  inv=GravityInversion()
68  inv.setSolverTolerance(1e-4)  inv.setSolverTolerance(1e-4)
69  inv.setSolverMaxIterations(50)  inv.setSolverMaxIterations(50)
 inv.setTradeOffFactors(mu_model=mu)  
70  inv.setup(domainbuilder)  inv.setup(domainbuilder)
71    inv.getCostFunction().setTradeOffFactorsModels(mu)
72    
73  rho_new=inv.run()  rho_new=inv.run()
74  print "rho_new = ",rho_new  print "rho_new = ",rho_new
75  print "rho =", source.getReferenceProperty()  print "rho =", source.getReferenceProperty()
76  g, chi = inv.getForwardModel().getSurvey(0)  g, chi = inv.getCostFunction().getForwardModels()[0].getSurvey(0)
77  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)
78    

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

  ViewVC Help
Powered by ViewVC 1.1.26