/[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 617 - (hide annotations)
Wed Mar 22 02:58:17 2006 UTC (13 years, 6 months ago) by elspeth
Original Path: trunk/finley/test/python/test_utilOnFinley.py
File MIME type: text/x-python
File size: 2932 byte(s)
More copyright.

1 jgs 153 # $Id$
2    
3 elspeth 617 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
4     http://www.access.edu.au
5     Primary Business: Queensland, Australia"""
6     __license__="""Licensed under the Open Software License version 3.0
7     http://www.opensource.org/licenses/osl-3.0.php"""
8 jgs 153 import unittest
9 gross 595 from esys.escript.test_util import Test_util_no_tagged_data as Test_util
10     # from esys.escript.test_util import Test_util_with_tagged_data as Test_util
11     # from esys.escript.test_util import Test_util as Test_util
12 gross 437 from esys.escript.test_util import Test_Util_SpatialFunctions
13 gross 526 from esys.escript.test_symbols import Test_symbols
14    
15 jgs 153 from esys.escript import FunctionOnBoundary
16 gross 437 from esys.finley import Rectangle,Brick,JoinFaces
17 jgs 153 import sys
18    
19 gross 526 class Test_UtilOnFinley(Test_util,Test_symbols):
20 jgs 153 def setUp(self):
21 gross 442 self.domain =Rectangle(10,10,2)
22     self.functionspace = FunctionOnBoundary(self.domain) # due to a bug in escript python needs to hold a reference to the domain
23 jgs 153
24 gross 437 class Test_Util_SpatialFunctionsOnFinley2DOrder1(Test_Util_SpatialFunctions):
25     def setUp(self):
26     self.order=1
27     d1 = Rectangle(n0=6,n1=12,l0=0.5,order=1,useElementsOnFace=True)
28     d2 = Rectangle(n0=6,n1=12,l0=0.5,order=1,useElementsOnFace=True)
29     d2.setX(d2.getX()+[0.5,0.])
30     self.domain = JoinFaces([d1,d2])
31    
32     class Test_Util_SpatialFunctionsOnFinley2DOrder2(Test_Util_SpatialFunctions):
33     def setUp(self):
34     self.order=2
35     d1 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
36     d2 = Rectangle(n0=3,n1=6,l0=0.5,order=2,useElementsOnFace=True)
37     d2.setX(d2.getX()+[0.5,0.])
38     self.domain = JoinFaces([d1,d2])
39    
40     class Test_Util_SpatialFunctionsOnFinley3DOrder1(Test_Util_SpatialFunctions):
41     def setUp(self):
42     self.order=1
43     d1 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
44     d2 = Brick(n0=6,n1=12,n2=12,l0=0.5,order=1,useElementsOnFace=True)
45     d2.setX(d2.getX()+[0.5,0.,0.])
46     self.domain = JoinFaces([d1,d2])
47    
48     class Test_Util_SpatialFunctionsOnFinley3DOrder2(Test_Util_SpatialFunctions):
49     def setUp(self):
50     self.order=2
51     d1 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
52     d2 = Brick(n0=3,n1=6,n2=6,l0=0.5,order=2,useElementsOnFace=True)
53     d2.setX(d2.getX()+[0.5,0.,0.])
54     self.domain = JoinFaces([d1,d2])
55    
56 jgs 153 if __name__ == '__main__':
57     suite = unittest.TestSuite()
58     suite.addTest(unittest.makeSuite(Test_UtilOnFinley))
59 gross 590 suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder1))
60     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder2))
61     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder1))
62     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder2))
63 jgs 153 s=unittest.TextTestRunner(verbosity=2).run(suite)
64     if s.wasSuccessful():
65     sys.exit(0)
66     else:
67     sys.exit(1)
68    

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26