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

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

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

revision 437 by gross, Fri Jan 20 00:16:58 2006 UTC revision 492 by gross, Fri Feb 3 02:07:24 2006 UTC
# Line 1509  class Test_util_unary_with_tagged_data(T Line 1509  class Test_util_unary_with_tagged_data(T
1509        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
1510        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 3),"wrong shape of result.")
1511        self.failUnless(Lsup(matrixmult(res,arg)-kronecker(3))<=self.RES_TOL,"wrong result")        self.failUnless(Lsup(matrixmult(res,arg)-kronecker(3))<=self.RES_TOL,"wrong result")
1512       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1513       def test_transpose_taggedData_rank0_offset0(self):
1514          arg=Data(0.00245568699765,self.functionspace)
1515          arg.setTaggedValue(1,0.962512736617)
1516          res=transpose(arg,0)
1517          ref=Data(0.00245568699765,self.functionspace)
1518          ref.setTaggedValue(1,0.962512736617)
1519          self.failUnless(isinstance(res,Data),"wrong type of result.")
1520          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
1521          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1522       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1523       def test_transpose_taggedData_rank1_offset0(self):
1524          arg=Data(numarray.array([-0.87758195100245429, -0.95788037127525083, -0.024038687137474479]),self.functionspace)
1525          arg.setTaggedValue(1,numarray.array([-0.78441288952160404, 0.45851237807201439, 0.39271640430391974]))
1526          res=transpose(arg,0)
1527          ref=Data(numarray.array([-0.87758195100245429, -0.95788037127525083, -0.024038687137474479]),self.functionspace)
1528          ref.setTaggedValue(1,numarray.array([-0.78441288952160404, 0.45851237807201439, 0.39271640430391974]))
1529          self.failUnless(isinstance(res,Data),"wrong type of result.")
1530          self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")
1531          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1532       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1533       def test_transpose_taggedData_rank1_offset1(self):
1534          arg=Data(numarray.array([0.73939623397127963, -0.2901711535835565, 0.63071822660466492]),self.functionspace)
1535          arg.setTaggedValue(1,numarray.array([-0.7534223120479544, 0.94374047089151136, -0.90626579949244124]))
1536          res=transpose(arg,1)
1537          ref=Data(numarray.array([0.73939623397127963, -0.2901711535835565, 0.63071822660466492]),self.functionspace)
1538          ref.setTaggedValue(1,numarray.array([-0.7534223120479544, 0.94374047089151136, -0.90626579949244124]))
1539          self.failUnless(isinstance(res,Data),"wrong type of result.")
1540          self.failUnlessEqual(res.getShape(),(3,),"wrong shape of result.")
1541          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1542       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1543       def test_transpose_taggedData_rank2_offset0(self):
1544          arg=Data(numarray.array([[0.70915610046599609, 0.043818073067544816, 0.74645618218174037, 0.62553214306715654, -0.11956300507817685], [-0.50062323179383994, 0.52299230955585774, 0.7142389787381016, 0.25677472851364724, 0.92079877696533008], [0.31008743924906246, 0.47726950332211615, -0.85939158371426205, -0.88392632785062486, 0.72101415960259896], [0.32800126345184677, 0.4509499590511461, 0.23949591894812983, 0.39405505944469121, 0.34926631942547481]]),self.functionspace)
1545          arg.setTaggedValue(1,numarray.array([[-0.44366593371475127, -0.067589366587520683, 0.020502575806330192, -0.16330702945536912, 0.9374254393163397], [-0.63988681195560693, -0.35795669025855981, -0.1290339882203877, -0.37450847109242602, -0.12872898889849527], [-0.79104289067735811, 0.64692009724393396, 0.67769213667122452, 0.53361516526763886, -0.45274178325858982], [-0.51206140966780844, -0.54499033468876146, -0.83771401393503098, 0.38259122836552772, -0.5364522636660829]]))
1546          res=transpose(arg,0)
1547          ref=Data(numarray.array([[0.70915610046599609, 0.043818073067544816, 0.74645618218174037, 0.62553214306715654, -0.11956300507817685], [-0.50062323179383994, 0.52299230955585774, 0.7142389787381016, 0.25677472851364724, 0.92079877696533008], [0.31008743924906246, 0.47726950332211615, -0.85939158371426205, -0.88392632785062486, 0.72101415960259896], [0.32800126345184677, 0.4509499590511461, 0.23949591894812983, 0.39405505944469121, 0.34926631942547481]]),self.functionspace)
1548          ref.setTaggedValue(1,numarray.array([[-0.44366593371475127, -0.067589366587520683, 0.020502575806330192, -0.16330702945536912, 0.9374254393163397], [-0.63988681195560693, -0.35795669025855981, -0.1290339882203877, -0.37450847109242602, -0.12872898889849527], [-0.79104289067735811, 0.64692009724393396, 0.67769213667122452, 0.53361516526763886, -0.45274178325858982], [-0.51206140966780844, -0.54499033468876146, -0.83771401393503098, 0.38259122836552772, -0.5364522636660829]]))
1549          self.failUnless(isinstance(res,Data),"wrong type of result.")
1550          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
1551          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1552       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1553       def test_transpose_taggedData_rank2_offset1(self):
1554          arg=Data(numarray.array([[-0.46830113109276916, 0.74128794045461999, 0.33285428673822692, -0.1444916409930288, -0.30300280085147979], [0.39289073163425714, 0.61302899906894481, -0.47533241822737238, 0.044516903477815672, 0.86467385181555056], [-0.18730740823889458, -0.88927473357523001, 0.18893489479808512, -0.075354852812760775, -0.33760747317832962], [-0.84319625410513832, 0.23777111488637481, 0.84432582876204498, -0.6196361628572773, -0.41773907171881053]]),self.functionspace)
1555          arg.setTaggedValue(1,numarray.array([[0.13273707566402293, -0.2863921187239622, 0.57298828638933963, -0.42990828455474528, 0.90152672750166141], [0.45635571138500608, -0.19547021292521016, 0.53140617579889105, -0.54256946591153898, 0.35431012906603931], [-0.26857845195104102, -0.51818450872103639, -0.15334950623005428, 0.33378473873759895, 0.30042323293203799], [0.061110820746190786, -0.46795109038331351, -0.41556280785700794, 0.13045724537885905, -0.54960086188564183]]))
1556          res=transpose(arg,1)
1557          ref=Data(numarray.array([[-0.46830113109276916, 0.39289073163425714, -0.18730740823889458, -0.84319625410513832], [0.74128794045461999, 0.61302899906894481, -0.88927473357523001, 0.23777111488637481], [0.33285428673822692, -0.47533241822737238, 0.18893489479808512, 0.84432582876204498], [-0.1444916409930288, 0.044516903477815672, -0.075354852812760775, -0.6196361628572773], [-0.30300280085147979, 0.86467385181555056, -0.33760747317832962, -0.41773907171881053]]),self.functionspace)
1558          ref.setTaggedValue(1,numarray.array([[0.13273707566402293, 0.45635571138500608, -0.26857845195104102, 0.061110820746190786], [-0.2863921187239622, -0.19547021292521016, -0.51818450872103639, -0.46795109038331351], [0.57298828638933963, 0.53140617579889105, -0.15334950623005428, -0.41556280785700794], [-0.42990828455474528, -0.54256946591153898, 0.33378473873759895, 0.13045724537885905], [0.90152672750166141, 0.35431012906603931, 0.30042323293203799, -0.54960086188564183]]))
1559          self.failUnless(isinstance(res,Data),"wrong type of result.")
1560          self.failUnlessEqual(res.getShape(),(5, 4),"wrong shape of result.")
1561          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1562       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1563       def test_transpose_taggedData_rank2_offset2(self):
1564          arg=Data(numarray.array([[-0.82240139433020243, -0.95786409988752097, 0.61408041791851109, 0.31562654676313717, 0.75615481530692175], [0.35221871732385979, -0.65220212852640258, -0.50732427046756245, 0.36961517515769793, 0.87770605802467072], [0.91546316386521998, -0.17352806778459984, 0.0028640348608768296, 0.80380753111963088, 0.84687418870632847], [0.87454903965632691, -0.85247090388120039, -0.96710843187079165, -0.65164137261910282, -0.633009521583765]]),self.functionspace)
1565          arg.setTaggedValue(1,numarray.array([[-0.084027811322535673, 0.36316097327855834, 0.76276282502956372, 0.825946226062648, 0.57980486410085952], [-0.73779586982099499, 0.37254441436551367, 0.99795370620464574, 0.56905875549575846, 0.60508644368687392], [0.64896635371895339, 0.87044045233501643, 0.87825962555539472, 0.49125589571124517, 0.73521629566881597], [-0.11021763134355433, -0.75915969386068149, -0.81314829289717072, 0.22800937731296655, 0.64674076289842564]]))
1566          res=transpose(arg,2)
1567          ref=Data(numarray.array([[-0.82240139433020243, -0.95786409988752097, 0.61408041791851109, 0.31562654676313717, 0.75615481530692175], [0.35221871732385979, -0.65220212852640258, -0.50732427046756245, 0.36961517515769793, 0.87770605802467072], [0.91546316386521998, -0.17352806778459984, 0.0028640348608768296, 0.80380753111963088, 0.84687418870632847], [0.87454903965632691, -0.85247090388120039, -0.96710843187079165, -0.65164137261910282, -0.633009521583765]]),self.functionspace)
1568          ref.setTaggedValue(1,numarray.array([[-0.084027811322535673, 0.36316097327855834, 0.76276282502956372, 0.825946226062648, 0.57980486410085952], [-0.73779586982099499, 0.37254441436551367, 0.99795370620464574, 0.56905875549575846, 0.60508644368687392], [0.64896635371895339, 0.87044045233501643, 0.87825962555539472, 0.49125589571124517, 0.73521629566881597], [-0.11021763134355433, -0.75915969386068149, -0.81314829289717072, 0.22800937731296655, 0.64674076289842564]]))
1569          self.failUnless(isinstance(res,Data),"wrong type of result.")
1570          self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")
1571          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1572       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1573       def test_transpose_taggedData_rank3_offset0(self):
1574          arg=Data(numarray.array([[[-0.47965404874130169, 0.82476560063874316], [-0.29508213416398998, -0.81393703720452937]], [[-0.39452570551744826, 0.2710813598813071], [0.70191301420221497, 0.92131697529999679]], [[0.91092486057477284, -0.17742675176658906], [0.93743803341741172, -0.24810658731032409]], [[0.8292404484536704, -0.67966081758338071], [0.1097041521502371, -0.50250503549174441]], [[-0.95382582593020238, -0.15954466864076822], [-0.82226475873157745, 0.032324703810909572]], [[-0.80576486966156158, -0.70193160021310597], [0.24194008612087514, -0.45186291580263571]]]),self.functionspace)
1575          arg.setTaggedValue(1,numarray.array([[[-0.95232031657104654, -0.51171389143739954], [0.5021173784011006, -0.13346048906733543]], [[-0.34000803534780566, 0.27531991852016002], [0.40500892817765788, -0.86936047318254461]], [[0.31637715793619337, -0.44836632199340198], [-0.18777872723614197, -0.53942822518925126]], [[0.44283821537880441, -0.49096132745134247], [0.61879880479923943, -0.98913356226678784]], [[-0.65325712666802938, 0.23825410802658231], [0.023290776898226895, -0.72183082104110285]], [[0.94622363774828044, -0.67849303457969845], [-0.11481306112448086, 0.36914068273649492]]]))
1576          res=transpose(arg,0)
1577          ref=Data(numarray.array([[[-0.47965404874130169, 0.82476560063874316], [-0.29508213416398998, -0.81393703720452937]], [[-0.39452570551744826, 0.2710813598813071], [0.70191301420221497, 0.92131697529999679]], [[0.91092486057477284, -0.17742675176658906], [0.93743803341741172, -0.24810658731032409]], [[0.8292404484536704, -0.67966081758338071], [0.1097041521502371, -0.50250503549174441]], [[-0.95382582593020238, -0.15954466864076822], [-0.82226475873157745, 0.032324703810909572]], [[-0.80576486966156158, -0.70193160021310597], [0.24194008612087514, -0.45186291580263571]]]),self.functionspace)
1578          ref.setTaggedValue(1,numarray.array([[[-0.95232031657104654, -0.51171389143739954], [0.5021173784011006, -0.13346048906733543]], [[-0.34000803534780566, 0.27531991852016002], [0.40500892817765788, -0.86936047318254461]], [[0.31637715793619337, -0.44836632199340198], [-0.18777872723614197, -0.53942822518925126]], [[0.44283821537880441, -0.49096132745134247], [0.61879880479923943, -0.98913356226678784]], [[-0.65325712666802938, 0.23825410802658231], [0.023290776898226895, -0.72183082104110285]], [[0.94622363774828044, -0.67849303457969845], [-0.11481306112448086, 0.36914068273649492]]]))
1579          self.failUnless(isinstance(res,Data),"wrong type of result.")
1580          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1581          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1582       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1583       def test_transpose_taggedData_rank3_offset1(self):
1584          arg=Data(numarray.array([[[0.81053286814697678, 0.050191176759508238], [0.42342445008027152, 0.8922440392055786]], [[-0.72331693394362895, 0.27069578317300502], [-0.45140780490291643, -0.67001507946193128]], [[0.18728261143033365, 0.42505803814105914], [-0.65870737965001647, 0.88986754283565572]], [[0.9052128319800945, 0.71380866302456791], [-0.62578348903525249, 0.57438376912125078]], [[-0.70322298189245513, 0.5783032228742897], [0.98991210384307404, 0.68455971318831255]], [[-0.23035102351615544, 0.61590799799635754], [0.56157523223742367, 0.51936097775959378]]]),self.functionspace)
1585          arg.setTaggedValue(1,numarray.array([[[0.0072995967195328415, -0.73856064839597413], [-0.98357397180574213, -0.32300059049394991]], [[0.5654382468199548, -0.44496369949396564], [-0.13156033989456284, -0.31613628634398361]], [[-0.49032667902784888, 0.26471150640245344], [-0.83322961811366336, 0.6506398139790226]], [[0.71902088339284154, 0.2652153812916358], [0.68404854552436145, -0.36259160033289217]], [[-0.36017629611125468, -0.91101111771464138], [-0.056699622597530253, 0.8304491656603219]], [[0.049349882305021131, -0.63009550024762251], [-0.25318734852225422, -0.24566036979352535]]]))
1586          res=transpose(arg,1)
1587          ref=Data(numarray.array([[[0.81053286814697678, -0.72331693394362895, 0.18728261143033365, 0.9052128319800945, -0.70322298189245513, -0.23035102351615544], [0.050191176759508238, 0.27069578317300502, 0.42505803814105914, 0.71380866302456791, 0.5783032228742897, 0.61590799799635754]], [[0.42342445008027152, -0.45140780490291643, -0.65870737965001647, -0.62578348903525249, 0.98991210384307404, 0.56157523223742367], [0.8922440392055786, -0.67001507946193128, 0.88986754283565572, 0.57438376912125078, 0.68455971318831255, 0.51936097775959378]]]),self.functionspace)
1588          ref.setTaggedValue(1,numarray.array([[[0.0072995967195328415, 0.5654382468199548, -0.49032667902784888, 0.71902088339284154, -0.36017629611125468, 0.049349882305021131], [-0.73856064839597413, -0.44496369949396564, 0.26471150640245344, 0.2652153812916358, -0.91101111771464138, -0.63009550024762251]], [[-0.98357397180574213, -0.13156033989456284, -0.83322961811366336, 0.68404854552436145, -0.056699622597530253, -0.25318734852225422], [-0.32300059049394991, -0.31613628634398361, 0.6506398139790226, -0.36259160033289217, 0.8304491656603219, -0.24566036979352535]]]))
1589          self.failUnless(isinstance(res,Data),"wrong type of result.")
1590          self.failUnlessEqual(res.getShape(),(2, 2, 6),"wrong shape of result.")
1591          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1592       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1593       def test_transpose_taggedData_rank3_offset2(self):
1594          arg=Data(numarray.array([[[0.071980471419191394, -0.2247984465124786], [0.70285196077473455, 0.60212528599441262]], [[-0.15948746676349179, 0.86582881633576148], [-0.0042126106502915484, 0.97527165425181783]], [[-0.36318893716723566, 0.58102882834553227], [-0.91295983992273388, -0.43035213057683053]], [[-0.65959473388630352, -0.3348451128896015], [0.10603141160659191, -0.5891771679934068]], [[-0.053125659752484289, 0.65666335498005002], [0.159608828733937, -0.35246905797728778]], [[-0.52591315810399686, -0.60179097453397157], [0.75953135902640012, -0.56546768249860802]]]),self.functionspace)
1595          arg.setTaggedValue(1,numarray.array([[[-0.78742827671337334, -0.5908111791548194], [0.062723806755969225, 0.40701197477660345]], [[0.44645526923804812, -0.95231455634087414], [-0.011463141046005543, -0.092111902628053688]], [[0.38253300563029202, -0.54588147161824052], [0.77437083991735012, 0.13281940503889933]], [[0.6642469924656198, 0.94467286731281219], [0.15239615935810624, -0.66595174711721361]], [[0.63068800469946029, 0.14927244425193487], [-0.31309043488219679, 0.70570015744004899]], [[-0.80539569347758766, -0.61058678284165846], [-0.4842951165762488, -0.4808012098357406]]]))
1596          res=transpose(arg,2)
1597          ref=Data(numarray.array([[[0.071980471419191394, 0.70285196077473455], [-0.15948746676349179, -0.0042126106502915484], [-0.36318893716723566, -0.91295983992273388], [-0.65959473388630352, 0.10603141160659191], [-0.053125659752484289, 0.159608828733937], [-0.52591315810399686, 0.75953135902640012]], [[-0.2247984465124786, 0.60212528599441262], [0.86582881633576148, 0.97527165425181783], [0.58102882834553227, -0.43035213057683053], [-0.3348451128896015, -0.5891771679934068], [0.65666335498005002, -0.35246905797728778], [-0.60179097453397157, -0.56546768249860802]]]),self.functionspace)
1598          ref.setTaggedValue(1,numarray.array([[[-0.78742827671337334, 0.062723806755969225], [0.44645526923804812, -0.011463141046005543], [0.38253300563029202, 0.77437083991735012], [0.6642469924656198, 0.15239615935810624], [0.63068800469946029, -0.31309043488219679], [-0.80539569347758766, -0.4842951165762488]], [[-0.5908111791548194, 0.40701197477660345], [-0.95231455634087414, -0.092111902628053688], [-0.54588147161824052, 0.13281940503889933], [0.94467286731281219, -0.66595174711721361], [0.14927244425193487, 0.70570015744004899], [-0.61058678284165846, -0.4808012098357406]]]))
1599          self.failUnless(isinstance(res,Data),"wrong type of result.")
1600          self.failUnlessEqual(res.getShape(),(2, 6, 2),"wrong shape of result.")
1601          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1602       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1603       def test_transpose_taggedData_rank3_offset3(self):
1604          arg=Data(numarray.array([[[0.36379173135017173, -0.87835744636415991], [-0.16357744767281646, 0.75389969112384492]], [[-0.31029105911877997, 0.47789223338058595], [0.26647501093422088, -0.63610463787584814]], [[0.16124757232825493, 0.56487671351927959], [-0.90628166527665321, 0.28171855697125259]], [[0.36735938684277203, -0.21455006677371879], [0.72495888110218565, -0.23391493309257871]], [[0.055102471480766413, -0.4334831605896281], [-0.64444553189670728, -0.16352412040926279]], [[-0.39002564026590081, -0.90492379162244041], [-0.47951836634091549, 0.62205806165340993]]]),self.functionspace)
1605          arg.setTaggedValue(1,numarray.array([[[-0.0053753693908147326, 0.45988330601714922], [0.90177126228712412, 0.70333229850104573]], [[-0.54587016104270858, -0.15478549428886024], [0.46038764626650019, 0.2613958193885233]], [[-0.87820312698350156, 0.69979177639456225], [-0.32195153646902619, -0.68579391347357377]], [[0.95350320262703114, 0.029112213996608682], [-0.89469188023314961, 0.46195341009978819]], [[-0.61911945279335012, 0.2333995656607073], [0.66580866269700789, -0.84951808382855343]], [[0.60759615563485903, 0.3752600315746033], [0.92082378968430101, -0.46482596801071563]]]))
1606          res=transpose(arg,3)
1607          ref=Data(numarray.array([[[0.36379173135017173, -0.87835744636415991], [-0.16357744767281646, 0.75389969112384492]], [[-0.31029105911877997, 0.47789223338058595], [0.26647501093422088, -0.63610463787584814]], [[0.16124757232825493, 0.56487671351927959], [-0.90628166527665321, 0.28171855697125259]], [[0.36735938684277203, -0.21455006677371879], [0.72495888110218565, -0.23391493309257871]], [[0.055102471480766413, -0.4334831605896281], [-0.64444553189670728, -0.16352412040926279]], [[-0.39002564026590081, -0.90492379162244041], [-0.47951836634091549, 0.62205806165340993]]]),self.functionspace)
1608          ref.setTaggedValue(1,numarray.array([[[-0.0053753693908147326, 0.45988330601714922], [0.90177126228712412, 0.70333229850104573]], [[-0.54587016104270858, -0.15478549428886024], [0.46038764626650019, 0.2613958193885233]], [[-0.87820312698350156, 0.69979177639456225], [-0.32195153646902619, -0.68579391347357377]], [[0.95350320262703114, 0.029112213996608682], [-0.89469188023314961, 0.46195341009978819]], [[-0.61911945279335012, 0.2333995656607073], [0.66580866269700789, -0.84951808382855343]], [[0.60759615563485903, 0.3752600315746033], [0.92082378968430101, -0.46482596801071563]]]))
1609          self.failUnless(isinstance(res,Data),"wrong type of result.")
1610          self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")
1611          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1612       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1613       def test_transpose_taggedData_rank4_offset0(self):
1614          arg=Data(numarray.array([[[[-0.066213835855639669, 0.29841553845687274, -0.16902289382090996, -0.075921189118681287], [-0.97827979006275156, 0.61391668407537314, -0.87268519578958759, 0.8791187242704499], [-0.95000218353089805, 0.66607817390917701, 0.065593449268812831, -0.25228614471403676]], [[0.10795154242676341, -0.21130515270463235, -0.86146510306021273, 0.80683480189625145], [-0.1508100468879312, -0.13988876977255771, -0.35920652457315549, -0.89782640958091164], [0.86164286360239895, -0.49078217304435556, 0.22181028544575332, 0.4467451953936703]]], [[[-0.65512980682884092, 0.64749503489786009, -0.4374051698263306, 0.74914501221532559], [0.41346548918604009, 0.45921345197680563, 0.91487198288959437, 0.025763758687823213], [0.81890254270128948, -0.46948008256591378, 0.040118843783117031, -0.81452493774882884]], [[0.36394911322590273, -0.53668320845100181, 0.066543468903012659, 0.31810105265098865], [0.81474465043548316, -0.69466567492526288, -0.59446787744052165, 0.61936412263225926], [-0.14688223058919392, 0.8461640067975098, 0.1993657048182409, -0.23151493903225973]]], [[[0.31073907082107, -0.81398757347466844, 0.5611533909190678, -0.55850930097590523], [0.054537230481781274, 0.63229750473085922, 0.087401829377588669, 0.5439226621604869], [0.81295744598767583, -0.70942223033941199, 0.69387553544619585, -0.28630849607704101]], [[-0.80852962820433527, 0.77372821651084256, 0.32165245811635579, -0.57297411898527417], [-0.81162784807188992, 0.95807056808486557, -0.76413232793557517, 0.21536566377881194], [0.21796657286961985, -0.12048470246566056, -0.18867098296080287, 0.012122683613027263]]]]),self.functionspace)
1615          arg.setTaggedValue(1,numarray.array([[[[0.12478235846511443, -0.23502354792078362, -0.93397804132870776, -0.031100914638728216], [0.79367218920384008, 0.88436997817419249, 0.37879610078280601, -0.36622663948089151], [-0.43371789711061393, 0.52509306507010156, 0.56502273243195966, 0.19318878623675473]], [[0.3716014371332228, -0.65610035446812498, 0.28314182870109428, 0.8876915303848254], [-0.71386010046965565, 0.2929533875337933, -0.58944278050326027, -0.48359593506249432], [-0.94527952356792611, 0.62906848531226878, -0.62021840237696813, -0.082236398033888047]]], [[[-0.38354605619336191, -0.3576238375311287, -0.57354262081251028, 0.35231033398526357], [-0.13738959218834812, -0.84117118730215856, 0.13613978281640171, 0.01528952676619233], [-0.98769588307869571, 0.8178005656723828, 0.84887180836789566, 0.48793301235411235]], [[0.63110686463455656, 0.16069292020707437, -0.28131006402756764, 0.68420535044501474], [0.89249823707296505, -0.55007351245138003, 0.39716145715604978, -0.71710895307139944], [-0.6237462395182829, -0.31058786983659159, -0.32071822689683982, 0.77063207204985651]]], [[[-0.63005193637456225, -0.17195943783565015, 0.92392704274637616, 0.55378021817046963], [-0.59348513048033769, 0.59869352314442748, 0.25044807429473659, 0.86174289107182478], [0.34163664812612793, 0.25102340703822357, -0.52568574952292435, 0.75324930805700152]], [[0.81319108984002719, 0.071199739745021917, -0.25442848311299349, -0.72629097877664317], [-0.52724150718081697, -0.38705265653226495, -0.32225015238745169, -0.70342476565192213], [0.23709198628486172, -0.3755960225689905, -0.81047080672668259, 0.30606251468774404]]]]))
1616          res=transpose(arg,0)
1617          ref=Data(numarray.array([[[[-0.066213835855639669, 0.29841553845687274, -0.16902289382090996, -0.075921189118681287], [-0.97827979006275156, 0.61391668407537314, -0.87268519578958759, 0.8791187242704499], [-0.95000218353089805, 0.66607817390917701, 0.065593449268812831, -0.25228614471403676]], [[0.10795154242676341, -0.21130515270463235, -0.86146510306021273, 0.80683480189625145], [-0.1508100468879312, -0.13988876977255771, -0.35920652457315549, -0.89782640958091164], [0.86164286360239895, -0.49078217304435556, 0.22181028544575332, 0.4467451953936703]]], [[[-0.65512980682884092, 0.64749503489786009, -0.4374051698263306, 0.74914501221532559], [0.41346548918604009, 0.45921345197680563, 0.91487198288959437, 0.025763758687823213], [0.81890254270128948, -0.46948008256591378, 0.040118843783117031, -0.81452493774882884]], [[0.36394911322590273, -0.53668320845100181, 0.066543468903012659, 0.31810105265098865], [0.81474465043548316, -0.69466567492526288, -0.59446787744052165, 0.61936412263225926], [-0.14688223058919392, 0.8461640067975098, 0.1993657048182409, -0.23151493903225973]]], [[[0.31073907082107, -0.81398757347466844, 0.5611533909190678, -0.55850930097590523], [0.054537230481781274, 0.63229750473085922, 0.087401829377588669, 0.5439226621604869], [0.81295744598767583, -0.70942223033941199, 0.69387553544619585, -0.28630849607704101]], [[-0.80852962820433527, 0.77372821651084256, 0.32165245811635579, -0.57297411898527417], [-0.81162784807188992, 0.95807056808486557, -0.76413232793557517, 0.21536566377881194], [0.21796657286961985, -0.12048470246566056, -0.18867098296080287, 0.012122683613027263]]]]),self.functionspace)
1618          ref.setTaggedValue(1,numarray.array([[[[0.12478235846511443, -0.23502354792078362, -0.93397804132870776, -0.031100914638728216], [0.79367218920384008, 0.88436997817419249, 0.37879610078280601, -0.36622663948089151], [-0.43371789711061393, 0.52509306507010156, 0.56502273243195966, 0.19318878623675473]], [[0.3716014371332228, -0.65610035446812498, 0.28314182870109428, 0.8876915303848254], [-0.71386010046965565, 0.2929533875337933, -0.58944278050326027, -0.48359593506249432], [-0.94527952356792611, 0.62906848531226878, -0.62021840237696813, -0.082236398033888047]]], [[[-0.38354605619336191, -0.3576238375311287, -0.57354262081251028, 0.35231033398526357], [-0.13738959218834812, -0.84117118730215856, 0.13613978281640171, 0.01528952676619233], [-0.98769588307869571, 0.8178005656723828, 0.84887180836789566, 0.48793301235411235]], [[0.63110686463455656, 0.16069292020707437, -0.28131006402756764, 0.68420535044501474], [0.89249823707296505, -0.55007351245138003, 0.39716145715604978, -0.71710895307139944], [-0.6237462395182829, -0.31058786983659159, -0.32071822689683982, 0.77063207204985651]]], [[[-0.63005193637456225, -0.17195943783565015, 0.92392704274637616, 0.55378021817046963], [-0.59348513048033769, 0.59869352314442748, 0.25044807429473659, 0.86174289107182478], [0.34163664812612793, 0.25102340703822357, -0.52568574952292435, 0.75324930805700152]], [[0.81319108984002719, 0.071199739745021917, -0.25442848311299349, -0.72629097877664317], [-0.52724150718081697, -0.38705265653226495, -0.32225015238745169, -0.70342476565192213], [0.23709198628486172, -0.3755960225689905, -0.81047080672668259, 0.30606251468774404]]]]))
1619          self.failUnless(isinstance(res,Data),"wrong type of result.")
1620          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1621          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1622       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1623       def test_transpose_taggedData_rank4_offset1(self):
1624          arg=Data(numarray.array([[[[-0.67344037422696923, 0.18224348080436248, -0.99389141739488518, -0.83387799396061313], [-0.65649617842846175, -0.054540835434679691, 0.04711766345003876, -0.97475983164503055], [-0.095873874549351257, -0.39117841568868439, 0.18230399121602137, 0.20298722408390057]], [[0.96210306987110839, 0.44592831692833634, 0.080230921516656784, 0.92184388665129835], [-0.047192520840041219, -0.24870454550355503, -0.91306081558739005, -0.9094015911611395], [0.48196540137975541, -0.42509714806555965, 0.34448484600041973, -0.1461454651979619]]], [[[-0.050663916239619855, 0.94055399806222417, 0.40506194398115669, 0.41229711229319399], [-0.63990233828344834, 0.74839685116769483, -0.80661000302118224, -0.78677967431668905], [-0.40051255025970978, -0.58630640749670326, -0.1981831060318433, 0.11590832719828925]], [[0.1203664961391071, -0.0059304347663953205, -0.73217383813755332, 0.63100367257822509], [0.93537572319117812, -0.78152099272506903, -0.65328214438986976, -0.34825752000047783], [-0.47471849867808569, -0.80559440166954888, -0.45056513246832086, 0.67317204842887501]]], [[[-0.59519232113693432, 0.79823979912440435, 0.99856543785549934, -0.86281383562776304], [-0.034890258453340595, -0.42775168494808069, -0.10028498582661705, 0.31628104147256475], [0.22749696533158481, -0.2146918108247875, -0.51221231822304891, 0.75773171154924812]], [[0.72184529111282214, -0.64490490963671454, 0.95481889208887338, -0.054747819245590357], [-0.71012661632545848, -0.95694368451032052, -0.1888267481548902, 0.8261271903752383], [0.50616063810575973, -0.023010141007835827, 0.14732950902706965, 0.33795816308683979]]]]),self.functionspace)
1625          arg.setTaggedValue(1,numarray.array([[[[-0.75149044773857865, 0.35443409583303653, -0.71341498686119875, -0.59163737866125943], [-0.4249945605352643, -0.25971428078552705, -0.26705486422056746, -0.99104576645219367], [-0.68589537479898821, -0.82212608133655074, 0.67506822670204802, -0.40040872735310695]], [[0.44132659608457936, 0.4935503743643348, 0.65177404867193678, 0.4706260209936135], [0.68166836648630658, -0.17736058534918642, 0.91661717420758149, 0.11249920364074062], [0.2978444887620566, 0.2615462160011619, 0.19793022534159865, 0.21269092837831072]]], [[[0.70316372474777555, 0.88647603046601375, 0.33564722618849108, -0.63141505796309061], [0.25726802491287692, -0.58138854418958874, -0.079923857735635817, -0.29887732332821804], [0.89277298564150143, 0.22488119405794293, 0.61590963890249584, -0.5126405944203547]], [[0.47670028033270762, -0.97091855451015463, 0.76979977853149251, 0.91920534052844682], [-0.5957260341673436, 0.10085750714006769, 0.17575825248773369, 0.7906069707701453], [-0.0134583056613784, -0.93370912364311609, -0.99653619110996661, -0.51562461803792958]]], [[[-0.16702945669406355, -0.040548169689767155, 0.54698639855560227, -0.62922528074269546], [-0.87679735642497869, 0.58046417075004619, -0.5864122037266819, -0.81157045552283003], [0.56314437440535792, -0.55660678977097278, -0.42042096127275896, -0.36240964551056298]], [[0.62030860514521469, 0.15317212371138833, 0.25227503099457049, 0.06918480209623934], [0.2887476834208289, 0.95946213915765255, 0.41019183878956378, 0.043473024980329456], [-0.093269751522815136, -0.60140289564421612, -0.17736891155882906, -0.63781709374496565]]]]))
1626          res=transpose(arg,1)
1627          ref=Data(numarray.array([[[[-0.67344037422696923, -0.050663916239619855, -0.59519232113693432], [0.18224348080436248, 0.94055399806222417, 0.79823979912440435], [-0.99389141739488518, 0.40506194398115669, 0.99856543785549934], [-0.83387799396061313, 0.41229711229319399, -0.86281383562776304]], [[-0.65649617842846175, -0.63990233828344834, -0.034890258453340595], [-0.054540835434679691, 0.74839685116769483, -0.42775168494808069], [0.04711766345003876, -0.80661000302118224, -0.10028498582661705], [-0.97475983164503055, -0.78677967431668905, 0.31628104147256475]], [[-0.095873874549351257, -0.40051255025970978, 0.22749696533158481], [-0.39117841568868439, -0.58630640749670326, -0.2146918108247875], [0.18230399121602137, -0.1981831060318433, -0.51221231822304891], [0.20298722408390057, 0.11590832719828925, 0.75773171154924812]]], [[[0.96210306987110839, 0.1203664961391071, 0.72184529111282214], [0.44592831692833634, -0.0059304347663953205, -0.64490490963671454], [0.080230921516656784, -0.73217383813755332, 0.95481889208887338], [0.92184388665129835, 0.63100367257822509, -0.054747819245590357]], [[-0.047192520840041219, 0.93537572319117812, -0.71012661632545848], [-0.24870454550355503, -0.78152099272506903, -0.95694368451032052], [-0.91306081558739005, -0.65328214438986976, -0.1888267481548902], [-0.9094015911611395, -0.34825752000047783, 0.8261271903752383]], [[0.48196540137975541, -0.47471849867808569, 0.50616063810575973], [-0.42509714806555965, -0.80559440166954888, -0.023010141007835827], [0.34448484600041973, -0.45056513246832086, 0.14732950902706965], [-0.1461454651979619, 0.67317204842887501, 0.33795816308683979]]]]),self.functionspace)
1628          ref.setTaggedValue(1,numarray.array([[[[-0.75149044773857865, 0.70316372474777555, -0.16702945669406355], [0.35443409583303653, 0.88647603046601375, -0.040548169689767155], [-0.71341498686119875, 0.33564722618849108, 0.54698639855560227], [-0.59163737866125943, -0.63141505796309061, -0.62922528074269546]], [[-0.4249945605352643, 0.25726802491287692, -0.87679735642497869], [-0.25971428078552705, -0.58138854418958874, 0.58046417075004619], [-0.26705486422056746, -0.079923857735635817, -0.5864122037266819], [-0.99104576645219367, -0.29887732332821804, -0.81157045552283003]], [[-0.68589537479898821, 0.89277298564150143, 0.56314437440535792], [-0.82212608133655074, 0.22488119405794293, -0.55660678977097278], [0.67506822670204802, 0.61590963890249584, -0.42042096127275896], [-0.40040872735310695, -0.5126405944203547, -0.36240964551056298]]], [[[0.44132659608457936, 0.47670028033270762, 0.62030860514521469], [0.4935503743643348, -0.97091855451015463, 0.15317212371138833], [0.65177404867193678, 0.76979977853149251, 0.25227503099457049], [0.4706260209936135, 0.91920534052844682, 0.06918480209623934]], [[0.68166836648630658, -0.5957260341673436, 0.2887476834208289], [-0.17736058534918642, 0.10085750714006769, 0.95946213915765255], [0.91661717420758149, 0.17575825248773369, 0.41019183878956378], [0.11249920364074062, 0.7906069707701453, 0.043473024980329456]], [[0.2978444887620566, -0.0134583056613784, -0.093269751522815136], [0.2615462160011619, -0.93370912364311609, -0.60140289564421612], [0.19793022534159865, -0.99653619110996661, -0.17736891155882906], [0.21269092837831072, -0.51562461803792958, -0.63781709374496565]]]]))
1629          self.failUnless(isinstance(res,Data),"wrong type of result.")
1630          self.failUnlessEqual(res.getShape(),(2, 3, 4, 3),"wrong shape of result.")
1631          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1632       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1633       def test_transpose_taggedData_rank4_offset2(self):
1634          arg=Data(numarray.array([[[[-0.91650913229581743, -0.58729954761866598, 0.54100624389532403, 0.63969518130102543], [-0.18897006887842416, 0.91757319999246678, 0.14019104877829558, 0.91418871459379081], [0.29649823849212953, -0.41367491626902253, -0.45433072523643547, -0.91332514236757145]], [[-0.34549051141820142, 0.074502980191387014, -0.73264516866517426, -0.68581151160670051], [-0.6218632013716594, -0.90813764509763262, -0.97698000457662992, -0.42208164388052638], [0.50176347519998021, -0.52985145605782646, 0.80906656150863943, 0.66060193093169794]]], [[[-0.39138517117258775, 0.41887190457796675, -0.74819036690048324, -0.26744098619244827], [0.72026290947688287, -0.77558392185230418, -0.23270347061827712, -0.066636965237370838], [0.91015424519361354, 0.74208453451124945, -0.71874858986330725, -0.029910096890902071]], [[-0.88170449352279889, 0.84790265373069507, -0.85779296761749757, 0.30997576358970091], [-0.78416821993365593, -0.65873307826078498, 0.05284785450624252, 0.95521281527103463], [0.82376719946655408, -0.27417557837698636, 0.58330211909056806, 0.18452380995472395]]], [[[0.037453388546981881, -0.28164535589881678, 0.63031648512983351, 0.86443061103354712], [0.39405528691503955, 0.23767513534417417, -0.33732997933601139, 0.30400860899992432], [0.25023289623395528, 0.47689793846198647, -0.60390189120036597, -0.45027542941762344]], [[-0.60618459619613341, -0.31953725314352122, -0.78201948295443957, 0.66799897496942262], [0.06394378422788205, -0.74914896970775158, -0.11507456770982816, 0.99496117265849282], [-0.43710535233052394, 0.41443874069832476, -0.33649400711475019, -0.42611235903846634]]]]),self.functionspace)
1635          arg.setTaggedValue(1,numarray.array([[[[-0.4352396687206852, 0.69971738524886229, 0.12820519360965066, 0.85368106798373478], [0.070429086144990993, 0.20856447904774567, 0.27537630019819237, 0.75632498522306602], [0.56500122850628354, 0.75590265015672053, -0.1161155711224795, 0.936460735669564]], [[0.71790975565175574, 0.31442722316701333, 0.17133151583039008, 0.073502826654757936], [-0.84914670000122405, 0.44748205147620901, 0.31043054343605769, -0.15742659342518373], [0.86221036431877773, 0.33430110262334489, 0.061460790213694549, 0.88329713851895275]]], [[[-0.026335563976856324, -0.3050179189173694, 0.034786927267309364, -0.80517253266306654], [0.53751365530760808, 0.23762583104200252, -0.43892419142534678, -0.32714628277483726], [-0.55217449087178383, -0.32223101592083148, 0.75895642071407199, -0.64670752330991776]], [[0.73215297571506333, -0.82110989565229864, 0.61149974382034, -0.39618324499316659], [-0.47360321438976105, -0.94819175396076094, 0.70197559420805633, -0.44324025020052993], [-0.8996390666809333, 0.72854621435050992, -0.050415318743384008, -0.52116339611273954]]], [[[0.43847477543909408, 0.89538070538642667, -0.30233858278548209, 0.34064095798429972], [-0.065442292198451435, -0.51019910866215024, -0.95818371885969, -0.44380533793397059], [0.64861560494257464, 0.23533348971688617, 0.8226070796722551, 0.94265537264169708]], [[0.52390987553753021, -0.79232575226907809, -0.15095804152332137, 0.70007880227753483], [-0.81287589416276251, -0.49495835482354122, -0.72093774482005557, 0.49205650489551256], [0.89768903742668971, -0.26816557059751611, -0.14226738736930322, 0.76825847592572138]]]]))
1636          res=transpose(arg,2)
1637          ref=Data(numarray.array([[[[-0.91650913229581743, -0.34549051141820142], [-0.39138517117258775, -0.88170449352279889], [0.037453388546981881, -0.60618459619613341]], [[-0.58729954761866598, 0.074502980191387014], [0.41887190457796675, 0.84790265373069507], [-0.28164535589881678, -0.31953725314352122]], [[0.54100624389532403, -0.73264516866517426], [-0.74819036690048324, -0.85779296761749757], [0.63031648512983351, -0.78201948295443957]], [[0.63969518130102543, -0.68581151160670051], [-0.26744098619244827, 0.30997576358970091], [0.86443061103354712, 0.66799897496942262]]], [[[-0.18897006887842416, -0.6218632013716594], [0.72026290947688287, -0.78416821993365593], [0.39405528691503955, 0.06394378422788205]], [[0.91757319999246678, -0.90813764509763262], [-0.77558392185230418, -0.65873307826078498], [0.23767513534417417, -0.74914896970775158]], [[0.14019104877829558, -0.97698000457662992], [-0.23270347061827712, 0.05284785450624252], [-0.33732997933601139, -0.11507456770982816]], [[0.91418871459379081, -0.42208164388052638], [-0.066636965237370838, 0.95521281527103463], [0.30400860899992432, 0.99496117265849282]]], [[[0.29649823849212953, 0.50176347519998021], [0.91015424519361354, 0.82376719946655408], [0.25023289623395528, -0.43710535233052394]], [[-0.41367491626902253, -0.52985145605782646], [0.74208453451124945, -0.27417557837698636], [0.47689793846198647, 0.41443874069832476]], [[-0.45433072523643547, 0.80906656150863943], [-0.71874858986330725, 0.58330211909056806], [-0.60390189120036597, -0.33649400711475019]], [[-0.91332514236757145, 0.66060193093169794], [-0.029910096890902071, 0.18452380995472395], [-0.45027542941762344, -0.42611235903846634]]]]),self.functionspace)
1638          ref.setTaggedValue(1,numarray.array([[[[-0.4352396687206852, 0.71790975565175574], [-0.026335563976856324, 0.73215297571506333], [0.43847477543909408, 0.52390987553753021]], [[0.69971738524886229, 0.31442722316701333], [-0.3050179189173694, -0.82110989565229864], [0.89538070538642667, -0.79232575226907809]], [[0.12820519360965066, 0.17133151583039008], [0.034786927267309364, 0.61149974382034], [-0.30233858278548209, -0.15095804152332137]], [[0.85368106798373478, 0.073502826654757936], [-0.80517253266306654, -0.39618324499316659], [0.34064095798429972, 0.70007880227753483]]], [[[0.070429086144990993, -0.84914670000122405], [0.53751365530760808, -0.47360321438976105], [-0.065442292198451435, -0.81287589416276251]], [[0.20856447904774567, 0.44748205147620901], [0.23762583104200252, -0.94819175396076094], [-0.51019910866215024, -0.49495835482354122]], [[0.27537630019819237, 0.31043054343605769], [-0.43892419142534678, 0.70197559420805633], [-0.95818371885969, -0.72093774482005557]], [[0.75632498522306602, -0.15742659342518373], [-0.32714628277483726, -0.44324025020052993], [-0.44380533793397059, 0.49205650489551256]]], [[[0.56500122850628354, 0.86221036431877773], [-0.55217449087178383, -0.8996390666809333], [0.64861560494257464, 0.89768903742668971]], [[0.75590265015672053, 0.33430110262334489], [-0.32223101592083148, 0.72854621435050992], [0.23533348971688617, -0.26816557059751611]], [[-0.1161155711224795, 0.061460790213694549], [0.75895642071407199, -0.050415318743384008], [0.8226070796722551, -0.14226738736930322]], [[0.936460735669564, 0.88329713851895275], [-0.64670752330991776, -0.52116339611273954], [0.94265537264169708, 0.76825847592572138]]]]))
1639          self.failUnless(isinstance(res,Data),"wrong type of result.")
1640          self.failUnlessEqual(res.getShape(),(3, 4, 3, 2),"wrong shape of result.")
1641          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1642       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1643       def test_transpose_taggedData_rank4_offset3(self):
1644          arg=Data(numarray.array([[[[0.46779977762790437, 0.093518814946385476, 0.26385856580744815, 0.2604801780434074], [-0.6491200324762405, -0.20509854038191544, -0.24426074157647437, 0.44369744714798443], [-0.72832970925094398, -0.19992310580069916, 0.29304994686755537, -0.8560617172796674]], [[-0.87218318743426737, -0.96157972047186746, 0.19366884559207809, 0.86495607067380997], [0.46175480547513081, -0.43385687525297545, -0.53845348307578367, 0.71772981469066832], [-0.13155150763436452, 0.65633458584748405, -0.88392671137352519, -0.55121314896718854]]], [[[0.16048269352422473, 0.65167242384868107, -0.81874404622342967, -0.33880011973581081], [-0.82381126533871685, -0.4685045913598489, 0.65988860571851693, 0.046128587330151349], [0.02395401260034391, 0.86724680660126463, 0.95036738601274506, -0.12817863202906143]], [[-0.72589441274232658, 0.99217380594698712, 0.44152513176189845, 0.10666371836283495], [0.48848607735288807, -0.39576604834940876, 0.85958342412186761, 0.16866558109681606], [-0.12262580218350605, -0.1384080904755387, 0.95592207168735444, -0.43207476370897413]]], [[[-0.5504365167961085, 0.22003016502959349, 0.85675361887935231, -0.70172248954296856], [-0.91734090296421278, -0.61643187894020102, -0.63186313656321702, 0.42264314435215034], [0.9951716164622868, -0.67192068735701449, 0.45284867127911932, -0.52030864886746864]], [[-0.54368476728803627, -0.66863678245948899, -0.42490052226599673, -0.5550233927827537], [0.58729766881136669, 0.67513527066511969, -0.73319943725411019, -0.45416771189023875], [0.042545923751732273, -0.61545278016838645, 0.0029261928569452866, 0.69281133638493131]]]]),self.functionspace)
1645          arg.setTaggedValue(1,numarray.array([[[[0.73790897889353402, 0.35812560500758628, -0.5700967625904656, 0.69637723431368026], [0.40981257331711052, -0.33815730318925596, 0.75549945910789273, 0.65727933499766888], [0.65591674771411679, -0.14997839722878603, -0.50024863640332962, -0.45060281876364883]], [[0.33671050200997921, -0.97202656008512478, -0.67519081803124115, 0.25412287603488704], [0.16490878407953136, -0.67524863289413517, -0.22767621088839363, 0.50179720800099115], [0.61102486944072698, -0.50742209093618862, -0.15312316936225234, 0.71266816875510308]]], [[[0.15547124984145388, -0.35482060314225849, -0.54414105057206297, 0.73775048248000252], [-0.046243605558112133, -0.75516637112198759, 0.6242578362657345, -0.012528618222586996], [0.94241041843200213, 0.12994100470438252, 0.15155825194642558, 0.79896363238968093]], [[0.55420386856998038, -0.97003903495401644, 0.74008009088846505, 0.68766108056689124], [-0.44223412824547048, 0.03013419011529983, 0.77212833648726709, -0.52935975103599575], [-0.0075792688113558437, 0.40213578219891954, 0.96370555097954425, -0.2484978079339073]]], [[[-0.58855550111764843, -0.2919524122070698, -0.12220541326351486, 0.36574698295191488], [0.79058574197690357, 0.33312005433989333, 0.41321056836220982, -0.50975347487856371], [0.17132825413997255, 0.27966341134180661, 0.11431059650377162, -0.72338306151292242]], [[0.55252739035955734, 0.28642522196540998, 0.10504771933107038, -0.86268315801628614], [-0.87156594367525453, -0.26157383035184423, -0.61412828404065323, 0.043008426116986076], [-0.94131159099359674, -0.7491153117636451, 0.51354682902413873, 0.52536988332533774]]]]))
1646          res=transpose(arg,3)
1647          ref=Data(numarray.array([[[[0.46779977762790437, -0.6491200324762405, -0.72832970925094398], [-0.87218318743426737, 0.46175480547513081, -0.13155150763436452]], [[0.16048269352422473, -0.82381126533871685, 0.02395401260034391], [-0.72589441274232658, 0.48848607735288807, -0.12262580218350605]], [[-0.5504365167961085, -0.91734090296421278, 0.9951716164622868], [-0.54368476728803627, 0.58729766881136669, 0.042545923751732273]]], [[[0.093518814946385476, -0.20509854038191544, -0.19992310580069916], [-0.96157972047186746, -0.43385687525297545, 0.65633458584748405]], [[0.65167242384868107, -0.4685045913598489, 0.86724680660126463], [0.99217380594698712, -0.39576604834940876, -0.1384080904755387]], [[0.22003016502959349, -0.61643187894020102, -0.67192068735701449], [-0.66863678245948899, 0.67513527066511969, -0.61545278016838645]]], [[[0.26385856580744815, -0.24426074157647437, 0.29304994686755537], [0.19366884559207809, -0.53845348307578367, -0.88392671137352519]], [[-0.81874404622342967, 0.65988860571851693, 0.95036738601274506], [0.44152513176189845, 0.85958342412186761, 0.95592207168735444]], [[0.85675361887935231, -0.63186313656321702, 0.45284867127911932], [-0.42490052226599673, -0.73319943725411019, 0.0029261928569452866]]], [[[0.2604801780434074, 0.44369744714798443, -0.8560617172796674], [0.86495607067380997, 0.71772981469066832, -0.55121314896718854]], [[-0.33880011973581081, 0.046128587330151349, -0.12817863202906143], [0.10666371836283495, 0.16866558109681606, -0.43207476370897413]], [[-0.70172248954296856, 0.42264314435215034, -0.52030864886746864], [-0.5550233927827537, -0.45416771189023875, 0.69281133638493131]]]]),self.functionspace)
1648          ref.setTaggedValue(1,numarray.array([[[[0.73790897889353402, 0.40981257331711052, 0.65591674771411679], [0.33671050200997921, 0.16490878407953136, 0.61102486944072698]], [[0.15547124984145388, -0.046243605558112133, 0.94241041843200213], [0.55420386856998038, -0.44223412824547048, -0.0075792688113558437]], [[-0.58855550111764843, 0.79058574197690357, 0.17132825413997255], [0.55252739035955734, -0.87156594367525453, -0.94131159099359674]]], [[[0.35812560500758628, -0.33815730318925596, -0.14997839722878603], [-0.97202656008512478, -0.67524863289413517, -0.50742209093618862]], [[-0.35482060314225849, -0.75516637112198759, 0.12994100470438252], [-0.97003903495401644, 0.03013419011529983, 0.40213578219891954]], [[-0.2919524122070698, 0.33312005433989333, 0.27966341134180661], [0.28642522196540998, -0.26157383035184423, -0.7491153117636451]]], [[[-0.5700967625904656, 0.75549945910789273, -0.50024863640332962], [-0.67519081803124115, -0.22767621088839363, -0.15312316936225234]], [[-0.54414105057206297, 0.6242578362657345, 0.15155825194642558], [0.74008009088846505, 0.77212833648726709, 0.96370555097954425]], [[-0.12220541326351486, 0.41321056836220982, 0.11431059650377162], [0.10504771933107038, -0.61412828404065323, 0.51354682902413873]]], [[[0.69637723431368026, 0.65727933499766888, -0.45060281876364883], [0.25412287603488704, 0.50179720800099115, 0.71266816875510308]], [[0.73775048248000252, -0.012528618222586996, 0.79896363238968093], [0.68766108056689124, -0.52935975103599575, -0.2484978079339073]], [[0.36574698295191488, -0.50975347487856371, -0.72338306151292242], [-0.86268315801628614, 0.043008426116986076, 0.52536988332533774]]]]))
1649          self.failUnless(isinstance(res,Data),"wrong type of result.")
1650          self.failUnlessEqual(res.getShape(),(4, 3, 2, 3),"wrong shape of result.")
1651          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
1652       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1653       def test_transpose_taggedData_rank4_offset4(self):
1654          arg=Data(numarray.array([[[[-0.5629774335717217, 0.37289704610148733, -0.79454320414171375, -0.34180734715306493], [0.72913058075356685, 0.022374058788025009, -0.47497435095851337, 0.91786099638941132], [0.084676284763443688, 0.92032882822083972, -0.95232713744724928, 0.93556278993263042]], [[-0.89312439958472734, -0.4267675959952919, 0.40532529426442543, -0.87944686391721083], [-0.12198678462603696, -0.10538196821841139, -0.24656505926283701, 0.078118527972178553], [-0.69013127378106764, -0.29315625061460548, 0.61639572750427285, -0.96287054432600994]]], [[[0.8042974287359097, -0.38560281885315728, -0.61064637208469641, 0.38919455623834964], [0.17426253051276563, -0.76959392881695332, 0.94934922249302134, -0.69985631394633097], [-0.32274961682738867, 0.040974929564923768, 0.11162800240629722, 0.72904110798442989]], [[0.21859495861585954, 0.24931339416356968, -0.2179401859374428, 0.5621527739020018], [0.9915343294122414, -0.22108330180334357, 0.48986241138559161, -0.093696827843043451], [0.71510895431655697, -0.53904026490558676, -0.057072073516412747, 0.9234688562622666]]], [[[-0.39416147514951727, 0.691224747815955, 0.89595596620054274, -0.22529985985372392], [0.42100987291630787, 0.19098423959133703, 0.50672847215782024, -0.048013628778252437], [-0.022387886206133079, -0.63854353337962144, -0.25368261438951634, 0.75215852809283512]], [[0.65044236579106518, -0.56374323208172572, 0.58903075873549415, 0.10430727672190665], [0.22012952614616066, 0.30658675801433666, 0.9331079054369007, 0.97765401492736248], [0.4803972278238795, 0.62880464922082857, -0.71927862200401815, 0.49067003104619111]]]]),self.functionspace)
1655          arg.setTaggedValue(1,numarray.array([[[[-0.039074466790566253, -0.38253110751277308, -0.023659656109448646, 0.88674374602124795], [-0.8530108709584423, -0.94784093509748879, -0.51478453053324258, 0.4405063540256382], [-0.012439906663567868, 0.44833165182736723, 0.21006614953145153, 0.87093740516770346]], [[0.43774752196794986, -0.68998132591161077, 0.30770385872089956, 0.99968644163450904], [-0.62386292661659204, 0.51894866254551353, 0.81282925517508309, -0.8195122165291564], [-0.71619697300173613, -0.88810293901570292, 0.50734122948780702, 0.97649248851543136]]], [[[0.091432938817787246, -0.52720239228775667, -0.50676236687255716, -0.67986373823170321], [-0.80383345805365147, -0.017034165365795939, -0.84147680389297541, -0.12204025189144674], [-0.86652910735833966, -0.58172392670523965, -0.90242425161982176, 0.74287848488060848]], [[0.034681848871322751, -0.1543711770342826, -0.64733533182691527, -0.72917432237823077], [0.27906766945495654, -0.59766602736997387, 0.94224548783166218, 0.61558301038310703], [0.54320066342242912, -0.52545435614765101, 0.76189128242263604, 0.32067666631662495]]], [[[0.15481999896514997, -0.41372517738312786, 0.46383212107705174, -0.096325341498305406], [0.19566032428750346, 0.42230274614879271, 0.56018397714977075, 0.11522982720232355], [-0.42357766254492102, 0.18178853605156009, 0.082891624108751394, 0.75419985383252053]], [[-0.73014109338726296, -0.21848768556805864, -0.062155188286463936, 0.42376547599392111], [-0.10528194371082078, -0.24908924402116384, -0.14602712097902937, -0.11078238666648765], [0.46841923931948992, 0.49746717813042163, -0.58652128520131286, 0.77594994623589431]]]]))
1656          res=transpose(arg,4)
1657          ref=Data(numarray.array([[[[-0.5629774335717217, 0.37289704610148733, -0.79454320414171375, -0.34180734715306493], [0.72913058075356685, 0.022374058788025009, -0.47497435095851337, 0.91786099638941132], [0.084676284763443688, 0.92032882822083972, -0.95232713744724928, 0.93556278993263042]], [[-0.89312439958472734, -0.4267675959952919, 0.40532529426442543, -0.87944686391721083], [-0.12198678462603696, -0.10538196821841139, -0.24656505926283701, 0.078118527972178553], [-0.69013127378106764, -0.29315625061460548, 0.61639572750427285, -0.96287054432600994]]], [[[0.8042974287359097, -0.38560281885315728, -0.61064637208469641, 0.38919455623834964], [0.17426253051276563, -0.76959392881695332, 0.94934922249302134, -0.69985631394633097], [-0.32274961682738867, 0.040974929564923768, 0.11162800240629722, 0.72904110798442989]], [[0.21859495861585954, 0.24931339416356968, -0.2179401859374428, 0.5621527739020018], [0.9915343294122414, -0.22108330180334357, 0.48986241138559161, -0.093696827843043451], [0.71510895431655697, -0.53904026490558676, -0.057072073516412747, 0.9234688562622666]]], [[[-0.39416147514951727, 0.691224747815955, 0.89595596620054274, -0.22529985985372392], [0.42100987291630787, 0.19098423959133703, 0.50672847215782024, -0.048013628778252437], [-0.022387886206133079, -0.63854353337962144, -0.25368261438951634, 0.75215852809283512]], [[0.65044236579106518, -0.56374323208172572, 0.58903075873549415, 0.10430727672190665], [0.22012952614616066, 0.30658675801433666, 0.9331079054369007, 0.97765401492736248], [0.4803972278238795, 0.62880464922082857, -0.71927862200401815, 0.49067003104619111]]]]),self.functionspace)
1658          ref.setTaggedValue(1,numarray.array([[[[-0.039074466790566253, -0.38253110751277308, -0.023659656109448646, 0.88674374602124795], [-0.8530108709584423, -0.94784093509748879, -0.51478453053324258, 0.4405063540256382], [-0.012439906663567868, 0.44833165182736723, 0.21006614953145153, 0.87093740516770346]], [[0.43774752196794986, -0.68998132591161077, 0.30770385872089956, 0.99968644163450904], [-0.62386292661659204, 0.51894866254551353, 0.81282925517508309, -0.8195122165291564], [-0.71619697300173613, -0.88810293901570292, 0.50734122948780702, 0.97649248851543136]]], [[[0.091432938817787246, -0.52720239228775667, -0.50676236687255716, -0.67986373823170321], [-0.80383345805365147, -0.017034165365795939, -0.84147680389297541, -0.12204025189144674], [-0.86652910735833966, -0.58172392670523965, -0.90242425161982176, 0.74287848488060848]], [[0.034681848871322751, -0.1543711770342826, -0.64733533182691527, -0.72917432237823077], [0.27906766945495654, -0.59766602736997387, 0.94224548783166218, 0.61558301038310703], [0.54320066342242912, -0.52545435614765101, 0.76189128242263604, 0.32067666631662495]]], [[[0.15481999896514997, -0.41372517738312786, 0.46383212107705174, -0.096325341498305406], [0.19566032428750346, 0.42230274614879271, 0.56018397714977075, 0.11522982720232355], [-0.42357766254492102, 0.18178853605156009, 0.082891624108751394, 0.75419985383252053]], [[-0.73014109338726296, -0.21848768556805864, -0.062155188286463936, 0.42376547599392111], [-0.10528194371082078, -0.24908924402116384, -0.14602712097902937, -0.11078238666648765], [0.46841923931948992, 0.49746717813042163, -0.58652128520131286, 0.77594994623589431]]]]))
1659          self.failUnless(isinstance(res,Data),"wrong type of result.")
1660          self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
1661          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")

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

  ViewVC Help
Powered by ViewVC 1.1.26