/[escript]/trunk/dudley/test/python/fixme_run_generators.py
ViewVC logotype

Diff of /trunk/dudley/test/python/fixme_run_generators.py

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

revision 3080 by jfenwick, Tue Aug 3 04:28:03 2010 UTC revision 3085 by jfenwick, Thu Aug 5 00:44:32 2010 UTC
# Line 27  import sys Line 27  import sys
27  import os  import os
28  import unittest  import unittest
29  from esys.escript import *  from esys.escript import *
30  from esys.finley import Rectangle,Brick,JoinFaces, ReadGmsh, ReadMesh  from esys.dudley import Rectangle,Brick,JoinFaces, ReadGmsh, ReadMesh
31    
32  try:  try:
33       FINLEY_TEST_DATA=os.environ['FINLEY_TEST_DATA']       DUDLEY_TEST_DATA=os.environ['DUDLEY_TEST_DATA']
34  except KeyError:  except KeyError:
35       FINLEY_TEST_DATA='.'       DUDLEY_TEST_DATA='.'
36    
37  try:  try:
38       FINLEY_WORKDIR=os.environ['FINLEY_WORKDIR']       DUDLEY_WORKDIR=os.environ['DUDLEY_WORKDIR']
39  except KeyError:  except KeyError:
40       FINLEY_WORKDIR='.'       DUDLEY_WORKDIR='.'
41    
42  FINLEY_TEST_MESH_PATH=os.path.join(FINLEY_TEST_DATA,"data_meshes")  DUDLEY_TEST_MESH_PATH=os.path.join(DUDLEY_TEST_DATA,"data_meshes")
43  #if os.name == "nt":  #if os.name == "nt":
44  #   FINLEY_TEST_MESH_PATH = os.path.join(FINLEY_TEST_MESH_PATH,"win32")  #   DUDLEY_TEST_MESH_PATH = os.path.join(DUDLEY_TEST_MESH_PATH,"win32")
45  FINLEY_WORKDIR_PATH=FINLEY_WORKDIR  DUDLEY_WORKDIR_PATH=DUDLEY_WORKDIR
46    
47  TEST_FILE_PRE="test_"  TEST_FILE_PRE="test_"
48  class Test_Generators(unittest.TestCase):  class Test_Generators(unittest.TestCase):
49    
50     def checker(self,dom,reference):     def checker(self,dom,reference):
51        dom_file=os.path.join(FINLEY_WORKDIR_PATH,TEST_FILE_PRE+reference)        dom_file=os.path.join(DUDLEY_WORKDIR_PATH,TEST_FILE_PRE+reference)
52        dom.write(dom_file)        dom.write(dom_file)
53  # Uncomment this section to dump the files for regression testing  # Uncomment this section to dump the files for regression testing
54  #      if True:  #      if True:
55  #         dom.write(os.path.join(FINLEY_TEST_MESH_PATH,reference))  #         dom.write(os.path.join(DUDLEY_TEST_MESH_PATH,reference))
56        dom_string=open(dom_file).read().splitlines()        dom_string=open(dom_file).read().splitlines()
57        ref_string=open(os.path.join(FINLEY_TEST_MESH_PATH,reference)).read().splitlines()        ref_string=open(os.path.join(DUDLEY_TEST_MESH_PATH,reference)).read().splitlines()
58        self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")        self.failUnlessEqual(len(dom_string),len(ref_string),"number of lines in mesh files does not match reference")
59        for l in range(1,len(ref_string)):        for l in range(1,len(ref_string)):
60       line=dom_string[l].strip()       line=dom_string[l].strip()
# Line 190  class Test_GMSHReader(unittest.TestCase) Line 190  class Test_GMSHReader(unittest.TestCase)
190     def test_Tri3(self):     def test_Tri3(self):
191           file="tri3_gmsh.msh"           file="tri3_gmsh.msh"
192           ref ="tri3.fly"           ref ="tri3.fly"
193           test = os.path.join(FINLEY_WORKDIR,"tri3_test.fly")           test = os.path.join(DUDLEY_WORKDIR,"tri3_test.fly")
194           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),2,optimize=False)           dom = ReadGmsh(os.path.join(DUDLEY_TEST_MESH_PATH,file),2,optimize=False)
195           dom.write(test)           dom.write(test)
196           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))           self.compare(test, os.path.join(DUDLEY_TEST_MESH_PATH,ref))
197    
198     def test_Tri6(self):     def test_Tri6(self):
199           file="tri6_gmsh.msh"           file="tri6_gmsh.msh"
200           ref="tri6.fly"           ref="tri6.fly"
201           test = os.path.join(FINLEY_WORKDIR,"tri6_test.fly")           test = os.path.join(DUDLEY_WORKDIR,"tri6_test.fly")
202           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),2,optimize=False)           dom = ReadGmsh(os.path.join(DUDLEY_TEST_MESH_PATH,file),2,optimize=False)
203           dom.write(test)           dom.write(test)
204           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))           self.compare(test, os.path.join(DUDLEY_TEST_MESH_PATH,ref))
205    
206     def test_Tri6_macro(self):     def test_Tri6_macro(self):
207           file="tri6_gmsh.msh"           file="tri6_gmsh.msh"
208           ref="tri6_macro.fly"           ref="tri6_macro.fly"
209           test = os.path.join(FINLEY_WORKDIR,"tri6_macro_test.fly")           test = os.path.join(DUDLEY_WORKDIR,"tri6_macro_test.fly")
210           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),2,useMacroElements=True,optimize=False)           dom = ReadGmsh(os.path.join(DUDLEY_TEST_MESH_PATH,file),2,useMacroElements=True,optimize=False)
211           dom.write(test)           dom.write(test)
212           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))           self.compare(test, os.path.join(DUDLEY_TEST_MESH_PATH,ref))
213    
214     def test_Tet4(self):     def test_Tet4(self):
215           file="tet4_gmsh.msh"           file="tet4_gmsh.msh"
216           ref="tet4.fly"           ref="tet4.fly"
217           test = os.path.join(FINLEY_WORKDIR,"tet4_test.fly")           test = os.path.join(DUDLEY_WORKDIR,"tet4_test.fly")
218           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),3,optimize=False)           dom = ReadGmsh(os.path.join(DUDLEY_TEST_MESH_PATH,file),3,optimize=False)
219           dom.write(test)           dom.write(test)
220           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))           self.compare(test, os.path.join(DUDLEY_TEST_MESH_PATH,ref))
221    
222     def test_Tet10(self):     def test_Tet10(self):
223           file="tet10_gmsh.msh"           file="tet10_gmsh.msh"
224           ref="tet10.fly"           ref="tet10.fly"
225           test = os.path.join(FINLEY_WORKDIR,"tet10_test.fly")           test = os.path.join(DUDLEY_WORKDIR,"tet10_test.fly")
226           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),3,optimize=False)           dom = ReadGmsh(os.path.join(DUDLEY_TEST_MESH_PATH,file),3,optimize=False)
227           dom.write(test)           dom.write(test)
228           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))           self.compare(test, os.path.join(DUDLEY_TEST_MESH_PATH,ref))
229    
230     def test_Tet10_macro(self):     def test_Tet10_macro(self):
231           file="tet10_gmsh.msh"           file="tet10_gmsh.msh"
232           ref="tet10_macro.fly"           ref="tet10_macro.fly"
233           test = os.path.join(FINLEY_WORKDIR,"tet10_macro_test.fly")           test = os.path.join(DUDLEY_WORKDIR,"tet10_macro_test.fly")
234           dom = ReadGmsh(os.path.join(FINLEY_TEST_MESH_PATH,file),3,useMacroElements=True,optimize=False)           dom = ReadGmsh(os.path.join(DUDLEY_TEST_MESH_PATH,file),3,useMacroElements=True,optimize=False)
235           dom.write(test)           dom.write(test)
236           self.compare(test, os.path.join(FINLEY_TEST_MESH_PATH,ref))           self.compare(test, os.path.join(DUDLEY_TEST_MESH_PATH,ref))
237    
238  class Test_Reader(unittest.TestCase):  class Test_Reader(unittest.TestCase):
239     def test_ReadWriteTagNames(self):     def test_ReadWriteTagNames(self):
240         file="hex_2D_order2.msh"         file="hex_2D_order2.msh"
241         test = os.path.join(FINLEY_WORKDIR,"test.fly")         test = os.path.join(DUDLEY_WORKDIR,"test.fly")
242         dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,file),3,optimize=False)         dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,file),3,optimize=False)
243         insertTagNames(dom,A=1,B=2)         insertTagNames(dom,A=1,B=2)
244         dom.write(test)         dom.write(test)
245         dom2 = ReadMesh(test,3,optimize=False)         dom2 = ReadMesh(test,3,optimize=False)
# Line 485  class Test_Integration(unittest.TestCase Line 485  class Test_Integration(unittest.TestCase
485        self.__test_2DQ(my_dom,10)        self.__test_2DQ(my_dom,10)
486     #===================================================================================================     #===================================================================================================
487     def test_Tet2D_order1_integorder1(self):     def test_Tet2D_order1_integorder1(self):
488        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=1)
489        self.__test_2DT(my_dom,1)        self.__test_2DT(my_dom,1)
490     def test_Tet2D_order1_integorder2(self):     def test_Tet2D_order1_integorder2(self):
491        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=2)
492        self.__test_2DT(my_dom,2)        self.__test_2DT(my_dom,2)
493     def test_Tet2D_order1_integorder3(self):     def test_Tet2D_order1_integorder3(self):
494        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=3)
495        self.__test_2DT(my_dom,3)        self.__test_2DT(my_dom,3)
496     def test_Tet2D_order1_integorder4(self):     def test_Tet2D_order1_integorder4(self):
497        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=4)
498        self.__test_2DT(my_dom,4)        self.__test_2DT(my_dom,4)
499     def test_Tet2D_order1_integorder5(self):     def test_Tet2D_order1_integorder5(self):
500        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=5)
501        self.__test_2DT(my_dom,5)        self.__test_2DT(my_dom,5)
502     def test_Tet2D_order1_integorder6(self):     def test_Tet2D_order1_integorder6(self):
503        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=6)
504        self.__test_2DT(my_dom,6)        self.__test_2DT(my_dom,6)
505     def test_Tet2D_order1_integorder7(self):     def test_Tet2D_order1_integorder7(self):
506        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=7)
507        self.__test_2DT(my_dom,7)        self.__test_2DT(my_dom,7)
508     def test_Tet2D_order1_integorder8(self):     def test_Tet2D_order1_integorder8(self):
509        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=8)
510        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))
511     def test_Tet2D_order1_integorder9(self):     def test_Tet2D_order1_integorder9(self):
512        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=9)
513        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))
514     def test_Tet2D_order1_integorder10(self):     def test_Tet2D_order1_integorder10(self):
515        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri3.fly"),optimize=False,integrationOrder=10)
516        self.__test_2DT(my_dom,10)        self.__test_2DT(my_dom,10)
517     #===================================================================================================     #===================================================================================================
518     def test_Tet2D_order2_integorder2(self):     def test_Tet2D_order2_integorder2(self):
519        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=1)
520        self.__test_2DT(my_dom,1)        self.__test_2DT(my_dom,1)
521     def test_Tet2D_order2_integorder2(self):     def test_Tet2D_order2_integorder2(self):
522        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=2)
523        self.__test_2DT(my_dom,2)        self.__test_2DT(my_dom,2)
524     def test_Tet2D_order2_integorder3(self):     def test_Tet2D_order2_integorder3(self):
525        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=3)
526        self.__test_2DT(my_dom,3)        self.__test_2DT(my_dom,3)
527     def test_Tet2D_order2_integorder4(self):     def test_Tet2D_order2_integorder4(self):
528        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=4)
529        self.__test_2DT(my_dom,4)        self.__test_2DT(my_dom,4)
530     def test_Tet2D_order2_integorder5(self):     def test_Tet2D_order2_integorder5(self):
531        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=5)
532        self.__test_2DT(my_dom,5)        self.__test_2DT(my_dom,5)
533     def test_Tet2D_order2_integorder6(self):     def test_Tet2D_order2_integorder6(self):
534        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=6)
535        self.__test_2DT(my_dom,6)        self.__test_2DT(my_dom,6)
536     def test_Tet2D_order2_integorder7(self):     def test_Tet2D_order2_integorder7(self):
537        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=7)
538        self.__test_2DT(my_dom,7)        self.__test_2DT(my_dom,7)
539     def test_Tet2D_order2_integorder8(self):     def test_Tet2D_order2_integorder8(self):
540        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=8)
541        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))
542     def test_Tet2D_order2_integorder9(self):     def test_Tet2D_order2_integorder9(self):
543        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=9)
544        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))
545     def test_Tet2D_order2_integorder10(self):     def test_Tet2D_order2_integorder10(self):
546        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6.fly"),optimize=False,integrationOrder=10)
547        self.__test_2DT(my_dom,10)        self.__test_2DT(my_dom,10)
548     #===================================================================================================     #===================================================================================================
549     def test_Tet2D_macro_integmacro(self):     def test_Tet2D_macro_integmacro(self):
550        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=1)
551        self.__test_2DT(my_dom,1)        self.__test_2DT(my_dom,1)
552     def test_Tet2D_macro_integmacro(self):     def test_Tet2D_macro_integmacro(self):
553        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=2)
554        self.__test_2DT(my_dom,2)        self.__test_2DT(my_dom,2)
555     def test_Tet2D_macro_integorder3(self):     def test_Tet2D_macro_integorder3(self):
556        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=3)
557        self.__test_2DT(my_dom,3)        self.__test_2DT(my_dom,3)
558     def test_Tet2D_macro_integorder4(self):     def test_Tet2D_macro_integorder4(self):
559        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=4)
560        self.__test_2DT(my_dom,4)        self.__test_2DT(my_dom,4)
561     def test_Tet2D_macro_integorder5(self):     def test_Tet2D_macro_integorder5(self):
562        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=5)
563        self.__test_2DT(my_dom,5)        self.__test_2DT(my_dom,5)
564     def test_Tet2D_macro_integorder6(self):     def test_Tet2D_macro_integorder6(self):
565        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=6)
566        self.__test_2DT(my_dom,6)        self.__test_2DT(my_dom,6)
567     def test_Tet2D_macro_integorder7(self):     def test_Tet2D_macro_integorder7(self):
568        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=7)
569        self.__test_2DT(my_dom,7)        self.__test_2DT(my_dom,7)
570     def test_Tet2D_macro_integorder8(self):     def test_Tet2D_macro_integorder8(self):
571        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=8)
572        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))        self.__test_2DT(my_dom,8,1./sqrt(EPSILON))
573     def test_Tet2D_macro_integorder9(self):     def test_Tet2D_macro_integorder9(self):
574        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=9)
575        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))        self.__test_2DT(my_dom,9,1./sqrt(EPSILON))
576     def test_Tet2D_macro_integorder10(self):     def test_Tet2D_macro_integorder10(self):
577        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tri6_macro.fly"),optimize=False,integrationOrder=10)
578        self.__test_2DT(my_dom,10)        self.__test_2DT(my_dom,10)
579     #===================================================================================================     #===================================================================================================
580     def test_hex3D_order1_integorder1(self):     def test_hex3D_order1_integorder1(self):
# Line 701  class Test_Integration(unittest.TestCase Line 701  class Test_Integration(unittest.TestCase
701        self.__test_3DQ(my_dom,10)        self.__test_3DQ(my_dom,10)
702     #==========================================================================================     #==========================================================================================
703     def test_Tet3D_order1_integorder1(self):     def test_Tet3D_order1_integorder1(self):
704        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=1)
705        self.__test_3DT(my_dom,1)        self.__test_3DT(my_dom,1)
706     def test_Tet3D_order1_integorder2(self):     def test_Tet3D_order1_integorder2(self):
707        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=2)
708        self.__test_3DT(my_dom,2)        self.__test_3DT(my_dom,2)
709     def test_Tet3D_order1_integorder3(self):     def test_Tet3D_order1_integorder3(self):
710        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=3)
711        self.__test_3DT(my_dom,3)        self.__test_3DT(my_dom,3)
712     def test_Tet3D_order1_integorder4(self):     def test_Tet3D_order1_integorder4(self):
713        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=4)
714        self.__test_3DT(my_dom,4)        self.__test_3DT(my_dom,4)
715     def test_Tet3D_order1_integorder5(self):     def test_Tet3D_order1_integorder5(self):
716        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=5)
717        self.__test_3DT(my_dom,5)        self.__test_3DT(my_dom,5)
718     def test_Tet3D_order1_integorder6(self):     def test_Tet3D_order1_integorder6(self):
719        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=6)
720        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))
721     def test_Tet3D_order1_integorder7(self):     def test_Tet3D_order1_integorder7(self):
722        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=7)
723        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))
724     def test_Tet3D_order1_integorder8(self):     def test_Tet3D_order1_integorder8(self):
725        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=8)
726        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))
727     def test_Tet3D_order1_integorder9(self):     def test_Tet3D_order1_integorder9(self):
728        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=9)
729        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))
730     def test_Tet3D_order1_integorder10(self):     def test_Tet3D_order1_integorder10(self):
731        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet4.fly"),optimize=False,integrationOrder=10)
732        self.__test_3DT(my_dom,10,1./sqrt(EPSILON))        self.__test_3DT(my_dom,10,1./sqrt(EPSILON))
733     #==========================================================================================     #==========================================================================================
734     def test_Tet3D_order2_integorder2(self):     def test_Tet3D_order2_integorder2(self):
735        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=1)
736        self.__test_3DT(my_dom,1)        self.__test_3DT(my_dom,1)
737     def test_Tet3D_order2_integorder2(self):     def test_Tet3D_order2_integorder2(self):
738        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=2)
739        self.__test_3DT(my_dom,2)        self.__test_3DT(my_dom,2)
740     def test_Tet3D_order2_integorder3(self):     def test_Tet3D_order2_integorder3(self):
741        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=3)
742        self.__test_3DT(my_dom,3)        self.__test_3DT(my_dom,3)
743     def test_Tet3D_order2_integorder4(self):     def test_Tet3D_order2_integorder4(self):
744        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=4)
745        self.__test_3DT(my_dom,4)        self.__test_3DT(my_dom,4)
746     def test_Tet3D_order2_integorder5(self):     def test_Tet3D_order2_integorder5(self):
747        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=5)
748        self.__test_3DT(my_dom,5)        self.__test_3DT(my_dom,5)
749     def test_Tet3D_order2_integorder6(self):     def test_Tet3D_order2_integorder6(self):
750        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=6)
751        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))
752     def test_Tet3D_order2_integorder7(self):     def test_Tet3D_order2_integorder7(self):
753        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=7)
754        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))
755     def test_Tet3D_order2_integorder8(self):     def test_Tet3D_order2_integorder8(self):
756        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=8)
757        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))
758     def test_Tet3D_order2_integorder9(self):     def test_Tet3D_order2_integorder9(self):
759        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=9)
760        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))
761     def test_Tet3D_order2_integorder10(self):     def test_Tet3D_order2_integorder10(self):
762        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10.fly"),optimize=False,integrationOrder=10)
763        self.__test_3DT(my_dom,10,1./sqrt(EPSILON))        self.__test_3DT(my_dom,10,1./sqrt(EPSILON))
764     #==========================================================================================     #==========================================================================================
765     def test_Tet3D_macro_integmacro(self):     def test_Tet3D_macro_integmacro(self):
766        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=1)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=1)
767        self.__test_3DT(my_dom,1)        self.__test_3DT(my_dom,1)
768     def test_Tet3D_macro_integmacro(self):     def test_Tet3D_macro_integmacro(self):
769        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=2)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=2)
770        self.__test_3DT(my_dom,2)        self.__test_3DT(my_dom,2)
771     def test_Tet3D_macro_integorder3(self):     def test_Tet3D_macro_integorder3(self):
772        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=3)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=3)
773        self.__test_3DT(my_dom,3)        self.__test_3DT(my_dom,3)
774     def test_Tet3D_macro_integorder4(self):     def test_Tet3D_macro_integorder4(self):
775        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=4)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=4)
776        self.__test_3DT(my_dom,4)        self.__test_3DT(my_dom,4)
777     def test_Tet3D_macro_integorder5(self):     def test_Tet3D_macro_integorder5(self):
778        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=5)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=5)
779        self.__test_3DT(my_dom,5)        self.__test_3DT(my_dom,5)
780     def test_Tet3D_macro_integorder6(self):     def test_Tet3D_macro_integorder6(self):
781        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=6)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=6)
782        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))        self.__test_3DT(my_dom,6,1./sqrt(EPSILON))
783     def test_Tet3D_macro_integorder7(self):     def test_Tet3D_macro_integorder7(self):
784        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=7)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=7)
785        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))        self.__test_3DT(my_dom,7,1./sqrt(EPSILON))
786     def test_Tet3D_macro_integorder8(self):     def test_Tet3D_macro_integorder8(self):
787        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=8)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=8)
788        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))        self.__test_3DT(my_dom,8,1./sqrt(EPSILON))
789     def test_Tet3D_macro_integorder9(self):     def test_Tet3D_macro_integorder9(self):
790        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=9)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=9)
791        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))        self.__test_3DT(my_dom,9,1./sqrt(EPSILON))
792     def test_Tet3D_macro_integorder10(self):     def test_Tet3D_macro_integorder10(self):
793        my_dom = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=10)        my_dom = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet10_macro.fly"),optimize=False,integrationOrder=10)
794        self.__test_3DT(my_dom,10,1./sqrt(EPSILON))        self.__test_3DT(my_dom,10,1./sqrt(EPSILON))
795    
796  if __name__ == '__main__':  if __name__ == '__main__':

Legend:
Removed from v.3080  
changed lines
  Added in v.3085

  ViewVC Help
Powered by ViewVC 1.1.26