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

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

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

revision 706 by gross, Sat Apr 8 16:13:02 2006 UTC revision 785 by gross, Tue Jul 25 03:48:10 2006 UTC
# Line 16381  class Test_util_binary_with_tagged_data( Line 16381  class Test_util_binary_with_tagged_data(
16381        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
16382        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16383     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16384       def test_power_float_rank0_taggedData_rank0(self):
16385          arg0=3.76704928748
16386          arg1=Data(1.30536801555,self.functionspace)
16387          arg1.setTaggedValue(1,3.46723750757)
16388          res=power(arg0,arg1)
16389          ref=Data(5.64798685367,self.functionspace)
16390          ref.setTaggedValue(1,99.3420963479)
16391          self.failUnless(isinstance(res,Data),"wrong type of result.")
16392          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16393          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16394       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16395       def test_tensor_mult_array_rank2_taggedData_rank1(self):
16396          arg0=numarray.array([[-3.0, 0.0, -3.0], [-3.0, 4.0, 2.0]])
16397          arg1=Data(numarray.array([7.0, -6.0, -1.0]),self.functionspace)
16398          arg1.setTaggedValue(1,numarray.array([6.0, -1.0, 4.0]))
16399          res=tensor_mult(arg0,arg1)
16400          ref=Data(numarray.array([-18.0, -47.0]),self.functionspace)
16401          ref.setTaggedValue(1,numarray.array([-30.0, -14.0]))
16402          self.failUnless(isinstance(res,Data),"wrong type of result.")
16403          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16404          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16405       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16406       def test_tensor_mult_array_rank2_taggedData_rank2(self):
16407          arg0=numarray.array([[2.0, 4.0, 0.0], [-2.0, 4.0, 1.0]])
16408          arg1=Data(numarray.array([[-2.0, -4.0], [1.0, 6.0], [-4.0, 2.0]]),self.functionspace)
16409          arg1.setTaggedValue(1,numarray.array([[4.0, -3.0], [-5.0, 0.0], [-1.0, -7.0]]))
16410          res=tensor_mult(arg0,arg1)
16411          ref=Data(numarray.array([[0.0, 16.0], [4.0, 34.0]]),self.functionspace)
16412          ref.setTaggedValue(1,numarray.array([[-12.0, -6.0], [-29.0, -1.0]]))
16413          self.failUnless(isinstance(res,Data),"wrong type of result.")
16414          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16415          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16416       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16417       def test_tensor_mult_array_rank4_taggedData_rank2(self):
16418          arg0=numarray.array([[[[6.0, -3.0, -4.0], [0.0, 0.0, 0.0]], [[6.0, 6.0, -3.0], [5.0, -4.0, 1.0]], [[0.0, 0.0, 5.0], [1.0, -6.0, -7.0]], [[0.0, -5.0, 7.0], [2.0, 3.0, -5.0]], [[5.0, -7.0, 1.0], [4.0, 4.0, 0.0]]], [[[-1.0, -6.0, 3.0], [-4.0, 7.0, 7.0]], [[0.0, -4.0, -5.0], [7.0, -1.0, 7.0]], [[0.0, 6.0, -3.0], [3.0, -2.0, -3.0]], [[0.0, -6.0, 2.0], [-1.0, -1.0, 1.0]], [[0.0, 7.0, -3.0], [3.0, 4.0, 5.0]]], [[[2.0, 0.0, 3.0], [-5.0, -5.0, -1.0]], [[5.0, -3.0, 2.0], [-7.0, -6.0, 1.0]], [[-7.0, 1.0, 5.0], [6.0, -1.0, 3.0]], [[4.0, -5.0, 3.0], [-2.0, 0.0, 7.0]], [[-3.0, 7.0, 5.0], [7.0, -5.0, -6.0]]], [[[-5.0, 0.0, -6.0], [4.0, 6.0, -1.0]], [[7.0, -2.0, -4.0], [2.0, -2.0, 4.0]], [[-4.0, 7.0, -3.0], [6.0, 6.0, -7.0]], [[2.0, 0.0, 1.0], [-1.0, 0.0, 5.0]], [[-2.0, -6.0, 4.0], [-7.0, 6.0, -1.0]]]])
16419          arg1=Data(numarray.array([[-1.0, 6.0, 7.0], [0.0, -5.0, 3.0]]),self.functionspace)
16420          arg1.setTaggedValue(1,numarray.array([[4.0, 0.0, -6.0], [5.0, 0.0, 0.0]]))
16421          res=tensor_mult(arg0,arg1)
16422          ref=Data(numarray.array([[-52.0, 32.0, 44.0, -11.0, -60.0], [-28.0, -33.0, 16.0, -14.0, 16.0], [41.0, 24.0, 62.0, 8.0, 87.0], [-70.0, -25.0, -26.0, 20.0, -39.0]]),self.functionspace)
16423          ref.setTaggedValue(1,numarray.array([[48.0, 67.0, -25.0, -32.0, 34.0], [-42.0, 65.0, 33.0, -17.0, 33.0], [-35.0, -27.0, -28.0, -12.0, -7.0], [36.0, 62.0, 32.0, -3.0, -67.0]]))
16424          self.failUnless(isinstance(res,Data),"wrong type of result.")
16425          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16426          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16427       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16428       def test_tensor_mult_array_rank4_taggedData_rank3(self):
16429          arg0=numarray.array([[[[3.0, 6.0, 6.0], [-7.0, 0.0, -5.0]], [[1.0, -4.0, 5.0], [7.0, -5.0, 2.0]], [[0.0, -3.0, -1.0], [4.0, 3.0, -1.0]], [[0.0, 1.0, 6.0], [-3.0, -4.0, 2.0]], [[5.0, -4.0, -2.0], [0.0, 3.0, -3.0]]], [[[-5.0, 5.0, -1.0], [2.0, 0.0, 4.0]], [[-4.0, -4.0, -4.0], [-6.0, -3.0, 6.0]], [[2.0, 1.0, -7.0], [7.0, -3.0, 7.0]], [[0.0, -6.0, 6.0], [5.0, 0.0, -4.0]], [[6.0, 6.0, -7.0], [2.0, 4.0, -4.0]]], [[[-4.0, -1.0, 4.0], [6.0, 2.0, -4.0]], [[-1.0, 3.0, 0.0], [7.0, 0.0, 5.0]], [[-7.0, -5.0, 7.0], [-6.0, -6.0, -4.0]], [[-3.0, 3.0, -3.0], [5.0, 7.0, -3.0]], [[-6.0, -3.0, -4.0], [6.0, -2.0, -1.0]]], [[[7.0, 3.0, -5.0], [5.0, -4.0, -5.0]], [[0.0, -6.0, 2.0], [-7.0, 3.0, 1.0]], [[2.0, 4.0, 2.0], [0.0, 6.0, 0.0]], [[7.0, 2.0, -1.0], [0.0, -4.0, -5.0]], [[7.0, 6.0, 4.0], [-3.0, 4.0, -5.0]]]])
16430          arg1=Data(numarray.array([[[7.0, -4.0], [3.0, -3.0], [-4.0, -7.0]], [[2.0, 5.0], [-5.0, 6.0], [4.0, 0.0]]]),self.functionspace)
16431          arg1.setTaggedValue(1,numarray.array([[[-7.0, -7.0], [6.0, 1.0], [4.0, 5.0]], [[6.0, 6.0], [0.0, 7.0], [-5.0, 2.0]]]))
16432          res=tensor_mult(arg0,arg1)
16433          ref=Data(numarray.array([[[-19.0, -107.0], [22.0, -22.0], [-16.0, 54.0], [1.0, -84.0], [4.0, 24.0]], [[4.0, 22.0], [3.0, 8.0], [102.0, 55.0], [-48.0, 1.0], [56.0, 41.0]], [[-61.0, 33.0], [36.0, 30.0], [-90.0, -72.0], [-37.0, 91.0], [-17.0, 79.0]], [[88.0, -1.0], [-51.0, -13.0], [-12.0, 2.0], [59.0, -51.0], [5.0, -65.0]]]),self.functionspace)
16434          ref.setTaggedValue(1,numarray.array([[[22.0, -37.0], [21.0, 25.0], [7.0, 35.0], [2.0, -11.0], [-52.0, -34.0]], [[53.0, 55.0], [-78.0, -41.0], [-29.0, -13.0], [38.0, 46.0], [-2.0, -39.0]], [[94.0, 89.0], [42.0, 62.0], [31.0, -7.0], [72.0, 82.0], [49.0, 39.0]], [[4.0, -79.0], [-75.0, -15.0], [18.0, 42.0], [-16.0, -90.0], [10.0, -23.0]]]))
16435          self.failUnless(isinstance(res,Data),"wrong type of result.")
16436          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16437          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16438       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16439       def test_tensor_mult_array_rank4_taggedData_rank4(self):
16440          arg0=numarray.array([[[[-7.0, -2.0, -2.0], [6.0, 0.0, 6.0]], [[2.0, -1.0, 0.0], [5.0, 4.0, -4.0]], [[-1.0, -1.0, -7.0], [-2.0, 0.0, -4.0]], [[-7.0, -2.0, 6.0], [-3.0, 2.0, 0.0]], [[0.0, -2.0, 1.0], [0.0, -2.0, 6.0]]], [[[-7.0, -6.0, 2.0], [-5.0, -1.0, 0.0]], [[-2.0, -3.0, -6.0], [6.0, 1.0, -2.0]], [[-5.0, 0.0, 3.0], [-7.0, -5.0, 2.0]], [[1.0, 4.0, 5.0], [4.0, -4.0, 3.0]], [[0.0, -3.0, 0.0], [4.0, 3.0, 6.0]]], [[[-4.0, 1.0, 4.0], [6.0, 5.0, -5.0]], [[-1.0, -2.0, -4.0], [5.0, 3.0, 2.0]], [[-3.0, -3.0, -5.0], [4.0, 1.0, -2.0]], [[-5.0, 0.0, 1.0], [5.0, 7.0, 5.0]], [[2.0, -7.0, 0.0], [-6.0, -4.0, -3.0]]], [[[3.0, -4.0, 2.0], [1.0, -5.0, -1.0]], [[7.0, -3.0, 7.0], [6.0, 6.0, -1.0]], [[0.0, 1.0, -3.0], [2.0, 5.0, 0.0]], [[-6.0, 0.0, -5.0], [3.0, -7.0, 5.0]], [[5.0, -2.0, -6.0], [5.0, 6.0, -5.0]]]])
16441          arg1=Data(numarray.array([[[[-7.0, -6.0, -7.0, -3.0, 2.0], [5.0, -5.0, 6.0, 5.0, -5.0], [7.0, 0.0, 4.0, -3.0, -3.0], [3.0, 0.0, 3.0, 3.0, 7.0]], [[-3.0, 7.0, -7.0, -5.0, -3.0], [2.0, -1.0, 5.0, -7.0, 6.0], [-5.0, 5.0, 5.0, -5.0, 4.0], [-1.0, -7.0, 5.0, -1.0, 3.0]], [[4.0, 0.0, -3.0, -5.0, -4.0], [6.0, 0.0, -5.0, 3.0, -6.0], [1.0, 2.0, -3.0, 7.0, -2.0], [4.0, 7.0, -7.0, -1.0, -1.0]]], [[[4.0, 0.0, 2.0, 2.0, 3.0], [3.0, -7.0, 4.0, 3.0, 3.0], [6.0, 6.0, 7.0, -1.0, 3.0], [-4.0, 1.0, 2.0, 6.0, -6.0]], [[0.0, 0.0, -3.0, -2.0, -2.0], [-3.0, -1.0, -7.0, -1.0, 6.0], [-2.0, -6.0, -1.0, -6.0, -7.0], [0.0, 1.0, 2.0, 7.0, -7.0]], [[1.0, -7.0, 3.0, -6.0, 1.0], [5.0, -2.0, 7.0, -6.0, 3.0], [3.0, 2.0, 7.0, -7.0, -7.0], [3.0, -4.0, -6.0, -5.0, 0.0]]]]),self.functionspace)
16442          arg1.setTaggedValue(1,numarray.array([[[[-1.0, 1.0, -6.0, 7.0, 4.0], [5.0, 0.0, -1.0, -3.0, -1.0], [3.0, 5.0, 4.0, 2.0, -3.0], [4.0, 2.0, 1.0, -5.0, -6.0]], [[-4.0, -5.0, 2.0, -5.0, 2.0], [6.0, 1.0, 0.0, -1.0, 6.0], [7.0, 2.0, 6.0, 7.0, 1.0], [6.0, 5.0, 7.0, 2.0, 0.0]], [[2.0, 4.0, 5.0, -4.0, -5.0], [-2.0, -7.0, 5.0, -6.0, 3.0], [6.0, 4.0, 0.0, 5.0, -1.0], [-7.0, -2.0, -5.0, 6.0, -3.0]]], [[[4.0, 1.0, 2.0, 4.0, 5.0], [0.0, 4.0, 2.0, 4.0, 6.0], [-7.0, 7.0, 7.0, -5.0, 7.0], [2.0, -2.0, 6.0, 0.0, -4.0]], [[1.0, 2.0, -7.0, 5.0, 1.0], [-5.0, 2.0, -6.0, 0.0, 3.0], [6.0, 3.0, 1.0, -2.0, 4.0], [0.0, 7.0, 6.0, -4.0, -1.0]], [[6.0, 4.0, -2.0, 3.0, 0.0], [0.0, 5.0, 2.0, -3.0, 2.0], [-2.0, 0.0, 3.0, 7.0, 7.0], [-3.0, 7.0, -1.0, 4.0, 0.0]]]]))
16443          res=tensor_mult(arg0,arg1)
16444          ref=Data(numarray.array([[[[77.0, -14.0, 99.0, 17.0, 24.0], [-3.0, -17.0, 24.0, -45.0, 71.0], [13.0, 34.0, 52.0, -31.0, -7.0], [-33.0, -18.0, -41.0, -11.0, -89.0]], [[5.0, 9.0, -21.0, 25.0, 10.0], [-9.0, -40.0, -29.0, 52.0, 11.0], [29.0, -7.0, 6.0, -2.0, 5.0], [-25.0, 32.0, 43.0, 85.0, -47.0]], [[-30.0, 27.0, 19.0, 63.0, 19.0], [-75.0, 28.0, -12.0, -1.0, 23.0], [-33.0, -39.0, -30.0, -11.0, 35.0], [-34.0, -28.0, 61.0, 13.0, 9.0]], [[67.0, 28.0, 33.0, -9.0, -45.0], [-18.0, 56.0, -108.0, -14.0, -10.0], [-55.0, -28.0, -79.0, 64.0, -22.0], [17.0, 55.0, -75.0, -29.0, -57.0]], [[16.0, -56.0, 35.0, -27.0, 12.0], [38.0, -8.0, 41.0, -17.0, -12.0], [33.0, 16.0, 31.0, -13.0, -38.0], [24.0, -5.0, -57.0, -43.0, 7.0]]], [[[55.0, 0.0, 78.0, 33.0, -17.0], [-47.0, 77.0, -95.0, -1.0, -34.0], [-45.0, -50.0, -98.0, 76.0, -15.0], [13.0, 50.0, -77.0, -54.0, -32.0]], [[21.0, 5.0, 56.0, 73.0, 43.0], [-47.0, -26.0, 6.0, 22.0, 46.0], [23.0, -1.0, 22.0, -19.0, 31.0], [-57.0, -6.0, 47.0, 56.0, -60.0]], [[21.0, 16.0, 33.0, -16.0, -31.0], [-3.0, 75.0, -24.0, -44.0, -38.0], [-58.0, -2.0, -59.0, 59.0, 9.0], [31.0, 1.0, -72.0, -105.0, 39.0]], [[20.0, 1.0, -21.0, -50.0, -7.0], [82.0, -39.0, 66.0, -10.0, -14.0], [33.0, 84.0, 62.0, 11.0, 22.0], [12.0, -5.0, -30.0, -25.0, 18.0]], [[31.0, -63.0, 38.0, -19.0, 21.0], [27.0, -40.0, 22.0, -6.0, 30.0], [51.0, 3.0, 52.0, -49.0, -63.0], [5.0, 4.0, -37.0, 18.0, -54.0]]], [[[60.0, 66.0, -9.0, 19.0, -24.0], [-16.0, -18.0, -85.0, 28.0, 35.0], [-18.0, 9.0, -21.0, 34.0, 26.0], [-36.0, 52.0, 17.0, 79.0, -100.0]], [[19.0, -22.0, 40.0, 25.0, 31.0], [-17.0, -35.0, 17.0, -3.0, 56.0], [29.0, -2.0, 44.0, -52.0, -17.0], [-31.0, -14.0, 19.0, 44.0, -60.0]], [[24.0, 11.0, 56.0, 67.0, 31.0], [-52.0, -7.0, -13.0, 14.0, 39.0], [5.0, -11.0, 1.0, -7.0, 26.0], [-48.0, -1.0, 33.0, 40.0, -56.0]], [[64.0, -5.0, 36.0, -24.0, -8.0], [0.0, -27.0, -29.0, -44.0, 91.0], [-3.0, 0.0, 40.0, -60.0, -56.0], [-16.0, -1.0, -28.0, 38.0, -115.0]], [[-20.0, -40.0, 26.0, 43.0, 12.0], [-25.0, 49.0, -40.0, 63.0, -103.0], [12.0, -53.0, -86.0, 80.0, -3.0], [28.0, 51.0, -31.0, -36.0, 57.0]]], [[[2.0, -39.0, 15.0, 19.0, 22.0], [32.0, -11.0, 20.0, 63.0, -81.0], [56.0, 18.0, -9.0, 61.0, 16.0], [14.0, 42.0, -27.0, -13.0, 36.0]], [[11.0, -56.0, -58.0, -35.0, 0.0], [66.0, -78.0, -33.0, 95.0, -44.0], [92.0, -3.0, 21.0, 8.0, -64.0], [25.0, 86.0, -13.0, 100.0, -45.0]], [[-7.0, 7.0, -9.0, 4.0, 5.0], [-25.0, -20.0, -7.0, -15.0, 60.0], [-6.0, -19.0, 23.0, -58.0, -19.0], [-21.0, -21.0, 40.0, 49.0, -41.0]], [[39.0, 1.0, 99.0, 33.0, 36.0], [-5.0, 6.0, 85.0, -59.0, 42.0], [0.0, 60.0, 54.0, -13.0, 51.0], [-35.0, -59.0, -21.0, -69.0, -6.0]], [[-38.0, -9.0, -26.0, 53.0, 38.0], [-43.0, -54.0, -7.0, 60.0, 35.0], [42.0, -38.0, 22.0, -53.0, -3.0], [-42.0, 3.0, 99.0, 120.0, -37.0]]]]),self.functionspace)
16445          ref.setTaggedValue(1,numarray.array([[[[71.0, 25.0, 28.0, 11.0, 8.0], [-43.0, 66.0, 21.0, 41.0, 37.0], [-101.0, -5.0, 20.0, -26.0, 105.0], [-32.0, 10.0, 19.0, 43.0, 24.0]], [[2.0, 4.0, -24.0, 47.0, 35.0], [-16.0, 7.0, -24.0, 27.0, 26.0], [-4.0, 55.0, 29.0, -64.0, 16.0], [24.0, -11.0, 53.0, -44.0, -36.0]], [[-41.0, -42.0, -27.0, 6.0, 19.0], [3.0, 20.0, -46.0, 50.0, -46.0], [-30.0, -49.0, -36.0, -62.0, -33.0], [47.0, -17.0, 19.0, -55.0, 35.0]], [[17.0, 28.0, 48.0, -65.0, -75.0], [-69.0, -52.0, 19.0, -25.0, 1.0], [34.0, -30.0, -59.0, 13.0, 0.0], [-88.0, -16.0, -57.0, 59.0, 34.0]], [[44.0, 34.0, 3.0, 14.0, -11.0], [-4.0, 17.0, 29.0, -22.0, -3.0], [-32.0, -6.0, 4.0, 37.0, 31.0], [-37.0, 16.0, -37.0, 34.0, -1.0]]], [[[14.0, 24.0, 37.0, -52.0, -76.0], [-70.0, -42.0, 13.0, -5.0, -56.0], [-22.0, -77.0, -100.0, -19.0, -26.0], [-88.0, -45.0, -95.0, 39.0, 57.0]], [[15.0, -11.0, -15.0, 48.0, 47.0], [-21.0, 55.0, -26.0, 75.0, 1.0], [-95.0, 5.0, 11.0, -101.0, 41.0], [34.0, -26.0, 51.0, -44.0, 5.0]], [[-10.0, -2.0, 62.0, -94.0, -75.0], [-6.0, -49.0, 40.0, -37.0, -39.0], [18.0, -77.0, -68.0, 64.0, -43.0], [-61.0, -23.0, -94.0, 71.0, 54.0]], [[23.0, 9.0, 57.0, -28.0, 3.0], [39.0, -8.0, 62.0, -30.0, 56.0], [3.0, 49.0, 61.0, 64.0, 29.0], [-8.0, -3.0, 1.0, 61.0, -33.0]], [[67.0, 49.0, -31.0, 64.0, 17.0], [-33.0, 49.0, 2.0, 1.0, 27.0], [-43.0, 31.0, 31.0, -5.0, 79.0], [-28.0, 40.0, 15.0, 6.0, -19.0]]], [[[7.0, 3.0, 33.0, -15.0, 1.0], [-47.0, -18.0, -4.0, 26.0, 63.0], [17.0, 55.0, 22.0, -56.0, 36.0], [-11.0, -23.0, 54.0, 6.0, -17.0]], [[36.0, 12.0, -33.0, 60.0, 40.0], [-24.0, 62.0, -23.0, 43.0, 20.0], [-62.0, 19.0, 28.0, -53.0, 66.0], [16.0, 21.0, 51.0, -27.0, -5.0]], [[10.0, -10.0, -8.0, 29.0, 28.0], [-28.0, 40.0, -24.0, 64.0, -7.0], [-78.0, -10.0, -7.0, -88.0, 29.0], [19.0, -26.0, 33.0, -33.0, 16.0]], [[64.0, 38.0, -14.0, 31.0, 7.0], [-62.0, 52.0, -12.0, 14.0, 69.0], [-12.0, 35.0, 37.0, -9.0, 112.0], [-32.0, 62.0, 57.0, 23.0, 0.0]], [[-20.0, 11.0, -4.0, -4.0, -40.0], [-12.0, -54.0, 4.0, -14.0, -98.0], [-19.0, -58.0, -89.0, -28.0, -92.0], [-37.0, -68.0, -104.0, -20.0, 16.0]]], [[[10.0, 18.0, 23.0, 9.0, -6.0], [12.0, -29.0, 37.0, -10.0, -32.0], [-42.0, 7.0, -13.0, -14.0, -35.0], [-21.0, -62.0, -58.0, 5.0, -23.0]], [[43.0, 64.0, -41.0, 87.0, 23.0], [-27.0, -21.0, 2.0, -33.0, 48.0], [38.0, 117.0, 55.0, -21.0, 28.0], [-24.0, 8.0, 24.0, -27.0, -93.0]], [[3.0, -5.0, -44.0, 40.0, 32.0], [-13.0, 40.0, -41.0, 25.0, 24.0], [5.0, 19.0, 25.0, -28.0, 38.0], [31.0, 42.0, 64.0, -36.0, -4.0]], [[31.0, -17.0, 56.0, -30.0, 9.0], [15.0, 58.0, 39.0, 45.0, -2.0], [-121.0, -50.0, 5.0, -3.0, 51.0], [2.0, -22.0, -10.0, 48.0, 46.0]], [[-13.0, -12.0, -86.0, 104.0, 77.0], [-5.0, 47.0, -71.0, 58.0, 3.0], [-24.0, 50.0, 34.0, -106.0, 13.0], [75.0, 9.0, 92.0, -109.0, -38.0]]]]))
16446          self.failUnless(isinstance(res,Data),"wrong type of result.")
16447          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16448          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16449       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16450       def test_tensor_mult_Symbol_rank2_taggedData_rank1(self):
16451          arg0=Symbol(shape=(2, 3))
16452          arg1=Data(numarray.array([6.0, 7.0, 3.0]),self.functionspace)
16453          arg1.setTaggedValue(1,numarray.array([-3.0, -3.0, -6.0]))
16454          res=tensor_mult(arg0,arg1)
16455          s0=numarray.array([[6.0, 3.0, -2.0], [4.0, 7.0, 6.0]])
16456          sub=res.substitute({arg0:s0})
16457          ref=Data(numarray.array([51.0, 91.0]),self.functionspace)
16458          ref.setTaggedValue(1,numarray.array([-15.0, -69.0]))
16459          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16460          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16461          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16462       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16463       def test_tensor_mult_Symbol_rank2_taggedData_rank2(self):
16464          arg0=Symbol(shape=(2, 3))
16465          arg1=Data(numarray.array([[4.0, 4.0], [-5.0, 1.0], [6.0, 4.0]]),self.functionspace)
16466          arg1.setTaggedValue(1,numarray.array([[-1.0, 7.0], [-7.0, 0.0], [-5.0, 2.0]]))
16467          res=tensor_mult(arg0,arg1)
16468          s0=numarray.array([[-5.0, 0.0, 3.0], [0.0, -2.0, 5.0]])
16469          sub=res.substitute({arg0:s0})
16470          ref=Data(numarray.array([[-2.0, -8.0], [40.0, 18.0]]),self.functionspace)
16471          ref.setTaggedValue(1,numarray.array([[-10.0, -29.0], [-11.0, 10.0]]))
16472          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16473          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16474          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16475       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16476       def test_tensor_mult_Symbol_rank4_taggedData_rank2(self):
16477          arg0=Symbol(shape=(4, 5, 2, 3))
16478          arg1=Data(numarray.array([[1.0, 4.0, -3.0], [1.0, -1.0, 3.0]]),self.functionspace)
16479          arg1.setTaggedValue(1,numarray.array([[4.0, 6.0, 4.0], [2.0, 6.0, -2.0]]))
16480          res=tensor_mult(arg0,arg1)
16481          s0=numarray.array([[[[-3.0, 1.0, -3.0], [6.0, 4.0, 5.0]], [[7.0, -7.0, 0.0], [-3.0, -7.0, -7.0]], [[-5.0, 2.0, 4.0], [1.0, -6.0, 4.0]], [[-7.0, -1.0, 1.0], [7.0, -3.0, -1.0]], [[4.0, 5.0, 4.0], [-5.0, 6.0, -5.0]]], [[[-4.0, 0.0, -2.0], [-7.0, 2.0, 0.0]], [[-3.0, 3.0, -5.0], [3.0, -5.0, -3.0]], [[-4.0, -1.0, 6.0], [0.0, 4.0, 5.0]], [[7.0, -7.0, 1.0], [-1.0, 4.0, 2.0]], [[0.0, -7.0, -1.0], [0.0, -3.0, -4.0]]], [[[-4.0, 2.0, 0.0], [1.0, -4.0, -4.0]], [[5.0, -5.0, -6.0], [7.0, 4.0, -6.0]], [[1.0, 0.0, 0.0], [1.0, -7.0, 5.0]], [[3.0, 6.0, 7.0], [-6.0, -6.0, 6.0]], [[3.0, 2.0, -6.0], [0.0, -1.0, -7.0]]], [[[-7.0, 3.0, 7.0], [4.0, 7.0, -2.0]], [[-6.0, 0.0, -7.0], [-4.0, -1.0, 2.0]], [[4.0, 0.0, 0.0], [-7.0, 5.0, -2.0]], [[-4.0, 6.0, 7.0], [5.0, 7.0, -4.0]], [[-7.0, 5.0, -6.0], [-2.0, 0.0, 6.0]]]])
16482          sub=res.substitute({arg0:s0})
16483          ref=Data(numarray.array([[27.0, -38.0, 10.0, -7.0, -14.0], [-7.0, 23.0, -15.0, -23.0, -34.0], [-3.0, -12.0, 24.0, 24.0, 9.0], [-25.0, 18.0, -14.0, -15.0, 47.0]]),self.functionspace)
16484          ref.setTaggedValue(1,numarray.array([[8.0, -48.0, -34.0, -32.0, 98.0], [-26.0, -32.0, 16.0, 8.0, -56.0], [-18.0, 16.0, -46.0, 16.0, 8.0], [72.0, -70.0, 36.0, 108.0, -38.0]]))
16485          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16486          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16487          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16488       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16489       def test_tensor_mult_Symbol_rank4_taggedData_rank3(self):
16490          arg0=Symbol(shape=(4, 5, 2, 3))
16491          arg1=Data(numarray.array([[[0.0, 3.0], [-4.0, -5.0], [4.0, 3.0]], [[-6.0, -1.0], [0.0, 1.0], [-5.0, 5.0]]]),self.functionspace)
16492          arg1.setTaggedValue(1,numarray.array([[[1.0, 5.0], [-5.0, -1.0], [7.0, -7.0]], [[-7.0, -2.0], [6.0, 4.0], [0.0, 6.0]]]))
16493          res=tensor_mult(arg0,arg1)
16494          s0=numarray.array([[[[7.0, 4.0, -5.0], [-1.0, -6.0, 5.0]], [[0.0, -2.0, 6.0], [-6.0, -4.0, 6.0]], [[2.0, 6.0, -3.0], [-6.0, 2.0, 1.0]], [[-6.0, -5.0, 3.0], [-3.0, -4.0, 7.0]], [[-6.0, 0.0, 4.0], [-7.0, 4.0, -4.0]]], [[[-6.0, 0.0, 0.0], [3.0, 3.0, 0.0]], [[0.0, -4.0, 0.0], [-4.0, 0.0, 1.0]], [[0.0, 0.0, -6.0], [2.0, 1.0, -5.0]], [[1.0, 0.0, 5.0], [-4.0, -4.0, -2.0]], [[-6.0, -1.0, 0.0], [7.0, -7.0, 5.0]]], [[[0.0, -3.0, -6.0], [7.0, -1.0, -5.0]], [[0.0, -3.0, -6.0], [1.0, -6.0, 0.0]], [[3.0, -3.0, -5.0], [-3.0, 6.0, 0.0]], [[4.0, -3.0, 6.0], [-2.0, -6.0, 6.0]], [[4.0, 6.0, 0.0], [2.0, -2.0, -6.0]]], [[[1.0, 0.0, 3.0], [6.0, 7.0, 6.0]], [[5.0, 5.0, 7.0], [-7.0, 2.0, -7.0]], [[-6.0, -4.0, 0.0], [2.0, 0.0, 6.0]], [[5.0, 1.0, 0.0], [0.0, 6.0, 6.0]], [[2.0, -4.0, 3.0], [-1.0, 6.0, 0.0]]]])
16495          sub=res.substitute({arg0:s0})
16496          ref=Data(numarray.array([[[-55.0, 6.0], [38.0, 60.0], [-5.0, -20.0], [15.0, 50.0], [78.0, -15.0]], [[-18.0, -18.0], [35.0, 29.0], [-11.0, -44.0], [54.0, 8.0], [-63.0, -2.0]], [[-29.0, -36.0], [-18.0, -10.0], [10.0, 18.0], [18.0, 71.0], [-6.0, -52.0]], [[-54.0, 43.0], [85.0, -15.0], [-26.0, 30.0], [-34.0, 46.0], [34.0, 42.0]]]),self.functionspace)
16497          ref.setTaggedValue(1,numarray.array([[[-77.0, 74.0], [70.0, -8.0], [5.0, 51.0], [37.0, -14.0], [95.0, -52.0]], [[-9.0, -24.0], [48.0, 18.0], [-50.0, 12.0], [40.0, -50.0], [-92.0, -41.0]], [[-82.0, -3.0], [-70.0, 19.0], [40.0, 83.0], [39.0, -3.0], [-52.0, -34.0]], [[22.0, 36.0], [90.0, -49.0], [0.0, 6.0], [36.0, 84.0], [86.0, 19.0]]]))
16498          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16499          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16500          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16501       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16502       def test_tensor_mult_Symbol_rank4_taggedData_rank4(self):
16503          arg0=Symbol(shape=(4, 5, 2, 3))
16504          arg1=Data(numarray.array([[[[0.0, 2.0, 4.0, -3.0, 5.0], [-6.0, 5.0, -1.0, 3.0, -4.0], [-3.0, 4.0, 7.0, 6.0, -1.0], [-7.0, 6.0, 5.0, -6.0, -5.0]], [[-1.0, -7.0, -3.0, -5.0, 3.0], [7.0, 7.0, -5.0, -3.0, -5.0], [-5.0, -1.0, -7.0, 5.0, -4.0], [6.0, 6.0, -3.0, -1.0, 1.0]], [[7.0, 0.0, -5.0, -2.0, -3.0], [7.0, -6.0, 4.0, 6.0, 5.0], [2.0, -4.0, 2.0, 7.0, 6.0], [2.0, 1.0, -4.0, 5.0, 3.0]]], [[[-2.0, -4.0, -3.0, 7.0, 3.0], [-6.0, 0.0, 0.0, -2.0, -1.0], [-6.0, -4.0, 1.0, 4.0, 4.0], [3.0, 7.0, 6.0, 0.0, 0.0]], [[3.0, 2.0, 5.0, 0.0, -7.0], [-7.0, -6.0, -6.0, 0.0, 7.0], [-2.0, 2.0, 5.0, 3.0, -5.0], [-4.0, -4.0, 3.0, 4.0, 2.0]], [[-7.0, -2.0, -7.0, -4.0, 4.0], [1.0, 5.0, -7.0, 5.0, -5.0], [-1.0, 4.0, 3.0, 5.0, -7.0], [-6.0, 1.0, 3.0, -6.0, 3.0]]]]),self.functionspace)
16505          arg1.setTaggedValue(1,numarray.array([[[[7.0, 6.0, 0.0, 7.0, -1.0], [-3.0, 1.0, -1.0, -5.0, 5.0], [1.0, -2.0, -1.0, 5.0, -6.0], [-2.0, 6.0, 5.0, -1.0, -2.0]], [[0.0, -2.0, 4.0, 7.0, 3.0], [-2.0, 2.0, 7.0, 1.0, -6.0], [-6.0, 7.0, -4.0, 6.0, 7.0], [7.0, 6.0, 0.0, -7.0, -2.0]], [[-3.0, 3.0, 2.0, 7.0, 3.0], [7.0, 3.0, -3.0, 0.0, -2.0], [-7.0, -2.0, 3.0, 2.0, 2.0], [-3.0, 7.0, 1.0, -1.0, -5.0]]], [[[-6.0, 3.0, -7.0, 0.0, 7.0], [7.0, 6.0, 2.0, 0.0, 1.0], [-4.0, -7.0, -1.0, -3.0, -6.0], [0.0, 0.0, -1.0, -5.0, -7.0]], [[0.0, 3.0, 0.0, 2.0, -6.0], [6.0, 2.0, 2.0, -6.0, 1.0], [6.0, -5.0, 4.0, -1.0, 4.0], [-4.0, -2.0, 4.0, -4.0, -3.0]], [[-1.0, 2.0, -5.0, 0.0, 0.0], [5.0, -3.0, -4.0, 4.0, 0.0], [2.0, 1.0, 4.0, 4.0, 2.0], [7.0, -4.0, 3.0, 6.0, -5.0]]]]))
16506          res=tensor_mult(arg0,arg1)
16507          s0=numarray.array([[[[-7.0, 4.0, -7.0], [7.0, -7.0, 2.0]], [[7.0, 2.0, -7.0], [3.0, 7.0, -6.0]], [[6.0, -6.0, 4.0], [4.0, -2.0, 0.0]], [[5.0, -7.0, -1.0], [4.0, 0.0, 6.0]], [[-4.0, 6.0, 7.0], [-2.0, 5.0, -6.0]]], [[[-4.0, -4.0, -2.0], [5.0, 7.0, 7.0]], [[-5.0, -3.0, 6.0], [5.0, -7.0, -7.0]], [[-1.0, 7.0, -1.0], [-1.0, -7.0, 4.0]], [[-2.0, 4.0, -5.0], [0.0, -5.0, 2.0]], [[-4.0, 6.0, 0.0], [-7.0, -5.0, -4.0]]], [[[3.0, -1.0, -5.0], [2.0, -5.0, 3.0]], [[-4.0, 2.0, 1.0], [-1.0, -4.0, 6.0]], [[-1.0, -6.0, 0.0], [1.0, 4.0, -1.0]], [[-5.0, 4.0, -6.0], [0.0, 0.0, 3.0]], [[5.0, -3.0, -7.0], [-2.0, 6.0, 6.0]]], [[[7.0, -4.0, -2.0], [-4.0, 2.0, -2.0]], [[7.0, -7.0, -6.0], [0.0, 3.0, -3.0]], [[4.0, 6.0, 3.0], [1.0, -1.0, 0.0]], [[0.0, 6.0, 3.0], [-6.0, 0.0, -6.0]], [[4.0, 1.0, -1.0], [5.0, -6.0, 7.0]]]])
16508          sub=res.substitute({arg0:s0})
16509          ref=Data(numarray.array([[[[-102.0, -88.0, -75.0, 56.0, 76.0], [30.0, 87.0, -13.0, -79.0, -93.0], [-43.0, -38.0, -113.0, -54.0, -2.0], [96.0, 54.0, 8.0, -37.0, 10.0]], [[6.0, 14.0, 125.0, 28.0, -2.0], [-150.0, 19.0, -45.0, -63.0, 3.0], [-71.0, 32.0, 41.0, 6.0, -38.0], [-34.0, 34.0, 78.0, -15.0, -58.0]], [[20.0, 34.0, 0.0, 32.0, 26.0], [-60.0, -24.0, 52.0, 52.0, 8.0], [0.0, -6.0, 86.0, 44.0, 68.0], [-50.0, 40.0, 50.0, -18.0, -28.0]], [[-50.0, 31.0, -8.0, 26.0, 43.0], [-104.0, 12.0, -16.0, 52.0, -24.0], [-12.0, 39.0, 104.0, 34.0, -9.0], [-103.0, 21.0, 92.0, -64.0, -17.0]], [[104.0, -20.0, 4.0, -22.0, -88.0], [86.0, -80.0, 14.0, -14.0, 88.0], [4.0, -56.0, -51.0, 32.0, 31.0], [88.0, -21.0, -81.0, 109.0, 39.0]]], [[[-48.0, 0.0, -23.0, 43.0, -32.0], [-90.0, -43.0, -75.0, 13.0, 35.0], [-23.0, 18.0, 57.0, 18.0, -56.0], [-55.0, -36.0, 72.0, 4.0, 45.0]], [[63.0, -9.0, -42.0, 81.0, -16.0], [63.0, -75.0, 135.0, -15.0, 46.0], [33.0, -103.0, -53.0, -39.0, 157.0], [114.0, 14.0, -52.0, 77.0, 5.0]], [[-61.0, -69.0, -80.0, -53.0, 81.0], [107.0, 112.0, -24.0, -8.0, -104.0], [-18.0, -1.0, -82.0, 17.0, -30.0], [48.0, 60.0, -37.0, -58.0, 7.0]], [[-68.0, -46.0, -34.0, -12.0, 60.0], [42.0, 88.0, -22.0, -38.0, -82.0], [-16.0, 6.0, -71.0, -32.0, -33.0], [36.0, 29.0, -11.0, -49.0, -5.0]], [[21.0, -24.0, -10.0, -51.0, -4.0], [139.0, 32.0, 32.0, -36.0, -22.0], [38.0, -20.0, -114.0, -57.0, 5.0], [87.0, -21.0, -107.0, 22.0, 4.0]]], [[[-74.0, -11.0, -12.0, 8.0, 80.0], [-34.0, 83.0, -9.0, -7.0, -84.0], [-19.0, 27.0, 4.0, -14.0, -17.0], [-29.0, 44.0, 44.0, -80.0, -32.0]], [[-47.0, -38.0, -86.0, -31.0, 32.0], [85.0, 42.0, -20.0, 20.0, -46.0], [12.0, -2.0, -43.0, 7.0, -24.0], [19.0, 4.0, -30.0, -25.0, 35.0]], [[23.0, 46.0, 38.0, 44.0, -52.0], [-71.0, -76.0, 14.0, 8.0, 66.0], [20.0, 2.0, 53.0, -25.0, 16.0], [-36.0, -52.0, 28.0, 34.0, 4.0]], [[-67.0, -44.0, -23.0, -5.0, 17.0], [19.0, 54.0, -60.0, -48.0, -45.0], [-20.0, 12.0, -66.0, -37.0, -68.0], [29.0, -9.0, -4.0, -22.0, 20.0]], [[-66.0, 39.0, 58.0, -24.0, 13.0], [-124.0, 40.0, -96.0, 16.0, -26.0], [-20.0, 95.0, 88.0, 6.0, -115.0], [-133.0, -27.0, 86.0, -74.0, -19.0]]], [[[18.0, 66.0, 86.0, -17.0, -5.0], [-76.0, -3.0, 7.0, 19.0, 10.0], [17.0, 52.0, 73.0, -12.0, -15.0], [-85.0, -22.0, 31.0, -28.0, -47.0]], [[-5.0, 75.0, 115.0, 38.0, -1.0], [-157.0, -11.0, 7.0, -9.0, 13.0], [-1.0, 53.0, 92.0, -41.0, -9.0], [-97.0, -21.0, 80.0, -35.0, -63.0]], [[10.0, -40.0, -25.0, -41.0, 39.0], [40.0, 50.0, -16.0, 10.0, -39.0], [-40.0, -8.0, -12.0, 76.0, -1.0], [21.0, 74.0, -7.0, -19.0, -7.0]], [[69.0, -6.0, 27.0, -54.0, -33.0], [93.0, -6.0, 24.0, -18.0, 21.0], [18.0, -18.0, -60.0, -3.0, 12.0], [60.0, -9.0, -84.0, 45.0, -3.0]], [[-85.0, -45.0, -76.0, -8.0, 111.0], [-5.0, 104.0, -26.0, 28.0, -108.0], [-44.0, 15.0, 15.0, 59.0, -13.0], [-27.0, 95.0, 54.0, -96.0, -13.0]]]]),self.functionspace)
16510          ref.setTaggedValue(1,numarray.array([[[[-72.0, -67.0, -57.0, -84.0, 89.0], [-19.0, 2.0, 48.0, 89.0, -45.0], [-48.0, 44.0, -57.0, -31.0, -10.0], [105.0, -61.0, -71.0, -9.0, 3.0]], [[58.0, 35.0, 3.0, 28.0, -43.0], [-41.0, 40.0, 72.0, -99.0, 47.0], [62.0, -48.0, -35.0, -7.0, -44.0], [-49.0, 15.0, 35.0, -93.0, 5.0]], [[6.0, 66.0, -44.0, 24.0, 28.0], [38.0, 26.0, -56.0, -24.0, 60.0], [-14.0, -80.0, 18.0, -8.0, -102.0], [-58.0, 32.0, 22.0, 20.0, -42.0]], [[8.0, 65.0, -88.0, -21.0, -1.0], [50.0, -6.0, -67.0, -8.0, 73.0], [50.0, -79.0, 40.0, -7.0, -93.0], [-14.0, -43.0, 38.0, 61.0, -49.0]], [[-31.0, -18.0, 82.0, 73.0, -1.0], [35.0, 45.0, 55.0, -28.0, -67.0], [-63.0, 19.0, -1.0, 7.0, 100.0], [-33.0, 75.0, -9.0, -91.0, -10.0]]], [[[-59.0, 28.0, -90.0, -56.0, -21.0], [118.0, 5.0, -22.0, 2.0, 20.0], [70.0, -79.0, 65.0, -42.0, 4.0], [7.0, -104.0, 22.0, 23.0, -65.0]], [[-76.0, -26.0, 0.0, -28.0, 91.0], [21.0, 44.0, -10.0, 36.0, -21.0], [-105.0, -30.0, -26.0, -67.0, -51.0], [-50.0, 36.0, -73.0, -19.0, 7.0]], [[-2.0, -39.0, 13.0, 21.0, 54.0], [-47.0, -22.0, 21.0, 70.0, -53.0], [-66.0, 99.0, -41.0, 61.0, 39.0], [110.0, 27.0, -21.0, 10.0, 1.0]], [[-1.0, -46.0, -4.0, -31.0, 29.0], [-57.0, -25.0, 27.0, 52.0, -29.0], [-17.0, 69.0, -41.0, 17.0, 14.0], [81.0, -21.0, -29.0, 11.0, 26.0]], [[18.0, -80.0, 93.0, 4.0, 3.0], [-99.0, -32.0, 38.0, 40.0, -68.0], [-50.0, 120.0, -49.0, 26.0, 80.0], [42.0, 38.0, -45.0, -7.0, 80.0]]], [[[21.0, 2.0, -43.0, -31.0, 23.0], [-43.0, -21.0, -13.0, 26.0, 28.0], [12.0, 11.0, -24.0, 10.0, -61.0], [43.0, -25.0, -3.0, 37.0, 7.0]], [[-31.0, -28.0, -13.0, -15.0, 30.0], [14.0, -29.0, -19.0, 70.0, -39.0], [-31.0, 53.0, 8.0, 25.0, 42.0], [77.0, -21.0, -16.0, 46.0, -12.0]], [[-12.0, 19.0, -26.0, -41.0, -34.0], [41.0, 4.0, -27.0, -29.0, 36.0], [53.0, -68.0, 36.0, -52.0, -28.0], [-63.0, -46.0, 7.0, 16.0, 0.0]], [[-20.0, -50.0, -11.0, -49.0, -1.0], [-20.0, -24.0, 39.0, 41.0, -37.0], [19.0, 53.0, -17.0, -1.0, 52.0], [77.0, -60.0, -22.0, 1.0, 17.0]], [[62.0, 39.0, -42.0, -23.0, -85.0], [-6.0, -40.0, -21.0, -40.0, 61.0], [128.0, -27.0, 36.0, 17.0, -17.0], [8.0, -73.0, 62.0, 45.0, -3.0]]], [[[81.0, 34.0, 18.0, 11.0, -65.0], [-53.0, -21.0, -25.0, -59.0, 61.0], [69.0, -22.0, 7.0, 9.0, -46.0], [-58.0, 8.0, 39.0, 23.0, 36.0]], [[70.0, 41.0, -25.0, -36.0, -64.0], [-46.0, -10.0, -20.0, -72.0, 92.0], [103.0, -69.0, 3.0, -34.0, -97.0], [-78.0, -36.0, 32.0, 18.0, 36.0]], [[13.0, 21.0, 23.0, 89.0, 36.0], [-2.0, 29.0, 29.0, -8.0, -22.0], [-63.0, 26.0, -24.0, 60.0, 14.0], [29.0, 83.0, 18.0, -50.0, -39.0]], [[33.0, -33.0, 102.0, 63.0, -15.0], [-63.0, 3.0, 45.0, -18.0, -48.0], [-45.0, 72.0, -33.0, 36.0, 72.0], [-9.0, 81.0, -9.0, -51.0, 45.0]], [[-6.0, 30.0, -68.0, 16.0, 67.0], [13.0, 0.0, -24.0, 45.0, 15.0], [-37.0, 3.0, -12.0, 43.0, -59.0], [75.0, 7.0, 11.0, 31.0, -57.0]]]]))
16511          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16512          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16513          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16514       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16515       def test_tensor_mult_constData_rank2_taggedData_rank1(self):
16516          arg0=Data(numarray.array([[4.0, 5.0, -3.0], [0.0, -2.0, -4.0]]),self.functionspace)
16517          arg1=Data(numarray.array([3.0, -3.0, 4.0]),self.functionspace)
16518          arg1.setTaggedValue(1,numarray.array([3.0, -4.0, -6.0]))
16519          res=tensor_mult(arg0,arg1)
16520          ref=Data(numarray.array([-15.0, -10.0]),self.functionspace)
16521          ref.setTaggedValue(1,numarray.array([10.0, 32.0]))
16522          self.failUnless(isinstance(res,Data),"wrong type of result.")
16523          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16524          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16525       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16526       def test_tensor_mult_constData_rank2_taggedData_rank2(self):
16527          arg0=Data(numarray.array([[0.0, -1.0, -6.0], [-2.0, -6.0, -2.0]]),self.functionspace)
16528          arg1=Data(numarray.array([[2.0, -5.0], [-2.0, -7.0], [5.0, -1.0]]),self.functionspace)
16529          arg1.setTaggedValue(1,numarray.array([[1.0, -7.0], [-2.0, 4.0], [-3.0, -6.0]]))
16530          res=tensor_mult(arg0,arg1)
16531          ref=Data(numarray.array([[-28.0, 13.0], [-2.0, 54.0]]),self.functionspace)
16532          ref.setTaggedValue(1,numarray.array([[20.0, 32.0], [16.0, 2.0]]))
16533          self.failUnless(isinstance(res,Data),"wrong type of result.")
16534          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16535          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16536       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16537       def test_tensor_mult_constData_rank4_taggedData_rank2(self):
16538          arg0=Data(numarray.array([[[[-6.0, -4.0, -3.0], [-4.0, 0.0, -4.0]], [[2.0, -2.0, 1.0], [-1.0, -2.0, 0.0]], [[-6.0, -3.0, 2.0], [-3.0, -2.0, 2.0]], [[5.0, 0.0, -2.0], [7.0, -1.0, 5.0]], [[1.0, 3.0, 0.0], [1.0, 7.0, 6.0]]], [[[3.0, 4.0, 0.0], [-3.0, 7.0, 7.0]], [[7.0, -3.0, 6.0], [6.0, -7.0, 2.0]], [[3.0, -6.0, -6.0], [-7.0, -2.0, -6.0]], [[3.0, 3.0, 1.0], [5.0, 0.0, 2.0]], [[4.0, -3.0, -7.0], [-2.0, 2.0, 6.0]]], [[[4.0, 4.0, 1.0], [1.0, 6.0, 3.0]], [[-1.0, 5.0, -7.0], [2.0, -7.0, -7.0]], [[1.0, 4.0, -5.0], [2.0, -5.0, -5.0]], [[-6.0, -5.0, -3.0], [-3.0, -1.0, 7.0]], [[-6.0, -2.0, 1.0], [2.0, -4.0, -1.0]]], [[[-3.0, 1.0, -5.0], [-1.0, 1.0, 3.0]], [[1.0, 6.0, -5.0], [2.0, 7.0, 5.0]], [[-1.0, -6.0, 4.0], [4.0, -2.0, -2.0]], [[-2.0, -1.0, 0.0], [-4.0, 6.0, -2.0]], [[2.0, -6.0, 1.0], [-6.0, 1.0, 5.0]]]]),self.functionspace)
16539          arg1=Data(numarray.array([[1.0, -4.0, -4.0], [-7.0, -3.0, 0.0]]),self.functionspace)
16540          arg1.setTaggedValue(1,numarray.array([[4.0, 6.0, -2.0], [1.0, -4.0, -3.0]]))
16541          res=tensor_mult(arg0,arg1)
16542          ref=Data(numarray.array([[50.0, 19.0, 25.0, -33.0, -39.0], [-13.0, -26.0, 106.0, -48.0, 52.0], [-41.0, 14.0, 6.0, 50.0, -4.0], [17.0, -38.0, -15.0, 12.0, 61.0]]),self.functionspace)
16543          ref.setTaggedValue(1,numarray.array([[-34.0, 1.0, -47.0, 20.0, -23.0], [-16.0, 26.0, 7.0, 27.0, -16.0], [6.0, 91.0, 75.0, -68.0, -17.0], [-10.0, 9.0, -30.0, -36.0, -55.0]]))
16544          self.failUnless(isinstance(res,Data),"wrong type of result.")
16545          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16546          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16547       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16548       def test_tensor_mult_constData_rank4_taggedData_rank3(self):
16549          arg0=Data(numarray.array([[[[-7.0, 1.0, -6.0], [6.0, 0.0, 3.0]], [[-1.0, -7.0, 7.0], [1.0, -3.0, -5.0]], [[-5.0, -2.0, 4.0], [-7.0, 7.0, -1.0]], [[-2.0, 2.0, 6.0], [-4.0, -7.0, -7.0]], [[1.0, -7.0, 3.0], [2.0, 3.0, -1.0]]], [[[7.0, 4.0, 5.0], [-6.0, 1.0, 2.0]], [[-3.0, -4.0, 0.0], [-3.0, -7.0, 0.0]], [[-7.0, 0.0, -5.0], [7.0, 0.0, 1.0]], [[-4.0, 1.0, 3.0], [-1.0, 0.0, -7.0]], [[2.0, 3.0, 3.0], [6.0, -5.0, 2.0]]], [[[6.0, -2.0, 7.0], [0.0, 3.0, -3.0]], [[-5.0, 5.0, -6.0], [1.0, 7.0, -4.0]], [[-2.0, 6.0, 2.0], [0.0, 1.0, -5.0]], [[-4.0, 1.0, 6.0], [5.0, 3.0, -5.0]], [[3.0, -3.0, -6.0], [-6.0, 7.0, 1.0]]], [[[-5.0, -1.0, 6.0], [7.0, -2.0, -3.0]], [[-2.0, -7.0, -5.0], [-6.0, -2.0, 4.0]], [[-6.0, -5.0, -5.0], [7.0, -7.0, -6.0]], [[4.0, -4.0, -3.0], [0.0, 1.0, 7.0]], [[3.0, -1.0, 3.0], [7.0, 0.0, 3.0]]]]),self.functionspace)
16550          arg1=Data(numarray.array([[[7.0, -6.0], [-5.0, 0.0], [4.0, 5.0]], [[-7.0, 0.0], [2.0, -2.0], [5.0, -7.0]]]),self.functionspace)
16551          arg1.setTaggedValue(1,numarray.array([[[6.0, -6.0], [-2.0, 1.0], [4.0, 6.0]], [[4.0, 0.0], [0.0, 7.0], [-2.0, 2.0]]]))
16552          res=tensor_mult(arg0,arg1)
16553          ref=Data(numarray.array([[[-105.0, -9.0], [18.0, 82.0], [49.0, 43.0], [-21.0, 105.0], [41.0, 10.0]], [[103.0, -33.0], [6.0, 32.0], [-113.0, 10.0], [-49.0, 88.0], [-31.0, -1.0]], [[71.0, 14.0], [-97.0, 14.0], [-59.0, 55.0], [-63.0, 83.0], [73.0, -69.0]], [[-74.0, 85.0], [59.0, -37.0], [-130.0, 67.0], [73.0, -90.0], [4.0, -24.0]]]),self.functionspace)
16554          ref.setTaggedValue(1,numarray.array([[[-50.0, 13.0], [50.0, 10.0], [-36.0, 99.0], [6.0, -13.0], [42.0, 24.0]], [[26.0, 3.0], [-22.0, -35.0], [-36.0, 14.0], [-4.0, 29.0], [38.0, -22.0]], [[74.0, 19.0], [-52.0, 40.0], [-6.0, 27.0], [28.0, 72.0], [-26.0, -6.0]], [[30.0, 45.0], [-50.0, -31.0], [-6.0, -60.0], [6.0, -25.0], [54.0, 5.0]]]))
16555          self.failUnless(isinstance(res,Data),"wrong type of result.")
16556          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16557          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16558       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16559       def test_tensor_mult_constData_rank4_taggedData_rank4(self):
16560          arg0=Data(numarray.array([[[[-4.0, 0.0, 5.0], [0.0, -4.0, 3.0]], [[7.0, -1.0, 4.0], [-3.0, -2.0, -1.0]], [[2.0, 1.0, 7.0], [7.0, 0.0, 7.0]], [[0.0, 3.0, -5.0], [3.0, -4.0, 7.0]], [[0.0, 0.0, 3.0], [-1.0, 1.0, 3.0]]], [[[-5.0, 3.0, 7.0], [3.0, 7.0, 5.0]], [[-7.0, -6.0, 6.0], [0.0, 3.0, -2.0]], [[0.0, 2.0, 3.0], [-7.0, 5.0, 0.0]], [[-2.0, -6.0, 6.0], [7.0, -4.0, 0.0]], [[-5.0, -2.0, -2.0], [-2.0, -5.0, -4.0]]], [[[1.0, 4.0, -2.0], [-4.0, 6.0, 2.0]], [[-5.0, -6.0, 0.0], [0.0, 6.0, -2.0]], [[0.0, 1.0, 0.0], [-1.0, -5.0, 3.0]], [[4.0, 6.0, -3.0], [1.0, -2.0, 7.0]], [[-4.0, 0.0, -1.0], [0.0, -6.0, 6.0]]], [[[0.0, 2.0, -3.0], [6.0, -1.0, 0.0]], [[1.0, 1.0, -7.0], [-6.0, -2.0, 3.0]], [[-2.0, 6.0, -5.0], [-1.0, 7.0, -1.0]], [[0.0, -4.0, -1.0], [7.0, -6.0, 7.0]], [[3.0, 5.0, -3.0], [6.0, -7.0, -5.0]]]]),self.functionspace)
16561          arg1=Data(numarray.array([[[[0.0, 6.0, 3.0, 6.0, -4.0], [-1.0, 6.0, -5.0, -3.0, 7.0], [-2.0, -1.0, 1.0, -1.0, 2.0], [6.0, -2.0, 0.0, -6.0, 5.0]], [[-3.0, -4.0, 3.0, 4.0, -6.0], [5.0, 4.0, -4.0, 3.0, -2.0], [-3.0, -7.0, -7.0, -7.0, 0.0], [1.0, 0.0, 7.0, -5.0, -4.0]], [[7.0, -6.0, 5.0, -4.0, -3.0], [4.0, 4.0, 5.0, -7.0, 4.0], [6.0, 3.0, 3.0, -7.0, 0.0], [-1.0, 7.0, 3.0, 7.0, -3.0]]], [[[-1.0, 4.0, 4.0, 4.0, 3.0], [0.0, -2.0, 0.0, -1.0, -6.0], [1.0, 2.0, 1.0, -5.0, 1.0], [-2.0, 0.0, -6.0, 6.0, 0.0]], [[-3.0, 3.0, 0.0, 1.0, 7.0], [4.0, -5.0, 0.0, 5.0, -4.0], [-3.0, -2.0, -7.0, 2.0, 1.0], [-3.0, 6.0, -3.0, 4.0, 0.0]], [[3.0, -5.0, -1.0, -1.0, -1.0], [-4.0, 1.0, 0.0, -5.0, -5.0], [-3.0, -5.0, 7.0, -1.0, 0.0], [-1.0, 4.0, 0.0, 3.0, -6.0]]]]),self.functionspace)
16562          arg1.setTaggedValue(1,numarray.array([[[[7.0, 3.0, -7.0, -3.0, 0.0], [-6.0, 3.0, 0.0, 6.0, 0.0], [-6.0, -4.0, -1.0, -1.0, 7.0], [-5.0, 4.0, 4.0, -3.0, -4.0]], [[0.0, 1.0, -3.0, 4.0, 5.0], [6.0, 1.0, -1.0, -5.0, -3.0], [-4.0, -6.0, 1.0, 7.0, 4.0], [-4.0, 3.0, 0.0, -6.0, 1.0]], [[2.0, 1.0, 5.0, -4.0, 5.0], [1.0, 1.0, 1.0, 4.0, -6.0], [-6.0, 0.0, -4.0, 4.0, 5.0], [4.0, 1.0, -5.0, 3.0, 6.0]]], [[[5.0, 3.0, -2.0, 2.0, -3.0], [-2.0, 6.0, 4.0, 1.0, -5.0], [-3.0, 0.0, 6.0, -5.0, 5.0], [2.0, 0.0, 0.0, -1.0, -3.0]], [[2.0, -1.0, 0.0, 5.0, 5.0], [-6.0, -5.0, -6.0, -3.0, 6.0], [-1.0, 7.0, 1.0, -1.0, 0.0], [6.0, 0.0, -6.0, -5.0, -2.0]], [[-5.0, 2.0, 4.0, 7.0, -4.0], [7.0, 4.0, 0.0, -6.0, 1.0], [6.0, 4.0, -4.0, 2.0, -4.0], [5.0, 4.0, -6.0, 4.0, -3.0]]]]))
16563          res=tensor_mult(arg0,arg1)
16564          ref=Data(numarray.array([[[[56.0, -81.0, 10.0, -51.0, -30.0], [-4.0, 19.0, 45.0, -58.0, -7.0], [41.0, 12.0, 60.0, -42.0, -12.0], [-20.0, 31.0, 27.0, 52.0, -53.0]], [[37.0, 9.0, 27.0, 9.0, -56.0], [0.0, 69.0, -11.0, -54.0, 98.0], [19.0, 15.0, 30.0, -16.0, 9.0], [50.0, -2.0, 29.0, -38.0, 33.0]], [[60.0, -41.0, 65.0, 9.0, -21.0], [3.0, 37.0, 21.0, -94.0, -37.0], [21.0, -9.0, 72.0, -100.0, 11.0], [-15.0, 73.0, -14.0, 95.0, -57.0]], [[-14.0, -17.0, -11.0, 33.0, -29.0], [-49.0, 13.0, -37.0, -14.0, -63.0], [-45.0, -57.0, 44.0, -16.0, -1.0], [7.0, -31.0, 0.0, -27.0, -39.0]], [[28.0, -34.0, 8.0, -18.0, -8.0], [4.0, 12.0, 15.0, -30.0, -1.0], [5.0, -10.0, 22.0, -17.0, 0.0], [-7.0, 39.0, 12.0, 28.0, -27.0]]], [[[31.0, -76.0, 36.0, -32.0, 34.0], [56.0, -26.0, 48.0, -18.0, -84.0], [10.0, -28.0, -16.0, -71.0, 0.0], [-66.0, 121.0, 3.0, 125.0, -88.0]], [[45.0, -35.0, -7.0, -85.0, 69.0], [21.0, -59.0, 89.0, -14.0, -15.0], [65.0, 71.0, 18.0, 15.0, -11.0], [-61.0, 66.0, -33.0, 120.0, -17.0]], [[7.0, -39.0, -7.0, -27.0, -7.0], [42.0, 9.0, 7.0, 17.0, 30.0], [-10.0, -29.0, -47.0, 10.0, -2.0], [-2.0, 51.0, 50.0, -11.0, -17.0]], [[65.0, -8.0, 34.0, -36.0, 19.0], [-20.0, -6.0, 64.0, -81.0, -4.0], [77.0, 84.0, 93.0, -41.0, -1.0], [-26.0, 22.0, -54.0, 110.0, -4.0]], [[-3.0, -13.0, -35.0, -39.0, 1.0], [-17.0, -21.0, 23.0, 20.0, 13.0], [29.0, 39.0, 8.0, 37.0, -17.0], [-7.0, -50.0, 7.0, -18.0, 13.0]]], [[[-34.0, -6.0, -13.0, 18.0, 6.0], [27.0, -6.0, -31.0, 47.0, -19.0], [-54.0, -65.0, -65.0, 15.0, 4.0], [0.0, 28.0, 28.0, -34.0, -17.0]], [[-6.0, 22.0, -31.0, -46.0, 100.0], [7.0, -86.0, 49.0, 37.0, -37.0], [16.0, 45.0, -19.0, 61.0, -4.0], [-52.0, 38.0, -60.0, 78.0, 11.0]], [[22.0, -38.0, -4.0, -8.0, -47.0], [-27.0, 34.0, -4.0, -36.0, 9.0], [2.0, -14.0, 48.0, -15.0, -6.0], [15.0, -18.0, 28.0, -22.0, -22.0]], [[-13.0, -19.0, 12.0, 55.0, -61.0], [-22.0, 51.0, -59.0, -19.0, -29.0], [-58.0, -84.0, 17.0, -41.0, 7.0], [30.0, -13.0, 33.0, -56.0, -37.0]], [[29.0, -66.0, -23.0, -32.0, -29.0], [-48.0, 8.0, 15.0, -41.0, -38.0], [2.0, -17.0, 77.0, -7.0, -14.0], [-11.0, -11.0, 15.0, 11.0, -53.0]]], [[[-30.0, 31.0, 15.0, 43.0, 8.0], [-6.0, -11.0, -23.0, 16.0, -48.0], [-15.0, -9.0, -10.0, -25.0, 5.0], [-4.0, -27.0, -28.0, 1.0, 1.0]], [[-31.0, -1.0, -56.0, 9.0, -24.0], [-44.0, 7.0, -44.0, 30.0, 6.0], [-56.0, -52.0, 2.0, 64.0, -6.0], [29.0, -51.0, 28.0, -95.0, 4.0]], [[-76.0, 16.0, -16.0, 36.0, 34.0], [44.0, -42.0, -39.0, 100.0, -63.0], [-63.0, -66.0, -116.0, 15.0, 2.0], [-19.0, 7.0, 12.0, -34.0, -13.0]], [[37.0, -3.0, 4.0, 3.0, -1.0], [-76.0, 3.0, 11.0, -77.0, -49.0], [10.0, 16.0, 123.0, -19.0, 1.0], [-6.0, -15.0, -55.0, 52.0, -23.0]], [[-36.0, 44.0, 38.0, 72.0, -59.0], [2.0, 44.0, -50.0, 11.0, 16.0], [3.0, 4.0, -21.0, -56.0, 5.0], [40.0, -89.0, 11.0, -71.0, 34.0]]]]),self.functionspace)
16565          ref.setTaggedValue(1,numarray.array([[[[-41.0, 3.0, 65.0, -7.0, -7.0], [74.0, 25.0, 29.0, -10.0, -51.0], [16.0, 0.0, -32.0, 34.0, -15.0], [31.0, 1.0, -35.0, 59.0, 45.0]], [[43.0, 15.0, -24.0, -64.0, 18.0], [-33.0, 12.0, 5.0, 72.0, -19.0], [-57.0, -40.0, -40.0, 17.0, 54.0], [-38.0, 25.0, 26.0, 6.0, 11.0]], [[28.0, 49.0, 32.0, 33.0, -9.0], [36.0, 84.0, 34.0, 0.0, -73.0], [-37.0, 14.0, -15.0, 12.0, 60.0], [63.0, 46.0, -69.0, 30.0, -7.0]], [[-38.0, 25.0, -12.0, 67.0, -67.0], [80.0, 64.0, 28.0, -62.0, -11.0], [55.0, -18.0, 9.0, 4.0, -26.0], [-15.0, 32.0, 7.0, 12.0, -49.0]], [[-12.0, 5.0, 29.0, 12.0, 11.0], [20.0, 4.0, -7.0, -10.0, -4.0], [2.0, 19.0, -29.0, 22.0, -2.0], [31.0, 15.0, -39.0, 17.0, 10.0]]], [[[-17.0, 7.0, 75.0, 75.0, 56.0], [42.0, -2.0, -26.0, -65.0, -19.0], [-10.0, 71.0, -15.0, 42.0, 7.0], [114.0, 16.0, -127.0, 0.0, 27.0]], [[-21.0, -28.0, 89.0, -26.0, 23.0], [-20.0, -44.0, -6.0, 15.0, -2.0], [15.0, 77.0, -12.0, -18.0, -35.0], [91.0, -48.0, -64.0, 52.0, 58.0]], [[-19.0, -21.0, 23.0, 7.0, 71.0], [-1.0, -62.0, -57.0, -20.0, 41.0], [-10.0, 23.0, -47.0, 56.0, -12.0], [20.0, 9.0, -45.0, -21.0, 31.0]], [[25.0, 19.0, 48.0, -48.0, -41.0], [-8.0, 56.0, 64.0, 61.0, -77.0], [-17.0, 16.0, 10.0, -47.0, 27.0], [48.0, -20.0, -14.0, 73.0, 25.0]], [[-39.0, -28.0, 19.0, -42.0, -23.0], [22.0, -22.0, 22.0, 9.0, -6.0], [37.0, -19.0, 10.0, -10.0, -47.0], [-29.0, -44.0, 44.0, 32.0, 34.0]]], [[[-15.0, -9.0, -13.0, 57.0, 44.0], [2.0, -41.0, -58.0, -56.0, 58.0], [8.0, 22.0, -15.0, 37.0, -15.0], [9.0, 22.0, -34.0, -51.0, -18.0]], [[-13.0, -31.0, 45.0, 7.0, 8.0], [-56.0, -59.0, -30.0, -6.0, 52.0], [36.0, 90.0, 13.0, -47.0, -51.0], [75.0, -46.0, -44.0, 13.0, 8.0]], [[-30.0, 9.0, 11.0, -2.0, -29.0], [59.0, 32.0, 25.0, -9.0, -25.0], [22.0, -29.0, -22.0, 23.0, -13.0], [-21.0, 15.0, 12.0, 32.0, 5.0]], [[-12.0, 34.0, -35.0, 65.0, -26.0], [68.0, 59.0, 7.0, -53.0, -10.0], [11.0, -38.0, -10.0, 37.0, 14.0], [-31.0, 59.0, 1.0, -20.0, -48.0]], [[-72.0, 5.0, 47.0, 28.0, -59.0], [101.0, 41.0, 35.0, -46.0, -24.0], [72.0, -2.0, -22.0, 18.0, -57.0], [10.0, 7.0, -11.0, 63.0, 4.0]]], [[[22.0, 18.0, -33.0, 27.0, -28.0], [3.0, 40.0, 25.0, -13.0, -24.0], [-7.0, -19.0, 49.0, -27.0, 23.0], [-14.0, 3.0, 21.0, -22.0, -32.0]], [[-56.0, -13.0, -21.0, 28.0, -34.0], [38.0, -17.0, -20.0, -45.0, 60.0], [70.0, -12.0, -22.0, 16.0, -66.0], [-46.0, 12.0, 33.0, -2.0, -32.0]], [[-10.0, -17.0, -31.0, 76.0, 47.0], [-4.0, -50.0, -57.0, -78.0, 58.0], [8.0, 17.0, 33.0, 20.0, -16.0], [1.0, 1.0, -19.0, -83.0, -24.0]], [[-14.0, 36.0, 21.0, 21.0, -104.0], [46.0, 95.0, 67.0, -1.0, -46.0], [49.0, 10.0, 8.0, -47.0, -14.0], [25.0, 15.0, -1.0, 72.0, -40.0]], [[56.0, 26.0, -83.0, -35.0, -23.0], [4.0, 62.0, 58.0, 38.0, -74.0], [-61.0, -111.0, 63.0, -13.0, 76.0], [-102.0, 4.0, 99.0, -39.0, -14.0]]]]))
16566          self.failUnless(isinstance(res,Data),"wrong type of result.")
16567          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16568          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16569       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16570       def test_tensor_mult_taggedData_rank2_array_rank1(self):
16571          arg0=Data(numarray.array([[-6.0, 7.0, -2.0], [-7.0, 0.0, 6.0]]),self.functionspace)
16572          arg0.setTaggedValue(1,numarray.array([[-6.0, 3.0, -5.0], [-4.0, -5.0, -2.0]]))
16573          arg1=numarray.array([5.0, 5.0, 7.0])
16574          res=tensor_mult(arg0,arg1)
16575          ref=Data(numarray.array([-9.0, 7.0]),self.functionspace)
16576          ref.setTaggedValue(1,numarray.array([-50.0, -59.0]))
16577          self.failUnless(isinstance(res,Data),"wrong type of result.")
16578          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16579          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16580       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16581       def test_tensor_mult_taggedData_rank2_array_rank2(self):
16582          arg0=Data(numarray.array([[-6.0, 0.0, -2.0], [4.0, -6.0, 0.0]]),self.functionspace)
16583          arg0.setTaggedValue(1,numarray.array([[1.0, 4.0, 0.0], [7.0, -1.0, 6.0]]))
16584          arg1=numarray.array([[4.0, -7.0], [0.0, 6.0], [7.0, 3.0]])
16585          res=tensor_mult(arg0,arg1)
16586          ref=Data(numarray.array([[-38.0, 36.0], [16.0, -64.0]]),self.functionspace)
16587          ref.setTaggedValue(1,numarray.array([[4.0, 17.0], [70.0, -37.0]]))
16588          self.failUnless(isinstance(res,Data),"wrong type of result.")
16589          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16590          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16591       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16592       def test_tensor_mult_taggedData_rank2_Symbol_rank1(self):
16593          arg0=Data(numarray.array([[7.0, 6.0, -7.0], [-2.0, 6.0, 2.0]]),self.functionspace)
16594          arg0.setTaggedValue(1,numarray.array([[0.0, 2.0, 4.0], [-6.0, 7.0, 4.0]]))
16595          arg1=Symbol(shape=(3,))
16596          res=tensor_mult(arg0,arg1)
16597          s1=numarray.array([-4.0, -6.0, 0.0])
16598          sub=res.substitute({arg1:s1})
16599          ref=Data(numarray.array([-64.0, -28.0]),self.functionspace)
16600          ref.setTaggedValue(1,numarray.array([-12.0, -18.0]))
16601          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16602          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16603          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16604       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16605       def test_tensor_mult_taggedData_rank2_Symbol_rank2(self):
16606          arg0=Data(numarray.array([[-4.0, -5.0, -6.0], [5.0, -6.0, 0.0]]),self.functionspace)
16607          arg0.setTaggedValue(1,numarray.array([[5.0, 5.0, -1.0], [-1.0, 0.0, -6.0]]))
16608          arg1=Symbol(shape=(3, 2))
16609          res=tensor_mult(arg0,arg1)
16610          s1=numarray.array([[1.0, -1.0], [4.0, -3.0], [5.0, 1.0]])
16611          sub=res.substitute({arg1:s1})
16612          ref=Data(numarray.array([[-54.0, 13.0], [-19.0, 13.0]]),self.functionspace)
16613          ref.setTaggedValue(1,numarray.array([[20.0, -21.0], [-31.0, -5.0]]))
16614          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16615          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16616          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16617       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16618       def test_tensor_mult_taggedData_rank2_constData_rank1(self):
16619          arg0=Data(numarray.array([[-1.0, 1.0, -6.0], [6.0, -4.0, 6.0]]),self.functionspace)
16620          arg0.setTaggedValue(1,numarray.array([[-7.0, 2.0, -4.0], [4.0, -3.0, 0.0]]))
16621          arg1=Data(numarray.array([7.0, -1.0, -2.0]),self.functionspace)
16622          res=tensor_mult(arg0,arg1)
16623          ref=Data(numarray.array([4.0, 34.0]),self.functionspace)
16624          ref.setTaggedValue(1,numarray.array([-43.0, 31.0]))
16625          self.failUnless(isinstance(res,Data),"wrong type of result.")
16626          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16627          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16628       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16629       def test_tensor_mult_taggedData_rank2_constData_rank2(self):
16630          arg0=Data(numarray.array([[6.0, -3.0, -3.0], [2.0, 6.0, 1.0]]),self.functionspace)
16631          arg0.setTaggedValue(1,numarray.array([[-4.0, 7.0, 0.0], [1.0, 4.0, 4.0]]))
16632          arg1=Data(numarray.array([[-3.0, 3.0], [-5.0, 1.0], [-2.0, -2.0]]),self.functionspace)
16633          res=tensor_mult(arg0,arg1)
16634          ref=Data(numarray.array([[3.0, 21.0], [-38.0, 10.0]]),self.functionspace)
16635          ref.setTaggedValue(1,numarray.array([[-23.0, -5.0], [-31.0, -1.0]]))
16636          self.failUnless(isinstance(res,Data),"wrong type of result.")
16637          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16638          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16639       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16640       def test_tensor_mult_taggedData_rank2_taggedData_rank1(self):
16641          arg0=Data(numarray.array([[-6.0, -5.0, -3.0], [3.0, 6.0, -6.0]]),self.functionspace)
16642          arg0.setTaggedValue(1,numarray.array([[-7.0, 1.0, -4.0], [6.0, 3.0, 5.0]]))
16643          arg1=Data(numarray.array([0.0, -7.0, 3.0]),self.functionspace)
16644          arg1.setTaggedValue(1,numarray.array([3.0, -2.0, -4.0]))
16645          res=tensor_mult(arg0,arg1)
16646          ref=Data(numarray.array([26.0, -60.0]),self.functionspace)
16647          ref.setTaggedValue(1,numarray.array([-7.0, -8.0]))
16648          self.failUnless(isinstance(res,Data),"wrong type of result.")
16649          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16650          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16651       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16652       def test_tensor_mult_taggedData_rank2_taggedData_rank2(self):
16653          arg0=Data(numarray.array([[7.0, -3.0, 3.0], [-7.0, -1.0, 3.0]]),self.functionspace)
16654          arg0.setTaggedValue(1,numarray.array([[-4.0, 0.0, -1.0], [3.0, -1.0, -7.0]]))
16655          arg1=Data(numarray.array([[6.0, 0.0], [-3.0, 4.0], [0.0, -3.0]]),self.functionspace)
16656          arg1.setTaggedValue(1,numarray.array([[-7.0, 7.0], [-1.0, -2.0], [5.0, -3.0]]))
16657          res=tensor_mult(arg0,arg1)
16658          ref=Data(numarray.array([[51.0, -21.0], [-39.0, -13.0]]),self.functionspace)
16659          ref.setTaggedValue(1,numarray.array([[23.0, -25.0], [-55.0, 44.0]]))
16660          self.failUnless(isinstance(res,Data),"wrong type of result.")
16661          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16662          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16663       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16664       def test_tensor_mult_taggedData_rank2_expandedData_rank1(self):
16665          arg0=Data(numarray.array([[-4.0, 1.0, 3.0], [-6.0, -7.0, -1.0]]),self.functionspace)
16666          arg0.setTaggedValue(1,numarray.array([[2.0, 2.0, -7.0], [1.0, -3.0, 4.0]]))
16667          arg1=Data(numarray.array([7.0, 4.0, -7.0]),self.functionspace)
16668          arg1.setTaggedValue(1,numarray.array([1.0, 1.0, 2.0]))
16669          arg1.expand()
16670          res=tensor_mult(arg0,arg1)
16671          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16672          ref=msk_ref*numarray.array([-45.0, -63.0])+(1.-msk_ref)*numarray.array([-10.0, 6.0])
16673          self.failUnless(isinstance(res,Data),"wrong type of result.")
16674          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16675          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16676       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16677       def test_tensor_mult_taggedData_rank2_expandedData_rank2(self):
16678          arg0=Data(numarray.array([[-6.0, 4.0, 4.0], [6.0, -4.0, -3.0]]),self.functionspace)
16679          arg0.setTaggedValue(1,numarray.array([[7.0, 3.0, 0.0], [-5.0, -4.0, 5.0]]))
16680          arg1=Data(numarray.array([[6.0, 5.0], [6.0, -7.0], [5.0, -6.0]]),self.functionspace)
16681          arg1.setTaggedValue(1,numarray.array([[6.0, 0.0], [4.0, -6.0], [2.0, 0.0]]))
16682          arg1.expand()
16683          res=tensor_mult(arg0,arg1)
16684          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16685          ref=msk_ref*numarray.array([[8.0, -82.0], [-3.0, 76.0]])+(1.-msk_ref)*numarray.array([[54.0, -18.0], [-36.0, 24.0]])
16686          self.failUnless(isinstance(res,Data),"wrong type of result.")
16687          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16688          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16689       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16690       def test_tensor_mult_taggedData_rank4_array_rank2(self):
16691          arg0=Data(numarray.array([[[[6.0, 0.0, 4.0], [6.0, 7.0, -3.0]], [[-1.0, 5.0, -7.0], [0.0, 3.0, 0.0]], [[0.0, -7.0, -5.0], [2.0, 1.0, 2.0]], [[4.0, -6.0, 0.0], [4.0, 0.0, 3.0]], [[6.0, 2.0, 7.0], [1.0, 6.0, -2.0]]], [[[2.0, 6.0, -6.0], [-3.0, -2.0, 5.0]], [[2.0, 1.0, -6.0], [7.0, -5.0, 3.0]], [[-4.0, 2.0, 0.0], [-3.0, 6.0, 3.0]], [[5.0, 5.0, 0.0], [-6.0, 5.0, 4.0]], [[4.0, 0.0, -2.0], [-5.0, -2.0, 6.0]]], [[[5.0, -7.0, -1.0], [4.0, 0.0, -3.0]], [[-4.0, -7.0, -5.0], [3.0, -7.0, -6.0]], [[7.0, 7.0, 5.0], [-7.0, 0.0, 0.0]], [[2.0, 4.0, 7.0], [-4.0, -3.0, 1.0]], [[-3.0, -4.0, 0.0], [-6.0, 3.0, 0.0]]], [[[-2.0, 0.0, 5.0], [3.0, 7.0, 4.0]], [[-6.0, 0.0, 4.0], [2.0, 7.0, 5.0]], [[2.0, -2.0, -2.0], [-4.0, 3.0, -3.0]], [[0.0, -7.0, -5.0], [-1.0, 3.0, 0.0]], [[0.0, -6.0, -1.0], [-6.0, 0.0, 3.0]]]]),self.functionspace)
16692          arg0.setTaggedValue(1,numarray.array([[[[-3.0, 5.0, 0.0], [-6.0, 1.0, 0.0]], [[-4.0, 6.0, 0.0], [-7.0, 1.0, 2.0]], [[4.0, -4.0, -7.0], [5.0, 7.0, 7.0]], [[6.0, 2.0, -3.0], [0.0, -1.0, 1.0]], [[2.0, 2.0, -3.0], [4.0, 5.0, 0.0]]], [[[6.0, 7.0, -2.0], [-7.0, 5.0, 0.0]], [[7.0, -2.0, 6.0], [6.0, 5.0, 2.0]], [[-1.0, 7.0, 4.0], [0.0, 3.0, -4.0]], [[5.0, -7.0, 6.0], [4.0, -3.0, -6.0]], [[3.0, 1.0, -5.0], [6.0, 3.0, -3.0]]], [[[1.0, 3.0, -5.0], [2.0, 6.0, -1.0]], [[-7.0, -6.0, -7.0], [-1.0, 5.0, -3.0]], [[1.0, 0.0, -5.0], [2.0, 4.0, 4.0]], [[-6.0, -1.0, -3.0], [2.0, 6.0, 0.0]], [[-6.0, 2.0, -2.0], [0.0, 7.0, 7.0]]], [[[2.0, -7.0, 6.0], [0.0, 3.0, 3.0]], [[0.0, -2.0, -2.0], [3.0, 7.0, -4.0]], [[3.0, 7.0, 4.0], [-3.0, -4.0, 5.0]], [[1.0, 6.0, -5.0], [-6.0, 4.0, 3.0]], [[0.0, 1.0, -5.0], [7.0, 2.0, -3.0]]]]))
16693          arg1=numarray.array([[7.0, -6.0, 2.0], [0.0, -5.0, 2.0]])
16694          res=tensor_mult(arg0,arg1)
16695          ref=Data(numarray.array([[9.0, -66.0, 31.0, 70.0, 10.0], [-14.0, 27.0, -64.0, -12.0, 46.0], [69.0, 27.0, 17.0, 21.0, -12.0], [-31.0, -59.0, 1.0, 17.0, 40.0]]),self.functionspace)
16696          ref.setTaggedValue(1,numarray.array([[-56.0, -65.0, 17.0, 31.0, -29.0], [-29.0, 52.0, -64.0, 92.0, -16.0], [-53.0, -58.0, -15.0, -72.0, -79.0], [59.0, -35.0, 17.0, -53.0, -32.0]]))
16697          self.failUnless(isinstance(res,Data),"wrong type of result.")
16698          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16699          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16700       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16701       def test_tensor_mult_taggedData_rank4_array_rank3(self):
16702          arg0=Data(numarray.array([[[[-4.0, 3.0, 2.0], [0.0, 5.0, -3.0]], [[-5.0, -6.0, 0.0], [7.0, 1.0, -7.0]], [[-1.0, 5.0, 0.0], [6.0, 0.0, 0.0]], [[7.0, 2.0, -2.0], [7.0, -1.0, -6.0]], [[4.0, 4.0, 1.0], [-5.0, -6.0, 7.0]]], [[[-1.0, 3.0, 3.0], [5.0, -3.0, -3.0]], [[0.0, 5.0, 4.0], [-1.0, -3.0, 0.0]], [[5.0, -7.0, 7.0], [-1.0, -4.0, 4.0]], [[0.0, -4.0, 0.0], [-7.0, 0.0, -5.0]], [[4.0, -5.0, -7.0], [2.0, 5.0, -2.0]]], [[[0.0, 5.0, 6.0], [-6.0, -2.0, 6.0]], [[-5.0, 4.0, 4.0], [3.0, -5.0, 7.0]], [[-4.0, -5.0, -4.0], [-1.0, 4.0, -7.0]], [[-5.0, -3.0, 7.0], [0.0, 3.0, -1.0]], [[-1.0, -3.0, 1.0], [0.0, 5.0, 1.0]]], [[[0.0, 5.0, -1.0], [7.0, 3.0, -4.0]], [[7.0, -6.0, -1.0], [3.0, 0.0, -3.0]], [[-7.0, -2.0, 3.0], [7.0, 0.0, 5.0]], [[-6.0, 5.0, 7.0], [2.0, -3.0, -4.0]], [[0.0, 0.0, -1.0], [0.0, -3.0, 4.0]]]]),self.functionspace)
16703          arg0.setTaggedValue(1,numarray.array([[[[6.0, -4.0, -1.0], [1.0, 3.0, 0.0]], [[-1.0, -6.0, -7.0], [6.0, 0.0, 5.0]], [[-2.0, -7.0, -2.0], [-2.0, 4.0, -1.0]], [[-6.0, 3.0, 6.0], [5.0, 6.0, 6.0]], [[0.0, 1.0, -3.0], [-3.0, 0.0, -7.0]]], [[[5.0, 5.0, 4.0], [4.0, 5.0, 7.0]], [[1.0, -2.0, 3.0], [-7.0, 0.0, 3.0]], [[2.0, 4.0, 7.0], [-6.0, 6.0, -1.0]], [[2.0, 6.0, -2.0], [-6.0, -2.0, 1.0]], [[-4.0, 1.0, 4.0], [-7.0, 4.0, 2.0]]], [[[-4.0, -1.0, 2.0], [1.0, -3.0, 2.0]], [[4.0, 3.0, 2.0], [-5.0, 0.0, -6.0]], [[-5.0, -2.0, 0.0], [7.0, -4.0, 4.0]], [[-4.0, 0.0, -6.0], [5.0, -6.0, -5.0]], [[6.0, -2.0, 2.0], [-5.0, 1.0, 3.0]]], [[[-4.0, 3.0, 5.0], [-6.0, 6.0, -7.0]], [[6.0, -5.0, 2.0], [-4.0, -3.0, 1.0]], [[-5.0, 3.0, -5.0], [0.0, 4.0, -5.0]], [[-5.0, 0.0, 0.0], [-3.0, 4.0, -1.0]], [[0.0, -6.0, -4.0], [-6.0, 5.0, -7.0]]]]))
16704          arg1=numarray.array([[[3.0, 0.0], [-3.0, -5.0], [-6.0, -1.0]], [[1.0, 6.0], [-2.0, -7.0], [5.0, 3.0]]])
16705          res=tensor_mult(arg0,arg1)
16706          ref=Data(numarray.array([[[-58.0, -61.0], [-27.0, 44.0], [-12.0, 11.0], [6.0, 23.0], [36.0, 12.0]], [[-34.0, 24.0], [-34.0, -14.0], [21.0, 62.0], [-20.0, -37.0], [51.0, 3.0]], [[-23.0, -35.0], [-3.0, 50.0], [-17.0, -26.0], [-59.0, -16.0], [-5.0, -18.0]], [[-28.0, -15.0], [33.0, 40.0], [-1.0, 64.0], [-87.0, -11.0], [32.0, 34.0]]]),self.functionspace)
16707          ref.setTaggedValue(1,numarray.array([[[31.0, 6.0], [88.0, 88.0], [12.0, -6.0], [-40.0, -15.0], [-23.0, -41.0]], [[5.0, -19.0], [-1.0, -26.0], [-71.0, -108.0], [3.0, -47.0], [-44.0, -73.0]], [[-4.0, 36.0], [-44.0, -65.0], [26.0, 92.0], [16.0, 63.0], [20.0, -20.0]], [[-104.0, -119.0], [28.0, 23.0], [-27.0, -53.0], [-31.0, -49.0], [-9.0, -58.0]]]))
16708          self.failUnless(isinstance(res,Data),"wrong type of result.")
16709          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16710          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16711       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16712       def test_tensor_mult_taggedData_rank4_array_rank4(self):
16713          arg0=Data(numarray.array([[[[6.0, -1.0, -2.0], [-4.0, 1.0, -2.0]], [[3.0, -2.0, -1.0], [-3.0, -3.0, 3.0]], [[6.0, -3.0, 5.0], [5.0, 0.0, 7.0]], [[0.0, -6.0, -1.0], [-3.0, 7.0, -3.0]], [[-6.0, 0.0, 0.0], [5.0, 7.0, 0.0]]], [[[5.0, -6.0, 4.0], [-4.0, -6.0, -4.0]], [[3.0, -2.0, 5.0], [-2.0, 2.0, 4.0]], [[6.0, 5.0, 0.0], [-3.0, -3.0, 0.0]], [[0.0, 4.0, 0.0], [3.0, 2.0, -6.0]], [[0.0, -1.0, 1.0], [-1.0, 4.0, -3.0]]], [[[1.0, 6.0, 7.0], [-1.0, 0.0, 5.0]], [[5.0, -7.0, 4.0], [-4.0, -6.0, -4.0]], [[-4.0, 3.0, -7.0], [7.0, -3.0, 2.0]], [[6.0, 1.0, 0.0], [0.0, 1.0, 7.0]], [[3.0, 0.0, 7.0], [1.0, 0.0, 6.0]]], [[[-3.0, -4.0, -5.0], [-1.0, -2.0, -4.0]], [[4.0, -5.0, 7.0], [7.0, -7.0, 4.0]], [[1.0, 4.0, 5.0], [7.0, -6.0, -5.0]], [[1.0, 2.0, 4.0], [4.0, 1.0, 2.0]], [[2.0, 6.0, -6.0], [1.0, 3.0, -7.0]]]]),self.functionspace)
16714          arg0.setTaggedValue(1,numarray.array([[[[2.0, 3.0, 5.0], [5.0, -7.0, 3.0]], [[4.0, -7.0, -6.0], [-6.0, 0.0, 3.0]], [[4.0, 6.0, -6.0], [-3.0, 0.0, 0.0]], [[-2.0, -5.0, -7.0], [-4.0, -7.0, -4.0]], [[-1.0, -5.0, 4.0], [1.0, -7.0, -3.0]]], [[[-2.0, 2.0, 4.0], [4.0, -3.0, -2.0]], [[5.0, 6.0, 6.0], [-2.0, -6.0, -5.0]], [[-6.0, 7.0, 4.0], [0.0, -3.0, -5.0]], [[0.0, -6.0, -4.0], [0.0, 1.0, 2.0]], [[-4.0, 5.0, 3.0], [-5.0, 0.0, 0.0]]], [[[2.0, 0.0, -1.0], [-1.0, 0.0, -1.0]], [[7.0, -5.0, 7.0], [0.0, 7.0, -3.0]], [[0.0, -4.0, 2.0], [-3.0, 3.0, 6.0]], [[-6.0, 0.0, -1.0], [-6.0, 5.0, 3.0]], [[-3.0, -1.0, 0.0], [-1.0, -1.0, -1.0]]], [[[1.0, -6.0, 2.0], [-7.0, 1.0, -4.0]], [[-5.0, 4.0, 6.0], [-6.0, -1.0, 1.0]], [[1.0, 2.0, 5.0], [7.0, 2.0, 0.0]], [[6.0, -6.0, 7.0], [0.0, -6.0, 0.0]], [[-5.0, -6.0, -3.0], [4.0, -3.0, 4.0]]]]))
16715          arg1=numarray.array([[[[0.0, -7.0, 5.0, -6.0, 5.0], [-7.0, 1.0, 6.0, -4.0, 2.0], [2.0, 3.0, -4.0, -5.0, -1.0], [-1.0, -3.0, 7.0, 1.0, -4.0]], [[6.0, -6.0, -2.0, 0.0, 7.0], [0.0, 7.0, 3.0, 1.0, 5.0], [-7.0, 0.0, -4.0, -4.0, 1.0], [0.0, 7.0, 1.0, 7.0, -5.0]], [[-3.0, 1.0, 4.0, -5.0, -6.0], [2.0, -3.0, -6.0, -1.0, 4.0], [5.0, -4.0, -1.0, -5.0, -5.0], [3.0, -7.0, -1.0, 7.0, 7.0]]], [[[-6.0, 7.0, 0.0, -2.0, -4.0], [0.0, 0.0, -7.0, 3.0, 7.0], [-2.0, -5.0, -7.0, 7.0, -6.0], [-6.0, -7.0, -3.0, -2.0, 0.0]], [[6.0, 0.0, 2.0, -6.0, -2.0], [-2.0, -4.0, 2.0, 0.0, -3.0], [-5.0, 2.0, -3.0, -7.0, -3.0], [6.0, 0.0, 5.0, 6.0, -3.0]], [[2.0, -3.0, -5.0, 0.0, -4.0], [2.0, 7.0, 4.0, 1.0, 0.0], [2.0, 4.0, -6.0, 3.0, 2.0], [-6.0, -6.0, 0.0, 6.0, -1.0]]]])
16716          res=tensor_mult(arg0,arg1)
16717          ref=Data(numarray.array([[[[26.0, -60.0, 36.0, -24.0, 57.0], [-52.0, -13.0, 67.0, -37.0, -32.0], [8.0, 40.0, 19.0, -57.0, 20.0], [30.0, 29.0, 60.0, -13.0, -34.0]], [[-3.0, -40.0, -6.0, 11.0, 13.0], [-11.0, 25.0, 45.0, -19.0, -20.0], [42.0, 34.0, 9.0, 7.0, 33.0], [-24.0, -13.0, 14.0, -12.0, -3.0]], [[-49.0, -5.0, 21.0, -71.0, -69.0], [-18.0, 19.0, -10.0, -10.0, 52.0], [62.0, 1.0, -94.0, 13.0, -50.0], [-63.0, -151.0, 19.0, 52.0, 19.0]], [[21.0, 23.0, 37.0, -31.0, -26.0], [-22.0, -88.0, 11.0, -17.0, -76.0], [2.0, 21.0, 43.0, -50.0, -10.0], [75.0, 4.0, 39.0, -19.0, 5.0]], [[12.0, 77.0, -16.0, -16.0, -64.0], [28.0, -34.0, -57.0, 39.0, 2.0], [-57.0, -29.0, -32.0, 16.0, -45.0], [18.0, -17.0, -22.0, 26.0, 3.0]]], [[[-68.0, -11.0, 61.0, -6.0, 3.0], [-23.0, -53.0, -12.0, -46.0, -14.0], [102.0, -9.0, 70.0, -19.0, 3.0], [19.0, -33.0, 7.0, -61.0, 60.0]], [[5.0, -30.0, 23.0, -51.0, -41.0], [-7.0, -6.0, 16.0, -21.0, -4.0], [47.0, 19.0, -25.0, -48.0, -16.0], [12.0, -68.0, 30.0, 64.0, 23.0]], [[30.0, -93.0, 14.0, -12.0, 83.0], [-36.0, 53.0, 66.0, -28.0, 25.0], [-2.0, 27.0, -14.0, -50.0, 26.0], [-6.0, 38.0, 41.0, 29.0, -40.0]], [[6.0, 15.0, 26.0, -18.0, 36.0], [-16.0, -22.0, -29.0, 7.0, 35.0], [-56.0, -35.0, -7.0, -27.0, -32.0], [30.0, 43.0, 5.0, -2.0, -20.0]], [[15.0, 9.0, 29.0, -27.0, -5.0], [-12.0, -47.0, -6.0, -8.0, -20.0], [-12.0, -3.0, 16.0, -45.0, -18.0], [51.0, 11.0, 21.0, 8.0, 3.0]]], [[[31.0, -58.0, -4.0, -39.0, -11.0], [17.0, 57.0, 9.0, -3.0, 53.0], [7.0, 0.0, -58.0, -56.0, -14.0], [-4.0, -33.0, 9.0, 124.0, 10.0]], [[-74.0, -5.0, 63.0, -6.0, -4.0], [-23.0, -60.0, -15.0, -47.0, -19.0], [109.0, -9.0, 74.0, -15.0, 2.0], [19.0, -40.0, 6.0, -68.0, 65.0]], [[-17.0, 46.0, -70.0, 63.0, 13.0], [24.0, 64.0, -20.0, 49.0, 37.0], [-59.0, -17.0, -41.0, 119.0, 13.0], [-89.0, 21.0, -54.0, -52.0, -41.0]], [[26.0, -69.0, -5.0, -42.0, 7.0], [-30.0, 58.0, 69.0, -16.0, 14.0], [14.0, 48.0, -73.0, -20.0, 6.0], [-42.0, -53.0, 48.0, 61.0, -39.0]], [[-15.0, -25.0, 13.0, -55.0, -55.0], [5.0, 24.0, -7.0, -10.0, 41.0], [51.0, 0.0, -62.0, -25.0, -32.0], [-24.0, -101.0, 11.0, 86.0, 31.0]]], [[[-23.0, 45.0, -11.0, 57.0, 11.0], [7.0, -36.0, -13.0, 6.0, -47.0], [1.0, -4.0, 70.0, 51.0, 28.0], [6.0, 47.0, -27.0, -100.0, 7.0]], [[-127.0, 46.0, 24.0, -31.0, -87.0], [8.0, 4.0, -80.0, -3.0, 81.0], [107.0, -49.0, -55.0, 75.0, -57.0], [-91.0, -169.0, -40.0, -14.0, 75.0]], [[-79.0, 38.0, 30.0, -9.0, 7.0], [5.0, 3.0, -93.0, 11.0, 109.0], [5.0, -84.0, -26.0, 30.0, -56.0], [-34.0, -29.0, -45.0, -16.0, 34.0]], [[-14.0, 7.0, 9.0, -40.0, -31.0], [3.0, 13.0, -30.0, 8.0, 53.0], [-1.0, -23.0, -59.0, -6.0, -42.0], [-19.0, -57.0, -2.0, 53.0, 9.0]], [[52.0, -28.0, 15.0, -2.0, 106.0], [-46.0, 1.0, 37.0, 0.0, 8.0], [-99.0, 3.0, 0.0, -39.0, 5.0], [34.0, 113.0, 38.0, -24.0, -82.0]]]]),self.functionspace)
16718          ref.setTaggedValue(1,numarray.array([[[[-63.0, -1.0, -5.0, -5.0, -17.0], [16.0, 57.0, -46.0, 8.0, 95.0], [39.0, -41.0, -57.0, 46.0, -27.0], [-77.0, -73.0, -38.0, 24.0, 30.0]], [[18.0, -43.0, -5.0, 18.0, 19.0], [-34.0, -6.0, 93.0, -32.0, -93.0], [45.0, 78.0, 42.0, 5.0, 61.0], [-4.0, 5.0, 45.0, -57.0, -26.0]], [[72.0, -91.0, -16.0, 12.0, 110.0], [-40.0, 64.0, 99.0, -13.0, -7.0], [-58.0, 51.0, -13.0, -35.0, 50.0], [-4.0, 93.0, 49.0, 10.0, -88.0]], [[-35.0, 21.0, -22.0, 97.0, 43.0], [6.0, -16.0, 13.0, -6.0, -64.0], [31.0, 12.0, 108.0, 74.0, 69.0], [-13.0, 72.0, -35.0, -144.0, 9.0]], [[-96.0, 57.0, 22.0, 26.0, -42.0], [23.0, -41.0, -78.0, -5.0, 17.0], [80.0, -50.0, 52.0, 52.0, -15.0], [-17.0, -49.0, -54.0, -70.0, 81.0]]], [[[-46.0, 40.0, 6.0, 2.0, -22.0], [24.0, -2.0, -72.0, 16.0, 59.0], [5.0, -56.0, -11.0, 25.0, -35.0], [-16.0, -24.0, -43.0, 2.0, 37.0]], [[-16.0, -64.0, 50.0, -20.0, 71.0], [-21.0, 18.0, -6.0, -31.0, 68.0], [22.0, -31.0, 12.0, -66.0, -9.0], [19.0, 29.0, 11.0, 27.0, 15.0]], [[2.0, 19.0, -9.0, 34.0, 21.0], [46.0, 8.0, -65.0, 22.0, 48.0], [-36.0, -60.0, 31.0, -12.0, -8.0], [30.0, 69.0, -54.0, 23.0, 31.0]], [[-14.0, 26.0, -12.0, 14.0, -28.0], [-6.0, -20.0, 16.0, 0.0, -49.0], [21.0, 26.0, 13.0, 43.0, 15.0], [-18.0, -26.0, 3.0, -52.0, -3.0]], [[51.0, -34.0, -18.0, 19.0, 17.0], [34.0, 22.0, 8.0, 3.0, -6.0], [-18.0, 1.0, 28.0, -50.0, 24.0], [43.0, 61.0, -11.0, 62.0, 12.0]]], [[[7.0, -19.0, 11.0, -5.0, 24.0], [-18.0, -2.0, 21.0, -11.0, -7.0], [-1.0, 11.0, 6.0, -15.0, 7.0], [7.0, 14.0, 18.0, -9.0, -14.0]], [[-15.0, -3.0, 102.0, -119.0, -44.0], [-55.0, -98.0, -13.0, -43.0, -4.0], [43.0, -5.0, -18.0, -108.0, -74.0], [74.0, -87.0, 72.0, 45.0, 28.0]], [[18.0, -13.0, -8.0, -22.0, -58.0], [10.0, -4.0, 27.0, -9.0, -42.0], [41.0, 37.0, -10.0, -18.0, 7.0], [6.0, -57.0, 18.0, 46.0, 19.0]], [[75.0, -10.0, -39.0, 23.0, -22.0], [36.0, -2.0, 34.0, 10.0, -73.0], [-24.0, 38.0, 34.0, -33.0, 38.0], [51.0, 49.0, 2.0, 47.0, -1.0]], [[-8.0, 23.0, -10.0, 26.0, -12.0], [21.0, -13.0, -20.0, 7.0, -15.0], [6.0, -10.0, 32.0, 16.0, 9.0], [9.0, 15.0, -24.0, -20.0, 21.0]]], [[[-2.0, -6.0, 47.0, -8.0, -7.0], [-13.0, -79.0, 11.0, -37.0, -72.0], [55.0, 16.0, 88.0, -59.0, 14.0], [77.0, 14.0, 25.0, -31.0, 41.0]], [[38.0, -28.0, -16.0, 18.0, -11.0], [51.0, 16.0, -10.0, 1.0, -5.0], [11.0, -7.0, 37.0, -53.0, 20.0], [47.0, 37.0, -24.0, 77.0, 44.0]], [[-33.0, 35.0, 25.0, -57.0, -43.0], [-1.0, -8.0, -63.0, 14.0, 75.0], [-11.0, -48.0, -72.0, -3.0, -72.0], [-16.0, -73.0, -7.0, 48.0, 15.0]], [[-93.0, 1.0, 58.0, -35.0, -42.0], [-16.0, -33.0, -36.0, -37.0, 28.0], [119.0, -22.0, 11.0, 1.0, -29.0], [-21.0, -109.0, -1.0, -23.0, 73.0]], [[-61.0, 84.0, -51.0, 55.0, -75.0], [43.0, 2.0, -48.0, 33.0, -15.0], [32.0, -13.0, 4.0, 125.0, 7.0], [-70.0, -58.0, -65.0, -70.0, 34.0]]]]))
16719          self.failUnless(isinstance(res,Data),"wrong type of result.")
16720          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16721          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16722       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16723       def test_tensor_mult_taggedData_rank4_Symbol_rank2(self):
16724          arg0=Data(numarray.array([[[[-5.0, 4.0, -6.0], [5.0, -7.0, -2.0]], [[0.0, -6.0, 0.0], [0.0, -7.0, 2.0]], [[-5.0, 4.0, -2.0], [-4.0, -5.0, -7.0]], [[5.0, -3.0, -6.0], [3.0, -2.0, 7.0]], [[-5.0, -6.0, -3.0], [4.0, 0.0, -1.0]]], [[[5.0, -7.0, -5.0], [2.0, 7.0, 2.0]], [[6.0, 7.0, -4.0], [-5.0, -7.0, 0.0]], [[-2.0, -1.0, 2.0], [-7.0, 7.0, 3.0]], [[-2.0, -6.0, -7.0], [3.0, -3.0, -1.0]], [[-6.0, 6.0, -3.0], [7.0, -2.0, 0.0]]], [[[-5.0, -1.0, -1.0], [-7.0, 0.0, -1.0]], [[1.0, -1.0, 3.0], [3.0, -2.0, 4.0]], [[5.0, 3.0, -6.0], [6.0, 7.0, 2.0]], [[-2.0, 6.0, 3.0], [5.0, -1.0, 3.0]], [[-3.0, -1.0, 7.0], [7.0, -6.0, -4.0]]], [[[-4.0, 6.0, 2.0], [6.0, -4.0, -3.0]], [[2.0, 3.0, -4.0], [3.0, 6.0, -6.0]], [[4.0, -2.0, -1.0], [5.0, 7.0, 6.0]], [[0.0, -6.0, 6.0], [-2.0, -5.0, 1.0]], [[-2.0, 2.0, 7.0], [-2.0, -7.0, -5.0]]]]),self.functionspace)
16725          arg0.setTaggedValue(1,numarray.array([[[[-4.0, 2.0, 3.0], [-7.0, -7.0, 7.0]], [[-1.0, -6.0, 3.0], [7.0, 1.0, 7.0]], [[0.0, -6.0, 0.0], [-6.0, 5.0, 0.0]], [[4.0, -2.0, 7.0], [-4.0, -6.0, 5.0]], [[4.0, -3.0, 0.0], [3.0, -7.0, 0.0]]], [[[-2.0, 4.0, 6.0], [0.0, 2.0, 3.0]], [[-7.0, 4.0, -1.0], [-7.0, 1.0, 3.0]], [[0.0, -7.0, 1.0], [0.0, -3.0, -7.0]], [[2.0, -7.0, -4.0], [-3.0, 2.0, 7.0]], [[7.0, 3.0, 0.0], [-4.0, 6.0, -2.0]]], [[[3.0, -3.0, -7.0], [5.0, 6.0, -1.0]], [[-6.0, 3.0, -5.0], [-5.0, 0.0, -1.0]], [[-2.0, 2.0, -6.0], [-4.0, 2.0, 6.0]], [[-2.0, -7.0, 7.0], [3.0, 2.0, 7.0]], [[0.0, 0.0, 4.0], [-1.0, -7.0, 6.0]]], [[[0.0, 5.0, -3.0], [-7.0, 2.0, 0.0]], [[0.0, 1.0, 3.0], [4.0, 0.0, 6.0]], [[7.0, -2.0, -5.0], [1.0, 4.0, 0.0]], [[1.0, -1.0, 2.0], [5.0, 5.0, -1.0]], [[2.0, 1.0, -3.0], [0.0, 0.0, 0.0]]]]))
16726          arg1=Symbol(shape=(2, 3))
16727          res=tensor_mult(arg0,arg1)
16728          s1=numarray.array([[5.0, -6.0, -6.0], [-1.0, 0.0, -5.0]])
16729          sub=res.substitute({arg1:s1})
16730          ref=Data(numarray.array([[-8.0, 26.0, 2.0, 41.0, 30.0], [85.0, 17.0, -24.0, 70.0, -55.0], [-1.0, -30.0, 27.0, -84.0, -38.0], [-59.0, 43.0, 3.0, -3.0, -37.0]]),self.functionspace)
16731          ref.setTaggedValue(1,numarray.array([[-78.0, -29.0, 42.0, -31.0, 35.0], [-85.0, -61.0, 71.0, 44.0, 31.0], [75.0, -8.0, -12.0, -48.0, -53.0], [-5.0, -58.0, 76.0, -1.0, 22.0]]))
16732          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16733          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16734          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16735       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16736       def test_tensor_mult_taggedData_rank4_Symbol_rank3(self):
16737          arg0=Data(numarray.array([[[[0.0, -4.0, -5.0], [7.0, 4.0, 5.0]], [[-6.0, -6.0, -3.0], [0.0, 5.0, 7.0]], [[-3.0, -1.0, -3.0], [-1.0, -2.0, -6.0]], [[4.0, -1.0, -5.0], [5.0, -7.0, -4.0]], [[-6.0, 1.0, -6.0], [-6.0, 2.0, -3.0]]], [[[4.0, 4.0, 0.0], [7.0, -3.0, -3.0]], [[2.0, 2.0, 0.0], [4.0, -1.0, -4.0]], [[-3.0, -2.0, -1.0], [-6.0, 7.0, 0.0]], [[1.0, 6.0, 3.0], [2.0, -6.0, -5.0]], [[7.0, -2.0, 6.0], [7.0, 6.0, 0.0]]], [[[-6.0, -7.0, -1.0], [-3.0, 0.0, 1.0]], [[1.0, 3.0, -3.0], [-5.0, -6.0, 6.0]], [[0.0, 0.0, -5.0], [-6.0, -1.0, 6.0]], [[4.0, -1.0, 0.0], [-7.0, -3.0, 0.0]], [[-1.0, -3.0, 7.0], [5.0, 5.0, 2.0]]], [[[5.0, 0.0, -4.0], [-6.0, 5.0, 7.0]], [[6.0, 1.0, -7.0], [-6.0, -7.0, -5.0]], [[5.0, -1.0, -6.0], [-2.0, -2.0, -6.0]], [[0.0, -1.0, 2.0], [6.0, -5.0, 1.0]], [[0.0, 6.0, -2.0], [5.0, -2.0, 5.0]]]]),self.functionspace)
16738          arg0.setTaggedValue(1,numarray.array([[[[3.0, 2.0, 1.0], [4.0, 4.0, -7.0]], [[0.0, 3.0, 3.0], [4.0, 5.0, -2.0]], [[0.0, 0.0, 7.0], [0.0, -7.0, 0.0]], [[-6.0, 3.0, -6.0], [-2.0, 0.0, 0.0]], [[-4.0, 1.0, -1.0], [1.0, -1.0, 1.0]]], [[[0.0, -7.0, 3.0], [-1.0, -4.0, 7.0]], [[4.0, -7.0, 5.0], [-4.0, 0.0, 6.0]], [[5.0, -3.0, 7.0], [-3.0, 3.0, 3.0]], [[-3.0, 2.0, -4.0], [7.0, -1.0, 1.0]], [[-3.0, 0.0, -1.0], [2.0, 0.0, 2.0]]], [[[-6.0, 7.0, 0.0], [7.0, 3.0, 5.0]], [[7.0, 3.0, 0.0], [-6.0, -2.0, 1.0]], [[-1.0, 2.0, -7.0], [-3.0, 3.0, 7.0]], [[5.0, 5.0, -4.0], [1.0, -6.0, 3.0]], [[6.0, -1.0, 2.0], [-6.0, -6.0, -3.0]]], [[[-6.0, -1.0, -4.0], [-7.0, -4.0, 7.0]], [[4.0, 2.0, -6.0], [5.0, -1.0, -7.0]], [[0.0, 4.0, 4.0], [2.0, 6.0, -1.0]], [[0.0, 1.0, -6.0], [5.0, 5.0, -1.0]], [[-5.0, -6.0, -1.0], [2.0, 3.0, -1.0]]]]))
16739          arg1=Symbol(shape=(2, 3, 2))
16740          res=tensor_mult(arg0,arg1)
16741          s1=numarray.array([[[2.0, 7.0], [2.0, 4.0], [-4.0, -4.0]], [[1.0, 2.0], [-2.0, 2.0], [7.0, -7.0]]])
16742          sub=res.substitute({arg1:s1})
16743          ref=Data(numarray.array([[[46.0, -9.0], [27.0, -93.0], [-35.0, 23.0], [17.0, 68.0], [-17.0, -1.0]], [[8.0, 73.0], [-14.0, 56.0], [-26.0, -23.0], [-19.0, 46.0], [-19.0, 43.0]], [[-18.0, -79.0], [69.0, -33.0], [58.0, -36.0], [5.0, 4.0], [-27.0, -41.0]], [[59.0, 0.0], [15.0, 83.0], [-8.0, 89.0], [13.0, -17.0], [64.0, 3.0]]]),self.functionspace)
16744          ref.setTaggedValue(1,numarray.array([[[-47.0, 90.0], [-26.0, 32.0], [-14.0, -42.0], [16.0, -10.0], [8.0, -27.0]], [[30.0, -99.0], [12.0, -70.0], [-12.0, -26.0], [30.0, 8.0], [14.0, -27.0]], [[38.0, -29.0], [25.0, 38.0], [70.0, -20.0], [70.0, 40.0], [-13.0, 27.0]], [[52.0, -101.0], [-6.0, 117.0], [-25.0, 23.0], [14.0, 55.0], [-29.0, -38.0]]]))
16745          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16746          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16747          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16748       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16749       def test_tensor_mult_taggedData_rank4_Symbol_rank4(self):
16750          arg0=Data(numarray.array([[[[1.0, -5.0, -2.0], [5.0, 2.0, -2.0]], [[-4.0, -5.0, -4.0], [-5.0, 2.0, 2.0]], [[-2.0, -6.0, 0.0], [-2.0, 3.0, 5.0]], [[-6.0, -2.0, -3.0], [2.0, 0.0, 0.0]], [[7.0, -1.0, 1.0], [-1.0, -1.0, 2.0]]], [[[-1.0, 6.0, -7.0], [-6.0, -3.0, 4.0]], [[5.0, -2.0, -6.0], [7.0, 6.0, 1.0]], [[0.0, 3.0, 6.0], [6.0, 5.0, 0.0]], [[3.0, 6.0, 3.0], [6.0, -1.0, -6.0]], [[-3.0, -3.0, 3.0], [-5.0, 0.0, 6.0]]], [[[-2.0, 7.0, 0.0], [0.0, -1.0, -2.0]], [[4.0, 1.0, 1.0], [0.0, -5.0, -7.0]], [[-7.0, 3.0, 0.0], [3.0, -7.0, -5.0]], [[-2.0, -1.0, -2.0], [2.0, -5.0, 0.0]], [[-4.0, 3.0, -7.0], [6.0, 3.0, 7.0]]], [[[4.0, 4.0, 6.0], [1.0, 7.0, -5.0]], [[-5.0, 2.0, -6.0], [7.0, -3.0, 3.0]], [[-3.0, 4.0, 0.0], [-2.0, -5.0, 7.0]], [[5.0, 4.0, 1.0], [-2.0, 5.0, -4.0]], [[7.0, 3.0, -3.0], [3.0, 0.0, 1.0]]]]),self.functionspace)
16751          arg0.setTaggedValue(1,numarray.array([[[[-6.0, -4.0, 0.0], [6.0, -7.0, -6.0]], [[-7.0, -1.0, -1.0], [4.0, 3.0, -6.0]], [[-1.0, 2.0, 2.0], [1.0, 0.0, -6.0]], [[5.0, 5.0, 4.0], [0.0, -1.0, -3.0]], [[5.0, 7.0, 7.0], [6.0, 0.0, -3.0]]], [[[7.0, 3.0, -5.0], [-4.0, -1.0, 1.0]], [[5.0, -4.0, 7.0], [-1.0, -5.0, -4.0]], [[0.0, 0.0, 4.0], [-3.0, -1.0, 6.0]], [[-6.0, 0.0, -4.0], [-7.0, -5.0, -5.0]], [[6.0, 0.0, -7.0], [4.0, -4.0, 0.0]]], [[[2.0, 6.0, -6.0], [4.0, 5.0, 4.0]], [[7.0, 0.0, 3.0], [-1.0, 3.0, -5.0]], [[5.0, 7.0, -7.0], [-2.0, -2.0, -1.0]], [[5.0, 0.0, 6.0], [-1.0, -6.0, 3.0]], [[5.0, 2.0, 6.0], [5.0, 7.0, 0.0]]], [[[5.0, 5.0, -3.0], [-7.0, 6.0, 1.0]], [[0.0, 0.0, 0.0], [6.0, 7.0, -4.0]], [[-4.0, 4.0, -4.0], [3.0, -6.0, -1.0]], [[-3.0, -5.0, -6.0], [0.0, -3.0, -3.0]], [[6.0, -2.0, 5.0], [0.0, -4.0, 5.0]]]]))
16752          arg1=Symbol(shape=(2, 3, 4, 5))
16753          res=tensor_mult(arg0,arg1)
16754          s1=numarray.array([[[[-1.0, 1.0, -7.0, 0.0, -1.0], [5.0, 6.0, 2.0, -7.0, 4.0], [0.0, 4.0, -3.0, 1.0, 0.0], [-5.0, -5.0, 3.0, -7.0, 3.0]], [[4.0, -6.0, -7.0, -5.0, 1.0], [-6.0, 2.0, -2.0, -7.0, 0.0], [-3.0, 0.0, -7.0, 1.0, 0.0], [-5.0, 2.0, -3.0, 6.0, -6.0]], [[6.0, 0.0, -6.0, -4.0, 0.0], [3.0, 5.0, 7.0, 3.0, -3.0], [-2.0, 1.0, -4.0, 4.0, -5.0], [6.0, 3.0, -6.0, 4.0, 3.0]]], [[[-4.0, 4.0, 1.0, -5.0, 3.0], [-3.0, -4.0, 4.0, -3.0, 3.0], [-1.0, 0.0, -5.0, -1.0, -6.0], [7.0, 4.0, 4.0, 3.0, -7.0]], [[-4.0, 2.0, 1.0, 4.0, 4.0], [-3.0, 0.0, -1.0, 1.0, -4.0], [2.0, 3.0, 3.0, -3.0, -1.0], [-6.0, 7.0, 4.0, 2.0, 5.0]], [[2.0, -5.0, 0.0, 0.0, -4.0], [-5.0, 1.0, 6.0, 5.0, -4.0], [-6.0, -1.0, 4.0, 0.0, 0.0], [-6.0, -1.0, -2.0, -3.0, 2.0]]]])
16755          sub=res.substitute({arg1:s1})
16756          ref=Data(numarray.array([[[[-65.0, 65.0, 47.0, 16.0, 25.0], [18.0, -36.0, 4.0, -1.0, 25.0], [30.0, 10.0, 13.0, -23.0, -22.0], [43.0, 15.0, 62.0, -20.0, -2.0]], [[-24.0, 0.0, 84.0, 74.0, -16.0], [-3.0, -32.0, -36.0, 78.0, -35.0], [20.0, -16.0, 102.0, -26.0, 48.0], [-38.0, -10.0, 11.0, -35.0, 55.0]], [[-16.0, 7.0, 57.0, 52.0, -18.0], [-2.0, -11.0, 27.0, 90.0, -46.0], [-4.0, -4.0, 87.0, -15.0, 9.0], [-22.0, 6.0, 6.0, -37.0, 69.0]], [[-28.0, 14.0, 76.0, 12.0, 10.0], [-33.0, -63.0, -21.0, 41.0, -9.0], [10.0, -27.0, 34.0, -22.0, 3.0], [36.0, 25.0, 14.0, 24.0, -29.0]], [[7.0, -3.0, -50.0, 2.0, -23.0], [40.0, 51.0, 32.0, -27.0, 18.0], [-12.0, 24.0, -8.0, 14.0, 2.0], [-37.0, -47.0, 6.0, -62.0, 36.0]]], [[[27.0, -87.0, -2.0, 16.0, -39.0], [-55.0, -1.0, -60.0, -21.0, -5.0], [-28.0, -24.0, 26.0, -8.0, 74.0], [-115.0, -53.0, -23.0, -21.0, -25.0]], [[-99.0, 52.0, 28.0, 23.0, 34.0], [-25.0, -31.0, 0.0, -49.0, 31.0], [17.0, 31.0, 10.0, -46.0, -18.0], [-44.0, 22.0, 107.0, -41.0, -8.0]], [[4.0, 16.0, -46.0, -49.0, 41.0], [-33.0, 12.0, 55.0, -16.0, -20.0], [-17.0, 21.0, -60.0, 6.0, -71.0], [33.0, 83.0, -1.0, 70.0, -17.0]], [[7.0, 19.0, -76.0, -76.0, 41.0], [3.0, 15.0, 4.0, -103.0, 49.0], [4.0, 18.0, -120.0, 18.0, -50.0], [57.0, 29.0, 5.0, 61.0, -77.0]], [[41.0, -35.0, 19.0, 28.0, -39.0], [-3.0, 17.0, 37.0, 96.0, -60.0], [-28.0, -15.0, 67.0, 11.0, 15.0], [-23.0, -8.0, -50.0, -18.0, 65.0]]], [[[30.0, -36.0, -36.0, -39.0, 13.0], [-39.0, 0.0, -29.0, -46.0, 4.0], [-11.0, -9.0, -54.0, 8.0, 1.0], [-7.0, 19.0, -27.0, 60.0, -57.0]], [[12.0, 23.0, -46.0, -29.0, 5.0], [67.0, 24.0, -24.0, -72.0, 61.0], [27.0, 9.0, -66.0, 24.0, 0.0], [53.0, -43.0, -3.0, -7.0, -30.0]], [[25.0, -2.0, 24.0, -58.0, 11.0], [-16.0, -53.0, -31.0, -13.0, 29.0], [4.0, -44.0, -56.0, 14.0, -11.0], [113.0, 9.0, -36.0, 77.0, -105.0]], [[-2.0, 2.0, 30.0, -17.0, -13.0], [-1.0, -32.0, -3.0, 4.0, 24.0], [-5.0, -25.0, -4.0, 2.0, 3.0], [47.0, -25.0, -3.0, -4.0, -45.0]], [[-48.0, -27.0, 58.0, -5.0, 9.0], [-121.0, -70.0, 0.0, 6.0, -17.0], [-37.0, -21.0, 26.0, -44.0, -4.0], [-55.0, 43.0, 43.0, 21.0, -64.0]]], [[[6.0, 23.0, -84.0, -21.0, 51.0], [15.0, 53.0, 9.0, -59.0, -7.0], [19.0, 48.0, -68.0, 10.0, -43.0], [-9.0, 64.0, 6.0, 52.0, 24.0]], [[-33.0, -10.0, 61.0, -33.0, 4.0], [-82.0, -81.0, -7.0, -6.0, 19.0], [-25.0, -38.0, -7.0, -25.0, -9.0], [28.0, 15.0, 25.0, 29.0, -103.0]], [[61.0, -80.0, -14.0, -30.0, -47.0], [-53.0, 5.0, 25.0, 29.0, -26.0], [-62.0, -34.0, 4.0, 18.0, 17.0], [-31.0, -27.0, -63.0, 8.0, -30.0]], [[-3.0, 3.0, -66.0, 6.0, 29.0], [15.0, 47.0, -28.0, -69.0, 7.0], [22.0, 40.0, -38.0, 0.0, 2.0], [-59.0, 17.0, 17.0, 9.0, 25.0]], [[-23.0, -4.0, -49.0, -18.0, 1.0], [-6.0, 22.0, 5.0, -83.0, 42.0], [-12.0, 24.0, -41.0, -5.0, -3.0], [-53.0, -27.0, 40.0, -37.0, -25.0]]]]),self.functionspace)
16757          ref.setTaggedValue(1,numarray.array([[[[-18.0, 58.0, 69.0, -38.0, 16.0], [27.0, -74.0, -9.0, 15.0, 46.0], [28.0, -39.0, -29.0, 5.0, -29.0], [170.0, 3.0, 2.0, 40.0, -83.0]], [[-43.0, 51.0, 69.0, 1.0, 54.0], [-23.0, -71.0, -42.0, 14.0, -1.0], [43.0, -14.0, -3.0, -25.0, -22.0], [80.0, 73.0, 28.0, 75.0, -43.0]], [[5.0, 21.0, -18.0, -23.0, 30.0], [16.0, -2.0, -24.0, -34.0, 17.0], [25.0, 4.0, -48.0, 8.0, -16.0], [50.0, 25.0, -5.0, 48.0, -28.0]], [[37.0, -12.0, -95.0, -45.0, 8.0], [25.0, 57.0, 11.0, -74.0, 24.0], [-7.0, 24.0, -81.0, 29.0, -19.0], [-2.0, -7.0, -22.0, 18.0, -14.0]], [[35.0, 2.0, -120.0, -93.0, 32.0], [1.0, 52.0, 51.0, -96.0, 29.0], [-23.0, 30.0, -134.0, 34.0, -71.0], [42.0, 37.0, -18.0, 62.0, -54.0]]], [[[-3.0, -34.0, -45.0, 21.0, -24.0], [12.0, 40.0, -36.0, -69.0, 31.0], [-3.0, 19.0, -1.0, -3.0, 50.0], [-108.0, -68.0, 20.0, -68.0, 13.0]], [[37.0, 35.0, -55.0, -23.0, -16.0], [108.0, 57.0, 44.0, -8.0, 32.0], [13.0, 16.0, -41.0, 45.0, -24.0], [84.0, -47.0, -31.0, -32.0, 34.0]], [[52.0, -44.0, -28.0, -5.0, -37.0], [-6.0, 38.0, 53.0, 50.0, -41.0], [-43.0, -5.0, 20.0, 22.0, -1.0], [-27.0, -13.0, -52.0, -13.0, 40.0]], [[20.0, -19.0, 54.0, 31.0, -15.0], [19.0, -33.0, -93.0, 21.0, 7.0], [35.0, -38.0, 34.0, 0.0, 67.0], [17.0, -40.0, -32.0, 10.0, -16.0]], [[-48.0, 14.0, 0.0, -8.0, -10.0], [9.0, -15.0, -17.0, -79.0, 73.0], [2.0, 5.0, -22.0, -14.0, 15.0], [-20.0, -63.0, 60.0, -66.0, -51.0]]], [[[-42.0, -28.0, -11.0, -6.0, 20.0], [-91.0, -18.0, -15.0, -61.0, 2.0], [-24.0, 13.0, -13.0, -35.0, 1.0], [-102.0, 31.0, 52.0, 8.0, -43.0]], [[-7.0, 34.0, -65.0, 5.0, 22.0], [63.0, 56.0, -2.0, -59.0, 24.0], [31.0, 45.0, -39.0, 11.0, -12.0], [-12.0, -4.0, 21.0, -19.0, 42.0]], [[-5.0, -44.0, -46.0, -5.0, -8.0], [-21.0, 16.0, -65.0, -106.0, 47.0], [-3.0, 8.0, -36.0, -8.0, 49.0], [-98.0, -53.0, 22.0, -28.0, -46.0]], [[65.0, -26.0, -78.0, -43.0, -44.0], [49.0, 67.0, 72.0, -5.0, 11.0], [-41.0, 5.0, -40.0, 48.0, -18.0], [22.0, -56.0, -55.0, -35.0, 16.0]], [[-9.0, 27.0, -73.0, -31.0, 40.0], [-5.0, 44.0, 61.0, -39.0, -11.0], [-9.0, 47.0, -57.0, 5.0, -67.0], [-6.0, 66.0, 21.0, 30.0, 21.0]]], [[[3.0, -46.0, -53.0, 46.0, -1.0], [-16.0, 54.0, -49.0, -47.0, -20.0], [4.0, 34.0, 19.0, -13.0, 51.0], [-159.0, -11.0, 12.0, -29.0, 57.0]], [[-60.0, 58.0, 13.0, -2.0, 62.0], [-19.0, -28.0, -7.0, -31.0, 6.0], [32.0, 25.0, -25.0, -27.0, -43.0], [24.0, 77.0, 60.0, 44.0, -15.0]], [[6.0, -23.0, 21.0, -43.0, -3.0], [-42.0, -49.0, -32.0, -32.0, 33.0], [-13.0, -37.0, -37.0, -1.0, 8.0], [39.0, -13.0, -10.0, 36.0, -101.0]], [[-47.0, 36.0, 89.0, 37.0, -2.0], [21.0, -61.0, -53.0, 20.0, 30.0], [39.0, -24.0, 47.0, -23.0, 33.0], [40.0, -31.0, 36.0, -30.0, -18.0]], [[42.0, -15.0, -62.0, -26.0, -44.0], [44.0, 62.0, 85.0, 8.0, 5.0], [-42.0, 12.0, -16.0, 36.0, -21.0], [4.0, -52.0, -32.0, -57.0, 35.0]]]]))
16758          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
16759          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16760          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16761       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16762       def test_tensor_mult_taggedData_rank4_constData_rank2(self):
16763          arg0=Data(numarray.array([[[[-1.0, -2.0, 2.0], [2.0, -4.0, -5.0]], [[2.0, 2.0, 2.0], [4.0, -3.0, -5.0]], [[0.0, -6.0, -1.0], [-6.0, 1.0, 2.0]], [[-3.0, -7.0, -1.0], [0.0, -5.0, -1.0]], [[-7.0, 1.0, -1.0], [-7.0, -5.0, 0.0]]], [[[-7.0, 4.0, 7.0], [6.0, 0.0, -2.0]], [[0.0, 0.0, 4.0], [0.0, -4.0, -1.0]], [[0.0, 0.0, 4.0], [-4.0, 4.0, 4.0]], [[-4.0, 7.0, -6.0], [-5.0, 0.0, -4.0]], [[7.0, 7.0, -3.0], [0.0, -1.0, 1.0]]], [[[6.0, -2.0, 1.0], [2.0, 4.0, 0.0]], [[0.0, -6.0, 0.0], [0.0, 4.0, 6.0]], [[0.0, -4.0, -3.0], [3.0, 0.0, 7.0]], [[3.0, -7.0, 5.0], [0.0, 5.0, 4.0]], [[5.0, 1.0, 5.0], [7.0, -6.0, 2.0]]], [[[-6.0, 0.0, 7.0], [-6.0, 6.0, 1.0]], [[-5.0, -7.0, -6.0], [6.0, 0.0, 0.0]], [[0.0, 6.0, -4.0], [0.0, 3.0, 6.0]], [[-6.0, -6.0, 7.0], [5.0, 6.0, -4.0]], [[2.0, -2.0, -4.0], [-2.0, -7.0, -6.0]]]]),self.functionspace)
16764          arg0.setTaggedValue(1,numarray.array([[[[-7.0, 3.0, 3.0], [7.0, 3.0, -3.0]], [[-3.0, -5.0, -1.0], [-6.0, 1.0, -3.0]], [[-6.0, 2.0, -7.0], [2.0, -3.0, 0.0]], [[-3.0, -2.0, 3.0], [0.0, -4.0, 0.0]], [[-4.0, 7.0, -7.0], [-4.0, 1.0, 4.0]]], [[[6.0, 5.0, -1.0], [0.0, 0.0, 6.0]], [[7.0, 1.0, -6.0], [-1.0, 6.0, 1.0]], [[-7.0, 4.0, 0.0], [1.0, -1.0, 6.0]], [[-5.0, -6.0, 0.0], [-6.0, 5.0, -4.0]], [[3.0, 7.0, -7.0], [-3.0, 5.0, 2.0]]], [[[1.0, 3.0, -7.0], [3.0, -1.0, -5.0]], [[0.0, -1.0, -3.0], [-5.0, -4.0, 4.0]], [[7.0, -1.0, 1.0], [-4.0, 7.0, 7.0]], [[4.0, 1.0, 7.0], [6.0, 3.0, -2.0]], [[0.0, 0.0, 3.0], [6.0, 2.0, 4.0]]], [[[0.0, 5.0, 2.0], [-5.0, -7.0, 4.0]], [[-7.0, 1.0, 4.0], [-1.0, 1.0, -6.0]], [[3.0, -1.0, 2.0], [-5.0, 5.0, -4.0]], [[-6.0, 6.0, -1.0], [-4.0, -5.0, 2.0]], [[-2.0, 0.0, 6.0], [1.0, 2.0, 4.0]]]]))
16765          arg1=Data(numarray.array([[5.0, -4.0, 0.0], [-3.0, 2.0, 0.0]]),self.functionspace)
16766          res=tensor_mult(arg0,arg1)
16767          ref=Data(numarray.array([[-11.0, -16.0, 44.0, 3.0, -28.0], [-69.0, -8.0, 20.0, -33.0, 5.0], [40.0, 32.0, 7.0, 53.0, -12.0], [0.0, -15.0, -18.0, -9.0, 10.0]]),self.functionspace)
16768          ref.setTaggedValue(1,numarray.array([[-62.0, 25.0, -50.0, -15.0, -34.0], [10.0, 46.0, -56.0, 27.0, 6.0], [-18.0, 11.0, 65.0, 4.0, -14.0], [-19.0, -34.0, 44.0, -52.0, -9.0]]))
16769          self.failUnless(isinstance(res,Data),"wrong type of result.")
16770          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16771          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16772       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16773       def test_tensor_mult_taggedData_rank4_constData_rank3(self):
16774          arg0=Data(numarray.array([[[[5.0, 6.0, 5.0], [5.0, 4.0, 1.0]], [[-6.0, -2.0, 3.0], [6.0, 3.0, 4.0]], [[0.0, -5.0, 3.0], [-4.0, 2.0, -3.0]], [[-3.0, -4.0, -3.0], [-5.0, 5.0, -2.0]], [[7.0, 6.0, 3.0], [1.0, -1.0, 2.0]]], [[[-1.0, 7.0, 0.0], [1.0, 6.0, 0.0]], [[-7.0, 2.0, 2.0], [-5.0, -2.0, 5.0]], [[0.0, 4.0, -6.0], [5.0, -2.0, 2.0]], [[-2.0, 1.0, 1.0], [0.0, -5.0, -3.0]], [[-2.0, 2.0, 4.0], [-6.0, 2.0, -4.0]]], [[[-2.0, 6.0, 0.0], [1.0, -5.0, -1.0]], [[0.0, 4.0, -7.0], [2.0, -5.0, 1.0]], [[-2.0, 2.0, -7.0], [6.0, 5.0, -2.0]], [[-3.0, -2.0, 7.0], [0.0, -3.0, -5.0]], [[-3.0, -5.0, 2.0], [2.0, 2.0, -7.0]]], [[[0.0, 1.0, -3.0], [7.0, -1.0, 6.0]], [[2.0, 2.0, -1.0], [0.0, 0.0, 1.0]], [[0.0, 3.0, -1.0], [3.0, 3.0, 0.0]], [[-6.0, -6.0, 5.0], [1.0, 1.0, -4.0]], [[3.0, 5.0, -5.0], [6.0, 0.0, 0.0]]]]),self.functionspace)
16775          arg0.setTaggedValue(1,numarray.array([[[[4.0, 1.0, -5.0], [3.0, 0.0, -6.0]], [[-6.0, -5.0, 1.0], [-1.0, 2.0, 7.0]], [[-6.0, 3.0, -6.0], [-5.0, -4.0, 7.0]], [[-4.0, -4.0, -6.0], [-6.0, -1.0, 4.0]], [[-3.0, 1.0, 3.0], [0.0, -1.0, 0.0]]], [[[0.0, 4.0, -7.0], [3.0, 7.0, -6.0]], [[2.0, 6.0, -4.0], [0.0, -4.0, 6.0]], [[5.0, 4.0, -5.0], [-7.0, -6.0, -2.0]], [[4.0, 4.0, -3.0], [-3.0, -3.0, -7.0]], [[0.0, -3.0, 2.0], [0.0, 6.0, -3.0]]], [[[-1.0, 0.0, 5.0], [7.0, -1.0, -1.0]], [[3.0, 5.0, 2.0], [3.0, -4.0, 3.0]], [[7.0, 4.0, 6.0], [-7.0, 3.0, -4.0]], [[-3.0, 3.0, 7.0], [6.0, -5.0, 4.0]], [[-2.0, 0.0, 1.0], [2.0, -1.0, -1.0]]], [[[7.0, -5.0, -7.0], [3.0, -5.0, -6.0]], [[3.0, -4.0, -7.0], [-7.0, -7.0, 4.0]], [[2.0, 2.0, 0.0], [-6.0, -5.0, -4.0]], [[-1.0, 0.0, 0.0], [2.0, -1.0, -7.0]], [[3.0, 6.0, -2.0], [-3.0, 7.0, -1.0]]]]))
16776          arg1=Data(numarray.array([[[5.0, 2.0], [1.0, 6.0], [1.0, 4.0]], [[-4.0, 3.0], [-4.0, -4.0], [3.0, 3.0]]]),self.functionspace)
16777          res=tensor_mult(arg0,arg1)
16778          ref=Data(numarray.array([[[3.0, 68.0], [-53.0, 6.0], [-3.0, -47.0], [-28.0, -83.0], [50.0, 75.0]], [[-26.0, 19.0], [12.0, 14.0], [-8.0, 29.0], [3.0, 17.0], [0.0, -14.0]], [[9.0, 52.0], [12.0, 25.0], [-65.0, -28.0], [-13.0, 7.0], [-55.0, -51.0]], [[-8.0, 37.0], [14.0, 15.0], [-22.0, 11.0], [-51.0, -41.0], [-9.0, 34.0]]]),self.functionspace)
16779          ref.setTaggedValue(1,numarray.array([[[-14.0, -15.0], [-17.0, -28.0], [24.0, 4.0], [10.0, -58.0], [-7.0, 16.0]], [[-61.0, -41.0], [46.0, 58.0], [70.0, 11.0], [24.0, 2.0], [-34.0, -43.0]], [[-27.0, 40.0], [35.0, 78.0], [49.0, 17.0], [3.0, 90.0], [-16.0, 7.0]], [[13.0, -33.0], [72.0, -27.0], [44.0, 6.0], [-30.0, -13.0], [0.0, -6.0]]]))
16780          self.failUnless(isinstance(res,Data),"wrong type of result.")
16781          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16782          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16783       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16784       def test_tensor_mult_taggedData_rank4_constData_rank4(self):
16785          arg0=Data(numarray.array([[[[7.0, 6.0, 0.0], [2.0, -4.0, -7.0]], [[-3.0, 0.0, 3.0], [-6.0, 1.0, -6.0]], [[-3.0, 0.0, -6.0], [-6.0, -1.0, 0.0]], [[-6.0, -1.0, 6.0], [-5.0, -7.0, 3.0]], [[5.0, 6.0, -4.0], [3.0, 0.0, 3.0]]], [[[7.0, -6.0, 3.0], [1.0, 0.0, -7.0]], [[4.0, -3.0, 4.0], [0.0, -2.0, -3.0]], [[1.0, -5.0, 5.0], [-6.0, 2.0, 0.0]], [[2.0, 3.0, -6.0], [-7.0, 4.0, 6.0]], [[-5.0, -2.0, -2.0], [0.0, -7.0, 0.0]]], [[[1.0, -2.0, 6.0], [-2.0, -5.0, 2.0]], [[-5.0, 6.0, -3.0], [-2.0, 0.0, -3.0]], [[4.0, 0.0, 3.0], [-5.0, -3.0, 7.0]], [[5.0, -6.0, 0.0], [6.0, -7.0, -2.0]], [[-6.0, 0.0, -5.0], [3.0, -7.0, 2.0]]], [[[4.0, -1.0, -1.0], [4.0, -5.0, -5.0]], [[0.0, 0.0, 6.0], [0.0, -5.0, -6.0]], [[6.0, -7.0, 4.0], [-2.0, 5.0, 0.0]], [[-7.0, 2.0, -4.0], [-5.0, -3.0, 1.0]], [[4.0, 5.0, 6.0], [6.0, -2.0, 7.0]]]]),self.functionspace)
16786          arg0.setTaggedValue(1,numarray.array([[[[4.0, -3.0, 3.0], [-6.0, 7.0, -5.0]], [[1.0, 7.0, -3.0], [0.0, 1.0, 7.0]], [[-5.0, 4.0, -7.0], [1.0, 7.0, -2.0]], [[1.0, 0.0, 5.0], [-3.0, -2.0, 4.0]], [[5.0, 2.0, -1.0], [0.0, -7.0, 7.0]]], [[[1.0, 5.0, -4.0], [-7.0, 1.0, -6.0]], [[6.0, -6.0, 7.0], [4.0, 0.0, 2.0]], [[6.0, 2.0, -5.0], [3.0, -4.0, -7.0]], [[-1.0, 1.0, -3.0], [2.0, -7.0, 4.0]], [[-5.0, -7.0, -3.0], [1.0, -5.0, -7.0]]], [[[-6.0, 6.0, 6.0], [0.0, 0.0, -1.0]], [[-7.0, -4.0, -1.0], [-4.0, 6.0, 0.0]], [[0.0, 1.0, -6.0], [-6.0, 1.0, -3.0]], [[2.0, -2.0, -4.0], [-3.0, 0.0, 3.0]], [[-3.0, 3.0, -3.0], [-4.0, -2.0, -4.0]]], [[[-6.0, -5.0, -4.0], [0.0, 0.0, 0.0]], [[6.0, 3.0, 6.0], [-5.0, 1.0, -6.0]], [[-7.0, -5.0, 3.0], [4.0, 7.0, -6.0]], [[-2.0, 6.0, -2.0], [2.0, 0.0, 1.0]], [[-6.0, 5.0, -6.0], [1.0, 2.0, 5.0]]]]))
16787          arg1=Data(numarray.array([[[[3.0, -6.0, 3.0, -6.0, -1.0], [-4.0, -3.0, -1.0, 5.0, -5.0], [-6.0, 3.0, 1.0, 0.0, -4.0], [0.0, -3.0, -5.0, 0.0, 5.0]], [[-5.0, -7.0, 5.0, -5.0, -3.0], [-4.0, 7.0, 1.0, -6.0, -6.0], [2.0, 2.0, 0.0, 7.0, -1.0], [-7.0, 6.0, 0.0, -1.0, 4.0]], [[1.0, 3.0, -1.0, 6.0, 3.0], [-7.0, 4.0, 5.0, -4.0, 4.0], [5.0, 0.0, 6.0, -7.0, 4.0], [7.0, 7.0, -1.0, -5.0, 1.0]]], [[[-4.0, 5.0, -3.0, -5.0, -7.0], [-4.0, 0.0, -2.0, 0.0, 6.0], [-4.0, 1.0, 2.0, 3.0, 2.0], [-1.0, -4.0, 5.0, 7.0, 7.0]], [[2.0, 1.0, -5.0, 2.0, 7.0], [3.0, 5.0, -4.0, -5.0, 0.0], [-3.0, 7.0, 5.0, -5.0, -6.0], [6.0, 3.0, 7.0, 5.0, -4.0]], [[4.0, 1.0, -6.0, 5.0, 7.0], [4.0, 0.0, -6.0, -5.0, 0.0], [3.0, 3.0, -6.0, 7.0, 4.0], [3.0, -7.0, -2.0, -1.0, -5.0]]]]),self.functionspace)
16788          res=tensor_mult(arg0,arg1)
16789          ref=Data(numarray.array([[[[-53.0, -85.0, 107.0, -125.0, -116.0], [-100.0, 1.0, 53.0, 54.0, -59.0], [-47.0, -14.0, 33.0, 19.0, -34.0], [-89.0, 44.0, -39.0, -5.0, 124.0]], [[-4.0, -8.0, 37.0, 38.0, 19.0], [-6.0, 26.0, 62.0, -2.0, -9.0], [36.0, -26.0, 44.0, -86.0, -18.0], [15.0, 99.0, 1.0, -46.0, -28.0]], [[7.0, -31.0, 20.0, 10.0, 20.0], [75.0, -20.0, -11.0, 14.0, -45.0], [15.0, -22.0, -56.0, 29.0, -18.0], [-42.0, -12.0, -16.0, -17.0, -59.0]], [[11.0, 32.0, 3.0, 103.0, 34.0], [-3.0, 0.0, 55.0, -28.0, 30.0], [114.0, -65.0, -33.0, -8.0, 93.0], [21.0, 32.0, -56.0, -102.0, -50.0]], [[-19.0, -66.0, 22.0, -84.0, -35.0], [-16.0, 11.0, -43.0, -10.0, -59.0], [-41.0, 39.0, -31.0, 100.0, -24.0], [-64.0, -40.0, -12.0, 32.0, 51.0]]], [[[22.0, 7.0, 27.0, -34.0, -36.0], [-57.0, -51.0, 42.0, 94.0, 19.0], [-64.0, -11.0, 69.0, -109.0, -36.0], [41.0, 9.0, -19.0, 5.0, 56.0]], [[15.0, 4.0, 21.0, -4.0, -18.0], [-50.0, -27.0, 39.0, 47.0, 14.0], [-13.0, -17.0, 36.0, -60.0, 3.0], [28.0, 13.0, -32.0, -24.0, 35.0]], [[61.0, 16.0, -19.0, 83.0, 85.0], [11.0, -8.0, 23.0, 5.0, 9.0], [27.0, 1.0, 29.0, -98.0, -3.0], [88.0, 32.0, -26.0, -52.0, -60.0]], [[45.0, -76.0, -8.0, 10.0, 90.0], [86.0, 11.0, -67.0, -34.0, -94.0], [-2.0, 51.0, -64.0, 64.0, -49.0], [-14.0, -32.0, -23.0, -8.0, -79.0]], [[-21.0, 31.0, 12.0, 14.0, -44.0], [21.0, -42.0, 21.0, 30.0, 29.0], [37.0, -68.0, -52.0, 35.0, 56.0], [-42.0, -32.0, -22.0, -23.0, -7.0]]], [[[25.0, 13.0, 6.0, 50.0, 16.0], [-37.0, -18.0, 39.0, 8.0, 19.0], [49.0, -32.0, -4.0, -23.0, 56.0], [34.0, 6.0, -60.0, -69.0, -1.0]], [[-52.0, -34.0, 42.0, -23.0, -29.0], [13.0, 45.0, 18.0, -34.0, -35.0], [26.0, -14.0, -9.0, 36.0, -14.0], [-70.0, 59.0, 24.0, -2.0, -3.0]], [[57.0, -36.0, -3.0, 48.0, 68.0], [2.0, -15.0, -9.0, -12.0, -38.0], [41.0, 7.0, -45.0, 28.0, 32.0], [29.0, -29.0, -83.0, -72.0, -35.0]], [[-1.0, 33.0, 14.0, -54.0, -92.0], [-49.0, -92.0, 17.0, 106.0, 47.0], [-51.0, -46.0, -6.0, -3.0, 32.0], [-12.0, -82.0, -40.0, 15.0, 81.0]], [[-41.0, 31.0, 1.0, -13.0, -65.0], [34.0, -37.0, -9.0, 15.0, 28.0], [26.0, -58.0, -77.0, 93.0, 60.0], [-74.0, -64.0, -3.0, 9.0, 4.0]]], [[[-30.0, -10.0, 51.0, -80.0, -102.0], [-56.0, -48.0, 32.0, 80.0, 6.0], [-47.0, -36.0, 11.0, 2.0, -1.0], [-49.0, -21.0, -24.0, 14.0, 88.0]], [[-28.0, 7.0, 55.0, -4.0, -59.0], [-81.0, -1.0, 86.0, 31.0, 24.0], [27.0, -53.0, 47.0, -59.0, 30.0], [-6.0, 69.0, -29.0, -49.0, 56.0]], [[75.0, 20.0, -40.0, 43.0, 76.0], [-1.0, -26.0, -9.0, 31.0, 16.0], [-37.0, 37.0, 51.0, -108.0, -35.0], [109.0, -9.0, -9.0, -2.0, -28.0]], [[-17.0, -11.0, 17.0, 32.0, 10.0], [63.0, 4.0, 5.0, -21.0, -23.0], [58.0, -40.0, -62.0, 49.0, 22.0], [-52.0, 9.0, -9.0, -33.0, -59.0]], [[-7.0, -6.0, -19.0, -12.0, -8.0], [-80.0, 37.0, -15.0, -59.0, 10.0], [19.0, 35.0, 0.0, 70.0, 55.0], [10.0, -19.0, -24.0, -10.0, 61.0]]]]),self.functionspace)
16790          ref.setTaggedValue(1,numarray.array([[[[48.0, -22.0, 7.0, 28.0, 70.0], [0.0, 14.0, 22.0, 16.0, -26.0], [-27.0, 34.0, 75.0, -130.0, -75.0], [75.0, 71.0, 6.0, -14.0, -34.0]], [[-5.0, -56.0, -6.0, -22.0, 25.0], [20.0, 39.0, -55.0, -65.0, -59.0], [11.0, 45.0, -54.0, 114.0, -1.0], [-43.0, -28.0, -9.0, 6.0, -9.0]], [[-40.0, -9.0, -14.0, -33.0, 0.0], [62.0, 50.0, -44.0, -46.0, -21.0], [-28.0, 37.0, 2.0, 31.0, -60.0], [-42.0, 21.0, 90.0, 75.0, -27.0]], [[32.0, -4.0, -7.0, 55.0, 49.0], [-17.0, 7.0, 14.0, -25.0, -3.0], [49.0, -2.0, -9.0, -6.0, 38.0], [38.0, 10.0, -47.0, -60.0, -23.0]], [[18.0, -47.0, 19.0, -25.0, -14.0], [-14.0, -40.0, -22.0, 17.0, -41.0], [11.0, -9.0, -78.0, 105.0, 44.0], [-42.0, -80.0, -87.0, -39.0, 25.0]]], [[[-20.0, -93.0, 84.0, -48.0, -14.0], [11.0, 21.0, 30.0, 16.0, -93.0], [-9.0, -5.0, 4.0, -5.0, -69.0], [-68.0, 72.0, -17.0, -23.0, -2.0]], [[47.0, 49.0, -43.0, 26.0, 19.0], [-57.0, -32.0, 3.0, 28.0, 58.0], [-23.0, 16.0, 44.0, -65.0, 26.0], [93.0, -35.0, -21.0, -3.0, 31.0]], [[-45.0, -61.0, 86.0, -134.0, -125.0], [-49.0, -44.0, 23.0, 93.0, -44.0], [-78.0, -24.0, 4.0, 29.0, -44.0], [-97.0, -16.0, -24.0, 31.0, 105.0]], [[-17.0, -3.0, 10.0, -21.0, -46.0], [8.0, -37.0, -13.0, 16.0, -1.0], [18.0, -36.0, -74.0, 97.0, 53.0], [-60.0, -69.0, -39.0, -11.0, 18.0]], [[-25.0, 63.0, 17.0, -3.0, -74.0], [22.0, -71.0, 43.0, 89.0, 61.0], [-9.0, -84.0, -4.0, -49.0, 19.0], [-24.0, -18.0, 12.0, 11.0, 6.0]]], [[[-46.0, 11.0, 12.0, 37.0, -1.0], [-46.0, 84.0, 48.0, -85.0, 18.0], [75.0, -9.0, 36.0, -7.0, 38.0], [-3.0, 103.0, 26.0, -35.0, 5.0]], [[26.0, 53.0, -58.0, 88.0, 86.0], [85.0, 19.0, -18.0, -37.0, 31.0], [27.0, 9.0, 9.0, -63.0, -16.0], [61.0, 24.0, 58.0, 11.0, -104.0]], [[3.0, -57.0, 42.0, -24.0, 7.0], [53.0, -12.0, -3.0, 28.0, -66.0], [-16.0, -6.0, -25.0, 5.0, -55.0], [-46.0, 12.0, -11.0, -5.0, -33.0]], [[36.0, -22.0, -9.0, 4.0, 34.0], [52.0, -36.0, -36.0, 23.0, -32.0], [-15.0, 8.0, -46.0, 26.0, -16.0], [-2.0, -55.0, -27.0, -2.0, -38.0]], [[-31.0, -38.0, 55.0, -19.0, -29.0], [15.0, 8.0, 31.0, 9.0, -39.0], [19.0, -33.0, -15.0, 12.0, -15.0], [-62.0, 44.0, -8.0, -22.0, -6.0]]], [[[3.0, 59.0, -39.0, 37.0, 9.0], [72.0, -33.0, -19.0, 16.0, 44.0], [6.0, -28.0, -30.0, -7.0, 13.0], [7.0, -40.0, 34.0, 25.0, -54.0]], [[7.0, -69.0, 73.0, -18.0, 3.0], [-79.0, 32.0, 69.0, 13.0, -54.0], [-1.0, 8.0, 73.0, -83.0, -43.0], [14.0, 107.0, -42.0, -57.0, 39.0]], [[-19.0, 107.0, -60.0, 49.0, 10.0], [8.0, 33.0, 17.0, -22.0, 101.0], [-8.0, 4.0, 90.0, -121.0, -13.0], [76.0, 59.0, 113.0, 59.0, -22.0]], [[-42.0, -25.0, 14.0, -35.0, -29.0], [-6.0, 40.0, -12.0, -43.0, -22.0], [9.0, 11.0, -16.0, 69.0, 2.0], [-55.0, 13.0, 20.0, 17.0, 21.0]], [[-29.0, -5.0, -30.0, -1.0, 15.0], [68.0, 39.0, -59.0, -71.0, -18.0], [21.0, 22.0, -60.0, 105.0, 5.0], [-51.0, -27.0, 45.0, 37.0, -42.0]]]]))
16791          self.failUnless(isinstance(res,Data),"wrong type of result.")
16792          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16793          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16794       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16795       def test_tensor_mult_taggedData_rank4_taggedData_rank2(self):
16796          arg0=Data(numarray.array([[[[5.0, -6.0, 0.0], [4.0, 1.0, -1.0]], [[7.0, 4.0, 1.0], [3.0, -1.0, 6.0]], [[-6.0, 3.0, 7.0], [-2.0, -1.0, 3.0]], [[-4.0, 0.0, 5.0], [-1.0, 0.0, -6.0]], [[-1.0, 6.0, 7.0], [-2.0, -1.0, 0.0]]], [[[-2.0, 4.0, -3.0], [1.0, 7.0, -4.0]], [[-7.0, -3.0, 0.0], [5.0, 7.0, 3.0]], [[4.0, -2.0, 1.0], [7.0, -1.0, -1.0]], [[0.0, 6.0, -3.0], [4.0, -5.0, -6.0]], [[4.0, 0.0, 4.0], [4.0, -7.0, -2.0]]], [[[3.0, 0.0, -6.0], [-2.0, -2.0, -3.0]], [[-1.0, 2.0, -4.0], [-1.0, 0.0, 1.0]], [[-7.0, -1.0, -3.0], [4.0, -2.0, 2.0]], [[7.0, -7.0, -7.0], [-6.0, 3.0, -2.0]], [[4.0, -7.0, -6.0], [6.0, 4.0, 7.0]]], [[[-7.0, 0.0, -6.0], [-4.0, -2.0, 3.0]], [[-7.0, -7.0, -7.0], [-7.0, -5.0, 3.0]], [[3.0, -2.0, -7.0], [1.0, -7.0, -1.0]], [[-7.0, 3.0, 5.0], [-2.0, 1.0, 7.0]], [[-6.0, -4.0, -4.0], [0.0, 0.0, 5.0]]]]),self.functionspace)
16797          arg0.setTaggedValue(1,numarray.array([[[[-4.0, 6.0, -6.0], [-2.0, -1.0, -2.0]], [[1.0, 2.0, 5.0], [-6.0, 0.0, 0.0]], [[-7.0, -3.0, 7.0], [4.0, 4.0, -4.0]], [[4.0, -3.0, 3.0], [-7.0, -4.0, 0.0]], [[1.0, 2.0, -5.0], [0.0, 4.0, -1.0]]], [[[4.0, 4.0, 2.0], [-7.0, -6.0, 6.0]], [[3.0, -4.0, 1.0], [-6.0, 4.0, 3.0]], [[1.0, 1.0, -6.0], [-5.0, -4.0, -1.0]], [[1.0, -1.0, 0.0], [4.0, -3.0, 7.0]], [[-6.0, 0.0, 3.0], [-6.0, 2.0, 7.0]]], [[[7.0, 3.0, 4.0], [4.0, -3.0, -6.0]], [[2.0, -6.0, -1.0], [-5.0, 6.0, 2.0]], [[3.0, -2.0, 2.0], [-4.0, 7.0, 0.0]], [[3.0, -4.0, -3.0], [-7.0, 0.0, -6.0]], [[-5.0, -2.0, -4.0], [0.0, 6.0, 6.0]]], [[[0.0, 2.0, -1.0], [6.0, -4.0, -3.0]], [[-3.0, 4.0, -1.0], [-5.0, 4.0, 4.0]], [[-6.0, -4.0, -6.0], [-2.0, 4.0, 2.0]], [[-5.0, -1.0, -3.0], [-5.0, -6.0, -6.0]], [[-1.0, 1.0, -2.0], [-2.0, -4.0, 3.0]]]]))
16798          arg1=Data(numarray.array([[-1.0, -3.0, 5.0], [-7.0, -5.0, -5.0]]),self.functionspace)
16799          arg1.setTaggedValue(1,numarray.array([[7.0, 6.0, 0.0], [0.0, 3.0, -4.0]]))
16800          res=tensor_mult(arg0,arg1)
16801          ref=Data(numarray.array([[-15.0, -60.0, 36.0, 66.0, 37.0], [-47.0, -69.0, -32.0, -6.0, 33.0], [6.0, -23.0, -33.0, 16.0, -110.0], [0.0, 52.0, 1.0, -3.0, -27.0]]),self.functionspace)
16802          ref.setTaggedValue(1,numarray.array([[13.0, 19.0, -39.0, -2.0, 35.0], [10.0, -3.0, 5.0, -36.0, -64.0], [82.0, -12.0, 30.0, 21.0, -53.0], [12.0, -1.0, -62.0, -35.0, -25.0]]))
16803          self.failUnless(isinstance(res,Data),"wrong type of result.")
16804          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16805          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16806       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16807       def test_tensor_mult_taggedData_rank4_taggedData_rank3(self):
16808          arg0=Data(numarray.array([[[[0.0, -6.0, 0.0], [0.0, 3.0, 7.0]], [[-2.0, -3.0, 1.0], [0.0, -3.0, -3.0]], [[4.0, -1.0, -5.0], [7.0, -6.0, -4.0]], [[2.0, 2.0, -4.0], [5.0, 0.0, -4.0]], [[-3.0, -2.0, 1.0], [4.0, -6.0, -6.0]]], [[[-4.0, 3.0, -2.0], [-3.0, -4.0, -2.0]], [[-4.0, 0.0, -4.0], [5.0, 7.0, 7.0]], [[7.0, 5.0, 6.0], [4.0, 0.0, -3.0]], [[5.0, -1.0, 2.0], [1.0, 0.0, -5.0]], [[0.0, -6.0, 4.0], [-2.0, -5.0, 1.0]]], [[[5.0, -2.0, 0.0], [-1.0, 0.0, 0.0]], [[7.0, 2.0, -7.0], [1.0, -2.0, 4.0]], [[0.0, 4.0, -2.0], [-5.0, -2.0, -7.0]], [[5.0, -1.0, -4.0], [-1.0, -5.0, -1.0]], [[-2.0, 0.0, -4.0], [6.0, -4.0, 1.0]]], [[[-2.0, 4.0, 6.0], [6.0, 3.0, 2.0]], [[-4.0, -7.0, 0.0], [2.0, -6.0, 3.0]], [[-6.0, -4.0, 2.0], [5.0, -6.0, -6.0]], [[6.0, -7.0, -5.0], [3.0, -3.0, 0.0]], [[-2.0, 4.0, 3.0], [-1.0, 0.0, -6.0]]]]),self.functionspace)
16809          arg0.setTaggedValue(1,numarray.array([[[[-7.0, -7.0, -7.0], [-2.0, 3.0, 1.0]], [[-3.0, -4.0, -2.0], [-4.0, 0.0, -5.0]], [[5.0, -5.0, 0.0], [4.0, -2.0, 0.0]], [[-5.0, 4.0, -4.0], [6.0, 6.0, 7.0]], [[1.0, 5.0, -6.0], [7.0, 1.0, -6.0]]], [[[-1.0, -4.0, 6.0], [5.0, 3.0, 4.0]], [[4.0, -6.0, -1.0], [-1.0, 2.0, 0.0]], [[3.0, -2.0, 4.0], [-5.0, 0.0, -3.0]], [[0.0, -3.0, -6.0], [5.0, 0.0, 0.0]], [[1.0, -2.0, -1.0], [-5.0, 4.0, 6.0]]], [[[0.0, 5.0, 2.0], [-4.0, 2.0, -6.0]], [[0.0, -3.0, 3.0], [5.0, 5.0, -6.0]], [[6.0, 0.0, 2.0], [-5.0, 3.0, 7.0]], [[-6.0, -5.0, 4.0], [-5.0, -7.0, -6.0]], [[-5.0, 7.0, 2.0], [-4.0, -4.0, 1.0]]], [[[6.0, 0.0, -7.0], [-4.0, -7.0, -2.0]], [[6.0, 0.0, -1.0], [7.0, 7.0, -3.0]], [[5.0, 4.0, 4.0], [-2.0, 5.0, -2.0]], [[-4.0, 0.0, 3.0], [3.0, 4.0, 0.0]], [[4.0, -2.0, -6.0], [-5.0, 6.0, 3.0]]]]))
16810          arg1=Data(numarray.array([[[6.0, 0.0], [3.0, 5.0], [7.0, 0.0]], [[-2.0, 2.0], [-1.0, -5.0], [5.0, 0.0]]]),self.functionspace)
16811          arg1.setTaggedValue(1,numarray.array([[[-3.0, 0.0], [5.0, 4.0], [3.0, -2.0]], [[3.0, 0.0], [-3.0, -2.0], [-6.0, -7.0]]]))
16812          res=tensor_mult(arg0,arg1)
16813          ref=Data(numarray.array([[[14.0, -45.0], [-26.0, 0.0], [-42.0, 39.0], [-40.0, 20.0], [-49.0, 28.0]], [[-29.0, 29.0], [-34.0, -25.0], [76.0, 33.0], [14.0, -3.0], [24.0, -9.0]], [[26.0, -12.0], [19.0, 22.0], [-25.0, 20.0], [1.0, 18.0], [-43.0, 32.0]], [[37.0, 17.0], [-28.0, -1.0], [-68.0, 20.0], [-23.0, -14.0], [-7.0, 18.0]]]),self.functionspace)
16814          ref.setTaggedValue(1,numarray.array([[[-56.0, -27.0], [1.0, 23.0], [-22.0, -16.0], [-19.0, -37.0], [58.0, 72.0]], [[-17.0, -62.0], [-54.0, -26.0], [-4.0, 5.0], [-18.0, 0.0], [-79.0, -56.0]], [[49.0, 54.0], [30.0, 14.0], [-78.0, -59.0], [47.0, 28.0], [50.0, 25.0]], [[-18.0, 42.0], [-3.0, 9.0], [8.0, 12.0], [18.0, -14.0], [-91.0, -29.0]]]))
16815          self.failUnless(isinstance(res,Data),"wrong type of result.")
16816          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16817          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16818       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16819       def test_tensor_mult_taggedData_rank4_taggedData_rank4(self):
16820          arg0=Data(numarray.array([[[[-4.0, 1.0, -2.0], [-4.0, -7.0, 4.0]], [[1.0, -4.0, 0.0], [-7.0, -4.0, -3.0]], [[4.0, -5.0, -7.0], [2.0, -3.0, 3.0]], [[0.0, 5.0, 5.0], [4.0, -5.0, -1.0]], [[-6.0, 7.0, 5.0], [1.0, -7.0, -4.0]]], [[[1.0, 5.0, -3.0], [-2.0, 7.0, 5.0]], [[-4.0, -1.0, 7.0], [1.0, -2.0, 2.0]], [[5.0, 0.0, 2.0], [-3.0, 6.0, -3.0]], [[-7.0, 7.0, 2.0], [0.0, 6.0, 2.0]], [[-6.0, -3.0, -7.0], [7.0, 5.0, 1.0]]], [[[0.0, -4.0, -4.0], [-1.0, 0.0, 2.0]], [[4.0, -7.0, 7.0], [5.0, 0.0, 0.0]], [[-7.0, 5.0, -6.0], [-3.0, 3.0, -7.0]], [[-3.0, 7.0, 2.0], [-7.0, -2.0, -7.0]], [[1.0, -3.0, -2.0], [0.0, 7.0, -2.0]]], [[[-2.0, 6.0, 5.0], [2.0, 2.0, -6.0]], [[-4.0, -5.0, -6.0], [-4.0, 0.0, -5.0]], [[-5.0, -5.0, 5.0], [-3.0, -6.0, -4.0]], [[5.0, -7.0, -2.0], [0.0, 7.0, 7.0]], [[-1.0, -4.0, 6.0], [3.0, -4.0, 6.0]]]]),self.functionspace)
16821          arg0.setTaggedValue(1,numarray.array([[[[0.0, 3.0, 6.0], [-2.0, -6.0, 5.0]], [[-2.0, -3.0, 2.0], [7.0, 6.0, 6.0]], [[-6.0, 0.0, -2.0], [-3.0, -3.0, -3.0]], [[7.0, 7.0, -6.0], [-5.0, -2.0, 6.0]], [[6.0, -1.0, 4.0], [2.0, -7.0, 7.0]]], [[[-5.0, -6.0, 7.0], [4.0, 0.0, 0.0]], [[-2.0, 5.0, 2.0], [-5.0, -4.0, 7.0]], [[6.0, 4.0, 6.0], [-4.0, 0.0, 3.0]], [[0.0, -4.0, -1.0], [6.0, -3.0, -1.0]], [[-2.0, -7.0, 0.0], [1.0, 2.0, 2.0]]], [[[-4.0, 0.0, -1.0], [6.0, -3.0, 4.0]], [[2.0, -1.0, 3.0], [3.0, 5.0, -2.0]], [[5.0, 3.0, 6.0], [0.0, -4.0, 4.0]], [[0.0, 7.0, -6.0], [7.0, 0.0, 2.0]], [[-4.0, 0.0, 0.0], [-5.0, -4.0, 5.0]]], [[[-3.0, 0.0, 1.0], [-5.0, -7.0, 2.0]], [[0.0, 2.0, -5.0], [-4.0, -7.0, -2.0]], [[-3.0, 0.0, 6.0], [1.0, -7.0, 7.0]], [[2.0, -4.0, -2.0], [-5.0, -3.0, -6.0]], [[-5.0, -3.0, -3.0], [-5.0, 3.0, -4.0]]]]))
16822          arg1=Data(numarray.array([[[[-6.0, -2.0, 2.0, 5.0, 4.0], [3.0, 0.0, 2.0, -4.0, 3.0], [-3.0, 4.0, -5.0, 3.0, -4.0], [1.0, 2.0, -5.0, -1.0, 6.0]], [[5.0, 6.0, -2.0, 1.0, -2.0], [-7.0, 1.0, -3.0, 5.0, -7.0], [-3.0, -5.0, 1.0, 3.0, -3.0], [2.0, -3.0, 0.0, -7.0, 0.0]], [[3.0, 5.0, 0.0, 0.0, 4.0], [4.0, -4.0, 6.0, 2.0, -1.0], [6.0, 1.0, 3.0, 7.0, 0.0], [-1.0, 2.0, 1.0, 1.0, 0.0]]], [[[-2.0, -4.0, 3.0, -4.0, -2.0], [2.0, -6.0, -6.0, 2.0, -2.0], [5.0, -2.0, -2.0, 3.0, 5.0], [1.0, 2.0, -1.0, 3.0, -2.0]], [[-6.0, 3.0, 6.0, -7.0, -4.0], [0.0, 1.0, 4.0, -7.0, 6.0], [-6.0, 4.0, -3.0, 6.0, 0.0], [3.0, -1.0, -2.0, 5.0, -7.0]], [[0.0, -7.0, -2.0, -2.0, 0.0], [-4.0, 3.0, -3.0, -7.0, -2.0], [7.0, -2.0, -2.0, 1.0, 7.0], [0.0, -3.0, -7.0, -1.0, 6.0]]]]),self.functionspace)
16823          arg1.setTaggedValue(1,numarray.array([[[[7.0, 3.0, 2.0, 1.0, 0.0], [-6.0, 5.0, 0.0, 4.0, -4.0], [-1.0, 0.0, 5.0, 3.0, 0.0], [0.0, -1.0, 4.0, -5.0, 7.0]], [[7.0, -2.0, 0.0, 3.0, 0.0], [5.0, -7.0, 2.0, 7.0, -5.0], [-2.0, -4.0, 3.0, 6.0, -1.0], [-7.0, 7.0, -2.0, -2.0, 4.0]], [[1.0, 7.0, 7.0, 1.0, 7.0], [0.0, 6.0, 2.0, -1.0, -1.0], [-4.0, -5.0, 0.0, -7.0, -5.0], [4.0, 5.0, -6.0, 3.0, 4.0]]], [[[0.0, -7.0, -1.0, 0.0, -6.0], [-2.0, -7.0, -1.0, 3.0, 3.0], [3.0, 6.0, -7.0, 2.0, -4.0], [-7.0, 0.0, -7.0, -2.0, 4.0]], [[-6.0, 4.0, 4.0, 0.0, 5.0], [-3.0, 2.0, -7.0, 0.0, 2.0], [-2.0, 2.0, 0.0, 6.0, 5.0], [-7.0, 6.0, 4.0, 5.0, 1.0]], [[5.0, 0.0, 7.0, -1.0, -3.0], [-7.0, -4.0, 4.0, 3.0, 6.0], [-1.0, 4.0, -5.0, -6.0, -1.0], [0.0, -4.0, -3.0, -1.0, -4.0]]]]))
16824          res=tensor_mult(arg0,arg1)
16825          ref=Data(numarray.array([[[[73.0, -29.0, -72.0, 38.0, 10.0], [-51.0, 38.0, -39.0, 30.0, -59.0], [47.0, -51.0, 36.0, -73.0, 21.0], [-25.0, -28.0, 8.0, -56.0, 57.0]], [[12.0, 11.0, -29.0, 63.0, 42.0], [29.0, 25.0, 49.0, 11.0, 27.0], [-23.0, 28.0, 23.0, -57.0, -48.0], [-26.0, 13.0, 31.0, -11.0, 30.0]], [[-56.0, -111.0, 0.0, 22.0, 6.0], [11.0, 17.0, -52.0, -51.0, 26.0], [10.0, 12.0, -47.0, -61.0, 30.0], [-6.0, 7.0, -44.0, 12.0, 59.0]], [[62.0, 31.0, -26.0, 26.0, 22.0], [-3.0, -47.0, -26.0, 85.0, -76.0], [58.0, -46.0, 29.0, 31.0, -2.0], [-6.0, 11.0, 18.0, -42.0, 21.0]], [[126.0, 82.0, -57.0, 30.0, 8.0], [-29.0, -38.0, -25.0, 148.0, -108.0], [46.0, -76.0, 79.0, -5.0, -20.0], [-17.0, -2.0, 76.0, -66.0, -13.0]]], [[[-28.0, 7.0, 18.0, -41.0, -42.0], [-68.0, 51.0, -6.0, -73.0, 7.0], [-53.0, -2.0, -36.0, 38.0, 6.0], [33.0, -45.0, -55.0, -15.0, -9.0]], [[50.0, 13.0, -19.0, -15.0, 20.0], [17.0, -31.0, 17.0, 27.0, -30.0], [88.0, -18.0, 40.0, 27.0, 38.0], [-18.0, 7.0, 16.0, 9.0, 0.0]], [[-54.0, 51.0, 43.0, 1.0, 10.0], [29.0, 7.0, 73.0, -43.0, 61.0], [-75.0, 58.0, -25.0, 53.0, -56.0], [18.0, 11.0, -11.0, 21.0, -24.0]], [[47.0, 70.0, 4.0, -74.0, -58.0], [-70.0, 11.0, -5.0, 11.0, -40.0], [-10.0, -41.0, 26.0, 52.0, 21.0], [23.0, -43.0, 11.0, -12.0, -72.0]], [[-44.0, -61.0, 43.0, -98.0, -80.0], [-15.0, -9.0, -70.0, -33.0, 24.0], [-3.0, -12.0, -25.0, -24.0, 75.0], [17.0, -11.0, -1.0, 65.0, -79.0]]], [[[-30.0, -54.0, 1.0, -4.0, -6.0], [2.0, 24.0, -12.0, -44.0, 30.0], [-3.0, 14.0, -18.0, -41.0, 21.0], [-5.0, -4.0, -17.0, 19.0, 14.0]], [[-48.0, -35.0, 37.0, -7.0, 48.0], [99.0, -65.0, 41.0, -27.0, 44.0], [76.0, 48.0, -16.0, 55.0, 30.0], [-12.0, 53.0, -18.0, 67.0, 14.0]], [[37.0, 84.0, -1.0, -25.0, -68.0], [-58.0, 29.0, -14.0, 63.0, -12.0], [-112.0, -27.0, 33.0, -46.0, -51.0], [15.0, -29.0, 75.0, -21.0, -99.0]], [[85.0, 129.0, -39.0, 48.0, 4.0], [-36.0, 18.0, 40.0, 100.0, -44.0], [-72.0, -25.0, 62.0, -14.0, -93.0], [-4.0, -14.0, 77.0, -68.0, -32.0]], [[-69.0, 5.0, 54.0, -43.0, -26.0], [24.0, 6.0, 33.0, -58.0, 72.0], [-62.0, 49.0, -31.0, 20.0, -9.0], [18.0, 6.0, -7.0, 55.0, -55.0]]], [[[41.0, 105.0, 14.0, -14.0, -12.0], [0.0, -42.0, 22.0, 80.0, -33.0], [-26.0, -17.0, 33.0, 59.0, -42.0], [13.0, 8.0, 51.0, -13.0, -66.0]], [[-11.0, -1.0, 0.0, 1.0, -22.0], [11.0, 28.0, 10.0, 6.0, 47.0], [-64.0, 21.0, 15.0, -86.0, -24.0], [-12.0, 2.0, 53.0, 26.0, -46.0]], [[62.0, 27.0, -37.0, 32.0, 40.0], [50.0, -25.0, 41.0, 69.0, -7.0], [53.0, 0.0, 67.0, -44.0, -8.0], [-41.0, 27.0, 73.0, 10.0, -6.0]], [[-113.0, -90.0, 52.0, -45.0, -2.0], [28.0, 29.0, 26.0, -157.0, 94.0], [1.0, 67.0, -73.0, 29.0, 50.0], [14.0, -1.0, -90.0, 70.0, 23.0]], [[22.0, -58.0, -21.0, -5.0, 38.0], [31.0, -32.0, -6.0, -12.0, -23.0], [132.0, -12.0, 13.0, 18.0, 73.0], [-24.0, 14.0, -26.0, 18.0, 52.0]]]]),self.functionspace)
16826          ref.setTaggedValue(1,numarray.array([[[[88.0, 26.0, 55.0, 10.0, 9.0], [2.0, -3.0, 82.0, 24.0, -9.0], [-29.0, -46.0, -2.0, -94.0, -60.0], [59.0, -5.0, -67.0, -19.0, 2.0]], [[-39.0, -11.0, 69.0, -15.0, -16.0], [-77.0, -38.0, -27.0, 8.0, 90.0], [3.0, 80.0, -98.0, -24.0, -11.0], [-62.0, 3.0, -57.0, 32.0, -8.0]], [[-41.0, -23.0, -56.0, -5.0, -2.0], [72.0, -15.0, 8.0, -40.0, -7.0], [14.0, -26.0, 6.0, -10.0, 10.0], [34.0, -10.0, 6.0, 18.0, -53.0]], [[134.0, -8.0, 11.0, 16.0, -40.0], [-33.0, -43.0, 45.0, 86.0, -40.0], [-14.0, -8.0, 61.0, 47.0, 27.0], [-24.0, -24.0, 59.0, -73.0, 7.0]], [[116.0, 6.0, 59.0, 0.0, -40.0], [-73.0, 5.0, 81.0, 40.0, 11.0], [-7.0, 10.0, -22.0, -96.0, -69.0], [58.0, -63.0, -61.0, -62.0, 27.0]]], [[[-70.0, 18.0, 35.0, -16.0, 25.0], [-8.0, 31.0, -2.0, -57.0, 55.0], [1.0, 13.0, -71.0, -92.0, -45.0], [42.0, -2.0, -78.0, 50.0, -15.0]], [[82.0, 17.0, 48.0, 8.0, 3.0], [10.0, -34.0, 75.0, 31.0, 0.0], [-30.0, -40.0, 5.0, -66.0, -22.0], [36.0, -5.0, -32.0, -11.0, -38.0]], [[91.0, 80.0, 79.0, 21.0, 57.0], [-29.0, 54.0, 36.0, 43.0, -44.0], [-53.0, -58.0, 55.0, -26.0, -21.0], [24.0, 40.0, -1.0, -15.0, 54.0]], [[-16.0, -53.0, -32.0, -12.0, -55.0], [-16.0, -22.0, 1.0, -12.0, 27.0], [37.0, 47.0, -49.0, -17.0, -29.0], [3.0, -47.0, -37.0, -21.0, 5.0]], [[-65.0, 9.0, 17.0, -25.0, -2.0], [-45.0, 28.0, -21.0, -48.0, 62.0], [13.0, 46.0, -48.0, -46.0, 11.0], [28.0, -43.0, 1.0, 30.0, -44.0]]], [[[9.0, -73.0, -5.0, -9.0, -70.0], [-7.0, -90.0, 29.0, 15.0, 53.0], [28.0, 51.0, -82.0, -35.0, -38.0], [-25.0, -35.0, -76.0, -14.0, -27.0]], [[-30.0, 28.0, 28.0, 4.0, 34.0], [-24.0, 32.0, -42.0, 1.0, 1.0], [-11.0, 9.0, -4.0, 27.0, 1.0], [-37.0, 44.0, -3.0, 22.0, 47.0]], [[106.0, 35.0, 64.0, 16.0, 10.0], [-31.0, 16.0, 62.0, 47.0, -25.0], [-31.0, -34.0, 14.0, -57.0, -57.0], [31.0, 6.0, -50.0, -37.0, 51.0]], [[53.0, -105.0, -35.0, 13.0, -90.0], [7.0, -142.0, 3.0, 82.0, 4.0], [29.0, 52.0, -38.0, 86.0, -7.0], [-122.0, 11.0, -33.0, -48.0, 24.0]], [[21.0, 7.0, 16.0, -9.0, -5.0], [11.0, -13.0, 53.0, -16.0, 23.0], [-8.0, -18.0, -10.0, -76.0, -5.0], [63.0, -40.0, -12.0, 5.0, -72.0]]], [[[32.0, 5.0, -8.0, -4.0, -4.0], [35.0, 4.0, 64.0, -22.0, -6.0], [-4.0, -41.0, 10.0, -80.0, -22.0], [88.0, -42.0, -17.0, -9.0, -52.0]], [[41.0, -39.0, -73.0, 3.0, -40.0], [53.0, -22.0, 39.0, 1.0, -43.0], [20.0, -29.0, 44.0, 9.0, 6.0], [43.0, -45.0, 32.0, -44.0, -27.0]], [[62.0, -2.0, 56.0, -4.0, -20.0], [-12.0, -28.0, 88.0, 6.0, 37.0], [-11.0, -10.0, -57.0, -133.0, -76.0], [66.0, -37.0, -104.0, -11.0, -28.0]], [[-28.0, 23.0, -59.0, -6.0, 19.0], [29.0, 79.0, -10.0, -51.0, -43.0], [11.0, -34.0, 63.0, 4.0, 25.0], [76.0, -34.0, 69.0, -7.0, -9.0]], [[-97.0, 17.0, -42.0, -13.0, 36.0], [44.0, 35.0, -44.0, -65.0, 5.0], [6.0, -13.0, 21.0, 20.0, 57.0], [23.0, 3.0, 63.0, 51.0, -60.0]]]]))
16827          self.failUnless(isinstance(res,Data),"wrong type of result.")
16828          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16829          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16830       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16831       def test_tensor_mult_taggedData_rank4_expandedData_rank2(self):
16832          arg0=Data(numarray.array([[[[-2.0, -2.0, 0.0], [-3.0, -3.0, 5.0]], [[-5.0, 5.0, -3.0], [-1.0, 6.0, -4.0]], [[-7.0, 5.0, 3.0], [4.0, -2.0, 0.0]], [[6.0, 0.0, 7.0], [-1.0, -4.0, -6.0]], [[5.0, 4.0, -3.0], [-7.0, -6.0, 6.0]]], [[[1.0, 7.0, -7.0], [6.0, 1.0, 0.0]], [[-4.0, 0.0, -4.0], [-4.0, 0.0, 6.0]], [[2.0, 7.0, -6.0], [5.0, 7.0, -6.0]], [[-2.0, -2.0, 4.0], [5.0, -1.0, 4.0]], [[-1.0, -3.0, -2.0], [-4.0, -1.0, 4.0]]], [[[-7.0, -4.0, 3.0], [3.0, -1.0, 3.0]], [[-4.0, 3.0, 4.0], [-2.0, -2.0, -4.0]], [[0.0, -5.0, 3.0], [7.0, 7.0, -6.0]], [[1.0, 0.0, -7.0], [0.0, -5.0, 7.0]], [[3.0, 1.0, -3.0], [1.0, 6.0, -6.0]]], [[[0.0, -1.0, 4.0], [-7.0, 5.0, -7.0]], [[-2.0, 0.0, -1.0], [-6.0, -6.0, 6.0]], [[-1.0, 5.0, -5.0], [-1.0, -3.0, 1.0]], [[7.0, 1.0, -3.0], [-3.0, 7.0, 0.0]], [[6.0, 2.0, -1.0], [6.0, -5.0, -4.0]]]]),self.functionspace)
16833          arg0.setTaggedValue(1,numarray.array([[[[4.0, 2.0, 2.0], [-5.0, -1.0, 3.0]], [[-6.0, -1.0, 4.0], [0.0, 6.0, 3.0]], [[3.0, 0.0, 7.0], [3.0, -4.0, 6.0]], [[-1.0, 0.0, 2.0], [7.0, -2.0, 0.0]], [[1.0, 1.0, 4.0], [-2.0, 2.0, 3.0]]], [[[-7.0, -2.0, -6.0], [0.0, -7.0, 7.0]], [[7.0, 3.0, -2.0], [4.0, -3.0, 3.0]], [[2.0, 3.0, 3.0], [5.0, -7.0, 0.0]], [[-3.0, -4.0, 4.0], [-5.0, 5.0, 5.0]], [[1.0, -5.0, 3.0], [2.0, -3.0, -1.0]]], [[[-2.0, -7.0, -3.0], [2.0, 4.0, 7.0]], [[-6.0, 7.0, -3.0], [-2.0, 0.0, 0.0]], [[7.0, 3.0, -6.0], [6.0, -2.0, -2.0]], [[6.0, -2.0, 2.0], [-7.0, -4.0, 4.0]], [[1.0, -5.0, -2.0], [-5.0, -1.0, 5.0]]], [[[3.0, -4.0, -1.0], [0.0, -5.0, 6.0]], [[4.0, -3.0, -1.0], [-5.0, 5.0, 0.0]], [[-7.0, -3.0, -4.0], [0.0, -5.0, 5.0]], [[-1.0, 0.0, 5.0], [6.0, -4.0, -7.0]], [[-2.0, -3.0, -2.0], [-1.0, 2.0, 0.0]]]]))
16834          arg1=Data(numarray.array([[2.0, -1.0, 6.0], [7.0, -6.0, 7.0]]),self.functionspace)
16835          arg1.setTaggedValue(1,numarray.array([[0.0, -6.0, -4.0], [2.0, -7.0, 0.0]]))
16836          arg1.expand()
16837          res=tensor_mult(arg0,arg1)
16838          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16839          ref=msk_ref*numarray.array([[30.0, -104.0, 39.0, 29.0, 17.0], [-11.0, -18.0, -88.0, 91.0, -5.0], [56.0, -17.0, -12.0, 39.0, -84.0], [-103.0, 26.0, -19.0, -68.0, 48.0]])+(1.-msk_ref)*numarray.array([[-23.0, -52.0, 6.0, 20.0, -40.0], [85.0, 19.0, 29.0, -37.0, 43.0], [30.0, -34.0, 32.0, 18.0, 35.0], [63.0, -23.0, 69.0, 20.0, 10.0]])
16840          self.failUnless(isinstance(res,Data),"wrong type of result.")
16841          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16842          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16843       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16844       def test_tensor_mult_taggedData_rank4_expandedData_rank3(self):
16845          arg0=Data(numarray.array([[[[4.0, 6.0, -1.0], [0.0, -6.0, 3.0]], [[-7.0, 3.0, -5.0], [-3.0, 0.0, -3.0]], [[3.0, -5.0, 4.0], [-2.0, 0.0, 5.0]], [[2.0, -1.0, 2.0], [0.0, 0.0, 4.0]], [[6.0, -7.0, 5.0], [3.0, -7.0, 7.0]]], [[[6.0, 4.0, 4.0], [6.0, 6.0, -7.0]], [[-1.0, -3.0, -3.0], [0.0, 6.0, 4.0]], [[2.0, 1.0, -5.0], [-4.0, -5.0, -5.0]], [[-2.0, 2.0, 0.0], [5.0, -6.0, 1.0]], [[-7.0, -6.0, 4.0], [4.0, 4.0, -1.0]]], [[[-1.0, -7.0, 7.0], [-1.0, 1.0, 0.0]], [[-5.0, -7.0, 3.0], [-7.0, 6.0, 7.0]], [[4.0, 7.0, -5.0], [5.0, 7.0, 4.0]], [[-1.0, 3.0, 0.0], [0.0, -2.0, 4.0]], [[0.0, 0.0, 4.0], [0.0, -4.0, 0.0]]], [[[0.0, 3.0, -5.0], [0.0, 5.0, 4.0]], [[-4.0, 7.0, -4.0], [0.0, 5.0, -5.0]], [[0.0, 5.0, 7.0], [7.0, 2.0, 2.0]], [[-4.0, 7.0, 2.0], [-1.0, 2.0, 5.0]], [[-4.0, 6.0, 7.0], [7.0, 0.0, 5.0]]]]),self.functionspace)
16846          arg0.setTaggedValue(1,numarray.array([[[[-6.0, 1.0, 3.0], [-1.0, 5.0, 0.0]], [[5.0, 0.0, -5.0], [3.0, -7.0, -4.0]], [[0.0, 0.0, 0.0], [-4.0, -6.0, 7.0]], [[4.0, -2.0, 0.0], [1.0, -4.0, 7.0]], [[-5.0, -4.0, -1.0], [-3.0, -7.0, -5.0]]], [[[2.0, 2.0, -5.0], [3.0, -6.0, 3.0]], [[-1.0, 0.0, 0.0], [-7.0, 0.0, -7.0]], [[4.0, 1.0, 1.0], [0.0, -6.0, 2.0]], [[5.0, -7.0, 2.0], [-5.0, -5.0, -5.0]], [[-3.0, -3.0, 0.0], [0.0, -4.0, 2.0]]], [[[3.0, -6.0, 0.0], [4.0, 2.0, -1.0]], [[4.0, -4.0, -4.0], [-7.0, 7.0, 7.0]], [[0.0, -6.0, -3.0], [3.0, 6.0, -6.0]], [[3.0, -5.0, 5.0], [-7.0, -3.0, 4.0]], [[-5.0, -4.0, 0.0], [7.0, -7.0, 5.0]]], [[[3.0, -3.0, -1.0], [-7.0, 3.0, 1.0]], [[3.0, 3.0, 3.0], [-1.0, 3.0, 2.0]], [[-5.0, 7.0, -6.0], [6.0, -5.0, -1.0]], [[-2.0, -3.0, 6.0], [1.0, 1.0, -3.0]], [[-2.0, -5.0, 0.0], [-5.0, 4.0, -6.0]]]]))
16847          arg1=Data(numarray.array([[[5.0, -6.0], [-7.0, 2.0], [-1.0, -6.0]], [[1.0, 7.0], [-3.0, 2.0], [-4.0, 0.0]]]),self.functionspace)
16848          arg1.setTaggedValue(1,numarray.array([[[-3.0, 5.0], [4.0, -7.0], [0.0, -2.0]], [[5.0, 1.0], [1.0, 0.0], [4.0, -6.0]]]))
16849          arg1.expand()
16850          res=tensor_mult(arg0,arg1)
16851          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16852          ref=msk_ref*numarray.array([[[-15.0, -18.0], [-42.0, 57.0], [24.0, -66.0], [-1.0, -26.0], [70.0, -73.0]], [[14.0, 2.0], [-15.0, 30.0], [39.0, -18.0], [-5.0, 39.0], [-1.0, 42.0]], [[33.0, -55.0], [-32.0, -39.0], [-56.0, 69.0], [-36.0, 8.0], [8.0, -32.0]], [[-47.0, 46.0], [-60.0, 72.0], [-49.0, 21.0], [-98.0, 23.0], [-82.0, 43.0]]])+(1.-msk_ref)*numarray.array([[[22.0, -44.0], [-23.0, 62.0], [2.0, -46.0], [9.0, -7.0], [-43.0, 32.0]], [[23.0, -9.0], [-60.0, 30.0], [-6.0, -1.0], [-93.0, 95.0], [1.0, -6.0]], [[-15.0, 67.0], [-28.0, 7.0], [-27.0, 87.0], [-51.0, 9.0], [47.0, -20.0]], [[-49.0, 25.0], [9.0, -25.0], [64.0, -50.0], [-12.0, 18.0], [-59.0, 56.0]]])
16853          self.failUnless(isinstance(res,Data),"wrong type of result.")
16854          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16855          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16856       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16857       def test_tensor_mult_taggedData_rank4_expandedData_rank4(self):
16858          arg0=Data(numarray.array([[[[-1.0, -5.0, 4.0], [-2.0, -2.0, 0.0]], [[-1.0, -3.0, 0.0], [0.0, -5.0, 0.0]], [[1.0, -1.0, -6.0], [1.0, -3.0, -7.0]], [[-2.0, -1.0, 1.0], [4.0, -4.0, -6.0]], [[7.0, -4.0, -4.0], [6.0, -4.0, -3.0]]], [[[0.0, -2.0, 2.0], [4.0, 0.0, 7.0]], [[7.0, -2.0, -3.0], [1.0, -3.0, -2.0]], [[6.0, 7.0, 2.0], [-5.0, 3.0, -6.0]], [[-4.0, 0.0, 4.0], [3.0, 0.0, -4.0]], [[-4.0, -6.0, 3.0], [-1.0, 0.0, -2.0]]], [[[7.0, 0.0, -6.0], [0.0, -1.0, -6.0]], [[1.0, -5.0, -3.0], [0.0, -4.0, 6.0]], [[1.0, 4.0, 5.0], [5.0, 1.0, -5.0]], [[5.0, -1.0, 0.0], [7.0, -5.0, -3.0]], [[-1.0, 7.0, -3.0], [0.0, -1.0, -6.0]]], [[[4.0, -5.0, 0.0], [0.0, 3.0, 2.0]], [[3.0, -4.0, -5.0], [4.0, -3.0, 3.0]], [[5.0, 2.0, -7.0], [5.0, -2.0, -4.0]], [[3.0, -6.0, 0.0], [6.0, 3.0, 7.0]], [[-2.0, -5.0, -6.0], [-2.0, 7.0, 4.0]]]]),self.functionspace)
16859          arg0.setTaggedValue(1,numarray.array([[[[-6.0, 6.0, 4.0], [-7.0, 2.0, 5.0]], [[1.0, 4.0, -4.0], [-5.0, 3.0, 2.0]], [[2.0, -1.0, -5.0], [-6.0, -2.0, 0.0]], [[0.0, -5.0, -2.0], [-2.0, -5.0, 6.0]], [[-1.0, -7.0, -3.0], [-2.0, -1.0, 7.0]]], [[[0.0, 7.0, 2.0], [4.0, 4.0, -3.0]], [[-3.0, 0.0, 3.0], [0.0, 0.0, 0.0]], [[-7.0, 2.0, 0.0], [0.0, -3.0, 3.0]], [[2.0, 4.0, -5.0], [6.0, -4.0, -5.0]], [[-3.0, 0.0, 0.0], [0.0, -3.0, -2.0]]], [[[-3.0, -7.0, -2.0], [-2.0, -2.0, 0.0]], [[6.0, 3.0, 3.0], [-6.0, 4.0, 6.0]], [[1.0, 3.0, 1.0], [-3.0, 0.0, 0.0]], [[0.0, 4.0, 0.0], [-3.0, -4.0, 4.0]], [[-3.0, -1.0, 0.0], [-2.0, 1.0, -5.0]]], [[[2.0, -3.0, 1.0], [0.0, 3.0, 1.0]], [[7.0, 0.0, -2.0], [7.0, 5.0, -3.0]], [[-7.0, 4.0, 0.0], [2.0, -2.0, -5.0]], [[0.0, 6.0, 2.0], [-2.0, -5.0, 2.0]], [[3.0, 6.0, 0.0], [4.0, 0.0, 4.0]]]]))
16860          arg1=Data(numarray.array([[[[2.0, 0.0, -5.0, -3.0, -4.0], [5.0, 0.0, -5.0, 1.0, -1.0], [-3.0, -4.0, 1.0, -2.0, -1.0], [-1.0, 2.0, 7.0, -4.0, 6.0]], [[-5.0, -7.0, 7.0, -6.0, -5.0], [1.0, -6.0, 6.0, 2.0, -3.0], [0.0, 1.0, -5.0, -1.0, -6.0], [4.0, -1.0, 5.0, -6.0, -4.0]], [[-1.0, 5.0, -7.0, 3.0, 7.0], [-5.0, -7.0, 5.0, 0.0, 5.0], [0.0, 2.0, -7.0, -3.0, 1.0], [-2.0, 0.0, 3.0, 6.0, -5.0]]], [[[-2.0, 5.0, -5.0, 5.0, -3.0], [1.0, 0.0, -2.0, -7.0, -1.0], [-5.0, -3.0, 0.0, -7.0, 0.0], [-1.0, -7.0, 5.0, -1.0, 0.0]], [[5.0, -3.0, 7.0, 0.0, -3.0], [0.0, 0.0, -4.0, -7.0, 1.0], [-6.0, -1.0, -6.0, -7.0, -1.0], [-3.0, -2.0, 4.0, 1.0, -1.0]], [[2.0, 3.0, 3.0, 6.0, -7.0], [-5.0, 1.0, 2.0, -4.0, -1.0], [1.0, -3.0, 3.0, -3.0, 2.0], [-5.0, 2.0, -3.0, 4.0, -3.0]]]]),self.functionspace)
16861          arg1.setTaggedValue(1,numarray.array([[[[0.0, -6.0, -6.0, -1.0, 6.0], [4.0, 4.0, 5.0, 0.0, 6.0], [-7.0, -5.0, -4.0, 0.0, -1.0], [-2.0, 2.0, 5.0, 3.0, -4.0]], [[-7.0, 1.0, 0.0, 1.0, -7.0], [6.0, 0.0, 5.0, 7.0, 6.0], [-5.0, 0.0, 6.0, -1.0, -7.0], [-6.0, 1.0, 0.0, -5.0, 0.0]], [[-7.0, -3.0, -7.0, -3.0, 0.0], [3.0, -3.0, -2.0, 5.0, 3.0], [-6.0, -1.0, 1.0, -2.0, -1.0], [4.0, 1.0, 6.0, 3.0, -4.0]]], [[[7.0, 3.0, -3.0, -3.0, 0.0], [7.0, -4.0, 4.0, 5.0, 6.0], [3.0, -5.0, 6.0, 1.0, 0.0], [1.0, 7.0, -2.0, 3.0, -1.0]], [[7.0, 3.0, 1.0, 7.0, 6.0], [0.0, 0.0, 0.0, 7.0, -3.0], [4.0, -7.0, 2.0, -2.0, 5.0], [-5.0, 7.0, 0.0, 1.0, -1.0]], [[-2.0, 0.0, 2.0, 3.0, 2.0], [-7.0, 6.0, -1.0, 5.0, -6.0], [-2.0, -1.0, 2.0, -2.0, 1.0], [3.0, 3.0, 1.0, -5.0, -5.0]]]]))
16862          arg1.expand()
16863          res=tensor_mult(arg0,arg1)
16864          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16865          ref=msk_ref*numarray.array([[[[13.0, 51.0, -62.0, 35.0, 69.0], [-32.0, 2.0, 7.0, 17.0, 36.0], [25.0, 15.0, 8.0, 23.0, 37.0], [-19.0, 21.0, -38.0, 58.0, -4.0]], [[-12.0, 36.0, -51.0, 21.0, 34.0], [-8.0, 18.0, 7.0, 28.0, 5.0], [33.0, 6.0, 44.0, 40.0, 24.0], [4.0, 11.0, -42.0, 17.0, 11.0]], [[-18.0, -30.0, -17.0, -52.0, 14.0], [70.0, 41.0, -45.0, 41.0, -25.0], [3.0, 4.0, 45.0, 52.0, -12.0], [50.0, -12.0, -2.0, -66.0, 64.0]], [[-40.0, 26.0, -70.0, -1.0, 62.0], [18.0, -7.0, 5.0, 20.0, 8.0], [4.0, 19.0, 2.0, 20.0, 1.0], [34.0, -35.0, 6.0, -12.0, 9.0]], [[0.0, 41.0, -102.0, 3.0, -21.0], [72.0, 49.0, -81.0, -3.0, -22.0], [-30.0, -45.0, 70.0, -3.0, 11.0], [6.0, -22.0, 40.0, -50.0, 91.0]]], [[[14.0, 65.0, -27.0, 80.0, -37.0], [-43.0, 5.0, 4.0, -60.0, 5.0], [-13.0, -31.0, 17.0, -53.0, 28.0], [-51.0, -12.0, -5.0, 48.0, -23.0]], [[6.0, 7.0, -60.0, -25.0, -19.0], [59.0, 31.0, -56.0, 25.0, -18.0], [-10.0, -30.0, 50.0, 17.0, 1.0], [9.0, 11.0, 29.0, -46.0, 74.0]], [[-12.0, -91.0, 33.0, -115.0, 3.0], [52.0, -62.0, 8.0, 58.0, -3.0], [-17.0, 17.0, -79.0, 7.0, -61.0], [44.0, 22.0, 88.0, -70.0, 13.0]], [[-26.0, 23.0, -35.0, 15.0, 63.0], [-17.0, -32.0, 26.0, -9.0, 25.0], [-7.0, 27.0, -44.0, -13.0, 0.0], [13.0, -37.0, 11.0, 21.0, -32.0]], [[17.0, 46.0, -44.0, 40.0, 84.0], [-32.0, 13.0, -3.0, -1.0, 40.0], [15.0, 25.0, -1.0, 18.0, 39.0], [-15.0, 1.0, -48.0, 63.0, -9.0]]], [[[3.0, -45.0, -18.0, -75.0, -25.0], [95.0, 36.0, -73.0, 38.0, -32.0], [-21.0, -21.0, 37.0, 29.0, -24.0], [38.0, 4.0, 45.0, -89.0, 91.0]], [[22.0, 50.0, -29.0, 54.0, -30.0], [-15.0, 57.0, -22.0, -5.0, -11.0], [27.0, -29.0, 89.0, 22.0, 42.0], [-33.0, 27.0, -61.0, 28.0, 27.0]], [[-38.0, 4.0, -45.0, -17.0, 28.0], [14.0, -64.0, 20.0, -13.0, 13.0], [-39.0, 9.0, -75.0, -48.0, -31.0], [22.0, -49.0, 86.0, -22.0, -21.0]], [[-30.0, 48.0, -111.0, 8.0, 0.0], [46.0, 3.0, -31.0, 1.0, -11.0], [-23.0, -28.0, 31.0, -14.0, 0.0], [14.0, -34.0, 54.0, -38.0, 48.0]], [[-51.0, -79.0, 50.0, -84.0, -7.0], [47.0, -27.0, 24.0, 44.0, -30.0], [3.0, 24.0, -27.0, 29.0, -55.0], [68.0, -19.0, 33.0, -81.0, 0.0]]], [[[52.0, 32.0, -28.0, 30.0, -14.0], [5.0, 32.0, -58.0, -35.0, 12.0], [-28.0, -30.0, 17.0, -30.0, 27.0], [-43.0, 11.0, 9.0, 25.0, 35.0]], [[14.0, 41.0, -40.0, 38.0, -51.0], [25.0, 62.0, -54.0, -24.0, -26.0], [-8.0, -44.0, 85.0, -3.0, 25.0], [-19.0, -6.0, -15.0, -13.0, 53.0]], [[-21.0, -30.0, -13.0, -47.0, -60.0], [87.0, 33.0, -58.0, 4.0, -49.0], [-32.0, -33.0, 44.0, 0.0, -30.0], [38.0, -31.0, 53.0, -97.0, 71.0]], [[53.0, 84.0, -45.0, 99.0, -58.0], [-20.0, 43.0, -61.0, -100.0, 5.0], [-50.0, -60.0, 36.0, -84.0, 44.0], [-77.0, -22.0, 12.0, 49.0, 18.0]], [[74.0, -14.0, 88.0, 32.0, -52.0], [-7.0, 76.0, -66.0, -63.0, -8.0], [-22.0, -22.0, 35.0, -20.0, 27.0], [-45.0, 9.0, -51.0, 27.0, 19.0]]]])+(1.-msk_ref)*numarray.array([[[[-115.0, 15.0, 41.0, 50.0, -56.0], [-60.0, 22.0, -41.0, 66.0, -66.0], [-35.0, 42.0, 36.0, -35.0, -25.0], [-10.0, -22.0, 13.0, -80.0, -12.0]], [[-18.0, 4.0, 44.0, 57.0, 0.0], [-33.0, 48.0, 11.0, 14.0, -33.0], [-10.0, 1.0, -4.0, -11.0, -8.0], [-56.0, -6.0, -7.0, -51.0, 4.0]], [[-14.0, -22.0, 39.0, 16.0, 7.0], [-55.0, 47.0, -9.0, -76.0, -39.0], [-5.0, 39.0, -59.0, 9.0, 0.0], [-14.0, -58.0, -8.0, -24.0, 20.0]], [[-12.0, -20.0, 27.0, -10.0, 17.0], [-92.0, 50.0, -35.0, -60.0, -69.0], [-1.0, 41.0, -42.0, 5.0, 18.0], [63.0, -38.0, -2.0, -22.0, -15.0]], [[35.0, -1.0, 46.0, 23.0, 51.0], [-118.0, 55.0, -49.0, -46.0, -108.0], [36.0, 18.0, -41.0, -1.0, 55.0], [56.0, -12.0, -12.0, -19.0, -16.0]]], [[[-1.0, 25.0, -28.0, 8.0, -31.0], [97.0, -40.0, 50.0, 92.0, 78.0], [-13.0, -47.0, 70.0, -9.0, -34.0], [-59.0, 56.0, 1.0, 2.0, -1.0]], [[-21.0, 9.0, -3.0, -6.0, -18.0], [-3.0, -21.0, -21.0, 15.0, -9.0], [3.0, 12.0, 15.0, -6.0, 0.0], [18.0, -3.0, 3.0, 0.0, 0.0]], [[-41.0, 35.0, 45.0, -3.0, -68.0], [-37.0, -10.0, -28.0, 8.0, -39.0], [21.0, 53.0, 40.0, -2.0, -19.0], [26.0, -24.0, -32.0, -49.0, 16.0]], [[31.0, 13.0, -9.0, -44.0, -50.0], [94.0, -31.0, 69.0, -20.0, 99.0], [8.0, -2.0, 29.0, 30.0, -50.0], [-37.0, 2.0, -37.0, 10.0, 35.0]], [[-17.0, 9.0, 11.0, -24.0, -40.0], [2.0, -24.0, -13.0, -31.0, 3.0], [13.0, 38.0, 2.0, 10.0, -14.0], [15.0, -33.0, -17.0, -2.0, 25.0]]], [[[35.0, 5.0, 36.0, -6.0, 19.0], [-74.0, 2.0, -54.0, -83.0, -72.0], [54.0, 41.0, -48.0, 13.0, 44.0], [48.0, -43.0, -23.0, 12.0, 24.0]], [[-68.0, -48.0, -23.0, 52.0, 51.0], [-33.0, 75.0, 9.0, 64.0, -21.0], [-89.0, -37.0, -19.0, -35.0, -4.0], [-26.0, 22.0, 66.0, -32.0, -64.0]], [[-49.0, -15.0, -4.0, 8.0, -15.0], [4.0, 13.0, 6.0, 11.0, 9.0], [-37.0, 9.0, -3.0, -8.0, -23.0], [-19.0, -15.0, 17.0, -18.0, -5.0]], [[-85.0, -17.0, 13.0, -3.0, -44.0], [-25.0, 36.0, 4.0, 5.0, -6.0], [-53.0, 39.0, 6.0, -7.0, -44.0], [5.0, -33.0, 10.0, -53.0, -13.0]], [[10.0, 14.0, 15.0, 0.0, -15.0], [3.0, -34.0, -23.0, -35.0, -9.0], [34.0, 23.0, -14.0, 7.0, 10.0], [-10.0, -29.0, -16.0, 16.0, 38.0]]], [[[33.0, -9.0, -14.0, 16.0, 53.0], [-14.0, 11.0, -8.0, 10.0, -18.0], [5.0, -33.0, -17.0, -7.0, 34.0], [6.0, 26.0, 17.0, 22.0, -20.0]], [[104.0, 0.0, -50.0, 4.0, 66.0], [92.0, -12.0, 70.0, 45.0, 81.0], [10.0, -100.0, 16.0, 7.0, 17.0], [-49.0, 87.0, 6.0, 56.0, -17.0]], [[-18.0, 46.0, 24.0, -24.0, -92.0], [45.0, -66.0, -2.0, -1.0, 30.0], [37.0, 44.0, 50.0, 12.0, -36.0], [-13.0, -25.0, -44.0, -12.0, 53.0]], [[-109.0, -21.0, -9.0, -23.0, -68.0], [14.0, 14.0, 16.0, 17.0, 33.0], [-72.0, 41.0, 20.0, -6.0, -67.0], [1.0, -35.0, 18.0, -45.0, -11.0]], [[-22.0, 0.0, -22.0, 3.0, -16.0], [48.0, 20.0, 57.0, 82.0, 54.0], [-47.0, -39.0, 56.0, -10.0, -41.0], [-26.0, 52.0, 11.0, -29.0, -36.0]]]])
16866          self.failUnless(isinstance(res,Data),"wrong type of result.")
16867          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16868          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16869       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16870       def test_tensor_mult_expandedData_rank2_taggedData_rank1(self):
16871          arg0=Data(numarray.array([[-6.0, -3.0, -3.0], [5.0, 7.0, 0.0]]),self.functionspace)
16872          arg0.setTaggedValue(1,numarray.array([[7.0, 7.0, 5.0], [1.0, -1.0, -6.0]]))
16873          arg0.expand()
16874          arg1=Data(numarray.array([-5.0, 6.0, 5.0]),self.functionspace)
16875          arg1.setTaggedValue(1,numarray.array([-7.0, 0.0, 6.0]))
16876          res=tensor_mult(arg0,arg1)
16877          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16878          ref=msk_ref*numarray.array([-3.0, 17.0])+(1.-msk_ref)*numarray.array([-19.0, -43.0])
16879          self.failUnless(isinstance(res,Data),"wrong type of result.")
16880          self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16881          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16882       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16883       def test_tensor_mult_expandedData_rank2_taggedData_rank2(self):
16884          arg0=Data(numarray.array([[0.0, -4.0, 0.0], [-3.0, -7.0, -3.0]]),self.functionspace)
16885          arg0.setTaggedValue(1,numarray.array([[2.0, 0.0, -2.0], [6.0, 6.0, -7.0]]))
16886          arg0.expand()
16887          arg1=Data(numarray.array([[7.0, -3.0], [1.0, 2.0], [5.0, -4.0]]),self.functionspace)
16888          arg1.setTaggedValue(1,numarray.array([[1.0, -3.0], [4.0, 2.0], [-3.0, 6.0]]))
16889          res=tensor_mult(arg0,arg1)
16890          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16891          ref=msk_ref*numarray.array([[-4.0, -8.0], [-43.0, 7.0]])+(1.-msk_ref)*numarray.array([[8.0, -18.0], [51.0, -48.0]])
16892          self.failUnless(isinstance(res,Data),"wrong type of result.")
16893          self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
16894          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16895       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16896       def test_tensor_mult_expandedData_rank4_taggedData_rank2(self):
16897          arg0=Data(numarray.array([[[[-4.0, -7.0, 0.0], [-1.0, 7.0, -4.0]], [[3.0, -1.0, -6.0], [2.0, -4.0, 7.0]], [[-5.0, 1.0, 3.0], [3.0, -6.0, 0.0]], [[5.0, 1.0, -5.0], [6.0, 5.0, 4.0]], [[4.0, 7.0, -2.0], [-4.0, 2.0, 0.0]]], [[[-6.0, 1.0, 1.0], [4.0, 2.0, -1.0]], [[-1.0, -3.0, -2.0], [-2.0, 0.0, 1.0]], [[7.0, 2.0, 0.0], [2.0, 6.0, -7.0]], [[2.0, 0.0, -6.0], [4.0, 6.0, 0.0]], [[1.0, 2.0, 4.0], [3.0, -7.0, 1.0]]], [[[-3.0, 0.0, -6.0], [-5.0, -4.0, 0.0]], [[-3.0, -3.0, 5.0], [4.0, 0.0, 3.0]], [[-1.0, 3.0, 0.0], [-1.0, 2.0, 7.0]], [[4.0, -3.0, 0.0], [1.0, 7.0, 0.0]], [[5.0, 5.0, 0.0], [6.0, 3.0, 5.0]]], [[[-7.0, 1.0, 6.0], [5.0, -1.0, -2.0]], [[0.0, 7.0, 5.0], [-4.0, 1.0, 6.0]], [[5.0, 6.0, -6.0], [3.0, 0.0, -6.0]], [[0.0, 0.0, 5.0], [2.0, -3.0, 3.0]], [[0.0, 0.0, -1.0], [2.0, -3.0, -6.0]]]]),self.functionspace)
16898          arg0.setTaggedValue(1,numarray.array([[[[7.0, 3.0, 3.0], [0.0, 6.0, 0.0]], [[-1.0, 1.0, 5.0], [5.0, 7.0, 4.0]], [[5.0, 5.0, -3.0], [1.0, 1.0, -7.0]], [[0.0, 1.0, 7.0], [-7.0, -6.0, 4.0]], [[-1.0, -3.0, -2.0], [6.0, -7.0, -7.0]]], [[[3.0, 2.0, 1.0], [-4.0, 2.0, 3.0]], [[6.0, 4.0, 2.0], [0.0, 0.0, -1.0]], [[5.0, -3.0, 0.0], [7.0, 7.0, -2.0]], [[3.0, -1.0, 6.0], [0.0, 7.0, 7.0]], [[6.0, -2.0, 4.0], [-4.0, 7.0, 3.0]]], [[[3.0, 0.0, -2.0], [-3.0, -1.0, -1.0]], [[1.0, 4.0, 6.0], [2.0, 2.0, 3.0]], [[6.0, -3.0, -5.0], [6.0, -1.0, 7.0]], [[-3.0, -7.0, 3.0], [6.0, -3.0, -1.0]], [[-4.0, -1.0, -4.0], [3.0, -5.0, 2.0]]], [[[5.0, 7.0, 6.0], [-4.0, -4.0, -2.0]], [[-3.0, 3.0, 4.0], [3.0, -5.0, 4.0]], [[-7.0, -4.0, -1.0], [4.0, 5.0, -6.0]], [[-6.0, 0.0, -5.0], [-4.0, -4.0, -6.0]], [[0.0, 1.0, -6.0], [-2.0, 5.0, 4.0]]]]))
16899          arg0.expand()
16900          arg1=Data(numarray.array([[-2.0, 1.0, -5.0], [3.0, -2.0, 7.0]]),self.functionspace)
16901          arg1.setTaggedValue(1,numarray.array([[-3.0, 4.0, -1.0], [-7.0, 4.0, 7.0]]))
16902          res=tensor_mult(arg0,arg1)
16903          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16904          ref=msk_ref*numarray.array([[-44.0, 86.0, 17.0, 52.0, -7.0], [9.0, 10.0, -67.0, 26.0, 10.0], [29.0, 11.0, 47.0, -22.0, 42.0], [-12.0, 10.0, -7.0, 8.0, -25.0]])+(1.-msk_ref)*numarray.array([[12.0, 23.0, -44.0, 50.0, -126.0], [55.0, -11.0, -62.0, 58.0, 47.0], [3.0, 22.0, -22.0, -83.0, -15.0], [5.0, 4.0, -44.0, -7.0, 72.0]])
16905          self.failUnless(isinstance(res,Data),"wrong type of result.")
16906          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16907          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16908       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16909       def test_tensor_mult_expandedData_rank4_taggedData_rank3(self):
16910          arg0=Data(numarray.array([[[[0.0, -6.0, 5.0], [-3.0, 6.0, 2.0]], [[-7.0, -3.0, 2.0], [0.0, 0.0, 7.0]], [[-4.0, 0.0, -5.0], [6.0, -3.0, 0.0]], [[7.0, 0.0, -2.0], [-1.0, 2.0, 5.0]], [[0.0, -7.0, 7.0], [4.0, 5.0, 1.0]]], [[[-1.0, 1.0, -2.0], [6.0, 0.0, 2.0]], [[3.0, 2.0, 0.0], [0.0, 5.0, 5.0]], [[6.0, -1.0, -3.0], [0.0, -1.0, 0.0]], [[0.0, 4.0, 1.0], [5.0, 0.0, 7.0]], [[-5.0, 0.0, 3.0], [-2.0, -5.0, 7.0]]], [[[-4.0, 7.0, 3.0], [3.0, 6.0, -1.0]], [[3.0, 7.0, 4.0], [0.0, 0.0, 0.0]], [[5.0, -1.0, -3.0], [2.0, 5.0, -1.0]], [[-7.0, -5.0, 7.0], [5.0, -2.0, -2.0]], [[0.0, -6.0, 3.0], [2.0, -6.0, -5.0]]], [[[0.0, -7.0, -5.0], [5.0, 7.0, 6.0]], [[-4.0, 0.0, -1.0], [-6.0, -6.0, 7.0]], [[1.0, 7.0, -4.0], [-1.0, 5.0, 7.0]], [[2.0, -4.0, -7.0], [0.0, -6.0, 7.0]], [[0.0, 3.0, 1.0], [-3.0, 1.0, -4.0]]]]),self.functionspace)
16911          arg0.setTaggedValue(1,numarray.array([[[[-5.0, -5.0, 6.0], [-1.0, -1.0, 6.0]], [[0.0, 3.0, -1.0], [0.0, -3.0, -5.0]], [[-3.0, 2.0, -2.0], [5.0, -6.0, -7.0]], [[1.0, 3.0, 1.0], [7.0, -4.0, 2.0]], [[7.0, 3.0, -4.0], [0.0, -4.0, 1.0]]], [[[2.0, -4.0, -3.0], [-4.0, -5.0, 7.0]], [[5.0, 4.0, 0.0], [-5.0, -1.0, -7.0]], [[-2.0, -5.0, -1.0], [0.0, 7.0, -4.0]], [[3.0, 6.0, -6.0], [0.0, 2.0, 5.0]], [[3.0, -1.0, 7.0], [7.0, 7.0, -4.0]]], [[[-4.0, 0.0, -1.0], [-5.0, 0.0, 0.0]], [[-1.0, 5.0, 4.0], [2.0, 7.0, -6.0]], [[4.0, -5.0, 0.0], [0.0, -2.0, -4.0]], [[5.0, -4.0, -7.0], [7.0, -2.0, -3.0]], [[-7.0, -7.0, -5.0], [6.0, 1.0, 3.0]]], [[[-1.0, -1.0, -2.0], [-6.0, 7.0, 1.0]], [[6.0, -7.0, -2.0], [4.0, 6.0, -4.0]], [[7.0, -6.0, -6.0], [-3.0, 2.0, 0.0]], [[-3.0, 5.0, -5.0], [-2.0, -3.0, 7.0]], [[-7.0, 2.0, -6.0], [-1.0, 5.0, 2.0]]]]))
16912          arg0.expand()
16913          arg1=Data(numarray.array([[[0.0, -1.0], [0.0, -3.0], [5.0, -1.0]], [[7.0, 4.0], [-3.0, -5.0], [-7.0, 6.0]]]),self.functionspace)
16914          arg1.setTaggedValue(1,numarray.array([[[4.0, -1.0], [0.0, -3.0], [2.0, -6.0]], [[0.0, 4.0], [-2.0, 5.0], [-1.0, 3.0]]]))
16915          res=tensor_mult(arg0,arg1)
16916          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16917          ref=msk_ref*numarray.array([[[-28.0, -17.0], [-39.0, 56.0], [26.0, 48.0], [-58.0, 11.0], [41.0, 11.0]], [[18.0, 36.0], [-50.0, -4.0], [-12.0, 5.0], [-9.0, 49.0], [-33.0, 61.0]], [[25.0, -44.0], [20.0, -28.0], [-9.0, -22.0], [90.0, 33.0], [82.0, 23.0]], [[-53.0, 47.0], [-78.0, 53.0], [-91.0, -5.0], [-66.0, 89.0], [9.0, -51.0]]])+(1.-msk_ref)*numarray.array([[[-12.0, -7.0], [9.0, -33.0], [3.0, -22.0], [12.0, -2.0], [27.0, -9.0]], [[5.0, 8.0], [29.0, -63.0], [-20.0, 46.0], [-9.0, 40.0], [16.0, 9.0]], [[-18.0, -10.0], [-4.0, -13.0], [24.0, -11.0], [13.0, 58.0], [-43.0, 96.0]], [[-23.0, 30.0], [12.0, 61.0], [12.0, 45.0], [-23.0, 16.0], [-52.0, 64.0]]])
16918          self.failUnless(isinstance(res,Data),"wrong type of result.")
16919          self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
16920          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16921       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16922       def test_tensor_mult_expandedData_rank4_taggedData_rank4(self):
16923          arg0=Data(numarray.array([[[[3.0, 2.0, 3.0], [-2.0, 6.0, -5.0]], [[-6.0, -2.0, -3.0], [-6.0, 3.0, 0.0]], [[3.0, -4.0, 7.0], [1.0, 4.0, -1.0]], [[1.0, -4.0, 0.0], [-3.0, 0.0, -2.0]], [[0.0, 2.0, -4.0], [-7.0, 4.0, -5.0]]], [[[-1.0, 2.0, 0.0], [-6.0, -2.0, 0.0]], [[0.0, -7.0, -2.0], [-2.0, -6.0, 7.0]], [[-3.0, -2.0, -7.0], [-7.0, 0.0, -6.0]], [[3.0, -7.0, -4.0], [4.0, 5.0, 0.0]], [[-1.0, -7.0, -1.0], [-6.0, -6.0, -2.0]]], [[[4.0, 1.0, 5.0], [-7.0, 3.0, 5.0]], [[5.0, 0.0, 7.0], [0.0, -5.0, 6.0]], [[-1.0, 0.0, 4.0], [0.0, -6.0, 7.0]], [[0.0, -1.0, -5.0], [-1.0, -5.0, 5.0]], [[1.0, 1.0, 1.0], [3.0, 2.0, 1.0]]], [[[6.0, -7.0, 1.0], [3.0, 4.0, 3.0]], [[7.0, -1.0, -7.0], [-1.0, 4.0, 7.0]], [[0.0, 7.0, 0.0], [2.0, -2.0, 5.0]], [[1.0, -2.0, -5.0], [5.0, 0.0, -3.0]], [[7.0, 6.0, 0.0], [1.0, -3.0, -4.0]]]]),self.functionspace)
16924          arg0.setTaggedValue(1,numarray.array([[[[7.0, 5.0, -2.0], [-6.0, -7.0, -6.0]], [[7.0, 0.0, 7.0], [-6.0, 3.0, 1.0]], [[-2.0, 6.0, 1.0], [7.0, 5.0, -2.0]], [[-5.0, -6.0, -7.0], [0.0, -7.0, -7.0]], [[3.0, 1.0, -5.0], [2.0, -4.0, 0.0]]], [[[-2.0, 0.0, 3.0], [-5.0, 4.0, -5.0]], [[-6.0, -3.0, 4.0], [4.0, 5.0, 4.0]], [[-5.0, -5.0, 0.0], [-7.0, 5.0, -2.0]], [[0.0, 4.0, -5.0], [4.0, -7.0, 1.0]], [[2.0, -1.0, -6.0], [0.0, 5.0, -7.0]]], [[[0.0, -6.0, 1.0], [-7.0, 0.0, 3.0]], [[-6.0, -5.0, 7.0], [-4.0, 4.0, 3.0]], [[7.0, -3.0, -7.0], [-4.0, 5.0, -3.0]], [[0.0, -6.0, 5.0], [1.0, 1.0, 7.0]], [[2.0, 3.0, 4.0], [7.0, -3.0, 2.0]]], [[[-1.0, -4.0, -2.0], [-1.0, -1.0, -2.0]], [[0.0, -4.0, 4.0], [-6.0, -2.0, 0.0]], [[-4.0, -1.0, -1.0], [-5.0, 2.0, 2.0]], [[6.0, -7.0, 4.0], [5.0, 3.0, -1.0]], [[-6.0, 0.0, -2.0], [3.0, -3.0, 0.0]]]]))
16925          arg0.expand()
16926          arg1=Data(numarray.array([[[[0.0, 0.0, 3.0, 7.0, 4.0], [-6.0, 5.0, 6.0, -5.0, 5.0], [0.0, 3.0, 0.0, 2.0, -5.0], [3.0, 4.0, 7.0, 7.0, 5.0]], [[-1.0, 4.0, 6.0, 7.0, 5.0], [0.0, 0.0, -7.0, -4.0, 7.0], [4.0, 3.0, -7.0, -6.0, -4.0], [-2.0, 1.0, 0.0, -1.0, -6.0]], [[6.0, 7.0, -5.0, -5.0, 3.0], [-7.0, 4.0, -1.0, 7.0, -7.0], [-3.0, -7.0, -4.0, -1.0, -4.0], [3.0, 1.0, -7.0, 2.0, -4.0]]], [[[0.0, -6.0, 4.0, 4.0, 6.0], [2.0, 1.0, 7.0, 7.0, -3.0], [-5.0, 1.0, -1.0, 5.0, 0.0], [0.0, 5.0, -5.0, -6.0, -4.0]], [[-4.0, 6.0, -6.0, -5.0, 0.0], [4.0, 5.0, 4.0, -2.0, 3.0], [7.0, -5.0, 0.0, 6.0, 0.0], [-1.0, -6.0, 0.0, 0.0, 7.0]], [[5.0, 6.0, 7.0, -2.0, -7.0], [-5.0, 2.0, -7.0, 4.0, 7.0], [4.0, 6.0, -7.0, 7.0, 5.0], [-1.0, 7.0, 3.0, -2.0, 4.0]]]]),self.functionspace)
16927          arg1.setTaggedValue(1,numarray.array([[[[3.0, 1.0, 1.0, 0.0, -7.0], [4.0, -6.0, 0.0, -5.0, -7.0], [4.0, -6.0, 1.0, -3.0, 3.0], [-3.0, -3.0, -6.0, 3.0, 7.0]], [[0.0, -6.0, 5.0, -2.0, 2.0], [1.0, -1.0, 3.0, 4.0, -4.0], [-3.0, -4.0, 0.0, 1.0, 0.0], [-7.0, -2.0, 3.0, 5.0, -7.0]], [[-1.0, 0.0, 5.0, -2.0, 5.0], [0.0, 2.0, 2.0, 6.0, 6.0], [-4.0, 3.0, -1.0, -2.0, -6.0], [6.0, 0.0, 5.0, 7.0, -6.0]]], [[[-2.0, 0.0, -6.0, -7.0, -7.0], [-2.0, 5.0, -6.0, 3.0, -6.0], [-2.0, -2.0, 0.0, -6.0, -4.0], [-3.0, -1.0, -1.0, -6.0, -6.0]], [[-7.0, 7.0, -4.0, -7.0, -1.0], [-3.0, -5.0, -3.0, -1.0, -3.0], [-7.0, 6.0, -3.0, -1.0, -3.0], [-3.0, 5.0, 1.0, -3.0, 7.0]], [[-3.0, 2.0, 0.0, -7.0, 4.0], [-7.0, 7.0, -5.0, 1.0, 3.0], [3.0, -5.0, 2.0, 5.0, 0.0], [-2.0, -4.0, 0.0, 6.0, -1.0]]]]))
16928          res=tensor_mult(arg0,arg1)
16929          msk_ref=1-whereZero(self.functionspace.getX()[0],1.e-8)
16930          ref=msk_ref*numarray.array([[[[-33.0, 47.0, -73.0, -8.0, 54.0], [6.0, 45.0, 46.0, -48.0, -3.0], [31.0, -68.0, 11.0, -18.0, -60.0], [13.0, -64.0, -5.0, 47.0, 21.0]], [[-28.0, 25.0, -57.0, -80.0, -79.0], [57.0, -33.0, -49.0, -31.0, 4.0], [52.0, -24.0, 32.0, -9.0, 50.0], [-26.0, -77.0, 9.0, -10.0, 39.0]], [[25.0, 45.0, -77.0, -56.0, 26.0], [-44.0, 62.0, 69.0, 45.0, -60.0], [-18.0, -77.0, 6.0, 45.0, -32.0], [35.0, -11.0, -36.0, 35.0, 31.0]], [[-6.0, -10.0, -47.0, -29.0, -20.0], [-2.0, -2.0, 27.0, -18.0, -28.0], [-9.0, -24.0, 45.0, -3.0, 1.0], [13.0, -29.0, 16.0, 33.0, 33.0]], [[-67.0, 16.0, -55.0, -4.0, -9.0], [55.0, -13.0, -8.0, -113.0, 40.0], [63.0, -23.0, 44.0, -54.0, -17.0], [-15.0, -96.0, 48.0, 42.0, 40.0]]], [[[6.0, 32.0, -3.0, -7.0, -30.0], [-14.0, -21.0, -70.0, -41.0, 21.0], [24.0, 7.0, -8.0, -56.0, -3.0], [-5.0, -20.0, 23.0, 27.0, -7.0]], [[54.0, -24.0, 45.0, -31.0, -102.0], [-49.0, -26.0, -36.0, 40.0, 2.0], [-26.0, 63.0, 10.0, 47.0, 71.0], [7.0, 66.0, 45.0, 1.0, 44.0]], [[-70.0, -51.0, -56.0, -16.0, -43.0], [83.0, -62.0, -4.0, -99.0, -1.0], [24.0, -9.0, 91.0, -64.0, 21.0], [-20.0, -98.0, 45.0, 21.0, 29.0]], [[-37.0, -50.0, -27.0, -17.0, -11.0], [38.0, 28.0, 119.0, 3.0, -3.0], [-1.0, -5.0, 61.0, 102.0, 29.0], [6.0, -9.0, 29.0, -4.0, 92.0]], [[15.0, -47.0, -42.0, -41.0, -64.0], [-13.0, -49.0, -8.0, -12.0, -61.0], [-45.0, -5.0, 73.0, -39.0, 27.0], [16.0, -20.0, 24.0, 38.0, 15.0]]], [[[42.0, 129.0, -18.0, -43.0, -41.0], [-86.0, 58.0, -60.0, -24.0, 57.0], [65.0, -12.0, -55.0, 15.0, -19.0], [17.0, 4.0, 43.0, 69.0, 63.0]], [[92.0, 55.0, 52.0, 13.0, -1.0], [-129.0, 40.0, -39.0, 58.0, 3.0], [-32.0, 27.0, -70.0, 15.0, -23.0], [35.0, 99.0, 4.0, 37.0, -14.0]], [[83.0, 34.0, 62.0, -11.0, -41.0], [-81.0, -5.0, -83.0, 73.0, -2.0], [-26.0, 41.0, -65.0, 7.0, 24.0], [8.0, 85.0, -14.0, -13.0, -35.0]], [[16.0, -33.0, 80.0, 29.0, -61.0], [-12.0, -36.0, -50.0, -8.0, 51.0], [1.0, 86.0, -7.0, 11.0, 49.0], [-13.0, 54.0, 55.0, -13.0, 15.0]], [[2.0, 11.0, 11.0, 9.0, 23.0], [-4.0, 24.0, 20.0, 19.0, 9.0], [4.0, -2.0, -21.0, 29.0, -8.0], [1.0, 16.0, -12.0, -12.0, 1.0]]], [[[12.0, 3.0, -20.0, -26.0, -11.0], [-36.0, 63.0, 100.0, 30.0, -2.0], [-6.0, -9.0, 21.0, 113.0, 9.0], [28.0, 30.0, 29.0, 27.0, 96.0]], [[-22.0, 19.0, 71.0, 39.0, -53.0], [-14.0, 40.0, 16.0, -67.0, 141.0], [78.0, 88.0, -13.0, 95.0, 32.0], [-9.0, 40.0, 124.0, 28.0, 129.0]], [[26.0, 34.0, 97.0, 57.0, 12.0], [-29.0, 2.0, -78.0, 10.0, 72.0], [24.0, 63.0, -86.0, -9.0, -3.0], [-17.0, 64.0, 5.0, -29.0, -44.0]], [[-43.0, -91.0, 15.0, 44.0, 30.0], [54.0, -16.0, 81.0, -9.0, -10.0], [-30.0, 19.0, 50.0, 23.0, 8.0], [-5.0, 1.0, 8.0, -25.0, 5.0]], [[-14.0, -24.0, 51.0, 118.0, 92.0], [-32.0, 13.0, 23.0, -62.0, 37.0], [-18.0, 31.0, -15.0, -63.0, -79.0], [16.0, 29.0, 32.0, 45.0, -42.0]]]])+(1.-msk_ref)*numarray.array([[[[102.0, -84.0, 86.0, 127.0, -24.0], [108.0, -88.0, 98.0, -44.0, -42.0], [64.0, -68.0, 18.0, 1.0, 78.0], [-17.0, -36.0, -38.0, 53.0, 19.0]], [[2.0, 30.0, 66.0, 0.0, 29.0], [24.0, -66.0, 36.0, -13.0, 23.0], [-6.0, 4.0, -7.0, 3.0, -6.0], [28.0, -4.0, 2.0, 103.0, 63.0]], [[-50.0, -7.0, -29.0, -84.0, -31.0], [-17.0, 4.0, -27.0, 54.0, -67.0], [-85.0, 17.0, -22.0, -47.0, -55.0], [-62.0, 20.0, 33.0, -38.0, -67.0]], [[62.0, -32.0, -42.0, 124.0, -33.0], [44.0, 8.0, 24.0, -41.0, 17.0], [54.0, 26.0, 9.0, -5.0, 48.0], [50.0, 20.0, -30.0, -115.0, 7.0]], [[38.0, -31.0, -13.0, 22.0, -54.0], [21.0, 1.0, -7.0, -31.0, -55.0], [53.0, -65.0, 20.0, -6.0, 43.0], [-40.0, -33.0, -46.0, -21.0, 4.0]]], [[[-12.0, 16.0, 27.0, 36.0, 40.0], [25.0, -62.0, 49.0, 4.0, 35.0], [-53.0, 80.0, -27.0, 1.0, -16.0], [37.0, 51.0, 36.0, 3.0, 31.0]], [[-77.0, 55.0, -45.0, -93.0, 39.0], [-78.0, 70.0, -60.0, 53.0, 51.0], [-62.0, 62.0, -17.0, -2.0, -73.0], [28.0, 29.0, 48.0, -20.0, -38.0]], [[-30.0, 56.0, -8.0, 38.0, 61.0], [-12.0, -39.0, 22.0, -23.0, 76.0], [-32.0, 104.0, -24.0, 37.0, -2.0], [60.0, 65.0, 27.0, -25.0, 79.0]], [[43.0, -71.0, -1.0, 16.0, -34.0], [10.0, 48.0, -6.0, 6.0, -46.0], [52.0, -86.0, 28.0, 2.0, 35.0], [-51.0, -51.0, -24.0, -12.0, -72.0]], [[-2.0, 29.0, -53.0, 28.0, -79.0], [41.0, -97.0, 5.0, -62.0, -82.0], [-21.0, 39.0, -21.0, -35.0, 27.0], [-36.0, 49.0, -40.0, -98.0, 99.0]]], [[[4.0, 42.0, 17.0, 38.0, 54.0], [-13.0, -6.0, 11.0, -36.0, 81.0], [37.0, 26.0, 5.0, 49.0, 22.0], [63.0, 7.0, -6.0, 37.0, 75.0]], [[-54.0, 58.0, 12.0, -25.0, 103.0], [-54.0, 36.0, -4.0, 39.0, 125.0], [-48.0, 94.0, -19.0, 34.0, -56.0], [89.0, 40.0, 64.0, 36.0, 0.0]], [[10.0, 54.0, -39.0, 34.0, -79.0], [39.0, -119.0, 1.0, -109.0, -79.0], [29.0, 2.0, -7.0, -6.0, 64.0], [-39.0, 26.0, -77.0, -52.0, 174.0]], [[-35.0, 57.0, -15.0, -61.0, 33.0], [-60.0, 65.0, -52.0, 15.0, 66.0], [10.0, 8.0, 6.0, 12.0, -37.0], [52.0, -12.0, 7.0, 38.0, 6.0]], [[3.0, -33.0, 7.0, -56.0, -26.0], [-8.0, 57.0, -26.0, 52.0, -29.0], [-4.0, -54.0, 11.0, -40.0, -37.0], [-19.0, -42.0, 7.0, 28.0, -96.0]]], [[[14.0, 12.0, -21.0, 40.0, -11.0], [11.0, -8.0, 3.0, -27.0, 14.0], [19.0, 22.0, 0.0, 0.0, 16.0], [29.0, 15.0, -16.0, -40.0, 34.0]], [[22.0, 10.0, 44.0, 56.0, 56.0], [14.0, -8.0, 38.0, -8.0, 82.0], [22.0, 28.0, 2.0, 26.0, 6.0], [76.0, 4.0, 12.0, 50.0, 26.0]], [[-21.0, 20.0, 8.0, 11.0, 62.0], [-27.0, 2.0, 9.0, -5.0, 56.0], [-7.0, 37.0, -5.0, 51.0, 8.0], [18.0, 21.0, 23.0, 12.0, 27.0]], [[-14.0, 67.0, -51.0, -43.0, -78.0], [5.0, -18.0, -47.0, -23.0, -32.0], [-5.0, 17.0, -9.0, -71.0, -35.0], [33.0, 10.0, -39.0, -34.0, 59.0]], [[-1.0, -27.0, -22.0, 4.0, 14.0], [-21.0, 62.0, -13.0, 30.0, 21.0], [-1.0, 6.0, 5.0, 7.0, -9.0], [6.0, 0.0, 20.0, -41.0, -69.0]]]])
16931          self.failUnless(isinstance(res,Data),"wrong type of result.")
16932          self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
16933          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16934       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16935     def test_generalTensorProduct_float_rank0_taggedData_rank0_offset0(self):     def test_generalTensorProduct_float_rank0_taggedData_rank0_offset0(self):
16936        arg0=-0.26757248589        arg0=0.0
16937        arg1=Data(-0.845346619976,self.functionspace)        arg1=Data(3.0,self.functionspace)
16938        arg1.setTaggedValue(1,-0.164939544191)        arg1.setTaggedValue(1,7.0)
16939        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
16940        ref=Data(0.22619149654580534,self.functionspace)        ref=Data(0.0,self.functionspace)
16941        ref.setTaggedValue(1,0.044133283860763033)        ref.setTaggedValue(1,0.0)
16942        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
16943        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16944        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16945     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16946     def test_generalTensorProduct_float_rank0_taggedData_rank1_offset0(self):     def test_generalTensorProduct_float_rank0_taggedData_rank1_offset0(self):
16947        arg0=0.796750749318        arg0=-4.0
16948        arg1=Data(numarray.array([0.71795366535495631, 0.52653855960302054]),self.functionspace)        arg1=Data(numarray.array([0.0, 6.0]),self.functionspace)
16949        arg1.setTaggedValue(1,numarray.array([0.24254790248497127, -0.89703657103420276]))        arg1.setTaggedValue(1,numarray.array([4.0, 0.0]))
16950        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
16951        ref=Data(numarray.array([0.57203012084690563, 0.41951999190833605]),self.functionspace)        ref=Data(numarray.array([-0.0, -24.0]),self.functionspace)
16952        ref.setTaggedValue(1,numarray.array([0.19325022305032208, -0.71471456013682511]))        ref.setTaggedValue(1,numarray.array([-16.0, -0.0]))
16953        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
16954        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
16955        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16956     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16957     def test_generalTensorProduct_float_rank0_taggedData_rank2_offset0(self):     def test_generalTensorProduct_float_rank0_taggedData_rank2_offset0(self):
16958        arg0=0.695709993643        arg0=7.0
16959        arg1=Data(numarray.array([[0.020860044940730571, -0.029660347286396993, -0.52432778011587056, 0.16323818055966832, 0.23656513789445799], [-0.94714247989983846, 0.88028874793065404, -0.80492047695032132, -0.1705466841006269, 0.26041675138028464], [0.51077512727642538, 0.30844961603752541, 0.92974442192889684, -0.29528156956238738, 0.82263550865498036], [0.64585924254051674, -0.53641015540398373, -0.99798834032979333, 0.30966027448251321, 0.043112098114223008]]),self.functionspace)        arg1=Data(numarray.array([[5.0, -6.0, 7.0, 7.0, -7.0], [-6.0, 2.0, -4.0, -7.0, 5.0], [-2.0, -3.0, 6.0, -6.0, 1.0], [1.0, -6.0, -4.0, -3.0, -5.0]]),self.functionspace)
16960        arg1.setTaggedValue(1,numarray.array([[0.64188692087685117, 0.39360124259112728, -0.75019784742320894, -0.526723465119322, -0.39782285568476472], [-0.81062105747380531, 0.41798281693760542, -0.85685874165134712, -0.19118971519642813, -0.84993495899479599], [0.89086613100115342, 0.94117717592473626, 0.23970421209032811, 0.84662298079483556, 0.61042317686862524], [0.43617096051797755, 0.47613540926509823, 0.87963467661658368, 0.52339361553568819, 0.84472192299856874]]))        arg1.setTaggedValue(1,numarray.array([[5.0, -7.0, -6.0, 3.0, 7.0], [-1.0, -6.0, 4.0, 7.0, -7.0], [-6.0, -6.0, 1.0, -5.0, -6.0], [2.0, 0.0, 3.0, -3.0, 2.0]]))
16961        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
16962        ref=Data(numarray.array([[0.014512541733110847, -0.020635000022071963, -0.36478007657132311, 0.11356643355948121, 0.16458073058073699], [-0.65893648867024479, 0.61242567922694469, -0.55999121990232459, -0.11865103251150221, 0.18117453644733958], [0.35535136055054534, 0.21459148041268938, 0.6468324858698784, -0.2054303388831788, 0.57231574449696054], [0.4493307295222127, -0.37318590580621014, -0.69431046190674761, 0.21543374759175582, 0.029993517504987622]]),self.functionspace)        ref=Data(numarray.array([[35.0, -42.0, 49.0, 49.0, -49.0], [-42.0, 14.0, -28.0, -49.0, 35.0], [-14.0, -21.0, 42.0, -42.0, 7.0], [7.0, -42.0, -28.0, -21.0, -35.0]]),self.functionspace)
16963        ref.setTaggedValue(1,numarray.array([[0.44656714564283551, 0.273832317980997, -0.52192013966188244, -0.36644677856984526, -0.27676933639953522], [-0.56395717074207974, 0.29079482291459452, -0.59612518970730988, -0.1330125955439368, -0.59130824491933431], [0.61978447033568274, 0.65478636707964721, 0.16676461586959107, 0.58900406858689369, 0.42467750449888392], [0.30344849616927538, 0.33125216255308548, 0.61197063527719064, 0.36413016893718281, 0.58768148367953776]]))        ref.setTaggedValue(1,numarray.array([[35.0, -49.0, -42.0, 21.0, 49.0], [-7.0, -42.0, 28.0, 49.0, -49.0], [-42.0, -42.0, 7.0, -35.0, -42.0], [14.0, 0.0, 21.0, -21.0, 14.0]]))
16964        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
16965        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
16966        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16967     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16968     def test_generalTensorProduct_float_rank0_taggedData_rank3_offset0(self):     def test_generalTensorProduct_float_rank0_taggedData_rank3_offset0(self):
16969        arg0=0.484037306122        arg0=-1.0
16970        arg1=Data(numarray.array([[[0.68265538612757171, -0.1110965724433548], [-0.5662762533652177, 0.78934646910807293]], [[-0.1302879130937733, 0.44955885333630219], [-0.70642464431652807, -0.38736932551572267]], [[0.91760749190540047, -0.47273734671155543], [-0.15302376331735901, -0.70016811030317783]], [[0.45013141661922829, 0.81567106675810264], [-0.59615473801203045, 0.34671300912721348]], [[0.23903112608792654, -0.31114947887937272], [0.62016389414155948, -0.82747459961955983]], [[-0.91511460631251573, -0.32568238555751816], [-0.40329157753955713, -0.82101250044004104]]]),self.functionspace)        arg1=Data(numarray.array([[[6.0, -3.0], [6.0, -3.0]], [[4.0, 0.0], [-5.0, 7.0]], [[3.0, 1.0], [1.0, -5.0]], [[2.0, 0.0], [6.0, 7.0]], [[5.0, 5.0], [0.0, -1.0]], [[-6.0, 1.0], [3.0, -2.0]]]),self.functionspace)
16971        arg1.setTaggedValue(1,numarray.array([[[0.018775740122862317, -0.11443654923919833], [0.43486736144027782, 0.38480797876112471]], [[0.55181515928391778, 0.11140381764071683], [0.18926828403697682, -0.20016270876144659]], [[0.7280994039969968, 0.073961476761866152], [-0.6697897808718698, 0.030058399297158145]], [[-0.15297116577480252, 0.54959167221419425], [-0.73596162012515909, -0.62944147322810307]], [[-0.130497384390585, -0.074648690607898249], [0.89655273131792357, 0.57515634235572155]], [[-0.53168430120443966, 0.91631417471415899], [-0.19868649938767047, 0.97447626383861796]]]))        arg1.setTaggedValue(1,numarray.array([[[5.0, 1.0], [4.0, -1.0]], [[-4.0, 4.0], [0.0, -1.0]], [[-4.0, 7.0], [0.0, 3.0]], [[-4.0, -3.0], [-7.0, -2.0]], [[3.0, -1.0], [6.0, -4.0]], [[-5.0, 0.0], [3.0, -7.0]]]))
16972        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
16973        ref=Data(numarray.array([[[0.33043067411119004, -0.053774885644922214], [-0.27409883220002995, 0.38207313850436164]], [[-0.063064210474229596, 0.21760325631241403], [-0.34193588181350215, -0.1875012047971118]], [[0.44415625845969386, -0.22882251180574931], [-0.074069210168858174, -0.33890748594401643]], [[0.21788039830146622, 0.39481522583564016], [-0.28856113341949502, 0.16782203093555464]], [[0.11569998235102241, -0.15060795555818454], [0.30018246067470628, -0.40052857608462805]], [[-0.4429496088328424, -0.15764242455680341], [-0.1952081687741318, -0.3974006790058775]]]),self.functionspace)        ref=Data(numarray.array([[[-6.0, 3.0], [-6.0, 3.0]], [[-4.0, -0.0], [5.0, -7.0]], [[-3.0, -1.0], [-1.0, 5.0]], [[-2.0, -0.0], [-6.0, -7.0]], [[-5.0, -5.0], [-0.0, 1.0]], [[6.0, -1.0], [-3.0, 2.0]]]),self.functionspace)
16974        ref.setTaggedValue(1,numarray.array([[[0.0090881586695260048, -0.055391559015693904], [0.21049202615214219, 0.18626141741397065]], [[0.26709912317733386, 0.053923603782572403], [0.09161291033968233, -0.096886218335068802]], [[0.35242727410008834, 0.035800113968653971], [-0.32420324120158489, 0.014549386622150223]], [[-0.07404375099605047, 0.26602287248590667], [-0.35623288001491671, -0.30467315506309506]], [[-0.06316560239644832, -0.036132751107417413], [0.43396496886387781, 0.27839712655312132]], [[-0.2573550368626093, 0.44353024469048347], [-0.096171677926513446, 0.47168286562874207]]]))        ref.setTaggedValue(1,numarray.array([[[-5.0, -1.0], [-4.0, 1.0]], [[4.0, -4.0], [-0.0, 1.0]], [[4.0, -7.0], [-0.0, -3.0]], [[4.0, 3.0], [7.0, 2.0]], [[-3.0, 1.0], [-6.0, 4.0]], [[5.0, -0.0], [-3.0, 7.0]]]))
16975        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
16976        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
16977        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16978     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16979     def test_generalTensorProduct_float_rank0_taggedData_rank4_offset0(self):     def test_generalTensorProduct_float_rank0_taggedData_rank4_offset0(self):
16980        arg0=-0.82612164061        arg0=-4.0
16981        arg1=Data(numarray.array([[[[0.49137230608321159, 0.21103397397591972, 0.36894695797613597, -0.98934457807391096], [0.72704960548443953, 0.40167275033472238, 0.58725780128843574, -0.10728333413432201], [0.99124949932668827, -0.646519831641438, 0.029197269026953077, 0.030911350424682515]], [[-0.2062470776840899, 0.47074529044667623, 0.39284725161264755, -0.79430925885241277], [-0.39637287434231028, -0.9461043990096667, 0.98357675278498369, 0.09119868886628546], [0.91396857840844747, 0.85432450564711382, -0.35423417818924774, -0.4192775306299914]]], [[[-0.83191415405301505, -0.10956248737146823, 0.25400718228889407, -0.11693553662376077], [-0.0080216603023453015, 0.23885756457584106, -0.34713262645684284, 0.46501360266582159], [-0.29131559484184577, -0.33852545531854772, 0.13787465227116202, -0.25170735763681362]], [[0.28495381018787858, 0.65120424561293389, 0.35994204133054541, 0.9204717883540452], [-0.88451718169770621, 0.30533185395629858, -0.082085559206255709, 0.59340273277123412], [-0.53028926744778127, 0.71911169474982639, -0.92543659627885555, -0.25163796630716662]]], [[[-0.2406854475941016, 0.73809304974413026, 0.68357891676627713, -0.40738060369549856], [0.69230516626747285, 0.61465390677783716, -0.50936848663217682, 0.29742832750319681], [0.36009425257419814, -0.10656686018273454, 0.44342857915480227, -0.18332317751439375]], [[0.80444079297957383, -0.087904217723211442, -0.76307780635792777, 0.12779018458029689], [0.23309964011556872, 0.5126085720989233, -0.98215495805790787, 0.37699412625362849], [0.93486132495407115, -0.4472239943844849, 0.026263762762378962, -0.66190224340523462]]]]),self.functionspace)        arg1=Data(numarray.array([[[[2.0, 2.0, 7.0, 3.0], [-7.0, 0.0, 2.0, -4.0], [-4.0, -5.0, -2.0, 0.0]], [[-1.0, -1.0, -1.0, 1.0], [2.0, -7.0, 0.0, 3.0], [6.0, 6.0, -5.0, -4.0]]], [[[-3.0, 7.0, 1.0, -4.0], [5.0, -4.0, 0.0, 5.0], [5.0, 5.0, -7.0, -3.0]], [[-5.0, -2.0, -5.0, 6.0], [4.0, 1.0, -6.0, -7.0], [5.0, -6.0, -6.0, -3.0]]], [[[1.0, 5.0, 1.0, -5.0], [1.0, 0.0, -4.0, -2.0], [-3.0, 0.0, -3.0, 1.0]], [[-4.0, -1.0, -7.0, 7.0], [0.0, -4.0, -1.0, -1.0], [5.0, -1.0, -4.0, 2.0]]]]),self.functionspace)
16982        arg1.setTaggedValue(1,numarray.array([[[[0.16616967377174974, -0.34107493762952257, -0.013366504122305445, 0.3916585189816173], [-0.51443295867620642, -0.061956143344672032, -0.46825145806797974, 0.93626982523512203], [-0.38827530515953357, 0.76492363380102857, 0.9106638908219844, 0.82366217715856216]], [[0.0777021432639875, -0.1266865881760002, 0.94159533967464126, -0.52875807266097596], [0.72286575971810585, -0.77732888911952047, -0.34573213185526286, -0.50543303426366437], [-0.30623465226307678, 0.72745029312048759, 0.029705243092159828, -0.46235736717130349]]], [[[-0.023779335438608662, 0.062125873920558128, 0.55432211434727252, -0.4910628288412513], [-0.34836515769635312, 0.75268152200559157, 0.18972705449311222, 0.20609273075803891], [0.40002294900947777, -0.069504408378212146, 0.33361971327149709, 0.96462084486009525]], [[-0.37425750917278622, -0.36854032805550929, -0.76003840737679318, 0.28810224841584242], [-0.63434214294045788, -0.64508629082812363, -0.88595356937835024, 0.018348107926466239], [0.19521376070150187, 0.27345548434566203, 0.38107788831816691, 0.11669712593060977]]], [[[0.38397614572939998, 0.86441444697364211, 0.84537640188458707, -0.87984981292402931], [-0.89945185236059189, -0.18316500042027717, 0.52176022932540378, 0.90446948037966424], [0.84249247342924782, -0.5831061613180073, 0.81322201875229028, -0.72602553774982126]], [[0.65265301490599925, -0.35965776340528843, -0.74966085019277862, 0.50894589155692227], [0.59793303791118579, 0.89854331043644731, -0.59261270886988227, -0.02537886281454127], [0.66860854165544392, -0.87533172628080691, 0.94974216080754914, 0.60985323529838964]]]]))        arg1.setTaggedValue(1,numarray.array([[[[3.0, 3.0, -1.0, 0.0], [-2.0, 0.0, -3.0, 3.0], [6.0, -3.0, -7.0, -6.0]], [[3.0, -3.0, 0.0, -2.0], [-7.0, 1.0, -2.0, -4.0], [-3.0, 4.0, 2.0, 4.0]]], [[[4.0, 0.0, -4.0, 0.0], [-1.0, -5.0, -7.0, 7.0], [-1.0, -1.0, 3.0, -3.0]], [[-5.0, -1.0, 4.0, -3.0], [4.0, -6.0, 1.0, -5.0], [5.0, 3.0, 0.0, -7.0]]], [[[-4.0, 4.0, -3.0, 4.0], [7.0, 0.0, 0.0, -4.0], [-7.0, 3.0, -4.0, 0.0]], [[1.0, -7.0, 5.0, -2.0], [-3.0, -7.0, -6.0, 5.0], [3.0, 5.0, -7.0, -7.0]]]]))
16983        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
16984        ref=Data(numarray.array([[[[-0.40593329565157654, -0.17433973280534668, -0.30479506622115998, 0.81731896596661413], [-0.60063141288735467, -0.33183055149468393, -0.48514637826117851, 0.088629084005112088], [-0.81889266263719063, 0.53410402400225565, -0.024120495789865814, -0.025536535526296422]], [[0.17038517418731228, -0.38889287165304243, -0.32453961601120573, 0.65619606807453645], [0.32745220924480511, 0.78159731829780854, -0.81255404067617609, -0.075341210467658584], [-0.7550492214603941, -0.70577596221816385, 0.29264052044568839, 0.34637424147478285]]], [[[0.68726228579260951, 0.090511941816583966, -0.20984083015911836, 0.096602977361183132], [0.0066268671693862575, -0.19732540311940303, 0.28677377487764028, -0.38415780034006092], [0.24066211714590197, 0.27966320453586446, -0.11390123393272802, 0.2079408952444273]], [[-0.23540650917036171, -0.53797391975768227, -0.29735590970835218, -0.76042166392987987], [0.73071878529147294, -0.25224125212074272, 0.067812656841826954, -0.49022283913918141], [0.43808343962161456, -0.59407373304826361, 0.76452319919803569, 0.20788356956533524]]], [[[0.19883545683729081, -0.60975464117715084, -0.56471933620507786, 0.33654593267744726], [-0.57192827975937421, -0.50777889387439601, 0.42080032985139393, -0.24571197788070506], [-0.29748165471067783, 0.088037189368772611, -0.36632594530454121, 0.15144724416995262]], [[-0.66456594766955879, 0.072619576562001339, 0.63039508930117227, -0.1055702369392762], [-0.19256865711777679, -0.42347703457289781, 0.81137946528363425, -0.31144300608082354], [-0.77230917151350498, 0.36946141996088122, -0.021697062781837358, 0.54681176724509539]]]]),self.functionspace)        ref=Data(numarray.array([[[[-8.0, -8.0, -28.0, -12.0], [28.0, -0.0, -8.0, 16.0], [16.0, 20.0, 8.0, -0.0]], [[4.0, 4.0, 4.0, -4.0], [-8.0, 28.0, -0.0, -12.0], [-24.0, -24.0, 20.0, 16.0]]], [[[12.0, -28.0, -4.0, 16.0], [-20.0, 16.0, -0.0, -20.0], [-20.0, -20.0, 28.0, 12.0]], [[20.0, 8.0, 20.0, -24.0], [-16.0, -4.0, 24.0, 28.0], [-20.0, 24.0, 24.0, 12.0]]], [[[-4.0, -20.0, -4.0, 20.0], [-4.0, -0.0, 16.0, 8.0], [12.0, -0.0, 12.0, -4.0]], [[16.0, 4.0, 28.0, -28.0], [-0.0, 16.0, 4.0, 4.0], [-20.0, 4.0, 16.0, -8.0]]]]),self.functionspace)
16985        ref.setTaggedValue(1,numarray.array([[[[-0.13727636351587694, 0.28176938704531207, 0.011042358314733717, -0.32355757825981285], [0.424984199805229, 0.051183310785742904, 0.38683266275694839, -0.7734727640764858], [0.32076263210658001, -0.63191996729674893, -0.75231914752976314, -0.6804451491022917]], [[-0.06419142207212615, 0.10465853206718778, -0.77787228680235143, 0.43681848647224614], [-0.59717504735881366, 0.64216821717264227, 0.28561679597971812, 0.41754916748417759], [0.25298707333907788, -0.60096242961461865, -0.024540144158001535, 0.38196342671548422]]], [[[0.019644623605148966, -0.051323528887555536, -0.45793749453074117, 0.40567762980471694], [0.28779199560732704, -0.62180649381577657, -0.15673762552587348, -0.17025766485154001], [-0.33046761491719301, 0.057419095879007002, -0.27561046486754759, -0.79689415492202309]], [[0.30918222748827789, 0.30445914044401096, 0.62788417602841029, -0.23800750212460514], [0.52404377183376916, 0.53291974491367955, 0.73190541623875793, -0.015157769022293969], [-0.16127031226029109, -0.22590749336132623, -0.31481669029743919, -0.096406021128218347]]], [[[-0.31721100346491593, -0.71411148110048983, -0.69838374005752057, 0.72686297094283303], [0.74305663992145987, 0.15131657064945417, -0.4310374166551344, -0.74720181101254446], [-0.69600126435059506, 0.48171661863758786, -0.67182030831147843, 0.59978540837033645]], [[-0.53917077942293423, 0.2971210615623498, 0.61931105146203247, -0.4204512149145111], [-0.49396542225386031, -0.74230607377652291, 0.48957018329767582, 0.020966027785154353], [-0.55235198535797547, 0.72313048179271788, -0.78460255204242213, -0.50381295527576719]]]]))        ref.setTaggedValue(1,numarray.array([[[[-12.0, -12.0, 4.0, -0.0], [8.0, -0.0, 12.0, -12.0], [-24.0, 12.0, 28.0, 24.0]], [[-12.0, 12.0, -0.0, 8.0], [28.0, -4.0, 8.0, 16.0], [12.0, -16.0, -8.0, -16.0]]], [[[-16.0, -0.0, 16.0, -0.0], [4.0, 20.0, 28.0, -28.0], [4.0, 4.0, -12.0, 12.0]], [[20.0, 4.0, -16.0, 12.0], [-16.0, 24.0, -4.0, 20.0], [-20.0, -12.0, -0.0, 28.0]]], [[[16.0, -16.0, 12.0, -16.0], [-28.0, -0.0, -0.0, 16.0], [28.0, -12.0, 16.0, -0.0]], [[-4.0, 28.0, -20.0, 8.0], [12.0, 28.0, 24.0, -20.0], [-12.0, -20.0, 28.0, 28.0]]]]))
16986        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
16987        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
16988        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16989     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16990     def test_generalTensorProduct_array_rank0_taggedData_rank0_offset0(self):     def test_generalTensorProduct_array_rank0_taggedData_rank0_offset0(self):
16991        arg0=numarray.array(-0.0102127620888)        arg0=numarray.array(-7.0)
16992        arg1=Data(-0.229005763458,self.functionspace)        arg1=Data(4.0,self.functionspace)
16993        arg1.setTaggedValue(1,0.607738889454)        arg1.setTaggedValue(1,5.0)
16994        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
16995        ref=Data(0.0023387813791681139,self.functionspace)        ref=Data(-28.0,self.functionspace)
16996        ref.setTaggedValue(1,-0.0062066926901362569)        ref.setTaggedValue(1,-35.0)
16997        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
16998        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16999        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17000     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17001     def test_generalTensorProduct_array_rank1_taggedData_rank1_offset1(self):     def test_generalTensorProduct_array_rank1_taggedData_rank1_offset1(self):
17002        arg0=numarray.array([-0.81150477379380859, -0.73587893035477503, 0.27818054841543649])        arg0=numarray.array([-2.0, -6.0, 6.0])
17003        arg1=Data(numarray.array([0.053483962561304388, -0.0042571315280595101, 0.83151744596001032]),self.functionspace)        arg1=Data(numarray.array([2.0, 1.0, -3.0]),self.functionspace)
17004        arg1.setTaggedValue(1,numarray.array([0.30066592295644945, 0.87745173727212933, -0.45405038562992828]))        arg1.setTaggedValue(1,numarray.array([0.0, 5.0, -1.0]))
17005        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17006        ref=Data(0.19104222158949891,self.functionspace)        ref=Data(-28.0,self.functionspace)
17007        ref.setTaggedValue(1,-1.0159980629408079)        ref.setTaggedValue(1,-36.0)
17008        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17009        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17010        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17011     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17012     def test_generalTensorProduct_array_rank2_taggedData_rank2_offset2(self):     def test_generalTensorProduct_array_rank2_taggedData_rank2_offset2(self):
17013        arg0=numarray.array([[-0.62605686995587884, -0.72929095095918695, 0.4214186314345667], [-0.85483526226718332, -0.33406596197755456, 0.93287608203809058]])        arg0=numarray.array([[6.0, -6.0, -1.0], [4.0, 4.0, -4.0]])
17014        arg1=Data(numarray.array([[-0.93868821320947071, 0.71743669634732843, -0.9363554874116542], [-0.72841321266812575, 0.62456893465181174, -0.48655379087510675]]),self.functionspace)        arg1=Data(numarray.array([[-3.0, 3.0, -7.0], [1.0, 0.0, 2.0]]),self.functionspace)
17015        arg1.setTaggedValue(1,numarray.array([[-0.57443404126190778, 0.10887243568313831, 0.00061471288556869119], [-0.085390418078078012, 0.38307914000270271, -0.78776523313850433]]))        arg1.setTaggedValue(1,numarray.array([[1.0, 7.0, 1.0], [7.0, -3.0, 5.0]]))
17016        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17017        ref=Data(-0.37001385036509371,self.functionspace)        ref=Data(-33.0,self.functionspace)
17018        ref.setTaggedValue(1,-0.50937855806283105)        ref.setTaggedValue(1,-41.0)
17019        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17020        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17021        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17022     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17023     def test_generalTensorProduct_array_rank3_taggedData_rank3_offset3(self):     def test_generalTensorProduct_array_rank3_taggedData_rank3_offset3(self):
17024        arg0=numarray.array([[[0.86883447826937132, 0.97325833302667242, -0.071522808192899578], [0.32113897493125232, 0.54800038651893357, -0.69343772406267701], [-0.10212755477106628, 0.42020867036993614, 0.64244693405959641], [-0.32714722303726496, 0.39492940125511034, -0.28509015499323831]], [[-0.22658357894136105, -0.55394354325330775, 0.25179354148662747], [0.25368652940318426, 0.95083690434953394, 0.26073816945524531], [-0.66933686181802154, -0.65545265142391451, -0.747708988224695], [-0.91415569034671429, -0.6807068113459025, 0.98006373141429948]]])        arg0=numarray.array([[[7.0, -3.0, -5.0], [0.0, -5.0, 5.0], [0.0, 2.0, -6.0], [-7.0, 3.0, 0.0]], [[-3.0, 4.0, 5.0], [5.0, -1.0, 6.0], [6.0, 2.0, 0.0], [-4.0, 5.0, -1.0]]])
17025        arg1=Data(numarray.array([[[-0.11198855242982608, 0.79843327477455861, -0.90494891601357152], [0.55551817149205518, 0.73698837688900976, -0.16791015090254402], [-0.76554690630950684, 0.67339179748468236, 0.82732663029929476], [-0.732763959593981, -0.12026973749619319, -0.0094463456757079012]], [[-0.24350864090647728, -0.2119063679675417, 0.070472523613789528], [0.57111505730538226, 0.93787468279206654, -0.39143680271366321], [0.34039581332629565, 0.67185435411187444, -0.43437841675905275], [0.23295582653355118, -0.99609080306487097, -0.56516572190345205]]]),self.functionspace)        arg1=Data(numarray.array([[[6.0, 1.0, -3.0], [6.0, 3.0, -1.0], [-3.0, -7.0, -7.0], [2.0, 0.0, 2.0]], [[4.0, 6.0, -1.0], [7.0, 5.0, 7.0], [2.0, 0.0, 2.0], [0.0, -3.0, 7.0]]]),self.functionspace)
17026        arg1.setTaggedValue(1,numarray.array([[[0.37662867699049896, 0.18670139809775721, -0.89991915637376607], [-0.13363681073289313, 0.35731067515164239, 0.43760700193387425], [0.98049776027741564, -0.61083838250889011, -0.56317193133285559], [0.68051023955452572, 0.75186330901953524, -0.93914363223259567]], [[-0.77507351317097828, -0.39401581699087473, -0.30219396622800621], [-0.49635536015912063, 0.99958173243776227, -0.60017647351193304], [0.40262135749217465, -0.85130379852049964, 0.91534014247622664], [0.92547162623221846, 0.14277112080183629, 0.78769427784298318]]]))        arg1.setTaggedValue(1,numarray.array([[[6.0, 6.0, -3.0], [5.0, 7.0, 5.0], [-3.0, 3.0, 7.0], [-2.0, -4.0, 7.0]], [[0.0, 3.0, 7.0], [-4.0, 4.0, 0.0], [2.0, -7.0, 7.0], [0.0, 4.0, -4.0]]]))
17027        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17028        ref=Data(3.2234503848434359,self.functionspace)        ref=Data(117.0,self.functionspace)
17029        ref.setTaggedValue(1,0.46485630943087264)        ref.setTaggedValue(1,40.0)
17030        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17031        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17032        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17033     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17034     def test_generalTensorProduct_array_rank4_taggedData_rank4_offset4(self):     def test_generalTensorProduct_array_rank4_taggedData_rank4_offset4(self):
17035        arg0=numarray.array([[[[0.63858810145799172, -0.55320224350092806], [-0.065465869663912546, 0.0071510902302500678], [-0.96026607434360045, 0.34535275577055824]], [[0.2357434014948816, 0.74902526877312803], [0.05916209892193014, 0.050231845572323852], [0.21241397832314424, 0.7980749192608414]]], [[[-0.99734371539495315, -0.63811234751267754], [-0.37921775291358562, 0.57918693993930326], [-0.61869100903708252, -0.60931759110848227]], [[0.55290353158673766, -0.30821017407074502], [-0.78705790903275452, -0.77101989637883461], [-0.56072604812729465, 0.18522694644085624]]], [[[-0.25495079078062188, 0.3640643797006422], [0.25992158376471108, 0.24306141621815192], [0.10818066453792441, 0.64722047258592963]], [[-0.2457097682304612, -0.81174030154562749], [0.98356321362361054, -0.87401304345915376], [-0.85393948464423475, 0.033089134015780841]]], [[[0.70735936535490218, 0.86654159429498745], [-0.10220632038685951, -0.67792783829704772], [0.99473473361256648, -0.63819896364880435]], [[-0.74696846320322585, -0.28249884289217331], [-0.59906245718739082, 0.35842438303043256], [0.18267370125116966, 0.37419240157333156]]]])        arg0=numarray.array([[[[6.0, -4.0], [0.0, 7.0], [0.0, -1.0]], [[4.0, 4.0], [7.0, -1.0], [6.0, 5.0]]], [[[4.0, -6.0], [-3.0, -4.0], [-4.0, -6.0]], [[-1.0, -1.0], [1.0, 3.0], [3.0, -5.0]]], [[[-3.0, 0.0], [6.0, 4.0], [-4.0, 3.0]], [[-3.0, 5.0], [-2.0, 6.0], [-2.0, -3.0]]], [[[5.0, 5.0], [0.0, 6.0], [1.0, 6.0]], [[2.0, -3.0], [-1.0, 4.0], [7.0, -5.0]]]])
17036        arg1=Data(numarray.array([[[[-0.27338610365113292, -0.69941687164857469], [0.96041442269000377, 0.14947987866291101], [0.24205187951344054, -0.66249364226801122]], [[-0.95036798683289914, -0.93371239428923913], [-0.20692236402935826, -0.17715629492434104], [0.73767702970444304, 0.31151235744893557]]], [[[0.75255271591089601, 0.91384191105966361], [0.61192355817863819, -0.24224148764215014], [-0.82142070491023556, -0.28210832813750275]], [[-0.79158161174906039, 0.21852307437879936], [-0.84107518537691095, -0.063759290970212934], [0.59934349486300476, 0.44818165737795246]]], [[[-0.80000689071967779, -0.1180797235748472], [0.13362776392406084, 0.48306899711621254], [-0.32295130096289459, 0.90514191780022246]], [[-0.93481762421204606, 0.97785675665689675], [0.14424912459319827, 0.20296806616924212], [-0.93265092738291844, -0.41649448774686815]]], [[[0.52903709102043295, 0.046338963704659841], [-0.80770405114770538, 0.4009150936706487], [-0.76170364921368239, -0.49565245476858744]], [[0.83314254291881329, 0.33180501826174469], [-0.22475028459570678, 0.11148664823922361], [0.96717010076239007, 0.61165031610874432]]]]),self.functionspace)        arg1=Data(numarray.array([[[[1.0, 0.0], [6.0, -1.0], [6.0, 5.0]], [[-1.0, 0.0], [-1.0, 1.0], [6.0, 7.0]]], [[[7.0, 4.0], [2.0, 4.0], [6.0, -6.0]], [[-3.0, -4.0], [-6.0, -3.0], [3.0, -1.0]]], [[[5.0, -6.0], [-1.0, 1.0], [-4.0, -7.0]], [[3.0, -3.0], [3.0, 0.0], [7.0, 7.0]]], [[[0.0, -1.0], [5.0, 7.0], [0.0, -5.0]], [[-4.0, 0.0], [0.0, -4.0], [0.0, 2.0]]]]),self.functionspace)
17037        arg1.setTaggedValue(1,numarray.array([[[[-0.13354686484545741, 0.86759773467117141], [-0.74796939099902371, 0.22742151340850003], [0.10014487420830642, -0.89440562345228503]], [[0.0096960607877947247, -0.91032884354826438], [-0.93275279094762453, 0.14969186045954119], [0.34168402124262554, 0.37730133502290908]]], [[[0.8152733448213465, 0.76167626660345911], [-0.39794288252225751, -0.64665109463402182], [0.92027071530795945, -0.17284316507878916]], [[0.95108208711677844, -0.70723370777515271], [-0.92065464061774849, 0.69296454624741188], [0.50467776595823799, 0.52314005463612068]]], [[[-0.35805631296738127, -0.79128285558381073], [0.10586782228350877, 0.53754619043445251], [0.8156391710668407, -0.16295842240024849]], [[-0.91682927048081386, 0.12878647356532835], [0.47464488857490461, -0.5292559411292701], [0.35780514690980803, 0.84457459679176394]]], [[[0.69231673242905645, 0.93345428019305321], [0.25973721344056133, -0.45384073586554519], [-0.38819559882810517, -0.34981743990222447]], [[0.2417716413724571, -0.34597744971571776], [0.4506352179368085, 0.55601884817522773], [-0.59878566046623516, 0.69774156231643536]]]]))        arg1.setTaggedValue(1,numarray.array([[[[3.0, -1.0], [5.0, 2.0], [-7.0, 0.0]], [[-6.0, 0.0], [1.0, 1.0], [-4.0, 7.0]]], [[[3.0, -3.0], [2.0, 1.0], [0.0, 6.0]], [[-4.0, 6.0], [0.0, 1.0], [1.0, 1.0]]], [[[7.0, -5.0], [4.0, -5.0], [-3.0, -7.0]], [[-5.0, 3.0], [0.0, -5.0], [0.0, -5.0]]], [[[-1.0, 0.0], [5.0, -1.0], [2.0, 0.0]], [[-7.0, 3.0], [7.0, -1.0], [7.0, -4.0]]]]))
17038        res=generalTensorProduct(arg0,arg1,4)        res=generalTensorProduct(arg0,arg1,axis_offset=4)
17039        ref=Data(-1.2279131717080729,self.functionspace)        ref=Data(-61.0,self.functionspace)
17040        ref.setTaggedValue(1,-0.38028445735883404)        ref.setTaggedValue(1,27.0)
17041        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17042        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17043        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17044     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17045     def test_generalTensorProduct_array_rank0_taggedData_rank1_offset0(self):     def test_generalTensorProduct_array_rank0_taggedData_rank1_offset0(self):
17046        arg0=numarray.array(0.69487888948)        arg0=numarray.array(-7.0)
17047        arg1=Data(numarray.array([-0.085411859244966859, -0.93976988791956928]),self.functionspace)        arg1=Data(numarray.array([6.0, -2.0]),self.functionspace)
17048        arg1.setTaggedValue(1,numarray.array([-0.17110762709715743, 0.13308663639577833]))        arg1.setTaggedValue(1,numarray.array([2.0, -1.0]))
17049        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17050        ref=Data(numarray.array([-0.05935089790057875, -0.65302625608444964]),self.functionspace)        ref=Data(numarray.array([-42.0, 14.0]),self.functionspace)
17051        ref.setTaggedValue(1,numarray.array([-0.11889907789885898, 0.09247909410334898]))        ref.setTaggedValue(1,numarray.array([-14.0, 7.0]))
17052        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17053        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17054        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17055     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17056     def test_generalTensorProduct_array_rank1_taggedData_rank2_offset1(self):     def test_generalTensorProduct_array_rank1_taggedData_rank2_offset1(self):
17057        arg0=numarray.array([-0.32613135700346207, 0.63748147302895064, 0.89226805858255775])        arg0=numarray.array([-4.0, -3.0, 3.0])
17058        arg1=Data(numarray.array([[-0.24713405338076999, -0.93371680139605906], [0.96171369766723491, 0.52912048660806432], [-0.52027265624071983, -0.15173627714919369]]),self.functionspace)        arg1=Data(numarray.array([[2.0, 0.0], [0.0, 1.0], [6.0, 1.0]]),self.functionspace)
17059        arg1.setTaggedValue(1,numarray.array([[-0.30174403541125216, -0.10659890826349483], [0.68506814425883755, 0.076052956971514041], [-0.6386793142448135, 0.60048580620335112]]))        arg1.setTaggedValue(1,numarray.array([[3.0, 5.0], [5.0, 1.0], [-7.0, 4.0]]))
17060        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17061        ref=Data(numarray.array([0.22945015589436679, 0.50642940128047687]),self.functionspace)        ref=Data(numarray.array([10.0, 0.0]),self.functionspace)
17062        ref.setTaggedValue(1,numarray.array([-0.03474671031435328, 0.61904190215291544]))        ref.setTaggedValue(1,numarray.array([-48.0, -11.0]))
17063        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17064        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17065        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17066     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17067     def test_generalTensorProduct_array_rank2_taggedData_rank3_offset2(self):     def test_generalTensorProduct_array_rank2_taggedData_rank3_offset2(self):
17068        arg0=numarray.array([[-0.66023662685401807, -0.6337825435454385, 0.29167431468884431], [0.94451796051735859, -0.46614319856030928, -0.73737604523225175]])        arg0=numarray.array([[3.0, 2.0, 6.0], [-1.0, 5.0, 0.0]])
17069        arg1=Data(numarray.array([[[-0.0060283542426766701, 0.71406187318960157], [0.92212413020320705, 0.89112593211943336], [0.64525035258227614, -0.51627877735664796]], [[-0.35826829628537338, -0.81040252251512035], [-0.87556249165537858, 0.677296367513883], [0.99375934249904518, -0.11604810185775438]]]),self.functionspace)        arg1=Data(numarray.array([[[6.0, 5.0], [0.0, -1.0], [-5.0, -6.0]], [[-3.0, -5.0], [1.0, 3.0], [-6.0, 3.0]]]),self.functionspace)
17070        arg1.setTaggedValue(1,numarray.array([[[0.61310976502454229, 0.62241916467380132], [-0.92023902084014209, -0.25732227835122035], [-0.81498828919605315, 0.70489623209589447]], [[-0.72779245586313923, 0.99173129910639624], [-0.47667764076270491, -0.52944752798384442], [0.6355937890106369, 0.63794148710475773]]]))        arg1.setTaggedValue(1,numarray.array([[[-6.0, 2.0], [2.0, -7.0], [-1.0, 1.0]], [[7.0, 2.0], [-6.0, 3.0], [-2.0, 6.0]]]))
17071        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17072        ref=Data(numarray.array([-1.0552707560523431, -2.1824008634573371]),self.functionspace)        ref=Data(numarray.array([-4.0, -3.0]),self.functionspace)
17073        ref.setTaggedValue(1,numarray.array([-0.99316188704323527, 0.67084618106069027]))        ref.setTaggedValue(1,numarray.array([-57.0, 11.0]))
17074        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17075        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17076        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17077     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17078     def test_generalTensorProduct_array_rank3_taggedData_rank4_offset3(self):     def test_generalTensorProduct_array_rank3_taggedData_rank4_offset3(self):
17079        arg0=numarray.array([[[-0.74685877344840801, -0.16360461431784912, 0.89253201770767854], [0.89860614630092472, 0.47676723892163486, 0.48020432075163932], [0.013580892482476958, 0.25313284444681972, -0.72832906654802665], [0.26289995867973825, -0.1360145930930865, 0.94781534365153175]], [[0.47953323688846838, -0.8523199123772367, -0.78669408239144056], [0.47064706798376865, -0.52917691133499445, 0.38705915220782594], [-0.51179429530166454, 0.89291169791364888, -0.37093149308364692], [-0.59098447214724015, 0.20392341234660272, 0.75021054578123447]]])        arg0=numarray.array([[[-1.0, -2.0, 6.0], [-4.0, -2.0, 0.0], [-4.0, 1.0, 6.0], [6.0, -1.0, -6.0]], [[3.0, 0.0, 5.0], [4.0, -5.0, 6.0], [-1.0, 4.0, -7.0], [-2.0, 3.0, -7.0]]])
17080        arg1=Data(numarray.array([[[[-0.948726908067689, -0.61359244635228216], [0.51406989321292351, -0.20831361699124851], [-0.90887786246436675, 0.71557916436556557]], [[-0.33948934639119055, -0.11879393723738341], [0.66775794225840568, 0.38619015351541419], [-0.50169383818448554, 0.77809610456164169]], [[0.46281994107991742, -0.12121076996123858], [0.45900624905883958, 0.13335478380393551], [0.64177917199497481, -0.36723521898217437]], [[-0.21115889555960488, -0.92200311409040769], [-0.35381854759532994, 0.28459921984618863], [-0.56501090309887148, -0.42917182777686236]]], [[[-0.28147914690114639, -0.43376256312999462], [-0.18080881572087293, -0.7480329684389726], [-0.9362532384762221, -0.17001401319349574]], [[0.68258052502730049, -0.15250537079951965], [-0.491822032621269, 0.31288325262049366], [0.7292840447092217, 0.78949294782556589]], [[-0.27348585811977233, -0.93508885485956417], [-0.089855343129160659, 0.17963413276601603], [0.39170832397406197, 0.022221855343987906]], [[-0.36665620287309819, 0.59902334934212997], [-0.75219744958946966, -0.57660766622631288], [0.57891388936935617, 0.23998616632484904]]]]),self.functionspace)        arg1=Data(numarray.array([[[[5.0, -7.0], [-5.0, 0.0], [-3.0, 1.0]], [[-5.0, -7.0], [6.0, 6.0], [7.0, 6.0]], [[-4.0, 0.0], [-6.0, -7.0], [0.0, -3.0]], [[-4.0, 5.0], [-3.0, 2.0], [-1.0, -5.0]]], [[[5.0, -1.0], [7.0, 1.0], [-7.0, -5.0]], [[2.0, -4.0], [2.0, -6.0], [1.0, 1.0]], [[0.0, 5.0], [0.0, -1.0], [0.0, -5.0]], [[3.0, 7.0], [0.0, 7.0], [1.0, 0.0]]]]),self.functionspace)
17081        arg1.setTaggedValue(1,numarray.array([[[[-0.35731026425218015, 0.99152998811224546], [0.79800053990160791, 0.27164889730872921], [-0.95279011187792828, 0.31036848513884108]], [[-0.21537138768454889, 0.10894661998552935], [0.90897136217505681, -0.56164069232482583], [0.69957436310479881, 0.16551674625297719]], [[-0.10499888039026151, -0.73434354160487425], [0.40904030171036698, -0.72447746397597257], [-0.30469361993786692, -0.56304032593086295]], [[-0.69946972076599057, 0.88812864772400646], [0.044511443534362538, 0.8450203105358105], [0.25449548459351878, -0.92842541838005133]]], [[[-0.2086920545125277, 0.41567438517325517], [-0.69642364513634414, 0.52837637336666488], [0.90713301716266415, -0.49475890473689677]], [[-0.88844899113900211, -0.026939483778334772], [-0.61677873926225968, 0.27404045611980465], [0.99954591637071166, -0.60794701713577792]], [[-0.93898753827103998, 0.72421176195554837], [0.48954923821785079, 0.14541684755214557], [-0.047368487689250838, 0.97197315297147746]], [[0.25890938559966403, 0.47985481856960965], [0.04573552164070005, 0.48384639750352409], [0.1800915705972943, -0.29781619273194293]]]]))        arg1.setTaggedValue(1,numarray.array([[[[2.0, 1.0], [3.0, -3.0], [-6.0, -7.0]], [[2.0, 3.0], [1.0, -5.0], [-3.0, -2.0]], [[0.0, -5.0], [0.0, 5.0], [-5.0, -4.0]], [[3.0, 4.0], [-4.0, 1.0], [-5.0, -5.0]]], [[[1.0, -5.0], [-7.0, 0.0], [-7.0, -1.0]], [[7.0, 1.0], [7.0, -2.0], [3.0, -6.0]], [[7.0, 6.0], [0.0, 1.0], [0.0, 0.0]], [[0.0, -1.0], [7.0, 6.0], [-6.0, -5.0]]]]))
17082        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17083        ref=Data(numarray.array([0.72928212095209821, 2.1644559316464433]),self.functionspace)        ref=Data(numarray.array([-39.0, 87.0]),self.functionspace)
17084        ref.setTaggedValue(1,numarray.array([1.2386553559099351, -2.4075383396127519]))        ref.setTaggedValue(1,numarray.array([3.0, 26.0]))
17085        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17086        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17087        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17088     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17089     def test_generalTensorProduct_array_rank0_taggedData_rank2_offset0(self):     def test_generalTensorProduct_array_rank0_taggedData_rank2_offset0(self):
17090        arg0=numarray.array(-0.0076382108537)        arg0=numarray.array(-6.0)
17091        arg1=Data(numarray.array([[-0.075123626895323259, 0.11399208783031467, 0.60140159468235499, -0.98165605446860571, 0.060573134459918299], [-0.97590893810982315, -0.13712945450626957, -0.8678711738674707, -0.93647549303944011, 0.0036135746306817929], [0.46790176650093729, -0.0031086896429830535, 0.79123192468144699, -0.86737865848473561, -0.69107968660714869], [0.48522695497603041, 0.4362608490834381, -0.7023029697526848, 0.93155259344417329, -0.32450611701628529]]),self.functionspace)        arg1=Data(numarray.array([[1.0, -3.0, -2.0, 0.0, 5.0], [0.0, 2.0, -6.0, 5.0, 2.0], [-7.0, -2.0, -1.0, 7.0, -7.0], [-3.0, 6.0, 4.0, -4.0, -2.0]]),self.functionspace)
17092        arg1.setTaggedValue(1,numarray.array([[-0.7082078622672543, -0.52202390988029146, -0.64107419017997391, -0.41105073481237553, -0.97052336964914154], [-0.74928802689753127, 0.70062301179706465, -0.80287402010931563, 0.46013161789334478, 0.36560859855389038], [0.24429050931245033, -0.91368022088344514, 0.8183212394058752, 0.9809479061635149, 0.75105884497194331], [-0.15985102541033358, 0.70866470229741796, -0.9309045534066176, 0.89989361052339345, 0.66014865163971725]]))        arg1.setTaggedValue(1,numarray.array([[1.0, -3.0, 7.0, 5.0, 7.0], [-3.0, 2.0, 0.0, 5.0, -4.0], [4.0, 0.0, 4.0, -3.0, -2.0], [0.0, 0.0, 0.0, 6.0, -1.0]]))
17093        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17094        ref=Data(numarray.array([[0.00057381010232110733, -0.00087069560250134211, -0.0045936321879347713, 0.0074980959298416383, -0.00046267037307432907], [0.0074541982432925133, 0.0010474236877716389, 0.0066289830198471809, 0.0071529972751571622, -2.7601244964725752e-05], [-0.0035739323513524885, 2.3744826971815454e-05, -0.0060435962748951371, 0.00662522108350516, 0.0052786123630137651], [-0.0037062657940053292, -0.0033322523525131458, 0.0053643381661501385, -0.007115395130036924, 0.0024786461450855735]]),self.functionspace)        ref=Data(numarray.array([[-6.0, 18.0, 12.0, -0.0, -30.0], [-0.0, -12.0, 36.0, -30.0, -12.0], [42.0, 12.0, 6.0, -42.0, 42.0], [18.0, -36.0, -24.0, 24.0, 12.0]]),self.functionspace)
17095        ref.setTaggedValue(1,numarray.array([[0.0054094409802448503, 0.0039873286943381357, 0.0048966598374591023, 0.0031396921840649186, 0.0074130621358227946], [0.0057232199395955826, -0.0053515062930597629, 0.0061325210545520852, -0.0035145823179231197, -0.0027925955656800797], [-0.0018659424196860639, 0.006978882179962214, -0.0062505101726425382, -0.0074926869437716651, -0.0057367458214314833], [0.0012209758372641567, -0.0054129304207216509, 0.007110445263588434, -0.0068735771430743454, -0.0050423545960093814]]))        ref.setTaggedValue(1,numarray.array([[-6.0, 18.0, -42.0, -30.0, -42.0], [18.0, -12.0, -0.0, -30.0, 24.0], [-24.0, -0.0, -24.0, 18.0, 12.0], [-0.0, -0.0, -0.0, -36.0, 6.0]]))
17096        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17097        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17098        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17099     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17100     def test_generalTensorProduct_array_rank1_taggedData_rank3_offset1(self):     def test_generalTensorProduct_array_rank1_taggedData_rank3_offset1(self):
17101        arg0=numarray.array([0.52740927894754619, 0.92711635622544497, 0.21953387453373652])        arg0=numarray.array([2.0, 1.0, -3.0])
17102        arg1=Data(numarray.array([[[-0.22392083741334945, -0.30235339921774051, -0.44301386367935147, -0.44316180861534993, -0.34678833213783067], [0.24961880731273012, -0.34290109081328413, 0.30476011903078648, -0.54998551867196577, -0.60074692863908941], [-0.054957962474853961, -0.31713965784080411, 0.67226015328839228, -0.40104591242338672, -0.27476582162654783], [-0.55431697141969027, -0.98638218261212662, -0.50493365105734789, -0.61607491179943263, -0.45151520465277417]], [[0.62037337363985312, -0.4699399301026328, -0.43684235853569309, -0.81141634353422165, -0.10467810077998818], [-0.95312119770637804, 0.80983653946537681, 0.42287272543192134, -0.9508587478867887, 0.61493229981631248], [-0.75010300220466064, -0.54128732884328623, -0.27407300025939274, 0.74075697682554398, 0.38349161839485557], [0.081815350248955809, 0.0010176467460347727, 0.31177535891296349, -0.3669373686248969, -0.87042994098830673]], [[0.49295499304477453, 0.055622465425793299, -0.010386088290052387, 0.81505746647294064, -0.77343467126360155], [-0.58146206038521808, 0.95689279311332753, 0.74334666823582407, 0.44198050892095098, -0.12228012023773438], [-0.0086209706464153157, -0.47622892188030197, 0.21304959604044371, -0.24780747212868359, -0.41185326075899065], [0.75057587354167299, -0.94687789776507936, 0.86807083386192563, 0.61905742512961437, -0.87380510227827601]]]),self.functionspace)        arg1=Data(numarray.array([[[-7.0, 4.0, 6.0, 0.0, 0.0], [4.0, -4.0, -1.0, 7.0, -7.0], [0.0, 1.0, -3.0, 3.0, -4.0], [3.0, -6.0, -6.0, -7.0, -6.0]], [[-7.0, 0.0, 0.0, 1.0, 6.0], [-6.0, -1.0, 5.0, -7.0, 5.0], [-4.0, 2.0, 6.0, 7.0, 0.0], [-1.0, -2.0, -1.0, -4.0, 3.0]], [[-3.0, 4.0, 3.0, -2.0, 0.0], [-3.0, 0.0, 6.0, -2.0, 7.0], [0.0, 3.0, 0.0, 4.0, 6.0], [-1.0, 2.0, 4.0, -3.0, -6.0]]]),self.functionspace)
17103        arg1.setTaggedValue(1,numarray.array([[[-0.47772886840682971, 0.82937879318125907, 0.76787340171351004, 0.16621086364583793, 0.18152740122415612], [0.91497129773452923, -0.30525725027576911, -0.36759867967555082, 0.31289389636080789, 0.077081290109164868], [-0.012168268656227443, 0.12902953418448226, 0.1653049562908786, 0.96836951312686659, -0.35988740090935911], [-0.7027905520405886, -0.15582576511362611, 0.20893018306932798, 0.1043578739462987, 0.95038966575449146]], [[-0.34180614792928532, 0.55817412305655556, 0.80340700894833295, -0.38906512510488467, -0.055328925918995742], [0.87269858310438142, -0.77333065440838111, 0.81333771330487292, 0.32356542101737107, -0.23253008388033614], [-0.43032440113284087, 0.24272854626442864, -0.85853886191583628, 0.18931503172877528, 0.75173310356815737], [0.077368186035134068, 0.97387660394662023, -0.84595593322080997, -0.7471304205282947, -0.65158921764464806]], [[-0.67980354539778176, -0.16189355298404062, 0.88985599897969214, 0.18548328718475338, -0.18500125474439311], [0.089257110145460006, -0.45151890952274298, 0.63995871137991989, -0.26764206985479366, -0.61832181853185442], [-0.83242006142831837, -0.52355863033399275, 0.92733756893871022, 0.53040270974090964, -0.70935580393293662], [-0.16990796114502094, 0.45594468811813837, -0.40363535084664948, 0.23305336309042524, 0.11799611368699803]]]))        arg1.setTaggedValue(1,numarray.array([[[6.0, 4.0, -1.0, 0.0, 5.0], [-6.0, 3.0, 3.0, 1.0, 3.0], [2.0, 3.0, -1.0, -6.0, -6.0], [-3.0, -2.0, 4.0, -6.0, 5.0]], [[-3.0, -6.0, 7.0, -6.0, 6.0], [5.0, -7.0, -1.0, -4.0, -2.0], [4.0, -7.0, -3.0, 0.0, -1.0], [-6.0, -1.0, 0.0, 2.0, -6.0]], [[5.0, -3.0, 6.0, 0.0, -3.0], [-7.0, 1.0, 7.0, -5.0, 0.0], [6.0, -6.0, 7.0, -7.0, -1.0], [7.0, -3.0, 2.0, 0.0, -2.0]]]))
17104        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17105        ref=Data(numarray.array([[0.56528069386063218, -0.58294196856431812, -0.64093341630099909, -0.80707229015567794, -0.44974327365320321], [-0.87965359569295198, 0.78003386693678067, 0.71597530917911589, -1.0745944698684531, 0.22642966009329638], [-0.72631069664728998, -0.7736471146410886, 0.14723028465734023, 0.42085043921217474, 0.12021156595197509], [-0.051722735148578641, -0.72715541236178716, 0.2133162954231993, -0.52921318607469647, -1.2369529634488794]]),self.functionspace)        ref=Data(numarray.array([[-12.0, -4.0, 3.0, 7.0, 6.0], [11.0, -9.0, -15.0, 13.0, -30.0], [-4.0, -5.0, 0.0, 1.0, -26.0], [8.0, -20.0, -25.0, -9.0, 9.0]]),self.functionspace)
17106        ref.setTaggedValue(1,numarray.array([[-0.71809261466547358, 0.91937331144502155, 1.3451888710559841, -0.23232762467601459, 0.0038288413493277468], [1.3112524420666287, -0.97708670036676659, 0.70067635800104822, 0.40624943781746714, -0.310671640974157], [-0.58812284989616681, 0.17815012428895433, -0.50520004402371166, 0.80268549100072839, 0.3514084731578524], [-0.3362295006025029, 0.92080827799982512, -0.76271949760214919, -0.58647441428250191, -0.076950548866088903]]))        ref.setTaggedValue(1,numarray.array([[-6.0, 11.0, -13.0, -6.0, 25.0], [14.0, -4.0, -16.0, 13.0, 4.0], [-10.0, 17.0, -26.0, 9.0, -10.0], [-33.0, 4.0, 2.0, -10.0, 10.0]]))
17107        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17108        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17109        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17110     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17111     def test_generalTensorProduct_array_rank2_taggedData_rank4_offset2(self):     def test_generalTensorProduct_array_rank2_taggedData_rank4_offset2(self):
17112        arg0=numarray.array([[-0.76138663657763317, 0.80092007493119932, -0.98971611690740446], [0.75715842943795186, 0.01562270901778029, -0.38091063327663566]])        arg0=numarray.array([[-4.0, 6.0, 1.0], [0.0, -2.0, -7.0]])
17113        arg1=Data(numarray.array([[[[-0.83560266279859596, 0.94972397975532652, 0.51790321138093542, -0.35108261741873115, -0.7558030663647346], [0.76866496798455497, 0.32329226903774777, 0.18277980840079411, -0.41611349763614047, -0.4525356521615802], [-0.62407471049943641, 0.32997092851807164, 0.39298327813600942, 0.61459204766562525, -0.40374203768111694], [-0.36958010356839588, 0.130290489890591, 0.52784207925456461, -0.013331249269650014, -0.48885545816485432]], [[-0.60656815128196495, -0.92171018240763503, 0.83493650000587016, -0.11537767407957666, -0.73241479886343486], [0.69662876488115466, -0.087621660009356006, -0.90948252971332599, -0.71217814456830242, 0.20256163098854674], [-0.97342367325530232, -0.57072983710846326, 0.03503208896765031, 0.70699915978400285, 0.72440201922663094], [0.74547327019524356, 0.97297254530034283, -0.58951415091607595, -0.41980643030845344, 0.29443960392186463]], [[0.81240516981927713, 0.17076029887909439, 0.60923893487117731, -0.65823188302962343, 0.19929739541515312], [-0.54576807848190523, -0.87664684771412693, 0.7118913928917272, 0.32860264688503271, -0.40950453449411039], [-0.43908673805979204, 0.21041762838464684, -0.09981594555110318, -0.75062986784109698, -0.17311623787883579], [0.22543750122783401, 0.69863807744901796, 0.75262958723213336, -0.53295555007159501, 0.85046365633145293]]], [[[-0.074036833028703342, -0.92720818819344886, 0.72032563471394706, 0.64441117277034921, 0.045442245710698215], [-0.78568537805326177, 0.35074022872924404, 0.31824612766681404, 0.29228555462829897, 0.83224024774781702], [-0.0046869498532340348, 0.59996749812581229, -0.18882966967554982, 0.87421098203459002, -0.61295306962921736], [-0.97960434870771862, -0.25937841927809524, -0.28323316224046646, 0.16847602797927097, -0.77946458750487246]], [[0.56763161211707347, -0.71441422905678742, -0.27214555251106165, 0.84727293819297866, 0.62628776695923127], [0.20926041225147207, -0.33859524655723838, -0.87617609217009451, -0.54354868398764422, 0.75200065121873916], [0.9834287056106954, 0.14876321381519064, 0.71015677349810402, -0.17349392311933332, 0.34178317580874418], [-0.33072036523627535, 0.054308903287552113, 0.41789047604471818, 0.4908857254600163, 0.60690408590192035]], [[-0.37349313311496157, 0.17229126932529448, -0.45309742100365535, -0.21421206402079895, -0.25944799274278929], [-0.88837643198407057, 0.12396242411471858, -0.48501999385140415, 0.76676098267292869, -0.31038593086399779], [0.76221633431653291, -0.043016731102265116, 0.83645122278429795, 0.87282057354773968, -0.97056738175325097], [0.89228999713355339, -0.45326930544372179, -0.024369698992643629, -0.74354718806835263, 0.14533480220560291]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-1.0, 0.0, -6.0, 5.0, 1.0], [1.0, -7.0, -6.0, 0.0, 7.0], [5.0, -5.0, -2.0, 5.0, -5.0], [-5.0, 6.0, -3.0, 4.0, -5.0]], [[0.0, 0.0, 3.0, -1.0, -4.0], [-6.0, -2.0, 7.0, 4.0, 0.0], [7.0, 2.0, 7.0, -6.0, 3.0], [-1.0, 6.0, 2.0, 0.0, 0.0]], [[6.0, 7.0, 3.0, -3.0, -3.0], [4.0, -4.0, -4.0, -4.0, -1.0], [-5.0, 0.0, -5.0, 6.0, -1.0], [6.0, -5.0, -4.0, -4.0, 4.0]]], [[[-5.0, 1.0, -2.0, 0.0, -7.0], [0.0, 1.0, -7.0, 5.0, 1.0], [-6.0, -1.0, 4.0, 6.0, -6.0], [-1.0, 0.0, 6.0, -7.0, 3.0]], [[-5.0, 0.0, 2.0, -6.0, 0.0], [-2.0, 6.0, 2.0, 0.0, -1.0], [0.0, -5.0, 5.0, 1.0, 5.0], [-6.0, 7.0, 3.0, 0.0, -1.0]], [[1.0, 3.0, 3.0, -7.0, 5.0], [0.0, 0.0, 2.0, -7.0, 5.0], [-1.0, -6.0, -2.0, -2.0, 7.0], [1.0, -7.0, 3.0, -3.0, 2.0]]]]),self.functionspace)
17114        arg1.setTaggedValue(1,numarray.array([[[[-0.54616467991324735, 0.57976852853613936, 0.87163217022266126, 0.71011664635055594, 0.50754000460374971], [-0.78853022483669521, 0.72142688375821606, 0.10151618279453345, -0.66935246313485708, 0.70871039280972581], [0.0034131995502404422, 0.93219696292007304, 0.14725236304446976, -0.28615780109996458, 0.67600289302425476], [0.91233652376908148, -0.51809013667738624, 0.06302259539682864, 0.47885132598761948, -0.52093582320586607]], [[0.94999034900719725, 0.1975211900443965, -0.048413626501447871, 0.82151298158854247, -0.34962118595097302], [0.75566873370493193, 0.10471544578061809, -0.3099457447634919, -0.36447232118223027, -0.43103358490236943], [-0.8494665093926812, 0.81143768027144403, -0.31237288709870081, -0.22268973845108597, 0.87542232699259093], [-0.5643206003802943, 0.60819778774195354, 0.90949825644039461, -0.53257175928094114, -0.78146968055884325]], [[-0.090586768142021823, -0.52471831864791896, 0.38046081371520724, -0.87361293455675804, 0.11260402434948946], [0.89892173200322256, -0.63820307236641494, 0.66205833636038491, -0.7957983919689875, -0.70891832300808733], [0.65933150514376959, 0.93240803419396845, -0.78634040125152627, 0.12092377170633051, 0.62601033740309497], [-0.11408834710747562, 0.41385372129246845, 0.74295472908869642, 0.81468219143823251, 0.48346774551718208]]], [[[-0.066272271442725961, 0.3753925200719368, 0.75857190268529484, 0.046011153717615549, 0.28863549112330622], [0.030112130465934195, 0.75777389859688893, -0.21405833739685987, -0.94453677876875797, 0.9240945675018446], [0.36824884990768991, -0.76613538827943906, 0.40520295835890252, 0.9447577968236347, -0.047156645282012466], [-0.95076389050031174, -0.55975642463374919, -0.38375619207501988, -0.72414130365717311, -0.54397128836307385]], [[-0.82355282945908725, -0.3641967149858707, -0.69125020596022768, -0.0021277378568234084, 0.023294816806539664], [-0.32021514108363802, -0.63832842229099795, 0.12688907386527437, -0.99733790248339216, 0.37167480564299438], [0.61512520175202301, -0.80837769263390458, -0.98056282722667731, -0.89126884506029591, 0.19639999711538403], [-0.82428132190749781, -0.48132118639227772, -0.42991106475729324, 0.89257199639701001, -0.23988407656889144]], [[0.29537576510772245, -0.6825254346998586, -0.53347892938144836, -0.027034592242984434, 0.79998183116566612], [-0.78222470426821711, 0.01719557578261921, -0.56604241752467988, 0.46161110357886903, -0.79642373068196659], [-0.12251174175032631, 0.66818100405956393, 0.18270975218241503, -0.5806255802463951, -0.31811949714885945], [-0.94534450094670319, -0.3659484714049297, 0.26582629308042072, -0.94695118235117159, 0.86122803933277337]]]]))        arg1.setTaggedValue(1,numarray.array([[[[4.0, -4.0, -3.0, 0.0, -6.0], [-5.0, -4.0, -4.0, -4.0, 6.0], [0.0, 0.0, -4.0, 0.0, 4.0], [0.0, -4.0, 1.0, 4.0, 7.0]], [[-3.0, 3.0, 0.0, 4.0, 7.0], [-6.0, -3.0, -3.0, 3.0, 6.0], [6.0, 5.0, 0.0, 3.0, -4.0], [-6.0, -4.0, 6.0, -7.0, -6.0]], [[-3.0, 4.0, 5.0, 6.0, -1.0], [0.0, 6.0, -2.0, -1.0, 4.0], [1.0, 5.0, 3.0, 5.0, -3.0], [-4.0, 2.0, 4.0, -2.0, -3.0]]], [[[0.0, -1.0, -7.0, -1.0, 4.0], [1.0, -6.0, -3.0, -7.0, -2.0], [-7.0, -5.0, -2.0, 2.0, -1.0], [0.0, 1.0, -7.0, -6.0, -5.0]], [[-3.0, 1.0, -2.0, -2.0, 0.0], [-6.0, 7.0, -5.0, 5.0, -1.0], [5.0, 2.0, 6.0, -6.0, -2.0], [1.0, -2.0, 4.0, 6.0, 6.0]], [[-3.0, 4.0, 2.0, 5.0, -2.0], [1.0, -4.0, 6.0, 3.0, -6.0], [5.0, 0.0, -3.0, -4.0, -4.0], [-7.0, 4.0, -2.0, -6.0, -6.0]]]]))
17115        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17116        ref=Data(numarray.array([[-0.55856856111300834, -2.4091597125703794, 0.38515782812896204, 1.4091177241855979, -0.065377415116906423], [0.25962112825162037, 0.7643606944057818, -1.1601355373594284, -0.65805049511175451, 1.6721988202763136], [-0.14842244482558523, -0.44361809414647629, -0.62285743148322625, 1.1679572576959438, 0.96986427396587116], [-0.43142645493959875, -0.03426856532053163, -1.817576373339632, 0.61985057479541072, -0.86974325330188351]]),self.functionspace)        ref=Data(numarray.array([[13.0, -14.0, 20.0, 32.0, -66.0], [-32.0, 0.0, 44.0, 69.0, -62.0], [24.0, 84.0, 49.0, -38.0, -22.0], [25.0, 42.0, -7.0, 1.0, 12.0]]),self.functionspace)
17117        ref.setTaggedValue(1,numarray.array([[1.0908075096580985, 0.77461592037346438, -0.31220502451238352, 1.0270239706055124, -0.86371368384610814], [0.63168404145424284, 0.72345627877112817, -0.92526678767769799, 0.09875963454669584, 0.82566064277544293], [-1.0004058938966083, -1.8299170077110427, 0.63783977134757019, 0.8424135912158347, -0.34459042594026901], [-1.406366087735972, 0.18003685414173182, -0.45340009253688762, -1.77108403392749, -1.4514280038897776]]))        ref.setTaggedValue(1,numarray.array([[-10.0, 8.0, 7.0, -1.0, 79.0], [-11.0, 18.0, -36.0, 2.0, 60.0], [-8.0, 31.0, 28.0, 63.0, -11.0], [7.0, -30.0, 42.0, -30.0, -37.0]]))
17118        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17119        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17120        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17121     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17122     def test_generalTensorProduct_array_rank0_taggedData_rank3_offset0(self):     def test_generalTensorProduct_array_rank0_taggedData_rank3_offset0(self):
17123        arg0=numarray.array(0.84121522304)        arg0=numarray.array(2.0)
17124        arg1=Data(numarray.array([[[-0.24663267372525488, -0.10945073511887027], [0.07976282727299, 0.88633763806907062]], [[0.53808827163431161, 0.6076693685094583], [0.96671768664174396, 0.58574426669171742]], [[-0.21762565032479775, 0.64396881762222979], [0.60007030508547787, 0.99010151798972967]], [[0.36959047235068376, -0.53305754128374727], [-0.8905661243165508, 0.74527279917455913]], [[-0.69200858827200951, -0.057174151772140247], [0.96690253534400239, 0.050290458877692013]], [[-0.22433285107592305, 0.025151062814394942], [-0.61874077043938303, -0.98454723496273244]]]),self.functionspace)        arg1=Data(numarray.array([[[3.0, -3.0], [-7.0, 2.0]], [[-7.0, 3.0], [0.0, -1.0]], [[-1.0, 0.0], [-7.0, 3.0]], [[-2.0, -7.0], [1.0, 2.0]], [[-6.0, -7.0], [0.0, 3.0]], [[1.0, -5.0], [2.0, -2.0]]]),self.functionspace)
17125        arg1.setTaggedValue(1,numarray.array([[[-0.4779573584418142, -0.0045526128203858818], [0.54735205145689259, -0.93002745869130887]], [[-0.62140461535825908, -0.43216463942865202], [-0.92150865752954636, -0.16114691786312174]], [[-0.46941067876706266, -0.37180115368988087], [0.89405889226075397, 0.97023721849019973]], [[-0.70666390709389337, 0.48146728631103541], [-0.68371114216712026, -0.22462783564116995]], [[-0.66876253568521737, 0.67427863310824754], [0.59421080091382783, 0.96155507641187588]], [[-0.14702837535604285, -0.39837316006264301], [-0.71270454603859346, 0.38307482381540092]]]))        arg1.setTaggedValue(1,numarray.array([[[0.0, 3.0], [2.0, 0.0]], [[0.0, -5.0], [0.0, -3.0]], [[-7.0, 7.0], [-7.0, -1.0]], [[0.0, -1.0], [-7.0, -3.0]], [[0.0, 0.0], [-2.0, 5.0]], [[7.0, -6.0], [6.0, -1.0]]]))
17126        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17127        ref=Data(numarray.array([[[-0.20747115963676183, -0.092071624554921294], [0.067097704534755748, 0.74560071389709193]], [[0.45264804543810921, 0.51118072336530918], [0.81321763438512584, 0.49273699394952181]], [[-0.18307000997721745, 0.54171637254694138], [0.50478827553220984, 0.83288846928805338]], [[0.31090513163196937, -0.44841611848420471], [-0.74915778089888785, 0.62693482398333233]], [[-0.58212815892889014, -0.048095766835128409], [0.81337313192742489, 0.042305099581585716]], [[-0.18871220935304991, 0.021157456915106333], [-0.52049415520915721, -0.82821612185267013]]]),self.functionspace)        ref=Data(numarray.array([[[6.0, -6.0], [-14.0, 4.0]], [[-14.0, 6.0], [0.0, -2.0]], [[-2.0, 0.0], [-14.0, 6.0]], [[-4.0, -14.0], [2.0, 4.0]], [[-12.0, -14.0], [0.0, 6.0]], [[2.0, -10.0], [4.0, -4.0]]]),self.functionspace)
17128        ref.setTaggedValue(1,numarray.array([[[-0.40206500588527871, -0.0038297272091160424], [0.46044087804775585, -0.78235325609640927]], [[-0.52273502210673373, -0.36354347354700972], [-0.77518711087708303, -0.13555924045244758]], [[-0.39487540883643046, -0.31276479042779259], [0.75209595046409805, 0.81617831815402131]], [[-0.5944564362203647, 0.40501761064064024], [-0.5751482209531027, -0.18896035485989746]], [[-0.5625732256172904, 0.56721345074131546], [0.49985917142355091, 0.80887476806913838]], [[-0.12368250756835435, -0.33511756669527815], [-0.59953791365753517, 0.32224837335691225]]]))        ref.setTaggedValue(1,numarray.array([[[0.0, 6.0], [4.0, 0.0]], [[0.0, -10.0], [0.0, -6.0]], [[-14.0, 14.0], [-14.0, -2.0]], [[0.0, -2.0], [-14.0, -6.0]], [[0.0, 0.0], [-4.0, 10.0]], [[14.0, -12.0], [12.0, -2.0]]]))
17129        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17130        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
17131        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17132     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17133     def test_generalTensorProduct_array_rank1_taggedData_rank4_offset1(self):     def test_generalTensorProduct_array_rank1_taggedData_rank4_offset1(self):
17134        arg0=numarray.array([0.42093743503457759, 0.73232104743133641, -0.14878028119271147])        arg0=numarray.array([0.0, 2.0, -3.0])
17135        arg1=Data(numarray.array([[[[0.78710133320156928, 0.904724510416687], [0.93931026404524087, 0.33920904332744928]], [[-0.2134005921995239, 0.72390751268435372], [0.70865659976324258, 0.98172103290744883]], [[-0.79074618041986167, -0.93341388720727814], [0.38353829871662426, 0.37510038487326991]], [[0.69463855148963516, 0.52754187859703827], [0.80642127398576968, -0.67835838831204365]], [[0.24239534106723437, -0.94389821715748812], [-0.15941542047845481, 0.10399532721392379]], [[-0.85811785598565238, 0.87283109258759617], [-0.95715898043356629, 0.96715075002913675]]], [[[0.35114265767724029, -0.45652844828617067], [-0.49969511579070458, -0.071084423661412321]], [[0.90148295948000401, 0.76115766848635191], [0.13596698489371928, 0.55564758782612578]], [[-0.027187721926189568, 0.71252579494387103], [-0.084338009995321039, -0.031439903447676221]], [[0.26131987950229241, 0.21349573526510168], [-0.80575084479471548, -0.42163110489689082]], [[0.76330786219251001, -0.097052741051362412], [-0.049644380109131525, -0.21398058844109635]], [[0.61692348762788818, 0.78743716730880053], [-0.93025574372390896, -0.63110722448927659]]], [[[-0.45922726881258291, 0.81781316410212512], [-0.094373391050986521, -0.80898932595614026]], [[-0.27291296745026328, -0.14257988381332853], [0.52608589713760812, -0.38588992920541965]], [[-0.41893846259883638, 0.8437687258479718], [0.79421526301617784, -0.68484288241585789]], [[0.14738914609420384, -0.18098211922538043], [0.55329310979645951, -0.044039760411740403]], [[0.073553284988028045, -0.82310691807778436], [0.38518083347142995, 0.076513809513227393]], [[0.9563736030517862, -0.25691712039803405], [-0.3159249966356894, -0.40807898933024167]]]]),self.functionspace)        arg1=Data(numarray.array([[[[0.0, -6.0], [-1.0, -1.0]], [[-2.0, -3.0], [2.0, 2.0]], [[-1.0, 4.0], [4.0, -6.0]], [[5.0, 6.0], [-6.0, 7.0]], [[-4.0, 0.0], [3.0, -3.0]], [[-6.0, 2.0], [0.0, -5.0]]], [[[-1.0, 3.0], [3.0, 3.0]], [[0.0, 7.0], [-1.0, 3.0]], [[4.0, -6.0], [-1.0, 3.0]], [[-3.0, -3.0], [4.0, 3.0]], [[-2.0, -1.0], [6.0, 6.0]], [[-1.0, 3.0], [-2.0, -1.0]]], [[[1.0, 5.0], [7.0, -3.0]], [[0.0, 3.0], [6.0, 7.0]], [[-6.0, -2.0], [1.0, 7.0]], [[7.0, 0.0], [-5.0, -3.0]], [[-5.0, -5.0], [6.0, -2.0]], [[6.0, -2.0], [-5.0, 0.0]]]]),self.functionspace)
17136        arg1.setTaggedValue(1,numarray.array([[[[-0.59902293892645742, 0.4070901207828046], [-0.58232546518699757, 0.016474213083368383]], [[-0.0063369947838824991, -0.27273602166135791], [0.49777404662155611, 0.8968769635346312]], [[-0.1947627413450721, 0.55225148576229288], [-0.41409491470290827, -0.00037383529193713017]], [[0.88420803364689848, 0.59274534715690419], [0.14686033077843708, -0.051809538429408164]], [[-0.75154817288548004, -0.069156268280767375], [-0.81540598499408379, -0.61361644721131858]], [[-0.9375451831238315, 0.28241674539865769], [0.13820212902557283, -0.94335883578878055]]], [[[0.31973402954805219, 0.65088994807161171], [-0.96912795413198638, 0.53303010014969732]], [[0.068703252510207369, 0.85202495380431698], [0.23775787160462536, 0.21090896562691852]], [[0.80605616424216842, -0.43022031403036332], [-0.53971829450800479, 0.74403488368144433]], [[0.57493907808226519, 0.81629775999724274], [-0.93354186509027159, -0.24530797435127139]], [[0.45780232465399995, 0.14244524006220605], [0.68820230081584288, 0.54350829611983786]], [[-0.82440439539658161, -0.94278875347999214], [0.48863959060190076, 0.35307808213677983]]], [[[0.0048311838336423385, 0.56093315064741223], [0.39594424465558009, -0.78995903451792149]], [[-0.97450267991323059, -0.15338149665392442], [-0.21339127777779088, -0.64160851143172914]], [[-0.2747128459425876, 0.17586609366777384], [-0.48934715104038151, 0.75585706624331261]], [[-0.60605449209671014, 0.26414574917197986], [-0.74638775621562625, -0.26512756020803163]], [[-0.7242484515935883, -0.1470599651505875], [-0.49430181346352131, 0.57217102808038067]], [[0.88200942050607933, -0.004129854055393567], [0.41075967962180182, -0.86332013700981358]]]]))        arg1.setTaggedValue(1,numarray.array([[[[-4.0, 4.0], [-6.0, -7.0]], [[3.0, 1.0], [-2.0, -7.0]], [[-1.0, 3.0], [7.0, 3.0]], [[-4.0, 2.0], [4.0, 7.0]], [[-4.0, -6.0], [2.0, 3.0]], [[-3.0, -6.0], [-2.0, 4.0]]], [[[-7.0, -5.0], [-3.0, -2.0]], [[-6.0, 3.0], [2.0, -7.0]], [[-3.0, -2.0], [-1.0, 0.0]], [[-1.0, 0.0], [-5.0, -5.0]], [[-3.0, 6.0], [6.0, 0.0]], [[0.0, 1.0], [-2.0, 0.0]]], [[[-4.0, 6.0], [-2.0, 0.0]], [[4.0, -5.0], [5.0, -1.0]], [[-6.0, 1.0], [0.0, 3.0]], [[6.0, 3.0], [7.0, -7.0]], [[5.0, -2.0], [1.0, 2.0]], [[4.0, 2.0], [-6.0, 5.0]]]]))
17137        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17138        ref=Data(numarray.array([[[0.65679353736348178, -0.075167449121632299], [0.043494502314359279, 0.2110908244446677]], [[0.61095071525095745, 0.88334462784410306], [0.31960036851046053, 0.87756836920769954]], [[-0.29043502767968787, 0.0033526406751779037], [-0.018480442277836823, 0.23676080748375314]], [[0.46184081941128147, 0.40533611631062733], [-0.33293450445737099, -0.58776352444026603]], [[0.65007640786339993, -0.34593378072352088], [-0.16076685535568036, -0.12431070845865026]], [[-0.05171740819865478, 0.98228829389823713], [-1.0371464969316624, 0.0056509591109529522]]]),self.functionspace)        ref=Data(numarray.array([[[-5.0, -9.0], [-15.0, 15.0]], [[0.0, 5.0], [-20.0, -15.0]], [[26.0, -6.0], [-5.0, -15.0]], [[-27.0, -6.0], [23.0, 15.0]], [[11.0, 13.0], [-6.0, 18.0]], [[-20.0, 12.0], [11.0, -2.0]]]),self.functionspace)
17139        ref.setTaggedValue(1,numarray.array([[[-0.018722004909768934, 0.56456408792092538], [-1.0137440821925492, 0.51481410153988194]], [[0.19263214225060102, 0.53197114740987628], [0.41539523829205621, 0.62744085793888238]], [[0.54918082017080083, -0.10876147395429514], [-0.49674991127522072, 0.4322584172169564]], [[0.88340520734295869, 0.80800105784027532], [-0.51078556526914831, -0.16200701397729445]], [[0.12665740598926073, 0.097084808184588325], [0.23429248874403077, 0.054600664869816032]], [[-1.1296021645545062, -0.57092982618838128], [0.35490256587758595, -0.010083524975030317]]]))        ref.setTaggedValue(1,numarray.array([[[-2.0, -28.0], [0.0, -4.0]], [[-24.0, 21.0], [-11.0, -11.0]], [[12.0, -7.0], [-2.0, -9.0]], [[-20.0, -9.0], [-31.0, 11.0]], [[-21.0, 18.0], [9.0, -6.0]], [[-12.0, -4.0], [14.0, -15.0]]]))
17140        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17141        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
17142        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17143     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17144     def test_generalTensorProduct_array_rank0_taggedData_rank4_offset0(self):     def test_generalTensorProduct_array_rank0_taggedData_rank4_offset0(self):
17145        arg0=numarray.array(0.464020914261)        arg0=numarray.array(-6.0)
17146        arg1=Data(numarray.array([[[[0.11755054365974438, -0.40139218168795487, 0.072053551538426852, -0.63910577791810352], [-0.9885988547294926, -0.51537118206750909, 0.017311984926075663, -0.71554041516954614], [0.25716158315488369, -0.88728977354765681, -0.6512584186524295, 0.68403791372467526]], [[-0.63913374179799098, -0.64105966578682705, -0.95279874560421329, -0.23077283221130096], [-0.3326978349817924, -0.61138317009375087, 0.48993034100732724, 0.84778608858395454], [-0.35571974316190991, -0.29304817739334843, -0.72513731196938713, -0.98942127245414069]]], [[[-0.39657781945210124, 0.37692677760236193, -0.31404653104418712, 0.41778097807877179], [-0.34710424161643005, 0.12962754032322188, -0.96696015549094971, 0.20848949876280631], [0.025666093688795355, 0.87242748402315495, -0.61910922207732333, -0.044747570019129324]], [[-0.3891671617621455, 0.12759808814452844, -0.84124650726607753, 0.54935118507065783], [-0.48136806482263128, 0.16087111290615841, 0.86835387578259549, 0.33110786434002559], [-0.32761023920530863, -0.69432465536524446, -0.28222797289790558, 0.66513243224571172]]], [[[0.6222624392443965, -0.53063302368843623, -0.47302474748247691, 0.13453245785733903], [-0.49870171866403679, 0.65281221055036598, 0.34202992462184656, 0.086433419350200769], [0.70716969703380084, -0.14193436916590918, 0.38041134593159431, -0.35589153091671943]], [[0.012712130264437294, -0.43705521649742418, 0.080814362740557089, 0.14475814648714169], [0.85058446626966422, 0.27223143191434351, -0.49974204521291887, -0.21680225173838563], [-0.32862029476237842, -0.55064101990928904, -0.074830426465927413, 0.56014719098101096]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-4.0, -4.0, 7.0, 1.0], [-6.0, -1.0, -5.0, 6.0], [1.0, -4.0, -4.0, 5.0]], [[-4.0, -6.0, 0.0, 0.0], [3.0, 5.0, 5.0, 5.0], [4.0, -7.0, 7.0, -5.0]]], [[[2.0, -6.0, 5.0, -1.0], [7.0, -6.0, 3.0, -6.0], [-5.0, 3.0, 6.0, 5.0]], [[1.0, -4.0, -5.0, 0.0], [-6.0, 7.0, -4.0, -4.0], [-3.0, -4.0, 4.0, -4.0]]], [[[-1.0, 7.0, -5.0, 4.0], [-4.0, -2.0, -1.0, -5.0], [-1.0, -2.0, 4.0, 3.0]], [[-1.0, 5.0, 2.0, 3.0], [-5.0, 6.0, -7.0, 7.0], [0.0, -5.0, 6.0, -6.0]]]]),self.functionspace)
17147        arg1.setTaggedValue(1,numarray.array([[[[0.94235013960670733, 0.23753869332318622, 0.34445182508806926, -0.43898912547214897], [0.6484129358186046, 0.50652938193724073, 0.14349385661291381, 0.1555221218478291], [0.91342837368031393, -0.87492912091299946, 0.65119952454917862, 0.28616208790855735]], [[-0.12350894618284292, -0.079138253112442269, -0.65818254675768939, -0.28326940787473243], [0.7340736177001439, 0.74023518082487083, 0.17736271698233086, -0.9074183880543305], [0.23742924822012035, 0.96963692173118532, 0.49276573413361269, -0.75334982863930433]]], [[[0.61167448833554627, -0.38184812763530651, 0.11645034265615961, -0.0097980587298938104], [-0.49419370788806272, -0.85192409314259043, -0.54550910351696724, -0.84478106898579086], [0.1255336192447527, -0.5729965356597122, -0.47505660164996732, -0.69958280725247368]], [[0.47768102726509931, -0.042787916060617714, -0.77318323993787486, -0.85897627930666265], [0.66247649900125816, 0.78050397294784135, 0.66574531944311421, -0.30518127411058704], [-0.51160104022414243, -0.85653020373257127, 0.17642821423058619, 0.48136904697170735]]], [[[-0.39952034191463071, -0.46045030874902393, -0.24889982425522517, 0.90030435639981743], [0.98071830657317527, 0.72124751798397924, -0.31609723237781506, 0.89766269999854198], [-0.67621439651540105, 0.11408732098376295, 0.56058240438295281, 0.43992669788420891]], [[-0.89857052858038888, 0.2556546028438913, 0.32676286327184934, 0.66749218006576982], [-0.37365600978104041, -0.52585609277581868, -0.81382732296486404, 0.19119409464947301], [0.67596105053607691, 0.60253883499193339, 0.57689653606691316, 0.38803565768413417]]]]))        arg1.setTaggedValue(1,numarray.array([[[[-3.0, 1.0, -1.0, 4.0], [0.0, -7.0, 5.0, 0.0], [6.0, 7.0, 4.0, -7.0]], [[-2.0, -6.0, 4.0, -5.0], [3.0, -5.0, -3.0, 3.0], [5.0, 0.0, 0.0, -1.0]]], [[[0.0, 6.0, 0.0, 5.0], [1.0, 2.0, -2.0, -5.0], [-4.0, 4.0, -1.0, 2.0]], [[6.0, 0.0, 6.0, 1.0], [-4.0, 5.0, -3.0, 7.0], [0.0, 5.0, 1.0, -5.0]]], [[[-7.0, -2.0, 0.0, 1.0], [-1.0, -5.0, 3.0, 5.0], [6.0, 5.0, 7.0, 1.0]], [[-5.0, -2.0, -3.0, 7.0], [4.0, -1.0, -5.0, 4.0], [3.0, 1.0, -7.0, 5.0]]]]))
17148        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17149        ref=Data(numarray.array([[[[0.054545910740921112, -0.18625436712422933, 0.033434354860642904, -0.29655844737931203], [-0.45873054440936817, -0.23914300708695238, 0.0080331230730774847, -0.33202571763796612], [0.11932835292844235, -0.41172101193638866, -0.30219752684354451, 0.31740789811599557]], [[-0.2965714232044237, -0.29746509221452144, -0.44211854504239761, -0.10708342058938428], [-0.15437875356104511, -0.28369457755094524, 0.22733792475862741, 0.3933904759228366], [-0.16506140044282561, -0.13598048319670322, -0.33647887846510083, -0.45911216343386418]]], [[[-0.18402040235796288, 0.17490190795265748, -0.14572415845574993, 0.19385911140914039], [-0.16106362753887138, 0.060149889774240017, -0.44868973540527168, 0.096743487829821798], [0.011909604258993985, 0.40482459876321147, -0.28727962725599376, -0.020763808351253125]], [[-0.18058170220139122, 0.059208181518832864, -0.39035597342082845, 0.25491043914707912], [-0.22336484953524605, 0.074647560888967138, 0.40293435934308419, 0.15364097393020365], [-0.15201800271744859, -0.32218116137682346, -0.13095968201423236, 0.30863535931557462]]], [[[0.28874278596872383, -0.2462248207892079, -0.21949337579509448, 0.062425874092797907], [-0.23140802743822594, 0.30291851878059695, 0.15870903832779251, 0.040106914269620549], [0.32814152935559299, -0.065860515745482545, 0.17651882053459428, -0.16514111355387123]], [[0.0058986943075144118, -0.20280276114185597, 0.037499554484327034, 0.067170807479751501], [0.39468898169500832, 0.12632107792758815, -0.23189076071456863, -0.10060077906557942], [-0.15248668962049491, -0.25550894948814701, -0.034722882903291313, 0.25992001167997281]]]]),self.functionspace)        ref=Data(numarray.array([[[[24.0, 24.0, -42.0, -6.0], [36.0, 6.0, 30.0, -36.0], [-6.0, 24.0, 24.0, -30.0]], [[24.0, 36.0, -0.0, -0.0], [-18.0, -30.0, -30.0, -30.0], [-24.0, 42.0, -42.0, 30.0]]], [[[-12.0, 36.0, -30.0, 6.0], [-42.0, 36.0, -18.0, 36.0], [30.0, -18.0, -36.0, -30.0]], [[-6.0, 24.0, 30.0, -0.0], [36.0, -42.0, 24.0, 24.0], [18.0, 24.0, -24.0, 24.0]]], [[[6.0, -42.0, 30.0, -24.0], [24.0, 12.0, 6.0, 30.0], [6.0, 12.0, -24.0, -18.0]], [[6.0, -30.0, -12.0, -18.0], [30.0, -36.0, 42.0, -42.0], [-0.0, 30.0, -36.0, 36.0]]]]),self.functionspace)
17150        ref.setTaggedValue(1,numarray.array([[[[0.43727017333467755, 0.11022292164828704, 0.15983285079637932, -0.20370013535240614], [0.30087716329747793, 0.23504022690678852, 0.066584150536420833, 0.072165517167705029], [0.42384986906745781, -0.40598541059998722, 0.3021701987479094, 0.13278519365828453]], [[-0.057310734127226821, -0.036721804562286832, -0.30541046709741038, -0.13144292962432336], [0.34062551122040613, 0.34348460537482134, 0.082300010090029976, -0.421061110042591], [0.11017213683150097, 0.4499318109233299, 0.22865360646937691, -0.34957007624389125]]], [[[0.28382975530784416, -0.1771855172943449, 0.054035394465366378, -0.0045465041698323763], [-0.22931621615645811, -0.3953105965813527, -0.25312763295186869, -0.39199608398152319], [0.058250224772494662, -0.26588237634544382, -0.22043619862353925, -0.32462105382286094]], [[0.22165398699688388, -0.019854487929788566, -0.35877319388757661, -0.39858295845274722], [0.30740295074326601, 0.36217016711192501, 0.30891975179325248, -0.14161049382825847], [-0.23739358242189815, -0.39744792822850483, 0.081866381268785607, 0.22336530527295825]]], [[[-0.18538579432126054, -0.21365857323767345, -0.1154947240104154, 0.41776005057017918], [0.45507380524899266, 0.33467393270370327, -0.14667572676345708, 0.41653426675169486], [-0.31377762250780822, 0.052938902988521344, 0.26012195980064073, 0.20413518856023646]], [[-0.41695551820023607, 0.1186290825467617, 0.15162480256208166, 0.30973033165646441], [-0.17338420327787105, -0.24400822493977151, -0.37763289845307707, 0.088718058600632213], [0.3136600646748578, 0.27959062109096555, 0.26769205810001312, 0.18005666064462189]]]]))        ref.setTaggedValue(1,numarray.array([[[[18.0, -6.0, 6.0, -24.0], [-0.0, 42.0, -30.0, -0.0], [-36.0, -42.0, -24.0, 42.0]], [[12.0, 36.0, -24.0, 30.0], [-18.0, 30.0, 18.0, -18.0], [-30.0, -0.0, -0.0, 6.0]]], [[[-0.0, -36.0, -0.0, -30.0], [-6.0, -12.0, 12.0, 30.0], [24.0, -24.0, 6.0, -12.0]], [[-36.0, -0.0, -36.0, -6.0], [24.0, -30.0, 18.0, -42.0], [-0.0, -30.0, -6.0, 30.0]]], [[[42.0, 12.0, -0.0, -6.0], [6.0, 30.0, -18.0, -30.0], [-36.0, -30.0, -42.0, -6.0]], [[30.0, 12.0, 18.0, -42.0], [-24.0, 6.0, 30.0, -24.0], [-18.0, -6.0, 42.0, -30.0]]]]))
17151        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17152        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
17153        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17154     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17155     def test_generalTensorProduct_array_rank1_taggedData_rank0_offset0(self):     def test_generalTensorProduct_array_rank1_taggedData_rank0_offset0(self):
17156        arg0=numarray.array([-0.29596901469549852, -0.49790487372373438])        arg0=numarray.array([2.0, -5.0])
17157        arg1=Data(0.76831355123,self.functionspace)        arg1=Data(7.0,self.functionspace)
17158        arg1.setTaggedValue(1,-0.977087069153)        arg1.setTaggedValue(1,-5.0)
17159        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17160        ref=Data(numarray.array([-0.22739700473472377, -0.3825470617053755]),self.functionspace)        ref=Data(numarray.array([14.0, -35.0]),self.functionspace)
17161        ref.setTaggedValue(1,numarray.array([0.28918749712898151, 0.48649641378381187]))        ref.setTaggedValue(1,numarray.array([-10.0, 25.0]))
17162        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17163        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17164        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17165     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17166     def test_generalTensorProduct_array_rank2_taggedData_rank1_offset1(self):     def test_generalTensorProduct_array_rank2_taggedData_rank1_offset1(self):
17167        arg0=numarray.array([[0.84839100899258657, 0.63995278205392858, -0.22518927308060821], [0.62417961980622882, -0.4093347205638358, -0.51820930075503857]])        arg0=numarray.array([[0.0, 0.0, 6.0], [-2.0, -1.0, 3.0]])
17168        arg1=Data(numarray.array([0.65029528476596887, 0.29675757149284943, -0.14657175516773702]),self.functionspace)        arg1=Data(numarray.array([0.0, 4.0, 6.0]),self.functionspace)
17169        arg1.setTaggedValue(1,numarray.array([-0.72595920843424988, 0.47967681592024913, 0.87755655741797622]))        arg1.setTaggedValue(1,numarray.array([0.0, 0.0, 7.0]))
17170        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17171        ref=Data(numarray.array([0.77462189325851005, 0.36038273276068944]),self.functionspace)        ref=Data(numarray.array([36.0, 14.0]),self.functionspace)
17172        ref.setTaggedValue(1,numarray.array([-0.50654307574813429, -1.1042352881135549]))        ref.setTaggedValue(1,numarray.array([42.0, 21.0]))
17173        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17174        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17175        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17176     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17177     def test_generalTensorProduct_array_rank3_taggedData_rank2_offset2(self):     def test_generalTensorProduct_array_rank3_taggedData_rank2_offset2(self):
17178        arg0=numarray.array([[[0.8857634315941374, -0.64922027003957394, 0.85767802430130113], [0.42528203997287828, -0.98510131120740763, 0.45263861034439823]], [[-0.95501468604731632, -0.34680321085215726, 0.077101031514611007], [0.14296036018536684, 0.66344300477160645, -0.62889213379515763]]])        arg0=numarray.array([[[7.0, 1.0, -2.0], [3.0, 4.0, -1.0]], [[-4.0, 0.0, 3.0], [-5.0, -7.0, 5.0]]])
17179        arg1=Data(numarray.array([[-0.35560670830392649, -0.61743818620771229, 0.45709664415266604], [0.12643609028121605, -0.50595462018719806, -0.62871884269372935]]),self.functionspace)        arg1=Data(numarray.array([[-6.0, -6.0, 0.0], [0.0, 0.0, 1.0]]),self.functionspace)
17180        arg1.setTaggedValue(1,numarray.array([[0.2522731192686205, 0.59077343967396301, 0.54825792352365998], [0.12661367864362116, -0.49523494116892963, 0.21035303725414334]]))        arg1.setTaggedValue(1,numarray.array([[0.0, -6.0, 0.0], [1.0, -4.0, -5.0]]))
17181        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17182        ref=Data(numarray.array([0.7455168493135651, 0.66678142718364053]),self.functionspace)        ref=Data(numarray.array([-49.0, 29.0]),self.functionspace)
17183        ref.setTaggedValue(1,numarray.array([0.94705800434800325, -0.84628419890463791]))        ref.setTaggedValue(1,numarray.array([-14.0, -2.0]))
17184        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17185        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17186        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17187     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17188     def test_generalTensorProduct_array_rank4_taggedData_rank3_offset3(self):     def test_generalTensorProduct_array_rank4_taggedData_rank3_offset3(self):
17189        arg0=numarray.array([[[[0.87551146721810813, 0.28771538582234579, -0.15437310094017409], [0.68756318950966588, 0.26445838583723247, 0.32373630114498408], [-0.42086758680556158, -0.44783064702669684, -0.96968127630088774], [-0.40709420019735032, -0.37187645584025053, -0.70581627335802555]], [[0.62630296308633016, -0.68840738003201962, 0.57242186156020569], [0.57690971093873333, -0.38540897970548937, 0.34128114677934795], [0.37546178565646726, -0.61921118479761872, 0.19502756047360448], [0.6034121430542152, 0.61080731194605797, -0.38418196703132956]]], [[[0.55965256611451597, 0.58288566512371065, 0.8987568378413251], [0.53992736465257307, -0.1882635916615969, 0.48973640021427478], [0.85203661150963406, 0.73584633064344884, -0.83545478061497325], [0.31840175110958402, -0.5256509231279165, 0.38644604785950043]], [[0.99756206683886961, -0.20610203025004581, -0.82590744308615416], [-0.80000573771481376, -0.26824634148243276, 0.088637756291022773], [-0.63150830084355314, -0.94550055175344494, 0.071483302182796749], [-0.71377309004963307, -0.25811353825233896, 0.98811890657582868]]]])        arg0=numarray.array([[[[-4.0, -2.0, 5.0], [0.0, -5.0, 3.0], [6.0, -5.0, 2.0], [-4.0, 1.0, -6.0]], [[2.0, -3.0, 2.0], [0.0, 7.0, 4.0], [-2.0, -5.0, 3.0], [5.0, 5.0, 5.0]]], [[[1.0, -1.0, -6.0], [-3.0, 1.0, 5.0], [-5.0, 1.0, 5.0], [7.0, 5.0, -6.0]], [[0.0, -7.0, -7.0], [0.0, 4.0, 0.0], [-1.0, -5.0, 2.0], [-7.0, 5.0, -3.0]]]])
17190        arg1=Data(numarray.array([[[-0.51467600396146573, 0.70926095678837009, -0.63163248147737239], [0.89624331515459543, -0.17156805907961159, -0.66137665466444351], [-0.30885327027632603, 0.45453584110717959, -0.73658812703020882], [-0.92589776828624393, 0.24725623516500517, 0.021740237804729334]], [[0.85508637600310866, 0.055474021033104615, 0.17700727428001617], [-0.75254843473403477, 0.48904243298864114, -0.96428353955560886], [0.82776641672164297, -0.50627909794708992, -0.24334660876215253], [0.075193245557573896, 0.73737517900426397, -0.80335726058193346]]]),self.functionspace)        arg1=Data(numarray.array([[[3.0, -6.0, -1.0], [7.0, -2.0, -7.0], [-5.0, -5.0, -2.0], [0.0, 1.0, -2.0]], [[-1.0, -3.0, 0.0], [3.0, -6.0, 2.0], [-1.0, 2.0, -5.0], [2.0, -6.0, -2.0]]]),self.functionspace)
17191        arg1.setTaggedValue(1,numarray.array([[[0.71678653318238461, -0.12311602951580936, 0.78030860477591557], [-0.81933373807095333, -0.62288568144102952, -0.67387286214342379], [0.49544626539819636, -0.26546931588256939, 0.73901268961381517], [0.66246297549622035, -0.034973761870373599, 0.60053617311110807]], [[0.68982518244318047, 0.97893984565288683, -0.96628203885355646], [0.77657969122611714, -0.90916620475638554, 0.66453360641437875], [-0.62638542087033366, 0.039691984103488176, -0.94760416787934099], [-0.69310132536482261, 0.83247979072344003, -0.30187713547481998]]]))        arg1.setTaggedValue(1,numarray.array([[[-3.0, 4.0, 7.0], [2.0, -6.0, -1.0], [6.0, 6.0, -6.0], [-6.0, 1.0, -6.0]], [[-1.0, -5.0, 6.0], [-1.0, 0.0, -4.0], [-6.0, -5.0, 0.0], [-3.0, 5.0, -4.0]]]))
17192        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17193        ref=Data(numarray.array([2.1462111553154131, 0.0018289197595722229]),self.functionspace)        ref=Data(numarray.array([-92.0, -76.0]),self.functionspace)
17194        ref.setTaggedValue(1,numarray.array([-1.9694567861709098, 1.6841424416510264]))        ref.setTaggedValue(1,numarray.array([157.0, -39.0]))
17195        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17196        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17197        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17198     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17199     def test_generalTensorProduct_array_rank1_taggedData_rank1_offset0(self):     def test_generalTensorProduct_array_rank1_taggedData_rank1_offset0(self):
17200        arg0=numarray.array([0.059107512318066879, -0.86443238423224034])        arg0=numarray.array([7.0, -2.0])
17201        arg1=Data(numarray.array([0.26323295908478461, -0.87200177116993149]),self.functionspace)        arg1=Data(numarray.array([3.0, 0.0]),self.functionspace)
17202        arg1.setTaggedValue(1,numarray.array([-0.47160488168708659, 0.42588097415230286]))        arg1.setTaggedValue(1,numarray.array([-7.0, 6.0]))
17203        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17204        ref=Data(numarray.array([[0.015559045371625101, -0.051541855430802863], [-0.22754709443016813, 0.75378657010716033]]),self.functionspace)        ref=Data(numarray.array([[21.0, 0.0], [-6.0, 0.0]]),self.functionspace)
17205        ref.setTaggedValue(1,numarray.array([[-0.027875391353579942, 0.025172764925737563], [0.40767053229233186, -0.36814530588562427]]))        ref.setTaggedValue(1,numarray.array([[-49.0, 42.0], [14.0, -12.0]]))
17206        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17207        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17208        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17209     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17210     def test_generalTensorProduct_array_rank2_taggedData_rank2_offset1(self):     def test_generalTensorProduct_array_rank2_taggedData_rank2_offset1(self):
17211        arg0=numarray.array([[0.87928940892560026, 0.45857057701152892, -0.71636944869938413], [0.76469394956908654, -0.50617870808981302, -0.083669068487796316]])        arg0=numarray.array([[4.0, 3.0, 4.0], [-1.0, -7.0, -3.0]])
17212        arg1=Data(numarray.array([[-0.83918291402612999, 0.8724655907290082], [-0.094317633486005636, -0.80716341399646141], [0.99731604189303447, -0.45791272693117469]]),self.functionspace)        arg1=Data(numarray.array([[6.0, 6.0], [1.0, -5.0], [6.0, 1.0]]),self.functionspace)
17213        arg1.setTaggedValue(1,numarray.array([[-0.22043261953143589, -0.11771151518581213], [-0.30304403419134207, 0.52493670858736796], [0.38255222091814534, 0.85310429105915486]]))        arg1.setTaggedValue(1,numarray.array([[-7.0, 7.0], [7.0, -4.0], [-7.0, 1.0]]))
17214        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17215        ref=Data(numarray.array([[-1.4955826831745032, 0.72504304882519865], [-0.67742102328262799, 1.1140512238628213]]),self.functionspace)        ref=Data(numarray.array([[51.0, 13.0], [-31.0, 26.0]]),self.functionspace)
17216        ref.setTaggedValue(1,numarray.array([[-0.6068398689526, -0.47391980992915317], [-0.047176840694213712, -0.4271035097947341]]))        ref.setTaggedValue(1,numarray.array([[-35.0, 20.0], [-21.0, 18.0]]))
17217        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17218        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17219        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17220     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17221     def test_generalTensorProduct_array_rank3_taggedData_rank3_offset2(self):     def test_generalTensorProduct_array_rank3_taggedData_rank3_offset2(self):
17222        arg0=numarray.array([[[0.37992305691385031, 0.61876747772662832, 0.045342680899379761], [-0.40047632827023083, 0.15466055705712312, -0.44357459958403056]], [[0.26840869814605517, 0.35523465362518025, 0.12287957687473106], [0.96647751860299635, -0.83792974311338519, 0.11310600361644152]]])        arg0=numarray.array([[[-4.0, 4.0, 1.0], [-7.0, 7.0, -2.0]], [[0.0, 4.0, -2.0], [4.0, 2.0, -7.0]]])
17223        arg1=Data(numarray.array([[[-0.33392279167171579, -0.16857351354564298], [0.48812062095085551, -0.90127622553897191], [0.095331239457839168, -0.67514724967494399]], [[-0.227343232057865, -0.87380676579834726], [0.71691550383695035, 0.56596215351114809], [-0.1787430650852746, -0.61636758001639991]]]),self.functionspace)        arg1=Data(numarray.array([[[-5.0, -7.0], [4.0, 2.0], [0.0, 7.0]], [[-3.0, -6.0], [-6.0, -5.0], [0.0, 1.0]]]),self.functionspace)
17224        arg1.setTaggedValue(1,numarray.array([[[0.19105980102157649, 0.55225511738960664], [0.31364782767761445, 0.066291571998562615], [0.89294308496599561, 0.37611031397199723]], [[-0.69376612638867541, 0.44512740294672049], [-0.0021026829686792148, 0.62442153616194274], [-0.94301525256393903, 0.7585189049994816]]]))        arg1.setTaggedValue(1,numarray.array([[[-7.0, 1.0], [2.0, -1.0], [7.0, 6.0]], [[-7.0, 3.0], [-3.0, -4.0], [7.0, 5.0]]]))
17225        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17226        ref=Data(numarray.array([[0.46070078917902513, 0.058537581927444071], [-0.74518002023611196, -1.8368389438660175]]),self.functionspace)        ref=Data(numarray.array([[15.0, 48.0], [-8.0, -47.0]]),self.functionspace)
17227        ref.setTaggedValue(1,numarray.array([[1.0029608541597337, -0.15026195374089973], [-0.50298299195057006, 0.21077270944283164]]))        ref.setTaggedValue(1,numarray.array([[57.0, -61.0], [-89.0, -47.0]]))
17228        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17229        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17230        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17231     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17232     def test_generalTensorProduct_array_rank4_taggedData_rank4_offset3(self):     def test_generalTensorProduct_array_rank4_taggedData_rank4_offset3(self):
17233        arg0=numarray.array([[[[-0.61546786905714113, 0.34200095706599187, -0.67725239113864366], [0.17407072378649335, 0.84698639438965584, -0.42975648201283567], [-0.57536506925096598, -0.79317715559584712, -0.73361547399143356], [-0.7002702232491993, 0.98896696424550123, 0.65605734602693122]], [[-0.30808828957772616, -0.070763991246238112, 0.60774598069649932], [-0.63600270873331155, 0.90222920400083306, -0.012275760089776711], [0.87283900920781021, 0.056673859347249556, 0.9432602104953689], [0.4343386152088522, 0.7107991114815817, 0.60797773546841971]]], [[[-0.69884981878846908, -0.25757270411503752, 0.11220990577376755], [-0.84541038008283231, -0.19034334027332811, 0.074447637946352785], [-0.92533114503742264, -0.32731062957647827, 0.24029755350320103], [-0.15299749270921947, -0.88849469120659563, 0.60409851902810163]], [[0.71870093649187239, 0.72975851765435706, -0.28581724447909718], [0.664496911158583, -0.42258317841023563, 0.92299811801373566], [-0.98627335468525934, -0.65705514628041994, -0.09471298660013594], [0.74351034831609031, 0.26572364611908172, -0.27564782915741848]]]])        arg0=numarray.array([[[[-4.0, 6.0, 4.0], [-4.0, 0.0, 5.0], [4.0, 7.0, -3.0], [7.0, -6.0, -2.0]], [[-1.0, -5.0, 5.0], [-2.0, 6.0, -5.0], [-7.0, -5.0, 2.0], [1.0, 0.0, -5.0]]], [[[5.0, 1.0, 1.0], [0.0, 0.0, -5.0], [-5.0, -4.0, 1.0], [0.0, -5.0, -2.0]], [[-5.0, 7.0, -3.0], [-6.0, 3.0, -5.0], [-5.0, -4.0, 3.0], [-4.0, -6.0, 0.0]]]])
17234        arg1=Data(numarray.array([[[[-0.96921695920171946, -0.5922961744113111], [0.56190773201135058, 0.76518603343873259], [-0.17647849278961325, -0.50945810515064949]], [[0.31126802113913499, 0.23258593772300729], [0.97455326060444847, -0.28369994849870439], [0.98035521753269084, -0.85511927625213602]], [[0.38339994997336069, -0.65721861891924882], [0.075926095106743086, -0.57399673715209554], [-0.90753911660658404, -0.54289774857786566]], [[-0.62402562744698176, 0.66703809474065334], [0.82414796342391683, -0.57305964310379354], [-0.85623483030897729, -0.13909735365466758]]], [[[-0.62593854542200256, 0.52575575419030862], [0.74899377632797459, -0.039698835476366323], [-0.61817268137373804, 0.57286255922030938]], [[0.91905663496752221, 0.027610009453794548], [0.025214277099854687, -0.087764585983104215], [0.36798094858842911, -0.71891970910694347]], [[-0.22343883963304356, -0.90043265375422066], [0.76482057048380625, -0.2894811449114616], [-0.52726175037652601, 0.15862094154987227]], [[0.53659080546361282, 0.49607298862018956], [-0.37678803022644169, -0.16916353550817376], [-0.24755481351496988, -0.73079475063142141]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-7.0, -7.0], [-2.0, -6.0], [6.0, 5.0]], [[-5.0, -2.0], [-6.0, 3.0], [-6.0, 0.0]], [[-4.0, 0.0], [1.0, 4.0], [6.0, 5.0]], [[6.0, -3.0], [6.0, 4.0], [1.0, 4.0]]], [[[4.0, 5.0], [0.0, -7.0], [5.0, 7.0]], [[-2.0, 0.0], [-3.0, -2.0], [-2.0, -1.0]], [[7.0, -5.0], [-2.0, -3.0], [4.0, -5.0]], [[5.0, -6.0], [3.0, 6.0], [0.0, 7.0]]]]),self.functionspace)
17235        arg1.setTaggedValue(1,numarray.array([[[[-0.59444047512941078, 0.53901487019967731], [-0.31319432109864609, 0.36940660854357721], [-0.6672875825163096, 0.95564332389476592]], [[0.23939308181449048, -0.68257836162101415], [-0.24928289801867032, 0.31742773731707974], [-0.20563742773914284, 0.44419533719687676]], [[-0.87273092703619004, -0.87182077844058625], [-0.63464610808657018, 0.9956113250522074], [0.16620779844743439, -0.13008744379427717]], [[0.4219543335847582, 0.91568937346148371], [-0.89783154145263411, 0.16469762532269905], [-0.056535595551029383, 0.57627853197835277]]], [[[-0.86295991570102748, 0.93732150602472575], [-0.8977138529577815, 0.47639603485582982], [0.23188662733580179, 0.4243051486476237]], [[-0.76772154085180988, -0.84446394855099927], [0.35459670897292916, -0.26919624579062162], [-0.18543153201953366, 0.10806739277464006]], [[-0.90268407049897781, -0.075622028793681517], [-0.6963545495159067, -0.72392206054995811], [-0.13118357172955375, 0.66158888699708829]], [[0.34057044179408491, -0.40966284225674565], [0.35900784813561559, -0.044626226028205318], [0.22461046221218828, 0.15862503012972917]]]]))        arg1.setTaggedValue(1,numarray.array([[[[4.0, -6.0], [-7.0, 4.0], [5.0, 5.0]], [[6.0, 1.0], [4.0, -2.0], [2.0, -2.0]], [[4.0, 6.0], [-4.0, 3.0], [-1.0, 7.0]], [[-2.0, 0.0], [3.0, 0.0], [-4.0, -4.0]]], [[[7.0, 6.0], [-2.0, 0.0], [-5.0, 3.0]], [[4.0, 7.0], [3.0, -7.0], [-3.0, -7.0]], [[0.0, 0.0], [-4.0, -5.0], [5.0, 4.0]], [[7.0, -4.0], [0.0, 3.0], [0.0, 0.0]]]]))
17236        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17237        ref=Data(numarray.array([[0.8053545834640129, 0.34481884841545885], [-0.26662556839391527, 2.1076275303048049]]),self.functionspace)        ref=Data(numarray.array([[-2.0, 37.0], [-86.0, -161.0]]),self.functionspace)
17238        ref.setTaggedValue(1,numarray.array([[1.1620281025951451, -0.55433761671616688], [1.4794244899203972, 1.3761904293335239]]))        ref.setTaggedValue(1,numarray.array([[-45.0, 103.0], [-35.0, -75.0]]))
17239        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17240        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17241        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17242     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17243     def test_generalTensorProduct_array_rank1_taggedData_rank2_offset0(self):     def test_generalTensorProduct_array_rank1_taggedData_rank2_offset0(self):
17244        arg0=numarray.array([0.66484862689771274, 0.72553508726535809])        arg0=numarray.array([7.0, -2.0])
17245        arg1=Data(numarray.array([[-0.51221898631706297, -0.51809842019505048, -0.02187182893195061, -0.7962451876597898, 0.12143693258814547], [0.45620444128430182, -0.6046263745508067, -0.5134609878933003, -0.086509872094893803, 0.5733979856537581], [-0.56026806868308721, -0.39193072466011092, 0.60062602131125997, 0.38888432064924983, 0.34665168732642582], [-0.44179592020373004, 0.53383139073126173, 0.41057201198526605, -0.69715124606327605, -0.69175332417877922]]),self.functionspace)        arg1=Data(numarray.array([[4.0, 6.0, 6.0, -3.0, -2.0], [-6.0, 6.0, -6.0, 5.0, 4.0], [0.0, -2.0, 1.0, 1.0, -3.0], [0.0, 0.0, -4.0, -5.0, -1.0]]),self.functionspace)
17246        arg1.setTaggedValue(1,numarray.array([[-0.0041382735503339152, -0.69484345181630047, 0.9593286736949711, 0.19264539868155439, -0.28449996479281303], [0.47632162141551704, 0.89774914930591199, -0.73449846172960198, -0.044225409872406862, -0.41843152689395513], [-0.60194886015824411, -0.1098618632946633, -0.10258058007083726, -0.45778840146333399, -0.062624769043876594], [0.45037818310025113, -0.60866396866914707, -0.73432087482115671, -0.19303524626358159, 0.26259632947310374]]))        arg1.setTaggedValue(1,numarray.array([[7.0, 2.0, 0.0, 3.0, -6.0], [7.0, 0.0, 0.0, -7.0, -3.0], [-5.0, -5.0, 0.0, -6.0, -3.0], [7.0, 4.0, 0.0, -3.0, 7.0]]))
17247        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17248        ref=Data(numarray.array([[[-0.3405480897238376, -0.34445702326455352, -0.014541455433149031, -0.52938251968952288, 0.080737177885898626], [0.3033068963725063, -0.401985014906246, -0.34137383276640382, -0.057515969675386899, 0.38122286342781547], [-0.37249345615858392, -0.26057460412930028, 0.39932538554782754, 0.25854920660570357, 0.23047089833074946], [-0.29372741091646137, 0.35491706712257576, 0.2729682384110354, -0.46350004868519856, -0.45991124773218972]], [[-0.37163284693652354, -0.37589858250826014, -0.015868779312795768, -0.57770382171336698, 0.088106755482577528], [0.33099232911804988, -0.43867764942265663, -0.37253396265852262, -0.062765947599683736, 0.41602035755907996], [-0.40649414210397733, -0.2843594925182486, 0.43577525278590984, 0.28214921951838295, 0.251507962215062], [-0.32053844151849248, 0.38731340465919345, 0.29788440054444365, -0.50580769014967208, -0.50189130842415208]]]),self.functionspace)        ref=Data(numarray.array([[[28.0, 42.0, 42.0, -21.0, -14.0], [-42.0, 42.0, -42.0, 35.0, 28.0], [0.0, -14.0, 7.0, 7.0, -21.0], [0.0, 0.0, -28.0, -35.0, -7.0]], [[-8.0, -12.0, -12.0, 6.0, 4.0], [12.0, -12.0, 12.0, -10.0, -8.0], [0.0, 4.0, -2.0, -2.0, 6.0], [0.0, 0.0, 8.0, 10.0, 2.0]]]),self.functionspace)
17249        ref.setTaggedValue(1,numarray.array([[[-0.002751325487666626, -0.46196571484893439, 0.63780835144970549, 0.12808002879159389, -0.18914941094494936], [0.31668177595979868, 0.59686728921462529, -0.48833029373940806, -0.02940320302765825, -0.27819362610615944], [-0.40020487313885189, -0.073041508959881124, -0.068200557806467027, -0.30435999012259646, -0.041635991708607739], [0.29943331661888861, -0.40466940381179489, -0.48821222532717323, -0.12833921842120405, 0.17458680907857241]], [[-0.0030024626614694404, -0.50413330444930216, 0.69602661298544111, 0.13977099614369126, -0.20641470678294491], [0.34558804916008401, 0.6513485073840658, -0.53290440552725804, -0.032087086611122945, -0.30358675437958277], [-0.43673501878419446, -0.079708636572628375, -0.074425810113425958, -0.33214154780476879, -0.045436467273221898], [0.32676517437805414, -0.44160706562364882, -0.53277555999414206, -0.14005384424313755, 0.19052285081983106]]]))        ref.setTaggedValue(1,numarray.array([[[49.0, 14.0, 0.0, 21.0, -42.0], [49.0, 0.0, 0.0, -49.0, -21.0], [-35.0, -35.0, 0.0, -42.0, -21.0], [49.0, 28.0, 0.0, -21.0, 49.0]], [[-14.0, -4.0, 0.0, -6.0, 12.0], [-14.0, 0.0, 0.0, 14.0, 6.0], [10.0, 10.0, 0.0, 12.0, 6.0], [-14.0, -8.0, 0.0, 6.0, -14.0]]]))
17250        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17251        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
17252        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17253     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17254     def test_generalTensorProduct_array_rank2_taggedData_rank3_offset1(self):     def test_generalTensorProduct_array_rank2_taggedData_rank3_offset1(self):
17255        arg0=numarray.array([[0.95322201885270963, -0.48200264234421142, -0.37020216926657001], [-0.70595367061499514, -0.60747507159722836, 0.80480718386176364]])        arg0=numarray.array([[6.0, -5.0, 1.0], [-4.0, -6.0, 0.0]])
17256        arg1=Data(numarray.array([[[-0.31322950695610285, -0.99499481700580406, 0.58546341180249728, 0.28384135329916638, -0.1984389488706666], [-0.78686313407124264, -0.89653210958071883, -0.80262437307241963, -0.96230437203829622, -0.48621126148303984], [-0.69219670884665785, 0.95556284182638551, -0.046202966615932262, -0.024201411944125617, 0.38164363750859298], [-0.76334599583993712, -0.36949735602723566, 0.084190155548220513, 0.068607556568999639, 0.029669754951712646]], [[0.030986270509970826, 0.96766026127592952, 0.53478944495752323, 0.66397904661804485, -0.79460537857981239], [0.29951865537893085, 0.22451524083321295, 0.15719465627174523, -0.67196781733483513, 0.65466821560762001], [0.79381818886643218, 0.49053548421964632, -0.73636225696901136, -0.83445161304546378, -0.34227808107644764], [-0.6948373185554837, 0.85546741629875278, -0.29047823422142383, 0.69958367831181612, 0.47192056256679682]], [[0.072418924746935343, -0.19448736954170021, -0.15161502091328449, 0.96142366925202483, -0.87117031462984951], [0.36642822255508567, 0.67684254902181573, -0.77753268558809285, -0.0062228787228446603, 0.89280565188288818], [0.29154792964993415, -0.93927842693402508, 0.041070093952475961, 0.67189354145444158, 0.54819065803803935], [-0.59083725800019571, 0.069344530416675099, -0.02946230968310326, -0.53771686934796437, -0.60508705376318628]]]),self.functionspace)        arg1=Data(numarray.array([[[2.0, 2.0, 5.0, 2.0, -4.0], [-1.0, 0.0, -7.0, -5.0, 0.0], [0.0, 7.0, 2.0, 7.0, -1.0], [-2.0, 5.0, 4.0, -3.0, -4.0]], [[0.0, 2.0, 5.0, -7.0, -1.0], [-7.0, 2.0, 5.0, -1.0, -7.0], [-3.0, -3.0, 7.0, -5.0, -3.0], [-3.0, -4.0, -3.0, 2.0, -3.0]], [[-5.0, -5.0, 0.0, 1.0, 1.0], [-7.0, -6.0, -3.0, -4.0, 3.0], [-6.0, 4.0, -2.0, 3.0, 3.0], [6.0, 4.0, -7.0, -1.0, -7.0]]]),self.functionspace)
17257        arg1.setTaggedValue(1,numarray.array([[[-0.56354100231698689, -0.70490986460644445, -0.67097817037855401, 0.95857752023009191, 0.54446439378400391], [0.16080153145239007, -0.14858740739811749, 0.52435513112404841, 0.32013093642198731, -0.33184072028109024], [-0.56176273620507655, 0.51316092184560369, -0.98702898765093883, 0.59376858435936142, -0.65309467088958595], [-0.2736022409756369, 0.16600692055009292, 0.36151844930580745, -0.98082007027832474, 0.20780486533878828]], [[0.57801309242457211, -0.82473156778595591, -0.012720481006593953, 0.76230058755900809, 0.97881700035566666], [0.10665039307478086, 0.071384350937912844, -0.87092249175846903, -0.83055751456791516, -0.95375591914865665], [-0.49728118783721809, -0.87198976072779733, 0.75622885382502592, -0.36401727314002796, -0.19289550346643725], [0.16475426037693897, -0.67897218363485323, -0.35286923301517503, -0.11066256566767341, -0.48972704669247791]], [[0.68036554365556179, 0.66691199771725995, 0.31121469680603187, 0.70382368348875723, 0.007303501281651803], [-0.2609379113027559, 0.65295747116197367, -0.015430180390434645, 0.77442378963256431, -0.11296582799335697], [-0.49096751497710067, -0.41185842938267281, 0.56380341452230076, 0.24943737026852908, -0.48607875340021023], [0.22850877967859207, 0.73884012848509562, -0.61849192850118895, -0.62805870772334171, 0.49532178198341126]]]))        arg1.setTaggedValue(1,numarray.array([[[6.0, 2.0, 0.0, 7.0, 0.0], [6.0, -3.0, 1.0, -7.0, 6.0], [3.0, -5.0, -5.0, -1.0, 3.0], [6.0, 0.0, 7.0, -2.0, 0.0]], [[-3.0, 1.0, 1.0, -5.0, 6.0], [0.0, -6.0, 0.0, -7.0, 2.0], [0.0, 6.0, -7.0, -6.0, 5.0], [0.0, 6.0, -3.0, -1.0, -7.0]], [[2.0, -1.0, -3.0, -5.0, 3.0], [7.0, 0.0, 4.0, 1.0, 0.0], [3.0, -4.0, 6.0, 2.0, 7.0], [-5.0, 3.0, -1.0, 0.0, 1.0]]]))
17258        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17259        ref=Data(numarray.array([[[-0.3403223702844016, -1.3428661249414564, 0.35643489943094564, -0.40539695504669626, 0.51635465691149618], [-1.0300765714145763, -1.2133796666887582, -0.55300317808547961, -0.59109572953719092, -1.109537679101928], [-1.1503712848261121, 1.0221470528651806, 0.29568263059379896, 0.13040211708120517, 0.32582868734623605], [-0.17399555309938264, -0.79022206635541914, 0.23117019743369371, -0.072738996422079621, 0.02481944547842313]], [[0.26058540416788833, -0.041934075369783108, -0.86020215895012786, 0.17003111163153528, -0.078332463988673107], [0.66844286703022138, 1.0412504673789538, -0.15464010382647331, 1.0825377841353594, 0.66408440601736385], [0.24107391450339019, -1.7285091997308237, 0.51299237530439656, 1.064738377928093, 0.37969045475694863], [0.48547318781863713, -0.20301813895435741, 0.093312458306060719, -0.90617180079743309, -0.79460385767823971]]]),self.functionspace)        ref=Data(numarray.array([[[7.0, -3.0, 5.0, 48.0, -18.0], [22.0, -16.0, -70.0, -29.0, 38.0], [9.0, 61.0, -25.0, 70.0, 12.0], [9.0, 54.0, 32.0, -29.0, -16.0]], [[-8.0, -20.0, -50.0, 34.0, 22.0], [46.0, -12.0, -2.0, 26.0, 42.0], [18.0, -10.0, -50.0, 2.0, 22.0], [26.0, 4.0, 2.0, 0.0, 34.0]]]),self.functionspace)
17260        ref.setTaggedValue(1,numarray.array([[[-1.0676563299485886, -0.52130507761666178, -0.74867221658250593, 0.28574924718783973, 0.04449929607563001], [0.19847356998472965, -0.41777050649320058, 0.92532608524314275, 0.41879340730033793, 0.18521518643334137], [-0.11403652391207814, 1.0619285426740668, -1.5140833171314259, 0.64910832065721591, -0.34962066937702929], [-0.42481011527804446, 0.21198762023412565, 0.7436583024200768, -0.64909094243561305, 0.25076470562361464]], [[0.5942683716089886, 1.5353731413273577, 0.7318747011043607, -0.57334756633767081, -0.97309565438381151], [-0.38831059209664409, 0.58703647551030325, 0.14647495348727874, 0.90180720523298175, 0.72273140991312412], [0.3035302077277372, -0.16402241676410789, 0.69115959800767479, 0.0027072949547045921, 0.18703411729359298], [0.2769719076476258, 0.8898893240864324, -0.5386227609103964, 0.25417211896526259, 0.54943489375849952]]]))        ref.setTaggedValue(1,numarray.array([[[53.0, 6.0, -8.0, 62.0, -27.0], [43.0, 12.0, 10.0, -6.0, 26.0], [21.0, -64.0, 11.0, 26.0, 0.0], [31.0, -27.0, 56.0, -7.0, 36.0]], [[-6.0, -14.0, -6.0, 2.0, -36.0], [-24.0, 48.0, -4.0, 70.0, -36.0], [-12.0, -16.0, 62.0, 40.0, -42.0], [-24.0, -36.0, -10.0, 14.0, 42.0]]]))
17261        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17262        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
17263        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17264     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17265     def test_generalTensorProduct_array_rank3_taggedData_rank4_offset2(self):     def test_generalTensorProduct_array_rank3_taggedData_rank4_offset2(self):
17266        arg0=numarray.array([[[-0.20115544979504363, -0.10426060898394729, 0.23321087065509727], [0.82881689391239144, -0.59021651882393966, -0.74482747740833122]], [[0.083292845684861172, -0.17116430430443663, 0.05955894127476169], [0.6256115035535379, 0.030493783347750547, 0.36257173345990279]]])        arg0=numarray.array([[[-1.0, 4.0, 0.0], [7.0, 5.0, 0.0]], [[-7.0, 0.0, -4.0], [-1.0, -4.0, 6.0]]])
17267        arg1=Data(numarray.array([[[[0.06400882468549618, -0.25231790485272576, -0.88481418693171499, -0.89872896533103264, 0.30356836951057264], [0.82744828785793545, -0.41112123230833597, 0.055863040996112279, 0.35076577115425578, 0.56370988196498661], [-0.39928198117711378, -0.98234699133660519, 0.19992835360698691, -0.097354804151298602, -0.64149765151343652], [0.85752789322011291, 0.95083977102613382, -0.26352142819452884, -0.83589075322103734, -0.98302534551661158]], [[-0.4555971920642683, 0.64268176344885175, -0.79808901629752227, -0.40720314428976145, -0.76663216671528134], [-0.15506620691027195, -0.087529516693947595, -0.22616631293793654, -0.45536674360059148, 0.67359530765165299], [0.68547933048150989, 0.92718611605211931, 0.28936782965944907, 0.12803237092160002, 0.6249711001717273], [0.46877756894613376, -0.47081665245959647, -0.97362346992708448, -0.34896780061130772, -0.68827999040627796]], [[0.40076937131619927, -0.3788002231033718, 0.77909962910922825, -0.0086251102034939908, 0.21006155678822469], [0.41201467165861017, -0.11218953318580027, 0.85481405246992614, -0.97607140842928586, 0.11467431413459206], [-0.081308549567401966, 0.49994426757353705, 0.66688575333019862, 0.55116191203534548, -0.39133483970082183], [0.60030008843098592, 0.31494153264668534, 0.41127784123378919, 0.40201623277116427, -0.21990382801920405]]], [[[0.40056255472115221, -0.47452333734600716, 0.47473421522536619, -0.17821798793926891, 0.29449277396325568], [0.14014974348771081, 0.46519319912855583, 0.26529870554232637, 0.13424549971514987, -0.3352374089871033], [-0.032403164287071906, -0.11760474652456576, 0.68042233020582876, -0.56189181213484884, -0.44364370901054384], [0.090975354339726922, -0.091417417619367169, 0.29870972560772335, 0.96523897744135967, -0.61511337345955552]], [[-0.57683406853394592, -0.544107682768461, 0.72318743551010045, 0.11531385554559193, -0.75021409139011674], [0.85075533367234346, -0.03460583108605686, 0.16072060205355521, 0.14236821737348504, 0.96388409066918213], [0.55892453688973776, -0.95245273059231872, -0.48190409193064987, -0.17053192632216585, -0.49306096248669062], [-0.66093818083888234, -0.3791663435248136, -0.5947955160169931, -0.59686135867030798, -0.99629344781475515]], [[0.45123927451689139, -0.00023079043286933221, -0.96609902973249717, 0.63960051498495107, -0.45082964506061396], [-0.34593939922137729, -0.30636058181877202, 0.71324906144185385, 0.91748765008496491, 0.24783605815808785], [-0.92459450672605858, -0.06121876373741908, 0.41936488290413454, 0.55040342522471941, 0.39153063657720066], [-0.96084935105307645, -0.2928200413392319, -0.20687690184198471, -0.63184051275385089, 0.26078369392211997]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-7.0, -1.0, 6.0, 7.0, 4.0], [-1.0, 0.0, -4.0, 6.0, 4.0], [2.0, -5.0, -2.0, -4.0, 6.0], [-1.0, 3.0, 6.0, -3.0, 0.0]], [[-3.0, -2.0, 4.0, -5.0, 6.0], [-7.0, -6.0, 0.0, 5.0, -6.0], [-4.0, 2.0, 5.0, 7.0, 3.0], [0.0, 3.0, -1.0, 0.0, 4.0]], [[-3.0, 4.0, -3.0, -7.0, 3.0], [2.0, -1.0, -1.0, 0.0, 0.0], [1.0, 5.0, 5.0, -3.0, -7.0], [0.0, 0.0, 2.0, -3.0, 2.0]]], [[[2.0, -3.0, 0.0, 5.0, -2.0], [-1.0, 2.0, -2.0, 1.0, -7.0], [7.0, 4.0, 7.0, -2.0, 3.0], [1.0, 5.0, 6.0, -4.0, 2.0]], [[-5.0, -6.0, -6.0, 5.0, 2.0], [7.0, 0.0, -7.0, -1.0, 0.0], [-1.0, -5.0, -2.0, -7.0, 2.0], [-6.0, -2.0, -7.0, -7.0, 0.0]], [[-1.0, 6.0, 5.0, -2.0, -6.0], [7.0, -3.0, 4.0, 2.0, 6.0], [6.0, -5.0, 3.0, -6.0, -2.0], [-4.0, 3.0, 0.0, -2.0, 7.0]]]]),self.functionspace)
17268        arg1.setTaggedValue(1,numarray.array([[[[0.98120809834875899, 0.26617920243837512, -0.025551809426254568, -0.037552784001149364, -0.033986968598348932], [0.40603768535472029, 0.47705066349326897, 0.9455645928092371, 0.49741063043814537, 0.34381856289637769], [0.01060961405479155, -0.65430240866499356, 0.81259523822628688, 0.72331145854880385, 0.086355882347096236], [-0.68898728702530798, -0.014829478859357481, -0.81262523651734897, 0.95538018114569057, 0.37429408436602496]], [[-0.8382948465362603, 0.080834596199491626, 0.63193793966774781, 0.16365252729099433, -0.19256673756218734], [-0.83666574838729346, 0.13305912175455381, 0.76458430637043229, -0.24417922474927201, 0.86030671986479335], [-0.67263248203825943, -0.2483151853416059, -0.0092308857864205063, -0.27123064976135214, -0.81563649857126075], [-0.85690968837383741, -0.067784923047385481, 0.18914087842449856, 0.30419871937760035, 0.74914171038862865]], [[0.20587774316035268, 0.450619024816582, 0.34467783615050362, 0.27735548251050846, -0.72246936529842753], [0.3211573003128565, 0.91144856458654777, 0.41540125250241267, 0.25481920034176331, -0.66326985735203725], [0.83398199294768705, 0.15763273908912367, 0.86219814538120798, -0.35538255215022141, 0.073891808078063503], [0.80962804332580207, -0.084079329886502574, -0.17568296590268018, -0.21938332631256596, 0.48005623047788193]]], [[[-0.74666255256748792, -0.43156374213987281, 0.62897284922345165, 0.16886597738567222, -0.62818588314662449], [0.77583442363108501, -0.41619548664379713, 0.6808789336151162, -0.82039996336200494, 0.96663698437680234], [0.84816088102778453, 0.57914746190234911, 0.9080686099429458, 0.54011108914090711, -0.5342931551205985], [-0.14675849544344555, -0.41508711808093213, 0.92668050598478491, 0.58532432668039336, -0.68447282021523592]], [[-0.50892577819528895, 0.49050230953278406, 0.66588777272999145, 0.69832917328993682, -0.94387968812427459], [-0.74594948153098017, 0.98654549368671129, 0.89775124891782832, 0.15327688814022356, 0.55436001391885603], [-0.70037355161374371, 0.64043700360416356, 0.26649516076660862, -0.77287041653467936, -0.75067270809771247], [0.58388579979978839, -0.95930079777754029, 0.45509662598276468, 0.066258199403117501, 0.085791938753821517]], [[-0.25187405801218121, -0.34643313833975053, -0.30185340525829507, -0.57470259088422959, -0.4718693333845505], [-0.44866959613698842, 0.50051300676940769, -0.30695990654524352, 0.78203730328499366, 0.64089954182796105], [-0.43350108608521531, -0.073580561924833532, -0.88360765618067827, -0.3918977387159448, 0.51412103057562297], [-0.67672207271504026, 0.52053729602280319, -0.9349073508126462, -0.63997953029688448, -0.9911100939502282]]]]))        arg1.setTaggedValue(1,numarray.array([[[[3.0, 3.0, 3.0, -1.0, 0.0], [3.0, 7.0, 4.0, -2.0, 3.0], [-5.0, 6.0, -3.0, -7.0, -7.0], [-3.0, -2.0, -4.0, 6.0, 4.0]], [[0.0, -2.0, 5.0, -7.0, 6.0], [6.0, 0.0, 1.0, 0.0, 5.0], [-1.0, -3.0, 7.0, -2.0, -6.0], [-7.0, 4.0, 7.0, -6.0, 5.0]], [[-7.0, 7.0, -1.0, -6.0, -6.0], [-6.0, 0.0, -6.0, 7.0, -1.0], [-7.0, -5.0, 1.0, -1.0, -1.0], [0.0, 5.0, -1.0, 2.0, -7.0]]], [[[-3.0, 0.0, -6.0, -3.0, 2.0], [4.0, 6.0, 4.0, -7.0, -1.0], [4.0, -3.0, 4.0, -6.0, 3.0], [0.0, 3.0, -5.0, -6.0, 1.0]], [[0.0, -2.0, 7.0, 6.0, 7.0], [2.0, 2.0, 5.0, -1.0, -6.0], [-4.0, -4.0, 4.0, 6.0, 3.0], [2.0, 7.0, 7.0, 0.0, 0.0]], [[1.0, -4.0, 7.0, -4.0, 0.0], [0.0, 6.0, 0.0, 0.0, 6.0], [-3.0, 0.0, 7.0, 5.0, -3.0], [7.0, 1.0, -1.0, 2.0, -3.0]]]]))
17269        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17270        ref=Data(numarray.array([[[0.46444348853685213, -0.17657131733551781, 1.1290966157468236, -0.47093425211196371, 1.0905133860659175], [-0.18249834133340231, 0.69983203326615262, -0.19452839255356902, -0.90684524297154878, -1.1882253217971495], [0.32180782608519387, 0.72780585135122511, 0.62115745309338255, -0.64023859547872464, -0.39569210998181453], [1.0997906035617753, 0.29739117005037208, 1.0031552175183163, 1.9211781112531385, 0.1021910673041633]], [[0.50379614801032724, -0.46712423191675478, 0.07807971602267233, 0.11824944722197427, 0.1669192939872933], [0.10819567253849852, 0.15295384847211146, 0.52375526109549997, 0.47000699364308296, -0.15199014889647866], [-0.49388947793373128, -0.33556245440258531, 0.56987697829734318, -0.1543623314775518, -0.33433835759949337], [-0.28467490255074918, 0.0036204649399823319, 0.26292636507314826, 0.37062730952423484, -0.29781721487390689]]]),self.functionspace)        ref=Data(numarray.array([[[-16.0, -58.0, -20.0, 33.0, 16.0], [1.0, -10.0, -45.0, 16.0, -77.0], [26.0, 16.0, 61.0, -17.0, 37.0], [-22.0, 34.0, -3.0, -60.0, 30.0]], [[73.0, 54.0, 24.0, -58.0, -82.0], [14.0, -16.0, 86.0, -27.0, 15.0], [15.0, 1.0, 13.0, 34.0, -37.0], [6.0, 0.0, -28.0, 53.0, 32.0]]]),self.functionspace)
17271        ref.setTaggedValue(1,numarray.array([[[-0.19282871464665902, -0.34603897168095399, 0.37275034003870544, 0.21102159079714616, 0.24632963607627767], [1.4979297877072959, -1.1972955902382447, 0.090043110229474116, -1.3680827494324976, -0.31692578477597388], [1.7017141840622438, 0.3510831821100141, 1.2920464575412998, 0.99561184267869152, -0.29780305641158689], [0.45453576429916204, -0.17510440551511242, 1.2985604703804141, 0.64763589538471023, 0.07882464049468374]], [[-0.33648653906175718, -0.34546761608930665, 0.21458972125298689, -0.096052068402981222, -0.60576908991865108], [0.49610433899196588, 0.022423535684276047, 0.31467662369795313, -0.12663076589092154, 0.69589598402722785], [0.51777238478008136, 0.35256485521113712, 0.37646843112549744, 0.25774639167828101, -0.019543442891586327], [-0.18186398291752573, -0.094844383161166557, 0.14412509702426224, 0.15060974075746128, -0.85340511365081695]]]))        ref.setTaggedValue(1,numarray.array([[[-24.0, -21.0, 10.0, -18.0, 73.0], [59.0, 45.0, 53.0, -52.0, -20.0], [9.0, -59.0, 79.0, -13.0, 19.0], [-15.0, 74.0, 32.0, -72.0, 23.0]], [[16.0, -65.0, 3.0, -14.0, -6.0], [-9.0, -27.0, -28.0, -3.0, 44.0], [57.0, -3.0, 39.0, 65.0, 20.0], [55.0, -31.0, 3.0, -32.0, -19.0]]]))
17272        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17273        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
17274        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17275     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17276     def test_generalTensorProduct_array_rank1_taggedData_rank3_offset0(self):     def test_generalTensorProduct_array_rank1_taggedData_rank3_offset0(self):
17277        arg0=numarray.array([-0.28830826619867556, 0.51785028715795067])        arg0=numarray.array([-7.0, 3.0])
17278        arg1=Data(numarray.array([[[-0.067702749520540229, 0.92793411828539685], [0.10341905614488822, 0.67457913821200655]], [[0.24335712711469193, -0.32655548077163732], [0.92163595348050764, -0.56461270504568173]], [[0.70281949062250915, 0.4949031338984724], [0.89164031858407156, -0.52816005485009465]], [[0.18585167940247938, 0.060040974202638875], [0.470063328222045, 0.46847177881613322]], [[-0.4827557519357013, -0.25037842031504165], [0.37508441154911787, 0.8391653125014622]], [[-0.61493161328444579, -0.4726227710794515], [0.29819516122237832, -0.56382300584954215]]]),self.functionspace)        arg1=Data(numarray.array([[[4.0, 4.0], [5.0, -3.0]], [[-5.0, 4.0], [6.0, 0.0]], [[-1.0, -5.0], [0.0, 6.0]], [[5.0, -5.0], [0.0, 4.0]], [[-3.0, 1.0], [0.0, -2.0]], [[5.0, -6.0], [-7.0, -7.0]]]),self.functionspace)
17279        arg1.setTaggedValue(1,numarray.array([[[0.77370685669720074, -0.78659228154590344], [0.48346687966119717, 0.69606325210085473]], [[-0.37494320050678631, 0.92152158030255271], [-0.34260824402042056, 0.21082430573726385]], [[0.96433276722036099, -0.3026491443454391], [0.96957176973519044, -0.12076341653246758]], [[-0.52649849414921435, -0.58994693520606911], [-0.8681962354972832, 0.35048228962873695]], [[-0.38978379796424067, -0.3764469265569601], [0.0031439409462998835, 0.51192267060998753]], [[0.24085097843900827, -0.31908467461996626], [0.7834775485254053, -0.33643091832834005]]]))        arg1.setTaggedValue(1,numarray.array([[[0.0, 5.0], [-7.0, 0.0]], [[4.0, -3.0], [4.0, -3.0]], [[0.0, -4.0], [-4.0, -3.0]], [[-2.0, -4.0], [4.0, -7.0]], [[3.0, -6.0], [5.0, 1.0]], [[2.0, 7.0], [6.0, -6.0]]]))
17280        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17281        ref=Data(numarray.array([[[[0.019519262331150165, -0.26753107678945948], [-0.029816568769036208, -0.19448674175170033]], [[-0.070161871385527527, 0.094148644478945692], [-0.26571526381432836, 0.16278251006546468]], [[-0.20262866879201191, -0.14268466447055955], [-0.25706727432380838, 0.15227290968922816]], [[-0.053582575458640931, -0.017310309173242222], [-0.13552314316327674, -0.1350642863134888]], [[0.13918247383801996, 0.072186168254592897], [-0.10813993637187665, -0.24193829630136632]], [[0.17728986725679302, 0.1362610516959302], [-0.085972129920858426, 0.1625548332594072]]], [[[-0.035059888280594566, 0.4805309496177525], [0.053555587922234589, 0.34933100043385046]], [[0.12602255815827712, -0.16910684949059501], [0.47726944316497255, -0.29238485144093357]], [[0.36395527503907099, 0.25628573000469362], [0.46173619502036806, -0.27350783606948048]], [[0.096243345547361331, 0.03109223573207965], [0.24342242950220802, 0.24259824518533055]], [[-0.24999520476705533, -0.1296585368582984], [0.19423757022918164, 0.43456199805187362]], [[-0.31844251252185213, -0.24474783772088035], [0.15442044986812001, -0.29197590548544428]]]]),self.functionspace)        ref=Data(numarray.array([[[[-28.0, -28.0], [-35.0, 21.0]], [[35.0, -28.0], [-42.0, 0.0]], [[7.0, 35.0], [0.0, -42.0]], [[-35.0, 35.0], [0.0, -28.0]], [[21.0, -7.0], [0.0, 14.0]], [[-35.0, 42.0], [49.0, 49.0]]], [[[12.0, 12.0], [15.0, -9.0]], [[-15.0, 12.0], [18.0, 0.0]], [[-3.0, -15.0], [0.0, 18.0]], [[15.0, -15.0], [0.0, 12.0]], [[-9.0, 3.0], [0.0, -6.0]], [[15.0, -18.0], [-21.0, -21.0]]]]),self.functionspace)
17282        ref.setTaggedValue(1,numarray.array([[[[-0.22306608240039708, 0.22678105689775988], [-0.13938749783960347, -0.20068078937780903]], [[0.10809922406109393, -0.26568228908169256], [0.098776788818900202, -0.060782390059650027]], [[-0.27802510815587328, 0.087256250072746233], [-0.27953555588753426, 0.034817091240704201]], [[0.15179386800437353, 0.17008657803848418], [0.25030815137643875, -0.1010469412562032]], [[0.11237789098340507, 0.10853276071145732], [-0.00090642416325874275, -0.14759153759136118]], [[-0.069439328006005066, 0.091994749310251006], [-0.22588305362094829, 0.096995814758871937]]], [[[0.4006643179167208, -0.40733703887477368], [0.25036346246390934, 0.36045655498052465]], [[-0.19416444405036037, 0.4772102149819254], [-0.17741977754865601, 0.10917542726591767]], [[0.49938000042088515, -0.1567269463073937], [0.50209301937761075, -0.062537369929513545]], [[-0.27264739638339924, -0.30550418980441579], [-0.44959566986171989, 0.18149735432801747]], [[-0.20184965170529867, -0.19494314901724977], [0.0016280907218490339, 0.26509930197804704]], [[0.12472474834691381, -0.16523809037965079], [0.40572407348568834, -0.17422084766514395]]]]))        ref.setTaggedValue(1,numarray.array([[[[0.0, -35.0], [49.0, 0.0]], [[-28.0, 21.0], [-28.0, 21.0]], [[0.0, 28.0], [28.0, 21.0]], [[14.0, 28.0], [-28.0, 49.0]], [[-21.0, 42.0], [-35.0, -7.0]], [[-14.0, -49.0], [-42.0, 42.0]]], [[[0.0, 15.0], [-21.0, 0.0]], [[12.0, -9.0], [12.0, -9.0]], [[0.0, -12.0], [-12.0, -9.0]], [[-6.0, -12.0], [12.0, -21.0]], [[9.0, -18.0], [15.0, 3.0]], [[6.0, 21.0], [18.0, -18.0]]]]))
17283        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17284        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
17285        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17286     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17287     def test_generalTensorProduct_array_rank2_taggedData_rank4_offset1(self):     def test_generalTensorProduct_array_rank2_taggedData_rank4_offset1(self):
17288        arg0=numarray.array([[-0.96461849532995259, -0.8659993297919848, 0.53640564380180988], [-0.040321483021674265, 0.88194098878283489, -0.88833259283583987]])        arg0=numarray.array([[1.0, -2.0, 1.0], [4.0, -1.0, -3.0]])
17289        arg1=Data(numarray.array([[[[0.92355522878680851, 0.68800685011804252], [-0.35435914027371251, 0.84468321698284088]], [[0.34292454898307456, 0.71245359372014505], [0.21721341674729833, -0.26026400634808988]], [[-0.16202493099652537, -0.98136614038307357], [-0.85725738434172749, -0.63737518099150758]], [[-0.31756275107870024, 0.89925117118555442], [0.21115762924963133, 0.34273345404821409]], [[0.28908545866110558, -0.27873486262640812], [-0.9384364179156679, -0.30958792208457164]], [[0.42004254816485531, 0.92940824714251646], [-0.28416393637051929, -0.96144721859954885]]], [[[-0.82305589374618493, 0.33583911012139156], [-0.48452231851359673, 0.95034864436654276]], [[0.1609191448435161, 0.51422308908261494], [0.019477384643793005, -0.51688718250406729]], [[-0.96969459013710391, -0.46031324755998315], [0.20452219128743643, 0.72259889640138586]], [[-0.45466164329288428, 0.46621685835597071], [0.87788999980684723, 0.16467875822998312]], [[0.25986390952809013, 0.61356373498147176], [0.19048624667810699, -0.70470806447934531]], [[-0.3028087578316494, 0.16494292761644203], [0.39118785501856768, -0.83358745752163088]]], [[[-0.98235167763796549, -0.06749602767659324], [0.98493944933424382, 0.57417485666836221]], [[-0.099336772784693217, -0.28240932688051301], [0.16982108069221269, 0.026640475470107283]], [[0.49095487107432834, -0.85832427716922366], [0.89619644536847809, -0.93168603448021692]], [[-0.85379375008844782, -0.44036784129967055], [0.43363915877017645, 0.75900554579177215]], [[0.88465779450791793, 0.61958511392629756], [-0.029005739141984233, 0.74591302319697816]], [[0.76976798260645296, -0.27177624454159655], [0.30922548958859397, 0.112855687934027]]]]),self.functionspace)        arg1=Data(numarray.array([[[[4.0, -2.0], [3.0, -5.0]], [[0.0, 3.0], [-1.0, 7.0]], [[7.0, 0.0], [7.0, -6.0]], [[5.0, -2.0], [5.0, 0.0]], [[7.0, -4.0], [-5.0, -4.0]], [[-4.0, -7.0], [-2.0, 7.0]]], [[[2.0, 6.0], [-3.0, -4.0]], [[-1.0, 7.0], [-5.0, 0.0]], [[-4.0, 0.0], [-2.0, 5.0]], [[0.0, -2.0], [-1.0, 1.0]], [[-6.0, 2.0], [-7.0, -4.0]], [[6.0, 5.0], [-7.0, -7.0]]], [[[-5.0, 6.0], [3.0, 4.0]], [[6.0, -6.0], [-7.0, -3.0]], [[-6.0, 3.0], [0.0, -7.0]], [[2.0, 2.0], [-4.0, 0.0]], [[1.0, -3.0], [-2.0, 5.0]], [[3.0, -7.0], [2.0, 1.0]]]]),self.functionspace)
17290        arg1.setTaggedValue(1,numarray.array([[[[-0.33244902563807899, -0.80768241532344276], [-0.055910392338577974, 0.2148013390726462]], [[-0.55893702924428257, 0.16033477262861395], [0.63132322565968746, 0.49660959731787258]], [[0.31414658833325682, -0.27747064620635542], [-0.12154885398577431, -0.054951326438927639]], [[0.44498909088933436, -0.6367413650432272], [-0.14950359408316749, 0.49597754652117265]], [[-0.97246357881926371, -0.12334010237544635], [-0.74148984795187567, -0.049510683398589439]], [[0.01933628939617682, -0.21458882283421277], [0.27729032138144194, -0.54981647257490862]]], [[[0.13768120625938352, 0.23674808881347809], [0.3635202879867252, -0.54523319840137763]], [[0.91444740650717016, -0.45178034921952848], [-0.67169605241794583, 0.53488299134002104]], [[-0.87214268257116045, -0.11387034478271785], [-0.26448544548312647, 0.45984120545759355]], [[-0.0092187880136218592, 0.37652331297852282], [0.45543376079636144, 0.43657609655352103]], [[-0.65895078552003494, 0.69745935933719516], [-0.39944235686314844, 0.5954872482838609]], [[0.48928184230489524, 0.25361189307894727], [0.64923116558548433, -0.061233367000464556]]], [[[-0.71571172030753072, -0.79162794768463796], [0.14156455957950032, -0.85495728506607893]], [[0.3549375107231747, 0.49591429321842417], [-0.24258541933596511, 0.35893544355848128]], [[-0.31092340781198891, 0.44238778634629727], [-0.75284335775883959, -0.76433343023166955]], [[-0.3114967813177052, 0.66916433308351042], [-0.43777633266033855, 0.043431747176143842]], [[0.081514927013966343, -0.10927509160380522], [-0.87129957803214952, -0.68305315607494554]], [[0.21511490285304102, 0.99674941737047296], [-0.57160380130876587, 0.17625050969603095]]]]))        arg1.setTaggedValue(1,numarray.array([[[[-7.0, 3.0], [7.0, -4.0]], [[-6.0, 5.0], [-5.0, 6.0]], [[-1.0, -3.0], [1.0, 1.0]], [[-2.0, -6.0], [2.0, 1.0]], [[-3.0, 5.0], [0.0, 0.0]], [[6.0, -3.0], [5.0, 1.0]]], [[[-7.0, 0.0], [7.0, -5.0]], [[-7.0, 2.0], [1.0, 0.0]], [[0.0, -1.0], [1.0, 1.0]], [[4.0, 1.0], [7.0, 0.0]], [[-5.0, 5.0], [1.0, 2.0]], [[0.0, 2.0], [-7.0, -6.0]]], [[[0.0, -3.0], [0.0, -6.0]], [[6.0, 4.0], [6.0, 0.0]], [[-7.0, 1.0], [-3.0, -1.0]], [[4.0, 5.0], [1.0, -3.0]], [[5.0, 5.0], [3.0, 0.0]], [[1.0, 6.0], [-6.0, 5.0]]]]))
17291        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17292        ref=Data(numarray.array([[[[-0.70505158686408298, -0.99070582700055587], [1.2897444632252126, -1.3298077092405944]], [[-0.52343203959570772, -1.2840487208768299], [-0.1353024951560568, 0.71296952921435841]], [[1.2593980740017128, 0.88486490709972032], [1.1305350788624722, -0.5107079190898598]], [[0.24208379530198088, -1.5073935939686656], [-0.73133221393024306, -0.066083864561787775]], [[-0.029363717836586922, 0.069875972429718769], [0.72471332127640742, 1.3090229025397953]], [[0.26995926084004479, -1.1851471610990028], [0.10121166628262254, 1.7098523768243497]]], [[[0.10952916764161502, 0.32840774159864489], [-1.2879856214325047, 0.29403430394343555]], [[0.21633805626961372, 0.67566064374635793], [-0.14243806415330332, -0.46903536476243329]], [[-1.2848115337254624, 0.39607844809629722], [-0.58117811932442964, 1.4906365684431619]], [[0.37027267759168703, 0.76610972247777065], [0.38051718744406438, -0.5428319387534708]], [[-0.56834207346269405, 0.0019683594051507214], [0.23160352029584694, -1.2716467329726946]], [[-0.96780618163916099, 0.34942250580224316], [0.081767434053480137, -0.79666135470130539]]]]),self.functionspace)        ref=Data(numarray.array([[[[-5.0, -8.0], [12.0, 7.0]], [[8.0, -17.0], [2.0, 4.0]], [[9.0, 3.0], [11.0, -23.0]], [[7.0, 4.0], [3.0, -2.0]], [[20.0, -11.0], [7.0, 9.0]], [[-13.0, -24.0], [14.0, 22.0]]], [[[29.0, -32.0], [6.0, -28.0]], [[-17.0, 23.0], [22.0, 37.0]], [[50.0, -9.0], [30.0, -8.0]], [[14.0, -12.0], [33.0, -1.0]], [[31.0, -9.0], [-7.0, -27.0]], [[-31.0, -12.0], [-7.0, 32.0]]]]),self.functionspace)
17293        ref.setTaggedValue(1,numarray.array([[[[-0.18245715956872749, 0.14944801100247218], [-0.1849400985105854, -0.19363367301409917]], [[-0.062359361082538201, 0.5025908182395652], [-0.15742191682067722, -0.7497121168634947]], [[0.2854622984981019, 0.60356426485196324], [-0.057536934831586839, -0.75520787563377545]], [[-0.58834987457553756, 0.64708708566874851], [-0.48501709520523129, -0.8332066873557884]], [[1.5524323596944551, -0.54363896963915359], [0.59380162366921063, -0.83432620492603105]], [[-0.32698104194178218, 0.52203063089700663], [-1.1363246318982145, 0.677932961390036]]], [[[0.7706215851518402, 0.94459370366498341], [0.19710141990012719, 0.26996180714485102]], [[0.51372326062427454, -0.84544537363472982], [-0.40235563481274833, 0.1328571455818976]], [[-0.50564183911934035, -0.48222638580460375], [0.44041576674138405, 1.086750824269197]], [[0.25063969631873806, -0.23669478795348503], [0.79658489262665555, 0.32645396747180311]], [[-0.61435690012734878, 0.71716387831029382], [0.45161719643137688, 1.1339593379198454]], [[0.23964446452220456, -0.65312173101464088], [1.0691771060308763, -0.18840387294183944]]]]))        ref.setTaggedValue(1,numarray.array([[[[7.0, 0.0], [-7.0, 0.0]], [[14.0, 5.0], [-1.0, 6.0]], [[-8.0, 0.0], [-4.0, -2.0]], [[-6.0, -3.0], [-11.0, -2.0]], [[12.0, 0.0], [1.0, -4.0]], [[7.0, -1.0], [13.0, 18.0]]], [[[-21.0, 21.0], [21.0, 7.0]], [[-35.0, 6.0], [-39.0, 24.0]], [[17.0, -14.0], [12.0, 6.0]], [[-24.0, -40.0], [-2.0, 13.0]], [[-22.0, 0.0], [-10.0, -2.0]], [[21.0, -32.0], [45.0, -5.0]]]]))
17294        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17295        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
17296        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17297     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17298     def test_generalTensorProduct_array_rank2_taggedData_rank0_offset0(self):     def test_generalTensorProduct_array_rank2_taggedData_rank0_offset0(self):
17299        arg0=numarray.array([[-0.3892584490959401, -0.33577445592520094, 0.55394562403743186, -0.72254584494657714, 0.67372719753051968], [0.014677243288410136, 0.4280444513920163, 0.0070366694707448829, 0.027462227985203036, 0.87722162869312093], [0.27276707326054117, -0.93879042125255463, 0.99546427933437398, -0.061260432860653635, 0.016977506928772756], [0.50407957563580386, -0.04030245615703465, -0.23999141800007728, -0.54091629978512157, -0.25122928009656742]])        arg0=numarray.array([[-4.0, -6.0, -3.0, -7.0, 3.0], [1.0, 6.0, 0.0, -7.0, 4.0], [-2.0, -5.0, 1.0, -2.0, 0.0], [6.0, 6.0, 3.0, 0.0, 6.0]])
17300        arg1=Data(-0.945239857493,self.functionspace)        arg1=Data(0.0,self.functionspace)
17301        arg1.setTaggedValue(1,-0.286469622324)        arg1.setTaggedValue(1,-7.0)
17302        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17303        ref=Data(numarray.array([[0.3679426009514663, 0.31738739886859013, -0.52361148272411795, 0.68297913150959866, -0.63683380018303426], [-0.013873515354329666, -0.40460467623453988, -0.006651340447753569, -0.025958392467178792, -0.82918484729582898], [-0.25783030945762825, 0.88738212400073591, -0.94095251353758402, 0.057905802827175334, -0.016047816229942793], [-0.47647610623921455, 0.038095487914500945, 0.22684945374998147, 0.51129564612463152, 0.23747192891659594]]),self.functionspace)        ref=Data(numarray.array([[-0.0, -0.0, -0.0, -0.0, 0.0], [0.0, 0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]),self.functionspace)
17304        ref.setTaggedValue(1,numarray.array([[0.11151072089904668, 0.096189181575030966, -0.15868859370618749, 0.20698743531381955, -0.19300237582615964], [-0.0042045843415923394, -0.12262173232827206, -0.0020157920457050372, -0.0078670940791042265, -0.25129734866640302], [-0.078139480459444854, 0.26893493741786562, -0.28517027613822393, 0.017549253065013003, -0.0048635399978932802], [-0.14440348565376915, 0.011545429394046335, 0.06875025087554916, 0.15495608810848766, 0.071969556986062971]]))        ref.setTaggedValue(1,numarray.array([[28.0, 42.0, 21.0, 49.0, -21.0], [-7.0, -42.0, -0.0, 49.0, -28.0], [14.0, 35.0, -7.0, 14.0, -0.0], [-42.0, -42.0, -21.0, -0.0, -42.0]]))
17305        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17306        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17307        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17308     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17309     def test_generalTensorProduct_array_rank3_taggedData_rank1_offset1(self):     def test_generalTensorProduct_array_rank3_taggedData_rank1_offset1(self):
17310        arg0=numarray.array([[[-0.32172363035345031, 0.14499624949202183, -0.45611378928770696], [0.56406557247396893, -0.14353446769287914, 0.3925299170507961], [0.91800570446354079, -0.8242550750499964, -0.18953471105491149], [0.033358006966433873, 0.26074211199858421, 0.476071556546799], [0.39683919195503581, 0.96976017580404839, -0.66744478808777208]], [[-0.08032318878323963, -0.060702805719327735, -0.96465904355518695], [0.48031114267932895, -0.050099798155710529, -0.075567260700116101], [0.21151748581138952, -0.27607101910529419, -0.64806739705491623], [0.54237082457705887, 0.37723009166313926, -0.079221030456413155], [0.4691460968199419, -0.23642008788996471, 0.20046866106345407]], [[-0.79899416232988663, -0.37072171768814655, 0.51481993615742017], [0.29449526313966978, -0.41927604915786043, -0.84624291379545036], [0.80170474982347284, 0.25841996076897167, 0.079542409118780411], [0.080543009159201429, -0.31569641023103601, 0.3146334686490142], [-0.22736254847266713, 0.61404600670169107, -0.91025061278305319]], [[-0.080364959730342855, 0.68095888792923254, -0.9188976511741378], [-0.92344259901949965, -0.80745521132215958, 0.57707834414708925], [0.477510166859765, 0.17356017984827488, 0.54469285528980405], [-0.15673711707838667, 0.17897824162100751, -0.1828288701177998], [0.095795110018410234, -0.15108268926816915, -0.68843761318710617]]])        arg0=numarray.array([[[1.0, 2.0, -4.0], [0.0, -7.0, -6.0], [-3.0, 5.0, -1.0], [6.0, 2.0, -3.0], [-2.0, 0.0, -1.0]], [[-4.0, 4.0, 3.0], [-6.0, 7.0, 0.0], [0.0, -7.0, 0.0], [-1.0, 4.0, -5.0], [0.0, 7.0, 5.0]], [[-4.0, -1.0, 5.0], [5.0, 3.0, 4.0], [-6.0, -5.0, 0.0], [0.0, 0.0, -5.0], [-3.0, 0.0, 4.0]], [[3.0, 0.0, 7.0], [2.0, -7.0, 0.0], [-2.0, -7.0, 1.0], [2.0, 2.0, 4.0], [-6.0, 0.0, 7.0]]])
17311        arg1=Data(numarray.array([0.096764415194981357, -0.53029956611873641, -0.21595031634951312]),self.functionspace)        arg1=Data(numarray.array([4.0, 0.0, 6.0]),self.functionspace)
17312        arg1.setTaggedValue(1,numarray.array([0.709317644235822, 0.34185637918602718, 0.81199180756327682]))        arg1.setTaggedValue(1,numarray.array([4.0, 7.0, -2.0]))
17313        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17314        ref=Data(numarray.array([[-0.0095249300519657243, 0.045930781428916004, 0.56686247461977279, -0.23785136406684149, -0.33172857499875019], [0.23273667077110455, 0.089363701911464283, 0.30681806687736146, -0.13045495168827814, 0.12747884695477538], [0.0081038351025302796, 0.43358499381045501, -0.076640710208902424, 0.10726216946119593, -0.15106002718320918], [-0.1704524326801645, 0.21421651418718118, -0.16345949043633964, -0.070596707009989157, 0.23805696272109167]]),self.functionspace)        ref=Data(numarray.array([[-20.0, -36.0, -18.0, 6.0, -14.0], [2.0, -24.0, 0.0, -34.0, 30.0], [14.0, 44.0, -24.0, -30.0, 12.0], [54.0, 8.0, -2.0, 32.0, 18.0]]),self.functionspace)
17315        ref.setTaggedValue(1,numarray.array([[-0.54899701494867004, 0.66976456651662353, 0.21548015557736513, 0.49936398095688467, 0.071044043229091969], [-0.86102153687351701, 0.26220623602156268, -0.47056897139656301, 0.44934488112988524, 0.41473079944255037], [-0.27544467054642907, -0.62158381896607184, 0.7215936211736268, 0.204687544721077, -0.69047276317469775], [-0.57035150885553998, -0.46246495605138044, 0.84032517744300006, -0.19844709373841976, -0.54270512126968018]]))        ref.setTaggedValue(1,numarray.array([[26.0, -37.0, 25.0, 44.0, -6.0], [6.0, 25.0, -49.0, 34.0, 39.0], [-33.0, 33.0, -59.0, 10.0, -20.0], [-2.0, -41.0, -59.0, 14.0, -38.0]]))
17316        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17317        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17318        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17319     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17320     def test_generalTensorProduct_array_rank4_taggedData_rank2_offset2(self):     def test_generalTensorProduct_array_rank4_taggedData_rank2_offset2(self):
17321        arg0=numarray.array([[[[0.34394142670491901, 0.42181785763440138, -0.78053682698696836], [-0.21339997592323345, -0.25562372239682252, 0.37851419787675078]], [[-0.90903384152478717, -0.78901523864928036, -0.85972464421312922], [-0.60874105736015882, 0.87895662304292199, -0.91924490466595921]], [[-0.26010492366888904, -0.33304325039617821, -0.56061112482850928], [-0.8831997202589954, 0.59692575176610174, 0.4297534428119838]], [[-0.98297094637089777, -0.61755457981928341, 0.76652377626228785], [0.48310116073776732, -0.41977320248746142, -0.26493812422923946]], [[0.59948677069099898, 0.83106531027612962, -0.55831956801788296], [-0.80926577711085401, 0.16423627369625726, 0.64943473539690921]]], [[[0.60106824562496053, -0.067641295547717251, -0.88618637595206273], [0.92444262005463251, -0.026049792677669936, 0.79344758817061778]], [[-0.98368629659098095, -0.057525167303634328, 0.61260839864426941], [-0.45575307302007362, -0.91573103026900915, -0.0005366725202806677]], [[0.26291472884239275, -0.52596042952849364, -0.64751584546129037], [-0.074417820048855443, 0.28672617905052689, -0.14303430832454711]], [[-0.54100510321841155, 0.26684883293285244, -0.7446117628259743], [-0.25415023481085242, 0.3069962355525897, 0.7058869685782212]], [[-0.66608658382621733, 0.37518004777645664, -0.30208329639878961], [0.90585453729478815, -0.79849785406077722, 0.38714006068582885]]], [[[0.68982021045953235, -0.069134518433657144, -0.092494954721243028], [-0.047968254539919597, -0.89840935363937979, 0.74913248541370669]], [[0.50330424341259161, -0.88835387914840469, -0.093176844280321136], [0.71037947004371027, -0.14024272069589827, -0.19419207191705956]], [[-0.48595552662549535, 0.59180666107469526, -0.48390535342607732], [0.47499108984307958, -0.33346753162158604, -0.72265698339587536]], [[0.47409543906098328, -0.59901741170413847, -0.28700914492164875], [0.24931557956873718, -0.47221932344089157, 0.41262174310096777]], [[-0.64994446871361622, 0.88638041231936837, -0.0030157682651761331], [0.48189478968277877, 0.23056139766060935, 0.88323073629279136]]], [[[-0.6065224118758521, -0.5004568738888262, 0.60805360921696017], [0.43243425271086489, 0.46744736881152971, 0.57125340750980924]], [[-0.11513469999721182, -0.2303049507029491, 0.30451179750693202], [0.51880307538501502, 0.99649402950333421, 0.30571594821796322]], [[0.84479162813785269, 0.48016393111996392, 0.19160227116354855], [0.73826679933103456, 0.62800508822190859, -0.48618883903375498]], [[-0.88938478603580773, -0.4496096452212639, 0.42508575884863764], [-0.1489201846211381, -0.18500101610795916, -0.33969169544003575]], [[-0.21543886054319206, 0.93365614743230707, -0.67477086868569769], [0.15609116682528024, -0.32562832877017756, -0.37696736348528348]]]])        arg0=numarray.array([[[[-6.0, 2.0, 1.0], [1.0, 7.0, 0.0]], [[-4.0, -4.0, 5.0], [-5.0, 1.0, 0.0]], [[-1.0, 4.0, 2.0], [5.0, -7.0, -6.0]], [[7.0, 0.0, -5.0], [-3.0, 0.0, 0.0]], [[4.0, 5.0, -2.0], [3.0, 7.0, -7.0]]], [[[6.0, -6.0, 0.0], [6.0, -1.0, -4.0]], [[1.0, 4.0, 0.0], [-3.0, -3.0, -6.0]], [[-5.0, 5.0, 3.0], [-7.0, 1.0, 5.0]], [[0.0, 0.0, 1.0], [-3.0, 2.0, 3.0]], [[4.0, 0.0, -3.0], [4.0, -6.0, -6.0]]], [[[-5.0, -6.0, 4.0], [-2.0, -7.0, 0.0]], [[-1.0, -5.0, -3.0], [-6.0, 0.0, 3.0]], [[0.0, -4.0, 2.0], [2.0, -3.0, 6.0]], [[0.0, -7.0, 6.0], [5.0, 0.0, 2.0]], [[-3.0, -6.0, -1.0], [0.0, -2.0, 0.0]]], [[[1.0, 4.0, 4.0], [3.0, -1.0, -6.0]], [[-3.0, 7.0, 3.0], [0.0, 7.0, 5.0]], [[-1.0, -5.0, 2.0], [6.0, -4.0, -4.0]], [[0.0, -7.0, 7.0], [-5.0, -5.0, -1.0]], [[-5.0, -1.0, 3.0], [-4.0, 6.0, 5.0]]]])
17322        arg1=Data(numarray.array([[0.416301626002056, 0.95180601572720858, 0.82466132418882032], [0.80681126538239512, -0.72771350887478303, 0.38703615287081283]]),self.functionspace)        arg1=Data(numarray.array([[-1.0, 7.0, -2.0], [6.0, 2.0, 6.0]]),self.functionspace)
17323        arg1.setTaggedValue(1,numarray.array([[0.2628734536927313, -0.33499940834651487, -0.47506070215672391], [-0.21931025455150177, 0.43880363489548091, 0.5729696203998329]]))        arg1.setTaggedValue(1,numarray.array([[-3.0, -5.0, -3.0], [-2.0, 7.0, 0.0]]))
17324        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17325        ref=Data(numarray.array([[0.061339626626125493, -3.3249521430293214, -1.8682252824890153, 0.22782340152160929, 0.059068745757442365], [0.52694107383205868, 0.33940686420283583, -1.2491968441202654, -0.74053830565874701, 1.292457807730655], [1.050118263026993, -0.11281420208299336, 0.30812564579608959, 0.095023515762209826, 1.1334600096952978], [0.0024249479137856689, -0.20428017476318658, 0.91717955564578513, -0.56463742381595772, 0.45951479912270909]]),self.functionspace)        ref=Data(numarray.array([[38.0, -62.0, 5.0, -15.0, 25.0], [-38.0, -33.0, 24.0, 2.0, -22.0], [-71.0, -46.0, 10.0, -19.0, -41.0], [-1.0, 90.0, -34.0, -109.0, 10.0]]),self.functionspace)
17326        ref.setTaggedValue(1,numarray.array([[0.47141603181717784, 0.42627327909139301, 1.0113825389280993, -0.85761041414978756, 0.76607258789768329], [0.84210787498585871, -0.83252257239257232, 0.61310183500593496, 0.71702631096523306, -0.4845011282464296], [0.29396095796712501, 0.14556932996626556, -0.76067295123865319, 0.43617505456861494, 0.035193702160263407], [0.15694292753133937, 0.4008768962315078, -0.19471404815638724, -0.52827064082611574, -0.44196042662507129]]))        ref.setTaggedValue(1,numarray.array([[52.0, 34.0, -82.0, 0.0, 12.0], [-7.0, -38.0, 2.0, 17.0, -53.0], [-12.0, 49.0, -11.0, 7.0, 28.0], [-48.0, 14.0, -18.0, -11.0, 61.0]]))
17327        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17328        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17329        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17330     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17331     def test_generalTensorProduct_array_rank2_taggedData_rank1_offset0(self):     def test_generalTensorProduct_array_rank2_taggedData_rank1_offset0(self):
17332        arg0=numarray.array([[-0.20638740454294613, -0.46982967124083563, 0.61274231631602594, 0.59055732442665998, -0.62101753905962465], [-0.92022976426769731, -0.83164439946045299, -0.31845096911905091, 0.42772928890422524, -0.49576097264016106], [0.010195000771948015, -0.95999569921397554, 0.40243901535163817, -0.087677977862951284, 0.72857983178155061], [-0.052645968656485964, -0.19822425590114379, -0.42613204525544024, 0.98161872665017036, -0.50009635161373756]])        arg0=numarray.array([[4.0, 1.0, 1.0, -4.0, -6.0], [-3.0, -4.0, -3.0, 7.0, 2.0], [4.0, -6.0, 5.0, 4.0, 0.0], [1.0, 2.0, 5.0, -2.0, -7.0]])
17333        arg1=Data(numarray.array([0.82859455535615578, -0.63395112558791578]),self.functionspace)        arg1=Data(numarray.array([5.0, -1.0]),self.functionspace)
17334        arg1.setTaggedValue(1,numarray.array([-0.19989299907040969, 0.43791619466699894]))        arg1.setTaggedValue(1,numarray.array([-6.0, 5.0]))
17335        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17336        ref=Data(numarray.array([[[-0.17101147969837349, 0.13083952741716923], [-0.38929830753492906, 0.29784904891772818], [0.50771494713577847, -0.38844868112389136], [0.48933258364562937, -0.37438448054446904], [-0.51457175164548374, 0.3936947678966865]], [[-0.7624973723488927, 0.58338069485700916], [-0.68909602138537129, 0.52722190312684047], [-0.26386673915993686, 0.20188235031758492], [0.35441415995240122, -0.27115946414775238], [-0.41078484268770954, 0.31428822662779005]], [[0.0084475221314879306, -0.006463132214746114], [-0.79544720953402592, 0.60859035407625806], [0.33345877698325976, -0.25512666676266355], [-0.072649495081878984, 0.055583552755490331], [0.60369728175649673, -0.46188400443856836]], [[-0.043622162990215103, 0.033374971087445408], [-0.16424753917921309, 0.12566449014735717], [-0.35309069256144077, 0.27014688973876699], [0.81336393233797377, -0.62229829665805214], [-0.41437711410062061, 0.31703664500793904]]]),self.functionspace)        ref=Data(numarray.array([[[20.0, -4.0], [5.0, -1.0], [5.0, -1.0], [-20.0, 4.0], [-30.0, 6.0]], [[-15.0, 3.0], [-20.0, 4.0], [-15.0, 3.0], [35.0, -7.0], [10.0, -2.0]], [[20.0, -4.0], [-30.0, 6.0], [25.0, -5.0], [20.0, -4.0], [0.0, 0.0]], [[5.0, -1.0], [10.0, -2.0], [25.0, -5.0], [-10.0, 2.0], [-35.0, 7.0]]]),self.functionspace)
17337        ref.setTaggedValue(1,numarray.array([[[0.041255397264447401, -0.090380386824645456], [0.093915662036595252, -0.20574602177143389], [-0.12248289926576006, 0.26832978347255665], [-0.11804827470264198, 0.2586146162456473], [0.12413705835795366, -0.27195363752645518]], [[0.18394748741332614, -0.40298351658741949], [0.16623989316825977, -0.36419055072784318], [0.063656119274085515, -0.13945483658463276], [-0.085500090349319297, 0.18730958254455973], [0.099099147643105123, -0.2171017586029895]], [[-0.0020379092798298308, 0.0044645559426785917], [0.19189641941057653, -0.42039766349646907], [-0.0804447417215816, 0.17623456218832337], [0.017526213947454322, -0.038395606421840998], [-0.14563800763702875, 0.31905690744489884]], [[0.010523560563711766, -0.023054522258606432], [0.039623641000579989, -0.0868056118349263], [0.085180812526117491, -0.18661012368392776], [-0.19621871121377926, 0.42986673738850761], [0.099965759548240121, -0.21900029126553744]]]))        ref.setTaggedValue(1,numarray.array([[[-24.0, 20.0], [-6.0, 5.0], [-6.0, 5.0], [24.0, -20.0], [36.0, -30.0]], [[18.0, -15.0], [24.0, -20.0], [18.0, -15.0], [-42.0, 35.0], [-12.0, 10.0]], [[-24.0, 20.0], [36.0, -30.0], [-30.0, 25.0], [-24.0, 20.0], [0.0, 0.0]], [[-6.0, 5.0], [-12.0, 10.0], [-30.0, 25.0], [12.0, -10.0], [42.0, -35.0]]]))
17338        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17339        self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
17340        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17341     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17342     def test_generalTensorProduct_array_rank3_taggedData_rank2_offset1(self):     def test_generalTensorProduct_array_rank3_taggedData_rank2_offset1(self):
17343        arg0=numarray.array([[[0.42755025064893437, -0.28215544807457271, 0.30981263016541205], [-0.72628827469501189, 0.18289260582950018, 0.12961604333074539], [0.22884007759478453, -0.14789371345617308, 0.87255923698023485], [-0.84973208273614453, 0.76887809306454225, -0.48984860182559653], [0.78555581135814867, -0.32758380456486935, 0.052588360850076787]], [[-0.40981427009095772, 0.36768280837279388, 0.52107289203710594], [-0.69467790563691323, 0.21709929167288577, 0.6842873048643725], [0.7537219893748075, -0.18136604297427361, -0.5074278384153903], [0.12775029577949648, -0.49553225168880832, 0.42637231271498632], [0.92563798043710843, -0.32028382833624458, 0.42405325823388251]], [[-0.61424144461332775, -0.26841376712118969, 0.46903796892346539], [-0.74867582255602305, 0.36399532336283857, 0.98443512517672316], [-0.51827247943733923, 0.8632431190107035, -0.1426266789655839], [-0.74220887454679074, 0.38296298321562072, 0.16038704163831774], [0.92931648050543325, 0.32730270971029629, 0.20311810123090357]], [[0.55637022912337919, -0.59716175984911546, 0.76585232270996739], [-0.92236850733908815, 0.14133291962252259, -0.14108294052082559], [-0.2574358002206949, 0.52547314126271072, -0.53118509022417459], [-0.070006870815329414, -0.88913284281045457, -0.73060433594114205], [-0.93492520324576889, 0.11497007562327499, -0.66300948139030802]]])        arg0=numarray.array([[[0.0, 0.0, -7.0], [0.0, 4.0, 1.0], [4.0, -7.0, -7.0], [7.0, -4.0, -2.0], [2.0, -2.0, 4.0]], [[2.0, -1.0, -5.0], [5.0, 0.0, -1.0], [3.0, -1.0, 3.0], [5.0, 0.0, 5.0], [-1.0, -3.0, -1.0]], [[5.0, -2.0, -2.0], [4.0, 0.0, -1.0], [6.0, 2.0, 7.0], [-3.0, 6.0, 6.0], [0.0, 6.0, 4.0]], [[1.0, 7.0, 0.0], [-7.0, 5.0, -4.0], [3.0, 6.0, -7.0], [-2.0, -6.0, 1.0], [-1.0, 0.0, 0.0]]])
17344        arg1=Data(numarray.array([[0.15176526988904859, -0.29595753284131221], [-0.70585048133843342, 0.85795688884304377], [-0.10600582704861039, 0.37407844797358725]]),self.functionspace)        arg1=Data(numarray.array([[6.0, -5.0], [-7.0, 5.0], [2.0, 0.0]]),self.functionspace)
17345        arg1.setTaggedValue(1,numarray.array([[-0.093552243615000252, 0.84278948392042397], [-0.92637043494223814, -0.62544883433330911], [-0.76373622773095295, 0.42906183258782926]]))        arg1.setTaggedValue(1,numarray.array([[2.0, -2.0], [0.0, 7.0], [5.0, 2.0]]))
17346        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17347        ref=Data(numarray.array([[[0.23120489392577459, -0.25271969989302634], [-0.25306022575637721, 0.42035102532182655], [0.046624461402577186, 0.13179223007811403], [-0.61974598478489051, 0.72790706269497529], [0.34487060316942514, -0.4938717692302842]], [[-0.37696142344754585, 0.63166575738622754], [-0.33120606105149697, 0.64783412489706171], [0.2961964375493284, -0.56849176464861673], [0.32396178685066335, -0.30345727833963465], [0.32160007596490536, -0.3901100652022117]], [[0.046518710288640769, 0.12695893741028041], [-0.47490512209027946, 0.90212450828421198], [-0.67285707472072653, 0.84065845834834052], [-0.39995809719393882, 0.60822537259665688], [-0.11152051102566365, 0.081755505797582603]], [[0.42475978474157627, -0.3905121577175833], [-0.22478780100563928, 0.34146337238746338], [-0.35366656858519557, 0.32831847160891314], [0.69441855030493438, -1.0154219228890191], [-0.15275799059902262, 0.12731996714531524]]]),self.functionspace)        ref=Data(numarray.array([[[-14.0, 0.0], [-26.0, 20.0], [59.0, -55.0], [66.0, -55.0], [34.0, -20.0]], [[9.0, -15.0], [28.0, -25.0], [31.0, -20.0], [40.0, -25.0], [13.0, -10.0]], [[40.0, -35.0], [22.0, -20.0], [36.0, -20.0], [-48.0, 45.0], [-34.0, 30.0]], [[-43.0, 30.0], [-85.0, 60.0], [-38.0, 15.0], [32.0, -20.0], [-6.0, 5.0]]]),self.functionspace)
17348        ref.setTaggedValue(1,numarray.array([[[-0.015232949518136141, 0.66973742605112441], [-0.20047287318784265, -0.67088479024763337], [-0.55080923915148827, 0.65974582684298366], [-0.25865646736058256, -1.407214509321334], [0.18980980653924268, 0.88950874403591618]], [[-0.70023368361791327, -0.35178145112506409], [-0.65874069349185671, -0.42765016745235435], [0.48504078010289758, 0.53094622835398531], [0.12145911901035028, 0.60053676090221142], [-0.11375887628490222, 1.1623841710111176]], [[-0.052107045590758572, -0.14855086184366645], [-1.0190029720284706, -0.436253021943599], [-0.64226818859659884, -1.0379046622595376], [-0.40782367404119113, -0.79623362777678797], [-0.54527184774974335, 0.6656572834873723]], [[-0.083765847958285344, 1.1709951059512218], [0.063113157869583644, -0.92629229312233707], [-0.057013788689795508, -0.77353199714178134], [1.3882046776445547, 0.18363161030240444], [0.48732383168226578, -1.1443250924379207]]]))        ref.setTaggedValue(1,numarray.array([[[-35.0, -14.0], [5.0, 30.0], [-27.0, -71.0], [4.0, -46.0], [24.0, -10.0]], [[-21.0, -21.0], [5.0, -12.0], [21.0, -7.0], [35.0, 0.0], [-7.0, -21.0]], [[0.0, -28.0], [3.0, -10.0], [47.0, 16.0], [24.0, 60.0], [20.0, 50.0]], [[2.0, 47.0], [-34.0, 41.0], [-29.0, 22.0], [1.0, -36.0], [-2.0, 2.0]]]))
17349        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17350        self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
17351        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17352     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17353     def test_generalTensorProduct_array_rank4_taggedData_rank3_offset2(self):     def test_generalTensorProduct_array_rank4_taggedData_rank3_offset2(self):
17354        arg0=numarray.array([[[[0.6446513576364028, 0.80028804838252299, -0.14360652937626761], [0.32302010953836713, -0.60604301917287318, 0.5134766598938918]], [[-0.19580528894333993, 0.99422108250674168, 0.038214245374039724], [0.19589109134359961, 0.7505908134810837, 0.29158432744876039]], [[-0.36723230223067849, -0.93326043575299278, -0.62645429881920012], [0.94644308742651662, 0.74368884950369196, -0.60826123233240215]], [[-0.81573856941822442, 0.8841849749987456, 0.36237815646150251], [-0.74159572037253185, 0.60984108812104543, 0.589596356918068]], [[-0.78843485947541514, 0.4111284112397513, -0.55161605208043873], [-0.51028668061112259, -0.98732626866358797, 0.47705400586186664]]], [[[-0.1766026414717401, -0.38285517652364454, 0.71825911131865916], [0.72938956683799638, 0.15483132795919108, 0.97641123799618801]], [[-0.011286708295776604, 0.19452785900201608, -0.70912898541553271], [-0.91778721168094557, 0.26311626496118157, -0.76995304223547545]], [[0.048559305085811744, -0.12641830968371126, 0.66981820192244035], [-0.49053403582962662, -0.9819926749063701, 0.00010572712329492973]], [[0.36888442432725776, 0.0052647747818306279, -0.86247272133228803], [0.59292352989852137, -0.13388840094145849, -0.45354959536044626]], [[0.5902506282477884, -0.46413945778632071, -0.15279521399471552], [-0.27418596263846706, 0.91315283309755779, -0.25385906672411296]]], [[[0.87973752850541231, -0.24753415270333012, -0.3321949064471732], [0.81408819781812136, 0.34502077804447984, -0.10291635981290703]], [[0.29441983963832752, -0.60375817169409229, -0.7152568662238592], [-0.887307545278464, 0.69906752840147113, 0.05848532257691641]], [[-0.84967154412476509, 0.35087886838912419, 0.036102452676464614], [0.83726275694075913, 0.96944086593539303, 0.28282705297688482]], [[-0.89782755121886271, 0.11540215173671209, -0.1192345607042582], [0.44248313300899444, 0.44386524392427029, 0.1103615588836353]], [[-0.35875597823354233, -0.36467473494987779, 0.9650274689160292], [0.10968307586687986, 0.22941547717903199, 0.43273310992979908]]], [[[-0.90154945908529971, -0.46451295367949852, -0.81398919952822912], [0.18275229132820936, -0.12197220442451617, -0.22848150824543878]], [[0.82893248829801891, -0.71227718889552416, 0.35266254481389758], [0.49074642871667318, -0.27459280301816746, 0.73348581034901317]], [[-0.94431103927943738, 0.74129811715390326, 0.392460128373191], [0.76150054683136537, 0.59849843819543813, -0.1206193839256422]], [[0.30923022856451166, -0.96914430247262828, 0.96234737367655687], [0.54252606723144203, -0.63943874596282768, 0.36440143174735939]], [[0.96775783223731193, 0.48070358857609086, -0.75690885877994374], [-0.6745342962753158, 0.22436230260793111, -0.80538877647492479]]]])        arg0=numarray.array([[[[-7.0, 5.0, 0.0], [5.0, 3.0, 5.0]], [[5.0, -2.0, 0.0], [-3.0, 6.0, 0.0]], [[5.0, 0.0, 0.0], [-7.0, -3.0, -6.0]], [[6.0, -4.0, -1.0], [5.0, 6.0, -4.0]], [[-4.0, -7.0, -7.0], [-3.0, -4.0, -5.0]]], [[[5.0, -1.0, 7.0], [6.0, 6.0, -1.0]], [[4.0, -7.0, 1.0], [-6.0, 2.0, -3.0]], [[0.0, -3.0, 3.0], [7.0, -2.0, 0.0]], [[-7.0, 7.0, -3.0], [4.0, -6.0, 2.0]], [[-5.0, 3.0, -5.0], [5.0, -1.0, 0.0]]], [[[-6.0, 0.0, -2.0], [1.0, 1.0, -2.0]], [[5.0, -6.0, -2.0], [3.0, 3.0, 1.0]], [[2.0, 7.0, 6.0], [1.0, 0.0, -7.0]], [[-3.0, -6.0, -5.0], [0.0, -1.0, 0.0]], [[-2.0, -7.0, -7.0], [-7.0, -6.0, -7.0]]], [[[-2.0, 2.0, 3.0], [-7.0, 0.0, -1.0]], [[6.0, -4.0, -5.0], [-2.0, 0.0, 1.0]], [[7.0, -3.0, -5.0], [4.0, 2.0, -5.0]], [[7.0, -4.0, 4.0], [7.0, 7.0, 4.0]], [[0.0, -4.0, -4.0], [-7.0, 2.0, 1.0]]]])
17355        arg1=Data(numarray.array([[[0.25844500961342676, -0.24057576647031964], [-0.4557699928422243, -0.44332305123307236], [-0.4003119865366993, -0.73083691857074462]], [[0.51899190049650712, -0.15001177493549744], [0.10509905236496708, -0.22779166263021811], [-0.27868125954458356, -0.1192892142667259]]]),self.functionspace)        arg1=Data(numarray.array([[[4.0, -7.0], [2.0, 2.0], [1.0, 0.0]], [[2.0, 0.0], [-7.0, -4.0], [7.0, 5.0]]]),self.functionspace)
17356        arg1.setTaggedValue(1,numarray.array([[[-0.24234882833461246, -0.99048408132677723], [-0.88689279477074456, -0.95029799025034922], [0.31361448341549303, 0.96572893160361706]], [[-0.67081795212362727, 0.19415851959805575], [0.26462840562762802, -0.91137043638672455], [-0.54215522435513841, 0.67875609105144941]]]))        arg1.setTaggedValue(1,numarray.array([[[0.0, 7.0], [-6.0, 5.0], [0.0, -6.0]], [[-4.0, -1.0], [-6.0, 3.0], [6.0, -3.0]]]))
17357        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17358        ref=Data(numarray.array([[[-0.17979898549265788, -0.37657818083974842], [-0.41974547056010975, -0.65673066274350334], [1.3200882074285079, 0.72109426347490846], [-1.2439707690626269, -0.55857309587630433], [-0.67187625087518588, 0.65510330010716189]], [[-0.035963512306954631, -0.57387707332754134], [-0.041803497008610052, 0.60432455767420346], [-0.55578782810394323, -0.14790289857194006], [0.85824171870762056, 0.53490498206578274], [0.4496708903376449, 0.038837276126462969]], [[0.96061141449142351, -0.047564493043498787], [0.23425923504379673, 0.68645391741405648], [0.063635632142889961, -0.35769534869071135], [0.0086344162995526837, 0.071324710494647586], [-0.35238158492590838, -0.57763406961539476]], [[0.4502610508330297, 1.0453382456638425], [0.41911821913206471, -0.23995571722824288], [-0.24729181023606536, -0.62445895341993318], [0.24919709077631394, -0.32726392283973205], [0.23197078768452847, 0.25340529353670216]]]),self.functionspace)        ref=Data(numarray.array([[[6.0, 72.0], [-32.0, -63.0], [-15.0, -53.0], [-45.0, -94.0], [-50.0, 5.0]], [[-12.0, -66.0], [-44.0, -65.0], [25.0, 2.0], [47.0, 97.0], [-2.0, 45.0]], [[-45.0, 28.0], [-2.0, -54.0], [-19.0, -35.0], [-22.0, 13.0], [-50.0, -11.0]], [[-22.0, 13.0], [14.0, -45.0], [-24.0, -88.0], [17.0, -65.0], [-33.0, -11.0]]]),self.functionspace)
17359        ref.setTaggedValue(1,numarray.array([[[-1.5664852326111789, -0.57414180429287098], [-0.91319336825572539, -1.1620773870970198], [0.61191731867845811, -0.26124883367810792], [-0.13363270658959539, 0.018109785362887876], [-0.52414777626370923, 0.98207287199569615]], [[-0.37007390097060877, 1.8956457928337405], [0.71054708343665918, -1.7991094147993127], [0.37955444762292662, 1.5186901568244755], [-0.55183207534405954, -1.2739985800010647], [0.7838826641440928, -1.3488862405035746]], [[-0.49685427392356929, -1.1831797258155898], [0.98830838918575459, -1.1783027653772415], [-0.5523982466355849, 0.014024375697666014], [-0.16135493999032618, 0.4207639887839465], [0.46554203630743651, 1.7397803540127461]], [[0.34418546003658312, 0.53986475417900315], [-0.25810696283901607, 1.0398038938617242], [-0.59257222524953734, 0.13040793630310121], [0.35567956862079175, 2.479496283450457], [0.05026297986769801, -3.028435452767507]]]))        ref.setTaggedValue(1,numarray.array([[[-38.0, -35.0], [-12.0, 46.0], [10.0, 51.0], [-56.0, 53.0], [48.0, -15.0]], [[-60.0, 3.0], [36.0, 8.0], [2.0, -46.0], [-10.0, -24.0], [-32.0, 2.0]], [[-22.0, -22.0], [12.0, 20.0], [-88.0, 33.0], [42.0, -24.0], [64.0, 3.0]], [[10.0, -12.0], [38.0, 51.0], [-40.0, 81.0], [-22.0, 7.0], [46.0, 14.0]]]))
17360        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17361        self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5, 2),"wrong shape of result.")
17362        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17363     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17364     def test_generalTensorProduct_array_rank2_taggedData_rank2_offset0(self):     def test_generalTensorProduct_array_rank2_taggedData_rank2_offset0(self):
17365        arg0=numarray.array([[-0.86736935003086435, 0.84535952205984666, 0.18654935911191228, -0.97290443815535044, -0.041146078452910961], [0.7715753639040086, -0.9016974914949285, -0.37705471864412687, 0.036699168751018529, -0.18786439329735716], [-0.078656941195251573, -0.78154725219550381, -0.13304107060699821, -0.92478925432589887, -0.99685724223988914], [0.14499199361245219, 0.46757568422600482, -0.69195411677140495, -0.88566041750293123, -0.62741454349407322]])        arg0=numarray.array([[-5.0, -2.0, 2.0, -1.0, 1.0], [3.0, -4.0, 7.0, 0.0, -1.0], [-3.0, -1.0, -4.0, -4.0, 3.0], [1.0, -6.0, 3.0, -2.0, -5.0]])
17366        arg1=Data(numarray.array([[-0.59222744720075426, 0.41594254787990481, -0.47337739967064918, -0.95528482283443772, -0.19737685412720185], [0.046286272318936117, 0.38529318753412012, 0.35544746009379469, -0.92311602992588226, -0.81148384650552652], [0.53414350723379234, -0.90813290473925878, 0.37531695853840685, 0.71460321617606404, 0.52658026888255094], [-0.46003086980639218, 0.05069994221038443, 0.92651004111077029, -0.13634797345474858, 0.26561273167238997]]),self.functionspace)        arg1=Data(numarray.array([[-1.0, 3.0, 3.0, -1.0, -4.0], [4.0, 6.0, -1.0, 0.0, -3.0], [3.0, 1.0, 7.0, -1.0, -4.0], [-2.0, 0.0, -2.0, -5.0, -1.0]]),self.functionspace)
17367        arg1.setTaggedValue(1,numarray.array([[-0.22932975435162972, -0.46088679837245783, 0.27362719346863673, -0.3475766380511458, 0.83715896373429], [0.0060625596157315442, -0.58774624531312769, 0.73802945018602162, -0.43159817378079657, 0.36762242847379323], [-0.40298914046960577, 0.36413753237448954, 0.75352858501328335, 0.99216000271882598, -0.09067551717619815], [0.046971777975209905, 0.2331976311861359, -0.68597585256510385, 0.95860115472180629, -0.080016842972410851]]))        arg1.setTaggedValue(1,numarray.array([[3.0, -6.0, 2.0, 7.0, -5.0], [-2.0, 3.0, -6.0, 7.0, 4.0], [-7.0, 6.0, -5.0, 0.0, 7.0], [4.0, 1.0, 1.0, 3.0, -1.0]]))
17368        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17369        ref=Data(numarray.array([[[[0.51367993594895622, -0.36077581740477471, 0.41059304747163167, 0.82858477587625567, 0.1711986336754478], [-0.040147293936627207, -0.33419150164278971, -0.30830423243167632, 0.80068255087988438, 0.70385621650404417], [-0.46329970669258075, 0.78768664732533178, -0.32553842638301883, -0.61982492714459791, -0.45673958555973598], [0.39901667653810358, -0.04397557592162353, -0.80362641215531827, 0.11826405311347082, -0.23038434243060327]], [[-0.50064511171635273, 0.35162099348011122, -0.40017409233951301, -0.80755912126234553, -0.16685440307064742], [0.039128541045467743, 0.32571126486675867, 0.3004808949822767, -0.78036492586392692, -0.68599559664119791], [0.45154329998652892, -0.7676987983172, 0.3172777646909829, 0.60409663328902674, 0.44514964442869881], [-0.38889147623230724, 0.04285967891543243, 0.78323408553704965, -0.11526305767353492, 0.22453825189958188]], [[-0.11047965072378457, 0.077593815734372129, -0.088308250526623167, -0.17820777146910102, -0.036820525640954907], [0.0086346744367769793, 0.071876197204675946, 0.066308495878454415, -0.17220670376860617, -0.15138179149527536], [0.099644128948253044, -0.16941161136754801, 0.070015138079171951, 0.13330877199695607, 0.098233211681018326], [-0.085818463934078021, 0.0094580417263582049, 0.17283985437996571, -0.025435627064191377, 0.049549884865448673]], [[0.5761807117790273, -0.40467235085000375, 0.4605509730620137, 0.92940084383807209, 0.19202881736949587], [-0.045032119764760091, -0.37485345214296723, -0.34581641145629965, 0.89810368244723815, 0.78949623575660188], [-0.51967058879962114, 0.88352653345573495, -0.36514753467698369, -0.69524064053778001, -0.51231228064087153], [0.44756607492310513, -0.049326198790702797, -0.90140573099216459, 0.1326535485076128, -0.25841580547463444]], [[0.024367837004489419, -0.017114404706970236, 0.01947762362468352, 0.039306224265220922, 0.0081212835247066097], [-0.0019044985921277465, -0.015853303721651044, -0.014625269078907214, 0.037982604588470054, 0.033389378011586347], [-0.021977910653754634, 0.03736610774407146, -0.015442821020729219, -0.029403119995482823, -0.02166671305519639], [0.018928466259814682, -0.0020861037997465296, -0.038122254838953512, 0.0056101844126645066, -0.010928922295484146]]], [[[-0.45694810808786401, 0.32093102274359808, -0.36524633941481444, -0.73707423481045764, -0.15229111804942419], [0.035713347408243175, 0.29728273138137418, 0.27425450337062524, -0.71225358671568628, -0.6261209441697263], [0.41213197097087678, -0.70069297644739803, 0.28958531886361699, 0.55137023656802153, 0.40629636258772495], [-0.35494848577794463, 0.039118826360889571, 0.71487232213076057, -0.10520273723592174, 0.20494024009766207]], [[0.53401000353536532, -0.37505435202931936, 0.42684321381341656, 0.86137792841298966, 0.17797421424565835], [-0.041736215640635843, -0.34741790068960116, -0.32050608312481838, 0.83237140854292535, 0.73171294878268889], [-0.48163586057101376, 0.81886116214739246, -0.33842236002958753, -0.64435592744016501, -0.47481610752212117], [0.41480868131465387, -0.045716010710041478, -0.83543177991444462, 0.1229446256345639, -0.23950233385810957]], [[0.2233021534776099, -0.15683310036297879, 0.17848918224530502, 0.36019465009884349, 0.074421874199794971], [-0.017452457386301894, -0.14527661442117648, -0.13402314205843527, 0.34806525493958695, 0.30597381342839514], [-0.20140132983562473, 0.34241579688793489, -0.14151503020406841, -0.269444514617454, -0.19854957512705892], [0.17345681018246217, -0.019116652445409991, -0.3493449828719799, 0.051410646768677105, -0.10015053380903097]], [[-0.021734255023805396, 0.015264745755373231, -0.017372557073431497, -0.035058158918487868, -0.0072435664771593484], [0.0016986677186882342, 0.014139939707932503, 0.013044626320103095, -0.033877590959020223, -0.029780782621631936], [0.019602622709233831, -0.033327722719378693, 0.013773820396520017, 0.02622534402046595, 0.019325058148677448], [-0.016882750521702621, 0.0018606457348457855, 0.034002148348237275, -0.0050038572866752135, 0.009747766462064043]], [[0.11125845006241232, -0.078140794404015251, 0.088930757989807069, 0.17946400366796497, 0.037080082951547744], [-0.0086955424671931909, -0.072382870917702333, -0.066775921439607311, 0.17342063290509085, 0.15244892049436645], [-0.1003465459201989, 0.17060583718220748, -0.07050869271002716, -0.13424849965525643, -0.098925682735979639], [0.086423420254233371, -0.0095247138835649406, -0.17405824675718429, 0.025614929310400502, -0.049899174687687266]]], [[[0.046582799488683685, -0.032716768529192787, 0.037234418289055354, 0.075139782134404684, 0.015525059608387064], [-0.003640736599937959, -0.030305983594802324, -0.027958409966599138, 0.072609483282274206, 0.063828837195481755], [-0.042014094438313838, 0.071430956485548883, -0.029521283937336142, -0.056208503152698319, -0.041419193244074573], [0.036184621074361822, -0.0039879023730448613, -0.072876445820459976, 0.010724714530121882, -0.020892285015865313]], [[0.4628537340345073, -0.32507875536673636, 0.36996680596404863, 0.74660022835032347, 0.15425933799010738], [-0.036174908945237332, -0.30112483200693851, -0.27779898573617623, 0.72145879664619572, 0.63421297043743219], [-0.41745839035663962, 0.70974877632728894, -0.2933279376480657, -0.55849618001247248, -0.41154736220552723], [0.35953586222229339, -0.039624400520996791, -0.72411137676166581, 0.10656238399598425, -0.20758890058669804]], [[0.078790573618437859, -0.055337441880945151, 0.062978636053340045, 0.12709211556451019, 0.026259227986124248], [-0.0061579752237183264, -0.05125981816712228, -0.047289110635416721, 0.12281234491582117, 0.10796067971938025], [-0.071063024060160629, 0.12081897389995411, -0.049932569980912007, -0.095071576939267738, -0.070056802732655563], [0.061202999431311023, -0.0067451745913824843, -0.12326388779751081, 0.018139880363514323, -0.035337402188544101]], [[0.54768557928811623, -0.38465919869627163, 0.43777433245615266, 0.8834371389779081, 0.18253199374948673], [-0.042805047263354427, -0.35631499959652768, -0.32871399157217507, 0.85368778497144082, 0.75045154130735803], [-0.4939701757577592, 0.83983155180263169, -0.3470890902225976, -0.66085737542635137, -0.48697577420262561], [0.4254316050551481, -0.046886761751107585, -0.85682653004428722, 0.12609314070006439, -0.24563580006277458]], [[0.59036621979531345, -0.41463534120979495, 0.47188968917437313, 0.95228259404435867, 0.19675654648722732], [-0.046140805777419178, -0.38408230437907942, -0.35433037483027324, 0.92021489985935001, 0.80893354934971662], [-0.53246482358142055, 0.9052788630056775, -0.37413742825445906, -0.71235739137302656, -0.52492535465619905], [0.45858510422041759, -0.050540604573565573, -0.92359824448924877, 0.13591946480309827, -0.2647779751987423]]], [[[-0.08586823824165063, 0.060308339245350243, -0.068635932909325986, -0.13850865093048331, -0.028618063572857157], [0.0067111389004114079, 0.055864427385868484, 0.05153703586348183, -0.13384443351456574, -0.11765866068913743], [0.077446531988974832, -0.13167200032321225, 0.054417954055045667, 0.10361174495523767, 0.076349922982262175], [-0.066700792936499234, 0.0073510856971197545, 0.13433653796260561, -0.019769364496221707, 0.038511719494029144]], [[-0.2769111538423128, 0.19448462142365427, -0.22133976154813073, -0.44666795466753001, -0.092288617618902752], [0.021642335449797743, 0.18015372578888461, 0.1661985893597516, -0.43162660931258756, -0.37943011476817184], [0.24975251586971842, -0.42462086430160817, 0.17548908369021868, 0.33413108775362677, 0.24621612952267236], [-0.21509924871480796, 0.023706060169239401, 0.43321356641463227, -0.063752996980933216, 0.12419405475085596]], [[0.40979422015558176, -0.28781315834588733, 0.32755544048864843, 0.66101326584953135, 0.13657572676870638], [-0.03202797668109017, -0.26660520727821135, -0.24595333330784092, 0.63875393716488971, 0.56150958828299391], [-0.36960279877713931, 0.6283863020099042, -0.25970211455477332, -0.49447263729111374, -0.36436938486387449], [0.3183202542044633, -0.035082033732547833, -0.64110243717664117, 0.094346541545451523, -0.18379182314760878]], [[0.52451240814451516, -0.36838385061254947, 0.4192516254287591, 0.84605795502576175, 0.17480886703171275], [-0.040993919266643329, -0.341238925332504, -0.3148057459070267, 0.81756732846780522, 0.71869912229296917], [-0.4730697616231605, 0.80429736755952164, -0.33240337419505572, -0.63289578278743031, -0.46637130078732586], [0.40743113221696592, -0.044902931985423562, -0.82057326983082279, 0.12075800309561122, -0.23524268282706295]], [[0.37157211343012159, -0.26096840379783215, 0.29700386511477178, 0.59935959102548531, 0.12383710882851463], [-0.029040680417027662, -0.24173854936809633, -0.223012905910876, 0.5791764225080086, 0.50913676710807954], [-0.33512940475141301, 0.56977579185892868, -0.23547931820695855, -0.44835245065650176, -0.33038411901393205], [0.288630058172759, -0.03180988109710424, -0.58130587448618898, 0.085546701521453092, -0.16664929078844631]]]]),self.functionspace)        ref=Data(numarray.array([[[[5.0, -15.0, -15.0, 5.0, 20.0], [-20.0, -30.0, 5.0, 0.0, 15.0], [-15.0, -5.0, -35.0, 5.0, 20.0], [10.0, 0.0, 10.0, 25.0, 5.0]], [[2.0, -6.0, -6.0, 2.0, 8.0], [-8.0, -12.0, 2.0, 0.0, 6.0], [-6.0, -2.0, -14.0, 2.0, 8.0], [4.0, 0.0, 4.0, 10.0, 2.0]], [[-2.0, 6.0, 6.0, -2.0, -8.0], [8.0, 12.0, -2.0, 0.0, -6.0], [6.0, 2.0, 14.0, -2.0, -8.0], [-4.0, 0.0, -4.0, -10.0, -2.0]], [[1.0, -3.0, -3.0, 1.0, 4.0], [-4.0, -6.0, 1.0, 0.0, 3.0], [-3.0, -1.0, -7.0, 1.0, 4.0], [2.0, 0.0, 2.0, 5.0, 1.0]], [[-1.0, 3.0, 3.0, -1.0, -4.0], [4.0, 6.0, -1.0, 0.0, -3.0], [3.0, 1.0, 7.0, -1.0, -4.0], [-2.0, 0.0, -2.0, -5.0, -1.0]]], [[[-3.0, 9.0, 9.0, -3.0, -12.0], [12.0, 18.0, -3.0, 0.0, -9.0], [9.0, 3.0, 21.0, -3.0, -12.0], [-6.0, 0.0, -6.0, -15.0, -3.0]], [[4.0, -12.0, -12.0, 4.0, 16.0], [-16.0, -24.0, 4.0, 0.0, 12.0], [-12.0, -4.0, -28.0, 4.0, 16.0], [8.0, 0.0, 8.0, 20.0, 4.0]], [[-7.0, 21.0, 21.0, -7.0, -28.0], [28.0, 42.0, -7.0, 0.0, -21.0], [21.0, 7.0, 49.0, -7.0, -28.0], [-14.0, 0.0, -14.0, -35.0, -7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[1.0, -3.0, -3.0, 1.0, 4.0], [-4.0, -6.0, 1.0, 0.0, 3.0], [-3.0, -1.0, -7.0, 1.0, 4.0], [2.0, 0.0, 2.0, 5.0, 1.0]]], [[[3.0, -9.0, -9.0, 3.0, 12.0], [-12.0, -18.0, 3.0, 0.0, 9.0], [-9.0, -3.0, -21.0, 3.0, 12.0], [6.0, 0.0, 6.0, 15.0, 3.0]], [[1.0, -3.0, -3.0, 1.0, 4.0], [-4.0, -6.0, 1.0, 0.0, 3.0], [-3.0, -1.0, -7.0, 1.0, 4.0], [2.0, 0.0, 2.0, 5.0, 1.0]], [[4.0, -12.0, -12.0, 4.0, 16.0], [-16.0, -24.0, 4.0, 0.0, 12.0], [-12.0, -4.0, -28.0, 4.0, 16.0], [8.0, 0.0, 8.0, 20.0, 4.0]], [[4.0, -12.0, -12.0, 4.0, 16.0], [-16.0, -24.0, 4.0, 0.0, 12.0], [-12.0, -4.0, -28.0, 4.0, 16.0], [8.0, 0.0, 8.0, 20.0, 4.0]], [[-3.0, 9.0, 9.0, -3.0, -12.0], [12.0, 18.0, -3.0, 0.0, -9.0], [9.0, 3.0, 21.0, -3.0, -12.0], [-6.0, 0.0, -6.0, -15.0, -3.0]]], [[[-1.0, 3.0, 3.0, -1.0, -4.0], [4.0, 6.0, -1.0, 0.0, -3.0], [3.0, 1.0, 7.0, -1.0, -4.0], [-2.0, 0.0, -2.0, -5.0, -1.0]], [[6.0, -18.0, -18.0, 6.0, 24.0], [-24.0, -36.0, 6.0, 0.0, 18.0], [-18.0, -6.0, -42.0, 6.0, 24.0], [12.0, 0.0, 12.0, 30.0, 6.0]], [[-3.0, 9.0, 9.0, -3.0, -12.0], [12.0, 18.0, -3.0, 0.0, -9.0], [9.0, 3.0, 21.0, -3.0, -12.0], [-6.0, 0.0, -6.0, -15.0, -3.0]], [[2.0, -6.0, -6.0, 2.0, 8.0], [-8.0, -12.0, 2.0, 0.0, 6.0], [-6.0, -2.0, -14.0, 2.0, 8.0], [4.0, 0.0, 4.0, 10.0, 2.0]], [[5.0, -15.0, -15.0, 5.0, 20.0], [-20.0, -30.0, 5.0, 0.0, 15.0], [-15.0, -5.0, -35.0, 5.0, 20.0], [10.0, 0.0, 10.0, 25.0, 5.0]]]]),self.functionspace)
17370        ref.setTaggedValue(1,numarray.array([[[[0.19891359997471086, 0.39975908274212479, -0.23733584094966101, 0.30147732263233534, -0.72612602624672307], [-0.0052584783934204364, 0.50979307878032853, -0.64014412451148572, 0.37435502746675758, -0.31886442684208194], [0.34954042883861863, -0.31584173477750382, -0.65358759901264851, -0.86056917668484867, 0.078649164396831464], [-0.040741880532151886, -0.20226847779065593, 0.59499442937626212, -0.83146126050988911, 0.069404157080501738]], [[-0.19386609153279574, -0.38961504359583388, 0.23131335349322393, -0.29382722062208494, 0.70770030147053586], [0.0051250424992141455, -0.49685688503037501, 0.62390022327534667, -0.36485562590923681, 0.31077312043308603], [-0.34067070718269432, 0.30782713033215042, 0.63700256448526171, 0.83873190570528289, -0.076653411862600287], [0.039708039779424678, 0.19713583804500023, -0.57989621886903198, 0.81036261400164333, -0.067643000131895031]], [[-0.042781318699588802, -0.085978136859523144, 0.051044977577165411, -0.064840199070714352, 0.15617146815942443], [0.0011309666108924809, -0.10964368538359674, 0.13767892093791934, -0.080514362712679338, 0.068579728426950939], [-0.075177365883665345, 0.067929623293054228, 0.14057027460673413, 0.18508681264367013, -0.01691545961636096], [0.0087625550776224449, 0.043502868644189743, -0.12796835566226775, 0.17882643105729204, -0.014927090774661766]], [[0.22311593580977684, 0.44839881162377437, -0.26621311092562938, 0.33815885375907562, -0.81447567125862486], [-0.0058982911567266151, 0.57182093057428529, -0.71803212757533352, 0.4199037787710812, -0.3576614922276013], [0.39206992329128937, -0.35427102134607846, -0.73311130463634466, -0.96527687000537032, 0.088218613092754888], [-0.045699051260129457, -0.22687901034830618, 0.66738895142798982, -0.93262731784968911, 0.077848741655038287]], [[0.0094360200641389561, 0.018963684363744106, -0.011258685969310372, 0.014301415617651482, -0.034445808399368741], [-0.00024945055357433987, 0.024183453120057805, -0.030367017657912786, 0.017758572318517754, -0.015126221283032345], [0.016581422789433555, -0.014982831474730151, -0.031004746275467544, -0.040823493309709163, 0.0037309419434901243], [-0.0019327044616407019, -0.009595168027817744, 0.028225216246446246, -0.039442678317234484, 0.0032923792984970741]]], [[[-0.17694518866787559, -0.3556088991727826, 0.21112400137459594, -0.26818157098884471, 0.64593123208878755], [0.0046777216416978131, -0.45349052311069121, 0.56944534159915505, -0.33301051799522363, 0.28364840902894239], [-0.3109364927071997, 0.2809595490529545, 0.58140409219369682, 0.76552621514878028, -0.069962995162409267], [0.036242266684440881, 0.17992954714399559, -0.52928206807228251, 0.73963303479328057, -0.061739024734887814]], [[0.20678606422401269, 0.41558046995557413, -0.24672895395546723, 0.31340898263295891, -0.75486413758170312], [-0.005466594797543591, 0.52996931503441014, -0.66547930388211696, 0.3891709906319365, -0.33148422157209312], [0.36337429706114088, -0.32834189950123055, -0.67945483487620062, -0.89462818561316682, 0.081761886377783172], [-0.042354334371303502, -0.21027371906309825, 0.6185427054840491, -0.86436825655679461, 0.072150986585566457]], [[0.086469866003780482, 0.17377954208711952, -0.1031724244466989, 0.13105541146764629, -0.31565473753124151], [-0.0022859167101729034, 0.22161249516068335, -0.27827748669097002, 0.16273612798223722, -0.13861377133545677], [0.15194895697640573, -0.1372997748172298, -0.28412150861249058, -0.37409861067510308, 0.034189631616782089], [-0.017710930528657166, -0.087928267215365341, 0.25865043208560029, -0.3614450886855658, 0.030170728213753654]], [[-0.0084162113545800856, -0.016914162388587482, 0.010041890547973095, -0.012755773693750689, 0.03072303808151251], [0.00022249089840084199, -0.021569798639524008, 0.027085067335598231, -0.015839294212212873, 0.013491437539218977], [-0.014789366470921973, 0.013363544749190864, 0.027653872700118699, 0.036411447367789194, -0.003327716106435175], [0.0017238252064476038, 0.0085581592192377834, -0.025174743572410552, 0.035179865542056793, -0.0029365516231682569]], [[0.043082895166300872, 0.086584218755003162, -0.051404806690644012, 0.065297274231813612, -0.15727236081538662], [-0.0011389390840384653, 0.11041659178855039, -0.13864945489477903, 0.081081929065576666, -0.069063164487730241], [0.075707310379745929, -0.068408476596330231, -0.14156119045573648, -0.18639153696467647, 0.017034701021230555], [-0.0088243245714109721, -0.043809531501164276, 0.12887043735878057, -0.18008702434595814, 0.015032315658581862]]], [[[0.018038377002357629, 0.036251945797250183, -0.021522678066084284, 0.027339315180032214, -0.06584836338152579], [-0.00047686239518730306, 0.046230321855324587, -0.05805113906364575, 0.033948192175054084, -0.028916055738518732], [0.03169789312424276, -0.028641944470964239, -0.059270253600330954, -0.07804027099013533, 0.0071322588223772417], [-0.0036946563780324987, -0.018342612363079856, 0.053956762296575936, -0.075400634656653379, 0.0062938801123105991]], [[0.17923203936018609, 0.36020481084117761, -0.21385258118138054, 0.27164756639622417, -0.65427928775736977], [-0.0047381768089464179, 0.45935146301269947, -0.57680488883224368, 0.33731436677097909, -0.28731429881913123], [0.31495505539864826, -0.28459068784853359, -0.58891819506789767, -0.77541992386318204, 0.07086720129046388], [-0.036710664007262583, -0.18225496787202503, 0.53612254264472492, -0.74919209842426471, 0.062536943754446808]], [[0.030510276040980725, 0.06131687308410351, -0.036403654766255657, 0.046241968044305554, -0.11137652480345513], [-0.00080656942189567631, 0.07819438972170191, -0.098188228192242571, 0.057420283111822443, -0.048908881463298075], [0.053614106691070341, -0.04844524715529256, -0.10025024968314368, -0.13199802897515486, 0.012063567882964657], [-0.0062491756301361447, -0.031024862516019436, 0.091262961835809772, -0.12753332390929384, 0.010645526455641601]], [[0.21208169252158521, 0.42622315859551618, -0.25304748821114903, 0.32143513992442196, -0.77419561382407631], [-0.005606589986338683, 0.54354141193597416, -0.68252170490808406, 0.39913735329916256, -0.33997327150175533], [0.37268002671632161, -0.33675047703667704, -0.69685513824768397, -0.91753890908632485, 0.083855743914991523], [-0.043438995528056051, -0.21565866345519261, 0.63438309717925512, -0.88650404707112485, 0.073998716545968374]], [[0.22860902648651682, 0.45943834281034013, -0.27276724948298581, 0.3464842888746773, -0.83452797590456773], [-0.006043506459453069, 0.5858991012396938, -0.7357100024042591, 0.4302417652708973, -0.36646708023391644], [0.40172264322115453, -0.36299313631887198, -0.75116042720526754, -0.9890418841710098, 0.090390545990940582], [-0.046824157055472111, -0.2324647475210862, 0.68381999663120618, -0.95558850350395308, 0.079765369418219739]]], [[[-0.033250978278096727, -0.06682489572568294, 0.039673752287597792, -0.050395829684149338, 0.12138134712236927], [0.00087902260507925864, -0.085218499846183765, 0.10700836132717324, -0.062578279655971278, 0.053302308801066386], [-0.058430198880856675, 0.052797026768096091, 0.10925561178504611, 0.14385525677673855, -0.01314722400721712], [0.006810531732147157, 0.0338117894513792, -0.099461006433415974, 0.13898949250231343, -0.011601801585144384]], [[-0.10722901680434488, -0.2154994600997347, 0.12794142220893923, -0.16251838435773891, 0.3914351752739938], [0.0028347054604866218, -0.27481585280355098, 0.3450846251496712, -0.20180481141625009, 0.17189130853045939], [-0.18842792309072548, 0.17026185585237091, 0.35233164372143921, 0.46390989213292988, -0.042397666986207699], [0.021962861226070756, 0.10903754196174101, -0.32074562862564543, 0.44821859081888688, -0.037413930102429792]], [[0.15868566762178521, 0.31891251749941463, -0.18933746298122889, 0.24050708559305489, -0.57927559134802531], [-0.0041950130842775086, 0.40669343406135477, -0.51068251635475415, 0.29864613313864241, -0.25437785279994257], [0.2788499947621137, -0.25196646459750877, -0.52140720650487304, -0.68652919837721993, 0.062743297400446554], [-0.0325023151420189, -0.1613620609205865, 0.47466381518819795, -0.66330801535157635, 0.055367983905810748]], [[0.20310828598490904, 0.40818919426814027, -0.24234077440758814, 0.307834870370643, -0.74143855733723252], [-0.00536936908040521, 0.52054358500980491, -0.65364347098121067, 0.38224941878420293, -0.32558863348554118], [0.35691153039745843, -0.32250219895127752, -0.6673704412032575, -0.87871684223766477, 0.080307716399565868], [-0.041601044492379391, -0.20653391139700769, 0.60754165997973908, -0.84899509890970692, 0.070867750554211878]], [[0.14388482313613571, 0.28916708020330062, -0.17167768067768915, 0.21807463769206437, -0.52524570906332091], [-0.0038037380737098109, 0.36876054219349158, -0.4630504105736446, 0.27079097117555417, -0.23065165813906757], [0.25284124760080667, -0.22846518364379867, -0.47277479317584409, -0.62249561517891061, 0.056891138215193357], [-0.029470776635421286, -0.14631158531454871, 0.43039122638509231, -0.6014403058826735, 0.050203731005372093]]]]))        ref.setTaggedValue(1,numarray.array([[[[-15.0, 30.0, -10.0, -35.0, 25.0], [10.0, -15.0, 30.0, -35.0, -20.0], [35.0, -30.0, 25.0, 0.0, -35.0], [-20.0, -5.0, -5.0, -15.0, 5.0]], [[-6.0, 12.0, -4.0, -14.0, 10.0], [4.0, -6.0, 12.0, -14.0, -8.0], [14.0, -12.0, 10.0, 0.0, -14.0], [-8.0, -2.0, -2.0, -6.0, 2.0]], [[6.0, -12.0, 4.0, 14.0, -10.0], [-4.0, 6.0, -12.0, 14.0, 8.0], [-14.0, 12.0, -10.0, 0.0, 14.0], [8.0, 2.0, 2.0, 6.0, -2.0]], [[-3.0, 6.0, -2.0, -7.0, 5.0], [2.0, -3.0, 6.0, -7.0, -4.0], [7.0, -6.0, 5.0, 0.0, -7.0], [-4.0, -1.0, -1.0, -3.0, 1.0]], [[3.0, -6.0, 2.0, 7.0, -5.0], [-2.0, 3.0, -6.0, 7.0, 4.0], [-7.0, 6.0, -5.0, 0.0, 7.0], [4.0, 1.0, 1.0, 3.0, -1.0]]], [[[9.0, -18.0, 6.0, 21.0, -15.0], [-6.0, 9.0, -18.0, 21.0, 12.0], [-21.0, 18.0, -15.0, 0.0, 21.0], [12.0, 3.0, 3.0, 9.0, -3.0]], [[-12.0, 24.0, -8.0, -28.0, 20.0], [8.0, -12.0, 24.0, -28.0, -16.0], [28.0, -24.0, 20.0, 0.0, -28.0], [-16.0, -4.0, -4.0, -12.0, 4.0]], [[21.0, -42.0, 14.0, 49.0, -35.0], [-14.0, 21.0, -42.0, 49.0, 28.0], [-49.0, 42.0, -35.0, 0.0, 49.0], [28.0, 7.0, 7.0, 21.0, -7.0]], [[0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]], [[-3.0, 6.0, -2.0, -7.0, 5.0], [2.0, -3.0, 6.0, -7.0, -4.0], [7.0, -6.0, 5.0, 0.0, -7.0], [-4.0, -1.0, -1.0, -3.0, 1.0]]], [[[-9.0, 18.0, -6.0, -21.0, 15.0], [6.0, -9.0, 18.0, -21.0, -12.0], [21.0, -18.0, 15.0, 0.0, -21.0], [-12.0, -3.0, -3.0, -9.0, 3.0]], [[-3.0, 6.0, -2.0, -7.0, 5.0], [2.0, -3.0, 6.0, -7.0, -4.0], [7.0, -6.0, 5.0, 0.0, -7.0], [-4.0, -1.0, -1.0, -3.0, 1.0]], [[-12.0, 24.0, -8.0, -28.0, 20.0], [8.0, -12.0, 24.0, -28.0, -16.0], [28.0, -24.0, 20.0, 0.0, -28.0], [-16.0, -4.0, -4.0, -12.0, 4.0]], [[-12.0, 24.0, -8.0, -28.0, 20.0], [8.0, -12.0, 24.0, -28.0, -16.0], [28.0, -24.0, 20.0, 0.0, -28.0], [-16.0, -4.0, -4.0, -12.0, 4.0]], [[9.0, -18.0, 6.0, 21.0, -15.0], [-6.0, 9.0, -18.0, 21.0, 12.0], [-21.0, 18.0, -15.0, 0.0, 21.0], [12.0, 3.0, 3.0, 9.0, -3.0]]], [[[3.0, -6.0, 2.0, 7.0, -5.0], [-2.0, 3.0, -6.0, 7.0, 4.0], [-7.0, 6.0, -5.0, 0.0, 7.0], [4.0, 1.0, 1.0, 3.0, -1.0]], [[-18.0, 36.0, -12.0, -42.0, 30.0], [12.0, -18.0, 36.0, -42.0, -24.0], [42.0, -36.0, 30.0, 0.0, -42.0], [-24.0, -6.0, -6.0, -18.0, 6.0]], [[9.0, -18.0, 6.0, 21.0, -15.0], [-6.0, 9.0, -18.0, 21.0, 12.0], [-21.0, 18.0, -15.0, 0.0, 21.0], [12.0, 3.0, 3.0, 9.0, -3.0]], [[-6.0, 12.0, -4.0, -14.0, 10.0], [4.0, -6.0, 12.0, -14.0, -8.0], [14.0, -12.0, 10.0, 0.0, -14.0], [-8.0, -2.0, -2.0, -6.0, 2.0]], [[-15.0, 30.0, -10.0, -35.0, 25.0], [10.0, -15.0, 30.0, -35.0, -20.0], [35.0, -30.0, 25.0, 0.0, -35.0], [-20.0, -5.0, -5.0, -15.0, 5.0]]]]))
17371        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17372        self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
17373        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17374     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17375     def test_generalTensorProduct_array_rank3_taggedData_rank3_offset1(self):     def test_generalTensorProduct_array_rank3_taggedData_rank3_offset1(self):
17376        arg0=numarray.array([[[-0.42968821070122565, -0.83374541198634078, 0.8180517380411263], [0.4127367793558312, 0.67706145652552485, -0.10954772861839124], [-0.31600498783913777, 0.93953932632353809, -0.65512725277830897], [0.1938593357262639, -0.82489459737761561, -0.83309972270078969], [-0.63947596278675967, -0.84091472907262421, -0.54829662970565041]], [[-0.022576215107380726, 0.034985935016746961, -0.50174860162054236], [0.43216583525662289, 0.22715297905752618, -0.23575606496128443], [0.37569069115540055, -0.058249639476874782, -0.43053065733867468], [0.56335713850872371, 0.13086344165573927, 0.78487741378766596], [0.12286952981818144, 0.086273954040547718, -0.37256737261195561]], [[0.022025573296951872, -0.84334403517116607, 0.90027253814442121], [-0.89645525423054218, 0.13559938837843388, -0.10285619911413035], [0.86981784095304748, -0.57762876314464084, -0.31009363368501885], [0.1653595785969284, -0.84429993630952227, 0.31109981806634668], [-0.30411067189018137, -0.80605311138183655, 0.69552605006501911]], [[-0.092108334609104059, -0.70362190241263756, 0.033367789574625384], [-0.071623885021385059, -0.84965491357802425, 0.15214272840821597], [-0.59701980560933521, 0.19395368649287548, 0.84514896608958079], [-0.58214093158961955, 0.87895849382572, 0.71039035504350689], [0.80553437635252911, 0.38777013343842359, -0.77270431489354463]]])        arg0=numarray.array([[[5.0, 1.0, -6.0], [6.0, -5.0, -7.0], [-2.0, 3.0, 7.0], [2.0, 1.0, 0.0], [0.0, -3.0, 7.0]], [[6.0, -3.0, 7.0], [4.0, 4.0, 7.0], [5.0, 1.0, -7.0], [-1.0, -5.0, 3.0], [-1.0, 0.0, 4.0]], [[0.0, 0.0, 1.0], [-4.0, -7.0, -2.0], [7.0, 3.0, -3.0], [0.0, 2.0, -1.0], [-7.0, -4.0, 5.0]], [[5.0, 0.0, -4.0], [-7.0, 4.0, 4.0], [-3.0, 2.0, -5.0], [0.0, -3.0, 3.0], [-5.0, 3.0, -3.0]]])
17377        arg1=Data(numarray.array([[[0.77403238851807066, 0.70296753122563782, -0.75386369060124636, -0.80579617722296915, -0.9618133994511604], [-0.34498860729233605, -0.98058941499024499, 0.89345126752310899, 0.6394562141116833, -0.84059506330536427], [0.69310205109384904, 0.48750817635799715, 0.57501556145761512, 0.620615386904392, -0.91998069662511539], [-0.071426656659054233, 0.047995785009673497, -0.58048370729409049, -0.4585784298071558, 0.94365855674721977]], [[0.93153984797621692, 0.26781040393137534, -0.049679753157566342, -0.87549619804124434, -0.27646634568328032], [-0.22303685233366921, 0.35619062350746544, -0.31646489833116709, 0.034909682620052562, -0.37962010535389323], [0.022545982462432113, 0.30252089211916688, -0.021817360092728499, 0.71065108612848316, -0.6964014602416646], [-0.96644651532705805, 0.12929236310612691, -0.84759224195965155, 0.19330387536996896, 0.71955306457964774]], [[-0.91728052250968162, -0.79166682565260627, -0.3497725720023559, -0.28397144874865909, 0.034883139753032477], [-0.63499436911936424, -0.57864964958269649, 0.44241438550054313, -0.25160360132570414, 0.060722569967385231], [-0.46820611179689076, 0.10247994249724535, 0.57340187810386811, -0.66361132944864387, 0.96953620914722349], [-0.7182160939222344, 0.019061836373879482, 0.25998281659517919, -0.13574557328924874, -0.52438000113221817]]]),self.functionspace)        arg1=Data(numarray.array([[[0.0, -2.0, 3.0, 6.0, -1.0], [-7.0, 6.0, 1.0, 0.0, 0.0], [6.0, 2.0, 7.0, -3.0, 0.0], [-3.0, -4.0, 5.0, 6.0, -2.0]], [[3.0, -4.0, -3.0, 5.0, 5.0], [5.0, 0.0, 1.0, -2.0, 1.0], [5.0, 7.0, 4.0, -7.0, -7.0], [1.0, 1.0, 7.0, 1.0, -6.0]], [[5.0, -6.0, 3.0, 2.0, 0.0], [2.0, 0.0, 6.0, 0.0, 5.0], [0.0, 3.0, 1.0, 2.0, -2.0], [-5.0, -5.0, 6.0, 0.0, 2.0]]]),self.functionspace)
17378        arg1.setTaggedValue(1,numarray.array([[[0.49853649221077445, -0.1940857985371891, 0.0069489947090366488, -0.37068216541438059, -0.41599851687627654], [0.35046575405175973, 0.6223480987364578, -0.49909147714515734, -0.017436973483088147, -0.21424653086323864], [-0.88756498804568129, 0.51563279706762621, 0.85959818041996572, -0.91310658962114322, -0.17275956054323416], [0.92229669926294178, 0.25038482131697903, -0.18712082639030858, 0.66332130401746192, 0.012252590305697142]], [[-0.48332507911860079, 0.32236748673253057, -0.39241561612975029, 0.44816629632140836, 0.82104880598604191], [0.97596006059032403, 0.53950651148422391, -0.120331294282777, -0.17018973904244694, 0.33568634797261532], [-0.79726752448487925, -0.27722145393612529, -0.25404852632081032, 0.40709336256049933, -0.69364884627254253], [0.41373083939385458, -0.31478102230563954, -0.25978247503936092, 0.47535298871345621, 0.99849895883978257]], [[0.79240723161997395, 0.33940229495872054, -0.71593019979163275, 0.13170920320488699, -0.086900131719012563], [-0.81819207508585046, -0.89432541313797254, -0.49206721218418581, 0.45681575482362624, 0.97354790378483358], [0.36865562581280642, -0.68395164642352047, 0.10515883131149528, 0.77066022872421724, 0.91648287343592116], [0.96893807077186977, 0.77959117164407932, 0.90634099521087874, 0.96048707363846542, 0.79386641447240458]]]))        arg1.setTaggedValue(1,numarray.array([[[0.0, -7.0, 4.0, 6.0, -6.0], [2.0, 5.0, -6.0, -6.0, 4.0], [-4.0, -6.0, 1.0, 4.0, 6.0], [-3.0, -1.0, 0.0, 0.0, -5.0]], [[-6.0, 5.0, 1.0, 0.0, -5.0], [1.0, 1.0, 2.0, 5.0, 7.0], [-2.0, -1.0, 3.0, 5.0, -6.0], [6.0, 1.0, -1.0, -6.0, -6.0]], [[-5.0, -4.0, -1.0, -7.0, 0.0], [6.0, -7.0, 5.0, -3.0, -3.0], [-4.0, 0.0, -4.0, 2.0, -7.0], [-1.0, 5.0, 1.0, 1.0, -3.0]]]))
17379        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17380        ref=Data(numarray.array([[[[-1.8596425920900677, -1.1729669789080108, 0.079214546145164544, 0.84387871870630027, 0.67231863902399669], [-0.18526475758760108, -0.348989938540197, 0.24186353754070372, -0.50969734754369611, 0.72737451371268869], [-0.69963221312156709, -0.37786802676162923, 0.24018511912979831, -1.4020415991545754, 1.7690571627762801], [0.24892361645812855, -0.11282656915070499, 1.1687825434740013, -0.075167376399535704, -1.4343729943558252]], [[1.0506673591832201, 0.55818995956103057, -0.30646672696887878, -0.89423802282972364, -0.58798184024638922], [-0.22383695196570025, -0.10017261988318051, 0.1060285226258852, 0.31512570195054374, -0.61062266024414558], [0.35262464013080713, 0.39481134553772207, 0.15974350398177806, 0.81000236929171876, -0.95742694631767178], [-0.6051451518046147, 0.10526032053175491, -0.84193954073584631, -0.043522961566801299, 0.93410887753206462]], [[1.2315556944291739, 0.5481196729413691, 0.4206941487603415, -0.38189006183613616, 0.021333931907998108], [0.31546834323602224, 1.0236153998643878, -0.86950399527418853, -0.0044399573473734022, -0.13081679572998825], [0.10889371570237338, 0.063037856645849252, -0.57785725044951874, 0.90631695209499297, -0.99874766312463714], [-0.41492039165673889, 0.093820423776667689, -0.78323232554910827, 0.41546028848113314, 0.72138322035363278]], [[0.14581736577283122, 0.57489887623862601, 0.18623247843412738, 0.80255750734910714, 0.012537954145464283], [0.64611626509323683, -0.0018432709698336103, 0.065678752239511806, 0.30477863879923806, 0.099601417173685175], [0.50582862599453848, -0.24041584994992157, -0.34823178839847285, 0.086954259623630903, -0.41160939155842557], [1.3817154136204988, -0.11322855140603998, 0.37005046286333193, -0.13526543276051883, 0.026242418998253692]], [[-0.77537886677030599, -0.240668299748034, 0.71563326791647042, 1.4072055227010347, 0.8284148638530523], [0.75633216852232144, 0.6448090712309511, -0.54779493176448601, -0.30031953785281007, 0.82347449500500236], [-0.20546551706096705, -0.62233344156181392, -0.663756407560262, -0.63060973224668548, 0.64232635113146341], [1.2521702033330409, -0.14986754396111404, 0.94141047599495553, 0.20512664726070212, -0.92101394716642304]]], [[[0.47536029034653576, 0.39071697391086635, 0.19077919511244151, 0.13004405204741004, -0.0054608939964402425], [0.31859292092830149, 0.32493631207878199, -0.25322336763336839, 0.11302660197392823, -0.024771373937518805], [0.2200629331447391, -0.051841281025321997, -0.30144856625320809, 0.343817702815574, -0.49005801129203708], [0.32816442936959106, -0.0061243986977469987, -0.1469946967276991, 0.085226033671169737, 0.26697693047930793]], [[0.76236685173069707, 0.55127273694227485, -0.25461803024024876, -0.48016115619642574, -0.48668695692759706], [-0.05005200133556334, -0.20644731795414131, 0.20993129425927831, 0.34359804226534701, -0.46382401963707237], [0.41503884441923017, 0.25524263212158682, 0.10836323163947412, 0.58608567403373912, -0.78434793399689862], [-0.081075565695984314, 0.045617340432005257, -0.50469085480082476, -0.12226953680003994, 0.69489137619428665]], [[0.63145228903611827, 0.58933533703024521, -0.12973792790500172, -0.12947437035682394, -0.36025853692670162], [0.1567673510674133, -0.14001987645807604, 0.16362233423866718, 0.34652733448389716, -0.31983393400332449], [0.4606557783484857, 0.12140979381231223, -0.029568240430428244, 0.47746927597187017, -0.72247811121227135], [0.33867487811187841, 0.0022936311606565774, -0.28064095560570296, -0.12510089739395661, 0.53837169538553475]], [[-0.16199158217095289, -0.19029304267421793, -0.70572434676861995, -0.79140425053717656, -0.55064479347809936], [-0.72193190293890419, -0.95997875645676323, 0.80915952242408651, 0.16733264029016767, -0.47557384934205232], [0.025930030912579394, 0.39466432858047296, 0.77113420961832668, -0.078227188589741092, 0.15155588781367635], [-0.73042282441894757, 0.058919616554575033, -0.23388383747722111, -0.33959065607806627, 0.21420595561258415]], [[0.51722141589205206, 0.40442758173693655, 0.03340090221080802, -0.06874181962006029, -0.15502572469087128], [0.17494732460796586, 0.12583139272547414, -0.082353906149717271, 0.17532077340677293, -0.1586580960689786], [0.26154457510170842, 0.04781889103299769, -0.14486120942341033, 0.38480532937859357, -0.53433646130492718], [0.17542856111407162, 0.0099499646348296181, -0.24131000921341339, 0.010906145188442372, 0.3733924504717992]]], [[[-1.5943625313977099, -0.92308894632292726, -0.2895977976489022, 0.46494467674378553, 0.24337608479387124], [-0.39116976521208413, -0.84293167047919648, 0.68486108247490241, -0.24186829566500037, 0.3563026254885574], [-0.42526115444024809, -0.15213166487123342, 0.54728255207050402, -1.1830850007850122, 1.4398897391458916], [0.16688346513989116, -0.090819960724055224, 0.93608176524141296, -0.29533013489383392, -1.0581310788649234]], [[-0.47322117992915713, -0.51243616929484392, 0.70504479958069333, 0.63285169180359901, 0.82114606097729459], [0.34433629616108807, 0.98687146757940358, -0.88935659195297778, -0.54263116126323585, 0.69583391433091746], [-0.57011985292731615, -0.40654831560412041, -0.57741207976427811, -0.39173353278110851, 0.6305671078292352], [0.0068542228387506038, -0.027454736331200821, 0.37870383544501102, 0.45126920386386626, -0.69444098212490402]], [[0.41962582113558966, 0.70224955052513227, -0.51856538554637077, -0.10712636670263194, -0.68772458076252763], [0.025662966890502514, -0.87924454463890123, 0.82274919592105267, 0.61406626173236556, -0.53071477352753393], [0.73503705619955717, 0.21752016291766027, 0.33495285696386845, 0.33511147649490319, -0.69860111520908486], [0.71883336334754999, -0.038846351798964583, -0.095940442906484819, -0.46844374008560069, 0.56778340169950159]], [[-0.94387116839894525, -0.35615729768118104, -0.19152815328507233, 0.51759180190310083, 0.085227598060748241], [-0.066283803208797454, -0.64289937389012963, 0.55256705343887025, -0.0020078673132650354, 0.20040356580264737], [-0.050083344661085716, -0.14292273187705432, 0.2918899466230549, -0.70382733176553069, 0.73746662649109473], [0.58072275333993695, -0.095294837324257822, 0.70051414162558201, -0.28126720872339822, -0.61461014826267601]], [[-1.6242546011971206, -0.98027423780099165, 0.026026577641813736, 0.7532381112165345, 0.53960640967673901], [-0.15696085943262461, -0.39136675962790585, 0.29109018071452236, -0.39760137622330227, 0.60386202579218229], [-0.5546025373140091, -0.32082687579885161, 0.24153352562014346, -1.2231172481274362, 1.5154502015184896], [0.30119082631210475, -0.10555453822668216, 1.040560475572416, -0.11076917818481445, -1.2316945751566584]]], [[[-0.75735429770211682, -0.27960260653714586, 0.092721753910120636, 0.68076334479215506, 0.28428277979788835], [0.16752158193410716, -0.17961132592850537, 0.15513971562482037, -0.09185792026026661, 0.34656101002198597], [-0.095327325728379209, -0.25434436270824523, -0.0184794001158478, -0.57933676209425855, 0.60709249034864621], [0.66262664259494408, -0.0947576989766266, 0.6585269052215863, -0.098303474799560461, -0.610709515822914]], [[-0.98648417723510173, -0.39834204208293944, 0.042989939246292679, 0.75837970823005707, 0.30909701744054863], [0.11760400599499843, -0.32044282640105909, 0.27220363668185699, -0.11374118010834805, 0.39199126944146673], [-0.14003312170246257, -0.27636401396085986, 0.064591304953858231, -0.74922271054768808, 0.80510139830442973], [0.71699052898598403, -0.11039141639388576, 0.80129190645569415, -0.15204912068153686, -0.75874089296309122]], [[-1.0566757637115558, -1.0368191229060888, 0.1448260551554415, 0.071272385656916876, 0.55008143133253362], [-0.37395862300471283, 0.16547063337060242, -0.22088157524604224, -0.58763968653101706, 0.47954279961677188], [-0.80512668669925369, -0.14576617696812047, 0.13708276829001259, -0.79353670865189074, 1.233579590917762], [-0.7518023249792366, 0.01253238752641905, 0.40189083876374121, 0.19654717334482114, -0.86700209440328968]], [[-0.2834383100767785, -0.73622442158608936, 0.14671340851995604, -0.50216846059932185, 0.34168915161078944], [-0.44630202188719825, 0.47285087948945453, -0.48398715119961561, -0.52030624581408313, 0.19881120525268581], [-0.71627519691638208, 0.054905606480731367, 0.053422515176998253, -0.20807589913018709, 0.61219961302939807], [-1.3180997789865296, 0.099243654450444446, -0.22238578884818239, 0.34043101147617144, -0.28939948863876513]], [[1.6935196462255453, 1.2818377600704332, -0.35625666675675499, -0.76916183487118239, -0.90893350125543815], [0.12627567633656456, -0.20465331621086597, 0.25513456908390469, 0.72305608331420168, -0.87125415081891266], [0.92884506994948701, 0.43082646775659456, 0.011664575678406675, 1.2882716328182244, -1.7602845761304908], [0.12267295326342753, 0.07406880842365797, -0.99716038208528801, -0.18955202970875162, 1.4443612843859226]]]]),self.functionspace)        ref=Data(numarray.array([[[[-27.0, 22.0, -6.0, 23.0, 0.0], [-42.0, 30.0, -30.0, -2.0, -29.0], [35.0, -1.0, 33.0, -34.0, 5.0], [16.0, 11.0, -4.0, 31.0, -28.0]], [[-50.0, 50.0, 12.0, -3.0, -31.0], [-81.0, 36.0, -41.0, 10.0, -40.0], [11.0, -44.0, 15.0, 3.0, 49.0], [12.0, 6.0, -47.0, 31.0, 4.0]], [[44.0, -50.0, 6.0, 17.0, 17.0], [43.0, -12.0, 43.0, -6.0, 38.0], [3.0, 38.0, 5.0, -1.0, -35.0], [-26.0, -24.0, 53.0, -9.0, 0.0]], [[3.0, -8.0, 3.0, 17.0, 3.0], [-9.0, 12.0, 3.0, -2.0, 1.0], [17.0, 11.0, 18.0, -13.0, -7.0], [-5.0, -7.0, 17.0, 13.0, -10.0]], [[26.0, -30.0, 30.0, -1.0, -15.0], [-1.0, 0.0, 39.0, 6.0, 32.0], [-15.0, 0.0, -5.0, 35.0, 7.0], [-38.0, -38.0, 21.0, -3.0, 32.0]]], [[[26.0, -42.0, 48.0, 35.0, -21.0], [-43.0, 36.0, 45.0, 6.0, 32.0], [21.0, 12.0, 37.0, 17.0, 7.0], [-56.0, -62.0, 51.0, 33.0, 20.0]], [[47.0, -66.0, 21.0, 58.0, 16.0], [6.0, 24.0, 50.0, -8.0, 39.0], [44.0, 57.0, 51.0, -26.0, -42.0], [-43.0, -47.0, 90.0, 28.0, -18.0]], [[-32.0, 28.0, -9.0, 21.0, 0.0], [-44.0, 30.0, -36.0, -2.0, -34.0], [35.0, -4.0, 32.0, -36.0, 7.0], [21.0, 16.0, -10.0, 31.0, -30.0]], [[0.0, 4.0, 21.0, -25.0, -24.0], [-12.0, -6.0, 12.0, 10.0, 10.0], [-31.0, -28.0, -24.0, 44.0, 29.0], [-17.0, -16.0, -22.0, -11.0, 38.0]], [[20.0, -22.0, 9.0, 2.0, 1.0], [15.0, -6.0, 23.0, 0.0, 20.0], [-6.0, 10.0, -3.0, 11.0, -8.0], [-17.0, -16.0, 19.0, -6.0, 10.0]]], [[[5.0, -6.0, 3.0, 2.0, 0.0], [2.0, 0.0, 6.0, 0.0, 5.0], [0.0, 3.0, 1.0, 2.0, -2.0], [-5.0, -5.0, 6.0, 0.0, 2.0]], [[-31.0, 48.0, 3.0, -63.0, -31.0], [-11.0, -24.0, -23.0, 14.0, -17.0], [-59.0, -63.0, -58.0, 57.0, 53.0], [15.0, 19.0, -81.0, -31.0, 46.0]], [[-6.0, -8.0, 3.0, 51.0, 8.0], [-40.0, 42.0, -8.0, -6.0, -12.0], [57.0, 26.0, 58.0, -48.0, -15.0], [-3.0, -10.0, 38.0, 45.0, -38.0]], [[1.0, -2.0, -9.0, 8.0, 10.0], [8.0, 0.0, -4.0, -4.0, -3.0], [10.0, 11.0, 7.0, -16.0, -12.0], [7.0, 7.0, 8.0, 2.0, -14.0]], [[13.0, 0.0, 6.0, -52.0, -13.0], [39.0, -42.0, 19.0, 8.0, 21.0], [-62.0, -27.0, -60.0, 59.0, 18.0], [-8.0, -1.0, -33.0, -46.0, 48.0]]], [[[-20.0, 14.0, 3.0, 22.0, -5.0], [-43.0, 30.0, -19.0, 0.0, -20.0], [30.0, -2.0, 31.0, -23.0, 8.0], [5.0, 0.0, 1.0, 30.0, -18.0]], [[32.0, -26.0, -21.0, -14.0, 27.0], [77.0, -42.0, 21.0, -8.0, 24.0], [-22.0, 26.0, -29.0, 1.0, -36.0], [5.0, 12.0, 17.0, -38.0, -2.0]], [[-19.0, 28.0, -30.0, -18.0, 13.0], [21.0, -18.0, -31.0, -4.0, -23.0], [-8.0, -7.0, -18.0, -15.0, -4.0], [36.0, 39.0, -31.0, -16.0, -16.0]], [[6.0, -6.0, 18.0, -9.0, -15.0], [-9.0, 0.0, 15.0, 6.0, 12.0], [-15.0, -12.0, -9.0, 27.0, 15.0], [-18.0, -18.0, -3.0, -3.0, 24.0]], [[-6.0, 16.0, -33.0, -21.0, 20.0], [44.0, -30.0, -20.0, -6.0, -12.0], [-15.0, 2.0, -26.0, -12.0, -15.0], [33.0, 38.0, -22.0, -27.0, -14.0]]]]),self.functionspace)
17381        ref.setTaggedValue(1,numarray.array([[[[0.83698492696883231, 0.092272603745276738, -0.26147912581840177, -0.10663389437135447, -0.57688482042553579], [-1.633616674645106, -1.4488311782579726, -0.087757049842947021, 0.52308629822782216, 0.60859481076442989], [1.3476737276941848, -0.54993705172028018, -0.071522046100075357, 0.68337885293591683, 1.4022896970598842], [0.051395265265320123, 0.79260574019421526, 1.0384298861452932, 0.10438340229887599, -0.1883349192790893]], [[-0.20828284822168153, 0.10097550219605872, -0.18439285568771707, 0.13601351818601229, 0.39372232443359267], [0.89506613013508352, 0.72011633203619319, -0.23356024483117371, -0.17246892121692509, 0.032202902996595686], [-0.94651521245338766, 0.10005000796031992, 0.17126140815339952, -0.18566952560499989, -0.64134573989864241], [0.55464200916888695, -0.19518551480345409, -0.35240794554377708, 0.49040110831595202, 0.59413599154094499]], [[-1.1307705101216519, 0.14185731863682777, 0.09813956436461313, 0.45192098483945009, 0.95979589288060807], [1.3422238578945289, 0.89611943197303123, 0.36702605390029991, -0.45366223265709649, -0.25470426604442453], [-0.71010557696035048, 0.0246723693142476, -0.57921831008557556, 0.1661459418903416, -1.1975303939958901], [-0.53751169952837863, -0.88560342462126074, -0.77871342339408511, -0.39224127170960321, 0.41417363628626092]], [[-0.16481604517137582, -0.58630049996830724, 0.92148990008982867, -0.55127705558220352, -0.68552744474820249], [-0.055487532092004743, 0.42067423612768623, 0.41244815034411453, -0.24356480250020213, -1.1295020336899166], [0.17847201497904247, 0.89843863812346614, 0.28859659587635528, -1.1548601751623444, -0.22482549559932496], [-0.96971054679713975, -0.34127658912329262, -0.57705439073376152, -1.063706599573027, -1.4826510073749528]], [[-0.34684113983141246, -0.33306349932493218, 0.71808647208989973, -0.2120430172528128, -0.37676393280132137], [-0.59620165821160698, -0.36130001168201481, 0.69014415462606937, -0.096204955062232089, -0.67907112226350275], [1.0358778424617459, 0.27839320709621257, -0.39371745914331857, -0.1809714952175846, 0.19127064725594989], [-1.468964405051804, -0.32285828855024334, -0.15882953280925322, -1.3505411845931869, -1.2827619979261489]]], [[[-0.42575386727636411, -0.15463457620294119, 0.34533106735856378, -0.04203679130594621, 0.081718851743811008], [0.43675941453884581, 0.45355140063884675, 0.2539517293207651, -0.2347672524674673, -0.47189512281169299], [-0.19282773644181314, 0.32183189345339253, -0.081057895218627676, -0.35182065937539897, -0.48021169661510205], [-0.4925105304806216, -0.40782443018470249, -0.45961957970098738, -0.48026766174436797, -0.36366456076114878]], [[-0.081153102786418629, -0.090666665771988231, 0.082649628559878771, -0.089445101775223843, 0.027210568818693558], [0.56604530453762469, 0.60235073741167078, -0.12701606741906624, -0.15389185520771817, -0.24585769983804395], [-0.65158975736332292, 0.32111294809479074, 0.28898925378139567, -0.48382882486796963, -0.44829157747702164], [0.26413228933132604, -0.1470890284328325, -0.35355297788701662, 0.1682019999571949, 0.044948342028875488]], [[-0.12570657537562155, -0.23781711082795323, 0.33369864031462715, -0.22207221394327051, -0.16669939643467147], [0.42707417160879446, 0.58741883555713992, 0.031355252827790142, -0.19331060488451249, -0.5191862549715438], [-0.44572690684914018, 0.5043286435823503, 0.29246716881621526, -0.6985515422133064, -0.4190733374252697], [-0.094758932368598003, -0.22323477194449015, -0.44537490152381998, -0.19200463223126049, -0.39534284951196197]], [[0.8395470470225751, 0.19923569420343748, -0.60935553597634506, -0.046802281249851571, -0.19511641221404946], [-0.31702560307965094, -0.28072989439929513, -0.68312615463615212, 0.32644950975215647, 0.68734751917105108], [-0.31499976991415823, -0.28261093588633085, 0.53355189824348748, 0.14374233024752264, 0.53122810048165592], [1.3342222780228452, 0.7117462511280247, 0.571954694254725, 1.1897577301813793, 0.76065741274137177]], [[-0.27566850159074596, -0.12248553436736001, 0.23373080639175811, -0.055951016711953537, 0.052097738533222818], [0.4320931675371531, 0.45620944768427002, 0.11162359670627273, -0.18702006000002575, -0.36007556658030632], [-0.31518717243737593, 0.29425663626022613, 0.044521903888227382, -0.36419427988118691, -0.42252233085901569], [-0.21197835403685161, -0.28684297271331749, -0.38307699254607447, -0.23533358680891875, -0.20811880095046359]]], [[[1.1319723442282057, 0.02941301748395081, -0.31343787333730888, -0.26754868130537734, -0.77982302108537815], [-1.5519467426373905, -1.2464186343440666, -0.35250669468464479, 0.55440312099068179, 0.58864046042530949], [0.98471221946171139, -0.37059271712912373, 0.32785506001854769, 0.33037278496971095, 1.4062638512778647], [0.54370501426053575, 0.97282808959190259, 1.0309184654722399, 0.47842406000819521, -0.12711213883161188]], [[-0.59395823897943378, 0.18279243787415073, 0.014197078825710731, 0.37952394247828208, 0.49319598937753656], [-0.097681152361107998, -0.39276355732269636, 0.48170849027488061, -0.054432490262258722, 0.13744585472625598], [0.6496347918573353, -0.42948412305500833, -0.81585636784402049, 0.79449362897952969, -0.033453088451236776], [-0.87035736037522038, -0.34732868752520574, 0.039296313398070923, -0.6289723433888097, 0.042757867160706758]], [[0.46709796512782054, -0.46027451380740825, 0.45472030367650718, -0.62214188963934858, -0.80915716045963892], [-0.0051850835444171017, 0.50701961768387716, -0.21202494456086241, -0.058516159502640386, -0.68214855194217816], [-0.4258129701305392, 0.82072674312854721, 0.86183048530201967, -1.2683620685060975, -0.033793327260429384], [0.26278576345574689, 0.15786949805728764, -0.29375377602716635, 0.0045502188189245341, -0.8122771180742967]], [[0.73702686337522527, -0.19868080216133577, 0.10973980763858851, -0.39870791295185459, -0.78903540921635917], [-1.0205895532969289, -0.63081856725637619, -0.13401587242996535, 0.28292311346237387, -0.015977102526319231], [0.64105424586311166, 0.10654564516722642, 0.38935084075819593, -0.2549475640086164, 0.84219788378589922], [0.10463412971662711, 0.54970379728874375, 0.47035462484762802, 0.0071533870753847095, -0.59403482707253374]], [[0.78911528807602482, 0.035241384504029222, -0.18375353909705511, -0.15691025332216468, -0.59574066155348215], [-1.4623299215413792, -1.2461602227215607, -0.093473105854459726, 0.46021199596204732, 0.47170155928777213], [1.1689675448313332, -0.40906040795025678, 0.016504331451304408, 0.48556085178901237, 1.2490935496897846], [0.059952369858593313, 0.71981149447077331, 0.89668768493717477, 0.083160937465312945, -0.25641456441732091]]], [[[0.32059962337587616, -0.19762280025685777, 0.25158315377101864, -0.27680186011169794, -0.5422906575613996], [-0.74628895244763904, -0.46677370709312027, 0.11421902378772621, 0.13659825052563562, -0.18397723402654134], [0.65502824856372543, 0.12474305398332208, 0.10308686831859187, -0.17661985058817167, 0.53456012389961338], [-0.34372997162930541, 0.22443752702483924, 0.23026662260120245, -0.36351686429756674, -0.67720473519511348]], [[0.4955114061606013, -0.20836234897835196, 0.22399656846519772, -0.33419840144236812, -0.68103394549036123], [-0.97881295447415262, -0.63903445549670335, 0.063122497796836097, 0.21535264712057556, -0.12175415176529195], [0.79706139502175499, 0.094552676729480103, 0.1702849689486913, -0.16323828452343242, 0.74117206633782973], [-0.2701700315875355, 0.368130836546881, 0.37202096881274033, -0.30526452737138987, -0.72847612241055271]], [[0.27832331198717825, 0.46524292684421631, -0.68532681100231285, 0.41954199658502928, 0.334161239915441], [-0.71143813105690235, -1.022753062400898, -0.14124129708417288, 0.36347865411136449, 1.0158100312254947], [0.68682982213259414, -0.93965214206704317, -0.47359590924637085, 1.2754226725642397, 0.74316968130976324], [0.34851223412581567, 0.44833303562319271, 0.82732222570394864, 0.50793516579330134, 0.85728289434835103]], [[-0.15212272696772799, 0.63744104498386889, -0.85755224197697399, 0.70327378152331854, 0.90210457059595606], [0.072572165622558749, -0.52341061899164343, -0.16478443729796033, 0.18507856555283039, 1.1113750829000062], [0.077812247399798473, -1.0297097613863779, -0.64900157608467057, 1.4368444830266041, 0.14194246020342671], [0.51506983584271238, 0.13137534282496915, 0.5244485805901008, 0.71398981838789577, 1.4344614506475879]], [[-0.39812723510757514, -0.29359591713642952, 0.40663295283085843, -0.22658399204252838, 0.050425205945255749], [1.2929809223792248, 1.401576405189654, -0.068473765753479743, -0.43302408424208272, -0.79467847168792005], [-1.3089824362486766, 0.83635413179797369, 0.51266677052355558, -1.1731725837439195, -1.1163103413696143], [0.15467153110206533, -0.52276256031792312, -0.95180174096421943, -0.023516701383092919, -0.21636604671386178]]]]))        ref.setTaggedValue(1,numarray.array([[[[24.0, -6.0, 27.0, 72.0, -35.0], [-25.0, 68.0, -58.0, -7.0, 45.0], [2.0, -31.0, 32.0, 13.0, 66.0], [-3.0, -34.0, -7.0, -12.0, -13.0]], [[65.0, -39.0, 26.0, 85.0, -11.0], [-35.0, 74.0, -81.0, -40.0, 10.0], [14.0, -31.0, 19.0, -15.0, 115.0], [-41.0, -46.0, -2.0, 23.0, 21.0]], [[-53.0, 1.0, -12.0, -61.0, -3.0], [41.0, -56.0, 53.0, 6.0, -8.0], [-26.0, 9.0, -21.0, 21.0, -79.0], [17.0, 40.0, 4.0, -11.0, -29.0]], [[-6.0, -9.0, 9.0, 12.0, -17.0], [5.0, 11.0, -10.0, -7.0, 15.0], [-10.0, -13.0, 5.0, 13.0, 6.0], [0.0, -1.0, -1.0, -6.0, -16.0]], [[-17.0, -43.0, -10.0, -49.0, 15.0], [39.0, -52.0, 29.0, -36.0, -42.0], [-22.0, 3.0, -37.0, -1.0, -31.0], [-25.0, 32.0, 10.0, 25.0, -3.0]]], [[[-17.0, -85.0, 14.0, -13.0, -21.0], [51.0, -22.0, -7.0, -72.0, -18.0], [-46.0, -33.0, -31.0, 23.0, 5.0], [-43.0, 26.0, 10.0, 25.0, -33.0]], [[-59.0, -36.0, 13.0, -25.0, -44.0], [54.0, -25.0, 19.0, -25.0, 23.0], [-52.0, -28.0, -12.0, 50.0, -49.0], [5.0, 35.0, 3.0, -17.0, -65.0]], [[29.0, -2.0, 28.0, 79.0, -35.0], [-31.0, 75.0, -63.0, -4.0, 48.0], [6.0, -31.0, 36.0, 11.0, 73.0], [-2.0, -39.0, -8.0, -13.0, -10.0]], [[15.0, -30.0, -12.0, -27.0, 31.0], [11.0, -31.0, 11.0, -28.0, -48.0], [2.0, 11.0, -28.0, -23.0, 3.0], [-30.0, 11.0, 8.0, 33.0, 26.0]], [[-20.0, -9.0, -8.0, -34.0, 6.0], [22.0, -33.0, 26.0, -6.0, -16.0], [-12.0, 6.0, -17.0, 4.0, -34.0], [-1.0, 21.0, 4.0, 4.0, -7.0]]], [[[-5.0, -4.0, -1.0, -7.0, 0.0], [6.0, -7.0, 5.0, -3.0, -3.0], [-4.0, 0.0, -4.0, 2.0, -7.0], [-1.0, 5.0, 1.0, 1.0, -3.0]], [[52.0, 1.0, -21.0, -10.0, 59.0], [-27.0, -13.0, 0.0, -5.0, -59.0], [38.0, 31.0, -17.0, -55.0, 32.0], [-28.0, -13.0, 5.0, 40.0, 68.0]], [[-3.0, -22.0, 34.0, 63.0, -57.0], [-1.0, 59.0, -51.0, -18.0, 58.0], [-22.0, -45.0, 28.0, 37.0, 45.0], [0.0, -19.0, -6.0, -21.0, -44.0]], [[-7.0, 14.0, 3.0, 7.0, -10.0], [-4.0, 9.0, -1.0, 13.0, 17.0], [0.0, -2.0, 10.0, 8.0, -5.0], [13.0, -3.0, -3.0, -13.0, -9.0]], [[-1.0, 9.0, -37.0, -77.0, 62.0], [12.0, -74.0, 59.0, 7.0, -71.0], [16.0, 46.0, -39.0, -38.0, -53.0], [-8.0, 28.0, 9.0, 29.0, 44.0]]], [[[20.0, -19.0, 24.0, 58.0, -30.0], [-14.0, 53.0, -50.0, -18.0, 32.0], [-4.0, -30.0, 21.0, 12.0, 58.0], [-11.0, -25.0, -4.0, -4.0, -13.0]], [[-44.0, 53.0, -28.0, -70.0, 22.0], [14.0, -59.0, 70.0, 50.0, -12.0], [4.0, 38.0, -11.0, 0.0, -94.0], [41.0, 31.0, 0.0, -20.0, -1.0]], [[13.0, 51.0, -5.0, 17.0, 8.0], [-34.0, 22.0, -3.0, 43.0, 17.0], [28.0, 16.0, 23.0, -12.0, 5.0], [26.0, -20.0, -7.0, -17.0, 18.0]], [[3.0, -27.0, -6.0, -21.0, 15.0], [15.0, -24.0, 9.0, -24.0, -30.0], [-6.0, 3.0, -21.0, -9.0, -3.0], [-21.0, 12.0, 6.0, 21.0, 9.0]], [[-3.0, 62.0, -14.0, -9.0, 15.0], [-25.0, -1.0, 21.0, 54.0, 10.0], [26.0, 27.0, 16.0, -11.0, -27.0], [36.0, -7.0, -6.0, -21.0, 16.0]]]]))
17382        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17383        self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
17384        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17385     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17386     def test_generalTensorProduct_array_rank4_taggedData_rank4_offset2(self):     def test_generalTensorProduct_array_rank4_taggedData_rank4_offset2(self):
17387        arg0=numarray.array([[[[0.69079744014592626, 0.3566915419398673, -0.87284341892512707], [-0.82266517844895848, 0.4522542675018415, 0.096784466025259919]], [[-0.5076306659088905, -0.095699566381052481, 0.79389811289557977], [0.52110375542735543, -0.86904451842104646, 0.54119699476144434]], [[-0.36728391510877234, 0.65596888208732973, 0.96020034816796751], [-0.56696571703700993, -0.37518784509413838, 0.98458655365938075]], [[-0.087191266011665602, 0.92588903696292735, -0.089924194546759928], [-0.14135322359620006, -0.85690345236800303, -0.39809990654327287]], [[-0.54541146022392217, -0.44915501106538147, 0.29841991629153464], [0.89676382950072586, 0.78991739329160771, 0.61497395664161369]]], [[[-0.5224030514706679, 0.42228857186801561, -0.25273782914847631], [-0.27152963135360575, -0.21754031172712485, -0.36349385210428897]], [[-0.46058716047680726, -0.77674388918985171, 0.79919989860937313], [-0.69629334087003736, -0.6911303475196271, 0.47538728799862695]], [[-0.49948429762299718, -0.14874034016946269, -0.61373944557310578], [-0.85592623206203089, 0.41753617449607261, 0.72460840065374565]], [[0.97895485083493017, -0.55102889424699586, -0.66686223729991356], [0.63977770419395008, -0.080069788166967637, -0.69382801188463072]], [[0.82106162988944176, 0.46461366926673242, 0.56354185127934797], [-0.5418147089553389, -0.97839638723236866, -0.3860093272049514]]], [[[-0.087625109154173098, -0.3321346162392409, 0.90467938600602094], [-0.45005907171369564, 0.8893167115455618, -0.49608708139283797]], [[-0.75570596151623382, -0.2830899957777635, 0.81801509682235563], [-0.28799530220433667, -0.034182925800529507, 0.22457434383830854]], [[0.47387919038353576, -0.60708122430973499, 0.28874590541356193], [-0.89623930481337899, -0.74274953532093124, -0.98655593240747352]], [[0.24583976827970155, 0.91040980395649007, 0.1444370141600908], [-0.34055882788069702, -0.61574685627833392, 0.26490482514144009]], [[-0.61471539328545965, -0.69751490639700986, 0.5172956246422149], [-0.88303860098763498, -0.0060546728220165491, -0.54578401763454365]]], [[[0.38356471800371739, -0.29957239541481306, -0.3323322590095743], [-0.77170064621748158, -0.32358037600638978, -0.90164962915282465]], [[0.35805061062780807, 0.49075216568092772, -0.07312351896115965], [-0.37712492321527002, -0.0070333690181851871, 0.83057683707673968]], [[0.857725389389844, 0.93752836826431341, 0.14298284891321367], [-0.29256910971361272, 0.38614812186350567, 0.60427646276043601]], [[0.1889368283091486, 0.12166067055497898, -0.88614960998223702], [-0.66068851760713598, 0.54891822191137618, 0.59071202554706215]], [[-0.41250689103182836, 0.45145305258558621, -0.1031842485266028], [0.6759124358059212, 0.97585570452437209, 0.045263343498228581]]]])        arg0=numarray.array([[[[2.0, 0.0, 3.0], [0.0, -3.0, 0.0]], [[-6.0, 2.0, -2.0], [5.0, -2.0, -4.0]], [[4.0, 7.0, -1.0], [-5.0, 2.0, 6.0]], [[3.0, 5.0, 6.0], [2.0, -2.0, -5.0]], [[-3.0, 1.0, -5.0], [-5.0, 3.0, -3.0]]], [[[-1.0, 4.0, 6.0], [-2.0, 5.0, -3.0]], [[2.0, -5.0, -6.0], [3.0, 3.0, -1.0]], [[-7.0, 3.0, 2.0], [0.0, 0.0, -6.0]], [[-7.0, 1.0, 0.0], [-7.0, -1.0, 5.0]], [[3.0, 5.0, 3.0], [-4.0, -3.0, 2.0]]], [[[4.0, 0.0, -5.0], [-5.0, 4.0, -4.0]], [[-5.0, 0.0, 3.0], [6.0, -2.0, 6.0]], [[4.0, 1.0, -3.0], [1.0, 7.0, 0.0]], [[4.0, -2.0, -1.0], [-7.0, -2.0, 2.0]], [[5.0, -7.0, 3.0], [-6.0, 0.0, 4.0]]], [[[-2.0, 6.0, 5.0], [0.0, -2.0, 4.0]], [[-5.0, 7.0, -3.0], [-7.0, 3.0, 2.0]], [[4.0, 0.0, -5.0], [7.0, 7.0, -2.0]], [[3.0, -7.0, 3.0], [-5.0, -7.0, 7.0]], [[7.0, 1.0, -5.0], [0.0, 6.0, 2.0]]]])
17388        arg1=Data(numarray.array([[[[-0.21753877321921866, 0.63824271192960258, -0.080955748034408304, -0.62553507864495184, 0.6539449769219905], [0.30734183227923895, 0.30497292281566879, -0.33280855158561162, 0.23389286795940634, -0.65303153710420347], [0.87022311976255384, 0.22800230044733794, -0.83879236861499096, 0.76256843627832382, 0.24775200803958697], [0.14887968439780219, 0.48897438283198613, 0.63461940155293206, 0.9554122286565716, 0.71762652406248284]], [[-0.52829365851207277, -0.24991629964834527, -0.2060106581668355, 0.023433714453521493, -0.66517231356470807], [0.12257237472906368, -0.6849248945756865, 0.43887920799977187, -0.15299674676778774, 0.68122004655971158], [0.02807056245299, 0.22219509846757091, -0.19416266662234793, 0.21634347210883043, 0.23476279186248816], [0.23716968039483954, -0.75091942849231086, -0.96991537824118512, 0.93446835286330576, -0.1720444756589834]], [[0.67952158084580727, 0.24853221705642503, 0.75905525192373635, 0.022827843118645275, -0.87324431931910085], [-0.42179692548829761, -0.85341875393915134, 0.27981350834166152, -0.15436613689488432, -0.052444876987625788], [0.48932535247830389, 0.25258392481260783, 0.21150502497094537, 0.44674362340375429, 0.51014876606492976], [0.051036586192672928, -0.39156491539108651, -0.086581243470585489, -0.91030814052316833, -0.6178547506116836]]], [[[0.17514937660246255, -0.34398510632595936, 0.13318660224414169, -0.30730004426004043, 0.066427711079595886], [0.5272830871618297, -0.61268747244639044, 0.62627341218291543, -0.082686582431648281, 0.87721472485761764], [-0.40405750376567462, -0.43591876591064604, 0.79086580502160508, 0.81038985983551792, 0.46060363858354569], [-0.21081267109498292, 0.48748222535218044, -0.97658402554891577, -0.03283186813873451, -0.44848378765053232]], [[0.80961539786241499, 0.2728319683096998, 0.8108019846216703, -0.90150422123961116, -0.19534770140315683], [-0.57470165704514997, 0.70854278123111292, -0.94450804802256627, -0.21181929812474776, -0.56823427146417971], [0.79892890869754596, 0.18904003645212297, -0.4585664704635124, 0.96761582115315092, 0.5583066341524916], [0.12368083697219756, -0.856184770515382, -0.19570713299020315, -0.2843913377572389, -0.31306125047319733]], [[0.61135590532021178, 0.89915834638147651, 0.79271873470706677, 0.42171687555508219, 0.84240685921972336], [0.46738261759305821, -0.69122689219396038, -0.075519537264111758, -0.87657308278125412, 0.6994531335810692], [-0.89680304878880657, -0.39885437074149643, 0.69012603936788097, 0.28150270468803718, -0.51265812541046629], [-0.55715252339839028, 0.559640736575582, 0.80406736601630935, -0.62945344058074415, -0.66848147994929419]]]]),self.functionspace)        arg1=Data(numarray.array([[[[7.0, 0.0, -5.0, 7.0, 5.0], [2.0, 0.0, 4.0, 1.0, -3.0], [-3.0, 2.0, -5.0, -5.0, 6.0], [3.0, 4.0, -7.0, 6.0, 1.0]], [[7.0, 3.0, -3.0, -1.0, 0.0], [-3.0, -7.0, -2.0, 0.0, 0.0], [-3.0, 3.0, 6.0, 7.0, 6.0], [0.0, -2.0, 4.0, 5.0, 6.0]], [[-1.0, 1.0, -6.0, 7.0, -4.0], [-7.0, -1.0, -4.0, -5.0, 6.0], [-3.0, -7.0, 0.0, 1.0, 1.0], [-4.0, 5.0, 2.0, 1.0, 4.0]]], [[[6.0, -7.0, -3.0, 6.0, 6.0], [-1.0, -4.0, 6.0, 2.0, -3.0], [7.0, -1.0, -7.0, 6.0, 7.0], [1.0, -6.0, 2.0, -6.0, -4.0]], [[4.0, 0.0, 2.0, -5.0, -2.0], [6.0, 7.0, -4.0, 4.0, 0.0], [5.0, 4.0, 2.0, -4.0, 7.0], [-1.0, 0.0, 5.0, 5.0, 2.0]], [[6.0, 2.0, -2.0, -3.0, 7.0], [3.0, -7.0, 4.0, 2.0, 7.0], [4.0, 6.0, 4.0, -2.0, -3.0], [-4.0, -1.0, 6.0, 5.0, -3.0]]]]),self.functionspace)
17389        arg1.setTaggedValue(1,numarray.array([[[[0.69625845341408232, 0.32323604103306702, -0.92628333399331653, -0.15877517454042378, -0.93623730416005269], [-0.80497714559859168, -0.78769680322806401, -0.7012831553271921, -0.0045967348927868912, 0.35125105929897216], [0.30605575383774397, 0.49362908144276862, -0.98516859591775341, -0.41797026075460764, -0.14508816580149775], [0.15411569983660289, -0.94150214911997088, 0.61038885276948252, 0.092038357819816508, 0.78253730971853575]], [[-0.82071408524668543, -0.097565178092365423, -0.80932739490215821, -0.84661495842900059, -0.57655214463390903], [0.25178025972569884, -0.29326845562940607, -0.72128053784396107, 0.41190067132482588, 0.91941907304369441], [-0.076081169386111647, -0.81025509238089377, 0.7928484572947172, 0.68855087875995569, 0.98064177826800969], [-0.41355809878711036, -0.45372924375725665, 0.45206998685278088, 0.5680028563259194, -0.4333141166676806]], [[-0.43950016121661517, 0.28622705287677541, 0.062585252679246528, 0.13342518208055143, -0.15090811677465776], [0.058938775412302968, -0.93842378130725024, -0.058452716729163079, 0.38824701438887677, -0.21660885254575923], [-0.036224211793492556, -0.88890143857454573, -0.70765257282460903, -0.73663131997041442, 0.3508463422507162], [-0.002706809358857587, -0.12405575875958363, 0.45748308337858767, 0.37164796408621958, -0.73409411753887466]]], [[[-0.78318500180645745, -0.61447471560798683, 0.48128973816662457, -0.12027201673192667, -0.36414344139682542], [-0.65875389508748605, 0.93343609877458888, 0.14849504694511606, 0.98517096077227295, -0.72711467278624276], [0.42806894651730887, 0.83037007107459648, -0.23507194561828215, -0.41592854077681984, 0.14720643612891471], [-0.34961038737412542, 0.99308726643053236, 0.43857603578198656, 0.36766600576912611, 0.41914109616228767]], [[0.011256521932447638, 0.61885749256573797, -0.62401938336487106, -0.9598719193551668, 0.59938460046867781], [0.26546804133755586, -0.61106721903584638, 0.1367413866428433, -0.2334805835046565, -0.51560748116746646], [-0.37689536238314236, 0.58480388090117064, -0.037792704440944958, 0.14745618388985116, 0.48940235742429139], [-0.34353004888437089, -0.32838784225202056, -0.92334943693126403, -0.69529854123459089, 0.64967008094341439]], [[-0.40045341631111664, 0.13396325611790583, -0.6353862943650519, 0.83614067132619563, 0.68064056681912377], [0.91565402513512173, -0.68409755407926776, -0.30239605853942031, -0.019087163356744652, -0.63377630695569809], [0.39700490215997464, 0.26503974267776509, 0.31073900169113267, 0.54283993131963815, -0.82343577033017512], [0.13385251309770041, -0.94521960740420918, -0.4156731201840973, -0.68314085122263801, -0.10649689685252217]]]]))        arg1.setTaggedValue(1,numarray.array([[[[-5.0, 1.0, -7.0, 4.0, 2.0], [-6.0, 3.0, -1.0, 7.0, -6.0], [5.0, -5.0, -1.0, -4.0, 6.0], [-4.0, -2.0, -2.0, 6.0, 1.0]], [[-4.0, -5.0, 6.0, 1.0, -2.0], [-4.0, -4.0, -2.0, 4.0, -7.0], [-7.0, -3.0, 4.0, 4.0, 5.0], [6.0, -5.0, 0.0, 2.0, -7.0]], [[7.0, 7.0, -5.0, 0.0, -2.0], [5.0, -1.0, 2.0, -6.0, -3.0], [2.0, -3.0, 7.0, 5.0, 6.0], [6.0, 5.0, -3.0, 3.0, 3.0]]], [[[4.0, -7.0, 2.0, 6.0, 4.0], [-1.0, -3.0, 5.0, -4.0, 7.0], [-4.0, 5.0, 7.0, -4.0, -1.0], [-5.0, -5.0, -3.0, 4.0, -6.0]], [[5.0, -3.0, -7.0, -4.0, 0.0], [1.0, 5.0, -4.0, 0.0, 0.0], [-6.0, 4.0, -7.0, -3.0, -1.0], [0.0, -1.0, 2.0, -7.0, -1.0]], [[6.0, 2.0, -7.0, 2.0, -2.0], [-7.0, 0.0, 3.0, 1.0, 4.0], [1.0, 3.0, -7.0, 5.0, 1.0], [-4.0, -3.0, 6.0, -3.0, 7.0]]]]))
17390        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17391        ref=Data(numarray.array([[[[-0.65059656677451205, 0.62822224255182246, -0.45809912687826232, -0.55777299880551279, 0.91522503675441513], [-0.024259183994010163, 1.4688466603084065, -1.2672724152375159, 0.12912594845816122, -1.0732951039536072], [0.79098246468957867, 0.42179874654856897, -1.6245154927206507, 0.01218493345943554, -0.36643899754913067], [0.3183348960332687, -0.32237283567343444, 0.9607182310507788, 1.625340872552038, 1.1363282950195326]], [[0.41900088011270559, -0.03249869559634605, 0.45722129828225633, 1.1849651741687919, -0.30128319995535235], [0.52454654445728632, -2.0759130103850807, 1.4553887151357587, -0.5600470615534836, 1.5541531822073023], [-1.4461715947347209, -0.54378093313458753, 1.7964234088711917, -0.31939378820658404, -0.26584714252120684], [-0.57662377872733206, 0.81374900940719708, -0.20173302407756383, -1.4077350639360784, -1.1617609594605325]], [[0.5847024057492205, 0.81825086527871105, 1.0242272003058863, 1.194718844278607, -0.64995299517166549], [-0.060639319139596248, -1.9797906018618292, 0.60374022346612333, -1.0711981986879238, 1.0408656094750397], [-0.78499705156477995, 0.088061486802727129, 0.78694106271061814, -0.25453833745847543, -0.42252585065427833], [-0.32554470777129452, -0.45229381812422864, 0.4663353716885521, -1.1064402534934483, -1.2561390167015882]], [[-1.4931801437893317, -0.85251511709107808, -1.2811284374560357, 0.72223992196967468, -0.77172599448280677], [0.35648633682998843, -0.82938247712856483, 1.1611002040315803, 0.39399018988349538, 0.77686143537265928], [-0.36436071715450291, 0.22154814114672886, -0.119240485952606, -0.96212307603651037, -0.18954577243762574], [0.34764125684193814, -0.26072362554896794, -0.95993526119962702, 1.3626912932656146, 0.43147554189828419]], [[1.7312815276217748, 0.29831351414818114, 1.6106070113586064, -0.3908836200137657, 0.10482259722836107], [-0.042244653827850254, -0.52820766579378597, -0.16301181414197408, -0.88545422594948242, 0.80248865338074937], [-0.6239800982072452, -0.63565425537905473, 1.3792131750576477, 1.2844135890947159, 0.45046429134745941], [-0.60648212837215454, 0.058741885976065222, -0.47220111890514754, -1.8536535700856487, -1.5590825214367934]]], [[[-0.72709660956189626, -0.79455856386960044, -0.73724100540062276, 0.45717084963401666, -0.68356645053793863], [-0.19023427139087137, 0.030619373912106396, 0.35134209217623635, 0.2393790566011314, 0.27324906843720276], [-0.30452762684676721, 0.13310598547557517, -0.063103683191163801, -0.9527825255266188, -0.21939631118209202], [0.24233780416863535, -0.62312027024145022, -0.70375678934789498, 0.42515820697348689, 0.14148155424191236]], [[0.66274372527689684, 0.57718201643928779, 0.52768318612809006, 1.325662183011276, 0.0068001624099237601], [-0.32162729631870951, -0.68219325694349298, 0.21682467133420352, -0.32500100345170346, -0.1558332010199987], [-0.72869869582014224, -0.092472839824858738, 0.80051821137612345, -1.2614301564378734, -0.83904017607882719], [-0.41555908441031952, 0.56346885683760828, 1.5893740710562292, -1.9732334306090589, -0.47982971407466579]], [[0.40130897639788998, 0.62572718121641813, 0.40416797768188434, 0.48714419884920829, 0.78024032766733475], [-0.26547525110129094, 0.79271223777057986, -1.0559111947305093, -0.65216926349043314, -0.22421825471885315], [-0.70956216521061832, -0.13892152863949345, -0.050285291343271421, -0.77289425142042367, -1.004371261048485], [-0.31259900977621746, -0.26144073986764221, 1.2172244873739388, -0.60426379809270547, -0.18488404886167836]], [[-0.75194776818852027, -0.26899569655350192, -1.0016408688269678, -1.057525726038826, 1.062700373483993], [0.5736903494289014, 1.2759567945311259, -0.22553683729598564, 0.98846738702492365, -0.85826616856729476], [0.80987887988143803, -0.084961810457874598, -0.79132848139002565, 0.57507022163912846, 0.3786550134078781], [0.2228164529237151, 1.1457223744341842, 0.046441982577314578, 1.4659349820255105, 1.4112974415140633]], [[-1.1641387157003311, 0.12033524785116773, -0.90587064242995596, 0.39589072757764165, -0.4342696716170239], [0.16777740908177982, -0.64321367306335531, 0.70226993101042523, 0.62437372948045333, -0.43855479192446811], [0.78673357749008321, 0.6379730508839293, -0.9059569610669862, -0.51606509316375937, 0.0020676475902739466], [0.46947151671965237, 0.18946395745469799, 0.43186278166718867, 1.2446335027767679, 0.96842757405087998]]], [[[1.1471668074536943, 0.20330854723695541, 1.0300790590460269, -0.804946579902864, -1.2479109130596882], [-1.4294951769703101, 0.67746684986448935, -0.94782563373379669, 0.17436475288871151, -1.463608940189365], [1.6943489400547858, 0.69690221916889961, -0.77677811650692474, 0.62162820526260221, 0.90537457302212065], [0.43561964758208338, -1.4061265667432497, 0.054793054623489434, -1.1434983672128001, -0.30964201130942232]], [[0.92898653966009381, 0.083395882878392932, 0.85236854300820375, 0.69878406987365405, -0.84348387163299454], [-0.63924324403074495, -0.73768467228403034, 0.19111726484687136, -0.42551809094006854, 0.18162196309150208], [-0.37764579020986255, 0.00092171312615552115, 0.8047543149619778, -0.4753252848226166, -0.10324337541074877], [-0.20653780718649764, -0.46269382959522543, 0.1926772661195145, -1.8533775022878165, -1.0092863024056382]], [[-0.94761487389785914, -0.25549075311806435, -1.1977751813556066, 0.22489615562170001, -0.28396337853314835], [-0.55737215666624995, 1.0186829585012822, -0.12860505536333822, 1.2553698507020248, -1.7923454119481594], [1.1901047165419705, 0.68985792529585099, -1.2675954539260288, -1.363694964132397, -0.19953935776892262], [0.58804317446645071, 0.22143432564411758, 1.0919073042099749, 0.48425180404674978, 1.5600794838882659]], [[-0.83251101271282968, 0.15261956475532742, -0.43243221952269084, 0.64231703830541254, -0.25012268477458743], [0.4243365870643091, -1.0825893245841169, 0.70644721647878195, -0.17770748037403386, 0.68850706367094239], [-0.2817322106286243, 0.22121982514535452, -0.15658471370597316, -0.3482632152285482, -0.28812179305056712], [0.10793935930423371, -0.1105632909154137, -0.073419631070122254, 0.97369428215111131, 0.098966689958354281]], [[0.36049677588808055, -0.2780986828837223, 0.030944942582675328, 0.42663920373415171, -0.90699557201696845], [-1.2098391697418758, 0.7628012702481719, -0.46288350049321919, 0.4358045574668814, -1.2537864364506417], [0.54002857149913508, 0.43699650459896849, -0.31178776752965209, -1.263670633625769, -0.18246034051803323], [0.25894480337407755, -0.71008207592861783, 0.66633123768488223, -1.3357512966089846, 0.12202444390686076]]], [[[-1.0993723107319824, -0.39647519438876222, -1.3014895601435186, -0.10592785551966077, -0.007302715798295889], [-0.42101497623894168, 1.4725652767195745, -0.46169993400718762, 1.1095591530943878, -1.5608648234137841], [1.024654976567402, 0.57180437659662964, -1.4180357552664979, -1.1130801815653788, -0.21870560216370233], [0.59411434979163191, -0.061107914841919797, 0.65472169413552839, 1.073952551022469, 1.5822608404165792]], [[0.049190378292509718, 0.96232920142334111, 0.41689193988843298, 0.25835706311641843, 0.64757137410552024], [0.39442753584453061, -0.51256842433233385, -0.2165073489391599, -0.67543852970958784, 0.35845346342981771], [-0.30852442945678438, 0.003996304342906154, -0.13290909643943449, 0.26792746919197474, -0.43681961939960912], [-0.21815913980280463, 0.12219964460326577, 0.79507930283844264, 0.35881573158399105, -0.16619381428799618]], [[0.046097263022764123, 1.0980023959170888, 0.5990978965934497, -0.51467763646289477, 0.22660712844187336], [0.22446185120940387, -0.46741399337509909, -0.42757104648859051, -0.55218921528201681, 0.017637208954356831], [0.72749721344097595, 0.39950825116971034, -0.86267549184309444, 1.227432578199207, 0.27658591179565678], [0.13011078757601574, -0.47564824777383374, 0.31865171937390319, 1.084837975521818, -0.027735854751685829]], [[-0.017702682630575894, 0.77811893885412164, 0.11234218185859157, -0.17827379031675783, 1.1629560163837893], [0.059010049124651964, 1.11596047470589, -1.2342817141566669, -0.41707487635438578, -0.47233447725585842], [-0.090032746912934447, 0.002449260393818431, -0.73609152268447176, -0.06347022028987423, -0.67738142275006674], [-0.1101874925890135, -0.11344981273534943, 1.091389259905841, 0.59462814028929867, 0.3917497941861674]], [[0.71724599313171677, -0.32730986859510114, 0.77919744073714281, -0.80209636398233819, -0.58754752366615548], [-0.21119554685517783, -0.10093030106557022, -0.19526901337357228, -0.45189570261743628, 0.65239563737446149], [0.069148375727866071, -0.14802514641810391, 0.35482705513186807, 1.2417550375695097, 0.78409547165332216], [-0.0066239331137739124, -0.9809931223401156, -1.505394746274562, -0.20652362077519423, -0.94883909525855759]]]]),self.functionspace)        ref=Data(numarray.array([[[[-1.0, 3.0, -34.0, 50.0, 4.0], [-35.0, -24.0, 8.0, -25.0, 12.0], [-30.0, -29.0, -16.0, 5.0, -6.0], [-3.0, 23.0, -23.0, 0.0, 8.0]], [[-28.0, -39.0, 25.0, -6.0, -16.0], [-33.0, -18.0, 2.0, -2.0, -37.0], [27.0, -29.0, -13.0, 88.0, 7.0], [13.0, -64.0, 22.0, -88.0, -14.0]], [[92.0, 67.0, -28.0, -44.0, 32.0], [29.0, -56.0, -8.0, 19.0, 39.0], [-31.0, 85.0, 85.0, -22.0, 26.0], [-15.0, 21.0, 34.0, 128.0, 48.0]], [[24.0, -3.0, -66.0, 95.0, -28.0], [-80.0, -28.0, -22.0, -41.0, -14.0], [-58.0, -61.0, -23.0, 56.0, 69.0], [9.0, 25.0, -25.0, 2.0, 60.0]], [[-45.0, 27.0, 69.0, -93.0, -52.0], [40.0, 60.0, -48.0, 18.0, -27.0], [-11.0, 31.0, 50.0, -19.0, -22.0], [15.0, -6.0, 2.0, 12.0, 18.0]]], [[[5.0, 26.0, -21.0, 3.0, -72.0], [-33.0, 30.0, -80.0, -21.0, 24.0], [-28.0, -28.0, 41.0, 13.0, 54.0], [-22.0, 33.0, 38.0, 42.0, 74.0]], [[9.0, -44.0, 40.0, -17.0, 39.0], [73.0, 57.0, 44.0, 48.0, -58.0], [59.0, 34.0, -59.0, -43.0, 21.0], [34.0, -29.0, -31.0, -27.0, -55.0]], [[-66.0, -1.0, 26.0, -20.0, -85.0], [-55.0, 19.0, -66.0, -29.0, -9.0], [-18.0, -55.0, 29.0, 70.0, -4.0], [-5.0, -18.0, 29.0, -55.0, 37.0]], [[-58.0, 62.0, 41.0, -102.0, -40.0], [-1.0, -21.0, -48.0, -15.0, 77.0], [-16.0, 22.0, 108.0, -6.0, -107.0], [-47.0, 7.0, 64.0, 25.0, 10.0]], [[29.0, 50.0, -46.0, 22.0, -1.0], [-38.0, -57.0, -14.0, -28.0, 35.0], [-68.0, 4.0, 45.0, 7.0, -4.0], [-12.0, 39.0, -6.0, 65.0, 49.0]]], [[[-5.0, 22.0, 41.0, -45.0, -26.0], [60.0, 81.0, -26.0, 27.0, -55.0], [-28.0, 40.0, 7.0, -63.0, 24.0], [39.0, 25.0, -52.0, 49.0, 24.0]], [[26.0, -27.0, -27.0, 14.0, 45.0], [-31.0, -83.0, 36.0, -4.0, 57.0], [62.0, -9.0, 3.0, 60.0, -17.0], [-43.0, -47.0, 79.0, -43.0, -39.0]], [[72.0, -7.0, 6.0, -23.0, 24.0], [67.0, 41.0, 4.0, 49.0, -33.0], [36.0, 59.0, -7.0, -38.0, 83.0], [18.0, -7.0, 7.0, 55.0, 8.0]], [[-23.0, 46.0, 5.0, -15.0, 0.0], [22.0, 15.0, -2.0, -9.0, 17.0], [-54.0, 20.0, 21.0, -73.0, -58.0], [3.0, 55.0, -50.0, 55.0, 6.0]], [[-29.0, 32.0, -12.0, 15.0, 5.0], [28.0, 42.0, 2.0, -14.0, 49.0], [-29.0, -2.0, -9.0, -115.0, -63.0], [-19.0, 81.0, -45.0, 54.0, -13.0]]], [[[39.0, 31.0, -50.0, 13.0, 2.0], [-57.0, -89.0, -16.0, -27.0, 64.0], [-21.0, -5.0, 58.0, 57.0, 3.0], [-40.0, 1.0, 62.0, 33.0, 38.0]], [[-1.0, 71.0, 45.0, -126.0, -47.0], [21.0, -11.0, -68.0, 12.0, 32.0], [-23.0, 63.0, 130.0, 13.0, -25.0], [-21.0, -9.0, 70.0, 69.0, 53.0]], [[91.0, -58.0, 7.0, 6.0, 54.0], [72.0, 40.0, 42.0, 67.0, -77.0], [79.0, 52.0, -63.0, -7.0, 123.0], [40.0, -49.0, -1.0, 2.0, -24.0]], [[-47.0, 31.0, -25.0, 33.0, 36.0], [-10.0, -32.0, 40.0, -36.0, 73.0], [-39.0, -17.0, -8.0, -77.0, -126.0], [-29.0, 64.0, -46.0, 16.0, -42.0]], [[97.0, 2.0, 0.0, -23.0, 57.0], [88.0, 26.0, 30.0, 60.0, -37.0], [29.0, 88.0, -9.0, -61.0, 79.0], [27.0, -1.0, -13.0, 82.0, -1.0]]]]),self.functionspace)
17392        ref.setTaggedValue(1,numarray.array([[[[1.182478777359629, 0.73701201224005319, -1.7228327790021096, -0.78235831446060322, -0.084164643522646992], [0.23290144640090404, -0.94012144003427556, -0.78028627631134306, -1.1130385539713825, 1.0633044877691626], [-0.26828295830776017, 0.4348735763696247, 0.42628858623880478, 1.0612273768166958, -0.036136922151299017], [0.10651688083046412, -1.7609230967567664, -0.63502715790023723, -0.74124397819572097, 0.96546054592926012]], [[-1.2584457586446638, -0.71303174627656229, 1.0465817818909475, 1.491559881091244, 0.06834510025483187], [0.35289373723028261, 0.33014198093922037, 0.17350470434825283, 0.97709469321913944, -0.7120733391436509], [0.58862435967405402, -0.81081030534790499, -0.059059822498073511, -0.48963428699422296, -0.5359031153187479], [0.14799474247881411, 0.71420456933385246, 0.81609429765744057, 0.62009524402158189, -1.3423799210508744]], [[-1.1705609526823157, 0.34021290570639801, -0.79493333122660237, 0.88265265532696646, 0.47248719118245991], [1.6928393388444762, -1.7776559837927088, -0.70492428422205577, 0.15492520050907144, 0.24780466337964979], [0.092493094121191721, -1.9955757234098055, 0.65583878864387768, 0.61283440670732803, -0.044380785174831017], [0.12841024665262341, -1.4414418750467095, 0.20013899631604204, 0.07544673922042866, -1.8627737332482184]], [[-0.5205956922545284, -0.64103052538537564, 0.045428258266913601, -0.27537497640165204, -1.1717261334506315], [-0.20087773958824043, 0.54555381661338054, -0.61920424017387821, 0.41527413589405021, 1.6370445143244405], [0.01053572101627942, -1.4373209534516425, 0.82553058799270174, 0.4565386454016469, 0.77669734706713633], [-0.10559907795941864, 0.19045587266511943, 1.2189138842394629, 1.3002537871862327, -0.9769734623390629]], [[-1.0819837778942947, -0.02686738742536951, 0.43532912723795775, 0.15480550069965887, 1.2900517291195559], [0.52559843582011978, 0.21497444001558502, 0.7442248689602331, 0.62065770405605258, -2.1182718117824963], [0.18674411767502008, 1.1990184252243214, -0.07952797607434281, -0.22380481039942657, -0.2444225961951873], [-0.40167504323751552, 0.73016014618312508, -0.99113931032605995, -0.83404561818145928, 0.37231553829385827]]], [[[-0.24345586057497662, -0.29887373673828832, 0.36232982725410456, -0.37075651751356925, 0.0048387927038891776], [0.30023697840713365, 0.65296793431751787, 0.11638868372806327, -0.13155601535664269, 0.79948317568371796], [-0.36140974925065106, -0.82440459920148745, 0.98741521722292935, 0.57883098900998553, 0.55411436308950979], [-0.13346060975085786, 0.47695899486264182, -0.010714332804649701, 0.39759124232336696, -0.62267781630724672]], [[0.31272477615047717, 0.21948530494228241, 0.89939777280060396, 1.9819980579117733, 0.9213121242818636], [0.93280043742373175, -0.71222019737021358, 0.49487938549946298, -0.54121341540940215, -0.48770076500924214], [0.040333196051934556, -1.1647688007428216, -0.39011996592198256, -0.48527559576884227, -1.2466759815660753], [0.79256894160987434, -0.2269367636499702, -0.1314879076562207, -0.28678136399240822, -1.4020196234691917]], [[0.42891839610820465, 0.5588030369095226, -0.58827285059247869, 0.43138048563029341, 1.7011532077161715], [1.6666283597628089, -0.53678722083984431, 0.2043131199078517, -1.25180373338538, -0.23142558648711137], [-0.35541127760593633, 0.14500279227531201, 1.2190505071116882, 1.3693728021858373, -0.80704310935234413], [0.23899081044150852, -1.0581460191310454, -1.7150168651895203, -1.4585685396445289, -0.040532937660146456]], [[1.2028090140435952, -0.35630576115198609, 0.29616982778527035, -0.35812907148227113, -1.2514131795360353], [-2.044096959536589, 1.1370448416054115, 0.043767602402647265, 0.17185192496668991, -0.0024947019914756119], [0.39428802409887242, 1.8230244905791311, -1.2923783662552073, -0.95189997617969779, -0.2900470390787242], [0.091522666969651015, 0.72852680570546602, 0.68629052850527494, 0.29415659681325312, 1.7844056521795186]], [[0.51058595075715485, 0.057099956463172299, -0.50625737853158759, 0.23301985608767101, -1.773496636068286], [-0.76700224708606513, -0.95566064150222463, -1.0413704201953291, 0.10841818597017236, 1.7365787700653965], [0.179099839507602, -1.5964733910933875, -0.79491421280776686, -0.56684744404384046, 0.29347562312043252], [0.4067326321013563, -0.90566293489264915, 1.795244132938479, 1.2936797082707621, -0.79412793634731249]]], [[[0.37512099325970916, 1.0234776836213584, -0.049761836477284827, -0.79848937377174989, 0.49627916761878038], [0.11855116461975379, -1.3067077408513241, 0.45292091521495415, -0.4267190290612668, -0.3489964336875373], [-0.75910493670567469, -0.56343385715144478, -0.89917263386226309, -0.80945027809656878, 0.78188969031227451], [-0.093160428763678998, -0.14910976375885598, -0.60208310986144964, -0.3054107123260757, -0.14681517280129669]], [[-0.51811122678762245, 0.20338255505089431, 0.72033617243525261, 0.72402413320856762, 0.98452842839315624], [0.9715383178381678, -0.49092418967017382, 0.57098546784970727, -0.075569306573225636, -0.61820948857247426], [-0.26062363593528332, -1.0704099862104905, 0.079955315369506397, -0.24498188471112439, -0.12501479474645297], [0.14088264802684802, 0.25141422977535932, -0.40311748769643196, -0.1618708689758114, -1.2360360507992569]], [[1.7899087305406631, 0.25394974259168029, 0.72943574958998747, 0.47308716043157029, -0.92754645241120925], [-1.0274136981939679, -0.17401310162404715, 0.15235332195146045, -0.8308315130153503, 1.2056353331850758], [-0.31461959171846188, -0.97090508424842037, -1.2203162663945015, -1.1010664571063502, -0.24584815251658765], [0.75975236372892163, 0.07984972331665019, 0.8497368078612344, 0.66697562338416683, -0.33120938939889194]], [[-0.48579086760144263, -0.10432549402804236, -0.9034836388357228, 0.062967236615095096, -0.84161175419612144], [0.34328527458672575, -0.71903273331247353, -1.0523824504271877, 0.23314557466524788, 1.2893318856957841], [0.19220150614902159, -1.3173714931085969, 0.5630549906793173, 0.61236630184699448, 0.33818012300914524], [0.027038084786639625, -1.0488505541692572, 0.93677904995852534, 0.71537045910865715, -0.87913104378885931]], [[0.8271835170859001, 0.48316190751679539, 1.0918581240562772, 0.41281268916345992, 0.84604998357794303], [0.43004859216653424, -0.24386482973726364, 0.93704429574032733, -0.94175556237127089, 0.021818383696371457], [-0.74620641568461432, -1.0795452925483682, -0.27528085260192425, -0.5342831081602859, -0.096867105081235638], [0.43007029192979357, 0.47200491905844189, -0.60870822563804827, -0.20812210055268249, -0.8744653523788174]]], [[[1.6207941999340507, 0.21123976674687642, 0.26976808359389165, -0.20211579273162472, -0.66287553516371867], [-0.80691305804294489, 0.19180335251369629, 0.080328727216194551, -0.92168162175005952, 1.2306805463184392], [-0.41412198117311694, -0.34152178435412217, -0.46675920389488956, -0.33797615718587926, 0.0044687907812067662], [0.44416957076629976, 0.0081761653477622209, 0.28177941519247218, 0.29884464735877392, 0.2362767505505933]], [[-0.15866157148707402, 0.38557246447411408, -1.4382664747031015, 0.2645035912599259, 0.091306543956205799], [0.8381157400103596, -1.2732563404948136, -0.90891667731373582, -0.21363842875784866, 0.34425136144784541], [0.24585374426061496, -0.25302116572646771, 0.43510784312021855, 0.84880858058134989, -0.33923599003462757], [0.097862380304470559, -1.7079884328622836, -0.09720050829596788, -0.41663987533791946, -0.12987411334006066]], [[-0.24358731961718197, 0.72640101788909162, -2.310038913088786, -0.74103826107225002, -0.61586233577934046], [0.40257823602763726, -2.007194627196943, -1.4594605238012293, 0.047815888969561626, 0.76294139113235793], [0.15512762611726341, -0.32029903259589432, 0.039085094788766372, 0.68835979733231989, 0.49342958285634053], [-0.20540488845195282, -2.2391991476403361, 0.27674175417271923, -0.12426016689761904, 0.22388254976254712]], [[0.70823073354903121, 0.62037360589345369, -1.3647807850079199, -0.20474339168821998, 0.85835482902261817], [0.94815257716201584, -0.7091614003959994, -0.37012995875230803, -1.0851292263521159, 0.1931599397351883], [-0.17452021148267063, 0.71134389664998254, 0.85553139277599555, 1.3339678158037578, -0.53403845293388796], [0.10268496806957612, -1.5178854849613734, -1.277222977145001, -1.2709569178765574, 0.76243508579895103]], [[-1.148881396848932, -0.012269177672930495, -0.30213574074980065, -1.31062174835718, 0.5110813234522017], [0.29488814861468371, 0.2930070655993906, 0.18981328762241739, 0.58497101946947794, -0.73077949970658984], [-0.21734801138930501, 0.66624133989557721, 0.65563809847377363, 0.44660819345114128, 1.0061750633080804], [-0.81547970834212957, 0.50433635682632971, -0.71833785449056931, -0.28081031066030587, 0.46979046459671908]]]]))        ref.setTaggedValue(1,numarray.array([[[[-4.0, 32.0, -8.0, 20.0, -2.0], [0.0, -12.0, 16.0, -4.0, -21.0], [34.0, -31.0, 40.0, 16.0, 33.0], [10.0, 14.0, -19.0, 42.0, 14.0]], [[-6.0, -67.0, 116.0, 8.0, 16.0], [39.0, -49.0, 19.0, -46.0, 47.0], [-60.0, 35.0, 77.0, -12.0, -45.0], [15.0, -19.0, -25.0, 8.0, -82.0]], [[-29.0, 3.0, -47.0, -3.0, -36.0], [-92.0, 10.0, -35.0, 88.0, -81.0], [-17.0, -37.0, -74.0, 51.0, 62.0], [21.0, -43.0, 50.0, -17.0, 22.0]], [[-25.0, 2.0, 32.0, 27.0, 2.0], [23.0, -33.0, 2.0, -8.0, -77.0], [-9.0, -61.0, 122.0, 11.0, 74.0], [64.0, 6.0, -64.0, 83.0, -59.0]], [[-47.0, -23.0, 42.0, -59.0, -12.0], [18.0, 22.0, -55.0, 30.0, -21.0], [-33.0, 5.0, -63.0, -13.0, -44.0], [25.0, 7.0, 24.0, -63.0, -19.0]]], [[[30.0, 14.0, -17.0, -38.0, -24.0], [48.0, 6.0, -34.0, -22.0, -66.0], [-46.0, -24.0, 31.0, 28.0, 44.0], [86.0, 26.0, -18.0, -14.0, -25.0]], [[-11.0, -47.0, -22.0, 7.0, 40.0], [-15.0, 38.0, -4.0, 17.0, 58.0], [2.0, 47.0, -57.0, -84.0, -56.0], [-85.0, -24.0, 5.0, -22.0, -9.0]], [[1.0, -20.0, 99.0, -37.0, -12.0], [82.0, -35.0, -13.0, -55.0, -9.0], [-58.0, 2.0, 75.0, 20.0, -21.0], [82.0, 27.0, -28.0, -12.0, -64.0]], [[28.0, 50.0, 13.0, -55.0, -54.0], [9.0, -9.0, -11.0, -12.0, 6.0], [-3.0, 8.0, -66.0, 88.0, -24.0], [49.0, 30.0, 63.0, -76.0, 64.0]], [[-33.0, 40.0, -7.0, 9.0, -30.0], [-36.0, -17.0, -9.0, 41.0, -82.0], [22.0, -65.0, 17.0, 58.0, 70.0], [48.0, 1.0, 3.0, 36.0, 18.0]]], [[[-79.0, -16.0, -13.0, -38.0, 6.0], [-12.0, 52.0, -67.0, 74.0, -60.0], [2.0, -26.0, -74.0, -53.0, -9.0], [-5.0, 0.0, 6.0, -27.0, -13.0]], [[96.0, -8.0, 4.0, 36.0, -4.0], [-5.0, -46.0, 67.0, -71.0, 87.0], [-25.0, 56.0, 40.0, 47.0, -10.0], [-16.0, -21.0, 15.0, -1.0, 12.0]], [[-6.0, -50.0, -54.0, -5.0, 16.0], [-37.0, 43.0, -35.0, 46.0, -15.0], [-39.0, 19.0, -63.0, -52.0, 3.0], [-33.0, -40.0, 12.0, -28.0, -25.0]], [[-45.0, 66.0, -49.0, -16.0, -18.0], [-30.0, 32.0, -23.0, 56.0, -48.0], [74.0, -48.0, -68.0, 15.0, 19.0], [-7.0, 28.0, 24.0, -3.0, 73.0]], [[24.0, 111.0, -132.0, -15.0, -14.0], [-9.0, 58.0, -3.0, 17.0, -16.0], [108.0, -31.0, -82.0, 11.0, 23.0], [-30.0, 58.0, 23.0, -11.0, 127.0]]], [[[35.0, 17.0, 11.0, 14.0, -34.0], [-17.0, -45.0, 20.0, -16.0, -29.0], [-26.0, -19.0, 47.0, 83.0, 54.0], [58.0, -11.0, 9.0, 17.0, 1.0]], [[-25.0, -17.0, 43.0, -63.0, -50.0], [-17.0, -4.0, -56.0, 41.0, -51.0], [-68.0, -4.0, -72.0, 62.0, -7.0], [71.0, -14.0, 58.0, -80.0, -10.0]], [[-4.0, -105.0, -24.0, 26.0, 50.0], [-35.0, 31.0, -13.0, 28.0, 32.0], [-62.0, 52.0, -25.0, -100.0, -22.0], [-73.0, -69.0, -12.0, -6.0, -74.0]], [[21.0, 129.0, -88.0, 17.0, -20.0], [-26.0, 14.0, 41.0, 2.0, 15.0], [139.0, -35.0, -45.0, 51.0, 20.0], [-39.0, 55.0, 28.0, 21.0, 147.0]], [[-32.0, -47.0, -74.0, 9.0, 18.0], [-79.0, 52.0, -37.0, 85.0, -26.0], [-16.0, 7.0, -94.0, -57.0, 13.0], [-60.0, -56.0, 25.0, -19.0, -7.0]]]]))
17393        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17394        self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5, 4, 5),"wrong shape of result.")
17395        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17396     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17397     def test_generalTensorProduct_array_rank3_taggedData_rank0_offset0(self):     def test_generalTensorProduct_array_rank3_taggedData_rank0_offset0(self):
17398        arg0=numarray.array([[[-0.65590950908765722, -0.46988154727868836], [-0.56002222895730047, 0.18275989657489777]], [[0.28710912532944843, 0.31189706769489933], [-0.78555221112349671, -0.16965858921661914]], [[-0.89400426039850012, 0.18690490149727879], [-0.89830085160412732, -0.27093063385147098]], [[0.28913151430735495, -0.22822318441708522], [-0.47244075715807643, -0.33915573165506507]], [[-0.34901448804707647, 0.43942461967929081], [-0.73123884683499285, 0.026663240237298158]], [[-0.83509468944898413, 0.91738526705431234], [-0.66522592342333553, -0.079832586935975058]]])        arg0=numarray.array([[[1.0, -4.0], [7.0, -5.0]], [[-2.0, 5.0], [-6.0, -3.0]], [[-7.0, 0.0], [2.0, 6.0]], [[-7.0, -4.0], [-6.0, 5.0]], [[-1.0, 2.0], [2.0, 0.0]], [[5.0, -1.0], [-7.0, 1.0]]])
17399        arg1=Data(-0.322663700561,self.functionspace)        arg1=Data(3.0,self.functionspace)
17400        arg1.setTaggedValue(1,-0.843936317446)        arg1.setTaggedValue(1,-6.0)
17401        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17402        ref=Data(numarray.array([[[0.21163818943517851, 0.1516137188701312], [0.18069884479161669, -0.058969984542948134]], [[-0.092639692843546922, -0.10063786205646877], [0.25346918342475128, 0.054742668228542762]], [[0.2884627229772157, -0.060307427170045926], [0.28984907699541995, 0.087419480913772898]], [[-0.093292244355131421, 0.073639337237764821], [0.15243948300032609, 0.10943324344219656]], [[0.11261430626256945, -0.14178637390320015], [0.23594423231352099, -0.0086032597639056994]], [[0.26945474281620152, -0.29600692510761456], [0.21464425816068528, 0.025759077926095865]]]),self.functionspace)        ref=Data(numarray.array([[[3.0, -12.0], [21.0, -15.0]], [[-6.0, 15.0], [-18.0, -9.0]], [[-21.0, 0.0], [6.0, 18.0]], [[-21.0, -12.0], [-18.0, 15.0]], [[-3.0, 6.0], [6.0, 0.0]], [[15.0, -3.0], [-21.0, 3.0]]]),self.functionspace)
17403        ref.setTaggedValue(1,numarray.array([[[0.55354585567745385, 0.39655010264634999], [0.47262309759429788, -0.15423771409228754]], [[-0.24230181793576552, -0.26322126273273549], [0.66295604021736931, 0.14318104500660964]], [[0.75448266330202129, -0.15773583428227858], [0.75810871266167057, 0.22864820141600473]], [[-0.24400858544222395, 0.19260583381282476], [0.39870991280753298, 0.28622583921378419]], [[0.29454600177785856, -0.37084639532738556], [0.61711901957160953, -0.022502076777051658]], [[0.70476673693254477, -0.77421474395731515], [0.56140831608371011, 0.067373619430959111]]]))        ref.setTaggedValue(1,numarray.array([[[-6.0, 24.0], [-42.0, 30.0]], [[12.0, -30.0], [36.0, 18.0]], [[42.0, -0.0], [-12.0, -36.0]], [[42.0, 24.0], [36.0, -30.0]], [[6.0, -12.0], [-12.0, -0.0]], [[-30.0, 6.0], [42.0, -6.0]]]))
17404        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17405        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
17406        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17407     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17408     def test_generalTensorProduct_array_rank4_taggedData_rank1_offset1(self):     def test_generalTensorProduct_array_rank4_taggedData_rank1_offset1(self):
17409        arg0=numarray.array([[[[0.68965020543072919, -0.094139047419195876, -0.46166224871606376], [0.15793774243892189, -0.82152500574941345, 0.33184214763585174]], [[-0.76600140804105554, 0.84953547557526665, 0.36112585321477431], [0.62880894911077245, 0.73264056989712412, -0.092343222566488858]]], [[[0.43177254075985649, -0.89710320727681503, 0.87685335462556946], [0.9377044313675158, -0.9141659776883122, -0.13428782570132602]], [[-0.030314881784600622, -0.94799535670875668, 0.59929003441477247], [0.11006622394486132, -0.89565878319483949, -0.73000744027758557]]], [[[-0.28707232956824313, 0.43039543826290338, -0.71379819559912905], [-0.33793069144070009, -0.32045614125497779, 0.81065065001309544]], [[0.66944057472219187, 0.75139552448607771, -0.10979925865985596], [-0.38500613248348636, 0.46265740756604634, 0.22267963158655246]]], [[[0.7896479076065166, -0.14678484206764142, -0.05607593286453838], [-0.89028632652983419, 0.36552158111930066, 0.04787257209062723]], [[0.25566692772403599, -0.49270585612275819, -0.24530870374434466], [0.31094196313533051, 0.067242185088332684, 0.28356651675093758]]], [[[-0.29133422634503514, 0.021108073872341038, -0.55482430118110426], [0.60553005605455823, -0.71864499164781748, -0.70957499933337909]], [[-0.54387465680309544, -0.29800894824108171, -0.82287899226862593], [0.85871706099972411, 0.79871348615582605, -0.46444526770665862]]], [[[0.16660006897236546, -0.034708852612158392, -0.20574623779807899], [-0.16213598027542608, 0.35573079816432096, -0.2473294696115611]], [[0.42069947492940596, 0.35990759267564787, 0.84817564311353077], [0.64841022050128028, -0.21764105808290246, 0.42544198057290061]]]])        arg0=numarray.array([[[[-4.0, 6.0, 5.0], [1.0, -7.0, 7.0]], [[3.0, -2.0, 5.0], [-5.0, 0.0, -2.0]]], [[[7.0, 0.0, -6.0], [0.0, 5.0, -4.0]], [[2.0, -7.0, -7.0], [2.0, -3.0, 1.0]]], [[[7.0, 3.0, -1.0], [3.0, 0.0, 2.0]], [[1.0, -1.0, 0.0], [-1.0, 5.0, 4.0]]], [[[4.0, -6.0, -5.0], [-7.0, -1.0, 2.0]], [[0.0, 5.0, 4.0], [-2.0, -4.0, 0.0]]], [[[-4.0, 2.0, 1.0], [-3.0, -6.0, -4.0]], [[-7.0, 3.0, -2.0], [-3.0, -7.0, 4.0]]], [[[4.0, 0.0, 7.0], [-7.0, -3.0, 1.0]], [[0.0, -1.0, 3.0], [-5.0, -7.0, 0.0]]]])
17410        arg1=Data(numarray.array([-0.27228979651819207, 0.38945841128763004, -0.28307131109442474]),self.functionspace)        arg1=Data(numarray.array([-3.0, 3.0, -1.0]),self.functionspace)
17411        arg1.setTaggedValue(1,numarray.array([-0.98313351326312581, 0.48992129032425114, -0.38851144512181368]))        arg1.setTaggedValue(1,numarray.array([0.0, 0.0, -5.0]))
17412        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17413        ref=Data(numarray.array([[[-0.093764619926616916, -0.45688965113113456], [0.43720873543857319, 0.14025448867738766]], [[-0.71516367586411445, -0.57334394724966709], [-0.5305921483068532, -0.17214759325228501]], [[0.44784378090053401, -0.26226120278964238], [0.14143648944889745, 0.22198484512608166]], [[-0.25630617163915603, 0.37121998522064648], [-0.19206407929230468, -0.13874783497424256]], [[0.24460289648832159, -0.24390166709459107], [0.26496286331438607, 0.20871692244726262]], [[-0.00064029619010236294, 0.25270220181186365], [-0.21447732650452894, -0.38174804694791542]]]),self.functionspace)        ref=Data(numarray.array([[[25.0, -31.0], [-20.0, 17.0]], [[-15.0, 19.0], [-20.0, -16.0]], [[-11.0, -11.0], [-6.0, 14.0]], [[-25.0, 16.0], [11.0, -6.0]], [[17.0, -5.0], [32.0, -16.0]], [[-19.0, 11.0], [-6.0, -6.0]]]),self.functionspace)
17414        ref.setTaggedValue(1,numarray.array([[[-0.54477788556239348, -0.68668095078154545], [1.0289856447186452, -0.22339053911616216]], [[-1.2046675797563555, -1.3175856701468476], [-0.66747056946468675, -0.26339585461966109]], [[0.77040908489005067, -0.13971435382596173], [-0.24736653059218355, 0.51866456028228414]], [[-0.82645619915813551, 1.0357480865100985], [-0.39743657466782345, -0.38292292376653847]], [[0.51231732730875723, -0.67171836457517387], [0.70839838011382583, -0.27248447720609992]], [[-0.10085994880079562, 0.42977173721927969], [-0.56680330543731239, -0.9093898848085169]]]))        ref.setTaggedValue(1,numarray.array([[[-25.0, -35.0], [-25.0, 10.0]], [[30.0, 20.0], [35.0, -5.0]], [[5.0, -10.0], [0.0, -20.0]], [[25.0, -10.0], [-20.0, 0.0]], [[-5.0, 20.0], [10.0, -20.0]], [[-35.0, -5.0], [-15.0, 0.0]]]))
17415        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17416        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
17417        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17418     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17419     def test_generalTensorProduct_array_rank3_taggedData_rank1_offset0(self):     def test_generalTensorProduct_array_rank3_taggedData_rank1_offset0(self):
17420        arg0=numarray.array([[[0.62589245777823987, 0.8301479093180546], [0.67651428666337998, -0.28985020239866821]], [[0.53549468750700191, -0.02054906142579993], [-0.39407483689239431, 0.53006101674119188]], [[0.42853734777667807, 0.61236009553921966], [-0.0034079816261691764, 0.94706672745249088]], [[-0.72146223543335575, 0.33150359968843546], [-0.94844082018950737, 0.38989527543494029]], [[-0.79653750960766545, 0.87584891107449292], [-0.37533385704590394, -0.39611594341595624]], [[-0.35376180070975582, 0.30775706129022407], [-0.088232531469656594, 0.37511453253578764]]])        arg0=numarray.array([[[7.0, -5.0], [-2.0, 2.0]], [[6.0, 0.0], [-5.0, -3.0]], [[-4.0, -1.0], [2.0, -6.0]], [[3.0, -4.0], [4.0, 0.0]], [[5.0, 2.0], [-5.0, 0.0]], [[6.0, 2.0], [3.0, 0.0]]])
17421        arg1=Data(numarray.array([0.20183985169116592, -0.99186803419920611]),self.functionspace)        arg1=Data(numarray.array([0.0, 1.0]),self.functionspace)
17422        arg1.setTaggedValue(1,numarray.array([0.35804070734088111, 0.90962704264589256]))        arg1.setTaggedValue(1,numarray.array([1.0, 0.0]))
17423        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17424        ref=Data(numarray.array([[[[0.12633004085257926, -0.62080272171661244], [0.16755693089848758, -0.82339717490987963]], [[0.13654754328709151, -0.67101289562048494], [-0.058503321864801616, 0.28749315046540908]]], [[[0.1080841683078205, -0.53114006302168815], [-0.0041476195105761161, 0.020381957161046911]], [[-0.079540006633581267, 0.39087023379583191], [0.10698743700631079, -0.52575057868071851]]], [[[0.086495914719370293, -0.42505249672019518], [0.12359867086522429, -0.60738040418452388]], [[-0.00068786650599220503, 0.0033802680361354346], [0.19115580781064861, -0.93936521321377742]]], [[[-0.14561983060064554, 0.71559532920824742], [0.066910637396201442, -0.32880782375292905]], [[-0.19143315448489792, 0.94072813187564941], [0.078696404568874639, -0.38672466038921222]]], [[[-0.16077301280566184, 0.79006009382048636], [0.17678121431514482, -0.86872653768297259]], [[-0.075757330040818527, 0.3722816549565266], [-0.079951983271582872, 0.39289474211094849]]], [[[-0.071403229389256903, 0.35088502184475684], [0.062117639607727884, -0.30525439139285915]], [[-0.017808841066171616, 0.087515027541227877], [0.075713061614224406, -0.37206411398582584]]]]),self.functionspace)        ref=Data(numarray.array([[[[0.0, 7.0], [0.0, -5.0]], [[0.0, -2.0], [0.0, 2.0]]], [[[0.0, 6.0], [0.0, 0.0]], [[0.0, -5.0], [0.0, -3.0]]], [[[0.0, -4.0], [0.0, -1.0]], [[0.0, 2.0], [0.0, -6.0]]], [[[0.0, 3.0], [0.0, -4.0]], [[0.0, 4.0], [0.0, 0.0]]], [[[0.0, 5.0], [0.0, 2.0]], [[0.0, -5.0], [0.0, 0.0]]], [[[0.0, 6.0], [0.0, 2.0]], [[0.0, 3.0], [0.0, 0.0]]]]),self.functionspace)
17425        ref.setTaggedValue(1,numarray.array([[[[0.22409497830224356, 0.56932870538318947], [0.29722674464978988, 0.7551249877116526]], [[0.24221965372316817, 0.61537568988530589], [-0.10377817148971673, -0.26365558241821396]]], [[[0.19172889669229107, 0.48710044894958054], [-0.0073574004880846222, -0.01869198197389918]], [[-0.14109483334619521, -0.35846112846359113], [0.18978342136784296, 0.4821578350801653]]], [[[0.15343381511994697, 0.38980916032141405], [0.21924984175419174, 0.55701930273969658]], [[-0.0012201961520383383, -0.0030999922480038078], [0.3390884409961033, 0.8614775064809328]]], [[[-0.25831284909429197, -0.65626155959793808], [0.11869178331849572, 0.30154463901105938]], [[-0.33958042213161665, -0.86272741839362632], [0.1395983802055937, 0.35465928633549043]]], [[[-0.28519285336347244, -0.7245520592209449], [0.31358956364485191, 0.79669585478531635]], [[-0.13438479966569661, -0.34141382638954182], [-0.14182563256964942, -0.36031777415434402]]], [[[-0.1266611253563048, -0.32179130058070082], [0.11018955591350273, 0.27994414551481722]], [[-0.031590837977872398, -0.080258696665904378], [0.13430627256295738, 0.34121432288402498]]]]))        ref.setTaggedValue(1,numarray.array([[[[7.0, 0.0], [-5.0, 0.0]], [[-2.0, 0.0], [2.0, 0.0]]], [[[6.0, 0.0], [0.0, 0.0]], [[-5.0, 0.0], [-3.0, 0.0]]], [[[-4.0, 0.0], [-1.0, 0.0]], [[2.0, 0.0], [-6.0, 0.0]]], [[[3.0, 0.0], [-4.0, 0.0]], [[4.0, 0.0], [0.0, 0.0]]], [[[5.0, 0.0], [2.0, 0.0]], [[-5.0, 0.0], [0.0, 0.0]]], [[[6.0, 0.0], [2.0, 0.0]], [[3.0, 0.0], [0.0, 0.0]]]]))
17426        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17427        self.failUnlessEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
17428        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17429     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17430     def test_generalTensorProduct_array_rank4_taggedData_rank2_offset1(self):     def test_generalTensorProduct_array_rank4_taggedData_rank2_offset1(self):
17431        arg0=numarray.array([[[[0.6809077681853386, -0.78537506508661004, -0.98746396631714961], [0.64118138172840511, 0.50773530821417356, 0.58062405787449323]], [[-0.46881572060841714, -0.22729222687793715, -0.42362144226351983], [0.1715374591413128, -0.51403200198225818, -0.93489892518219264]]], [[[0.69692267629515658, -0.89745882802967336, -0.44171402140210225], [-0.15863386560102288, -0.72221244799160256, 0.77027516144143338]], [[0.3205087143828782, -0.68331579974575707, 0.55924865682280367], [0.24532277173791583, 0.028573542338105939, 0.32923664829465049]]], [[[-0.99465676613247744, -0.22803937585115031, -0.061528796537834385], [-0.27749729416656943, -0.21946188718968873, -0.42001900758175159]], [[-0.0093003374032845088, 0.91334655352400862, 0.28136441403867929], [0.93927325016175067, 0.61343305369157686, -0.8527350550779571]]], [[[0.716871273478767, 0.16418580511913805, -0.10984383791417418], [-0.15212146625373291, 0.16158669270434145, -0.57126567841025988]], [[0.66122223136475733, -0.43713955417871864, -0.91316383492301778], [-0.86258625561646363, 0.12885297969100118, -0.89410138655347571]]], [[[0.49932232623255812, -0.45798749151718998, 0.23836904068094422], [0.47983871977895487, -0.20110252712904919, 0.05283684026889035]], [[-0.58529188572426105, 0.6386139162688742, -0.98910387220867357], [-0.77606364027197117, -0.27301767017896905, 0.77637893135663938]]], [[[0.54693529643968342, 0.78019293949918334, 0.095065467419950922], [-0.76720278110163731, -0.26547621238494434, 0.29951860247754936]], [[0.32164845805958131, -0.62662174363575662, -0.64404855380835602], [0.21622141809489204, 0.74226726622085692, -0.48364764667492821]]]])        arg0=numarray.array([[[[0.0, -3.0, 0.0], [6.0, -2.0, -3.0]], [[4.0, 2.0, -6.0], [7.0, -1.0, -1.0]]], [[[-3.0, -4.0, -6.0], [2.0, 0.0, -5.0]], [[-3.0, -7.0, 5.0], [1.0, 4.0, -6.0]]], [[[-6.0, -6.0, -6.0], [0.0, -7.0, -1.0]], [[-3.0, -6.0, -4.0], [-1.0, 6.0, 4.0]]], [[[0.0, -3.0, 4.0], [-7.0, -3.0, 0.0]], [[-5.0, 0.0, -4.0], [-2.0, -4.0, 3.0]]], [[[-2.0, 4.0, 7.0], [7.0, 5.0, 6.0]], [[-5.0, 0.0, 0.0], [4.0, -3.0, -3.0]]], [[[-3.0, 4.0, -1.0], [-7.0, -3.0, 6.0]], [[-3.0, -4.0, -5.0], [3.0, 5.0, -5.0]]]])
17432        arg1=Data(numarray.array([[-0.042209530010759222, -0.17963061651045953], [0.75137285674644483, -0.43173041879407825], [0.18106341740506693, -0.32861523401628157]]),self.functionspace)        arg1=Data(numarray.array([[1.0, -2.0], [4.0, -7.0], [7.0, 5.0]]),self.functionspace)
17433        arg1.setTaggedValue(1,numarray.array([[0.94593827152453103, 0.12443000210954058], [-0.36500923568442434, -0.52469437798074536], [-0.0096993146174519929, -0.22328769328810893]]))        arg1.setTaggedValue(1,numarray.array([[4.0, 3.0], [5.0, -6.0], [2.0, -1.0]]))
17434        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17435        ref=Data(numarray.array([[[[-0.79764390345307434, 0.54125412594833089], [0.45956434037586813, -0.52518249480065693]], [[-0.22769506461929617, 0.32155108460507703], [-0.56274620363991001, 0.49833190102948338]]], [[[-0.78372123228003054, 0.40742558218399977], [-0.39648631624165892, 0.087172429273054408]], [[-0.42569399372987471, 0.053657410196158245], [0.070727137913173477, -0.16459572635748013]]], [[[-0.14049921683344285, 0.29734164322745482], [-0.22923475164649079, 0.2826200269646319]], [[0.73760117433360561, -0.48510949747871546], [0.26687154032041671, -0.15333821249240348]]], [[[0.073217257224199986, -0.16355967671634469], [0.02439751452540298, 0.14529038685109513]], [[-0.52170523984058104, 0.37003023303499438], [-0.028663060661950318, 0.39313248638152565]]], [[[-0.32203561746030523, 0.029701856130969553], [-0.16178992828674624, -0.016734637431153693]], [[0.32545153076982392, 0.15446188918499448], [-0.031806962757584822, 0.002144879024882862]]], [[[0.5803427943641597, -0.46631930982403103], [-0.11285648954367922, 0.15400088926525446]], [[-0.60101683198574929, 0.42439792321204012], [0.461021976126813, -0.20036535974431202]]]]),self.functionspace)        ref=Data(numarray.array([[[[-12.0, 21.0], [-23.0, -13.0]], [[-30.0, -52.0], [-4.0, -12.0]]], [[[-61.0, 4.0], [-33.0, -29.0]], [[4.0, 80.0], [-25.0, -60.0]]], [[[-72.0, 24.0], [-35.0, 44.0]], [[-55.0, 28.0], [51.0, -20.0]]], [[[16.0, 41.0], [-19.0, 35.0]], [[-33.0, -10.0], [3.0, 47.0]]], [[[63.0, 11.0], [69.0, -19.0]], [[-5.0, 10.0], [-29.0, -2.0]]], [[[6.0, -27.0], [23.0, 65.0]], [[-54.0, 9.0], [-12.0, -66.0]]]]),self.functionspace)
17436        ref.setTaggedValue(1,numarray.array([[[[0.94034359322044092, 0.71729578753299372], [0.41555827577284066, -0.31626986759161135]], [[-0.3563981327589143, 0.15551366716768972], [0.3589581545735816, 0.49980553240656111]]], [[[0.9911109159427598, 0.65623899654984097], [0.10608522787847649, 0.18720903494214211]], [[0.54717370841626756, 0.2735395159623662], [0.2184372219783374, -0.057981355762552693]]], [[[-0.85705063667450021, 0.0096244580089301507], [-0.17831579859184399, 0.17440650483102627]], [[-0.34490651447857562, -0.54321025376890453], [0.67285673026024129, -0.014585858606203872]]], [[[0.61925204804604372, 0.027579702370746886], [-0.19733726650556571, 0.02384449200156491]], [[0.79389245252117346, 0.51553879640825917], [-0.85431370866324563, 0.024701792533272621]]], [[[0.63718574612112555, 0.24920926684608438], [0.5267896077826687, 0.15342588211239427]], [[-0.77715634254818766, -0.1870502800941003], [-0.64198467086912525, -0.12667062446398375]]], [[[0.23166733053916871, -0.36253463793727797], [-0.63173032844828081, -0.023047985389009595]], [[0.53922913971544195, 0.51261574026646795], [-0.061711242328486612, -0.25456646264527849]]]]))        ref.setTaggedValue(1,numarray.array([[[[-15.0, 18.0], [8.0, 33.0]], [[14.0, 6.0], [21.0, 28.0]]], [[[-44.0, 21.0], [-2.0, 11.0]], [[-37.0, 28.0], [12.0, -15.0]]], [[[-66.0, 24.0], [-37.0, 43.0]], [[-50.0, 31.0], [34.0, -43.0]]], [[[-7.0, 14.0], [-43.0, -3.0]], [[-28.0, -11.0], [-22.0, 15.0]]], [[[26.0, -37.0], [65.0, -15.0]], [[-20.0, -15.0], [-5.0, 33.0]]], [[[6.0, -32.0], [-31.0, -9.0]], [[-42.0, 20.0], [27.0, -16.0]]]]))
17437        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17438        self.failUnlessEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2, 2),"wrong shape of result.")
17439        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17440     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17441     def test_generalTensorProduct_array_rank4_taggedData_rank0_offset0(self):     def test_generalTensorProduct_array_rank4_taggedData_rank0_offset0(self):
17442        arg0=numarray.array([[[[0.16992284518875045, 0.42497736497777039, -0.074963218142345633, 0.97051998593000821], [0.81693189585072234, -0.63930099715264865, -0.9931787666195806, 0.40602348957161172], [-0.42831467221506303, -0.79207734334941238, 0.1485277136291494, 0.051447066660140983]], [[-0.67343740545494946, -0.67790610273855445, -0.67654514153315626, 0.28771164156543128], [0.064054802746138062, 0.35149736436897916, 0.10847423144672375, 0.42368673297321013], [-0.95771239186921786, 0.14722577091748601, -0.0009995572991936541, 0.063408872479891576]]], [[[0.12784763234468977, 0.95493904501362792, 0.67978190938023864, 0.35617240624013236], [-0.99685884977636419, -0.40141336064735023, 0.10779272763182468, 0.91497666469124583], [0.13094617326647007, 0.8381927121985524, 0.8706382906307859, 0.93951718023900344]], [[-0.12540967012050319, 0.0054633136930497539, 0.88220321896824005, 0.89557268474210838], [-0.023691013748486256, -0.64494980770820209, 0.69053546080581119, -0.40368092749650741], [0.20600107892128561, 0.37543465009484334, -0.018722743929924235, 0.69517897873875367]]], [[[0.075487907440475732, 0.30861398900694503, -0.4005243908970173, -0.86375140685204066], [0.67716402915219165, -0.89838919173531528, 0.77418695015852435, 0.22798804476379453], [-0.69654217111037253, -0.1531317258266347, 0.11155192386356028, 0.12876961872860271]], [[-0.35332410430278216, 0.43728334948685199, -0.72270457504499075, -0.88541837356764641], [-0.25178433700068892, 0.64293972365899466, 0.60059338858797284, -0.34182315985696765], [-0.21217506051739021, -0.05910483575713954, -0.068049735526407584, 0.84531835454571769]]]])        arg0=numarray.array([[[[1.0, -7.0, -2.0, -5.0], [-6.0, 6.0, -7.0, 2.0], [7.0, 5.0, 0.0, 2.0]], [[0.0, -5.0, -3.0, -5.0], [5.0, -4.0, 3.0, 3.0], [-3.0, -1.0, -3.0, -7.0]]], [[[5.0, 4.0, 3.0, 5.0], [3.0, 5.0, -5.0, 2.0], [-7.0, -4.0, -5.0, 1.0]], [[2.0, 4.0, -5.0, 6.0], [-5.0, 2.0, -1.0, 6.0], [-4.0, -5.0, 0.0, -2.0]]], [[[-7.0, 5.0, 0.0, -5.0], [0.0, 4.0, -1.0, 0.0], [-7.0, 1.0, 7.0, -4.0]], [[5.0, -2.0, -7.0, -5.0], [6.0, 3.0, 0.0, -5.0], [0.0, -3.0, -4.0, 5.0]]]])
17443        arg1=Data(-0.508619867477,self.functionspace)        arg1=Data(2.0,self.functionspace)
17444        arg1.setTaggedValue(1,-0.387813583798)        arg1.setTaggedValue(1,0.0)
17445        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17446        ref=Data(numarray.array([[[[-0.086426135001248419, -0.21615193105579672, 0.038127782077223123, -0.49362574662767994], [-0.41550779260547965, 0.32516118844981218, 0.50515045265920477, -0.20651161345853722], [0.21784935182055915, 0.40286627340605863, -0.075544146022747213, -0.026167000226770792]], [[0.3425236439166755, 0.3447965121368583, 0.34410430022892707, -0.1463358570046529], [-0.032579545284017949, -0.17877854288392989, -0.055172149223122094, -0.21549548997667548], [0.48711154983377913, -0.074881952093278081, 0.00050839470105172894, -0.032251012317600157]]], [[[-0.065025845820427933, -0.48570097052362071, -0.34575058466236452, -0.18115636206088612], [0.50702221606671316, 0.20416681029602662, -0.054825522843102936, -0.46537530993997789], [-0.066601825293436473, -0.42632146619876971, -0.44282393200119291, -0.47785710370570017]], [[0.063785849797047781, -0.0027787498865452544, -0.44870608431957199, -0.45550606022971768], [0.01204972027315524, 0.32803428572598148, -0.35122005456334832, 0.20532013984634059], [-0.10477624146110134, -0.19095352197758242, 0.009522759536447328, -0.35358184003902948]]], [[[-0.038394649478504753, -0.1569672061903177, 0.20371466261942106, 0.43932112608631674], [-0.34441907876770417, 0.4569385916433511, -0.39376686399219446, -0.11595924911414363], [0.3542751867624282, 0.077885838096495519, -0.056737524732309023, -0.065494786412829506]], [[0.17970765910697603, -0.2224109992659821, 0.36758190518453826, 0.45034137582584072], [0.12806251611812119, -0.32701191704325561, -0.30547372971128806, 0.1738580502670834], [0.10791645116231866, 0.03006189373005708, 0.034611447465298893, -0.42994570946507477]]]]),self.functionspace)        ref=Data(numarray.array([[[[2.0, -14.0, -4.0, -10.0], [-12.0, 12.0, -14.0, 4.0], [14.0, 10.0, 0.0, 4.0]], [[0.0, -10.0, -6.0, -10.0], [10.0, -8.0, 6.0, 6.0], [-6.0, -2.0, -6.0, -14.0]]], [[[10.0, 8.0, 6.0, 10.0], [6.0, 10.0, -10.0, 4.0], [-14.0, -8.0, -10.0, 2.0]], [[4.0, 8.0, -10.0, 12.0], [-10.0, 4.0, -2.0, 12.0], [-8.0, -10.0, 0.0, -4.0]]], [[[-14.0, 10.0, 0.0, -10.0], [0.0, 8.0, -2.0, 0.0], [-14.0, 2.0, 14.0, -8.0]], [[10.0, -4.0, -14.0, -10.0], [12.0, 6.0, 0.0, -10.0], [0.0, -6.0, -8.0, 10.0]]]]),self.functionspace)
17447        ref.setTaggedValue(1,numarray.array([[[[-0.065898387561759586, -0.16481199494495358, 0.029071754280795579, -0.37638083389085847], [-0.31681728624855898, 0.2479296108312439, 0.38516821683456881, -0.15746142459683515], [0.16610624802488222, 0.30717835316933662, -0.057601064915806362, -0.019951871297351022]], [[0.26116817367294243, 0.26290119518140459, 0.26237339593892939, -0.11157848281582362], [-0.024841322612437766, -0.13631545257139741, -0.04206778044706054, -0.16431147032190099], [0.37141387493831662, -0.05709615384689682, 0.00038764189841149096, -0.024590822081001284]]], [[[-0.049581048479651293, -0.37033833335513605, -0.26362865847762773, -0.13812849731385385], [0.3865954030722748, 0.15567355397694765, -0.041803484010232692, -0.35484037942522434], [-0.050782704739070893, -0.32506251963087673, -0.33764535568107218, -0.36435752470804467]], [[0.048635573612325962, -0.0021187472627129463, -0.34213039198598444, -0.3473152524212097], [0.0091876969456022237, 0.25012029629698768, -0.26779903179453246, 0.15655294720322027], [-0.079890016682666931, -0.14559865713513551, 0.0072609344219914896, -0.26959985112553597]]], [[[-0.029275235917883738, -0.11968469708690281, 0.15532879943218325, 0.3349745286016384], [-0.26261340896443558, 0.34840753209203668, -0.30024021567042747, -0.088416860702889025], [0.27012851564457924, 0.05938656338596169, -0.043261351373061072, -0.049938607323409295]], [[0.137023887131792, -0.16958442289958012, 0.28027465127522788, 0.34337727261364404], [0.097645386076377627, -0.24934075839812983, -0.23291827443353649, 0.13256366464920186], [0.082284370611753616, 0.022921658174753692, 0.0263906118109852, -0.32782594052639191]]]]))        ref.setTaggedValue(1,numarray.array([[[[0.0, -0.0, -0.0, -0.0], [-0.0, 0.0, -0.0, 0.0], [0.0, 0.0, 0.0, 0.0]], [[0.0, -0.0, -0.0, -0.0], [0.0, -0.0, 0.0, 0.0], [-0.0, -0.0, -0.0, -0.0]]], [[[0.0, 0.0, 0.0, 0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, -0.0, 0.0]], [[0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, -0.0, 0.0], [-0.0, -0.0, 0.0, -0.0]]], [[[-0.0, 0.0, 0.0, -0.0], [0.0, 0.0, -0.0, 0.0], [-0.0, 0.0, 0.0, -0.0]], [[0.0, -0.0, -0.0, -0.0], [0.0, 0.0, 0.0, -0.0], [0.0, -0.0, -0.0, 0.0]]]]))
17448        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
17449        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
17450        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17451     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17452     def test_generalTensorProduct_Symbol_rank0_taggedData_rank0_offset0(self):     def test_generalTensorProduct_Symbol_rank0_taggedData_rank0_offset0(self):
17453        arg0=Symbol(shape=())        arg0=Symbol(shape=())
17454        arg1=Data(-0.167809933918,self.functionspace)        arg1=Data(2.0,self.functionspace)
17455        arg1.setTaggedValue(1,0.40615815881)        arg1.setTaggedValue(1,-4.0)
17456        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17457        s0=numarray.array(0.915122477631)        s0=numarray.array(-4.0)
17458        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17459        ref=Data(-0.15356664249772489,self.functionspace)        ref=Data(-8.0,self.functionspace)
17460        ref.setTaggedValue(1,0.37168446059989751)        ref.setTaggedValue(1,16.0)
17461        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17462        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17463        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17464     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17465     def test_generalTensorProduct_Symbol_rank1_taggedData_rank1_offset1(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank1_offset1(self):
17466        arg0=Symbol(shape=(3,))        arg0=Symbol(shape=(3,))
17467        arg1=Data(numarray.array([-0.70595359985013251, 0.2438999137740876, -0.99846126486433207]),self.functionspace)        arg1=Data(numarray.array([-4.0, 6.0, 6.0]),self.functionspace)
17468        arg1.setTaggedValue(1,numarray.array([-0.87349595301467287, 0.87823531156670054, 0.45898540029030532]))        arg1.setTaggedValue(1,numarray.array([-6.0, -5.0, -5.0]))
17469        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17470        s0=numarray.array([-0.0031254981919577318, -0.49148490455195581, 0.80154351471610763])        s0=numarray.array([-3.0, -1.0, 2.0])
17471        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17472        ref=Data(-0.91797682068879727,self.functionspace)        ref=Data(18.0,self.functionspace)
17473        ref.setTaggedValue(1,-0.061012517305616298)        ref.setTaggedValue(1,13.0)
17474        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17475        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17476        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17477     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17478     def test_generalTensorProduct_Symbol_rank2_taggedData_rank2_offset2(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank2_offset2(self):
17479        arg0=Symbol(shape=(2, 3))        arg0=Symbol(shape=(2, 3))
17480        arg1=Data(numarray.array([[-0.93074172873498373, -0.64051633155646925, 0.18923282981434042], [0.14381211673174188, 0.17256013000469084, -0.26321858552082955]]),self.functionspace)        arg1=Data(numarray.array([[-6.0, -5.0, 2.0], [-6.0, 0.0, 6.0]]),self.functionspace)
17481        arg1.setTaggedValue(1,numarray.array([[0.28816893408260258, 0.063101374125867249, -0.20878877378723515], [-0.81182382338976589, -0.11904129955094844, -0.54509430483885968]]))        arg1.setTaggedValue(1,numarray.array([[7.0, 7.0, -3.0], [-1.0, -1.0, 5.0]]))
17482        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17483        s0=numarray.array([[-0.30071377941136923, -0.67483970932541149, 0.3333757368181578], [-0.62868570493317621, -0.7594387531566924, 0.45815298708807317]])        s0=numarray.array([[-2.0, -3.0, -7.0], [-2.0, 1.0, -5.0]])
17484        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17485        ref=Data(0.43316249880484375,self.functionspace)        ref=Data(-5.0,self.functionspace)
17486        ref.setTaggedValue(1,0.152205231237107)        ref.setTaggedValue(1,-38.0)
17487        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17488        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17489        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17490     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17491     def test_generalTensorProduct_Symbol_rank3_taggedData_rank3_offset3(self):     def test_generalTensorProduct_Symbol_rank3_taggedData_rank3_offset3(self):
17492        arg0=Symbol(shape=(2, 4, 3))        arg0=Symbol(shape=(2, 4, 3))
17493        arg1=Data(numarray.array([[[0.338763458023154, -0.99171534740386225, 0.83965976831207301], [-0.88676822185898496, -0.22516535066263677, -0.23055962847069944], [-0.21863716675324829, 0.85117245923828233, -0.8094179946330029], [-0.91642537436470262, 0.73127043092393351, -0.48119910407205468]], [[-0.29567851515334542, 0.46079889844225441, -0.8599054065534546], [-0.5407248731177452, 0.89489625288626873, 0.51137695424642815], [-0.9111870671491531, -0.51812695483698623, 0.034999963460251582], [-0.40263342388187628, -0.10112434670170845, 0.92816835792758456]]]),self.functionspace)        arg1=Data(numarray.array([[[-3.0, 4.0, 0.0], [2.0, 0.0, -6.0], [7.0, 6.0, -7.0], [-6.0, -4.0, 0.0]], [[-6.0, -5.0, 3.0], [6.0, 3.0, 4.0], [-5.0, -2.0, 7.0], [-6.0, -4.0, 6.0]]]),self.functionspace)
17494        arg1.setTaggedValue(1,numarray.array([[[0.65304071202653668, -0.26899219838924449, 0.95536095752490335], [0.39235741128201274, 0.13449560449636522, 0.93385225132171801], [0.27926780526419859, -0.96019697686038885, 0.52421149520737864], [0.50089402219921531, -0.84797143792164253, 0.59792551111964909]], [[-0.22237286202330586, -0.58739228623859097, -0.88956882067764598], [-0.68586543238655673, 0.47476373167683739, -0.042095220082579043], [-0.93703162370675797, -0.1567908399718323, 0.8790435650941808], [0.75189154976346995, -0.87842233148061566, -0.29801159649978093]]]))        arg1.setTaggedValue(1,numarray.array([[[-2.0, -5.0, 5.0], [2.0, 1.0, 2.0], [2.0, -7.0, 0.0], [0.0, 4.0, 0.0]], [[-1.0, -3.0, -4.0], [0.0, -3.0, 7.0], [-2.0, -6.0, -7.0], [-2.0, -7.0, 0.0]]]))
17495        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17496        s0=numarray.array([[[-0.65595025284840558, -0.53971855931246049, 0.47979976444242878], [0.69227206459202617, 0.88281924161707903, -0.36735231753544251], [0.035340701387385431, 0.64520906787846077, -0.019888621792771843], [-0.10956597460369877, 0.37892372931031626, 0.87313482417823085]], [[0.91914032356442665, -0.17973444306632569, 0.86368169796714978], [0.88650019814183767, 0.72137146505017857, 0.19482387226402698], [-0.89968498159075216, -0.95734140282817792, -0.79390329750247868], [0.065462492474112732, 0.00030927061150465285, -0.43687898324532215]]])        s0=numarray.array([[[3.0, 2.0, 2.0], [-7.0, 5.0, 0.0], [0.0, -2.0, -3.0], [0.0, -5.0, 2.0]], [[-7.0, -4.0, -3.0], [0.0, 4.0, -5.0], [-1.0, -5.0, -2.0], [2.0, -1.0, 1.0]]])
17497        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17498        ref=Data(0.52752939272015253,self.functionspace)        ref=Data(58.0,self.functionspace)
17499        ref.setTaggedValue(1,-0.91816900824285219)        ref.setTaggedValue(1,12.0)
17500        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17501        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17502        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17503     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17504     def test_generalTensorProduct_Symbol_rank4_taggedData_rank4_offset4(self):     def test_generalTensorProduct_Symbol_rank4_taggedData_rank4_offset4(self):
17505        arg0=Symbol(shape=(4, 2, 3, 2))        arg0=Symbol(shape=(4, 2, 3, 2))
17506        arg1=Data(numarray.array([[[[0.18277127255586367, 0.36613822209614932], [-0.46324145456981114, 0.97170929935368], [0.77171337682793961, -0.88027109611283216]], [[-0.72318804822595606, -0.72555507250023177], [0.71702514365294134, 0.5012884781452831], [0.56025949138680042, 0.13660616065195441]]], [[[0.92841341907928276, 0.11013000105001391], [-0.81943390991928733, -0.82165717971247121], [0.17867872242553529, 0.1004921728478898]], [[0.34615164735316317, 0.35670016488623313], [0.90457920335512609, -0.21233780010749381], [-0.71726631760078097, -0.29543663001474574]]], [[[-0.46496532672005286, -0.78116397361492007], [0.57767196344266125, 0.97103796085770178], [0.76883595661676418, 0.70591842900658563]], [[0.20589462703207273, 0.79787555511809716], [0.93841289115569859, -0.40005740246926669], [0.45997016976806915, 0.57745884326129793]]], [[[0.98749860853231164, -0.17879245564403945], [0.39777173253183906, 0.82223615109719583], [-0.52495355463362525, -0.22616044597492269]], [[0.9126604179102249, -0.79924398400106189], [-0.71021207410430676, 0.23883656788179497], [-0.42232418523553217, 0.23617328007704286]]]]),self.functionspace)        arg1=Data(numarray.array([[[[6.0, -3.0], [-6.0, 5.0], [-7.0, -5.0]], [[0.0, -2.0], [-1.0, -6.0], [-4.0, 1.0]]], [[[-3.0, 1.0], [-5.0, 1.0], [7.0, 1.0]], [[-5.0, -4.0], [-4.0, 2.0], [-6.0, -4.0]]], [[[1.0, 4.0], [0.0, 6.0], [2.0, 5.0]], [[4.0, -5.0], [-4.0, 0.0], [2.0, 2.0]]], [[[3.0, -5.0], [2.0, 0.0], [-1.0, 5.0]], [[5.0, 0.0], [4.0, 7.0], [-1.0, 2.0]]]]),self.functionspace)
17507        arg1.setTaggedValue(1,numarray.array([[[[0.2900796263966956, 0.7001214339766737], [0.06102986364713936, 0.41616548935691977], [0.81111398675538315, 0.71498696017103569]], [[0.38932379950953733, 0.42819850642932944], [0.85299183068860329, -0.25786174287691077], [0.63437747881104034, 0.65618827321264606]]], [[[-0.028493296771181509, -0.50880204351211744], [-0.22173677406728354, -0.9811948831436228], [0.74505135342714102, 0.65634056862456691]], [[-0.17273772499006035, -0.1048731049297269], [0.9530459236812534, -0.93600888406176463], [-0.47436919193551597, 0.79731250652611108]]], [[[-0.54234349656447245, 0.84331223671560651], [0.37140994774826952, 0.091564165437392209], [0.99645194722587482, 0.17326898921423495]], [[0.50948075965188666, 0.071530667260559788], [0.56968723586063064, 0.77233124482637439], [-0.027086287653206087, 0.8126994122958684]]], [[[-0.12253727602072173, -0.40736419156677983], [0.016231428664967629, -0.45348486047398096], [-0.14107885356515437, 0.93633917339456141]], [[0.40556372823313991, 0.99277660127674627], [0.87884594695894491, -0.64055121428508377], [0.36809903127275834, -0.080164354202874488]]]]))        arg1.setTaggedValue(1,numarray.array([[[[4.0, 2.0], [-1.0, 2.0], [-3.0, -7.0]], [[1.0, -5.0], [4.0, 5.0], [4.0, -1.0]]], [[[-5.0, 7.0], [-7.0, 7.0], [-3.0, -7.0]], [[4.0, 3.0], [-2.0, -5.0], [-3.0, -2.0]]], [[[-6.0, 3.0], [-1.0, -2.0], [6.0, 2.0]], [[-3.0, -5.0], [-1.0, -2.0], [0.0, 4.0]]], [[[5.0, 4.0], [0.0, 2.0], [4.0, -2.0]], [[-4.0, 1.0], [6.0, 4.0], [-2.0, 5.0]]]]))
17508        res=generalTensorProduct(arg0,arg1,4)        res=generalTensorProduct(arg0,arg1,axis_offset=4)
17509        s0=numarray.array([[[[-0.41354698038544146, -0.30054069872569111], [0.25458756705083663, 0.68388991922674869], [0.91645308897366706, 0.37529094468558233]], [[0.23266243370999717, -0.089549440298144711], [0.41771345019814965, -0.7610883670438322], [0.040473784113955302, 0.40546969846349712]]], [[[0.90256117085447118, 0.99331644564316868], [-0.42629137025658781, -0.72774267994145148], [0.33467696232402022, 0.30605220732219229]], [[0.6976481718401053, 0.69854386939839808], [0.64907101060191952, -0.44442655759051508], [0.52746909752027693, 0.66023853945534849]]], [[[0.31999319202424359, -0.80359430646849694], [-0.79384942794740332, 0.49362744512371837], [0.42956711824723981, -0.59719910431169265]], [[-0.94464463085895467, -0.62550309866010378], [-0.98593037109551496, -0.27051002644324318], [0.50588836505468837, -0.15434037803005562]]], [[[-0.27259569645007731, 0.19895229046523832], [-0.39141519932954738, -0.72204296583465744], [0.58215225131898141, -0.8813091097381589]], [[-0.76537468434523315, 0.6178434289556638], [0.7734315901108253, 0.22048189992798184], [-0.78578446335942531, -0.45830764498826015]]]])        s0=numarray.array([[[[0.0, 6.0], [-7.0, 0.0], [2.0, 4.0]], [[5.0, -2.0], [-3.0, -6.0], [7.0, 0.0]]], [[[0.0, 4.0], [1.0, -2.0], [7.0, -3.0]], [[-3.0, -1.0], [-3.0, -6.0], [5.0, 3.0]]], [[[0.0, 2.0], [-7.0, -5.0], [-7.0, -7.0]], [[1.0, -2.0], [7.0, -2.0], [-6.0, 0.0]]], [[[-1.0, 7.0], [-2.0, 5.0], [5.0, 0.0]], [[4.0, 4.0], [-2.0, 0.0], [-3.0, 4.0]]]])
17510        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17511        ref=Data(-0.36981406321933746,self.functionspace)        ref=Data(-96.0,self.functionspace)
17512        ref.setTaggedValue(1,1.4657025816529778)        ref.setTaggedValue(1,19.0)
17513        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17514        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
17515        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17516     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17517     def test_generalTensorProduct_Symbol_rank0_taggedData_rank1_offset0(self):     def test_generalTensorProduct_Symbol_rank0_taggedData_rank1_offset0(self):
17518        arg0=Symbol(shape=())        arg0=Symbol(shape=())
17519        arg1=Data(numarray.array([0.28138237725660642, 0.19716248503489986]),self.functionspace)        arg1=Data(numarray.array([3.0, -4.0]),self.functionspace)
17520        arg1.setTaggedValue(1,numarray.array([0.2251704384541191, -0.77629093481779443]))        arg1.setTaggedValue(1,numarray.array([0.0, -4.0]))
17521        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17522        s0=numarray.array(0.855950990257)        s0=numarray.array(-4.0)
17523        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17524        ref=Data(numarray.array([0.24084952445378083, 0.16876142430723742]),self.functionspace)        ref=Data(numarray.array([-12.0, 16.0]),self.functionspace)
17525        ref.setTaggedValue(1,numarray.array([0.19273485977150201, -0.664466994385154]))        ref.setTaggedValue(1,numarray.array([-0.0, 16.0]))
17526        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17527        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17528        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17529     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17530     def test_generalTensorProduct_Symbol_rank1_taggedData_rank2_offset1(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank2_offset1(self):
17531        arg0=Symbol(shape=(3,))        arg0=Symbol(shape=(3,))
17532        arg1=Data(numarray.array([[0.44577229612815805, -0.11439167324795663], [0.56029144170168355, -0.63873596744636418], [0.47184604620641135, 0.93227983697187433]]),self.functionspace)        arg1=Data(numarray.array([[7.0, 6.0], [1.0, 1.0], [0.0, -5.0]]),self.functionspace)
17533        arg1.setTaggedValue(1,numarray.array([[-0.26602274335170928, 0.33664142669925279], [-0.096827128766988402, -0.91625774483800071], [-0.67099066361764104, -0.53488685466413211]]))        arg1.setTaggedValue(1,numarray.array([[-3.0, 1.0], [-3.0, 2.0], [-3.0, -3.0]]))
17534        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17535        s0=numarray.array([-0.39283591937188311, -0.4370939277733672, -0.1069694501011067])        s0=numarray.array([-6.0, -2.0, 4.0])
17536        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17537        ref=Data(numarray.array([-0.47048846882629292, 0.22439930944887121]),self.functionspace)        ref=Data(numarray.array([-44.0, -58.0]),self.functionspace)
17538        ref.setTaggedValue(1,numarray.array([0.21860134129633552, 0.3254624048976788]))        ref.setTaggedValue(1,numarray.array([12.0, -22.0]))
17539        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17540        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17541        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17542     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17543     def test_generalTensorProduct_Symbol_rank2_taggedData_rank3_offset2(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank3_offset2(self):
17544        arg0=Symbol(shape=(2, 3))        arg0=Symbol(shape=(2, 3))
17545        arg1=Data(numarray.array([[[0.48748575379055015, 0.53922382201059627], [-0.5461912866930394, 0.29786698947171297], [-0.68212863255680745, -0.48367269355243847]], [[-0.27912031235522772, -0.067523361045184638], [0.26812683418528871, -0.084419112598145718], [0.54087173050106041, 0.045578991720064854]]]),self.functionspace)        arg1=Data(numarray.array([[[-5.0, -3.0], [-7.0, 2.0], [3.0, 2.0]], [[4.0, 0.0], [2.0, -5.0], [3.0, -6.0]]]),self.functionspace)
17546        arg1.setTaggedValue(1,numarray.array([[[-0.3033353855794958, -0.19098806051859318], [0.67076932487858998, -0.51246050158819934], [-0.21476337901362075, -0.50418244612200858]], [[0.32316361890289902, 0.34275172090119455], [-0.027240426583106547, -0.50232236443509071], [0.59432220061991026, -0.70554618638328037]]]))        arg1.setTaggedValue(1,numarray.array([[[6.0, 7.0], [4.0, -2.0], [-3.0, 1.0]], [[-2.0, -7.0], [1.0, -4.0], [-5.0, -5.0]]]))
17547        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17548        s0=numarray.array([[0.048335264526378152, -0.69693997521695894, -0.35753012589910971], [-0.011034693633192427, 0.2865390131917982, -0.59459060747678927]])        s0=numarray.array([[-1.0, 1.0, 0.0], [7.0, -4.0, 0.0]])
17549        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17550        ref=Data(numarray.array([0.40641838535698244, -0.059149437155990005]),self.functionspace)        ref=Data(numarray.array([18.0, 25.0]),self.functionspace)
17551        ref.setTaggedValue(1,numarray.array([-0.77011322960568751, 0.79997718501089743]))        ref.setTaggedValue(1,numarray.array([-20.0, -42.0]))
17552        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17553        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17554        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17555     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17556     def test_generalTensorProduct_Symbol_rank3_taggedData_rank4_offset3(self):     def test_generalTensorProduct_Symbol_rank3_taggedData_rank4_offset3(self):
17557        arg0=Symbol(shape=(2, 4, 3))        arg0=Symbol(shape=(2, 4, 3))
17558        arg1=Data(numarray.array([[[[-0.036806182949287392, 0.3588620396258293], [0.60382800793994829, -0.83114799758347169], [0.13455967654205647, 0.77315772887346967]], [[-0.25248012468754344, -0.74575171654228489], [0.56620954335080054, 0.24979784840523167], [0.65866378850217489, -0.2360823464400188]], [[-0.20206335952576882, -0.86131297427387676], [-0.51179990993312341, -0.02823131378193211], [0.8136428634606383, 0.85051841892711533]], [[0.65078494752592109, 0.17332258987598959], [0.9921406434394151, 0.61736183509425779], [-0.9448085875211969, 0.39955760323828393]]], [[[-0.0052904814975156533, -0.54290559300635777], [0.24729749573869753, -0.73604871032772734], [-0.47627728383915935, 0.64889240137708515]], [[-0.92551942815095822, 0.30881466964716098], [-0.78943794939284961, -0.70452042584007391], [0.38194023466788085, 0.87556968092905074]], [[0.51130821924921754, 0.98075564315162844], [-0.48542269521623771, 0.17115154173386915], [0.71050968704210882, -0.40949724594856951]], [[0.96023113091117507, 0.48630935089896155], [0.77646686005574495, -0.092768987372596978], [-0.68798489936228546, -0.99191392196581507]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-6.0, -2.0], [-1.0, -5.0], [-2.0, 5.0]], [[5.0, -6.0], [4.0, 2.0], [-2.0, -1.0]], [[6.0, -7.0], [-5.0, 7.0], [-4.0, -3.0]], [[-4.0, -3.0], [-7.0, 5.0], [-7.0, 0.0]]], [[[-3.0, 7.0], [4.0, -7.0], [-6.0, 6.0]], [[-7.0, 5.0], [4.0, -3.0], [-7.0, 6.0]], [[-5.0, 5.0], [5.0, -4.0], [-2.0, -4.0]], [[6.0, -2.0], [-4.0, -5.0], [7.0, -4.0]]]]),self.functionspace)
17559        arg1.setTaggedValue(1,numarray.array([[[[0.095312325889383764, -0.69037255617432303], [0.028230158133491834, -0.37462235159427304], [0.01811388441846784, -0.10902084133002643]], [[-0.55561459241054334, -0.3962736770112314], [-0.16371959487362919, 0.26418728785990231], [0.93030812021133213, 0.69416468925862662]], [[-0.30646013674203543, -0.72275899449227965], [-0.83905662638681577, 0.70228322937336185], [-0.60987395821236268, -0.27075247060184116]], [[0.25244655936316907, -0.076444296594003758], [0.18703204511739724, -0.94036028644460279], [-0.72987860381405856, -0.1148766364079874]]], [[[0.40137498756944168, -0.061083231009979144], [-0.95727920651358867, 0.57368791065782454], [-0.92247079704626289, 0.57293216252151691]], [[-0.86404795466396989, -0.39410396517585622], [0.65446139567582162, -0.37293588347152062], [0.18340987025489031, 0.20094559856738381]], [[-0.46970973445923048, 0.15028418272336896], [-0.21400435037119347, -0.67576536535541631], [-0.69009375807966622, 0.57121507339578015]], [[0.66515649940144828, -0.81018622007830521], [-0.14538578476566566, -0.29488917587085117], [0.19687425335497988, 0.75086905609185428]]]]))        arg1.setTaggedValue(1,numarray.array([[[[1.0, -1.0], [5.0, -7.0], [1.0, -1.0]], [[-2.0, -3.0], [0.0, 7.0], [4.0, 5.0]], [[3.0, 4.0], [0.0, 0.0], [-1.0, 5.0]], [[-7.0, -6.0], [0.0, -5.0], [6.0, 7.0]]], [[[2.0, -5.0], [7.0, -7.0], [-5.0, 6.0]], [[2.0, 2.0], [2.0, 2.0], [0.0, -4.0]], [[7.0, 2.0], [-2.0, 3.0], [-1.0, -2.0]], [[7.0, 1.0], [2.0, 1.0], [-4.0, 0.0]]]]))
17560        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17561        s0=numarray.array([[[-0.49853801091014716, 0.060460383247491922, -0.73321921420642178], [-0.90329519922371948, -0.57921441581767819, -0.013620829544860991], [0.53098072083157954, 0.23592231826088383, -0.30240001259970328], [0.75741886442810857, -0.63324338093302157, 0.73961497735830672]], [[-0.54263874305269066, -0.13866484377034327, 0.55513283528798829], [-0.1066522224455162, 0.64052261707004399, 0.16552311090728633], [0.36093716879763593, -0.38915318316290781, -0.87222679737207498], [0.16870017186486619, 0.7677796606440821, 0.50092271794631915]]])        s0=numarray.array([[[-4.0, 5.0, 0.0], [-2.0, 7.0, 3.0], [-3.0, -1.0, 2.0], [1.0, 2.0, 6.0]], [[6.0, -3.0, 4.0], [3.0, -7.0, 0.0], [-7.0, -3.0, -6.0], [-6.0, -3.0, -5.0]]])
17562        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17563        ref=Data(numarray.array([-1.9331899783448643, -0.37310967166496833]),self.functionspace)        ref=Data(numarray.array([-180.0, 192.0]),self.functionspace)
17564        ref.setTaggedValue(1,numarray.array([0.44106448543702037, 0.85343786530973487]))        ref.setTaggedValue(1,numarray.array([-47.0, 50.0]))
17565        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17566        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17567        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17568     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17569     def test_generalTensorProduct_Symbol_rank0_taggedData_rank2_offset0(self):     def test_generalTensorProduct_Symbol_rank0_taggedData_rank2_offset0(self):
17570        arg0=Symbol(shape=())        arg0=Symbol(shape=())
17571        arg1=Data(numarray.array([[0.96541525508569892, -0.20650686853630895, -0.48763896957938879, -0.8104297616673195, -0.42132709781723676], [-0.021156033231873206, 0.12656458056491204, -0.49355873426137675, 0.41110080826654594, 0.17286851537255687], [-0.22623928477888366, -0.36090330096799406, 0.27673576413418366, -0.90984744619519198, -0.33293232304086673], [0.22563792818349548, -0.71485160842341267, 0.15043900244238584, 0.25666644923042137, -0.42353203248171623]]),self.functionspace)        arg1=Data(numarray.array([[2.0, 7.0, -7.0, -3.0, 3.0], [0.0, -1.0, 0.0, 6.0, 0.0], [5.0, 3.0, 6.0, 6.0, 7.0], [-7.0, 2.0, 5.0, 6.0, 0.0]]),self.functionspace)
17572        arg1.setTaggedValue(1,numarray.array([[-0.35560944761073765, -0.41872814713152362, 0.56471375879078201, -0.80781183568053083, 0.25404603802263126], [-0.91908712869599429, 0.98539720891027205, -0.10218832145119006, 0.63064091551821999, -0.98598359223603227], [0.019346565065388566, -0.086583298571799361, 0.64441947468352145, -0.18441950916748695, 0.8052302653511989], [-0.19346796771248709, -0.99970607126853617, 0.63336324244368947, -0.57823062772004219, -0.15006923970790553]]))        arg1.setTaggedValue(1,numarray.array([[0.0, 3.0, 7.0, 0.0, -1.0], [0.0, 0.0, -1.0, 0.0, 0.0], [-4.0, -1.0, 2.0, 3.0, -3.0], [-7.0, 2.0, 2.0, 0.0, -7.0]]))
17573        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17574        s0=numarray.array(0.77467869957)        s0=numarray.array(6.0)
17575        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17576        ref=Data(numarray.array([[0.74788663435451319, -0.15997647236991322, -0.37776352281325615, -0.62782267386099899, -0.3263931282305213], [-0.016389128312120319, 0.098046884683607144, -0.38234943841885705, 0.31847103953996919, 0.13391755668535235], [-0.17526275492407847, -0.27958409986428789, 0.2143813018838891, -0.70483943642527924, -0.25791557905800888], [0.17479689677878552, -0.55378031439873832, 0.1165418907766263, 0.19883403111298828, -0.32810124414903635]]),self.functionspace)        ref=Data(numarray.array([[12.0, 42.0, -42.0, -18.0, 18.0], [0.0, -6.0, 0.0, 36.0, 0.0], [30.0, 18.0, 36.0, 36.0, 42.0], [-42.0, 12.0, 30.0, 36.0, 0.0]]),self.functionspace)
17577        ref.setTaggedValue(1,numarray.array([[-0.27548306442977594, -0.32437977649306737, 0.43747172028914488, -0.62579462236198391, 0.19680405436619963], [-0.71199722164943735, 0.76336622835819479, -0.079163115973015619, 0.48854408432908258, -0.76382048703044403], [0.014987371865995277, -0.067074237142054238, 0.49921804062520209, -0.14286586553714614, 0.62379473481640935], [-0.14987551363589696, -0.77445099924221628, 0.49065301301150877, -0.44794295073351792, -0.11625544346232977]]))        ref.setTaggedValue(1,numarray.array([[0.0, 18.0, 42.0, 0.0, -6.0], [0.0, 0.0, -6.0, 0.0, 0.0], [-24.0, -6.0, 12.0, 18.0, -18.0], [-42.0, 12.0, 12.0, 0.0, -42.0]]))
17578        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17579        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17580        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17581     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17582     def test_generalTensorProduct_Symbol_rank1_taggedData_rank3_offset1(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank3_offset1(self):
17583        arg0=Symbol(shape=(3,))        arg0=Symbol(shape=(3,))
17584        arg1=Data(numarray.array([[[-0.46969319757533445, 0.31741733885211709, 0.89160593117172393, -0.73296587057481388, -0.68123650605634767], [-0.40087112758962018, -0.785669163134739, -0.098530479474193911, 0.61389289600537955, -0.88969078415468705], [0.28884729417843369, 0.38068005484844503, 0.81683833385617288, 0.16671895078033439, -0.25793638946192599], [0.83517021532658742, -0.75150118475354399, 0.81650415661993447, -0.83295081227032575, 0.60624083565135178]], [[0.17761092478171636, -0.72983225192512236, -0.24131387922551739, -0.24564107075664476, 0.23034554942942997], [-0.8777815205858448, -0.75307763715135967, 0.38055491373991956, 0.75929330953955776, 0.99468974085861328], [-0.56418194068141281, -0.71932111214903283, 0.088703198989380949, -0.99974975808785671, -0.27396665144620114], [0.93209099404596274, -0.9987875168592284, -0.83551964385737554, -0.36511084117990311, 0.29829241174313315]], [[-0.96015043699245028, -0.23994553624337489, -0.15171900856196108, 0.18849909781007135, 0.51386047279648528], [-0.95368762778309013, -0.14276396574660222, 0.57643259567835381, -0.041226815520055693, 0.96843930154676561], [0.64094544073717663, 0.040454660622616156, 0.53717915175424968, 0.93223198969685916, 0.13089946216661463], [-0.026294728813930579, 0.070012595024297353, -0.2335859123348496, -0.62987472346802553, -0.73986293550244309]]]),self.functionspace)        arg1=Data(numarray.array([[[-1.0, 4.0, -4.0, 0.0, 3.0], [7.0, -7.0, 2.0, -7.0, -3.0], [-7.0, -6.0, -6.0, 0.0, -7.0], [4.0, 6.0, 4.0, 0.0, 0.0]], [[0.0, -5.0, 3.0, -6.0, -7.0], [-3.0, 7.0, 4.0, -2.0, 7.0], [-2.0, -6.0, -2.0, -7.0, -5.0], [5.0, -6.0, 6.0, 0.0, 0.0]], [[0.0, 5.0, -7.0, -4.0, -3.0], [-5.0, 1.0, -7.0, 5.0, -4.0], [-5.0, 1.0, 0.0, -5.0, 3.0], [7.0, 2.0, -2.0, 5.0, 0.0]]]),self.functionspace)
17585        arg1.setTaggedValue(1,numarray.array([[[0.52397275570150859, -0.19452026281363266, 0.750779482504776, 0.34121465788292715, -0.56383141418793548], [0.21390723793137245, 0.82890325495706763, -0.41833947444046449, 0.65296352492447585, -0.57679961245000588], [0.65584950662155128, 0.69274815905694265, 0.90764618890502091, -0.23490028557772402, 0.064406219113518626], [-0.5538309997965436, 0.23720805103493992, -0.97051838622617526, -0.29952566307093598, 0.01319689239740951]], [[-0.89952948189768112, 0.98694148208147636, 0.90262801291098849, 0.0059895175507025389, 0.48579122787765239], [-0.60246545240467797, 0.075296722142718764, -0.90011787056343362, 0.023517562350129362, 0.81832781681840894], [0.4999377444357529, 0.71906643294314199, 0.3753375948771942, -0.49248646606323865, 0.92701607943236741], [-0.43784605394358223, -0.70113096439614142, 0.89232866632495922, -0.17951823344850237, 0.11029858632855571]], [[-0.75417724270741049, -0.25038914685886349, 0.84919964975308404, -0.84258665249792664, -0.56826073428102153], [0.69893431498583314, -0.64691255600587261, -0.67384222356321644, -0.21561639379588038, -0.00038413167707651574], [0.27131261135302154, -0.39264118719173879, -0.46859208057346513, 0.0087898863425512896, 0.42425692667826365], [0.6017244774840329, -0.21679156583281745, 0.03167184890280117, -0.093447699960699238, -0.56744098661025788]]]))        arg1.setTaggedValue(1,numarray.array([[[-4.0, 3.0, 4.0, 2.0, 4.0], [1.0, 0.0, -5.0, -4.0, 0.0], [0.0, 1.0, 3.0, -4.0, 6.0], [-4.0, 2.0, -1.0, 0.0, -4.0]], [[4.0, 3.0, -4.0, 0.0, -6.0], [0.0, 0.0, 2.0, -7.0, 3.0], [6.0, 1.0, -7.0, 0.0, 7.0], [-7.0, 4.0, 0.0, -2.0, -6.0]], [[-5.0, -6.0, 3.0, 7.0, 5.0], [-3.0, -2.0, 6.0, -3.0, -4.0], [-4.0, 0.0, 0.0, 1.0, 6.0], [-2.0, 5.0, -7.0, -6.0, -3.0]]]))
17586        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17587        s0=numarray.array([0.26546413279143044, -0.37027387618261609, -0.16758675846063209])        s0=numarray.array([-6.0, 2.0, 2.0])
17588        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17589        ref=Data(numarray.array([[-0.029542883573551254, 0.39471243010086887, 0.35146771758945344, -0.13521163055389118, -0.35225100869177256], [0.37842807794626809, 0.094203342966405035, -0.2636683214787453, -0.11127086324319053, -0.76678622172705346], [0.17816646174330203, 0.3606230516083801, 0.093972689853203201, 0.25820938254202014, 0.011032817483150673], [-0.1190145600088736, 0.15859513119640545, 0.56526957088576535, 0.01963110450501207, 0.17447654123296955]]),self.functionspace)        ref=Data(numarray.array([[6.0, -24.0, 16.0, -20.0, -38.0], [-58.0, 58.0, -18.0, 48.0, 24.0], [28.0, 26.0, 32.0, -24.0, 38.0], [0.0, -44.0, -16.0, 10.0, 0.0]]),self.functionspace)
17590        ref.setTaggedValue(1,numarray.array([[0.5985583606115441, -0.37511489553810623, -0.27722916543885834, 0.22956885718497602, -0.23431984395112204], [0.16272978151787731, 0.30057765284204835, 0.3351630411208682, 0.20076490942598552, -0.45606064625230075], [-0.056477767031384851, -0.016550262272155419, 0.18049963011050946, 0.11852420359397838, -0.3972521390081698], [-0.085740365177014013, 0.35891210523727735, -0.5933515983587524, 0.0026181888705438632, 0.057758212062198958]]))        ref.setTaggedValue(1,numarray.array([[22.0, -24.0, -26.0, 2.0, -26.0], [-12.0, -4.0, 46.0, 4.0, -2.0], [4.0, -4.0, -32.0, 26.0, -10.0], [6.0, 6.0, -8.0, -16.0, 6.0]]))
17591        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17592        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17593        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17594     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17595     def test_generalTensorProduct_Symbol_rank2_taggedData_rank4_offset2(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank4_offset2(self):
17596        arg0=Symbol(shape=(2, 3))        arg0=Symbol(shape=(2, 3))
17597        arg1=Data(numarray.array([[[[0.65206519402992469, -0.084496441996423144, 0.1265613032025743, -0.82643907452689769, -0.25157847987724025], [0.78585186169490062, -0.57362518202386825, -0.13572412135205836, 0.52670045722978798, -0.90374131312767081], [-0.7870380409680291, -0.9030447273069766, -0.47252916627647035, -0.32051925002090265, 0.0012403388742363575], [-0.31140499409550659, -0.29723168867551619, 0.68712584451280856, 0.90430205234318484, -0.92200358530334858]], [[-0.49389963631288847, 0.1422761172629381, -0.70918224407775998, -0.7150134559394683, 0.76843800986365118], [0.7646658725966724, -0.10427300712857979, -0.37145318399321448, -0.5241160785963479, 0.99705113285563018], [-0.42544130322230789, 0.81563521758816226, 0.60971212619617332, 0.3095741798143663, -0.63028912537404502], [-0.30682669045306232, -0.65156161433635607, -0.31303855358837351, -0.63650047468578386, -0.5474917376758206]], [[0.77932335635551331, -0.7242040345373757, -0.57444565021579397, -0.45015378470060052, 0.64486273072563738], [-0.97023539368526257, 0.69561036202187099, -0.094524717512552092, 0.00031769334701170493, 0.69782809474330487], [-0.71610930023436503, -0.2749361962735779, 0.032323525998753544, 0.73386963331248301, 0.74311443804909971], [-0.29630874540012453, 0.78348025580615643, -0.39496044899816884, -0.11008081498596622, -0.13331207304660397]]], [[[-0.64521910105640057, 0.43403776783968584, -0.8199504454244535, 0.57969375595057859, 0.41008067869949327], [0.86604691212566332, 0.84468575301976423, -0.44534740478769241, 0.45318746902110618, -0.51933456340806394], [-0.13423995759008855, 0.46263642048193421, -0.23612645344781469, 0.84608860365803373, 0.077331957567117637], [0.68255739326807841, -0.1565272122774104, 0.1089760576278882, 0.2468473938342941, -0.84158183722444191]], [[0.32399882204442187, -0.49428383616166016, 0.16209968446167866, -0.93559632821071093, -0.2850658783088682], [-0.089379404662826456, 0.53581715314306821, -0.47166418398061039, 0.72678215882685815, 0.085883841674558647], [-0.84577392535695828, 0.31731197965785451, 0.86850228299858778, -0.23002591369425529, 0.30514861237095636], [-0.88004243378404334, -0.40543754791133235, -0.9420018919286719, 0.12173171685507822, 0.65382403270217582]], [[0.62448241434559226, -0.20800521049327125, 0.067823535063860296, 0.50825165565253516, 0.92081759475023861], [0.3556940492192493, 0.85742521810918837, 0.57402744341358747, 0.91821623051129464, 0.71924074598813559], [0.2575053376401506, 0.024331353668862743, -0.59681521278592164, -0.31812748832888582, -0.96740840516471915], [-0.89470588678054708, -0.67741295523314982, -0.40438755274067217, -0.15337443255935712, 0.46667263137137027]]]]),self.functionspace)        arg1=Data(numarray.array([[[[6.0, 0.0, 3.0, -3.0, -7.0], [7.0, 5.0, 0.0, -7.0, 4.0], [-6.0, 5.0, 5.0, 6.0, 0.0], [-3.0, -3.0, 0.0, 2.0, 6.0]], [[0.0, -2.0, -4.0, 4.0, 1.0], [5.0, 4.0, 4.0, 5.0, 7.0], [-6.0, 0.0, -4.0, 4.0, -2.0], [3.0, 2.0, -5.0, 4.0, -2.0]], [[3.0, 6.0, -6.0, -5.0, 0.0], [3.0, -6.0, -6.0, 5.0, 1.0], [0.0, 2.0, 6.0, -4.0, -6.0], [5.0, -4.0, 3.0, 0.0, -1.0]]], [[[0.0, -5.0, -7.0, -2.0, 5.0], [0.0, -6.0, -6.0, -6.0, 1.0], [3.0, 0.0, -3.0, -2.0, -5.0], [7.0, 7.0, 0.0, 1.0, -2.0]], [[-4.0, 0.0, 3.0, -6.0, 4.0], [0.0, -2.0, 2.0, 5.0, -2.0], [-4.0, 3.0, 4.0, -6.0, -3.0], [-3.0, 7.0, 0.0, 4.0, 0.0]], [[0.0, 0.0, 7.0, 6.0, 2.0], [2.0, 0.0, -3.0, 0.0, -3.0], [4.0, 4.0, 2.0, 3.0, -6.0], [6.0, 4.0, -3.0, 0.0, 7.0]]]]),self.functionspace)
17598        arg1.setTaggedValue(1,numarray.array([[[[0.5555201769204432, 0.2137586583858424, -0.074674558163822402, -0.90217021309394196, -0.092735040035575977], [0.088816651131417901, 0.95537035153650951, 0.36547901464690891, -0.10409150538975886, 0.67832851309630104], [0.78376193218939738, 0.73172977519974181, -0.92075716316977796, -0.22557053824067985, 0.032868622167917527], [-0.85935510892535527, -0.64834503094857121, 0.11909293346484517, 0.11132593426528326, -0.19796899985352012]], [[-0.92508230679029446, -0.63323157898543303, -0.40138959741621227, 0.089098911652681467, -0.89574583957038878], [-0.030375770612454778, 0.73455399354541906, 0.38078806485591254, -0.61547028421327221, 0.053136658674380888], [-0.69539110686167827, 0.16306554375091209, 0.43537061649521425, -0.15072994650208416, 0.58357039754604401], [-0.73855576137305889, -0.95673383605013673, -0.85442392267229672, -0.53301351259829977, 0.54170562225600927]], [[0.14184612247223094, 0.71130466015714777, 0.20222916639765476, 0.91130520315606955, -0.80046968406361518], [0.59313937149107643, 0.029552405001408877, -0.24448563132027323, 0.68882175304121374, 0.030973118196141902], [-0.1620226004693488, 0.47770458471962463, -0.36817477483769401, -0.80008491667028037, 0.34999862033091333], [0.9569250464153034, -0.47124438702930749, -0.13772907068493034, 0.97703359922633859, -0.92370358485600157]]], [[[0.43547016541417305, 0.37098072863055065, -0.14661001231210236, -0.67845888980854707, 0.99596986428514467], [0.55943239401005229, -0.082956422825952281, -0.36240528227607371, -0.63481108186174384, -0.66735489443001628], [-0.28682192125624151, -0.43744084953124696, -0.23672560233565831, 0.0063826170018141948, 0.39365476631870333], [0.7204188286906783, 0.9915093763736702, -0.56172521043278767, -0.95450696043400995, -0.92594883605422762]], [[-0.31712213365546305, 0.62801436625720219, -0.09648806135059429, 0.27930320147078991, -0.43898236986193573], [0.32932831427924114, -0.91682084122371266, -0.71528166755263833, -0.084035728288651246, 0.41954657017123376], [-0.1931553176037788, 0.062693110307928901, -0.60716673331098603, -0.61796689778932934, -0.98476103953648542], [-0.74840071470011882, 0.74346740075672191, -0.95978376966767764, 0.24047831105555351, 0.25779721684021206]], [[0.39705799887473248, -0.06715627229080634, 0.53527103266814824, -0.48636466118823973, 0.63727113177539119], [-0.33349746831295302, 0.67782443017311, 0.36122168404487809, 0.60173350373944934, -0.27683729057472339], [-0.96690462154553414, 0.034469853285622687, 0.42746215180997305, -0.70042482612232004, 0.8165905769042705], [0.28502574957139482, 0.79910876802051267, 0.14739330996653055, 0.96924795436903977, 0.029998734076815525]]]]))        arg1.setTaggedValue(1,numarray.array([[[[-2.0, -5.0, -2.0, 2.0, -5.0], [2.0, 6.0, -2.0, 1.0, -7.0], [1.0, 3.0, -7.0, -2.0, -3.0], [-2.0, 6.0, 2.0, 4.0, -4.0]], [[4.0, 7.0, 5.0, -6.0, 3.0], [-5.0, -1.0, -2.0, 7.0, 0.0], [-7.0, 5.0, -1.0, -2.0, -4.0], [2.0, 0.0, -3.0, 7.0, 7.0]], [[-6.0, -6.0, -3.0, 0.0, -1.0], [3.0, -1.0, -3.0, 0.0, 2.0], [-1.0, 6.0, -7.0, 4.0, 4.0], [0.0, -3.0, 0.0, -2.0, -7.0]]], [[[5.0, 1.0, 7.0, 0.0, 6.0], [3.0, 5.0, 2.0, 0.0, -4.0], [3.0, 5.0, -3.0, 2.0, 4.0], [5.0, 7.0, 1.0, 7.0, 6.0]], [[4.0, 0.0, -7.0, 0.0, 7.0], [-3.0, 2.0, -3.0, 6.0, -5.0], [-7.0, -1.0, 3.0, -1.0, 1.0], [-5.0, -4.0, 6.0, 0.0, 1.0]], [[6.0, 0.0, -7.0, -4.0, -1.0], [3.0, -2.0, 1.0, -6.0, 0.0], [0.0, -5.0, -6.0, -5.0, 0.0], [0.0, -6.0, -2.0, 0.0, -2.0]]]]))
17599        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17600        s0=numarray.array([[-0.43891274835281902, 0.18003313903237661, 0.72241188305328707], [-0.32305174453889274, 0.19260742829293265, 0.26837850990104428]])        s0=numarray.array([[5.0, 3.0, 3.0], [-1.0, -3.0, -1.0]])
17601        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17602        ref=Data(numarray.array([[0.62631582097442584, -0.75171614379214069, -0.28390163439753036, -0.32225797450188132, 0.77436637831031296], [-1.109697244996342, 0.79595566006604246, 0.13149224568299839, -0.085294158857436603, 1.4576276989932211], [-0.29890536111440902, 0.26277319049212178, 0.42390703873539148, 0.3235560595990542, 0.19697740966330379], [-0.7627402084384145, 0.36982456764843696, -0.96844012422056747, -0.68848501638547999, 0.7328569973667729]]),self.functionspace)        ref=Data(numarray.array([[51.0, 17.0, -24.0, -4.0, -51.0], [57.0, 31.0, -3.0, -14.0, 52.0], [-43.0, 18.0, 20.0, 47.0, -4.0], [5.0, -53.0, -3.0, 9.0, 16.0]]),self.functionspace)
17603        ref.setTaggedValue(1,numarray.array([[-0.40309667590093712, 0.28912182998667746, 0.27903848429081479, 1.2127958485701626, -0.93410134651558441], [0.17724143972969358, -0.23360493366956603, -0.19222701997851954, 0.78287832419409176, -0.043684554597730602], [-0.79028484793508991, 0.21593329979852446, 0.2907908145046274, -0.81518735342555071, 0.24579092752090026], [0.63512611487598591, -0.19075731059479234, -0.26943112241718359, 1.1757965841459233, -0.1260443033500947]]))        ref.setTaggedValue(1,numarray.array([[-39.0, -23.0, 17.0, -4.0, -45.0], [7.0, 15.0, -19.0, 14.0, -10.0], [-1.0, 51.0, -59.0, 2.0, -22.0], [6.0, 32.0, -16.0, 28.0, -27.0]]))
17604        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17605        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17606        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17607     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17608     def test_generalTensorProduct_Symbol_rank0_taggedData_rank3_offset0(self):     def test_generalTensorProduct_Symbol_rank0_taggedData_rank3_offset0(self):
17609        arg0=Symbol(shape=())        arg0=Symbol(shape=())
17610        arg1=Data(numarray.array([[[0.21417192563810494, -0.48597810108817985], [0.72280139021776324, -0.91479987450310629]], [[-0.80183266849887147, 0.71571618379819046], [-0.40326029235487471, -0.00907546705161133]], [[0.073736673252838614, -0.06278229370323607], [0.87945152927928993, -0.9056699897623286]], [[0.18037238754633123, -0.66136611056107619], [-0.13119247994422811, 0.38008748576918006]], [[0.73471764522594918, 0.34531166342792297], [0.66429153247276607, 0.058504913266755221]], [[-0.42756928737326905, -0.44310186437079713], [0.5582879988821825, 0.52268289820653835]]]),self.functionspace)        arg1=Data(numarray.array([[[2.0, -2.0], [-3.0, 7.0]], [[-3.0, -3.0], [3.0, -4.0]], [[3.0, 0.0], [3.0, -1.0]], [[6.0, 7.0], [6.0, 7.0]], [[4.0, -7.0], [-1.0, -7.0]], [[3.0, -4.0], [3.0, 5.0]]]),self.functionspace)
17611        arg1.setTaggedValue(1,numarray.array([[[-0.67966421272013933, -0.5494549558100561], [0.36392105539243902, -0.98341641061496476]], [[0.87163349279672309, 0.51529910406370427], [0.45158194725139422, -0.43170764903577497]], [[0.57256079785977931, -0.4811147538578624], [-0.22394340849531025, -0.43062058731879382]], [[0.22453334616903642, 0.9636493841567082], [0.92559807691233287, -0.6971407902308826]], [[-0.01154201672925792, -0.3261767534917468], [-0.46599299361341529, -0.11365072288173939]], [[0.15572712373352848, 0.37661181183071069], [0.40410121030067025, -0.97124125351070822]]]))        arg1.setTaggedValue(1,numarray.array([[[5.0, -2.0], [-6.0, -7.0]], [[-6.0, -7.0], [4.0, 4.0]], [[5.0, 7.0], [-1.0, 6.0]], [[-1.0, -3.0], [-4.0, 6.0]], [[0.0, -4.0], [-1.0, -5.0]], [[-7.0, -5.0], [7.0, 0.0]]]))
17612        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17613        s0=numarray.array(-0.225987122939)        s0=numarray.array(-6.0)
17614        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17615        ref=Data(numarray.array([[[-0.048400097289301169, 0.1098247928763679], [-0.16334380663175804, 0.20673299170408774]], [[0.18120385783271209, -0.16174264121756854], [0.09113163326489418, 0.0020509386883230448]], [[-0.016663538643516017, 0.014187989925517452], [-0.19874472086629627, 0.20466975531875298]], [[-0.040761836919267713, 0.14946022453517888], [0.029647811093853307, -0.085894877374166775]], [[-0.16603672681726769, -0.078035989335421718], [-0.15012133221638493, -0.013221357026960775]], [[0.096625153110644194, 0.10013531549814698], [-0.12616589863886132, -0.11811960437521235]]]),self.functionspace)        ref=Data(numarray.array([[[-12.0, 12.0], [18.0, -42.0]], [[18.0, 18.0], [-18.0, 24.0]], [[-18.0, -0.0], [-18.0, 6.0]], [[-36.0, -42.0], [-36.0, -42.0]], [[-24.0, 42.0], [6.0, 42.0]], [[-18.0, 24.0], [-18.0, -30.0]]]),self.functionspace)
17616        ref.setTaggedValue(1,numarray.array([[[0.15359535999735291, 0.12416974464819355], [-0.08224147228513036, 0.22223944528605957]], [[-0.19697794529456739, -0.11645096198049805], [-0.10205170503061899, 0.097560369556435739]], [[-0.12939136741609783, 0.10872573902793418], [0.050608326587050598, 0.097314707606557832]], [[-0.050741644904649413, -0.21777235184769533], [-0.20917324639946386, 0.15754484146782952]], [[0.0026083471535609803, 0.073711746091244784], [0.10530841593651538, 0.025683599884003289]], [[-0.035192324656135129, -0.085109419820537352], [-0.09132166989209245, 0.21948801656073602]]]))        ref.setTaggedValue(1,numarray.array([[[-30.0, 12.0], [36.0, 42.0]], [[36.0, 42.0], [-24.0, -24.0]], [[-30.0, -42.0], [6.0, -36.0]], [[6.0, 18.0], [24.0, -36.0]], [[-0.0, 24.0], [6.0, 30.0]], [[42.0, 30.0], [-42.0, -0.0]]]))
17617        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17618        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
17619        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17620     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17621     def test_generalTensorProduct_Symbol_rank1_taggedData_rank4_offset1(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank4_offset1(self):
17622        arg0=Symbol(shape=(3,))        arg0=Symbol(shape=(3,))
17623        arg1=Data(numarray.array([[[[-0.52720010860745536, -0.43582412739616982], [0.55603792789365669, -0.13018372552516499]], [[0.30212091134987307, 0.57810929262132182], [-0.89131866944614258, -0.90520915179819039]], [[0.55463359346312879, 0.060934115849946124], [-0.65176368868408296, -0.004133900756547515]], [[0.57037626582711964, 0.47420884642764416], [0.49542054574174066, 0.63954429342544028]], [[-0.52052905739577637, -0.070045473711700001], [-0.68824095024287568, 0.62381192807304209]], [[-0.95909587074617697, 0.057851504558286582], [-0.10115725221495508, -0.43702150878017787]]], [[[-0.40227402449963923, 0.74786820883631644], [-0.72869176270591351, 0.0006267164799997893]], [[-0.19228402267274936, 0.34352178018874446], [0.13450232523559791, -0.88582881402028013]], [[0.11266257586021, -0.022385185652000983], [0.63974491071253281, 0.30009785135666189]], [[-0.03873825730749525, 0.73996354997196323], [0.97307767897398079, 0.70021560435554453]], [[-0.38030486374970129, -0.60496968355677971], [0.47021961606538265, 0.86367706719230308]], [[-0.2932506491264486, 0.17599307943727704], [-0.47054282914449952, 0.48558775492097772]]], [[[0.29994496052748731, 0.72722523440744435], [-0.56839464223024883, 0.14168746190617809]], [[-0.26995286119658712, -0.14048506023338492], [-0.80651706885193919, -0.94270854011254879]], [[-0.50365113088964164, -0.72683091361471464], [0.60581607091017275, 0.74728325942009177]], [[0.69493327361610202, 0.33137199979913623], [-0.036916665708520924, -0.42245292599936768]], [[-0.96024284812193517, 0.20795206175424008], [0.67887305036044387, -0.042704376359294915]], [[0.73601900251191377, -0.55815380624156563], [-0.44566284067718254, -0.35692839692754874]]]]),self.functionspace)        arg1=Data(numarray.array([[[[2.0, 6.0], [4.0, 0.0]], [[-3.0, 2.0], [6.0, 6.0]], [[0.0, 6.0], [7.0, 7.0]], [[4.0, -7.0], [4.0, -2.0]], [[-5.0, 3.0], [2.0, -7.0]], [[-5.0, 1.0], [5.0, 7.0]]], [[[5.0, 3.0], [5.0, 5.0]], [[3.0, -7.0], [-5.0, 4.0]], [[-2.0, 5.0], [-3.0, 4.0]], [[1.0, -3.0], [-2.0, 5.0]], [[-2.0, -4.0], [-7.0, -7.0]], [[0.0, -4.0], [5.0, 1.0]]], [[[0.0, 0.0], [-7.0, -3.0]], [[-2.0, -1.0], [-1.0, 3.0]], [[3.0, 2.0], [-2.0, 5.0]], [[-6.0, 5.0], [7.0, 3.0]], [[1.0, 0.0], [-7.0, 0.0]], [[-3.0, 6.0], [2.0, 2.0]]]]),self.functionspace)
17624        arg1.setTaggedValue(1,numarray.array([[[[-0.19775388904889946, 0.46642448288048932], [-0.7253900790210599, 0.24177601480065514]], [[0.81364883295460455, -0.48538370580475032], [-0.027115535996981466, 0.21022282689211269]], [[0.95134604608249029, -0.8749470190530162], [-0.43210870255718881, 0.075333254430226981]], [[-0.1169113804017361, 0.43003885977005285], [-0.091183202753062353, 0.57730929892895277]], [[-0.30924098523996468, -0.81739915277948838], [-0.1102058120784517, 0.85905074495882605]], [[0.71812044375996953, 0.32821978550659647], [0.41972981457384106, -0.12992679767431747]]], [[[0.87806757327605522, -0.40912891945383256], [0.85102528877749317, 0.99503432133000547]], [[0.93267849734130626, 0.18395636083785694], [-0.89664644340459443, -0.85204946245960844]], [[-0.48972878527703689, -0.83039291662715686], [-0.71119947999399913, 0.23396242554689262]], [[0.04085526525206018, -0.36422308003909087], [-0.55729141586280595, -0.35272810493440576]], [[0.14295653160616673, 0.62240417485974531], [0.096336399538830886, 0.87054226796753431]], [[-0.062004736897307788, 0.45597068558472054], [-0.51120181356639072, -0.62977734494831572]]], [[[0.099672906477919598, 0.30544508944065596], [0.91827340792157064, 0.93026667538507701]], [[-0.39849518474515744, -0.71221820698867866], [0.89941963036301176, -0.54654339892239068]], [[-0.47509745553746185, -0.6499550117282582], [-0.27097458309822575, 0.93280164920136976]], [[0.68324322390143566, -0.21780101590731449], [-0.29413465350200196, 0.89236105698159696]], [[0.19825445666237163, -0.12876579902034657], [0.11362320627639888, -0.1100515242962381]], [[0.18722105562871549, -0.58594261555280447], [-0.76711133566699563, -0.84802558040919207]]]]))        arg1.setTaggedValue(1,numarray.array([[[[-4.0, -4.0], [2.0, -2.0]], [[-1.0, 5.0], [-4.0, 1.0]], [[5.0, 3.0], [3.0, -6.0]], [[3.0, -1.0], [-1.0, -3.0]], [[-7.0, -7.0], [1.0, -1.0]], [[7.0, 6.0], [-6.0, -2.0]]], [[[-4.0, -1.0], [2.0, -5.0]], [[-7.0, 4.0], [0.0, 2.0]], [[0.0, 2.0], [-2.0, 4.0]], [[-6.0, 1.0], [-1.0, -2.0]], [[-7.0, -2.0], [-4.0, -3.0]], [[7.0, 4.0], [0.0, 2.0]]], [[[-6.0, -7.0], [-7.0, 5.0]], [[4.0, 1.0], [2.0, -4.0]], [[5.0, -5.0], [-5.0, -7.0]], [[3.0, 2.0], [-4.0, 0.0]], [[-4.0, 1.0], [0.0, -5.0]], [[-6.0, -7.0], [7.0, -7.0]]]]))
17625        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17626        s0=numarray.array([0.95777129851918019, -0.6045100367976044, -0.84364551499680251])        s0=numarray.array([7.0, -6.0, 0.0])
17627        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17628        ref=Data(numarray.array([[[-0.51480566794232563, -1.4830339862659572], [1.4525822431778463, -0.24459908401311559]], [[0.63334487980391629, 0.46455371488720248], [-0.25457293710204865, 0.46382089602571441]], [[0.88800949683268526, 0.68508065709601573], [-1.5220667850908702, -0.81581366490399809]], [[-0.016569657392079717, -0.2726922716362129], [-0.082591064661710775, 0.54565032393603119]], [[0.54145488808654862, 0.12318487712279522], [-1.5161581102076203, 0.11139506029885943]], [[-1.3622606672561952, 0.41990288302941753], [0.56354380689048011, -0.41098828829802364]]]),self.functionspace)        ref=Data(numarray.array([[[-16.0, 24.0], [-2.0, -30.0]], [[-39.0, 56.0], [72.0, 18.0]], [[12.0, 12.0], [67.0, 25.0]], [[22.0, -31.0], [40.0, -44.0]], [[-23.0, 45.0], [56.0, -7.0]], [[-35.0, 31.0], [5.0, 43.0]]]),self.functionspace)
17629        ref.setTaggedValue(1,numarray.array([[[-0.80429226065026627, 0.43636314099917728], [-1.983908368685368, -1.1547574149952715]], [[0.55166466188749397, 0.024769647377149262], [-0.24273004488075678, 1.1775067290476517]], [[1.6080317414567549, 0.21231334060709861], [0.24467240238091914, -0.85623453328965093]], [[-0.71308686401634169, 0.81580223488459191], [0.49770098103837818, 0.013321553095497096]], [[-0.54985728136167111, -1.0504983297850405], [-0.25964599254354725, 0.38936708394124264]], [[0.56732943180244055, 0.53304849389951059], [1.3582018345002909, 0.97169954576280926]]]))        ref.setTaggedValue(1,numarray.array([[[-4.0, -22.0], [2.0, 16.0]], [[35.0, 11.0], [-28.0, -5.0]], [[35.0, 9.0], [33.0, -66.0]], [[57.0, -13.0], [-1.0, -9.0]], [[-7.0, -37.0], [31.0, 11.0]], [[7.0, 18.0], [-42.0, -26.0]]]))
17630        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17631        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
17632        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17633     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17634     def test_generalTensorProduct_Symbol_rank0_taggedData_rank4_offset0(self):     def test_generalTensorProduct_Symbol_rank0_taggedData_rank4_offset0(self):
17635        arg0=Symbol(shape=())        arg0=Symbol(shape=())
17636        arg1=Data(numarray.array([[[[-0.94388637562013988, -0.87340524767109917, 0.31932331878035725, -0.93660547221612167], [-0.28298509395638782, -0.61059996871422606, -0.74198306696054317, -0.28271834302624077], [-0.54700932120894374, -0.84297532191002955, -0.40502641654066629, 0.023785736053669959]], [[-0.84105667414994856, 0.84872930515742095, -0.79866971162953315, 0.87056966561179627], [0.12350788416860836, 0.24616008035556258, -0.29425290735985632, 0.48122897806422205], [-0.79649977631284585, -0.57392842383024245, -0.50328573946407951, -0.9002932502642822]]], [[[0.15110951257186622, 0.80281415753278185, 0.41833516623396627, 0.73239706274731042], [0.30887491865797179, 0.60021735335437865, -0.19086252853848484, 0.22485091970316962], [0.50892397461551675, 0.24663504303752459, 0.76920321129387537, 0.13236805457657952]], [[0.72542249651132029, 0.19461964645025742, 0.41843216150713158, -0.27659965537199671], [0.26611899619532586, -0.92028487126210456, -0.09647002601906407, 0.060919222498406311], [-0.47583468968846421, 0.072001087900416705, 0.59645481122894783, -0.24710921356050863]]], [[[-0.74416365638424242, -0.77874792408186067, 0.41060304001323855, 0.5887659324185408], [-0.6146940472420841, 0.11956317752524015, 0.076800675342375779, 0.26669320345368774], [-0.27258722294330284, 0.00070962542748786994, 0.85009407388262703, -0.052445836811541247]], [[-0.94846471850847824, -0.012847166544237565, 0.13867172194895905, -0.50999171249124653], [0.17351169703453984, -0.047719015849063684, -0.75367947687132553, 0.23830489099343088], [-0.13000624971462749, 0.14720959984068216, -0.023049583913567373, 0.95169515900465584]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-4.0, -2.0, 1.0, 6.0], [3.0, -5.0, 6.0, 3.0], [7.0, -4.0, 2.0, -2.0]], [[-5.0, -2.0, -4.0, 6.0], [-7.0, 1.0, -7.0, 4.0], [-3.0, 5.0, 4.0, 0.0]]], [[[6.0, -3.0, 7.0, 3.0], [2.0, -3.0, 1.0, 5.0], [-5.0, 4.0, 0.0, -1.0]], [[5.0, 2.0, -3.0, 0.0], [-1.0, 3.0, -5.0, 4.0], [4.0, -6.0, -6.0, -3.0]]], [[[5.0, 4.0, -6.0, -2.0], [-7.0, -4.0, 2.0, -1.0], [-1.0, -1.0, -1.0, 0.0]], [[4.0, 1.0, -1.0, -2.0], [6.0, 1.0, 1.0, -3.0], [-6.0, 0.0, 6.0, 4.0]]]]),self.functionspace)
17637        arg1.setTaggedValue(1,numarray.array([[[[-0.38232379176539166, -0.047392979775825683, 0.71973214757751891, 0.58909318917226838], [-0.31488001512273023, -0.81418131935772542, -0.61712155580920069, -0.51894040765221972], [0.65007616830143777, -0.31244290346844505, -0.8534372608833658, -0.70624245191406754]], [[-0.72550781722850766, -0.70009477274141618, -0.69693580611189332, 0.90681359133506323], [-0.78356288325102441, 0.41830022132112066, -0.35639486650084296, -0.078223007794027799], [-0.017984408983787947, -0.089482877895976198, -0.64307128346017661, -0.73276722763994351]]], [[[0.99546982369172587, -0.25159938469968002, 0.5063085184917504, -0.46879884658015114], [-0.00010552860679213794, 0.81642299012183495, 0.41311420025220547, 0.70854408573626926], [0.23691182023228485, -0.62685048696403278, 0.37645931375363073, -0.65847370090902402]], [[-0.44724356112764974, -0.53271246711955356, -0.37538581801198445, -0.12380101797247622], [0.022127263403553865, 0.56379943467285587, 0.063902232694374339, -0.96732417034432006], [-0.35327573618934305, -0.13654085968330643, -0.3022300688214572, 0.52210806003351418]]], [[[-0.67850462804637823, -0.6031824595469728, 0.89831532714762963, -0.41740496329721521], [-0.95231422950473221, -0.16284788102220515, 0.015299389381570494, 0.099184180228980123], [0.19006093243843569, -0.8318706856506668, -0.62601164880979487, 0.30083766151275015]], [[-0.36613744209104415, 0.99523134946627212, 0.13596454712010186, -0.16438154096209412], [-0.066653406362238599, 0.38925662501114999, -0.1096159498880751, 0.17852867868671463], [0.72875814043845022, 0.97443944150322537, 0.11725849058665427, -0.38916729188624299]]]]))        arg1.setTaggedValue(1,numarray.array([[[[0.0, 7.0, -6.0, 5.0], [-2.0, -2.0, 0.0, -6.0], [0.0, 3.0, 5.0, 4.0]], [[3.0, -7.0, -2.0, 2.0], [0.0, 1.0, -6.0, 7.0], [1.0, -5.0, -3.0, 4.0]]], [[[-2.0, 3.0, 7.0, 5.0], [-3.0, -5.0, -2.0, -4.0], [7.0, 7.0, 7.0, 4.0]], [[-1.0, -5.0, -6.0, 2.0], [-3.0, 5.0, 1.0, 5.0], [4.0, -5.0, 1.0, -4.0]]], [[[7.0, -3.0, 4.0, -7.0], [3.0, -4.0, 7.0, -1.0], [-4.0, -5.0, 0.0, -2.0]], [[3.0, 0.0, -5.0, 3.0], [5.0, -1.0, -7.0, 5.0], [7.0, -2.0, 1.0, 7.0]]]]))
17638        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17639        s0=numarray.array(0.727835895248)        s0=numarray.array(6.0)
17640        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17641        ref=Data(numarray.array([[[[-0.68699438521193523, -0.63569569035305185, 0.23241497359808436, -0.68169508236465703], [-0.20596670920160515, -0.44441657486755881, -0.54004190980013145, -0.20577255829955329], [-0.39813301901114756, -0.61354769809441156, -0.29479276448199127, 0.017312112494757035]], [[-0.61215123738428734, 0.61773565364251903, -0.5813004845713946, 0.63363185194636973], [0.089893471444053297, 0.17916414245992635, -0.21416782825760677, 0.35025572406868416], [-0.57972112775754314, -0.41772570816679505, -0.36630942674842237, -0.65526574379189351]]], [[[0.10998292736324289, 0.58431696106569286, 0.30447935022964667, 0.53306487184174145], [0.22481025294109797, 0.43685973472210798, -0.13891659932811734, 0.1636545704395071], [0.37041313667748782, 0.17950983734876158, 0.55985370791976374, 0.096342221504989403]], [[0.52798853218140263, 0.14165116460698488, 0.30454994687112574, -0.20131915779298329], [0.19369095783834123, -0.66981636315830351, -0.070214347752189557, 0.044339196844943585], [-0.34632956735948822, 0.052404976270834368, 0.43412122150583649, -0.17985495567585794]]], [[[-0.54162902105549804, -0.56680069249669274, 0.29885163121961228, 0.42852497951341001], [-0.44739639217809823, 0.087022372352786412, 0.05589828829347402, 0.194108886492289], [-0.19839876544412252, 0.00051649085830642418, 0.61872898130943599, -0.038171962587762009]], [[-0.69032666750682159, -0.0093506289631261289, 0.10093025689031127, -0.37119027463015986], [0.12628804134714522, -0.034731612620859838, -0.54855497677873399, 0.17344685367819615], [-0.094623215148889314, 0.10714443088915221, -0.01677631454282669, 0.69267789805740265]]]]),self.functionspace)        ref=Data(numarray.array([[[[-24.0, -12.0, 6.0, 36.0], [18.0, -30.0, 36.0, 18.0], [42.0, -24.0, 12.0, -12.0]], [[-30.0, -12.0, -24.0, 36.0], [-42.0, 6.0, -42.0, 24.0], [-18.0, 30.0, 24.0, 0.0]]], [[[36.0, -18.0, 42.0, 18.0], [12.0, -18.0, 6.0, 30.0], [-30.0, 24.0, 0.0, -6.0]], [[30.0, 12.0, -18.0, 0.0], [-6.0, 18.0, -30.0, 24.0], [24.0, -36.0, -36.0, -18.0]]], [[[30.0, 24.0, -36.0, -12.0], [-42.0, -24.0, 12.0, -6.0], [-6.0, -6.0, -6.0, 0.0]], [[24.0, 6.0, -6.0, -12.0], [36.0, 6.0, 6.0, -18.0], [-36.0, 0.0, 36.0, 24.0]]]]),self.functionspace)
17642        ref.setTaggedValue(1,numarray.array([[[[-0.27826897925419836, -0.034494311863611495, 0.5238468919708954, 0.42876316872573528], [-0.22918097770257639, -0.59259038946898024, -0.4491632200492679, -0.37770345618394879], [0.47314876993510829, -0.22740716035986025, -0.62116227281310044, -0.51402860725106336]], [[-0.52805063166197996, -0.50955410567673876, -0.50725489637188126, 0.66001148207246807], [-0.5703051926141639, 0.30445391606772132, -0.2593969767214554, -0.056933512906762539], [-0.013089698413222632, -0.065128850542791064, -0.46805036330555938, -0.53333429113776043]]], [[[0.72453867031910013, -0.18312306340675374, 0.36850951382816433, -0.34120862819192427], [-7.680750799883668e-05, 0.59422195791642729, 0.30067934378025207, 0.51570381896457884], [0.17243292677361352, -0.45624428536615191, 0.27400060165034579, -0.47926079559842566]], [[-0.32551991770727534, -0.3877272554157653, -0.27321927291617965, -0.090106824748618933], [0.016105016568715359, 0.41035346627547065, 0.046510338741460072, -0.70405325351764925], [-0.25712676171878951, -0.099379338845539664, -0.21997389271154941, 0.38000898729072291]]], [[[-0.49384002338409061, -0.43901784544230033, 0.65382614034955278, -0.30380231514241407], [-0.69312847978904735, -0.11852653327304696, 0.01113544476728409, 0.072189806611405116], [0.13833316891301073, -0.60546534522117423, -0.45563374884719393, 0.21896044869146666]], [[-0.26648797294817145, 0.72436510021772338, 0.098959877875156976, -0.11964278602840213], [-0.048512741690992962, 0.28331494414623043, -0.079782423020254109, 0.12993958067939895], [0.53041633356533402, 0.70923200327152391, 0.085344938471574247, -0.28324992429128842]]]]))        ref.setTaggedValue(1,numarray.array([[[[0.0, 42.0, -36.0, 30.0], [-12.0, -12.0, 0.0, -36.0], [0.0, 18.0, 30.0, 24.0]], [[18.0, -42.0, -12.0, 12.0], [0.0, 6.0, -36.0, 42.0], [6.0, -30.0, -18.0, 24.0]]], [[[-12.0, 18.0, 42.0, 30.0], [-18.0, -30.0, -12.0, -24.0], [42.0, 42.0, 42.0, 24.0]], [[-6.0, -30.0, -36.0, 12.0], [-18.0, 30.0, 6.0, 30.0], [24.0, -30.0, 6.0, -24.0]]], [[[42.0, -18.0, 24.0, -42.0], [18.0, -24.0, 42.0, -6.0], [-24.0, -30.0, 0.0, -12.0]], [[18.0, 0.0, -30.0, 18.0], [30.0, -6.0, -42.0, 30.0], [42.0, -12.0, 6.0, 42.0]]]]))
17643        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17644        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
17645        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17646     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17647     def test_generalTensorProduct_Symbol_rank1_taggedData_rank0_offset0(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank0_offset0(self):
17648        arg0=Symbol(shape=(2,))        arg0=Symbol(shape=(2,))
17649        arg1=Data(0.363357642396,self.functionspace)        arg1=Data(-4.0,self.functionspace)
17650        arg1.setTaggedValue(1,-0.354225708992)        arg1.setTaggedValue(1,-2.0)
17651        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17652        s0=numarray.array([0.97101040830607976, 0.4645088154062762])        s0=numarray.array([-2.0, 2.0])
17653        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17654        ref=Data(numarray.array([0.35282405270406575, 0.16878282803817909]),self.functionspace)        ref=Data(numarray.array([8.0, -8.0]),self.functionspace)
17655        ref.setTaggedValue(1,numarray.array([-0.34395685032066908, -0.16454096447024405]))        ref.setTaggedValue(1,numarray.array([4.0, -4.0]))
17656        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17657        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17658        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17659     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17660     def test_generalTensorProduct_Symbol_rank2_taggedData_rank1_offset1(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank1_offset1(self):
17661        arg0=Symbol(shape=(2, 3))        arg0=Symbol(shape=(2, 3))
17662        arg1=Data(numarray.array([-0.55108445415083862, 0.71294288546312079, -0.82071588233446202]),self.functionspace)        arg1=Data(numarray.array([5.0, -6.0, 4.0]),self.functionspace)
17663        arg1.setTaggedValue(1,numarray.array([-0.040215664686230834, -0.47728968658172843, 0.036717397135321628]))        arg1.setTaggedValue(1,numarray.array([-3.0, -3.0, -3.0]))
17664        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17665        s0=numarray.array([[0.69200608286042531, -0.3796562551520406, 0.44140291267963838], [-0.87117794862889997, 0.5282176103735492, -0.21743086004379553]])        s0=numarray.array([[-4.0, -4.0, 2.0], [0.0, -4.0, 6.0]])
17666        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17667        ref=Data(numarray.array([-1.014293401419287, 1.0351305717281418]),self.functionspace)        ref=Data(numarray.array([12.0, 48.0]),self.functionspace)
17668        ref.setTaggedValue(1,numarray.array([0.16958369648270921, -0.22506131267574514]))        ref.setTaggedValue(1,numarray.array([18.0, -6.0]))
17669        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17670        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17671        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17672     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17673     def test_generalTensorProduct_Symbol_rank3_taggedData_rank2_offset2(self):     def test_generalTensorProduct_Symbol_rank3_taggedData_rank2_offset2(self):
17674        arg0=Symbol(shape=(2, 2, 3))        arg0=Symbol(shape=(2, 2, 3))
17675        arg1=Data(numarray.array([[0.15814298245943426, 0.98142395353051226, 0.67900156424941005], [-0.12516556697134518, 0.40383089237577452, 0.083359923338467645]]),self.functionspace)        arg1=Data(numarray.array([[-1.0, 3.0, 7.0], [0.0, 0.0, 6.0]]),self.functionspace)
17676        arg1.setTaggedValue(1,numarray.array([[0.71096660585325311, 0.23226806775857178, -0.72749271916024805], [0.85320437925522263, -0.78769082412249114, -0.79678572764970168]]))        arg1.setTaggedValue(1,numarray.array([[7.0, 2.0, 7.0], [7.0, 6.0, 7.0]]))
17677        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17678        s0=numarray.array([[[0.23793370998659125, 0.24191362835018526, -0.92426800442359625], [-0.90113808206765134, 0.2475162500826773, 0.074006471903230731]], [[-0.66018383669805569, 0.15777611279342496, 0.51500027725401987], [0.10680299716902342, -0.15148688030229951, 0.67348617215975137]]])        s0=numarray.array([[[3.0, 4.0, -4.0], [6.0, -7.0, 2.0]], [[3.0, 4.0, -7.0], [-3.0, 2.0, 5.0]]])
17679        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17680        ref=Data(numarray.array([-0.13361670378177018, 0.38172642525797124]),self.functionspace)        ref=Data(numarray.array([-7.0, -10.0]),self.functionspace)
17681        ref.setTaggedValue(1,numarray.array([-0.12503856051176798, -1.1335558200822786]))        ref.setTaggedValue(1,numarray.array([15.0, 6.0]))
17682        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17683        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17684        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17685     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17686     def test_generalTensorProduct_Symbol_rank4_taggedData_rank3_offset3(self):     def test_generalTensorProduct_Symbol_rank4_taggedData_rank3_offset3(self):
17687        arg0=Symbol(shape=(2, 2, 4, 3))        arg0=Symbol(shape=(2, 2, 4, 3))
17688        arg1=Data(numarray.array([[[-0.36510061199868704, -0.70329946518178255, -0.99928901922175317], [-0.23966160152903559, -0.94007906129141561, 0.29149473710434526], [0.60704835425197912, 0.0052234638279098355, -0.76500561586875793], [-0.77511588975672652, -0.98112756710815585, 0.21644714824974476]], [[0.17249876458884827, -0.23987052092438099, 0.03559468175775593], [-0.48868446684056743, -0.8670798136394946, 0.77290844323827557], [0.26944707598438478, -0.94555504940269386, -0.12078554454547774], [-0.16331974101896218, 0.2763217186261091, 0.41718874970512188]]]),self.functionspace)        arg1=Data(numarray.array([[[-2.0, 6.0, -6.0], [-5.0, -3.0, 5.0], [5.0, -2.0, -7.0], [-6.0, 5.0, 0.0]], [[2.0, 1.0, -6.0], [2.0, 3.0, 1.0], [0.0, 1.0, -5.0], [-6.0, -2.0, 2.0]]]),self.functionspace)
17689        arg1.setTaggedValue(1,numarray.array([[[-0.43768975440259239, 0.15673244145311993, -0.88043900860784552], [-0.59999346829644362, -0.99857397002992965, 0.18155238201136514], [0.73436315472611557, -0.97599224317962019, -0.25013889403080047], [-0.15998695057909185, 0.42489531424848992, -0.15719471980263311]], [[0.046315724148287218, 0.84868175903614862, -0.32880771958633059], [0.45266700945423088, 0.23718632651728488, -0.332759414330559], [0.024662226358104888, -0.5787957692527117, -0.99161958817620222], [-0.033645369224803545, 0.14649993451573295, -0.1029075913532258]]]))        arg1.setTaggedValue(1,numarray.array([[[5.0, 4.0, -4.0], [0.0, 0.0, 6.0], [-1.0, -4.0, 5.0], [7.0, -4.0, -4.0]], [[-3.0, 7.0, -5.0], [-5.0, 0.0, 0.0], [4.0, -4.0, 7.0], [-2.0, 0.0, -2.0]]]))
17690        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17691        s0=numarray.array([[[[-0.53780694826662079, 0.52779721661353629, 0.23555444164262918], [0.33563551557834814, -0.13516869655645958, -0.058084577574881058], [0.40748951616784246, -0.759855976748258, 0.25647000642062356], [0.82110371877144916, 0.27961418358470946, 0.55030771710621185]], [[-0.77581583222442174, 0.40121727083612302, 0.30702753859141696], [-0.77938106031552268, 0.37896029097115758, 0.91034872102889031], [-0.65782432741940422, 0.97756333152953623, 0.17333138754380251], [-0.7248631213906922, 0.10446516646810666, -0.038500351621914231]]], [[[-0.76599252603266321, 0.42210458508827542, 0.045569179264311144], [-0.34549493925414132, 0.93683966957377085, -0.07364438303272336], [-0.85840211353407581, -0.8538797503262312, 0.27226842629495285], [0.77356574298250158, -0.39198958068925127, 0.79087922589406423]], [[-0.62725106772394867, -0.76103897835583534, -0.07529815032601106], [-0.27171956440490797, 0.89256684966444899, -0.13058476891643234], [0.026709197950465002, 0.91775278702854668, 0.6476145997957734], [-0.29063594996582442, -0.44941149178840623, 0.074754920455710083]]]])        s0=numarray.array([[[[0.0, -3.0, 7.0], [-5.0, 2.0, -3.0], [0.0, 2.0, 6.0], [7.0, 0.0, 1.0]], [[7.0, 5.0, -7.0], [0.0, -5.0, -1.0], [1.0, -6.0, -4.0], [6.0, 0.0, 6.0]]], [[[1.0, -5.0, 2.0], [-6.0, 1.0, -3.0], [5.0, 1.0, -4.0], [-2.0, 2.0, 4.0]], [[5.0, -3.0, 6.0], [-3.0, -1.0, -2.0], [-2.0, 6.0, 4.0], [0.0, 2.0, 1.0]]]])
17692        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17693        ref=Data(numarray.array([-1.5795895585059447, -3.3145145180530711]),self.functionspace)        ref=Data(numarray.array([-109.0, -15.0]),self.functionspace)
17694        ref.setTaggedValue(1,numarray.array([-0.16106328480761281, -2.4145029137807197]))        ref.setTaggedValue(1,numarray.array([34.0, -165.0]))
17695        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17696        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")
17697        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17698     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17699     def test_generalTensorProduct_Symbol_rank1_taggedData_rank1_offset0(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank1_offset0(self):
17700        arg0=Symbol(shape=(2,))        arg0=Symbol(shape=(2,))
17701        arg1=Data(numarray.array([0.56615354028150966, 0.75174540511110455]),self.functionspace)        arg1=Data(numarray.array([-7.0, 5.0]),self.functionspace)
17702        arg1.setTaggedValue(1,numarray.array([-0.92404779635643308, -0.98655984258257834]))        arg1.setTaggedValue(1,numarray.array([-3.0, 3.0]))
17703        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17704        s0=numarray.array([-0.82965982076257383, 0.59652466496008416])        s0=numarray.array([5.0, 3.0])
17705        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17706        ref=Data(numarray.array([[-0.46971484475405395, -0.6236929580635675], [0.33772455093239306, 0.4484346759191844]]),self.functionspace)        ref=Data(numarray.array([[-35.0, 25.0], [-21.0, 15.0]]),self.functionspace)
17707        ref.setTaggedValue(1,numarray.array([[0.76664532910112959, 0.81850906216861496], [-0.5512173021286253, -0.58850727955964588]]))        ref.setTaggedValue(1,numarray.array([[-15.0, 15.0], [-9.0, 9.0]]))
17708        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17709        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17710        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17711     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17712     def test_generalTensorProduct_Symbol_rank2_taggedData_rank2_offset1(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank2_offset1(self):
17713        arg0=Symbol(shape=(2, 3))        arg0=Symbol(shape=(2, 3))
17714        arg1=Data(numarray.array([[-0.22252911117681085, -0.62190939907192311], [-0.62588365404022017, 0.35076925387805713], [0.57948410821676322, 0.13190553964243734]]),self.functionspace)        arg1=Data(numarray.array([[0.0, -1.0], [3.0, -5.0], [1.0, 4.0]]),self.functionspace)
17715        arg1.setTaggedValue(1,numarray.array([[-0.0806230555964218, -0.41818850437652699], [0.75183075825482315, -0.12091813894991121], [-0.59043340624533824, -0.99231929450506762]]))        arg1.setTaggedValue(1,numarray.array([[2.0, 7.0], [3.0, -1.0], [2.0, 1.0]]))
17716        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17717        s0=numarray.array([[0.62644409384395838, 0.26259804270315668, 0.35445935188059985], [-0.59366723673319832, 0.79891498579741183, 0.71236583072370507]])        s0=numarray.array([[-5.0, 0.0, 6.0], [4.0, 6.0, -3.0]])
17718        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17719        ref=Data(numarray.array([[-0.098354308492298981, -0.25072499835470796], [0.04488509008767716, 0.7434070472500327]]),self.functionspace)        ref=Data(numarray.array([[6.0, 29.0], [15.0, -46.0]]),self.functionspace)
17720        ref.setTaggedValue(1,numarray.array([[-0.062361193950662336, -0.64546143928454902], [0.2279075422591369, -0.55523285800827948]]))        ref.setTaggedValue(1,numarray.array([[2.0, -29.0], [20.0, 19.0]]))
17721        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17722        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17723        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17724     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17725     def test_generalTensorProduct_Symbol_rank3_taggedData_rank3_offset2(self):     def test_generalTensorProduct_Symbol_rank3_taggedData_rank3_offset2(self):
17726        arg0=Symbol(shape=(2, 2, 3))        arg0=Symbol(shape=(2, 2, 3))
17727        arg1=Data(numarray.array([[[-0.68511042797993826, 0.88461426286446287], [-0.36260706188793335, 0.66688054990059253], [-0.58242006898765464, 0.23873790834149422]], [[-0.31385279465390248, -0.36454605018889619], [0.64495094877017145, -0.63402630941336602], [-0.85542377281489346, 0.044327320735303877]]]),self.functionspace)        arg1=Data(numarray.array([[[4.0, -1.0], [7.0, -1.0], [-4.0, 1.0]], [[0.0, 0.0], [-5.0, 0.0], [-1.0, -1.0]]]),self.functionspace)
17728        arg1.setTaggedValue(1,numarray.array([[[-0.84290796235387133, 0.89984921252679162], [0.50034384639755491, 0.019545751777773956], [-0.37641007418666961, 0.51835187454003084]], [[-0.22616675265883979, 0.58844196329297649], [-0.82349371263519688, -0.066098611292759291], [0.55730405273437067, 0.91453787369920647]]]))        arg1.setTaggedValue(1,numarray.array([[[0.0, 4.0], [-7.0, 0.0], [-7.0, -2.0]], [[7.0, 1.0], [6.0, -1.0], [4.0, 7.0]]]))
17729        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17730        s0=numarray.array([[[-0.81885580916066769, 0.34618581026602491, 0.7000091135902371], [0.87869941106263494, 0.44600046950983163, 0.88760800005759632]], [[0.84860913355606016, 0.81331502284617563, -0.63644791303574699], [-0.46803389024928643, 0.63926242399450284, -0.16880169404990109]]])        s0=numarray.array([[[7.0, -3.0, -1.0], [-7.0, -4.0, 1.0]], [[-1.0, 2.0, -3.0], [-5.0, 0.0, 0.0]]])
17731        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17732        ref=Data(numarray.array([[-0.71963694593953575, -0.89014537967680707], [0.19795893321304497, 0.89895965307258285]]),self.functionspace)        ref=Data(numarray.array([[30.0, -6.0], [22.0, -4.0]]),self.functionspace)
17733        ref.setTaggedValue(1,numarray.array([[0.5285978998947447, 0.93210547106547637], [-0.58344557256899643, -0.022427536738860332]]))        ref.setTaggedValue(1,numarray.array([[-41.0, 34.0], [-28.0, -3.0]]))
17734        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17735        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17736        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17737     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17738     def test_generalTensorProduct_Symbol_rank4_taggedData_rank4_offset3(self):     def test_generalTensorProduct_Symbol_rank4_taggedData_rank4_offset3(self):
17739        arg0=Symbol(shape=(2, 2, 4, 3))        arg0=Symbol(shape=(2, 2, 4, 3))
17740        arg1=Data(numarray.array([[[[0.34932755635774959, -0.74424381395219852], [-0.54819955297529877, 0.63959217816188008], [-0.010273910321024982, 0.56247673691958355]], [[0.24073673367288562, 0.60191231882953367], [0.51632416596746467, -0.54846172027982121], [-0.83255202008750051, -0.49428556138934887]], [[0.85733282024950674, 0.97678795162853338], [0.32177177547802849, 0.44150861125260565], [-0.89510922530581594, -0.11022500618668296]], [[0.45158215644196642, -0.076728054320795103], [0.83360254719630578, 0.74581624954887737], [-0.69144973303714763, 0.54400223421006766]]], [[[-0.11958079621533146, -0.41206554888449887], [-0.48300873711771808, 0.69228409638818333], [0.48665261214791089, 0.59667696702594464]], [[0.90087159794983762, 0.40381245716119363], [-0.17900820678654727, -0.06792846734150082], [-0.37901740156232555, 0.34417332717469895]], [[0.58984616432424208, 0.0025128073736202516], [-0.057522073977472443, -0.44542225640177358], [-0.9717040071260048, -0.42151480864750024]], [[-0.47729057350045023, -0.5988290686489135], [-0.45221438509529799, 0.10663682085616077], [-0.63083796560409988, -0.33017190918157757]]]]),self.functionspace)        arg1=Data(numarray.array([[[[7.0, -5.0], [-4.0, 5.0], [0.0, 0.0]], [[4.0, -4.0], [2.0, 4.0], [7.0, -7.0]], [[7.0, 6.0], [-3.0, -3.0], [-5.0, -4.0]], [[4.0, -6.0], [6.0, -2.0], [1.0, 1.0]]], [[[4.0, -5.0], [4.0, 0.0], [0.0, 0.0]], [[0.0, -7.0], [3.0, 3.0], [7.0, -5.0]], [[4.0, 0.0], [7.0, 3.0], [-4.0, -4.0]], [[2.0, 6.0], [2.0, 5.0], [1.0, -1.0]]]]),self.functionspace)
17741        arg1.setTaggedValue(1,numarray.array([[[[-0.45815459525227897, 0.04060064355699966], [-0.5130880268380924, -0.90690884973826003], [0.71844818991326154, -0.0096396319053368984]], [[0.086788012504435574, -0.19917758264625562], [0.84632245345713586, -0.030065029762226025], [0.73607845867824007, 0.30411044790082586]], [[-0.73253659802084603, -0.15031960596651084], [-0.74245391214729195, 0.43025275600296298], [-0.13510673730238243, -0.0047682348791997509]], [[-0.32613739486356796, -0.54692619763357286], [-0.98144937685579481, -0.62849319586058106], [0.36562622305234904, 0.75356016560724037]]], [[[0.13054528604012217, -0.55809697479008413], [-0.249719623622086, 0.11198803939996549], [-0.68047360552236413, 0.82892725166976144]], [[0.81959327370496071, -0.97885845309807507], [0.90211428047374254, 0.43159208421499984], [-0.50782383836067968, -0.998151071663961]], [[-0.81033945755080894, 0.060298287371805204], [0.33664923513654532, 0.37499963037950379], [0.8363055645171138, -0.93789499130129839]], [[-0.32514294725877524, 0.63360023194222115], [-0.71724675255467418, -0.22083402911426142], [0.65280483731320582, -0.74647746534758697]]]]))        arg1.setTaggedValue(1,numarray.array([[[[-2.0, -2.0], [0.0, -5.0], [-4.0, -6.0]], [[-5.0, -4.0], [0.0, -5.0], [-6.0, -1.0]], [[7.0, -6.0], [4.0, 6.0], [-4.0, 5.0]], [[-2.0, 1.0], [-3.0, -4.0], [2.0, 6.0]]], [[[0.0, -6.0], [-7.0, -4.0], [-1.0, -3.0]], [[3.0, -1.0], [-4.0, 2.0], [1.0, 4.0]], [[-7.0, -4.0], [4.0, 4.0], [6.0, 0.0]], [[1.0, 0.0], [-4.0, -3.0], [-6.0, 5.0]]]]))
17742        res=generalTensorProduct(arg0,arg1,3)        res=generalTensorProduct(arg0,arg1,axis_offset=3)
17743        s0=numarray.array([[[[0.62493138805864845, 0.17352331207873917, -0.24927644147127981], [0.32185652576798329, 0.82568239660989229, -0.75343909420944244], [0.9662902160521103, 0.76903550182249703, -0.27446928115940628], [-0.30910412594164871, 0.15103130723873992, 0.61332089752936292]], [[-0.30936266204328744, -0.29369343709938645, 0.10145037474368723], [0.65561968627401246, -0.17325803571712428, 0.5039962673274454], [0.59880610068707685, -0.53875524346089243, -0.19192422287685118], [0.28188510996907379, -0.86050788005977163, 0.73225853462137525]]], [[[-0.25586242673816262, -0.92353650239934471, -0.85386183356723211], [0.69804864781019282, -0.52495634449993767, -0.27821219104784345], [-0.95811949825113141, 0.080275165184550801, -0.53138104040206269], [0.47231483693545795, 0.31641265912120797, -0.43508479310832682]], [[-0.47536332423886996, -0.44561854739579387, 0.041228711613561897], [-0.54594004675046515, -0.076824499185028428, 0.14349037219468186], [0.059475793819251832, 0.57725401036676449, 0.8866737242306586], [-0.41859531683489259, -0.76840411755167604, -0.59739879490718417]]]])        s0=numarray.array([[[[4.0, 3.0, 0.0], [-2.0, -6.0, 5.0], [-4.0, 7.0, -3.0], [-3.0, 7.0, 5.0]], [[-4.0, 7.0, -6.0], [0.0, 5.0, 0.0], [4.0, 1.0, 0.0], [-4.0, 0.0, 6.0]]], [[[-2.0, -4.0, 4.0], [0.0, 0.0, -3.0], [1.0, 4.0, 7.0], [7.0, -5.0, 2.0]], [[0.0, -5.0, 0.0], [1.0, -4.0, 5.0], [-3.0, 2.0, -7.0], [-1.0, -4.0, -3.0]]]])
17744        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17745        ref=Data(numarray.array([[3.1628065415254367, 1.6573284996617701], [0.83635727248193825, -1.4323625157000262]]),self.functionspace)        ref=Data(numarray.array([[80.0, -72.0], [-39.0, -86.0]]),self.functionspace)
17746        ref.setTaggedValue(1,numarray.array([[-1.1817373700859699, -0.88405330085228306], [0.095995353961629282, 0.37004400299691059]]))        ref.setTaggedValue(1,numarray.array([[-148.0, 102.0], [85.0, 143.0]]))
17747        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17748        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 2),"wrong shape of result.")
17749        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17750     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17751     def test_generalTensorProduct_Symbol_rank1_taggedData_rank2_offset0(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank2_offset0(self):
17752        arg0=Symbol(shape=(2,))        arg0=Symbol(shape=(2,))
17753        arg1=Data(numarray.array([[-0.23298424464823353, -0.62904372007593223, -0.79684710354776112, -0.80918221755065201, 0.86469780711665467], [-0.23079237051661305, -0.80735689580739223, -0.70676775229230704, -0.82847030763543539, 0.56161385054186352], [-0.95330520243206007, -0.35878150602871806, 0.39862211333973829, -0.36782386272916545, 0.49114367147188198], [-0.097061222513623813, -0.51201676761443649, 0.40136034768912143, 0.83366790627140319, -0.71676629357597399]]),self.functionspace)        arg1=Data(numarray.array([[0.0, 5.0, -1.0, 0.0, 2.0], [3.0, 3.0, 3.0, 4.0, -4.0], [3.0, -2.0, 1.0, 3.0, 3.0], [-7.0, 2.0, 0.0, -2.0, -6.0]]),self.functionspace)
17754        arg1.setTaggedValue(1,numarray.array([[0.052561221926250568, 0.017185109654445752, 0.16615656970089598, 0.76782162394430009, 0.80794852769199133], [0.76320728242019453, -0.069800210255412942, 0.2544651649572236, 0.43968820617083093, -0.72839650091806329], [0.94055165624606185, -0.57243124514878341, -0.24667196317941409, -0.43535223287784719, 0.838355791834138], [-0.17773250019532139, -0.4446233347654398, -0.040147021816919759, -0.95764454974412883, 0.10212397304303678]]))        arg1.setTaggedValue(1,numarray.array([[-5.0, 4.0, 5.0, 7.0, 6.0], [-6.0, -2.0, 3.0, 2.0, -6.0], [1.0, 1.0, 2.0, -5.0, 7.0], [7.0, 7.0, 2.0, -6.0, -6.0]]))
17755        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17756        s0=numarray.array([0.083504074965395025, 0.51158396499375458])        s0=numarray.array([-5.0, 6.0])
17757        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17758        ref=Data(numarray.array([[[-0.019455133830862028, -0.052527713957731606, -0.06653998027061013, -0.067570012555014228, 0.072205790507881826], [-0.019272103409060482, -0.067417590751329096, -0.059017987370540551, -0.069180646675393281, 0.046897045077251932], [-0.079604869088787819, -0.029959717775619399, 0.0332865708351857, -0.030714791407397402, 0.041012497961367377], [-0.0081050076010105304, -0.042755486546415152, 0.033515224561569405, 0.06961466734153117, -0.059852906311436471]], [[-0.11919100365821826, -0.32180868047086686, -0.40765420072675257, -0.41396464725700144, 0.44236553268614304], [-0.11806967599919661, -0.4130308419221953, -0.36157104904742221, -0.42383212485973165, 0.28731264045561644], [-0.48769565530936715, -0.18354686542060225, 0.20392868127653316, -0.18817279011430496, 0.25126122683317537], [-0.04965496506066075, -0.26193956811947927, 0.20532951806207267, 0.42649113297836622, -0.36668614244147429]]]),self.functionspace)        ref=Data(numarray.array([[[0.0, -25.0, 5.0, 0.0, -10.0], [-15.0, -15.0, -15.0, -20.0, 20.0], [-15.0, 10.0, -5.0, -15.0, -15.0], [35.0, -10.0, 0.0, 10.0, 30.0]], [[0.0, 30.0, -6.0, 0.0, 12.0], [18.0, 18.0, 18.0, 24.0, -24.0], [18.0, -12.0, 6.0, 18.0, 18.0], [-42.0, 12.0, 0.0, -12.0, -36.0]]]),self.functionspace)
17759        ref.setTaggedValue(1,numarray.array([[[0.0043890762160023918, 0.0014350266848733718, 0.013874750652296501, 0.064116234445896189, 0.067466994424572588], [0.063730918125351338, -0.0058286019897683368, 0.021248878210669609, 0.036715756929489127, -0.060824076017193383], [0.078539896011997595, -0.047800341607438429, -0.020598114105194954, -0.036353685490583862, 0.070006124888990967], [-0.014841388020097202, -0.037127860277617213, -0.0033524399194374173, -0.079967222272035704, 0.0085277679007497234]], [[0.026889478317947937, 0.0087916265358738092, 0.085003036737345508, 0.39280523078536861, 0.41333351130753526], [0.39044460765263139, -0.035708668319861886, 0.13018029804160627, 0.22493743587386511, -0.3726359700272398], [0.48117114558380319, -0.29284664607952654, -0.1261934209761181, -0.22271922146453346, 0.42888938006198707], [-0.090925097158175774, -0.22746216852804918, -0.020538572603790578, -0.48991559581276029, 0.052244987050272064]]]))        ref.setTaggedValue(1,numarray.array([[[25.0, -20.0, -25.0, -35.0, -30.0], [30.0, 10.0, -15.0, -10.0, 30.0], [-5.0, -5.0, -10.0, 25.0, -35.0], [-35.0, -35.0, -10.0, 30.0, 30.0]], [[-30.0, 24.0, 30.0, 42.0, 36.0], [-36.0, -12.0, 18.0, 12.0, -36.0], [6.0, 6.0, 12.0, -30.0, 42.0], [42.0, 42.0, 12.0, -36.0, -36.0]]]))
17760        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17761        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
17762        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17763     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17764     def test_generalTensorProduct_Symbol_rank2_taggedData_rank3_offset1(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank3_offset1(self):
17765        arg0=Symbol(shape=(2, 3))        arg0=Symbol(shape=(2, 3))
17766        arg1=Data(numarray.array([[[0.02481087041232799, -0.68134580421745472, -0.85402651508985072, 0.58190795716363941, 0.82109679443344863], [0.11141292556583537, -0.055411836391080049, 0.48537099380271886, -0.13885020730308861, 0.44734988461600733], [0.9797241013591893, -0.79781119043448889, 0.92461518184500568, 0.75091465809136615, 0.95205276730783384], [0.18082181892302929, -0.366853287679757, 0.56144803732337611, 0.88407887606157587, 0.70391653730603432]], [[0.057545924469279974, -0.81438196960055254, 0.75984057537050842, 0.29396183697228495, -0.19857104972233497], [0.54654878846180877, -0.044207857496574743, -0.90175833254050031, -0.94920930397933678, 0.54227073045811203], [-0.30689091060060014, -0.041394150877339886, 0.86891804451317478, 0.93762315337986202, 0.38746692741885025], [0.25256128559004876, -0.24410999682127699, 0.55735348587034528, 0.13029734864664544, -0.85837239261892373]], [[-0.84358563091087269, 0.92198846333735474, -0.87216015328120178, -0.0049659222308380269, 0.23631603068963747], [-0.70920392461490622, -0.17344351922870294, 0.14310338195314931, 0.18960962890592237, -0.26497519306866879], [0.73429152187103752, -0.41180790613027085, 0.37283988422024295, 0.51769466407775355, -0.2946268762605242], [-0.44293967816095248, -0.41224486670574856, -0.0051708370991814245, 0.98355632355129186, 0.30145938032746855]]]),self.functionspace)        arg1=Data(numarray.array([[[-7.0, -2.0, 4.0, 3.0, 6.0], [6.0, -1.0, 3.0, 0.0, -4.0], [0.0, 3.0, 7.0, 5.0, 5.0], [-1.0, 1.0, -2.0, 6.0, -4.0]], [[3.0, 7.0, 1.0, -3.0, -1.0], [-6.0, -5.0, -3.0, 0.0, 3.0], [0.0, -6.0, 2.0, 4.0, 5.0], [1.0, -5.0, -7.0, -7.0, 4.0]], [[-4.0, 1.0, 7.0, -6.0, -3.0], [-6.0, -6.0, 4.0, 0.0, 7.0], [-7.0, -3.0, 1.0, -7.0, 3.0], [6.0, -3.0, 6.0, -1.0, -6.0]]]),self.functionspace)
17767        arg1.setTaggedValue(1,numarray.array([[[-0.16174908496583451, 0.80220858650460602, 0.85441040790978118, -0.84461957444753177, 0.63276963609075443], [0.53106075511124251, 0.7896185214688487, 0.750700071981242, -0.64368352551345609, -0.44116882653564615], [0.92685259519578778, 0.77717823754290949, -0.80267913291766835, -0.39339442481714593, -0.068131332104359066], [0.50434289450602243, -0.3337289950019533, -0.24656523015635146, 0.058770138194863097, -0.43916126934244804]], [[0.48035369585330789, 0.56795700367103086, 0.13102455981567407, 0.30999847209392195, -0.69020973614369208], [0.79188162650155136, -0.67962979040532634, -0.55528124820000402, 0.61899500721642076, -0.43875739823597026], [0.91497757608030428, -0.61087986591892918, -0.24509093340712962, -0.897735064831509, -0.804222050658145], [0.88271163483519199, -0.61325650409760701, 0.73054108832169318, 0.83006137917673306, 0.043143058402431267]], [[-0.43689924550007975, -0.65262618875978617, -0.83277307660194277, 0.24519270343801614, -0.73973180361634583], [0.30401281884499487, 0.91534284483358075, -0.96296047113040806, 0.53961842974989005, 0.039942280519574824], [0.13330500695419767, 0.60527568776917495, -0.93970850767631742, 0.45151050829829908, 0.4322543195268187], [0.44516553747012977, -0.81425265414017201, -0.22766145679809702, -0.56800009855324962, -0.99936019064194404]]]))        arg1.setTaggedValue(1,numarray.array([[[3.0, -3.0, -5.0, -4.0, 1.0], [0.0, 4.0, -6.0, 3.0, -4.0], [7.0, 0.0, 0.0, 1.0, -6.0], [0.0, 1.0, -7.0, -4.0, -1.0]], [[-3.0, -4.0, 1.0, -7.0, 5.0], [3.0, -7.0, 7.0, 1.0, -1.0], [-4.0, -5.0, 0.0, 5.0, 3.0], [1.0, -7.0, 7.0, -3.0, 7.0]], [[1.0, 1.0, 3.0, 1.0, -1.0], [-7.0, 0.0, 1.0, -3.0, -5.0], [-7.0, 5.0, -4.0, -2.0, 0.0], [1.0, -7.0, -4.0, 3.0, 7.0]]]))
17768        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17769        s0=numarray.array([[0.63159154774570192, 0.69403078468270163, -0.22127949369185029], [0.21515325220870274, -0.22193729721133804, -0.7463990005418335]])        s0=numarray.array([[0.0, 2.0, -1.0], [5.0, -4.0, 6.0]])
17770        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17771        ref=Data(numarray.array([[[0.24227718045302415, -1.1995555487860747, 0.18094797941295346, 0.57264556844811898, 0.32849148216892571], [0.60662143198359131, -0.02729976741810259, -0.35095766982470372, -0.78843381808767155, 0.71752856314192581], [0.24331006586325249, -0.44149497462322679, 1.1045331852207148, 1.0104554708516573, 0.93541734252157371], [0.38750430741780928, -0.30989995302230727, 0.7425705122313625, 0.43116627149147058, -0.21785590896588755]], [[0.62221802430042861, -0.65402329997144926, 0.29859592091821652, 0.063664853278836558, 0.044345918661531702], [0.43202039288114225, 0.12734740500065853, 0.19775073364227977, 0.039266436233428903, 0.17367590155046425], [-0.26917309211878243, 0.14490824324645754, -0.27219867582604329, -0.43293859749783048, 0.33875309250407215], [0.31346136638716293, 0.28294659147670009, 0.00095935257372901841, -0.57283085287406155, 0.11694580092317233]]]),self.functionspace)        ref=Data(numarray.array([[[10.0, 13.0, -5.0, 0.0, 1.0], [-6.0, -4.0, -10.0, 0.0, -1.0], [7.0, -9.0, 3.0, 15.0, 7.0], [-4.0, -7.0, -20.0, -13.0, 14.0]], [[-71.0, -32.0, 58.0, -9.0, 16.0], [18.0, -21.0, 51.0, 0.0, 10.0], [-42.0, 21.0, 33.0, -33.0, 23.0], [27.0, 7.0, 54.0, 52.0, -72.0]]]),self.functionspace)
17772        ref.setTaggedValue(1,numarray.array([[[0.32789774137689365, 1.045260600307985, 0.81484907475403545, -0.37256221871754974, 0.084312628025581343], [0.817731908254544, -0.17551421388479838, 0.30183694544460604, -0.096349976486213615, -0.59198805096212426], [1.1909172057805046, -0.067045324500124459, -0.46912778593727433, -0.97143038179977714, -0.69683505134218215], [0.83266175316837399, -0.45622189018615145, 0.40166630132956632, 0.73889364709334016, -0.026290018136272464]], [[0.18469191754339934, 0.5336664790269442, 0.77633093336279557, -0.43353446014397184, 0.84146080734077333], [-0.28840348345228894, -0.36248679285178675, 1.0035059145507481, -0.6786393394355803, -0.027355154965443575], [-0.10315102402762945, -0.14898771668712663, 0.5830932843343456, -0.2224061881276162, -0.1588060014734434], [-0.41966673271437566, 0.67205897962444416, -0.045257341977674892, 0.25237771321918834, 0.64185941835804694]]]))        ref.setTaggedValue(1,numarray.array([[[-7.0, -9.0, -1.0, -15.0, 11.0], [13.0, -14.0, 13.0, 5.0, 3.0], [-1.0, -15.0, 4.0, 12.0, 6.0], [1.0, -7.0, 18.0, -9.0, 7.0]], [[33.0, 7.0, -11.0, 14.0, -21.0], [-54.0, 48.0, -52.0, -7.0, -46.0], [9.0, 50.0, -24.0, -27.0, -42.0], [2.0, -9.0, -87.0, 10.0, 9.0]]]))
17773        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17774        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
17775        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17776     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17777     def test_generalTensorProduct_Symbol_rank3_taggedData_rank4_offset2(self):     def test_generalTensorProduct_Symbol_rank3_taggedData_rank4_offset2(self):
17778        arg0=Symbol(shape=(2, 2, 3))        arg0=Symbol(shape=(2, 2, 3))
17779        arg1=Data(numarray.array([[[[0.49525303017452438, -0.72252067135385656, -0.75095045535043803, -0.96844393670492068, -0.69466924001935948], [-0.99530790860740082, 0.66187525664595026, -0.49504656706145611, -0.073374708225051766, 0.0375301262329093], [0.79275110020525141, 0.30869146647175927, 0.4653951051867653, 0.57319645947711484, 0.46294885093814608], [-0.26795299063665179, -0.98272576036504078, -0.30468776701833367, 0.94313731509948751, -0.89348816247694263]], [[-0.92123077624021565, -0.21062184129868, -0.43560859641117, -0.20089824000459555, 0.61741780913852917], [0.90938483221151611, -0.17426274357134064, -0.86432819150694118, 0.57681673767815655, 0.96991602061244153], [0.033258624055275465, -0.56971083196212846, -0.22067726093817353, -0.96822186845868208, 0.0041068334591567446], [0.92165812550792769, -0.39616524258061414, -0.72571258351599455, -0.94807535871578796, -0.049208825657581112]], [[-0.45830872978692438, -0.7629183693331083, 0.81507538938468316, 0.29255150755387227, -0.15897434426637802], [0.20682766192322299, -0.11431402391520584, -0.17713715377949235, 0.1604238489140497, -0.78001798654820109], [0.97659847377248954, 0.95595193664312261, 0.26953314946967377, 0.75287562607651437, 0.32374130717399408], [0.27025639041943816, 0.42820310111724025, 0.41052301542183334, 0.44387605997638779, 0.14491533418496161]]], [[[0.22195086258567454, -0.62627758131156819, 0.62203104399283982, 0.68365085969144279, -0.57752792529940766], [0.28231384040369689, -0.42100027107755089, -0.35584905086965479, 0.27222925038196011, 0.30555568042403003], [0.82224210261114794, -0.90073685289988514, 0.39182316666311245, -0.37159535489084461, -0.19196804273720169], [-0.77364694236546527, -0.6889408212832806, 0.89514448012370695, -0.75523905434077832, -0.042091403912800862]], [[0.75286188342006199, 0.43681763776796667, -0.26926979596892742, 0.089099505011855928, 0.50189201932808336], [-0.52656955864311472, 0.43219600714830375, -0.84312042806482279, 0.93344399762780017, -0.71312845373246914], [-0.93768387266673159, 0.76265021219977114, 0.7417560658230431, 0.0036000913732225914, -0.61971026795082573], [-0.19142043873982173, 0.36185705910037624, -0.28251341169327371, 0.068751588400508545, 0.81711972443528325]], [[0.055568625844194752, -0.74782084026103934, 0.70147035585515671, 0.58829585144601526, 0.61130551658966792], [-0.73323758007244, -0.66590177734916001, 0.48736525604216463, 0.6600996248470552, 0.39802305888059464], [0.45701505150362065, 0.17032380753266052, 0.84444536056339903, 0.52396318114128726, -0.54828108683957311], [-0.83898192418872775, -0.92964687326264506, -0.95306146574096595, 0.70870456850412356, 0.90782611660239687]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-3.0, 0.0, 1.0, 4.0, -5.0], [-7.0, 0.0, 0.0, -1.0, 0.0], [7.0, -2.0, -1.0, 6.0, 2.0], [0.0, 1.0, 6.0, 4.0, 4.0]], [[6.0, 6.0, 5.0, -5.0, 5.0], [2.0, 7.0, 6.0, 3.0, -3.0], [0.0, -5.0, -3.0, -3.0, -6.0], [1.0, -3.0, 4.0, 0.0, 4.0]], [[-1.0, 5.0, -2.0, 1.0, 5.0], [5.0, 5.0, 5.0, 3.0, -4.0], [3.0, -2.0, 0.0, -7.0, 2.0], [2.0, 6.0, 5.0, 7.0, -4.0]]], [[[2.0, 0.0, 4.0, 6.0, 1.0], [0.0, 3.0, 0.0, 3.0, 2.0], [-6.0, 3.0, 2.0, 5.0, -7.0], [2.0, -2.0, -5.0, 7.0, -1.0]], [[2.0, -7.0, 3.0, -3.0, 7.0], [-7.0, -5.0, 6.0, 0.0, -1.0], [6.0, -5.0, 2.0, 0.0, -6.0], [0.0, 0.0, -5.0, -1.0, 0.0]], [[3.0, -4.0, -2.0, -7.0, 7.0], [0.0, 4.0, 0.0, -1.0, 6.0], [-3.0, -5.0, 1.0, -4.0, 7.0], [6.0, 3.0, 7.0, -3.0, 3.0]]]]),self.functionspace)
17780        arg1.setTaggedValue(1,numarray.array([[[[0.85782802051811746, 0.71668841808922057, 0.51579272308283497, 0.61780642258045826, -0.55894189879695144], [-0.93862053619730634, 0.37739489916269009, -0.93902944548930889, -0.13178895080183617, -0.91747602790497029], [-0.66079995974613714, -0.94720221961453577, 0.68478394066358805, 0.39479057097783632, -0.13071749535800503], [-0.26715812139617312, -0.73588716947805555, 0.75579255118211619, 0.4052889839316669, 0.46336103923704686]], [[-0.67234299226121985, -0.17843115521793873, -0.9679593903642405, 0.70703076268189791, -0.98780993040308518], [-0.37696782163336517, 0.95782797355043936, -0.4506263333572067, -0.38149198377259164, 0.41721164105183051], [-0.15759811541513624, -0.48163390222838598, -0.80758125277032344, -0.19782844926561549, 0.54948096580900407], [-0.98576737050544039, -0.35754639155094159, -0.56148941837813826, -0.95569540655423868, -0.14382751572534458]], [[-0.90345957045831615, 0.30804927053578557, 0.51802911218669245, 0.17029819069157992, 0.21593736141123787], [0.012970539888272903, -0.86420455471101287, -0.17733141163599297, 0.087641288032835662, -0.50020201454750191], [-0.83551576539434991, 0.0085811905321793169, 0.77761913969803076, -0.5995245434845129, -0.5751334558190333], [0.51916808994031172, -0.21781999673497476, -0.30594453944221023, -0.99245928836504538, -0.66560706205159303]]], [[[0.35351965181670009, -0.98029303694812331, -0.10876461349671529, -0.72368114885359591, 0.74871114493681845], [-0.80536646090872499, 0.6925175429434538, -0.36194540300838041, -0.30808172933560263, -0.73571225278514829], [-0.073595890975787226, -0.18209460613663064, 0.79591551140844863, 0.64959352771251777, 0.91497138400339684], [-0.58068192481766867, -0.55242569224477966, 0.78042584637022938, -0.15130503208211077, -0.2353984398818012]], [[0.015127859558093926, -0.24977012187443082, -0.85785424685122735, -0.42450436736760699, -0.51481529935742332], [-0.35886370313341809, 0.76372579430133802, 0.80844024130859449, 0.22356301669460876, 0.0050601121116178316], [-0.3658337798757183, -0.66096412965911266, 0.29441275812045653, -0.011316848605614549, 0.19309299044382766], [-0.074265146364622669, 0.98813398338080516, -0.44587687621194205, 0.10362184214907577, 0.60583843642841018]], [[0.83100858421474344, -0.54482957720040193, 0.67856991158795665, 0.64968982151909893, 0.58608964154879173], [-0.62389573405162069, -0.47504073832295513, 0.69267341151352468, -0.73483711442783339, 0.99945327212297896], [0.26529231017322319, -0.43872831022788139, -0.36160275704042255, 0.79254197879426558, -0.15969695021457975], [-0.94070846860745694, 0.63932716245513066, -0.60259006496458523, 0.62687035340762431, -0.83575149514064262]]]]))        arg1.setTaggedValue(1,numarray.array([[[[6.0, 5.0, -5.0, -7.0, -7.0], [-2.0, 0.0, 1.0, 6.0, 1.0], [5.0, 0.0, -4.0, 4.0, -7.0], [0.0, 7.0, -2.0, -3.0, -6.0]], [[-3.0, -6.0, -1.0, 0.0, -7.0], [1.0, -4.0, 5.0, -5.0, 6.0], [6.0, -7.0, -4.0, 0.0, -1.0], [-3.0, -6.0, -2.0, -5.0, -2.0]], [[1.0, 6.0, -7.0, -4.0, 4.0], [0.0, 6.0, 0.0, 4.0, 5.0], [-5.0, -5.0, -1.0, -5.0, -7.0], [0.0, -4.0, -6.0, 0.0, 2.0]]], [[[-4.0, 2.0, -4.0, 6.0, 4.0], [-2.0, -4.0, -7.0, 3.0, 2.0], [-3.0, 3.0, 4.0, -1.0, -6.0], [-1.0, 6.0, -3.0, -6.0, -4.0]], [[4.0, 7.0, 5.0, -2.0, -2.0], [1.0, 0.0, -1.0, 0.0, -5.0], [-4.0, -1.0, 7.0, -1.0, 3.0], [6.0, 5.0, -7.0, 6.0, -3.0]], [[1.0, -4.0, 4.0, 1.0, -1.0], [5.0, 0.0, 0.0, 2.0, 0.0], [5.0, -3.0, 6.0, 2.0, -6.0], [-7.0, -1.0, 7.0, 7.0, 7.0]]]]))
17781        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17782        s0=numarray.array([[[-0.3893265660982439, -0.61475543860190007, -0.74591976266188742], [0.10225570341250068, 0.47401286492223083, -0.64748812440509784]], [[-0.4857713037071627, 0.33407886034122125, -0.33088702206502929], [0.45090826302193032, 0.5282805582575314, 0.69026909549022775]]])        s0=numarray.array([[[6.0, 1.0, 6.0], [-6.0, -7.0, -5.0]], [[-5.0, 6.0, -7.0], [-6.0, -1.0, -3.0]]])
17783        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17784        ref=Data(numarray.array([[[1.0589599417658322, 1.6070751418933766, -0.56604797567915066, 0.013551220635456274, -0.207490973775939], [-0.071796220884501327, 0.52769271964282061, 0.10461460006263557, -0.40280303364525655, -0.59354424667448558], [-1.7138561782234807, -0.3238945090884956, -0.40167850604481992, -0.56507695036442018, -0.38262299784176396], [-0.29047744042033941, 1.0097529109187129, 0.83325618712356264, -0.61896600975929206, 0.065229405589933509]], [[0.13946405190301001, -0.034773794735462049, 0.57199693742471514, 1.0679407246633632, 1.0230121562766452], [0.061851621402662982, -0.76307564869758915, -0.2591082089715212, 1.246780541966559, 0.5996839094776627], [-0.50626952820366911, -0.54228104048914572, 0.76244193126395732, -0.65499959029430022, -1.1230394105830417], [-0.68044475158823547, -0.55785087410778589, -0.63376057315219325, -0.73678034732634079, 1.4089740924898853]]]),self.functionspace)        ref=Data(numarray.array([[[-59.0, 105.0, -36.0, 45.0, -85.0], [39.0, 34.0, -6.0, 2.0, -62.0], [69.0, 13.0, -40.0, -19.0, 67.0], [-29.0, 36.0, 100.0, 46.0, -5.0]], [[35.0, 20.0, 18.0, -69.0, -14.0], [19.0, -18.0, -5.0, -13.0, -19.0], [-17.0, -4.0, -30.0, -17.0, -33.0], [-38.0, -62.0, -27.0, -101.0, 29.0]]]),self.functionspace)
17785        ref.setTaggedValue(1,numarray.array([[[0.25851163309635772, -0.26497848048030165, -0.84928337316531932, -1.4980957458674424, 0.11684533883800724], [0.7390036993804503, 0.64928039712589436, 0.67259138823947473, 0.77072677976021131, -0.24614110626499802], [0.62466986117653245, 0.61060282673219879, 0.10489472934895755, -0.036990345127395741, 0.43059027515873849], [0.83727675627035592, 0.66672305110105712, 0.53776016261459925, 0.79777935167048231, 1.2087529949309708]], [[0.39863546033635022, -1.4597361993815838, -0.7791759280800441, -0.22236846963142759, 0.34025334349504388], [-0.65765689543809569, 0.81043396779817978, 1.1062956270345057, -0.62047643401707342, 1.1114016017806498], [0.50148399680156153, -0.43774250847285423, -0.59493408465743203, 0.77450251061196251, 0.84171454034584658], [-1.3217413688189965, 1.0243244339412303, -0.75308792170188354, 0.23146245534215659, -0.41588035286905511]]]))        ref.setTaggedValue(1,numarray.array([[[30.0, 19.0, -104.0, -93.0, -30.0], [-31.0, 56.0, 60.0, 27.0, 65.0], [27.0, -33.0, -137.0, -3.0, -40.0], [-4.0, -54.0, -18.0, -64.0, -16.0]], [[-38.0, -110.0, 75.0, 26.0, -54.0], [12.0, -42.0, 68.0, -112.0, -11.0], [53.0, -15.0, -46.0, 16.0, 129.0], [3.0, -81.0, 44.0, -6.0, 10.0]]]))
17786        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17787        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 4, 5),"wrong shape of result.")
17788        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17789     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17790     def test_generalTensorProduct_Symbol_rank1_taggedData_rank3_offset0(self):     def test_generalTensorProduct_Symbol_rank1_taggedData_rank3_offset0(self):
17791        arg0=Symbol(shape=(2,))        arg0=Symbol(shape=(2,))
17792        arg1=Data(numarray.array([[[-0.48938767041804687, -0.17946858197962912], [-0.87490456944922124, -0.65741406313135586]], [[-0.44585118815096836, -0.057276939847211494], [0.35084658697862192, 0.30038348583731045]], [[-0.13488388654510763, 0.71934667088244386], [0.89713758879513916, -0.06869414472947688]], [[-0.86210103041803543, 0.069238859297329425], [0.31120179009040094, 0.67072421447610209]], [[0.50858025936959739, 0.16359134037891043], [-0.92818541713598801, 0.22174540585464042]], [[0.78969663544121049, 0.96885468345121395], [-0.58454506174656329, 0.56730621124916514]]]),self.functionspace)        arg1=Data(numarray.array([[[3.0, -6.0], [-7.0, 1.0]], [[3.0, -7.0], [-7.0, 4.0]], [[3.0, -5.0], [5.0, -4.0]], [[0.0, 0.0], [3.0, 0.0]], [[7.0, -2.0], [3.0, -6.0]], [[-7.0, -1.0], [2.0, 3.0]]]),self.functionspace)
17793        arg1.setTaggedValue(1,numarray.array([[[-0.027128178836059336, -0.8466632278144528], [-0.82444364026575334, -0.78484978039149134]], [[-0.20694437633631391, -0.25922875302662884], [0.15360299181084058, -0.23262907299653435]], [[0.66268962529174291, 0.4699109016855878], [-0.95006416238010827, -0.41887342355179213]], [[-0.43574358017636561, -0.15674162932145141], [0.85759270685276845, 0.39560550568810693]], [[-0.39825098413245064, -0.021778642704622042], [0.4619331010879939, -0.1122359682222891]], [[-0.84142180679198453, -0.8095654460980477], [0.49359900947042679, 0.98789655480278227]]]))        arg1.setTaggedValue(1,numarray.array([[[3.0, -2.0], [-4.0, 2.0]], [[-1.0, -7.0], [7.0, 6.0]], [[4.0, -2.0], [2.0, -7.0]], [[-4.0, 4.0], [5.0, 1.0]], [[-5.0, 2.0], [-3.0, 6.0]], [[5.0, -3.0], [6.0, -4.0]]]))
17794        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17795        s0=numarray.array([-0.57577157070941287, 0.89544705286965876])        s0=numarray.array([-1.0, 3.0])
17796        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17797        ref=Data(numarray.array([[[[0.28177550768241932, 0.10333290733940209], [0.50374517817262066, 0.37852032773559791]], [[0.25670843890434103, 0.032978433621257519], [-0.20200749046271779, -0.1729522714557169]], [[0.077662307219466861, -0.4141793625785718], [-0.51654631864303269, 0.03955213560943064]], [[0.49637326439399559, -0.039865766771751396], [-0.17918114348793115, -0.38618393448174243]], [[-0.29282605476903367, -0.094191243004423456], [0.53442277553395945, -0.12767470062652256]], [[-0.45468487217192438, -0.55783898287987643], [0.33656442835224948, -0.32663878832413779]]], [[[-0.43822074718658793, -0.16070461281635565], [-0.78343071825550281, -0.58867948534604042]], [[-0.39923613244822032, -0.051288466983578258], [0.3141645423193854, 0.26897750712373453]], [[-0.12078137868642205, 0.64413685643328478], [0.80333920990519914, -0.061511969447411871]], [[-0.77196582696372584, 0.061999732501850605], [0.2786647257842117, 0.60059802114094252]], [[0.45540669440019266, 0.14648738361729255], [-0.83114089629101529, 0.19856127015992414]], [[0.70713152486691722, 0.86755807095535564], [-0.52342915281047275, 0.50799267493771694]]]]),self.functionspace)        ref=Data(numarray.array([[[[-3.0, 6.0], [7.0, -1.0]], [[-3.0, 7.0], [7.0, -4.0]], [[-3.0, 5.0], [-5.0, 4.0]], [[0.0, 0.0], [-3.0, 0.0]], [[-7.0, 2.0], [-3.0, 6.0]], [[7.0, 1.0], [-2.0, -3.0]]], [[[9.0, -18.0], [-21.0, 3.0]], [[9.0, -21.0], [-21.0, 12.0]], [[9.0, -15.0], [15.0, -12.0]], [[0.0, 0.0], [9.0, 0.0]], [[21.0, -6.0], [9.0, -18.0]], [[-21.0, -3.0], [6.0, 9.0]]]]),self.functionspace)
17798        ref.setTaggedValue(1,numarray.array([[[[0.015619634138923736, 0.48748461654062897], [0.47469120971719897, 0.45189419082694671]], [[0.11915268861263931, 0.14925654630318455], [-0.08844023586059277, 0.13394120675188925]], [[-0.38155784644705909, -0.27056133795698739], [0.54701993504831758, 0.24117540900684453]], [[0.25088876558468903, 0.09024737410996464], [-0.49377749985355557, -0.2277784033913329]], [[0.22930159467051056, 0.012539523317959329], [-0.26596794717610422, 0.064622279713439146]], [[0.48446675532577305, 0.46612476849193946], [-0.284200276983398, -0.56880275105721556]]], [[[-0.024291847788470381, -0.75814209211956429], [-0.738245627933102, -0.70279142279695983]], [[-0.18530773189830183, -0.23212562291677144], [0.13754334632897952, -0.2083070178265474]], [[0.59340347193478971, 0.42078033202568355], [-0.85073215424034887, -0.37507897264487655]], [[-0.39018530467580043, -0.14035383003788215], [0.7679288619138247, 0.35424378416742636]], [[-0.35661267004384417, -0.019501621425355102], [0.41363663399218631, -0.10050136697062144]], [[-0.75344867711214591, -0.72492299281360739], [0.44199177832967645, 0.88460905853824068]]]]))        ref.setTaggedValue(1,numarray.array([[[[-3.0, 2.0], [4.0, -2.0]], [[1.0, 7.0], [-7.0, -6.0]], [[-4.0, 2.0], [-2.0, 7.0]], [[4.0, -4.0], [-5.0, -1.0]], [[5.0, -2.0], [3.0, -6.0]], [[-5.0, 3.0], [-6.0, 4.0]]], [[[9.0, -6.0], [-12.0, 6.0]], [[-3.0, -21.0], [21.0, 18.0]], [[12.0, -6.0], [6.0, -21.0]], [[-12.0, 12.0], [15.0, 3.0]], [[-15.0, 6.0], [-9.0, 18.0]], [[15.0, -9.0], [18.0, -12.0]]]]))
17799        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17800        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
17801        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17802     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17803     def test_generalTensorProduct_Symbol_rank2_taggedData_rank4_offset1(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank4_offset1(self):
17804        arg0=Symbol(shape=(2, 3))        arg0=Symbol(shape=(2, 3))
17805        arg1=Data(numarray.array([[[[-0.79412473195678968, 0.078872739876912012], [0.14117394911957137, 0.35030172814355365]], [[-0.25200338921931276, -0.36341265289108771], [0.76045730076854778, 0.039422275079277203]], [[0.91748185572883889, 0.96293458406186105], [0.47102786084695669, -0.13532591079822431]], [[0.21088255840178638, 0.61718786785299495], [0.44668833934965058, 0.85669855767971237]], [[-0.51690330184871636, 0.66784287119072183], [0.47994360090736077, 0.017872538534659865]], [[0.21021269812291443, 0.53001029897497109], [0.67818705460357398, 0.7386705602995014]]], [[[-0.4348693150236953, -0.89665441145061453], [0.03680706197322503, 0.89963230828883245]], [[-0.63514990637761226, -0.73443340265484958], [0.98729892653933238, -0.42012150703872142]], [[0.59528300259904277, -0.39520336898366915], [-0.95457824551701553, 0.65904699083903706]], [[0.7772086971749288, 0.42980346183676432], [-0.033697323425560644, 0.30070444978931254]], [[-0.51625321429876969, 0.12464939571463174], [0.82618315361111239, -0.43234683257975237]], [[0.32914788025082165, 0.18699526780010078], [0.19940193458618549, -0.3699909883731709]]], [[[-0.64109459555283599, 0.80614245400495887], [-0.52584653946633853, -0.85808963384420855]], [[0.62555197509288818, -0.8724782084610152], [0.50983746797752461, -0.58251076099132737]], [[-0.31204161316464596, 0.41733410914284175], [0.75396091484277927, 0.3292927152165428]], [[0.25182592840146745, -0.35674033234050695], [-0.49407691159411149, 0.44630036598976153]], [[-0.09779198656534227, -0.28457633059430343], [0.37303106717386258, -0.77082995491430584]], [[0.27092814019890032, -0.058268848979110555], [0.13294234415524531, -0.79394137806681497]]]]),self.functionspace)        arg1=Data(numarray.array([[[[-6.0, -6.0], [7.0, -3.0]], [[2.0, 4.0], [4.0, 3.0]], [[-2.0, -1.0], [-2.0, -7.0]], [[4.0, 0.0], [0.0, -6.0]], [[-4.0, -1.0], [-6.0, 3.0]], [[-7.0, -2.0], [7.0, 5.0]]], [[[-3.0, -1.0], [4.0, -4.0]], [[0.0, -2.0], [7.0, -7.0]], [[1.0, 6.0], [5.0, -6.0]], [[4.0, 1.0], [-4.0, -2.0]], [[1.0, 7.0], [-2.0, -6.0]], [[-7.0, -7.0], [6.0, 4.0]]], [[[5.0, 0.0], [3.0, -3.0]], [[-4.0, 3.0], [-2.0, 0.0]], [[1.0, 1.0], [-6.0, -7.0]], [[0.0, 4.0], [-7.0, -4.0]], [[-3.0, -4.0], [-5.0, 0.0]], [[-5.0, -2.0], [3.0, 0.0]]]]),self.functionspace)
17806        arg1.setTaggedValue(1,numarray.array([[[[-0.18757426106239694, -0.20957632807740678], [0.41259263866108342, 0.48080263722904504]], [[-0.043273824886633117, -0.52973034975840472], [-0.11951874141908569, -0.77180655449488711]], [[-0.80384260512604233, 0.63062538636276932], [0.83067944871530908, 0.99471428178686194]], [[-0.77892223795746385, -0.23458646594236021], [0.011880572557519731, -0.52299568314230283]], [[-0.50758804175202732, -0.90329623799437986], [0.1358789829747824, 0.91841351530836213]], [[0.082980586056692118, -0.55989170071407623], [-0.64510151934509508, -0.60760187097822249]]], [[[0.02077070479234755, 0.80728811819445201], [-0.0015691508614950056, 0.075931510652821332]], [[-0.48702371723274562, 0.36728600133298772], [-0.46978445406324498, -0.029625286278367913]], [[-0.79457577695954851, -0.19875550673676989], [0.269677449127258, -0.61783090948341823]], [[0.54960640372695346, -0.53198578193862889], [-0.42319854782643462, -0.68387286709915496]], [[0.89342895975519454, 0.5874303704502748], [0.26583738910986177, 0.65296055959206267]], [[0.10345829937163242, -0.68545995586490394], [-0.31362066119921805, -0.81991939399693425]]], [[[-0.70500933383342423, 0.22846759035347453], [-0.69865586742726848, 0.074886817165394026]], [[-0.46782382275200329, -0.61477034782693729], [-0.92488599246656111, 0.35824215296214135]], [[-0.12042793780080907, -0.68906253231698855], [-0.83719396219928366, -0.37349323191521777]], [[-0.99630471598125059, 0.70281240177048332], [0.51713683902730745, 0.20116638531933706]], [[0.99127990749181416, -0.74915482906575592], [-0.39750856467171092, 0.64628329886312885]], [[0.62618531630120078, 0.88691249921889037], [-0.33105486130409378, -0.2965959453555147]]]]))        arg1.setTaggedValue(1,numarray.array([[[[7.0, -6.0], [-6.0, -1.0]], [[1.0, -5.0], [-2.0, 6.0]], [[-5.0, -1.0], [3.0, -6.0]], [[3.0, -3.0], [4.0, -3.0]], [[-4.0, -6.0], [-5.0, 0.0]], [[-4.0, -3.0], [5.0, -5.0]]], [[[-6.0, 1.0], [0.0, -1.0]], [[-2.0, 0.0], [1.0, -7.0]], [[6.0, 3.0], [-3.0, -5.0]], [[-4.0, 4.0], [-1.0, -7.0]], [[2.0, -2.0], [0.0, -5.0]], [[-5.0, 5.0], [0.0, 2.0]]], [[[1.0, -7.0], [3.0, 3.0]], [[4.0, 5.0], [0.0, 0.0]], [[2.0, 1.0], [6.0, 3.0]], [[-5.0, 3.0], [4.0, -6.0]], [[2.0, 0.0], [1.0, -5.0]], [[0.0, 3.0], [-4.0, -5.0]]]]))
17807        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17808        s0=numarray.array([[-0.4261279881465212, -0.30651338408481799, -0.78842419830608956], [0.89994041854893037, 0.58524791770562867, 0.19929691944017724]])        s0=numarray.array([[3.0, -7.0, 3.0], [-2.0, -2.0, 6.0]])
17809        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17810        ref=Data(numarray.array([[[[0.97714653228581327, -0.39435552197440721], [0.34315010827012432, 0.25151591773467774]], [[-0.19113267000231354, 1.0678569023215441], [-1.0286406716813006, 0.5712395098208185]], [[-0.32740574625999619, -0.61823456542081368], [-0.50256817613554861, -0.40396291032308457]], [[-0.52663348397079812, -0.11347882748658211], [0.20952447018732809, -0.80910717960555978]], [[0.45560705245100797, -0.098426381897415594], [-0.75186031544547727, 0.73264509109715714]], [[-0.40407204650887107, -0.23722820419782248], [-0.45492880803983871, 0.42460158466801756]]], [[[-1.0969394827123677, -0.29312265295297601], [0.043789803821645559, 0.67074399834197029]], [[-0.47383761412246883, -0.93075757377095814], [1.363789939235484, -0.32649013864909143]], [[1.1118782107314473, 0.71846520617740883], [0.015494167469355558, 0.3295476459911863]], [[0.69482964128267966, 0.73587663990605512], [0.28380359626096552, 1.0359105997393403]], [[-0.78680793416065853, 0.61725440627651662], [0.9897865579180567, -0.39056989911114232]], [[0.4358071587983478, 0.57480347929473297], [0.75352250843074198, 0.28999296682565506]]]]),self.functionspace)        ref=Data(numarray.array([[[[18.0, -11.0], [2.0, 10.0]], [[-6.0, 35.0], [-43.0, 58.0]], [[-10.0, -42.0], [-59.0, 0.0]], [[-16.0, 5.0], [7.0, -16.0]], [[-28.0, -64.0], [-19.0, 51.0]], [[13.0, 37.0], [-12.0, -13.0]]], [[[48.0, 14.0], [-4.0, -4.0]], [[-28.0, 14.0], [-34.0, 8.0]], [[8.0, -4.0], [-42.0, -16.0]], [[-16.0, 22.0], [-34.0, -8.0]], [[-12.0, -36.0], [-14.0, 6.0]], [[-2.0, 6.0], [-8.0, -18.0]]]]),self.functionspace)
17811        ref.setTaggedValue(1,numarray.array([[[[0.62941056230478809, -0.33826765075584764], [0.37550088687217409, -0.28720006357414379]], [[0.53656309803866054, 0.59785467163495587], [0.92412800076706358, 0.055522138808244914]], [[0.68103624273077212, 0.33546767043527631], [0.22342846865459565, 0.059968949125022125]], [[0.94896959442845852, -0.29108968334003305], [-0.28306982317255364, 0.27387483897356169]], [[-0.83909952921608766, 0.79551633334925853], [0.17402081602232233, -1.1010482461441833]], [[-0.56077135963943603, -0.25057510143229877], [0.63203640639089376, 0.74407585144254407]]], [[[-0.29715583569007309, 0.3293903687032369], [0.23115048752554757, 0.49205719705288559]], [[-0.41720932717961073, -0.38429422168216704], [-0.56682704882007973, -0.64052149329781294]], [[-1.2124351864477354, 0.31387598770824654], [0.7385399986705099, 0.45916328326606326]], [[-0.57788806222441491, -0.38238906685745577], [-0.13392048250427832, -0.83080828454246669]], [[0.26363747543594457, -0.61842464300780464], [0.19864153484501779, 1.3374635217618156]], [[0.26002314216141081, -0.72827425441591198], [-0.83007698426588161, -1.0857722583302225]]]]))        ref.setTaggedValue(1,numarray.array([[[[66.0, -46.0], [-9.0, 13.0]], [[29.0, 0.0], [-13.0, 67.0]], [[-51.0, -21.0], [48.0, 26.0]], [[22.0, -28.0], [31.0, 22.0]], [[-20.0, -4.0], [-12.0, 20.0]], [[23.0, -35.0], [3.0, -44.0]]], [[[4.0, -32.0], [30.0, 22.0]], [[26.0, 40.0], [2.0, 2.0]], [[10.0, 2.0], [36.0, 40.0]], [[-28.0, 16.0], [18.0, -16.0]], [[16.0, 16.0], [16.0, -20.0]], [[18.0, 14.0], [-34.0, -24.0]]]]))
17812        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17813        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(2, 6, 2, 2),"wrong shape of result.")
17814        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17815     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17816     def test_generalTensorProduct_Symbol_rank2_taggedData_rank0_offset0(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank0_offset0(self):
17817        arg0=Symbol(shape=(4, 5))        arg0=Symbol(shape=(4, 5))
17818        arg1=Data(0.534603257087,self.functionspace)        arg1=Data(-4.0,self.functionspace)
17819        arg1.setTaggedValue(1,-0.981117351887)        arg1.setTaggedValue(1,1.0)
17820        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17821        s0=numarray.array([[-0.57186484566737983, 0.9727812008214678, -0.5572419712245178, -0.91272257242384125, -0.67323119467258663], [-0.7637546905646635, 0.93063887136043233, -0.75952665408943676, -0.98819953256794668, 0.98659845572265503], [-0.08433762128919442, -0.56035891207066579, -0.25253982630212679, 0.86342593947330748, 0.60083346105569357], [0.7182742556331001, -0.95065323078659647, 0.8893530179391631, -0.014976934734816982, -0.4065612085688759]])        s0=numarray.array([[7.0, 6.0, -1.0, 7.0, 4.0], [-5.0, 6.0, -6.0, 2.0, -4.0], [-4.0, 2.0, -2.0, -6.0, 2.0], [-2.0, 1.0, 1.0, 0.0, -7.0]])
17822        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17823        ref=Data(numarray.array([[-0.30572080910761196, 0.52005199839262939, -0.29790337280247658, -0.48794446003505143, -0.35991158944486201], [-0.40830574519171164, 0.49752257180150605, -0.40604542312097075, -0.52829468876315233, 0.52743874786681211], [-0.045087167036213967, -0.29956969953097629, -0.13500861368542413, 0.46159031949624996, 0.32120752524751905], [0.38399175654354256, -0.50822231353925296, 0.4754510200908591, -0.0080067180904198135, -0.21734894630634446]]),self.functionspace)        ref=Data(numarray.array([[-28.0, -24.0, 4.0, -28.0, -16.0], [20.0, -24.0, 24.0, -8.0, 16.0], [16.0, -8.0, 8.0, 24.0, -8.0], [8.0, -4.0, -4.0, -0.0, 28.0]]),self.functionspace)
17824        ref.setTaggedValue(1,numarray.array([[0.56106652301852444, -0.95441251571554508, 0.54671976716816562, 0.89548795326409236, 0.66051880692498], [0.74933297949818034, -0.91306594503237881, 0.74518477954792373, 0.96953970852916782, -0.96796886425454742], [0.082745103663714431, 0.54977785191712714, 0.24777120562757951, -0.84712217128671252, -0.58948813423614377], [-0.70471133561544974, 0.93270238035229425, -0.8725596778533028, 0.014694130546410078, 0.39888425633112845]]))        ref.setTaggedValue(1,numarray.array([[7.0, 6.0, -1.0, 7.0, 4.0], [-5.0, 6.0, -6.0, 2.0, -4.0], [-4.0, 2.0, -2.0, -6.0, 2.0], [-2.0, 1.0, 1.0, 0.0, -7.0]]))
17825        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17826        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17827        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17828     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17829     def test_generalTensorProduct_Symbol_rank3_taggedData_rank1_offset1(self):     def test_generalTensorProduct_Symbol_rank3_taggedData_rank1_offset1(self):
17830        arg0=Symbol(shape=(4, 5, 3))        arg0=Symbol(shape=(4, 5, 3))
17831        arg1=Data(numarray.array([0.77000447834650387, -0.30459229698740642, -0.33042213174562263]),self.functionspace)        arg1=Data(numarray.array([1.0, -2.0, -4.0]),self.functionspace)
17832        arg1.setTaggedValue(1,numarray.array([0.47725553244593666, -0.19804999504718968, -0.27627135670469816]))        arg1.setTaggedValue(1,numarray.array([3.0, 1.0, 0.0]))
17833        res=generalTensorProduct(arg0,arg1,1)        res=generalTensorProduct(arg0,arg1,axis_offset=1)
17834        s0=numarray.array([[[0.8671101855281016, -0.070877228936592429, 0.60040671934273071], [0.25215256888677295, 0.59476713639706191, -0.56655117243373887], [0.97178772493884891, -0.47045287774625222, 0.39419023583537993], [-0.88038969536301304, -0.18598390712099566, 0.48801709450679431], [-0.0064999202971329773, -0.9958568560976726, 0.85116384168065351]], [[0.47639005985199456, -0.14342463168480113, 0.23192726068880321], [-0.31385320396188465, 0.6576930299019077, -0.57054441268631018], [0.54953839231690127, -0.7664786464036768, 0.96386427250940176], [-0.55900143583437933, 0.53866177913516533, 0.92531496881963338], [-0.68690296982403343, 0.40852142389633816, 0.68052013438293901]], [[-0.83798891884883053, -0.06182415902392413, 0.73583746087591639], [-0.58398683974005561, 0.20113429654599724, -0.753940277413919], [-0.4270252447720555, -0.93313952361173569, -0.96946021546492633], [0.8571508865889812, 0.383323961773266, -0.80799214039312384], [-0.97098007392855123, -0.33838722330006155, -0.33670498158875373]], [[0.3945722656559485, -0.61202307948727874, -0.72952487905698393], [0.97234512779090809, 0.19280079958938057, -0.23011399651129594], [-0.16839442682929895, 0.69647226132384854, -0.065505934555669665], [0.5696845567258102, 0.22299463722326496, -0.87844657522035252], [-0.015529859502507293, 0.78752345069168084, -0.22109491952562199]]])        s0=numarray.array([[[-1.0, -1.0, 0.0], [1.0, 2.0, -2.0], [7.0, -7.0, -3.0], [3.0, -5.0, -2.0], [2.0, -2.0, 4.0]], [[-7.0, -7.0, -4.0], [2.0, 6.0, -2.0], [2.0, -4.0, -4.0], [-7.0, -4.0, 3.0], [0.0, -4.0, 0.0]], [[-7.0, -6.0, -7.0], [7.0, -5.0, 4.0], [7.0, 1.0, 2.0], [-1.0, 0.0, 3.0], [-5.0, 3.0, -6.0]], [[0.0, -5.0, 0.0], [-1.0, 1.0, 0.0], [-6.0, 0.0, -7.0], [7.0, 0.0, -4.0], [2.0, 1.0, 6.0]]])
17835        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17836        ref=Data(numarray.array([[0.49087971592278412, 0.20019816516012517, 0.76132804482410465, -0.78250639134219768, 0.017081988498844236], [0.33387461764852405, -0.25347610218911409, 0.33812842697124568, -0.90025038213421849, -0.87820975532579904], [-0.8695610401528393, -0.26181788561116315, 0.2757468711016296, 0.81023098074776434, -0.53333408590812115], [0.73129109287621918, 0.76601922176123205, -0.3201599381139234, 0.66099540116495947, -0.17877698351486729]]),self.functionspace)        ref=Data(numarray.array([[1.0, 5.0, 33.0, 21.0, -10.0], [23.0, -2.0, 26.0, -11.0, 8.0], [33.0, 1.0, -3.0, -13.0, 13.0], [10.0, -3.0, 22.0, 23.0, -24.0]]),self.functionspace)
17837        ref.setTaggedValue(1,numarray.array([[0.26199518919592657, 0.15906944115490468, 0.44806078694371176, -0.51816188573069755, -0.041024866823507478], [0.19169018029413532, -0.1224192003282043, 0.14778323990335224, -0.62910651240197524, -0.59674412937224286], [-0.59098138689083823, -0.11025349326085498, 0.24884220646582161, 0.55638777886800772, -0.30336608220580075], [0.51106979268215436, 0.48944680029420701, -0.20020608633113457, 0.47041064677750893, -0.10229853349685317]]))        ref.setTaggedValue(1,numarray.array([[-4.0, 5.0, 14.0, 4.0, 4.0], [-28.0, 12.0, 2.0, -25.0, -4.0], [-27.0, 16.0, 22.0, -3.0, -12.0], [-5.0, -2.0, -18.0, 21.0, 7.0]]))
17838        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17839        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17840        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17841     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17842     def test_generalTensorProduct_Symbol_rank4_taggedData_rank2_offset2(self):     def test_generalTensorProduct_Symbol_rank4_taggedData_rank2_offset2(self):
17843        arg0=Symbol(shape=(4, 5, 2, 3))        arg0=Symbol(shape=(4, 5, 2, 3))
17844        arg1=Data(numarray.array([[-0.83366785662866527, -0.8212715491846847, 0.72712171256208302], [-0.94070455409205733, 0.68289289969514422, 0.19256860284029953]]),self.functionspace)        arg1=Data(numarray.array([[7.0, 0.0, 6.0], [-7.0, -2.0, 0.0]]),self.functionspace)
17845        arg1.setTaggedValue(1,numarray.array([[-0.58677121731508031, -0.611485698544181, 0.52884730670453295], [0.33807509347654929, -0.016520163711764679, 0.83516212814968682]]))        arg1.setTaggedValue(1,numarray.array([[1.0, -4.0, 4.0], [-7.0, 2.0, -4.0]]))
17846        res=generalTensorProduct(arg0,arg1,2)        res=generalTensorProduct(arg0,arg1,axis_offset=2)
17847        s0=numarray.array([[[[-0.38877225820887462, -0.046865346339239444, 0.70324292436831892], [-0.62475974967659198, 0.40707326194201277, -0.33982211968722509]], [[0.99840132864776709, -0.71815861333499509, -0.9944258981363201], [-0.59222566286017431, 0.90611774958207492, -0.51798741567420103]], [[-0.7698853017615761, -0.43838184858452478, 0.63618499594256361], [0.56344947067266138, 0.9476531959526191, -0.40999809733775927]], [[0.16180623882821799, 0.26495916036166856, 0.12946713393457943], [-0.31567990142785285, -0.50539161073833938, -0.4454026196193337]], [[0.28748581058530531, 0.81406087206205768, -0.11238863877523686], [-0.10623460031761423, 0.19092160239523515, -0.76057401501120436]]], [[[-0.31516183298405598, 0.26525864558622336, 0.45173474279243542], [0.14084219780601703, -0.67591014703808572, 0.73120574845941455]], [[0.12874600437028105, 0.74469373309718256, -0.29328227245217708], [-0.39815920007741878, -0.11244821862939336, 0.1247949351276223]], [[0.91453844037574283, 0.42817273894237506, 0.91891133476994225], [-0.69399341722872099, 0.19822157745209368, 0.9819020505968139]], [[-0.88286373062973511, -0.4983467344703314, 0.23470934722940862], [-0.99060581070092013, 0.10377836720397826, 0.98466703671658418]], [[0.027635286963112682, -0.16870607028613338, 0.41758918807197531], [0.81354566826410801, -0.44653130296961718, -0.75871730396927584]]], [[[-0.43507530803394179, 0.59251147589059516, -0.24715130859281276], [-0.5086954385435829, 0.99530835927973649, -0.99705234347980709]], [[0.3258233422805592, 0.19598031161021812, -0.63534763371263758], [0.48848628481993051, -0.89338520432256407, -0.27590003410776287]], [[-0.93063540922278531, 0.39492215773819361, 0.46319307797043319], [-0.71243499437025726, 0.12420621922075803, 0.72195904976159775]], [[-0.075674316500414562, -0.58211033151791747, 0.77030338664199105], [0.75474721648629517, -0.94313810784168917, -0.040538030340477871]], [[-0.46644793732717016, -0.57627758387684769, -0.51555487613000328], [-0.47309694099372268, 0.92785128402896633, 0.33138586943106407]]], [[[0.51729048454564897, 0.97471079414114814, -0.25192254696553906], [-0.34953838040724228, -0.3524565618927602, -0.65147279352116971]], [[-0.051546350010283515, 0.5623722400219231, 0.21070894705007515], [-0.70961682638053802, -0.99400975846698536, -0.072087964585704656]], [[0.44664572235769273, -0.73012523645532967, -0.57103208224637325], [0.52124063719398905, -0.63454681573737082, -0.50810266533281045]], [[0.95873390557475036, -0.25926273145066259, 0.16850066162321498], [-0.3151716904323465, -0.92157817587826352, 0.7151562691110982]], [[0.80689757319146094, -0.42507749013552076, -0.32147786392489031], [-0.15860591701227467, 0.065717747622027201, 0.2258576517427846]]]])        s0=numarray.array([[[[-2.0, 0.0, -3.0], [0.0, 0.0, -7.0]], [[-4.0, 0.0, -6.0], [-7.0, 2.0, -1.0]], [[7.0, 3.0, -5.0], [-5.0, 3.0, 5.0]], [[0.0, -1.0, 5.0], [2.0, 4.0, 6.0]], [[5.0, 3.0, 5.0], [4.0, 7.0, 7.0]]], [[[1.0, -3.0, 0.0], [-3.0, -5.0, -2.0]], [[2.0, -6.0, -3.0], [3.0, -3.0, 0.0]], [[4.0, 4.0, 4.0], [-2.0, 0.0, -7.0]], [[3.0, -4.0, -2.0], [-4.0, 7.0, 0.0]], [[-7.0, -6.0, 5.0], [-4.0, 0.0, 7.0]]], [[[1.0, -1.0, -2.0], [-3.0, 0.0, 3.0]], [[3.0, 0.0, 4.0], [0.0, 5.0, 0.0]], [[-1.0, -6.0, 2.0], [-7.0, -7.0, -7.0]], [[-3.0, 3.0, -4.0], [5.0, 0.0, -6.0]], [[-6.0, -3.0, 4.0], [7.0, -3.0, -4.0]]], [[[0.0, -2.0, -3.0], [7.0, -6.0, -7.0]], [[6.0, -4.0, -7.0], [5.0, 2.0, -2.0]], [[0.0, -6.0, -2.0], [-7.0, -7.0, -6.0]], [[-6.0, 0.0, 0.0], [0.0, -7.0, -5.0]], [[1.0, 0.0, 0.0], [-3.0, 0.0, 5.0]]]])
17848        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17849        ref=Data(numarray.array([[1.6742020214903701, 0.11054212181084896, 1.5025964881024132, -0.39229509805864698, -0.90610122898190881], [-0.079900816956261167, -0.6103874205910822, 0.5313833753230347, 2.5083082342360048, -0.79719129173440639], [0.66260654954098108, -2.017293930579759, 1.6823372731402451, -0.2606005961901609, 1.6297539063935471], [-1.4522599901248068, -0.29082103989009295, -1.2094385000986883, -0.65895915014153983, -0.31976147237079411]]),self.functionspace)        ref=Data(numarray.array([[-32.0, -19.0, 48.0, 8.0, 23.0], [38.0, -19.0, 66.0, 23.0, 9.0], [16.0, 35.0, 68.0, -80.0, -61.0], [-55.0, -39.0, 51.0, -28.0, 28.0]]),self.functionspace)
17850        ref.setTaggedValue(1,numarray.array([[0.12693879438993982, -1.3203783319107216, 0.88867345130641695, -0.65885139561845285, -1.4001833505213899], [0.9310814607416491, -0.71454159938410633, 0.26966830808144238, 1.432639363366389, -0.04344898448749801], [-1.2588482015423379, -0.69754214524196179, 0.90958365426248922, 1.0446147289004191, 0.4549242975226474], [-1.6892144238120106, -0.48589151722954071, -0.35525330159163376, 0.19103346797464799, -0.24962678886196418]]))        ref.setTaggedValue(1,numarray.array([[14.0, 29.0, -4.0, -6.0, -29.0], [32.0, -13.0, 46.0, 53.0, 37.0], [6.0, 29.0, 94.0, -42.0, -17.0], [-37.0, -29.0, 75.0, 0.0, 2.0]]))
17851        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
17852        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
17853        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
17854     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17855     def test_generalTensorProduct_Symbol_rank2_taggedData_rank1_offset0(self):     def test_generalTensorProduct_Symbol_rank2_taggedData_rank1_offset0(self):
17856        arg0=Symbol(shape=(4, 5))        arg0=Symbol(shape=(4, 5))
17857        arg1=Data(numarray.array([0.041512455680745575, -0.49181972327797818]),self.functionspace)        arg1=Data(numarray.array([-5.0, -5.0]),self.functionspace)
17858        arg1.setTaggedValue(1,numarray.array([-0.032051080013596911, -0.88147919316825241]))        arg1.setTaggedValue(1,numarray.array([1.0, 0.0]))
17859        res=generalTensorProduct(arg0,arg1,0)        res=generalTensorProduct(arg0,arg1,axis_offset=0)
17860        s0=numarray.array([[0.99675886761085719, 0.86004350022644682, -0.52008358146487899, 0.58783718314393685, -0.27452865335287191], [-0.265034364238663, 0.42779030177850186, 0.10466019521277459, -0.16162022726520964, -0.38932038784819811], [-0.6162248855167467, 0.88684947232669953, -0.096505574095581581, -0.94919211954284055, 0.79254031063022379], [-0.43482032502233547, 0.48052961188924037, -0.49761875963164925, 0.47040768157734014, -0.66087566638036965]])        s0=numarray.array([[4.0, 6.0, -4.0, 4.0, 3.0], [3.0, -4.0, 0.0, 1.0, -7.0], [-4.0, 0.0, 0.0, 6.0, -4.0], [-5.0, 1.0, -4.0, 0.0, -4.0]])
17861        sub=res.substitute({arg0:s0})        sub=res.substitute({arg0:s0})
17862        ref=Data(numarray.array([[[0.041377908316085857, -0.49022567044324267], [0.035702517686663673, -0.42298635628839482], [-0.021589946625844219, 0.25578736311747663], [0.024402565012756998, -0.28910992074635722], [-0.011396358555405861, 0.13501860632388546]], [[-0.011002227299332078, 0.1303491276790141], [0.017758625943232832, -0.21039570784170555], [0.0043447017153084855, -0.051473948247765973], [-0.0067092525214590424, 0.079488015449699342], [-0.016161645346159003, 0.19147544541797593]], [[-0.025581008249386462, 0.30307155267185015], [0.036815299415454715, -0.43617006206893832], [-0.0040061833675877389, 0.047463344746471355], [-0.039403295795035126, 0.4668314055711974], [0.032900294520241499, -0.38978695626079951]], [[-0.018050459471577088, 0.21385321192812556], [0.019947964216837963, -0.23633394074624045], [-0.020657376705116425, 0.24473872065996849], [0.019527778033361608, -0.2313557757812027], [-0.027434571811098294, 0.32503168736034282]]]),self.functionspace)        ref=Data(numarray.array([[[-20.0, -20.0], [-30.0, -30.0], [20.0, 20.0], [-20.0, -20.0], [-15.0, -15.0]], [[-15.0, -15.0], [20.0, 20.0], [0.0, 0.0], [-5.0, -5.0], [35.0, 35.0]], [[20.0, 20.0], [0.0, 0.0], [0.0, 0.0], [-30.0, -30.0], [20.0, 20.0]], [[25.0, 25.0], [-5.0, -5.0], [20.0, 20.0], [0.0, 0.0], [20.0, 20.0]]]),self.functionspace)
17863        ref.setTaggedValue(1,numarray.array([[[-0.031947198220057836, -0.87862220240491928], [-0.027565323040931799, -0.75811045066920801], [0.016669240483288883, 0.45844285576971661], [-0.01884081659191374, -0.51816624591201565], [0.0087989398346379078, 0.24199129585905638]], [[0.0084946376145661751, 0.23362227755095738], [-0.013711141191343533, -0.37708825005691704], [-0.0033544722910033107, -0.092255784432988333], [0.005180102835892951, 0.14246486752940657], [0.01247813890184718, 0.3431778213643808]], [[0.019750673112066845, 0.54318941489550054], [-0.028424483397559246, -0.78173935732822952], [0.0030931078770955905, 0.085067655590012253], [0.030422632571743227, 0.83669310369628647], [-0.025401772910010254, -0.6986077935676458]], [[0.013936461028829089, 0.38328506927384554], [-0.015401493039564713, -0.42357685458158106], [0.015949218681220838, 0.43864058274549272], [-0.015077074241245946, -0.41465458361694196], [0.021181778862196406, 0.58254814918549935]]]))        ref.setTaggedValue(1,numarray.array([[[4.0, 0.0], [6.0, 0.0], [-4.0, 0.0], [4.0, 0.0], [3.0, 0.0]], [[3.0, 0.0], [-4.0, 0.0], [0.0, 0.0], [1.0, 0.0], [-7.0, 0.0]], [[-4.0, 0.0], [0.0, 0.0], [0.0, 0.0], [6.0, 0.0], [-4.0, 0.0]], [[-5.0, 0.0], [1.0, 0.0], [-4.0, 0.0], [0.0, 0.0], [-4.0, 0.0]]]))