/[escript]/trunk/modellib/py_src/geometry.py
ViewVC logotype

Diff of /trunk/modellib/py_src/geometry.py

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

revision 937 by gross, Wed Jan 3 06:30:00 2007 UTC revision 938 by gross, Thu Jan 25 03:40:54 2007 UTC
# Line 15  class FinleyReader(ParameterSet): Line 15  class FinleyReader(ParameterSet):
15         """         """
16         reads finley mesh file.         reads finley mesh file.
17    
18         @ivar source: file name of the finley input file         @ivar source: mesh file in finley or gmsh format
19         @type source: C{str}         @type source: C{DataSource}
20         @ivar intergrationOrder: integration order, default -1 (in).         @ivar intergrationOrder: integration order, default -1 (in).
21         @type intergrationOrder: C{int}         @type intergrationOrder: C{int}
22           @ivar reducedIntegrationOrder: reduced integration order, default -1 (in).
23           @type reducedIntegrationOrder: C{int}
24           @ivar optimizeLabeling: switches on optimization of the labeling of the nodes
25           @type optimizeLabeling: C{bool}
26         """         """
27         def __init__(self,**kwargs):         def __init__(self,**kwargs):
28            """            """
# Line 26  class FinleyReader(ParameterSet): Line 30  class FinleyReader(ParameterSet):
30            """            """
31            super(FinleyReader,self).__init__(**kwargs)            super(FinleyReader,self).__init__(**kwargs)
32            self.declareParameter(source="none",            self.declareParameter(source="none",
33                                   integrationOrder=-1)                                  optimizeLabeling=True,
34                                    reducedIntegrationOrder=-1,
35                                    integrationOrder=-1)
36            self.__domain=None            self.__domain=None
37    
38         def domain(self):         def domain(self):
# Line 37  class FinleyReader(ParameterSet): Line 43  class FinleyReader(ParameterSet):
43            @rtype: L{Domain}            @rtype: L{Domain}
44            """            """
45            if self.__domain == None:            if self.__domain == None:
46               self.__domain=finley.ReadMesh(self.source.getLocalFileName(),self.integrationOrder)               if  self.source.fileformat == "fly":
47                    self.__domain=finley.ReadMesh(self.source.getLocalFileName(),self.integrationOrder)
48                 elif self.source.fileformat == "gmsh":
49                    self.__domain=finley.ReadGmsh(self.source.getLocalFileName(),self.integrationOrder,self.reducedIntegrationOrder, self.optimizeLabeling)
50                 else:
51                    raise TypeError("unknown mesh file format %s."%self.source.fileformat)
52               self.trace("mesh read from %s"%self.source)                         self.trace("mesh read from %s"%self.source)          
53            return self.__domain            return self.__domain
54                        

Legend:
Removed from v.937  
changed lines
  Added in v.938

  ViewVC Help
Powered by ViewVC 1.1.26