/[escript]/trunk/finley/test/python/run_generators.py
ViewVC logotype

Diff of /trunk/finley/test/python/run_generators.py

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

revision 2416 by gross, Wed May 13 06:03:59 2009 UTC revision 2419 by jfenwick, Thu May 14 01:56:18 2009 UTC
# Line 180  class Test_GMSHReader(unittest.TestCase) Line 180  class Test_GMSHReader(unittest.TestCase)
180     def test_Tri3(self):     def test_Tri3(self):
181           file="tri3_gmsh.msh"           file="tri3_gmsh.msh"
182           ref ="tri3.fly"           ref ="tri3.fly"
183           test = FINLEY_WORKDIR+os.sep+"tri3_test.fly"           test = os.path.join(FINLEY_WORKDIR,"tri3_test.fly")
184           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),2,optimize=False)
185           dom.write(test)           dom.write(test)
186           self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))
187    
188     def test_Tri6(self):     def test_Tri6(self):
189           file="tri6_gmsh.msh"           file="tri6_gmsh.msh"
190           ref="tri6.fly"           ref="tri6.fly"
191           test = FINLEY_WORKDIR+os.sep+"tri8_test.fly"           test = os.path.join(FINLEY_WORKDIR,"tri8_test.fly")
192           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),2,optimize=False)
193           dom.write(test)           dom.write(test)
194           self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))
195    
196     def test_Tet4(self):     def test_Tet4(self):
197           file="tet4_gmsh.msh"           file="tet4_gmsh.msh"
198           ref="tet4.fly"           ref="tet4.fly"
199           test = FINLEY_WORKDIR+os.sep+"tet4_test.fly"           test = os.path.join(FINLEY_WORKDIR,"tet4_test.fly")
200           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),3,optimize=False)
201           dom.write(test)           dom.write(test)
202           self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))
203    
204     def test_Tet10(self):     def test_Tet10(self):
205           file="tet10_gmsh.msh"           file="tet10_gmsh.msh"
206           ref="tet10.fly"           ref="tet10.fly"
207           test = FINLEY_WORKDIR+os.sep+"tet10_test.fly"           test = os.path.join(FINLEY_WORKDIR,"tet10_test.fly")
208           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),3,optimize=False)
209           dom.write(test)           dom.write(test)
210           self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))
211    
212  class Test_Reader(unittest.TestCase):  class Test_Reader(unittest.TestCase):
213     def test_ReadWriteTagNames(self):     def test_ReadWriteTagNames(self):
214         file="hex_2D_order2.msh"         file="hex_2D_order2.msh"
215         test = FINLEY_WORKDIR+os.sep+"test.fly"         test = os.path.join(FINLEY_WORKDIR,"test.fly")
216         dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)         dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,file),3,optimize=False)
217         insertTagNames(dom,A=1,B=2)         insertTagNames(dom,A=1,B=2)
218         dom.write(test)         dom.write(test)
219         dom2 = ReadMesh(test,3,optimize=False)         dom2 = ReadMesh(test,3,optimize=False)
# Line 376  class Test_Integration(unittest.TestCase Line 376  class Test_Integration(unittest.TestCase
376        self.__test_2DQ(my_dom,10)        self.__test_2DQ(my_dom,10)
377    
378     def test_Tet2D_order1(self):     def test_Tet2D_order1(self):
379        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=1)
380        self.__test_2DT(my_dom,1)        self.__test_2DT(my_dom,1)
381     def test_Tet2D_order2(self):     def test_Tet2D_order2(self):
382        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=2)
383        self.__test_2DT(my_dom,2)        self.__test_2DT(my_dom,2)
384     def test_Tet2D_order3(self):     def test_Tet2D_order3(self):
385        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=3)
386        self.__test_2DT(my_dom,3)        self.__test_2DT(my_dom,3)
387     def test_Tet2D_order4(self):     def test_Tet2D_order4(self):
388        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=4)
389        self.__test_2DT(my_dom,4)        self.__test_2DT(my_dom,4)
390     def test_Tet2D_order5(self):     def test_Tet2D_order5(self):
391        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=5)
392        self.__test_2DT(my_dom,5)        self.__test_2DT(my_dom,5)
393     def test_Tet2D_order6(self):     def test_Tet2D_order6(self):
394        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=6)
395        self.__test_2DT(my_dom,6)        self.__test_2DT(my_dom,6)
396     def test_Tet2D_order7(self):     def test_Tet2D_order7(self):
397        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=7)
398        self.__test_2DT(my_dom,7)        self.__test_2DT(my_dom,7)
399     def test_Tet2D_order8(self):     def test_Tet2D_order8(self):
400        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=8)
401        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))
402     def test_Tet2D_order9(self):     def test_Tet2D_order9(self):
403        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=9)
404        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))
405     def test_Tet2D_order10(self):     def test_Tet2D_order10(self):
406        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tri3.fly",optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=10)
407        self.__test_2DT(my_dom,10)        self.__test_2DT(my_dom,10)
408    
409     def test_hex3D_order1(self):     def test_hex3D_order1(self):
# Line 448  class Test_Integration(unittest.TestCase Line 448  class Test_Integration(unittest.TestCase
448        self.__test_3DQ(my_dom,10)        self.__test_3DQ(my_dom,10)
449    
450     def test_Tet3D_order1(self):     def test_Tet3D_order1(self):
451        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=1)
452        self.__test_3DT(my_dom,1)        self.__test_3DT(my_dom,1)
453     def test_Tet3D_order2(self):     def test_Tet3D_order2(self):
454        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=2)
455        self.__test_3DT(my_dom,2)        self.__test_3DT(my_dom,2)
456     def test_Tet3D_order3(self):     def test_Tet3D_order3(self):
457        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=3)
458        self.__test_3DT(my_dom,3)        self.__test_3DT(my_dom,3)
459     def test_Tet3D_order4(self):     def test_Tet3D_order4(self):
460        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=4)
461        self.__test_3DT(my_dom,4)        self.__test_3DT(my_dom,4)
462     def test_Tet3D_order5(self):     def test_Tet3D_order5(self):
463        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=5)
464        self.__test_3DT(my_dom,5)        self.__test_3DT(my_dom,5)
465     def test_Tet3D_order6(self):     def test_Tet3D_order6(self):
466        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=6)
467        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))
468     def test_Tet3D_order7(self):     def test_Tet3D_order7(self):
469        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=7)
470        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))
471     def test_Tet3D_order8(self):     def test_Tet3D_order8(self):
472        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=8)
473        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))
474     def test_Tet3D_order9(self):     def test_Tet3D_order9(self):
475        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=9)
476        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))
477     def test_Tet3D_order10(self):     def test_Tet3D_order10(self):
478        my_dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+"tet4.fly",optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=10)
479        self.__test_3DT(my_dom,10)        self.__test_3DT(my_dom,10)
480    
481  if __name__ == '__main__':  if __name__ == '__main__':

Legend:
Removed from v.2416  
changed lines
  Added in v.2419

  ViewVC Help
Powered by ViewVC 1.1.26