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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1010 - (hide annotations)
Mon Mar 5 04:01:43 2007 UTC (14 years, 3 months ago) by gross
File MIME type: text/x-python
File size: 1389 byte(s)
simple quad example added
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     p0=Point(0.,0.,0.5)
26     p1=Point(1.,0.,0.5)
27     p2=Point(1.,1.,0.)
28     p3=Point(0.,1.,0.)
29     l01=Line(p0,p1)
30     l12=Line(p1,p2)
31     l23=Line(p2,p3)
32     l30=Line(p3,p0)
33     c=CurveLoop(l01,l12,l23,l30)
34     s=PlaneSurface(c)
35     ps=PropertySet("The whole domain",s)
36     pl1=PropertySet("sides",l01,l23)
37     pl2=PropertySet("top and bottom",l12,l30)
38     d=Design(element_size=0.2)
39     d.addItems(pl1,pl2)
40     d.addItems(ps)
41     d.setScriptFileName("quad.geo")
42     d.setMeshFileName("quad.msh")
43     dom=MakeDomain(d,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)
44     dom.write("quad.fly")
45     d.getTagMap().writeXML(open("quad_tags.xml","w"))
46     # recover tagmap
47     # m=TagMap()
48     # m.fillFromXML(open("quad_tags.xml","r"))

  ViewVC Help
Powered by ViewVC 1.1.26