/[escript]/trunk/speckley/test/python/run_SpeckleyRipleyCoupler.py
ViewVC logotype

Diff of /trunk/speckley/test/python/run_SpeckleyRipleyCoupler.py

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

revision 5287 by sshaw, Mon Nov 17 23:17:34 2014 UTC revision 5288 by sshaw, Tue Dec 2 23:18:40 2014 UTC
# Line 27  import os Line 27  import os
27  import esys.escriptcore.utestselect as unittest  import esys.escriptcore.utestselect as unittest
28  from esys.escriptcore.testing import *  from esys.escriptcore.testing import *
29  from esys.escript import *  from esys.escript import *
 from esys.escriptcore.domainCouplers import SpeckleyToRipley  
 from esys.ripley import Rectangle as rRectangle, Brick as rBrick  
30  from esys.speckley import Rectangle as sRectangle, Brick as sBrick  from esys.speckley import Rectangle as sRectangle, Brick as sBrick
 from esys.finley import Rectangle as fRectangle  
31    
32    #domain families may not be present
33    HAS_RIPLEY = True
34    HAS_FINLEY = True
35    try:
36        from esys.escriptcore.domainCouplers import SpeckleyToRipley
37        from esys.ripley import Rectangle as rRectangle, Brick as rBrick
38    except ImportError as e:
39        HAS_RIPLEY = False
40    
41    try:
42        from esys.finley import Rectangle as fRectangle
43    except ImportError as e:
44        HAS_FINLEY = False
45    
46    @unittest.skipIf(not HAS_RIPLEY, "Ripley domains not present")
47  class Test_ripleyCoupler(unittest.TestCase):  class Test_ripleyCoupler(unittest.TestCase):
48    
49      def calculateVariance(self, s, r):      def calculateVariance(self, s, r):
# Line 209  class Test_ripleyCoupler(unittest.TestCa Line 221  class Test_ripleyCoupler(unittest.TestCa
221              with self.assertRaises(RuntimeError): #subdivision mismatch              with self.assertRaises(RuntimeError): #subdivision mismatch
222                  self.calculateVariance(r, s)                  self.calculateVariance(r, s)
223    
224        @unittest.skipIf(not HAS_FINLEY, "Finley domains not present")
225      def test_bad_domains(self):      def test_bad_domains(self):
226          ranks = getMPISizeWorld()          ranks = getMPISizeWorld()
227          f = fRectangle(2*ranks - 1, 2, l0=1., l1=2., d0=ranks)          f = fRectangle(2*ranks - 1, 2, l0=1., l1=2., d0=ranks)

Legend:
Removed from v.5287  
changed lines
  Added in v.5288

  ViewVC Help
Powered by ViewVC 1.1.26