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

Contents of /trunk/finley/test/python/run_linearPDEsOnFinley2.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2549 - (show annotations)
Mon Jul 20 06:43:47 2009 UTC (10 years, 1 month ago) by jfenwick
File MIME type: text/x-python
File size: 3725 byte(s)
Remainder of copyright date fixes
1
2 ########################################################
3 #
4 # Copyright (c) 2003-2009 by University of Queensland
5 # Earth Systems Science Computational Center (ESSCC)
6 # http://www.uq.edu.au/esscc
7 #
8 # Primary Business: Queensland, Australia
9 # Licensed under the Open Software License version 3.0
10 # http://www.opensource.org/licenses/osl-3.0.php
11 #
12 ########################################################
13
14 __copyright__="""Copyright (c) 2003-2009 by University of Queensland
15 Earth Systems Science Computational Center (ESSCC)
16 http://www.uq.edu.au/esscc
17 Primary Business: Queensland, Australia"""
18 __license__="""Licensed under the Open Software License version 3.0
19 http://www.opensource.org/licenses/osl-3.0.php"""
20 __url__="https://launchpad.net/escript-finley"
21
22 """
23 Test suite for the linearPDE and pdetools test on finley
24
25 @remark:
26
27 @var __author__: name of author
28 @var __licence__: licence agreement
29 @var __url__: url entry point on documentation
30 @var __version__: version
31 @var __date__: date of the version
32 """
33
34 __author__="Lutz Gross, l.gross@uq.edu.au"
35
36 import os
37
38 import unittest
39 from test_linearPDEs import Test_Poisson,Test_LinearPDE, Test_LinearPDE_noLumping, Test_TransportPDE
40 from test_assemblage import Test_assemblage_2Do1, Test_assemblage_2Do2, Test_assemblage_3Do1, Test_assemblage_3Do2, \
41 Test_assemblage_2Do1_Contact,Test_assemblage_2Do2_Contact, Test_assemblage_3Do1_Contact, Test_assemblage_3Do2_Contact
42 from test_pdetools import Test_pdetools, Test_pdetools_noLumping
43 from esys.escript import *
44 from esys.finley import Rectangle,Brick,JoinFaces, ReadMesh
45 import sys
46
47
48 try:
49 FINLEY_TEST_DATA=os.environ['FINLEY_TEST_DATA']
50 except KeyError:
51 FINLEY_TEST_DATA='.'
52
53 FINLEY_TEST_MESH_PATH=os.path.join(FINLEY_TEST_DATA,"data_meshes")
54
55 NE=6 # number of element in each spatial direction (must be even)
56
57 class Test_LinearPDEOnFinleyTet2DOrder1(Test_LinearPDE,Test_pdetools,Test_assemblage_2Do1, Test_TransportPDE):
58 RES_TOL=1.e-7
59 ABS_TOL=1.e-8
60 def setUp(self):
61 self.domain = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
62 def tearDown(self):
63 del self.domain
64
65 class Test_LinearPDEOnFinleyTet2DOrder2(Test_LinearPDE_noLumping,Test_pdetools_noLumping,Test_assemblage_2Do2, Test_TransportPDE):
66 RES_TOL=1.e-7
67 ABS_TOL=1.e-8
68 def setUp(self):
69 self.domain = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_2D_order2.fly"),optimize=False)
70 def tearDown(self):
71 del self.domain
72
73 class Test_LinearPDEOnFinleyTet3DOrder1(Test_LinearPDE,Test_pdetools,Test_assemblage_3Do1, Test_TransportPDE):
74 RES_TOL=1.e-7
75 ABS_TOL=1.e-8
76 def setUp(self):
77 self.domain = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_3D_order1.fly"),optimize=False)
78 def tearDown(self):
79 del self.domain
80
81 class Test_LinearPDEOnFinleyTet3DOrder2(Test_LinearPDE,Test_pdetools,Test_assemblage_3Do2, Test_TransportPDE):
82 RES_TOL=1.e-7
83 ABS_TOL=1.e-8
84 def setUp(self):
85 self.domain = ReadMesh(os.path.join(FINLEY_TEST_MESH_PATH,"tet_3D_order2.fly"),optimize=False)
86 def tearDown(self):
87 del self.domain
88
89 if __name__ == '__main__':
90 suite = unittest.TestSuite()
91 if True :
92 suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyTet2DOrder1))
93 suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyTet2DOrder2))
94 suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyTet3DOrder1))
95 suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyTet3DOrder2))
96 else:
97 pass
98
99 s=unittest.TextTestRunner(verbosity=2).run(suite)
100 if not s.wasSuccessful(): sys.exit(1)
101

  ViewVC Help
Powered by ViewVC 1.1.26