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

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

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

revision 292 by gross, Fri Dec 2 03:11:04 2005 UTC revision 313 by gross, Mon Dec 5 07:01:36 2005 UTC
# Line 14801  class Test_util_unary_no_tagged_data(Tes Line 14801  class Test_util_unary_no_tagged_data(Tes
14801        self.failUnless(isinstance(res,Symbol),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
14802        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
14803        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14804       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14805       def test_length_float_rank0(self):
14806          arg=-0.510102533262
14807          res=length(arg)
14808          ref=0.510102533262
14809          self.failUnless(isinstance(res,float),"wrong type of result.")
14810          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14811       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14812       def test_length_array_rank0(self):
14813          arg=numarray.array(0.991109436523)
14814          res=length(arg)
14815          ref=numarray.array(0.991109436523)
14816          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14817          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14818          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14819       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14820       def test_length_array_rank1(self):
14821          arg=numarray.array([-0.76294483500740484, 0.011677546682929307])
14822          res=length(arg)
14823          ref=numarray.array(0.763034197373)
14824          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14825          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14826          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14827       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14828       def test_length_array_rank2(self):
14829          arg=numarray.array([[0.43339000667591221, -0.56813106354058163, -0.70722435943768658, 0.31944814927174714, 0.79536111956010869], [-0.58324348156333672, -0.43307121633826595, 0.32581231177090197, 0.71482009238312316, -0.21002576061225442], [-0.49917603582374914, -0.63591527310476903, -0.87332002545344389, -0.91612221194664523, -0.93005892936163725], [-0.19058313727475529, -0.099980978412387289, 0.065023988386496923, -0.50908214426833687, 0.50919445067665525]])
14830          res=length(arg)
14831          ref=numarray.array(2.57369396272)
14832          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14833          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14834          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14835       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14836       def test_length_array_rank3(self):
14837          arg=numarray.array([[[-0.9803545808261207, 0.16576061210577353], [-0.30011375458769374, 0.36782112416630941]], [[0.71430934303489013, 0.031917178828326564], [0.62738715091020936, -0.53865697329064433]], [[-0.39594881663888426, 0.51031034827379074], [-0.65321242269094326, 0.066960424832211762]], [[0.21295172167752496, 0.043385792033981962], [0.21039492093814283, -0.45875763326068775]], [[-0.14049283840925275, -0.43861027040015732], [-0.23520058218222872, -0.82264226361451076]], [[0.54845190061311566, 0.51238745343929559], [0.77453965957753224, 0.63412987812923882]]])
14838          res=length(arg)
14839          ref=numarray.array(2.46349793439)
14840          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14841          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14842          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14843       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14844       def test_length_array_rank4(self):
14845          arg=numarray.array([[[[-0.0089365634034204167, -0.84148551298030028, -0.86751121336543813, -0.15969541886143923], [-0.094576010082227269, -0.29859956741061855, -0.9668492649640319, 0.85706900506152772], [-0.53010678888957452, 0.23317712237751809, -0.54934453799322802, 0.63239069375979762]], [[-0.13286296817699417, 0.38304157353272172, 0.94879997873099398, -0.41152562922857516], [-0.084699118599110834, -0.77799719953735957, -0.73697310382304981, -0.57686761933311148], [-0.691418224706843, 0.86481171901741027, -0.65768637189088874, -0.36467431513366044]]], [[[-0.84165953650117875, -0.030676018280178408, 0.68829493775738415, -0.3155228468519129], [-0.7871478173248736, -0.079032190579141126, -0.2177526168512447, -0.22662606238170069], [-0.36280488027671387, -0.30025872969028122, -0.1153990482492997, -0.64384164007636602]], [[0.43765759938201887, -0.83664343730186874, 0.20723950229710386, -0.56690864703827692], [-0.5752004595601341, 0.45715366983278116, -0.60791501104508927, -0.12584705515500483], [0.013022887283654638, -0.82203757609388917, 0.2276716578033573, -0.82649410580263871]]], [[[-0.73587736736778697, -0.075026122599631151, 0.47107705394337485, -0.5188872506774429], [-0.91844772159081667, -0.17389147261342175, -0.53243380583847233, -0.25336755215727336], [-0.7085054821135035, 0.92376667162885795, 0.31427206042606071, 0.58305001351683972]], [[0.021860457140477907, -0.21893493890938442, 0.78089201272561026, -0.30413016651663138], [0.57250768478386815, 0.12062954871057352, -0.39418583967206589, 0.81081960816290599], [-0.62197759509633688, 0.26606514367555634, -0.71790752119252188, -0.75228782860426513]]]])
14846          res=length(arg)
14847          ref=numarray.array(4.74889961553)
14848          self.failUnless(isinstance(res,numarray.NumArray),"wrong type of result.")
14849          self.failUnlessEqual(res.shape,(),"wrong shape of result.")
14850          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14851       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14852       def test_length_constData_rank0(self):
14853          arg=Data(-0.621348324338,self.functionspace)
14854          res=length(arg)
14855          ref=Data(0.621348324338,self.functionspace)
14856          self.failUnless(isinstance(res,Data),"wrong type of result.")
14857          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14858          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14859       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14860       def test_length_constData_rank1(self):
14861          arg=Data(numarray.array([0.32933097146312651, 0.074695318351896134]),self.functionspace)
14862          res=length(arg)
14863          ref=Data(0.337695542388,self.functionspace)
14864          self.failUnless(isinstance(res,Data),"wrong type of result.")
14865          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14866          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14867       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14868       def test_length_constData_rank2(self):
14869          arg=Data(numarray.array([[-0.78192059954553383, -0.90936771512644765, -0.62922561123663545, 0.017784281736960006, 0.9748747532171671], [0.058303280563049231, -0.2728591332910737, 0.031130134154037092, -0.77308681021304904, -0.11934107563523066], [0.16559555223913947, 0.42636646304641856, -0.57573933774337149, 0.94979031593856034, 0.50631731019815573], [0.93403604481436431, -0.93439497144943484, -0.41539043658961994, -0.19785740903293636, -0.37401756164552413]]),self.functionspace)
14870          res=length(arg)
14871          ref=Data(2.69665449585,self.functionspace)
14872          self.failUnless(isinstance(res,Data),"wrong type of result.")
14873          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14874          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14875       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14876       def test_length_constData_rank3(self):
14877          arg=Data(numarray.array([[[-0.56969059522354204, 0.080095572899512968], [0.10882275113239914, 0.5219995791238794]], [[-0.45702291442137533, -0.48209810378998008], [-0.45061700485329181, 0.13409269350080355]], [[0.82959328262385434, 0.43146697783249], [-0.17051774940195052, -0.11306038728528978]], [[0.1343766654439873, 0.26708535580201764], [-0.72182400606958974, 0.68503438438868658]], [[0.63507734978497932, 0.20722711779440695], [0.096695049458556781, -0.72783199691610112]], [[0.15899265871592516, -0.59393453523719764], [0.81362670777065538, 0.44781346438355851]]]),self.functionspace)
14878          res=length(arg)
14879          ref=Data(2.34509551447,self.functionspace)
14880          self.failUnless(isinstance(res,Data),"wrong type of result.")
14881          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14882          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14883       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14884       def test_length_constData_rank4(self):
14885          arg=Data(numarray.array([[[[-0.15764527853259791, -0.30365168015204125, 0.47795233787343117, -0.98256953311171458], [0.0042986463256691199, 0.8035927446211617, -0.16701915572918757, 0.71275425093914158], [-0.96088340875110778, 0.44246392270280177, -0.86258499735816296, -0.83799786987315006]], [[0.9570143548429173, 0.038448779070990424, -0.85758098571845975, 0.54765015129054828], [-0.87491827027518299, -0.45074431963780448, -0.3985454061322331, -0.96368920535242153], [0.68864777189463311, 0.08364027809503205, -0.15072701440063496, 0.37493446731949942]]], [[[-0.40037966034446559, -0.20439352375445297, -0.00083579211732121017, 0.71146162550419212], [0.57902779303828478, 0.36965035149772829, -0.80710960825758327, -0.22291291503275867], [-0.050754745699356008, -0.74788880214762354, -0.29584218595779421, -0.15944687137497104]], [[-0.22559210423055043, -0.39361850034269019, -0.38362580334572582, 0.45418102497613622], [0.42704140840065086, -0.16313142654556012, 0.27467683038933854, -0.92068758637216352], [-0.25578430722641832, -0.83470097064580551, 0.3737146950202388, 0.77547342867161784]]], [[[0.7869046231589758, 0.42798876622613702, 0.063281236738654822, 0.90878329459830454], [0.9439304175181531, 0.50711996212079513, -0.23938857199714936, 0.55774844240445276], [0.5514271888482718, -0.71911109998895695, -0.079482513135118893, -0.50190162484878265]], [[-0.075988757174491495, 0.21390351071272762, -0.34834540192677776, -0.67335194629906114], [0.10253847169273911, 0.63514982365898098, 0.54802667295899443, -0.16433191310464568], [-0.74944750341855726, 0.99070513266942384, -0.55535271544968623, 0.41204768838694661]]]]),self.functionspace)
14886          res=length(arg)
14887          ref=Data(4.80409161546,self.functionspace)
14888          self.failUnless(isinstance(res,Data),"wrong type of result.")
14889          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14890          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14891       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14892       def test_length_expandedData_rank0(self):
14893          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
14894          arg=msk_arg*(0.883776938505)+(1.-msk_arg)*(-0.0468902435277)
14895          res=length(arg)
14896          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
14897          ref=msk_ref*(0.883776938505)+(1.-msk_ref)*(0.0468902435277)
14898          self.failUnless(isinstance(res,Data),"wrong type of result.")
14899          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14900          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14901       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14902       def test_length_expandedData_rank1(self):
14903          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
14904          arg=msk_arg*numarray.array([-0.58845041644366813, 0.84032988075424919])+(1.-msk_arg)*numarray.array([0.24641851124094183, -0.83673496226594679])
14905          res=length(arg)
14906          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
14907          ref=msk_ref*(1.0258792332)+(1.-msk_ref)*(0.872265716259)
14908          self.failUnless(isinstance(res,Data),"wrong type of result.")
14909          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14910          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14911       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14912       def test_length_expandedData_rank2(self):
14913          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
14914          arg=msk_arg*numarray.array([[-0.29586555942077419, 0.34274407148638875, -0.88727513948396664, 0.27160261149044485, 0.21413449360849302], [0.28011027275430478, 0.75357944869733395, 0.24679947624917853, 0.23083266549318582, -0.031185959204752756], [0.80951928180904842, 0.1946069687658758, 0.19231558044922537, -0.78993705668305569, -0.34498118770326403], [-0.90798215978462582, 0.36396049398056696, -0.99479482070441749, 0.71319176756439284, -0.173316315027086]])+(1.-msk_arg)*numarray.array([[0.78326921791525206, 0.44780263366625617, 0.90004049588763002, 0.86601571330532723, 0.89302226317470446], [-0.49280621379733769, 0.032223308649646842, -0.063785824564493776, -0.45830913844852361, 0.75573504780401213], [0.029363497650474857, 0.3732291937763248, -0.23856608969815407, -0.78387113786982909, 0.51309780260863525], [-0.055709228333384875, 0.47635746182366057, 0.69511257282026917, -0.70929759063656039, 0.65249778651689483]])
14915          res=length(arg)
14916          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
14917          ref=msk_ref*(2.41490921017)+(1.-msk_ref)*(2.63013072264)
14918          self.failUnless(isinstance(res,Data),"wrong type of result.")
14919          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14920          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14921       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14922       def test_length_expandedData_rank3(self):
14923          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
14924          arg=msk_arg*numarray.array([[[-0.46999515470673003, 0.35828008438348191], [-0.75807606560681484, 0.17336937881565895]], [[0.50255994290015416, 0.74389850916125733], [0.56251892098022993, -0.77887021071121221]], [[-0.94958377643932868, -0.55488659642221627], [-0.81161288797652253, 0.80725266426883979]], [[-0.38519127035487832, 0.85595943718503564], [-0.54032736868611431, -0.93807094048446449]], [[-0.18354593266618413, -0.14323695746161924], [-0.41586461136365327, 0.83381306861717031]], [[-0.56427207094458476, 0.47224479851988166], [-0.93279101876654669, -0.48877724755416652]]])+(1.-msk_arg)*numarray.array([[[0.86959183228486547, -0.46716569229451088], [0.3766416916310138, -0.26875186058841827]], [[-0.85315616483044532, -0.44895823472349328], [-0.019719427383600552, 0.87331397676878764]], [[0.18450481536393126, -0.93079080072281672], [-0.51399520036784985, 0.02094393310881526]], [[0.34454271397516889, -0.057292572357173555], [0.88270644599519299, 0.55068444546064366]], [[0.79135120340267306, -0.21348692991823648], [0.56803236664975065, 0.91336197474998104]], [[0.16655314750502104, -0.42962978230839477], [0.44885045412539593, 0.42912119101208823]]])
14925          res=length(arg)
14926          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
14927          ref=msk_ref*(3.13508828546)+(1.-msk_ref)*(2.77076207142)
14928          self.failUnless(isinstance(res,Data),"wrong type of result.")
14929          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14930          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14931       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14932       def test_length_expandedData_rank4(self):
14933          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
14934          arg=msk_arg*numarray.array([[[[-0.93886781108675321, 0.75905716358672759, 0.37094825123593167, -0.19680193477839869], [-0.69130982226153326, -0.097833952605903773, -0.18032702039691939, -0.65126134878000252], [-0.50441371581635863, 0.19853216992359735, 0.75211775926254854, 0.93313886601723994]], [[-0.81202720654711702, 0.39117544309224295, 0.32422500396848175, -0.86970863899495798], [0.15860494885441168, -0.99388324869686295, -0.6126507983503755, 0.45539570478611968], [-0.29981340221794484, 0.43378007384304418, -0.07804401429490726, 0.10520159837508403]]], [[[-0.067360545733815114, -0.75432265949843069, 0.23150713101298548, -0.62781393972269117], [0.16588303814612515, 0.6338577465238171, 0.44543958860038324, -0.6116568441601038], [0.62085456412712414, -0.59591336867783595, 0.31657816819520201, 0.96855037419698409]], [[0.89768670071243273, 0.047512605872325642, 0.38802965964728497, -0.047024004368128258], [0.28534214825759774, 0.79378823415801558, -0.41325077352252704, -0.41319182463438486], [-0.41172433227767002, -0.99248504691886752, -0.61435540813756728, -0.79377934237436421]]], [[[0.31056101760667421, 0.03997905342037944, -0.54839575574971211, -0.54963398878208447], [-0.19258715091848266, -0.67023816299126682, -0.61922833170488634, -0.3132139396514777], [0.95178737480931175, -0.84632696057445056, -0.043652087473059931, -0.39857277601740737]], [[-0.91850296338642701, 0.72749660991813925, 0.4827895084985423, -0.10560131182372157], [-0.91003622797953954, 0.35676038745111271, -0.26082661035830013, -0.12361013193170001], [-0.22592227457768388, -0.20389666165635489, -0.008049373422560846, -0.50062341851266434]]]])+(1.-msk_arg)*numarray.array([[[[-0.021088077793533166, 0.62042392362261389, -0.90699620151616278, 0.83244686127694245], [-0.65935596202227198, 0.2773135818931769, -0.14671290779705948, -0.42303151477725387], [-0.67360170011508336, -0.94136391147369758, 0.60593006592988452, 0.53271662567479994]], [[-0.68567319305989449, -0.33687160212342526, 0.48445948721184595, 0.8639977742197007], [0.41684351239404371, -0.47583440168725621, 0.46055807978272645, 0.19279035992433058], [0.83098230075402957, -0.7973760655728046, 0.22342511963387834, -0.89134877289705128]]], [[[0.35974286191438831, 0.21872434629252235, -0.63220544985048988, -0.52612039893949269], [-0.34493816049763404, -0.34015531655509457, 0.44937887672159205, -0.58847483438357262], [-0.34681966794346097, -0.91972234941106046, -0.51080277628557447, 0.45147645224503452]], [[0.70760788343718772, -0.031664619981034203, -0.16729804256437064, -0.80164830175689361], [0.97863767766204868, 0.91357020902462205, -0.0895749852663974, 0.50091501286651696], [-0.88377743658291208, 0.4536825024535025, 0.61591907060400253, 0.57165024614346471]]], [[[-0.37160858934673713, 0.50843004647167334, 0.39647835504208251, 0.28802988212615177], [-0.9374130465768602, -0.97417359787823421, -0.54320852345322379, 0.48577720898699028], [-0.95423595276764428, 0.033048674364561048, 0.69837226182049372, 0.037284034055920845]], [[-0.18095086863386811, 0.51687760740956334, -0.035166388385410308, -0.54024030399678025], [0.15723730135407932, 0.57872797253456132, -0.50187686605795045, -0.19174626179381882], [-0.36712116936754535, -0.94080998057238707, -0.84929322547542996, 0.46359997819244714]]]])
14935          res=length(arg)
14936          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
14937          ref=msk_ref*(4.72250379236)+(1.-msk_ref)*(4.95651187575)
14938          self.failUnless(isinstance(res,Data),"wrong type of result.")
14939          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14940          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14941       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14942       def test_length_Symbol_rank0(self):
14943          arg=Symbol(shape=())
14944          res=length(arg)
14945          s=numarray.array(-0.789837980175)
14946          sub=res.substitute({arg:s})
14947          ref=numarray.array(0.789837980175)
14948          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
14949          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14950          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14951       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14952       def test_length_Symbol_rank1(self):
14953          arg=Symbol(shape=(2,))
14954          res=length(arg)
14955          s=numarray.array([-0.99278720130643516, -0.31635710603880374])
14956          sub=res.substitute({arg:s})
14957          ref=numarray.array(1.04197324611)
14958          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
14959          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14960          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14961       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14962       def test_length_Symbol_rank2(self):
14963          arg=Symbol(shape=(4, 5))
14964          res=length(arg)
14965          s=numarray.array([[0.30330617983224806, -0.034382286635428416, -0.92998236960750025, 0.079593387079789357, -0.97576786708696051], [-0.89072269320659547, -0.9147287611809567, 0.38738742635579615, 0.88197146469080034, -0.94934598316837993], [0.76568352803574014, 0.26753035284135196, -0.7524109749998813, -0.96166811239041805, 0.64767731927766614], [-0.08106224171398746, 0.093979242309569999, 0.19365537992471782, 0.66290642442548209, -0.92178464093053747]])
14966          sub=res.substitute({arg:s})
14967          ref=numarray.array(3.04731243366)
14968          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
14969          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14970          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14971       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14972       def test_length_Symbol_rank3(self):
14973          arg=Symbol(shape=(6, 2, 2))
14974          res=length(arg)
14975          s=numarray.array([[[0.63270219604931355, 0.83365387198755303], [-0.95894378166298599, 0.94770845609153742]], [[-0.054230309656005948, -0.8583201840223178], [-0.3059469387044198, 0.36436426565521463]], [[0.99936630831878248, 0.69174106343830211], [-0.72346753078696668, -0.29393262943619347]], [[-0.1387177934118875, 0.55335331157202239], [0.17485986485294425, -0.57499413827306101]], [[-0.44635103256370678, -0.0026747734223169228], [0.56999760210195682, 0.28822031836313133]], [[-0.81421483984719423, 0.95146091736639549], [0.325091620781637, 0.1228991584641872]]])
14976          sub=res.substitute({arg:s})
14977          ref=numarray.array(2.99147603017)
14978          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
14979          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14980          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14981       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14982       def test_length_Symbol_rank4(self):
14983          arg=Symbol(shape=(3, 2, 3, 4))
14984          res=length(arg)
14985          s=numarray.array([[[[0.9553802355613672, 0.69686341659594508, -0.99378722161951782, -0.44375533633037345], [-0.36283156916537651, 0.37154115095294116, 0.89052073402679688, 0.12073579974637294], [-0.23182292009836991, 0.7645988093807583, -0.86092690771967351, -0.60887800830982775]], [[-0.50717685742262053, 0.8809655659976976, 0.58257188844988517, -0.34834108141150799], [-0.3972320705533392, -0.37707450391367781, -0.22019931073074073, 0.085282917686800186], [-0.15485636575308659, -0.059745197090554258, 0.02097074907671348, -0.35319233014647611]]], [[[-0.64291668350006481, -0.83956466436935995, -0.30093964216156355, -0.63680973919809913], [-0.052793612873440088, -0.79714677972722914, 0.27578346113424224, 0.47672412989472424], [0.84075523456069079, -0.62732429158670322, -0.7652927626811814, -0.16234468063865615]], [[0.43567413924823817, -0.70925710144457899, 0.2867437550859715, -0.79422455679900761], [-0.58090904206661964, 0.083979694126635085, -0.65113712391706446, -3.2159537197706811e-05], [-0.68323405228947531, -0.23084624272450149, 0.45792738466607785, -0.23912441655403405]]], [[[-0.60355376046417564, 0.65748745637074957, 0.69475559926651065, 0.30319251488008914], [-0.65446312175735444, 0.75820787788719946, 0.49424915985913276, 0.17550053384909714], [0.164181752436803, -0.47561310823848291, 0.63364128166201228, 0.9154606103705536]], [[0.42202491541151677, 0.4741770029505632, -0.69902234880240055, -0.2340602324823593], [0.68674818683781025, 0.1123258347497631, 0.88525272328302518, 0.76213393540774854], [0.65039498447894473, -0.11889178909612519, 0.73787585442859926, 0.92702273092673648]]]])
14986          sub=res.substitute({arg:s})
14987          ref=numarray.array(4.83951826943)
14988          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
14989          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
14990          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14991       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14992       def test_maxval_float_rank0(self):
14993          arg=0.315854880825
14994          res=maxval(arg)
14995          ref=0.315854880825
14996          self.failUnless(isinstance(res,float),"wrong type of result.")
14997          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
14998       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14999       def test_maxval_array_rank0(self):
15000          arg=numarray.array(-0.377472785293)
15001          res=maxval(arg)
15002          ref=numarray.array(-0.377472785293)
15003          self.failUnless(isinstance(res,float),"wrong type of result.")
15004          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15005       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15006       def test_maxval_array_rank1(self):
15007          arg=numarray.array([0.67183156228324403, 0.98323683252360539])
15008          res=maxval(arg)
15009          ref=numarray.array(0.983236832524)
15010          self.failUnless(isinstance(res,float),"wrong type of result.")
15011          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15012       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15013       def test_maxval_array_rank2(self):
15014          arg=numarray.array([[0.84034096955817894, 0.29665901063728572, -0.42190010384108523, -0.7150438773637906, 0.14643629018234949], [0.22677764147443136, 0.14594960752890751, -0.74161102103554177, -0.042525371203158802, 0.45739481907885904], [0.92281820938114612, -0.74136143299473378, -0.082616726724768386, 0.024796098776131537, -0.26761237274922411], [0.44638984793823289, 0.45566292575391332, -0.45703791845559705, 0.96294823838515708, 0.20865001046980014]])
15015          res=maxval(arg)
15016          ref=numarray.array(0.962948238385)
15017          self.failUnless(isinstance(res,float),"wrong type of result.")
15018          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15019       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15020       def test_maxval_array_rank3(self):
15021          arg=numarray.array([[[-0.69786738686010863, 0.22220015828286921], [0.39818252195561255, 0.62828383756907602]], [[-0.30663179429588383, 0.58142297666853637], [0.58551100004900891, -0.26454346793231442]], [[0.82280266855051476, -0.89955650739217519], [0.0091889934169460119, -0.10055418070372735]], [[0.40193434282716689, 0.77124273444864078], [-0.70873019803530313, -0.81529900334190519]], [[0.46864138606445871, 0.65526620123485468], [-0.8719674792548715, -0.94339546902627047]], [[0.56873047860501025, 0.38953302649374399], [-0.98526085240200989, -0.48033381512355788]]])
15022          res=maxval(arg)
15023          ref=numarray.array(0.822802668551)
15024          self.failUnless(isinstance(res,float),"wrong type of result.")
15025          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15026       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15027       def test_maxval_array_rank4(self):
15028          arg=numarray.array([[[[0.85720742878416645, 0.27988827387323667, 0.49070838881477474, -0.45763132819743535], [-0.67237336183311225, -0.25445937371923955, 0.10361458853479233, 0.10413904498543669], [-0.93692345104386443, 0.2678428054175328, 0.25533247056621211, -0.32305638067221998]], [[0.59340473127311899, -0.87227874511895909, 0.6241736038770771, 0.79467283603250483], [-0.92762377016283226, -0.68487229864254506, -0.066576628979943431, -0.33180819533101635], [-0.50565694661802785, -0.27864825619146205, -0.10892529985569377, -0.38472639795925501]]], [[[0.89332236053146707, -0.53172955419735013, 0.041432658449450654, 0.46681521077857546], [0.021583966439083779, 0.41850959174604618, 0.51949264416518059, -0.66312837589642548], [0.33246856848437045, -0.4801113671503936, 0.55902212823529829, -0.63177305756143087]], [[-0.33448057589573166, -0.75739896498945303, 0.91642906573402105, -0.29316527400677339], [-0.55921776067113349, 0.11502888427705971, 0.60735749648784854, 0.41281299421768169], [0.90078770354412674, 0.93534572171226271, 0.67200314010782347, -0.83277182798924998]]], [[[0.50057755897525991, -0.7863579282681803, -0.78780741517599662, -0.80342487860441247], [0.71775356842357452, 0.60691302920938384, -0.61563688967106733, 0.89279476199536179], [0.60907733165373656, -0.97645380984070052, -0.68344826887442944, 0.02838484569891464]], [[-0.39073286697774301, -0.37909899562646054, 0.16487244638410781, -0.20422979552499498], [0.42360937159006551, -0.21911732897340896, -0.77260176428047567, -0.39140596490426249], [-0.25978163449682445, 0.69597575969217407, -0.82813780051302399, -0.2437763687760135]]]])
15029          res=maxval(arg)
15030          ref=numarray.array(0.935345721712)
15031          self.failUnless(isinstance(res,float),"wrong type of result.")
15032          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15033       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15034       def test_maxval_constData_rank0(self):
15035          arg=Data(0.00425301467094,self.functionspace)
15036          res=maxval(arg)
15037          ref=Data(0.00425301467094,self.functionspace)
15038          self.failUnless(isinstance(res,Data),"wrong type of result.")
15039          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15040          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15041       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15042       def test_maxval_constData_rank1(self):
15043          arg=Data(numarray.array([0.24481630771410834, 0.8482027633371616]),self.functionspace)
15044          res=maxval(arg)
15045          ref=Data(0.848202763337,self.functionspace)
15046          self.failUnless(isinstance(res,Data),"wrong type of result.")
15047          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15048          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15049       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15050       def test_maxval_constData_rank2(self):
15051          arg=Data(numarray.array([[-0.62805848358264393, 0.47792569168847021, 0.63753766788606292, 0.56872613192380017, -0.62140547559582826], [-0.53300885909946549, 0.087728738264873707, 0.27815721899198342, -0.60846756436547444, 0.76312701161889152], [-0.90031662952456015, -0.93562023084611834, -0.077605527954475173, -0.51077693482781039, 0.95897780151638878], [-0.32875230962884427, -0.40568224632821437, 0.60125655094211172, 0.73095614466625314, 0.77566626029390551]]),self.functionspace)
15052          res=maxval(arg)
15053          ref=Data(0.958977801516,self.functionspace)
15054          self.failUnless(isinstance(res,Data),"wrong type of result.")
15055          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15056          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15057       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15058       def test_maxval_constData_rank3(self):
15059          arg=Data(numarray.array([[[-0.41133807237181697, 0.339475432953392], [0.751688023632332, -0.45416714276660897]], [[-0.82710852884284014, -0.54581937207379094], [0.96752580081305073, 0.017286990318454487]], [[0.95948104622292951, 0.57403336395794513], [-0.4652813457699212, 0.87679325951992881]], [[-0.27378818188120158, 0.29628771669225618], [0.55915654739024712, -0.90003391143575473]], [[0.61472043944167232, 0.35735658086868294], [-0.20019759448385233, -0.0097721699054988953]], [[0.55933363921880153, 0.97230703622729164], [-0.97883751547481035, -0.16616084753658722]]]),self.functionspace)
15060          res=maxval(arg)
15061          ref=Data(0.972307036227,self.functionspace)
15062          self.failUnless(isinstance(res,Data),"wrong type of result.")
15063          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15064          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15065       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15066       def test_maxval_constData_rank4(self):
15067          arg=Data(numarray.array([[[[-0.10987928269740532, 0.34460441718388068, -0.42251161876169707, -0.21841227109764882], [-0.52039679114287773, -0.067873360247190373, 0.71884821427626466, -0.77230257512959066], [-0.36304670040479614, -0.16015922187117293, 0.86853171882086122, -0.96567539865168328]], [[0.96601317514359786, 0.83752149178113511, 0.65892376484600801, 0.31630886002000169], [-0.66226270610768667, -0.68350164369220967, -0.81054005335510793, 0.3180480536844339], [-0.87422470417268672, -0.17129283972715248, 0.28039370045536738, 0.29695941930546255]]], [[[-0.47630810423711178, 0.52959745217192444, 0.040993980179728773, 0.5245591726930805], [-0.89383657059829846, 0.029315208725834152, 0.88056186549081983, -0.63784231116158785], [-0.60183199925280473, -0.92921784953609343, 0.01889309869387179, -0.49090749904730235]], [[-0.32390997756647799, 0.36642208468565207, -0.68111798476689711, -0.92004014931390654], [-0.0292412230442054, -0.71320760352104884, -0.57106096519639893, 0.012657128392972838], [0.70387931057541575, 0.25942878473151754, 0.78392882823935928, -0.26722465851260502]]], [[[0.26096223103983385, 0.89553376726470413, -0.56049710274754716, 0.51051997594553389], [-0.87602756662141301, -0.29261382562617144, -0.12873590235943388, 0.69707757280626437], [0.63111654272128237, -0.56667864380284994, 0.04781100525711901, 0.062962267029093688]], [[0.83354469589166058, 0.49147678083366575, -0.47313464330467436, -0.37984462029444055], [0.048709899932206424, -0.28197892047593331, 0.61145832786089915, -0.051745145517938074], [0.97194002325382467, -0.068565885935067961, 0.7719415422184297, -0.27187882484530701]]]]),self.functionspace)
15068          res=maxval(arg)
15069          ref=Data(0.971940023254,self.functionspace)
15070          self.failUnless(isinstance(res,Data),"wrong type of result.")
15071          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15072          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15073       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15074       def test_maxval_expandedData_rank0(self):
15075          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15076          arg=msk_arg*(0.332235320145)+(1.-msk_arg)*(-0.24604500324)
15077          res=maxval(arg)
15078          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15079          ref=msk_ref*(0.332235320145)+(1.-msk_ref)*(-0.24604500324)
15080          self.failUnless(isinstance(res,Data),"wrong type of result.")
15081          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15082          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15083       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15084       def test_maxval_expandedData_rank1(self):
15085          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15086          arg=msk_arg*numarray.array([-0.59427677340505958, -0.84740257716903722])+(1.-msk_arg)*numarray.array([-0.72031138157212804, 0.92918576704192746])
15087          res=maxval(arg)
15088          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15089          ref=msk_ref*(-0.594276773405)+(1.-msk_ref)*(0.929185767042)
15090          self.failUnless(isinstance(res,Data),"wrong type of result.")
15091          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15092          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15093       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15094       def test_maxval_expandedData_rank2(self):
15095          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15096          arg=msk_arg*numarray.array([[0.41368801368105679, 0.29360526282114119, -0.30954301330224121, 0.26476660295182097, 0.37942955464311723], [-0.14137058932732383, 0.56216536188087152, 0.85723969959744473, -0.34157407776672866, 0.71187680163817757], [0.028323013942354924, -0.8271833359392009, -0.46852604935440745, 0.17851739216808915, 0.66516251742568744], [-0.65769919956640965, 0.82148451636261277, -0.99401768066284557, 0.10732593805672952, -0.28231159743214285]])+(1.-msk_arg)*numarray.array([[-0.35422666104845879, -0.83499817780768693, 0.94898016702033416, -0.035772961794744429, 0.57477321877630838], [0.22489182670080199, -0.41146981529375215, -0.72758976996124791, -0.41066296298400817, 0.80718619480745124], [0.80235446968120638, -0.35840819741634955, -0.05618651096108862, -0.94078438157309785, -0.56658816600726691], [-0.73505106729271441, -0.33158257909652189, 0.44199211387292636, 0.29529742850205309, 0.85346454421416262]])
15097          res=maxval(arg)
15098          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15099          ref=msk_ref*(0.857239699597)+(1.-msk_ref)*(0.94898016702)
15100          self.failUnless(isinstance(res,Data),"wrong type of result.")
15101          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15102          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15103       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15104       def test_maxval_expandedData_rank3(self):
15105          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15106          arg=msk_arg*numarray.array([[[-0.496818524218406, 0.26161963352560824], [0.91044707618692389, -0.9432697535729444]], [[-0.10609846145317547, -0.72291144577158972], [-0.15568936492204277, -0.053141421374103048]], [[0.53303053127115252, 0.24937055476184278], [-0.85544018056817905, 0.32023326034177413]], [[-0.19803538880229699, 0.071601808939763201], [0.78888291536029431, 0.10606346665910005]], [[-0.83691574508233346, 0.75194007447412869], [-0.46213522303320165, 0.74118532899627509]], [[-0.27203854500308888, 0.0556603061557428], [-0.27568024558144644, -0.6596832871328886]]])+(1.-msk_arg)*numarray.array([[[-0.38387363639151295, -0.03233312164578428], [-0.7132988320484781, -0.12222778087194741]], [[-0.23514106160045301, 0.42068398992463907], [-0.73285598813751607, -0.85491869063637438]], [[-0.096049701961620437, 0.39603320496426764], [-0.86688149264271797, -0.48263249645534678]], [[0.61270540922521399, -0.27815399087641524], [-0.75568629133180254, 0.06586879881883867]], [[-0.98103416178316749, -0.34258493606401386], [-0.44344220314932414, -0.92896633412201046]], [[0.75303826320532785, -0.75939337307517341], [0.66523101128309792, 0.42131106360540072]]])
15107          res=maxval(arg)
15108          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15109          ref=msk_ref*(0.910447076187)+(1.-msk_ref)*(0.753038263205)
15110          self.failUnless(isinstance(res,Data),"wrong type of result.")
15111          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15112          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15113       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15114       def test_maxval_expandedData_rank4(self):
15115          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15116          arg=msk_arg*numarray.array([[[[-0.39063884840579055, -0.062593055462244251, -0.022752676756311097, 0.82567766395652442], [-0.61782203411671532, -0.7174987171488576, 0.012416472497936981, 0.77732527522608708], [0.2581482129115249, -0.028970138751502228, 0.21400817374883752, 0.096518944579570443]], [[-0.9333652649577453, -0.3485799161416816, -0.22059438876339588, -0.32222484146513297], [0.049776858853060491, -0.39729968061906007, -0.15644245293308434, 0.57933231238347394], [-0.91585792154697998, 0.6490525691757576, 0.13701512944986138, -0.50714811705008134]]], [[[0.94717926915302164, 0.44616257454360975, -0.40750067768073506, -0.50001686912458432], [-0.5640527606203567, -0.16806643428738455, -0.99809710887506187, -0.28997095902879977], [0.96080123261322714, 0.7072630535529012, 0.060165698718575689, -0.48760045654442763]], [[0.8605264623824691, 0.37995771692823999, -0.58889533613098277, -0.12102927983038536], [-0.75913777624959944, 0.95883798144078658, -0.0170674547606533, 0.40302350028136646], [-0.41467348140561078, -0.34169615998854042, -0.094247808145228928, -0.77243636153593309]]], [[[0.76847611775181623, 0.31114571658639933, 0.3375738255385885, 0.8252971351240701], [0.16843391508372885, -0.17487468243823523, 0.9500225050341351, 0.15765605380472492], [0.84806367006401939, -0.8921145799188599, 0.70066703654989038, -0.29226492555032313]], [[0.26167372305421277, -0.14246109041907506, 0.67992861287405981, -0.85922091895242425], [-0.20238389587707561, -0.2880395272779086, -0.58172933182948428, 0.98397658132546684], [-0.70323630626752842, 0.047805048436355024, 0.1334599526040372, 0.091415361986823429]]]])+(1.-msk_arg)*numarray.array([[[[0.45435533405178563, -0.24704909409153553, 0.20906352762224722, 0.87632790903409052], [-0.27526942171841084, -0.20312196158302176, 0.62221965869732276, -0.51231649769277432], [-0.91064163780949081, -0.67582252480982086, 0.50052639822596001, -0.069909103979628684]], [[-0.83392522017960569, -0.87540703757185967, 0.02544719796251993, -0.68287237837241843], [-0.10314783966584584, 0.33658223994757219, 0.2486432654565609, -0.50566553769425715], [0.3590841982402051, -0.69644955060860281, 0.055034764880927289, -0.028554584782987558]]], [[[0.68013452135981023, -0.80066123330402261, 0.33556647382902027, 0.58147090184653938], [0.55665998011202222, -0.69132338787736347, 0.91301301976970572, -0.36903333405262262], [0.84606547219969408, 0.1992186661680091, 0.74823224796946786, 0.43629167990068662]], [[-0.49014959276017844, 0.774758193648448, 0.14961755035441104, 0.40547083361887415], [0.37831252161933504, -0.4349417215086282, 0.71836802753181694, -0.24652218870808684], [-0.38428296978779963, 0.99667296612807799, 0.16883895231650103, -0.42076923428686475]]], [[[-0.08342541607713061, -0.69745118901650538, -0.83706308088889525, 0.81201518967613806], [-0.38122402193435234, -0.46153944893815702, 0.43276508943432845, -0.086332781036586592], [0.7242527519061337, -0.60544717368864243, -0.29315538455633927, -0.97452928976637287]], [[-0.61595949771180325, 0.87520574402241502, 0.61694207224169428, -0.37854520619327103], [-0.14310710281978745, -0.61259903416672601, -0.66322044415369796, 0.89868948108915769], [0.95673622765714006, 0.17577298932819585, -0.11163387589198637, -0.61928756437099852]]]])
15117          res=maxval(arg)
15118          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15119          ref=msk_ref*(0.983976581325)+(1.-msk_ref)*(0.996672966128)
15120          self.failUnless(isinstance(res,Data),"wrong type of result.")
15121          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15122          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15123       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15124       def test_maxval_Symbol_rank0(self):
15125          arg=Symbol(shape=())
15126          res=maxval(arg)
15127          s=numarray.array(0.264444652408)
15128          sub=res.substitute({arg:s})
15129          ref=numarray.array(0.264444652408)
15130          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15131          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15132          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15133       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15134       def test_maxval_Symbol_rank1(self):
15135          arg=Symbol(shape=(2,))
15136          res=maxval(arg)
15137          s=numarray.array([-0.46872519059702666, -0.34377250714318253])
15138          sub=res.substitute({arg:s})
15139          ref=numarray.array(-0.343772507143)
15140          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15141          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15142          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15143       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15144       def test_maxval_Symbol_rank2(self):
15145          arg=Symbol(shape=(4, 5))
15146          res=maxval(arg)
15147          s=numarray.array([[-0.42029422551021001, -0.095956646421628822, -0.23423251785733701, 0.88423312487002725, 0.77651814842759825], [0.73935818772227058, -0.94751870058042553, 0.10965991471094028, -0.12636301311301956, 0.60685113859871342], [-0.29042943080940087, -0.81737079875056784, -0.50719799269780519, 0.28310567344481585, 0.66033989717282182], [-0.33454927451872996, -0.1691136351724456, -0.092111533164443093, 0.63693179085948803, 0.44905026678407034]])
15148          sub=res.substitute({arg:s})
15149          ref=numarray.array(0.88423312487)
15150          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15151          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15152          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15153       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15154       def test_maxval_Symbol_rank3(self):
15155          arg=Symbol(shape=(6, 2, 2))
15156          res=maxval(arg)
15157          s=numarray.array([[[-0.89956233971536759, -0.64289918318281236], [0.42717037956336701, 0.58569935497923131]], [[-0.42482815015935294, 0.93299874734754251], [-0.6771236309413744, 0.15645724392299476]], [[0.10155060962378104, 0.1895040443072149], [0.90033792417564662, 0.59995493957111212]], [[-0.48380956284384213, 0.57783539568923015], [0.85668118181206943, -0.8932073050036522]], [[0.87116840393699846, -0.06686322397739386], [-0.079028861013898277, 0.22373883886451518]], [[0.66755615903273458, -0.65115596323523972], [-0.50189681844036782, -0.34651832245873648]]])
15158          sub=res.substitute({arg:s})
15159          ref=numarray.array(0.932998747348)
15160          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15161          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15162          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15163       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15164       def test_maxval_Symbol_rank4(self):
15165          arg=Symbol(shape=(3, 2, 3, 4))
15166          res=maxval(arg)
15167          s=numarray.array([[[[-0.66080213310384095, -0.87581702832071029, -0.87713274647618422, -0.71745231801403397], [0.68932205001982982, 0.10085377806879015, -0.32040385535991289, 0.97442268602962323], [0.83736658828768662, -0.89145017019983275, 0.56277884900208464, -0.61169104989326439]], [[0.23689887137935361, 0.45839023497056752, -0.49466349291469691, 0.091384724753820645], [-0.057627653751132435, 0.18673913043356882, -0.38510295375445991, -0.27670522310937296], [-0.32858239487979213, -0.90843899571001741, 0.27321577975950251, -0.16028990431721657]]], [[[0.0071255058479562372, -0.38754201785110265, -0.33975468643735507, 0.32739858297771263], [0.43128787309656214, -0.77344723052438114, 0.35810217859851434, -0.78400515968431495], [-0.025005640492891557, -0.39500130787197052, -0.4215384875978978, 0.2467722435651587]], [[0.42168044940914173, -0.092912330631678808, 0.1744623538435095, 0.6033281471340779], [-0.14393721951466554, 0.575480538521703, -0.039909610497554926, 0.83349968408039721], [0.22842286802122658, -0.6397916476601937, 0.22638602142646835, 0.93110495205313382]]], [[[0.62108277177599214, 0.065344009295399186, -0.71935240158330616, 0.26805934522612329], [0.035203513908888207, 0.080950581554599443, -0.012195970510152643, -0.17495677454869396], [-0.42040689436134127, 0.94134911448517333, 0.27407384363575593, -0.054501699968307893]], [[0.21464458957048138, -0.90513760776997088, -0.63465820211040502, -0.18792780457049862], [0.73983565735614021, -0.97612004404314345, -0.4914734886279577, 0.34426415864802529], [0.51279968744793747, 0.71002505381716818, -0.8836589712227978, -0.8486724911905914]]]])
15168          sub=res.substitute({arg:s})
15169          ref=numarray.array(0.97442268603)
15170          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15171          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15172          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15173       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15174       def test_minval_float_rank0(self):
15175          arg=-0.0813988872107
15176          res=minval(arg)
15177          ref=-0.0813988872107
15178          self.failUnless(isinstance(res,float),"wrong type of result.")
15179          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15180       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15181       def test_minval_array_rank0(self):
15182          arg=numarray.array(0.203135339689)
15183          res=minval(arg)
15184          ref=numarray.array(0.203135339689)
15185          self.failUnless(isinstance(res,float),"wrong type of result.")
15186          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15187       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15188       def test_minval_array_rank1(self):
15189          arg=numarray.array([0.53544902048869591, -0.81095461710032879])
15190          res=minval(arg)
15191          ref=numarray.array(-0.8109546171)
15192          self.failUnless(isinstance(res,float),"wrong type of result.")
15193          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15194       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15195       def test_minval_array_rank2(self):
15196          arg=numarray.array([[0.27214337670370048, 0.15560988073469084, 0.90015619199343311, -0.9025114039043387, -0.84476541550754214], [0.067681521831817637, 0.49725231481834298, -0.44690725788544317, 0.81611521497601935, -0.23818755255201474], [0.39409048948021819, -0.32989779963822996, 0.071598660625914912, -0.048721135674946847, -0.88486359278268867], [-0.047242209881730668, 0.5117999752695459, -0.065254537763000275, -0.98426384139999601, 0.42640166196036344]])
15197          res=minval(arg)
15198          ref=numarray.array(-0.9842638414)
15199          self.failUnless(isinstance(res,float),"wrong type of result.")
15200          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15201       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15202       def test_minval_array_rank3(self):
15203          arg=numarray.array([[[-0.57801369559578375, 0.8475709087853267], [-0.62156558628902858, 0.16317256776729372]], [[0.82280749191458802, 0.86757046029308138], [-0.80468648257487341, 0.50347496153235838]], [[0.57910271328476837, 0.31832794067003101], [-0.43115546130737159, 0.96031608499179488]], [[0.49539799715856692, -0.10882931867648438], [-0.10954143472670097, -0.40160540217269403]], [[0.24326476418285869, 0.73974055647226611], [-0.062874816874243677, -0.084436498355318745]], [[0.022195220279687566, 0.77562819716638032], [-0.88624021250624607, 0.39848396848232337]]])
15204          res=minval(arg)
15205          ref=numarray.array(-0.886240212506)
15206          self.failUnless(isinstance(res,float),"wrong type of result.")
15207          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15208       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15209       def test_minval_array_rank4(self):
15210          arg=numarray.array([[[[-0.14474876918789525, 0.54987363867145578, 0.041514287216928958, 0.50784202943730339], [0.22428027284721597, -0.90703539828428648, -0.57639520455060667, -0.48198988610144466], [0.94878712908709151, -0.34378540985741024, -0.85617090009829844, 0.38542149004545845]], [[0.40439396247960424, -0.33396533725982902, 0.57102838967013425, -0.77292398584017619], [-0.30211593932962177, 0.31377477534575848, -0.65372193392871303, 0.7598903854852137], [0.93212303414631692, -0.9918986741212521, -0.31650029155130377, -0.79547565383603569]]], [[[0.22810964805040368, 0.36801496715542159, -0.50290854627818193, -0.031218734373054335], [0.91491532038518919, 0.3432896329141184, -0.67365848697820074, -0.56415601144850136], [-0.94529850756161604, 0.063750250741384518, -0.94341968293701362, 0.0086523607884236853]], [[-0.15793249822138344, 0.33733718444805083, -0.071528717305355149, -0.67498602448352707], [0.36887437066094186, -0.045164571795437425, 0.50187055239691203, -0.68431142493430408], [-0.5805689340418223, -0.1405830463965192, 0.49818568480317338, -0.49073491820057957]]], [[[-0.4547271777538564, 0.0052825628200054986, 0.8386907168648059, -0.79277949820721361], [-0.17773231635682119, -0.73046788469917323, -0.32125176839388025, -0.81768823086027997], [0.97056323533228195, -0.12463448959269829, -0.057103597501829473, 0.40417829046576115]], [[0.055559060913653591, -0.2205433998937556, -0.4707694934849973, 0.27520647582020419], [-0.7793261855641469, 0.2312443862224689, 0.49823564342243087, 0.50087939122723002], [0.13357337216768128, -0.21846566992619709, -0.67496935894945098, -0.047733069730594435]]]])
15211          res=minval(arg)
15212          ref=numarray.array(-0.991898674121)
15213          self.failUnless(isinstance(res,float),"wrong type of result.")
15214          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15215       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15216       def test_minval_constData_rank0(self):
15217          arg=Data(-0.570106420108,self.functionspace)
15218          res=minval(arg)
15219          ref=Data(-0.570106420108,self.functionspace)
15220          self.failUnless(isinstance(res,Data),"wrong type of result.")
15221          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15222          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15223       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15224       def test_minval_constData_rank1(self):
15225          arg=Data(numarray.array([-0.19847831559753981, 0.40610397160211087]),self.functionspace)
15226          res=minval(arg)
15227          ref=Data(-0.198478315598,self.functionspace)
15228          self.failUnless(isinstance(res,Data),"wrong type of result.")
15229          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15230          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15231       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15232       def test_minval_constData_rank2(self):
15233          arg=Data(numarray.array([[-0.9639131333497899, -0.30622184254591556, -0.56534225119979475, 0.97113536551499657, 0.72771392953144876], [-0.71538714174098872, 0.52973718939771963, -0.028651679335222946, 0.5929024511132337, -0.4866110022815282], [0.027770288586371983, -0.32978280221198308, 0.13790608674958271, -0.45983276751063973, 0.31586441270296217], [-0.25006380493198432, -0.23317987015724517, -0.49457991065340834, -0.66183045720993428, 0.6546653003791596]]),self.functionspace)
15234          res=minval(arg)
15235          ref=Data(-0.96391313335,self.functionspace)
15236          self.failUnless(isinstance(res,Data),"wrong type of result.")
15237          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15238          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15239       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15240       def test_minval_constData_rank3(self):
15241          arg=Data(numarray.array([[[0.78772704902154156, 0.69698576470167839], [0.58349353871022425, -0.44429652744170367]], [[0.95122195248495611, -0.13329242810307163], [0.61489426950194725, -0.82627278543241833]], [[-0.20676898827641677, 0.90746615695355337], [-0.21454902325466274, -0.06996179955865367]], [[-0.77386810656368321, -0.50452086581667466], [0.10741771738964179, 0.54945560673302318]], [[0.62059435342635272, 0.42764710981542731], [-0.69961537691414666, 0.41473366544360712]], [[-0.69496424443778304, -0.71149599990967038], [0.41282921885173396, 0.38102417382970177]]]),self.functionspace)
15242          res=minval(arg)
15243          ref=Data(-0.826272785432,self.functionspace)
15244          self.failUnless(isinstance(res,Data),"wrong type of result.")
15245          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15246          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15247       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15248       def test_minval_constData_rank4(self):
15249          arg=Data(numarray.array([[[[-0.31617134142491587, -0.79150138292975791, -0.69179461153514898, 0.64957729213045989], [-0.81436417612892531, 0.42248652353980631, -0.25642022653882335, 0.27550856107884569], [0.0095865917205664175, 0.13528115156489906, 0.72542268735015081, 0.30411944968409288]], [[0.43223908791872279, -0.031384323435708961, -0.27138787236554074, 0.94846267932468575], [-0.003171134402055964, -0.23874859540786719, -0.88544193420317718, 0.81720893129705563], [0.9901501746767003, 0.23991422240922367, 0.10638468953085067, 0.4302537013800245]]], [[[-0.85020088072889277, 0.4552859449987976, -0.92342379862574431, 0.21936304106407478], [0.41100362018711367, 0.69396272891408439, 0.4157617323953402, 0.79743336407104493], [-0.59192141405336196, -0.084339584940965606, -0.52187164926130802, -0.12126412509513074]], [[0.40596845427308348, 0.24314808354086681, 0.85019356732762463, 0.68633031900498054], [0.13575440057734922, -0.056231914047657483, -0.71847761514904684, 0.16852540949725237], [-0.45562770062897218, 0.61253598275865895, -0.018428323215295084, 0.63750932492290602]]], [[[-0.95140029572331875, 0.35903135903332606, 0.35062441928298194, 0.27289245766078674], [0.95038622171897491, 0.065120389529117251, 0.39001097938148432, 0.41345777245129756], [0.42532849657704208, 0.19939457782565295, 0.77528674822056765, -0.050697957849086928]], [[-0.24970902580501475, -0.78386638935427833, -0.25378258399293552, -0.83330630180475596], [-0.030380655291931902, -0.96043242888909464, -0.14531326816314305, 0.39809472723243222], [-0.66171460089490175, -0.51291855133171671, 0.36594014782248796, 0.80253386528405168]]]]),self.functionspace)
15250          res=minval(arg)
15251          ref=Data(-0.960432428889,self.functionspace)
15252          self.failUnless(isinstance(res,Data),"wrong type of result.")
15253          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15254          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15255       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15256       def test_minval_expandedData_rank0(self):
15257          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15258          arg=msk_arg*(-0.778944214859)+(1.-msk_arg)*(0.953941502903)
15259          res=minval(arg)
15260          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15261          ref=msk_ref*(-0.778944214859)+(1.-msk_ref)*(0.953941502903)
15262          self.failUnless(isinstance(res,Data),"wrong type of result.")
15263          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15264          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15265       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15266       def test_minval_expandedData_rank1(self):
15267          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15268          arg=msk_arg*numarray.array([-0.73159504520188157, 0.68299192035807255])+(1.-msk_arg)*numarray.array([-0.3100681210597318, -0.65103554359904581])
15269          res=minval(arg)
15270          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15271          ref=msk_ref*(-0.731595045202)+(1.-msk_ref)*(-0.651035543599)
15272          self.failUnless(isinstance(res,Data),"wrong type of result.")
15273          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15274          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15275       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15276       def test_minval_expandedData_rank2(self):
15277          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15278          arg=msk_arg*numarray.array([[-0.52277742513644765, -0.2277572152261802, -0.9511128526148902, 0.32017435807815242, -0.11136201958976244], [-0.80459257355669767, -0.95924143992579869, 0.50769588182449388, 0.86438625827388305, 0.16860560966597427], [-0.72754696854920198, 0.67889538815250394, 0.6088408927519946, -0.72782010895545679, 0.56616049103099786], [-0.11534623429520585, -0.092041379862312089, 0.56715923140761726, 0.0028734812988140401, -0.13593267576797796]])+(1.-msk_arg)*numarray.array([[0.32400946916673323, -0.99131325248594693, -0.29006290223719677, -0.81287830308772602, -0.14575320006496795], [0.23894418840621556, 0.99107715887800141, 0.69785171074135177, 0.20540649144636669, -0.022178813617514059], [0.97125674513729066, 0.54103580977289178, -0.69594163458966074, 0.045941422243358288, 0.51911179383180106], [-0.040941899113513314, 0.29908960491193759, 0.31070274901135231, -0.42386794845092379, -0.14020897842782176]])
15279          res=minval(arg)
15280          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15281          ref=msk_ref*(-0.959241439926)+(1.-msk_ref)*(-0.991313252486)
15282          self.failUnless(isinstance(res,Data),"wrong type of result.")
15283          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15284          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15285       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15286       def test_minval_expandedData_rank3(self):
15287          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15288          arg=msk_arg*numarray.array([[[0.2243593847183587, -0.55964269546917778], [0.086055585732637496, 0.85322676708491429]], [[-0.95462358187710294, -0.85991920026432767], [0.19704146031466507, 0.12266428022749887]], [[0.62491825811592427, 0.74058421362755578], [-0.00909447859974577, -0.98100849454252903]], [[-0.35262739845910374, -0.92427752522606532], [0.26279257951943724, -0.94076289760274867]], [[0.2774731787257616, 0.66406607908393478], [-0.10466380765605798, 0.9590095850576017]], [[-0.63686305073922522, 0.8055769733197482], [-0.18278593082199945, -0.34288116248154421]]])+(1.-msk_arg)*numarray.array([[[0.57238934623145776, -0.6008625917571444], [0.3693766407620318, 0.70221455793260423]], [[-0.58848946803840674, -0.096161764675626982], [0.78217332385378691, 0.61375244943994911]], [[-0.30778069185951695, -0.55126352159863301], [0.6408299490321927, 0.99953805406121954]], [[0.26931958474181017, -0.60531989284036225], [-0.89886607437725319, 0.74907780969586568]], [[0.57734208195866099, -0.58661021170011907], [0.38922797525267239, 0.29493691914357334]], [[0.46695639713123049, 0.23171759126301761], [-0.052706998692634732, -0.78334544272850204]]])
15289          res=minval(arg)
15290          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15291          ref=msk_ref*(-0.981008494543)+(1.-msk_ref)*(-0.898866074377)
15292          self.failUnless(isinstance(res,Data),"wrong type of result.")
15293          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15294          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15295       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15296       def test_minval_expandedData_rank4(self):
15297          msk_arg=whereNegative(self.functionspace.getX()[0]-0.5)
15298          arg=msk_arg*numarray.array([[[[0.46483848448463783, -0.87939053653747745, 0.18006027907711064, 0.59393412035549553], [-0.060446335653558059, -0.58654265140261042, -0.7103456625567921, -0.87737620348261225], [0.7915602685554104, 0.058998481855049523, 0.68263476322383454, -0.346029376351082]], [[0.11758788080658089, 0.24948633626899586, -0.6136373781657769, 0.99819746973171686], [-0.5990037217573525, 0.81089434898012391, -0.79998545086485873, -0.99177417401308809], [-0.77652852159987606, -0.2482337515175721, 0.11649788623113655, -0.074557844494566483]]], [[[0.26806387309289925, 0.82459759920272702, 0.33106191528634432, 0.89462805607445128], [-0.19028989619203829, 0.68615021175809709, 0.44076423865654846, 0.2756983480068973], [-0.77132677194140387, 0.99573172063081605, -0.57302930492670434, -0.50733002523701476]], [[-0.84471955813954591, -0.85176783029149705, -0.92684957977259796, 0.59023847705979327], [0.68196420699586402, 0.58361004083768364, -0.71922201576501466, -0.20596576225294583], [0.79395039679328305, 0.472333500890604, -0.13097923185774984, 0.24331532019306423]]], [[[-0.83479197740948829, -0.0075589700651166325, -0.78975633265041978, 0.018667115085772901], [-0.049769243736694113, 0.5209394114068675, 0.065925130190574111, -0.7431184749488009], [0.62313144993384539, -0.98514078085147361, -0.87222126612101603, 0.90735220611080991]], [[0.79727858426486953, -0.85669952349479006, -0.74511584235611039, 0.026323551913185472], [-0.23933451992599641, 0.60640846085161648, -0.14396449329896144, 0.16035835222923356], [-0.050012848665722975, 0.5731667028545524, 0.99860242361478924, 0.32146275555560866]]]])+(1.-msk_arg)*numarray.array([[[[0.62874848202922995, 0.25537251444066023, -0.698374966993069, -0.38687588298399156], [0.49378024086811134, 0.7769539896932669, -0.10934606676333569, -0.21298971767267072], [-0.61708921394679916, -0.84745222820602195, 0.80837213654566931, 0.43012734925042673]], [[0.46908437808287862, 0.15847492833174037, 0.43970355055642618, -0.45249108496330326], [-0.99773656166168645, -0.30411024919059959, 0.29944789752031253, -0.92091659949825022], [0.14139835253841881, 0.65286819300206411, -0.33942314449708033, -0.25137887940591175]]], [[[0.12370235507304339, -0.26504015746942589, -0.77988713910590435, -0.90788635421965291], [-0.90705126108317047, 0.069929652428008193, 0.99718954015895278, -0.97450250453685361], [-0.70326152893105709, -0.091126066100986503, 0.78506550006102915, -0.72917498081256715]], [[0.42629906246786486, -0.91603749611465091, 0.31297245971177445, -0.8326590552190356], [0.3039549953318279, -0.71996259445943389, 0.9724420712657329, 0.41592436425988466], [0.57718038790671078, -0.39375559879969191, 0.55089171490650224, -0.15686786098227512]]], [[[0.91433628175647907, -0.8335217876290042, 0.14319348718149993, -0.15460951345782847], [-0.1413557115515387, -0.7965552409354113, -0.6647827134700568, -0.6562005559403794], [0.8996333133589296, -0.60792710713831077, 0.32829660654943127, 0.59993702653925007]], [[-0.20459622156626156, 0.54626282250284341, -0.12114642969601674, 0.31432342880341024], [0.44005219027624398, 0.45505989580530981, -0.30837994783093614, -0.88417181461185046], [0.2415549698483368, 0.03180095496331381, 0.53977209810077453, -0.41688385798938143]]]])
15299          res=minval(arg)
15300          msk_ref=whereNegative(self.functionspace.getX()[0]-0.5)
15301          ref=msk_ref*(-0.991774174013)+(1.-msk_ref)*(-0.997736561662)
15302          self.failUnless(isinstance(res,Data),"wrong type of result.")
15303          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15304          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15305       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15306       def test_minval_Symbol_rank0(self):
15307          arg=Symbol(shape=())
15308          res=minval(arg)
15309          s=numarray.array(0.507552163379)
15310          sub=res.substitute({arg:s})
15311          ref=numarray.array(0.507552163379)
15312          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15313          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15314          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15315       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15316       def test_minval_Symbol_rank1(self):
15317          arg=Symbol(shape=(2,))
15318          res=minval(arg)
15319          s=numarray.array([-0.91662367981879389, 0.4198006315668994])
15320          sub=res.substitute({arg:s})
15321          ref=numarray.array(-0.916623679819)
15322          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15323          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15324          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15325       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15326       def test_minval_Symbol_rank2(self):
15327          arg=Symbol(shape=(4, 5))
15328          res=minval(arg)
15329          s=numarray.array([[-0.29337465001819196, -0.77796361836910588, -0.89749043450493105, -0.30862487900038871, -0.70192214194857039], [0.32648534255716855, -0.49853672033206786, 0.5321845912370422, -0.41073302045635973, 0.69340061132124431], [0.18677397167288512, -0.097444503848439723, -0.73427289237530968, -0.083215357445101779, 0.45520990018299456], [-0.31795318366211545, 0.20616805454437204, -0.17213590096670628, -0.76229813913637035, -0.35120268435512259]])
15330          sub=res.substitute({arg:s})
15331          ref=numarray.array(-0.897490434505)
15332          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15333          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15334          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15335       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15336       def test_minval_Symbol_rank3(self):
15337          arg=Symbol(shape=(6, 2, 2))
15338          res=minval(arg)
15339          s=numarray.array([[[0.19787414830345895, -0.83614351915117124], [0.70465412179102649, -0.71002022632149742]], [[0.81645203466857263, 0.91407138577859182], [0.38547438044064064, -0.55666606361332716]], [[0.51370337369414099, 0.16963095730213662], [-0.58399537330570461, -0.55230646275547146]], [[0.29049739131217689, -0.0720172223089941], [-0.96983918996585916, 0.51489468570566843]], [[0.13904641777983495, -0.87888001594027254], [0.32331935423855418, -0.82815742739942078]], [[-0.36262489347610316, 0.30954921036914085], [-0.42974067125100524, 0.9266653571196346]]])
15340          sub=res.substitute({arg:s})
15341          ref=numarray.array(-0.969839189966)
15342          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15343          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15344          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15345       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
15346       def test_minval_Symbol_rank4(self):
15347          arg=Symbol(shape=(3, 2, 3, 4))
15348          res=minval(arg)
15349          s=numarray.array([[[[-0.67204900739511442, 0.079085406493733856, 0.97677785188509803, 0.94557784438874659], [0.12239779387385918, 0.86627851699886183, -0.36946732134418769, -0.70617340880458124], [0.24141727311903627, -0.94850436864188348, 0.16737990162277239, -0.072616615620619607]], [[-0.19148084528543063, 0.58974721439935518, 0.55319361396862932, 0.2422553723611387], [0.69587824938085685, 0.09702291548199371, -0.57238614850606528, -0.88536417372801646], [0.30840250472613961, 0.020292775561606913, 0.62190212773666875, 0.5059728452345762]]], [[[-0.038225938910192436, -0.20695630371165841, -0.79863023778085962, -0.46144649239755009], [0.55000801875597216, 0.69942471565638287, 0.068075289082253132, 0.22836677446143527], [-0.72463016623204002, -0.32617501811299943, -0.36339847276810211, 0.54011926154638457]], [[0.29907990355289482, 0.020926800856375882, -0.46153676616958106, 0.92008751838836167], [-0.67169679401477755, 0.72033164480782097, -0.75285035539577416, -0.99134720332088344], [0.62283206161782712, -0.69037349091033362, -0.79078624397300334, -0.90587366471377373]]], [[[0.85391675278457169, -0.83245327001211056, -0.32234378036426437, -0.57881382583353158], [0.90771758957613469, 0.71452345688521013, 0.61018013142535299, 0.39091962322647666], [0.10625949427712555, -0.66133568616262206, 0.51510640316003498, -0.077037055946355792]], [[0.22077697247490713, 0.28005938219753945, 0.72657043828819989, 0.28347053543030953], [0.10271021703995697, 0.57252635714826261, -0.22174337092349861, -0.20807672273459987], [-0.15165813092622726, 0.67397147411685321, -0.38153334733453392, -0.18873735174358863]]]])
15350          sub=res.substitute({arg:s})
15351          ref=numarray.array(-0.991347203321)
15352          self.failUnless(isinstance(res,Symbol),"wrong type of result.")
15353          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
15354          self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
15355    
15356  class Test_util_unary_with_tagged_data(Test_util_base):  class Test_util_unary_with_tagged_data(Test_util_base):
15357     """     """
# Line 16007  class Test_util_unary_with_tagged_data(T Line 16557  class Test_util_unary_with_tagged_data(T
16557        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Data),"wrong type of result.")
16558        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
16559        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16560       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16561       def test_length_taggedData_rank0(self):
16562          arg=Data(0.0304173948959,self.functionspace)
16563          arg.setTaggedValue(1,0.218413236568)
16564          res=length(arg)
16565          ref=Data(0.0304173948959,self.functionspace)
16566          ref.setTaggedValue(1,0.218413236568)
16567          self.failUnless(isinstance(res,Data),"wrong type of result.")
16568          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16569          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16570       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16571       def test_length_taggedData_rank1(self):
16572          arg=Data(numarray.array([0.39703364688152853, -0.33246454817593807]),self.functionspace)
16573          arg.setTaggedValue(1,numarray.array([-0.53598331151915435, 0.50067334409291053]))
16574          res=length(arg)
16575          ref=Data(0.517849777976,self.functionspace)
16576          ref.setTaggedValue(1,0.73345204868)
16577          self.failUnless(isinstance(res,Data),"wrong type of result.")
16578          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16579          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16580       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16581       def test_length_taggedData_rank2(self):
16582          arg=Data(numarray.array([[0.6907462872229877, -0.90522553862549726, 0.087785407451554276, 0.30466419540456768, 0.79322552033540972], [0.88191058742529571, 0.99529532885936489, 0.41490962783197238, -0.0016893790093754912, -0.95814885065677502], [-0.060249764286741447, 0.63991926602596116, -0.086836131633126534, 0.18124915949321885, 0.68271069967418541], [0.64740861624348423, -0.57455334179273243, -0.5571704702710476, 0.2573850096331336, -0.34168400956685985]]),self.functionspace)
16583          arg.setTaggedValue(1,numarray.array([[0.81018021133002383, 0.99939497604482352, -0.14079723796118393, 0.40272555558488365, 0.18472338544851841], [-0.07594389046701755, 0.63538212017493612, -0.60010668894251618, -0.33610184381106811, -0.15191875538531718], [-0.24439106568273194, 0.66671313634788354, 0.14904931462513904, -0.58653890475427217, -0.58062369844301442], [0.098248585440467551, 0.20530555521782179, -0.51610019710067645, 0.16323562948354797, -0.71041456409833881]]))
16584          res=length(arg)
16585          ref=Data(2.6546513714,self.functionspace)
16586          ref.setTaggedValue(1,2.19865063671)
16587          self.failUnless(isinstance(res,Data),"wrong type of result.")
16588          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16589          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16590       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16591       def test_length_taggedData_rank3(self):
16592          arg=Data(numarray.array([[[-0.90704201804086337, 0.6329509253938721], [0.21915003710942882, -0.77286765743151387]], [[-0.49454988231884833, -0.52787084998857448], [-0.50038642296401559, 0.25066877240869223]], [[-0.11435301241890539, -0.43863272457515157], [-0.21789841788237019, 0.67485153176592272]], [[-0.55566679864765667, -0.57930055750016884], [0.86011645143557036, -0.7526814967676656]], [[0.51094878077660111, 0.77929881123688749], [-0.42495639450230005, -0.07585333420623952]], [[-0.89054330821722716, -0.35325589691741888], [-0.3768246899267691, -0.41975230182765833]]]),self.functionspace)
16593          arg.setTaggedValue(1,numarray.array([[[-0.12217784564610956, -0.42220631009895904], [-0.61429599365799681, 0.61618111022446365]], [[-0.97675816669720295, 0.82574624011080133], [0.81295724921140167, 0.25317345312076855]], [[-0.051786152179434497, 0.7305249935930429], [-0.93380271417452732, 0.50018267655097737]], [[-0.80264399896632499, 0.79509218774376844], [-0.21791667132633941, 0.66634447245200645]], [[-0.55794532541196795, -0.048202617623965605], [-0.05960274244353414, 0.74611871917265127]], [[0.88304823875965166, 0.42665187568627805], [-0.43824304428388317, -0.62742457744585889]]]))
16594          res=length(arg)
16595          ref=Data(2.76676324475,self.functionspace)
16596          ref.setTaggedValue(1,3.02637754858)
16597          self.failUnless(isinstance(res,Data),"wrong type of result.")
16598          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16599          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16600       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16601       def test_length_taggedData_rank4(self):
16602          arg=Data(numarray.array([[[[0.031685672552886901, -0.9267701908635706, -0.056148458903377607, -0.84202454095770185], [-0.3616646666858836, -0.29520741814627049, 0.024595806152944988, -0.71158936975814591], [0.12440081378701895, 0.72960501658634347, -0.87170545922253151, 0.10882643738812559]], [[0.88800242901141169, 0.48693301422640589, -0.13887736360495673, -0.743971681222801], [-0.74717247198853753, 0.35260473534815429, 0.43837149883392601, -0.55027619071689737], [0.66850441314063103, 0.7728717623705943, 0.21470523696142552, -0.71541050236116877]]], [[[-0.48211303782598347, 0.3644457740018654, 0.68984391713960602, 0.74515540572117134], [0.53899835618675929, -0.70996632321229947, -0.51515930082178918, -0.36888505048093223], [0.78774470226335747, -0.39544353241612185, 0.32281697817612787, -0.16311128990188162]], [[-0.51374217556516255, -0.45792789001444856, 0.47007708506811818, -0.43333371235667362], [-0.02632140668309213, 0.93007210792179462, 0.59736202366291802, 0.22152676969085516], [0.39775547303207204, 0.53313877938239496, 0.77934427730455358, -0.21566366366398793]]], [[[0.91343257162829294, -0.77320607588319645, -0.85087366672245945, -0.8231988743945351], [0.2844336912954244, -0.91728899258227847, -0.46154275241222287, -0.93255280333208801], [-0.53369991345904522, 0.12949000049493731, 0.53421477536661266, -0.63975708880504234]], [[0.058270730436794649, 0.0515918698875375, -0.24523619977036026, 0.29671975332241707], [-0.95019879958514597, -0.94737283445325193, -0.41748226318386861, -0.048340741857560765], [0.59312485406738369, -0.30988717510892605, 0.090027828305644153, -0.51722372921834436]]]]),self.functionspace)
16603          arg.setTaggedValue(1,numarray.array([[[[-0.20169792059747449, 0.13920330493621691, 0.034614492760971061, -0.82851290218784412], [-0.01651072019815425, -0.78097847045185942, -0.13764015571975197, -0.35461745589441884], [-0.49540307831103148, 0.2474487427834613, 0.22695961470352821, -0.37681697269105396]], [[0.68611428610099079, -0.29255652866384385, -0.42345462193199213, 0.82794567130265717], [-0.092325345849896712, -0.15183768034385192, 0.13712248884188671, -0.72118044002659931], [-0.050604578031925973, -0.58555183018848322, -0.92016117326965108, 0.90294256985722066]]], [[[0.37734783987332321, 0.50440698564950592, -0.98813708121482202, 0.35026860039322605], [0.69439644470699591, -0.065391298373910445, 0.22537555580617075, -0.56010684906819108], [0.8850708627713344, 0.33442383771972017, -0.88133340777125468, 0.79499967022722062]], [[0.84658289102126205, -0.45737265507509539, 0.22891245018035788, 0.66506738603993654], [0.30854215900653492, -0.15997939628404678, 0.60133183458548922, 0.41180859119482771], [-0.82182443995887455, 0.40193978476563985, -0.47097558780935489, -0.78813126661061927]]], [[[-0.60025729863753186, -0.47916988408835803, -0.66879674780784004, -0.34290183723542933], [0.86889784066785403, 0.32127797136956282, 0.96139056560192393, 0.19777452842099286], [-0.52352911870216756, 0.70260881377974083, -0.83733962168226328, -0.56735885586741075]], [[-0.94301726877443093, -0.25226331153593828, 0.52038556769907629, 0.53828722724477851], [-0.70767715580900048, -0.57712655180776129, -0.14200458485618395, -0.1111721398291996], [0.64852743898007059, 0.99188751270956743, 0.55982434354197941, 0.038358717131004916]]]]))
16604          res=length(arg)
16605          ref=Data(4.84097039803,self.functionspace)
16606          ref.setTaggedValue(1,4.824055271)
16607          self.failUnless(isinstance(res,Data),"wrong type of result.")
16608          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16609          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16610       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16611       def test_maxval_taggedData_rank0(self):
16612          arg=Data(-0.219558082185,self.functionspace)
16613          arg.setTaggedValue(1,0.373894454941)
16614          res=maxval(arg)
16615          ref=Data(-0.219558082185,self.functionspace)
16616          ref.setTaggedValue(1,0.373894454941)
16617          self.failUnless(isinstance(res,Data),"wrong type of result.")
16618          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16619          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16620       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16621       def test_maxval_taggedData_rank1(self):
16622          arg=Data(numarray.array([0.64744990357184862, -0.52792070755787024]),self.functionspace)
16623          arg.setTaggedValue(1,numarray.array([-0.10929307972444979, 0.83862721932489936]))
16624          res=maxval(arg)
16625          ref=Data(0.647449903572,self.functionspace)
16626          ref.setTaggedValue(1,0.838627219325)
16627          self.failUnless(isinstance(res,Data),"wrong type of result.")
16628          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16629          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16630       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16631       def test_maxval_taggedData_rank2(self):
16632          arg=Data(numarray.array([[-0.27229065227200344, 0.82294949506313886, -0.17177977432508462, -0.010882074546768816, 0.21768109521645918], [-0.29157181238782481, -0.25380425885757485, 0.027706303762511597, -0.94845012536927964, 0.87176092732644639], [-0.51643332578214518, 0.71998926614777581, 0.40354991809580687, 0.70904315000536799, 0.54655648312080007], [0.32165817766188853, -0.20424131255028888, 0.42895961651274672, -0.99791274480618064, -0.85669519376242986]]),self.functionspace)
16633          arg.setTaggedValue(1,numarray.array([[0.97262314128809613, 0.48547675148247826, 0.042278165643087728, -0.41624875992248667, 0.030567800083523444], [-0.049791194357233781, -0.79704488987202815, -0.96082903842770118, -0.83554878345036676, 0.60236115537073709], [0.28354667286636603, -0.29929954525932323, 0.022969958455315576, -0.24737146774844909, 0.19469978983867731], [-0.35513081769146426, -0.1046032314241474, 0.49567238233255839, -0.80993625419310633, -0.9139531605288036]]))
16634          res=maxval(arg)
16635          ref=Data(0.871760927326,self.functionspace)
16636          ref.setTaggedValue(1,0.972623141288)
16637          self.failUnless(isinstance(res,Data),"wrong type of result.")
16638          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16639          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16640       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16641       def test_maxval_taggedData_rank3(self):
16642          arg=Data(numarray.array([[[0.61474553298852697, 0.55779486217197505], [-0.31091458562805419, 0.016419889635135521]], [[0.21004151551334682, 0.027687106765762914], [0.6637113716450791, -0.95040841718825075]], [[-0.9300566761481408, -0.68906964030797435], [-0.97014359375905679, -0.74418973910997255]], [[0.97835172429442774, -0.46756642182408092], [-0.42578086461554476, 0.52069167480569556]], [[-0.38782064307268715, 0.49053364163876134], [0.068892813320603263, -0.053107367737293076]], [[-0.48133213301475331, 0.25593099013174481], [0.44390577068431614, -0.97257874780052989]]]),self.functionspace)
16643          arg.setTaggedValue(1,numarray.array([[[0.257603663342449, -0.038214017051409144], [-0.66873613005791666, -0.035099420794828529]], [[0.91705389480638777, -0.92302237979729274], [0.7106922910822433, -0.94404085701758933]], [[-0.79556970254884352, -0.25132479916123152], [0.29858220297465121, 0.90707472048112803]], [[-0.29244201831636918, -0.017346997146175047], [0.12733928111159498, -0.38855138005928658]], [[0.14291175066952921, -0.49761469275017678], [-0.76189392983334514, 0.84493776228691786]], [[-0.22005917389939156, -0.61656374043989004], [0.99298796284139845, -0.067815876101644967]]]))
16644          res=maxval(arg)
16645          ref=Data(0.978351724294,self.functionspace)
16646          ref.setTaggedValue(1,0.992987962841)
16647          self.failUnless(isinstance(res,Data),"wrong type of result.")
16648          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16649          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16650       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16651       def test_maxval_taggedData_rank4(self):
16652          arg=Data(numarray.array([[[[-0.38913213142622194, -0.54148345216537774, 0.41714738540363649, 0.71966537757449256], [-0.88902480268446227, -0.3777307304947799, -0.13183640051157219, 0.81415347389128234], [-0.74384993993115311, -0.89127969698262977, -0.55809388984463593, 0.83808549468591687]], [[-0.0072160550394104739, -0.32635219120000691, 0.62522095163012725, -0.84470730211227218], [-0.76620143726977852, -0.49704334323428423, 0.65091921570676603, 0.37557075348586233], [-0.88570985653924961, -0.14885693428091606, -0.1460372910003831, 0.46444747179886625]]], [[[0.30454098886894498, 0.6867161497858465, 0.72424680264691355, 0.5095615427094411], [0.072474613257559994, 0.43806936539601549, -0.59905605757280056, -0.45990321243729815], [-0.72712992491035378, -0.55689232155025548, 0.36037470124764459, -0.57195607819276018]], [[0.0051060589653528776, -0.47599982553998998, -0.39156196066990367, -0.71880248868370389], [0.41451955450758748, 0.0028147774045290674, -0.6972003711983854, 0.78507608882318736], [0.25418862509575768, 0.2284337652701498, 0.61856440627353049, 0.98714160660309891]]], [[[-0.47720293386376555, -0.65125648891362786, -0.30435692372835654, 0.31977497838442503], [0.72827978446594854, -0.63983256938337552, 0.78982468457827881, 0.22954824117307959], [0.32315333011323544, 0.53527371494472065, -0.4131594330366064, 0.99215992692482535]], [[-0.74789735956161274, -0.62925352602039042, 0.71361119864052269, -0.98014330258009075], [-0.89800389430130223, -0.37060754911664562, 0.3856639538855593, 0.034422663486305183], [-0.34490780926818876, 0.47458909120499637, 0.94818559671902958, 0.1617906804998257]]]]),self.functionspace)
16653          arg.setTaggedValue(1,numarray.array([[[[0.99933153424495091, -0.39534988719092179, -0.16778504692207585, -0.5906967701363508], [0.43387683071959104, 0.99162615949373745, 0.10547807703791179, -0.8113777964293909], [0.24291475766513315, -0.71669244345435779, -0.76485897580613305, 0.15564799608712043]], [[-0.75156489257223669, -0.055450247835175936, 0.3346750287693776, -0.66254424416459123], [0.35374045325725345, -0.051590559912436884, -0.587757300739292, -0.33917336326606917], [-0.57544619252547657, 0.20907053572412782, 0.68711149771337832, -0.056393263581338671]]], [[[0.75211852960020509, -0.10030934714915718, 0.33951992771212902, 0.60018880521446327], [0.78716758837909295, -0.059231168586686644, -0.35866282572045227, 0.85083431016927791], [0.15298677857710419, 0.89780425582787293, -0.20576313384645473, 0.062421360873735843]], [[-0.70974271086498986, -0.45339037418498562, 0.41140062690705359, -0.37665346319424886], [-0.044537762904711675, -0.39079696673697262, 0.089532841376569916, 0.2190192547531522], [0.36139300850043266, -0.44279309647849896, -0.86452061630608856, -0.1231662099055526]]], [[[-0.58039192544896112, 0.53706765389132238, -0.72356516474408639, 0.6503741573846944], [-0.30912719510660591, -0.83285543652320859, -0.37306494080273778, 0.6518672264629326], [0.98787250878747979, 0.54733052031198159, -0.15622032199949798, 0.09467999908286262]], [[0.40533336391796038, 0.73239200515802327, 0.39369121056194256, 0.081340379201521706], [-0.88455610311843214, 0.51118489146623691, -0.19795740083901325, 0.46388740676326989], [0.54780674501660931, 0.63586854173407947, 0.92134722611145814, -0.39904465723137394]]]]))
16654          res=maxval(arg)
16655          ref=Data(0.992159926925,self.functionspace)
16656          ref.setTaggedValue(1,0.999331534245)
16657          self.failUnless(isinstance(res,Data),"wrong type of result.")
16658          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16659          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16660       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16661       def test_minval_taggedData_rank0(self):
16662          arg=Data(0.00722788253378,self.functionspace)
16663          arg.setTaggedValue(1,0.691024712935)
16664          res=minval(arg)
16665          ref=Data(0.00722788253378,self.functionspace)
16666          ref.setTaggedValue(1,0.691024712935)
16667          self.failUnless(isinstance(res,Data),"wrong type of result.")
16668          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16669          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16670       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16671       def test_minval_taggedData_rank1(self):
16672          arg=Data(numarray.array([-0.47859075115756422, -0.15003593348682531]),self.functionspace)
16673          arg.setTaggedValue(1,numarray.array([-0.067933816863879004, -0.74579305994260148]))
16674          res=minval(arg)
16675          ref=Data(-0.478590751158,self.functionspace)
16676          ref.setTaggedValue(1,-0.745793059943)
16677          self.failUnless(isinstance(res,Data),"wrong type of result.")
16678          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16679          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16680       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16681       def test_minval_taggedData_rank2(self):
16682          arg=Data(numarray.array([[-0.36168873882657993, -0.67372921463813573, 0.95569685886688305, 0.15779096197431586, -0.24898227425545327], [-0.27356968554638628, 0.084426955507445944, -0.87908626632112941, -0.46051995344239027, -0.42541441304041916], [-0.14074836177854189, 0.75123070420356286, 0.86230982812739998, -0.54837108857321315, -0.77749802778211086], [-0.022482114313683077, 0.54155540121340873, -0.96328224231771142, 0.14101127782001344, 0.44096380596153772]]),self.functionspace)
16683          arg.setTaggedValue(1,numarray.array([[-0.4800201278086158, 0.030265479756139024, 0.18506553588051, 0.034952750086585604, 0.31613749260546875], [0.21702894874281076, 0.9905115362133845, 0.12091812867766771, -0.51948993749364369, 0.28399846164050846], [-0.12574413416415542, -0.28875489198619508, -0.98032997474740724, 0.26065946805344775, -0.79682683032993196], [0.78279712230924381, 0.49596074793599509, 0.61578931696589767, -0.32674782393935087, 0.15592301292387312]]))
16684          res=minval(arg)
16685          ref=Data(-0.963282242318,self.functionspace)
16686          ref.setTaggedValue(1,-0.980329974747)
16687          self.failUnless(isinstance(res,Data),"wrong type of result.")
16688          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16689          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16690       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16691       def test_minval_taggedData_rank3(self):
16692          arg=Data(numarray.array([[[-0.8465826019970264, 0.89694911727829285], [0.87594383540616905, 0.94342173268714724]], [[0.9706521300307176, -0.53661304945739108], [0.81066921409276915, -0.52315847873793642]], [[0.72760204320037447, 0.65094570568679222], [-0.77119150241041834, 0.4512829012153714]], [[0.49454458456031469, 0.58663758011234646], [-0.77569241585888848, -0.27133491940751875]], [[0.29690990109617243, 0.50502608076647637], [-0.7582923726315618, 0.0096946343625710085]], [[-0.4250267226063793, -0.6090497397361152], [0.098508158636596344, -0.56684989375571737]]]),self.functionspace)
16693          arg.setTaggedValue(1,numarray.array([[[0.31462028021419175, 0.59740363549297837], [0.054399091875714456, 0.089606631226896605]], [[0.9748509842440114, -0.39638194564239226], [0.20679313347688, -0.60337302735508302]], [[-0.8191687096963598, -0.81394151814838511], [0.44868905032346196, -0.28406609436304642]], [[0.12384704256533041, -0.95904548813036494], [0.61285482385311929, -0.17959569661829544]], [[0.19304181831790745, 0.36508908336882229], [-0.41743150582026445, -0.29917104704693598]], [[0.16069761697480067, 0.26671853918691113], [-0.5774634268596528, -0.31004354846465287]]]))
16694          res=minval(arg)
16695          ref=Data(-0.846582601997,self.functionspace)
16696          ref.setTaggedValue(1,-0.95904548813)
16697          self.failUnless(isinstance(res,Data),"wrong type of result.")
16698          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16699          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16700       #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16701       def test_minval_taggedData_rank4(self):
16702          arg=Data(numarray.array([[[[-0.34624369284201362, 0.73107822148429458, -0.36551693557416232, -0.020215028669572366], [0.1351050067633206, 0.23249118524493095, -0.76011821576308392, 0.45071155860356837], [0.18426006390789262, -0.77886194275054765, -0.17063189696766501, 0.45075347499478347]], [[0.23551925256442985, -0.53414385378966478, -0.47679787077175595, -0.9726535726299459], [-0.91914615413530365, -0.17765391232754735, 0.45082787140479064, -0.968362694999094], [0.69666777807602775, 0.2130684865225696, 0.64760593585671877, 0.64903684670519413]]], [[[0.18180576019742634, 0.62890796445359309, -0.13877607363038269, -0.10822311814395635], [0.28895838281375896, -0.36598515521702191, 0.30413929033460807, -0.81140381230705128], [-0.76365479315177298, 0.71136700952304466, -0.95596671935962552, 0.52118084564552913]], [[-0.43905020629611879, 0.57723600864036473, -0.22582169869491397, -0.43742926957893391], [-0.46764952226860124, -0.066494182243584721, 0.92972113541559098, 0.044829809294563816], [-0.49878556156045928, -0.96153559198737559, -0.99767482086608483, 0.74525441641626755]]], [[[-0.59605054963850534, 0.56186148085748022, 0.77287286011247414, 0.035023085983731717], [-0.97342431925030803, 0.17825829308663432, -0.37794591543941247, 0.089384029569202106], [-0.75706695903965793, -0.31057995469060207, -0.57391135215614786, -0.56504897076385308]], [[0.42656492210469588, 0.92732907019274857, 0.71470561916432929, 0.96500484536009212], [0.18751272694170362, -0.95123662745307258, -0.8190703610202914, -0.66133004541039009], [-0.043758306539602554, 0.45325798844504162, -0.26304376860247247, 0.15468324307157122]]]]),self.functionspace)
16703          arg.setTaggedValue(1,numarray.array([[[[0.36591388135908987, -0.95486755838163839, -0.0013252788976745311, 0.69567157492793963], [-0.79676713780837027, 0.3214926946703327, -0.75096581427350828, 0.35710657155542735], [-0.97096953218037885, -0.3319681518796227, -0.57152204281278296, 0.10421746159115108]], [[-0.97119041056769873, 0.47173466396132091, 0.63208593730306029, -0.85656329130504094], [-0.62549849973292804, -0.75698243824438927, 0.46453304587151512, -0.42573348253225807], [-0.78748289295593743, 0.47450581221739219, -0.78643250843903134, 0.30232500379827609]]], [[[0.10369672224908166, 0.37373110705513635, 0.35557253428911517, -0.8134557994263798], [-0.63922930590149818, -0.34344343708131575, 0.081508957580154862, -0.045641914923246096], [0.045075125491382595, -0.81357712137145177, 0.19199928764727225, 0.98346733921059637]], [[0.016107659447112344, 0.36822191678862071, -0.05021241790306008, 0.50015935043378978], [0.011940872302404593, -0.46073951816738523, 0.71275071871696527, 0.55288336323320908], [-0.87646193066608746, -0.80998760193673003, 0.067859757365372753, 0.47872123549665657]]], [[[0.4683476290440689, 0.69014985356074243, -0.26471526741239182, 0.96932033126419936], [-0.1461901082287993, -0.76413258812010354, -0.67613738605542029, 0.60089152926266887], [0.41343229663812564, 0.64858241536864947, -0.84530164516922857, -0.79335799145751662]], [[-0.46974281932781614, -0.12403837218332758, 0.08729063956578309, 0.60621211421529453], [-0.82220451633893021, -0.54597977180396184, 0.58913700000503999, 0.087122789707702708], [-0.90671128506770948, -0.34903110797882597, 0.21581878455246306, 0.90495837687090042]]]]))
16704          res=minval(arg)
16705          ref=Data(-0.997674820866,self.functionspace)
16706          ref.setTaggedValue(1,-0.971190410568)
16707          self.failUnless(isinstance(res,Data),"wrong type of result.")
16708          self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
16709          self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
16710    
16711  class Test_util_unary(Test_util_unary_no_tagged_data,Test_util_unary_with_tagged_data):  class Test_util_unary(Test_util_unary_no_tagged_data,Test_util_unary_with_tagged_data):
16712     """     """

Legend:
Removed from v.292  
changed lines
  Added in v.313

  ViewVC Help
Powered by ViewVC 1.1.26