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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26