/[escript]/trunk/ripley/test/python/run_escriptOnMultiResolution.py
ViewVC logotype

Diff of /trunk/ripley/test/python/run_escriptOnMultiResolution.py

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

revision 5985 by jfenwick, Wed Jan 13 02:25:48 2016 UTC revision 5986 by caltinay, Fri Feb 26 04:10:41 2016 UTC
# Line 151  class Test_randomOnMultiRipley(unittest. Line 151  class Test_randomOnMultiRipley(unittest.
151          fs=ContinuousFunction(Rectangle(n0=5*(int(sqrt(mpiSize)+1)),n1=5*(int(sqrt(mpiSize)+1))))          fs=ContinuousFunction(Rectangle(n0=5*(int(sqrt(mpiSize)+1)),n1=5*(int(sqrt(mpiSize)+1))))
152          RandomData((), fs, 2,("gaussian",1,0.5))          RandomData((), fs, 2,("gaussian",1,0.5))
153          RandomData((), fs, 0,("gaussian",2,0.76))          RandomData((), fs, 0,("gaussian",2,0.76))
154          self.assertRaises(RuntimeError, RandomData, (2,2), fs, 0, ("gaussian",2,0.76)) #data not scalar          self.assertRaises(NotImplementedError, RandomData, (2,2), fs, 0, ("gaussian",2,0.76)) #data not scalar
155          self.assertRaises(RuntimeError, RandomData, (), fs, 0, ("gaussian",11,0.1)) #radius too large          self.assertRaises(ValueError, RandomData, (), fs, 0, ("gaussian",11,0.1)) #radius too large
156          RandomData((2,3),fs)          RandomData((2,3),fs)
157    
158      @unittest.skipIf(mpiSize > 1, "3D Multiresolution domains require single process")      @unittest.skipIf(mpiSize > 1, "3D Multiresolution domains require single process")
# Line 161  class Test_randomOnMultiRipley(unittest. Line 161  class Test_randomOnMultiRipley(unittest.
161          fs=ContinuousFunction(Brick(n0=5*mpiSize, n1=5*mpiSize, n2=5*mpiSize))          fs=ContinuousFunction(Brick(n0=5*mpiSize, n1=5*mpiSize, n2=5*mpiSize))
162          RandomData((), fs, 2,("gaussian",1,0.5))          RandomData((), fs, 2,("gaussian",1,0.5))
163          RandomData((), fs, 0,("gaussian",2,0.76))          RandomData((), fs, 0,("gaussian",2,0.76))
164          self.assertRaises(RuntimeError, RandomData, (2,2), fs, 0, ("gaussian",2,0.76)) #data not scalar          self.assertRaises(NotImplementedError, RandomData, (2,2), fs, 0, ("gaussian",2,0.76)) #data not scalar
165          self.assertRaises(RuntimeError, RandomData, (), fs, 0, ("gaussian",11,0.1)) #radius too large          self.assertRaises(ValueError, RandomData, (), fs, 0, ("gaussian",11,0.1)) #radius too large
166          RandomData((2,3),fs)          RandomData((2,3),fs)
167    
168  class Test_multiResolution(unittest.TestCase):  class Test_multiResolution(unittest.TestCase):

Legend:
Removed from v.5985  
changed lines
  Added in v.5986

  ViewVC Help
Powered by ViewVC 1.1.26