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

Diff of /trunk/doc/examples/inversion/strong_gravmag_netcdf.py

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

revision 4535 by gross, Wed Nov 20 06:37:53 2013 UTC revision 4561 by caltinay, Wed Dec 4 05:19:32 2013 UTC
# Line 72  def work(): Line 72  def work():
72    
73    g, wg = db.getGravitySurveys()[0]    g, wg = db.getGravitySurveys()[0]
74    B, wB = db.getMagneticSurveys()[0]    B, wB = db.getMagneticSurveys()[0]
75    if saveSilo("result_gravmag.silo", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB):    if saveSilo("result_gravmag_strong.silo", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB):
76        print("Results saved in result_gravmag.silo")        print("Results saved in result_gravmag_strong.silo")
77    else:    else:
78        print("Failed to save result_gravmag.silo. Possibly no Silo support.")        print("Failed to save silo file. Possibly no Silo support.")
79    
80    saveVTK("result_gravmag.vtu", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB)    saveVTK("result_gravmag_strong.vtu", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB)
81    print("Results saved in result_gravmag.vtu")    print("Results saved in result_gravmag_strong.vtu")
   
   saveDataCSV("result_gravmag.csv", density=density, susceptibility=susceptibility, x=susceptibility.getFunctionSpace().getX())  
   print("Results saved in result_gravmag.csv")  
82    
83    print("All done. Have a nice day!")    print("All done. Have a nice day!")
84    

Legend:
Removed from v.4535  
changed lines
  Added in v.4561

  ViewVC Help
Powered by ViewVC 1.1.26