/[escript]/trunk/pycad/examples/quad.py
ViewVC logotype

Contents of /trunk/pycad/examples/quad.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1338 - (show annotations)
Mon Nov 5 06:32:29 2007 UTC (11 years, 9 months ago) by gross
File MIME type: text/x-python
File size: 1327 byte(s)
bug in the selection of the order of the output mesh fixed.
1 """
2 a simple 1x1 quad`
3
4 @var __author__: name of author
5 @var __licence__: licence agreement
6 @var __url__: url entry point on documentation
7 @var __version__: version
8 @var __date__: date of the version
9 """
10
11
12 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
13 http://www.access.edu.au
14 Primary Business: Queensland, Australia"""
15 __license__="""Licensed under the Open Software License version 3.0
16 http://www.opensource.org/licenses/osl-3.0.php"""
17 __author__="Lutz Gross, l.gross@uq.edu.au"
18 __url__="http://www.iservo.edu.au/esys/escript"
19 __version__="$Revision$"
20 __date__="$Date$"
21
22 from esys.pycad import *
23 from esys.pycad.gmsh import Design
24 from esys.finley import MakeDomain
25 from esys.escript import getTagNames
26 p0=Point(0.,0.,0.)
27 p1=Point(1.,0.,0.)
28 p2=Point(1.,1.,0.)
29 p3=Point(0.,1.,0.)
30 l01=Line(p0,p1)
31 l12=Line(p1,p2)
32 l23=Line(p2,p3)
33 l30=Line(p3,p0)
34 c=CurveLoop(l01,l12,l23,l30)
35 s=PlaneSurface(c)
36 ps=PropertySet("The_whole_domain",s)
37 pl1=PropertySet("sides",l01,l23)
38 pl2=PropertySet("top_and_bottom",l12,l30)
39 d=Design(dim=2,element_size=0.005)
40 d.addItems(pl1,pl2)
41 d.addItems(ps)
42 d.setScriptFileName("quad.geo")
43 d.setMeshFileName("quad.msh")
44 dom=MakeDomain(d,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)
45 print getTagNames(dom)
46 dom.write("quad.fly")

  ViewVC Help
Powered by ViewVC 1.1.26