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

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

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

revision 1043 by gross, Wed Mar 14 23:49:20 2007 UTC revision 1044 by gross, Mon Mar 19 07:29:31 2007 UTC
# Line 22  __date__="$Date$" Line 22  __date__="$Date$"
22  from esys.pycad import *  from esys.pycad import *
23  from esys.pycad.gmsh import Design  from esys.pycad.gmsh import Design
24  from esys.finley import MakeDomain  from esys.finley import MakeDomain
25    from esys.escript import getTagNames
26  p0=Point(0.,0.,0.)  p0=Point(0.,0.,0.)
27  p1=Point(1.,0.,0.)  p1=Point(1.,0.,0.)
28  p2=Point(1.,1.,0.)  p2=Point(1.,1.,0.)
# Line 32  l23=Line(p2,p3) Line 33  l23=Line(p2,p3)
33  l30=Line(p3,p0)  l30=Line(p3,p0)
34  c=CurveLoop(l01,l12,l23,l30)  c=CurveLoop(l01,l12,l23,l30)
35  s=PlaneSurface(c)  s=PlaneSurface(c)
36  ps=PropertySet("The whole domain",s)  ps=PropertySet("The_whole_domain",s)
37  pl1=PropertySet("sides",l01,l23)  pl1=PropertySet("sides",l01,l23)
38  pl2=PropertySet("top and bottom",l12,l30)  pl2=PropertySet("top_and_bottom",l12,l30)
39  d=Design(dim=2,element_size=0.2)  d=Design(dim=2,element_size=0.2)
40  d.addItems(pl1,pl2)  d.addItems(pl1,pl2)
41  d.addItems(ps)  d.addItems(ps)
42  d.setScriptFileName("quad.geo")  d.setScriptFileName("quad.geo")
43  d.setMeshFileName("quad.msh")  d.setMeshFileName("quad.msh")
44  dom=MakeDomain(d,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)  dom=MakeDomain(d,integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)
45    print getTagNames(dom)
46  dom.write("quad.fly")  dom.write("quad.fly")
 d.getTagMap().writeXML(open("quad_tags.xml","w"))  
 # recover tagmap  
 #   m=TagMap()  
 #   m.fillFromXML(open("quad_tags.xml","r"))  

Legend:
Removed from v.1043  
changed lines
  Added in v.1044

  ViewVC Help
Powered by ViewVC 1.1.26