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

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

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

revision 1060 by ksteube, Mon Mar 26 05:11:10 2007 UTC revision 1061 by ksteube, Mon Mar 26 05:32:22 2007 UTC
# Line 41  x12=Line(x1, x2) Line 41  x12=Line(x1, x2)
41  x20=Line(x2, x0)  x20=Line(x2, x0)
42  cutout=CurveLoop(x01, x12, x20)  cutout=CurveLoop(x01, x12, x20)
43    
44    # Create the surface with cutout
45  s=PlaneSurface(c, holes=[cutout])  s=PlaneSurface(c, holes=[cutout])
46    
47    # Create a Design which can make the mesh
48  d=Design(dim=2, element_size=0.05)  d=Design(dim=2, element_size=0.05)
49    
50    # Add the trapezoid with cutout
51  d.addItems(s)  d.addItems(s)
52    
53    # Create the geometry, mesh and Escript domain
54  d.setScriptFileName("trapezoid.geo")  d.setScriptFileName("trapezoid.geo")
55  d.setMeshFileName("trapezoid.msh")  d.setMeshFileName("trapezoid.msh")
56  dom=MakeDomain(d, integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)  domain=MakeDomain(d, integrationOrder=-1, reducedIntegrationOrder=-1, optimizeLabeling=True)
57  dom.write("trapezoid.fly")  
58    # Create a file that can be read back in to python with mesh=ReadMesh(fileName)
59    domain.write("trapezoid.fly")
60    

Legend:
Removed from v.1060  
changed lines
  Added in v.1061

  ViewVC Help
Powered by ViewVC 1.1.26