/[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 4108 by caltinay, Thu Dec 13 06:38:11 2012 UTC revision 4115 by gross, Fri Dec 14 04:48:48 2012 UTC
# Line 44  logger.setLevel(logging.DEBUG) Line 44  logger.setLevel(logging.DEBUG)
44  handler=logging.StreamHandler()  handler=logging.StreamHandler()
45  handler.setLevel(logging.DEBUG)  handler.setLevel(logging.DEBUG)
46  logger.addHandler(handler)  logger.addHandler(handler)
47  source=SyntheticFeatureData(DataSource.GRAVITY, DIM=2, NE=220, l=100*U.km, features=features)  source=SyntheticFeatureData(DataSource.GRAVITY, DIM=2, number_of_elements=220, length=100*U.km, features=features)
48  domainbuilder=DomainBuilder(dim=2)  domainbuilder=DomainBuilder(dim=2)
49  domainbuilder.addSource(source)  domainbuilder.addSource(source)
50  domainbuilder.setElementPadding(20)  domainbuilder.setElementPadding(20)
# Line 58  inv.setup(domainbuilder) Line 58  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.getReferenceDensity()  print "rho =", source.getReferenceProperty()
62  g, chi = inv.getForwardModel().getSurvey(0)  g, chi = inv.getForwardModel().getSurvey(0)
63  saveSilo(os.path.join(WORKDIR, 'gravinv'), density=rho_new, density_ref=source.getReferenceDensity(), 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.4108  
changed lines
  Added in v.4115

  ViewVC Help
Powered by ViewVC 1.1.26