/[escript]/trunk/escript/py_src/test_util_unary_with_tagged_data.py
ViewVC logotype

Diff of /trunk/escript/py_src/test_util_unary_with_tagged_data.py

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

revision 492 by gross, Fri Feb 3 02:07:24 2006 UTC revision 530 by gross, Wed Feb 15 07:11:00 2006 UTC
# Line 1659  class Test_util_unary_with_tagged_data(T Line 1659  class Test_util_unary_with_tagged_data(T
1659        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
1660        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1661        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1662    
1663       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1664       def test_eigenvalues_taggedData_dim1(self):
1665          arg=Data(numarray.array([[0.33279823386330953]]),self.functionspace)
1666          arg.setTaggedValue(1,numarray.array([[-0.061115457896394387]]))
1667          res=eigenvalues(arg)
1668          ref=Data(numarray.array([0.33279823386330953]),self.functionspace)
1669          ref.setTaggedValue(1,numarray.array([-0.061115457896394387]))
1670          self.failUnless(isinstance(res,Data),"wrong type of result.")
1671          self.failUnlessEqual(res.getShape(),(1,),"wrong shape of result.")
1672          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1673       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1674       def test_eigenvalues_taggedData_dim2(self):
1675          arg=Data(numarray.array([[0.37760109486480786, -0.51481765042925676], [-0.51481765042925676, 0.21659975727086356]]),self.functionspace)
1676          arg.setTaggedValue(1,numarray.array([[0.28147586793302382, 0.037445875768483461], [0.037445875768483461, -0.33641245775790529]]))
1677          res=eigenvalues(arg)
1678          ref=Data(numarray.array([-0.22397305327098097, 0.81817390540665236]),self.functionspace)
1679          ref.setTaggedValue(1,numarray.array([-0.33867351557615905, 0.28373692575127757]))
1680          self.failUnless(isinstance(res,Data),"wrong type of result.")
1681          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
1682          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1683       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1684       def test_eigenvalues_taggedData_dim3(self):
1685          arg=Data(numarray.array([[-0.028453927582187344, -0.18993093160318897, -0.029996204504947221], [-0.18993093160318897, 0.29025386050771895, 0.280540188445356], [-0.029996204504947221, 0.280540188445356, 0.032061143754492427]]),self.functionspace)
1686          arg.setTaggedValue(1,numarray.array([[-0.79529168437596365, 0.31141143092319046, -0.58740338304921114], [0.31141143092319046, -0.68455733117851869, 0.038573037937184806], [-0.58740338304921114, 0.038573037937184806, 0.92511227852485911]]))
1687          res=eigenvalues(arg)
1688          ref=Data(numarray.array([-0.19664234688324986, -0.036237618759115353, 0.5267410423223895]),self.functionspace)
1689          ref.setTaggedValue(1,numarray.array([-1.1727418425501348, -0.49026809359761531, 1.1082731991181265]))
1690          self.failUnless(isinstance(res,Data),"wrong type of result.")
1691          self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")
1692          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")

Legend:
Removed from v.492  
changed lines
  Added in v.530

  ViewVC Help
Powered by ViewVC 1.1.26