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

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

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

revision 899 by gross, Mon Nov 13 08:02:24 2006 UTC revision 929 by gross, Wed Jan 17 07:41:13 2007 UTC
# Line 25  __url__="http://www.iservo.edu.au/esys/e Line 25  __url__="http://www.iservo.edu.au/esys/e
25  __version__="$Revision:$"  __version__="$Revision:$"
26  __date__="$Date:$"  __date__="$Date:$"
27    
28  from primitives import Primitive, PrimitiveStack  from primitives import Primitive #, PrimitiveStack
29  from datetime import date  from datetime import date
30  import tempfile  import tempfile
31  import os  import os
# Line 89  class Design(object): Line 89  class Design(object):
89      def writeFinleyMesh(self,filename):      def writeFinleyMesh(self,filename):
90          mshname=tempfile.mkstemp(suffix=".msh")[1]          mshname=tempfile.mkstemp(suffix=".msh")[1]
91          exe=self.writeGmshMesh(mshname)          exe=self.writeGmshMesh(mshname)
92          f=open(mshname,"r")          convertGmshToFinley(open(mshname,"r"),open(filename,"w"),dim=self.getDim())
         line=f.readline().split()  
         while len(line)>0:  
            print line  
            line=f.readline().split()  
93          if not self.keepTmpFiles(): os.unlink(mshname)          if not self.keepTmpFiles(): os.unlink(mshname)
94          return exe          return exe
95    
96    def convertGmshToFinley(gmsh_file,finley_file,dim=3):
97            line=gmsh_file.readline().split()
98            while len(line)>0:
99               print line
100               line=gmsh_file.readline().split()

Legend:
Removed from v.899  
changed lines
  Added in v.929

  ViewVC Help
Powered by ViewVC 1.1.26