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

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

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

revision 3797 by gross, Thu Feb 2 09:28:59 2012 UTC revision 3798 by gross, Thu Feb 2 09:47:27 2012 UTC
# Line 91481  class Test_Util_SpatialFunctions_noGradO Line 91481  class Test_Util_SpatialFunctions_noGradO
91481        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")        self.assertEqual(res.shape,(3, 2, 3, 4),"wrong shape of result.")
91482        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.assertTrue(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
91483    
91484       def test_interpolate_onFunction_fromConstant_onSolution_rank0(self):
91485          """
91486          test interploation of constant rank 0 Data on Function
91487          """
91488          w_ref = Function(self.domain)
91489          w_arg = Solution(self.domain)
91490          val = 6.362630e-01
91491          arg = Data(val,(),w_arg)
91492          res=interpolate(arg,where=w_ref)
91493          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91494          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91495          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91496          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91497       def test_interpolate_onFunction_fromConstant_onSolution_rank1(self):
91498          """
91499          test interploation of constant rank 1 Data on Function
91500          """
91501          w_ref = Function(self.domain)
91502          w_arg = Solution(self.domain)
91503          val = numpy.array([0.7957880244283448, 0.15533461547618588, 0.31925558975590607] ,numpy.float_)
91504          arg = Data(val,w_arg)
91505          res=interpolate(arg,where=w_ref)
91506          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91507          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91508          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91509          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91510       def test_interpolate_onFunction_fromConstant_onSolution_rank2(self):
91511          """
91512          test interploation of constant rank 2 Data on Function
91513          """
91514          w_ref = Function(self.domain)
91515          w_arg = Solution(self.domain)
91516          val = numpy.array([[0.5337097756537618, 0.669144212053789], [0.8778275460207027, 0.9408348033958438], [0.9919800317313592, 0.08512409243777908], [0.6568953491049027, 0.5453496946801801]] ,numpy.float_)
91517          arg = Data(val,w_arg)
91518          res=interpolate(arg,where=w_ref)
91519          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91520          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91521          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91522          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91523       def test_interpolate_onFunction_fromConstant_onSolution_rank3(self):
91524          """
91525          test interploation of constant rank 3 Data on Function
91526          """
91527          w_ref = Function(self.domain)
91528          w_arg = Solution(self.domain)
91529          val = numpy.array([[[0.5966951769938136, 0.9023800941690662, 0.7543928363648372, 0.02125729862699577], [0.8617006703446602, 0.19596308006086305, 0.6290260410166618, 0.9811949926357305]], [[0.23559148624608328, 0.19976533379462902, 0.03540032306051344, 0.9435607556490764], [0.31608892743117745, 0.3473104124357085, 0.9934462072029586, 0.27540536718946873]]] ,numpy.float_)
91530          arg = Data(val,w_arg)
91531          res=interpolate(arg,where=w_ref)
91532          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91533          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91534          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91535          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91536       def test_interpolate_onFunction_fromConstant_onSolution_rank4(self):
91537          """
91538          test interploation of constant rank 4 Data on Function
91539          """
91540          w_ref = Function(self.domain)
91541          w_arg = Solution(self.domain)
91542          val = numpy.array([[[[0.1691131235693435, 0.6055594050441906, 0.7400865559364034, 0.6806037660239634], [0.5027676741487966, 0.28670377793963076, 0.7507170388527049, 0.22392593560562624], [0.32411717270339746, 0.45246860503476105, 0.36851989235523286, 0.5519653438071802]], [[0.6786519875629724, 0.8114097669629837, 0.123316362301787, 0.6499567602584536], [0.9612184906760717, 0.9345484321213999, 0.7470273148400671, 0.724248435412491], [0.8742842737881692, 0.350520533873211, 0.5624272559965394, 0.3475523964102293]]], [[[0.8352910738090578, 0.23073694505833098, 0.4881185812984198, 0.3234947704964498], [0.3777094349118537, 0.5138306419299246, 0.723324110275431, 0.8000651679901943], [0.7032663932010323, 0.021322898941749546, 0.49434113052521145, 0.4735751745643312]], [[0.4198616798316801, 0.8717761776532108, 0.026630328445474083, 0.37936155400847094], [0.6593584959905494, 0.3518822236130449, 0.5216959256650641, 0.5554302397678491], [0.5171075306880052, 0.2744288880526651, 0.34754996006843186, 0.8834443924378164]]], [[[0.13260986756648463, 0.15248351031704632, 0.2057701331582673, 0.6118614857156207], [0.31567423197178424, 0.9478817292191342, 0.19002330653826938, 0.7108763034183044], [0.5958255488011834, 0.6533230731696942, 0.2890221682034334, 0.5023634410996681]], [[0.005845250046578432, 0.96349348400995, 0.9902938895770659, 0.6292937335964623], [0.3979908531302859, 0.8125169905012566, 0.9279306639788383, 0.9711617514765443], [0.8606759832229987, 0.5740243646557076, 0.5439142860935084, 0.12276296123271802]]]] ,numpy.float_)
91543          arg = Data(val,w_arg)
91544          res=interpolate(arg,where=w_ref)
91545          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91546          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91547          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
91548          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91549       def test_interpolate_onFunction_fromConstant_onReducedSolution_rank0(self):
91550          """
91551          test interploation of constant rank 0 Data on Function
91552          """
91553          w_ref = Function(self.domain)
91554          w_arg = ReducedSolution(self.domain)
91555          val = 9.300056e-01
91556          arg = Data(val,(),w_arg)
91557          res=interpolate(arg,where=w_ref)
91558          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91559          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91560          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91561          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91562       def test_interpolate_onFunction_fromConstant_onReducedSolution_rank1(self):
91563          """
91564          test interploation of constant rank 1 Data on Function
91565          """
91566          w_ref = Function(self.domain)
91567          w_arg = ReducedSolution(self.domain)
91568          val = numpy.array([0.5720473919254031, 0.7735791099614414, 0.940160014446488] ,numpy.float_)
91569          arg = Data(val,w_arg)
91570          res=interpolate(arg,where=w_ref)
91571          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91572          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91573          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91574          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91575       def test_interpolate_onFunction_fromConstant_onReducedSolution_rank2(self):
91576          """
91577          test interploation of constant rank 2 Data on Function
91578          """
91579          w_ref = Function(self.domain)
91580          w_arg = ReducedSolution(self.domain)
91581          val = numpy.array([[0.19386089508579973, 0.35216292702931806], [0.7547503277968484, 0.16640497214044103], [0.9090461540570057, 0.990123429441133], [0.8626431222987505, 0.1639923938973007]] ,numpy.float_)
91582          arg = Data(val,w_arg)
91583          res=interpolate(arg,where=w_ref)
91584          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91585          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91586          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91587          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91588       def test_interpolate_onFunction_fromConstant_onReducedSolution_rank3(self):
91589          """
91590          test interploation of constant rank 3 Data on Function
91591          """
91592          w_ref = Function(self.domain)
91593          w_arg = ReducedSolution(self.domain)
91594          val = numpy.array([[[0.925049279799758, 0.9582667321701897, 0.8032728770748506, 0.0692901783185319], [0.5604273748159787, 0.9632692968062707, 0.43996851475907894, 0.20360878035494612]], [[0.7528262356163642, 0.563113710573778, 0.33819880179467743, 0.916829951049813], [0.8561133876813428, 0.12166096328071829, 0.7810547331591118, 0.11112962027788542]]] ,numpy.float_)
91595          arg = Data(val,w_arg)
91596          res=interpolate(arg,where=w_ref)
91597          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91598          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91599          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91600          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91601       def test_interpolate_onFunction_fromConstant_onReducedSolution_rank4(self):
91602          """
91603          test interploation of constant rank 4 Data on Function
91604          """
91605          w_ref = Function(self.domain)
91606          w_arg = ReducedSolution(self.domain)
91607          val = numpy.array([[[[0.534892202899736, 0.14438882912964368, 0.47139030653113767, 0.3878266069644377], [0.8857841695411337, 0.017622845046403657, 0.2348163007553563, 0.3221662422686701], [0.7760234364273709, 0.9725487772727028, 0.22566643102468198, 0.34815164395002396]], [[0.6431128039350013, 0.7101100959861724, 0.8940848637837294, 0.8830418934856877], [0.7762675382409253, 0.7595017385120263, 0.46661058103907727, 0.06425677098026605], [0.6658678564741213, 0.39616390430311144, 0.3148603688302921, 0.18338203783492424]]], [[[0.7283898902348546, 0.7287684361712117, 0.2606646905254971, 0.33114189608936484], [0.8508413094408469, 0.0883348760063053, 0.8817492997055513, 0.7115356634186207], [0.93906623889196, 0.523494600849017, 0.6503223649898034, 0.031463748239435985]], [[0.8474561630688064, 0.48441996359311457, 0.8886662913673627, 0.6007483126822258], [0.8325725892213632, 0.2739157486300309, 0.4117906927916668, 0.5104453001476653], [0.5670056768266356, 0.6013381493147748, 0.023236727481303676, 0.36999598568553327]]], [[[0.5072680465215346, 0.8265191807096115, 0.5861067519323756, 0.22141663546392287], [0.9574288611808698, 0.7794012559449628, 0.5549581839981548, 0.8025243456671689], [0.8987023346117079, 0.631438492390796, 0.6288652592325653, 0.09840467517999973]], [[0.748108251586945, 0.029448736325948133, 0.45885848578614175, 0.6973807249739707], [0.8267709666527009, 0.23464722557533646, 0.779310527109466, 0.8163930558754177], [0.9686035108121182, 0.27361593450101573, 0.5916200035259509, 0.04539880264503737]]]] ,numpy.float_)
91608          arg = Data(val,w_arg)
91609          res=interpolate(arg,where=w_ref)
91610          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91611          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91612          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
91613          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91614       def test_interpolate_onFunction_fromConstant_onContinuousFunction_rank0(self):
91615          """
91616          test interploation of constant rank 0 Data on Function
91617          """
91618          w_ref = Function(self.domain)
91619          w_arg = ContinuousFunction(self.domain)
91620          val = 2.247503e-01
91621          arg = Data(val,(),w_arg)
91622          res=interpolate(arg,where=w_ref)
91623          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91624          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91625          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91626          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91627       def test_interpolate_onFunction_fromConstant_onContinuousFunction_rank1(self):
91628          """
91629          test interploation of constant rank 1 Data on Function
91630          """
91631          w_ref = Function(self.domain)
91632          w_arg = ContinuousFunction(self.domain)
91633          val = numpy.array([0.6445867016253057, 0.313880983304601, 0.2737773769510353] ,numpy.float_)
91634          arg = Data(val,w_arg)
91635          res=interpolate(arg,where=w_ref)
91636          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91637          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91638          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91639          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91640       def test_interpolate_onFunction_fromConstant_onContinuousFunction_rank2(self):
91641          """
91642          test interploation of constant rank 2 Data on Function
91643          """
91644          w_ref = Function(self.domain)
91645          w_arg = ContinuousFunction(self.domain)
91646          val = numpy.array([[0.33707194263488527, 0.9630956282230024], [0.6510363673473158, 0.6970870528898714], [0.6419317185930951, 0.12746828138635213], [0.3351947035845553, 0.5978452458428561]] ,numpy.float_)
91647          arg = Data(val,w_arg)
91648          res=interpolate(arg,where=w_ref)
91649          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91650          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91651          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91652          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91653       def test_interpolate_onFunction_fromConstant_onContinuousFunction_rank3(self):
91654          """
91655          test interploation of constant rank 3 Data on Function
91656          """
91657          w_ref = Function(self.domain)
91658          w_arg = ContinuousFunction(self.domain)
91659          val = numpy.array([[[0.12213004243179515, 0.2784237245234691, 0.9546494291259062, 0.7371354605024819], [0.34779475823532235, 0.022828832154297762, 0.5022890253853662, 0.4279518504816101]], [[0.8645619763948243, 0.5488021749619477, 0.9622143743956186, 0.8198574046539782], [0.06963968225376582, 0.83577757487137, 0.24277444984478913, 0.09379841127974142]]] ,numpy.float_)
91660          arg = Data(val,w_arg)
91661          res=interpolate(arg,where=w_ref)
91662          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91663          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91664          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91665          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91666       def test_interpolate_onFunction_fromConstant_onContinuousFunction_rank4(self):
91667          """
91668          test interploation of constant rank 4 Data on Function
91669          """
91670          w_ref = Function(self.domain)
91671          w_arg = ContinuousFunction(self.domain)
91672          val = numpy.array([[[[0.2614323799260653, 0.8351042413345324, 0.7692308029368904, 0.2557005537146777], [0.7870363454045636, 0.24385941634421826, 0.31269851568289897, 0.026850874086864707], [0.9356315357918102, 0.2659278978585883, 0.8478134748134306, 0.8002775491090136]], [[0.08991515755148205, 0.000720124857735871, 0.8263194296435186, 0.14083100900967482], [0.7340752889936754, 0.03757062737708783, 0.36986277705122594, 0.9657274690515972], [0.43372215877805453, 0.9944754498401112, 0.638438098217256, 0.17988176344123008]]], [[[0.8719945854479118, 0.5430760793908778, 0.8971206123644734, 0.9347942282193488], [0.6366109234737618, 0.3992474033538371, 0.9119390190972835, 0.8923966249995334], [0.7797945316627413, 0.3819562112596737, 0.2651896652904343, 0.4419252778843903]], [[0.5368798322893592, 0.4681925958952069, 0.0026925769788938014, 0.48910459180515], [0.35189296228277345, 0.8995624667827478, 0.2686609671752668, 0.6502525818801146], [0.693052452676061, 0.6647133652576568, 0.08563980600430954, 0.6118914626679669]]], [[[0.05365567041344044, 0.6320237261138029, 0.5315273195236281, 0.047604032750147796], [0.7954758473285501, 0.984611766955196, 0.07015841071899076, 0.07981171219177563], [0.9952972242217776, 0.0065753173984242075, 0.5850967344116169, 0.7032906564253522]], [[0.35863003513491987, 0.6529020111537239, 0.6610405768959473, 0.8886386003176545], [0.7253125602245284, 0.5847163004507515, 0.7379894904581126, 0.345781356713295], [0.9589929182114783, 0.39050438530567333, 0.7400184948062529, 0.573603761781558]]]] ,numpy.float_)
91673          arg = Data(val,w_arg)
91674          res=interpolate(arg,where=w_ref)
91675          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91676          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91677          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
91678          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91679       def test_interpolate_onFunction_fromConstant_onReducedContinuousFunction_rank0(self):
91680          """
91681          test interploation of constant rank 0 Data on Function
91682          """
91683          w_ref = Function(self.domain)
91684          w_arg = ReducedContinuousFunction(self.domain)
91685          val = 8.951148e-01
91686          arg = Data(val,(),w_arg)
91687          res=interpolate(arg,where=w_ref)
91688          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91689          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91690          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91691          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91692       def test_interpolate_onFunction_fromConstant_onReducedContinuousFunction_rank1(self):
91693          """
91694          test interploation of constant rank 1 Data on Function
91695          """
91696          w_ref = Function(self.domain)
91697          w_arg = ReducedContinuousFunction(self.domain)
91698          val = numpy.array([0.6066732546949051, 0.8016398923432774, 0.4742691549563627] ,numpy.float_)
91699          arg = Data(val,w_arg)
91700          res=interpolate(arg,where=w_ref)
91701          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91702          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91703          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91704          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91705       def test_interpolate_onFunction_fromConstant_onReducedContinuousFunction_rank2(self):
91706          """
91707          test interploation of constant rank 2 Data on Function
91708          """
91709          w_ref = Function(self.domain)
91710          w_arg = ReducedContinuousFunction(self.domain)
91711          val = numpy.array([[0.08556466722946376, 0.4950085940164848], [0.7730714517331375, 0.9837986193454442], [0.22625803764676578, 0.6552668077134152], [0.6810217208693635, 0.8713404367856101]] ,numpy.float_)
91712          arg = Data(val,w_arg)
91713          res=interpolate(arg,where=w_ref)
91714          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91715          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91716          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91717          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91718       def test_interpolate_onFunction_fromConstant_onReducedContinuousFunction_rank3(self):
91719          """
91720          test interploation of constant rank 3 Data on Function
91721          """
91722          w_ref = Function(self.domain)
91723          w_arg = ReducedContinuousFunction(self.domain)
91724          val = numpy.array([[[0.7058179274094152, 0.22337081992051633, 0.8122760445478099, 0.06728031553337865], [0.9756190604873851, 0.6496267984929114, 0.5902853051221699, 0.3767000223828797]], [[0.266337667800284, 0.4207323904799788, 0.5750824863784477, 0.6987185460777049], [0.043561259147539166, 0.5622387926011073, 0.9320712857652301, 0.9526708785827293]]] ,numpy.float_)
91725          arg = Data(val,w_arg)
91726          res=interpolate(arg,where=w_ref)
91727          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91728          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91729          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91730          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91731       def test_interpolate_onFunction_fromConstant_onReducedContinuousFunction_rank4(self):
91732          """
91733          test interploation of constant rank 4 Data on Function
91734          """
91735          w_ref = Function(self.domain)
91736          w_arg = ReducedContinuousFunction(self.domain)
91737          val = numpy.array([[[[0.9053796836775925, 0.8797433141622261, 0.35691574679425453, 0.9118326265463733], [0.9077954721023275, 0.4064689850148223, 0.5303614090385271, 0.40604231144823466], [0.11607424724026061, 0.5599600398772994, 0.814075551661732, 0.54254591030764]], [[0.9062004798239428, 0.7359957714009656, 0.01798015865607705, 0.24826118958393129], [0.0543279497977297, 0.5433018354934592, 0.6342410596898008, 0.8102700194136568], [0.40220290876693743, 0.7521083582294243, 0.8312614071899106, 0.26542605255033247]]], [[[0.7622540278299255, 0.48609979776990997, 0.5803413362149745, 0.5607529899926853], [0.20494496825065767, 0.3502799847257706, 0.7445213672889649, 0.9689376198705607], [0.5234912090436175, 0.7184819779425649, 0.4615415726839104, 0.7355891398407086]], [[0.2671919789484164, 0.9807156056044939, 0.5884608670312474, 0.35556723211294106], [0.3698459328833036, 0.021662160991340995, 0.5754105446763756, 0.6998817470727063], [0.08539102866608617, 0.737917818260024, 0.13807049592934928, 0.873592672888957]]], [[[0.02309680162950456, 0.6501015293782897, 0.543023930558804, 0.16724059191177], [0.5922782207754151, 0.8174937364601335, 0.6860353552710656, 0.3538636852781476], [0.15891103131880369, 0.6861738109435661, 0.47078753964243025, 0.6884582686306938]], [[0.893188311715661, 0.8865432429837392, 0.9016858446102259, 0.6387469290276518], [0.38674084211945625, 0.6178487648759542, 0.5314659765084864, 0.8207842812941796], [0.27063765117779504, 0.5550043283273147, 0.16119769636828118, 0.5476268785609076]]]] ,numpy.float_)
91738          arg = Data(val,w_arg)
91739          res=interpolate(arg,where=w_ref)
91740          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91741          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91742          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
91743          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91744       def test_interpolate_onFunction_fromConstant_onFunction_rank0(self):
91745          """
91746          test interploation of constant rank 0 Data on Function
91747          """
91748          w_ref = Function(self.domain)
91749          w_arg = Function(self.domain)
91750          val = 9.735540e-02
91751          arg = Data(val,(),w_arg)
91752          res=interpolate(arg,where=w_ref)
91753          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91754          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91755          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91756          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91757       def test_interpolate_onFunction_fromConstant_onFunction_rank1(self):
91758          """
91759          test interploation of constant rank 1 Data on Function
91760          """
91761          w_ref = Function(self.domain)
91762          w_arg = Function(self.domain)
91763          val = numpy.array([0.2743715749292459, 0.21469786552223857, 0.8593033737580423] ,numpy.float_)
91764          arg = Data(val,w_arg)
91765          res=interpolate(arg,where=w_ref)
91766          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91767          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91768          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91769          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91770       def test_interpolate_onFunction_fromConstant_onFunction_rank2(self):
91771          """
91772          test interploation of constant rank 2 Data on Function
91773          """
91774          w_ref = Function(self.domain)
91775          w_arg = Function(self.domain)
91776          val = numpy.array([[0.6846912417947641, 0.06894788069207214], [0.978900026010339, 0.09873703418021096], [0.4919546781747247, 0.39911956020002926], [0.04553381200128093, 0.936072200755137]] ,numpy.float_)
91777          arg = Data(val,w_arg)
91778          res=interpolate(arg,where=w_ref)
91779          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91780          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91781          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91782          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91783       def test_interpolate_onFunction_fromConstant_onFunction_rank3(self):
91784          """
91785          test interploation of constant rank 3 Data on Function
91786          """
91787          w_ref = Function(self.domain)
91788          w_arg = Function(self.domain)
91789          val = numpy.array([[[0.6123958941856611, 0.48679257122335007, 0.8904002629859167, 0.9572963840936238], [0.6243391148042786, 0.7709419990983722, 0.954913195292853, 0.7623141780447016]], [[0.2742632577925228, 0.6058872464545579, 0.10700255297665273, 0.7789171399591038], [0.9627200051077933, 0.6221603524102973, 0.9542257157007191, 0.22639416924078581]]] ,numpy.float_)
91790          arg = Data(val,w_arg)
91791          res=interpolate(arg,where=w_ref)
91792          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91793          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91794          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91795          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91796       def test_interpolate_onFunction_fromConstant_onFunction_rank4(self):
91797          """
91798          test interploation of constant rank 4 Data on Function
91799          """
91800          w_ref = Function(self.domain)
91801          w_arg = Function(self.domain)
91802          val = numpy.array([[[[0.2970124845724982, 0.9664209731219923, 0.7282801354365919, 0.7230929641464919], [0.45006095507091426, 0.012786087660424661, 0.5789425955397912, 0.3067754784298242], [0.8621451350032959, 0.3777843119038977, 0.837991057837885, 0.3266075851449377]], [[0.10559985815885153, 0.2804607320052436, 0.8951175530640482, 0.315420817580812], [0.09613077434959427, 0.39319781168821666, 0.7494837497122231, 0.5621137256709696], [0.2869247718285539, 0.9704518484296983, 0.8624881513697881, 0.6532896599378017]]], [[[0.8067849518701942, 0.23366554103475312, 0.7786214838162852, 0.3688271473922984], [0.261624144653578, 0.655555167205075, 0.360295197528421, 0.5785499957774662], [0.3337932634810461, 0.5122950843101022, 0.4658186434277789, 0.3775442280831859]], [[0.07906213284684738, 0.7274934339748216, 0.30650282320570854, 0.27943797535753134], [0.9804466861381568, 0.13421200844964265, 0.8676702212229163, 0.6928499188226049], [0.35153120975853436, 0.21130282331022066, 0.8118771496566942, 0.8880110735985497]]], [[[0.03512494307952818, 0.7608765341895213, 0.3101236286036795, 0.5745214687846504], [0.6625962485952909, 0.8317739766430151, 0.8232216834384922, 0.45933835690782554], [0.1539455147736789, 0.6455194134516086, 0.6413842437290627, 0.30636459274182914]], [[0.8916782444314838, 0.9829897770361029, 0.8540622107815008, 0.6064961419219922], [0.29805293341076233, 0.6659362982990858, 0.7471676189872066, 0.06246468676823902], [0.8039682465326102, 0.923490451650216, 0.8922927240835877, 0.3130749046132094]]]] ,numpy.float_)
91803          arg = Data(val,w_arg)
91804          res=interpolate(arg,where=w_ref)
91805          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91806          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91807          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
91808          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91809       def test_interpolate_onReducedFunction_fromConstant_onSolution_rank0(self):
91810          """
91811          test interploation of constant rank 0 Data on ReducedFunction
91812          """
91813          w_ref = ReducedFunction(self.domain)
91814          w_arg = Solution(self.domain)
91815          val = 3.728258e-01
91816          arg = Data(val,(),w_arg)
91817          res=interpolate(arg,where=w_ref)
91818          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91819          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91820          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91821          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91822       def test_interpolate_onReducedFunction_fromConstant_onSolution_rank1(self):
91823          """
91824          test interploation of constant rank 1 Data on ReducedFunction
91825          """
91826          w_ref = ReducedFunction(self.domain)
91827          w_arg = Solution(self.domain)
91828          val = numpy.array([0.012971727303935032, 0.3957173440042402, 0.5409633187570417] ,numpy.float_)
91829          arg = Data(val,w_arg)
91830          res=interpolate(arg,where=w_ref)
91831          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91832          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91833          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91834          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91835       def test_interpolate_onReducedFunction_fromConstant_onSolution_rank2(self):
91836          """
91837          test interploation of constant rank 2 Data on ReducedFunction
91838          """
91839          w_ref = ReducedFunction(self.domain)
91840          w_arg = Solution(self.domain)
91841          val = numpy.array([[0.19515767965056197, 0.6973560941989282], [0.1026344066296202, 0.19376496449411318], [0.1489826290982933, 0.32190319858015215], [0.7863186531195617, 0.21050167126598007]] ,numpy.float_)
91842          arg = Data(val,w_arg)
91843          res=interpolate(arg,where=w_ref)
91844          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91845          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91846          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91847          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91848       def test_interpolate_onReducedFunction_fromConstant_onSolution_rank3(self):
91849          """
91850          test interploation of constant rank 3 Data on ReducedFunction
91851          """
91852          w_ref = ReducedFunction(self.domain)
91853          w_arg = Solution(self.domain)
91854          val = numpy.array([[[0.6131998020720266, 0.253807496184978, 0.1691697388015262, 0.2765875384637184], [0.8224880214516279, 0.2640941443307725, 0.8840157747171888, 0.16343699468508355]], [[0.7224141035444551, 0.7465831267725502, 0.38210603950193256, 0.02578542820312768], [0.4562390904340804, 0.12744676539494748, 0.7651594504829711, 0.41466620658569875]]] ,numpy.float_)
91855          arg = Data(val,w_arg)
91856          res=interpolate(arg,where=w_ref)
91857          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91858          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91859          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91860          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91861       def test_interpolate_onReducedFunction_fromConstant_onSolution_rank4(self):
91862          """
91863          test interploation of constant rank 4 Data on ReducedFunction
91864          """
91865          w_ref = ReducedFunction(self.domain)
91866          w_arg = Solution(self.domain)
91867          val = numpy.array([[[[0.7575419952110635, 0.9020775334918304, 0.7572501252215946, 0.4154368797961233], [0.15043484189529976, 0.004857332752311039, 0.2349518517295438, 0.7304171671907722], [0.1050715465877049, 0.04447526835184923, 0.7054732646870934, 0.6745068154308503]], [[0.247726729905123, 0.11082510313222316, 0.9124795867158895, 0.17286167920667295], [0.5463160264747804, 0.8122346367461396, 0.7217802017863385, 0.6922759037372286], [0.21305609701662598, 0.30494843853884457, 0.020576671723682938, 0.527881550311816]]], [[[0.5485089326345317, 0.9796056792579599, 0.5336920404274481, 0.7796198687611161], [0.40346400278024164, 0.6161139739077297, 0.6083992706043033, 0.21422040582287794], [0.9815921964958273, 0.5538942350259384, 0.26499117558610563, 0.7790581530847276]], [[0.2340825486805166, 0.898136081400828, 0.5359664808913567, 0.7768956047745614], [0.4972377601123942, 0.8988399867675314, 0.03607509358508598, 0.9473643960842325], [0.008867366706068913, 0.15432797413445842, 0.7519109235674708, 0.16889193138926994]]], [[[0.33463706661310477, 0.6250277603945628, 0.2848531077188371, 0.385805614067793], [0.26761389179709183, 0.20819682811775042, 0.40458605506027934, 0.14173898654864892], [0.8323891029374194, 0.41330347063797723, 0.9945924451945423, 0.08696191317702207]], [[0.7883901317275269, 0.21989816004612694, 0.9907669081920188, 0.8355286046419015], [0.3273140987294253, 0.5570362711124685, 0.6058717832691248, 0.8109337748012123], [0.8948355192793349, 0.26719368475866867, 0.793392371729907, 0.12265148012043736]]]] ,numpy.float_)
91868          arg = Data(val,w_arg)
91869          res=interpolate(arg,where=w_ref)
91870          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91871          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91872          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
91873          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91874       def test_interpolate_onReducedFunction_fromConstant_onReducedSolution_rank0(self):
91875          """
91876          test interploation of constant rank 0 Data on ReducedFunction
91877          """
91878          w_ref = ReducedFunction(self.domain)
91879          w_arg = ReducedSolution(self.domain)
91880          val = 3.150930e-01
91881          arg = Data(val,(),w_arg)
91882          res=interpolate(arg,where=w_ref)
91883          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91884          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91885          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91886          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91887       def test_interpolate_onReducedFunction_fromConstant_onReducedSolution_rank1(self):
91888          """
91889          test interploation of constant rank 1 Data on ReducedFunction
91890          """
91891          w_ref = ReducedFunction(self.domain)
91892          w_arg = ReducedSolution(self.domain)
91893          val = numpy.array([0.7490294729809388, 0.20398195461443003, 0.6815304189962305] ,numpy.float_)
91894          arg = Data(val,w_arg)
91895          res=interpolate(arg,where=w_ref)
91896          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91897          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91898          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91899          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91900       def test_interpolate_onReducedFunction_fromConstant_onReducedSolution_rank2(self):
91901          """
91902          test interploation of constant rank 2 Data on ReducedFunction
91903          """
91904          w_ref = ReducedFunction(self.domain)
91905          w_arg = ReducedSolution(self.domain)
91906          val = numpy.array([[0.18928827137747295, 0.6565724473867753], [0.05795388490535902, 0.5940015021513085], [0.21608441479396467, 0.0577813802223468], [0.7927201986393057, 0.2769882045611559]] ,numpy.float_)
91907          arg = Data(val,w_arg)
91908          res=interpolate(arg,where=w_ref)
91909          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91910          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91911          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91912          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91913       def test_interpolate_onReducedFunction_fromConstant_onReducedSolution_rank3(self):
91914          """
91915          test interploation of constant rank 3 Data on ReducedFunction
91916          """
91917          w_ref = ReducedFunction(self.domain)
91918          w_arg = ReducedSolution(self.domain)
91919          val = numpy.array([[[0.2306177773104542, 0.04668454787233478, 0.32151273485515397, 0.6613767848691384], [0.2462933276403272, 0.6220697333417127, 0.5496069482737364, 0.15726399552366555]], [[0.9310155631859295, 0.9123509065656492, 0.44211833373708387, 0.7902703442335067], [0.8274530542083902, 0.5834972153270758, 0.35600865651056834, 0.6786525605923202]]] ,numpy.float_)
91920          arg = Data(val,w_arg)
91921          res=interpolate(arg,where=w_ref)
91922          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91923          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91924          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91925          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91926       def test_interpolate_onReducedFunction_fromConstant_onReducedSolution_rank4(self):
91927          """
91928          test interploation of constant rank 4 Data on ReducedFunction
91929          """
91930          w_ref = ReducedFunction(self.domain)
91931          w_arg = ReducedSolution(self.domain)
91932          val = numpy.array([[[[0.1078387984939646, 0.6779191083947568, 0.22082250181160779, 0.6637086193441153], [0.6124058648635899, 0.2436252078681913, 0.1794680271178265, 0.9659476891164605], [0.6645947631357397, 0.10388389324490832, 0.9915002528444541, 0.3298558232280008]], [[0.7850034474680475, 0.37249080241888555, 0.7547940194315218, 0.25593589128673333], [0.5967018891553976, 0.7562324747433757, 0.4926152716329022, 0.12403837698443199], [0.09709556618249504, 0.8598669518766141, 0.9917116480055214, 0.5226983011447389]]], [[[0.5366184544364865, 0.07073016370892626, 0.183662818999751, 0.7053252141625185], [0.8604580418347838, 0.5621418179116249, 0.18355158200074295, 0.9347752517042563], [0.4020762395441769, 0.6776406738997084, 0.18700240935855272, 0.6578768497841756]], [[0.8432841079564232, 0.39384184490035934, 0.46419110526588603, 0.9250719815363536], [0.9819988348224011, 0.4891210910740228, 0.4787784641401054, 0.440334617183876], [0.6008111655338242, 0.863159029860924, 0.8193345864340122, 0.0185308922374684]]], [[[0.617824673895684, 0.08902970422841205, 0.9855167614108061, 0.5619965493225246], [0.1701569789929529, 0.7514267586278164, 0.09458771333902516, 0.7071314883631369], [0.14975674152904972, 0.1824365014765862, 0.5206117642595841, 0.391518541184131]], [[0.7155790453366037, 0.19045442285834502, 0.9191791662001249, 0.9205677449372358], [0.7446577830708815, 0.5719615797850744, 0.3174629245033359, 0.901426632886397], [0.7559743653238208, 0.9352772535071997, 0.6145229483534825, 0.1286554625074503]]]] ,numpy.float_)
91933          arg = Data(val,w_arg)
91934          res=interpolate(arg,where=w_ref)
91935          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91936          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91937          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
91938          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91939       def test_interpolate_onReducedFunction_fromConstant_onContinuousFunction_rank0(self):
91940          """
91941          test interploation of constant rank 0 Data on ReducedFunction
91942          """
91943          w_ref = ReducedFunction(self.domain)
91944          w_arg = ContinuousFunction(self.domain)
91945          val = 3.260421e-03
91946          arg = Data(val,(),w_arg)
91947          res=interpolate(arg,where=w_ref)
91948          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91949          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91950          self.assertEqual(res.getShape(),(),"wrong shape of result.")
91951          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91952       def test_interpolate_onReducedFunction_fromConstant_onContinuousFunction_rank1(self):
91953          """
91954          test interploation of constant rank 1 Data on ReducedFunction
91955          """
91956          w_ref = ReducedFunction(self.domain)
91957          w_arg = ContinuousFunction(self.domain)
91958          val = numpy.array([0.8968728525758245, 0.9812864362074349, 0.10156242799983295] ,numpy.float_)
91959          arg = Data(val,w_arg)
91960          res=interpolate(arg,where=w_ref)
91961          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91962          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91963          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
91964          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91965       def test_interpolate_onReducedFunction_fromConstant_onContinuousFunction_rank2(self):
91966          """
91967          test interploation of constant rank 2 Data on ReducedFunction
91968          """
91969          w_ref = ReducedFunction(self.domain)
91970          w_arg = ContinuousFunction(self.domain)
91971          val = numpy.array([[0.4118649570395786, 0.4111829501471638], [0.8415008717865939, 0.09924301711503469], [0.24257843038149807, 0.8600844611069439], [0.9630118611169631, 0.17844579151249906]] ,numpy.float_)
91972          arg = Data(val,w_arg)
91973          res=interpolate(arg,where=w_ref)
91974          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91975          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91976          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
91977          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91978       def test_interpolate_onReducedFunction_fromConstant_onContinuousFunction_rank3(self):
91979          """
91980          test interploation of constant rank 3 Data on ReducedFunction
91981          """
91982          w_ref = ReducedFunction(self.domain)
91983          w_arg = ContinuousFunction(self.domain)
91984          val = numpy.array([[[0.41652392448901765, 0.1674334113982131, 0.49750788947327484, 0.2897070892908381], [0.3638127879744031, 0.35649423868667085, 0.8479688643778721, 0.3137442583557205]], [[0.5392532317376467, 0.2189721215014382, 0.4144313798930708, 0.15111584874912964], [0.7204946884353611, 0.9754381515852647, 0.8218854665066333, 0.21839242530963188]]] ,numpy.float_)
91985          arg = Data(val,w_arg)
91986          res=interpolate(arg,where=w_ref)
91987          self.assertTrue(isinstance(res,Data),"wrong type of result.")
91988          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
91989          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
91990          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
91991       def test_interpolate_onReducedFunction_fromConstant_onContinuousFunction_rank4(self):
91992          """
91993          test interploation of constant rank 4 Data on ReducedFunction
91994          """
91995          w_ref = ReducedFunction(self.domain)
91996          w_arg = ContinuousFunction(self.domain)
91997          val = numpy.array([[[[0.6112767869006167, 0.40119849661820317, 0.48263512412666243, 0.512738683372073], [0.67551549566529, 0.47916295191525216, 0.6457894956307684, 0.5190529996145664], [0.42030364167772405, 0.37963410849906265, 0.6197852711086739, 0.08893320512728975]], [[0.29311909322470664, 0.9078039524622689, 0.5667621427360752, 0.8815268118688634], [0.1976920816718083, 0.22174905824587832, 0.6580450956634241, 0.29479978564545883], [0.7207450235602346, 0.09792934708788881, 0.5032680829616303, 0.05461134674580792]]], [[[0.47450656962533, 0.5408692534965368, 0.16846796750872994, 0.3118660047568367], [0.09352135536459416, 0.22568170567436097, 0.8169337152668241, 0.7335264598933963], [0.32016349396653665, 0.8241224536455416, 0.6121966269084769, 0.46572591656401485]], [[0.9676557388760243, 0.17988071339325162, 0.6179773240396723, 0.8853602707502274], [0.23128659135991025, 0.7067266570445252, 0.5186863016947421, 0.17210683444542862], [0.8714022446592182, 0.27014720911567613, 0.35057438838383803, 0.7229915787046332]]], [[[0.9503623687583985, 0.4642172911766458, 0.567314413657875, 0.7086928932940554], [0.49312244840567676, 0.32885543023329333, 0.46398948700228637, 0.6220319579542395], [0.18184864131884415, 0.870736860550771, 0.32192956322217137, 0.7038770694346873]], [[0.929520906640193, 0.9641199393138358, 0.43063472362502386, 0.08824458887043662], [0.8963625912136505, 0.45808207008556145, 0.45011466083504725, 0.40398102131892455], [0.7850918943306927, 0.90342357596291, 0.9404421740394262, 0.8124667905888024]]]] ,numpy.float_)
91998          arg = Data(val,w_arg)
91999          res=interpolate(arg,where=w_ref)
92000          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92001          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92002          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92003          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92004       def test_interpolate_onReducedFunction_fromConstant_onReducedContinuousFunction_rank0(self):
92005          """
92006          test interploation of constant rank 0 Data on ReducedFunction
92007          """
92008          w_ref = ReducedFunction(self.domain)
92009          w_arg = ReducedContinuousFunction(self.domain)
92010          val = 8.575434e-01
92011          arg = Data(val,(),w_arg)
92012          res=interpolate(arg,where=w_ref)
92013          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92014          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92015          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92016          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92017       def test_interpolate_onReducedFunction_fromConstant_onReducedContinuousFunction_rank1(self):
92018          """
92019          test interploation of constant rank 1 Data on ReducedFunction
92020          """
92021          w_ref = ReducedFunction(self.domain)
92022          w_arg = ReducedContinuousFunction(self.domain)
92023          val = numpy.array([0.5725918096409758, 0.6003841830725746, 0.1441542920384522] ,numpy.float_)
92024          arg = Data(val,w_arg)
92025          res=interpolate(arg,where=w_ref)
92026          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92027          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92028          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92029          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92030       def test_interpolate_onReducedFunction_fromConstant_onReducedContinuousFunction_rank2(self):
92031          """
92032          test interploation of constant rank 2 Data on ReducedFunction
92033          """
92034          w_ref = ReducedFunction(self.domain)
92035          w_arg = ReducedContinuousFunction(self.domain)
92036          val = numpy.array([[0.6293856675726806, 0.6893340206451204], [0.808534788550273, 0.8619664687725175], [0.9223392946188489, 0.14192622876600436], [0.23801236915392276, 0.6855732439869456]] ,numpy.float_)
92037          arg = Data(val,w_arg)
92038          res=interpolate(arg,where=w_ref)
92039          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92040          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92041          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92042          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92043       def test_interpolate_onReducedFunction_fromConstant_onReducedContinuousFunction_rank3(self):
92044          """
92045          test interploation of constant rank 3 Data on ReducedFunction
92046          """
92047          w_ref = ReducedFunction(self.domain)
92048          w_arg = ReducedContinuousFunction(self.domain)
92049          val = numpy.array([[[0.34249822058084856, 0.9161409852900473, 0.35308880082288896, 0.8481508363708606], [0.04395025574198774, 0.7444232225770522, 0.48328911269573127, 0.4312664086925645]], [[0.11879143352969523, 0.24235522740831483, 0.4684045454422867, 0.03647719487907586], [0.049185045125999416, 0.7148935616360678, 0.9038590951599494, 0.7565073711836524]]] ,numpy.float_)
92050          arg = Data(val,w_arg)
92051          res=interpolate(arg,where=w_ref)
92052          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92053          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92054          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92055          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92056       def test_interpolate_onReducedFunction_fromConstant_onReducedContinuousFunction_rank4(self):
92057          """
92058          test interploation of constant rank 4 Data on ReducedFunction
92059          """
92060          w_ref = ReducedFunction(self.domain)
92061          w_arg = ReducedContinuousFunction(self.domain)
92062          val = numpy.array([[[[0.006017857670573057, 0.23364131519784181, 0.4985494960868405, 0.27109100097392147], [0.46777297787696615, 0.6253125640259952, 0.40452662800606065, 0.37763688636458537], [0.42176263329078234, 0.33627005175270563, 0.7284328028931366, 0.7554306088625987]], [[0.445605085403727, 0.24168586191612962, 0.8761435178594109, 0.6336418596811683], [0.12067539387160242, 0.2760591431484126, 0.8302040359677788, 0.5249849665915117], [0.25910328032811913, 0.46022280614122835, 0.09338024314795279, 0.3025158275666153]]], [[[0.9011600112580125, 0.9067598044865398, 0.36675480908395464, 0.24672806654954949], [0.3354970078650197, 0.3328614738307458, 0.9439130347784399, 0.6661090918695912], [0.033963254642413454, 0.3784876992752988, 0.8642207159457712, 0.43850579779608057]], [[0.41036053467979716, 0.20771066763908475, 0.436903095299338, 0.5186597221271169], [0.1528880722368523, 0.7947807451302626, 0.26183907725585254, 0.7347606333872441], [0.2276041986246412, 0.1997750912337225, 0.4079301945121403, 0.3979885600222165]]], [[[0.7111046900053858, 0.26301022503920446, 0.005970573072419216, 0.4946615862812376], [0.15967084945823962, 0.6539354868230908, 0.9475004902589886, 0.6220902877158248], [0.7865229772442921, 0.8417263055532432, 0.1659834833377698, 0.36162369312272435]], [[0.8803451748350127, 0.04879713643877015, 0.9073005937541219, 0.7580478879811012], [0.601170013261482, 0.9801415344221798, 0.4037308171429357, 0.7833100529376933], [0.03621439688551875, 0.07125911770743965, 0.5897957915039718, 0.39439908929824796]]]] ,numpy.float_)
92063          arg = Data(val,w_arg)
92064          res=interpolate(arg,where=w_ref)
92065          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92066          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92067          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92068          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92069       def test_interpolate_onReducedFunction_fromConstant_onFunction_rank0(self):
92070          """
92071          test interploation of constant rank 0 Data on ReducedFunction
92072          """
92073          w_ref = ReducedFunction(self.domain)
92074          w_arg = Function(self.domain)
92075          val = 4.027490e-01
92076          arg = Data(val,(),w_arg)
92077          res=interpolate(arg,where=w_ref)
92078          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92079          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92080          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92081          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92082       def test_interpolate_onReducedFunction_fromConstant_onFunction_rank1(self):
92083          """
92084          test interploation of constant rank 1 Data on ReducedFunction
92085          """
92086          w_ref = ReducedFunction(self.domain)
92087          w_arg = Function(self.domain)
92088          val = numpy.array([0.3250182911594902, 0.37482274213325484, 0.9026028760284558] ,numpy.float_)
92089          arg = Data(val,w_arg)
92090          res=interpolate(arg,where=w_ref)
92091          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92092          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92093          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92094          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92095       def test_interpolate_onReducedFunction_fromConstant_onFunction_rank2(self):
92096          """
92097          test interploation of constant rank 2 Data on ReducedFunction
92098          """
92099          w_ref = ReducedFunction(self.domain)
92100          w_arg = Function(self.domain)
92101          val = numpy.array([[0.8626369066899092, 0.4585408354680027], [0.9038270065192777, 0.5132186814212445], [0.2754318743152945, 0.7606957160579115], [0.26929872320779824, 0.12523388730012663]] ,numpy.float_)
92102          arg = Data(val,w_arg)
92103          res=interpolate(arg,where=w_ref)
92104          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92105          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92106          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92107          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92108       def test_interpolate_onReducedFunction_fromConstant_onFunction_rank3(self):
92109          """
92110          test interploation of constant rank 3 Data on ReducedFunction
92111          """
92112          w_ref = ReducedFunction(self.domain)
92113          w_arg = Function(self.domain)
92114          val = numpy.array([[[0.1710848061970881, 0.4210605266008811, 0.1799412900566273, 0.5680036275667364], [0.08272971547755459, 0.6561558440334991, 0.43166459070419705, 0.73553987620405]], [[0.08553882488658737, 0.7668629602548288, 0.8239733431217472, 0.6790092094499529], [0.30524026079530386, 0.9218782475268773, 0.39672505422645843, 0.2779629842723299]]] ,numpy.float_)
92115          arg = Data(val,w_arg)
92116          res=interpolate(arg,where=w_ref)
92117          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92118          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92119          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92120          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92121       def test_interpolate_onReducedFunction_fromConstant_onFunction_rank4(self):
92122          """
92123          test interploation of constant rank 4 Data on ReducedFunction
92124          """
92125          w_ref = ReducedFunction(self.domain)
92126          w_arg = Function(self.domain)
92127          val = numpy.array([[[[0.3290657098736812, 0.4322039583426357, 0.41679124068929796, 0.8126181140955258], [0.0364108453724622, 0.13153050469390792, 0.42667362159493416, 0.7269177132160766], [0.13139887775061831, 0.14434199337800335, 0.6122122378647069, 0.6415719838392016]], [[0.4950747908561032, 0.05818933183041919, 0.5637593942515523, 0.16802703084948512], [0.5938645385125116, 0.8887302141326991, 0.5046494841030463, 0.8680400546868173], [0.9219797057865186, 0.5312281531664578, 0.7513129868079005, 0.2855893695807905]]], [[[0.49672165560847126, 0.9980575642511861, 0.4858508883100776, 0.7156314913205017], [0.8531148185359293, 0.9307807538610622, 0.4065721774005391, 0.1389553549495719], [0.2570744157865883, 0.5193374245774657, 0.3548465058431266, 0.5325510266778257]], [[0.056082832572043606, 0.8804164784307431, 0.7682033179219527, 0.96189826806205], [0.5767667365187719, 0.2047025018997496, 0.10002088039489676, 0.9525702281176113], [0.39612044468926366, 0.41101913208017515, 0.3294265556585515, 0.6608604529763971]]], [[[0.26594993597807526, 0.9942637994644868, 0.009990794210599674, 0.3452102472130977], [0.0746892268534799, 0.937241251111298, 0.8203467445106463, 0.6066768531501937], [0.43265136987239683, 0.6425094052895142, 0.6979610366846875, 0.5082328192200561]], [[0.6625510907969888, 0.4668463667680315, 0.2517549671029965, 0.2883304737321145], [0.1755580391237066, 0.33008357665124555, 0.8511290836017738, 0.6575328633944767], [0.11094017588286831, 0.6654188284769922, 0.10239978622283252, 0.8684316764300468]]]] ,numpy.float_)
92128          arg = Data(val,w_arg)
92129          res=interpolate(arg,where=w_ref)
92130          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92131          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92132          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92133          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92134       def test_interpolate_onReducedFunction_fromConstant_onReducedFunction_rank0(self):
92135          """
92136          test interploation of constant rank 0 Data on ReducedFunction
92137          """
92138          w_ref = ReducedFunction(self.domain)
92139          w_arg = ReducedFunction(self.domain)
92140          val = 8.414660e-01
92141          arg = Data(val,(),w_arg)
92142          res=interpolate(arg,where=w_ref)
92143          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92144          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92145          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92146          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92147       def test_interpolate_onReducedFunction_fromConstant_onReducedFunction_rank1(self):
92148          """
92149          test interploation of constant rank 1 Data on ReducedFunction
92150          """
92151          w_ref = ReducedFunction(self.domain)
92152          w_arg = ReducedFunction(self.domain)
92153          val = numpy.array([0.05849068302647553, 0.19447582046764433, 0.8561679113512668] ,numpy.float_)
92154          arg = Data(val,w_arg)
92155          res=interpolate(arg,where=w_ref)
92156          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92157          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92158          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92159          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92160       def test_interpolate_onReducedFunction_fromConstant_onReducedFunction_rank2(self):
92161          """
92162          test interploation of constant rank 2 Data on ReducedFunction
92163          """
92164          w_ref = ReducedFunction(self.domain)
92165          w_arg = ReducedFunction(self.domain)
92166          val = numpy.array([[0.9506619006477389, 0.45158015390940354], [0.13794385505939888, 0.2650022089772285], [0.137496234037903, 0.6061453738559234], [0.13136958789709163, 0.8903658787553632]] ,numpy.float_)
92167          arg = Data(val,w_arg)
92168          res=interpolate(arg,where=w_ref)
92169          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92170          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92171          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92172          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92173       def test_interpolate_onReducedFunction_fromConstant_onReducedFunction_rank3(self):
92174          """
92175          test interploation of constant rank 3 Data on ReducedFunction
92176          """
92177          w_ref = ReducedFunction(self.domain)
92178          w_arg = ReducedFunction(self.domain)
92179          val = numpy.array([[[0.5049445622092998, 0.9503234641849262, 0.8566292410717335, 0.7211612275027681], [0.9799186194859697, 0.9742963916662968, 0.5180422269851891, 0.1453140389575599]], [[0.6937181277704628, 0.5812458331575757, 0.8393868082169451, 0.5815957353405391], [0.843105079526146, 0.27458482867796785, 0.8573812421346612, 0.015365887109309528]]] ,numpy.float_)
92180          arg = Data(val,w_arg)
92181          res=interpolate(arg,where=w_ref)
92182          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92183          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92184          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92185          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92186       def test_interpolate_onReducedFunction_fromConstant_onReducedFunction_rank4(self):
92187          """
92188          test interploation of constant rank 4 Data on ReducedFunction
92189          """
92190          w_ref = ReducedFunction(self.domain)
92191          w_arg = ReducedFunction(self.domain)
92192          val = numpy.array([[[[0.45798366622514064, 0.5193102937785187, 0.20026259482112807, 0.5752762940618534], [0.3256477095285484, 0.837553585825753, 0.6405909508206649, 0.0854938394042647], [0.6344348236055513, 0.7355398523726475, 0.11662713982751316, 0.19784692643398172]], [[0.11040561381615766, 0.7721002746257891, 0.9637314196990963, 0.3175732518686092], [0.2654213837064784, 0.6295950193017563, 0.5510307578728122, 0.34767344894886876], [0.632331011074255, 0.762096748207405, 0.8968910997446898, 0.09367919363975996]]], [[[0.9116317371108273, 0.607571071079898, 0.9601920527563665, 0.40327404883922624], [0.26165673238553044, 0.6831009504228737, 0.8995423716551886, 0.6556910293351392], [0.08066187035403649, 0.8195870021848646, 0.8357368655590256, 0.005099761546050963]], [[0.09386702122280133, 0.060675152908738705, 0.23283975759278575, 0.38877792949780265], [0.7976392026081873, 0.275800847647067, 0.9217423207211316, 0.15034914823275425], [0.7517744507415166, 0.7329445993447944, 0.28057447335288366, 0.02840906617234229]]], [[[0.2528689454628795, 0.6952180766780145, 0.8969218154535067, 0.7123216491520122], [0.11177689822920944, 0.7794409198464872, 0.5449226329759524, 0.42849681173791354], [0.6174140243613375, 0.29872651066827094, 0.12421663225288804, 0.21211874568709999]], [[0.513926505495494, 0.9768158291160023, 0.6114756969812538, 0.1870935495775632], [0.006285103664050662, 0.14487813193385723, 0.9702978777341069, 0.9666390008551409], [0.16475839853805674, 0.47693762634427506, 0.6539215859843611, 0.42602005660059983]]]] ,numpy.float_)
92193          arg = Data(val,w_arg)
92194          res=interpolate(arg,where=w_ref)
92195          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92196          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92197          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92198          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92199       def test_interpolate_onFunctionOnBoundary_fromConstant_onSolution_rank0(self):
92200          """
92201          test interploation of constant rank 0 Data on FunctionOnBoundary
92202          """
92203          w_ref = FunctionOnBoundary(self.domain)
92204          w_arg = Solution(self.domain)
92205          val = 9.192167e-01
92206          arg = Data(val,(),w_arg)
92207          res=interpolate(arg,where=w_ref)
92208          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92209          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92210          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92211          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92212       def test_interpolate_onFunctionOnBoundary_fromConstant_onSolution_rank1(self):
92213          """
92214          test interploation of constant rank 1 Data on FunctionOnBoundary
92215          """
92216          w_ref = FunctionOnBoundary(self.domain)
92217          w_arg = Solution(self.domain)
92218          val = numpy.array([0.41038789718937674, 0.8753158910702785, 0.40646509008814946] ,numpy.float_)
92219          arg = Data(val,w_arg)
92220          res=interpolate(arg,where=w_ref)
92221          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92222          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92223          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92224          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92225       def test_interpolate_onFunctionOnBoundary_fromConstant_onSolution_rank2(self):
92226          """
92227          test interploation of constant rank 2 Data on FunctionOnBoundary
92228          """
92229          w_ref = FunctionOnBoundary(self.domain)
92230          w_arg = Solution(self.domain)
92231          val = numpy.array([[0.9777665519705623, 0.30515152513007326], [0.6178842521178955, 0.8690952716246513], [0.2260807519749941, 0.44002942371896236], [0.0859769086897264, 0.7760803649079892]] ,numpy.float_)
92232          arg = Data(val,w_arg)
92233          res=interpolate(arg,where=w_ref)
92234          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92235          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92236          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92237          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92238       def test_interpolate_onFunctionOnBoundary_fromConstant_onSolution_rank3(self):
92239          """
92240          test interploation of constant rank 3 Data on FunctionOnBoundary
92241          """
92242          w_ref = FunctionOnBoundary(self.domain)
92243          w_arg = Solution(self.domain)
92244          val = numpy.array([[[0.51850652220834, 0.05478610401807382, 0.9500183440368776, 0.008561716687065624], [0.5856735366173363, 0.8411375892234033, 0.4898273919923175, 0.6173720111374574]], [[0.027715270037911188, 0.3023149932544965, 0.14538979731538693, 0.5136462244271097], [0.3977251731942798, 0.9079992135171645, 0.04346413556660944, 0.2888627174370282]]] ,numpy.float_)
92245          arg = Data(val,w_arg)
92246          res=interpolate(arg,where=w_ref)
92247          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92248          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92249          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92250          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92251       def test_interpolate_onFunctionOnBoundary_fromConstant_onSolution_rank4(self):
92252          """
92253          test interploation of constant rank 4 Data on FunctionOnBoundary
92254          """
92255          w_ref = FunctionOnBoundary(self.domain)
92256          w_arg = Solution(self.domain)
92257          val = numpy.array([[[[0.20622408379238066, 0.005100009559660501, 0.23337931752995833, 0.10601497183723918], [0.8165023555426181, 0.396580852315114, 0.47029308560599625, 0.3874301860339717], [0.2011358318819475, 0.5461596158643076, 0.2239654551721597, 0.8856310800632324]], [[0.4865526283067304, 0.3545397483398661, 0.38998059664381524, 0.565302365497114], [0.2036231799281505, 0.4818603523191022, 0.3928413820152391, 0.4712734087844712], [0.3923227826719422, 0.4920022951224834, 0.2743085894289139, 0.3692164595954831]]], [[[0.11352919547716644, 0.09758472955064057, 0.3769346202405284, 0.8611052931614419], [0.005233705552234791, 0.4884777542806439, 0.8122024660886195, 0.814485975702801], [0.6353940925242333, 0.1512161696283696, 0.8613782896867531, 0.5499228421963279]], [[0.9378121425611091, 0.14334109698436082, 0.646216595524758, 0.7889063463455013], [0.8328778640005114, 0.7875327973910158, 0.8341424415381581, 0.5476176259551765], [0.5919432489217056, 0.3851719939103463, 0.2937238668485481, 0.001323464137289232]]], [[[0.907197659013393, 0.9771085376225925, 0.7681934429785708, 0.1437626548077089], [0.10609723386579106, 0.7970325410650613, 0.13580107033208622, 0.3095278591797175], [0.5426885800883268, 0.058891750718371494, 0.5726727281494745, 0.10413526077153223]], [[0.8808911345392071, 0.43402439305259, 0.5994893869237345, 0.8682314872608294], [0.9534415618238753, 0.8617431942968606, 0.6009208065252089, 0.7934262509150228], [0.4253492297908934, 0.6435973759874094, 0.012744602269634253, 0.12137625323158896]]]] ,numpy.float_)
92258          arg = Data(val,w_arg)
92259          res=interpolate(arg,where=w_ref)
92260          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92261          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92262          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92263          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92264       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedSolution_rank0(self):
92265          """
92266          test interploation of constant rank 0 Data on FunctionOnBoundary
92267          """
92268          w_ref = FunctionOnBoundary(self.domain)
92269          w_arg = ReducedSolution(self.domain)
92270          val = 4.506794e-01
92271          arg = Data(val,(),w_arg)
92272          res=interpolate(arg,where=w_ref)
92273          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92274          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92275          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92276          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92277       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedSolution_rank1(self):
92278          """
92279          test interploation of constant rank 1 Data on FunctionOnBoundary
92280          """
92281          w_ref = FunctionOnBoundary(self.domain)
92282          w_arg = ReducedSolution(self.domain)
92283          val = numpy.array([0.14246416290793984, 0.9973780177886851, 0.08384063678307241] ,numpy.float_)
92284          arg = Data(val,w_arg)
92285          res=interpolate(arg,where=w_ref)
92286          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92287          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92288          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92289          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92290       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedSolution_rank2(self):
92291          """
92292          test interploation of constant rank 2 Data on FunctionOnBoundary
92293          """
92294          w_ref = FunctionOnBoundary(self.domain)
92295          w_arg = ReducedSolution(self.domain)
92296          val = numpy.array([[0.9999399549724203, 0.15213235003893677], [0.7107206921345622, 0.4116454322858999], [0.9178626025820907, 0.17634563548224114], [0.7389241754895396, 0.17012409710168386]] ,numpy.float_)
92297          arg = Data(val,w_arg)
92298          res=interpolate(arg,where=w_ref)
92299          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92300          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92301          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92302          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92303       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedSolution_rank3(self):
92304          """
92305          test interploation of constant rank 3 Data on FunctionOnBoundary
92306          """
92307          w_ref = FunctionOnBoundary(self.domain)
92308          w_arg = ReducedSolution(self.domain)
92309          val = numpy.array([[[0.7966643608859245, 0.975748924838338, 0.7796226785530369, 0.8259173738472025], [0.7829656332967383, 0.6872008388513661, 0.12445630733343327, 0.6434417403109474]], [[0.1757612623897169, 0.8783903523758947, 0.7283411636244587, 0.5310367202876731], [0.5460503107333516, 0.04306599554577206, 0.865427397809365, 0.8318637128939894]]] ,numpy.float_)
92310          arg = Data(val,w_arg)
92311          res=interpolate(arg,where=w_ref)
92312          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92313          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92314          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92315          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92316       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedSolution_rank4(self):
92317          """
92318          test interploation of constant rank 4 Data on FunctionOnBoundary
92319          """
92320          w_ref = FunctionOnBoundary(self.domain)
92321          w_arg = ReducedSolution(self.domain)
92322          val = numpy.array([[[[0.14582397292102844, 0.6544969671881469, 0.38797238806491974, 0.39520238186905965], [0.036291902683921684, 0.9165814584950539, 0.7954558978953897, 0.16831695835511618], [0.0863580677155169, 0.08941808033906129, 0.61927614235708, 0.3018976003034982]], [[0.7493211909675515, 0.6086166656015553, 0.377440956410247, 0.35024282326748046], [0.5981380424320348, 0.9822820806997827, 0.9288510056981487, 0.5859141321672025], [0.7484786688292904, 0.20141594168627341, 0.8319229243827568, 0.09933228360785518]]], [[[0.26052728871085606, 0.13811987233331924, 0.15981560203754974, 0.1307231063931723], [0.945065291608868, 0.14397226589372414, 0.18137931889974546, 0.3449983036342097], [0.9919646435245192, 0.8917228330694286, 0.3805270332960442, 0.7302765092819249]], [[0.6074474487998708, 0.08460704019903975, 0.833083329714192, 0.10125836914566688], [0.005552871595602471, 0.1465109871455753, 0.9309488847018791, 0.6696103205315634], [0.9993274454875536, 0.40522013004902746, 0.9996446213480157, 0.2706134570525909]]], [[[0.5291260863701185, 0.9376952779289915, 0.8203658473177817, 0.9122289837016366], [0.0029039661476604195, 0.83102237275781, 0.4296819023930326, 0.9857948972993257], [0.4073595529668991, 0.8038699633316648, 0.8316872243584207, 0.5275302089170382]], [[0.7902884489236343, 0.307906619368144, 0.6484099713379581, 0.05690675285413049], [0.28044876022275866, 0.5996827628977335, 0.7902636684719875, 0.9309904897922812], [0.24476368641710256, 0.7018415281316769, 0.5905788192579572, 0.9412065444516884]]]] ,numpy.float_)
92323          arg = Data(val,w_arg)
92324          res=interpolate(arg,where=w_ref)
92325          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92326          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92327          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92328          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92329       def test_interpolate_onFunctionOnBoundary_fromConstant_onContinuousFunction_rank0(self):
92330          """
92331          test interploation of constant rank 0 Data on FunctionOnBoundary
92332          """
92333          w_ref = FunctionOnBoundary(self.domain)
92334          w_arg = ContinuousFunction(self.domain)
92335          val = 1.108449e-01
92336          arg = Data(val,(),w_arg)
92337          res=interpolate(arg,where=w_ref)
92338          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92339          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92340          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92341          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92342       def test_interpolate_onFunctionOnBoundary_fromConstant_onContinuousFunction_rank1(self):
92343          """
92344          test interploation of constant rank 1 Data on FunctionOnBoundary
92345          """
92346          w_ref = FunctionOnBoundary(self.domain)
92347          w_arg = ContinuousFunction(self.domain)
92348          val = numpy.array([0.9497319589257759, 0.9636075516101584, 0.051564768313318354] ,numpy.float_)
92349          arg = Data(val,w_arg)
92350          res=interpolate(arg,where=w_ref)
92351          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92352          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92353          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92354          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92355       def test_interpolate_onFunctionOnBoundary_fromConstant_onContinuousFunction_rank2(self):
92356          """
92357          test interploation of constant rank 2 Data on FunctionOnBoundary
92358          """
92359          w_ref = FunctionOnBoundary(self.domain)
92360          w_arg = ContinuousFunction(self.domain)
92361          val = numpy.array([[0.5563306374540675, 0.05583183073812581], [0.7245573572829551, 0.7847336321885154], [0.207802490269958, 0.27956915421799033], [0.6108548164634193, 0.41288965529993027]] ,numpy.float_)
92362          arg = Data(val,w_arg)
92363          res=interpolate(arg,where=w_ref)
92364          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92365          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92366          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92367          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92368       def test_interpolate_onFunctionOnBoundary_fromConstant_onContinuousFunction_rank3(self):
92369          """
92370          test interploation of constant rank 3 Data on FunctionOnBoundary
92371          """
92372          w_ref = FunctionOnBoundary(self.domain)
92373          w_arg = ContinuousFunction(self.domain)
92374          val = numpy.array([[[0.35892684451205115, 0.2966906157972712, 0.6582960973053003, 0.835667345496716], [0.8046201458736681, 0.6084967085002652, 0.3239358482598148, 0.14452765410991408]], [[0.6504531677609211, 0.8678550210496763, 0.2821918001955528, 0.44618525404522624], [0.2417077771849203, 0.5973709757045786, 0.46672174991455884, 0.6337650537799687]]] ,numpy.float_)
92375          arg = Data(val,w_arg)
92376          res=interpolate(arg,where=w_ref)
92377          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92378          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92379          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92380          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92381       def test_interpolate_onFunctionOnBoundary_fromConstant_onContinuousFunction_rank4(self):
92382          """
92383          test interploation of constant rank 4 Data on FunctionOnBoundary
92384          """
92385          w_ref = FunctionOnBoundary(self.domain)
92386          w_arg = ContinuousFunction(self.domain)
92387          val = numpy.array([[[[0.2944251353507551, 0.07501081348075567, 0.8309177134544613, 0.5776490765350085], [0.021689489790741034, 0.49889730525325804, 0.5139408231457663, 0.9882435241915973], [0.08137730461123893, 0.35864132100205703, 0.26430599503988317, 0.5658329672272592]], [[0.3163171611555239, 0.7054659851923525, 0.6513635213332974, 0.8495823569979479], [0.35877021541226894, 0.3548827234348809, 0.8524360587914576, 0.782041719369517], [0.9133825563780668, 0.7118339530746202, 0.7815080064303972, 0.6222191137687296]]], [[[0.4248723817383898, 0.8795001935037968, 0.01666287947492029, 0.4084386155392602], [0.13414701303594956, 0.9384171855671386, 0.5957528481119125, 0.5272189225595069], [0.028716420311946322, 0.11191082995378943, 0.9778164086389094, 0.6167966785297105]], [[0.6081155888593136, 0.9650418205445292, 0.8877805345004621, 0.30297960074429253], [0.645074469475765, 0.7313547180092884, 0.19773820979384327, 0.9470583356818679], [0.172359967515351, 0.6916943710926826, 0.33277583453620574, 0.6449351779555812]]], [[[0.6102478623820575, 0.35544894157761286, 0.7518816958884267, 0.40342926789366684], [0.8502768175957146, 0.5591442930799826, 0.39238438198963366, 0.4540480434719212], [0.18945099002280996, 0.7900497565669576, 0.02967265631338767, 0.1051417886148277]], [[0.48721929377589923, 0.4777693001340729, 0.7047844215612442, 0.7918864544058136], [0.4715159800785831, 0.011874498977747727, 0.5805593477162783, 0.9815978294924813], [0.9281386722114529, 0.5609485520373018, 0.4063300030918854, 0.20309197759679953]]]] ,numpy.float_)
92388          arg = Data(val,w_arg)
92389          res=interpolate(arg,where=w_ref)
92390          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92391          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92392          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92393          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92394       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank0(self):
92395          """
92396          test interploation of constant rank 0 Data on FunctionOnBoundary
92397          """
92398          w_ref = FunctionOnBoundary(self.domain)
92399          w_arg = ReducedContinuousFunction(self.domain)
92400          val = 7.070421e-01
92401          arg = Data(val,(),w_arg)
92402          res=interpolate(arg,where=w_ref)
92403          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92404          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92405          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92406          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92407       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank1(self):
92408          """
92409          test interploation of constant rank 1 Data on FunctionOnBoundary
92410          """
92411          w_ref = FunctionOnBoundary(self.domain)
92412          w_arg = ReducedContinuousFunction(self.domain)
92413          val = numpy.array([0.7607518371224172, 0.8464643338635388, 0.9447448149773134] ,numpy.float_)
92414          arg = Data(val,w_arg)
92415          res=interpolate(arg,where=w_ref)
92416          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92417          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92418          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92419          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92420       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank2(self):
92421          """
92422          test interploation of constant rank 2 Data on FunctionOnBoundary
92423          """
92424          w_ref = FunctionOnBoundary(self.domain)
92425          w_arg = ReducedContinuousFunction(self.domain)
92426          val = numpy.array([[0.9052236375670168, 0.9933326385559299], [0.6872993494967177, 0.5609083293415859], [0.5858670569693469, 0.25637763665160507], [0.5937208221067354, 0.41695511979912836]] ,numpy.float_)
92427          arg = Data(val,w_arg)
92428          res=interpolate(arg,where=w_ref)
92429          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92430          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92431          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92432          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92433       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank3(self):
92434          """
92435          test interploation of constant rank 3 Data on FunctionOnBoundary
92436          """
92437          w_ref = FunctionOnBoundary(self.domain)
92438          w_arg = ReducedContinuousFunction(self.domain)
92439          val = numpy.array([[[0.5038771000678699, 0.936487893943485, 0.21947511973273015, 0.9308205058304588], [0.76166507153111, 0.9093224836696384, 0.4950264500227347, 0.827000080933229]], [[0.022798683770178574, 0.8664069404036596, 0.5969559321683152, 0.37028573368723894], [0.37908518722638784, 0.09278145963555984, 0.36092463038218936, 0.4072068019394879]]] ,numpy.float_)
92440          arg = Data(val,w_arg)
92441          res=interpolate(arg,where=w_ref)
92442          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92443          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92444          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92445          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92446       def test_interpolate_onFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank4(self):
92447          """
92448          test interploation of constant rank 4 Data on FunctionOnBoundary
92449          """
92450          w_ref = FunctionOnBoundary(self.domain)
92451          w_arg = ReducedContinuousFunction(self.domain)
92452          val = numpy.array([[[[0.9954944184525968, 0.2804719312247317, 0.42981219210236377, 0.16898220127865404], [0.5304958374278685, 0.9821892954307407, 0.8795519211742088, 0.5695376679142153], [0.497351879619535, 0.1297996965378112, 0.7286146022068011, 0.233846112327177]], [[0.780008079251037, 0.06840564213822298, 0.12317179942058809, 0.9736047882746599], [0.562603853324446, 0.5311572053208246, 0.10562928629388313, 0.9235918257363729], [0.5718594734897233, 0.3836307796287002, 0.75672637306399, 0.9662234483401362]]], [[[0.9677971491907695, 0.05362933942890469, 0.7369240913481204, 0.26033931289076173], [0.08441528314834867, 0.7686010092575635, 0.8788974306293529, 0.3480234012044001], [0.8827319535640358, 0.34139199598989645, 0.2387225815541889, 0.4271550167444289]], [[0.9433318959482143, 0.6926092314386534, 0.0579857353278046, 0.012760602879228422], [0.8299506048071782, 0.16514401419229907, 0.9622492642442476, 0.9719336749500798], [0.14052933402133672, 0.040167444311985157, 0.8448263470459549, 0.07356494691919657]]], [[[0.9045874679372933, 0.5543948259159743, 0.27114391934801696, 0.6124477204630296], [0.8362921077428459, 0.9246955662318225, 0.34346527024414963, 0.9720097520031376], [0.7885326599660657, 0.3496399645885666, 0.14977077719533283, 0.34371673899701694]], [[0.8963518220111483, 0.30675656220409964, 0.9749762460041155, 0.4950889266330232], [0.8059279482797532, 0.04045052568497254, 0.5951258122513224, 0.5306970651564509], [0.5957654454868341, 0.5844187015725724, 0.17077377682759753, 0.5705581127663562]]]] ,numpy.float_)
92453          arg = Data(val,w_arg)
92454          res=interpolate(arg,where=w_ref)
92455          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92456          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92457          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92458          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92459       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onSolution_rank0(self):
92460          """
92461          test interploation of constant rank 0 Data on ReducedFunctionOnBoundary
92462          """
92463          w_ref = ReducedFunctionOnBoundary(self.domain)
92464          w_arg = Solution(self.domain)
92465          val = 1.852028e-01
92466          arg = Data(val,(),w_arg)
92467          res=interpolate(arg,where=w_ref)
92468          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92469          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92470          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92471          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92472       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onSolution_rank1(self):
92473          """
92474          test interploation of constant rank 1 Data on ReducedFunctionOnBoundary
92475          """
92476          w_ref = ReducedFunctionOnBoundary(self.domain)
92477          w_arg = Solution(self.domain)
92478          val = numpy.array([0.9524901431348591, 0.968228116597958, 0.4374117029306468] ,numpy.float_)
92479          arg = Data(val,w_arg)
92480          res=interpolate(arg,where=w_ref)
92481          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92482          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92483          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92484          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92485       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onSolution_rank2(self):
92486          """
92487          test interploation of constant rank 2 Data on ReducedFunctionOnBoundary
92488          """
92489          w_ref = ReducedFunctionOnBoundary(self.domain)
92490          w_arg = Solution(self.domain)
92491          val = numpy.array([[0.6283815860104343, 0.6957769522914173], [0.5837443985047255, 0.05763188452653645], [0.3260167444620985, 0.6556166631341867], [0.2292972433996443, 0.8301435680946683]] ,numpy.float_)
92492          arg = Data(val,w_arg)
92493          res=interpolate(arg,where=w_ref)
92494          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92495          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92496          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92497          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92498       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onSolution_rank3(self):
92499          """
92500          test interploation of constant rank 3 Data on ReducedFunctionOnBoundary
92501          """
92502          w_ref = ReducedFunctionOnBoundary(self.domain)
92503          w_arg = Solution(self.domain)
92504          val = numpy.array([[[0.6201259108475821, 0.5746426093351019, 0.05949913896726189, 0.7450953635359022], [0.43460250008615053, 0.3074373282370092, 0.9385315952680193, 0.7663312029539153]], [[0.43275709490573866, 0.03520868970279034, 0.540679458264847, 0.24781018681665112], [0.17817695089351604, 0.5306920370376325, 0.715462213991392, 0.1975429679639551]]] ,numpy.float_)
92505          arg = Data(val,w_arg)
92506          res=interpolate(arg,where=w_ref)
92507          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92508          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92509          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92510          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92511       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onSolution_rank4(self):
92512          """
92513          test interploation of constant rank 4 Data on ReducedFunctionOnBoundary
92514          """
92515          w_ref = ReducedFunctionOnBoundary(self.domain)
92516          w_arg = Solution(self.domain)
92517          val = numpy.array([[[[0.07958145536780192, 0.586292071403468, 0.24305878981930418, 0.10956835948378785], [0.18790202669214506, 0.9999991093916525, 0.7648710047696148, 0.3995601886990934], [0.8242421198377108, 0.8709616320531619, 0.036941579592055906, 0.8737747050470887]], [[0.5456111046652553, 0.41728019065821387, 0.283359484508531, 0.9954511004461133], [0.703016807474764, 0.9439428840593841, 0.585557925285333, 0.832581927086008], [0.4410255696163289, 0.8864814087471373, 0.9820280215380782, 0.5621575030502604]]], [[[0.20481617776433025, 0.17129844891572055, 0.26939985996301596, 0.21001377356656958], [0.7613064609535483, 0.8740126758736518, 0.9892618069319213, 0.4638242187573097], [0.004712752503956641, 0.37468534675549003, 0.7664122560864787, 0.9508171638156188]], [[0.43720149531198615, 0.5350997812247933, 0.3534193335198461, 0.233148117167021], [0.20078658660747417, 0.869777001672443, 0.5394745541010878, 0.5925790039861761], [0.5966763298689197, 0.23289144391552263, 0.20751974516464333, 0.6159618865654661]]], [[[0.8705034681570242, 0.5805245326514258, 0.610735106012795, 0.17886042204038144], [0.350222261590468, 0.04795881412971248, 0.3139774623374556, 0.438333140713854], [0.8974386154653958, 0.7418304775313741, 0.9064616502896158, 0.18924628026574297]], [[0.461472893466374, 0.7125143823711997, 0.7484095041412295, 0.33678674983473866], [0.6536630858906187, 0.12390985652750697, 0.53332627624869, 0.9957473288269107], [0.5203312787963457, 0.3663705083061257, 0.05755252274556655, 0.4511805743101691]]]] ,numpy.float_)
92518          arg = Data(val,w_arg)
92519          res=interpolate(arg,where=w_ref)
92520          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92521          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92522          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92523          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92524       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedSolution_rank0(self):
92525          """
92526          test interploation of constant rank 0 Data on ReducedFunctionOnBoundary
92527          """
92528          w_ref = ReducedFunctionOnBoundary(self.domain)
92529          w_arg = ReducedSolution(self.domain)
92530          val = 4.360027e-01
92531          arg = Data(val,(),w_arg)
92532          res=interpolate(arg,where=w_ref)
92533          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92534          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92535          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92536          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92537       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedSolution_rank1(self):
92538          """
92539          test interploation of constant rank 1 Data on ReducedFunctionOnBoundary
92540          """
92541          w_ref = ReducedFunctionOnBoundary(self.domain)
92542          w_arg = ReducedSolution(self.domain)
92543          val = numpy.array([0.9814583841303897, 0.8576165958910862, 0.07785369478500859] ,numpy.float_)
92544          arg = Data(val,w_arg)
92545          res=interpolate(arg,where=w_ref)
92546          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92547          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92548          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92549          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92550       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedSolution_rank2(self):
92551          """
92552          test interploation of constant rank 2 Data on ReducedFunctionOnBoundary
92553          """
92554          w_ref = ReducedFunctionOnBoundary(self.domain)
92555          w_arg = ReducedSolution(self.domain)
92556          val = numpy.array([[0.4113075230582314, 0.5465483395661529], [0.21734053376505624, 0.6973676513882143], [0.44990454080518905, 0.08465419987996214], [0.8038857599681649, 0.6668434230497731]] ,numpy.float_)
92557          arg = Data(val,w_arg)
92558          res=interpolate(arg,where=w_ref)
92559          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92560          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92561          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92562          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92563       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedSolution_rank3(self):
92564          """
92565          test interploation of constant rank 3 Data on ReducedFunctionOnBoundary
92566          """
92567          w_ref = ReducedFunctionOnBoundary(self.domain)
92568          w_arg = ReducedSolution(self.domain)
92569          val = numpy.array([[[0.005521547430829443, 0.6758088987530083, 0.24718267947230133, 0.3426960092590303], [0.0077141969718255154, 0.680022518930657, 0.845368261124892, 0.9866112987747238]], [[0.9296936244367552, 0.8595840995330449, 0.5935178029669631, 0.39357549670582404], [0.6495599674604388, 0.3055336213506945, 0.3821621215123423, 0.14644551577188558]]] ,numpy.float_)
92570          arg = Data(val,w_arg)
92571          res=interpolate(arg,where=w_ref)
92572          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92573          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92574          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92575          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92576       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedSolution_rank4(self):
92577          """
92578          test interploation of constant rank 4 Data on ReducedFunctionOnBoundary
92579          """
92580          w_ref = ReducedFunctionOnBoundary(self.domain)
92581          w_arg = ReducedSolution(self.domain)
92582          val = numpy.array([[[[0.679265471025438, 0.5435103016127519, 0.7413003186327275, 0.935860504866077], [0.7828958609795503, 0.5652809263702883, 0.044183618379292966, 0.2513865577643034], [0.9874242525690592, 0.8857390512025201, 0.08439688172768889, 0.610831917980801]], [[0.21416107431777365, 0.7291977503968069, 0.6210228718396265, 0.5215508221490089], [0.2758492536359548, 0.7973590703068396, 0.6879543466908404, 0.15176106531240285], [0.45786106049097175, 0.1586336179213501, 0.6337039744368264, 0.15230888930935305]]], [[[0.5181281106408817, 0.5309557878052082, 0.5040793211461676, 0.2678067100887005], [0.8896641065573563, 0.8399568773078349, 0.3527496428117566, 0.1857666234673817], [0.7287270147890453, 0.9809007761842233, 0.6753454929742083, 0.8602887174170138]], [[0.382703562904562, 0.3385444290235794, 0.08938242227012627, 0.6752310924254504], [0.6288069041764609, 0.45650713766295725, 0.4892316353544307, 0.6403862534439819], [0.934314836322674, 0.42563999164628763, 0.17994155635430764, 0.5939345775678037]]], [[[0.7630638611938967, 0.14076938780328685, 0.029311815064348767, 0.9010601687085374], [0.18924465172377591, 0.01517447974274011, 0.5774557644978928, 0.05195525587356875], [0.6825411046583563, 0.5329477579655328, 0.700373962205211, 0.09629415636243366]], [[0.5955791154023462, 0.22678959171155633, 0.5513514148685765, 0.8560204320046453], [0.02304511301376133, 0.969956630928132, 0.15467884801914122, 0.6812422589047169], [0.6479989921871985, 0.5257271957338543, 0.55313996044493, 0.28178786135956313]]]] ,numpy.float_)
92583          arg = Data(val,w_arg)
92584          res=interpolate(arg,where=w_ref)
92585          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92586          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92587          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92588          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92589       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onContinuousFunction_rank0(self):
92590          """
92591          test interploation of constant rank 0 Data on ReducedFunctionOnBoundary
92592          """
92593          w_ref = ReducedFunctionOnBoundary(self.domain)
92594          w_arg = ContinuousFunction(self.domain)
92595          val = 2.047214e-01
92596          arg = Data(val,(),w_arg)
92597          res=interpolate(arg,where=w_ref)
92598          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92599          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92600          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92601          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92602       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onContinuousFunction_rank1(self):
92603          """
92604          test interploation of constant rank 1 Data on ReducedFunctionOnBoundary
92605          """
92606          w_ref = ReducedFunctionOnBoundary(self.domain)
92607          w_arg = ContinuousFunction(self.domain)
92608          val = numpy.array([0.02416772253162347, 0.7761099099114784, 0.40972129988347694] ,numpy.float_)
92609          arg = Data(val,w_arg)
92610          res=interpolate(arg,where=w_ref)
92611          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92612          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92613          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92614          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92615       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onContinuousFunction_rank2(self):
92616          """
92617          test interploation of constant rank 2 Data on ReducedFunctionOnBoundary
92618          """
92619          w_ref = ReducedFunctionOnBoundary(self.domain)
92620          w_arg = ContinuousFunction(self.domain)
92621          val = numpy.array([[0.406066297425263, 0.3224942848549607], [0.5506703452768537, 0.36144231520987324], [0.9192445688343615, 0.6703618020979031], [0.7576894134836163, 0.4794818865895989]] ,numpy.float_)
92622          arg = Data(val,w_arg)
92623          res=interpolate(arg,where=w_ref)
92624          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92625          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92626          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92627          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92628       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onContinuousFunction_rank3(self):
92629          """
92630          test interploation of constant rank 3 Data on ReducedFunctionOnBoundary
92631          """
92632          w_ref = ReducedFunctionOnBoundary(self.domain)
92633          w_arg = ContinuousFunction(self.domain)
92634          val = numpy.array([[[0.5950142355321145, 0.46471555387973196, 0.21003910909735324, 0.6888954330446211], [0.860245466049949, 0.1277561856062588, 0.9191123475151095, 0.713630481895244]], [[0.9524526830805979, 0.6148944845454374, 0.5624943752237618, 0.7795324601114211], [0.6863358797711895, 0.514542697325243, 0.002538939522166772, 0.2835811052149275]]] ,numpy.float_)
92635          arg = Data(val,w_arg)
92636          res=interpolate(arg,where=w_ref)
92637          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92638          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92639          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92640          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92641       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onContinuousFunction_rank4(self):
92642          """
92643          test interploation of constant rank 4 Data on ReducedFunctionOnBoundary
92644          """
92645          w_ref = ReducedFunctionOnBoundary(self.domain)
92646          w_arg = ContinuousFunction(self.domain)
92647          val = numpy.array([[[[0.1855706263439878, 0.8551665320817079, 0.2425488726028966, 0.6648349192350533], [0.527867350742479, 0.550960368040881, 0.18669124610951326, 0.46930288077705784], [0.38377417192152397, 0.8767600932147964, 0.7255646177024861, 0.4072382963136606]], [[0.7039209431076947, 0.6652829637729729, 0.28028768811925564, 0.3768702226572559], [0.30464282801762654, 0.19464044848645956, 0.4930516614499366, 0.5507637280449756], [0.627153438269037, 0.5568723793137564, 0.6147079043668865, 0.4298516309026128]]], [[[0.04797436564854085, 0.973670681618537, 0.19618677129164674, 0.24815278301888444], [0.6519542158984761, 0.9977022169074248, 0.8734428134091466, 0.14655113838432576], [0.30416530921864937, 0.14773289318561966, 0.05086002504233933, 0.33197565393887885]], [[0.8713686176140557, 0.006316687099104268, 0.37064730623416287, 0.2607529108811799], [0.6152686009060456, 0.7540097099842205, 0.8240421523076797, 0.7022497831828466], [0.2587154628437103, 0.49261076678351967, 0.7697739449092331, 0.4753418726160892]]], [[[0.9810468447762527, 0.25112012705787967, 0.13083245527033638, 0.12234701676906157], [0.5081471243611793, 0.8668401414958787, 0.6199507692602556, 0.5819302930458916], [0.6147554572177973, 0.9087270079596469, 0.34264454954047374, 0.577807264554528]], [[0.7205978925977358, 0.10686082894453719, 0.9198491148582825, 0.8095857598809354], [0.7680838830717062, 0.07583810572933103, 0.9432620748938074, 0.658572680079183], [0.8126907736231406, 0.37142498540243196, 0.20011631134474783, 0.43471749614165733]]]] ,numpy.float_)
92648          arg = Data(val,w_arg)
92649          res=interpolate(arg,where=w_ref)
92650          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92651          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92652          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92653          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92654       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank0(self):
92655          """
92656          test interploation of constant rank 0 Data on ReducedFunctionOnBoundary
92657          """
92658          w_ref = ReducedFunctionOnBoundary(self.domain)
92659          w_arg = ReducedContinuousFunction(self.domain)
92660          val = 4.196279e-01
92661          arg = Data(val,(),w_arg)
92662          res=interpolate(arg,where=w_ref)
92663          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92664          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92665          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92666          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92667       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank1(self):
92668          """
92669          test interploation of constant rank 1 Data on ReducedFunctionOnBoundary
92670          """
92671          w_ref = ReducedFunctionOnBoundary(self.domain)
92672          w_arg = ReducedContinuousFunction(self.domain)
92673          val = numpy.array([0.04180672759508275, 0.11505345429909464, 0.45704913150906934] ,numpy.float_)
92674          arg = Data(val,w_arg)
92675          res=interpolate(arg,where=w_ref)
92676          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92677          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92678          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92679          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92680       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank2(self):
92681          """
92682          test interploation of constant rank 2 Data on ReducedFunctionOnBoundary
92683          """
92684          w_ref = ReducedFunctionOnBoundary(self.domain)
92685          w_arg = ReducedContinuousFunction(self.domain)
92686          val = numpy.array([[0.4889630982370293, 0.4636455033993767], [0.7635907559638243, 0.13608689365316395], [0.5149121340618423, 0.12383229788560945], [0.7649999576978991, 0.4802461876893527]] ,numpy.float_)
92687          arg = Data(val,w_arg)
92688          res=interpolate(arg,where=w_ref)
92689          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92690          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92691          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92692          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92693       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank3(self):
92694          """
92695          test interploation of constant rank 3 Data on ReducedFunctionOnBoundary
92696          """
92697          w_ref = ReducedFunctionOnBoundary(self.domain)
92698          w_arg = ReducedContinuousFunction(self.domain)
92699          val = numpy.array([[[0.930100580213905, 0.33926613616565016, 0.7187963853028017, 0.2621606679342313], [0.51963948787346, 0.16154898663612272, 0.10060537215837162, 0.260302427567349]], [[0.1846219243758611, 0.6060990096209946, 0.9332109691746319, 0.7972428773295887], [0.8755406973982766, 0.02761865004478037, 0.7580350288936898, 0.12627145142681884]]] ,numpy.float_)
92700          arg = Data(val,w_arg)
92701          res=interpolate(arg,where=w_ref)
92702          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92703          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92704          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92705          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92706       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedContinuousFunction_rank4(self):
92707          """
92708          test interploation of constant rank 4 Data on ReducedFunctionOnBoundary
92709          """
92710          w_ref = ReducedFunctionOnBoundary(self.domain)
92711          w_arg = ReducedContinuousFunction(self.domain)
92712          val = numpy.array([[[[0.7525538643717313, 0.8927982585642765, 0.4210826548629708, 0.5555735741904018], [0.17858267313856324, 0.5740398589900949, 0.40870781372307463, 0.909580303943474], [0.6526248633659558, 0.09019485320260956, 0.7337664840405913, 0.7468973066512248]], [[0.8095110813170832, 0.3807384017728831, 0.7392521239843176, 0.15203082514650257], [0.2727674585205959, 0.5812445347504359, 0.36571712468305095, 0.4687344146249067], [0.07893014883999883, 0.9361136247528623, 0.18014148375480055, 0.38083376317998774]]], [[[0.8632974181093962, 0.8016592808822394, 0.4983642968435722, 0.21819560532075755], [0.6398224952588359, 0.3432209152210235, 0.40024729342795706, 0.14286155656344757], [0.1841275903706291, 0.5727160205669964, 0.24924225685732992, 0.9555915720156908]], [[0.23101720296251682, 0.9537586137251547, 0.018561656010396055, 0.906796750480803], [0.14709464565937658, 0.9307564393767921, 0.4498701606097416, 0.22457529341173965], [0.6192439321514038, 0.21363503499184533, 0.6735094873176105, 0.7626716974408687]]], [[[0.0036716278032534744, 0.8434038122422595, 0.6382221799882414, 0.5271284448583157], [0.13326687583289554, 0.8333772952654219, 0.11011908516385194, 0.4007597680302103], [0.6917088620398234, 0.43902229159188766, 0.49699742476142716, 0.35272680611196183]], [[0.46959397470725106, 0.7360781515812774, 0.14415449819117165, 0.8678607148641525], [0.5431062391475556, 0.028681049971717165, 0.8589363499474931, 0.08848063545993701], [0.9405049960837757, 0.310728367912534, 0.769507495982587, 0.7517762842282233]]]] ,numpy.float_)
92713          arg = Data(val,w_arg)
92714          res=interpolate(arg,where=w_ref)
92715          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92716          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92717          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92718          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92719       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onFunctionOnBoundary_rank0(self):
92720          """
92721          test interploation of constant rank 0 Data on ReducedFunctionOnBoundary
92722          """
92723          w_ref = ReducedFunctionOnBoundary(self.domain)
92724          w_arg = FunctionOnBoundary(self.domain)
92725          val = 2.334151e-01
92726          arg = Data(val,(),w_arg)
92727          res=interpolate(arg,where=w_ref)
92728          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92729          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92730          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92731          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92732       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onFunctionOnBoundary_rank1(self):
92733          """
92734          test interploation of constant rank 1 Data on ReducedFunctionOnBoundary
92735          """
92736          w_ref = ReducedFunctionOnBoundary(self.domain)
92737          w_arg = FunctionOnBoundary(self.domain)
92738          val = numpy.array([0.8882196658190877, 0.9449724811444659, 0.290189677020929] ,numpy.float_)
92739          arg = Data(val,w_arg)
92740          res=interpolate(arg,where=w_ref)
92741          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92742          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92743          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92744          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92745       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onFunctionOnBoundary_rank2(self):
92746          """
92747          test interploation of constant rank 2 Data on ReducedFunctionOnBoundary
92748          """
92749          w_ref = ReducedFunctionOnBoundary(self.domain)
92750          w_arg = FunctionOnBoundary(self.domain)
92751          val = numpy.array([[0.6062386890051852, 0.7602308024038457], [0.6222717023701925, 0.3989859465331288], [0.5079766923359104, 0.9593221240301741], [0.08051545932215776, 0.1275281797176182]] ,numpy.float_)
92752          arg = Data(val,w_arg)
92753          res=interpolate(arg,where=w_ref)
92754          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92755          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92756          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92757          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92758       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onFunctionOnBoundary_rank3(self):
92759          """
92760          test interploation of constant rank 3 Data on ReducedFunctionOnBoundary
92761          """
92762          w_ref = ReducedFunctionOnBoundary(self.domain)
92763          w_arg = FunctionOnBoundary(self.domain)
92764          val = numpy.array([[[0.043675826386976535, 0.919615411297421, 0.027808465322756493, 0.27505330587245824], [0.8412813246837996, 0.05917923496352562, 0.8955603500026582, 0.8871120117624177]], [[0.058079346099858986, 0.9055741155888302, 0.3376080785604336, 0.5778695156221998], [0.36661632473039185, 0.800994330349761, 0.09128826289541214, 0.2382078284920388]]] ,numpy.float_)
92765          arg = Data(val,w_arg)
92766          res=interpolate(arg,where=w_ref)
92767          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92768          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92769          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92770          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92771       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onFunctionOnBoundary_rank4(self):
92772          """
92773          test interploation of constant rank 4 Data on ReducedFunctionOnBoundary
92774          """
92775          w_ref = ReducedFunctionOnBoundary(self.domain)
92776          w_arg = FunctionOnBoundary(self.domain)
92777          val = numpy.array([[[[0.2145524013903527, 0.24089792961072476, 0.9932916227285838, 0.012733683478825641], [0.5142011161806974, 0.16405399624392414, 0.8655791108036284, 0.3390126493887843], [0.21827060140896748, 0.27693953098301016, 0.39063049876734735, 0.5364451186486017]], [[0.3019752734996425, 0.3215151797488027, 0.7521368591896964, 0.46229900343725694], [0.19080450491207868, 0.23696866552500706, 0.007366183215039124, 0.7755022403454018], [0.7699223196351326, 0.8595117783157447, 0.8112482083998037, 0.13249220895293223]]], [[[0.7936166212806668, 0.18751400052329203, 0.27540072394534865, 0.36834425307838037], [0.6116108630046057, 0.18349119780248235, 0.14197713359273179, 0.6048285285550714], [0.551824051185101, 0.1473745682559563, 0.5008165740462018, 0.7751839264048938]], [[0.24879062392423779, 0.9609030000048912, 0.6109640073511698, 0.97674777683831], [0.8731693641272898, 0.0940807350810432, 0.41320254452468774, 0.673518865581775], [0.07920917584712195, 0.17757928557861602, 0.0551238374634162, 0.2097289863544426]]], [[[0.5434193211546073, 0.5768343694893899, 0.782221613606624, 0.6600146089466845], [0.9964243690573472, 0.12270068191803041, 0.9190358885047175, 0.7793851260350958], [0.906184505321438, 0.4106607249361641, 0.8981909427253475, 0.6281699603991318]], [[0.9963724531537237, 0.098881184736761, 0.6201804906367727, 0.9355731882315826], [0.5029881365361015, 0.31198238883404406, 0.0151272630521605, 0.06757634116237543], [0.4874585428336724, 0.6207127438960461, 0.4796838683083924, 0.7842448812877467]]]] ,numpy.float_)
92778          arg = Data(val,w_arg)
92779          res=interpolate(arg,where=w_ref)
92780          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92781          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92782          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92783          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92784       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedFunctionOnBoundary_rank0(self):
92785          """
92786          test interploation of constant rank 0 Data on ReducedFunctionOnBoundary
92787          """
92788          w_ref = ReducedFunctionOnBoundary(self.domain)
92789          w_arg = ReducedFunctionOnBoundary(self.domain)
92790          val = 7.288496e-02
92791          arg = Data(val,(),w_arg)
92792          res=interpolate(arg,where=w_ref)
92793          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92794          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92795          self.assertEqual(res.getShape(),(),"wrong shape of result.")
92796          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92797       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedFunctionOnBoundary_rank1(self):
92798          """
92799          test interploation of constant rank 1 Data on ReducedFunctionOnBoundary
92800          """
92801          w_ref = ReducedFunctionOnBoundary(self.domain)
92802          w_arg = ReducedFunctionOnBoundary(self.domain)
92803          val = numpy.array([0.25841556630698104, 0.1573540961311457, 0.9584429052895114] ,numpy.float_)
92804          arg = Data(val,w_arg)
92805          res=interpolate(arg,where=w_ref)
92806          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92807          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92808          self.assertEqual(res.getShape(),(3,),"wrong shape of result.")
92809          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92810       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedFunctionOnBoundary_rank2(self):
92811          """
92812          test interploation of constant rank 2 Data on ReducedFunctionOnBoundary
92813          """
92814          w_ref = ReducedFunctionOnBoundary(self.domain)
92815          w_arg = ReducedFunctionOnBoundary(self.domain)
92816          val = numpy.array([[0.6790821330183561, 0.7564906985837898], [0.5632568165696104, 0.08413153914498972], [0.31679030112704576, 0.5923791304740935], [0.8378495209362984, 0.5831567791999903]] ,numpy.float_)
92817          arg = Data(val,w_arg)
92818          res=interpolate(arg,where=w_ref)
92819          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92820          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92821          self.assertEqual(res.getShape(),(4, 2),"wrong shape of result.")
92822          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92823       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedFunctionOnBoundary_rank3(self):
92824          """
92825          test interploation of constant rank 3 Data on ReducedFunctionOnBoundary
92826          """
92827          w_ref = ReducedFunctionOnBoundary(self.domain)
92828          w_arg = ReducedFunctionOnBoundary(self.domain)
92829          val = numpy.array([[[0.26631081093084663, 0.5742266726541079, 0.12753861068584116, 0.3584424932381006], [0.22597046302695967, 0.9783592503636329, 0.44750713810073517, 0.9372202753758945]], [[0.33545127011318, 0.07002843394376845, 0.3566614085333282, 0.43701344251938046], [0.9247924175230922, 0.41668241916224347, 0.9929687668000138, 0.407022205915038]]] ,numpy.float_)
92830          arg = Data(val,w_arg)
92831          res=interpolate(arg,where=w_ref)
92832          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92833          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92834          self.assertEqual(res.getShape(),(2, 2, 4),"wrong shape of result.")
92835          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92836       def test_interpolate_onReducedFunctionOnBoundary_fromConstant_onReducedFunctionOnBoundary_rank4(self):
92837          """
92838          test interploation of constant rank 4 Data on ReducedFunctionOnBoundary
92839          """
92840          w_ref = ReducedFunctionOnBoundary(self.domain)
92841          w_arg = ReducedFunctionOnBoundary(self.domain)
92842          val = numpy.array([[[[0.8691434338403439, 0.6331464365176072, 0.8390644610809543, 0.4118416884147633], [0.4407318429840573, 0.877257517977619, 0.09230628707625521, 0.8285490604154563], [0.14981523179372958, 0.44792226923501977, 0.6546835167890781, 0.6348195060584106]], [[0.6591264484692713, 0.4208058158490403, 0.6060911404336305, 0.6805808577849918], [0.026865886829161467, 0.44763734162689484, 0.4285147051423571, 0.38633495777979754], [0.01197160601400138, 0.056387138751563426, 0.6235605595963108, 0.11883773519918384]]], [[[0.7165555921184351, 0.3448408207023229, 0.6403150812646062, 0.5074650351107], [0.08091639767885062, 0.8933089296805964, 0.8229294388271333, 0.6128834637309405], [0.6648810713352777, 0.7124734916410694, 0.7762079386938845, 0.06375120535252199]], [[0.2237681392590113, 0.8405738776179142, 0.14107681496964397, 0.6310989760807912], [0.6385013735546666, 0.464476194499888, 0.33573313838099095, 0.5268345106982509], [0.42682926579930924, 0.908175977790712, 0.5886079168303059, 0.2479777069953224]]], [[[0.4360956389458204, 0.46278050546015437, 0.581426071830637, 0.70790178534635], [0.3710587791530059, 0.5125796775186596, 0.12018187143158043, 0.40115255163024455], [0.13760882029302024, 0.5670063384417476, 0.7741185467231643, 0.1906377624589708]], [[0.5693881769080421, 0.7060457171887292, 0.37712214911798647, 0.42549139782130463], [0.5092197372656926, 0.4859093480715948, 0.5545563851154015, 0.725593183454442], [0.3046905769902506, 0.38681544902199805, 0.6303924508020141, 0.34799911513307624]]]] ,numpy.float_)
92843          arg = Data(val,w_arg)
92844          res=interpolate(arg,where=w_ref)
92845          self.assertTrue(isinstance(res,Data),"wrong type of result.")
92846          self.assertEqual(res.getFunctionSpace(),w_ref,"wrong functionspace of result.")
92847          self.assertEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
92848          self.assertTrue(Lsup(res-val)<=self.RES_TOL*Lsup(val),"wrong result")
92849    

Legend:
Removed from v.3797  
changed lines
  Added in v.3798

  ViewVC Help
Powered by ViewVC 1.1.26