# Diff of /trunk/dudley/test/python/run_utilOnDudley.py

revision 3087 by jfenwick, Fri Aug 6 05:25:59 2010 UTC revision 3090 by jfenwick, Wed Aug 11 00:51:28 2010 UTC
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
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
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

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

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

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__':
# These tests use JoinFaces and are not MPI parallel
if getMPISizeWorld() == 1: