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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3216 - (hide annotations)
Tue Sep 28 05:13:17 2010 UTC (8 years, 6 months ago) by jfenwick
Original Path: branches/domexper/dudley/test/python/run_utilOnDudley.py
File MIME type: text/x-python
File size: 3489 byte(s)
ElementFile does not use ReferenceElements anymore

1 ksteube 1809
2     ########################################################
3 ksteube 1312 #
4 jfenwick 2881 # Copyright (c) 2003-2010 by University of Queensland
5 ksteube 1809 # Earth Systems Science Computational Center (ESSCC)
6     # http://www.uq.edu.au/esscc
7 ksteube 1312 #
8 ksteube 1809 # 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 ksteube 1312 #
12 ksteube 1809 ########################################################
13 jgs 153
14 jfenwick 2881 __copyright__="""Copyright (c) 2003-2010 by University of Queensland
15 ksteube 1809 Earth Systems Science Computational Center (ESSCC)
16     http://www.uq.edu.au/esscc
17     Primary Business: Queensland, Australia"""
18 elspeth 617 __license__="""Licensed under the Open Software License version 3.0
19 ksteube 1809 http://www.opensource.org/licenses/osl-3.0.php"""
20 jfenwick 2344 __url__="https://launchpad.net/escript-finley"
21 ksteube 1809
22 jgs 153 import unittest
23 gross 707 from test_util import Test_util as Test_util
24 jfenwick 3090 from test_util import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary_noContact
25 gross 707 from test_symbols import Test_symbols
26 gross 526
27 ksteube 1830 from esys.escript import *
28 jfenwick 3216 from esys.dudley import Rectangle,Brick,ReadMesh
29 jgs 153 import sys
30 gross 855 import os
31 jgs 153
32 gross 855 try:
33 jfenwick 3085 DUDLEY_TEST_DATA=os.environ['DUDLEY_TEST_DATA']
34 gross 855 except KeyError:
35 jfenwick 3085 DUDLEY_TEST_DATA='.'
36 gross 855
37 jfenwick 3085 DUDLEY_TEST_MESH_PATH=os.path.join(DUDLEY_TEST_DATA,"data_meshes")
38 gross 855
39    
40 gross 777 NE=4 # number elements, must be even
41    
42 jfenwick 3087 class Test_UtilOnDudley(Test_util,Test_symbols):
43 jgs 153 def setUp(self):
44 jfenwick 3119 self.domain =Rectangle(NE,NE+1,1)
45 gross 442 self.functionspace = FunctionOnBoundary(self.domain) # due to a bug in escript python needs to hold a reference to the domain
46 gross 798 def tearDown(self):
47     del self.functionspace
48     del self.domain
49 jgs 153
50 jfenwick 3087 class Test_Util_SpatialFunctionsOnDudleyTet2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
51 gross 437 def setUp(self):
52     self.order=1
53 jfenwick 3085 self.domain = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
54 gross 855 def tearDown(self):
55     del self.order
56     del self.domain
57    
58    
59 jfenwick 3087 class Test_Util_SpatialFunctionsOnDudleyTet3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
60 gross 855 def setUp(self):
61     self.order=1
62 jfenwick 3085 self.domain = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet_3D_order1.fly"),optimize=False)
63 gross 855 def tearDown(self):
64     del self.order
65     del self.domain
66    
67 jfenwick 3119 class Test_Util_SpatialFunctionsOnDudleyRectOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
68 gross 855 def setUp(self):
69 gross 2722 self.order=1
70 gross 2748 self.domain = Rectangle(n0=NE,n1=NE,order=1)
71     def tearDown(self):
72     del self.order
73     del self.domain
74    
75    
76 jfenwick 3119 class Test_Util_SpatialFunctionsOnDudleyBrickOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
77 gross 2748 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 jgs 153 if __name__ == '__main__':
87     suite = unittest.TestSuite()
88 gross 857 if True:
89 jfenwick 3087 suite.addTest(unittest.makeSuite(Test_UtilOnDudley))
90     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyTet2DOrder1))
91     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyTet3DOrder1))
92 jfenwick 3119 suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyRectOrder1))
93     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyBrickOrder1))
94 jfenwick 3122 # suite.addTest(Test_Util_SpatialFunctionsOnDudleyRectOrder1("test_normal_FunctionOnBoundary"))
95 gross 857 else:
96 gross 859 pass
97 jgs 153 s=unittest.TextTestRunner(verbosity=2).run(suite)
98 gross 1376 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/restext/finley/test/python/run_utilOnFinley.py:2610-2624 /branches/stage3.0/finley/test/python/run_utilOnFinley.py:2569-2590 /release/3.0/finley/test/python/run_utilOnFinley.py:2591-2601

  ViewVC Help
Powered by ViewVC 1.1.26