# Contents of /trunk/doc/examples/geotutorial/myfirstscript.py

Revision 2156 - (show annotations)
Mon Dec 15 05:09:02 2008 UTC (12 years, 9 months ago) by gross
File MIME type: text/x-python
File size: 1228 byte(s)
```some modifications to the iterative solver to make them easier to use.
There are also improved versions of the Darcy flux solver and the incompressible solver.

```
 1 ######################################################## 2 # 3 # Copyright (c) 2003-2008 by University of Queensland 4 # Earth Systems Science Computational Center (ESSCC) 5 6 # 7 # Primary Business: Queensland, Australia 8 # Licensed under the Open Software License version 3.0 9 10 # 11 ######################################################## 12 13 __copyright__="""Copyright (c) 2003-2008 by University of Queensland 14 Earth Systems Science Computational Center (ESSCC) 15 http://www.uq.edu.au/esscc 16 Primary Business: Queensland, Australia""" 17 __license__="""Licensed under the Open Software License version 3.0 18 19 __url__= 20 21 # get the tools we want to use 22 from esys.escript import * 23 from esys.finley import Rectangle 24 # some parameters 25 L0=1. 26 L1=1. 27 T_bot=100 28 # generate n0 x n1 elements over [0,l0] x [0,l1] 29 mydomain=Rectangle(l0=L0,l1=L1,n0=20,n1=20) 30 # print spatial dimension: 31 print "dimension = ",mydomain.getDim() 32 # get coordinates of points in domain: 33 x=mydomain.getX() 34 print x 35 # set a function 36 T_D=T_bot/L1*(L1-x[1]) 37 # save T_D for visualization with mayavi 38 saveVTK("u.xml",T=T_D)

 ViewVC Help Powered by ViewVC 1.1.26