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

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

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

revision 4938 by jfenwick, Wed May 14 01:13:23 2014 UTC revision 4984 by sshaw, Mon Jun 2 02:50:34 2014 UTC
# Line 23  http://www.opensource.org/licenses/osl-3 Line 23  http://www.opensource.org/licenses/osl-3
23  __url__="https://launchpad.net/escript-finley"  __url__="https://launchpad.net/escript-finley"
24    
25  import esys.escriptcore.utestselect as unittest  import esys.escriptcore.utestselect as unittest
26  import tempfile  from esys.escriptcore.testing import *
27                
28    
29    
# Line 38  from math import pi Line 38  from math import pi
38  import numpy  import numpy
39  import sys  import sys
40  import os  import os
41  #====================================================================================================================  #======================================================================
42  try:  try:
43       FINLEY_WORKDIR=os.environ['FINLEY_WORKDIR']       FINLEY_WORKDIR=os.environ['FINLEY_WORKDIR']
44  except KeyError:  except KeyError:
45       FINLEY_WORKDIR='.'       FINLEY_WORKDIR='.'
46    
47  #====================================================================================================================  #======================================================================
48  class Test_StokesProblemCartesian2D(unittest.TestCase):  class Test_StokesProblemCartesian2D(unittest.TestCase):
49     def setUp(self):     def setUp(self):
50         NE=6         NE=6
# Line 208  class Test_StokesProblemCartesian2D(unit Line 208  class Test_StokesProblemCartesian2D(unit
208         self.assertTrue(error_p<10*self.TOL, "pressure error too large.")         self.assertTrue(error_p<10*self.TOL, "pressure error too large.")
209         self.assertTrue(error_v0<10*self.TOL, "0-velocity error too large.")         self.assertTrue(error_v0<10*self.TOL, "0-velocity error too large.")
210         self.assertTrue(error_v1<10*self.TOL, "1-velocity error too large.")         self.assertTrue(error_v1<10*self.TOL, "1-velocity error too large.")
211  #====================================================================================================================  #======================================================================
212  class Test_StokesProblemCartesian3D(unittest.TestCase):  class Test_StokesProblemCartesian3D(unittest.TestCase):
213     def setUp(self):     def setUp(self):
214         NE=6         NE=6
# Line 400  class Test_StokesProblemCartesian3D(unit Line 400  class Test_StokesProblemCartesian3D(unit
400         self.assertTrue(error_v0<10*self.TOL, "0-velocity error too large.")         self.assertTrue(error_v0<10*self.TOL, "0-velocity error too large.")
401         self.assertTrue(error_v1<10*self.TOL, "1-velocity error too large.")         self.assertTrue(error_v1<10*self.TOL, "1-velocity error too large.")
402         self.assertTrue(error_v2<10*self.TOL, "2-velocity error too large.")         self.assertTrue(error_v2<10*self.TOL, "2-velocity error too large.")
403  #====================================================================================================================  #======================================================================
404    
405  class Test_Mountains3D(unittest.TestCase):  class Test_Mountains3D(unittest.TestCase):
406     def setUp(self):     def setUp(self):
# Line 1461  class Test_FaultSystem(unittest.TestCase Line 1461  class Test_FaultSystem(unittest.TestCase
1461        self.assertTrue( abs(d-2.*0.70710678118654757)<self.EPS, "wrong distance.")        self.assertTrue( abs(d-2.*0.70710678118654757)<self.EPS, "wrong distance.")
1462    
1463  if __name__ == '__main__':  if __name__ == '__main__':
1464     suite = unittest.TestSuite()      run_tests(__name__, exit_on_failure=True)
    suite.addTest(unittest.makeSuite(Test_FaultSystem))  
    suite.addTest(unittest.makeSuite(Test_StokesProblemCartesian2D))  
    suite.addTest(unittest.makeSuite(Test_StokesProblemCartesian3D))  
    suite.addTest(unittest.makeSuite(Test_Mountains3D))  
    suite.addTest(unittest.makeSuite(Test_Mountains2D))  
    suite.addTest(unittest.makeSuite(Test_Rheologies))  
    suite.addTest(unittest.makeSuite(Test_IncompressibleIsotropicFlowCartesian))  
    s=unittest.TextTestRunner(verbosity=2).run(suite)  
    if not s.wasSuccessful(): sys.exit(1)  
1465    

Legend:
Removed from v.4938  
changed lines
  Added in v.4984

  ViewVC Help
Powered by ViewVC 1.1.26