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

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

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

revision 6811 by aellery, Wed May 1 07:03:46 2019 UTC revision 6812 by aellery, Fri May 3 00:36:47 2019 UTC
# Line 76  def work(): Line 76  def work():
76    
77    g, wg = db.getGravitySurveys()[0]    g, wg = db.getGravitySurveys()[0]
78    B, wB = db.getMagneticSurveys()[0]    B, wB = db.getMagneticSurveys()[0]
79    try:    if saveSilo("result_gravmag.silo", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB):
80        if saveSilo("result_gravmag.silo", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB):        print("Results saved in result_gravmag.silo")
81            print("Results saved in result_gravmag.silo")    else:
   except:  
82        print("Failed to save result_gravmag.silo. Possibly no Silo support.")        print("Failed to save result_gravmag.silo. Possibly no Silo support.")
83    
84    saveVTK("result_gravmag.vtu", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB)    saveVTK("result_gravmag.vtu", density=density, gravity_anomaly=g, gravity_weight=wg, susceptibility=susceptibility, magnetic_anomaly=B,   magnetic_weight=wB)

Legend:
Removed from v.6811  
changed lines
  Added in v.6812

  ViewVC Help
Powered by ViewVC 1.1.26