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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1388 - (hide annotations)
Fri Jan 11 07:45:58 2008 UTC (12 years, 8 months ago) by trankine
File MIME type: text/x-python
File size: 1327 byte(s)
And get the *(&(*&(* name right
1 gross 1010 """
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 gross 1044 from esys.escript import getTagNames
26 gross 1034 p0=Point(0.,0.,0.)
27     p1=Point(1.,0.,0.)
28 gross 1010 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 gross 1044 ps=PropertySet("The_whole_domain",s)
37 gross 1010 pl1=PropertySet("sides",l01,l23)
38 gross 1044 pl2=PropertySet("top_and_bottom",l12,l30)
39 gross 1338 d=Design(dim=2,element_size=0.005)
40 gross 1010 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 gross 1044 print getTagNames(dom)
46 gross 1010 dom.write("quad.fly")

  ViewVC Help
Powered by ViewVC 1.1.26