/[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 2716 by gross, Wed Sep 30 08:28:55 2009 UTC revision 2717 by gross, Wed Oct 14 03:41:20 2009 UTC
# Line 60  class Design(design.Design): Line 60  class Design(design.Design):
60         self.setScriptFileName()         self.setScriptFileName()
61         self.setMeshFileName()         self.setMeshFileName()
62         self.setOptions()         self.setOptions()
63           self.setFileFormat(self.GMSH)
64    
65      def setScriptFileName(self,name=None):      def setScriptFileName(self,name=None):
66         """         """
# Line 80  class Design(design.Design): Line 81  class Design(design.Design):
81         """         """
82         return self.__scriptname         return self.__scriptname
83    
     def setMeshFileName(self, name=None):  
        """  
        Sets the name for the gmsh mesh file. If no name is given a name with  
        extension I{msh} is generated.  
        """  
        if name == None:  
            tmp_f_id=tempfile.mkstemp(suffix=".msh")  
            self.__mshname=tmp_f_id[1]  
            os.close(tmp_f_id[0])  
        else:  
            self.__mshname=name  
            self.setKeepFilesOn()  
   
84      def getMeshFileName(self):      def getMeshFileName(self):
85         """         """
86         Returns the name of the gmsh mesh file.         Returns the name of the gmsh mesh file.
# Line 127  class Design(design.Design): Line 115  class Design(design.Design):
115          else:          else:
116                opt=""                opt=""
117    
118          exe="gmsh -format msh -%s -algo %s -smooth %s %s-v 3 -order %s -o %s %%s" % (          exe="gmsh -format %s -%s -algo %s -smooth %s %s-v 3 -order %s -o %s %%s" % (
119                    self.getFileFormat(),
120                  self.getDim(), self.__algo, self.__smoothing, opt,                  self.getDim(), self.__algo, self.__smoothing, opt,
121                  self.getElementOrder(), self.getMeshFileName())                  self.getElementOrder(), self.getMeshFileName())
122          return exe          return exe
# Line 140  class Design(design.Design): Line 129  class Design(design.Design):
129              open(self.getScriptFileName(),"w").write(self.getScriptString())              open(self.getScriptFileName(),"w").write(self.getScriptString())
130          return self.getScriptFileName()          return self.getScriptFileName()
131    
   
132      def getMeshHandler(self):      def getMeshHandler(self):
133          """          """
134          Returns a handle to a mesh meshing the design. In the current          Returns a handle to a mesh meshing the design. In the current

Legend:
Removed from v.2716  
changed lines
  Added in v.2717

  ViewVC Help
Powered by ViewVC 1.1.26