/[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 3773 by caltinay, Fri Dec 9 04:48:08 2011 UTC revision 3774 by jfenwick, Wed Jan 18 06:29:34 2012 UTC
# Line 33  mesh generation using gmsh Line 33  mesh generation using gmsh
33    
34  __author__="Lutz Gross, l.gross@uq.edu.au"  __author__="Lutz Gross, l.gross@uq.edu.au"
35    
36  import design  from . import design
37  import tempfile  import tempfile
38  import os  import os
39  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
40  from esys.escript import getMPIWorldMax, getMPIRankWorld  from esys.escript import getMPIWorldMax, getMPIRankWorld
41  from transformations import DEG  from .transformations import DEG
42    
43  class Design(design.Design):  class Design(design.Design):
44      """      """
# Line 117  class Design(design.Design): Line 117  class Design(design.Design):
117          else:          else:
118             if not algorithm2D==None:             if not algorithm2D==None:
119                if not algorithm == algorithm2D :                if not algorithm == algorithm2D :
120                    raise ValueError,"argument algorithm (=%s) and algorithm2D (=%s) must have the same value if set."%(algorithm, algorithm2D)                    raise ValueError("argument algorithm (=%s) and algorithm2D (=%s) must have the same value if set."%(algorithm, algorithm2D))
121             algorithm2D = algorithm             algorithm2D = algorithm
122          if not algorithm2D in [ self.DELAUNAY, self.MESHADAPT, self.FRONTAL ]:          if not algorithm2D in [ self.DELAUNAY, self.MESHADAPT, self.FRONTAL ]:
123              raise ValueError,"illegal 2D meshing algorithm %s."%algorithm2D              raise ValueError("illegal 2D meshing algorithm %s."%algorithm2D)
124          if not algorithm3D in [ self.DELAUNAY, self.FRONTAL ]:          if not algorithm3D in [ self.DELAUNAY, self.FRONTAL ]:
125              raise ValueError,"illegal 3D meshing algorithm %s."%algorithm3D              raise ValueError("illegal 3D meshing algorithm %s."%algorithm3D)
126                                
127          self.__curvature_based_element_size=curvature_based_element_size          self.__curvature_based_element_size=curvature_based_element_size
128          self.__algo2D=algorithm2D          self.__algo2D=algorithm2D
# Line 175  class Design(design.Design): Line 175  class Design(design.Design):
175          Returns a handle to a mesh meshing the design. In the current          Returns a handle to a mesh meshing the design. In the current
176          implementation a mesh file name in gmsh format is returned.          implementation a mesh file name in gmsh format is returned.
177          """          """
178          from gmshrunner import runGmsh          from .gmshrunner import runGmsh
179          import shlex          import shlex
180          args=shlex.split(self.getCommandString())          args=shlex.split(self.getCommandString())
181          args[-1]=args[-1]%self.getScriptHandler()          args[-1]=args[-1]%self.getScriptHandler()

Legend:
Removed from v.3773  
changed lines
  Added in v.3774

  ViewVC Help
Powered by ViewVC 1.1.26