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

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

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

trunk/escript/py_src/test_util.py revision 596 by gross, Wed Mar 15 22:41:23 2006 UTC trunk/escript/test/python/test_util.py revision 1312 by ksteube, Mon Sep 24 06:18:44 2007 UTC
# Line 1  Line 1 
1    #
2  # $Id$  # $Id$
3    #
4    #######################################################
5    #
6    #           Copyright 2003-2007 by ACceSS MNRF
7    #       Copyright 2007 by University of Queensland
8    #
9    #                http://esscc.uq.edu.au
10    #        Primary Business: Queensland, Australia
11    #  Licensed under the Open Software License version 3.0
12    #     http://www.opensource.org/licenses/osl-3.0.php
13    #
14    #######################################################
15    #
16    
17  """  """
18  Test suite for the util.py module.  Test suite for the util.py module.
19    
# Line 22  coordinate 0. Line 37  coordinate 0.
37  @note: at this stage this test will not pass as it tests for functionlity that has not been implemented yet. It also does not test the full functionalitu of util.py yet.  @note: at this stage this test will not pass as it tests for functionlity that has not been implemented yet. It also does not test the full functionalitu of util.py yet.
38    
39  @var __author__: name of author  @var __author__: name of author
40  @var __licence__: licence agreement  @var __copyright__: copyrights
41    @var __license__: licence agreement
42  @var __url__: url entry point on documentation  @var __url__: url entry point on documentation
43  @var __version__: version  @var __version__: version
44  @var __date__: date of the version  @var __date__: date of the version
45  """  """
46    
47  __author__="Lutz Gross, l.gross@uq.edu.au"  __author__="Lutz Gross, l.gross@uq.edu.au"
48  __licence__="contact: esys@access.uq.edu.au"  __copyright__="""  Copyright (c) 2006 by ACcESS MNRF
49                        http://www.access.edu.au
50                    Primary Business: Queensland, Australia"""
51    __license__="""Licensed under the Open Software License version 3.0
52                 http://www.opensource.org/licenses/osl-3.0.php"""
53  __url__="http://www.iservo.edu.au/esys/escript"  __url__="http://www.iservo.edu.au/esys/escript"
54  __version__="$Revision$"  __version__="$Revision$"
55  __date__="$Date$"  __date__="$Date$"
# Line 37  __date__="$Date$" Line 57  __date__="$Date$"
57  import unittest  import unittest
58  import numarray  import numarray
59  from esys.escript import *  from esys.escript import *
60  from esys.escript.test_util_base import Test_util_base  from test_util_base import Test_util_base
61  from esys.escript.test_util_reduction_no_tagged_data import Test_util_reduction_no_tagged_data  from test_util_reduction_no_tagged_data import Test_util_reduction_no_tagged_data
62  from esys.escript.test_util_reduction_with_tagged_data import Test_util_reduction_with_tagged_data  from test_util_reduction_with_tagged_data import Test_util_reduction_with_tagged_data
63  from esys.escript.test_util_overloaded_binary_no_tagged_data import Test_util_overloaded_binary_no_tagged_data  from test_util_overloaded_binary_no_tagged_data import Test_util_overloaded_binary_no_tagged_data
64  from esys.escript.test_util_overloaded_binary_with_tagged_data import Test_util_overloaded_binary_with_tagged_data  from test_util_overloaded_binary_with_tagged_data import Test_util_overloaded_binary_with_tagged_data
65  from esys.escript.test_util_unary_no_tagged_data import Test_util_unary_no_tagged_data  from test_util_unary_no_tagged_data import Test_util_unary_no_tagged_data
66  from esys.escript.test_util_unary_with_tagged_data import Test_util_unary_with_tagged_data  from test_util_unary_with_tagged_data import Test_util_unary_with_tagged_data
67  from esys.escript.test_util_binary_no_tagged_data import Test_util_binary_no_tagged_data  from test_util_binary_no_tagged_data import Test_util_binary_no_tagged_data
68  from esys.escript.test_util_binary_with_tagged_data import Test_util_binary_with_tagged_data  from test_util_binary_with_tagged_data import Test_util_binary_with_tagged_data
69  from esys.escript.test_util_spatial_functions import Test_Util_SpatialFunctions  from test_util_spatial_functions import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary, Test_Util_SpatialFunctions_noGradOnBoundary_noContact
70  from esys.escript.test_util_slicing_no_tagged_data import Test_util_slicing_no_tagged_data  from test_util_slicing_no_tagged_data import Test_util_slicing_no_tagged_data
71  from esys.escript.test_util_slicing_with_tagged_data import Test_util_slicing_with_tagged_data  from test_util_slicing_with_tagged_data import Test_util_slicing_with_tagged_data
72    
73    
74  class Test_util_reduction(Test_util_reduction_no_tagged_data,Test_util_reduction_with_tagged_data):  class Test_util_reduction(Test_util_reduction_no_tagged_data,Test_util_reduction_with_tagged_data):
75     """ test for reduction operation Lsup,sup,inf for all data types"""     """ test for reduction operation Lsup,sup,inf for all data types"""
# Line 75  class Test_util(Test_util_unary,Test_uti Line 96  class Test_util(Test_util_unary,Test_uti
96     """all tests"""     """all tests"""
97     pass     pass
98    
 class Test_util_binary_still_failing(Test_util_base):  
    """  
    these binary opereations still fail! (see Mantis 0000053)  
    """  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_power_float_rank0_constData_rank0(self):  
       arg0=4.35251522982  
       arg1=Data(2.94566651719,self.functionspace)  
       res=power(arg0,arg1)  
       ref=Data(76.1230031099,self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_power_float_rank0_expandedData_rank0(self):  
       arg0=3.41819405792  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*(3.18794922769)+(1.-msk_arg1)*(0.35955973515)  
       res=power(arg0,arg1)  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*(50.3172415941)+(1.-msk_ref)*(1.55572132713)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_power_float_rank0_taggedData_rank0(self):  
       arg0=3.76704928748  
       arg1=Data(1.30536801555,self.functionspace)  
       arg1.setTaggedValue(1,3.46723750757)  
       res=power(arg0,arg1)  
       ref=Data(5.64798685367,self.functionspace)  
       ref.setTaggedValue(1,99.3420963479)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
99    
100  class Test_util_overloaded_binary_still_failing(Test_util_base):  class Test_util_overloaded_binary_still_failing(Test_util_base):
101     """     """
102     these overloaded operations still fail!     these overloaded operations still fail!
103    
         - as float**Data is not implemented  (Manits 0000053)  
104          - wrong return value of Data binaries (Mantis 0000054)          - wrong return value of Data binaries (Mantis 0000054)
105     """     """
106     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_add_overloaded_float_rank0_constData_rank0(self):  
       arg0=4.48433439008  
       arg1=Data(-1.25231625216,self.functionspace)  
       res=arg0+arg1  
       ref=Data(3.23201813791,self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_constData_rank1(self):  
       arg0=4.85806264721  
       arg1=Data(numarray.array([3.4764753469957483, -4.7297221681385793]),self.functionspace)  
       res=arg0+arg1  
       ref=Data(numarray.array([8.3345379942063662, 0.1283404790720386]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_constData_rank2(self):  
       arg0=-0.960748612766  
       arg1=Data(numarray.array([[0.61422796012866687, 1.5847396672359153, -0.02029629132715538, 1.1599743577238719, -0.30494414561669991], [-1.6332700213242113, -4.1634540348788427, -3.1593884738543752, 3.138999837647523, 4.139765676872841], [-3.0736191251063238, -0.47515643032457078, -3.2556867253522856, 3.6985726867609188, -3.5706723780370697], [4.1364498963669423, -2.544180573547139, -1.0163117145359282, -1.3794398980792755, 0.58834072547391614]]),self.functionspace)  
       res=arg0+arg1  
       ref=Data(numarray.array([[-0.34652065263774023, 0.6239910544695082, -0.98104490409356249, 0.19922574495746481, -1.265692758383107], [-2.5940186340906184, -5.1242026476452498, -4.1201370866207823, 2.1782512248811159, 3.1790170641064339], [-4.0343677378727314, -1.4359050430909779, -4.2164353381186928, 2.7378240739945117, -4.5314209908034773], [3.1757012836005352, -3.5049291863135461, -1.9770603273023353, -2.3401885108456826, -0.37240788729249097]]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_constData_rank3(self):  
       arg0=-3.17470622105  
       arg1=Data(numarray.array([[[0.65666944854588216, -4.1171453089427104], [1.9474307214553077, 0.98996240702017069]], [[0.8351759676296, 0.84765720508473841], [-0.73306138067678361, -1.6966350647734476]], [[0.77055741316163573, -1.0104702506086003], [2.6508038143233561, 1.3075966449956189]], [[-2.4184982027935131, -4.0371906810452138], [1.2411499700180153, 1.4592005525281948]], [[1.3478873047166404, 0.21073088816010088], [3.2702195130177483, -3.1362166121457422]], [[-3.2521819658894549, -1.225716368558424], [-2.4157142528193623, -4.2847313298257017]]]),self.functionspace)  
       res=arg0+arg1  
       ref=Data(numarray.array([[[-2.5180367725044688, -7.2918515299930613], [-1.2272754995950432, -2.1847438140301803]], [[-2.3395302534207509, -2.3270490159656125], [-3.9077676017271346, -4.8713412858237986]], [[-2.4041488078887152, -4.1851764716589512], [-0.52390240672699484, -1.867109576054732]], [[-5.5932044238438641, -7.2118969020955648], [-1.9335562510323356, -1.7155056685221561]], [[-1.8268189163337105, -2.9639753328902501], [0.095513291967397329, -6.3109228331960932]], [[-6.4268881869398058, -4.400422589608775], [-5.5904204738697132, -7.4594375508760526]]]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_constData_rank4(self):  
       arg0=-1.24556902458  
       arg1=Data(numarray.array([[[[0.95144503839694927, 3.8747049772318984, 1.6637456016483814, 0.45629857743059787], [0.76792326033735137, 1.9249883810246082, -2.4437444255155372, 0.38011748852073701], [0.65207760300037076, -0.091909570334745894, -2.0902439423360364, 3.4217991791591587]], [[-2.8680510086311726, 4.9365226673466527, -0.89916792700143233, -4.5469112333531827], [-2.897100382404354, -4.132929551372893, -2.7160972180694412, -0.78846072447344451], [1.8280431279004761, -4.9506723340122285, 1.7565050257148807, 1.8885877844760133]]], [[[4.1775975687948534, -1.0659928286440188, -0.90921430152893645, -2.6369242728496767], [4.3543064450317637, -4.9884877795643483, 0.36411425710799339, -3.4648550299306047], [-2.6049605881010973, 1.4161117095327729, 1.8837504532810883, -4.407757287520063]], [[-2.3132870552683427, 4.2496663906996091, 4.9705995976045561, -0.05277006541191831], [-2.979704960306079, 1.373065595947792, -0.57292261081363094, 2.7719543224879137], [4.4692942689897883, -3.0137040993676734, 0.31446957898421601, -1.9473328719399072]]], [[[-4.8463597361851507, 4.4412299279977319, -4.3284149545626596, 1.8753470484358568], [2.6146814732931638, 1.3047608154660075, 3.8494725026732848, 4.9493006531083168], [2.5319156998838537, 0.12049544852721805, -1.8063580652030842, -2.2951712912760582]], [[4.1405675018147594, -0.64722844279997549, -2.8990375200828633, -0.36389730738412585], [-4.2130069316255963, -0.84404839000688536, 3.0476235653881254, 1.3810642470080126], [2.3820109788743915, -2.0352074520887209, -2.944895101856464, -4.8326554343975845]]]]),self.functionspace)  
       res=arg0+arg1  
       ref=Data(numarray.array([[[[-0.29412398618140223, 2.6291359526535469, 0.41817657707002986, -0.78927044714775363], [-0.47764576424100014, 0.67941935644625673, -3.6893134500938887, -0.86545153605761449], [-0.59349142157798074, -1.3374785949130974, -3.3358129669143879, 2.1762301545808072]], [[-4.1136200332095241, 3.6909536427683012, -2.1447369515797838, -5.7924802579315342], [-4.142669406982705, -5.3784985759512445, -3.9616662426477927, -2.034029749051796], [0.58247410332212457, -6.19624135859058, 0.51093600113652915, 0.64301875989766177]]], [[[2.9320285442165019, -2.3115618532223703, -2.154783326107288, -3.8824932974280282], [3.1087374204534122, -6.2340568041426998, -0.88145476747035811, -4.7104240545089562], [-3.8505296126794488, 0.17054268495442138, 0.63818142870273675, -5.6533263120984145]], [[-3.5588560798466942, 3.0040973661212576, 3.7250305730262046, -1.2983390899902698], [-4.2252739848844305, 0.12749657136944048, -1.8184916353919824, 1.5263852979095622], [3.2237252444114368, -4.2592731239460253, -0.93109944559413549, -3.1929018965182587]]], [[[-6.0919287607635022, 3.1956609034193804, -5.5739839791410111, 0.62977802385750525], [1.3691124487148123, 0.059191790887656026, 2.6039034780949333, 3.7037316285299653], [1.2863466753055022, -1.1250735760511335, -3.0519270897814357, -3.5407403158544097]], [[2.8949984772364079, -1.892797467378327, -4.1446065446612153, -1.6094663319624773], [-5.4585759562039478, -2.0896174145852369, 1.8020545408097739, 0.13549522242966106], [1.13644195429604, -3.2807764766670724, -4.190464126434815, -6.078224458975936]]]]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_expandedData_rank0(self):  
       arg0=2.28756974271  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*(-3.25821080509)+(1.-msk_arg1)*(-1.96555890794)  
       res=arg0+arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*(-0.970641062386)+(1.-msk_ref)*(0.322010834763)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_expandedData_rank1(self):  
       arg0=-1.48109757274  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([-0.11930313378942881, -0.62281906788654862])+(1.-msk_arg1)*numarray.array([0.1478840234613461, -3.1708375150120496])  
       res=arg0+arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([-1.6004007065266519, -2.1039166406237717])+(1.-msk_ref)*numarray.array([-1.333213549275877, -4.6519350877492727])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_expandedData_rank2(self):  
       arg0=-0.169932463749  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([[-4.2612545702701947, -1.4553735194531603, -0.58970170069199934, 2.7142248448804684, 0.49630072117932134], [-4.4881867211938173, 4.7705859316762904, 0.71514670382955803, 0.49136004396150845, -1.8325172939297341], [-0.90143719345550544, -3.3235824514646928, 0.73933527403416832, 1.3622462235470776, -4.2416111224814399], [-0.72400532463398015, -2.2001224685497434, 0.016979746508940963, -2.0434113303003629, 0.15588719034756338]])+(1.-msk_arg1)*numarray.array([[2.7213765937575989, -2.2795969932854887, -0.52139742824568991, 2.8522134294177048, 0.8457424404837921], [1.9417193032851561, -1.2624908054580599, 3.3961247882993515, 3.0526027481796163, -3.2773680756777548], [0.89186961224714789, -1.9930074425254896, -3.0982993453261845, 1.5175592177325035, 4.0767012391093225], [3.0717058826665884, 0.60287437134118527, 0.69734800421018406, -3.3849064077596527, 1.9193476027911105]])  
       res=arg0+arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([[-4.4311870340193167, -1.6253059832022823, -0.75963416444112131, 2.5442923811313465, 0.32636825743019937], [-4.6581191849429393, 4.6006534679271684, 0.54521424008043606, 0.32142758021238649, -2.002449757678856], [-1.0713696572046274, -3.4935149152138147, 0.56940281028504636, 1.1923137597979556, -4.4115435862305619], [-0.89393778838310212, -2.3700549322988653, -0.152952717240181, -2.2133437940494849, -0.014045273401558589]])+(1.-msk_ref)*numarray.array([[2.5514441300084769, -2.4495294570346107, -0.69132989199481187, 2.6822809656685829, 0.67580997673467014], [1.7717868395360341, -1.4324232692071819, 3.2261923245502295, 2.8826702844304943, -3.4473005394268768], [0.72193714849802593, -2.1629399062746115, -3.2682318090753064, 1.3476267539833815, 3.9067687753602005], [2.9017734189174664, 0.4329419075920633, 0.52741554046106209, -3.5548388715087746, 1.7494151390419885]])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_expandedData_rank3(self):  
       arg0=-4.99910304361  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([[[0.29850093254277077, 3.714075099304516], [-2.0062084292548397, -0.35557992699667018]], [[-1.7426953986146456, 4.8061906014757394], [1.5737034064549089, 1.6496607633994582]], [[-1.6800592932716416, -4.0500748737766106], [4.4429696282040823, -1.6492563959507054]], [[-2.5051430702127195, -3.1501945875217996], [1.4127543784903365, 0.79949247012357461]], [[-4.2713142705563358, 1.0772945429521563], [-2.4393864151027076, -1.3896557048674865]], [[0.53207200317978298, 4.0627978954482842], [1.0050799831054178, 1.4452226284926244]]])+(1.-msk_arg1)*numarray.array([[[2.3431949600418616, 0.8414028269541598], [4.6319839217175183, 0.56797063519890667]], [[-3.2338388926276354, 4.5658188965197937], [4.5411637311129489, 1.2477521190802747]], [[3.9620056685525924, 4.3928088981260256], [-4.5202678253177471, -0.70854236298596263]], [[-4.7481282129627207, 2.5902043569660824], [3.4921233211469893, 2.0298092936252115]], [[-2.6485885919561092, -1.4434844680815795], [1.4293998615045513, -3.4092526835229608]], [[-1.6057571388949521, -1.8750269826220798], [-4.0024929190275502, -3.5596610079280868]]])  
       res=arg0+arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([[[-4.7006021110648444, -1.2850279443030992], [-7.0053114728624548, -5.3546829706042853]], [[-6.7417984422222608, -0.19291244213187575], [-3.4253996371527062, -3.3494422802081569]], [[-6.6791623368792568, -9.0491779173842257], [-0.55613341540353289, -6.6483594395583205]], [[-7.5042461138203347, -8.1492976311294143], [-3.5863486651172787, -4.1996105734840405]], [[-9.2704173141639501, -3.9218085006554588], [-7.4384894587103227, -6.3887587484751016]], [[-4.4670310404278322, -0.93630514815933097], [-3.9940230605021974, -3.5538804151149908]]])+(1.-msk_ref)*numarray.array([[[-2.6559080835657536, -4.1577002166534553], [-0.36711912189009688, -4.4311324084087085]], [[-8.2329419362352496, -0.43328414708782148], [-0.45793931249466624, -3.7513509245273404]], [[-1.0370973750550228, -0.60629414548158955], [-9.5193708689253622, -5.7076454065935778]], [[-9.7472312565703358, -2.4088986866415327], [-1.5069797224606258, -2.9692937499824037]], [[-7.6476916355637243, -6.4425875116891946], [-3.5697031821030638, -8.4083557271305764]], [[-6.6048601825025672, -6.8741300262296949], [-9.0015959626351645, -8.558764051535702]]])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_expandedData_rank4(self):  
       arg0=1.21550213728  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([[[[1.0090528070218792, 1.9106307145237276, 1.6811659991192984, 2.8746039011671201], [3.2128900608106026, -1.0029381650779232, 4.2582290110477778, -1.5314746280325542], [4.0200741047501438, 0.85429503200093215, -0.28959048929557341, 1.4685265541069095]], [[1.2666874812904458, 0.90859131882091138, -4.2124353036681423, -1.7969402819454117], [1.0681193393672039, -4.3552123630695094, -4.0032577832731144, 3.2235178675683365], [-2.293608774526823, -0.27617082319340369, -3.0553161480163284, 2.699016796800481]]], [[[-3.1592591010135926, -1.8065617435984271, -0.93322835636729717, -0.89350955190884562], [2.1664533395005003, 3.2021639012191052, 0.15085237132003737, 3.6542023388021132], [-3.189090353824271, -0.78745648331728368, 3.5473512169629995, -0.63428493269093256]], [[-2.386669713513625, -4.7249747367905695, 3.4621305968521305, 0.34721477382276866], [2.3599620375368797, 4.925504023751424, -1.3387970171374377, 1.152119609204016], [0.57074477861866502, 1.8075335514397075, -4.0376335655417996, 0.86708280343111621]]], [[[2.9038868635591397, -0.27534668498916304, -3.9273410552323949, -2.6820553539377601], [2.4365074320647118, 0.34999517479826903, -0.22854769539843645, 4.6781171985127763], [4.3296374276993586, 0.21922883926851178, -4.1350155169284406, -2.3582136069048265]], [[2.7860786548105585, 0.83594561167553039, 3.623188500876843, 4.3388769109633465], [1.5411983648209908, -4.097340022156307, -3.2603388376815912, -3.7625212974408386], [4.3922641365190778, -1.4584604688981551, -1.9458060732729168, 4.7470750011718614]]]])+(1.-msk_arg1)*numarray.array([[[[-2.2971897212575207, -1.9323104367751931, -3.8542469069725396, 4.4485944332819258], [-0.06607231477291009, 3.5762633193874507, 3.0154617420368783, 4.9407171282501405], [2.8328870417941907, 0.23672608745144785, -4.1568219116800043, -4.1857481457198258]], [[-4.8093606380089078, -0.0397779241154117, -2.259901622863195, -2.6136275582736266], [-1.4468880860816835, -2.8849999573458129, -3.4179565382839341, -0.92149747328494236], [-2.9713341854979558, 2.8022998913702484, 2.1636456257249694, 0.86254768081227784]]], [[[2.7331065399732859, -2.2351090040619894, -4.6449973078603453, 0.13463596660747346], [2.6288109676308435, -0.037459392356389287, 1.9238240618360258, -3.6974685040353252], [-3.7273667494078842, 0.99700193553500505, 3.4049543411691605, -2.8277946400159495]], [[-0.22566250469420268, 2.9040508082870895, -2.2086574043072238, -1.4485197834588757], [-2.7506068061432885, 4.319997296598773, 4.9353724835318005, 2.4434995113874622], [-3.2330978793405016, -1.185285494021231, -3.1350829568229797, 4.9424587873350312]]], [[[0.98877632378951397, -4.3541317234880017, -3.7870507206588968, -0.87876410126227356], [2.4458382558057332, -2.9329967445924341, -3.0784459129878936, 4.664501550132039], [-0.58295001827707527, -4.1343617072890195, -0.20833671027188227, 0.33631155313822081]], [[-3.5785184648203838, 0.24035957564971877, -2.460749216305802, -4.8033953332916379], [-3.3222083232340403, 4.0706334960022428, 4.3331160444287882, -0.61020302237093649], [-2.3490864183384028, 0.58130243023294614, 1.5993199992299312, -2.5330132221058621]]]])  
       res=arg0+arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([[[[2.224554944300225, 3.1261328518020735, 2.8966681363976443, 4.0901060384454659], [4.4283921980889485, 0.21256397220042267, 5.4737311483261237, -0.3159724907542083], [5.2355762420284897, 2.069797169279278, 0.92591164798277248, 2.6840286913852553]], [[2.4821896185687917, 2.1240934560992573, -2.9969331663897965, -0.58143814466706578], [2.2836214766455498, -3.1397102257911635, -2.7877556459947685, 4.4390200048466824], [-1.0781066372484771, 0.93933131408494219, -1.8398140107379826, 3.9145189340788269]]], [[[-1.9437569637352468, -0.59105960632008125, 0.28227378091104871, 0.32199258536950026], [3.3819554767788462, 4.4176660384974511, 1.3663545085983833, 4.8697044760804591], [-1.9735882165459251, 0.4280456539610622, 4.7628533542413454, 0.58121720458741333]], [[-1.1711675762352791, -3.5094725995122236, 4.6776327341304764, 1.5627169111011145], [3.5754641748152256, 6.1410061610297699, -0.12329487985909182, 2.3676217464823619], [1.7862469158970109, 3.0230356887180534, -2.8221314282634538, 2.0825849407094621]]], [[[4.1193890008374856, 0.94015545228918285, -2.711838917954049, -1.4665532166594142], [3.6520095693430576, 1.5654973120766149, 0.98695444187990944, 5.8936193357911222], [5.5451395649777044, 1.4347309765468577, -2.9195133796500947, -1.1427114696264806]], [[4.0015807920889044, 2.0514477489538763, 4.8386906381551889, 5.5543790482416924], [2.7567005020993367, -2.8818378848779611, -2.0448367004032453, -2.5470191601624927], [5.6077662737974237, -0.24295833161980918, -0.73030393599457089, 5.9625771384502073]]]])+(1.-msk_ref)*numarray.array([[[[-1.0816875839791749, -0.71680829949684721, -2.6387447696941937, 5.6640965705602717], [1.1494298225054358, 4.7917654566657966, 4.2309638793152242, 6.1562192655284864], [4.0483891790725366, 1.4522282247297937, -2.9413197744016584, -2.9702460084414799]], [[-3.5938585007305619, 1.1757242131629342, -1.0443994855848491, -1.3981254209952807], [-0.23138594880333763, -1.6694978200674671, -2.2024544010055882, 0.29400466399340353], [-1.7558320482196099, 4.0178020286485943, 3.3791477630033153, 2.0780498180906237]]], [[[3.9486086772516318, -1.0196068667836435, -3.4294951705819994, 1.3501381038858193], [3.8443131049091894, 1.1780427449219566, 3.1393261991143717, -2.4819663667569793], [-2.5118646121295383, 2.2125040728133509, 4.6204564784475064, -1.6122925027376036]], [[0.9898396325841432, 4.1195529455654354, -0.99315526702887791, -0.23301764618052978], [-1.5351046688649426, 5.5354994338771188, 6.1508746208101464, 3.6590016486658081], [-2.0175957420621558, 0.030216643257114928, -1.9195808195446338, 6.1579609246133771]]], [[[2.2042784610678599, -3.1386295862096558, -2.5715485833805509, 0.33673803601607233], [3.6613403930840791, -1.7174946073140882, -1.8629437757095477, 5.8800036874103849], [0.63255211900127062, -2.9188595700106736, 1.0071654270064636, 1.5518136904165667]], [[-2.3630163275420379, 1.4558617129280647, -1.2452470790274561, -3.587893196013292], [-2.1067061859556944, 5.2861356332805887, 5.5486181817071341, 0.6052991149074094], [-1.1335842810600569, 1.796804567511292, 2.8148221365082771, -1.3175110848275162]]]])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_Symbol_rank0(self):  
       arg0=-1.02534174881  
       arg1=Symbol(shape=())  
       res=arg0+arg1  
       s1=numarray.array(-4.33625684225)  
       sub=res.substitute({arg1:s1})  
       ref=numarray.array(-5.36159859106)  
       self.failUnless(isinstance(res,Symbol),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_Symbol_rank1(self):  
       arg0=4.00638967702  
       arg1=Symbol(shape=(2,))  
       res=arg0+arg1  
       s1=numarray.array([-3.2788211191636272, 0.40197241921644977])  
       sub=res.substitute({arg1:s1})  
       ref=numarray.array([0.72756855785368479, 4.4083620962337617])  
       self.failUnless(isinstance(res,Symbol),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")  
       self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_Symbol_rank2(self):  
       arg0=4.37575468534  
       arg1=Symbol(shape=(4, 5))  
       res=arg0+arg1  
       s1=numarray.array([[-4.6630396568758279, -3.1956340017400708, -2.8069532594662983, 1.7209167084099626, -1.423118573430818], [2.9213094545958302, -3.3219853686124692, -4.4040134430919808, 2.7752933668193407, 4.2049998039803587], [-1.1383874736469437, 0.23485791628185027, -3.5007437909710113, 0.5915098132733192, 3.874076015675719], [0.3702045875364357, 3.0308157187054778, 0.89848093801439877, -3.761713470419914, 0.1526054517776112]])  
       sub=res.substitute({arg1:s1})  
       ref=numarray.array([[-0.28728497153464261, 1.1801206836011144, 1.568801425874887, 6.0966713937511479, 2.9526361119103672], [7.2970641399370155, 1.0537693167287161, -0.02825875775079556, 7.151048052160526, 8.5807544893215439], [3.2373672116942416, 4.6106126016230355, 0.87501089437017399, 4.9672644986145045, 8.2498307010169043], [4.745959272877621, 7.4065704040466631, 5.274235623355584, 0.61404121492127128, 4.5283601371187965]])  
       self.failUnless(isinstance(res,Symbol),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")  
       self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_Symbol_rank3(self):  
       arg0=1.18463485087  
       arg1=Symbol(shape=(6, 2, 2))  
       res=arg0+arg1  
       s1=numarray.array([[[-4.8037156497413713, -2.0905139798443759], [-4.1734764428560878, -1.5196595332126259]], [[0.5139082550288423, 1.8261032121495049], [-2.8489875583341737, -3.7544885746479384]], [[-3.8307712191969756, 3.8835809221879884], [0.38860156986987526, 4.833612940224576]], [[2.0131711043766574, -1.6211007660194667], [1.834869732218209, 1.452027834491183]], [[-2.0904105484106497, -2.5515706248989876], [1.432725583104915, 0.38179177628590466]], [[-0.1816750387292867, 0.25623546736859737], [-2.5404325223276683, -3.6270715752041993]]])  
       sub=res.substitute({arg1:s1})  
       ref=numarray.array([[[-3.6190807988741645, -0.90587912897716905], [-2.9888415919888809, -0.33502468234541904]], [[1.6985431058960492, 3.0107380630167118], [-1.6643527074669668, -2.5698537237807315]], [[-2.6461363683297687, 5.0682157730551953], [1.5732364207370821, 6.0182477910917829]], [[3.1978059552438642, -0.43646591515225985], [3.0195045830854159, 2.6366626853583899]], [[-0.90577569754344278, -1.3669357740317807], [2.6173604339721219, 1.5664266271531115]], [[1.0029598121379202, 1.4408703182358042], [-1.3557976714604614, -2.4424367243369924]]])  
       self.failUnless(isinstance(res,Symbol),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")  
       self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_float_rank0_Symbol_rank4(self):  
       arg0=-4.65129821567  
       arg1=Symbol(shape=(3, 2, 3, 4))  
       res=arg0+arg1  
       s1=numarray.array([[[[0.68993670010109565, -4.0163179251569474, -4.1648310461251414, -4.778814664891148], [1.0707877090708386, 2.5326113162472019, -1.5147221392342658, 0.88657360420535625], [-4.3335120564307195, 4.3865636722950754, 4.4304446339569274, 4.7048447967064071]], [[0.32793921406159754, -1.8294601672862152, 4.0882430559927307, 2.1117933944770932], [-0.79488102071059963, 1.8905549855669266, -4.8371445680209373, -3.6127183225555006], [1.5281970384410375, -4.6239921683710383, -2.6453258525672494, 1.1246634985101176]]], [[[0.21398595796777009, 0.31807416662460319, -2.2221092516238503, 0.12560580463083504], [-4.6168031995078094, 1.9986179024253641, -1.7382356570952617, -1.9522476741058439], [-3.0079988792632961, -0.60003495704375265, 4.9879893207661503, 1.7658211080853325]], [[-0.3202973551798145, 1.136127817429081, -4.9309227460362521, -4.5290306196460426], [-0.21707037673963114, 4.6725867751122117, 1.980083908153512, -3.0159873108253166], [-2.2415810532060956, 2.9465927419293161, -1.4080210694824968, -2.7777957375257509]]], [[[-4.5562764421472721, 1.9285026147658986, -3.7918606762119875, -2.6948114406357337], [-1.3639643163845125, 1.9381789471260182, -0.71828943754706209, -4.1320520853554532], [-1.2947446193334491, 1.1673610140762491, 1.8451268841455253, -1.2878294697467965]], [[-1.5686556530611453, 1.1924537989183301, -1.1110231639994019, 1.4621405634564724], [-0.13152846075432212, 1.7791464711106739, 4.57076914605722, 4.722965521992478], [1.8530166481929111, -4.152439969506899, 1.6654844780892599, 2.3242972690569292]]]])  
       sub=res.substitute({arg1:s1})  
       ref=numarray.array([[[[-3.961361515565466, -8.6676161408235082, -8.8161292617917031, -9.4301128805577097], [-3.580510506595723, -2.1186868994193597, -6.1660203549008274, -3.7647246114612054], [-8.9848102720972811, -0.26473454337148628, -0.22085358170963421, 0.053546581039845442]], [[-4.3233590016049641, -6.4807583829527768, -0.56305515967383091, -2.5395048211894684], [-5.4461792363771613, -2.7607432300996351, -9.4884427836874998, -8.2640165382220623], [-3.1231011772255242, -9.2752903840376, -7.296624068233811, -3.5266347171564441]]], [[[-4.4373122576987916, -4.3332240490419585, -6.873407467290412, -4.5256924110357266], [-9.268101415174371, -2.6526803132411976, -6.3895338727618238, -6.6035458897724055], [-7.6592970949298582, -5.2513331727103143, 0.33669110509958866, -2.8854771075812291]], [[-4.9715955708463762, -3.5151703982374807, -9.5822209617028129, -9.1803288353126042], [-4.8683685924061928, 0.021288559445650002, -2.6712143075130497, -7.6672855264918782], [-6.8928792688726572, -1.7047054737372456, -6.0593192851490585, -7.4290939531923126]]], [[[-9.2075746578138329, -2.7227956009006631, -8.4431588918785501, -7.3461096563022954], [-6.0152625320510742, -2.7131192685405434, -5.3695876532136237, -8.7833503010220149], [-5.9460428350000107, -3.4839372015903125, -2.8061713315210364, -5.9391276854133581]], [[-6.2199538687277069, -3.4588444167482315, -5.7623213796659636, -3.1891576522100893], [-4.7828266764208838, -2.8721517445558877, -0.080529069609341697, 0.071667306325916336], [-2.7982815674736505, -8.8037381851734615, -2.9858137375773017, -2.3270009466096324]]]])  
       self.failUnless(isinstance(res,Symbol),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")  
       self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_constData_rank0(self):  
       arg0=3.7652582944  
       arg1=Data(3.1005820944,self.functionspace)  
       res=arg0**arg1  
       ref=Data(60.9956643611,self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_constData_rank1(self):  
       arg0=1.56847796034  
       arg1=Data(numarray.array([1.668960941491038, 1.5438441811985528]),self.functionspace)  
       res=arg0**arg1  
       ref=Data(numarray.array([2.1195606529779085, 2.003494811618745]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_constData_rank2(self):  
       arg0=0.853668063781  
       arg1=Data(numarray.array([[3.2486997556413488, 0.86400711652329565, 3.2884578380088287, 1.2334289335947253, 2.5487776044652506], [3.7635594458327879, 2.0892653973449962, 3.1786608578416762, 0.14432777693961937, 2.6022783227644193], [0.10738723325449236, 1.9315854964052719, 3.1596089936211107, 0.45131939265454701, 2.5221015795578148], [3.296601365878248, 0.11581499226281025, 3.8612489083924948, 4.5664152349145377, 1.2728985965946598]]),self.functionspace)  
       res=arg0**arg1  
       ref=Data(numarray.array([[0.59810674931764074, 0.87223445231801477, 0.59435632263408789, 0.82271593116798969, 0.66814547267568969], [0.55131803150166692, 0.71852942411582488, 0.60477125876633264, 0.97742422610323876, 0.66251382293516647], [0.98315347711569301, 0.73668002747870431, 0.60659694046203705, 0.93108516866399793, 0.67097133288368638], [0.59359104068625757, 0.98184343378610262, 0.54286252143570424, 0.48555362457985307, 0.81759440057278132]]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_constData_rank3(self):  
       arg0=0.357074915448  
       arg1=Data(numarray.array([[[0.38518924057053733, 0.24038528636715123], [1.6360866883952314, 0.43029605106106911]], [[3.423417953608805, 4.2988721626759077], [1.2524682631274544, 1.1468077998964645]], [[0.58295721049108573, 3.824568580799006], [3.0208703291598176, 1.3499811271261073]], [[3.0953057377971902, 1.3094835373781], [3.6681512369867795, 4.6149094849966819]], [[2.7674281276596542, 1.1256247920546796], [1.8871491353554231, 1.9524702935330096]], [[1.7534659804811799, 0.081583735919993849], [0.44546937195258135, 0.72867650813344209]]]),self.functionspace)  
       res=arg0**arg1  
       ref=Data(numarray.array([[[0.67255485268654747, 0.78071033102668452], [0.18547078622777072, 0.6420282101483078]], [[0.029438000064868096, 0.01195004623087142], [0.27532476037344766, 0.30697352764374525]], [[0.54862782939462229, 0.019475895313555789], [0.044559875252802042, 0.24901961219972699]], [[0.041271801415451524, 0.25962452868686592], [0.022879873935515389, 0.0086302791912317954]], [[0.057848702603705324, 0.31374356524419156], [0.14321555126374733, 0.13389855839543346]], [[0.16435341072630344, 0.91941680244570745], [0.63207408549094379, 0.4721785335572487]]]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_constData_rank4(self):  
       arg0=2.54914513421  
       arg1=Data(numarray.array([[[[1.270326259520153, 2.703299648777842, 4.8868346033905601, 2.3051326073096781], [3.2104019478564068, 4.817944979076735, 3.3247417263409202, 0.98796021017567104], [2.8880422572281463, 3.785353186109202, 1.1117179336379168, 4.9472947776437248]], [[3.5602918771225234, 3.5282818484304541, 2.8402575218661106, 1.6543365821874987], [0.16084877586377758, 0.89809582383337261, 1.3182980703805016, 3.3178012989111392], [3.2028874945099108, 2.5648139049109338, 4.8955284805714774, 3.5432022149852789]]], [[[1.1618978717086723, 2.7972414378300354, 3.8402714340316493, 1.6001498069270363], [1.087268582711364, 1.737265734430502, 3.6813919135947497, 4.3853914265325047], [1.88609441539519, 0.76524872642235886, 3.6761434732611624, 4.3321470021505437]], [[3.8235160205264509, 1.4456401748290546, 4.9173755965598991, 0.81975566563269575], [3.2061466542685157, 4.1636780468474139, 4.6306556567028174, 2.5296462390778065], [4.845909777306229, 0.57810028049528195, 1.1669649534267978, 4.7820404580882832]]], [[[2.1014714421841116, 2.4894332649036168, 2.3637808594117877, 0.5984928521048446], [3.4559984949550633, 2.686579205418913, 2.2483997830542748, 0.020742963721536667], [4.9435995803226715, 3.1161994022593595, 1.4907525564149176, 2.7151195320092083]], [[4.9609626993990288, 3.2550482319119549, 2.756546888804754, 4.1177301026436313], [3.2969135888482954, 1.1694652654802464, 3.5049458620366489, 2.086655354958836], [1.305388807910512, 4.1439092644148641, 4.1618527860945553, 0.27563591561125417]]]]),self.functionspace)  
       res=arg0**arg1  
       ref=Data(numarray.array([[[[3.2828699942440989, 12.548917902286258, 96.823997850208443, 8.6455645449807932], [20.169256775933832, 90.779260772485557, 22.446930364732179, 2.5205867988213329], [14.917109221466619, 34.541958014986271, 2.8300631290510951, 102.45984550866767]], [[27.982290424490554, 27.156547644185704, 14.264784430300786, 4.7023331158783899], [1.162433367658529, 2.3172946523503977, 3.433595788127132, 22.301619783037562], [20.027929872633244, 11.023675606380118, 97.614909291888679, 27.538362597921434]]], [[[2.9661217756338676, 13.701992022280693, 36.363479213061616, 4.469842090112488], [2.7660500872410752, 5.0817740136946528, 31.339903588247452, 60.561863519575425], [5.8411520949429976, 2.0464112817180369, 31.186362199170709, 57.618372322207513]], [[35.797782115214986, 3.8681232751319539, 99.631049282802593, 2.1534968710662095], [20.089103989632303, 49.214844611560132, 76.185667975322431, 10.666807966518682], [93.186153150784094, 1.7176584513241597, 2.9802192231638229, 87.779931945141115]]], [[[7.1454003570562259, 10.272878285306508, 9.1332992663966657, 1.7507504263789035], [25.380431205406289, 12.354101945587495, 8.1985574857144279, 1.0196000020407845], [102.10617058325805, 18.467431327194475, 4.0349088932001909, 12.688486277704584]], [[103.77870947420652, 21.029739940364855, 13.190026463287207, 47.143641282881781], [21.869948257238978, 2.9872001672429778, 26.569962421375287, 7.0470181501669806], [3.3923676531460898, 48.312798275660654, 49.130857281409916, 1.2942463156201212]]]]),self.functionspace)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_expandedData_rank0(self):  
       arg0=0.672041586744  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*(2.50085945333)+(1.-msk_arg1)*(0.714228495159)  
       res=arg0**arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*(0.370119550813)+(1.-msk_ref)*(0.752872459895)  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_expandedData_rank1(self):  
       arg0=3.83643456658  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([2.4649528119460604, 4.4015773579432063])+(1.-msk_arg1)*numarray.array([2.5050056042267443, 3.1185274699598557])  
       res=arg0**arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([27.501378365433037, 371.70924493690819])+(1.-msk_ref)*numarray.array([29.02300655036413, 66.220868195790914])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_expandedData_rank2(self):  
       arg0=1.13471850643  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([[0.58912677090382137, 0.93983668514090013, 2.0122074986633924, 4.4727320622173794, 1.2940493913793865], [0.41905245533976337, 1.7214742795801785, 3.3690628746243316, 4.3264805098978441, 2.2821866717410533], [3.5873589494704259, 4.5154183135527708, 0.67571874016825018, 0.49739384193149055, 2.297552452346038], [2.4711308013943767, 0.035889491188690691, 0.56766133369174721, 2.9251085245873232, 4.0512786424163183]])+(1.-msk_arg1)*numarray.array([[4.3857003148743008, 4.7692907184605806, 2.1049865113290753, 4.7253126157148948, 4.6473956540399657], [4.7007738365129486, 3.4364353832802648, 1.8949658645375465, 4.6712667420053657, 3.7857807635261378], [3.2496714869217667, 1.8954007017372452, 1.414346327611854, 1.8982366357369476, 4.2242475882140065], [2.9895955236808205, 4.0056998573414901, 4.0987731208544638, 2.6341113165055616, 0.83739250662962583]])  
       res=arg0**arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([[1.0772985404874016, 1.1261231478052052, 1.2895741613114386, 1.7599483980551891, 1.1776817946355922], [1.0543893459992322, 1.24304977052763, 1.5308110476569741, 1.7277164132177647, 1.3343353041969708], [1.5736329944297045, 1.7694687751144236, 1.0891531288355194, 1.0648808615781149, 1.3369290986616456], [1.3665822272329975, 1.0045461819546835, 1.0743798971224092, 1.4472839975883616, 1.6686572548284615]])+(1.-msk_ref)*numarray.array([[1.7406959700520956, 1.8271638189402759, 1.3047845032528298, 1.8170363298534116, 1.7992308696652106], [1.8114098407754482, 1.5439013229774907, 1.2706067196110626, 1.8046672342912449, 1.6135946927617708], [1.5078856800121894, 1.2706765499191768, 1.1957236972774039, 1.2711320654123079, 1.7055367599969291], [1.459127798590762, 1.6590726589695033, 1.6787036103748865, 1.3950233126781093, 1.1116368001118335]])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_expandedData_rank3(self):  
       arg0=4.69671679008  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([[[4.1109492881321765, 1.5337005632312695], [4.3407884519530366, 4.6530992322911136]], [[2.5646089934744452, 2.519089903454621], [1.4887838873084611, 0.34112905345492628]], [[3.5362317357059716, 3.8706128693651469], [1.1870955077990113, 4.4747271870138459]], [[1.188825141228715, 0.62354589843593555], [2.2744424942987802, 2.6498967536945086]], [[1.900681769034668, 2.9685327729104474], [4.9963790460373829, 1.7061294551675452]], [[2.5090791675722377, 2.1621870068681837], [3.4768663195477485, 4.2757225442582376]]])+(1.-msk_arg1)*numarray.array([[[0.55947048241267894, 3.892675918272622], [2.0928980801633474, 3.4373418158231508]], [[3.1001717026044253, 0.2732937451339511], [1.3529965739226828, 2.942372355807342]], [[0.19566839701147096, 3.5887158621765871], [2.74664233625374, 0.52321381674739664]], [[4.8284101588082473, 3.8297905260356648], [0.37716052032457881, 1.5885464889650818]], [[1.1563227169890045, 2.9607643976148381], [3.2225447832954872, 1.3146888053450296]], [[3.6572582485321434, 3.2335045378392566], [0.55266266203484782, 1.6820417984729208]]])  
       res=arg0**arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([[[577.71361183417048, 10.723372898515619], [824.36065818127418, 1336.3674293440472]], [[52.831128957427595, 49.239135886293603], [10.00360738339231, 1.6949956135969837]], [[237.4764687630614, 398.34185963465751], [6.2731270382215989, 1014.1368084784533]], [[6.2899333072924852, 2.6235818996943157], [33.725443528800987, 60.281732951333787]], [[18.917655727234941, 98.683288531378238], [2272.6854395211553, 14.001293771330797]], [[48.482529090228326, 28.349477896809432], [216.64029075415539, 745.42910675836185]]])+(1.-msk_ref)*numarray.array([[[2.3760146936426265, 412.1713290347119], [25.468135625976604, 203.7918870061259]], [[120.97006271287876, 1.5261499268949541], [8.1084059812258715, 94.76963162907046]], [[1.3534709167425627, 257.56041919364674], [70.013028937280922, 2.2464259022347384]], [[1752.664443764852, 373.9656614833155], [1.7921498298672001, 11.672841617856733]], [[5.9815136051294902, 97.504545603100766], [146.17983011754166, 7.6418857758763306]], [[286.36867675378357, 148.67917899777751], [2.351124714064428, 13.489200678865306]]])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_expandedData_rank4(self):  
       arg0=3.30902145167  
       msk_arg1=whereNegative(self.functionspace.getX()[0]-0.5)  
       arg1=msk_arg1*numarray.array([[[[3.1725349657503203, 3.0845748500431833, 1.3251300629206579, 2.6569079873920867], [4.401133367358729, 0.2813959929768825, 1.7519650763785801, 2.6178805778238692], [1.8864041086569574, 3.7791551835731969, 1.3422457102105219, 0.2081604723265463]], [[2.1902428534420713, 3.0841633696278761, 2.9965222635048661, 2.2869374663249884], [2.7280695311253944, 3.9590303115195788, 3.1301491431538744, 4.182436518053791], [1.2260234819740716, 1.8242153795636069, 3.9401624249260436, 3.4349251048319336]]], [[[0.48861823801104354, 2.3131499879646946, 1.2086122619459398, 2.2409237938676974], [3.3117711127665297, 0.87018754086000127, 1.6709579147934865, 1.2893183225200897], [1.3390161693818554, 1.0108007072272069, 3.9414993282493, 1.4462150778696792]], [[3.7967170311866441, 2.0212015799940115, 3.8412381336762307, 2.4057808908249125], [0.26260712889943277, 1.5647590608685933, 2.3707533968847603, 2.6465667159258581], [4.4731993538103074, 3.7651741459195378, 3.1338509227608538, 3.5035590250769135]]], [[[3.3050973895841906, 4.0367399640154655, 2.4941086434787398, 0.39145638395278809], [1.0614822508511919, 4.5756493953902719, 0.475720968447504, 2.1319535282121014], [1.7670440121784567, 4.7448652509649039, 1.8204034323285305, 4.7703236186277493]], [[2.1011053202368353, 2.3665545270862758, 1.6073533542163603, 1.2600308196018239], [0.29247411729720818, 2.3684742025187231, 1.7771399367205181, 4.9668082864579608], [4.595426606005498, 1.6371273654479281, 1.5037601874471596, 3.78912031777574]]]])+(1.-msk_arg1)*numarray.array([[[[4.8327836291046573, 1.1638816644184602, 2.1517890444121353, 3.3263630206047123], [3.7647650305885212, 1.1608624440787043, 0.61940200250059252, 3.3853649131580092], [2.9385268975715064, 0.52662330688397618, 4.4799956940372914, 2.9996151641521429]], [[0.70044410456478112, 4.3945400808511978, 3.1252348972736086, 1.2688805783984476], [0.15599343791305745, 0.53599762707945264, 1.061576396298286, 2.5648049865803384], [0.19676100009146294, 0.32071368159627772, 4.7168617485783004, 0.11755525142074101]]], [[[3.7377217347115015, 2.9327497612552462, 1.8145282053559222, 0.56740904011144078], [1.4416030660600863, 4.1189600680246015, 2.1110973910715658, 3.5384856009199517], [0.95118141400261069, 2.4572939344524936, 0.54929526659505457, 2.9652939525377708]], [[2.0885234488307876, 0.25836797235157094, 2.6699858158100973, 3.3139553157584252], [2.6559413882762239, 1.2879435669486743, 3.3675769889236591, 4.237965236929135], [0.79625310217359302, 3.3583510561037029, 1.2582374986295783, 2.1398901148681815]]], [[[4.7482284899129752, 2.2293361019743232, 1.1930794286761943, 1.0124469031550984], [0.38197241933053727, 4.1981998835993846, 0.79098246624754098, 4.4325191244897875], [4.135761934042792, 2.5772295341335645, 2.2968196972889792, 0.4273068074746656]], [[1.1976128220324929, 1.7459294668094707, 0.96078177214101046, 4.0854494840822007], [3.2731005299433793, 0.82489742017210455, 4.9787451612568212, 1.3471667907126523], [4.343723010658568, 0.57644019147251058, 0.71342917305041831, 2.0211306038878543]]]])  
       res=arg0**arg1  
       msk_ref=1.-whereZero(self.functionspace.getX()[0],1.e-8)  
       ref=msk_ref*numarray.array([[[[44.541526569463137, 40.091495998956134, 4.8828067986685939, 24.032224484143175], [193.76135996199952, 1.4003654269209849, 8.1375846434933727, 22.935670648779361], [9.5579208088126997, 92.050334604168881, 4.9838450947922492, 1.2828648641369595]], [[13.748910875268686, 40.071759842941873, 36.082063760330911, 15.435490923052084], [26.168365475343812, 114.15801285560873, 42.338669214857362, 149.14562304631761], [4.3367450539559762, 8.8724583914528239, 111.60939851359214, 60.971817813198015]]], [[[1.7944637697607297, 15.927333847311955, 4.2473229866626534, 14.608551648073879], [52.616997841336541, 2.8329316847606481, 7.3857759810555583, 4.6779782048798051], [4.9646215069645256, 3.3520671162853026, 111.78809510460806, 5.644134732164181]], [[94.005281960103943, 11.230979059402637, 99.149346198163528, 17.794399015213255], [1.3692312903098052, 6.5043609053916684, 17.063949250753016, 23.736660466381913], [211.21260699785594, 90.523102907549571, 42.52663468713218, 66.190881211600896]]], [[[52.198465234023658, 125.28297981521477, 19.77822080158063, 1.597495779133167], [3.5616552748767889, 238.76083054241485, 1.7669814438499811, 12.822578271065522], [8.2857540079134431, 292.35093722860603, 8.8320781648818247, 301.39441025042674]], [[12.357868168826375, 16.978424976621678, 6.844486437856224, 4.5168689568684455], [1.4190531977552476, 17.01747238246455, 8.3864639284588733, 381.28365954211506], [244.47884719156841, 7.0927460162084532, 6.0464928235844093, 93.154587613024191]]]])+(1.-msk_ref)*numarray.array([[[[324.78475431172814, 4.0259540631320077, 13.130578736246635, 53.54383496616213], [90.478796459093957, 4.0114347064939215, 2.0984709533536985, 57.460940797659013], [33.662874823011009, 1.8779581626455863, 212.93737318668644, 36.215855509993467]], [[2.3121739758861097, 192.23862246855467, 42.090421189774155, 4.5649571677125911], [1.2052294205209508, 1.8991433322517872, 3.5620565513756124, 21.524252643769405], [1.2654838573469389, 1.4678266430201032, 282.71645200527132, 1.1510479483688476]]], [[[87.597643951351131, 33.430958374780801, 8.7702010825145305, 1.9718879873813866], [5.6130706904588212, 138.23621312261142, 12.50651858980023, 69.015953092721603], [3.1212502046915214, 18.925816809951922, 1.9296054663911439, 34.758580290537438]], [[12.173200204345505, 1.3623030451242739, 24.411277858111475, 52.754704457848213], [24.004442882739546, 4.6702887676119742, 56.25075494797089, 159.3928238308925], [2.5930590384710972, 55.633148887433734, 4.5071862303782986, 12.944938739392638]]], [[[293.5299119704776, 14.407381017935226, 4.1691054609354943, 3.3586769436892241], [1.5794682740857684, 151.98569970294611, 2.5767557720475129, 201.17700525164358], [141.04371902898262, 21.846663187868508, 15.619108363619203, 1.6675204530848913]], [[4.1917838851875393, 8.0790224539183537, 3.157314804255805, 132.80254310369224], [50.237611053976565, 2.6834829790067647, 386.76911099066751, 5.0132806634938518], [180.89686297334865, 1.9933140453396749, 2.3483825436453394, 11.230025210903007]]]])  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_add_overloaded_constData_rank0_Symbol_rank0(self):  
       arg0=Data(0.499161085524,self.functionspace)  
       arg1=Symbol(shape=())  
       res=arg0+arg1  
       s1=numarray.array(0.377874196418)  
       sub=res.substitute({arg1:s1})  
       ref=Data(0.877035281942,self.functionspace)  
       self.failUnless(isinstance(res,Symbol),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")  
       self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
107     def test_add_overloaded_constData_rank0_Symbol_rank1(self):     def test_add_overloaded_constData_rank0_Symbol_rank1(self):
108        arg0=Data(-4.93686078973,self.functionspace)        arg0=Data(-4.93686078973,self.functionspace)
109        arg1=Symbol(shape=(2,))        arg1=Symbol(shape=(2,))
# Line 2779  class Test_util_overloaded_binary_still_ Line 2498  class Test_util_overloaded_binary_still_
2498        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")
2499        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
2500     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++     #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2501     def test_pow_overloaded_float_rank0_taggedData_rank0(self):     def test_add_overloaded_constData_rank0_Symbol_rank0(self):
2502        arg0=0.341812064896        arg0=Data(0.499161085524,self.functionspace)
2503        arg1=Data(4.30670501129,self.functionspace)        arg1=Symbol(shape=())
2504        arg1.setTaggedValue(1,3.64191179292)        res=arg0+arg1
2505        res=arg0**arg1        s1=numarray.array(0.377874196418)
2506        ref=Data(0.00982109262741,self.functionspace)        sub=res.substitute({arg1:s1})
2507        ref.setTaggedValue(1,0.0200490957504)        ref=Data(0.877035281942,self.functionspace)
2508        self.failUnless(isinstance(res,Data),"wrong type of result.")        self.failUnless(isinstance(res,Symbol),"wrong type of result.")
2509        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")        self.failUnlessEqual(res.getShape(),(),"wrong shape of result.")
2510        self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")        self.failUnless(Lsup(sub-ref)<=self.RES_TOL*Lsup(ref),"wrong result")
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_taggedData_rank1(self):  
       arg0=2.71918984915  
       arg1=Data(numarray.array([3.6696137015868118, 0.10205613053632596]),self.functionspace)  
       arg1.setTaggedValue(1,numarray.array([2.0744420420962988, 0.15604693286805166]))  
       res=arg0**arg1  
       ref=Data(numarray.array([39.284863912783393, 1.1074833798224062]),self.functionspace)  
       ref.setTaggedValue(1,numarray.array([7.9656207691933547, 1.1689419815449242]))  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(2,),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_taggedData_rank2(self):  
       arg0=4.4483395692  
       arg1=Data(numarray.array([[2.4529759744254518, 0.7580664327558474, 3.8975000203490939, 3.4541350498163998, 2.9544320655798217], [0.51290472026154688, 4.8961671628638266, 3.2135251243961367, 2.2462684812562461, 0.40911836554684933], [0.49170040047395686, 1.6842515195955219, 1.3170700476689892, 4.1425294249616993, 3.5304507633256805], [3.947444976634118, 0.11124097097693472, 3.9923991533874283, 1.7047022614872385, 2.8975607347873065]]),self.functionspace)  
       arg1.setTaggedValue(1,numarray.array([[1.367948443330212, 4.7927959789646231, 2.3429313409787804, 4.9593367032554436, 4.2265558126195799], [3.4900286322554974, 2.8595582096739616, 1.8509445481474043, 0.5564155380820085, 4.3906066414576292], [4.6766848736409896, 3.2257976245481674, 4.7778474579462165, 2.0847486832037205, 1.7898532863269634], [1.4356217054626659, 0.92982462549186062, 2.7611923306294219, 1.3646256492703579, 3.9619562449225665]]))  
       res=arg0**arg1  
       ref=Data(numarray.array([[38.905764567917963, 3.1001099299365245, 336.00942079583973, 173.36570774432349, 82.235011176537952], [2.150125347731461, 1491.7135365638999, 121.05990834187568, 28.577654722949994, 1.8415761361989709], [2.0831434757725034, 12.351746001040247, 7.1403924396906904, 484.37197478038973, 194.28124800097655], [362.01425445908728, 1.1806092113877813, 387.13717427618201, 12.734575745284882, 75.542765004391114]]),self.functionspace)  
       ref.setTaggedValue(1,numarray.array([[7.7037353055247513, 1278.4402727482807, 33.012867631466662, 1639.1994369435079, 549.09152187901964], [182.90658566677064, 71.377234712123865, 15.840848073557623, 2.294390845812015, 701.42646220920267], [1075.0222789059023, 123.29780636599452, 1250.2326681663551, 22.455864839588571, 14.460363130951452], [8.5225002163523413, 4.0059949692425398, 61.630992150805056, 7.6656241919499521, 369.9404712831535]]))  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(4, 5),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_taggedData_rank3(self):  
       arg0=3.9897936579  
       arg1=Data(numarray.array([[[2.889727106362701, 1.3623716131192851], [2.9916597036534092, 3.4367308950490072]], [[3.3335872229779913, 1.5322214297481302], [4.7494147088593879, 3.6775797357334379]], [[4.685707621980133, 4.2506337725961352], [0.15321167564939667, 2.5577348615722117]], [[3.6361368676688279, 4.2834060370927194], [0.37638972870613419, 0.39030513216716933]], [[3.4140922088424324, 3.6871164394652509], [3.9581489155415834, 3.3148416225122186]], [[0.35997218987828361, 2.6122533672231647], [1.5937950637694218, 1.5725008654108865]]]),self.functionspace)  
       arg1.setTaggedValue(1,numarray.array([[[0.68058173710671155, 3.6604896813370336], [0.013910592130982523, 4.1640866365439138]], [[1.2628720805564884, 1.4181377509080724], [3.068393656986165, 2.3871991576613487]], [[2.6698285170199094, 1.4193369447656969], [0.46164979577366916, 2.1969148005263128]], [[1.2834781040798817, 3.0914843479670262], [3.6005580804044293, 4.3792710341621239]], [[3.7534608128402835, 2.9947985761366493], [0.53622360363926969, 2.6873369507418534]], [[1.1972181696962809, 3.2164783088599913], [3.0875364909104346, 1.0164281755144038]]]))  
       res=arg0**arg1  
       ref=Data(numarray.array([[[54.523379096101252, 6.5874573196153481], [62.782586289507627, 116.22643811597655]], [[100.76754870055993, 8.3327650318245841], [714.76427612640032, 162.19712216078111]], [[654.45235790561503, 358.44309402018331], [1.2361541272919527, 34.440692824698289]], [[153.15741747367267, 375.07206890646461], [1.6834164683828434, 1.7161452365879322]], [[112.64196040084123, 164.35171133165582], [239.13949905472657, 98.187345080054001]], [[1.6456044167800061, 37.139392797469], [9.0738550613751467, 8.8103889216644493]]]),self.functionspace)  
       ref.setTaggedValue(1,numarray.array([[[2.564459775636728, 158.40645271869869], [1.0194350853765908, 317.98722907748692]], [[5.7401537744364708, 7.1159108619175973], [69.815604851474347, 27.201219423427464]], [[40.219309519822779, 7.127728606939832], [1.8942122717654939, 20.90436147123215]], [[5.9061806413967508, 72.082338184950487], [145.79980629661623, 428.27708277753862]], [[180.15400056508486, 63.05586809159955], [2.1001185365211592, 41.205606541304057]], [[5.2416591987144212, 85.692742263889059], [71.689639962920467, 4.0815296418305298]]]))  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(6, 2, 2),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
    def test_pow_overloaded_float_rank0_taggedData_rank4(self):  
       arg0=2.00273786518  
       arg1=Data(numarray.array([[[[4.058085214998175, 1.6160604376121306, 3.392298211100885, 1.0452007249155919], [2.5273517683292699, 3.0494177512997704, 0.33690014082657282, 0.12528978101802304], [4.5197516324925351, 0.23226248241823033, 3.5664208665570021, 4.7732489962057079]], [[4.4549507097535654, 0.55109845956885817, 2.7253278884059697, 4.496324732480609], [1.586341752881361, 2.4991507441211032, 3.2436198792465789, 1.8861809587343012], [3.3856069070921238, 2.8132833163000455, 1.8557615185276446, 1.2515630764821439]]], [[[3.9029634096168433, 3.4238838330903647, 0.168526403580252, 2.6183355793979], [4.012617066171174, 3.1192068434369804, 1.5566641170696784, 4.2941982176726397], [1.4311511821530991, 3.0032853336479115, 1.5699302744706125, 3.3894002471002085]], [[2.0541298653067361, 0.041957272399514252, 3.9926465817541326, 2.9475866810662157], [3.6248456625161114, 2.5516057015658311, 0.10278482539076957, 4.5989676951872394], [1.3614783963249981, 3.4546685791640237, 1.0699048554869663, 2.0764514576328352]]], [[[2.2381377204691408, 3.8176327781348736, 0.90064790493230951, 4.6989234806143587], [2.1736357404880438, 3.1637074985297562, 3.1423445423973613, 3.5095763892793981], [2.5804729333454222, 0.89043093205556245, 0.3803504224422426, 1.8258865124301544]], [[4.8909917949317609, 4.6840264802036744, 4.5827397185651009, 2.325986597602165], [4.6542743462709959, 4.3602860031505459, 1.9718692294021449, 1.6727430742597078], [4.0944735363242009, 3.4603064237310965, 3.0807314616342185, 1.2081156932037695]]]]),self.functionspace)  
       arg1.setTaggedValue(1,numarray.array([[[[2.7870810246480366, 2.0753323950124378, 1.6206774020250057, 1.6693164535030807], [0.22495732068957769, 1.4826277903660066, 1.6654536412954513, 3.7011690087174687], [2.8688237888109613, 4.131833355592474, 0.58743394654963033, 3.1170748037096057]], [[2.2316988612632387, 4.8338802120706443, 1.1830725418117809, 2.2558696691891198], [0.1828771012820089, 1.6175444987052734, 2.0276687081781493, 2.1722295435556092], [1.7526525704637648, 2.5413810371959822, 1.2335871661409938, 3.1822782500328279]]], [[[4.8612724338078301, 0.7675517686181661, 2.175206221217064, 0.64847845944287819], [2.7137589100492434, 3.4524463464048054, 1.6167573912489441, 0.16158562025267317], [4.0907368103502781, 1.468174509078422, 3.8588398986692334, 4.8128173918988981]], [[0.15544289923049187, 3.7268756946718211, 2.9147996475422486, 3.6294512035901425], [4.29461385610918, 4.4680526078126217, 0.060265276226098695, 2.316238253151544], [3.1881249924409127, 0.73957031720346222, 0.085295929508293178, 2.3155430777698207]]], [[[1.5940476159630346, 2.2712827258710178, 0.24608800148241564, 3.9476270044554274], [0.31300686021970531, 1.1763364711836799, 0.76136985552643244, 3.8726250916336724], [2.6397833251035379, 3.9748466473005739, 3.8288284623159541, 2.0374679133608966]], [[0.47517472829931101, 4.0767363652225068, 0.52520993483385048, 1.5660106079134684], [1.6486334521439767, 0.28245826998834422, 4.2578225614767797, 4.047421985445852], [3.2269014632928079, 3.0865258235349415, 4.5301478170774354, 3.4909708031440467]]]]))  
       res=arg0**arg1  
       ref=Data(numarray.array([[[[16.750058845591397, 3.0721526379826374, 10.548699609572795, 2.0666062446181979], [5.7850914043791031, 8.3133853562698778, 1.2636220765441493, 1.0909137572305785], [23.081607888717194, 1.1750489650261489, 11.904701658561461, 27.524977675184346]], [[22.065843738793575, 1.4663058992285734, 6.6378066215549509, 22.709100960148394], [3.0093930782835683, 5.6728867856068153, 9.5137986534737795, 3.7061044164408381], [10.499791295855353, 7.055926912267954, 3.628627724725646, 2.385072570137162]]], [[[15.039308247944584, 10.782659979803462, 1.1241690550540289, 6.1624461340705841], [16.229384415515096, 8.7262567079767237, 2.9479996476896653, 19.734844610529727], [2.7019026677952165, 8.0512490841275621, 2.9752866951568713, 10.527489804478877]], [[4.1646172182532135, 1.0295686853650003, 16.005839869392002, 7.7457451954453456], [12.397692008655882, 5.8833650491927445, 1.0739953013827201, 24.387064856692479], [2.5742736313898518, 11.015680522547886, 2.1023697483406334, 4.2296830097635185]]], [[[4.7323438821950701, 14.173923521480578, 1.8692058081325049, 26.140182058429897], [4.5250245885470779, 9.0001646657529406, 8.8676158851323628, 11.443868303875972], [6.0025094057468991, 1.8559891647626132, 1.3023354347347804, 3.5541143150273866]], [[29.870400260851106, 25.871124951438134, 24.113751679060641, 5.0300654379866412], [25.342027194461846, 20.661763233119618, 3.9333563988776534, 3.1955060146113112], [17.178764738937865, 11.058897730257282, 8.4961639056616765, 2.3141783138707765]]]]),self.functionspace)  
       ref.setTaggedValue(1,numarray.array([[[[6.9286852125785368, 4.2263969519979208, 3.0820194655202178, 3.1879102631117733], [1.1691023982577264, 2.8002466491192726, 3.1793692577325836, 13.072594935061897], [7.3334176438266114, 17.6303345843294, 1.503779779154625, 8.7133450051819885]], [[4.7112286301679207, 28.708784932966971, 2.2742761723956582, 4.7909835415904132], [1.1354294192926007, 3.0753207471873583, 4.0887802238112432, 4.5206074931782005], [3.3778648551221635, 5.8417341771948292, 2.3554811322786962, 9.1169976252798239]]], [[[29.260178173166832, 1.7041668707386901, 4.529962828226199, 1.5689053267278315], [6.5846866575461958, 10.998692316424849, 3.0736400576927507, 1.1187630615338042], [17.134239987654585, 2.7722783164873048, 14.585426938009, 28.291876751816698]], [[1.1140003466430173, 13.308084833978867, 7.5713591317368989, 12.437410980682518], [19.740542235230951, 22.267547463257269, 1.042743425368402, 4.9961250421125465], [9.1540938403147862, 1.6713685966647158, 1.0610291332840969, 4.9937134459319727]]], [[[3.0255420398866604, 4.8425445904748727, 1.1863861667386619, 15.513131639293059], [1.2428262437334108, 2.2636612679395824, 1.6968658298480934, 14.725738793712299], [6.254927688836438, 15.809188519363234, 14.284563479653341, 4.1167021282117702]], [[1.3909904683391461, 16.968442210027412, 1.4401773573943464, 2.9671981822001441], [3.1424443542515723, 1.2167356249730308, 19.242519541811749, 16.626469883428879], [9.4039709445950059, 8.530423671641044, 23.248867311915969, 11.296943532689685]]]]))  
       self.failUnless(isinstance(res,Data),"wrong type of result.")  
       self.failUnlessEqual(res.getShape(),(3, 2, 3, 4),"wrong shape of result.")  
       self.failUnless(Lsup(res-ref)<=self.RES_TOL*Lsup(ref),"wrong result")  

Legend:
Removed from v.596  
changed lines
  Added in v.1312

  ViewVC Help
Powered by ViewVC 1.1.26