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

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

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

revision 854 by gross, Wed Aug 23 09:31:50 2006 UTC revision 855 by gross, Fri Sep 22 09:30:06 2006 UTC
# Line 7  __license__="""Licensed under the Open S Line 7  __license__="""Licensed under the Open S
7               http://www.opensource.org/licenses/osl-3.0.php"""               http://www.opensource.org/licenses/osl-3.0.php"""
8  import unittest  import unittest
9  from test_util import Test_util as Test_util  from test_util import Test_util as Test_util
10  from test_util import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary  from test_util import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary, Test_Util_SpatialFunctions_noGradOnBoundary_noContact
11  from test_symbols import Test_symbols  from test_symbols import Test_symbols
12    
13  from esys.escript import FunctionOnBoundary  from esys.escript import FunctionOnBoundary, saveVTK
14  from esys.finley import Rectangle,Brick,JoinFaces  from esys.finley import Rectangle,Brick,JoinFaces,ReadMesh
15  import sys  import sys
16    import os
17    
18    try:
19         FINLEY_TEST_DATA=os.environ['FINLEY_TEST_DATA']
20    except KeyError:
21         FINLEY_TEST_DATA='.'
22    
23    FINLEY_TEST_MESH_PATH=FINLEY_TEST_DATA+"/data_meshes/"
24    
25    
26  NE=4 # number elements, must be even  NE=4 # number elements, must be even
27    
# Line 24  class Test_UtilOnFinley(Test_util,Test_s Line 33  class Test_UtilOnFinley(Test_util,Test_s
33         del self.functionspace         del self.functionspace
34         del self.domain         del self.domain
35    
36  class Test_Util_SpatialFunctionsOnFinley2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary):  class Test_Util_SpatialFunctionsOnFinleyTet2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
37        def setUp(self):
38            self.order=1
39            self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order1.fly")
40        def tearDown(self):
41            del self.order
42            del self.domain
43    
44    class Test_Util_SpatialFunctionsOnFinleyTet2DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
45        def setUp(self):
46            self.order=2
47            self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order2.fly")
48        def tearDown(self):
49            del self.order
50            del self.domain
51    
52    class Test_Util_SpatialFunctionsOnFinleyTet3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
53        def setUp(self):
54            self.order=1
55            self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order1.fly")
56        def tearDown(self):
57            del self.order
58            del self.domain
59    
60    class Test_Util_SpatialFunctionsOnFinleyTet3DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
61        def setUp(self):
62            self.order=2
63            self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order2.fly")
64        def tearDown(self):
65            del self.order
66            del self.domain
67    
68    class Test_Util_SpatialFunctionsOnFinleyHex2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary):
69      def setUp(self):      def setUp(self):
70          self.order=1          self.order=1
71          d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=1)          d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=1)
# Line 35  class Test_Util_SpatialFunctionsOnFinley Line 76  class Test_Util_SpatialFunctionsOnFinley
76          del self.order          del self.order
77          del self.domain          del self.domain
78    
79  class Test_Util_SpatialFunctionsOnFinley2DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary):  class Test_Util_SpatialFunctionsOnFinleyHex2DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary):
80      def setUp(self):      def setUp(self):
81          self.order=2          self.order=2
82          d1 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)          d1 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)
# Line 46  class Test_Util_SpatialFunctionsOnFinley Line 87  class Test_Util_SpatialFunctionsOnFinley
87          del self.order          del self.order
88          del self.domain          del self.domain
89    
90  class Test_Util_SpatialFunctionsOnFinley3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary):  class Test_Util_SpatialFunctionsOnFinleyHex3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary):
91      def setUp(self):      def setUp(self):
92          self.order=1          self.order=1
93          d1 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=1)          d1 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=1)
# Line 57  class Test_Util_SpatialFunctionsOnFinley Line 98  class Test_Util_SpatialFunctionsOnFinley
98          del self.order          del self.order
99          del self.domain          del self.domain
100    
101  class Test_Util_SpatialFunctionsOnFinley3DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary):  class Test_Util_SpatialFunctionsOnFinleyHex3DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary):
102      def setUp(self):      def setUp(self):
103          self.order=2          self.order=2
104          d1 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=2)          d1 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=2)
# Line 68  class Test_Util_SpatialFunctionsOnFinley Line 109  class Test_Util_SpatialFunctionsOnFinley
109          del self.order          del self.order
110          del self.domain          del self.domain
111    
112  class Test_Util_SpatialFunctionsOnFinley2DOrder1useElementsOnFace(Test_Util_SpatialFunctions):  class Test_Util_SpatialFunctionsOnFinleyHex2DOrder1useElementsOnFace(Test_Util_SpatialFunctions):
113      def setUp(self):      def setUp(self):
114          self.order=1          self.order=1
115          d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=1,useElementsOnFace=True)          d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=1,useElementsOnFace=True)
# Line 79  class Test_Util_SpatialFunctionsOnFinley Line 120  class Test_Util_SpatialFunctionsOnFinley
120          del self.order          del self.order
121          del self.domain          del self.domain
122    
123  class Test_Util_SpatialFunctionsOnFinley2DOrder2useElementsOnFace(Test_Util_SpatialFunctions):  class Test_Util_SpatialFunctionsOnFinleyHex2DOrder2useElementsOnFace(Test_Util_SpatialFunctions):
124      def setUp(self):      def setUp(self):
125          self.order=2          self.order=2
126          d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=2,useElementsOnFace=True)          d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=2,useElementsOnFace=True)
# Line 90  class Test_Util_SpatialFunctionsOnFinley Line 131  class Test_Util_SpatialFunctionsOnFinley
131          del self.order          del self.order
132          del self.domain          del self.domain
133    
134  class Test_Util_SpatialFunctionsOnFinley3DOrder1useElementsOnFace(Test_Util_SpatialFunctions):  class Test_Util_SpatialFunctionsOnFinleyHex3DOrder1useElementsOnFace(Test_Util_SpatialFunctions):
135      def setUp(self):      def setUp(self):
136          self.order=1          self.order=1
137          d1 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=1,useElementsOnFace=True)          d1 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=1,useElementsOnFace=True)
# Line 101  class Test_Util_SpatialFunctionsOnFinley Line 142  class Test_Util_SpatialFunctionsOnFinley
142          del self.order          del self.order
143          del self.domain          del self.domain
144    
145  class Test_Util_SpatialFunctionsOnFinley3DOrder2useElementsOnFace(Test_Util_SpatialFunctions):  class Test_Util_SpatialFunctionsOnFinleyHex3DOrder2useElementsOnFace(Test_Util_SpatialFunctions):
146      def setUp(self):      def setUp(self):
147          self.order=2          self.order=2
148          d1 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=2,useElementsOnFace=True)          d1 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=2,useElementsOnFace=True)
# Line 114  class Test_Util_SpatialFunctionsOnFinley Line 155  class Test_Util_SpatialFunctionsOnFinley
155    
156  if __name__ == '__main__':  if __name__ == '__main__':
157     suite = unittest.TestSuite()     suite = unittest.TestSuite()
158     # suite.addTest(Test_UtilOnFinley("test_generalTensorTransposedProduct_Symbol_rank1_taggedData_rank3_offset1"))     # suite.addTest(Test_UtilOnFinleyHex("test_generalTensorTransposedProduct_Symbol_rank1_taggedData_rank3_offset1"))
159     suite.addTest(unittest.makeSuite(Test_UtilOnFinley))     suite.addTest(unittest.makeSuite(Test_UtilOnFinley))
160     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder1))     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex2DOrder1))
161     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder2))     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex2DOrder2))
162     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder1))     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex3DOrder1))
163     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder2))     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex3DOrder2))
164     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder1useElementsOnFace))     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyTet2DOrder1))
165     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley2DOrder2useElementsOnFace))     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyTet2DOrder2))
166     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder1useElementsOnFace))     # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyTet3DOrder1))
167     suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinley3DOrder2useElementsOnFace))     # suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyTet3DOrder2))
168       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex2DOrder1useElementsOnFace))
169       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex2DOrder2useElementsOnFace))
170       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex3DOrder1useElementsOnFace))
171       suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnFinleyHex3DOrder2useElementsOnFace))
172     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)
173     if s.wasSuccessful():     if s.wasSuccessful():
174       sys.exit(0)       sys.exit(0)

Legend:
Removed from v.854  
changed lines
  Added in v.855

  ViewVC Help
Powered by ViewVC 1.1.26