/[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 1809 by ksteube, Thu Sep 25 06:43:44 2008 UTC revision 1829 by ksteube, Thu Oct 2 05:40:30 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 178  class Test_GMSHReader(unittest.TestCase) Line 179  class Test_GMSHReader(unittest.TestCase)
179           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))
180    
181     def test_Tri3(self):     def test_Tri3(self):
182         file="tri3_gmsh.msh"         # ReadGmsh is not MPI parallel
183         ref ="tri3.fly"         if getMPISizeWorld() == 1:
184         test = FINLEY_WORKDIR+os.sep+"tri3_test.fly"           file="tri3_gmsh.msh"
185         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)           ref ="tri3.fly"
186         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tri3_test.fly"
187         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
188             dom.write(test)
189             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
190    
191     def test_Tri6(self):     def test_Tri6(self):
192         file="tri6_gmsh.msh"         # ReadGmsh is not MPI parallel
193         ref="tri6.fly"         if getMPISizeWorld() == 1:
194         test = FINLEY_WORKDIR+os.sep+"tri8_test.fly"           file="tri6_gmsh.msh"
195         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)           ref="tri6.fly"
196         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tri8_test.fly"
197         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,2,optimize=False)
198             dom.write(test)
199             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
200    
201     def test_Tet4(self):     def test_Tet4(self):
202         file="tet4_gmsh.msh"         # ReadGmsh is not MPI parallel
203         ref="tet4.fly"         if getMPISizeWorld() == 1:
204         test = FINLEY_WORKDIR+os.sep+"tet4_test.fly"           file="tet4_gmsh.msh"
205         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)           ref="tet4.fly"
206         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tet4_test.fly"
207         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
208             dom.write(test)
209             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
210    
211     def test_Tet10(self):     def test_Tet10(self):
212         file="tet10_gmsh.msh"         # ReadGmsh is not MPI parallel
213         ref="tet10.fly"         if getMPISizeWorld() == 1:
214         test = FINLEY_WORKDIR+os.sep+"tet10_test.fly"           file="tet10_gmsh.msh"
215         dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)           ref="tet10.fly"
216         dom.write(test)           test = FINLEY_WORKDIR+os.sep+"tet10_test.fly"
217         self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)           dom = ReadGmsh(FINLEY_TEST_MESH_PATH+os.sep+file,3,optimize=False)
218             dom.write(test)
219             self.compare(test, FINLEY_TEST_MESH_PATH+os.sep+ref)
220    
221  class Test_Reader(unittest.TestCase):  class Test_Reader(unittest.TestCase):
222     def test_ReadWriteTagNames(self):     def test_ReadWriteTagNames(self):

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

  ViewVC Help
Powered by ViewVC 1.1.26