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

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

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

trunk/finley/test/python/run_linearPDEsOnFinley1.py revision 2416 by gross, Wed May 13 06:03:59 2009 UTC trunk/dudley/test/python/run_linearPDEsOnDudley1.py revision 4984 by sshaw, Mon Jun 2 02:50:34 2014 UTC
# Line 1  Line 1 
1    
2  ########################################################  ########################################################
3  #  #
4  # Copyright (c) 2003-2008 by University of Queensland  # Copyright (c) 2003-2014 by University of Queensland
5  # Earth Systems Science Computational Center (ESSCC)  # Earth Systems Science Computational Center (ESSCC)
6  # http://www.uq.edu.au/esscc  # http://www.uq.edu.au
7  #  #
8  # Primary Business: Queensland, Australia  # Primary Business: Queensland, Australia
9  # Licensed under the Open Software License version 3.0  # Licensed under the Open Software License version 3.0
# Line 11  Line 11 
11  #  #
12  ########################################################  ########################################################
13    
14  __copyright__="""Copyright (c) 2003-2008 by University of Queensland  __copyright__="""Copyright (c) 2003-2014 by University of Queensland
15  Earth Systems Science Computational Center (ESSCC)  Earth Systems Science Computational Center (ESSCC)
16  http://www.uq.edu.au/esscc  http://www.uq.edu.au
17  Primary Business: Queensland, Australia"""  Primary Business: Queensland, Australia"""
18  __license__="""Licensed under the Open Software License version 3.0  __license__="""Licensed under the Open Software License version 3.0
19  http://www.opensource.org/licenses/osl-3.0.php"""  http://www.opensource.org/licenses/osl-3.0.php"""
20  __url__="https://launchpad.net/escript-finley"  __url__="https://launchpad.net/escript-finley"
21    
22  """  """
23  Test suite for the linearPDE  and pdetools test on finley  Test suite for the linearPDE  and pdetools test on dudley
24    
25  @remark:  :remark:
26    
27  @var __author__: name of author  :var __author__: name of author
28  @var __licence__: licence agreement  :var __licence__: licence agreement
29  @var __url__: url entry point on documentation  :var __url__: url entry point on documentation
30  @var __version__: version  :var __version__: version
31  @var __date__: date of the version  :var __date__: date of the version
32  """  """
33    
34  __author__="Lutz Gross, l.gross@uq.edu.au"  __author__="Lutz Gross, l.gross@uq.edu.au"
35    
36  import os  import os
37    
38  import unittest  import esys.escriptcore.utestselect as unittest
39    from esys.escriptcore.testing import *
40  from test_linearPDEs import Test_Poisson,Test_LinearPDE, Test_LinearPDE_noLumping, Test_TransportPDE  from test_linearPDEs import Test_Poisson,Test_LinearPDE, Test_LinearPDE_noLumping, Test_TransportPDE
41  from test_assemblage import Test_assemblage_2Do1, Test_assemblage_2Do2, Test_assemblage_3Do1, Test_assemblage_3Do2, \  from test_assemblage import Test_assemblage_2Do1, Test_assemblage_2Do2, Test_assemblage_3Do1, Test_assemblage_3Do2, \
42                              Test_assemblage_2Do1_Contact,Test_assemblage_2Do2_Contact, Test_assemblage_3Do1_Contact, Test_assemblage_3Do2_Contact                              Test_assemblage_2Do1_Contact,Test_assemblage_2Do2_Contact, Test_assemblage_3Do1_Contact, Test_assemblage_3Do2_Contact
43  from test_pdetools import Test_pdetools, Test_pdetools_noLumping  from test_pdetools import Test_pdetools, Test_pdetools_noLumping
44  from esys.escript import *  from esys.escript import *
45  from esys.finley import Rectangle,Brick,JoinFaces, ReadMesh  from esys.dudley import Rectangle,Brick, ReadMesh
46  import sys  import sys
47    
48    
49  try:  try:
50       FINLEY_TEST_DATA=os.environ['FINLEY_TEST_DATA']       DUDLEY_TEST_DATA=os.environ['DUDLEY_TEST_DATA']
51  except KeyError:  except KeyError:
52       FINLEY_TEST_DATA='.'       DUDLEY_TEST_DATA='.'
53    
54  FINLEY_TEST_MESH_PATH=os.path.join(FINLEY_TEST_DATA,"data_meshes")  DUDLEY_TEST_MESH_PATH=os.path.join(DUDLEY_TEST_DATA,"data_meshes")
55    
56  NE=6 # number of element in each spatial direction (must be even)  NE=10 # number of element in each spatial direction (must be even)
57    
58  class Test_LinearPDEOnFinleyHex2DOrder1(Test_LinearPDE,Test_pdetools,Test_assemblage_2Do1, Test_TransportPDE):  class Test_LinearPDEOnDudleyRectOrder1(Test_LinearPDE,Test_pdetools,Test_assemblage_2Do1, Test_TransportPDE):
59     RES_TOL=1.e-7     RES_TOL=1.e-7
60     ABS_TOL=1.e-8     ABS_TOL=1.e-8
61     def setUp(self):     def setUp(self):
62          self.domain = Rectangle(NE,NE,1)          self.domain = Rectangle(NE,NE,1)
63            self.order = 1
64     def tearDown(self):     def tearDown(self):
65          del self.domain          del self.domain
66    
67  class Test_LinearPDEOnFinleyHex2DOrder2(Test_LinearPDE,Test_pdetools,Test_assemblage_2Do2, Test_TransportPDE):  class Test_LinearPDEOnDudleyBrickOrder1(Test_LinearPDE,Test_pdetools,Test_assemblage_3Do1, Test_TransportPDE):
    RES_TOL=1.e-7  
    ABS_TOL=1.e-8  
    def setUp(self):  
         self.domain = Rectangle(NE,NE,2)  
    def tearDown(self):  
         del self.domain  
   
 class Test_LinearPDEOnFinleyHex3DOrder1(Test_LinearPDE,Test_pdetools,Test_assemblage_3Do1, Test_TransportPDE):  
68     RES_TOL=1.e-7     RES_TOL=1.e-7
69     ABS_TOL=1.e-8     ABS_TOL=1.e-8
70     def setUp(self):     def setUp(self):
71          self.domain = Brick(NE,NE,NE,1)          self.domain = Brick(NE,NE,NE,1)
72            self.order = 1
 class Test_LinearPDEOnFinleyHex3DOrder2(Test_LinearPDE,Test_pdetools,Test_assemblage_3Do2, Test_TransportPDE):  
    RES_TOL=1.e-7  
    ABS_TOL=1.e-8  
    def setUp(self):  
         self.domain = Brick(NE,NE,NE,2)  
73     def tearDown(self):     def tearDown(self):
74          del self.domain          del self.domain
75    
 if __name__ == '__main__':  
    suite = unittest.TestSuite()  
    if True :  
       suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyHex2DOrder1))  
       suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyHex2DOrder2))  
       suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyHex3DOrder1))  
       suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyHex3DOrder2))  
    else:  
       suite.addTest(Test_LinearPDEOnFinleyHex2DOrder1("test_DIRECT"))  
       pass  
76    
77     s=unittest.TextTestRunner(verbosity=2).run(suite)  if __name__ == '__main__':
78     if not s.wasSuccessful(): sys.exit(1)      run_tests(__name__, exit_on_failure=True)
79    

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

  ViewVC Help
Powered by ViewVC 1.1.26