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

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

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

revision 2798 by jfenwick, Wed Oct 7 00:35:06 2009 UTC revision 2799 by jfenwick, Thu Dec 3 01:35:08 2009 UTC
# Line 1464  class Test_Dump(unittest.TestCase): Line 1464  class Test_Dump(unittest.TestCase):
1464      self.failUnlessRaises(RuntimeError,d.setTaggedValue,1,self.arg0*2)      self.failUnlessRaises(RuntimeError,d.setTaggedValue,1,self.arg0*2)
1465      d=Data(self.arg0,ReducedSolution(self.domain))      d=Data(self.arg0,ReducedSolution(self.domain))
1466      self.failUnlessRaises(RuntimeError,d.setTaggedValue,1,self.arg0*2)      self.failUnlessRaises(RuntimeError,d.setTaggedValue,1,self.arg0*2)
1467        
1468    class Test_Lazy(unittest.TestCase):
1469      def makeLazyObj(self):
1470        d=delay(Data(1,self.mainfs,True))
1471        e=delay(Data(2,self.mainfs,True))
1472        p=(d+e*d)/e
1473        q=p/(3*d)
1474        r1=q*q
1475        r2=q+q
1476        r3=q/4
1477        f=delay(Data(4,self.otherfs,True))
1478        t=Data(4,self.mainfs)
1479        t.tag()
1480        t=delay(t)
1481        t=t*2
1482        return r1,r2,r3,f,t
1483      
1484      def test_GroupRes(self):
1485        rr1,rr2,rr3,rf,rt=self.makeLazyObj()
1486        rr1=resolve(rr1)
1487        rr2=resolve(rr2)
1488        rr3=resolve(rr3)
1489        rf=resolve(rf)
1490        rt=resolve(rt)
1491        r1,r2,r3,f,t=self.makeLazyObj()
1492        resolveGroup((r1,r2,r3))
1493        err=Lsup(rr1-r1)+Lsup(rr2-r2)+Lsup(rr3-r3)
1494        self.failUnless(err<0.001, "Same functionspace group resolve")
1495        r1,r2,r3,f,t=self.makeLazyObj()
1496        resolveGroup((r1,r2,r3,rt))
1497        err=Lsup(rr1-r1)+Lsup(rr2-r2)+Lsup(rr3-r3)+Lsup(rt-t)
1498        self.failUnless(err<0.001, "Same functionspace group resolve with early collapse")
1499        r1,r2,r3,f,t=self.makeLazyObj()
1500        err=Lsup(rr1-r1)+Lsup(rr2-r2)+Lsup(rr3-r3)+Lsup(rt-t)+Lsup(rf-f)
1501        self.failUnless(err<0.001, "Same functionspace group resolve with mixed functionspaces")
1502        
1503        

Legend:
Removed from v.2798  
changed lines
  Added in v.2799

  ViewVC Help
Powered by ViewVC 1.1.26