/[escript]/trunk/escript/test/python/test_pdetools.py
ViewVC logotype

Diff of /trunk/escript/test/python/test_pdetools.py

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

revision 3258 by jfenwick, Thu Jan 28 02:03:15 2010 UTC revision 3259 by jfenwick, Mon Oct 11 01:48:14 2010 UTC
# Line 24  Test suite for the pdetools module Line 24  Test suite for the pdetools module
24    
25  The tests must be linked with a Domain class object in the setUp method:  The tests must be linked with a Domain class object in the setUp method:
26    
27     from esys.finley import Rectangle     from esys.dudley import Rectangle
28     class Test_LinearPDEOnFinley(Test_LinearPDE):     class Test_LinearPDEOnDudley(Test_LinearPDE):
29         RES_TOL=1.e-8         RES_TOL=1.e-8
30         def setUp(self):         def setUp(self):
31             self.domain = Rectangle(10,10,2)             self.domain = Rectangle(10,10,2)
32         def tearDown(self):         def tearDown(self):
33             del self.domain             del self.domain
34     suite = unittest.TestSuite()     suite = unittest.TestSuite()
35     suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinley))     suite.addTest(unittest.makeSuite(Test_LinearPDEOnDudley))
36     unittest.TextTestRunner(verbosity=2).run(suite)     unittest.TextTestRunner(verbosity=2).run(suite)
37    
38  :var __author__: name of author  :var __author__: name of author
# Line 1138  class Test_pdetools(Test_pdetools_noLump Line 1138  class Test_pdetools(Test_pdetools_noLump
1138        h=Lsup(self.domain.getSize())        h=Lsup(self.domain.getSize())
1139        p=Projector(self.domain,reduce=True,fast=True)        p=Projector(self.domain,reduce=True,fast=True)
1140        td_ref=x        td_ref=x
1141        td=p(td_ref.interpolate(Function(self.domain)))        res=td_ref.interpolate(Function(self.domain))
1142          td=p(res)
1143        self.failUnless(Lsup(td-td_ref)<Lsup(td_ref)*h,"value wrong")        self.failUnless(Lsup(td-td_ref)<Lsup(td_ref)*h,"value wrong")
1144    
1145      def testProjector_rank2_fast_reduced(self):      def testProjector_rank2_fast_reduced(self):

Legend:
Removed from v.3258  
changed lines
  Added in v.3259

  ViewVC Help
Powered by ViewVC 1.1.26