/[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 3087 by jfenwick, Fri Aug 6 05:25:59 2010 UTC revision 3090 by jfenwick, Wed Aug 11 00:51:28 2010 UTC
# Line 21  __url__="https://launchpad.net/escript-f Line 21  __url__="https://launchpad.net/escript-f
21    
22  import unittest  import unittest
23  from test_util import Test_util as Test_util  from test_util import Test_util as Test_util
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_noContact
25  from test_symbols import Test_symbols  from test_symbols import Test_symbols
26    
27  from esys.escript import *  from esys.escript import *
# Line 143  class Test_Util_SpatialFunctionsOnDudley Line 143  class Test_Util_SpatialFunctionsOnDudley
143          del self.order          del self.order
144          del self.domain          del self.domain
145    
 class Test_Util_SpatialFunctionsOnDudleyHex2DOrder1withContact(Test_Util_SpatialFunctions_noGradOnBoundary):  
     def setUp(self):  
         self.order=1  
         d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=1)  
         d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=1)  
         d2.setX(d2.getX()+[0.5,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
   
 class Test_Util_SpatialFunctionsOnDudleyHex2DOrder2withContact(Test_Util_SpatialFunctions_noGradOnBoundary):  
     def setUp(self):  
         self.order=2  
         d1 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)  
         d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2)  
         d2.setX(d2.getX()+[0.5,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
   
 class Test_Util_SpatialFunctionsOnDudleyHex3DOrder1withContact(Test_Util_SpatialFunctions_noGradOnBoundary):  
     def setUp(self):  
         self.order=1  
         d1 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=1)  
         d2 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=1)  
         d2.setX(d2.getX()+[0.5,0.,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
   
 class Test_Util_SpatialFunctionsOnDudleyHex3DOrder2withContact(Test_Util_SpatialFunctions_noGradOnBoundary):  
     def setUp(self):  
         self.order=2  
         d1 = Brick(n0=NE/2+1,n1=NE,n2=NE,l0=0.5,order=2)  
         d2 = Brick(n0=NE/2,n1=NE,n2=NE,l0=0.5,order=2)  
         d2.setX(d2.getX()+[0.5,0.,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
146    
 class Test_Util_SpatialFunctionsOnDudleyHex2DOrder1useElementsOnFacewithContact(Test_Util_SpatialFunctions):  
     def setUp(self):  
         self.order=1  
         d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=1,useElementsOnFace=True)  
         d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=1,useElementsOnFace=True)  
         d2.setX(d2.getX()+[0.5,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
   
 class Test_Util_SpatialFunctionsOnDudleyHex2DOrder2useElementsOnFacewithContact(Test_Util_SpatialFunctions):  
     def setUp(self):  
         self.order=2  
         d1 = Rectangle(n0=NE/2+1,n1=NE,l0=0.5,order=2,useElementsOnFace=True)  
         d2 = Rectangle(n0=NE/2,n1=NE,l0=0.5,order=2,useElementsOnFace=True)  
         d2.setX(d2.getX()+[0.5,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
   
 class Test_Util_SpatialFunctionsOnDudleyHex3DOrder1useElementsOnFacewithContact(Test_Util_SpatialFunctions):  
     def setUp(self):  
         self.order=1  
         d1 = Brick(n0=NE/2,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)  
         d2.setX(d2.getX()+[0.5,0.,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
   
 class Test_Util_SpatialFunctionsOnDudleyHex3DOrder2useElementsOnFacewithContact(Test_Util_SpatialFunctions):  
     def setUp(self):  
         self.order=2  
         d1 = Brick(n0=NE/2,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)  
         d2.setX(d2.getX()+[0.5,0.,0.])  
         self.domain = JoinFaces([d1,d2],optimize=False)  
     def tearDown(self):  
         del self.order  
         del self.domain  
147    
148  if __name__ == '__main__':  if __name__ == '__main__':
149     suite = unittest.TestSuite()     suite = unittest.TestSuite()
# Line 247  if __name__ == '__main__': Line 161  if __name__ == '__main__':
161        suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder1))        suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder1))
162        suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder2))        suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder2))
163        suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DMacro))        suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DMacro))
       # These tests use JoinFaces and are not MPI parallel  
       if getMPISizeWorld() == 1:  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex2DOrder1withContact))  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex2DOrder2withContact))  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder1withContact))  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder2withContact))  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex2DOrder1useElementsOnFacewithContact))  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex2DOrder2useElementsOnFacewithContact))  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder1useElementsOnFacewithContact))  
         suite.addTest(unittest.makeSuite(Test_Util_SpatialFunctionsOnDudleyHex3DOrder2useElementsOnFacewithContact))  
164     else:     else:
165        pass        pass
166     s=unittest.TextTestRunner(verbosity=2).run(suite)     s=unittest.TextTestRunner(verbosity=2).run(suite)

Legend:
Removed from v.3087  
changed lines
  Added in v.3090

  ViewVC Help
Powered by ViewVC 1.1.26