/[escript]/trunk/dudley/test/python/run_utilOnDudley.py
ViewVC logotype

Diff of /trunk/dudley/test/python/run_utilOnDudley.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 284 by gross, Thu Dec 1 06:39:23 2005 UTC revision 437 by gross, Fri Jan 20 00:16:58 2006 UTC
# Line 2  Line 2 
2    
3  import unittest  import unittest
4  from esys.escript.test_util import Test_util_no_tagged_data as Test_util  from esys.escript.test_util import Test_util_no_tagged_data as Test_util
5    from esys.escript.test_util import Test_Util_SpatialFunctions
6  from esys.escript import FunctionOnBoundary  from esys.escript import FunctionOnBoundary
7  from esys.finley import Rectangle  from esys.finley import Rectangle,Brick,JoinFaces
8  import sys  import sys
9    
10  class Test_UtilOnFinley(Test_util):  class Test_UtilOnFinley(Test_util):
# Line 11  class Test_UtilOnFinley(Test_util): Line 12  class Test_UtilOnFinley(Test_util):
12         self.__dom =Rectangle(10,10,2)         self.__dom =Rectangle(10,10,2)
13         self.functionspace = FunctionOnBoundary(self.__dom) # due to a bug in escript python needs to hold a reference to the domain         self.functionspace = FunctionOnBoundary(self.__dom) # due to a bug in escript python needs to hold a reference to the domain
14    
15    class Test_Util_SpatialFunctionsOnFinley2DOrder1(Test_Util_SpatialFunctions):
16        def setUp(self):
17            self.order=1
18            d1 = Rectangle(n0=6,n1=12,l0=0.5,order=1,useElementsOnFace=True)
19            d2 = Rectangle(n0=6,n1=12,l0=0.5,order=1,useElementsOnFace=True)
20            d2.setX(d2.getX()+[0.5,0.])
21            self.domain = JoinFaces([d1,d2])
22    
23    class Test_Util_SpatialFunctionsOnFinley2DOrder2(Test_Util_SpatialFunctions):
24        def setUp(self):
25            self.order=2
26            d1 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
27            d2 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
28            d2.setX(d2.getX()+[0.5,0.])
29            self.domain = JoinFaces([d1,d2])
30    
31    class Test_Util_SpatialFunctionsOnFinley3DOrder1(Test_Util_SpatialFunctions):
32        def setUp(self):
33            self.order=1
34            d1 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
35            d2 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
36            d2.setX(d2.getX()+[0.5,0.,0.])
37            self.domain = JoinFaces([d1,d2])
38    
39    class Test_Util_SpatialFunctionsOnFinley3DOrder2(Test_Util_SpatialFunctions):
40        def setUp(self):
41            self.order=2
42            d1 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
43            d2 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
44            d2.setX(d2.getX()+[0.5,0.,0.])
45            self.domain = JoinFaces([d1,d2])
46    
47    
48  if __name__ == '__main__':  if __name__ == '__main__':
49     suite = unittest.TestSuite()     suite = unittest.TestSuite()
50     suite.addTest(unittest.makeSuite(Test_UtilOnFinley))     suite.addTest(unittest.makeSuite(Test_UtilOnFinley))
51       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder1))
52       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder2))
53       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder1))
54       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder2))
55     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)
56     if s.wasSuccessful():     if s.wasSuccessful():
57       sys.exit(0)       sys.exit(0)

Legend:
Removed from v.284  
changed lines
  Added in v.437

  ViewVC Help
Powered by ViewVC 1.1.26