/[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 1311 by gross, Tue Sep 26 02:19:18 2006 UTC revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1    #
2  # $Id$  # $Id$
3    #
4    #######################################################
5    #
6    #           Copyright 2003-2007 by ACceSS MNRF
7    #       Copyright 2007 by University of Queensland
8    #
9    #                http://esscc.uq.edu.au
10    #        Primary Business: Queensland, Australia
11    #  Licensed under the Open Software License version 3.0
12    #     http://www.opensource.org/licenses/osl-3.0.php
13    #
14    #######################################################
15    #
16    
17  __copyright__="""  Copyright (c) 2006 by ACcESS MNRF  __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
18                      http://www.access.edu.au                      http://www.access.edu.au
# Line 10  from test_util import Test_util as Test_ Line 24  from test_util import Test_util as Test_
24  from test_util import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary, Test_Util_SpatialFunctions_noGradOnBoundary_noContact  from test_util import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary, Test_Util_SpatialFunctions_noGradOnBoundary_noContact
25  from test_symbols import Test_symbols  from test_symbols import Test_symbols
26    
27  from esys.escript import FunctionOnBoundary, saveVTK  from esys.escript import FunctionOnBoundary
28  from esys.finley import Rectangle,Brick,JoinFaces,ReadMesh  from esys.finley import Rectangle,Brick,JoinFaces,ReadMesh
29  import sys  import sys
30  import os  import os
# Line 36  class Test_UtilOnFinley(Test_util,Test_s Line 50  class Test_UtilOnFinley(Test_util,Test_s
50  class Test_Util_SpatialFunctionsOnFinleyTet2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):  class Test_Util_SpatialFunctionsOnFinleyTet2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
51      def setUp(self):      def setUp(self):
52          self.order=1          self.order=1
53          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order1.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order1.fly",optimize=False)
54      def tearDown(self):      def tearDown(self):
55          del self.order          del self.order
56          del self.domain          del self.domain
# Line 44  class Test_Util_SpatialFunctionsOnFinley Line 58  class Test_Util_SpatialFunctionsOnFinley
58  class Test_Util_SpatialFunctionsOnFinleyTet2DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):  class Test_Util_SpatialFunctionsOnFinleyTet2DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
59      def setUp(self):      def setUp(self):
60          self.order=2          self.order=2
61          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order2.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order2.fly",optimize=False)
62      def tearDown(self):      def tearDown(self):
63          del self.order          del self.order
64          del self.domain          del self.domain
# Line 52  class Test_Util_SpatialFunctionsOnFinley Line 66  class Test_Util_SpatialFunctionsOnFinley
66  class Test_Util_SpatialFunctionsOnFinleyTet3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):  class Test_Util_SpatialFunctionsOnFinleyTet3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
67      def setUp(self):      def setUp(self):
68          self.order=1          self.order=1
69          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order1.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order1.fly",optimize=False)
70      def tearDown(self):      def tearDown(self):
71          del self.order          del self.order
72          del self.domain          del self.domain
# Line 60  class Test_Util_SpatialFunctionsOnFinley Line 74  class Test_Util_SpatialFunctionsOnFinley
74  class Test_Util_SpatialFunctionsOnFinleyTet3DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):  class Test_Util_SpatialFunctionsOnFinleyTet3DOrder2(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
75      def setUp(self):      def setUp(self):
76          self.order=2          self.order=2
77          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order2.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order2.fly",optimize=False)
78      def tearDown(self):      def tearDown(self):
79          del self.order          del self.order
80          del self.domain          del self.domain
# Line 71  class Test_Util_SpatialFunctionsOnFinley Line 85  class Test_Util_SpatialFunctionsOnFinley
85          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)
86          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=1)          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=1)
87          d2.setX(d2.getX()+[0.5,0.])          d2.setX(d2.getX()+[0.5,0.])
88          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
89      def tearDown(self):      def tearDown(self):
90          del self.order          del self.order
91          del self.domain          del self.domain
# Line 82  class Test_Util_SpatialFunctionsOnFinley Line 96  class Test_Util_SpatialFunctionsOnFinley
96          d1 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)          d1 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)
97          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)
98          d2.setX(d2.getX()+[0.5,0.])          d2.setX(d2.getX()+[0.5,0.])
99          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
100      def tearDown(self):      def tearDown(self):
101          del self.order          del self.order
102          del self.domain          del self.domain
# Line 93  class Test_Util_SpatialFunctionsOnFinley Line 107  class Test_Util_SpatialFunctionsOnFinley
107          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)
108          d2 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=1)          d2 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=1)
109          d2.setX(d2.getX()+[0.5,0.,0.])          d2.setX(d2.getX()+[0.5,0.,0.])
110          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
111      def tearDown(self):      def tearDown(self):
112          del self.order          del self.order
113          del self.domain          del self.domain
# Line 104  class Test_Util_SpatialFunctionsOnFinley Line 118  class Test_Util_SpatialFunctionsOnFinley
118          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)
119          d2 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=2)          d2 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=2)
120          d2.setX(d2.getX()+[0.5,0.,0.])          d2.setX(d2.getX()+[0.5,0.,0.])
121          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
122      def tearDown(self):      def tearDown(self):
123          del self.order          del self.order
124          del self.domain          del self.domain
# Line 115  class Test_Util_SpatialFunctionsOnFinley Line 129  class Test_Util_SpatialFunctionsOnFinley
129          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)
130          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=1,useElementsOnFace=True)          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=1,useElementsOnFace=True)
131          d2.setX(d2.getX()+[0.5,0.])          d2.setX(d2.getX()+[0.5,0.])
132          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
133      def tearDown(self):      def tearDown(self):
134          del self.order          del self.order
135          del self.domain          del self.domain
# Line 126  class Test_Util_SpatialFunctionsOnFinley Line 140  class Test_Util_SpatialFunctionsOnFinley
140          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)
141          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2,useElementsOnFace=True)          d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2,useElementsOnFace=True)
142          d2.setX(d2.getX()+[0.5,0.])          d2.setX(d2.getX()+[0.5,0.])
143          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
144      def tearDown(self):      def tearDown(self):
145          del self.order          del self.order
146          del self.domain          del self.domain
# Line 137  class Test_Util_SpatialFunctionsOnFinley Line 151  class Test_Util_SpatialFunctionsOnFinley
151          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)
152          d2 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=1,useElementsOnFace=True)          d2 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=1,useElementsOnFace=True)
153          d2.setX(d2.getX()+[0.5,0.,0.])          d2.setX(d2.getX()+[0.5,0.,0.])
154          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
155      def tearDown(self):      def tearDown(self):
156          del self.order          del self.order
157          del self.domain          del self.domain
# Line 148  class Test_Util_SpatialFunctionsOnFinley Line 162  class Test_Util_SpatialFunctionsOnFinley
162          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)
163          d2 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=2,useElementsOnFace=True)          d2 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=2,useElementsOnFace=True)
164          d2.setX(d2.getX()+[0.5,0.,0.])          d2.setX(d2.getX()+[0.5,0.,0.])
165          self.domain = JoinFaces([d1,d2])          self.domain = JoinFaces([d1,d2],optimize=False)
166      def tearDown(self):      def tearDown(self):
167          del self.order          del self.order
168          del self.domain          del self.domain
# Line 172  if __name__ == '__main__': Line 186  if __name__ == '__main__':
186     else:     else:
187        pass        pass
188     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)
    if s.wasSuccessful():  
      sys.exit(0)  
    else:  
      sys.exit(1)  
     

Legend:
Removed from v.1311  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26