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

Diff of /trunk/escript/test/python/test_util_unary_no_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 5511  class Test_util_unary_no_tagged_data(Tes Line 5511  class Test_util_unary_no_tagged_data(Tes
5511        res=inverse(arg)        res=inverse(arg)
5512        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
5513        self.failUnlessEqual(res.shape,(1, 1),"wrong shape of result.")        self.failUnlessEqual(res.shape,(1, 1),"wrong shape of result.")
5514        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")
5515     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5516     def test_inverse_array_dim2(self):     def test_inverse_array_dim2(self):
5517        arg=numarray.array([[2.9418052544261108, 0.53874493129953072], [0.46782111529042547, 1.9101073069970917]])        arg=numarray.array([[2.9418052544261108, 0.53874493129953072], [0.46782111529042547, 1.9101073069970917]])
5518        res=inverse(arg)        res=inverse(arg)
5519        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
5520        self.failUnlessEqual(res.shape,(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.shape,(2, 2),"wrong shape of result.")
5521        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")
5522     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5523     def test_inverse_array_dim3(self):     def test_inverse_array_dim3(self):
5524        arg=numarray.array([[1.6020395384987041, -0.87670859867007334, -0.98070275415465935], [-0.8409158097058016, 2.8045205591389903, 0.88187627481882669], [-0.45001235350647861, 0.11036032836309251, 1.8806880610894336]])        arg=numarray.array([[1.6020395384987041, -0.87670859867007334, -0.98070275415465935], [-0.8409158097058016, 2.8045205591389903, 0.88187627481882669], [-0.45001235350647861, 0.11036032836309251, 1.8806880610894336]])
5525        res=inverse(arg)        res=inverse(arg)
5526        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")        self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
5527        self.failUnlessEqual(res.shape,(3, 3),"wrong shape of result.")        self.failUnlessEqual(res.shape,(3, 3),"wrong shape of result.")
5528        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")
5529     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5530     def test_inverse_Symbol_dim1(self):     def test_inverse_Symbol_dim1(self):
5531        arg=Symbol(shape=(1, 1))        arg=Symbol(shape=(1, 1))
# Line 5534  class Test_util_unary_no_tagged_data(Tes Line 5534  class Test_util_unary_no_tagged_data(Tes
5534        sub=res.substitute({arg:s})        sub=res.substitute({arg:s})
5535        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
5536        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")
5537        self.failUnless(Lsup(matrixmult(sub,s)-kronecker(1))<=self.RES_TOL,"wrong result")        self.failUnless(Lsup(matrix_mult(sub,s)-kronecker(1))<=self.RES_TOL,"wrong result")
5538     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5539     def test_inverse_Symbol_dim2(self):     def test_inverse_Symbol_dim2(self):
5540        arg=Symbol(shape=(2, 2))        arg=Symbol(shape=(2, 2))
# Line 5543  class Test_util_unary_no_tagged_data(Tes Line 5543  class Test_util_unary_no_tagged_data(Tes
5543        sub=res.substitute({arg:s})        sub=res.substitute({arg:s})
5544        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
5545        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
5546        self.failUnless(Lsup(matrixmult(sub,s)-kronecker(2))<=self.RES_TOL,"wrong result")        self.failUnless(Lsup(matrix_mult(sub,s)-kronecker(2))<=self.RES_TOL,"wrong result")
5547     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5548     def test_inverse_Symbol_dim3(self):     def test_inverse_Symbol_dim3(self):
5549        arg=Symbol(shape=(3, 3))        arg=Symbol(shape=(3, 3))
# Line 5552  class Test_util_unary_no_tagged_data(Tes Line 5552  class Test_util_unary_no_tagged_data(Tes
5552        sub=res.substitute({arg:s})        sub=res.substitute({arg:s})
5553        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
5554        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")
5555        self.failUnless(Lsup(matrixmult(sub,s)-kronecker(3))<=self.RES_TOL,"wrong result")        self.failUnless(Lsup(matrix_mult(sub,s)-kronecker(3))<=self.RES_TOL,"wrong result")
5556     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5557     def test_inverse_constData_dim1(self):     def test_inverse_constData_dim1(self):
5558        arg=Data(numarray.array([[1.4764835684284772]]),self.functionspace)        arg=Data(numarray.array([[1.4764835684284772]]),self.functionspace)
5559        res=inverse(arg)        res=inverse(arg)
5560        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
5561        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")
5562        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")
5563     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5564     def test_inverse_constData_dim2(self):     def test_inverse_constData_dim2(self):
5565        arg=Data(numarray.array([[1.571080150835487, -0.082524281281854961], [-0.9371994394566685, 2.5886052290160944]]),self.functionspace)        arg=Data(numarray.array([[1.571080150835487, -0.082524281281854961], [-0.9371994394566685, 2.5886052290160944]]),self.functionspace)
5566        res=inverse(arg)        res=inverse(arg)
5567        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
5568        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
5569        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")
5570     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5571     def test_inverse_constData_dim3(self):     def test_inverse_constData_dim3(self):
5572        arg=Data(numarray.array([[2.7386874118759605, 0.24320192932450824, -0.98551433885644957], [-0.47237322912611623, 2.0770157618999936, -0.70532850079694409], [-0.55077067435537064, -0.72886734893974148, 1.8532894898622749]]),self.functionspace)        arg=Data(numarray.array([[2.7386874118759605, 0.24320192932450824, -0.98551433885644957], [-0.47237322912611623, 2.0770157618999936, -0.70532850079694409], [-0.55077067435537064, -0.72886734893974148, 1.8532894898622749]]),self.functionspace)
5573        res=inverse(arg)        res=inverse(arg)
5574        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
5575        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")
5576        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")
5577     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5578     def test_inverse_expandedData_dim1(self):     def test_inverse_expandedData_dim1(self):
5579        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
# Line 5581  class Test_util_unary_no_tagged_data(Tes Line 5581  class Test_util_unary_no_tagged_data(Tes
5581        res=inverse(arg)        res=inverse(arg)
5582        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
5583        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(1, 1),"wrong shape of result.")
5584        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")
5585     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5586     def test_inverse_expandedData_dim2(self):     def test_inverse_expandedData_dim2(self):
5587        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
# Line 5589  class Test_util_unary_no_tagged_data(Tes Line 5589  class Test_util_unary_no_tagged_data(Tes
5589        res=inverse(arg)        res=inverse(arg)
5590        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
5591        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
5592        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")
5593     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5594     def test_inverse_expandedData_dim3(self):     def test_inverse_expandedData_dim3(self):
5595        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)        msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
# Line 5597  class Test_util_unary_no_tagged_data(Tes Line 5597  class Test_util_unary_no_tagged_data(Tes
5597        res=inverse(arg)        res=inverse(arg)
5598        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
5599        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")
5600        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")
5601     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5602     def test_transpose_array_rank0_offset0(self):     def test_transpose_array_rank0_offset0(self):
5603        arg=numarray.array(-0.991585801448)        arg=numarray.array(-0.991585801448)
# Line 6430  class Test_util_unary_no_tagged_data(Tes Line 6430  class Test_util_unary_no_tagged_data(Tes
6430        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6431        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.")
6432        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")
6433        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")
6434        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")
6435        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")
6436     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6437     def test_eigenvalues_and_eigenvectors_constData_dim2_case3(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case3(self):
6438        arg=Data(numarray.array([[-1.0, 0.0], [0.0, -1.0]]),self.functionspace)        arg=Data(numarray.array([[-1.0, 0.0], [0.0, -1.0]]),self.functionspace)
# Line 6443  class Test_util_unary_no_tagged_data(Tes Line 6443  class Test_util_unary_no_tagged_data(Tes
6443        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6444        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.")
6445        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")
6446        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")
6447        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")
6448        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")
6449     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6450     def test_eigenvalues_and_eigenvectors_constData_dim2_case5(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case5(self):
6451        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 6456  class Test_util_unary_no_tagged_data(Tes Line 6456  class Test_util_unary_no_tagged_data(Tes
6456        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6457        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.")
6458        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")
6459        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")
6460        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")
6461        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")
6462     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6463     def test_eigenvalues_and_eigenvectors_constData_dim2_case6(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case6(self):
6464        arg=Data(numarray.array([[0.0, 0.0], [0.0, 0.0001]]),self.functionspace)        arg=Data(numarray.array([[0.0, 0.0], [0.0, 0.0001]]),self.functionspace)
# Line 6469  class Test_util_unary_no_tagged_data(Tes Line 6469  class Test_util_unary_no_tagged_data(Tes
6469        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6470        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.")
6471        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")
6472        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")
6473        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")
6474        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")
6475     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6476     def test_eigenvalues_and_eigenvectors_constData_dim2_case7(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case7(self):
6477        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 6482  class Test_util_unary_no_tagged_data(Tes Line 6482  class Test_util_unary_no_tagged_data(Tes
6482        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6483        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.")
6484        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")
6485        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")
6486        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")
6487        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")
6488     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6489     def test_eigenvalues_and_eigenvectors_constData_dim2_case8(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case8(self):
6490        arg=Data(numarray.array([[6.0598371831785722e-06, 2.3859213977648625e-05], [2.3859213977648629e-05, 9.3940162816821425e-05]]),self.functionspace)        arg=Data(numarray.array([[6.0598371831785722e-06, 2.3859213977648625e-05], [2.3859213977648629e-05, 9.3940162816821425e-05]]),self.functionspace)
# Line 6495  class Test_util_unary_no_tagged_data(Tes Line 6495  class Test_util_unary_no_tagged_data(Tes
6495        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6496        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.")
6497        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")
6498        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")
6499        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")
6500        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")
6501     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6502     def test_eigenvalues_and_eigenvectors_constData_dim2_case9(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case9(self):
6503        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 6508  class Test_util_unary_no_tagged_data(Tes Line 6508  class Test_util_unary_no_tagged_data(Tes
6508        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6509        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.")
6510        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")
6511        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")
6512        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")
6513        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")
6514     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6515     def test_eigenvalues_and_eigenvectors_constData_dim2_case10(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case10(self):
6516        arg=Data(numarray.array([[2.0, 0.0], [0.0, 1.0]]),self.functionspace)        arg=Data(numarray.array([[2.0, 0.0], [0.0, 1.0]]),self.functionspace)
# Line 6521  class Test_util_unary_no_tagged_data(Tes Line 6521  class Test_util_unary_no_tagged_data(Tes
6521        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6522        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.")
6523        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")
6524        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")
6525        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")
6526        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")
6527     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6528     def test_eigenvalues_and_eigenvectors_constData_dim2_case11(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case11(self):
6529        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 6534  class Test_util_unary_no_tagged_data(Tes Line 6534  class Test_util_unary_no_tagged_data(Tes
6534        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6535        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.")
6536        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")
6537        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")
6538        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")
6539        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")
6540     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6541     def test_eigenvalues_and_eigenvectors_constData_dim2_case12(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case12(self):
6542        arg=Data(numarray.array([[1.0, 0.0], [0.0, 1000000.0]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0], [0.0, 1000000.0]]),self.functionspace)
# Line 6547  class Test_util_unary_no_tagged_data(Tes Line 6547  class Test_util_unary_no_tagged_data(Tes
6547        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6548        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.")
6549        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")
6550        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")
6551        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")
6552        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")
6553     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6554     def test_eigenvalues_and_eigenvectors_constData_dim2_case13(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case13(self):
6555        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 6560  class Test_util_unary_no_tagged_data(Tes Line 6560  class Test_util_unary_no_tagged_data(Tes
6560        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6561        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.")
6562        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")
6563        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")
6564        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")
6565        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")
6566     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6567     def test_eigenvalues_and_eigenvectors_constData_dim2_case14(self):     def test_eigenvalues_and_eigenvectors_constData_dim2_case14(self):
6568        arg=Data(numarray.array([[60599.311233413886, 238591.90118434647], [238591.90118434647, 939401.68876658613]]),self.functionspace)        arg=Data(numarray.array([[60599.311233413886, 238591.90118434647], [238591.90118434647, 939401.68876658613]]),self.functionspace)
# Line 6573  class Test_util_unary_no_tagged_data(Tes Line 6573  class Test_util_unary_no_tagged_data(Tes
6573        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6574        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.")
6575        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")
6576        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")
6577        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")
6578        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")
6579     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6580     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case0(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case0(self):
6581        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6588  class Test_util_unary_no_tagged_data(Tes Line 6588  class Test_util_unary_no_tagged_data(Tes
6588        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6589        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.")
6590        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")
6591        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")
6592        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")
6593        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")
6594     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6595     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case5(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case5(self):
6596        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6603  class Test_util_unary_no_tagged_data(Tes Line 6603  class Test_util_unary_no_tagged_data(Tes
6603        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6604        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.")
6605        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")
6606        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")
6607        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")
6608        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")
6609     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6610     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case7(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case7(self):
6611        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6618  class Test_util_unary_no_tagged_data(Tes Line 6618  class Test_util_unary_no_tagged_data(Tes
6618        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6619        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.")
6620        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")
6621        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")
6622        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")
6623        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")
6624     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6625     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case9(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case9(self):
6626        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6633  class Test_util_unary_no_tagged_data(Tes Line 6633  class Test_util_unary_no_tagged_data(Tes
6633        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6634        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.")
6635        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")
6636        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")
6637        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")
6638        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")
6639     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6640     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case11(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case11(self):
6641        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6648  class Test_util_unary_no_tagged_data(Tes Line 6648  class Test_util_unary_no_tagged_data(Tes
6648        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6649        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.")
6650        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")
6651        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")
6652        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")
6653        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")
6654     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6655     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case13(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim2_case13(self):
6656        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6663  class Test_util_unary_no_tagged_data(Tes Line 6663  class Test_util_unary_no_tagged_data(Tes
6663        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6664        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.")
6665        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")
6666        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")
6667        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")
6668        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")
6669     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6670     def test_eigenvalues_and_eigenvectors_constData_dim3_case0(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case0(self):
6671        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 6676  class Test_util_unary_no_tagged_data(Tes Line 6676  class Test_util_unary_no_tagged_data(Tes
6676        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6677        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.")
6678        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")
6679        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")
6680        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")
6681        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")
6682        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")
6683     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6684     def test_eigenvalues_and_eigenvectors_constData_dim3_case5(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case5(self):
6685        arg=Data(numarray.array([[10.0, 0.0, 0.0], [0.0, 10.0, 0.0], [0.0, 0.0, 10.0]]),self.functionspace)        arg=Data(numarray.array([[10.0, 0.0, 0.0], [0.0, 10.0, 0.0], [0.0, 0.0, 10.0]]),self.functionspace)
# Line 6690  class Test_util_unary_no_tagged_data(Tes Line 6690  class Test_util_unary_no_tagged_data(Tes
6690        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6691        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.")
6692        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")
6693        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")
6694        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")
6695        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")
6696        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")
6697     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6698     def test_eigenvalues_and_eigenvectors_constData_dim3_case10(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case10(self):
6699        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 6704  class Test_util_unary_no_tagged_data(Tes Line 6704  class Test_util_unary_no_tagged_data(Tes
6704        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6705        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.")
6706        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")
6707        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")
6708        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")
6709        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")
6710        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")
6711     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6712     def test_eigenvalues_and_eigenvectors_constData_dim3_case11(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case11(self):
6713        arg=Data(numarray.array([[0.9, 0.0, 0.0], [0.0, 0.97060899725040983, -0.045555123008643325], [0.0, -0.045555123008643339, 0.92939100274959041]]),self.functionspace)        arg=Data(numarray.array([[0.9, 0.0, 0.0], [0.0, 0.97060899725040983, -0.045555123008643325], [0.0, -0.045555123008643339, 0.92939100274959041]]),self.functionspace)
# Line 6718  class Test_util_unary_no_tagged_data(Tes Line 6718  class Test_util_unary_no_tagged_data(Tes
6718        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6719        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.")
6720        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")
6721        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")
6722        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")
6723        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")
6724        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")
6725     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6726     def test_eigenvalues_and_eigenvectors_constData_dim3_case12(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case12(self):
6727        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 6732  class Test_util_unary_no_tagged_data(Tes Line 6732  class Test_util_unary_no_tagged_data(Tes
6732        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6733        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.")
6734        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")
6735        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")
6736        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")
6737        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")
6738        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")
6739     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6740     def test_eigenvalues_and_eigenvectors_constData_dim3_case13(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case13(self):
6741        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 0.9, 0.0], [0.0, 0.0, 0.9]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 0.9, 0.0], [0.0, 0.0, 0.9]]),self.functionspace)
# Line 6746  class Test_util_unary_no_tagged_data(Tes Line 6746  class Test_util_unary_no_tagged_data(Tes
6746        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6747        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.")
6748        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")
6749        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")
6750        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")
6751        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")
6752        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")
6753     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6754     def test_eigenvalues_and_eigenvectors_constData_dim3_case14(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case14(self):
6755        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 6760  class Test_util_unary_no_tagged_data(Tes Line 6760  class Test_util_unary_no_tagged_data(Tes
6760        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6761        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.")
6762        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")
6763        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")
6764        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")
6765        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")
6766        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")
6767     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6768     def test_eigenvalues_and_eigenvectors_constData_dim3_case15(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case15(self):
6769        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 1.1, 0.0], [0.0, 0.0, 1.1]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 1.1, 0.0], [0.0, 0.0, 1.1]]),self.functionspace)
# Line 6774  class Test_util_unary_no_tagged_data(Tes Line 6774  class Test_util_unary_no_tagged_data(Tes
6774        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6775        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.")
6776        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")
6777        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")
6778        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")
6779        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")
6780        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")
6781     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6782     def test_eigenvalues_and_eigenvectors_constData_dim3_case17(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case17(self):
6783        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 6788  class Test_util_unary_no_tagged_data(Tes Line 6788  class Test_util_unary_no_tagged_data(Tes
6788        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6789        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.")
6790        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")
6791        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")
6792        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")
6793        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")
6794        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")
6795     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6796     def test_eigenvalues_and_eigenvectors_constData_dim3_case18(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case18(self):
6797        arg=Data(numarray.array([[1.1, 0.0, 0.0], [0.0, 1.0153410887977139, -0.036038311201720394], [0.0, -0.036038311201720373, 1.084658911202286]]),self.functionspace)        arg=Data(numarray.array([[1.1, 0.0, 0.0], [0.0, 1.0153410887977139, -0.036038311201720394], [0.0, -0.036038311201720373, 1.084658911202286]]),self.functionspace)
# Line 6802  class Test_util_unary_no_tagged_data(Tes Line 6802  class Test_util_unary_no_tagged_data(Tes
6802        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6803        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.")
6804        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")
6805        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")
6806        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")
6807        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")
6808        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")
6809     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6810     def test_eigenvalues_and_eigenvectors_constData_dim3_case19(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case19(self):
6811        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 6816  class Test_util_unary_no_tagged_data(Tes Line 6816  class Test_util_unary_no_tagged_data(Tes
6816        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6817        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.")
6818        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")
6819        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")
6820        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")
6821        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")
6822        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")
6823     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6824     def test_eigenvalues_and_eigenvectors_constData_dim3_case20(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case20(self):
6825        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 3.0]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 2.0, 0.0], [0.0, 0.0, 3.0]]),self.functionspace)
# Line 6830  class Test_util_unary_no_tagged_data(Tes Line 6830  class Test_util_unary_no_tagged_data(Tes
6830        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6831        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.")
6832        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")
6833        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")
6834        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")
6835        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")
6836        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")
6837     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6838     def test_eigenvalues_and_eigenvectors_constData_dim3_case21(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case21(self):
6839        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 6844  class Test_util_unary_no_tagged_data(Tes Line 6844  class Test_util_unary_no_tagged_data(Tes
6844        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6845        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.")
6846        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")
6847        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")
6848        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")
6849        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")
6850        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")
6851     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6852     def test_eigenvalues_and_eigenvectors_constData_dim3_case22(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case22(self):
6853        arg=Data(numarray.array([[1.5389599520505153, 0.0, 0.88737932936638753], [0.0, 2.0, 0.0], [0.88737932936638753, 0.0, 2.4610400479494858]]),self.functionspace)        arg=Data(numarray.array([[1.5389599520505153, 0.0, 0.88737932936638753], [0.0, 2.0, 0.0], [0.88737932936638753, 0.0, 2.4610400479494858]]),self.functionspace)
# Line 6858  class Test_util_unary_no_tagged_data(Tes Line 6858  class Test_util_unary_no_tagged_data(Tes
6858        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6859        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.")
6860        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")
6861        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")
6862        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")
6863        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")
6864        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")
6865     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6866     def test_eigenvalues_and_eigenvectors_constData_dim3_case23(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case23(self):
6867        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 6872  class Test_util_unary_no_tagged_data(Tes Line 6872  class Test_util_unary_no_tagged_data(Tes
6872        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6873        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.")
6874        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")
6875        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")
6876        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")
6877        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")
6878        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")
6879     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6880     def test_eigenvalues_and_eigenvectors_constData_dim3_case24(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case24(self):
6881        arg=Data(numarray.array([[1.5928567395431172, 0.67348185484323142, -0.51356980156651744], [0.67348185484323153, 2.6000847801882254, -0.033486506584313548], [-0.51356980156651744, -0.033486506584313541, 1.8070584802686565]]),self.functionspace)        arg=Data(numarray.array([[1.5928567395431172, 0.67348185484323142, -0.51356980156651744], [0.67348185484323153, 2.6000847801882254, -0.033486506584313548], [-0.51356980156651744, -0.033486506584313541, 1.8070584802686565]]),self.functionspace)
# Line 6886  class Test_util_unary_no_tagged_data(Tes Line 6886  class Test_util_unary_no_tagged_data(Tes
6886        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6887        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.")
6888        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")
6889        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")
6890        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")
6891        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")
6892        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")
6893     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6894     def test_eigenvalues_and_eigenvectors_constData_dim3_case25(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case25(self):
6895        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 6900  class Test_util_unary_no_tagged_data(Tes Line 6900  class Test_util_unary_no_tagged_data(Tes
6900        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6901        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.")
6902        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")
6903        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")
6904        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")
6905        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")
6906        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")
6907     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6908     def test_eigenvalues_and_eigenvectors_constData_dim3_case26(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case26(self):
6909        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 21183.286995177881, -13665.625800132779], [0.0, -13665.625800132779, 8818.7130048221279]]),self.functionspace)        arg=Data(numarray.array([[1.0, 0.0, 0.0], [0.0, 21183.286995177881, -13665.625800132779], [0.0, -13665.625800132779, 8818.7130048221279]]),self.functionspace)
# Line 6914  class Test_util_unary_no_tagged_data(Tes Line 6914  class Test_util_unary_no_tagged_data(Tes
6914        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6915        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.")
6916        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")
6917        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")
6918        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")
6919        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")
6920        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")
6921     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6922     def test_eigenvalues_and_eigenvectors_constData_dim3_case27(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case27(self):
6923        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 6928  class Test_util_unary_no_tagged_data(Tes Line 6928  class Test_util_unary_no_tagged_data(Tes
6928        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6929        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.")
6930        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")
6931        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")
6932        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")
6933        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")
6934        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")
6935     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6936     def test_eigenvalues_and_eigenvectors_constData_dim3_case28(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case28(self):
6937        arg=Data(numarray.array([[30000.0, 0.0, 0.0], [0.0, 1.153410887977139, -0.36038311201720391], [0.0, -0.36038311201720391, 1.8465891120228608]]),self.functionspace)        arg=Data(numarray.array([[30000.0, 0.0, 0.0], [0.0, 1.153410887977139, -0.36038311201720391], [0.0, -0.36038311201720391, 1.8465891120228608]]),self.functionspace)
# Line 6942  class Test_util_unary_no_tagged_data(Tes Line 6942  class Test_util_unary_no_tagged_data(Tes
6942        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6943        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.")
6944        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")
6945        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")
6946        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")
6947        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")
6948        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")
6949     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6950     def test_eigenvalues_and_eigenvectors_constData_dim3_case29(self):     def test_eigenvalues_and_eigenvectors_constData_dim3_case29(self):
6951        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 6956  class Test_util_unary_no_tagged_data(Tes Line 6956  class Test_util_unary_no_tagged_data(Tes
6956        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6957        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.")
6958        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")
6959        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")
6960        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")
6961        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")
6962        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")
6963     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6964     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case0(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case0(self):
6965        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6972  class Test_util_unary_no_tagged_data(Tes Line 6972  class Test_util_unary_no_tagged_data(Tes
6972        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6973        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.")
6974        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")
6975        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")
6976        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")
6977        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")
6978        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")
6979     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6980     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case10(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case10(self):
6981        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 6988  class Test_util_unary_no_tagged_data(Tes Line 6988  class Test_util_unary_no_tagged_data(Tes
6988        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
6989        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.")
6990        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")
6991        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")
6992        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")
6993        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")
6994        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")
6995     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
6996     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case12(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case12(self):
6997        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7004  class Test_util_unary_no_tagged_data(Tes Line 7004  class Test_util_unary_no_tagged_data(Tes
7004        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7005        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.")
7006        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")
7007        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")
7008        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")
7009        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")
7010        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")
7011     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7012     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case14(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case14(self):
7013        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7020  class Test_util_unary_no_tagged_data(Tes Line 7020  class Test_util_unary_no_tagged_data(Tes
7020        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7021        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.")
7022        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")
7023        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")
7024        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")
7025        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")
7026        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")
7027     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7028     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case17(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case17(self):
7029        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7036  class Test_util_unary_no_tagged_data(Tes Line 7036  class Test_util_unary_no_tagged_data(Tes
7036        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7037        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.")
7038        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")
7039        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")
7040        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")
7041        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")
7042        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")
7043     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7044     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case19(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case19(self):
7045        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7052  class Test_util_unary_no_tagged_data(Tes Line 7052  class Test_util_unary_no_tagged_data(Tes
7052        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7053        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.")
7054        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")
7055        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")
7056        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")
7057        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")
7058        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")
7059     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7060     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case21(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case21(self):
7061        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7068  class Test_util_unary_no_tagged_data(Tes Line 7068  class Test_util_unary_no_tagged_data(Tes
7068        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7069        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.")
7070        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")
7071        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")
7072        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")
7073        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")
7074        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")
7075     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7076     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case23(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case23(self):
7077        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7084  class Test_util_unary_no_tagged_data(Tes Line 7084  class Test_util_unary_no_tagged_data(Tes
7084        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7085        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.")
7086        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")
7087        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")
7088        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")
7089        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")
7090        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")
7091     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7092     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case25(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case25(self):
7093        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7100  class Test_util_unary_no_tagged_data(Tes Line 7100  class Test_util_unary_no_tagged_data(Tes
7100        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7101        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.")
7102        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")
7103        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")
7104        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")
7105        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")
7106        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")
7107     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7108     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case27(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case27(self):
7109        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7116  class Test_util_unary_no_tagged_data(Tes Line 7116  class Test_util_unary_no_tagged_data(Tes
7116        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7117        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.")
7118        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")
7119        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")
7120        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")
7121        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")
7122        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")
7123     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7124     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case29(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim3_case29(self):
7125        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7132  class Test_util_unary_no_tagged_data(Tes Line 7132  class Test_util_unary_no_tagged_data(Tes
7132        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7133        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.")
7134        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")
7135        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")
7136        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")
7137        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")
7138        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")
7139     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7140     def test_eigenvalues_and_eigenvectors_constData_dim1_case0(self):     def test_eigenvalues_and_eigenvectors_constData_dim1_case0(self):
7141        arg=Data(numarray.array([[0.0]]),self.functionspace)        arg=Data(numarray.array([[0.0]]),self.functionspace)
# Line 7146  class Test_util_unary_no_tagged_data(Tes Line 7146  class Test_util_unary_no_tagged_data(Tes
7146        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7147        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.")
7148        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")
7149        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")
7150        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")
7151     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7152     def test_eigenvalues_and_eigenvectors_constData_dim1_case1(self):     def test_eigenvalues_and_eigenvectors_constData_dim1_case1(self):
7153        arg=Data(numarray.array([[1.0]]),self.functionspace)        arg=Data(numarray.array([[1.0]]),self.functionspace)
# Line 7158  class Test_util_unary_no_tagged_data(Tes Line 7158  class Test_util_unary_no_tagged_data(Tes
7158        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7159        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.")
7160        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")
7161        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")
7162        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")
7163     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
7164     def test_eigenvalues_and_eigenvectors_expandedData_dim1_case0(self):     def test_eigenvalues_and_eigenvectors_expandedData_dim1_case0(self):
7165        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)        msk_arg=whereZero(self.functionspace.getX()[0],1.e-8)
# Line 7172  class Test_util_unary_no_tagged_data(Tes Line 7172  class Test_util_unary_no_tagged_data(Tes
7172        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")        self.failUnless(isinstance(res[1],Data),"wrong type of result for eigenvectors.")
7173        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.")
7174        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")
7175        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")
7176        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