1 |
######################################################## |
2 |
# |
3 |
# Copyright (c) 2003-2009 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 |
__url__="https://launchpad.net/escript-finley" |
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 visualisation |
38 |
saveVTK("u.vtu",T=T_D) |
39 |
|