/[escript]/trunk/doc/examples/cookbook/example09n.py
ViewVC logotype

Diff of /trunk/doc/examples/cookbook/example09n.py

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

revision 3068 by ahallam, Thu Jul 15 02:59:27 2010 UTC revision 3069 by ahallam, Wed Jul 21 03:24:48 2010 UTC
# Line 26  Author: Antony Hallam antony.hallam@uqco Line 26  Author: Antony Hallam antony.hallam@uqco
26    
27  ############################################################FILE HEADER  ############################################################FILE HEADER
28  # example09m.py  # example09m.py
29  # Create a simple 3D model for use in example09.  # Create a simple 3D model for use in example09. This is the low res
30    # mesh for illustration purposes only.
31  #  #
32  #######################################################EXTERNAL MODULES  #######################################################EXTERNAL MODULES
33  from esys.pycad import * #domain constructor  from esys.pycad import * #domain constructor
# Line 123  vintfb=Volume(SurfaceLoop(sbot,sintf,*tu Line 124  vintfb=Volume(SurfaceLoop(sbot,sintf,*tu
124    
125  #############################################EXPORTING MESH FOR ESCRIPT  #############################################EXPORTING MESH FOR ESCRIPT
126  # Create a Design which can make the mesh  # Create a Design which can make the mesh
127  d=Design(dim=3, element_size=5.0)  d=Design(dim=3, element_size=200.0)
128    
129  d.addItems(PropertySet('vintfa',vintfa))  d.addItems(PropertySet('vintfa',vintfa))
130  d.addItems(PropertySet('vintfb',vintfb))  d.addItems(PropertySet('vintfb',vintfb))
131  d.addItems(sintf)  d.addItems(sintf)
132    
133  d.setScriptFileName(os.path.join(save_path,"example09m.geo"))  d.setScriptFileName(os.path.join(save_path,"example09n.geo"))
134    d.setMeshFileName(os.path.join(save_path,"example09n.msh"))
 d.setMeshFileName(os.path.join(save_path,"example09m.msh"))  
135  #  #
136  #  make the finley domain:  #  make the finley domain:
137  #  #
138  domain=MakeDomain(d)  domain=MakeDomain(d)
139  # Create a file that can be read back in to python with  # Create a file that can be read back in to python with
140  # mesh=ReadMesh(fileName)  # mesh=ReadMesh(fileName)
141  domain.write(os.path.join(save_path,"example09m.fly"))  domain.write(os.path.join(save_path,"example09n.fly"))
142    
143    from esys.pycad import layer_cake
144    intfaces=[10,30,50,55,80,100,200,250,400,500]
145    
146    cmplx_domain=layer_cake.LayerCake(xwidth,ywidth,intfaces,200.0)
147    cmplx_domain.setScriptFileName(os.path.join(save_path,"example09lc.geo"))
148    cmplx_domain.setMeshFileName(os.path.join(save_path,"example09lc.msh"))
149    dcmplx=MakeDomain(cmplx_domain)
150    dcmplx.write(os.path.join(save_path,"example09lc.fly"))
151    
152    
153    
154    

Legend:
Removed from v.3068  
changed lines
  Added in v.3069

  ViewVC Help
Powered by ViewVC 1.1.26