/[escript]/branches/intelc_win32/finley/test/python/run_utilOnFinley.py
ViewVC logotype

Contents of /branches/intelc_win32/finley/test/python/run_utilOnFinley.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 752 - (show annotations)
Mon Jun 26 02:25:41 2006 UTC (12 years, 10 months ago) by woo409
File MIME type: text/x-python
File size: 2743 byte(s)
+ Added a qsort.c file which contains a drop in replacement for qsort (call it as qsortG). This one appears to be a stable implementation and the test .msh files on windows have been set up to be the same as unix again except for the exponent digits (3 instead of 2).
With ALL the qsorts replaced with qsortG only two tests fail now on win32:
test_normal_onFunctionOnContactOne
test_normal_onFunctionOnContactZero

Both give wrong result errors.

I will check this same code on the altix (including the use of qsortG and see if Altix has the same problem.
1 # $Id$
2
3 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
4 http://www.access.edu.au
5 Primary Business: Queensland, Australia"""
6 __license__="""Licensed under the Open Software License version 3.0
7 http://www.opensource.org/licenses/osl-3.0.php"""
8 import unittest
9 from test_util import Test_util as Test_util
10 from test_util import Test_Util_SpatialFunctions
11 from test_symbols import Test_symbols
12
13 from esys.escript import FunctionOnBoundary
14 from esys.finley import Rectangle,Brick,JoinFaces
15 import sys
16
17 class Test_UtilOnFinley(Test_util,Test_symbols):
18 def setUp(self):
19 self.domain =Rectangle(5,5,2)
20 self.functionspace = FunctionOnBoundary(self.domain) # due to a bug in escript python needs to hold a reference to the domain
21
22 class Test_Util_SpatialFunctionsOnFinley2DOrder1(Test_Util_SpatialFunctions):
23 def setUp(self):
24 self.order=1
25 d1 = Rectangle(n0=3,n1=12,l0=0.5,order=1,useElementsOnFace=True)
26 d2 = Rectangle(n0=3,n1=12,l0=0.5,order=1,useElementsOnFace=True)
27 d2.setX(d2.getX()+[0.5,0.])
28 self.domain = JoinFaces([d1,d2])
29
30 class Test_Util_SpatialFunctionsOnFinley2DOrder2(Test_Util_SpatialFunctions):
31 def setUp(self):
32 self.order=2
33 d1 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
34 d2 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
35 d2.setX(d2.getX()+[0.5,0.])
36 self.domain = JoinFaces([d1,d2])
37
38 class Test_Util_SpatialFunctionsOnFinley3DOrder1(Test_Util_SpatialFunctions):
39 def setUp(self):
40 self.order=1
41 d1 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
42 d2 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
43 d2.setX(d2.getX()+[0.5,0.,0.])
44 self.domain = JoinFaces([d1,d2])
45
46 class Test_Util_SpatialFunctionsOnFinley3DOrder2(Test_Util_SpatialFunctions):
47 def setUp(self):
48 self.order=2
49 d1 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
50 d2 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
51 d2.setX(d2.getX()+[0.5,0.,0.])
52 self.domain = JoinFaces([d1,d2])
53
54 if __name__ == '__main__':
55 suite = unittest.TestSuite()
56 # suite.addTest(unittest.makeSuite(Test_UtilOnFinley))
57 suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder1))
58 # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder2))
59 # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder1))
60 # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder2))
61 s=unittest.TextTestRunner(verbosity=2).run(suite)
62 if s.wasSuccessful():
63 sys.exit(0)
64 else:
65 sys.exit(1)
66

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26