/[escript]/trunk/doc/examples/usersguide/quad.py
ViewVC logotype

Diff of /trunk/doc/examples/usersguide/quad.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/pycad/examples/quad.py revision 2682 by jfenwick, Fri Aug 21 06:30:25 2009 UTC trunk/doc/examples/usersguide/quad.py revision 2683 by gross, Tue Sep 29 02:20:22 2009 UTC
# Line 34  __author__="Lutz Gross, l.gross@uq.edu.a Line 34  __author__="Lutz Gross, l.gross@uq.edu.a
34  from esys.pycad import *  from esys.pycad import *
35  from esys.pycad.gmsh import Design  from esys.pycad.gmsh import Design
36  from esys.finley import MakeDomain  from esys.finley import MakeDomain
 from esys.escript import getTagNames  
37  p0=Point(0.,0.,0.)  p0=Point(0.,0.,0.)
38  p1=Point(1.,0.,0.)  p1=Point(1.,0.,0.)
39  p2=Point(1.,1.,0.)  p2=Point(1.,1.,0.)
# Line 45  l23=Line(p2,p3) Line 44  l23=Line(p2,p3)
44  l30=Line(p3,p0)  l30=Line(p3,p0)
45  c=CurveLoop(l01,l12,l23,l30)  c=CurveLoop(l01,l12,l23,l30)
46  s=PlaneSurface(c)  s=PlaneSurface(c)
 ps=PropertySet("The_whole_domain",s)  
 pl1=PropertySet("sides",l01,l23)  
 pl2=PropertySet("top_and_bottom",l12,l30)  
47    
48  d=Design(dim=2,element_size=0.005)  
49  d.addItems(pl1,pl2)  d=Design(dim=2,element_size=0.05)
 d.addItems(ps)  
50  d.setScriptFileName("quad.geo")  d.setScriptFileName("quad.geo")
51  d.setMeshFileName("quad.msh")  d.setMeshFileName("quad.msh")
52  dom=MakeDomain(d,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)  d.addItems(s)
53  print getTagNames(dom)  
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")  dom.write("quad.fly")

Legend:
Removed from v.2682  
changed lines
  Added in v.2683

  ViewVC Help
Powered by ViewVC 1.1.26