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

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

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

revision 1311 by gross, Tue May 29 07:05:59 2007 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  """  """
18  Test suite for the linearPDE  and pdetools test on finley  Test suite for the linearPDE  and pdetools test on finley
# Line 76  class Test_LinearPDEOnFinleyTet2DOrder1( Line 90  class Test_LinearPDEOnFinleyTet2DOrder1(
90     RES_TOL=1.e-7     RES_TOL=1.e-7
91     ABS_TOL=1.e-8     ABS_TOL=1.e-8
92     def setUp(self):     def setUp(self):
93          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order1.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order1.fly",optimize=False)
94     def tearDown(self):     def tearDown(self):
95          del self.domain          del self.domain
96    
# Line 84  class Test_LinearPDEOnFinleyTet2DOrder2( Line 98  class Test_LinearPDEOnFinleyTet2DOrder2(
98     RES_TOL=1.e-7     RES_TOL=1.e-7
99     ABS_TOL=1.e-8     ABS_TOL=1.e-8
100     def setUp(self):     def setUp(self):
101          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order2.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_2D_order2.fly",optimize=False)
102     def tearDown(self):     def tearDown(self):
103          del self.domain          del self.domain
104    
# Line 92  class Test_LinearPDEOnFinleyTet3DOrder1( Line 106  class Test_LinearPDEOnFinleyTet3DOrder1(
106     RES_TOL=1.e-7     RES_TOL=1.e-7
107     ABS_TOL=1.e-8     ABS_TOL=1.e-8
108     def setUp(self):     def setUp(self):
109          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order1.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order1.fly",optimize=False)
110    
111  class Test_LinearPDEOnFinleyTet3DOrder2(Test_LinearPDE,Test_pdetools,Test_assemblage_3Do2):  class Test_LinearPDEOnFinleyTet3DOrder2(Test_LinearPDE,Test_pdetools,Test_assemblage_3Do2):
112     RES_TOL=1.e-7     RES_TOL=1.e-7
113     ABS_TOL=1.e-8     ABS_TOL=1.e-8
114     def setUp(self):     def setUp(self):
115          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order2.fly")          self.domain = ReadMesh(FINLEY_TEST_MESH_PATH+"tet_3D_order2.fly",optimize=False)
116     def tearDown(self):     def tearDown(self):
117          del self.domain          del self.domain
118    
# Line 121  class Test_AssemblePDEwithFinley_2Do1_Co Line 135  class Test_AssemblePDEwithFinley_2Do1_Co
135         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=1)         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=1)
136         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
137         d2.setX(d2.getX()+[0.5,0.])         d2.setX(d2.getX()+[0.5,0.])
138         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
139     def tearDown(self):     def tearDown(self):
140          del self.domain          del self.domain
141    
# Line 135  class Test_AssemblePDEwithFinley_2Do2_Co Line 149  class Test_AssemblePDEwithFinley_2Do2_Co
149         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=2)         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=2)
150         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
151         d2.setX(d2.getX()+[0.5,0.])         d2.setX(d2.getX()+[0.5,0.])
152         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
153     def tearDown(self):     def tearDown(self):
154          del self.domain          del self.domain
155    
# Line 149  class Test_AssemblePDEwithFinley_3Do1_Co Line 163  class Test_AssemblePDEwithFinley_3Do1_Co
163         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=1)         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=1)
164         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
165         d2.setX(d2.getX()+[0.5,0.,0.])         d2.setX(d2.getX()+[0.5,0.,0.])
166         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
167     def tearDown(self):     def tearDown(self):
168          del self.domain          del self.domain
169    
# Line 163  class Test_AssemblePDEwithFinley_3Do2_Co Line 177  class Test_AssemblePDEwithFinley_3Do2_Co
177         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=2)         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=2)
178         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
179         d2.setX(d2.getX()+[0.5,0.,0.])         d2.setX(d2.getX()+[0.5,0.,0.])
180         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
181     def tearDown(self):     def tearDown(self):
182          del self.domain          del self.domain
183    
# Line 178  class Test_AssemblePDEwithFinley_2Do1_Co Line 192  class Test_AssemblePDEwithFinley_2Do1_Co
192         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=1,useElementsOnFace=True)         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=1,useElementsOnFace=True)
193         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
194         d2.setX(d2.getX()+[0.5,0.])         d2.setX(d2.getX()+[0.5,0.])
195         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
196     def tearDown(self):     def tearDown(self):
197          del self.domain          del self.domain
198    
# Line 192  class Test_AssemblePDEwithFinley_2Do2_Co Line 206  class Test_AssemblePDEwithFinley_2Do2_Co
206         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=2,useElementsOnFace=True)         d2 = Rectangle(n0=int(NE/2),n1=NE,l0=0.5,order=2,useElementsOnFace=True)
207         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
208         d2.setX(d2.getX()+[0.5,0.])         d2.setX(d2.getX()+[0.5,0.])
209         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
210     def tearDown(self):     def tearDown(self):
211          del self.domain          del self.domain
212    
# Line 206  class Test_AssemblePDEwithFinley_3Do1_Co Line 220  class Test_AssemblePDEwithFinley_3Do1_Co
220         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=1,useElementsOnFace=True)         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=1,useElementsOnFace=True)
221         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
222         d2.setX(d2.getX()+[0.5,0.,0.])         d2.setX(d2.getX()+[0.5,0.,0.])
223         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
224     def tearDown(self):     def tearDown(self):
225          del self.domain          del self.domain
226    
# Line 220  class Test_AssemblePDEwithFinley_3Do2_Co Line 234  class Test_AssemblePDEwithFinley_3Do2_Co
234         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=2,useElementsOnFace=True)         d2 = Brick(n0=int(NE/2),n1=NE,n2=NE,l0=0.5,order=2,useElementsOnFace=True)
235         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))         ContinuousFunction(d2).setTags(2,Scalar(1,ContinuousFunction(d2)))
236         d2.setX(d2.getX()+[0.5,0.,0.])         d2.setX(d2.getX()+[0.5,0.,0.])
237         self.domain = JoinFaces([d1,d2])         self.domain = JoinFaces([d1,d2],optimize=False)
238     def tearDown(self):     def tearDown(self):
239          del self.domain          del self.domain
240    
# Line 249  if __name__ == '__main__': Line 263  if __name__ == '__main__':
263        pass        pass
264    
265     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