1 |
|
2 |
######################################################## |
3 |
# |
4 |
# Copyright (c) 2003-2009 by University of Queensland |
5 |
# Earth Systems Science Computational Center (ESSCC) |
6 |
# http://www.uq.edu.au/esscc |
7 |
# |
8 |
# Primary Business: Queensland, Australia |
9 |
# Licensed under the Open Software License version 3.0 |
10 |
# http://www.opensource.org/licenses/osl-3.0.php |
11 |
# |
12 |
######################################################## |
13 |
|
14 |
__copyright__="""Copyright (c) 2003-2009 by University of Queensland |
15 |
Earth Systems Science Computational Center (ESSCC) |
16 |
http://www.uq.edu.au/esscc |
17 |
Primary Business: Queensland, Australia""" |
18 |
__license__="""Licensed under the Open Software License version 3.0 |
19 |
http://www.opensource.org/licenses/osl-3.0.php""" |
20 |
__url__="https://launchpad.net/escript-finley" |
21 |
|
22 |
""" |
23 |
a simple 1x1 quad` |
24 |
|
25 |
:var __author__: name of author |
26 |
:var __licence__: licence agreement |
27 |
:var __url__: url entry point on documentation |
28 |
:var __version__: version |
29 |
:var __date__: date of the version |
30 |
""" |
31 |
|
32 |
__author__="Lutz Gross, l.gross@uq.edu.au" |
33 |
|
34 |
from esys.pycad import * |
35 |
from esys.pycad.gmsh import Design |
36 |
from esys.finley import MakeDomain |
37 |
p0=Point(0.,0.,0.) |
38 |
p1=Point(1.,0.,0.) |
39 |
p2=Point(1.,1.,0.) |
40 |
p3=Point(0.,1.,0.) |
41 |
l01=Line(p0,p1) |
42 |
l12=Line(p1,p2) |
43 |
l23=Line(p2,p3) |
44 |
l30=Line(p3,p0) |
45 |
c=CurveLoop(l01,l12,l23,l30) |
46 |
s=PlaneSurface(c) |
47 |
|
48 |
|
49 |
d=Design(dim=2,element_size=0.05) |
50 |
d.setScriptFileName("quad.geo") |
51 |
d.setMeshFileName("quad.msh") |
52 |
d.addItems(s) |
53 |
|
54 |
pl1=PropertySet("sides",l01,l23) |
55 |
pl2=PropertySet("top_and_bottom",l12,l30) |
56 |
d.addItems(pl1,pl2) |
57 |
|
58 |
dom=MakeDomain(d) |
59 |
dom.write("quad.fly") |