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

Contents of /trunk/dudley/test/python/run_utilOnDudley.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3975 - (show annotations)
Thu Sep 20 01:54:06 2012 UTC (7 years, 1 month ago) by caltinay
File MIME type: text/x-python
File size: 3492 byte(s)
Merged symbolic branch into trunk. Curious what daniel and spartacus have to
say...

1
2 ########################################################
3 #
4 # Copyright (c) 2003-2012 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-2012 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 import unittest
23 from test_util import Test_util as Test_util
24 from test_util import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary_noContact
25 from test_symfuncs import Test_symfuncs
26
27 from esys.escript import *
28 from esys.dudley import Rectangle,Brick,ReadMesh
29 import sys
30 import os
31
32 try:
33 DUDLEY_TEST_DATA=os.environ['DUDLEY_TEST_DATA']
34 except KeyError:
35 DUDLEY_TEST_DATA='.'
36
37 DUDLEY_TEST_MESH_PATH=os.path.join(DUDLEY_TEST_DATA,"data_meshes")
38
39
40 NE=4 # number elements, must be even
41
42 class Test_UtilOnDudley(Test_util,Test_symfuncs):
43 def setUp(self):
44 self.domain =Rectangle(NE,NE+1,1)
45 self.functionspace = FunctionOnBoundary(self.domain) # due to a bug in escript python needs to hold a reference to the domain
46 def tearDown(self):
47 del self.functionspace
48 del self.domain
49
50 class Test_Util_SpatialFunctionsOnDudleyTet2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
51 def setUp(self):
52 self.order=1
53 self.domain = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
54 def tearDown(self):
55 del self.order
56 del self.domain
57
58
59 class Test_Util_SpatialFunctionsOnDudleyTet3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
60 def setUp(self):
61 self.order=1
62 self.domain = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet_3D_order1.fly"),optimize=False)
63 def tearDown(self):
64 del self.order
65 del self.domain
66
67 class Test_Util_SpatialFunctionsOnDudleyRectOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
68 def setUp(self):
69 self.order=1
70 self.domain = Rectangle(n0=NE,n1=NE,order=1)
71 def tearDown(self):
72 del self.order
73 del self.domain
74
75
76 class Test_Util_SpatialFunctionsOnDudleyBrickOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
77 def setUp(self):
78 self.order=1
79 self.domain = Brick(n0=NE,n1=NE,n2=NE,order=1)
80 def tearDown(self):
81 del self.order
82 del self.domain
83
84
85
86 if __name__ == '__main__':
87 suite = unittest.TestSuite()
88 if True:
89 suite.addTest(unittest.makeSuite(Test_UtilOnDudley))
90 suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyTet2DOrder1))
91 suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyTet3DOrder1))
92 suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyRectOrder1))
93 suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyBrickOrder1))
94 # suite.addTest(Test_Util_SpatialFunctionsOnDudleyRectOrder1("test_normal_FunctionOnBoundary"))
95 else:
96 pass
97 s=unittest.TextTestRunner(verbosity=2).run(suite)
98 if not s.wasSuccessful(): sys.exit(1)
99

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/lapack2681/finley/test/python/run_utilOnFinley.py:2682-2741 /branches/pasowrap/dudley/test/python/run_utilOnDudley.py:3661-3674 /branches/py3_attempt2/dudley/test/python/run_utilOnDudley.py:3871-3891 /branches/restext/finley/test/python/run_utilOnFinley.py:2610-2624 /branches/ripleygmg_from_3668/dudley/test/python/run_utilOnDudley.py:3669-3791 /branches/stage3.0/finley/test/python/run_utilOnFinley.py:2569-2590 /branches/symbolic_from_3470/dudley/test/python/run_utilOnDudley.py:3471-3974 /branches/symbolic_from_3470/ripley/test/python/dudley/test/python/run_utilOnDudley.py:3517-3974 /release/3.0/finley/test/python/run_utilOnFinley.py:2591-2601 /trunk/ripley/test/python/dudley/test/python/run_utilOnDudley.py:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26