/[escript]/trunk/doc/examples/inversion/gravityinversion.py
ViewVC logotype

Diff of /trunk/doc/examples/inversion/gravityinversion.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 40  db.addSource(source) Line 40  db.addSource(source)
40  db.setVerticalExtents(depth=DEPTH, air_layer=AIR, num_cells=NE_Z)  db.setVerticalExtents(depth=DEPTH, air_layer=AIR, num_cells=NE_Z)
41  db.setFractionalPadding(PAD_X, PAD_Y)  db.setFractionalPadding(PAD_X, PAD_Y)
42  db.fixDensityBelow(depth=DEPTH)  db.fixDensityBelow(depth=DEPTH)
43  db.setTradeOffFactors(mu_model=10)  
44    
45    
46    
47  inv=GravityInversion()  inv=GravityInversion()
48  inv.setup(db)  inv.setup(db)
49  g, w = inv.getForwardModel().getSurvey(0)  inv.getCostFunction().setTradeOffFactorsModels(10.)
50    
51  density=inv.run()  density=inv.run()
52    
53  # Save results  # Save results
54    g, w =  inv.getCostFunction().getForwardModels()[0].getSurvey(0)
55  saveSilo("result.silo", density=density, gravity_anomaly=g[2], gravity_weight=w[2])  saveSilo("result.silo", density=density, gravity_anomaly=g[2], gravity_weight=w[2])
56    

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

  ViewVC Help
Powered by ViewVC 1.1.26