/[escript]/trunk/downunder/py_src/domaingeneratordcresistivity.py
ViewVC logotype

Diff of /trunk/downunder/py_src/domaingeneratordcresistivity.py

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

revision 5323 by sshaw, Tue Dec 9 01:39:46 2014 UTC revision 5324 by sshaw, Tue Dec 9 04:43:02 2014 UTC
# Line 127  class DCResDomGenerator(object): Line 127  class DCResDomGenerator(object):
127                  out.append("Point(%d)={%f,%f,%f,%f};\n"%(pntCount,pntInfo[0],pntInfo[1],pntInfo[2],pntInfo[3]))                  out.append("Point(%d)={%f,%f,%f,%f};\n"%(pntCount,pntInfo[0],pntInfo[1],pntInfo[2],pntInfo[3]))
128                  pntCount+=1                  pntCount+=1
129              out.append("out0[]=Extrude {0, 0, -%f} { Surface {6};};\n"%(self.__extents[2]+self.__bufferThickness))              out.append("out0[]=Extrude {0, 0, -%f} { Surface {6};};\n"%(self.__extents[2]+self.__bufferThickness))
130              self.__pntList=str(range(5,pntCount))[1:-1]              self.__pntList=str([i for i in range(5,pntCount)])[1:-1]
131              out.append("Point{%s} In Surface{6};\n"%self.__pntList)              out.append("Point{%s} In Surface{6};\n"%self.__pntList)
132              out.append("Physical Volume(\"volume-%d\") = {%d} ;\n"%(1,1))              out.append("Physical Volume(\"volume-%d\") = {%d} ;\n"%(1,1))
133              if self.__prism != None:              if self.__prism != None:
# Line 179  class DCResDomGenerator(object): Line 179  class DCResDomGenerator(object):
179                  out.append("s=newreg;\n")                  out.append("s=newreg;\n")
180                  out.append("Compound Volume(s) = {1,2};\n")                  out.append("Compound Volume(s) = {1,2};\n")
181                  out.append("Physical Volume(\"volume-%d\") = {s} ;\n"%(3))                  out.append("Physical Volume(\"volume-%d\") = {s} ;\n"%(3))
182              self.__pntList=str(range(5,pntCount))[1:-1]              self.__pntList=str([i for i in range(5,pntCount)])[1:-1]
183              out.append("Point{%s} In Surface{6};\n"%self.__pntList)              out.append("Point{%s} In Surface{6};\n"%self.__pntList)
184    
185          out.append("Physical Surface(\"Top\") = { -6 };\n")          out.append("Physical Surface(\"Top\") = { -6 };\n")
# Line 246  class DCResDomGenerator(object): Line 246  class DCResDomGenerator(object):
246              out.append("out0[]=Extrude {0, 0, -%f} { Surface {6};};\n"%interfaces[0])              out.append("out0[]=Extrude {0, 0, -%f} { Surface {6};};\n"%interfaces[0])
247              out.append("Physical Volume(\"volume-%d\") = {%d} ;\n"%(1,1))              out.append("Physical Volume(\"volume-%d\") = {%d} ;\n"%(1,1))
248              #out.append("Point{%s} In Surface{out[0]};\n"%str(range(5,pntCount))[1:-1])              #out.append("Point{%s} In Surface{out[0]};\n"%str(range(5,pntCount))[1:-1])
249              self.__pntList=str(range(5,pntCount))[1:-1]              self.__pntList=str([i for i in range(5,pntCount)])[1:-1]
250              out.append("Point{%s} In Surface{6};\n"%self.__pntList)              out.append("Point{%s} In Surface{6};\n"%self.__pntList)
251              for i in range(1,len(interfaces)):              for i in range(1,len(interfaces)):
252                  extentCount+=float(interfaces[i])                  extentCount+=float(interfaces[i])
# Line 279  class DCResDomGenerator(object): Line 279  class DCResDomGenerator(object):
279                  pntInfo=self.__electrodeDict[i]                  pntInfo=self.__electrodeDict[i]
280                  out.append("Point(%d)={%f,%f,%f,%f};\n"%(pntCount,pntInfo[0],pntInfo[1],pntInfo[2],pntInfo[3]))                  out.append("Point(%d)={%f,%f,%f,%f};\n"%(pntCount,pntInfo[0],pntInfo[1],pntInfo[2],pntInfo[3]))
281                  pntCount+=1                  pntCount+=1
282              self.__pntList=str(range(5,pntCount))[1:-1]              self.__pntList=str([i for i in range(5,pntCount)])[1:-1]
283              out.append("Point{%s} In Surface{6};\n"%self.__pntList)              out.append("Point{%s} In Surface{6};\n"%self.__pntList)
284              out.append("out0[]=Extrude {0, 0, -%f} { Surface {6};};\n"%interfaces[0])              out.append("out0[]=Extrude {0, 0, -%f} { Surface {6};};\n"%interfaces[0])
285              out.append("Physical Volume(\"volume-%d\") = {%d} ;\n"%(0,1))              out.append("Physical Volume(\"volume-%d\") = {%d} ;\n"%(0,1))

Legend:
Removed from v.5323  
changed lines
  Added in v.5324

  ViewVC Help
Powered by ViewVC 1.1.26