/[escript]/trunk/pycad/py_src/gmsh.py
ViewVC logotype

Diff of /trunk/pycad/py_src/gmsh.py

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

revision 2248 by gross, Thu Feb 5 23:24:04 2009 UTC revision 2314 by gross, Tue Mar 17 04:16:24 2009 UTC
# Line 36  import design Line 36  import design
36  import tempfile  import tempfile
37  import os  import os
38  from primitives import Point, Spline, BezierCurve, BSpline, Line, Arc, CurveLoop, RuledSurface, PlaneSurface, SurfaceLoop, Volume, PropertySet, Ellipse  from primitives import Point, Spline, BezierCurve, BSpline, Line, Arc, CurveLoop, RuledSurface, PlaneSurface, SurfaceLoop, Volume, PropertySet, Ellipse
39    from esys.escript import getMPIWorldMax, getMPIRankWorld
40    
41  class Design(design.Design):  class Design(design.Design):
42      """      """
# Line 136  class Design(design.Design): Line 137  class Design(design.Design):
137          Returns a handle to a mesh meshing the design. In the current          Returns a handle to a mesh meshing the design. In the current
138          implementation a mesh file name in gmsh format is returned.          implementation a mesh file name in gmsh format is returned.
139          """          """
         f = open(self.getScriptFileName(),"w")  
         f.write(self.getScriptString())  
         f.close()  
140          cmd = self.getCommandString()          cmd = self.getCommandString()
141          ret = os.system(cmd) / 256          if getMPIRankWorld():
142                open(self.getScriptFileName(),"w").write(self.getScriptString())
143                ret = os.system(cmd) / 256
144            else:
145                ret=0
146            ret=getMPIWorldMax(ret)
147          if ret > 0:          if ret > 0:
148            raise RuntimeError, "Could not build mesh: %s"%cmd            raise RuntimeError, "Could not build mesh: %s"%cmd
149          else:          else:

Legend:
Removed from v.2248  
changed lines
  Added in v.2314

  ViewVC Help
Powered by ViewVC 1.1.26