1 |
# |
2 |
# $Id$ |
3 |
# |
4 |
####################################################### |
5 |
# |
6 |
# Copyright 2003-2007 by ACceSS MNRF |
7 |
# Copyright 2007 by University of Queensland |
8 |
# |
9 |
# http://esscc.uq.edu.au |
10 |
# Primary Business: Queensland, Australia |
11 |
# Licensed under the Open Software License version 3.0 |
12 |
# http://www.opensource.org/licenses/osl-3.0.php |
13 |
# |
14 |
####################################################### |
15 |
# |
16 |
|
17 |
__copyright__=""" Copyright (c) 2006, 2007 by ACcESS MNRF |
18 |
http://www.access.edu.au |
19 |
Primary Business: Queensland, Australia""" |
20 |
__license__="""Licensed under the Open Software License version 3.0 |
21 |
http://www.opensource.org/licenses/osl-3.0.php""" |
22 |
|
23 |
from esys.escript import * |
24 |
from esys.pycad import * |
25 |
from esys.pycad.gmsh import Design |
26 |
from esys.finley import MakeDomain |
27 |
|
28 |
|
29 |
p0=Point(0.,0.) |
30 |
p1=Point(1.,0.) |
31 |
p2=Point(1.,1.) |
32 |
p3=Point(0.,1.) |
33 |
|
34 |
l01=Line(p0,p1) |
35 |
l12=Line(p1,p2) |
36 |
l23=Line(p2,p3) |
37 |
l30=Line(p3,p0) |
38 |
|
39 |
s=PlaneSurface(CurveLoop(l01,l12,l23,l30)) |
40 |
des=Design(dim=2, order=1, element_size = 1, keep_files=True) |
41 |
des.addItems(s) |
42 |
|
43 |
dom=MakeDomain(des) |
44 |
dom.write("rec.fly") |