/[escript]/trunk/doc/examples/geotutorial/myfirstscript.py
ViewVC logotype

Annotation of /trunk/doc/examples/geotutorial/myfirstscript.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2344 - (hide annotations)
Mon Mar 30 02:13:58 2009 UTC (10 years, 6 months ago) by jfenwick
File MIME type: text/x-python
File size: 1223 byte(s)
Change __url__ to launchpad site

1 gross 2156 ########################################################
2     #
3     # Copyright (c) 2003-2008 by University of Queensland
4     # Earth Systems Science Computational Center (ESSCC)
5     # http://www.uq.edu.au/esscc
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     ########################################################
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     http://www.opensource.org/licenses/osl-3.0.php"""
19 jfenwick 2344 __url__="https://launchpad.net/escript-finley"
20 gross 2156
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