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

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

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

revision 794 by gross, Sat Apr 8 16:13:02 2006 UTC revision 795 by ksteube, Mon Jul 31 01:23:58 2006 UTC
# Line 1497  class Test_util_unary_with_tagged_data(T Line 1497  class Test_util_unary_with_tagged_data(T
1497        res=inverse(arg)        res=inverse(arg)
1498        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
1499        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")
1500        self.failUnless(Lsup(matrixmult(res,arg)-kronecker(1))<=self.RES_TOL,"wrong result")        self.failUnless(Lsup(matrix_mult(res,arg)-kronecker(1))<=self.RES_TOL,"wrong result")
1501     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1502     def test_inverse_taggedData_dim2(self):     def test_inverse_taggedData_dim2(self):
1503        arg=Data(numarray.array([[2.1762682607002422, -0.78050782824831111], [-0.83510184055361858, 2.604492189120557]]),self.functionspace)        arg=Data(numarray.array([[2.1762682607002422, -0.78050782824831111], [-0.83510184055361858, 2.604492189120557]]),self.functionspace)
# Line 1505  class Test_util_unary_with_tagged_data(T Line 1505  class Test_util_unary_with_tagged_data(T
1505        res=inverse(arg)        res=inverse(arg)
1506        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
1507        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
1508        self.failUnless(Lsup(matrixmult(res,arg)-kronecker(2))<=self.RES_TOL,"wrong result")        self.failUnless(Lsup(matrix_mult(res,arg)-kronecker(2))<=self.RES_TOL,"wrong result")
1509     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1510     def test_inverse_taggedData_dim3(self):     def test_inverse_taggedData_dim3(self):
1511        arg=Data(numarray.array([[1.0566731035132446, -0.23529223422203982, -0.73657527200271922], [-0.90461086237095145, 2.3942152365412581, -0.0078023115760492701], [-0.32951652966235834, 0.5634604257647613, 1.716379935670141]]),self.functionspace)        arg=Data(numarray.array([[1.0566731035132446, -0.23529223422203982, -0.73657527200271922], [-0.90461086237095145, 2.3942152365412581, -0.0078023115760492701], [-0.32951652966235834, 0.5634604257647613, 1.716379935670141]]),self.functionspace)
# Line 1513  class Test_util_unary_with_tagged_data(T Line 1513  class Test_util_unary_with_tagged_data(T
1513        res=inverse(arg)        res=inverse(arg)
1514        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
1515        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")
1516        self.failUnless(Lsup(matrixmult(res,arg)-kronecker(3))<=self.RES_TOL,"wrong result")        self.failUnless(Lsup(matrix_mult(res,arg)-kronecker(3))<=self.RES_TOL,"wrong result")
1517     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1518     def test_transpose_taggedData_rank0_offset0(self):     def test_transpose_taggedData_rank0_offset0(self):
1519        arg=Data(0.00245568699765,self.functionspace)        arg=Data(0.00245568699765,self.functionspace)
# Line 1747  class Test_util_unary_with_tagged_data(T Line 1747  class Test_util_unary_with_tagged_data(T
1747        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1748        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")
1749        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1750        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1751        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1752        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")
1753     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1754     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case5(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case5(self):
1755        arg=Data(numarray.array([[-0.99999999999999967, -6.4606252205695602e-16], [-6.4606252205695602e-16, -0.99999999999999967]]),self.functionspace)        arg=Data(numarray.array([[-0.99999999999999967, -6.4606252205695602e-16], [-6.4606252205695602e-16, -0.99999999999999967]]),self.functionspace)
# Line 1762  class Test_util_unary_with_tagged_data(T Line 1762  class Test_util_unary_with_tagged_data(T
1762        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1763        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")
1764        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1765        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1766        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1767        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")
1768     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1769     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case7(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case7(self):
1770        arg=Data(numarray.array([[0.0001, 0.0], [0.0, 0.0]]),self.functionspace)        arg=Data(numarray.array([[0.0001, 0.0], [0.0, 0.0]]),self.functionspace)
# Line 1777  class Test_util_unary_with_tagged_data(T Line 1777  class Test_util_unary_with_tagged_data(T
1777        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1778        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")
1779        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1780        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1781        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1782        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")
1783     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1784     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case9(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case9(self):
1785        arg=Data(numarray.array([[1.0, 0.0], [0.0, 2.0]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0], [0.0, 2.0]]),self.functionspace)
# Line 1792  class Test_util_unary_with_tagged_data(T Line 1792  class Test_util_unary_with_tagged_data(T
1792        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1793        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")
1794        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1795        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1796        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1797        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")
1798     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1799     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case11(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case11(self):
1800        arg=Data(numarray.array([[1.0605983718317855, 0.23859213977648688], [0.23859213977648688, 1.9394016281682138]]),self.functionspace)        arg=Data(numarray.array([[1.0605983718317855, 0.23859213977648688], [0.23859213977648688, 1.9394016281682138]]),self.functionspace)
# Line 1807  class Test_util_unary_with_tagged_data(T Line 1807  class Test_util_unary_with_tagged_data(T
1807        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1808        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")
1809        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1810        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1811        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1812        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")
1813     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1814     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case13(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim2_case13(self):
1815        arg=Data(numarray.array([[1000000.0, 0.0], [0.0, 1.0]]),self.functionspace)        arg=Data(numarray.array([[1000000.0, 0.0], [0.0, 1.0]]),self.functionspace)
# Line 1822  class Test_util_unary_with_tagged_data(T Line 1822  class Test_util_unary_with_tagged_data(T
1822        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1823        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(2, 2),"wrong shape of result for eigenvectors.")
1824        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1825        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1826        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1827        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(2))<=self.RES_TOL,"eigenvectors are not orthonormal")
1828     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1829     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case0(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case0(self):
1830        arg=Data(numarray.array([[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]),self.functionspace)        arg=Data(numarray.array([[0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0]]),self.functionspace)
# Line 1837  class Test_util_unary_with_tagged_data(T Line 1837  class Test_util_unary_with_tagged_data(T
1837        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1838        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1839        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1840        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1841        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1842        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1843        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1844     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1845     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case10(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case10(self):
1846        arg=Data(numarray.array([[0.9, 0.0, 0.0], [0.0, 0.9, 0.0], [0.0, 0.0, 1.0]]),self.functionspace)        arg=Data(numarray.array([[0.9, 0.0, 0.0], [0.0, 0.9, 0.0], [0.0, 0.0, 1.0]]),self.functionspace)
# Line 1853  class Test_util_unary_with_tagged_data(T Line 1853  class Test_util_unary_with_tagged_data(T
1853        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1854        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1855        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1856        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1857        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1858        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1859        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1860     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1861     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case12(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case12(self):
1862        arg=Data(numarray.array([[0.92694799760252555, 0.0, 0.044368966468320177], [0.0, 0.9, 0.0], [0.044368966468320184, 0.0, 0.97305200239747425]]),self.functionspace)        arg=Data(numarray.array([[0.92694799760252555, 0.0, 0.044368966468320177], [0.0, 0.9, 0.0], [0.044368966468320184, 0.0, 0.97305200239747425]]),self.functionspace)
# Line 1869  class Test_util_unary_with_tagged_data(T Line 1869  class Test_util_unary_with_tagged_data(T
1869        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1870        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1871        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1872        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1873        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1874        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1875        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1876     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1877     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case14(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case14(self):
1878        arg=Data(numarray.array([[0.92379770619813639, 0.041031106298491521, -0.011396846732439278], [0.041031106298491535, 0.97074428392640366, -0.019650012730342326], [-0.011396846732439236, -0.019650012730342337, 0.90545800987545966]]),self.functionspace)        arg=Data(numarray.array([[0.92379770619813639, 0.041031106298491521, -0.011396846732439278], [0.041031106298491535, 0.97074428392640366, -0.019650012730342326], [-0.011396846732439236, -0.019650012730342337, 0.90545800987545966]]),self.functionspace)
# Line 1885  class Test_util_unary_with_tagged_data(T Line 1885  class Test_util_unary_with_tagged_data(T
1885        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1886        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1887        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1888        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1889        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1890        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1891        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1892     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1893     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case17(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case17(self):
1894        arg=Data(numarray.array([[1.0269479976025255, 0.0, 0.044368966468320309], [0.0, 1.1, 0.0], [0.044368966468320295, 0.0, 1.0730520023974743]]),self.functionspace)        arg=Data(numarray.array([[1.0269479976025255, 0.0, 0.044368966468320309], [0.0, 1.1, 0.0], [0.044368966468320295, 0.0, 1.0730520023974743]]),self.functionspace)
# Line 1901  class Test_util_unary_with_tagged_data(T Line 1901  class Test_util_unary_with_tagged_data(T
1901        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1902        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1903        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1904        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1905        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1906        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1907        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1908     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1909     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case19(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case19(self):
1910        arg=Data(numarray.array([[1.035487967756175, 0.026317079185831614, -0.039960133424212368], [0.026317079185831618, 1.0892641940924184, 0.016301362071911414], [-0.039960133424212355, 0.016301362071911431, 1.0752478381514063]]),self.functionspace)        arg=Data(numarray.array([[1.035487967756175, 0.026317079185831614, -0.039960133424212368], [0.026317079185831618, 1.0892641940924184, 0.016301362071911414], [-0.039960133424212355, 0.016301362071911431, 1.0752478381514063]]),self.functionspace)
# Line 1917  class Test_util_unary_with_tagged_data(T Line 1917  class Test_util_unary_with_tagged_data(T
1917        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1918        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1919        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1920        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1921        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1922        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1923        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1924     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1925     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case21(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case21(self):
1926        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 2.7060899725040968, -0.45555123008643206], [0.0, -0.45555123008643228, 2.2939100274959037]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 2.7060899725040968, -0.45555123008643206], [0.0, -0.45555123008643228, 2.2939100274959037]]),self.functionspace)
# Line 1933  class Test_util_unary_with_tagged_data(T Line 1933  class Test_util_unary_with_tagged_data(T
1933        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1934        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1935        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1936        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1937        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1938        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1939        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1940     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1941     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case23(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case23(self):
1942        arg=Data(numarray.array([[3.0, 0.0, 0.0], [0.0, 1.153410887977139, -0.36038311201720391], [0.0, -0.36038311201720391, 1.8465891120228608]]),self.functionspace)        arg=Data(numarray.array([[3.0, 0.0, 0.0], [0.0, 1.153410887977139, -0.36038311201720391], [0.0, -0.36038311201720391, 1.8465891120228608]]),self.functionspace)
# Line 1949  class Test_util_unary_with_tagged_data(T Line 1949  class Test_util_unary_with_tagged_data(T
1949        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1950        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1951        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1952        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1953        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1954        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1955        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1956     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1957     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case25(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case25(self):
1958        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 30000.0]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 30000.0]]),self.functionspace)
# Line 1965  class Test_util_unary_with_tagged_data(T Line 1965  class Test_util_unary_with_tagged_data(T
1965        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1966        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1967        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1968        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1969        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1970        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1971        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1972     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1973     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case27(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case27(self):
1974        arg=Data(numarray.array([[8085.1298007817086, 0.0, 13310.246250831115], [0.0, 2.0, 0.0], [13310.246250831115, 0.0, 21915.870199218316]]),self.functionspace)        arg=Data(numarray.array([[8085.1298007817086, 0.0, 13310.246250831115], [0.0, 2.0, 0.0], [13310.246250831115, 0.0, 21915.870199218316]]),self.functionspace)
# Line 1981  class Test_util_unary_with_tagged_data(T Line 1981  class Test_util_unary_with_tagged_data(T
1981        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1982        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1983        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
1984        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
1985        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
1986        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
1987        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
1988     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1989     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case29(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim3_case29(self):
1990        arg=Data(numarray.array([[7140.1907849945546, 12308.774438213351, -3419.2256841313947], [12308.774438213351, 21223.762934183575, -5894.4478052274408], [-3419.2256841313947, -5894.4478052274408, 1639.0462808218595]]),self.functionspace)        arg=Data(numarray.array([[7140.1907849945546, 12308.774438213351, -3419.2256841313947], [12308.774438213351, 21223.762934183575, -5894.4478052274408], [-3419.2256841313947, -5894.4478052274408, 1639.0462808218595]]),self.functionspace)
# Line 1997  class Test_util_unary_with_tagged_data(T Line 1997  class Test_util_unary_with_tagged_data(T
1997        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
1998        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(3, 3),"wrong shape of result for eigenvectors.")
1999        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
2000        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
2001        self.failUnless(Lsup(matrixmult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,1])-res[0][1]*res[1][:,1])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 1")
2002        self.failUnless(Lsup(matrixmult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,2])-res[0][2]*res[1][:,2])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 2")
2003        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(3))<=self.RES_TOL,"eigenvectors are not orthonormal")
2004     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2005     def test_eigenvalues_and_eigenvectors_taggedData_dim1_case0(self):     def test_eigenvalues_and_eigenvectors_taggedData_dim1_case0(self):
2006        arg=Data(numarray.array([[0.0]]),self.functionspace)        arg=Data(numarray.array([[0.0]]),self.functionspace)
# Line 2013  class Test_util_unary_with_tagged_data(T Line 2013  class Test_util_unary_with_tagged_data(T
2013        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
2014        self.failUnlessEqual(res[1].getShape(),(1, 1),"wrong shape of result for eigenvectors.")        self.failUnlessEqual(res[1].getShape(),(1, 1),"wrong shape of result for eigenvectors.")
2015        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")        self.failUnless(Lsup(res[0]-ref_ev)<=self.RES_TOL*Lsup(ref_ev),"wrong eigenvalues")
2016        self.failUnless(Lsup(matrixmult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")        self.failUnless(Lsup(matrix_mult(arg,res[1][:,0])-res[0][0]*res[1][:,0])<=self.RES_TOL*Lsup(res[0]),"wrong eigenvector 0")
2017        self.failUnless(Lsup(matrixmult(transpose(res[1]),res[1])-kronecker(1))<=self.RES_TOL,"eigenvectors are not orthonormal")        self.failUnless(Lsup(matrix_mult(transpose(res[1]),res[1])-kronecker(1))<=self.RES_TOL,"eigenvectors are not orthonormal")

Legend:
Removed from v.794  
changed lines
  Added in v.795

  ViewVC Help
Powered by ViewVC 1.1.26