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

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

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

revision 584 by gross, Wed Mar 8 05:45:51 2006 UTC revision 585 by gross, Thu Mar 9 23:47:42 2006 UTC
# Line 6164  class Test_util_unary_no_tagged_data(Tes Line 6164  class Test_util_unary_no_tagged_data(Tes
6164        self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")
6165        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6166     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6167       def test_eigenvalues_Symbol_zero_dim1(self):
6168          arg=Symbol(shape=(1, 1))
6169          res=eigenvalues(arg)
6170          s=numarray.zeros((1,1),numarray.Float)
6171          sub=res.substitute({arg:s})
6172          ref=numarray.zeros((1,),numarray.Float)
6173          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
6174          self.failUnlessEqual(res.getShape(),(1,),"wrong shape of result.")
6175          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6176       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6177       def test_eigenvalues_Symbol_zero_dim2(self):
6178          arg=Symbol(shape=(2, 2))
6179          res=eigenvalues(arg)
6180          s=numarray.zeros((2,2),numarray.Float)
6181          sub=res.substitute({arg:s})
6182          ref=numarray.zeros((2,),numarray.Float)
6183          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
6184          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
6185          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6186       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6187       def test_eigenvalues_Symbol_zero_dim3(self):
6188          arg=Symbol(shape=(3, 3))
6189          res=eigenvalues(arg)
6190          s=numarray.zeros((3,3),numarray.Float)
6191          sub=res.substitute({arg:s})
6192          ref=numarray.zeros((3,),numarray.Float)
6193          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
6194          self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")
6195          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6196       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6197     def test_eigenvalues_constData_dim1(self):     def test_eigenvalues_constData_dim1(self):
6198        arg=Data(numarray.array([[0.18644177194421618]]),self.functionspace)        arg=Data(numarray.array([[0.18644177194421618]]),self.functionspace)
6199        res=eigenvalues(arg)        res=eigenvalues(arg)
# Line 6187  class Test_util_unary_no_tagged_data(Tes Line 6217  class Test_util_unary_no_tagged_data(Tes
6217        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
6218        self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")
6219        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6220       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6221       def test_eigenvalues_constData_zero_dim1(self):
6222          arg=Data(numarray.array([[0.]]),self.functionspace)
6223          res=eigenvalues(arg)
6224          ref=Data(numarray.array([0.]),self.functionspace)
6225          self.failUnless(isinstance(res,Data),"wrong type of result.")
6226          self.failUnlessEqual(res.getShape(),(1,),"wrong shape of result.")
6227          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6228       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6229       def test_eigenvalues_constData_zero_dim2(self):
6230          arg=Data(numarray.array([[0., 0.], [0.,0.]]),self.functionspace)
6231          res=eigenvalues(arg)
6232          ref=Data(numarray.array([0., 0.]),self.functionspace)
6233          self.failUnless(isinstance(res,Data),"wrong type of result.")
6234          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
6235          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6236       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6237       def test_eigenvalues_constData_zero_dim3(self):
6238          arg=Data(numarray.array([[0., 0., 0.], [0., 0., 0.], [0., 0., 0.]]),self.functionspace)
6239          res=eigenvalues(arg)
6240          ref=Data(numarray.array([0., 0., 0.]),self.functionspace)
6241          self.failUnless(isinstance(res,Data),"wrong type of result.")
6242          self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")
6243          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
6244     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6245     def test_eigenvalues_expandedData_dim1(self):     def test_eigenvalues_expandedData_dim1(self):
6246        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)

Legend:
Removed from v.584  
changed lines
  Added in v.585

  ViewVC Help
Powered by ViewVC 1.1.26