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

Contents of /trunk/downunder/test/python/run_gravity.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3981 - (show annotations)
Fri Sep 21 02:47:54 2012 UTC (7 years, 1 month ago) by jfenwick
File MIME type: text/x-python
File size: 1814 byte(s)
First pass of updating copyright notices
1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2012 by University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development since 2012 by School of Earth Sciences
13 #
14 ##############################################################################
15
16 __copyright__="""Copyright (c) 2003-2012 by University of Queensland
17 http://www.uq.edu.au
18 Primary Business: Queensland, Australia"""
19 __license__="""Licensed under the Open Software License version 3.0
20 http://www.opensource.org/licenses/osl-3.0.php"""
21 __url__="https://launchpad.net/escript-finley"
22
23 import logging
24 import os
25 from esys.escript import unitsSI as U
26 from esys.downunder.datasources import SyntheticDataSource,SmoothAnomaly
27 from esys.downunder.inversions import GravityInversion
28
29
30 try:
31 WORKDIR=os.environ['DOWNUNDER_WORKDIR']
32 except KeyError:
33 WORKDIR='.'
34
35 features=[SmoothAnomaly(lx=50*U.km, ly=20*U.km, lz=40*U.km, \
36 x=100*U.km, y=3*U.km, depth=25*U.km, rho_inner=200., rho_outer=1e-6),\
37 SmoothAnomaly(lx=50*U.km, ly=20*U.km, lz=40*U.km,
38 x=400*U.km, y=1*U.km, depth=40*U.km, rho_inner=-200, rho_outer=1e-6)]
39
40 logger=logging.getLogger('inv')
41 logger.setLevel(logging.INFO)
42 handler=logging.StreamHandler()
43 handler.setLevel(logging.INFO)
44 logger.addHandler(handler)
45 source=SyntheticDataSource(DIM=2, NE=20, l=500*U.km, h=60*U.km, features=features)
46 source.setPadding(5, 0.1)
47 inv=GravityInversion()
48 inv.setDataSource(source)
49 inv.setSolverTolerance(1e-5)
50 inv.setSolverMaxIterations(100)
51 inv.setSolverOptions(initialHessian=100)
52 inv.setup()
53 rho_new=inv.run()
54

  ViewVC Help
Powered by ViewVC 1.1.26