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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 550 - (hide annotations)
Wed Feb 22 02:14:38 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: 2567 byte(s)
more tests on slicing
1 jgs 153 # $Id$
2    
3     import unittest
4 gross 443 from esys.escript.test_util import Test_util_no_tagged_data as Test_util
5 gross 550 # from esys.escript.test_util import Test_util as Test_util
6 gross 437 from esys.escript.test_util import Test_Util_SpatialFunctions
7 gross 526 from esys.escript.test_symbols import Test_symbols
8    
9 jgs 153 from esys.escript import FunctionOnBoundary
10 gross 437 from esys.finley import Rectangle,Brick,JoinFaces
11 jgs 153 import sys
12    
13 gross 526 class Test_UtilOnFinley(Test_util,Test_symbols):
14 jgs 153 def setUp(self):
15 gross 442 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 jgs 153
18 gross 437 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 jgs 153 if __name__ == '__main__':
51     suite = unittest.TestSuite()
52     suite.addTest(unittest.makeSuite(Test_UtilOnFinley))
53 gross 443 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 jgs 153 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