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

Diff of /branches/domexper/dudley/test/python/fixme_run_generators.py

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

revision 1809 by ksteube, Thu Sep 25 06:43:44 2008 UTC revision 1830 by ksteube, Thu Oct 2 06:51:48 2008 UTC
# Line 48  TEST_FILE_EXT=".test" Line 48  TEST_FILE_EXT=".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          if getMPISizeWorld() > 1: return
52        dom_file=FINLEY_WORKDIR_PATH+TEST_FILE_EXT        dom_file=FINLEY_WORKDIR_PATH+TEST_FILE_EXT
53        dom.write(dom_file)        dom.write(dom_file)
54  # Uncomment this section to dump the files for regression testing  # Uncomment this section to dump the files for regression testing
# Line 103  class Test_Generators(unittest.TestCase) Line 104  class Test_Generators(unittest.TestCase)
104        self.checker(my_dom,file)        self.checker(my_dom,file)
105    
106     def test_hex_contact_2D_order1(self):     def test_hex_contact_2D_order1(self):
107          if getMPISizeWorld() != 1: return
108        file="hex_contact_2D_order1.msh"        file="hex_contact_2D_order1.msh"
109        ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)        ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)
110        ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)        ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=False)
# Line 111  class Test_Generators(unittest.TestCase) Line 113  class Test_Generators(unittest.TestCase)
113        self.checker(my_dom,file)        self.checker(my_dom,file)
114    
115     def test_hex_contact_2D_order1_onFace(self):     def test_hex_contact_2D_order1_onFace(self):
116          if getMPISizeWorld() != 1: return
117        file="hex_contact_2D_order1_onFace.msh"        file="hex_contact_2D_order1_onFace.msh"
118        ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)        ms1=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)
119        ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)        ms2=Rectangle(1,1,1,l1=0.5,useElementsOnFace=True)
# Line 119  class Test_Generators(unittest.TestCase) Line 122  class Test_Generators(unittest.TestCase)
122        self.checker(my_dom,file)        self.checker(my_dom,file)
123    
124     def test_hex_contact_2D_order2(self):     def test_hex_contact_2D_order2(self):
125          if getMPISizeWorld() != 1: return
126        file="hex_contact_2D_order2.msh"        file="hex_contact_2D_order2.msh"
127        ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)        ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)
128        ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)        ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=False)
# Line 127  class Test_Generators(unittest.TestCase) Line 131  class Test_Generators(unittest.TestCase)
131        self.checker(my_dom,file)        self.checker(my_dom,file)
132    
133     def test_hex_contact_2D_order2_onFace(self):     def test_hex_contact_2D_order2_onFace(self):
134          if getMPISizeWorld() != 1: return
135        file="hex_contact_2D_order2_onFace.msh"        file="hex_contact_2D_order2_onFace.msh"
136        ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)        ms1=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)
137        ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)        ms2=Rectangle(1,1,2,l1=0.5,useElementsOnFace=True)
# Line 135  class Test_Generators(unittest.TestCase) Line 140  class Test_Generators(unittest.TestCase)
140        self.checker(my_dom,file)        self.checker(my_dom,file)
141    
142     def test_hex_contact_3D_order1(self):     def test_hex_contact_3D_order1(self):
143          if getMPISizeWorld() != 1: return
144        file="hex_contact_3D_order1.msh"        file="hex_contact_3D_order1.msh"
145        ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)        ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)
146        ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)        ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=False)
# Line 143  class Test_Generators(unittest.TestCase) Line 149  class Test_Generators(unittest.TestCase)
149        self.checker(my_dom,file)        self.checker(my_dom,file)
150    
151     def test_hex_contact_3D_order1_onFace(self):     def test_hex_contact_3D_order1_onFace(self):
152          if getMPISizeWorld() != 1: return
153        file="hex_contact_3D_order1_onFace.msh"        file="hex_contact_3D_order1_onFace.msh"
154        ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)        ms1=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)
155        ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)        ms2=Brick(1,1,1,1,l2=0.5,useElementsOnFace=True)
# Line 151  class Test_Generators(unittest.TestCase) Line 158  class Test_Generators(unittest.TestCase)
158        self.checker(my_dom,file)        self.checker(my_dom,file)
159    
160     def test_hex_contact_3D_order2(self):     def test_hex_contact_3D_order2(self):
161          if getMPISizeWorld() != 1: return
162        file="hex_contact_3D_order2.msh"        file="hex_contact_3D_order2.msh"
163        ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)        ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)
164        ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)        ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=False)
# Line 159  class Test_Generators(unittest.TestCase) Line 167  class Test_Generators(unittest.TestCase)
167        self.checker(my_dom,file)        self.checker(my_dom,file)
168    
169     def test_hex_contact_3D_order2_onFace(self):     def test_hex_contact_3D_order2_onFace(self):
170          if getMPISizeWorld() != 1: return
171        file="hex_contact_3D_order2_onFace.msh"        file="hex_contact_3D_order2_onFace.msh"
172        ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)        ms1=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)
173        ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)        ms2=Brick(1,1,1,2,l2=0.5,useElementsOnFace=True)
# Line 178  class Test_GMSHReader(unittest.TestCase) Line 187  class Test_GMSHReader(unittest.TestCase)
187           self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),line))           self.failUnlessEqual(line,ref_string[l].strip(),"line %d (%s) in mesh files does not match reference (%s)"%(l,ref_string[l].strip(),line))
188    
189     def test_Tri3(self):     def test_Tri3(self):
190         file="tri3_gmsh.msh"         # ReadGmsh is not MPI parallel
191         ref ="tri3.fly"         if getMPISizeWorld() == 1:
192         test = FINLEY_WORKDIR+os.sep+"tri3_test.fly"           file="tri3_gmsh.msh"
193         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)           ref ="tri3.fly"
194         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tri3_test.fly"
195         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
196             dom.write(test)
197             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
198    
199     def test_Tri6(self):     def test_Tri6(self):
200         file="tri6_gmsh.msh"         # ReadGmsh is not MPI parallel
201         ref="tri6.fly"         if getMPISizeWorld() == 1:
202         test = FINLEY_WORKDIR+os.sep+"tri8_test.fly"           file="tri6_gmsh.msh"
203         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)           ref="tri6.fly"
204         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tri8_test.fly"
205         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
206             dom.write(test)
207             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
208    
209     def test_Tet4(self):     def test_Tet4(self):
210         file="tet4_gmsh.msh"         # ReadGmsh is not MPI parallel
211         ref="tet4.fly"         if getMPISizeWorld() == 1:
212         test = FINLEY_WORKDIR+os.sep+"tet4_test.fly"           file="tet4_gmsh.msh"
213         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)           ref="tet4.fly"
214         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tet4_test.fly"
215         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
216             dom.write(test)
217             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
218    
219     def test_Tet10(self):     def test_Tet10(self):
220         file="tet10_gmsh.msh"         # ReadGmsh is not MPI parallel
221         ref="tet10.fly"         if getMPISizeWorld() == 1:
222         test = FINLEY_WORKDIR+os.sep+"tet10_test.fly"           file="tet10_gmsh.msh"
223         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)           ref="tet10.fly"
224         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tet10_test.fly"
225         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
226             dom.write(test)
227             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
228    
229  class Test_Reader(unittest.TestCase):  class Test_Reader(unittest.TestCase):
230     def test_ReadWriteTagNames(self):     def test_ReadWriteTagNames(self):
231           if getMPISizeWorld() != 1: return
232         file="hex_2D_order2.msh"         file="hex_2D_order2.msh"
233         test = FINLEY_WORKDIR+os.sep+"test.fly"         test = FINLEY_WORKDIR+os.sep+"test.fly"
234         dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)         dom = ReadMesh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)

Legend:
Removed from v.1809  
changed lines
  Added in v.1830

  ViewVC Help
Powered by ViewVC 1.1.26