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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 589 - (show annotations)
Fri Mar 10 06:28:35 2006 UTC (13 years, 7 months ago) by gross
Original Path: trunk/finley/test/python/test_utilOnFinley.py
File MIME type: text/x-python
File size: 2651 byte(s)
my little test generator
1 # $Id$
2
3 import unittest
4 # from esys.escript.test_util import Test_util_no_tagged_data as Test_util
5 from esys.escript.test_util import Test_util_with_tagged_data as Test_util
6 #from esys.escript.test_util import Test_util as Test_util
7 from esys.escript.test_util import Test_Util_SpatialFunctions
8 from esys.escript.test_symbols import Test_symbols
9
10 from esys.escript import FunctionOnBoundary
11 from esys.finley import Rectangle,Brick,JoinFaces
12 import sys
13
14 class Test_UtilOnFinley(Test_util,Test_symbols):
15 def setUp(self):
16 self.domain =Rectangle(10,10,2)
17 self.functionspace = FunctionOnBoundary(self.domain) # due to a bug in escript python needs to hold a reference to the domain
18
19 class Test_Util_SpatialFunctionsOnFinley2DOrder1(Test_Util_SpatialFunctions):
20 def setUp(self):
21 self.order=1
22 d1 = Rectangle(n0=6,n1=12,l0=0.5,order=1,useElementsOnFace=True)
23 d2 = Rectangle(n0=6,n1=12,l0=0.5,order=1,useElementsOnFace=True)
24 d2.setX(d2.getX()+[0.5,0.])
25 self.domain = JoinFaces([d1,d2])
26
27 class Test_Util_SpatialFunctionsOnFinley2DOrder2(Test_Util_SpatialFunctions):
28 def setUp(self):
29 self.order=2
30 d1 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
31 d2 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
32 d2.setX(d2.getX()+[0.5,0.])
33 self.domain = JoinFaces([d1,d2])
34
35 class Test_Util_SpatialFunctionsOnFinley3DOrder1(Test_Util_SpatialFunctions):
36 def setUp(self):
37 self.order=1
38 d1 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
39 d2 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
40 d2.setX(d2.getX()+[0.5,0.,0.])
41 self.domain = JoinFaces([d1,d2])
42
43 class Test_Util_SpatialFunctionsOnFinley3DOrder2(Test_Util_SpatialFunctions):
44 def setUp(self):
45 self.order=2
46 d1 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
47 d2 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
48 d2.setX(d2.getX()+[0.5,0.,0.])
49 self.domain = JoinFaces([d1,d2])
50
51 if __name__ == '__main__':
52 suite = unittest.TestSuite()
53 suite.addTest(unittest.makeSuite(Test_UtilOnFinley))
54 # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder1))
55 # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder2))
56 # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder1))
57 # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder2))
58 s=unittest.TextTestRunner(verbosity=2).run(suite)
59 if s.wasSuccessful():
60 sys.exit(0)
61 else:
62 sys.exit(1)
63

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26