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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26