
##############################################################################
#
# Copyright (c) 2003-2018 by The University of Queensland
# http://www.uq.edu.au
#
# Primary Business: Queensland, Australia
# Licensed under the Apache License, version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Development until 2012 by Earth Systems Science Computational Center (ESSCC)
# Development 2012-2013 by School of Earth Sciences
# Development from 2014 by Centre for Geoscience Computing (GeoComp)
#
##############################################################################

from __future__ import print_function, division

__copyright__="""Copyright (c) 2003-2018 by The University of Queensland
http://www.uq.edu.au
Primary Business: Queensland, Australia"""
__license__="""Licensed under the Apache License, version 2.0
http://www.apache.org/licenses/LICENSE-2.0"""
__url__="https://launchpad.net/escript-finley"

"""
Tests for integration on domains in the unit square/cube.

This file was auto-generated.
"""

import esys.escriptcore.utestselect as unittest
from esys.escript import *
import numpy

class Test_Util_Integration_noContact(unittest.TestCase):
    RES_TOL=1.e-8

    def test_integrateC_onFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.136080245421-0.684416740072j)*x[0]**o + ((-0.839305931283+0.0192526883543j))*x[0] + ((-0.0730680909085+0.708193534423j))*x[1]**o + ((-0.452780669865+0.646351329695j))*x[1]
            ref=(-0.750617468739+0.3446904062j)-((-0.034858056055+0.00396279905842j))*(o-1.)
        else:
            arg=(0.393054652003-0.920268849978j)*x[0]**o + ((0.388912501271-0.0510880123987j))*x[0] + ((-0.55357984142-0.387916408574j))*x[1]**o + ((0.380778014426-0.641941674697j))*x[1] + ((-0.637595521285-0.439454123991j))*x[2]**o + ((0.902408333704+0.969752205981j))*x[2]
            ref=(0.43698906935-0.735458431829j)-((-0.13302011845-0.291273230424j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.0449968676495-0.97084060307j)*x[0]**o + ((-0.0666567131816+0.808098732751j))*x[0] + ((-0.0381202261616-0.445765477194j))*x[1]**o + ((-0.217831679616-0.446850647901j))*x[1]
            ref[(0,)]=(-0.138805875655-0.527678997707j)-((0.00114610691466-0.236101013377j))*(o-1.)
            arg[(1,)]=(-0.195458218672-0.585859112329j)*x[0]**o + ((-0.461705303456+0.938982442584j))*x[0] + ((0.896246254964+0.590365918932j))*x[1]**o + ((0.196948286415+0.205322763442j))*x[1]
            ref[(1,)]=(0.218015509625+0.574406006314j)-((0.116798006049+0.000751134433764j))*(o-1.)
            arg[(2,)]=(0.168960716466-0.222451211798j)*x[0]**o + ((-0.836872963892+0.679320375218j))*x[0] + ((0.988171737458+0.620373949447j))*x[1]**o + ((0.142921842054+0.597257030145j))*x[1]
            ref[(2,)]=(0.231590666043+0.837250071506j)-((0.192855408987+0.0663204562749j))*(o-1.)
            arg[(3,)]=(0.483237652324+0.877941620163j)*x[0]**o + ((-0.135039177508-0.440791040918j))*x[0] + ((-0.816960583666+0.842269658478j))*x[1]**o + ((0.776494905322-0.983208238941j))*x[1]
            ref[(3,)]=(0.153866398236+0.148105999391j)-((-0.0556204885569+0.286701879773j))*(o-1.)
        else:
            arg[(0,)]=(-0.510449138625+0.732037504546j)*x[0]**o + ((-0.817353168634+0.569297470189j))*x[0] + ((0.570057123236-0.808436382221j))*x[1]**o + ((0.937785307226-0.982778708703j))*x[1] + ((0.170866798731+0.855410030151j))*x[2]**o + ((0.758631736897+0.576139066242j))*x[2]
            ref[(0,)]=(0.554769329416+0.470834490102j)-((0.0384124638903+0.129835192079j))*(o-1.)
            arg[(1,)]=(-0.584173654322+0.807644747057j)*x[0]**o + ((0.55545850112-0.38178467032j))*x[0] + ((0.653549606011-0.538646643758j))*x[1]**o + ((0.203301069198+0.692917537966j))*x[1] + ((0.363257909371+0.0877479758101j))*x[2]**o + ((0.442058697873-0.5359361379j))*x[2]
            ref[(1,)]=(0.816726064625+0.0659714044273j)-((0.07210564351+0.0594576798514j))*(o-1.)
            arg[(2,)]=(0.826344235191-0.257890102118j)*x[0]**o + ((0.828372008554+0.889256355329j))*x[0] + ((0.383049637013-0.919317684865j))*x[1]**o + ((0.539172755484+0.419686368724j))*x[1] + ((-0.416624047095-0.952058028868j))*x[2]**o + ((-0.962570869637+0.725162930121j))*x[2]
            ref[(2,)]=(0.598871859755-0.0475800808384j)-((0.132128304185-0.354877635975j))*(o-1.)
            arg[(3,)]=(0.63058314827+0.00694802365864j)*x[0]**o + ((-0.390920963899+0.381391501418j))*x[0] + ((-0.563081166658+0.620529245646j))*x[1]**o + ((-0.48565390028+0.0843952946953j))*x[1] + ((-0.717012211394+0.307598180395j))*x[2]**o + ((0.892042105778+0.0562737461129j))*x[2]
            ref[(3,)]=(-0.317021494091+0.728567995963j)-((-0.108251704964+0.155845908283j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.724412797748+0.00989028456802j)*x[0]**o + ((-0.390537950213+0.550774780249j))*x[0] + ((-0.0141235872467-0.353161436056j))*x[1]**o + ((0.27305264677-0.52591124992j))*x[1]
            ref[(0, 0)]=(0.296401953529-0.159203810579j)-((0.118381535084-0.0572118585813j))*(o-1.)
            arg[(0, 1)]=(0.867680448203-0.290801500572j)*x[0]**o + ((-0.035326596811+0.608968094352j))*x[0] + ((0.440937989778+0.477929052197j))*x[1]**o + ((0.182759451116-0.963377050713j))*x[1]
            ref[(0, 1)]=(0.728025646143-0.083640702368j)-((0.218103072997+0.0311879252709j))*(o-1.)
            arg[(0, 2)]=(-0.346496717917+0.473818076769j)*x[0]**o + ((-0.464137693793+0.57346412444j))*x[0] + ((-0.2652875083-0.0636810900557j))*x[1]**o + ((0.345165153475-0.842654543956j))*x[1]
            ref[(0, 2)]=(-0.365378383268+0.0704732835989j)-((-0.101964037703+0.0683561644523j))*(o-1.)
            arg[(0, 3)]=(0.590820049788+0.577066048492j)*x[0]**o + ((0.395207040203-0.821811422553j))*x[0] + ((-0.720486974045-0.193415057729j))*x[1]**o + ((0.54391347489+0.894047847071j))*x[1]
            ref[(0, 3)]=(0.404726795418+0.22794370764j)-((-0.0216111540429+0.0639418317938j))*(o-1.)
            arg[(1, 0)]=(-0.90350618973-0.102406349621j)*x[0]**o + ((-0.429203111882-0.660633055096j))*x[0] + ((-0.0738063392198-0.241265012728j))*x[1]**o + ((0.191539456445+0.218471242276j))*x[1]
            ref[(1, 0)]=(-0.607488092193-0.392916587584j)-((-0.162885421492-0.0572785603914j))*(o-1.)
            arg[(1, 1)]=(-0.838946477772-0.512493054277j)*x[0]**o + ((-0.384867717261-0.0998381436971j))*x[0] + ((-0.836580354303-0.74263126768j))*x[1]**o + ((-0.155756033547+0.601405780715j))*x[1]
            ref[(1, 1)]=(-1.10807529144-0.376778342469j)-((-0.279254472013-0.209187386993j))*(o-1.)
            arg[(1, 2)]=(-0.123833166362+0.0890793906869j)*x[0]**o + ((0.360074178329+0.269454221425j))*x[0] + ((0.173134343301-0.391463565096j))*x[1]**o + ((0.709692920905-0.263072453353j))*x[1]
            ref[(1, 2)]=(0.559534138086-0.148001203168j)-((0.00821686282307-0.0503973624015j))*(o-1.)
            arg[(1, 3)]=(0.402659951336+0.229421133883j)*x[0]**o + ((-0.545770344692-0.0750128579142j))*x[0] + ((-0.913062099782+0.589353996729j))*x[1]**o + ((-0.294582632638-0.817760256535j))*x[1]
            ref[(1, 3)]=(-0.675377562888-0.0369989919184j)-((-0.085067024741+0.136462521769j))*(o-1.)
            arg[(2, 0)]=(-0.862307374651+0.301426117175j)*x[0]**o + ((0.00992729990314-0.748680615667j))*x[0] + ((-0.453561723106+0.258648914978j))*x[1]**o + ((0.594081595981-0.137741268289j))*x[1]
            ref[(2, 0)]=(-0.355930100936-0.163173425901j)-((-0.219311516293+0.0933458386922j))*(o-1.)
            arg[(2, 1)]=(0.957174318706-0.850311163927j)*x[0]**o + ((-0.72310421954-0.514525289228j))*x[0] + ((-0.611827553577-0.939151862012j))*x[1]**o + ((0.703867984888+0.957044336967j))*x[1]
            ref[(2, 1)]=(0.163055265239-0.6734719891j)-((0.0575577941881-0.298243837656j))*(o-1.)
            arg[(2, 2)]=(0.294290475686+0.176554845118j)*x[0]**o + ((0.5820559586+0.538487061789j))*x[0] + ((-0.0312147099558-0.0501244096285j))*x[1]**o + ((-0.614233081666+0.0407983588927j))*x[1]
            ref[(2, 2)]=(0.115449321332+0.352857928086j)-((0.0438459609551+0.0210717392483j))*(o-1.)
            arg[(2, 3)]=(0.900876753496-0.421470898534j)*x[0]**o + ((0.481237273344-0.208379636466j))*x[0] + ((-0.8063383547+0.4950733157j))*x[1]**o + ((0.615354393252-0.623412311827j))*x[1]
            ref[(2, 3)]=(0.595565032696-0.379094765564j)-((0.0157563997994+0.0122670695276j))*(o-1.)
        else:
            arg[(0, 0)]=(0.666738292306+0.780867785726j)*x[0]**o + ((-0.959327469072-0.532900103397j))*x[0] + ((-0.675788314127+0.930040543459j))*x[1]**o + ((0.531801438025-0.328879193529j))*x[1] + ((0.0640781080899+0.658643702562j))*x[2]**o + ((0.853591470352-0.215582624952j))*x[2]
            ref[(0, 0)]=(0.240546762787+0.646095054935j)-((0.00917134771151+0.394925338625j))*(o-1.)
            arg[(0, 1)]=(-0.802665664536+0.0158877041101j)*x[0]**o + ((-0.369493869164-0.301656749414j))*x[0] + ((0.902203303888+0.569301981091j))*x[1]**o + ((0.0676412373254+0.227686386771j))*x[1] + ((0.133383268457+0.0574906205162j))*x[2]**o + ((-0.077413442243+0.607822759217j))*x[2]
            ref[(0, 1)]=(-0.0731725831364+0.588266351145j)-((0.0388201513015+0.107113384286j))*(o-1.)
            arg[(0, 2)]=(-0.319097468513-0.355830900856j)*x[0]**o + ((-0.715256287018-0.662824967574j))*x[0] + ((0.926003059333-0.112075197316j))*x[1]**o + ((0.0665293682207+0.353265282571j))*x[1] + ((-0.185545780964+0.744232328299j))*x[2]**o + ((0.452192730319+0.452551971618j))*x[2]
            ref[(0, 2)]=(0.112412810689+0.209659258371j)-((0.070226634976+0.0460543716878j))*(o-1.)
            arg[(0, 3)]=(-0.468322269997-0.608367945589j)*x[0]**o + ((0.37354145518+0.86170988734j))*x[0] + ((-0.874297057552+0.516939053395j))*x[1]**o + ((0.762902421577-0.114442772194j))*x[1] + ((0.151290945882+0.776229091456j))*x[2]**o + ((0.068113967494+0.805667678388j))*x[2]
            ref[(0, 3)]=(0.00661473129222+1.1188674964j)-((-0.198554730278+0.114133366544j))*(o-1.)
            arg[(1, 0)]=(0.20690287013+0.512003463683j)*x[0]**o + ((-0.924047779827-0.557835067902j))*x[0] + ((0.788878751119+0.337745067703j))*x[1]**o + ((-0.558374967658+0.442575582707j))*x[1] + ((-0.696188566227-0.256338073885j))*x[2]**o + ((-0.451602736416-0.681575872603j))*x[2]
            ref[(1, 0)]=(-0.81721621444-0.101712450148j)-((0.0499321758369+0.098901742917j))*(o-1.)
            arg[(1, 1)]=(0.0245154323764-0.579478424097j)*x[0]**o + ((-0.3257047812-0.966844718585j))*x[0] + ((0.74618931135+0.110461375284j))*x[1]**o + ((-0.833576373521-0.744883675482j))*x[1] + ((-0.451191861474-0.446152024516j))*x[2]**o + ((-0.0862069273123-0.384309965821j))*x[2]
            ref[(1, 1)]=(-0.46298759989-1.50560371661j)-((0.053252147042-0.152528178888j))*(o-1.)
            arg[(1, 2)]=(0.366519237981+0.515156890266j)*x[0]**o + ((0.457187243878-0.934174678116j))*x[0] + ((0.542610216972+0.290972537626j))*x[1]**o + ((-0.682955242987-0.23220294653j))*x[1] + ((-0.854286923012+0.514976515746j))*x[2]**o + ((0.835656948978+0.313862061884j))*x[2]
            ref[(1, 2)]=(0.332365740905+0.234295190438j)-((0.00914042199018+0.22018432394j))*(o-1.)
            arg[(1, 3)]=(-0.629602839366+0.398159073219j)*x[0]**o + ((0.815219299314-0.616204794277j))*x[0] + ((-0.36269835603-0.381851586976j))*x[1]**o + ((-0.893212795662+0.531667866042j))*x[1] + ((0.13872763051-0.965378336105j))*x[2]**o + ((0.718157398451+0.730476990636j))*x[2]
            ref[(1, 3)]=(-0.106704831392-0.15156539373j)-((-0.142262260814-0.158178474977j))*(o-1.)
            arg[(2, 0)]=(-0.922661658816+0.117514484547j)*x[0]**o + ((-0.874029907272-0.337957083136j))*x[0] + ((0.770539887788-0.89627824385j))*x[1]**o + ((0.415217829572-0.157304533074j))*x[1] + ((0.840387202417+0.402531116867j))*x[2]**o + ((0.813662378866-0.081524013704j))*x[2]
            ref[(2, 0)]=(0.521557866278-0.476509136175j)-((0.114710905232-0.0627054404061j))*(o-1.)
            arg[(2, 1)]=(0.925754397243-0.655975434744j)*x[0]**o + ((-0.683415551024+0.0338515460168j))*x[0] + ((0.376495380996-0.193732520831j))*x[1]**o + ((-0.367268886349+0.975131924299j))*x[1] + ((0.902056157039+0.503051361455j))*x[2]**o + ((0.181596085437-0.445408466931j))*x[2]
            ref[(2, 1)]=(0.667608791671+0.108459204632j)-((0.367384322546-0.05777609902j))*(o-1.)
            arg[(2, 2)]=(0.457981238672+0.360449072435j)*x[0]**o + ((-0.316516851442-0.784686006828j))*x[0] + ((0.395254907361-0.784136114282j))*x[1]**o + ((-0.461398651004-0.676809430698j))*x[1] + ((0.507534833692+0.715288918893j))*x[2]**o + ((-0.695108885028+0.146758274195j))*x[2]
            ref[(2, 2)]=(-0.0561267038739-0.511567643143j)-((0.226795163288+0.0486003128411j))*(o-1.)
            arg[(2, 3)]=(0.769669897375+0.815779095921j)*x[0]**o + ((-0.820060213632+0.223214262488j))*x[0] + ((0.801587974821-0.387859610582j))*x[1]**o + ((0.245205777211-0.373443050053j))*x[1] + ((0.932155933872+0.123320592678j))*x[2]**o + ((-0.0306645041569-0.999273034694j))*x[2]
            ref[(2, 3)]=(0.948947432745-0.299130872121j)-((0.417235634345+0.0918733463362j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref=numpy.zeros((2, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.166909434506+0.925785135722j)*x[0]**o + ((-0.597623590934-0.470056350135j))*x[0] + ((0.871652888429+0.251221496867j))*x[1]**o + ((-0.807338840357+0.401627922693j))*x[1]
            ref[(0, 0, 0)]=(-0.183200054178+0.554289102573j)-((0.173093720489+0.196167772098j))*(o-1.)
            arg[(0, 0, 1)]=(-0.0970674135793+0.636113552919j)*x[0]**o + ((-0.0687266562729-0.164041211553j))*x[0] + ((-0.117253793664-0.746113574177j))*x[1]**o + ((0.392221415905+0.912719582537j))*x[1]
            ref[(0, 0, 1)]=(0.0545867761948+0.319339174863j)-((-0.0357202012072-0.0183333368764j))*(o-1.)
            arg[(0, 0, 2)]=(0.11437286969+0.217649856064j)*x[0]**o + ((0.51564240068-0.585046698305j))*x[0] + ((-0.26484818662+0.560170034187j))*x[1]**o + ((-0.178868396336-0.936835171923j))*x[1]
            ref[(0, 0, 2)]=(0.0931493437072-0.372030989988j)-((-0.0250792194882+0.129636648375j))*(o-1.)
            arg[(0, 0, 3)]=(-0.639934479541-0.402701545689j)*x[0]**o + ((0.167692963894-0.980068853552j))*x[0] + ((0.294482402357+0.542039180315j))*x[1]**o + ((0.690524659711+0.0750788430612j))*x[1]
            ref[(0, 0, 3)]=(0.256382773211-0.382826187932j)-((-0.0575753461973+0.0232229391044j))*(o-1.)
            arg[(0, 1, 0)]=(-0.889696569903+0.227447871813j)*x[0]**o + ((-0.757945815892-0.903748892001j))*x[0] + ((-0.672288349523-0.462744133296j))*x[1]**o + ((0.70685776928+0.406329165028j))*x[1]
            ref[(0, 1, 0)]=(-0.806536483019-0.366357994228j)-((-0.260330819904-0.0392160435805j))*(o-1.)
            arg[(0, 1, 1)]=(-0.939044753801+0.769335973907j)*x[0]**o + ((-0.430254722736-0.213721728626j))*x[0] + ((0.558044303118-0.703708568646j))*x[1]**o + ((0.175835911042+0.0634565112314j))*x[1]
            ref[(0, 1, 1)]=(-0.317709631188-0.0423189060667j)-((-0.0635000751138+0.0109379008769j))*(o-1.)
            arg[(0, 1, 2)]=(-0.337129895172+0.183521941881j)*x[0]**o + ((-0.307536488365-0.220329173859j))*x[0] + ((-0.190775179223-0.998258033625j))*x[1]**o + ((0.696130424176+0.483176091557j))*x[1]
            ref[(0, 1, 2)]=(-0.0696555692919-0.275944587022j)-((-0.0879841790659-0.135789348624j))*(o-1.)
            arg[(0, 1, 3)]=(0.0840659302951-0.550221158177j)*x[0]**o + ((0.183836696844-0.851887420961j))*x[0] + ((0.506318947109-0.659897797944j))*x[1]**o + ((-0.557665703166-0.146202585733j))*x[1]
            ref[(0, 1, 3)]=(0.108277935541-1.10410448141j)-((0.0983974795674-0.201686492687j))*(o-1.)
            arg[(1, 0, 0)]=(0.429862504409-0.192792273337j)*x[0]**o + ((-0.633450749461+0.700576179104j))*x[0] + ((0.983482954493-0.970787830124j))*x[1]**o + ((0.110610137407-0.28810330652j))*x[1]
            ref[(1, 0, 0)]=(0.445252423423-0.375553615439j)-((0.235557576484-0.193930017244j))*(o-1.)
            arg[(1, 0, 1)]=(0.708415300347+0.788263235648j)*x[0]**o + ((0.952217892269+0.889556342596j))*x[0] + ((-0.633627392719+0.105565528008j))*x[1]**o + ((-0.385010067147-0.153272097404j))*x[1]
            ref[(1, 0, 1)]=(0.320997866375+0.815056504424j)-((0.0124646512713+0.148971460609j))*(o-1.)
            arg[(1, 0, 2)]=(-0.168625542615+0.442752633078j)*x[0]**o + ((0.413181922969-0.71962177116j))*x[0] + ((-0.128176817232+0.908071949291j))*x[1]**o + ((-0.199788895525+0.495161779398j))*x[1]
            ref[(1, 0, 2)]=(-0.0417046662012+0.563182295303j)-((-0.0494670599744+0.225137430395j))*(o-1.)
            arg[(1, 0, 3)]=(0.884170006002+0.584180669235j)*x[0]**o + ((-0.118264362109-0.322276238218j))*x[0] + ((0.715750349096-0.323638784493j))*x[1]**o + ((-0.891205777769-0.0901386649997j))*x[1]
            ref[(1, 0, 3)]=(0.29522510761-0.075936509238j)-((0.266653392516+0.043423647457j))*(o-1.)
            arg[(1, 1, 0)]=(0.590929830404-0.0501681757695j)*x[0]**o + ((0.867257846902+0.636507570149j))*x[0] + ((-0.603881952791+0.33342264414j))*x[1]**o + ((0.364836889363+0.843375388814j))*x[1]
            ref[(1, 1, 0)]=(0.609571306939+0.881568713667j)-((-0.00215868706458+0.0472090780617j))*(o-1.)
            arg[(1, 1, 1)]=(-0.829243091862+0.052119182975j)*x[0]**o + ((0.471431226068-0.198639785548j))*x[0] + ((0.915649699973+0.292448015535j))*x[1]**o + ((-0.559804526046+0.220613241936j))*x[1]
            ref[(1, 1, 1)]=(-0.00098334593359+0.183270327449j)-((0.0144011013518+0.0574278664183j))*(o-1.)
            arg[(1, 1, 2)]=(-0.586469687012-0.00261628776236j)*x[0]**o + ((-0.947636758973-0.168258939884j))*x[0] + ((-0.374038190172-0.182690509544j))*x[1]**o + ((-0.971491959719-0.103192610458j))*x[1]
            ref[(1, 1, 2)]=(-1.43981829794-0.228379173824j)-((-0.160084646197-0.0308844662177j))*(o-1.)
            arg[(1, 1, 3)]=(-0.375705579993-0.396677418003j)*x[0]**o + ((-0.488079034426-0.951919883371j))*x[0] + ((-0.754907939732+0.266658466649j))*x[1]**o + ((0.498401482531-0.20606421891j))*x[1]
            ref[(1, 1, 3)]=(-0.56014553581-0.644001526817j)-((-0.188435586621-0.0216698252257j))*(o-1.)
        else:
            arg[(0, 0, 0)]=(-0.150905631734-0.392476763344j)*x[0]**o + ((0.727306685512-0.438702269101j))*x[0] + ((0.186343145046+0.890701829618j))*x[1]**o + ((-0.216659948549+0.662476890716j))*x[1] + ((0.591199870248-0.276281581418j))*x[2]**o + ((-0.52648366077+0.27815379809j))*x[2]
            ref[(0, 0, 0)]=(0.305400229877+0.36193595228j)-((0.104439563927+0.0369905808094j))*(o-1.)
            arg[(0, 0, 1)]=(0.0559490796644+0.637853710585j)*x[0]**o + ((0.518081356359-0.950228234123j))*x[0] + ((0.345378292416+0.0436905574396j))*x[1]**o + ((-0.821564165157-0.331053981547j))*x[1] + ((0.466674998147-0.514037208959j))*x[2]**o + ((-0.572838381381+0.197929890273j))*x[2]
            ref[(0, 0, 1)]=(-0.00415940997604-0.457922633166j)-((0.144667061704+0.0279178431776j))*(o-1.)
            arg[(0, 0, 2)]=(-0.92756624738+0.366864343136j)*x[0]**o + ((-0.575963912405+0.159868883307j))*x[0] + ((-0.613953057421-0.211675197119j))*x[1]**o + ((-0.163528487871-0.181912729985j))*x[1] + ((0.665628109284-0.110068323685j))*x[2]**o + ((0.0418503602361+0.323393858453j))*x[2]
            ref[(0, 0, 2)]=(-0.786766617778+0.173235417053j)-((-0.145981865919+0.00752013705537j))*(o-1.)
            arg[(0, 0, 3)]=(-0.321469762157-0.0468665727306j)*x[0]**o + ((-0.268470798128+0.0203819100483j))*x[0] + ((0.746852445705-0.323348156206j))*x[1]**o + ((0.366322529284-0.177686501169j))*x[1] + ((-0.565635391771-0.977326053333j))*x[2]**o + ((-0.00802408076291-0.693094937936j))*x[2]
            ref[(0, 0, 3)]=(-0.0252125289153-1.09897015566j)-((-0.0233754513706-0.224590130378j))*(o-1.)
            arg[(0, 1, 0)]=(0.0633292808741+0.328789067948j)*x[0]**o + ((-0.505800840391-0.0192027473436j))*x[0] + ((-0.288033768256-0.404923662375j))*x[1]**o + ((0.221492902673+0.723737612885j))*x[1] + ((-0.223682684701-0.413632041188j))*x[2]**o + ((-0.326609855204-0.783691868466j))*x[2]
            ref[(0, 1, 0)]=(-0.529652482502-0.28446181927j)-((-0.074731195347-0.0816277726025j))*(o-1.)
            arg[(0, 1, 1)]=(-0.805965758927-0.519244323549j)*x[0]**o + ((-0.249587332657+0.31222452396j))*x[0] + ((0.782146877532-0.450207855767j))*x[1]**o + ((-0.596136691798-0.336967213593j))*x[1] + ((0.410091304982-0.540879101068j))*x[2]**o + ((0.451106396544-0.220624600011j))*x[2]
            ref[(0, 1, 1)]=(-0.00417260216209-0.877849285014j)-((0.0643787372645-0.251721880064j))*(o-1.)
            arg[(0, 1, 2)]=(0.610702939748+0.617086702859j)*x[0]**o + ((0.109762759174+0.0243865086797j))*x[0] + ((-0.739452481865+0.46032991231j))*x[1]**o + ((-0.376385425902-0.626554172387j))*x[1] + ((0.610003828452+0.316814182807j))*x[2]**o + ((-0.776459642121+0.84512433996j))*x[2]
            ref[(0, 1, 2)]=(-0.280914011256+0.818593737115j)-((0.0802090477226+0.232371799663j))*(o-1.)
            arg[(0, 1, 3)]=(0.879845926879+0.959979589326j)*x[0]**o + ((-0.698764534459-0.492172172875j))*x[0] + ((0.323018046942-0.712420877286j))*x[1]**o + ((-0.548738714021-0.933191055809j))*x[1] + ((0.829989118256+0.970262098919j))*x[2]**o + ((0.961593409826+0.955689786374j))*x[2]
            ref[(0, 1, 3)]=(0.873471626712+0.374073684324j)-((0.33880884868+0.20297013516j))*(o-1.)
            arg[(1, 0, 0)]=(-0.267232791601-0.0175389988417j)*x[0]**o + ((0.507003663716-0.229042285293j))*x[0] + ((0.995757368304-0.168400098388j))*x[1]**o + ((0.803655324664-0.933554571055j))*x[1] + ((-0.59072945251+0.360951660596j))*x[2]**o + ((0.191141483167-0.0880340438747j))*x[2]
            ref[(1, 0, 0)]=(0.81979779787-0.537809168428j)-((0.0229658540321+0.0291687605611j))*(o-1.)
            arg[(1, 0, 1)]=(-0.624919049376-0.660870391554j)*x[0]**o + ((-0.094339546563+0.972791579811j))*x[0] + ((-0.428379775075+0.984435301908j))*x[1]**o + ((0.205078602185-0.620458725308j))*x[1] + ((0.900284239146-0.469067680924j))*x[2]**o + ((-0.158890255431-0.14722246742j))*x[2]
            ref[(1, 0, 1)]=(-0.100582892557+0.0298038082561j)-((-0.0255024308841-0.0242504617618j))*(o-1.)
            arg[(1, 0, 2)]=(0.215717726018+0.988054492118j)*x[0]**o + ((-0.50389493-0.509251693892j))*x[0] + ((0.627093344268-0.846030800522j))*x[1]**o + ((-0.0196327535627-0.824101397158j))*x[1] + ((0.429297775158+0.114185740034j))*x[2]**o + ((0.217372215548+0.107529806804j))*x[2]
            ref[(1, 0, 2)]=(0.482976688715-0.484806926308j)-((0.212018140907+0.0427015719383j))*(o-1.)
            arg[(1, 0, 3)]=(-0.715335825742+0.291449574743j)*x[0]**o + ((-0.525266623955+0.56082118289j))*x[0] + ((0.137760775727+0.642212152613j))*x[1]**o + ((-0.644683610008-0.265619431857j))*x[1] + ((0.808969728519-0.0426791165404j))*x[2]**o + ((0.018420904323+0.5696679332j))*x[2]
            ref[(1, 0, 3)]=(-0.460067325568+0.877926147524j)-((0.0385657797508+0.148497101803j))*(o-1.)
            arg[(1, 1, 0)]=(0.256923516665-0.237922126207j)*x[0]**o + ((0.51867318284+0.544746844328j))*x[0] + ((-0.0471023474139+0.727100551733j))*x[1]**o + ((-0.246390853121+0.850988446957j))*x[1] + ((-0.188783575874+0.950215986884j))*x[2]**o + ((0.332961173821+0.550657591313j))*x[2]
            ref[(1, 1, 0)]=(0.313140548458+1.6928936475j)-((0.00350626556287+0.239899068735j))*(o-1.)
            arg[(1, 1, 1)]=(0.498020068273+0.234584079565j)*x[0]**o + ((-0.986405270611-0.566892651507j))*x[0] + ((0.721426067967+0.362437841367j))*x[1]**o + ((0.816579586763-0.522163279761j))*x[1] + ((-0.751266904584-0.961880897338j))*x[2]**o + ((-0.609712819282-0.53740199565j))*x[2]
            ref[(1, 1, 1)]=(-0.155679635737-0.995658451663j)-((0.0780298719427-0.0608098294011j))*(o-1.)
            arg[(1, 1, 2)]=(0.358236675365-0.956354238911j)*x[0]**o + ((0.0490519874555+0.936508205097j))*x[0] + ((0.932255697936-0.365148423307j))*x[1]**o + ((-0.843658483442-0.0532667205846j))*x[1] + ((-0.0673661092049-0.467428734837j))*x[2]**o + ((0.136960822658+0.216434506831j))*x[2]
            ref[(1, 1, 2)]=(0.282740295384-0.344627702856j)-((0.203854377349-0.298155232843j))*(o-1.)
            arg[(1, 1, 3)]=(0.288931277723+0.0419618105017j)*x[0]**o + ((0.437180182333-0.275705454206j))*x[0] + ((-0.474986083376-0.0421348406395j))*x[1]**o + ((0.708011472643+0.197420438076j))*x[1] + ((0.385640562306-0.437385051919j))*x[2]**o + ((-0.911422979333+0.789434221386j))*x[2]
            ref[(1, 1, 3)]=(0.216677216147+0.1367955616j)-((0.0332642927753-0.0729263470095j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2, 2),w)
        ref=numpy.zeros((2, 2, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.521207810014+0.548432192496j)*x[0]**o + ((-0.812679484454+0.965745447801j))*x[0] + ((-0.274864804152+0.453886327798j))*x[1]**o + ((-0.805642037741-0.0180958369196j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.685989258167+0.974984065588j)-((0.0410571676435+0.167053086716j))*(o-1.)
            arg[(0, 0, 0, 1)]=(-0.41904150986-0.874662039812j)*x[0]**o + ((-0.808256355102+0.548340692775j))*x[0] + ((-0.0921378010231-0.956845072276j))*x[1]**o + ((-0.585560172877+0.753576698179j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.952497919431-0.264794860567j)-((-0.0851965518138-0.305251185348j))*(o-1.)
            arg[(0, 0, 1, 0)]=(-0.36397668414+0.283755889462j)*x[0]**o + ((-0.961003627264-0.77753514884j))*x[0] + ((-0.465596072127-0.0521530154715j))*x[1]**o + ((0.513061990501-0.52456411494j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.638757196515-0.535248194895j)-((-0.138262126044+0.0386004789984j))*(o-1.)
            arg[(0, 0, 1, 1)]=(-0.791355847131+0.0653424534083j)*x[0]**o + ((0.496347320892-0.220461092031j))*x[0] + ((0.363305642897-0.173928500683j))*x[1]**o + ((0.617118727268+0.81963794111j))*x[1]
            ref[(0, 0, 1, 1)]=(0.342707921963+0.245295400902j)-((-0.0713417007057-0.0180976745458j))*(o-1.)
            arg[(0, 1, 0, 0)]=(0.212454641979-0.82565058009j)*x[0]**o + ((0.336535798505+0.726600069726j))*x[0] + ((-0.409416153595+0.871559878814j))*x[1]**o + ((0.455903067329-0.0516298932837j))*x[1]
            ref[(0, 1, 0, 0)]=(0.297738677109+0.360439737584j)-((-0.0328269186027+0.00765154978747j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.916759786205+0.232936185562j)*x[0]**o + ((0.95049049086+0.876121334971j))*x[0] + ((-0.0218936447148+0.185041387975j))*x[1]**o + ((-0.326080011637+0.600490603595j))*x[1]
            ref[(0, 1, 0, 1)]=(0.759638310357+0.947294756052j)-((0.149144356915+0.069662928923j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.646138133628-0.381419051587j)*x[0]**o + ((-0.940751487514+0.816883058829j))*x[0] + ((-0.435482587294+0.29909968889j))*x[1]**o + ((0.463940192205+0.914108770804j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.779216008115+0.824336233468j)-((-0.180270120154-0.0137198937829j))*(o-1.)
            arg[(0, 1, 1, 1)]=(0.0580241583018-0.44016235511j)*x[0]**o + ((0.340123294235+0.0383723463114j))*x[0] + ((-0.346867368033-0.867140024324j))*x[1]**o + ((-0.878803562038-0.440175412223j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.413761738767-0.854552722673j)-((-0.0481405349552-0.217883729906j))*(o-1.)
            arg[(1, 0, 0, 0)]=(-0.035101310696-0.702515939592j)*x[0]**o + ((-0.74853924762+0.424515880929j))*x[0] + ((-0.0650514819428+0.0559520958724j))*x[1]**o + ((-0.405827386306+0.739046344589j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.627259713282+0.258499190899j)-((-0.0166921321065-0.10776064062j))*(o-1.)
            arg[(1, 0, 0, 1)]=(-0.0210455572117-0.0431512531237j)*x[0]**o + ((0.185276266059-0.631612152975j))*x[0] + ((0.690239949678+0.537617775233j))*x[1]**o + ((-0.922709679503-0.481103852855j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.0341195104887-0.30912474186j)-((0.111532398744+0.0824110870182j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.884846657369+0.543460782841j)*x[0]**o + ((0.447906153714-0.374236813643j))*x[0] + ((-0.503250622362+0.07071371395j))*x[1]**o + ((-0.174616887237-0.3750955877j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.557404006627-0.0675789522762j)-((-0.231349546622+0.102362416132j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.339326552759-0.628389210167j)*x[0]**o + ((0.401922227656-0.333203455965j))*x[0] + ((-0.28264432359+0.205221615311j))*x[1]**o + ((-0.537854463598+0.226638794006j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.378951556145-0.264866128407j)-((-0.103661812725-0.070527932476j))*(o-1.)
            arg[(1, 1, 0, 0)]=(0.0762907547927-0.90861871949j)*x[0]**o + ((-0.484850468108+0.986203620813j))*x[0] + ((0.678440505096-0.53276378722j))*x[1]**o + ((-0.429580407279+0.817726031502j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.0798498077493+0.181273572802j)-((0.125788543315-0.240230417785j))*(o-1.)
            arg[(1, 1, 0, 1)]=(-0.182501823217-0.562059652509j)*x[0]**o + ((0.320860568377-0.359158832657j))*x[0] + ((0.452502607588+0.0577043195432j))*x[1]**o + ((0.322349414296+0.764791539139j))*x[1]
            ref[(1, 1, 0, 1)]=(0.456605383522-0.0493613132419j)-((0.0450001307285-0.0840592221609j))*(o-1.)
            arg[(1, 1, 1, 0)]=(-0.546931424148-0.93070153638j)*x[0]**o + ((0.0199973110756+0.534588523168j))*x[0] + ((0.725806761955+0.517616177422j))*x[1]**o + ((0.669354783595+0.651834901211j))*x[1]
            ref[(1, 1, 1, 0)]=(0.434113716238+0.386669032711j)-((0.029812556301-0.0688475598262j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.0952950255595-0.273827322243j)*x[0]**o + ((-0.206240469997-0.953355170257j))*x[0] + ((-0.252248262576-0.131671966818j))*x[1]**o + ((-0.871725076762-0.0857972756774j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.617459391888-0.722325867498j)-((-0.0261588728361-0.0675832148435j))*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=(0.113131223729+0.789404465973j)*x[0]**o + ((0.100054030846+0.0535631597137j))*x[0] + ((0.273384704208+0.233529165682j))*x[1]**o + ((0.77619167462+0.414665247979j))*x[1] + ((0.674551695511-0.941079619122j))*x[2]**o + ((0.740349032558+0.462496389683j))*x[2]
            ref[(0, 0, 0, 0)]=(1.33883118074+0.506289404955j)-((0.176844603908+0.0136423354223j))*(o-1.)
            arg[(0, 0, 0, 1)]=(-0.0383664243783-0.604840015319j)*x[0]**o + ((0.196094089068+0.494523962516j))*x[0] + ((0.420969099506+0.483409626287j))*x[1]**o + ((0.387091544027-0.0728600156126j))*x[1] + ((-0.865649812955-0.239234062019j))*x[2]**o + ((-0.770028390334+0.888508155099j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.334944947533+0.474753825476j)-((-0.0805078563045-0.0601107418418j))*(o-1.)
            arg[(0, 0, 1, 0)]=(0.751432717975+0.815067373745j)*x[0]**o + ((-0.535257960279-0.54849752806j))*x[0] + ((0.38878774727+0.860479342945j))*x[1]**o + ((-0.184927369917-0.247365123407j))*x[1] + ((0.45974954307-0.11402976649j))*x[2]**o + ((-0.341464712731+0.424565168672j))*x[2]
            ref[(0, 0, 1, 0)]=(0.269159982694+0.595109733703j)-((0.266661668052+0.260252825033j))*(o-1.)
            arg[(0, 0, 1, 1)]=(-0.637128768028-0.775918029285j)*x[0]**o + ((0.142745115972-0.171879622367j))*x[0] + ((0.335811399915+0.985048156938j))*x[1]**o + ((-0.585945896837+0.448012389951j))*x[1] + ((-0.416648855826-0.0087104105678j))*x[2]**o + ((-0.973487684963+0.390826880314j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.06732734488+0.433689682491j)-((-0.119661037323+0.0334032861808j))*(o-1.)
            arg[(0, 1, 0, 0)]=(-0.0498293855023-0.160482082452j)*x[0]**o + ((-0.480403052111-0.498155957595j))*x[0] + ((-0.0321197410949-0.316169801703j))*x[1]**o + ((0.429297157549+0.0767436721137j))*x[1] + ((0.0071020463985-0.690937681164j))*x[2]**o + ((0.673971847833+0.562211189873j))*x[2]
            ref[(0, 1, 0, 0)]=(0.274009436537-0.513395330464j)-((-0.0124745133664-0.194598260887j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.736361435105-0.814450650782j)*x[0]**o + ((0.685788623247-0.0473819916166j))*x[0] + ((-0.00873095076582+0.503553636043j))*x[1]**o + ((0.625064392689+0.807387083982j))*x[1] + ((0.40071307681+0.104022610711j))*x[2]**o + ((0.120717086667+0.179256590313j))*x[2]
            ref[(0, 1, 0, 1)]=(1.27995683188+0.366193639325j)-((0.188057260192-0.034479067338j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.0426982720606-0.0258561622552j)*x[0]**o + ((0.519390630353-0.716586075763j))*x[0] + ((0.0094837699013+0.809098333331j))*x[1]**o + ((-0.100285011038-0.266186673033j))*x[1] + ((-0.721937265263-0.556996796371j))*x[2]**o + ((-0.476295916811-0.305808441963j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.406171032459-0.531167908027j)-((-0.125858627904+0.0377075624508j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.892153947595-0.398917091509j)*x[0]**o + ((0.301881796322+0.693431365505j))*x[0] + ((-0.226104147589+0.216153723318j))*x[1]**o + ((-0.399393822828-0.377993250466j))*x[1] + ((-0.0535174726265-0.279559320029j))*x[2]**o + ((-0.341865265099+0.792925303945j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.805576429708+0.323020365382j)-((-0.195295927968-0.0770537813701j))*(o-1.)
            arg[(1, 0, 0, 0)]=(0.63396848459+0.254896024923j)*x[0]**o + ((-0.00371769262638+0.635263815076j))*x[0] + ((0.680543278843+0.328912223005j))*x[1]**o + ((0.18338493529+0.826332133847j))*x[1] + ((0.882103232464+0.966139272246j))*x[2]**o + ((-0.85207731476+0.826348519409j))*x[2]
            ref[(1, 0, 0, 0)]=(0.7621024619+1.91894599425j)-((0.366102499316+0.258324586696j))*(o-1.)
            arg[(1, 0, 0, 1)]=(-0.0476211284453+0.821886946427j)*x[0]**o + ((0.440372159956+0.0393492750241j))*x[0] + ((0.501288956288-0.635922857656j))*x[1]**o + ((-0.755444347419-0.0897333446675j))*x[1] + ((0.920644728531-0.511671688959j))*x[2]**o + ((0.469518606022+0.731291608817j))*x[2]
            ref[(1, 0, 0, 1)]=(0.764379487466+0.177599969492j)-((0.229052092729-0.0542846000315j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.604483345865-0.47804934175j)*x[0]**o + ((-0.318351763826-0.0797977410942j))*x[0] + ((-0.983824800102+0.713216995168j))*x[1]**o + ((0.895284444619-0.734889648324j))*x[1] + ((-0.584224719111+0.553227205537j))*x[2]**o + ((0.787387951852+0.984675783385j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.404106116217+0.479191626461j)-((-0.362088810847+0.131399143159j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.908261422625-0.580479321562j)*x[0]**o + ((0.756837602705-0.739813858422j))*x[0] + ((0.284419655492-0.0850424485592j))*x[1]**o + ((0.305590501255+0.363988156133j))*x[1] + ((0.516135899173-0.229539904972j))*x[2]**o + ((0.717548296988-0.404686325962j))*x[2]
            ref[(1, 0, 1, 1)]=(0.836135266494-0.837786851672j)-((-0.0179509779934-0.149176945849j))*(o-1.)
            arg[(1, 1, 0, 0)]=(0.395268209597+0.0514602130362j)*x[0]**o + ((0.881924323666+0.758755386156j))*x[0] + ((0.822232149855+0.211182216625j))*x[1]**o + ((0.705458296387-0.736188517632j))*x[1] + ((0.129280904562+0.734459220673j))*x[2]**o + ((0.842175167531+0.209785230879j))*x[2]
            ref[(1, 1, 0, 0)]=(1.8881695258+0.614726874869j)-((0.224463544002+0.166183608389j))*(o-1.)
            arg[(1, 1, 0, 1)]=(0.688640582844-0.597388155115j)*x[0]**o + ((0.306928442735+0.287061950469j))*x[0] + ((-0.642338343823-0.0535606331208j))*x[1]**o + ((-0.880288058088+0.29188247144j))*x[1] + ((0.0936429254516+0.345508482621j))*x[2]**o + ((0.171183701617-0.286192129734j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.131115374632-0.00634400672024j)-((0.0233241940788-0.0509067176025j))*(o-1.)
            arg[(1, 1, 1, 0)]=(-0.377369223472-0.584720542605j)*x[0]**o + ((0.747106343052-0.986512845325j))*x[0] + ((-0.233867802797+0.467450682177j))*x[1]**o + ((-0.408865703615-0.394143192345j))*x[1] + ((0.764035254517+0.651017962859j))*x[2]**o + ((-0.617278037785+0.58997100791j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.0631195850501-0.128468463665j)-((0.0254663713746+0.0889580170718j))*(o-1.)
            arg[(1, 1, 1, 1)]=(-0.356690908944-0.261660609718j)*x[0]**o + ((-0.48704864682-0.128606605157j))*x[0] + ((-0.899809846312-0.81929853462j))*x[1]**o + ((0.540682631377+0.783956702042j))*x[1] + ((-0.539375054722+0.727884217312j))*x[2]**o + ((-0.70089656385+0.182019045275j))*x[2]
            ref[(1, 1, 1, 1)]=(-1.22156919464+0.242147107567j)-((-0.299312634996-0.058845821171j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.0261557332468+0.280505197109j)*x[0]**o + ((-0.789992797974-0.207018136209j))*x[0] + ((-0.637179673524+0.801741401991j))*x[1]**o + ((-0.623594762326-0.277619471159j))*x[1]
            ref=(-1.03846148354+0.298804495866j)-((-0.110555901128+0.180374433183j))*(o-1.)
        else:
            arg=(-0.70244433864-0.98573035506j)*x[0]**o + ((0.872480666713+0.374286777181j))*x[0] + ((0.558465891402+0.989177407849j))*x[1]**o + ((-0.327906166898+0.286280869036j))*x[1] + ((0.977378453376-0.882519297935j))*x[2]**o + ((-0.65393265252-0.0420261820405j))*x[2]
            ref=(0.362020926716-0.130265390485j)-((0.138900001023-0.146512040858j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.137873057894-0.107806061318j)*x[0]**o + ((0.956514400708+0.499466275781j))*x[0] + ((0.985002473987+0.169106820889j))*x[1]**o + ((-0.828072298953-0.551145884941j))*x[1]
            ref[(0,)]=(0.487785758924+0.00481057520611j)-((0.141188236015+0.0102167932619j))*(o-1.)
            arg[(1,)]=(0.0468112592042-0.743043812152j)*x[0]**o + ((0.215282374535-0.986744748888j))*x[0] + ((-0.987932969474-0.176578181101j))*x[1]**o + ((0.0679529409691+0.723714461205j))*x[1]
            ref[(1,)]=(-0.328943197383-0.591326140468j)-((-0.156853618378-0.153270332209j))*(o-1.)
        else:
            arg[(0,)]=(0.403996141026+0.67065907708j)*x[0]**o + ((-0.492286700277+0.366145602098j))*x[0] + ((-0.364089086463+0.361123900658j))*x[1]**o + ((0.400422292772-0.936483995148j))*x[1] + ((-0.578043679817+0.878030628429j))*x[2]**o + ((-0.114259559566+0.805196605844j))*x[2]
            ref[(0,)]=(-0.372130296163+1.07233590948j)-((-0.0896894375422+0.318302267695j))*(o-1.)
            arg[(1,)]=(-0.392930937771-0.0582218251334j)*x[0]**o + ((0.491129388094-0.177777484656j))*x[0] + ((0.501781713951+0.0861365705241j))*x[1]**o + ((-0.500308680385+0.715475250327j))*x[1] + ((0.456426930839-0.476472002458j))*x[2]**o + ((0.537001586258+0.902134944074j))*x[2]
            ref[(1,)]=(0.546550000493+0.495637726339j)-((0.0942129511698-0.0747595428445j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref=numpy.zeros((4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.693572936367+0.847224117585j)*x[0]**o + ((0.834188696189-0.243741175021j))*x[0] + ((0.512415191229+0.79023056362j))*x[1]**o + ((0.372542038427-0.671748686782j))*x[1]
            ref[(0, 0)]=(0.512786494739+0.360982409701j)-((-0.0301929575229+0.272909113534j))*(o-1.)
            arg[(0, 1)]=(0.77158396755+0.931351690936j)*x[0]**o + ((0.327837010528+0.128432396176j))*x[0] + ((-0.55486837528-0.290848130536j))*x[1]**o + ((-0.105974346826+0.18825432029j))*x[1]
            ref[(0, 1)]=(0.219289127986+0.478595138433j)-((0.0361192653784+0.1067505934j))*(o-1.)
            arg[(0, 2)]=(0.769920779702+0.959687349212j)*x[0]**o + ((-0.628776933643+0.900243610789j))*x[0] + ((0.0391034106076+0.301071832234j))*x[1]**o + ((-0.746213220055+0.66805223376j))*x[1]
            ref[(0, 2)]=(-0.282982981694+1.414527513j)-((0.134837365052+0.210126530241j))*(o-1.)
            arg[(1, 0)]=(0.368108459235+0.114505926631j)*x[0]**o + ((-0.701671813115+0.971249891431j))*x[0] + ((-0.423350021186+0.189526042297j))*x[1]**o + ((-0.465395942014-0.72918091074j))*x[1]
            ref[(1, 0)]=(-0.61115465854+0.27305047481j)-((-0.00920692699179+0.0506719948214j))*(o-1.)
            arg[(1, 1)]=(0.0164921155518+0.0573140971946j)*x[0]**o + ((0.72256360356+0.695943914395j))*x[0] + ((0.0939833389334-0.774027606268j))*x[1]**o + ((-0.989955935487+0.409718930262j))*x[1]
            ref[(1, 1)]=(-0.078458438721+0.194474667792j)-((0.0184125757475-0.119452251512j))*(o-1.)
            arg[(1, 2)]=(0.100359918534-0.40036537656j)*x[0]**o + ((-0.300485183294-0.445124378225j))*x[0] + ((-0.728214534711-0.767792297462j))*x[1]**o + ((-0.338352910545+0.58669093673j))*x[1]
            ref[(1, 2)]=(-0.633346355008-0.513295557759j)-((-0.104642436029-0.19469294567j))*(o-1.)
            arg[(2, 0)]=(-0.746233479348+0.0248305834145j)*x[0]**o + ((-0.293934979361+0.352849082605j))*x[0] + ((0.633648456628-0.514695026916j))*x[1]**o + ((-0.266266199045+0.588120814471j))*x[1]
            ref[(2, 0)]=(-0.336393100563+0.225552726787j)-((-0.0187641704534-0.081644073917j))*(o-1.)
            arg[(2, 1)]=(-0.194726054228-0.262870573625j)*x[0]**o + ((-0.996591193237-0.801548407508j))*x[0] + ((0.628612570344+0.787828778042j))*x[1]**o + ((-0.4994932221-0.440149453909j))*x[1]
            ref[(2, 1)]=(-0.531098949611-0.3583698285j)-((0.0723144193526+0.0874930340694j))*(o-1.)
            arg[(2, 2)]=(0.585659942291-0.939646842813j)*x[0]**o + ((0.249905756637-0.804578276508j))*x[0] + ((0.615085128408+0.726721860956j))*x[1]**o + ((0.750333853277+0.337271982704j))*x[1]
            ref[(2, 2)]=(1.10049234031-0.34011563783j)-((0.20012417845-0.0354874969762j))*(o-1.)
            arg[(3, 0)]=(-0.22514010717-0.43137850649j)*x[0]**o + ((-0.545094326839-0.836815000164j))*x[0] + ((0.201959858222-0.702002435076j))*x[1]**o + ((0.677795548549-0.466445761181j))*x[1]
            ref[(3, 0)]=(0.0547604863808-1.21832085146j)-((-0.00386337482469-0.188896823594j))*(o-1.)
            arg[(3, 1)]=(-0.881742139756+0.898323732285j)*x[0]**o + ((-0.279553409724+0.354289621602j))*x[0] + ((0.403543335322-0.384864837811j))*x[1]**o + ((-0.456986889961-0.878894789413j))*x[1]
            ref[(3, 1)]=(-0.60736955206-0.00557313666809j)-((-0.0796998007391+0.0855764824125j))*(o-1.)
            arg[(3, 2)]=(-0.149663147782+0.902321482347j)*x[0]**o + ((0.640218576348+0.0859609165352j))*x[0] + ((0.710561071168-0.984528199954j))*x[1]**o + ((0.395231497262+0.281087951202j))*x[1]
            ref[(3, 2)]=(0.798173998498+0.142421075065j)-((0.093482987231-0.0137011196012j))*(o-1.)
        else:
            arg[(0, 0)]=(0.583200455009-0.474891533225j)*x[0]**o + ((0.588907311843+0.518830908961j))*x[0] + ((-0.652808369915-0.168883951831j))*x[1]**o + ((-0.303116800568+0.418501546097j))*x[1] + ((0.44907114758-0.604214549364j))*x[2]**o + ((-0.122342303267+0.138497570185j))*x[2]
            ref[(0, 0)]=(0.271455720341-0.0860800045886j)-((0.0632438721124-0.20799833907j))*(o-1.)
            arg[(0, 1)]=(-0.596735161309+0.137538269943j)*x[0]**o + ((-0.64660296199+0.365910812786j))*x[0] + ((-0.387819583445-0.856219778817j))*x[1]**o + ((-0.258442760627+0.218869518662j))*x[1] + ((0.582080188388-0.442445814383j))*x[2]**o + ((-0.846614752681+0.0182392256408j))*x[2]
            ref[(0, 1)]=(-1.07706751583-0.279053883084j)-((-0.0670790927277-0.193521220543j))*(o-1.)
            arg[(0, 2)]=(0.684236068141-0.127236098096j)*x[0]**o + ((-0.461135925236-0.725996228036j))*x[0] + ((-0.968381599598+0.733162594223j))*x[1]**o + ((-0.998430639087-0.0601795450454j))*x[1] + ((0.0816325214635-0.816688870222j))*x[2]**o + ((0.821351241394+0.643547894581j))*x[2]
            ref[(0, 2)]=(-0.420364166462-0.176695126298j)-((-0.0337521683324-0.0351270623491j))*(o-1.)
            arg[(1, 0)]=(0.504351695489+0.367051953533j)*x[0]**o + ((0.0948145852456+0.682227038206j))*x[0] + ((0.12555686833+0.920417466829j))*x[1]**o + ((0.244388352336+0.585372553436j))*x[1] + ((-0.70111806824+0.280839209651j))*x[2]**o + ((0.251738204818-0.119762728342j))*x[2]
            ref[(1, 0)]=(0.259865818989+1.35807274666j)-((-0.0118682507368+0.261384771669j))*(o-1.)
            arg[(1, 1)]=(-0.262787566726-0.336031893535j)*x[0]**o + ((0.990973094298-0.322266471086j))*x[0] + ((-0.0317643859213-0.913169601349j))*x[1]**o + ((-0.591993775975+0.947865686393j))*x[1] + ((0.74699027617+0.364827406636j))*x[2]**o + ((0.890212497995+0.748860123197j))*x[2]
            ref[(1, 1)]=(0.87081506992+0.245042625128j)-((0.0754063872537-0.147395681375j))*(o-1.)
            arg[(1, 2)]=(-0.566150653709+0.233877322765j)*x[0]**o + ((0.7800844228-0.700999171646j))*x[0] + ((0.539659511406+0.545859908707j))*x[1]**o + ((0.552419825395+0.0977501186572j))*x[1] + ((-0.294455445318-0.437750608604j))*x[2]**o + ((0.623929216071+0.0771675209882j))*x[2]
            ref[(1, 2)]=(0.817743438322-0.092047454566j)-((-0.053491097937+0.056997770478j))*(o-1.)
            arg[(2, 0)]=(-0.0215209726083+0.103947487248j)*x[0]**o + ((0.896304275264-0.214384512844j))*x[0] + ((0.0381129522186+0.102853605152j))*x[1]**o + ((-0.831446812666-0.711390346273j))*x[1] + ((-0.721677894194+0.876924158379j))*x[2]**o + ((0.611491709198+0.0836391312246j))*x[2]
            ref[(2, 0)]=(-0.0143683713933+0.120794761443j)-((-0.117514319097+0.18062087513j))*(o-1.)
            arg[(2, 1)]=(-0.191228976914+0.377723078036j)*x[0]**o + ((0.71155137908+0.729106489896j))*x[0] + ((-0.859255371231-0.370403015902j))*x[1]**o + ((-0.770397341606-0.899101071533j))*x[1] + ((0.0732240145726-0.660832634757j))*x[2]**o + ((-0.911222747707-0.0568086807326j))*x[2]
            ref[(2, 1)]=(-0.973664521903-0.440157917496j)-((-0.162876722262-0.108918762104j))*(o-1.)
            arg[(2, 2)]=(0.758373210321+0.577431204737j)*x[0]**o + ((-0.333185636406-0.563342933066j))*x[0] + ((0.517824607574-0.342030678048j))*x[1]**o + ((-0.667024507471+0.394944449291j))*x[1] + ((0.899711526783+0.244212896607j))*x[2]**o + ((-0.0833345220477+0.526737164036j))*x[2]
            ref[(2, 2)]=(0.546182339377+0.418976051779j)-((0.362651557446+0.0799355705494j))*(o-1.)
            arg[(3, 0)]=(0.898908190848-0.27532795242j)*x[0]**o + ((0.410933213073+0.583485687257j))*x[0] + ((-0.905011401946+0.512180172095j))*x[1]**o + ((-0.898105684992-0.764064304245j))*x[1] + ((-0.691272455422-0.236064126335j))*x[2]**o + ((0.163903576127-0.589049701016j))*x[2]
            ref[(3, 0)]=(-0.510322281156-0.384420112333j)-((-0.116229277753+0.00013134888984j))*(o-1.)
            arg[(3, 1)]=(-0.709416797102-0.798793076845j)*x[0]**o + ((0.577480971777+0.129729099429j))*x[0] + ((0.477740641005-0.809150314708j))*x[1]**o + ((0.15768429815+0.730802908188j))*x[1] + ((-0.390070413512+0.00155138275333j))*x[2]**o + ((-0.755379952765+0.599917512142j))*x[2]
            ref[(3, 1)]=(-0.320980626223-0.0729712445196j)-((-0.103624428268-0.267732001467j))*(o-1.)
            arg[(3, 2)]=(0.715695974747-0.503416417564j)*x[0]**o + ((0.7019572546+0.196673918168j))*x[0] + ((-0.367293782921+0.173477218484j))*x[1]**o + ((0.676410038633+0.837067349985j))*x[1] + ((-0.705221726479+0.150566498876j))*x[2]**o + ((-0.643316938341+0.546169524318j))*x[2]
            ref[(3, 2)]=(0.18911541012+0.700269046134j)-((-0.0594699224421-0.0298954500339j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref=numpy.zeros((3, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.585224848306-0.667330210971j)*x[0]**o + ((0.51115390976+0.862366866813j))*x[0] + ((0.371150386078+0.0731109554518j))*x[1]**o + ((0.662038345193-0.302976384835j))*x[1]
            ref[(0, 0, 0)]=(1.06478374467-0.0174143867703j)-((0.159395872397-0.0990365425865j))*(o-1.)
            arg[(0, 0, 1)]=(0.373549281101-0.38208125613j)*x[0]**o + ((0.466381993022-0.863575447173j))*x[0] + ((0.020660564457-0.257542933994j))*x[1]**o + ((-0.509560682372+0.926808036836j))*x[1]
            ref[(0, 0, 1)]=(0.175515578104-0.288195800231j)-((0.0657016409263-0.106604031687j))*(o-1.)
            arg[(0, 1, 0)]=(0.664605045758-0.0320664297715j)*x[0]**o + ((-0.988521708585-0.997931459117j))*x[0] + ((-0.219251094358-0.580228988351j))*x[1]**o + ((-0.814970138415-0.698126308841j))*x[1]
            ref[(0, 1, 0)]=(-0.6790689478-1.15417659304j)-((0.0742256585668-0.102049236354j))*(o-1.)
            arg[(0, 1, 1)]=(-0.866340538656-0.396822935142j)*x[0]**o + ((-0.526824564486+0.922344717242j))*x[0] + ((0.243219657016-0.436942089417j))*x[1]**o + ((-0.877638612686-0.849061658959j))*x[1]
            ref[(0, 1, 1)]=(-1.01379202941-0.380240983138j)-((-0.103853480273-0.138960837426j))*(o-1.)
            arg[(0, 2, 0)]=(-0.403305471706+0.334838264734j)*x[0]**o + ((0.681027179716+0.281597173882j))*x[0] + ((-0.147787353652+0.0593962812552j))*x[1]**o + ((-0.958120515476-0.331587692989j))*x[1]
            ref[(0, 2, 0)]=(-0.414093080559+0.172122013441j)-((-0.0918488042262+0.0657057576649j))*(o-1.)
            arg[(0, 2, 1)]=(-0.387981457652+0.385538802047j)*x[0]**o + ((-0.919412909583-0.870360987012j))*x[0] + ((-0.975725437169-0.14763819377j))*x[1]**o + ((-0.125587649357-0.0364786508171j))*x[1]
            ref[(0, 2, 1)]=(-1.20435372688-0.334469514776j)-((-0.22728448247+0.0396501013796j))*(o-1.)
            arg[(1, 0, 0)]=(-0.391427407422-0.103745654179j)*x[0]**o + ((0.149933137365-0.155592365377j))*x[0] + ((-0.182180687305+0.838009711324j))*x[1]**o + ((0.507044761632-0.112020938137j))*x[1]
            ref[(1, 0, 0)]=(0.0416849021351+0.233325376816j)-((-0.0956013491211+0.122377342858j))*(o-1.)
            arg[(1, 0, 1)]=(-0.274854455211+0.63954322369j)*x[0]**o + ((-0.411578453723-0.0904417936381j))*x[0] + ((-0.616952542922-0.0496166106896j))*x[1]**o + ((0.506359254178+0.238635058878j))*x[1]
            ref[(1, 0, 1)]=(-0.398513098839+0.36905993912j)-((-0.148634499689+0.0983211021668j))*(o-1.)
            arg[(1, 1, 0)]=(0.361252653904-0.115945880074j)*x[0]**o + ((-0.211433352208-0.620665839387j))*x[0] + ((0.919146600097-0.555458106971j))*x[1]**o + ((0.608446344378-0.270410744121j))*x[1]
            ref[(1, 1, 0)]=(0.838706123085-0.781240285276j)-((0.213399875667-0.111900664507j))*(o-1.)
            arg[(1, 1, 1)]=(-0.140324313314+0.761259521707j)*x[0]**o + ((0.0717327049188+0.794806470647j))*x[0] + ((-0.421347823575+0.345104042062j))*x[1]**o + ((0.885709942213-0.445880072867j))*x[1]
            ref[(1, 1, 1)]=(0.197885255121+0.727644980774j)-((-0.0936120228149+0.184393927295j))*(o-1.)
            arg[(1, 2, 0)]=(-0.273393216274+0.964376569678j)*x[0]**o + ((0.36333545434+0.307467071705j))*x[0] + ((-0.0683079416419-0.466958655384j))*x[1]**o + ((-0.478812909062+0.546314591924j))*x[1]
            ref[(1, 2, 0)]=(-0.22858930632+0.675599788961j)-((-0.056950192986+0.0829029857156j))*(o-1.)
            arg[(1, 2, 1)]=(-0.628098683318-0.389746625548j)*x[0]**o + ((0.459422159531-0.468312530408j))*x[0] + ((-0.631375427567+0.161099150555j))*x[1]**o + ((0.92498450217-0.164458263195j))*x[1]
            ref[(1, 2, 1)]=(0.0624662754081-0.430709134298j)-((-0.209912351814-0.0381079124988j))*(o-1.)
            arg[(2, 0, 0)]=(-0.725036289635-0.139725714309j)*x[0]**o + ((-0.629355429532+0.71023156594j))*x[0] + ((0.165056129953-0.292371629359j))*x[1]**o + ((0.764275189766-0.232226578362j))*x[1]
            ref[(2, 0, 0)]=(-0.212530199723+0.0229538219551j)-((-0.0933300266136-0.0720162239447j))*(o-1.)
            arg[(2, 0, 1)]=(0.990715639228+0.758519700048j)*x[0]**o + ((-0.0717360384462-0.802035616141j))*x[0] + ((0.915612946158+0.0134917013953j))*x[1]**o + ((-0.888608552252-0.0535026324393j))*x[1]
            ref[(2, 0, 1)]=(0.472991997344-0.0417634235683j)-((0.317721430898+0.128668566907j))*(o-1.)
            arg[(2, 1, 0)]=(-0.790142397391-0.404085977099j)*x[0]**o + ((-0.601771011298+0.125711437905j))*x[0] + ((-0.796084924965-0.799261276415j))*x[1]**o + ((-0.904860028741+0.0325019622849j))*x[1]
            ref[(2, 1, 0)]=(-1.5464291812-0.522566926662j)-((-0.264371220393-0.200557875586j))*(o-1.)
            arg[(2, 1, 1)]=(-0.880421106164-0.400367401196j)*x[0]**o + ((-0.0974126183086-0.972839183657j))*x[0] + ((0.764636930283+0.547611100355j))*x[1]**o + ((0.758285520425-0.0858310562807j))*x[1]
            ref[(2, 1, 1)]=(0.272544363118-0.455713270389j)-((-0.0192973626469+0.0245406165265j))*(o-1.)
            arg[(2, 2, 0)]=(-0.801119730831+0.742982186057j)*x[0]**o + ((-0.0305389534877+0.113795549548j))*x[0] + ((-0.581837873507+0.00703441411912j))*x[1]**o + ((0.114555584987-0.979264830457j))*x[1]
            ref[(2, 2, 0)]=(-0.64947048642-0.0577263403671j)-((-0.230492934056+0.125002766696j))*(o-1.)
            arg[(2, 2, 1)]=(-0.930487070129+0.500848964668j)*x[0]**o + ((0.822001163163+0.120982840355j))*x[0] + ((0.0468214027036-0.0799465523395j))*x[1]**o + ((-0.9770585525+0.657817760786j))*x[1]
            ref[(2, 2, 1)]=(-0.519361528381+0.599851506734j)-((-0.147277611238+0.0701504020547j))*(o-1.)
        else:
            arg[(0, 0, 0)]=(0.553038990551+0.577291758411j)*x[0]**o + ((0.348229438592-0.0330777438953j))*x[0] + ((-0.095545306389-0.307687368028j))*x[1]**o + ((-0.354910579278+0.196283913192j))*x[1] + ((0.842240249012-0.926249699304j))*x[2]**o + ((-0.104158939704+0.0495438589367j))*x[2]
            ref[(0, 0, 0)]=(0.594446926392-0.221947640343j)-((0.216622322196-0.10944088482j))*(o-1.)
            arg[(0, 0, 1)]=(0.718166918751-0.278421520658j)*x[0]**o + ((0.566010934192+0.229564914479j))*x[0] + ((-0.622206551522+0.363919516125j))*x[1]**o + ((-0.465085898617-0.43942157782j))*x[1] + ((0.720920510631+0.802104925702j))*x[2]**o + ((-0.174448587628+0.0977612147083j))*x[2]
            ref[(0, 0, 1)]=(0.371678662903+0.387753736268j)-((0.136146812977+0.147933820195j))*(o-1.)
            arg[(0, 1, 0)]=(-0.105590826953-0.244523253327j)*x[0]**o + ((0.384918445007-0.108650908147j))*x[0] + ((-0.681382133732-0.884214626431j))*x[1]**o + ((0.98474788829+0.710733195324j))*x[1] + ((-0.24324135878+0.930669335835j))*x[2]**o + ((0.321323780923-0.237337859741j))*x[2]
            ref[(0, 1, 0)]=(0.330387897378+0.0833379417566j)-((-0.171702386578-0.0330114239872j))*(o-1.)
            arg[(0, 1, 1)]=(0.197919541918-0.775310090082j)*x[0]**o + ((-0.232499599017+0.749852361239j))*x[0] + ((-0.710871718308+0.402841906085j))*x[1]**o + ((-0.232459248152-0.534544236746j))*x[1] + ((0.735395211436-0.70178332878j))*x[2]**o + ((0.579510022788-0.963917184413j))*x[2]
            ref[(0, 1, 1)]=(0.168497105332-0.911430286348j)-((0.0370738391743-0.179041918796j))*(o-1.)
            arg[(0, 2, 0)]=(0.956565330308+0.171424442861j)*x[0]**o + ((-0.0705419737494-0.218533654773j))*x[0] + ((0.466422428477-0.284934967714j))*x[1]**o + ((-0.59070472067+0.517461354473j))*x[1] + ((0.0129355266365+0.394225020565j))*x[2]**o + ((0.702133614045+0.374797596079j))*x[2]
            ref[(0, 2, 0)]=(0.738405102523+0.477219895745j)-((0.23932054757+0.0467857492854j))*(o-1.)
            arg[(0, 2, 1)]=(-0.32068311571-0.0807430630762j)*x[0]**o + ((-0.314908146591+0.631678639301j))*x[0] + ((0.414079671551-0.0107410000432j))*x[1]**o + ((-0.364741478936-0.0663703453433j))*x[1] + ((-0.0680682888289-0.444746279279j))*x[2]**o + ((-0.533272856719-0.373312331843j))*x[2]
            ref[(0, 2, 1)]=(-0.593797107617-0.172117190142j)-((0.00422137783537-0.0893717237331j))*(o-1.)
            arg[(1, 0, 0)]=(0.915849059478-0.283570476678j)*x[0]**o + ((0.437287264744-0.0565933902319j))*x[0] + ((0.913315045838-0.547063810276j))*x[1]**o + ((0.193953112157+0.365545901758j))*x[1] + ((0.4188147111+0.60350951988j))*x[2]**o + ((-0.316478355124+0.0250588301359j))*x[2]
            ref[(1, 0, 0)]=(1.2813704191+0.0534432872939j)-((0.374663136069-0.0378541278457j))*(o-1.)
            arg[(1, 0, 1)]=(-0.156093327824-0.666703434327j)*x[0]**o + ((0.587418185936-0.635438772971j))*x[0] + ((0.309566107702-0.648727980964j))*x[1]**o + ((-0.495341526413+0.465328966473j))*x[1] + ((-0.728061122414+0.776640381041j))*x[2]**o + ((0.58390728346-0.447987385019j))*x[2]
            ref[(1, 0, 1)]=(0.0506978002237-0.578444112883j)-((-0.095764723756-0.0897985057083j))*(o-1.)
            arg[(1, 1, 0)]=(-0.322107412099+0.71765119577j)*x[0]**o + ((-0.424722300844+0.626084148738j))*x[0] + ((-0.0725311843047+0.580617298944j))*x[1]**o + ((0.37263875606+0.49380245607j))*x[1] + ((0.709737141034-0.148481937318j))*x[2]**o + ((-0.196092438824-0.269817099882j))*x[2]
            ref[(1, 1, 0)]=(0.0334612805113+0.99992803116j)-((0.0525164241051+0.191631092899j))*(o-1.)
            arg[(1, 1, 1)]=(0.914553966391+0.504560337566j)*x[0]**o + ((0.988951421298+0.0256444340608j))*x[0] + ((0.160844055118+0.237509138398j))*x[1]**o + ((0.25309590537-0.837791445877j))*x[1] + ((-0.778962879428-0.236354640496j))*x[2]**o + ((-0.859845667554-0.272273933882j))*x[2]
            ref[(1, 1, 1)]=(0.339318400598-0.289353055115j)-((0.0494058570135+0.0842858059112j))*(o-1.)
            arg[(1, 2, 0)]=(0.0402683840618-0.59989530818j)*x[0]**o + ((-0.409833486607+0.888719125981j))*x[0] + ((-0.460366179045-0.440499809818j))*x[1]**o + ((0.191457031757-0.300175616762j))*x[1] + ((-0.237517135285+0.0966766753456j))*x[2]**o + ((0.976328893898+0.9186362455j))*x[2]
            ref[(1, 2, 0)]=(0.0501687543897+0.281730656033j)-((-0.109602488378-0.157286407109j))*(o-1.)
            arg[(1, 2, 1)]=(-0.052196876906-0.921676809567j)*x[0]**o + ((-0.936027564878-0.14769499162j))*x[0] + ((0.712323895969-0.41816158553j))*x[1]**o + ((0.774331776255+0.494496929137j))*x[1] + ((0.215402021088+0.344189678301j))*x[2]**o + ((-0.105473260538-0.774877714963j))*x[2]
            ref[(1, 2, 1)]=(0.304179995495-0.711862247122j)-((0.145921506692-0.165941452799j))*(o-1.)
            arg[(2, 0, 0)]=(0.931079216542+0.351690287819j)*x[0]**o + ((0.4501799001-0.832565905798j))*x[0] + ((-0.744120743031-0.209822360553j))*x[1]**o + ((0.917826574518-0.870035743125j))*x[1] + ((-0.790830319465+0.0217506050201j))*x[2]**o + ((-0.565217957215+0.0192712825855j))*x[2]
            ref[(2, 0, 0)]=(0.0994583357243-0.759855917025j)-((-0.100645307659+0.0272697553812j))*(o-1.)
            arg[(2, 0, 1)]=(-0.173677463953+0.0481767818411j)*x[0]**o + ((-0.724115250217+0.112380494749j))*x[0] + ((-0.0331355554736-0.367456494855j))*x[1]**o + ((-0.667973556229-0.785029012921j))*x[1] + ((0.0104379563626-0.510628664352j))*x[2]**o + ((0.726022857144+0.971382671424j))*x[2]
            ref[(2, 0, 1)]=(-0.431220506183-0.265587112057j)-((-0.0327291771773-0.138318062894j))*(o-1.)
            arg[(2, 1, 0)]=(0.439315048069-0.139880678359j)*x[0]**o + ((-0.430952569727-0.479905265541j))*x[0] + ((0.985051920092-0.35796242364j))*x[1]**o + ((-0.094920835423+0.827202562995j))*x[1] + ((-0.822911350784+0.889162490658j))*x[2]**o + ((-0.804457776495+0.604161842036j))*x[2]
            ref[(2, 1, 0)]=(-0.364437782134+0.671389264075j)-((0.100242602896+0.0652198981099j))*(o-1.)
            arg[(2, 1, 1)]=(0.310607498357-0.501691496396j)*x[0]**o + ((0.619627045227-0.201371039786j))*x[0] + ((-0.08046802148+0.266142162956j))*x[1]**o + ((-0.612381165752+0.386514333757j))*x[1] + ((0.78653145943+0.0598534289821j))*x[2]**o + ((-0.371810360841+0.305019582449j))*x[2]
            ref[(2, 1, 1)]=(0.32605322747+0.157233485981j)-((0.169445156051-0.0292826507431j))*(o-1.)
            arg[(2, 2, 0)]=(0.797261241693+0.461269323891j)*x[0]**o + ((-0.946935029564+0.692540195494j))*x[0] + ((0.682002861893+0.240726968007j))*x[1]**o + ((0.701864430267+0.571090820702j))*x[1] + ((0.0838947401592+0.452811794317j))*x[2]**o + ((-0.884214844238+0.807892043895j))*x[2]
            ref[(2, 2, 0)]=(0.216936700105+1.61316557315j)-((0.260526473958+0.192468014369j))*(o-1.)
            arg[(2, 2, 1)]=(0.308295915089-0.876208475146j)*x[0]**o + ((0.671398430858-0.132183786922j))*x[0] + ((0.62109820329-0.619876631619j))*x[1]**o + ((-0.641124110161-0.560007807587j))*x[1] + ((0.560713158612+0.470011981677j))*x[2]**o + ((-0.642651325716+0.655928665413j))*x[2]
            ref[(2, 2, 1)]=(0.438865135986-0.531168027092j)-((0.248351212832-0.171012187515j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4, 2),w)
        ref=numpy.zeros((2, 4, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.353246768041-0.570331764661j)*x[0]**o + ((0.510050925141-0.422063177939j))*x[0] + ((0.505787513047+0.886626047226j))*x[1]**o + ((-0.019441706576+0.00239121692685j))*x[1]
            ref[(0, 0, 0, 0)]=(0.321574981785-0.0516888392232j)-((0.0254234575009+0.052715713761j))*(o-1.)
            arg[(0, 0, 0, 1)]=(0.975189836838-0.0371146326851j)*x[0]**o + ((0.766859667907-0.909352669648j))*x[0] + ((0.597223357099-0.347373756075j))*x[1]**o + ((-0.902604760528+0.0145470125352j))*x[1]
            ref[(0, 0, 0, 1)]=(0.718334050658-0.639647022936j)-((0.262068865656-0.0640813981266j))*(o-1.)
            arg[(0, 0, 1, 0)]=(0.424509421293+0.325353055129j)*x[0]**o + ((0.25807523836+0.432799991617j))*x[0] + ((-0.618934611778-0.484659360062j))*x[1]**o + ((-0.868824558946+0.614109652875j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.402587255535+0.44380166978j)-((-0.0324041984142-0.0265510508221j))*(o-1.)
            arg[(0, 0, 1, 1)]=(-0.0763088644029+0.573793667975j)*x[0]**o + ((0.946315388239+0.27818463767j))*x[0] + ((-0.968079898208-0.0135662548245j))*x[1]**o + ((-0.690374175851+0.704144536295j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.394223775111+0.771278293558j)-((-0.174064793768+0.0933712355251j))*(o-1.)
            arg[(0, 0, 2, 0)]=(-0.184644297938-0.380808997858j)*x[0]**o + ((-0.941009650624-0.100275979094j))*x[0] + ((0.412306139774+0.430667117653j))*x[1]**o + ((-0.492516737316+0.000524378611533j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.602932273052-0.024946740344j)-((0.037943640306+0.0083096866324j))*(o-1.)
            arg[(0, 0, 2, 1)]=(0.501593260297+0.902189249124j)*x[0]**o + ((-0.503286757831+0.531976612212j))*x[0] + ((0.129775378308-0.0880594185365j))*x[1]**o + ((0.706582735752-0.214317880859j))*x[1]
            ref[(0, 0, 2, 1)]=(0.417332308263+0.56589428097j)-((0.105228106434+0.135688305098j))*(o-1.)
            arg[(0, 0, 3, 0)]=(0.747178906558-0.531821199156j)*x[0]**o + ((0.382233990019+0.104577682631j))*x[0] + ((-0.370985746665-0.644281267827j))*x[1]**o + ((0.163975541544-0.432581389463j))*x[1]
            ref[(0, 0, 3, 0)]=(0.461201345727-0.752053086907j)-((0.0626988599821-0.19601707783j))*(o-1.)
            arg[(0, 0, 3, 1)]=(-0.429626546164-0.781955968704j)*x[0]**o + ((0.624644088957+0.599453608828j))*x[0] + ((-0.843516198219+0.829043306967j))*x[1]**o + ((0.494416877291+0.574713387026j))*x[1]
            ref[(0, 0, 3, 1)]=(-0.0770408890677+0.610627167059j)-((-0.212190457397+0.00784788971055j))*(o-1.)
            arg[(0, 1, 0, 0)]=(0.317944584322-0.760093132217j)*x[0]**o + ((0.335894603119-0.467513356413j))*x[0] + ((-0.909210491095+0.321006147122j))*x[1]**o + ((0.662770795192+0.494064037942j))*x[1]
            ref[(0, 1, 0, 0)]=(0.203699745769-0.206268151783j)-((-0.0985443177956-0.0731811641826j))*(o-1.)
            arg[(0, 1, 0, 1)]=(-0.858060006705+0.155778426036j)*x[0]**o + ((-0.781409850842+0.497558822139j))*x[0] + ((0.277028615662+0.140302246903j))*x[1]**o + ((-0.719126474093+0.498207294707j))*x[1]
            ref[(0, 1, 0, 1)]=(-1.04078385799+0.645923394892j)-((-0.0968385651737+0.0493467788232j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.350204325551-0.509640489603j)*x[0]**o + ((-0.189813951742+0.0304378795136j))*x[0] + ((0.251347116113+0.146780949959j))*x[1]**o + ((-0.579042651187-0.769550081811j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.433856906184-0.550985870971j)-((-0.016476201573-0.0604765899406j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.915953196619+0.238301176234j)*x[0]**o + ((0.817198964014+0.100878676743j))*x[0] + ((0.699324652253+0.976072878679j))*x[1]**o + ((-0.669754128216+0.0889950623609j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.0345918542842+0.702123897009j)-((-0.0361047573943+0.202395675819j))*(o-1.)
            arg[(0, 1, 2, 0)]=(-0.763841425182-0.390931427254j)*x[0]**o + ((0.169769485179-0.739321117052j))*x[0] + ((-0.738386279942-0.958573608527j))*x[1]**o + ((0.852333023832-0.804962314799j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.240062598056-1.44689423382j)-((-0.250371284187-0.224917505963j))*(o-1.)
            arg[(0, 1, 2, 1)]=(0.313561019317-0.553019858718j)*x[0]**o + ((0.692252100918+0.601913567933j))*x[0] + ((0.788270453203+0.674082738074j))*x[1]**o + ((-0.469880107985-0.0495939984067j))*x[1]
            ref[(0, 1, 2, 1)]=(0.662101732726+0.336691224441j)-((0.183638578753+0.0201771465595j))*(o-1.)
            arg[(0, 1, 3, 0)]=(0.952038018591-0.0590329947906j)*x[0]**o + ((-0.698089645663-0.622233426572j))*x[0] + ((0.716447734313-0.423725484988j))*x[1]**o + ((0.918014721476+0.372963971394j))*x[1]
            ref[(0, 1, 3, 0)]=(0.944205414359-0.366013967478j)-((0.278080958817-0.0804597466297j))*(o-1.)
            arg[(0, 1, 3, 1)]=(-0.95007074422-0.553502795231j)*x[0]**o + ((-0.266426875637+0.567385086308j))*x[0] + ((-0.209521570029+0.76057493746j))*x[1]**o + ((0.0818944831309-0.822320522973j))*x[1]
            ref[(0, 1, 3, 1)]=(-0.672062353378-0.0239316472183j)-((-0.193265385708+0.0345120237048j))*(o-1.)
            arg[(0, 2, 0, 0)]=(0.256406582596+0.105657423941j)*x[0]**o + ((-0.329972264874+0.883771977357j))*x[0] + ((0.876852006616-0.394075435146j))*x[1]**o + ((0.179152246184+0.390261056207j))*x[1]
            ref[(0, 2, 0, 0)]=(0.491219285261+0.49280751118j)-((0.188876431535-0.0480696685342j))*(o-1.)
            arg[(0, 2, 0, 1)]=(0.423176451145-0.718930887505j)*x[0]**o + ((0.0437639368075-0.834345481713j))*x[0] + ((-0.957361487617+0.349420665183j))*x[1]**o + ((-0.945036296386+0.299015171743j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.717728698025-0.452420266145j)-((-0.089030839412-0.0615850370536j))*(o-1.)
            arg[(0, 2, 1, 0)]=(-0.874698762368-0.341900976641j)*x[0]**o + ((-0.734099269661+0.676839134931j))*x[0] + ((0.878687551525-0.189271193291j))*x[1]**o + ((0.761026973396+0.740161634651j))*x[1]
            ref[(0, 2, 1, 0)]=(0.0154582464461+0.442914299825j)-((0.000664798192751-0.0885286949888j))*(o-1.)
            arg[(0, 2, 1, 1)]=(0.997382716863-0.545757360099j)*x[0]**o + ((0.482172136945+0.616816282295j))*x[0] + ((0.944733422877-0.0346264396639j))*x[1]**o + ((0.993316346726-0.327828198021j))*x[1]
            ref[(0, 2, 1, 1)]=(1.70880231171-0.145697857745j)-((0.32368602329-0.0967306332938j))*(o-1.)
            arg[(0, 2, 2, 0)]=(-0.101130515603+0.227348233656j)*x[0]**o + ((-0.682911304513+0.868170633501j))*x[0] + ((-0.771369555433+0.872476834563j))*x[1]**o + ((0.746058907757+0.196835399986j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.404676233896+1.08241555085j)-((-0.145416678506+0.183304178036j))*(o-1.)
            arg[(0, 2, 2, 1)]=(-0.213274286948-0.454494287649j)*x[0]**o + ((-0.509249966175+0.0154715075255j))*x[0] + ((0.502016436362+0.850805140969j))*x[1]**o + ((-0.693448322109-0.939730356065j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.456978069435-0.26397399761j)-((0.0481236915691+0.0660518088866j))*(o-1.)
            arg[(0, 2, 3, 0)]=(-0.0188733958688+0.415202557852j)*x[0]**o + ((0.0182247984857-0.923160730933j))*x[0] + ((0.142078698777-0.681449467348j))*x[1]**o + ((0.372137018049-0.0509044222242j))*x[1]
            ref[(0, 2, 3, 0)]=(0.256783559721-0.620156031327j)-((0.0205342171514-0.044374484916j))*(o-1.)
            arg[(0, 2, 3, 1)]=(0.250073908186+0.168691138144j)*x[0]**o + ((-0.23654136447+0.250540342615j))*x[0] + ((-0.414591932254-0.609761280821j))*x[1]**o + ((0.327342353719+0.549823351705j))*x[1]
            ref[(0, 2, 3, 1)]=(-0.0368585174093+0.179646775822j)-((-0.027419670678-0.0735116904461j))*(o-1.)
            arg[(0, 3, 0, 0)]=(0.550047200378+0.997927717233j)*x[0]**o + ((-0.351946103283-0.343711068987j))*x[0] + ((0.643074007713-0.794904276763j))*x[1]**o + ((0.307005360141-0.732307222089j))*x[1]
            ref[(0, 3, 0, 0)]=(0.574090232475-0.436497425303j)-((0.198853534682+0.0338372400783j))*(o-1.)
            arg[(0, 3, 0, 1)]=(0.739437918474+0.37375991548j)*x[0]**o + ((0.541611378416+0.966516792427j))*x[0] + ((0.9213676565-0.267313592533j))*x[1]**o + ((0.834697295614+0.445757348972j))*x[1]
            ref[(0, 3, 0, 1)]=(1.5185571245+0.759360232173j)-((0.276800929162+0.0177410538244j))*(o-1.)
            arg[(0, 3, 1, 0)]=(-0.464940476332-0.538397330203j)*x[0]**o + ((-0.320168765856-0.200697146739j))*x[0] + ((0.474398367477-0.212941738451j))*x[1]**o + ((-0.270271612501-0.407381444848j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.290491243606-0.679708830121j)-((0.00157631519087-0.125223178109j))*(o-1.)
            arg[(0, 3, 1, 1)]=(-0.206106337901+0.504732781686j)*x[0]**o + ((-0.588030360212-0.610227347891j))*x[0] + ((-0.108362041157-0.157461527423j))*x[1]**o + ((0.738280345641-0.309339966573j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.0821091968142-0.2861480301j)-((-0.0524113965096+0.0578785423772j))*(o-1.)
            arg[(0, 3, 2, 0)]=(0.198597697622+0.380567949713j)*x[0]**o + ((-0.950953537564+0.409185603316j))*x[0] + ((-0.924106830214+0.475888570373j))*x[1]**o + ((0.249964849753-0.482258179841j))*x[1]
            ref[(0, 3, 2, 0)]=(-0.713248910201+0.391691971781j)-((-0.120918188765+0.142742753348j))*(o-1.)
            arg[(0, 3, 2, 1)]=(0.898616120533-0.0200448395715j)*x[0]**o + ((0.416212566493-0.0956027659202j))*x[0] + ((0.802302043274-0.928851454891j))*x[1]**o + ((0.422097707855-0.0049651392121j))*x[1]
            ref[(0, 3, 2, 1)]=(1.26961421908-0.524732099797j)-((0.283486360635-0.15814938241j))*(o-1.)
            arg[(0, 3, 3, 0)]=(-0.25307946623+0.473517211937j)*x[0]**o + ((0.46608877829-0.717842164196j))*x[0] + ((0.548593541269+0.66192649629j))*x[1]**o + ((-0.343554418502-0.774575972724j))*x[1]
            ref[(0, 3, 3, 0)]=(0.209024217414-0.178487214346j)-((0.0492523458399+0.189240618038j))*(o-1.)
            arg[(0, 3, 3, 1)]=(0.958167996402-0.714715768108j)*x[0]**o + ((-0.855020689334+0.978467578415j))*x[0] + ((-0.593879805329+0.196296238193j))*x[1]**o + ((-0.7715662697+0.14534607047j))*x[1]
            ref[(0, 3, 3, 1)]=(-0.631149383981+0.302697059485j)-((0.0607146985122-0.0864032549858j))*(o-1.)
            arg[(1, 0, 0, 0)]=(-0.897173993853-0.243614204769j)*x[0]**o + ((-0.786703235496-0.810771198802j))*x[0] + ((-0.840786144681+0.265908223073j))*x[1]**o + ((-0.492403953143+0.647028455891j))*x[1]
            ref[(1, 0, 0, 0)]=(-1.50853366359-0.0707243623039j)-((-0.289660023089+0.00371566971721j))*(o-1.)
            arg[(1, 0, 0, 1)]=(0.739803876606-0.437590557425j)*x[0]**o + ((-0.427703079702+0.568892906955j))*x[0] + ((-0.88726318744+0.106765603664j))*x[1]**o + ((-0.626750860589+0.692753024845j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.600956625563+0.46541048902j)-((-0.0245765518058-0.0551374922935j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.998534686339+0.362508782981j)*x[0]**o + ((-0.617803254618-0.79841590524j))*x[0] + ((-0.965436429636-0.400736833348j))*x[1]**o + ((-0.61531711132-0.962196476892j))*x[1]
            ref[(1, 0, 1, 0)]=(-1.59854574096-0.899420216249j)-((-0.327328519329-0.00637134172788j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.768975937451+0.843024160091j)*x[0]**o + ((0.942266705808+0.641523759932j))*x[0] + ((-0.651874461529+0.0957805078741j))*x[1]**o + ((-0.923481621015-0.00203428313184j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.701032657094+0.789147072383j)-((-0.23680839983+0.156467444661j))*(o-1.)
            arg[(1, 0, 2, 0)]=(-0.989213382305+0.452536299586j)*x[0]**o + ((0.855996786704+0.309857567928j))*x[0] + ((0.0446931251477-0.578107826474j))*x[1]**o + ((0.810193349578-0.717935623717j))*x[1]
            ref[(1, 0, 2, 0)]=(0.360834939562-0.266824791338j)-((-0.15742004286-0.0209285878147j))*(o-1.)
            arg[(1, 0, 2, 1)]=(-0.515646522729+0.806242262987j)*x[0]**o + ((-0.896511049732-0.512123351287j))*x[0] + ((0.643022125442-0.567882072984j))*x[1]**o + ((-0.999773441979+0.118451276257j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.8844544445-0.0776559425133j)-((0.0212292671188+0.0397266983338j))*(o-1.)
            arg[(1, 0, 3, 0)]=(-0.599517815956-0.0963969527675j)*x[0]**o + ((0.75506471074+0.83358123105j))*x[0] + ((-0.199093627154+0.903292284501j))*x[1]**o + ((-0.648402747341+0.429472577464j))*x[1]
            ref[(1, 0, 3, 0)]=(-0.345974739856+1.03497457012j)-((-0.133101907185+0.134482555289j))*(o-1.)
            arg[(1, 0, 3, 1)]=(0.417672537592+0.867072022437j)*x[0]**o + ((-0.359714013929-0.0155653690353j))*x[0] + ((0.134614985681-0.736241640604j))*x[1]**o + ((-0.275840856668+0.39881154909j))*x[1]
            ref[(1, 0, 3, 1)]=(-0.0416336736623+0.257038280944j)-((0.0920479205455+0.0218050636389j))*(o-1.)
            arg[(1, 1, 0, 0)]=(-0.122937354334+0.0854129668752j)*x[0]**o + ((-0.81493594017+0.593860716164j))*x[0] + ((0.863507245498-0.835812953839j))*x[1]**o + ((-0.995048978891-0.236315088334j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.534707513949-0.196427179567j)-((0.123428315194-0.125066664494j))*(o-1.)
            arg[(1, 1, 0, 1)]=(-0.999326857882-0.995720739594j)*x[0]**o + ((-0.315372093965-0.0433574069513j))*x[0] + ((0.5494358715+0.567011463418j))*x[1]**o + ((0.62910564782-0.475457113797j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.0680787162634-0.473761898462j)-((-0.0749818310636-0.0714515460294j))*(o-1.)
            arg[(1, 1, 1, 0)]=(0.743266650796-0.469404106265j)*x[0]**o + ((-0.234667983773-0.387953089711j))*x[0] + ((0.753578938002-0.46890816875j))*x[1]**o + ((0.524560561541-0.155066973489j))*x[1]
            ref[(1, 1, 1, 0)]=(0.893369083283-0.740666169107j)-((0.2494742648-0.156385379169j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.937418973952+0.494937696415j)*x[0]**o + ((-0.381231476678+0.0495893082881j))*x[0] + ((0.540947108141-0.471397934418j))*x[1]**o + ((-0.158882309878+0.516465467028j))*x[1]
            ref[(1, 1, 1, 1)]=(0.469126147768+0.294797268656j)-((0.246394347015+0.00392329366618j))*(o-1.)
            arg[(1, 1, 2, 0)]=(0.578350787897+0.826336812115j)*x[0]**o + ((0.998713406907+0.0877301472536j))*x[0] + ((0.669414581444+0.346178841273j))*x[1]**o + ((0.0191523299557+0.245149006377j))*x[1]
            ref[(1, 1, 2, 0)]=(1.1328155531+0.752697403509j)-((0.20796089489+0.195419275565j))*(o-1.)
            arg[(1, 1, 2, 1)]=(-0.510337115349+0.901004443078j)*x[0]**o + ((0.0962019249879-0.85657545538j))*x[0] + ((-0.692992688163+0.785447554529j))*x[1]**o + ((0.838977839952-0.505942787648j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.134075019286+0.16196687729j)-((-0.200554967252+0.281075332935j))*(o-1.)
            arg[(1, 1, 3, 0)]=(0.102279901336-0.248900203864j)*x[0]**o + ((-0.46907086896-0.262977732943j))*x[0] + ((0.740327866502+0.872184484979j))*x[1]**o + ((0.185933960197+0.621366065592j))*x[1]
            ref[(1, 1, 3, 0)]=(0.279735429537+0.490836306882j)-((0.140434627973+0.103880713519j))*(o-1.)
            arg[(1, 1, 3, 1)]=(-0.0166446181054+0.251447089153j)*x[0]**o + ((0.870982344648+0.177352636902j))*x[0] + ((0.97682989772-0.0853773450138j))*x[1]**o + ((0.798006273262+0.967305832767j))*x[1]
            ref[(1, 1, 3, 1)]=(1.31458694876+0.655364106904j)-((0.160030879936+0.0276782906898j))*(o-1.)
            arg[(1, 2, 0, 0)]=(-0.561573198816-0.542980194659j)*x[0]**o + ((-0.178287047913-0.51704086916j))*x[0] + ((-0.916053547684+0.641323319367j))*x[1]**o + ((-0.822350608939+0.408607424944j))*x[1]
            ref[(1, 2, 0, 0)]=(-1.23913220168-0.00504515975398j)-((-0.246271124417+0.0163905207847j))*(o-1.)
            arg[(1, 2, 0, 1)]=(0.876760895721-0.982917647582j)*x[0]**o + ((-0.592352593147+0.271100939796j))*x[0] + ((0.461026130231+0.757530732652j))*x[1]**o + ((-0.852002324217-0.665102303311j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.0532839457056-0.309694139222j)-((0.222964504325-0.0375644858217j))*(o-1.)
            arg[(1, 2, 1, 0)]=(-0.744062965839+0.830103380154j)*x[0]**o + ((-0.911662489959-0.0659969847848j))*x[0] + ((0.369949074433+0.986009197818j))*x[1]**o + ((-0.73875136952-0.952475138521j))*x[1]
            ref[(1, 2, 1, 0)]=(-1.01226387544+0.398820227333j)-((-0.0623523152342+0.302685429662j))*(o-1.)
            arg[(1, 2, 1, 1)]=(-0.826532344062+0.510372591918j)*x[0]**o + ((-0.50301186101+0.17164687634j))*x[0] + ((-0.145297518105+0.218691483383j))*x[1]**o + ((-0.649206469163+0.421584069465j))*x[1]
            ref[(1, 2, 1, 1)]=(-1.06202409617+0.661147510553j)-((-0.161971643695+0.121510679217j))*(o-1.)
            arg[(1, 2, 2, 0)]=(0.47780150852-0.820749581877j)*x[0]**o + ((0.051179242751+0.503534632483j))*x[0] + ((0.370605233667-0.874244948121j))*x[1]**o + ((-0.901716568164-0.00283671671869j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.00106529161295-0.597148307117j)-((0.141401123698-0.282499088333j))*(o-1.)
            arg[(1, 2, 2, 1)]=(0.325163211134-0.172663047641j)*x[0]**o + ((-0.17510613969+0.893905795469j))*x[0] + ((-0.539896477756+0.970446974397j))*x[1]**o + ((-0.560507647283-0.48156520181j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.475173526798+0.605062260207j)-((-0.0357888777704+0.132963987793j))*(o-1.)
            arg[(1, 2, 3, 0)]=(-0.0211827227613+0.435398064646j)*x[0]**o + ((0.943393681533-0.463515760156j))*x[0] + ((0.464949176199+0.102885310352j))*x[1]**o + ((-0.539866239502-0.960794018836j))*x[1]
            ref[(1, 2, 3, 0)]=(0.423646947734-0.443013201997j)-((0.0739610755729+0.089713895833j))*(o-1.)
            arg[(1, 2, 3, 1)]=(-0.197437124314+0.589740171252j)*x[0]**o + ((-0.769594020536+0.959524939373j))*x[0] + ((0.781495856511+0.894903801421j))*x[1]**o + ((-0.93961979304-0.232141775282j))*x[1]
            ref[(1, 2, 3, 1)]=(-0.56257754069+1.10601356838j)-((0.0973431220327+0.247440662112j))*(o-1.)
            arg[(1, 3, 0, 0)]=(-0.274935291056-0.544334390369j)*x[0]**o + ((-0.813703534073-0.817133863724j))*x[0] + ((-0.264203500161+0.685100327908j))*x[1]**o + ((0.370563603006-0.0397586078223j))*x[1]
            ref[(1, 3, 0, 0)]=(-0.491139361142-0.358063267003j)-((-0.0898564652027+0.0234609895899j))*(o-1.)
            arg[(1, 3, 0, 1)]=(0.14629241383+0.812337619279j)*x[0]**o + ((-0.972553709123-0.310620183738j))*x[0] + ((0.0673655976513+0.630257024429j))*x[1]**o + ((-0.991408397516-0.885397482419j))*x[1]
            ref[(1, 3, 0, 1)]=(-0.875152047579+0.123288488776j)-((0.0356096685802+0.240432440618j))*(o-1.)
            arg[(1, 3, 1, 0)]=(-0.12037076987+0.302033312269j)*x[0]**o + ((0.542300329251+0.102694870199j))*x[0] + ((-0.683110202936-0.847915670549j))*x[1]**o + ((0.955996003073-0.0256247243126j))*x[1]
            ref[(1, 3, 1, 0)]=(0.347407679759-0.234406106197j)-((-0.133913495468-0.0909803930467j))*(o-1.)
            arg[(1, 3, 1, 1)]=(-0.183348739397+0.0331406318197j)*x[0]**o + ((-0.00507398837499-0.851555197842j))*x[0] + ((-0.951085395724-0.654931965325j))*x[1]**o + ((0.624069920446+0.920079955162j))*x[1]
            ref[(1, 3, 1, 1)]=(-0.257719101525-0.276633288093j)-((-0.189072355853-0.103631888917j))*(o-1.)
            arg[(1, 3, 2, 0)]=(0.0567476318915+0.424297442922j)*x[0]**o + ((-0.84648875347+0.0737892150973j))*x[0] + ((0.299450747994-0.724739789481j))*x[1]**o + ((-0.494819935499+0.711181039975j))*x[1]
            ref[(1, 3, 2, 0)]=(-0.492555154542+0.242263954257j)-((0.0593663966475-0.0500737244264j))*(o-1.)
            arg[(1, 3, 2, 1)]=(0.887635956725-0.468113283255j)*x[0]**o + ((0.388731412347+0.532169023486j))*x[0] + ((-0.180830490766-0.0426944330768j))*x[1]**o + ((0.116233939945-0.159346518612j))*x[1]
            ref[(1, 3, 2, 1)]=(0.605885409126-0.0689926057287j)-((0.117800910993-0.0851346193886j))*(o-1.)
            arg[(1, 3, 3, 0)]=(0.547333793267-0.352845215712j)*x[0]**o + ((0.377500001627+0.543896412907j))*x[0] + ((-0.0773033148827+0.0778049149335j))*x[1]**o + ((-0.307396025366+0.604560691268j))*x[1]
            ref[(1, 3, 3, 0)]=(0.270067227323+0.436708401698j)-((0.078338413064-0.0458400501298j))*(o-1.)
            arg[(1, 3, 3, 1)]=(0.959685445719-0.513931557872j)*x[0]**o + ((0.159399036922+0.491887433326j))*x[0] + ((0.989062113393-0.829535054342j))*x[1]**o + ((-0.663979330761-0.338710642966j))*x[1]
            ref[(1, 3, 3, 1)]=(0.722083632636-0.595144910926j)-((0.324791259852-0.223911102036j))*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=(0.307329935841-0.385064445599j)*x[0]**o + ((0.116887786971-0.421331720884j))*x[0] + ((0.835411726878-0.185398065115j))*x[1]**o + ((0.154440161838+0.322692050963j))*x[1] + ((-0.254567803079-0.583453655659j))*x[2]**o + ((-0.839859856473-0.761981059406j))*x[2]
            ref[(0, 0, 0, 0)]=(0.159820975988-1.00726844785j)-((0.148028976607-0.192319361062j))*(o-1.)
            arg[(0, 0, 0, 1)]=(0.761851382202-0.876126164397j)*x[0]**o + ((0.363393452565-0.65352598529j))*x[0] + ((0.790218972292-0.739065004251j))*x[1]**o + ((0.253441737202-0.206175658215j))*x[1] + ((0.681877295579+0.611600052494j))*x[2]**o + ((-0.909804405541+0.41667214997j))*x[2]
            ref[(0, 0, 0, 1)]=(0.97048921715-0.723310304844j)-((0.372324608346-0.167265186026j))*(o-1.)
            arg[(0, 0, 1, 0)]=(-0.118449198475+0.632684768099j)*x[0]**o + ((-0.599539928679-0.427515224268j))*x[0] + ((-0.582889409948+0.514664677673j))*x[1]**o + ((-0.975134958678+0.218866669434j))*x[1] + ((-0.287899960177-0.0707439378761j))*x[2]**o + ((-0.978435645677-0.684106386451j))*x[2]
            ref[(0, 0, 1, 0)]=(-1.77117455082+0.0919252833053j)-((-0.164873094767+0.179434251316j))*(o-1.)
            arg[(0, 0, 1, 1)]=(0.104014374123+0.56083155713j)*x[0]**o + ((0.691471206295+0.0471590404722j))*x[0] + ((0.92731830385-0.893092103262j))*x[1]**o + ((-0.165479401529-0.141196405015j))*x[1] + ((0.860166627907+0.301642509579j))*x[2]**o + ((-0.936567165063-0.827013155453j))*x[2]
            ref[(0, 0, 1, 1)]=(0.740461972792-0.475834278274j)-((0.315249884313-0.00510300609223j))*(o-1.)
            arg[(0, 0, 2, 0)]=(0.264997220508-0.374392108818j)*x[0]**o + ((-0.897883420622-0.776767206512j))*x[0] + ((0.341695039424-0.218664687642j))*x[1]**o + ((0.753302292127-0.604508157578j))*x[1] + ((0.133913459996+0.607912769938j))*x[2]**o + ((-0.349463625211-0.524667644185j))*x[2]
            ref[(0, 0, 2, 0)]=(0.123280483111-0.945543517399j)-((0.123434286655+0.00247599557966j))*(o-1.)
            arg[(0, 0, 2, 1)]=(0.945374325076+0.859919937841j)*x[0]**o + ((-0.782162437316-0.747757288031j))*x[0] + ((-0.979060362123-0.632954707587j))*x[1]**o + ((0.587485384731-0.22312238505j))*x[1] + ((-0.650800393177-0.0157377354762j))*x[2]**o + ((0.62474539179-0.786745063589j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.127209045509-0.773198620946j)-((-0.114081071704+0.0352045824631j))*(o-1.)
            arg[(0, 0, 3, 0)]=(0.510922198127+0.621108466944j)*x[0]**o + ((0.850320582395-0.156690846368j))*x[0] + ((-0.738048663183-0.655892260511j))*x[1]**o + ((-0.741159065828+0.238708400468j))*x[1] + ((0.54038548946-0.640161678539j))*x[2]**o + ((-0.0310237214602-0.0542675978489j))*x[2]
            ref[(0, 0, 3, 0)]=(0.195698409755-0.323597757927j)-((0.0522098374007-0.112490912018j))*(o-1.)
            arg[(0, 0, 3, 1)]=(0.635545556666+0.266294609526j)*x[0]**o + ((0.0617982957212+0.560278424379j))*x[0] + ((-0.420659517348+0.324869772028j))*x[1]**o + ((0.24807221385+0.288542606575j))*x[1] + ((0.923654368744-0.373645752756j))*x[2]**o + ((-0.949101847938-0.00817882367925j))*x[2]
            ref[(0, 0, 3, 1)]=(0.249654534847+0.529080418036j)-((0.189756734677+0.0362531047996j))*(o-1.)
            arg[(0, 1, 0, 0)]=(0.55237232501+0.949074255673j)*x[0]**o + ((-0.134515674953-0.820082656873j))*x[0] + ((0.127726823184-0.16717333693j))*x[1]**o + ((0.0706870674071-0.819112821852j))*x[1] + ((-0.897749483675-0.065405392987j))*x[2]**o + ((-0.0729668211572+0.914713808914j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.177222882092-0.00399307202792j)-((-0.0362750559134+0.119415920959j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.701142280487-0.685506690634j)*x[0]**o + ((-0.560180874295-0.789699315459j))*x[0] + ((0.666054905465+0.467055994276j))*x[1]**o + ((0.0206287560575-0.0610068657744j))*x[1] + ((-0.932995684125+0.38818229442j))*x[2]**o + ((0.103295036332+0.871486713524j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.00102779003865+0.0952560651758j)-((0.0723669169713+0.0282885996769j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.767302430596-0.984928748051j)*x[0]**o + ((0.141384505673-0.982542056663j))*x[0] + ((-0.874119719093+0.691258388339j))*x[1]**o + ((0.139554205232+0.52384315409j))*x[1] + ((0.112491435883-0.634256667827j))*x[2]**o + ((0.39855440725+0.809056452506j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.424718797825-0.288784738803j)-((-0.254821785634-0.15465450459j))*(o-1.)
            arg[(0, 1, 1, 1)]=(0.241696998668-0.578781357263j)*x[0]**o + ((0.43311687664-0.878326622182j))*x[0] + ((-0.846077494639-0.62649542901j))*x[1]**o + ((-0.744913144096-0.248766828467j))*x[1] + ((0.76877090815+0.255638554131j))*x[2]**o + ((0.434899337545+0.863158523702j))*x[2]
            ref[(0, 1, 1, 1)]=(0.143746741134-0.606786579544j)-((0.0273984020299-0.15827303869j))*(o-1.)
            arg[(0, 1, 2, 0)]=(-0.692975026841-0.183254141502j)*x[0]**o + ((-0.602390925219+0.421100300366j))*x[0] + ((0.739953278195-0.391457956348j))*x[1]**o + ((-0.869870089614+0.52985081043j))*x[1] + ((-0.494718489056-0.436029011892j))*x[2]**o + ((0.977126798156+0.971848561251j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.47143722719+0.456029281153j)-((-0.0746233729504-0.168456851624j))*(o-1.)
            arg[(0, 1, 2, 1)]=(0.863388980652+0.333704479721j)*x[0]**o + ((0.161659038387+0.309690591721j))*x[0] + ((-0.901168361919+0.811619016347j))*x[1]**o + ((-0.734167044984+0.622375302537j))*x[1] + ((-0.0457524353194-0.914573202619j))*x[2]**o + ((-0.890093059891-0.607852891138j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.773066441537+0.277481648285j)-((-0.013921969431+0.0384583822415j))*(o-1.)
            arg[(0, 1, 3, 0)]=(-0.682256217979-0.459401552803j)*x[0]**o + ((-0.829413102016-0.0525301417472j))*x[0] + ((0.52578539763-0.935392420321j))*x[1]**o + ((-0.855330588813-0.879812989484j))*x[1] + ((-0.117709990211+0.0778895753601j))*x[2]**o + ((-0.768074270912-0.507521322267j))*x[2]
            ref[(0, 1, 3, 0)]=(-1.36349938615-1.37838442563j)-((-0.0456968017599-0.219484066294j))*(o-1.)
            arg[(0, 1, 3, 1)]=(-0.352039564354+0.842756999743j)*x[0]**o + ((0.00709023910355-0.815670302777j))*x[0] + ((0.627857938382+0.888869094093j))*x[1]**o + ((0.455138257906+0.153460937537j))*x[1] + ((-0.67253518816+0.39430811553j))*x[2]**o + ((-0.495454534314-0.784311704903j))*x[2]
            ref[(0, 1, 3, 1)]=(-0.214971425719+0.339706569611j)-((-0.0661194690221+0.354322368228j))*(o-1.)
            arg[(0, 2, 0, 0)]=(0.0384541042453-0.818902814833j)*x[0]**o + ((-0.335683935189+0.171387992933j))*x[0] + ((-0.363244724167-0.771996920347j))*x[1]**o + ((0.585508346992+0.357517751704j))*x[1] + ((0.435278014377-0.790784885657j))*x[2]**o + ((0.693552753633-0.595049246626j))*x[2]
            ref[(0, 2, 0, 0)]=(0.526932279945-1.22391406141j)-((0.0184145657424-0.396947436806j))*(o-1.)
            arg[(0, 2, 0, 1)]=(-0.341525509364-0.0851274239135j)*x[0]**o + ((-0.0781257061015+0.0748728731991j))*x[0] + ((0.41875876273-0.632768978996j))*x[1]**o + ((-0.0900586427325+0.804624277837j))*x[1] + ((0.844026062303-0.996067474623j))*x[2]**o + ((0.00470939569418+0.891952037644j))*x[2]
            ref[(0, 2, 0, 1)]=(0.378892181265+0.0287426555737j)-((0.153543219278-0.285660646255j))*(o-1.)
            arg[(0, 2, 1, 0)]=(0.966968627246-0.415861161003j)*x[0]**o + ((0.0648821189143+0.57451497991j))*x[0] + ((0.76606093647-0.242824481931j))*x[1]**o + ((-0.387466697758+0.719081455903j))*x[1] + ((-0.706988460005-0.720661419717j))*x[2]**o + ((0.251578601265+0.382719309346j))*x[2]
            ref[(0, 2, 1, 0)]=(0.477517563066+0.148484341254j)-((0.171006850618-0.229891177108j))*(o-1.)
            arg[(0, 2, 1, 1)]=(0.38914051661-0.765556807835j)*x[0]**o + ((0.198706151858-0.899216765545j))*x[0] + ((-0.902808669483+0.402351874632j))*x[1]**o + ((-0.460026014975-0.588630325322j))*x[1] + ((-0.802892213454+0.181228526552j))*x[2]**o + ((0.45504922328-0.300397468488j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.561415503082-0.985110483003j)-((-0.219426727721-0.0303294011085j))*(o-1.)
            arg[(0, 2, 2, 0)]=(0.243864159754-0.9038982012j)*x[0]**o + ((0.789975684404+0.851007113234j))*x[0] + ((-0.20768919481+0.730874566116j))*x[1]**o + ((0.202848967099+0.475897319644j))*x[1] + ((-0.198813412597-0.965955925173j))*x[2]**o + ((-0.90703915877-0.845978287022j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.0384264774593-0.329026707201j)-((-0.027106407942-0.18982992671j))*(o-1.)
            arg[(0, 2, 2, 1)]=(-0.985874873843-0.560774356421j)*x[0]**o + ((0.46271113273+0.924939250767j))*x[0] + ((-0.0383904729994+0.831456133392j))*x[1]**o + ((-0.364470595894-0.109253128421j))*x[1] + ((-0.717728121051+0.463994094796j))*x[2]**o + ((-0.0240156481764-0.849695883736j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.833884289617+0.350333055188j)-((-0.290332244649+0.122445978628j))*(o-1.)
            arg[(0, 2, 3, 0)]=(0.960255655533+0.639954187716j)*x[0]**o + ((0.694311138866+0.88985639126j))*x[0] + ((-0.0718792989759-0.0938214795951j))*x[1]**o + ((-0.606661052987+0.223814807216j))*x[1] + ((-0.100617968497-0.945539204251j))*x[2]**o + ((0.738435785159+0.246927436131j))*x[2]
            ref[(0, 2, 3, 0)]=(0.806922129549+0.480596069238j)-((0.131293064677-0.0665677493551j))*(o-1.)
            arg[(0, 2, 3, 1)]=(-0.973491087226-0.784353360917j)*x[0]**o + ((-0.93997604312-0.0703554504545j))*x[0] + ((0.479130457738+0.706079383885j))*x[1]**o + ((0.721052101719-0.689949712635j))*x[1] + ((0.148102682525-0.726973338341j))*x[2]**o + ((-0.56082098626-0.379951359017j))*x[2]
            ref[(0, 2, 3, 1)]=(-0.563001437313-0.972751918739j)-((-0.0577096578272-0.134207885895j))*(o-1.)
            arg[(0, 3, 0, 0)]=(-0.527290709721-0.885556445285j)*x[0]**o + ((0.461608254797-0.42804400637j))*x[0] + ((-0.744574687349+0.614584613063j))*x[1]**o + ((-0.906310888546+0.983587007138j))*x[1] + ((0.65272112414-0.140523676167j))*x[2]**o + ((0.426145884002-0.00390668129261j))*x[2]
            ref[(0, 3, 0, 0)]=(-0.318850511338+0.0700704055433j)-((-0.103190712155-0.0685825847314j))*(o-1.)
            arg[(0, 3, 0, 1)]=(-0.235015126277-0.437386562499j)*x[0]**o + ((-0.07098469482+0.835619173346j))*x[0] + ((-0.451732015684-0.524638500399j))*x[1]**o + ((-0.6796851947-0.584544142759j))*x[1] + ((0.466002557283-0.82765856588j))*x[2]**o + ((-0.221603975079+0.68710248221j))*x[2]
            ref[(0, 3, 0, 1)]=(-0.596509224638-0.425753057991j)-((-0.0367907641128-0.298280604796j))*(o-1.)
            arg[(0, 3, 1, 0)]=(-0.987158560718-0.293324531506j)*x[0]**o + ((-0.857377021485-0.258826573909j))*x[0] + ((0.600248214076+0.357141156861j))*x[1]**o + ((0.724810109044+0.988667781167j))*x[1] + ((-0.224852208642+0.298914741016j))*x[2]**o + ((0.77140795576+0.816289990736j))*x[2]
            ref[(0, 3, 1, 0)]=(0.0135392440172+0.954431282182j)-((-0.101960425881+0.0604552277284j))*(o-1.)
            arg[(0, 3, 1, 1)]=(-0.645449186663+0.254644681701j)*x[0]**o + ((0.138980353649-0.55707034584j))*x[0] + ((-0.950948883108-0.210908561258j))*x[1]**o + ((-0.499478970363-0.644049618354j))*x[1] + ((-0.598859865336-0.23329341135j))*x[2]**o + ((-0.539771797434+0.528800112454j))*x[2]
            ref[(0, 3, 1, 1)]=(-1.54776417463-0.430938571323j)-((-0.365876322518-0.0315928818179j))*(o-1.)
            arg[(0, 3, 2, 0)]=(-0.297956722542+0.336238835616j)*x[0]**o + ((-0.928185863293-0.912235558298j))*x[0] + ((-0.537376913916-0.517801968511j))*x[1]**o + ((-0.767802540455+0.106789012602j))*x[1] + ((-0.337338784347+0.473725249508j))*x[2]**o + ((0.257893948965+0.662157596779j))*x[2]
            ref[(0, 3, 2, 0)]=(-1.30538343779+0.0744365838474j)-((-0.195445403468+0.0486936861021j))*(o-1.)
            arg[(0, 3, 2, 1)]=(-0.918011816397-0.523449031078j)*x[0]**o + ((-0.504941324369-0.887533029165j))*x[0] + ((-0.162747231164+0.672328372534j))*x[1]**o + ((-0.974777098409+0.00382609486369j))*x[1] + ((0.287432805804+0.986315787291j))*x[2]**o + ((0.270662976709-0.466473162152j))*x[2]
            ref[(0, 3, 2, 1)]=(-1.00119084391-0.107492483853j)-((-0.132221040293+0.189199188124j))*(o-1.)
            arg[(0, 3, 3, 0)]=(-0.204577660548-0.570615931973j)*x[0]**o + ((0.364288668769-0.175047755759j))*x[0] + ((0.104920582725+0.532473777527j))*x[1]**o + ((-0.493834382662+0.00106997063389j))*x[1] + ((0.217469064109+0.280306292556j))*x[2]**o + ((0.954080431681-0.403768479857j))*x[2]
            ref[(0, 3, 3, 0)]=(0.471173352037-0.167791063436j)-((0.0196353310476+0.0403606896851j))*(o-1.)
            arg[(0, 3, 3, 1)]=(-0.620072614585+0.402704561295j)*x[0]**o + ((0.701765403518+0.704070809243j))*x[0] + ((0.236634024753+0.279554752095j))*x[1]**o + ((-0.423344137427-0.545928132119j))*x[1] + ((-0.725105508183+0.66162306437j))*x[2]**o + ((-0.0555046510507-0.0802035686934j))*x[2]
            ref[(0, 3, 3, 1)]=(-0.442813741487+0.710910743095j)-((-0.184757349669+0.223980396293j))*(o-1.)
            arg[(1, 0, 0, 0)]=(-0.966244294963-0.975411006614j)*x[0]**o + ((0.921283274973-0.74736231003j))*x[0] + ((-0.505211595413-0.378706324363j))*x[1]**o + ((-0.555323066679+0.789640397808j))*x[1] + ((-0.57971695869-0.476905919364j))*x[2]**o + ((0.807481088214+0.160323099139j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.438865776279-0.814211031712j)-((-0.341862141511-0.305170541723j))*(o-1.)
            arg[(1, 0, 0, 1)]=(-0.207355422251+0.766475964764j)*x[0]**o + ((-0.0510413904543+0.19685177678j))*x[0] + ((0.644603592465-0.501874907522j))*x[1]**o + ((0.604046779105+0.403644574468j))*x[1] + ((-0.315847556692+0.370811988952j))*x[2]**o + ((-0.751076166729-0.976378969956j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.0383350822783+0.129765213743j)-((0.0202334355869+0.105902174366j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.449692271525+0.866975804539j)*x[0]**o + ((-0.526369245617-0.190492197858j))*x[0] + ((0.745178223983+0.40315198831j))*x[1]**o + ((-0.940956676707+0.761792889847j))*x[1] + ((-0.41602323192+0.954634987685j))*x[2]**o + ((-0.830260474208-0.146981741318j))*x[2]
            ref[(1, 0, 1, 0)]=(-1.209061838+1.3245408656j)-((-0.0200895465771+0.370793796756j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.0268943007488-0.0938091735358j)*x[0]**o + ((0.987899729098+0.935198964273j))*x[0] + ((0.415169684396+0.389901300152j))*x[1]**o + ((-0.541209732306+0.918821003977j))*x[1] + ((0.911203250166+0.307398632653j))*x[2]**o + ((-0.160533856153+0.718848850683j))*x[2]
            ref[(1, 0, 1, 1)]=(0.792817387226+1.5881797891j)-((0.216579772302+0.100581793211j))*(o-1.)
            arg[(1, 0, 2, 0)]=(-0.120234598514-0.55455907723j)*x[0]**o + ((0.897569284661+0.00231708278326j))*x[0] + ((-0.353890513772-0.282763624251j))*x[1]**o + ((-0.849171704069-0.775386690122j))*x[1] + ((0.290210931143+0.807331253376j))*x[2]**o + ((-0.567694757314-0.89615134035j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.351605678933-0.849606197897j)-((-0.0306523635238-0.00499857468416j))*(o-1.)
            arg[(1, 0, 2, 1)]=(0.820321262987-0.41787365701j)*x[0]**o + ((-0.6974244683-0.463573409838j))*x[0] + ((-0.525632922464+0.847406751608j))*x[1]**o + ((-0.837095009735-0.144106998136j))*x[1] + ((-0.751214039094-0.784671292133j))*x[2]**o + ((-0.427866064927-0.360368171968j))*x[2]
            ref[(1, 0, 2, 1)]=(-1.20945562077-0.661593388738j)-((-0.0760876164286-0.059189699589j))*(o-1.)
            arg[(1, 0, 3, 0)]=(0.311595692071+0.186044604373j)*x[0]**o + ((0.000677053302462-0.8831742348j))*x[0] + ((0.230089331842+0.000261428232845j))*x[1]**o + ((0.0120647364999+0.727360091268j))*x[1] + ((-0.425833931813-0.718953861196j))*x[2]**o + ((0.483659338506-0.802091330054j))*x[2]
            ref[(1, 0, 3, 0)]=(0.306126110204-0.745276651088j)-((0.0193085153499-0.0887746380983j))*(o-1.)
            arg[(1, 0, 3, 1)]=(-0.442338453481-0.773249331963j)*x[0]**o + ((0.901309071561-0.965097487017j))*x[0] + ((0.069271036931-0.533575329663j))*x[1]**o + ((-0.158075705963-0.450347837744j))*x[1] + ((0.0893874951516+0.215475534761j))*x[2]**o + ((0.690378936108+0.232409432775j))*x[2]
            ref[(1, 0, 3, 1)]=(0.574966190154-1.13719250943j)-((-0.0472799868998-0.181891521144j))*(o-1.)
            arg[(1, 1, 0, 0)]=(-0.732634904669-0.519976877992j)*x[0]**o + ((0.15757233544+0.932784185353j))*x[0] + ((-0.329652762688-0.0890744731849j))*x[1]**o + ((-0.297337226692+0.645398766448j))*x[1] + ((-0.438407127049+0.75498802507j))*x[2]**o + ((-0.992340971722+0.0806205016565j))*x[2]
            ref[(1, 1, 0, 0)]=(-1.31640032869+0.902370063675j)-((-0.250115799068+0.024322778982j))*(o-1.)
            arg[(1, 1, 0, 1)]=(-0.147286816383-0.212400422107j)*x[0]**o + ((-0.280071505658-0.0986634680021j))*x[0] + ((-0.0751782087721+0.261053003457j))*x[1]**o + ((-0.462534928138+0.477737021906j))*x[1] + ((-0.111377712285-0.265535991281j))*x[2]**o + ((0.605920650281+0.021261234507j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.235264260477+0.0917256892403j)-((-0.05564045624-0.0361472349884j))*(o-1.)
            arg[(1, 1, 1, 0)]=(0.314448852714+0.668620068263j)*x[0]**o + ((0.199055468003+0.00953837138313j))*x[0] + ((-0.357944521351-0.00256432337885j))*x[1]**o + ((0.490460261731+0.778563733618j))*x[1] + ((0.842356560852+0.26997594248j))*x[2]**o + ((0.112707781286-0.722572822059j))*x[2]
            ref[(1, 1, 1, 0)]=(0.800542201617+0.500780485154j)-((0.133143482036+0.156005281227j))*(o-1.)
            arg[(1, 1, 1, 1)]=(-0.428782612899-0.428360481743j)*x[0]**o + ((0.0512690367602-0.796546073182j))*x[0] + ((0.0552250658039+0.447553112651j))*x[1]**o + ((0.548806527638-0.510366746896j))*x[1] + ((0.410781860162-0.162929371946j))*x[2]**o + ((-0.425692998507-0.849092739255j))*x[2]
            ref[(1, 1, 1, 1)]=(0.105803439479-1.14987115019j)-((0.00620405217784-0.0239561235065j))*(o-1.)
            arg[(1, 1, 2, 0)]=(0.87323623447-0.427149720624j)*x[0]**o + ((-0.14179101495+0.172665931804j))*x[0] + ((0.0711947517836+0.187050828545j))*x[1]**o + ((0.792672873568+0.493051383533j))*x[1] + ((-0.53672501421+0.00570926910459j))*x[2]**o + ((-0.112032534837-0.663706331539j))*x[2]
            ref[(1, 1, 2, 0)]=(0.473277647913-0.116189319588j)-((0.0679509953406-0.0390649371623j))*(o-1.)
            arg[(1, 1, 2, 1)]=(-0.0775232988128-0.795802337654j)*x[0]**o + ((-0.85707824205-0.546487917059j))*x[0] + ((0.145235866083-0.439372231458j))*x[1]**o + ((0.471001744842+0.37272586152j))*x[1] + ((0.702097721424+0.921257986171j))*x[2]**o + ((0.123536265043-0.619128363749j))*x[2]
            ref[(1, 1, 2, 1)]=(0.253635028265-0.553403501114j)-((0.128301714782-0.0523194304901j))*(o-1.)
            arg[(1, 1, 3, 0)]=(0.914568727891+0.893987136303j)*x[0]**o + ((0.0948071613547-0.12313741106j))*x[0] + ((0.62651148299+0.275254403873j))*x[1]**o + ((-0.095503853271+0.243493684221j))*x[1] + ((-0.879771828496+0.177340611624j))*x[2]**o + ((0.566352485141+0.232316417753j))*x[2]
            ref[(1, 1, 3, 0)]=(0.613482087805+0.849627421357j)-((0.110218063731+0.224430358633j))*(o-1.)
            arg[(1, 1, 3, 1)]=(-0.8341930322+0.833365356254j)*x[0]**o + ((-0.352705118162-0.892729334619j))*x[0] + ((-0.121450238896-0.996088050984j))*x[1]**o + ((0.693601404465-0.974010796513j))*x[1] + ((0.0988872804515+0.115207179137j))*x[2]**o + ((0.30221568909-0.951212548539j))*x[2]
            ref[(1, 1, 3, 1)]=(-0.106822007626-1.43273409763j)-((-0.142792665108-0.00791925259878j))*(o-1.)
            arg[(1, 2, 0, 0)]=(0.89919788791-0.28160031226j)*x[0]**o + ((-0.821470494283+0.512119259493j))*x[0] + ((0.818117563989-0.700154092031j))*x[1]**o + ((0.776512374083-0.703454790572j))*x[1] + ((0.48726395614+0.48466891699j))*x[2]**o + ((0.771970969045-0.1124318793j))*x[2]
            ref[(1, 2, 0, 0)]=(1.46579612844-0.40042644884j)-((0.36742990134-0.0828475812169j))*(o-1.)
            arg[(1, 2, 0, 1)]=(-0.182745443847+0.578231073083j)*x[0]**o + ((-0.518070812422-0.913038429551j))*x[0] + ((-0.138384043654-0.0108485964293j))*x[1]**o + ((-0.830886402288+0.895477727502j))*x[1] + ((-0.88559403143+0.845610144061j))*x[2]**o + ((-0.0788732203315+0.0397724354838j))*x[2]
            ref[(1, 2, 0, 1)]=(-1.31727697699+0.717602177075j)-((-0.201120586489+0.235498770119j))*(o-1.)
            arg[(1, 2, 1, 0)]=(-0.110990157779+0.149043452115j)*x[0]**o + ((0.570043005761+0.595221927763j))*x[0] + ((-0.988449749448+0.570543937627j))*x[1]**o + ((-0.0535843389185+0.725212365063j))*x[1] + ((0.245288999931-0.346321101081j))*x[2]**o + ((0.538638045711-0.966311247104j))*x[2]
            ref[(1, 2, 1, 0)]=(0.100472902629+0.363694667192j)-((-0.142358484549+0.0622110481102j))*(o-1.)
            arg[(1, 2, 1, 1)]=(-0.296903530535+0.695908580936j)*x[0]**o + ((0.94349162789+0.0657857983499j))*x[0] + ((-0.440099652044-0.496118040877j))*x[1]**o + ((-0.251050202413+0.160113290991j))*x[1] + ((0.210943974437+0.356076944623j))*x[2]**o + ((0.414526443536-0.863827118499j))*x[2]
            ref[(1, 2, 1, 1)]=(0.290454330436-0.0410302722376j)-((-0.0876765346903+0.0926445807804j))*(o-1.)
            arg[(1, 2, 2, 0)]=(-0.165700662403+0.0450219430936j)*x[0]**o + ((-0.252208418089+0.560300203717j))*x[0] + ((0.297054236546+0.169252054819j))*x[1]**o + ((-0.609506081302+0.376797456985j))*x[1] + ((-0.25846301189+0.403405151104j))*x[2]**o + ((0.867812444068-0.800926738112j))*x[2]
            ref[(1, 2, 2, 0)]=(-0.0605057465351+0.376925035803j)-((-0.0211849062912+0.102946524836j))*(o-1.)
            arg[(1, 2, 2, 1)]=(-0.542443106155-0.742224843878j)*x[0]**o + ((0.287308387984+0.650534419937j))*x[0] + ((-0.189018073922-0.998328866371j))*x[1]**o + ((0.864613795341+0.417306837939j))*x[1] + ((-0.805085358028-0.666757330351j))*x[2]**o + ((-0.215664909188-0.616751364065j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.300144631984-0.978110573394j)-((-0.256091089684-0.401218506766j))*(o-1.)
            arg[(1, 2, 3, 0)]=(0.789903144243+0.998320420651j)*x[0]**o + ((-0.857425524188+0.00835271850266j))*x[0] + ((-0.573743744186+0.825063933525j))*x[1]**o + ((0.742579679464-0.866997291349j))*x[1] + ((0.293220242094-0.474562062797j))*x[2]**o + ((0.524885113902-0.588961465805j))*x[2]
            ref[(1, 2, 3, 0)]=(0.459709455665-0.0493918736364j)-((0.0848966070252+0.22480371523j))*(o-1.)
            arg[(1, 2, 3, 1)]=(0.324671252293+0.304948244875j)*x[0]**o + ((-0.908306895392+0.191201011719j))*x[0] + ((0.0288329672048-0.664630797543j))*x[1]**o + ((0.550278186078-0.0165281930712j))*x[1] + ((0.40040296146-0.176753969196j))*x[2]**o + ((-0.79942459585-0.501102237106j))*x[2]
            ref[(1, 2, 3, 1)]=(-0.201773062103-0.431432970161j)-((0.125651196826-0.0894060869774j))*(o-1.)
            arg[(1, 3, 0, 0)]=(0.562135521861-0.581091423045j)*x[0]**o + ((0.889693010036-0.707354097661j))*x[0] + ((0.326619890654+0.724209229983j))*x[1]**o + ((-0.285577886925+0.018939771334j))*x[1] + ((0.208230725449+0.788481057967j))*x[2]**o + ((-0.14399531906-0.0901823212926j))*x[2]
            ref[(1, 3, 0, 0)]=(0.778552971007+0.0765011086431j)-((0.182831022994+0.155266477484j))*(o-1.)
            arg[(1, 3, 0, 1)]=(-0.827741752699+0.860616090876j)*x[0]**o + ((0.265457807355+0.217355407902j))*x[0] + ((0.225014111589+0.758016200745j))*x[1]**o + ((-0.670838828408+0.548373212501j))*x[1] + ((-0.0759343826957+0.974707971087j))*x[2]**o + ((-0.828995635765+0.668020278638j))*x[2]
            ref[(1, 3, 0, 1)]=(-0.956519340312+2.01354458087j)-((-0.113110337301+0.432223377118j))*(o-1.)
            arg[(1, 3, 1, 0)]=(-0.817737566412+0.689364857671j)*x[0]**o + ((0.285450305239-0.659049415542j))*x[0] + ((-0.300418586354+0.518759081067j))*x[1]**o + ((-0.352793947306-0.111824076924j))*x[1] + ((-0.7094174662-0.322725002349j))*x[2]**o + ((-0.349722389733-0.959267563106j))*x[2]
            ref[(1, 3, 1, 0)]=(-1.12231982538-0.422371059592j)-((-0.304595603161+0.147566489398j))*(o-1.)
            arg[(1, 3, 1, 1)]=(0.250563905115+0.859161709069j)*x[0]**o + ((-0.674313799118-0.215504222381j))*x[0] + ((-0.297928535368+0.972369584532j))*x[1]**o + ((0.1350516257+0.50555082988j))*x[1] + ((0.139126779576+0.662841295422j))*x[2]**o + ((-0.10852039419+0.240549715181j))*x[2]
            ref[(1, 3, 1, 1)]=(-0.278010209142+1.51248445585j)-((0.0152936915538+0.415728764837j))*(o-1.)
            arg[(1, 3, 2, 0)]=(0.428755551957+0.165105839635j)*x[0]**o + ((-0.492412947699-0.800908935187j))*x[0] + ((0.750823815562-0.941202633175j))*x[1]**o + ((0.22680344876-0.504462385942j))*x[1] + ((0.945018859573-0.756127851886j))*x[2]**o + ((0.410351400714+0.624733816714j))*x[2]
            ref[(1, 3, 2, 0)]=(1.13467006443-1.10643107492j)-((0.354099704515-0.255370774238j))*(o-1.)
            arg[(1, 3, 2, 1)]=(-0.800151092199-0.0910502127959j)*x[0]**o + ((-0.824237541547-0.553968646695j))*x[0] + ((-0.443917465477+0.291618796307j))*x[1]**o + ((0.261439452413+0.719365474248j))*x[1] + ((0.536946520903+0.150124984078j))*x[2]**o + ((0.741378657738+0.582614576906j))*x[2]
            ref[(1, 3, 2, 1)]=(-0.264270734085+0.549352486024j)-((-0.117853672796+0.0584489279315j))*(o-1.)
            arg[(1, 3, 3, 0)]=(-0.902973409471-0.854477613295j)*x[0]**o + ((0.104961647303-0.113737337608j))*x[0] + ((-0.942456699682-0.140346761352j))*x[1]**o + ((0.359396926407+0.842155417953j))*x[1] + ((0.951827289603-0.919926071279j))*x[2]**o + ((0.32203028996-0.42741617193j))*x[2]
            ref[(1, 3, 3, 0)]=(-0.0536069779401-0.806874268756j)-((-0.148933803258-0.319125074321j))*(o-1.)
            arg[(1, 3, 3, 1)]=(0.105530579311+0.610409660155j)*x[0]**o + ((-0.609796305197+0.25724352445j))*x[0] + ((0.266928411223+0.333691047207j))*x[1]**o + ((0.38362181708+0.755873169635j))*x[1] + ((-0.576926872685+0.453580476411j))*x[2]**o + ((-0.176922268185-0.0460497368864j))*x[2]
            ref[(1, 3, 3, 1)]=(-0.303782319227+1.18237407049j)-((-0.0340779803587+0.232946863962j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.47809639955+0.183199572127j)*x[0] + ((-0.250136507414+0.965318831781j))*x[1]
            ref=(0.113979946068+0.574259201954j)
        else:
            arg=(0.269890288506+0.988587096063j)*x[0] + ((-0.312853967641-0.131721030493j))*x[1] + ((0.806938717502-0.469127011716j))*x[2]
            ref=(0.381987519184+0.193869526927j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.374912817226-0.609784130463j)*x[0] + ((0.537066854566-0.0330431755369j))*x[1]
            ref[(0,)]=(0.0810770186699-0.321413653j)
            arg[(1,)]=(0.52806933078-0.144452326987j)*x[0] + ((-0.830047324655-0.923078331848j))*x[1]
            ref[(1,)]=(-0.150988996937-0.533765329417j)
            arg[(2,)]=(-0.453536014958+0.854205756859j)*x[0] + ((0.480595099909+0.888257312302j))*x[1]
            ref[(2,)]=(0.0135295424758+0.87123153458j)
        else:
            arg[(0,)]=(0.612833877359+0.373454744576j)*x[0] + ((0.396976940112-0.104748757369j))*x[1] + ((0.259980189464+0.835588471401j))*x[2]
            ref[(0,)]=(0.634895503468+0.552147229304j)
            arg[(1,)]=(-0.73920500524+0.664345223637j)*x[0] + ((0.638209513716+0.575185112599j))*x[1] + ((-0.207548299675+0.667487256288j))*x[2]
            ref[(1,)]=(-0.154271895599+0.953508796262j)
            arg[(2,)]=(-0.219165695879+0.570321107464j)*x[0] + ((-0.0337327269615+0.154130837419j))*x[1] + ((-0.990994404248-0.223028982596j))*x[2]
            ref[(2,)]=(-0.621946413544+0.250711481144j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.917365948809+0.291406422221j)*x[0] + ((0.0730571909916+0.743325257238j))*x[1]
            ref[(0, 0)]=(0.4952115699+0.51736583973j)
            arg[(0, 1)]=(-0.818494447148-0.729160296561j)*x[0] + ((0.993000516835+0.456448541586j))*x[1]
            ref[(0, 1)]=(0.0872530348437-0.136355877487j)
            arg[(0, 2)]=(0.876798094703-0.576285032622j)*x[0] + ((-0.07448685234-0.286697245646j))*x[1]
            ref[(0, 2)]=(0.401155621181-0.431491139134j)
            arg[(0, 3)]=(0.816410652361-0.787439367398j)*x[0] + ((-0.187384077982+0.63069038916j))*x[1]
            ref[(0, 3)]=(0.31451328719-0.078374489119j)
            arg[(1, 0)]=(0.526288750984-0.257717240817j)*x[0] + ((-0.684913594571-0.482157949397j))*x[1]
            ref[(1, 0)]=(-0.0793124217935-0.369937595107j)
            arg[(1, 1)]=(0.978062736258+0.133010012421j)*x[0] + ((-0.238657826788+0.283995993199j))*x[1]
            ref[(1, 1)]=(0.369702454735+0.20850300281j)
            arg[(1, 2)]=(0.758472866566+0.194607751187j)*x[0] + ((0.468586879599-0.385773592004j))*x[1]
            ref[(1, 2)]=(0.613529873082-0.0955829204084j)
            arg[(1, 3)]=(-0.978761721288+0.35292325251j)*x[0] + ((-0.543495246403-0.210431532589j))*x[1]
            ref[(1, 3)]=(-0.761128483846+0.0712458599606j)
            arg[(2, 0)]=(-0.541175739527-0.739084944249j)*x[0] + ((0.189160024599+0.227485215068j))*x[1]
            ref[(2, 0)]=(-0.176007857464-0.255799864591j)
            arg[(2, 1)]=(-0.359155085915-0.980335627583j)*x[0] + ((-0.633315116712-0.725856743711j))*x[1]
            ref[(2, 1)]=(-0.496235101313-0.853096185647j)
            arg[(2, 2)]=(0.372683734689-0.278291000358j)*x[0] + ((-0.0494417279588-0.0653847892904j))*x[1]
            ref[(2, 2)]=(0.161621003365-0.171837894824j)
            arg[(2, 3)]=(0.695288250571-0.609556986341j)*x[0] + ((0.614620392656-0.658205209271j))*x[1]
            ref[(2, 3)]=(0.654954321613-0.633881097806j)
        else:
            arg[(0, 0)]=(-0.891426872514-0.587926810139j)*x[0] + ((-0.192456008221+0.896092861395j))*x[1] + ((-0.679538480861-0.534836617151j))*x[2]
            ref[(0, 0)]=(-0.881710680798-0.113335282948j)
            arg[(0, 1)]=(-0.297041747227-0.495039627823j)*x[0] + ((-0.544433747154-0.278348348237j))*x[1] + ((-0.618446041422+0.5982378315j))*x[2]
            ref[(0, 1)]=(-0.729960767901-0.0875750722802j)
            arg[(0, 2)]=(-0.339211843573+0.185531520808j)*x[0] + ((-0.785503455436-0.945323432345j))*x[1] + ((-0.267352466648+0.898018980939j))*x[2]
            ref[(0, 2)]=(-0.696033882828+0.0691135347009j)
            arg[(0, 3)]=(-0.0453800747284+0.652417810091j)*x[0] + ((0.212422057052-0.359312339196j))*x[1] + ((-0.630338680373+0.216588069912j))*x[2]
            ref[(0, 3)]=(-0.231648349024+0.254846770404j)
            arg[(1, 0)]=(-0.482614821514+0.044211650196j)*x[0] + ((-0.109014311641-0.855186608453j))*x[1] + ((0.183307790806-0.966066194056j))*x[2]
            ref[(1, 0)]=(-0.204160671174-0.888520576157j)
            arg[(1, 1)]=(-0.694451976764+0.304378197389j)*x[0] + ((0.702539539217-0.980533695687j))*x[1] + ((-0.59363317286-0.644779053401j))*x[2]
            ref[(1, 1)]=(-0.292772805203-0.66046727585j)
            arg[(1, 2)]=(0.801078242944-0.202826814382j)*x[0] + ((0.82401586053-0.30770796068j))*x[1] + ((-0.91539853893+0.690789573725j))*x[2]
            ref[(1, 2)]=(0.354847782272+0.0901273993312j)
            arg[(1, 3)]=(-0.570563811112-0.301772136029j)*x[0] + ((0.990722542331-0.320943100139j))*x[1] + ((0.728078967911+0.923418155448j))*x[2]
            ref[(1, 3)]=(0.574118849565+0.15035145964j)
            arg[(2, 0)]=(-0.077746418305+0.712881433618j)*x[0] + ((0.175381147312+0.514550167302j))*x[1] + ((-0.300530942768-0.024028802557j))*x[2]
            ref[(2, 0)]=(-0.101448106881+0.601701399181j)
            arg[(2, 1)]=(0.0175530852057+0.332650575516j)*x[0] + ((0.014669045161-0.0808454570925j))*x[1] + ((-0.557354507495-0.358127728345j))*x[2]
            ref[(2, 1)]=(-0.262566188564-0.0531613049604j)
            arg[(2, 2)]=(-0.511360591927+0.850596617487j)*x[0] + ((0.362626820691-0.498308663882j))*x[1] + ((0.612575631206-0.787870287578j))*x[2]
            ref[(2, 2)]=(0.231920929985-0.217791166986j)
            arg[(2, 3)]=(-0.900017536529+0.228434876429j)*x[0] + ((-0.551465566079-0.232882508251j))*x[1] + ((-0.756089060389-0.36195250345j))*x[2]
            ref[(2, 3)]=(-1.1037860815-0.183200067636j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref=numpy.zeros((4, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.874376503307+0.802470384299j)*x[0] + ((0.724647989123-0.850715589127j))*x[1]
            ref[(0, 0, 0)]=(-0.0748642570919-0.0241226024139j)
            arg[(0, 0, 1)]=(0.75779166808+0.580240241215j)*x[0] + ((0.645782019991-0.297563015771j))*x[1]
            ref[(0, 0, 1)]=(0.701786844036+0.141338612722j)
            arg[(0, 0, 2)]=(-0.731488289502+0.87592178286j)*x[0] + ((-0.962739632451+0.119526994773j))*x[1]
            ref[(0, 0, 2)]=(-0.847113960977+0.497724388817j)
            arg[(0, 0, 3)]=(0.715286282042+0.52428813702j)*x[0] + ((0.432076722818-0.409400341135j))*x[1]
            ref[(0, 0, 3)]=(0.57368150243+0.0574438979427j)
            arg[(0, 1, 0)]=(-0.669488958885+0.28721937095j)*x[0] + ((0.418199464475+0.0111980205183j))*x[1]
            ref[(0, 1, 0)]=(-0.125644747205+0.149208695734j)
            arg[(0, 1, 1)]=(0.620627339028+0.857967127712j)*x[0] + ((-0.221541425752+0.855781992867j))*x[1]
            ref[(0, 1, 1)]=(0.199542956638+0.85687456029j)
            arg[(0, 1, 2)]=(0.840677687426+0.247762842194j)*x[0] + ((-0.908025600875+0.585349586925j))*x[1]
            ref[(0, 1, 2)]=(-0.0336739567244+0.416556214559j)
            arg[(0, 1, 3)]=(0.768980952294-0.304671101527j)*x[0] + ((-0.855944015774-0.506536935574j))*x[1]
            ref[(0, 1, 3)]=(-0.04348153174-0.40560401855j)
            arg[(1, 0, 0)]=(0.855896744936-0.952732324132j)*x[0] + ((0.674186322606-0.832380122335j))*x[1]
            ref[(1, 0, 0)]=(0.765041533771-0.892556223233j)
            arg[(1, 0, 1)]=(0.251657425067-0.972739058923j)*x[0] + ((0.00601679552795+0.113780722326j))*x[1]
            ref[(1, 0, 1)]=(0.128837110298-0.429479168299j)
            arg[(1, 0, 2)]=(-0.364747308335-0.950906129394j)*x[0] + ((0.838697726954+0.217020357444j))*x[1]
            ref[(1, 0, 2)]=(0.236975209309-0.366942885975j)
            arg[(1, 0, 3)]=(-0.103535701163+0.823620776051j)*x[0] + ((-0.23021023525-0.161169737178j))*x[1]
            ref[(1, 0, 3)]=(-0.166872968206+0.331225519437j)
            arg[(1, 1, 0)]=(-0.0484016896677+0.392333515031j)*x[0] + ((0.350724974643-0.719247587321j))*x[1]
            ref[(1, 1, 0)]=(0.151161642488-0.163457036145j)
            arg[(1, 1, 1)]=(0.352919106345+0.228142748324j)*x[0] + ((0.983328868866+0.173318276201j))*x[1]
            ref[(1, 1, 1)]=(0.668123987606+0.200730512263j)
            arg[(1, 1, 2)]=(0.220598943546-0.990119818476j)*x[0] + ((0.131743140307+0.128823117676j))*x[1]
            ref[(1, 1, 2)]=(0.176171041927-0.4306483504j)
            arg[(1, 1, 3)]=(0.858932744496+0.660780366909j)*x[0] + ((0.660885471783+0.92296805634j))*x[1]
            ref[(1, 1, 3)]=(0.759909108139+0.791874211624j)
            arg[(2, 0, 0)]=(0.238459293126+0.41849397556j)*x[0] + ((0.280441188781-0.869850989357j))*x[1]
            ref[(2, 0, 0)]=(0.259450240954-0.225678506898j)
            arg[(2, 0, 1)]=(-0.95417979973-0.181563797561j)*x[0] + ((-0.405803708134-0.0309706979719j))*x[1]
            ref[(2, 0, 1)]=(-0.679991753932-0.106267247767j)
            arg[(2, 0, 2)]=(-0.401130491346-0.309305353062j)*x[0] + ((-0.015879838469-0.770915287736j))*x[1]
            ref[(2, 0, 2)]=(-0.208505164907-0.540110320399j)
            arg[(2, 0, 3)]=(-0.976561643901-0.812847443363j)*x[0] + ((0.0845322669126+0.461198627018j))*x[1]
            ref[(2, 0, 3)]=(-0.446014688494-0.175824408172j)
            arg[(2, 1, 0)]=(0.134482251388+0.632695357024j)*x[0] + ((-0.719114797702+0.560538521588j))*x[1]
            ref[(2, 1, 0)]=(-0.292316273157+0.596616939306j)
            arg[(2, 1, 1)]=(-0.292550120238-0.708342488826j)*x[0] + ((-0.475654395449-0.675444072489j))*x[1]
            ref[(2, 1, 1)]=(-0.384102257844-0.691893280658j)
            arg[(2, 1, 2)]=(0.598879392558-0.483583872873j)*x[0] + ((0.970894361586+0.0178982889405j))*x[1]
            ref[(2, 1, 2)]=(0.784886877072-0.232842791966j)
            arg[(2, 1, 3)]=(-0.464214223639-0.177082222316j)*x[0] + ((-0.89584455568+0.702528260865j))*x[1]
            ref[(2, 1, 3)]=(-0.680029389659+0.262723019274j)
            arg[(3, 0, 0)]=(-0.572919046743-0.468384488651j)*x[0] + ((0.738057007468+0.364598622025j))*x[1]
            ref[(3, 0, 0)]=(0.0825689803622-0.0518929333132j)
            arg[(3, 0, 1)]=(0.502263792212+0.563500546332j)*x[0] + ((-0.25340274461-0.194862240382j))*x[1]
            ref[(3, 0, 1)]=(0.124430523801+0.184319152975j)
            arg[(3, 0, 2)]=(-0.95360040984+0.0278846644295j)*x[0] + ((-0.0512134037523+0.702023908904j))*x[1]
            ref[(3, 0, 2)]=(-0.502406906796+0.364954286667j)
            arg[(3, 0, 3)]=(-0.444424350534-0.307473732509j)*x[0] + ((-0.0662006480832-0.599656842543j))*x[1]
            ref[(3, 0, 3)]=(-0.255312499308-0.453565287526j)
            arg[(3, 1, 0)]=(0.282763107093+0.957510794033j)*x[0] + ((0.774818923345+0.0729543475303j))*x[1]
            ref[(3, 1, 0)]=(0.528791015219+0.515232570782j)
            arg[(3, 1, 1)]=(0.434852665618+0.495466462612j)*x[0] + ((0.104795496821-0.583879980065j))*x[1]
            ref[(3, 1, 1)]=(0.269824081219-0.0442067587264j)
            arg[(3, 1, 2)]=(0.258807310417+0.425867972729j)*x[0] + ((0.290703253128-0.980393613045j))*x[1]
            ref[(3, 1, 2)]=(0.274755281773-0.277262820158j)
            arg[(3, 1, 3)]=(0.781081290415-0.748885669447j)*x[0] + ((-0.655826768304-0.1287875948j))*x[1]
            ref[(3, 1, 3)]=(0.0626272610553-0.438836632123j)
        else:
            arg[(0, 0, 0)]=(-0.573433246861+0.0294236552004j)*x[0] + ((-0.252038265157+0.935689339955j))*x[1] + ((-0.307414598128+0.186431994002j))*x[2]
            ref[(0, 0, 0)]=(-0.566443055073+0.575772494579j)
            arg[(0, 0, 1)]=(-0.796061051705+0.359363891502j)*x[0] + ((-0.0823385174398-0.403632385289j))*x[1] + ((-0.823348760996+0.897490244203j))*x[2]
            ref[(0, 0, 1)]=(-0.85087416507+0.426610875208j)
            arg[(0, 0, 2)]=(0.937007493001-0.867435886338j)*x[0] + ((-0.0745964634919-0.0821840217539j))*x[1] + ((0.248877762196-0.521452795111j))*x[2]
            ref[(0, 0, 2)]=(0.555644395852-0.735536351601j)
            arg[(0, 0, 3)]=(-0.499167320472+0.958105441674j)*x[0] + ((0.0739111518137+0.160720252762j))*x[1] + ((-0.542164405964-0.0489107153471j))*x[2]
            ref[(0, 0, 3)]=(-0.483710287311+0.534957489544j)
            arg[(0, 1, 0)]=(0.0239094597021-0.740226490306j)*x[0] + ((0.938177325774+0.24784517691j))*x[1] + ((-0.114198529872-0.129803607443j))*x[2]
            ref[(0, 1, 0)]=(0.423944127802-0.311092460419j)
            arg[(0, 1, 1)]=(-0.949967778364-0.60954109481j)*x[0] + ((0.203132457939+0.723532220326j))*x[1] + ((-0.828227391632-0.555428027828j))*x[2]
            ref[(0, 1, 1)]=(-0.787531356028-0.220718451157j)
            arg[(0, 1, 2)]=(0.456628556362+0.961980734652j)*x[0] + ((-0.768758159449+0.715365661203j))*x[1] + ((-0.850103499742+0.362642189642j))*x[2]
            ref[(0, 1, 2)]=(-0.581116551414+1.01999429275j)
            arg[(0, 1, 3)]=(-0.698298427729+0.53417594215j)*x[0] + ((0.644862226388-0.355191530375j))*x[1] + ((-0.299211879476-0.46471013495j))*x[2]
            ref[(0, 1, 3)]=(-0.176324040409-0.142862861587j)
            arg[(1, 0, 0)]=(-0.249777834568-0.543987119547j)*x[0] + ((-0.887806485402+0.752555717508j))*x[1] + ((-0.630858220212+0.208485683913j))*x[2]
            ref[(1, 0, 0)]=(-0.884221270091+0.208527140937j)
            arg[(1, 0, 1)]=(-0.880802792761-0.291796173425j)*x[0] + ((0.828209127446+0.073266668044j))*x[1] + ((-0.959944855265+0.152142612925j))*x[2]
            ref[(1, 0, 1)]=(-0.506269260289-0.0331934462282j)
            arg[(1, 0, 2)]=(0.334007026282-0.370141535629j)*x[0] + ((0.269887120652+0.415007979357j))*x[1] + ((-0.22478331861+0.722144018356j))*x[2]
            ref[(1, 0, 2)]=(0.189555414162+0.383505231042j)
            arg[(1, 0, 3)]=(-0.0648378994295+0.00393738176447j)*x[0] + ((-0.185047073269-0.887564514435j))*x[1] + ((0.825747870229-0.0856441921408j))*x[2]
            ref[(1, 0, 3)]=(0.287931448765-0.484635662406j)
            arg[(1, 1, 0)]=(-0.876020891241+0.445130634699j)*x[0] + ((-0.204059463125-0.129732309983j))*x[1] + ((0.431581872151+0.585626331583j))*x[2]
            ref[(1, 1, 0)]=(-0.324249241107+0.45051232815j)
            arg[(1, 1, 1)]=(0.044178760902-0.133776788943j)*x[0] + ((0.181995344209-0.361122202254j))*x[1] + ((0.0339906178328-0.28536654311j))*x[2]
            ref[(1, 1, 1)]=(0.130082361472-0.390132767153j)
            arg[(1, 1, 2)]=(0.267899654628-0.57701426588j)*x[0] + ((0.761053538404-0.111408486404j))*x[1] + ((0.35764380678-0.061397868986j))*x[2]
            ref[(1, 1, 2)]=(0.693298499906-0.374910310635j)
            arg[(1, 1, 3)]=(0.360568924278-0.105656727798j)*x[0] + ((-0.181361457823-0.00740440481005j))*x[1] + ((-0.841512210811+0.487000690018j))*x[2]
            ref[(1, 1, 3)]=(-0.331152372178+0.186969778705j)
            arg[(2, 0, 0)]=(0.0553984655993+0.0659213327096j)*x[0] + ((-0.863691086318-0.227189589679j))*x[1] + ((0.165832030909+0.987311999025j))*x[2]
            ref[(2, 0, 0)]=(-0.321230294905+0.413021871028j)
            arg[(2, 0, 1)]=(0.559828821449+0.184044421483j)*x[0] + ((0.81151970521-0.803053427418j))*x[1] + ((0.0965743322869-0.0487570553671j))*x[2]
            ref[(2, 0, 1)]=(0.733961429473-0.333883030651j)
            arg[(2, 0, 2)]=(-0.334829461292+0.552023094241j)*x[0] + ((-0.135829409462-0.67896744119j))*x[1] + ((-0.350506531037-0.34270151793j))*x[2]
            ref[(2, 0, 2)]=(-0.410582700896-0.23482293244j)
            arg[(2, 0, 3)]=(-0.0175511646734+0.583166087333j)*x[0] + ((-0.294952692253+0.740391269553j))*x[1] + ((-0.0110082487503+0.12140212298j))*x[2]
            ref[(2, 0, 3)]=(-0.161756052839+0.722479739933j)
            arg[(2, 1, 0)]=(0.692558715464-0.484693600141j)*x[0] + ((-0.970337322397+0.166420397527j))*x[1] + ((-0.817064143419-0.788802132448j))*x[2]
            ref[(2, 1, 0)]=(-0.547421375176-0.553537667531j)
            arg[(2, 1, 1)]=(-0.0591482876425+0.406334831083j)*x[0] + ((-0.618872129571-0.367470133662j))*x[1] + ((0.370555152467-0.710288198647j))*x[2]
            ref[(2, 1, 1)]=(-0.153732632373-0.335711750614j)
            arg[(2, 1, 2)]=(0.510121521294-0.244160094524j)*x[0] + ((0.622263953089-0.867713094557j))*x[1] + ((0.289048678992-0.266717454395j))*x[2]
            ref[(2, 1, 2)]=(0.710717076687-0.689295321738j)
            arg[(2, 1, 3)]=(0.177103901509-0.195630571364j)*x[0] + ((0.261581249653-0.471113316015j))*x[1] + ((0.51855049736+0.238408983109j))*x[2]
            ref[(2, 1, 3)]=(0.478617824261-0.214167452135j)
            arg[(3, 0, 0)]=(0.940088565011-0.838346919153j)*x[0] + ((-0.653009021288-0.215893890639j))*x[1] + ((0.685601434536+0.890090406926j))*x[2]
            ref[(3, 0, 0)]=(0.48634048913-0.0820752014332j)
            arg[(3, 0, 1)]=(-0.880687979867+0.320513882876j)*x[0] + ((0.232810382734+0.112586539379j))*x[1] + ((0.0845558231884+0.640597248625j))*x[2]
            ref[(3, 0, 1)]=(-0.281660886972+0.53684883544j)
            arg[(3, 0, 2)]=(0.99818462046+0.982450174237j)*x[0] + ((0.36432433361-0.606471720965j))*x[1] + ((-0.255169913236-0.111403681717j))*x[2]
            ref[(3, 0, 2)]=(0.553669520417+0.132287385777j)
            arg[(3, 0, 3)]=(0.964503258659-0.592792675383j)*x[0] + ((0.651266378803+0.634093219123j))*x[1] + ((-0.540874038621-0.664220579334j))*x[2]
            ref[(3, 0, 3)]=(0.53744779942-0.311460017796j)
            arg[(3, 1, 0)]=(-0.653387488533+0.864141665506j)*x[0] + ((-0.531529558374-0.140612916729j))*x[1] + ((-0.524744724798+0.935430623828j))*x[2]
            ref[(3, 1, 0)]=(-0.854830885853+0.829479686302j)
            arg[(3, 1, 1)]=(0.659772909202-0.853532310511j)*x[0] + ((-0.0565860068351+0.904239785981j))*x[1] + ((-0.816124869447+0.890934521234j))*x[2]
            ref[(3, 1, 1)]=(-0.10646898354+0.470820998353j)
            arg[(3, 1, 2)]=(-0.818902626288-0.316182856524j)*x[0] + ((-0.823343364583-0.098554487781j))*x[1] + ((-0.672581102766+0.0110395176183j))*x[2]
            ref[(3, 1, 2)]=(-1.15741354682-0.201848913343j)
            arg[(3, 1, 3)]=(-0.555875989923+0.56811374179j)*x[0] + ((-0.788577998445-0.705129633255j))*x[1] + ((0.608980994226-0.560257470402j))*x[2]
            ref[(3, 1, 3)]=(-0.367736497071-0.348636680934j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4, 2),w)
        ref=numpy.zeros((2, 4, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.190398670262-0.878046464743j)*x[0] + ((0.603310171679+0.177380232184j))*x[1]
            ref[(0, 0, 0, 0)]=(0.396854420971-0.35033311628j)
            arg[(0, 0, 0, 1)]=(-0.75423896089-0.431849142902j)*x[0] + ((-0.68202226916-0.975530518013j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.718130615025-0.703689830458j)
            arg[(0, 0, 1, 0)]=(-0.726007693614-0.401156624409j)*x[0] + ((0.861199797863-0.624107817094j))*x[1]
            ref[(0, 0, 1, 0)]=(0.0675960521241-0.512632220751j)
            arg[(0, 0, 1, 1)]=(0.447233555836-0.589138695969j)*x[0] + ((-0.434864110963-0.773609454408j))*x[1]
            ref[(0, 0, 1, 1)]=(0.00618472243671-0.681374075189j)
            arg[(0, 0, 2, 0)]=(-0.997877968023-0.544835318782j)*x[0] + ((-0.519543486512+0.686671672307j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.758710727267+0.0709181767621j)
            arg[(0, 0, 2, 1)]=(-0.26694528296-0.349863850903j)*x[0] + ((-0.204963506147-0.618133318451j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.235954394553-0.483998584677j)
            arg[(0, 0, 3, 0)]=(0.701936732415-0.270357009383j)*x[0] + ((0.832370957115-0.710147692903j))*x[1]
            ref[(0, 0, 3, 0)]=(0.767153844765-0.490252351143j)
            arg[(0, 0, 3, 1)]=(0.323782990155-0.583842941249j)*x[0] + ((-0.697777381392-0.542066129549j))*x[1]
            ref[(0, 0, 3, 1)]=(-0.186997195618-0.562954535399j)
            arg[(0, 1, 0, 0)]=(-0.915251728781+0.904094245094j)*x[0] + ((-0.24386377229+0.271582064589j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.579557750535+0.587838154841j)
            arg[(0, 1, 0, 1)]=(-0.850274006717+0.750601043425j)*x[0] + ((-0.549316133635+0.425007780958j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.699795070176+0.587804412192j)
            arg[(0, 1, 1, 0)]=(0.382983812028-0.958961499511j)*x[0] + ((0.873937772223+0.344998884631j))*x[1]
            ref[(0, 1, 1, 0)]=(0.628460792126-0.30698130744j)
            arg[(0, 1, 1, 1)]=(0.350613846639+0.611300093992j)*x[0] + ((-0.264816201704-0.926846399667j))*x[1]
            ref[(0, 1, 1, 1)]=(0.0428988224675-0.157773152838j)
            arg[(0, 1, 2, 0)]=(0.179437385038+0.499586089205j)*x[0] + ((0.72276757284-0.0703423687718j))*x[1]
            ref[(0, 1, 2, 0)]=(0.451102478939+0.214621860217j)
            arg[(0, 1, 2, 1)]=(-0.287265181928-0.567445829335j)*x[0] + ((0.226629153611+0.0277027304622j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.0303180141584-0.269871549436j)
            arg[(0, 1, 3, 0)]=(-0.109313952664+0.324596805509j)*x[0] + ((0.59151656883+0.0783121319822j))*x[1]
            ref[(0, 1, 3, 0)]=(0.241101308083+0.201454468745j)
            arg[(0, 1, 3, 1)]=(-0.203642495423+0.544236419068j)*x[0] + ((0.0194180291539+0.621163746346j))*x[1]
            ref[(0, 1, 3, 1)]=(-0.0921122331345+0.582700082707j)
            arg[(0, 2, 0, 0)]=(0.96702799193-0.517578344687j)*x[0] + ((-0.0213324990425+0.433165775475j))*x[1]
            ref[(0, 2, 0, 0)]=(0.472847746444-0.0422062846057j)
            arg[(0, 2, 0, 1)]=(-0.519106379254-0.108033845064j)*x[0] + ((0.343758712691+0.449062005901j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.0876738332816+0.170514080419j)
            arg[(0, 2, 1, 0)]=(0.276977590904-0.870287966833j)*x[0] + ((0.886804678856-0.805474607326j))*x[1]
            ref[(0, 2, 1, 0)]=(0.58189113488-0.83788128708j)
            arg[(0, 2, 1, 1)]=(0.446813745055-0.97880614869j)*x[0] + ((0.81007366393+0.153505135169j))*x[1]
            ref[(0, 2, 1, 1)]=(0.628443704493-0.412650506761j)
            arg[(0, 2, 2, 0)]=(-0.844069791125+0.221472247278j)*x[0] + ((0.926854411591+0.907752129614j))*x[1]
            ref[(0, 2, 2, 0)]=(0.0413923102334+0.564612188446j)
            arg[(0, 2, 2, 1)]=(0.711735349242-0.888678325902j)*x[0] + ((0.241989613621-0.651537340411j))*x[1]
            ref[(0, 2, 2, 1)]=(0.476862481432-0.770107833157j)
            arg[(0, 2, 3, 0)]=(-0.282194865768-0.915829549935j)*x[0] + ((-0.311246135083+0.721520592651j))*x[1]
            ref[(0, 2, 3, 0)]=(-0.296720500425-0.0971544786424j)
            arg[(0, 2, 3, 1)]=(0.393687191763+0.761964824938j)*x[0] + ((-0.515379302785+0.117807637063j))*x[1]
            ref[(0, 2, 3, 1)]=(-0.0608460555111+0.439886231001j)
            arg[(0, 3, 0, 0)]=(-0.491449388038+0.352585068094j)*x[0] + ((0.636719560032+0.581390836191j))*x[1]
            ref[(0, 3, 0, 0)]=(0.0726350859968+0.466987952142j)
            arg[(0, 3, 0, 1)]=(-0.0717000517334-0.0643158766579j)*x[0] + ((0.932468252064-0.750890248706j))*x[1]
            ref[(0, 3, 0, 1)]=(0.430384100165-0.407603062682j)
            arg[(0, 3, 1, 0)]=(-0.683894717095-0.592507325754j)*x[0] + ((-0.907049537243-0.695748851066j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.795472127169-0.64412808841j)
            arg[(0, 3, 1, 1)]=(-0.675084193485+0.245663949267j)*x[0] + ((0.979222838339-0.0643346442372j))*x[1]
            ref[(0, 3, 1, 1)]=(0.152069322427+0.0906646525149j)
            arg[(0, 3, 2, 0)]=(0.875757799316-0.252748038209j)*x[0] + ((-0.126745308608-0.196635986227j))*x[1]
            ref[(0, 3, 2, 0)]=(0.374506245354-0.224692012218j)
            arg[(0, 3, 2, 1)]=(0.741840167883+0.0524632325329j)*x[0] + ((-0.76182046199+0.222013903909j))*x[1]
            ref[(0, 3, 2, 1)]=(-0.00999014705345+0.137238568221j)
            arg[(0, 3, 3, 0)]=(-0.500888616128-0.49963978121j)*x[0] + ((0.728984726245-0.109396380517j))*x[1]
            ref[(0, 3, 3, 0)]=(0.114048055059-0.304518080864j)
            arg[(0, 3, 3, 1)]=(0.175917777192-0.577983247351j)*x[0] + ((0.603624400349+0.550509104837j))*x[1]
            ref[(0, 3, 3, 1)]=(0.389771088771-0.0137370712571j)
            arg[(1, 0, 0, 0)]=(-0.437967508641-0.926819163398j)*x[0] + ((-0.590065680602+0.838870318446j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.514016594622-0.0439744224761j)
            arg[(1, 0, 0, 1)]=(-0.736617347616-0.414800563479j)*x[0] + ((0.177201815282+0.464757925685j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.279707766167+0.0249786811032j)
            arg[(1, 0, 1, 0)]=(0.739684138033+0.888816501844j)*x[0] + ((-0.372278015313-0.0293074111159j))*x[1]
            ref[(1, 0, 1, 0)]=(0.18370306136+0.429754545364j)
            arg[(1, 0, 1, 1)]=(-0.274415907826+0.804549233541j)*x[0] + ((0.165634298653-0.731504463783j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.0543908045861+0.0365223848792j)
            arg[(1, 0, 2, 0)]=(0.893063856296+0.268526291784j)*x[0] + ((-0.675154522295-0.47993741799j))*x[1]
            ref[(1, 0, 2, 0)]=(0.108954667001-0.105705563103j)
            arg[(1, 0, 2, 1)]=(-0.321673957833-0.129596131771j)*x[0] + ((-0.286898174709-0.428034920434j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.304286066271-0.278815526102j)
            arg[(1, 0, 3, 0)]=(0.889175443474-0.575510160222j)*x[0] + ((0.531190160119+0.62245900086j))*x[1]
            ref[(1, 0, 3, 0)]=(0.710182801796+0.0234744203188j)
            arg[(1, 0, 3, 1)]=(0.713202006857-0.756609957215j)*x[0] + ((0.00355776044819+0.540487326553j))*x[1]
            ref[(1, 0, 3, 1)]=(0.358379883653-0.108061315331j)
            arg[(1, 1, 0, 0)]=(-0.00419869341741+0.952237240326j)*x[0] + ((0.280317342175-0.92997008031j))*x[1]
            ref[(1, 1, 0, 0)]=(0.138059324379+0.0111335800079j)
            arg[(1, 1, 0, 1)]=(0.370336327478-0.710680053824j)*x[0] + ((-0.260825512172+0.975740665432j))*x[1]
            ref[(1, 1, 0, 1)]=(0.054755407653+0.132530305804j)
            arg[(1, 1, 1, 0)]=(0.565748579075-0.0136551514077j)*x[0] + ((0.136238492685+0.699222835876j))*x[1]
            ref[(1, 1, 1, 0)]=(0.35099353588+0.342783842234j)
            arg[(1, 1, 1, 1)]=(0.292662584308-0.903381038494j)*x[0] + ((0.129301207683+0.522107997613j))*x[1]
            ref[(1, 1, 1, 1)]=(0.210981895996-0.190636520441j)
            arg[(1, 1, 2, 0)]=(0.540644953167+0.781660559899j)*x[0] + ((0.0598984634647-0.465744433233j))*x[1]
            ref[(1, 1, 2, 0)]=(0.300271708316+0.157958063333j)
            arg[(1, 1, 2, 1)]=(0.602494377557-0.0297750492727j)*x[0] + ((0.603165189074+0.579830120022j))*x[1]
            ref[(1, 1, 2, 1)]=(0.602829783316+0.275027535375j)
            arg[(1, 1, 3, 0)]=(-0.972238594117+0.985262291978j)*x[0] + ((0.680542470614-0.426886992492j))*x[1]
            ref[(1, 1, 3, 0)]=(-0.145848061751+0.279187649743j)
            arg[(1, 1, 3, 1)]=(-0.45777851701+0.143648852891j)*x[0] + ((-0.348152472101-0.946006590289j))*x[1]
            ref[(1, 1, 3, 1)]=(-0.402965494556-0.401178868699j)
            arg[(1, 2, 0, 0)]=(-0.998365618959+0.30618221986j)*x[0] + ((-0.374796892752-0.956036523902j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.686581255856-0.324927152021j)
            arg[(1, 2, 0, 1)]=(0.560629214643-0.274667853594j)*x[0] + ((0.525437789431-0.105523419309j))*x[1]
            ref[(1, 2, 0, 1)]=(0.543033502037-0.190095636451j)
            arg[(1, 2, 1, 0)]=(-0.514976611071-0.77509230783j)*x[0] + ((0.810767238801+0.671597013309j))*x[1]
            ref[(1, 2, 1, 0)]=(0.147895313865-0.0517476472608j)
            arg[(1, 2, 1, 1)]=(0.578179059718+0.733376640105j)*x[0] + ((0.581500178191-0.496262898598j))*x[1]
            ref[(1, 2, 1, 1)]=(0.579839618954+0.118556870754j)
            arg[(1, 2, 2, 0)]=(-0.630543048101-0.000956751930941j)*x[0] + ((0.792215035997-0.133421700946j))*x[1]
            ref[(1, 2, 2, 0)]=(0.0808359939479-0.0671892264384j)
            arg[(1, 2, 2, 1)]=(0.383880846631+0.31688207058j)*x[0] + ((0.713626253514-0.26469434894j))*x[1]
            ref[(1, 2, 2, 1)]=(0.548753550073+0.02609386082j)
            arg[(1, 2, 3, 0)]=(-0.585645653371+0.986431030466j)*x[0] + ((0.910775098194+0.908339577236j))*x[1]
            ref[(1, 2, 3, 0)]=(0.162564722411+0.947385303851j)
            arg[(1, 2, 3, 1)]=(0.599906893905-0.713862517313j)*x[0] + ((0.435672174864+0.419281596832j))*x[1]
            ref[(1, 2, 3, 1)]=(0.517789534384-0.147290460241j)
            arg[(1, 3, 0, 0)]=(-0.133700918509+0.046862811179j)*x[0] + ((-0.766462589837+0.273876511332j))*x[1]
            ref[(1, 3, 0, 0)]=(-0.450081754173+0.160369661255j)
            arg[(1, 3, 0, 1)]=(-0.500455730026+0.84836624145j)*x[0] + ((-0.933513305656+0.24241607866j))*x[1]
            ref[(1, 3, 0, 1)]=(-0.716984517841+0.545391160055j)
            arg[(1, 3, 1, 0)]=(0.137348387332-0.0962528922707j)*x[0] + ((-0.824733754566-0.827193215926j))*x[1]
            ref[(1, 3, 1, 0)]=(-0.343692683617-0.461723054098j)
            arg[(1, 3, 1, 1)]=(0.647146564757-0.651653765831j)*x[0] + ((-0.0215966663366-0.437003047566j))*x[1]
            ref[(1, 3, 1, 1)]=(0.31277494921-0.544328406698j)
            arg[(1, 3, 2, 0)]=(-0.828202623657+0.567076686797j)*x[0] + ((-0.646816802963+0.701390645808j))*x[1]
            ref[(1, 3, 2, 0)]=(-0.73750971331+0.634233666302j)
            arg[(1, 3, 2, 1)]=(0.794073596129+0.421655922139j)*x[0] + ((0.531860543047-0.63894092314j))*x[1]
            ref[(1, 3, 2, 1)]=(0.662967069588-0.1086425005j)
            arg[(1, 3, 3, 0)]=(-0.85773111625-0.0478954933975j)*x[0] + ((0.358801689559+0.0875536184467j))*x[1]
            ref[(1, 3, 3, 0)]=(-0.249464713345+0.0198290625246j)
            arg[(1, 3, 3, 1)]=(0.726475695917+0.0648836463247j)*x[0] + ((-0.529195676693-0.0273843006825j))*x[1]
            ref[(1, 3, 3, 1)]=(0.0986400096122+0.0187496728211j)
        else:
            arg[(0, 0, 0, 0)]=(-0.88911714083+0.530334945349j)*x[0] + ((-0.646062028025+0.288960792547j))*x[1] + ((-0.578408257505+0.963357175942j))*x[2]
            ref[(0, 0, 0, 0)]=(-1.05679371318+0.891326456919j)
            arg[(0, 0, 0, 1)]=(-0.896110981902-0.17935439055j)*x[0] + ((-0.64436117975-0.955276197111j))*x[1] + ((-0.612146333882-0.746692154954j))*x[2]
            ref[(0, 0, 0, 1)]=(-1.07630924777-0.940661371308j)
            arg[(0, 0, 1, 0)]=(0.757133518974-0.384954630295j)*x[0] + ((-0.316790909716+0.22906783726j))*x[1] + ((0.955060569261+0.0446450554261j))*x[2]
            ref[(0, 0, 1, 0)]=(0.69770158926-0.0556208688043j)
            arg[(0, 0, 1, 1)]=(0.340653753819+0.64593921917j)*x[0] + ((0.729684463135-0.545779996376j))*x[1] + ((0.541706738392+0.01730515619j))*x[2]
            ref[(0, 0, 1, 1)]=(0.806022477673+0.0587321894923j)
            arg[(0, 0, 2, 0)]=(-0.616722729631-0.430815959353j)*x[0] + ((0.833427599652+0.29297631202j))*x[1] + ((0.821200455191-0.409096801132j))*x[2]
            ref[(0, 0, 2, 0)]=(0.518952662606-0.273468224232j)
            arg[(0, 0, 2, 1)]=(-0.285659707574+0.961161364922j)*x[0] + ((0.385228633991-0.201603610091j))*x[1] + ((-0.754636597706+0.98417011505j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.327533835645+0.87186393494j)
            arg[(0, 0, 3, 0)]=(-0.75208420978-0.18706707654j)*x[0] + ((-0.883726226205+0.545603664203j))*x[1] + ((0.291925059349+0.75271829547j))*x[2]
            ref[(0, 0, 3, 0)]=(-0.671942688318+0.555627441566j)
            arg[(0, 0, 3, 1)]=(0.959900031889+0.328122678138j)*x[0] + ((0.830314797539-0.347666332403j))*x[1] + ((0.842649354943+0.291113273668j))*x[2]
            ref[(0, 0, 3, 1)]=(1.31643209219+0.135784809702j)
            arg[(0, 1, 0, 0)]=(0.808671415358+0.537542360152j)*x[0] + ((-0.629172489145-0.972125714168j))*x[1] + ((-0.465954320296+0.498558756585j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.143227697041+0.0319877012844j)
            arg[(0, 1, 0, 1)]=(0.519114926662-0.875312260813j)*x[0] + ((0.0126590646679+0.156448259947j))*x[1] + ((-0.730747718455-0.961917719368j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.099486863563-0.840390860117j)
            arg[(0, 1, 1, 0)]=(0.016142045454+0.237015876696j)*x[0] + ((-0.143003444868-0.454379324873j))*x[1] + ((-0.474615979143+0.895103551219j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.300738689278+0.338870051521j)
            arg[(0, 1, 1, 1)]=(-0.112818513659-0.988799582537j)*x[0] + ((-0.263853215773-0.976686188276j))*x[1] + ((-0.0543845463952+0.977253681052j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.215528137914-0.49411604488j)
            arg[(0, 1, 2, 0)]=(-0.289035940591+0.191849908895j)*x[0] + ((-0.833486212739-0.33514646194j))*x[1] + ((0.123795893057+0.458678712173j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.499363130136+0.157691079564j)
            arg[(0, 1, 2, 1)]=(0.103715545016-0.590189646618j)*x[0] + ((0.248662479643+0.900806390971j))*x[1] + ((0.000159238852312-0.070614213964j))*x[2]
            ref[(0, 1, 2, 1)]=(0.176268631756+0.120001265194j)
            arg[(0, 1, 3, 0)]=(0.941507710555-0.720572618313j)*x[0] + ((0.343082681402+0.208487363167j))*x[1] + ((-0.305936026285+0.995437305308j))*x[2]
            ref[(0, 1, 3, 0)]=(0.489327182836+0.241676025081j)
            arg[(0, 1, 3, 1)]=(-0.236657751437-0.705616933561j)*x[0] + ((-0.00820963491272-0.0444202229477j))*x[1] + ((-0.517532848098+0.244943081023j))*x[2]
            ref[(0, 1, 3, 1)]=(-0.381200117224-0.252547037743j)
            arg[(0, 2, 0, 0)]=(0.765658850372-0.1947629928j)*x[0] + ((-0.690859339185-0.991847021954j))*x[1] + ((0.194493578328+0.130462186031j))*x[2]
            ref[(0, 2, 0, 0)]=(0.134646544757-0.528073914362j)
            arg[(0, 2, 0, 1)]=(0.590091642575+0.38839738746j)*x[0] + ((-0.963946839207+0.321675926154j))*x[1] + ((-0.569691558255+0.134274707375j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.471773377444+0.422174010494j)
            arg[(0, 2, 1, 0)]=(-0.592026315845-0.0307225948257j)*x[0] + ((-0.639476850172+0.747113619762j))*x[1] + ((-0.933192246924-0.0654011752544j))*x[2]
            ref[(0, 2, 1, 0)]=(-1.08234770647+0.325494924841j)
            arg[(0, 2, 1, 1)]=(-0.132164445414-0.676087040381j)*x[0] + ((-0.517288755354+0.254384365819j))*x[1] + ((0.660896980276-0.831040402318j))*x[2]
            ref[(0, 2, 1, 1)]=(0.00572188975385-0.62637153844j)
            arg[(0, 2, 2, 0)]=(0.83473139732+0.693181158032j)*x[0] + ((-0.573845555645+0.274425350603j))*x[1] + ((0.759359965524+0.741512097994j))*x[2]
            ref[(0, 2, 2, 0)]=(0.510122903599+0.854559303314j)
            arg[(0, 2, 2, 1)]=(-0.835114971896-0.496261651975j)*x[0] + ((-0.459519013835-0.137231406018j))*x[1] + ((-0.877570661862+0.026217819946j))*x[2]
            ref[(0, 2, 2, 1)]=(-1.0861023238-0.303637619024j)
            arg[(0, 2, 3, 0)]=(0.789251773621+0.950488217138j)*x[0] + ((-0.981479146734-0.314393999904j))*x[1] + ((0.272232073398-0.73809398178j))*x[2]
            ref[(0, 2, 3, 0)]=(0.0400023501422-0.050999882273j)
            arg[(0, 2, 3, 1)]=(0.364437916686-0.927291736931j)*x[0] + ((-0.635989722997-0.0187609908085j))*x[1] + ((0.132967787297+0.894659059523j))*x[2]
            ref[(0, 2, 3, 1)]=(-0.0692920095069-0.0256968341082j)
            arg[(0, 3, 0, 0)]=(0.256465712208-0.0820275145412j)*x[0] + ((0.871326386759-0.470910577575j))*x[1] + ((-0.628520530034+0.352798378766j))*x[2]
            ref[(0, 3, 0, 0)]=(0.249635784467-0.100069856675j)
            arg[(0, 3, 0, 1)]=(0.920816095814-0.983695239166j)*x[0] + ((0.894810900281+0.332305071583j))*x[1] + ((0.638225219933+0.86787050038j))*x[2]
            ref[(0, 3, 0, 1)]=(1.22692610801+0.108240166398j)
            arg[(0, 3, 1, 0)]=(-0.796682762201-0.192516595784j)*x[0] + ((0.466047755293-0.760287520161j))*x[1] + ((0.606713219787-0.202751231405j))*x[2]
            ref[(0, 3, 1, 0)]=(0.13803910644-0.577777673675j)
            arg[(0, 3, 1, 1)]=(-0.98285808391-0.253473064881j)*x[0] + ((-0.338156654938+0.105590312949j))*x[1] + ((-0.12584446328+0.784277661916j))*x[2]
            ref[(0, 3, 1, 1)]=(-0.723429601064+0.318197454992j)
            arg[(0, 3, 2, 0)]=(0.556724574791-0.394014088577j)*x[0] + ((-0.56104501792-0.549299571283j))*x[1] + ((-0.000712339979012+0.0592730236885j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.00251639155403-0.442020318086j)
            arg[(0, 3, 2, 1)]=(0.859000240298-0.151016309515j)*x[0] + ((-0.19945275825+0.882947248039j))*x[1] + ((0.548829626265+0.587342204093j))*x[2]
            ref[(0, 3, 2, 1)]=(0.604188554156+0.659636571309j)
            arg[(0, 3, 3, 0)]=(0.633561027873-0.497457411653j)*x[0] + ((0.622360777032+0.94809790404j))*x[1] + ((0.387789040707+0.847279724963j))*x[2]
            ref[(0, 3, 3, 0)]=(0.821855422806+0.648960108676j)
            arg[(0, 3, 3, 1)]=(-0.477174778638+0.878650003311j)*x[0] + ((0.412863398901-0.110326784373j))*x[1] + ((-0.355785427689-0.869121758274j))*x[2]
            ref[(0, 3, 3, 1)]=(-0.210048403713-0.0503992696685j)
            arg[(1, 0, 0, 0)]=(-0.619978647279-0.787251917669j)*x[0] + ((-0.932171567044-0.860175642379j))*x[1] + ((0.397756934146+0.607006775132j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.577196640088-0.520210392458j)
            arg[(1, 0, 0, 1)]=(0.583325644471-0.314688112043j)*x[0] + ((-0.90430866144-0.983077205383j))*x[1] + ((0.985608813225-0.857867397976j))*x[2]
            ref[(1, 0, 0, 1)]=(0.332312898128-1.0778163577j)
            arg[(1, 0, 1, 0)]=(0.558395070959-0.57245270738j)*x[0] + ((0.443130618798+0.0532804525069j))*x[1] + ((-0.0230531571472-0.878970910363j))*x[2]
            ref[(1, 0, 1, 0)]=(0.489236266305-0.699071582618j)
            arg[(1, 0, 1, 1)]=(0.28996490291-0.958311673923j)*x[0] + ((0.444292523835+0.234023661894j))*x[1] + ((0.493495346446+0.528687690104j))*x[2]
            ref[(1, 0, 1, 1)]=(0.613876386596-0.0978001609623j)
            arg[(1, 0, 2, 0)]=(0.860195175538-0.951982219814j)*x[0] + ((0.280993107047-0.967399982583j))*x[1] + ((0.119299944505-0.619527681988j))*x[2]
            ref[(1, 0, 2, 0)]=(0.630244113545-1.26945494219j)
            arg[(1, 0, 2, 1)]=(-0.895291993993-0.322387059159j)*x[0] + ((-0.462557745056+0.456868576881j))*x[1] + ((0.120707579625-0.867002463823j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.618571079712-0.366260473051j)
            arg[(1, 0, 3, 0)]=(-0.775537607264-0.438209161184j)*x[0] + ((-0.824972983771+0.33534246545j))*x[1] + ((-0.199427001756-0.430452365953j))*x[2]
            ref[(1, 0, 3, 0)]=(-0.899968796396-0.266659530844j)
            arg[(1, 0, 3, 1)]=(-0.447880464364+0.153180278138j)*x[0] + ((0.0308416779261-0.405255115126j))*x[1] + ((0.871534781374-0.45857137422j))*x[2]
            ref[(1, 0, 3, 1)]=(0.227247997468-0.355323105604j)
            arg[(1, 1, 0, 0)]=(0.915268090523-0.83148108662j)*x[0] + ((0.0536724364262-0.37734893184j))*x[1] + ((0.707085019998-0.803738070337j))*x[2]
            ref[(1, 1, 0, 0)]=(0.838012773473-1.0062840444j)
            arg[(1, 1, 0, 1)]=(-0.499458490653-0.183124015848j)*x[0] + ((0.552380821134-0.786190322769j))*x[1] + ((-0.163390940736+0.808931617553j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.0552343051277-0.0801913605323j)
            arg[(1, 1, 1, 0)]=(0.662829577829-0.0737661486924j)*x[0] + ((-0.92459876214+0.546862720789j))*x[1] + ((-0.425912889428-0.0530122355493j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.34384103687+0.210042168274j)
            arg[(1, 1, 1, 1)]=(-0.791201446789+0.459252705948j)*x[0] + ((-0.165733352505-0.927592092587j))*x[1] + ((0.0613991627561+0.429043865617j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.447767818269-0.019647760511j)
            arg[(1, 1, 2, 0)]=(0.89160477019-0.560276817837j)*x[0] + ((-0.316221282507+0.811024849559j))*x[1] + ((0.920770696388-0.22121548319j))*x[2]
            ref[(1, 1, 2, 0)]=(0.748077092035+0.0147662742661j)
            arg[(1, 1, 2, 1)]=(-0.192425124239-0.954020297751j)*x[0] + ((-0.997856675927-0.362588612755j))*x[1] + ((-0.867610337299+0.219194694042j))*x[2]
            ref[(1, 1, 2, 1)]=(-1.02894606873-0.548707108232j)
            arg[(1, 1, 3, 0)]=(0.202983582691+0.55338679386j)*x[0] + ((0.185561275115+0.22459756343j))*x[1] + ((0.443855570264-0.414227203516j))*x[2]
            ref[(1, 1, 3, 0)]=(0.416200214035+0.181878576887j)
            arg[(1, 1, 3, 1)]=(0.464059927909+0.565155264971j)*x[0] + ((0.799801885918+0.438289318485j))*x[1] + ((-0.593874122109+0.416922030705j))*x[2]
            ref[(1, 1, 3, 1)]=(0.334993845858+0.71018330708j)
            arg[(1, 2, 0, 0)]=(-0.779636948182+0.330981624702j)*x[0] + ((0.0344544895891-0.946497513667j))*x[1] + ((-0.063329886868-0.586216581778j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.40425617273-0.600866235371j)
            arg[(1, 2, 0, 1)]=(-0.527885361143-0.711516883341j)*x[0] + ((-0.821021738728+0.840929582028j))*x[1] + ((-0.823957258899-0.92698005979j))*x[2]
            ref[(1, 2, 0, 1)]=(-1.08643217938-0.398783680552j)
            arg[(1, 2, 1, 0)]=(-0.278488023048+0.570792876872j)*x[0] + ((-0.584988836133-0.312081666868j))*x[1] + ((-0.412952146096-0.170723045484j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.638214502638+0.0439940822598j)
            arg[(1, 2, 1, 1)]=(0.866097377219-0.80186035439j)*x[0] + ((-0.12831659339+0.353130078492j))*x[1] + ((0.543863427125+0.243591563113j))*x[2]
            ref[(1, 2, 1, 1)]=(0.640822105477-0.102569356393j)
            arg[(1, 2, 2, 0)]=(-0.415000389835-0.936149321741j)*x[0] + ((0.225952492124+0.806738709673j))*x[1] + ((0.110993516664+0.910391447217j))*x[2]
            ref[(1, 2, 2, 0)]=(-0.0390271905235+0.390490417575j)
            arg[(1, 2, 2, 1)]=(-0.0488448809711+0.720162350694j)*x[0] + ((-0.332208404364+0.318680841349j))*x[1] + ((-0.409052532053-0.831124665481j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.395052908694+0.103859263281j)
            arg[(1, 2, 3, 0)]=(0.96315926163-0.912563285435j)*x[0] + ((-0.544302022932-0.567969795455j))*x[1] + ((-0.681919815874+0.610944705294j))*x[2]
            ref[(1, 2, 3, 0)]=(-0.131531288588-0.434794187798j)
            arg[(1, 2, 3, 1)]=(0.723589559982+0.0768784772325j)*x[0] + ((0.917737511713-0.70638939519j))*x[1] + ((0.285855629378-0.702403715289j))*x[2]
            ref[(1, 2, 3, 1)]=(0.963591350536-0.665957316623j)
            arg[(1, 3, 0, 0)]=(-0.803348806745-0.271825109013j)*x[0] + ((-0.767095293217+0.11499091337j))*x[1] + ((-0.497627924631+0.430056931528j))*x[2]
            ref[(1, 3, 0, 0)]=(-1.0340360123+0.136611367943j)
            arg[(1, 3, 0, 1)]=(0.647459294864+0.659190830495j)*x[0] + ((0.195060638643+0.215589198911j))*x[1] + ((-0.0718781389825+0.682207545716j))*x[2]
            ref[(1, 3, 0, 1)]=(0.385320897262+0.778493787561j)
            arg[(1, 3, 1, 0)]=(0.122771185757-0.883116505985j)*x[0] + ((-0.44847849077+0.517516472095j))*x[1] + ((-0.708188105914-0.97269125697j))*x[2]
            ref[(1, 3, 1, 0)]=(-0.516947705463-0.66914564543j)
            arg[(1, 3, 1, 1)]=(-0.692353425977+0.256158075311j)*x[0] + ((0.519898142703+0.208395195451j))*x[1] + ((-0.776135144644-0.291221136879j))*x[2]
            ref[(1, 3, 1, 1)]=(-0.474295213959+0.0866660669418j)
            arg[(1, 3, 2, 0)]=(-0.614320346686-0.93263226432j)*x[0] + ((-0.99314592507+0.211085382239j))*x[1] + ((0.0517549764833+0.688188879734j))*x[2]
            ref[(1, 3, 2, 0)]=(-0.777855647636-0.0166790011734j)
            arg[(1, 3, 2, 1)]=(0.612047283975+0.475160150598j)*x[0] + ((-0.712343243746+0.504594032031j))*x[1] + ((-0.155354753934-0.799349167407j))*x[2]
            ref[(1, 3, 2, 1)]=(-0.127825356852+0.090202507611j)
            arg[(1, 3, 3, 0)]=(0.330410874771+0.0345281516893j)*x[0] + ((-0.985638604065-0.0384333130532j))*x[1] + ((0.573297960671-0.262548378103j))*x[2]
            ref[(1, 3, 3, 0)]=(-0.0409648843119-0.133226769734j)
            arg[(1, 3, 3, 1)]=(-0.820713198986+0.56720032534j)*x[0] + ((-0.745102137441+0.792363147115j))*x[1] + ((0.71593925308-0.164244443785j))*x[2]
            ref[(1, 3, 3, 1)]=(-0.424938041673+0.597659514335j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.033605177261-0.644264153247j)*x[0] + ((-0.205517924257+0.385085803184j))*x[1]
            ref=(-0.0859563734978-0.129589175032j)
        else:
            arg=(0.288365512375+0.424326943319j)*x[0] + ((0.712680249776+0.965758706668j))*x[1] + ((-0.356566162871+0.174564103127j))*x[2]
            ref=(0.32223979964+0.782324876557j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.12863871833+0.733541658207j)*x[0] + ((0.35293554815-0.588178433236j))*x[1]
            ref[(0,)]=(0.11214841491+0.0726816124856j)
            arg[(1,)]=(0.271189229245+0.94480079294j)*x[0] + ((-0.925590540451-0.303380388763j))*x[1]
            ref[(1,)]=(-0.327200655603+0.320710202088j)
            arg[(2,)]=(0.800535012311-0.451180840699j)*x[0] + ((-0.0491978481748-0.416356867935j))*x[1]
            ref[(2,)]=(0.375668582068-0.433768854317j)
        else:
            arg[(0,)]=(0.695888135213+0.445354182429j)*x[0] + ((-0.869889943447-0.358992788639j))*x[1] + ((0.737232902001+0.470914289468j))*x[2]
            ref[(0,)]=(0.281615546884+0.278637841629j)
            arg[(1,)]=(-0.580289450428-0.264272689632j)*x[0] + ((0.188377837249+0.685957523016j))*x[1] + ((-0.0397129810337+0.916434047893j))*x[2]
            ref[(1,)]=(-0.215812297107+0.669059440639j)
            arg[(2,)]=(0.67235081569+0.0557308747658j)*x[0] + ((-0.368301332232+0.507796684651j))*x[1] + ((-0.136157718199+0.470506069914j))*x[2]
            ref[(2,)]=(0.0839458826292+0.517016814666j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.332860873662+0.412294419015j)*x[0] + ((0.883172061966-0.0585509565643j))*x[1]
            ref[(0, 0)]=(0.608016467814+0.176871731225j)
            arg[(0, 1)]=(0.239037328279+0.923901352574j)*x[0] + ((0.128776904478+0.928284452025j))*x[1]
            ref[(0, 1)]=(0.183907116379+0.926092902299j)
            arg[(1, 0)]=(-0.270686511189-0.2050431467j)*x[0] + ((-0.870617261276-0.391302123276j))*x[1]
            ref[(1, 0)]=(-0.570651886232-0.298172634988j)
            arg[(1, 1)]=(-0.00559142470953+0.102481129567j)*x[0] + ((0.11908359083-0.514469979908j))*x[1]
            ref[(1, 1)]=(0.0567460830604-0.20599442517j)
            arg[(2, 0)]=(-0.660250531189-0.0216733610427j)*x[0] + ((0.933199165567+0.0622497994538j))*x[1]
            ref[(2, 0)]=(0.136474317189+0.0202882192056j)
            arg[(2, 1)]=(-0.728641157087+0.449640616641j)*x[0] + ((-0.662479258168-0.432708856286j))*x[1]
            ref[(2, 1)]=(-0.695560207628+0.00846588017753j)
            arg[(3, 0)]=(-0.692920425064-0.100237963881j)*x[0] + ((0.135247392063-0.472923359517j))*x[1]
            ref[(3, 0)]=(-0.278836516501-0.286580661699j)
            arg[(3, 1)]=(0.846191912472+0.651293978184j)*x[0] + ((-0.117053452795+0.94648163342j))*x[1]
            ref[(3, 1)]=(0.364569229839+0.798887805802j)
        else:
            arg[(0, 0)]=(0.620308381816-0.352493222607j)*x[0] + ((0.767285728264+0.269937340104j))*x[1] + ((0.893256252133-0.0137004602371j))*x[2]
            ref[(0, 0)]=(1.14042518111-0.0481281713702j)
            arg[(0, 1)]=(-0.506283686823+0.928210155193j)*x[0] + ((-0.0756298324372-0.605023229323j))*x[1] + ((0.263812582944-0.309394729318j))*x[2]
            ref[(0, 1)]=(-0.159050468158+0.00689609827632j)
            arg[(1, 0)]=(0.845893942686+0.291912073046j)*x[0] + ((0.917787723806+0.366697731718j))*x[1] + ((0.693456116139+0.616874049766j))*x[2]
            ref[(1, 0)]=(1.22856889132+0.637741927265j)
            arg[(1, 1)]=(0.144543861775+0.11827519199j)*x[0] + ((0.308021319605+0.210161954982j))*x[1] + ((-0.292432520124-0.0521922065098j))*x[2]
            ref[(1, 1)]=(0.0800663306277+0.138122470231j)
            arg[(2, 0)]=(-0.377074478326+0.72652334785j)*x[0] + ((-0.271152350554-0.398325048499j))*x[1] + ((-0.0887022880817+0.41477058951j))*x[2]
            ref[(2, 0)]=(-0.368464558481+0.37148444443j)
            arg[(2, 1)]=(0.191085033514-0.69362576459j)*x[0] + ((0.545436588623+0.302587325156j))*x[1] + ((0.737603767532+0.537364424192j))*x[2]
            ref[(2, 1)]=(0.737062694834+0.0731629923792j)
            arg[(3, 0)]=(0.945187977441+0.358845974456j)*x[0] + ((-0.449155018337+0.162796594295j))*x[1] + ((0.345690776881+0.0886869768335j))*x[2]
            ref[(3, 0)]=(0.420861867992+0.305164772793j)
            arg[(3, 1)]=(0.445153524739-0.438564078905j)*x[0] + ((0.459604814788+0.961172872961j))*x[1] + ((0.935216108478-0.815297398015j))*x[2]
            ref[(3, 1)]=(0.919987224003-0.146344301979j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref=numpy.zeros((2, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.428258213144+0.536202157252j)*x[0] + ((-0.12789078597-0.930436019652j))*x[1]
            ref[(0, 0, 0)]=(-0.278074499557-0.1971169312j)
            arg[(0, 0, 1)]=(-0.839861498634+0.157387099848j)*x[0] + ((-0.548775454788+0.910018538785j))*x[1]
            ref[(0, 0, 1)]=(-0.694318476711+0.533702819316j)
            arg[(0, 0, 2)]=(-0.390269753916-0.116449324344j)*x[0] + ((0.143784240524+0.275197225064j))*x[1]
            ref[(0, 0, 2)]=(-0.123242756696+0.0793739503599j)
            arg[(0, 1, 0)]=(0.736233488293+0.13907219812j)*x[0] + ((0.846891989599-0.672876893175j))*x[1]
            ref[(0, 1, 0)]=(0.791562738946-0.266902347527j)
            arg[(0, 1, 1)]=(-0.403046149888-0.819295165991j)*x[0] + ((0.610199920278+0.470049005023j))*x[1]
            ref[(0, 1, 1)]=(0.103576885195-0.174623080484j)
            arg[(0, 1, 2)]=(-0.729108408424-0.641472987809j)*x[0] + ((0.944845096349-0.90014093477j))*x[1]
            ref[(0, 1, 2)]=(0.107868343963-0.77080696129j)
            arg[(0, 2, 0)]=(0.33078545382+0.889197096121j)*x[0] + ((0.0903513555457-0.134569571365j))*x[1]
            ref[(0, 2, 0)]=(0.210568404683+0.377313762378j)
            arg[(0, 2, 1)]=(0.216829460532-0.880065332306j)*x[0] + ((-0.982525426568-0.854237333366j))*x[1]
            ref[(0, 2, 1)]=(-0.382847983018-0.867151332836j)
            arg[(0, 2, 2)]=(0.28058354688-0.534265764573j)*x[0] + ((0.746407367296-0.691666804225j))*x[1]
            ref[(0, 2, 2)]=(0.513495457088-0.612966284399j)
            arg[(1, 0, 0)]=(-0.697111177137-0.393348025658j)*x[0] + ((0.885588334141+0.998357534894j))*x[1]
            ref[(1, 0, 0)]=(0.0942385785021+0.302504754618j)
            arg[(1, 0, 1)]=(-0.247988371496-0.375373673675j)*x[0] + ((0.792124942663-0.729404598192j))*x[1]
            ref[(1, 0, 1)]=(0.272068285584-0.552389135933j)
            arg[(1, 0, 2)]=(-0.302160505677+0.706083855916j)*x[0] + ((-0.258135862906-0.311249106555j))*x[1]
            ref[(1, 0, 2)]=(-0.280148184292+0.197417374681j)
            arg[(1, 1, 0)]=(-0.959391062426-0.564044793841j)*x[0] + ((-0.754668808725-0.324482391379j))*x[1]
            ref[(1, 1, 0)]=(-0.857029935576-0.44426359261j)
            arg[(1, 1, 1)]=(-0.15877515457+0.810448822891j)*x[0] + ((-0.911469095287-0.571428895925j))*x[1]
            ref[(1, 1, 1)]=(-0.535122124929+0.119509963483j)
            arg[(1, 1, 2)]=(-0.633480878076-0.857266204602j)*x[0] + ((0.178120847079+0.621185256314j))*x[1]
            ref[(1, 1, 2)]=(-0.227680015498-0.118040474144j)
            arg[(1, 2, 0)]=(-0.284174922613-0.561339856417j)*x[0] + ((0.745629545353-0.454540765762j))*x[1]
            ref[(1, 2, 0)]=(0.23072731137-0.507940311089j)
            arg[(1, 2, 1)]=(0.508128390124-0.506420492019j)*x[0] + ((-0.00338145190045+0.902450146863j))*x[1]
            ref[(1, 2, 1)]=(0.252373469112+0.198014827422j)
            arg[(1, 2, 2)]=(0.681960526041+0.531241033598j)*x[0] + ((0.511562699093-0.603264531826j))*x[1]
            ref[(1, 2, 2)]=(0.596761612567-0.0360117491141j)
        else:
            arg[(0, 0, 0)]=(-0.0780172290962-0.877449866287j)*x[0] + ((-0.411209004498-0.684571819208j))*x[1] + ((-0.187219461042+0.338069820474j))*x[2]
            ref[(0, 0, 0)]=(-0.338222847318-0.61197593251j)
            arg[(0, 0, 1)]=(-0.92380112902-0.949337352407j)*x[0] + ((0.702294938718+0.380324159348j))*x[1] + ((-0.250531209179+0.26915659556j))*x[2]
            ref[(0, 0, 1)]=(-0.236018699741-0.14992829875j)
            arg[(0, 0, 2)]=(-0.810098633987-0.918367189694j)*x[0] + ((0.947185204968+0.792745599589j))*x[1] + ((0.158961371401-0.702296424632j))*x[2]
            ref[(0, 0, 2)]=(0.148023971191-0.413959007369j)
            arg[(0, 1, 0)]=(-0.493362927544-0.336689227217j)*x[0] + ((-0.0227007201289-0.787914172346j))*x[1] + ((-0.117096732369-0.625958735279j))*x[2]
            ref[(0, 1, 0)]=(-0.316580190021-0.875281067421j)
            arg[(0, 1, 1)]=(0.147014512656+0.670037604719j)*x[0] + ((-0.28488464355+0.746363561939j))*x[1] + ((0.991739822318-0.188799874228j))*x[2]
            ref[(0, 1, 1)]=(0.426934845712+0.613800646215j)
            arg[(0, 1, 2)]=(0.798283566234+0.837361629468j)*x[0] + ((0.00590371626389-0.730412658655j))*x[1] + ((-0.147790704927-0.0119556466725j))*x[2]
            ref[(0, 1, 2)]=(0.328198288785+0.0474966620705j)
            arg[(0, 2, 0)]=(0.0155962199426+0.46033353207j)*x[0] + ((-0.506843322414-0.20932465041j))*x[1] + ((-0.881982360425-0.827762922228j))*x[2]
            ref[(0, 2, 0)]=(-0.686614731448-0.288377020284j)
            arg[(0, 2, 1)]=(0.529704560163+0.791937328064j)*x[0] + ((-0.986030067248+0.0527002224765j))*x[1] + ((0.652320163119+0.37323606129j))*x[2]
            ref[(0, 2, 1)]=(0.0979973280171+0.608936805915j)
            arg[(0, 2, 2)]=(-0.320532737697-0.449534559083j)*x[0] + ((0.995317099461+0.252511325031j))*x[1] + ((-0.393733476094-0.128088707826j))*x[2]
            ref[(0, 2, 2)]=(0.140525442835-0.162555970939j)
            arg[(1, 0, 0)]=(0.943018281348-0.192096947993j)*x[0] + ((-0.0637085112678+0.258457214082j))*x[1] + ((0.37545011291-0.372327985084j))*x[2]
            ref[(1, 0, 0)]=(0.627379941495-0.152983859498j)
            arg[(1, 0, 1)]=(-0.416809968004+0.866014689206j)*x[0] + ((-0.0445080649384-0.421285688528j))*x[1] + ((-0.624510233516-0.539346692031j))*x[2]
            ref[(1, 0, 1)]=(-0.542914133229-0.0473088456763j)
            arg[(1, 0, 2)]=(-0.533022349362+0.837516729361j)*x[0] + ((-0.949738631906+0.157829483948j))*x[1] + ((-0.760989148454-0.228622940793j))*x[2]
            ref[(1, 0, 2)]=(-1.12187506486+0.383361636258j)
            arg[(1, 1, 0)]=(0.447709711938-0.0798449626079j)*x[0] + ((-0.554424101482-0.975545647913j))*x[1] + ((0.820216381881-0.506723761828j))*x[2]
            ref[(1, 1, 0)]=(0.356750996169-0.781057186174j)
            arg[(1, 1, 1)]=(0.714830054602-0.580640884403j)*x[0] + ((0.852725547563+0.678960487005j))*x[1] + ((0.709021420039+0.376932797817j))*x[2]
            ref[(1, 1, 1)]=(1.1382885111+0.237626200209j)
            arg[(1, 1, 2)]=(-0.39931730579-0.107305082404j)*x[0] + ((-0.451083815056+0.185062480735j))*x[1] + ((-0.227344927468+0.835936625697j))*x[2]
            ref[(1, 1, 2)]=(-0.538873024157+0.456847012014j)
            arg[(1, 2, 0)]=(-0.864385752481-0.665709702021j)*x[0] + ((-0.522198207072+0.167614871203j))*x[1] + ((0.697679019915+0.812466698047j))*x[2]
            ref[(1, 2, 0)]=(-0.344452469819+0.157185933614j)
            arg[(1, 2, 1)]=(0.771643654153+0.99380499424j)*x[0] + ((0.0942574580975+0.469004979962j))*x[1] + ((0.0981039034916-0.738799037303j))*x[2]
            ref[(1, 2, 1)]=(0.482002507871+0.362005468449j)
            arg[(1, 2, 2)]=(0.0991269826729-0.73996341206j)*x[0] + ((-0.160325776527-0.0660210844552j))*x[1] + ((0.759583071357-0.723067464246j))*x[2]
            ref[(1, 2, 2)]=(0.349192138752-0.764525980381j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4, 4),w)
        ref=numpy.zeros((3, 4, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.798312850754-0.268604300624j)*x[0] + ((0.873926684238-0.419608926371j))*x[1]
            ref[(0, 0, 0, 0)]=(0.037806916742-0.344106613498j)
            arg[(0, 0, 0, 1)]=(0.523485818504+0.313397807231j)*x[0] + ((0.562791839642-0.961593191776j))*x[1]
            ref[(0, 0, 0, 1)]=(0.543138829073-0.324097692272j)
            arg[(0, 0, 0, 2)]=(0.24554977892+0.549599455356j)*x[0] + ((0.957641159774+0.313542981498j))*x[1]
            ref[(0, 0, 0, 2)]=(0.601595469347+0.431571218427j)
            arg[(0, 0, 0, 3)]=(0.958248346951+0.604973724654j)*x[0] + ((-0.914124896338+0.610665796654j))*x[1]
            ref[(0, 0, 0, 3)]=(0.0220617253067+0.607819760654j)
            arg[(0, 0, 1, 0)]=(-0.340172796537+0.90774753482j)*x[0] + ((0.916867680257-0.967829882872j))*x[1]
            ref[(0, 0, 1, 0)]=(0.28834744186-0.0300411740256j)
            arg[(0, 0, 1, 1)]=(0.600823017836+0.574576042899j)*x[0] + ((0.0439024115364+0.861189791049j))*x[1]
            ref[(0, 0, 1, 1)]=(0.322362714686+0.717882916974j)
            arg[(0, 0, 1, 2)]=(0.625891908636+0.857907345693j)*x[0] + ((0.269837249435+0.169383641919j))*x[1]
            ref[(0, 0, 1, 2)]=(0.447864579035+0.513645493806j)
            arg[(0, 0, 1, 3)]=(0.610136967497-0.00981675030623j)*x[0] + ((-0.0475479685709+0.0278272903383j))*x[1]
            ref[(0, 0, 1, 3)]=(0.281294499463+0.00900527001602j)
            arg[(0, 0, 2, 0)]=(0.0535728638221-0.349695010338j)*x[0] + ((0.531576496071+0.888604600185j))*x[1]
            ref[(0, 0, 2, 0)]=(0.292574679946+0.269454794923j)
            arg[(0, 0, 2, 1)]=(-0.45945783666+0.280323309293j)*x[0] + ((0.987229162627+0.0791879776308j))*x[1]
            ref[(0, 0, 2, 1)]=(0.263885662984+0.179755643462j)
            arg[(0, 0, 2, 2)]=(-0.162596829473+0.33534625146j)*x[0] + ((-0.101953723487+0.424030179911j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.13227527648+0.379688215686j)
            arg[(0, 0, 2, 3)]=(-0.410753942508-0.831351745691j)*x[0] + ((-0.153521491681+0.689446325534j))*x[1]
            ref[(0, 0, 2, 3)]=(-0.282137717095-0.0709527100789j)
            arg[(0, 0, 3, 0)]=(0.527464219658-0.51076891333j)*x[0] + ((0.0258061853074+0.243973686299j))*x[1]
            ref[(0, 0, 3, 0)]=(0.276635202482-0.133397613516j)
            arg[(0, 0, 3, 1)]=(0.261366130518-0.0623042630064j)*x[0] + ((-0.923718482046+0.709733260252j))*x[1]
            ref[(0, 0, 3, 1)]=(-0.331176175764+0.323714498623j)
            arg[(0, 0, 3, 2)]=(0.13602232939+0.644508298794j)*x[0] + ((0.325684462092-0.0204724007759j))*x[1]
            ref[(0, 0, 3, 2)]=(0.230853395741+0.312017949009j)
            arg[(0, 0, 3, 3)]=(0.449890875254-0.181988514961j)*x[0] + ((0.663763526435-0.513960291883j))*x[1]
            ref[(0, 0, 3, 3)]=(0.556827200844-0.347974403422j)
            arg[(0, 1, 0, 0)]=(-0.556226699793-0.83117531816j)*x[0] + ((-0.0474767091739+0.606580811548j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.301851704484-0.112297253306j)
            arg[(0, 1, 0, 1)]=(0.61834353477-0.90517895803j)*x[0] + ((0.156786460247+0.125425884484j))*x[1]
            ref[(0, 1, 0, 1)]=(0.387564997508-0.389876536773j)
            arg[(0, 1, 0, 2)]=(0.928933656112+0.33032219503j)*x[0] + ((-0.666547473335-0.00578030158346j))*x[1]
            ref[(0, 1, 0, 2)]=(0.131193091388+0.162270946723j)
            arg[(0, 1, 0, 3)]=(0.639179106175-0.99368768286j)*x[0] + ((0.206281133555+0.825274811896j))*x[1]
            ref[(0, 1, 0, 3)]=(0.422730119865-0.0842064354823j)
            arg[(0, 1, 1, 0)]=(-0.262230185685-0.986752242691j)*x[0] + ((-0.0705850246747+0.476534651909j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.16640760518-0.255108795391j)
            arg[(0, 1, 1, 1)]=(0.535795230719+0.998098604068j)*x[0] + ((-0.678933155957+0.407873101001j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.0715689626188+0.702985852535j)
            arg[(0, 1, 1, 2)]=(0.238732466188+0.496092308351j)*x[0] + ((0.925241360447-0.643497870199j))*x[1]
            ref[(0, 1, 1, 2)]=(0.581986913317-0.0737027809238j)
            arg[(0, 1, 1, 3)]=(0.488522190061-0.163507348783j)*x[0] + ((-0.474235246249-0.104788796937j))*x[1]
            ref[(0, 1, 1, 3)]=(0.00714347190568-0.13414807286j)
            arg[(0, 1, 2, 0)]=(-0.547400532094+0.248553426621j)*x[0] + ((-0.222721697457+0.987104124164j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.385061114775+0.617828775393j)
            arg[(0, 1, 2, 1)]=(0.223695017834-0.483285948699j)*x[0] + ((0.996490152005-0.269907546149j))*x[1]
            ref[(0, 1, 2, 1)]=(0.610092584919-0.376596747424j)
            arg[(0, 1, 2, 2)]=(0.441908189004+0.200834727043j)*x[0] + ((-0.919965781693+0.996770809287j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.239028796345+0.598802768165j)
            arg[(0, 1, 2, 3)]=(-0.508665778075+0.369206627755j)*x[0] + ((-0.785063819012-0.159573959021j))*x[1]
            ref[(0, 1, 2, 3)]=(-0.646864798544+0.104816334367j)
            arg[(0, 1, 3, 0)]=(0.0972243330376+0.949019777147j)*x[0] + ((-0.938326204735+0.479906779002j))*x[1]
            ref[(0, 1, 3, 0)]=(-0.420550935848+0.714463278074j)
            arg[(0, 1, 3, 1)]=(0.67040600826-0.288243549113j)*x[0] + ((-0.300939785819+0.679129007921j))*x[1]
            ref[(0, 1, 3, 1)]=(0.18473311122+0.195442729404j)
            arg[(0, 1, 3, 2)]=(0.607834443672-0.902018842798j)*x[0] + ((-0.311003148299+0.652062062088j))*x[1]
            ref[(0, 1, 3, 2)]=(0.148415647687-0.124978390355j)
            arg[(0, 1, 3, 3)]=(0.31068111316-0.320469802861j)*x[0] + ((-0.116847526543+0.0438674859138j))*x[1]
            ref[(0, 1, 3, 3)]=(0.0969167933089-0.138301158474j)
            arg[(0, 2, 0, 0)]=(0.652832867335+0.404333139912j)*x[0] + ((0.978746105121+0.659494094956j))*x[1]
            ref[(0, 2, 0, 0)]=(0.815789486228+0.531913617434j)
            arg[(0, 2, 0, 1)]=(0.656000998205-0.622249145997j)*x[0] + ((0.414907552672-0.549477439833j))*x[1]
            ref[(0, 2, 0, 1)]=(0.535454275439-0.585863292915j)
            arg[(0, 2, 0, 2)]=(-0.743444619388+0.880514907947j)*x[0] + ((-0.0738897908885+0.591086585387j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.408667205138+0.735800746667j)
            arg[(0, 2, 0, 3)]=(0.203510829405+0.574311367689j)*x[0] + ((-0.0617350804382-0.0955223331299j))*x[1]
            ref[(0, 2, 0, 3)]=(0.0708878744832+0.23939451728j)
            arg[(0, 2, 1, 0)]=(-0.339274162024-0.314875630259j)*x[0] + ((0.875618121681+0.553922478831j))*x[1]
            ref[(0, 2, 1, 0)]=(0.268171979828+0.119523424286j)
            arg[(0, 2, 1, 1)]=(-0.650806604368+0.254989560036j)*x[0] + ((0.147336577097-0.687846872393j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.251735013635-0.216428656179j)
            arg[(0, 2, 1, 2)]=(0.902963313565+0.110255633039j)*x[0] + ((0.837844439203+0.976413312614j))*x[1]
            ref[(0, 2, 1, 2)]=(0.870403876384+0.543334472827j)
            arg[(0, 2, 1, 3)]=(-0.004875448519+0.417500592456j)*x[0] + ((-0.322349495749-0.800909194067j))*x[1]
            ref[(0, 2, 1, 3)]=(-0.163612472134-0.191704300806j)
            arg[(0, 2, 2, 0)]=(-0.695831959186+0.251049760159j)*x[0] + ((0.676687926781-0.00528379795918j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.00957201620215+0.1228829811j)
            arg[(0, 2, 2, 1)]=(0.464264636748-0.351470715115j)*x[0] + ((-0.0526788556508+0.899689335199j))*x[1]
            ref[(0, 2, 2, 1)]=(0.205792890549+0.274109310042j)
            arg[(0, 2, 2, 2)]=(0.0339388661625+0.761481166043j)*x[0] + ((-0.0212959566466-0.126396681246j))*x[1]
            ref[(0, 2, 2, 2)]=(0.00632145475794+0.317542242399j)
            arg[(0, 2, 2, 3)]=(0.128127702011+0.36928186157j)*x[0] + ((-0.190005082889-0.47618700334j))*x[1]
            ref[(0, 2, 2, 3)]=(-0.0309386904389-0.053452570885j)
            arg[(0, 2, 3, 0)]=(-0.672289697272+0.691553419705j)*x[0] + ((0.896964500343+0.330021508409j))*x[1]
            ref[(0, 2, 3, 0)]=(0.112337401536+0.510787464057j)
            arg[(0, 2, 3, 1)]=(-0.631703335712+0.537261822175j)*x[0] + ((0.704881175855+0.578979880413j))*x[1]
            ref[(0, 2, 3, 1)]=(0.0365889200714+0.558120851294j)
            arg[(0, 2, 3, 2)]=(-0.653845193052-0.71757020942j)*x[0] + ((-0.176634970328-0.418107475309j))*x[1]
            ref[(0, 2, 3, 2)]=(-0.41524008169-0.567838842365j)
            arg[(0, 2, 3, 3)]=(-0.603908148273-0.333788219201j)*x[0] + ((-0.343795513774-0.275404204032j))*x[1]
            ref[(0, 2, 3, 3)]=(-0.473851831023-0.304596211617j)
            arg[(0, 3, 0, 0)]=(0.531890810065+0.336836410295j)*x[0] + ((0.647653900299+0.56482133521j))*x[1]
            ref[(0, 3, 0, 0)]=(0.589772355182+0.450828872752j)
            arg[(0, 3, 0, 1)]=(-0.13239322973+0.800605580614j)*x[0] + ((0.786120066425-0.145884732499j))*x[1]
            ref[(0, 3, 0, 1)]=(0.326863418348+0.327360424058j)
            arg[(0, 3, 0, 2)]=(-0.822943798013-0.35227139739j)*x[0] + ((0.417430493283+0.464877491645j))*x[1]
            ref[(0, 3, 0, 2)]=(-0.202756652365+0.0563030471275j)
            arg[(0, 3, 0, 3)]=(0.576698552544+0.632021605746j)*x[0] + ((0.958103953156-0.354242052244j))*x[1]
            ref[(0, 3, 0, 3)]=(0.76740125285+0.138889776751j)
            arg[(0, 3, 1, 0)]=(-0.918760124708-0.415003413456j)*x[0] + ((0.273208938939+0.365349696795j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.322775592884-0.0248268583306j)
            arg[(0, 3, 1, 1)]=(-0.380471836594+0.90686715675j)*x[0] + ((0.32881646022+0.498731894363j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.025827688187+0.702799525557j)
            arg[(0, 3, 1, 2)]=(0.621572326734-0.0846218361532j)*x[0] + ((-0.478681568793-0.521892682302j))*x[1]
            ref[(0, 3, 1, 2)]=(0.0714453789705-0.303257259228j)
            arg[(0, 3, 1, 3)]=(-0.548217377258-0.139755085916j)*x[0] + ((0.97982283086+0.334754091717j))*x[1]
            ref[(0, 3, 1, 3)]=(0.215802726801+0.0974995029004j)
            arg[(0, 3, 2, 0)]=(-0.604944962454+0.93108804949j)*x[0] + ((-0.944070197104-0.6081941493j))*x[1]
            ref[(0, 3, 2, 0)]=(-0.774507579779+0.161446950095j)
            arg[(0, 3, 2, 1)]=(-0.548412950257+0.306153311249j)*x[0] + ((-0.977782202285-0.151435554247j))*x[1]
            ref[(0, 3, 2, 1)]=(-0.763097576271+0.0773588785011j)
            arg[(0, 3, 2, 2)]=(0.907802538764+0.11583209003j)*x[0] + ((-0.466331481456+0.662975698347j))*x[1]
            ref[(0, 3, 2, 2)]=(0.220735528654+0.389403894189j)
            arg[(0, 3, 2, 3)]=(-0.936777307336+0.983932878966j)*x[0] + ((-0.590438126839+0.530844363222j))*x[1]
            ref[(0, 3, 2, 3)]=(-0.763607717088+0.757388621094j)
            arg[(0, 3, 3, 0)]=(-0.0304136219627-0.667244717315j)*x[0] + ((-0.887202091113-0.556375237998j))*x[1]
            ref[(0, 3, 3, 0)]=(-0.458807856538-0.611809977657j)
            arg[(0, 3, 3, 1)]=(0.661669800196-0.0469018500956j)*x[0] + ((0.813795402211+0.699739651819j))*x[1]
            ref[(0, 3, 3, 1)]=(0.737732601204+0.326418900862j)
            arg[(0, 3, 3, 2)]=(-0.802059012671-0.697076355126j)*x[0] + ((-0.865433731367+0.481696835066j))*x[1]
            ref[(0, 3, 3, 2)]=(-0.833746372019-0.10768976003j)
            arg[(0, 3, 3, 3)]=(-0.460636795978+0.382223016512j)*x[0] + ((0.424063572939+0.601873178237j))*x[1]
            ref[(0, 3, 3, 3)]=(-0.0182866115196+0.492048097375j)
            arg[(1, 0, 0, 0)]=(0.966080389613-0.0595875709658j)*x[0] + ((0.0226706528568-0.995520315365j))*x[1]
            ref[(1, 0, 0, 0)]=(0.494375521235-0.527553943166j)
            arg[(1, 0, 0, 1)]=(0.650737068843-0.520271710602j)*x[0] + ((-0.126490271144-0.655042259606j))*x[1]
            ref[(1, 0, 0, 1)]=(0.262123398849-0.587656985104j)
            arg[(1, 0, 0, 2)]=(-0.0268882423893+0.355777615775j)*x[0] + ((0.0485219662856-0.727348933326j))*x[1]
            ref[(1, 0, 0, 2)]=(0.0108168619482-0.185785658775j)
            arg[(1, 0, 0, 3)]=(-0.261334202448+0.979134072708j)*x[0] + ((-0.378618662529-0.922123067609j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.319976432488+0.0285055025499j)
            arg[(1, 0, 1, 0)]=(0.271254838601-0.862894039883j)*x[0] + ((-0.270257133238-0.365696522984j))*x[1]
            ref[(1, 0, 1, 0)]=(0.000498852681174-0.614295281434j)
            arg[(1, 0, 1, 1)]=(0.86015883232+0.443544218094j)*x[0] + ((-0.800423432187+0.475013956043j))*x[1]
            ref[(1, 0, 1, 1)]=(0.0298677000664+0.459279087068j)
            arg[(1, 0, 1, 2)]=(-0.514439706268+0.21912006967j)*x[0] + ((0.965926186598+0.311798912304j))*x[1]
            ref[(1, 0, 1, 2)]=(0.225743240165+0.265459490987j)
            arg[(1, 0, 1, 3)]=(0.87669665292-0.385833611241j)*x[0] + ((-0.509844218599-0.217547256861j))*x[1]
            ref[(1, 0, 1, 3)]=(0.18342621716-0.301690434051j)
            arg[(1, 0, 2, 0)]=(-0.000158784700266+0.0537097981786j)*x[0] + ((-0.852512817169+0.450574230631j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.426335800935+0.252142014405j)
            arg[(1, 0, 2, 1)]=(0.374486084646+0.14446841493j)*x[0] + ((0.0809477303637+0.738897768486j))*x[1]
            ref[(1, 0, 2, 1)]=(0.227716907505+0.441683091708j)
            arg[(1, 0, 2, 2)]=(-0.356551357698+0.969512568319j)*x[0] + ((-0.434455967786-0.925577985099j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.395503662742+0.0219672916098j)
            arg[(1, 0, 2, 3)]=(0.694765974088+0.529916346559j)*x[0] + ((0.838289171733-0.139921984417j))*x[1]
            ref[(1, 0, 2, 3)]=(0.76652757291+0.194997181071j)
            arg[(1, 0, 3, 0)]=(0.730662110673-0.0837093222756j)*x[0] + ((0.966990939925-0.794173396067j))*x[1]
            ref[(1, 0, 3, 0)]=(0.848826525299-0.438941359172j)
            arg[(1, 0, 3, 1)]=(-0.354269478593-0.3527404392j)*x[0] + ((-0.937459908757+0.0400908224006j))*x[1]
            ref[(1, 0, 3, 1)]=(-0.645864693675-0.1563248084j)
            arg[(1, 0, 3, 2)]=(0.741845813445+0.393757078606j)*x[0] + ((0.618007721767-0.404730011398j))*x[1]
            ref[(1, 0, 3, 2)]=(0.679926767606-0.00548646639596j)
            arg[(1, 0, 3, 3)]=(-0.0296644891887-0.221913790015j)*x[0] + ((-0.92135379378+0.246574665287j))*x[1]
            ref[(1, 0, 3, 3)]=(-0.475509141485+0.0123304376358j)
            arg[(1, 1, 0, 0)]=(0.614864334547+0.551292826878j)*x[0] + ((0.584651770661-0.165665932707j))*x[1]
            ref[(1, 1, 0, 0)]=(0.599758052604+0.192813447085j)
            arg[(1, 1, 0, 1)]=(-0.70445998507-0.6015715459j)*x[0] + ((0.733677008792+0.616887234447j))*x[1]
            ref[(1, 1, 0, 1)]=(0.0146085118611+0.0076578442733j)
            arg[(1, 1, 0, 2)]=(-0.418616260302+0.931824428917j)*x[0] + ((-0.0786938709492+0.4669656852j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.248655065626+0.699395057059j)
            arg[(1, 1, 0, 3)]=(0.509829087744-0.337361509383j)*x[0] + ((0.175428326259+0.753559931985j))*x[1]
            ref[(1, 1, 0, 3)]=(0.342628707001+0.208099211301j)
            arg[(1, 1, 1, 0)]=(0.357569242462-0.907750513985j)*x[0] + ((-0.00125858719675-0.452932503868j))*x[1]
            ref[(1, 1, 1, 0)]=(0.178155327633-0.680341508927j)
            arg[(1, 1, 1, 1)]=(0.0986407685664+0.0449001747908j)*x[0] + ((-0.658193964337-0.142224735143j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.279776597886-0.0486622801762j)
            arg[(1, 1, 1, 2)]=(-0.886190094346+0.848367531963j)*x[0] + ((0.932372192276-0.346618015624j))*x[1]
            ref[(1, 1, 1, 2)]=(0.0230910489648+0.250874758169j)
            arg[(1, 1, 1, 3)]=(0.953027748089-0.543507421309j)*x[0] + ((-0.0817012579545-0.0550062938929j))*x[1]
            ref[(1, 1, 1, 3)]=(0.435663245067-0.299256857601j)
            arg[(1, 1, 2, 0)]=(0.183053904242+0.966175225215j)*x[0] + ((0.842017860971+0.680365112237j))*x[1]
            ref[(1, 1, 2, 0)]=(0.512535882607+0.823270168726j)
            arg[(1, 1, 2, 1)]=(-0.466097580773-0.275713445377j)*x[0] + ((-0.613252536911-0.246607489165j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.539675058842-0.261160467271j)
            arg[(1, 1, 2, 2)]=(-0.209461051706-0.0104521914792j)*x[0] + ((-0.428754324035-0.766317956193j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.31910768787-0.388385073836j)
            arg[(1, 1, 2, 3)]=(-0.0087944298782-0.177841424414j)*x[0] + ((0.716394942016-0.855754453356j))*x[1]
            ref[(1, 1, 2, 3)]=(0.353800256069-0.516797938885j)
            arg[(1, 1, 3, 0)]=(-0.111425598338-0.0243683954542j)*x[0] + ((-0.340286276102-0.400379748879j))*x[1]
            ref[(1, 1, 3, 0)]=(-0.22585593722-0.212374072166j)
            arg[(1, 1, 3, 1)]=(-0.796250167631-0.0294270488621j)*x[0] + ((-0.159465825058-0.418116537791j))*x[1]
            ref[(1, 1, 3, 1)]=(-0.477857996344-0.223771793327j)
            arg[(1, 1, 3, 2)]=(0.0929786905869-0.00682252091759j)*x[0] + ((-0.929491010505-0.295885433446j))*x[1]
            ref[(1, 1, 3, 2)]=(-0.418256159959-0.151353977182j)
            arg[(1, 1, 3, 3)]=(0.304994816573+0.839174126762j)*x[0] + ((0.0453015572739+0.341545972472j))*x[1]
            ref[(1, 1, 3, 3)]=(0.175148186923+0.590360049617j)
            arg[(1, 2, 0, 0)]=(0.979614626454+0.0514075357558j)*x[0] + ((0.992528391427+0.379717522619j))*x[1]
            ref[(1, 2, 0, 0)]=(0.98607150894+0.215562529187j)
            arg[(1, 2, 0, 1)]=(0.504411750751+0.713611044419j)*x[0] + ((-0.413543615047+0.996268978865j))*x[1]
            ref[(1, 2, 0, 1)]=(0.0454340678522+0.854940011642j)
            arg[(1, 2, 0, 2)]=(0.862413747608+0.512924775511j)*x[0] + ((0.523642103181-0.668834758795j))*x[1]
            ref[(1, 2, 0, 2)]=(0.693027925394-0.0779549916418j)
            arg[(1, 2, 0, 3)]=(-0.371189985801-0.835012296985j)*x[0] + ((-0.150067951116-0.224673910488j))*x[1]
            ref[(1, 2, 0, 3)]=(-0.260628968459-0.529843103737j)
            arg[(1, 2, 1, 0)]=(-0.122242888316+0.456217889637j)*x[0] + ((0.127330401059+0.376987978419j))*x[1]
            ref[(1, 2, 1, 0)]=(0.00254375637179+0.416602934028j)
            arg[(1, 2, 1, 1)]=(-0.716518810767+0.364919960935j)*x[0] + ((0.173901989625+0.462706056351j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.271308410571+0.413813008643j)
            arg[(1, 2, 1, 2)]=(-0.967483893412+0.0745994450871j)*x[0] + ((-0.182287277916+0.152882549099j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.574885585664+0.113740997093j)
            arg[(1, 2, 1, 3)]=(-0.969762659415+0.242618356348j)*x[0] + ((-0.831242379882+0.160240134072j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.900502519649+0.20142924521j)
            arg[(1, 2, 2, 0)]=(-0.596261780827-0.788098764064j)*x[0] + ((-0.307363969158-0.950976571727j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.451812874992-0.869537667895j)
            arg[(1, 2, 2, 1)]=(0.526916129793-0.895071324217j)*x[0] + ((0.955027448845-0.163305869069j))*x[1]
            ref[(1, 2, 2, 1)]=(0.740971789319-0.529188596643j)
            arg[(1, 2, 2, 2)]=(0.720824153719-0.576236938891j)*x[0] + ((0.313745742977+0.4103301027j))*x[1]
            ref[(1, 2, 2, 2)]=(0.517284948348-0.0829534180957j)
            arg[(1, 2, 2, 3)]=(-0.223312970742+0.768108247645j)*x[0] + ((-0.398020688375-0.0905739528678j))*x[1]
            ref[(1, 2, 2, 3)]=(-0.310666829558+0.338767147389j)
            arg[(1, 2, 3, 0)]=(0.86762918186+0.636977384463j)*x[0] + ((0.660148105971+0.142756648236j))*x[1]
            ref[(1, 2, 3, 0)]=(0.763888643915+0.389867016349j)
            arg[(1, 2, 3, 1)]=(0.607580065335-0.264847636717j)*x[0] + ((0.284706850453+0.851661881061j))*x[1]
            ref[(1, 2, 3, 1)]=(0.446143457894+0.293407122172j)
            arg[(1, 2, 3, 2)]=(0.816739466001-0.654476456527j)*x[0] + ((0.386162492237-0.868028206226j))*x[1]
            ref[(1, 2, 3, 2)]=(0.601450979119-0.761252331376j)
            arg[(1, 2, 3, 3)]=(-0.736236979466-0.59963624002j)*x[0] + ((0.416993820802+0.445048001113j))*x[1]
            ref[(1, 2, 3, 3)]=(-0.159621579332-0.0772941194533j)
            arg[(1, 3, 0, 0)]=(0.763108559005+0.105906449048j)*x[0] + ((0.432237306058+0.243319159632j))*x[1]
            ref[(1, 3, 0, 0)]=(0.597672932532+0.17461280434j)
            arg[(1, 3, 0, 1)]=(0.0641377166225-0.440691622811j)*x[0] + ((0.374692208146+0.0208428949208j))*x[1]
            ref[(1, 3, 0, 1)]=(0.219414962384-0.209924363945j)
            arg[(1, 3, 0, 2)]=(0.125523809883+0.0993861040577j)*x[0] + ((-0.464467947089+0.525066447808j))*x[1]
            ref[(1, 3, 0, 2)]=(-0.169472068603+0.312226275933j)
            arg[(1, 3, 0, 3)]=(0.239325532687+0.165329389638j)*x[0] + ((0.463420784364+0.207099034352j))*x[1]
            ref[(1, 3, 0, 3)]=(0.351373158525+0.186214211995j)
            arg[(1, 3, 1, 0)]=(0.71650867594-0.306404418649j)*x[0] + ((-0.69776829332-0.278392830331j))*x[1]
            ref[(1, 3, 1, 0)]=(0.00937019131002-0.29239862449j)
            arg[(1, 3, 1, 1)]=(-0.0518678309952+0.166168778842j)*x[0] + ((-0.847523159545+0.344484450593j))*x[1]
            ref[(1, 3, 1, 1)]=(-0.44969549527+0.255326614718j)
            arg[(1, 3, 1, 2)]=(0.0674976002168+0.696532929303j)*x[0] + ((0.023721602878-0.100592045887j))*x[1]
            ref[(1, 3, 1, 2)]=(0.0456096015474+0.297970441708j)
            arg[(1, 3, 1, 3)]=(-0.950286003463-0.978345873647j)*x[0] + ((-0.607476951835+0.647665698018j))*x[1]
            ref[(1, 3, 1, 3)]=(-0.778881477649-0.165340087815j)
            arg[(1, 3, 2, 0)]=(-0.339815122701-0.226651525626j)*x[0] + ((0.194841977539+0.80221611532j))*x[1]
            ref[(1, 3, 2, 0)]=(-0.0724865725811+0.287782294847j)
            arg[(1, 3, 2, 1)]=(0.0838331436584+0.932300357188j)*x[0] + ((-0.517726794506+0.98891586576j))*x[1]
            ref[(1, 3, 2, 1)]=(-0.216946825424+0.960608111474j)
            arg[(1, 3, 2, 2)]=(0.881141532865-0.321413758086j)*x[0] + ((-0.876138772188+0.928590367714j))*x[1]
            ref[(1, 3, 2, 2)]=(0.00250138033848+0.303588304814j)
            arg[(1, 3, 2, 3)]=(0.242506784938+0.0237807495762j)*x[0] + ((0.0485996097917-0.438758027082j))*x[1]
            ref[(1, 3, 2, 3)]=(0.145553197365-0.207488638753j)
            arg[(1, 3, 3, 0)]=(0.0850294371956+0.102480101547j)*x[0] + ((0.404230394309-0.69653921934j))*x[1]
            ref[(1, 3, 3, 0)]=(0.244629915752-0.297029558896j)
            arg[(1, 3, 3, 1)]=(0.356516587785+0.779764575301j)*x[0] + ((-0.0462326167509-0.52779775758j))*x[1]
            ref[(1, 3, 3, 1)]=(0.155141985517+0.12598340886j)
            arg[(1, 3, 3, 2)]=(-0.84821874261-0.487370074705j)*x[0] + ((0.818864058333+0.313801202822j))*x[1]
            ref[(1, 3, 3, 2)]=(-0.0146773421384-0.0867844359419j)
            arg[(1, 3, 3, 3)]=(0.256156708403-0.38622403095j)*x[0] + ((-0.706888036032-0.499762248768j))*x[1]
            ref[(1, 3, 3, 3)]=(-0.225365663815-0.442993139859j)
            arg[(2, 0, 0, 0)]=(-0.0309334395902+0.103737383883j)*x[0] + ((-0.0510637427317-0.817858965299j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.040998591161-0.357060790708j)
            arg[(2, 0, 0, 1)]=(0.069134129995+0.393726701978j)*x[0] + ((0.773679076571-0.883352764767j))*x[1]
            ref[(2, 0, 0, 1)]=(0.421406603283-0.244813031395j)
            arg[(2, 0, 0, 2)]=(0.326918754643+0.0279330366489j)*x[0] + ((0.777537716613+0.818134971267j))*x[1]
            ref[(2, 0, 0, 2)]=(0.552228235628+0.423034003958j)
            arg[(2, 0, 0, 3)]=(0.57601685368-0.856628112624j)*x[0] + ((-0.570140837065-0.0581483971247j))*x[1]
            ref[(2, 0, 0, 3)]=(0.00293800830725-0.457388254875j)
            arg[(2, 0, 1, 0)]=(0.140408454917+0.84483167466j)*x[0] + ((0.208254014206-0.457933680419j))*x[1]
            ref[(2, 0, 1, 0)]=(0.174331234562+0.193448997121j)
            arg[(2, 0, 1, 1)]=(0.969212679761+0.148420296195j)*x[0] + ((-0.0511067952465+0.870208350632j))*x[1]
            ref[(2, 0, 1, 1)]=(0.459052942257+0.509314323414j)
            arg[(2, 0, 1, 2)]=(0.574295462236-0.369968904137j)*x[0] + ((0.748757496555+0.702147481208j))*x[1]
            ref[(2, 0, 1, 2)]=(0.661526479395+0.166089288535j)
            arg[(2, 0, 1, 3)]=(0.230804078069-0.656494126388j)*x[0] + ((0.87835626108-0.724096034988j))*x[1]
            ref[(2, 0, 1, 3)]=(0.554580169575-0.690295080688j)
            arg[(2, 0, 2, 0)]=(0.480081140181-0.497864337507j)*x[0] + ((-0.958006105674-0.0748698585331j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.238962482746-0.28636709802j)
            arg[(2, 0, 2, 1)]=(-0.937773322599+0.168114508417j)*x[0] + ((0.445174454589+0.347555998525j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.246299434005+0.257835253471j)
            arg[(2, 0, 2, 2)]=(-0.0825869499598+0.876031807613j)*x[0] + ((-0.413041995278-0.4525065186j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.247814472619+0.211762644506j)
            arg[(2, 0, 2, 3)]=(0.301386310057-0.304983959555j)*x[0] + ((0.412062647593+0.089116714716j))*x[1]
            ref[(2, 0, 2, 3)]=(0.356724478825-0.10793362242j)
            arg[(2, 0, 3, 0)]=(-0.147278890942+0.311658175428j)*x[0] + ((-0.25883506231-0.825274343473j))*x[1]
            ref[(2, 0, 3, 0)]=(-0.203056976626-0.256808084022j)
            arg[(2, 0, 3, 1)]=(0.386839245632-0.359386390126j)*x[0] + ((0.508776514215-0.0674902681703j))*x[1]
            ref[(2, 0, 3, 1)]=(0.447807879924-0.213438329148j)
            arg[(2, 0, 3, 2)]=(-0.231558992291+0.145044547036j)*x[0] + ((-0.860849777762-0.282761600328j))*x[1]
            ref[(2, 0, 3, 2)]=(-0.546204385027-0.068858526646j)
            arg[(2, 0, 3, 3)]=(-0.56692801068+0.665889377326j)*x[0] + ((0.920735617295-0.984280210538j))*x[1]
            ref[(2, 0, 3, 3)]=(0.176903803308-0.159195416606j)
            arg[(2, 1, 0, 0)]=(-0.688084721536+0.527152979052j)*x[0] + ((-0.897514403152-0.921400115528j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.792799562344-0.197123568238j)
            arg[(2, 1, 0, 1)]=(0.967246536983-0.543188427423j)*x[0] + ((-0.0761331633941-0.816757758716j))*x[1]
            ref[(2, 1, 0, 1)]=(0.445556686794-0.67997309307j)
            arg[(2, 1, 0, 2)]=(0.856283981414+0.659442672989j)*x[0] + ((-0.163928656945+0.0992693369625j))*x[1]
            ref[(2, 1, 0, 2)]=(0.346177662234+0.379356004976j)
            arg[(2, 1, 0, 3)]=(-0.64683300585-0.288549282004j)*x[0] + ((0.799453025114-0.182204010781j))*x[1]
            ref[(2, 1, 0, 3)]=(0.0763100096318-0.235376646392j)
            arg[(2, 1, 1, 0)]=(0.703640117293-0.758382852548j)*x[0] + ((0.230298583783+0.9803195585j))*x[1]
            ref[(2, 1, 1, 0)]=(0.466969350538+0.110968352976j)
            arg[(2, 1, 1, 1)]=(-0.0926223996904-0.581653094412j)*x[0] + ((-0.382317545228-0.263415694099j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.237469972459-0.422534394256j)
            arg[(2, 1, 1, 2)]=(0.0644418983757+0.36190914642j)*x[0] + ((-0.507219790877+0.00335100608252j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.22138894625+0.182630076251j)
            arg[(2, 1, 1, 3)]=(-0.682539077125+0.926084672259j)*x[0] + ((0.950155182458+0.983667741983j))*x[1]
            ref[(2, 1, 1, 3)]=(0.133808052667+0.954876207121j)
            arg[(2, 1, 2, 0)]=(0.905413767436-0.176724599902j)*x[0] + ((-0.790066074078-0.454355711456j))*x[1]
            ref[(2, 1, 2, 0)]=(0.0576738466793-0.315540155679j)
            arg[(2, 1, 2, 1)]=(0.902219973904+0.944488225807j)*x[0] + ((-0.679552686449+0.0545826187208j))*x[1]
            ref[(2, 1, 2, 1)]=(0.111333643728+0.499535422264j)
            arg[(2, 1, 2, 2)]=(0.930389228567-0.0466491164635j)*x[0] + ((-0.803536803084+0.740138546843j))*x[1]
            ref[(2, 1, 2, 2)]=(0.0634262127418+0.34674471519j)
            arg[(2, 1, 2, 3)]=(-0.950468452689+0.309963076665j)*x[0] + ((0.873786279708+0.578523695027j))*x[1]
            ref[(2, 1, 2, 3)]=(-0.0383410864904+0.444243385846j)
            arg[(2, 1, 3, 0)]=(-0.788629357874-0.984952718934j)*x[0] + ((0.610425723269+0.666517983405j))*x[1]
            ref[(2, 1, 3, 0)]=(-0.0891018173027-0.159217367765j)
            arg[(2, 1, 3, 1)]=(-0.61380790428+0.988486635287j)*x[0] + ((0.0718934236994+0.657369207824j))*x[1]
            ref[(2, 1, 3, 1)]=(-0.27095724029+0.822927921555j)
            arg[(2, 1, 3, 2)]=(-0.882503120127-0.240463198919j)*x[0] + ((-0.269992447419-0.426400997923j))*x[1]
            ref[(2, 1, 3, 2)]=(-0.576247783773-0.333432098421j)
            arg[(2, 1, 3, 3)]=(-0.720180079388+0.826031123601j)*x[0] + ((0.426596520533-0.417372093234j))*x[1]
            ref[(2, 1, 3, 3)]=(-0.146791779427+0.204329515183j)
            arg[(2, 2, 0, 0)]=(-0.143886842561-0.055747065674j)*x[0] + ((0.308679724646-0.947758791349j))*x[1]
            ref[(2, 2, 0, 0)]=(0.0823964410424-0.501752928511j)
            arg[(2, 2, 0, 1)]=(0.935052319752+0.684884415956j)*x[0] + ((0.975381189681-0.999063347903j))*x[1]
            ref[(2, 2, 0, 1)]=(0.955216754716-0.157089465973j)
            arg[(2, 2, 0, 2)]=(-0.00639706036925+0.820897530641j)*x[0] + ((0.41548689582+0.523469466355j))*x[1]
            ref[(2, 2, 0, 2)]=(0.204544917725+0.672183498498j)
            arg[(2, 2, 0, 3)]=(0.767948410611+0.119679724749j)*x[0] + ((0.0968879355151+0.287986649519j))*x[1]
            ref[(2, 2, 0, 3)]=(0.432418173063+0.203833187134j)
            arg[(2, 2, 1, 0)]=(0.104474475603+0.819571565792j)*x[0] + ((0.977495568975-0.147582276336j))*x[1]
            ref[(2, 2, 1, 0)]=(0.540985022289+0.335994644728j)
            arg[(2, 2, 1, 1)]=(-0.678582800894-0.277487866637j)*x[0] + ((-0.722068517614+0.153061734789j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.700325659254-0.0622130659242j)
            arg[(2, 2, 1, 2)]=(-0.590248769495+0.598190828327j)*x[0] + ((-0.284350649278-0.310558193835j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.437299709386+0.143816317246j)
            arg[(2, 2, 1, 3)]=(-0.127585205684-0.399331457967j)*x[0] + ((0.173415494159+0.445127483763j))*x[1]
            ref[(2, 2, 1, 3)]=(0.0229151442376+0.0228980128981j)
            arg[(2, 2, 2, 0)]=(0.511055297611-0.155118018383j)*x[0] + ((-0.807821351371+0.510768988447j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.14838302688+0.177825485032j)
            arg[(2, 2, 2, 1)]=(0.332744382965+0.419647942949j)*x[0] + ((-0.82148417497-0.0688524521819j))*x[1]
            ref[(2, 2, 2, 1)]=(-0.244369896003+0.175397745384j)
            arg[(2, 2, 2, 2)]=(0.874018173338+0.551626501142j)*x[0] + ((0.307327533891+0.378615909478j))*x[1]
            ref[(2, 2, 2, 2)]=(0.590672853614+0.46512120531j)
            arg[(2, 2, 2, 3)]=(0.797300503691+0.912184419598j)*x[0] + ((0.247193971887-0.377312126123j))*x[1]
            ref[(2, 2, 2, 3)]=(0.522247237789+0.267436146737j)
            arg[(2, 2, 3, 0)]=(-0.676291102846+0.327240086728j)*x[0] + ((-0.92559577065+0.476458042849j))*x[1]
            ref[(2, 2, 3, 0)]=(-0.800943436748+0.401849064788j)
            arg[(2, 2, 3, 1)]=(-0.773693231029+0.21911240799j)*x[0] + ((-0.375841021765+0.506822512114j))*x[1]
            ref[(2, 2, 3, 1)]=(-0.574767126397+0.362967460052j)
            arg[(2, 2, 3, 2)]=(0.377578092106-0.34301207467j)*x[0] + ((-0.664892337648-0.669383643041j))*x[1]
            ref[(2, 2, 3, 2)]=(-0.143657122771-0.506197858855j)
            arg[(2, 2, 3, 3)]=(-0.0596747110262-0.719161124288j)*x[0] + ((-0.51123088535+0.0946174330004j))*x[1]
            ref[(2, 2, 3, 3)]=(-0.285452798188-0.312271845644j)
            arg[(2, 3, 0, 0)]=(-0.166849108665+0.217162652534j)*x[0] + ((-0.334725130406-0.798607900159j))*x[1]
            ref[(2, 3, 0, 0)]=(-0.250787119535-0.290722623813j)
            arg[(2, 3, 0, 1)]=(0.217767011229-0.777679256284j)*x[0] + ((-0.499205536488-0.0720314690809j))*x[1]
            ref[(2, 3, 0, 1)]=(-0.140719262629-0.424855362683j)
            arg[(2, 3, 0, 2)]=(-0.714610301181-0.69079402159j)*x[0] + ((-0.133316658655-0.992917015766j))*x[1]
            ref[(2, 3, 0, 2)]=(-0.423963479918-0.841855518678j)
            arg[(2, 3, 0, 3)]=(-0.278973081309+0.115658462745j)*x[0] + ((-0.966173315849-0.992900874377j))*x[1]
            ref[(2, 3, 0, 3)]=(-0.622573198579-0.438621205816j)
            arg[(2, 3, 1, 0)]=(0.576439558915-0.589836033524j)*x[0] + ((0.709406938635+0.713140879898j))*x[1]
            ref[(2, 3, 1, 0)]=(0.642923248775+0.0616524231869j)
            arg[(2, 3, 1, 1)]=(-0.787659668002-0.0530407303765j)*x[0] + ((-0.365404913253-0.865467353191j))*x[1]
            ref[(2, 3, 1, 1)]=(-0.576532290627-0.459254041784j)
            arg[(2, 3, 1, 2)]=(-0.235752793854+0.754183731212j)*x[0] + ((0.617280332483+0.698840392992j))*x[1]
            ref[(2, 3, 1, 2)]=(0.190763769315+0.726512062102j)
            arg[(2, 3, 1, 3)]=(-0.439074944988+0.98873359369j)*x[0] + ((0.565688920427+0.802748854419j))*x[1]
            ref[(2, 3, 1, 3)]=(0.0633069877197+0.895741224054j)
            arg[(2, 3, 2, 0)]=(0.595382686103+0.681237349894j)*x[0] + ((0.482821857458-0.302601749706j))*x[1]
            ref[(2, 3, 2, 0)]=(0.539102271781+0.189317800094j)
            arg[(2, 3, 2, 1)]=(0.690304087426-0.173940294352j)*x[0] + ((0.574813065106-0.06464636053j))*x[1]
            ref[(2, 3, 2, 1)]=(0.632558576266-0.119293327441j)
            arg[(2, 3, 2, 2)]=(-0.641636457922+0.77221333228j)*x[0] + ((-0.651338777057+0.777290761657j))*x[1]
            ref[(2, 3, 2, 2)]=(-0.64648761749+0.774752046968j)
            arg[(2, 3, 2, 3)]=(-0.607860408138-0.821315053635j)*x[0] + ((-0.000602278617829+0.696698552798j))*x[1]
            ref[(2, 3, 2, 3)]=(-0.304231343378-0.0623082504183j)
            arg[(2, 3, 3, 0)]=(0.879621541734-0.306629974229j)*x[0] + ((0.0170107336919-0.865154160067j))*x[1]
            ref[(2, 3, 3, 0)]=(0.448316137713-0.585892067148j)
            arg[(2, 3, 3, 1)]=(-0.856498373252-0.183510826022j)*x[0] + ((0.906143784207+0.419516037972j))*x[1]
            ref[(2, 3, 3, 1)]=(0.0248227054778+0.118002605975j)
            arg[(2, 3, 3, 2)]=(-0.740419363345-0.131548573436j)*x[0] + ((-0.268790525383-0.0962973313097j))*x[1]
            ref[(2, 3, 3, 2)]=(-0.504604944364-0.113922952373j)
            arg[(2, 3, 3, 3)]=(0.110108984886-0.476973806551j)*x[0] + ((-0.636727371565+0.363923234697j))*x[1]
            ref[(2, 3, 3, 3)]=(-0.263309193339-0.0565252859269j)
        else:
            arg[(0, 0, 0, 0)]=(0.25079438227+0.106563566718j)*x[0] + ((-0.539756677859+0.654918919864j))*x[1] + ((-0.229271766422-0.19970114257j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.259117031006+0.280890672006j)
            arg[(0, 0, 0, 1)]=(-0.360144094012-0.760668200218j)*x[0] + ((-0.0566009000981+0.184629877505j))*x[1] + ((0.608200057522+0.689936222845j))*x[2]
            ref[(0, 0, 0, 1)]=(0.0957275317057+0.0569489500657j)
            arg[(0, 0, 0, 2)]=(-0.143031466659+0.735283624084j)*x[0] + ((0.00503675627267-0.780844385963j))*x[1] + ((-0.192370178253+0.147931909488j))*x[2]
            ref[(0, 0, 0, 2)]=(-0.16518244432+0.0511855738049j)
            arg[(0, 0, 0, 3)]=(-0.280541119008-0.527180711645j)*x[0] + ((0.0577199459463-0.89522822522j))*x[1] + ((-0.310279036671-0.174145588692j))*x[2]
            ref[(0, 0, 0, 3)]=(-0.266550104867-0.798277262778j)
            arg[(0, 0, 1, 0)]=(-0.314481599412-0.891701832441j)*x[0] + ((0.966452044271+0.71731740116j))*x[1] + ((0.120018425359+0.910830735383j))*x[2]
            ref[(0, 0, 1, 0)]=(0.385994435109+0.368223152051j)
            arg[(0, 0, 1, 1)]=(-0.681392034517-0.338227291952j)*x[0] + ((-0.587752645153-0.712169712912j))*x[1] + ((0.293978808607+0.505947599193j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.487582935531-0.272224702835j)
            arg[(0, 0, 1, 2)]=(0.761859153994-0.21879382482j)*x[0] + ((-0.352817019049-0.389944067014j))*x[1] + ((0.533198366097+0.401909767217j))*x[2]
            ref[(0, 0, 1, 2)]=(0.471120250521-0.103414062308j)
            arg[(0, 0, 1, 3)]=(-0.678929680649+0.601379724545j)*x[0] + ((-0.568634331114-0.393486269867j))*x[1] + ((0.375486699561+0.535900353601j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.436038656101+0.371896904139j)
            arg[(0, 0, 2, 0)]=(0.83161257539-0.483388825577j)*x[0] + ((0.861970644656+0.876096050215j))*x[1] + ((0.507577972441+0.179051900546j))*x[2]
            ref[(0, 0, 2, 0)]=(1.10058059624+0.285879562592j)
            arg[(0, 0, 2, 1)]=(-0.276713601784+0.53617588699j)*x[0] + ((-0.849121810109+0.743042971485j))*x[1] + ((-0.0979445946383-0.462267758982j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.611890003266+0.408475549747j)
            arg[(0, 0, 2, 2)]=(0.639436323547-0.0232010239288j)*x[0] + ((0.37341919766-0.329038224942j))*x[1] + ((-0.589718287894-0.420565570254j))*x[2]
            ref[(0, 0, 2, 2)]=(0.211568616657-0.386402409562j)
            arg[(0, 0, 2, 3)]=(0.132433840783+0.300346008394j)*x[0] + ((0.620170047826+0.371299883304j))*x[1] + ((0.0123337212661+0.425007268237j))*x[2]
            ref[(0, 0, 2, 3)]=(0.382468804937+0.548326579968j)
            arg[(0, 0, 3, 0)]=(0.780293631528+0.363677936521j)*x[0] + ((-0.421281186627-0.154299396467j))*x[1] + ((-0.934687163749-0.304435206358j))*x[2]
            ref[(0, 0, 3, 0)]=(-0.287837359424-0.0475283331519j)
            arg[(0, 0, 3, 1)]=(-0.679692517958-0.260939924987j)*x[0] + ((0.915321454968+0.837643494008j))*x[1] + ((-0.641409478781-0.64030569604j))*x[2]
            ref[(0, 0, 3, 1)]=(-0.202890270886-0.0318010635097j)
            arg[(0, 0, 3, 2)]=(0.995071292872-0.0334878002244j)*x[0] + ((-0.177622772649+0.00511944858329j))*x[1] + ((-0.907742605588-0.469452618361j))*x[2]
            ref[(0, 0, 3, 2)]=(-0.0451470426822-0.248910485001j)
            arg[(0, 0, 3, 3)]=(-0.958695004783+0.252770186004j)*x[0] + ((-0.713108074919+0.623894528172j))*x[1] + ((0.940030818303+0.651839876764j))*x[2]
            ref[(0, 0, 3, 3)]=(-0.365886130699+0.76425229547j)
            arg[(0, 1, 0, 0)]=(-0.985332370105+0.806165140015j)*x[0] + ((-0.349087806414-0.665840370558j))*x[1] + ((-0.891610970657+0.236636808666j))*x[2]
            ref[(0, 1, 0, 0)]=(-1.11301557359+0.188480789061j)
            arg[(0, 1, 0, 1)]=(0.00539720757708-0.906423351203j)*x[0] + ((0.530522545776+0.251951312358j))*x[1] + ((0.153315656734-0.622812831783j))*x[2]
            ref[(0, 1, 0, 1)]=(0.344617705044-0.638642435314j)
            arg[(0, 1, 0, 2)]=(-0.894753821876-0.035381633613j)*x[0] + ((0.792279768864+0.29853664536j))*x[1] + ((0.721249666026+0.661170362101j))*x[2]
            ref[(0, 1, 0, 2)]=(0.309387806507+0.462162686924j)
            arg[(0, 1, 0, 3)]=(-0.896235197866-0.727054591894j)*x[0] + ((0.101754756173+0.839166986181j))*x[1] + ((0.46418044196-0.0053240677835j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.165149999866+0.0533941632518j)
            arg[(0, 1, 1, 0)]=(-0.707114746615-0.133341687438j)*x[0] + ((0.367960388809+0.138553328319j))*x[1] + ((0.0934875928193-0.875091557189j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.122833382493-0.434939958154j)
            arg[(0, 1, 1, 1)]=(0.298302776537+0.980712251983j)*x[0] + ((-0.996188489445+0.290594759615j))*x[1] + ((-0.708720165837+0.87788817774j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.703302939373+1.07459759467j)
            arg[(0, 1, 1, 2)]=(0.205490381472-0.718906355569j)*x[0] + ((-0.5865004781-0.807566575096j))*x[1] + ((0.93392082258-0.303254996547j))*x[2]
            ref[(0, 1, 1, 2)]=(0.276455362976-0.914863963607j)
            arg[(0, 1, 1, 3)]=(-0.847970116993+0.156817944047j)*x[0] + ((0.596690831515+0.738827385437j))*x[1] + ((-0.691805780277-0.394123053425j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.471542532878+0.25076113803j)
            arg[(0, 1, 2, 0)]=(-0.13699360836+0.335065641641j)*x[0] + ((-0.976944780514+0.969272381572j))*x[1] + ((0.865670667906-0.990262565501j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.124133860484+0.157037728856j)
            arg[(0, 1, 2, 1)]=(-0.639031811895+0.90927984208j)*x[0] + ((0.13142351986-0.501629007955j))*x[1] + ((-0.188574509416+0.258579853255j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.348091400726+0.33311534369j)
            arg[(0, 1, 2, 2)]=(-0.829351911232+0.237048845637j)*x[0] + ((0.217185839292+0.427752581604j))*x[1] + ((0.964498783776+0.721704668378j))*x[2]
            ref[(0, 1, 2, 2)]=(0.176166355918+0.693253047809j)
            arg[(0, 1, 2, 3)]=(0.616845544009+0.177568009549j)*x[0] + ((0.574279814185-0.270939131974j))*x[1] + ((-0.856307029023-0.371782286432j))*x[2]
            ref[(0, 1, 2, 3)]=(0.167409164586-0.232576704429j)
            arg[(0, 1, 3, 0)]=(0.00211299305989-0.756445866244j)*x[0] + ((-0.879128146018+0.885936842799j))*x[1] + ((0.660285352089+0.0603754647357j))*x[2]
            ref[(0, 1, 3, 0)]=(-0.108364900434+0.0949332206453j)
            arg[(0, 1, 3, 1)]=(0.213071802576-0.866788849286j)*x[0] + ((0.254685371996+0.508776225167j))*x[1] + ((-0.421850544929+0.847720098719j))*x[2]
            ref[(0, 1, 3, 1)]=(0.0229533148213+0.2448537373j)
            arg[(0, 1, 3, 2)]=(0.513038385559+0.484287413648j)*x[0] + ((0.026342897834+0.470890678481j))*x[1] + ((-0.421690697783-0.420723744913j))*x[2]
            ref[(0, 1, 3, 2)]=(0.0588452928049+0.267227173608j)
            arg[(0, 1, 3, 3)]=(-0.0622737569375+0.212203832184j)*x[0] + ((-0.701661958314-0.667031660842j))*x[1] + ((0.785844066244+0.585447718724j))*x[2]
            ref[(0, 1, 3, 3)]=(0.0109541754964+0.0653099450329j)
            arg[(0, 2, 0, 0)]=(0.957257276978-0.708015907083j)*x[0] + ((-0.403462488178+0.216618324824j))*x[1] + ((0.162717359954+0.349200448107j))*x[2]
            ref[(0, 2, 0, 0)]=(0.358256074377-0.0710985670758j)
            arg[(0, 2, 0, 1)]=(-0.952453086542+0.887892330814j)*x[0] + ((0.240241994737+0.784934700617j))*x[1] + ((-0.585106894973-0.475395088199j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.648658993389+0.598715971616j)
            arg[(0, 2, 0, 2)]=(-0.983682009164+0.496605105853j)*x[0] + ((0.569013235207+0.659405814985j))*x[1] + ((-0.39576325067+0.611844450548j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.405216012314+0.883927685693j)
            arg[(0, 2, 0, 3)]=(0.898155316951-0.180476207353j)*x[0] + ((-0.896221252608+0.282100085681j))*x[1] + ((-0.277754564188-0.10984917585j))*x[2]
            ref[(0, 2, 0, 3)]=(-0.137910249922-0.00411264876093j)
            arg[(0, 2, 1, 0)]=(0.30638019373-0.141117586321j)*x[0] + ((0.991394762666+0.287874813847j))*x[1] + ((0.985589996505-0.765972882634j))*x[2]
            ref[(0, 2, 1, 0)]=(1.14168247645-0.309607827554j)
            arg[(0, 2, 1, 1)]=(0.325266461531-0.2855438237j)*x[0] + ((-0.598038210923+0.0954342322422j))*x[1] + ((0.900372049704+0.943526671672j))*x[2]
            ref[(0, 2, 1, 1)]=(0.313800150156+0.376708540107j)
            arg[(0, 2, 1, 2)]=(-0.625704694784+0.471471298501j)*x[0] + ((0.187111397526-0.994848052042j))*x[1] + ((-0.251652049262-0.100880418169j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.34512267326-0.312128585855j)
            arg[(0, 2, 1, 3)]=(-0.978130483466+0.620790704636j)*x[0] + ((-0.145408135959-0.343648523275j))*x[1] + ((-0.208937218652-0.713165397486j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.666237919038-0.218011608062j)
            arg[(0, 2, 2, 0)]=(0.710342123303-0.863205010593j)*x[0] + ((-0.0983735286536-0.624183784029j))*x[1] + ((-0.332797079408-0.664204172135j))*x[2]
            ref[(0, 2, 2, 0)]=(0.139585757621-1.07579648338j)
            arg[(0, 2, 2, 1)]=(-0.262513610002+0.852937831047j)*x[0] + ((-0.711994457144-0.484874432059j))*x[1] + ((-0.678476659796-0.950133396119j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.826492363471-0.291034998565j)
            arg[(0, 2, 2, 2)]=(-0.828415324497-0.204194774631j)*x[0] + ((-0.57457910809-0.990664841514j))*x[1] + ((-0.569000597296-0.242796429118j))*x[2]
            ref[(0, 2, 2, 2)]=(-0.985997514941-0.718828022632j)
            arg[(0, 2, 2, 3)]=(0.318381855444-0.502936215079j)*x[0] + ((-0.600303085345+0.037375703564j))*x[1] + ((0.119204793087-0.00488278928839j))*x[2]
            ref[(0, 2, 2, 3)]=(-0.0813582184073-0.235221650402j)
            arg[(0, 2, 3, 0)]=(0.872109529094+0.142953013112j)*x[0] + ((-0.219127913681-0.045881366978j))*x[1] + ((-0.926225044763-0.104121036518j))*x[2]
            ref[(0, 2, 3, 0)]=(-0.136621714675-0.00352469519212j)
            arg[(0, 2, 3, 1)]=(0.0459993216195+0.303168407318j)*x[0] + ((-0.188660047063-0.920839136507j))*x[1] + ((-0.331089509785-0.343872559064j))*x[2]
            ref[(0, 2, 3, 1)]=(-0.236875117614-0.480771644126j)
            arg[(0, 2, 3, 2)]=(0.688011100211-0.798223777944j)*x[0] + ((0.62980547653-0.585821352242j))*x[1] + ((-0.291379967441+0.788149678821j))*x[2]
            ref[(0, 2, 3, 2)]=(0.51321830465-0.297947725683j)
            arg[(0, 2, 3, 3)]=(0.853668086548+0.368412055807j)*x[0] + ((0.069753644773-0.384646604539j))*x[1] + ((-0.117753591846-0.0742016740578j))*x[2]
            ref[(0, 2, 3, 3)]=(0.402834069737-0.0452181113946j)
            arg[(0, 3, 0, 0)]=(0.445452911805+0.842560889686j)*x[0] + ((-0.517650371624-0.663705548319j))*x[1] + ((-0.825564973766+0.943173379176j))*x[2]
            ref[(0, 3, 0, 0)]=(-0.448881216793+0.561014360272j)
            arg[(0, 3, 0, 1)]=(0.713408393368+0.592421769423j)*x[0] + ((-0.80232124459+0.694855605401j))*x[1] + ((-0.0104336210865+0.881219358176j))*x[2]
            ref[(0, 3, 0, 1)]=(-0.0496732361544+1.0842483665j)
            arg[(0, 3, 0, 2)]=(-0.808930466867+0.439108847932j)*x[0] + ((0.325544801308+0.893431150308j))*x[1] + ((0.208692125889+0.31071675515j))*x[2]
            ref[(0, 3, 0, 2)]=(-0.137346769835+0.821628376695j)
            arg[(0, 3, 0, 3)]=(0.764753580921+0.745475752123j)*x[0] + ((-0.365206697582-0.273519869905j))*x[1] + ((-0.302575396187-0.122401734941j))*x[2]
            ref[(0, 3, 0, 3)]=(0.048485743576+0.174777073638j)
            arg[(0, 3, 1, 0)]=(0.467499116478-0.990210875277j)*x[0] + ((0.469060353775-0.889986597683j))*x[1] + ((0.0493840246343+0.207274876832j))*x[2]
            ref[(0, 3, 1, 0)]=(0.492971747443-0.836461298064j)
            arg[(0, 3, 1, 1)]=(0.692039926039+0.543123901106j)*x[0] + ((-0.631020671108-0.232829689187j))*x[1] + ((-0.845515008315-0.847554479962j))*x[2]
            ref[(0, 3, 1, 1)]=(-0.392247876692-0.268630134021j)
            arg[(0, 3, 1, 2)]=(-0.411686062991+0.259269847622j)*x[0] + ((0.466090122159-0.255242059134j))*x[1] + ((0.173341205094-0.668625221557j))*x[2]
            ref[(0, 3, 1, 2)]=(0.113872632131-0.332298716534j)
            arg[(0, 3, 1, 3)]=(0.490902040488-0.749746701039j)*x[0] + ((-0.41187318505-0.407665686114j))*x[1] + ((-0.349655176819+0.497580612363j))*x[2]
            ref[(0, 3, 1, 3)]=(-0.135313160691-0.329915887395j)
            arg[(0, 3, 2, 0)]=(0.376176731622-0.792239165066j)*x[0] + ((-0.315052162038-0.777150567928j))*x[1] + ((0.466457689784-0.123135720603j))*x[2]
            ref[(0, 3, 2, 0)]=(0.263791129684-0.846262726799j)
            arg[(0, 3, 2, 1)]=(0.234178338525+0.543990702719j)*x[0] + ((-0.725619767593+0.464826393853j))*x[1] + ((-0.871150720881-0.0797215734799j))*x[2]
            ref[(0, 3, 2, 1)]=(-0.681296074975+0.464547761546j)
            arg[(0, 3, 2, 2)]=(-0.1569796309-0.493154279485j)*x[0] + ((-0.774878258573+0.762343890514j))*x[1] + ((0.0866534707778-0.66201120007j))*x[2]
            ref[(0, 3, 2, 2)]=(-0.422602209347-0.196410794521j)
            arg[(0, 3, 2, 3)]=(-0.245103071017+0.879497819806j)*x[0] + ((0.0427642315021+0.49677749922j))*x[1] + ((0.293080845936+0.604270531099j))*x[2]
            ref[(0, 3, 2, 3)]=(0.0453710032103+0.990272925063j)
            arg[(0, 3, 3, 0)]=(0.266192947115-0.319663208199j)*x[0] + ((0.857482543085-0.555250368648j))*x[1] + ((-0.229984508976+0.31239627784j))*x[2]
            ref[(0, 3, 3, 0)]=(0.446845490612-0.281258649504j)
            arg[(0, 3, 3, 1)]=(0.0154961260811-0.270834947531j)*x[0] + ((-0.108623205104-0.331543973975j))*x[1] + ((0.825087839729+0.145980058414j))*x[2]
            ref[(0, 3, 3, 1)]=(0.365980380353-0.228199431546j)
            arg[(0, 3, 3, 2)]=(-0.202400703155+0.527850120825j)*x[0] + ((0.655661833348-0.0216828758455j))*x[1] + ((0.610718430707-0.964331433658j))*x[2]
            ref[(0, 3, 3, 2)]=(0.53198978045-0.229082094339j)
            arg[(0, 3, 3, 3)]=(0.367407765676-0.1843668476j)*x[0] + ((0.297167512293-0.996243863055j))*x[1] + ((-0.14043162975+0.687062010968j))*x[2]
            ref[(0, 3, 3, 3)]=(0.26207182411-0.246774349844j)
            arg[(1, 0, 0, 0)]=(-0.924594018883+0.014096844313j)*x[0] + ((-0.287449664102-0.28698065028j))*x[1] + ((-0.216838651506-0.956915377458j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.714441167246-0.614899591713j)
            arg[(1, 0, 0, 1)]=(-0.488902475986-0.694842444094j)*x[0] + ((-0.70048675159+0.671989981693j))*x[1] + ((-0.286883570619+0.757972467698j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.738136399097+0.367560002649j)
            arg[(1, 0, 0, 2)]=(0.200846307244-0.180035753398j)*x[0] + ((0.21225455635-0.599224257229j))*x[1] + ((0.779740587216+0.808598103046j))*x[2]
            ref[(1, 0, 0, 2)]=(0.596420725405+0.0146690462097j)
            arg[(1, 0, 0, 3)]=(0.447361844153-0.529689857705j)*x[0] + ((-0.309317743752-0.153684663693j))*x[1] + ((0.0304026627658+0.927221550366j))*x[2]
            ref[(1, 0, 0, 3)]=(0.0842233815838+0.121923514484j)
            arg[(1, 0, 1, 0)]=(0.517109226141+0.00812147642989j)*x[0] + ((-0.0707014926248-0.239869911334j))*x[1] + ((-0.393554772373+0.916163630947j))*x[2]
            ref[(1, 0, 1, 0)]=(0.0264264805716+0.342207598021j)
            arg[(1, 0, 1, 1)]=(-0.580924703564+0.312008445864j)*x[0] + ((-0.513016333193-0.331795936851j))*x[1] + ((0.72692717093-0.566419552064j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.183506932914-0.293103521525j)
            arg[(1, 0, 1, 2)]=(0.557869184326+0.528669748845j)*x[0] + ((0.811049012275+0.263859848239j))*x[1] + ((0.102931909898+0.890980884941j))*x[2]
            ref[(1, 0, 1, 2)]=(0.73592505325+0.841755241013j)
            arg[(1, 0, 1, 3)]=(0.855713367663-0.926916196273j)*x[0] + ((-0.096142722774-0.99751630312j))*x[1] + ((0.52961845612+0.0588961264611j))*x[2]
            ref[(1, 0, 1, 3)]=(0.644594550505-0.932768186466j)
            arg[(1, 0, 2, 0)]=(-0.730511502731+0.716774133249j)*x[0] + ((0.847811474492+0.436138229212j))*x[1] + ((0.710643047367+0.212938705938j))*x[2]
            ref[(1, 0, 2, 0)]=(0.413971509564+0.6829255342j)
            arg[(1, 0, 2, 1)]=(-0.516499289587+0.873955474164j)*x[0] + ((0.530221603854+0.977011565421j))*x[1] + ((0.860000557801+0.910393618255j))*x[2]
            ref[(1, 0, 2, 1)]=(0.436861436034+1.38068032892j)
            arg[(1, 0, 2, 2)]=(0.0912435217619+0.127080453911j)*x[0] + ((0.78625582807-0.236986770051j))*x[1] + ((-0.16524554192+0.995485229004j))*x[2]
            ref[(1, 0, 2, 2)]=(0.356126903956+0.442789456432j)
            arg[(1, 0, 2, 3)]=(-0.0178032471474-0.450343805793j)*x[0] + ((0.486522550437+0.353499381846j))*x[1] + ((0.223678568227+0.26896614777j))*x[2]
            ref[(1, 0, 2, 3)]=(0.346198935758+0.0860608619117j)
            arg[(1, 0, 3, 0)]=(0.959014047765+0.913645317293j)*x[0] + ((-0.647122631371+0.797240377712j))*x[1] + ((-0.0855332179067-0.620686067577j))*x[2]
            ref[(1, 0, 3, 0)]=(0.113179099243+0.545099813714j)
            arg[(1, 0, 3, 1)]=(0.785857875884-0.993220085389j)*x[0] + ((0.609180208933+0.658984986531j))*x[1] + ((0.627030400538+0.525644679149j))*x[2]
            ref[(1, 0, 3, 1)]=(1.01103424268+0.0957047901454j)
            arg[(1, 0, 3, 2)]=(0.60103618375-0.790450721644j)*x[0] + ((-0.384713228102+0.880134521241j))*x[1] + ((0.363925546884+0.204942155118j))*x[2]
            ref[(1, 0, 3, 2)]=(0.290124251266+0.147312977357j)
            arg[(1, 0, 3, 3)]=(0.565660937913-0.756399676032j)*x[0] + ((-0.278948915438-0.951285358053j))*x[1] + ((-0.537674046865-0.319748402726j))*x[2]
            ref[(1, 0, 3, 3)]=(-0.125481012195-1.01371671841j)
            arg[(1, 1, 0, 0)]=(0.150836636033+0.216164294877j)*x[0] + ((-0.105647098611-0.433336460861j))*x[1] + ((0.949918227845+0.97817506878j))*x[2]
            ref[(1, 1, 0, 0)]=(0.497553882633+0.380501451398j)
            arg[(1, 1, 0, 1)]=(-0.300545487018-0.768866897956j)*x[0] + ((-0.240096502918-0.598717439662j))*x[1] + ((-0.767035314355-0.82616815529j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.653838652145-1.09687624645j)
            arg[(1, 1, 0, 2)]=(-0.0510734268924+0.158139984545j)*x[0] + ((0.810026019054+0.156424162002j))*x[1] + ((0.602639395952-0.471918086867j))*x[2]
            ref[(1, 1, 0, 2)]=(0.680795994057-0.0786769701602j)
            arg[(1, 1, 0, 3)]=(-0.768583145793-0.720538244794j)*x[0] + ((-0.901420341555-0.212993495122j))*x[1] + ((0.951143998915+0.604992485025j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.359429744217-0.164269627446j)
            arg[(1, 1, 1, 0)]=(-0.215148512796-0.611891549781j)*x[0] + ((-0.613099699462+0.955513504513j))*x[1] + ((0.203415183962-0.468494969531j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.312416514148-0.0624365073994j)
            arg[(1, 1, 1, 1)]=(-0.816724066309-0.633426573211j)*x[0] + ((0.725947925989+0.560508206686j))*x[1] + ((0.929143671502+0.168660313671j))*x[2]
            ref[(1, 1, 1, 1)]=(0.419183765591+0.0478709735732j)
            arg[(1, 1, 1, 2)]=(-0.408121410691-0.877019032946j)*x[0] + ((0.178159857939+0.859320919712j))*x[1] + ((-0.171899017652-0.68138991998j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.200930285202-0.349544016607j)
            arg[(1, 1, 1, 3)]=(-0.739733100259+0.402738642117j)*x[0] + ((-0.95536760545+0.435259384364j))*x[1] + ((-0.397415951818-0.317360789554j))*x[2]
            ref[(1, 1, 1, 3)]=(-1.04625832876+0.260318618464j)
            arg[(1, 1, 2, 0)]=(0.775057181104+0.108120278971j)*x[0] + ((-0.208260530361+0.687539620165j))*x[1] + ((-0.42258753548+0.35880171267j))*x[2]
            ref[(1, 1, 2, 0)]=(0.0721045576319+0.577230805903j)
            arg[(1, 1, 2, 1)]=(0.505048230242+0.115976054997j)*x[0] + ((0.909183698499-0.876891127677j))*x[1] + ((0.988448100589+0.05036300159j))*x[2]
            ref[(1, 1, 2, 1)]=(1.20134001467-0.355276035545j)
            arg[(1, 1, 2, 2)]=(0.99227861867+0.587819203535j)*x[0] + ((-0.702169979237-0.42377085312j))*x[1] + ((0.35273592192-0.112369465269j))*x[2]
            ref[(1, 1, 2, 2)]=(0.321422280676+0.0258394425729j)
            arg[(1, 1, 2, 3)]=(0.696849750639+0.864171078682j)*x[0] + ((-0.980831463293+0.8900172502j))*x[1] + ((-0.659246874949+0.529425191941j))*x[2]
            ref[(1, 1, 2, 3)]=(-0.471614293802+1.14180676041j)
            arg[(1, 1, 3, 0)]=(0.694114748655+0.202361025151j)*x[0] + ((-0.0926448950917-0.276458373611j))*x[1] + ((-0.418459813342-0.0387684903769j))*x[2]
            ref[(1, 1, 3, 0)]=(0.0915050201103-0.0564329194184j)
            arg[(1, 1, 3, 1)]=(-0.170773250788+0.153154455273j)*x[0] + ((0.0511303068069-0.456723624438j))*x[1] + ((0.998179092307-0.761305882762j))*x[2]
            ref[(1, 1, 3, 1)]=(0.439268074163-0.532437525964j)
            arg[(1, 1, 3, 2)]=(0.0430423483978+0.866248355903j)*x[0] + ((0.894740381852+0.783702098704j))*x[1] + ((-0.21610982029+0.631403198981j))*x[2]
            ref[(1, 1, 3, 2)]=(0.36083645498+1.14067682679j)
            arg[(1, 1, 3, 3)]=(0.583770410932-0.517141638847j)*x[0] + ((-0.999681467317-0.960812586441j))*x[1] + ((-0.464071309118+0.427100097576j))*x[2]
            ref[(1, 1, 3, 3)]=(-0.439991182751-0.525427063856j)
            arg[(1, 2, 0, 0)]=(-0.677422347027+0.269026598452j)*x[0] + ((-0.976376780855-0.747469041211j))*x[1] + ((-0.402178303379+0.659951379324j))*x[2]
            ref[(1, 2, 0, 0)]=(-1.02798871563+0.0907544682825j)
            arg[(1, 2, 0, 1)]=(0.01441063794-0.694288941028j)*x[0] + ((-0.987124364539+0.245823788107j))*x[1] + ((-0.66509903977+0.762846899182j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.818906383185+0.157190873131j)
            arg[(1, 2, 0, 2)]=(0.342226663689-0.18184438361j)*x[0] + ((-0.885010489962+0.813238655312j))*x[1] + ((0.90848692819+0.364528308415j))*x[2]
            ref[(1, 2, 0, 2)]=(0.182851550959+0.497961290058j)
            arg[(1, 2, 0, 3)]=(-0.432077957557+0.735156078815j)*x[0] + ((0.632671651235+0.486309490085j))*x[1] + ((0.850050900658-0.439956861694j))*x[2]
            ref[(1, 2, 0, 3)]=(0.525322297168+0.390754353603j)
            arg[(1, 2, 1, 0)]=(0.995274184334-0.0957289809887j)*x[0] + ((-0.743077893602-0.564976195437j))*x[1] + ((-0.432482280094-0.483772205169j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.090142994681-0.572238690797j)
            arg[(1, 2, 1, 1)]=(-0.84590015859+0.927937170494j)*x[0] + ((0.172102641613+0.393501042661j))*x[1] + ((-0.668042583312+0.616734256687j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.670920050144+0.969086234921j)
            arg[(1, 2, 1, 2)]=(0.225760578606-0.590701598166j)*x[0] + ((0.154616101887+0.843857236204j))*x[1] + ((0.512277862583+0.881142864752j))*x[2]
            ref[(1, 2, 1, 2)]=(0.446327271538+0.567149251395j)
            arg[(1, 2, 1, 3)]=(0.785447565926+0.467257993803j)*x[0] + ((-0.926669597787-0.821601530549j))*x[1] + ((0.0908581796752-0.766700663036j))*x[2]
            ref[(1, 2, 1, 3)]=(-0.0251819260932-0.560522099891j)
            arg[(1, 2, 2, 0)]=(0.770077068378+0.264736723003j)*x[0] + ((0.290841992706+0.359936714648j))*x[1] + ((0.526003152456+0.843294749638j))*x[2]
            ref[(1, 2, 2, 0)]=(0.79346110677+0.733984093645j)
            arg[(1, 2, 2, 1)]=(0.527716488452+0.975927230891j)*x[0] + ((0.262514468115+0.864767507034j))*x[1] + ((-0.0638587328897-0.445627253012j))*x[2]
            ref[(1, 2, 2, 1)]=(0.363186111838+0.697533742457j)
            arg[(1, 2, 2, 2)]=(-0.257715123685-0.764312357986j)*x[0] + ((0.647263442238+0.840084142301j))*x[1] + ((0.573542834866-0.762467755101j))*x[2]
            ref[(1, 2, 2, 2)]=(0.48154557671-0.343347985393j)
            arg[(1, 2, 2, 3)]=(-0.604956362233-0.36132690431j)*x[0] + ((0.643485073007+0.637126443322j))*x[1] + ((0.906589091078+0.412765398908j))*x[2]
            ref[(1, 2, 2, 3)]=(0.472558900926+0.34428246896j)
            arg[(1, 2, 3, 0)]=(0.303997608267-0.459568405646j)*x[0] + ((-0.258742682743-0.265902348186j))*x[1] + ((-0.910556185109-0.848921254273j))*x[2]
            ref[(1, 2, 3, 0)]=(-0.432650629793-0.787196004053j)
            arg[(1, 2, 3, 1)]=(0.844387794727+0.163435006486j)*x[0] + ((0.245813576127+0.439686415461j))*x[1] + ((-0.194072889911-0.601050537177j))*x[2]
            ref[(1, 2, 3, 1)]=(0.448064240471+0.001035442385j)
            arg[(1, 2, 3, 2)]=(0.306669288597-0.906879132739j)*x[0] + ((-0.248331283111-0.763255740634j))*x[1] + ((0.13062919846+0.702602540122j))*x[2]
            ref[(1, 2, 3, 2)]=(0.0944836019728-0.483766166625j)
            arg[(1, 2, 3, 3)]=(-0.847378294386-0.400338468092j)*x[0] + ((-0.218146704283-0.164011445225j))*x[1] + ((0.170759761347-0.319168757178j))*x[2]
            ref[(1, 2, 3, 3)]=(-0.447382618661-0.441759335248j)
            arg[(1, 3, 0, 0)]=(0.134433641287+0.714319239155j)*x[0] + ((-0.973918424656-0.540440954469j))*x[1] + ((0.232339213284+0.683548767264j))*x[2]
            ref[(1, 3, 0, 0)]=(-0.303572785043+0.428713525975j)
            arg[(1, 3, 0, 1)]=(-0.462209576833+0.0721486565275j)*x[0] + ((-0.558286063529-0.300342041063j))*x[1] + ((-0.0278952482044+0.781163651199j))*x[2]
            ref[(1, 3, 0, 1)]=(-0.524195444283+0.276485133332j)
            arg[(1, 3, 0, 2)]=(0.756561786403+0.653046211178j)*x[0] + ((-0.958242709125-0.945688628057j))*x[1] + ((-0.451013800449-0.732217855404j))*x[2]
            ref[(1, 3, 0, 2)]=(-0.326347361586-0.512430136142j)
            arg[(1, 3, 0, 3)]=(-0.173356683066+0.213870343609j)*x[0] + ((-0.441743633019+0.707751569873j))*x[1] + ((-0.881405528701+0.968635189023j))*x[2]
            ref[(1, 3, 0, 3)]=(-0.748252922393+0.945128551253j)
            arg[(1, 3, 1, 0)]=(-0.445084465901+0.507803513218j)*x[0] + ((0.837455576108-0.313905039474j))*x[1] + ((-0.616198300289-0.461679336272j))*x[2]
            ref[(1, 3, 1, 0)]=(-0.111913595041-0.133890431264j)
            arg[(1, 3, 1, 1)]=(0.847090233437-0.316911208179j)*x[0] + ((-0.02075430359-0.164809791029j))*x[1] + ((-0.629005527168-0.674965424734j))*x[2]
            ref[(1, 3, 1, 1)]=(0.0986652013395-0.578343211971j)
            arg[(1, 3, 1, 2)]=(0.199345152379-0.572975275518j)*x[0] + ((0.883403095313+0.214319193015j))*x[1] + ((0.0327259927572-0.826782559349j))*x[2]
            ref[(1, 3, 1, 2)]=(0.557737120225-0.592719320926j)
            arg[(1, 3, 1, 3)]=(0.0453806865587-0.226097441819j)*x[0] + ((0.38170495826+0.282825983257j))*x[1] + ((-0.392903701024-0.813554771052j))*x[2]
            ref[(1, 3, 1, 3)]=(0.0170909718974-0.378413114807j)
            arg[(1, 3, 2, 0)]=(0.883061126956+0.457636950132j)*x[0] + ((0.942222625126+0.958372179596j))*x[1] + ((0.192531469445+0.819380050469j))*x[2]
            ref[(1, 3, 2, 0)]=(1.00890761076+1.1176945901j)
            arg[(1, 3, 2, 1)]=(0.0409741415363-0.729956152673j)*x[0] + ((0.586942654765+0.487293608526j))*x[1] + ((0.989264019632+0.53260267139j))*x[2]
            ref[(1, 3, 2, 1)]=(0.808590407966+0.144970063622j)
            arg[(1, 3, 2, 2)]=(0.94089630585-0.908597116116j)*x[0] + ((-0.664236314165+0.653694923767j))*x[1] + ((0.430568103572+0.432014523857j))*x[2]
            ref[(1, 3, 2, 2)]=(0.353614047628+0.0885561657539j)
            arg[(1, 3, 2, 3)]=(-0.686989937214+0.601587350734j)*x[0] + ((0.853283216374-0.586150759704j))*x[1] + ((0.239058878848-0.701776680052j))*x[2]
            ref[(1, 3, 2, 3)]=(0.202676079004-0.343170044511j)
            arg[(1, 3, 3, 0)]=(0.214957920505+0.521262648653j)*x[0] + ((0.39626997539+0.852536488043j))*x[1] + ((0.486746003618+0.42893875927j))*x[2]
            ref[(1, 3, 3, 0)]=(0.548986949757+0.901368947983j)
            arg[(1, 3, 3, 1)]=(-0.636057464865+0.454310462425j)*x[0] + ((0.745005702373+0.199633555417j))*x[1] + ((-0.946226183883+0.706990855543j))*x[2]
            ref[(1, 3, 3, 1)]=(-0.418638973187+0.680467436693j)
            arg[(1, 3, 3, 2)]=(-0.226468825975+0.00185688022555j)*x[0] + ((0.092880930325-0.963735961703j))*x[1] + ((-0.635884453178-0.0878318679024j))*x[2]
            ref[(1, 3, 3, 2)]=(-0.384736174414-0.52485547469j)
            arg[(1, 3, 3, 3)]=(-0.801221797236+0.0366796083324j)*x[0] + ((-0.443803013+0.663309058867j))*x[1] + ((0.699760248605-0.20499829718j))*x[2]
            ref[(1, 3, 3, 3)]=(-0.272632280815+0.24749518501j)
            arg[(2, 0, 0, 0)]=(0.769446000299+0.0433553341193j)*x[0] + ((0.692972046926-0.583247850675j))*x[1] + ((-0.391647301624-0.910180184746j))*x[2]
            ref[(2, 0, 0, 0)]=(0.535385372801-0.725036350651j)
            arg[(2, 0, 0, 1)]=(0.138300851446-0.00774814475351j)*x[0] + ((-0.892164482752+0.623980620767j))*x[1] + ((-0.94654545432+0.443194295904j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.850204542813+0.529713385959j)
            arg[(2, 0, 0, 2)]=(0.00168318398192+0.673282819028j)*x[0] + ((0.140680411374+0.366428477923j))*x[1] + ((0.706655663348-0.260259781791j))*x[2]
            ref[(2, 0, 0, 2)]=(0.424509629352+0.38972575758j)
            arg[(2, 0, 0, 3)]=(0.52199660108+0.972964689688j)*x[0] + ((0.260153995091+0.331257136615j))*x[1] + ((-0.489680963277+0.265841809659j))*x[2]
            ref[(2, 0, 0, 3)]=(0.146234816447+0.785031817981j)
            arg[(2, 0, 1, 0)]=(-0.631909067056-0.670270782301j)*x[0] + ((-0.246326175534+0.519722448405j))*x[1] + ((0.0885183194882+0.680916860925j))*x[2]
            ref[(2, 0, 1, 0)]=(-0.394858461551+0.265184263514j)
            arg[(2, 0, 1, 1)]=(-0.332038572394+0.255573711058j)*x[0] + ((-0.399675019787+0.0581394917015j))*x[1] + ((-0.560954816238-0.30367965319j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.64633420421+0.00501677478488j)
            arg[(2, 0, 1, 2)]=(-0.974789528691-0.987004145228j)*x[0] + ((-0.397550752472+0.118467268139j))*x[1] + ((0.412411235786-0.391975167926j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.479964522689-0.630256022508j)
            arg[(2, 0, 1, 3)]=(-0.143599625819-0.840535887275j)*x[0] + ((-0.326757590053-0.61084716411j))*x[1] + ((8.66404122821e-05+0.771096720974j))*x[2]
            ref[(2, 0, 1, 3)]=(-0.23513528773-0.340143165206j)
            arg[(2, 0, 2, 0)]=(0.974766848614-0.538926146073j)*x[0] + ((-0.623861858012-0.139996407323j))*x[1] + ((-0.0267948770644-0.667412000707j))*x[2]
            ref[(2, 0, 2, 0)]=(0.162055056768-0.673167277051j)
            arg[(2, 0, 2, 1)]=(-0.253843923606+0.69982513281j)*x[0] + ((0.931197229103-0.23262162645j))*x[1] + ((-0.83868355341-0.36592152814j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.0806651239565+0.0506409891104j)
            arg[(2, 0, 2, 2)]=(0.834485325756-0.381237049455j)*x[0] + ((-0.916142362621+0.52746466293j))*x[1] + ((-0.622759547826-0.23879750617j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.352208292345-0.0462849463476j)
            arg[(2, 0, 2, 3)]=(-0.603636166863-0.0518729569234j)*x[0] + ((0.815966639727+0.709466445436j))*x[1] + ((-0.383445946022+0.637832298324j))*x[2]
            ref[(2, 0, 2, 3)]=(-0.085557736579+0.647712893418j)
            arg[(2, 0, 3, 0)]=(-0.931231577516+0.183514658449j)*x[0] + ((-0.0982560303549+0.589224224578j))*x[1] + ((-0.125933830936+0.867148795327j))*x[2]
            ref[(2, 0, 3, 0)]=(-0.577710719404+0.819943839177j)
            arg[(2, 0, 3, 1)]=(0.686763842948+0.572956794711j)*x[0] + ((-0.862038703415-0.925679476696j))*x[1] + ((-0.0837276587367-0.751776505718j))*x[2]
            ref[(2, 0, 3, 1)]=(-0.129501259602-0.552249593852j)
            arg[(2, 0, 3, 2)]=(-0.0968450328614-0.714369290444j)*x[0] + ((0.387315921124-0.983081685059j))*x[1] + ((0.388358041137-0.198755245199j))*x[2]
            ref[(2, 0, 3, 2)]=(0.3394144647-0.948103110351j)
            arg[(2, 0, 3, 3)]=(0.814124810874+0.756216872571j)*x[0] + ((-0.0901606480921+0.193719919571j))*x[1] + ((-0.100216317344-0.118135260731j))*x[2]
            ref[(2, 0, 3, 3)]=(0.311873922719+0.415900765706j)
            arg[(2, 1, 0, 0)]=(0.997273706803+0.916986179408j)*x[0] + ((0.799372674507+0.676867354548j))*x[1] + ((0.201570616548-0.554028873439j))*x[2]
            ref[(2, 1, 0, 0)]=(0.999108498929+0.519912330259j)
            arg[(2, 1, 0, 1)]=(-0.552572642923+0.686276472403j)*x[0] + ((-0.27966777748-0.90635082783j))*x[1] + ((0.29199851125-0.54715118167j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.270120954576-0.383612768549j)
            arg[(2, 1, 0, 2)]=(-0.0277783855061-0.90769305248j)*x[0] + ((0.639644057821+0.220550139803j))*x[1] + ((-0.26586168045-0.233312359378j))*x[2]
            ref[(2, 1, 0, 2)]=(0.173001995933-0.460227636028j)
            arg[(2, 1, 0, 3)]=(0.966290445323-0.450357144098j)*x[0] + ((-0.7988071624+0.292782392648j))*x[1] + ((0.244233883246+0.0329889281287j))*x[2]
            ref[(2, 1, 0, 3)]=(0.205858583085-0.062292911661j)
            arg[(2, 1, 1, 0)]=(0.753341298745+0.615964904201j)*x[0] + ((0.312839753489-0.182341419846j))*x[1] + ((0.304056695773+0.907381023451j))*x[2]
            ref[(2, 1, 1, 0)]=(0.685118874004+0.670502253903j)
            arg[(2, 1, 1, 1)]=(0.0980329857105+0.261632166465j)*x[0] + ((-0.59007909442-0.230973313255j))*x[1] + ((-0.964480599054-0.379114705882j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.728263353882-0.174227926336j)
            arg[(2, 1, 1, 2)]=(0.299264278391-0.985997642809j)*x[0] + ((0.320257670902-0.666993267434j))*x[1] + ((-0.996382154725-0.649789898902j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.188430102716-1.15139040457j)
            arg[(2, 1, 1, 3)]=(0.569146869332+0.490033515126j)*x[0] + ((-0.63446223161-0.786903816441j))*x[1] + ((0.082542922585+0.264994948803j))*x[2]
            ref[(2, 1, 1, 3)]=(0.00861378015331-0.0159376762561j)
            arg[(2, 1, 2, 0)]=(-0.845222164203-0.0375680615719j)*x[0] + ((-0.433980978473-0.223195154311j))*x[1] + ((-0.536898148662-0.613514160423j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.908050645669-0.437138688153j)
            arg[(2, 1, 2, 1)]=(-0.0249517640441-0.972292251834j)*x[0] + ((0.0196073267536-0.174290036777j))*x[1] + ((-0.786345514645-0.522665201725j))*x[2]
            ref[(2, 1, 2, 1)]=(-0.395844975968-0.834623745168j)
            arg[(2, 1, 2, 2)]=(-0.683108525621+0.558870969638j)*x[0] + ((0.425591980196-0.771892563392j))*x[1] + ((0.0481044783545+0.059106161743j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.104706033535-0.0769577160057j)
            arg[(2, 1, 2, 3)]=(-0.785316468973-0.349502561883j)*x[0] + ((0.662387562232-0.358346885065j))*x[1] + ((0.00407260460025-0.971250941745j))*x[2]
            ref[(2, 1, 2, 3)]=(-0.0594281510704-0.839550194347j)
            arg[(2, 1, 3, 0)]=(-0.0804359062479-0.327773856699j)*x[0] + ((-0.395676372772+0.0632089721565j))*x[1] + ((0.397052617628+0.161134500281j))*x[2]
            ref[(2, 1, 3, 0)]=(-0.0395298306958-0.0517151921307j)
            arg[(2, 1, 3, 1)]=(-0.831526039448-0.248446814005j)*x[0] + ((-0.544480828265+0.656461587357j))*x[1] + ((0.286594385575-0.219312784187j))*x[2]
            ref[(2, 1, 3, 1)]=(-0.544706241069+0.0943509945825j)
            arg[(2, 1, 3, 2)]=(-0.100098306861-0.879224664451j)*x[0] + ((-0.988859121153-0.422430479337j))*x[1] + ((0.862973930557-0.570669153477j))*x[2]
            ref[(2, 1, 3, 2)]=(-0.112991748728-0.936162148633j)
            arg[(2, 1, 3, 3)]=(-0.754804038246+0.73632371637j)*x[0] + ((0.143539041107+0.639006154811j))*x[1] + ((-0.306278976245-0.701568035258j))*x[2]
            ref[(2, 1, 3, 3)]=(-0.458771986692+0.336880917961j)
            arg[(2, 2, 0, 0)]=(-0.379131156073+0.394217342587j)*x[0] + ((-0.661959166618-0.528374632173j))*x[1] + ((-0.356455000019-0.846437915633j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.698772661355-0.490297602609j)
            arg[(2, 2, 0, 1)]=(0.428945020593+0.773394590846j)*x[0] + ((0.983753998985-0.433904541308j))*x[1] + ((-0.305264727696+0.113290517033j))*x[2]
            ref[(2, 2, 0, 1)]=(0.553717145941+0.226390283286j)
            arg[(2, 2, 0, 2)]=(0.568929858488-0.22791011807j)*x[0] + ((0.679441493216-0.834883075529j))*x[1] + ((0.503326067147+0.406616707257j))*x[2]
            ref[(2, 2, 0, 2)]=(0.875848709425-0.328088243171j)
            arg[(2, 2, 0, 3)]=(-0.2770124605+0.0800394555048j)*x[0] + ((-0.879851995536+0.243941705199j))*x[1] + ((0.874853753904+0.428284130763j))*x[2]
            ref[(2, 2, 0, 3)]=(-0.141005351066+0.376132645733j)
            arg[(2, 2, 1, 0)]=(0.618357930796-0.931549135706j)*x[0] + ((0.915587256352+0.739529309791j))*x[1] + ((-0.228148455513+0.237883854882j))*x[2]
            ref[(2, 2, 1, 0)]=(0.652898365817+0.0229320144837j)
            arg[(2, 2, 1, 1)]=(0.767862033602-0.0120324199481j)*x[0] + ((-0.758038481179+0.531145659285j))*x[1] + ((0.613583744156+0.0404378498796j))*x[2]
            ref[(2, 2, 1, 1)]=(0.311703648289+0.279775544608j)
            arg[(2, 2, 1, 2)]=(-0.455081311798-0.991347049306j)*x[0] + ((-0.255433745599+0.413671821102j))*x[1] + ((0.145671246174+0.21074731052j))*x[2]
            ref[(2, 2, 1, 2)]=(-0.282421905612-0.183463958842j)
            arg[(2, 2, 1, 3)]=(-0.143742938651-0.027012421726j)*x[0] + ((0.164772839889-0.586212490859j))*x[1] + ((0.124477204932-0.802301879248j))*x[2]
            ref[(2, 2, 1, 3)]=(0.072753553085-0.707763395917j)
            arg[(2, 2, 2, 0)]=(-0.350068568673+0.957491558929j)*x[0] + ((-0.442984275275+0.22673763517j))*x[1] + ((0.844250467056+0.158415013329j))*x[2]
            ref[(2, 2, 2, 0)]=(0.025598811554+0.671322103713j)
            arg[(2, 2, 2, 1)]=(-0.542172466268-0.316908142093j)*x[0] + ((0.258473582522+0.155078204377j))*x[1] + ((-0.0260144696198+0.577011037364j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.154856676683+0.207590549824j)
            arg[(2, 2, 2, 2)]=(-0.211105396595-0.225673845832j)*x[0] + ((0.0830750666312-0.608871927148j))*x[1] + ((0.220487857078+0.903562137427j))*x[2]
            ref[(2, 2, 2, 2)]=(0.0462287635568+0.0345081822236j)
            arg[(2, 2, 2, 3)]=(-0.0465570023609+0.295113924316j)*x[0] + ((0.844110266802+0.880540670885j))*x[1] + ((-0.63843206119-0.623231658352j))*x[2]
            ref[(2, 2, 2, 3)]=(0.0795606016256+0.276211468424j)
            arg[(2, 2, 3, 0)]=(0.119184942297+0.260489456726j)*x[0] + ((-0.426400794517-0.0825456115104j))*x[1] + ((0.508452394741+0.0980848534242j))*x[2]
            ref[(2, 2, 3, 0)]=(0.100618271261+0.13801434932j)
            arg[(2, 2, 3, 1)]=(-0.0192782696365+0.157730155582j)*x[0] + ((-0.286690469782-0.335603086511j))*x[1] + ((0.594972200621-0.739244968625j))*x[2]
            ref[(2, 2, 3, 1)]=(0.144501730601-0.458558949777j)
            arg[(2, 2, 3, 2)]=(-0.779416043524+0.698889267376j)*x[0] + ((-0.545122365145-0.0227245472235j))*x[1] + ((-0.506820302654-0.560129376525j))*x[2]
            ref[(2, 2, 3, 2)]=(-0.915679355661+0.058017671814j)
            arg[(2, 2, 3, 3)]=(0.793100046776-0.594161356518j)*x[0] + ((0.716047873292-0.84428199872j))*x[1] + ((-0.93611966507+0.746987104787j))*x[2]
            ref[(2, 2, 3, 3)]=(0.286514127499-0.345728125225j)
            arg[(2, 3, 0, 0)]=(-0.0424880292545+0.587509831414j)*x[0] + ((0.567696493787+0.613088311364j))*x[1] + ((-0.458087958419+0.507850030452j))*x[2]
            ref[(2, 3, 0, 0)]=(0.0335602530568+0.854224086615j)
            arg[(2, 3, 0, 1)]=(0.780093650575+0.0983562904352j)*x[0] + ((0.600854732607+0.861156768752j))*x[1] + ((-0.560405604396+0.770293712694j))*x[2]
            ref[(2, 3, 0, 1)]=(0.410271389393+0.864903385941j)
            arg[(2, 3, 0, 2)]=(-0.251326101144+0.360606434829j)*x[0] + ((-0.688466394302+0.146579694169j))*x[1] + ((-0.835582711568-0.834917689222j))*x[2]
            ref[(2, 3, 0, 2)]=(-0.887687603507-0.163865780112j)
            arg[(2, 3, 0, 3)]=(-0.90217870417-0.649120598128j)*x[0] + ((-0.971461577968-0.918572417343j))*x[1] + ((0.590976815537-0.601665717389j))*x[2]
            ref[(2, 3, 0, 3)]=(-0.641331733301-1.08467936643j)
            arg[(2, 3, 1, 0)]=(0.213180098796-0.123848064884j)*x[0] + ((0.213995714288-0.49422653588j))*x[1] + ((-0.955133846943-0.459952954029j))*x[2]
            ref[(2, 3, 1, 0)]=(-0.26397901693-0.539013777396j)
            arg[(2, 3, 1, 1)]=(-0.730398049772+0.261427322946j)*x[0] + ((-0.0491792166473+0.590298520819j))*x[1] + ((-0.57230300132-0.937220099026j))*x[2]
            ref[(2, 3, 1, 1)]=(-0.675940133869-0.0427471276302j)
            arg[(2, 3, 1, 2)]=(-0.258208075172+0.897000163174j)*x[0] + ((-0.266431454854-0.447818400097j))*x[1] + ((0.836072828822-0.0405852708711j))*x[2]
            ref[(2, 3, 1, 2)]=(0.155716649398+0.204298246103j)
            arg[(2, 3, 1, 3)]=(0.297211542535-0.335892050502j)*x[0] + ((0.215365491297-0.736311033045j))*x[1] + ((-0.681234470609+0.0708355299125j))*x[2]
            ref[(2, 3, 1, 3)]=(-0.0843287183882-0.500683776817j)
            arg[(2, 3, 2, 0)]=(0.488683519888+0.325052684168j)*x[0] + ((-0.573358537849+0.622599857786j))*x[1] + ((-0.991762618861-0.177130190198j))*x[2]
            ref[(2, 3, 2, 0)]=(-0.538218818411+0.385261175878j)
            arg[(2, 3, 2, 1)]=(0.183077403021-0.455311617615j)*x[0] + ((0.849117894005-0.178194277482j))*x[1] + ((0.928209283049+0.993492385643j))*x[2]
            ref[(2, 3, 2, 1)]=(0.980202290038+0.179993245273j)
            arg[(2, 3, 2, 2)]=(-0.601885458364-0.397607276668j)*x[0] + ((-0.589283790757-0.962685940667j))*x[1] + ((-0.156119598521-0.528206748469j))*x[2]
            ref[(2, 3, 2, 2)]=(-0.673644423821-0.944249982902j)
            arg[(2, 3, 2, 3)]=(-0.257684493605-0.42706467637j)*x[0] + ((0.866832357635+0.487955333262j))*x[1] + ((0.3184880098-0.802082469923j))*x[2]
            ref[(2, 3, 2, 3)]=(0.463817936915-0.370595906515j)
            arg[(2, 3, 3, 0)]=(0.103893781514-0.778095923224j)*x[0] + ((0.847485623406+0.422737352091j))*x[1] + ((0.687551232661+0.0413254731508j))*x[2]
            ref[(2, 3, 3, 0)]=(0.81946531879-0.157016548991j)
            arg[(2, 3, 3, 1)]=(0.26229874564-0.35350793535j)*x[0] + ((-0.208720189287-0.0985136201411j))*x[1] + ((0.490745532242+0.409724416411j))*x[2]
            ref[(2, 3, 3, 1)]=(0.272162044297-0.0211485695399j)
            arg[(2, 3, 3, 2)]=(0.00607225177825-0.231360870178j)*x[0] + ((-0.686308714813-0.138912559844j))*x[1] + ((0.912433067257-0.506544770204j))*x[2]
            ref[(2, 3, 3, 2)]=(0.116098302111-0.438409100113j)
            arg[(2, 3, 3, 3)]=(0.133939156583+0.0781258498431j)*x[0] + ((-0.295271464383+0.590944818968j))*x[1] + ((0.691430582845-0.439681312413j))*x[2]
            ref[(2, 3, 3, 3)]=(0.265049137522+0.114694678199j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Function_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.157214840144+0.158923440908j)*x[0]**o + ((-0.474429075582+0.614954658463j))*x[0] + ((0.693015308128-0.841363910479j))*x[1]**o + ((-0.851104180375+0.905487764921j))*x[1]
            ref=(-0.237651553843+0.419000976906j)-((0.141705024712-0.113740078262j))*(o-1.)
        else:
            arg=(0.47762182879-0.272504355554j)*x[0]**o + ((-0.937632277566+0.623590175305j))*x[0] + ((0.817111796065-0.249114209887j))*x[1]**o + ((0.839279279714-0.123687251064j))*x[1] + ((0.32397177414+0.619117091131j))*x[2]**o + ((-0.556828004823-0.131216996514j))*x[2]
            ref=(0.481762198161+0.233092226708j)-((0.269784233166+0.0162497542817j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Function_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.249589467478-0.0154175342228j)*x[0]**o + ((0.764423701454-0.885759918021j))*x[0] + ((0.944790795666-0.608726571563j))*x[1]**o + ((0.531604700602-0.863041310435j))*x[1]
            ref[(0,)]=(0.995614865122-1.18647266712j)-((0.115866888031-0.104024017631j))*(o-1.)
            arg[(1,)]=(0.930004580414+0.627732871704j)*x[0]**o + ((-0.323102643208+0.382332197074j))*x[0] + ((-0.0820319779796-0.0016250373115j))*x[1]**o + ((0.0324538298765+0.177610679113j))*x[1]
            ref[(1,)]=(0.278661894551+0.59302535529j)-((0.141328767072+0.104351305732j))*(o-1.)
            arg[(2,)]=(-0.342539676348+0.22364813516j)*x[0]**o + ((0.554691976581-0.258113703546j))*x[0] + ((-0.480229089911-0.898037423073j))*x[1]**o + ((-0.229038981045+0.679543842052j))*x[1]
            ref[(2,)]=(-0.248557885362-0.126479574704j)-((-0.13712812771-0.112398214652j))*(o-1.)
            arg[(3,)]=(-0.798927235915+0.524760071163j)*x[0]**o + ((0.215353938911+0.773371456478j))*x[0] + ((0.366376007934+0.461547434644j))*x[1]**o + ((-0.567366560103-0.0806692614793j))*x[1]
            ref[(3,)]=(-0.392281924586+0.839504850403j)-((-0.0720918713301+0.164384584301j))*(o-1.)
        else:
            arg[(0,)]=(-0.96877554581+0.804978186654j)*x[0]**o + ((-0.136452668102+0.431123357817j))*x[0] + ((0.689851265209-0.591375674729j))*x[1]**o + ((0.165006761943+0.185369338931j))*x[1] + ((-0.96654842846+0.695952812778j))*x[2]**o + ((0.53346476302+0.357053175582j))*x[2]
            ref[(0,)]=(-0.341726926101+0.941550598517j)-((-0.207578784844+0.151592554117j))*(o-1.)
            arg[(1,)]=(-0.350962272552-0.506067516916j)*x[0]**o + ((0.123331887715+0.0044148153308j))*x[0] + ((-0.106485493102+0.871675722653j))*x[1]**o + ((-0.549863513496+0.208193052383j))*x[1] + ((0.983723690242-0.0356895140884j))*x[2]**o + ((0.396839665752-0.7710610087j))*x[2]
            ref[(1,)]=(0.24829198228-0.114267224669j)-((0.087712654098+0.054986448608j))*(o-1.)
            arg[(2,)]=(0.792440232867+0.644254412396j)*x[0]**o + ((-0.712078467059-0.926843883899j))*x[0] + ((0.971520992441+0.858411574928j))*x[1]**o + ((0.247856056448-0.481139954858j))*x[1] + ((0.488446076775-0.339542981813j))*x[2]**o + ((-0.679461344573-0.841620479194j))*x[2]
            ref[(2,)]=(0.554361773449-0.54324065622j)-((0.375401217014+0.193853834252j))*(o-1.)
            arg[(3,)]=(-0.68171920556-0.673417546248j)*x[0]**o + ((0.931452801761-0.183802212223j))*x[0] + ((0.739397195151-0.354296991722j))*x[1]**o + ((0.486473055113+0.205409072239j))*x[1] + ((0.33228622327+0.847275686785j))*x[2]**o + ((0.816881048869-0.416257356995j))*x[2]
            ref[(3,)]=(1.3123855593-0.287544674082j)-((0.0649940354768-0.0300731418641j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Function_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.289418106043-0.309855372446j)*x[0]**o + ((-0.292894762382+0.915718863586j))*x[0] + ((0.450734921055+0.93190586253j))*x[1]**o + ((0.382021508279-0.520742933724j))*x[1]
            ref[(0, 0)]=(0.125221780455+0.508513209973j)-((0.0268861358354+0.103675081681j))*(o-1.)
            arg[(0, 1)]=(0.852504902125+0.414704591089j)*x[0]**o + ((-0.219791342102-0.140279782054j))*x[0] + ((-0.958118094799-0.917600296204j))*x[1]**o + ((-0.757897399554-0.770456781004j))*x[1]
            ref[(0, 1)]=(-0.541650967165-0.706816134087j)-((-0.0176021987789-0.0838159508525j))*(o-1.)
            arg[(0, 2)]=(-0.599754843839-0.554929721512j)*x[0]**o + ((0.759536449091-0.542807431155j))*x[0] + ((-0.913745419547+0.815882910059j))*x[1]**o + ((-0.855731681721+0.360717794169j))*x[1]
            ref[(0, 2)]=(-0.804847748008+0.0394317757805j)-((-0.252250043898+0.0434921980912j))*(o-1.)
            arg[(0, 3)]=(0.500854897269-0.142427388471j)*x[0]**o + ((-0.826872516367-0.540629117409j))*x[0] + ((0.989258009404-0.441544690574j))*x[1]**o + ((-0.392417373132+0.826523445887j))*x[1]
            ref[(0, 3)]=(0.135411508587-0.149038875284j)-((0.248352151112-0.0973286798409j))*(o-1.)
            arg[(1, 0)]=(-0.30879008529+0.29820162285j)*x[0]**o + ((0.95400508135+0.301051605033j))*x[0] + ((-0.398581883866+0.918784004221j))*x[1]**o + ((0.753080494537-0.579681129981j))*x[1]
            ref[(1, 0)]=(0.499856803365+0.469178051062j)-((-0.117895328193+0.202830937845j))*(o-1.)
            arg[(1, 1)]=(-0.214390962378+0.762010702225j)*x[0]**o + ((0.235710787186-0.816716072719j))*x[0] + ((-0.600003860788-0.987360957135j))*x[1]**o + ((-0.304859342569-0.660918270409j))*x[1]
            ref[(1, 1)]=(-0.441771689274-0.851492299019j)-((-0.135732470528-0.0375583758182j))*(o-1.)
            arg[(1, 2)]=(-0.876906574324+0.529635088573j)*x[0]**o + ((-0.779744146995+0.606370316363j))*x[0] + ((-0.336571803556-0.380886699754j))*x[1]**o + ((-0.0682166546336+0.539238205028j))*x[1]
            ref[(1, 2)]=(-1.03071958975+0.647178455105j)-((-0.202246396313+0.0247913981366j))*(o-1.)
            arg[(1, 3)]=(-0.822309112237+0.649388131891j)*x[0]**o + ((0.415360418897+0.953094863872j))*x[0] + ((-0.87680683442-0.17720359661j))*x[1]**o + ((-0.722213516219+0.218356497558j))*x[1]
            ref[(1, 3)]=(-1.00298452199+0.821817948355j)-((-0.28318599111+0.0786974225468j))*(o-1.)
            arg[(2, 0)]=(0.916408586949+0.993110906274j)*x[0]**o + ((-0.808168574385-0.717103768497j))*x[0] + ((-0.511615973852-0.523589628322j))*x[1]**o + ((0.794989065226-0.799169834052j))*x[1]
            ref[(2, 0)]=(0.195806551969-0.523376162299j)-((0.0674654355161+0.0782535463253j))*(o-1.)
            arg[(2, 1)]=(-0.596798093279+0.300782382716j)*x[0]**o + ((-0.635285951012-0.71793847274j))*x[0] + ((-0.244226087403+0.271358166264j))*x[1]**o + ((0.0455364232004+0.762393774842j))*x[1]
            ref[(2, 1)]=(-0.715386854246+0.308297925541j)-((-0.14017069678+0.0953567581634j))*(o-1.)
            arg[(2, 2)]=(-0.905471625142+0.785069600675j)*x[0]**o + ((-0.481153470388+0.732388689975j))*x[0] + ((0.696433457734-0.58984140668j))*x[1]**o + ((0.0605334498495+0.934560565916j))*x[1]
            ref[(2, 2)]=(-0.314829093973+0.931088724943j)-((-0.034839694568+0.0325380323325j))*(o-1.)
            arg[(2, 3)]=(-0.891916872321+0.89095573289j)*x[0]**o + ((-0.383262846888+0.372866116153j))*x[0] + ((0.0702524273977-0.202652075149j))*x[1]**o + ((-0.1775785281+0.565782195752j))*x[1]
            ref[(2, 3)]=(-0.691252909956+0.813475984823j)-((-0.136944074154+0.11471727629j))*(o-1.)
            arg[(3, 0)]=(0.220726269585+0.640305882865j)*x[0]**o + ((0.440642385491-0.351903565914j))*x[0] + ((-0.897630995446-0.697543308241j))*x[1]**o + ((-0.170301346897-0.470166369148j))*x[1]
            ref[(3, 0)]=(-0.203281843634-0.439653680219j)-((-0.11281745431-0.00953957089612j))*(o-1.)
            arg[(3, 1)]=(-0.256101435328+0.566950431405j)*x[0]**o + ((0.993462679271-0.779105851013j))*x[0] + ((0.457514176105+0.39187885773j))*x[1]**o + ((0.322976841383-0.0132482863067j))*x[1]
            ref[(3, 1)]=(0.758926130716+0.0832375759075j)-((0.0335687901295+0.159804881522j))*(o-1.)
            arg[(3, 2)]=(0.472819804113+0.521474144165j)*x[0]**o + ((0.13388983119-0.66803250039j))*x[0] + ((-0.326924609838+0.592925037726j))*x[1]**o + ((0.494847418139+0.581800265759j))*x[1]
            ref[(3, 2)]=(0.387316221802+0.51408347363j)-((0.0243158657125+0.185733196982j))*(o-1.)
            arg[(3, 3)]=(-0.70972063899+0.392849264892j)*x[0]**o + ((0.324571758044-0.369051112022j))*x[0] + ((-0.514333630829-0.46877277721j))*x[1]**o + ((-0.90502236513-0.939433106476j))*x[1]
            ref[(3, 3)]=(-0.902252438452-0.692203865408j)-((-0.20400904497-0.0126539187198j))*(o-1.)
        else:
            arg[(0, 0)]=(-0.181103877354+0.181890553639j)*x[0]**o + ((0.962240110945+0.181140002851j))*x[0] + ((-0.467240779583-0.223865969961j))*x[1]**o + ((0.749825014004-0.19937356558j))*x[1] + ((0.927814829229+0.901757221122j))*x[2]**o + ((0.619743074226-0.0953161335962j))*x[2]
            ref[(0, 0)]=(1.30563918573+0.373116054237j)-((0.0465783620487+0.143296967467j))*(o-1.)
            arg[(0, 1)]=(0.102823000844-0.485503719758j)*x[0]**o + ((0.206313612573+0.331917773693j))*x[0] + ((-0.0249489744819-0.851188367737j))*x[1]**o + ((-0.570003323972+0.769927584619j))*x[1] + ((-0.335303265308-0.192323251318j))*x[2]**o + ((0.765088624769-0.720324487749j))*x[2]
            ref[(0, 1)]=(0.0719848372119-0.573747234125j)-((-0.0429048731577-0.254835889802j))*(o-1.)
            arg[(0, 2)]=(0.207100106752-0.563457209454j)*x[0]**o + ((-0.358970453261-0.047943823731j))*x[0] + ((0.719790189837+0.78115417991j))*x[1]**o + ((-0.329759725095-0.350514010313j))*x[1] + ((-0.564453959565-0.00757373251682j))*x[2]**o + ((-0.230183034525-0.61552778862j))*x[2]
            ref[(0, 2)]=(-0.278238437928-0.401931192362j)-((0.0604060561706+0.0350205396565j))*(o-1.)
            arg[(0, 3)]=(0.969359696683+0.924303824148j)*x[0]**o + ((0.746497613889-0.40996732583j))*x[0] + ((-0.834105512688+0.00176099399862j))*x[1]**o + ((-0.644586478568-0.723821130281j))*x[1] + ((0.634313933516+0.421402754357j))*x[2]**o + ((-0.344974910317-0.961610739606j))*x[2]
            ref[(0, 3)]=(0.263252171258-0.373965811606j)-((0.128261352919+0.224577928751j))*(o-1.)
            arg[(1, 0)]=(0.633937617438-0.907905628613j)*x[0]**o + ((0.311720294192-0.947589616989j))*x[0] + ((0.709230179382+0.362888187182j))*x[1]**o + ((-0.90491737483-0.945523698246j))*x[1] + ((0.4779326531-0.5032779404j))*x[2]**o + ((-0.627355350346-0.78388489558j))*x[2]
            ref[(1, 0)]=(0.300274009468-1.86264679632j)-((0.303516741653-0.174715896972j))*(o-1.)
            arg[(1, 1)]=(0.745171365547+0.436146881688j)*x[0]**o + ((-0.353739787396+0.132876401186j))*x[0] + ((-0.074215040279-0.152891935693j))*x[1]**o + ((-0.304540885513+0.68007216356j))*x[1] + ((-0.283279436493+0.319238198485j))*x[2]**o + ((0.334202906881+0.307212341507j))*x[2]
            ref[(1, 1)]=(0.0317995613731+0.861327025366j)-((0.0646128147958+0.10041552408j))*(o-1.)
            arg[(1, 2)]=(-0.593925891178-0.295320232273j)*x[0]**o + ((-0.308040705343+0.908916177263j))*x[0] + ((0.463659865525+0.939133151202j))*x[1]**o + ((-0.409197677399-0.775140335245j))*x[1] + ((-0.331897529092+0.107492809653j))*x[2]**o + ((0.595210717281-0.156426384765j))*x[2]
            ref[(1, 2)]=(-0.292095610103+0.364327592917j)-((-0.0770272591242+0.12521762143j))*(o-1.)
            arg[(1, 3)]=(0.807772978922-0.968789089568j)*x[0]**o + ((-0.81049035318-0.330298027794j))*x[0] + ((-0.774431225204+0.32154490973j))*x[1]**o + ((0.8380451145+0.398816665502j))*x[1] + ((0.466640799693-0.420051018012j))*x[2]**o + ((-0.143749846321-0.162244892354j))*x[2]
            ref[(1, 3)]=(0.191893734204-0.580510726248j)-((0.0833304255684-0.177882532975j))*(o-1.)
            arg[(2, 0)]=(-0.0897263602041+0.341036216184j)*x[0]**o + ((0.567955967541-0.859917505846j))*x[0] + ((-0.367718422509-0.659899212229j))*x[1]**o + ((-0.348406934719-0.589802817005j))*x[1] + ((0.200951882397+0.273163090024j))*x[2]**o + ((0.185209343423+0.32480152756j))*x[2]
            ref[(2, 0)]=(0.0741327379644-0.585309350656j)-((-0.0427488167194-0.00761665100356j))*(o-1.)
            arg[(2, 1)]=(0.722835442286-0.415542366776j)*x[0]**o + ((0.389532818275-0.36350037902j))*x[0] + ((-0.202933744104-0.266758009229j))*x[1]**o + ((-0.243239079604-0.741000760061j))*x[1] + ((-0.121543377147+0.435302933879j))*x[2]**o + ((0.839133766611-0.432502354571j))*x[2]
            ref[(2, 1)]=(0.691892913159-0.892000467889j)-((0.0663930535059-0.0411662403543j))*(o-1.)
            arg[(2, 2)]=(0.832851625409-0.880828371618j)*x[0]**o + ((0.826044739905+0.578984938617j))*x[0] + ((-0.338598470688-0.619709384546j))*x[1]**o + ((0.35358787778-0.0667952256593j))*x[1] + ((-0.142669748953+0.675940751402j))*x[2]**o + ((0.372905856856-0.649270591086j))*x[2]
            ref[(2, 2)]=(0.952060940155-0.480838941445j)-((0.0585972342947-0.137432834127j))*(o-1.)
            arg[(2, 3)]=(-0.230359027065-0.221977883535j)*x[0]**o + ((-0.516853620373+0.700246003828j))*x[0] + ((0.840211342034-0.197534450604j))*x[1]**o + ((0.331002505839+0.799915537425j))*x[1] + ((0.0805451183736+0.583963660601j))*x[2]**o + ((-0.382415272407+0.867752785414j))*x[2]
            ref[(2, 3)]=(0.0610655232006+1.26618282656j)-((0.11506623889+0.0274085544105j))*(o-1.)
            arg[(3, 0)]=(0.0101678165992-0.866388553236j)*x[0]**o + ((-0.287927701017-0.0327503750812j))*x[0] + ((-0.136313576833-0.00842299444519j))*x[1]**o + ((0.28795804532+0.27541970319j))*x[1] + ((-0.0411665421228-0.306182610149j))*x[2]**o + ((0.502847450095+0.995241597112j))*x[2]
            ref[(3, 0)]=(0.167782746021+0.0284583836954j)-((-0.0278853837261-0.196832359638j))*(o-1.)
            arg[(3, 1)]=(-0.0795136531806-0.036126417474j)*x[0]**o + ((0.391837790504+0.577121024478j))*x[0] + ((-0.572784272422+0.363842612557j))*x[1]**o + ((-0.739969366537+0.493534069548j))*x[1] + ((-0.00652399150928-0.243298721236j))*x[2]**o + ((0.255522010271+0.119861600045j))*x[2]
            ref[(3, 1)]=(-0.375715741437+0.63746708396j)-((-0.109803652852+0.0140695789745j))*(o-1.)
            arg[(3, 2)]=(0.467362655505-0.256044914055j)*x[0]**o + ((-0.241080028157-0.515480637204j))*x[0] + ((-0.0650741477265-0.0680009560319j))*x[1]**o + ((-0.347289509681+0.313238063298j))*x[1] + ((-0.17858447468+0.689779060941j))*x[2]**o + ((-0.251902622617-0.652323547762j))*x[2]
            ref[(3, 2)]=(-0.308284063678-0.244416465406j)-((0.0372840055164+0.0609555318091j))*(o-1.)
            arg[(3, 3)]=(-0.046317578979+0.471890596324j)*x[0]**o + ((0.898776752933+0.883901082599j))*x[0] + ((0.699344463308+0.157645397077j))*x[1]**o + ((0.15958331895-0.78675446512j))*x[1] + ((-0.216144386818-0.167790182951j))*x[2]**o + ((0.384389210563-0.426842900549j))*x[2]
            ref[(3, 3)]=(0.939815889979+0.0660247636901j)-((0.0728137495852+0.076957635075j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Function_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref=numpy.zeros((3, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.761889099371-0.727794358059j)*x[0]**o + ((0.705464809685-0.14803181579j))*x[0] + ((0.733102491321+0.475500037952j))*x[1]**o + ((-0.993731241254-0.750048910336j))*x[1]
            ref[(0, 0, 0)]=(0.603362579562-0.575187523117j)-((0.249165265115-0.0420490533512j))*(o-1.)
            arg[(0, 0, 1)]=(0.934496341774+0.251346472054j)*x[0]**o + ((-0.570792576711+0.585614727741j))*x[0] + ((0.822182639317+0.738084924374j))*x[1]**o + ((-0.406452027964+0.256013612472j))*x[1]
            ref[(0, 0, 1)]=(0.389717188208+0.915529868321j)-((0.292779830182+0.164905232738j))*(o-1.)
            arg[(0, 0, 2)]=(0.473938722031+0.587881920212j)*x[0]**o + ((6.53313630465e-05-0.87729898965j))*x[0] + ((-0.139689877038+0.106723244276j))*x[1]**o + ((0.0968521724786+0.792097827858j))*x[1]
            ref[(0, 0, 2)]=(0.215583174417+0.304702001348j)-((0.0557081408321+0.115767527415j))*(o-1.)
            arg[(0, 0, 3)]=(0.428100150683+0.342936580783j)*x[0]**o + ((-0.456784292428+0.951894990003j))*x[0] + ((0.362202074783-0.754580140081j))*x[1]**o + ((0.0130167665056+0.255487901113j))*x[1]
            ref[(0, 0, 3)]=(0.173267349772+0.397869665909j)-((0.131717037578-0.0686072598831j))*(o-1.)
            arg[(0, 1, 0)]=(-0.535707387892-0.61843062774j)*x[0]**o + ((0.398236324523+0.593912547688j))*x[0] + ((-0.711861391473+0.549457089042j))*x[1]**o + ((-0.448136129573-0.600453569447j))*x[1]
            ref[(0, 1, 0)]=(-0.648734292208-0.0377572802284j)-((-0.207928129894-0.0114955897829j))*(o-1.)
            arg[(0, 1, 1)]=(0.634707515845+0.950844451004j)*x[0]**o + ((-0.486629321089+0.766299581547j))*x[0] + ((-0.122793280311-0.535107520201j))*x[1]**o + ((-0.978820694439+0.437881411999j))*x[1]
            ref[(0, 1, 1)]=(-0.476767889997+0.809958962174j)-((0.0853190392557+0.0692894884671j))*(o-1.)
            arg[(0, 1, 2)]=(0.510534916993+0.335873490815j)*x[0]**o + ((-0.443830919716+0.602096718535j))*x[0] + ((-0.13688920978+0.757866583592j))*x[1]**o + ((0.271400793267+0.494957275769j))*x[1]
            ref[(0, 1, 2)]=(0.100607790382+1.09539703436j)-((0.0622742845355+0.182290012401j))*(o-1.)
            arg[(0, 1, 3)]=(0.943320817206+0.167032093594j)*x[0]**o + ((-0.246596946581+0.1938006777j))*x[0] + ((0.3402077386-0.645403870028j))*x[1]**o + ((0.0539582651305+0.610199808043j))*x[1]
            ref[(0, 1, 3)]=(0.545444937177+0.162814354654j)-((0.213921425968-0.0797286294057j))*(o-1.)
            arg[(0, 2, 0)]=(-0.388453360506+0.212765373888j)*x[0]**o + ((0.0863722444754+0.0099389718673j))*x[0] + ((0.0144626561082-0.924761917752j))*x[1]**o + ((-0.684373719743+0.310942940783j))*x[1]
            ref[(0, 2, 0)]=(-0.485996089833-0.195557315607j)-((-0.0623317840664-0.118666090644j))*(o-1.)
            arg[(0, 2, 1)]=(-0.0743904679421+0.854395077204j)*x[0]**o + ((-0.10798084239-0.725881587938j))*x[0] + ((0.849197560503+0.971796444971j))*x[1]**o + ((0.493973404489+0.17548452343j))*x[1]
            ref[(0, 2, 1)]=(0.58039982733+0.637897228834j)-((0.129134515427+0.304365253696j))*(o-1.)
            arg[(0, 2, 2)]=(0.845748953548-0.595195836993j)*x[0]**o + ((0.198968845979-0.606732871601j))*x[0] + ((-0.30471491431-0.57236859684j))*x[1]**o + ((0.443002147513+0.764806907284j))*x[1]
            ref[(0, 2, 2)]=(0.591502516365-0.504745199075j)-((0.090172339873-0.194594072306j))*(o-1.)
            arg[(0, 2, 3)]=(0.437295496864-0.755453241335j)*x[0]**o + ((0.514869672017-0.349202498234j))*x[0] + ((-0.726572672548-0.560529324281j))*x[1]**o + ((-0.939253692528+0.345555548043j))*x[1]
            ref[(0, 2, 3)]=(-0.356830598098-0.659814757903j)-((-0.048212862614-0.219330427603j))*(o-1.)
            arg[(1, 0, 0)]=(-0.675885974397+0.367970795786j)*x[0]**o + ((0.104946314266-0.826003407386j))*x[0] + ((0.285598894114-0.623177025138j))*x[1]**o + ((-0.877377026724-0.410450521591j))*x[1]
            ref[(1, 0, 0)]=(-0.58135889637-0.745830079165j)-((-0.0650478467137-0.0425343715587j))*(o-1.)
            arg[(1, 0, 1)]=(-0.568083268726-0.457270888009j)*x[0]**o + ((0.23594317888+0.864778199264j))*x[0] + ((-0.243650970997-0.577762703562j))*x[1]**o + ((0.137310943191-0.244755906696j))*x[1]
            ref[(1, 0, 1)]=(-0.219240058826-0.207505649501j)-((-0.135289039954-0.172505598595j))*(o-1.)
            arg[(1, 0, 2)]=(0.248340348334+0.861490704407j)*x[0]**o + ((-0.661652735561+0.732379276704j))*x[0] + ((-0.209738095819-0.805951992709j))*x[1]**o + ((0.331833619307-0.660109643676j))*x[1]
            ref[(1, 0, 2)]=(-0.145608431869+0.0639041723633j)-((0.00643370875243+0.00925645194972j))*(o-1.)
            arg[(1, 0, 3)]=(-0.585431519374-0.219629956577j)*x[0]**o + ((0.232068918251-0.512669776766j))*x[0] + ((-0.727664037945-0.726720407302j))*x[1]**o + ((0.677114544261-0.463907022477j))*x[1]
            ref[(1, 0, 3)]=(-0.201956047403-0.961463581562j)-((-0.218849259553-0.157725060647j))*(o-1.)
            arg[(1, 1, 0)]=(0.0881554658098-0.581017206572j)*x[0]**o + ((-0.966663962915-0.49166309756j))*x[0] + ((-0.73362052831-0.304908925498j))*x[1]**o + ((0.939925214988+0.108603627527j))*x[1]
            ref[(1, 1, 0)]=(-0.336101905213-0.634492801051j)-((-0.107577510417-0.147654355345j))*(o-1.)
            arg[(1, 1, 1)]=(0.701101746427-0.611589636841j)*x[0]**o + ((0.979676190821-0.961198896254j))*x[0] + ((0.156542573955+0.492680242584j))*x[1]**o + ((-0.570240170055-0.740882735794j))*x[1]
            ref[(1, 1, 1)]=(0.633540170574-0.910495513153j)-((0.142940720064-0.0198182323762j))*(o-1.)
            arg[(1, 1, 2)]=(-0.668588734171-0.466215876566j)*x[0]**o + ((-0.751837206784+0.227681059376j))*x[0] + ((0.0890897785969+0.656060074647j))*x[1]**o + ((-0.170757359778-0.18958789261j))*x[1]
            ref[(1, 1, 2)]=(-0.751046761068+0.113968682424j)-((-0.0965831592624+0.0316406996802j))*(o-1.)
            arg[(1, 1, 3)]=(0.877173631378-0.983281652627j)*x[0]**o + ((0.728990084138-0.195468636915j))*x[0] + ((-0.414417944825-0.373604837747j))*x[1]**o + ((0.217018761532-0.225479636426j))*x[1]
            ref[(1, 1, 3)]=(0.704382266112-0.888917381858j)-((0.0771259477587-0.226147748396j))*(o-1.)
            arg[(1, 2, 0)]=(0.970705204117+0.797407533794j)*x[0]**o + ((0.18810076589+0.0373283714252j))*x[0] + ((-0.639221291222-0.431944796395j))*x[1]**o + ((-0.321600103689-0.345737873659j))*x[1]
            ref[(1, 2, 0)]=(0.0989922875479+0.0285266175825j)-((0.0552473188159+0.0609104562332j))*(o-1.)
            arg[(1, 2, 1)]=(0.745025617868+0.692166810745j)*x[0]**o + ((-0.370374309168-0.661723027972j))*x[0] + ((0.838436759227+0.708896683151j))*x[1]**o + ((0.278749680808-0.117609512422j))*x[1]
            ref[(1, 2, 1)]=(0.745918874367+0.310865476751j)-((0.263910396182+0.233510582316j))*(o-1.)
            arg[(1, 2, 2)]=(0.294450534139+0.42011483584j)*x[0]**o + ((0.686762610656-0.895054631176j))*x[0] + ((-0.958870099266+0.583660320713j))*x[1]**o + ((-0.700888063822-0.708084189574j))*x[1]
            ref[(1, 2, 2)]=(-0.339272509147-0.299681832099j)-((-0.110736594188+0.167295859425j))*(o-1.)
            arg[(1, 2, 3)]=(0.456178351426+0.70159274066j)*x[0]**o + ((-0.20434932591-0.0385267408426j))*x[0] + ((0.286926245972-0.312101684264j))*x[1]**o + ((-0.441196538263-0.348364611785j))*x[1]
            ref[(1, 2, 3)]=(0.0487793666122+0.00129985188387j)-((0.123850766233+0.0649151760659j))*(o-1.)
            arg[(2, 0, 0)]=(0.182117594426-0.0606022983241j)*x[0]**o + ((-0.681751712618+0.685174847073j))*x[0] + ((0.219692507694+0.757486110135j))*x[1]**o + ((0.37964126053+0.656325537432j))*x[1]
            ref[(2, 0, 0)]=(0.0498498250161+1.01919209816j)-((0.0669683503534+0.116147301969j))*(o-1.)
            arg[(2, 0, 1)]=(0.911337497181+0.433926888585j)*x[0]**o + ((0.459815361908-0.960297185471j))*x[0] + ((-0.730593859502-0.0613752467087j))*x[1]**o + ((0.749789922731-0.992061224134j))*x[1]
            ref[(2, 0, 1)]=(0.695174461159-0.789903383865j)-((0.0301239396132+0.0620919403127j))*(o-1.)
            arg[(2, 0, 2)]=(0.411679773478-0.806012383148j)*x[0]**o + ((-0.39487771448-0.62206023172j))*x[0] + ((0.977590835774-0.0721818952802j))*x[1]**o + ((0.175182129472-0.728561815409j))*x[1]
            ref[(2, 0, 2)]=(0.584787512122-1.11440816278j)-((0.231545101542-0.146365713071j))*(o-1.)
            arg[(2, 0, 3)]=(0.476145043616+0.922279609335j)*x[0]**o + ((-0.580420447876+0.10049174189j))*x[0] + ((-0.456680169744+0.350002888532j))*x[1]**o + ((0.999818637859-0.208999945392j))*x[1]
            ref[(2, 0, 3)]=(0.219431531928+0.581887147183j)-((0.00324414564537+0.212047082978j))*(o-1.)
            arg[(2, 1, 0)]=(0.533331672446+0.380764692765j)*x[0]**o + ((-0.633530640412-0.969665230138j))*x[0] + ((0.273930057511-0.0400900144834j))*x[1]**o + ((-0.944132500624-0.178349490568j))*x[1]
            ref[(2, 1, 0)]=(-0.38520070554-0.403670021213j)-((0.134543621659+0.0567791130469j))*(o-1.)
            arg[(2, 1, 1)]=(0.82691751967-0.99977680426j)*x[0]**o + ((0.438146552031-0.406041469448j))*x[0] + ((0.371958303354+0.429510556642j))*x[1]**o + ((-0.685571414365-0.485206919318j))*x[1]
            ref[(2, 1, 1)]=(0.475725480345-0.730757318192j)-((0.199812637171-0.0950443746029j))*(o-1.)
            arg[(2, 1, 2)]=(0.43137265574-0.3602482247j)*x[0]**o + ((0.421995814791+0.435091482461j))*x[0] + ((0.00631902273433+0.194772388585j))*x[1]**o + ((0.185060840379-0.600605321919j))*x[1]
            ref[(2, 1, 2)]=(0.522374166822-0.165494837787j)-((0.0729486130791-0.0275793060192j))*(o-1.)
            arg[(2, 1, 3)]=(0.538465572951+0.633965404207j)*x[0]**o + ((0.670391562031-0.938804756716j))*x[0] + ((-0.859273475786+0.550588920323j))*x[1]**o + ((-0.75013363777+0.460352557017j))*x[1]
            ref[(2, 1, 3)]=(-0.200274989287+0.353051062416j)-((-0.0534679838058+0.197425720755j))*(o-1.)
            arg[(2, 2, 0)]=(0.655814467839+0.719598833082j)*x[0]**o + ((-0.271479988328-0.160130633129j))*x[0] + ((0.539567787632-0.289318036277j))*x[1]**o + ((-0.400000568489-0.398980901215j))*x[1]
            ref[(2, 2, 0)]=(0.261950849327-0.0644153687696j)-((0.199230375912+0.0717134661342j))*(o-1.)
            arg[(2, 2, 1)]=(-0.40291967521-0.486058139672j)*x[0]**o + ((-0.0889529122119-0.196116020041j))*x[0] + ((-0.403306267513-0.780953843711j))*x[1]**o + ((-0.990050330707+0.149202651721j))*x[1]
            ref[(2, 2, 1)]=(-0.942614592821-0.656962675851j)-((-0.134370990454-0.211168663897j))*(o-1.)
            arg[(2, 2, 2)]=(-0.105173634217+0.22577032157j)*x[0]**o + ((-0.395652903367-0.0415134481029j))*x[0] + ((-0.58538087477+0.852744274266j))*x[1]**o + ((0.881718875196-0.521455477935j))*x[1]
            ref[(2, 2, 2)]=(-0.102244268579+0.257772834899j)-((-0.115092418164+0.179752432639j))*(o-1.)
            arg[(2, 2, 3)]=(0.357182916294-0.587334814885j)*x[0]**o + ((-0.871224136758+0.0975438399963j))*x[0] + ((0.580096491304+0.368737706428j))*x[1]**o + ((0.60207296592-0.558072560997j))*x[1]
            ref[(2, 2, 3)]=(0.33406411838-0.339562914729j)-((0.1562132346-0.0364328514095j))*(o-1.)
        else:
            arg[(0, 0, 0)]=(0.489239168192+0.473824987981j)*x[0]**o + ((-0.887845764962-0.345980408184j))*x[0] + ((-0.651094852464+0.445558183013j))*x[1]**o + ((-0.736646857729+0.317331920503j))*x[1] + ((-0.294941408962+0.00671703950304j))*x[2]**o + ((0.551662917672-0.37682175783j))*x[2]
            ref[(0, 0, 0)]=(-0.764813399127+0.260314982493j)-((-0.0761328488724+0.154350035083j))*(o-1.)
            arg[(0, 0, 1)]=(-0.500415556356+0.640928422821j)*x[0]**o + ((0.255598501889+0.386688760422j))*x[0] + ((0.983961111349-0.610616216029j))*x[1]**o + ((-0.127930937318-0.248781977684j))*x[1] + ((0.242007643874+0.27492654168j))*x[2]**o + ((0.290270183339-0.949485370741j))*x[2]
            ref[(0, 0, 1)]=(0.571745473389-0.253169919765j)-((0.120925533144+0.0508731247454j))*(o-1.)
            arg[(0, 0, 2)]=(0.994571685523-0.111010272994j)*x[0]**o + ((0.732107339272+0.29772742987j))*x[0] + ((-0.288550450982+0.360387469236j))*x[1]**o + ((-0.859784386261-0.0312762591841j))*x[1] + ((0.662864423887-0.0612663100568j))*x[2]**o + ((-0.627318320528-0.252735489453j))*x[2]
            ref[(0, 0, 2)]=(0.306945145456+0.100913283709j)-((0.228147609738+0.0313518143642j))*(o-1.)
            arg[(0, 0, 3)]=(0.816168523208+0.884850876187j)*x[0]**o + ((0.549984946576+0.6306267172j))*x[0] + ((-0.70499005931+0.0401808360449j))*x[1]**o + ((-0.869122332565-0.11350411474j))*x[1] + ((-0.557560883269-0.769474511039j))*x[2]**o + ((0.441488075341+0.847239276559j))*x[2]
            ref[(0, 0, 3)]=(-0.16201586501+0.759959540105j)-((-0.0743970698953+0.0259262001987j))*(o-1.)
            arg[(0, 1, 0)]=(0.280652847973+0.680841229835j)*x[0]**o + ((0.920807330628+0.714730758076j))*x[0] + ((-0.299255212824+0.95106470677j))*x[1]**o + ((-0.232115049625-0.320222160159j))*x[1] + ((-0.931316431047-0.531380073369j))*x[2]**o + ((-0.0534337735039-0.0179204296442j))*x[2]
            ref[(0, 1, 0)]=(-0.1573301442+0.738557015755j)-((-0.158319799316+0.183420977206j))*(o-1.)
            arg[(0, 1, 1)]=(0.157567877301-0.927054942847j)*x[0]**o + ((0.615254300372-0.159069591384j))*x[0] + ((-0.889363776472-0.820156618842j))*x[1]**o + ((-0.100162795123-0.308275954425j))*x[1] + ((-0.044165132095+0.713400303668j))*x[2]**o + ((0.877202262874+0.0730002973161j))*x[2]
            ref[(0, 1, 1)]=(0.308166368428-0.714078253257j)-((-0.129326838544-0.172301876337j))*(o-1.)
            arg[(0, 1, 2)]=(-0.0450782839792+0.104274894046j)*x[0]**o + ((0.0807062759123+0.265890634029j))*x[0] + ((-0.286481262617-0.473412287547j))*x[1]**o + ((-0.117435894941+0.474813084303j))*x[1] + ((0.973097809556-0.666564694387j))*x[2]**o + ((0.563823716096-0.927685433338j))*x[2]
            ref[(0, 1, 2)]=(0.584316180013-0.611341901447j)-((0.106923043827-0.172617014648j))*(o-1.)
            arg[(0, 1, 3)]=(0.0440267794628+0.976140246137j)*x[0]**o + ((-0.03529426236-0.451024728256j))*x[0] + ((-0.845484679775-0.693248006781j))*x[1]**o + ((-0.556434387236-0.101629074189j))*x[1] + ((0.104057868058+0.832927358064j))*x[2]**o + ((-0.225700214364+0.599205490447j))*x[2]
            ref[(0, 1, 3)]=(-0.757414448107+0.581185642711j)-((-0.116233338709+0.185969932903j))*(o-1.)
            arg[(0, 2, 0)]=(0.722632718639+0.592721608066j)*x[0]**o + ((-0.857101343268+0.546125359527j))*x[0] + ((0.902011409834-0.804635240895j))*x[1]**o + ((0.873838428007+0.85894923716j))*x[1] + ((0.413532760151+0.484114741432j))*x[2]**o + ((0.117049929879-0.988269002377j))*x[2]
            ref[(0, 2, 0)]=(1.08598195162+0.344503351457j)-((0.339696148104+0.0453668514339j))*(o-1.)
            arg[(0, 2, 1)]=(-0.569215832818-0.257807979125j)*x[0]**o + ((-0.0180644790958+0.633830476009j))*x[0] + ((-0.237843448971-0.483806632718j))*x[1]**o + ((0.951916700878+0.0350477214447j))*x[1] + ((-0.608375631201-0.67028573348j))*x[2]**o + ((0.932711814289-0.53247898232j))*x[2]
            ref[(0, 2, 1)]=(0.22556456154-0.637750565095j)-((-0.235905818832-0.235316724221j))*(o-1.)
            arg[(0, 2, 2)]=(0.767390428224-0.72183694087j)*x[0]**o + ((0.993973337618+0.343589214283j))*x[0] + ((0.409454414357+0.289600767228j))*x[1]**o + ((0.332867056249-0.575968014983j))*x[1] + ((-0.322485847256+0.0739598502547j))*x[2]**o + ((0.291645369168-0.0304074845459j))*x[2]
            ref[(0, 2, 2)]=(1.23642237918-0.310531304316j)-((0.142393165887-0.0597127205644j))*(o-1.)
            arg[(0, 2, 3)]=(0.815647754453+0.833459194316j)*x[0]**o + ((-0.936971047013-0.317200630065j))*x[0] + ((0.796015284273+0.707057243742j))*x[1]**o + ((-0.273673684407+0.973544798427j))*x[1] + ((-0.111474328971+0.0216268748122j))*x[2]**o + ((-0.930166937608-0.168759235237j))*x[2]
            ref[(0, 2, 3)]=(-0.320311479636+1.024864123j)-((0.250031451626+0.260357218812j))*(o-1.)
            arg[(1, 0, 0)]=(0.790723953861+0.956331692203j)*x[0]**o + ((0.0807428569983+0.0452520649354j))*x[0] + ((0.80934469108-0.724630777031j))*x[1]**o + ((0.970592357439-0.739748835931j))*x[1] + ((0.220294525927+0.468608757238j))*x[2]**o + ((-0.53603433038+0.339045651658j))*x[2]
            ref[(1, 0, 0)]=(1.16783202746+0.172429276536j)-((0.303393861811+0.116718278735j))*(o-1.)
            arg[(1, 0, 1)]=(-0.674767868097+0.198294021117j)*x[0]**o + ((-0.781958147382+0.053399836155j))*x[0] + ((0.760423370753-0.284110085793j))*x[1]**o + ((-0.676872809997-0.702618310535j))*x[1] + ((-0.355651283154-0.326123010432j))*x[2]**o + ((-0.550168375206-0.07485417849j))*x[2]
            ref[(1, 0, 1)]=(-1.13949755654-0.568005863989j)-((-0.0449992967498-0.068656512518j))*(o-1.)
            arg[(1, 0, 2)]=(-0.751386508593+0.729644532721j)*x[0]**o + ((0.940883934836+0.964460126164j))*x[0] + ((-0.540764758821-0.305430000852j))*x[1]**o + ((-0.205907111458-0.653283358679j))*x[1] + ((-0.273592209559+0.610678459511j))*x[2]**o + ((0.233201017176+0.914016213757j))*x[2]
            ref[(1, 0, 2)]=(-0.298782818209+1.13004298631j)-((-0.260957246162+0.17248216523j))*(o-1.)
            arg[(1, 0, 3)]=(0.746897942241-0.714510433968j)*x[0]**o + ((0.882998922788-0.0406533985426j))*x[0] + ((-0.977640848696+0.101547095641j))*x[1]**o + ((0.154206616729+0.728319437554j))*x[1] + ((-0.339720933901+0.879075592416j))*x[2]**o + ((0.716495082703+0.0479651898286j))*x[2]
            ref[(1, 0, 3)]=(0.591618390931+0.500871741465j)-((-0.0950773067262+0.0443520423483j))*(o-1.)
            arg[(1, 1, 0)]=(-0.522969208386+0.590893454292j)*x[0]**o + ((0.881766082485-0.158019264151j))*x[0] + ((0.134704228167+0.965789478632j))*x[1]**o + ((0.732264829491+0.477690648914j))*x[1] + ((-0.313086258898+0.228464227021j))*x[2]**o + ((0.11727790911-0.0657978524322j))*x[2]
            ref[(1, 1, 0)]=(0.514978790985+1.01951034614j)-((-0.116891873186+0.297524526658j))*(o-1.)
            arg[(1, 1, 1)]=(-0.240712827014+0.0616017958218j)*x[0]**o + ((-0.694205806346-0.202277662127j))*x[0] + ((-0.607698327401+0.752719625731j))*x[1]**o + ((-0.939140944228-0.206411852892j))*x[1] + ((0.342515025387+0.0102069282576j))*x[2]**o + ((0.339920295885+0.878924441592j))*x[2]
            ref[(1, 1, 1)]=(-0.899661291858+0.647381638192j)-((-0.0843160215047+0.137421391635j))*(o-1.)
            arg[(1, 1, 2)]=(-0.935909703103-0.2174081123j)*x[0]**o + ((0.49431616178-0.746786870513j))*x[0] + ((0.529045462361+0.828181567404j))*x[1]**o + ((0.386067438386-0.557735014947j))*x[1] + ((-0.660739076143-0.0856410842264j))*x[2]**o + ((-0.698108134922-0.827958999634j))*x[2]
            ref[(1, 1, 2)]=(-0.442663925821-0.803674257108j)-((-0.177933886148+0.0875220618131j))*(o-1.)
            arg[(1, 1, 3)]=(0.088937823563-0.544918705281j)*x[0]**o + ((0.361192430846+0.0312899890741j))*x[0] + ((-0.578998936395+0.033845990507j))*x[1]**o + ((-0.107755095997-0.8401260809j))*x[1] + ((-0.261220470649+0.760769661539j))*x[2]**o + ((-0.692774352742+0.608887384122j))*x[2]
            ref[(1, 1, 3)]=(-0.595309300687+0.0248741195304j)-((-0.125213597247+0.0416161577942j))*(o-1.)
            arg[(1, 2, 0)]=(0.387820897314+0.857314109401j)*x[0]**o + ((-0.184449632679-0.032721436627j))*x[0] + ((0.518283213199-0.0832069352306j))*x[1]**o + ((0.890789330409-0.367479317901j))*x[1] + ((-0.579252286757+0.870711854747j))*x[2]**o + ((-0.16909663213+0.435300103237j))*x[2]
            ref[(1, 2, 0)]=(0.432047444678+0.839959188813j)-((0.0544753039594+0.27413650482j))*(o-1.)
            arg[(1, 2, 1)]=(-0.634288020291-0.850227558383j)*x[0]**o + ((-0.945245253479-0.814538990352j))*x[0] + ((0.192244484495-0.139968749742j))*x[1]**o + ((-0.16279381909-0.819728410964j))*x[1] + ((-0.340620040239+0.548283498959j))*x[2]**o + ((0.984887782289-0.42696077957j))*x[2]
            ref[(1, 2, 1)]=(-0.452907433157-1.25157049503j)-((-0.130443929339-0.0736521348612j))*(o-1.)
            arg[(1, 2, 2)]=(-0.888982818586-0.0987917674821j)*x[0]**o + ((0.272597604588-0.788707519027j))*x[0] + ((-0.475960304012+0.623035560476j))*x[1]**o + ((-0.75634240932+0.0732058778518j))*x[1] + ((0.31915541639+0.346654696752j))*x[2]**o + ((0.204221876647-0.502017517848j))*x[2]
            ref[(1, 2, 2)]=(-0.662655317147-0.173310334638j)-((-0.174297951035+0.145149748291j))*(o-1.)
            arg[(1, 2, 3)]=(0.145465437999+0.9141014133j)*x[0]**o + ((-0.818392977982-0.727036823712j))*x[0] + ((0.366200669843+0.157665828085j))*x[1]**o + ((-0.0198173112412-0.510064697404j))*x[1] + ((-0.0816839250288-0.455168984518j))*x[2]**o + ((0.682036109888+0.327324492707j))*x[2]
            ref[(1, 2, 3)]=(0.136904001739-0.146589385772j)-((0.0716636971356+0.102766376144j))*(o-1.)
            arg[(2, 0, 0)]=(-0.317524759223-0.32505999367j)*x[0]**o + ((-0.89089277914-0.331904704433j))*x[0] + ((-0.68729314797+0.974547430742j))*x[1]**o + ((0.776115714224-0.149963299224j))*x[1] + ((0.561092673195+0.924773509691j))*x[2]**o + ((0.966979785634-0.679898727629j))*x[2]
            ref[(2, 0, 0)]=(0.204238743361+0.206247107738j)-((-0.0739542056661+0.26237682446j))*(o-1.)
            arg[(2, 0, 1)]=(-0.474804042562-0.960299294734j)*x[0]**o + ((-0.023356676168-0.328521662107j))*x[0] + ((0.68237333863+0.551026764084j))*x[1]**o + ((0.842485126012+0.495500998757j))*x[1] + ((0.69678024347-0.650142175769j))*x[2]**o + ((0.0796014383112+0.679331271733j))*x[2]
            ref[(2, 0, 1)]=(0.901539713847-0.106552049018j)-((0.150724923256-0.176569117737j))*(o-1.)
            arg[(2, 0, 2)]=(-0.0298694464624-0.910742086016j)*x[0]**o + ((0.637974493789+0.629801568387j))*x[0] + ((-0.590226344011-0.607658575405j))*x[1]**o + ((-0.905223845351+0.95045927447j))*x[1] + ((0.968826572025-0.415391926214j))*x[2]**o + ((-0.718127216917+0.431261522172j))*x[2]
            ref[(2, 0, 2)]=(-0.318322893464+0.0388648886973j)-((0.0581217969252-0.322298764606j))*(o-1.)
            arg[(2, 0, 3)]=(0.512088333973-0.689279279181j)*x[0]**o + ((-0.987797312192-0.412763766513j))*x[0] + ((0.419191839352-0.208229573934j))*x[1]**o + ((-0.0715778879149-0.103339099159j))*x[1] + ((-0.886214620141-0.263932301534j))*x[2]**o + ((0.442664201478+0.970923649893j))*x[2]
            ref[(2, 0, 3)]=(-0.285822722722-0.353310185214j)-((0.0075109255307-0.193573525775j))*(o-1.)
            arg[(2, 1, 0)]=(-0.621954154719-0.476372629122j)*x[0]**o + ((-0.833407380664-0.175925346966j))*x[0] + ((-0.855139632783+0.715589327319j))*x[1]**o + ((0.0565459026225-0.458013310485j))*x[1] + ((-0.853010024474+0.340821609436j))*x[2]**o + ((0.209793849346+0.0509042713633j))*x[2]
            ref[(2, 1, 0)]=(-1.44858572034-0.00149803922785j)-((-0.388350635329+0.096673051272j))*(o-1.)
            arg[(2, 1, 1)]=(0.722755686002+0.363154274177j)*x[0]**o + ((0.225629814966-0.290735773865j))*x[0] + ((-0.99553859558+0.669424303206j))*x[1]**o + ((0.22942303921+0.44886984928j))*x[1] + ((0.286287807616-0.0522724864579j))*x[2]**o + ((-0.973937532837-0.332873494379j))*x[2]
            ref[(2, 1, 1)]=(-0.252689890312+0.402783335981j)-((0.00225081633951+0.163384348488j))*(o-1.)
            arg[(2, 1, 2)]=(-0.801950218599-0.261967722977j)*x[0]**o + ((-0.259327535678+0.688819090214j))*x[0] + ((-0.846175427682+0.331858837843j))*x[1]**o + ((-0.138370609269-0.202642688984j))*x[1] + ((0.67382726332-0.641364450662j))*x[2]**o + ((-0.62215179213+0.850327475208j))*x[2]
            ref[(2, 1, 2)]=(-0.997074160019+0.382515270321j)-((-0.162383063827-0.095245555966j))*(o-1.)
            arg[(2, 1, 3)]=(-0.601699192645-0.338724832292j)*x[0]**o + ((-0.741495331294-0.78022904868j))*x[0] + ((0.205734110571+0.328845829693j))*x[1]**o + ((0.241472754611-0.198573663205j))*x[1] + ((0.378470701264+0.90380925809j))*x[2]**o + ((-0.0219610819109-0.730821100743j))*x[2]
            ref[(2, 1, 3)]=(-0.269739019702-0.407846778568j)-((-0.00291573013502+0.148988375915j))*(o-1.)
            arg[(2, 2, 0)]=(-0.237999003536-0.744606635727j)*x[0]**o + ((0.944699650559+0.400643815896j))*x[0] + ((-0.337533356476+0.0673911624916j))*x[1]**o + ((-0.799256012166-0.699006033645j))*x[1] + ((-0.807700184852-0.667755974786j))*x[2]**o + ((-0.0897329768748+0.0986870640534j))*x[2]
            ref[(2, 2, 0)]=(-0.663760941673-0.772323300859j)-((-0.230538757477-0.224161908004j))*(o-1.)
            arg[(2, 2, 1)]=(-0.603207103312+0.908842751267j)*x[0]**o + ((0.545223308964-0.173729547618j))*x[0] + ((0.914906861668-0.225148747936j))*x[1]**o + ((0.390523410689+0.610190607322j))*x[1] + ((0.910933651828-0.167869664968j))*x[2]**o + ((-0.641643309675-0.650964898258j))*x[2]
            ref[(2, 2, 1)]=(0.758368410081+0.150660249905j)-((0.203772235031+0.0859707230605j))*(o-1.)
            arg[(2, 2, 2)]=(0.737644985557+0.485677034958j)*x[0]**o + ((-0.241864870472-0.758132751666j))*x[0] + ((0.871112475699-0.776815511925j))*x[1]**o + ((-0.807000362082-0.522255125174j))*x[1] + ((0.662848018236-0.459500686894j))*x[2]**o + ((0.0378835540869+0.914899022796j))*x[2]
            ref[(2, 2, 2)]=(0.630311900512-0.558064008953j)-((0.378600913249-0.12510652731j))*(o-1.)
            arg[(2, 2, 3)]=(0.560821937332+0.0527465984192j)*x[0]**o + ((-0.00143900185686-0.603346292858j))*x[0] + ((0.711752114352-0.684580900705j))*x[1]**o + ((0.722007355009-0.410844586761j))*x[1] + ((0.985510410341-0.356578542538j))*x[2]**o + ((-0.407619137656-0.344491409522j))*x[2]
            ref[(2, 2, 3)]=(1.28551683876-1.17354756698j)-((0.376347410337-0.164735474137j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunction_fromData_Function_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 2),w)
        ref=numpy.zeros((4, 4, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.787420617704-0.665070593639j)*x[0]**o + ((0.257482049418-0.927613401845j))*x[0] + ((-0.358090667147-0.507424776221j))*x[1]**o + ((-0.381646219026-0.398291784985j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.63483772723-1.24920027835j)-((-0.190918547475-0.195415894977j))*(o-1.)
            arg[(0, 0, 0, 1)]=(-0.610554520359+0.90818794069j)*x[0]**o + ((-0.657723616236+0.353841315019j))*x[0] + ((-0.520005659869+0.26919754497j))*x[1]**o + ((0.865804093084+0.844393545381j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.46123985169+1.18781017303j)-((-0.188426696705+0.196230914277j))*(o-1.)
            arg[(0, 0, 1, 0)]=(0.16130546855-0.210028507911j)*x[0]**o + ((-0.800450999918+0.285232069054j))*x[0] + ((0.327099393977-0.291497177742j))*x[1]**o + ((-0.368529853264+0.938853721433j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.340287995328+0.361280052417j)-((0.0814008104211-0.0835876142754j))*(o-1.)
            arg[(0, 0, 1, 1)]=(0.295917694786+0.000819943897388j)*x[0]**o + ((-0.614470155906-0.378970842139j))*x[0] + ((0.891120341279+0.569353567369j))*x[1]**o + ((-0.838625617828+0.372168539584j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.133028868834+0.281685604356j)-((0.197839672677+0.0950289185443j))*(o-1.)
            arg[(0, 0, 2, 0)]=(0.78036736619-0.955690379769j)*x[0]**o + ((0.415920083381-0.667813179408j))*x[0] + ((0.083778864916+0.648030544904j))*x[1]**o + ((0.406962891093+0.61343502493j))*x[1]
            ref[(0, 0, 2, 0)]=(0.84351460279-0.181018994672j)-((0.144024371851-0.0512766391442j))*(o-1.)
            arg[(0, 0, 2, 1)]=(0.590039754833+0.437497267697j)*x[0]**o + ((-0.460763640128+0.21772636348j))*x[0] + ((0.506143299801-0.137068539618j))*x[1]**o + ((0.014173737834+0.915320544172j))*x[1]
            ref[(0, 0, 2, 1)]=(0.32479657617+0.716737817865j)-((0.182697175772+0.0500714546798j))*(o-1.)
            arg[(0, 1, 0, 0)]=(0.418252152013+0.0469779002096j)*x[0]**o + ((0.984960504269-0.733405897185j))*x[0] + ((-0.27936931004+0.0324142035766j))*x[1]**o + ((-0.483470380521-0.417242440249j))*x[1]
            ref[(0, 1, 0, 0)]=(0.32018648286-0.535628116824j)-((0.0231471403288+0.0132320172977j))*(o-1.)
            arg[(0, 1, 0, 1)]=(-0.937541044528-0.508292068707j)*x[0]**o + ((0.8485663803-0.083671625087j))*x[0] + ((0.555188150654+0.152479836573j))*x[1]**o + ((0.418182412526+0.208454989081j))*x[1]
            ref[(0, 1, 0, 1)]=(0.442197949476-0.11551443407j)-((-0.0637254823123-0.0593020386889j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.604305974074+0.342942045616j)*x[0]**o + ((0.103306362297-0.0142194636466j))*x[0] + ((-0.513951741348-0.132345497021j))*x[1]**o + ((-0.915455443869-0.568515330782j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.965203398497-0.186069122917j)-((-0.186376285904+0.0350994247659j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.688374048696+0.666667576899j)*x[0]**o + ((-0.997385775217+0.580082743351j))*x[0] + ((0.40465260985-0.675072042952j))*x[1]**o + ((-0.749317563469-0.429537852666j))*x[1]
            ref[(0, 1, 1, 1)]=(-1.01521238877+0.0710702123162j)-((-0.0472869064743-0.00140074434218j))*(o-1.)
            arg[(0, 1, 2, 0)]=(-0.978288788351+0.772060342033j)*x[0]**o + ((-0.151149481731+0.856420652877j))*x[0] + ((0.696189962573+0.188473066315j))*x[1]**o + ((-0.432824435958-0.492059066939j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.433036371734+0.662447497143j)-((-0.047016470963+0.160088901391j))*(o-1.)
            arg[(0, 1, 2, 1)]=(0.0820912096672-0.0242012244207j)*x[0]**o + ((-0.0906775411649-0.0665919806942j))*x[0] + ((-0.673211330394+0.236924068118j))*x[1]**o + ((-0.0844535473453-0.176649690084j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.383125604618-0.0152594135404j)-((-0.0985200201211+0.0354538072829j))*(o-1.)
            arg[(0, 2, 0, 0)]=(0.0398566481256+0.179415196966j)*x[0]**o + ((0.470026498456-0.754699180102j))*x[0] + ((-0.580022495684-0.283925767257j))*x[1]**o + ((-0.5105360391+0.874785458458j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.290337694101+0.00778785403231j)-((-0.0900276412597-0.0174184283818j))*(o-1.)
            arg[(0, 2, 0, 1)]=(0.11221455396+0.471631748316j)*x[0]**o + ((-0.956094719608+0.0809682923284j))*x[0] + ((0.48563772843+0.105513217967j))*x[1]**o + ((-0.586875783445+0.530722385049j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.472559110331+0.59441782183j)-((0.0996420470651+0.0961908277139j))*(o-1.)
            arg[(0, 2, 1, 0)]=(0.547810339792+0.343017725044j)*x[0]**o + ((-0.825746317172+0.46423568678j))*x[0] + ((-0.974754419106+0.283968804196j))*x[1]**o + ((-0.373398858455-0.504157315297j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.81304462747+0.293532450361j)-((-0.0711573465523+0.104497754873j))*(o-1.)
            arg[(0, 2, 1, 1)]=(-0.808654406994-0.271903732598j)*x[0]**o + ((0.845091509358-0.720418032179j))*x[0] + ((-0.656219442762-0.0798032934958j))*x[1]**o + ((-0.928710094269-0.368392827252j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.774246217334-0.720258942762j)-((-0.244145641626-0.0586178376823j))*(o-1.)
            arg[(0, 2, 2, 0)]=(-0.480654582667-0.41587535494j)*x[0]**o + ((0.938769870748+0.784948949509j))*x[0] + ((0.788433532949-0.649452056074j))*x[1]**o + ((-0.482834759125+0.903737808627j))*x[1]
            ref[(0, 2, 2, 0)]=(0.381857030952+0.311679673561j)-((0.0512964917137-0.177554568502j))*(o-1.)
            arg[(0, 2, 2, 1)]=(-0.810001187299-0.567627686901j)*x[0]**o + ((-0.639899305904+0.668314037431j))*x[0] + ((0.406524714489-0.56927093514j))*x[1]**o + ((0.247607468557+0.460090870581j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.397884155078-0.00424685701439j)-((-0.0672460788017-0.189483103674j))*(o-1.)
            arg[(0, 3, 0, 0)]=(0.215633691519+0.792378267158j)*x[0]**o + ((0.879611077424+0.169190415062j))*x[0] + ((0.929243471895+0.493262613977j))*x[1]**o + ((0.293167484302-0.150409393776j))*x[1]
            ref[(0, 3, 0, 0)]=(1.15882786257+0.65221095121j)-((0.190812860569+0.214273480189j))*(o-1.)
            arg[(0, 3, 0, 1)]=(0.289316363039-0.437660707623j)*x[0]**o + ((0.697099754833+0.996179826038j))*x[0] + ((-0.390631105636-0.184530228343j))*x[1]**o + ((-0.977648446855-0.850069534284j))*x[1]
            ref[(0, 3, 0, 1)]=(-0.19093171731-0.238040322106j)-((-0.0168857904329-0.103698489328j))*(o-1.)
            arg[(0, 3, 1, 0)]=(-0.770121988137+0.954392905203j)*x[0]**o + ((-0.335512447482-0.620237000663j))*x[0] + ((0.455641606072+0.105006271532j))*x[1]**o + ((-0.813162058356+0.897848585167j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.731577443952+0.66850538062j)-((-0.0524133970108+0.176566529456j))*(o-1.)
            arg[(0, 3, 1, 1)]=(-0.147597812963+0.131759927975j)*x[0]**o + ((-0.506433633202-0.471194632629j))*x[0] + ((-0.171634172053+0.299066667456j))*x[1]**o + ((0.895725446298+0.838144547149j))*x[1]
            ref[(0, 3, 1, 1)]=(0.0350299140405+0.398888254975j)-((-0.053205330836+0.0718044325718j))*(o-1.)
            arg[(0, 3, 2, 0)]=(0.636899420534+0.285360084074j)*x[0]**o + ((0.834173004008-0.181301095456j))*x[0] + ((0.0826744486251+0.701681295222j))*x[1]**o + ((-0.338402776215-0.0375310245075j))*x[1]
            ref[(0, 3, 2, 0)]=(0.607672048476+0.384104629666j)-((0.119928978193+0.164506896549j))*(o-1.)
            arg[(0, 3, 2, 1)]=(-0.861881891361-0.51465232248j)*x[0]**o + ((-0.411323693268-0.590255607506j))*x[0] + ((0.0439679195117-0.0973273356247j))*x[1]**o + ((-0.413656567613-0.98121752991j))*x[1]
            ref[(0, 3, 2, 1)]=(-0.821447116365-1.09172639776j)-((-0.136318995308-0.101996609684j))*(o-1.)
            arg[(1, 0, 0, 0)]=(0.457256686014-0.0365562205415j)*x[0]**o + ((-0.518277609547+0.0762537018088j))*x[0] + ((-0.695450904537-0.755080915826j))*x[1]**o + ((-0.277147009431-0.0993101056635j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.51680941875-0.407346770111j)-((-0.0396990364204-0.131939522728j))*(o-1.)
            arg[(1, 0, 0, 1)]=(-0.800766304053+0.77898850145j)*x[0]**o + ((-0.53099034102+0.739840899299j))*x[0] + ((0.595844313226+0.0125107106377j))*x[1]**o + ((-0.60922069732-0.705489339766j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.672566514583+0.41292538581j)-((-0.0341536651377+0.131916535348j))*(o-1.)
            arg[(1, 0, 1, 0)]=(0.506645523348+0.964733573422j)*x[0]**o + ((0.433347044201+0.915835882461j))*x[0] + ((-0.19656814325-0.134117482604j))*x[1]**o + ((-0.968918159165-0.809593738391j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.112746867432+0.468429117444j)-((0.0516795633498+0.138436015136j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.159997999661+0.585953577603j)*x[0]**o + ((0.755305762504-0.396088326805j))*x[0] + ((-0.213488147986-0.556536249155j))*x[1]**o + ((-0.6893105029+0.810803624015j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.153745444022+0.222066312829j)-((-0.0622476912746+0.00490288807473j))*(o-1.)
            arg[(1, 0, 2, 0)]=(0.185208849037+0.444640087496j)*x[0]**o + ((-0.308827478363+0.299453891866j))*x[0] + ((-0.290495820236+0.727594475571j))*x[1]**o + ((0.842754959435+0.200594143111j))*x[1]
            ref[(1, 0, 2, 0)]=(0.214320254937+0.836141299022j)-((-0.0175478285331+0.195372427178j))*(o-1.)
            arg[(1, 0, 2, 1)]=(-0.871106952342+0.70799700807j)*x[0]**o + ((-0.109218675807+0.53653604452j))*x[0] + ((0.398177332227-0.987002289651j))*x[1]**o + ((0.202404789119-0.0768827184826j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.189871753402+0.0903240222276j)-((-0.0788216033525-0.0465008802637j))*(o-1.)
            arg[(1, 1, 0, 0)]=(0.79507816319-0.159749297072j)*x[0]**o + ((-0.39095689946+0.267924604028j))*x[0] + ((-0.959773376849-0.601315132788j))*x[1]**o + ((0.990716104946-0.0650930449181j))*x[1]
            ref[(1, 1, 0, 0)]=(0.217531995913-0.279116435375j)-((-0.0274492022765-0.126844071643j))*(o-1.)
            arg[(1, 1, 0, 1)]=(-0.972603277201+0.522013768858j)*x[0]**o + ((0.149596632303-0.980373697956j))*x[0] + ((0.717048988103+0.596237977526j))*x[1]**o + ((-0.370079849986+0.25410644905j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.238018753391+0.195992248739j)-((-0.0425923815164+0.186375291064j))*(o-1.)
            arg[(1, 1, 1, 0)]=(0.693709315318+0.972956311455j)*x[0]**o + ((-0.610364703205-0.0418435119655j))*x[0] + ((-0.804195730847-0.140309938569j))*x[1]**o + ((0.968370522446+0.479084827994j))*x[1]
            ref[(1, 1, 1, 0)]=(0.123759701856+0.634943844457j)-((-0.0184144025882+0.138774395481j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.211996092504+0.480228641149j)*x[0]**o + ((0.626020963314-0.410581198054j))*x[0] + ((-0.264784921109+0.425204299771j))*x[1]**o + ((-0.673912099764+0.259824710347j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.0503399825278+0.377338226607j)-((-0.00879813810096+0.150905490153j))*(o-1.)
            arg[(1, 1, 2, 0)]=(0.701338395302+0.48412023127j)*x[0]**o + ((0.012880228763+0.262844034989j))*x[0] + ((-0.639174921401+0.979846752903j))*x[1]**o + ((-0.288509013288+0.55208305217j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.106732655312+1.13944703567j)-((0.0103605789834+0.243994497362j))*(o-1.)
            arg[(1, 1, 2, 1)]=(-0.118537560003-0.463761848254j)*x[0]**o + ((-0.172974839741-0.97303309127j))*x[0] + ((0.610113522181-0.864828238296j))*x[1]**o + ((-0.389749225328+0.80383132156j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.0355740514454-0.74889592813j)-((0.0819293270297-0.221431681092j))*(o-1.)
            arg[(1, 2, 0, 0)]=(0.716617554921-0.452384481085j)*x[0]**o + ((-0.390044548697-0.722969397352j))*x[0] + ((0.943185184572-0.167395660075j))*x[1]**o + ((-0.0604092844123-0.941406931513j))*x[1]
            ref[(1, 2, 0, 0)]=(0.604674453192-1.14207823501j)-((0.276633789915-0.103296690193j))*(o-1.)
            arg[(1, 2, 0, 1)]=(0.73282428661-0.437168217472j)*x[0]**o + ((-0.0726877237075+0.473113463454j))*x[0] + ((0.554396862103+0.994981321788j))*x[1]**o + ((-0.641469511905+0.6450889422j))*x[1]
            ref[(1, 2, 0, 1)]=(0.28653195655+0.838007754985j)-((0.214536858119+0.0929688507194j))*(o-1.)
            arg[(1, 2, 1, 0)]=(-0.862474681119+0.663098655609j)*x[0]**o + ((0.606236848839+0.584379415795j))*x[0] + ((-0.317243490603-0.872983707953j))*x[1]**o + ((-0.409173920864+0.508470520761j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.491327621873+0.441482442106j)-((-0.196619695287-0.0349808420573j))*(o-1.)
            arg[(1, 2, 1, 1)]=(0.975077594251-0.395419539837j)*x[0]**o + ((0.352848738408-0.819635074843j))*x[0] + ((-0.735373780589-0.791700591072j))*x[1]**o + ((-0.645659425709-0.328342045838j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.0265534368194-1.16754862579j)-((0.0399506356102-0.197853355152j))*(o-1.)
            arg[(1, 2, 2, 0)]=(-0.603016184399-0.787888249516j)*x[0]**o + ((-0.0572521972689-0.967411189872j))*x[0] + ((-0.0980036143125-0.347780351604j))*x[1]**o + ((0.237828809523+0.277015259539j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.260221593228-0.913032265727j)-((-0.116836633119-0.189278100187j))*(o-1.)
            arg[(1, 2, 2, 1)]=(-0.361575241468-0.0494598084078j)*x[0]**o + ((-0.93954948213-0.126634006447j))*x[0] + ((0.997121528587-0.389272915943j))*x[1]**o + ((-0.375163195326-0.643862135652j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.339583195169-0.604614433225j)-((0.105924381186-0.0731221207252j))*(o-1.)
            arg[(1, 3, 0, 0)]=(-0.342765316257-0.833150841651j)*x[0]**o + ((0.203265587456-0.521057660381j))*x[0] + ((-0.548837030062-0.471031209648j))*x[1]**o + ((-0.631076857978-0.913436951021j))*x[1]
            ref[(1, 3, 0, 0)]=(-0.65970680842-1.36933833135j)-((-0.148600391053-0.217363675216j))*(o-1.)
            arg[(1, 3, 0, 1)]=(0.677686502593+0.411786248282j)*x[0]**o + ((-0.395664020936-0.802333645078j))*x[0] + ((0.375103431642+0.269714353032j))*x[1]**o + ((0.711098073283-0.596824455523j))*x[1]
            ref[(1, 3, 0, 1)]=(0.684111993291-0.358828749644j)-((0.175464989039+0.113583433552j))*(o-1.)
            arg[(1, 3, 1, 0)]=(0.226176406392+0.458724303778j)*x[0]**o + ((-0.998890524321-0.700253647788j))*x[0] + ((0.576234209791+0.933676045921j))*x[1]**o + ((0.210797552418+0.289769213317j))*x[1]
            ref[(1, 3, 1, 0)]=(0.00715882213975+0.490957957614j)-((0.133735102697+0.23206672495j))*(o-1.)
            arg[(1, 3, 1, 1)]=(-0.191210854592+0.826712247132j)*x[0]**o + ((0.437917988652-0.860912716055j))*x[0] + ((-0.405819108894-0.138942191901j))*x[1]**o + ((-0.251496244094+0.642992708943j))*x[1]
            ref[(1, 3, 1, 1)]=(-0.205304109464+0.23492502406j)-((-0.0995049939143+0.114628342539j))*(o-1.)
            arg[(1, 3, 2, 0)]=(-0.338330538369-0.456216462347j)*x[0]**o + ((-0.681714497603+0.275811631234j))*x[0] + ((-0.710807330369-0.451426594183j))*x[1]**o + ((0.514906677073+0.232502062485j))*x[1]
            ref[(1, 3, 2, 0)]=(-0.607972844634-0.199664681405j)-((-0.174856311456-0.151273842755j))*(o-1.)
            arg[(1, 3, 2, 1)]=(-0.631150877312-0.851168440766j)*x[0]**o + ((0.416097983518+0.736483881087j))*x[0] + ((0.911789173502+0.863583232133j))*x[1]**o + ((0.140001241021-0.603411771121j))*x[1]
            ref[(1, 3, 2, 1)]=(0.418368760364+0.0727434506663j)-((0.0467730493649+0.00206913189441j))*(o-1.)
            arg[(2, 0, 0, 0)]=(-0.433787164244-0.615400149872j)*x[0]**o + ((0.714667513152+0.559277831525j))*x[0] + ((-0.219057963905+0.497905775911j))*x[1]**o + ((-0.0875959228384+0.465962709883j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.0128867689176+0.453873083723j)-((-0.108807521358-0.0195823956602j))*(o-1.)
            arg[(2, 0, 0, 1)]=(0.355076612566-0.9668945955j)*x[0]**o + ((0.519265037465+0.848978414871j))*x[0] + ((0.245867037208-0.593868109668j))*x[1]**o + ((0.959054285852+0.190045029925j))*x[1]
            ref[(2, 0, 0, 1)]=(1.03963148655-0.260869630186j)-((0.100157274962-0.260127117528j))*(o-1.)
            arg[(2, 0, 1, 0)]=(0.102295065529+0.874321260728j)*x[0]**o + ((-0.795150122997+0.828627291512j))*x[0] + ((0.0820398907107+0.597550378464j))*x[1]**o + ((-0.884224222713-0.722188709106j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.747519694735+0.789155110799j)-((0.0307224927067+0.245311939865j))*(o-1.)
            arg[(2, 0, 1, 1)]=(-0.313913094194-0.484700951422j)*x[0]**o + ((0.750932311945+0.471108122409j))*x[0] + ((-0.12218662499+0.70031148685j))*x[1]**o + ((-0.497234880786-0.621876463104j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.0912011440122+0.0324210973665j)-((-0.0726832865307+0.035935089238j))*(o-1.)
            arg[(2, 0, 2, 0)]=(-0.658833430404-0.851244873528j)*x[0]**o + ((-0.0294116250365-0.426917190124j))*x[0] + ((0.147609079887+0.0206341141459j))*x[1]**o + ((0.217057045836-0.779872076971j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.161789464858-1.01870001324j)-((-0.0852040584195-0.138435126564j))*(o-1.)
            arg[(2, 0, 2, 1)]=(-0.96789106786+0.495910906076j)*x[0]**o + ((-0.675167564827-0.337726536191j))*x[0] + ((0.266921846494-0.00696722791664j))*x[1]**o + ((0.598988942592+0.402967332759j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.3885739218+0.277092237364j)-((-0.116828203561+0.0814906130266j))*(o-1.)
            arg[(2, 1, 0, 0)]=(0.493847723727-0.6366187055j)*x[0]**o + ((-0.830341478702+0.00534409619283j))*x[0] + ((-0.10781652013+0.472423804511j))*x[1]**o + ((-0.754995647075-0.219264302151j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.59965296109-0.189057553474j)-((0.0643385339329-0.0273658168315j))*(o-1.)
            arg[(2, 1, 0, 1)]=(-0.176017279478+0.460007508696j)*x[0]**o + ((0.622844451665+0.801430138308j))*x[0] + ((0.377256647367-0.0484227110213j))*x[1]**o + ((-0.828530820658-0.0570270865524j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.0022235005517+0.577993924715j)-((0.0335398946482+0.0685974662791j))*(o-1.)
            arg[(2, 1, 1, 0)]=(0.497345369226-0.624488675265j)*x[0]**o + ((0.621870174933+0.979638384791j))*x[0] + ((-0.790513690407+0.486356645492j))*x[1]**o + ((-0.292846210484+0.927239060593j))*x[1]
            ref[(2, 1, 1, 0)]=(0.017927821634+0.884372707805j)-((-0.0488613868635-0.0230220049622j))*(o-1.)
            arg[(2, 1, 1, 1)]=(0.45634374882+0.653477080681j)*x[0]**o + ((-0.136680425627-0.983015263754j))*x[0] + ((0.883529136674-0.453103689783j))*x[1]**o + ((-0.594157558024+0.611568073764j))*x[1]
            ref[(2, 1, 1, 1)]=(0.304517450922-0.0855368995462j)-((0.223312147582+0.0333955651496j))*(o-1.)
            arg[(2, 1, 2, 0)]=(0.895218736786-0.599939367013j)*x[0]**o + ((0.524171067675-0.494329673674j))*x[0] + ((0.655050313493-0.983491095142j))*x[1]**o + ((-0.673348165788-0.285950224348j))*x[1]
            ref[(2, 1, 2, 0)]=(0.700545976083-1.18185518009j)-((0.258378175046-0.263905077026j))*(o-1.)
            arg[(2, 1, 2, 1)]=(0.799984787002-0.145063359959j)*x[0]**o + ((0.798341674042+0.340447875248j))*x[0] + ((0.424533050117-0.983175116676j))*x[1]**o + ((0.156478219936+0.373920571051j))*x[1]
            ref[(2, 1, 2, 1)]=(1.08966886555-0.206935015168j)-((0.204086306187-0.188039746106j))*(o-1.)
            arg[(2, 2, 0, 0)]=(-0.456388741014+0.033058048729j)*x[0]**o + ((0.0048322529307+0.485453705228j))*x[0] + ((0.191068126761-0.631080679609j))*x[1]**o + ((0.879073111235+0.300959024341j))*x[1]
            ref[(2, 2, 0, 0)]=(0.309292374956+0.0941950493446j)-((-0.0442201023755-0.09967043848j))*(o-1.)
            arg[(2, 2, 0, 1)]=(-0.415841261608+0.946342194941j)*x[0]**o + ((-0.637137479898+0.473890045483j))*x[0] + ((0.95012621543-0.0621362618826j))*x[1]**o + ((-0.476022621875-0.660261840749j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.289437573975+0.348917068896j)-((0.0890474923036+0.14736765551j))*(o-1.)
            arg[(2, 2, 1, 0)]=(0.165728950937-0.841441851765j)*x[0]**o + ((0.122634846698+0.794196668574j))*x[0] + ((0.850306284765+0.020935551357j))*x[1]**o + ((0.303020126712-0.421255533298j))*x[1]
            ref[(2, 2, 1, 0)]=(0.720845104556-0.223782582566j)-((0.16933920595-0.136751050068j))*(o-1.)
            arg[(2, 2, 1, 1)]=(0.206871997837-0.696247833608j)*x[0]**o + ((0.556297375454+0.336578815512j))*x[0] + ((-0.695129919311-0.150379005607j))*x[1]**o + ((-0.946812120873+0.163451664747j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.439386333446-0.173298179478j)-((-0.0813763202457-0.141104473202j))*(o-1.)
            arg[(2, 2, 2, 0)]=(0.682132617076-0.819089870107j)*x[0]**o + ((0.00795993309438+0.827569413954j))*x[0] + ((-0.400765987251-0.863717213772j))*x[1]**o + ((-0.147595524345+0.147557116288j))*x[1]
            ref[(2, 2, 2, 0)]=(0.0708655192873-0.353840276819j)-((0.0468944383042-0.280467847313j))*(o-1.)
            arg[(2, 2, 2, 1)]=(-0.42413295448+0.976170782182j)*x[0]**o + ((-0.22925017923+0.432634465257j))*x[0] + ((0.309165075661-0.940571735769j))*x[1]**o + ((-0.190985126841+0.266230100292j))*x[1]
            ref[(2, 2, 2, 1)]=(-0.267601592445+0.367231805981j)-((-0.0191613131365+0.00593317440219j))*(o-1.)
            arg[(2, 3, 0, 0)]=(-0.174242554302+0.824611324505j)*x[0]**o + ((0.115354413143+0.77902756229j))*x[0] + ((0.386236699972+0.900726472177j))*x[1]**o + ((0.750793152462-0.960926603025j))*x[1]
            ref[(2, 3, 0, 0)]=(0.539070855637+0.771719377973j)-((0.0353323576116+0.287556299447j))*(o-1.)
            arg[(2, 3, 0, 1)]=(0.863495739956+0.457483012208j)*x[0]**o + ((0.49253939739+0.720154617833j))*x[0] + ((0.147979595701+0.452487627895j))*x[1]**o + ((0.398648947197-0.327808913169j))*x[1]
            ref[(2, 3, 0, 1)]=(0.951331840122+0.651158172383j)-((0.168579222609+0.15166177335j))*(o-1.)
            arg[(2, 3, 1, 0)]=(-0.507061099264+0.826078135744j)*x[0]**o + ((-0.109522167959-0.678345666499j))*x[0] + ((0.00766385377161+0.220758467479j))*x[1]**o + ((0.222249915372-0.529016691819j))*x[1]
            ref[(2, 3, 1, 0)]=(-0.19333474904-0.0802628775476j)-((-0.0832328742488+0.174472767204j))*(o-1.)
            arg[(2, 3, 1, 1)]=(-0.303017133982+0.408762455738j)*x[0]**o + ((0.579698078051-0.277271791964j))*x[0] + ((0.26309571818-0.7913196785j))*x[1]**o + ((0.148732162736-0.70685666889j))*x[1]
            ref[(2, 3, 1, 1)]=(0.344254412492-0.683342841808j)-((-0.00665356930032-0.0637595371269j))*(o-1.)
            arg[(2, 3, 2, 0)]=(-0.117455350437-0.911116254291j)*x[0]**o + ((-0.284486808499+0.939190139178j))*x[0] + ((-0.346604254719-0.398322654883j))*x[1]**o + ((0.749560159453+0.419898807974j))*x[1]
            ref[(2, 3, 2, 0)]=(0.000506872899105+0.024825018989j)-((-0.0773432675259-0.218239818196j))*(o-1.)
            arg[(2, 3, 2, 1)]=(0.694192605691+0.153082586564j)*x[0]**o + ((0.986428552243+0.221668277118j))*x[0] + ((0.896784351202+0.362638236507j))*x[1]**o + ((-0.682764071862-0.659335883382j))*x[1]
            ref[(2, 3, 2, 1)]=(0.947320718637+0.0390266084028j)-((0.265162826149+0.0859534705117j))*(o-1.)
            arg[(3, 0, 0, 0)]=(0.587834815034+0.931173220166j)*x[0]**o + ((0.227195759112-0.371002860436j))*x[0] + ((0.908831293912-0.733522084401j))*x[1]**o + ((-0.535800291954-0.843661970325j))*x[1]
            ref[(3, 0, 0, 0)]=(0.594030788052-0.508506847498j)-((0.249444351491+0.0329418559608j))*(o-1.)
            arg[(3, 0, 0, 1)]=(0.443430373626-0.293978053659j)*x[0]**o + ((-0.134031111672-0.0986469793894j))*x[0] + ((0.0774077277518+0.772876479786j))*x[1]**o + ((-0.170259783297+0.440136526435j))*x[1]
            ref[(3, 0, 0, 1)]=(0.108273603204+0.410193986586j)-((0.0868063502297+0.0798164043546j))*(o-1.)
            arg[(3, 0, 1, 0)]=(0.729754820726+0.423093016284j)*x[0]**o + ((-0.661974033167-0.499294823999j))*x[0] + ((-0.233250347432-0.742410072309j))*x[1]**o + ((0.656551665361+0.144135311787j))*x[1]
            ref[(3, 0, 1, 0)]=(0.245541052744-0.337238284119j)-((0.0827507455489-0.0532195093375j))*(o-1.)
            arg[(3, 0, 1, 1)]=(-0.845108890608-0.91610633226j)*x[0]**o + ((0.0770118689866-0.115020922219j))*x[0] + ((0.759143331839+0.464467586459j))*x[1]**o + ((-0.216438911439+0.918703769978j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.112696300611+0.176022050979j)-((-0.0143275931282-0.0752731243002j))*(o-1.)
            arg[(3, 0, 2, 0)]=(-0.970982633176-0.664710297655j)*x[0]**o + ((0.000617978380867+0.37502185483j))*x[0] + ((0.157610111526+0.356952210908j))*x[1]**o + ((0.17962363619-0.569277636553j))*x[1]
            ref[(3, 0, 2, 0)]=(-0.31656545354-0.251006934235j)-((-0.135562086942-0.0512930144579j))*(o-1.)
            arg[(3, 0, 2, 1)]=(-0.559938645551+0.474267814564j)*x[0]**o + ((0.476983846407+0.783768637702j))*x[0] + ((-0.407731656564-0.723039796562j))*x[1]**o + ((-0.710664664216-0.571836294236j))*x[1]
            ref[(3, 0, 2, 1)]=(-0.600675559962-0.0184198192662j)-((-0.161278383686-0.0414619969996j))*(o-1.)
            arg[(3, 1, 0, 0)]=(-0.0898130924622-0.869638430117j)*x[0]**o + ((0.921152625387+0.901650865597j))*x[0] + ((-0.818251990674-0.0355222990619j))*x[1]**o + ((0.701723680725-0.0689328731996j))*x[1]
            ref[(3, 1, 0, 0)]=(0.357405611487-0.0362213683903j)-((-0.151344180523-0.15086012153j))*(o-1.)
            arg[(3, 1, 0, 1)]=(-0.258558375275+0.532154108086j)*x[0]**o + ((-0.000680604197579-0.477350995902j))*x[0] + ((0.689375669777-0.476339737252j))*x[1]**o + ((0.887172260735-0.713210463399j))*x[1]
            ref[(3, 1, 0, 1)]=(0.65865447552-0.567373544233j)-((0.071802882417+0.00930239513914j))*(o-1.)
            arg[(3, 1, 1, 0)]=(-0.421995034306+0.519166718301j)*x[0]**o + ((-0.769054797014+0.894950781422j))*x[0] + ((0.742989549503-0.409357106932j))*x[1]**o + ((-0.13918811014-0.512564503002j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.293624195978+0.246097944894j)-((0.0534990858662+0.0183016018948j))*(o-1.)
            arg[(3, 1, 1, 1)]=(0.578628832831+0.832766068551j)*x[0]**o + ((0.817402549781+0.80970359516j))*x[0] + ((0.938994589156-0.730257118451j))*x[1]**o + ((0.130732635707+0.684262634093j))*x[1]
            ref[(3, 1, 1, 1)]=(1.23287930374+0.798237589676j)-((0.252937236998+0.0170848250165j))*(o-1.)
            arg[(3, 1, 2, 0)]=(0.386991956562-0.38715579409j)*x[0]**o + ((0.621794898058-0.943243779733j))*x[0] + ((-0.945449836853+0.118695159261j))*x[1]**o + ((0.0521871670067+0.229809740637j))*x[1]
            ref[(3, 1, 2, 0)]=(0.0577620923868-0.490947336962j)-((-0.0930763133818-0.0447434391381j))*(o-1.)
            arg[(3, 1, 2, 1)]=(0.648057290478+0.867839305415j)*x[0]**o + ((0.0197548667313+0.520889183635j))*x[0] + ((0.263836893156-0.574120484516j))*x[1]**o + ((0.985924647552+0.178610543205j))*x[1]
            ref[(3, 1, 2, 1)]=(0.958786848959+0.496609273869j)-((0.151982363939+0.0489531368165j))*(o-1.)
            arg[(3, 2, 0, 0)]=(0.836318534998+0.601496839621j)*x[0]**o + ((-0.789955396845+0.140264902798j))*x[0] + ((0.746535301143-0.21283960168j))*x[1]**o + ((-0.849089289645+0.368824256987j))*x[1]
            ref[(3, 2, 0, 0)]=(-0.0280954251745+0.448873198863j)-((0.26380897269+0.0647762063234j))*(o-1.)
            arg[(3, 2, 0, 1)]=(0.280600772541+0.498744141048j)*x[0]**o + ((-0.421677557774+0.325658050795j))*x[0] + ((-0.934056292054-0.695106425383j))*x[1]**o + ((0.979012847722-0.486242771729j))*x[1]
            ref[(3, 2, 0, 1)]=(-0.0480601147821-0.178473502634j)-((-0.108909253252-0.0327270473892j))*(o-1.)
            arg[(3, 2, 1, 0)]=(0.898024725493-0.415767266554j)*x[0]**o + ((0.322059666876-0.895911746291j))*x[0] + ((0.813157746176+0.524242265042j))*x[1]**o + ((-0.463687449605-0.947890107267j))*x[1]
            ref[(3, 2, 1, 0)]=(0.78477734447-0.867663427535j)-((0.285197078612+0.0180791664146j))*(o-1.)
            arg[(3, 2, 1, 1)]=(0.710954536721-0.869214808048j)*x[0]**o + ((0.284015125069+0.371568484189j))*x[0] + ((0.746024678907+0.248780575273j))*x[1]**o + ((-0.69992033076+0.913692460813j))*x[1]
            ref[(3, 2, 1, 1)]=(0.520537004969+0.332413356113j)-((0.242829869271-0.103405705463j))*(o-1.)
            arg[(3, 2, 2, 0)]=(-0.988443925894+0.613471079971j)*x[0]**o + ((-0.437736215246-0.672418285065j))*x[0] + ((-0.983856707447+0.136462368705j))*x[1]**o + ((-0.00463175742688+0.00321361530333j))*x[1]
            ref[(3, 2, 2, 0)]=(-1.20733430301+0.0403643894567j)-((-0.328716772224+0.124988908113j))*(o-1.)
            arg[(3, 2, 2, 1)]=(-0.441472561601+0.779016831993j)*x[0]**o + ((-0.745480869519-0.763055280771j))*x[0] + ((-0.186312553841-0.365686651529j))*x[1]**o + ((-0.0690954013512-0.351436975386j))*x[1]
            ref[(3, 2, 2, 1)]=(-0.721180693156-0.350581037847j)-((-0.104630852574+0.0688883634107j))*(o-1.)
            arg[(3, 3, 0, 0)]=(-0.806315355976+0.353238867405j)*x[0]**o + ((0.271537412852-0.852233705449j))*x[0] + ((-0.751185176803+0.357651659435j))*x[1]**o + ((-0.848968700095+0.00787719488661j))*x[1]
            ref[(3, 3, 0, 0)]=(-1.06746591001-0.0667329918612j)-((-0.25958342213+0.118481754473j))*(o-1.)
            arg[(3, 3, 0, 1)]=(-0.112315445453-0.886800058113j)*x[0]**o + ((0.244060718352+0.464954149418j))*x[0] + ((0.334629153942+0.64873662681j))*x[1]**o + ((0.961843343236+0.733890884995j))*x[1]
            ref[(3, 3, 0, 1)]=(0.714108885039+0.480390801555j)-((0.0370522847482-0.0396772385506j))*(o-1.)
            arg[(3, 3, 1, 0)]=(0.806817450201-0.0442536350796j)*x[0]**o + ((-0.618445290338+0.184435456201j))*x[0] + ((-0.0683648946804-0.279375429839j))*x[1]**o + ((0.530364743531-0.365793236485j))*x[1]
            ref[(3, 3, 1, 0)]=(0.325186004357-0.252493422602j)-((0.12307542592-0.0539381774865j))*(o-1.)
            arg[(3, 3, 1, 1)]=(0.626511813738-0.549586440663j)*x[0]**o + ((-0.825414635053+0.824574411019j))*x[0] + ((0.297606132797-0.407495110955j))*x[1]**o + ((0.784636840034+0.877718105443j))*x[1]
            ref[(3, 3, 1, 1)]=(0.441670075758+0.372605482422j)-((0.154019657756-0.159513591936j))*(o-1.)
            arg[(3, 3, 2, 0)]=(0.68850887425+0.593950756629j)*x[0]**o + ((-0.330881588681-0.236351363572j))*x[0] + ((-0.570027521168+0.840018606496j))*x[1]**o + ((0.685893723365+0.828379261049j))*x[1]
            ref[(3, 3, 2, 0)]=(0.236746743883+1.0129986303j)-((0.0197468921803+0.238994893854j))*(o-1.)
            arg[(3, 3, 2, 1)]=(-0.782102572148-0.702867346106j)*x[0]**o + ((-0.364988688348-0.932902817626j))*x[0] + ((-0.535522560354-0.788596834581j))*x[1]**o + ((-0.533435000725-0.183372757991j))*x[1]
            ref[(3, 3, 2, 1)]=(-1.10802441079-1.30386987815j)-((-0.21960418875-0.248577363448j))*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=(0.985069051759-0.625898470147j)*x[0]**o + ((0.821935975195-0.139584964453j))*x[0] + ((0.575255349579-0.769698355329j))*x[1]**o + ((0.440216328436-0.753278084349j))*x[1] + ((0.943562993166-0.3802187866j))*x[2]**o + ((-0.0423499851525-0.556845257832j))*x[2]
            ref[(0, 0, 0, 0)]=(1.86184485649-1.61276195935j)-((0.417314565751-0.295969268679j))*(o-1.)
            arg[(0, 0, 0, 1)]=(0.767670972641-0.770930325389j)*x[0]**o + ((0.253899954161+0.478248542159j))*x[0] + ((-0.0330444621335+0.234901837246j))*x[1]**o + ((-0.896279162069-0.656686961231j))*x[1] + ((0.447564945008+0.253366244186j))*x[2]**o + ((0.776315029605+0.605695633489j))*x[2]
            ref[(0, 0, 0, 1)]=(0.658063638606+0.0722974852301j)-((0.197031909253-0.0471103739928j))*(o-1.)
            arg[(0, 0, 1, 0)]=(0.0282545587519+0.506446972409j)*x[0]**o + ((0.795755355362+0.0436529843944j))*x[0] + ((0.132236272147+0.226547470993j))*x[1]**o + ((-0.549679201779+0.46162929728j))*x[1] + ((0.362107884318+0.307276103746j))*x[2]**o + ((-0.922630497827-0.15760615968j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.0769778145135+0.693973334571j)-((0.0870997858694+0.173378424525j))*(o-1.)
            arg[(0, 0, 1, 1)]=(0.543626647786+0.134865969272j)*x[0]**o + ((-0.156174509222+0.804562919395j))*x[0] + ((0.818241377068-0.656116850873j))*x[1]**o + ((-0.469899463-0.874083954608j))*x[1] + ((0.486637548308+0.208914744245j))*x[2]**o + ((0.0408931194368-0.869658858483j))*x[2]
            ref[(0, 0, 1, 1)]=(0.631662360189-0.625758015526j)-((0.308084262194-0.0520560228926j))*(o-1.)
            arg[(0, 0, 2, 0)]=(-0.283699144871+0.20928966873j)*x[0]**o + ((0.0634010209085+0.752261992517j))*x[0] + ((-0.398700608197+0.699303835624j))*x[1]**o + ((0.567308925375-0.703717438015j))*x[1] + ((0.475279077239+0.0360521455695j))*x[2]**o + ((-0.498377047763+0.937040738292j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.0373938886537+0.965115471358j)-((-0.0345201126381+0.157440941654j))*(o-1.)
            arg[(0, 0, 2, 1)]=(0.979188586031-0.323547395874j)*x[0]**o + ((0.4080011402-0.924063674738j))*x[0] + ((-0.495259823153-0.631423810132j))*x[1]**o + ((0.0317093589042-0.00625052104389j))*x[1] + ((0.274572149793-0.700430845264j))*x[2]**o + ((-0.315214228372-0.581119287761j))*x[2]
            ref[(0, 0, 2, 1)]=(0.441498591702-1.58341776741j)-((0.126416818778-0.275900341878j))*(o-1.)
            arg[(0, 1, 0, 0)]=(-0.332996919958-0.395776605699j)*x[0]**o + ((-0.574195094368+0.187683274302j))*x[0] + ((0.314507466874+0.247821899095j))*x[1]**o + ((0.967494193059-0.389349414229j))*x[1] + ((0.592589345034+0.852494608101j))*x[2]**o + ((-0.0753482526558+0.109891455088j))*x[2]
            ref[(0, 1, 0, 0)]=(0.446025368993+0.306382608329j)-((0.0956833153251+0.117423316916j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.616996332404-0.0851905058482j)*x[0]**o + ((0.309810622056+0.267772041517j))*x[0] + ((0.171893815635-0.722972033044j))*x[1]**o + ((-0.92113737059+0.0157691447357j))*x[1] + ((-0.896090238541+0.0143848688914j))*x[2]**o + ((0.233730463145+0.732884205092j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.242398187945+0.111323860672j)-((-0.0178666817502-0.132296278333j))*(o-1.)
            arg[(0, 1, 1, 0)]=(0.943394951634-0.386027721948j)*x[0]**o + ((-0.0662200207067+0.595229202538j))*x[0] + ((0.402781211778-0.0247826111779j))*x[1]**o + ((0.716107775599+0.153798802444j))*x[1] + ((-0.460465665771-0.659922506584j))*x[2]**o + ((0.565521140245-0.788150119023j))*x[2]
            ref[(0, 1, 1, 0)]=(1.05055969639-0.554927476875j)-((0.147618416274-0.178455473285j))*(o-1.)
            arg[(0, 1, 1, 1)]=(0.250297143993-0.191512640762j)*x[0]**o + ((-0.992268526805-0.836559501582j))*x[0] + ((-0.699627596519-0.582875195115j))*x[1]**o + ((0.670077664818-0.961498931047j))*x[1] + ((0.488672946382+0.289722056234j))*x[2]**o + ((0.408837631437-0.688961431335j))*x[2]
            ref[(0, 1, 1, 1)]=(0.0629946316532-1.4858428218j)-((0.00655708230946-0.0807776299406j))*(o-1.)
            arg[(0, 1, 2, 0)]=(0.305197417695+0.681123617975j)*x[0]**o + ((-0.0282739244027-0.544507182168j))*x[0] + ((-0.423395972477-0.301330659123j))*x[1]**o + ((-0.909884528959-0.802085451832j))*x[1] + ((-0.584043534936+0.73996038903j))*x[2]**o + ((0.948021500759-0.927127341135j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.34618952116-0.576983313626j)-((-0.117040348286+0.18662555798j))*(o-1.)
            arg[(0, 1, 2, 1)]=(0.537083278395-0.342156509825j)*x[0]**o + ((0.517130558972+0.759043584056j))*x[0] + ((-0.397819521063+0.500085153957j))*x[1]**o + ((0.913315597427-0.718358328941j))*x[1] + ((0.496064500338-0.538815909854j))*x[2]**o + ((0.767891501024-0.80780787419j))*x[2]
            ref[(0, 1, 2, 1)]=(1.41683295755-0.574004942398j)-((0.105888042945-0.0634812109536j))*(o-1.)
            arg[(0, 2, 0, 0)]=(-0.877195171362+0.704683543171j)*x[0]**o + ((-0.41600330493-0.814388376125j))*x[0] + ((-0.156371290659-0.889303614754j))*x[1]**o + ((-0.136027605172-0.133096583723j))*x[1] + ((-0.11235502166-0.691423480747j))*x[2]**o + ((-0.394441762532-0.863306355405j))*x[2]
            ref[(0, 2, 0, 0)]=(-1.04619707816-1.34341743379j)-((-0.190986913947-0.146007258722j))*(o-1.)
            arg[(0, 2, 0, 1)]=(0.430163519075+0.796372496474j)*x[0]**o + ((-0.244609594275+0.911435966771j))*x[0] + ((0.912157530543+0.725317565549j))*x[1]**o + ((0.965124859193-0.701231078974j))*x[1] + ((0.209196302195-0.643210332683j))*x[2]**o + ((-0.576382443905+0.822818168383j))*x[2]
            ref[(0, 2, 0, 1)]=(0.847825086412+0.955751392761j)-((0.258586225302+0.146413288224j))*(o-1.)
            arg[(0, 2, 1, 0)]=(0.372343284637-0.773776964331j)*x[0]**o + ((0.926819612981-0.596364825808j))*x[0] + ((-0.674727977637-0.170012237399j))*x[1]**o + ((-0.466407213261+0.634875981387j))*x[1] + ((-0.253664576386-0.418491852439j))*x[2]**o + ((-0.237154823402-0.900626938177j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.166395846534-1.11219841838j)-((-0.0926748782309-0.227046842362j))*(o-1.)
            arg[(0, 2, 1, 1)]=(-0.68915721358+0.0410274941304j)*x[0]**o + ((0.939689404416-0.522917910828j))*x[0] + ((-0.604127100057+0.120505763871j))*x[1]**o + ((0.684320787935-0.137027804221j))*x[1] + ((0.291028177096-0.137750415146j))*x[2]**o + ((0.639722233836+0.915106558116j))*x[2]
            ref[(0, 2, 1, 1)]=(0.630738144823+0.139471842961j)-((-0.167042689423+0.00396380714261j))*(o-1.)
            arg[(0, 2, 2, 0)]=(0.150729945344-0.123638100247j)*x[0]**o + ((0.702181022378+0.955115464971j))*x[0] + ((0.892959699284+0.642664321182j))*x[1]**o + ((0.38153225689+0.64149124323j))*x[1] + ((-0.225091476991+0.192088374267j))*x[2]**o + ((0.951690753276-0.24772880174j))*x[2]
            ref[(0, 2, 2, 0)]=(1.42700110009+1.02999625083j)-((0.13643302794+0.1185190992j))*(o-1.)
            arg[(0, 2, 2, 1)]=(-0.209705595484+0.459470223409j)*x[0]**o + ((0.0482307695376-0.250700471213j))*x[0] + ((-0.760325219373+0.824988100085j))*x[1]**o + ((0.690019887518-0.710009569367j))*x[1] + ((-0.652501439336-0.785439372829j))*x[2]**o + ((-0.282458302753+0.933181067106j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.583369949945+0.235744988595j)-((-0.270422042366+0.0831698251108j))*(o-1.)
            arg[(0, 3, 0, 0)]=(0.100230071878-0.650348693374j)*x[0]**o + ((-0.115345512698-0.632590164185j))*x[0] + ((0.273959993358-0.496005173518j))*x[1]**o + ((0.412357989187-0.703716805163j))*x[1] + ((0.911889272175+0.822547129899j))*x[2]**o + ((0.925191769046-0.78587197613j))*x[2]
            ref[(0, 3, 0, 0)]=(1.25414179147-1.22299284124j)-((0.214346556235-0.0539677894988j))*(o-1.)
            arg[(0, 3, 0, 1)]=(0.70421057295-0.484983216731j)*x[0]**o + ((0.0581316432002+0.659605919721j))*x[0] + ((0.766999734828-0.636488096162j))*x[1]**o + ((-0.614926383668+0.581048558883j))*x[1] + ((-0.943585574393-0.828677910189j))*x[2]**o + ((-0.162107095331+0.429960644525j))*x[2]
            ref[(0, 3, 0, 1)]=(-0.0956385512072-0.139767049977j)-((0.0879374555641-0.325024870514j))*(o-1.)
            arg[(0, 3, 1, 0)]=(0.893550963709+0.180452642222j)*x[0]**o + ((0.438183392497-0.143637376763j))*x[0] + ((0.762337084145+0.923248114169j))*x[1]**o + ((0.48850984144+0.96758393531j))*x[1] + ((-0.270795047541-0.694384304949j))*x[2]**o + ((0.516097058548-0.939694512808j))*x[2]
            ref[(0, 3, 1, 0)]=(1.4139416464+0.146784248591j)-((0.230848833385+0.0682194085738j))*(o-1.)
            arg[(0, 3, 1, 1)]=(-0.838410870357+0.583583148311j)*x[0]**o + ((0.809233660972+0.0896689230325j))*x[0] + ((0.651991556566+0.836200300744j))*x[1]**o + ((0.576466798107+0.629282220888j))*x[1] + ((-0.232441965881+0.211979281843j))*x[2]**o + ((-0.51417258558-0.0585702743124j))*x[2]
            ref[(0, 3, 1, 1)]=(0.226333296913+1.14607180025j)-((-0.0698102132787+0.27196045515j))*(o-1.)
            arg[(0, 3, 2, 0)]=(0.303889182271-0.125227164911j)*x[0]**o + ((0.214794577731+0.958440510252j))*x[0] + ((-0.936061103038+0.374499334429j))*x[1]**o + ((-0.329932737218+0.455791888491j))*x[1] + ((0.065136659649-0.188122367119j))*x[2]**o + ((-0.564965305017-0.349926543019j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.623569362811+0.562727829062j)-((-0.094505876853+0.0101916337331j))*(o-1.)
            arg[(0, 3, 2, 1)]=(-0.605859296223+0.118665295023j)*x[0]**o + ((0.506119942096-0.876155735862j))*x[0] + ((0.00519821024674+0.676651434072j))*x[1]**o + ((-0.272580378234-0.122441360007j))*x[1] + ((-0.769773539377+0.344016657583j))*x[2]**o + ((0.146749246877-0.963245248414j))*x[2]
            ref[(0, 3, 2, 1)]=(-0.495072907307-0.411254478803j)-((-0.228405770892+0.18988889778j))*(o-1.)
            arg[(1, 0, 0, 0)]=(0.00129735345442+0.542713945786j)*x[0]**o + ((-0.734898962388+0.439053017074j))*x[0] + ((0.295155466064+0.991198425469j))*x[1]**o + ((0.661964997732-0.902065649962j))*x[1] + ((0.789148564682-0.0781090888894j))*x[2]**o + ((0.856326809501-0.744478776244j))*x[2]
            ref[(1, 0, 0, 0)]=(0.934497114523+0.124155936617j)-((0.180933564033+0.242633880394j))*(o-1.)
            arg[(1, 0, 0, 1)]=(-0.200350241542+0.41636894697j)*x[0]**o + ((-0.906296595271-0.746079371448j))*x[0] + ((-0.0854291896539-0.0747542750887j))*x[1]**o + ((-0.521836757434-0.430050245946j))*x[1] + ((-0.568608354256+0.53284597463j))*x[2]**o + ((0.783931690221+0.345998920769j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.749294723968+0.0221649749433j)-((-0.142397964242+0.145743441085j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.928691629786-0.790903727897j)*x[0]**o + ((0.246672200852+0.363490037116j))*x[0] + ((-0.077633428211+0.667790995927j))*x[1]**o + ((0.693193389336-0.628980041849j))*x[1] + ((0.249627422496+0.5330646851j))*x[2]**o + ((0.168703994718+0.83037068658j))*x[2]
            ref[(1, 0, 1, 0)]=(0.175935974702+0.487416317489j)-((-0.126116272584+0.0683253255217j))*(o-1.)
            arg[(1, 0, 1, 1)]=(0.48238364865+0.365351450669j)*x[0]**o + ((0.0780873431249-0.309140558894j))*x[0] + ((0.871389828841+0.892620212115j))*x[1]**o + ((-0.334231174405-0.139360315219j))*x[1] + ((-0.849703385526-0.948247200964j))*x[2]**o + ((0.675436649341+0.384984452221j))*x[2]
            ref[(1, 0, 1, 1)]=(0.461681455013+0.123104019963j)-((0.0840116819942+0.0516207436365j))*(o-1.)
            arg[(1, 0, 2, 0)]=(0.542715960506-0.390203605366j)*x[0]**o + ((-0.161818774901-0.221878601786j))*x[0] + ((0.436282436075+0.486468834807j))*x[1]**o + ((0.497516551819+0.465826412998j))*x[1] + ((0.106342723023-0.451937232017j))*x[2]**o + ((0.342311943174+0.742151419316j))*x[2]
            ref[(1, 0, 2, 0)]=(0.881675419848+0.315213613977j)-((0.180890186601-0.059278667096j))*(o-1.)
            arg[(1, 0, 2, 1)]=(0.0715071963642+0.206063794316j)*x[0]**o + ((-0.553912988896+0.492468858518j))*x[0] + ((-0.331480127354-0.757532298101j))*x[1]**o + ((0.851791116183-0.368714646265j))*x[1] + ((-0.438356383766-0.240565625303j))*x[2]**o + ((0.874665225614+0.366548700289j))*x[2]
            ref[(1, 0, 2, 1)]=(0.237107019072-0.150865608273j)-((-0.116388219126-0.132005688181j))*(o-1.)
            arg[(1, 1, 0, 0)]=(-0.0351717973149+0.612423459401j)*x[0]**o + ((-0.441837106875+0.365286589706j))*x[0] + ((-0.728677809911-0.9599287921j))*x[1]**o + ((-0.0401417081663+0.608361160655j))*x[1] + ((-0.524146506331+0.203656178766j))*x[2]**o + ((-0.0146059169849+0.739145765255j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.892290422792+0.784472180841j)-((-0.214666018926-0.0239748589889j))*(o-1.)
            arg[(1, 1, 0, 1)]=(0.607135964611+0.774488337441j)*x[0]**o + ((0.414379529872-0.446852231794j))*x[0] + ((0.454749961067+0.242367537443j))*x[1]**o + ((0.580122541268-0.670022637973j))*x[1] + ((0.327171491105-0.296208906293j))*x[2]**o + ((-0.243690438145-0.689621731864j))*x[2]
            ref[(1, 1, 0, 1)]=(1.06993452489-0.54292481652j)-((0.231509569464+0.120107828098j))*(o-1.)
            arg[(1, 1, 1, 0)]=(0.381368118392+0.252737898704j)*x[0]**o + ((0.496319058505+0.595994780312j))*x[0] + ((0.657909397212-0.75601352245j))*x[1]**o + ((-0.550412830336+0.446112397274j))*x[1] + ((-0.145807527009+0.0669820398193j))*x[2]**o + ((0.0489222112277+0.53209301564j))*x[2]
            ref[(1, 1, 1, 0)]=(0.444149213996+0.56895330465j)-((0.148911664766-0.0727155973212j))*(o-1.)
            arg[(1, 1, 1, 1)]=(-0.499223843302-0.28991627822j)*x[0]**o + ((-0.442028313037-0.0217761566892j))*x[0] + ((0.166650343004-0.903851588304j))*x[1]**o + ((-0.659092123988-0.658900917101j))*x[1] + ((-0.961365861933-0.0472012513876j))*x[2]**o + ((-0.462209182257-0.450009065896j))*x[2]
            ref[(1, 1, 1, 1)]=(-1.42863449076-1.1858276288j)-((-0.215656560372-0.206828186319j))*(o-1.)
            arg[(1, 1, 2, 0)]=(0.644383431086+0.155223464719j)*x[0]**o + ((0.816359111202-0.226778138262j))*x[0] + ((0.477649893521+0.152958159753j))*x[1]**o + ((-0.142405686454-0.604953875451j))*x[1] + ((0.622854728495-0.861148309858j))*x[2]**o + ((0.920531418792+0.642694446983j))*x[2]
            ref[(1, 1, 2, 0)]=(1.66968644832-0.371002126058j)-((0.290814675517-0.0921611142309j))*(o-1.)
            arg[(1, 1, 2, 1)]=(-0.143691269816-0.970021129114j)*x[0]**o + ((0.657667691974+0.768977420477j))*x[0] + ((0.125298363489-0.738869655082j))*x[1]**o + ((-0.998177481488-0.763783742895j))*x[1] + ((0.0636283234956-0.552478661194j))*x[2]**o + ((0.312047090689-0.53553764725j))*x[2]
            ref[(1, 1, 2, 1)]=(0.00838635917199-1.39585670753j)-((0.00753923619488-0.376894907565j))*(o-1.)
            arg[(1, 2, 0, 0)]=(-0.0500260804335+0.476275081799j)*x[0]**o + ((0.407875514631-0.200117740942j))*x[0] + ((-0.900352874566+0.600882756153j))*x[1]**o + ((-0.490530626892-0.771269601403j))*x[1] + ((0.888090256905+0.00155737288782j))*x[2]**o + ((-0.18694658893+0.0186418151358j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.165945199642+0.0629848418151j)-((-0.0103814496824+0.179785868473j))*(o-1.)
            arg[(1, 2, 0, 1)]=(-0.572780001356+0.515062752352j)*x[0]**o + ((-0.227514010301+0.653973499942j))*x[0] + ((0.915831975591-0.866528263867j))*x[1]**o + ((-0.722587449649+0.835530750275j))*x[1] + ((-0.273500881303-0.833551451817j))*x[2]**o + ((0.389249569401+0.296648099463j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.245650398808+0.300567693174j)-((0.0115918488221-0.197502827222j))*(o-1.)
            arg[(1, 2, 1, 0)]=(0.104412506719+0.660870654763j)*x[0]**o + ((-0.974848236821-0.396125729886j))*x[0] + ((-0.249826391625+0.569491603359j))*x[1]**o + ((0.817803980549+0.303619945491j))*x[1] + ((-0.550610832136-0.870489026327j))*x[2]**o + ((-0.00756854796803-0.811135189736j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.430318760641-0.271883871168j)-((-0.116004119507+0.0599788719659j))*(o-1.)
            arg[(1, 2, 1, 1)]=(0.111202265857-0.373535785474j)*x[0]**o + ((0.688777711831-0.656361094219j))*x[0] + ((0.952295353444-0.197983229459j))*x[1]**o + ((0.410956147829-0.391979431401j))*x[1] + ((-0.237094602496-0.0252103058072j))*x[2]**o + ((0.544370416484+0.689883831853j))*x[2]
            ref[(1, 2, 1, 1)]=(1.23525364647-0.477593007253j)-((0.137733836134-0.09945488679j))*(o-1.)
            arg[(1, 2, 2, 0)]=(0.590810393813+0.846381432786j)*x[0]**o + ((-0.83641323602-0.040744035795j))*x[0] + ((-0.442140418583+0.434423839416j))*x[1]**o + ((-0.954301061833-0.63054862857j))*x[1] + ((-0.687463485242+0.699023950531j))*x[2]**o + ((0.71315623601-0.435976017868j))*x[2]
            ref[(1, 2, 2, 0)]=(-0.808175785928+0.43628027025j)-((-0.0897989183354+0.329971537122j))*(o-1.)
            arg[(1, 2, 2, 1)]=(0.258254844153+0.730739526436j)*x[0]**o + ((-0.914294626815+0.659982884721j))*x[0] + ((-0.47073438345+0.343394393068j))*x[1]**o + ((-0.0405833380568+0.245618166994j))*x[1] + ((-0.683995975869+0.603745534075j))*x[2]**o + ((0.479352417559+0.9931926133j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.686000531239+1.7883365593j)-((-0.149412585861+0.279646575596j))*(o-1.)
            arg[(1, 3, 0, 0)]=(0.66857599448-0.733761839483j)*x[0]**o + ((-0.206399323897+0.41181763365j))*x[0] + ((-0.727108040113-0.899592156303j))*x[1]**o + ((0.914797396891-0.422403773037j))*x[1] + ((-0.991489297684+0.697837854493j))*x[2]**o + ((-0.0300952376328-0.531396446589j))*x[2]
            ref[(1, 3, 0, 0)]=(-0.185859253978-0.738749363634j)-((-0.17500355722-0.155919356882j))*(o-1.)
            arg[(1, 3, 0, 1)]=(-0.607596537962+0.374823301874j)*x[0]**o + ((0.000272992598763+0.258083038598j))*x[0] + ((0.309127997264-0.592087534391j))*x[1]**o + ((-0.872084603498+0.612579896679j))*x[1] + ((0.927449465331-0.426275119012j))*x[2]**o + ((0.869239414868+0.409425923515j))*x[2]
            ref[(1, 3, 0, 1)]=(0.313204364301+0.318274753631j)-((0.104830154105-0.107256558588j))*(o-1.)
            arg[(1, 3, 1, 0)]=(-0.107915263152-0.340537784469j)*x[0]**o + ((0.889939154641-0.686127419128j))*x[0] + ((-0.82075927711+0.649439424981j))*x[1]**o + ((0.928623015453-0.0470746771646j))*x[1] + ((0.405391907428-0.986459263825j))*x[2]**o + ((-0.0864921938137+0.597767710608j))*x[2]
            ref[(1, 3, 1, 0)]=(0.604393671723-0.406496004499j)-((-0.087213772139-0.112926270552j))*(o-1.)
            arg[(1, 3, 1, 1)]=(0.602275932353-0.364713945069j)*x[0]**o + ((0.167736263909+0.640738324134j))*x[0] + ((-0.777839001496+0.338023963389j))*x[1]**o + ((0.24315108242-0.613430777503j))*x[1] + ((0.347034727113-0.105518543464j))*x[2]**o + ((-0.520353632971+0.994117953474j))*x[2]
            ref[(1, 3, 1, 1)]=(0.0310026856642+0.44460848748j)-((0.0285786096617-0.0220347541908j))*(o-1.)
            arg[(1, 3, 2, 0)]=(0.359802245086-0.683332746075j)*x[0]**o + ((0.617983892453-0.607688921448j))*x[0] + ((0.209615993708+0.466736615167j))*x[1]**o + ((-0.876026550016-0.529059362016j))*x[1] + ((-0.973701218725+0.285011070427j))*x[2]**o + ((0.862783484721-0.197434107452j))*x[2]
            ref[(1, 3, 2, 0)]=(0.100228923614-0.632883725698j)-((-0.0673804966552+0.0114024899198j))*(o-1.)
            arg[(1, 3, 2, 1)]=(0.546405029025-0.000377692727477j)*x[0]**o + ((0.599075843629-0.266515326501j))*x[0] + ((-0.748550356551+0.380920429595j))*x[1]**o + ((0.639600993756+0.428498590483j))*x[1] + ((0.829097073087-0.778048727841j))*x[2]**o + ((-0.36989907883-0.837303342355j))*x[2]
            ref[(1, 3, 2, 1)]=(0.747864752059-0.536413034674j)-((0.104491957594-0.0662509984957j))*(o-1.)
            arg[(2, 0, 0, 0)]=(-0.609097822689-0.733678141974j)*x[0]**o + ((0.152998254244+0.875975235998j))*x[0] + ((0.613212152109+0.23852130422j))*x[1]**o + ((-0.0471673727763+0.495442980791j))*x[1] + ((0.404970420033-0.370973979725j))*x[2]**o + ((-0.816326428166-0.633685058252j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.150705398622-0.0641988294708j)-((0.0681807915757-0.144355136246j))*(o-1.)
            arg[(2, 0, 0, 1)]=(-0.936355713126-0.421157131145j)*x[0]**o + ((-0.488746162097+0.831786418801j))*x[0] + ((0.862735617523+0.342206001768j))*x[1]**o + ((-0.0432731025199+0.109118415676j))*x[1] + ((0.336827864377+0.322682940148j))*x[2]**o + ((-0.730984089325+0.0786930111954j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.499897792584+0.631664828222j)-((0.0438679614624+0.040621968462j))*(o-1.)
            arg[(2, 0, 1, 0)]=(-0.158087303852+0.403635708551j)*x[0]**o + ((-0.505737741963+0.324372873011j))*x[0] + ((0.88857673102+0.896883082877j))*x[1]**o + ((0.150116199581+0.870197263166j))*x[1] + ((0.606990658543-0.259065861778j))*x[2]**o + ((-0.981110672591+0.357082694996j))*x[2]
            ref[(2, 0, 1, 0)]=(0.000373935368895+1.29655288041j)-((0.222913347619+0.173575488275j))*(o-1.)
            arg[(2, 0, 1, 1)]=(0.997699142278-0.817739466425j)*x[0]**o + ((0.818909687077+0.300365676665j))*x[0] + ((0.997126449571+0.358868639701j))*x[1]**o + ((-0.718338600715-0.500967908298j))*x[1] + ((0.438218916586+0.0397187702058j))*x[2]**o + ((-0.0973013270218-0.833633053319j))*x[2]
            ref[(2, 0, 1, 1)]=(1.21815713389-0.726693670736j)-((0.405507418073-0.0698586760865j))*(o-1.)
            arg[(2, 0, 2, 0)]=(-0.630952341822+0.855899824647j)*x[0]**o + ((-0.289981416552-0.244343876596j))*x[0] + ((0.964137881522-0.157615004431j))*x[1]**o + ((0.0240686899564+0.935880283479j))*x[1] + ((-0.367828378284-0.392654046259j))*x[2]**o + ((0.58917851303-0.970479634203j))*x[2]
            ref[(2, 0, 2, 0)]=(0.144311473925+0.0133437733183j)-((-0.0057738064306+0.0509384623262j))*(o-1.)
            arg[(2, 0, 2, 1)]=(-0.356631563824-0.37337610954j)*x[0]**o + ((0.530741992017+0.494711266247j))*x[0] + ((0.453190889267-0.601897476636j))*x[1]**o + ((-0.681824186135-0.841968511408j))*x[1] + ((-0.61949369017-0.61096932449j))*x[2]**o + ((0.920167928633+0.767878711447j))*x[2]
            ref[(2, 0, 2, 1)]=(0.123075684894-0.58281072219j)-((-0.0871557274544-0.264373818444j))*(o-1.)
            arg[(2, 1, 0, 0)]=(-0.190549836985+0.289059005235j)*x[0]**o + ((-0.483171572513-0.640854135128j))*x[0] + ((0.783682957944-0.106179040579j))*x[1]**o + ((0.962298317971-0.386850391684j))*x[1] + ((0.246961324475-0.529156259844j))*x[2]**o + ((-0.497293898068+0.675101729933j))*x[2]
            ref[(2, 1, 0, 0)]=(0.410963646413-0.349439546034j)-((0.140015740906-0.0577127158647j))*(o-1.)
            arg[(2, 1, 0, 1)]=(-0.921893964174+0.669024284603j)*x[0]**o + ((-0.739504033215-0.0149408937163j))*x[0] + ((0.538219654389-0.456410521365j))*x[1]**o + ((-0.240414233485-0.607864028109j))*x[1] + ((-0.657766250198-0.360211398792j))*x[2]**o + ((-0.704097228597-0.800025024499j))*x[2]
            ref[(2, 1, 0, 1)]=(-1.36272802764-0.785213790939j)-((-0.173573426664-0.0245996059256j))*(o-1.)
            arg[(2, 1, 1, 0)]=(-0.966446278707-0.844421775732j)*x[0]**o + ((0.918332452861+0.217153008226j))*x[0] + ((-0.532105494083+0.596443657778j))*x[1]**o + ((-0.212139108423+0.886625494874j))*x[1] + ((0.220653400768+0.199665809311j))*x[2]**o + ((-0.468656640006+0.93751363957j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.520180833795+0.996489917013j)-((-0.212983062004-0.00805205144064j))*(o-1.)
            arg[(2, 1, 1, 1)]=(0.939554096388+0.236323079012j)*x[0]**o + ((-0.44347322516+0.640734415187j))*x[0] + ((0.21477393026-0.607528923753j))*x[1]**o + ((0.625114806269+0.452024078525j))*x[1] + ((-0.331054135173-0.645137444667j))*x[2]**o + ((-0.48393730237+0.601301711273j))*x[2]
            ref[(2, 1, 1, 1)]=(0.260489085107+0.338858457788j)-((0.137212315246-0.169390548235j))*(o-1.)
            arg[(2, 1, 2, 0)]=(0.345644807657+0.391028508223j)*x[0]**o + ((0.939361082034-0.60697138008j))*x[0] + ((-0.180860454026+0.370652030244j))*x[1]**o + ((0.653536392027-0.315191011546j))*x[1] + ((-0.886099044839-0.415949204183j))*x[2]**o + ((-0.612432805321-0.621684355714j))*x[2]
            ref[(2, 1, 2, 0)]=(0.129574988765-0.599057706528j)-((-0.120219115201+0.0576218890473j))*(o-1.)
            arg[(2, 1, 2, 1)]=(0.981863374186-0.232382947695j)*x[0]**o + ((-0.531656215515-0.346249550188j))*x[0] + ((0.201723339561+0.411730205373j))*x[1]**o + ((-0.77131547428+0.266409076749j))*x[1] + ((0.59815412764+0.417491458405j))*x[2]**o + ((0.597483981565-0.0283122883619j))*x[2]
            ref[(2, 1, 2, 1)]=(0.538126566578+0.244342977141j)-((0.296956806898+0.0994731193472j))*(o-1.)
            arg[(2, 2, 0, 0)]=(0.687803729385-0.457416207619j)*x[0]**o + ((0.110759055892-0.620005115798j))*x[0] + ((-0.585355173749-0.749047959714j))*x[1]**o + ((-0.666069238065+0.344480860179j))*x[1] + ((-0.449727045635-0.983064047241j))*x[2]**o + ((0.741267816802-0.238939658479j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.0806604276847-1.35199606434j)-((-0.0578797483331-0.364921369096j))*(o-1.)
            arg[(2, 2, 0, 1)]=(-0.0413769860276+0.494600926838j)*x[0]**o + ((0.395195214729+0.608683626856j))*x[0] + ((-0.774109667705-0.21501979109j))*x[1]**o + ((-0.884634134315+0.420074091532j))*x[1] + ((0.490370465662+0.0640294169441j))*x[2]**o + ((0.0202202993276-0.215806072121j))*x[2]
            ref[(2, 2, 0, 1)]=(-0.397167404165+0.578281099479j)-((-0.0541860313451+0.0572684254487j))*(o-1.)
            arg[(2, 2, 1, 0)]=(-0.425061485762-0.224794831645j)*x[0]**o + ((-0.90615479216-0.96889737025j))*x[0] + ((0.376715512201+0.659692377415j))*x[1]**o + ((0.789040812553-0.335873286917j))*x[1] + ((-0.327397470037+0.191941332748j))*x[2]**o + ((-0.902744305236+0.666271233209j))*x[2]
            ref[(2, 2, 1, 0)]=(-0.697800864221-0.00583027272017j)-((-0.0626239072663+0.10447314642j))*(o-1.)
            arg[(2, 2, 1, 1)]=(0.0480036859294+0.604350716914j)*x[0]**o + ((-0.744804970634-0.113392395439j))*x[0] + ((0.82668022248-0.785391474216j))*x[1]**o + ((-0.853781071593-0.558554778899j))*x[1] + ((0.116136105292-0.763241439444j))*x[2]**o + ((0.899179435864-0.952086968804j))*x[2]
            ref[(2, 2, 1, 1)]=(0.14570670367-1.28415816994j)-((0.16513666895-0.157380366124j))*(o-1.)
            arg[(2, 2, 2, 0)]=(-0.345106898932+0.73275412584j)*x[0]**o + ((0.6928907466+0.267790830833j))*x[0] + ((-0.271356114259-0.971809342889j))*x[1]**o + ((0.589442569344+0.739988177856j))*x[1] + ((-0.548971559662+0.429552299262j))*x[2]**o + ((0.263977644941+0.245102696513j))*x[2]
            ref[(2, 2, 2, 0)]=(0.190438194016+0.721689393707j)-((-0.194239095476+0.0317495137021j))*(o-1.)
            arg[(2, 2, 2, 1)]=(0.98513343793-0.329138723945j)*x[0]**o + ((0.867156913968+0.766182525996j))*x[0] + ((-0.340692386819+0.350728582944j))*x[1]**o + ((-0.0136943229046+0.722961688559j))*x[1] + ((-0.776471188487-0.703746998705j))*x[2]**o + ((0.480454763382-0.633969665017j))*x[2]
            ref[(2, 2, 2, 1)]=(0.600943608535+0.0865087049162j)-((-0.0220050228961-0.113692856618j))*(o-1.)
            arg[(2, 3, 0, 0)]=(0.983040970695+0.300217440676j)*x[0]**o + ((-0.298934447611+0.00760262092767j))*x[0] + ((-0.0504467794547-0.0320515979328j))*x[1]**o + ((0.946769427177-0.114783914066j))*x[1] + ((-0.561284785248+0.946409296233j))*x[2]**o + ((-0.0938831088373+0.610650055765j))*x[2]
            ref[(2, 3, 0, 0)]=(0.46263063836+0.859021950801j)-((0.0618849009987+0.202429189829j))*(o-1.)
            arg[(2, 3, 0, 1)]=(0.549583201191-0.0878009433448j)*x[0]**o + ((0.00990807793096-0.274163959085j))*x[0] + ((-0.0106643203015-0.956039043847j))*x[1]**o + ((0.390872896689+0.650447015873j))*x[1] + ((0.790575332439-0.370000357311j))*x[2]**o + ((-0.799105306019+0.64624921225j))*x[2]
            ref[(2, 3, 0, 1)]=(0.465584940965-0.195654037733j)-((0.221582368888-0.235640057417j))*(o-1.)
            arg[(2, 3, 1, 0)]=(0.231813637816+0.751660604091j)*x[0]**o + ((0.737614101918+0.662313790364j))*x[0] + ((0.242363575223-0.965902175474j))*x[1]**o + ((0.741136083544+0.756658461711j))*x[1] + ((-0.0214348586372+0.628485951051j))*x[2]**o + ((-0.248459940483-0.207684559668j))*x[2]
            ref[(2, 3, 1, 0)]=(0.841516299691+0.812766036037j)-((0.0754570590669+0.0690407299447j))*(o-1.)
            arg[(2, 3, 1, 1)]=(-0.215894325425+0.0677355544697j)*x[0]**o + ((0.204186299671+0.683410858971j))*x[0] + ((0.301403013538+0.251821797795j))*x[1]**o + ((-0.124942759379-0.949529823368j))*x[1] + ((-0.721511360567+0.475572976774j))*x[2]**o + ((-0.266135965064+0.240039612468j))*x[2]
            ref[(2, 3, 1, 1)]=(-0.411447548613+0.384525488555j)-((-0.106000445409+0.132521721506j))*(o-1.)
            arg[(2, 3, 2, 0)]=(0.607106374499-0.339295018706j)*x[0]**o + ((-0.287460006247-0.916239650882j))*x[0] + ((-0.676438611989-0.808252693932j))*x[1]**o + ((-0.0748702793031-0.887531734155j))*x[1] + ((-0.980151745768+0.0123040921761j))*x[2]**o + ((-0.950709540806+0.467435393773j))*x[2]
            ref[(2, 3, 2, 0)]=(-1.18126190481-1.23578980586j)-((-0.17491399721-0.189207270077j))*(o-1.)
            arg[(2, 3, 2, 1)]=(-0.701405047466+0.53594593476j)*x[0]**o + ((-0.0655910724536+0.875016001818j))*x[0] + ((0.635439117224+0.0414776812461j))*x[1]**o + ((0.709892603394+0.0662502739184j))*x[1] + ((0.648485565147-0.996685762097j))*x[2]**o + ((0.899173182081-0.117118773312j))*x[2]
            ref[(2, 3, 2, 1)]=(1.06299717396+0.202442678167j)-((0.0970866058175-0.0698770243485j))*(o-1.)
            arg[(3, 0, 0, 0)]=(-0.135316091434+0.804542948623j)*x[0]**o + ((-0.475722978094+0.978108151962j))*x[0] + ((-0.406518901856-0.325373077221j))*x[1]**o + ((0.684699490745+0.818763040095j))*x[1] + ((0.297627114726+0.590648055713j))*x[2]**o + ((-0.0195776422936-0.364549794232j))*x[2]
            ref[(3, 0, 0, 0)]=(-0.0274045041032+1.25106966247j)-((-0.040701313094+0.178302987853j))*(o-1.)
            arg[(3, 0, 0, 1)]=(-0.0624866800473+0.939581059628j)*x[0]**o + ((-0.194244955313-0.62717895108j))*x[0] + ((0.0281491056385-0.800528499402j))*x[1]**o + ((-0.0631795524683-0.441581011799j))*x[1] + ((0.94055158647+0.796278889421j))*x[2]**o + ((-0.217087715955-0.704527063366j))*x[2]
            ref[(3, 0, 0, 1)]=(0.215850894162-0.418977788299j)-((0.151035668677+0.155888574941j))*(o-1.)
            arg[(3, 0, 1, 0)]=(-0.48361641197+0.0483781650693j)*x[0]**o + ((0.459145918137-0.770552443952j))*x[0] + ((-0.0313654685334+0.364259944744j))*x[1]**o + ((0.165479567313+0.0398604936636j))*x[1] + ((-0.357783820692+0.550423418308j))*x[2]**o + ((0.450729467468+0.349938954812j))*x[2]
            ref[(3, 0, 1, 0)]=(0.101294625861+0.291154266322j)-((-0.145460950199+0.160510254687j))*(o-1.)
            arg[(3, 0, 1, 1)]=(0.484124454608-0.119667273698j)*x[0]**o + ((0.603565268022+0.149971235359j))*x[0] + ((0.505286800158+0.788612654325j))*x[1]**o + ((0.232072481857-0.230219154897j))*x[1] + ((-0.293054329333+0.528702150495j))*x[2]**o + ((0.886580989092-0.95615817022j))*x[2]
            ref[(3, 0, 1, 1)]=(1.2092878322+0.0806207206815j)-((0.116059487572+0.199607921854j))*(o-1.)
            arg[(3, 0, 2, 0)]=(0.89750625773+0.377945152767j)*x[0]**o + ((-0.434239811423-0.599792742567j))*x[0] + ((0.618817606272-0.593279621069j))*x[1]**o + ((0.183669502398+0.91481928554j))*x[1] + ((0.825063471294+0.46879364958j))*x[2]**o + ((-0.393120455803-0.932409642245j))*x[2]
            ref[(3, 0, 2, 0)]=(0.848848285234-0.181961958997j)-((0.390231222549+0.0422431968797j))*(o-1.)
            arg[(3, 0, 2, 1)]=(-0.664750767842-0.479404475815j)*x[0]**o + ((-0.699253785875+0.820436617319j))*x[0] + ((0.794604530444-0.118416915546j))*x[1]**o + ((-0.659611805311-0.192545035916j))*x[1] + ((-0.81862826534+0.512950739042j))*x[2]**o + ((0.808164504415+0.643213601072j))*x[2]
            ref[(3, 0, 2, 1)]=(-0.619737794755+0.593117265078j)-((-0.114795750456-0.0141451087198j))*(o-1.)
            arg[(3, 1, 0, 0)]=(-0.814311187743-0.94413643353j)*x[0]**o + ((0.859576744401+0.530190238607j))*x[0] + ((0.355919733374-0.883684540113j))*x[1]**o + ((0.516603990002+0.378096450514j))*x[1] + ((-0.246248617692-0.824928857445j))*x[2]**o + ((0.322153517909-0.0917693367368j))*x[2]
            ref[(3, 1, 0, 0)]=(0.496847090125-0.918116239353j)-((-0.11744001201-0.442124971848j))*(o-1.)
            arg[(3, 1, 0, 1)]=(0.967420609926+0.451468628165j)*x[0]**o + ((-0.283602015225-0.876267146398j))*x[0] + ((0.434595044988+0.508055995866j))*x[1]**o + ((-0.218803143427+0.927048007782j))*x[1] + ((0.212408436013-0.297550464441j))*x[2]**o + ((0.98169077575-0.16160294822j))*x[2]
            ref[(3, 1, 0, 1)]=(1.04685485401+0.275576036377j)-((0.269070681821+0.110329026598j))*(o-1.)
            arg[(3, 1, 1, 0)]=(0.602012361037-0.0459976127785j)*x[0]**o + ((-0.491029952389-0.177933020193j))*x[0] + ((-0.871680706998+0.102397227628j))*x[1]**o + ((-0.177555922328-0.503809446537j))*x[1] + ((-0.855985305114-0.727331193085j))*x[2]**o + ((-0.408354683861-0.177092377314j))*x[2]
            ref[(3, 1, 1, 0)]=(-1.10129710483-0.76488321114j)-((-0.187608941846-0.111821929706j))*(o-1.)
            arg[(3, 1, 1, 1)]=(-0.466029425105+0.657368970361j)*x[0]**o + ((-0.117083374178-0.67541464399j))*x[0] + ((0.483811445016-0.67792839467j))*x[1]**o + ((0.300271068471-0.607537676994j))*x[1] + ((0.0747020124449-0.645344538614j))*x[2]**o + ((-0.920821939271+0.980589577819j))*x[2]
            ref[(3, 1, 1, 1)]=(-0.322575106312-0.484133353044j)-((0.0154140053926-0.11098399382j))*(o-1.)
            arg[(3, 1, 2, 0)]=(-0.207624895307+0.119824983008j)*x[0]**o + ((-0.840494962731+0.788789306211j))*x[0] + ((0.145582599665+0.222322035017j))*x[1]**o + ((0.738717772135-0.551649612371j))*x[1] + ((-0.588133128864-0.768572745772j))*x[2]**o + ((-0.245855655346+0.330415213237j))*x[2]
            ref[(3, 1, 2, 0)]=(-0.498904135224+0.0705645896647j)-((-0.108362570751-0.0710709546246j))*(o-1.)
            arg[(3, 1, 2, 1)]=(0.944195426016-0.33728603884j)*x[0]**o + ((0.260102664501-0.825906486491j))*x[0] + ((-0.937425270184+0.115907208172j))*x[1]**o + ((-0.526902615144-0.619441741308j))*x[1] + ((-0.312482038628+0.33903945359j))*x[2]**o + ((-0.00767744932908-0.503620517177j))*x[2]
            ref[(3, 1, 2, 1)]=(-0.290094641384-0.915654061027j)-((-0.050951980466+0.0196101038204j))*(o-1.)
            arg[(3, 2, 0, 0)]=(-0.683700746794-0.818531044003j)*x[0]**o + ((0.584174034494+0.149774118566j))*x[0] + ((-0.643198814952+0.3585866366j))*x[1]**o + ((0.332681397946-0.756444176229j))*x[1] + ((0.953850002959+0.0590094800493j))*x[2]**o + ((0.748834441025+0.559863145158j))*x[2]
            ref[(3, 2, 0, 0)]=(0.646320157339-0.223870919929j)-((-0.0621749264644-0.0668224878922j))*(o-1.)
            arg[(3, 2, 0, 1)]=(-0.522537396377+0.378978292548j)*x[0]**o + ((-0.31925226023-0.43447603556j))*x[0] + ((0.502614108814-0.645006047835j))*x[1]**o + ((0.482900617497-0.0822845883746j))*x[1] + ((0.422881211505-0.937211489235j))*x[2]**o + ((0.0834827128639-0.381697175437j))*x[2]
            ref[(3, 2, 0, 1)]=(0.325044497036-1.05084852195j)-((0.0671596539903-0.200539874087j))*(o-1.)
            arg[(3, 2, 1, 0)]=(-0.832622478046+0.0554405110553j)*x[0]**o + ((0.104216107371-0.932641850561j))*x[0] + ((0.505210565256-0.0564240650361j))*x[1]**o + ((0.966061882829+0.903308950917j))*x[1] + ((0.0527367780744+0.662017458344j))*x[2]**o + ((0.410907806698-0.841367045488j))*x[2]
            ref[(3, 2, 1, 0)]=(0.603255331091-0.104833020385j)-((-0.0457791891192+0.110172317394j))*(o-1.)
            arg[(3, 2, 1, 1)]=(-0.218169153298-0.0104750236721j)*x[0]**o + ((0.0288859597959+0.19454708215j))*x[0] + ((-0.407303598375+0.173987936177j))*x[1]**o + ((-0.743277463072+0.466995342765j))*x[1] + ((-0.779667012001-0.308968775833j))*x[2]**o + ((-0.416643098315-0.623850079768j))*x[2]
            ref[(3, 2, 1, 1)]=(-1.26808718263-0.0538817590905j)-((-0.234189960612-0.0242426438879j))*(o-1.)
            arg[(3, 2, 2, 0)]=(-0.612134982705+0.949046661482j)*x[0]**o + ((0.219517068097+0.263284886798j))*x[0] + ((0.148949360965+0.413461106198j))*x[1]**o + ((0.790030223506-0.637368314679j))*x[1] + ((0.206712940635-0.0432795126816j))*x[2]**o + ((-0.688009507552-0.0269518047904j))*x[2]
            ref[(3, 2, 2, 0)]=(0.0325325514731+0.459096511164j)-((-0.0427454468507+0.219871375833j))*(o-1.)
            arg[(3, 2, 2, 1)]=(-0.0921293701793-0.0172140762487j)*x[0]**o + ((0.409356365271-0.229154815929j))*x[0] + ((0.664564935169-0.430238841888j))*x[1]**o + ((0.163140614632+0.872814981517j))*x[1] + ((0.456379754881+0.955303725946j))*x[2]**o + ((0.716288279104+0.188825149541j))*x[2]
            ref[(3, 2, 2, 1)]=(1.15880028944+0.670168061469j)-((0.171469219979+0.0846418013015j))*(o-1.)
            arg[(3, 3, 0, 0)]=(0.0152571365348-0.297823151255j)*x[0]**o + ((0.801123196975-0.808828855579j))*x[0] + ((-0.823896301327+0.67043007681j))*x[1]**o + ((-0.378529400195+0.762577264519j))*x[1] + ((-0.921380100796-0.745732320872j))*x[2]**o + ((-0.589358198498+0.025199647146j))*x[2]
            ref[(3, 3, 0, 0)]=(-0.948391833653-0.197088669615j)-((-0.288336544265-0.062187565886j))*(o-1.)
            arg[(3, 3, 0, 1)]=(-0.0781379264266+0.496133321909j)*x[0]**o + ((0.468244119848-0.311276682126j))*x[0] + ((-0.975472441881-0.723806510799j))*x[1]**o + ((-0.0419640918778-0.786409492872j))*x[1] + ((0.995376177305+0.300116351605j))*x[2]**o + ((0.465991950861+0.400373970603j))*x[2]
            ref[(3, 3, 0, 1)]=(0.417018893914-0.31243452084j)-((-0.00970569850043+0.0120738604524j))*(o-1.)
            arg[(3, 3, 1, 0)]=(-0.689367986746+0.274761048379j)*x[0]**o + ((-0.609795463642-0.97177491702j))*x[0] + ((-0.419216705209+0.811944722825j))*x[1]**o + ((0.121914979777+0.357358368641j))*x[1] + ((0.386995488404-0.724859913972j))*x[2]**o + ((0.462939873322-0.984035622408j))*x[2]
            ref[(3, 3, 1, 0)]=(-0.373264907047-0.618303156777j)-((-0.120264867258+0.0603076428721j))*(o-1.)
            arg[(3, 3, 1, 1)]=(-0.136372783386+0.0575950163549j)*x[0]**o + ((-0.415168251798-0.297916730163j))*x[0] + ((-0.706711675042+0.293700503418j))*x[1]**o + ((0.51746198816-0.00513120423364j))*x[1] + ((0.888279483945-0.912873762646j))*x[2]**o + ((-0.469563042538+0.226192745578j))*x[2]
            ref[(3, 3, 1, 1)]=(-0.161037140329-0.319216715846j)-((0.00753250425282-0.0935963738121j))*(o-1.)
            arg[(3, 3, 2, 0)]=(-0.138664435454+0.908311966718j)*x[0]**o + ((-0.137138657624-0.967040034942j))*x[0] + ((-0.102763875402+0.00554819445598j))*x[1]**o + ((-0.189131193434+0.709751919229j))*x[1] + ((-0.886976390765+0.469522570212j))*x[2]**o + ((0.283383263772-0.225768392976j))*x[2]
            ref[(3, 3, 2, 0)]=(-0.585645644454+0.450163111349j)-((-0.18806745027+0.230563788564j))*(o-1.)
            arg[(3, 3, 2, 1)]=(-0.492213984959-0.561203370508j)*x[0]**o + ((0.20377073787+0.95936590823j))*x[0] + ((0.65027865881+0.905710834388j))*x[1]**o + ((-0.29281873462-0.414574161211j))*x[1] + ((0.779999997531+0.913192800594j))*x[2]**o + ((-0.00610224078864+0.714828299621j))*x[2]
            ref[(3, 3, 2, 1)]=(0.421457216922+1.25866015556j)-((0.156344111897+0.209616710746j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.667980480619+0.788355050374j)*x[0]**o + ((0.819098724292-0.548707975564j))*x[0] + ((-0.0824865927456-0.135586286295j))*x[1]**o + ((-0.38614692608+0.802802725652j))*x[1]
            ref=(0.509222843042+0.453431757084j)-((0.0975823146456+0.108794794013j))*(o-1.)
        else:
            arg=(-0.26210602865-0.114152078732j)*x[0]**o + ((0.698454530497-0.495996007042j))*x[0] + ((0.70784642022+0.14223837232j))*x[1]**o + ((0.700445814524-0.783947918289j))*x[1] + ((0.60641812845+0.241185719504j))*x[2]**o + ((0.381721404137-0.28059217345j))*x[2]
            ref=(1.41639013459-0.645632042845j)-((0.175359753337+0.0448786688487j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.119364819154+0.312739074173j)*x[0]**o + ((-0.787745091554-0.969247847104j))*x[0] + ((-0.515098771724-0.418650592607j))*x[1]**o + ((0.105153259393-0.937581380647j))*x[1]
            ref[(0,)]=(-0.539162892365-1.00637037309j)-((-0.0659556587617-0.017651919739j))*(o-1.)
            arg[(1,)]=(0.132491641793+0.83598235478j)*x[0]**o + ((-0.672318596905+0.363239856526j))*x[0] + ((0.438200620135+0.378660075861j))*x[1]**o + ((0.511513106793+0.14033023043j))*x[1]
            ref[(1,)]=(0.204943385907+0.859106258799j)-((0.0951153769879+0.202440405107j))*(o-1.)
            arg[(2,)]=(-0.308751829628-0.673315531023j)*x[0]**o + ((0.650286832255-0.526085105642j))*x[0] + ((0.727002358908-0.278758436305j))*x[1]**o + ((0.672786091003+0.858116633248j))*x[1]
            ref[(2,)]=(0.870661726269-0.310021219861j)-((0.0697084215466-0.158678994555j))*(o-1.)
            arg[(3,)]=(0.933035260212+0.193280997265j)*x[0]**o + ((0.420898925908+0.532075485182j))*x[0] + ((-0.62827547508+0.63322493947j))*x[1]**o + ((-0.185065271342-0.66220554471j))*x[1]
            ref[(3,)]=(0.27029671985+0.348187938604j)-((0.0507932975221+0.137750989456j))*(o-1.)
        else:
            arg[(0,)]=(0.10182386038+0.421033414853j)*x[0]**o + ((-0.896547429848-0.659998577847j))*x[0] + ((0.621310100054-0.144664879017j))*x[1]**o + ((0.588408541572-0.213394583282j))*x[1] + ((0.464796754165-0.56526873526j))*x[2]**o + ((-0.86862640055+0.0193436536864j))*x[2]
            ref[(0,)]=(0.00558271288604-0.571474853433j)-((0.197988452433-0.0481500332373j))*(o-1.)
            arg[(1,)]=(0.637081059302+0.982698134504j)*x[0]**o + ((-0.470313227635+0.723707103348j))*x[0] + ((0.198621456201-0.711348265965j))*x[1]**o + ((0.235451766817+0.702672040455j))*x[1] + ((-0.0850651392494+0.753696437481j))*x[2]**o + ((-0.139751903352-0.160762122253j))*x[2]
            ref[(1,)]=(0.188012006042+1.14533166378j)-((0.125106229376+0.170841051003j))*(o-1.)
            arg[(2,)]=(0.83532911754-0.319922082013j)*x[0]**o + ((0.128535963055-0.834445529281j))*x[0] + ((0.037070470959+0.66940636324j))*x[1]**o + ((0.773289960066+0.500938220161j))*x[1] + ((-0.413284185341+0.380511121952j))*x[2]**o + ((0.797062133786-0.613828194847j))*x[2]
            ref[(2,)]=(1.07900173003-0.108670050394j)-((0.0765192338598+0.12166590053j))*(o-1.)
            arg[(3,)]=(0.975839917986+0.939071595593j)*x[0]**o + ((0.13662402118-0.831052551014j))*x[0] + ((-0.0447898745373+0.505895170194j))*x[1]**o + ((-0.780927429436+0.828233611944j))*x[1] + ((-0.800206762303+0.683651190752j))*x[2]**o + ((0.300828126837+0.268068593037j))*x[2]
            ref[(3,)]=(-0.106316000136+1.19693380525j)-((0.0218072135243+0.354769659423j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.936769615504-0.772200025548j)*x[0]**o + ((0.545741965893-0.577442619558j))*x[0] + ((0.610334408287+0.587078498993j))*x[1]**o + ((0.735211971619+0.901272445244j))*x[1]
            ref[(0, 0)]=(1.41402898065+0.069354149566j)-((0.257850670632-0.0308535877591j))*(o-1.)
            arg[(0, 1)]=(-0.874083833261+0.519560533893j)*x[0]**o + ((-0.825913634413+0.282187084474j))*x[0] + ((0.551424169472+0.10899379677j))*x[1]**o + ((0.20498453764+0.209185862103j))*x[1]
            ref[(0, 1)]=(-0.471794380281+0.55996363862j)-((-0.0537766106316+0.10475905511j))*(o-1.)
            arg[(1, 0)]=(-0.845364582619+0.959671573642j)*x[0]**o + ((0.164623162565-0.461666790723j))*x[0] + ((-0.164663119914+0.2258228069j))*x[1]**o + ((-0.397736769071-0.181210570252j))*x[1]
            ref[(1, 0)]=(-0.62157065452+0.271308509784j)-((-0.168337950422+0.197582396757j))*(o-1.)
            arg[(1, 1)]=(-0.896604393271+0.516423995328j)*x[0]**o + ((-0.707167664771-0.0236810056882j))*x[0] + ((0.494795800219+0.481239240869j))*x[1]**o + ((0.700236941921+0.892823736758j))*x[1]
            ref[(1, 1)]=(-0.204369657951+0.933402983633j)-((-0.0669680988421+0.166277206033j))*(o-1.)
            arg[(2, 0)]=(0.927331163265-0.0709931965525j)*x[0]**o + ((0.836889190538+0.114988459921j))*x[0] + ((-0.686311358894+0.249795399221j))*x[1]**o + ((0.698652072114-0.749048037502j))*x[1]
            ref[(2, 0)]=(0.888280533512-0.227628687456j)-((0.0401699673951+0.0298003671114j))*(o-1.)
            arg[(2, 1)]=(-0.727629756668-0.671804378868j)*x[0]**o + ((0.668843112954-0.125316552806j))*x[0] + ((0.943278058264-0.746370062681j))*x[1]**o + ((-0.922543530574-0.611786400297j))*x[1]
            ref[(2, 1)]=(-0.019026058012-1.07763869733j)-((0.0359413835993-0.236362406925j))*(o-1.)
        else:
            arg[(0, 0)]=(-0.730758020938+0.697710923566j)*x[0]**o + ((-0.120577249163-0.982398952505j))*x[0] + ((-0.307690675389-0.15130528168j))*x[1]**o + ((0.707561575221-0.845552577282j))*x[1] + ((-0.969575574358-0.819051397866j))*x[2]**o + ((0.764529611317+0.433664425877j))*x[2]
            ref[(0, 0)]=(-0.328255166654-0.833466429946j)-((-0.334670711781-0.0454409593301j))*(o-1.)
            arg[(0, 1)]=(-0.155693529826-0.247550596631j)*x[0]**o + ((-0.907357036068-0.256576435415j))*x[0] + ((0.509794576549+0.607048892556j))*x[1]**o + ((-0.916109738131+0.657695517516j))*x[1] + ((0.214962530011+0.553940422025j))*x[2]**o + ((0.787012268191+0.324055315167j))*x[2]
            ref[(0, 1)]=(-0.233695464637+0.819306557609j)-((0.0948439294556+0.152239786325j))*(o-1.)
            arg[(1, 0)]=(0.850791853199+0.368901818279j)*x[0]**o + ((0.9891863569+0.263087052011j))*x[0] + ((0.514588721227-0.430534805631j))*x[1]**o + ((-0.938039016413-0.0879620806141j))*x[1] + ((0.146697126364-0.0704857997597j))*x[2]**o + ((0.902427956784-0.125564964783j))*x[2]
            ref[(1, 0)]=(1.23282649903-0.0412793902486j)-((0.252012950132-0.0220197978519j))*(o-1.)
            arg[(1, 1)]=(-0.0673152799673+0.634199316978j)*x[0]**o + ((0.50669351162-0.388426226307j))*x[0] + ((0.888652255789+0.757525891357j))*x[1]**o + ((-0.365874640531-0.586068411811j))*x[1] + ((-0.10856124162+0.337485121341j))*x[2]**o + ((-0.396520420961+0.716075166851j))*x[2]
            ref[(1, 1)]=(0.228537092165+0.735395429204j)-((0.1187959557+0.288201721613j))*(o-1.)
            arg[(2, 0)]=(0.63752424159-0.970022590811j)*x[0]**o + ((-0.916278102902+0.241628128234j))*x[0] + ((0.807871180004-0.466853528056j))*x[1]**o + ((0.913764187877+0.0115888406469j))*x[1] + ((0.809316243508+0.851311718922j))*x[2]**o + ((-0.166997878474+0.940897578729j))*x[2]
            ref[(2, 0)]=(1.0425999358+0.304275073832j)-((0.375785277517-0.0975940666576j))*(o-1.)
            arg[(2, 1)]=(0.687627655176+0.705872916791j)*x[0]**o + ((0.122810710278+0.394788214747j))*x[0] + ((-0.67350479909+0.0423469693381j))*x[1]**o + ((0.490759109994+0.166726409845j))*x[1] + ((-0.0810476839007-0.716541344204j))*x[2]**o + ((-0.902576417768-0.945474516328j))*x[2]
            ref[(2, 1)]=(-0.177965712655-0.176140674905j)-((-0.0111541379691+0.00527975698766j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref=numpy.zeros((3, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.814129451274+0.0528885520992j)*x[0]**o + ((0.976229568838-0.462337754907j))*x[0] + ((0.105960671224+0.739152593638j))*x[1]**o + ((-0.550557671315+0.0353323102142j))*x[1]
            ref[(0, 0, 0)]=(-0.141248441263+0.182517850523j)-((-0.118028130008+0.132006857623j))*(o-1.)
            arg[(0, 0, 1)]=(-0.582275228588+0.37543587014j)*x[0]**o + ((0.625986750293+0.817213490774j))*x[0] + ((-0.207835691877-0.0796851644502j))*x[1]**o + ((-0.604870839541-0.497079287223j))*x[1]
            ref[(0, 0, 1)]=(-0.384497504857+0.30794245462j)-((-0.131685153411+0.0492917842816j))*(o-1.)
            arg[(0, 0, 2)]=(0.201144433578-0.487045495184j)*x[0]**o + ((0.384821598389-0.69336136553j))*x[0] + ((0.725128606972-0.548174476527j))*x[1]**o + ((0.655546077206-0.833895333788j))*x[1]
            ref[(0, 0, 2)]=(0.983320358073-1.28123833551j)-((0.154378840092-0.172536661952j))*(o-1.)
            arg[(0, 0, 3)]=(0.785092573045+0.674549576188j)*x[0]**o + ((0.128089109942-0.0994922914579j))*x[0] + ((-0.433150205044-0.260725711234j))*x[1]**o + ((-0.838434834864+0.141675970117j))*x[1]
            ref[(0, 0, 3)]=(-0.17920167846+0.228003771807j)-((0.0586570613335+0.0689706441591j))*(o-1.)
            arg[(0, 1, 0)]=(-0.00492990656417-0.982065938034j)*x[0]**o + ((-0.822336655088-0.0178234712945j))*x[0] + ((0.462564102276+0.0916600167886j))*x[1]**o + ((0.829216232828+0.72242177189j))*x[1]
            ref[(0, 1, 0)]=(0.232256886726-0.0929038103248j)-((0.076272365952-0.148400986874j))*(o-1.)
            arg[(0, 1, 1)]=(-0.298570015554+0.513998561119j)*x[0]**o + ((0.0326540114776-0.593016350405j))*x[0] + ((-0.281476379912-0.828369093821j))*x[1]**o + ((-0.588022881411-0.104920056964j))*x[1]
            ref[(0, 1, 1)]=(-0.5677076327-0.506153470036j)-((-0.0966743992443-0.0523950887837j))*(o-1.)
            arg[(0, 1, 2)]=(-0.14948724446-0.936232192024j)*x[0]**o + ((-0.915554845991-0.501096756751j))*x[0] + ((-0.172477431912+0.69670433329j))*x[1]**o + ((0.107655777026+0.673598285671j))*x[1]
            ref[(0, 1, 2)]=(-0.564931872669-0.0335131649065j)-((-0.0536607793954-0.039921309789j))*(o-1.)
            arg[(0, 1, 3)]=(0.298986435146-0.94233633462j)*x[0]**o + ((0.7452614405-0.217537208909j))*x[0] + ((-0.579846281636-0.790155842847j))*x[1]**o + ((0.0142277768417-0.0955700276615j))*x[1]
            ref[(0, 1, 3)]=(0.239314685426-1.02279970702j)-((-0.0468099744149-0.288748696245j))*(o-1.)
            arg[(0, 2, 0)]=(0.882617423113+0.311370837286j)*x[0]**o + ((-0.785233167361-0.475608400768j))*x[0] + ((-0.118200588618+0.964458242884j))*x[1]**o + ((0.445531320884+0.600559952024j))*x[1]
            ref[(0, 2, 0)]=(0.212357494009+0.700390315713j)-((0.127402805749+0.212638180028j))*(o-1.)
            arg[(0, 2, 1)]=(-0.434606432131+0.506709193268j)*x[0]**o + ((0.771197377577+0.576473477061j))*x[0] + ((0.114166172065+0.160630219049j))*x[1]**o + ((0.365835595745+0.499277007634j))*x[1]
            ref[(0, 2, 1)]=(0.408296356628+0.871544948506j)-((-0.053406710011+0.111223235386j))*(o-1.)
            arg[(0, 2, 2)]=(-0.50774036759-0.11112209413j)*x[0]**o + ((0.508835654444+0.186900701354j))*x[0] + ((-0.247110027182-0.0918524007457j))*x[1]**o + ((-0.701898863491+0.834294522017j))*x[1]
            ref[(0, 2, 2)]=(-0.47395680191+0.409110364247j)-((-0.125808399129-0.0338290824794j))*(o-1.)
            arg[(0, 2, 3)]=(-0.798302279286-0.831212954096j)*x[0]**o + ((0.549752993841+0.604729190806j))*x[0] + ((0.272114721078-0.773627236008j))*x[1]**o + ((-0.34980521684-0.639700854349j))*x[1]
            ref[(0, 2, 3)]=(-0.163119890603-0.819905926823j)-((-0.087697926368-0.267473365017j))*(o-1.)
            arg[(0, 3, 0)]=(0.613098207465+0.696130558406j)*x[0]**o + ((-0.0316622312391-0.86828661813j))*x[0] + ((0.131439013594-0.994432148221j))*x[1]**o + ((0.425677069347+0.645790955755j))*x[1]
            ref[(0, 3, 0)]=(0.569276029583-0.260398626095j)-((0.124089536843-0.0497169316359j))*(o-1.)
            arg[(0, 3, 1)]=(0.322925992786-0.505702805021j)*x[0]**o + ((-0.532102239357-0.335827838735j))*x[0] + ((-0.466849305371-0.928025927823j))*x[1]**o + ((-0.915708426453+0.276057381598j))*x[1]
            ref[(0, 3, 1)]=(-0.795866989198-0.746749594991j)-((-0.0239872187642-0.238954788807j))*(o-1.)
            arg[(0, 3, 2)]=(-0.372583156579-0.196942683116j)*x[0]**o + ((-0.301142360963-0.514411131907j))*x[0] + ((0.786315954514+0.241444213723j))*x[1]**o + ((-0.725514195104-0.821071341796j))*x[1]
            ref[(0, 3, 2)]=(-0.306461879066-0.645490471548j)-((0.0689554663224+0.00741692176796j))*(o-1.)
            arg[(0, 3, 3)]=(0.968307372624+0.944537208766j)*x[0]**o + ((-0.597490603064+0.707383607183j))*x[0] + ((-0.969674151182+0.784103440453j))*x[1]**o + ((-0.508822960786-0.189417764113j))*x[1]
            ref[(0, 3, 3)]=(-0.553840171204+1.12330324614j)-((-0.000227796426417+0.28810677487j))*(o-1.)
            arg[(1, 0, 0)]=(-0.173253690359+0.105005207479j)*x[0]**o + ((-0.454893228403-0.426365260183j))*x[0] + ((-0.632521190488+0.478106718577j))*x[1]**o + ((-0.674355540928+0.809543590638j))*x[1]
            ref[(1, 0, 0)]=(-0.967511825089+0.483145128256j)-((-0.134295813474+0.0971853210095j))*(o-1.)
            arg[(1, 0, 1)]=(-0.269453367135-0.0928584847736j)*x[0]**o + ((-0.663883280419+0.879019225764j))*x[0] + ((-0.996323668939+0.446252798808j))*x[1]**o + ((0.745160208529+0.235050417565j))*x[1]
            ref[(1, 0, 1)]=(-0.592250053981+0.733731978681j)-((-0.210962839346+0.0588990523391j))*(o-1.)
            arg[(1, 0, 2)]=(-0.441247485594+0.792344871883j)*x[0]**o + ((-0.106363229734+0.163253156484j))*x[0] + ((0.621849342776-0.324265369367j))*x[1]**o + ((-0.508259149454+0.865614243775j))*x[1]
            ref[(1, 0, 2)]=(-0.217010261003+0.748473451388j)-((0.0301003095302+0.0780132504194j))*(o-1.)
            arg[(1, 0, 3)]=(-0.991162330567-0.857513932825j)*x[0]**o + ((0.811109897594-0.8904305823j))*x[0] + ((-0.430018976242+0.999000208804j))*x[1]**o + ((0.422455795511+0.191395687214j))*x[1]
            ref[(1, 0, 3)]=(-0.093807806852-0.278774309554j)-((-0.236863551135+0.0235810459965j))*(o-1.)
            arg[(1, 1, 0)]=(0.597775436098-0.0150597007218j)*x[0]**o + ((0.496055936504+0.0894558828446j))*x[0] + ((0.0693948526017-0.439347186744j))*x[1]**o + ((-0.837099310758-0.238562687757j))*x[1]
            ref[(1, 1, 0)]=(0.163063457223-0.301756846189j)-((0.111195048117-0.0757344812443j))*(o-1.)
            arg[(1, 1, 1)]=(-0.3937388261+0.60487524737j)*x[0]**o + ((-0.35989845404-0.044631766103j))*x[0] + ((-0.887938803079-0.164023049696j))*x[1]**o + ((-0.704082729-0.979822303688j))*x[1]
            ref[(1, 1, 1)]=(-1.17282940611-0.291800936058j)-((-0.213612938196+0.0734753662791j))*(o-1.)
            arg[(1, 1, 2)]=(0.297206343986+0.0913465632946j)*x[0]**o + ((0.681067747704-0.911054259308j))*x[0] + ((-0.382703657212+0.6717742573j))*x[1]**o + ((0.686699315123-0.702062819549j))*x[1]
            ref[(1, 1, 2)]=(0.641134874801-0.424998129131j)-((-0.0142495522042+0.127186803432j))*(o-1.)
            arg[(1, 1, 3)]=(0.633177753819-0.27390382258j)*x[0]**o + ((-0.765796517958-0.406213420742j))*x[0] + ((-0.463890596726-0.707240447805j))*x[1]**o + ((0.62849107426+0.455710181407j))*x[1]
            ref[(1, 1, 3)]=(0.0159908566974-0.46582375486j)-((0.0282145261821-0.163524045064j))*(o-1.)
            arg[(1, 2, 0)]=(0.630254476991-0.352427441707j)*x[0]**o + ((0.695772969753-0.17076768343j))*x[0] + ((-0.897227368747-0.384675081243j))*x[1]**o + ((0.031504082784-0.419044797003j))*x[1]
            ref[(1, 2, 0)]=(0.230152080391-0.663457501692j)-((-0.0444954819592-0.122850420492j))*(o-1.)
            arg[(1, 2, 1)]=(0.157634067316-0.510276111639j)*x[0]**o + ((-0.675274107654+0.624938894279j))*x[0] + ((-0.869297786682+0.591061297926j))*x[1]**o + ((-0.139145273862-0.0133161516394j))*x[1]
            ref[(1, 2, 1)]=(-0.763041550441+0.346203964463j)-((-0.118610619894+0.0134641977145j))*(o-1.)
            arg[(1, 2, 2)]=(-0.445240456832+0.611263933774j)*x[0]**o + ((-0.454031885272-0.602117760589j))*x[0] + ((0.507284930023-0.930970224224j))*x[1]**o + ((0.0153319631387+0.393721194314j))*x[1]
            ref[(1, 2, 2)]=(-0.188327724471-0.264051428363j)-((0.0103407455318-0.0532843817417j))*(o-1.)
            arg[(1, 2, 3)]=(-0.405745647344-0.849310565197j)*x[0]**o + ((0.98036427648+0.721360142821j))*x[0] + ((0.460267237733-0.208155197358j))*x[1]**o + ((-0.168483785625+0.745049382822j))*x[1]
            ref[(1, 2, 3)]=(0.433201040622+0.204471881544j)-((0.00908693173147-0.176244293759j))*(o-1.)
            arg[(1, 3, 0)]=(0.0363198004738-0.26987613514j)*x[0]**o + ((-0.292679886672-0.875140111238j))*x[0] + ((0.116400058595+0.823476787252j))*x[1]**o + ((-0.982825048798-0.664212966442j))*x[1]
            ref[(1, 3, 0)]=(-0.5613925382-0.492876212784j)-((0.0254533098448+0.0922667753519j))*(o-1.)
            arg[(1, 3, 1)]=(0.599948819208-0.631780805357j)*x[0]**o + ((0.945886654962-0.156216028261j))*x[0] + ((-0.0446668024243-0.728967307966j))*x[1]**o + ((0.288214842703-0.844145817714j))*x[1]
            ref[(1, 3, 1)]=(0.894691757225-1.18055497965j)-((0.0925470027973-0.226791352221j))*(o-1.)
            arg[(1, 3, 2)]=(-0.9418738559+0.770781210194j)*x[0]**o + ((-0.108824175468+0.175430964595j))*x[0] + ((-0.216587689563+0.292450076567j))*x[1]**o + ((0.478959631233-0.454164590007j))*x[1]
            ref[(1, 3, 2)]=(-0.394163044849+0.392248830675j)-((-0.193076924244+0.17720521446j))*(o-1.)
            arg[(1, 3, 3)]=(0.0192963364751+0.765977614265j)*x[0]**o + ((-0.00441605182377-0.629116175291j))*x[0] + ((-0.96943401943-0.869513838619j))*x[1]**o + ((-0.909300690873-0.769094190656j))*x[1]
            ref[(1, 3, 3)]=(-0.931927212826-0.750873295151j)-((-0.158356280492-0.0172560373924j))*(o-1.)
            arg[(2, 0, 0)]=(-0.0252554702868+0.459973783693j)*x[0]**o + ((0.688900091182+0.175364071561j))*x[0] + ((0.564382079534+0.0846686431482j))*x[1]**o + ((0.660595997621+0.818128082802j))*x[1]
            ref[(2, 0, 0)]=(0.944311349025+0.769067290602j)-((0.0898544348745+0.0907737378068j))*(o-1.)
            arg[(2, 0, 1)]=(-0.696240182972-0.703934307642j)*x[0]**o + ((0.74416679673+0.770412990867j))*x[0] + ((0.685010999665+0.725140187175j))*x[1]**o + ((0.410544381162+0.58537350382j))*x[1]
            ref[(2, 0, 1)]=(0.571740997293+0.68849618711j)-((-0.00187153055112+0.00353431325555j))*(o-1.)
            arg[(2, 0, 2)]=(0.406732478414-0.0561428354683j)*x[0]**o + ((-0.381401122504-0.54235122479j))*x[0] + ((-0.577388719612-0.219027233918j))*x[1]**o + ((0.729356732007+0.755830299715j))*x[1]
            ref[(2, 0, 2)]=(0.088649684152-0.0308454972309j)-((-0.0284427068664-0.0458616782311j))*(o-1.)
            arg[(2, 0, 3)]=(0.266422248634+0.354785154767j)*x[0]**o + ((-0.943913904956+0.3320563399j))*x[0] + ((0.694437878832-0.716277457474j))*x[1]**o + ((0.361076267387-0.780090655713j))*x[1]
            ref[(2, 0, 3)]=(0.189011244948-0.40476330926j)-((0.160143354578-0.0602487171178j))*(o-1.)
            arg[(2, 1, 0)]=(0.535378648491+0.836484297513j)*x[0]**o + ((-0.713969440173+0.312689281286j))*x[0] + ((0.729974133154+0.19522278173j))*x[1]**o + ((-0.293926791392+0.85987505667j))*x[1]
            ref[(2, 1, 0)]=(0.12872827504+1.1021357086j)-((0.210892130274+0.171951179874j))*(o-1.)
            arg[(2, 1, 1)]=(-0.270240188875+0.423547049216j)*x[0]**o + ((-0.746636857905-0.266773860254j))*x[0] + ((-0.950101296456-0.395015977564j))*x[1]**o + ((0.72544072713+0.823972157278j))*x[1]
            ref[(2, 1, 1)]=(-0.620768808053+0.292864684338j)-((-0.203390247555+0.00475517860863j))*(o-1.)
            arg[(2, 1, 2)]=(0.0657744366258-0.921985396583j)*x[0]**o + ((-0.11023966589-0.556831496767j))*x[0] + ((-0.370340065204+0.0780783959464j))*x[1]**o + ((-0.839141703052+0.61675355964j))*x[1]
            ref[(2, 1, 2)]=(-0.62697349876-0.391992468881j)-((-0.0507609380963-0.140651166773j))*(o-1.)
            arg[(2, 1, 3)]=(0.481261636589+0.296777450047j)*x[0]**o + ((0.874819965476-0.196326078954j))*x[0] + ((0.128240513726+0.562935689788j))*x[1]**o + ((-0.190908332417+0.393516843733j))*x[1]
            ref[(2, 1, 3)]=(0.646706891687+0.528451952308j)-((0.101583691719+0.143285523306j))*(o-1.)
            arg[(2, 2, 0)]=(-0.283962775686-0.00691405086811j)*x[0]**o + ((-0.663953652369-0.799882933159j))*x[0] + ((-0.0314191149978-0.16248033553j))*x[1]**o + ((-0.378523590019-0.532276704247j))*x[1]
            ref[(2, 2, 0)]=(-0.678929566536-0.750777011902j)-((-0.0525636484473-0.028232397733j))*(o-1.)
            arg[(2, 2, 1)]=(0.132380972876-0.266170753128j)*x[0]**o + ((0.640875450555+0.804953629247j))*x[0] + ((-0.845513170979+0.580326301498j))*x[1]**o + ((-0.504610196751-0.5672157146j))*x[1]
            ref[(2, 2, 1)]=(-0.288433472149+0.275946731508j)-((-0.11885536635+0.0523592580616j))*(o-1.)
            arg[(2, 2, 2)]=(0.334820510195-0.860018196626j)*x[0]**o + ((0.697948184317-0.342843407178j))*x[0] + ((0.566039974421-0.796058242207j))*x[1]**o + ((-0.268034225721-0.92077556897j))*x[1]
            ref[(2, 2, 2)]=(0.665387221605-1.45984770749j)-((0.150143414103-0.276012739805j))*(o-1.)
            arg[(2, 2, 3)]=(0.999034410019-0.758589293616j)*x[0]**o + ((-0.132416257416+0.459017473946j))*x[0] + ((0.71829561889-0.126517120374j))*x[1]**o + ((0.601502254565+0.97380429604j))*x[1]
            ref[(2, 2, 3)]=(1.09320801303+0.273857677998j)-((0.286221671485-0.147517735665j))*(o-1.)
            arg[(2, 3, 0)]=(-0.793483795938+0.241143344044j)*x[0]**o + ((-0.597691131049+0.726450665875j))*x[0] + ((0.0399139311255+0.175610047291j))*x[1]**o + ((0.210541167185+0.25406726459j))*x[1]
            ref[(2, 3, 0)]=(-0.570359914338+0.6986356609j)-((-0.125594977469+0.0694588985558j))*(o-1.)
            arg[(2, 3, 1)]=(0.478043405438+0.50605915376j)*x[0]**o + ((-0.880472866355-0.344002737908j))*x[0] + ((0.939742863731-0.582548718832j))*x[1]**o + ((0.159821635578+0.938843443559j))*x[1]
            ref[(2, 3, 1)]=(0.348567519196+0.259175570289j)-((0.236297711528-0.0127482608454j))*(o-1.)
            arg[(2, 3, 2)]=(0.9962073387-0.380126074118j)*x[0]**o + ((0.701036269773+0.253351060985j))*x[0] + ((0.805723300478-0.221101756583j))*x[1]**o + ((0.329256121241+0.545589223906j))*x[1]
            ref[(2, 3, 2)]=(1.4161115151+0.0988562270947j)-((0.300321773196-0.10020463845j))*(o-1.)
            arg[(2, 3, 3)]=(-0.735522460251+0.208231823929j)*x[0]**o + ((0.831416800325+0.712366470407j))*x[0] + ((-0.495173596367+0.127825748656j))*x[1]**o + ((0.45696923823-0.0191080898211j))*x[1]
            ref[(2, 3, 3)]=(0.0288449909682+0.514657976586j)-((-0.205116009436+0.0560095954309j))*(o-1.)
        else:
            arg[(0, 0, 0)]=(-0.692687750135+0.460953796755j)*x[0]**o + ((-0.514241884401-0.146077174452j))*x[0] + ((-0.563577125223+0.426188369484j))*x[1]**o + ((0.317560040604+0.151057000601j))*x[1] + ((0.229221047699-0.762017035448j))*x[2]**o + ((-0.247744537801-0.0436654507781j))*x[2]
            ref[(0, 0, 0)]=(-0.735735104628+0.0432197530809j)-((-0.171173971276+0.020854188465j))*(o-1.)
            arg[(0, 0, 1)]=(-0.478753663869-0.712645322245j)*x[0]**o + ((0.92118230303-0.866323827716j))*x[0] + ((0.333872521533-0.0309365665551j))*x[1]**o + ((0.175110398343+0.981298778357j))*x[1] + ((0.805462662846-0.779615163297j))*x[2]**o + ((0.893042107608-0.612452674887j))*x[2]
            ref[(0, 0, 1)]=(1.32495816475-1.01033738817j)-((0.110096920085-0.253866175349j))*(o-1.)
            arg[(0, 0, 2)]=(0.178596095849+0.380339159898j)*x[0]**o + ((-0.263001069991+0.946836555158j))*x[0] + ((-0.57017151402-0.63009152884j))*x[1]**o + ((0.567545316579-0.278398973928j))*x[1] + ((-0.919684752575+0.0373446161755j))*x[2]**o + ((-0.253918044971-0.485466768588j))*x[2]
            ref[(0, 0, 2)]=(-0.630316984564-0.0147184700621j)-((-0.218543361791-0.0354012921277j))*(o-1.)
            arg[(0, 0, 3)]=(-0.576769081776-0.539929891971j)*x[0]**o + ((-0.742736770721-0.128705805441j))*x[0] + ((-0.857795577403-0.0953603106022j))*x[1]**o + ((0.832575563823-0.771339420683j))*x[1] + ((-0.0498575056791+0.931590567412j))*x[2]**o + ((-0.305499581835-0.0796616020009j))*x[2]
            ref[(0, 0, 3)]=(-0.850041476795-0.341703231643j)-((-0.247403694143+0.0493833941398j))*(o-1.)
            arg[(0, 1, 0)]=(0.808303667412+0.260843508585j)*x[0]**o + ((-0.418836011834-0.498470013903j))*x[0] + ((-0.123703761283-0.336347823079j))*x[1]**o + ((0.15182169645+0.419948341293j))*x[1] + ((-0.0413730120515+0.512087089029j))*x[2]**o + ((-0.964243331268-0.167387952073j))*x[2]
            ref[(0, 1, 0)]=(-0.294015376287+0.0953365749261j)-((0.107204482346+0.0727637957559j))*(o-1.)
            arg[(0, 1, 1)]=(-0.0762176086648+0.391946700127j)*x[0]**o + ((0.767439800331+0.947463377065j))*x[0] + ((0.21064684478+0.623794572153j))*x[1]**o + ((-0.438030889711+0.0114803985875j))*x[1] + ((0.142606535914+0.712656125083j))*x[2]**o + ((-0.194864565253+0.841440648713j))*x[2]
            ref[(0, 1, 1)]=(0.205790058698+1.76439091086j)-((0.0461726286714+0.288066232894j))*(o-1.)
            arg[(0, 1, 2)]=(-0.709108421739-0.532588986579j)*x[0]**o + ((-0.993527321296-0.89263191257j))*x[0] + ((-0.448625825862+0.333678268938j))*x[1]**o + ((0.937426536908-0.526633542605j))*x[1] + ((0.73658675746+0.726440305973j))*x[2]**o + ((0.712247354784-0.385145822623j))*x[2]
            ref[(0, 1, 2)]=(0.117499540128-0.638440844733j)-((-0.0701912483567+0.0879215980554j))*(o-1.)
            arg[(0, 1, 3)]=(-0.889121542486+0.75464568479j)*x[0]**o + ((0.41638835339-0.6714476728j))*x[0] + ((-0.626935454967+0.705604587358j))*x[1]**o + ((-0.267983609693+0.624417505329j))*x[1] + ((-0.215574742686+0.292534640008j))*x[2]**o + ((0.00515103844391+0.383071842344j))*x[2]
            ref[(0, 1, 3)]=(-0.789037978999+1.04441329351j)-((-0.288605290023+0.292130818693j))*(o-1.)
            arg[(0, 2, 0)]=(0.760915256992-0.820972025109j)*x[0]**o + ((-0.0486689735807-0.790336233947j))*x[0] + ((0.195310860535+0.486257925091j))*x[1]**o + ((0.358218313785+0.710103710725j))*x[1] + ((-0.75632687611+0.350529685396j))*x[2]**o + ((0.442745211661-0.157391834065j))*x[2]
            ref[(0, 2, 0)]=(0.476096896641-0.110904385954j)-((0.0333165402361+0.00263593089646j))*(o-1.)
            arg[(0, 2, 1)]=(-0.705832390943+0.815967769051j)*x[0]**o + ((-0.0961858871257+0.483385302936j))*x[0] + ((0.97310732026+0.457366456621j))*x[1]**o + ((0.432333885292-0.811585560291j))*x[1] + ((-0.915890837889+0.502670083828j))*x[2]**o + ((-0.758804186222+0.706553500859j))*x[2]
            ref[(0, 2, 1)]=(-0.535636048314+1.0771787765j)-((-0.108102651429+0.29600071825j))*(o-1.)
            arg[(0, 2, 2)]=(-0.338176470168-0.143794583087j)*x[0]**o + ((0.730936632373-0.27148946471j))*x[0] + ((0.261240874643+0.0549504508745j))*x[1]**o + ((-0.76335997282-0.957869083476j))*x[1] + ((0.90985008178-0.819118424457j))*x[2]**o + ((0.0745756395855+0.0577378829323j))*x[2]
            ref[(0, 2, 2)]=(0.437533392697-1.03979161096j)-((0.138819081042-0.151327092778j))*(o-1.)
            arg[(0, 2, 3)]=(0.44388453454+0.169239996428j)*x[0]**o + ((-0.123067260588+0.537714806031j))*x[0] + ((0.659839007667+0.369539587364j))*x[1]**o + ((0.0119720626453-0.222501651873j))*x[1] + ((0.107606504351+0.217629265031j))*x[2]**o + ((-0.444812137533-0.952558497611j))*x[2]
            ref[(0, 2, 3)]=(0.327711355541+0.0595317526843j)-((0.201888341093+0.12606814147j))*(o-1.)
            arg[(0, 3, 0)]=(0.371208085155+0.247433271971j)*x[0]**o + ((0.213811520799+0.342521743469j))*x[0] + ((0.0725377271184-0.504516091907j))*x[1]**o + ((-0.471017598857+0.700217758559j))*x[1] + ((-0.223839179952-0.355567450326j))*x[2]**o + ((-0.839793288257-0.381635527935j))*x[2]
            ref[(0, 3, 0)]=(-0.438546366997+0.0242268519154j)-((0.0366511053869-0.102108378377j))*(o-1.)
            arg[(0, 3, 1)]=(-0.666459154938-0.643219120601j)*x[0]**o + ((0.925621876117-0.621163918199j))*x[0] + ((-0.278354528882-0.58874114934j))*x[1]**o + ((0.417850253276-0.902757561707j))*x[1] + ((0.0870661352132+0.331483770484j))*x[2]**o + ((0.137389688162-0.0856920123134j))*x[2]
            ref[(0, 3, 1)]=(0.311557134474-1.25504499584j)-((-0.142957924768-0.150079416576j))*(o-1.)
            arg[(0, 3, 2)]=(-0.1912924936-0.489796682829j)*x[0]**o + ((0.531262317018+0.200286629959j))*x[0] + ((-0.383722891351+0.984272867922j))*x[1]**o + ((0.878713438649-0.745216424259j))*x[1] + ((0.811802194768-0.722269721974j))*x[2]**o + ((-0.131988479516+0.770714593078j))*x[2]
            ref[(0, 3, 2)]=(0.757387042983-0.00100436905102j)-((0.0394644683028-0.03796558948j))*(o-1.)
            arg[(0, 3, 3)]=(0.580685220124-0.890752875401j)*x[0]**o + ((-0.919591406599+0.628226350501j))*x[0] + ((-0.626391319686+0.106057893469j))*x[1]**o + ((0.406618241412-0.251981960831j))*x[1] + ((-0.645602335765+0.567948296243j))*x[2]**o + ((-0.397697438088+0.353589419658j))*x[2]
            ref[(0, 3, 3)]=(-0.800989519301+0.256543561819j)-((-0.115218072554-0.0361244476149j))*(o-1.)
            arg[(1, 0, 0)]=(-0.384510797773+0.809901728401j)*x[0]**o + ((-0.806521341126-0.699053492258j))*x[0] + ((0.932667685438+0.569326345469j))*x[1]**o + ((0.107810636319+0.315413531176j))*x[1] + ((-0.0722175623345-0.502182797623j))*x[2]**o + ((0.282609430969+0.850517424902j))*x[2]
            ref[(1, 0, 0)]=(0.0299190257462+0.671961370034j)-((0.0793232208884+0.146174212708j))*(o-1.)
            arg[(1, 0, 1)]=(0.788073370575+0.755009119343j)*x[0]**o + ((0.0959104129966-0.855296000262j))*x[0] + ((0.56489842194-0.739994805747j))*x[1]**o + ((0.0824707931251-0.346744835596j))*x[1] + ((-0.0383658612559+0.973473011219j))*x[2]**o + ((-0.478320767853-0.424991175594j))*x[2]
            ref[(1, 0, 1)]=(0.507333184764-0.319272343319j)-((0.219100988543+0.164747887469j))*(o-1.)
            arg[(1, 0, 2)]=(-0.195954877921+0.541886100402j)*x[0]**o + ((-0.658435042648-0.468243823414j))*x[0] + ((-0.585675054266-0.384230221149j))*x[1]**o + ((-0.664173150496-0.253975791039j))*x[1] + ((0.915734398343+0.95396155542j))*x[2]**o + ((-0.310430931502-0.13293152313j))*x[2]
            ref[(1, 0, 2)]=(-0.749467329245+0.128233148545j)-((0.0223507443593+0.185269572446j))*(o-1.)
            arg[(1, 0, 3)]=(-0.973378389781+0.354965514097j)*x[0]**o + ((-0.223575907568-0.187256662722j))*x[0] + ((0.801323996414-0.995974204252j))*x[1]**o + ((-0.169741327275-0.517605989288j))*x[1] + ((-0.158598977443-0.684381424015j))*x[2]**o + ((0.929504929524-0.196346444981j))*x[2]
            ref[(1, 0, 3)]=(0.102767161936-1.11329960558j)-((-0.0551088951349-0.220898352362j))*(o-1.)
            arg[(1, 1, 0)]=(-0.111822232569+0.623337527394j)*x[0]**o + ((0.648284908676+0.949054178299j))*x[0] + ((-0.748435979616-0.390230022161j))*x[1]**o + ((0.795915547756+0.993718634677j))*x[1] + ((-0.170776032443+0.855969079123j))*x[2]**o + ((0.794070273605+0.743144106167j))*x[2]
            ref[(1, 1, 0)]=(0.603618242704+1.88749675175j)-((-0.171839040771+0.181512764059j))*(o-1.)
            arg[(1, 1, 1)]=(0.663599057533-0.49732176328j)*x[0]**o + ((-0.460506096958+0.499013379337j))*x[0] + ((-0.63772856719+0.292395242068j))*x[1]**o + ((0.168599406149-0.115238744311j))*x[1] + ((-0.00938044422187+0.991160441369j))*x[2]**o + ((-0.0350490419611+0.201444696646j))*x[2]
            ref[(1, 1, 1)]=(-0.155232843324+0.685726625914j)-((0.00274834102027+0.131038986693j))*(o-1.)
            arg[(1, 1, 2)]=(-0.91294199044-0.448789223764j)*x[0]**o + ((-0.22068116528-0.073725225445j))*x[0] + ((-0.225575513192-0.0205405516981j))*x[1]**o + ((0.339089860453+0.0546174871955j))*x[1] + ((0.253553969839-0.476674321257j))*x[2]**o + ((-0.0025232238377-0.866743235754j))*x[2]
            ref[(1, 1, 2)]=(-0.384539031229-0.915927535361j)-((-0.147493922299-0.157667349453j))*(o-1.)
            arg[(1, 1, 3)]=(-0.627202087464+0.658556617835j)*x[0]**o + ((-0.773309073251-0.659311603256j))*x[0] + ((0.0756378602581+0.453956511684j))*x[1]**o + ((-0.661929763411+0.0186249418307j))*x[1] + ((0.364824613171-0.819007804417j))*x[2]**o + ((0.157014632879-0.608225474194j))*x[2]
            ref[(1, 1, 3)]=(-0.732481908909-0.477703405259j)-((-0.0311232690058+0.0489175541835j))*(o-1.)
            arg[(1, 2, 0)]=(0.831914784021+0.209205034642j)*x[0]**o + ((-0.0727675848744+0.0161662954388j))*x[0] + ((-0.582907060509-0.802979746984j))*x[1]**o + ((-0.0727350717606-0.665999868031j))*x[1] + ((0.981145628391-0.862294986324j))*x[2]**o + ((0.362638883693-0.0538293115396j))*x[2]
            ref[(1, 2, 0)]=(0.723644789481-1.0798662914j)-((0.205025558651-0.242678283111j))*(o-1.)
            arg[(1, 2, 1)]=(-0.129940782926-0.0843640746983j)*x[0]**o + ((0.850656320177+0.93086994168j))*x[0] + ((0.355836541255-0.538757852201j))*x[1]**o + ((-0.282316724571+0.627412604889j))*x[1] + ((0.79463795289-0.578014574588j))*x[2]**o + ((-0.0691574294468-0.100213107469j))*x[2]
            ref[(1, 2, 1)]=(0.759857938689+0.128466468807j)-((0.17008895187-0.200189416914j))*(o-1.)
            arg[(1, 2, 2)]=(-0.156037483845-0.769432891542j)*x[0]**o + ((0.619525385564+0.556163216653j))*x[0] + ((-0.433639064839+0.115689367294j))*x[1]**o + ((0.0914743025432+0.197431166034j))*x[1] + ((0.918354551539-0.890972248306j))*x[2]**o + ((0.777721783446-0.867479981363j))*x[2]
            ref[(1, 2, 2)]=(0.908699737204-0.829300685615j)-((0.0547796671424-0.257452628759j))*(o-1.)
            arg[(1, 2, 3)]=(0.730518050262+0.913399405612j)*x[0]**o + ((-0.325546179792-0.335768098865j))*x[0] + ((-0.0631063642904+0.16449826523j))*x[1]**o + ((0.296785301566+0.427618221946j))*x[1] + ((-0.614250453849-0.0555299490188j))*x[2]**o + ((0.284034155478+0.0643070350527j))*x[2]
            ref[(1, 2, 3)]=(0.154217254687+0.589262439978j)-((0.00886020535381+0.170394620304j))*(o-1.)
            arg[(1, 3, 0)]=(0.597414848543-0.302041817456j)*x[0]**o + ((0.871899048917+0.678325892565j))*x[0] + ((0.281821261648+0.723582578368j))*x[1]**o + ((-0.501413789805-0.942018845407j))*x[1] + ((-0.329983088342+0.856894727573j))*x[2]**o + ((-0.401373609882+0.568627010036j))*x[2]
            ref[(1, 3, 0)]=(0.25918233554+0.79168477284j)-((0.0915421703082+0.213072581414j))*(o-1.)
            arg[(1, 3, 1)]=(0.423908012158+0.300706470356j)*x[0]**o + ((0.186119348348+0.460344256394j))*x[0] + ((0.252891005317-0.387550980483j))*x[1]**o + ((0.0854065572732-0.171978029404j))*x[1] + ((-0.65265388942+0.833890203673j))*x[2]**o + ((0.0167584453035+0.800514139053j))*x[2]
            ref[(1, 3, 1)]=(0.15621473949+0.917963029794j)-((0.00402418800913+0.124507615591j))*(o-1.)
            arg[(1, 3, 2)]=(0.0272544892789-0.765921101941j)*x[0]**o + ((0.561146241557+0.925566098772j))*x[0] + ((0.0293770467907-0.76232858857j))*x[1]**o + ((0.155036259694+0.637060169342j))*x[1] + ((-0.869131678689-0.585199146443j))*x[2]**o + ((-0.534668498075+0.614152406697j))*x[2]
            ref[(1, 3, 2)]=(-0.315493069722+0.0316649189287j)-((-0.135416690437-0.352241472826j))*(o-1.)
            arg[(1, 3, 3)]=(-0.663253925778-0.568454154166j)*x[0]**o + ((-0.790964110416+0.748482146907j))*x[0] + ((-0.938359288881+0.743864556219j))*x[1]**o + ((0.731014090855-0.694481174798j))*x[1] + ((-0.402528017639+0.0109282048518j))*x[2]**o + ((0.828334954221-0.620873456891j))*x[2]
            ref[(1, 3, 3)]=(-0.617878148819-0.190266938939j)-((-0.334023538716+0.0310564344841j))*(o-1.)
            arg[(2, 0, 0)]=(0.583885027564-0.820188691055j)*x[0]**o + ((-0.385285675156+0.0806272558063j))*x[0] + ((0.256264727565+0.4346351214j))*x[1]**o + ((-0.234720487722+0.550500776051j))*x[1] + ((0.151234816713-0.0200087603542j))*x[2]**o + ((0.797153502525+0.704086729124j))*x[2]
            ref[(2, 0, 0)]=(0.584265955745+0.464826215487j)-((0.165230761974-0.0675937216681j))*(o-1.)
            arg[(2, 0, 1)]=(-0.599837659538-0.0735396540122j)*x[0]**o + ((0.37854279202-0.332302817567j))*x[0] + ((-0.40129212963-0.337608468464j))*x[1]**o + ((0.514611135485-0.359338454093j))*x[1] + ((-0.758883520663-0.414271523458j))*x[2]**o + ((0.0870253653565+0.746661400224j))*x[2]
            ref[(2, 0, 1)]=(-0.389917008484-0.385199758685j)-((-0.293335551638-0.137569940989j))*(o-1.)
            arg[(2, 0, 2)]=(-0.198855905389-0.716843486679j)*x[0]**o + ((0.811486421876-0.612201632599j))*x[0] + ((0.672411828713-0.799320415758j))*x[1]**o + ((0.0982184047273+0.86652839042j))*x[1] + ((0.0500802124368+0.254111358966j))*x[2]**o + ((-0.647288836042+0.714173329266j))*x[2]
            ref[(2, 0, 2)]=(0.393026063161-0.146776228192j)-((0.0872726892935-0.210342090578j))*(o-1.)
            arg[(2, 0, 3)]=(0.292440219838-0.0684734060042j)*x[0]**o + ((-0.722912440095-0.839710098565j))*x[0] + ((0.28447028359+0.873381082881j))*x[1]**o + ((0.482936867606+0.483395965158j))*x[1] + ((0.227798485316+0.669168137221j))*x[2]**o + ((-0.883534991078+0.690636522457j))*x[2]
            ref[(2, 0, 3)]=(-0.159400787412+0.904199101574j)-((0.134118164791+0.24567930235j))*(o-1.)
            arg[(2, 1, 0)]=(0.869911305533+0.177330664517j)*x[0]**o + ((-0.434129373062+0.714217504321j))*x[0] + ((0.284494942011-0.640165139685j))*x[1]**o + ((0.43888402361+0.339672557557j))*x[1] + ((-0.809298589484+0.582160517235j))*x[2]**o + ((0.691159860927+0.0169878339575j))*x[2]
            ref[(2, 1, 0)]=(0.520511084767+0.595101968951j)-((0.0575179430099+0.0198876736779j))*(o-1.)
            arg[(2, 1, 1)]=(-0.971752678371-0.940697759121j)*x[0]**o + ((0.718514180046+0.225516473286j))*x[0] + ((-0.129976342426+0.390761070292j))*x[1]**o + ((-0.675511331614-0.323727727282j))*x[1] + ((0.868959860585-0.506748211372j))*x[2]**o + ((0.882626130034+0.255906906507j))*x[2]
            ref[(2, 1, 1)]=(0.346429909127-0.449494623845j)-((-0.0387948600353-0.176114150034j))*(o-1.)
            arg[(2, 1, 2)]=(-0.109615339982-0.409770175334j)*x[0]**o + ((-0.794593047773-0.93592411535j))*x[0] + ((0.706499550993+0.104181427893j))*x[1]**o + ((0.195999295269-0.232993550268j))*x[1] + ((0.976720411102-0.1873555769j))*x[2]**o + ((0.389594692108+0.173117011354j))*x[2]
            ref[(2, 1, 2)]=(0.682302780859-0.744372489303j)-((0.262267437019-0.0821573873902j))*(o-1.)
            arg[(2, 1, 3)]=(0.83959662297+0.365303966529j)*x[0]**o + ((0.555260587028+0.615343755403j))*x[0] + ((-0.823776200301+0.685407274752j))*x[1]**o + ((0.299757731942+0.18204446893j))*x[1] + ((-0.656841814738+0.0911111843532j))*x[2]**o + ((-0.160251589324+0.557232664918j))*x[2]
            ref[(2, 1, 3)]=(0.0268726687891+1.24822165744j)-((-0.106836898678+0.190303737606j))*(o-1.)
            arg[(2, 2, 0)]=(-0.787546932129+0.994370623366j)*x[0]**o + ((0.743119945757-0.904071929451j))*x[0] + ((0.0379322043168+0.495622039974j))*x[1]**o + ((0.156847005926-0.0686778717603j))*x[1] + ((-0.974767499849+0.0403570978278j))*x[2]**o + ((-0.372061754925-0.889486253489j))*x[2]
            ref[(2, 2, 0)]=(-0.598238515451-0.165943146766j)-((-0.287397037943+0.255058293528j))*(o-1.)
            arg[(2, 2, 1)]=(-0.0903951172017-0.428818018911j)*x[0]**o + ((-0.62973352383+0.406019381051j))*x[0] + ((0.543541707202-0.496456215177j))*x[1]**o + ((-0.921818051567-0.793855616431j))*x[1] + ((0.927366693607-0.944694258123j))*x[2]**o + ((0.532064175729+0.649102970844j))*x[2]
            ref[(2, 2, 1)]=(0.18051294197-0.804350878373j)-((0.230085547268-0.311661415368j))*(o-1.)
            arg[(2, 2, 2)]=(0.711314967525-0.825681977257j)*x[0]**o + ((-0.888370902073+0.275018446196j))*x[0] + ((0.335599532437+0.171279546819j))*x[1]**o + ((0.200916771834-0.643088414722j))*x[1] + ((-0.662632476693-0.170688596004j))*x[2]**o + ((-0.220087038131+0.772214895345j))*x[2]
            ref[(2, 2, 2)]=(-0.26162957255-0.210473049811j)-((0.0640470038783-0.137515171074j))*(o-1.)
            arg[(2, 2, 3)]=(-0.539208059612+0.846353848924j)*x[0]**o + ((-0.845229804447+0.587124781505j))*x[0] + ((-0.197315435145+0.504655320572j))*x[1]**o + ((0.594455053475-0.223516373765j))*x[1] + ((-0.853903354989+0.487992368506j))*x[2]**o + ((0.58752621876+0.226370802803j))*x[2]
            ref[(2, 2, 3)]=(-0.626837690979+1.21449037427j)-((-0.265071141624+0.306500256334j))*(o-1.)
            arg[(2, 3, 0)]=(-0.952852096061+0.174297570862j)*x[0]**o + ((0.955228378845-0.796573770254j))*x[0] + ((0.926661536609-0.145981249932j))*x[1]**o + ((0.303483263947+0.568423465752j))*x[1] + ((-0.138488887338-0.815892389054j))*x[2]**o + ((-0.484132610776+0.366410846605j))*x[2]
            ref[(2, 3, 0)]=(0.304949792613-0.324657763011j)-((-0.0274465744651-0.131262678021j))*(o-1.)
            arg[(2, 3, 1)]=(0.935243547875-0.36077380347j)*x[0]**o + ((0.0702109288902-0.544071581951j))*x[0] + ((0.366611717641-0.931528461524j))*x[1]**o + ((-0.269915526212-0.734264016631j))*x[1] + ((0.213680386382-0.669956591391j))*x[2]**o + ((-0.649136153299+0.375989332883j))*x[2]
            ref[(2, 3, 1)]=(0.333347450639-1.43230256104j)-((0.252589275316-0.327043142731j))*(o-1.)
            arg[(2, 3, 2)]=(0.791578008548-0.350172953874j)*x[0]**o + ((0.0785396290458+0.40919849284j))*x[0] + ((0.115749305475+0.213517371067j))*x[1]**o + ((0.00203302907959+0.971408227734j))*x[1] + ((0.623630485925-0.796989780294j))*x[2]**o + ((-0.204038937851+0.366546726019j))*x[2]
            ref[(2, 3, 2)]=(0.703745760111+0.406754041745j)-((0.255159633325-0.155607560517j))*(o-1.)
            arg[(2, 3, 3)]=(0.222859816609-0.969363015766j)*x[0]**o + ((-0.764708835839+0.578365031404j))*x[0] + ((0.487155250171-0.421159370262j))*x[1]**o + ((0.936315924039+0.3335231745j))*x[1] + ((-0.549521851895+0.662974693943j))*x[2]**o + ((0.854279583405+0.137438118585j))*x[2]
            ref[(2, 3, 3)]=(0.593189943245+0.160889316202j)-((0.0267488691476-0.121257948681j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3, 3),w)
        ref=numpy.zeros((3, 4, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.268539356423-0.278903038502j)*x[0]**o + ((-0.419256495498+0.143073550691j))*x[0] + ((-0.504984826243+0.5686747403j))*x[1]**o + ((-0.487950041037-0.197383551806j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.8403653596+0.117730850341j)-((-0.128920697111+0.048295283633j))*(o-1.)
            arg[(0, 0, 0, 1)]=(-0.677634740824+0.851866160908j)*x[0]**o + ((-0.0827672014775-0.368048565535j))*x[0] + ((-0.443490848936+0.449211734604j))*x[1]**o + ((-0.919156692002+0.354156604382j))*x[1]
            ref[(0, 0, 0, 1)]=(-1.06152474162+0.64359296718j)-((-0.18685426496+0.216846315919j))*(o-1.)
            arg[(0, 0, 0, 2)]=(-0.962395634348+0.237765492524j)*x[0]**o + ((0.455361885866+0.590902272908j))*x[0] + ((0.399313328916+0.945800228198j))*x[1]**o + ((0.420491453264+0.23184879471j))*x[1]
            ref[(0, 0, 0, 2)]=(0.156385516849+1.00315839417j)-((-0.0938470509053+0.197260953454j))*(o-1.)
            arg[(0, 0, 1, 0)]=(0.714170379135-0.326760500433j)*x[0]**o + ((0.533380544087-0.689702432637j))*x[0] + ((0.610031378307-0.235771819123j))*x[1]**o + ((0.858672513248+0.182480132147j))*x[1]
            ref[(0, 0, 1, 0)]=(1.35812740739-0.534877310023j)-((0.220700292907-0.0937553865927j))*(o-1.)
            arg[(0, 0, 1, 1)]=(-0.0122459242717+0.512924449376j)*x[0]**o + ((0.236117230351-0.672411935268j))*x[0] + ((-0.230075605407-0.423895432924j))*x[1]**o + ((0.781065059156-0.0258983471199j))*x[1]
            ref[(0, 0, 1, 1)]=(0.387430379914-0.304640632968j)-((-0.0403869216132+0.0148381694086j))*(o-1.)
            arg[(0, 0, 1, 2)]=(-0.768703225608+0.189891421322j)*x[0]**o + ((0.903310318152-0.130024123807j))*x[0] + ((0.0651882423549+0.797174362767j))*x[1]**o + ((-0.6592304326-0.897582284016j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.229717548851-0.0202703118672j)-((-0.117252497209+0.164510964015j))*(o-1.)
            arg[(0, 0, 2, 0)]=(-0.515467089452-0.719364252755j)*x[0]**o + ((-0.272474501032+0.796036205543j))*x[0] + ((0.727211163495-0.162178955763j))*x[1]**o + ((0.973140645248-0.196200419825j))*x[1]
            ref[(0, 0, 2, 0)]=(0.456205109129-0.1408537114j)-((0.0352906790072-0.146923868086j))*(o-1.)
            arg[(0, 0, 2, 1)]=(0.0518149063357+0.797967671558j)*x[0]**o + ((0.940942632007-0.48714033471j))*x[0] + ((0.983115959236+0.231307903771j))*x[1]**o + ((0.70484000011-0.346720665664j))*x[1]
            ref[(0, 0, 2, 1)]=(1.34035674884+0.097707287478j)-((0.172488477595+0.171545929222j))*(o-1.)
            arg[(0, 0, 2, 2)]=(0.712839086141-0.58275611612j)*x[0]**o + ((0.932903040459+0.114818925379j))*x[0] + ((-0.997612144393-0.188539175219j))*x[1]**o + ((0.41851438258-0.89534521524j))*x[1]
            ref[(0, 0, 2, 2)]=(0.533322182393-0.7759107906j)-((-0.0474621763754-0.128549215223j))*(o-1.)
            arg[(0, 1, 0, 0)]=(-0.310912785452-0.635151088221j)*x[0]**o + ((0.906498782553-0.765364185406j))*x[0] + ((-0.55380129961-0.117328550722j))*x[1]**o + ((0.380401875651+0.986549931218j))*x[1]
            ref[(0, 1, 0, 0)]=(0.211093286571-0.265646946566j)-((-0.144119014177-0.125413273157j))*(o-1.)
            arg[(0, 1, 0, 1)]=(-0.252124912323-0.975328734671j)*x[0]**o + ((-0.849533394448+0.579643162117j))*x[0] + ((0.28723040706+0.0728063273662j))*x[1]**o + ((0.941363477018-0.767588329078j))*x[1]
            ref[(0, 1, 0, 1)]=(0.0634677886538-0.545233787133j)-((0.00585091578959-0.150420401218j))*(o-1.)
            arg[(0, 1, 0, 2)]=(0.403455615169+0.911437029262j)*x[0]**o + ((0.0311238972852-0.756207087732j))*x[0] + ((-0.00914891595551-0.389089751578j))*x[1]**o + ((0.624012365331+0.61644331373j))*x[1]
            ref[(0, 1, 0, 2)]=(0.524721480915+0.191291751841j)-((0.0657177832022+0.0870578796139j))*(o-1.)
            arg[(0, 1, 1, 0)]=(0.534478775658-0.625666965919j)*x[0]**o + ((-0.730982066909-0.838143366509j))*x[0] + ((0.298620697807-0.160029270807j))*x[1]**o + ((0.995279586532-0.483987279656j))*x[1]
            ref[(0, 1, 1, 0)]=(0.548698496544-1.05391344145j)-((0.138849912244-0.130949372788j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.543381470603-0.869031056522j)*x[0]**o + ((0.183253230911-0.353564483562j))*x[0] + ((0.320883729719-0.163344353422j))*x[1]**o + ((0.513860990781+0.327173572226j))*x[1]
            ref[(0, 1, 1, 1)]=(0.237308240404-0.52938316064j)-((-0.0370829568139-0.172062568324j))*(o-1.)
            arg[(0, 1, 1, 2)]=(-0.521302660745+0.297907869793j)*x[0]**o + ((-0.388190496221-0.832115753277j))*x[0] + ((-0.16144743278+0.138544775951j))*x[1]**o + ((0.55822762969-0.883833165068j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.256356480028-0.6397481363j)-((-0.113791682254+0.0727421076241j))*(o-1.)
            arg[(0, 1, 2, 0)]=(0.845596413921+0.862223836863j)*x[0]**o + ((-0.195799150846+0.919684935604j))*x[0] + ((0.381366822204+0.969320487582j))*x[1]**o + ((-0.772418763193-0.205584331163j))*x[1]
            ref[(0, 1, 2, 0)]=(0.129372661043+1.27282246444j)-((0.204493872688+0.305257387407j))*(o-1.)
            arg[(0, 1, 2, 1)]=(-0.480265592829+0.731746295433j)*x[0]**o + ((-0.0590574921824+0.994913016847j))*x[0] + ((0.119739021883+0.969089549942j))*x[1]**o + ((-0.823610907769-0.957870139895j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.621597485449+0.868939361164j)-((-0.0600877618244+0.283472640896j))*(o-1.)
            arg[(0, 1, 2, 2)]=(0.197688172035+0.832825488431j)*x[0]**o + ((0.209598604073+0.395186318037j))*x[0] + ((0.168274988733+0.519752764707j))*x[1]**o + ((0.153958449347-0.150356868651j))*x[1]
            ref[(0, 1, 2, 2)]=(0.364760107094+0.798703851262j)-((0.060993860128+0.225429708856j))*(o-1.)
            arg[(0, 2, 0, 0)]=(-0.409227491302+0.53646730613j)*x[0]**o + ((-0.157958353155+0.763597549535j))*x[0] + ((0.0307303940008+0.658380290918j))*x[1]**o + ((-0.935620566981+0.254275832164j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.736038008719+1.10636048937j)-((-0.0630828495503+0.199141266175j))*(o-1.)
            arg[(0, 2, 0, 1)]=(-0.829020839063+0.682882449013j)*x[0]**o + ((0.629362359154+0.0271325399891j))*x[0] + ((-0.830101375482+0.187555249973j))*x[1]**o + ((0.127680666775+0.412635233276j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.451039594308+0.655102736125j)-((-0.276520369091+0.145072949831j))*(o-1.)
            arg[(0, 2, 0, 2)]=(-0.383607090087+0.695416601454j)*x[0]**o + ((-0.315757052843-0.732006117868j))*x[0] + ((-0.851701205107-0.8169617456j))*x[1]**o + ((0.582041542503-0.841549361879j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.484511902767-0.847550311947j)-((-0.205884715866-0.0202575240244j))*(o-1.)
            arg[(0, 2, 1, 0)]=(-0.38063583964+0.544273805275j)*x[0]**o + ((0.596674451084+0.941993887224j))*x[0] + ((0.368068397037+0.0839601821543j))*x[1]**o + ((0.810999013883+0.474932391896j))*x[1]
            ref[(0, 2, 1, 0)]=(0.697553011182+1.02258013327j)-((-0.00209457376711+0.104705664572j))*(o-1.)
            arg[(0, 2, 1, 1)]=(-0.987832807733+0.070003973745j)*x[0]**o + ((0.4406525623+0.255698913842j))*x[0] + ((0.708199381646-0.0318178752379j))*x[1]**o + ((0.0315028114623-0.593973260835j))*x[1]
            ref[(0, 2, 1, 1)]=(0.0962609738378-0.150044124242j)-((-0.0466055710145+0.0063643497512j))*(o-1.)
            arg[(0, 2, 1, 2)]=(-0.583066657563-0.947946205119j)*x[0]**o + ((0.254673977108-0.374676390536j))*x[0] + ((-0.310116913305-0.797207863204j))*x[1]**o + ((0.238634037364+0.198299055261j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.199937778198-0.960765701799j)-((-0.148863928478-0.290859011387j))*(o-1.)
            arg[(0, 2, 2, 0)]=(-0.424852017342-0.948171135063j)*x[0]**o + ((0.610929380642-0.425544173854j))*x[0] + ((0.65256799734-0.14417334601j))*x[1]**o + ((0.954974433648+0.964443222297j))*x[1]
            ref[(0, 2, 2, 0)]=(0.896809897144-0.276722716316j)-((0.0379526633331-0.182057413512j))*(o-1.)
            arg[(0, 2, 2, 1)]=(0.0115894720233-0.243101859088j)*x[0]**o + ((-0.102787561221+0.955952356773j))*x[0] + ((-0.723847456703+0.61347994434j))*x[1]**o + ((-0.859269829157-0.903396260329j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.83715768753+0.211467090848j)-((-0.118709664113+0.0617296808754j))*(o-1.)
            arg[(0, 2, 2, 2)]=(-0.695735773471-0.546921705563j)*x[0]**o + ((0.0640444385429+0.267830289261j))*x[0] + ((0.731326525917-0.585737436937j))*x[1]**o + ((0.0656351010734-0.0235473189306j))*x[1]
            ref[(0, 2, 2, 2)]=(0.0826351460313-0.444188086085j)-((0.00593179207438-0.18877652375j))*(o-1.)
            arg[(0, 3, 0, 0)]=(0.704336544479+0.702792698582j)*x[0]**o + ((0.732453456414-0.706679544303j))*x[0] + ((0.118153956866-0.397056974627j))*x[1]**o + ((-0.849189747128+0.0195096739884j))*x[1]
            ref[(0, 3, 0, 0)]=(0.352877105316-0.19071707318j)-((0.137081750224+0.0509559539925j))*(o-1.)
            arg[(0, 3, 0, 1)]=(-0.252590709523-0.914714222301j)*x[0]**o + ((0.719190246493+0.31064324548j))*x[0] + ((0.0604285516198-0.0602693052502j))*x[1]**o + ((0.836165797549+0.878446279998j))*x[1]
            ref[(0, 3, 0, 1)]=(0.681596943069+0.107052998964j)-((-0.0320270263172-0.162497254592j))*(o-1.)
            arg[(0, 3, 0, 2)]=(0.998379194913-0.24756264549j)*x[0]**o + ((-0.959543819797-0.9700240795j))*x[0] + ((-0.674098859478-0.318274418485j))*x[1]**o + ((-0.617200522613-0.190967835794j))*x[1]
            ref[(0, 3, 0, 2)]=(-0.626232003488-0.863414489635j)-((0.0540467225725-0.0943061773292j))*(o-1.)
            arg[(0, 3, 1, 0)]=(-0.18803867135-0.991907320513j)*x[0]**o + ((0.822696278014-0.776523729403j))*x[0] + ((-0.584628776414+0.627950888323j))*x[1]**o + ((0.245705512918+0.0470688247722j))*x[1]
            ref[(0, 3, 1, 0)]=(0.147867171584-0.54670566841j)-((-0.128777907961-0.060659405365j))*(o-1.)
            arg[(0, 3, 1, 1)]=(-0.605964555741+0.936419594485j)*x[0]**o + ((-0.295595444072+0.209266785051j))*x[0] + ((-0.753599817457+0.873551594711j))*x[1]**o + ((0.654139436172-0.402233566579j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.500510190549+0.808502203834j)-((-0.2265940622+0.301661864866j))*(o-1.)
            arg[(0, 3, 1, 2)]=(0.951697387573+0.756802549978j)*x[0]**o + ((0.208343323102+0.95194894549j))*x[0] + ((0.00697161084532-0.199297538492j))*x[1]**o + ((-0.457044169238-0.179326622491j))*x[1]
            ref[(0, 3, 1, 2)]=(0.354984076141+0.665063667242j)-((0.159778166403+0.0929175019143j))*(o-1.)
            arg[(0, 3, 2, 0)]=(-0.480250934225+0.555128694925j)*x[0]**o + ((-0.794803494462-0.0811146236731j))*x[0] + ((-0.841455999237+0.618377788803j))*x[1]**o + ((-0.610762830633-0.327892066326j))*x[1]
            ref[(0, 3, 2, 0)]=(-1.36363662928+0.382249896865j)-((-0.22028448891+0.195584413955j))*(o-1.)
            arg[(0, 3, 2, 1)]=(-0.155974627378+0.319688008944j)*x[0]**o + ((0.400178019512-0.626431340283j))*x[0] + ((0.373927975288+0.961349877067j))*x[1]**o + ((-0.425516511802+0.0981075351463j))*x[1]
            ref[(0, 3, 2, 1)]=(0.0963074278097+0.376357040437j)-((0.036325557985+0.213506314335j))*(o-1.)
            arg[(0, 3, 2, 2)]=(-0.257531372835-0.984110284571j)*x[0]**o + ((0.0890819159046-0.838050467902j))*x[0] + ((0.50197339399-0.313176420148j))*x[1]**o + ((0.580230521931+0.593098630219j))*x[1]
            ref[(0, 3, 2, 2)]=(0.456877229495-0.771119271201j)-((0.0407403368591-0.216214450787j))*(o-1.)
            arg[(1, 0, 0, 0)]=(-0.327996589607+0.473062655817j)*x[0]**o + ((0.184795203483+0.54676988264j))*x[0] + ((0.93754143437-0.416946903j))*x[1]**o + ((-0.41027731618-0.124754192391j))*x[1]
            ref[(1, 0, 0, 0)]=(0.192031366033+0.239065721533j)-((0.101590807461+0.00935262546949j))*(o-1.)
            arg[(1, 0, 0, 1)]=(0.467109312638+0.0523363709201j)*x[0]**o + ((0.436593311229-0.25656334897j))*x[0] + ((-0.876493232574-0.445109153323j))*x[1]**o + ((0.0355870286832+0.803666100573j))*x[1]
            ref[(1, 0, 0, 1)]=(0.0313982099883+0.0771649845997j)-((-0.0682306533227-0.0654621304005j))*(o-1.)
            arg[(1, 0, 0, 2)]=(-0.854325421069+0.89295077122j)*x[0]**o + ((-0.475660106361+0.0286264589126j))*x[0] + ((-0.590570894519-0.580183912555j))*x[1]**o + ((0.991445588504+0.707495647461j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.464555416722+0.524444482519j)-((-0.240816052598+0.0521278097775j))*(o-1.)
            arg[(1, 0, 1, 0)]=(0.142395053776-0.161796644758j)*x[0]**o + ((-0.703040844379+0.980657850052j))*x[0] + ((-0.871053323515+0.678179298888j))*x[1]**o + ((0.0521656182992+0.577495955561j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.68976674791+1.03726822987j)-((-0.121443044956+0.0860637756884j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.692355496286-0.604175881019j)*x[0]**o + ((0.990973657965+0.27250350221j))*x[0] + ((-0.963463204372-0.133696395442j))*x[1]**o + ((0.45718601998-0.74866732207j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.103829511357-0.607018048161j)-((-0.275969783443-0.122978712744j))*(o-1.)
            arg[(1, 0, 1, 2)]=(0.670531437823-0.656098640281j)*x[0]**o + ((0.289616906368-0.108560606476j))*x[0] + ((-0.855040521436+0.0190114701338j))*x[1]**o + ((0.28583497224-0.813933520876j))*x[1]
            ref[(1, 0, 1, 2)]=(0.195471397497-0.77979064875j)-((-0.0307515139356-0.106181195025j))*(o-1.)
            arg[(1, 0, 2, 0)]=(0.797860628338-0.240290159787j)*x[0]**o + ((-0.547055033524-0.538317710043j))*x[0] + ((-0.23293351514+0.658312503405j))*x[1]**o + ((0.945117338079-0.45358415236j))*x[1]
            ref[(1, 0, 2, 0)]=(0.481494708876-0.286939759392j)-((0.0941545188663+0.069670390603j))*(o-1.)
            arg[(1, 0, 2, 1)]=(0.442015505325-0.157471655542j)*x[0]**o + ((-0.363465678847-0.393228806933j))*x[0] + ((0.514280018521+0.455100753605j))*x[1]**o + ((0.656134478292-0.261208100153j))*x[1]
            ref[(1, 0, 2, 1)]=(0.624482161646-0.178403904511j)-((0.159382587308+0.0496048496772j))*(o-1.)
            arg[(1, 0, 2, 2)]=(0.451294437842+0.279507782711j)*x[0]**o + ((0.154870463822-0.590116748713j))*x[0] + ((-0.336352648125-0.686783151523j))*x[1]**o + ((-0.71053690122+0.997054478996j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.22036232384-0.000168819264776j)-((0.0191569649529-0.0678792281354j))*(o-1.)
            arg[(1, 1, 0, 0)]=(0.0210369692061+0.591874781363j)*x[0]**o + ((0.802183419593-0.584547261462j))*x[0] + ((-0.519843917973-0.0922012025853j))*x[1]**o + ((0.601750574067-0.591587131505j))*x[1]
            ref[(1, 1, 0, 0)]=(0.452563522446-0.338230407095j)-((-0.0831344914612+0.0832789297963j))*(o-1.)
            arg[(1, 1, 0, 1)]=(-0.339929727231+0.933398581061j)*x[0]**o + ((-0.926677058946+0.701653948707j))*x[0] + ((0.753951986807-0.338825828784j))*x[1]**o + ((0.532564551754+0.708988310997j))*x[1]
            ref[(1, 1, 0, 1)]=(0.00995487619207+1.00260750599j)-((0.0690037099293+0.0990954587127j))*(o-1.)
            arg[(1, 1, 0, 2)]=(-0.552444708886+0.593215140818j)*x[0]**o + ((0.818865120819-0.593524312745j))*x[0] + ((-0.561601002744+0.906958432223j))*x[1]**o + ((-0.339059324572+0.987202084764j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.317119957692+0.94692567253j)-((-0.185674285272+0.25002892884j))*(o-1.)
            arg[(1, 1, 1, 0)]=(0.250597956679-0.0771463950101j)*x[0]**o + ((-0.488373118099+0.942628828494j))*x[0] + ((0.379001527783-0.172808352837j))*x[1]**o + ((-0.0944070159045+0.750227263856j))*x[1]
            ref[(1, 1, 1, 0)]=(0.0234096752294+0.721450672251j)-((0.10493324741-0.0416591246413j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.57957546409+0.308257264367j)*x[0]**o + ((0.304237516935+0.533204891892j))*x[0] + ((-0.505903635392-0.611829377607j))*x[1]**o + ((-0.372152897921-0.374381814462j))*x[1]
            ref[(1, 1, 1, 1)]=(0.00287822385548-0.0723745179051j)-((0.0122786381163-0.0505953522066j))*(o-1.)
            arg[(1, 1, 1, 2)]=(-0.745117336207+0.865746647419j)*x[0]**o + ((0.798004226033+0.350471640931j))*x[0] + ((0.289387057123-0.946361857047j))*x[1]**o + ((-0.387169862655+0.358450593754j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.0224479578526+0.314153512528j)-((-0.0759550465139-0.0134358682713j))*(o-1.)
            arg[(1, 1, 2, 0)]=(0.846873348641+0.0690767261633j)*x[0]**o + ((0.899951821364-0.0166002017717j))*x[0] + ((0.786934772508+0.70405793503j))*x[1]**o + ((-0.239090707792+0.838727995359j))*x[1]
            ref[(1, 1, 2, 0)]=(1.14733461736+0.79763122739j)-((0.272301353525+0.128855776866j))*(o-1.)
            arg[(1, 1, 2, 1)]=(0.655238670764+0.950283268509j)*x[0]**o + ((0.0417347540592+0.00784199490051j))*x[0] + ((-0.495959991433-0.304149035184j))*x[1]**o + ((0.527662508647-0.887791860355j))*x[1]
            ref[(1, 1, 2, 1)]=(0.364337971018-0.116907816065j)-((0.0265464465551+0.107689038887j))*(o-1.)
            arg[(1, 1, 2, 2)]=(0.0467404734812+0.431432850389j)*x[0]**o + ((0.251738500504+0.0814949153023j))*x[0] + ((-0.663435278096-0.514559791267j))*x[1]**o + ((0.864779439398+0.56522414811j))*x[1]
            ref[(1, 1, 2, 2)]=(0.249911567644+0.281796061267j)-((-0.102782467436-0.0138544901465j))*(o-1.)
            arg[(1, 2, 0, 0)]=(-0.398758705629+0.96919688619j)*x[0]**o + ((-0.361941392433-0.393124123221j))*x[0] + ((0.562319912625+0.404267240072j))*x[1]**o + ((0.173003645632+0.464926798308j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.0126882699026+0.722633400674j)-((0.027260201166+0.22891068771j))*(o-1.)
            arg[(1, 2, 0, 1)]=(0.379827035197-0.244887905841j)*x[0]**o + ((0.0854725309781-0.624463767319j))*x[0] + ((-0.894730405429+0.147971752005j))*x[1]**o + ((-0.592360301058-0.526788428214j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.510895570156-0.624084174684j)-((-0.085817228372-0.016152692306j))*(o-1.)
            arg[(1, 2, 0, 2)]=(-0.0376995379454+0.888774089795j)*x[0]**o + ((0.0744235532529-0.193269628228j))*x[0] + ((-0.309724914394+0.80882334715j))*x[1]**o + ((0.504729849095-0.652004699748j))*x[1]
            ref[(1, 2, 0, 2)]=(0.115864475004+0.426161554484j)-((-0.0579040753899+0.282932906158j))*(o-1.)
            arg[(1, 2, 1, 0)]=(0.00538979710782+0.646214277709j)*x[0]**o + ((-0.275466046509-0.541958534314j))*x[0] + ((0.45314801423-0.852942730867j))*x[1]**o + ((-0.16109942908-0.598097662736j))*x[1]
            ref[(1, 2, 1, 0)]=(0.010986167874-0.673392325104j)-((0.0764229685563-0.034454742193j))*(o-1.)
            arg[(1, 2, 1, 1)]=(-0.241346176933-0.297008189928j)*x[0]**o + ((0.892668852219+0.262545292818j))*x[0] + ((-0.317777261671+0.307775898909j))*x[1]**o + ((-0.0494557044219+0.0965711481952j))*x[1]
            ref[(1, 2, 1, 1)]=(0.142044854597+0.184942074997j)-((-0.0931872397673+0.00179461816353j))*(o-1.)
            arg[(1, 2, 1, 2)]=(0.913250656834-0.851183966245j)*x[0]**o + ((-0.438476248448+0.649101100905j))*x[0] + ((-0.772397000195+0.099703898481j))*x[1]**o + ((0.205142941346+0.802106335177j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.0462398252312+0.349863684159j)-((0.0234756094399-0.125246677961j))*(o-1.)
            arg[(1, 2, 2, 0)]=(-0.713219096082+0.729317782038j)*x[0]**o + ((0.942966710353-0.825977204835j))*x[0] + ((-0.666584995956+0.808268167143j))*x[1]**o + ((-0.003284402072+0.607110161662j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.220060891879+0.659359453004j)-((-0.229967348673+0.256264324864j))*(o-1.)
            arg[(1, 2, 2, 1)]=(0.937846640459-0.73375414492j)*x[0]**o + ((0.212197287005-0.328137485814j))*x[0] + ((0.675465131662+0.632031229339j))*x[1]**o + ((0.476888365197+0.317507471974j))*x[1]
            ref[(1, 2, 2, 1)]=(1.15119871216-0.0561764647104j)-((0.268885295353-0.0169538192635j))*(o-1.)
            arg[(1, 2, 2, 2)]=(-0.83004454681-0.582809720883j)*x[0]**o + ((-0.543852497448+0.853123994392j))*x[0] + ((-0.960255471717+0.716299868151j))*x[1]**o + ((0.132066857386-0.339719498889j))*x[1]
            ref[(1, 2, 2, 2)]=(-1.10104282929+0.323447321386j)-((-0.298383336421+0.0222483578781j))*(o-1.)
            arg[(1, 3, 0, 0)]=(-0.797445296796+0.935417038752j)*x[0]**o + ((0.44129415684+0.0207301852981j))*x[0] + ((0.828466808462+0.177234297658j))*x[1]**o + ((-0.583116707796+0.792582428513j))*x[1]
            ref[(1, 3, 0, 0)]=(-0.055400519645+0.96298197511j)-((0.0051702519444+0.185441889402j))*(o-1.)
            arg[(1, 3, 0, 1)]=(-0.497236824605+0.0348904971152j)*x[0]**o + ((-0.0860022848296-0.366927985837j))*x[0] + ((0.418671791657-0.346100946599j))*x[1]**o + ((0.0774231414038-0.0559526063515j))*x[1]
            ref[(1, 3, 0, 1)]=(-0.0435720881868-0.367045520836j)-((-0.013094172158-0.0518684082472j))*(o-1.)
            arg[(1, 3, 0, 2)]=(0.294911588941-0.305469001315j)*x[0]**o + ((0.857366918268-0.463298048154j))*x[0] + ((0.820277415538+0.575856725316j))*x[1]**o + ((0.358856947227-0.121387123745j))*x[1]
            ref[(1, 3, 0, 2)]=(1.16570643499-0.157148723949j)-((0.18586483408+0.0450646206669j))*(o-1.)
            arg[(1, 3, 1, 0)]=(0.748432727233+0.302074872953j)*x[0]**o + ((-0.635029780992+0.84144430465j))*x[0] + ((-0.251013143867-0.305455618776j))*x[1]**o + ((0.273791705788-0.397405752968j))*x[1]
            ref[(1, 3, 1, 0)]=(0.0680907540813+0.220328902929j)-((0.0829032638944-0.000563457637275j))*(o-1.)
            arg[(1, 3, 1, 1)]=(0.982570817989+0.081652771912j)*x[0]**o + ((-0.158469896566-0.0840220078921j))*x[0] + ((-0.00774525374682+0.032303602255j))*x[1]**o + ((0.609741336403-0.589294561932j))*x[1]
            ref[(1, 3, 1, 1)]=(0.71304850204-0.279680097829j)-((0.162470927374+0.0189927290278j))*(o-1.)
            arg[(1, 3, 1, 2)]=(0.317093115611+0.899900905067j)*x[0]**o + ((0.766581223915+0.473221084077j))*x[0] + ((0.0469968214711+0.836826258575j))*x[1]**o + ((-0.926583687024-0.0341229172352j))*x[1]
            ref[(1, 3, 1, 2)]=(0.102043736987+1.08791266524j)-((0.0606816561804+0.289454527274j))*(o-1.)
            arg[(1, 3, 2, 0)]=(0.157186404779-0.539014622349j)*x[0]**o + ((0.703342102477+0.789125035504j))*x[0] + ((-0.586532507719+0.364096821425j))*x[1]**o + ((0.150564517578-0.0232304763523j))*x[1]
            ref[(1, 3, 2, 0)]=(0.212280258558+0.295488379114j)-((-0.0715576838233-0.0291529668206j))*(o-1.)
            arg[(1, 3, 2, 1)]=(-0.590321738736+0.904114651384j)*x[0]**o + ((-0.503663413633+0.369140985063j))*x[0] + ((-0.114470065565-0.44527404925j))*x[1]**o + ((0.73774523925+0.651460311168j))*x[1]
            ref[(1, 3, 2, 1)]=(-0.235354989342+0.739720949182j)-((-0.117465300717+0.076473433689j))*(o-1.)
            arg[(1, 3, 2, 2)]=(0.165937090552+0.911279488234j)*x[0]**o + ((0.7168036023-0.988907164338j))*x[0] + ((0.0229437825293+0.239079525137j))*x[1]**o + ((0.0321425972058-0.950778261364j))*x[1]
            ref[(1, 3, 2, 2)]=(0.468913536294-0.394663206165j)-((0.0314801455136+0.191726502228j))*(o-1.)
            arg[(2, 0, 0, 0)]=(0.43376916877-0.566187674951j)*x[0]**o + ((-0.852052698541-0.564391578248j))*x[0] + ((0.866997030989-0.582112318699j))*x[1]**o + ((0.227455475065+0.764047852491j))*x[1]
            ref[(2, 0, 0, 0)]=(0.338084488141-0.474321859703j)-((0.216794366626-0.191383332275j))*(o-1.)
            arg[(2, 0, 0, 1)]=(-0.237877949134-0.365866788985j)*x[0]**o + ((0.165825056865+0.834533799079j))*x[0] + ((-0.598997427744+0.414427513663j))*x[1]**o + ((0.818605654075-0.0312599287624j))*x[1]
            ref[(2, 0, 0, 1)]=(0.0737776670309+0.425917297497j)-((-0.13947922948+0.00809345411309j))*(o-1.)
            arg[(2, 0, 0, 2)]=(0.15378123243-0.500989652434j)*x[0]**o + ((-0.844198219582-0.92122748816j))*x[0] + ((-0.539815265376-0.401922310594j))*x[1]**o + ((-0.794964353803+0.904389500005j))*x[1]
            ref[(2, 0, 0, 2)]=(-1.01259830317-0.459874975591j)-((-0.0643390054911-0.150485327171j))*(o-1.)
            arg[(2, 0, 1, 0)]=(-0.525735379112-0.200855992873j)*x[0]**o + ((0.57011836088+0.638247375163j))*x[0] + ((0.306615550182-0.84414705936j))*x[1]**o + ((-0.653826779465-0.848575984041j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.151414123758-0.627665830555j)-((-0.0365199714882-0.174167175372j))*(o-1.)
            arg[(2, 0, 1, 1)]=(-0.401218099873+0.19757936859j)*x[0]**o + ((0.824082334778+0.944069058801j))*x[0] + ((0.236273106042+0.340442621841j))*x[1]**o + ((-0.931012030537+0.801600459172j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.135937344795+1.1418457542j)-((-0.0274908323052+0.0896703317384j))*(o-1.)
            arg[(2, 0, 1, 2)]=(-0.534060576092-0.957290819071j)*x[0]**o + ((0.373933685718-0.333420055666j))*x[0] + ((0.633203120986+0.837918289308j))*x[1]**o + ((-0.527591562223+0.0896628154245j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.0272576658058-0.181564885002j)-((0.0165237574823-0.0198954216272j))*(o-1.)
            arg[(2, 0, 2, 0)]=(0.186592653359+0.573486386929j)*x[0]**o + ((-0.625736763299+0.397686588601j))*x[0] + ((0.656589398158+0.858395532039j))*x[1]**o + ((0.327438598295-0.986424747155j))*x[1]
            ref[(2, 0, 2, 0)]=(0.272441943257+0.421571880207j)-((0.14053034192+0.238646986495j))*(o-1.)
            arg[(2, 0, 2, 1)]=(0.572017382363-0.467235945965j)*x[0]**o + ((-0.304286073958-0.225667683488j))*x[0] + ((0.320585280264-0.794856739723j))*x[1]**o + ((-0.765088345957+0.62557347842j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.0883858786443-0.431093445378j)-((0.148767110438-0.210348780948j))*(o-1.)
            arg[(2, 0, 2, 2)]=(0.582834979998-0.382486824665j)*x[0]**o + ((0.652734435355-0.814220466634j))*x[0] + ((-0.269708994753+0.864096096075j))*x[1]**o + ((-0.385944882534+0.894561022805j))*x[1]
            ref[(2, 0, 2, 2)]=(0.289957769033+0.28097491379j)-((0.0521876642076+0.0802682119015j))*(o-1.)
            arg[(2, 1, 0, 0)]=(0.0431099836697-0.218598697116j)*x[0]**o + ((-0.881555030926-0.551427017895j))*x[0] + ((0.51676695896-0.108202826368j))*x[1]**o + ((0.646983710118-0.315508203942j))*x[1]
            ref[(2, 1, 0, 0)]=(0.162652810911-0.596868372661j)-((0.0933128237716-0.0544669205806j))*(o-1.)
            arg[(2, 1, 0, 1)]=(-0.890468736459-0.791369678605j)*x[0]**o + ((0.304339878619-0.542538775376j))*x[0] + ((-0.482882322321+0.0623666194517j))*x[1]**o + ((0.294128242104+0.507637653765j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.387441469029-0.381952090382j)-((-0.22889184313-0.121500509859j))*(o-1.)
            arg[(2, 1, 0, 2)]=(0.871567180979-0.258568562538j)*x[0]**o + ((0.282436812851-0.591938876257j))*x[0] + ((-0.958331148673-0.0407894024853j))*x[1]**o + ((-0.713094083787-0.355853166691j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.258710619315-0.623575003985j)-((-0.0144606612824-0.0498929941705j))*(o-1.)
            arg[(2, 1, 1, 0)]=(0.171372370011-0.99290061862j)*x[0]**o + ((-0.490432437812+0.130577408813j))*x[0] + ((0.337362655756+0.399623208455j))*x[1]**o + ((0.324453757364+0.393684047082j))*x[1]
            ref[(2, 1, 1, 0)]=(0.17137817266-0.0345079771354j)-((0.0847891709612-0.0988795683609j))*(o-1.)
            arg[(2, 1, 1, 1)]=(-0.373496691469-0.676105463326j)*x[0]**o + ((0.234595450039-0.218555522123j))*x[0] + ((0.480908177376+0.0354281200706j))*x[1]**o + ((0.217118547387+0.238466212908j))*x[1]
            ref[(2, 1, 1, 1)]=(0.279562741666-0.310383326235j)-((0.0179019143178-0.106779557209j))*(o-1.)
            arg[(2, 1, 1, 2)]=(0.320906025709-0.466358334561j)*x[0]**o + ((0.936270178152-0.74558861518j))*x[0] + ((-0.749105173572+0.307481193338j))*x[1]**o + ((0.201622035608+0.622243035308j))*x[1]
            ref[(2, 1, 1, 2)]=(0.354846532949-0.141111360547j)-((-0.0713665246439-0.0264795235371j))*(o-1.)
            arg[(2, 1, 2, 0)]=(0.158904970604+0.439003127468j)*x[0]**o + ((-0.543208370736-0.992535470272j))*x[0] + ((-0.728668844943-0.479575172597j))*x[1]**o + ((-0.171078270065-0.56564151517j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.64202525757-0.799374515285j)-((-0.0949606457232-0.00676200752151j))*(o-1.)
            arg[(2, 1, 2, 1)]=(0.973789050724-0.667932024813j)*x[0]**o + ((-0.988044771883+0.53829015566j))*x[0] + ((0.727361388779-0.681182875758j))*x[1]**o + ((-0.230375584306+0.919285728664j))*x[1]
            ref[(2, 1, 2, 1)]=(0.241365041657+0.0542304918764j)-((0.283525073251-0.224852483429j))*(o-1.)
            arg[(2, 1, 2, 2)]=(0.148830489542-0.232366708982j)*x[0]**o + ((0.0787261057989+0.386131527188j))*x[0] + ((0.195333139992+0.118336436765j))*x[1]**o + ((-0.477885983008-0.558359345763j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.0274981238378-0.143129045396j)-((0.0573606049223-0.0190050453695j))*(o-1.)
            arg[(2, 2, 0, 0)]=(-0.093152664682+0.398817330424j)*x[0]**o + ((0.772459086927+0.248455918478j))*x[0] + ((0.195635666099-0.612822177375j))*x[1]**o + ((0.485954328848+0.411572784604j))*x[1]
            ref[(2, 2, 0, 0)]=(0.680448208596+0.223011928065j)-((0.0170805002363-0.0356674744918j))*(o-1.)
            arg[(2, 2, 0, 1)]=(0.976747363939+0.33287739426j)*x[0]**o + ((-0.962819303675+0.304026504326j))*x[0] + ((0.846314774861+0.123910147891j))*x[1]**o + ((0.856718944599-0.903588532946j))*x[1]
            ref[(2, 2, 0, 1)]=(0.858480889862-0.0713872432339j)-((0.3038436898+0.0761312570253j))*(o-1.)
            arg[(2, 2, 0, 2)]=(-0.933218923275-0.970953272191j)*x[0]**o + ((0.083133209818-0.0362584601657j))*x[0] + ((0.53876236735+0.751900473117j))*x[1]**o + ((-0.75981166561+0.959509988643j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.535567505858+0.352099364702j)-((-0.0657427593208-0.0365087998455j))*(o-1.)
            arg[(2, 2, 1, 0)]=(0.189188123122-0.618866163932j)*x[0]**o + ((-0.978796183549+0.166491002461j))*x[0] + ((-0.529644266064-0.229047600008j))*x[1]**o + ((-0.485843318898-0.907429683615j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.902547822694-0.794426222546j)-((-0.0567426904902-0.141318960657j))*(o-1.)
            arg[(2, 2, 1, 1)]=(-0.267670125455+0.127151349167j)*x[0]**o + ((-0.152415881737+0.726032169647j))*x[0] + ((0.673795596084+0.469238908157j))*x[1]**o + ((-0.666023841998+0.848526675793j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.206157126553+1.08547455138j)-((0.0676875784382+0.0993983762206j))*(o-1.)
            arg[(2, 2, 1, 2)]=(0.579710306985+0.512033433517j)*x[0]**o + ((0.670163449341+0.0820736392308j))*x[0] + ((-0.301112413001-0.660165165921j))*x[1]**o + ((-0.0659830492435+0.00580627810947j))*x[1]
            ref[(2, 2, 1, 2)]=(0.441389147041-0.0301259075318j)-((0.0464329823308-0.0246886220673j))*(o-1.)
            arg[(2, 2, 2, 0)]=(-0.970344071833+0.829834381669j)*x[0]**o + ((0.231251808249+0.942234338667j))*x[0] + ((0.414408108323-0.115391269255j))*x[1]**o + ((-0.538692440264+0.0836284072553j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.431688297763+0.870152929168j)-((-0.0926559939184+0.119073852069j))*(o-1.)
            arg[(2, 2, 2, 1)]=(-0.087530377126-0.198317347028j)*x[0]**o + ((-0.437986068421+0.539946615766j))*x[0] + ((-0.468941515084-0.376790531002j))*x[1]**o + ((0.899973797351+0.0702009533532j))*x[1]
            ref[(2, 2, 2, 1)]=(-0.0472420816402+0.0175198455446j)-((-0.0927453153684-0.095851313005j))*(o-1.)
            arg[(2, 2, 2, 2)]=(-0.930853850542-0.137701432612j)*x[0]**o + ((0.780442168754-0.440588322556j))*x[0] + ((0.675490890338-0.337922358652j))*x[1]**o + ((-0.178432154184+0.20221604734j))*x[1]
            ref[(2, 2, 2, 2)]=(0.173323527183-0.35699803324j)-((-0.0425604933674-0.0792706318773j))*(o-1.)
            arg[(2, 3, 0, 0)]=(0.00402872488358-0.520142209733j)*x[0]**o + ((0.918679974913-0.203973941006j))*x[0] + ((-0.470376833841+0.042361506533j))*x[1]**o + ((0.406995176541-0.254911001526j))*x[1]
            ref[(2, 3, 0, 0)]=(0.429663521248-0.468332822866j)-((-0.0777246848263-0.0796301171999j))*(o-1.)
            arg[(2, 3, 0, 1)]=(-0.627274718994+0.257053730826j)*x[0]**o + ((-0.139195557914+0.118781317168j))*x[0] + ((-0.309342484038-0.389858050456j))*x[1]**o + ((0.423485196355+0.942859129807j))*x[1]
            ref[(2, 3, 0, 1)]=(-0.326163782296+0.464418063672j)-((-0.156102867172-0.0221340532717j))*(o-1.)
            arg[(2, 3, 0, 2)]=(-0.543611004559-0.952235458405j)*x[0]**o + ((-0.598181441106+0.0644459713506j))*x[0] + ((0.833660482418+0.294500491465j))*x[1]**o + ((0.260221462906+0.716138644649j))*x[1]
            ref[(2, 3, 0, 2)]=(-0.0239552501704+0.06142482453j)-((0.0483415796432-0.10962249449j))*(o-1.)
            arg[(2, 3, 1, 0)]=(0.799091481788-0.484799819074j)*x[0]**o + ((-0.99285817589-0.589469961342j))*x[0] + ((-0.11437379699+0.924014537864j))*x[1]**o + ((-0.0552195223499+0.521477692688j))*x[1]
            ref[(2, 3, 1, 0)]=(-0.181680006721+0.185611225068j)-((0.114119614133+0.0732024531315j))*(o-1.)
            arg[(2, 3, 1, 1)]=(0.885083115828-0.919525734082j)*x[0]**o + ((0.0223437233979-0.922536861575j))*x[0] + ((0.245987813775-0.0404654477079j))*x[1]**o + ((-0.842952868853-0.777532377045j))*x[1]
            ref[(2, 3, 1, 1)]=(0.155230892074-1.33003021021j)-((0.1885118216-0.159998530298j))*(o-1.)
            arg[(2, 3, 1, 2)]=(-0.30997023109-0.248448132774j)*x[0]**o + ((0.340283431651+0.986727046615j))*x[0] + ((-0.86033556966-0.223400749776j))*x[1]**o + ((-0.792802592309+0.465746620285j))*x[1]
            ref[(2, 3, 1, 2)]=(-0.811412480703+0.490312392175j)-((-0.195050966792-0.0786414804249j))*(o-1.)
            arg[(2, 3, 2, 0)]=(0.523874049-0.961806825659j)*x[0]**o + ((-0.283589752339+0.725599325422j))*x[0] + ((-0.865611287061+0.461735110969j))*x[1]**o + ((-0.197549800488+0.180733292188j))*x[1]
            ref[(2, 3, 2, 0)]=(-0.411438395444+0.20313045146j)-((-0.0569562063435-0.0833452857818j))*(o-1.)
            arg[(2, 3, 2, 1)]=(0.0104832594301+0.623857934857j)*x[0]**o + ((0.0243248165213+0.346398096362j))*x[0] + ((0.486161211632-0.321789380304j))*x[1]**o + ((-0.497362477755-0.979590605601j))*x[1]
            ref[(2, 3, 2, 1)]=(0.0118034049144-0.165561977343j)-((0.0827740785104+0.0503447590922j))*(o-1.)
            arg[(2, 3, 2, 2)]=(0.426294251501-0.768375579946j)*x[0]**o + ((0.683163780355-0.277902545065j))*x[0] + ((-0.0604277231535-0.645590580863j))*x[1]**o + ((0.919378365266+0.503941017609j))*x[1]
            ref[(2, 3, 2, 2)]=(0.984204336984-0.593963844133j)-((0.0609777547246-0.235661026802j))*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=(-0.487771782752+0.990400440382j)*x[0]**o + ((0.182608756173-0.803274573071j))*x[0] + ((-0.709464513668-0.142946514949j))*x[1]**o + ((0.184951221092-0.652912924499j))*x[1] + ((0.903153429329+0.525461248122j))*x[2]**o + ((0.3770877519+0.481109014115j))*x[2]
            ref[(0, 0, 0, 0)]=(0.225282431037+0.198918345051j)-((-0.0490138111818+0.228819195593j))*(o-1.)
            arg[(0, 0, 0, 1)]=(-0.165585792326+0.734633263921j)*x[0]**o + ((-0.710154978491-0.722860264077j))*x[0] + ((-0.478591165822-0.977704760909j))*x[1]**o + ((-0.988090690146+0.394062694942j))*x[1] + ((-0.543663150956-0.215880284335j))*x[2]**o + ((0.999926838513+0.211198916142j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.943079469614-0.288275217158j)-((-0.197973351517-0.0764919635539j))*(o-1.)
            arg[(0, 0, 0, 2)]=(0.957083643704-0.775619695005j)*x[0]**o + ((-0.590745454894-0.80821314883j))*x[0] + ((-0.806152564222+0.230494504591j))*x[1]**o + ((0.157024245454-0.155388859761j))*x[1] + ((0.902631347613-0.917027616758j))*x[2]**o + ((-0.379913750397-0.0262498724196j))*x[2]
            ref[(0, 0, 0, 2)]=(0.119963733629-1.22600234409j)-((0.175593737849-0.243692134529j))*(o-1.)
            arg[(0, 0, 1, 0)]=(0.354765372268-0.985438316916j)*x[0]**o + ((-0.761631786459+0.964985012659j))*x[0] + ((-0.768574779241-0.489468591864j))*x[1]**o + ((0.409556267166+0.0563592587766j))*x[1] + ((-0.843497278197+0.941683286314j))*x[2]**o + ((-0.166423743179-0.287785518646j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.88790297382+0.100167565162j)-((-0.209551114195-0.0888706037443j))*(o-1.)
            arg[(0, 0, 1, 1)]=(0.257711609663-0.784982886707j)*x[0]**o + ((0.913578162493-0.386350456044j))*x[0] + ((0.934933922491+0.776898615795j))*x[1]**o + ((0.958631024512+0.673238087356j))*x[1] + ((0.320568966687-0.161286928962j))*x[2]**o + ((0.688538877607-0.859746008828j))*x[2]
            ref[(0, 0, 1, 1)]=(2.03698128173-0.371114788695j)-((0.252202416474-0.0282285333122j))*(o-1.)
            arg[(0, 0, 1, 2)]=(-0.7999383582-0.474595485126j)*x[0]**o + ((0.395843606598+0.145037041706j))*x[0] + ((0.307003875521+0.525528692427j))*x[1]**o + ((-0.831390238749-0.0702856461207j))*x[1] + ((0.525756170923+0.8321149811j))*x[2]**o + ((0.148663359755-0.17314553512j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.127030792076+0.392327024433j)-((0.00547028137406+0.147174698067j))*(o-1.)
            arg[(0, 0, 2, 0)]=(0.470284454805-0.717258272148j)*x[0]**o + ((-0.331145835725-0.595542239271j))*x[0] + ((0.698222777214+0.867102401574j))*x[1]**o + ((-0.917236852491-0.247965643748j))*x[1] + ((0.617880996022+0.695878392075j))*x[2]**o + ((0.126246353064+0.298622069962j))*x[2]
            ref[(0, 0, 2, 0)]=(0.332125946444+0.150418354223j)-((0.29773137134+0.140953753584j))*(o-1.)
            arg[(0, 0, 2, 1)]=(-0.550595495249+0.622028746686j)*x[0]**o + ((0.180139146974+0.0622854949903j))*x[0] + ((0.728587297137-0.563530958809j))*x[1]**o + ((-0.413986689083+0.716264733615j))*x[1] + ((-0.802781268155-0.144126342424j))*x[2]**o + ((0.182925012016-0.406199765683j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.33785599818+0.143360954188j)-((-0.104131577711-0.0142714257578j))*(o-1.)
            arg[(0, 0, 2, 2)]=(0.581431790782+0.993709977465j)*x[0]**o + ((0.589861158616+0.94319108425j))*x[0] + ((0.311433628584-0.349125089473j))*x[1]**o + ((-0.411445281603-0.754181171679j))*x[1] + ((0.97538376942+0.940284409464j))*x[2]**o + ((0.23782645851+0.155494508765j))*x[2]
            ref[(0, 0, 2, 2)]=(1.14224576215+0.964686859396j)-((0.311374864798+0.264144882909j))*(o-1.)
            arg[(0, 1, 0, 0)]=(-0.323391446346+0.855910181885j)*x[0]**o + ((0.992795581792+0.159123548944j))*x[0] + ((-0.995461807559+0.282484051906j))*x[1]**o + ((0.465893086651-0.814439699105j))*x[1] + ((-0.102819570222-0.137390340406j))*x[2]**o + ((-0.808609313644+0.994314962695j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.385796734664+0.670001352959j)-((-0.236945470688+0.166833982231j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.155379609031-0.880515989527j)*x[0]**o + ((-0.998473577259-0.465166444408j))*x[0] + ((-0.239612809363+0.888792456809j))*x[1]**o + ((0.50392388391+0.457779996867j))*x[1] + ((-0.476697564207-0.700005913777j))*x[2]**o + ((0.447376842261-0.321606082565j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.304051807813-0.510360988301j)-((-0.0934884607564-0.115288241083j))*(o-1.)
            arg[(0, 1, 0, 2)]=(0.647903959192-0.31915215743j)*x[0]**o + ((-0.360890092166+0.889604051619j))*x[0] + ((0.483403959173-0.526656491448j))*x[1]**o + ((0.798738269026-0.402877106804j))*x[1] + ((-0.735068868209-0.790012351205j))*x[2]**o + ((-0.0680574941844-0.771664380391j))*x[2]
            ref[(0, 1, 0, 2)]=(0.383014866416-0.96037921783j)-((0.0660398416927-0.272636833347j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.25730622615+0.81270324261j)*x[0]**o + ((0.74945876014-0.757362325066j))*x[0] + ((0.422590593266-0.968979055103j))*x[1]**o + ((-0.792272161375-0.401253739242j))*x[1] + ((0.3780878191-0.34433886883j))*x[2]**o + ((0.225620318979+0.651358935971j))*x[2]
            ref[(0, 1, 1, 0)]=(0.363089551981-0.50393590483j)-((0.090562031036-0.0834357802206j))*(o-1.)
            arg[(0, 1, 1, 1)]=(0.205054672383+0.546481188433j)*x[0]**o + ((-0.873766882773-0.250876638774j))*x[0] + ((-0.275258922651-0.309940755194j))*x[1]**o + ((0.657078538499-0.338978032289j))*x[1] + ((0.777490363412+0.347853759535j))*x[2]**o + ((-0.285827972004+0.57595910514j))*x[2]
            ref[(0, 1, 1, 1)]=(0.102384898433+0.285249313425j)-((0.117881018857+0.0973990321289j))*(o-1.)
            arg[(0, 1, 1, 2)]=(0.512931577965-0.512961741872j)*x[0]**o + ((-0.0451005776664+0.593333631167j))*x[0] + ((0.611808312917-0.705192217805j))*x[1]**o + ((-0.627656097558-0.444290633589j))*x[1] + ((-0.0207294959112+0.916252247417j))*x[2]**o + ((0.537058331873-0.444119461346j))*x[2]
            ref[(0, 1, 1, 2)]=(0.48415602581-0.298489088014j)-((0.184001732495-0.0503169520433j))*(o-1.)
            arg[(0, 1, 2, 0)]=(-0.565767158597-0.0888278799865j)*x[0]**o + ((0.912433641889+0.358860854877j))*x[0] + ((0.330139761028+0.203678050674j))*x[1]**o + ((0.319520949744-0.196428670639j))*x[1] + ((0.13884446142+0.639739483817j))*x[2]**o + ((0.680340842309-0.513718899247j))*x[2]
            ref[(0, 1, 2, 0)]=(0.907756248896+0.201651469747j)-((-0.0161304893581+0.125764942417j))*(o-1.)
            arg[(0, 1, 2, 1)]=(-0.312591690363-0.687569415507j)*x[0]**o + ((-0.654508578058+0.498994710562j))*x[0] + ((-0.765869139564-0.490580219985j))*x[1]**o + ((0.613164740545+0.33249413273j))*x[1] + ((-0.625771557335-0.976841994112j))*x[2]**o + ((0.796765080682+0.160401581196j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.474405572046-0.581550602558j)-((-0.28403873121-0.359165271601j))*(o-1.)
            arg[(0, 1, 2, 2)]=(0.433626632975-0.884311568479j)*x[0]**o + ((0.411190886317+0.193916293315j))*x[0] + ((-0.328191120372-0.466221261742j))*x[1]**o + ((-0.726950363219+0.219005729444j))*x[1] + ((-0.417495039057-0.476889698778j))*x[2]**o + ((0.062242021925-0.114044076713j))*x[2]
            ref[(0, 1, 2, 2)]=(-0.282788490715-0.764272291476j)-((-0.0520099210756-0.3045704215j))*(o-1.)
            arg[(0, 2, 0, 0)]=(0.517949936465-0.886595026095j)*x[0]**o + ((-0.84274684775-0.914350631285j))*x[0] + ((-0.688530887731+0.647877623524j))*x[1]**o + ((-0.15366916575-0.0799005232125j))*x[1] + ((-0.0275903881136+0.393257914443j))*x[2]**o + ((0.439628421018+0.431215244715j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.377479465931-0.204247698955j)-((-0.0330285565633+0.0257567519788j))*(o-1.)
            arg[(0, 2, 0, 1)]=(-0.858358546181-0.43283746961j)*x[0]**o + ((-0.803311017691+0.144766239515j))*x[0] + ((0.913201558027-0.883206251347j))*x[1]**o + ((-0.406922108217-0.287942578423j))*x[1] + ((0.508286228925+0.874005701786j))*x[2]**o + ((-0.907727640024+0.315191572853j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.77741576258-0.135011392613j)-((0.0938548734619-0.0736730031951j))*(o-1.)
            arg[(0, 2, 0, 2)]=(0.792654415906-0.43486092153j)*x[0]**o + ((0.800330388818-0.435927111425j))*x[0] + ((-0.756095452529+0.61239231598j))*x[1]**o + ((0.302539574104-0.554743998788j))*x[1] + ((-0.196006109224-0.183802847288j))*x[2]**o + ((-0.235388044729+0.845170690141j))*x[2]
            ref[(0, 2, 0, 2)]=(0.354017386173-0.0758859364553j)-((-0.0265745243078-0.00104524213965j))*(o-1.)
            arg[(0, 2, 1, 0)]=(0.0788758040246+0.809486311306j)*x[0]**o + ((-0.75230630262+0.570359748288j))*x[0] + ((0.386941568916+0.178154768999j))*x[1]**o + ((0.185341111676+0.664091113195j))*x[1] + ((0.306977737697+0.563224705853j))*x[2]**o + ((0.575216836037-0.314488211022j))*x[2]
            ref[(0, 2, 1, 0)]=(0.390523377865+1.23541421831j)-((0.128799185106+0.258477631026j))*(o-1.)
            arg[(0, 2, 1, 1)]=(-0.113133181261+0.800208327878j)*x[0]**o + ((-0.67938188354+0.0318800408453j))*x[0] + ((-0.652878467814+0.418483163138j))*x[1]**o + ((0.873972098205-0.611018319215j))*x[1] + ((-0.41473407458-0.0132506669833j))*x[2]**o + ((0.682480792344-0.324161661252j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.151837358323+0.151070442205j)-((-0.196790953942+0.200906804005j))*(o-1.)
            arg[(0, 2, 1, 2)]=(-0.823399185489+0.634398403342j)*x[0]**o + ((0.560656114537-0.329384637579j))*x[0] + ((-0.15506585441+0.62755366168j))*x[1]**o + ((0.388703176335+0.791123929358j))*x[1] + ((-0.486898096119+0.213564061318j))*x[2]**o + ((0.322821072289-0.143015641149j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.0965913864282+0.897119888484j)-((-0.244227189336+0.24591935439j))*(o-1.)
            arg[(0, 2, 2, 0)]=(-0.485720504408-0.0949815130234j)*x[0]**o + ((-0.820122425141-0.575005897145j))*x[0] + ((-0.0787780038229-0.882095444505j))*x[1]**o + ((-0.59544941117+0.834435829543j))*x[1] + ((-0.335291741722+0.435237930559j))*x[2]**o + ((0.34671208096-0.252809985552j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.984325002652-0.267609540062j)-((-0.149965041659-0.0903065044948j))*(o-1.)
            arg[(0, 2, 2, 1)]=(-0.010335865882+0.590314326864j)*x[0]**o + ((0.509293423963+0.323400747789j))*x[0] + ((-0.905161716158+0.344957423971j))*x[1]**o + ((0.548573024265-0.509058489157j))*x[1] + ((0.946604073781-0.692274497511j))*x[2]**o + ((-0.61503780017-0.416673475935j))*x[2]
            ref[(0, 2, 2, 1)]=(0.2369675699-0.17966698199j)-((0.00518441529027+0.0404995422206j))*(o-1.)
            arg[(0, 2, 2, 2)]=(-0.791778631604-0.450012621961j)*x[0]**o + ((0.73224410577-0.488951835903j))*x[0] + ((-0.0443008446305-0.934368874645j))*x[1]**o + ((0.678746593356+0.12115559156j))*x[1] + ((0.0434385779849-0.366668252066j))*x[2]**o + ((-0.0297262707898-0.320222089499j))*x[2]
            ref[(0, 2, 2, 2)]=(0.294311765044-1.21953404126j)-((-0.132106816375-0.291841624779j))*(o-1.)
            arg[(0, 3, 0, 0)]=(0.497715661082-0.0800875044233j)*x[0]**o + ((0.4469490519-0.513482283661j))*x[0] + ((-0.501595194737+0.149639378009j))*x[1]**o + ((0.805720873174-0.561861330757j))*x[1] + ((0.662421171677-0.168344757639j))*x[2]**o + ((-0.629206371752-0.998828255272j))*x[2]
            ref[(0, 3, 0, 0)]=(0.641002595672-1.08648237687j)-((0.10975693967-0.0164654806756j))*(o-1.)
            arg[(0, 3, 0, 1)]=(-0.116955418718-0.519937046644j)*x[0]**o + ((0.809071057169-0.824211083288j))*x[0] + ((-0.881506625006-0.0504984597031j))*x[1]**o + ((-0.586359312182-0.870054986637j))*x[1] + ((-0.922516141611+0.113089821003j))*x[2]**o + ((0.503276877023-0.141544632698j))*x[2]
            ref[(0, 3, 0, 1)]=(-0.597494781662-1.14657819398j)-((-0.320163030889-0.0762242808907j))*(o-1.)
            arg[(0, 3, 0, 2)]=(-0.795152191229+0.542279405338j)*x[0]**o + ((-0.365001893592-0.200286007089j))*x[0] + ((-0.0723838460367-0.0640897607675j))*x[1]**o + ((0.13119058481+0.172176989031j))*x[1] + ((-0.414381082749-0.202492382234j))*x[2]**o + ((-0.605147178082+0.150059199676j))*x[2]
            ref[(0, 3, 0, 2)]=(-1.06043780344+0.198823721977j)-((-0.213652853336+0.0459495437227j))*(o-1.)
            arg[(0, 3, 1, 0)]=(-0.469885421267+0.698947575677j)*x[0]**o + ((-0.698281681726-0.929861235485j))*x[0] + ((-0.633880734582+0.281342466034j))*x[1]**o + ((0.338222193755+0.9115102473j))*x[1] + ((-0.645105448089-0.618292130447j))*x[2]**o + ((-0.353520310107+0.232275649855j))*x[2]
            ref[(0, 3, 1, 0)]=(-1.23122570101+0.287961286468j)-((-0.291478600656+0.0603329852107j))*(o-1.)
            arg[(0, 3, 1, 1)]=(-0.868747430947+0.305531021514j)*x[0]**o + ((0.0539803434658-0.504280358663j))*x[0] + ((0.168468356919+0.781219103186j))*x[1]**o + ((-0.499401082743-0.0216329115796j))*x[1] + ((-0.437566663131+0.603358190343j))*x[2]**o + ((0.851872938779-0.067005935189j))*x[2]
            ref[(0, 3, 1, 1)]=(-0.365696768829+0.548594554806j)-((-0.189640956193+0.281684719174j))*(o-1.)
            arg[(0, 3, 1, 2)]=(0.242190675307-0.851825872178j)*x[0]**o + ((0.906713641611-0.845168562205j))*x[0] + ((0.740321811338+0.0720849697962j))*x[1]**o + ((0.0223807031661-0.510917265851j))*x[1] + ((-0.564593715338+0.310344105139j))*x[2]**o + ((-0.253816475647-0.703425632508j))*x[2]
            ref[(0, 3, 1, 2)]=(0.546598320218-1.2644541289j)-((0.0696531285511-0.0782327995405j))*(o-1.)
            arg[(0, 3, 2, 0)]=(0.7031076094+0.914305552856j)*x[0]**o + ((-0.707691405736+0.274242944894j))*x[0] + ((0.950379917362+0.192869653669j))*x[1]**o + ((0.117039795151+0.0618471259586j))*x[1] + ((0.787628113033+0.251681664531j))*x[2]**o + ((-0.632556388638+0.116444451343j))*x[2]
            ref[(0, 3, 2, 0)]=(0.608953820285+0.905695696626j)-((0.406852606632+0.226476145176j))*(o-1.)
            arg[(0, 3, 2, 1)]=(-0.980515434228-0.417373484097j)*x[0]**o + ((-0.421921214643-0.555641792198j))*x[0] + ((0.478831859353+0.297724528408j))*x[1]**o + ((-0.400928187562+0.554158891015j))*x[1] + ((-0.113783450225-0.665391088038j))*x[2]**o + ((0.0387731623764+0.153164499989j))*x[2]
            ref[(0, 3, 2, 1)]=(-0.699771632464-0.316679222461j)-((-0.102577837517-0.130840007288j))*(o-1.)
            arg[(0, 3, 2, 2)]=(-0.251562950391+0.312486135101j)*x[0]**o + ((-0.993911779994-0.168550042163j))*x[0] + ((-0.580317237646+0.489433668502j))*x[1]**o + ((-0.0247258890439-0.105500473585j))*x[1] + ((0.616888653509+0.503950848213j))*x[2]**o + ((-0.904388583162+0.0963631619676j))*x[2]
            ref[(0, 3, 2, 2)]=(-1.06900889336+0.564091649018j)-((-0.0358319224214+0.217645108636j))*(o-1.)
            arg[(1, 0, 0, 0)]=(-0.255496988339-0.255908542314j)*x[0]**o + ((-0.853165015915-0.316384952306j))*x[0] + ((0.661609289497-0.441356283848j))*x[1]**o + ((-0.455709314666-0.619276181317j))*x[1] + ((0.225204238419-0.927492386128j))*x[2]**o + ((-0.649016492948+0.855940629541j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.663287141977-0.852238858186j)-((0.105219423263-0.270792868715j))*(o-1.)
            arg[(1, 0, 0, 1)]=(0.177467631323+0.647822913099j)*x[0]**o + ((0.0179501391405-0.192973308054j))*x[0] + ((0.933639282498+0.4599719534j))*x[1]**o + ((0.612503607923+0.683274822887j))*x[1] + ((0.855223667034+0.602609257569j))*x[2]**o + ((0.658131761887+0.253222312945j))*x[2]
            ref[(1, 0, 0, 1)]=(1.6274580449+1.22696397592j)-((0.327721763476+0.285067354011j))*(o-1.)
            arg[(1, 0, 0, 2)]=(-0.66856290354+0.314183064802j)*x[0]**o + ((0.595423942355-0.289717884945j))*x[0] + ((0.551122001098+0.881839032921j))*x[1]**o + ((0.653336335219+0.09775760853j))*x[1] + ((-0.197295155872+0.181422877947j))*x[2]**o + ((-0.86513838614+0.724888233883j))*x[2]
            ref[(1, 0, 0, 2)]=(0.0344429165593+0.955186466569j)-((-0.0524560097191+0.229574162612j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.399031285968-0.295995386437j)*x[0]**o + ((0.575231268423-0.171052308853j))*x[0] + ((-0.869078475034-0.705563589618j))*x[1]**o + ((-0.422652743611-0.786523907408j))*x[1] + ((0.0429968021208+0.367525362043j))*x[2]**o + ((0.23015397952+0.700216997445j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.421190227275-0.445696416414j)-((-0.204185493147-0.105672269002j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.298200339401-0.757543214807j)*x[0]**o + ((0.965151162983-0.382834767363j))*x[0] + ((0.199411700249-0.101124658766j))*x[1]**o + ((-0.375593902928+0.538018181743j))*x[1] + ((-0.374430980094+0.711217324275j))*x[2]**o + ((-0.839843317463+0.195639444331j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.361752838327+0.101686154707j)-((-0.0788699365411-0.0245750915496j))*(o-1.)
            arg[(1, 0, 1, 2)]=(-0.0342020912013+0.653527885149j)*x[0]**o + ((0.810187831522+0.250736186881j))*x[0] + ((0.527067896885-0.925242463764j))*x[1]**o + ((-0.283131741345+0.417870314657j))*x[1] + ((-0.456722364618+0.808306510707j))*x[2]**o + ((0.865613206648-0.0239312836451j))*x[2]
            ref[(1, 0, 1, 2)]=(0.714406368945+0.590633574992j)-((0.00602390684432+0.089431988682j))*(o-1.)
            arg[(1, 0, 2, 0)]=(-0.332726959426-0.258168350849j)*x[0]**o + ((-0.281989932035-0.446871047191j))*x[0] + ((0.421006853153-0.996649202757j))*x[1]**o + ((-0.0886567002129+0.249627297683j))*x[1] + ((-0.75032063753-0.13170967825j))*x[2]**o + ((0.0644061859553+0.91666088778j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.484140595048-0.333555046792j)-((-0.110340123967-0.231087871976j))*(o-1.)
            arg[(1, 0, 2, 1)]=(-0.965652642457+0.479802369003j)*x[0]**o + ((-0.312062431522+0.139024995227j))*x[0] + ((0.39374022383+0.218286457595j))*x[1]**o + ((-0.0771806328384-0.152941529139j))*x[1] + ((0.953888783624+0.926777643942j))*x[2]**o + ((-0.490244405126-0.445481500688j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.248755552244+0.582734217971j)-((0.0636627274995+0.270811078424j))*(o-1.)
            arg[(1, 0, 2, 2)]=(-0.135091862714-0.772368221202j)*x[0]**o + ((0.89671866292-0.538484681198j))*x[0] + ((-0.744008162498-0.254024664673j))*x[1]**o + ((-0.216470144207-0.788244049308j))*x[1] + ((-0.778140156035-0.869912397879j))*x[2]**o + ((-0.419751578973-0.767254835037j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.698371620754-1.99514442465j)-((-0.276206696875-0.316050880626j))*(o-1.)
            arg[(1, 1, 0, 0)]=(0.346406564369+0.708333636277j)*x[0]**o + ((0.803150963475-0.406580971291j))*x[0] + ((0.224458103034-0.284785685288j))*x[1]**o + ((-0.660031501871+0.265850941826j))*x[1] + ((-0.365701965914-0.913620468724j))*x[2]**o + ((-0.198923927845+0.0420978826554j))*x[2]
            ref[(1, 1, 0, 0)]=(0.0746791176237-0.294352332272j)-((0.0341937835815-0.0816787529559j))*(o-1.)
            arg[(1, 1, 0, 1)]=(0.541265321433+0.770116247963j)*x[0]**o + ((0.225533062643+0.714155436023j))*x[0] + ((0.417226173937+0.662849508127j))*x[1]**o + ((-0.238922602187+0.165846892264j))*x[1] + ((-0.351596775665-0.567815565277j))*x[2]**o + ((0.253205406115-0.249990383891j))*x[2]
            ref[(1, 1, 0, 1)]=(0.423355293138+0.747581067604j)-((0.101149119951+0.144191698469j))*(o-1.)
            arg[(1, 1, 0, 2)]=(0.682649075452+0.36259552713j)*x[0]**o + ((0.586389651977+0.832557927913j))*x[0] + ((0.977627195603+0.930164728061j))*x[1]**o + ((0.271768632958+0.210734367562j))*x[1] + ((-0.167752927674-0.424342010559j))*x[2]**o + ((-0.0250367339423-0.812878777036j))*x[2]
            ref[(1, 1, 0, 2)]=(1.16282244719+0.549415881536j)-((0.248753890563+0.144736374105j))*(o-1.)
            arg[(1, 1, 1, 0)]=(-0.0932671561351-0.917453892033j)*x[0]**o + ((0.18099117041-0.384134077951j))*x[0] + ((-0.0175413612889+0.923567874209j))*x[1]**o + ((0.375176646708-0.156798020016j))*x[1] + ((-0.00483446639649-0.326712733537j))*x[2]**o + ((-0.871206003587-0.432299006415j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.215340585145-0.646914927871j)-((-0.0192738306367-0.0534331252267j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.759569691455+0.474763753894j)*x[0]**o + ((0.0235381813278-0.180713877571j))*x[0] + ((0.883665577699+0.556030713041j))*x[1]**o + ((-0.235489290674-0.210163367044j))*x[1] + ((0.171242629885+0.157918583683j))*x[2]**o + ((-0.252734227087-0.391627114879j))*x[2]
            ref[(1, 1, 1, 1)]=(0.674896281303+0.203104345562j)-((0.302412983173+0.19811884177j))*(o-1.)
            arg[(1, 1, 1, 2)]=(-0.805461862462-0.190072042685j)*x[0]**o + ((0.958581026058-0.722091225031j))*x[0] + ((-0.122624805582-0.447828280998j))*x[1]**o + ((-0.17383107323-0.713359475854j))*x[1] + ((-0.879963787255-0.344755259941j))*x[2]**o + ((-0.132598977213-0.302892740176j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.577949739842-1.36049951234j)-((-0.30134174255-0.163775930604j))*(o-1.)
            arg[(1, 1, 2, 0)]=(0.279138623801-0.794073544161j)*x[0]**o + ((-0.0536442946737+0.766746113317j))*x[0] + ((-0.49686084048-0.255422223013j))*x[1]**o + ((0.455638506524-0.905302187322j))*x[1] + ((0.13018940999-0.887024060374j))*x[2]**o + ((-0.561164928301-0.895007343498j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.12335176157-1.48504162253j)-((-0.014588801115-0.322753304591j))*(o-1.)
            arg[(1, 1, 2, 1)]=(0.784871780604+0.679848514168j)*x[0]**o + ((-0.287090725823-0.190257581515j))*x[0] + ((-0.318888568834-0.56708419793j))*x[1]**o + ((0.781748543122+0.577867325153j))*x[1] + ((0.375758915594-0.0391040450404j))*x[2]**o + ((-0.455979702795+0.0806833786552j))*x[2]
            ref[(1, 1, 2, 1)]=(0.440210120934+0.270976696746j)-((0.140290354561+0.0122767118663j))*(o-1.)
            arg[(1, 1, 2, 2)]=(-0.242787273455-0.198325491031j)*x[0]**o + ((0.507037910961-0.56152074898j))*x[0] + ((-0.993613894821+0.864502930177j))*x[1]**o + ((-0.0696499583889-0.0694571086145j))*x[1] + ((-0.207210495639+0.682669257878j))*x[2]**o + ((0.755830695357+0.0798197159764j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.125196507993+0.398844277703j)-((-0.240601943986+0.224807782837j))*(o-1.)
            arg[(1, 2, 0, 0)]=(0.797580412816+0.184335904972j)*x[0]**o + ((0.0793106550454-0.241346654533j))*x[0] + ((-0.595991641003+0.231414176107j))*x[1]**o + ((0.449160610415-0.730816585394j))*x[1] + ((-0.706745074159+0.946204333627j))*x[2]**o + ((-0.94072208238+0.536303504153j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.458703559633+0.463047339465j)-((-0.0841927170576+0.226992402451j))*(o-1.)
            arg[(1, 2, 0, 1)]=(0.45368567148+0.831989629005j)*x[0]**o + ((-0.426671661233-0.545176977848j))*x[0] + ((0.999908610585-0.0302627949076j))*x[1]**o + ((-0.937813328491-0.581672091895j))*x[1] + ((0.509231661346-0.940202954294j))*x[2]**o + ((0.191805604572+0.604397785839j))*x[2]
            ref[(1, 2, 0, 1)]=(0.39507327913-0.33046370205j)-((0.327137657235-0.0230793533662j))*(o-1.)
            arg[(1, 2, 0, 2)]=(0.441205608806-0.0358927634482j)*x[0]**o + ((0.859307138297-0.858591972711j))*x[0] + ((-0.695946416574-0.146707717545j))*x[1]**o + ((0.328436498757-0.181522693373j))*x[1] + ((-0.840443361902+0.878508947998j))*x[2]**o + ((-0.573223210722-0.702332126498j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.240331871668-0.523269162788j)-((-0.182530694945+0.115984744501j))*(o-1.)
            arg[(1, 2, 1, 0)]=(-0.114858240512-0.335062297696j)*x[0]**o + ((-0.227929957669-0.255549634137j))*x[0] + ((-0.913398126598-0.20878028713j))*x[1]**o + ((0.175076051483+0.444755764196j))*x[1] + ((-0.25427973566+0.157328592558j))*x[2]**o + ((-0.0111448667504+0.323202298972j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.673267437854+0.0629472183818j)-((-0.213756017128-0.0644189987114j))*(o-1.)
            arg[(1, 2, 1, 1)]=(-0.0646229441612+0.412052522601j)*x[0]**o + ((-0.409966851245-0.732976471204j))*x[0] + ((-0.798169030192-0.471995065366j))*x[1]**o + ((-0.113722088462+0.93395258762j))*x[1] + ((-0.749143474009-0.528382179997j))*x[2]**o + ((-0.283270569281-0.0260606892871j))*x[2]
            ref[(1, 2, 1, 1)]=(-1.20944747868-0.206704647817j)-((-0.26865590806-0.0980541204602j))*(o-1.)
            arg[(1, 2, 1, 2)]=(0.980583411036-0.253849576208j)*x[0]**o + ((-0.410449235107+0.804597742133j))*x[0] + ((0.486752704809-0.595188876361j))*x[1]**o + ((0.288077658614-0.231838044219j))*x[1] + ((0.570136228936-0.23919460606j))*x[2]**o + ((-0.458407931487-0.803920835475j))*x[2]
            ref[(1, 2, 1, 2)]=(0.7283464184-0.659697098095j)-((0.33957872413-0.181372176438j))*(o-1.)
            arg[(1, 2, 2, 0)]=(-0.179336190546-0.691752253176j)*x[0]**o + ((-0.181847068891+0.73529601771j))*x[0] + ((0.595433036505-0.187084005383j))*x[1]**o + ((-0.594030472261-0.908040426268j))*x[1] + ((0.476107504777+0.653096230659j))*x[2]**o + ((-0.145162437185-0.0953328451908j))*x[2]
            ref[(1, 2, 2, 0)]=(-0.0144178138002-0.246908640825j)-((0.148700725123-0.0376233379833j))*(o-1.)
            arg[(1, 2, 2, 1)]=(0.569607023751+0.940118876343j)*x[0]**o + ((0.655274169618-0.0499002078729j))*x[0] + ((-0.487668318563+0.225952151841j))*x[1]**o + ((-0.152527294557+0.148434538192j))*x[1] + ((0.331588545231+0.884847342865j))*x[2]**o + ((-0.635881365752-0.949913405549j))*x[2]
            ref[(1, 2, 2, 1)]=(0.140196379864+0.599769647909j)-((0.0689212084032+0.341819728508j))*(o-1.)
            arg[(1, 2, 2, 2)]=(-0.0621408514275+0.653974495729j)*x[0]**o + ((-0.578698824344-0.238595591964j))*x[0] + ((0.820448595789-0.544485779164j))*x[1]**o + ((0.966626467315-0.781278566672j))*x[1] + ((0.732848003249-0.955823302725j))*x[2]**o + ((-0.348003758968-0.218598654308j))*x[2]
            ref[(1, 2, 2, 2)]=(0.765539815806-1.04240369955j)-((0.248525957935-0.14105576436j))*(o-1.)
            arg[(1, 3, 0, 0)]=(-0.573485054996-0.240086943537j)*x[0]**o + ((-0.831236808231+0.978560137672j))*x[0] + ((0.927293624533-0.480745993128j))*x[1]**o + ((0.229342415277-0.977241677466j))*x[1] + ((0.572904159527-0.654739639266j))*x[2]**o + ((-0.327505230954-0.203107750775j))*x[2]
            ref[(1, 3, 0, 0)]=(-0.00134344742136-0.78868093325j)-((0.154452121511-0.229262095988j))*(o-1.)
            arg[(1, 3, 0, 1)]=(0.22719605109+0.358015264937j)*x[0]**o + ((0.4880493442+0.98079779585j))*x[0] + ((0.79258211847+0.0684314660043j))*x[1]**o + ((-0.779503578748+0.188220668198j))*x[1] + ((0.750736288924-0.934992589288j))*x[2]**o + ((-0.879129469767+0.767882277071j))*x[2]
            ref[(1, 3, 0, 1)]=(0.299965377084+0.714177441386j)-((0.295085743081-0.0847576430578j))*(o-1.)
            arg[(1, 3, 0, 2)]=(-0.806632488038-0.224526406787j)*x[0]**o + ((-0.156057996403-0.200909831829j))*x[0] + ((-0.11431102804+0.550127856598j))*x[1]**o + ((-0.0221931771139-0.218525286876j))*x[1] + ((0.13017131846+0.683912767116j))*x[2]**o + ((0.380903375244+0.255149303244j))*x[2]
            ref[(1, 3, 0, 2)]=(-0.294059997945+0.422614200733j)-((-0.13179536627+0.168252369488j))*(o-1.)
            arg[(1, 3, 1, 0)]=(0.949823918676+0.316178331093j)*x[0]**o + ((-0.956994436961+0.369233939539j))*x[0] + ((-0.669706027472+0.235678524062j))*x[1]**o + ((-0.429116004368+0.513972976591j))*x[1] + ((-0.378071739997-0.101913244466j))*x[2]**o + ((0.439786042205-0.651125294781j))*x[2]
            ref[(1, 3, 1, 0)]=(-0.522139123958+0.341012616019j)-((-0.0163256414654+0.0749906017814j))*(o-1.)
            arg[(1, 3, 1, 1)]=(-0.167829281971-0.929581558927j)*x[0]**o + ((-0.729721114213+0.944261603293j))*x[0] + ((0.383481999836-0.0379970386665j))*x[1]**o + ((0.0189400133381-0.919909214391j))*x[1] + ((0.573177027986+0.0939231755004j))*x[2]**o + ((0.0139113906024-0.140370638444j))*x[2]
            ref[(1, 3, 1, 1)]=(0.0459800177893-0.494836835818j)-((0.131471624308-0.145609237015j))*(o-1.)
            arg[(1, 3, 1, 2)]=(0.531636628715+0.254443146922j)*x[0]**o + ((0.372464588236-0.552321700555j))*x[0] + ((-0.597256104039-0.675569157563j))*x[1]**o + ((0.284275437591+0.154005419169j))*x[1] + ((0.443721574037-0.0796975855473j))*x[2]**o + ((0.156663442864-0.541185335948j))*x[2]
            ref[(1, 3, 1, 2)]=(0.595752783702-0.720162606761j)-((0.0630170164522-0.0834705993648j))*(o-1.)
            arg[(1, 3, 2, 0)]=(-0.94002348168+0.844914456699j)*x[0]**o + ((0.525349318761+0.37991644269j))*x[0] + ((-0.616160579747-0.681368686598j))*x[1]**o + ((0.701614576204+0.921975820021j))*x[1] + ((0.00161508683958-0.205564881589j))*x[2]**o + ((0.290601532648+0.244262821061j))*x[2]
            ref[(1, 3, 2, 0)]=(-0.0185017734876+0.752067986142j)-((-0.259094829098-0.00700318524788j))*(o-1.)
            arg[(1, 3, 2, 1)]=(-0.925886853428-0.687467080771j)*x[0]**o + ((-0.617961085109+0.834445970515j))*x[0] + ((0.240512406538+0.846882375062j))*x[1]**o + ((0.578288331157+0.878500481643j))*x[1] + ((-0.99525473255-0.362820810753j))*x[2]**o + ((-0.308320247898-0.711369635658j))*x[2]
            ref[(1, 3, 2, 1)]=(-1.01431109065+0.399085650019j)-((-0.28010486324-0.0339009194103j))*(o-1.)
            arg[(1, 3, 2, 2)]=(0.439117137893+0.627636228743j)*x[0]**o + ((0.512981819318+0.912091293639j))*x[0] + ((0.760840078081+0.078580796848j))*x[1]**o + ((0.0858598585981+0.433334021561j))*x[1] + ((-0.42965052838-0.120900697873j))*x[2]**o + ((-0.195321936359-0.303406615367j))*x[2]
            ref[(1, 3, 2, 2)]=(0.586913214576+0.813667513776j)-((0.128384447932+0.0975527212864j))*(o-1.)
            arg[(2, 0, 0, 0)]=(0.791935990146+0.931283269697j)*x[0]**o + ((-0.470024929355-0.486691108638j))*x[0] + ((-0.826611117283-0.441998202416j))*x[1]**o + ((0.720480088578-0.735863025015j))*x[1] + ((-0.958129634812-0.118147576315j))*x[2]**o + ((0.430302503525+0.961157683301j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.1560235496+0.0548705203067j)-((-0.165467460325+0.0618562484942j))*(o-1.)
            arg[(2, 0, 0, 1)]=(0.11967471322+0.344043447836j)*x[0]**o + ((-0.969185398217-0.78556043242j))*x[0] + ((0.456966351244-0.342660982297j))*x[1]**o + ((-0.425677679664+0.00369278587531j))*x[1] + ((-0.819825467027-0.553534973049j))*x[2]**o + ((-0.0769858915446-0.557552905324j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.857516685995-0.945786529689j)-((-0.0405307337606-0.0920254179183j))*(o-1.)
            arg[(2, 0, 0, 2)]=(0.0464311313695+0.990981837132j)*x[0]**o + ((0.651814825996+0.822307053331j))*x[0] + ((0.0700558892882+0.0915175398031j))*x[1]**o + ((-0.674742538619+0.321966708205j))*x[1] + ((-0.895118693862-0.153876294184j))*x[2]**o + ((-0.899728385604+0.15242214523j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.850643885715+1.11265949476j)-((-0.129771945534+0.154770513792j))*(o-1.)
            arg[(2, 0, 1, 0)]=(0.21607209183-0.852398328314j)*x[0]**o + ((0.575445709556-0.155033292968j))*x[0] + ((0.210890632137+0.356206087153j))*x[1]**o + ((0.885995687658+0.452056304069j))*x[1] + ((-0.752708120655+0.222000033888j))*x[2]**o + ((0.932914018784-0.0147946604368j))*x[2]
            ref[(2, 0, 1, 0)]=(1.03430500965+0.00401807169544j)-((-0.0542908994481-0.0456987012122j))*(o-1.)
            arg[(2, 0, 1, 1)]=(-0.997769329663+0.763451882455j)*x[0]**o + ((0.360949196025-0.13154910639j))*x[0] + ((-0.904488991686-0.828258974145j))*x[1]**o + ((0.565190805882-0.17992866459j))*x[1] + ((-0.809370872341-0.167845044706j))*x[2]**o + ((0.772494964751-0.511116562733j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.506497113516-0.527623235054j)-((-0.451938198948-0.038775356066j))*(o-1.)
            arg[(2, 0, 1, 2)]=(-0.0932596903304-0.453307741685j)*x[0]**o + ((-0.037603806255+0.371028531038j))*x[0] + ((-0.545033635845+0.333446299303j))*x[1]**o + ((-0.477931110033-0.603323037558j))*x[1] + ((0.7780527859-0.404891073095j))*x[2]**o + ((0.615590036394-0.439551128684j))*x[2]
            ref[(2, 0, 1, 2)]=(0.119907289916-0.598299075341j)-((0.0232932432876-0.0874587525795j))*(o-1.)
            arg[(2, 0, 2, 0)]=(0.472970682482+0.394654040582j)*x[0]**o + ((-0.674684621325-0.531414600605j))*x[0] + ((0.633647851335-0.757796325522j))*x[1]**o + ((-0.455529102303+0.21943374735j))*x[1] + ((0.588764743391+0.00215811692344j))*x[2]**o + ((0.987200101264+0.334576245213j))*x[2]
            ref[(2, 0, 2, 0)]=(0.776184827422-0.16919438803j)-((0.282563879535-0.0601640280029j))*(o-1.)
            arg[(2, 0, 2, 1)]=(-0.703062128151+0.626912281407j)*x[0]**o + ((-0.991605838261+0.998078317264j))*x[0] + ((0.741639369484-0.133934740166j))*x[1]**o + ((-0.621766364515-0.768737819462j))*x[1] + ((-0.983011956354+0.874647910972j))*x[2]**o + ((0.777764156586+0.651635634403j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.890021380605+1.12430079221j)-((-0.157405785837+0.227937575369j))*(o-1.)
            arg[(2, 0, 2, 2)]=(-0.99615163243-0.328450399863j)*x[0]**o + ((0.420204149576+0.134316170323j))*x[0] + ((-0.608996645187+0.824234053048j))*x[1]**o + ((-0.961973629953+0.304834040888j))*x[1] + ((0.412287985992-0.569141244399j))*x[2]**o + ((-0.693425960439+0.147329167449j))*x[2]
            ref[(2, 0, 2, 2)]=(-1.21402786622+0.256560893723j)-((-0.198810048604-0.0122262652024j))*(o-1.)
            arg[(2, 1, 0, 0)]=(-0.862667156578-0.304754200453j)*x[0]**o + ((-0.998752559898+0.0326515484128j))*x[0] + ((-0.597284682129-0.827142149806j))*x[1]**o + ((-0.194832154159+0.139552358774j))*x[1] + ((-0.991266807679-0.383088016315j))*x[2]**o + ((0.324762508837-0.879829691671j))*x[2]
            ref[(2, 1, 0, 0)]=(-1.6600204258-1.11130507553j)-((-0.408536441064-0.252497394429j))*(o-1.)
            arg[(2, 1, 0, 1)]=(0.936949648843-0.663317374973j)*x[0]**o + ((-0.320744062886+0.0265024487785j))*x[0] + ((-0.192323511118+0.0715019879241j))*x[1]**o + ((-0.0388373392598-0.0843701315247j))*x[1] + ((-0.401219234023+0.500956692714j))*x[2]**o + ((0.359296116336-0.911382296604j))*x[2]
            ref[(2, 1, 0, 1)]=(0.171560808947-0.530054336843j)-((0.0572344839504-0.0151431157225j))*(o-1.)
            arg[(2, 1, 0, 2)]=(-0.0754780541675+0.151528538097j)*x[0]**o + ((-0.569859303259+0.677348876386j))*x[0] + ((0.793295897975+0.204077675112j))*x[1]**o + ((0.3158832577+0.366676533156j))*x[1] + ((-0.1859718056-0.535677885076j))*x[2]**o + ((0.739462224154+0.62772257459j))*x[2]
            ref[(2, 1, 0, 2)]=(0.508666108401+0.745838156132j)-((0.0886410063679-0.0300119453112j))*(o-1.)
            arg[(2, 1, 1, 0)]=(0.197933073385-0.581633662809j)*x[0]**o + ((0.463434938879-0.222885541547j))*x[0] + ((-0.609994673339+0.811169482582j))*x[1]**o + ((-0.592979318772+0.463085736889j))*x[1] + ((-0.463941891088-0.157626322956j))*x[2]**o + ((0.548382998868-0.366197534259j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.228582436033-0.02704392105j)-((-0.14600058184+0.0119849161361j))*(o-1.)
            arg[(2, 1, 1, 1)]=(-0.723859109984-0.118548667149j)*x[0]**o + ((-0.205057228119-0.150785622395j))*x[0] + ((-0.246363896784+0.486146959924j))*x[1]**o + ((-0.281501463331-0.812426932633j))*x[1] + ((0.836883079121-0.0799010176375j))*x[2]**o + ((0.641325230965-0.929662099644j))*x[2]
            ref[(2, 1, 1, 1)]=(0.0107133059339-0.802588689767j)-((-0.0222233212745+0.0479495458564j))*(o-1.)
            arg[(2, 1, 1, 2)]=(0.747192090857-0.624292833471j)*x[0]**o + ((-0.56645039779+0.342489325845j))*x[0] + ((0.522634084543-0.699737159016j))*x[1]**o + ((0.422598957831+0.0249070637425j))*x[1] + ((-0.811803997775-0.924045826988j))*x[2]**o + ((-0.646440538204-0.14279520676j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.166134900269-1.01173731832j)-((0.0763370296043-0.374679303246j))*(o-1.)
            arg[(2, 1, 2, 0)]=(0.19225766236-0.637541047452j)*x[0]**o + ((-0.0817297510521-0.726749812373j))*x[0] + ((0.13779170349+0.256563777664j))*x[1]**o + ((-0.716769381806+0.194574950319j))*x[1] + ((0.388865546056-0.194172402992j))*x[2]**o + ((-0.759101575768-0.140892290075j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.41934289836-0.624108412455j)-((0.119819151984-0.0958582787968j))*(o-1.)
            arg[(2, 1, 2, 1)]=(-0.780980587631-0.0495881972674j)*x[0]**o + ((-0.865081489531+0.525502065353j))*x[0] + ((0.84012224693-0.199586537154j))*x[1]**o + ((0.625828349917-0.358731179282j))*x[1] + ((0.478570661805+0.352253051487j))*x[2]**o + ((0.497057532068+0.524611909475j))*x[2]
            ref[(2, 1, 2, 1)]=(0.39775835678+0.397230556306j)-((0.089618720184+0.0171797195109j))*(o-1.)
            arg[(2, 1, 2, 2)]=(-0.480912192903-0.0195403238356j)*x[0]**o + ((0.292153394535+0.395938579778j))*x[0] + ((-0.104361710849-0.390446607612j))*x[1]**o + ((0.139177270736-0.416188740414j))*x[1] + ((0.0394728404843-0.791671278275j))*x[2]**o + ((-0.701730094649+0.992303376409j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.408100246323-0.114802496974j)-((-0.090966843878-0.200276368287j))*(o-1.)
            arg[(2, 2, 0, 0)]=(-0.832998014022+0.639034155139j)*x[0]**o + ((-0.30819866388+0.768859809292j))*x[0] + ((0.642767059837-0.0984576316187j))*x[1]**o + ((-0.124280854375-0.0130720844199j))*x[1] + ((-0.16036386173+0.959137730648j))*x[2]**o + ((0.149164752763-0.446681125328j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.316954790704+0.904410426857j)-((-0.0584324693193+0.249952375695j))*(o-1.)
            arg[(2, 2, 0, 1)]=(-0.103779764535-0.806344522939j)*x[0]**o + ((0.33351382074-0.213224178745j))*x[0] + ((-0.161994846849-0.536263537472j))*x[1]**o + ((-0.637752239358-0.738594566094j))*x[1] + ((0.061100151368+0.767351182402j))*x[2]**o + ((-0.885676837551+0.819273717398j))*x[2]
            ref[(2, 2, 0, 1)]=(-0.697294858092-0.353900952725j)-((-0.0341124100026-0.095876146335j))*(o-1.)
            arg[(2, 2, 0, 2)]=(-0.0910014807028+0.101540763779j)*x[0]**o + ((0.0315246084019-0.247788903457j))*x[0] + ((0.577296639498+0.606878762551j))*x[1]**o + ((-0.318518492517-0.782384111842j))*x[1] + ((-0.180534200761-0.634815348973j))*x[2]**o + ((0.556198568141+0.540380720609j))*x[2]
            ref[(2, 2, 0, 2)]=(0.28748282103-0.208094058667j)-((0.0509601596723+0.0122673628927j))*(o-1.)
            arg[(2, 2, 1, 0)]=(-0.4300115902-0.543563213117j)*x[0]**o + ((-0.752413394678+0.0974934866401j))*x[0] + ((0.42787895548+0.472074939461j))*x[1]**o + ((0.873271583149+0.180212414867j))*x[1] + ((-0.576752861458-0.829180103947j))*x[2]**o + ((0.356833268399+0.128899557365j))*x[2]
            ref[(2, 2, 1, 0)]=(-0.0505970196541-0.247031459365j)-((-0.0964809160297-0.150111396267j))*(o-1.)
            arg[(2, 2, 1, 1)]=(-0.371786823883-0.841881587032j)*x[0]**o + ((-0.166643227205-0.7365526682j))*x[0] + ((0.202112075454+0.786009413796j))*x[1]**o + ((0.878144630403+0.0456215369349j))*x[1] + ((0.640028756859+0.421886983941j))*x[2]**o + ((-0.331520932199-0.611981950284j))*x[2]
            ref[(2, 2, 1, 1)]=(0.425167239714-0.468449135422j)-((0.0783923347384+0.0610024684509j))*(o-1.)
            arg[(2, 2, 1, 2)]=(0.836771405424+0.119644477921j)*x[0]**o + ((0.812260697004+0.71488190042j))*x[0] + ((0.604623838343-0.691735719617j))*x[1]**o + ((0.787961109136+0.807806001191j))*x[1] + ((-0.875216146106-0.696187162386j))*x[2]**o + ((0.82310004439+0.337737948651j))*x[2]
            ref[(2, 2, 1, 2)]=(1.4947504741+0.296073723091j)-((0.0943631829435-0.211379734014j))*(o-1.)
            arg[(2, 2, 2, 0)]=(0.873463651916+0.152551912407j)*x[0]**o + ((0.616551280296-0.763593505716j))*x[0] + ((-0.971688351077+0.213657696467j))*x[1]**o + ((-0.105065998143-0.730914254714j))*x[1] + ((-0.121241953778+0.715203988297j))*x[2]**o + ((-0.748255140455-0.737880339627j))*x[2]
            ref[(2, 2, 2, 0)]=(-0.228118255621-0.575487251443j)-((-0.0365777754899+0.180235599529j))*(o-1.)
            arg[(2, 2, 2, 1)]=(-0.300228931052+0.573956860303j)*x[0]**o + ((0.275732086702-0.716974155443j))*x[0] + ((0.0163158051195-0.598282376261j))*x[1]**o + ((-0.822369173039+0.139720615818j))*x[1] + ((0.633886687068-0.128903048719j))*x[2]**o + ((-0.455641828134-0.557057336509j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.326152676668-0.643769720406j)-((0.0583289268559-0.025538094113j))*(o-1.)
            arg[(2, 2, 2, 2)]=(-0.944167773822+0.183120455302j)*x[0]**o + ((0.679635511381+0.57500842313j))*x[0] + ((-0.020564861751+0.397063342013j))*x[1]**o + ((-0.483352859219-0.138969333606j))*x[1] + ((-0.777031338385+0.889275501561j))*x[2]**o + ((0.781092274291-0.418509252579j))*x[2]
            ref[(2, 2, 2, 2)]=(-0.382194523752+0.743494567911j)-((-0.29029399566+0.244909883146j))*(o-1.)
            arg[(2, 3, 0, 0)]=(-0.478234101233+0.35049706621j)*x[0]**o + ((-0.889840738959+0.780781993087j))*x[0] + ((0.648457387953+0.587438363617j))*x[1]**o + ((0.142581528164+0.0675845035419j))*x[1] + ((0.70379672395-0.894862913056j))*x[2]**o + ((-0.648201416496-0.650871987773j))*x[2]
            ref[(2, 3, 0, 0)]=(-0.260720308311+0.120283512813j)-((0.145670001778+0.00717875279518j))*(o-1.)
            arg[(2, 3, 0, 1)]=(0.266741325007-0.626090688149j)*x[0]**o + ((0.439386419501+0.537636058252j))*x[0] + ((0.948512940168-0.0484057851643j))*x[1]**o + ((-0.847567738317+0.809751793986j))*x[1] + ((0.868694034314-0.776840232657j))*x[2]**o + ((-0.446312115648-0.0289462080405j))*x[2]
            ref[(2, 3, 0, 1)]=(0.614727432513-0.0664475308863j)-((0.347324716582-0.241889450995j))*(o-1.)
            arg[(2, 3, 0, 2)]=(0.526957422213+0.574499184441j)*x[0]**o + ((0.0525708433774-0.187293694246j))*x[0] + ((-0.557575848704-0.409595416857j))*x[1]**o + ((-0.728085279861-0.129658221453j))*x[1] + ((0.82340963343+0.342588992953j))*x[2]**o + ((0.874519152267-0.479711040559j))*x[2]
            ref[(2, 3, 0, 2)]=(0.495897961362-0.144585097861j)-((0.132131867823+0.0845821267561j))*(o-1.)
            arg[(2, 3, 1, 0)]=(0.147083486335+0.201248412116j)*x[0]**o + ((0.851240545675+0.895027170077j))*x[0] + ((-0.357360951023+0.987148575242j))*x[1]**o + ((-0.698055383012+0.373740410021j))*x[1] + ((0.430399981922+0.0607396865534j))*x[2]**o + ((-0.352808377645-0.490378902348j))*x[2]
            ref[(2, 3, 1, 0)]=(0.0102496511258+1.01376267583j)-((0.0366870862056+0.208189445652j))*(o-1.)
            arg[(2, 3, 1, 1)]=(-0.961861262622-0.888306543703j)*x[0]**o + ((-0.874753977083+0.401685558499j))*x[0] + ((-0.388640194909+0.886762527165j))*x[1]**o + ((0.0308593746207+0.684401057669j))*x[1] + ((-0.0577535304389+0.325694884117j))*x[2]**o + ((0.817124174217+0.935549137669j))*x[2]
            ref[(2, 3, 1, 1)]=(-0.717512708107+1.17289331071j)-((-0.234709164662+0.0540251445965j))*(o-1.)
            arg[(2, 3, 1, 2)]=(0.372123975098+0.773557242603j)*x[0]**o + ((-0.578606665314-0.581439990879j))*x[0] + ((0.783812663883-0.412969133904j))*x[1]**o + ((-0.754737176095+0.410875847455j))*x[1] + ((0.517509527777-0.85181859088j))*x[2]**o + ((0.81285330623+0.926235904319j))*x[2]
            ref[(2, 3, 1, 2)]=(0.576477815789+0.132220639357j)-((0.27890769446-0.0818717470302j))*(o-1.)
            arg[(2, 3, 2, 0)]=(-0.64979809732-0.340326131733j)*x[0]**o + ((0.672386009481-0.128300654417j))*x[0] + ((-0.584028924885+0.945122172048j))*x[1]**o + ((0.0540375771124-0.488425945096j))*x[1] + ((0.369998408848+0.641068277632j))*x[2]**o + ((0.626189818918+0.140624071091j))*x[2]
            ref[(2, 3, 2, 0)]=(0.244392396078+0.384880894762j)-((-0.143971435559+0.207644052991j))*(o-1.)
            arg[(2, 3, 2, 1)]=(-0.303456542109-0.174977741065j)*x[0]**o + ((-0.368851103754+0.617447755763j))*x[0] + ((-0.947333627849-0.743525130966j))*x[1]**o + ((-0.802059209519-0.907006015679j))*x[1] + ((-0.578381065612+0.968596075927j))*x[2]**o + ((-0.389669398406+0.652655095073j))*x[2]
            ref[(2, 3, 2, 1)]=(-1.69487547362+0.206595019527j)-((-0.304861872595+0.00834886731598j))*(o-1.)
            arg[(2, 3, 2, 2)]=(0.689371641127-0.640741120718j)*x[0]**o + ((0.399239622126+0.0530459793882j))*x[0] + ((-0.971536701535-0.765595113251j))*x[1]**o + ((0.469615785604-0.670897011025j))*x[1] + ((-0.772786502576+0.434641758472j))*x[2]**o + ((-0.243715183939-0.340579922295j))*x[2]
            ref[(2, 3, 2, 2)]=(-0.214905669596-0.965062714715j)-((-0.175825260497-0.16194907925j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.367483050586-0.351981356665j)*x[0]**o + ((0.786262023815-0.538017056352j))*x[0] + ((-0.857997878028-0.221543552453j))*x[1]**o + ((0.185321199683+0.518050402134j))*x[1]
            ref=(0.240534198029-0.296745781668j)-((-0.0817524712402-0.0955874848529j))*(o-1.)
        else:
            arg=(0.645570471198-0.297561200278j)*x[0]**o + ((0.931724075916+0.362438283714j))*x[0] + ((-0.283339450017+0.288285689817j))*x[1]**o + ((-0.0413481845301+0.00718213279571j))*x[1] + ((0.694540228824-0.875742497323j))*x[2]**o + ((-0.502728041888-0.40433173033j))*x[2]
            ref=(0.722209549752-0.459864660802j)-((0.176128541668-0.147503001297j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.672126547225-0.80787325375j)*x[0]**o + ((-0.156591594338-0.721267875898j))*x[0] + ((-0.400688598107-0.644715381311j))*x[1]**o + ((0.613488823783-0.284322066745j))*x[1]
            ref[(0,)]=(-0.307958957944-1.22908928885j)-((-0.178802524222-0.242098105844j))*(o-1.)
            arg[(1,)]=(0.124240983968-0.036200808654j)*x[0]**o + ((0.480076907698+0.571028167156j))*x[0] + ((0.846096772997-0.559377611028j))*x[1]**o + ((-0.806793890195+0.826826011017j))*x[1]
            ref[(1,)]=(0.321810387234+0.401137879246j)-((0.161722959494-0.0992630699469j))*(o-1.)
            arg[(2,)]=(-0.631140835177+0.591302218579j)*x[0]**o + ((0.500243741621-0.995021170821j))*x[0] + ((0.602402848151+0.438580873247j))*x[1]**o + ((0.0791757679333+0.457332693999j))*x[1]
            ref[(2,)]=(0.275340761264+0.246097307502j)-((-0.00478966450435+0.171647181971j))*(o-1.)
        else:
            arg[(0,)]=(-0.24247460833+0.0836621371211j)*x[0]**o + ((-0.59210720425+0.925065181804j))*x[0] + ((0.64819552836-0.513807437686j))*x[1]**o + ((0.853054516143+0.833771923204j))*x[1] + ((-0.910519522308+0.400127822087j))*x[2]**o + ((-0.560426194487-0.136686557366j))*x[2]
            ref[(0,)]=(-0.402138742437+0.796066534582j)-((-0.0841331003797-0.00500291307963j))*(o-1.)
            arg[(1,)]=(0.236966258965+0.188432135725j)*x[0]**o + ((-0.128030435893+0.0218565561564j))*x[0] + ((-0.917938840823-0.118107330134j))*x[1]**o + ((0.0499366072318+0.34029185628j))*x[1] + ((0.712255057403-0.312968216475j))*x[2]**o + ((-0.812352765541-0.977860794426j))*x[2]
            ref[(1,)]=(-0.429582059329-0.429177896436j)-((0.00521374592412-0.0404405684805j))*(o-1.)
            arg[(2,)]=(-0.329635982767+0.0730411938229j)*x[0]**o + ((-0.682461967636-0.528773974538j))*x[0] + ((0.0199048535149+0.0738571457722j))*x[1]**o + ((-0.837550811414-0.40346848042j))*x[1] + ((-0.905460578625-0.350333421672j))*x[2]**o + ((0.0633767003886+0.708681979204j))*x[2]
            ref[(2,)]=(-1.33591389327-0.213497778916j)-((-0.202531951313-0.0339058470129j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.752316713648-0.498119906274j)*x[0]**o + ((0.932530234299-0.427091603874j))*x[0] + ((-0.147465240416+0.0532165782623j))*x[1]**o + ((0.925888594767+0.610647601007j))*x[1]
            ref[(0, 0)]=(1.23163515115-0.130673665439j)-((0.100808578872-0.0741505546686j))*(o-1.)
            arg[(0, 1)]=(0.0556603681674+0.261879133642j)*x[0]**o + ((-0.228906459933+0.951467234991j))*x[0] + ((-0.128192618174-0.83107562346j))*x[1]**o + ((0.572378903279-0.415365649887j))*x[1]
            ref[(0, 1)]=(0.13547009667-0.0165474523569j)-((-0.0120887083345-0.0948660816363j))*(o-1.)
            arg[(1, 0)]=(-0.324078098178-0.242945419187j)*x[0]**o + ((0.273291953382-0.619132992953j))*x[0] + ((-0.366253699493+0.991514955124j))*x[1]**o + ((0.610069649605-0.0145971285914j))*x[1]
            ref[(1, 0)]=(0.096514902658+0.0574197071964j)-((-0.115055299612+0.124761589323j))*(o-1.)
            arg[(1, 1)]=(0.798077326427-0.806763399706j)*x[0]**o + ((-0.380220822744+0.0919758699168j))*x[0] + ((0.393337031758+0.661861362069j))*x[1]**o + ((-0.304609419601-0.678655864752j))*x[1]
            ref[(1, 1)]=(0.25329205792-0.365791016236j)-((0.198569059697-0.0241503396062j))*(o-1.)
        else:
            arg[(0, 0)]=(0.0971627596719-0.176478130399j)*x[0]**o + ((0.77841501423-0.426921551334j))*x[0] + ((0.825405889255+0.448246167772j))*x[1]**o + ((-0.691393234803+0.919056640884j))*x[1] + ((0.415946048469-0.675065891628j))*x[2]**o + ((-0.433026638078-0.929320831213j))*x[2]
            ref[(0, 0)]=(0.496254919372-0.420241797959j)-((0.223085782899-0.0672163090425j))*(o-1.)
            arg[(0, 1)]=(-0.272880854038-0.914763761019j)*x[0]**o + ((-0.318854019914-0.79957263578j))*x[0] + ((-0.32366107069+0.782415143799j))*x[1]**o + ((-0.346017198461-0.661544196785j))*x[1] + ((0.559997495265-0.0537292194714j))*x[2]**o + ((0.476337797868-0.513976066003j))*x[2]
            ref[(0, 1)]=(-0.112538924985-1.08058536763j)-((-0.00609073824383-0.031012972782j))*(o-1.)
            arg[(1, 0)]=(0.897655739152+0.176762274973j)*x[0]**o + ((-0.503806432158+0.301173514996j))*x[0] + ((-0.721167237922+0.288210221332j))*x[1]**o + ((0.989154504204+0.021907323004j))*x[1] + ((0.041089353374-0.838178280741j))*x[2]**o + ((0.305446961414-0.793723611079j))*x[2]
            ref[(1, 0)]=(0.504186444032-0.421924278758j)-((0.0362629757673-0.0622009640727j))*(o-1.)
            arg[(1, 1)]=(-0.921329067885+0.533126206473j)*x[0]**o + ((-0.388148723726-0.901845391026j))*x[0] + ((-0.227651944367+0.927849393105j))*x[1]**o + ((0.148560986616+0.363902390588j))*x[1] + ((-0.126914974677+0.0745625975642j))*x[2]**o + ((-0.264881096547-0.896178844497j))*x[2]
            ref[(1, 1)]=(-0.890182410293+0.0507081761035j)-((-0.212649331155+0.255923032857j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4),w)
        ref=numpy.zeros((2, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.275205810086+0.0297230059982j)*x[0]**o + ((0.51384235455-0.468958981929j))*x[0] + ((0.226798473108+0.344787189437j))*x[1]**o + ((-0.479515321385+0.475715160914j))*x[1]
            ref[(0, 0, 0)]=(0.26816565818+0.19063318721j)-((0.0836673805324+0.062418365906j))*(o-1.)
            arg[(0, 0, 1)]=(0.118730137439+0.086483962365j)*x[0]**o + ((-0.825721823681-0.785636714284j))*x[0] + ((0.654151259847+0.171293972769j))*x[1]**o + ((-0.72243921222-0.70629409466j))*x[1]
            ref[(0, 0, 1)]=(-0.387639819308-0.617076436905j)-((0.128813566214+0.0429629891889j))*(o-1.)
            arg[(0, 0, 2)]=(-0.122952532758+0.25493473149j)*x[0]**o + ((0.423463998908-0.942487860994j))*x[0] + ((-0.706728866271+0.0852078355698j))*x[1]**o + ((-0.880345631521-0.365086178272j))*x[1]
            ref[(0, 0, 2)]=(-0.643281515822-0.483715736103j)-((-0.138280233172+0.0566904278433j))*(o-1.)
            arg[(0, 0, 3)]=(-0.0237430624218-0.940719951187j)*x[0]**o + ((0.0672471365654+0.457305374691j))*x[0] + ((-0.517666860935+0.370424469235j))*x[1]**o + ((0.426948145223+0.803179541242j))*x[1]
            ref[(0, 0, 3)]=(-0.0236073207842+0.34509471699j)-((-0.0902349872261-0.0950492469921j))*(o-1.)
            arg[(0, 1, 0)]=(0.0679674045704-0.421083484099j)*x[0]**o + ((0.519352892713-0.676595054492j))*x[0] + ((0.0691741222181-0.722725962434j))*x[1]**o + ((-0.999086470855+0.374746173178j))*x[1]
            ref[(0, 1, 0)]=(-0.171296025677-0.722829163923j)-((0.0228569211314-0.190634907756j))*(o-1.)
            arg[(0, 1, 1)]=(0.906981291646-0.0569015542056j)*x[0]**o + ((-0.00928145156789-0.317175816527j))*x[0] + ((-0.389634571982-0.786904083867j))*x[1]**o + ((-0.792902899859-0.14155969936j))*x[1]
            ref[(0, 1, 1)]=(-0.142418815881-0.65127057698j)-((0.0862244532774-0.140634273012j))*(o-1.)
            arg[(0, 1, 2)]=(0.299605922695+0.543154149418j)*x[0]**o + ((-0.632372057989-0.945793148839j))*x[0] + ((-0.817402046409-0.0335762667272j))*x[1]**o + ((0.788039111449+0.0754124538895j))*x[1]
            ref[(0, 1, 2)]=(-0.181064535127-0.180401406129j)-((-0.0862993539523+0.0849296471152j))*(o-1.)
            arg[(0, 1, 3)]=(0.380909738643+0.677180277722j)*x[0]**o + ((0.2567138337+0.142989040242j))*x[0] + ((-0.762731093837+0.66087197102j))*x[1]**o + ((0.0106967436233+0.696148199651j))*x[1]
            ref[(0, 1, 3)]=(-0.0572053889356+1.08859474432j)-((-0.0636368925324+0.223008708124j))*(o-1.)
            arg[(0, 2, 0)]=(-0.0327093405407-0.416069513088j)*x[0]**o + ((-0.737481625722+0.3867953184j))*x[0] + ((0.34976985411+0.830058744468j))*x[1]**o + ((0.850050626039-0.910668347259j))*x[1]
            ref[(0, 2, 0)]=(0.214814756943-0.0549418987394j)-((0.0528434189282+0.06899820523j))*(o-1.)
            arg[(0, 2, 1)]=(0.258984240676-0.570256668413j)*x[0]**o + ((0.901218634465+0.138481583915j))*x[0] + ((0.0513110398756+0.529130808083j))*x[1]**o + ((0.138456522075+0.190517739865j))*x[1]
            ref[(0, 2, 1)]=(0.674985218546+0.143936731725j)-((0.0517158800919-0.00685431005505j))*(o-1.)
            arg[(0, 2, 2)]=(-0.744206330641-0.730933963961j)*x[0]**o + ((0.0774985944818+0.545791517896j))*x[0] + ((-0.470101869952+0.73287509539j))*x[1]**o + ((-0.940042035801-0.385475063472j))*x[1]
            ref[(0, 2, 2)]=(-1.03842582096+0.0811287929266j)-((-0.202384700099+0.000323521904836j))*(o-1.)
            arg[(0, 2, 3)]=(-0.582541958678-0.496550208194j)*x[0]**o + ((-0.768872210617+0.899864093044j))*x[0] + ((-0.442641005216+0.576499710988j))*x[1]**o + ((-0.470933908048-0.555400469919j))*x[1]
            ref[(0, 2, 3)]=(-1.13249454128+0.21220656296j)-((-0.170863827316+0.0133249171323j))*(o-1.)
            arg[(0, 3, 0)]=(-0.872738824826+0.0377770799646j)*x[0]**o + ((0.704587436938+0.630170684265j))*x[0] + ((0.202204282333+0.0549856086213j))*x[1]**o + ((0.215682850188-0.528120052864j))*x[1]
            ref[(0, 3, 0)]=(0.124867872317+0.0974066599932j)-((-0.111755757082+0.0154604480976j))*(o-1.)
            arg[(0, 3, 1)]=(0.811179853044+0.102008664439j)*x[0]**o + ((-0.791629621799-0.243394098922j))*x[0] + ((0.784223836334+0.355494000142j))*x[1]**o + ((-0.0457434657656+0.905736088792j))*x[1]
            ref[(0, 3, 1)]=(0.379015300907+0.559922327226j)-((0.265900614896+0.0762504440968j))*(o-1.)
            arg[(0, 3, 2)]=(0.158161987603-0.292206166601j)*x[0]**o + ((0.628469885882-0.762116858364j))*x[0] + ((-0.121520555562+0.679285334057j))*x[1]**o + ((0.554518664729-0.212949508931j))*x[1]
            ref[(0, 3, 2)]=(0.609814991325-0.293993599919j)-((0.0061069053401+0.0645131945759j))*(o-1.)
            arg[(0, 3, 3)]=(-0.347340241137+0.42590877805j)*x[0]**o + ((-0.879753326162-0.42735935191j))*x[0] + ((-0.558871590535+0.104459837519j))*x[1]**o + ((0.00293156863329-0.0583351845982j))*x[1]
            ref[(0, 3, 3)]=(-0.891516794601+0.0223370395307j)-((-0.151035305279+0.0883947692617j))*(o-1.)
            arg[(1, 0, 0)]=(-0.814110076168+0.821266009074j)*x[0]**o + ((-0.829347042431+0.461916003976j))*x[0] + ((-0.798608027946+0.794032631575j))*x[1]**o + ((0.795379662216+0.0208448211799j))*x[1]
            ref[(1, 0, 0)]=(-0.823342742165+1.0490297329j)-((-0.268786350686+0.269216440108j))*(o-1.)
            arg[(1, 0, 1)]=(0.2411495143+0.111429337221j)*x[0]**o + ((0.692252709879+0.649003535752j))*x[0] + ((0.695880662261+0.326965740798j))*x[1]**o + ((0.389834393155+0.0776515765801j))*x[1]
            ref[(1, 0, 1)]=(1.0095586398+0.582525095176j)-((0.156171696094+0.0730658463364j))*(o-1.)
            arg[(1, 0, 2)]=(0.988848912674+0.773645103516j)*x[0]**o + ((-0.000380824959843+0.0663300406896j))*x[0] + ((-0.0424313727303+0.581127898414j))*x[1]**o + ((0.252041691282+0.419232582585j))*x[1]
            ref[(1, 0, 2)]=(0.599039203133+0.920167812602j)-((0.157736256657+0.225795500322j))*(o-1.)
            arg[(1, 0, 3)]=(0.56695981599+0.175018216823j)*x[0]**o + ((0.53283735368-0.48293990156j))*x[0] + ((0.385892415349-0.112985669874j))*x[1]**o + ((-0.134404793416+0.104744568058j))*x[1]
            ref[(1, 0, 3)]=(0.675642395802-0.158081393276j)-((0.158808705223+0.0103387578247j))*(o-1.)
            arg[(1, 1, 0)]=(0.432737002573-0.404026542852j)*x[0]**o + ((-0.0980213686301-0.662875935715j))*x[0] + ((0.701689680682+0.604352902602j))*x[1]**o + ((-0.336918326236-0.299414771198j))*x[1]
            ref[(1, 1, 0)]=(0.349743494194-0.380982173582j)-((0.189071113876+0.033387726625j))*(o-1.)
            arg[(1, 1, 1)]=(-0.13699210573-0.427855170576j)*x[0]**o + ((-0.923464675862+0.152587577602j))*x[0] + ((0.758234127878-0.642751063671j))*x[1]**o + ((-0.586782471992-0.488127446702j))*x[1]
            ref[(1, 1, 1)]=(-0.444502562853-0.703073051673j)-((0.103540337025-0.178434372374j))*(o-1.)
            arg[(1, 1, 2)]=(0.366731451946+0.462211082446j)*x[0]**o + ((0.180258789663+0.72030226205j))*x[0] + ((-0.476928246604-0.282592941022j))*x[1]**o + ((0.691683699029+0.000551728167857j))*x[1]
            ref[(1, 1, 2)]=(0.380872847017+0.450236065821j)-((-0.018366132443+0.029936356904j))*(o-1.)
            arg[(1, 1, 3)]=(0.496838678977+0.695757732027j)*x[0]**o + ((0.197607883846-0.161052351507j))*x[0] + ((0.424881564776-0.0923768161457j))*x[1]**o + ((-0.625743447379-0.365525663469j))*x[1]
            ref[(1, 1, 3)]=(0.24679234011+0.0384014504525j)-((0.153620040626+0.10056348598j))*(o-1.)
            arg[(1, 2, 0)]=(-0.164018378624-0.328036175278j)*x[0]**o + ((-0.556140239847+0.55830582197j))*x[0] + ((-0.777131029329+0.674938785785j))*x[1]**o + ((-0.630491118938-0.135500013852j))*x[1]
            ref[(1, 2, 0)]=(-1.06389038337+0.384854209313j)-((-0.156858234659+0.0578171017512j))*(o-1.)
            arg[(1, 2, 1)]=(0.261006945176-0.528772185687j)*x[0]**o + ((-0.770394494609+0.90285819483j))*x[0] + ((0.0608985549401-0.251264117365j))*x[1]**o + ((-0.542839722392+0.245276867952j))*x[1]
            ref[(1, 2, 1)]=(-0.495664358442+0.184049379865j)-((0.0536509166861-0.130006050509j))*(o-1.)
            arg[(1, 2, 2)]=(-0.281028953665-0.576338272793j)*x[0]**o + ((-0.946782719636-0.929011276189j))*x[0] + ((0.856994165666+0.447760896869j))*x[1]**o + ((-0.144449068796+0.0199137863127j))*x[1]
            ref[(1, 2, 2)]=(-0.257633288216-0.5188374329j)-((0.0959942020001-0.0214295626541j))*(o-1.)
            arg[(1, 2, 3)]=(0.387748467281-0.356190864917j)*x[0]**o + ((-0.946694339131-0.269937443305j))*x[0] + ((-0.728631265111+0.367875507122j))*x[1]**o + ((-0.934369353582-0.923719960119j))*x[1]
            ref[(1, 2, 3)]=(-1.11097324527-0.590986380609j)-((-0.0568137996384+0.00194744036756j))*(o-1.)
            arg[(1, 3, 0)]=(-0.895139288094-0.156605769819j)*x[0]**o + ((0.0668918458362+0.0395051872998j))*x[0] + ((-0.470510894928-0.318033173398j))*x[1]**o + ((-0.831854079875+0.0739972332655j))*x[1]
            ref[(1, 3, 0)]=(-1.06530620853-0.180568261326j)-((-0.227608363837-0.0791064905363j))*(o-1.)
            arg[(1, 3, 1)]=(-0.989094673313+0.907640784277j)*x[0]**o + ((-0.941707603467+0.269550756433j))*x[0] + ((-0.545080326738-0.947907754485j))*x[1]**o + ((-0.678102810448-0.220436771496j))*x[1]
            ref[(1, 3, 1)]=(-1.57699270698+0.00442350736417j)-((-0.255695833342-0.0067111617014j))*(o-1.)
            arg[(1, 3, 2)]=(0.0260037498309-0.00693456734958j)*x[0]**o + ((-0.641193454166+0.521525630206j))*x[0] + ((-0.364466922193-0.629617090633j))*x[1]**o + ((-0.598374905565+0.0493308972202j))*x[1]
            ref[(1, 3, 2)]=(-0.789015766047-0.0328475652778j)-((-0.0564105287271-0.106091942997j))*(o-1.)
            arg[(1, 3, 3)]=(0.520834195507-0.924704262987j)*x[0]**o + ((-0.492244864286-0.625265269275j))*x[0] + ((0.747117061532-0.413797591499j))*x[1]**o + ((0.67657476543+0.580515352266j))*x[1]
            ref[(1, 3, 3)]=(0.726140579092-0.691625885748j)-((0.211325209507-0.223083642414j))*(o-1.)
        else:
            arg[(0, 0, 0)]=(-0.401734869412+0.133712990472j)*x[0]**o + ((0.881672950366-0.383481654487j))*x[0] + ((-0.0417628427736+0.406905343798j))*x[1]**o + ((-0.381836151408-0.30902088641j))*x[1] + ((0.674061148317-0.55875537382j))*x[2]**o + ((0.0403110757959-0.607841582142j))*x[2]
            ref[(0, 0, 0)]=(0.385355655443-0.659240581294j)-((0.0384272393552-0.0030228399249j))*(o-1.)
            arg[(0, 0, 1)]=(0.349632848192+0.888233156092j)*x[0]**o + ((0.499600033765+0.503666398606j))*x[0] + ((0.261412377308+0.57704262656j))*x[1]**o + ((0.286437174085+0.296739680953j))*x[1] + ((-0.764063654504+0.844835848192j))*x[2]**o + ((-0.577751787755-0.802629348997j))*x[2]
            ref[(0, 0, 1)]=(0.0276334955453+1.1539441807j)-((-0.0255030715007+0.385018605141j))*(o-1.)
            arg[(0, 0, 2)]=(-0.498866320109-0.367915558274j)*x[0]**o + ((-0.676809772591-0.947515365931j))*x[0] + ((-0.774875171336+0.213653825847j))*x[1]**o + ((-0.82485156187+0.246490666402j))*x[1] + ((0.349670565913+0.0497773933995j))*x[2]**o + ((-0.989827516232+0.563502974067j))*x[2]
            ref[(0, 0, 2)]=(-1.70777988811-0.121003032245j)-((-0.154011820922-0.0174140565047j))*(o-1.)
            arg[(0, 0, 3)]=(0.958234943902+0.961157274076j)*x[0]**o + ((0.141323219664+0.849442254852j))*x[0] + ((-0.253171168606-0.494413516942j))*x[1]**o + ((-0.894908275135+0.415202789456j))*x[1] + ((-0.336077949851-0.103306552948j))*x[2]**o + ((-0.55447340895+0.839776836291j))*x[2]
            ref[(0, 0, 3)]=(-0.469536319488+1.23392954239j)-((0.0614976375741+0.0605728673643j))*(o-1.)
            arg[(0, 1, 0)]=(0.425730744576-0.795529874983j)*x[0]**o + ((0.519558014622-0.338516449875j))*x[0] + ((0.92195653222-0.631386168288j))*x[1]**o + ((0.0362846299126+0.16249220114j))*x[1] + ((-0.722621956918-0.817710241844j))*x[2]**o + ((0.23055633943+0.18183000996j))*x[2]
            ref[(0, 1, 0)]=(0.705732151922-1.11941026195j)-((0.104177553313-0.374104380853j))*(o-1.)
            arg[(0, 1, 1)]=(-0.606493826631-0.551866397272j)*x[0]**o + ((0.0439660767408-0.420041067094j))*x[0] + ((0.578895411363+0.470523258128j))*x[1]**o + ((-0.748433304136+0.0665659531745j))*x[1] + ((0.845609768185+0.916699935344j))*x[2]**o + ((0.0606654622918-0.381334983966j))*x[2]
            ref[(0, 1, 1)]=(0.0871047939071+0.0502733491566j)-((0.136335225486+0.1392261327j))*(o-1.)
            arg[(0, 1, 2)]=(0.130540625964-0.400781456742j)*x[0]**o + ((0.154562758743-0.345047720575j))*x[0] + ((-0.755395863761-0.520136884006j))*x[1]**o + ((-0.959567667246+0.123687941658j))*x[1] + ((-0.832972357987-0.488711268017j))*x[2]**o + ((0.529403392169-0.794514418426j))*x[2]
            ref[(0, 1, 2)]=(-0.866714556059-1.21275190305j)-((-0.242971265964-0.234938268128j))*(o-1.)
            arg[(0, 1, 3)]=(-0.590412292499+0.00598752483169j)*x[0]**o + ((-0.0614929195338-0.432508474917j))*x[0] + ((0.738177948769-0.0957870169193j))*x[1]**o + ((-0.370805084311-0.251505102698j))*x[1] + ((0.197774319836+0.344728730813j))*x[2]**o + ((-0.896642004158-0.561612623948j))*x[2]
            ref[(0, 1, 3)]=(-0.491700015949-0.495348481419j)-((0.0575899960176+0.0424882064543j))*(o-1.)
            arg[(0, 2, 0)]=(0.405090624486+0.236136619296j)*x[0]**o + ((0.765201026323-0.206810663045j))*x[0] + ((0.900683209919+0.536837495306j))*x[1]**o + ((0.487709096289+0.393918234844j))*x[1] + ((-0.922602506713-0.616581650102j))*x[2]**o + ((0.280160159292-0.941744995796j))*x[2]
            ref[(0, 2, 0)]=(0.958120804799-0.299122479749j)-((0.0638618879488+0.0260654107501j))*(o-1.)
            arg[(0, 2, 1)]=(0.883355612331+0.138534652714j)*x[0]**o + ((0.154334451546-0.0846161121242j))*x[0] + ((-0.0726982309774+0.151247096306j))*x[1]**o + ((-0.0866389249933-0.203759446124j))*x[1] + ((-0.27511190749+0.516758646328j))*x[2]**o + ((0.842529549528-0.21663675025j))*x[2]
            ref[(0, 2, 1)]=(0.722885274972+0.150764043425j)-((0.0892575789774+0.134423399225j))*(o-1.)
            arg[(0, 2, 2)]=(-0.931949412801-0.351933528582j)*x[0]**o + ((-0.362035201047+0.106816805746j))*x[0] + ((0.443397363915+0.011094660583j))*x[1]**o + ((0.474930259669+0.100651046009j))*x[1] + ((0.118763111543+0.871539759411j))*x[2]**o + ((0.309422438663-0.398382411278j))*x[2]
            ref[(0, 2, 2)]=(0.0262642799709+0.169893165944j)-((-0.0616314895571+0.0884501485686j))*(o-1.)
            arg[(0, 2, 3)]=(-0.878072769374-0.440501330577j)*x[0]**o + ((-0.390815623927+0.399098289476j))*x[0] + ((0.848946019019-0.663486649862j))*x[1]**o + ((-0.651058264247-0.255049921307j))*x[1] + ((-0.950864025055-0.524389822987j))*x[2]**o + ((0.975199852166-0.309066960433j))*x[2]
            ref[(0, 2, 3)]=(-0.523332405709-0.896698197845j)-((-0.163331795902-0.271396300571j))*(o-1.)
            arg[(0, 3, 0)]=(-0.0668784350958+0.340780202661j)*x[0]**o + ((0.273069426651-0.647662109979j))*x[0] + ((-0.216976518924+0.366060344663j))*x[1]**o + ((0.358628144713+0.501132153774j))*x[1] + ((-0.589310185068-0.87193185157j))*x[2]**o + ((-0.0120301263212+0.654898033297j))*x[2]
            ref[(0, 3, 0)]=(-0.126748847022+0.171638386423j)-((-0.145527523181-0.0275152173744j))*(o-1.)
            arg[(0, 3, 1)]=(-0.584878098507+0.290439415211j)*x[0]**o + ((0.728734006924+0.149601972099j))*x[0] + ((-0.11041959156-0.565618893205j))*x[1]**o + ((0.918607574923+0.277458084333j))*x[1] + ((0.359801768671-0.975975094624j))*x[2]**o + ((-0.0161223151869-0.132389112685j))*x[2]
            ref[(0, 3, 1)]=(0.647861672632-0.478241814435j)-((-0.0559159868993-0.208525762103j))*(o-1.)
            arg[(0, 3, 2)]=(0.855737513399+0.205010646382j)*x[0]**o + ((-0.862843318819-0.881226856444j))*x[0] + ((-0.805782265148+0.274879748593j))*x[1]**o + ((0.253774230374-0.863819472062j))*x[1] + ((-0.9192000754+0.154245326863j))*x[2]**o + ((0.931669569498-0.549342168235j))*x[2]
            ref[(0, 3, 2)]=(-0.273322173048-0.830126387451j)-((-0.144874137858+0.105689286973j))*(o-1.)
            arg[(0, 3, 3)]=(0.729663244776+0.457629640377j)*x[0]**o + ((-0.376748942652-0.766677102049j))*x[0] + ((-0.119856675733+0.771910549786j))*x[1]**o + ((0.183219552512-0.268690477592j))*x[1] + ((0.797275832051+0.074578830531j))*x[2]**o + ((0.707185116105+0.328103690377j))*x[2]
            ref[(0, 3, 3)]=(0.96036906353+0.298427565715j)-((0.234513733516+0.217353170116j))*(o-1.)
            arg[(1, 0, 0)]=(-0.0643191758074-0.171587687991j)*x[0]**o + ((0.579170797583+0.970570890973j))*x[0] + ((-0.861333667596-0.832168340538j))*x[1]**o + ((-0.415981141398+0.512329384455j))*x[1] + ((-0.978253190151-0.201554791766j))*x[2]**o + ((0.337866928621-0.536964312578j))*x[2]
            ref[(1, 0, 0)]=(-0.701424724374-0.129687428723j)-((-0.317317672259-0.200885136716j))*(o-1.)
            arg[(1, 0, 1)]=(0.871529300977+0.668618435807j)*x[0]**o + ((0.794491718963-0.145662759951j))*x[0] + ((-0.634890054833+0.230203534486j))*x[1]**o + ((-0.00298051359801+0.961889737165j))*x[1] + ((0.676519585046+0.340197308722j))*x[2]**o + ((-0.593231007483-0.831948525937j))*x[2]
            ref[(1, 0, 1)]=(0.555719514536+0.611648865147j)-((0.152193138532+0.206503213169j))*(o-1.)
            arg[(1, 0, 2)]=(-0.345994338156+0.869001599432j)*x[0]**o + ((-0.749161592427+0.343782105234j))*x[0] + ((-0.00742584879243+0.065744843744j))*x[1]**o + ((-0.845155357849+0.982595866439j))*x[1] + ((0.673110876905-0.836711647615j))*x[2]**o + ((-0.283816706065+0.188826867271j))*x[2]
            ref[(1, 0, 2)]=(-0.779221483192+0.806619817252j)-((0.0532817816595+0.0163391325936j))*(o-1.)
            arg[(1, 0, 3)]=(0.840931272089-0.29361642351j)*x[0]**o + ((-0.286948752899-0.838600641197j))*x[0] + ((-0.39977959273+0.36422980269j))*x[1]**o + ((0.158716545705-0.363348103549j))*x[1] + ((-0.798133795688-0.86569208576j))*x[2]**o + ((-0.507276763126-0.48572267692j))*x[2]
            ref[(1, 0, 3)]=(-0.496245543325-1.24137506412j)-((-0.0594970193882-0.132513117763j))*(o-1.)
            arg[(1, 1, 0)]=(0.19437187537+0.740874275467j)*x[0]**o + ((0.709361631473-0.260917472825j))*x[0] + ((0.020517745441+0.669769479967j))*x[1]**o + ((-0.590446449158-0.864763229875j))*x[1] + ((0.583828928594-0.453238609657j))*x[2]**o + ((0.210421833755-0.932462031542j))*x[2]
            ref[(1, 1, 0)]=(0.564027782737-0.550368794233j)-((0.133119758234+0.159567524296j))*(o-1.)
            arg[(1, 1, 1)]=(-0.621374899963-0.671720659358j)*x[0]**o + ((0.885716193263+0.123209933312j))*x[0] + ((-0.576225074511+0.757366256329j))*x[1]**o + ((0.362362828049-0.825201976764j))*x[1] + ((0.835745042685+0.339414549343j))*x[2]**o + ((0.839124874954+0.326167581965j))*x[2]
            ref[(1, 1, 1)]=(0.862674482238+0.0246178424129j)-((-0.0603091552982+0.070843357719j))*(o-1.)
            arg[(1, 1, 2)]=(-0.688514278622+0.975517558099j)*x[0]**o + ((-0.575867883681-0.446932551243j))*x[0] + ((-0.688877072167-0.366760923871j))*x[1]**o + ((0.786218913134-0.745416189581j))*x[1] + ((-0.0773455410559+0.359251896776j))*x[2]**o + ((-0.68680780045+0.345200982328j))*x[2]
            ref[(1, 1, 2)]=(-0.965596831421+0.0604303862537j)-((-0.242456148641+0.161334755167j))*(o-1.)
            arg[(1, 1, 3)]=(-0.456189046437+0.735105611277j)*x[0]**o + ((0.126075193919+0.412482683985j))*x[0] + ((0.783902113219-0.189246227462j))*x[1]**o + ((0.60914115181-0.742993387906j))*x[1] + ((-0.568317397656-0.889175163045j))*x[2]**o + ((-0.113599638931+0.59413976209j))*x[2]
            ref[(1, 1, 3)]=(0.190506187963-0.0398433605309j)-((-0.0401007218122-0.0572192965384j))*(o-1.)
            arg[(1, 2, 0)]=(-0.0222375366763-0.501283022134j)*x[0]**o + ((0.089191297346-0.262994154683j))*x[0] + ((-0.806722927438+0.574018186891j))*x[1]**o + ((0.260145690096+0.479867929672j))*x[1] + ((-0.994115030615-0.49782196276j))*x[2]**o + ((0.243902558378-0.634613664289j))*x[2]
            ref[(1, 2, 0)]=(-0.614917974455-0.421413343652j)-((-0.303845915788-0.0708477996672j))*(o-1.)
            arg[(1, 2, 1)]=(0.305782991559-0.899007495725j)*x[0]**o + ((-0.0179758587062-0.617981013917j))*x[0] + ((0.919738091274-0.132490964572j))*x[1]**o + ((0.0185593420901+0.233450087509j))*x[1] + ((0.270676962225-0.198030452688j))*x[2]**o + ((-0.95141194232-0.663134856172j))*x[2]
            ref[(1, 2, 1)]=(0.272684793061-1.13859734778j)-((0.249366340843-0.204921485498j))*(o-1.)
            arg[(1, 2, 2)]=(-0.255478415064-0.229609624122j)*x[0]**o + ((0.220147327467-0.561200477118j))*x[0] + ((0.0240954308025+0.443406837689j))*x[1]**o + ((0.787227541884-0.622797098279j))*x[1] + ((0.141691597923-0.0341774126645j))*x[2]**o + ((-0.176631976354+0.481382550432j))*x[2]
            ref[(1, 2, 2)]=(0.370525753329-0.261497612032j)-((-0.0149485643898+0.0299366334836j))*(o-1.)
            arg[(1, 2, 3)]=(0.40705270306-0.3688676048j)*x[0]**o + ((0.457579867858+0.401506709427j))*x[0] + ((-0.332482264433-0.0261258025079j))*x[1]**o + ((0.693094578647-0.701567770706j))*x[1] + ((-0.914631630177-0.925883178393j))*x[2]**o + ((0.143516091368-0.223171953494j))*x[2]
            ref[(1, 2, 3)]=(0.227064673161-0.922054800237j)-((-0.140010198592-0.220146097617j))*(o-1.)
            arg[(1, 3, 0)]=(-0.904988745096-0.528256214398j)*x[0]**o + ((0.916886993883+0.699925936658j))*x[0] + ((-0.704630949638+0.149763165413j))*x[1]**o + ((0.435281849084+0.705769681993j))*x[1] + ((0.606683379196-0.52302763452j))*x[2]**o + ((0.364576736119+0.828710980998j))*x[2]
            ref[(1, 3, 0)]=(0.356904631774+0.666442958072j)-((-0.16715605259-0.150253447251j))*(o-1.)
            arg[(1, 3, 1)]=(0.360828488943+0.38694081032j)*x[0]**o + ((0.940356206764-0.4809483609j))*x[0] + ((0.241795211649-0.820590920649j))*x[1]**o + ((0.493353774993-0.0283959265751j))*x[1] + ((-0.110222895347+0.279342894869j))*x[2]**o + ((0.549626546355-0.0515744850732j))*x[2]
            ref[(1, 3, 1)]=(1.23786866668-0.357612994004j)-((0.0820668008742-0.0257178692432j))*(o-1.)
            arg[(1, 3, 2)]=(0.798891570703-0.765111047699j)*x[0]**o + ((0.531812136129+0.508578910144j))*x[0] + ((0.181024056808-0.64203204643j))*x[1]**o + ((-0.971577289891+0.154825594792j))*x[1] + ((-0.839212878432+0.787375326195j))*x[2]**o + ((-0.392925155405+0.468074510929j))*x[2]
            ref[(1, 3, 2)]=(-0.345993780044+0.255855623966j)-((0.0234504581798-0.103294627989j))*(o-1.)
            arg[(1, 3, 3)]=(0.605911477289+0.417713783439j)*x[0]**o + ((0.91851210423-0.762614379973j))*x[0] + ((-0.901808973626+0.798757408792j))*x[1]**o + ((0.976352474909+0.791835111905j))*x[1] + ((0.671267149908-0.227590556846j))*x[2]**o + ((-0.99171171157+0.908074190785j))*x[2]
            ref[(1, 3, 3)]=(0.639261260569+0.963087779051j)-((0.0625616089283+0.164813439231j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3, 4),w)
        ref=numpy.zeros((3, 4, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.590972508684-0.822450732153j)*x[0]**o + ((0.208953921563-0.694248039721j))*x[0] + ((0.221871190203+0.955174614773j))*x[1]**o + ((-0.638719063152-0.777407160252j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.399433230035-0.669465658676j)-((-0.0615168864135+0.0221206471033j))*(o-1.)
            arg[(0, 0, 0, 1)]=(-0.280236491134+0.476660355271j)*x[0]**o + ((0.196599521786-0.907450387207j))*x[0] + ((-0.892860061536-0.130474843427j))*x[1]**o + ((0.450674734773+0.90927613887j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.262911148055+0.174005631753j)-((-0.195516092112+0.0576975853074j))*(o-1.)
            arg[(0, 0, 0, 2)]=(0.690373586249-0.630182807555j)*x[0]**o + ((-0.351256082561-0.612896236662j))*x[0] + ((-0.799698084037-0.950031329505j))*x[1]**o + ((-0.645526056655-0.987205461621j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.553053318502-1.59015791767j)-((-0.0182207496312-0.263369022843j))*(o-1.)
            arg[(0, 0, 0, 3)]=(-0.329941894199-0.574247303746j)*x[0]**o + ((0.716229379859+0.388282195564j))*x[0] + ((0.64722816344+0.214556676181j))*x[1]**o + ((-0.112910526458+0.322898959272j))*x[1]
            ref[(0, 0, 0, 3)]=(0.460302561321+0.175745263636j)-((0.0528810448734-0.0599484379275j))*(o-1.)
            arg[(0, 0, 1, 0)]=(-0.273475033147-0.647691894633j)*x[0]**o + ((-0.645781599768-0.877437498527j))*x[0] + ((-0.755578213043+0.15857646112j))*x[1]**o + ((-0.921815620747-0.459848386085j))*x[1]
            ref[(0, 0, 1, 0)]=(-1.29832523335-0.913200659062j)-((-0.171508874365-0.0815192389189j))*(o-1.)
            arg[(0, 0, 1, 1)]=(0.0693925474167+0.439051549336j)*x[0]**o + ((0.0920831201352-0.278658516137j))*x[0] + ((-0.51126311732+0.52267107054j))*x[1]**o + ((-0.986789980459-0.650346168231j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.668288715114+0.0163589677537j)-((-0.073645094984+0.160287103313j))*(o-1.)
            arg[(0, 0, 1, 2)]=(-0.555290519702-0.561360499752j)*x[0]**o + ((0.726179900006-0.914174331628j))*x[0] + ((-0.134848339371-0.566077682573j))*x[1]**o + ((0.373931334982+0.0210745970819j))*x[1]
            ref[(0, 0, 1, 2)]=(0.204986187958-1.01026895844j)-((-0.115023143179-0.187906363721j))*(o-1.)
            arg[(0, 0, 1, 3)]=(-0.692203405097-0.318793018997j)*x[0]**o + ((0.215101541276-0.519795637036j))*x[0] + ((0.342328439182+0.312396599647j))*x[1]**o + ((-0.566709321203+0.772662056524j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.350741372921+0.123235000069j)-((-0.0583124943193-0.00106606989169j))*(o-1.)
            arg[(0, 0, 2, 0)]=(0.443867585929+0.995208086004j)*x[0]**o + ((-0.748261570886+0.766614425625j))*x[0] + ((-0.600592078715-0.611735176714j))*x[1]**o + ((-0.00182072183282+0.250200039241j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.453403392753+0.700143687078j)-((-0.0261207487977+0.0639121515482j))*(o-1.)
            arg[(0, 0, 2, 1)]=(-0.16901258052-0.965953538828j)*x[0]**o + ((-0.0556830763216+0.328818893199j))*x[0] + ((-0.73646030283+0.179133954161j))*x[1]**o + ((0.574222861551-0.393067972697j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.193466549061-0.425534332082j)-((-0.150912147225-0.131136597444j))*(o-1.)
            arg[(0, 0, 2, 2)]=(0.0151316896525-0.359492437725j)*x[0]**o + ((0.287087075669+0.616300577036j))*x[0] + ((-0.455169034418-0.630211334758j))*x[1]**o + ((-0.825425882645+0.837004150652j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.489188075871+0.231800477603j)-((-0.073339557461-0.164950628747j))*(o-1.)
            arg[(0, 0, 2, 3)]=(-0.192293801854+0.86807391635j)*x[0]**o + ((-0.132259454265+0.263565261862j))*x[0] + ((0.798618265683+0.0271989508749j))*x[1]**o + ((0.863553485702-0.231166967307j))*x[1]
            ref[(0, 0, 2, 3)]=(0.668809247634+0.46383558089j)-((0.101054077305+0.149212144538j))*(o-1.)
            arg[(0, 1, 0, 0)]=(-0.301524708509+0.544783262704j)*x[0]**o + ((-0.183668298134+0.134039326062j))*x[0] + ((0.392439017436+0.722669963959j))*x[1]**o + ((-0.116983618525+0.701791204352j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.104868803866+1.05164187854j)-((0.0151523848212+0.211242204444j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.0577999514479+0.554123040913j)*x[0]**o + ((-0.4388916663+0.456522106016j))*x[0] + ((-0.496185637341-0.569144952454j))*x[1]**o + ((-0.798198044658-0.901936403071j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.837737698425-0.230218104298j)-((-0.0730642809821-0.00250365192343j))*(o-1.)
            arg[(0, 1, 0, 2)]=(0.244348075208+0.450661384618j)*x[0]**o + ((-0.538598561994-0.232743790518j))*x[0] + ((-0.702999478417+0.572030725825j))*x[1]**o + ((-0.98879345458-0.535082212752j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.993021709892+0.127433053586j)-((-0.0764419005349+0.170448685074j))*(o-1.)
            arg[(0, 1, 0, 3)]=(0.0527322613762+0.0134977719832j)*x[0]**o + ((-0.342543860356-0.0852022513124j))*x[0] + ((0.899760575312-0.422234108773j))*x[1]**o + ((0.803304082881-0.340495607122j))*x[1]
            ref[(0, 1, 0, 3)]=(0.706626529607-0.417217097612j)-((0.158748806115-0.0681227227983j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.106163387477+0.567045586519j)*x[0]**o + ((0.66675790806+0.491132470636j))*x[0] + ((0.726238064331-0.289295367974j))*x[1]**o + ((-0.998268140248-0.111766681491j))*x[1]
            ref[(0, 1, 1, 0)]=(0.144282222333+0.328558003845j)-((0.103345779476+0.0462917030907j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.993622474745-0.727562485074j)*x[0]**o + ((0.706293189663-0.510515903588j))*x[0] + ((-0.662913268961+0.894456245225j))*x[1]**o + ((0.953185054575+0.12339319555j))*x[1]
            ref[(0, 1, 1, 1)]=(0.0014712502657-0.110114473944j)-((-0.276089290618+0.0278156266918j))*(o-1.)
            arg[(0, 1, 1, 2)]=(-0.258344250641+0.82023109646j)*x[0]**o + ((0.781189328073-0.197639877958j))*x[0] + ((-0.00802802325832-0.289031934972j))*x[1]**o + ((-0.903691695816+0.264806210773j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.194437320821+0.299182747151j)-((-0.0443953789832+0.0885331935812j))*(o-1.)
            arg[(0, 1, 1, 3)]=(-0.792428409448+0.746623600479j)*x[0]**o + ((0.778982421572-0.15844747307j))*x[0] + ((-0.390973015533-0.370693724548j))*x[1]**o + ((0.667402919258+0.934859335987j))*x[1]
            ref[(0, 1, 1, 3)]=(0.131491957925+0.576170869424j)-((-0.19723357083+0.0626549793218j))*(o-1.)
            arg[(0, 1, 2, 0)]=(0.727572070514-0.961311078024j)*x[0]**o + ((0.0463866001966+0.976267541557j))*x[0] + ((-0.960560745488+0.709570169958j))*x[1]**o + ((0.83341173377-0.581648717635j))*x[1]
            ref[(0, 1, 2, 0)]=(0.323404829496+0.0714389579283j)-((-0.0388314458291-0.0419568180109j))*(o-1.)
            arg[(0, 1, 2, 1)]=(0.365750718659+0.256619474196j)*x[0]**o + ((0.340246560974+0.734365102286j))*x[0] + ((0.500442190599-0.458709063136j))*x[1]**o + ((-0.474565650014-0.258522453209j))*x[1]
            ref[(0, 1, 2, 1)]=(0.365936910109+0.136876530069j)-((0.144365484876-0.0336815981566j))*(o-1.)
            arg[(0, 1, 2, 2)]=(-0.628628087192-0.25217504208j)*x[0]**o + ((0.420444137519+0.557546136168j))*x[0] + ((-0.0775672570496+0.12419568553j))*x[1]**o + ((0.0513939344826+0.475058764095j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.11717863612+0.452312771857j)-((-0.11769922404-0.0213298927583j))*(o-1.)
            arg[(0, 1, 2, 3)]=(0.256788456674+0.195035346638j)*x[0]**o + ((-0.570188611288-0.643110854273j))*x[0] + ((0.608587116733-0.991782426934j))*x[1]**o + ((0.636243880675+0.0765082224796j))*x[1]
            ref[(0, 1, 2, 3)]=(0.465715421396-0.681674856045j)-((0.144229262234-0.132791180049j))*(o-1.)
            arg[(0, 2, 0, 0)]=(0.21257844534-0.216456051664j)*x[0]**o + ((0.525453430182+0.49915087931j))*x[0] + ((-0.0650482788096+0.83901216145j))*x[1]**o + ((-0.823428323883-0.642572920971j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.0752223635856+0.239567034062j)-((0.0245883610884+0.103759351631j))*(o-1.)
            arg[(0, 2, 0, 1)]=(-0.911044742499-0.80038553065j)*x[0]**o + ((0.490279485401-0.770913277338j))*x[0] + ((-0.95155490394-0.619888411165j))*x[1]**o + ((0.158011232301-0.44062406578j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.607154464369-1.31590564247j)-((-0.310433274407-0.236712323636j))*(o-1.)
            arg[(0, 2, 0, 2)]=(-0.131281704919+0.977523466499j)*x[0]**o + ((0.543531608778-0.905177508631j))*x[0] + ((-0.253204946968-0.76717555276j))*x[1]**o + ((0.0247841287708+0.337137268594j))*x[1]
            ref[(0, 2, 0, 2)]=(0.0919145428305-0.178846163149j)-((-0.0640811086479+0.0350579856232j))*(o-1.)
            arg[(0, 2, 0, 3)]=(-0.609385058045-0.592030910538j)*x[0]**o + ((0.975225370259+0.806750023211j))*x[0] + ((0.744019693767+0.0696235807047j))*x[1]**o + ((-0.328545741189-0.675681763363j))*x[1]
            ref[(0, 2, 0, 3)]=(0.390657132396-0.195669534992j)-((0.0224391059537-0.0870678883055j))*(o-1.)
            arg[(0, 2, 1, 0)]=(0.497126035092+0.236613573802j)*x[0]**o + ((-0.156633781395+0.890473560045j))*x[0] + ((-0.252655859266+0.805864691371j))*x[1]**o + ((-0.473910075816-0.605748084688j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.193036840693+0.663601870265j)-((0.0407450293043+0.173746377529j))*(o-1.)
            arg[(0, 2, 1, 1)]=(-0.164842614898-0.420044999335j)*x[0]**o + ((-0.570205969403+0.500715400592j))*x[0] + ((-0.151087820541+0.473315150228j))*x[1]**o + ((0.87998342944+0.731792101069j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.0030764877011+0.642888826278j)-((-0.0526550725731+0.00887835848224j))*(o-1.)
            arg[(0, 2, 1, 2)]=(-0.511869831858-0.533852454717j)*x[0]**o + ((0.49510787568+0.511826872278j))*x[0] + ((0.236669033721+0.136966664225j))*x[1]**o + ((-0.473135258526-0.192204331162j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.126614090491-0.0386316246877j)-((-0.0458667996895-0.0661476317487j))*(o-1.)
            arg[(0, 2, 1, 3)]=(0.00255094241351-0.275998884839j)*x[0]**o + ((-0.481001064986+0.0465841303206j))*x[0] + ((-0.110642401302-0.42401488921j))*x[1]**o + ((-0.411402601182+0.685450152691j))*x[1]
            ref[(0, 2, 1, 3)]=(-0.500247562528+0.0160102544809j)-((-0.0180152431481-0.116668962342j))*(o-1.)
            arg[(0, 2, 2, 0)]=(-0.653822880255-0.93130700421j)*x[0]**o + ((-0.567073409746+0.638853187277j))*x[0] + ((-0.0641717239666-0.321437924969j))*x[1]**o + ((0.286384467651+0.992665816919j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.499341773158+0.189387037509j)-((-0.11966576737-0.20879082153j))*(o-1.)
            arg[(0, 2, 2, 1)]=(0.670256768485+0.477549929525j)*x[0]**o + ((-0.603058158058+0.21563967805j))*x[0] + ((0.999574899552+0.872258792209j))*x[1]**o + ((-0.983974531432+0.325793651952j))*x[1]
            ref[(0, 2, 2, 1)]=(0.0413994892736+0.945621025868j)-((0.278305278006+0.224968120289j))*(o-1.)
            arg[(0, 2, 2, 2)]=(-0.435230886678-0.83897412114j)*x[0]**o + ((0.205684839097+0.500681906335j))*x[0] + ((0.392370697027-0.790429007851j))*x[1]**o + ((-0.305257441202+0.673177647234j))*x[1]
            ref[(0, 2, 2, 2)]=(-0.0712163958784-0.227771787711j)-((-0.00714336494192-0.271567188165j))*(o-1.)
            arg[(0, 2, 2, 3)]=(0.656130382364+0.442646747193j)*x[0]**o + ((0.438353218387-0.268242717472j))*x[0] + ((-0.992301797807-0.63452325957j))*x[1]**o + ((0.350499347238-0.521065068446j))*x[1]
            ref[(0, 2, 2, 3)]=(0.226340575091-0.490592149148j)-((-0.0560285692404-0.0319794187295j))*(o-1.)
            arg[(0, 3, 0, 0)]=(-0.644621825903-0.796785734733j)*x[0]**o + ((0.159223517429-0.865706144619j))*x[0] + ((-0.944633012465+0.953587075128j))*x[1]**o + ((-0.457564014144-0.605465535433j))*x[1]
            ref[(0, 3, 0, 0)]=(-0.943797667542-0.657185169829j)-((-0.264875806395+0.0261335567325j))*(o-1.)
            arg[(0, 3, 0, 1)]=(0.256006360031-0.381518883019j)*x[0]**o + ((-0.695903705435+0.205000589189j))*x[0] + ((0.357933535566-0.925341970533j))*x[1]**o + ((0.494649933419+0.639877093198j))*x[1]
            ref[(0, 3, 0, 1)]=(0.20634306179-0.230991585583j)-((0.102323315933-0.217810142259j))*(o-1.)
            arg[(0, 3, 0, 2)]=(0.365617835361-0.861765914459j)*x[0]**o + ((-0.755853852811+0.469444106737j))*x[0] + ((-0.413040193782-0.0084044599126j))*x[1]**o + ((0.339949934282+0.649077293883j))*x[1]
            ref[(0, 3, 0, 2)]=(-0.231663138475+0.124175513124j)-((-0.00790372640338-0.145028395729j))*(o-1.)
            arg[(0, 3, 0, 3)]=(0.78514446585-0.488310753779j)*x[0]**o + ((0.850866164669+0.413295010975j))*x[0] + ((0.347607500227+0.4258920733j))*x[1]**o + ((-0.752449876286-0.491922481814j))*x[1]
            ref[(0, 3, 0, 3)]=(0.61558412723-0.0705230756593j)-((0.188791994346-0.0104031134132j))*(o-1.)
            arg[(0, 3, 1, 0)]=(0.674501733225+0.40657453438j)*x[0]**o + ((-0.103091121493+0.726698184175j))*x[0] + ((0.69823177329+0.889128151922j))*x[1]**o + ((-0.900621627376+0.738694248009j))*x[1]
            ref[(0, 3, 1, 0)]=(0.184510378823+1.38054755924j)-((0.228788917752+0.215950447717j))*(o-1.)
            arg[(0, 3, 1, 1)]=(0.765934944851-0.824888278308j)*x[0]**o + ((0.596781206417+0.0564415650618j))*x[0] + ((-0.154761975317+0.909236316388j))*x[1]**o + ((-0.188118992233+0.674282956999j))*x[1]
            ref[(0, 3, 1, 1)]=(0.509917591859+0.40753628007j)-((0.101862161589+0.0140580063467j))*(o-1.)
            arg[(0, 3, 1, 2)]=(-0.882871543664+0.982828250646j)*x[0]**o + ((0.857362149886-0.335275120149j))*x[0] + ((-0.473561495501-0.726281052304j))*x[1]**o + ((-0.765533184119-0.888214172066j))*x[1]
            ref[(0, 3, 1, 2)]=(-0.632302036699-0.483471046936j)-((-0.226072173194+0.0427578663904j))*(o-1.)
            arg[(0, 3, 1, 3)]=(-0.30960663386+0.239886390657j)*x[0]**o + ((0.248911174242-0.908228407632j))*x[0] + ((0.132403090894+0.708051519436j))*x[1]**o + ((0.302886608997-0.642990736522j))*x[1]
            ref[(0, 3, 1, 3)]=(0.187297120137-0.30164061703j)-((-0.0295339238276+0.157989651682j))*(o-1.)
            arg[(0, 3, 2, 0)]=(0.892635305404+0.624829802617j)*x[0]**o + ((-0.00345732809393-0.337407018317j))*x[0] + ((-0.193949443806-0.17562612086j))*x[1]**o + ((0.0226267208966+0.479700737267j))*x[1]
            ref[(0, 3, 2, 0)]=(0.3589276272+0.295748700354j)-((0.1164476436+0.0748672802929j))*(o-1.)
            arg[(0, 3, 2, 1)]=(-0.131221514814-0.414234576337j)*x[0]**o + ((0.958305803016-0.726070473768j))*x[0] + ((0.861951672033+0.206896343077j))*x[1]**o + ((-0.152265298862+0.501879315175j))*x[1]
            ref[(0, 3, 2, 1)]=(0.768385330686-0.215764695926j)-((0.121788359536-0.0345563722099j))*(o-1.)
            arg[(0, 3, 2, 2)]=(0.573346210812-0.45997221066j)*x[0]**o + ((0.109096948052-0.916089063574j))*x[0] + ((0.671536978887+0.0499825448767j))*x[1]**o + ((-0.929204072315-0.669406554841j))*x[1]
            ref[(0, 3, 2, 2)]=(0.212388032718-0.997742642099j)-((0.207480531617-0.0683316109638j))*(o-1.)
            arg[(0, 3, 2, 3)]=(-0.203073070828-0.319349322454j)*x[0]**o + ((-0.691150967589+0.593060838864j))*x[0] + ((0.812055016515+0.644745706248j))*x[1]**o + ((0.076273147704-0.852826161933j))*x[1]
            ref[(0, 3, 2, 3)]=(-0.00294793709934+0.0328155303621j)-((0.101496990948+0.0542327306323j))*(o-1.)
            arg[(1, 0, 0, 0)]=(0.838202250955+0.875839608537j)*x[0]**o + ((0.850326017154-0.670129215947j))*x[0] + ((0.151003336407+0.75831043979j))*x[1]**o + ((0.268764929254-0.243401630181j))*x[1]
            ref[(1, 0, 0, 0)]=(1.05414826688+0.360309601099j)-((0.164867597894+0.272358341388j))*(o-1.)
            arg[(1, 0, 0, 1)]=(-0.550328806877+0.950337102202j)*x[0]**o + ((0.268810472445-0.928658502116j))*x[0] + ((0.459686784682-0.929087112669j))*x[1]**o + ((-0.813814284049-0.743606689952j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.317822916899-0.825507601267j)-((-0.0151070036991+0.00354166492216j))*(o-1.)
            arg[(1, 0, 0, 2)]=(-0.39571024873-0.533131987694j)*x[0]**o + ((0.0827693005885-0.34743768613j))*x[0] + ((0.531499015933-0.190806069924j))*x[1]**o + ((-0.465182782158-0.37233601623j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.123312357183-0.721855879989j)-((0.0226314612006-0.120656342936j))*(o-1.)
            arg[(1, 0, 0, 3)]=(-0.342490292531-0.806074512225j)*x[0]**o + ((0.236379125824+0.221964797227j))*x[0] + ((-0.749022061067-0.270486681099j))*x[1]**o + ((-0.331587426846+0.735755974323j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.59336032731-0.0594202108873j)-((-0.1819187256-0.179426865554j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.949264746381-0.953262910339j)*x[0]**o + ((-0.379661086476+0.566725970598j))*x[0] + ((0.155263260614+0.882015731548j))*x[1]**o + ((0.930491780361+0.893272546452j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.121585395941+0.69437566913j)-((-0.132333580961-0.0118745297985j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.759375519066+0.381538538781j)*x[0]**o + ((0.174135468356-0.130859541493j))*x[0] + ((-0.581010122779-0.108726429384j))*x[1]**o + ((0.356663356911-0.442611497698j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.404793408289-0.150329464897j)-((-0.223397606974+0.0454686848995j))*(o-1.)
            arg[(1, 0, 1, 2)]=(-0.25202117632-0.30948576478j)*x[0]**o + ((0.764423088578-0.235318114396j))*x[0] + ((0.970746433367-0.125409687847j))*x[1]**o + ((0.460555376828+0.63256162973j))*x[1]
            ref[(1, 0, 1, 2)]=(0.971851861226-0.0188259686463j)-((0.119787542841-0.0724825754379j))*(o-1.)
            arg[(1, 0, 1, 3)]=(-0.145439564368-0.332057904523j)*x[0]**o + ((-0.750302024562-0.0365878863223j))*x[0] + ((-0.938550060085-0.0900614430287j))*x[1]**o + ((-0.111412168858+0.730089522918j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.972851908937+0.135691144522j)-((-0.180664937409-0.0703532245919j))*(o-1.)
            arg[(1, 0, 2, 0)]=(0.106196057034+0.677239981692j)*x[0]**o + ((-0.713937282016-0.467828987084j))*x[0] + ((0.726381167383+0.0879140424233j))*x[1]**o + ((0.206733945078-0.55607353566j))*x[1]
            ref[(1, 0, 2, 0)]=(0.16268694374-0.129374249315j)-((0.138762870736+0.127525670686j))*(o-1.)
            arg[(1, 0, 2, 1)]=(-0.124544934667+0.633534855314j)*x[0]**o + ((0.322998624588+0.348636092646j))*x[0] + ((-0.340733758431+0.00790186418867j))*x[1]**o + ((0.166694261585-0.0673211013548j))*x[1]
            ref[(1, 0, 2, 1)]=(0.0122070965375+0.461375855397j)-((-0.0775464488497+0.106906119917j))*(o-1.)
            arg[(1, 0, 2, 2)]=(-0.405485741097-0.0760992638797j)*x[0]**o + ((0.328185320611+0.753324632414j))*x[0] + ((0.415161526834-0.810939089376j))*x[1]**o + ((0.749935439629+0.898307823988j))*x[1]
            ref[(1, 0, 2, 2)]=(0.543898272988+0.382297051573j)-((0.00161263095618-0.147839725543j))*(o-1.)
            arg[(1, 0, 2, 3)]=(-0.931932607959+0.974573878891j)*x[0]**o + ((-0.829026554916-0.414805452387j))*x[0] + ((-0.0417892159307-0.323767967338j))*x[1]**o + ((0.235417242262-0.973726702453j))*x[1]
            ref[(1, 0, 2, 3)]=(-0.783665568272-0.368863121644j)-((-0.162286970648+0.108467651926j))*(o-1.)
            arg[(1, 1, 0, 0)]=(-0.219546692957+0.285775775036j)*x[0]**o + ((0.0406057491157-0.382510083655j))*x[0] + ((0.25092387898+0.71361111473j))*x[1]**o + ((0.237911921698-0.480542688693j))*x[1]
            ref[(1, 1, 0, 0)]=(0.154947428419+0.068167058709j)-((0.00522953100388+0.166564481628j))*(o-1.)
            arg[(1, 1, 0, 1)]=(-0.310894262027-0.412788183619j)*x[0]**o + ((0.00470527451204+0.00185996774552j))*x[0] + ((0.850169163525-0.989689388723j))*x[1]**o + ((0.733275112243+0.205113443261j))*x[1]
            ref[(1, 1, 0, 1)]=(0.638627644126-0.597752080668j)-((0.0898791502496-0.233746262057j))*(o-1.)
            arg[(1, 1, 0, 2)]=(-0.328928984538+0.463315638169j)*x[0]**o + ((-0.226620418462-0.0864733035394j))*x[0] + ((-0.159223087713-0.844035623708j))*x[1]**o + ((-0.991444627281+0.325883787921j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.853108558997-0.0706547505787j)-((-0.0813586787085-0.0634533309232j))*(o-1.)
            arg[(1, 1, 0, 3)]=(-0.537596673376-0.361857135074j)*x[0]**o + ((-0.0911234866562-0.64652098446j))*x[0] + ((0.527641567157-0.0755391598981j))*x[1]**o + ((-0.914440518242+0.658045885708j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.507759555559-0.212935696862j)-((-0.00165918436989-0.0728993824953j))*(o-1.)
            arg[(1, 1, 1, 0)]=(0.708165052552+0.692037982393j)*x[0]**o + ((-0.993784015274-0.477829382095j))*x[0] + ((0.87634164926+0.820149770006j))*x[1]**o + ((-0.927888559521-0.4635231665j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.168582936491+0.285417601902j)-((0.264084450302+0.252031292067j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.837266523887-0.92642416467j)*x[0]**o + ((0.972253570021+0.16064748227j))*x[0] + ((0.949958689677-0.52743420058j))*x[1]**o + ((0.409527048604+0.206697030919j))*x[1]
            ref[(1, 1, 1, 1)]=(1.5845029161-0.54325692603j)-((0.297870868927-0.242309727542j))*(o-1.)
            arg[(1, 1, 1, 2)]=(0.401261432975+0.493377527529j)*x[0]**o + ((-0.0465369207552-0.359556613657j))*x[0] + ((0.743173020791+0.0794390831782j))*x[1]**o + ((0.125865778567+0.651647606532j))*x[1]
            ref[(1, 1, 1, 2)]=(0.611881655789+0.432453801791j)-((0.190739075628+0.0954694351178j))*(o-1.)
            arg[(1, 1, 1, 3)]=(-0.279151248724-0.506106526591j)*x[0]**o + ((0.122706915186+0.343449566692j))*x[0] + ((-0.719239392138+0.775059122147j))*x[1]**o + ((-0.54222056485-0.237612820879j))*x[1]
            ref[(1, 1, 1, 3)]=(-0.708952145263+0.187394670685j)-((-0.166398440144+0.0448254325926j))*(o-1.)
            arg[(1, 1, 2, 0)]=(-0.642306291434-0.541611923564j)*x[0]**o + ((-0.522173549459+0.428650828797j))*x[0] + ((0.959362942468+0.346519259605j))*x[1]**o + ((-0.827965042328-0.675005531747j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.516540970377-0.220723683454j)-((0.0528427751723-0.0325154439931j))*(o-1.)
            arg[(1, 1, 2, 1)]=(-0.817760102472+0.220753847064j)*x[0]**o + ((0.370003490556+0.126215458039j))*x[0] + ((0.216124758076+0.270601455048j))*x[1]**o + ((0.482370900181-0.372349384266j))*x[1]
            ref[(1, 1, 2, 1)]=(0.125369523171+0.122610687942j)-((-0.100272557399+0.081892550352j))*(o-1.)
            arg[(1, 1, 2, 2)]=(-0.930767463839+0.0582879413736j)*x[0]**o + ((-0.368507731457+0.653372878876j))*x[0] + ((0.751136666178-0.954965563822j))*x[1]**o + ((-0.612847215151-0.899709523139j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.580492872135-0.571507133356j)-((-0.0299384662769-0.149446270408j))*(o-1.)
            arg[(1, 1, 2, 3)]=(0.603489445837+0.845092819865j)*x[0]**o + ((0.873688394884-0.873763202143j))*x[0] + ((0.383600045588+0.121266871687j))*x[1]**o + ((-0.583833876281+0.330616932641j))*x[1]
            ref[(1, 1, 2, 3)]=(0.638472005014+0.211606711025j)-((0.164514915237+0.161059948592j))*(o-1.)
            arg[(1, 2, 0, 0)]=(-0.905242487865+0.812703371343j)*x[0]**o + ((-0.939292576321-0.509139490201j))*x[0] + ((0.412954688951+0.676216739278j))*x[1]**o + ((-0.0278766949754-0.094212094853j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.729728535106+0.442784262783j)-((-0.0820479664857+0.24815335177j))*(o-1.)
            arg[(1, 2, 0, 1)]=(-0.773527925464+0.25774671861j)*x[0]**o + ((0.530879594327+0.467614697345j))*x[0] + ((-0.69330751056+0.938327665863j))*x[1]**o + ((-0.112183319591-0.290778128662j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.524069580644+0.686455476578j)-((-0.244472572671+0.199345730745j))*(o-1.)
            arg[(1, 2, 0, 2)]=(-0.0969582296396+0.934111103328j)*x[0]**o + ((0.165520888709+0.998930959046j))*x[0] + ((-0.2674768795-0.645619916814j))*x[1]**o + ((0.599553713591-0.213046629529j))*x[1]
            ref[(1, 2, 0, 2)]=(0.20031974658+0.537187758016j)-((-0.0607391848566+0.0480818644191j))*(o-1.)
            arg[(1, 2, 0, 3)]=(0.782791039052-0.694713692693j)*x[0]**o + ((-0.608118483932-0.833823538281j))*x[0] + ((0.960613233389+0.617044716078j))*x[1]**o + ((0.561526485724+0.0552836452347j))*x[1]
            ref[(1, 2, 0, 3)]=(0.848406137116-0.428104434831j)-((0.29056737874-0.0129448294359j))*(o-1.)
            arg[(1, 2, 1, 0)]=(0.534977228469+0.0459405294363j)*x[0]**o + ((-0.483867116081+0.494204701179j))*x[0] + ((0.616101667041-0.199683407992j))*x[1]**o + ((-0.473823271091+0.44942550222j))*x[1]
            ref[(1, 2, 1, 0)]=(0.0966942541691+0.394943662422j)-((0.191846482585-0.0256238130926j))*(o-1.)
            arg[(1, 2, 1, 1)]=(0.862292529094+0.0246443917417j)*x[0]**o + ((-0.0098317225533+0.923703784211j))*x[0] + ((0.120728023676+0.59774790383j))*x[1]**o + ((0.897314627417+0.233407785941j))*x[1]
            ref[(1, 2, 1, 1)]=(0.935251728817+0.889751932862j)-((0.163836758795+0.103732049262j))*(o-1.)
            arg[(1, 2, 1, 2)]=(-0.947255470068+0.939858776321j)*x[0]**o + ((-0.158215211083-0.399611314021j))*x[0] + ((-0.36394283745-0.295653474822j))*x[1]**o + ((-0.794044391598-0.704671310141j))*x[1]
            ref[(1, 2, 1, 2)]=(-1.1317289551-0.230038661331j)-((-0.218533051253+0.10736755025j))*(o-1.)
            arg[(1, 2, 1, 3)]=(0.839760060673+0.306331107898j)*x[0]**o + ((-0.590157384418-0.607402624352j))*x[0] + ((-0.293902492871+0.68493748062j))*x[1]**o + ((-0.314431527198-0.145969742426j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.179365671907+0.11894811087j)-((0.0909762613005+0.16521143142j))*(o-1.)
            arg[(1, 2, 2, 0)]=(0.11392975587+0.149534297147j)*x[0]**o + ((-0.920148713043+0.333985290559j))*x[0] + ((0.901047634114-0.109159685558j))*x[1]**o + ((0.720152847223+0.195347754386j))*x[1]
            ref[(1, 2, 2, 0)]=(0.407490762082+0.284853828267j)-((0.169162898331+0.00672910193151j))*(o-1.)
            arg[(1, 2, 2, 1)]=(-0.163959941595-0.488765475575j)*x[0]**o + ((-0.519578315022+0.100980632015j))*x[0] + ((0.556576601666+0.558550341319j))*x[1]**o + ((0.565535969538-0.430767278839j))*x[1]
            ref[(1, 2, 2, 1)]=(0.219287157293-0.13000089054j)-((0.0654361100119+0.0116308109573j))*(o-1.)
            arg[(1, 2, 2, 2)]=(-0.801098901255-0.601498728355j)*x[0]**o + ((0.720763561763-0.955616382589j))*x[0] + ((-0.199390958424-0.960431453254j))*x[1]**o + ((-0.165237476295-0.00681515068495j))*x[1]
            ref[(1, 2, 2, 2)]=(-0.222481887106-1.26218085744j)-((-0.166748309947-0.260321696935j))*(o-1.)
            arg[(1, 2, 2, 3)]=(0.310341712108-0.94222897104j)*x[0]**o + ((-0.0444940036862+0.0108233157549j))*x[0] + ((0.682613492228-0.794055582765j))*x[1]**o + ((0.113570292154+0.149587891784j))*x[1]
            ref[(1, 2, 2, 3)]=(0.531015746402-0.787936673134j)-((0.165492534056-0.289380758968j))*(o-1.)
            arg[(1, 3, 0, 0)]=(0.350140639127-0.234445416244j)*x[0]**o + ((-0.167155584285+0.448373612074j))*x[0] + ((0.555302074399+0.427769924856j))*x[1]**o + ((0.46990701609-0.0614509885765j))*x[1]
            ref[(1, 3, 0, 0)]=(0.604097072665+0.290123566055j)-((0.150907118921+0.0322207514353j))*(o-1.)
            arg[(1, 3, 0, 1)]=(0.412098614964-0.816142772452j)*x[0]**o + ((-0.565907861681+0.952593957981j))*x[0] + ((-0.554742692897+0.140259087006j))*x[1]**o + ((-0.744779312905+0.507410100949j))*x[1]
            ref[(1, 3, 0, 1)]=(-0.726665626259+0.392060186742j)-((-0.0237740129888-0.112647280908j))*(o-1.)
            arg[(1, 3, 0, 2)]=(-0.570474489801-0.753205137568j)*x[0]**o + ((-0.511459224659+0.794800660287j))*x[0] + ((-0.646213938724-0.202734469926j))*x[1]**o + ((-0.0290023861108-0.98844585158j))*x[1]
            ref[(1, 3, 0, 2)]=(-0.878575019647-0.574792399394j)-((-0.202781404754-0.159323267916j))*(o-1.)
            arg[(1, 3, 0, 3)]=(0.423016158501+0.646163545939j)*x[0]**o + ((0.83193631428-0.184217116998j))*x[0] + ((-0.255918849531+0.609193174754j))*x[1]**o + ((-0.737716059553-0.416837917507j))*x[1]
            ref[(1, 3, 0, 3)]=(0.130658781849+0.327150843094j)-((0.0278495514951+0.209226120116j))*(o-1.)
            arg[(1, 3, 1, 0)]=(-0.617872193754+0.552052166356j)*x[0]**o + ((0.055388092518+0.260224778476j))*x[0] + ((-0.518656927385+0.626504488674j))*x[1]**o + ((-0.871778675627-0.0818226037849j))*x[1]
            ref[(1, 3, 1, 0)]=(-0.976459852124+0.67847941486j)-((-0.18942152019+0.196426109172j))*(o-1.)
            arg[(1, 3, 1, 1)]=(-0.0230883480076-0.134734722421j)*x[0]**o + ((0.585588318099-0.728856908633j))*x[0] + ((0.302610985565-0.247002982519j))*x[1]**o + ((0.614820137198-0.681830629506j))*x[1]
            ref[(1, 3, 1, 1)]=(0.739965546427-0.89621262154j)-((0.0465871062596-0.0636229508233j))*(o-1.)
            arg[(1, 3, 1, 2)]=(0.278225064509+0.341980022638j)*x[0]**o + ((-0.417968577649+0.951388271534j))*x[0] + ((0.768475476014-0.914125830932j))*x[1]**o + ((-0.177186532597+0.967334053992j))*x[1]
            ref[(1, 3, 1, 2)]=(0.225772715138+0.673288258616j)-((0.174450090087-0.0953576347157j))*(o-1.)
            arg[(1, 3, 1, 3)]=(-0.0360859001564-0.583449232441j)*x[0]**o + ((0.830505627318+0.994814663001j))*x[0] + ((0.285744428049-0.180331259129j))*x[1]**o + ((-0.71474210227+0.0130666607672j))*x[1]
            ref[(1, 3, 1, 3)]=(0.18271102647+0.122050416099j)-((0.0416097546488-0.127296748595j))*(o-1.)
            arg[(1, 3, 2, 0)]=(0.863931157674-0.386595001686j)*x[0]**o + ((-0.735879790437-0.47262513633j))*x[0] + ((0.833860927921-0.270836950185j))*x[1]**o + ((0.79232292769+0.364061448293j))*x[1]
            ref[(1, 3, 2, 0)]=(0.877117611424-0.382997819954j)-((0.282965347599-0.109571991979j))*(o-1.)
            arg[(1, 3, 2, 1)]=(-0.444195641739+0.703833348732j)*x[0]**o + ((-0.318610834382-0.0728939097405j))*x[0] + ((0.553515672494-0.805469986204j))*x[1]**o + ((0.876692597236-0.312765851395j))*x[1]
            ref[(1, 3, 2, 1)]=(0.333700896804-0.243648199304j)-((0.0182200051258-0.0169394395787j))*(o-1.)
            arg[(1, 3, 2, 2)]=(0.446986466601+0.567228367102j)*x[0]**o + ((-0.335101646153+0.909731750191j))*x[0] + ((-0.185339186908+0.860795340059j))*x[1]**o + ((-0.00098700504835+0.0194527476765j))*x[1]
            ref[(1, 3, 2, 2)]=(-0.0372206857541+1.17860410251j)-((0.0436078799488+0.238003951193j))*(o-1.)
            arg[(1, 3, 2, 3)]=(-0.395639243611-0.708426850486j)*x[0]**o + ((-0.913786844341-0.408388741902j))*x[0] + ((0.451237999968+0.610394536132j))*x[1]**o + ((0.726154989488+0.614066303116j))*x[1]
            ref[(1, 3, 2, 3)]=(-0.066016549248+0.0538226234301j)-((0.00926645939282-0.016338719059j))*(o-1.)
            arg[(2, 0, 0, 0)]=(-0.0729895473333+0.544591903348j)*x[0]**o + ((-0.130926161891-0.259925389076j))*x[0] + ((0.739350071813-0.482488077659j))*x[1]**o + ((-0.901561236421+0.491424907902j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.183063436916+0.146801672257j)-((0.111060087413+0.0103506376149j))*(o-1.)
            arg[(2, 0, 0, 1)]=(-0.222378416237-0.00768823092623j)*x[0]**o + ((0.278968355248-0.436237865563j))*x[0] + ((-0.0347025473103+0.346293840042j))*x[1]**o + ((-0.102556738817+0.085239544495j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.0403346735581-0.00619635597574j)-((-0.0428468272579+0.056434268186j))*(o-1.)
            arg[(2, 0, 0, 2)]=(-0.939045382005+0.589413767732j)*x[0]**o + ((-0.802793234849+0.530416062552j))*x[0] + ((-0.720106663433-0.822123049175j))*x[1]**o + ((-0.689929162196-0.313866782779j))*x[1]
            ref[(2, 0, 0, 2)]=(-1.57593722124-0.00808000083484j)-((-0.276525340906-0.0387848802405j))*(o-1.)
            arg[(2, 0, 0, 3)]=(-0.941879068119+0.574433805138j)*x[0]**o + ((0.565356773116+0.815055400532j))*x[0] + ((0.875625652679+0.328037046123j))*x[1]**o + ((-0.571009826776-0.97821341898j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.0359532345498+0.369656416406j)-((-0.0110422359066+0.150411808543j))*(o-1.)
            arg[(2, 0, 1, 0)]=(-0.687562035289+0.549449743779j)*x[0]**o + ((-0.745067359947+0.52266658641j))*x[0] + ((0.826325183505+0.381870582325j))*x[1]**o + ((-0.627694872906+0.00814812395567j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.616999542318+0.731067518235j)-((0.0231271913693+0.155220054351j))*(o-1.)
            arg[(2, 0, 1, 1)]=(0.169087552775-0.479276631367j)*x[0]**o + ((0.271533445839-0.915044736218j))*x[0] + ((0.518184339368+0.137435990533j))*x[1]**o + ((-0.885116755147-0.0799394679679j))*x[1]
            ref[(2, 0, 1, 1)]=(0.0368442914177-0.66841242251j)-((0.114545315357-0.0569734401389j))*(o-1.)
            arg[(2, 0, 1, 2)]=(0.897281462997+0.563423180946j)*x[0]**o + ((-0.214359552487+0.815160340195j))*x[0] + ((-0.452736929039-0.797980738437j))*x[1]**o + ((0.994560082962-0.0623790838246j))*x[1]
            ref[(2, 0, 1, 2)]=(0.612372532217+0.25911184944j)-((0.0740907556597-0.0390929262484j))*(o-1.)
            arg[(2, 0, 1, 3)]=(-0.427795968357-0.805633079884j)*x[0]**o + ((0.763373333552-0.0707772592485j))*x[0] + ((0.666036953982+0.385061467413j))*x[1]**o + ((-0.0857879624356-0.335206363362j))*x[1]
            ref[(2, 0, 1, 3)]=(0.457913178371-0.413277617541j)-((0.0397068309374-0.0700952687452j))*(o-1.)
            arg[(2, 0, 2, 0)]=(-0.654916212555-0.349380973054j)*x[0]**o + ((-0.799354980238-0.965037079702j))*x[0] + ((0.745780122418+0.627451626925j))*x[1]**o + ((-0.0547880155115-0.873101706266j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.381639542943-0.780034066049j)-((0.0151439849771+0.0463451089785j))*(o-1.)
            arg[(2, 0, 2, 1)]=(0.877440435812-0.731418820935j)*x[0]**o + ((0.299176116535-0.991199146492j))*x[0] + ((-0.335908423543+0.846210850126j))*x[1]**o + ((0.755042370273-0.82761169771j))*x[1]
            ref[(2, 0, 2, 1)]=(0.797875249538-0.852009407506j)-((0.0902553353781+0.0191320048651j))*(o-1.)
            arg[(2, 0, 2, 2)]=(-0.850756588314+0.424063698216j)*x[0]**o + ((0.0216835464781-0.4471301913j))*x[0] + ((0.51119034306-0.425103628838j))*x[1]**o + ((-0.788072315993-0.196553064385j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.552977507384-0.322361593154j)-((-0.0565943742089-0.000173321770407j))*(o-1.)
            arg[(2, 0, 2, 3)]=(-0.190722104508+0.437018352882j)*x[0]**o + ((0.0491160426023+0.0146273067688j))*x[0] + ((-0.119923944209+0.694843202207j))*x[1]**o + ((0.580622136869+0.630281828492j))*x[1]
            ref[(2, 0, 2, 3)]=(0.159546065377+0.888385345175j)-((-0.0517743414528+0.188643592515j))*(o-1.)
            arg[(2, 1, 0, 0)]=(-0.240393586604+0.276860902457j)*x[0]**o + ((0.861923830538+0.786601365626j))*x[0] + ((0.711615283795+0.0147093951873j))*x[1]**o + ((-0.701116630946+0.264607273026j))*x[1]
            ref[(2, 1, 0, 0)]=(0.316014448392+0.671389468148j)-((0.078536949532+0.0485950496074j))*(o-1.)
            arg[(2, 1, 0, 1)]=(-0.474241438002+0.867563513927j)*x[0]**o + ((0.0656729000183-0.568157205744j))*x[0] + ((-0.744465291856-0.485084857799j))*x[1]**o + ((0.664027206647-0.213571557519j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.244503311596-0.199625053568j)-((-0.20311778831+0.063746442688j))*(o-1.)
            arg[(2, 1, 0, 2)]=(-0.535010968955-0.245727303705j)*x[0]**o + ((-0.302058168701-0.816876991416j))*x[0] + ((-0.171246593519-0.790222129573j))*x[1]**o + ((-0.353609458692-0.258644515655j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.680962594933-1.05573547017j)-((-0.117709593746-0.17265823888j))*(o-1.)
            arg[(2, 1, 0, 3)]=(0.885143667941-0.25681813788j)*x[0]**o + ((0.625537675755-0.983124044827j))*x[0] + ((-0.00970397016007-0.732435697468j))*x[1]**o + ((0.201332561688-0.955104889571j))*x[1]
            ref[(2, 1, 0, 3)]=(0.851154967612-1.46374138487j)-((0.145906616297-0.164875639225j))*(o-1.)
            arg[(2, 1, 1, 0)]=(-0.136942074664-0.866577989291j)*x[0]**o + ((0.463552425884-0.146040756833j))*x[0] + ((-0.971009847822-0.596636093222j))*x[1]**o + ((-0.583249917547+0.596022039966j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.613824707074-0.50661639969j)-((-0.184658653748-0.243869013752j))*(o-1.)
            arg[(2, 1, 1, 1)]=(-0.199343513641-0.368980787277j)*x[0]**o + ((0.80148043566+0.247275950632j))*x[0] + ((0.475629651573-0.834508626456j))*x[1]**o + ((-0.830657790763-0.0726332378154j))*x[1]
            ref[(2, 1, 1, 1)]=(0.123554391415-0.514423350458j)-((0.0460476896553-0.200581568955j))*(o-1.)
            arg[(2, 1, 1, 2)]=(-0.308219422219+0.485166573374j)*x[0]**o + ((-0.754630181531-0.328232717012j))*x[0] + ((0.436274694247-0.156961133792j))*x[1]**o + ((-0.559670475932-0.544360063184j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.593122692718-0.272193670307j)-((0.0213425453379+0.054700906597j))*(o-1.)
            arg[(2, 1, 1, 3)]=(0.627987776883+0.0966399923444j)*x[0]**o + ((0.669539793415-0.478824453511j))*x[0] + ((0.599682177444+0.555436857888j))*x[1]**o + ((-0.958274750639-0.424426502196j))*x[1]
            ref[(2, 1, 1, 3)]=(0.469467498551-0.125587052738j)-((0.204611659054+0.108679475039j))*(o-1.)
            arg[(2, 1, 2, 0)]=(0.173949187711+0.649083150807j)*x[0]**o + ((0.669212351931+0.605312593021j))*x[0] + ((0.67446326051-0.269040313859j))*x[1]**o + ((0.725111256848-0.290861191996j))*x[1]
            ref[(2, 1, 2, 0)]=(1.1213680285+0.347247118986j)-((0.141402074703+0.0633404728246j))*(o-1.)
            arg[(2, 1, 2, 1)]=(-0.452463266569+0.367466543729j)*x[0]**o + ((0.518334632531-0.275865160219j))*x[0] + ((-0.557826654381+0.198987497702j))*x[1]**o + ((-0.608566777369+0.148246596386j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.550261032894+0.219417738799j)-((-0.168381653492+0.0944090069052j))*(o-1.)
            arg[(2, 1, 2, 2)]=(0.924801455038-0.538773703046j)*x[0]**o + ((0.667998840156+0.0280179223329j))*x[0] + ((0.0178827024404-0.330518686182j))*x[1]**o + ((0.42575590195+0.897872732184j))*x[1]
            ref[(2, 1, 2, 2)]=(1.01821944979+0.0282991326441j)-((0.157114026246-0.144882064871j))*(o-1.)
            arg[(2, 1, 2, 3)]=(0.779771406078-0.454094893918j)*x[0]**o + ((0.50918122304-0.305926994092j))*x[0] + ((0.329941171194-0.20563413514j))*x[1]**o + ((-0.243779996659-0.15009498344j))*x[1]
            ref[(2, 1, 2, 3)]=(0.687556901827-0.557875503295j)-((0.184952096212-0.109954838176j))*(o-1.)
            arg[(2, 2, 0, 0)]=(-0.145510649455-0.907207641271j)*x[0]**o + ((0.102479811212+0.0110414092714j))*x[0] + ((-0.68806894883+0.216400855507j))*x[1]**o + ((-0.368690512649+0.399438685151j))*x[1]
            ref[(2, 2, 0, 0)]=(-0.549895149861-0.140163345671j)-((-0.138929933048-0.115134464294j))*(o-1.)
            arg[(2, 2, 0, 1)]=(-0.109000251061+0.956008948859j)*x[0]**o + ((-0.328904724578+0.0790491523873j))*x[0] + ((-0.449140150685-0.759089726021j))*x[1]**o + ((-0.825425243405-0.316959535659j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.856235184864-0.0204955802168j)-((-0.0930234002909+0.032819870473j))*(o-1.)
            arg[(2, 2, 0, 2)]=(0.436467712214+0.621935352564j)*x[0]**o + ((-0.064638922529-0.813803313257j))*x[0] + ((-0.574529980614+0.0756567443233j))*x[1]**o + ((-0.696852690469-0.400610509836j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.449776940699-0.258410863103j)-((-0.0230103780667+0.116265349481j))*(o-1.)
            arg[(2, 2, 0, 3)]=(0.69451440245+0.13164402535j)*x[0]**o + ((0.387181080629+0.181381918624j))*x[0] + ((0.119310188256+0.989181757699j))*x[1]**o + ((-0.711913587583-0.626777590719j))*x[1]
            ref[(2, 2, 0, 3)]=(0.244546041877+0.337715055477j)-((0.135637431784+0.186804297175j))*(o-1.)
            arg[(2, 2, 1, 0)]=(-0.687477121019+0.805735564646j)*x[0]**o + ((-0.0353331886997-0.27258644984j))*x[0] + ((-0.267457209739+0.891008648473j))*x[1]**o + ((0.840226929781+0.0702958520286j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.0750202948385+0.747226807654j)-((-0.159155721793+0.282790702187j))*(o-1.)
            arg[(2, 2, 1, 1)]=(-0.465921333081+0.196451697344j)*x[0]**o + ((-0.40979299197+0.0664965922612j))*x[0] + ((-0.0107110379058-0.46806023961j))*x[1]**o + ((-0.431390429372+0.789107475915j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.658907896164+0.291997762955j)-((-0.0794387284978-0.0452680903776j))*(o-1.)
            arg[(2, 2, 1, 2)]=(-0.574575908835-0.0023535412651j)*x[0]**o + ((0.483274963692-0.304004683247j))*x[0] + ((0.461127658716+0.970192365407j))*x[1]**o + ((-0.915791224847+0.306101039605j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.272982255637+0.48496759025j)-((-0.0189080416865+0.16130647069j))*(o-1.)
            arg[(2, 2, 1, 3)]=(-0.219159103881+0.426096404772j)*x[0]**o + ((-0.0281128974985+0.96865701771j))*x[0] + ((-0.940609730425+0.825909069738j))*x[1]**o + ((0.347981156507-0.290703781298j))*x[1]
            ref[(2, 2, 1, 3)]=(-0.419950287648+0.964979355461j)-((-0.193294805718+0.208667579085j))*(o-1.)
            arg[(2, 2, 2, 0)]=(-0.99724715944+0.488099004059j)*x[0]**o + ((-0.966380552111-0.869363579064j))*x[0] + ((0.608357599+0.729116282073j))*x[1]**o + ((0.644733825007+0.301309206047j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.355268143772+0.324580456557j)-((-0.06481492674+0.202869214355j))*(o-1.)
            arg[(2, 2, 2, 1)]=(0.332582806794+0.383330281331j)*x[0]**o + ((-0.447827850238-0.51559205388j))*x[0] + ((-0.645928063008-0.313377230764j))*x[1]**o + ((-0.993054632177+0.331422790714j))*x[1]
            ref[(2, 2, 2, 1)]=(-0.877113869315-0.0571081062992j)-((-0.052224209369+0.0116588417612j))*(o-1.)
            arg[(2, 2, 2, 2)]=(0.668482947338-0.13997211815j)*x[0]**o + ((0.422917722832-0.774977743986j))*x[0] + ((-0.197278850532+0.888517906493j))*x[1]**o + ((-0.59710705709-0.11682790525j))*x[1]
            ref[(2, 2, 2, 2)]=(0.148507381274-0.0716299304465j)-((0.0785340161343+0.124757631391j))*(o-1.)
            arg[(2, 2, 2, 3)]=(0.247166562097-0.890316980179j)*x[0]**o + ((-0.492034868239-0.0564592180886j))*x[0] + ((0.551970912312-0.494054576171j))*x[1]**o + ((-0.733688859762+0.600135813682j))*x[1]
            ref[(2, 2, 2, 3)]=(-0.213293126796-0.420347480378j)-((0.133189579068-0.230728592725j))*(o-1.)
            arg[(2, 3, 0, 0)]=(0.361933859668-0.0408382542399j)*x[0]**o + ((0.0258584976143+0.00390979867507j))*x[0] + ((-0.112774037524-0.10930678646j))*x[1]**o + ((0.187710471077+0.873433538165j))*x[1]
            ref[(2, 3, 0, 0)]=(0.231364395418+0.36359914807j)-((0.0415266370241-0.02502417345j))*(o-1.)
            arg[(2, 3, 0, 1)]=(0.95728509932+0.221323180272j)*x[0]**o + ((0.955828884199+0.433800169044j))*x[0] + ((0.357897423028+0.737617045191j))*x[1]**o + ((0.884115880336-0.382274778483j))*x[1]
            ref[(2, 3, 0, 1)]=(1.57756364344+0.505232808012j)-((0.219197087058+0.159823370911j))*(o-1.)
            arg[(2, 3, 0, 2)]=(0.107185964274-0.456126205703j)*x[0]**o + ((-0.342816670244-0.562134658772j))*x[0] + ((-0.542016149215+0.280534435605j))*x[1]**o + ((-0.604811221009-0.302247503425j))*x[1]
            ref[(2, 3, 0, 2)]=(-0.691229038097-0.519986966147j)-((-0.0724716974902-0.0292652950164j))*(o-1.)
            arg[(2, 3, 0, 3)]=(-0.573155444565-0.345384220496j)*x[0]**o + ((-0.114928201398+0.787848312507j))*x[0] + ((0.791756294897-0.131908570845j))*x[1]**o + ((-0.115831457941+0.75394310525j))*x[1]
            ref[(2, 3, 0, 3)]=(-0.006079404503+0.532249313208j)-((0.0364334750554-0.0795487985568j))*(o-1.)
            arg[(2, 3, 1, 0)]=(-0.50084915956-0.440680098171j)*x[0]**o + ((0.239311146909+0.145802792018j))*x[0] + ((0.0408468880455-0.138022118898j))*x[1]**o + ((-0.712002630221+0.701938944787j))*x[1]
            ref[(2, 3, 1, 0)]=(-0.466346877413+0.134519759868j)-((-0.0766670452524-0.0964503695115j))*(o-1.)
            arg[(2, 3, 1, 1)]=(-0.573306391768+0.796042317551j)*x[0]**o + ((0.337319544599+0.187676939951j))*x[0] + ((0.148375661032+0.765600147286j))*x[1]**o + ((0.793413204687-0.360161274953j))*x[1]
            ref[(2, 3, 1, 1)]=(0.352901009275+0.694579064918j)-((-0.070821788456+0.260273744139j))*(o-1.)
            arg[(2, 3, 1, 2)]=(-0.727969524445+0.91656483483j)*x[0]**o + ((0.105422873674-0.867911327339j))*x[0] + ((-0.308761919036+0.459867204065j))*x[1]**o + ((-0.352564186502-0.902802433555j))*x[1]
            ref[(2, 3, 1, 2)]=(-0.641936378154-0.197140860999j)-((-0.172788573913+0.229405339816j))*(o-1.)
            arg[(2, 3, 1, 3)]=(-0.890757129047+0.849823108369j)*x[0]**o + ((0.286902250741+0.979773680646j))*x[0] + ((0.778887977058-0.893485864784j))*x[1]**o + ((-0.956543248701+0.0822475597027j))*x[1]
            ref[(2, 3, 1, 3)]=(-0.390755074975+0.509179241967j)-((-0.0186448586648-0.00727712606911j))*(o-1.)
            arg[(2, 3, 2, 0)]=(0.104364154044+0.563174327671j)*x[0]**o + ((0.0400465152973-0.268490986001j))*x[0] + ((0.82043103093-0.0430950744152j))*x[1]**o + ((0.419328557573+0.299247757276j))*x[1]
            ref[(2, 3, 2, 0)]=(0.692085128922+0.275418012266j)-((0.154132530829+0.0866798755427j))*(o-1.)
            arg[(2, 3, 2, 1)]=(0.0179573877364-0.263059466006j)*x[0]**o + ((-0.813220843669+0.489315490465j))*x[0] + ((0.145253059176+0.332171995487j))*x[1]**o + ((-0.28481660403-0.731687861671j))*x[1]
            ref[(2, 3, 2, 1)]=(-0.467413500394-0.0866299208629j)-((0.027201741152+0.0115187549134j))*(o-1.)
            arg[(2, 3, 2, 2)]=(-0.913468226933-0.574854283975j)*x[0]**o + ((-0.0614636712668-0.984232361547j))*x[0] + ((0.69633049661+0.802704612839j))*x[1]**o + ((0.227710286353+0.802016247385j))*x[1]
            ref[(2, 3, 2, 2)]=(-0.0254455576179+0.0228171073508j)-((-0.0361896217203+0.0379750548107j))*(o-1.)
            arg[(2, 3, 2, 3)]=(-0.982848560529-0.317859901788j)*x[0]**o + ((0.861923806852-0.641415184663j))*x[0] + ((-0.565893074976+0.267620264547j))*x[1]**o + ((0.695346281935+0.735873099j))*x[1]
            ref[(2, 3, 2, 3)]=(0.00426422664095+0.0221091385482j)-((-0.258123605917-0.00837327287341j))*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=(-0.600194929991-0.144781445515j)*x[0]**o + ((0.91295950263+0.315098312901j))*x[0] + ((-0.892247576643-0.741785166354j))*x[1]**o + ((0.722511017595-0.590031622939j))*x[1] + ((0.876544785626-0.74765195373j))*x[2]**o + ((0.761923519329+0.0207968344102j))*x[2]
            ref[(0, 0, 0, 0)]=(0.890748159273-0.944177520614j)-((-0.102649620168-0.272369760933j))*(o-1.)
            arg[(0, 0, 0, 1)]=(0.391614430907+0.7301779016j)*x[0]**o + ((0.0629097025532+0.0908793369411j))*x[0] + ((0.0727456142855+0.238925803281j))*x[1]**o + ((0.703786904506+0.761007037514j))*x[1] + ((-0.512090356536+0.419958188772j))*x[2]**o + ((-0.118988473474+0.617982457866j))*x[2]
            ref[(0, 0, 0, 1)]=(0.29998891112+1.42946536299j)-((-0.00795505189069+0.231510315609j))*(o-1.)
            arg[(0, 0, 0, 2)]=(-0.907218978165-0.662282992452j)*x[0]**o + ((-0.561724949732-0.389766734044j))*x[0] + ((0.186366115697+0.681177677552j))*x[1]**o + ((-0.212416350593-0.361181610372j))*x[1] + ((0.582771552814-0.620850182226j))*x[2]**o + ((0.733868324185-0.495204733476j))*x[2]
            ref[(0, 0, 0, 2)]=(-0.0891771428969-0.924054287509j)-((-0.0230135516091-0.100325916188j))*(o-1.)
            arg[(0, 0, 0, 3)]=(0.853869935272-0.480601504305j)*x[0]**o + ((0.983086421649+0.769850500551j))*x[0] + ((0.36818799254+0.228889837908j))*x[1]**o + ((-0.599539002904-0.177425142038j))*x[1] + ((-0.00397972568743+0.333243558631j))*x[2]**o + ((-0.161840394545+0.684574520789j))*x[2]
            ref[(0, 0, 0, 3)]=(0.719892613162+0.679265885768j)-((0.203013033687+0.0135886487057j))*(o-1.)
            arg[(0, 0, 1, 0)]=(-0.667866634606+0.24741431949j)*x[0]**o + ((-0.359819940573+0.912272913028j))*x[0] + ((-0.448739367217+0.869801099687j))*x[1]**o + ((-0.615923582468-0.384627060348j))*x[1] + ((0.367895553301+0.948854548293j))*x[2]**o + ((-0.96290671418+0.251241969958j))*x[2]
            ref[(0, 0, 1, 0)]=(-1.34368034287+1.42247889505j)-((-0.124785074754+0.344344994578j))*(o-1.)
            arg[(0, 0, 1, 1)]=(-0.717763635736+0.674333750029j)*x[0]**o + ((0.244285207726-0.352271288389j))*x[0] + ((0.0337129566403-0.226257753745j))*x[1]**o + ((0.196236902724-0.473786758336j))*x[1] + ((0.377467344095+0.705691849037j))*x[2]**o + ((0.983578084564-0.195871253584j))*x[2]
            ref[(0, 0, 1, 1)]=(0.558758430007+0.0659192725058j)-((-0.0510972225+0.192294640887j))*(o-1.)
            arg[(0, 0, 1, 2)]=(0.984793937951-0.362933600052j)*x[0]**o + ((-0.503330471831-0.416320917977j))*x[0] + ((-0.577615419083-0.0535593240278j))*x[1]**o + ((-0.637644080966+0.843243777365j))*x[1] + ((-0.780941246173+0.310417037437j))*x[2]**o + ((-0.522154282017+0.605849185313j))*x[2]
            ref[(0, 0, 1, 2)]=(-1.01844578106+0.463348079029j)-((-0.0622937878841-0.0176793144405j))*(o-1.)
            arg[(0, 0, 1, 3)]=(-0.242613580896+0.745094532601j)*x[0]**o + ((0.317781321805+0.938196994022j))*x[0] + ((-0.958058713878-0.850342812096j))*x[1]**o + ((-0.223721216255-0.326186492969j))*x[1] + ((0.643770345365+0.21652818701j))*x[2]**o + ((0.339627877926+0.176557542646j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.0616069829667+0.449923975607j)-((-0.0928169915682+0.0185466512525j))*(o-1.)
            arg[(0, 0, 2, 0)]=(-0.391590735596+0.0915149184539j)*x[0]**o + ((0.479938998273+0.700600816989j))*x[0] + ((0.681689254483-0.977528360267j))*x[1]**o + ((0.302200905623+0.0940749428692j))*x[1] + ((-0.79782994344-0.753435054612j))*x[2]**o + ((0.160580585608+0.391625052377j))*x[2]
            ref[(0, 0, 2, 0)]=(0.217494532475-0.226573842095j)-((-0.0846219040921-0.273241416071j))*(o-1.)
            arg[(0, 0, 2, 1)]=(0.812841339159-0.142016886219j)*x[0]**o + ((-0.534404091837+0.512935086685j))*x[0] + ((0.220635560237-0.816134973767j))*x[1]**o + ((-0.903550415776-0.171078404743j))*x[1] + ((0.74935319435-0.765902424635j))*x[2]**o + ((0.693416887284+0.887832592589j))*x[2]
            ref[(0, 0, 2, 1)]=(0.519146236709-0.247182505045j)-((0.297138348958-0.28734238077j))*(o-1.)
            arg[(0, 0, 2, 2)]=(0.633422422202-0.101190167637j)*x[0]**o + ((0.97239945992+0.316575018624j))*x[0] + ((0.238435393475+0.949826408108j))*x[1]**o + ((0.0341402577101+0.163555044873j))*x[1] + ((0.0746124080792-0.170728082202j))*x[2]**o + ((0.955873192765-0.377876745998j))*x[2]
            ref[(0, 0, 2, 2)]=(1.45444156708+0.390080737884j)-((0.157745037293+0.112984693045j))*(o-1.)
            arg[(0, 0, 2, 3)]=(0.604808788547-0.398423827079j)*x[0]**o + ((-0.643156110454+0.54609673965j))*x[0] + ((0.417404608813-0.350103076655j))*x[1]**o + ((0.296740360874+0.774267154946j))*x[1] + ((-0.57985302924-0.477494316198j))*x[2]**o + ((0.921146841242-0.467392118996j))*x[2]
            ref[(0, 0, 2, 3)]=(0.508545729891-0.186524722166j)-((0.0737267280202-0.204336869989j))*(o-1.)
            arg[(0, 1, 0, 0)]=(-0.779472454709-0.8369378028j)*x[0]**o + ((-0.8275596467+0.844461967166j))*x[0] + ((0.179964404584-0.450890121031j))*x[1]**o + ((-0.992959549883-0.232893413057j))*x[1] + ((0.781508543213-0.0180331788241j))*x[2]**o + ((0.243979157891-0.0715234719828j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.697269772802-0.382908010264j)-((0.0303334155147-0.217643517109j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.677835982664-0.431449466708j)*x[0]**o + ((-0.796694526823+0.633794834983j))*x[0] + ((0.697162124845-0.177486701632j))*x[1]**o + ((0.920530591914+0.0933909222267j))*x[1] + ((-0.0780435172236-0.347459799067j))*x[2]**o + ((-0.447252522483-0.980147527407j))*x[2]
            ref[(0, 1, 0, 1)]=(0.486769066447-0.604678868802j)-((0.216159098381-0.159399327901j))*(o-1.)
            arg[(0, 1, 0, 2)]=(0.144628974761-0.626079196343j)*x[0]**o + ((-0.402147959184+0.131717333357j))*x[0] + ((0.367931914326+0.658399347026j))*x[1]**o + ((-0.314822756755-0.597284579886j))*x[1] + ((-0.302574219797+0.515852594976j))*x[2]**o + ((0.927720464658+0.0412277977902j))*x[2]
            ref[(0, 1, 0, 2)]=(0.210368209005+0.0619166484602j)-((0.034997778215+0.0913621242766j))*(o-1.)
            arg[(0, 1, 0, 3)]=(0.334165103355-0.417160622132j)*x[0]**o + ((-0.23255335885+0.260416685792j))*x[0] + ((-0.417892344864-0.408789700883j))*x[1]**o + ((-0.74128581414-0.924565865741j))*x[1] + ((-0.381006530857-0.316457709684j))*x[2]**o + ((0.139008710567-0.590557519204j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.649782117395-1.19855736593j)-((-0.0774556287277-0.190401338783j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.646909896706-0.531732782548j)*x[0]**o + ((-0.451091363748-0.367328304145j))*x[0] + ((0.747700844855-0.693680760054j))*x[1]**o + ((-0.738819077641-0.759906588468j))*x[1] + ((0.823333792422-0.377807677561j))*x[2]**o + ((-0.13436465709-0.873297557623j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.200075178954-1.8018768352j)-((0.154020790095-0.267203536694j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.883515518012+0.433350170922j)*x[0]**o + ((-0.736402423075+0.994693945177j))*x[0] + ((-0.869386719768-0.654715827206j))*x[1]**o + ((-0.736797489193+0.241415507223j))*x[1] + ((0.142786797051+0.85439822528j))*x[2]**o + ((-0.495388350475-0.900289939524j))*x[2]
            ref[(0, 1, 1, 1)]=(-1.78935185174+0.484426040936j)-((-0.268352573455+0.105505428166j))*(o-1.)
            arg[(0, 1, 1, 2)]=(-0.765435160688-0.416683628192j)*x[0]**o + ((-0.659698315897+0.525102101587j))*x[0] + ((-0.925483214347-0.949425696884j))*x[1]**o + ((0.438567791325+0.341341389691j))*x[1] + ((0.859087628228-0.767365305255j))*x[2]**o + ((-0.10655296382+0.36962314393j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.579757117599-0.448703997561j)-((-0.138638457801-0.355579105055j))*(o-1.)
            arg[(0, 1, 1, 3)]=(-0.0765000115031-0.190390704219j)*x[0]**o + ((0.463697517789+0.764407721015j))*x[0] + ((-0.0338237314949-0.180846400081j))*x[1]**o + ((-0.21299147038-0.830698927828j))*x[1] + ((0.583596144987-0.870035489212j))*x[2]**o + ((-0.609064434942-0.0674194015487j))*x[2]
            ref[(0, 1, 1, 3)]=(0.0574570072282-0.687491600937j)-((0.0788787336648-0.206878765585j))*(o-1.)
            arg[(0, 1, 2, 0)]=(0.606016784218+0.999597599904j)*x[0]**o + ((-0.494258348007-0.842205387168j))*x[0] + ((0.300901112455-0.620042287428j))*x[1]**o + ((0.303610691645-0.153853159325j))*x[1] + ((0.18740754021+0.443378215782j))*x[2]**o + ((0.0381725804428+0.247833139381j))*x[2]
            ref[(0, 1, 2, 0)]=(0.470925180482+0.0373540605733j)-((0.182387572814+0.137155588043j))*(o-1.)
            arg[(0, 1, 2, 1)]=(-0.632497712155+0.622132249668j)*x[0]**o + ((-0.066143198172+0.649071446615j))*x[0] + ((0.525090011672+0.464773999809j))*x[1]**o + ((0.46056456206+0.158826420098j))*x[1] + ((0.743756182992-0.856359753045j))*x[2]**o + ((0.988429561473+0.15318700049j))*x[2]
            ref[(0, 1, 2, 1)]=(1.00959970393+0.595815681817j)-((0.106058080418+0.0384244160719j))*(o-1.)
            arg[(0, 1, 2, 2)]=(0.291787597204-0.122045825198j)*x[0]**o + ((-0.23244588372+0.75924540952j))*x[0] + ((0.358177569336+0.542745384244j))*x[1]**o + ((-0.275015204212+0.0301466680069j))*x[1] + ((0.751759912608+0.00684637981466j))*x[2]**o + ((-0.821840930577-0.107396485856j))*x[2]
            ref[(0, 1, 2, 2)]=(0.0362115303197+0.554770765266j)-((0.233620846525+0.0712576564769j))*(o-1.)
            arg[(0, 1, 2, 3)]=(0.0244522191622+0.457653909006j)*x[0]**o + ((0.878407964265-0.197956503938j))*x[0] + ((0.696281041802-0.536855501157j))*x[1]**o + ((0.875603323397-0.453006052841j))*x[1] + ((-0.599561385118-0.545417837287j))*x[2]**o + ((-0.113533702199-0.910711820052j))*x[2]
            ref[(0, 1, 2, 3)]=(0.880824730654-1.09314690313j)-((0.0201953126409-0.10410323824j))*(o-1.)
            arg[(0, 2, 0, 0)]=(0.690826891768-0.670917440113j)*x[0]**o + ((-0.587118361265+0.356851446521j))*x[0] + ((-0.132909120779+0.613647448868j))*x[1]**o + ((-0.0689134741522+0.962348785548j))*x[1] + ((-0.797136452617-0.109868247209j))*x[2]**o + ((-0.440807837711-0.377740048998j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.668029177378+0.387160972308j)-((-0.0398697802713-0.0278563730758j))*(o-1.)
            arg[(0, 2, 0, 1)]=(0.726027906772+0.776300306423j)*x[0]**o + ((0.896919161425+0.619123290035j))*x[0] + ((-0.118500979977+0.933287943421j))*x[1]**o + ((0.463974091784-0.527078809847j))*x[1] + ((-0.460967339376-0.461856571687j))*x[2]**o + ((0.609442794109+0.22729094645j))*x[2]
            ref[(0, 2, 0, 1)]=(1.05844781737+0.783533552397j)-((0.0244265979032+0.207955279693j))*(o-1.)
            arg[(0, 2, 0, 2)]=(0.47410239884-0.0138884382686j)*x[0]**o + ((0.0859106113647-0.856621137259j))*x[0] + ((-0.574460008882-0.156700124834j))*x[1]**o + ((-0.710359048977+0.519798710822j))*x[1] + ((-0.320681911053-0.699928636101j))*x[2]**o + ((0.730764379728-0.330257084048j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.15736178949-0.768798354844j)-((-0.0701732535158-0.145086199867j))*(o-1.)
            arg[(0, 2, 0, 3)]=(0.834955347442-0.32171343058j)*x[0]**o + ((0.649851929602+0.382334067041j))*x[0] + ((0.920742461013+0.279490380507j))*x[1]**o + ((0.986355169315-0.0313668313873j))*x[1] + ((0.102842666687-0.93283915585j))*x[2]**o + ((0.273736309632-0.942889864756j))*x[2]
            ref[(0, 2, 0, 3)]=(1.88424194185-0.783492417513j)-((0.309756745857-0.162510367654j))*(o-1.)
            arg[(0, 2, 1, 0)]=(-0.0152518447157-0.347090391465j)*x[0]**o + ((0.130578759976+0.804087977995j))*x[0] + ((0.877936697719-0.338965232001j))*x[1]**o + ((-0.496209701204+0.416713542227j))*x[1] + ((-0.795695002806-0.516312123088j))*x[2]**o + ((-0.539955527408-0.408269038154j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.419298309219-0.194917632243j)-((0.0111649750328-0.200394624426j))*(o-1.)
            arg[(0, 2, 1, 1)]=(0.0443850969922-0.864921286833j)*x[0]**o + ((-0.797206917863+0.113844719869j))*x[0] + ((0.925373364618+0.0301413649934j))*x[1]**o + ((0.304106363668-0.198869692458j))*x[1] + ((0.502644947134+0.317039340935j))*x[2]**o + ((-0.736669737185+0.404449818846j))*x[2]
            ref[(0, 2, 1, 1)]=(0.121316558683-0.0991578673237j)-((0.245400568124-0.0862900968174j))*(o-1.)
            arg[(0, 2, 1, 2)]=(0.559294049483-0.9070828602j)*x[0]**o + ((0.462557104813-0.958987276249j))*x[0] + ((-0.0348456012231+0.97869260533j))*x[1]**o + ((0.376705765814+0.235640042541j))*x[1] + ((-0.0157818212306-0.834427411032j))*x[2]**o + ((-0.311117736705+0.20299304432j))*x[2]
            ref[(0, 2, 1, 2)]=(0.518405880475-0.641585927645j)-((0.0847777711715-0.12713627765j))*(o-1.)
            arg[(0, 2, 1, 3)]=(0.725304872257-0.370115885162j)*x[0]**o + ((-0.316401047394+0.72397566844j))*x[0] + ((-0.270885342191-0.822438140337j))*x[1]**o + ((0.642510453758+0.418691676087j))*x[1] + ((0.47909741039-0.83478542566j))*x[2]**o + ((-0.362041115461+0.622682674091j))*x[2]
            ref[(0, 2, 1, 3)]=(0.44879261568-0.13099471627j)-((0.155586156743-0.337889908526j))*(o-1.)
            arg[(0, 2, 2, 0)]=(0.600169002458+0.271288921345j)*x[0]**o + ((0.6605652353+0.321492871487j))*x[0] + ((0.992806786778-0.796877969062j))*x[1]**o + ((-0.914947364681-0.906399393136j))*x[1] + ((0.0884092996926-0.555855476879j))*x[2]**o + ((0.423126663509+0.215688909162j))*x[2]
            ref[(0, 2, 2, 0)]=(0.925064811528-0.725331068542j)-((0.280230848155-0.180240754099j))*(o-1.)
            arg[(0, 2, 2, 1)]=(-0.612836642619+0.261377081972j)*x[0]**o + ((-0.814715951571-0.678103576903j))*x[0] + ((0.132146394659-0.353969653271j))*x[1]**o + ((0.921043215614-0.8538271457j))*x[1] + ((0.143897369931+0.623201098527j))*x[2]**o + ((-0.153777924891+0.295611458361j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.192121769438-0.352855368507j)-((-0.0561321463381+0.088434754538j))*(o-1.)
            arg[(0, 2, 2, 2)]=(0.332163771588-0.710994936518j)*x[0]**o + ((0.455132387248-0.706938949064j))*x[0] + ((-0.0211156814879+0.503073840012j))*x[1]**o + ((0.696596805187-0.270420521424j))*x[1] + ((0.940940792987+0.415448192146j))*x[2]**o + ((-0.0432048884004+0.84044993821j))*x[2]
            ref[(0, 2, 2, 2)]=(1.18025659356+0.0353087816806j)-((0.208664813848+0.0345878492733j))*(o-1.)
            arg[(0, 2, 2, 3)]=(-0.222211935732+0.568835586137j)*x[0]**o + ((-0.193086622539+0.640573827941j))*x[0] + ((0.696327410182-0.471624610209j))*x[1]**o + ((-0.598458674776+0.567897843667j))*x[1] + ((0.29412508929-0.129117647873j))*x[2]**o + ((-0.148568819868-0.00723851307951j))*x[2]
            ref[(0, 2, 2, 3)]=(-0.0859367767212+0.584663243292j)-((0.128040093957-0.00531777865755j))*(o-1.)
            arg[(0, 3, 0, 0)]=(0.476749445821-0.440862168789j)*x[0]**o + ((-0.200938281256+0.0944299543187j))*x[0] + ((-0.564243560235-0.504649333391j))*x[1]**o + ((-0.555735406643+0.761330973988j))*x[1] + ((-0.454317274768-0.650260432979j))*x[2]**o + ((0.537853862234-0.727705471361j))*x[2]
            ref[(0, 3, 0, 0)]=(-0.380315607423-0.733858239107j)-((-0.090301898197-0.265961989193j))*(o-1.)
            arg[(0, 3, 0, 1)]=(-0.844947393938+0.396086580606j)*x[0]**o + ((0.998319340185-0.161541130686j))*x[0] + ((-0.678503208669-0.664164669216j))*x[1]**o + ((0.0274128957868+0.15314411135j))*x[1] + ((0.188517763555+0.10817537525j))*x[2]**o + ((0.543935498653+0.192578289393j))*x[2]
            ref[(0, 3, 0, 1)]=(0.117367447787+0.0121392783488j)-((-0.222488806509-0.0266504522267j))*(o-1.)
            arg[(0, 3, 0, 2)]=(-0.819315577065-0.233885963068j)*x[0]**o + ((-0.60190564434+0.30522847351j))*x[0] + ((0.39997240583+0.694186868628j))*x[1]**o + ((0.882573992164-0.575309701496j))*x[1] + ((0.347094991095-0.0713140228145j))*x[2]**o + ((-0.155208278759+0.19388837339j))*x[2]
            ref[(0, 3, 0, 2)]=(0.0266059444625+0.156397014074j)-((-0.0120413633567+0.0648311471241j))*(o-1.)
            arg[(0, 3, 0, 3)]=(0.962172861635+0.858968336528j)*x[0]**o + ((-0.358540948478+0.618867178096j))*x[0] + ((-0.181909172398-0.59713345194j))*x[1]**o + ((0.85849203164+0.131866219692j))*x[1] + ((0.360762878145-0.521736370474j))*x[2]**o + ((0.726613153027+0.904575401275j))*x[2]
            ref[(0, 3, 0, 3)]=(1.18379540179+0.697703656588j)-((0.190171094564-0.0433169143144j))*(o-1.)
            arg[(0, 3, 1, 0)]=(0.0141292726803+0.802278062879j)*x[0]**o + ((0.234500779253-0.62716415979j))*x[0] + ((-0.967917667134+0.64971514805j))*x[1]**o + ((0.0244669782054-0.00486330663787j))*x[1] + ((0.168637236849+0.38908324302j))*x[2]**o + ((0.0906464982893+0.0725489171211j))*x[2]
            ref[(0, 3, 1, 0)]=(-0.217768450929+0.640798952321j)-((-0.130858526267+0.306846075658j))*(o-1.)
            arg[(0, 3, 1, 1)]=(0.0988689626079+0.995864857825j)*x[0]**o + ((0.243702278653+0.36396178979j))*x[0] + ((-0.423858001115-0.132438952986j))*x[1]**o + ((0.779224426826+0.049721047998j))*x[1] + ((0.0895507862411-0.487256520451j))*x[2]**o + ((0.937781087761+0.763263117943j))*x[2]
            ref[(0, 3, 1, 1)]=(0.862634770487+0.776557670059j)-((-0.0392397087111+0.062694897398j))*(o-1.)
            arg[(0, 3, 1, 2)]=(-0.114304317846+0.781710059681j)*x[0]**o + ((-0.170820239565+0.708279301043j))*x[0] + ((0.460357332121-0.544689251857j))*x[1]**o + ((0.837068644205-0.213569961471j))*x[1] + ((-0.428888294838-0.643694076829j))*x[2]**o + ((0.790781276957+0.842451682327j))*x[2]
            ref[(0, 3, 1, 2)]=(0.687097200517+0.465243876447j)-((-0.0138058800938-0.0677788781676j))*(o-1.)
            arg[(0, 3, 1, 3)]=(-0.626537636327-0.781711137043j)*x[0]**o + ((-0.503134349978+0.917242475643j))*x[0] + ((-0.0697859758273-0.694027157581j))*x[1]**o + ((-0.0798978998867-0.320960623682j))*x[1] + ((-0.411555752279-0.695249241553j))*x[2]**o + ((-0.848938218654+0.00820354174758j))*x[2]
            ref[(0, 3, 1, 3)]=(-1.26992491648-0.783251071235j)-((-0.184646560739-0.36183125603j))*(o-1.)
            arg[(0, 3, 2, 0)]=(0.715605878929+0.740056088093j)*x[0]**o + ((-0.438369422524+0.558742900845j))*x[0] + ((0.946796949895+0.613761212323j))*x[1]**o + ((0.079632514559+0.891623009875j))*x[1] + ((-0.893053335521-0.289163058547j))*x[2]**o + ((-0.910108668183+0.958919426811j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.249748041422+1.7369697897j)-((0.128224915551+0.177442373645j))*(o-1.)
            arg[(0, 3, 2, 1)]=(0.560665089114+0.463369786135j)*x[0]**o + ((-0.218937424859-0.767475351834j))*x[0] + ((-0.685717777437+0.719944918232j))*x[1]**o + ((-0.617362668768-0.1661943103j))*x[1] + ((-0.496289176418+0.696788226453j))*x[2]**o + ((0.991612849803-0.049687608719j))*x[2]
            ref[(0, 3, 2, 1)]=(-0.233014554283+0.448372829984j)-((-0.103556977457+0.31335048847j))*(o-1.)
            arg[(0, 3, 2, 2)]=(-0.799633438126-0.976893032071j)*x[0]**o + ((0.140069639565-0.529349991904j))*x[0] + ((-0.24340583269+0.569305322918j))*x[1]**o + ((0.526253658662+0.87275320333j))*x[1] + ((-0.923184112992-0.428906777678j))*x[2]**o + ((0.160170024924-0.487518900086j))*x[2]
            ref[(0, 3, 2, 2)]=(-0.569865030329-0.490305087745j)-((-0.327703897301-0.139415747805j))*(o-1.)
            arg[(0, 3, 2, 3)]=(-0.565105742832-0.76684892998j)*x[0]**o + ((0.271746543784+0.894081525018j))*x[0] + ((-0.939973470815-0.184014705539j))*x[1]**o + ((-0.732543477627-0.8526978878j))*x[1] + ((-0.727153539026+0.899899212334j))*x[2]**o + ((0.530331474042-0.0434658227197j))*x[2]
            ref[(0, 3, 2, 3)]=(-1.08134910624-0.0265233043435j)-((-0.372038792112-0.00849407053093j))*(o-1.)
            arg[(1, 0, 0, 0)]=(0.641299722573+0.614072917694j)*x[0]**o + ((-0.155492590658+0.217864167018j))*x[0] + ((0.573062188329+0.421253836226j))*x[1]**o + ((-0.15965791542-0.957178842282j))*x[1] + ((-0.346722711624-0.696187774948j))*x[2]**o + ((0.497309449902+0.9233047021j))*x[2]
            ref[(1, 0, 0, 0)]=(0.524899071551+0.261564502904j)-((0.144606533213+0.056523163162j))*(o-1.)
            arg[(1, 0, 0, 1)]=(-0.276278265836+0.174961842546j)*x[0]**o + ((0.101039709878-0.333287795228j))*x[0] + ((-0.456110827991-0.594990804854j))*x[1]**o + ((-0.400013225776+0.847811734217j))*x[1] + ((0.530317673127+0.81604165439j))*x[2]**o + ((0.589327543853+0.39652419161j))*x[2]
            ref[(1, 0, 0, 1)]=(0.0441413036272+0.653530411341j)-((-0.0336785701168+0.066002115347j))*(o-1.)
            arg[(1, 0, 0, 2)]=(0.294950347928-0.779778933664j)*x[0]**o + ((-0.432803555426+0.0372965022512j))*x[0] + ((-0.733163121597+0.152878249377j))*x[1]**o + ((0.121731690242+0.257851678177j))*x[1] + ((-0.284688467927-0.868231984655j))*x[2]**o + ((0.00711815215358-0.0598080811795j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.513427477313-0.629896284846j)-((-0.120483540266-0.249188778157j))*(o-1.)
            arg[(1, 0, 0, 3)]=(-0.124576422888+0.570811515421j)*x[0]**o + ((0.216476099942+0.27470593531j))*x[0] + ((-0.779720287075-0.00232854802574j))*x[1]**o + ((-0.5544641785+0.612749616624j))*x[1] + ((-0.00850044747073-0.169160574327j))*x[2]**o + ((0.744009381846+0.752702819646j))*x[2]
            ref[(1, 0, 0, 3)]=(-0.253387927073+1.01974038232j)-((-0.152132859572+0.0665537321781j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.28269747054-0.00118071275814j)*x[0]**o + ((0.324364218197-0.202052222903j))*x[0] + ((-0.635046772638+0.539129704407j))*x[1]**o + ((-0.632133920135-0.37052222253j))*x[1] + ((-0.143827502962+0.893289801537j))*x[2]**o + ((-0.440768801425+0.0991776776497j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.905055124752+0.478921012701j)-((-0.176928624357+0.238539798864j))*(o-1.)
            arg[(1, 0, 1, 1)]=(0.186224633778-0.657760806517j)*x[0]**o + ((-0.04344549558+0.772142395955j))*x[0] + ((0.495769979306-0.590979062876j))*x[1]**o + ((-0.00233494715361-0.939830361245j))*x[1] + ((0.473685015826-0.132759526792j))*x[2]**o + ((-0.631221561319+0.652487889126j))*x[2]
            ref[(1, 0, 1, 1)]=(0.239338812429-0.448349736174j)-((0.192613271485-0.230249899364j))*(o-1.)
            arg[(1, 0, 1, 2)]=(-0.864158680993-0.815484075167j)*x[0]**o + ((0.503855460007-0.623136293271j))*x[0] + ((0.88524925451-0.453513740407j))*x[1]**o + ((-0.95598894457+0.599387241534j))*x[1] + ((0.397014024076-0.384019194974j))*x[2]**o + ((0.991842928249-0.379990654682j))*x[2]
            ref[(1, 0, 1, 2)]=(0.47890702064-1.02837835848j)-((0.069684099599-0.275502835091j))*(o-1.)
            arg[(1, 0, 1, 3)]=(0.282883079817+0.668837743209j)*x[0]**o + ((-0.648310788911+0.973803390958j))*x[0] + ((0.670444472723+0.139230775141j))*x[1]**o + ((0.595545770154+0.957860854187j))*x[1] + ((-0.604464720019-0.335696512819j))*x[2]**o + ((-0.60968493225-0.428947249156j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.156793559243+0.98754450076j)-((0.0581438054202+0.0787286675885j))*(o-1.)
            arg[(1, 0, 2, 0)]=(-0.487394865191+0.655020330522j)*x[0]**o + ((0.445728980475+0.135630045537j))*x[0] + ((0.187055516229-0.0240263885157j))*x[1]**o + ((0.0782715820298+0.863000478527j))*x[1] + ((0.869627788739-0.150282193952j))*x[2]**o + ((0.510209774548-0.160068510773j))*x[2]
            ref[(1, 0, 2, 0)]=(0.801749388414+0.659636880673j)-((0.0948814066294+0.0801186246757j))*(o-1.)
            arg[(1, 0, 2, 1)]=(0.00358739313214+0.766304704751j)*x[0]**o + ((-0.422794189732+0.120244771678j))*x[0] + ((-0.766217376181-0.0864079635924j))*x[1]**o + ((-0.691422990734+0.952949203085j))*x[1] + ((-0.228913085227-0.478046726034j))*x[2]**o + ((0.519348043567-0.10310503708j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.793206102588+0.585969476403j)-((-0.165257178046+0.0336416691875j))*(o-1.)
            arg[(1, 0, 2, 2)]=(-0.322867374786-0.743836979052j)*x[0]**o + ((0.519880312624-0.229938846475j))*x[0] + ((0.240147458124-0.754352599344j))*x[1]**o + ((-0.630759351386-0.949330131744j))*x[1] + ((-0.807140445625+0.801770186814j))*x[2]**o + ((0.418166534216-0.263380470273j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.291286433417-1.06953442004j)-((-0.148310060381-0.116069898597j))*(o-1.)
            arg[(1, 0, 2, 3)]=(-0.214996490264-0.344538215705j)*x[0]**o + ((0.411670566398+0.919476015804j))*x[0] + ((0.251393673848+0.476851197848j))*x[1]**o + ((-0.879575107739+0.411129656124j))*x[1] + ((0.320187010548+0.469914399861j))*x[2]**o + ((-0.451204309144+0.515576565978j))*x[2]
            ref[(1, 0, 2, 3)]=(-0.281262328177+1.22420480996j)-((0.0594306990219+0.100371230334j))*(o-1.)
            arg[(1, 1, 0, 0)]=(-0.295274205539+0.0526364892561j)*x[0]**o + ((0.0838106214683+0.739200265635j))*x[0] + ((0.97785994904+0.786380736998j))*x[1]**o + ((-0.297666933322+0.11310166266j))*x[1] + ((0.69431242716-0.386535702944j))*x[2]**o + ((0.500417118393-0.00613701419104j))*x[2]
            ref[(1, 1, 0, 0)]=(0.8317294886+0.649323218707j)-((0.229483028443+0.0754135872183j))*(o-1.)
            arg[(1, 1, 0, 1)]=(0.910699332221-0.17989517704j)*x[0]**o + ((0.00648085134407-0.170672363566j))*x[0] + ((-0.704355654173+0.919818637937j))*x[1]**o + ((-0.829208869576-0.636777945038j))*x[1] + ((0.953101591575-0.535680704843j))*x[2]**o + ((-0.209425560594-0.824227528485j))*x[2]
            ref[(1, 1, 0, 1)]=(0.0636458453985-0.713717540518j)-((0.193240878271+0.0340404593423j))*(o-1.)
            arg[(1, 1, 0, 2)]=(-0.256503975352+0.937189299198j)*x[0]**o + ((-0.98245251498-0.645362110453j))*x[0] + ((-0.375819085434+0.591559252156j))*x[1]**o + ((0.338744416715+0.678715373792j))*x[1] + ((-0.591997233676+0.0731917562872j))*x[2]**o + ((0.843685520866-0.144872026549j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.512171435931+0.745210772216j)-((-0.20405338241+0.266990051274j))*(o-1.)
            arg[(1, 1, 0, 3)]=(-0.168408915495-0.378835874935j)*x[0]**o + ((0.669936622701-0.485362670808j))*x[0] + ((0.636599781462+0.588159347801j))*x[1]**o + ((-0.468931671319+0.89415807855j))*x[1] + ((0.658580110862+0.728268902084j))*x[2]**o + ((0.905673904596+0.98401076942j))*x[2]
            ref[(1, 1, 0, 3)]=(1.1167249164+1.16519927606j)-((0.187795162805+0.156265395825j))*(o-1.)
            arg[(1, 1, 1, 0)]=(-0.0281508099849+0.744293508452j)*x[0]**o + ((-0.3879770914+0.804155169593j))*x[0] + ((-0.716818574142+0.536730220345j))*x[1]**o + ((0.355756177727+0.249884079817j))*x[1] + ((-0.935510937234-0.91107337714j))*x[2]**o + ((-0.999937167445+0.395278388486j))*x[2]
            ref[(1, 1, 1, 0)]=(-1.35631920124+0.909633994776j)-((-0.28008005356+0.0616583919428j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.880386793782+0.648910500589j)*x[0]**o + ((-0.594433810874-0.969774262954j))*x[0] + ((-0.312344738179-0.996021711912j))*x[1]**o + ((0.561872227136+0.294693712577j))*x[1] + ((0.94119230519+0.0577845766757j))*x[2]**o + ((0.795575529462+0.933835224784j))*x[2]
            ref[(1, 1, 1, 1)]=(1.13612415326-0.0152859801201j)-((0.251539060132-0.0482211057746j))*(o-1.)
            arg[(1, 1, 1, 2)]=(0.0824098198944-0.3611157461j)*x[0]**o + ((-0.447617855621+0.457162705197j))*x[0] + ((0.995927131936-0.723756464032j))*x[1]**o + ((-0.289114807381+0.595453616711j))*x[1] + ((0.00600141327198+0.16380686509j))*x[2]**o + ((0.917807270177+0.726491944804j))*x[2]
            ref[(1, 1, 1, 2)]=(0.632706486139+0.429021460835j)-((0.18072306085-0.15351089084j))*(o-1.)
            arg[(1, 1, 1, 3)]=(-0.06325935207+0.95823759893j)*x[0]**o + ((0.31522184045+0.453970972254j))*x[0] + ((0.99185965941-0.318780045276j))*x[1]**o + ((0.857885694613+0.945426645475j))*x[1] + ((-0.533461212461-0.707230633107j))*x[2]**o + ((0.343757335577-0.453827960954j))*x[2]
            ref[(1, 1, 1, 3)]=(0.95600198276+0.438898288661j)-((0.0658565158131-0.0112955132423j))*(o-1.)
            arg[(1, 1, 2, 0)]=(-0.86449898323-0.396404802792j)*x[0]**o + ((0.932392889729-0.0299529119538j))*x[0] + ((0.987868061985-0.354231136692j))*x[1]**o + ((-0.279931289617-0.121473821653j))*x[1] + ((0.643767733406+0.173045361471j))*x[2]**o + ((0.656635981617+0.716654649417j))*x[2]
            ref[(1, 1, 2, 0)]=(1.03811719695-0.00618133110152j)-((0.12785613536-0.0962650963356j))*(o-1.)
            arg[(1, 1, 2, 1)]=(-0.630609074404+0.420575559169j)*x[0]**o + ((-0.117599263148-0.943059910774j))*x[0] + ((-0.0662027498024+0.844024759079j))*x[1]**o + ((0.89563386163-0.40968540559j))*x[1] + ((0.768722558542+0.425901593542j))*x[2]**o + ((-0.015076052056+0.0887537956957j))*x[2]
            ref[(1, 1, 2, 1)]=(0.417434640381+0.213255195561j)-((0.0119851223893+0.281750318632j))*(o-1.)
            arg[(1, 1, 2, 2)]=(-0.0168083846612+0.807188593702j)*x[0]**o + ((-0.414396835412-0.741994683054j))*x[0] + ((0.150589975394-0.0640584239518j))*x[1]**o + ((-0.910630974623+0.0925183031142j))*x[1] + ((-0.514882173518-0.674725586285j))*x[2]**o + ((0.0750501324651-0.323338635817j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.815539130178-0.452205216146j)-((-0.0635167637975+0.0114007639109j))*(o-1.)
            arg[(1, 1, 2, 3)]=(-0.759597597026-0.434634010139j)*x[0]**o + ((0.142558896455+0.98832762756j))*x[0] + ((0.742492650769-0.467099464462j))*x[1]**o + ((0.0376586910642+0.867008892399j))*x[1] + ((-0.733617834997+0.436686281124j))*x[2]**o + ((0.55752250078+0.439608849344j))*x[2]
            ref[(1, 1, 2, 3)]=(-0.00649134647717+0.914949087913j)-((-0.125120463542-0.0775078655794j))*(o-1.)
            arg[(1, 2, 0, 0)]=(-0.46958095905-0.767610675264j)*x[0]**o + ((0.909055647804-0.0115360351498j))*x[0] + ((-0.575771400084-0.909163341882j))*x[1]**o + ((0.138980914351+0.626512504687j))*x[1] + ((-0.0984035464091+0.0335230138469j))*x[2]**o + ((-0.291307886632-0.66796403063j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.19351361501-0.848119282196j)-((-0.190625984257-0.273875167217j))*(o-1.)
            arg[(1, 2, 0, 1)]=(-0.376834589678-0.405416851373j)*x[0]**o + ((-0.78078604957-0.0837429582654j))*x[0] + ((-0.365921750075+0.330356672168j))*x[1]**o + ((0.286506571523-0.0795838398262j))*x[1] + ((0.230099370928+0.218850880462j))*x[2]**o + ((-0.484135180507+0.57962366379j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.745535813689+0.280043783477j)-((-0.0854428281375+0.0239651168761j))*(o-1.)
            arg[(1, 2, 0, 2)]=(-0.544030114804-0.143770110211j)*x[0]**o + ((-0.138174306208+0.615735839306j))*x[0] + ((-0.612684231672-0.0196858309879j))*x[1]**o + ((0.160577265157-0.850974516991j))*x[1] + ((0.623795935038-0.606469223635j))*x[2]**o + ((0.656161374765-0.107748844822j))*x[2]
            ref[(1, 2, 0, 2)]=(0.0728229611378-0.55645634367j)-((-0.0888197352396-0.128320860806j))*(o-1.)
            arg[(1, 2, 0, 3)]=(0.92775499777+0.201936892721j)*x[0]**o + ((-0.00427450343474-0.00362493443907j))*x[0] + ((0.127978025008-0.670125186933j))*x[1]**o + ((0.116055916939+0.252985680761j))*x[1] + ((0.971201142502-0.980801743857j))*x[2]**o + ((0.0124943048481-0.0240123012858j))*x[2]
            ref[(1, 2, 0, 3)]=(1.07560494182-0.611820796517j)-((0.33782236088-0.241498339678j))*(o-1.)
            arg[(1, 2, 1, 0)]=(0.332773747588+0.339617236204j)*x[0]**o + ((-0.0698357437255-0.486024699765j))*x[0] + ((0.732788157581-0.157545075449j))*x[1]**o + ((0.0203925755681-0.925759482537j))*x[1] + ((0.17834030785-0.640162456618j))*x[2]**o + ((0.259225869106+0.619725236153j))*x[2]
            ref[(1, 2, 1, 0)]=(0.726842456984-0.625074621006j)-((0.207317035503-0.0763483826439j))*(o-1.)
            arg[(1, 2, 1, 1)]=(0.699569505568+0.00481284957173j)*x[0]**o + ((0.781011917931+0.908954483041j))*x[0] + ((-0.896425200886+0.197985858166j))*x[1]**o + ((0.77293772573-0.784949893868j))*x[1] + ((-0.36209160645-0.893650855148j))*x[2]**o + ((-0.857788702443-0.484887878704j))*x[2]
            ref[(1, 2, 1, 1)]=(0.068606819725-0.525867718471j)-((-0.0931578836279-0.115142024568j))*(o-1.)
            arg[(1, 2, 1, 2)]=(-0.642257118774+0.490566016731j)*x[0]**o + ((-0.297751177421-0.499442956255j))*x[0] + ((-0.343640082888-0.0326423424484j))*x[1]**o + ((-0.342102924019+0.792208708385j))*x[1] + ((-0.986872913114-0.0184852904887j))*x[2]**o + ((-0.746115527909-0.426719084313j))*x[2]
            ref[(1, 2, 1, 2)]=(-1.67936987206+0.152742525806j)-((-0.328795019129+0.0732397306323j))*(o-1.)
            arg[(1, 2, 1, 3)]=(0.882639780176-0.804817551964j)*x[0]**o + ((0.499368284558-0.0176740980905j))*x[0] + ((0.0706940592708+0.841752748905j))*x[1]**o + ((-0.984645215378-0.57296195315j))*x[1] + ((0.675695364669+0.306354167945j))*x[2]**o + ((0.944185548977+0.186618237025j))*x[2]
            ref[(1, 2, 1, 3)]=(1.04396891114-0.0303642246646j)-((0.271504867353+0.0572148941478j))*(o-1.)
            arg[(1, 2, 2, 0)]=(0.78527451249-0.0279067022615j)*x[0]**o + ((0.53246453454+0.515831423019j))*x[0] + ((0.611431736741-0.0419336618593j))*x[1]**o + ((0.962266369001+0.661202974122j))*x[1] + ((-0.954800504105+0.0619820163894j))*x[2]**o + ((-0.254842817407-0.837892902288j))*x[2]
            ref[(1, 2, 2, 0)]=(0.84089691563+0.165641573561j)-((0.073650957521-0.00130972462191j))*(o-1.)
            arg[(1, 2, 2, 1)]=(0.99554482036-0.771105620434j)*x[0]**o + ((-0.845991779256-0.377037016218j))*x[0] + ((0.39950941159-0.720101727573j))*x[1]**o + ((-0.975897521722-0.112531705657j))*x[1] + ((-0.577175420993-0.747516228101j))*x[2]**o + ((-0.272283099296+0.348534732518j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.638146794658-1.18987878273j)-((0.136313135159-0.373120596018j))*(o-1.)
            arg[(1, 2, 2, 2)]=(-0.812135177321-0.389502986177j)*x[0]**o + ((0.540868429635-0.373966005051j))*x[0] + ((0.638082352646-0.933679639631j))*x[1]**o + ((-0.584221648881-0.628738257736j))*x[1] + ((-0.844616345656-0.376101171813j))*x[2]**o + ((-0.296247852703-0.413827547557j))*x[2]
            ref[(1, 2, 2, 2)]=(-0.67913512114-1.55790780398j)-((-0.169778195055-0.28321396627j))*(o-1.)
            arg[(1, 2, 2, 3)]=(0.187235706463-0.863065539632j)*x[0]**o + ((-0.0816907507638+0.108652944657j))*x[0] + ((0.306178687616+0.474022765934j))*x[1]**o + ((0.241526739349+0.944878139737j))*x[1] + ((-0.0902547454433+0.205766690516j))*x[2]**o + ((-0.942775861367-0.900192496995j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.189890112073-0.0149687478918j)-((0.0671932747726-0.0305460138637j))*(o-1.)
            arg[(1, 3, 0, 0)]=(0.373446547705+0.888989194247j)*x[0]**o + ((-0.244024621257+0.618751004942j))*x[0] + ((-0.951768785347+0.0402722692004j))*x[1]**o + ((0.482509470035-0.261750393703j))*x[1] + ((0.233665822675+0.608373658179j))*x[2]**o + ((0.308093105476-0.0316649262013j))*x[2]
            ref[(1, 3, 0, 0)]=(0.100960769644+0.931485403332j)-((-0.0574427358277+0.256272520271j))*(o-1.)
            arg[(1, 3, 0, 1)]=(0.963993951043-0.556505965657j)*x[0]**o + ((-0.829839486626+0.0500962467778j))*x[0] + ((0.801530687142-0.2348266485j))*x[1]**o + ((-0.919058796487-0.177078039326j))*x[1] + ((-0.46822599021+0.758040060623j))*x[2]**o + ((0.800447697902-0.472783087683j))*x[2]
            ref[(1, 3, 0, 1)]=(0.174424031382-0.316528716882j)-((0.216216441329-0.00554875892236j))*(o-1.)
            arg[(1, 3, 0, 2)]=(0.231041252204-0.719835901012j)*x[0]**o + ((-0.0637949864345+0.619265817086j))*x[0] + ((-0.623153312109-0.468938645682j))*x[1]**o + ((-0.522379861759+0.920518487573j))*x[1] + ((-0.449044910087-0.737028632853j))*x[2]**o + ((0.0327421820622+0.162227424411j))*x[2]
            ref[(1, 3, 0, 2)]=(-0.697294818062-0.111895725238j)-((-0.140192828332-0.320967196591j))*(o-1.)
            arg[(1, 3, 0, 3)]=(-0.708419817755-0.341401043502j)*x[0]**o + ((0.748129193074+0.370679164293j))*x[0] + ((-0.335877889943+0.0661685465217j))*x[1]**o + ((0.540749753143-0.631685391975j))*x[1] + ((0.141128563575-0.361734402615j))*x[2]**o + ((-0.77334532005+0.656443509715j))*x[2]
            ref[(1, 3, 0, 3)]=(-0.193817758979-0.120764808781j)-((-0.150528190687-0.106161149933j))*(o-1.)
            arg[(1, 3, 1, 0)]=(0.54294021606+0.33942664165j)*x[0]**o + ((0.583774879585+0.643117845388j))*x[0] + ((0.389883091338+0.625940971255j))*x[1]**o + ((0.106010534478+0.849243081285j))*x[1] + ((0.590978687667+0.831599541454j))*x[2]**o + ((0.715886304254-0.802146252396j))*x[2]
            ref[(1, 3, 1, 0)]=(1.46473685669+1.24359091432j)-((0.253966999178+0.299494525727j))*(o-1.)
            arg[(1, 3, 1, 1)]=(-0.833801291343-0.481829201969j)*x[0]**o + ((0.493205464781-0.264182377465j))*x[0] + ((-0.398421430591+0.859141893182j))*x[1]**o + ((-0.174930901695+0.252309695778j))*x[1] + ((0.729974428031-0.428149254567j))*x[2]**o + ((-0.798787178037-0.532191970107j))*x[2]
            ref[(1, 3, 1, 1)]=(-0.491380454427-0.297450607574j)-((-0.0837080489838-0.00847276055896j))*(o-1.)
            arg[(1, 3, 1, 2)]=(0.989444074641-0.173910012737j)*x[0]**o + ((0.227156783136+0.541098624804j))*x[0] + ((-0.88838652431+0.43066944643j))*x[1]**o + ((-0.876530171306-0.800859751217j))*x[1] + ((0.214936093263+0.0414391295777j))*x[2]**o + ((0.276292788705-0.975760247423j))*x[2]
            ref[(1, 3, 1, 2)]=(-0.0285434779361-0.468661405283j)-((0.0526656072656+0.0496997605452j))*(o-1.)
            arg[(1, 3, 1, 3)]=(0.664776315279+0.519438253789j)*x[0]**o + ((0.15406242698+0.122344065075j))*x[0] + ((-0.54009706579+0.645430818255j))*x[1]**o + ((0.0251581745834+0.487585241538j))*x[1] + ((0.154854719724+0.0149990785892j))*x[2]**o + ((-0.474137197146+0.130598645971j))*x[2]
            ref[(1, 3, 1, 3)]=(-0.00769131318431+0.960198051608j)-((0.0465889948689+0.196644691772j))*(o-1.)
            arg[(1, 3, 2, 0)]=(-0.539921030947-0.684311113492j)*x[0]**o + ((0.855859119999-0.802140518413j))*x[0] + ((-0.247207982242-0.533686499158j))*x[1]**o + ((0.322193856163-0.171997127212j))*x[1] + ((0.791329354867+0.777776046766j))*x[2]**o + ((-0.742755489576-0.487228304835j))*x[2]
            ref[(1, 3, 2, 0)]=(0.219748914132-0.950793758172j)-((0.000700056946209-0.0733702609806j))*(o-1.)
            arg[(1, 3, 2, 1)]=(-0.0260777163431-0.133278925141j)*x[0]**o + ((-0.0224277787235+0.00661115371379j))*x[0] + ((0.280122124427+0.196529556258j))*x[1]**o + ((-0.250671385888+0.167404353713j))*x[1] + ((0.22855901071+0.380931071868j))*x[2]**o + ((-0.805100167334-0.946425904518j))*x[2]
            ref[(1, 3, 2, 1)]=(-0.297797956576-0.164114347053j)-((0.0804339031323+0.0740302838309j))*(o-1.)
            arg[(1, 3, 2, 2)]=(-0.290591417879-0.532919049581j)*x[0]**o + ((-0.872448573918-0.828488503696j))*x[0] + ((0.741404943481-0.619451563618j))*x[1]**o + ((0.0213817713306-0.0972388243162j))*x[1] + ((0.777655427794-0.360204531718j))*x[2]**o + ((-0.557123931725+0.265447035954j))*x[2]
            ref[(1, 3, 2, 2)]=(-0.0898608904579-1.08642771849j)-((0.204744825566-0.252095857486j))*(o-1.)
            arg[(1, 3, 2, 3)]=(-0.575711344493-0.978720321048j)*x[0]**o + ((-0.440600747247+0.323822657807j))*x[0] + ((0.294752250936-0.709491411588j))*x[1]**o + ((-0.548733960059-0.280169435344j))*x[1] + ((-0.935571652288+0.609343529013j))*x[2]**o + ((-0.988878958653-0.91068403687j))*x[2]
            ref[(1, 3, 2, 3)]=(-1.5973722059-0.972949509015j)-((-0.202755124307-0.17981136727j))*(o-1.)
            arg[(2, 0, 0, 0)]=(-0.199317355741+0.865648797777j)*x[0]**o + ((0.0970524889375+0.465558793083j))*x[0] + ((-0.892897504946-0.349365953127j))*x[1]**o + ((0.549287351158+0.327812805038j))*x[1] + ((-0.551905986111+0.675449868886j))*x[2]**o + ((-0.247367436458+0.859652982642j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.62257422158+1.42237864715j)-((-0.274020141133+0.198622118923j))*(o-1.)
            arg[(2, 0, 0, 1)]=(-0.658651049623-0.498780846217j)*x[0]**o + ((0.118397385707-0.266377268814j))*x[0] + ((0.744713260323+0.636752726891j))*x[1]**o + ((0.878877863798+0.472233542534j))*x[1] + ((0.937522795175+0.166433053478j))*x[2]**o + ((-0.850574458402-0.289593311135j))*x[2]
            ref[(2, 0, 0, 1)]=(0.585142898489+0.110333948368j)-((0.170597500979+0.050734155692j))*(o-1.)
            arg[(2, 0, 0, 2)]=(-0.512148900952-0.446600571309j)*x[0]**o + ((0.456419582072+0.607189136569j))*x[0] + ((-0.192348880309+0.0843383624285j))*x[1]**o + ((-0.623376866405-0.16974267261j))*x[1] + ((0.183309645774-0.462487799815j))*x[2]**o + ((-0.663154316534-0.294703935058j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.675649868177-0.341003739897j)-((-0.0868646892478-0.137458334782j))*(o-1.)
            arg[(2, 0, 0, 3)]=(0.6841748666+0.692585557542j)*x[0]**o + ((-0.145494787957-0.220811514068j))*x[0] + ((0.447174880727-0.0411560182431j))*x[1]**o + ((-0.8358840135-0.844879708135j))*x[1] + ((-0.994239068995-0.76735984264j))*x[2]**o + ((-0.717429250018+0.452156144497j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.780848686571-0.364732690524j)-((0.022851779722-0.0193217172236j))*(o-1.)
            arg[(2, 0, 1, 0)]=(0.940532892504-0.9240368621j)*x[0]**o + ((-0.520745888035-0.131206179976j))*x[0] + ((-0.200827769307+0.230986074724j))*x[1]**o + ((-0.855694256008-0.278213603336j))*x[1] + ((0.862291540088-0.580880153622j))*x[2]**o + ((-0.815603769675+0.552612229812j))*x[2]
            ref[(2, 0, 1, 0)]=(-0.295023625217-0.565369247249j)-((0.266999443881-0.2123218235j))*(o-1.)
            arg[(2, 0, 1, 1)]=(0.00246355029728+0.89514246934j)*x[0]**o + ((0.286437279732-0.93090789727j))*x[0] + ((-0.72305567644-0.146349627673j))*x[1]**o + ((0.638799398833+0.0248395867002j))*x[1] + ((-0.945351715419-0.632177471883j))*x[2]**o + ((-0.108184955993+0.41937182628j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.424446059495-0.185040557253j)-((-0.277657306927+0.019435894964j))*(o-1.)
            arg[(2, 0, 1, 2)]=(-0.71561989519-0.930731705547j)*x[0]**o + ((-0.0604197185163-0.330746247102j))*x[0] + ((0.120444510293-0.923451348799j))*x[1]**o + ((0.188930116505+0.467930941813j))*x[1] + ((0.383282708614+0.622555991358j))*x[2]**o + ((0.680971792662+0.0759625157163j))*x[2]
            ref[(2, 0, 1, 2)]=(0.298794757183-0.50923992628j)-((-0.0353154460473-0.205271177165j))*(o-1.)
            arg[(2, 0, 1, 3)]=(-0.79594203006-0.146488841203j)*x[0]**o + ((0.706391581637+0.858195155116j))*x[0] + ((-0.899942712961-0.941978541273j))*x[1]**o + ((-0.935964567407+0.577639844132j))*x[1] + ((-0.293804138543-0.629933320359j))*x[2]**o + ((-0.416768153155-0.857559218181j))*x[2]
            ref[(2, 0, 1, 3)]=(-1.31801501024-0.570062460884j)-((-0.331614813594-0.286400117139j))*(o-1.)
            arg[(2, 0, 2, 0)]=(0.862186229723+0.74354861666j)*x[0]**o + ((-0.677330382453+0.1634128014j))*x[0] + ((0.194390964339-0.491306836725j))*x[1]**o + ((0.237084866128+0.10322633343j))*x[1] + ((-0.0283195386207+0.273321608169j))*x[2]**o + ((-0.458116328869-0.911499953542j))*x[2]
            ref[(2, 0, 2, 0)]=(0.0649479051235-0.0596487153033j)-((0.171376275907+0.0875938980175j))*(o-1.)
            arg[(2, 0, 2, 1)]=(0.440049505369-0.299993321648j)*x[0]**o + ((0.848560923098+0.8453185466j))*x[0] + ((-0.495018841024-0.298257535652j))*x[1]**o + ((-0.354711895161+0.501768059104j))*x[1] + ((-0.423440109515-0.849394960354j))*x[2]**o + ((0.234142975422-0.618439741263j))*x[2]
            ref[(2, 0, 2, 1)]=(0.124791279094-0.359499476607j)-((-0.0797349075283-0.241274302942j))*(o-1.)
            arg[(2, 0, 2, 2)]=(0.809066994716+0.300602293452j)*x[0]**o + ((0.298590819543+0.524128584794j))*x[0] + ((-0.0227411387521-0.364459139431j))*x[1]**o + ((-0.196532424389+0.944954810033j))*x[1] + ((0.0241113584954-0.644938364919j))*x[2]**o + ((0.284607973217+0.259259767113j))*x[2]
            ref[(2, 0, 2, 2)]=(0.598551791415+0.509773975521j)-((0.135072869077-0.11813253515j))*(o-1.)
            arg[(2, 0, 2, 3)]=(0.546013745861-0.977545075402j)*x[0]**o + ((0.167047997117+0.35115551765j))*x[0] + ((0.871310887025-0.552800643536j))*x[1]**o + ((0.477957337896-0.112063379499j))*x[1] + ((0.778556372653+0.0470587393883j))*x[2]**o + ((-0.625426087966+0.886849953532j))*x[2]
            ref[(2, 0, 2, 3)]=(1.10773012629-0.178672443933j)-((0.36598016759-0.247214496592j))*(o-1.)
            arg[(2, 1, 0, 0)]=(0.776891394054-0.442273620549j)*x[0]**o + ((-0.237737112371+0.458288242741j))*x[0] + ((-0.585165143531+0.336542090803j))*x[1]**o + ((-0.342241669585+0.843298166771j))*x[1] + ((-0.572292687421+0.435540193401j))*x[2]**o + ((0.818220450215+0.371487968411j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.0711623843196+1.00144152079j)-((-0.0634277394831+0.0549681106093j))*(o-1.)
            arg[(2, 1, 0, 1)]=(-0.473034253506-0.650558595633j)*x[0]**o + ((-0.678739713821-0.219804289996j))*x[0] + ((0.7857697981-0.434904417596j))*x[1]**o + ((-0.187037226643-0.169988978796j))*x[1] + ((-0.832677027893-0.834074809147j))*x[2]**o + ((0.083752919783+0.155980431259j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.65098275199-1.07667532995j)-((-0.0866569138833-0.319922970396j))*(o-1.)
            arg[(2, 1, 0, 2)]=(-0.346604873604-0.714890126062j)*x[0]**o + ((0.721633894625+0.244664376941j))*x[0] + ((0.289809743396+0.172191752366j))*x[1]**o + ((-0.368247139468-0.290562131756j))*x[1] + ((-0.897199371341+0.259659250739j))*x[2]**o + ((-0.727542357997-0.795929848604j))*x[2]
            ref[(2, 1, 0, 2)]=(-0.664075052195-0.562433363188j)-((-0.158999083591-0.0471731871596j))*(o-1.)
            arg[(2, 1, 0, 3)]=(0.337387813571+0.97843701585j)*x[0]**o + ((0.704163912393+0.617865792186j))*x[0] + ((-0.023348197308-0.365767351776j))*x[1]**o + ((0.63473377861-0.417783629385j))*x[1] + ((-0.500730397017+0.55480919674j))*x[2]**o + ((0.0757122826865-0.999194831756j))*x[2]
            ref[(2, 1, 0, 3)]=(0.613959596468+0.18418309593j)-((-0.0311151301256+0.194579810136j))*(o-1.)
            arg[(2, 1, 1, 0)]=(0.522619483687-0.996161393513j)*x[0]**o + ((-0.321378252562-0.213560397516j))*x[0] + ((-0.300091289411-0.73159614794j))*x[1]**o + ((0.971490450817+0.223966869622j))*x[1] + ((-0.202070683536+0.574858096888j))*x[2]**o + ((-0.747932879811-0.898877467934j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.038681585408-1.0206852202j)-((0.00340958512333-0.192149907427j))*(o-1.)
            arg[(2, 1, 1, 1)]=(0.442945804181+0.285069134871j)*x[0]**o + ((0.946998189771+0.290411497164j))*x[0] + ((0.202644396369-0.860386836798j))*x[1]**o + ((0.285737541157-0.263480857305j))*x[1] + ((-0.937585539771-0.399939716842j))*x[2]**o + ((0.3065648598+0.500314442343j))*x[2]
            ref[(2, 1, 1, 1)]=(0.623652625754-0.224006168283j)-((-0.0486658898701-0.162542903128j))*(o-1.)
            arg[(2, 1, 1, 2)]=(0.372743600281+0.879622029197j)*x[0]**o + ((0.365263808167-0.299458532707j))*x[0] + ((-0.239008606459-0.51307872815j))*x[1]**o + ((-0.776148826452-0.231813408376j))*x[1] + ((-0.435553914435-0.344845216756j))*x[2]**o + ((-0.841657961699+0.171997342281j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.777180950298-0.168788257256j)-((-0.0503031534356+0.00361634738177j))*(o-1.)
            arg[(2, 1, 1, 3)]=(0.593247268844+0.827419931033j)*x[0]**o + ((0.856950615841-0.314969324232j))*x[0] + ((-0.841580848585-0.493745417393j))*x[1]**o + ((0.257543362233-0.386910520728j))*x[1] + ((0.273217845705-0.450926014499j))*x[2]**o + ((-0.145579733461+0.785091051071j))*x[2]
            ref[(2, 1, 1, 3)]=(0.496899255289-0.0170201473739j)-((0.00414737766083-0.0195419168099j))*(o-1.)
            arg[(2, 1, 2, 0)]=(-0.0471071758564-0.00187891070657j)*x[0]**o + ((-0.364984918707+0.269320549579j))*x[0] + ((0.691230231726-0.622947875644j))*x[1]**o + ((0.761006916317-0.19379318298j))*x[1] + ((-0.110046758295-0.481203537357j))*x[2]**o + ((-0.982045487212-0.189711402049j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.025973596014-0.610107179579j)-((0.0890127162624-0.184338387285j))*(o-1.)
            arg[(2, 1, 2, 1)]=(-0.191496420463+0.659653321274j)*x[0]**o + ((0.31057813182+0.162395870702j))*x[0] + ((0.74904930821+0.728618069194j))*x[1]**o + ((0.9153073701+0.553941556076j))*x[1] + ((-0.130862819392-0.898372968881j))*x[2]**o + ((0.028579541742+0.158898526426j))*x[2]
            ref[(2, 1, 2, 1)]=(0.840577556009+0.682567187396j)-((0.0711150113926+0.0816497369312j))*(o-1.)
            arg[(2, 1, 2, 2)]=(0.450287643442+0.450410717789j)*x[0]**o + ((-0.196884535996-0.782788594014j))*x[0] + ((-0.643078826282+0.49902076872j))*x[1]**o + ((-0.38951722403+0.408754609222j))*x[1] + ((-0.464315943873-0.267525703925j))*x[2]**o + ((-0.666716563719+0.753165913717j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.955112725229+0.530518855755j)-((-0.109517854452+0.113650963764j))*(o-1.)
            arg[(2, 1, 2, 3)]=(-0.549361454541-0.197564389664j)*x[0]**o + ((0.683515730367+0.97201359553j))*x[0] + ((0.472183087147-0.824926311855j))*x[1]**o + ((-0.91145110597+0.513440769312j))*x[1] + ((0.820542330212-0.383107428674j))*x[2]**o + ((0.765594798417+0.732871879494j))*x[2]
            ref[(2, 1, 2, 3)]=(0.640511692816+0.406364057072j)-((0.123893993803-0.234266355032j))*(o-1.)
            arg[(2, 2, 0, 0)]=(0.112333882477-0.713014331413j)*x[0]**o + ((0.718172278049+0.844315121172j))*x[0] + ((-0.42632699945+0.149770687275j))*x[1]**o + ((-0.195412365612+0.646031507987j))*x[1] + ((0.916189428813+0.514797622669j))*x[2]**o + ((-0.168365430478-0.476828978252j))*x[2]
            ref[(2, 2, 0, 0)]=(0.478295396899+0.482535814719j)-((0.100366051973-0.00807433691153j))*(o-1.)
            arg[(2, 2, 0, 1)]=(0.824469232152-0.347640509027j)*x[0]**o + ((0.331802925866-0.49090083721j))*x[0] + ((0.66135175217-0.394922546611j))*x[1]**o + ((0.896023994453+0.275888258199j))*x[1] + ((-0.278542944584-0.122214199919j))*x[2]**o + ((5.73278560743e-05+0.260265527051j))*x[2]
            ref[(2, 2, 0, 1)]=(1.21758114396-0.409762153759j)-((0.201213006623-0.144129542593j))*(o-1.)
            arg[(2, 2, 0, 2)]=(0.745468885438+0.13083116725j)*x[0]**o + ((-0.619408892111-0.470722791794j))*x[0] + ((-0.195538063276-0.62625653652j))*x[1]**o + ((-0.619116899706-0.0459550930047j))*x[1] + ((-0.701303125406+0.789648654328j))*x[2]**o + ((0.37216044432-0.456792223005j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.508868825371-0.339623411373j)-((-0.0252287172074+0.0490372141763j))*(o-1.)
            arg[(2, 2, 0, 3)]=(-0.878790390027+0.331062500521j)*x[0]**o + ((0.199610292915-0.984807316752j))*x[0] + ((0.74443042353+0.769025207085j))*x[1]**o + ((-0.852731579963-0.605980277548j))*x[1] + ((-0.836874233107+0.842833148403j))*x[2]**o + ((-0.402995250513-0.280715023043j))*x[2]
            ref[(2, 2, 0, 3)]=(-1.01367536858+0.0357091193327j)-((-0.161872366601+0.323820142668j))*(o-1.)
            arg[(2, 2, 1, 0)]=(0.793373937561-0.83422143529j)*x[0]**o + ((-0.47376347773-0.0724564403269j))*x[0] + ((0.447997675069-0.662054838957j))*x[1]**o + ((0.545640780114+0.878368920557j))*x[1] + ((0.9911244336-0.671256933477j))*x[2]**o + ((-0.533252237009-0.761921928868j))*x[2]
            ref[(2, 2, 1, 0)]=(0.885560555802-1.06177132818j)-((0.372082674372-0.361255534621j))*(o-1.)
            arg[(2, 2, 1, 1)]=(0.158751274556+0.156019886507j)*x[0]**o + ((0.265719604976+0.372587534523j))*x[0] + ((0.0748326834904+0.748755046932j))*x[1]**o + ((-0.137301192489+0.292624935153j))*x[1] + ((-0.513124496093-0.119076889988j))*x[2]**o + ((0.281478576596-0.734568222404j))*x[2]
            ref[(2, 2, 1, 1)]=(0.0651782255179+0.358171145362j)-((-0.0465900896744+0.130949673909j))*(o-1.)
            arg[(2, 2, 1, 2)]=(0.27652071404-0.032061047653j)*x[0]**o + ((0.333699280572-0.711598950165j))*x[0] + ((-0.471894251319-0.115547405206j))*x[1]**o + ((0.707887879793-0.4546684168j))*x[1] + ((0.0221670767035+0.253071230774j))*x[2]**o + ((-0.851039721843-0.772629717161j))*x[2]
            ref[(2, 2, 1, 2)]=(0.00867048897318-0.916717153105j)-((-0.0288677434293+0.0175771296526j))*(o-1.)
            arg[(2, 2, 1, 3)]=(0.871786739041-0.16054084211j)*x[0]**o + ((-0.864004059805+0.562326750302j))*x[0] + ((-0.612725772868+0.559415631397j))*x[1]**o + ((0.553531460103+0.578708959099j))*x[1] + ((-0.476069066975+0.0606757626114j))*x[2]**o + ((-0.0617434137339+0.218526519279j))*x[2]
            ref[(2, 2, 1, 3)]=(-0.294612057119+0.90955639029j)-((-0.0361680168004+0.0765917586498j))*(o-1.)
            arg[(2, 2, 2, 0)]=(0.155232457133+0.317521858425j)*x[0]**o + ((0.119526908268-0.42476821298j))*x[0] + ((-0.664627686074-0.719849046089j))*x[1]**o + ((-0.499842335718+0.869081178283j))*x[1] + ((-0.553112275158+0.730909109641j))*x[2]**o + ((-0.597072755869+0.339494088292j))*x[2]
            ref[(2, 2, 2, 0)]=(-1.01994784371+0.556194487786j)-((-0.177084584016+0.054763653663j))*(o-1.)
            arg[(2, 2, 2, 1)]=(0.325453086144+0.262319293562j)*x[0]**o + ((-0.290863449719+0.582324300543j))*x[0] + ((-0.0946219665714+0.0807673764889j))*x[1]**o + ((0.263390709938-0.0951162696842j))*x[1] + ((-0.53704765363-0.167609513095j))*x[2]**o + ((-0.616030169129+0.0925029992747j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.474859721484+0.377594093544j)-((-0.0510360890095+0.0292461928259j))*(o-1.)
            arg[(2, 2, 2, 2)]=(0.224648128517+0.3594146436j)*x[0]**o + ((-0.616933536029-0.852767897926j))*x[0] + ((-0.950307362306+0.381831558055j))*x[1]**o + ((0.135161784768+0.852683110994j))*x[1] + ((0.776015029322+0.457449888674j))*x[2]**o + ((-0.395425496579+0.613598549246j))*x[2]
            ref[(2, 2, 2, 2)]=(-0.413420726154+0.906104926321j)-((0.00839263258879+0.199782681721j))*(o-1.)
            arg[(2, 2, 2, 3)]=(0.276194675101-0.0809246423578j)*x[0]**o + ((0.216280858116+0.972544272397j))*x[0] + ((-0.328721875906-0.0964997958201j))*x[1]**o + ((0.913253112471+0.469291595585j))*x[1] + ((-0.967227832688-0.760499428321j))*x[2]**o + ((0.474547119057-0.386606331043j))*x[2]
            ref[(2, 2, 2, 3)]=(0.292163028075+0.0586528352197j)-((-0.169959172249-0.156320644417j))*(o-1.)
            arg[(2, 3, 0, 0)]=(-0.656571072736-0.902404946376j)*x[0]**o + ((-0.886766828753+0.161357177736j))*x[0] + ((-0.120676755008-0.814085163792j))*x[1]**o + ((0.728695950487-0.68969250278j))*x[1] + ((0.257460541666+0.770289344424j))*x[2]**o + ((-0.0385741146017+0.918817117943j))*x[2]
            ref[(2, 3, 0, 0)]=(-0.358216139472-0.277859486423j)-((-0.0866312143462-0.157700127624j))*(o-1.)
            arg[(2, 3, 0, 1)]=(0.717014928392-0.57049869327j)*x[0]**o + ((-0.0406610339249-0.693797780215j))*x[0] + ((-0.0604991673225-0.0515894925907j))*x[1]**o + ((0.29590604794-0.223967173411j))*x[1] + ((0.545261847283+0.536380677906j))*x[2]**o + ((0.00472854559211+0.801632804221j))*x[2]
            ref[(2, 3, 0, 1)]=(0.730875583979-0.10091982868j)-((0.200296268059-0.0142845846592j))*(o-1.)
            arg[(2, 3, 0, 2)]=(0.391274254458-0.514694690511j)*x[0]**o + ((-0.373042111663-0.931687749992j))*x[0] + ((0.666187051946+0.719686852312j))*x[1]**o + ((-0.67475746713+0.408179583806j))*x[1] + ((0.628955134382-0.68658253206j))*x[2]**o + ((0.950393427129-0.900858713571j))*x[2]
            ref[(2, 3, 0, 2)]=(0.794505144561-0.952978625008j)-((0.281069406798-0.0802650617098j))*(o-1.)
            arg[(2, 3, 0, 3)]=(-0.656038080786-0.350992347423j)*x[0]**o + ((-0.960404635803-0.813752441046j))*x[0] + ((0.994184296278-0.179714588702j))*x[1]**o + ((0.153497022717+0.970960574765j))*x[1] + ((0.844349684726-0.980353713651j))*x[2]**o + ((0.351829329812-0.0414260026397j))*x[2]
            ref[(2, 3, 0, 3)]=(0.363708808472-0.697639259349j)-((0.197082650036-0.251843441629j))*(o-1.)
            arg[(2, 3, 1, 0)]=(-0.677414899279+0.270375464956j)*x[0]**o + ((-0.0346119110731-0.089020390789j))*x[0] + ((0.947286734833-0.129438130581j))*x[1]**o + ((0.240096359342+0.733113780419j))*x[1] + ((0.408849025158+0.126564305852j))*x[2]**o + ((-0.178071657982-0.353325721104j))*x[2]
            ref[(2, 3, 1, 0)]=(0.3530668255+0.279134654376j)-((0.113120143452+0.0445836067045j))*(o-1.)
            arg[(2, 3, 1, 1)]=(0.359078212071+0.524786983789j)*x[0]**o + ((-0.949494218781+0.555839852746j))*x[0] + ((-0.352765137761-0.128774936873j))*x[1]**o + ((0.0769644491628+0.762539142903j))*x[1] + ((0.853226868612+0.448109502402j))*x[2]**o + ((-0.969293982065+0.435387911444j))*x[2]
            ref[(2, 3, 1, 1)]=(-0.491141904381+1.29894422821j)-((0.143256657154+0.140686924886j))*(o-1.)
            arg[(2, 3, 1, 2)]=(0.657588019929-0.838760867249j)*x[0]**o + ((0.0104962925381+0.679363169781j))*x[0] + ((-0.947810021242+0.461093394639j))*x[1]**o + ((-0.865990213048-0.737342028334j))*x[1] + ((0.33313630639+0.644111429033j))*x[2]**o + ((0.541888811748+0.0423025523353j))*x[2]
            ref[(2, 3, 1, 2)]=(-0.135345401843+0.125383825103j)-((0.00715238417943+0.0444073260705j))*(o-1.)
            arg[(2, 3, 1, 3)]=(-0.968824707558+0.167896440164j)*x[0]**o + ((-0.138504625542+0.275941934922j))*x[0] + ((-0.942960805285+0.77439312113j))*x[1]**o + ((0.722481753416+0.836864290935j))*x[1] + ((-0.416078889968+0.0722391542129j))*x[2]**o + ((-0.641461894368-0.661802411731j))*x[2]
            ref[(2, 3, 1, 3)]=(-1.19267458465+0.732766264816j)-((-0.387977400469+0.169088119251j))*(o-1.)
            arg[(2, 3, 2, 0)]=(-0.907994613668+0.832528276706j)*x[0]**o + ((-0.0059813180479-0.623139897534j))*x[0] + ((0.493742062179-0.115547341066j))*x[1]**o + ((0.791342818941-0.486094732629j))*x[1] + ((0.587464492192-0.425983924324j))*x[2]**o + ((0.415662449756-0.13233675344j))*x[2]
            ref[(2, 3, 2, 0)]=(0.687117945676-0.475287186144j)-((0.0288686567839+0.048499501886j))*(o-1.)
            arg[(2, 3, 2, 1)]=(-0.244334587197-0.905351410685j)*x[0]**o + ((0.632681320886-0.79971401418j))*x[0] + ((0.656133454631-0.301713982343j))*x[1]**o + ((-0.70914113275+0.677696085377j))*x[1] + ((0.650937111795-0.250913383415j))*x[2]**o + ((-0.215267910557+0.984165782615j))*x[2]
            ref[(2, 3, 2, 1)]=(0.385504128404-0.297915461316j)-((0.177122663205-0.242996462741j))*(o-1.)
            arg[(2, 3, 2, 2)]=(-0.68680862724-0.0485876880289j)*x[0]**o + ((-0.700571584196+0.390150086045j))*x[0] + ((0.0612158476396-0.301352007173j))*x[1]**o + ((0.831781414328-0.443243844829j))*x[1] + ((-0.617411838546-0.0826847328565j))*x[2]**o + ((-0.0836390205517+0.710818854121j))*x[2]
            ref[(2, 3, 2, 2)]=(-0.597716904283+0.112550333639j)-((-0.207167436358-0.072104071343j))*(o-1.)
            arg[(2, 3, 2, 3)]=(0.162045056877+0.600076117248j)*x[0]**o + ((0.649129540063-0.828535568233j))*x[0] + ((-0.9863498619+0.123292631461j))*x[1]**o + ((0.488516171931+0.340787964138j))*x[1] + ((0.482189818715-0.0479207308317j))*x[2]**o + ((-0.736111796024+0.740778052903j))*x[2]
            ref[(2, 3, 2, 3)]=(0.0297094648314+0.464239233342j)-((-0.0570191643846+0.112574669646j))*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.413158804865-0.0102734045722j)*x[0] + ((-0.542838213649+0.37616470416j))*x[1]
            ref=(-0.0648397043921+0.182945649794j)
        else:
            arg=(-0.87238838479+0.465055331366j)*x[0] + ((-0.476423818121-0.247359942012j))*x[1] + ((0.184430924532-0.39199247784j))*x[2]
            ref=(-0.58219063919-0.0871485442427j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.12144649708-0.918224620021j)*x[0] + ((-0.802750502716+0.282114790615j))*x[1]
            ref[(0,)]=(-0.462098499898-0.318054914703j)
            arg[(1,)]=(-0.780034806704+0.312327345719j)*x[0] + ((0.473935431337-0.557478968593j))*x[1]
            ref[(1,)]=(-0.153049687684-0.122575811437j)
            arg[(2,)]=(-0.46716991632-0.196269079237j)*x[0] + ((0.135462713887-0.653687031785j))*x[1]
            ref[(2,)]=(-0.165853601216-0.424978055511j)
            arg[(3,)]=(-0.0103821000842+0.876058903099j)*x[0] + ((-0.869279756499+0.294124485577j))*x[1]
            ref[(3,)]=(-0.439830928291+0.585091694338j)
        else:
            arg[(0,)]=(0.00287909419752+0.969380890611j)*x[0] + ((-0.286026723735+0.374472281292j))*x[1] + ((-0.0789198243362+0.874286794358j))*x[2]
            ref[(0,)]=(-0.181033726937+1.10906998313j)
            arg[(1,)]=(-0.0122508545645+0.553189007752j)*x[0] + ((-0.783922851515+0.604938246803j))*x[1] + ((0.936987681831+0.377124620624j))*x[2]
            ref[(1,)]=(0.0704069878758+0.767625937589j)
            arg[(2,)]=(-0.556189055082+0.226961290804j)*x[0] + ((0.656130157967-0.687624133115j))*x[1] + ((0.802302895804-0.988535601552j))*x[2]
            ref[(2,)]=(0.451121999345-0.724599221932j)
            arg[(3,)]=(-0.417589987064-0.667531262114j)*x[0] + ((0.65308040807+0.0926153063121j))*x[1] + ((-0.525624509674-0.262121849838j))*x[2]
            ref[(3,)]=(-0.145067044334-0.41851890282j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref=numpy.zeros((2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.956102707769-0.028258491544j)*x[0] + ((0.834388100824+0.406200174737j))*x[1]
            ref[(0, 0)]=(0.895245404296+0.188970841596j)
            arg[(0, 1)]=(0.239500831199+0.793790394302j)*x[0] + ((-0.903722869791+0.298776181344j))*x[1]
            ref[(0, 1)]=(-0.332111019296+0.546283287823j)
            arg[(0, 2)]=(0.224422612204+0.344914921173j)*x[0] + ((0.462336455793-0.215575459196j))*x[1]
            ref[(0, 2)]=(0.343379533999+0.0646697309885j)
            arg[(1, 0)]=(0.544845448904-0.186723243379j)*x[0] + ((0.379454435167+0.324191089077j))*x[1]
            ref[(1, 0)]=(0.462149942035+0.0687339228489j)
            arg[(1, 1)]=(-0.0637240552364+0.666615011091j)*x[0] + ((0.676715760826-0.685013337656j))*x[1]
            ref[(1, 1)]=(0.306495852795-0.00919916328288j)
            arg[(1, 2)]=(-0.997394042316-0.0312905835973j)*x[0] + ((0.507554273144+0.127726826824j))*x[1]
            ref[(1, 2)]=(-0.244919884586+0.0482181216131j)
        else:
            arg[(0, 0)]=(-0.116592568109-0.764333346504j)*x[0] + ((-0.351788033298+0.0470118319873j))*x[1] + ((0.838394501877+0.1907248553j))*x[2]
            ref[(0, 0)]=(0.185006950235-0.263298329608j)
            arg[(0, 1)]=(-0.692416076002+0.263242432846j)*x[0] + ((-0.000106875846724+0.982390171531j))*x[1] + ((0.523211179158-0.646316629523j))*x[2]
            ref[(0, 1)]=(-0.0846558863454+0.299657987427j)
            arg[(0, 2)]=(0.143008702195+0.24850033635j)*x[0] + ((0.60848506922-0.881329864685j))*x[1] + ((-0.731687208557+0.422048511607j))*x[2]
            ref[(0, 2)]=(0.00990328142874-0.105390508364j)
            arg[(1, 0)]=(-0.500882451852-0.531468370875j)*x[0] + ((-0.836909074531+0.453810013558j))*x[1] + ((-0.988210461818+0.668065559649j))*x[2]
            ref[(1, 0)]=(-1.1630009941+0.295203601166j)
            arg[(1, 1)]=(0.443990604749+0.408471164058j)*x[0] + ((0.00305586232618-0.475128462825j))*x[1] + ((0.83776745953+0.421583394528j))*x[2]
            ref[(1, 1)]=(0.642406963303+0.17746304788j)
            arg[(1, 2)]=(0.140507159733+0.154333082609j)*x[0] + ((0.989530856411+0.141830809358j))*x[1] + ((0.748578250097+0.93860017888j))*x[2]
            ref[(1, 2)]=(0.93930813312+0.617382035424j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref=numpy.zeros((2, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.17111179621+0.0504413903971j)*x[0] + ((0.241313082841+0.865862943866j))*x[1]
            ref[(0, 0, 0)]=(0.0351006433154+0.458152167131j)
            arg[(0, 0, 1)]=(0.258439987214+0.0981489949938j)*x[0] + ((-0.512284148341+0.787526764395j))*x[1]
            ref[(0, 0, 1)]=(-0.126922080563+0.442837879694j)
            arg[(0, 0, 2)]=(-0.383327043306-0.535751562701j)*x[0] + ((0.606925630679+0.121964071784j))*x[1]
            ref[(0, 0, 2)]=(0.111799293686-0.206893745458j)
            arg[(0, 1, 0)]=(0.200765124773+0.401400608133j)*x[0] + ((-0.167366736554-0.0956575425354j))*x[1]
            ref[(0, 1, 0)]=(0.0166991941097+0.152871532799j)
            arg[(0, 1, 1)]=(0.925075194705-0.327682821226j)*x[0] + ((0.675048042806+0.230265163741j))*x[1]
            ref[(0, 1, 1)]=(0.800061618756-0.0487088287423j)
            arg[(0, 1, 2)]=(-0.134859133886+0.0591737962602j)*x[0] + ((-0.434360447095-0.061500411257j))*x[1]
            ref[(0, 1, 2)]=(-0.284609790491-0.0011633074984j)
            arg[(0, 2, 0)]=(-0.23221910989-0.369801629017j)*x[0] + ((-0.125455811876-0.387989886413j))*x[1]
            ref[(0, 2, 0)]=(-0.178837460883-0.378895757715j)
            arg[(0, 2, 1)]=(0.629320305757+0.685679335153j)*x[0] + ((-0.811168980828-0.78258926655j))*x[1]
            ref[(0, 2, 1)]=(-0.0909243375353-0.0484549656987j)
            arg[(0, 2, 2)]=(0.897806104071+0.42377845375j)*x[0] + ((-0.281081832453-0.0643606929803j))*x[1]
            ref[(0, 2, 2)]=(0.308362135809+0.179708880385j)
            arg[(1, 0, 0)]=(-0.247293728435-0.893259224227j)*x[0] + ((0.144470987312-0.573868649205j))*x[1]
            ref[(1, 0, 0)]=(-0.0514113705612-0.733563936716j)
            arg[(1, 0, 1)]=(0.275268753136+0.566237777481j)*x[0] + ((0.23307687699-0.0103072853056j))*x[1]
            ref[(1, 0, 1)]=(0.254172815063+0.277965246088j)
            arg[(1, 0, 2)]=(-0.528846295653+0.833939124292j)*x[0] + ((0.415277209631+0.395328259532j))*x[1]
            ref[(1, 0, 2)]=(-0.0567845430109+0.614633691912j)
            arg[(1, 1, 0)]=(0.0937659018103-0.746023763148j)*x[0] + ((-0.491365736381-0.654671925342j))*x[1]
            ref[(1, 1, 0)]=(-0.198799917285-0.700347844245j)
            arg[(1, 1, 1)]=(-0.685236820328+0.633134505859j)*x[0] + ((0.183228851895+0.804373044527j))*x[1]
            ref[(1, 1, 1)]=(-0.251003984216+0.718753775193j)
            arg[(1, 1, 2)]=(0.0904803516073-0.939877601141j)*x[0] + ((-0.431959505684-0.367003575819j))*x[1]
            ref[(1, 1, 2)]=(-0.170739577038-0.65344058848j)
            arg[(1, 2, 0)]=(0.0690839212138+0.85731229508j)*x[0] + ((-0.986572849832-0.950177599906j))*x[1]
            ref[(1, 2, 0)]=(-0.458744464309-0.0464326524131j)
            arg[(1, 2, 1)]=(-0.663100575384-0.609960986662j)*x[0] + ((-0.977332082743-0.00979442206463j))*x[1]
            ref[(1, 2, 1)]=(-0.820216329063-0.309877704363j)
            arg[(1, 2, 2)]=(0.931313206215-0.0247379127821j)*x[0] + ((-0.666444029843-0.0195288181568j))*x[1]
            ref[(1, 2, 2)]=(0.132434588186-0.0221333654695j)
        else:
            arg[(0, 0, 0)]=(0.908087205786+0.765783579445j)*x[0] + ((-0.000876343065817-0.224877646762j))*x[1] + ((0.378402921857+0.0997450462016j))*x[2]
            ref[(0, 0, 0)]=(0.642806892289+0.320325489442j)
            arg[(0, 0, 1)]=(0.285791856676-0.104743506549j)*x[0] + ((0.776046637885-0.989062644522j))*x[1] + ((-0.000986838073126+0.272640781153j))*x[2]
            ref[(0, 0, 1)]=(0.530425828244-0.410582684959j)
            arg[(0, 0, 2)]=(0.823023872735-0.399516681262j)*x[0] + ((-0.24172896245-0.227777792656j))*x[1] + ((-0.849736861101-0.118680404687j))*x[2]
            ref[(0, 0, 2)]=(-0.134220975408-0.372987439302j)
            arg[(0, 1, 0)]=(-0.204750060827+0.286884584106j)*x[0] + ((-0.925846718566-0.905482779609j))*x[1] + ((-0.586394609224+0.0454074324306j))*x[2]
            ref[(0, 1, 0)]=(-0.858495694308-0.286595381536j)
            arg[(0, 1, 1)]=(-0.0423588889373+0.140397949618j)*x[0] + ((0.498882974284+0.847095848872j))*x[1] + ((0.155745356466-0.218437425055j))*x[2]
            ref[(0, 1, 1)]=(0.306134720906+0.384528186717j)
            arg[(0, 1, 2)]=(-0.162332875269-0.706778623601j)*x[0] + ((0.862156995651+0.55383899126j))*x[1] + ((-0.0345274266073+0.678576486881j))*x[2]
            ref[(0, 1, 2)]=(0.332648346887+0.26281842727j)
            arg[(0, 2, 0)]=(-0.0858851496071-0.819560741214j)*x[0] + ((0.00892795765807+0.743135224601j))*x[1] + ((0.0181907550572+0.672995513455j))*x[2]
            ref[(0, 2, 0)]=(-0.0293832184459+0.298284998421j)
            arg[(0, 2, 1)]=(0.557313699461-0.493152677797j)*x[0] + ((-0.357052414606+0.852051246862j))*x[1] + ((-0.65317597611+0.892900473473j))*x[2]
            ref[(0, 2, 1)]=(-0.226457345628+0.625899521269j)
            arg[(0, 2, 2)]=(-0.944053623206-0.870096150229j)*x[0] + ((-0.42894957029+0.722705049438j))*x[1] + ((0.432356384396-0.0370593079447j))*x[2]
            ref[(0, 2, 2)]=(-0.47032340455-0.0922252043678j)
            arg[(1, 0, 0)]=(0.845394339803+0.158434103099j)*x[0] + ((-0.324045042685+0.342335427085j))*x[1] + ((-0.394236343456+0.947077788717j))*x[2]
            ref[(1, 0, 0)]=(0.0635564768311+0.72392365945j)
            arg[(1, 0, 1)]=(-0.465116060528-0.233159368234j)*x[0] + ((0.953800207029+0.433250364103j))*x[1] + ((0.394697038041+0.0801278933461j))*x[2]
            ref[(1, 0, 1)]=(0.441690592271+0.140109444608j)
            arg[(1, 0, 2)]=(-0.199464912825+0.634421138571j)*x[0] + ((0.822994606332+0.829393473486j))*x[1] + ((0.491684571662+0.116561071499j))*x[2]
            ref[(1, 0, 2)]=(0.557607132584+0.790187841778j)
            arg[(1, 1, 0)]=(-0.504074338504-0.664288658852j)*x[0] + ((-0.732596278631+0.338002289561j))*x[1] + ((-0.423610828602+0.620662317108j))*x[2]
            ref[(1, 1, 0)]=(-0.830140722869+0.147187973908j)
            arg[(1, 1, 1)]=(0.96762028545-0.507599640263j)*x[0] + ((-0.632795079631-0.411331477305j))*x[1] + ((0.486879120553-0.227326075031j))*x[2]
            ref[(1, 1, 1)]=(0.410852163186-0.573128596299j)
            arg[(1, 1, 2)]=(0.124510309498-0.622524224844j)*x[0] + ((-0.461600728348+0.532310659221j))*x[1] + ((-0.341603863238+0.291160049583j))*x[2]
            ref[(1, 1, 2)]=(-0.339347141044+0.10047324198j)
            arg[(1, 2, 0)]=(-0.237748166958-0.198602462178j)*x[0] + ((0.590509350539+0.733366499294j))*x[1] + ((0.648246455183+0.409633748591j))*x[2]
            ref[(1, 2, 0)]=(0.500503819382+0.472198892853j)
            arg[(1, 2, 1)]=(0.52997209739-0.256199589604j)*x[0] + ((0.538342830968-0.200220401526j))*x[1] + ((0.70822747439+0.164545577988j))*x[2]
            ref[(1, 2, 1)]=(0.888271201374-0.145937206571j)
            arg[(1, 2, 2)]=(0.611770009259+0.115845362937j)*x[0] + ((-0.537760302077+0.120532975752j))*x[1] + ((0.637741182573+0.560858269754j))*x[2]
            ref[(1, 2, 2)]=(0.355875444877+0.398618304221j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4, 4),w)
        ref=numpy.zeros((3, 2, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.899839703802+0.609703601329j)*x[0] + ((-0.046624247601-0.419757959959j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.473231975701+0.0949728206849j)
            arg[(0, 0, 0, 1)]=(-0.287937783661+0.251140619055j)*x[0] + ((0.0819272107282-0.840215074841j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.103005286466-0.294537227893j)
            arg[(0, 0, 0, 2)]=(0.687325420289-0.46741036808j)*x[0] + ((-0.966819681538+0.865994447605j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.139747130625+0.199292039762j)
            arg[(0, 0, 0, 3)]=(0.946279400394-0.720100957248j)*x[0] + ((0.33217823937-0.540614395452j))*x[1]
            ref[(0, 0, 0, 3)]=(0.639228819882-0.63035767635j)
            arg[(0, 0, 1, 0)]=(0.737805383249+0.930542539802j)*x[0] + ((-0.360305545377+0.119670743651j))*x[1]
            ref[(0, 0, 1, 0)]=(0.188749918936+0.525106641727j)
            arg[(0, 0, 1, 1)]=(0.738206311686+0.492317555629j)*x[0] + ((0.927571437753-0.761534445452j))*x[1]
            ref[(0, 0, 1, 1)]=(0.832888874719-0.134608444911j)
            arg[(0, 0, 1, 2)]=(-0.404676719902-0.591681581022j)*x[0] + ((-0.191507241843+0.51393146488j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.298091980873-0.0388750580711j)
            arg[(0, 0, 1, 3)]=(-0.0838543843744-0.743610132137j)*x[0] + ((0.190642515601+0.505891759817j))*x[1]
            ref[(0, 0, 1, 3)]=(0.0533940656132-0.11885918616j)
            arg[(0, 0, 2, 0)]=(-0.0131681015128+0.647120316239j)*x[0] + ((0.157864162911+0.829654522825j))*x[1]
            ref[(0, 0, 2, 0)]=(0.0723480306991+0.738387419532j)
            arg[(0, 0, 2, 1)]=(-0.679720732998+0.696302165784j)*x[0] + ((-0.1456378091+0.828249255302j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.412679271049+0.762275710543j)
            arg[(0, 0, 2, 2)]=(0.535689718536-0.724171534266j)*x[0] + ((0.520769424315+0.764852494831j))*x[1]
            ref[(0, 0, 2, 2)]=(0.528229571426+0.0203404802828j)
            arg[(0, 0, 2, 3)]=(-0.853044568619-0.965655455975j)*x[0] + ((0.701481406451-0.370936886676j))*x[1]
            ref[(0, 0, 2, 3)]=(-0.0757815810841-0.668296171326j)
            arg[(0, 0, 3, 0)]=(0.518380747471+0.629683191236j)*x[0] + ((-0.948666543801-0.0583907249054j))*x[1]
            ref[(0, 0, 3, 0)]=(-0.215142898165+0.285646233165j)
            arg[(0, 0, 3, 1)]=(-0.0762353252214-0.109748230695j)*x[0] + ((-0.594812663839-0.0627231678818j))*x[1]
            ref[(0, 0, 3, 1)]=(-0.33552399453-0.0862356992883j)
            arg[(0, 0, 3, 2)]=(0.357507903128+0.315701526643j)*x[0] + ((-0.0169251217098-0.362798377689j))*x[1]
            ref[(0, 0, 3, 2)]=(0.170291390709-0.0235484255232j)
            arg[(0, 0, 3, 3)]=(0.777265798046-0.841173193002j)*x[0] + ((-0.348884439585-0.82506097637j))*x[1]
            ref[(0, 0, 3, 3)]=(0.21419067923-0.833117084686j)
            arg[(0, 1, 0, 0)]=(0.624348147018+0.382292878577j)*x[0] + ((-0.543633481107+0.678828214074j))*x[1]
            ref[(0, 1, 0, 0)]=(0.0403573329555+0.530560546326j)
            arg[(0, 1, 0, 1)]=(-0.428852026269-0.277001265539j)*x[0] + ((-0.403728501371+0.657782681556j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.41629026382+0.190390708008j)
            arg[(0, 1, 0, 2)]=(-0.975973607113-0.983373385546j)*x[0] + ((-0.0940488123435-0.896859598912j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.535011209728-0.940116492229j)
            arg[(0, 1, 0, 3)]=(0.585773149531-0.703019830038j)*x[0] + ((0.355173058372-0.708078917292j))*x[1]
            ref[(0, 1, 0, 3)]=(0.470473103951-0.705549373665j)
            arg[(0, 1, 1, 0)]=(0.91048443197+0.945120388122j)*x[0] + ((0.442892553895-0.996395844j))*x[1]
            ref[(0, 1, 1, 0)]=(0.676688492933-0.0256377279394j)
            arg[(0, 1, 1, 1)]=(-0.483861208902+0.64124061887j)*x[0] + ((-0.523449265694-0.314957895923j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.503655237298+0.163141361473j)
            arg[(0, 1, 1, 2)]=(-0.0407348765964-0.596935352219j)*x[0] + ((-0.234046138607+0.820980328978j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.137390507602+0.112022488379j)
            arg[(0, 1, 1, 3)]=(-0.904842482241+0.911603624608j)*x[0] + ((0.390591268702-0.731055953887j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.257125606769+0.0902738353604j)
            arg[(0, 1, 2, 0)]=(0.480491997796+0.58659057206j)*x[0] + ((-0.928581795757-0.924338559329j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.22404489898-0.168873993635j)
            arg[(0, 1, 2, 1)]=(0.398181986219+0.663004904937j)*x[0] + ((-0.795460764756-0.610333670302j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.198639389268+0.0263356173177j)
            arg[(0, 1, 2, 2)]=(0.609285071978-0.548243523856j)*x[0] + ((0.313338103386-0.664561166199j))*x[1]
            ref[(0, 1, 2, 2)]=(0.461311587682-0.606402345027j)
            arg[(0, 1, 2, 3)]=(-0.0769671871469-0.463151645372j)*x[0] + ((-0.267254931735-0.232817909195j))*x[1]
            ref[(0, 1, 2, 3)]=(-0.172111059441-0.347984777283j)
            arg[(0, 1, 3, 0)]=(0.321709440108+0.731124951626j)*x[0] + ((-0.54847783987-0.89827161888j))*x[1]
            ref[(0, 1, 3, 0)]=(-0.113384199881-0.0835733336269j)
            arg[(0, 1, 3, 1)]=(-0.790117934643+0.280756957792j)*x[0] + ((-0.648688954568+0.276177043532j))*x[1]
            ref[(0, 1, 3, 1)]=(-0.719403444606+0.278467000662j)
            arg[(0, 1, 3, 2)]=(0.301949388931-0.727208221817j)*x[0] + ((0.37389426923+0.677000936325j))*x[1]
            ref[(0, 1, 3, 2)]=(0.33792182908-0.0251036427457j)
            arg[(0, 1, 3, 3)]=(0.0704056524245+0.0011157976077j)*x[0] + ((0.0523029898763+0.420963781765j))*x[1]
            ref[(0, 1, 3, 3)]=(0.0613543211504+0.211039789686j)
            arg[(1, 0, 0, 0)]=(0.426939712918-0.904052533943j)*x[0] + ((0.995222939841+0.291444294239j))*x[1]
            ref[(1, 0, 0, 0)]=(0.711081326379-0.306304119852j)
            arg[(1, 0, 0, 1)]=(0.37883631668+0.0341274711087j)*x[0] + ((-0.890610821674+0.381524131439j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.255887252497+0.207825801274j)
            arg[(1, 0, 0, 2)]=(-0.130349841148+0.789068045091j)*x[0] + ((0.751934358068-0.998409802155j))*x[1]
            ref[(1, 0, 0, 2)]=(0.31079225846-0.104670878532j)
            arg[(1, 0, 0, 3)]=(0.15860714834+0.695378009847j)*x[0] + ((-0.682664164919-0.511010059977j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.262028508289+0.092183974935j)
            arg[(1, 0, 1, 0)]=(0.82520384048+0.402068392317j)*x[0] + ((-0.381402715932-0.334563530551j))*x[1]
            ref[(1, 0, 1, 0)]=(0.221900562274+0.0337524308831j)
            arg[(1, 0, 1, 1)]=(-0.150475906712-0.394457689233j)*x[0] + ((-0.380825680223-0.621071636135j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.265650793468-0.507764662684j)
            arg[(1, 0, 1, 2)]=(0.369666504574-0.891514088082j)*x[0] + ((0.933829801431+0.729490338154j))*x[1]
            ref[(1, 0, 1, 2)]=(0.651748153003-0.0810118749639j)
            arg[(1, 0, 1, 3)]=(0.826774121071-0.982630750108j)*x[0] + ((0.712509764449-0.12071267334j))*x[1]
            ref[(1, 0, 1, 3)]=(0.76964194276-0.551671711724j)
            arg[(1, 0, 2, 0)]=(-0.412378732177-0.44281811947j)*x[0] + ((0.925261916021+0.1207378347j))*x[1]
            ref[(1, 0, 2, 0)]=(0.256441591922-0.161040142385j)
            arg[(1, 0, 2, 1)]=(0.832666668226+0.604771972408j)*x[0] + ((0.835146122123+0.568912514446j))*x[1]
            ref[(1, 0, 2, 1)]=(0.833906395175+0.586842243427j)
            arg[(1, 0, 2, 2)]=(-0.786600641329+0.468492449784j)*x[0] + ((0.725910959169-0.953277159405j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.03034484108-0.24239235481j)
            arg[(1, 0, 2, 3)]=(-0.0515288180919-0.268698385957j)*x[0] + ((-0.0462923711829-0.358680815525j))*x[1]
            ref[(1, 0, 2, 3)]=(-0.0489105946374-0.313689600741j)
            arg[(1, 0, 3, 0)]=(0.701423956075-0.752351384485j)*x[0] + ((0.971862305357+0.517813591379j))*x[1]
            ref[(1, 0, 3, 0)]=(0.836643130716-0.117268896553j)
            arg[(1, 0, 3, 1)]=(-0.309415180436+0.808618791282j)*x[0] + ((0.0990183957204-0.31753168557j))*x[1]
            ref[(1, 0, 3, 1)]=(-0.105198392358+0.245543552856j)
            arg[(1, 0, 3, 2)]=(-0.707842462612+0.334225711962j)*x[0] + ((-0.517997557694+0.0987298332425j))*x[1]
            ref[(1, 0, 3, 2)]=(-0.612920010153+0.216477772602j)
            arg[(1, 0, 3, 3)]=(0.122666003223+0.0541940130412j)*x[0] + ((0.593873279287+0.916358879699j))*x[1]
            ref[(1, 0, 3, 3)]=(0.358269641255+0.48527644637j)
            arg[(1, 1, 0, 0)]=(-0.853955344476-0.583294974434j)*x[0] + ((-0.561037464491-0.378660155615j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.707496404484-0.480977565024j)
            arg[(1, 1, 0, 1)]=(0.91439458918-0.016355504598j)*x[0] + ((-0.573752271404+0.554747631315j))*x[1]
            ref[(1, 1, 0, 1)]=(0.170321158888+0.269196063358j)
            arg[(1, 1, 0, 2)]=(0.935486912971+0.0318245070917j)*x[0] + ((-0.516096684527-0.808453545983j))*x[1]
            ref[(1, 1, 0, 2)]=(0.209695114222-0.388314519446j)
            arg[(1, 1, 0, 3)]=(0.970832258646-0.611234483741j)*x[0] + ((0.793119528971+0.627506482662j))*x[1]
            ref[(1, 1, 0, 3)]=(0.881975893808+0.00813599946056j)
            arg[(1, 1, 1, 0)]=(-0.347743143119+0.861431134244j)*x[0] + ((0.56439705791-0.557426947412j))*x[1]
            ref[(1, 1, 1, 0)]=(0.108326957395+0.152002093416j)
            arg[(1, 1, 1, 1)]=(0.893044032375-0.860809630714j)*x[0] + ((0.316740137141+0.88190026161j))*x[1]
            ref[(1, 1, 1, 1)]=(0.604892084758+0.0105453154479j)
            arg[(1, 1, 1, 2)]=(-0.888464057942+0.805654085344j)*x[0] + ((0.584222725217+0.830080293392j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.152120666363+0.817867189368j)
            arg[(1, 1, 1, 3)]=(-0.162298301324+0.242814300687j)*x[0] + ((-0.100680964061+0.165281675307j))*x[1]
            ref[(1, 1, 1, 3)]=(-0.131489632693+0.204047987997j)
            arg[(1, 1, 2, 0)]=(-0.587259654503-0.199024539966j)*x[0] + ((0.194097201992+0.97074169615j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.196581226256+0.385858578092j)
            arg[(1, 1, 2, 1)]=(0.629232700827-0.00651903594531j)*x[0] + ((0.872538697671+0.718397749161j))*x[1]
            ref[(1, 1, 2, 1)]=(0.750885699249+0.355939356608j)
            arg[(1, 1, 2, 2)]=(-0.00323550025838+0.608115567407j)*x[0] + ((-0.351468787331-0.741752075904j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.177352143794-0.0668182542481j)
            arg[(1, 1, 2, 3)]=(0.618104706648-0.526130395571j)*x[0] + ((0.156431732141+0.255427515836j))*x[1]
            ref[(1, 1, 2, 3)]=(0.387268219395-0.135351439868j)
            arg[(1, 1, 3, 0)]=(0.449124745011+0.763389137685j)*x[0] + ((0.820330795643+0.145770792487j))*x[1]
            ref[(1, 1, 3, 0)]=(0.634727770327+0.454579965086j)
            arg[(1, 1, 3, 1)]=(0.129351413284-0.00872969650669j)*x[0] + ((-0.0935828936332+0.718953963527j))*x[1]
            ref[(1, 1, 3, 1)]=(0.0178842598254+0.35511213351j)
            arg[(1, 1, 3, 2)]=(0.553869543442+0.147257126439j)*x[0] + ((0.98998476646-0.159732473601j))*x[1]
            ref[(1, 1, 3, 2)]=(0.771927154951-0.00623767358084j)
            arg[(1, 1, 3, 3)]=(-0.318507443769+0.205196580421j)*x[0] + ((0.379250398423+0.300400839917j))*x[1]
            ref[(1, 1, 3, 3)]=(0.0303714773269+0.252798710169j)
            arg[(2, 0, 0, 0)]=(-0.911209061583+0.811484427149j)*x[0] + ((0.703050478233-0.341323010586j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.104079291675+0.235080708281j)
            arg[(2, 0, 0, 1)]=(-0.221176495823+0.88656349782j)*x[0] + ((0.701713368684-0.426312176205j))*x[1]
            ref[(2, 0, 0, 1)]=(0.240268436431+0.230125660808j)
            arg[(2, 0, 0, 2)]=(0.841824885601-0.703510781324j)*x[0] + ((0.885446497484-0.363225068684j))*x[1]
            ref[(2, 0, 0, 2)]=(0.863635691542-0.533367925004j)
            arg[(2, 0, 0, 3)]=(-0.24580659722-0.909294672115j)*x[0] + ((0.0943965894164-0.060286808129j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.0757050039019-0.484790740122j)
            arg[(2, 0, 1, 0)]=(-0.0237913501359-0.519585073279j)*x[0] + ((0.983038939334-0.127169083225j))*x[1]
            ref[(2, 0, 1, 0)]=(0.479623794599-0.323377078252j)
            arg[(2, 0, 1, 1)]=(-0.300353612594+0.784610101515j)*x[0] + ((-0.420474496031+0.28493614246j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.360414054312+0.534773121987j)
            arg[(2, 0, 1, 2)]=(-0.179324906301+0.477499837168j)*x[0] + ((0.492883280053-0.47348620478j))*x[1]
            ref[(2, 0, 1, 2)]=(0.156779186876+0.00200681619418j)
            arg[(2, 0, 1, 3)]=(0.659433915504-0.222237566706j)*x[0] + ((-0.954579103849-0.174612390786j))*x[1]
            ref[(2, 0, 1, 3)]=(-0.147572594173-0.198424978746j)
            arg[(2, 0, 2, 0)]=(0.82253952957+0.635081075533j)*x[0] + ((0.810285033802-0.161131384743j))*x[1]
            ref[(2, 0, 2, 0)]=(0.816412281686+0.236974845395j)
            arg[(2, 0, 2, 1)]=(0.143071129741+0.318458863054j)*x[0] + ((0.421065564478+0.363563250216j))*x[1]
            ref[(2, 0, 2, 1)]=(0.282068347109+0.341011056635j)
            arg[(2, 0, 2, 2)]=(0.514122878043-0.0365245445421j)*x[0] + ((0.820717618077-0.583547693212j))*x[1]
            ref[(2, 0, 2, 2)]=(0.66742024806-0.310036118877j)
            arg[(2, 0, 2, 3)]=(0.20472700305-0.0525675449221j)*x[0] + ((0.72530186746-0.853014714383j))*x[1]
            ref[(2, 0, 2, 3)]=(0.465014435255-0.452791129653j)
            arg[(2, 0, 3, 0)]=(0.510227325061+0.11059649921j)*x[0] + ((-0.879784870333-0.00620742751614j))*x[1]
            ref[(2, 0, 3, 0)]=(-0.184778772636+0.0521945358467j)
            arg[(2, 0, 3, 1)]=(0.210181782286-0.678445770514j)*x[0] + ((0.471147924996-0.964543225074j))*x[1]
            ref[(2, 0, 3, 1)]=(0.340664853641-0.821494497794j)
            arg[(2, 0, 3, 2)]=(-0.860131965201+0.24708514177j)*x[0] + ((-0.5486229437+0.0412830720947j))*x[1]
            ref[(2, 0, 3, 2)]=(-0.704377454451+0.144184106932j)
            arg[(2, 0, 3, 3)]=(0.636145988054+0.274030408264j)*x[0] + ((-0.63302201758-0.915781013345j))*x[1]
            ref[(2, 0, 3, 3)]=(0.00156198523717-0.320875302541j)
            arg[(2, 1, 0, 0)]=(-0.727731846125+0.43305794252j)*x[0] + ((-0.283241933168+0.103787761643j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.505486889647+0.268422852081j)
            arg[(2, 1, 0, 1)]=(0.200903169178+0.443663981513j)*x[0] + ((-0.922989223959+0.702305421228j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.361043027391+0.57298470137j)
            arg[(2, 1, 0, 2)]=(-0.251464941735+0.660246030922j)*x[0] + ((-0.73770654245+0.63571079928j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.494585742093+0.647978415101j)
            arg[(2, 1, 0, 3)]=(0.619790618432+0.0842458453964j)*x[0] + ((0.656733674244-0.394571414492j))*x[1]
            ref[(2, 1, 0, 3)]=(0.638262146338-0.155162784548j)
            arg[(2, 1, 1, 0)]=(-0.485611969003-0.819868328088j)*x[0] + ((0.226158414122+0.0887952506704j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.129726777441-0.365536538709j)
            arg[(2, 1, 1, 1)]=(-0.168269478904+0.430402340749j)*x[0] + ((0.667939491061+0.228860257401j))*x[1]
            ref[(2, 1, 1, 1)]=(0.249835006079+0.329631299075j)
            arg[(2, 1, 1, 2)]=(-0.246842319695-0.197429111861j)*x[0] + ((0.134719488289+0.215139189826j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.056061415703+0.00885503898225j)
            arg[(2, 1, 1, 3)]=(0.340657237211+0.602027882616j)*x[0] + ((-0.6128457019+0.703965081136j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.136094232344+0.652996481876j)
            arg[(2, 1, 2, 0)]=(0.795281283049-0.89322816426j)*x[0] + ((0.92232736201+0.170390782589j))*x[1]
            ref[(2, 1, 2, 0)]=(0.858804322529-0.361418690836j)
            arg[(2, 1, 2, 1)]=(-0.189235275576-0.237536653611j)*x[0] + ((-0.809344170837+0.63126320162j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.499289723207+0.196863274005j)
            arg[(2, 1, 2, 2)]=(-0.0902479898163-0.879161738085j)*x[0] + ((0.721319021763-0.976256654143j))*x[1]
            ref[(2, 1, 2, 2)]=(0.315535515973-0.927709196114j)
            arg[(2, 1, 2, 3)]=(-0.853507340123-0.229479292523j)*x[0] + ((-0.151796890109+0.930087915217j))*x[1]
            ref[(2, 1, 2, 3)]=(-0.502652115116+0.350304311347j)
            arg[(2, 1, 3, 0)]=(-0.334624459333-0.675326222741j)*x[0] + ((0.504427764892-0.90451535023j))*x[1]
            ref[(2, 1, 3, 0)]=(0.0849016527796-0.789920786485j)
            arg[(2, 1, 3, 1)]=(-0.100485132722+0.0575111311878j)*x[0] + ((0.0714785509696+0.613912134552j))*x[1]
            ref[(2, 1, 3, 1)]=(-0.0145032908765+0.33571163287j)
            arg[(2, 1, 3, 2)]=(-0.551828984922-0.189138583548j)*x[0] + ((0.48273845032-0.172096513671j))*x[1]
            ref[(2, 1, 3, 2)]=(-0.0345452673011-0.180617548609j)
            arg[(2, 1, 3, 3)]=(0.863264356068+0.726018070429j)*x[0] + ((-0.48330990062+0.773804147761j))*x[1]
            ref[(2, 1, 3, 3)]=(0.189977227724+0.749911109095j)
        else:
            arg[(0, 0, 0, 0)]=(0.985583796634+0.677389176572j)*x[0] + ((0.97828337203+0.110011183328j))*x[1] + ((0.493393498027+0.908934869978j))*x[2]
            ref[(0, 0, 0, 0)]=(1.22863033335+0.848167614939j)
            arg[(0, 0, 0, 1)]=(0.496098261198-0.882934109969j)*x[0] + ((0.113912249211+0.280156629534j))*x[1] + ((-0.915183121341-0.126725047417j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.152586305466-0.364751263926j)
            arg[(0, 0, 0, 2)]=(0.520538065462+0.62356364416j)*x[0] + ((0.447108401966+0.716852005442j))*x[1] + ((-0.752359793428-0.0481830905553j))*x[2]
            ref[(0, 0, 0, 2)]=(0.107643337+0.646116279524j)
            arg[(0, 0, 0, 3)]=(-0.271404884337+0.535242551775j)*x[0] + ((0.445159710814-0.700499412008j))*x[1] + ((-0.864956331768-0.364126133439j))*x[2]
            ref[(0, 0, 0, 3)]=(-0.345600752646-0.264691496836j)
            arg[(0, 0, 1, 0)]=(-0.423465756695-0.125814599562j)*x[0] + ((-0.325801138724+0.677555890751j))*x[1] + ((0.618124156899-0.0947552190386j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.0655713692595+0.228493036075j)
            arg[(0, 0, 1, 1)]=(0.952818016459-0.597543108586j)*x[0] + ((-0.751099209466-0.923176611216j))*x[1] + ((-0.10607095247+0.473233080127j))*x[2]
            ref[(0, 0, 1, 1)]=(0.0478239272617-0.523743319837j)
            arg[(0, 0, 1, 2)]=(0.397544787511-0.489376193969j)*x[0] + ((0.193338057962-0.376953376991j))*x[1] + ((-0.925157588258+0.860895378676j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.167137371392-0.00271709614212j)
            arg[(0, 0, 1, 3)]=(0.364453146378-0.495758566147j)*x[0] + ((0.655212202647+0.459044329478j))*x[1] + ((-0.419322670903-0.603758438872j))*x[2]
            ref[(0, 0, 1, 3)]=(0.300171339061-0.32023633777j)
            arg[(0, 0, 2, 0)]=(-0.39071361889+0.659698106971j)*x[0] + ((-0.668269210032-0.112157903713j))*x[1] + ((-0.962970697069+0.876633383476j))*x[2]
            ref[(0, 0, 2, 0)]=(-1.010976763+0.712086793367j)
            arg[(0, 0, 2, 1)]=(-0.446020914338+0.20606529356j)*x[0] + ((-0.484570952056-0.617298111452j))*x[1] + ((0.52243546651-0.801906955268j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.204078199942-0.60656988658j)
            arg[(0, 0, 2, 2)]=(-0.149261311586-0.284742684576j)*x[0] + ((-0.0631913286776-0.340646392781j))*x[1] + ((-0.679597632903+0.914007340456j))*x[2]
            ref[(0, 0, 2, 2)]=(-0.446025136583+0.14430913155j)
            arg[(0, 0, 2, 3)]=(-0.436690439764+0.803331529283j)*x[0] + ((-0.967483341061-0.439829037734j))*x[1] + ((0.00315019718063-0.791620741611j))*x[2]
            ref[(0, 0, 2, 3)]=(-0.700511791822-0.214059125031j)
            arg[(0, 0, 3, 0)]=(0.797161406993+0.0858384332429j)*x[0] + ((-0.748268160392+0.817896261094j))*x[1] + ((0.266599907643-0.657126217603j))*x[2]
            ref[(0, 0, 3, 0)]=(0.157746577122+0.123304238367j)
            arg[(0, 0, 3, 1)]=(-0.298127346285-0.377903266656j)*x[0] + ((0.483274664343-0.694165970049j))*x[1] + ((-0.409923922605+0.0615539650637j))*x[2]
            ref[(0, 0, 3, 1)]=(-0.112388302273-0.505257635821j)
            arg[(0, 0, 3, 2)]=(-0.484141908329-0.691160616575j)*x[0] + ((-0.20483697669-0.0759190199568j))*x[1] + ((-0.766923091444-0.0512834082611j))*x[2]
            ref[(0, 0, 3, 2)]=(-0.727950988231-0.409181522397j)
            arg[(0, 0, 3, 3)]=(-0.264963990713-0.559886690821j)*x[0] + ((-0.0157357225845+0.251828324893j))*x[1] + ((0.613215861172+0.658984033041j))*x[2]
            ref[(0, 0, 3, 3)]=(0.166258073937+0.175462833556j)
            arg[(0, 1, 0, 0)]=(0.0522738603945-0.0174516051874j)*x[0] + ((0.00660225643061+0.578832972662j))*x[1] + ((0.62915660311+0.438630078286j))*x[2]
            ref[(0, 1, 0, 0)]=(0.344016359968+0.50000572288j)
            arg[(0, 1, 0, 1)]=(-0.231594629511-0.906439540696j)*x[0] + ((0.191347457056-0.0326247741203j))*x[1] + ((-0.67676060189-0.829564306171j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.358503887172-0.884314310493j)
            arg[(0, 1, 0, 2)]=(0.437100400799-0.481691344484j)*x[0] + ((-0.0832113871787-0.0919069358666j))*x[1] + ((0.603537745449+0.729693079476j))*x[2]
            ref[(0, 1, 0, 2)]=(0.478713379535+0.0780473995628j)
            arg[(0, 1, 0, 3)]=(-0.895202153096-0.282022083874j)*x[0] + ((0.0423872847602+0.0154160217929j))*x[1] + ((0.468650378408-0.775762901735j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.192082244964-0.521184481908j)
            arg[(0, 1, 1, 0)]=(-0.528139712477+0.0493995181117j)*x[0] + ((-0.978827454357+0.949117578515j))*x[1] + ((0.301173751445+0.997329263645j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.602896707694+0.997923180136j)
            arg[(0, 1, 1, 1)]=(0.679858282897-0.10685042231j)*x[0] + ((-0.569370439493+0.918757497064j))*x[1] + ((-0.536375375885+0.115782464998j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.21294376624+0.463844769876j)
            arg[(0, 1, 1, 2)]=(0.153306838168-0.30175563661j)*x[0] + ((0.763358901354+0.158048479146j))*x[1] + ((-0.98635814685+0.315502051318j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.0348462036641+0.0858974469268j)
            arg[(0, 1, 1, 3)]=(0.850417248068+0.783069868358j)*x[0] + ((-0.643191784358-0.117824850195j))*x[1] + ((-0.130963133462+0.144135782748j))*x[2]
            ref[(0, 1, 1, 3)]=(0.0381311651238+0.404690400456j)
            arg[(0, 1, 2, 0)]=(0.762249919837+0.157603775391j)*x[0] + ((-0.900039035828+0.14782325343j))*x[1] + ((-0.405686934695+0.695603870108j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.271738025343+0.500515449464j)
            arg[(0, 1, 2, 1)]=(0.138621840072-0.84129156218j)*x[0] + ((0.640496002511-0.0678138042205j))*x[1] + ((0.86840857291+0.552822548149j))*x[2]
            ref[(0, 1, 2, 1)]=(0.823763207746-0.178141409126j)
            arg[(0, 1, 2, 2)]=(0.526118989736+0.331030040015j)*x[0] + ((-0.159125262298+0.687568615173j))*x[1] + ((0.887338355349+0.961647758722j))*x[2]
            ref[(0, 1, 2, 2)]=(0.627166041393+0.990123206955j)
            arg[(0, 1, 2, 3)]=(-0.378081367542-0.668310211069j)*x[0] + ((-0.114260281417-0.471182354076j))*x[1] + ((0.336667698169+0.665875075178j))*x[2]
            ref[(0, 1, 2, 3)]=(-0.077836975395-0.236808744983j)
            arg[(0, 1, 3, 0)]=(0.996977783847+0.598427185867j)*x[0] + ((-0.726790586412-0.652862224236j))*x[1] + ((-0.919704113112-0.775291600907j))*x[2]
            ref[(0, 1, 3, 0)]=(-0.324758457839-0.414863319638j)
            arg[(0, 1, 3, 1)]=(-0.289672935818+0.587653229148j)*x[0] + ((-0.193329649845-0.918634545608j))*x[1] + ((-0.0904394300584+0.00681744286915j))*x[2]
            ref[(0, 1, 3, 1)]=(-0.286721007861-0.162081936795j)
            arg[(0, 1, 3, 2)]=(0.186040370662+0.994427103443j)*x[0] + ((-0.794193732429-0.381086458681j))*x[1] + ((-0.277729958694+0.181134420302j))*x[2]
            ref[(0, 1, 3, 2)]=(-0.44294166023+0.397237532532j)
            arg[(0, 1, 3, 3)]=(0.451168663212-0.846327772743j)*x[0] + ((0.641217440894+0.217286630241j))*x[1] + ((-0.252444912771-0.211009201021j))*x[2]
            ref[(0, 1, 3, 3)]=(0.419970595667-0.420025171761j)
            arg[(1, 0, 0, 0)]=(0.832975123648-0.914025536317j)*x[0] + ((0.516632502717-0.757778098628j))*x[1] + ((-0.920190922244+0.837091482579j))*x[2]
            ref[(1, 0, 0, 0)]=(0.214708352061-0.417356076183j)
            arg[(1, 0, 0, 1)]=(-0.190552735424+0.120886609862j)*x[0] + ((-0.0564564704884-0.68287302482j))*x[1] + ((0.0196920882809-0.499085123796j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.113658558816-0.530535769377j)
            arg[(1, 0, 0, 2)]=(0.588260140911+0.587039941024j)*x[0] + ((-0.454753295248+0.57756556547j))*x[1] + ((-0.592718745439-0.45299992292j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.229605949887+0.355802791787j)
            arg[(1, 0, 0, 3)]=(-0.0436394652462-0.501928360476j)*x[0] + ((0.264178081101-0.666866719154j))*x[1] + ((0.72655849711+0.210243901956j))*x[2]
            ref[(1, 0, 0, 3)]=(0.473548556482-0.479275588837j)
            arg[(1, 0, 1, 0)]=(-0.17224520541+0.408711553934j)*x[0] + ((0.725741997684-0.750127515575j))*x[1] + ((-0.420402402391+0.784274393145j))*x[2]
            ref[(1, 0, 1, 0)]=(0.066547194941+0.221429215752j)
            arg[(1, 0, 1, 1)]=(0.306704728895+0.355496764914j)*x[0] + ((-0.839457433497+0.667699926855j))*x[1] + ((0.220568398899-0.0582019907171j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.156092152852+0.482497350526j)
            arg[(1, 0, 1, 2)]=(-0.447246330173+0.649224104848j)*x[0] + ((-0.0869886329306-0.684635704405j))*x[1] + ((0.36283721334-0.772049457754j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.085698874882-0.403730528656j)
            arg[(1, 0, 1, 3)]=(0.849581251463+0.40005452752j)*x[0] + ((0.0213885370144-0.600299785201j))*x[1] + ((-0.774185296785-0.390820513789j))*x[2]
            ref[(1, 0, 1, 3)]=(0.0483922458461-0.295532885735j)
            arg[(1, 0, 2, 0)]=(0.768336773438-0.365641624327j)*x[0] + ((-0.21807030393+0.575452685209j))*x[1] + ((0.61659913711+0.74923388907j))*x[2]
            ref[(1, 0, 2, 0)]=(0.583432803309+0.479522474976j)
            arg[(1, 0, 2, 1)]=(-0.0126204305519-0.18975812375j)*x[0] + ((0.451749206935+0.519003881535j))*x[1] + ((-0.586425186089+0.783756641875j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.073648204853+0.55650119983j)
            arg[(1, 0, 2, 2)]=(0.604363835744+0.888783702346j)*x[0] + ((-0.653403932482-0.598166065679j))*x[1] + ((0.0281599740055+0.443852979203j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.010440061366+0.367235307935j)
            arg[(1, 0, 2, 3)]=(-0.350254471769-0.923099142778j)*x[0] + ((0.295254315145-0.956898706603j))*x[1] + ((0.836119886983-0.86606694608j))*x[2]
            ref[(1, 0, 2, 3)]=(0.390559865179-1.37303239773j)
            arg[(1, 0, 3, 0)]=(0.46225878192+0.000616427477363j)*x[0] + ((-0.86956612909+0.989547317323j))*x[1] + ((0.44846986037+0.213497747485j))*x[2]
            ref[(1, 0, 3, 0)]=(0.0205812566002+0.601830746143j)
            arg[(1, 0, 3, 1)]=(-0.309667000442+0.0028699042918j)*x[0] + ((0.394753488226-0.464987407691j))*x[1] + ((0.638144410187-0.125724217351j))*x[2]
            ref[(1, 0, 3, 1)]=(0.361615448986-0.293920860375j)
            arg[(1, 0, 3, 2)]=(-0.629196117639-0.116214109118j)*x[0] + ((0.0445408132384-0.901315364035j))*x[1] + ((0.851717080397+0.86103525109j))*x[2]
            ref[(1, 0, 3, 2)]=(0.133530887998-0.0782471110317j)
            arg[(1, 0, 3, 3)]=(-0.388163217336-0.602801331817j)*x[0] + ((-0.519711631312-0.186951666834j))*x[1] + ((-0.324677159954+0.112116521624j))*x[2]
            ref[(1, 0, 3, 3)]=(-0.616276004301-0.338818238514j)
            arg[(1, 1, 0, 0)]=(-0.200058670062+0.601429005978j)*x[0] + ((0.490372011836+0.983518350526j))*x[1] + ((0.0459742020928-0.746682517877j))*x[2]
            ref[(1, 1, 0, 0)]=(0.168143771934+0.419132419313j)
            arg[(1, 1, 0, 1)]=(0.152540544393+0.26406565709j)*x[0] + ((0.0791493381663-0.31654480041j))*x[1] + ((-0.442331951896-0.515079844797j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.105321034668-0.283779494059j)
            arg[(1, 1, 0, 2)]=(0.38299695655+0.912108563535j)*x[0] + ((0.184873877491+0.154858406634j))*x[1] + ((-0.866944340505-0.29319115655j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.149536753232+0.386887906809j)
            arg[(1, 1, 0, 3)]=(-0.691984508004-0.835366314046j)*x[0] + ((-0.574237751246+0.895501632855j))*x[1] + ((-0.530312035376+0.705309442861j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.898267147313+0.382722380835j)
            arg[(1, 1, 1, 0)]=(-0.291131245667-0.98446731718j)*x[0] + ((-0.819054517561+0.653478724766j))*x[1] + ((0.654340565259-0.427818975121j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.227922598985-0.379403783767j)
            arg[(1, 1, 1, 1)]=(-0.437288958908-0.116887067259j)*x[0] + ((-0.65138958128+0.0969600513961j))*x[1] + ((-0.176694564974-0.195289286161j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.632686552581-0.107608151012j)
            arg[(1, 1, 1, 2)]=(0.817512717437+0.314319223636j)*x[0] + ((0.97104060012-0.356796235263j))*x[1] + ((-0.903430513248-0.483277452382j))*x[2]
            ref[(1, 1, 1, 2)]=(0.442561402154-0.262877232004j)
            arg[(1, 1, 1, 3)]=(-0.152873328581+0.42331750873j)*x[0] + ((-0.121382532725-0.378750066439j))*x[1] + ((0.132197311958+0.512612552283j))*x[2]
            ref[(1, 1, 1, 3)]=(-0.0710292746742+0.278589997287j)
            arg[(1, 1, 2, 0)]=(0.794150730729-0.36391752134j)*x[0] + ((0.278188979099-0.895730233331j))*x[1] + ((-0.661442091301+0.158911181611j))*x[2]
            ref[(1, 1, 2, 0)]=(0.205448809264-0.550368286529j)
            arg[(1, 1, 2, 1)]=(-0.726156691147-0.368617422504j)*x[0] + ((0.0422102105633+0.278691665747j))*x[1] + ((-0.644995706377-0.497201670056j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.66447109348-0.293563713406j)
            arg[(1, 1, 2, 2)]=(0.787961989589+0.14855902369j)*x[0] + ((0.303809965385-0.591207437533j))*x[1] + ((-0.961001425366-0.257206779874j))*x[2]
            ref[(1, 1, 2, 2)]=(0.0653852648039-0.349927596859j)
            arg[(1, 1, 2, 3)]=(0.79874882934+0.6155534165j)*x[0] + ((0.412179140678-0.791067398016j))*x[1] + ((0.269713097954-0.330104587924j))*x[2]
            ref[(1, 1, 2, 3)]=(0.740320533986-0.252809284719j)
            arg[(1, 1, 3, 0)]=(0.61551060035-0.736152757948j)*x[0] + ((0.163964765976-0.65607546484j))*x[1] + ((0.431114475713-0.344222557912j))*x[2]
            ref[(1, 1, 3, 0)]=(0.605294921019-0.868225390349j)
            arg[(1, 1, 3, 1)]=(-0.243926217822+0.785984018493j)*x[0] + ((-0.713110042368+0.838915714544j))*x[1] + ((-0.548040188147-0.66585926461j))*x[2]
            ref[(1, 1, 3, 1)]=(-0.752538224168+0.479520234213j)
            arg[(1, 1, 3, 2)]=(-0.0569440352823-0.856411142698j)*x[0] + ((0.866730864164-0.305071471087j))*x[1] + ((0.849727488432-0.259739407304j))*x[2]
            ref[(1, 1, 3, 2)]=(0.829757158657-0.710611010545j)
            arg[(1, 1, 3, 3)]=(0.958903969246-0.0649166546127j)*x[0] + ((0.973138918374-0.288514927599j))*x[1] + ((-0.731435851099-0.416516303827j))*x[2]
            ref[(1, 1, 3, 3)]=(0.600303518261-0.384973943019j)
            arg[(2, 0, 0, 0)]=(-0.857841027053+0.285758886742j)*x[0] + ((-0.564273480727-0.978108637743j))*x[1] + ((0.141682245588-0.854804399995j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.640216131096-0.773577075498j)
            arg[(2, 0, 0, 1)]=(0.529934130796-0.742832877162j)*x[0] + ((-0.111242911929-0.0241189103803j))*x[1] + ((0.88197796669-0.433492156184j))*x[2]
            ref[(2, 0, 0, 1)]=(0.650334592778-0.600221971863j)
            arg[(2, 0, 0, 2)]=(0.487229296086+0.0140451906627j)*x[0] + ((-0.169892646599+0.41056784364j))*x[1] + ((-0.1694681966+0.761476075113j))*x[2]
            ref[(2, 0, 0, 2)]=(0.0739342264434+0.593044554708j)
            arg[(2, 0, 0, 3)]=(-0.939828100547+0.605820708868j)*x[0] + ((-0.594545585121+0.509444781352j))*x[1] + ((-0.844434730452+0.621642835281j))*x[2]
            ref[(2, 0, 0, 3)]=(-1.18940420806+0.86845416275j)
            arg[(2, 0, 1, 0)]=(-0.443616456506+0.547828972547j)*x[0] + ((0.276040291725+0.789040918601j))*x[1] + ((-0.320594569126-0.2237198839j))*x[2]
            ref[(2, 0, 1, 0)]=(-0.244085366954+0.556575003624j)
            arg[(2, 0, 1, 1)]=(-0.337158693648+0.545141390093j)*x[0] + ((0.350098334742+0.604644218168j))*x[1] + ((0.505905016997+0.845363110883j))*x[2]
            ref[(2, 0, 1, 1)]=(0.259422329045+0.997574359572j)
            arg[(2, 0, 1, 2)]=(0.432502635846-0.665645567068j)*x[0] + ((0.117866723461+0.13847394003j))*x[1] + ((-0.413022389786+0.336201827073j))*x[2]
            ref[(2, 0, 1, 2)]=(0.0686734847605-0.0954848999826j)
            arg[(2, 0, 1, 3)]=(-0.280050066534+0.337136248179j)*x[0] + ((-0.744695707214-0.275509564362j))*x[1] + ((0.318342400832-0.235103448421j))*x[2]
            ref[(2, 0, 1, 3)]=(-0.353201686457-0.0867383823019j)
            arg[(2, 0, 2, 0)]=(-0.442164250354+0.853536560921j)*x[0] + ((-0.202064904799-0.371164499721j))*x[1] + ((0.370458470882+0.625991253499j))*x[2]
            ref[(2, 0, 2, 0)]=(-0.136885342135+0.55418165735j)
            arg[(2, 0, 2, 1)]=(0.532172671646-0.714731530446j)*x[0] + ((-0.277459034348-0.250420512074j))*x[1] + ((-0.860974052818-0.329229408419j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.30313020776-0.64719072547j)
            arg[(2, 0, 2, 2)]=(-0.643769069532-0.725291409157j)*x[0] + ((0.708217361341-0.293559095325j))*x[1] + ((-0.674133907642+0.45873316789j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.304842807916-0.280058668296j)
            arg[(2, 0, 2, 3)]=(-0.583348405826-0.220690929701j)*x[0] + ((-0.882721512367+0.891112168776j))*x[1] + ((-0.749234010205-0.624146775194j))*x[2]
            ref[(2, 0, 2, 3)]=(-1.1076519642+0.0231372319409j)
            arg[(2, 0, 3, 0)]=(-0.751597780965+0.802428904454j)*x[0] + ((0.569163367805-0.374828588438j))*x[1] + ((-0.228589403736-0.260975839557j))*x[2]
            ref[(2, 0, 3, 0)]=(-0.205511908448+0.0833122382292j)
            arg[(2, 0, 3, 1)]=(-0.843539988285-0.522624151106j)*x[0] + ((0.227411367545-0.799345562207j))*x[1] + ((0.0576811491108-0.824459177251j))*x[2]
            ref[(2, 0, 3, 1)]=(-0.279223735815-1.07321444528j)
            arg[(2, 0, 3, 2)]=(-0.432769025304-0.320791836906j)*x[0] + ((-0.0788097613882-0.755841142133j))*x[1] + ((0.293357986611+0.113327247978j))*x[2]
            ref[(2, 0, 3, 2)]=(-0.10911040004-0.48165286553j)
            arg[(2, 0, 3, 3)]=(0.508672664705+0.737263564741j)*x[0] + ((0.491655780507+0.466947055394j))*x[1] + ((0.806256983323-0.243910048628j))*x[2]
            ref[(2, 0, 3, 3)]=(0.903292714267+0.480150285754j)
            arg[(2, 1, 0, 0)]=(0.00780499335632+0.482231837731j)*x[0] + ((-0.134929486406-0.906974675157j))*x[1] + ((-0.095822817455-0.344799996662j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.111473655252-0.384771417044j)
            arg[(2, 1, 0, 1)]=(0.277593095245-0.494647988314j)*x[0] + ((-0.683810181653-0.749742561516j))*x[1] + ((-0.57718590384-0.2545505089j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.491701495124-0.749470529365j)
            arg[(2, 1, 0, 2)]=(0.925924029227-0.884381081759j)*x[0] + ((-0.106998781417+0.655967578179j))*x[1] + ((0.0853540804883-0.161077748735j))*x[2]
            ref[(2, 1, 0, 2)]=(0.452139664149-0.194745626157j)
            arg[(2, 1, 0, 3)]=(-0.10480538237-0.462202124131j)*x[0] + ((0.321006055852-0.842792670894j))*x[1] + ((-0.80907695523-0.382153346313j))*x[2]
            ref[(2, 1, 0, 3)]=(-0.296438140874-0.843574070669j)
            arg[(2, 1, 1, 0)]=(-0.907489896309-0.134298126529j)*x[0] + ((0.860703057979-0.637930736581j))*x[1] + ((-0.0868925137597-0.835049459687j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.0668396760451-0.803639161399j)
            arg[(2, 1, 1, 1)]=(0.878020688699-0.742104057343j)*x[0] + ((0.51221846669-0.745327160164j))*x[1] + ((0.157909896234-0.490041844626j))*x[2]
            ref[(2, 1, 1, 1)]=(0.774074525811-0.988736531066j)
            arg[(2, 1, 1, 2)]=(0.587947308699+0.522391545566j)*x[0] + ((-0.579194697328-0.0837395619325j))*x[1] + ((0.904546761734+0.427156221245j))*x[2]
            ref[(2, 1, 1, 2)]=(0.456649686552+0.43290410244j)
            arg[(2, 1, 1, 3)]=(0.2582687969-0.0654102139969j)*x[0] + ((-0.990024526672-0.599081562558j))*x[1] + ((-0.154876978476+0.290093781295j))*x[2]
            ref[(2, 1, 1, 3)]=(-0.443316354124-0.18719899763j)
            arg[(2, 1, 2, 0)]=(0.68056773871+0.816395971723j)*x[0] + ((0.473710486047-0.753454014569j))*x[1] + ((-0.347131693638+0.526332723957j))*x[2]
            ref[(2, 1, 2, 0)]=(0.40357326556+0.294637340555j)
            arg[(2, 1, 2, 1)]=(0.985219471845-0.589074732605j)*x[0] + ((-0.351602299161-0.0920792381434j))*x[1] + ((0.411609596931+0.476556487749j))*x[2]
            ref[(2, 1, 2, 1)]=(0.522613384807-0.1022987415j)
            arg[(2, 1, 2, 2)]=(-0.654884308059+0.750185036364j)*x[0] + ((0.547508717185-0.142170407782j))*x[1] + ((0.161157444951+0.151527972603j))*x[2]
            ref[(2, 1, 2, 2)]=(0.0268909270382+0.379771300592j)
            arg[(2, 1, 2, 3)]=(-0.144623867324+0.202081973755j)*x[0] + ((-0.657318463539+0.0438622986493j))*x[1] + ((0.789262599858+0.791503464244j))*x[2]
            ref[(2, 1, 2, 3)]=(-0.00633986550292+0.518723868324j)
            arg[(2, 1, 3, 0)]=(-0.252155623965-0.447707878608j)*x[0] + ((0.626977886538+0.687402726198j))*x[1] + ((0.275951061009-0.261324537633j))*x[2]
            ref[(2, 1, 3, 0)]=(0.325386661791-0.0108148450214j)
            arg[(2, 1, 3, 1)]=(-0.746376922139+0.177842607957j)*x[0] + ((0.212073158498+0.0211715238233j))*x[1] + ((-0.181505512767-0.841156816076j))*x[2]
            ref[(2, 1, 3, 1)]=(-0.357904638204-0.321071342148j)
            arg[(2, 1, 3, 2)]=(-0.854549682445-0.138125892909j)*x[0] + ((-0.668524559943-0.411391078182j))*x[1] + ((0.0985949149493+0.559347645922j))*x[2]
            ref[(2, 1, 3, 2)]=(-0.712239663719+0.00491533741558j)
            arg[(2, 1, 3, 3)]=(-0.252611112406-0.63181562464j)*x[0] + ((0.10057516137+0.8601868809j))*x[1] + ((0.600572839414+0.576673697263j))*x[2]
            ref[(2, 1, 3, 3)]=(0.224268444189+0.402522476762j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.64164760851+0.488645792629j)*x[0] + ((0.048077286981-0.21853002464j))*x[1]
            ref=(0.344862447746+0.135057883994j)
        else:
            arg=(0.115433898234+0.466205301775j)*x[0] + ((0.90819265641+0.459547462277j))*x[1] + ((-0.725712845213+0.544657657681j))*x[2]
            ref=(0.148956854716+0.735205210866j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.0212639004617-0.206099730194j)*x[0] + ((-0.337116905894-0.295636508931j))*x[1]
            ref[(0,)]=(-0.179190403178-0.250868119562j)
            arg[(1,)]=(0.92367482074+0.774166233117j)*x[0] + ((0.975188044986-0.476498634845j))*x[1]
            ref[(1,)]=(0.949431432863+0.148833799136j)
            arg[(2,)]=(-0.730484013572-0.874732427235j)*x[0] + ((-0.867055391383+0.566383312839j))*x[1]
            ref[(2,)]=(-0.798769702478-0.154174557198j)
            arg[(3,)]=(0.540466902263+0.737487926563j)*x[0] + ((0.790592567041+0.456430664224j))*x[1]
            ref[(3,)]=(0.665529734652+0.596959295393j)
        else:
            arg[(0,)]=(-0.570014857948-0.898077134773j)*x[0] + ((-0.00959647287716-0.905596811923j))*x[1] + ((-0.517422915622-0.94023100602j))*x[2]
            ref[(0,)]=(-0.548517123224-1.37195247636j)
            arg[(1,)]=(-0.52694024417-0.412457913988j)*x[0] + ((-0.921965273949+0.564482015401j))*x[1] + ((0.385425620535-0.901714797133j))*x[2]
            ref[(1,)]=(-0.531739948792-0.37484534786j)
            arg[(2,)]=(-0.812912305208+0.633871315633j)*x[0] + ((-0.362173452161+0.467930921645j))*x[1] + ((-0.417314325357-0.629060534994j))*x[2]
            ref[(2,)]=(-0.796200041362+0.236370851142j)
            arg[(3,)]=(0.839747242172-0.0562148137949j)*x[0] + ((0.918785238122-0.99107645451j))*x[1] + ((0.458787576982+0.484556804939j))*x[2]
            ref[(3,)]=(1.10866002864-0.281367231683j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.051307155875-0.583602678929j)*x[0] + ((-0.673382171681+0.413200513072j))*x[1]
            ref[(0, 0)]=(-0.311037507903-0.0852010829284j)
            arg[(0, 1)]=(0.780708611057-0.576916879673j)*x[0] + ((-0.926610429243+0.639517363118j))*x[1]
            ref[(0, 1)]=(-0.0729509090933+0.0313002417226j)
            arg[(1, 0)]=(-0.573500194661+0.44835494916j)*x[0] + ((0.91367696062+0.585109628246j))*x[1]
            ref[(1, 0)]=(0.170088382979+0.516732288703j)
            arg[(1, 1)]=(-0.601840318938-0.737805876613j)*x[0] + ((0.69697954513+0.613402076714j))*x[1]
            ref[(1, 1)]=(0.0475696130961-0.0622018999495j)
            arg[(2, 0)]=(0.483214493115+0.968246045068j)*x[0] + ((0.339132739756-0.218757872926j))*x[1]
            ref[(2, 0)]=(0.411173616436+0.374744086071j)
            arg[(2, 1)]=(-0.188721919331+0.28381379727j)*x[0] + ((-0.885915872531+0.772380918539j))*x[1]
            ref[(2, 1)]=(-0.537318895931+0.528097357905j)
        else:
            arg[(0, 0)]=(-0.135512150599+0.236056603411j)*x[0] + ((0.599401556282+0.976290669886j))*x[1] + ((0.155961126535+0.849285891323j))*x[2]
            ref[(0, 0)]=(0.309925266109+1.03081658231j)
            arg[(0, 1)]=(0.573270299004+0.559828502483j)*x[0] + ((0.389469771689-0.417075383118j))*x[1] + ((-0.613329886342-0.742075130485j))*x[2]
            ref[(0, 1)]=(0.174705092175-0.29966100556j)
            arg[(1, 0)]=(-0.480022450905-0.318056356636j)*x[0] + ((0.421591187023-0.875531565467j))*x[1] + ((-0.740709930563-0.402109784225j))*x[2]
            ref[(1, 0)]=(-0.399570597222-0.797848853164j)
            arg[(1, 1)]=(-0.394904508557-0.60576113334j)*x[0] + ((-0.222697406217-0.0475297539387j))*x[1] + ((0.490609304052+0.932060565022j))*x[2]
            ref[(1, 1)]=(-0.0634963053611+0.139384838872j)
            arg[(2, 0)]=(0.571110626928+0.543899415384j)*x[0] + ((0.794278196832-0.42380839615j))*x[1] + ((-0.989016164579-0.884677182072j))*x[2]
            ref[(2, 0)]=(0.18818632959-0.382293081419j)
            arg[(2, 1)]=(-0.640363455008+0.291486763774j)*x[0] + ((0.741144919068-0.268211626987j))*x[1] + ((0.995337526223-0.814327064772j))*x[2]
            ref[(2, 1)]=(0.548059495142-0.395525963993j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3),w)
        ref=numpy.zeros((3, 4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.910447122788+0.633340478666j)*x[0] + ((0.480920406119+0.755809437671j))*x[1]
            ref[(0, 0, 0)]=(0.695683764453+0.694574958168j)
            arg[(0, 0, 1)]=(0.280391005429+0.424150424142j)*x[0] + ((0.771003687101-0.307155684571j))*x[1]
            ref[(0, 0, 1)]=(0.525697346265+0.0584973697854j)
            arg[(0, 0, 2)]=(-0.251997236884-0.322031972532j)*x[0] + ((0.853175161068+0.895962539024j))*x[1]
            ref[(0, 0, 2)]=(0.300588962092+0.286965283246j)
            arg[(0, 1, 0)]=(-0.895138311421-0.170834447639j)*x[0] + ((-0.555569413545-0.552802045065j))*x[1]
            ref[(0, 1, 0)]=(-0.725353862483-0.361818246352j)
            arg[(0, 1, 1)]=(-0.667324056518+0.0846045025038j)*x[0] + ((0.506524607159-0.87266314375j))*x[1]
            ref[(0, 1, 1)]=(-0.0803997246797-0.394029320623j)
            arg[(0, 1, 2)]=(-0.662320090576+0.00366895767907j)*x[0] + ((0.577886214604+0.800025268235j))*x[1]
            ref[(0, 1, 2)]=(-0.0422169379857+0.401847112957j)
            arg[(0, 2, 0)]=(-0.813131257065-0.39206372952j)*x[0] + ((-0.825486193014-0.826890367087j))*x[1]
            ref[(0, 2, 0)]=(-0.819308725039-0.609477048303j)
            arg[(0, 2, 1)]=(-0.656464408337+0.74308883209j)*x[0] + ((-0.548808209411-0.34371852957j))*x[1]
            ref[(0, 2, 1)]=(-0.602636308874+0.19968515126j)
            arg[(0, 2, 2)]=(-0.0400533425961+0.534377097838j)*x[0] + ((0.600140143191-0.489780535614j))*x[1]
            ref[(0, 2, 2)]=(0.280043400297+0.0222982811119j)
            arg[(0, 3, 0)]=(-0.0368391419482-0.645908783998j)*x[0] + ((-0.458129700981+0.24097122273j))*x[1]
            ref[(0, 3, 0)]=(-0.247484421464-0.202468780634j)
            arg[(0, 3, 1)]=(-0.648548360765-0.330866581038j)*x[0] + ((0.960561479678+0.901741647031j))*x[1]
            ref[(0, 3, 1)]=(0.156006559456+0.285437532996j)
            arg[(0, 3, 2)]=(0.424668053582-0.699398038963j)*x[0] + ((0.918573440685-0.0602901862676j))*x[1]
            ref[(0, 3, 2)]=(0.671620747133-0.379844112615j)
            arg[(1, 0, 0)]=(-0.0707674547359+0.147771538194j)*x[0] + ((0.442987277835-0.873973562212j))*x[1]
            ref[(1, 0, 0)]=(0.186109911549-0.363101012009j)
            arg[(1, 0, 1)]=(-0.0527321943681-0.630482185917j)*x[0] + ((0.736753306621+0.0412296420951j))*x[1]
            ref[(1, 0, 1)]=(0.342010556127-0.294626271911j)
            arg[(1, 0, 2)]=(-0.874087391725+0.878433243174j)*x[0] + ((0.699628599682-0.303855727676j))*x[1]
            ref[(1, 0, 2)]=(-0.0872293960215+0.287288757749j)
            arg[(1, 1, 0)]=(-0.603097228583-0.969097262977j)*x[0] + ((0.780204942661+0.380516717239j))*x[1]
            ref[(1, 1, 0)]=(0.0885538570386-0.294290272869j)
            arg[(1, 1, 1)]=(0.284717027471-0.681993767099j)*x[0] + ((0.460331699255-0.620728368368j))*x[1]
            ref[(1, 1, 1)]=(0.372524363363-0.651361067734j)
            arg[(1, 1, 2)]=(-0.713255022669-0.0486986393298j)*x[0] + ((-0.480519692097+0.438033291927j))*x[1]
            ref[(1, 1, 2)]=(-0.596887357383+0.194667326298j)
            arg[(1, 2, 0)]=(0.168815041874-0.659635629806j)*x[0] + ((0.361042636787-0.549699678553j))*x[1]
            ref[(1, 2, 0)]=(0.264928839331-0.604667654179j)
            arg[(1, 2, 1)]=(-0.0777729383257+0.144082218983j)*x[0] + ((0.736676502496+0.701671999508j))*x[1]
            ref[(1, 2, 1)]=(0.329451782085+0.422877109246j)
            arg[(1, 2, 2)]=(0.90008195221-0.0411123125505j)*x[0] + ((-0.564495609936-0.489472495134j))*x[1]
            ref[(1, 2, 2)]=(0.167793171137-0.265292403842j)
            arg[(1, 3, 0)]=(-0.580234814936+0.902773066757j)*x[0] + ((0.356660867241+0.821944536399j))*x[1]
            ref[(1, 3, 0)]=(-0.111786973847+0.862358801578j)
            arg[(1, 3, 1)]=(0.0407164928424+0.414278707512j)*x[0] + ((0.976248395562-0.888311938891j))*x[1]
            ref[(1, 3, 1)]=(0.508482444202-0.23701661569j)
            arg[(1, 3, 2)]=(-0.0100798593525+0.611232773593j)*x[0] + ((-0.681153005408-0.510161327056j))*x[1]
            ref[(1, 3, 2)]=(-0.34561643238+0.0505357232684j)
            arg[(2, 0, 0)]=(-0.0569424094987-0.647053983269j)*x[0] + ((0.655363153429+0.165541434994j))*x[1]
            ref[(2, 0, 0)]=(0.299210371965-0.240756274138j)
            arg[(2, 0, 1)]=(0.423907872754+0.704008788455j)*x[0] + ((-0.936668352232+0.653975910764j))*x[1]
            ref[(2, 0, 1)]=(-0.256380239739+0.67899234961j)
            arg[(2, 0, 2)]=(-0.673272231679-0.789160093346j)*x[0] + ((-0.499494716766-0.468235400888j))*x[1]
            ref[(2, 0, 2)]=(-0.586383474222-0.628697747117j)
            arg[(2, 1, 0)]=(0.11512680987-0.906410478684j)*x[0] + ((-0.917206475783+0.219037578484j))*x[1]
            ref[(2, 1, 0)]=(-0.401039832956-0.3436864501j)
            arg[(2, 1, 1)]=(-0.0206775794235-0.151005277695j)*x[0] + ((-0.863921489955-0.0484445974983j))*x[1]
            ref[(2, 1, 1)]=(-0.442299534689-0.0997249375966j)
            arg[(2, 1, 2)]=(-0.527576787557+0.454468604916j)*x[0] + ((-0.672172306873+0.291771522024j))*x[1]
            ref[(2, 1, 2)]=(-0.599874547215+0.37312006347j)
            arg[(2, 2, 0)]=(0.0856738289975+0.667172488852j)*x[0] + ((0.933332106558-0.888760135335j))*x[1]
            ref[(2, 2, 0)]=(0.509502967778-0.110793823241j)
            arg[(2, 2, 1)]=(-0.858936872268-0.538739803162j)*x[0] + ((-0.0571153929+0.905465045931j))*x[1]
            ref[(2, 2, 1)]=(-0.458026132584+0.183362621384j)
            arg[(2, 2, 2)]=(0.480328438681+0.600028039223j)*x[0] + ((0.857734990498-0.569442984466j))*x[1]
            ref[(2, 2, 2)]=(0.669031714589+0.0152925273785j)
            arg[(2, 3, 0)]=(-0.987997700833+0.146878003769j)*x[0] + ((0.711995136128-0.622104838719j))*x[1]
            ref[(2, 3, 0)]=(-0.138001282353-0.237613417475j)
            arg[(2, 3, 1)]=(-0.0661141105292-0.263437857596j)*x[0] + ((0.0353712756853-0.663038899971j))*x[1]
            ref[(2, 3, 1)]=(-0.015371417422-0.463238378784j)
            arg[(2, 3, 2)]=(-0.667365008639-0.643303175855j)*x[0] + ((0.524762684709+0.262202388581j))*x[1]
            ref[(2, 3, 2)]=(-0.0713011619651-0.190550393637j)
        else:
            arg[(0, 0, 0)]=(0.998662656818+0.0130471602265j)*x[0] + ((-0.916939895022+0.747738457836j))*x[1] + ((0.981004125298+0.816063418522j))*x[2]
            ref[(0, 0, 0)]=(0.531363443547+0.788424518292j)
            arg[(0, 0, 1)]=(-0.251424045602-0.458429267635j)*x[0] + ((-0.300668301588-0.760177641777j))*x[1] + ((-0.415150962489-0.511268748434j))*x[2]
            ref[(0, 0, 1)]=(-0.48362165484-0.864937828923j)
            arg[(0, 0, 2)]=(-0.268325907281-0.269576654992j)*x[0] + ((0.738441342905-0.442314618823j))*x[1] + ((-0.71152956075+0.60495246102j))*x[2]
            ref[(0, 0, 2)]=(-0.120707062563-0.0534694063975j)
            arg[(0, 1, 0)]=(-0.398889048071+0.362118187573j)*x[0] + ((0.407939194097+0.729671860242j))*x[1] + ((0.203363440057+0.194177481255j))*x[2]
            ref[(0, 1, 0)]=(0.106206793042+0.642983764535j)
            arg[(0, 1, 1)]=(-0.00554989635291+0.96361180934j)*x[0] + ((0.093190893732-0.679335855719j))*x[1] + ((0.417483239128-0.353159796295j))*x[2]
            ref[(0, 1, 1)]=(0.252562118253-0.0344419213372j)
            arg[(0, 1, 2)]=(0.260552651339-0.875044693487j)*x[0] + ((0.674446045063-0.775241994332j))*x[1] + ((-0.969575594552+0.589733242924j))*x[2]
            ref[(0, 1, 2)]=(-0.0172884490751-0.530276722448j)
            arg[(0, 2, 0)]=(-0.997326479444-0.70138701904j)*x[0] + ((0.828447194192+0.265895037441j))*x[1] + ((0.653406726949+0.649747277877j))*x[2]
            ref[(0, 2, 0)]=(0.242263720848+0.107127648139j)
            arg[(0, 2, 1)]=(0.460919835926-0.68588552543j)*x[0] + ((-0.0847361963926-0.669103170974j))*x[1] + ((0.71894489399+0.704056830207j))*x[2]
            ref[(0, 2, 1)]=(0.547564266762-0.325465933098j)
            arg[(0, 2, 2)]=(0.868216760526-0.0282590651181j)*x[0] + ((-0.787857838959+0.519018159381j))*x[1] + ((-0.271766611359+0.264046998291j))*x[2]
            ref[(0, 2, 2)]=(-0.0957038448958+0.377403046277j)
            arg[(0, 3, 0)]=(-0.79942491158+0.486617522447j)*x[0] + ((-0.0730517237191+0.418924082777j))*x[1] + ((0.202792775747-0.721407269645j))*x[2]
            ref[(0, 3, 0)]=(-0.334841929776+0.0920671677894j)
            arg[(0, 3, 1)]=(-0.986540345738+0.146882296327j)*x[0] + ((0.869900438556+0.675923656253j))*x[1] + ((0.884613459896+0.0964316872171j))*x[2]
            ref[(0, 3, 1)]=(0.383986776357+0.459618819899j)
            arg[(0, 3, 2)]=(0.273316874256-0.807122706276j)*x[0] + ((0.619406779422+0.754521878024j))*x[1] + ((-0.883164174684+0.914732111843j))*x[2]
            ref[(0, 3, 2)]=(0.00477973949732+0.431065641795j)
            arg[(1, 0, 0)]=(-0.228267081731-0.862983619652j)*x[0] + ((-0.644584626168+0.814770361641j))*x[1] + ((-0.0928511191599-0.340030461032j))*x[2]
            ref[(1, 0, 0)]=(-0.48285141353-0.194121859522j)
            arg[(1, 0, 1)]=(-0.11960335412+0.872968854838j)*x[0] + ((0.975535034377+0.565365642524j))*x[1] + ((-0.0258407120697+0.555153877279j))*x[2]
            ref[(1, 0, 1)]=(0.415045484094+0.99674418732j)
            arg[(1, 0, 2)]=(-0.393589192239+0.337356378389j)*x[0] + ((0.132605332795+0.714131411462j))*x[1] + ((-0.349928033234-0.413985962203j))*x[2]
            ref[(1, 0, 2)]=(-0.305455946339+0.318750913824j)
            arg[(1, 1, 0)]=(0.138026241386-0.583578068806j)*x[0] + ((-0.493207887061+0.369375745188j))*x[1] + ((-0.452646265872-0.834876445513j))*x[2]
            ref[(1, 1, 0)]=(-0.403913955773-0.524539384566j)
            arg[(1, 1, 1)]=(0.000557184147109+0.879673922221j)*x[0] + ((0.054096896832-0.502996430393j))*x[1] + ((-0.305343023422-0.782569177111j))*x[2]
            ref[(1, 1, 1)]=(-0.125344471221-0.202945842641j)
            arg[(1, 1, 2)]=(0.410420208758+0.494301107941j)*x[0] + ((-0.221793912025-0.513932240885j))*x[1] + ((-0.350040143594+0.69634261769j))*x[2]
            ref[(1, 1, 2)]=(-0.0807069234302+0.338355742373j)
            arg[(1, 2, 0)]=(-0.503303604955-0.806608210773j)*x[0] + ((-0.827075696471-0.65750982804j))*x[1] + ((0.0431730689295-0.287992368505j))*x[2]
            ref[(1, 2, 0)]=(-0.643603116248-0.876055203659j)
            arg[(1, 2, 1)]=(-0.329479504324-0.100284644529j)*x[0] + ((0.881574503596+0.667172979284j))*x[1] + ((0.141516693288+0.135046984846j))*x[2]
            ref[(1, 2, 1)]=(0.34680584628+0.3509676598j)
            arg[(1, 2, 2)]=(0.281774438225-0.682627380598j)*x[0] + ((0.0516565111159+0.250081238939j))*x[1] + ((0.730964028591+0.715149719674j))*x[2]
            ref[(1, 2, 2)]=(0.532197488966+0.141301789008j)
            arg[(1, 3, 0)]=(0.371303489977-0.800203499401j)*x[0] + ((0.23900143674+0.0277445006431j))*x[1] + ((0.570838699409-0.748287529269j))*x[2]
            ref[(1, 3, 0)]=(0.590571813063-0.760373264013j)
            arg[(1, 3, 1)]=(-0.392675519699+0.496953285291j)*x[0] + ((-0.686211114835-0.711810128216j))*x[1] + ((-0.378064325006-0.285086427831j))*x[2]
            ref[(1, 3, 1)]=(-0.72847547977-0.249971635378j)
            arg[(1, 3, 2)]=(-0.193411662692-0.920082736856j)*x[0] + ((-0.374608402842+0.585860309237j))*x[1] + ((0.929851588626-0.769843876948j))*x[2]
            ref[(1, 3, 2)]=(0.180915761546-0.552033152283j)
            arg[(2, 0, 0)]=(-0.405830445225-0.394956762861j)*x[0] + ((-0.750423754701-0.590108999449j))*x[1] + ((-0.2080029487+0.346775465236j))*x[2]
            ref[(2, 0, 0)]=(-0.682128574313-0.319145148537j)
            arg[(2, 0, 1)]=(0.787375191976-0.157544498748j)*x[0] + ((0.274912547658-0.238208046173j))*x[1] + ((0.427847393835-0.713363509933j))*x[2]
            ref[(2, 0, 1)]=(0.745067566735-0.554558027427j)
            arg[(2, 0, 2)]=(-0.78298723595-0.110485058209j)*x[0] + ((-0.775599457592-0.991260080787j))*x[1] + ((0.538679366179+0.504136244758j))*x[2]
            ref[(2, 0, 2)]=(-0.509953663681-0.298804447119j)
            arg[(2, 1, 0)]=(-0.98191244649+0.775575886433j)*x[0] + ((-0.816610571669+0.516002365706j))*x[1] + ((0.454795241157-0.456165641072j))*x[2]
            ref[(2, 1, 0)]=(-0.671863888501+0.417706305534j)
            arg[(2, 1, 1)]=(0.699378872371-0.253935818951j)*x[0] + ((0.363083905433+0.00456930111686j))*x[1] + ((-0.143279872752+0.133277775072j))*x[2]
            ref[(2, 1, 1)]=(0.459591452526-0.0580443713813j)
            arg[(2, 1, 2)]=(-0.235979154263-0.244954994306j)*x[0] + ((-0.822168464142+0.3921131336j))*x[1] + ((0.410812242231+0.126363175308j))*x[2]
            ref[(2, 1, 2)]=(-0.323667688087+0.136760657301j)
            arg[(2, 2, 0)]=(-0.481544979213-0.0433462498824j)*x[0] + ((-0.0540579031158+0.122388295672j))*x[1] + ((0.961406961777+0.638870916122j))*x[2]
            ref[(2, 2, 0)]=(0.212902039724+0.358956480956j)
            arg[(2, 2, 1)]=(-0.212631899374-0.321004717281j)*x[0] + ((0.152920642198-0.973296467732j))*x[1] + ((-0.0489375241819+0.981589644329j))*x[2]
            ref[(2, 2, 1)]=(-0.0543243906788-0.156355770342j)
            arg[(2, 2, 2)]=(-0.646873745833-0.901041408546j)*x[0] + ((0.479392895572+0.0341411629645j))*x[1] + ((-0.0974263525241+0.274667120746j))*x[2]
            ref[(2, 2, 2)]=(-0.132453601392-0.296116562418j)
            arg[(2, 3, 0)]=(0.574698105024+0.857582859586j)*x[0] + ((-0.624212440058-0.397366073849j))*x[1] + ((0.153847570609+0.653406441329j))*x[2]
            ref[(2, 3, 0)]=(0.0521666177875+0.556811613533j)
            arg[(2, 3, 1)]=(-0.120478153136+0.761674613752j)*x[0] + ((0.7965450347+0.534782864284j))*x[1] + ((-0.298107648917+0.229901023918j))*x[2]
            ref[(2, 3, 1)]=(0.188979616324+0.763179250977j)
            arg[(2, 3, 2)]=(-0.0265347806174-0.749338133753j)*x[0] + ((0.765180450763-0.15525881474j))*x[1] + ((-0.22959020021+0.377239500612j))*x[2]
            ref[(2, 3, 2)]=(0.254527734968-0.26367872394j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3, 4),w)
        ref=numpy.zeros((3, 2, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.11899304241+0.149184132438j)*x[0] + ((-0.777613471501+0.510417888024j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.329310214546+0.329801010231j)
            arg[(0, 0, 0, 1)]=(0.633580917888+0.179238321773j)*x[0] + ((-0.34613665128+0.871005321537j))*x[1]
            ref[(0, 0, 0, 1)]=(0.143722133304+0.525121821655j)
            arg[(0, 0, 0, 2)]=(0.508397845107-0.0699599126622j)*x[0] + ((0.768862030336+0.526853721637j))*x[1]
            ref[(0, 0, 0, 2)]=(0.638629937721+0.228446904487j)
            arg[(0, 0, 0, 3)]=(-0.188640293955+0.0204735191394j)*x[0] + ((-0.0920787467818-0.22873750325j))*x[1]
            ref[(0, 0, 0, 3)]=(-0.140359520368-0.104131992055j)
            arg[(0, 0, 1, 0)]=(0.380666878432+0.506376630053j)*x[0] + ((-0.233794199351+0.993271221533j))*x[1]
            ref[(0, 0, 1, 0)]=(0.0734363395406+0.749823925793j)
            arg[(0, 0, 1, 1)]=(-0.65954024408-0.310679705383j)*x[0] + ((0.972002594746+0.581373221402j))*x[1]
            ref[(0, 0, 1, 1)]=(0.156231175333+0.135346758009j)
            arg[(0, 0, 1, 2)]=(0.633412801822+0.814284787473j)*x[0] + ((-0.562515077159+0.562391071498j))*x[1]
            ref[(0, 0, 1, 2)]=(0.0354488623314+0.688337929486j)
            arg[(0, 0, 1, 3)]=(-0.80115960663+0.940728942753j)*x[0] + ((0.273154313217+0.535052486469j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.264002646706+0.737890714611j)
            arg[(0, 0, 2, 0)]=(0.958009524024-0.884068583986j)*x[0] + ((0.545846647353-0.802405632086j))*x[1]
            ref[(0, 0, 2, 0)]=(0.751928085688-0.843237108036j)
            arg[(0, 0, 2, 1)]=(-0.532026304797+0.950040742329j)*x[0] + ((0.553556070059-0.675088312109j))*x[1]
            ref[(0, 0, 2, 1)]=(0.0107648826308+0.13747621511j)
            arg[(0, 0, 2, 2)]=(0.25300733542-0.866594699872j)*x[0] + ((0.898209102146+0.177496311046j))*x[1]
            ref[(0, 0, 2, 2)]=(0.575608218783-0.344549194413j)
            arg[(0, 0, 2, 3)]=(-0.466724902833+0.846977492687j)*x[0] + ((0.144246151636+0.179910237714j))*x[1]
            ref[(0, 0, 2, 3)]=(-0.161239375599+0.513443865201j)
            arg[(0, 1, 0, 0)]=(0.397522695968+0.561511179234j)*x[0] + ((0.380448840743+0.732541452083j))*x[1]
            ref[(0, 1, 0, 0)]=(0.388985768356+0.647026315658j)
            arg[(0, 1, 0, 1)]=(-0.811355592827+0.473291571403j)*x[0] + ((-0.842123202719+0.116222313111j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.826739397773+0.294756942257j)
            arg[(0, 1, 0, 2)]=(-0.705922223073+0.270250377854j)*x[0] + ((-0.533651089991+0.32519741648j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.619786656532+0.297723897167j)
            arg[(0, 1, 0, 3)]=(-0.389961938883-0.50933653894j)*x[0] + ((0.149688978729-0.515622774894j))*x[1]
            ref[(0, 1, 0, 3)]=(-0.120136480077-0.512479656917j)
            arg[(0, 1, 1, 0)]=(-0.471047597749-0.884456850505j)*x[0] + ((-0.873928836572-0.107110272998j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.672488217161-0.495783561751j)
            arg[(0, 1, 1, 1)]=(-0.998284786128-0.717420624444j)*x[0] + ((0.549952643087-0.372461680099j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.22416607152-0.544941152272j)
            arg[(0, 1, 1, 2)]=(0.927453935191+0.455880771516j)*x[0] + ((0.580154697656+0.640344898162j))*x[1]
            ref[(0, 1, 1, 2)]=(0.753804316423+0.548112834839j)
            arg[(0, 1, 1, 3)]=(-0.802645471595-0.733196232008j)*x[0] + ((0.796776880431+0.667006153264j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.00293429558212-0.0330950393718j)
            arg[(0, 1, 2, 0)]=(0.938874155641-0.817291901946j)*x[0] + ((0.340630131211+0.678225798263j))*x[1]
            ref[(0, 1, 2, 0)]=(0.639752143426-0.0695330518412j)
            arg[(0, 1, 2, 1)]=(-0.331184788668-0.65641751006j)*x[0] + ((-0.265541396431+0.987719151984j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.29836309255+0.165650820962j)
            arg[(0, 1, 2, 2)]=(0.905568337248+0.394341241557j)*x[0] + ((0.346335027219+0.25301346276j))*x[1]
            ref[(0, 1, 2, 2)]=(0.625951682233+0.323677352159j)
            arg[(0, 1, 2, 3)]=(0.742543411593-0.529277095076j)*x[0] + ((-0.864363636872-0.376463313285j))*x[1]
            ref[(0, 1, 2, 3)]=(-0.0609101126397-0.45287020418j)
            arg[(1, 0, 0, 0)]=(-0.323478971821-0.398127677548j)*x[0] + ((-0.147358898451+0.141511532361j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.235418935136-0.128308072593j)
            arg[(1, 0, 0, 1)]=(-0.553268891611+0.9645325358j)*x[0] + ((0.0804244571743-0.0637896023754j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.236422217218+0.450371466712j)
            arg[(1, 0, 0, 2)]=(0.801042426989+0.948402649316j)*x[0] + ((0.576352887483+0.740753438092j))*x[1]
            ref[(1, 0, 0, 2)]=(0.688697657236+0.844578043704j)
            arg[(1, 0, 0, 3)]=(0.152926724689-0.275662723128j)*x[0] + ((0.132055830522-0.104370662318j))*x[1]
            ref[(1, 0, 0, 3)]=(0.142491277606-0.190016692723j)
            arg[(1, 0, 1, 0)]=(0.192805971596+0.0231564926202j)*x[0] + ((-0.937593412596-0.519017332694j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.3723937205-0.247930420037j)
            arg[(1, 0, 1, 1)]=(0.462346943976+0.218377408902j)*x[0] + ((-0.272779142241-0.711841842689j))*x[1]
            ref[(1, 0, 1, 1)]=(0.0947839008677-0.246732216893j)
            arg[(1, 0, 1, 2)]=(-0.435522585716+0.37783689619j)*x[0] + ((0.915071334515+0.04782630728j))*x[1]
            ref[(1, 0, 1, 2)]=(0.239774374399+0.212831601735j)
            arg[(1, 0, 1, 3)]=(-0.449755388598+0.95939279579j)*x[0] + ((-0.834116552648+0.772934839711j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.641935970623+0.86616381775j)
            arg[(1, 0, 2, 0)]=(-0.468088825607-0.638153176055j)*x[0] + ((-0.0631417357268-0.530257517471j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.265615280667-0.584205346763j)
            arg[(1, 0, 2, 1)]=(-0.487937288995+0.0333378345772j)*x[0] + ((-0.296279004818+0.0219862583145j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.392108146906+0.0276620464459j)
            arg[(1, 0, 2, 2)]=(-0.7203538398-0.698981141594j)*x[0] + ((-0.856806944102+0.487017491479j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.788580391951-0.105981825058j)
            arg[(1, 0, 2, 3)]=(0.9746630039+0.318072637575j)*x[0] + ((0.523753979496-0.180077616761j))*x[1]
            ref[(1, 0, 2, 3)]=(0.749208491698+0.068997510407j)
            arg[(1, 1, 0, 0)]=(-0.178307764517+0.972469715102j)*x[0] + ((0.855567073637+0.750523012278j))*x[1]
            ref[(1, 1, 0, 0)]=(0.33862965456+0.86149636369j)
            arg[(1, 1, 0, 1)]=(0.211522437115+0.840064223229j)*x[0] + ((-0.625744690315+0.234837023769j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.2071111266+0.537450623499j)
            arg[(1, 1, 0, 2)]=(-0.198561542102+0.655349238481j)*x[0] + ((-0.488558348266+0.498130127067j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.343559945184+0.576739682774j)
            arg[(1, 1, 0, 3)]=(0.141420353561-0.108267805443j)*x[0] + ((-0.444404165584+0.157866149334j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.151491906011+0.0247991719454j)
            arg[(1, 1, 1, 0)]=(-0.7690221224+0.136287089226j)*x[0] + ((0.0728711272683+0.523624370031j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.348075497566+0.329955729628j)
            arg[(1, 1, 1, 1)]=(-0.599602539334+0.694082885749j)*x[0] + ((-0.886090194073-0.824899745111j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.742846366704-0.0654084296808j)
            arg[(1, 1, 1, 2)]=(-0.345469267879+0.289745685376j)*x[0] + ((-0.758428085822-0.420812228918j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.551948676851-0.0655332717715j)
            arg[(1, 1, 1, 3)]=(0.759119417373+0.99580206963j)*x[0] + ((0.988764240811-0.799084942288j))*x[1]
            ref[(1, 1, 1, 3)]=(0.873941829092+0.0983585636707j)
            arg[(1, 1, 2, 0)]=(-0.644466823252-0.0511473833247j)*x[0] + ((-0.84956812243-0.509824055309j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.747017472841-0.280485719317j)
            arg[(1, 1, 2, 1)]=(-0.841780317171-0.862898353531j)*x[0] + ((-0.912410338125+0.155488209594j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.877095327648-0.353705071968j)
            arg[(1, 1, 2, 2)]=(0.757104555813+0.841358089467j)*x[0] + ((-0.367353952375+0.806429723424j))*x[1]
            ref[(1, 1, 2, 2)]=(0.194875301719+0.823893906445j)
            arg[(1, 1, 2, 3)]=(-0.0488193020879+0.328322434328j)*x[0] + ((0.879839350235-0.310256796637j))*x[1]
            ref[(1, 1, 2, 3)]=(0.415510024073+0.00903281884566j)
            arg[(2, 0, 0, 0)]=(-0.955194807279+0.821269887459j)*x[0] + ((-0.628959014682-0.695233372897j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.79207691098+0.0630182572807j)
            arg[(2, 0, 0, 1)]=(-0.902803842204+0.736111683008j)*x[0] + ((0.561451549597+0.383055487919j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.170676146303+0.559583585464j)
            arg[(2, 0, 0, 2)]=(0.403882645094+0.738655503846j)*x[0] + ((-0.0811931336062-0.983409579111j))*x[1]
            ref[(2, 0, 0, 2)]=(0.161344755744-0.122377037633j)
            arg[(2, 0, 0, 3)]=(-0.830536016462-0.201867322568j)*x[0] + ((0.365428103894-0.441792062191j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.232553956284-0.32182969238j)
            arg[(2, 0, 1, 0)]=(0.795868378191+0.973646771021j)*x[0] + ((0.0241839247819-0.744403349994j))*x[1]
            ref[(2, 0, 1, 0)]=(0.410026151486+0.114621710513j)
            arg[(2, 0, 1, 1)]=(0.785800327278-0.584626924793j)*x[0] + ((-0.930448653502+0.0145721796764j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.0723241631117-0.285027372559j)
            arg[(2, 0, 1, 2)]=(-0.0121804231696+0.420422740865j)*x[0] + ((-0.24124177115+0.629315381556j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.12671109716+0.524869061211j)
            arg[(2, 0, 1, 3)]=(0.347456210009+0.179079620883j)*x[0] + ((-0.302770667791-0.167882486639j))*x[1]
            ref[(2, 0, 1, 3)]=(0.0223427711088+0.00559856712238j)
            arg[(2, 0, 2, 0)]=(-0.066629187773-0.462683352848j)*x[0] + ((-0.0502784624897-0.681920325475j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.0584538251314-0.572301839162j)
            arg[(2, 0, 2, 1)]=(-0.759473794609-0.904259697852j)*x[0] + ((0.17606547713-0.461827462016j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.291704158739-0.683043579934j)
            arg[(2, 0, 2, 2)]=(-0.638759009468-0.159112781577j)*x[0] + ((0.914022433675+0.302606925266j))*x[1]
            ref[(2, 0, 2, 2)]=(0.137631712104+0.0717470718443j)
            arg[(2, 0, 2, 3)]=(0.957263045095+0.406076950235j)*x[0] + ((0.708135518548+0.275742773991j))*x[1]
            ref[(2, 0, 2, 3)]=(0.832699281821+0.340909862113j)
            arg[(2, 1, 0, 0)]=(-0.777146834891+0.648803689763j)*x[0] + ((0.437135460036-0.00195920199822j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.170005687428+0.323422243882j)
            arg[(2, 1, 0, 1)]=(0.578082262637-0.393529965231j)*x[0] + ((0.104971645364+0.747417465728j))*x[1]
            ref[(2, 1, 0, 1)]=(0.341526954+0.176943750248j)
            arg[(2, 1, 0, 2)]=(-0.346452689413-0.386109956048j)*x[0] + ((-0.368317170306-0.468675307189j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.35738492986-0.427392631618j)
            arg[(2, 1, 0, 3)]=(-0.463601863667+0.417377010779j)*x[0] + ((-0.148739328629+0.254734212313j))*x[1]
            ref[(2, 1, 0, 3)]=(-0.306170596148+0.336055611546j)
            arg[(2, 1, 1, 0)]=(0.86754078473-0.406045739351j)*x[0] + ((0.974224290692+0.998790668401j))*x[1]
            ref[(2, 1, 1, 0)]=(0.920882537711+0.296372464525j)
            arg[(2, 1, 1, 1)]=(-0.695373200743+0.238823570091j)*x[0] + ((-0.849049484938+0.820509406263j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.77221134284+0.529666488177j)
            arg[(2, 1, 1, 2)]=(0.770410472565-0.72423146996j)*x[0] + ((0.19597281499-0.809158649778j))*x[1]
            ref[(2, 1, 1, 2)]=(0.483191643777-0.766695059869j)
            arg[(2, 1, 1, 3)]=(-0.761852883475+0.336536778947j)*x[0] + ((-0.90706088455+0.714928850054j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.834456884013+0.525732814501j)
            arg[(2, 1, 2, 0)]=(-0.590327378264+0.286983896827j)*x[0] + ((0.854124420759+0.349988818901j))*x[1]
            ref[(2, 1, 2, 0)]=(0.131898521248+0.318486357864j)
            arg[(2, 1, 2, 1)]=(0.3032180499-0.038492432642j)*x[0] + ((-0.482926919412-0.415675969436j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.0898544347562-0.227084201039j)
            arg[(2, 1, 2, 2)]=(0.817186163132-0.315837263975j)*x[0] + ((0.918784103855-0.423441716749j))*x[1]
            ref[(2, 1, 2, 2)]=(0.867985133493-0.369639490362j)
            arg[(2, 1, 2, 3)]=(0.319970341547-0.0734674848494j)*x[0] + ((0.747994148104-0.593726794011j))*x[1]
            ref[(2, 1, 2, 3)]=(0.533982244826-0.33359713943j)
        else:
            arg[(0, 0, 0, 0)]=(-0.995815165904+0.733943193013j)*x[0] + ((-0.169583984684+0.222028347371j))*x[1] + ((-0.350852409826-0.103347543583j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.758125780207+0.4263119984j)
            arg[(0, 0, 0, 1)]=(0.880238269096-0.995991215115j)*x[0] + ((0.779691367712-0.0833357772227j))*x[1] + ((0.634319803847+0.440094551576j))*x[2]
            ref[(0, 0, 0, 1)]=(1.14712472033-0.319616220381j)
            arg[(0, 0, 0, 2)]=(0.745336051435+0.257400671674j)*x[0] + ((-0.679509935506-0.805438026392j))*x[1] + ((0.448039142054+0.154216779508j))*x[2]
            ref[(0, 0, 0, 2)]=(0.256932628992-0.196910287605j)
            arg[(0, 0, 0, 3)]=(0.589219798464+0.778068313011j)*x[0] + ((0.54869819775+0.558433845114j))*x[1] + ((-0.258804004673+0.60894855191j))*x[2]
            ref[(0, 0, 0, 3)]=(0.43955699577+0.972725355017j)
            arg[(0, 0, 1, 0)]=(0.915486187114+0.0979581144306j)*x[0] + ((0.697734151313+0.464282964612j))*x[1] + ((0.734535253039+0.760479836601j))*x[2]
            ref[(0, 0, 1, 0)]=(1.17387779573+0.661360457822j)
            arg[(0, 0, 1, 1)]=(0.907876674761-0.772411056679j)*x[0] + ((-0.336693885635+0.61638322338j))*x[1] + ((-0.651888648157-0.152537388605j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.0403529295159-0.154282610952j)
            arg[(0, 0, 1, 2)]=(-0.587249234681-0.308377422828j)*x[0] + ((-0.626514450078-0.587729215249j))*x[1] + ((-0.886686154043-0.721784558839j))*x[2]
            ref[(0, 0, 1, 2)]=(-1.0502249194-0.808945598458j)
            arg[(0, 0, 1, 3)]=(0.841493095606-0.661493997123j)*x[0] + ((0.344546672361+0.84414258358j))*x[1] + ((-0.247730198378+0.0431666652808j))*x[2]
            ref[(0, 0, 1, 3)]=(0.469154784794+0.112907625869j)
            arg[(0, 0, 2, 0)]=(-0.383108738696+0.0573468702187j)*x[0] + ((-0.928944307436+0.495674198181j))*x[1] + ((0.628474622195-0.0361164186668j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.341789211969+0.258452324866j)
            arg[(0, 0, 2, 1)]=(0.861363323869+0.819452672084j)*x[0] + ((-0.782642150472-0.730885918769j))*x[1] + ((-0.644323317223-0.505728683482j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.282801071913-0.208580965083j)
            arg[(0, 0, 2, 2)]=(-0.384223297777-0.51288236055j)*x[0] + ((-0.392080277741+0.413514745536j))*x[1] + ((0.681040937155-0.536281272952j))*x[2]
            ref[(0, 0, 2, 2)]=(-0.0476313191812-0.317824443983j)
            arg[(0, 0, 2, 3)]=(0.416149210509-0.178312398954j)*x[0] + ((0.846964682356+0.497863125929j))*x[1] + ((-0.635441717521-0.803699508937j))*x[2]
            ref[(0, 0, 2, 3)]=(0.313836087672-0.242074390981j)
            arg[(0, 1, 0, 0)]=(0.145205252602-0.404601679096j)*x[0] + ((-0.419095564169-0.192444350443j))*x[1] + ((0.346769944586+0.629487335474j))*x[2]
            ref[(0, 1, 0, 0)]=(0.0364398165093+0.016220652967j)
            arg[(0, 1, 0, 1)]=(0.733011164787+0.973274839699j)*x[0] + ((0.219477195836-0.978354478742j))*x[1] + ((-0.634127840135-0.977535731526j))*x[2]
            ref[(0, 1, 0, 1)]=(0.159180260244-0.491307685285j)
            arg[(0, 1, 0, 2)]=(0.757754518064+0.0861211328841j)*x[0] + ((0.28794365721+0.568830812425j))*x[1] + ((0.386548525204+0.208164944376j))*x[2]
            ref[(0, 1, 0, 2)]=(0.716123350239+0.431558444842j)
            arg[(0, 1, 0, 3)]=(-0.77693460312+0.000273636118082j)*x[0] + ((0.348539698297+0.843996468198j))*x[1] + ((0.0567907766283-0.799572036953j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.185802064097+0.0223490336812j)
            arg[(0, 1, 1, 0)]=(-0.550812031156+0.204525119097j)*x[0] + ((0.491226853886-0.403175882059j))*x[1] + ((-0.517769381402-0.807103788227j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.288677279336-0.502877275594j)
            arg[(0, 1, 1, 1)]=(0.0510635754496+0.0392246658594j)*x[0] + ((-0.694569070198-0.569359346135j))*x[1] + ((0.717789090807+0.833091400977j))*x[2]
            ref[(0, 1, 1, 1)]=(0.0371417980297+0.151478360351j)
            arg[(0, 1, 1, 2)]=(-0.075139668299+0.568895495056j)*x[0] + ((0.250259807163+0.105576697935j))*x[1] + ((0.372493362356-0.522578207237j))*x[2]
            ref[(0, 1, 1, 2)]=(0.27380675061+0.0759469928768j)
            arg[(0, 1, 1, 3)]=(-0.753860346151+0.36327383463j)*x[0] + ((-0.72149936366+0.787525817656j))*x[1] + ((0.367948683081+0.852630185347j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.553705513365+1.00171491882j)
            arg[(0, 1, 2, 0)]=(0.831007149589-0.492167432278j)*x[0] + ((-0.150039305855+0.410487584113j))*x[1] + ((0.254829224525-0.957498861995j))*x[2]
            ref[(0, 1, 2, 0)]=(0.46789853413-0.51958935508j)
            arg[(0, 1, 2, 1)]=(-0.615875210814-0.940609177653j)*x[0] + ((0.370803836445+0.0317429112697j))*x[1] + ((-0.0565181979476+0.76511970236j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.150794786158-0.0718732820116j)
            arg[(0, 1, 2, 2)]=(-0.231716160231-0.347195239469j)*x[0] + ((0.769910835506+0.897912311872j))*x[1] + ((-0.279469512531-0.610660864053j))*x[2]
            ref[(0, 1, 2, 2)]=(0.129362581372-0.0299718958252j)
            arg[(0, 1, 2, 3)]=(0.953659194486+0.793440476864j)*x[0] + ((0.0136258849508-0.0588574176099j))*x[1] + ((-0.561535168428-0.139839649877j))*x[2]
            ref[(0, 1, 2, 3)]=(0.202874955504+0.297371704689j)
            arg[(1, 0, 0, 0)]=(0.182897502367-0.817178646914j)*x[0] + ((-0.617352147199-0.973802863677j))*x[1] + ((-0.469798969317-0.565543027065j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.452126807074-1.17826226883j)
            arg[(1, 0, 0, 1)]=(0.66532422016+0.730712313782j)*x[0] + ((0.152338428369-0.930799499292j))*x[1] + ((-0.341791381492-0.930480435993j))*x[2]
            ref[(1, 0, 0, 1)]=(0.237935633519-0.565283810752j)
            arg[(1, 0, 0, 2)]=(0.652583609101+0.55242635586j)*x[0] + ((-0.748186133576+0.191178154433j))*x[1] + ((-0.782161093339-0.879722277183j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.438881808907-0.0680588834449j)
            arg[(1, 0, 0, 3)]=(-0.470241449-0.145281467766j)*x[0] + ((0.501632304138+0.616764721149j))*x[1] + ((0.33566050532+0.0533718877519j))*x[2]
            ref[(1, 0, 0, 3)]=(0.183525680229+0.262427570567j)
            arg[(1, 0, 1, 0)]=(0.425923101666+0.680440708625j)*x[0] + ((0.344540621543+0.144357836067j))*x[1] + ((-0.676001070891+0.670995715826j))*x[2]
            ref[(1, 0, 1, 0)]=(0.0472313261591+0.747897130259j)
            arg[(1, 0, 1, 1)]=(-0.273841220857+0.681557020261j)*x[0] + ((-0.678001919021-0.57010356436j))*x[1] + ((-0.71019704162-0.795503504224j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.831020090749-0.342025024161j)
            arg[(1, 0, 1, 2)]=(-0.704847942188-0.975116588764j)*x[0] + ((0.318017393998+0.634352569621j))*x[1] + ((-0.412660943+0.649422821627j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.399745745595+0.154329401242j)
            arg[(1, 0, 1, 3)]=(-0.825025208724-0.787178113051j)*x[0] + ((-0.87677457835+0.465442005361j))*x[1] + ((-0.255605865815-0.519412169265j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.978702826445-0.420574138478j)
            arg[(1, 0, 2, 0)]=(0.414826517866+0.393373615595j)*x[0] + ((-0.796991066944+0.486469732311j))*x[1] + ((-0.790845309544+0.552482620461j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.586504929311+0.716162984183j)
            arg[(1, 0, 2, 1)]=(0.0716386388442-0.067239518565j)*x[0] + ((0.878376465999+0.213187085301j))*x[1] + ((-0.0605593206273+0.468143256876j))*x[2]
            ref[(1, 0, 2, 1)]=(0.444727892108+0.307045411806j)
            arg[(1, 0, 2, 2)]=(-0.228226497187-0.205538965398j)*x[0] + ((0.0397825614856-0.135849052707j))*x[1] + ((-0.279373593176+0.110486581635j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.233908764438-0.115450718235j)
            arg[(1, 0, 2, 3)]=(-0.624714526293-0.744614354475j)*x[0] + ((-0.129191773705-0.435605828216j))*x[1] + ((-0.222207753976-0.600849742037j))*x[2]
            ref[(1, 0, 2, 3)]=(-0.488057026987-0.890534962364j)
            arg[(1, 1, 0, 0)]=(-0.403855170105-0.782624025583j)*x[0] + ((0.860288058746+0.47987267916j))*x[1] + ((-0.824297163706+0.969195426123j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.183932137532+0.33322203985j)
            arg[(1, 1, 0, 1)]=(-0.8663163965+0.428325430879j)*x[0] + ((-0.26624395059+0.472019189087j))*x[1] + ((0.0878425088249+0.182080142256j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.522358919132+0.541212381111j)
            arg[(1, 1, 0, 2)]=(0.118500164684+0.842477187135j)*x[0] + ((-0.467406068129-0.0840796967166j))*x[1] + ((0.469587181459-0.480390964714j))*x[2]
            ref[(1, 1, 0, 2)]=(0.0603406390072+0.139003262852j)
            arg[(1, 1, 0, 3)]=(-0.257485752522+0.30829297801j)*x[0] + ((0.215079755714-0.00520013634059j))*x[1] + ((-0.86235654987+0.0607274746683j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.452381273339+0.181910158169j)
            arg[(1, 1, 1, 0)]=(0.477286704686-0.467871529233j)*x[0] + ((-0.792678469263-0.569258572991j))*x[1] + ((0.680737354866+0.603706733294j))*x[2]
            ref[(1, 1, 1, 0)]=(0.182672795145-0.216711684465j)
            arg[(1, 1, 1, 1)]=(-0.0621221490371-0.495281680599j)*x[0] + ((-0.345320077149-0.0942186647887j))*x[1] + ((-0.510742300745+0.343748864751j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.459092263465-0.122875740318j)
            arg[(1, 1, 1, 2)]=(0.811644857437+0.938479938786j)*x[0] + ((0.336458746923+0.0492532029855j))*x[1] + ((-0.0269635170317+0.336029887846j))*x[2]
            ref[(1, 1, 1, 2)]=(0.560570043664+0.661881514809j)
            arg[(1, 1, 1, 3)]=(-0.85195128168+0.532838995031j)*x[0] + ((0.269945673471+0.684569373519j))*x[1] + ((0.415407833584+0.200100511199j))*x[2]
            ref[(1, 1, 1, 3)]=(-0.0832988873128+0.708754439875j)
            arg[(1, 1, 2, 0)]=(-0.566703929391-0.398542748051j)*x[0] + ((0.799708214671+0.362848905005j))*x[1] + ((0.760440387323+0.983426538632j))*x[2]
            ref[(1, 1, 2, 0)]=(0.496722336301+0.473866347793j)
            arg[(1, 1, 2, 1)]=(0.95155944311-0.555181610891j)*x[0] + ((0.188216908122-0.552479826102j))*x[1] + ((0.696689659111-0.424424855074j))*x[2]
            ref[(1, 1, 2, 1)]=(0.918233005172-0.766043146034j)
            arg[(1, 1, 2, 2)]=(-0.572043722951+0.903549173041j)*x[0] + ((0.954174845621-0.592173584444j))*x[1] + ((0.95357551822-0.0975797296073j))*x[2]
            ref[(1, 1, 2, 2)]=(0.667853320445+0.106897929495j)
            arg[(1, 1, 2, 3)]=(-0.76479756937-0.229332158149j)*x[0] + ((0.496245790724+0.0348729710081j))*x[1] + ((0.56464986033+0.417052585941j))*x[2]
            ref[(1, 1, 2, 3)]=(0.148049040842+0.1112966994j)
            arg[(2, 0, 0, 0)]=(-0.209712753798+0.54553970742j)*x[0] + ((0.0660536754545-0.0357730189272j))*x[1] + ((0.252995654514-0.377077605732j))*x[2]
            ref[(2, 0, 0, 0)]=(0.0546682880854+0.0663445413803j)
            arg[(2, 0, 0, 1)]=(0.533240055693+0.758204505592j)*x[0] + ((0.784518798698-0.736583076881j))*x[1] + ((-0.956224566683+0.277512667963j))*x[2]
            ref[(2, 0, 0, 1)]=(0.180767143854+0.149567048337j)
            arg[(2, 0, 0, 2)]=(-0.207272321486+0.242420673438j)*x[0] + ((-0.355273879828+0.694727272438j))*x[1] + ((0.0494382145817-0.765952091359j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.256553993366+0.0855979272585j)
            arg[(2, 0, 0, 3)]=(-0.694746391891+0.0968018892707j)*x[0] + ((0.689064072688+0.909617693729j))*x[1] + ((-0.982322466209+0.924925435246j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.494002392706+0.965672509123j)
            arg[(2, 0, 1, 0)]=(-0.269041333338+0.376403684969j)*x[0] + ((-0.812643818012+0.938544319205j))*x[1] + ((0.488163433196+0.842969225758j))*x[2]
            ref[(2, 0, 1, 0)]=(-0.296760859077+1.07895861497j)
            arg[(2, 0, 1, 1)]=(-0.883362108382-0.497804362624j)*x[0] + ((0.507578918316+0.72043531606j))*x[1] + ((0.729443147145-0.911448194714j))*x[2]
            ref[(2, 0, 1, 1)]=(0.176829978539-0.344408620639j)
            arg[(2, 0, 1, 2)]=(-0.934804082235+0.105353282055j)*x[0] + ((-0.314030669961+0.40189617245j))*x[1] + ((0.897428057781-0.0566036232935j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.175703347208+0.225322915606j)
            arg[(2, 0, 1, 3)]=(-0.39703892154-0.19943975231j)*x[0] + ((-0.728997576958+0.793809741922j))*x[1] + ((-0.683497927397+0.544223543027j))*x[2]
            ref[(2, 0, 1, 3)]=(-0.904767212947+0.56929676632j)
            arg[(2, 0, 2, 0)]=(0.0376959628551+0.358996634752j)*x[0] + ((0.745656049014-0.153766275317j))*x[1] + ((0.381530263806+0.629785591967j))*x[2]
            ref[(2, 0, 2, 0)]=(0.582441137837+0.417507975701j)
            arg[(2, 0, 2, 1)]=(-0.848470303562-0.889389466021j)*x[0] + ((0.442417500223-0.250929707411j))*x[1] + ((0.8674488273+0.864113345816j))*x[2]
            ref[(2, 0, 2, 1)]=(0.230698011981-0.138102913808j)
            arg[(2, 0, 2, 2)]=(-0.897961648153-0.795834469981j)*x[0] + ((0.0348016574508-0.626565916764j))*x[1] + ((-0.000582745241646-0.749604126118j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.431871367972-1.08600225643j)
            arg[(2, 0, 2, 3)]=(-0.353361017423+0.577966322317j)*x[0] + ((0.552248993773-0.624321073157j))*x[1] + ((-0.92839067564+0.879298171934j))*x[2]
            ref[(2, 0, 2, 3)]=(-0.364751349645+0.416471710547j)
            arg[(2, 1, 0, 0)]=(-0.845823124293-0.922793212411j)*x[0] + ((0.190050360926+0.159447086857j))*x[1] + ((0.700587249307+0.767196902776j))*x[2]
            ref[(2, 1, 0, 0)]=(0.0224072429701+0.00192538861118j)
            arg[(2, 1, 0, 1)]=(0.713498686604-0.230278800709j)*x[0] + ((-0.508541885447-0.189007287849j))*x[1] + ((-0.879038728372-0.683592958752j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.337040963608-0.551439523655j)
            arg[(2, 1, 0, 2)]=(0.788350966969+0.496450620342j)*x[0] + ((0.193007437993+0.188979464803j))*x[1] + ((0.451499865286+0.627909094813j))*x[2]
            ref[(2, 1, 0, 2)]=(0.716429135124+0.656669589979j)
            arg[(2, 1, 0, 3)]=(0.947347124468-0.710595914254j)*x[0] + ((-0.937305609917+0.838847944254j))*x[1] + ((0.971158373732+0.358043070891j))*x[2]
            ref[(2, 1, 0, 3)]=(0.490599944142+0.243147550445j)
            arg[(2, 1, 1, 0)]=(-0.648038060208+0.376889301296j)*x[0] + ((-0.71762872583+0.201180122317j))*x[1] + ((-0.171617531202-0.621811249956j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.76864215862-0.0218709131713j)
            arg[(2, 1, 1, 1)]=(-0.997313395232-0.542606988719j)*x[0] + ((-0.266533888216+0.24648214011j))*x[1] + ((0.493703577824-0.115066884033j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.385071852812-0.205595866321j)
            arg[(2, 1, 1, 2)]=(0.608071199961+0.390649483471j)*x[0] + ((-0.721860332298-0.308000265526j))*x[1] + ((-0.585637313751+0.820101117908j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.349713223044+0.451375167927j)
            arg[(2, 1, 1, 3)]=(-0.250588208295-0.622894253171j)*x[0] + ((0.154707518563+0.126398638082j))*x[1] + ((-0.616140983119+0.129658456176j))*x[2]
            ref[(2, 1, 1, 3)]=(-0.356010836426-0.183418579457j)
            arg[(2, 1, 2, 0)]=(0.374615172789-0.854604365062j)*x[0] + ((0.696728491601-0.971297193893j))*x[1] + ((0.862066785992+0.93389447655j))*x[2]
            ref[(2, 1, 2, 0)]=(0.966705225191-0.446003541203j)
            arg[(2, 1, 2, 1)]=(0.140425376944-0.6298055906j)*x[0] + ((0.825809426953+0.175581695093j))*x[1] + ((-0.763208049098+0.210526546392j))*x[2]
            ref[(2, 1, 2, 1)]=(0.1015133774-0.121848674558j)
            arg[(2, 1, 2, 2)]=(-0.996389005902+0.76389236622j)*x[0] + ((0.235090455919-0.663594729888j))*x[1] + ((0.130406618531-0.505374398216j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.315445965726-0.202538380942j)
            arg[(2, 1, 2, 3)]=(-0.955446140498-0.655027133984j)*x[0] + ((0.318964183609+0.95959159127j))*x[1] + ((-0.881044855279+0.453477454995j))*x[2]
            ref[(2, 1, 2, 3)]=(-0.758763406084+0.379020956141j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.0108939910479+0.079538921822j)*x[0]**o + ((0.333644172892+0.395923617916j))*x[0] + ((-0.371284939448+0.620908078904j))*x[1]**o + ((0.1556269485+0.230476103212j))*x[1]
            ref=(0.0535460954482+0.663423360927j)-((-0.063696488416+0.116741166788j))*(o-1.)
        else:
            arg=(-0.0914804050248-0.00126584886498j)*x[0]**o + ((-0.574624698268+0.485768797458j))*x[0] + ((0.029469601788+0.256083885293j))*x[1]**o + ((-0.788380237765+0.0154075391639j))*x[1] + ((-0.855478111375-0.248614750228j))*x[2]**o + ((-0.973537250364-0.192227239058j))*x[2]
            ref=(-1.6270155505+0.157576191882j)-((-0.152914819102+0.00103388103331j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.940157899807+0.166110706557j)*x[0]**o + ((0.656348835986+0.455428122594j))*x[0] + ((0.275806505283-0.227853935107j))*x[1]**o + ((0.521602421831+0.779479799961j))*x[1]
            ref[(0,)]=(0.256799931647+0.586582347002j)-((-0.110725232421-0.0102905380917j))*(o-1.)
            arg[(1,)]=(-0.661371102385-0.499284374162j)*x[0]**o + ((0.136376079054-0.825641823942j))*x[0] + ((-0.422249909539+0.957772012196j))*x[1]**o + ((0.370080463797-0.00152753224685j))*x[1]
            ref[(1,)]=(-0.288582234536-0.184340859077j)-((-0.180603501987+0.076414606339j))*(o-1.)
            arg[(2,)]=(-0.763108428366+0.353454916314j)*x[0]**o + ((0.675793987162-0.473054904811j))*x[0] + ((-0.925002959787+0.165643857522j))*x[1]**o + ((-0.870835415051+0.52178793586j))*x[1]
            ref[(2,)]=(-0.941576408021+0.283915902442j)-((-0.281351898025+0.0865164623059j))*(o-1.)
        else:
            arg[(0,)]=(0.98798966142+0.539987050376j)*x[0]**o + ((-0.109213720813+0.196364445945j))*x[0] + ((0.246470768634-0.487895261146j))*x[1]**o + ((0.401508259179+0.0113063138355j))*x[1] + ((-0.71715659942+0.266165011636j))*x[2]**o + ((0.115698125654+0.702555886987j))*x[2]
            ref[(0,)]=(0.462648247327+0.614241723817j)-((0.0862173051056+0.0530428001443j))*(o-1.)
            arg[(1,)]=(0.555071206104-0.0697854750845j)*x[0]**o + ((-0.575253682888-0.816498199517j))*x[0] + ((0.67724715971-0.589119336446j))*x[1]**o + ((0.695572538747+0.734808663731j))*x[1] + ((-0.719815585642-0.459222013473j))*x[2]**o + ((0.401878433589+0.960634085522j))*x[2]
            ref[(1,)]=(0.51735003481-0.119591137634j)-((0.0854171300286-0.186354470834j))*(o-1.)
            arg[(2,)]=(-0.340410011498+0.404545541818j)*x[0]**o + ((0.364199257276-0.0518721480508j))*x[0] + ((-0.769504824459+0.878702329158j))*x[1]**o + ((0.613200056843+0.7062492926j))*x[1] + ((-0.0930031807351-0.373634628109j))*x[2]**o + ((0.66765071553+0.87298879756j))*x[2]
            ref[(2,)]=(0.221066006479+1.21848959249j)-((-0.200486336115+0.151602207144j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref=numpy.zeros((2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.263432106368+0.0560252311984j)*x[0]**o + ((0.0837258853529-0.761935525208j))*x[0] + ((-0.483056514676+0.163226757824j))*x[1]**o + ((0.620743574166+0.0417769044047j))*x[1]
            ref[(0, 0)]=(0.242422525605-0.25045331589j)-((-0.0366040680514+0.0365419981704j))*(o-1.)
            arg[(0, 1)]=(-0.615078415576+0.151244601193j)*x[0]**o + ((0.661112947621-0.474646466763j))*x[0] + ((0.849893404122-0.0499647175885j))*x[1]**o + ((0.804159507937+0.170278802875j))*x[1]
            ref[(0, 1)]=(0.850043722052-0.101543890142j)-((0.0391358314242+0.0168799806007j))*(o-1.)
            arg[(0, 2)]=(0.317268806771-0.835868361484j)*x[0]**o + ((-0.505931755131+0.337136206135j))*x[0] + ((-0.251942886383-0.612713774187j))*x[1]**o + ((-0.561358439025-0.882631669443j))*x[1]
            ref[(0, 2)]=(-0.500982136884-0.99703879949j)-((0.0108876533979-0.241430355945j))*(o-1.)
            arg[(1, 0)]=(0.307831750476+0.192664793861j)*x[0]**o + ((-0.667889768678-0.779474352447j))*x[0] + ((-0.56378559497-0.381394538328j))*x[1]**o + ((-0.852110992312-0.247953186105j))*x[1]
            ref[(1, 0)]=(-0.887977302742-0.608078641509j)-((-0.0426589740823-0.0314549574112j))*(o-1.)
            arg[(1, 1)]=(-0.604016446055+0.474697321115j)*x[0]**o + ((-0.462231471696-0.115163565133j))*x[0] + ((0.214836788285+0.444834411496j))*x[1]**o + ((-0.879025020675-0.391104957394j))*x[1]
            ref[(1, 1)]=(-0.86521807507+0.206631605042j)-((-0.0648632762951+0.153255288769j))*(o-1.)
            arg[(1, 2)]=(0.886790700508+0.072123386009j)*x[0]**o + ((-0.682200650055-0.0940236219037j))*x[0] + ((0.807527645968-0.203713591775j))*x[1]**o + ((-0.711490934008+0.225122616975j))*x[1]
            ref[(1, 2)]=(0.150313381207-0.000245605347575j)-((0.282386391079-0.021931700961j))*(o-1.)
        else:
            arg[(0, 0)]=(0.99321095328+0.480869091978j)*x[0]**o + ((0.0935807844755-0.0794657770862j))*x[0] + ((-0.0894526477852+0.868865021344j))*x[1]**o + ((-0.333011396969+0.639101202894j))*x[1] + ((-0.241550026781+0.300536283782j))*x[2]**o + ((-0.887834905338-0.436084743879j))*x[2]
            ref[(0, 0)]=(-0.232528619559+0.886910539517j)-((0.110368046452+0.275045066184j))*(o-1.)
            arg[(0, 1)]=(0.863926017253+0.99790810939j)*x[0]**o + ((-0.67184097933-0.681116591062j))*x[0] + ((-0.235657985606+0.577066364011j))*x[1]**o + ((-0.424487693893-0.621747713486j))*x[1] + ((0.115929915408+0.209537803667j))*x[2]**o + ((-0.0607768205906+0.821036913814j))*x[2]
            ref[(0, 1)]=(-0.206453773379+0.651342443166j)-((0.124032991176+0.297418712845j))*(o-1.)
            arg[(0, 2)]=(-0.377947552273+0.169883136894j)*x[0]**o + ((0.646804786576-0.82937133988j))*x[0] + ((-0.514123079556-0.0570664451778j))*x[1]**o + ((-0.167273131432+0.418236255964j))*x[1] + ((-0.964923400887+0.925613472262j))*x[2]**o + ((0.00351776941109-0.337779916721j))*x[2]
            ref[(0, 2)]=(-0.68697230408+0.14475758167j)-((-0.309499005453+0.173071693996j))*(o-1.)
            arg[(1, 0)]=(0.720537046342-0.738518895229j)*x[0]**o + ((-0.113963049554+0.743689828266j))*x[0] + ((0.110864786424+0.444530040771j))*x[1]**o + ((-0.907702712398-0.487785273951j))*x[1] + ((-0.09258252693-0.774238303798j))*x[2]**o + ((0.42562414211+0.484356181521j))*x[2]
            ref[(1, 0)]=(0.0713888429972-0.16398321121j)-((0.123136550973-0.178037859709j))*(o-1.)
            arg[(1, 1)]=(0.386687920598-0.893972101717j)*x[0]**o + ((0.237607262031+0.11628634848j))*x[0] + ((0.323099968623-0.692013538878j))*x[1]**o + ((-0.229868594418+0.41081754757j))*x[1] + ((-0.743579771667-0.235361584023j))*x[2]**o + ((0.195070598859-0.408600413137j))*x[2]
            ref[(1, 1)]=(0.0845086920124-0.851421870852j)-((-0.00563198040764-0.30355787077j))*(o-1.)
            arg[(1, 2)]=(-0.377636615819-0.18238833577j)*x[0]**o + ((0.268340509175-0.652704416678j))*x[0] + ((-0.644093327352+0.47167794299j))*x[1]**o + ((-0.443587558882+0.957925757809j))*x[1] + ((0.18336567563-0.433369643127j))*x[2]**o + ((-0.187108123816-0.784633767469j))*x[2]
            ref[(1, 2)]=(-0.600359720532-0.311746231123j)-((-0.139727377924-0.0240133393179j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref=numpy.zeros((3, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.617566171644+0.857265193399j)*x[0]**o + ((0.0452554986511+0.561679778463j))*x[0] + ((-0.371622150394-0.805355704088j))*x[1]**o + ((0.947495896359-0.47146140136j))*x[1]
            ref[(0, 0, 0)]=(0.00178153648616+0.0710639332067j)-((-0.16486472034+0.0086515815518j))*(o-1.)
            arg[(0, 0, 1)]=(0.724164060143-0.383584636796j)*x[0]**o + ((0.653480343246+0.951527522742j))*x[0] + ((-0.618776066869-0.860057805281j))*x[1]**o + ((-0.956367869729-0.686777724044j))*x[1]
            ref[(0, 0, 1)]=(-0.0987497666048-0.489446321689j)-((0.0175646655456-0.207273740346j))*(o-1.)
            arg[(0, 0, 2)]=(0.643156418697+0.793770836209j)*x[0]**o + ((-0.616599097751-0.824910399213j))*x[0] + ((-0.327756028456-0.892610126463j))*x[1]**o + ((0.556757162984-0.325471317773j))*x[1]
            ref[(0, 0, 2)]=(0.127779227737-0.62461050362j)-((0.0525667317068-0.0164732150423j))*(o-1.)
            arg[(0, 0, 3)]=(-0.633926745362-0.520361120157j)*x[0]**o + ((0.0684460910085-0.254600713338j))*x[0] + ((-0.423274368508+0.161495433597j))*x[1]**o + ((-0.231989723841-0.705249574449j))*x[1]
            ref[(0, 0, 3)]=(-0.610372373351-0.659357987173j)-((-0.176200185645-0.0598109477601j))*(o-1.)
            arg[(0, 1, 0)]=(0.963860747897-0.245598704644j)*x[0]**o + ((-0.439168365279+0.171407730669j))*x[0] + ((0.771359429232-0.144132879079j))*x[1]**o + ((-0.321293002063-0.973361912982j))*x[1]
            ref[(0, 1, 0)]=(0.487379404894-0.595842883018j)-((0.289203362855-0.0649552639539j))*(o-1.)
            arg[(0, 1, 1)]=(-0.118411980392-0.174836437148j)*x[0]**o + ((0.550243243901+0.671511359521j))*x[0] + ((0.271610973703+0.979107143289j))*x[1]**o + ((-0.910637160328-0.146836924613j))*x[1]
            ref[(0, 1, 1)]=(-0.103597461558+0.664472570524j)-((0.0255331655518+0.13404511769j))*(o-1.)
            arg[(0, 1, 2)]=(-0.360809661849+0.0529177752635j)*x[0]**o + ((-0.0192466387762+0.684267281266j))*x[0] + ((0.388807105754-0.850220211669j))*x[1]**o + ((0.737661794853+0.0111044663485j))*x[1]
            ref[(0, 1, 2)]=(0.373206299991-0.0509653443952j)-((0.00466624065092-0.132883739401j))*(o-1.)
            arg[(0, 1, 3)]=(-0.520177093427-0.0352399477103j)*x[0]**o + ((-0.216835817699-0.25899348692j))*x[0] + ((0.221973385705-0.365144523133j))*x[1]**o + ((0.581721231586+0.386766500234j))*x[1]
            ref[(0, 1, 3)]=(0.0333408530827-0.136305728765j)-((-0.0497006179536-0.0667307451406j))*(o-1.)
            arg[(0, 2, 0)]=(-0.870831206583+0.460967317797j)*x[0]**o + ((0.904287305443-0.563329594358j))*x[0] + ((-0.858758973757-0.94351011666j))*x[1]**o + ((-0.650032233758+0.443459644378j))*x[1]
            ref[(0, 2, 0)]=(-0.737667554328-0.301206374422j)-((-0.288265030057-0.0804237998106j))*(o-1.)
            arg[(0, 2, 1)]=(0.617315447759+0.503204387916j)*x[0]**o + ((-0.384334845401+0.123192597357j))*x[0] + ((-0.567376296856-0.384117180888j))*x[1]**o + ((-0.330785317424+0.824382276256j))*x[1]
            ref[(0, 2, 1)]=(-0.332590505961+0.53333104032j)-((0.00832319181713+0.019847867838j))*(o-1.)
            arg[(0, 2, 2)]=(0.162732312577+0.792185554362j)*x[0]**o + ((-0.339276113929-0.35430974936j))*x[0] + ((0.141720209331-0.926761267784j))*x[1]**o + ((-0.783328088686+0.058401783881j))*x[1]
            ref[(0, 2, 2)]=(-0.409075840354-0.21524183945j)-((0.0507420869848-0.0224292855703j))*(o-1.)
            arg[(0, 2, 3)]=(-0.804578597463-0.180308889704j)*x[0]**o + ((0.13953790755-0.716761267762j))*x[0] + ((-0.109760551594-0.293916614299j))*x[1]**o + ((-0.13119693004+0.162819453281j))*x[1]
            ref[(0, 2, 3)]=(-0.452999085773-0.514083659242j)-((-0.152389858176-0.0790375840004j))*(o-1.)
            arg[(0, 3, 0)]=(-0.754270306783-0.940807918027j)*x[0]**o + ((0.483301450935+0.228322753941j))*x[0] + ((-0.273732958531+0.800812874785j))*x[1]**o + ((-0.0950938086825-0.54420864753j))*x[1]
            ref[(0, 3, 0)]=(-0.319897811531-0.227940468416j)-((-0.171333877552-0.0233325072071j))*(o-1.)
            arg[(0, 3, 1)]=(0.939523941462-0.239663989805j)*x[0]**o + ((0.573616981796-0.174873198003j))*x[0] + ((-0.811007836761+0.83737452228j))*x[1]**o + ((0.055417119866-0.802242138774j))*x[1]
            ref[(0, 3, 1)]=(0.378775103182-0.189702402151j)-((0.0214193507836+0.0996184220792j))*(o-1.)
            arg[(0, 3, 2)]=(0.105643427594+0.0362323747067j)*x[0]**o + ((-0.942966875847-0.640938488586j))*x[0] + ((-0.217526660418-0.177024688721j))*x[1]**o + ((0.951483038401+0.830467524044j))*x[1]
            ref[(0, 3, 2)]=(-0.0516835351344+0.0243683607218j)-((-0.0186472054706-0.0234653856691j))*(o-1.)
            arg[(0, 3, 3)]=(0.6858782692+0.896165731557j)*x[0]**o + ((0.817318952277+0.417673992258j))*x[0] + ((-0.375936247785+0.584143242654j))*x[1]**o + ((0.589834857137-0.915169966328j))*x[1]
            ref[(0, 3, 3)]=(0.858547915414+0.491406500071j)-((0.0516570035691+0.246718162369j))*(o-1.)
            arg[(1, 0, 0)]=(-0.370537437397-0.609273025364j)*x[0]**o + ((-0.311299893025+0.131830616028j))*x[0] + ((-0.423154895565-0.439868721636j))*x[1]**o + ((-0.719072211869+0.389859976545j))*x[1]
            ref[(1, 0, 0)]=(-0.912032218928-0.263725577213j)-((-0.132282055494-0.174856957833j))*(o-1.)
            arg[(1, 0, 1)]=(0.853289738839+0.177861066274j)*x[0]**o + ((0.169549438078+0.17395550346j))*x[0] + ((-0.440700284954+0.179780255938j))*x[1]**o + ((-0.268100467376+0.840373523397j))*x[1]
            ref[(1, 0, 1)]=(0.157019212293+0.685985174534j)-((0.0687649089808+0.0596068870354j))*(o-1.)
            arg[(1, 0, 2)]=(0.513718356055+0.74047932716j)*x[0]**o + ((-0.0741163646413+0.676285748712j))*x[0] + ((0.00748075020255-0.133073846235j))*x[1]**o + ((-0.394288314161-0.493129309966j))*x[1]
            ref[(1, 0, 2)]=(0.0263972137279+0.395280959835j)-((0.0868665177096+0.101234246821j))*(o-1.)
            arg[(1, 0, 3)]=(-0.476581203243+0.797868768599j)*x[0]**o + ((-0.292093680264-0.405915038667j))*x[0] + ((-0.746764728562-0.390051024825j))*x[1]**o + ((-0.0162039205245-0.41047380796j))*x[1]
            ref[(1, 0, 3)]=(-0.765821766296-0.204285551427j)-((-0.203890988634+0.0679696239623j))*(o-1.)
            arg[(1, 1, 0)]=(-0.156953192671-0.803299773739j)*x[0]**o + ((0.19319297687+0.633139536318j))*x[0] + ((0.753083375856-0.882714179894j))*x[1]**o + ((-0.00482021797909+0.811849824539j))*x[1]
            ref[(1, 1, 0)]=(0.392251471038-0.120512296388j)-((0.0993550305308-0.281002325606j))*(o-1.)
            arg[(1, 1, 1)]=(0.516422267773-0.202020799368j)*x[0]**o + ((-0.607103175966-0.818372041654j))*x[0] + ((-0.589119303559+0.983092852419j))*x[1]**o + ((0.651870114066+0.15016148036j))*x[1]
            ref[(1, 1, 1)]=(-0.0139650488424+0.0564307458788j)-((-0.0121161726309+0.130178675509j))*(o-1.)
            arg[(1, 1, 2)]=(-0.877909511016-0.311146963835j)*x[0]**o + ((0.0591971651885-0.645607779322j))*x[0] + ((0.117351264641-0.947852560928j))*x[1]**o + ((0.872082238786-0.499412957881j))*x[1]
            ref[(1, 1, 2)]=(0.0853605788003-1.20201013098j)-((-0.126759707729-0.209833254127j))*(o-1.)
            arg[(1, 1, 3)]=(-0.888875307498-0.850479620096j)*x[0]**o + ((-0.364092367065-0.058028525095j))*x[0] + ((0.695020068127-0.169578077355j))*x[1]**o + ((-0.273452559053-0.265623820453j))*x[1]
            ref[(1, 1, 3)]=(-0.415700082745-0.6718550215j)-((-0.0323092065619-0.170009616242j))*(o-1.)
            arg[(1, 2, 0)]=(0.588437894153-0.957430883731j)*x[0]**o + ((-0.209742245169+0.431791096699j))*x[0] + ((0.471202069944+0.97783541995j))*x[1]**o + ((0.981694870415-0.883985283551j))*x[1]
            ref[(1, 2, 0)]=(0.915796294672-0.215894825317j)-((0.176606660683+0.00340075603653j))*(o-1.)
            arg[(1, 2, 1)]=(0.190055284066+0.357062172902j)*x[0]**o + ((0.355878764455-0.547129595708j))*x[0] + ((-0.605617592437+0.486956544646j))*x[1]**o + ((-0.983379176802-0.065628064009j))*x[1]
            ref[(1, 2, 1)]=(-0.52153136036+0.115630528915j)-((-0.0692603847286+0.140669786258j))*(o-1.)
            arg[(1, 2, 2)]=(0.90178943421+0.0324383903254j)*x[0]**o + ((-0.757602226157+0.737000621504j))*x[0] + ((0.439587757981-0.783857024771j))*x[1]**o + ((0.440149518979+0.862072371853j))*x[1]
            ref[(1, 2, 2)]=(0.511962242507+0.423827179455j)-((0.223562865365-0.125236439074j))*(o-1.)
            arg[(1, 2, 3)]=(0.865921243012+0.0145920653013j)*x[0]**o + ((0.543000665099-0.720853681624j))*x[0] + ((-0.184162869601-0.630130929156j))*x[1]**o + ((-0.240386014299+0.889115645597j))*x[1]
            ref[(1, 2, 3)]=(0.492186512105-0.223638449941j)-((0.113626395568-0.102589810642j))*(o-1.)
            arg[(1, 3, 0)]=(-0.0973000408993-0.596885330028j)*x[0]**o + ((-0.833186356811-0.305747188142j))*x[0] + ((0.0878155240385+0.839648881041j))*x[1]**o + ((-0.884516402512-0.761979130959j))*x[1]
            ref[(1, 3, 0)]=(-0.863593638092-0.412481384044j)-((-0.00158075281014+0.0404605918355j))*(o-1.)
            arg[(1, 3, 1)]=(0.0239718909385+0.195051371759j)*x[0]**o + ((-0.877365046595-0.0234393309316j))*x[0] + ((-0.350095265929+0.301137461932j))*x[1]**o + ((0.549459297325-0.281642703022j))*x[1]
            ref[(1, 3, 1)]=(-0.32701456213+0.0955533998688j)-((-0.0543538958318+0.0826981389485j))*(o-1.)
            arg[(1, 3, 2)]=(0.706695115316-0.392749733301j)*x[0]**o + ((-0.496731523052+0.055008809175j))*x[0] + ((0.190963696999-0.976143437589j))*x[1]**o + ((0.811163617568-0.483968848319j))*x[1]
            ref[(1, 3, 2)]=(0.606045453415-0.898926605017j)-((0.149609802052-0.228148861815j))*(o-1.)
            arg[(1, 3, 3)]=(-0.622906619889-0.810645662544j)*x[0]**o + ((0.841950673531+0.0795133616277j))*x[0] + ((-0.358479442658+0.775154762962j))*x[1]**o + ((0.750370945916-0.216397763466j))*x[1]
            ref[(1, 3, 3)]=(0.30546777845-0.08618765071j)-((-0.163564343758-0.00591514993032j))*(o-1.)
            arg[(2, 0, 0)]=(-0.364492573277-0.911643754773j)*x[0]**o + ((0.910314840824+0.933683370287j))*x[0] + ((-0.488311639697+0.665359098309j))*x[1]**o + ((-0.504549755393+0.553172869087j))*x[1]
            ref[(2, 0, 0)]=(-0.223519563771+0.620285791455j)-((-0.142134035496-0.0410474427441j))*(o-1.)
            arg[(2, 0, 1)]=(0.975676569754+0.187237773268j)*x[0]**o + ((-0.693552948666-0.89179612014j))*x[0] + ((-0.314899674146-0.901537461588j))*x[1]**o + ((0.0934043768441+0.868684738661j))*x[1]
            ref[(2, 0, 1)]=(0.030314161893-0.368705534899j)-((0.110129482601-0.119049948053j))*(o-1.)
            arg[(2, 0, 2)]=(-0.9251557541-0.511116692822j)*x[0]**o + ((0.904676312481+0.0783834942898j))*x[0] + ((0.262074096217-0.0191270597963j))*x[1]**o + ((0.421394264219+0.797900201046j))*x[1]
            ref[(2, 0, 2)]=(0.331494459409+0.173019971359j)-((-0.110513609647-0.0883739587696j))*(o-1.)
            arg[(2, 0, 3)]=(0.470270402933+0.842034353192j)*x[0]**o + ((0.726919639687-0.38109209363j))*x[0] + ((-0.979637904637-0.857830185673j))*x[1]**o + ((0.860494680437+0.076755904422j))*x[1]
            ref[(2, 0, 3)]=(0.53902340921-0.160066010844j)-((-0.0848945836173-0.00263263874689j))*(o-1.)
            arg[(2, 1, 0)]=(-0.222721567543+0.128627612998j)*x[0]**o + ((-0.490591279862-0.849443638219j))*x[0] + ((-0.784114213046-0.216051454352j))*x[1]**o + ((0.29262347433+0.945044571649j))*x[1]
            ref[(2, 1, 0)]=(-0.60240179306+0.00408854603784j)-((-0.167805963431-0.0145706402258j))*(o-1.)
            arg[(2, 1, 1)]=(0.284931578955+0.522558936025j)*x[0]**o + ((-0.100150402809+0.834346922996j))*x[0] + ((-0.65462478427+0.0506709818816j))*x[1]**o + ((-0.475825854375+0.515852926117j))*x[1]
            ref[(2, 1, 1)]=(-0.472834731249+0.96171488351j)-((-0.0616155342191+0.0955383196511j))*(o-1.)
            arg[(2, 1, 2)]=(-0.517996585737+0.222086306219j)*x[0]**o + ((-0.952355053997-0.932205780222j))*x[0] + ((-0.125649768695+0.664171478504j))*x[1]**o + ((-0.789650248345+0.591823791938j))*x[1]
            ref[(2, 1, 2)]=(-1.19282582839+0.272937898219j)-((-0.107274392405+0.147709630787j))*(o-1.)
            arg[(2, 1, 3)]=(0.314891059088-0.832933159841j)*x[0]**o + ((-0.427077017659-0.753743111239j))*x[0] + ((0.399856760249+0.0796759524395j))*x[1]**o + ((-0.43048964344+0.802120446036j))*x[1]
            ref[(2, 1, 3)]=(-0.0714094208813-0.352439936302j)-((0.119124636556-0.1255428679j))*(o-1.)
            arg[(2, 2, 0)]=(-0.183916883787-0.526141771042j)*x[0]**o + ((-0.772541829042+0.431564380113j))*x[0] + ((0.20285070269+0.687054928121j))*x[1]**o + ((0.900442676949+0.178930314721j))*x[1]
            ref[(2, 2, 0)]=(0.0734173334049+0.385703925956j)-((0.00315563648389+0.0268188595132j))*(o-1.)
            arg[(2, 2, 1)]=(-0.222559137703+0.984093734511j)*x[0]**o + ((0.862471524598-0.0578188821857j))*x[0] + ((0.725158060143+0.890276133485j))*x[1]**o + ((-0.224084022331-0.0932271951332j))*x[1]
            ref[(2, 2, 1)]=(0.570493212353+0.861661895338j)-((0.0837664870734+0.312394977999j))*(o-1.)
            arg[(2, 2, 2)]=(-0.828202015343-0.246350095619j)*x[0]**o + ((-0.974189306869+0.866966389318j))*x[0] + ((0.342103091786+0.507655349888j))*x[1]**o + ((0.858522671349+0.234474325352j))*x[1]
            ref[(2, 2, 2)]=(-0.300882779539+0.68137298447j)-((-0.0810164872595+0.0435508757116j))*(o-1.)
            arg[(2, 2, 3)]=(-0.271774417846-0.682575811604j)*x[0]**o + ((-0.613204522306+0.61165946373j))*x[0] + ((-0.204070432266-0.0736980187106j))*x[1]**o + ((0.723742376632+0.286018688641j))*x[1]
            ref[(2, 2, 3)]=(-0.182653497893+0.070702161028j)-((-0.0793074750187-0.126045638386j))*(o-1.)
            arg[(2, 3, 0)]=(0.269884840408-0.728951347868j)*x[0]**o + ((0.689487227994+0.183114460613j))*x[0] + ((-0.442948442887+0.275348504729j))*x[1]**o + ((0.120796314048+0.0980359102543j))*x[1]
            ref[(2, 3, 0)]=(0.318609969782-0.086226236136j)-((-0.0288439337464-0.0756004738566j))*(o-1.)
            arg[(2, 3, 1)]=(-0.711343770448-0.486697090599j)*x[0]**o + ((0.850205403154-0.427558276122j))*x[0] + ((-0.586283012943-0.365900701663j))*x[1]**o + ((-0.677242148916-0.0860798564949j))*x[1]
            ref[(2, 3, 1)]=(-0.562331764576-0.68311796244j)-((-0.216271130565-0.142099632044j))*(o-1.)
            arg[(2, 3, 2)]=(0.959012120536+0.427211740951j)*x[0]**o + ((0.193209440132+0.537135484684j))*x[0] + ((-0.69897140691-0.0404403779077j))*x[1]**o + ((0.356617407887+0.498858791229j))*x[1]
            ref[(2, 3, 2)]=(0.404933780822+0.711382819478j)-((0.0433401189375+0.0644618938406j))*(o-1.)
            arg[(2, 3, 3)]=(0.710300741142+0.208720052037j)*x[0]**o + ((0.148387941209+0.723573882271j))*x[0] + ((0.736655970977+0.37736827817j))*x[1]**o + ((-0.00418677176904+0.429836798059j))*x[1]
            ref[(2, 3, 3)]=(0.795578940779+0.869749505268j)-((0.24115945202+0.0976813883678j))*(o-1.)
        else:
            arg[(0, 0, 0)]=(0.812498101869+0.642088211909j)*x[0]**o + ((0.202872570675+0.376754438546j))*x[0] + ((0.222004499978+0.479424204869j))*x[1]**o + ((0.452858777906-0.521706412231j))*x[1] + ((0.472536712261-0.237583238783j))*x[2]**o + ((-0.218253347566-0.799947485339j))*x[2]
            ref[(0, 0, 0)]=(0.972258657562-0.0304851405146j)-((0.251173219018+0.147321529666j))*(o-1.)
            arg[(0, 0, 1)]=(-0.0775800063129-0.315928899118j)*x[0]**o + ((-0.150409801981-0.513677058572j))*x[0] + ((-0.383305735054+0.740446638401j))*x[1]**o + ((-0.555833314887-0.0776887245194j))*x[1] + ((-0.719848111951+0.268081236701j))*x[2]**o + ((0.429278480651+0.766642693835j))*x[2]
            ref[(0, 0, 1)]=(-0.728849244768+0.433937943364j)-((-0.196788975553+0.115433162664j))*(o-1.)
            arg[(0, 0, 2)]=(0.514505402833+0.567192717364j)*x[0]**o + ((-0.285481067633-0.372616662835j))*x[0] + ((0.418037615086+0.720564183868j))*x[1]**o + ((0.218821683061-0.771613021052j))*x[1] + ((-0.00343647318822-0.538862885743j))*x[2]**o + ((0.0299441046549-0.365299091546j))*x[2]
            ref[(0, 0, 2)]=(0.446195632407-0.380317379972j)-((0.154851090788+0.124815669248j))*(o-1.)
            arg[(0, 0, 3)]=(0.545981004973-0.161544441659j)*x[0]**o + ((0.700052930566-0.905364772576j))*x[0] + ((-0.268079030208-0.859905570521j))*x[1]**o + ((-0.405970543264-0.502731623093j))*x[1] + ((0.640323412255-0.256729559476j))*x[2]**o + ((-0.451304696999+0.382603311181j))*x[2]
            ref[(0, 0, 3)]=(0.380501538661-1.15183632807j)-((0.153037564503-0.213029928609j))*(o-1.)
            arg[(0, 1, 0)]=(-0.3572455587+0.753370926192j)*x[0]**o + ((-0.918365874573-0.65820594839j))*x[0] + ((-0.309543963841+0.0365113074996j))*x[1]**o + ((-0.960455594225-0.721777305213j))*x[1] + ((-0.0832943378041+0.885254204536j))*x[2]**o + ((-0.712204215525+0.806331813601j))*x[2]
            ref[(0, 1, 0)]=(-1.67055477233+0.550742499112j)-((-0.125013976724+0.279189406371j))*(o-1.)
            arg[(0, 1, 1)]=(0.609477189242-0.70128471766j)*x[0]**o + ((0.709514916761-0.831380748471j))*x[0] + ((-0.0382539886963-0.0980884257923j))*x[1]**o + ((0.949016666481+0.419839852806j))*x[1] + ((-0.693046814427-0.255009978942j))*x[2]**o + ((-0.293341134556+0.956345310194j))*x[2]
            ref[(0, 1, 1)]=(0.621683417403-0.254789353933j)-((-0.0203039356468-0.175730520399j))*(o-1.)
            arg[(0, 1, 2)]=(0.533426042413+0.120212955046j)*x[0]**o + ((-0.676046747338-0.842243902826j))*x[0] + ((0.557767518416-0.48707688686j))*x[1]**o + ((-0.0947746780368-0.149199921509j))*x[1] + ((-0.505729110803+0.754842966356j))*x[2]**o + ((0.552866630692-0.575159773945j))*x[2]
            ref[(0, 1, 2)]=(0.183754827671-0.589312281869j)-((0.0975774083375+0.0646631724236j))*(o-1.)
            arg[(0, 1, 3)]=(-0.735409901458+0.131262581262j)*x[0]**o + ((0.977808502141-0.108833823987j))*x[0] + ((0.462441264773+0.0902319979545j))*x[1]**o + ((0.928110263665+0.198271004087j))*x[1] + ((-0.719228425931-0.288952845746j))*x[2]**o + ((0.0532910517923+0.538317034635j))*x[2]
            ref[(0, 1, 3)]=(0.483506377491+0.280147974103j)-((-0.165366177103-0.0112430444216j))*(o-1.)
            arg[(0, 2, 0)]=(0.636489505686+0.595295277794j)*x[0]**o + ((0.163680651128+0.00555113993306j))*x[0] + ((-0.0598252791875-0.419491260753j))*x[1]**o + ((0.265777029462-0.00721737438653j))*x[1] + ((0.971732147132+0.97452853593j))*x[2]**o + ((-0.178822060195-0.997678675414j))*x[2]
            ref[(0, 2, 0)]=(0.899515997013+0.0754938215516j)-((0.258066062272+0.191722092162j))*(o-1.)
            arg[(0, 2, 1)]=(-0.782797706046-0.873422223962j)*x[0]**o + ((-0.080335744768+0.166635703912j))*x[0] + ((-0.568357918653+0.933455617166j))*x[1]**o + ((0.0169018884085-0.414589701864j))*x[1] + ((-0.177491368097-0.478030278796j))*x[2]**o + ((-0.494515446986-0.773546705071j))*x[2]
            ref[(0, 2, 1)]=(-1.04329814807-0.719748794307j)-((-0.254774498799-0.0696661475987j))*(o-1.)
            arg[(0, 2, 2)]=(-0.760651579794+0.199305571558j)*x[0]**o + ((0.539479364128-0.60890871985j))*x[0] + ((-0.364992372156+0.0626762127684j))*x[1]**o + ((-0.679137387062-0.984738646178j))*x[1] + ((0.099357457009-0.582781798354j))*x[2]**o + ((0.687274089143-0.791839686131j))*x[2]
            ref[(0, 2, 2)]=(-0.239335214366-1.35314353309j)-((-0.171047749157-0.0534666690046j))*(o-1.)
            arg[(0, 2, 3)]=(-0.882958643877+0.857579994025j)*x[0]**o + ((0.499205268456+0.435656758365j))*x[0] + ((-0.834107792956-0.909610723253j))*x[1]**o + ((0.0715163968482+0.947441508098j))*x[1] + ((-0.302267174225-0.168364199331j))*x[2]**o + ((0.462479147894-0.603110983996j))*x[2]
            ref[(0, 2, 3)]=(-0.49306639893+0.279796176954j)-((-0.336555601843-0.0367324880931j))*(o-1.)
            arg[(0, 3, 0)]=(-0.986832825336-0.250681479128j)*x[0]**o + ((-0.788479344342+0.382680258731j))*x[0] + ((-0.640126665328+0.815388810166j))*x[1]**o + ((0.601887321793-0.442368871642j))*x[1] + ((-0.0274779464049-0.930681905528j))*x[2]**o + ((0.0515124227896+0.403122720806j))*x[2]
            ref[(0, 3, 0)]=(-0.894758518414-0.0112702332979j)-((-0.275739572845-0.060995762415j))*(o-1.)
            arg[(0, 3, 1)]=(0.744570368829-0.00710782166778j)*x[0]**o + ((0.628192255746+0.332086239918j))*x[0] + ((-0.892551394746+0.955955370808j))*x[1]**o + ((-0.724742336472-0.708647772419j))*x[1] + ((-0.255926329048-0.932219851172j))*x[2]**o + ((-0.909683832314-0.233569334398j))*x[2]
            ref[(0, 3, 1)]=(-0.705070634003-0.296751584466j)-((-0.0673178924942+0.00277128299469j))*(o-1.)
            arg[(0, 3, 2)]=(-0.851350437437-0.482493258604j)*x[0]**o + ((-0.627961219517+0.956637797809j))*x[0] + ((-0.1717662199+0.869677381367j))*x[1]**o + ((0.771952582543-0.360342632942j))*x[1] + ((-0.825191030498-0.15671585059j))*x[2]**o + ((0.29897521397+0.220414305563j))*x[2]
            ref[(0, 3, 2)]=(-0.70267055542+0.523588871302j)-((-0.308051281306+0.0384113786956j))*(o-1.)
            arg[(0, 3, 3)]=(0.834839044839+0.106946276149j)*x[0]**o + ((0.051828762273-0.50044776021j))*x[0] + ((-0.450559871504-0.807374405261j))*x[1]**o + ((-0.358385996479+0.0478286640062j))*x[1] + ((-0.132469077912-0.903712285174j))*x[2]**o + ((0.685221203923+0.0169810485264j))*x[2]
            ref[(0, 3, 3)]=(0.31523703257-1.01988923098j)-((0.0419683492373-0.267356735714j))*(o-1.)
            arg[(1, 0, 0)]=(0.896542289349-0.594543473383j)*x[0]**o + ((-0.0382738984662-0.532881487176j))*x[0] + ((-0.989519867681+0.158506009454j))*x[1]**o + ((-0.404167288851+0.804029851245j))*x[1] + ((-0.749114482148-0.43506938955j))*x[2]**o + ((-0.962817412093-0.184227266125j))*x[2]
            ref[(1, 0, 0)]=(-1.12367532995-0.392092877767j)-((-0.140348676747-0.14518447558j))*(o-1.)
            arg[(1, 0, 1)]=(-0.219762510285+0.745531627203j)*x[0]**o + ((0.458105054921-0.292583206558j))*x[0] + ((-0.645366633412+0.853255176451j))*x[1]**o + ((0.26079759416+0.782323248287j))*x[1] + ((-0.332068260621+0.777437368887j))*x[2]**o + ((-0.271613641833+0.151471723728j))*x[2]
            ref[(1, 0, 1)]=(-0.374954198535+1.508717969j)-((-0.19953290072+0.39603736209j))*(o-1.)
            arg[(1, 0, 2)]=(-0.574704571323-0.427222564775j)*x[0]**o + ((0.06969086706+0.658671685635j))*x[0] + ((-0.743381239071+0.72939638774j))*x[1]**o + ((0.672350250774+0.595911692634j))*x[1] + ((0.21652056228+0.0957614599517j))*x[2]**o + ((-0.0280950928859-0.546171295678j))*x[2]
            ref[(1, 0, 2)]=(-0.193809611583+0.553173682753j)-((-0.183594208019+0.0663225471527j))*(o-1.)
            arg[(1, 0, 3)]=(-0.958470927248+0.35759770049j)*x[0]**o + ((0.924623856415-0.49390222264j))*x[0] + ((0.0984245145467+0.516779389303j))*x[1]**o + ((-0.551490007138+0.34639928868j))*x[1] + ((0.900552090426+0.682005783666j))*x[2]**o + ((-0.515994143539+0.464434675484j))*x[2]
            ref[(1, 0, 3)]=(-0.0511773082685+0.936657307491j)-((0.00675094628744+0.259397145576j))*(o-1.)
            arg[(1, 1, 0)]=(-0.558111718839-0.0580155554054j)*x[0]**o + ((0.206694252886-0.572586120132j))*x[0] + ((0.429610946865-0.444815908591j))*x[1]**o + ((0.918194901516+0.572346637876j))*x[1] + ((0.57331348909+0.262300620814j))*x[2]**o + ((-0.494329555727+0.0120544067937j))*x[2]
            ref[(1, 1, 0)]=(0.537686157896-0.114357959322j)-((0.0741354528527-0.0400884738637j))*(o-1.)
            arg[(1, 1, 1)]=(0.753143133932-0.715768538109j)*x[0]**o + ((-0.216021991759-0.523703895975j))*x[0] + ((0.27815735682+0.138942670907j))*x[1]**o + ((0.676795314685+0.472954016611j))*x[1] + ((-0.401153706573+0.161087542565j))*x[2]**o + ((0.114470400465-0.971875419534j))*x[2]
            ref[(1, 1, 1)]=(0.602695253785-0.719181811767j)-((0.10502446403-0.0692897207727j))*(o-1.)
            arg[(1, 1, 2)]=(0.989387902214+0.266675563557j)*x[0]**o + ((0.911505961455+0.0465600413975j))*x[0] + ((-0.0549099431536+0.73819994782j))*x[1]**o + ((0.894561808869+0.260795566011j))*x[1] + ((0.553775399111-0.211381490324j))*x[2]**o + ((0.633501612505+0.196632531111j))*x[2]
            ref[(1, 1, 2)]=(1.9639113705+0.648741079787j)-((0.248042226362+0.132249003509j))*(o-1.)
            arg[(1, 1, 3)]=(-0.441845747427-0.285550270474j)*x[0]**o + ((-0.795009844674+0.830706510991j))*x[0] + ((0.489510326729-0.89168445579j))*x[1]**o + ((0.238453860187+0.912131944502j))*x[1] + ((0.65744844206-0.227953333088j))*x[2]**o + ((-0.946148473397-0.781987118714j))*x[2]
            ref[(1, 1, 3)]=(-0.398795718261-0.222168361286j)-((0.117518836894-0.234198009892j))*(o-1.)
            arg[(1, 2, 0)]=(-0.447528876278+0.585158603646j)*x[0]**o + ((0.60575500305+0.619609133263j))*x[0] + ((0.326196956986+0.649744241599j))*x[1]**o + ((-0.944723119305-0.744558897063j))*x[1] + ((0.73675940105-0.417543576025j))*x[2]**o + ((0.0317919707876+0.822211855201j))*x[2]
            ref[(1, 2, 0)]=(0.154125668146+0.75731068031j)-((0.10257124696+0.13622654487j))*(o-1.)
            arg[(1, 2, 1)]=(0.795847637584-0.697121406015j)*x[0]**o + ((-0.887855752167+0.0539779807136j))*x[0] + ((-0.145092413971-0.524764819052j))*x[1]**o + ((0.804139003087+0.606474275874j))*x[1] + ((-0.11337254828-0.86167742827j))*x[2]**o + ((0.589104079759+0.78603196548j))*x[2]
            ref[(1, 2, 1)]=(0.521385003006-0.318539715634j)-((0.0895637792223-0.347260608889j))*(o-1.)
            arg[(1, 2, 2)]=(-0.652821973218+0.141229328091j)*x[0]**o + ((-0.285076507466+0.910143851195j))*x[0] + ((-0.311270398794-0.621733860777j))*x[1]**o + ((-0.159223045361-0.371245678639j))*x[1] + ((0.490187225687+0.687525258744j))*x[2]**o + ((0.445029162271-0.809227407816j))*x[2]
            ref[(1, 2, 2)]=(-0.236587768441-0.0316542546015j)-((-0.0789841910543+0.0345034543429j))*(o-1.)
            arg[(1, 2, 3)]=(-0.0100513467536+0.209299363748j)*x[0]**o + ((-0.743576501092-0.846359160261j))*x[0] + ((-0.675990001815-0.583753058847j))*x[1]**o + ((0.480482014174-0.277410747649j))*x[1] + ((0.819952039007-0.772399992576j))*x[2]**o + ((-0.970388300587-0.906813311686j))*x[2]
            ref[(1, 2, 3)]=(-0.549786048533-1.58871845364j)-((0.0223184484065-0.191142281279j))*(o-1.)
            arg[(1, 3, 0)]=(0.533857164627-0.760928283536j)*x[0]**o + ((0.329275335173-0.424252809664j))*x[0] + ((0.893018348775+0.683569701465j))*x[1]**o + ((0.414291873405+0.491015852348j))*x[1] + ((0.1783042169-0.96024432877j))*x[2]**o + ((0.836417162721+0.998366662274j))*x[2]
            ref[(1, 3, 0)]=(1.5925820508+0.0137633970594j)-((0.26752995505-0.172933818473j))*(o-1.)
            arg[(1, 3, 1)]=(0.775530342929-0.15950164982j)*x[0]**o + ((0.165319572648+0.685796036896j))*x[0] + ((-0.2334763553-0.495028067521j))*x[1]**o + ((-0.166139757816+0.247267296541j))*x[1] + ((0.624453880667-0.375070518521j))*x[2]**o + ((0.939238772767+0.851241542937j))*x[2]
            ref[(1, 3, 1)]=(1.05246322795+0.377352320256j)-((0.194417978049-0.17160003931j))*(o-1.)
            arg[(1, 3, 2)]=(-0.379145377524-0.769615631397j)*x[0]**o + ((0.363321933478-0.529037977935j))*x[0] + ((-0.0313814753577-0.228813369706j))*x[1]**o + ((-0.287885273239-0.4059431154j))*x[1] + ((0.242370099205+0.806756919365j))*x[2]**o + ((0.0731596460812+0.729015223525j))*x[2]
            ref[(1, 3, 2)]=(-0.00978022367821-0.198818975773j)-((-0.0280261256128-0.0319453469562j))*(o-1.)
            arg[(1, 3, 3)]=(-0.5307636617-0.364683167685j)*x[0]**o + ((0.0226701606383+0.972062091974j))*x[0] + ((0.703886293505-0.228624778731j))*x[1]**o + ((-0.463676947387+0.227332536109j))*x[1] + ((0.0865732542489+0.706453490762j))*x[2]**o + ((0.904497017394-0.709997825203j))*x[2]
            ref[(1, 3, 3)]=(0.36159305835+0.301271173613j)-((0.0432826476758+0.0188575907243j))*(o-1.)
            arg[(2, 0, 0)]=(-0.507956644655+0.184106696555j)*x[0]**o + ((-0.754684110962+0.768089470887j))*x[0] + ((-0.0087326736971-0.804678859263j))*x[1]**o + ((0.0849206732403+0.150808924113j))*x[1] + ((-0.274658991779-0.505691439823j))*x[2]**o + ((0.436111089271+0.442445464767j))*x[2]
            ref[(2, 0, 0)]=(-0.512500329291+0.117540128619j)-((-0.131891385022-0.187710600422j))*(o-1.)
            arg[(2, 0, 1)]=(0.813582701504-0.284706803456j)*x[0]**o + ((-0.263158574151+0.991768350131j))*x[0] + ((-0.778336575467+0.728069963221j))*x[1]**o + ((0.454768929169+0.846065108964j))*x[1] + ((0.304102521531+0.199549984516j))*x[2]**o + ((0.647252900643+0.43069597321j))*x[2]
            ref[(2, 0, 1)]=(0.589105951615+1.45572128829j)-((0.0565581079281+0.107152190714j))*(o-1.)
            arg[(2, 0, 2)]=(0.291746088183+0.0438494542793j)*x[0]**o + ((-0.648806096453+0.851144991908j))*x[0] + ((-0.865802902513+0.682763790642j))*x[1]**o + ((0.382511644369-0.508578028524j))*x[1] + ((-0.747836034757-0.118587959248j))*x[2]**o + ((0.576556861649+0.834677091761j))*x[2]
            ref[(2, 0, 2)]=(-0.505815219761+0.89263467041j)-((-0.220315474848+0.101337547612j))*(o-1.)
            arg[(2, 0, 3)]=(-0.838567493741+0.428418107048j)*x[0]**o + ((-0.817687206628+0.0938958714527j))*x[0] + ((0.509215918356-0.599771425958j))*x[1]**o + ((0.886246620795-0.96029641662j))*x[1] + ((0.332772681828-0.336874447022j))*x[2]**o + ((0.497514722338+0.339152257164j))*x[2]
            ref[(2, 0, 3)]=(0.284747621474-0.517738026967j)-((0.000570184407177-0.0847046276552j))*(o-1.)
            arg[(2, 1, 0)]=(0.0941124187278+0.532269900179j)*x[0]**o + ((0.641638147507+0.815325428961j))*x[0] + ((0.313661608719-0.592186377165j))*x[1]**o + ((-0.345659277837-0.549432167823j))*x[1] + ((-0.983430947022+0.808555383258j))*x[2]**o + ((0.320389544365+0.902532427444j))*x[2]
            ref[(2, 1, 0)]=(0.0203557472305+0.958532297427j)-((-0.0959428199292+0.124773151045j))*(o-1.)
            arg[(2, 1, 1)]=(0.972962146553+0.681635068792j)*x[0]**o + ((0.739596778684-0.608999067173j))*x[0] + ((-0.656608224397+0.456832662563j))*x[1]**o + ((0.218965183058-0.395384012265j))*x[1] + ((-0.670512573264+0.887168764372j))*x[2]**o + ((0.0240848375476-0.369990235922j))*x[2]
            ref[(2, 1, 1)]=(0.31424407409+0.325631590183j)-((-0.0590264418514+0.337606082621j))*(o-1.)
            arg[(2, 1, 2)]=(0.439508581093+0.737412977587j)*x[0]**o + ((0.46906984772-0.266226825484j))*x[0] + ((-0.20132293965-0.711835707607j))*x[1]**o + ((-0.658186314268-0.016447986131j))*x[1] + ((-0.17442095913+0.276682245932j))*x[2]**o + ((0.514649353802+0.765581723364j))*x[2]
            ref[(2, 1, 2)]=(0.194648784784+0.39258321383j)-((0.0106274470521+0.0503765859853j))*(o-1.)
            arg[(2, 1, 3)]=(0.71230275989+0.421141228629j)*x[0]**o + ((0.485598884342+0.752853511029j))*x[0] + ((0.0932276702322+0.21366932775j))*x[1]**o + ((-0.239908516046-0.435204410948j))*x[1] + ((-0.364202691338+0.748178271692j))*x[2]**o + ((0.219610090346+0.954033619891j))*x[2]
            ref[(2, 1, 3)]=(0.453314098713+1.32733577402j)-((0.0735546231308+0.230498138012j))*(o-1.)
            arg[(2, 2, 0)]=(0.860140265041-0.490266214821j)*x[0]**o + ((0.747635048308+0.401130013293j))*x[0] + ((-0.695128375426-0.842237128166j))*x[1]**o + ((-0.13079969829+0.626128884152j))*x[1] + ((-0.36468138828+0.290510598032j))*x[2]**o + ((0.827338533396-0.959153500611j))*x[2]
            ref[(2, 2, 0)]=(0.622252192375-0.486943674061j)-((-0.0332782497775-0.173665457493j))*(o-1.)
            arg[(2, 2, 1)]=(-0.501784966513-0.121345017501j)*x[0]**o + ((-0.0508181340529+0.0903787082719j))*x[0] + ((0.245636229889-0.835962715238j))*x[1]**o + ((-0.438548477322-0.0662924030949j))*x[1] + ((-0.316425142415-0.0256104498681j))*x[2]**o + ((0.937235719828+0.0460390321693j))*x[2]
            ref[(2, 2, 1)]=(-0.0623523852931-0.456396422631j)-((-0.0954289798399-0.163819697101j))*(o-1.)
            arg[(2, 2, 2)]=(-0.0600342507909+0.943697586908j)*x[0]**o + ((0.887150279214+0.0408863874344j))*x[0] + ((0.110153064761+0.905971073955j))*x[1]**o + ((0.148010089704+0.613893509147j))*x[1] + ((-0.433819116127-0.0485602051945j))*x[2]**o + ((-0.376736678012+0.191089438671j))*x[2]
            ref[(2, 2, 2)]=(0.137361694375+1.32348889546j)-((-0.0639500503595+0.300184742611j))*(o-1.)
            arg[(2, 2, 3)]=(-0.312009125132-0.73787481907j)*x[0]**o + ((0.75222551705+0.0139662029558j))*x[0] + ((-0.602688437723-0.651889416145j))*x[1]**o + ((0.832035594259+0.773130988953j))*x[1] + ((0.437834335157-0.763717054395j))*x[2]**o + ((0.238118989614+0.832028033025j))*x[2]
            ref[(2, 2, 3)]=(0.672758436612-0.267178032338j)-((-0.0794772046164-0.358913548268j))*(o-1.)
            arg[(2, 3, 0)]=(0.159544364063-0.772859653456j)*x[0]**o + ((0.45208001732-0.978529245996j))*x[0] + ((-0.129461207644-0.554381332008j))*x[1]**o + ((0.89063097596-0.451822581462j))*x[1] + ((-0.0803274550815-0.0180295187435j))*x[2]**o + ((-0.912414880056-0.239613804983j))*x[2]
            ref[(2, 3, 0)]=(0.190025907281-1.50761806832j)-((-0.00837404977705-0.224211750701j))*(o-1.)
            arg[(2, 3, 1)]=(-0.619173212548-0.627446117108j)*x[0]**o + ((0.410898189459+0.0663515322575j))*x[0] + ((0.30508127752-0.979246563342j))*x[1]**o + ((0.563634921145+0.741295989133j))*x[1] + ((-0.172735391141+0.297977253628j))*x[2]**o + ((0.602018756856+0.493286271629j))*x[2]
            ref[(2, 3, 1)]=(0.544862270645-0.00389081690215j)-((-0.081137887695-0.218119237804j))*(o-1.)
            arg[(2, 3, 2)]=(-0.979974457774+0.0636350060915j)*x[0]**o + ((0.668255530622+0.000623095824008j))*x[0] + ((-0.0757999562731+0.930306954125j))*x[1]**o + ((-0.514344682638-0.597692802483j))*x[1] + ((0.468455213754+0.301032048084j))*x[2]**o + ((0.074786630879+0.564666491014j))*x[2]
            ref[(2, 3, 2)]=(-0.179310860714+0.631285396328j)-((-0.0978865333821+0.215829001384j))*(o-1.)
            arg[(2, 3, 3)]=(-0.178156281475+0.589769501813j)*x[0]**o + ((-0.653448885487+0.042646652558j))*x[0] + ((-0.500428843146-0.731859914463j))*x[1]**o + ((0.851792171403+0.39419046052j))*x[1] + ((-0.305683400103-0.222203782383j))*x[2]**o + ((-0.357969809476+0.089496443892j))*x[2]
            ref[(2, 3, 3)]=(-0.571947524142+0.0810196809684j)-((-0.164044754121-0.0607156991722j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunction_fromData_ReducedFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 3),w)
        ref=numpy.zeros((3, 2, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.0608896940982-0.446430160804j)*x[0]**o + ((-0.907065581165+0.698274089421j))*x[0] + ((0.792620456828-0.183581475698j))*x[1]**o + ((-0.388826942009+0.872078675165j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.221191186124+0.470170564042j)-((0.142251691821-0.105001939417j))*(o-1.)
            arg[(0, 0, 0, 1)]=(0.88055535379+0.732898902864j)*x[0]**o + ((-0.454775564887+0.257789512507j))*x[0] + ((0.84559464065-0.967840605446j))*x[1]**o + ((-0.369472807076-0.123052964221j))*x[1]
            ref[(0, 0, 0, 1)]=(0.450950811238-0.050102577148j)-((0.28769166574-0.0391569504304j))*(o-1.)
            arg[(0, 0, 0, 2)]=(-0.441420733873-0.627115654427j)*x[0]**o + ((0.0688717449939+0.354055387833j))*x[0] + ((0.362780319185-0.212894937312j))*x[1]**o + ((-0.942532642995+0.377665918901j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.476150656344-0.0541446425026j)-((-0.0131067357813-0.14000176529j))*(o-1.)
            arg[(0, 0, 1, 0)]=(0.437418544613-0.406860672973j)*x[0]**o + ((-0.937046932232-0.187604929521j))*x[0] + ((-0.675048201798+0.728508693213j))*x[1]**o + ((0.730677235378-0.904250963341j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.22199967702-0.385103936311j)-((-0.0396049428642+0.0536080033734j))*(o-1.)
            arg[(0, 0, 1, 1)]=(0.0760941547383+0.231372185188j)*x[0]**o + ((0.349187869291+0.225735391029j))*x[0] + ((-0.344206420704+0.0285313244329j))*x[1]**o + ((-0.997922394334+0.878369125362j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.458423395505+0.682004013006j)-((-0.044685377661+0.0433172516036j))*(o-1.)
            arg[(0, 0, 1, 2)]=(0.273806076814+0.558664118475j)*x[0]**o + ((-0.279705403661+0.800950257723j))*x[0] + ((-0.32740555872-0.819313114318j))*x[1]**o + ((0.296387132024-0.23692735877j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.0184588767709+0.151686951554j)-((-0.00893324698425-0.0434414993073j))*(o-1.)
            arg[(0, 1, 0, 0)]=(0.455187147559-0.697566692119j)*x[0]**o + ((-0.667469988531-0.276040720638j))*x[0] + ((0.858371979983-0.807775450489j))*x[1]**o + ((-0.944834303913-0.872726463274j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.149372582451-1.32705466326j)-((0.218926521257-0.250890357101j))*(o-1.)
            arg[(0, 1, 0, 1)]=(-0.15590428887-0.755631143685j)*x[0]**o + ((-0.21430592889+0.145571537547j))*x[0] + ((0.719555758187-0.989126672765j))*x[1]**o + ((-0.969697759867+0.739710333142j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.31017610972-0.42973797288j)-((0.0939419115529-0.290792969408j))*(o-1.)
            arg[(0, 1, 0, 2)]=(-0.505001919501+0.532371292708j)*x[0]**o + ((0.836064429858-0.00535462834846j))*x[0] + ((0.892258930565+0.814620655355j))*x[1]**o + ((-0.223856784527+0.123455461048j))*x[1]
            ref[(0, 1, 0, 2)]=(0.499732328197+0.732546390382j)-((0.0645428351772+0.224498658011j))*(o-1.)
            arg[(0, 1, 1, 0)]=(-0.424578646789+0.67270002427j)*x[0]**o + ((0.427645008064+0.873337825613j))*x[0] + ((-0.226059507291-0.231470626171j))*x[1]**o + ((-0.941830956726-0.816492788696j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.582412051371+0.249037217508j)-((-0.108439692347+0.0735382330165j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.80522499306+0.86815350766j)*x[0]**o + ((-0.23987026311+0.609799806255j))*x[0] + ((-0.818564857811+0.637161691963j))*x[1]**o + ((0.917101474394-0.904902662211j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.473279319794+0.605106171833j)-((-0.270631641812+0.250885866604j))*(o-1.)
            arg[(0, 1, 1, 2)]=(0.672741419999-0.416913541454j)*x[0]**o + ((0.664802263173+0.314755413389j))*x[0] + ((0.0756865746685+0.198551568178j))*x[1]**o + ((-0.575678696125+0.838831582318j))*x[1]
            ref[(0, 1, 1, 2)]=(0.418775780858+0.467612511215j)-((0.124737999111-0.0363936622128j))*(o-1.)
            arg[(1, 0, 0, 0)]=(-0.581936708626+0.421392124664j)*x[0]**o + ((0.544305049155+0.727393326202j))*x[0] + ((-0.331182930109-0.291272967464j))*x[1]**o + ((-0.534682617493-0.230659712084j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.451748603536+0.313426385659j)-((-0.152186606456+0.0216865261999j))*(o-1.)
            arg[(1, 0, 0, 1)]=(0.271913271497+0.631682043879j)*x[0]**o + ((-0.931546704904+0.576092895032j))*x[0] + ((-0.549677595898+0.597189448883j))*x[1]**o + ((0.871961542605-0.89672792988j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.16867474335+0.454118228957j)-((-0.0462940540668+0.20481191546j))*(o-1.)
            arg[(1, 0, 0, 2)]=(0.560881784436-0.0412576811003j)*x[0]**o + ((-0.8169699307+0.369460664416j))*x[0] + ((-0.0670967127505-0.434947626565j))*x[1]**o + ((-0.93044618238+0.387491868433j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.626815520697+0.140373612592j)-((0.0822975119476-0.0793675512776j))*(o-1.)
            arg[(1, 0, 1, 0)]=(0.824801002332-0.585192654785j)*x[0]**o + ((0.717346571262-0.272153708118j))*x[0] + ((-0.48329857376-0.553946689826j))*x[1]**o + ((-0.437577092806+0.360384021404j))*x[1]
            ref[(1, 0, 1, 0)]=(0.310635953514-0.525454515663j)-((0.0569170714286-0.189856557435j))*(o-1.)
            arg[(1, 0, 1, 1)]=(-0.0231429927281-0.251859908997j)*x[0]**o + ((-0.844704865182+0.278860522092j))*x[0] + ((-0.571655635652+0.45272974985j))*x[1]**o + ((0.681962477703-0.311016405957j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.37877050793+0.084356978494j)-((-0.09913310473+0.0334783068088j))*(o-1.)
            arg[(1, 0, 1, 2)]=(-0.896715578021+0.565917049003j)*x[0]**o + ((0.454582205857+0.0628583990111j))*x[0] + ((-0.322421160615+0.704938625256j))*x[1]**o + ((-0.677863300618-0.582044354627j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.721208916699+0.375834859322j)-((-0.203189456439+0.211809279043j))*(o-1.)
            arg[(1, 1, 0, 0)]=(0.522952486939+0.812010929048j)*x[0]**o + ((-0.812169636913+0.251212796014j))*x[0] + ((0.267095864318+0.178795433538j))*x[1]**o + ((-0.0442449761823-0.220333657755j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.0331831309189+0.510842750422j)-((0.131674725209+0.165134393764j))*(o-1.)
            arg[(1, 1, 0, 1)]=(-0.711188978322-0.391182138457j)*x[0]**o + ((0.551554546682+0.318602640731j))*x[0] + ((-0.0662465915-0.542833135564j))*x[1]**o + ((0.992171559864-0.591165870942j))*x[1]
            ref[(1, 1, 0, 1)]=(0.383145268362-0.603289252116j)-((-0.12957259497-0.155669212337j))*(o-1.)
            arg[(1, 1, 0, 2)]=(-0.266214059578+0.757670362768j)*x[0]**o + ((-0.324730708542-0.980998227422j))*x[0] + ((0.0190207029855-0.019830226211j))*x[1]**o + ((-0.583073279189-0.492571270745j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.577498672161-0.367864680805j)-((-0.0411988927654+0.122973356093j))*(o-1.)
            arg[(1, 1, 1, 0)]=(0.713325154923-0.407553066632j)*x[0]**o + ((0.994437256706+0.96413700318j))*x[0] + ((0.103948474675+0.887139286826j))*x[1]**o + ((-0.619898099966-0.129202357407j))*x[1]
            ref[(1, 1, 1, 0)]=(0.595906393169+0.657260432983j)-((0.1362122716+0.079931036699j))*(o-1.)
            arg[(1, 1, 1, 1)]=(-0.12773256751-0.894163276886j)*x[0]**o + ((0.477470746915-0.787867587122j))*x[0] + ((-0.109665490073+0.994122826444j))*x[1]**o + ((0.338330136893+0.531879514977j))*x[1]
            ref[(1, 1, 1, 1)]=(0.289201413112-0.0780142612934j)-((-0.0395663429305+0.0166599249264j))*(o-1.)
            arg[(1, 1, 1, 2)]=(0.605716267558+0.0330165719365j)*x[0]**o + ((-0.226460939989+0.984826579246j))*x[0] + ((-0.520425574783-0.296832161647j))*x[1]**o + ((0.952319913865+0.154942297881j))*x[1]
            ref[(1, 1, 1, 2)]=(0.405574833326+0.437976643708j)-((0.0142151154626-0.0439692649517j))*(o-1.)
            arg[(2, 0, 0, 0)]=(0.357699042064+0.350723507006j)*x[0]**o + ((0.899196082333-0.555115267253j))*x[0] + ((-0.0137879524334+0.621513950316j))*x[1]**o + ((-0.55769137925+0.936112792509j))*x[1]
            ref[(2, 0, 0, 0)]=(0.342707896357+0.67661749129j)-((0.0573185149385+0.16203957622j))*(o-1.)
            arg[(2, 0, 0, 1)]=(-0.527640710191+0.906403219634j)*x[0]**o + ((-0.104051638639-0.424041729293j))*x[0] + ((0.183943310795+0.703977992994j))*x[1]**o + ((0.237042154689+0.477254802237j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.105353441673+0.831797142786j)-((-0.0572828998993+0.268396868771j))*(o-1.)
            arg[(2, 0, 0, 2)]=(0.79220270677-0.497852128206j)*x[0]**o + ((0.75880893324+0.951764669575j))*x[0] + ((0.630164590526+0.433365562976j))*x[1]**o + ((0.17391791609-0.873229965724j))*x[1]
            ref[(2, 0, 0, 2)]=(1.17754707331+0.00702406931008j)-((0.237061216216-0.0107477608717j))*(o-1.)
            arg[(2, 0, 1, 0)]=(-0.844434150748+0.0546964824094j)*x[0]**o + ((-0.186241892574+0.872633597334j))*x[0] + ((0.505600659818-0.804209258295j))*x[1]**o + ((0.238865913209-0.107176098371j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.143104735148+0.00797236153884j)-((-0.0564722484883-0.124918795981j))*(o-1.)
            arg[(2, 0, 1, 1)]=(0.190262795277-0.183122454113j)*x[0]**o + ((-0.0425522942483+0.559704106559j))*x[0] + ((-0.684223231906-0.814830860067j))*x[1]**o + ((0.963992888347+0.416400214502j))*x[1]
            ref[(2, 0, 1, 1)]=(0.213740078735-0.0109244965591j)-((-0.0823267394381-0.166325552363j))*(o-1.)
            arg[(2, 0, 1, 2)]=(0.150070723485+0.663324117941j)*x[0]**o + ((0.593835280629+0.611144764731j))*x[0] + ((-0.574746863738-0.665784240548j))*x[1]**o + ((0.62541466156-0.987082536944j))*x[1]
            ref[(2, 0, 1, 2)]=(0.397286900968-0.18919894741j)-((-0.070779356709-0.000410020434421j))*(o-1.)
            arg[(2, 1, 0, 0)]=(0.756752595717+0.120143950903j)*x[0]**o + ((-0.0501446579493+0.433805088596j))*x[0] + ((0.363188549651+0.245951953369j))*x[1]**o + ((0.68755879027+0.887814923883j))*x[1]
            ref[(2, 1, 0, 0)]=(0.878677638845+0.843857958375j)-((0.186656857561+0.0610159840453j))*(o-1.)
            arg[(2, 1, 0, 1)]=(0.00257176198345+0.855413069692j)*x[0]**o + ((-0.375601333452+0.171254783568j))*x[0] + ((-0.145967412526+0.588412497501j))*x[1]**o + ((-0.993152724697+0.618768826737j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.756074854346+1.11692458875j)-((-0.0238992750905+0.240637594532j))*(o-1.)
            arg[(2, 1, 0, 2)]=(-0.595986181133-0.866232865307j)*x[0]**o + ((-0.958464184366+0.762260327661j))*x[0] + ((-0.538130483791-0.324830215239j))*x[1]**o + ((0.548698372517+0.382204396553j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.771941238387-0.0232991781662j)-((-0.189019444154-0.198510513424j))*(o-1.)
            arg[(2, 1, 1, 0)]=(0.758106142139-0.113231469757j)*x[0]**o + ((0.0663938146408-0.620076604936j))*x[0] + ((0.446051796841+0.375860187203j))*x[1]**o + ((0.896173977167-0.935060237622j))*x[1]
            ref[(2, 1, 1, 0)]=(1.08336286539-0.646254062556j)-((0.20069298983+0.0437714529076j))*(o-1.)
            arg[(2, 1, 1, 1)]=(-0.402937628251+0.71475473808j)*x[0]**o + ((-0.498673411785+0.343776154574j))*x[0] + ((0.187224140173+0.584275449348j))*x[1]**o + ((-0.291408970512-0.912816720306j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.502897935188+0.364994810848j)-((-0.0359522480131+0.216505031238j))*(o-1.)
            arg[(2, 1, 1, 2)]=(-0.47817315375+0.0572723624776j)*x[0]**o + ((-0.431563824388+0.00995082286808j))*x[0] + ((-0.733991003104-0.248202053134j))*x[1]**o + ((-0.763384971745+0.634727092539j))*x[1]
            ref[(2, 1, 1, 2)]=(-1.20355647649+0.226874112375j)-((-0.202027359476-0.0318216151095j))*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=(-0.817028094082-0.0781880228904j)*x[0]**o + ((-0.182494493146+0.208798172804j))*x[0] + ((-0.367245458256+0.180650432108j))*x[1]**o + ((0.233232500353+0.00597905015144j))*x[1] + ((-0.0634163690995-0.75623620054j))*x[2]**o + ((0.534200618716-0.761928604565j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.331375647757-0.600462586466j)-((-0.20794832024-0.108962298554j))*(o-1.)
            arg[(0, 0, 0, 1)]=(0.94284644272-0.43959174266j)*x[0]**o + ((0.172970052017+0.595045341947j))*x[0] + ((0.831205176217+0.852806100535j))*x[1]**o + ((0.194394882504-0.967706120106j))*x[1] + ((-0.949696666035+0.21972766005j))*x[2]**o + ((0.322679678635-0.200106406064j))*x[2]
            ref[(0, 0, 0, 1)]=(0.757199783029+0.0300874168512j)-((0.13739249215+0.105490336321j))*(o-1.)
            arg[(0, 0, 0, 2)]=(-0.901399063143+0.582110835977j)*x[0]**o + ((-0.961700368596-0.886379786214j))*x[0] + ((-0.954681016135-0.46232144134j))*x[1]**o + ((-0.704451300877-0.416051494384j))*x[1] + ((0.994604071567-0.996468545913j))*x[2]**o + ((0.351612450725+0.348744595267j))*x[2]
            ref[(0, 0, 0, 2)]=(-1.08800761323-0.915182918303j)-((-0.143579334619-0.146113191879j))*(o-1.)
            arg[(0, 0, 1, 0)]=(-0.111562101253+0.946851833616j)*x[0]**o + ((0.604610368288-0.51332016343j))*x[0] + ((-0.771328019048+0.535776240632j))*x[1]**o + ((-0.105748082106+0.500015837213j))*x[1] + ((0.826634378533+0.831135417751j))*x[2]**o + ((-0.868811378042+0.960739025875j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.213102416814+1.63059909583j)-((-0.00937595696135+0.385627248666j))*(o-1.)
            arg[(0, 0, 1, 1)]=(-0.302027321034-0.838382987169j)*x[0]**o + ((0.269317376707-0.298069917503j))*x[0] + ((-0.576166043021+0.873842226821j))*x[1]**o + ((-0.794141479221-0.278149606708j))*x[1] + ((0.648983559881-0.678440416509j))*x[2]**o + ((-0.26235635127-0.315831154636j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.508195128979-0.767515927852j)-((-0.0382016340289-0.107163529476j))*(o-1.)
            arg[(0, 0, 1, 2)]=(-0.272879309522+0.364670919623j)*x[0]**o + ((-0.14210082744-0.863554333345j))*x[0] + ((0.0537434933795+0.360493779851j))*x[1]**o + ((-0.462804462089-0.106295731102j))*x[1] + ((-0.839114384549+0.285361582517j))*x[2]**o + ((-0.183702090436-0.178240904582j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.923428790328-0.0687823435185j)-((-0.176375033449+0.168421046999j))*(o-1.)
            arg[(0, 1, 0, 0)]=(-0.447746434494+0.519086601755j)*x[0]**o + ((-0.264869511539-0.641275371978j))*x[0] + ((-0.434465825144-0.40921793971j))*x[1]**o + ((0.0211776799417-0.93832338954j))*x[1] + ((-0.594565746956-0.510291529282j))*x[2]**o + ((0.408937485163+0.336457579892j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.655766176514-0.821782024431j)-((-0.246129667766-0.0667371445395j))*(o-1.)
            arg[(0, 1, 0, 1)]=(0.302362381099-0.950725665067j)*x[0]**o + ((0.998734665388-0.308898563435j))*x[0] + ((0.463642698483-0.229294282717j))*x[1]**o + ((0.924929109925+0.868229666372j))*x[1] + ((-0.7730388506-0.32777399304j))*x[2]**o + ((0.693821595639-0.940629668743j))*x[2]
            ref[(0, 1, 0, 1)]=(1.30522579997-0.944546253315j)-((-0.00117229516975-0.251298990137j))*(o-1.)
            arg[(0, 1, 0, 2)]=(-0.268228478883+0.926667449575j)*x[0]**o + ((0.664160887212-0.875891768894j))*x[0] + ((0.0830148733352-0.105712131933j))*x[1]**o + ((-0.640519791787+0.331257480956j))*x[1] + ((0.185206572305+0.134390447101j))*x[2]**o + ((0.374359845547+0.142936164538j))*x[2]
            ref[(0, 1, 0, 2)]=(0.198996953865+0.276823820672j)-((-1.17220699018e-06+0.159224294124j))*(o-1.)
            arg[(0, 1, 1, 0)]=(0.516717346342-0.308833823397j)*x[0]**o + ((-0.910051341916-0.406204185361j))*x[0] + ((0.919973919651-0.502813304055j))*x[1]**o + ((-0.446401768886-0.0812251463845j))*x[1] + ((-0.41974583416+0.166923530439j))*x[2]**o + ((-0.41429952735-0.0617350830366j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.376903603159-0.596944005898j)-((0.169490905306-0.107453932836j))*(o-1.)
            arg[(0, 1, 1, 1)]=(-0.779937606909+0.619394567967j)*x[0]**o + ((0.702238743057+0.738402306074j))*x[0] + ((0.749787070768+0.396797040186j))*x[1]**o + ((0.032893966452-0.582549528184j))*x[1] + ((-0.025293234902-0.577457804178j))*x[2]**o + ((-0.0538652468847-0.237401246779j))*x[2]
            ref[(0, 1, 1, 1)]=(0.312911845791+0.178592667543j)-((-0.00924062850711+0.0731223006624j))*(o-1.)
            arg[(0, 1, 1, 2)]=(-0.619127587494+0.491424993797j)*x[0]**o + ((0.122867201692-0.571074916312j))*x[0] + ((-0.348063511786+0.185409730511j))*x[1]**o + ((0.125274031695+0.222831312515j))*x[1] + ((-0.698034190618-0.199721778711j))*x[2]**o + ((0.926729524135-0.393122477442j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.245177266188-0.132126567821j)-((-0.277537548316+0.0795188242662j))*(o-1.)
            arg[(1, 0, 0, 0)]=(-0.442381849138-0.246859028013j)*x[0]**o + ((0.74088623201+0.448023166525j))*x[0] + ((0.200408169703-0.233542104195j))*x[1]**o + ((0.24427757621-0.365462620031j))*x[1] + ((0.645328741892+0.0440304178429j))*x[2]**o + ((0.0788782652083+0.674002736192j))*x[2]
            ref[(1, 0, 0, 0)]=(0.733698567942+0.160096284161j)-((0.0672258437428-0.0727284523942j))*(o-1.)
            arg[(1, 0, 0, 1)]=(0.533592536924-0.518666902381j)*x[0]**o + ((-0.0820339424064+0.0906415871834j))*x[0] + ((-0.593814932803+0.136937951109j))*x[1]**o + ((-0.761344341511-0.197608347183j))*x[1] + ((-0.274297180744-0.935911242707j))*x[2]**o + ((-0.886557277929+0.703174824175j))*x[2]
            ref[(1, 0, 0, 1)]=(-1.03222756923-0.360716064902j)-((-0.0557532627704-0.219606698996j))*(o-1.)
            arg[(1, 0, 0, 2)]=(0.258598734019-0.179177166666j)*x[0]**o + ((0.38435897311-0.3375392934j))*x[0] + ((-0.143373497177+0.911800635165j))*x[1]**o + ((0.49445350091+0.554195748134j))*x[1] + ((-0.0266712615172+0.382212753144j))*x[2]**o + ((-0.0450018134572+0.393384927822j))*x[2]
            ref[(1, 0, 0, 2)]=(0.461182317944+0.8624388021j)-((0.0147589958875+0.185806036941j))*(o-1.)
            arg[(1, 0, 1, 0)]=(-0.8434157769+0.665003468692j)*x[0]**o + ((0.702932992852+0.309279398592j))*x[0] + ((-0.303766836899-0.180964642645j))*x[1]**o + ((-0.125501323761+0.272193776284j))*x[1] + ((-0.119857082489+0.539687736049j))*x[2]**o + ((0.205141336461+0.0281682724591j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.242233345368+0.816684004716j)-((-0.211173282715+0.170621093683j))*(o-1.)
            arg[(1, 0, 1, 1)]=(0.446581224253-0.73402057343j)*x[0]**o + ((0.770462468647-0.226005310894j))*x[0] + ((0.626260396812-0.965814665803j))*x[1]**o + ((0.855185589978-0.755558552232j))*x[1] + ((-0.228307143913+0.598837386065j))*x[2]**o + ((-0.929598585617+0.839183202774j))*x[2]
            ref[(1, 0, 1, 1)]=(0.77029197508-0.62168925676j)-((0.140755746192-0.183499642195j))*(o-1.)
            arg[(1, 0, 1, 2)]=(-0.808572153276-0.868088993274j)*x[0]**o + ((0.685651182343+0.231715044523j))*x[0] + ((-0.282265289355-0.728709081164j))*x[1]**o + ((-0.491593772369+0.63698912822j))*x[1] + ((-0.682112757212+0.664597268009j))*x[2]**o + ((0.162073870023+0.270810210401j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.708409459923+0.103656788358j)-((-0.295491699974-0.155366801072j))*(o-1.)
            arg[(1, 1, 0, 0)]=(0.589414462432+0.706406820867j)*x[0]**o + ((-0.560630480829-0.885502139205j))*x[0] + ((0.274871374858+0.702345638316j))*x[1]**o + ((-0.285123230173-0.294212716543j))*x[1] + ((-0.5547007441-0.213814812724j))*x[2]**o + ((0.283229092642+0.883112804407j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.126469762585+0.449167797559j)-((0.0515975155316+0.19915627441j))*(o-1.)
            arg[(1, 1, 0, 1)]=(0.764164443204+0.613275222139j)*x[0]**o + ((0.898906913308-0.298402902854j))*x[0] + ((-0.534738706317+0.545070604388j))*x[1]**o + ((-0.248430500461-0.623140487876j))*x[1] + ((0.63325378151+0.767993547028j))*x[2]**o + ((0.640431858446+0.245876921645j))*x[2]
            ref[(1, 1, 0, 1)]=(1.07679389485+0.625336452235j)-((0.143779919733+0.321056562259j))*(o-1.)
            arg[(1, 1, 0, 2)]=(-0.0676858018384-0.00181796816562j)*x[0]**o + ((0.866241966035+0.727779762529j))*x[0] + ((-0.679748653402-0.683034172452j))*x[1]**o + ((0.972610705189-0.663149388829j))*x[1] + ((0.98979179439+0.754271158725j))*x[2]**o + ((-0.14582573517-0.798854774965j))*x[2]
            ref[(1, 1, 0, 2)]=(0.967692137602-0.332402691578j)-((0.0403928898582+0.0115698363513j))*(o-1.)
            arg[(1, 1, 1, 0)]=(-0.533115376135+0.592395679291j)*x[0]**o + ((0.215349993986-0.757133068283j))*x[0] + ((0.661268909077+0.578702368599j))*x[1]**o + ((0.803918512266+0.759934519535j))*x[1] + ((0.891612105775-0.442288886112j))*x[2]**o + ((-0.844726688625+0.762588143005j))*x[2]
            ref[(1, 1, 1, 0)]=(0.597153728172+0.747099378018j)-((0.169960939786+0.12146819363j))*(o-1.)
            arg[(1, 1, 1, 1)]=(0.526184964613-0.202595501212j)*x[0]**o + ((0.0233986926537+0.709404369742j))*x[0] + ((0.311019454322-0.22176169823j))*x[1]**o + ((0.19413425827-0.458066348701j))*x[1] + ((0.0598663032773+0.771196106891j))*x[2]**o + ((-0.484124987992+0.869209529439j))*x[2]
            ref[(1, 1, 1, 1)]=(0.315239342572+0.733693228964j)-((0.149511787035+0.0578064845747j))*(o-1.)
            arg[(1, 1, 1, 2)]=(-0.796427812103+0.4566708582j)*x[0]**o + ((-0.113520027404-0.785720526679j))*x[0] + ((-0.936553620587+0.432734782681j))*x[1]**o + ((0.239861107837+0.0783651512882j))*x[1] + ((-0.188713750622+0.45370492025j))*x[2]**o + ((0.718133575045+0.667597322546j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.538610263917+0.651676254143j)-((-0.320282530552+0.223851760188j))*(o-1.)
            arg[(2, 0, 0, 0)]=(0.206552568224+0.0244930187306j)*x[0]**o + ((-0.468974958336+0.10082175004j))*x[0] + ((0.451010109288+0.564288118727j))*x[1]**o + ((-0.529945397321+0.899654890478j))*x[1] + ((-0.570406774068+0.258485524147j))*x[2]**o + ((-0.0676830643846+0.326781542708j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.489723758299+1.08726242242j)-((0.0145259839071+0.141211110267j))*(o-1.)
            arg[(2, 0, 0, 1)]=(-0.0405803770644-0.677799444715j)*x[0]**o + ((-0.755752391773-0.185988674616j))*x[0] + ((-0.704325690987-0.752908662358j))*x[1]**o + ((-0.502850760147-0.430905778004j))*x[1] + ((-0.651313278593+0.311381101102j))*x[2]**o + ((-0.541047696409-0.0683538462666j))*x[2]
            ref[(2, 0, 0, 1)]=(-1.59793509749-0.902287652429j)-((-0.232703224441-0.186554500995j))*(o-1.)
            arg[(2, 0, 0, 2)]=(0.0361318800613-0.442648045252j)*x[0]**o + ((0.316699397149+0.3255753077j))*x[0] + ((0.505634011821-0.123732553849j))*x[1]**o + ((0.270136085678-0.322056744111j))*x[1] + ((0.808846343373-0.172878224028j))*x[2]**o + ((0.482430700388+0.82218858766j))*x[2]
            ref[(2, 0, 0, 2)]=(1.20993920923+0.0432241640596j)-((0.225102039209-0.123209803855j))*(o-1.)
            arg[(2, 0, 1, 0)]=(-0.555881041559-0.691423251957j)*x[0]**o + ((-0.763056378763+0.282095790087j))*x[0] + ((0.511736849256-0.663690692907j))*x[1]**o + ((-0.436175352424-0.0227355983197j))*x[1] + ((-0.142700600677+0.470954309649j))*x[2]**o + ((-0.926146847416-0.740734066083j))*x[2]
            ref[(2, 0, 1, 0)]=(-1.15611168579-0.682766754766j)-((-0.03114079883-0.147359939203j))*(o-1.)
            arg[(2, 0, 1, 1)]=(-0.412425705266-0.222131921009j)*x[0]**o + ((-0.159138173136-0.730707686687j))*x[0] + ((0.809767350874-0.887284125244j))*x[1]**o + ((0.559898752165-0.984235805825j))*x[1] + ((-0.804494749657+0.720418730573j))*x[2]**o + ((-0.000500727323897-0.904622366149j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.00344662617189-1.50428158717j)-((-0.0678588506748-0.0648328859467j))*(o-1.)
            arg[(2, 0, 1, 2)]=(0.795689694033+0.612729165733j)*x[0]**o + ((0.777351814156+0.743070543827j))*x[0] + ((-0.129677576607-0.575657333842j))*x[1]**o + ((0.899277054677+0.382908053617j))*x[1] + ((0.209886579794-0.704828677539j))*x[2]**o + ((0.400832934075-0.645198797628j))*x[2]
            ref[(2, 0, 1, 2)]=(1.47668025006-0.0934885229162j)-((0.145983116203-0.111292807608j))*(o-1.)
            arg[(2, 1, 0, 0)]=(-0.0551813664621+0.90849855869j)*x[0]**o + ((-0.236780549788-0.216685525942j))*x[0] + ((-0.467838677867-0.790195006616j))*x[1]**o + ((0.473117309386-0.0659395743899j))*x[1] + ((-0.783548761569-0.957538106464j))*x[2]**o + ((0.3856946817-0.119770772995j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.3422686823-0.620815213859j)-((-0.21776146765-0.139872425732j))*(o-1.)
            arg[(2, 1, 0, 1)]=(-0.141902966552+0.422043102896j)*x[0]**o + ((0.146163973047+0.739126434804j))*x[0] + ((0.48866654742-0.296457389341j))*x[1]**o + ((0.14481594999+0.96914865426j))*x[1] + ((-0.553183259447-0.0513352748738j))*x[2]**o + ((0.138586828071+0.648939440498j))*x[2]
            ref[(2, 1, 0, 1)]=(0.111573536264+1.21573248412j)-((-0.0344032797631+0.0123750731135j))*(o-1.)
            arg[(2, 1, 0, 2)]=(0.536862674307-0.310815060658j)*x[0]**o + ((0.0414292036386-0.452918354449j))*x[0] + ((0.630280621558-0.980524622588j))*x[1]**o + ((-0.570637927153+0.345510118917j))*x[1] + ((0.903531891366+0.191309505765j))*x[2]**o + ((-0.660695774196+0.330368272142j))*x[2]
            ref[(2, 1, 0, 2)]=(0.44038534476-0.438535070436j)-((0.345112531205-0.183338362913j))*(o-1.)
            arg[(2, 1, 1, 0)]=(-0.00293790126227+0.178286415441j)*x[0]**o + ((-0.255287995522+0.551873727332j))*x[0] + ((0.491267797661-0.756145413817j))*x[1]**o + ((-0.000963084719112-0.214212631722j))*x[1] + ((-0.398936951191+0.965316199745j))*x[2]**o + ((-0.260328841992-0.435578402227j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.213593488513+0.144769947376j)-((0.0148988242013+0.0645762002281j))*(o-1.)
            arg[(2, 1, 1, 1)]=(0.852610894153-0.795804547501j)*x[0]**o + ((0.496675948856+0.762514166401j))*x[0] + ((0.841272404654-0.858664838043j))*x[1]**o + ((0.591986915273+0.784207938607j))*x[1] + ((-0.487038511265-0.26218808571j))*x[2]**o + ((0.511646274071+0.475863415908j))*x[2]
            ref[(2, 1, 1, 1)]=(1.40357696287+0.052964024831j)-((0.201140797924-0.319442911876j))*(o-1.)
            arg[(2, 1, 1, 2)]=(-0.657419018799+0.735119561599j)*x[0]**o + ((-0.62584505856-0.788530892412j))*x[0] + ((-0.276669904045+0.352085720975j))*x[1]**o + ((-0.37726013806-0.469572818968j))*x[1] + ((0.0703720230613+0.483119441429j))*x[2]**o + ((0.576980335296+0.458521743583j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.644920880554+0.385371378103j)-((-0.14395281663+0.261720787334j))*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.198581155815+0.384989999904j)*x[0]**o + ((-0.90120976501-0.561804126183j))*x[0] + ((-0.0830446135197+0.349463852647j))*x[1]**o + ((-0.0357018703926+0.352658919703j))*x[1]
            ref=(0.115536542295+0.734453852551j)*(1+2.*(dim-1)/(o+1.)) + ((-0.936911635403-0.20914520648j))*dim
        else:
            arg=(-0.705375053124-0.898219658423j)*x[0]**o + ((-0.432744905517-0.839177711995j))*x[0] + ((0.940717585392+0.921577096334j))*x[1]**o + ((0.819798759495+0.154769900066j))*x[1] + ((-0.934956262379-0.769304830264j))*x[2]**o + ((-0.103700006685+0.853743217891j))*x[2]
            ref=(-0.699613730111-0.745947392353j)*(1+2.*(dim-1)/(o+1.)) + ((0.283353847294+0.169335405962j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.809831232504-0.00386975677892j)*x[0]**o + ((0.566313859918+0.0824606724976j))*x[0] + ((0.438978261523+0.584260267311j))*x[1]**o + ((-0.990380177392-0.893077099586j))*x[1]
            ref[(0,)]=(-0.370852970981+0.580390510532j)*(1+2.*(dim-1)/(o+1.)) + ((-0.424066317474-0.810616427089j))*dim
            arg[(1,)]=(-0.556284151134+0.548836592967j)*x[0]**o + ((0.781015118325-0.601158705975j))*x[0] + ((-0.384613992771+0.546426364676j))*x[1]**o + ((-0.532693554751-0.658678807716j))*x[1]
            ref[(1,)]=(-0.940898143905+1.09526295764j)*(1+2.*(dim-1)/(o+1.)) + ((0.248321563574-1.25983751369j))*dim
            arg[(2,)]=(-0.477734325963+0.0656756488343j)*x[0]**o + ((-0.417284702446-0.516832551928j))*x[0] + ((0.395055751679+0.471205066518j))*x[1]**o + ((-0.0111479105449+0.781452511147j))*x[1]
            ref[(2,)]=(-0.0826785742836+0.536880715353j)*(1+2.*(dim-1)/(o+1.)) + ((-0.428432612991+0.264619959219j))*dim
            arg[(3,)]=(-0.662646777195+0.486517736555j)*x[0]**o + ((0.569360348216-0.855590740172j))*x[0] + ((-0.192023084532+0.260661832752j))*x[1]**o + ((0.248435392284+0.685556922098j))*x[1]
            ref[(3,)]=(-0.854669861727+0.747179569308j)*(1+2.*(dim-1)/(o+1.)) + ((0.817795740501-0.170033818074j))*dim
        else:
            arg[(0,)]=(0.264346862803+0.447421930417j)*x[0]**o + ((-0.503546175869-0.354402386638j))*x[0] + ((0.756485370584+0.334895194647j))*x[1]**o + ((0.807696962034+0.0751723991385j))*x[1] + ((-0.751264894585+0.425277554134j))*x[2]**o + ((-0.207946853951+0.278470934564j))*x[2]
            ref[(0,)]=(0.269567338802+1.2075946792j)*(1+2.*(dim-1)/(o+1.)) + ((0.096203932214-0.000759052935719j))*dim
            arg[(1,)]=(-0.672355361783+0.421855053649j)*x[0]**o + ((-0.859288550663-0.519615590955j))*x[0] + ((0.678252073412+0.606469802555j))*x[1]**o + ((-0.26823539367-0.35997552876j))*x[1] + ((-0.916318417694-0.281283689687j))*x[2]**o + ((-0.0235344769401-0.107496495841j))*x[2]
            ref[(1,)]=(-0.910421706065+0.747041166516j)*(1+2.*(dim-1)/(o+1.)) + ((-1.15105842127-0.987087615556j))*dim
            arg[(2,)]=(0.286691615314+0.729349401554j)*x[0]**o + ((0.17299769659-0.0876403598609j))*x[0] + ((-0.00537042954698+0.277972230924j))*x[1]**o + ((-0.928361932019+0.914575577889j))*x[1] + ((-0.742701503996+0.0715279031025j))*x[2]**o + ((0.416090643573+0.953816631496j))*x[2]
            ref[(2,)]=(-0.461380318229+1.07884953558j)*(1+2.*(dim-1)/(o+1.)) + ((-0.339273591857+1.78075184952j))*dim
            arg[(3,)]=(0.668313569774-0.710146131267j)*x[0]**o + ((-0.39877006774-0.869233840214j))*x[0] + ((0.204091602894-0.0120748440555j))*x[1]**o + ((-0.400540011903+0.23460393729j))*x[1] + ((0.316164790133+0.626939690675j))*x[2]**o + ((-0.745751722003-0.441739531054j))*x[2]
            ref[(3,)]=(1.1885699628-0.0952812846475j)*(1+2.*(dim-1)/(o+1.)) + ((-1.54506180165-1.07636943398j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.585559949736+0.753261492689j)*x[0]**o + ((0.522103426861-0.574870897603j))*x[0] + ((0.35160825634-0.987381496292j))*x[1]**o + ((-0.536845832523+0.885742968881j))*x[1]
            ref[(0, 0)]=(0.937168206076-0.234120003603j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0147424056614+0.310872071278j))*dim
            arg[(0, 1)]=(0.32581148941+0.877081446949j)*x[0]**o + ((-0.694181720986+0.991462619598j))*x[0] + ((0.260134714965-0.74614457623j))*x[1]**o + ((0.678342904906+0.872748426702j))*x[1]
            ref[(0, 1)]=(0.585946204375+0.130936870719j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0158388160802+1.8642110463j))*dim
            arg[(1, 0)]=(0.382239958295-0.389429030952j)*x[0]**o + ((0.728517673088-0.961774990243j))*x[0] + ((-0.364965177489-0.515317132021j))*x[1]**o + ((-0.813899077628-0.200631635772j))*x[1]
            ref[(1, 0)]=(0.017274780806-0.904746162974j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0853814045403-1.16240662601j))*dim
            arg[(1, 1)]=(-0.418036261759-0.373953026914j)*x[0]**o + ((-0.0911288541937-0.940218510303j))*x[0] + ((0.342003311964+0.423406625934j))*x[1]**o + ((0.130299789028-0.227270516253j))*x[1]
            ref[(1, 1)]=(-0.0760329497953+0.0494535990196j)*(1+2.*(dim-1)/(o+1.)) + ((0.0391709348347-1.16748902656j))*dim
            arg[(2, 0)]=(-0.691338338981-0.481473147596j)*x[0]**o + ((-0.212675570454+0.0169867310481j))*x[0] + ((0.573174592889+0.262339733039j))*x[1]**o + ((0.239627429109-0.247860041214j))*x[1]
            ref[(2, 0)]=(-0.118163746092-0.219133414557j)*(1+2.*(dim-1)/(o+1.)) + ((0.0269518586545-0.230873310166j))*dim
            arg[(2, 1)]=(0.867819351033+0.244586131966j)*x[0]**o + ((0.286115344319-0.019176335632j))*x[0] + ((0.228149051138+0.663626209323j))*x[1]**o + ((0.705525433679-0.048759616575j))*x[1]
            ref[(2, 1)]=(1.09596840217+0.908212341289j)*(1+2.*(dim-1)/(o+1.)) + ((0.991640777998-0.067935952207j))*dim
            arg[(3, 0)]=(0.181671694988+0.0696947854967j)*x[0]**o + ((-0.976080564142+0.288967292029j))*x[0] + ((-0.0072785238973+0.983955047671j))*x[1]**o + ((0.649043464132-0.900641601889j))*x[1]
            ref[(3, 0)]=(0.174393171091+1.05364983317j)*(1+2.*(dim-1)/(o+1.)) + ((-0.32703710001-0.61167430986j))*dim
            arg[(3, 1)]=(0.546146163945-0.47227750069j)*x[0]**o + ((-0.285976200287+0.529154099337j))*x[0] + ((-0.866653129339-0.949927166653j))*x[1]**o + ((-0.818390809675-0.104499497595j))*x[1]
            ref[(3, 1)]=(-0.320506965394-1.42220466734j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10436700996+0.424654601743j))*dim
        else:
            arg[(0, 0)]=(0.127496011772+0.35377168851j)*x[0]**o + ((-0.351019917831-0.0164641615684j))*x[0] + ((0.876156227922+0.577790268318j))*x[1]**o + ((0.536999139807+0.268390924848j))*x[1] + ((0.970636474905-0.47966563304j))*x[2]**o + ((0.537688725918+0.0673019255908j))*x[2]
            ref[(0, 0)]=(1.9742887146+0.451896323788j)*(1+2.*(dim-1)/(o+1.)) + ((0.723667947893+0.31922868887j))*dim
            arg[(0, 1)]=(0.872102338422+0.0965949054737j)*x[0]**o + ((-0.904313157442+0.688082682034j))*x[0] + ((-0.800188598658+0.885587205394j))*x[1]**o + ((-0.322413656329+0.0482377439355j))*x[1] + ((0.344736318893+0.392460161357j))*x[2]**o + ((-0.639248095276-0.204587553256j))*x[2]
            ref[(0, 1)]=(0.416650058657+1.37464227223j)*(1+2.*(dim-1)/(o+1.)) + ((-1.86597490905+0.531732872713j))*dim
            arg[(1, 0)]=(0.0491555009778-0.495998634493j)*x[0]**o + ((0.0151845953304-0.86802333204j))*x[0] + ((0.181412052223-0.891951083464j))*x[1]**o + ((-0.971798872809+0.408826835545j))*x[1] + ((-0.0739132201466-0.492219785321j))*x[2]**o + ((0.461412109609+0.0381194910668j))*x[2]
            ref[(1, 0)]=(0.156654333054-1.88016950328j)*(1+2.*(dim-1)/(o+1.)) + ((-0.495202167869-0.421077005429j))*dim
            arg[(1, 1)]=(0.0650661469927-0.407849859231j)*x[0]**o + ((0.0789020519426-0.730905315975j))*x[0] + ((0.459922740352+0.346567143773j))*x[1]**o + ((0.74034443292-0.193884266879j))*x[1] + ((-0.462769373948-0.801032477425j))*x[2]**o + ((0.277490466695+0.448834762645j))*x[2]
            ref[(1, 1)]=(0.0622195133964-0.862315192883j)*(1+2.*(dim-1)/(o+1.)) + ((1.09673695156-0.475954820209j))*dim
            arg[(2, 0)]=(-0.850430399649+0.808053901833j)*x[0]**o + ((0.123333604923-0.749957734095j))*x[0] + ((-0.499670002087-0.916428353183j))*x[1]**o + ((-0.69742983751+0.416466935012j))*x[1] + ((-0.236137051582+0.76284563047j))*x[2]**o + ((0.924515818615-0.439503112384j))*x[2]
            ref[(2, 0)]=(-1.58623745332+0.654471179121j)*(1+2.*(dim-1)/(o+1.)) + ((0.350419586028-0.772993911467j))*dim
            arg[(2, 1)]=(-0.969240346314-0.258690239145j)*x[0]**o + ((0.194480071192+0.563609799253j))*x[0] + ((-0.930434293114+0.346479146525j))*x[1]**o + ((0.726113061835-0.466797810368j))*x[1] + ((-0.290210768489+0.352222459179j))*x[2]**o + ((0.226442232031+0.67609396895j))*x[2]
            ref[(2, 1)]=(-2.18988540792+0.440011366558j)*(1+2.*(dim-1)/(o+1.)) + ((1.14703536506+0.772905957835j))*dim
            arg[(3, 0)]=(0.671467810745-0.226837788305j)*x[0]**o + ((-0.670357883349+0.373015947705j))*x[0] + ((-0.772107906411+0.469714142557j))*x[1]**o + ((0.221859734991-0.341852293964j))*x[1] + ((0.721475227345-0.928593996681j))*x[2]**o + ((-0.844078376795+0.273583602663j))*x[2]
            ref[(3, 0)]=(0.620835131679-0.685717642429j)*(1+2.*(dim-1)/(o+1.)) + ((-1.29257652515+0.304747256404j))*dim
            arg[(3, 1)]=(0.159868940318-0.487368116807j)*x[0]**o + ((-0.586502064322+0.249026790031j))*x[0] + ((0.299485814662+0.841534003267j))*x[1]**o + ((-0.307033685619+0.0569596024879j))*x[1] + ((0.964550952676+0.327679562877j))*x[2]**o + ((0.782311007687-0.345813276982j))*x[2]
            ref[(3, 1)]=(1.42390570766+0.681845449338j)*(1+2.*(dim-1)/(o+1.)) + ((-0.111224742254-0.0398268844626j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3),w)
        ref=numpy.zeros((4, 4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.728893280968-0.621737720881j)*x[0]**o + ((-0.512535294458-0.440071744002j))*x[0] + ((-0.145828656457-0.566495536065j))*x[1]**o + ((-0.226507478032+0.185935880351j))*x[1]
            ref[(0, 0, 0)]=(0.58306462451-1.18823325695j)*(1+2.*(dim-1)/(o+1.)) + ((-0.73904277249-0.254135863651j))*dim
            arg[(0, 0, 1)]=(0.98905515711-0.866763929416j)*x[0]**o + ((-0.148766430783+0.374890045702j))*x[0] + ((-0.349913088129+0.56245923725j))*x[1]**o + ((-0.498012005996+0.891602859005j))*x[1]
            ref[(0, 0, 1)]=(0.639142068981-0.304304692166j)*(1+2.*(dim-1)/(o+1.)) + ((-0.646778436779+1.26649290471j))*dim
            arg[(0, 0, 2)]=(0.801267762273+0.542200141801j)*x[0]**o + ((-0.768462905595+0.877130757609j))*x[0] + ((0.648784123957+0.840570043276j))*x[1]**o + ((0.42056010407-0.195242660599j))*x[1]
            ref[(0, 0, 2)]=(1.45005188623+1.38277018508j)*(1+2.*(dim-1)/(o+1.)) + ((-0.347902801526+0.68188809701j))*dim
            arg[(0, 1, 0)]=(0.438367422861+0.108107891766j)*x[0]**o + ((0.57649808299+0.586754163296j))*x[0] + ((0.0163381617605-0.92220283526j))*x[1]**o + ((-0.0635160067314+0.488024960279j))*x[1]
            ref[(0, 1, 0)]=(0.454705584621-0.814094943494j)*(1+2.*(dim-1)/(o+1.)) + ((0.512982076259+1.07477912358j))*dim
            arg[(0, 1, 1)]=(-0.221106115618-0.105272906167j)*x[0]**o + ((-0.43005060575-0.0140868610377j))*x[0] + ((0.156357060204-0.763781007643j))*x[1]**o + ((0.326810644814-0.439113455744j))*x[1]
            ref[(0, 1, 1)]=(-0.0647490554146-0.86905391381j)*(1+2.*(dim-1)/(o+1.)) + ((-0.103239960936-0.453200316782j))*dim
            arg[(0, 1, 2)]=(-0.173348995083+0.784422719668j)*x[0]**o + ((0.635180169255+0.2099617441j))*x[0] + ((-0.050248958941-0.655939776631j))*x[1]**o + ((0.297274107732+0.834064643763j))*x[1]
            ref[(0, 1, 2)]=(-0.223597954024+0.128482943037j)*(1+2.*(dim-1)/(o+1.)) + ((0.932454276987+1.04402638786j))*dim
            arg[(0, 2, 0)]=(0.634249066744+0.576858267126j)*x[0]**o + ((-0.491296199308+0.362775160307j))*x[0] + ((0.473667912795+0.881891048463j))*x[1]**o + ((0.118265378454-0.378894768159j))*x[1]
            ref[(0, 2, 0)]=(1.10791697954+1.45874931559j)*(1+2.*(dim-1)/(o+1.)) + ((-0.373030820854-0.0161196078516j))*dim
            arg[(0, 2, 1)]=(-0.31652195791-0.506228022055j)*x[0]**o + ((0.285776359517+0.921403151886j))*x[0] + ((0.816783870381-0.937884639248j))*x[1]**o + ((-0.177853748396+0.882765657922j))*x[1]
            ref[(0, 2, 1)]=(0.500261912471-1.4441126613j)*(1+2.*(dim-1)/(o+1.)) + ((0.107922611121+1.80416880981j))*dim
            arg[(0, 2, 2)]=(-0.0916544565566-0.941733652998j)*x[0]**o + ((0.245609412312+0.818447012865j))*x[0] + ((-0.196652015984-0.764635292905j))*x[1]**o + ((0.993819140157+0.00490116289546j))*x[1]
            ref[(0, 2, 2)]=(-0.288306472541-1.7063689459j)*(1+2.*(dim-1)/(o+1.)) + ((1.23942855247+0.82334817576j))*dim
            arg[(0, 3, 0)]=(0.829407742738+0.889071072366j)*x[0]**o + ((-0.0174084223404-0.466170640509j))*x[0] + ((-0.140652417359+0.403036097968j))*x[1]**o + ((-0.454318540975-0.708514638125j))*x[1]
            ref[(0, 3, 0)]=(0.688755325379+1.29210717033j)*(1+2.*(dim-1)/(o+1.)) + ((-0.471726963316-1.17468527863j))*dim
            arg[(0, 3, 1)]=(-0.0701558501916-0.765248010215j)*x[0]**o + ((0.0556830581768+0.700471090002j))*x[0] + ((0.966436059075+0.758012706046j))*x[1]**o + ((0.83904301541+0.761401423176j))*x[1]
            ref[(0, 3, 1)]=(0.896280208883-0.00723530416941j)*(1+2.*(dim-1)/(o+1.)) + ((0.894726073587+1.46187251318j))*dim
            arg[(0, 3, 2)]=(0.940507035561-0.737977089381j)*x[0]**o + ((-0.0454722129373-0.759912042531j))*x[0] + ((0.437870087877+0.469713396791j))*x[1]**o + ((0.580455234392+0.158845166204j))*x[1]
            ref[(0, 3, 2)]=(1.37837712344-0.26826369259j)*(1+2.*(dim-1)/(o+1.)) + ((0.534983021455-0.601066876327j))*dim
            arg[(1, 0, 0)]=(-0.497762591777+0.83941797863j)*x[0]**o + ((0.618371969774-0.170808753486j))*x[0] + ((0.296223306481+0.345409245588j))*x[1]**o + ((0.516977113941-0.703543420113j))*x[1]
            ref[(1, 0, 0)]=(-0.201539285296+1.18482722422j)*(1+2.*(dim-1)/(o+1.)) + ((1.13534908372-0.874352173599j))*dim
            arg[(1, 0, 1)]=(0.982794980511+0.27412148284j)*x[0]**o + ((0.278040495459-0.110722182827j))*x[0] + ((0.556225670877+0.119414683029j))*x[1]**o + ((0.14671870629+0.238876093324j))*x[1]
            ref[(1, 0, 1)]=(1.53902065139+0.39353616587j)*(1+2.*(dim-1)/(o+1.)) + ((0.424759201749+0.128153910497j))*dim
            arg[(1, 0, 2)]=(0.960047476636+0.570158519106j)*x[0]**o + ((0.396620903784+0.97271620087j))*x[0] + ((0.355227722678-0.630412146164j))*x[1]**o + ((0.855186151321-0.219232496386j))*x[1]
            ref[(1, 0, 2)]=(1.31527519931-0.0602536270583j)*(1+2.*(dim-1)/(o+1.)) + ((1.2518070551+0.753483704484j))*dim
            arg[(1, 1, 0)]=(0.324481863923+0.795084369631j)*x[0]**o + ((-0.313622989623+0.782324762728j))*x[0] + ((0.229828110928-0.854904245683j))*x[1]**o + ((0.579200098353-0.445674769373j))*x[1]
            ref[(1, 1, 0)]=(0.554309974852-0.0598198760518j)*(1+2.*(dim-1)/(o+1.)) + ((0.26557710873+0.336649993355j))*dim
            arg[(1, 1, 1)]=(-0.772814968088-0.708343682206j)*x[0]**o + ((-0.346844338462+0.998134676129j))*x[0] + ((-0.0924710941936+0.179869819646j))*x[1]**o + ((-0.1083222054-0.221831603419j))*x[1]
            ref[(1, 1, 1)]=(-0.865286062281-0.52847386256j)*(1+2.*(dim-1)/(o+1.)) + ((-0.455166543862+0.776303072711j))*dim
            arg[(1, 1, 2)]=(0.641927334914-0.204973469431j)*x[0]**o + ((-0.157893432259+0.535297499905j))*x[0] + ((0.97335707866+0.485284790255j))*x[1]**o + ((0.903629933283+0.199220475156j))*x[1]
            ref[(1, 1, 2)]=(1.61528441357+0.280311320824j)*(1+2.*(dim-1)/(o+1.)) + ((0.745736501025+0.734517975061j))*dim
            arg[(1, 2, 0)]=(-0.737286005205+0.990769776369j)*x[0]**o + ((-0.770103666118-0.466741651176j))*x[0] + ((0.585993509914+0.209772955223j))*x[1]**o + ((-0.107277728354+0.719718985894j))*x[1]
            ref[(1, 2, 0)]=(-0.151292495291+1.20054273159j)*(1+2.*(dim-1)/(o+1.)) + ((-0.877381394472+0.252977334718j))*dim
            arg[(1, 2, 1)]=(0.737642181309+0.465911648683j)*x[0]**o + ((-0.04464666003+0.202557879434j))*x[0] + ((-0.276945451492-0.274147173143j))*x[1]**o + ((0.321697027019+0.931838932303j))*x[1]
            ref[(1, 2, 1)]=(0.460696729817+0.19176447554j)*(1+2.*(dim-1)/(o+1.)) + ((0.277050366989+1.13439681174j))*dim
            arg[(1, 2, 2)]=(-0.293937946222-0.154939339268j)*x[0]**o + ((0.490200884764-0.799237433679j))*x[0] + ((-0.695141759073+0.989758566644j))*x[1]**o + ((-0.316412828088+0.944047292218j))*x[1]
            ref[(1, 2, 2)]=(-0.989079705295+0.834819227376j)*(1+2.*(dim-1)/(o+1.)) + ((0.173788056676+0.144809858539j))*dim
            arg[(1, 3, 0)]=(-0.0527730631265+0.721175114501j)*x[0]**o + ((0.201853075677-0.870378248069j))*x[0] + ((0.322402003496-0.69557771445j))*x[1]**o + ((-0.921675032526-0.055576109841j))*x[1]
            ref[(1, 3, 0)]=(0.269628940369+0.0255974000512j)*(1+2.*(dim-1)/(o+1.)) + ((-0.719821956849-0.92595435791j))*dim
            arg[(1, 3, 1)]=(-0.731189802061+0.573269808804j)*x[0]**o + ((0.618297367442-0.506275409112j))*x[0] + ((0.183704439248+0.51672377939j))*x[1]**o + ((-0.956536346795-0.187313630916j))*x[1]
            ref[(1, 3, 1)]=(-0.547485362813+1.08999358819j)*(1+2.*(dim-1)/(o+1.)) + ((-0.338238979353-0.693589040028j))*dim
            arg[(1, 3, 2)]=(-0.571488775525+0.418570545093j)*x[0]**o + ((-0.168848456347+0.60491949394j))*x[0] + ((-0.750649787878-0.300714032996j))*x[1]**o + ((0.445234246263-0.417713694454j))*x[1]
            ref[(1, 3, 2)]=(-1.3221385634+0.117856512097j)*(1+2.*(dim-1)/(o+1.)) + ((0.276385789916+0.187205799486j))*dim
            arg[(2, 0, 0)]=(0.15785415525-0.283796132699j)*x[0]**o + ((0.491235546587-0.776214633343j))*x[0] + ((-0.767973063579+0.76800866711j))*x[1]**o + ((-0.350958536502+0.538548327351j))*x[1]
            ref[(2, 0, 0)]=(-0.610118908329+0.484212534411j)*(1+2.*(dim-1)/(o+1.)) + ((0.140277010085-0.237666305992j))*dim
            arg[(2, 0, 1)]=(-0.259030612855+0.316539933952j)*x[0]**o + ((-0.416750694622-0.367346120874j))*x[0] + ((0.978610649211+0.165363259374j))*x[1]**o + ((-0.610185525121-0.758543616022j))*x[1]
            ref[(2, 0, 1)]=(0.719580036356+0.481903193326j)*(1+2.*(dim-1)/(o+1.)) + ((-1.02693621974-1.1258897369j))*dim
            arg[(2, 0, 2)]=(-0.840436379915-0.575964564508j)*x[0]**o + ((-0.992798254713-0.2049599718j))*x[0] + ((-0.328383373638-0.34593983886j))*x[1]**o + ((0.141885806166+0.511619363947j))*x[1]
            ref[(2, 0, 2)]=(-1.16881975355-0.921904403368j)*(1+2.*(dim-1)/(o+1.)) + ((-0.850912448547+0.306659392148j))*dim
            arg[(2, 1, 0)]=(0.773389485666-0.313584875784j)*x[0]**o + ((-0.24692136203-0.662888139021j))*x[0] + ((-0.500519619759+0.480813517891j))*x[1]**o + ((0.399028174112-0.172114932458j))*x[1]
            ref[(2, 1, 0)]=(0.272869865907+0.167228642107j)*(1+2.*(dim-1)/(o+1.)) + ((0.152106812082-0.835003071479j))*dim
            arg[(2, 1, 1)]=(0.446531395588-0.584539363996j)*x[0]**o + ((-0.943889548667+0.832468690999j))*x[0] + ((-0.78664311297-0.088405882863j))*x[1]**o + ((0.440298229601+0.763205333556j))*x[1]
            ref[(2, 1, 1)]=(-0.340111717382-0.672945246859j)*(1+2.*(dim-1)/(o+1.)) + ((-0.503591319067+1.59567402455j))*dim
            arg[(2, 1, 2)]=(0.0125248850677-0.526308940204j)*x[0]**o + ((-0.286076006105+0.178241953602j))*x[0] + ((-0.78026013472+0.784443188565j))*x[1]**o + ((-0.731190103472+0.347374446755j))*x[1]
            ref[(2, 1, 2)]=(-0.767735249652+0.258134248361j)*(1+2.*(dim-1)/(o+1.)) + ((-1.01726610958+0.525616400357j))*dim
            arg[(2, 2, 0)]=(0.00926742468683+0.840573082145j)*x[0]**o + ((-0.750494207888+0.804682978685j))*x[0] + ((0.996792084368+0.456806618865j))*x[1]**o + ((-0.118332177908-0.667773021582j))*x[1]
            ref[(2, 2, 0)]=(1.00605950905+1.29737970101j)*(1+2.*(dim-1)/(o+1.)) + ((-0.868826385796+0.136909957103j))*dim
            arg[(2, 2, 1)]=(-0.371414641942-0.600502045324j)*x[0]**o + ((-0.318563872324-0.44877450821j))*x[0] + ((0.594973580074+0.00835544268879j))*x[1]**o + ((0.0104627849503+0.147287648885j))*x[1]
            ref[(2, 2, 1)]=(0.223558938132-0.592146602635j)*(1+2.*(dim-1)/(o+1.)) + ((-0.308101087374-0.301486859326j))*dim
            arg[(2, 2, 2)]=(-0.895203135174-0.350409630142j)*x[0]**o + ((-0.482430640208-0.704122620549j))*x[0] + ((0.414588872301-0.260040389442j))*x[1]**o + ((0.981888972941+0.605699973846j))*x[1]
            ref[(2, 2, 2)]=(-0.480614262872-0.610450019584j)*(1+2.*(dim-1)/(o+1.)) + ((0.499458332733-0.0984226467027j))*dim
            arg[(2, 3, 0)]=(-0.854646318612+0.628791182227j)*x[0]**o + ((0.959735407304-0.666861280412j))*x[0] + ((0.497857589347-0.286609365398j))*x[1]**o + ((-0.166004334593-0.0910792343378j))*x[1]
            ref[(2, 3, 0)]=(-0.356788729265+0.342181816829j)*(1+2.*(dim-1)/(o+1.)) + ((0.793731072711-0.75794051475j))*dim
            arg[(2, 3, 1)]=(-0.984589845624-0.279795274236j)*x[0]**o + ((0.125741379901+0.847145125809j))*x[0] + ((-0.931788993854+0.0509926772232j))*x[1]**o + ((-0.287408929265+0.933642397928j))*x[1]
            ref[(2, 3, 1)]=(-1.91637883948-0.228802597013j)*(1+2.*(dim-1)/(o+1.)) + ((-0.161667549364+1.78078752374j))*dim
            arg[(2, 3, 2)]=(-0.788051538858+0.368269592569j)*x[0]**o + ((-0.552941083416-0.498994419937j))*x[0] + ((-0.313501808515+0.19302288711j))*x[1]**o + ((-0.534276818815-0.138025039797j))*x[1]
            ref[(2, 3, 2)]=(-1.10155334737+0.561292479679j)*(1+2.*(dim-1)/(o+1.)) + ((-1.08721790223-0.637019459734j))*dim
            arg[(3, 0, 0)]=(0.924237977124+0.575732534022j)*x[0]**o + ((0.425683448817+0.950280232859j))*x[0] + ((-0.998730061495-0.491892644434j))*x[1]**o + ((0.613497925964+0.86185106435j))*x[1]
            ref[(3, 0, 0)]=(-0.0744920843711+0.0838398895885j)*(1+2.*(dim-1)/(o+1.)) + ((1.03918137478+1.81213129721j))*dim
            arg[(3, 0, 1)]=(0.665489470988+0.172513518924j)*x[0]**o + ((-0.505834525449-0.717031005365j))*x[0] + ((-0.45470103717+0.864136892895j))*x[1]**o + ((0.0400329032813-0.622893009141j))*x[1]
            ref[(3, 0, 1)]=(0.210788433818+1.03665041182j)*(1+2.*(dim-1)/(o+1.)) + ((-0.465801622168-1.33992401451j))*dim
            arg[(3, 0, 2)]=(-0.280285018212-0.65449002977j)*x[0]**o + ((-0.920704362645-0.936737613204j))*x[0] + ((-0.851973854075-0.175054421861j))*x[1]**o + ((0.847033351846+0.971483579572j))*x[1]
            ref[(3, 0, 2)]=(-1.13225887229-0.829544451631j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0736710107989+0.0347459663674j))*dim
            arg[(3, 1, 0)]=(-0.108022424071-0.0107362103115j)*x[0]**o + ((0.687492930338-0.0670198061325j))*x[0] + ((0.0467343850689-0.529308450191j))*x[1]**o + ((0.0178814557885-0.933659790412j))*x[1]
            ref[(3, 1, 0)]=(-0.0612880390025-0.540044660503j)*(1+2.*(dim-1)/(o+1.)) + ((0.705374386126-1.00067959654j))*dim
            arg[(3, 1, 1)]=(-0.246528523067-0.262121480795j)*x[0]**o + ((0.956490089544+0.505188081152j))*x[0] + ((-0.977315838014-0.301045935722j))*x[1]**o + ((0.0794824784061-0.868567624847j))*x[1]
            ref[(3, 1, 1)]=(-1.22384436108-0.563167416517j)*(1+2.*(dim-1)/(o+1.)) + ((1.03597256795-0.363379543694j))*dim
            arg[(3, 1, 2)]=(0.304655392199+0.179022975443j)*x[0]**o + ((-0.903769565308-0.0484112911403j))*x[0] + ((0.261566667926-0.500290185734j))*x[1]**o + ((-0.0173940603492-0.237080593577j))*x[1]
            ref[(3, 1, 2)]=(0.566222060125-0.321267210291j)*(1+2.*(dim-1)/(o+1.)) + ((-0.921163625658-0.285491884717j))*dim
            arg[(3, 2, 0)]=(-0.788418730057+0.53409140864j)*x[0]**o + ((-0.748837009097-0.0613118928879j))*x[0] + ((0.329577332821-0.387788230632j))*x[1]**o + ((-0.487315755364-0.521489181651j))*x[1]
            ref[(3, 2, 0)]=(-0.458841397236+0.146303178008j)*(1+2.*(dim-1)/(o+1.)) + ((-1.23615276446-0.582801074539j))*dim
            arg[(3, 2, 1)]=(0.656344349666+0.800441741285j)*x[0]**o + ((0.393311694772+0.323150828789j))*x[0] + ((0.233995275953-0.36862481076j))*x[1]**o + ((-0.927427387827-0.979651140169j))*x[1]
            ref[(3, 2, 1)]=(0.890339625619+0.431816930524j)*(1+2.*(dim-1)/(o+1.)) + ((-0.534115693055-0.656500311381j))*dim
            arg[(3, 2, 2)]=(0.122310327866-0.319789162549j)*x[0]**o + ((-0.876295269235+0.153384545072j))*x[0] + ((0.614011318493+0.599095532033j))*x[1]**o + ((0.212727198659+0.205722253603j))*x[1]
            ref[(3, 2, 2)]=(0.736321646359+0.279306369484j)*(1+2.*(dim-1)/(o+1.)) + ((-0.663568070576+0.359106798674j))*dim
            arg[(3, 3, 0)]=(0.245423756457-0.881553427455j)*x[0]**o + ((0.00337098156858-0.559187056352j))*x[0] + ((-0.758369129334-0.65629762173j))*x[1]**o + ((-0.549026019135+0.785232601228j))*x[1]
            ref[(3, 3, 0)]=(-0.512945372877-1.53785104919j)*(1+2.*(dim-1)/(o+1.)) + ((-0.545655037567+0.226045544876j))*dim
            arg[(3, 3, 1)]=(-0.949749497829-0.583256686554j)*x[0]**o + ((-0.792237358502-0.529027772628j))*x[0] + ((-0.742057338661+0.388354757391j))*x[1]**o + ((0.14189842012-0.568991905872j))*x[1]
            ref[(3, 3, 1)]=(-1.69180683649-0.194901929163j)*(1+2.*(dim-1)/(o+1.)) + ((-0.650338938382-1.0980196785j))*dim
            arg[(3, 3, 2)]=(0.182397301817-0.597206318135j)*x[0]**o + ((-0.468292831461-0.324136722947j))*x[0] + ((0.51127712413+0.986385957106j))*x[1]**o + ((0.690352399998-0.283902138953j))*x[1]
            ref[(3, 3, 2)]=(0.693674425948+0.389179638971j)*(1+2.*(dim-1)/(o+1.)) + ((0.222059568537-0.6080388619j))*dim
        else:
            arg[(0, 0, 0)]=(-0.32524260558+0.963329498514j)*x[0]**o + ((-0.417741830228+0.118273286422j))*x[0] + ((-0.259822453079+0.374417961334j))*x[1]**o + ((0.553894076421-0.167370678201j))*x[1] + ((0.260300408012+0.205573275402j))*x[2]**o + ((-0.117797051969-0.73002173434j))*x[2]
            ref[(0, 0, 0)]=(-0.324764650647+1.54332073525j)*(1+2.*(dim-1)/(o+1.)) + ((0.0183551942239-0.779119126119j))*dim
            arg[(0, 0, 1)]=(0.123342765874+0.548517381167j)*x[0]**o + ((0.00979914104191+0.831716034387j))*x[0] + ((0.835917219141+0.00824032254262j))*x[1]**o + ((0.057015214431-0.630804158542j))*x[1] + ((0.994433131476-0.0429079620085j))*x[2]**o + ((-0.763202254207-0.927555638933j))*x[2]
            ref[(0, 0, 1)]=(1.95369311649+0.513849741701j)*(1+2.*(dim-1)/(o+1.)) + ((-0.696387898734-0.726643763088j))*dim
            arg[(0, 0, 2)]=(0.501273681531+0.660762147127j)*x[0]**o + ((0.209852541073+0.264725542996j))*x[0] + ((-0.87178924186-0.272207291884j))*x[1]**o + ((-0.407437423714-0.458646446844j))*x[1] + ((-0.585616616862+0.091550314899j))*x[2]**o + ((0.367640700423+0.986268235721j))*x[2]
            ref[(0, 0, 2)]=(-0.956132177191+0.480105170142j)*(1+2.*(dim-1)/(o+1.)) + ((0.170055817782+0.792347331874j))*dim
            arg[(0, 1, 0)]=(-0.764003579764+0.0186596526732j)*x[0]**o + ((0.18176555656+0.182531804395j))*x[0] + ((-0.365865177082-0.477246026369j))*x[1]**o + ((0.32909659568+0.923890910348j))*x[1] + ((0.497151040409-0.221971487295j))*x[2]**o + ((0.872213566663-0.0487440979557j))*x[2]
            ref[(0, 1, 0)]=(-0.632717716438-0.680557860991j)*(1+2.*(dim-1)/(o+1.)) + ((1.3830757189+1.05767861679j))*dim
            arg[(0, 1, 1)]=(-0.389455996337-0.93318779957j)*x[0]**o + ((0.10350601051+0.97925356363j))*x[0] + ((0.196100079485+0.711168846183j))*x[1]**o + ((-0.864554579443+0.0943075014634j))*x[1] + ((-0.150163509872+0.849837265226j))*x[2]**o + ((-0.831844858712+0.39622702499j))*x[2]
            ref[(0, 1, 1)]=(-0.343519426723+0.627818311839j)*(1+2.*(dim-1)/(o+1.)) + ((-1.59289342765+1.46978809008j))*dim
            arg[(0, 1, 2)]=(-0.425172251591-0.300383466915j)*x[0]**o + ((0.858424427025-0.33490450144j))*x[0] + ((0.513460551021+0.906934427795j))*x[1]**o + ((-0.610319232736-0.484000022862j))*x[1] + ((0.0943904301727-0.646644493507j))*x[2]**o + ((0.16626956263+0.642557677654j))*x[2]
            ref[(0, 1, 2)]=(0.182678729603-0.0400935326272j)*(1+2.*(dim-1)/(o+1.)) + ((0.41437475692-0.176346846648j))*dim
            arg[(0, 2, 0)]=(-0.445546653325+0.781408364825j)*x[0]**o + ((0.0410900704823+0.635202431422j))*x[0] + ((-0.705183809217+0.169024736592j))*x[1]**o + ((0.721159525939+0.293257133108j))*x[1] + ((-0.800381024696-0.892728435106j))*x[2]**o + ((-0.782856807006+0.529171911668j))*x[2]
            ref[(0, 2, 0)]=(-1.95111148724+0.0577046663109j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0206072105846+1.4576314762j))*dim
            arg[(0, 2, 1)]=(-0.791706217594-0.417014740546j)*x[0]**o + ((-0.662202641233+0.41087819655j))*x[0] + ((-0.783077582498-0.666351739641j))*x[1]**o + ((0.290603093721+0.0402003136507j))*x[1] + ((-0.672464142674+0.625533741995j))*x[2]**o + ((-0.941199870952+0.730687064355j))*x[2]
            ref[(0, 2, 1)]=(-2.24724794277-0.457832738191j)*(1+2.*(dim-1)/(o+1.)) + ((-1.31279941846+1.18176557456j))*dim
            arg[(0, 2, 2)]=(-0.0950218702392-0.758187089477j)*x[0]**o + ((-0.0771813034352-0.413238074805j))*x[0] + ((-0.88507398616-0.740648476211j))*x[1]**o + ((0.881340991869-0.780245016812j))*x[1] + ((-0.0938919347347+0.0855192902462j))*x[2]**o + ((-0.588324006929+0.953122576505j))*x[2]
            ref[(0, 2, 2)]=(-1.07398779113-1.41331627544j)*(1+2.*(dim-1)/(o+1.)) + ((0.215835681505-0.240360515113j))*dim
            arg[(0, 3, 0)]=(0.925984545623-0.00210813570644j)*x[0]**o + ((0.76117530311+0.819111028201j))*x[0] + ((0.507062596503-0.260815174794j))*x[1]**o + ((0.575673107088+0.497912201691j))*x[1] + ((0.316060925065+0.220189233161j))*x[2]**o + ((0.405312478567-0.904804858585j))*x[2]
            ref[(0, 3, 0)]=(1.74910806719-0.0427340773391j)*(1+2.*(dim-1)/(o+1.)) + ((1.74216088876+0.412218371307j))*dim
            arg[(0, 3, 1)]=(-0.0874193080521+0.408529821311j)*x[0]**o + ((0.629110967511-0.919014610893j))*x[0] + ((-0.348683250473+0.151730624511j))*x[1]**o + ((-0.828832697925-0.588629856358j))*x[1] + ((0.645313814048+0.262351103231j))*x[2]**o + ((-0.662358503584+0.578942726336j))*x[2]
            ref[(0, 3, 1)]=(0.209211255523+0.822611549053j)*(1+2.*(dim-1)/(o+1.)) + ((-0.862080233998-0.928701740916j))*dim
            arg[(0, 3, 2)]=(-0.126328550786+0.915926266026j)*x[0]**o + ((-0.352578435823-0.61987710688j))*x[0] + ((-0.78153618836+0.50281505847j))*x[1]**o + ((-0.538241856756+0.910024033506j))*x[1] + ((-0.354906750274+0.355987286153j))*x[2]**o + ((0.0763783205311+0.156978342145j))*x[2]
            ref[(0, 3, 2)]=(-1.26277148942+1.77472861065j)*(1+2.*(dim-1)/(o+1.)) + ((-0.814441972048+0.447125268771j))*dim
            arg[(1, 0, 0)]=(0.0948384335522-0.357552459781j)*x[0]**o + ((-0.399419839837-0.443485228346j))*x[0] + ((-0.701377325988-0.837079739539j))*x[1]**o + ((-0.75811582873-0.0775371087613j))*x[1] + ((-0.856762417072+0.525316182006j))*x[2]**o + ((0.731418523103+0.0109387496671j))*x[2]
            ref[(1, 0, 0)]=(-1.46330130951-0.669316017314j)*(1+2.*(dim-1)/(o+1.)) + ((-0.426117145464-0.51008358744j))*dim
            arg[(1, 0, 1)]=(-0.317867262102+0.142607627884j)*x[0]**o + ((0.435053634382+0.124444976588j))*x[0] + ((0.514517276665-0.962232278158j))*x[1]**o + ((0.758663838472-0.76785067789j))*x[1] + ((0.712778444694+0.221116394046j))*x[2]**o + ((0.653715571652-0.692978270332j))*x[2]
            ref[(1, 0, 1)]=(0.909428459258-0.598508256228j)*(1+2.*(dim-1)/(o+1.)) + ((1.84743304451-1.33638397163j))*dim
            arg[(1, 0, 2)]=(0.954842862473-0.40298469627j)*x[0]**o + ((-0.118237959571-0.336837444629j))*x[0] + ((0.169805044332+0.194994766867j))*x[1]**o + ((-0.544065173566+0.697694770064j))*x[1] + ((-0.351472439835+0.963274007033j))*x[2]**o + ((-0.3472028866+0.472911596047j))*x[2]
            ref[(1, 0, 2)]=(0.77317546697+0.75528407763j)*(1+2.*(dim-1)/(o+1.)) + ((-1.00950601974+0.833768921482j))*dim
            arg[(1, 1, 0)]=(0.640018657057+0.645101647171j)*x[0]**o + ((0.591061756726+0.31620553588j))*x[0] + ((0.0975782400543+0.637525352776j))*x[1]**o + ((0.874270331748+0.780788052923j))*x[1] + ((-0.0496768101814-0.158218904811j))*x[2]**o + ((-0.214478591244+0.201372753833j))*x[2]
            ref[(1, 1, 0)]=(0.68792008693+1.12440809514j)*(1+2.*(dim-1)/(o+1.)) + ((1.25085349723+1.29836634264j))*dim
            arg[(1, 1, 1)]=(-0.128767076207-0.67529750371j)*x[0]**o + ((0.0876541899961-0.0742182975664j))*x[0] + ((-0.753273676267+0.744601198721j))*x[1]**o + ((-0.238531015823+0.232183831179j))*x[1] + ((0.0349502763246+0.540302586977j))*x[2]**o + ((-0.748968623807+0.386230711107j))*x[2]
            ref[(1, 1, 1)]=(-0.847090476149+0.609606281988j)*(1+2.*(dim-1)/(o+1.)) + ((-0.899845449634+0.544196244719j))*dim
            arg[(1, 1, 2)]=(0.658892200417-0.317610981974j)*x[0]**o + ((-0.939833523903+0.351815807959j))*x[0] + ((0.643649901624+0.0851242048236j))*x[1]**o + ((-0.949961953558-0.137059014197j))*x[1] + ((-0.46794235311+0.322402097137j))*x[2]**o + ((0.899798721409-0.192544844089j))*x[2]
            ref[(1, 1, 2)]=(0.834599748931+0.0899153199868j)*(1+2.*(dim-1)/(o+1.)) + ((-0.989996756052+0.0222119496729j))*dim
            arg[(1, 2, 0)]=(-0.481727155733+0.548457482738j)*x[0]**o + ((0.278801908198+0.955140446594j))*x[0] + ((0.316934832125+0.545261440455j))*x[1]**o + ((0.879916045892+0.322082265397j))*x[1] + ((0.600022156714-0.327844253706j))*x[2]**o + ((0.167359143534-0.921661639902j))*x[2]
            ref[(1, 2, 0)]=(0.435229833106+0.765874669487j)*(1+2.*(dim-1)/(o+1.)) + ((1.32607709762+0.35556107209j))*dim
            arg[(1, 2, 1)]=(-0.747973598208+0.554736236611j)*x[0]**o + ((0.773294262398-0.347544135456j))*x[0] + ((0.914199009915-0.301445663703j))*x[1]**o + ((-0.817401859929+0.391597278935j))*x[1] + ((0.52912497113-0.219015960093j))*x[2]**o + ((0.224707915478+0.0454862925455j))*x[2]
            ref[(1, 2, 1)]=(0.695350382837+0.0342746128154j)*(1+2.*(dim-1)/(o+1.)) + ((0.180600317947+0.0895394360241j))*dim
            arg[(1, 2, 2)]=(-0.134831204309+0.282991474177j)*x[0]**o + ((-0.878925238301+0.980492173855j))*x[0] + ((-0.161822910345-0.735471854782j))*x[1]**o + ((0.375793811496-0.839600324486j))*x[1] + ((-0.293889490558-0.278596333243j))*x[2]**o + ((0.192259478538+0.239965193057j))*x[2]
            ref[(1, 2, 2)]=(-0.590543605212-0.731076713849j)*(1+2.*(dim-1)/(o+1.)) + ((-0.310871948267+0.380857042425j))*dim
            arg[(1, 3, 0)]=(-0.107809299738+0.384250901764j)*x[0]**o + ((0.468882549044+0.0154766474759j))*x[0] + ((-0.542717528289+0.640012256612j))*x[1]**o + ((-0.28392841917-0.165066525911j))*x[1] + ((0.676425425731+0.00710707703592j))*x[2]**o + ((-0.27827044158+0.400096028915j))*x[2]
            ref[(1, 3, 0)]=(0.0258985977045+1.03137023541j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0933163117055+0.25050615048j))*dim
            arg[(1, 3, 1)]=(-0.309772509719+0.894765772225j)*x[0]**o + ((0.321313473729-0.497616668227j))*x[0] + ((0.976285077104+0.363645906149j))*x[1]**o + ((0.00380525357468+0.702683621735j))*x[1] + ((0.110261570805+0.972850943431j))*x[2]**o + ((-0.921270392204-0.407844766078j))*x[2]
            ref[(1, 3, 1)]=(0.77677413819+2.2312626218j)*(1+2.*(dim-1)/(o+1.)) + ((-0.596151664901-0.202777812569j))*dim
            arg[(1, 3, 2)]=(-0.0182480871252-0.0977730286766j)*x[0]**o + ((0.733059913833+0.461043076181j))*x[0] + ((0.942084647842-0.596894847587j))*x[1]**o + ((0.401474040665+0.12644445495j))*x[1] + ((-0.858314124894-0.469930866696j))*x[2]**o + ((-0.688369043929+0.408442569905j))*x[2]
            ref[(1, 3, 2)]=(0.0655224358224-1.16459874296j)*(1+2.*(dim-1)/(o+1.)) + ((0.446164910569+0.995930101035j))*dim
            arg[(2, 0, 0)]=(-0.933294620946-0.906174163024j)*x[0]**o + ((-0.812214999014-0.15738752833j))*x[0] + ((-0.784187623612+0.649511430319j))*x[1]**o + ((-0.233977068293-0.783591228468j))*x[1] + ((-0.390199148171-0.187760872435j))*x[2]**o + ((-0.902554865968+0.133084020098j))*x[2]
            ref[(2, 0, 0)]=(-2.10768139273-0.444423605141j)*(1+2.*(dim-1)/(o+1.)) + ((-1.94874693327-0.8078947367j))*dim
            arg[(2, 0, 1)]=(-0.847356240998+0.0803345161349j)*x[0]**o + ((0.77818480305-0.727061179336j))*x[0] + ((-0.954028846708+0.29855789379j))*x[1]**o + ((-0.733454614979+0.565067781613j))*x[1] + ((-0.431958594855-0.112158920232j))*x[2]**o + ((-0.213975953554-0.425045432089j))*x[2]
            ref[(2, 0, 1)]=(-2.23334368256+0.266733489693j)*(1+2.*(dim-1)/(o+1.)) + ((-0.169245765483-0.587038829812j))*dim
            arg[(2, 0, 2)]=(-0.69563936736-0.364629643389j)*x[0]**o + ((-0.78578971034+0.382834607669j))*x[0] + ((-0.879424617879+0.683540410091j))*x[1]**o + ((0.38633309571+0.34637530906j))*x[1] + ((0.336247937139+0.489871275726j))*x[2]**o + ((-0.592070862923+0.438474969246j))*x[2]
            ref[(2, 0, 2)]=(-1.2388160481+0.808782042428j)*(1+2.*(dim-1)/(o+1.)) + ((-0.991527477554+1.16768488598j))*dim
            arg[(2, 1, 0)]=(0.560454595309+0.136724517346j)*x[0]**o + ((0.571618555187-0.794662317725j))*x[0] + ((-0.231329090502-0.202168490979j))*x[1]**o + ((-0.593841937131-0.589368715043j))*x[1] + ((-0.959433197337+0.565784980417j))*x[2]**o + ((-0.29300492444+0.72352581681j))*x[2]
            ref[(2, 1, 0)]=(-0.630307692529+0.500341006784j)*(1+2.*(dim-1)/(o+1.)) + ((-0.315228306384-0.660505215958j))*dim
            arg[(2, 1, 1)]=(-0.978905401166+0.215609233616j)*x[0]**o + ((-0.886584825278+0.795555952988j))*x[0] + ((0.671537445115+0.631726647603j))*x[1]**o + ((0.802597600433+0.971006135102j))*x[1] + ((0.551046350299-0.274395740608j))*x[2]**o + ((0.331828481341-0.365128387658j))*x[2]
            ref[(2, 1, 1)]=(0.243678394248+0.57294014061j)*(1+2.*(dim-1)/(o+1.)) + ((0.247841256496+1.40143370043j))*dim
            arg[(2, 1, 2)]=(0.0361739068396+0.100314239811j)*x[0]**o + ((-0.744669768578-0.578639702826j))*x[0] + ((-0.120637095001+0.729550384085j))*x[1]**o + ((0.568805439486-0.299205970674j))*x[1] + ((-0.846331857716-0.885581980174j))*x[2]**o + ((0.596702706921-0.384635444531j))*x[2]
            ref[(2, 1, 2)]=(-0.930795045878-0.0557173562781j)*(1+2.*(dim-1)/(o+1.)) + ((0.420838377829-1.26248111803j))*dim
            arg[(2, 2, 0)]=(-0.38197589789-0.560237319976j)*x[0]**o + ((-0.788052533787-0.0305235322669j))*x[0] + ((-0.080100719433-0.102176414543j))*x[1]**o + ((0.685370435943-0.554255917815j))*x[1] + ((-0.0572012454832-0.25963408599j))*x[2]**o + ((-0.14208982066-0.158257056278j))*x[2]
            ref[(2, 2, 0)]=(-0.519277862806-0.922047820509j)*(1+2.*(dim-1)/(o+1.)) + ((-0.244771918505-0.743036506361j))*dim
            arg[(2, 2, 1)]=(-0.337185820004-0.0970280167512j)*x[0]**o + ((-0.978084560828+0.769098604693j))*x[0] + ((0.306998091425+0.0664823013778j))*x[1]**o + ((-0.206063462696+0.18654063225j))*x[1] + ((-0.487233079353-0.0697508130196j))*x[2]**o + ((0.853208098322+0.673222468615j))*x[2]
            ref[(2, 2, 1)]=(-0.517420807932-0.100296528393j)*(1+2.*(dim-1)/(o+1.)) + ((-0.330939925201+1.62886170556j))*dim
            arg[(2, 2, 2)]=(-0.0862984173912-0.421885767458j)*x[0]**o + ((0.973654617608+0.594940973571j))*x[0] + ((-0.620285602843-0.192017526948j))*x[1]**o + ((0.645585522433+0.401734411207j))*x[1] + ((0.00813186851583+0.249043791731j))*x[2]**o + ((0.123567647007+0.690151160583j))*x[2]
            ref[(2, 2, 2)]=(-0.698452151719-0.364859502674j)*(1+2.*(dim-1)/(o+1.)) + ((1.74280778705+1.68682654536j))*dim
            arg[(2, 3, 0)]=(-0.627745045905-0.00721547676493j)*x[0]**o + ((0.762295678171+0.961348843262j))*x[0] + ((-0.616399294199+0.453608796687j))*x[1]**o + ((-0.281186891153+0.0998368950383j))*x[1] + ((0.194833837267+0.644587678225j))*x[2]**o + ((-0.248961571827-0.0957052799659j))*x[2]
            ref[(2, 3, 0)]=(-1.04931050284+1.09098099815j)*(1+2.*(dim-1)/(o+1.)) + ((0.23214721519+0.965480458335j))*dim
            arg[(2, 3, 1)]=(-0.821476168165-0.430233591393j)*x[0]**o + ((-0.491085314892-0.370189833777j))*x[0] + ((0.875423884224+0.792798941884j))*x[1]**o + ((0.144582859441-0.99274040882j))*x[1] + ((-0.766622155728+0.867960870029j))*x[2]**o + ((-0.0720302998521+0.28775220397j))*x[2]
            ref[(2, 3, 1)]=(-0.712674439669+1.23052622052j)*(1+2.*(dim-1)/(o+1.)) + ((-0.418532755302-1.07517803863j))*dim
            arg[(2, 3, 2)]=(-0.245312078056+0.593553975111j)*x[0]**o + ((0.267109390096+0.189860821917j))*x[0] + ((-0.753035017835-0.752952241262j))*x[1]**o + ((-0.0452691384354-0.445563327292j))*x[1] + ((-0.296376257726-0.643073789118j))*x[2]**o + ((-0.279277126421+0.492530123371j))*x[2]
            ref[(2, 3, 2)]=(-1.29472335362-0.802472055268j)*(1+2.*(dim-1)/(o+1.)) + ((-0.05743687476+0.236827617995j))*dim
            arg[(3, 0, 0)]=(-0.0241254432206+0.688106386918j)*x[0]**o + ((-0.722760754087-0.197778387052j))*x[0] + ((-0.140116654564+0.680890190588j))*x[1]**o + ((0.214598750266+0.649158357018j))*x[1] + ((-0.442007967501+0.409284494974j))*x[2]**o + ((0.0665357668607+0.626119328628j))*x[2]
            ref[(3, 0, 0)]=(-0.606250065285+1.77828107248j)*(1+2.*(dim-1)/(o+1.)) + ((-0.44162623696+1.07749929859j))*dim
            arg[(3, 0, 1)]=(-0.465270677232-0.211319038039j)*x[0]**o + ((-0.88163849338-0.603084638145j))*x[0] + ((0.776934614184-0.331776225957j))*x[1]**o + ((0.975604071337+0.638655061202j))*x[1] + ((0.440341345107-0.516893212998j))*x[2]**o + ((-0.0456905609986-0.465068065467j))*x[2]
            ref[(3, 0, 1)]=(0.75200528206-1.059988477j)*(1+2.*(dim-1)/(o+1.)) + ((0.0482750169582-0.42949764241j))*dim
            arg[(3, 0, 2)]=(-0.238023398521-0.346259151283j)*x[0]**o + ((0.990275139521+0.703211735404j))*x[0] + ((-0.594424870864+0.980309270087j))*x[1]**o + ((0.945046951854-0.888752975843j))*x[1] + ((0.919122256893+0.0546039428799j))*x[2]**o + ((0.46060756524-0.777745578419j))*x[2]
            ref[(3, 0, 2)]=(0.0866739875084+0.688654061683j)*(1+2.*(dim-1)/(o+1.)) + ((2.39592965661-0.963286818858j))*dim
            arg[(3, 1, 0)]=(0.513780741885+0.887373483258j)*x[0]**o + ((0.0472454990289-0.974055510038j))*x[0] + ((-0.314195462694+0.249060823164j))*x[1]**o + ((0.462522600891-0.33816351464j))*x[1] + ((0.0772903177842-0.477759892204j))*x[2]**o + ((0.26226206808+0.592109714656j))*x[2]
            ref[(3, 1, 0)]=(0.276875596975+0.658674414219j)*(1+2.*(dim-1)/(o+1.)) + ((0.772030168-0.720109310022j))*dim
            arg[(3, 1, 1)]=(0.213030220579-0.910727327026j)*x[0]**o + ((-0.330592990974-0.545201309695j))*x[0] + ((-0.867259720961-0.709854477595j))*x[1]**o + ((0.04079073342-0.817802511194j))*x[1] + ((-0.0725250598276+0.708338683459j))*x[2]**o + ((-0.31462807447+0.0404727742493j))*x[2]
            ref[(3, 1, 1)]=(-0.72675456021-0.912243121162j)*(1+2.*(dim-1)/(o+1.)) + ((-0.604430332024-1.32253104664j))*dim
            arg[(3, 1, 2)]=(0.851274780231+0.186215121762j)*x[0]**o + ((0.826801373241+0.861948188667j))*x[0] + ((-0.171800791175-0.634706143093j))*x[1]**o + ((-0.34119519902+0.352775723979j))*x[1] + ((0.0389335222379-0.530145911895j))*x[2]**o + ((0.409161670086-0.808177716353j))*x[2]
            ref[(3, 1, 2)]=(0.718407511294-0.978636933226j)*(1+2.*(dim-1)/(o+1.)) + ((0.894767844307+0.406546196293j))*dim
            arg[(3, 2, 0)]=(-0.510454684483-0.734565856603j)*x[0]**o + ((-0.4219177824-0.402230523306j))*x[0] + ((-0.482470320516+0.162018223899j))*x[1]**o + ((-0.694548766986-0.749926158102j))*x[1] + ((-0.0395589933284+0.40922930146j))*x[2]**o + ((0.849984076351-0.324316985447j))*x[2]
            ref[(3, 2, 0)]=(-1.03248399833-0.163318331244j)*(1+2.*(dim-1)/(o+1.)) + ((-0.266482473035-1.47647366686j))*dim
            arg[(3, 2, 1)]=(0.937321380411-0.333059165868j)*x[0]**o + ((0.833311280961+0.55291905518j))*x[0] + ((0.89044809914+0.413655280227j))*x[1]**o + ((-0.881090469399-0.69080568479j))*x[1] + ((0.0743849623449-0.724952884051j))*x[2]**o + ((0.452338942789+0.754735207683j))*x[2]
            ref[(3, 2, 1)]=(1.9021544419-0.644356769692j)*(1+2.*(dim-1)/(o+1.)) + ((0.404559754352+0.616848578073j))*dim
            arg[(3, 2, 2)]=(-0.855477909376+0.335927035187j)*x[0]**o + ((-0.275884270324-0.533291179569j))*x[0] + ((-0.856803945708+0.467233673305j))*x[1]**o + ((-0.845852714122+0.0236681413819j))*x[1] + ((0.004001344389+0.627005928353j))*x[2]**o + ((0.585950062653-0.339895882371j))*x[2]
            ref[(3, 2, 2)]=(-1.70828051069+1.43016663685j)*(1+2.*(dim-1)/(o+1.)) + ((-0.535786921793-0.849518920558j))*dim
            arg[(3, 3, 0)]=(0.298147775758+0.79942221579j)*x[0]**o + ((0.937925489499+0.683321703348j))*x[0] + ((-0.482359196281-0.709030743897j))*x[1]**o + ((-0.141713802569-0.805328909415j))*x[1] + ((-0.686370632229+0.332865200651j))*x[2]**o + ((0.76559725667+0.177116043174j))*x[2]
            ref[(3, 3, 0)]=(-0.870582052752+0.423256672544j)*(1+2.*(dim-1)/(o+1.)) + ((1.5618089436+0.0551088371073j))*dim
            arg[(3, 3, 1)]=(0.560255564426+0.77984608872j)*x[0]**o + ((0.827020432263+0.185010724606j))*x[0] + ((0.722292248261+0.122230439739j))*x[1]**o + ((0.0692847979569+0.82960093361j))*x[1] + ((0.234856834383-0.485639198229j))*x[2]**o + ((0.0819457273342-0.00374079504334j))*x[2]
            ref[(3, 3, 1)]=(1.51740464707+0.416437330231j)*(1+2.*(dim-1)/(o+1.)) + ((0.978250957554+1.01087086317j))*dim
            arg[(3, 3, 2)]=(-0.512040190606-0.886597452687j)*x[0]**o + ((0.552558594536+0.441346350112j))*x[0] + ((0.899090917494+0.919536212754j))*x[1]**o + ((0.31186822299-0.755856016964j))*x[1] + ((-0.0653072248025+0.305383702006j))*x[2]**o + ((0.763428672405-0.18191566562j))*x[2]
            ref[(3, 3, 2)]=(0.321743502086+0.338322462072j)*(1+2.*(dim-1)/(o+1.)) + ((1.62785548993-0.496425332473j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3, 4),w)
        ref=numpy.zeros((2, 4, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.736688000117-0.579482819206j)*x[0]**o + ((-0.905024768493+0.438196538173j))*x[0] + ((0.602239546664+0.013673457225j))*x[1]**o + ((0.859013740163-0.510143427932j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.134448453453-0.565809361981j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0460110283304-0.0719468897591j))*dim
            arg[(0, 0, 0, 1)]=(-0.838893921741+0.46026582278j)*x[0]**o + ((0.993709502339+0.462152056336j))*x[0] + ((0.230973933636+0.0181352875221j))*x[1]**o + ((0.095116340062-0.614348803638j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.607919988105+0.478401110302j)*(1+2.*(dim-1)/(o+1.)) + ((1.0888258424-0.152196747302j))*dim
            arg[(0, 0, 0, 2)]=(0.382458873479-0.509891102983j)*x[0]**o + ((0.468551858928+0.494588095364j))*x[0] + ((0.420469024456+0.652522441584j))*x[1]**o + ((0.519888663751-0.300097981198j))*x[1]
            ref[(0, 0, 0, 2)]=(0.802927897935+0.142631338601j)*(1+2.*(dim-1)/(o+1.)) + ((0.988440522679+0.194490114166j))*dim
            arg[(0, 0, 0, 3)]=(-0.0551340007259-0.629178644153j)*x[0]**o + ((-0.747303111834-0.981308630607j))*x[0] + ((0.885960692334+0.664119604634j))*x[1]**o + ((0.0317725832479-0.715760893849j))*x[1]
            ref[(0, 0, 0, 3)]=(0.830826691608+0.0349409604805j)*(1+2.*(dim-1)/(o+1.)) + ((-0.715530528586-1.69706952446j))*dim
            arg[(0, 0, 1, 0)]=(0.512466209069+0.708132305166j)*x[0]**o + ((-0.252182267306-0.798801453027j))*x[0] + ((-0.220212275372-0.0652894847659j))*x[1]**o + ((-0.709615239291+0.544281870559j))*x[1]
            ref[(0, 0, 1, 0)]=(0.292253933697+0.6428428204j)*(1+2.*(dim-1)/(o+1.)) + ((-0.961797506597-0.254519582468j))*dim
            arg[(0, 0, 1, 1)]=(-0.834620803036-0.657702222073j)*x[0]**o + ((-0.931781105192+0.807416074388j))*x[0] + ((-0.0220252925127+0.606724579655j))*x[1]**o + ((0.578309815945-0.941665156851j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.856646095549-0.0509776424173j)*(1+2.*(dim-1)/(o+1.)) + ((-0.353471289248-0.134249082463j))*dim
            arg[(0, 0, 1, 2)]=(0.984214091458-0.174345775657j)*x[0]**o + ((0.336518728355+0.832440344152j))*x[0] + ((0.889877440465+0.0714151783676j))*x[1]**o + ((0.869007306651+0.740441155114j))*x[1]
            ref[(0, 0, 1, 2)]=(1.87409153192-0.102930597289j)*(1+2.*(dim-1)/(o+1.)) + ((1.20552603501+1.57288149927j))*dim
            arg[(0, 0, 1, 3)]=(-0.529809744367-0.559720266663j)*x[0]**o + ((-0.458610828992-0.00362915141365j))*x[0] + ((-0.183277226398-0.0512686078193j))*x[1]**o + ((-0.293545059139-0.034137327459j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.713086970765-0.610988874482j)*(1+2.*(dim-1)/(o+1.)) + ((-0.752155888131-0.0377664788726j))*dim
            arg[(0, 0, 2, 0)]=(0.793860055506+0.364130936494j)*x[0]**o + ((0.913856475542-0.212145943335j))*x[0] + ((-0.783673766511+0.235500462321j))*x[1]**o + ((0.583548353713+0.917471673303j))*x[1]
            ref[(0, 0, 2, 0)]=(0.0101862889948+0.599631398815j)*(1+2.*(dim-1)/(o+1.)) + ((1.49740482925+0.705325729968j))*dim
            arg[(0, 0, 2, 1)]=(-0.539220793332-0.616703741018j)*x[0]**o + ((0.522254675697-0.890575000088j))*x[0] + ((0.0506388023966+0.976196118736j))*x[1]**o + ((0.699919740337-0.885400943551j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.488581990935+0.359492377718j)*(1+2.*(dim-1)/(o+1.)) + ((1.22217441603-1.77597594364j))*dim
            arg[(0, 0, 2, 2)]=(-0.376171004424-0.319656123868j)*x[0]**o + ((0.677225769303+0.506935911935j))*x[0] + ((0.0493093679358+0.860359244361j))*x[1]**o + ((0.855058047249+0.788997164236j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.326861636488+0.540703120493j)*(1+2.*(dim-1)/(o+1.)) + ((1.53228381655+1.29593307617j))*dim
            arg[(0, 0, 2, 3)]=(-0.674450169266+0.180804628132j)*x[0]**o + ((-0.329332807717-0.639287292238j))*x[0] + ((-0.0544895268866+0.0348801865729j))*x[1]**o + ((-0.927326981681+0.995588667991j))*x[1]
            ref[(0, 0, 2, 3)]=(-0.728939696152+0.215684814704j)*(1+2.*(dim-1)/(o+1.)) + ((-1.2566597894+0.356301375753j))*dim
            arg[(0, 1, 0, 0)]=(0.0993064359753-0.203438681918j)*x[0]**o + ((-0.326575478564+0.237642542683j))*x[0] + ((-0.0948348152365+0.691649388287j))*x[1]**o + ((0.682677173953-0.266722970232j))*x[1]
            ref[(0, 1, 0, 0)]=(0.00447162073886+0.488210706369j)*(1+2.*(dim-1)/(o+1.)) + ((0.356101695389-0.0290804275495j))*dim
            arg[(0, 1, 0, 1)]=(-0.26661368418-0.559795469483j)*x[0]**o + ((-0.25846784391+0.00324584601723j))*x[0] + ((-0.190912455011+0.693588803757j))*x[1]**o + ((-0.170410148794-0.625007312711j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.457526139191+0.133793334274j)*(1+2.*(dim-1)/(o+1.)) + ((-0.428877992704-0.621761466694j))*dim
            arg[(0, 1, 0, 2)]=(-0.0273740528159-0.193908443758j)*x[0]**o + ((-0.308706194487+0.630868110547j))*x[0] + ((0.557692177199-0.00608709016041j))*x[1]**o + ((-0.535081839276-0.700317192058j))*x[1]
            ref[(0, 1, 0, 2)]=(0.530318124383-0.199995533918j)*(1+2.*(dim-1)/(o+1.)) + ((-0.843788033763-0.0694490815117j))*dim
            arg[(0, 1, 0, 3)]=(0.586161803878+0.935844937629j)*x[0]**o + ((-0.403647829828-0.366538558335j))*x[0] + ((0.0648158089573-0.77498678382j))*x[1]**o + ((-0.814885162841-0.645242634989j))*x[1]
            ref[(0, 1, 0, 3)]=(0.650977612836+0.160858153809j)*(1+2.*(dim-1)/(o+1.)) + ((-1.21853299267-1.01178119332j))*dim
            arg[(0, 1, 1, 0)]=(0.338353834366+0.952153892516j)*x[0]**o + ((0.488586527959+0.185326364267j))*x[0] + ((-0.541975861525-0.121998197045j))*x[1]**o + ((-0.386674607201-0.686565627746j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.203622027159+0.830155695471j)*(1+2.*(dim-1)/(o+1.)) + ((0.101911920758-0.501239263479j))*dim
            arg[(0, 1, 1, 1)]=(-0.724657437673-0.0131990191814j)*x[0]**o + ((0.0190186439348+0.62677042091j))*x[0] + ((-0.987435222773+0.984657405048j))*x[1]**o + ((-0.638133498806-0.529164573914j))*x[1]
            ref[(0, 1, 1, 1)]=(-1.71209266045+0.971458385866j)*(1+2.*(dim-1)/(o+1.)) + ((-0.619114854871+0.0976058469961j))*dim
            arg[(0, 1, 1, 2)]=(-0.00215331913248+0.763160426227j)*x[0]**o + ((0.33020721643-0.995845420992j))*x[0] + ((0.592998051721+0.76683986865j))*x[1]**o + ((-0.636862226978+0.373715820739j))*x[1]
            ref[(0, 1, 1, 2)]=(0.590844732588+1.53000029488j)*(1+2.*(dim-1)/(o+1.)) + ((-0.306655010548-0.622129600253j))*dim
            arg[(0, 1, 1, 3)]=(0.30766842751+0.929282559972j)*x[0]**o + ((0.646694277786+0.464015397369j))*x[0] + ((-0.998251995129+0.374292217842j))*x[1]**o + ((-0.384343957284+0.540221581141j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.690583567619+1.30357477781j)*(1+2.*(dim-1)/(o+1.)) + ((0.262350320502+1.00423697851j))*dim
            arg[(0, 1, 2, 0)]=(-0.594341917499-0.601321509107j)*x[0]**o + ((-0.565627402885-0.211828446178j))*x[0] + ((0.306992102999+0.138499427271j))*x[1]**o + ((-0.792425514642+0.911733752886j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.2873498145-0.462822081836j)*(1+2.*(dim-1)/(o+1.)) + ((-1.35805291753+0.699905306708j))*dim
            arg[(0, 1, 2, 1)]=(-0.571513995364+0.770591295464j)*x[0]**o + ((-0.564292805114-0.997462934593j))*x[0] + ((0.00304906989875-0.894935866549j))*x[1]**o + ((0.376533927393+0.264024803673j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.568464925465-0.124344571085j)*(1+2.*(dim-1)/(o+1.)) + ((-0.187758877722-0.73343813092j))*dim
            arg[(0, 1, 2, 2)]=(0.515364773038+0.099724289883j)*x[0]**o + ((-0.133769081453-0.191532343559j))*x[0] + ((0.0116965567333-0.948123244441j))*x[1]**o + ((-0.187969622202-0.84063107771j))*x[1]
            ref[(0, 1, 2, 2)]=(0.527061329771-0.848398954558j)*(1+2.*(dim-1)/(o+1.)) + ((-0.321738703655-1.03216342127j))*dim
            arg[(0, 1, 2, 3)]=(-0.123294176296-0.188692155887j)*x[0]**o + ((-0.886241776997+0.73714532343j))*x[0] + ((0.485576616857+0.0687286112086j))*x[1]**o + ((0.570692657205+0.229620180491j))*x[1]
            ref[(0, 1, 2, 3)]=(0.362282440561-0.119963544678j)*(1+2.*(dim-1)/(o+1.)) + ((-0.315549119792+0.966765503921j))*dim
            arg[(0, 2, 0, 0)]=(-0.0395650800556+0.475509282821j)*x[0]**o + ((0.451134688911+0.778299239654j))*x[0] + ((-0.0296687796076+0.460117333879j))*x[1]**o + ((0.852530630521-0.00553877655007j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.0692338596632+0.9356266167j)*(1+2.*(dim-1)/(o+1.)) + ((1.30366531943+0.772760463104j))*dim
            arg[(0, 2, 0, 1)]=(0.550521939525-0.547843000186j)*x[0]**o + ((-0.461601433752+0.288364501297j))*x[0] + ((-0.53121302637-0.00683553572217j))*x[1]**o + ((0.43403902534+0.657038593173j))*x[1]
            ref[(0, 2, 0, 1)]=(0.0193089131552-0.554678535908j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0275624084115+0.945403094469j))*dim
            arg[(0, 2, 0, 2)]=(-0.201372943707+0.363832917102j)*x[0]**o + ((-0.36084132809-0.390291414744j))*x[0] + ((-0.501507448779+0.338593782474j))*x[1]**o + ((-0.946852047433+0.348968036338j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.702880392487+0.702426699576j)*(1+2.*(dim-1)/(o+1.)) + ((-1.30769337552-0.0413233784063j))*dim
            arg[(0, 2, 0, 3)]=(-0.382703444115-0.278931354645j)*x[0]**o + ((-0.802283022462+0.909624814704j))*x[0] + ((-0.825767441329+0.184185645527j))*x[1]**o + ((0.748361299912-0.0161057535661j))*x[1]
            ref[(0, 2, 0, 3)]=(-1.20847088544-0.0947457091185j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0539217225494+0.893519061138j))*dim
            arg[(0, 2, 1, 0)]=(-0.229659472755-0.523127250484j)*x[0]**o + ((0.849219590075+0.540596292248j))*x[0] + ((-0.567472571835+0.700044602765j))*x[1]**o + ((-0.382528680462-0.61350828138j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.79713204459+0.176917352281j)*(1+2.*(dim-1)/(o+1.)) + ((0.466690909612-0.0729119891312j))*dim
            arg[(0, 2, 1, 1)]=(0.524216669519+0.661975430823j)*x[0]**o + ((-0.998672892337+0.775523971771j))*x[0] + ((0.431934044388-0.209512208599j))*x[1]**o + ((-0.566385875075+0.491978519371j))*x[1]
            ref[(0, 2, 1, 1)]=(0.956150713908+0.452463222223j)*(1+2.*(dim-1)/(o+1.)) + ((-1.56505876741+1.26750249114j))*dim
            arg[(0, 2, 1, 2)]=(-0.29779827055+0.732228917237j)*x[0]**o + ((0.986679071778+0.914777283667j))*x[0] + ((0.529776685357+0.965862407822j))*x[1]**o + ((-0.727339294742+0.916000702678j))*x[1]
            ref[(0, 2, 1, 2)]=(0.231978414807+1.69809132506j)*(1+2.*(dim-1)/(o+1.)) + ((0.259339777036+1.83077798634j))*dim
            arg[(0, 2, 1, 3)]=(-0.188038197304-0.662331288997j)*x[0]**o + ((-0.871399240102-0.0316282906226j))*x[0] + ((0.247968379789-0.269349963001j))*x[1]**o + ((-0.973683984943+0.305783145495j))*x[1]
            ref[(0, 2, 1, 3)]=(0.0599301824843-0.931681251998j)*(1+2.*(dim-1)/(o+1.)) + ((-1.84508322505+0.274154854873j))*dim
            arg[(0, 2, 2, 0)]=(-0.532724253173+0.0680824336052j)*x[0]**o + ((0.175695228116+0.957340094386j))*x[0] + ((0.108786878361-0.804442898018j))*x[1]**o + ((-0.159566995683-0.283268393724j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.423937374811-0.736360464413j)*(1+2.*(dim-1)/(o+1.)) + ((0.0161282324331+0.674071700662j))*dim
            arg[(0, 2, 2, 1)]=(0.389652548143-0.760452155968j)*x[0]**o + ((-0.457334078875-0.858091333098j))*x[0] + ((0.320238815724-0.366038828936j))*x[1]**o + ((0.248467049583+0.870954173889j))*x[1]
            ref[(0, 2, 2, 1)]=(0.709891363867-1.1264909849j)*(1+2.*(dim-1)/(o+1.)) + ((-0.208867029291+0.012862840791j))*dim
            arg[(0, 2, 2, 2)]=(0.944618295053+0.288416101685j)*x[0]**o + ((0.210275583282+0.46304178347j))*x[0] + ((0.565787977009+0.0305966667068j))*x[1]**o + ((-0.724482733715+0.304048140196j))*x[1]
            ref[(0, 2, 2, 2)]=(1.51040627206+0.319012768391j)*(1+2.*(dim-1)/(o+1.)) + ((-0.514207150432+0.767089923666j))*dim
            arg[(0, 2, 2, 3)]=(-0.0903666183752+0.328038885952j)*x[0]**o + ((-0.0311590474936+0.240142795354j))*x[0] + ((-0.0888867298648-0.188319885046j))*x[1]**o + ((0.666298298414+0.950018220157j))*x[1]
            ref[(0, 2, 2, 3)]=(-0.17925334824+0.139719000906j)*(1+2.*(dim-1)/(o+1.)) + ((0.63513925092+1.19016101551j))*dim
            arg[(0, 3, 0, 0)]=(-0.952229045423-0.700728810125j)*x[0]**o + ((-0.329559160983-0.797540887273j))*x[0] + ((0.754347249598+0.785814224545j))*x[1]**o + ((-0.363756088906-0.0957849104977j))*x[1]
            ref[(0, 3, 0, 0)]=(-0.197881795825+0.0850854144196j)*(1+2.*(dim-1)/(o+1.)) + ((-0.693315249889-0.893325797771j))*dim
            arg[(0, 3, 0, 1)]=(0.319920010181-0.848668732618j)*x[0]**o + ((0.815060586676+0.72472335654j))*x[0] + ((0.615219767261+0.127590419155j))*x[1]**o + ((0.263688082633+0.98935970812j))*x[1]
            ref[(0, 3, 0, 1)]=(0.935139777443-0.721078313463j)*(1+2.*(dim-1)/(o+1.)) + ((1.07874866931+1.71408306466j))*dim
            arg[(0, 3, 0, 2)]=(0.406627299752+0.976526491841j)*x[0]**o + ((-0.281625564247-0.866038138125j))*x[0] + ((-0.599444497907-0.707150946547j))*x[1]**o + ((0.137934076831-0.336203189647j))*x[1]
            ref[(0, 3, 0, 2)]=(-0.192817198156+0.269375545294j)*(1+2.*(dim-1)/(o+1.)) + ((-0.143691487415-1.20224132777j))*dim
            arg[(0, 3, 0, 3)]=(0.112197080809+0.708629616712j)*x[0]**o + ((0.353672666469-0.760678409063j))*x[0] + ((-0.974665874845-0.661633885943j))*x[1]**o + ((0.777969644207-0.203860062076j))*x[1]
            ref[(0, 3, 0, 3)]=(-0.862468794036+0.0469957307689j)*(1+2.*(dim-1)/(o+1.)) + ((1.13164231068-0.964538471139j))*dim
            arg[(0, 3, 1, 0)]=(-0.75589396701-0.989504018015j)*x[0]**o + ((-0.296279646596+0.396356802455j))*x[0] + ((0.900832562453+0.65820604857j))*x[1]**o + ((0.320437159031+0.0449041104478j))*x[1]
            ref[(0, 3, 1, 0)]=(0.144938595443-0.331297969445j)*(1+2.*(dim-1)/(o+1.)) + ((0.0241575124347+0.441260912903j))*dim
            arg[(0, 3, 1, 1)]=(-0.74530657087+0.852693318248j)*x[0]**o + ((-0.863756047337+0.65928227179j))*x[0] + ((0.166111715416+0.907940017499j))*x[1]**o + ((-0.00958168678724+0.704549531393j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.579194855455+1.76063333575j)*(1+2.*(dim-1)/(o+1.)) + ((-0.873337734124+1.36383180318j))*dim
            arg[(0, 3, 1, 2)]=(0.601863292715+0.00779577591675j)*x[0]**o + ((-0.171887657625+0.701861967388j))*x[0] + ((0.251698531406-0.917195449311j))*x[1]**o + ((-0.700835206615-0.225489490388j))*x[1]
            ref[(0, 3, 1, 2)]=(0.853561824121-0.909399673394j)*(1+2.*(dim-1)/(o+1.)) + ((-0.87272286424+0.476372477j))*dim
            arg[(0, 3, 1, 3)]=(-0.840537876776+0.948980006841j)*x[0]**o + ((0.0226241782806-0.207275808494j))*x[0] + ((0.913658937881-0.941428596286j))*x[1]**o + ((-0.847767460307+0.591296865711j))*x[1]
            ref[(0, 3, 1, 3)]=(0.0731210611056+0.00755141055481j)*(1+2.*(dim-1)/(o+1.)) + ((-0.825143282026+0.384021057216j))*dim
            arg[(0, 3, 2, 0)]=(-0.0780378394494+0.413398177045j)*x[0]**o + ((-0.320598162182-0.993161241779j))*x[0] + ((0.208324423564-0.0311994990497j))*x[1]**o + ((0.761807768432-0.0864027052648j))*x[1]
            ref[(0, 3, 2, 0)]=(0.130286584114+0.382198677996j)*(1+2.*(dim-1)/(o+1.)) + ((0.44120960625-1.07956394704j))*dim
            arg[(0, 3, 2, 1)]=(-0.251349158423-0.284388935957j)*x[0]**o + ((-0.589003481947-0.743767930464j))*x[0] + ((0.0393476789036+0.992469163458j))*x[1]**o + ((-0.253364472066+0.39312742662j))*x[1]
            ref[(0, 3, 2, 1)]=(-0.21200147952+0.708080227501j)*(1+2.*(dim-1)/(o+1.)) + ((-0.842367954013-0.350640503844j))*dim
            arg[(0, 3, 2, 2)]=(-0.410723364486+0.125325685399j)*x[0]**o + ((0.216805234291+0.746221071583j))*x[0] + ((0.246168437202+0.92619662124j))*x[1]**o + ((-0.32822214875+0.315790026227j))*x[1]
            ref[(0, 3, 2, 2)]=(-0.164554927284+1.05152230664j)*(1+2.*(dim-1)/(o+1.)) + ((-0.111416914458+1.06201109781j))*dim
            arg[(0, 3, 2, 3)]=(0.327946011985-0.969529549959j)*x[0]**o + ((-0.212734283575+0.553114487428j))*x[0] + ((-0.714880110525+0.323234544521j))*x[1]**o + ((-0.822784041186+0.379427495275j))*x[1]
            ref[(0, 3, 2, 3)]=(-0.38693409854-0.646295005438j)*(1+2.*(dim-1)/(o+1.)) + ((-1.03551832476+0.932541982704j))*dim
            arg[(1, 0, 0, 0)]=(0.634682631894+0.713816492035j)*x[0]**o + ((0.334108990276-0.694171439988j))*x[0] + ((0.986968137933-0.0926124534854j))*x[1]**o + ((-0.924017400588+0.666146409005j))*x[1]
            ref[(1, 0, 0, 0)]=(1.62165076983+0.62120403855j)*(1+2.*(dim-1)/(o+1.)) + ((-0.589908410312-0.0280250309826j))*dim
            arg[(1, 0, 0, 1)]=(-0.835046111669-0.437739342718j)*x[0]**o + ((0.388791504238+0.797217300016j))*x[0] + ((-0.526453987621-0.890123105289j))*x[1]**o + ((-0.379688739552-0.217573051204j))*x[1]
            ref[(1, 0, 0, 1)]=(-1.36150009929-1.32786244801j)*(1+2.*(dim-1)/(o+1.)) + ((0.00910276468571+0.579644248812j))*dim
            arg[(1, 0, 0, 2)]=(0.247744122888-0.258307506248j)*x[0]**o + ((0.814105337398+0.860798095552j))*x[0] + ((0.530655074717+0.0367663393535j))*x[1]**o + ((-0.206737018678+0.00198438597797j))*x[1]
            ref[(1, 0, 0, 2)]=(0.778399197605-0.221541166895j)*(1+2.*(dim-1)/(o+1.)) + ((0.60736831872+0.86278248153j))*dim
            arg[(1, 0, 0, 3)]=(0.493490951069+0.0155409960418j)*x[0]**o + ((0.999259970373+0.500158645222j))*x[0] + ((-0.492189211036-0.23601812501j))*x[1]**o + ((0.276856771819+0.74629421525j))*x[1]
            ref[(1, 0, 0, 3)]=(0.00130174003243-0.220477128968j)*(1+2.*(dim-1)/(o+1.)) + ((1.27611674219+1.24645286047j))*dim
            arg[(1, 0, 1, 0)]=(-0.95691418402+0.970159840787j)*x[0]**o + ((-0.284180335126-0.00426690019388j))*x[0] + ((0.0711499720557+0.0958094312323j))*x[1]**o + ((0.175694337333-0.872845524617j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.885764211964+1.06596927202j)*(1+2.*(dim-1)/(o+1.)) + ((-0.108485997793-0.87711242481j))*dim
            arg[(1, 0, 1, 1)]=(0.531502386241-0.129634433076j)*x[0]**o + ((-0.301383637983-0.138178666482j))*x[0] + ((0.69937350373-0.193517087241j))*x[1]**o + ((-0.634863254836+0.850526164509j))*x[1]
            ref[(1, 0, 1, 1)]=(1.23087588997-0.323151520317j)*(1+2.*(dim-1)/(o+1.)) + ((-0.936246892819+0.712347498027j))*dim
            arg[(1, 0, 1, 2)]=(-0.693253522981+0.147893343832j)*x[0]**o + ((0.721248276149-0.0998570907488j))*x[0] + ((0.879177629363-0.276530637047j))*x[1]**o + ((-0.509305834837-0.170257125342j))*x[1]
            ref[(1, 0, 1, 2)]=(0.185924106383-0.128637293215j)*(1+2.*(dim-1)/(o+1.)) + ((0.211942441312-0.270114216091j))*dim
            arg[(1, 0, 1, 3)]=(-0.765586228824-0.963107595333j)*x[0]**o + ((0.570972710566-0.324044700304j))*x[0] + ((-0.126020423473+0.339939607932j))*x[1]**o + ((0.393601688008+0.266102999988j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.891606652297-0.623167987401j)*(1+2.*(dim-1)/(o+1.)) + ((0.964574398574-0.0579417003157j))*dim
            arg[(1, 0, 2, 0)]=(-0.262483817216-0.615092650659j)*x[0]**o + ((-0.143476967546+0.915033138685j))*x[0] + ((0.0194355002362+0.484992115268j))*x[1]**o + ((-0.038876703953+0.688143429658j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.24304831698-0.130100535391j)*(1+2.*(dim-1)/(o+1.)) + ((-0.182353671499+1.60317656834j))*dim
            arg[(1, 0, 2, 1)]=(0.267291578133+0.334284143427j)*x[0]**o + ((-0.792818753602-0.968239724146j))*x[0] + ((-0.740893844691+0.818723490371j))*x[1]**o + ((-0.73948721742+0.192389114657j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.473602266558+1.1530076338j)*(1+2.*(dim-1)/(o+1.)) + ((-1.53230597102-0.775850609489j))*dim
            arg[(1, 0, 2, 2)]=(-0.315288851995-0.470947221968j)*x[0]**o + ((-0.586631393813+0.495603812303j))*x[0] + ((-0.220542329656-0.184702013821j))*x[1]**o + ((-0.620148111281-0.940113937058j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.535831181651-0.655649235789j)*(1+2.*(dim-1)/(o+1.)) + ((-1.20677950509-0.444510124755j))*dim
            arg[(1, 0, 2, 3)]=(-0.504000096025+0.256000065612j)*x[0]**o + ((0.45085178735+0.460133173429j))*x[0] + ((0.221549494661-0.787147098227j))*x[1]**o + ((0.688955925866-0.128898814889j))*x[1]
            ref[(1, 0, 2, 3)]=(-0.282450601363-0.531147032615j)*(1+2.*(dim-1)/(o+1.)) + ((1.13980771322+0.33123435854j))*dim
            arg[(1, 1, 0, 0)]=(-0.975894196031+0.962191843375j)*x[0]**o + ((-0.0355768426257+0.790688355252j))*x[0] + ((0.929349471973-0.282873452746j))*x[1]**o + ((0.441609112656+0.610388601509j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.0465447240579+0.679318390628j)*(1+2.*(dim-1)/(o+1.)) + ((0.40603227003+1.40107695676j))*dim
            arg[(1, 1, 0, 1)]=(0.995696089801+0.165395292988j)*x[0]**o + ((0.650890760579-0.199412395823j))*x[0] + ((-0.207054001417+0.473359196431j))*x[1]**o + ((0.226086023379+0.740480547921j))*x[1]
            ref[(1, 1, 0, 1)]=(0.788642088385+0.638754489419j)*(1+2.*(dim-1)/(o+1.)) + ((0.876976783958+0.541068152099j))*dim
            arg[(1, 1, 0, 2)]=(-0.214036924912-0.00131172636009j)*x[0]**o + ((0.387712204025+0.710755193464j))*x[0] + ((0.296279883523+0.0293234752987j))*x[1]**o + ((0.348947014116-0.59924431971j))*x[1]
            ref[(1, 1, 0, 2)]=(0.0822429586115+0.0280117489386j)*(1+2.*(dim-1)/(o+1.)) + ((0.736659218141+0.111510873753j))*dim
            arg[(1, 1, 0, 3)]=(-0.147327888012-0.0613055656448j)*x[0]**o + ((0.780550024254-0.562082219638j))*x[0] + ((0.985007417003+0.511987690565j))*x[1]**o + ((0.518649969889+0.777054651258j))*x[1]
            ref[(1, 1, 0, 3)]=(0.837679528991+0.45068212492j)*(1+2.*(dim-1)/(o+1.)) + ((1.29919999414+0.21497243162j))*dim
            arg[(1, 1, 1, 0)]=(-0.644066433791+0.61677656056j)*x[0]**o + ((-0.240774107865-0.220123009368j))*x[0] + ((0.0209700502768-0.140877514454j))*x[1]**o + ((-0.766146858077-0.828987902852j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.623096383514+0.475899046105j)*(1+2.*(dim-1)/(o+1.)) + ((-1.00692096594-1.04911091222j))*dim
            arg[(1, 1, 1, 1)]=(-0.418600803383+0.0615736149364j)*x[0]**o + ((0.634521030208-0.360061856409j))*x[0] + ((-0.70717367939-0.657544261857j))*x[1]**o + ((0.911194000315+0.785186721091j))*x[1]
            ref[(1, 1, 1, 1)]=(-1.12577448277-0.595970646921j)*(1+2.*(dim-1)/(o+1.)) + ((1.54571503052+0.425124864681j))*dim
            arg[(1, 1, 1, 2)]=(-0.221280256382+0.424842216284j)*x[0]**o + ((-0.188600234857+0.0360679505796j))*x[0] + ((-0.211506486096-0.485225641918j))*x[1]**o + ((0.492998307916+0.568692078364j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.432786742478-0.0603834256333j)*(1+2.*(dim-1)/(o+1.)) + ((0.304398073059+0.604760028943j))*dim
            arg[(1, 1, 1, 3)]=(0.126666520178+0.846952649379j)*x[0]**o + ((-0.822126419274+0.33110448776j))*x[0] + ((0.923816077564+0.797600612918j))*x[1]**o + ((0.236175897363-0.437652552112j))*x[1]
            ref[(1, 1, 1, 3)]=(1.05048259774+1.6445532623j)*(1+2.*(dim-1)/(o+1.)) + ((-0.585950521911-0.106548064352j))*dim
            arg[(1, 1, 2, 0)]=(0.608334364353+0.0236316198682j)*x[0]**o + ((-0.705730734464-0.738486257243j))*x[0] + ((-0.341682421171-0.640679888665j))*x[1]**o + ((0.147277809324-0.336790247027j))*x[1]
            ref[(1, 1, 2, 0)]=(0.266651943182-0.617048268797j)*(1+2.*(dim-1)/(o+1.)) + ((-0.55845292514-1.07527650427j))*dim
            arg[(1, 1, 2, 1)]=(0.220254484846+0.400454026771j)*x[0]**o + ((0.97815570268+0.588447935548j))*x[0] + ((-0.0718683229803+0.428867239585j))*x[1]**o + ((0.531536423835-0.683448442274j))*x[1]
            ref[(1, 1, 2, 1)]=(0.148386161866+0.829321266356j)*(1+2.*(dim-1)/(o+1.)) + ((1.50969212652-0.0950005067258j))*dim
            arg[(1, 1, 2, 2)]=(0.328269661423+0.666481629882j)*x[0]**o + ((0.284841998452-0.87067022179j))*x[0] + ((0.867906074666-0.508862589204j))*x[1]**o + ((0.395375991351+0.347708224894j))*x[1]
            ref[(1, 1, 2, 2)]=(1.19617573609+0.157619040678j)*(1+2.*(dim-1)/(o+1.)) + ((0.680217989803-0.522961996896j))*dim
            arg[(1, 1, 2, 3)]=(-0.189531483786-0.884611766705j)*x[0]**o + ((0.666923618672-0.925219983832j))*x[0] + ((-0.363696228509+0.130086764584j))*x[1]**o + ((0.290086801721+0.136356185053j))*x[1]
            ref[(1, 1, 2, 3)]=(-0.553227712295-0.754525002121j)*(1+2.*(dim-1)/(o+1.)) + ((0.957010420393-0.78886379878j))*dim
            arg[(1, 2, 0, 0)]=(-0.529539216624-0.939580343959j)*x[0]**o + ((0.0436078287896+0.704650789896j))*x[0] + ((-0.867754931126+0.779992978294j))*x[1]**o + ((0.225309520772+0.0760775888822j))*x[1]
            ref[(1, 2, 0, 0)]=(-1.39729414775-0.159587365664j)*(1+2.*(dim-1)/(o+1.)) + ((0.268917349561+0.780728378778j))*dim
            arg[(1, 2, 0, 1)]=(-0.623865068668+0.996242381966j)*x[0]**o + ((0.078306688199-0.930997077345j))*x[0] + ((-0.134311528116-0.239232148651j))*x[1]**o + ((-0.244656956794+0.654055565952j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.758176596784+0.757010233315j)*(1+2.*(dim-1)/(o+1.)) + ((-0.166350268595-0.276941511394j))*dim
            arg[(1, 2, 0, 2)]=(-0.395530135516-0.176375427862j)*x[0]**o + ((0.738525508617-0.412722024345j))*x[0] + ((-0.295427511959+0.582959825133j))*x[1]**o + ((0.568418322456+0.466855188879j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.690957647476+0.406584397271j)*(1+2.*(dim-1)/(o+1.)) + ((1.30694383107+0.0541331645338j))*dim
            arg[(1, 2, 0, 3)]=(0.176111710514-0.696315974286j)*x[0]**o + ((-0.859354417067-0.250328244637j))*x[0] + ((0.186565996446-0.824125855004j))*x[1]**o + ((-0.936362990104+0.465534603756j))*x[1]
            ref[(1, 2, 0, 3)]=(0.36267770696-1.52044182929j)*(1+2.*(dim-1)/(o+1.)) + ((-1.79571740717+0.215206359119j))*dim
            arg[(1, 2, 1, 0)]=(-0.330850375408+0.0599337606623j)*x[0]**o + ((0.351161295349+0.146495063175j))*x[0] + ((0.430201818291+0.804072877611j))*x[1]**o + ((-0.116944826667+0.209296892091j))*x[1]
            ref[(1, 2, 1, 0)]=(0.0993514428824+0.864006638273j)*(1+2.*(dim-1)/(o+1.)) + ((0.234216468682+0.355791955266j))*dim
            arg[(1, 2, 1, 1)]=(0.345851095648-0.239713013904j)*x[0]**o + ((-0.750592291624-0.553179173761j))*x[0] + ((-0.573419869902+0.593032724709j))*x[1]**o + ((0.209139416702+0.172813775466j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.227568774254+0.353319710805j)*(1+2.*(dim-1)/(o+1.)) + ((-0.541452874922-0.380365398295j))*dim
            arg[(1, 2, 1, 2)]=(0.545727110501-0.736517282863j)*x[0]**o + ((0.617623639471+0.871729455093j))*x[0] + ((0.106817041935-0.253573586554j))*x[1]**o + ((0.854051589997-0.560008771683j))*x[1]
            ref[(1, 2, 1, 2)]=(0.652544152436-0.990090869417j)*(1+2.*(dim-1)/(o+1.)) + ((1.47167522947+0.31172068341j))*dim
            arg[(1, 2, 1, 3)]=(-0.426069926436-0.0388312294878j)*x[0]**o + ((0.599021174981-0.933261376981j))*x[0] + ((-0.954389159777+0.263440627139j))*x[1]**o + ((0.390281186302-0.861313456969j))*x[1]
            ref[(1, 2, 1, 3)]=(-1.38045908621+0.224609397651j)*(1+2.*(dim-1)/(o+1.)) + ((0.989302361283-1.79457483395j))*dim
            arg[(1, 2, 2, 0)]=(0.967190100869+0.896971619957j)*x[0]**o + ((0.314062608795+0.330216986471j))*x[0] + ((0.847016827621-0.526601130578j))*x[1]**o + ((0.521752159841-0.644469118739j))*x[1]
            ref[(1, 2, 2, 0)]=(1.81420692849+0.370370489379j)*(1+2.*(dim-1)/(o+1.)) + ((0.835814768636-0.314252132267j))*dim
            arg[(1, 2, 2, 1)]=(-0.52251234273-0.504277363431j)*x[0]**o + ((-0.0550379186751-0.949595827117j))*x[0] + ((0.329267698541-0.572485174755j))*x[1]**o + ((0.336239679159+0.259683008044j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.193244644189-1.07676253819j)*(1+2.*(dim-1)/(o+1.)) + ((0.281201760483-0.689912819074j))*dim
            arg[(1, 2, 2, 2)]=(-0.682133945908+0.831043780262j)*x[0]**o + ((0.0317062939332-0.387416789235j))*x[0] + ((0.60882670367+0.221069382723j))*x[1]**o + ((0.600779191947-0.138920237659j))*x[1]
            ref[(1, 2, 2, 2)]=(-0.0733072422382+1.05211316298j)*(1+2.*(dim-1)/(o+1.)) + ((0.63248548588-0.526337026894j))*dim
            arg[(1, 2, 2, 3)]=(-0.0592445162328-0.0969922890219j)*x[0]**o + ((-0.314901723218-0.628163847961j))*x[0] + ((-0.29456495591-0.902509358531j))*x[1]**o + ((0.0819756743735+0.110643600591j))*x[1]
            ref[(1, 2, 2, 3)]=(-0.353809472143-0.999501647553j)*(1+2.*(dim-1)/(o+1.)) + ((-0.232926048845-0.51752024737j))*dim
            arg[(1, 3, 0, 0)]=(0.721348747686-0.62787921015j)*x[0]**o + ((0.719936388306+0.291226612649j))*x[0] + ((-0.662234957663+0.79634350993j))*x[1]**o + ((0.287740950157-0.718369369514j))*x[1]
            ref[(1, 3, 0, 0)]=(0.0591137900225+0.16846429978j)*(1+2.*(dim-1)/(o+1.)) + ((1.00767733846-0.427142756865j))*dim
            arg[(1, 3, 0, 1)]=(-0.214156562581+0.83736066517j)*x[0]**o + ((0.832412829957-0.98393528313j))*x[0] + ((-0.192164834134+0.411003363284j))*x[1]**o + ((0.424089869215+0.397308990763j))*x[1]
            ref[(1, 3, 0, 1)]=(-0.406321396714+1.24836402845j)*(1+2.*(dim-1)/(o+1.)) + ((1.25650269917-0.586626292367j))*dim
            arg[(1, 3, 0, 2)]=(-0.99002322822+0.910441757431j)*x[0]**o + ((-0.953000250763-0.729205322603j))*x[0] + ((0.951500606927-0.60054903934j))*x[1]**o + ((0.166132671987-0.593134733124j))*x[1]
            ref[(1, 3, 0, 2)]=(-0.0385226212932+0.309892718091j)*(1+2.*(dim-1)/(o+1.)) + ((-0.786867578777-1.32234005573j))*dim
            arg[(1, 3, 0, 3)]=(0.0873475244077+0.138374422117j)*x[0]**o + ((0.311930443356+0.0518362580206j))*x[0] + ((-0.567717888392-0.357227689878j))*x[1]**o + ((-0.481558819165+0.133264150427j))*x[1]
            ref[(1, 3, 0, 3)]=(-0.480370363984-0.218853267761j)*(1+2.*(dim-1)/(o+1.)) + ((-0.169628375809+0.185100408448j))*dim
            arg[(1, 3, 1, 0)]=(0.988878564047+0.48080224423j)*x[0]**o + ((-0.365665339277+0.36730854088j))*x[0] + ((0.768769992493-0.480932686295j))*x[1]**o + ((0.489850271253-0.708511557301j))*x[1]
            ref[(1, 3, 1, 0)]=(1.75764855654-0.000130442065467j)*(1+2.*(dim-1)/(o+1.)) + ((0.124184931975-0.341203016421j))*dim
            arg[(1, 3, 1, 1)]=(0.472818171103+0.0565849319734j)*x[0]**o + ((0.376068627912+0.851615657618j))*x[0] + ((0.259971908269+0.595968298314j))*x[1]**o + ((0.473556536261+0.317504766232j))*x[1]
            ref[(1, 3, 1, 1)]=(0.732790079372+0.652553230287j)*(1+2.*(dim-1)/(o+1.)) + ((0.849625164173+1.16912042385j))*dim
            arg[(1, 3, 1, 2)]=(0.318448339556-0.775536378874j)*x[0]**o + ((0.932518288131+0.0779302410839j))*x[0] + ((-0.870950195575+0.656567152793j))*x[1]**o + ((-0.96272614288-0.903756142436j))*x[1]
            ref[(1, 3, 1, 2)]=(-0.552501856019-0.118969226081j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0302078547493-0.825825901352j))*dim
            arg[(1, 3, 1, 3)]=(0.0163996080743-0.0484821749175j)*x[0]**o + ((0.250999701397-0.51277567966j))*x[0] + ((-0.134282776699-0.607768900478j))*x[1]**o + ((-0.578039190911-0.0574635883625j))*x[1]
            ref[(1, 3, 1, 3)]=(-0.117883168624-0.656251075395j)*(1+2.*(dim-1)/(o+1.)) + ((-0.327039489514-0.570239268022j))*dim
            arg[(1, 3, 2, 0)]=(0.204432047184+0.147563438761j)*x[0]**o + ((0.502902840359-0.687655685088j))*x[0] + ((0.949384224805-0.567860214176j))*x[1]**o + ((-0.00329397998044+0.00508867497639j))*x[1]
            ref[(1, 3, 2, 0)]=(1.15381627199-0.420296775415j)*(1+2.*(dim-1)/(o+1.)) + ((0.499608860379-0.682567010112j))*dim
            arg[(1, 3, 2, 1)]=(0.544547004481+0.450411873589j)*x[0]**o + ((0.498844135616+0.16279023234j))*x[0] + ((-0.342647788187+0.682390684186j))*x[1]**o + ((-0.925573273783+0.894545912542j))*x[1]
            ref[(1, 3, 2, 1)]=(0.201899216294+1.13280255777j)*(1+2.*(dim-1)/(o+1.)) + ((-0.426729138167+1.05733614488j))*dim
            arg[(1, 3, 2, 2)]=(0.408040908618-0.787622300055j)*x[0]**o + ((0.954593078993-0.327341555801j))*x[0] + ((-0.87238134249+0.449524830156j))*x[1]**o + ((-0.222401920826+0.160696438376j))*x[1]
            ref[(1, 3, 2, 2)]=(-0.464340433871-0.338097469899j)*(1+2.*(dim-1)/(o+1.)) + ((0.732191158167-0.166645117425j))*dim
            arg[(1, 3, 2, 3)]=(-0.0485009362499-0.0284134202052j)*x[0]**o + ((-0.132405273571-0.0397169176451j))*x[0] + ((0.770666063006+0.257752353279j))*x[1]**o + ((0.263006768827+0.114929785024j))*x[1]
            ref[(1, 3, 2, 3)]=(0.722165126756+0.229338933074j)*(1+2.*(dim-1)/(o+1.)) + ((0.130601495256+0.0752128673793j))*dim
        else:
            arg[(0, 0, 0, 0)]=(0.181094396594-0.0162050932758j)*x[0]**o + ((0.731917661792+0.132229428298j))*x[0] + ((-0.325352679113-0.805328106994j))*x[1]**o + ((-0.991778054043-0.497551086715j))*x[1] + ((-0.826400158737-0.0931703022937j))*x[2]**o + ((-0.218081033326+0.371827533224j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.970658441256-0.914703502564j)*(1+2.*(dim-1)/(o+1.)) + ((-0.477941425576+0.0065058748072j))*dim
            arg[(0, 0, 0, 1)]=(0.265341496447-0.625306745038j)*x[0]**o + ((0.869778096001+0.431467425219j))*x[0] + ((-0.262516092568-0.692650640742j))*x[1]**o + ((0.565339586563-0.722367679903j))*x[1] + ((0.149729018529-0.739624628418j))*x[2]**o + ((0.338231573755-0.513188360693j))*x[2]
            ref[(0, 0, 0, 1)]=(0.152554422408-2.0575820142j)*(1+2.*(dim-1)/(o+1.)) + ((1.77334925632-0.804088615377j))*dim
            arg[(0, 0, 0, 2)]=(0.666011166757-0.0700276068433j)*x[0]**o + ((-0.26833900039-0.88061928269j))*x[0] + ((0.789849581645-0.0491975219207j))*x[1]**o + ((-0.755413669567-0.339958860948j))*x[1] + ((0.393962545186+0.652319928546j))*x[2]**o + ((0.163344660794+0.662128552628j))*x[2]
            ref[(0, 0, 0, 2)]=(1.84982329359+0.533094799782j)*(1+2.*(dim-1)/(o+1.)) + ((-0.860408009163-0.55844959101j))*dim
            arg[(0, 0, 0, 3)]=(-0.771312124719-0.018799680434j)*x[0]**o + ((-0.823005336309-0.388302678053j))*x[0] + ((-0.0510151027343+0.652474815198j))*x[1]**o + ((-0.180688174377-0.500832760518j))*x[1] + ((-0.587921970344-0.864669640798j))*x[2]**o + ((0.586468001257+0.162375812161j))*x[2]
            ref[(0, 0, 0, 3)]=(-1.4102491978-0.230994506033j)*(1+2.*(dim-1)/(o+1.)) + ((-0.417225509429-0.72675962641j))*dim
            arg[(0, 0, 1, 0)]=(-0.0666110936789-0.0764956391485j)*x[0]**o + ((0.991723992342+0.341224729735j))*x[0] + ((-0.612860476831-0.0708837041755j))*x[1]**o + ((0.74860781563+0.78977072364j))*x[1] + ((-0.454364906407-0.556553399213j))*x[2]**o + ((-0.313276003406-0.424683996521j))*x[2]
            ref[(0, 0, 1, 0)]=(-1.13383647692-0.703932742537j)*(1+2.*(dim-1)/(o+1.)) + ((1.42705580457+0.706311456854j))*dim
            arg[(0, 0, 1, 1)]=(0.365758450129-0.0703552699213j)*x[0]**o + ((-0.450719134776+0.795597854156j))*x[0] + ((0.592825321593+0.323312225239j))*x[1]**o + ((-0.490909502488-0.21902918174j))*x[1] + ((0.231862422848-0.142844171376j))*x[2]**o + ((-0.107815402061-0.542883273272j))*x[2]
            ref[(0, 0, 1, 1)]=(1.19044619457+0.110112783941j)*(1+2.*(dim-1)/(o+1.)) + ((-1.04944403932+0.0336853991438j))*dim
            arg[(0, 0, 1, 2)]=(0.8000240377-0.619071053921j)*x[0]**o + ((0.645534310246-0.864604187651j))*x[0] + ((-0.265501536257-0.116529430644j))*x[1]**o + ((-0.0503320850943+0.0768126629125j))*x[1] + ((0.561965330331+0.219493381821j))*x[2]**o + ((0.41977192866-0.137038162392j))*x[2]
            ref[(0, 0, 1, 2)]=(1.09648783178-0.516107102744j)*(1+2.*(dim-1)/(o+1.)) + ((1.01497415381-0.92482968713j))*dim
            arg[(0, 0, 1, 3)]=(-0.701307745731-0.183358595969j)*x[0]**o + ((0.760740183851-0.0613037850743j))*x[0] + ((-0.470168545287+0.204727728673j))*x[1]**o + ((0.148029254086+0.118327296417j))*x[1] + ((0.553055860251-0.632243462404j))*x[2]**o + ((0.328012364379-0.414041238708j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.618420430768-0.610874329701j)*(1+2.*(dim-1)/(o+1.)) + ((1.23678180232-0.357017727365j))*dim
            arg[(0, 0, 2, 0)]=(0.374378117392-0.223304193724j)*x[0]**o + ((0.957499220379-0.519252262962j))*x[0] + ((-0.456372302269+0.694726093434j))*x[1]**o + ((-0.688124080724-0.0432369610404j))*x[1] + ((0.315491371118+0.655584787743j))*x[2]**o + ((-0.31077019189-0.355215338253j))*x[2]
            ref[(0, 0, 2, 0)]=(0.233497186241+1.12700668745j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0413950522345-0.917704562255j))*dim
            arg[(0, 0, 2, 1)]=(-0.872615245824-0.684637847202j)*x[0]**o + ((-0.885908274886-0.639024267094j))*x[0] + ((-0.96299779451-0.483824357722j))*x[1]**o + ((-0.342508171877-0.432251246064j))*x[1] + ((0.584926773222-0.381599018905j))*x[2]**o + ((0.401022826466+0.527759177381j))*x[2]
            ref[(0, 0, 2, 1)]=(-1.25068626711-1.55006122383j)*(1+2.*(dim-1)/(o+1.)) + ((-0.827393620297-0.543516335777j))*dim
            arg[(0, 0, 2, 2)]=(0.132780651574-0.252519451843j)*x[0]**o + ((0.28074370984+0.758191040161j))*x[0] + ((0.160014519188+0.394065973508j))*x[1]**o + ((0.316571633014+0.58875651354j))*x[1] + ((-0.240556922464-0.680011851917j))*x[2]**o + ((-0.888890973893+0.591487297696j))*x[2]
            ref[(0, 0, 2, 2)]=(0.0522382482984-0.538465330252j)*(1+2.*(dim-1)/(o+1.)) + ((-0.291575631039+1.9384348514j))*dim
            arg[(0, 0, 2, 3)]=(0.740445614472+0.611014661149j)*x[0]**o + ((-0.765151648243-0.0171573618279j))*x[0] + ((0.923770671679-0.147652907023j))*x[1]**o + ((-0.489026248252-0.454900621751j))*x[1] + ((0.678923870969-0.318742365123j))*x[2]**o + ((0.159907625774+0.791017733492j))*x[2]
            ref[(0, 0, 2, 3)]=(2.34314015712+0.144619389003j)*(1+2.*(dim-1)/(o+1.)) + ((-1.09427027072+0.318959749912j))*dim
            arg[(0, 1, 0, 0)]=(0.633053054999+0.307880316664j)*x[0]**o + ((-0.89127699023+0.721941631491j))*x[0] + ((-0.384747255216-0.335606384154j))*x[1]**o + ((-0.554384007074+0.329857399801j))*x[1] + ((-0.682842608979+0.108573488332j))*x[2]**o + ((0.0416004837441+0.687181065238j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.434536809196+0.0808474208427j)*(1+2.*(dim-1)/(o+1.)) + ((-1.40406051356+1.73898009653j))*dim
            arg[(0, 1, 0, 1)]=(0.360358901954+0.988355687395j)*x[0]**o + ((0.79948497818-0.497960967777j))*x[0] + ((-0.870446047607+0.132570128893j))*x[1]**o + ((0.80380876942-0.278886251729j))*x[1] + ((0.679792720135+0.233510905918j))*x[2]**o + ((-0.294691822799+0.225213132179j))*x[2]
            ref[(0, 1, 0, 1)]=(0.169705574482+1.35443672221j)*(1+2.*(dim-1)/(o+1.)) + ((1.3086019248-0.551634087327j))*dim
            arg[(0, 1, 0, 2)]=(0.591037762277-0.949255601671j)*x[0]**o + ((-0.490899551869+0.595964391697j))*x[0] + ((0.631897621954-0.194744563568j))*x[1]**o + ((-0.407547087098+0.418241974655j))*x[1] + ((-0.250818722066-0.33182457509j))*x[2]**o + ((0.318093895132-0.21669563395j))*x[2]
            ref[(0, 1, 0, 2)]=(0.972116662165-1.47582474033j)*(1+2.*(dim-1)/(o+1.)) + ((-0.580352743835+0.797510732402j))*dim
            arg[(0, 1, 0, 3)]=(-0.0608689908695+0.748895062312j)*x[0]**o + ((-0.972597558048+0.886525608652j))*x[0] + ((0.0161714218098-0.997796642978j))*x[1]**o + ((-0.899423774864+0.0126405639912j))*x[1] + ((-0.212598510568-0.594780749194j))*x[2]**o + ((-0.935053055272+0.817765694397j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.257296079627-0.843682329861j)*(1+2.*(dim-1)/(o+1.)) + ((-2.80707438818+1.71693186704j))*dim
            arg[(0, 1, 1, 0)]=(-0.633461031345+0.992432298545j)*x[0]**o + ((0.647456667305+0.763676841853j))*x[0] + ((-0.775750150629+0.0492811746991j))*x[1]**o + ((0.691185467697-0.360609424749j))*x[1] + ((-0.567234081893-0.246039495001j))*x[2]**o + ((-0.812694275345+0.661204521814j))*x[2]
            ref[(0, 1, 1, 0)]=(-1.97644526387+0.795673978243j)*(1+2.*(dim-1)/(o+1.)) + ((0.525947859656+1.06427193892j))*dim
            arg[(0, 1, 1, 1)]=(-0.731675267912-0.15452589358j)*x[0]**o + ((0.153121889653+0.634492858288j))*x[0] + ((-0.477304194988-0.674678529848j))*x[1]**o + ((-0.824034926849-0.93454609976j))*x[1] + ((-0.048049350696+0.890614003155j))*x[2]**o + ((0.813199908988-0.328547380416j))*x[2]
            ref[(0, 1, 1, 1)]=(-1.2570288136+0.061409579726j)*(1+2.*(dim-1)/(o+1.)) + ((0.142286871792-0.628600621888j))*dim
            arg[(0, 1, 1, 2)]=(0.476769705156-0.386567726017j)*x[0]**o + ((0.539511001452+0.108680727295j))*x[0] + ((0.172410273894-0.663729895821j))*x[1]**o + ((0.692972564687-0.306921980751j))*x[1] + ((0.664883005665+0.92783287984j))*x[2]**o + ((0.58667361175+0.0817144763932j))*x[2]
            ref[(0, 1, 1, 2)]=(1.31406298471-0.122464741997j)*(1+2.*(dim-1)/(o+1.)) + ((1.81915717789-0.116526777062j))*dim
            arg[(0, 1, 1, 3)]=(0.945967513081+0.523012808822j)*x[0]**o + ((-0.411623953875-0.115117591935j))*x[0] + ((0.504803659285-0.0370974777867j))*x[1]**o + ((-0.808472189248-0.234329263556j))*x[1] + ((0.482130409772+0.481529898684j))*x[2]**o + ((-0.523181798173+0.33736165933j))*x[2]
            ref[(0, 1, 1, 3)]=(1.93290158214+0.96744522972j)*(1+2.*(dim-1)/(o+1.)) + ((-1.7432779413-0.0120851961616j))*dim
            arg[(0, 1, 2, 0)]=(-0.823130644072+0.284049685606j)*x[0]**o + ((0.703661440793+0.126398509309j))*x[0] + ((-0.864023489336+0.434682714602j))*x[1]**o + ((0.218539998007+0.688470461171j))*x[1] + ((0.176600617378+0.858958377066j))*x[2]**o + ((-0.364836100456+0.992891989411j))*x[2]
            ref[(0, 1, 2, 0)]=(-1.51055351603+1.57769077727j)*(1+2.*(dim-1)/(o+1.)) + ((0.557365338345+1.80776095989j))*dim
            arg[(0, 1, 2, 1)]=(0.371799998809+0.0436444083827j)*x[0]**o + ((0.453644862999+0.148142602465j))*x[0] + ((0.266629163307+0.784393732118j))*x[1]**o + ((-0.714590135866+0.605391708552j))*x[1] + ((-0.734451379558-0.97895060442j))*x[2]**o + ((0.188206023867-0.711644088803j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.096022217441-0.150912463919j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0727392490004+0.0418902222137j))*dim
            arg[(0, 1, 2, 2)]=(-0.602296969127-0.808395678764j)*x[0]**o + ((0.323668246869+0.0136877674507j))*x[0] + ((0.857865006047-0.109856866133j))*x[1]**o + ((0.323520861388+0.765224496107j))*x[1] + ((0.573978711617-0.00312182878263j))*x[2]**o + ((0.83615554506-0.94553350891j))*x[2]
            ref[(0, 1, 2, 2)]=(0.829546748537-0.92137437368j)*(1+2.*(dim-1)/(o+1.)) + ((1.48334465332-0.166621245353j))*dim
            arg[(0, 1, 2, 3)]=(0.613633572817-0.492831741607j)*x[0]**o + ((-0.0204965980259-0.735312054834j))*x[0] + ((0.954489120282+0.392653531069j))*x[1]**o + ((0.802960993714+0.809272693251j))*x[1] + ((-0.257272552668+0.824550052586j))*x[2]**o + ((0.584681183118+0.842823447101j))*x[2]
            ref[(0, 1, 2, 3)]=(1.31085014043+0.724371842049j)*(1+2.*(dim-1)/(o+1.)) + ((1.36714557881+0.916784085517j))*dim
            arg[(0, 2, 0, 0)]=(-0.40119920274+0.386139729852j)*x[0]**o + ((0.197099963316+0.405540800129j))*x[0] + ((0.788060770462+0.769045754477j))*x[1]**o + ((-0.157233387374+0.424543453482j))*x[1] + ((-0.970339633667-0.603882998248j))*x[2]**o + ((0.672844608379+0.863442806333j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.583478065945+0.551302486081j)*(1+2.*(dim-1)/(o+1.)) + ((0.712711184321+1.69352705994j))*dim
            arg[(0, 2, 0, 1)]=(0.939792911151-0.588894468314j)*x[0]**o + ((0.0189872352185-0.846834771907j))*x[0] + ((-0.430086256496-0.870772826903j))*x[1]**o + ((0.569698139451-0.0303667822727j))*x[1] + ((-0.74919367579-0.631234797497j))*x[2]**o + ((-0.864187983515-0.369006471609j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.239487021135-2.09090209271j)*(1+2.*(dim-1)/(o+1.)) + ((-0.275502608845-1.24620802579j))*dim
            arg[(0, 2, 0, 2)]=(-0.132178136007+0.379564276747j)*x[0]**o + ((0.605831720821-0.673879589261j))*x[0] + ((0.424406886802-0.896797338588j))*x[1]**o + ((-0.414905282831+0.533413622021j))*x[1] + ((-0.749779653609-0.692415051397j))*x[2]**o + ((-0.75327986672-0.631967348704j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.457550902814-1.20964811324j)*(1+2.*(dim-1)/(o+1.)) + ((-0.56235342873-0.772433315945j))*dim
            arg[(0, 2, 0, 3)]=(0.813747078888-0.20070622702j)*x[0]**o + ((0.478586197962-0.245865015532j))*x[0] + ((-0.192313611003-0.693759106074j))*x[1]**o + ((-0.228545318764-0.202178031808j))*x[1] + ((-0.891651112685+0.329893458097j))*x[2]**o + ((-0.794479265699-0.611042654627j))*x[2]
            ref[(0, 2, 0, 3)]=(-0.2702176448-0.564571874998j)*(1+2.*(dim-1)/(o+1.)) + ((-0.5444383865-1.05908570197j))*dim
            arg[(0, 2, 1, 0)]=(-0.500510267057-0.161696649866j)*x[0]**o + ((0.434418554793-0.909482525545j))*x[0] + ((0.704111977526+0.695320017932j))*x[1]**o + ((-0.366356967104-0.431587392401j))*x[1] + ((-0.4108006892+0.880826985739j))*x[2]**o + ((-0.00756597844917+0.299169122837j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.20719897873+1.4144503538j)*(1+2.*(dim-1)/(o+1.)) + ((0.0604956092398-1.04190079511j))*dim
            arg[(0, 2, 1, 1)]=(-0.79235340746-0.795019213933j)*x[0]**o + ((-0.446143248635+0.359941981785j))*x[0] + ((0.619845437382-0.559802278272j))*x[1]**o + ((0.732116972497+0.0492199007531j))*x[1] + ((-0.26593033357+0.780079390974j))*x[2]**o + ((0.930554707676+0.631881269584j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.438438303647-0.574742101231j)*(1+2.*(dim-1)/(o+1.)) + ((1.21652843154+1.04104315212j))*dim
            arg[(0, 2, 1, 2)]=(0.145330272071-0.178779332476j)*x[0]**o + ((-0.171311248777+0.936759939321j))*x[0] + ((-0.0509785790325+0.493834446488j))*x[1]**o + ((0.223946366258+0.936209196938j))*x[1] + ((-0.747526564047-0.819229261059j))*x[2]**o + ((0.622223415896+0.0806799997268j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.653174871008-0.504174147047j)*(1+2.*(dim-1)/(o+1.)) + ((0.674858533377+1.95364913599j))*dim
            arg[(0, 2, 1, 3)]=(0.0464754222971-0.82263611918j)*x[0]**o + ((-0.360412360955-0.985813609093j))*x[0] + ((0.6858548821+0.0122262699522j))*x[1]**o + ((0.520691614+0.917492891437j))*x[1] + ((-0.181857914431+0.101422117637j))*x[2]**o + ((-0.951955600864-0.0586587232108j))*x[2]
            ref[(0, 2, 1, 3)]=(0.550472389966-0.70898773159j)*(1+2.*(dim-1)/(o+1.)) + ((-0.79167634782-0.126979440867j))*dim
            arg[(0, 2, 2, 0)]=(-0.166044917616-0.743101185486j)*x[0]**o + ((0.636897829449+0.436769977405j))*x[0] + ((0.439721320105-0.00761739085564j))*x[1]**o + ((-0.622204875269+0.728313427465j))*x[1] + ((0.317218446306-0.18249682751j))*x[2]**o + ((0.245504532623+0.884163554457j))*x[2]
            ref[(0, 2, 2, 0)]=(0.590894848794-0.933215403851j)*(1+2.*(dim-1)/(o+1.)) + ((0.260197486802+2.04924695933j))*dim
            arg[(0, 2, 2, 1)]=(-0.23025851752-0.816375863051j)*x[0]**o + ((-0.999413684612+0.587737376347j))*x[0] + ((0.340032598635-0.369574458842j))*x[1]**o + ((0.844115637306-0.937712022091j))*x[1] + ((-0.816610772035+0.927785475763j))*x[2]**o + ((-0.658621678481-0.454895417311j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.706836690921-0.25816484613j)*(1+2.*(dim-1)/(o+1.)) + ((-0.813919725787-0.804870063056j))*dim
            arg[(0, 2, 2, 2)]=(-0.122173230259-0.557260017827j)*x[0]**o + ((-0.0800915621267+0.315029853029j))*x[0] + ((-0.474841603344-0.745020566959j))*x[1]**o + ((-0.557037521354+0.582131015229j))*x[1] + ((0.613441918844+0.401321396362j))*x[2]**o + ((-0.461392183247+0.518896498164j))*x[2]
            ref[(0, 2, 2, 2)]=(0.0164270852417-0.900959188423j)*(1+2.*(dim-1)/(o+1.)) + ((-1.09852126673+1.41605736642j))*dim
            arg[(0, 2, 2, 3)]=(0.0689213498764+0.591581870725j)*x[0]**o + ((0.552608440581+0.302446552352j))*x[0] + ((0.0758774058482-0.915220145913j))*x[1]**o + ((-0.252525008995+0.716771779082j))*x[1] + ((-0.179957434027+0.746906981496j))*x[2]**o + ((-0.152590217241+0.871811462471j))*x[2]
            ref[(0, 2, 2, 3)]=(-0.0351586783025+0.423268706307j)*(1+2.*(dim-1)/(o+1.)) + ((0.147493214345+1.89102979391j))*dim
            arg[(0, 3, 0, 0)]=(0.242911135815-0.852882404741j)*x[0]**o + ((-0.176648771677+0.997589645572j))*x[0] + ((-0.2203266667+0.28727158879j))*x[1]**o + ((0.220703745361+0.871204850643j))*x[1] + ((-0.95970333877-0.435603194237j))*x[2]**o + ((0.400965781717+0.771682086985j))*x[2]
            ref[(0, 3, 0, 0)]=(-0.937118869655-1.00121401019j)*(1+2.*(dim-1)/(o+1.)) + ((0.445020755402+2.6404765832j))*dim
            arg[(0, 3, 0, 1)]=(0.235112876026-0.750616627353j)*x[0]**o + ((-0.204269617222+0.84813954537j))*x[0] + ((-0.593433706652-0.341691690409j))*x[1]**o + ((-0.9859474417+0.639364292029j))*x[1] + ((-0.412304753263+0.0933901489141j))*x[2]**o + ((0.160817264553-0.466464439814j))*x[2]
            ref[(0, 3, 0, 1)]=(-0.77062558389-0.998918168848j)*(1+2.*(dim-1)/(o+1.)) + ((-1.02939979437+1.02103939758j))*dim
            arg[(0, 3, 0, 2)]=(-0.094331706458+0.0468287605918j)*x[0]**o + ((0.737090908572-0.167784944022j))*x[0] + ((0.728969417805-0.773966799047j))*x[1]**o + ((0.0723554296795-0.546137017096j))*x[1] + ((-0.405790863382+0.403677188791j))*x[2]**o + ((0.308241831096-0.909040246906j))*x[2]
            ref[(0, 3, 0, 2)]=(0.228846847965-0.323460849664j)*(1+2.*(dim-1)/(o+1.)) + ((1.11768816935-1.62296220802j))*dim
            arg[(0, 3, 0, 3)]=(-0.179071479569+0.0859754461317j)*x[0]**o + ((-0.291415220974+0.719198206894j))*x[0] + ((0.134556421718-0.697888183398j))*x[1]**o + ((-0.0554507488662+0.24384396183j))*x[1] + ((-0.289531162926-0.161222485084j))*x[2]**o + ((0.753347775975-0.802779199652j))*x[2]
            ref[(0, 3, 0, 3)]=(-0.334046220777-0.77313522235j)*(1+2.*(dim-1)/(o+1.)) + ((0.406481806135+0.160262969072j))*dim
            arg[(0, 3, 1, 0)]=(-0.455857412854+0.22531187162j)*x[0]**o + ((0.252997297563-0.964741757835j))*x[0] + ((0.270978502904+0.342889302784j))*x[1]**o + ((-0.255829394681-0.817799514273j))*x[1] + ((-0.485028317358-0.0255529507891j))*x[2]**o + ((0.223536900849-0.733116051002j))*x[2]
            ref[(0, 3, 1, 0)]=(-0.669907227308+0.542648223615j)*(1+2.*(dim-1)/(o+1.)) + ((0.220704803731-2.51565732311j))*dim
            arg[(0, 3, 1, 1)]=(0.528643645989-0.844253985621j)*x[0]**o + ((-0.320122423445+0.0109478490385j))*x[0] + ((0.448134083215+0.0443103241459j))*x[1]**o + ((-0.856026760868-0.839078379778j))*x[1] + ((-0.628885585481-0.243615413979j))*x[2]**o + ((0.279754579278+0.756935268776j))*x[2]
            ref[(0, 3, 1, 1)]=(0.347892143723-1.04355907545j)*(1+2.*(dim-1)/(o+1.)) + ((-0.896394605034-0.0711952619637j))*dim
            arg[(0, 3, 1, 2)]=(0.717002836937-0.0776924958256j)*x[0]**o + ((0.376444116816+0.751148510455j))*x[0] + ((-0.703294220856-0.30142357176j))*x[1]**o + ((0.992932960094-0.84673009302j))*x[1] + ((0.902502863704+0.595235691082j))*x[2]**o + ((-0.852657596943+0.739300906437j))*x[2]
            ref[(0, 3, 1, 2)]=(0.916211479786+0.216119623496j)*(1+2.*(dim-1)/(o+1.)) + ((0.516719479968+0.643719323871j))*dim
            arg[(0, 3, 1, 3)]=(0.110000723091+0.932649100591j)*x[0]**o + ((0.658909732818+0.612924829262j))*x[0] + ((-0.824796469937-0.734190077218j))*x[1]**o + ((-0.656295558867+0.205609549613j))*x[1] + ((-0.434364025166+0.863451193087j))*x[2]**o + ((-0.482861177664+0.423534827788j))*x[2]
            ref[(0, 3, 1, 3)]=(-1.14915977201+1.06191021646j)*(1+2.*(dim-1)/(o+1.)) + ((-0.480247003712+1.24206920666j))*dim
            arg[(0, 3, 2, 0)]=(-0.391055719551+0.159218773809j)*x[0]**o + ((-0.881285806453+0.886455711628j))*x[0] + ((0.893168588483-0.748944530317j))*x[1]**o + ((-0.0625921406029-0.554050619835j))*x[1] + ((0.684132474907-0.832224493649j))*x[2]**o + ((-0.864862798276+0.0911985385335j))*x[2]
            ref[(0, 3, 2, 0)]=(1.18624534384-1.42195025016j)*(1+2.*(dim-1)/(o+1.)) + ((-1.80874074533+0.423603630326j))*dim
            arg[(0, 3, 2, 1)]=(-0.156737948216+0.230408272139j)*x[0]**o + ((0.472082248215+0.283768272069j))*x[0] + ((0.0396689029226-0.0771509632575j))*x[1]**o + ((0.859829148091+0.634657553235j))*x[1] + ((0.238878676328+0.133051802705j))*x[2]**o + ((-0.742518961404-0.30920010654j))*x[2]
            ref[(0, 3, 2, 1)]=(0.121809631035+0.286309111587j)*(1+2.*(dim-1)/(o+1.)) + ((0.589392434902+0.609225718763j))*dim
            arg[(0, 3, 2, 2)]=(-0.699764313098-0.833923450886j)*x[0]**o + ((-0.721288877193-0.153876630551j))*x[0] + ((0.461962086714-0.0626496352906j))*x[1]**o + ((0.289653182781-0.986677746254j))*x[1] + ((-0.936296326737+0.58039908999j))*x[2]**o + ((-0.231479568939+0.733151426157j))*x[2]
            ref[(0, 3, 2, 2)]=(-1.17409855312-0.316173996186j)*(1+2.*(dim-1)/(o+1.)) + ((-0.663115263351-0.407402950648j))*dim
            arg[(0, 3, 2, 3)]=(-0.682427157168-0.912562896556j)*x[0]**o + ((0.539868662289+0.114946927229j))*x[0] + ((0.915996570158-0.27743572771j))*x[1]**o + ((-0.66451197451+0.75713791497j))*x[1] + ((-0.868568545758-0.478403132079j))*x[2]**o + ((-0.978999461668-0.301710835331j))*x[2]
            ref[(0, 3, 2, 3)]=(-0.634999132768-1.66840175634j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10364277389+0.570374006868j))*dim
            arg[(1, 0, 0, 0)]=(-0.169402232148+0.723869877651j)*x[0]**o + ((0.549068587872+0.620611722639j))*x[0] + ((0.801973643057+0.172073906755j))*x[1]**o + ((0.327862490131+0.121582346755j))*x[1] + ((-0.998906599848-0.861015686502j))*x[2]**o + ((-0.120254048547+0.980998988422j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.366335188939+0.034928097904j)*(1+2.*(dim-1)/(o+1.)) + ((0.756677029456+1.72319305782j))*dim
            arg[(1, 0, 0, 1)]=(0.683543939174+0.437222379362j)*x[0]**o + ((-0.975958375135+0.0166714055745j))*x[0] + ((0.427213903421+0.918846351888j))*x[1]**o + ((0.65347476657+0.157553752063j))*x[1] + ((0.688502513218+0.79413919803j))*x[2]**o + ((-0.0578938257705+0.147097296809j))*x[2]
            ref[(1, 0, 0, 1)]=(1.79926035581+2.15020792928j)*(1+2.*(dim-1)/(o+1.)) + ((-0.380377434335+0.321322454446j))*dim
            arg[(1, 0, 0, 2)]=(0.291501015251-0.494772851082j)*x[0]**o + ((0.711041794548+0.395707655932j))*x[0] + ((-0.91189855624-0.155491363129j))*x[1]**o + ((0.302886376642-0.567831212888j))*x[1] + ((0.92784666769+0.700588286543j))*x[2]**o + ((0.724382400329-0.298218960932j))*x[2]
            ref[(1, 0, 0, 2)]=(0.307449126701+0.050324072332j)*(1+2.*(dim-1)/(o+1.)) + ((1.73831057152-0.470342517887j))*dim
            arg[(1, 0, 0, 3)]=(0.548659996077+0.764396699516j)*x[0]**o + ((0.623981495378+0.226378922359j))*x[0] + ((0.0539437075065-0.0769104101925j))*x[1]**o + ((-0.0241894637855+0.621278732731j))*x[1] + ((-0.359927838113+0.875159730724j))*x[2]**o + ((-0.168258766221-0.469299770149j))*x[2]
            ref[(1, 0, 0, 3)]=(0.24267586547+1.56264602005j)*(1+2.*(dim-1)/(o+1.)) + ((0.431533265372+0.378357884941j))*dim
            arg[(1, 0, 1, 0)]=(0.175489831343-0.068360216313j)*x[0]**o + ((0.116707085729-0.785937880813j))*x[0] + ((0.622495210449+0.756797130527j))*x[1]**o + ((-0.918714191266-0.931420993228j))*x[1] + ((-0.237391414011-0.894485479953j))*x[2]**o + ((0.887222704243-0.860907452816j))*x[2]
            ref[(1, 0, 1, 0)]=(0.560593627781-0.206048565739j)*(1+2.*(dim-1)/(o+1.)) + ((0.0852155987059-2.57826632686j))*dim
            arg[(1, 0, 1, 1)]=(0.927084860961+0.474557173313j)*x[0]**o + ((-0.625755021307+0.738674504352j))*x[0] + ((-0.909731218649-0.782564218159j))*x[1]**o + ((0.322962453993+0.55069037705j))*x[1] + ((-0.354989331011+0.839657819103j))*x[2]**o + ((-0.597848935435-0.181144761136j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.337635688699+0.531650774257j)*(1+2.*(dim-1)/(o+1.)) + ((-0.90064150275+1.10822012027j))*dim
            arg[(1, 0, 1, 2)]=(0.073706791196+0.984432061903j)*x[0]**o + ((0.716894760624+0.0419894107423j))*x[0] + ((-0.190637764248+0.639588055754j))*x[1]**o + ((-0.163128166877-0.127458895886j))*x[1] + ((0.350399125537-0.0354487668194j))*x[2]**o + ((0.83755421694+0.981178894513j))*x[2]
            ref[(1, 0, 1, 2)]=(0.233468152485+1.58857135084j)*(1+2.*(dim-1)/(o+1.)) + ((1.39132081069+0.895709409369j))*dim
            arg[(1, 0, 1, 3)]=(0.849340409559-0.559518816814j)*x[0]**o + ((0.15255206121-0.653861602012j))*x[0] + ((0.440300993148+0.758806666053j))*x[1]**o + ((0.861979665229-0.859793857089j))*x[1] + ((-0.0286674936262-0.390200465773j))*x[2]**o + ((-0.130236780864-0.647107462107j))*x[2]
            ref[(1, 0, 1, 3)]=(1.26097390908-0.190912616534j)*(1+2.*(dim-1)/(o+1.)) + ((0.884294945576-2.16076292121j))*dim
            arg[(1, 0, 2, 0)]=(-0.689084334105-0.611051840179j)*x[0]**o + ((0.743133834055+0.0356627565323j))*x[0] + ((-0.143343767606-0.573976808407j))*x[1]**o + ((-0.16254818597-0.561734435409j))*x[1] + ((0.362781301005-0.618297209177j))*x[2]**o + ((-0.857230104551-0.246567625701j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.469646800707-1.80332585776j)*(1+2.*(dim-1)/(o+1.)) + ((-0.276644456466-0.772639304577j))*dim
            arg[(1, 0, 2, 1)]=(-0.988839682673+0.172252477659j)*x[0]**o + ((-0.6332210646+0.960219044939j))*x[0] + ((0.797233607693-0.502763067793j))*x[1]**o + ((-0.781745888766-0.394343841108j))*x[1] + ((0.0811066381435-0.0537794932079j))*x[2]**o + ((-0.727425046891-0.735382326194j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.110499436837-0.384290083341j)*(1+2.*(dim-1)/(o+1.)) + ((-2.14239200026-0.169507122364j))*dim
            arg[(1, 0, 2, 2)]=(0.553761152623+0.799840409617j)*x[0]**o + ((0.0487451712169+0.983434600564j))*x[0] + ((0.185534649185-0.505934960838j))*x[1]**o + ((0.311630142172-0.0618837550885j))*x[1] + ((-0.769698752265-0.129630106978j))*x[2]**o + ((-0.405977413989-0.550299874041j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.0304029504572+0.164275341801j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0456021006001+0.371250971434j))*dim
            arg[(1, 0, 2, 3)]=(0.0928708704476-0.892573448312j)*x[0]**o + ((0.849767114515+0.663088540816j))*x[0] + ((0.253432251688+0.405188892078j))*x[1]**o + ((-0.700347181471-0.403514446907j))*x[1] + ((0.436469521387+0.811127974972j))*x[2]**o + ((-0.172257397331-0.150336454161j))*x[2]
            ref[(1, 0, 2, 3)]=(0.782772643522+0.323743418738j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0228374642867+0.109237639749j))*dim
            arg[(1, 1, 0, 0)]=(0.425746934952+0.10072570387j)*x[0]**o + ((0.872465937813-0.523491703164j))*x[0] + ((0.895867877779-0.231741728902j))*x[1]**o + ((-0.823774040994-0.443957090566j))*x[1] + ((0.199402985824-0.906566334077j))*x[2]**o + ((0.0923389643505-0.75546935583j))*x[2]
            ref[(1, 1, 0, 0)]=(1.52101779856-1.03758235911j)*(1+2.*(dim-1)/(o+1.)) + ((0.14103086117-1.72291814956j))*dim
            arg[(1, 1, 0, 1)]=(0.68144028164-0.736996991074j)*x[0]**o + ((-0.154949629-0.658197007765j))*x[0] + ((0.905208533402-0.787165816963j))*x[1]**o + ((0.561503683542+0.319122764159j))*x[1] + ((-0.484177298043-0.94425483562j))*x[2]**o + ((-0.390327491686-0.890988451421j))*x[2]
            ref[(1, 1, 0, 1)]=(1.102471517-2.46841764366j)*(1+2.*(dim-1)/(o+1.)) + ((0.0162265628563-1.23006269503j))*dim
            arg[(1, 1, 0, 2)]=(0.484337165472-0.21047686984j)*x[0]**o + ((0.727861236078-0.478346308817j))*x[0] + ((-0.841278955275-0.782125463806j))*x[1]**o + ((0.147817678008-0.107267208468j))*x[1] + ((0.373788762529+0.132502278169j))*x[2]**o + ((-0.248432065319-0.0849060503968j))*x[2]
            ref[(1, 1, 0, 2)]=(0.0168469727258-0.860100055477j)*(1+2.*(dim-1)/(o+1.)) + ((0.627246848767-0.670519567681j))*dim
            arg[(1, 1, 0, 3)]=(-0.605124981735-0.818224064488j)*x[0]**o + ((0.38786550788+0.618135712554j))*x[0] + ((-0.785014400115+0.848065631411j))*x[1]**o + ((0.0107988567369-0.148957409339j))*x[1] + ((-0.167604850338+0.0362314257977j))*x[2]**o + ((0.358999381828+0.577851683641j))*x[2]
            ref[(1, 1, 0, 3)]=(-1.55774423219+0.0660729927199j)*(1+2.*(dim-1)/(o+1.)) + ((0.757663746445+1.04702998686j))*dim
            arg[(1, 1, 1, 0)]=(-0.212941232908+0.362598189809j)*x[0]**o + ((0.635685613156-0.0279676361086j))*x[0] + ((0.535938502289+0.575875929859j))*x[1]**o + ((-0.497598608351-0.806525757947j))*x[1] + ((0.131057305155+0.2585999657j))*x[2]**o + ((0.402036401871-0.181333231437j))*x[2]
            ref[(1, 1, 1, 0)]=(0.454054574537+1.19707408537j)*(1+2.*(dim-1)/(o+1.)) + ((0.540123406676-1.01582662549j))*dim
            arg[(1, 1, 1, 1)]=(-0.474994223446+0.800316413544j)*x[0]**o + ((-0.852767992394-0.941780180319j))*x[0] + ((-0.259321410638+0.111008629166j))*x[1]**o + ((0.552601102136-0.102975630531j))*x[1] + ((0.54464688917+0.807172944199j))*x[2]**o + ((0.142731110645-0.69076828882j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.189668744914+1.71849798691j)*(1+2.*(dim-1)/(o+1.)) + ((-0.157435779613-1.73552409967j))*dim
            arg[(1, 1, 1, 2)]=(0.718366022178+0.365293285989j)*x[0]**o + ((0.351545482374+0.856450487489j))*x[0] + ((0.370459696621-0.488256055274j))*x[1]**o + ((-0.783748416894-0.443644789579j))*x[1] + ((0.717541234646-0.144884060901j))*x[2]**o + ((-0.854991949603+0.388378685683j))*x[2]
            ref[(1, 1, 1, 2)]=(1.80636695345-0.267846830185j)*(1+2.*(dim-1)/(o+1.)) + ((-1.28719488412+0.801184383593j))*dim
            arg[(1, 1, 1, 3)]=(-0.602017467476-0.362054774502j)*x[0]**o + ((0.378747500277-0.753996444193j))*x[0] + ((-0.909615775476-0.482402669715j))*x[1]**o + ((-0.118678611082-0.754799298131j))*x[1] + ((-0.745402025865-0.193694642601j))*x[2]**o + ((0.708255973826-0.586599086139j))*x[2]
            ref[(1, 1, 1, 3)]=(-2.25703526882-1.03815208682j)*(1+2.*(dim-1)/(o+1.)) + ((0.96832486302-2.09539482846j))*dim
            arg[(1, 1, 2, 0)]=(0.319159336415-0.118433093905j)*x[0]**o + ((-0.536919592588-0.654439940299j))*x[0] + ((0.921554150988+0.305739306415j))*x[1]**o + ((-0.221332517808+0.65367837782j))*x[1] + ((-0.653296805226-0.870001343611j))*x[2]**o + ((0.762241353684-0.977582480891j))*x[2]
            ref[(1, 1, 2, 0)]=(0.587416682177-0.682695131102j)*(1+2.*(dim-1)/(o+1.)) + ((0.00398924328868-0.978344043371j))*dim
            arg[(1, 1, 2, 1)]=(-0.011305795927+0.440899822609j)*x[0]**o + ((-0.808657497197+0.0126254775436j))*x[0] + ((-0.326351250686-0.660415483077j))*x[1]**o + ((-0.724779425811-0.112411864222j))*x[1] + ((0.566973373179+0.989303557567j))*x[2]**o + ((-0.585587834019-0.428047313736j))*x[2]
            ref[(1, 1, 2, 1)]=(0.229316326567+0.769787897098j)*(1+2.*(dim-1)/(o+1.)) + ((-2.11902475703-0.527833700413j))*dim
            arg[(1, 1, 2, 2)]=(0.946371281793+0.761127002906j)*x[0]**o + ((-0.400837014104+0.0634178064556j))*x[0] + ((-0.748492822588+0.322401426922j))*x[1]**o + ((-0.479694995214+0.0864527320601j))*x[1] + ((-0.566639117012-0.00239713058075j))*x[2]**o + ((-0.736255779108+0.439289970085j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.368760657807+1.08113129925j)*(1+2.*(dim-1)/(o+1.)) + ((-1.61678778843+0.589160508601j))*dim
            arg[(1, 1, 2, 3)]=(0.785044461582-0.176189742351j)*x[0]**o + ((-0.47240089555-0.937475053957j))*x[0] + ((-0.193142052753+0.869148580568j))*x[1]**o + ((-0.493767652526+0.0560400171827j))*x[1] + ((0.830662305697-0.806763819025j))*x[2]**o + ((-0.659118818109-0.0771181839444j))*x[2]
            ref[(1, 1, 2, 3)]=(1.42256471453-0.113804980808j)*(1+2.*(dim-1)/(o+1.)) + ((-1.62528736619-0.958553220719j))*dim
            arg[(1, 2, 0, 0)]=(-0.34127017452-0.74449924053j)*x[0]**o + ((0.923356765147-0.8774604867j))*x[0] + ((0.269176620541-0.983329874008j))*x[1]**o + ((-0.379424739561-0.522810847052j))*x[1] + ((0.362410592665-0.450280321566j))*x[2]**o + ((0.377467258609+0.856970837775j))*x[2]
            ref[(1, 2, 0, 0)]=(0.290317038686-2.1781094361j)*(1+2.*(dim-1)/(o+1.)) + ((0.921399284195-0.543300495977j))*dim
            arg[(1, 2, 0, 1)]=(-0.00547934635069-0.936728487188j)*x[0]**o + ((-0.405836966857-0.3813372489j))*x[0] + ((0.0652166976045+0.398353005591j))*x[1]**o + ((0.75158890748-0.390148470484j))*x[1] + ((0.504017966153-0.0226122369129j))*x[2]**o + ((0.993377603324+0.5734438995j))*x[2]
            ref[(1, 2, 0, 1)]=(0.563755317407-0.56098771851j)*(1+2.*(dim-1)/(o+1.)) + ((1.33912954395-0.198041819885j))*dim
            arg[(1, 2, 0, 2)]=(-0.815608957388-0.503638873305j)*x[0]**o + ((-0.916872134716+0.912741930355j))*x[0] + ((-0.958093953105+0.32943055569j))*x[1]**o + ((0.77669002462-0.542072367333j))*x[1] + ((-0.119663912777-0.351856024551j))*x[2]**o + ((0.256394758824+0.550279432731j))*x[2]
            ref[(1, 2, 0, 2)]=(-1.89336682327-0.526064342167j)*(1+2.*(dim-1)/(o+1.)) + ((0.116212648728+0.920948995753j))*dim
            arg[(1, 2, 0, 3)]=(0.906334306228-0.528825390206j)*x[0]**o + ((-0.0440908494606-0.535392011124j))*x[0] + ((0.565789534396-0.267554058548j))*x[1]**o + ((0.282994250636-0.0212833820457j))*x[1] + ((-0.0050645305224-0.855172941688j))*x[2]**o + ((0.220540650797-0.390889710713j))*x[2]
            ref[(1, 2, 0, 3)]=(1.4670593101-1.65155239044j)*(1+2.*(dim-1)/(o+1.)) + ((0.459444051973-0.947565103883j))*dim
            arg[(1, 2, 1, 0)]=(-0.542483339128+0.745881894331j)*x[0]**o + ((-0.502124162223-0.0259436437073j))*x[0] + ((0.640063899636-0.876391063789j))*x[1]**o + ((0.744959579694-0.203277832717j))*x[1] + ((0.458993513137+0.455945971632j))*x[2]**o + ((-0.198839047151+0.614347182091j))*x[2]
            ref[(1, 2, 1, 0)]=(0.556574073644+0.325436802174j)*(1+2.*(dim-1)/(o+1.)) + ((0.0439963703205+0.385125705666j))*dim
            arg[(1, 2, 1, 1)]=(-0.720846889514-0.228601207454j)*x[0]**o + ((-0.728542272817-0.97214467549j))*x[0] + ((0.254030868353+0.232133214109j))*x[1]**o + ((-0.819614787919+0.132422422691j))*x[1] + ((0.029412432404+0.0213197655626j))*x[2]**o + ((0.207096693545+0.628304411232j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.437403588757+0.024851772218j)*(1+2.*(dim-1)/(o+1.)) + ((-1.34106036719-0.211417841567j))*dim
            arg[(1, 2, 1, 2)]=(0.0385126969068-0.302726850897j)*x[0]**o + ((-0.068614349704-0.0440620162816j))*x[0] + ((0.0437486719624+0.501522379115j))*x[1]**o + ((0.315091761447+0.711874523911j))*x[1] + ((-0.618077092633-0.0859369527136j))*x[2]**o + ((-0.367096132713-0.325128987027j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.535815723763+0.112858575504j)*(1+2.*(dim-1)/(o+1.)) + ((-0.12061872097+0.342683520603j))*dim
            arg[(1, 2, 1, 3)]=(0.990105799275+0.0227508108402j)*x[0]**o + ((-0.556359288655-0.394298350364j))*x[0] + ((0.647805323717+0.227681741145j))*x[1]**o + ((-0.771179696499+0.090922664361j))*x[1] + ((-0.843886074979+0.387120873418j))*x[2]**o + ((0.952870265439-0.716549705239j))*x[2]
            ref[(1, 2, 1, 3)]=(0.794025048013+0.637553425403j)*(1+2.*(dim-1)/(o+1.)) + ((-0.374668719715-1.01992539124j))*dim
            arg[(1, 2, 2, 0)]=(-0.130847737913-0.727306500591j)*x[0]**o + ((-0.136401493158-0.477771158458j))*x[0] + ((0.974381422146+0.761246196293j))*x[1]**o + ((0.964390630826-0.532262985669j))*x[1] + ((-0.729766207174+0.374940095705j))*x[2]**o + ((0.628666061707-0.766663356466j))*x[2]
            ref[(1, 2, 2, 0)]=(0.11376747706+0.408879791406j)*(1+2.*(dim-1)/(o+1.)) + ((1.45665519937-1.77669750059j))*dim
            arg[(1, 2, 2, 1)]=(-0.897631559068-0.393447305467j)*x[0]**o + ((0.447450734588-0.335094065105j))*x[0] + ((0.737217146201-0.778699756879j))*x[1]**o + ((-0.857019631945+0.67114996615j))*x[1] + ((-0.666332573941-0.834491151544j))*x[2]**o + ((0.558003271393+0.49282621607j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.826746986808-2.00663821389j)*(1+2.*(dim-1)/(o+1.)) + ((0.148434374035+0.828882117115j))*dim
            arg[(1, 2, 2, 2)]=(0.23554151207-0.859489955183j)*x[0]**o + ((-0.755576421316-0.0767411984708j))*x[0] + ((-0.0845953871579+0.0296279534215j))*x[1]**o + ((0.26470794641-0.968599461562j))*x[1] + ((-0.338391928789-0.393575247471j))*x[2]**o + ((0.907500437238-0.963945072196j))*x[2]
            ref[(1, 2, 2, 2)]=(-0.187445803876-1.22343724923j)*(1+2.*(dim-1)/(o+1.)) + ((0.416631962332-2.00928573223j))*dim
            arg[(1, 2, 2, 3)]=(0.620215970805+0.529865948557j)*x[0]**o + ((0.153864894561-0.898040650359j))*x[0] + ((-0.00684066473625-0.881867229899j))*x[1]**o + ((-0.241813175451+0.530265833348j))*x[1] + ((-0.394264559358+0.678252392491j))*x[2]**o + ((-0.287400122672-0.0502046832815j))*x[2]
            ref[(1, 2, 2, 3)]=(0.219110746711+0.326251111148j)*(1+2.*(dim-1)/(o+1.)) + ((-0.375348403562-0.417979500292j))*dim
            arg[(1, 3, 0, 0)]=(-0.768007649475+0.0213690979919j)*x[0]**o + ((-0.864746749568-0.910241413375j))*x[0] + ((-0.459344485584+0.703836374266j))*x[1]**o + ((-0.41659832578+0.811547799718j))*x[1] + ((-0.994630641385-0.514106341077j))*x[2]**o + ((-0.836848805154+0.817453328328j))*x[2]
            ref[(1, 3, 0, 0)]=(-2.22198277644+0.211099131181j)*(1+2.*(dim-1)/(o+1.)) + ((-2.1181938805+0.718759714671j))*dim
            arg[(1, 3, 0, 1)]=(0.995181730701-0.878178780993j)*x[0]**o + ((0.508355576605+0.769957858441j))*x[0] + ((0.507317986078-0.583805869725j))*x[1]**o + ((0.916826308875-0.344654679602j))*x[1] + ((0.6813797986-0.130438378294j))*x[2]**o + ((-0.372218283487+0.730224669647j))*x[2]
            ref[(1, 3, 0, 1)]=(2.18387951538-1.59242302901j)*(1+2.*(dim-1)/(o+1.)) + ((1.05296360199+1.15552784849j))*dim
            arg[(1, 3, 0, 2)]=(-0.705334714324-0.412183045424j)*x[0]**o + ((-0.0655551434498+0.815110473227j))*x[0] + ((0.81276981148+0.839315182456j))*x[1]**o + ((0.280098406316+0.0302161391381j))*x[1] + ((-0.61222517201-0.4496360026j))*x[2]**o + ((0.375264422704-0.365948445971j))*x[2]
            ref[(1, 3, 0, 2)]=(-0.504790074855-0.0225038655684j)*(1+2.*(dim-1)/(o+1.)) + ((0.589807685571+0.479378166395j))*dim
            arg[(1, 3, 0, 3)]=(0.401900303579+0.43614850781j)*x[0]**o + ((-0.440575219243-0.445515528202j))*x[0] + ((0.740865702272-0.162400161528j))*x[1]**o + ((0.161457305063+0.867110045035j))*x[1] + ((0.51109348263+0.421231844528j))*x[2]**o + ((0.132318490874-0.401986174592j))*x[2]
            ref[(1, 3, 0, 3)]=(1.65385948848+0.694980190811j)*(1+2.*(dim-1)/(o+1.)) + ((-0.146799423306+0.0196083422409j))*dim
            arg[(1, 3, 1, 0)]=(0.72994317077-0.0654959876761j)*x[0]**o + ((-0.611273041453+0.198171777226j))*x[0] + ((-0.226666741324-0.32730984915j))*x[1]**o + ((0.171353970925+0.388696494763j))*x[1] + ((0.563589543291+0.232542803923j))*x[2]**o + ((0.402278462908+0.973692235422j))*x[2]
            ref[(1, 3, 1, 0)]=(1.06686597274-0.160263032903j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0376406076199+1.56056050741j))*dim
            arg[(1, 3, 1, 1)]=(-0.980047440785-0.957320965594j)*x[0]**o + ((-0.192488377513+0.814423454638j))*x[0] + ((0.488501844627-0.631385170258j))*x[1]**o + ((0.170914356701+0.887260478294j))*x[1] + ((-0.000206995952564+0.510980953005j))*x[2]**o + ((0.605235896949+0.273488498025j))*x[2]
            ref[(1, 3, 1, 1)]=(-0.491752592111-1.07772518285j)*(1+2.*(dim-1)/(o+1.)) + ((0.583661876138+1.97517243096j))*dim
            arg[(1, 3, 1, 2)]=(-0.948186770039-0.493709549488j)*x[0]**o + ((0.673331485592-0.912364001321j))*x[0] + ((-0.429516692107-0.865132488672j))*x[1]**o + ((0.41175879221-0.626323737612j))*x[1] + ((0.215084849016+0.155405087486j))*x[2]**o + ((0.252165350107+0.912475575069j))*x[2]
            ref[(1, 3, 1, 2)]=(-1.16261861313-1.20343695067j)*(1+2.*(dim-1)/(o+1.)) + ((1.33725562791-0.626212163863j))*dim
            arg[(1, 3, 1, 3)]=(-0.384448759772+0.0957531510649j)*x[0]**o + ((-0.0330987783781+0.342145628779j))*x[0] + ((-0.127807580084+0.899414199724j))*x[1]**o + ((0.910618169043-0.185152041609j))*x[1] + ((0.702034263665+0.468306349313j))*x[2]**o + ((0.782341066683-0.299471258447j))*x[2]
            ref[(1, 3, 1, 3)]=(0.189777923808+1.4634737001j)*(1+2.*(dim-1)/(o+1.)) + ((1.65986045735-0.142477671277j))*dim
            arg[(1, 3, 2, 0)]=(-0.349538291054-0.984311927182j)*x[0]**o + ((-0.0730879605975+0.803370917806j))*x[0] + ((-0.742775070472-0.281058049312j))*x[1]**o + ((-0.804221248814+0.254251571195j))*x[1] + ((-0.630572764746+0.00947003559451j))*x[2]**o + ((-0.484933158343+0.630811284214j))*x[2]
            ref[(1, 3, 2, 0)]=(-1.72288612627-1.2558999409j)*(1+2.*(dim-1)/(o+1.)) + ((-1.36224236775+1.68843377321j))*dim
            arg[(1, 3, 2, 1)]=(0.374134080471+0.0486865106836j)*x[0]**o + ((-0.0565061733636+0.61422059601j))*x[0] + ((-0.980930951384-0.276738087912j))*x[1]**o + ((-0.0284862148296-0.325234362984j))*x[1] + ((-0.654642399881-0.908230476553j))*x[2]**o + ((0.923645725154-0.00304394057302j))*x[2]
            ref[(1, 3, 2, 1)]=(-1.26143927079-1.13628205378j)*(1+2.*(dim-1)/(o+1.)) + ((0.83865333696+0.285942292453j))*dim
            arg[(1, 3, 2, 2)]=(0.471596428809+0.100785790198j)*x[0]**o + ((-0.400217740035-0.638054897327j))*x[0] + ((0.1244587968-0.878079869096j))*x[1]**o + ((-0.819340359973+0.176397501481j))*x[1] + ((-0.11390355987+0.320897165193j))*x[2]**o + ((-0.27946986202+0.986759878804j))*x[2]
            ref[(1, 3, 2, 2)]=(0.482151665738-0.456396913705j)*(1+2.*(dim-1)/(o+1.)) + ((-1.49902796203+0.525102482958j))*dim
            arg[(1, 3, 2, 3)]=(0.119226985533-0.953927413315j)*x[0]**o + ((-0.719788307053-0.732293998854j))*x[0] + ((-0.246409581332+0.610402308752j))*x[1]**o + ((-0.97995836647-0.58045953195j))*x[1] + ((0.237544685243+0.287139387819j))*x[2]**o + ((0.468504681088-0.700616115814j))*x[2]
            ref[(1, 3, 2, 3)]=(0.110362089444-0.0563857167442j)*(1+2.*(dim-1)/(o+1.)) + ((-1.23124199244-2.01336964662j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.976878000244+0.323541437159j)*x[0]**o + ((0.785467134174-0.334266802263j))*x[0] + ((-0.694821583844-0.0953612586318j))*x[1]**o + ((-0.536456141283+0.774459168934j))*x[1]
            ref=(-1.67169958409+0.228180178527j)*(1+2.*(dim-1)/(o+1.)) + ((0.249010992891+0.44019236667j))*dim
        else:
            arg=(-0.78969565121-0.224858777839j)*x[0]**o + ((0.305115723608+0.206137638863j))*x[0] + ((0.155763876755+0.640717277988j))*x[1]**o + ((-0.860839319161-0.119430388063j))*x[1] + ((0.293031169331-0.697497889901j))*x[2]**o + ((0.473149201257-0.337594117138j))*x[2]
            ref=(-0.340900605123-0.281639389752j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0825743942966-0.250886866339j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.239419316459-0.860224399558j)*x[0]**o + ((0.101006402419-0.545007018286j))*x[0] + ((-0.799094825353-0.415067885865j))*x[1]**o + ((-0.0668867627279+0.384809702868j))*x[1]
            ref[(0,)]=(-1.03851414181-1.27529228542j)*(1+2.*(dim-1)/(o+1.)) + ((0.0341196396911-0.160197315418j))*dim
            arg[(1,)]=(0.676958645193-0.479880606465j)*x[0]**o + ((0.28761677357+0.60791142678j))*x[0] + ((0.501518375699+0.134257529234j))*x[1]**o + ((-0.667344754485-0.144902808787j))*x[1]
            ref[(1,)]=(1.17847702089-0.345623077231j)*(1+2.*(dim-1)/(o+1.)) + ((-0.379727980915+0.463008617993j))*dim
        else:
            arg[(0,)]=(0.217216895933+0.0940987040237j)*x[0]**o + ((-0.891587178817+0.0249231069339j))*x[0] + ((0.783065364699-0.503566511087j))*x[1]**o + ((0.0389635958782-0.451069019759j))*x[1] + ((0.0331163639087-0.850475786j))*x[2]**o + ((-0.0126803262323-0.803302321586j))*x[2]
            ref[(0,)]=(1.03339862454-1.25994359306j)*(1+2.*(dim-1)/(o+1.)) + ((-0.865303909171-1.22944823441j))*dim
            arg[(1,)]=(-0.552723142576+0.61939367774j)*x[0]**o + ((0.0575606557937+0.0236077171996j))*x[0] + ((0.0339076030471+0.887188725083j))*x[1]**o + ((-0.043147461755+0.207858848164j))*x[1] + ((0.511645436329-0.216833268084j))*x[2]**o + ((0.809086988616-0.515136387202j))*x[2]
            ref[(1,)]=(-0.00717010319991+1.28974913474j)*(1+2.*(dim-1)/(o+1.)) + ((0.823500182655-0.283669821839j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref=numpy.zeros((4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.728893796233+0.609847260281j)*x[0]**o + ((0.375426733699+0.569095641377j))*x[0] + ((0.386841559073+0.134457426122j))*x[1]**o + ((-0.775080700678-0.361392367341j))*x[1]
            ref[(0, 0)]=(1.11573535531+0.744304686404j)*(1+2.*(dim-1)/(o+1.)) + ((-0.399653966979+0.207703274036j))*dim
            arg[(0, 1)]=(0.313156451543-0.633550274595j)*x[0]**o + ((0.964060873372-0.654559811523j))*x[0] + ((0.346399905262-0.657185260028j))*x[1]**o + ((0.0725880258497+0.881905176898j))*x[1]
            ref[(0, 1)]=(0.659556356805-1.29073553462j)*(1+2.*(dim-1)/(o+1.)) + ((1.03664889922+0.227345365375j))*dim
            arg[(0, 2)]=(0.80315096066-0.395373210355j)*x[0]**o + ((0.477530591633+0.498725104098j))*x[0] + ((0.368126948988+0.417328838097j))*x[1]**o + ((-0.862888736091+0.60728411491j))*x[1]
            ref[(0, 2)]=(1.17127790965+0.0219556277423j)*(1+2.*(dim-1)/(o+1.)) + ((-0.385358144458+1.10600921901j))*dim
            arg[(1, 0)]=(-0.812438354077-0.444355312773j)*x[0]**o + ((-0.777703225729-0.989131794361j))*x[0] + ((-0.482977730062-0.538062813468j))*x[1]**o + ((-0.0620840521635-0.797636538533j))*x[1]
            ref[(1, 0)]=(-1.29541608414-0.982418126241j)*(1+2.*(dim-1)/(o+1.)) + ((-0.839787277893-1.78676833289j))*dim
            arg[(1, 1)]=(-0.950295199367-0.132602532296j)*x[0]**o + ((0.798410361249+0.32997579905j))*x[0] + ((-0.129971542072-0.97466416798j))*x[1]**o + ((-0.59190133288+0.103046473432j))*x[1]
            ref[(1, 1)]=(-1.08026674144-1.10726670028j)*(1+2.*(dim-1)/(o+1.)) + ((0.20650902837+0.433022272481j))*dim
            arg[(1, 2)]=(0.027630046615-0.631407359705j)*x[0]**o + ((0.712713277541+0.309078424714j))*x[0] + ((-0.637736849044-0.974051640699j))*x[1]**o + ((-0.0286966688096-0.839520687947j))*x[1]
            ref[(1, 2)]=(-0.610106802429-1.6054590004j)*(1+2.*(dim-1)/(o+1.)) + ((0.684016608731-0.530442263233j))*dim
            arg[(2, 0)]=(-0.429213235675+0.326378998921j)*x[0]**o + ((0.0561356889089+0.0536765716093j))*x[0] + ((-0.616152443481+0.125412908396j))*x[1]**o + ((0.434394980215-0.933414909989j))*x[1]
            ref[(2, 0)]=(-1.04536567916+0.451791907318j)*(1+2.*(dim-1)/(o+1.)) + ((0.490530669123-0.87973833838j))*dim
            arg[(2, 1)]=(-0.144460479747-0.322914802549j)*x[0]**o + ((0.581102249244-0.29061482812j))*x[0] + ((0.0400062868011-0.870950590725j))*x[1]**o + ((-0.675706911509-0.325613690633j))*x[1]
            ref[(2, 1)]=(-0.104454192946-1.19386539327j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0946046622648-0.616228518752j))*dim
            arg[(2, 2)]=(-0.448378973166-0.396390186101j)*x[0]**o + ((-0.866683449354-0.487199336449j))*x[0] + ((-0.0577865039406-0.810761146098j))*x[1]**o + ((0.108371468688-0.738547944074j))*x[1]
            ref[(2, 2)]=(-0.506165477107-1.2071513322j)*(1+2.*(dim-1)/(o+1.)) + ((-0.758311980666-1.22574728052j))*dim
            arg[(3, 0)]=(0.82278746834-0.0469966357865j)*x[0]**o + ((0.205112726308-0.159585788096j))*x[0] + ((-0.998698716427-0.672540354171j))*x[1]**o + ((-0.826883015295+0.280482752401j))*x[1]
            ref[(3, 0)]=(-0.175911248087-0.719536989958j)*(1+2.*(dim-1)/(o+1.)) + ((-0.621770288987+0.120896964305j))*dim
            arg[(3, 1)]=(-0.826566928141-0.151371874451j)*x[0]**o + ((-0.412099935583+0.432891690834j))*x[0] + ((-0.763817599841-0.0199891874846j))*x[1]**o + ((-0.702572079903+0.695138715557j))*x[1]
            ref[(3, 1)]=(-1.59038452798-0.171361061936j)*(1+2.*(dim-1)/(o+1.)) + ((-1.11467201549+1.12803040639j))*dim
            arg[(3, 2)]=(-0.840087888758-0.845975244805j)*x[0]**o + ((0.543047698148-0.555601135507j))*x[0] + ((0.231218969056-0.380968896982j))*x[1]**o + ((-0.553636241874+0.662913202509j))*x[1]
            ref[(3, 2)]=(-0.608868919702-1.22694414179j)*(1+2.*(dim-1)/(o+1.)) + ((-0.010588543726+0.107312067003j))*dim
        else:
            arg[(0, 0)]=(0.727218709301+0.592155062742j)*x[0]**o + ((-0.601598475615-0.0481178839906j))*x[0] + ((-0.866405398775+0.903274524441j))*x[1]**o + ((-0.675591335357-0.159892160003j))*x[1] + ((0.991316066538-0.267781804494j))*x[2]**o + ((0.749224504081-0.0718676232158j))*x[2]
            ref[(0, 0)]=(0.852129377064+1.22764778269j)*(1+2.*(dim-1)/(o+1.)) + ((-0.52796530689-0.279877667209j))*dim
            arg[(0, 1)]=(-0.20817684799-0.911032761157j)*x[0]**o + ((-0.934293323345-0.505061905359j))*x[0] + ((-0.0189722130153+0.108510960482j))*x[1]**o + ((0.49016422516-0.0670216618515j))*x[1] + ((-0.831959627445-0.440151690164j))*x[2]**o + ((-0.410970245707+0.0221120451437j))*x[2]
            ref[(0, 1)]=(-1.05910868845-1.24267349084j)*(1+2.*(dim-1)/(o+1.)) + ((-0.855099343892-0.549971522067j))*dim
            arg[(0, 2)]=(0.216850769596+0.329617838656j)*x[0]**o + ((0.273778126476-0.3182890961j))*x[0] + ((0.949084220938-0.143731835015j))*x[1]**o + ((0.211131020855-0.578059982171j))*x[1] + ((-0.0336102281496-0.803708287168j))*x[2]**o + ((0.855353874769+0.244271134143j))*x[2]
            ref[(0, 2)]=(1.13232476238-0.617822283527j)*(1+2.*(dim-1)/(o+1.)) + ((1.3402630221-0.652077944129j))*dim
            arg[(1, 0)]=(-0.595376793601-0.892094847996j)*x[0]**o + ((0.488221600628+0.0593435988011j))*x[0] + ((0.885872773465+0.656556464075j))*x[1]**o + ((-0.553619282757-0.247636046409j))*x[1] + ((-0.553772095373-0.794048043569j))*x[2]**o + ((-0.355435394226-0.492500819955j))*x[2]
            ref[(1, 0)]=(-0.26327611551-1.02958642749j)*(1+2.*(dim-1)/(o+1.)) + ((-0.420833076355-0.680793267563j))*dim
            arg[(1, 1)]=(-0.17897733418+0.137793449864j)*x[0]**o + ((-0.753423977544-0.741917578972j))*x[0] + ((0.821911587893+0.45499651471j))*x[1]**o + ((-0.295154027445-0.230475674517j))*x[1] + ((-0.354377684801+0.824488202817j))*x[2]**o + ((-0.480603065579+0.426046678967j))*x[2]
            ref[(1, 1)]=(0.288556568912+1.41727816739j)*(1+2.*(dim-1)/(o+1.)) + ((-1.52918107057-0.546346574522j))*dim
            arg[(1, 2)]=(-0.226935898677-0.779157604862j)*x[0]**o + ((0.829193077449-0.942265126012j))*x[0] + ((-0.44491728444-0.653681622744j))*x[1]**o + ((-0.152034761969-0.463384106402j))*x[1] + ((-0.619942363753-0.653306413122j))*x[2]**o + ((0.341937575546-0.197702621452j))*x[2]
            ref[(1, 2)]=(-1.29179554687-2.08614564073j)*(1+2.*(dim-1)/(o+1.)) + ((1.01909589103-1.60335185387j))*dim
            arg[(2, 0)]=(0.910752312611+0.672638230278j)*x[0]**o + ((0.653357932665-0.427560749113j))*x[0] + ((0.25103229939+0.0762292447552j))*x[1]**o + ((0.450261063744-0.974109915571j))*x[1] + ((-0.72739786185+0.805319245636j))*x[2]**o + ((0.46419283619+0.775546203881j))*x[2]
            ref[(2, 0)]=(0.434386750151+1.55418672067j)*(1+2.*(dim-1)/(o+1.)) + ((1.5678118326-0.626124460803j))*dim
            arg[(2, 1)]=(-0.200016182834-0.923493357894j)*x[0]**o + ((0.621811580441+0.233253002037j))*x[0] + ((-0.567263302661-0.19486070756j))*x[1]**o + ((-0.601850377141+0.310868955895j))*x[1] + ((0.0245456837217+0.659790444804j))*x[2]**o + ((-0.541290232336-0.536982181205j))*x[2]
            ref[(2, 1)]=(-0.742733801773-0.458563620651j)*(1+2.*(dim-1)/(o+1.)) + ((-0.521329029037+0.00713977672786j))*dim
            arg[(2, 2)]=(0.182747462505-0.548192595942j)*x[0]**o + ((-0.108714716979-0.803102236818j))*x[0] + ((0.21158491298+0.757265652381j))*x[1]**o + ((0.454698289026-0.206313755471j))*x[1] + ((0.795902972659+0.217292370424j))*x[2]**o + ((0.807904830777-0.267013680073j))*x[2]
            ref[(2, 2)]=(1.19023534814+0.426365426863j)*(1+2.*(dim-1)/(o+1.)) + ((1.15388840282-1.27642967236j))*dim
            arg[(3, 0)]=(-0.428921335601-0.490481388065j)*x[0]**o + ((-0.766373578405-0.975834907351j))*x[0] + ((-0.768811810876+0.255873780776j))*x[1]**o + ((0.271761491656-0.683635251142j))*x[1] + ((-0.646548628898+0.797696999896j))*x[2]**o + ((0.0225733521078+0.9728076063j))*x[2]
            ref[(3, 0)]=(-1.84428177538+0.563089392607j)*(1+2.*(dim-1)/(o+1.)) + ((-0.472038734641-0.686662552194j))*dim
            arg[(3, 1)]=(0.101483764523-0.361700229906j)*x[0]**o + ((0.675604703078+0.632816537197j))*x[0] + ((0.0600862463387+0.205758144239j))*x[1]**o + ((-0.347019518773-0.69020585958j))*x[1] + ((0.775190413277-0.906623995964j))*x[2]**o + ((0.851926235796-0.311743042541j))*x[2]
            ref[(3, 1)]=(0.936760424139-1.06256608163j)*(1+2.*(dim-1)/(o+1.)) + ((1.1805114201-0.369132364924j))*dim
            arg[(3, 2)]=(0.910514537375-0.628696476305j)*x[0]**o + ((-0.849990006723+0.584929180872j))*x[0] + ((-0.516603400088-0.997557184621j))*x[1]**o + ((0.972176687115+0.654433566622j))*x[1] + ((-0.672311809878-0.511071516807j))*x[2]**o + ((-0.203841103882-0.661344128286j))*x[2]
            ref[(3, 2)]=(-0.278400672592-2.13732517773j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0816544234904+0.578018619208j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref=numpy.zeros((4, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.741643231947+0.392529643397j)*x[0]**o + ((-0.641494359405+0.851048442851j))*x[0] + ((0.47726184457+0.552716949789j))*x[1]**o + ((-0.165794723857-0.563170485072j))*x[1]
            ref[(0, 0, 0)]=(-0.264381387377+0.945246593186j)*(1+2.*(dim-1)/(o+1.)) + ((-0.807289083263+0.287877957779j))*dim
            arg[(0, 0, 1)]=(0.430661806003-0.0531594910151j)*x[0]**o + ((0.667734622807+0.0224935132527j))*x[0] + ((0.789447592698+0.403594099569j))*x[1]**o + ((0.808678830808+0.24088023916j))*x[1]
            ref[(0, 0, 1)]=(1.2201093987+0.350434608554j)*(1+2.*(dim-1)/(o+1.)) + ((1.47641345361+0.263373752413j))*dim
            arg[(0, 0, 2)]=(0.626280980842+0.925126137839j)*x[0]**o + ((0.814334916131-0.802244478441j))*x[0] + ((-0.355159449475-0.705712819348j))*x[1]**o + ((-0.926206806547+0.602500256929j))*x[1]
            ref[(0, 0, 2)]=(0.271121531367+0.21941331849j)*(1+2.*(dim-1)/(o+1.)) + ((-0.111871890416-0.199744221512j))*dim
            arg[(0, 0, 3)]=(0.27001057582+0.172130813988j)*x[0]**o + ((0.319255614272-0.815776115831j))*x[0] + ((-0.777859506941+0.146216817429j))*x[1]**o + ((0.296672805615+0.493371155672j))*x[1]
            ref[(0, 0, 3)]=(-0.507848931121+0.318347631417j)*(1+2.*(dim-1)/(o+1.)) + ((0.615928419886-0.322404960159j))*dim
            arg[(0, 1, 0)]=(0.487639465313-0.680140002471j)*x[0]**o + ((-0.708823387201+0.813769776372j))*x[0] + ((0.62776793915+0.38471503333j))*x[1]**o + ((-0.477043973778-0.0699160168364j))*x[1]
            ref[(0, 1, 0)]=(1.11540740446-0.29542496914j)*(1+2.*(dim-1)/(o+1.)) + ((-1.18586736098+0.743853759536j))*dim
            arg[(0, 1, 1)]=(-0.622829586222-0.543627235293j)*x[0]**o + ((-0.10190004007-0.0330857279156j))*x[0] + ((-0.72208357514-0.646791855013j))*x[1]**o + ((0.0177568593282+0.507117883275j))*x[1]
            ref[(0, 1, 1)]=(-1.34491316136-1.19041909031j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0841431807414+0.47403215536j))*dim
            arg[(0, 1, 2)]=(0.606773967082-0.594981747477j)*x[0]**o + ((0.619048241405+0.022199118627j))*x[0] + ((-0.358899642138-0.072114500233j))*x[1]**o + ((-0.101637637707+0.507715021391j))*x[1]
            ref[(0, 1, 2)]=(0.247874324944-0.66709624771j)*(1+2.*(dim-1)/(o+1.)) + ((0.517410603697+0.529914140018j))*dim
            arg[(0, 1, 3)]=(-0.911857249315-0.0659702787295j)*x[0]**o + ((0.383836862514-0.483854052132j))*x[0] + ((0.762262088654+0.123962266761j))*x[1]**o + ((-0.0709872733445+0.115667131837j))*x[1]
            ref[(0, 1, 3)]=(-0.14959516066+0.057991988031j)*(1+2.*(dim-1)/(o+1.)) + ((0.312849589169-0.368186920295j))*dim
            arg[(0, 2, 0)]=(0.200304803357+0.296823098174j)*x[0]**o + ((-0.327079388603-0.0360787084403j))*x[0] + ((-0.577217898557+0.0462172190496j))*x[1]**o + ((0.873255649943+0.287766081944j))*x[1]
            ref[(0, 2, 0)]=(-0.3769130952+0.343040317224j)*(1+2.*(dim-1)/(o+1.)) + ((0.54617626134+0.251687373503j))*dim
            arg[(0, 2, 1)]=(0.199816275081+0.193066591343j)*x[0]**o + ((-0.219672232602-0.401002595501j))*x[0] + ((0.138156617712-0.909772116415j))*x[1]**o + ((-0.585429544201+0.705596979406j))*x[1]
            ref[(0, 2, 1)]=(0.337972892793-0.716705525072j)*(1+2.*(dim-1)/(o+1.)) + ((-0.805101776804+0.304594383905j))*dim
            arg[(0, 2, 2)]=(0.244482525033+0.222817974975j)*x[0]**o + ((0.463110419932-0.0864592968799j))*x[0] + ((-0.92104262098-0.245686372894j))*x[1]**o + ((0.494042241491-0.667237528301j))*x[1]
            ref[(0, 2, 2)]=(-0.676560095947-0.0228683979185j)*(1+2.*(dim-1)/(o+1.)) + ((0.957152661423-0.753696825181j))*dim
            arg[(0, 2, 3)]=(0.924333839928+0.629407662732j)*x[0]**o + ((-0.560656559015-0.741643019804j))*x[0] + ((-0.0321473294715+0.719702061587j))*x[1]**o + ((-0.331231200979+0.30316878876j))*x[1]
            ref[(0, 2, 3)]=(0.892186510456+1.34910972432j)*(1+2.*(dim-1)/(o+1.)) + ((-0.891887759995-0.438474231044j))*dim
            arg[(0, 3, 0)]=(0.235997977614+0.0612643293819j)*x[0]**o + ((-0.463573099714+0.781256050312j))*x[0] + ((-0.479071650329-0.947093599034j))*x[1]**o + ((0.505588744845-0.504134611024j))*x[1]
            ref[(0, 3, 0)]=(-0.243073672715-0.885829269652j)*(1+2.*(dim-1)/(o+1.)) + ((0.0420156451314+0.277121439288j))*dim
            arg[(0, 3, 1)]=(-0.395929234943-0.441011539969j)*x[0]**o + ((-0.066264594006+0.571321448146j))*x[0] + ((0.863776867813-0.907828176023j))*x[1]**o + ((-0.962555607129-0.0944118028008j))*x[1]
            ref[(0, 3, 1)]=(0.46784763287-1.34883971599j)*(1+2.*(dim-1)/(o+1.)) + ((-1.02882020114+0.476909645345j))*dim
            arg[(0, 3, 2)]=(-0.00810251547872-0.645752376646j)*x[0]**o + ((0.5053628896+0.64770013442j))*x[0] + ((-0.849342037729-0.741271715678j))*x[1]**o + ((0.631094188974+0.126469822912j))*x[1]
            ref[(0, 3, 2)]=(-0.857444553207-1.38702409232j)*(1+2.*(dim-1)/(o+1.)) + ((1.13645707857+0.774169957332j))*dim
            arg[(0, 3, 3)]=(-0.231361555653+0.543075013592j)*x[0]**o + ((0.337529374031-0.754536442775j))*x[0] + ((-0.529198218267-0.142238460901j))*x[1]**o + ((-0.602610178671+0.0517901557943j))*x[1]
            ref[(0, 3, 3)]=(-0.76055977392+0.40083655269j)*(1+2.*(dim-1)/(o+1.)) + ((-0.26508080464-0.70274628698j))*dim
            arg[(1, 0, 0)]=(-0.20963005681+0.515459866041j)*x[0]**o + ((-0.244980033803+0.906805247311j))*x[0] + ((-0.79470853301-0.975870952522j))*x[1]**o + ((-0.0212191665904+0.073719206709j))*x[1]
            ref[(1, 0, 0)]=(-1.00433858982-0.460411086481j)*(1+2.*(dim-1)/(o+1.)) + ((-0.266199200393+0.98052445402j))*dim
            arg[(1, 0, 1)]=(0.183069163626-0.580101525363j)*x[0]**o + ((0.820429602407+0.279143312311j))*x[0] + ((-0.992578811929-0.536741177669j))*x[1]**o + ((0.864428577459+0.555800606504j))*x[1]
            ref[(1, 0, 1)]=(-0.809509648302-1.11684270303j)*(1+2.*(dim-1)/(o+1.)) + ((1.68485817987+0.834943918815j))*dim
            arg[(1, 0, 2)]=(0.0531799710127-0.197722176745j)*x[0]**o + ((-0.413998245333+0.765764048095j))*x[0] + ((-0.14430934083+0.189508512663j))*x[1]**o + ((-0.322375855284+0.898378972599j))*x[1]
            ref[(1, 0, 2)]=(-0.0911293698172-0.00821366408209j)*(1+2.*(dim-1)/(o+1.)) + ((-0.736374100617+1.66414302069j))*dim
            arg[(1, 0, 3)]=(0.836549139976-0.835590459598j)*x[0]**o + ((0.309680207068+0.730175460607j))*x[0] + ((-0.852514952207-0.0367066056843j))*x[1]**o + ((0.389203825664-0.578920374798j))*x[1]
            ref[(1, 0, 3)]=(-0.0159658122309-0.872297065283j)*(1+2.*(dim-1)/(o+1.)) + ((0.698884032732+0.15125508581j))*dim
            arg[(1, 1, 0)]=(-0.570885874212+0.406232127912j)*x[0]**o + ((-0.407015955751+0.320157888082j))*x[0] + ((-0.74482472444+0.0558211605104j))*x[1]**o + ((-0.953917603554+0.48446505164j))*x[1]
            ref[(1, 1, 0)]=(-1.31571059865+0.462053288422j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3609335593+0.804622939722j))*dim
            arg[(1, 1, 1)]=(0.959920199368+0.0913250743508j)*x[0]**o + ((-0.542763788032+0.113945808522j))*x[0] + ((-0.601864810366-0.348783957052j))*x[1]**o + ((0.574024370528+0.560407076457j))*x[1]
            ref[(1, 1, 1)]=(0.358055389002-0.257458882702j)*(1+2.*(dim-1)/(o+1.)) + ((0.0312605824961+0.674352884979j))*dim
            arg[(1, 1, 2)]=(-0.117999242604-0.373777707355j)*x[0]**o + ((0.294464930496+0.0363233402196j))*x[0] + ((0.602670729688+0.828742864899j))*x[1]**o + ((-0.919706160447-0.443776546061j))*x[1]
            ref[(1, 1, 2)]=(0.484671487083+0.454965157544j)*(1+2.*(dim-1)/(o+1.)) + ((-0.625241229952-0.407453205841j))*dim
            arg[(1, 1, 3)]=(0.437025043327-0.500630896788j)*x[0]**o + ((0.0332436735949+0.305973816495j))*x[0] + ((-0.860382362251-0.71202811437j))*x[1]**o + ((-0.345274857235-0.312005610576j))*x[1]
            ref[(1, 1, 3)]=(-0.423357318924-1.21265901116j)*(1+2.*(dim-1)/(o+1.)) + ((-0.31203118364-0.00603179408145j))*dim
            arg[(1, 2, 0)]=(0.888045614689+0.828719165858j)*x[0]**o + ((-0.758503805835-0.955759692095j))*x[0] + ((0.823230028419+0.0323500117262j))*x[1]**o + ((0.609889654628+0.0480059959563j))*x[1]
            ref[(1, 2, 0)]=(1.71127564311+0.861069177584j)*(1+2.*(dim-1)/(o+1.)) + ((-0.148614151207-0.907753696139j))*dim
            arg[(1, 2, 1)]=(-0.894320735388+0.834902903333j)*x[0]**o + ((0.690392671953-0.174763598467j))*x[0] + ((0.234455321478+0.516189066626j))*x[1]**o + ((-0.923367453232+0.204104481377j))*x[1]
            ref[(1, 2, 1)]=(-0.65986541391+1.35109196996j)*(1+2.*(dim-1)/(o+1.)) + ((-0.232974781279+0.0293408829098j))*dim
            arg[(1, 2, 2)]=(0.290834423773-0.454216836468j)*x[0]**o + ((-0.509067442118+0.18097454022j))*x[0] + ((-0.110111734099+0.104515941784j))*x[1]**o + ((0.831653927912-0.251375075747j))*x[1]
            ref[(1, 2, 2)]=(0.180722689674-0.349700894685j)*(1+2.*(dim-1)/(o+1.)) + ((0.322586485794-0.0704005355272j))*dim
            arg[(1, 2, 3)]=(0.793458824083-0.71401326823j)*x[0]**o + ((-0.75736855999+0.7234587844j))*x[0] + ((0.857349588813+0.906729809747j))*x[1]**o + ((0.755594175189+0.578280653801j))*x[1]
            ref[(1, 2, 3)]=(1.6508084129+0.192716541517j)*(1+2.*(dim-1)/(o+1.)) + ((-0.00177438480133+1.3017394382j))*dim
            arg[(1, 3, 0)]=(0.478691498001+0.232780638234j)*x[0]**o + ((0.605849604062-0.177614392974j))*x[0] + ((0.958911307548-0.102968322509j))*x[1]**o + ((-0.927543689367+0.805606000657j))*x[1]
            ref[(1, 3, 0)]=(1.43760280555+0.129812315725j)*(1+2.*(dim-1)/(o+1.)) + ((-0.321694085305+0.627991607683j))*dim
            arg[(1, 3, 1)]=(0.891106232063+0.802633932846j)*x[0]**o + ((0.537285173092-0.180153118525j))*x[0] + ((-0.57825319751+0.0974364786052j))*x[1]**o + ((0.170494073116+0.289191915917j))*x[1]
            ref[(1, 3, 1)]=(0.312853034553+0.900070411451j)*(1+2.*(dim-1)/(o+1.)) + ((0.707779246208+0.109038797392j))*dim
            arg[(1, 3, 2)]=(0.574493501524+0.472671527627j)*x[0]**o + ((0.0452299246167+0.161358959672j))*x[0] + ((0.498295055725+0.942994568924j))*x[1]**o + ((0.615185143619-0.184017979853j))*x[1]
            ref[(1, 3, 2)]=(1.07278855725+1.41566609655j)*(1+2.*(dim-1)/(o+1.)) + ((0.660415068236-0.0226590201809j))*dim
            arg[(1, 3, 3)]=(-0.547301446629-0.44094107405j)*x[0]**o + ((-0.855359109959-0.84585102077j))*x[0] + ((0.901062639572-0.724531317521j))*x[1]**o + ((-0.729913786376-0.817208050038j))*x[1]
            ref[(1, 3, 3)]=(0.353761192943-1.16547239157j)*(1+2.*(dim-1)/(o+1.)) + ((-1.58527289633-1.66305907081j))*dim
            arg[(2, 0, 0)]=(0.389750439939-0.851739950601j)*x[0]**o + ((-0.643315380028+0.238898440511j))*x[0] + ((-0.6295194741+0.0734983700873j))*x[1]**o + ((-0.935876359743+0.459758863484j))*x[1]
            ref[(2, 0, 0)]=(-0.239769034161-0.778241580513j)*(1+2.*(dim-1)/(o+1.)) + ((-1.57919173977+0.698657303994j))*dim
            arg[(2, 0, 1)]=(0.564358364512-0.889390962981j)*x[0]**o + ((-0.3633977304-0.015620542285j))*x[0] + ((0.556327319358-0.562309317042j))*x[1]**o + ((0.727649861203+0.869978765058j))*x[1]
            ref[(2, 0, 1)]=(1.12068568387-1.45170028002j)*(1+2.*(dim-1)/(o+1.)) + ((0.364252130803+0.854358222773j))*dim
            arg[(2, 0, 2)]=(0.782811496871-0.393316771899j)*x[0]**o + ((0.734005038676+0.734505959858j))*x[0] + ((0.558601432834+0.640561031797j))*x[1]**o + ((-0.761573196125-0.901561516463j))*x[1]
            ref[(2, 0, 2)]=(1.3414129297+0.247244259898j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0275681574483-0.167055556605j))*dim
            arg[(2, 0, 3)]=(0.273677632595+0.353287376321j)*x[0]**o + ((0.749171243372-0.166350084895j))*x[0] + ((-0.306917822304+0.581824744959j))*x[1]**o + ((0.908099442478+0.123984587645j))*x[1]
            ref[(2, 0, 3)]=(-0.0332401897086+0.935112121279j)*(1+2.*(dim-1)/(o+1.)) + ((1.65727068585-0.042365497249j))*dim
            arg[(2, 1, 0)]=(-0.0482498583672-0.695476996538j)*x[0]**o + ((0.745320288823-0.697221840533j))*x[0] + ((0.905311611713-0.994453130233j))*x[1]**o + ((0.00734924911393+0.191731262343j))*x[1]
            ref[(2, 1, 0)]=(0.857061753346-1.68993012677j)*(1+2.*(dim-1)/(o+1.)) + ((0.752669537937-0.50549057819j))*dim
            arg[(2, 1, 1)]=(-0.99731379493+0.180634361053j)*x[0]**o + ((-0.934107760975-0.50513359926j))*x[0] + ((0.725475869422-0.235354046915j))*x[1]**o + ((-0.595230644035+0.441364259341j))*x[1]
            ref[(2, 1, 1)]=(-0.271837925509-0.0547196858626j)*(1+2.*(dim-1)/(o+1.)) + ((-1.52933840501-0.0637693399188j))*dim
            arg[(2, 1, 2)]=(0.224546170077+0.327527235878j)*x[0]**o + ((-0.666402552205+0.882279457052j))*x[0] + ((0.302806073965+0.831966200349j))*x[1]**o + ((-0.64268175783-0.124833169619j))*x[1]
            ref[(2, 1, 2)]=(0.527352244042+1.15949343623j)*(1+2.*(dim-1)/(o+1.)) + ((-1.30908431003+0.757446287433j))*dim
            arg[(2, 1, 3)]=(0.0723205611301+0.895695540363j)*x[0]**o + ((-0.202246588856+0.003050475108j))*x[0] + ((-0.634253891681+0.0935891385071j))*x[1]**o + ((0.566261563691-0.0138239211617j))*x[1]
            ref[(2, 1, 3)]=(-0.561933330551+0.98928467887j)*(1+2.*(dim-1)/(o+1.)) + ((0.364014974835-0.0107734460537j))*dim
            arg[(2, 2, 0)]=(-0.230203879485-0.0537962864805j)*x[0]**o + ((-0.9304111912-0.132787423341j))*x[0] + ((-0.93378742138+0.784234902375j))*x[1]**o + ((-0.212197749118+0.599654571714j))*x[1]
            ref[(2, 2, 0)]=(-1.16399130087+0.730438615894j)*(1+2.*(dim-1)/(o+1.)) + ((-1.14260894032+0.466867148374j))*dim
            arg[(2, 2, 1)]=(0.899533788082-0.423748793016j)*x[0]**o + ((0.0618514120339+0.85904092384j))*x[0] + ((-0.819723953886-0.226969535561j))*x[1]**o + ((0.651604809782-0.104880869561j))*x[1]
            ref[(2, 2, 1)]=(0.0798098341955-0.650718328578j)*(1+2.*(dim-1)/(o+1.)) + ((0.713456221816+0.754160054279j))*dim
            arg[(2, 2, 2)]=(-0.847679494336-0.869823420441j)*x[0]**o + ((-0.260627755929-0.0856970513345j))*x[0] + ((0.451765909938+0.0513964659988j))*x[1]**o + ((0.137095545612+0.433721149922j))*x[1]
            ref[(2, 2, 2)]=(-0.395913584398-0.818426954442j)*(1+2.*(dim-1)/(o+1.)) + ((-0.123532210318+0.348024098588j))*dim
            arg[(2, 2, 3)]=(-0.0150523269862+0.894153911589j)*x[0]**o + ((-0.0922093939653+0.162493525164j))*x[0] + ((-0.646195852545+0.78953502718j))*x[1]**o + ((0.603921002448-0.9847200778j))*x[1]
            ref[(2, 2, 3)]=(-0.661248179531+1.68368893877j)*(1+2.*(dim-1)/(o+1.)) + ((0.511711608483-0.822226552636j))*dim
            arg[(2, 3, 0)]=(-0.769862728349+0.900610178901j)*x[0]**o + ((-0.612988367515+0.970373137207j))*x[0] + ((-0.193637529451+0.488011661114j))*x[1]**o + ((-0.788387860154-0.0312533492432j))*x[1]
            ref[(2, 3, 0)]=(-0.9635002578+1.38862184002j)*(1+2.*(dim-1)/(o+1.)) + ((-1.40137622767+0.939119787964j))*dim
            arg[(2, 3, 1)]=(0.481709075821-0.613566075589j)*x[0]**o + ((-0.462391374256+0.665236154229j))*x[0] + ((0.0305954870935-0.607539877682j))*x[1]**o + ((0.00404179077581-0.335955543563j))*x[1]
            ref[(2, 3, 1)]=(0.512304562915-1.22110595327j)*(1+2.*(dim-1)/(o+1.)) + ((-0.458349583481+0.329280610666j))*dim
            arg[(2, 3, 2)]=(0.835118351583+0.669484763766j)*x[0]**o + ((0.26369272777-0.415703266278j))*x[0] + ((-0.154576983652+0.180485157408j))*x[1]**o + ((-0.969380999543+0.739136368737j))*x[1]
            ref[(2, 3, 2)]=(0.680541367931+0.849969921173j)*(1+2.*(dim-1)/(o+1.)) + ((-0.705688271773+0.323433102459j))*dim
            arg[(2, 3, 3)]=(0.141688013072+0.611923704381j)*x[0]**o + ((-0.83663585151+0.42450956792j))*x[0] + ((0.00590922796829-0.387698500386j))*x[1]**o + ((0.0243850270438+0.795966705686j))*x[1]
            ref[(2, 3, 3)]=(0.147597241041+0.224225203996j)*(1+2.*(dim-1)/(o+1.)) + ((-0.812250824466+1.22047627361j))*dim
            arg[(3, 0, 0)]=(0.448833086176-0.910898043981j)*x[0]**o + ((0.701821627139-0.12065554612j))*x[0] + ((0.982158449059-0.496618001125j))*x[1]**o + ((0.793530866935+0.695584483509j))*x[1]
            ref[(3, 0, 0)]=(1.43099153523-1.40751604511j)*(1+2.*(dim-1)/(o+1.)) + ((1.49535249407+0.574928937389j))*dim
            arg[(3, 0, 1)]=(-0.0990680915456-0.992392887251j)*x[0]**o + ((0.795892021014-0.17632962714j))*x[0] + ((0.5840907974-0.239563207517j))*x[1]**o + ((0.634581567143-0.627311447383j))*x[1]
            ref[(3, 0, 1)]=(0.485022705855-1.23195609477j)*(1+2.*(dim-1)/(o+1.)) + ((1.43047358816-0.803641074522j))*dim
            arg[(3, 0, 2)]=(-0.0393373178469-0.697623409367j)*x[0]**o + ((0.134399924113+0.494065534276j))*x[0] + ((0.731139386+0.250579925858j))*x[1]**o + ((-0.0530063925445+0.374353031612j))*x[1]
            ref[(3, 0, 2)]=(0.691802068153-0.447043483509j)*(1+2.*(dim-1)/(o+1.)) + ((0.081393531569+0.868418565888j))*dim
            arg[(3, 0, 3)]=(0.348405431126-0.208621569937j)*x[0]**o + ((-0.699815100151+0.881736678828j))*x[0] + ((0.0230902029222-0.971945356569j))*x[1]**o + ((0.802337618582+0.939099092028j))*x[1]
            ref[(3, 0, 3)]=(0.371495634048-1.18056692651j)*(1+2.*(dim-1)/(o+1.)) + ((0.10252251843+1.82083577086j))*dim
            arg[(3, 1, 0)]=(-0.123959603021-0.268851397607j)*x[0]**o + ((0.628729947117-0.583674380617j))*x[0] + ((0.619106557044-0.981322109679j))*x[1]**o + ((0.971612773967-0.760281530099j))*x[1]
            ref[(3, 1, 0)]=(0.495146954023-1.25017350729j)*(1+2.*(dim-1)/(o+1.)) + ((1.60034272108-1.34395591072j))*dim
            arg[(3, 1, 1)]=(0.0794588670867+0.294015609303j)*x[0]**o + ((0.716192779317+0.196525437966j))*x[0] + ((-0.827650459136-0.832289068617j))*x[1]**o + ((-0.343235570858-0.912798130772j))*x[1]
            ref[(3, 1, 1)]=(-0.74819159205-0.538273459314j)*(1+2.*(dim-1)/(o+1.)) + ((0.37295720846-0.716272692805j))*dim
            arg[(3, 1, 2)]=(-0.64572257236+0.49744614383j)*x[0]**o + ((0.426850315457-0.0504298337776j))*x[0] + ((0.552155911726+0.844357705868j))*x[1]**o + ((-0.308932010709-0.648823859432j))*x[1]
            ref[(3, 1, 2)]=(-0.0935666606338+1.3418038497j)*(1+2.*(dim-1)/(o+1.)) + ((0.117918304748-0.699253693209j))*dim
            arg[(3, 1, 3)]=(-0.045454776355+0.479135073111j)*x[0]**o + ((-0.311402871159+0.279985850252j))*x[0] + ((-0.952293312604+0.886258744575j))*x[1]**o + ((-0.389043775266+0.116864934129j))*x[1]
            ref[(3, 1, 3)]=(-0.997748088959+1.36539381769j)*(1+2.*(dim-1)/(o+1.)) + ((-0.700446646425+0.396850784381j))*dim
            arg[(3, 2, 0)]=(0.490353159675-0.270458690978j)*x[0]**o + ((-0.0465783818757-0.101501989144j))*x[0] + ((-0.841792103664+0.664481486704j))*x[1]**o + ((-0.375865107711-0.212185513546j))*x[1]
            ref[(3, 2, 0)]=(-0.351438943989+0.394022795726j)*(1+2.*(dim-1)/(o+1.)) + ((-0.422443489587-0.31368750269j))*dim
            arg[(3, 2, 1)]=(-0.956494618732+0.400444844557j)*x[0]**o + ((0.0175606561068+0.297460094986j))*x[0] + ((0.310247722614-0.502667315425j))*x[1]**o + ((-0.630984853293-0.121911912632j))*x[1]
            ref[(3, 2, 1)]=(-0.646246896117-0.102222470868j)*(1+2.*(dim-1)/(o+1.)) + ((-0.613424197187+0.175548182354j))*dim
            arg[(3, 2, 2)]=(0.0963898664042-0.642801817387j)*x[0]**o + ((-0.063885789622-0.786769045626j))*x[0] + ((0.312203348823-0.169258538716j))*x[1]**o + ((0.130954031078-0.830602315703j))*x[1]
            ref[(3, 2, 2)]=(0.408593215227-0.812060356104j)*(1+2.*(dim-1)/(o+1.)) + ((0.0670682414561-1.61737136133j))*dim
            arg[(3, 2, 3)]=(-0.481945194556-0.394002688615j)*x[0]**o + ((-0.417721975995-0.370657727533j))*x[0] + ((-0.0422710541177+0.429711704928j))*x[1]**o + ((-0.690046159088-0.870913756007j))*x[1]
            ref[(3, 2, 3)]=(-0.524216248674+0.0357090163129j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10776813508-1.24157148354j))*dim
            arg[(3, 3, 0)]=(-0.803011730387+0.780288856852j)*x[0]**o + ((-0.04780811569+0.816585541092j))*x[0] + ((0.158234420206-0.10377432393j))*x[1]**o + ((-0.164279620184+0.792339099478j))*x[1]
            ref[(3, 3, 0)]=(-0.644777310181+0.676514532922j)*(1+2.*(dim-1)/(o+1.)) + ((-0.212087735874+1.60892464057j))*dim
            arg[(3, 3, 1)]=(-0.609920685685-0.45367809027j)*x[0]**o + ((-0.402457961603+0.354643677493j))*x[0] + ((0.582780630138-0.844150744934j))*x[1]**o + ((-0.0760036361536+0.0529357997816j))*x[1]
            ref[(3, 3, 1)]=(-0.0271400555474-1.2978288352j)*(1+2.*(dim-1)/(o+1.)) + ((-0.478461597757+0.407579477275j))*dim
            arg[(3, 3, 2)]=(0.636689602719-0.291731073457j)*x[0]**o + ((-0.255873901287-0.392383174582j))*x[0] + ((-0.635676308465+0.456516162368j))*x[1]**o + ((0.139796103985-0.289477119762j))*x[1]
            ref[(3, 3, 2)]=(0.00101329425457+0.164785088911j)*(1+2.*(dim-1)/(o+1.)) + ((-0.116077797302-0.681860294344j))*dim
            arg[(3, 3, 3)]=(0.459734964125-0.00111200032175j)*x[0]**o + ((-0.17680604433+0.802516687447j))*x[0] + ((0.158863731589-0.559229725592j))*x[1]**o + ((-0.590956288407-0.0305197590714j))*x[1]
            ref[(3, 3, 3)]=(0.618598695713-0.560341725913j)*(1+2.*(dim-1)/(o+1.)) + ((-0.767762332738+0.771996928375j))*dim
        else:
            arg[(0, 0, 0)]=(0.184268034071+0.913639292929j)*x[0]**o + ((0.632519775892-0.515754512055j))*x[0] + ((-0.31087280567-0.145048697334j))*x[1]**o + ((0.98472861541-0.560341112998j))*x[1] + ((-0.610323785205-0.584134134215j))*x[2]**o + ((0.904096031395-0.0181532600634j))*x[2]
            ref[(0, 0, 0)]=(-0.736928556804+0.184456461381j)*(1+2.*(dim-1)/(o+1.)) + ((2.5213444227-1.09424888512j))*dim
            arg[(0, 0, 1)]=(0.782379444514+0.8217486655j)*x[0]**o + ((0.525835368971-0.957153784899j))*x[0] + ((0.447755233647-0.233644198921j))*x[1]**o + ((-0.359078727192-0.588008194974j))*x[1] + ((-0.219002324372-0.828476245881j))*x[2]**o + ((0.0530070804494+0.0318947406656j))*x[2]
            ref[(0, 0, 1)]=(1.01113235379-0.240371779301j)*(1+2.*(dim-1)/(o+1.)) + ((0.219763722228-1.51326723921j))*dim
            arg[(0, 0, 2)]=(0.432354994282+0.952866296592j)*x[0]**o + ((0.33532530616+0.471724277128j))*x[0] + ((0.246608471658-0.552016787868j))*x[1]**o + ((-0.274290368776+0.0914035627638j))*x[1] + ((0.828249657651-0.182571987754j))*x[2]**o + ((-0.591202421585-0.257445951265j))*x[2]
            ref[(0, 0, 2)]=(1.50721312359+0.21827752097j)*(1+2.*(dim-1)/(o+1.)) + ((-0.530167484201+0.305681888627j))*dim
            arg[(0, 0, 3)]=(0.567409565863+0.0311097060645j)*x[0]**o + ((-0.217815646628+0.195248527488j))*x[0] + ((-0.538985071718+0.208396342135j))*x[1]**o + ((0.36881965252+0.823780687032j))*x[1] + ((0.745735472585+0.256509377095j))*x[2]**o + ((0.415029354399-0.0463303050981j))*x[2]
            ref[(0, 0, 3)]=(0.77415996673+0.496015425294j)*(1+2.*(dim-1)/(o+1.)) + ((0.566033360291+0.972698909422j))*dim
            arg[(0, 1, 0)]=(0.173950025989+0.691175316716j)*x[0]**o + ((-0.233614827355-0.0243772578365j))*x[0] + ((0.109548752056-0.141745246225j))*x[1]**o + ((-0.910705439484-0.810190236231j))*x[1] + ((0.377622266256+0.614166584093j))*x[2]**o + ((-0.692732424972-0.776327645436j))*x[2]
            ref[(0, 1, 0)]=(0.661121044301+1.16359665458j)*(1+2.*(dim-1)/(o+1.)) + ((-1.83705269181-1.6108951395j))*dim
            arg[(0, 1, 1)]=(-0.420599208145+0.208965560983j)*x[0]**o + ((0.487631254966+0.812452156045j))*x[0] + ((-0.252196641613-0.463596000319j))*x[1]**o + ((0.641692541688+0.467122921108j))*x[1] + ((-0.530005421232-0.902379620264j))*x[2]**o + ((-0.944701087013+0.15214633051j))*x[2]
            ref[(0, 1, 1)]=(-1.20280127099-1.1570100596j)*(1+2.*(dim-1)/(o+1.)) + ((0.184622709641+1.43172140766j))*dim
            arg[(0, 1, 2)]=(-0.765133722834+0.211710316434j)*x[0]**o + ((-0.835490631312-0.406078014511j))*x[0] + ((-0.622098187095-0.797046966115j))*x[1]**o + ((0.711264295911-0.670552317025j))*x[1] + ((-0.825132015328-0.695496775068j))*x[2]**o + ((0.704174675607-0.234361679994j))*x[2]
            ref[(0, 1, 2)]=(-2.21236392526-1.28083342475j)*(1+2.*(dim-1)/(o+1.)) + ((0.579948340206-1.31099201153j))*dim
            arg[(0, 1, 3)]=(-0.00683559813551-0.207926992751j)*x[0]**o + ((0.732577344422+0.461821152901j))*x[0] + ((0.878762534487-0.695256035722j))*x[1]**o + ((-0.164380230276+0.84015723533j))*x[1] + ((-0.837021668491-0.470354840341j))*x[2]**o + ((-0.221450748773-0.520885295055j))*x[2]
            ref[(0, 1, 3)]=(0.0349052678602-1.37353786881j)*(1+2.*(dim-1)/(o+1.)) + ((0.346746365372+0.781093093176j))*dim
            arg[(0, 2, 0)]=(-0.711974059885-0.595677035886j)*x[0]**o + ((0.870807509449-0.657447323509j))*x[0] + ((-0.393056681583+0.412250112052j))*x[1]**o + ((0.0368767496277+0.116779318966j))*x[1] + ((-0.0563521264176+0.842329153263j))*x[2]**o + ((0.835794153855+0.386093954124j))*x[2]
            ref[(0, 2, 0)]=(-1.16138286789+0.658902229428j)*(1+2.*(dim-1)/(o+1.)) + ((1.74347841293-0.154574050419j))*dim
            arg[(0, 2, 1)]=(0.284555364548+0.110823586877j)*x[0]**o + ((-0.859154301774+0.327653027062j))*x[0] + ((-0.148850172185-0.571907614641j))*x[1]**o + ((-0.241667239787+0.510275402772j))*x[1] + ((0.737380264294+0.840799692932j))*x[2]**o + ((0.658913497719+0.872345707055j))*x[2]
            ref[(0, 2, 1)]=(0.873085456657+0.379715665169j)*(1+2.*(dim-1)/(o+1.)) + ((-0.441908043842+1.71027413689j))*dim
            arg[(0, 2, 2)]=(-0.751353934752-0.368024745476j)*x[0]**o + ((0.65876102974-0.614483483587j))*x[0] + ((-0.894055660466+0.495352743654j))*x[1]**o + ((0.641376760399-0.505536026929j))*x[1] + ((-0.431138007713+0.262089633073j))*x[2]**o + ((-0.892989720054+0.671223682374j))*x[2]
            ref[(0, 2, 2)]=(-2.07654760293+0.389417631251j)*(1+2.*(dim-1)/(o+1.)) + ((0.407148070085-0.448795828143j))*dim
            arg[(0, 2, 3)]=(-0.820325028257-0.952522032858j)*x[0]**o + ((0.707824404867+0.72769412652j))*x[0] + ((0.0287161949052+0.437288271684j))*x[1]**o + ((-0.0525463013715+0.344776225777j))*x[1] + ((-0.452997124741-0.261905910783j))*x[2]**o + ((-0.915253341948-0.0595586452383j))*x[2]
            ref[(0, 2, 3)]=(-1.24460595809-0.777139671957j)*(1+2.*(dim-1)/(o+1.)) + ((-0.259975238453+1.01291170706j))*dim
            arg[(0, 3, 0)]=(0.218397388478+0.0110669270734j)*x[0]**o + ((-0.442891047718-0.820182702756j))*x[0] + ((0.816253832204+0.00419151631353j))*x[1]**o + ((0.631212313133+0.671692437607j))*x[1] + ((-0.778304816626+0.376637450816j))*x[2]**o + ((-0.758516933778-0.791329474653j))*x[2]
            ref[(0, 3, 0)]=(0.256346404056+0.391895894203j)*(1+2.*(dim-1)/(o+1.)) + ((-0.570195668364-0.939819739802j))*dim
            arg[(0, 3, 1)]=(-0.0223047364787+0.445760636023j)*x[0]**o + ((0.53406616384-0.672662929917j))*x[0] + ((0.0923567132532+0.810846487567j))*x[1]**o + ((-0.468694878917-0.581369375125j))*x[1] + ((-0.603419284974+0.982147053144j))*x[2]**o + ((0.683719832774-0.985337869241j))*x[2]
            ref[(0, 3, 1)]=(-0.533367308199+2.23875417673j)*(1+2.*(dim-1)/(o+1.)) + ((0.749091117697-2.23937017428j))*dim
            arg[(0, 3, 2)]=(-0.389164425495+0.752440145088j)*x[0]**o + ((-0.764411353734-0.768809878347j))*x[0] + ((-0.117871620281+0.569215755376j))*x[1]**o + ((0.534879354534+0.956477964058j))*x[1] + ((0.111052596039-0.154779029885j))*x[2]**o + ((-0.950210182464-0.0146462549024j))*x[2]
            ref[(0, 3, 2)]=(-0.395983449737+1.16687687058j)*(1+2.*(dim-1)/(o+1.)) + ((-1.17974218166+0.173021830808j))*dim
            arg[(0, 3, 3)]=(0.74782058519-0.391739791007j)*x[0]**o + ((0.46182753259-0.969830062225j))*x[0] + ((0.198120910402+0.111584654341j))*x[1]**o + ((0.84531693253+0.908262355532j))*x[1] + ((0.984300335906+0.660395829578j))*x[2]**o + ((0.748997854286+0.151494945782j))*x[2]
            ref[(0, 3, 3)]=(1.9302418315+0.380240692912j)*(1+2.*(dim-1)/(o+1.)) + ((2.05614231941+0.0899272390896j))*dim
            arg[(1, 0, 0)]=(0.19128730581-0.864295668485j)*x[0]**o + ((-0.692481576746+0.951660215829j))*x[0] + ((-0.737305903107-0.128994443042j))*x[1]**o + ((0.885040564583-0.0840682546054j))*x[1] + ((0.163587937352+0.515392015972j))*x[2]**o + ((-0.82955631558-0.0545356602267j))*x[2]
            ref[(1, 0, 0)]=(-0.382430659945-0.477898095555j)*(1+2.*(dim-1)/(o+1.)) + ((-0.636997327744+0.813056300997j))*dim
            arg[(1, 0, 1)]=(0.245036264342+0.113125113558j)*x[0]**o + ((0.50713072687+0.494753041184j))*x[0] + ((-0.255380179745+0.494682797878j))*x[1]**o + ((-0.226627311781-0.909786664682j))*x[1] + ((0.0338095285108-0.485862160096j))*x[2]**o + ((0.74116251061-0.872071186694j))*x[2]
            ref[(1, 0, 1)]=(0.0234656131079+0.12194575134j)*(1+2.*(dim-1)/(o+1.)) + ((1.0216659257-1.28710481019j))*dim
            arg[(1, 0, 2)]=(-0.229878820224-0.666534034216j)*x[0]**o + ((0.119701084675-0.593750635251j))*x[0] + ((-0.688460401822-0.16329152665j))*x[1]**o + ((0.170113254702-0.811912008932j))*x[1] + ((-0.723258201173+0.12439156222j))*x[2]**o + ((-0.0323330509403-0.890302955194j))*x[2]
            ref[(1, 0, 2)]=(-1.64159742322-0.705433998647j)*(1+2.*(dim-1)/(o+1.)) + ((0.257481288437-2.29596559938j))*dim
            arg[(1, 0, 3)]=(-0.261037816771+0.364718799932j)*x[0]**o + ((-0.229482782923-0.0556125106935j))*x[0] + ((0.174443565306-0.265803315044j))*x[1]**o + ((0.678506134382-0.494241012439j))*x[1] + ((-0.647703084249+0.180070841965j))*x[2]**o + ((-0.295503449835-0.207273296434j))*x[2]
            ref[(1, 0, 3)]=(-0.734297335715+0.278986326853j)*(1+2.*(dim-1)/(o+1.)) + ((0.153519901625-0.757126819566j))*dim
            arg[(1, 1, 0)]=(-0.502729933205+0.807177966968j)*x[0]**o + ((-0.425052341117-0.680767294127j))*x[0] + ((0.567732178053-0.351897014585j))*x[1]**o + ((0.353849143711-0.153997454943j))*x[1] + ((0.297127264971-0.176325289698j))*x[2]**o + ((0.00814837243853+0.720829344392j))*x[2]
            ref[(1, 1, 0)]=(0.362129509819+0.278955662685j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0630548249675-0.113935404678j))*dim
            arg[(1, 1, 1)]=(-0.986750472573+0.67232718115j)*x[0]**o + ((-0.454230841196-0.073919134792j))*x[0] + ((0.15816418726-0.678654066489j))*x[1]**o + ((0.121312247299+0.148873333339j))*x[1] + ((-0.291959301877+0.51448342502j))*x[2]**o + ((0.255315381733+0.619976296351j))*x[2]
            ref[(1, 1, 1)]=(-1.12054558719+0.508156539681j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0776032121633+0.694930494898j))*dim
            arg[(1, 1, 2)]=(-0.303297797775-0.60126669584j)*x[0]**o + ((0.567229943715+0.24638496431j))*x[0] + ((0.434018631714-0.701435117732j))*x[1]**o + ((-0.454370963138-0.656024232997j))*x[1] + ((-0.514885597582+0.168658018198j))*x[2]**o + ((0.583400328931-0.113511273057j))*x[2]
            ref[(1, 1, 2)]=(-0.384164763642-1.13404379537j)*(1+2.*(dim-1)/(o+1.)) + ((0.696259309508-0.523150541743j))*dim
            arg[(1, 1, 3)]=(-0.945226994808-0.23842645013j)*x[0]**o + ((0.878317705205-0.816980136835j))*x[0] + ((0.285431871022+0.309946060376j))*x[1]**o + ((-0.343870129456+0.32865026999j))*x[1] + ((-0.556702587218-0.502443165393j))*x[2]**o + ((-0.896344555287-0.274822988089j))*x[2]
            ref[(1, 1, 3)]=(-1.216497711-0.430923555147j)*(1+2.*(dim-1)/(o+1.)) + ((-0.361896979538-0.763152854935j))*dim
            arg[(1, 2, 0)]=(-0.514066017614+0.471663723824j)*x[0]**o + ((-0.191855142891-0.634167912547j))*x[0] + ((0.245166154378+0.817922762528j))*x[1]**o + ((0.802405865113+0.136146451255j))*x[1] + ((0.989562348423+0.211011956723j))*x[2]**o + ((0.547166859916+0.650406171839j))*x[2]
            ref[(1, 2, 0)]=(0.720662485187+1.50059844307j)*(1+2.*(dim-1)/(o+1.)) + ((1.15771758214+0.152384710547j))*dim
            arg[(1, 2, 1)]=(0.601663358394-0.947969292813j)*x[0]**o + ((0.672638053403-0.413465589319j))*x[0] + ((0.322635863252-0.62647054376j))*x[1]**o + ((0.651192172792-0.426349328354j))*x[1] + ((0.414637202118+0.187066746672j))*x[2]**o + ((-0.841698763897+0.614329773525j))*x[2]
            ref[(1, 2, 1)]=(1.33893642377-1.3873730899j)*(1+2.*(dim-1)/(o+1.)) + ((0.482131462298-0.225485144149j))*dim
            arg[(1, 2, 2)]=(-0.970714461208+0.512564805153j)*x[0]**o + ((0.945318758931-0.797438884914j))*x[0] + ((0.294034475733-0.163196711347j))*x[1]**o + ((-0.511507973879-0.107310011927j))*x[1] + ((-0.34437730897+0.344951160772j))*x[2]**o + ((-0.787376661707+0.18176592965j))*x[2]
            ref[(1, 2, 2)]=(-1.02105729445+0.694319254577j)*(1+2.*(dim-1)/(o+1.)) + ((-0.353565876655-0.72298296719j))*dim
            arg[(1, 2, 3)]=(0.685571272891-0.868245907241j)*x[0]**o + ((-0.79606151441-0.0234060952976j))*x[0] + ((0.32754521285+0.41207896904j))*x[1]**o + ((-0.791217075993+0.601498177856j))*x[1] + ((0.0151602413225-0.908111779226j))*x[2]**o + ((0.100129694115+0.846692317773j))*x[2]
            ref[(1, 2, 3)]=(1.02827672706-1.36427871743j)*(1+2.*(dim-1)/(o+1.)) + ((-1.48714889629+1.42478440033j))*dim
            arg[(1, 3, 0)]=(-0.434532459161-0.926163890228j)*x[0]**o + ((-0.366474318535-0.104736109657j))*x[0] + ((-0.473782878753+0.654134594779j))*x[1]**o + ((0.386884658229+0.649837296164j))*x[1] + ((-0.278026842051-0.833127685673j))*x[2]**o + ((-0.510830721384+0.793639122275j))*x[2]
            ref[(1, 3, 0)]=(-1.18634217997-1.10515698112j)*(1+2.*(dim-1)/(o+1.)) + ((-0.490420381689+1.33874030878j))*dim
            arg[(1, 3, 1)]=(0.232338186725+0.315838791259j)*x[0]**o + ((0.610273889331-0.0624824478141j))*x[0] + ((0.740045687078-0.761349158856j))*x[1]**o + ((0.883687795899+0.208253421203j))*x[1] + ((0.859525544895-0.511045599916j))*x[2]**o + ((-0.379607844405-0.4154658462j))*x[2]
            ref[(1, 3, 1)]=(1.8319094187-0.956555967512j)*(1+2.*(dim-1)/(o+1.)) + ((1.11435384083-0.269694872811j))*dim
            arg[(1, 3, 2)]=(0.26450128305+0.333572953707j)*x[0]**o + ((-0.107698794106-0.852927480031j))*x[0] + ((-0.776716934006-0.248858368769j))*x[1]**o + ((0.353846530657-0.112482428197j))*x[1] + ((0.520657095856+0.535918808661j))*x[2]**o + ((0.783905314157+0.82429010177j))*x[2]
            ref[(1, 3, 2)]=(0.00844144489936+0.620633393599j)*(1+2.*(dim-1)/(o+1.)) + ((1.03005305071-0.141119806458j))*dim
            arg[(1, 3, 3)]=(-0.504020252896-0.0509473316711j)*x[0]**o + ((0.0546241901979+0.442005344847j))*x[0] + ((0.806720039957+0.453050135589j))*x[1]**o + ((0.804146766428+0.242599794085j))*x[1] + ((0.720229765055-0.223647428176j))*x[2]**o + ((0.749498872855-0.489773509824j))*x[2]
            ref[(1, 3, 3)]=(1.02292955212+0.178455375742j)*(1+2.*(dim-1)/(o+1.)) + ((1.60826982948+0.194831629108j))*dim
            arg[(2, 0, 0)]=(-0.43756146698+0.0447124538828j)*x[0]**o + ((-0.417910459812-0.816181175002j))*x[0] + ((0.0955806209599+0.352274143912j))*x[1]**o + ((-0.97570009723+0.807280898241j))*x[1] + ((0.75773839312+0.596474496513j))*x[2]**o + ((-0.510370460632+0.396385780926j))*x[2]
            ref[(2, 0, 0)]=(0.4157575471+0.993461094307j)*(1+2.*(dim-1)/(o+1.)) + ((-1.90398101767+0.387485504165j))*dim
            arg[(2, 0, 1)]=(0.403653652415-0.465450247729j)*x[0]**o + ((-0.596542347452-0.436165711889j))*x[0] + ((-0.322453507244-0.137683803251j))*x[1]**o + ((0.553026672792+0.446677823758j))*x[1] + ((0.552189859193-0.665576782402j))*x[2]**o + ((0.18965290216+0.844531438118j))*x[2]
            ref[(2, 0, 1)]=(0.633390004365-1.26871083338j)*(1+2.*(dim-1)/(o+1.)) + ((0.1461372275+0.855043549987j))*dim
            arg[(2, 0, 2)]=(-0.954919114076-0.592674079502j)*x[0]**o + ((-0.61099411415+0.930695334955j))*x[0] + ((0.89764611609-0.502487315584j))*x[1]**o + ((-0.449511957606+0.332882793688j))*x[1] + ((-0.71322717113+0.583484745743j))*x[2]**o + ((-0.369438536278+0.0457231401623j))*x[2]
            ref[(2, 0, 2)]=(-0.770500169116-0.511676649343j)*(1+2.*(dim-1)/(o+1.)) + ((-1.42994460803+1.30930126881j))*dim
            arg[(2, 0, 3)]=(-0.55665740527+0.68659224052j)*x[0]**o + ((-0.333994693407-0.682285983204j))*x[0] + ((-0.273254005626+0.609607820092j))*x[1]**o + ((0.0211371897486-0.958816831908j))*x[1] + ((-0.0998045547131+0.92568716407j))*x[2]**o + ((-0.636996494083+0.574324322441j))*x[2]
            ref[(2, 0, 3)]=(-0.929715965609+2.22188722468j)*(1+2.*(dim-1)/(o+1.)) + ((-0.949853997742-1.06677849267j))*dim
            arg[(2, 1, 0)]=(-0.602008884675+0.119924926336j)*x[0]**o + ((0.674757707143+0.652027185989j))*x[0] + ((0.0447044729149+0.239856996749j))*x[1]**o + ((0.465017800286+0.23726283377j))*x[1] + ((0.579018581607+0.793359293229j))*x[2]**o + ((-0.732210182649-0.814657262425j))*x[2]
            ref[(2, 1, 0)]=(0.0217141698476+1.15314121631j)*(1+2.*(dim-1)/(o+1.)) + ((0.407565324779+0.0746327573335j))*dim
            arg[(2, 1, 1)]=(-0.317034949815-0.491835962868j)*x[0]**o + ((-0.541080286494-0.627338575424j))*x[0] + ((0.630265483068+0.311774379163j))*x[1]**o + ((0.385285479174+0.226613511917j))*x[1] + ((-0.857662049581+0.799971810346j))*x[2]**o + ((-0.797332080083-0.142448575799j))*x[2]
            ref[(2, 1, 1)]=(-0.544431516328+0.619910226641j)*(1+2.*(dim-1)/(o+1.)) + ((-0.953126887403-0.543173639306j))*dim
            arg[(2, 1, 2)]=(-0.675129141169+0.662685534661j)*x[0]**o + ((0.782085584972+0.215786374765j))*x[0] + ((0.598064063013+0.411715079245j))*x[1]**o + ((-0.296507841388+0.997939403618j))*x[1] + ((-0.672662870636+0.708540598978j))*x[2]**o + ((0.125233742225+0.707690390381j))*x[2]
            ref[(2, 1, 2)]=(-0.749727948793+1.78294121288j)*(1+2.*(dim-1)/(o+1.)) + ((0.610811485808+1.92141616876j))*dim
            arg[(2, 1, 3)]=(0.607204410117-0.0905865962986j)*x[0]**o + ((-0.596766344304+0.259812192131j))*x[0] + ((-0.595505768513+0.681624859947j))*x[1]**o + ((0.273372950545+0.240042759434j))*x[1] + ((0.580660581246-0.0470606458336j))*x[2]**o + ((-0.88636541409-0.0845979700049j))*x[2]
            ref[(2, 1, 3)]=(0.592359222851+0.543977617815j)*(1+2.*(dim-1)/(o+1.)) + ((-1.20975880785+0.415256981559j))*dim
            arg[(2, 2, 0)]=(0.236860671185+0.398805987774j)*x[0]**o + ((0.874936562497-0.432678328069j))*x[0] + ((-0.48167055723-0.105740429473j))*x[1]**o + ((-0.486160320016+0.318550858008j))*x[1] + ((-0.0781385941465+0.371945013712j))*x[2]**o + ((0.414999965584-0.669739454454j))*x[2]
            ref[(2, 2, 0)]=(-0.322948480191+0.665010572014j)*(1+2.*(dim-1)/(o+1.)) + ((0.803776208065-0.783866924515j))*dim
            arg[(2, 2, 1)]=(0.352215508799+0.0520977994513j)*x[0]**o + ((-0.557984576905+0.245322662056j))*x[0] + ((-0.793886967767+0.037643589325j))*x[1]**o + ((0.449808407416-0.0308382763374j))*x[1] + ((-0.312420989589+0.0131305656961j))*x[2]**o + ((-0.168835093841-0.986377137528j))*x[2]
            ref[(2, 2, 1)]=(-0.754092448557+0.102871954472j)*(1+2.*(dim-1)/(o+1.)) + ((-0.27701126333-0.77189275181j))*dim
            arg[(2, 2, 2)]=(0.420426956107-0.650362677471j)*x[0]**o + ((0.804626973913-0.167437423478j))*x[0] + ((0.294675936323-0.418879085233j))*x[1]**o + ((0.140370280132+0.82234077498j))*x[1] + ((0.371888203541-0.628644310545j))*x[2]**o + ((-0.729607559016+0.553958324327j))*x[2]
            ref[(2, 2, 2)]=(1.08699109597-1.69788607325j)*(1+2.*(dim-1)/(o+1.)) + ((0.215389695029+1.20886167583j))*dim
            arg[(2, 2, 3)]=(0.0319885865518+0.210843795276j)*x[0]**o + ((0.689737759679+0.913276276162j))*x[0] + ((-0.32423605804+0.0847361810263j))*x[1]**o + ((0.684382276949+0.0882451605711j))*x[1] + ((0.579563308751-0.193470383742j))*x[2]**o + ((-0.834261855702+0.992106354329j))*x[2]
            ref[(2, 2, 3)]=(0.287315837262+0.102109592561j)*(1+2.*(dim-1)/(o+1.)) + ((0.539858180926+1.99362779106j))*dim
            arg[(2, 3, 0)]=(0.730289376861+0.562234945778j)*x[0]**o + ((0.211950340597+0.657167686538j))*x[0] + ((-0.682410602868+0.128974203158j))*x[1]**o + ((-0.530015383164+0.707173450513j))*x[1] + ((0.479386498128+0.236871454606j))*x[2]**o + ((0.668662234354+0.273023105256j))*x[2]
            ref[(2, 3, 0)]=(0.527265272121+0.928080603543j)*(1+2.*(dim-1)/(o+1.)) + ((0.350597191787+1.63736424231j))*dim
            arg[(2, 3, 1)]=(0.256379955214-0.740539705282j)*x[0]**o + ((-0.142277875819-0.248520242843j))*x[0] + ((-0.736739122587-0.273713512285j))*x[1]**o + ((0.129880598266-0.255335867381j))*x[1] + ((-0.149815125198+0.853452087247j))*x[2]**o + ((0.0417336730253-0.172400480691j))*x[2]
            ref[(2, 3, 1)]=(-0.630174292572-0.16080113032j)*(1+2.*(dim-1)/(o+1.)) + ((0.0293363954731-0.676256590916j))*dim
            arg[(2, 3, 2)]=(-0.986936833577-0.890653801368j)*x[0]**o + ((-0.371683539786-0.0455965029895j))*x[0] + ((0.983152453019+0.300292485396j))*x[1]**o + ((0.0779722534291+0.207777057285j))*x[1] + ((0.382428590301+0.617299849562j))*x[2]**o + ((0.592409892456+0.0794765675429j))*x[2]
            ref[(2, 3, 2)]=(0.378644209744+0.0269385335901j)*(1+2.*(dim-1)/(o+1.)) + ((0.298698606099+0.241657121838j))*dim
            arg[(2, 3, 3)]=(-0.668417781295-0.532000142058j)*x[0]**o + ((-0.814955213535-0.81546947214j))*x[0] + ((-0.774461656829+0.614814020114j))*x[1]**o + ((0.0145664752324-0.572170941405j))*x[1] + ((0.373980884887-0.125695445301j))*x[2]**o + ((0.0169814551473+0.808857184473j))*x[2]
            ref[(2, 3, 3)]=(-1.06889855324-0.0428815672442j)*(1+2.*(dim-1)/(o+1.)) + ((-0.783407283155-0.578783229071j))*dim
            arg[(3, 0, 0)]=(-0.59938081129-0.917963939448j)*x[0]**o + ((0.183582767746+0.436157898881j))*x[0] + ((-0.686837459777-0.141468176498j))*x[1]**o + ((-0.970706968044-0.720741722786j))*x[1] + ((-0.90247768464-0.713027629085j))*x[2]**o + ((-0.602170555132-0.725336796054j))*x[2]
            ref[(3, 0, 0)]=(-2.18869595571-1.77245974503j)*(1+2.*(dim-1)/(o+1.)) + ((-1.38929475543-1.00992061996j))*dim
            arg[(3, 0, 1)]=(-0.79392015205-0.652425508485j)*x[0]**o + ((-0.84309567627-0.528507103066j))*x[0] + ((-0.680531881481+0.161538548278j))*x[1]**o + ((0.616842232935-0.816024751832j))*x[1] + ((-0.408631036596+0.123860491493j))*x[2]**o + ((-0.402420179666-0.414955051672j))*x[2]
            ref[(3, 0, 1)]=(-1.88308307013-0.367026468714j)*(1+2.*(dim-1)/(o+1.)) + ((-0.628673623001-1.75948690657j))*dim
            arg[(3, 0, 2)]=(-0.861978261709+0.433218616259j)*x[0]**o + ((0.813494408757+0.539274346026j))*x[0] + ((0.00295979248168-0.132674922852j))*x[1]**o + ((0.902227939025-0.0965011013926j))*x[1] + ((0.226654530123-0.98180785716j))*x[2]**o + ((0.640120183738+0.901643724362j))*x[2]
            ref[(3, 0, 2)]=(-0.632363939104-0.681264163753j)*(1+2.*(dim-1)/(o+1.)) + ((2.35584253152+1.344416969j))*dim
            arg[(3, 0, 3)]=(0.507833956975+0.581534082815j)*x[0]**o + ((-0.838807879426+0.286979919615j))*x[0] + ((-0.020077309453+0.730969083057j))*x[1]**o + ((-0.443847982121-0.898319681628j))*x[1] + ((-0.765503427138+0.931089527149j))*x[2]**o + ((-0.859052266446-0.299895832562j))*x[2]
            ref[(3, 0, 3)]=(-0.277746779616+2.24359269302j)*(1+2.*(dim-1)/(o+1.)) + ((-2.14170812799-0.911235594575j))*dim
            arg[(3, 1, 0)]=(0.669435458461+0.722578787136j)*x[0]**o + ((-0.734868984472-0.00836036650464j))*x[0] + ((0.226524690148-0.376791168846j))*x[1]**o + ((-0.339526547437-0.392311522681j))*x[1] + ((0.924205573124+0.343393437052j))*x[2]**o + ((-0.187967397252-0.930377767958j))*x[2]
            ref[(3, 1, 0)]=(1.82016572173+0.689181055342j)*(1+2.*(dim-1)/(o+1.)) + ((-1.26236292916-1.33104965714j))*dim
            arg[(3, 1, 1)]=(0.287093789587+0.308659737943j)*x[0]**o + ((0.200186786995+0.80058359566j))*x[0] + ((0.694213689718-0.966948272932j))*x[1]**o + ((0.522330399089-0.090544517313j))*x[1] + ((0.973912310446+0.946387864075j))*x[2]**o + ((0.0959117525119-0.412043645107j))*x[2]
            ref[(3, 1, 1)]=(1.95521978975+0.288099329086j)*(1+2.*(dim-1)/(o+1.)) + ((0.818428938596+0.29799543324j))*dim
            arg[(3, 1, 2)]=(0.453284216795-0.825102308798j)*x[0]**o + ((-0.71444695124-0.730813088099j))*x[0] + ((0.558845900107-0.793649474833j))*x[1]**o + ((0.621851463329-0.697026913028j))*x[1] + ((0.181777542879+0.62867814089j))*x[2]**o + ((0.579549811815+0.467037194771j))*x[2]
            ref[(3, 1, 2)]=(1.19390765978-0.990073642741j)*(1+2.*(dim-1)/(o+1.)) + ((0.486954323904-0.960802806355j))*dim
            arg[(3, 1, 3)]=(0.681906740186+0.407641371983j)*x[0]**o + ((0.582125351751-0.636012034062j))*x[0] + ((0.997872618876+0.791396157389j))*x[1]**o + ((-0.420595659708+0.447061902294j))*x[1] + ((0.707324140642-0.00839725659304j))*x[2]**o + ((0.049853340159-0.281430964203j))*x[2]
            ref[(3, 1, 3)]=(2.3871034997+1.19064027278j)*(1+2.*(dim-1)/(o+1.)) + ((0.211383032202-0.47038109597j))*dim
            arg[(3, 2, 0)]=(0.170997500447-0.919567568085j)*x[0]**o + ((0.638189325512+0.0305827394853j))*x[0] + ((-0.236432616234-0.7257246394j))*x[1]**o + ((-0.237688558065+0.878973167397j))*x[1] + ((0.93386671898-0.972008550485j))*x[2]**o + ((0.154168349055-0.693215956214j))*x[2]
            ref[(3, 2, 0)]=(0.868431603193-2.61730075797j)*(1+2.*(dim-1)/(o+1.)) + ((0.554669116502+0.216339950669j))*dim
            arg[(3, 2, 1)]=(0.142323975215+0.294146958948j)*x[0]**o + ((0.820347789322+0.997131572183j))*x[0] + ((-0.056220955031+0.224892638341j))*x[1]**o + ((0.76062827743-0.0179436755783j))*x[1] + ((-0.809046922137-0.55575381777j))*x[2]**o + ((0.839514055741-0.514674065427j))*x[2]
            ref[(3, 2, 1)]=(-0.722943901953-0.0367142204805j)*(1+2.*(dim-1)/(o+1.)) + ((2.42049012249+0.464513831178j))*dim
            arg[(3, 2, 2)]=(-0.916461025807+0.715236734503j)*x[0]**o + ((-0.282231419431+0.628877035551j))*x[0] + ((-0.0034217865597+0.941492775156j))*x[1]**o + ((-0.0743253715705+0.649500771499j))*x[1] + ((-0.478599132615+0.963316656553j))*x[2]**o + ((-0.0174718854478+0.668647660611j))*x[2]
            ref[(3, 2, 2)]=(-1.39848194498+2.62004616621j)*(1+2.*(dim-1)/(o+1.)) + ((-0.37402867645+1.94702546766j))*dim
            arg[(3, 2, 3)]=(0.240248490164+0.136962600531j)*x[0]**o + ((-0.376941781764-0.837415903407j))*x[0] + ((-0.379059375365-0.408117839837j))*x[1]**o + ((-0.650483590025-0.420775678604j))*x[1] + ((0.903600291996-0.0442663776016j))*x[2]**o + ((-0.239965605119-0.191755652724j))*x[2]
            ref[(3, 2, 3)]=(0.764789406794-0.315421616907j)*(1+2.*(dim-1)/(o+1.)) + ((-1.26739097691-1.44994723474j))*dim
            arg[(3, 3, 0)]=(0.0552239223906+0.905185837357j)*x[0]**o + ((0.32683775242+0.847971328139j))*x[0] + ((0.193304290263-0.430139071214j))*x[1]**o + ((-0.362724245181+0.0139977238244j))*x[1] + ((-0.552444480955+0.957676570473j))*x[2]**o + ((0.942983121958+0.591355004956j))*x[2]
            ref[(3, 3, 0)]=(-0.303916268302+1.43272333662j)*(1+2.*(dim-1)/(o+1.)) + ((0.907096629197+1.45332405692j))*dim
            arg[(3, 3, 1)]=(-0.128464761548-0.494278970778j)*x[0]**o + ((0.56229124965+0.12383813027j))*x[0] + ((0.559895201549-0.882831770935j))*x[1]**o + ((0.019068521535-0.666054959388j))*x[1] + ((-0.259039671526-0.223010818496j))*x[2]**o + ((-0.380634024682-0.623475454104j))*x[2]
            ref[(3, 3, 1)]=(0.172390768475-1.60012156021j)*(1+2.*(dim-1)/(o+1.)) + ((0.200725746503-1.16569228322j))*dim
            arg[(3, 3, 2)]=(0.839677143418+0.183170226572j)*x[0]**o + ((0.579264603794-0.721691770999j))*x[0] + ((-0.769470974891-0.311102504337j))*x[1]**o + ((0.238989236566+0.278057402991j))*x[1] + ((0.590444186528-0.840926169251j))*x[2]**o + ((-0.576751564737-0.0586893059937j))*x[2]
            ref[(3, 3, 2)]=(0.660650355055-0.968858447016j)*(1+2.*(dim-1)/(o+1.)) + ((0.241502275624-0.502323674002j))*dim
            arg[(3, 3, 3)]=(0.896002802701+0.812737611622j)*x[0]**o + ((0.235399677164-0.183131711008j))*x[0] + ((-0.307577351832+0.141778362338j))*x[1]**o + ((-0.438114050267+0.228036186045j))*x[1] + ((0.898849105014-0.384554015356j))*x[2]**o + ((-0.347622142089-0.162811349536j))*x[2]
            ref[(3, 3, 3)]=(1.48727455588+0.569961958604j)*(1+2.*(dim-1)/(o+1.)) + ((-0.550336515193-0.117906874499j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4, 4),w)
        ref=numpy.zeros((4, 4, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.509913351026+0.985788759835j)*x[0]**o + ((0.318055963654-0.783439864679j))*x[0] + ((-0.868203154577-0.493275517065j))*x[1]**o + ((0.871295869181-0.611653344589j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.358289803552+0.49251324277j)*(1+2.*(dim-1)/(o+1.)) + ((1.18935183284-1.39509320927j))*dim
            arg[(0, 0, 0, 1)]=(-0.528947231616-0.197001620202j)*x[0]**o + ((-0.0670736869329-0.321172289604j))*x[0] + ((-0.243438745242+0.440265409249j))*x[1]**o + ((0.00284615755234+0.353322006503j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.772385976858+0.243263789047j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0642275293805+0.0321497168981j))*dim
            arg[(0, 0, 0, 2)]=(-0.862193216738-0.841387602406j)*x[0]**o + ((0.203394111758+0.883074369825j))*x[0] + ((-0.130063297012+0.123644403753j))*x[1]**o + ((0.152937928533+0.733860103323j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.99225651375-0.717743198653j)*(1+2.*(dim-1)/(o+1.)) + ((0.356332040291+1.61693447315j))*dim
            arg[(0, 0, 0, 3)]=(-0.506856896426+0.624494448416j)*x[0]**o + ((0.0862429843609+0.362996761814j))*x[0] + ((0.104111937924+0.665233547868j))*x[1]**o + ((0.217192074294+0.728301174108j))*x[1]
            ref[(0, 0, 0, 3)]=(-0.402744958502+1.28972799628j)*(1+2.*(dim-1)/(o+1.)) + ((0.303435058655+1.09129793592j))*dim
            arg[(0, 0, 1, 0)]=(-0.821741304416+0.81603092516j)*x[0]**o + ((0.423673224929+0.353333401236j))*x[0] + ((-0.196622158137-0.0786880410466j))*x[1]**o + ((-0.960745779754-0.593112339302j))*x[1]
            ref[(0, 0, 1, 0)]=(-1.01836346255+0.737342884113j)*(1+2.*(dim-1)/(o+1.)) + ((-0.537072554825-0.239778938067j))*dim
            arg[(0, 0, 1, 1)]=(0.276270503205+0.0691286041427j)*x[0]**o + ((-0.455803032125-0.597753014092j))*x[0] + ((0.0640448090498-0.279346606556j))*x[1]**o + ((0.477799991389+0.70504949676j))*x[1]
            ref[(0, 0, 1, 1)]=(0.340315312255-0.210218002413j)*(1+2.*(dim-1)/(o+1.)) + ((0.0219969592641+0.107296482668j))*dim
            arg[(0, 0, 1, 2)]=(-0.972072221808-0.748349299319j)*x[0]**o + ((0.22702681487+0.842577168391j))*x[0] + ((-0.734060476457+0.072823167276j))*x[1]**o + ((0.29791436563+0.385087009321j))*x[1]
            ref[(0, 0, 1, 2)]=(-1.70613269827-0.675526132043j)*(1+2.*(dim-1)/(o+1.)) + ((0.5249411805+1.22766417771j))*dim
            arg[(0, 0, 1, 3)]=(0.931405962557-0.233845157454j)*x[0]**o + ((0.892211886215+0.369937834455j))*x[0] + ((-0.450167380903+0.0692157393439j))*x[1]**o + ((0.42793222588-0.715329167236j))*x[1]
            ref[(0, 0, 1, 3)]=(0.481238581653-0.16462941811j)*(1+2.*(dim-1)/(o+1.)) + ((1.3201441121-0.345391332781j))*dim
            arg[(0, 0, 2, 0)]=(-0.202176692558+0.949788541606j)*x[0]**o + ((-0.484916133531-0.163923816658j))*x[0] + ((-0.422186345241-0.409310667065j))*x[1]**o + ((-0.942242943037+0.480188610449j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.624363037799+0.540477874541j)*(1+2.*(dim-1)/(o+1.)) + ((-1.42715907657+0.316264793791j))*dim
            arg[(0, 0, 2, 1)]=(-0.530225660715-0.261749872691j)*x[0]**o + ((0.672522252312-0.319087881776j))*x[0] + ((-0.330800135081+0.233467326694j))*x[1]**o + ((0.58384284834-0.598772971753j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.861025795797-0.0282825459965j)*(1+2.*(dim-1)/(o+1.)) + ((1.25636510065-0.917860853528j))*dim
            arg[(0, 0, 2, 2)]=(-0.165028858539+0.571324146216j)*x[0]**o + ((0.604135705693+0.777751894944j))*x[0] + ((-0.686162451558-0.20603237145j))*x[1]**o + ((-0.695378759191+0.0497321364547j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.851191310097+0.365291774766j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0912430534984+0.827484031398j))*dim
            arg[(0, 0, 2, 3)]=(0.461621005567+0.476841006199j)*x[0]**o + ((-0.344643907359+0.613048220661j))*x[0] + ((0.217269980751-0.792153954998j))*x[1]**o + ((0.0550683285334+0.35511749151j))*x[1]
            ref[(0, 0, 2, 3)]=(0.678890986318-0.315312948799j)*(1+2.*(dim-1)/(o+1.)) + ((-0.289575578825+0.968165712172j))*dim
            arg[(0, 0, 3, 0)]=(0.00868900339517+0.51969517301j)*x[0]**o + ((0.247402024804+0.567237608744j))*x[0] + ((-0.842709012643-0.874359932481j))*x[1]**o + ((0.892184270864-0.0221910574945j))*x[1]
            ref[(0, 0, 3, 0)]=(-0.834020009248-0.354664759471j)*(1+2.*(dim-1)/(o+1.)) + ((1.13958629567+0.545046551249j))*dim
            arg[(0, 0, 3, 1)]=(0.734920248617+0.0642721057697j)*x[0]**o + ((0.324818998375+0.138884017594j))*x[0] + ((-0.0895148514738-0.901451245962j))*x[1]**o + ((0.363911898308+0.0391733140513j))*x[1]
            ref[(0, 0, 3, 1)]=(0.645405397143-0.837179140192j)*(1+2.*(dim-1)/(o+1.)) + ((0.688730896683+0.178057331645j))*dim
            arg[(0, 0, 3, 2)]=(0.923725857118-0.955923517889j)*x[0]**o + ((0.793641478685-0.175058238718j))*x[0] + ((-0.829207003698-0.76841391909j))*x[1]**o + ((-0.0510150461351-0.363598073971j))*x[1]
            ref[(0, 0, 3, 2)]=(0.0945188534208-1.72433743698j)*(1+2.*(dim-1)/(o+1.)) + ((0.74262643255-0.538656312689j))*dim
            arg[(0, 0, 3, 3)]=(-0.416632852521-0.0822235648547j)*x[0]**o + ((0.99546848385+0.193871934881j))*x[0] + ((0.392459635427+0.121947253883j))*x[1]**o + ((-0.852688938551+0.644586734586j))*x[1]
            ref[(0, 0, 3, 3)]=(-0.0241732170941+0.039723689028j)*(1+2.*(dim-1)/(o+1.)) + ((0.142779545299+0.838458669467j))*dim
            arg[(0, 1, 0, 0)]=(0.497870283658-0.298312038104j)*x[0]**o + ((-0.841572031387+0.576849357574j))*x[0] + ((-0.0599773419988-0.689461412199j))*x[1]**o + ((0.582487642654-0.0406745600036j))*x[1]
            ref[(0, 1, 0, 0)]=(0.43789294166-0.987773450303j)*(1+2.*(dim-1)/(o+1.)) + ((-0.259084388733+0.536174797571j))*dim
            arg[(0, 1, 0, 1)]=(0.00611581388725+0.0839994165205j)*x[0]**o + ((-0.930844317091+0.28922106628j))*x[0] + ((-0.33408524838-0.0263960548577j))*x[1]**o + ((-0.00237209602438-0.905082986623j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.327969434493+0.0576033616628j)*(1+2.*(dim-1)/(o+1.)) + ((-0.933216413115-0.615861920344j))*dim
            arg[(0, 1, 0, 2)]=(0.834685654593+0.0973142653766j)*x[0]**o + ((0.781303403985-0.597057675843j))*x[0] + ((0.783240553665-0.35807165226j))*x[1]**o + ((-0.252143021163+0.174188790176j))*x[1]
            ref[(0, 1, 0, 2)]=(1.61792620826-0.260757386884j)*(1+2.*(dim-1)/(o+1.)) + ((0.529160382821-0.422868885666j))*dim
            arg[(0, 1, 0, 3)]=(-0.678582381211+0.270596602851j)*x[0]**o + ((-0.934086491984-0.986271453292j))*x[0] + ((0.698124762473-0.197690265273j))*x[1]**o + ((-0.00423646976852-0.504037978519j))*x[1]
            ref[(0, 1, 0, 3)]=(0.019542381262+0.0729063375776j)*(1+2.*(dim-1)/(o+1.)) + ((-0.938322961753-1.49030943181j))*dim
            arg[(0, 1, 1, 0)]=(-0.631738151415+0.587037731869j)*x[0]**o + ((0.678313867202+0.718850945888j))*x[0] + ((-0.423858912273-0.0501384734816j))*x[1]**o + ((0.974128836173-0.337974360223j))*x[1]
            ref[(0, 1, 1, 0)]=(-1.05559706369+0.536899258388j)*(1+2.*(dim-1)/(o+1.)) + ((1.65244270338+0.380876585665j))*dim
            arg[(0, 1, 1, 1)]=(-0.576671737931-0.0340927649922j)*x[0]**o + ((-0.727388907583-0.3308619451j))*x[0] + ((0.54193219484+0.861929525345j))*x[1]**o + ((0.0173944463627+0.333320517049j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.0347395430909+0.827836760353j)*(1+2.*(dim-1)/(o+1.)) + ((-0.709994461221+0.00245857194968j))*dim
            arg[(0, 1, 1, 2)]=(0.439551882109-0.631329742468j)*x[0]**o + ((0.853271497708+0.621176407183j))*x[0] + ((-0.88079351992-0.856746814389j))*x[1]**o + ((0.824862641186+0.946471591325j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.441241637811-1.48807655686j)*(1+2.*(dim-1)/(o+1.)) + ((1.67813413889+1.56764799851j))*dim
            arg[(0, 1, 1, 3)]=(0.730051236971-0.699894757175j)*x[0]**o + ((-0.362436684422+0.144471802854j))*x[0] + ((0.562943622789-0.275158098935j))*x[1]**o + ((0.663624639498+0.260947885532j))*x[1]
            ref[(0, 1, 1, 3)]=(1.29299485976-0.975052856111j)*(1+2.*(dim-1)/(o+1.)) + ((0.301187955076+0.405419688386j))*dim
            arg[(0, 1, 2, 0)]=(-0.474167134985-0.809937919157j)*x[0]**o + ((-0.0616898109387-0.44095982373j))*x[0] + ((0.527077177235-0.537479375985j))*x[1]**o + ((0.866170177725+0.40534290947j))*x[1]
            ref[(0, 1, 2, 0)]=(0.0529100422505-1.34741729514j)*(1+2.*(dim-1)/(o+1.)) + ((0.804480366786-0.0356169142597j))*dim
            arg[(0, 1, 2, 1)]=(-0.640826728017-0.311227117724j)*x[0]**o + ((0.699855635127+0.0438505513751j))*x[0] + ((0.396170300583+0.440644138419j))*x[1]**o + ((0.519230614651+0.168940159287j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.244656427434+0.129417020695j)*(1+2.*(dim-1)/(o+1.)) + ((1.21908624978+0.212790710663j))*dim
            arg[(0, 1, 2, 2)]=(-0.192992952451-0.975391713413j)*x[0]**o + ((-0.504912702561+0.558597826213j))*x[0] + ((-0.504158009368+0.816984466393j))*x[1]**o + ((-0.949343669333-0.348129870204j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.697150961819-0.158407247019j)*(1+2.*(dim-1)/(o+1.)) + ((-1.45425637189+0.21046795601j))*dim
            arg[(0, 1, 2, 3)]=(-0.531176475952+0.778021987276j)*x[0]**o + ((0.200350047708+0.127231549237j))*x[0] + ((0.00762035074805+0.915592633361j))*x[1]**o + ((-0.174126127679+0.301181904337j))*x[1]
            ref[(0, 1, 2, 3)]=(-0.523556125204+1.69361462064j)*(1+2.*(dim-1)/(o+1.)) + ((0.026223920029+0.428413453574j))*dim
            arg[(0, 1, 3, 0)]=(0.853427320537+0.368589259j)*x[0]**o + ((0.15970072215-0.724882117076j))*x[0] + ((0.695835769913-0.572640376943j))*x[1]**o + ((-0.480345063362+0.782907169703j))*x[1]
            ref[(0, 1, 3, 0)]=(1.54926309045-0.204051117943j)*(1+2.*(dim-1)/(o+1.)) + ((-0.320644341212+0.0580250526271j))*dim
            arg[(0, 1, 3, 1)]=(-0.748033259035+0.148261737235j)*x[0]**o + ((-0.644048418191+0.465010449301j))*x[0] + ((-0.415443959304-0.035437372739j))*x[1]**o + ((0.985073441888-0.748290679991j))*x[1]
            ref[(0, 1, 3, 1)]=(-1.16347721834+0.112824364496j)*(1+2.*(dim-1)/(o+1.)) + ((0.341025023698-0.28328023069j))*dim
            arg[(0, 1, 3, 2)]=(-0.446542444985+0.871094969256j)*x[0]**o + ((-0.0600759218161-0.722953768408j))*x[0] + ((-0.622764674335+0.780747748677j))*x[1]**o + ((0.209975056257+0.338006522188j))*x[1]
            ref[(0, 1, 3, 2)]=(-1.06930711932+1.65184271793j)*(1+2.*(dim-1)/(o+1.)) + ((0.149899134441-0.38494724622j))*dim
            arg[(0, 1, 3, 3)]=(0.80378751227-0.673877630785j)*x[0]**o + ((0.92271469934+0.432618640855j))*x[0] + ((0.643882156116+0.607427339654j))*x[1]**o + ((-0.28983391136-0.837465978552j))*x[1]
            ref[(0, 1, 3, 3)]=(1.44766966839-0.0664502911316j)*(1+2.*(dim-1)/(o+1.)) + ((0.63288078798-0.404847337697j))*dim
            arg[(0, 2, 0, 0)]=(0.0318564732619+0.68882126342j)*x[0]**o + ((-0.614306445411-0.771439925891j))*x[0] + ((0.260275235651-0.165314182014j))*x[1]**o + ((0.0676804706256-0.540518688634j))*x[1]
            ref[(0, 2, 0, 0)]=(0.292131708913+0.523507081405j)*(1+2.*(dim-1)/(o+1.)) + ((-0.546625974785-1.31195861453j))*dim
            arg[(0, 2, 0, 1)]=(-0.787634712906+0.978362611128j)*x[0]**o + ((0.0401298096047+0.167228578163j))*x[0] + ((0.464356358933+0.171327194013j))*x[1]**o + ((0.928273245483-0.998078058994j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.323278353972+1.14968980514j)*(1+2.*(dim-1)/(o+1.)) + ((0.968403055088-0.830849480831j))*dim
            arg[(0, 2, 0, 2)]=(0.0561363312705+0.515234265498j)*x[0]**o + ((-0.0900333520868+0.863717219198j))*x[0] + ((0.863746898587+0.0782584934958j))*x[1]**o + ((0.953059703744+0.175585714585j))*x[1]
            ref[(0, 2, 0, 2)]=(0.919883229857+0.593492758994j)*(1+2.*(dim-1)/(o+1.)) + ((0.863026351657+1.03930293378j))*dim
            arg[(0, 2, 0, 3)]=(0.255773399046+0.421760198887j)*x[0]**o + ((0.843536565049-0.940401690092j))*x[0] + ((0.930496813597-0.824233809597j))*x[1]**o + ((-0.323011104586-0.385221549224j))*x[1]
            ref[(0, 2, 0, 3)]=(1.18627021264-0.402473610711j)*(1+2.*(dim-1)/(o+1.)) + ((0.520525460464-1.32562323932j))*dim
            arg[(0, 2, 1, 0)]=(-0.0888115271035+0.0834310671727j)*x[0]**o + ((0.431223115372+0.808348321124j))*x[0] + ((-0.408997825738-0.4944792051j))*x[1]**o + ((-0.277929676636+0.891827866995j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.497809352841-0.411048137928j)*(1+2.*(dim-1)/(o+1.)) + ((0.153293438736+1.70017618812j))*dim
            arg[(0, 2, 1, 1)]=(0.731444396622-0.505443370433j)*x[0]**o + ((-0.838052155852+0.0761739116597j))*x[0] + ((-0.29873902443+0.297216076817j))*x[1]**o + ((0.357925208639+0.126064416365j))*x[1]
            ref[(0, 2, 1, 1)]=(0.432705372192-0.208227293616j)*(1+2.*(dim-1)/(o+1.)) + ((-0.480126947214+0.202238328025j))*dim
            arg[(0, 2, 1, 2)]=(0.933719171202+0.662401198874j)*x[0]**o + ((0.568085558937+0.57598853471j))*x[0] + ((-0.649165331965+0.18132247999j))*x[1]**o + ((0.795043267984+0.562900726908j))*x[1]
            ref[(0, 2, 1, 2)]=(0.284553839236+0.843723678863j)*(1+2.*(dim-1)/(o+1.)) + ((1.36312882692+1.13888926162j))*dim
            arg[(0, 2, 1, 3)]=(0.915592190481-0.968075660287j)*x[0]**o + ((-0.34562738567+0.45353357049j))*x[0] + ((-0.0114879645902+0.334859161009j))*x[1]**o + ((0.732990797716-0.947674178967j))*x[1]
            ref[(0, 2, 1, 3)]=(0.904104225891-0.633216499277j)*(1+2.*(dim-1)/(o+1.)) + ((0.387363412046-0.494140608477j))*dim
            arg[(0, 2, 2, 0)]=(-0.20219377205-0.987623722884j)*x[0]**o + ((-0.832156988371-0.205059129864j))*x[0] + ((-0.661324106493+0.777389468528j))*x[1]**o + ((-0.721558860293-0.950954721584j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.863517878543-0.210234254356j)*(1+2.*(dim-1)/(o+1.)) + ((-1.55371584866-1.15601385145j))*dim
            arg[(0, 2, 2, 1)]=(-0.647757393626-0.839069557793j)*x[0]**o + ((-0.901842448145-0.989961206912j))*x[0] + ((-0.437534086788+0.452499601355j))*x[1]**o + ((0.627250950098+0.462640365228j))*x[1]
            ref[(0, 2, 2, 1)]=(-1.08529148041-0.386569956437j)*(1+2.*(dim-1)/(o+1.)) + ((-0.274591498046-0.527320841684j))*dim
            arg[(0, 2, 2, 2)]=(-0.265306165876+0.745962022773j)*x[0]**o + ((0.175635849497-0.315223811371j))*x[0] + ((-0.778095233129-0.161496230708j))*x[1]**o + ((-0.155997772147+0.587691335695j))*x[1]
            ref[(0, 2, 2, 2)]=(-1.04340139901+0.584465792065j)*(1+2.*(dim-1)/(o+1.)) + ((0.0196380773494+0.272467524324j))*dim
            arg[(0, 2, 2, 3)]=(-0.618489290629+0.12350008556j)*x[0]**o + ((0.837960853489-0.673599295031j))*x[0] + ((0.717183576483+0.200043794019j))*x[1]**o + ((-0.635460287428+0.722065629395j))*x[1]
            ref[(0, 2, 2, 3)]=(0.0986942858542+0.323543879579j)*(1+2.*(dim-1)/(o+1.)) + ((0.202500566061+0.048466334364j))*dim
            arg[(0, 2, 3, 0)]=(0.131111017146-0.614212284107j)*x[0]**o + ((0.150790038005+0.2850066657j))*x[0] + ((0.363286608671-0.632663900683j))*x[1]**o + ((0.469877316568+0.128561458364j))*x[1]
            ref[(0, 2, 3, 0)]=(0.494397625817-1.24687618479j)*(1+2.*(dim-1)/(o+1.)) + ((0.620667354573+0.413568124064j))*dim
            arg[(0, 2, 3, 1)]=(-0.393258278779+0.663622265917j)*x[0]**o + ((-0.317950942643-0.764624616703j))*x[0] + ((-0.392756299491-0.744262138106j))*x[1]**o + ((-0.255994617946-0.762385423491j))*x[1]
            ref[(0, 2, 3, 1)]=(-0.78601457827-0.080639872189j)*(1+2.*(dim-1)/(o+1.)) + ((-0.573945560589-1.52701004019j))*dim
            arg[(0, 2, 3, 2)]=(-0.542995072371-0.806883841463j)*x[0]**o + ((-0.865738551703-0.234989395104j))*x[0] + ((-0.210721697088-0.304049860862j))*x[1]**o + ((0.240694989217-0.872754395954j))*x[1]
            ref[(0, 2, 3, 2)]=(-0.75371676946-1.11093370232j)*(1+2.*(dim-1)/(o+1.)) + ((-0.625043562486-1.10774379106j))*dim
            arg[(0, 2, 3, 3)]=(-0.691705015148+0.0263678749029j)*x[0]**o + ((-0.265610407896+0.880692844287j))*x[0] + ((-0.725231484048+0.700359936795j))*x[1]**o + ((-0.558684157881+0.491670570007j))*x[1]
            ref[(0, 2, 3, 3)]=(-1.4169364992+0.726727811698j)*(1+2.*(dim-1)/(o+1.)) + ((-0.824294565777+1.37236341429j))*dim
            arg[(0, 3, 0, 0)]=(0.642163223672+0.0771813924453j)*x[0]**o + ((-0.0748799405314+0.207882922881j))*x[0] + ((-0.680198363838-0.034844307397j))*x[1]**o + ((-0.750123375049-0.595980343594j))*x[1]
            ref[(0, 3, 0, 0)]=(-0.0380351401659+0.0423370850483j)*(1+2.*(dim-1)/(o+1.)) + ((-0.825003315581-0.388097420712j))*dim
            arg[(0, 3, 0, 1)]=(-0.864388085414+0.817610884897j)*x[0]**o + ((-0.284443735792-0.945480527965j))*x[0] + ((-0.245440174822-0.407529129401j))*x[1]**o + ((-0.325842817688-0.521712717389j))*x[1]
            ref[(0, 3, 0, 1)]=(-1.10982826024+0.410081755496j)*(1+2.*(dim-1)/(o+1.)) + ((-0.61028655348-1.46719324535j))*dim
            arg[(0, 3, 0, 2)]=(-0.54940410279+0.98190566448j)*x[0]**o + ((-0.0092486287394+0.833991875152j))*x[0] + ((-0.198752586796+0.782232076492j))*x[1]**o + ((-0.00242775193695-0.469496295177j))*x[1]
            ref[(0, 3, 0, 2)]=(-0.748156689587+1.76413774097j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0116763806763+0.364495579975j))*dim
            arg[(0, 3, 0, 3)]=(0.482401591015+0.606953537419j)*x[0]**o + ((0.00185897720658+0.39646929418j))*x[0] + ((-0.22524329322+0.0853657760291j))*x[1]**o + ((0.254657162476-0.668031989323j))*x[1]
            ref[(0, 3, 0, 3)]=(0.257158297795+0.692319313449j)*(1+2.*(dim-1)/(o+1.)) + ((0.256516139683-0.271562695143j))*dim
            arg[(0, 3, 1, 0)]=(0.1781365525+0.566665713494j)*x[0]**o + ((-0.750015503196-0.224199985849j))*x[0] + ((0.766780753113+0.799193371244j))*x[1]**o + ((0.619273777162-0.360221294191j))*x[1]
            ref[(0, 3, 1, 0)]=(0.944917305613+1.36585908474j)*(1+2.*(dim-1)/(o+1.)) + ((-0.130741726034-0.584421280039j))*dim
            arg[(0, 3, 1, 1)]=(-0.0406971764268-0.419943041607j)*x[0]**o + ((-0.0891565745597+0.590142569592j))*x[0] + ((0.560318373249-0.943930325109j))*x[1]**o + ((-0.14399390161+0.645859084288j))*x[1]
            ref[(0, 3, 1, 1)]=(0.519621196822-1.36387336672j)*(1+2.*(dim-1)/(o+1.)) + ((-0.23315047617+1.23600165388j))*dim
            arg[(0, 3, 1, 2)]=(-0.268626878444-0.871155062268j)*x[0]**o + ((-0.857276453978+0.113971407208j))*x[0] + ((0.872330911821-0.182339563187j))*x[1]**o + ((-0.784743589374+0.553993770382j))*x[1]
            ref[(0, 3, 1, 2)]=(0.603704033377-1.05349462545j)*(1+2.*(dim-1)/(o+1.)) + ((-1.64202004335+0.66796517759j))*dim
            arg[(0, 3, 1, 3)]=(-0.727024897708+0.445434972421j)*x[0]**o + ((-0.0507883436292+0.516662692429j))*x[0] + ((-0.794437685451+0.287688648979j))*x[1]**o + ((0.352392261307-0.0494399920182j))*x[1]
            ref[(0, 3, 1, 3)]=(-1.52146258316+0.7331236214j)*(1+2.*(dim-1)/(o+1.)) + ((0.301603917678+0.46722270041j))*dim
            arg[(0, 3, 2, 0)]=(0.377870724632+0.351458337992j)*x[0]**o + ((0.519668800371+0.320205340609j))*x[0] + ((0.87601564755+0.0519987696677j))*x[1]**o + ((-0.304254409744+0.936808305737j))*x[1]
            ref[(0, 3, 2, 0)]=(1.25388637218+0.40345710766j)*(1+2.*(dim-1)/(o+1.)) + ((0.215414390627+1.25701364635j))*dim
            arg[(0, 3, 2, 1)]=(-0.962812226122+0.616260541973j)*x[0]**o + ((0.639012624699+0.93091856552j))*x[0] + ((0.189823328929-0.910854484781j))*x[1]**o + ((0.509007662299-0.598540454599j))*x[1]
            ref[(0, 3, 2, 1)]=(-0.772988897193-0.294593942808j)*(1+2.*(dim-1)/(o+1.)) + ((1.148020287+0.33237811092j))*dim
            arg[(0, 3, 2, 2)]=(0.904328296486-0.356439694624j)*x[0]**o + ((-0.49607189995+0.388917755459j))*x[0] + ((-0.339164985359+0.613707504579j))*x[1]**o + ((-0.0366994956102-0.798201610419j))*x[1]
            ref[(0, 3, 2, 2)]=(0.565163311126+0.257267809956j)*(1+2.*(dim-1)/(o+1.)) + ((-0.53277139556-0.409283854961j))*dim
            arg[(0, 3, 2, 3)]=(0.483783832815-0.898926415228j)*x[0]**o + ((0.795710361016+0.109292979052j))*x[0] + ((0.244103695148+0.15566900482j))*x[1]**o + ((0.106560283141-0.556795178605j))*x[1]
            ref[(0, 3, 2, 3)]=(0.727887527962-0.743257410409j)*(1+2.*(dim-1)/(o+1.)) + ((0.902270644157-0.447502199553j))*dim
            arg[(0, 3, 3, 0)]=(0.0703397012342-0.975847952058j)*x[0]**o + ((-0.261091058196-0.321025197459j))*x[0] + ((0.644623278417+0.110029548225j))*x[1]**o + ((-0.536705441516-0.262951830346j))*x[1]
            ref[(0, 3, 3, 0)]=(0.714962979651-0.865818403833j)*(1+2.*(dim-1)/(o+1.)) + ((-0.797796499712-0.583977027804j))*dim
            arg[(0, 3, 3, 1)]=(0.679544468018-0.924704898922j)*x[0]**o + ((-0.473702858206+0.410716813628j))*x[0] + ((-0.686855403847+0.281505342581j))*x[1]**o + ((0.405837653106-0.596825625376j))*x[1]
            ref[(0, 3, 3, 1)]=(-0.0073109358296-0.643199556342j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0678652050996-0.186108811748j))*dim
            arg[(0, 3, 3, 2)]=(-0.770473178891-0.469956648584j)*x[0]**o + ((0.0163372293019-0.302473004263j))*x[0] + ((-0.112563273667+0.887823381464j))*x[1]**o + ((-0.0451403259119-0.691797642762j))*x[1]
            ref[(0, 3, 3, 2)]=(-0.883036452558+0.41786673288j)*(1+2.*(dim-1)/(o+1.)) + ((-0.02880309661-0.994270647026j))*dim
            arg[(0, 3, 3, 3)]=(0.735776391272+0.867895083283j)*x[0]**o + ((-0.86964233819-0.771145834301j))*x[0] + ((-0.961100300533+0.709766845287j))*x[1]**o + ((-0.37128918423+0.226056204981j))*x[1]
            ref[(0, 3, 3, 3)]=(-0.225323909261+1.57766192857j)*(1+2.*(dim-1)/(o+1.)) + ((-1.24093152242-0.54508962932j))*dim
            arg[(1, 0, 0, 0)]=(0.195910515869-0.90540157371j)*x[0]**o + ((0.659734556368+0.492429831697j))*x[0] + ((0.380984094551+0.503873955197j))*x[1]**o + ((-0.541332453681+0.808132326279j))*x[1]
            ref[(1, 0, 0, 0)]=(0.57689461042-0.401527618513j)*(1+2.*(dim-1)/(o+1.)) + ((0.118402102687+1.30056215798j))*dim
            arg[(1, 0, 0, 1)]=(0.970281241554-0.777993953133j)*x[0]**o + ((-0.838645164862+0.955852793522j))*x[0] + ((-0.896131227077-0.81947444609j))*x[1]**o + ((0.610621226342-0.57401844317j))*x[1]
            ref[(1, 0, 0, 1)]=(0.0741500144768-1.59746839922j)*(1+2.*(dim-1)/(o+1.)) + ((-0.228023938521+0.381834350353j))*dim
            arg[(1, 0, 0, 2)]=(-0.783185607415+0.214857919045j)*x[0]**o + ((0.348653522569-0.372084223245j))*x[0] + ((0.707782130757-0.456572486874j))*x[1]**o + ((0.582301718887+0.401065979071j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.0754034766576-0.241714567829j)*(1+2.*(dim-1)/(o+1.)) + ((0.930955241456+0.028981755826j))*dim
            arg[(1, 0, 0, 3)]=(-0.594244449426+0.963146413285j)*x[0]**o + ((-0.950766634017+0.0226429195585j))*x[0] + ((0.671818038425-0.205560676483j))*x[1]**o + ((0.503110555666-0.751670320249j))*x[1]
            ref[(1, 0, 0, 3)]=(0.0775735889989+0.757585736801j)*(1+2.*(dim-1)/(o+1.)) + ((-0.447656078351-0.72902740069j))*dim
            arg[(1, 0, 1, 0)]=(0.609631984267+0.996135994806j)*x[0]**o + ((0.470503375447-0.187619144626j))*x[0] + ((0.81858193243+0.910794632992j))*x[1]**o + ((-0.642918752607-0.373297056404j))*x[1]
            ref[(1, 0, 1, 0)]=(1.4282139167+1.9069306278j)*(1+2.*(dim-1)/(o+1.)) + ((-0.17241537716-0.56091620103j))*dim
            arg[(1, 0, 1, 1)]=(0.750527210593+0.497257564027j)*x[0]**o + ((-0.735980604423-0.101499232405j))*x[0] + ((-0.55890154215-0.0841323179299j))*x[1]**o + ((-0.307695885891+0.00564654562459j))*x[1]
            ref[(1, 0, 1, 1)]=(0.191625668443+0.413125246097j)*(1+2.*(dim-1)/(o+1.)) + ((-1.04367649031-0.0958526867803j))*dim
            arg[(1, 0, 1, 2)]=(-0.212119701067-0.182123997107j)*x[0]**o + ((0.190976529264-0.512442308918j))*x[0] + ((0.977463833507-0.906665113496j))*x[1]**o + ((-0.920982842859-0.0887682219384j))*x[1]
            ref[(1, 0, 1, 2)]=(0.765344132439-1.0887891106j)*(1+2.*(dim-1)/(o+1.)) + ((-0.730006313595-0.601210530856j))*dim
            arg[(1, 0, 1, 3)]=(0.212118546907-0.00424991368218j)*x[0]**o + ((-0.194782134093-0.19166008714j))*x[0] + ((0.0835962949818-0.356182152564j))*x[1]**o + ((-0.519532224963-0.320683630172j))*x[1]
            ref[(1, 0, 1, 3)]=(0.295714841889-0.360432066246j)*(1+2.*(dim-1)/(o+1.)) + ((-0.714314359056-0.512343717312j))*dim
            arg[(1, 0, 2, 0)]=(-0.318107638898-0.897430947618j)*x[0]**o + ((-0.75574569766-0.122335448013j))*x[0] + ((-0.0359223950439+0.104976658238j))*x[1]**o + ((-0.177588863506-0.598250752252j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.354030033942-0.792454289381j)*(1+2.*(dim-1)/(o+1.)) + ((-0.933334561166-0.720586200265j))*dim
            arg[(1, 0, 2, 1)]=(0.940687247638-0.189663662236j)*x[0]**o + ((0.479745194933-0.835417833122j))*x[0] + ((-0.116594653549+0.78558175773j))*x[1]**o + ((0.73595430352-0.627027385324j))*x[1]
            ref[(1, 0, 2, 1)]=(0.82409259409+0.595918095494j)*(1+2.*(dim-1)/(o+1.)) + ((1.21569949845-1.46244521845j))*dim
            arg[(1, 0, 2, 2)]=(-0.980168889787+0.775609559682j)*x[0]**o + ((-0.0650618858823+0.435285386237j))*x[0] + ((0.704711430423-0.390804223537j))*x[1]**o + ((0.870310924219-0.133194950694j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.275457459364+0.384805336145j)*(1+2.*(dim-1)/(o+1.)) + ((0.805249038337+0.302090435542j))*dim
            arg[(1, 0, 2, 3)]=(-0.658635154006-0.940675063311j)*x[0]**o + ((-0.110724224066+0.18135064194j))*x[0] + ((-0.600516666611-0.510188639369j))*x[1]**o + ((-0.081005992912+0.209034488671j))*x[1]
            ref[(1, 0, 2, 3)]=(-1.25915182062-1.45086370268j)*(1+2.*(dim-1)/(o+1.)) + ((-0.191730216978+0.390385130611j))*dim
            arg[(1, 0, 3, 0)]=(0.196030202866-0.90761084622j)*x[0]**o + ((-0.108322329125-0.629727285485j))*x[0] + ((0.28683183199+0.715401001039j))*x[1]**o + ((0.880157460265+0.343673332861j))*x[1]
            ref[(1, 0, 3, 0)]=(0.482862034856-0.192209845181j)*(1+2.*(dim-1)/(o+1.)) + ((0.771835131139-0.286053952623j))*dim
            arg[(1, 0, 3, 1)]=(0.317610039527-0.932093958212j)*x[0]**o + ((-0.999874456675-0.0404833308007j))*x[0] + ((-0.951202463323+0.803288248831j))*x[1]**o + ((0.319202103417-0.720015019743j))*x[1]
            ref[(1, 0, 3, 1)]=(-0.633592423796-0.128805709381j)*(1+2.*(dim-1)/(o+1.)) + ((-0.680672353258-0.760498350544j))*dim
            arg[(1, 0, 3, 2)]=(0.311390230844-0.974873780564j)*x[0]**o + ((0.717450052716-0.172696249102j))*x[0] + ((-0.808236933024+0.653266697008j))*x[1]**o + ((-0.323155964413+0.0457374944237j))*x[1]
            ref[(1, 0, 3, 2)]=(-0.49684670218-0.321607083556j)*(1+2.*(dim-1)/(o+1.)) + ((0.394294088303-0.126958754678j))*dim
            arg[(1, 0, 3, 3)]=(-0.487756581982-0.30421499622j)*x[0]**o + ((-0.764726102165-0.599691567473j))*x[0] + ((-0.759318209541-0.955504785018j))*x[1]**o + ((0.224262989837-0.0738958194127j))*x[1]
            ref[(1, 0, 3, 3)]=(-1.24707479152-1.25971978124j)*(1+2.*(dim-1)/(o+1.)) + ((-0.540463112329-0.673587386885j))*dim
            arg[(1, 1, 0, 0)]=(-0.530014496353+0.918929710694j)*x[0]**o + ((-0.131627441551-0.199385434093j))*x[0] + ((0.696477065046-0.958894050733j))*x[1]**o + ((-0.113924826572+0.933305325152j))*x[1]
            ref[(1, 1, 0, 0)]=(0.166462568693-0.0399643400388j)*(1+2.*(dim-1)/(o+1.)) + ((-0.245552268124+0.733919891059j))*dim
            arg[(1, 1, 0, 1)]=(0.996984814382-0.0639592977261j)*x[0]**o + ((-0.460327677675+0.573673898689j))*x[0] + ((0.259261402297-0.972154638667j))*x[1]**o + ((0.671819806566+0.203530644706j))*x[1]
            ref[(1, 1, 0, 1)]=(1.25624621668-1.03611393639j)*(1+2.*(dim-1)/(o+1.)) + ((0.211492128891+0.777204543395j))*dim
            arg[(1, 1, 0, 2)]=(-0.747430977873+0.982864535749j)*x[0]**o + ((0.0398427195615+0.955170704456j))*x[0] + ((0.550259084093+0.0609488775557j))*x[1]**o + ((-0.622274885129-0.557705634639j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.19717189378+1.0438134133j)*(1+2.*(dim-1)/(o+1.)) + ((-0.582432165567+0.397465069817j))*dim
            arg[(1, 1, 0, 3)]=(-0.278234309553-0.78871668112j)*x[0]**o + ((-0.482558254775-0.50558714369j))*x[0] + ((0.389336800523+0.504832211703j))*x[1]**o + ((-0.555049380179-0.408711516713j))*x[1]
            ref[(1, 1, 0, 3)]=(0.11110249097-0.283884469417j)*(1+2.*(dim-1)/(o+1.)) + ((-1.03760763495-0.914298660403j))*dim
            arg[(1, 1, 1, 0)]=(-0.788351829312+0.107343967674j)*x[0]**o + ((-0.70291613036+0.663154613735j))*x[0] + ((0.593409717407+0.499430448109j))*x[1]**o + ((-0.741379896086+0.664989292872j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.194942111905+0.606774415782j)*(1+2.*(dim-1)/(o+1.)) + ((-1.44429602645+1.32814390661j))*dim
            arg[(1, 1, 1, 1)]=(-0.44147352456+0.554791367471j)*x[0]**o + ((-0.53195470217+0.920923496888j))*x[0] + ((-0.913940314107-0.764584491595j))*x[1]**o + ((-0.745135495019+0.825872712465j))*x[1]
            ref[(1, 1, 1, 1)]=(-1.35541383867-0.209793124124j)*(1+2.*(dim-1)/(o+1.)) + ((-1.27709019719+1.74679620935j))*dim
            arg[(1, 1, 1, 2)]=(-0.090776198581+0.0043239571058j)*x[0]**o + ((-0.205186972652+0.364791460121j))*x[0] + ((0.00897177848328-0.157705552458j))*x[1]**o + ((0.36148770439+0.103473779647j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.0818044200977-0.153381595353j)*(1+2.*(dim-1)/(o+1.)) + ((0.156300731739+0.468265239768j))*dim
            arg[(1, 1, 1, 3)]=(-0.323518728152-0.104541581459j)*x[0]**o + ((0.52650954347-0.517148676888j))*x[0] + ((0.788927866573+0.203384912481j))*x[1]**o + ((-0.191529548544+0.846871157932j))*x[1]
            ref[(1, 1, 1, 3)]=(0.465409138422+0.098843331022j)*(1+2.*(dim-1)/(o+1.)) + ((0.334979994926+0.329722481043j))*dim
            arg[(1, 1, 2, 0)]=(0.760840312926-0.0210578144673j)*x[0]**o + ((-0.791604721161-0.0991453223472j))*x[0] + ((-0.259801274134-0.488765507267j))*x[1]**o + ((-0.463834208597+0.118401098641j))*x[1]
            ref[(1, 1, 2, 0)]=(0.501039038791-0.509823321734j)*(1+2.*(dim-1)/(o+1.)) + ((-1.25543892976+0.0192557762942j))*dim
            arg[(1, 1, 2, 1)]=(-0.914554725934+0.0125025369j)*x[0]**o + ((-0.912130578397+0.307263670021j))*x[0] + ((0.93410526128+0.59614728378j))*x[1]**o + ((-0.913202123371-0.654618503086j))*x[1]
            ref[(1, 1, 2, 1)]=(0.0195505353462+0.60864982068j)*(1+2.*(dim-1)/(o+1.)) + ((-1.82533270177-0.347354833065j))*dim
            arg[(1, 1, 2, 2)]=(-0.272914576869-0.010287690302j)*x[0]**o + ((-0.616456022627+0.820758341149j))*x[0] + ((-0.234428162805+0.0826969424158j))*x[1]**o + ((0.993890876387+0.161911512595j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.507342739674+0.0724092521138j)*(1+2.*(dim-1)/(o+1.)) + ((0.37743485376+0.982669853744j))*dim
            arg[(1, 1, 2, 3)]=(-0.851201595069+0.809175929727j)*x[0]**o + ((0.103652731978-0.222291538899j))*x[0] + ((-0.303779267152-0.508370905559j))*x[1]**o + ((-0.761574314745+0.850315323456j))*x[1]
            ref[(1, 1, 2, 3)]=(-1.15498086222+0.300805024168j)*(1+2.*(dim-1)/(o+1.)) + ((-0.657921582766+0.628023784557j))*dim
            arg[(1, 1, 3, 0)]=(0.791157961557+0.535198983731j)*x[0]**o + ((0.420159608844+0.152660773516j))*x[0] + ((0.404495840265+0.356154461378j))*x[1]**o + ((-0.379601233337+0.364010540261j))*x[1]
            ref[(1, 1, 3, 0)]=(1.19565380182+0.891353445109j)*(1+2.*(dim-1)/(o+1.)) + ((0.0405583755069+0.516671313777j))*dim
            arg[(1, 1, 3, 1)]=(-0.00405251156349+0.608628944964j)*x[0]**o + ((-0.35466222143+0.789761623353j))*x[0] + ((0.0300577596222-0.63007831596j))*x[1]**o + ((0.599579199277-0.788237705853j))*x[1]
            ref[(1, 1, 3, 1)]=(0.0260052480587-0.021449370996j)*(1+2.*(dim-1)/(o+1.)) + ((0.244916977846+0.00152391750046j))*dim
            arg[(1, 1, 3, 2)]=(0.262609620076+0.857719980118j)*x[0]**o + ((-0.623882641286+0.0521347968744j))*x[0] + ((-0.596308790514-0.894092173137j))*x[1]**o + ((0.162459738376-0.4241218097j))*x[1]
            ref[(1, 1, 3, 2)]=(-0.333699170438-0.0363721930191j)*(1+2.*(dim-1)/(o+1.)) + ((-0.46142290291-0.371987012826j))*dim
            arg[(1, 1, 3, 3)]=(-0.564037902011-0.170473892374j)*x[0]**o + ((-0.384788505885-0.700074499623j))*x[0] + ((-0.288518998676-0.0484614756913j))*x[1]**o + ((0.922941599506+0.758843292599j))*x[1]
            ref[(1, 1, 3, 3)]=(-0.852556900688-0.218935368065j)*(1+2.*(dim-1)/(o+1.)) + ((0.538153093622+0.0587687929764j))*dim
            arg[(1, 2, 0, 0)]=(-0.278083147079-0.961039623407j)*x[0]**o + ((-0.605380326069-0.899800580567j))*x[0] + ((0.278872991778-0.79410846307j))*x[1]**o + ((-0.0665137461038-0.516014211245j))*x[1]
            ref[(1, 2, 0, 0)]=(0.000789844699192-1.75514808648j)*(1+2.*(dim-1)/(o+1.)) + ((-0.671894072173-1.41581479181j))*dim
            arg[(1, 2, 0, 1)]=(-0.693271603579-0.466615950236j)*x[0]**o + ((0.103845455136-0.859462257663j))*x[0] + ((-0.611251655183-0.624444705502j))*x[1]**o + ((-0.64599680341-0.839168396165j))*x[1]
            ref[(1, 2, 0, 1)]=(-1.30452325876-1.09106065574j)*(1+2.*(dim-1)/(o+1.)) + ((-0.542151348274-1.69863065383j))*dim
            arg[(1, 2, 0, 2)]=(0.263460364937+0.409308042322j)*x[0]**o + ((0.584367944859-0.893151211781j))*x[0] + ((0.00375576760237-0.353772974742j))*x[1]**o + ((-0.0783065860224-0.0900470318933j))*x[1]
            ref[(1, 2, 0, 2)]=(0.267216132539+0.0555350675801j)*(1+2.*(dim-1)/(o+1.)) + ((0.506061358836-0.983198243674j))*dim
            arg[(1, 2, 0, 3)]=(-0.82754934828+0.0321566841868j)*x[0]**o + ((0.896629499761+0.810353840958j))*x[0] + ((-0.587956394944-0.607428050085j))*x[1]**o + ((0.507884348353+0.405862559436j))*x[1]
            ref[(1, 2, 0, 3)]=(-1.41550574322-0.575271365898j)*(1+2.*(dim-1)/(o+1.)) + ((1.40451384811+1.21621640039j))*dim
            arg[(1, 2, 1, 0)]=(0.102539501048-0.407846001555j)*x[0]**o + ((-0.57047632985-0.956986179751j))*x[0] + ((0.266282569241-0.77078291549j))*x[1]**o + ((0.881196470991+0.14019218476j))*x[1]
            ref[(1, 2, 1, 0)]=(0.368822070289-1.17862891704j)*(1+2.*(dim-1)/(o+1.)) + ((0.31072014114-0.816793994992j))*dim
            arg[(1, 2, 1, 1)]=(-0.833902213265+0.857631552472j)*x[0]**o + ((-0.95672570647-0.328369664903j))*x[0] + ((0.488581858257-0.0418768276858j))*x[1]**o + ((-0.975205910193+0.721744326906j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.345320355009+0.815754724786j)*(1+2.*(dim-1)/(o+1.)) + ((-1.93193161666+0.393374662003j))*dim
            arg[(1, 2, 1, 2)]=(-0.516811332541-0.183219242635j)*x[0]**o + ((0.418261206727-0.0778647725252j))*x[0] + ((-0.142266141333+0.00175482346118j))*x[1]**o + ((0.0619240038354+0.733442942041j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.659077473874-0.181464419173j)*(1+2.*(dim-1)/(o+1.)) + ((0.480185210563+0.655578169516j))*dim
            arg[(1, 2, 1, 3)]=(-0.930090030346+0.425382442481j)*x[0]**o + ((0.355100502622+0.305397861411j))*x[0] + ((0.648873092275-0.201467230916j))*x[1]**o + ((-0.653283576458-0.527220082039j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.281216938071+0.223915211565j)*(1+2.*(dim-1)/(o+1.)) + ((-0.298183073836-0.221822220628j))*dim
            arg[(1, 2, 2, 0)]=(-0.280564195064-0.720748675196j)*x[0]**o + ((0.769207636214+0.614309214042j))*x[0] + ((-0.564610801653-0.666091411232j))*x[1]**o + ((-0.882758183998-0.651426994947j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.845174996717-1.38684008643j)*(1+2.*(dim-1)/(o+1.)) + ((-0.113550547785-0.0371177809047j))*dim
            arg[(1, 2, 2, 1)]=(-0.184403668498+0.266613883146j)*x[0]**o + ((0.217534040091+0.693398321061j))*x[0] + ((0.296474171838+0.175533947752j))*x[1]**o + ((-0.853975966913-0.29634446789j))*x[1]
            ref[(1, 2, 2, 1)]=(0.11207050334+0.442147830899j)*(1+2.*(dim-1)/(o+1.)) + ((-0.636441926822+0.39705385317j))*dim
            arg[(1, 2, 2, 2)]=(-0.0770877859526-0.46581589397j)*x[0]**o + ((0.242117177352-0.406951354911j))*x[0] + ((0.171074531843+0.631125173969j))*x[1]**o + ((-0.403753495695-0.555964503588j))*x[1]
            ref[(1, 2, 2, 2)]=(0.0939867458906+0.16530928j)*(1+2.*(dim-1)/(o+1.)) + ((-0.161636318343-0.962915858498j))*dim
            arg[(1, 2, 2, 3)]=(0.779857777871+0.07753123891j)*x[0]**o + ((0.564969409115+0.71702297354j))*x[0] + ((0.597271919855-0.687933258435j))*x[1]**o + ((0.884846385708-0.722988732808j))*x[1]
            ref[(1, 2, 2, 3)]=(1.37712969773-0.610402019525j)*(1+2.*(dim-1)/(o+1.)) + ((1.44981579482-0.00596575926859j))*dim
            arg[(1, 2, 3, 0)]=(0.356970535613+0.771483915475j)*x[0]**o + ((0.0517558697511+0.678813839037j))*x[0] + ((-0.244042403891-0.530164867463j))*x[1]**o + ((-0.484278184568+0.906565228164j))*x[1]
            ref[(1, 2, 3, 0)]=(0.112928131722+0.241319048012j)*(1+2.*(dim-1)/(o+1.)) + ((-0.432522314817+1.5853790672j))*dim
            arg[(1, 2, 3, 1)]=(-0.591111117208-0.455268340199j)*x[0]**o + ((0.632164075502-0.63091597616j))*x[0] + ((-0.624141667512+0.248397760241j))*x[1]**o + ((-0.343231918765-0.856241121338j))*x[1]
            ref[(1, 2, 3, 1)]=(-1.21525278472-0.206870579958j)*(1+2.*(dim-1)/(o+1.)) + ((0.288932156737-1.4871570975j))*dim
            arg[(1, 2, 3, 2)]=(0.822526348829-0.816998289327j)*x[0]**o + ((0.892181839954-0.489951363426j))*x[0] + ((0.98910411945+0.365612214656j))*x[1]**o + ((0.165415483426-0.901523291448j))*x[1]
            ref[(1, 2, 3, 2)]=(1.81163046828-0.451386074672j)*(1+2.*(dim-1)/(o+1.)) + ((1.05759732338-1.39147465487j))*dim
            arg[(1, 2, 3, 3)]=(-0.0398593324832-0.213029593634j)*x[0]**o + ((-0.268005814459+0.491811525158j))*x[0] + ((0.737593431093+0.606437852894j))*x[1]**o + ((0.184262566504-0.381493795429j))*x[1]
            ref[(1, 2, 3, 3)]=(0.69773409861+0.39340825926j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0837432479551+0.11031772973j))*dim
            arg[(1, 3, 0, 0)]=(0.337145691592-0.904127714369j)*x[0]**o + ((-0.825193263391-0.347052298087j))*x[0] + ((0.753028145397+0.142313514078j))*x[1]**o + ((-0.376181194706+0.776073294132j))*x[1]
            ref[(1, 3, 0, 0)]=(1.09017383699-0.761814200291j)*(1+2.*(dim-1)/(o+1.)) + ((-1.2013744581+0.429020996045j))*dim
            arg[(1, 3, 0, 1)]=(0.130015606266-0.591609005065j)*x[0]**o + ((0.756505135112-0.79604359527j))*x[0] + ((-0.0199685153077-0.177572763297j))*x[1]**o + ((-0.525439459723-0.906526541673j))*x[1]
            ref[(1, 3, 0, 1)]=(0.110047090959-0.769181768361j)*(1+2.*(dim-1)/(o+1.)) + ((0.231065675389-1.70257013694j))*dim
            arg[(1, 3, 0, 2)]=(-0.971047593382+0.875430479777j)*x[0]**o + ((-0.472703925933+0.142935198254j))*x[0] + ((0.611846995098+0.67867910464j))*x[1]**o + ((-0.257748676294-0.0316086513899j))*x[1]
            ref[(1, 3, 0, 2)]=(-0.359200598284+1.55410958442j)*(1+2.*(dim-1)/(o+1.)) + ((-0.730452602228+0.111326546864j))*dim
            arg[(1, 3, 0, 3)]=(0.223918280821-0.833085032868j)*x[0]**o + ((-0.691303439198-0.559179769866j))*x[0] + ((0.648866786196-0.810096257393j))*x[1]**o + ((0.539002294439-0.0924462153503j))*x[1]
            ref[(1, 3, 0, 3)]=(0.872785067017-1.64318129026j)*(1+2.*(dim-1)/(o+1.)) + ((-0.152301144759-0.651625985216j))*dim
            arg[(1, 3, 1, 0)]=(-0.84003367585+0.822633652076j)*x[0]**o + ((-0.799803322817+0.342809411776j))*x[0] + ((-0.268187308421+0.235019754143j))*x[1]**o + ((0.948061293095+0.173766256451j))*x[1]
            ref[(1, 3, 1, 0)]=(-1.10822098427+1.05765340622j)*(1+2.*(dim-1)/(o+1.)) + ((0.148257970278+0.516575668228j))*dim
            arg[(1, 3, 1, 1)]=(0.0415803131045+0.407438672016j)*x[0]**o + ((-0.27267512662+0.329979487338j))*x[0] + ((0.823182721982-0.231401373251j))*x[1]**o + ((-0.0802113473847-0.0596304472051j))*x[1]
            ref[(1, 3, 1, 1)]=(0.864763035087+0.176037298765j)*(1+2.*(dim-1)/(o+1.)) + ((-0.352886474005+0.270349040133j))*dim
            arg[(1, 3, 1, 2)]=(0.598799985509+0.870755100143j)*x[0]**o + ((0.0210706497728+0.914814697525j))*x[0] + ((-0.188120622065+0.650679037953j))*x[1]**o + ((0.289667740494-0.568952513217j))*x[1]
            ref[(1, 3, 1, 2)]=(0.410679363445+1.5214341381j)*(1+2.*(dim-1)/(o+1.)) + ((0.310738390267+0.345862184308j))*dim
            arg[(1, 3, 1, 3)]=(-0.355453579934-0.630954203407j)*x[0]**o + ((0.670529671764+0.163226092416j))*x[0] + ((-0.199964598669+0.258569869251j))*x[1]**o + ((-0.209392784123+0.533597976518j))*x[1]
            ref[(1, 3, 1, 3)]=(-0.555418178603-0.372384334157j)*(1+2.*(dim-1)/(o+1.)) + ((0.461136887641+0.696824068934j))*dim
            arg[(1, 3, 2, 0)]=(-0.812070406004+0.894219574645j)*x[0]**o + ((-0.617022764953+0.987242361891j))*x[0] + ((0.180640976245+0.479959590246j))*x[1]**o + ((0.16508152042+0.437898150384j))*x[1]
            ref[(1, 3, 2, 0)]=(-0.631429429758+1.37417916489j)*(1+2.*(dim-1)/(o+1.)) + ((-0.451941244534+1.42514051228j))*dim
            arg[(1, 3, 2, 1)]=(0.527581205407-0.207803049657j)*x[0]**o + ((0.032086687824+0.833614522753j))*x[0] + ((0.62778802909+0.0235855119096j))*x[1]**o + ((-0.71995560783+0.827496356046j))*x[1]
            ref[(1, 3, 2, 1)]=(1.1553692345-0.184217537747j)*(1+2.*(dim-1)/(o+1.)) + ((-0.687868920006+1.6611108788j))*dim
            arg[(1, 3, 2, 2)]=(0.600852727857-0.709573766535j)*x[0]**o + ((0.0604546667292+0.614874353993j))*x[0] + ((0.809010705378+0.604632402653j))*x[1]**o + ((0.455039508583-0.666381146261j))*x[1]
            ref[(1, 3, 2, 2)]=(1.40986343323-0.104941363882j)*(1+2.*(dim-1)/(o+1.)) + ((0.515494175312-0.0515067922683j))*dim
            arg[(1, 3, 2, 3)]=(0.813598566138+0.0848834808154j)*x[0]**o + ((0.760077215848-0.323766217702j))*x[0] + ((-0.80885514684+0.969333102678j))*x[1]**o + ((-0.932886463974+0.771475061402j))*x[1]
            ref[(1, 3, 2, 3)]=(0.00474341929855+1.05421658349j)*(1+2.*(dim-1)/(o+1.)) + ((-0.172809248126+0.4477088437j))*dim
            arg[(1, 3, 3, 0)]=(-0.384495683942+0.784245244684j)*x[0]**o + ((0.375952822034+0.84328450328j))*x[0] + ((0.937071003494-0.155334908465j))*x[1]**o + ((-0.458553234434+0.261834312204j))*x[1]
            ref[(1, 3, 3, 0)]=(0.552575319552+0.62891033622j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0826004124001+1.10511881548j))*dim
            arg[(1, 3, 3, 1)]=(0.470499367235-0.769234476596j)*x[0]**o + ((-0.928404484282-0.22995490462j))*x[0] + ((0.0926830557785-0.868929475496j))*x[1]**o + ((-0.728287681513+0.104071507842j))*x[1]
            ref[(1, 3, 3, 1)]=(0.563182423014-1.63816395209j)*(1+2.*(dim-1)/(o+1.)) + ((-1.6566921658-0.125883396778j))*dim
            arg[(1, 3, 3, 2)]=(-0.110413466556-0.969355080621j)*x[0]**o + ((0.810146408019-0.542373810599j))*x[0] + ((-0.0056213260913-0.337284327679j))*x[1]**o + ((-0.223197524066+0.379516456447j))*x[1]
            ref[(1, 3, 3, 2)]=(-0.116034792648-1.3066394083j)*(1+2.*(dim-1)/(o+1.)) + ((0.586948883952-0.162857354152j))*dim
            arg[(1, 3, 3, 3)]=(-0.568989984555+0.148106586943j)*x[0]**o + ((-0.319523637378+0.328894999459j))*x[0] + ((-0.219837711537+0.520949510073j))*x[1]**o + ((-0.232301924813-0.364132192728j))*x[1]
            ref[(1, 3, 3, 3)]=(-0.788827696092+0.669056097015j)*(1+2.*(dim-1)/(o+1.)) + ((-0.551825562192-0.0352371932696j))*dim
            arg[(2, 0, 0, 0)]=(0.917410773758+0.704366107226j)*x[0]**o + ((-0.618035459015-0.449732541697j))*x[0] + ((-0.722550410231-0.668106090816j))*x[1]**o + ((0.816014017801-0.828087132706j))*x[1]
            ref[(2, 0, 0, 0)]=(0.194860363527+0.0362600164098j)*(1+2.*(dim-1)/(o+1.)) + ((0.197978558786-1.2778196744j))*dim
            arg[(2, 0, 0, 1)]=(0.40071836887+0.775527785087j)*x[0]**o + ((-0.0491775623603-0.00746349778328j))*x[0] + ((0.491227303208-0.217845798778j))*x[1]**o + ((0.835486765991+0.701189899082j))*x[1]
            ref[(2, 0, 0, 1)]=(0.891945672078+0.557681986309j)*(1+2.*(dim-1)/(o+1.)) + ((0.786309203631+0.693726401299j))*dim
            arg[(2, 0, 0, 2)]=(0.215854272273+0.534417376156j)*x[0]**o + ((0.0070052638485+0.318519566962j))*x[0] + ((-0.347451651688-0.254212590365j))*x[1]**o + ((-0.430722954023-0.595536723135j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.131597379416+0.280204785791j)*(1+2.*(dim-1)/(o+1.)) + ((-0.423717690174-0.277017156172j))*dim
            arg[(2, 0, 0, 3)]=(-0.0231728562551-0.602969340071j)*x[0]**o + ((-0.337237393928+0.814394520419j))*x[0] + ((0.27701475465-0.222039719547j))*x[1]**o + ((0.31870255765-0.640662703043j))*x[1]
            ref[(2, 0, 0, 3)]=(0.253841898395-0.825009059617j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0185348362772+0.173731817376j))*dim
            arg[(2, 0, 1, 0)]=(0.262307060543+0.745238250173j)*x[0]**o + ((-0.136483102111-0.25376650348j))*x[0] + ((0.989879653563+0.910713211203j))*x[1]**o + ((0.152328120487+0.855105346086j))*x[1]
            ref[(2, 0, 1, 0)]=(1.25218671411+1.65595146138j)*(1+2.*(dim-1)/(o+1.)) + ((0.015845018376+0.601338842606j))*dim
            arg[(2, 0, 1, 1)]=(-0.374135903367+0.873743266943j)*x[0]**o + ((-0.297126554432+0.276257891964j))*x[0] + ((-0.788614999591+0.078381097751j))*x[1]**o + ((0.0689130183812-0.319298896237j))*x[1]
            ref[(2, 0, 1, 1)]=(-1.16275090296+0.952124364694j)*(1+2.*(dim-1)/(o+1.)) + ((-0.228213536051-0.0430410042734j))*dim
            arg[(2, 0, 1, 2)]=(0.275867312012-0.141332796038j)*x[0]**o + ((-0.262491301306+0.823572598937j))*x[0] + ((0.327733929244+0.0507938395175j))*x[1]**o + ((0.0847156082444-0.866935350759j))*x[1]
            ref[(2, 0, 1, 2)]=(0.603601241256-0.0905389565204j)*(1+2.*(dim-1)/(o+1.)) + ((-0.177775693062-0.0433627518215j))*dim
            arg[(2, 0, 1, 3)]=(0.598200897457-0.968365227037j)*x[0]**o + ((-0.612360969774-0.274259921243j))*x[0] + ((-0.198274020134-0.793378161992j))*x[1]**o + ((-0.783474545029-0.529064681882j))*x[1]
            ref[(2, 0, 1, 3)]=(0.399926877323-1.76174338903j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3958355148-0.803324603125j))*dim
            arg[(2, 0, 2, 0)]=(-0.273237985611+0.624978964119j)*x[0]**o + ((-0.489887405504-0.780440463383j))*x[0] + ((-0.621262119741-0.302097364065j))*x[1]**o + ((-0.72352585951+0.507727114663j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.894500105352+0.322881600054j)*(1+2.*(dim-1)/(o+1.)) + ((-1.21341326501-0.27271334872j))*dim
            arg[(2, 0, 2, 1)]=(-0.160789904233-0.79078491479j)*x[0]**o + ((0.786485873626+0.729857522428j))*x[0] + ((0.709449823063-0.0472146799016j))*x[1]**o + ((-0.960179045107-0.274974849457j))*x[1]
            ref[(2, 0, 2, 1)]=(0.548659918829-0.837999594692j)*(1+2.*(dim-1)/(o+1.)) + ((-0.173693171482+0.454882672971j))*dim
            arg[(2, 0, 2, 2)]=(0.13849346303+0.314521517458j)*x[0]**o + ((0.810749258969-0.799492492024j))*x[0] + ((-0.0469665298747+0.771938250666j))*x[1]**o + ((-0.584697478981+0.680127172585j))*x[1]
            ref[(2, 0, 2, 2)]=(0.0915269331549+1.08645976812j)*(1+2.*(dim-1)/(o+1.)) + ((0.226051779988-0.119365319439j))*dim
            arg[(2, 0, 2, 3)]=(0.172781340407-0.398513149883j)*x[0]**o + ((-0.482735729614+0.480079688128j))*x[0] + ((0.00325263258176-0.625765306307j))*x[1]**o + ((-0.387372813446+0.677518144271j))*x[1]
            ref[(2, 0, 2, 3)]=(0.176033972988-1.02427845619j)*(1+2.*(dim-1)/(o+1.)) + ((-0.87010854306+1.1575978324j))*dim
            arg[(2, 0, 3, 0)]=(0.435692731102+0.375515677042j)*x[0]**o + ((0.572668064446+0.521557485235j))*x[0] + ((0.240985930718+0.113518406026j))*x[1]**o + ((0.507847491401+0.0483033062659j))*x[1]
            ref[(2, 0, 3, 0)]=(0.676678661819+0.489034083068j)*(1+2.*(dim-1)/(o+1.)) + ((1.08051555585+0.569860791501j))*dim
            arg[(2, 0, 3, 1)]=(-0.614817047451-0.715671034583j)*x[0]**o + ((-0.463212683576+0.869902145971j))*x[0] + ((0.308598755992-0.228922535617j))*x[1]**o + ((0.523554605479+0.00911361814495j))*x[1]
            ref[(2, 0, 3, 1)]=(-0.306218291459-0.9445935702j)*(1+2.*(dim-1)/(o+1.)) + ((0.0603419219031+0.879015764116j))*dim
            arg[(2, 0, 3, 2)]=(-0.273172515184+0.790126138677j)*x[0]**o + ((0.463039933828-0.642062285721j))*x[0] + ((-0.657630028197-0.720296154923j))*x[1]**o + ((-0.272035806922-0.122386420605j))*x[1]
            ref[(2, 0, 3, 2)]=(-0.930802543381+0.0698299837543j)*(1+2.*(dim-1)/(o+1.)) + ((0.191004126906-0.764448706326j))*dim
            arg[(2, 0, 3, 3)]=(-0.0122835693237-0.490491099754j)*x[0]**o + ((0.775263731792+0.349731119387j))*x[0] + ((-0.592205018313+0.200136477061j))*x[1]**o + ((-0.847322928102+0.93920873235j))*x[1]
            ref[(2, 0, 3, 3)]=(-0.604488587637-0.290354622693j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0720591963103+1.28893985174j))*dim
            arg[(2, 1, 0, 0)]=(0.368591165518-0.447257290095j)*x[0]**o + ((-0.636121590539+0.502497911124j))*x[0] + ((-0.555237271037+0.085412836072j))*x[1]**o + ((0.874822984682-0.620888658203j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.186646105519-0.361844454023j)*(1+2.*(dim-1)/(o+1.)) + ((0.238701394143-0.11839074708j))*dim
            arg[(2, 1, 0, 1)]=(0.305396030914-0.520861520118j)*x[0]**o + ((-0.706285501934+0.753595570265j))*x[0] + ((0.359600594343+0.78920388812j))*x[1]**o + ((-0.324188581314+0.248627266198j))*x[1]
            ref[(2, 1, 0, 1)]=(0.664996625258+0.268342368002j)*(1+2.*(dim-1)/(o+1.)) + ((-1.03047408325+1.00222283646j))*dim
            arg[(2, 1, 0, 2)]=(-0.619372302627-0.432106522586j)*x[0]**o + ((0.579237185685+0.528332671801j))*x[0] + ((-0.583079553786+0.902672239258j))*x[1]**o + ((-0.0242920659971-0.841196834002j))*x[1]
            ref[(2, 1, 0, 2)]=(-1.20245185641+0.470565716672j)*(1+2.*(dim-1)/(o+1.)) + ((0.554945119688-0.312864162201j))*dim
            arg[(2, 1, 0, 3)]=(0.0240158274792+0.488945901844j)*x[0]**o + ((-0.613761065261+0.528182254025j))*x[0] + ((-0.176460985542-0.187194792876j))*x[1]**o + ((-0.878413774405+0.275893757941j))*x[1]
            ref[(2, 1, 0, 3)]=(-0.152445158063+0.301751108968j)*(1+2.*(dim-1)/(o+1.)) + ((-1.49217483967+0.804076011966j))*dim
            arg[(2, 1, 1, 0)]=(-0.70183708926-0.432284695243j)*x[0]**o + ((0.543599705142+0.0730316818639j))*x[0] + ((-0.704477910506+0.0323596073567j))*x[1]**o + ((0.0590890962935+0.0601286188491j))*x[1]
            ref[(2, 1, 1, 0)]=(-1.40631499977-0.399925087887j)*(1+2.*(dim-1)/(o+1.)) + ((0.602688801436+0.133160300713j))*dim
            arg[(2, 1, 1, 1)]=(-0.383963458073+0.974638486389j)*x[0]**o + ((0.871603480346+0.857150350173j))*x[0] + ((-0.0596061690958+0.970383732476j))*x[1]**o + ((-0.496913804839+0.84576000567j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.443569627169+1.94502221887j)*(1+2.*(dim-1)/(o+1.)) + ((0.374689675507+1.70291035584j))*dim
            arg[(2, 1, 1, 2)]=(0.479306478596-0.0513375297769j)*x[0]**o + ((-0.555708690965-0.814286360801j))*x[0] + ((-0.119132189494+0.148918716324j))*x[1]**o + ((-0.763535008537+0.0475832368631j))*x[1]
            ref[(2, 1, 1, 2)]=(0.360174289102+0.0975811865467j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3192436995-0.766703123938j))*dim
            arg[(2, 1, 1, 3)]=(0.944110012509-0.324643860067j)*x[0]**o + ((-0.0984001490264-0.773924439978j))*x[0] + ((0.603782734603-0.449204718223j))*x[1]**o + ((-0.183413214422-0.752225213951j))*x[1]
            ref[(2, 1, 1, 3)]=(1.54789274711-0.77384857829j)*(1+2.*(dim-1)/(o+1.)) + ((-0.281813363449-1.52614965393j))*dim
            arg[(2, 1, 2, 0)]=(-0.577167473978-0.101749314591j)*x[0]**o + ((-0.782683129583+0.705194259873j))*x[0] + ((-0.362995536378+0.830908530402j))*x[1]**o + ((-0.877552245279+0.387973212896j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.940163010356+0.72915921581j)*(1+2.*(dim-1)/(o+1.)) + ((-1.66023537486+1.09316747277j))*dim
            arg[(2, 1, 2, 1)]=(0.3417484048+0.165861798319j)*x[0]**o + ((0.408357488516+0.147426517842j))*x[0] + ((0.683008946565+0.211619519137j))*x[1]**o + ((-0.286110970853-0.0953132449601j))*x[1]
            ref[(2, 1, 2, 1)]=(1.02475735137+0.377481317456j)*(1+2.*(dim-1)/(o+1.)) + ((0.122246517662+0.0521132728818j))*dim
            arg[(2, 1, 2, 2)]=(0.240115970638+0.854793164674j)*x[0]**o + ((-0.00546879968863+0.186826768136j))*x[0] + ((0.951762542785-0.0235403905471j))*x[1]**o + ((0.879495244216+0.281530150197j))*x[1]
            ref[(2, 1, 2, 2)]=(1.19187851342+0.831252774127j)*(1+2.*(dim-1)/(o+1.)) + ((0.874026444527+0.468356918333j))*dim
            arg[(2, 1, 2, 3)]=(-0.408100556489+0.35525442471j)*x[0]**o + ((0.565136302164+0.428813647512j))*x[0] + ((0.597419078962-0.691316547234j))*x[1]**o + ((-0.964327761037-0.409523273413j))*x[1]
            ref[(2, 1, 2, 3)]=(0.189318522473-0.336062122525j)*(1+2.*(dim-1)/(o+1.)) + ((-0.399191458873+0.0192903740999j))*dim
            arg[(2, 1, 3, 0)]=(-0.822180156068-0.903383580158j)*x[0]**o + ((0.755482430519+0.0549628776326j))*x[0] + ((0.389303381219+0.904720645427j))*x[1]**o + ((-0.750332951662+0.636047628096j))*x[1]
            ref[(2, 1, 3, 0)]=(-0.432876774849+0.00133706526835j)*(1+2.*(dim-1)/(o+1.)) + ((0.00514947885649+0.691010505729j))*dim
            arg[(2, 1, 3, 1)]=(-0.738029873349+0.951733207971j)*x[0]**o + ((0.0555200551394+0.875278324657j))*x[0] + ((0.858998141618-0.850147119922j))*x[1]**o + ((0.93285239928-0.0363405144931j))*x[1]
            ref[(2, 1, 3, 1)]=(0.120968268268+0.101586088049j)*(1+2.*(dim-1)/(o+1.)) + ((0.98837245442+0.838937810164j))*dim
            arg[(2, 1, 3, 2)]=(-0.411232573925+0.637513015208j)*x[0]**o + ((0.207798332144-0.0300073375286j))*x[0] + ((0.865812416187+0.613623472256j))*x[1]**o + ((0.738924611268+0.382357920221j))*x[1]
            ref[(2, 1, 3, 2)]=(0.454579842263+1.25113648746j)*(1+2.*(dim-1)/(o+1.)) + ((0.946722943412+0.352350582692j))*dim
            arg[(2, 1, 3, 3)]=(0.396097891234-0.699929720375j)*x[0]**o + ((0.525421944585-0.878091892538j))*x[0] + ((-0.665964346686-0.454271396316j))*x[1]**o + ((-0.0835724630357+0.848387800795j))*x[1]
            ref[(2, 1, 3, 3)]=(-0.269866455452-1.15420111669j)*(1+2.*(dim-1)/(o+1.)) + ((0.44184948155-0.0297040917421j))*dim
            arg[(2, 2, 0, 0)]=(0.379971572556+0.562311245627j)*x[0]**o + ((0.789631892936-0.352864009839j))*x[0] + ((0.955459189224-0.915233084819j))*x[1]**o + ((-0.727498316727+0.114097873236j))*x[1]
            ref[(2, 2, 0, 0)]=(1.33543076178-0.352921839192j)*(1+2.*(dim-1)/(o+1.)) + ((0.0621335762084-0.238766136603j))*dim
            arg[(2, 2, 0, 1)]=(0.655856905798+0.0102621840299j)*x[0]**o + ((-0.961964444534+0.374636299346j))*x[0] + ((0.120738582179-0.32343688382j))*x[1]**o + ((0.970044928516+0.116470895635j))*x[1]
            ref[(2, 2, 0, 1)]=(0.776595487976-0.31317469979j)*(1+2.*(dim-1)/(o+1.)) + ((0.00808048398195+0.49110719498j))*dim
            arg[(2, 2, 0, 2)]=(-0.657223534341-0.400139349708j)*x[0]**o + ((0.376450333887-0.137136707011j))*x[0] + ((0.978339611891+0.268059074327j))*x[1]**o + ((0.562113785814-0.453090419635j))*x[1]
            ref[(2, 2, 0, 2)]=(0.32111607755-0.132080275381j)*(1+2.*(dim-1)/(o+1.)) + ((0.938564119701-0.590227126646j))*dim
            arg[(2, 2, 0, 3)]=(-0.508268233046+0.902085255116j)*x[0]**o + ((0.330437002727+0.0896246992339j))*x[0] + ((-0.247778431817+0.0895321517177j))*x[1]**o + ((-0.418994923266+0.559802848402j))*x[1]
            ref[(2, 2, 0, 3)]=(-0.756046664863+0.991617406834j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0885579205386+0.649427547636j))*dim
            arg[(2, 2, 1, 0)]=(-0.521944026733+0.84520650134j)*x[0]**o + ((0.136939611033+0.214114583662j))*x[0] + ((-0.460213978057+0.894513953637j))*x[1]**o + ((-0.866722502398-0.790730993355j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.98215800479+1.73972045498j)*(1+2.*(dim-1)/(o+1.)) + ((-0.729782891365-0.576616409693j))*dim
            arg[(2, 2, 1, 1)]=(-0.732695955884+0.701708384564j)*x[0]**o + ((0.0532225060816-0.742702784503j))*x[0] + ((-0.291542618489-0.0591428271572j))*x[1]**o + ((0.790280161984-0.00113189770538j))*x[1]
            ref[(2, 2, 1, 1)]=(-1.02423857437+0.642565557407j)*(1+2.*(dim-1)/(o+1.)) + ((0.843502668065-0.743834682209j))*dim
            arg[(2, 2, 1, 2)]=(-0.860414213403+0.626528436687j)*x[0]**o + ((-0.679021430646-0.622142053762j))*x[0] + ((-0.333488343649+0.00224179820687j))*x[1]**o + ((0.141539575925-0.17990444071j))*x[1]
            ref[(2, 2, 1, 2)]=(-1.19390255705+0.628770234894j)*(1+2.*(dim-1)/(o+1.)) + ((-0.53748185472-0.802046494473j))*dim
            arg[(2, 2, 1, 3)]=(-0.823758409785-0.520944331719j)*x[0]**o + ((0.682272704633+0.306856634038j))*x[0] + ((-0.909389139712-0.747338514312j))*x[1]**o + ((-0.299530496427+0.431963933636j))*x[1]
            ref[(2, 2, 1, 3)]=(-1.7331475495-1.26828284603j)*(1+2.*(dim-1)/(o+1.)) + ((0.382742208206+0.738820567673j))*dim
            arg[(2, 2, 2, 0)]=(-0.954604796344+0.374659862467j)*x[0]**o + ((0.993920161954+0.418900532833j))*x[0] + ((0.280992773767-0.166200469149j))*x[1]**o + ((0.340403886929+0.926867437249j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.673612022578+0.208459393318j)*(1+2.*(dim-1)/(o+1.)) + ((1.33432404888+1.34576797008j))*dim
            arg[(2, 2, 2, 1)]=(0.957993212005+0.00822225807323j)*x[0]**o + ((0.44837071113+0.556721910725j))*x[0] + ((-0.202239812811-0.700575828994j))*x[1]**o + ((0.975745550179-0.144189821812j))*x[1]
            ref[(2, 2, 2, 1)]=(0.755753399194-0.692353570921j)*(1+2.*(dim-1)/(o+1.)) + ((1.42411626131+0.412532088912j))*dim
            arg[(2, 2, 2, 2)]=(0.675629695849-0.601012172277j)*x[0]**o + ((0.566150915305+0.282512672303j))*x[0] + ((-0.656207425281-0.560354233761j))*x[1]**o + ((0.255773428575+0.935141787308j))*x[1]
            ref[(2, 2, 2, 2)]=(0.0194222705684-1.16136640604j)*(1+2.*(dim-1)/(o+1.)) + ((0.82192434388+1.21765445961j))*dim
            arg[(2, 2, 2, 3)]=(0.88711701419+0.336115531052j)*x[0]**o + ((-0.982228359275-0.883716599452j))*x[0] + ((0.86107136599-0.459213519244j))*x[1]**o + ((-0.849822403807+0.986032137478j))*x[1]
            ref[(2, 2, 2, 3)]=(1.74818838018-0.123097988191j)*(1+2.*(dim-1)/(o+1.)) + ((-1.83205076308+0.102315538026j))*dim
            arg[(2, 2, 3, 0)]=(0.103596456264-0.511486914946j)*x[0]**o + ((0.838712133023-0.111234903136j))*x[0] + ((-0.669119794789-0.821959166911j))*x[1]**o + ((0.963333633167-0.0914819896107j))*x[1]
            ref[(2, 2, 3, 0)]=(-0.565523338525-1.33344608186j)*(1+2.*(dim-1)/(o+1.)) + ((1.80204576619-0.202716892746j))*dim
            arg[(2, 2, 3, 1)]=(0.192212861122+0.600425036395j)*x[0]**o + ((0.900188895366+0.0155265092139j))*x[0] + ((0.697700845433+0.00900823283462j))*x[1]**o + ((-0.533284418852-0.282189252916j))*x[1]
            ref[(2, 2, 3, 1)]=(0.889913706555+0.609433269229j)*(1+2.*(dim-1)/(o+1.)) + ((0.366904476514-0.266662743702j))*dim
            arg[(2, 2, 3, 2)]=(0.13591776806+0.830426250852j)*x[0]**o + ((-0.122840925686+0.267047038404j))*x[0] + ((-0.32511596617+0.28333100743j))*x[1]**o + ((0.602950977547-0.0519001906216j))*x[1]
            ref[(2, 2, 3, 2)]=(-0.18919819811+1.11375725828j)*(1+2.*(dim-1)/(o+1.)) + ((0.480110051861+0.215146847782j))*dim
            arg[(2, 2, 3, 3)]=(-0.327642771157-0.291783514349j)*x[0]**o + ((-0.329470805061+0.424980943877j))*x[0] + ((-0.863419409505-0.325145405423j))*x[1]**o + ((0.414778662008-0.0846408591451j))*x[1]
            ref[(2, 2, 3, 3)]=(-1.19106218066-0.616928919772j)*(1+2.*(dim-1)/(o+1.)) + ((0.0853078569473+0.340340084732j))*dim
            arg[(2, 3, 0, 0)]=(-0.0937391790766-0.244062054589j)*x[0]**o + ((-0.905944766164+0.158463832671j))*x[0] + ((0.229850600722-0.289288676541j))*x[1]**o + ((0.802415352687-0.221037146831j))*x[1]
            ref[(2, 3, 0, 0)]=(0.136111421645-0.53335073113j)*(1+2.*(dim-1)/(o+1.)) + ((-0.103529413476-0.0625733141607j))*dim
            arg[(2, 3, 0, 1)]=(-0.454647514425+0.38587238766j)*x[0]**o + ((-0.902394639628+0.640170528565j))*x[0] + ((0.386859174124-0.597431385749j))*x[1]**o + ((-0.838182100046+0.186568273784j))*x[1]
            ref[(2, 3, 0, 1)]=(-0.0677883403014-0.21155899809j)*(1+2.*(dim-1)/(o+1.)) + ((-1.74057673967+0.826738802348j))*dim
            arg[(2, 3, 0, 2)]=(-0.575788107124+0.976972808924j)*x[0]**o + ((-0.848794745745+0.611443182922j))*x[0] + ((-0.5881747123-0.747143420246j))*x[1]**o + ((0.891013667272+0.686716041941j))*x[1]
            ref[(2, 3, 0, 2)]=(-1.16396281942+0.229829388678j)*(1+2.*(dim-1)/(o+1.)) + ((0.0422189215267+1.29815922486j))*dim
            arg[(2, 3, 0, 3)]=(0.0582951654955-0.087000770029j)*x[0]**o + ((-0.139488816138-0.397010132374j))*x[0] + ((-0.810648339162-0.220702253048j))*x[1]**o + ((0.643559510274-0.176052038217j))*x[1]
            ref[(2, 3, 0, 3)]=(-0.752353173667-0.307703023077j)*(1+2.*(dim-1)/(o+1.)) + ((0.504070694135-0.57306217059j))*dim
            arg[(2, 3, 1, 0)]=(0.336053661731+0.212706104245j)*x[0]**o + ((-0.812174944469+0.625298820863j))*x[0] + ((-0.598928473386+0.992802679688j))*x[1]**o + ((0.0795065179764-0.109010666273j))*x[1]
            ref[(2, 3, 1, 0)]=(-0.262874811655+1.20550878393j)*(1+2.*(dim-1)/(o+1.)) + ((-0.732668426492+0.51628815459j))*dim
            arg[(2, 3, 1, 1)]=(0.314828792739-0.729045381423j)*x[0]**o + ((0.83503235753-0.577948420665j))*x[0] + ((-0.346235628138+0.480929148932j))*x[1]**o + ((-0.185028594595+0.210678825246j))*x[1]
            ref[(2, 3, 1, 1)]=(-0.031406835399-0.248116232491j)*(1+2.*(dim-1)/(o+1.)) + ((0.650003762935-0.367269595418j))*dim
            arg[(2, 3, 1, 2)]=(0.749348637849-0.869867261165j)*x[0]**o + ((0.394791214972-0.050703019642j))*x[0] + ((0.353032876393-0.683381875221j))*x[1]**o + ((-0.264243632775-0.605891094252j))*x[1]
            ref[(2, 3, 1, 2)]=(1.10238151424-1.55324913639j)*(1+2.*(dim-1)/(o+1.)) + ((0.130547582197-0.656594113894j))*dim
            arg[(2, 3, 1, 3)]=(0.176723098007+0.808464861899j)*x[0]**o + ((-0.0538459819829+0.240763852865j))*x[0] + ((-0.993737574899+0.697771495487j))*x[1]**o + ((-0.863212816476+0.586152964882j))*x[1]
            ref[(2, 3, 1, 3)]=(-0.817014476892+1.50623635739j)*(1+2.*(dim-1)/(o+1.)) + ((-0.917058798459+0.826916817746j))*dim
            arg[(2, 3, 2, 0)]=(-0.533244907024+0.9156400441j)*x[0]**o + ((0.48713151665+0.261011800998j))*x[0] + ((-0.174923979164-0.220942710087j))*x[1]**o + ((-0.86427336198-0.671210787297j))*x[1]
            ref[(2, 3, 2, 0)]=(-0.708168886188+0.694697334014j)*(1+2.*(dim-1)/(o+1.)) + ((-0.37714184533-0.4101989863j))*dim
            arg[(2, 3, 2, 1)]=(-0.0768309290451+0.992843637347j)*x[0]**o + ((0.0121703289191-0.151383253731j))*x[0] + ((-0.993553281222-0.673171213484j))*x[1]**o + ((-0.0950201448505+0.81019470897j))*x[1]
            ref[(2, 3, 2, 1)]=(-1.07038421027+0.319672423863j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0828498159314+0.658811455239j))*dim
            arg[(2, 3, 2, 2)]=(0.211273014754-0.328859798528j)*x[0]**o + ((0.710452384289-0.647339195904j))*x[0] + ((-0.604178476187+0.765637643996j))*x[1]**o + ((0.374652169102-0.885451820984j))*x[1]
            ref[(2, 3, 2, 2)]=(-0.392905461434+0.436777845469j)*(1+2.*(dim-1)/(o+1.)) + ((1.08510455339-1.53279101689j))*dim
            arg[(2, 3, 2, 3)]=(0.105645487704-0.339667458739j)*x[0]**o + ((-0.906428033809-0.939354416533j))*x[0] + ((0.843490939275-0.352124522688j))*x[1]**o + ((0.316029085813+0.0186382727212j))*x[1]
            ref[(2, 3, 2, 3)]=(0.949136426979-0.691791981427j)*(1+2.*(dim-1)/(o+1.)) + ((-0.590398947996-0.920716143812j))*dim
            arg[(2, 3, 3, 0)]=(-0.560467816499+0.792834309459j)*x[0]**o + ((-0.170384175387-0.196384199904j))*x[0] + ((0.667354272692+0.566543341375j))*x[1]**o + ((0.343056434359-0.0522010587067j))*x[1]
            ref[(2, 3, 3, 0)]=(0.106886456194+1.35937765083j)*(1+2.*(dim-1)/(o+1.)) + ((0.172672258972-0.248585258611j))*dim
            arg[(2, 3, 3, 1)]=(0.416611876265-0.0551082889901j)*x[0]**o + ((0.843886018137-0.889604900641j))*x[0] + ((-0.627666859546+0.959405889658j))*x[1]**o + ((0.291031509291-0.646369513901j))*x[1]
            ref[(2, 3, 3, 1)]=(-0.211054983281+0.904297600667j)*(1+2.*(dim-1)/(o+1.)) + ((1.13491752743-1.53597441454j))*dim
            arg[(2, 3, 3, 2)]=(0.353892669536+0.945532084356j)*x[0]**o + ((-0.360523454368-0.945204386406j))*x[0] + ((0.201251511627-0.11187360048j))*x[1]**o + ((-0.547744316564-0.406521214386j))*x[1]
            ref[(2, 3, 3, 2)]=(0.555144181163+0.833658483875j)*(1+2.*(dim-1)/(o+1.)) + ((-0.908267770932-1.35172560079j))*dim
            arg[(2, 3, 3, 3)]=(-0.668588498348+0.883173093491j)*x[0]**o + ((0.906602409062+0.608613657522j))*x[0] + ((0.975503301412+0.469346498634j))*x[1]**o + ((0.912594727448+0.166346265169j))*x[1]
            ref[(2, 3, 3, 3)]=(0.306914803064+1.35251959212j)*(1+2.*(dim-1)/(o+1.)) + ((1.81919713651+0.77495992269j))*dim
            arg[(3, 0, 0, 0)]=(0.804550463869-0.523879573283j)*x[0]**o + ((-0.298949051867-0.837572164548j))*x[0] + ((0.27616137081+0.383948687237j))*x[1]**o + ((0.719377094402+0.159814147004j))*x[1]
            ref[(3, 0, 0, 0)]=(1.08071183468-0.139930886045j)*(1+2.*(dim-1)/(o+1.)) + ((0.420428042535-0.677758017543j))*dim
            arg[(3, 0, 0, 1)]=(0.566723560861-0.878505550886j)*x[0]**o + ((-0.924049851848+0.884680721437j))*x[0] + ((0.0509168976326+0.87452370905j))*x[1]**o + ((-0.889459489698+0.718870257784j))*x[1]
            ref[(3, 0, 0, 1)]=(0.617640458493-0.00398184183629j)*(1+2.*(dim-1)/(o+1.)) + ((-1.81350934155+1.60355097922j))*dim
            arg[(3, 0, 0, 2)]=(0.254361641819-0.94610989702j)*x[0]**o + ((-0.721940689647+0.50454855352j))*x[0] + ((-0.538921008728+0.836204130522j))*x[1]**o + ((0.362517070572-0.856853318635j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.284559366909-0.109905766498j)*(1+2.*(dim-1)/(o+1.)) + ((-0.359423619074-0.352304765114j))*dim
            arg[(3, 0, 0, 3)]=(0.981651968737+0.820458619364j)*x[0]**o + ((0.913809967478+0.603931434434j))*x[0] + ((-0.681191612597-0.983905623564j))*x[1]**o + ((-0.584308314666-0.950183068825j))*x[1]
            ref[(3, 0, 0, 3)]=(0.30046035614-0.1634470042j)*(1+2.*(dim-1)/(o+1.)) + ((0.329501652812-0.346251634391j))*dim
            arg[(3, 0, 1, 0)]=(-0.649726863462-0.32137474089j)*x[0]**o + ((-0.367305863836+0.137406424761j))*x[0] + ((-0.414331304612+0.967787510122j))*x[1]**o + ((-0.865146903341-0.717132630204j))*x[1]
            ref[(3, 0, 1, 0)]=(-1.06405816807+0.646412769232j)*(1+2.*(dim-1)/(o+1.)) + ((-1.23245276718-0.579726205442j))*dim
            arg[(3, 0, 1, 1)]=(0.0474075895511-0.179714468769j)*x[0]**o + ((-0.924863736158+0.68644567048j))*x[0] + ((0.831124781272+0.529778753382j))*x[1]**o + ((-0.515098794416+0.201473366431j))*x[1]
            ref[(3, 0, 1, 1)]=(0.878532370824+0.350064284613j)*(1+2.*(dim-1)/(o+1.)) + ((-1.43996253057+0.887919036911j))*dim
            arg[(3, 0, 1, 2)]=(-0.194224801694-0.326763219418j)*x[0]**o + ((0.240018258753+0.106547432337j))*x[0] + ((0.601293630421+0.719594540116j))*x[1]**o + ((0.849837295138+0.181369948338j))*x[1]
            ref[(3, 0, 1, 2)]=(0.407068828727+0.392831320699j)*(1+2.*(dim-1)/(o+1.)) + ((1.08985555389+0.287917380675j))*dim
            arg[(3, 0, 1, 3)]=(-0.906390602568+0.033973017781j)*x[0]**o + ((-0.825829818787+0.357263285647j))*x[0] + ((-0.085187909489-0.635350514627j))*x[1]**o + ((-0.288304895642-0.971214012692j))*x[1]
            ref[(3, 0, 1, 3)]=(-0.991578512057-0.601377496846j)*(1+2.*(dim-1)/(o+1.)) + ((-1.11413471443-0.613950727045j))*dim
            arg[(3, 0, 2, 0)]=(-0.837574847649+0.504512687487j)*x[0]**o + ((0.492119658869+0.66318675102j))*x[0] + ((-0.506381125517+0.95349223039j))*x[1]**o + ((0.530973187052-0.158778203363j))*x[1]
            ref[(3, 0, 2, 0)]=(-1.34395597317+1.45800491788j)*(1+2.*(dim-1)/(o+1.)) + ((1.02309284592+0.504408547657j))*dim
            arg[(3, 0, 2, 1)]=(-0.276844962433-0.101265353346j)*x[0]**o + ((0.555056656329+0.0452481850747j))*x[0] + ((-0.881604317141+0.317770038104j))*x[1]**o + ((-0.59372371349+0.73943043437j))*x[1]
            ref[(3, 0, 2, 1)]=(-1.15844927957+0.216504684758j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0386670571613+0.784678619445j))*dim
            arg[(3, 0, 2, 2)]=(-0.281188119861+0.0602704992462j)*x[0]**o + ((-0.17810804043-0.412917329008j))*x[0] + ((-0.109292317811+0.113093616126j))*x[1]**o + ((0.487762271449-0.947385571485j))*x[1]
            ref[(3, 0, 2, 2)]=(-0.390480437672+0.173364115372j)*(1+2.*(dim-1)/(o+1.)) + ((0.309654231019-1.36030290049j))*dim
            arg[(3, 0, 2, 3)]=(0.876084075332-0.525967789834j)*x[0]**o + ((0.609422808553-0.545951344209j))*x[0] + ((0.517144512071+0.0757242933657j))*x[1]**o + ((0.0315857802446+0.880904063278j))*x[1]
            ref[(3, 0, 2, 3)]=(1.3932285874-0.450243496468j)*(1+2.*(dim-1)/(o+1.)) + ((0.641008588797+0.334952719069j))*dim
            arg[(3, 0, 3, 0)]=(-0.940371743988-0.263865952373j)*x[0]**o + ((-0.0695823306058-0.305369074902j))*x[0] + ((-0.684013644906+0.706785971384j))*x[1]**o + ((-0.893262083166-0.675151992361j))*x[1]
            ref[(3, 0, 3, 0)]=(-1.62438538889+0.442920019011j)*(1+2.*(dim-1)/(o+1.)) + ((-0.962844413772-0.980521067263j))*dim
            arg[(3, 0, 3, 1)]=(-0.826757102775-0.607650480654j)*x[0]**o + ((0.932005719209-0.0654829417823j))*x[0] + ((0.328065931719-0.486553185222j))*x[1]**o + ((0.369203943344-0.118444085222j))*x[1]
            ref[(3, 0, 3, 1)]=(-0.498691171056-1.09420366588j)*(1+2.*(dim-1)/(o+1.)) + ((1.30120966255-0.183927027004j))*dim
            arg[(3, 0, 3, 2)]=(0.422990568101+0.183801052308j)*x[0]**o + ((0.150739212227+0.71417867865j))*x[0] + ((-0.824111921251-0.208824207766j))*x[1]**o + ((-0.167595631902+0.810644994849j))*x[1]
            ref[(3, 0, 3, 2)]=(-0.40112135315-0.0250231554582j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0168564196751+1.5248236735j))*dim
            arg[(3, 0, 3, 3)]=(-0.833892186657-0.727578632288j)*x[0]**o + ((0.0968280511683-0.936958761577j))*x[0] + ((0.483203986668-0.869760420969j))*x[1]**o + ((0.273127215132+0.87932846489j))*x[1]
            ref[(3, 0, 3, 3)]=(-0.350688199989-1.59733905326j)*(1+2.*(dim-1)/(o+1.)) + ((0.369955266301-0.0576302966869j))*dim
            arg[(3, 1, 0, 0)]=(-0.691079674868-0.514743608993j)*x[0]**o + ((-0.696366555398+0.435314341748j))*x[0] + ((0.884262266835-0.397341647648j))*x[1]**o + ((-0.37223271264+0.341607380299j))*x[1]
            ref[(3, 1, 0, 0)]=(0.193182591968-0.91208525664j)*(1+2.*(dim-1)/(o+1.)) + ((-1.06859926804+0.776921722047j))*dim
            arg[(3, 1, 0, 1)]=(0.518250709195-0.646395486742j)*x[0]**o + ((0.0872076085848+0.76771559182j))*x[0] + ((-0.231492607838-0.338600436031j))*x[1]**o + ((-0.205544125173+0.052419201812j))*x[1]
            ref[(3, 1, 0, 1)]=(0.286758101357-0.984995922773j)*(1+2.*(dim-1)/(o+1.)) + ((-0.118336516588+0.820134793632j))*dim
            arg[(3, 1, 0, 2)]=(0.397048611263-0.701529982479j)*x[0]**o + ((0.0846457906414+0.420086385958j))*x[0] + ((0.915909264028-0.304819911855j))*x[1]**o + ((-0.00926796063012+0.57401111235j))*x[1]
            ref[(3, 1, 0, 2)]=(1.31295787529-1.00634989433j)*(1+2.*(dim-1)/(o+1.)) + ((0.0753778300113+0.994097498309j))*dim
            arg[(3, 1, 0, 3)]=(0.273640244231+0.204242535194j)*x[0]**o + ((0.394822777002+0.379498299072j))*x[0] + ((-0.432510534113+0.0392442170439j))*x[1]**o + ((0.791057106861-0.42063542957j))*x[1]
            ref[(3, 1, 0, 3)]=(-0.158870289882+0.243486752238j)*(1+2.*(dim-1)/(o+1.)) + ((1.18587988386-0.0411371304981j))*dim
            arg[(3, 1, 1, 0)]=(-0.680485956135+0.602316078743j)*x[0]**o + ((0.917434065188-0.259499111635j))*x[0] + ((0.507697102645-0.500210066936j))*x[1]**o + ((-0.0875413405513+0.705819823313j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.17278885349+0.102106011807j)*(1+2.*(dim-1)/(o+1.)) + ((0.829892724636+0.446320711678j))*dim
            arg[(3, 1, 1, 1)]=(-0.208036459839+0.650742521335j)*x[0]**o + ((0.460714331778+0.0308291008469j))*x[0] + ((0.422025254764+0.314392447911j))*x[1]**o + ((-0.396023633704-0.867452293031j))*x[1]
            ref[(3, 1, 1, 1)]=(0.213988794926+0.965134969246j)*(1+2.*(dim-1)/(o+1.)) + ((0.0646906980745-0.836623192184j))*dim
            arg[(3, 1, 1, 2)]=(0.758970311271-0.552294139684j)*x[0]**o + ((0.587135846777+0.0414577898377j))*x[0] + ((-0.531264274912+0.567532667061j))*x[1]**o + ((0.014641245027+0.742435819065j))*x[1]
            ref[(3, 1, 1, 2)]=(0.227706036359+0.0152385273774j)*(1+2.*(dim-1)/(o+1.)) + ((0.601777091804+0.783893608902j))*dim
            arg[(3, 1, 1, 3)]=(0.87288253118-0.756702515611j)*x[0]**o + ((0.803353021208-0.843005290622j))*x[0] + ((-0.402270175703+0.922201908737j))*x[1]**o + ((0.619834356378+0.178941135683j))*x[1]
            ref[(3, 1, 1, 3)]=(0.470612355476+0.165499393125j)*(1+2.*(dim-1)/(o+1.)) + ((1.42318737759-0.664064154939j))*dim
            arg[(3, 1, 2, 0)]=(0.901984024651-0.80847404302j)*x[0]**o + ((-0.77373345108+0.807705990167j))*x[0] + ((-0.349517719189-0.732628366392j))*x[1]**o + ((-0.384730547538-0.142799286896j))*x[1]
            ref[(3, 1, 2, 0)]=(0.552466305461-1.54110240941j)*(1+2.*(dim-1)/(o+1.)) + ((-1.15846399862+0.66490670327j))*dim
            arg[(3, 1, 2, 1)]=(-0.835436131857+0.111661288013j)*x[0]**o + ((0.932497955658-0.547400595676j))*x[0] + ((0.483525728103-0.670860423128j))*x[1]**o + ((0.716869620218+0.619026862087j))*x[1]
            ref[(3, 1, 2, 1)]=(-0.351910403754-0.559199135114j)*(1+2.*(dim-1)/(o+1.)) + ((1.64936757588+0.0716262664108j))*dim
            arg[(3, 1, 2, 2)]=(-0.270643388761-0.447228247803j)*x[0]**o + ((-0.277304585212+0.87676102938j))*x[0] + ((0.100955420126+0.480594665419j))*x[1]**o + ((0.576838034206+0.739782775722j))*x[1]
            ref[(3, 1, 2, 2)]=(-0.169687968635+0.0333664176161j)*(1+2.*(dim-1)/(o+1.)) + ((0.299533448994+1.6165438051j))*dim
            arg[(3, 1, 2, 3)]=(0.835157417857+0.119559034087j)*x[0]**o + ((-0.927477614039+0.93468851165j))*x[0] + ((0.138341916919-0.301864132076j))*x[1]**o + ((0.120182998097+0.949201648672j))*x[1]
            ref[(3, 1, 2, 3)]=(0.973499334776-0.182305097988j)*(1+2.*(dim-1)/(o+1.)) + ((-0.807294615942+1.88389016032j))*dim
            arg[(3, 1, 3, 0)]=(-0.760481245925+0.876559414283j)*x[0]**o + ((-0.623175647263-0.751179978192j))*x[0] + ((0.557433655732+0.376322848744j))*x[1]**o + ((0.822683399989-0.379220298287j))*x[1]
            ref[(3, 1, 3, 0)]=(-0.203047590193+1.25288226303j)*(1+2.*(dim-1)/(o+1.)) + ((0.199507752726-1.13040027648j))*dim
            arg[(3, 1, 3, 1)]=(0.094551510221-0.219792079589j)*x[0]**o + ((-0.146527576092+0.560839261947j))*x[0] + ((-0.294826033396-0.514713585328j))*x[1]**o + ((-0.953987689621+0.354777282327j))*x[1]
            ref[(3, 1, 3, 1)]=(-0.200274523175-0.734505664917j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10051526571+0.915616544273j))*dim
            arg[(3, 1, 3, 2)]=(-0.518697450459+0.880119121793j)*x[0]**o + ((-0.0833522529475+0.968752237033j))*x[0] + ((0.649593237339+0.625129927414j))*x[1]**o + ((0.155712551007+0.138689541534j))*x[1]
            ref[(3, 1, 3, 2)]=(0.13089578688+1.50524904921j)*(1+2.*(dim-1)/(o+1.)) + ((0.0723602980591+1.10744177857j))*dim
            arg[(3, 1, 3, 3)]=(0.325771657216-0.021522398252j)*x[0]**o + ((0.313055713351-0.121990053056j))*x[0] + ((0.333913195668+0.846889296707j))*x[1]**o + ((0.0418205412579+0.289177226006j))*x[1]
            ref[(3, 1, 3, 3)]=(0.659684852884+0.825366898455j)*(1+2.*(dim-1)/(o+1.)) + ((0.354876254609+0.167187172949j))*dim
            arg[(3, 2, 0, 0)]=(-0.167074180432+0.845919044367j)*x[0]**o + ((-0.177734381758-0.609630570697j))*x[0] + ((0.238117845258+0.483971622417j))*x[1]**o + ((0.776992332155-0.0411828373633j))*x[1]
            ref[(3, 2, 0, 0)]=(0.0710436648261+1.32989066678j)*(1+2.*(dim-1)/(o+1.)) + ((0.599257950397-0.65081340806j))*dim
            arg[(3, 2, 0, 1)]=(0.178201634262-0.694340308504j)*x[0]**o + ((0.855950502289+0.557056101437j))*x[0] + ((-0.143248032332+0.634779613553j))*x[1]**o + ((0.614835537431-0.554820098215j))*x[1]
            ref[(3, 2, 0, 1)]=(0.0349536019298-0.0595606949505j)*(1+2.*(dim-1)/(o+1.)) + ((1.47078603972+0.00223600322149j))*dim
            arg[(3, 2, 0, 2)]=(-0.794247783229-0.138877529414j)*x[0]**o + ((0.917830133219+0.97782730116j))*x[0] + ((0.190388424448+0.248610578893j))*x[1]**o + ((0.35678155537+0.102080164129j))*x[1]
            ref[(3, 2, 0, 2)]=(-0.603859358781+0.109733049479j)*(1+2.*(dim-1)/(o+1.)) + ((1.27461168859+1.07990746529j))*dim
            arg[(3, 2, 0, 3)]=(-0.544673221297+0.412165769475j)*x[0]**o + ((-0.0904964896554-0.796728053876j))*x[0] + ((0.119957092669+0.721215049758j))*x[1]**o + ((-0.638516669585-0.875078047366j))*x[1]
            ref[(3, 2, 0, 3)]=(-0.424716128628+1.13338081923j)*(1+2.*(dim-1)/(o+1.)) + ((-0.729013159241-1.67180610124j))*dim
            arg[(3, 2, 1, 0)]=(0.841576129868-0.691422928101j)*x[0]**o + ((0.837737954248-0.947353523044j))*x[0] + ((-0.114728862143+0.0679950001779j))*x[1]**o + ((-0.70964892908-0.951878188884j))*x[1]
            ref[(3, 2, 1, 0)]=(0.726847267726-0.623427927923j)*(1+2.*(dim-1)/(o+1.)) + ((0.128089025168-1.89923171193j))*dim
            arg[(3, 2, 1, 1)]=(-0.218218180317+0.823235771694j)*x[0]**o + ((0.313647333813+0.416185639804j))*x[0] + ((-0.434725766457+0.0564567146777j))*x[1]**o + ((0.167279500396-0.550834287677j))*x[1]
            ref[(3, 2, 1, 1)]=(-0.652943946773+0.879692486372j)*(1+2.*(dim-1)/(o+1.)) + ((0.480926834209-0.134648647873j))*dim
            arg[(3, 2, 1, 2)]=(-0.457016645106+0.0137234908517j)*x[0]**o + ((-0.477794127073+0.159100434714j))*x[0] + ((-0.274451016135+0.728360688216j))*x[1]**o + ((-0.271613628018-0.352609934317j))*x[1]
            ref[(3, 2, 1, 2)]=(-0.731467661241+0.742084179068j)*(1+2.*(dim-1)/(o+1.)) + ((-0.749407755091-0.193509499604j))*dim
            arg[(3, 2, 1, 3)]=(-0.913238187157+0.450034611275j)*x[0]**o + ((0.139207847314-0.040404086624j))*x[0] + ((-0.704161074536+0.946303327239j))*x[1]**o + ((-0.415033516129-0.718773302929j))*x[1]
            ref[(3, 2, 1, 3)]=(-1.61739926169+1.39633793851j)*(1+2.*(dim-1)/(o+1.)) + ((-0.275825668814-0.759177389553j))*dim
            arg[(3, 2, 2, 0)]=(0.898054403361-0.782957742343j)*x[0]**o + ((-0.925219867865-0.659868482348j))*x[0] + ((0.568379292838-0.419192312962j))*x[1]**o + ((0.259104277784-0.579981948515j))*x[1]
            ref[(3, 2, 2, 0)]=(1.4664336962-1.20215005531j)*(1+2.*(dim-1)/(o+1.)) + ((-0.666115590081-1.23985043086j))*dim
            arg[(3, 2, 2, 1)]=(-0.00564058545897-0.522039471825j)*x[0]**o + ((0.438873173251+0.0394020140636j))*x[0] + ((0.479135916295-0.512934353218j))*x[1]**o + ((-0.347885805334+0.639785666889j))*x[1]
            ref[(3, 2, 2, 1)]=(0.473495330836-1.03497382504j)*(1+2.*(dim-1)/(o+1.)) + ((0.0909873679173+0.679187680953j))*dim
            arg[(3, 2, 2, 2)]=(-0.778951886099+0.934759994651j)*x[0]**o + ((0.0998276646525+0.260283381816j))*x[0] + ((0.517164685102+0.994862746428j))*x[1]**o + ((-0.551450067732-0.195325708304j))*x[1]
            ref[(3, 2, 2, 2)]=(-0.261787200998+1.92962274108j)*(1+2.*(dim-1)/(o+1.)) + ((-0.451622403079+0.0649576735117j))*dim
            arg[(3, 2, 2, 3)]=(0.147380170975-0.644106695928j)*x[0]**o + ((0.563602827548-0.530870256847j))*x[0] + ((-0.0439077078017+0.00520783457315j))*x[1]**o + ((0.152133900351-0.154671085463j))*x[1]
            ref[(3, 2, 2, 3)]=(0.103472463173-0.638898861355j)*(1+2.*(dim-1)/(o+1.)) + ((0.715736727899-0.685541342309j))*dim
            arg[(3, 2, 3, 0)]=(0.546173884573+0.149383975349j)*x[0]**o + ((-0.120206413237-0.18858881502j))*x[0] + ((0.652781251686+0.685470628788j))*x[1]**o + ((-0.1738782554+0.758767923322j))*x[1]
            ref[(3, 2, 3, 0)]=(1.19895513626+0.834854604137j)*(1+2.*(dim-1)/(o+1.)) + ((-0.294084668637+0.570179108302j))*dim
            arg[(3, 2, 3, 1)]=(0.765842603289+0.902332251507j)*x[0]**o + ((0.225203728409+0.825093717451j))*x[0] + ((0.98059994461-0.215448316193j))*x[1]**o + ((-0.305296893475+0.296895333008j))*x[1]
            ref[(3, 2, 3, 1)]=(1.7464425479+0.686883935314j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0800931650659+1.12198905046j))*dim
            arg[(3, 2, 3, 2)]=(0.204786026889-0.765106050675j)*x[0]**o + ((0.765331909498+0.502233650596j))*x[0] + ((0.1926443196+0.829471962506j))*x[1]**o + ((0.67891026996-0.403918079049j))*x[1]
            ref[(3, 2, 3, 2)]=(0.397430346489+0.0643659118318j)*(1+2.*(dim-1)/(o+1.)) + ((1.44424217946+0.0983155715472j))*dim
            arg[(3, 2, 3, 3)]=(0.443207482128-0.498723504321j)*x[0]**o + ((-0.390181402234+0.466316141951j))*x[0] + ((-0.690573774959-0.413079864264j))*x[1]**o + ((0.659831185813+0.221664781243j))*x[1]
            ref[(3, 2, 3, 3)]=(-0.247366292831-0.911803368585j)*(1+2.*(dim-1)/(o+1.)) + ((0.269649783578+0.687980923194j))*dim
            arg[(3, 3, 0, 0)]=(0.0197037978716-0.229541988738j)*x[0]**o + ((-0.746779654559+0.138828339857j))*x[0] + ((-0.409111259095-0.525821802845j))*x[1]**o + ((0.934184570322-0.483245074318j))*x[1]
            ref[(3, 3, 0, 0)]=(-0.389407461223-0.755363791582j)*(1+2.*(dim-1)/(o+1.)) + ((0.187404915763-0.344416734461j))*dim
            arg[(3, 3, 0, 1)]=(-0.927371090949-0.887501876686j)*x[0]**o + ((-0.407330572193-0.552026080312j))*x[0] + ((0.72052496527+0.172064722888j))*x[1]**o + ((-0.0493184600782+0.458200889161j))*x[1]
            ref[(3, 3, 0, 1)]=(-0.206846125679-0.715437153798j)*(1+2.*(dim-1)/(o+1.)) + ((-0.456649032271-0.0938251911507j))*dim
            arg[(3, 3, 0, 2)]=(0.934461172974-0.129414101468j)*x[0]**o + ((0.0213358145612+0.98035645354j))*x[0] + ((-0.164087452142-0.524384352394j))*x[1]**o + ((0.913418111706+0.377614453268j))*x[1]
            ref[(3, 3, 0, 2)]=(0.770373720832-0.653798453861j)*(1+2.*(dim-1)/(o+1.)) + ((0.934753926267+1.35797090681j))*dim
            arg[(3, 3, 0, 3)]=(0.275384439932-0.267430106352j)*x[0]**o + ((-0.292975764233-0.459873600417j))*x[0] + ((-0.821980852896-0.76185339631j))*x[1]**o + ((0.835843420658+0.0311656610458j))*x[1]
            ref[(3, 3, 0, 3)]=(-0.546596412964-1.02928350266j)*(1+2.*(dim-1)/(o+1.)) + ((0.542867656425-0.428707939371j))*dim
            arg[(3, 3, 1, 0)]=(-0.0847515087826+0.224969710126j)*x[0]**o + ((0.743499443004+0.399131395486j))*x[0] + ((-0.813730622969+0.22723536616j))*x[1]**o + ((-0.641352489603+0.0586838643314j))*x[1]
            ref[(3, 3, 1, 0)]=(-0.898482131751+0.452205076286j)*(1+2.*(dim-1)/(o+1.)) + ((0.1021469534+0.457815259818j))*dim
            arg[(3, 3, 1, 1)]=(0.477363439187-0.73168730516j)*x[0]**o + ((-0.578556705311-0.465905836443j))*x[0] + ((0.183957771066+0.984676447542j))*x[1]**o + ((0.133072331733-0.437119567281j))*x[1]
            ref[(3, 3, 1, 1)]=(0.661321210253+0.252989142382j)*(1+2.*(dim-1)/(o+1.)) + ((-0.445484373578-0.903025403724j))*dim
            arg[(3, 3, 1, 2)]=(0.255194473975-0.973338075907j)*x[0]**o + ((-0.0871473838488+0.563851825323j))*x[0] + ((0.727850414249-0.247886369055j))*x[1]**o + ((-0.101274200784+0.985000298101j))*x[1]
            ref[(3, 3, 1, 2)]=(0.983044888224-1.22122444496j)*(1+2.*(dim-1)/(o+1.)) + ((-0.188421584633+1.54885212342j))*dim
            arg[(3, 3, 1, 3)]=(-0.895415328987-0.165795208349j)*x[0]**o + ((0.0729005170049+0.303883980285j))*x[0] + ((-0.280411447918+0.317934695891j))*x[1]**o + ((0.104913843523+0.761419914792j))*x[1]
            ref[(3, 3, 1, 3)]=(-1.17582677691+0.152139487542j)*(1+2.*(dim-1)/(o+1.)) + ((0.177814360528+1.06530389508j))*dim
            arg[(3, 3, 2, 0)]=(0.262456807267-0.19742816292j)*x[0]**o + ((-0.484647774341+0.86805707163j))*x[0] + ((0.417239182636+0.761192061802j))*x[1]**o + ((-0.99559262703+0.559011622166j))*x[1]
            ref[(3, 3, 2, 0)]=(0.679695989903+0.563763898883j)*(1+2.*(dim-1)/(o+1.)) + ((-1.48024040137+1.4270686938j))*dim
            arg[(3, 3, 2, 1)]=(-0.423344754911+0.442640667429j)*x[0]**o + ((-0.163269416954-0.79968019085j))*x[0] + ((0.547767338771-0.367726629628j))*x[1]**o + ((-0.349846978075+0.110584470823j))*x[1]
            ref[(3, 3, 2, 1)]=(0.124422583861+0.0749140378012j)*(1+2.*(dim-1)/(o+1.)) + ((-0.513116395029-0.689095720027j))*dim
            arg[(3, 3, 2, 2)]=(0.244502606762-0.731695062929j)*x[0]**o + ((-0.93181690448-0.885597167746j))*x[0] + ((0.304191506447+0.752064946751j))*x[1]**o + ((0.327661090717+0.265947744627j))*x[1]
            ref[(3, 3, 2, 2)]=(0.548694113209+0.0203698838228j)*(1+2.*(dim-1)/(o+1.)) + ((-0.604155813763-0.619649423119j))*dim
            arg[(3, 3, 2, 3)]=(0.519926112494-0.19634917541j)*x[0]**o + ((-0.52681538121-0.53550407779j))*x[0] + ((-0.58192996841-0.0219788450359j))*x[1]**o + ((0.251978198959-0.0451813692938j))*x[1]
            ref[(3, 3, 2, 3)]=(-0.0620038559154-0.218328020446j)*(1+2.*(dim-1)/(o+1.)) + ((-0.274837182251-0.580685447084j))*dim
            arg[(3, 3, 3, 0)]=(0.349512972673+0.0578494217605j)*x[0]**o + ((0.450468129497+0.471437549942j))*x[0] + ((-0.413347091523+0.535295838923j))*x[1]**o + ((-0.439189572193+0.430816874829j))*x[1]
            ref[(3, 3, 3, 0)]=(-0.0638341188509+0.593145260683j)*(1+2.*(dim-1)/(o+1.)) + ((0.011278557304+0.902254424771j))*dim
            arg[(3, 3, 3, 1)]=(0.0586690572698+0.999062692155j)*x[0]**o + ((0.741617872604+0.349183042833j))*x[0] + ((0.78801942131-0.613101112615j))*x[1]**o + ((-0.712008360903+0.89553737241j))*x[1]
            ref[(3, 3, 3, 1)]=(0.846688478579+0.38596157954j)*(1+2.*(dim-1)/(o+1.)) + ((0.0296095117011+1.24472041524j))*dim
            arg[(3, 3, 3, 2)]=(-0.887575165928-0.938215095914j)*x[0]**o + ((-0.55079403099-0.221294163032j))*x[0] + ((0.652383757018-0.0927299572762j))*x[1]**o + ((0.784596141385+0.757183368479j))*x[1]
            ref[(3, 3, 3, 2)]=(-0.23519140891-1.03094505319j)*(1+2.*(dim-1)/(o+1.)) + ((0.233802110395+0.535889205447j))*dim
            arg[(3, 3, 3, 3)]=(0.217803289388+0.537798255008j)*x[0]**o + ((0.960476321939-0.121907285683j))*x[0] + ((-0.216892194599+0.784590238992j))*x[1]**o + ((0.00469765435717+0.825407114159j))*x[1]
            ref[(3, 3, 3, 3)]=(0.00091109478851+1.322388494j)*(1+2.*(dim-1)/(o+1.)) + ((0.965173976296+0.703499828476j))*dim
        else:
            arg[(0, 0, 0, 0)]=(0.378687935807-0.993349672645j)*x[0]**o + ((-0.313092650829+0.0183713152358j))*x[0] + ((0.476537292338+0.906809570687j))*x[1]**o + ((-0.0803126774917-0.437368609679j))*x[1] + ((-0.654282037768+0.902004012234j))*x[2]**o + ((-0.151842243255-0.69277941377j))*x[2]
            ref[(0, 0, 0, 0)]=(0.200943190378+0.815463910276j)*(1+2.*(dim-1)/(o+1.)) + ((-0.545247571576-1.11177670821j))*dim
            arg[(0, 0, 0, 1)]=(-0.341266434931+0.481890793367j)*x[0]**o + ((0.241600170115-0.247204721632j))*x[0] + ((0.464068704425-0.663339089021j))*x[1]**o + ((0.0817222590372-0.102958978882j))*x[1] + ((0.398007947501-0.312363240996j))*x[2]**o + ((0.120835970759-0.367461661837j))*x[2]
            ref[(0, 0, 0, 1)]=(0.520810216995-0.49381153665j)*(1+2.*(dim-1)/(o+1.)) + ((0.444158399911-0.717625362351j))*dim
            arg[(0, 0, 0, 2)]=(0.937547343135+0.309478704501j)*x[0]**o + ((0.777386774802+0.77564617456j))*x[0] + ((0.431379938583+0.0712345343434j))*x[1]**o + ((-0.546022191029-0.45533279484j))*x[1] + ((-0.288924402474-0.267995841122j))*x[2]**o + ((0.69589621335-0.332577889006j))*x[2]
            ref[(0, 0, 0, 2)]=(1.08000287924+0.112717397722j)*(1+2.*(dim-1)/(o+1.)) + ((0.927260797122-0.0122645092862j))*dim
            arg[(0, 0, 0, 3)]=(-0.998789712375-0.0080283923903j)*x[0]**o + ((0.374696830391+0.249498891108j))*x[0] + ((-0.472843990362+0.196524781627j))*x[1]**o + ((0.602196393373+0.317787718406j))*x[1] + ((0.350059696902+0.571638848538j))*x[2]**o + ((0.33967544196-0.203343461182j))*x[2]
            ref[(0, 0, 0, 3)]=(-1.12157400584+0.760135237774j)*(1+2.*(dim-1)/(o+1.)) + ((1.31656866572+0.363943148332j))*dim
            arg[(0, 0, 1, 0)]=(-0.363652918863-0.795136685996j)*x[0]**o + ((-0.7670989643-0.964407721605j))*x[0] + ((-0.338232695822-0.992512704583j))*x[1]**o + ((-0.64269259118-0.849220042004j))*x[1] + ((0.0862608425905-0.299707608849j))*x[2]**o + ((-0.0845994942087-0.994547766636j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.615624772095-2.08735699943j)*(1+2.*(dim-1)/(o+1.)) + ((-1.49439104969-2.80817553025j))*dim
            arg[(0, 0, 1, 1)]=(0.292326038542+0.0963098940142j)*x[0]**o + ((-0.935929180375-0.144345821056j))*x[0] + ((0.349488367862-0.790026057237j))*x[1]**o + ((0.601989436225-0.892288369642j))*x[1] + ((0.446000195838-0.313179643114j))*x[2]**o + ((-0.992265307549-0.183086934584j))*x[2]
            ref[(0, 0, 1, 1)]=(1.08781460224-1.00689580634j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3262050517-1.21972112528j))*dim
            arg[(0, 0, 1, 2)]=(-0.544515753712-0.378979999084j)*x[0]**o + ((-0.782869236084-0.845178479292j))*x[0] + ((0.600845290059-0.0687494402413j))*x[1]**o + ((-0.603249923264-0.0117557974801j))*x[1] + ((-0.182196068115+0.0423608372932j))*x[2]**o + ((0.380449673561-0.904442110285j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.125866531768-0.405368602032j)*(1+2.*(dim-1)/(o+1.)) + ((-1.00566948579-1.76137638706j))*dim
            arg[(0, 0, 1, 3)]=(-0.771940153886-0.0218558202632j)*x[0]**o + ((-0.602966169066+0.949850618933j))*x[0] + ((-0.408505020043+0.427698848116j))*x[1]**o + ((-0.516548859268+0.773984810981j))*x[1] + ((-0.779931553337-0.0150322727845j))*x[2]**o + ((0.205530225407+0.231168556028j))*x[2]
            ref[(0, 0, 1, 3)]=(-1.96037672727+0.390810755068j)*(1+2.*(dim-1)/(o+1.)) + ((-0.913984802927+1.95500398594j))*dim
            arg[(0, 0, 2, 0)]=(-0.166459180027-0.453456718447j)*x[0]**o + ((0.726392267745+0.326869117829j))*x[0] + ((-0.418240291171-0.249439091165j))*x[1]**o + ((0.695157479426+0.0346566603994j))*x[1] + ((0.300760032542+0.0908028373273j))*x[2]**o + ((-0.148673810925-0.831934937077j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.283939438656-0.612092972285j)*(1+2.*(dim-1)/(o+1.)) + ((1.27287593625-0.470409158848j))*dim
            arg[(0, 0, 2, 1)]=(0.292262193913-0.250526454358j)*x[0]**o + ((-0.564258900864+0.641121771397j))*x[0] + ((0.453471843045-0.461192551059j))*x[1]**o + ((0.78093798877+0.673261852672j))*x[1] + ((-0.926939715855+0.437251533979j))*x[2]**o + ((-0.100202274073-0.161599443702j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.181205678897-0.274467471438j)*(1+2.*(dim-1)/(o+1.)) + ((0.116476813834+1.15278418037j))*dim
            arg[(0, 0, 2, 2)]=(-0.691491205402+0.384838061501j)*x[0]**o + ((-0.672035032584+0.0704657878833j))*x[0] + ((-0.393599344119-0.129056726828j))*x[1]**o + ((0.464487190615+0.0465344625387j))*x[1] + ((0.0605935074021+0.13744931402j))*x[2]**o + ((0.486357011329+0.385354330621j))*x[2]
            ref[(0, 0, 2, 2)]=(-1.02449704212+0.393230648692j)*(1+2.*(dim-1)/(o+1.)) + ((0.278809169359+0.502354581043j))*dim
            arg[(0, 0, 2, 3)]=(-0.0719503477791-0.641893670386j)*x[0]**o + ((0.111376336029+0.463835696133j))*x[0] + ((-0.333318807951+0.176261836036j))*x[1]**o + ((0.973359321652-0.563784160067j))*x[1] + ((0.717878341536-0.438137061813j))*x[2]**o + ((-0.0270387527343+0.47766143983j))*x[2]
            ref[(0, 0, 2, 3)]=(0.312609185806-0.903768896162j)*(1+2.*(dim-1)/(o+1.)) + ((1.05769690495+0.377712975896j))*dim
            arg[(0, 0, 3, 0)]=(0.312223729503-0.873017379907j)*x[0]**o + ((-0.938863120282+0.385123367994j))*x[0] + ((-0.403161595017+0.912707004994j))*x[1]**o + ((0.81607534324-0.750593637567j))*x[1] + ((-0.978788559288-0.870072209056j))*x[2]**o + ((0.868656637291+0.339787827668j))*x[2]
            ref[(0, 0, 3, 0)]=(-1.0697264248-0.830382583969j)*(1+2.*(dim-1)/(o+1.)) + ((0.745868860248-0.0256824419054j))*dim
            arg[(0, 0, 3, 1)]=(-0.209173914207+0.549416436451j)*x[0]**o + ((-0.0512019055989+0.680401174441j))*x[0] + ((0.954068669321-0.502792232181j))*x[1]**o + ((0.329258067168-0.360663358533j))*x[1] + ((0.496327156557-0.626179150116j))*x[2]**o + ((-0.738225094096-0.858102706265j))*x[2]
            ref[(0, 0, 3, 1)]=(1.24122191167-0.579554945846j)*(1+2.*(dim-1)/(o+1.)) + ((-0.460168932527-0.538364890357j))*dim
            arg[(0, 0, 3, 2)]=(-0.240018304182-0.294487154073j)*x[0]**o + ((0.779963732499-0.855324417486j))*x[0] + ((0.934054184988+0.353238263828j))*x[1]**o + ((0.509573333519-0.723737309026j))*x[1] + ((0.400393182116+0.950033241732j))*x[2]**o + ((0.884718462145+0.328039267882j))*x[2]
            ref[(0, 0, 3, 2)]=(1.09442906292+1.00878435149j)*(1+2.*(dim-1)/(o+1.)) + ((2.17425552816-1.25102245863j))*dim
            arg[(0, 0, 3, 3)]=(0.527670299553-0.226354694026j)*x[0]**o + ((-0.581931807312+0.352344848358j))*x[0] + ((-0.153855112866+0.891673739612j))*x[1]**o + ((0.876005836582-0.213427738423j))*x[1] + ((-0.900856541165-0.218951282189j))*x[2]**o + ((-0.128273167709-0.688970205954j))*x[2]
            ref[(0, 0, 3, 3)]=(-0.527041354478+0.446367763397j)*(1+2.*(dim-1)/(o+1.)) + ((0.165800861561-0.550053096019j))*dim
            arg[(0, 1, 0, 0)]=(-0.956094687991-0.799352635251j)*x[0]**o + ((0.872014175702+0.368322652837j))*x[0] + ((0.807799492-0.358035103872j))*x[1]**o + ((-0.415116941636+0.512379747983j))*x[1] + ((-0.911697425447+0.148466223483j))*x[2]**o + ((0.57270054241+0.0450688909193j))*x[2]
            ref[(0, 1, 0, 0)]=(-1.05999262144-1.00892151564j)*(1+2.*(dim-1)/(o+1.)) + ((1.02959777648+0.92577129174j))*dim
            arg[(0, 1, 0, 1)]=(-0.204302995769+0.977851924248j)*x[0]**o + ((-0.25373382535-0.18894868664j))*x[0] + ((0.593464345999+0.730041363149j))*x[1]**o + ((-0.706003285383-0.677025113496j))*x[1] + ((0.528382377181-0.300975083612j))*x[2]**o + ((-0.0595684723278+0.815383103149j))*x[2]
            ref[(0, 1, 0, 1)]=(0.917543727411+1.40691820378j)*(1+2.*(dim-1)/(o+1.)) + ((-1.01930558306-0.0505906969871j))*dim
            arg[(0, 1, 0, 2)]=(0.201247680209-0.831521744946j)*x[0]**o + ((-0.691601111382+0.0807861782519j))*x[0] + ((-0.681555722516+0.584982636068j))*x[1]**o + ((-0.112657173851+0.752393087512j))*x[1] + ((0.128999586716+0.992330161662j))*x[2]**o + ((0.172621272006-0.899092075073j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.351308455591+0.745791052784j)*(1+2.*(dim-1)/(o+1.)) + ((-0.631637013228-0.0659128093097j))*dim
            arg[(0, 1, 0, 3)]=(0.97262947781+0.568622794473j)*x[0]**o + ((-0.122815421192-0.658522964867j))*x[0] + ((-0.287381908191-0.818437831551j))*x[1]**o + ((-0.222977035362+0.167410129073j))*x[1] + ((-0.216957028155+0.147330153586j))*x[2]**o + ((0.229304360052-0.230017043741j))*x[2]
            ref[(0, 1, 0, 3)]=(0.468290541463-0.102484883492j)*(1+2.*(dim-1)/(o+1.)) + ((-0.116488096501-0.721129879534j))*dim
            arg[(0, 1, 1, 0)]=(0.282559061222-0.174029965292j)*x[0]**o + ((-0.902358164305+0.171193586503j))*x[0] + ((0.609890883934+0.950720728306j))*x[1]**o + ((0.322051538424+0.962997410243j))*x[1] + ((0.0519388824859+0.91412320454j))*x[2]**o + ((-0.0639966728206+0.427951517414j))*x[2]
            ref[(0, 1, 1, 0)]=(0.944388827642+1.69081396755j)*(1+2.*(dim-1)/(o+1.)) + ((-0.644303298702+1.56214251416j))*dim
            arg[(0, 1, 1, 1)]=(-0.966914175166-0.790652007458j)*x[0]**o + ((-0.519682847538-0.558003249876j))*x[0] + ((-0.525318494753+0.283657156412j))*x[1]**o + ((0.0127982177418+0.201149429715j))*x[1] + ((0.907480304085-0.686269712638j))*x[2]**o + ((-0.936637512895-0.690870526876j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.584752365834-1.19326456368j)*(1+2.*(dim-1)/(o+1.)) + ((-1.44352214269-1.04772434704j))*dim
            arg[(0, 1, 1, 2)]=(-0.18572909378+0.0714183726083j)*x[0]**o + ((-0.248619774762-0.818519179266j))*x[0] + ((-0.0624869360226-0.38556189054j))*x[1]**o + ((-0.554235899876-0.127437879585j))*x[1] + ((-0.176353846226-0.977584036528j))*x[2]**o + ((-0.51417692253+0.441586397545j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.424569876029-1.29172755446j)*(1+2.*(dim-1)/(o+1.)) + ((-1.31703259717-0.504370661306j))*dim
            arg[(0, 1, 1, 3)]=(0.915828255179+0.934776836097j)*x[0]**o + ((0.107184187026+0.342641940019j))*x[0] + ((0.939685449925+0.519354105527j))*x[1]**o + ((0.340591302259+0.875434218596j))*x[1] + ((-0.0391498243235-0.0756907700363j))*x[2]**o + ((-0.855767160831+0.846864128161j))*x[2]
            ref[(0, 1, 1, 3)]=(1.81636388078+1.37844017159j)*(1+2.*(dim-1)/(o+1.)) + ((-0.407991671545+2.06494028678j))*dim
            arg[(0, 1, 2, 0)]=(-0.200500030302+0.848145487543j)*x[0]**o + ((0.546454147202-0.25483656205j))*x[0] + ((0.778936852124-0.205147387551j))*x[1]**o + ((-0.821754885651+0.108846474994j))*x[1] + ((0.271938006101-0.942949571518j))*x[2]**o + ((0.111255711493+0.523306978077j))*x[2]
            ref[(0, 1, 2, 0)]=(0.850374827923-0.299951471526j)*(1+2.*(dim-1)/(o+1.)) + ((-0.164045026956+0.37731689102j))*dim
            arg[(0, 1, 2, 1)]=(0.789902976934-0.456136451881j)*x[0]**o + ((0.430349548877+0.604078647258j))*x[0] + ((-0.0844023463901+0.125175524892j))*x[1]**o + ((0.871295118001+0.165815008189j))*x[1] + ((-0.710342857554+0.942482332418j))*x[2]**o + ((-0.0695161768414-0.0662981390408j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.00484222701059+0.611521405429j)*(1+2.*(dim-1)/(o+1.)) + ((1.23212849004+0.703595516406j))*dim
            arg[(0, 1, 2, 2)]=(0.673029455031+0.75301800646j)*x[0]**o + ((-0.568383667336-0.333187333712j))*x[0] + ((0.230225775639+0.532817705145j))*x[1]**o + ((-0.391537844647+0.10650453096j))*x[1] + ((0.855081367637-0.991593292054j))*x[2]**o + ((-0.712099373079-0.119026458712j))*x[2]
            ref[(0, 1, 2, 2)]=(1.75833659831+0.294242419551j)*(1+2.*(dim-1)/(o+1.)) + ((-1.67202088506-0.345709261464j))*dim
            arg[(0, 1, 2, 3)]=(0.670999635478+0.236102069383j)*x[0]**o + ((-0.155322014562+0.263478466588j))*x[0] + ((-0.242322577292+0.33662971505j))*x[1]**o + ((0.725679102691-0.840980723536j))*x[1] + ((-0.444041950301-0.988203358335j))*x[2]**o + ((-0.81459418364+0.184980952967j))*x[2]
            ref[(0, 1, 2, 3)]=(-0.0153648921152-0.415471573902j)*(1+2.*(dim-1)/(o+1.)) + ((-0.24423709551-0.392521303981j))*dim
            arg[(0, 1, 3, 0)]=(0.0807816261497-0.882501023847j)*x[0]**o + ((-0.158786268096-0.104918162852j))*x[0] + ((-0.993043692299-0.101193750825j))*x[1]**o + ((0.457718055338+0.786558359006j))*x[1] + ((0.813435461592-0.846026065478j))*x[2]**o + ((0.439124752612+0.400208767821j))*x[2]
            ref[(0, 1, 3, 0)]=(-0.0988266045574-1.82972084015j)*(1+2.*(dim-1)/(o+1.)) + ((0.738056539853+1.08184896398j))*dim
            arg[(0, 1, 3, 1)]=(0.64799971081-0.042260378059j)*x[0]**o + ((0.23393352401-0.210325371504j))*x[0] + ((0.904939516862-0.0406762304423j))*x[1]**o + ((-0.0550709971126-0.544332429329j))*x[1] + ((0.947492570627+0.103911418718j))*x[2]**o + ((0.303350116417+0.644494853255j))*x[2]
            ref[(0, 1, 3, 1)]=(2.5004317983+0.0209748102169j)*(1+2.*(dim-1)/(o+1.)) + ((0.482212643314-0.110162947578j))*dim
            arg[(0, 1, 3, 2)]=(-0.282042484686+0.0422448055581j)*x[0]**o + ((0.616532194698+0.47739650675j))*x[0] + ((-0.991585347172-0.798158955641j))*x[1]**o + ((0.291126574697-0.96177317357j))*x[1] + ((0.617618625611-0.0992103291109j))*x[2]**o + ((0.283283271014+0.0951781857751j))*x[2]
            ref[(0, 1, 3, 2)]=(-0.656009206247-0.855124479194j)*(1+2.*(dim-1)/(o+1.)) + ((1.19094204041-0.389198481046j))*dim
            arg[(0, 1, 3, 3)]=(-0.961202446131-0.525602285409j)*x[0]**o + ((0.588960183404-0.138216023791j))*x[0] + ((0.446904058515+0.852015545888j))*x[1]**o + ((-0.73659060858-0.476430015557j))*x[1] + ((0.949158857834-0.729450212881j))*x[2]**o + ((-0.576302035259+0.0686701064493j))*x[2]
            ref[(0, 1, 3, 3)]=(0.434860470217-0.403036952402j)*(1+2.*(dim-1)/(o+1.)) + ((-0.723932460435-0.545975932898j))*dim
            arg[(0, 2, 0, 0)]=(-0.336708747442-0.61924032591j)*x[0]**o + ((0.295081065489+0.743152438834j))*x[0] + ((0.0986537119494-0.60028064612j))*x[1]**o + ((-0.835000177956+0.601293672021j))*x[1] + ((0.842996059492-0.841896645032j))*x[2]**o + ((-0.262951510458+0.860194528252j))*x[2]
            ref[(0, 2, 0, 0)]=(0.604941023999-2.06141761706j)*(1+2.*(dim-1)/(o+1.)) + ((-0.802870622925+2.20464063911j))*dim
            arg[(0, 2, 0, 1)]=(-0.732456342001-0.988082907965j)*x[0]**o + ((-0.689127647429+0.77982188208j))*x[0] + ((0.105795109592-0.361208970797j))*x[1]**o + ((0.464153985509-0.471958273917j))*x[1] + ((-0.267981070349-0.47636850505j))*x[2]**o + ((-0.0825668255494+0.478803056592j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.894642302757-1.82566038381j)*(1+2.*(dim-1)/(o+1.)) + ((-0.307540487469+0.786666664755j))*dim
            arg[(0, 2, 0, 2)]=(0.273399401952-0.0477779051123j)*x[0]**o + ((-0.18161804886-0.549321790652j))*x[0] + ((-0.147924707228+0.184659354083j))*x[1]**o + ((-0.883586631296-0.113177312899j))*x[1] + ((-0.192791665497-0.719274983859j))*x[2]**o + ((-0.815963715685+0.14508708591j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.0673169707733-0.582393534889j)*(1+2.*(dim-1)/(o+1.)) + ((-1.88116839584-0.517412017641j))*dim
            arg[(0, 2, 0, 3)]=(-0.32627182683-0.444956195886j)*x[0]**o + ((-0.894486825836-0.470243395524j))*x[0] + ((0.982609747385+0.534199351903j))*x[1]**o + ((-0.862919786093+0.249918625798j))*x[1] + ((-0.364515803113+0.443477228936j))*x[2]**o + ((0.572322257196-0.0887604865448j))*x[2]
            ref[(0, 2, 0, 3)]=(0.291822117443+0.532720384953j)*(1+2.*(dim-1)/(o+1.)) + ((-1.18508435473-0.309085256271j))*dim
            arg[(0, 2, 1, 0)]=(-0.13549848504+0.540735903813j)*x[0]**o + ((-0.31427397553-0.489024516244j))*x[0] + ((-0.975189765786+0.154794704347j))*x[1]**o + ((0.254548763154+0.772303641898j))*x[1] + ((0.383368767598+0.890803534074j))*x[2]**o + ((0.979026335786+0.0199192094925j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.727319483228+1.58633414223j)*(1+2.*(dim-1)/(o+1.)) + ((0.919301123409+0.303198335147j))*dim
            arg[(0, 2, 1, 1)]=(0.795078004338-0.116224804598j)*x[0]**o + ((-0.56905868269-0.169652837467j))*x[0] + ((-0.157673135154-0.0784534679441j))*x[1]**o + ((0.310121481409-0.150605620436j))*x[1] + ((-0.485979892421+0.932792292209j))*x[2]**o + ((-0.891749875627-0.167366432015j))*x[2]
            ref[(0, 2, 1, 1)]=(0.151424976763+0.738114019667j)*(1+2.*(dim-1)/(o+1.)) + ((-1.15068707691-0.487624889917j))*dim
            arg[(0, 2, 1, 2)]=(0.525462481262-0.891754135046j)*x[0]**o + ((-0.15106837917+0.879735174738j))*x[0] + ((-0.931446434946+0.193751205287j))*x[1]**o + ((0.962275264691+0.910985264931j))*x[1] + ((-0.464178601337-0.584969036369j))*x[2]**o + ((0.7026340815+0.0974940592341j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.870162555021-1.28297196613j)*(1+2.*(dim-1)/(o+1.)) + ((1.51384096702+1.8882144989j))*dim
            arg[(0, 2, 1, 3)]=(0.0275866986821+0.372471928145j)*x[0]**o + ((0.560141949263+0.838231520265j))*x[0] + ((-0.407862284675-0.193303156795j))*x[1]**o + ((-0.985856960385-0.343044725284j))*x[1] + ((0.201430153319-0.0483120428569j))*x[2]**o + ((-0.708196138314-0.117592083622j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.178845432674+0.130856728493j)*(1+2.*(dim-1)/(o+1.)) + ((-1.13391114944+0.377594711359j))*dim
            arg[(0, 2, 2, 0)]=(0.652095060099+0.670842376897j)*x[0]**o + ((0.125189094889-0.0553993791842j))*x[0] + ((-0.724639411257+0.781477068371j))*x[1]**o + ((-0.835855410223-0.861496713441j))*x[1] + ((0.391382654341-0.770585330835j))*x[2]**o + ((-0.56001758227+0.241376337155j))*x[2]
            ref[(0, 2, 2, 0)]=(0.318838303183+0.681734114433j)*(1+2.*(dim-1)/(o+1.)) + ((-1.2706838976-0.675519755469j))*dim
            arg[(0, 2, 2, 1)]=(-0.737416850745+0.737107838024j)*x[0]**o + ((-0.855738245143-0.208043834968j))*x[0] + ((0.677164490022+0.926820215592j))*x[1]**o + ((0.292136582859+0.530109074216j))*x[1] + ((-0.912127480406+0.35922505896j))*x[2]**o + ((-0.596944931497-0.00389490260671j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.972379841129+2.02315311258j)*(1+2.*(dim-1)/(o+1.)) + ((-1.16054659378+0.318170336641j))*dim
            arg[(0, 2, 2, 2)]=(-0.103129738806+0.458741880548j)*x[0]**o + ((-0.405881813779+0.820445902349j))*x[0] + ((0.218763296463+0.691577452633j))*x[1]**o + ((0.20912930047-0.60862224929j))*x[1] + ((-0.468154233101+0.870469233293j))*x[2]**o + ((-0.156451696382+0.483274263991j))*x[2]
            ref[(0, 2, 2, 2)]=(-0.352520675445+2.02078856647j)*(1+2.*(dim-1)/(o+1.)) + ((-0.353204209691+0.69509791705j))*dim
            arg[(0, 2, 2, 3)]=(-0.335393033817+0.706567854413j)*x[0]**o + ((-0.386172180135+0.836703839137j))*x[0] + ((-0.172812706026+0.725966286831j))*x[1]**o + ((0.83224684665-0.338695055834j))*x[1] + ((0.662343204015-0.207034957975j))*x[2]**o + ((-0.220825072085+0.831792548852j))*x[2]
            ref[(0, 2, 2, 3)]=(0.154137464173+1.22549918327j)*(1+2.*(dim-1)/(o+1.)) + ((0.225249594431+1.32980133216j))*dim
            arg[(0, 2, 3, 0)]=(-0.812721388523-0.267494718881j)*x[0]**o + ((-0.577204329378+0.343202099628j))*x[0] + ((-0.241112855222+0.970308827308j))*x[1]**o + ((0.661118732417-0.907265023738j))*x[1] + ((-0.845653014818-0.604090479408j))*x[2]**o + ((-0.834480230741+0.17898420212j))*x[2]
            ref[(0, 2, 3, 0)]=(-1.89948725856+0.0987236290184j)*(1+2.*(dim-1)/(o+1.)) + ((-0.750565827702-0.38507872199j))*dim
            arg[(0, 2, 3, 1)]=(-0.514582669796-0.0359164299303j)*x[0]**o + ((-0.405843912179+0.0337841735507j))*x[0] + ((-0.121238580268+0.185796038347j))*x[1]**o + ((-0.528966233987-0.181915845351j))*x[1] + ((0.119781502869-0.592378365037j))*x[2]**o + ((0.0318014698147+0.679941473539j))*x[2]
            ref[(0, 2, 3, 1)]=(-0.516039747195-0.44249875662j)*(1+2.*(dim-1)/(o+1.)) + ((-0.903008676351+0.531809801739j))*dim
            arg[(0, 2, 3, 2)]=(-0.52522487763-0.681647839425j)*x[0]**o + ((-0.716485794605+0.0338108993678j))*x[0] + ((-0.416846759493+0.521375351695j))*x[1]**o + ((-0.178216456263+0.148193568696j))*x[1] + ((-0.669794700284-0.489434745366j))*x[2]**o + ((0.0968912361135+0.689582959501j))*x[2]
            ref[(0, 2, 3, 2)]=(-1.61186633741-0.649707233096j)*(1+2.*(dim-1)/(o+1.)) + ((-0.797811014754+0.871587427565j))*dim
            arg[(0, 2, 3, 3)]=(0.144986156826-0.0105765024847j)*x[0]**o + ((0.61354144802-0.600530696278j))*x[0] + ((-0.22784219971-0.824567325932j))*x[1]**o + ((-0.143905492778-0.676215999027j))*x[1] + ((0.135538901714-0.885022125726j))*x[2]**o + ((0.757443404854-0.44967911911j))*x[2]
            ref[(0, 2, 3, 3)]=(0.0526828588301-1.72016595414j)*(1+2.*(dim-1)/(o+1.)) + ((1.2270793601-1.72642581442j))*dim
            arg[(0, 3, 0, 0)]=(0.43127124877-0.776848103661j)*x[0]**o + ((-0.184320219014-0.29399859602j))*x[0] + ((-0.513177596695+0.0253495210612j))*x[1]**o + ((-0.958068960771-0.50955561857j))*x[1] + ((0.171026211297-0.83096286045j))*x[2]**o + ((-0.579601529439-0.616002681699j))*x[2]
            ref[(0, 3, 0, 0)]=(0.089119863373-1.58246144305j)*(1+2.*(dim-1)/(o+1.)) + ((-1.72199070922-1.41955689629j))*dim
            arg[(0, 3, 0, 1)]=(0.487731590506-0.962546412827j)*x[0]**o + ((-0.559205066218+0.0728528298443j))*x[0] + ((-0.057052287187-0.481614222029j))*x[1]**o + ((0.801696395507+0.274250310386j))*x[1] + ((0.293131984011+0.598475043561j))*x[2]**o + ((-0.70505748243-0.124043002919j))*x[2]
            ref[(0, 3, 0, 1)]=(0.723811287331-0.845685591295j)*(1+2.*(dim-1)/(o+1.)) + ((-0.46256615314+0.223060137312j))*dim
            arg[(0, 3, 0, 2)]=(-0.596905850721+0.756661364961j)*x[0]**o + ((0.963618310392-0.705148039903j))*x[0] + ((0.368740835531+0.0354912920009j))*x[1]**o + ((0.166565592069-0.797255848077j))*x[1] + ((0.941967716+0.870054115371j))*x[2]**o + ((-0.0578264104073-0.504030015668j))*x[2]
            ref[(0, 3, 0, 2)]=(0.71380270081+1.66220677233j)*(1+2.*(dim-1)/(o+1.)) + ((1.07235749205-2.00643390365j))*dim
            arg[(0, 3, 0, 3)]=(-0.0845346986435-0.484819961725j)*x[0]**o + ((-0.792542148004-0.170433980387j))*x[0] + ((-0.366052316884-0.449119186697j))*x[1]**o + ((-0.986394470011-0.906318357702j))*x[1] + ((-0.43656198794+0.879372091871j))*x[2]**o + ((0.0220184027212-0.0559866900714j))*x[2]
            ref[(0, 3, 0, 3)]=(-0.887149003467-0.0545670565508j)*(1+2.*(dim-1)/(o+1.)) + ((-1.75691821529-1.13273902816j))*dim
            arg[(0, 3, 1, 0)]=(-0.192359423384-0.548949817665j)*x[0]**o + ((0.0971073506084+0.793386523708j))*x[0] + ((-0.209231485124+0.236226519603j))*x[1]**o + ((0.121099397744+0.663604012526j))*x[1] + ((-0.68625974913+0.255786234473j))*x[2]**o + ((0.431134299321+0.0802993993638j))*x[2]
            ref[(0, 3, 1, 0)]=(-1.08785065764-0.0569370635889j)*(1+2.*(dim-1)/(o+1.)) + ((0.649341047673+1.5372899356j))*dim
            arg[(0, 3, 1, 1)]=(0.135937840903-0.638441241785j)*x[0]**o + ((-0.533335250661+0.356685286172j))*x[0] + ((-0.0534377762313+0.721081306032j))*x[1]**o + ((0.671395549743+0.51024662184j))*x[1] + ((-0.734968406027-0.0828202643376j))*x[2]**o + ((0.699314392256-0.357090740778j))*x[2]
            ref[(0, 3, 1, 1)]=(-0.652468341355-0.000180200090708j)*(1+2.*(dim-1)/(o+1.)) + ((0.837374691338+0.509841167234j))*dim
            arg[(0, 3, 1, 2)]=(0.177336843222-0.455973332627j)*x[0]**o + ((-0.280041669036+0.493656569531j))*x[0] + ((-0.936720462119+0.478646860907j))*x[1]**o + ((0.487827986972-0.209192478887j))*x[1] + ((-0.863727344982+0.339967101458j))*x[2]**o + ((-0.689064097795+0.39430159479j))*x[2]
            ref[(0, 3, 1, 2)]=(-1.62311096388+0.362640629738j)*(1+2.*(dim-1)/(o+1.)) + ((-0.48127777986+0.678765685434j))*dim
            arg[(0, 3, 1, 3)]=(-0.011229269509-0.317655304336j)*x[0]**o + ((0.64208101042-0.865025842468j))*x[0] + ((-0.170546639095-0.75439987462j))*x[1]**o + ((-0.337801133209-0.510158283052j))*x[1] + ((-0.040332073926-0.15781874402j))*x[2]**o + ((-0.116626517719-0.886198396831j))*x[2]
            ref[(0, 3, 1, 3)]=(-0.22210798253-1.22987392298j)*(1+2.*(dim-1)/(o+1.)) + ((0.187653359493-2.26138252235j))*dim
            arg[(0, 3, 2, 0)]=(0.345118782338+0.191941712171j)*x[0]**o + ((-0.845844562016-0.0343866039985j))*x[0] + ((0.641289189259+0.821788744138j))*x[1]**o + ((-0.987850502915+0.453689023958j))*x[1] + ((0.383930603736-0.916637555255j))*x[2]**o + ((-0.988263161692+0.888274120248j))*x[2]
            ref[(0, 3, 2, 0)]=(1.37033857533+0.0970929010542j)*(1+2.*(dim-1)/(o+1.)) + ((-2.82195822662+1.30757654021j))*dim
            arg[(0, 3, 2, 1)]=(-0.477181551921+0.484480597809j)*x[0]**o + ((0.786482922409+0.93381496416j))*x[0] + ((-0.457299613131+0.977706435552j))*x[1]**o + ((0.432227758918-0.669214633169j))*x[1] + ((0.55547783877-0.819792790364j))*x[2]**o + ((-0.242562640561+0.234746789547j))*x[2]
            ref[(0, 3, 2, 1)]=(-0.379003326282+0.642394242997j)*(1+2.*(dim-1)/(o+1.)) + ((0.976148040766+0.499347120538j))*dim
            arg[(0, 3, 2, 2)]=(0.124064867945+0.857591283569j)*x[0]**o + ((-0.179378673654-0.817760288705j))*x[0] + ((0.222027176097-0.714239363462j))*x[1]**o + ((-0.0537982289965-0.378961742842j))*x[1] + ((0.248766224246+0.461734338326j))*x[2]**o + ((-0.229678694659-0.121158527677j))*x[2]
            ref[(0, 3, 2, 2)]=(0.594858268287+0.605086258433j)*(1+2.*(dim-1)/(o+1.)) + ((-0.462855597309-1.31788055922j))*dim
            arg[(0, 3, 2, 3)]=(-0.425247386814+0.990346292061j)*x[0]**o + ((-0.596364530803+0.853728469464j))*x[0] + ((0.420573123786-0.197418206097j))*x[1]**o + ((0.0306217102233+0.80530624959j))*x[1] + ((-0.302544178611+0.339389285396j))*x[2]**o + ((0.0900046254785+0.114034323865j))*x[2]
            ref[(0, 3, 2, 3)]=(-0.307218441639+1.13231737136j)*(1+2.*(dim-1)/(o+1.)) + ((-0.475738195102+1.77306904292j))*dim
            arg[(0, 3, 3, 0)]=(-0.868059879289+0.572528704917j)*x[0]**o + ((0.818200714145+0.940103355797j))*x[0] + ((-0.224762082303+0.999879823984j))*x[1]**o + ((0.746494515512+0.921472105385j))*x[1] + ((-0.453707804972-0.95851573142j))*x[2]**o + ((-0.0200927824606-0.212942758192j))*x[2]
            ref[(0, 3, 3, 0)]=(-1.54652976656+0.613892797481j)*(1+2.*(dim-1)/(o+1.)) + ((1.5446024472+1.64863270299j))*dim
            arg[(0, 3, 3, 1)]=(-0.21157711344+0.665058604146j)*x[0]**o + ((0.48067038255-0.944112866703j))*x[0] + ((0.93163248815+0.570940829291j))*x[1]**o + ((-0.981676428467+0.846701190226j))*x[1] + ((-0.171933273208-0.368521699774j))*x[2]**o + ((0.149913117607+0.00894099638746j))*x[2]
            ref[(0, 3, 3, 1)]=(0.548122101502+0.867477733663j)*(1+2.*(dim-1)/(o+1.)) + ((-0.35109292831-0.0884706800896j))*dim
            arg[(0, 3, 3, 2)]=(-0.526261207546+0.181502172329j)*x[0]**o + ((-0.660197154271+0.0484261791395j))*x[0] + ((-0.318859639531-0.115119968118j))*x[1]**o + ((0.28360619533+0.372682874569j))*x[1] + ((0.223914726397+0.0680642459012j))*x[2]**o + ((0.347759798522-0.779358600881j))*x[2]
            ref[(0, 3, 3, 2)]=(-0.621206120681+0.134446450113j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0288311604188-0.358249547172j))*dim
            arg[(0, 3, 3, 3)]=(0.957855980524+0.871365189213j)*x[0]**o + ((-0.910559140672-0.123862073646j))*x[0] + ((-0.881207070561-0.168945726173j))*x[1]**o + ((0.926648959859-0.650581499105j))*x[1] + ((-0.989962197346-0.354777246422j))*x[2]**o + ((0.0358574016826-0.795979631162j))*x[2]
            ref[(0, 3, 3, 3)]=(-0.913313287383+0.347642216617j)*(1+2.*(dim-1)/(o+1.)) + ((0.0519472208691-1.57042320391j))*dim
            arg[(1, 0, 0, 0)]=(-0.849978437369+0.513647716244j)*x[0]**o + ((0.550863648149+0.579551268098j))*x[0] + ((0.490291373096-0.67491739609j))*x[1]**o + ((-0.250073750018+0.336742389331j))*x[1] + ((-0.12995363496-0.459575097453j))*x[2]**o + ((0.892410498025-0.0198356679272j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.489640699233-0.6208447773j)*(1+2.*(dim-1)/(o+1.)) + ((1.19320039616+0.896457989502j))*dim
            arg[(1, 0, 0, 1)]=(0.496970423288-0.498065613045j)*x[0]**o + ((0.802520377415+0.618769176922j))*x[0] + ((0.490093142407-0.779979059499j))*x[1]**o + ((0.348087379319-0.509986545457j))*x[1] + ((-0.502168675763+0.586643091084j))*x[2]**o + ((-0.851034116684+0.368199285211j))*x[2]
            ref[(1, 0, 0, 1)]=(0.484894889932-0.69140158146j)*(1+2.*(dim-1)/(o+1.)) + ((0.29957364005+0.476981916675j))*dim
            arg[(1, 0, 0, 2)]=(-0.463252036244+0.665195848541j)*x[0]**o + ((-0.892037006435-0.141873757724j))*x[0] + ((-0.91823119904+0.807063549883j))*x[1]**o + ((0.806603981151-0.685563363483j))*x[1] + ((-0.569474389293+0.46641936372j))*x[2]**o + ((0.507136379814-0.286662289575j))*x[2]
            ref[(1, 0, 0, 2)]=(-1.95095762458+1.93867876214j)*(1+2.*(dim-1)/(o+1.)) + ((0.42170335453-1.11409941078j))*dim
            arg[(1, 0, 0, 3)]=(0.142311096139-0.281306923672j)*x[0]**o + ((-0.514423168559-0.487580769441j))*x[0] + ((-0.938101825248-0.881260432847j))*x[1]**o + ((-0.476161927981-0.438179624428j))*x[1] + ((0.190450844045+0.981502103253j))*x[2]**o + ((-0.27887250376+0.650963724762j))*x[2]
            ref[(1, 0, 0, 3)]=(-0.605339885064-0.181065253266j)*(1+2.*(dim-1)/(o+1.)) + ((-1.2694576003-0.274796669106j))*dim
            arg[(1, 0, 1, 0)]=(0.43834893354-0.560557163452j)*x[0]**o + ((-0.205144997392-0.874109902712j))*x[0] + ((0.17564082642-0.906951260602j))*x[1]**o + ((0.0604708021949+0.0034028220777j))*x[1] + ((-0.268889574543-0.958780652605j))*x[2]**o + ((0.982883012108-0.995876777765j))*x[2]
            ref[(1, 0, 1, 0)]=(0.345100185418-2.42628907666j)*(1+2.*(dim-1)/(o+1.)) + ((0.838208816911-1.8665838584j))*dim
            arg[(1, 0, 1, 1)]=(-0.888843446431-0.383222908252j)*x[0]**o + ((0.852080157332+0.548106603866j))*x[0] + ((0.862857450835+0.0618713884453j))*x[1]**o + ((0.209187448946+0.444831235785j))*x[1] + ((0.221613117127-0.791710841157j))*x[2]**o + ((-0.0114380975511+0.070947916281j))*x[2]
            ref[(1, 0, 1, 1)]=(0.19562712153-1.11306236096j)*(1+2.*(dim-1)/(o+1.)) + ((1.04982950873+1.06388575593j))*dim
            arg[(1, 0, 1, 2)]=(0.567747204003+0.0137598214526j)*x[0]**o + ((0.0646753659036+0.824675711368j))*x[0] + ((0.112892684+0.957982728432j))*x[1]**o + ((-0.931568931406+0.663155775689j))*x[1] + ((0.909757666331-0.51751364319j))*x[2]**o + ((0.606267787177-0.075262983485j))*x[2]
            ref[(1, 0, 1, 2)]=(1.59039755433+0.454228906695j)*(1+2.*(dim-1)/(o+1.)) + ((-0.260625778326+1.41256850357j))*dim
            arg[(1, 0, 1, 3)]=(-0.745095271445+0.334644799373j)*x[0]**o + ((0.817811337576-0.965156849991j))*x[0] + ((-0.523788107594-0.746733877175j))*x[1]**o + ((-0.734520870096+0.203856837872j))*x[1] + ((0.87680801582+0.963443718918j))*x[2]**o + ((-0.13384863065-0.818506522152j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.39207536322+0.551354641116j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0505581631709-1.57980653427j))*dim
            arg[(1, 0, 2, 0)]=(0.16628742943-0.0587207157148j)*x[0]**o + ((0.076497597483-0.0243521920985j))*x[0] + ((0.575809526232-0.645703145136j))*x[1]**o + ((0.694690155397+0.334817207581j))*x[1] + ((0.030197109646-0.022592161048j))*x[2]**o + ((0.300436274539+0.713011394785j))*x[2]
            ref[(1, 0, 2, 0)]=(0.772294065307-0.727016021899j)*(1+2.*(dim-1)/(o+1.)) + ((1.07162402742+1.02347641027j))*dim
            arg[(1, 0, 2, 1)]=(0.804866798061-0.106292247107j)*x[0]**o + ((-0.575421466385-0.245237926584j))*x[0] + ((-0.377042137969-0.991988698588j))*x[1]**o + ((0.155808228793-0.889880051443j))*x[1] + ((-0.260750875582-0.143983823164j))*x[2]**o + ((0.940294358355+0.935468345655j))*x[2]
            ref[(1, 0, 2, 1)]=(0.16707378451-1.24226476886j)*(1+2.*(dim-1)/(o+1.)) + ((0.520681120763-0.199649632372j))*dim
            arg[(1, 0, 2, 2)]=(0.0581412384284-0.865539297258j)*x[0]**o + ((-0.163513975456+0.0740805634394j))*x[0] + ((0.663864955373+0.586028430873j))*x[1]**o + ((0.146082215981+0.988335034543j))*x[1] + ((0.764610721215-0.183076260944j))*x[2]**o + ((-0.879748300085-0.0693258362594j))*x[2]
            ref[(1, 0, 2, 2)]=(1.48661691502-0.462587127328j)*(1+2.*(dim-1)/(o+1.)) + ((-0.89718005956+0.993089761723j))*dim
            arg[(1, 0, 2, 3)]=(0.983603023856+0.106671457259j)*x[0]**o + ((0.208495647856-0.556059680945j))*x[0] + ((-0.510119327117+0.443770977977j))*x[1]**o + ((-0.233419786079+0.601621881057j))*x[1] + ((-0.412364849687-0.377393255963j))*x[2]**o + ((-0.692129383942-0.407153297096j))*x[2]
            ref[(1, 0, 2, 3)]=(0.0611188470523+0.173049179273j)*(1+2.*(dim-1)/(o+1.)) + ((-0.717053522165-0.361591096984j))*dim
            arg[(1, 0, 3, 0)]=(-0.810558432253-0.30690463017j)*x[0]**o + ((0.945261988512+0.287323214899j))*x[0] + ((-0.755235872971+0.785668328335j))*x[1]**o + ((-0.157644906083+0.78755259987j))*x[1] + ((0.213078192428+0.50289609035j))*x[2]**o + ((0.949563825735-0.582615509492j))*x[2]
            ref[(1, 0, 3, 0)]=(-1.3527161128+0.981659788515j)*(1+2.*(dim-1)/(o+1.)) + ((1.73718090816+0.492260305276j))*dim
            arg[(1, 0, 3, 1)]=(-0.48956389265-0.390910286933j)*x[0]**o + ((0.355722638421-0.870709018377j))*x[0] + ((0.109712935441+0.378903892821j))*x[1]**o + ((0.902725712303-0.994508611263j))*x[1] + ((-0.516274203418+0.286508645354j))*x[2]**o + ((-0.0254557473581-0.341773822358j))*x[2]
            ref[(1, 0, 3, 1)]=(-0.896125160628+0.274502251242j)*(1+2.*(dim-1)/(o+1.)) + ((1.23299260337-2.206991452j))*dim
            arg[(1, 0, 3, 2)]=(-0.853366044122+0.242194351652j)*x[0]**o + ((-0.768430615784+0.921770965709j))*x[0] + ((-0.0746068216757-0.638113131614j))*x[1]**o + ((-0.304480672198+0.691120098785j))*x[1] + ((-0.967637347692+0.28236193511j))*x[2]**o + ((-0.722917897531-0.257058362758j))*x[2]
            ref[(1, 0, 3, 2)]=(-1.89561021349-0.113556844853j)*(1+2.*(dim-1)/(o+1.)) + ((-1.79582918551+1.35583270174j))*dim
            arg[(1, 0, 3, 3)]=(-0.194593654834-0.405975820371j)*x[0]**o + ((-0.112655384043-0.471244685194j))*x[0] + ((-0.729980063465+0.969764638317j))*x[1]**o + ((0.953556109461+0.726415220547j))*x[1] + ((-0.881203741623-0.463103862234j))*x[2]**o + ((-0.246421329793+0.614079400306j))*x[2]
            ref[(1, 0, 3, 3)]=(-1.80577745992+0.100684955712j)*(1+2.*(dim-1)/(o+1.)) + ((0.594479395625+0.869249935659j))*dim
            arg[(1, 1, 0, 0)]=(0.518736267201-0.631164495332j)*x[0]**o + ((0.648351696083-0.191490887467j))*x[0] + ((0.566652188972-0.845329185621j))*x[1]**o + ((0.194880531098-0.377618277158j))*x[1] + ((0.44740109633+0.09243014605j))*x[2]**o + ((-0.233541356291-0.434538205163j))*x[2]
            ref[(1, 1, 0, 0)]=(1.5327895525-1.3840635349j)*(1+2.*(dim-1)/(o+1.)) + ((0.609690870891-1.00364736979j))*dim
            arg[(1, 1, 0, 1)]=(-0.676815064171+0.531293456226j)*x[0]**o + ((0.453721133431-0.863661843188j))*x[0] + ((-0.158829510415+0.187459405843j))*x[1]**o + ((0.416605939906+0.0699760866172j))*x[1] + ((-0.775870314954-0.900402681548j))*x[2]**o + ((0.932746581567-0.554925884293j))*x[2]
            ref[(1, 1, 0, 1)]=(-1.61151488954-0.181649819479j)*(1+2.*(dim-1)/(o+1.)) + ((1.8030736549-1.34861164086j))*dim
            arg[(1, 1, 0, 2)]=(0.312407081061+0.0453139947946j)*x[0]**o + ((-0.82560712255-0.351205929369j))*x[0] + ((0.173094909137+0.286356825358j))*x[1]**o + ((-0.182631161276-0.27541579593j))*x[1] + ((0.750017634257-0.540405754745j))*x[2]**o + ((-0.529681383853-0.4013086765j))*x[2]
            ref[(1, 1, 0, 2)]=(1.23551962446-0.208734934593j)*(1+2.*(dim-1)/(o+1.)) + ((-1.53791966768-1.0279304018j))*dim
            arg[(1, 1, 0, 3)]=(-0.094533712483+0.842421710127j)*x[0]**o + ((0.930850425755-0.716524130922j))*x[0] + ((-0.571497873143+0.513364014401j))*x[1]**o + ((0.938181458801+0.690570307919j))*x[1] + ((0.590250096544+0.92115550348j))*x[2]**o + ((0.84164336221-0.595445540917j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.0757814890819+2.27694122801j)*(1+2.*(dim-1)/(o+1.)) + ((2.71067524677-0.62139936392j))*dim
            arg[(1, 1, 1, 0)]=(-0.9219043016-0.346493947321j)*x[0]**o + ((0.858382381968+0.280340988553j))*x[0] + ((-0.370958718458-0.692429721976j))*x[1]**o + ((-0.32874043241+0.740420903754j))*x[1] + ((-0.796970460422-0.0869294951269j))*x[2]**o + ((-0.924012051595-0.745772325952j))*x[2]
            ref[(1, 1, 1, 0)]=(-2.08983348048-1.12585316442j)*(1+2.*(dim-1)/(o+1.)) + ((-0.394370102036+0.274989566355j))*dim
            arg[(1, 1, 1, 1)]=(0.199850946162-0.109677544351j)*x[0]**o + ((0.196377642219-0.508117522674j))*x[0] + ((0.229124567734-0.863236171131j))*x[1]**o + ((-0.698073625939+0.407721185321j))*x[1] + ((-0.848396271896-0.417497777465j))*x[2]**o + ((0.719560536762+0.553928053521j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.419420758-1.39041149295j)*(1+2.*(dim-1)/(o+1.)) + ((0.217864553042+0.453531716169j))*dim
            arg[(1, 1, 1, 2)]=(0.505435385299+0.530704545563j)*x[0]**o + ((-0.728306533778+0.440705382491j))*x[0] + ((-0.718485110481-0.880026338065j))*x[1]**o + ((0.905832389727+0.768648843447j))*x[1] + ((-0.631139228763+0.504780236395j))*x[2]**o + ((-0.0350755768692-0.26074959505j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.844188953946+0.155458443893j)*(1+2.*(dim-1)/(o+1.)) + ((0.14245027908+0.948604630888j))*dim
            arg[(1, 1, 1, 3)]=(-0.352286074765+0.133391455925j)*x[0]**o + ((0.619622482034+0.311840169921j))*x[0] + ((0.264583201439-0.474692491664j))*x[1]**o + ((0.365809491711+0.885150835958j))*x[1] + ((0.126487082217+0.224088889445j))*x[2]**o + ((0.644050447157+0.178380185436j))*x[2]
            ref[(1, 1, 1, 3)]=(0.0387842088905-0.117212146293j)*(1+2.*(dim-1)/(o+1.)) + ((1.6294824209+1.37537119131j))*dim
            arg[(1, 1, 2, 0)]=(0.486148746144-0.040270238391j)*x[0]**o + ((-0.455863755814-0.978070115381j))*x[0] + ((-0.121085495111-0.560790135002j))*x[1]**o + ((0.580333508189-0.824480134601j))*x[1] + ((0.724537563709+0.839674810453j))*x[2]**o + ((-0.71144501198-0.967367918333j))*x[2]
            ref[(1, 1, 2, 0)]=(1.08960081474+0.23861443706j)*(1+2.*(dim-1)/(o+1.)) + ((-0.586975259605-2.76991816831j))*dim
            arg[(1, 1, 2, 1)]=(0.858881341122+0.759005209393j)*x[0]**o + ((0.139735380498-0.498507198663j))*x[0] + ((-0.736676796641+0.928221422944j))*x[1]**o + ((-0.553320844447-0.922842547813j))*x[1] + ((0.574092208423-0.470494843554j))*x[2]**o + ((0.129938829782-0.0597569075974j))*x[2]
            ref[(1, 1, 2, 1)]=(0.696296752905+1.21673178878j)*(1+2.*(dim-1)/(o+1.)) + ((-0.283646634167-1.48110665407j))*dim
            arg[(1, 1, 2, 2)]=(-0.770858098667+0.913092433884j)*x[0]**o + ((0.172343761231+0.914419215245j))*x[0] + ((-0.479012203791+0.756324339888j))*x[1]**o + ((0.750853967945+0.61629542077j))*x[1] + ((-0.838927138821-0.0682616899424j))*x[2]**o + ((-0.628750520263+0.971626853023j))*x[2]
            ref[(1, 1, 2, 2)]=(-2.08879744128+1.60115508383j)*(1+2.*(dim-1)/(o+1.)) + ((0.294447208913+2.50234148904j))*dim
            arg[(1, 1, 2, 3)]=(0.645232985573-0.59992572432j)*x[0]**o + ((0.203991300672-0.743023524641j))*x[0] + ((0.434204551787+0.760286807928j))*x[1]**o + ((-0.4349227528+0.579427565344j))*x[1] + ((-0.0249388663901+0.712556646882j))*x[2]**o + ((-0.405658280243-0.691284275594j))*x[2]
            ref[(1, 1, 2, 3)]=(1.05449867097+0.87291773049j)*(1+2.*(dim-1)/(o+1.)) + ((-0.63658973237-0.85488023489j))*dim
            arg[(1, 1, 3, 0)]=(0.332660961729-0.346854076557j)*x[0]**o + ((0.327090544674+0.599615781387j))*x[0] + ((-0.512670096817-0.0438754738971j))*x[1]**o + ((0.258113822605-0.368489777559j))*x[1] + ((-0.848414845632-0.973840215458j))*x[2]**o + ((-0.00969494359622+0.150549223522j))*x[2]
            ref[(1, 1, 3, 0)]=(-1.02842398072-1.36456976591j)*(1+2.*(dim-1)/(o+1.)) + ((0.575509423683+0.38167522735j))*dim
            arg[(1, 1, 3, 1)]=(0.0636000330657+0.481125739176j)*x[0]**o + ((-0.9505099279-0.974116431968j))*x[0] + ((-0.129299481414-0.300177391277j))*x[1]**o + ((-0.700552698865-0.180191946851j))*x[1] + ((-0.153850352274+0.668253862717j))*x[2]**o + ((0.332470839179+0.586512837096j))*x[2]
            ref[(1, 1, 3, 1)]=(-0.219549800622+0.849202210616j)*(1+2.*(dim-1)/(o+1.)) + ((-1.31859178759-0.567795541723j))*dim
            arg[(1, 1, 3, 2)]=(0.712825800823+0.375845569192j)*x[0]**o + ((0.184093484446+0.614915913983j))*x[0] + ((0.611337050376-0.0565896010583j))*x[1]**o + ((0.922998380534-0.238142449858j))*x[1] + ((-0.716189664884+0.911733718365j))*x[2]**o + ((-0.459476967584+0.706719023314j))*x[2]
            ref[(1, 1, 3, 2)]=(0.607973186315+1.2309896865j)*(1+2.*(dim-1)/(o+1.)) + ((0.647614897396+1.08349248744j))*dim
            arg[(1, 1, 3, 3)]=(-0.379052716218+0.799985720443j)*x[0]**o + ((-0.31049553174+0.995280002926j))*x[0] + ((-0.396029369637-0.785932332734j))*x[1]**o + ((-0.554816330321-0.443643733151j))*x[1] + ((0.794414230785-0.829010086952j))*x[2]**o + ((-0.615386155657-0.75278153547j))*x[2]
            ref[(1, 1, 3, 3)]=(0.0193321449305-0.814956699244j)*(1+2.*(dim-1)/(o+1.)) + ((-1.48069801772-0.201145265694j))*dim
            arg[(1, 2, 0, 0)]=(0.757008915987-0.0790976483542j)*x[0]**o + ((-0.928478855791-0.760745332526j))*x[0] + ((0.688176043337-0.185613009868j))*x[1]**o + ((0.37965131061+0.0262050644246j))*x[1] + ((0.937386004455+0.23040264917j))*x[2]**o + ((0.955781199174-0.559143352347j))*x[2]
            ref[(1, 2, 0, 0)]=(2.38257096378-0.0343080090528j)*(1+2.*(dim-1)/(o+1.)) + ((0.406953653994-1.29368362045j))*dim
            arg[(1, 2, 0, 1)]=(-0.631062070276+0.603919625459j)*x[0]**o + ((0.613503762743+0.834532318754j))*x[0] + ((-0.367756257698-0.0550321907441j))*x[1]**o + ((-0.656980934301-0.664256988874j))*x[1] + ((0.924318629517-0.913051070057j))*x[2]**o + ((0.929100696912-0.496639282642j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.0744996984567-0.364163635342j)*(1+2.*(dim-1)/(o+1.)) + ((0.885623525354-0.326363952762j))*dim
            arg[(1, 2, 0, 2)]=(-0.122608266009-0.769949219556j)*x[0]**o + ((-0.823740594496-0.740435112008j))*x[0] + ((-0.800365574484+0.550025583127j))*x[1]**o + ((-0.175101494756-0.0986656431422j))*x[1] + ((-0.975804190645-0.0524934093104j))*x[2]**o + ((0.705938705774+0.38489670821j))*x[2]
            ref[(1, 2, 0, 2)]=(-1.89877803114-0.27241704574j)*(1+2.*(dim-1)/(o+1.)) + ((-0.292903383477-0.45420404694j))*dim
            arg[(1, 2, 0, 3)]=(0.463332104961+0.671756462308j)*x[0]**o + ((-0.443035834875+0.813005594236j))*x[0] + ((0.101207077362+0.993291334711j))*x[1]**o + ((-0.627201258714+0.457068318589j))*x[1] + ((0.430859994853+0.653804529779j))*x[2]**o + ((-0.288888176037+0.289810183765j))*x[2]
            ref[(1, 2, 0, 3)]=(0.995399177176+2.3188523268j)*(1+2.*(dim-1)/(o+1.)) + ((-1.35912526963+1.55988409659j))*dim
            arg[(1, 2, 1, 0)]=(0.52261982772+0.875565665819j)*x[0]**o + ((-0.921767806401+0.686760424092j))*x[0] + ((0.0593371311977+0.328345114516j))*x[1]**o + ((-0.417749170565-0.897710801937j))*x[1] + ((-0.643643937072-0.454575129577j))*x[2]**o + ((-0.108654754585-0.768610275624j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.0616869781538+0.749335650759j)*(1+2.*(dim-1)/(o+1.)) + ((-1.44817173155-0.979560653469j))*dim
            arg[(1, 2, 1, 1)]=(-0.777466974077-0.306009586504j)*x[0]**o + ((-0.773637115589-0.223804334593j))*x[0] + ((0.310868864765-0.483500123227j))*x[1]**o + ((-0.383390908033+0.525132506936j))*x[1] + ((-0.851256212979+0.0475911375172j))*x[2]**o + ((-0.885896404983-0.476914667457j))*x[2]
            ref[(1, 2, 1, 1)]=(-1.31785432229-0.741918572214j)*(1+2.*(dim-1)/(o+1.)) + ((-2.0429244286-0.175586495114j))*dim
            arg[(1, 2, 1, 2)]=(-0.112441990594-0.494415220872j)*x[0]**o + ((0.274006015291+0.421939949946j))*x[0] + ((0.72492230822+0.574054422803j))*x[1]**o + ((-0.0115042260546+0.462616285851j))*x[1] + ((-0.257576449056+0.363334187426j))*x[2]**o + ((0.478557989577+0.599040032222j))*x[2]
            ref[(1, 2, 1, 2)]=(0.35490386857+0.442973389357j)*(1+2.*(dim-1)/(o+1.)) + ((0.741059778814+1.48359626802j))*dim
            arg[(1, 2, 1, 3)]=(0.677795389771+0.667099692768j)*x[0]**o + ((-0.160713005026-0.17595191975j))*x[0] + ((-0.16600972152-0.561792657308j))*x[1]**o + ((-0.895413401947+0.159479733431j))*x[1] + ((0.2520843228-0.73004447235j))*x[2]**o + ((-0.0601164868263-0.248245470377j))*x[2]
            ref[(1, 2, 1, 3)]=(0.763869991051-0.624737436891j)*(1+2.*(dim-1)/(o+1.)) + ((-1.1162428938-0.264717656696j))*dim
            arg[(1, 2, 2, 0)]=(-0.440344251722+0.14414763229j)*x[0]**o + ((-0.284714409274-0.858583265911j))*x[0] + ((-0.543117715106-0.275787049722j))*x[1]**o + ((-0.280825326331+0.116432632023j))*x[1] + ((-0.256971312088+0.507377977269j))*x[2]**o + ((0.487879555391+0.269343878607j))*x[2]
            ref[(1, 2, 2, 0)]=(-1.24043327891+0.375738559836j)*(1+2.*(dim-1)/(o+1.)) + ((-0.077660180213-0.472806755281j))*dim
            arg[(1, 2, 2, 1)]=(0.490557057984-0.010562105854j)*x[0]**o + ((-0.322148764431+0.756535620894j))*x[0] + ((-0.956924372428+0.351692490635j))*x[1]**o + ((-0.219243541625+0.421451566565j))*x[1] + ((0.112897958899+0.766222065911j))*x[2]**o + ((-0.547188268214-0.479477932786j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.353469355544+1.10735245069j)*(1+2.*(dim-1)/(o+1.)) + ((-1.08858057427+0.698509254673j))*dim
            arg[(1, 2, 2, 2)]=(-0.876826444321+0.270344717195j)*x[0]**o + ((-0.220129956247+0.755804673626j))*x[0] + ((0.548231468493+0.616356121141j))*x[1]**o + ((-0.209221814833+0.0300824390859j))*x[1] + ((-0.522467619988+0.458956115358j))*x[2]**o + ((0.953717553537-0.57836381093j))*x[2]
            ref[(1, 2, 2, 2)]=(-0.851062595815+1.34565695369j)*(1+2.*(dim-1)/(o+1.)) + ((0.524365782457+0.207523301782j))*dim
            arg[(1, 2, 2, 3)]=(0.197000040373-0.581843713183j)*x[0]**o + ((-0.158570640464-0.809472331151j))*x[0] + ((-0.62382520796+0.63530565144j))*x[1]**o + ((-0.434703243978+0.842067847544j))*x[1] + ((-0.124078312905+0.194652957858j))*x[2]**o + ((-0.29912215756-0.556805799418j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.550903480491+0.248114896114j)*(1+2.*(dim-1)/(o+1.)) + ((-0.892396042003-0.524210283025j))*dim
            arg[(1, 2, 3, 0)]=(0.231243185874-0.153628584324j)*x[0]**o + ((-0.464584828873-0.427307924515j))*x[0] + ((-0.923412714222+0.974667145597j))*x[1]**o + ((-0.308767150266-0.991346884266j))*x[1] + ((0.760066597378-0.390700645365j))*x[2]**o + ((0.598118808178+0.73003738355j))*x[2]
            ref[(1, 2, 3, 0)]=(0.0678970690292+0.430337915908j)*(1+2.*(dim-1)/(o+1.)) + ((-0.17523317096-0.68861742523j))*dim
            arg[(1, 2, 3, 1)]=(-0.750548981098+0.54955337705j)*x[0]**o + ((0.23341955383-0.753023890583j))*x[0] + ((0.621159481914-0.588627244132j))*x[1]**o + ((-0.623718361552+0.0705593746716j))*x[1] + ((0.406627173979+0.402484364491j))*x[2]**o + ((-0.908302873228+0.077359980872j))*x[2]
            ref[(1, 2, 3, 1)]=(0.277237674794+0.363410497409j)*(1+2.*(dim-1)/(o+1.)) + ((-1.29860168095-0.605104535039j))*dim
            arg[(1, 2, 3, 2)]=(-0.00596491592974-0.437047177929j)*x[0]**o + ((-0.24273904476-0.484414462948j))*x[0] + ((0.945149432257+0.686250246432j))*x[1]**o + ((-0.120579589758-0.0764403045486j))*x[1] + ((0.490699800188-0.126562311302j))*x[2]**o + ((-0.317724162525+0.618666996511j))*x[2]
            ref[(1, 2, 3, 2)]=(1.42988431652+0.122640757201j)*(1+2.*(dim-1)/(o+1.)) + ((-0.681042797043+0.057812229015j))*dim
            arg[(1, 2, 3, 3)]=(-0.917054338742+0.745403004572j)*x[0]**o + ((0.0867335710356+0.176068506004j))*x[0] + ((0.673100726228-0.64669228479j))*x[1]**o + ((0.177815331013+0.0617073245333j))*x[1] + ((0.323795120874-0.943679682038j))*x[2]**o + ((-0.506050844683-0.422402098932j))*x[2]
            ref[(1, 2, 3, 3)]=(0.0798415083601-0.844968962256j)*(1+2.*(dim-1)/(o+1.)) + ((-0.241501942634-0.184626268395j))*dim
            arg[(1, 3, 0, 0)]=(0.953658914252-0.0865443701165j)*x[0]**o + ((0.748964886793+0.501710421926j))*x[0] + ((0.191754966084-0.257674628524j))*x[1]**o + ((-0.0838527690458-0.0870894213738j))*x[1] + ((0.98434557409+0.964432603531j))*x[2]**o + ((0.476740013236+0.51634628996j))*x[2]
            ref[(1, 3, 0, 0)]=(2.12975945443+0.62021360489j)*(1+2.*(dim-1)/(o+1.)) + ((1.14185213098+0.930967290512j))*dim
            arg[(1, 3, 0, 1)]=(-0.779236587556+0.805126155753j)*x[0]**o + ((0.190338225505+0.460483572498j))*x[0] + ((-0.590299738033-0.238099677313j))*x[1]**o + ((-0.565746085228-0.615009102767j))*x[1] + ((-0.191436308038-0.113135721302j))*x[2]**o + ((0.729491727252+0.0812239361669j))*x[2]
            ref[(1, 3, 0, 1)]=(-1.56097263363+0.453890757139j)*(1+2.*(dim-1)/(o+1.)) + ((0.354083867528-0.0733015941016j))*dim
            arg[(1, 3, 0, 2)]=(-0.831974099797+0.650747721066j)*x[0]**o + ((-0.909016350424+0.784156079838j))*x[0] + ((-0.689165276884+0.473731350711j))*x[1]**o + ((-0.127306824978-0.333942408477j))*x[1] + ((0.998811258599+0.922919886541j))*x[2]**o + ((-0.289003578233-0.788609945287j))*x[2]
            ref[(1, 3, 0, 2)]=(-0.522328118083+2.04739895832j)*(1+2.*(dim-1)/(o+1.)) + ((-1.32532675364-0.338396273926j))*dim
            arg[(1, 3, 0, 3)]=(0.761272938818+0.0268972617597j)*x[0]**o + ((0.462028919868-0.464633453617j))*x[0] + ((0.354767683688-0.838726847946j))*x[1]**o + ((-0.822093846546-0.710118219991j))*x[1] + ((-0.0888119560914+0.124716741364j))*x[2]**o + ((0.0164053786477+0.588609310147j))*x[2]
            ref[(1, 3, 0, 3)]=(1.02722866642-0.687112844822j)*(1+2.*(dim-1)/(o+1.)) + ((-0.34365954803-0.586142363462j))*dim
            arg[(1, 3, 1, 0)]=(-0.26555594066-0.817633909497j)*x[0]**o + ((-0.00592838064417-0.419520835532j))*x[0] + ((-0.153069438643+0.789002689729j))*x[1]**o + ((-0.346047245136+0.181095881805j))*x[1] + ((0.815696292899-0.0960458342299j))*x[2]**o + ((0.984760312437-0.715860835423j))*x[2]
            ref[(1, 3, 1, 0)]=(0.397070913596-0.124677053997j)*(1+2.*(dim-1)/(o+1.)) + ((0.632784686657-0.95428578915j))*dim
            arg[(1, 3, 1, 1)]=(-0.016819453652-0.228819625546j)*x[0]**o + ((0.232525012982+0.318083570173j))*x[0] + ((0.623680429356-0.877562690143j))*x[1]**o + ((-0.116980534908-0.614825816174j))*x[1] + ((0.680489715606+0.413474755186j))*x[2]**o + ((-0.936372319931+0.150092667529j))*x[2]
            ref[(1, 3, 1, 1)]=(1.28735069131-0.692907560503j)*(1+2.*(dim-1)/(o+1.)) + ((-0.820827841857-0.146649578472j))*dim
            arg[(1, 3, 1, 2)]=(0.264397520499+0.590784577172j)*x[0]**o + ((-0.156764118617+0.821093579274j))*x[0] + ((-0.25299153014-0.115472824694j))*x[1]**o + ((0.841343714032+0.312947558421j))*x[1] + ((-0.308363495452-0.201214691219j))*x[2]**o + ((-0.480817887816-0.871909313398j))*x[2]
            ref[(1, 3, 1, 2)]=(-0.296957505093+0.274097061259j)*(1+2.*(dim-1)/(o+1.)) + ((0.203761707599+0.262131824297j))*dim
            arg[(1, 3, 1, 3)]=(-0.836181971088-0.545409694744j)*x[0]**o + ((0.787550469065-0.493569486092j))*x[0] + ((0.784164971811-0.179558453791j))*x[1]**o + ((0.711597226822-0.268923858076j))*x[1] + ((-0.662495250651+0.080339966441j))*x[2]**o + ((-0.441112637514+0.864429509898j))*x[2]
            ref[(1, 3, 1, 3)]=(-0.714512249928-0.644628182094j)*(1+2.*(dim-1)/(o+1.)) + ((1.05803505837+0.101936165729j))*dim
            arg[(1, 3, 2, 0)]=(-0.726049664748-0.551716311108j)*x[0]**o + ((-0.642360450293-0.120936249505j))*x[0] + ((-0.788697744492-0.905939993639j))*x[1]**o + ((-0.653233674715-0.583868615539j))*x[1] + ((-0.523330758324+0.017534118771j))*x[2]**o + ((-0.0990252121447+0.536642629584j))*x[2]
            ref[(1, 3, 2, 0)]=(-2.03807816756-1.44012218598j)*(1+2.*(dim-1)/(o+1.)) + ((-1.39461933715-0.16816223546j))*dim
            arg[(1, 3, 2, 1)]=(-0.88235847159+0.783296364583j)*x[0]**o + ((-0.869999376032+0.970535615709j))*x[0] + ((-0.0421079618138-0.739663828916j))*x[1]**o + ((0.30551153727+0.413023939994j))*x[1] + ((-0.170652494144-0.659344853168j))*x[2]**o + ((0.771999610877+0.344675169081j))*x[2]
            ref[(1, 3, 2, 1)]=(-1.09511892755-0.615712317501j)*(1+2.*(dim-1)/(o+1.)) + ((0.207511772115+1.72823472478j))*dim
            arg[(1, 3, 2, 2)]=(0.0412436035697-0.963920117416j)*x[0]**o + ((-0.940731535547+0.23955722958j))*x[0] + ((0.95433194159-0.198623527796j))*x[1]**o + ((-0.4115476061+0.433570156263j))*x[1] + ((-0.562822913894+0.513555001701j))*x[2]**o + ((-0.492917411119-0.59376545669j))*x[2]
            ref[(1, 3, 2, 2)]=(0.432752631266-0.64898864351j)*(1+2.*(dim-1)/(o+1.)) + ((-1.84519655277+0.0793619291534j))*dim
            arg[(1, 3, 2, 3)]=(-0.710932119813-0.309793911732j)*x[0]**o + ((-0.211296065088-0.451602914657j))*x[0] + ((-0.0191560652991+0.617950499176j))*x[1]**o + ((-0.478987829302-0.655835163647j))*x[1] + ((-0.0041528975477+0.438622162838j))*x[2]**o + ((-0.953356966159-0.824515264652j))*x[2]
            ref[(1, 3, 2, 3)]=(-0.73424108266+0.746778750282j)*(1+2.*(dim-1)/(o+1.)) + ((-1.64364086055-1.93195334296j))*dim
            arg[(1, 3, 3, 0)]=(-0.390728954892+0.768732031154j)*x[0]**o + ((-0.222416895841-0.260108399798j))*x[0] + ((-0.971455313521+0.351396630792j))*x[1]**o + ((-0.901559434485+0.486111632093j))*x[1] + ((0.872043622183-0.0746592301899j))*x[2]**o + ((-0.163566280059-0.510161843582j))*x[2]
            ref[(1, 3, 3, 0)]=(-0.490140646231+1.04546943176j)*(1+2.*(dim-1)/(o+1.)) + ((-1.28754261039-0.284158611286j))*dim
            arg[(1, 3, 3, 1)]=(0.253019954385+0.787135101552j)*x[0]**o + ((-0.753262763376+0.920408500052j))*x[0] + ((-0.691764648942+0.767454420152j))*x[1]**o + ((-0.578391507267-0.259250245656j))*x[1] + ((0.644208068085-0.685227369532j))*x[2]**o + ((0.42812356228+0.88303706541j))*x[2]
            ref[(1, 3, 3, 1)]=(0.205463373528+0.869362152172j)*(1+2.*(dim-1)/(o+1.)) + ((-0.903530708363+1.54419531981j))*dim
            arg[(1, 3, 3, 2)]=(-0.642595392054+0.512227507491j)*x[0]**o + ((-0.302469107166-0.822094856162j))*x[0] + ((0.427566775319+0.779538188035j))*x[1]**o + ((0.80602485506-0.793447704004j))*x[1] + ((-0.111222132615-0.379017615242j))*x[2]**o + ((-0.873074771116+0.754739010682j))*x[2]
            ref[(1, 3, 3, 2)]=(-0.32625074935+0.912748080283j)*(1+2.*(dim-1)/(o+1.)) + ((-0.369519023222-0.860803549484j))*dim
            arg[(1, 3, 3, 3)]=(0.74302965092+0.132246587237j)*x[0]**o + ((0.846612230421-0.254261096542j))*x[0] + ((0.234082217679-0.0555494032213j))*x[1]**o + ((-0.353684434044-0.751136529035j))*x[1] + ((-0.228435249555-0.0680613856526j))*x[2]**o + ((0.609246484298+0.0435886063821j))*x[2]
            ref[(1, 3, 3, 3)]=(0.748676619044+0.00863579836269j)*(1+2.*(dim-1)/(o+1.)) + ((1.10217428068-0.961809019195j))*dim
            arg[(2, 0, 0, 0)]=(0.56454827047+0.0238869666274j)*x[0]**o + ((0.0214420990922+0.54195213848j))*x[0] + ((-0.309205191788-0.333474962686j))*x[1]**o + ((-0.186828436332-0.232950255631j))*x[1] + ((0.780699697854+0.352579102292j))*x[2]**o + ((0.737999209122+0.420158751411j))*x[2]
            ref[(2, 0, 0, 0)]=(1.03604277654+0.0429911062332j)*(1+2.*(dim-1)/(o+1.)) + ((0.572612871882+0.72916063426j))*dim
            arg[(2, 0, 0, 1)]=(0.397165548418+0.815914075281j)*x[0]**o + ((-0.636580546068+0.841533851398j))*x[0] + ((-0.214827121146+0.532473812294j))*x[1]**o + ((-0.718044638818+0.850341280952j))*x[1] + ((0.878402172766+0.769030161142j))*x[2]**o + ((0.950976034744+0.801870831046j))*x[2]
            ref[(2, 0, 0, 1)]=(1.06074060004+2.11741804872j)*(1+2.*(dim-1)/(o+1.)) + ((-0.403649150141+2.4937459634j))*dim
            arg[(2, 0, 0, 2)]=(0.11083545397-0.501017300622j)*x[0]**o + ((-0.0153666020049+0.121113387977j))*x[0] + ((-0.457072282425-0.449060050018j))*x[1]**o + ((-0.143063089783-0.958634908492j))*x[1] + ((-0.944005663855+0.501506379572j))*x[2]**o + ((0.165679800044+0.594050110235j))*x[2]
            ref[(2, 0, 0, 2)]=(-1.29024249231-0.448570971068j)*(1+2.*(dim-1)/(o+1.)) + ((0.00725010825538-0.24347141028j))*dim
            arg[(2, 0, 0, 3)]=(-0.264070673939-0.0379773300223j)*x[0]**o + ((-0.0231650034231+0.283453540505j))*x[0] + ((-0.295285999609-0.517561177297j))*x[1]**o + ((-0.541717058594+0.214665865958j))*x[1] + ((-0.811702417132-0.361926029775j))*x[2]**o + ((0.389517657638-0.603620603613j))*x[2]
            ref[(2, 0, 0, 3)]=(-1.37105909068-0.917464537095j)*(1+2.*(dim-1)/(o+1.)) + ((-0.175364404379-0.10550119715j))*dim
            arg[(2, 0, 1, 0)]=(0.152199189529+0.717661274342j)*x[0]**o + ((0.623091819693+0.439840202795j))*x[0] + ((0.440385787642-0.996097900696j))*x[1]**o + ((-0.888847420802+0.0323923231468j))*x[1] + ((0.364098215475+0.744565942447j))*x[2]**o + ((0.46689020536-0.181247880366j))*x[2]
            ref[(2, 0, 1, 0)]=(0.956683192646+0.466129316092j)*(1+2.*(dim-1)/(o+1.)) + ((0.20113460425+0.290984645576j))*dim
            arg[(2, 0, 1, 1)]=(-0.0402279453948-0.423089212642j)*x[0]**o + ((-0.878528480802+0.0794614986284j))*x[0] + ((0.716204652732-0.248148282216j))*x[1]**o + ((-0.207542059312+0.763993995248j))*x[1] + ((0.660210214644-0.732301568178j))*x[2]**o + ((-0.586775850107-0.900459740992j))*x[2]
            ref[(2, 0, 1, 1)]=(1.33618692198-1.40353906304j)*(1+2.*(dim-1)/(o+1.)) + ((-1.67284639022-0.0570042471156j))*dim
            arg[(2, 0, 1, 2)]=(0.085295932348+0.895240514787j)*x[0]**o + ((0.190360765593-0.618558017132j))*x[0] + ((0.179533027872+0.479953827662j))*x[1]**o + ((-0.266378962997+0.788032729073j))*x[1] + ((0.0467229779931+0.0761421154255j))*x[2]**o + ((-0.544181418012+0.592535909839j))*x[2]
            ref[(2, 0, 1, 2)]=(0.311551938213+1.45133645787j)*(1+2.*(dim-1)/(o+1.)) + ((-0.620199615416+0.762010621781j))*dim
            arg[(2, 0, 1, 3)]=(-0.918181318741+0.386392645509j)*x[0]**o + ((0.142804328374+0.444231328068j))*x[0] + ((0.53023432584+0.658319059023j))*x[1]**o + ((-0.0375752985132+0.124313239037j))*x[1] + ((-0.443007620946-0.906473175276j))*x[2]**o + ((-0.865046907514-0.994854613376j))*x[2]
            ref[(2, 0, 1, 3)]=(-0.830954613848+0.138238529256j)*(1+2.*(dim-1)/(o+1.)) + ((-0.759817877653-0.426310046271j))*dim
            arg[(2, 0, 2, 0)]=(-0.63148475068-0.0616748425052j)*x[0]**o + ((-0.441489504529+0.519783507623j))*x[0] + ((0.11011284388-0.326106366997j))*x[1]**o + ((-0.610293592252+0.0820821825473j))*x[1] + ((-0.419834854382+0.187718542131j))*x[2]**o + ((0.462465199379+0.888448551982j))*x[2]
            ref[(2, 0, 2, 0)]=(-0.941206761182-0.200062667371j)*(1+2.*(dim-1)/(o+1.)) + ((-0.589317897402+1.49031424215j))*dim
            arg[(2, 0, 2, 1)]=(0.902910854172-0.0942043580108j)*x[0]**o + ((0.11947020612-0.434986424728j))*x[0] + ((-0.986360888207-0.299659907906j))*x[1]**o + ((-0.982016947738+0.18510797328j))*x[1] + ((-0.503658527156+0.526049685247j))*x[2]**o + ((0.36681228364-0.779910962327j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.587108561191+0.13218541933j)*(1+2.*(dim-1)/(o+1.)) + ((-0.495734457978-1.02978941377j))*dim
            arg[(2, 0, 2, 2)]=(-0.457738082329+0.619319550101j)*x[0]**o + ((0.376025174185+0.823050475096j))*x[0] + ((0.518450594866-0.721162880068j))*x[1]**o + ((-0.474963388102-0.120561808311j))*x[1] + ((0.206221725123+0.945374471362j))*x[2]**o + ((-0.747233154294-0.445335262389j))*x[2]
            ref[(2, 0, 2, 2)]=(0.26693423766+0.843531141396j)*(1+2.*(dim-1)/(o+1.)) + ((-0.846171368211+0.257153404396j))*dim
            arg[(2, 0, 2, 3)]=(0.554316516401+0.498442675888j)*x[0]**o + ((-0.616373654048+0.910506021915j))*x[0] + ((0.240333607232+0.883822964264j))*x[1]**o + ((-0.292748623932+0.969024518896j))*x[1] + ((-0.819479663548+0.105731178201j))*x[2]**o + ((0.563724852334+0.342537834388j))*x[2]
            ref[(2, 0, 2, 3)]=(-0.0248295399149+1.48799681835j)*(1+2.*(dim-1)/(o+1.)) + ((-0.345397425646+2.2220683752j))*dim
            arg[(2, 0, 3, 0)]=(0.252810866708+0.453032952376j)*x[0]**o + ((0.063099063929+0.809479700449j))*x[0] + ((0.800866967181-0.128570797697j))*x[1]**o + ((-0.173764378312+0.851975413j))*x[1] + ((-0.782087124186+0.0915963348068j))*x[2]**o + ((0.456606038618-0.873300172868j))*x[2]
            ref[(2, 0, 3, 0)]=(0.271590709703+0.416058489486j)*(1+2.*(dim-1)/(o+1.)) + ((0.345940724235+0.788154940581j))*dim
            arg[(2, 0, 3, 1)]=(-0.148558227703-0.206377931927j)*x[0]**o + ((-0.0811519504017-0.986996698606j))*x[0] + ((0.315234064274-0.169646264277j))*x[1]**o + ((0.833188103908-0.500830302516j))*x[1] + ((-0.00746235147902-0.700012625479j))*x[2]**o + ((-0.543110609377+0.623676346108j))*x[2]
            ref[(2, 0, 3, 1)]=(0.159213485092-1.07603682168j)*(1+2.*(dim-1)/(o+1.)) + ((0.208925544129-0.864150655014j))*dim
            arg[(2, 0, 3, 2)]=(-0.182297654439+0.480527978699j)*x[0]**o + ((-0.0444155291287-0.241511486536j))*x[0] + ((-0.0891122769144+0.615862910917j))*x[1]**o + ((0.0241242493435+0.435617053477j))*x[1] + ((0.0442838984891-0.269974256461j))*x[2]**o + ((-0.246985853335+0.491753016388j))*x[2]
            ref[(2, 0, 3, 2)]=(-0.227126032865+0.826416633154j)*(1+2.*(dim-1)/(o+1.)) + ((-0.26727713312+0.685858583329j))*dim
            arg[(2, 0, 3, 3)]=(0.87673094913-0.285399357342j)*x[0]**o + ((-0.422365858031+0.799560156398j))*x[0] + ((-0.440796458734-0.319048573387j))*x[1]**o + ((-0.518860344548-0.137416649147j))*x[1] + ((0.341055213283-0.675239480831j))*x[2]**o + ((0.762634586755+0.501688932196j))*x[2]
            ref[(2, 0, 3, 3)]=(0.776989703678-1.27968741156j)*(1+2.*(dim-1)/(o+1.)) + ((-0.178591615824+1.16383243945j))*dim
            arg[(2, 1, 0, 0)]=(-0.295167106757-0.65814053422j)*x[0]**o + ((-0.174931153256+0.165057310009j))*x[0] + ((-0.260891337084-0.381265365112j))*x[1]**o + ((-0.397509024896+0.0990289442889j))*x[1] + ((-0.162989763667+0.99146460696j))*x[2]**o + ((-0.831817795299+0.322106476449j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.719048207508-0.047941292373j)*(1+2.*(dim-1)/(o+1.)) + ((-1.40425797345+0.586192730747j))*dim
            arg[(2, 1, 0, 1)]=(-0.653381876232+0.348806100866j)*x[0]**o + ((-0.715420035068+0.584773973207j))*x[0] + ((-0.3900778198-0.230531727358j))*x[1]**o + ((-0.273144181751-0.465001307045j))*x[1] + ((0.73107665416-0.545956995818j))*x[2]**o + ((0.8548711777-0.567937949098j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.312383041871-0.42768262231j)*(1+2.*(dim-1)/(o+1.)) + ((-0.133693039119-0.448165282936j))*dim
            arg[(2, 1, 0, 2)]=(-0.736498749279-0.451165801537j)*x[0]**o + ((-0.0441131858062+0.605159998714j))*x[0] + ((0.32868207677-0.742797767964j))*x[1]**o + ((-0.701266000427-0.977873005446j))*x[1] + ((0.890190410499-0.00979303260457j))*x[2]**o + ((0.345138001399-0.0220877709231j))*x[2]
            ref[(2, 1, 0, 2)]=(0.48237373799-1.20375660211j)*(1+2.*(dim-1)/(o+1.)) + ((-0.400241184834-0.394800777656j))*dim
            arg[(2, 1, 0, 3)]=(-0.423533035046-0.285933061169j)*x[0]**o + ((-0.825092397115-0.833318820767j))*x[0] + ((0.748205168138-0.983470420545j))*x[1]**o + ((0.12737273474-0.0221826723077j))*x[1] + ((0.241453298471+0.473777873379j))*x[2]**o + ((0.0489264192207-0.595304800065j))*x[2]
            ref[(2, 1, 0, 3)]=(0.566125431563-0.795625608335j)*(1+2.*(dim-1)/(o+1.)) + ((-0.648793243154-1.45080629314j))*dim
            arg[(2, 1, 1, 0)]=(0.6713598297-0.164660910308j)*x[0]**o + ((-0.362923492943+0.031576131871j))*x[0] + ((-0.983807804142+0.793058827267j))*x[1]**o + ((-0.704628643579-0.351011611609j))*x[1] + ((0.822148249699-0.556352336692j))*x[2]**o + ((0.601863008908+0.0528429829899j))*x[2]
            ref[(2, 1, 1, 0)]=(0.509700275257+0.0720455802673j)*(1+2.*(dim-1)/(o+1.)) + ((-0.465689127614-0.266592496748j))*dim
            arg[(2, 1, 1, 1)]=(-0.207535218825+0.812838394282j)*x[0]**o + ((-0.824136450797+0.74730755988j))*x[0] + ((-0.758436222787+0.682448000481j))*x[1]**o + ((0.0410120308761-0.244450391808j))*x[1] + ((0.862610664969-0.743952091524j))*x[2]**o + ((0.934458523736-0.968040871703j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.103360776642+0.751334303239j)*(1+2.*(dim-1)/(o+1.)) + ((0.151334103816-0.465183703631j))*dim
            arg[(2, 1, 1, 2)]=(-0.503506853444+0.159947035836j)*x[0]**o + ((0.881750586041+0.884235308375j))*x[0] + ((0.827262298569+0.353462179387j))*x[1]**o + ((0.220727561253+0.927779022177j))*x[1] + ((-0.799802664828-0.829169474217j))*x[2]**o + ((-0.137188744721-0.395724824082j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.476047219703-0.315760258993j)*(1+2.*(dim-1)/(o+1.)) + ((0.965289402573+1.41628950647j))*dim
            arg[(2, 1, 1, 3)]=(0.971550961526+0.96425115777j)*x[0]**o + ((0.505936037239-0.160578651393j))*x[0] + ((0.463849809807-0.430554860561j))*x[1]**o + ((0.956297662163+0.227587444562j))*x[1] + ((0.21532026307+0.661046027863j))*x[2]**o + ((0.188301840441+0.10123439902j))*x[2]
            ref[(2, 1, 1, 3)]=(1.6507210344+1.19474232507j)*(1+2.*(dim-1)/(o+1.)) + ((1.65053553984+0.168243192189j))*dim
            arg[(2, 1, 2, 0)]=(0.572508754288-0.486601358601j)*x[0]**o + ((-0.42448206818-0.0668523204287j))*x[0] + ((0.202784968239+0.0669602086886j))*x[1]**o + ((-0.547049403179+0.151981351289j))*x[1] + ((-0.313182398957+0.156853143864j))*x[2]**o + ((0.130036630235-0.68963085956j))*x[2]
            ref[(2, 1, 2, 0)]=(0.46211132357-0.262788006048j)*(1+2.*(dim-1)/(o+1.)) + ((-0.841494841124-0.604501828699j))*dim
            arg[(2, 1, 2, 1)]=(0.323548678408+0.345618204048j)*x[0]**o + ((0.289455888101+0.296199008736j))*x[0] + ((0.958362325798-0.577284045607j))*x[1]**o + ((-0.701229134942+0.303629909842j))*x[1] + ((0.0160619261552+0.22917982406j))*x[2]**o + ((0.127356878486-0.137630141677j))*x[2]
            ref[(2, 1, 2, 1)]=(1.29797293036-0.00248601749984j)*(1+2.*(dim-1)/(o+1.)) + ((-0.284416368356+0.462198776901j))*dim
            arg[(2, 1, 2, 2)]=(0.958359429875-0.121461583366j)*x[0]**o + ((0.21516672353+0.316655314495j))*x[0] + ((0.755185539204+0.119561932428j))*x[1]**o + ((0.191016946909+0.94400068775j))*x[1] + ((0.775054888231-0.569606082883j))*x[2]**o + ((0.0739725456742-0.173799833596j))*x[2]
            ref[(2, 1, 2, 2)]=(2.48859985731-0.571505733821j)*(1+2.*(dim-1)/(o+1.)) + ((0.480156216114+1.08685616865j))*dim
            arg[(2, 1, 2, 3)]=(-0.561899413448+0.919109336001j)*x[0]**o + ((0.326311617335-0.979932692905j))*x[0] + ((-0.96886790871+0.683711168071j))*x[1]**o + ((0.593242494224-0.0579575100329j))*x[1] + ((-0.0641051697955-0.0704218997573j))*x[2]**o + ((-0.87627307102-0.39317282166j))*x[2]
            ref[(2, 1, 2, 3)]=(-1.59487249195+1.53239860431j)*(1+2.*(dim-1)/(o+1.)) + ((0.043281040539-1.4310630246j))*dim
            arg[(2, 1, 3, 0)]=(0.562644478584-0.295487689744j)*x[0]**o + ((0.363258530697-0.643863305768j))*x[0] + ((0.793902177846-0.416308515808j))*x[1]**o + ((0.65102680449+0.447281854812j))*x[1] + ((0.840232284536+0.806404304318j))*x[2]**o + ((0.442363848197-0.651192684108j))*x[2]
            ref[(2, 1, 3, 0)]=(2.19677894097+0.0946080987661j)*(1+2.*(dim-1)/(o+1.)) + ((1.45664918338-0.847774135064j))*dim
            arg[(2, 1, 3, 1)]=(0.463811997789+0.888059386503j)*x[0]**o + ((0.44933072167+0.534992373655j))*x[0] + ((-0.194947806385-0.231960313167j))*x[1]**o + ((0.37616796683+0.0485508182552j))*x[1] + ((0.35141549915-0.758155061037j))*x[2]**o + ((0.601729117295+0.180184294797j))*x[2]
            ref[(2, 1, 3, 1)]=(0.620279690553-0.102055987701j)*(1+2.*(dim-1)/(o+1.)) + ((1.4272278058+0.763727486707j))*dim
            arg[(2, 1, 3, 2)]=(0.292404727071-0.328733171051j)*x[0]**o + ((0.130481957419-0.260440393849j))*x[0] + ((0.657406462533+0.389740470012j))*x[1]**o + ((-0.80623851037-0.559875701405j))*x[1] + ((-0.614853694352+0.420377103792j))*x[2]**o + ((0.960329794034-0.239657109939j))*x[2]
            ref[(2, 1, 3, 2)]=(0.334957495253+0.481384402754j)*(1+2.*(dim-1)/(o+1.)) + ((0.284573241083-1.05997320519j))*dim
            arg[(2, 1, 3, 3)]=(0.215948937187+0.594156669932j)*x[0]**o + ((-0.381380349769-0.778117939285j))*x[0] + ((-0.953528547025+0.600778617177j))*x[1]**o + ((0.721410044229+0.309661004026j))*x[1] + ((-0.046369773839-0.622667682417j))*x[2]**o + ((-0.551261354247-0.424863354119j))*x[2]
            ref[(2, 1, 3, 3)]=(-0.783949383677+0.572267604692j)*(1+2.*(dim-1)/(o+1.)) + ((-0.211231659786-0.893320289378j))*dim
            arg[(2, 2, 0, 0)]=(-0.420148807372-0.690580159612j)*x[0]**o + ((-0.00979798006523+0.115737174783j))*x[0] + ((-0.706734418838+0.722873731108j))*x[1]**o + ((0.139621059205-0.146696003616j))*x[1] + ((-0.0127463209718+0.177199682614j))*x[2]**o + ((0.303195166747-0.482606692538j))*x[2]
            ref[(2, 2, 0, 0)]=(-1.13962954718+0.209493254111j)*(1+2.*(dim-1)/(o+1.)) + ((0.433018245887-0.513565521371j))*dim
            arg[(2, 2, 0, 1)]=(0.402887969701-0.335491164603j)*x[0]**o + ((-0.704220829904-0.00482940988049j))*x[0] + ((0.747235359409-0.334533204705j))*x[1]**o + ((-0.54930926327-0.992534095903j))*x[1] + ((0.708998735495-0.947059842544j))*x[2]**o + ((0.810659447502+0.345338915831j))*x[2]
            ref[(2, 2, 0, 1)]=(1.85912206461-1.61708421185j)*(1+2.*(dim-1)/(o+1.)) + ((-0.442870645672-0.652024589952j))*dim
            arg[(2, 2, 0, 2)]=(0.117145015587-0.823834594378j)*x[0]**o + ((-0.159015458041-0.185912810958j))*x[0] + ((-0.0332908043763+0.677541214561j))*x[1]**o + ((0.858979591469+0.705867951j))*x[1] + ((0.0594212115086+0.711975017627j))*x[2]**o + ((-0.999032178252-0.545056967594j))*x[2]
            ref[(2, 2, 0, 2)]=(0.143275422719+0.56568163781j)*(1+2.*(dim-1)/(o+1.)) + ((-0.299068044824-0.0251018275519j))*dim
            arg[(2, 2, 0, 3)]=(-0.342253632962+0.0559073738759j)*x[0]**o + ((0.29520771412-0.0757204569997j))*x[0] + ((-0.157777615634-0.141880054637j))*x[1]**o + ((0.239345651992-0.408672004829j))*x[1] + ((0.790571307706+0.931365718723j))*x[2]**o + ((0.152814547328+0.626719187904j))*x[2]
            ref[(2, 2, 0, 3)]=(0.290540059111+0.845393037962j)*(1+2.*(dim-1)/(o+1.)) + ((0.68736791344+0.142326726076j))*dim
            arg[(2, 2, 1, 0)]=(-0.682722269862-0.0491940671065j)*x[0]**o + ((0.982997810263-0.852241691366j))*x[0] + ((0.0824707809229-0.264805230256j))*x[1]**o + ((-0.542113730251+0.0514111841357j))*x[1] + ((-0.951272413459+0.326043504656j))*x[2]**o + ((0.336723351989+0.655202119175j))*x[2]
            ref[(2, 2, 1, 0)]=(-1.5515239024+0.012044207293j)*(1+2.*(dim-1)/(o+1.)) + ((0.777607432001-0.145628388056j))*dim
            arg[(2, 2, 1, 1)]=(0.4934174926-0.795114704167j)*x[0]**o + ((0.339926443717+0.157174639918j))*x[0] + ((0.156016480293+0.0757573533636j))*x[1]**o + ((0.956625352961+0.0557788054186j))*x[1] + ((-0.833164034724+0.620598455537j))*x[2]**o + ((-0.316601331999+0.564681614993j))*x[2]
            ref[(2, 2, 1, 1)]=(-0.183730061831-0.0987588952659j)*(1+2.*(dim-1)/(o+1.)) + ((0.979950464679+0.777635060329j))*dim
            arg[(2, 2, 1, 2)]=(-0.0219966719336+0.345463622546j)*x[0]**o + ((-0.389034992205+0.738280095466j))*x[0] + ((-0.244667668167-0.175327621713j))*x[1]**o + ((0.0853475944166-0.805158264177j))*x[1] + ((-0.352304935314-0.104288129743j))*x[2]**o + ((-0.815315667427-0.524040611299j))*x[2]
            ref[(2, 2, 1, 2)]=(-0.618969275414+0.0658478710897j)*(1+2.*(dim-1)/(o+1.)) + ((-1.11900306521-0.59091878001j))*dim
            arg[(2, 2, 1, 3)]=(-0.291003833894-0.81355059759j)*x[0]**o + ((-0.260797088805-0.0072159598409j))*x[0] + ((0.51296612083+0.226531589455j))*x[1]**o + ((-0.612254762137-0.411973370136j))*x[1] + ((0.115278769087+0.929297530695j))*x[2]**o + ((0.878293205612-0.244029335647j))*x[2]
            ref[(2, 2, 1, 3)]=(0.337241056023+0.34227852256j)*(1+2.*(dim-1)/(o+1.)) + ((0.00524135467066-0.663218665624j))*dim
            arg[(2, 2, 2, 0)]=(0.102757755496+0.404005375024j)*x[0]**o + ((0.925309943063-0.0618861207996j))*x[0] + ((0.514836225256-0.11467036874j))*x[1]**o + ((-0.446562829446-0.391934732156j))*x[1] + ((-0.773414271453-0.746619682964j))*x[2]**o + ((0.196136381027-0.789208638254j))*x[2]
            ref[(2, 2, 2, 0)]=(-0.155820290701-0.45728467668j)*(1+2.*(dim-1)/(o+1.)) + ((0.674883494644-1.24302949121j))*dim
            arg[(2, 2, 2, 1)]=(-0.11130257058+0.335951132183j)*x[0]**o + ((-0.445631603229-0.460236587797j))*x[0] + ((0.585789574881-0.833515921685j))*x[1]**o + ((-0.476750188367+0.982634588769j))*x[1] + ((0.696871080443-0.711885527113j))*x[2]**o + ((0.667047398626+0.920867812979j))*x[2]
            ref[(2, 2, 2, 1)]=(1.17135808474-1.20945031662j)*(1+2.*(dim-1)/(o+1.)) + ((-0.25533439297+1.44326581395j))*dim
            arg[(2, 2, 2, 2)]=(-0.273305689222+0.494568873701j)*x[0]**o + ((0.694439208472-0.689340511042j))*x[0] + ((0.411603251643+0.176839134873j))*x[1]**o + ((0.482274133934+0.908942593443j))*x[1] + ((-0.663265038405-0.110890812697j))*x[2]**o + ((-0.0632135541144-0.273132935656j))*x[2]
            ref[(2, 2, 2, 2)]=(-0.524967475985+0.560517195876j)*(1+2.*(dim-1)/(o+1.)) + ((1.11349978829-0.0535308532546j))*dim
            arg[(2, 2, 2, 3)]=(-0.194197092591-0.0286459173779j)*x[0]**o + ((0.274206568054+0.0292415980102j))*x[0] + ((-0.99557201284-0.615830319212j))*x[1]**o + ((0.719875863106-0.979584651545j))*x[1] + ((0.187941607329+0.568114873314j))*x[2]**o + ((0.762000250257+0.439138483685j))*x[2]
            ref[(2, 2, 2, 3)]=(-1.0018274981-0.0763613632759j)*(1+2.*(dim-1)/(o+1.)) + ((1.75608268142-0.511204569849j))*dim
            arg[(2, 2, 3, 0)]=(-0.376644975903-0.0426826980287j)*x[0]**o + ((-0.472865917752+0.0250140092671j))*x[0] + ((0.677655684321-0.934581591225j))*x[1]**o + ((-0.641623656133-0.358697096566j))*x[1] + ((-0.137190099677+0.337195532225j))*x[2]**o + ((-0.284751642842+0.808112103371j))*x[2]
            ref[(2, 2, 3, 0)]=(0.163820608742-0.640068757029j)*(1+2.*(dim-1)/(o+1.)) + ((-1.39924121673+0.474429016072j))*dim
            arg[(2, 2, 3, 1)]=(-0.383842626446-0.966978787767j)*x[0]**o + ((-0.765696114969+0.849743344917j))*x[0] + ((-0.301816318712-0.0211408146288j))*x[1]**o + ((0.0762936080378+0.460590725949j))*x[1] + ((0.900731469138+0.356593683269j))*x[2]**o + ((0.27948935538+0.255878140576j))*x[2]
            ref[(2, 2, 3, 1)]=(0.215072523981-0.631525919127j)*(1+2.*(dim-1)/(o+1.)) + ((-0.409913151551+1.56621221144j))*dim
            arg[(2, 2, 3, 2)]=(-0.836662919575-0.256449074149j)*x[0]**o + ((0.959221322781+0.902722262178j))*x[0] + ((0.79448421051+0.042489026402j))*x[1]**o + ((-0.943569782291+0.847880441841j))*x[1] + ((-0.900309097785+0.0720564075009j))*x[2]**o + ((-0.897659022225+0.213392546198j))*x[2]
            ref[(2, 2, 3, 2)]=(-0.94248780685-0.141903640246j)*(1+2.*(dim-1)/(o+1.)) + ((-0.882007481735+1.96399525022j))*dim
            arg[(2, 2, 3, 3)]=(0.92827330648+0.304458898745j)*x[0]**o + ((0.602460995734-0.360306687557j))*x[0] + ((-0.112260781087-0.00648457145552j))*x[1]**o + ((-0.843733573692+0.0343952549894j))*x[1] + ((0.398589393292+0.177953787426j))*x[2]**o + ((-0.422708350031+0.872986563997j))*x[2]
            ref[(2, 2, 3, 3)]=(1.21460191868+0.475928114716j)*(1+2.*(dim-1)/(o+1.)) + ((-0.663980927989+0.54707513143j))*dim
            arg[(2, 3, 0, 0)]=(-0.958420872444-0.581653185494j)*x[0]**o + ((-0.708047268528+0.995631599606j))*x[0] + ((0.538988857697-0.417309558223j))*x[1]**o + ((0.790407948759+0.0301044881291j))*x[1] + ((-0.350891617413+0.875295613081j))*x[2]**o + ((-0.349222385537+0.531926361477j))*x[2]
            ref[(2, 3, 0, 0)]=(-0.77032363216-0.123667130636j)*(1+2.*(dim-1)/(o+1.)) + ((-0.266861705307+1.55766244921j))*dim
            arg[(2, 3, 0, 1)]=(-0.675362962105+0.764583815885j)*x[0]**o + ((-0.2439792593+0.0978296650656j))*x[0] + ((0.654112686593-0.503252094945j))*x[1]**o + ((-0.0751943829001+0.0839465371618j))*x[1] + ((0.0655965736077-0.0933149698563j))*x[2]**o + ((-0.259073846562-0.440006861537j))*x[2]
            ref[(2, 3, 0, 1)]=(0.0443462980959+0.168016751084j)*(1+2.*(dim-1)/(o+1.)) + ((-0.578247488762-0.258230659309j))*dim
            arg[(2, 3, 0, 2)]=(0.476570083073-0.640425402819j)*x[0]**o + ((0.95458053893+0.852160523105j))*x[0] + ((-0.59071036013-0.00454083484094j))*x[1]**o + ((0.311528655031-0.887434683449j))*x[1] + ((-0.17603481565+0.0608586895366j))*x[2]**o + ((0.487608130074+0.905695652187j))*x[2]
            ref[(2, 3, 0, 2)]=(-0.290175092708-0.584107548123j)*(1+2.*(dim-1)/(o+1.)) + ((1.75371732403+0.870421491843j))*dim
            arg[(2, 3, 0, 3)]=(0.399939589633+0.615332986415j)*x[0]**o + ((0.985060442469-0.868014406976j))*x[0] + ((0.927818869495+0.692638191823j))*x[1]**o + ((0.054185797929+0.0212866844588j))*x[1] + ((-0.930514782934+0.431995696732j))*x[2]**o + ((0.310268392515+0.820665391996j))*x[2]
            ref[(2, 3, 0, 3)]=(0.397243676194+1.73996687497j)*(1+2.*(dim-1)/(o+1.)) + ((1.34951463291-0.0260623305206j))*dim
            arg[(2, 3, 1, 0)]=(-0.65057334769-0.013414846452j)*x[0]**o + ((0.705227208121+0.805192448011j))*x[0] + ((0.0391338680605+0.660950225667j))*x[1]**o + ((0.728489628648+0.00982889812216j))*x[1] + ((-0.736543777012+0.434909125556j))*x[2]**o + ((-0.435179521758-0.335191611998j))*x[2]
            ref[(2, 3, 1, 0)]=(-1.34798325664+1.08244450477j)*(1+2.*(dim-1)/(o+1.)) + ((0.998537315011+0.479829734135j))*dim
            arg[(2, 3, 1, 1)]=(-0.994508304548+0.401709938351j)*x[0]**o + ((-0.169814899471-0.437932953084j))*x[0] + ((0.653891774655+0.53884318731j))*x[1]**o + ((-0.970779533836-0.296990557223j))*x[1] + ((0.989070790989-0.347235891965j))*x[2]**o + ((-0.0408206459601+0.630480882494j))*x[2]
            ref[(2, 3, 1, 1)]=(0.648454261096+0.593317233697j)*(1+2.*(dim-1)/(o+1.)) + ((-1.18141507927-0.104442627814j))*dim
            arg[(2, 3, 1, 2)]=(0.4652105044+0.250864366636j)*x[0]**o + ((0.0117977793568-0.649281884908j))*x[0] + ((-0.21447514985-0.76270246657j))*x[1]**o + ((0.380922905485-0.034867537749j))*x[1] + ((-0.543766722731+0.521652505657j))*x[2]**o + ((0.964080706138+0.94016636492j))*x[2]
            ref[(2, 3, 1, 2)]=(-0.293031368182+0.00981440572358j)*(1+2.*(dim-1)/(o+1.)) + ((1.35680139098+0.256016942263j))*dim
            arg[(2, 3, 1, 3)]=(0.836139140509+0.790868219753j)*x[0]**o + ((-0.337082133996-0.130690994175j))*x[0] + ((-0.562700963347-0.416975224081j))*x[1]**o + ((-0.296408426069+0.378807585689j))*x[1] + ((0.648830405914+0.244338982333j))*x[2]**o + ((0.214365821771+0.565705630335j))*x[2]
            ref[(2, 3, 1, 3)]=(0.922268583076+0.618231978005j)*(1+2.*(dim-1)/(o+1.)) + ((-0.419124738294+0.813822221849j))*dim
            arg[(2, 3, 2, 0)]=(-0.871845145572-0.40012742174j)*x[0]**o + ((-0.353247944304-0.510146863193j))*x[0] + ((-0.231090067805+0.0702274854969j))*x[1]**o + ((-0.503154084904-0.417373627165j))*x[1] + ((0.763485350603+0.539335246867j))*x[2]**o + ((0.676142092659-0.192922448487j))*x[2]
            ref[(2, 3, 2, 0)]=(-0.339449862774+0.209435310624j)*(1+2.*(dim-1)/(o+1.)) + ((-0.180259936549-1.12044293884j))*dim
            arg[(2, 3, 2, 1)]=(-0.262915725881+0.896846961229j)*x[0]**o + ((0.838785166425-0.253139778906j))*x[0] + ((0.896890296558-0.966620219553j))*x[1]**o + ((-0.141411559065+0.789151296507j))*x[1] + ((-0.991485244947+0.893498253148j))*x[2]**o + ((0.352956770249+0.0278449265594j))*x[2]
            ref[(2, 3, 2, 1)]=(-0.35751067427+0.823724994824j)*(1+2.*(dim-1)/(o+1.)) + ((1.05033037761+0.56385644416j))*dim
            arg[(2, 3, 2, 2)]=(-0.0974188797256+0.00598793338102j)*x[0]**o + ((-0.270202353365-0.928091207976j))*x[0] + ((0.947751354476-0.456973161684j))*x[1]**o + ((-0.466661347604+0.436317296209j))*x[1] + ((0.525306676271-0.357494567016j))*x[2]**o + ((-0.830722405037-0.510603491906j))*x[2]
            ref[(2, 3, 2, 2)]=(1.37563915102-0.808479795319j)*(1+2.*(dim-1)/(o+1.)) + ((-1.56758610601-1.00237740367j))*dim
            arg[(2, 3, 2, 3)]=(0.87627118841-0.667962578449j)*x[0]**o + ((0.767417946293-0.361847889521j))*x[0] + ((0.254537590021-0.546160595667j))*x[1]**o + ((0.262197302243-0.0331295906513j))*x[1] + ((-0.978464808025-0.200824914265j))*x[2]**o + ((0.924298590387-0.86856458687j))*x[2]
            ref[(2, 3, 2, 3)]=(0.152343970406-1.41494808838j)*(1+2.*(dim-1)/(o+1.)) + ((1.95391383892-1.26354206704j))*dim
            arg[(2, 3, 3, 0)]=(0.335866591254+0.551427045322j)*x[0]**o + ((-0.0755108635926+0.269833134474j))*x[0] + ((0.424886917873-0.0198979687631j))*x[1]**o + ((0.521311626002+0.774580808335j))*x[1] + ((0.601265308985-0.71502281095j))*x[2]**o + ((0.30892453791-0.705584473621j))*x[2]
            ref[(2, 3, 3, 0)]=(1.36201881811-0.183493734392j)*(1+2.*(dim-1)/(o+1.)) + ((0.754725300319+0.338829469188j))*dim
            arg[(2, 3, 3, 1)]=(0.196932920132+0.358674090363j)*x[0]**o + ((-0.582536393688+0.0224948722618j))*x[0] + ((0.487946353019-0.363120602598j))*x[1]**o + ((0.614413415416+0.652269999639j))*x[1] + ((0.736086799978-0.413781558212j))*x[2]**o + ((0.0961803208309-0.431771011631j))*x[2]
            ref[(2, 3, 3, 1)]=(1.42096607313-0.418228070447j)*(1+2.*(dim-1)/(o+1.)) + ((0.128057342559+0.24299386027j))*dim
            arg[(2, 3, 3, 2)]=(-0.558648955105+0.944186716311j)*x[0]**o + ((-0.706566928348+0.920756699022j))*x[0] + ((-0.0525627588803+0.810225136521j))*x[1]**o + ((0.105083222962-0.609801023894j))*x[1] + ((-0.659116560632-0.381454985591j))*x[2]**o + ((-0.703839348107+0.627510871505j))*x[2]
            ref[(2, 3, 3, 2)]=(-1.27032827462+1.37295686724j)*(1+2.*(dim-1)/(o+1.)) + ((-1.30532305349+0.938466546634j))*dim
            arg[(2, 3, 3, 3)]=(-0.989122710849-0.844716995567j)*x[0]**o + ((0.293308814451+0.89027822725j))*x[0] + ((0.588305259474+0.660321204236j))*x[1]**o + ((0.491133124872+0.61288102944j))*x[1] + ((0.569369280789-0.735669062554j))*x[2]**o + ((-0.234181466163-0.691444460119j))*x[2]
            ref[(2, 3, 3, 3)]=(0.168551829415-0.920064853885j)*(1+2.*(dim-1)/(o+1.)) + ((0.55026047316+0.81171479657j))*dim
            arg[(3, 0, 0, 0)]=(0.984314211856+0.0247489522101j)*x[0]**o + ((-0.690998113528-0.0667738411736j))*x[0] + ((0.556726008606-0.444951372493j))*x[1]**o + ((-0.225977061572+0.598213578934j))*x[1] + ((0.0753897098005-0.785844888804j))*x[2]**o + ((0.729376863376+0.882731951257j))*x[2]
            ref[(3, 0, 0, 0)]=(1.61642993026-1.20604730909j)*(1+2.*(dim-1)/(o+1.)) + ((-0.187598311724+1.41417168902j))*dim
            arg[(3, 0, 0, 1)]=(0.00808774749075+0.843314303939j)*x[0]**o + ((0.50243297384-0.775493377562j))*x[0] + ((0.517953348071-0.337749323478j))*x[1]**o + ((0.963696973482+0.546381649926j))*x[1] + ((-0.295784945855-0.974720879679j))*x[2]**o + ((0.736278423188+0.727176703976j))*x[2]
            ref[(3, 0, 0, 1)]=(0.230256149707-0.469155899218j)*(1+2.*(dim-1)/(o+1.)) + ((2.20240837051+0.49806497634j))*dim
            arg[(3, 0, 0, 2)]=(-0.883001308145-0.475952577162j)*x[0]**o + ((-0.44869496607-0.255447189796j))*x[0] + ((0.319451332538-0.303805611152j))*x[1]**o + ((0.0107061447333+0.354110274567j))*x[1] + ((-0.300023335434-0.923917013997j))*x[2]**o + ((-0.448728620859-0.830715342165j))*x[2]
            ref[(3, 0, 0, 2)]=(-0.863573311041-1.70367520231j)*(1+2.*(dim-1)/(o+1.)) + ((-0.886717442195-0.732052257394j))*dim
            arg[(3, 0, 0, 3)]=(0.682787158476+0.0416478268244j)*x[0]**o + ((-0.852863704274-0.790733123872j))*x[0] + ((-0.385036756574-0.514609102945j))*x[1]**o + ((0.622013775446-0.415434140305j))*x[1] + ((0.369395846902+0.842094694702j))*x[2]**o + ((-0.833990606652+0.564641883713j))*x[2]
            ref[(3, 0, 0, 3)]=(0.667146248804+0.369133418581j)*(1+2.*(dim-1)/(o+1.)) + ((-1.06484053548-0.641525380464j))*dim
            arg[(3, 0, 1, 0)]=(-0.660299844834+0.895319094489j)*x[0]**o + ((0.0542617446474-0.28105882464j))*x[0] + ((-0.266828402577-0.764709456412j))*x[1]**o + ((-0.867079399731-0.398925254795j))*x[1] + ((0.684148351594-0.721349302508j))*x[2]**o + ((0.432389091766+0.238017942975j))*x[2]
            ref[(3, 0, 1, 0)]=(-0.242979895817-0.590739664431j)*(1+2.*(dim-1)/(o+1.)) + ((-0.380428563318-0.44196613646j))*dim
            arg[(3, 0, 1, 1)]=(-0.577052794873+0.344427956646j)*x[0]**o + ((-0.48728073438-0.573213117563j))*x[0] + ((0.141880672569+0.0286815725461j))*x[1]**o + ((-0.670685149579+0.724172083927j))*x[1] + ((-0.910818583718+0.0701041203534j))*x[2]**o + ((0.329243990621-0.504339338333j))*x[2]
            ref[(3, 0, 1, 1)]=(-1.34599070602+0.443213649545j)*(1+2.*(dim-1)/(o+1.)) + ((-0.828721893338-0.353380371969j))*dim
            arg[(3, 0, 1, 2)]=(-0.276359553059+0.964231473129j)*x[0]**o + ((0.358128250686+0.776911896878j))*x[0] + ((-0.514963074444-0.712973843565j))*x[1]**o + ((0.0546439209679-0.209652947072j))*x[1] + ((-0.974065298864-0.892700834286j))*x[2]**o + ((-0.473428532584+0.0558125128901j))*x[2]
            ref[(3, 0, 1, 2)]=(-1.76538792637-0.641443204722j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0606563609309+0.623071462696j))*dim
            arg[(3, 0, 1, 3)]=(0.957478518755-0.997251975704j)*x[0]**o + ((-0.938810361471-0.842606494425j))*x[0] + ((-0.834966333414-0.548076293409j))*x[1]**o + ((-0.885340485435+0.976035267701j))*x[1] + ((-0.502515122653+0.0860646153388j))*x[2]**o + ((0.189354035679-0.551363018741j))*x[2]
            ref[(3, 0, 1, 3)]=(-0.380002937312-1.45926365377j)*(1+2.*(dim-1)/(o+1.)) + ((-1.63479681123-0.417934245466j))*dim
            arg[(3, 0, 2, 0)]=(-0.470167540539+0.371391493431j)*x[0]**o + ((-0.00181122275467+0.578553761209j))*x[0] + ((0.661430022682-0.795178828854j))*x[1]**o + ((-0.851398178038+0.155200099696j))*x[1] + ((0.513638065941-0.534064690574j))*x[2]**o + ((-0.0881393620363+0.710734903785j))*x[2]
            ref[(3, 0, 2, 0)]=(0.704900548084-0.957852025997j)*(1+2.*(dim-1)/(o+1.)) + ((-0.941348762829+1.44448876469j))*dim
            arg[(3, 0, 2, 1)]=(0.352228787017+0.769010339805j)*x[0]**o + ((-0.300517972198+0.368073101802j))*x[0] + ((-0.882888565875-0.368978089468j))*x[1]**o + ((0.0926041821679+0.300025559109j))*x[1] + ((-0.661683742886+0.171972534097j))*x[2]**o + ((0.443865663891-0.57783045841j))*x[2]
            ref[(3, 0, 2, 1)]=(-1.19234352174+0.572004784434j)*(1+2.*(dim-1)/(o+1.)) + ((0.235951873861+0.0902682025012j))*dim
            arg[(3, 0, 2, 2)]=(0.902960349653-0.653504443345j)*x[0]**o + ((-0.846505817748-0.915486894119j))*x[0] + ((-0.887059036161+0.553508115498j))*x[1]**o + ((-0.512996403235+0.146576474079j))*x[1] + ((-0.534701263215-0.0677080475034j))*x[2]**o + ((0.429206614947+0.79579073514j))*x[2]
            ref[(3, 0, 2, 2)]=(-0.518799949723-0.16770437535j)*(1+2.*(dim-1)/(o+1.)) + ((-0.930295606035+0.0268803151002j))*dim
            arg[(3, 0, 2, 3)]=(0.860977653537+0.243014572082j)*x[0]**o + ((0.39033434106+0.115548980892j))*x[0] + ((-0.43171843954-0.411841490611j))*x[1]**o + ((0.384043125567+0.985506243917j))*x[1] + ((0.338842738408+0.35512858711j))*x[2]**o + ((0.648772382113-0.899531870923j))*x[2]
            ref[(3, 0, 2, 3)]=(0.768101952405+0.186301668581j)*(1+2.*(dim-1)/(o+1.)) + ((1.42314984874+0.201523353886j))*dim
            arg[(3, 0, 3, 0)]=(0.0767558175354+0.448790955572j)*x[0]**o + ((-0.170890501833-0.548054834475j))*x[0] + ((0.695091100663-0.573770345245j))*x[1]**o + ((-0.212706355967+0.0564041460106j))*x[1] + ((0.605584171073-0.18772843542j))*x[2]**o + ((0.863874790457-0.536679998018j))*x[2]
            ref[(3, 0, 3, 0)]=(1.37743108927-0.312707825093j)*(1+2.*(dim-1)/(o+1.)) + ((0.480277932657-1.02833068648j))*dim
            arg[(3, 0, 3, 1)]=(-0.0427856134715+0.598603782114j)*x[0]**o + ((0.65525945981+0.81930658158j))*x[0] + ((0.0556551484967-0.137324662252j))*x[1]**o + ((0.203046103571-0.210399706532j))*x[1] + ((0.228759836494-0.135858955327j))*x[2]**o + ((-0.557776490102+0.9532407448j))*x[2]
            ref[(3, 0, 3, 1)]=(0.241629371519+0.325420164535j)*(1+2.*(dim-1)/(o+1.)) + ((0.30052907328+1.56214761985j))*dim
            arg[(3, 0, 3, 2)]=(-0.34942332712-0.227836470638j)*x[0]**o + ((-0.203348351931-0.927744193574j))*x[0] + ((-0.478397856075+0.846286996666j))*x[1]**o + ((0.447235399916+0.78100450118j))*x[1] + ((-0.899000643195-0.946147358896j))*x[2]**o + ((-0.432972002596-0.597809601626j))*x[2]
            ref[(3, 0, 3, 2)]=(-1.72682182639-0.327696832868j)*(1+2.*(dim-1)/(o+1.)) + ((-0.189084954611-0.74454929402j))*dim
            arg[(3, 0, 3, 3)]=(-0.0207583370967-0.0904836753894j)*x[0]**o + ((0.00041303510205-0.326833976431j))*x[0] + ((0.0610018038237-0.601817522528j))*x[1]**o + ((-0.630838648452-0.298432296505j))*x[1] + ((-0.460627451805+0.0796612103812j))*x[2]**o + ((-0.928190974723-0.523853710145j))*x[2]
            ref[(3, 0, 3, 3)]=(-0.420383985078-0.612639987536j)*(1+2.*(dim-1)/(o+1.)) + ((-1.55861658807-1.14911998308j))*dim
            arg[(3, 1, 0, 0)]=(-0.128670600227-0.274926850611j)*x[0]**o + ((-0.409819004607+0.835271737523j))*x[0] + ((0.10536768255-0.23642604993j))*x[1]**o + ((0.741171006019-0.519177804821j))*x[1] + ((-0.584726349388+0.297361182552j))*x[2]**o + ((0.0872465247199-0.765566349122j))*x[2]
            ref[(3, 1, 0, 0)]=(-0.608029267065-0.213991717989j)*(1+2.*(dim-1)/(o+1.)) + ((0.418598526131-0.44947241642j))*dim
            arg[(3, 1, 0, 1)]=(-0.0113642917888-0.490658491947j)*x[0]**o + ((0.464247504664-0.469513197319j))*x[0] + ((0.273757461715-0.223818744163j))*x[1]**o + ((0.480929122018-0.778410867839j))*x[1] + ((-0.292935431428+0.787281287329j))*x[2]**o + ((-0.544802702924+0.148413627602j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.0305422615021+0.0728040512187j)*(1+2.*(dim-1)/(o+1.)) + ((0.400373923759-1.09951043755j))*dim
            arg[(3, 1, 0, 2)]=(-0.336820106969-0.239853824395j)*x[0]**o + ((0.304253916201-0.171437780604j))*x[0] + ((-0.0425927053184+0.835745904007j))*x[1]**o + ((-0.536815433143+0.0597713687307j))*x[1] + ((0.232082097796-0.433347927974j))*x[2]**o + ((-0.762733217643+0.157274716315j))*x[2]
            ref[(3, 1, 0, 2)]=(-0.147330714491+0.162544151638j)*(1+2.*(dim-1)/(o+1.)) + ((-0.995294734586+0.0456083044421j))*dim
            arg[(3, 1, 0, 3)]=(0.659642852915+0.25314620067j)*x[0]**o + ((-0.503738235095-0.368125800109j))*x[0] + ((0.297062116223+0.628518224395j))*x[1]**o + ((0.140242688141+0.324056934507j))*x[1] + ((0.924014090063-0.87870645988j))*x[2]**o + ((-0.673379705072+0.680816350016j))*x[2]
            ref[(3, 1, 0, 3)]=(1.8807190592+0.00295796518505j)*(1+2.*(dim-1)/(o+1.)) + ((-1.03687525203+0.636747484414j))*dim
            arg[(3, 1, 1, 0)]=(-0.0830684483689+0.437044484581j)*x[0]**o + ((0.508837953466-0.995243853431j))*x[0] + ((0.798280143711+0.0024108180635j))*x[1]**o + ((-0.759500887787+0.351496803777j))*x[1] + ((0.549496502225+0.811272213038j))*x[2]**o + ((-0.340539359321-0.525879617393j))*x[2]
            ref[(3, 1, 1, 0)]=(1.26470819757+1.25072751568j)*(1+2.*(dim-1)/(o+1.)) + ((-0.591202293642-1.16962666705j))*dim
            arg[(3, 1, 1, 1)]=(0.0967548684128+0.553215244539j)*x[0]**o + ((0.447168721538+0.509560595846j))*x[0] + ((0.528459593946-0.51303417396j))*x[1]**o + ((-0.581565874726+0.544142248707j))*x[1] + ((-0.977167358128+0.419312044838j))*x[2]**o + ((0.74725119483-0.289199179757j))*x[2]
            ref[(3, 1, 1, 1)]=(-0.351952895769+0.459493115418j)*(1+2.*(dim-1)/(o+1.)) + ((0.612854041642+0.764503664797j))*dim
            arg[(3, 1, 1, 2)]=(0.414920393816-0.905300594468j)*x[0]**o + ((-0.978294137851-0.119261632454j))*x[0] + ((0.178590291541-0.578534065786j))*x[1]**o + ((0.894984151181-0.168939817682j))*x[1] + ((-0.331371464184+0.621263692883j))*x[2]**o + ((0.085870355055+0.391608967574j))*x[2]
            ref[(3, 1, 1, 2)]=(0.262139221173-0.862570967371j)*(1+2.*(dim-1)/(o+1.)) + ((0.00256036838485+0.103407517438j))*dim
            arg[(3, 1, 1, 3)]=(-0.67074358887-0.990855571405j)*x[0]**o + ((0.401743981385-0.655816076692j))*x[0] + ((0.775912239855+0.440262323501j))*x[1]**o + ((0.0293289290828-0.0788253059196j))*x[1] + ((-0.152216861767+0.956398571702j))*x[2]**o + ((0.136795945086-0.31282020189j))*x[2]
            ref[(3, 1, 1, 3)]=(-0.047048210782+0.405805323798j)*(1+2.*(dim-1)/(o+1.)) + ((0.567868855554-1.0474615845j))*dim
            arg[(3, 1, 2, 0)]=(0.218015018531-0.908846156643j)*x[0]**o + ((0.281294393906+0.273497445561j))*x[0] + ((-0.35819898467-0.211581981242j))*x[1]**o + ((-0.554191820277-0.821481041668j))*x[1] + ((0.415535698103+0.0385463627439j))*x[2]**o + ((-0.912287696776-0.930862065179j))*x[2]
            ref[(3, 1, 2, 0)]=(0.275351731965-1.08188177514j)*(1+2.*(dim-1)/(o+1.)) + ((-1.18518512315-1.47884566129j))*dim
            arg[(3, 1, 2, 1)]=(-0.942512992342-0.60660081488j)*x[0]**o + ((0.636347339249-0.950037308982j))*x[0] + ((0.526905146748+0.791236822905j))*x[1]**o + ((-0.754161054424-0.160645399577j))*x[1] + ((-0.369633101447-0.094426905252j))*x[2]**o + ((0.111145384674+0.518956797962j))*x[2]
            ref[(3, 1, 2, 1)]=(-0.78524094704+0.0902091027733j)*(1+2.*(dim-1)/(o+1.)) + ((-0.00666833050172-0.591725910597j))*dim
            arg[(3, 1, 2, 2)]=(-0.0866678632405-0.675466347415j)*x[0]**o + ((-0.707778302522-0.703637228996j))*x[0] + ((-0.653915263664+0.0812757614407j))*x[1]**o + ((0.222102709547+0.626627709388j))*x[1] + ((0.439102745974+0.497731549435j))*x[2]**o + ((0.653514212282-0.570728791898j))*x[2]
            ref[(3, 1, 2, 2)]=(-0.301480380931-0.0964590365396j)*(1+2.*(dim-1)/(o+1.)) + ((0.167838619306-0.647738311507j))*dim
            arg[(3, 1, 2, 3)]=(-0.336247012341-0.851594325227j)*x[0]**o + ((0.260060299578+0.690173770315j))*x[0] + ((0.887087360979+0.393444485303j))*x[1]**o + ((0.891542359711-0.023938858302j))*x[1] + ((-0.174177705537+0.991073975513j))*x[2]**o + ((-0.18715538239+0.930023651104j))*x[2]
            ref[(3, 1, 2, 3)]=(0.376662643101+0.532924135588j)*(1+2.*(dim-1)/(o+1.)) + ((0.964447276899+1.59625856312j))*dim
            arg[(3, 1, 3, 0)]=(-0.562078661202-0.525665230864j)*x[0]**o + ((0.864359774138+0.64589537302j))*x[0] + ((-0.849098120964+0.427198680135j))*x[1]**o + ((0.164329076683-0.291563744667j))*x[1] + ((0.699539848675+0.697051290299j))*x[2]**o + ((0.194018008105+0.190995613142j))*x[2]
            ref[(3, 1, 3, 0)]=(-0.711636933491+0.59858473957j)*(1+2.*(dim-1)/(o+1.)) + ((1.22270685893+0.545327241495j))*dim
            arg[(3, 1, 3, 1)]=(-0.137347094356-0.712707388742j)*x[0]**o + ((0.538231206485+0.0131435983226j))*x[0] + ((-0.548789993922+0.159499591005j))*x[1]**o + ((0.666561785102+0.908794022663j))*x[1] + ((0.35835529974-0.985375282908j))*x[2]**o + ((0.685787136094+0.62258252499j))*x[2]
            ref[(3, 1, 3, 1)]=(-0.327781788538-1.53858308065j)*(1+2.*(dim-1)/(o+1.)) + ((1.89058012768+1.54452014598j))*dim
            arg[(3, 1, 3, 2)]=(-0.504762735054-0.763271592928j)*x[0]**o + ((0.0414788989249+0.462145151626j))*x[0] + ((0.318574007603+0.369469069889j))*x[1]**o + ((-0.931122863656-0.564571475432j))*x[1] + ((0.432269365157-0.0415598774195j))*x[2]**o + ((0.423101047743-0.0891303143478j))*x[2]
            ref[(3, 1, 3, 2)]=(0.246080637707-0.435362400459j)*(1+2.*(dim-1)/(o+1.)) + ((-0.466542916988-0.191556638154j))*dim
            arg[(3, 1, 3, 3)]=(-0.840095172203-0.4731872735j)*x[0]**o + ((0.772641077323-0.0561106888433j))*x[0] + ((0.826394786592-0.0952414168221j))*x[1]**o + ((-0.904125255528-0.116389518986j))*x[1] + ((0.755516955276+0.315520090031j))*x[2]**o + ((-0.0924010467923-0.990676206897j))*x[2]
            ref[(3, 1, 3, 3)]=(0.741816569666-0.252908600291j)*(1+2.*(dim-1)/(o+1.)) + ((-0.223885224997-1.16317641473j))*dim
            arg[(3, 2, 0, 0)]=(0.812678411033+0.123497548751j)*x[0]**o + ((-0.536544240636-0.991561886284j))*x[0] + ((-0.297833515819-0.127447671635j))*x[1]**o + ((0.142515273052-0.990791092609j))*x[1] + ((0.971750958872+0.855978097088j))*x[2]**o + ((0.144669186967-0.890090265663j))*x[2]
            ref[(3, 2, 0, 0)]=(1.48659585409+0.852027974204j)*(1+2.*(dim-1)/(o+1.)) + ((-0.249359780616-2.87244324456j))*dim
            arg[(3, 2, 0, 1)]=(-0.828571552437+0.905974227535j)*x[0]**o + ((0.723033375685+0.413481094763j))*x[0] + ((0.563740864214+0.80283752955j))*x[1]**o + ((-0.00796656916412-0.995649072726j))*x[1] + ((-0.368184190886-0.22991941276j))*x[2]**o + ((0.517782624932+0.806715652904j))*x[2]
            ref[(3, 2, 0, 1)]=(-0.633014879109+1.47889234433j)*(1+2.*(dim-1)/(o+1.)) + ((1.23284943145+0.224547674941j))*dim
            arg[(3, 2, 0, 2)]=(0.756012429919-0.732464069959j)*x[0]**o + ((0.69338097688+0.214099412644j))*x[0] + ((-0.374488897611-0.547692619662j))*x[1]**o + ((-0.133851451472+0.269034744914j))*x[1] + ((0.549869287939+0.183654872371j))*x[2]**o + ((-0.725262632985+0.426948385115j))*x[2]
            ref[(3, 2, 0, 2)]=(0.931392820247-1.09650181725j)*(1+2.*(dim-1)/(o+1.)) + ((-0.165733107578+0.910082542673j))*dim
            arg[(3, 2, 0, 3)]=(-0.556791402625-0.792646401726j)*x[0]**o + ((-0.270315344478+0.754781083581j))*x[0] + ((-0.80990128232-0.971214695462j))*x[1]**o + ((-0.966023456223-0.793486741554j))*x[1] + ((-0.583694069061+0.000948562723656j))*x[2]**o + ((0.131928521634-0.666935651951j))*x[2]
            ref[(3, 2, 0, 3)]=(-1.95038675401-1.76291253446j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10441027907-0.705641309923j))*dim
            arg[(3, 2, 1, 0)]=(0.5179048887+0.570873030114j)*x[0]**o + ((0.114317737474-0.598467863251j))*x[0] + ((0.278240606002-0.834694957946j))*x[1]**o + ((-0.969487182735-0.093974071148j))*x[1] + ((0.911898977046+0.515624084321j))*x[2]**o + ((0.318638417947+0.352564185821j))*x[2]
            ref[(3, 2, 1, 0)]=(1.70804447175+0.251802156489j)*(1+2.*(dim-1)/(o+1.)) + ((-0.536531027314-0.339877748578j))*dim
            arg[(3, 2, 1, 1)]=(0.909919392463-0.788163807583j)*x[0]**o + ((-0.863313903624-0.822350808052j))*x[0] + ((0.73640324642+0.906547765036j))*x[1]**o + ((-0.725109282315-0.859870963756j))*x[1] + ((0.580976340286-0.0810351771j))*x[2]**o + ((-0.368970616752-0.0707165079248j))*x[2]
            ref[(3, 2, 1, 1)]=(2.22729897917+0.037348780353j)*(1+2.*(dim-1)/(o+1.)) + ((-1.95739380269-1.75293827973j))*dim
            arg[(3, 2, 1, 2)]=(0.302517181567-0.00999493927122j)*x[0]**o + ((-0.762323760521+0.555308819249j))*x[0] + ((-0.603130259599-0.0394804453709j))*x[1]**o + ((-0.668429277014+0.0331637536597j))*x[1] + ((0.852985466727-0.0700976297804j))*x[2]**o + ((0.933405864519+0.0662668078833j))*x[2]
            ref[(3, 2, 1, 2)]=(0.552372388695-0.119573014422j)*(1+2.*(dim-1)/(o+1.)) + ((-0.497347173016+0.654739380792j))*dim
            arg[(3, 2, 1, 3)]=(-0.874126318257-0.687510562516j)*x[0]**o + ((-0.443626528343+0.266242817672j))*x[0] + ((-0.547904290904+0.711127065358j))*x[1]**o + ((0.285176155589-0.0694278786181j))*x[1] + ((0.0186815221855-0.466091861392j))*x[2]**o + ((-0.849255528084+0.664364200521j))*x[2]
            ref[(3, 2, 1, 3)]=(-1.40334908698-0.44247535855j)*(1+2.*(dim-1)/(o+1.)) + ((-1.00770590084+0.861179139575j))*dim
            arg[(3, 2, 2, 0)]=(-0.898095362564-0.85728952691j)*x[0]**o + ((0.411290843791+0.213732782953j))*x[0] + ((-0.39775204741+0.348412137668j))*x[1]**o + ((-0.0392912473379+0.238545033046j))*x[1] + ((-0.591173887598-0.44832282377j))*x[2]**o + ((0.662154871351+0.881690940674j))*x[2]
            ref[(3, 2, 2, 0)]=(-1.88702129757-0.957200213013j)*(1+2.*(dim-1)/(o+1.)) + ((1.0341544678+1.33396875667j))*dim
            arg[(3, 2, 2, 1)]=(0.921729616662-0.304536367988j)*x[0]**o + ((0.643137236764-0.840956668759j))*x[0] + ((-0.5155264322-0.775842388986j))*x[1]**o + ((0.638260642889+0.28729581294j))*x[1] + ((0.153844212754-0.192469713568j))*x[2]**o + ((0.643771347034-0.116987514771j))*x[2]
            ref[(3, 2, 2, 1)]=(0.560047397216-1.27284847054j)*(1+2.*(dim-1)/(o+1.)) + ((1.92516922669-0.67064837059j))*dim
            arg[(3, 2, 2, 2)]=(-0.470980403648+0.00620829841281j)*x[0]**o + ((0.733315341514-0.252117029288j))*x[0] + ((-0.545933348076-0.292818136788j))*x[1]**o + ((-0.157118702603+0.349509244354j))*x[1] + ((0.140522566476-0.913840221357j))*x[2]**o + ((0.0778344089147-0.431764984096j))*x[2]
            ref[(3, 2, 2, 2)]=(-0.876391185248-1.20045005973j)*(1+2.*(dim-1)/(o+1.)) + ((0.654031047826-0.33437276903j))*dim
            arg[(3, 2, 2, 3)]=(-0.417032555808+0.00602540550572j)*x[0]**o + ((0.733874010846-0.0484435315747j))*x[0] + ((0.209807396861+0.0317251629744j))*x[1]**o + ((-0.783454502737-0.501623854598j))*x[1] + ((-0.111322210714+0.309963130859j))*x[2]**o + ((-0.534229986513+0.0572160562585j))*x[2]
            ref[(3, 2, 2, 3)]=(-0.318547369661+0.347713699339j)*(1+2.*(dim-1)/(o+1.)) + ((-0.583810478405-0.492851329914j))*dim
            arg[(3, 2, 3, 0)]=(-0.254423675767-0.863439432522j)*x[0]**o + ((0.364338747141-0.333877625523j))*x[0] + ((-0.635222575051+0.90310538419j))*x[1]**o + ((-0.172812372127+0.458016564603j))*x[1] + ((-0.204622731019+0.919996311681j))*x[2]**o + ((-0.00474340668213+0.868112337726j))*x[2]
            ref[(3, 2, 3, 0)]=(-1.09426898184+0.959662263349j)*(1+2.*(dim-1)/(o+1.)) + ((0.186782968332+0.992251276805j))*dim
            arg[(3, 2, 3, 1)]=(-0.0971988650998+0.23748418346j)*x[0]**o + ((-0.264811656757+0.860869478023j))*x[0] + ((0.787735036476-0.349421510939j))*x[1]**o + ((0.49075108897+0.180948777301j))*x[1] + ((0.935132387447-0.0438044769143j))*x[2]**o + ((-0.186064880344+0.419214239856j))*x[2]
            ref[(3, 2, 3, 1)]=(1.62566855882-0.155741804392j)*(1+2.*(dim-1)/(o+1.)) + ((0.0398745518695+1.46103249518j))*dim
            arg[(3, 2, 3, 2)]=(-0.159685506177+0.633885485433j)*x[0]**o + ((0.659212682607+0.509711313698j))*x[0] + ((0.974650725835-0.817574531541j))*x[1]**o + ((0.761913858755-0.866073364481j))*x[1] + ((0.638822641277-0.895220515635j))*x[2]**o + ((-0.882581441508-0.598613043596j))*x[2]
            ref[(3, 2, 3, 2)]=(1.45378786094-1.07890956174j)*(1+2.*(dim-1)/(o+1.)) + ((0.538545099854-0.954975094378j))*dim
            arg[(3, 2, 3, 3)]=(0.598690897919-0.852386096947j)*x[0]**o + ((-0.0432547443932-0.0245466578435j))*x[0] + ((-0.968083955173+0.0505169614831j))*x[1]**o + ((-0.0519984645948-0.528829048376j))*x[1] + ((-0.980788172056+0.69087350599j))*x[2]**o + ((-0.852309219314+0.641041632791j))*x[2]
            ref[(3, 2, 3, 3)]=(-1.35018122931-0.110995629474j)*(1+2.*(dim-1)/(o+1.)) + ((-0.947562428303+0.0876659265713j))*dim
            arg[(3, 3, 0, 0)]=(0.413449963155-0.0628506916667j)*x[0]**o + ((-0.239337598165+0.145912001452j))*x[0] + ((-0.519488125698+0.565495982366j))*x[1]**o + ((-0.674271342915-0.266725032379j))*x[1] + ((-0.920907862514-0.878545104811j))*x[2]**o + ((0.969987935195-0.0824005084696j))*x[2]
            ref[(3, 3, 0, 0)]=(-1.02694602506-0.375899814113j)*(1+2.*(dim-1)/(o+1.)) + ((0.0563789941148-0.203213539396j))*dim
            arg[(3, 3, 0, 1)]=(0.0568693825414-0.229839646353j)*x[0]**o + ((-0.0493705980426-0.772897796115j))*x[0] + ((0.906066997867-0.0267343955416j))*x[1]**o + ((0.79366625826-0.975906805911j))*x[1] + ((-0.145248668896+0.601456702664j))*x[2]**o + ((0.749395350918+0.449782948708j))*x[2]
            ref[(3, 3, 0, 1)]=(0.817687711513+0.344882660769j)*(1+2.*(dim-1)/(o+1.)) + ((1.49369101114-1.29902165332j))*dim
            arg[(3, 3, 0, 2)]=(0.547559185011-0.206145646395j)*x[0]**o + ((-0.255468823034+0.355268499977j))*x[0] + ((-0.1125963127-0.683240440895j))*x[1]**o + ((-0.447038241276+0.885775014629j))*x[1] + ((0.755803109641+0.941793976827j))*x[2]**o + ((-0.147359097892+0.114343553156j))*x[2]
            ref[(3, 3, 0, 2)]=(1.19076598195+0.0524078895373j)*(1+2.*(dim-1)/(o+1.)) + ((-0.849866162202+1.35538706776j))*dim
            arg[(3, 3, 0, 3)]=(-0.508506896725+0.960097156939j)*x[0]**o + ((-0.220642270286+0.984614097595j))*x[0] + ((0.554327682482+0.41418869048j))*x[1]**o + ((-0.224343028744-0.11762392493j))*x[1] + ((0.477015249982+0.851624319178j))*x[2]**o + ((0.372339008352-0.038131185452j))*x[2]
            ref[(3, 3, 0, 3)]=(0.522836035739+2.2259101666j)*(1+2.*(dim-1)/(o+1.)) + ((-0.072646290678+0.828858987213j))*dim
            arg[(3, 3, 1, 0)]=(0.00365683177801-0.244904069775j)*x[0]**o + ((0.884309493718+0.80817616645j))*x[0] + ((0.830926025679-0.30816852303j))*x[1]**o + ((-0.790145017817-0.578337774646j))*x[1] + ((-0.862349789447-0.231986595055j))*x[2]**o + ((0.788832602481-0.678767887476j))*x[2]
            ref[(3, 3, 1, 0)]=(-0.0277669319899-0.78505918786j)*(1+2.*(dim-1)/(o+1.)) + ((0.882997078382-0.448929495672j))*dim
            arg[(3, 3, 1, 1)]=(-0.871727117003+0.499206677105j)*x[0]**o + ((0.910048813379+0.0288089591957j))*x[0] + ((0.737416874569+0.322380983475j))*x[1]**o + ((0.285554533005-0.56915229335j))*x[1] + ((-0.658341763082+0.98903424542j))*x[2]**o + ((-0.105360939703-0.0730391976059j))*x[2]
            ref[(3, 3, 1, 1)]=(-0.792652005516+1.810621906j)*(1+2.*(dim-1)/(o+1.)) + ((1.09024240668-0.61338253176j))*dim
            arg[(3, 3, 1, 2)]=(0.580538108459+0.535687847585j)*x[0]**o + ((0.410852973472-0.986386314287j))*x[0] + ((-0.535184071957-0.770195531574j))*x[1]**o + ((0.842558810867+0.982073959201j))*x[1] + ((-0.376901069406-0.350497462886j))*x[2]**o + ((0.278813264133-0.888765790627j))*x[2]
            ref[(3, 3, 1, 2)]=(-0.331547032904-0.585005146875j)*(1+2.*(dim-1)/(o+1.)) + ((1.53222504847-0.893078145713j))*dim
            arg[(3, 3, 1, 3)]=(-0.146931030959+0.4167849557j)*x[0]**o + ((-0.721580516107-0.223097442026j))*x[0] + ((-0.463249283732-0.553893400303j))*x[1]**o + ((-0.913781917092-0.800158389661j))*x[1] + ((0.498809944321+0.646462912916j))*x[2]**o + ((-0.809540849214-0.858161719123j))*x[2]
            ref[(3, 3, 1, 3)]=(-0.11137037037+0.509354468313j)*(1+2.*(dim-1)/(o+1.)) + ((-2.44490328241-1.88141755081j))*dim
            arg[(3, 3, 2, 0)]=(0.0454996004582-0.736641025786j)*x[0]**o + ((0.57365686918+0.808497645758j))*x[0] + ((0.320253991397-0.741793506843j))*x[1]**o + ((0.322954003705+0.838843069217j))*x[1] + ((-0.00576466446126-0.317432307578j))*x[2]**o + ((-0.325413842898+0.60933380134j))*x[2]
            ref[(3, 3, 2, 0)]=(0.359988927394-1.79586684021j)*(1+2.*(dim-1)/(o+1.)) + ((0.571197029987+2.25667451631j))*dim
            arg[(3, 3, 2, 1)]=(0.677492555623+0.721966731993j)*x[0]**o + ((0.611209980431-0.634158263281j))*x[0] + ((0.0682938500849+0.358877078182j))*x[1]**o + ((0.527338874308-0.153004150516j))*x[1] + ((0.425254155732-0.346594511086j))*x[2]**o + ((0.566874242429-0.940858626032j))*x[2]
            ref[(3, 3, 2, 1)]=(1.17104056144+0.73424929909j)*(1+2.*(dim-1)/(o+1.)) + ((1.70542309717-1.72802103983j))*dim
            arg[(3, 3, 2, 2)]=(-0.662314843454+0.703911290351j)*x[0]**o + ((0.973528075959+0.113687856392j))*x[0] + ((0.427244543664-0.0663833852217j))*x[1]**o + ((-0.475298672618+0.628169840777j))*x[1] + ((0.439712601379+0.663538876467j))*x[2]**o + ((-0.344254996311-0.029334701222j))*x[2]
            ref[(3, 3, 2, 2)]=(0.20464230159+1.3010667816j)*(1+2.*(dim-1)/(o+1.)) + ((0.153974407029+0.712522995947j))*dim
            arg[(3, 3, 2, 3)]=(0.220693525793+0.832007831997j)*x[0]**o + ((0.0816529332295-0.721603238824j))*x[0] + ((-0.708172870055+0.173176631977j))*x[1]**o + ((-0.609126942583-0.754276593249j))*x[1] + ((-0.594953102058-0.904307033463j))*x[2]**o + ((-0.793274345948+0.868602493185j))*x[2]
            ref[(3, 3, 2, 3)]=(-1.08243244632+0.100877430511j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3207483553-0.607277338888j))*dim
            arg[(3, 3, 3, 0)]=(0.422064271476-0.0610031861635j)*x[0]**o + ((-0.438855954346+0.380552979365j))*x[0] + ((-0.928945339061+0.308198927258j))*x[1]**o + ((-0.370861447692+0.987725524813j))*x[1] + ((-0.314382818889+0.422439445315j))*x[2]**o + ((0.662337827616-0.245947701501j))*x[2]
            ref[(3, 3, 3, 0)]=(-0.821263886474+0.669635186409j)*(1+2.*(dim-1)/(o+1.)) + ((-0.147379574421+1.12233080268j))*dim
            arg[(3, 3, 3, 1)]=(0.406245364485+0.518583251806j)*x[0]**o + ((0.312060349214-0.6788890333j))*x[0] + ((-0.942674252739-0.76422551132j))*x[1]**o + ((0.0603145257082+0.862183485498j))*x[1] + ((0.645362284773+0.770355383795j))*x[2]**o + ((-0.756407790176+0.393436053443j))*x[2]
            ref[(3, 3, 3, 1)]=(0.108933396519+0.524713124281j)*(1+2.*(dim-1)/(o+1.)) + ((-0.384032915254+0.576730505642j))*dim
            arg[(3, 3, 3, 2)]=(0.339974466812-0.983825610851j)*x[0]**o + ((-0.302471203851+0.828744963762j))*x[0] + ((-0.252235671656+0.312385301382j))*x[1]**o + ((0.526031136979+0.293600268657j))*x[1] + ((0.139580155198+0.135649483354j))*x[2]**o + ((0.800220327645-0.372720361621j))*x[2]
            ref[(3, 3, 3, 2)]=(0.227318950354-0.535790826114j)*(1+2.*(dim-1)/(o+1.)) + ((1.02378026077+0.749624870798j))*dim
            arg[(3, 3, 3, 3)]=(-0.875676328537+0.0390743779276j)*x[0]**o + ((-0.942101960541+0.453963604976j))*x[0] + ((0.0126729304408-0.638808219803j))*x[1]**o + ((0.033403334465-0.466831153237j))*x[1] + ((-0.547493328679-0.769434098027j))*x[2]**o + ((0.259860300263+0.91545317839j))*x[2]
            ref[(3, 3, 3, 3)]=(-1.41049672677-1.3691679399j)*(1+2.*(dim-1)/(o+1.)) + ((-0.648838325813+0.902585630129j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.510912568953-0.716173239766j)*x[0] + ((-0.933225186386-0.0988539455614j))*x[1]
            ref=(-0.422312617433-0.815027185327j)*dim
        else:
            arg=(0.685906029253+0.840358790649j)*x[0] + ((-0.711707756016-0.165228220979j))*x[1] + ((-0.57010180682+0.984143433221j))*x[2]
            ref=(-0.595903533583+1.65927400289j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.00135188013473-0.690840517196j)*x[0] + ((-0.524135629822-0.130161299757j))*x[1]
            ref[(0,)]=(-0.522783749687-0.821001816953j)*dim
            arg[(1,)]=(-0.119534599679-0.830630954748j)*x[0] + ((-0.120733446782-0.630846700983j))*x[1]
            ref[(1,)]=(-0.240268046461-1.46147765573j)*dim
            arg[(2,)]=(-0.702412750358+0.0479869308404j)*x[0] + ((-0.484714635485-0.523757711562j))*x[1]
            ref[(2,)]=(-1.18712738584-0.475770780722j)*dim
            arg[(3,)]=(-0.734538305755-0.799067172512j)*x[0] + ((0.229974047646-0.939645131354j))*x[1]
            ref[(3,)]=(-0.504564258109-1.73871230387j)*dim
        else:
            arg[(0,)]=(-0.16662452757+0.384123342563j)*x[0] + ((0.92360715786-0.339639641885j))*x[1] + ((0.865749370474-0.263950237254j))*x[2]
            ref[(0,)]=(1.62273200076-0.219466536575j)*dim
            arg[(1,)]=(0.375732837189+0.568202970263j)*x[0] + ((0.660424938827+0.507751531375j))*x[1] + ((0.371177090878-0.917443348669j))*x[2]
            ref[(1,)]=(1.40733486689+0.158511152969j)*dim
            arg[(2,)]=(0.763547061646+0.215184274889j)*x[0] + ((0.864347945648+0.550240359478j))*x[1] + ((0.652702020101+0.559252360571j))*x[2]
            ref[(2,)]=(2.28059702739+1.32467699494j)*dim
            arg[(3,)]=(-0.186689661232-0.398720109924j)*x[0] + ((-0.0120928180345-0.460699980133j))*x[1] + ((-0.366654014136+0.63243799353j))*x[2]
            ref[(3,)]=(-0.565436493402-0.226982096527j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.611960709923-0.799395193841j)*x[0] + ((0.943483535427-0.730525807696j))*x[1]
            ref[(0, 0)]=(0.331522825504-1.52992100154j)*dim
            arg[(0, 1)]=(-0.945093094735+0.959807092984j)*x[0] + ((-0.289704149827-0.707087568907j))*x[1]
            ref[(0, 1)]=(-1.23479724456+0.252719524076j)*dim
            arg[(0, 2)]=(0.957327548018-0.496487741914j)*x[0] + ((-0.792682616949+0.0582299622226j))*x[1]
            ref[(0, 2)]=(0.164644931069-0.438257779691j)*dim
            arg[(0, 3)]=(-0.912449650679+0.998165691286j)*x[0] + ((0.632306393324+0.295774298408j))*x[1]
            ref[(0, 3)]=(-0.280143257355+1.29393998969j)*dim
            arg[(1, 0)]=(-0.0872681814848+0.384757801532j)*x[0] + ((-0.23610471969-0.960794197721j))*x[1]
            ref[(1, 0)]=(-0.323372901175-0.576036396189j)*dim
            arg[(1, 1)]=(-0.439847543397-0.365427968916j)*x[0] + ((-0.332792092978-0.581658701173j))*x[1]
            ref[(1, 1)]=(-0.772639636375-0.947086670089j)*dim
            arg[(1, 2)]=(0.902958475603+0.9606081191j)*x[0] + ((-0.13511776289+0.190892308762j))*x[1]
            ref[(1, 2)]=(0.767840712713+1.15150042786j)*dim
            arg[(1, 3)]=(0.0245309087809-0.635584811239j)*x[0] + ((-0.467160658141-0.872517826325j))*x[1]
            ref[(1, 3)]=(-0.44262974936-1.50810263756j)*dim
            arg[(2, 0)]=(-0.480626535306+0.896117937307j)*x[0] + ((-0.146769465049-0.449833693313j))*x[1]
            ref[(2, 0)]=(-0.627396000355+0.446284243993j)*dim
            arg[(2, 1)]=(0.445200481843-0.872320223343j)*x[0] + ((0.764093980175-0.619134907103j))*x[1]
            ref[(2, 1)]=(1.20929446202-1.49145513045j)*dim
            arg[(2, 2)]=(-0.76421260595-0.872850069828j)*x[0] + ((-0.56754485537+0.363993382191j))*x[1]
            ref[(2, 2)]=(-1.33175746132-0.508856687637j)*dim
            arg[(2, 3)]=(-0.353079913243+0.110661117951j)*x[0] + ((-0.0603143165442+0.79313651536j))*x[1]
            ref[(2, 3)]=(-0.413394229788+0.903797633311j)*dim
        else:
            arg[(0, 0)]=(0.0162990699773-0.195669810363j)*x[0] + ((0.160438912237-0.571782412774j))*x[1] + ((0.0801720116887+0.695571358954j))*x[2]
            ref[(0, 0)]=(0.256909993903-0.0718808641832j)*dim
            arg[(0, 1)]=(0.238875861553-0.705413771016j)*x[0] + ((0.658358604514-0.372707735741j))*x[1] + ((0.392754007475-0.864390692179j))*x[2]
            ref[(0, 1)]=(1.28998847354-1.94251219894j)*dim
            arg[(0, 2)]=(0.141987298797+0.252380740097j)*x[0] + ((-0.53062171561+0.887279928908j))*x[1] + ((0.149556595371-0.167218688162j))*x[2]
            ref[(0, 2)]=(-0.239077821442+0.972441980842j)*dim
            arg[(0, 3)]=(-0.127751261693-0.519420274769j)*x[0] + ((0.194621148159+0.668269406045j))*x[1] + ((0.560949140455+0.383354397624j))*x[2]
            ref[(0, 3)]=(0.627819026921+0.5322035289j)*dim
            arg[(1, 0)]=(-0.802285579187-0.787001877593j)*x[0] + ((-0.798543428249-0.916367477058j))*x[1] + ((0.823774011128+0.219494094812j))*x[2]
            ref[(1, 0)]=(-0.777054996309-1.48387525984j)*dim
            arg[(1, 1)]=(0.0376038444882-0.644254500009j)*x[0] + ((0.17262015341+0.122645228302j))*x[1] + ((-0.700729110416-0.303120305494j))*x[2]
            ref[(1, 1)]=(-0.490505112518-0.824729577201j)*dim
            arg[(1, 2)]=(0.323536485367+0.955095788257j)*x[0] + ((0.580830704814+0.430180098992j))*x[1] + ((-0.507377459687+0.500683327615j))*x[2]
            ref[(1, 2)]=(0.396989730494+1.88595921486j)*dim
            arg[(1, 3)]=(-0.298899968589+0.749414691063j)*x[0] + ((-0.270180063843+0.256339661879j))*x[1] + ((-0.0465015289296-0.236579502064j))*x[2]
            ref[(1, 3)]=(-0.615581561361+0.769174850877j)*dim
            arg[(2, 0)]=(0.352702262011+0.330867925056j)*x[0] + ((0.562361442137-0.419631406657j))*x[1] + ((-0.46991096325+0.759088176906j))*x[2]
            ref[(2, 0)]=(0.445152740898+0.670324695305j)*dim
            arg[(2, 1)]=(-0.825602122284-0.216783718046j)*x[0] + ((-0.078109422818+0.942638871448j))*x[1] + ((-0.149670261002+0.251950583419j))*x[2]
            ref[(2, 1)]=(-1.0533818061+0.977805736821j)*dim
            arg[(2, 2)]=(0.0744680233188-0.0418404378696j)*x[0] + ((0.297306247588-0.756085166842j))*x[1] + ((0.429974641854-7.28841262347e-05j))*x[2]
            ref[(2, 2)]=(0.80174891276-0.797998488837j)*dim
            arg[(2, 3)]=(-0.79641767476+0.27651884953j)*x[0] + ((0.165954811303+0.557103653288j))*x[1] + ((0.472311477627+0.888941073681j))*x[2]
            ref[(2, 3)]=(-0.158151385831+1.7225635765j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref=numpy.zeros((4, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.789448772849+0.429159391337j)*x[0] + ((-0.669636675544-0.528703803635j))*x[1]
            ref[(0, 0, 0)]=(0.119812097305-0.0995444122988j)*dim
            arg[(0, 0, 1)]=(0.345136807907+0.326452685407j)*x[0] + ((-0.50483759274+0.254833198271j))*x[1]
            ref[(0, 0, 1)]=(-0.159700784833+0.581285883678j)*dim
            arg[(0, 1, 0)]=(-0.936391136956+0.590759503401j)*x[0] + ((-0.280101597813-0.801231217105j))*x[1]
            ref[(0, 1, 0)]=(-1.21649273477-0.210471713704j)*dim
            arg[(0, 1, 1)]=(-0.0454291526327+0.0174069953556j)*x[0] + ((-0.0291694750767-0.109899206636j))*x[1]
            ref[(0, 1, 1)]=(-0.0745986277094-0.09249221128j)*dim
            arg[(1, 0, 0)]=(-0.186746221611-0.479788726895j)*x[0] + ((-0.769551695244-0.224783695544j))*x[1]
            ref[(1, 0, 0)]=(-0.956297916855-0.704572422438j)*dim
            arg[(1, 0, 1)]=(0.0313295404959-0.450906339259j)*x[0] + ((-0.219649499129+0.385215853062j))*x[1]
            ref[(1, 0, 1)]=(-0.188319958633-0.065690486197j)*dim
            arg[(1, 1, 0)]=(0.970280676709-0.865754908237j)*x[0] + ((0.843222450677-0.484467530313j))*x[1]
            ref[(1, 1, 0)]=(1.81350312739-1.35022243855j)*dim
            arg[(1, 1, 1)]=(-0.247966060744+0.356124034178j)*x[0] + ((0.966170849903+0.736375065036j))*x[1]
            ref[(1, 1, 1)]=(0.718204789159+1.09249909921j)*dim
            arg[(2, 0, 0)]=(-0.144361971233+0.40777836069j)*x[0] + ((-0.197368678103+0.745894851617j))*x[1]
            ref[(2, 0, 0)]=(-0.341730649336+1.15367321231j)*dim
            arg[(2, 0, 1)]=(0.645205208577+0.527887136424j)*x[0] + ((-0.235231582533+0.435753417711j))*x[1]
            ref[(2, 0, 1)]=(0.409973626044+0.963640554135j)*dim
            arg[(2, 1, 0)]=(0.629374489247-0.58505269654j)*x[0] + ((-0.908581824742+0.995500554251j))*x[1]
            ref[(2, 1, 0)]=(-0.279207335495+0.410447857711j)*dim
            arg[(2, 1, 1)]=(0.74742454801+0.617817571276j)*x[0] + ((-0.682030587505+0.129432994136j))*x[1]
            ref[(2, 1, 1)]=(0.065393960505+0.747250565412j)*dim
            arg[(3, 0, 0)]=(0.053579468187+0.0652082191891j)*x[0] + ((0.779331919218-0.686602285371j))*x[1]
            ref[(3, 0, 0)]=(0.832911387405-0.621394066182j)*dim
            arg[(3, 0, 1)]=(0.779730656952+0.464256970361j)*x[0] + ((-0.396033597548-0.379554597337j))*x[1]
            ref[(3, 0, 1)]=(0.383697059404+0.084702373023j)*dim
            arg[(3, 1, 0)]=(-0.940795589728+0.23263445522j)*x[0] + ((-0.868766406334+0.648606006839j))*x[1]
            ref[(3, 1, 0)]=(-1.80956199606+0.881240462059j)*dim
            arg[(3, 1, 1)]=(-0.903905774097+0.186221627866j)*x[0] + ((0.0772786524056-0.748437655225j))*x[1]
            ref[(3, 1, 1)]=(-0.826627121691-0.562216027358j)*dim
        else:
            arg[(0, 0, 0)]=(-0.985037271182+0.901666511135j)*x[0] + ((0.984339162573+0.319021919343j))*x[1] + ((0.565770421677-0.728976402153j))*x[2]
            ref[(0, 0, 0)]=(0.565072313068+0.491712028325j)*dim
            arg[(0, 0, 1)]=(-0.890644231132-0.822726629765j)*x[0] + ((-0.531331863966-0.1119639698j))*x[1] + ((0.934583794542+0.985262486921j))*x[2]
            ref[(0, 0, 1)]=(-0.487392300555+0.0505718873563j)*dim
            arg[(0, 1, 0)]=(-0.622802546003+0.251343730723j)*x[0] + ((-0.302262489089+0.0664510908964j))*x[1] + ((0.889540446853+0.28173493394j))*x[2]
            ref[(0, 1, 0)]=(-0.0355245882384+0.59952975556j)*dim
            arg[(0, 1, 1)]=(-0.737729930361+0.0919792320981j)*x[0] + ((-0.378697832208+0.233806872419j))*x[1] + ((0.499714729072-0.281057028528j))*x[2]
            ref[(0, 1, 1)]=(-0.616713033496+0.0447290759893j)*dim
            arg[(1, 0, 0)]=(0.592974608685-0.401111962315j)*x[0] + ((-0.69532779746-0.421680316026j))*x[1] + ((-0.23494346834-0.46802706443j))*x[2]
            ref[(1, 0, 0)]=(-0.337296657115-1.29081934277j)*dim
            arg[(1, 0, 1)]=(0.824768187283-0.627498143016j)*x[0] + ((-0.0128202617826-0.573330533101j))*x[1] + ((-0.550684441004+0.242464645607j))*x[2]
            ref[(1, 0, 1)]=(0.261263484497-0.958364030509j)*dim
            arg[(1, 1, 0)]=(0.113097430924+0.650610860799j)*x[0] + ((0.236178999552+0.211316383579j))*x[1] + ((-0.088683592355+0.199486453834j))*x[2]
            ref[(1, 1, 0)]=(0.260592838121+1.06141369821j)*dim
            arg[(1, 1, 1)]=(0.0346895472615+0.808207383515j)*x[0] + ((0.989986514045-0.681880862933j))*x[1] + ((-0.104692505931-0.232588586284j))*x[2]
            ref[(1, 1, 1)]=(0.919983555375-0.106262065702j)*dim
            arg[(2, 0, 0)]=(-0.740790642834-0.32394895252j)*x[0] + ((-0.849751794987+0.776945830872j))*x[1] + ((-0.868633419021-0.892902742097j))*x[2]
            ref[(2, 0, 0)]=(-2.45917585684-0.439905863746j)*dim
            arg[(2, 0, 1)]=(-0.607226371254+0.981075734193j)*x[0] + ((0.820247685715+0.769491704101j))*x[1] + ((-0.446337624891+0.451748072513j))*x[2]
            ref[(2, 0, 1)]=(-0.233316310429+2.20231551081j)*dim
            arg[(2, 1, 0)]=(0.735791555792-0.430591049454j)*x[0] + ((0.453641280465+0.732174641367j))*x[1] + ((-0.848812444006-0.948053497748j))*x[2]
            ref[(2, 1, 0)]=(0.340620392251-0.646469905835j)*dim
            arg[(2, 1, 1)]=(-0.759064819032-0.257141115212j)*x[0] + ((-0.278000639521-0.22458369277j))*x[1] + ((0.129421027+0.24167975595j))*x[2]
            ref[(2, 1, 1)]=(-0.907644431553-0.240045052032j)*dim
            arg[(3, 0, 0)]=(-0.308980633539+0.451161170043j)*x[0] + ((0.917937346711-0.0612759408611j))*x[1] + ((-0.367309765002-0.346532961758j))*x[2]
            ref[(3, 0, 0)]=(0.24164694817+0.0433522674235j)*dim
            arg[(3, 0, 1)]=(-0.308801826265+0.0716256262574j)*x[0] + ((0.418511284388-0.659015864015j))*x[1] + ((-0.938534702041-0.442175379258j))*x[2]
            ref[(3, 0, 1)]=(-0.828825243917-1.02956561702j)*dim
            arg[(3, 1, 0)]=(-0.616680462491-0.107843012586j)*x[0] + ((-0.206943013254-0.593415575389j))*x[1] + ((0.63130362583-0.938584919568j))*x[2]
            ref[(3, 1, 0)]=(-0.192319849915-1.63984350754j)*dim
            arg[(3, 1, 1)]=(0.971150175366+0.570711447062j)*x[0] + ((-0.060849134699+0.118554226893j))*x[1] + ((0.06376668082+0.910474554062j))*x[2]
            ref[(3, 1, 1)]=(0.974067721487+1.59974022802j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3, 4),w)
        ref=numpy.zeros((3, 3, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.418338231795+0.156689594458j)*x[0] + ((0.85757097277+0.457590016644j))*x[1]
            ref[(0, 0, 0, 0)]=(1.27590920457+0.614279611102j)*dim
            arg[(0, 0, 0, 1)]=(0.857572527625-0.237087183964j)*x[0] + ((-0.99234741488-0.821828876071j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.134774887255-1.05891606004j)*dim
            arg[(0, 0, 0, 2)]=(-0.288887134608-0.544411063001j)*x[0] + ((0.110960637399+0.277202906615j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.177926497209-0.267208156386j)*dim
            arg[(0, 0, 0, 3)]=(-0.082710869777-0.0866149434465j)*x[0] + ((-0.753811358993-0.412975259288j))*x[1]
            ref[(0, 0, 0, 3)]=(-0.836522228769-0.499590202734j)*dim
            arg[(0, 0, 1, 0)]=(0.015331194878-0.610527641359j)*x[0] + ((-0.212745906209+0.245096300871j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.197414711331-0.365431340487j)*dim
            arg[(0, 0, 1, 1)]=(-0.218307802227-0.852712706395j)*x[0] + ((0.0491712964396-0.721532004435j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.169136505787-1.57424471083j)*dim
            arg[(0, 0, 1, 2)]=(-0.854953598246-0.520270890244j)*x[0] + ((-0.0161594152806-0.0338301936302j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.871113013527-0.554101083874j)*dim
            arg[(0, 0, 1, 3)]=(-0.824410152476+0.202945537705j)*x[0] + ((0.857044839731-0.519632179287j))*x[1]
            ref[(0, 0, 1, 3)]=(0.0326346872557-0.316686641581j)*dim
            arg[(0, 0, 2, 0)]=(0.165206341399-0.700334695796j)*x[0] + ((0.816683976528+0.269505776386j))*x[1]
            ref[(0, 0, 2, 0)]=(0.981890317927-0.430828919409j)*dim
            arg[(0, 0, 2, 1)]=(-0.651566047923+0.384405503893j)*x[0] + ((-0.938823744328-0.0220987432708j))*x[1]
            ref[(0, 0, 2, 1)]=(-1.59038979225+0.362306760622j)*dim
            arg[(0, 0, 2, 2)]=(0.0764494320756+0.337316726945j)*x[0] + ((-0.268318439718-0.134947859287j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.191869007642+0.202368867658j)*dim
            arg[(0, 0, 2, 3)]=(-0.0256205760784-0.0278269999554j)*x[0] + ((0.906282298469+0.364848230729j))*x[1]
            ref[(0, 0, 2, 3)]=(0.88066172239+0.337021230774j)*dim
            arg[(0, 1, 0, 0)]=(-0.447386626545-0.937063557109j)*x[0] + ((-0.860543154284+0.727584966122j))*x[1]
            ref[(0, 1, 0, 0)]=(-1.30792978083-0.209478590987j)*dim
            arg[(0, 1, 0, 1)]=(0.0210556244741-0.56319419285j)*x[0] + ((0.0809236050193-0.49554714296j))*x[1]
            ref[(0, 1, 0, 1)]=(0.101979229493-1.05874133581j)*dim
            arg[(0, 1, 0, 2)]=(0.453147871471+0.540088481348j)*x[0] + ((0.79188027442-0.0417390431165j))*x[1]
            ref[(0, 1, 0, 2)]=(1.24502814589+0.498349438232j)*dim
            arg[(0, 1, 0, 3)]=(0.668997954308-0.833603007004j)*x[0] + ((-0.263133009801+0.741466600404j))*x[1]
            ref[(0, 1, 0, 3)]=(0.405864944507-0.0921364065998j)*dim
            arg[(0, 1, 1, 0)]=(0.437660050662-0.49106461342j)*x[0] + ((0.457817282865+0.805156951345j))*x[1]
            ref[(0, 1, 1, 0)]=(0.895477333528+0.314092337924j)*dim
            arg[(0, 1, 1, 1)]=(0.322018828858-0.323079195549j)*x[0] + ((0.290910350549-0.668898751641j))*x[1]
            ref[(0, 1, 1, 1)]=(0.612929179407-0.99197794719j)*dim
            arg[(0, 1, 1, 2)]=(0.347900217325+0.69590752946j)*x[0] + ((0.894434063706+0.0270590212878j))*x[1]
            ref[(0, 1, 1, 2)]=(1.24233428103+0.722966550748j)*dim
            arg[(0, 1, 1, 3)]=(-0.388635449276-0.83170445508j)*x[0] + ((-0.859184159446+0.0295637231856j))*x[1]
            ref[(0, 1, 1, 3)]=(-1.24781960872-0.802140731895j)*dim
            arg[(0, 1, 2, 0)]=(-0.729004029805+0.91124686271j)*x[0] + ((-0.65758610542+0.706291802461j))*x[1]
            ref[(0, 1, 2, 0)]=(-1.38659013523+1.61753866517j)*dim
            arg[(0, 1, 2, 1)]=(0.864059247473-0.106060792647j)*x[0] + ((0.425214447753+0.673725178774j))*x[1]
            ref[(0, 1, 2, 1)]=(1.28927369523+0.567664386127j)*dim
            arg[(0, 1, 2, 2)]=(-0.229446451816-0.902550363007j)*x[0] + ((-0.334582233182-0.0703314224266j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.564028684998-0.972881785434j)*dim
            arg[(0, 1, 2, 3)]=(-0.17881108915+0.615487714215j)*x[0] + ((0.81079652247-0.902238757373j))*x[1]
            ref[(0, 1, 2, 3)]=(0.63198543332-0.286751043158j)*dim
            arg[(0, 2, 0, 0)]=(-0.224086827016-0.509828601233j)*x[0] + ((0.893905444744+0.794650189387j))*x[1]
            ref[(0, 2, 0, 0)]=(0.669818617729+0.284821588154j)*dim
            arg[(0, 2, 0, 1)]=(0.71423001373+0.221890233408j)*x[0] + ((0.886956187088+0.561997346724j))*x[1]
            ref[(0, 2, 0, 1)]=(1.60118620082+0.783887580131j)*dim
            arg[(0, 2, 0, 2)]=(-0.522529958183+0.314417506997j)*x[0] + ((-0.494487629842+0.0910335320739j))*x[1]
            ref[(0, 2, 0, 2)]=(-1.01701758802+0.405451039071j)*dim
            arg[(0, 2, 0, 3)]=(0.730638229218-0.994858892618j)*x[0] + ((-0.218948782015+0.312045371362j))*x[1]
            ref[(0, 2, 0, 3)]=(0.511689447203-0.682813521256j)*dim
            arg[(0, 2, 1, 0)]=(0.0128828144154+0.336123730521j)*x[0] + ((0.505098866449-0.0250776361444j))*x[1]
            ref[(0, 2, 1, 0)]=(0.517981680865+0.311046094376j)*dim
            arg[(0, 2, 1, 1)]=(0.948672034922-0.0186918339711j)*x[0] + ((0.245963978088+0.770973722811j))*x[1]
            ref[(0, 2, 1, 1)]=(1.19463601301+0.75228188884j)*dim
            arg[(0, 2, 1, 2)]=(0.688303662185-0.1751943347j)*x[0] + ((0.763285711569-0.554691948641j))*x[1]
            ref[(0, 2, 1, 2)]=(1.45158937375-0.729886283341j)*dim
            arg[(0, 2, 1, 3)]=(-0.153669623391+0.800869062481j)*x[0] + ((-0.460529580629+0.490348206432j))*x[1]
            ref[(0, 2, 1, 3)]=(-0.61419920402+1.29121726891j)*dim
            arg[(0, 2, 2, 0)]=(-0.81937082735+0.896124537031j)*x[0] + ((-0.311301398893-0.0671403172022j))*x[1]
            ref[(0, 2, 2, 0)]=(-1.13067222624+0.828984219829j)*dim
            arg[(0, 2, 2, 1)]=(-0.777088846941+0.179131181979j)*x[0] + ((-0.757172990765+0.665828063086j))*x[1]
            ref[(0, 2, 2, 1)]=(-1.53426183771+0.844959245065j)*dim
            arg[(0, 2, 2, 2)]=(0.501165312026+0.448289020356j)*x[0] + ((0.592321800344-0.471523529161j))*x[1]
            ref[(0, 2, 2, 2)]=(1.09348711237-0.0232345088043j)*dim
            arg[(0, 2, 2, 3)]=(-0.049852777388-0.670497788368j)*x[0] + ((0.224463240502+0.00818302478074j))*x[1]
            ref[(0, 2, 2, 3)]=(0.174610463114-0.662314763587j)*dim
            arg[(1, 0, 0, 0)]=(0.144014779865+0.710862644086j)*x[0] + ((-0.985883066275-0.501662034552j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.84186828641+0.209200609534j)*dim
            arg[(1, 0, 0, 1)]=(0.414279331408-0.920346881466j)*x[0] + ((-0.61401571617-0.198149167213j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.199736384761-1.11849604868j)*dim
            arg[(1, 0, 0, 2)]=(0.44695051102-0.709045499589j)*x[0] + ((-0.457822105476+0.297955682074j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.0108715944563-0.411089817515j)*dim
            arg[(1, 0, 0, 3)]=(0.401984540839-0.103817615356j)*x[0] + ((0.405670561938-0.0201518892121j))*x[1]
            ref[(1, 0, 0, 3)]=(0.807655102777-0.123969504568j)*dim
            arg[(1, 0, 1, 0)]=(-0.0711213075166-0.357083344761j)*x[0] + ((-0.722165488677-0.0235199715099j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.793286796193-0.38060331627j)*dim
            arg[(1, 0, 1, 1)]=(0.706641775327-0.244062379478j)*x[0] + ((0.0209490436108+0.199110460363j))*x[1]
            ref[(1, 0, 1, 1)]=(0.727590818938-0.0449519191152j)*dim
            arg[(1, 0, 1, 2)]=(-0.119011211632-0.169563485613j)*x[0] + ((-0.0420126613133+0.614913466339j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.161023872945+0.445349980726j)*dim
            arg[(1, 0, 1, 3)]=(-0.305025543772-0.371507042727j)*x[0] + ((-0.11587197517-0.807826313339j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.420897518942-1.17933335607j)*dim
            arg[(1, 0, 2, 0)]=(0.937630675553+0.132461330714j)*x[0] + ((-0.0327751272307-0.722724876606j))*x[1]
            ref[(1, 0, 2, 0)]=(0.904855548322-0.590263545893j)*dim
            arg[(1, 0, 2, 1)]=(-0.859009227041+0.0977453278125j)*x[0] + ((-0.541670128065+0.830817178416j))*x[1]
            ref[(1, 0, 2, 1)]=(-1.40067935511+0.928562506228j)*dim
            arg[(1, 0, 2, 2)]=(0.180541496034+0.790432681687j)*x[0] + ((-0.233094600052-0.55228440437j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.0525531040176+0.238148277318j)*dim
            arg[(1, 0, 2, 3)]=(-0.931819027378+0.714268615299j)*x[0] + ((0.0416988309583+0.422554914906j))*x[1]
            ref[(1, 0, 2, 3)]=(-0.89012019642+1.13682353021j)*dim
            arg[(1, 1, 0, 0)]=(-0.714870162746-0.958823733176j)*x[0] + ((-0.546999527316-0.813515040184j))*x[1]
            ref[(1, 1, 0, 0)]=(-1.26186969006-1.77233877336j)*dim
            arg[(1, 1, 0, 1)]=(-0.0115746017258+0.89063805927j)*x[0] + ((0.859954876884+0.610429789107j))*x[1]
            ref[(1, 1, 0, 1)]=(0.848380275159+1.50106784838j)*dim
            arg[(1, 1, 0, 2)]=(-0.573162969751+0.00365137378782j)*x[0] + ((-0.129676578876+0.627798823888j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.702839548627+0.631450197676j)*dim
            arg[(1, 1, 0, 3)]=(0.860829068791+0.912180567274j)*x[0] + ((-0.786068780656-0.190467190145j))*x[1]
            ref[(1, 1, 0, 3)]=(0.0747602881352+0.721713377129j)*dim
            arg[(1, 1, 1, 0)]=(-0.770316675431+0.809087134477j)*x[0] + ((0.548081588579-0.630245730267j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.222235086853+0.17884140421j)*dim
            arg[(1, 1, 1, 1)]=(-0.64654709367-0.0339801318201j)*x[0] + ((-0.698166643222+0.824288328948j))*x[1]
            ref[(1, 1, 1, 1)]=(-1.34471373689+0.790308197128j)*dim
            arg[(1, 1, 1, 2)]=(0.750938184116+0.339263260842j)*x[0] + ((0.733764218916-0.365781146201j))*x[1]
            ref[(1, 1, 1, 2)]=(1.48470240303-0.0265178853595j)*dim
            arg[(1, 1, 1, 3)]=(-0.220041231619-0.526006163532j)*x[0] + ((0.892427785274+0.115395441353j))*x[1]
            ref[(1, 1, 1, 3)]=(0.672386553655-0.410610722179j)*dim
            arg[(1, 1, 2, 0)]=(-0.41908429616+0.577341466318j)*x[0] + ((-0.805903251251-0.417984173588j))*x[1]
            ref[(1, 1, 2, 0)]=(-1.22498754741+0.15935729273j)*dim
            arg[(1, 1, 2, 1)]=(-0.640243230219-0.110515054131j)*x[0] + ((-0.603600889711+0.914444244555j))*x[1]
            ref[(1, 1, 2, 1)]=(-1.24384411993+0.803929190425j)*dim
            arg[(1, 1, 2, 2)]=(0.805096353048+0.997426385994j)*x[0] + ((-0.809570908789-0.665212761367j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.00447455574065+0.332213624628j)*dim
            arg[(1, 1, 2, 3)]=(-0.353375984373+0.821467495544j)*x[0] + ((0.94492140098-0.11770625138j))*x[1]
            ref[(1, 1, 2, 3)]=(0.591545416607+0.703761244164j)*dim
            arg[(1, 2, 0, 0)]=(-0.365711235099-0.651739120678j)*x[0] + ((-0.736353640414+0.901543423561j))*x[1]
            ref[(1, 2, 0, 0)]=(-1.10206487551+0.249804302884j)*dim
            arg[(1, 2, 0, 1)]=(0.331202959994+0.131892873471j)*x[0] + ((-0.0173955778838+0.459766035169j))*x[1]
            ref[(1, 2, 0, 1)]=(0.31380738211+0.591658908639j)*dim
            arg[(1, 2, 0, 2)]=(0.197640874879-0.45586027631j)*x[0] + ((0.699662423085+0.00214093575115j))*x[1]
            ref[(1, 2, 0, 2)]=(0.897303297964-0.453719340559j)*dim
            arg[(1, 2, 0, 3)]=(-0.646855663051-0.619544840444j)*x[0] + ((-0.375531420538-0.561641920456j))*x[1]
            ref[(1, 2, 0, 3)]=(-1.02238708359-1.1811867609j)*dim
            arg[(1, 2, 1, 0)]=(-0.480526928766+0.47772021399j)*x[0] + ((-0.416550229394-0.244225616764j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.89707715816+0.233494597225j)*dim
            arg[(1, 2, 1, 1)]=(-0.511925253498+0.248381064916j)*x[0] + ((0.40080416874+0.247021818709j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.111121084758+0.495402883625j)*dim
            arg[(1, 2, 1, 2)]=(-0.848673201659-0.531177354898j)*x[0] + ((-0.563530549278+0.55730064223j))*x[1]
            ref[(1, 2, 1, 2)]=(-1.41220375094+0.0261232873324j)*dim
            arg[(1, 2, 1, 3)]=(-0.849054948724+0.62167607867j)*x[0] + ((0.519770759457+0.736706492286j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.329284189266+1.35838257096j)*dim
            arg[(1, 2, 2, 0)]=(0.0702328772733+0.660049372353j)*x[0] + ((-0.299970355564-0.881633236421j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.22973747829-0.221583864068j)*dim
            arg[(1, 2, 2, 1)]=(0.549960177803+0.375734258626j)*x[0] + ((0.463820580248+0.685490435085j))*x[1]
            ref[(1, 2, 2, 1)]=(1.01378075805+1.06122469371j)*dim
            arg[(1, 2, 2, 2)]=(-0.191074341477+0.253724809155j)*x[0] + ((0.644919668798+0.333477239988j))*x[1]
            ref[(1, 2, 2, 2)]=(0.453845327321+0.587202049144j)*dim
            arg[(1, 2, 2, 3)]=(0.0088320860021-0.287899590603j)*x[0] + ((0.225402452992+0.0737841698916j))*x[1]
            ref[(1, 2, 2, 3)]=(0.234234538994-0.214115420711j)*dim
            arg[(2, 0, 0, 0)]=(0.525330672747-0.947865971729j)*x[0] + ((-0.0136061362188+0.820337546358j))*x[1]
            ref[(2, 0, 0, 0)]=(0.511724536528-0.127528425371j)*dim
            arg[(2, 0, 0, 1)]=(0.339050216408+0.461329469527j)*x[0] + ((0.255278793783+0.390780248444j))*x[1]
            ref[(2, 0, 0, 1)]=(0.59432901019+0.852109717971j)*dim
            arg[(2, 0, 0, 2)]=(0.704751955367-0.622422695178j)*x[0] + ((0.228787106918+0.494547868145j))*x[1]
            ref[(2, 0, 0, 2)]=(0.933539062285-0.127874827033j)*dim
            arg[(2, 0, 0, 3)]=(0.235168108274+0.892082707044j)*x[0] + ((0.644446023324-0.476335500942j))*x[1]
            ref[(2, 0, 0, 3)]=(0.879614131598+0.415747206103j)*dim
            arg[(2, 0, 1, 0)]=(-0.602702827496-0.72560467397j)*x[0] + ((0.969560111586+0.0344441654512j))*x[1]
            ref[(2, 0, 1, 0)]=(0.36685728409-0.691160508519j)*dim
            arg[(2, 0, 1, 1)]=(0.38971136554+0.643205843446j)*x[0] + ((0.0372676493845+0.396518001675j))*x[1]
            ref[(2, 0, 1, 1)]=(0.426979014924+1.03972384512j)*dim
            arg[(2, 0, 1, 2)]=(-0.809276167305-0.732661104601j)*x[0] + ((-0.714437802902-0.329334104602j))*x[1]
            ref[(2, 0, 1, 2)]=(-1.52371397021-1.0619952092j)*dim
            arg[(2, 0, 1, 3)]=(-0.114827827357-0.937020924063j)*x[0] + ((0.427912906428+0.34716493098j))*x[1]
            ref[(2, 0, 1, 3)]=(0.313085079072-0.589855993083j)*dim
            arg[(2, 0, 2, 0)]=(-0.367868051329-0.908357872953j)*x[0] + ((-0.012099209102-0.778788997138j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.379967260431-1.68714687009j)*dim
            arg[(2, 0, 2, 1)]=(0.962364347537-0.686248477748j)*x[0] + ((-0.388603411646+0.716157403267j))*x[1]
            ref[(2, 0, 2, 1)]=(0.573760935891+0.0299089255195j)*dim
            arg[(2, 0, 2, 2)]=(-0.155665645994-0.16120537877j)*x[0] + ((0.855750234766-0.430278165401j))*x[1]
            ref[(2, 0, 2, 2)]=(0.700084588771-0.591483544171j)*dim
            arg[(2, 0, 2, 3)]=(0.313437379156-0.572795863549j)*x[0] + ((0.830604810895+0.505815998591j))*x[1]
            ref[(2, 0, 2, 3)]=(1.14404219005-0.0669798649585j)*dim
            arg[(2, 1, 0, 0)]=(0.0568917869014-0.527333229568j)*x[0] + ((-0.148614935791+0.771222699089j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.0917231488899+0.243889469521j)*dim
            arg[(2, 1, 0, 1)]=(0.954598107269+0.609692841329j)*x[0] + ((-0.511106896427-0.0156729409075j))*x[1]
            ref[(2, 1, 0, 1)]=(0.443491210842+0.594019900422j)*dim
            arg[(2, 1, 0, 2)]=(0.97487802039-0.194160044485j)*x[0] + ((0.839558005124-0.352058445696j))*x[1]
            ref[(2, 1, 0, 2)]=(1.81443602551-0.546218490182j)*dim
            arg[(2, 1, 0, 3)]=(0.619430410476+0.16547604453j)*x[0] + ((0.597204870207+0.350855683976j))*x[1]
            ref[(2, 1, 0, 3)]=(1.21663528068+0.516331728505j)*dim
            arg[(2, 1, 1, 0)]=(-0.617309113323-0.707751773725j)*x[0] + ((-0.827635532248+0.167477911617j))*x[1]
            ref[(2, 1, 1, 0)]=(-1.44494464557-0.540273862108j)*dim
            arg[(2, 1, 1, 1)]=(0.145387940205-0.0276769226667j)*x[0] + ((-0.443604329327-0.44273449922j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.298216389123-0.470411421886j)*dim
            arg[(2, 1, 1, 2)]=(0.597307486086-0.21430161375j)*x[0] + ((-0.229343025594+0.440056406689j))*x[1]
            ref[(2, 1, 1, 2)]=(0.367964460492+0.225754792939j)*dim
            arg[(2, 1, 1, 3)]=(0.497304869604-0.273190258457j)*x[0] + ((0.67438601772+0.303585115359j))*x[1]
            ref[(2, 1, 1, 3)]=(1.17169088732+0.0303948569018j)*dim
            arg[(2, 1, 2, 0)]=(-0.213784214654+0.727152294159j)*x[0] + ((-0.0550577645519+0.440086366949j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.268841979205+1.16723866111j)*dim
            arg[(2, 1, 2, 1)]=(-0.14834759063+0.731389671919j)*x[0] + ((-0.785704594129+0.281900124924j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.934052184759+1.01328979684j)*dim
            arg[(2, 1, 2, 2)]=(0.382853625184+0.875670633645j)*x[0] + ((-0.767021182891+0.280833344149j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.384167557707+1.15650397779j)*dim
            arg[(2, 1, 2, 3)]=(-0.386647902053-0.299818191233j)*x[0] + ((-0.516127297181+0.653308619439j))*x[1]
            ref[(2, 1, 2, 3)]=(-0.902775199234+0.353490428206j)*dim
            arg[(2, 2, 0, 0)]=(0.749051717071+0.683695083214j)*x[0] + ((0.23649766226-0.830089993932j))*x[1]
            ref[(2, 2, 0, 0)]=(0.985549379331-0.146394910718j)*dim
            arg[(2, 2, 0, 1)]=(-0.840878134801+0.197499573307j)*x[0] + ((-0.387252550151+0.180383872591j))*x[1]
            ref[(2, 2, 0, 1)]=(-1.22813068495+0.377883445898j)*dim
            arg[(2, 2, 0, 2)]=(-0.173991340571+0.523431196457j)*x[0] + ((0.106488731691-0.209861793491j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.0675026088804+0.313569402966j)*dim
            arg[(2, 2, 0, 3)]=(0.75893757823+0.38204062739j)*x[0] + ((0.490450299775-0.0428026469582j))*x[1]
            ref[(2, 2, 0, 3)]=(1.249387878+0.339237980431j)*dim
            arg[(2, 2, 1, 0)]=(-0.280513683407-0.3446624044j)*x[0] + ((-0.815497854919-0.378722612727j))*x[1]
            ref[(2, 2, 1, 0)]=(-1.09601153833-0.723385017127j)*dim
            arg[(2, 2, 1, 1)]=(0.111451699055+0.966180151383j)*x[0] + ((0.109375486011+0.441484611218j))*x[1]
            ref[(2, 2, 1, 1)]=(0.220827185066+1.4076647626j)*dim
            arg[(2, 2, 1, 2)]=(0.502545067455+0.426992832871j)*x[0] + ((-0.559777471009+0.859993356082j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.0572324035537+1.28698618895j)*dim
            arg[(2, 2, 1, 3)]=(-0.661788610562+0.24643962575j)*x[0] + ((0.770887331007+0.03754023391j))*x[1]
            ref[(2, 2, 1, 3)]=(0.109098720445+0.28397985966j)*dim
            arg[(2, 2, 2, 0)]=(0.621344109343+0.480095644628j)*x[0] + ((-0.49948603492+0.623459476034j))*x[1]
            ref[(2, 2, 2, 0)]=(0.121858074423+1.10355512066j)*dim
            arg[(2, 2, 2, 1)]=(0.276624838782+0.770473245797j)*x[0] + ((0.479404248379-0.577375377626j))*x[1]
            ref[(2, 2, 2, 1)]=(0.756029087161+0.193097868171j)*dim
            arg[(2, 2, 2, 2)]=(0.616547290812-0.275347288796j)*x[0] + ((-0.402412547499-0.745697042836j))*x[1]
            ref[(2, 2, 2, 2)]=(0.214134743313-1.02104433163j)*dim
            arg[(2, 2, 2, 3)]=(0.783414312794+0.115557585809j)*x[0] + ((0.846201657038+0.00764304614932j))*x[1]
            ref[(2, 2, 2, 3)]=(1.62961596983+0.123200631959j)*dim
        else:
            arg[(0, 0, 0, 0)]=(0.167037403832-0.669533924736j)*x[0] + ((-0.450673889911-0.420307069698j))*x[1] + ((0.841895544743+0.772520882731j))*x[2]
            ref[(0, 0, 0, 0)]=(0.558259058664-0.317320111703j)*dim
            arg[(0, 0, 0, 1)]=(0.253243859718-0.425661387323j)*x[0] + ((0.927210554098-0.624872319734j))*x[1] + ((-0.436267757406-0.974645631005j))*x[2]
            ref[(0, 0, 0, 1)]=(0.744186656409-2.02517933806j)*dim
            arg[(0, 0, 0, 2)]=(-0.147061776627-0.328291092712j)*x[0] + ((0.0642842409406+0.808067038595j))*x[1] + ((0.996961624388-0.572547592481j))*x[2]
            ref[(0, 0, 0, 2)]=(0.914184088701-0.0927716465985j)*dim
            arg[(0, 0, 0, 3)]=(0.141433368541+0.496201180737j)*x[0] + ((-0.397665060141-0.522846437887j))*x[1] + ((-0.882397483687-0.971200679918j))*x[2]
            ref[(0, 0, 0, 3)]=(-1.13862917529-0.997845937068j)*dim
            arg[(0, 0, 1, 0)]=(-0.926014131942-0.639332146943j)*x[0] + ((-0.76262929956-0.0834224291679j))*x[1] + ((-0.4006679656-0.144123617387j))*x[2]
            ref[(0, 0, 1, 0)]=(-2.0893113971-0.866878193497j)*dim
            arg[(0, 0, 1, 1)]=(-0.212321217591+0.351906677239j)*x[0] + ((-0.352377051779+0.272087122105j))*x[1] + ((0.502786100883-0.092215215516j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.061912168487+0.531778583829j)*dim
            arg[(0, 0, 1, 2)]=(-0.706517760667-0.645219190674j)*x[0] + ((0.0744801334647-0.0363367530325j))*x[1] + ((0.0830251634686+0.28354685858j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.549012463733-0.398009085126j)*dim
            arg[(0, 0, 1, 3)]=(0.625354863152-0.921932245308j)*x[0] + ((-0.154028601932-0.447019396002j))*x[1] + ((0.930279787339+0.862093139267j))*x[2]
            ref[(0, 0, 1, 3)]=(1.40160604856-0.506858502043j)*dim
            arg[(0, 0, 2, 0)]=(-0.853503202645+0.613762203844j)*x[0] + ((-0.746058599407+0.486775071439j))*x[1] + ((0.0946913920422-0.713324230399j))*x[2]
            ref[(0, 0, 2, 0)]=(-1.50487041001+0.387213044885j)*dim
            arg[(0, 0, 2, 1)]=(0.62817071424-0.124651431456j)*x[0] + ((-0.243518050317+0.217558349475j))*x[1] + ((-0.382316751075-0.941420114234j))*x[2]
            ref[(0, 0, 2, 1)]=(0.00233591284765-0.848513196215j)*dim
            arg[(0, 0, 2, 2)]=(-0.211082111253+0.275378804381j)*x[0] + ((0.0308129987478+0.439968079879j))*x[1] + ((-0.892050380774-0.603324631113j))*x[2]
            ref[(0, 0, 2, 2)]=(-1.07231949328+0.112022253146j)*dim
            arg[(0, 0, 2, 3)]=(0.154876171664-0.256517122593j)*x[0] + ((0.574573934534-0.0221852383649j))*x[1] + ((-0.849469937513+0.510129145637j))*x[2]
            ref[(0, 0, 2, 3)]=(-0.120019831315+0.231426784678j)*dim
            arg[(0, 1, 0, 0)]=(-0.5958200614-0.999423076843j)*x[0] + ((-0.00944169167642+0.0583457858798j))*x[1] + ((0.928378257689+0.741702854182j))*x[2]
            ref[(0, 1, 0, 0)]=(0.323116504613-0.199374436782j)*dim
            arg[(0, 1, 0, 1)]=(0.88520358627+0.361233945631j)*x[0] + ((0.0476601559939+0.650695851431j))*x[1] + ((-0.47942526746+0.96706129169j))*x[2]
            ref[(0, 1, 0, 1)]=(0.453438474804+1.97899108875j)*dim
            arg[(0, 1, 0, 2)]=(-0.874976500988-0.786834107746j)*x[0] + ((0.823172933593+0.384146924044j))*x[1] + ((-0.982270097437-0.939087951796j))*x[2]
            ref[(0, 1, 0, 2)]=(-1.03407366483-1.3417751355j)*dim
            arg[(0, 1, 0, 3)]=(-0.173796172695+0.0817109676487j)*x[0] + ((-0.990454686481+0.94157192954j))*x[1] + ((-0.0964817339552+0.87346802646j))*x[2]
            ref[(0, 1, 0, 3)]=(-1.26073259313+1.89675092365j)*dim
            arg[(0, 1, 1, 0)]=(-0.896987008396-0.668735420976j)*x[0] + ((-0.765954189728-0.520798653019j))*x[1] + ((0.383040273563-0.526714795337j))*x[2]
            ref[(0, 1, 1, 0)]=(-1.27990092456-1.71624886933j)*dim
            arg[(0, 1, 1, 1)]=(-0.131739397652+0.202596646222j)*x[0] + ((0.925398550611-0.429040773436j))*x[1] + ((0.536822259657+0.0319299899617j))*x[2]
            ref[(0, 1, 1, 1)]=(1.33048141262-0.194514137252j)*dim
            arg[(0, 1, 1, 2)]=(0.504574337345-0.905844975351j)*x[0] + ((-0.654692729136-0.723155886591j))*x[1] + ((0.637872591188-0.164037409j))*x[2]
            ref[(0, 1, 1, 2)]=(0.487754199396-1.79303827094j)*dim
            arg[(0, 1, 1, 3)]=(0.537363212269+0.0477304275092j)*x[0] + ((-0.64424101621-0.0569356441937j))*x[1] + ((-0.555204023333+0.770409038478j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.662081827274+0.761203821794j)*dim
            arg[(0, 1, 2, 0)]=(-0.152395507603+0.456898667979j)*x[0] + ((0.0230380771277-0.611056048531j))*x[1] + ((-0.5664323256-0.432805122803j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.695789756075-0.586962503356j)*dim
            arg[(0, 1, 2, 1)]=(-0.104068157504-0.288755791601j)*x[0] + ((0.466666501519-0.343746738647j))*x[1] + ((0.330326730377-0.428432389621j))*x[2]
            ref[(0, 1, 2, 1)]=(0.692925074392-1.06093491987j)*dim
            arg[(0, 1, 2, 2)]=(0.458571496918+0.356877059122j)*x[0] + ((-0.626791499391-0.915203231425j))*x[1] + ((0.581222157969+0.61621448188j))*x[2]
            ref[(0, 1, 2, 2)]=(0.413002155496+0.0578883095778j)*dim
            arg[(0, 1, 2, 3)]=(-0.829784962803-0.958028659288j)*x[0] + ((-0.153165835606+0.482489325815j))*x[1] + ((0.0781627556028+0.46023110739j))*x[2]
            ref[(0, 1, 2, 3)]=(-0.904788042806-0.0153082260829j)*dim
            arg[(0, 2, 0, 0)]=(0.549088282934-0.115904304381j)*x[0] + ((0.049521827642-0.445771053822j))*x[1] + ((-0.763555686806+0.577369648978j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.16494557623+0.015694290774j)*dim
            arg[(0, 2, 0, 1)]=(0.64546295267-0.236627822774j)*x[0] + ((-0.0117321698731+0.707960525377j))*x[1] + ((-0.619854704458+0.68040105923j))*x[2]
            ref[(0, 2, 0, 1)]=(0.0138760783393+1.15173376183j)*dim
            arg[(0, 2, 0, 2)]=(-0.424681359209+0.929086612844j)*x[0] + ((0.6674700373-0.85184708154j))*x[1] + ((0.664910920619-0.149540653408j))*x[2]
            ref[(0, 2, 0, 2)]=(0.90769959871-0.0723011221042j)*dim
            arg[(0, 2, 0, 3)]=(0.786334507976+0.238229953688j)*x[0] + ((0.116424352984+0.230678210807j))*x[1] + ((-0.482882532217+0.0916403297507j))*x[2]
            ref[(0, 2, 0, 3)]=(0.419876328743+0.560548494246j)*dim
            arg[(0, 2, 1, 0)]=(0.508035197358+0.578774602701j)*x[0] + ((0.921670419603-0.261389147751j))*x[1] + ((0.637779658179-0.822680159092j))*x[2]
            ref[(0, 2, 1, 0)]=(2.06748527514-0.505294704143j)*dim
            arg[(0, 2, 1, 1)]=(-0.725191742794-0.95974644336j)*x[0] + ((-0.271477842121+0.793960945615j))*x[1] + ((-0.150937730265+0.154812045138j))*x[2]
            ref[(0, 2, 1, 1)]=(-1.14760731518-0.010973452608j)*dim
            arg[(0, 2, 1, 2)]=(-0.494129430375+0.394834009285j)*x[0] + ((0.284713287219+0.463889020061j))*x[1] + ((0.882741203089-0.438137931425j))*x[2]
            ref[(0, 2, 1, 2)]=(0.673325059932+0.42058509792j)*dim
            arg[(0, 2, 1, 3)]=(0.216017597157+0.273689087472j)*x[0] + ((-0.443373436224+0.539979983364j))*x[1] + ((0.766373303762+0.688741734594j))*x[2]
            ref[(0, 2, 1, 3)]=(0.539017464695+1.50241080543j)*dim
            arg[(0, 2, 2, 0)]=(-0.803479344455+0.167036063637j)*x[0] + ((-0.0237436692381+0.294840269197j))*x[1] + ((-0.503784832857-0.580774780269j))*x[2]
            ref[(0, 2, 2, 0)]=(-1.33100784655-0.118898447435j)*dim
            arg[(0, 2, 2, 1)]=(-0.914283912784+0.160988535626j)*x[0] + ((0.494966150287-0.598795306774j))*x[1] + ((-0.385831330082+0.895618797987j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.805149092579+0.457812026839j)*dim
            arg[(0, 2, 2, 2)]=(0.0765915618866-0.297531891547j)*x[0] + ((-0.869528061003+0.90140772561j))*x[1] + ((-0.649672253472+0.736164322184j))*x[2]
            ref[(0, 2, 2, 2)]=(-1.44260875259+1.34004015625j)*dim
            arg[(0, 2, 2, 3)]=(-0.260604245202-0.592662788808j)*x[0] + ((0.902211925492-0.559001274648j))*x[1] + ((0.158464870431+0.929382890538j))*x[2]
            ref[(0, 2, 2, 3)]=(0.800072550721-0.222281172917j)*dim
            arg[(1, 0, 0, 0)]=(0.149451692454-0.963453006793j)*x[0] + ((-0.267327636402-0.32546995285j))*x[1] + ((-0.388589137797+0.490438512813j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.506465081746-0.79848444683j)*dim
            arg[(1, 0, 0, 1)]=(-0.206791445669+0.782692054861j)*x[0] + ((0.275052642503+0.624203355781j))*x[1] + ((0.517503976753-0.565235284012j))*x[2]
            ref[(1, 0, 0, 1)]=(0.585765173587+0.841660126631j)*dim
            arg[(1, 0, 0, 2)]=(0.170670918593-0.835805180979j)*x[0] + ((-0.268319201182-0.231498707577j))*x[1] + ((0.334885824948+0.701761934116j))*x[2]
            ref[(1, 0, 0, 2)]=(0.237237542359-0.36554195444j)*dim
            arg[(1, 0, 0, 3)]=(-0.765025280565+0.896562411158j)*x[0] + ((0.457047403723-0.956489438786j))*x[1] + ((-0.827664272456+0.0285765525983j))*x[2]
            ref[(1, 0, 0, 3)]=(-1.1356421493-0.03135047503j)*dim
            arg[(1, 0, 1, 0)]=(0.400606896408-0.86272109684j)*x[0] + ((-0.181306104856-0.784516713748j))*x[1] + ((-0.340189804413+0.134209379569j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.120889012861-1.51302843102j)*dim
            arg[(1, 0, 1, 1)]=(0.716318229196+0.0322045494094j)*x[0] + ((0.646855605262+0.532627660534j))*x[1] + ((0.541440279828-0.802156878012j))*x[2]
            ref[(1, 0, 1, 1)]=(1.90461411429-0.237324668069j)*dim
            arg[(1, 0, 1, 2)]=(0.494543877418-0.987608808058j)*x[0] + ((-0.245755432113-0.417613990729j))*x[1] + ((-0.902510686288-0.00556941677053j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.653722240983-1.41079221556j)*dim
            arg[(1, 0, 1, 3)]=(0.477819386242-0.927736681675j)*x[0] + ((0.755680397497-0.345820143943j))*x[1] + ((0.626758121223-0.584954789474j))*x[2]
            ref[(1, 0, 1, 3)]=(1.86025790496-1.85851161509j)*dim
            arg[(1, 0, 2, 0)]=(0.980821639129-0.389506243214j)*x[0] + ((-0.351524855951+0.63200196249j))*x[1] + ((0.0122928193717+0.167615054784j))*x[2]
            ref[(1, 0, 2, 0)]=(0.64158960255+0.41011077406j)*dim
            arg[(1, 0, 2, 1)]=(0.215717996047-0.908221896196j)*x[0] + ((0.36643810042+0.167933196299j))*x[1] + ((0.696434007177+0.799956685166j))*x[2]
            ref[(1, 0, 2, 1)]=(1.27859010364+0.0596679852682j)*dim
            arg[(1, 0, 2, 2)]=(0.122373651497-0.591008304864j)*x[0] + ((-0.369960432932+0.812229663765j))*x[1] + ((-0.667107819944+0.169077924456j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.91469460138+0.390299283357j)*dim
            arg[(1, 0, 2, 3)]=(-0.0885933765526+0.442987206134j)*x[0] + ((0.205751965723+0.00307114000743j))*x[1] + ((0.0730276564424-0.928252663581j))*x[2]
            ref[(1, 0, 2, 3)]=(0.190186245613-0.48219431744j)*dim
            arg[(1, 1, 0, 0)]=(-0.468134822822+0.797780433769j)*x[0] + ((0.157130326123-0.306811297753j))*x[1] + ((-0.435537829542+0.106430070785j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.746542326241+0.5973992068j)*dim
            arg[(1, 1, 0, 1)]=(0.236227703145-0.14954734849j)*x[0] + ((-0.260049215654+0.412316996308j))*x[1] + ((-0.631012738839+0.589405143187j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.654834251347+0.852174791004j)*dim
            arg[(1, 1, 0, 2)]=(0.407176123162-0.389584686159j)*x[0] + ((0.227376882574-0.752165851965j))*x[1] + ((-0.967976573067-0.58042044364j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.333423567331-1.72217098176j)*dim
            arg[(1, 1, 0, 3)]=(0.542788724118-0.167906116927j)*x[0] + ((0.939613035488-0.702110789396j))*x[1] + ((-0.442177195931+0.748137897724j))*x[2]
            ref[(1, 1, 0, 3)]=(1.04022456367-0.121879008599j)*dim
            arg[(1, 1, 1, 0)]=(-0.629337355781+0.844532796476j)*x[0] + ((0.973039160269-0.315731053315j))*x[1] + ((0.553375872413-0.811854240324j))*x[2]
            ref[(1, 1, 1, 0)]=(0.897077676902-0.283052497163j)*dim
            arg[(1, 1, 1, 1)]=(-0.256458396656-0.790853083993j)*x[0] + ((0.889641910577+0.779151788891j))*x[1] + ((0.451981776994-0.261997490512j))*x[2]
            ref[(1, 1, 1, 1)]=(1.08516529091-0.273698785614j)*dim
            arg[(1, 1, 1, 2)]=(0.422004424049+0.920089346042j)*x[0] + ((0.441886859988-0.746563649225j))*x[1] + ((-0.42202450102-0.137225494372j))*x[2]
            ref[(1, 1, 1, 2)]=(0.441866783017+0.0363002024443j)*dim
            arg[(1, 1, 1, 3)]=(0.518267003169+0.167733301866j)*x[0] + ((-0.337707096391+0.920501017125j))*x[1] + ((-0.0765467858133-0.136654364901j))*x[2]
            ref[(1, 1, 1, 3)]=(0.104013120964+0.95157995409j)*dim
            arg[(1, 1, 2, 0)]=(-0.0525438060969-0.259345443328j)*x[0] + ((0.362271853749+0.688071267653j))*x[1] + ((0.31231647862-0.207607952257j))*x[2]
            ref[(1, 1, 2, 0)]=(0.622044526272+0.221117872067j)*dim
            arg[(1, 1, 2, 1)]=(-0.510360102605-0.00770316071024j)*x[0] + ((-0.57308545848-0.110537360427j))*x[1] + ((-0.510384337899-0.83377562443j))*x[2]
            ref[(1, 1, 2, 1)]=(-1.59382989898-0.952016145567j)*dim
            arg[(1, 1, 2, 2)]=(-0.418681090347-0.507090614189j)*x[0] + ((0.609305389973-0.997581214882j))*x[1] + ((0.197515262524+0.891912123871j))*x[2]
            ref[(1, 1, 2, 2)]=(0.388139562151-0.6127597052j)*dim
            arg[(1, 1, 2, 3)]=(-0.112403196795-0.874124517764j)*x[0] + ((0.181954873497+0.562741868097j))*x[1] + ((-0.391162447174-0.404570032567j))*x[2]
            ref[(1, 1, 2, 3)]=(-0.321610770472-0.715952682234j)*dim
            arg[(1, 2, 0, 0)]=(0.776183375451-0.811345571846j)*x[0] + ((-0.283717896591-0.347737331086j))*x[1] + ((-0.336025893154-0.522913467383j))*x[2]
            ref[(1, 2, 0, 0)]=(0.156439585706-1.68199637032j)*dim
            arg[(1, 2, 0, 1)]=(-0.275512512261-0.257540447253j)*x[0] + ((0.574664726198-0.0930151168856j))*x[1] + ((-0.961266024473-0.879157346179j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.662113810536-1.22971291032j)*dim
            arg[(1, 2, 0, 2)]=(0.358776693415-0.330052923754j)*x[0] + ((0.217617529881-0.0457516623643j))*x[1] + ((-0.849742286108-0.116835955644j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.273348062812-0.492640541762j)*dim
            arg[(1, 2, 0, 3)]=(0.505563016689-0.323913844624j)*x[0] + ((0.897030610788+0.248720034502j))*x[1] + ((0.184473338715+0.44577588066j))*x[2]
            ref[(1, 2, 0, 3)]=(1.58706696619+0.370582070539j)*dim
            arg[(1, 2, 1, 0)]=(-0.706563853575-0.410223045247j)*x[0] + ((-0.0853494285416-0.114893781739j))*x[1] + ((-0.399739696868-0.934545711559j))*x[2]
            ref[(1, 2, 1, 0)]=(-1.19165297898-1.45966253854j)*dim
            arg[(1, 2, 1, 1)]=(-0.854465289933-0.646420382217j)*x[0] + ((0.89827528352-0.311380086834j))*x[1] + ((0.389576087914+0.103962404511j))*x[2]
            ref[(1, 2, 1, 1)]=(0.433386081501-0.853838064541j)*dim
            arg[(1, 2, 1, 2)]=(0.91158398964-0.0758573446173j)*x[0] + ((0.00656500218905-0.0493098224772j))*x[1] + ((0.851893683095-0.489593583945j))*x[2]
            ref[(1, 2, 1, 2)]=(1.77004267492-0.614760751039j)*dim
            arg[(1, 2, 1, 3)]=(0.298638748059+0.769990646769j)*x[0] + ((0.340004245131-0.902680416416j))*x[1] + ((0.34313097861-0.027427644522j))*x[2]
            ref[(1, 2, 1, 3)]=(0.9817739718-0.160117414169j)*dim
            arg[(1, 2, 2, 0)]=(-0.293890116003-0.622711868895j)*x[0] + ((0.95325630457+0.69576012669j))*x[1] + ((0.181215463142+0.851012793121j))*x[2]
            ref[(1, 2, 2, 0)]=(0.840581651709+0.924061050915j)*dim
            arg[(1, 2, 2, 1)]=(-0.937631406502+0.837273607246j)*x[0] + ((-0.291233537762+0.45145166636j))*x[1] + ((-0.443425602206-0.53134251472j))*x[2]
            ref[(1, 2, 2, 1)]=(-1.67229054647+0.757382758886j)*dim
            arg[(1, 2, 2, 2)]=(0.29471387033-0.744173869363j)*x[0] + ((-0.93436923146+0.0359261053543j))*x[1] + ((-0.778709973587-0.303697273615j))*x[2]
            ref[(1, 2, 2, 2)]=(-1.41836533472-1.01194503762j)*dim
            arg[(1, 2, 2, 3)]=(-0.664176285551-0.187010621276j)*x[0] + ((-0.911137207435-0.858313137445j))*x[1] + ((0.708289925152+0.558980438471j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.867023567834-0.48634332025j)*dim
            arg[(2, 0, 0, 0)]=(-0.792367908124+0.147845677401j)*x[0] + ((-0.951156951691-0.920543545736j))*x[1] + ((-0.752345302192-0.430478183799j))*x[2]
            ref[(2, 0, 0, 0)]=(-2.49587016201-1.20317605213j)*dim
            arg[(2, 0, 0, 1)]=(-0.690030316906-0.54485995723j)*x[0] + ((-0.331409901729+0.613250858942j))*x[1] + ((-0.111749087801-0.279388098559j))*x[2]
            ref[(2, 0, 0, 1)]=(-1.13318930644-0.210997196847j)*dim
            arg[(2, 0, 0, 2)]=(-0.446230951429+0.609352929827j)*x[0] + ((0.562325114137+0.0200717337783j))*x[1] + ((-0.495238445912+0.483981248607j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.379144283204+1.11340591221j)*dim
            arg[(2, 0, 0, 3)]=(-0.165632002047-0.890959356758j)*x[0] + ((0.942585206697-0.918157913618j))*x[1] + ((-0.613746770362+0.1385800059j))*x[2]
            ref[(2, 0, 0, 3)]=(0.163206434289-1.67053726448j)*dim
            arg[(2, 0, 1, 0)]=(0.189015323302-0.624278224036j)*x[0] + ((-0.951597382851+0.94779685316j))*x[1] + ((-0.439106929455+0.366393633762j))*x[2]
            ref[(2, 0, 1, 0)]=(-1.201688989+0.689912262886j)*dim
            arg[(2, 0, 1, 1)]=(0.575479463731-0.743290375037j)*x[0] + ((0.193074770872+0.18589634952j))*x[1] + ((0.0404278246117+0.945557785623j))*x[2]
            ref[(2, 0, 1, 1)]=(0.808982059215+0.388163760105j)*dim
            arg[(2, 0, 1, 2)]=(0.230348462835-0.213411470213j)*x[0] + ((0.771287485499-0.037653644892j))*x[1] + ((-0.933344022056+0.485071435431j))*x[2]
            ref[(2, 0, 1, 2)]=(0.068291926278+0.234006320326j)*dim
            arg[(2, 0, 1, 3)]=(-0.591145464215+0.960346782175j)*x[0] + ((0.91372206845+0.705729914892j))*x[1] + ((0.202091717621-0.698550333034j))*x[2]
            ref[(2, 0, 1, 3)]=(0.524668321856+0.967526364034j)*dim
            arg[(2, 0, 2, 0)]=(0.597156359402-0.228674126577j)*x[0] + ((0.566462893055+0.87292064978j))*x[1] + ((0.185622205941-0.915477739607j))*x[2]
            ref[(2, 0, 2, 0)]=(1.3492414584-0.271231216405j)*dim
            arg[(2, 0, 2, 1)]=(0.132903232244-0.614595475625j)*x[0] + ((0.451912424425+0.655320097718j))*x[1] + ((-0.592745512614-0.061979301937j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.00792985594439-0.0212546798438j)*dim
            arg[(2, 0, 2, 2)]=(0.330426515778-0.0965168334564j)*x[0] + ((0.0869743786406-0.203340942972j))*x[1] + ((-0.248356573041-0.655948645745j))*x[2]
            ref[(2, 0, 2, 2)]=(0.169044321378-0.955806422173j)*dim
            arg[(2, 0, 2, 3)]=(-0.138546739524-0.60747579836j)*x[0] + ((-0.653801497949+0.76636630552j))*x[1] + ((0.138477202879+0.0701868249025j))*x[2]
            ref[(2, 0, 2, 3)]=(-0.653871034595+0.229077332063j)*dim
            arg[(2, 1, 0, 0)]=(-0.887267007712+0.84759883676j)*x[0] + ((0.473201227627-0.501745420805j))*x[1] + ((0.544964248551+0.0255293514715j))*x[2]
            ref[(2, 1, 0, 0)]=(0.130898468467+0.371382767427j)*dim
            arg[(2, 1, 0, 1)]=(0.64591047923+0.239723212201j)*x[0] + ((0.834201943256-0.0647253888228j))*x[1] + ((0.751173489653+0.851383352885j))*x[2]
            ref[(2, 1, 0, 1)]=(2.23128591214+1.02638117626j)*dim
            arg[(2, 1, 0, 2)]=(0.584740667764+0.820538674409j)*x[0] + ((-0.878861015995-0.848366310621j))*x[1] + ((0.306789395991-0.132115639012j))*x[2]
            ref[(2, 1, 0, 2)]=(0.0126690477593-0.159943275224j)*dim
            arg[(2, 1, 0, 3)]=(0.223949517921-0.087598178882j)*x[0] + ((-0.193240855791+0.937575394403j))*x[1] + ((-0.994017664058-0.00420903234481j))*x[2]
            ref[(2, 1, 0, 3)]=(-0.963309001928+0.845768183176j)*dim
            arg[(2, 1, 1, 0)]=(-0.250568961314+0.726424406773j)*x[0] + ((0.50277379768-0.445760425551j))*x[1] + ((-0.987754287587+0.276084002039j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.735549451221+0.556747983261j)*dim
            arg[(2, 1, 1, 1)]=(0.2522370475+0.591184428086j)*x[0] + ((0.313485503444+0.414473323601j))*x[1] + ((0.586793459454-0.402122071743j))*x[2]
            ref[(2, 1, 1, 1)]=(1.1525160104+0.603535679944j)*dim
            arg[(2, 1, 1, 2)]=(0.257155162938+0.487639889632j)*x[0] + ((0.178251401047-0.35111002387j))*x[1] + ((-0.423926712049-0.13577682729j))*x[2]
            ref[(2, 1, 1, 2)]=(0.0114798519354+0.000753038472173j)*dim
            arg[(2, 1, 1, 3)]=(-0.948567896542+0.83798858726j)*x[0] + ((0.184531567366+0.716109376325j))*x[1] + ((-0.502630643745-0.665373715988j))*x[2]
            ref[(2, 1, 1, 3)]=(-1.26666697292+0.888724247598j)*dim
            arg[(2, 1, 2, 0)]=(-0.0417836136228-0.733249504715j)*x[0] + ((0.61130205603-0.231049659233j))*x[1] + ((-0.159630537416-0.155751177732j))*x[2]
            ref[(2, 1, 2, 0)]=(0.409887904991-1.12005034168j)*dim
            arg[(2, 1, 2, 1)]=(-0.836467195047+0.708156375576j)*x[0] + ((-0.633659313997-0.98194153776j))*x[1] + ((0.71252233086-0.75534376398j))*x[2]
            ref[(2, 1, 2, 1)]=(-0.757604178183-1.02912892616j)*dim
            arg[(2, 1, 2, 2)]=(0.597601886504-0.230389401548j)*x[0] + ((-0.606401818183+0.854505684249j))*x[1] + ((-0.168277217618-0.599218497417j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.177077149297+0.0248977852835j)*dim
            arg[(2, 1, 2, 3)]=(0.852818526204+0.563461898874j)*x[0] + ((-0.677234722061-0.438890749047j))*x[1] + ((0.168957918283-0.188982255408j))*x[2]
            ref[(2, 1, 2, 3)]=(0.344541722426-0.0644111055801j)*dim
            arg[(2, 2, 0, 0)]=(-0.430648825308-0.797764581552j)*x[0] + ((-0.85339331637+0.289227034195j))*x[1] + ((0.913873303239-0.0889510481256j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.370168838438-0.597488595483j)*dim
            arg[(2, 2, 0, 1)]=(0.665438736563-0.705784394185j)*x[0] + ((-0.567755351949-0.961585313261j))*x[1] + ((-0.926368237855-0.728402573469j))*x[2]
            ref[(2, 2, 0, 1)]=(-0.828684853241-2.39577228092j)*dim
            arg[(2, 2, 0, 2)]=(-0.355051232307-0.495240218739j)*x[0] + ((-0.718071752341+0.346473899337j))*x[1] + ((0.722894750048+0.0401904017193j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.350228234601-0.108575917682j)*dim
            arg[(2, 2, 0, 3)]=(0.669939534486+0.0183449493545j)*x[0] + ((-0.711468565177-0.00752945405925j))*x[1] + ((0.0720751851129+0.242707472059j))*x[2]
            ref[(2, 2, 0, 3)]=(0.030546154422+0.253522967354j)*dim
            arg[(2, 2, 1, 0)]=(0.40157800456-0.652825450791j)*x[0] + ((0.182733670482+0.377197912703j))*x[1] + ((0.345354103566-0.938094197836j))*x[2]
            ref[(2, 2, 1, 0)]=(0.929665778608-1.21372173592j)*dim
            arg[(2, 2, 1, 1)]=(-0.121485085147-0.924402411742j)*x[0] + ((-0.679996703239+0.892623261789j))*x[1] + ((-0.509416291832-0.331372797549j))*x[2]
            ref[(2, 2, 1, 1)]=(-1.31089808022-0.363151947502j)*dim
            arg[(2, 2, 1, 2)]=(0.138368109429+0.457843395562j)*x[0] + ((-0.564799521495+0.516082889337j))*x[1] + ((0.678233724817-0.00642226807737j))*x[2]
            ref[(2, 2, 1, 2)]=(0.251802312751+0.967504016822j)*dim
            arg[(2, 2, 1, 3)]=(-0.963189389969-0.785392550868j)*x[0] + ((-0.684018686242-0.365438935632j))*x[1] + ((0.203040607418-0.45586944322j))*x[2]
            ref[(2, 2, 1, 3)]=(-1.44416746879-1.60670092972j)*dim
            arg[(2, 2, 2, 0)]=(0.0817224206474+0.839281971665j)*x[0] + ((-0.920493565171-0.309085658364j))*x[1] + ((-0.804989832297+0.153263583611j))*x[2]
            ref[(2, 2, 2, 0)]=(-1.64376097682+0.683459896912j)*dim
            arg[(2, 2, 2, 1)]=(-0.840054960021+0.435359664774j)*x[0] + ((0.225833407072+0.760290991075j))*x[1] + ((0.297113947834+0.525832937994j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.317107605116+1.72148359384j)*dim
            arg[(2, 2, 2, 2)]=(-0.357815302459-0.0612237118022j)*x[0] + ((-0.12640449941-0.923393186437j))*x[1] + ((0.212012775369+0.384611300523j))*x[2]
            ref[(2, 2, 2, 2)]=(-0.2722070265-0.600005597716j)*dim
            arg[(2, 2, 2, 3)]=(0.618873467855+0.579737813339j)*x[0] + ((-0.76510669481-0.58906939938j))*x[1] + ((0.663360303619-0.121878002462j))*x[2]
            ref[(2, 2, 2, 3)]=(0.517127076664-0.131209588503j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.00368872060093+0.669809244618j)*x[0] + ((-0.637744297467-0.0862818759061j))*x[1]
            ref=(-0.641433018068+0.583527368712j)*dim
        else:
            arg=(-0.684834327415+0.478728761052j)*x[0] + ((0.226166985664+0.34428149326j))*x[1] + ((-0.865402428655-0.553782666539j))*x[2]
            ref=(-1.32406977041+0.269227587772j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.824271631229-0.423909205161j)*x[0] + ((-0.705991514249-0.154773754067j))*x[1]
            ref[(0,)]=(-1.53026314548-0.578682959228j)*dim
            arg[(1,)]=(0.270583891118-0.850562634929j)*x[0] + ((0.0481866473852-0.273183560832j))*x[1]
            ref[(1,)]=(0.318770538504-1.12374619576j)*dim
        else:
            arg[(0,)]=(-0.989273358436+0.644685894427j)*x[0] + ((-0.539243678853+0.529521475816j))*x[1] + ((0.4726467679-0.680933978542j))*x[2]
            ref[(0,)]=(-1.05587026939+0.493273391702j)*dim
            arg[(1,)]=(0.968705845943+0.621450504368j)*x[0] + ((0.757987004804-0.427652536785j))*x[1] + ((0.145198016574+0.775075055715j))*x[2]
            ref[(1,)]=(1.87189086732+0.968873023298j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.610874532297-0.130988113848j)*x[0] + ((0.290496967849+0.872971828275j))*x[1]
            ref[(0, 0)]=(-0.320377564448+0.741983714426j)*dim
            arg[(0, 1)]=(0.704893087918-0.592375722106j)*x[0] + ((-0.394784002077+0.628341454446j))*x[1]
            ref[(0, 1)]=(0.310109085841+0.0359657323404j)*dim
            arg[(1, 0)]=(-0.256021110115+0.472929302557j)*x[0] + ((-0.922518763418+0.184228721809j))*x[1]
            ref[(1, 0)]=(-1.17853987353+0.657158024366j)*dim
            arg[(1, 1)]=(-0.562662048756-0.681653400034j)*x[0] + ((-0.97501983531-0.385045104776j))*x[1]
            ref[(1, 1)]=(-1.53768188407-1.06669850481j)*dim
            arg[(2, 0)]=(-0.918649128609-0.474602697294j)*x[0] + ((-0.404517877729+0.0104202569231j))*x[1]
            ref[(2, 0)]=(-1.32316700634-0.464182440371j)*dim
            arg[(2, 1)]=(-0.124113527645-0.230453120746j)*x[0] + ((0.984037688074-0.758181745109j))*x[1]
            ref[(2, 1)]=(0.859924160429-0.988634865855j)*dim
        else:
            arg[(0, 0)]=(-0.0895732618378-0.519630020546j)*x[0] + ((-0.869702741239+0.394958558912j))*x[1] + ((0.342075434005-0.582861310533j))*x[2]
            ref[(0, 0)]=(-0.617200569072-0.707532772167j)*dim
            arg[(0, 1)]=(-0.119917124506+0.301998200536j)*x[0] + ((-0.18423272151+0.264663297174j))*x[1] + ((0.212267448152-0.163689026597j))*x[2]
            ref[(0, 1)]=(-0.0918823978644+0.402972471114j)*dim
            arg[(1, 0)]=(-0.488754330424-0.761730631937j)*x[0] + ((-0.322416292908-0.0282788324776j))*x[1] + ((-0.730917100058+0.522559136139j))*x[2]
            ref[(1, 0)]=(-1.54208772339-0.267450328275j)*dim
            arg[(1, 1)]=(0.90973572408-0.227525090358j)*x[0] + ((-0.33725273921+0.543030867244j))*x[1] + ((0.717932513482+0.274992039208j))*x[2]
            ref[(1, 1)]=(1.29041549835+0.590497816094j)*dim
            arg[(2, 0)]=(0.170743147141+0.00351917340518j)*x[0] + ((-0.563903742252+0.921242553602j))*x[1] + ((-0.0107821098625+0.0456017125191j))*x[2]
            ref[(2, 0)]=(-0.403942704973+0.970363439527j)*dim
            arg[(2, 1)]=(0.256068336646-0.349729337532j)*x[0] + ((0.630209992865-0.955931109745j))*x[1] + ((0.059117572997-0.939425280038j))*x[2]
            ref[(2, 1)]=(0.945395902509-2.24508572731j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2),w)
        ref=numpy.zeros((4, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.353579526032-0.74972268504j)*x[0] + ((-0.521896487041-0.554659823718j))*x[1]
            ref[(0, 0, 0)]=(-0.875476013073-1.30438250876j)*dim
            arg[(0, 0, 1)]=(0.358592548364+0.279984435162j)*x[0] + ((0.499147898129+0.635019004201j))*x[1]
            ref[(0, 0, 1)]=(0.857740446493+0.915003439363j)*dim
            arg[(0, 1, 0)]=(0.774796382665+0.346525734257j)*x[0] + ((0.883732001492+0.190065938033j))*x[1]
            ref[(0, 1, 0)]=(1.65852838416+0.536591672289j)*dim
            arg[(0, 1, 1)]=(-0.23962051825+0.0263974232432j)*x[0] + ((-0.317111191387+0.238809454025j))*x[1]
            ref[(0, 1, 1)]=(-0.556731709637+0.265206877269j)*dim
            arg[(0, 2, 0)]=(-0.594504675424+0.0150404590509j)*x[0] + ((-0.39131027747+0.293203594496j))*x[1]
            ref[(0, 2, 0)]=(-0.985814952894+0.308244053547j)*dim
            arg[(0, 2, 1)]=(-0.805371675187-0.70401509559j)*x[0] + ((0.0503175157575-0.673789965816j))*x[1]
            ref[(0, 2, 1)]=(-0.755054159429-1.37780506141j)*dim
            arg[(0, 3, 0)]=(0.855219873129+0.358836416516j)*x[0] + ((0.229114416451+0.0473060927468j))*x[1]
            ref[(0, 3, 0)]=(1.08433428958+0.406142509263j)*dim
            arg[(0, 3, 1)]=(0.715577134543-0.0591989256696j)*x[0] + ((-0.513346778876-0.447161514193j))*x[1]
            ref[(0, 3, 1)]=(0.202230355668-0.506360439863j)*dim
            arg[(1, 0, 0)]=(-0.618577452823-0.359085610855j)*x[0] + ((-0.508530175152+0.98550423123j))*x[1]
            ref[(1, 0, 0)]=(-1.12710762798+0.626418620376j)*dim
            arg[(1, 0, 1)]=(-0.236339846247+0.957459097998j)*x[0] + ((0.840493153862+0.25231606807j))*x[1]
            ref[(1, 0, 1)]=(0.604153307615+1.20977516607j)*dim
            arg[(1, 1, 0)]=(-0.535336004655-0.237702017081j)*x[0] + ((0.69822213995+0.736988532934j))*x[1]
            ref[(1, 1, 0)]=(0.162886135295+0.499286515853j)*dim
            arg[(1, 1, 1)]=(0.0419992581342-0.00526909367925j)*x[0] + ((-0.592264737317-0.613500050965j))*x[1]
            ref[(1, 1, 1)]=(-0.550265479183-0.618769144645j)*dim
            arg[(1, 2, 0)]=(-0.748154878955-0.531015345017j)*x[0] + ((0.756847835475+0.667219888341j))*x[1]
            ref[(1, 2, 0)]=(0.0086929565199+0.136204543324j)*dim
            arg[(1, 2, 1)]=(-0.390530479723-0.403672133181j)*x[0] + ((-0.236482203687+0.89391332425j))*x[1]
            ref[(1, 2, 1)]=(-0.627012683409+0.490241191069j)*dim
            arg[(1, 3, 0)]=(-0.493222991378-0.877947981429j)*x[0] + ((0.436088751185+0.504856290372j))*x[1]
            ref[(1, 3, 0)]=(-0.0571342401929-0.373091691057j)*dim
            arg[(1, 3, 1)]=(0.638578942048-0.617724141714j)*x[0] + ((-0.0753817882644+0.364116485229j))*x[1]
            ref[(1, 3, 1)]=(0.563197153783-0.253607656485j)*dim
            arg[(2, 0, 0)]=(-0.747380503471+0.139129982634j)*x[0] + ((0.551964409769+0.263352285268j))*x[1]
            ref[(2, 0, 0)]=(-0.195416093702+0.402482267902j)*dim
            arg[(2, 0, 1)]=(-0.353421224927-0.114731880607j)*x[0] + ((-0.857435159764+0.594472423018j))*x[1]
            ref[(2, 0, 1)]=(-1.21085638469+0.479740542411j)*dim
            arg[(2, 1, 0)]=(0.978585707682-0.0956573822393j)*x[0] + ((0.806288384654+0.208817931878j))*x[1]
            ref[(2, 1, 0)]=(1.78487409234+0.113160549639j)*dim
            arg[(2, 1, 1)]=(0.562035266952-0.774117577345j)*x[0] + ((0.420470448226+0.0137573169887j))*x[1]
            ref[(2, 1, 1)]=(0.982505715178-0.760360260357j)*dim
            arg[(2, 2, 0)]=(-0.413803594226-0.739851755905j)*x[0] + ((0.960983568775-0.551479995599j))*x[1]
            ref[(2, 2, 0)]=(0.547179974549-1.2913317515j)*dim
            arg[(2, 2, 1)]=(-0.217811838566+0.264600549518j)*x[0] + ((0.705104009573+0.236782778354j))*x[1]
            ref[(2, 2, 1)]=(0.487292171007+0.501383327871j)*dim
            arg[(2, 3, 0)]=(0.80551541718+0.251340738837j)*x[0] + ((-0.60185553848+0.422905386885j))*x[1]
            ref[(2, 3, 0)]=(0.2036598787+0.674246125723j)*dim
            arg[(2, 3, 1)]=(-0.114824515958-0.647567109168j)*x[0] + ((-0.559365784706+0.259397418083j))*x[1]
            ref[(2, 3, 1)]=(-0.674190300664-0.388169691086j)*dim
            arg[(3, 0, 0)]=(0.469543876026+0.574060808208j)*x[0] + ((0.839876232435-0.791668736722j))*x[1]
            ref[(3, 0, 0)]=(1.30942010846-0.217607928514j)*dim
            arg[(3, 0, 1)]=(0.283195584469-0.369262141232j)*x[0] + ((-0.144456904986+0.0275673724372j))*x[1]
            ref[(3, 0, 1)]=(0.138738679483-0.341694768794j)*dim
            arg[(3, 1, 0)]=(-0.633679380353-0.226159645442j)*x[0] + ((0.679310366178+0.179121737405j))*x[1]
            ref[(3, 1, 0)]=(0.0456309858247-0.0470379080362j)*dim
            arg[(3, 1, 1)]=(-0.219680012877+0.688199959821j)*x[0] + ((-0.637722688355-0.364364844121j))*x[1]
            ref[(3, 1, 1)]=(-0.857402701232+0.3238351157j)*dim
            arg[(3, 2, 0)]=(0.486535236328-0.294838422765j)*x[0] + ((0.877576864558+0.292647018551j))*x[1]
            ref[(3, 2, 0)]=(1.36411210089-0.00219140421454j)*dim
            arg[(3, 2, 1)]=(-0.422175738344-0.860410147148j)*x[0] + ((-0.335164877749+0.975674572144j))*x[1]
            ref[(3, 2, 1)]=(-0.757340616093+0.115264424996j)*dim
            arg[(3, 3, 0)]=(0.00461361381345+0.5487079068j)*x[0] + ((0.32200737924+0.348131994372j))*x[1]
            ref[(3, 3, 0)]=(0.326620993054+0.896839901173j)*dim
            arg[(3, 3, 1)]=(-0.240035376371+0.510360072801j)*x[0] + ((0.879083919416-0.764999101364j))*x[1]
            ref[(3, 3, 1)]=(0.639048543045-0.254639028564j)*dim
        else:
            arg[(0, 0, 0)]=(-0.415048777947-0.889098570199j)*x[0] + ((-0.648882784373-0.10928451603j))*x[1] + ((0.365105625384+0.0517354958798j))*x[2]
            ref[(0, 0, 0)]=(-0.698825936936-0.946647590349j)*dim
            arg[(0, 0, 1)]=(-0.364734286034-0.441688785623j)*x[0] + ((-0.420498499541-0.588826536896j))*x[1] + ((-0.744349936025-0.221411974948j))*x[2]
            ref[(0, 0, 1)]=(-1.5295827216-1.25192729747j)*dim
            arg[(0, 1, 0)]=(-0.394203486453-0.637086529807j)*x[0] + ((0.944005543963-0.273677211946j))*x[1] + ((0.558703769096-0.5529353159j))*x[2]
            ref[(0, 1, 0)]=(1.10850582661-1.46369905765j)*dim
            arg[(0, 1, 1)]=(-0.132487713918+0.170579239113j)*x[0] + ((-0.219452252984+0.855069681527j))*x[1] + ((0.673148875664+0.421297426818j))*x[2]
            ref[(0, 1, 1)]=(0.321208908761+1.44694634746j)*dim
            arg[(0, 2, 0)]=(-0.633435459365-0.31337522673j)*x[0] + ((0.339857635576+0.58481729454j))*x[1] + ((0.262979468001+0.488483907884j))*x[2]
            ref[(0, 2, 0)]=(-0.0305983557873+0.759925975694j)*dim
            arg[(0, 2, 1)]=(0.452442868625+0.83999132528j)*x[0] + ((0.691882185209-0.113531819055j))*x[1] + ((0.522480744877-0.00536394760721j))*x[2]
            ref[(0, 2, 1)]=(1.66680579871+0.721095558618j)*dim
            arg[(0, 3, 0)]=(-0.511338745752-0.903001242022j)*x[0] + ((0.73971531687-0.036837184982j))*x[1] + ((0.887516761213+0.286005236983j))*x[2]
            ref[(0, 3, 0)]=(1.11589333233-0.65383319002j)*dim
            arg[(0, 3, 1)]=(-0.15024512366-0.689152143692j)*x[0] + ((-0.753238386829+0.343316917336j))*x[1] + ((0.775082129927-0.497399282507j))*x[2]
            ref[(0, 3, 1)]=(-0.128401380562-0.843234508862j)*dim
            arg[(1, 0, 0)]=(-0.331625653895+0.038577190375j)*x[0] + ((-0.940068328513+0.902628321125j))*x[1] + ((-0.462151871176+0.148502911436j))*x[2]
            ref[(1, 0, 0)]=(-1.73384585358+1.08970842294j)*dim
            arg[(1, 0, 1)]=(0.158662219895+0.940466458189j)*x[0] + ((0.933034555179-0.597070142238j))*x[1] + ((-0.943753641885-0.432957822407j))*x[2]
            ref[(1, 0, 1)]=(0.147943133189-0.0895615064562j)*dim
            arg[(1, 1, 0)]=(-0.803318878103+0.161836801261j)*x[0] + ((0.0670562796729-0.871084032635j))*x[1] + ((-0.128878447688-0.62506467995j))*x[2]
            ref[(1, 1, 0)]=(-0.865141046117-1.33431191132j)*dim
            arg[(1, 1, 1)]=(-0.55659056676-0.089063361307j)*x[0] + ((-0.629280398161-0.23219582617j))*x[1] + ((0.390071458992-0.990263867212j))*x[2]
            ref[(1, 1, 1)]=(-0.795799505929-1.31152305469j)*dim
            arg[(1, 2, 0)]=(-0.130416493622-0.598616553248j)*x[0] + ((0.647920579909-0.205357155013j))*x[1] + ((-0.523519036108+0.0644743375938j))*x[2]
            ref[(1, 2, 0)]=(-0.00601494982112-0.739499370667j)*dim
            arg[(1, 2, 1)]=(0.884793405375+0.274960752174j)*x[0] + ((0.39173790129-0.106173950826j))*x[1] + ((-0.382798112234+0.176312046513j))*x[2]
            ref[(1, 2, 1)]=(0.893733194431+0.345098847861j)*dim
            arg[(1, 3, 0)]=(-0.645741484042+0.273448494585j)*x[0] + ((0.230334677209+0.400701639383j))*x[1] + ((-0.83937765737+0.199506950963j))*x[2]
            ref[(1, 3, 0)]=(-1.2547844642+0.873657084931j)*dim
            arg[(1, 3, 1)]=(0.88454706272+0.942357784642j)*x[0] + ((0.387382020993-0.855618278611j))*x[1] + ((0.343532545304-0.155755340478j))*x[2]
            ref[(1, 3, 1)]=(1.61546162902-0.0690158344466j)*dim
            arg[(2, 0, 0)]=(0.815568716665+0.202661357068j)*x[0] + ((-0.154316344819-0.327581711349j))*x[1] + ((-0.892060012215-0.958397612987j))*x[2]
            ref[(2, 0, 0)]=(-0.230807640369-1.08331796727j)*dim
            arg[(2, 0, 1)]=(0.461829026597+0.0414391784324j)*x[0] + ((-0.0802363953007-0.936351569386j))*x[1] + ((-0.17884608824-0.856550747214j))*x[2]
            ref[(2, 0, 1)]=(0.202746543056-1.75146313817j)*dim
            arg[(2, 1, 0)]=(0.15190164081+0.351555609229j)*x[0] + ((0.888139307702+0.667344288737j))*x[1] + ((-0.464995599906+0.454923275898j))*x[2]
            ref[(2, 1, 0)]=(0.575045348606+1.47382317386j)*dim
            arg[(2, 1, 1)]=(0.0218141946526-0.659658593274j)*x[0] + ((-0.926816745437+0.32935398718j))*x[1] + ((0.905263101329+0.544627872119j))*x[2]
            ref[(2, 1, 1)]=(0.000260550543943+0.214323266026j)*dim
            arg[(2, 2, 0)]=(-0.31152810836-0.771703498239j)*x[0] + ((-0.236664987527+0.608823093645j))*x[1] + ((-0.166615961381-0.492186541933j))*x[2]
            ref[(2, 2, 0)]=(-0.714809057267-0.655066946527j)*dim
            arg[(2, 2, 1)]=(-0.00822251162737-0.558758844336j)*x[0] + ((-0.480167642482-0.115512607913j))*x[1] + ((-0.12537377149+0.116173892064j))*x[2]
            ref[(2, 2, 1)]=(-0.613763925599-0.558097560186j)*dim
            arg[(2, 3, 0)]=(0.0581797798889-0.0884062325492j)*x[0] + ((0.454180700436+0.296722852554j))*x[1] + ((0.0257842133226+0.68579494388j))*x[2]
            ref[(2, 3, 0)]=(0.538144693648+0.894111563885j)*dim
            arg[(2, 3, 1)]=(-0.850429173604-0.608879069922j)*x[0] + ((0.760039464117+0.63823290592j))*x[1] + ((0.735967323578+0.346693351664j))*x[2]
            ref[(2, 3, 1)]=(0.645577614091+0.376047187662j)*dim
            arg[(3, 0, 0)]=(-0.136913415295-0.609876596102j)*x[0] + ((-0.853386915971+0.57443542971j))*x[1] + ((0.643050037743-0.866874774427j))*x[2]
            ref[(3, 0, 0)]=(-0.347250293524-0.902315940818j)*dim
            arg[(3, 0, 1)]=(0.0430254861586-0.49854916002j)*x[0] + ((-0.69042660182+0.0719417617715j))*x[1] + ((0.33081318289+0.642732462313j))*x[2]
            ref[(3, 0, 1)]=(-0.316587932772+0.216125064065j)*dim
            arg[(3, 1, 0)]=(0.773591635867-0.000355237614131j)*x[0] + ((-0.317263676207+0.780158046894j))*x[1] + ((0.257746608219-0.911885275208j))*x[2]
            ref[(3, 1, 0)]=(0.714074567879-0.132082465929j)*dim
            arg[(3, 1, 1)]=(-0.975564551254-0.445838585741j)*x[0] + ((-0.415910530612-0.845733911918j))*x[1] + ((-0.88032805651-0.913810068529j))*x[2]
            ref[(3, 1, 1)]=(-2.27180313838-2.20538256619j)*dim
            arg[(3, 2, 0)]=(-0.534110231483-0.887918315743j)*x[0] + ((0.80262453979+0.704723767211j))*x[1] + ((0.334249295997-0.734836935452j))*x[2]
            ref[(3, 2, 0)]=(0.602763604303-0.918031483984j)*dim
            arg[(3, 2, 1)]=(-0.251095133208+0.254699151306j)*x[0] + ((-0.438492781416+0.187298172288j))*x[1] + ((0.89169883086+0.259136718784j))*x[2]
            ref[(3, 2, 1)]=(0.202110916236+0.701134042378j)*dim
            arg[(3, 3, 0)]=(-0.955456530251-0.345362026321j)*x[0] + ((0.699676143087+0.641530356099j))*x[1] + ((-0.567129231772-0.917012152186j))*x[2]
            ref[(3, 3, 0)]=(-0.822909618936-0.620843822408j)*dim
            arg[(3, 3, 1)]=(0.681155770303+0.813676004942j)*x[0] + ((0.0711829857901+0.619299672457j))*x[1] + ((0.249107014837+0.413551677957j))*x[2]
            ref[(3, 3, 1)]=(1.00144577093+1.84652735536j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 4, 3),w)
        ref=numpy.zeros((2, 4, 4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.174004574749-0.0694993062232j)*x[0] + ((0.993485881794+0.243706138323j))*x[1]
            ref[(0, 0, 0, 0)]=(1.16749045654+0.1742068321j)*dim
            arg[(0, 0, 0, 1)]=(-0.722427648183-0.745783695658j)*x[0] + ((-0.174196591476-0.71551049571j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.896624239658-1.46129419137j)*dim
            arg[(0, 0, 0, 2)]=(0.210564127692+0.746179794434j)*x[0] + ((0.519516110403-0.478936013616j))*x[1]
            ref[(0, 0, 0, 2)]=(0.730080238095+0.267243780817j)*dim
            arg[(0, 0, 1, 0)]=(-0.712719161338-0.787298883656j)*x[0] + ((-0.118447123788+0.148944629173j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.831166285126-0.638354254482j)*dim
            arg[(0, 0, 1, 1)]=(-0.00514589442191-0.382973615616j)*x[0] + ((0.621686099924-0.420793577819j))*x[1]
            ref[(0, 0, 1, 1)]=(0.616540205502-0.803767193436j)*dim
            arg[(0, 0, 1, 2)]=(0.990259017664-0.805472532885j)*x[0] + ((0.993825066644-0.433461043521j))*x[1]
            ref[(0, 0, 1, 2)]=(1.98408408431-1.23893357641j)*dim
            arg[(0, 0, 2, 0)]=(-0.807083588476+0.785558849236j)*x[0] + ((-0.759863402449+0.0684478564417j))*x[1]
            ref[(0, 0, 2, 0)]=(-1.56694699093+0.854006705678j)*dim
            arg[(0, 0, 2, 1)]=(0.133399163089-0.664626640243j)*x[0] + ((-0.94871439725-0.0253336584852j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.815315234161-0.689960298729j)*dim
            arg[(0, 0, 2, 2)]=(0.0982460817658+0.0910546715934j)*x[0] + ((-0.29347982634+0.297905565582j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.195233744574+0.388960237175j)*dim
            arg[(0, 0, 3, 0)]=(-0.876073287726+0.371952829336j)*x[0] + ((0.630873989184+0.247739852528j))*x[1]
            ref[(0, 0, 3, 0)]=(-0.245199298542+0.619692681864j)*dim
            arg[(0, 0, 3, 1)]=(0.342533359324+0.57692106755j)*x[0] + ((-0.315566978829-0.502573117096j))*x[1]
            ref[(0, 0, 3, 1)]=(0.0269663804952+0.0743479504539j)*dim
            arg[(0, 0, 3, 2)]=(0.937410221607-0.910007946048j)*x[0] + ((0.269009388973-0.930378875125j))*x[1]
            ref[(0, 0, 3, 2)]=(1.20641961058-1.84038682117j)*dim
            arg[(0, 1, 0, 0)]=(-0.340282371756+0.654523510974j)*x[0] + ((-0.205078598631+0.891680263523j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.545360970387+1.5462037745j)*dim
            arg[(0, 1, 0, 1)]=(-0.588247625745-0.803629002106j)*x[0] + ((0.334229266179-0.785626985437j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.254018359565-1.58925598754j)*dim
            arg[(0, 1, 0, 2)]=(-0.927501152706+0.662660821665j)*x[0] + ((-0.416135602721-0.71972072528j))*x[1]
            ref[(0, 1, 0, 2)]=(-1.34363675543-0.0570599036145j)*dim
            arg[(0, 1, 1, 0)]=(0.48438801301-0.760775681145j)*x[0] + ((-0.0617258099723-0.676523932256j))*x[1]
            ref[(0, 1, 1, 0)]=(0.422662203038-1.4372996134j)*dim
            arg[(0, 1, 1, 1)]=(0.29428472937-0.654831849431j)*x[0] + ((-0.482542072149-0.29419032477j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.188257342779-0.949022174201j)*dim
            arg[(0, 1, 1, 2)]=(0.66927199123+0.803032478598j)*x[0] + ((-0.0951097827073+0.363111284993j))*x[1]
            ref[(0, 1, 1, 2)]=(0.574162208522+1.16614376359j)*dim
            arg[(0, 1, 2, 0)]=(0.38068853731+0.217000733691j)*x[0] + ((-0.756806124343+0.579256371234j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.376117587034+0.796257104925j)*dim
            arg[(0, 1, 2, 1)]=(-0.256181383041+0.13154663615j)*x[0] + ((-0.404618596466+0.498234536147j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.660799979508+0.629781172296j)*dim
            arg[(0, 1, 2, 2)]=(0.816897533778+0.508071154698j)*x[0] + ((-0.238411208497-0.0986898591458j))*x[1]
            ref[(0, 1, 2, 2)]=(0.578486325281+0.409381295552j)*dim
            arg[(0, 1, 3, 0)]=(-0.806004830323-0.626211073837j)*x[0] + ((0.103899237967+0.626970727354j))*x[1]
            ref[(0, 1, 3, 0)]=(-0.702105592357+0.00075965351781j)*dim
            arg[(0, 1, 3, 1)]=(-0.919181476728-0.285378754509j)*x[0] + ((-0.0923741868707+0.999836275499j))*x[1]
            ref[(0, 1, 3, 1)]=(-1.0115556636+0.71445752099j)*dim
            arg[(0, 1, 3, 2)]=(-0.207426880859+0.938792905164j)*x[0] + ((0.255017453443-0.130921309165j))*x[1]
            ref[(0, 1, 3, 2)]=(0.0475905725843+0.807871595999j)*dim
            arg[(0, 2, 0, 0)]=(-0.576209104927+0.812045019893j)*x[0] + ((0.693003488907-0.780949041678j))*x[1]
            ref[(0, 2, 0, 0)]=(0.11679438398+0.0310959782158j)*dim
            arg[(0, 2, 0, 1)]=(0.859123422184-0.457323309091j)*x[0] + ((0.663699184688-0.956444870524j))*x[1]
            ref[(0, 2, 0, 1)]=(1.52282260687-1.41376817962j)*dim
            arg[(0, 2, 0, 2)]=(-0.403983486932-0.868128365174j)*x[0] + ((-0.761712845897-0.762956012104j))*x[1]
            ref[(0, 2, 0, 2)]=(-1.16569633283-1.63108437728j)*dim
            arg[(0, 2, 1, 0)]=(-0.121690754736-0.807923224476j)*x[0] + ((0.515794185067+0.961896417154j))*x[1]
            ref[(0, 2, 1, 0)]=(0.394103430331+0.153973192678j)*dim
            arg[(0, 2, 1, 1)]=(-0.321165901234-0.677548398224j)*x[0] + ((0.489343901466+0.396922411409j))*x[1]
            ref[(0, 2, 1, 1)]=(0.168178000232-0.280625986815j)*dim
            arg[(0, 2, 1, 2)]=(-0.344717635-0.670394540599j)*x[0] + ((-0.586610885046+0.0663734186268j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.931328520046-0.604021121972j)*dim
            arg[(0, 2, 2, 0)]=(0.160107711695-0.26274571783j)*x[0] + ((0.0484937033193+0.420343782624j))*x[1]
            ref[(0, 2, 2, 0)]=(0.208601415015+0.157598064794j)*dim
            arg[(0, 2, 2, 1)]=(0.393337386441+0.491125250085j)*x[0] + ((-0.727751396492-0.135086683935j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.334414010052+0.356038566149j)*dim
            arg[(0, 2, 2, 2)]=(-0.248997311599+0.43543924922j)*x[0] + ((-0.411930253029-0.6223392036j))*x[1]
            ref[(0, 2, 2, 2)]=(-0.660927564628-0.18689995438j)*dim
            arg[(0, 2, 3, 0)]=(0.447419594176+0.0363627770854j)*x[0] + ((0.588599694568-0.0642050119974j))*x[1]
            ref[(0, 2, 3, 0)]=(1.03601928874-0.027842234912j)*dim
            arg[(0, 2, 3, 1)]=(0.576442615458+0.28612197318j)*x[0] + ((0.0840931910198-0.453871464192j))*x[1]
            ref[(0, 2, 3, 1)]=(0.660535806478-0.167749491011j)*dim
            arg[(0, 2, 3, 2)]=(-0.537565192567-0.799360138662j)*x[0] + ((0.043828588625+0.767155883188j))*x[1]
            ref[(0, 2, 3, 2)]=(-0.493736603942-0.0322042554739j)*dim
            arg[(0, 3, 0, 0)]=(0.425419495669+0.499539344764j)*x[0] + ((0.473292599665+0.595471482522j))*x[1]
            ref[(0, 3, 0, 0)]=(0.898712095334+1.09501082729j)*dim
            arg[(0, 3, 0, 1)]=(-0.149968441068+0.189608525822j)*x[0] + ((-0.605632305913-0.614270276747j))*x[1]
            ref[(0, 3, 0, 1)]=(-0.755600746981-0.424661750925j)*dim
            arg[(0, 3, 0, 2)]=(-0.917533372557+0.916526840381j)*x[0] + ((0.486001689788-0.783056292909j))*x[1]
            ref[(0, 3, 0, 2)]=(-0.431531682769+0.133470547472j)*dim
            arg[(0, 3, 1, 0)]=(0.746726876146-0.911344583451j)*x[0] + ((-0.901736736695-0.673096455211j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.155009860549-1.58444103866j)*dim
            arg[(0, 3, 1, 1)]=(0.0205842425028+0.535478414306j)*x[0] + ((0.841934509547-0.345550131128j))*x[1]
            ref[(0, 3, 1, 1)]=(0.86251875205+0.189928283178j)*dim
            arg[(0, 3, 1, 2)]=(-0.401796278583+0.254335810923j)*x[0] + ((-0.296694749753+0.375159729118j))*x[1]
            ref[(0, 3, 1, 2)]=(-0.698491028336+0.62949554004j)*dim
            arg[(0, 3, 2, 0)]=(0.841902371862-0.644770045768j)*x[0] + ((-0.911851827391+0.058933974322j))*x[1]
            ref[(0, 3, 2, 0)]=(-0.0699494555289-0.585836071446j)*dim
            arg[(0, 3, 2, 1)]=(-0.879739068674-0.0594402423411j)*x[0] + ((-0.253755791276-0.281597745439j))*x[1]
            ref[(0, 3, 2, 1)]=(-1.13349485995-0.34103798778j)*dim
            arg[(0, 3, 2, 2)]=(-0.162635100715-0.756187609597j)*x[0] + ((-0.781960284082-0.53935630272j))*x[1]
            ref[(0, 3, 2, 2)]=(-0.944595384797-1.29554391232j)*dim
            arg[(0, 3, 3, 0)]=(-0.60596678404+0.151085855815j)*x[0] + ((0.132650041152+0.583296197813j))*x[1]
            ref[(0, 3, 3, 0)]=(-0.473316742889+0.734382053628j)*dim
            arg[(0, 3, 3, 1)]=(-0.499093494192+0.464937457217j)*x[0] + ((-0.700023730023+0.809363503776j))*x[1]
            ref[(0, 3, 3, 1)]=(-1.19911722422+1.27430096099j)*dim
            arg[(0, 3, 3, 2)]=(0.713977259332-0.233991754503j)*x[0] + ((0.851353153437-0.267272503984j))*x[1]
            ref[(0, 3, 3, 2)]=(1.56533041277-0.501264258487j)*dim
            arg[(1, 0, 0, 0)]=(-0.488175991726-0.220029169585j)*x[0] + ((-0.775574077085+0.21176604182j))*x[1]
            ref[(1, 0, 0, 0)]=(-1.26375006881-0.00826312776521j)*dim
            arg[(1, 0, 0, 1)]=(-0.724142023874+0.525893971015j)*x[0] + ((-0.804581742643-0.657454104556j))*x[1]
            ref[(1, 0, 0, 1)]=(-1.52872376652-0.131560133541j)*dim
            arg[(1, 0, 0, 2)]=(0.315103944621+0.585104309104j)*x[0] + ((-0.501582084042-0.930615989192j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.186478139422-0.345511680088j)*dim
            arg[(1, 0, 1, 0)]=(0.78884745075+0.977952609103j)*x[0] + ((-0.099885763558-0.157194883374j))*x[1]
            ref[(1, 0, 1, 0)]=(0.688961687192+0.820757725729j)*dim
            arg[(1, 0, 1, 1)]=(-0.701509935641-0.775126520474j)*x[0] + ((0.450676749149+0.0223279070367j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.250833186491-0.752798613438j)*dim
            arg[(1, 0, 1, 2)]=(-0.400761392503-0.129754596231j)*x[0] + ((-0.795416313566-0.793851292285j))*x[1]
            ref[(1, 0, 1, 2)]=(-1.19617770607-0.923605888516j)*dim
            arg[(1, 0, 2, 0)]=(-0.916892758907+0.374179633575j)*x[0] + ((-0.657258662657+0.542669366597j))*x[1]
            ref[(1, 0, 2, 0)]=(-1.57415142156+0.916849000172j)*dim
            arg[(1, 0, 2, 1)]=(-0.798117602412-0.863612535747j)*x[0] + ((-0.142002696254+0.148559674369j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.940120298666-0.715052861378j)*dim
            arg[(1, 0, 2, 2)]=(-0.342342259013+0.828218228161j)*x[0] + ((0.804820925408+0.841867921805j))*x[1]
            ref[(1, 0, 2, 2)]=(0.462478666394+1.67008614997j)*dim
            arg[(1, 0, 3, 0)]=(-0.348493943089+0.630994976931j)*x[0] + ((-0.669694524342+0.615189058422j))*x[1]
            ref[(1, 0, 3, 0)]=(-1.01818846743+1.24618403535j)*dim
            arg[(1, 0, 3, 1)]=(-0.663970702982-0.781251505004j)*x[0] + ((-0.401007833554+0.640839101516j))*x[1]
            ref[(1, 0, 3, 1)]=(-1.06497853654-0.140412403489j)*dim
            arg[(1, 0, 3, 2)]=(0.740160323961-0.952860488883j)*x[0] + ((0.221202296056+0.6333001136j))*x[1]
            ref[(1, 0, 3, 2)]=(0.961362620017-0.319560375283j)*dim
            arg[(1, 1, 0, 0)]=(-0.249005563759-0.332164579819j)*x[0] + ((-0.305188826238+0.477499485289j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.554194389997+0.14533490547j)*dim
            arg[(1, 1, 0, 1)]=(-0.161169121959+0.985553708888j)*x[0] + ((0.668637917801-0.823555265828j))*x[1]
            ref[(1, 1, 0, 1)]=(0.507468795842+0.161998443061j)*dim
            arg[(1, 1, 0, 2)]=(0.174025825727-0.874726070806j)*x[0] + ((0.137784187951-0.133169017618j))*x[1]
            ref[(1, 1, 0, 2)]=(0.311810013678-1.00789508842j)*dim
            arg[(1, 1, 1, 0)]=(-0.291724272773-0.915181480032j)*x[0] + ((0.237438433486+0.173366031557j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.0542858392866-0.741815448475j)*dim
            arg[(1, 1, 1, 1)]=(0.985189599066-0.736020265833j)*x[0] + ((0.879016399544-0.406816455425j))*x[1]
            ref[(1, 1, 1, 1)]=(1.86420599861-1.14283672126j)*dim
            arg[(1, 1, 1, 2)]=(-0.675763764229-0.354893907797j)*x[0] + ((-0.767813295879-0.979939971517j))*x[1]
            ref[(1, 1, 1, 2)]=(-1.44357706011-1.33483387931j)*dim
            arg[(1, 1, 2, 0)]=(0.165561766017-0.20270147004j)*x[0] + ((0.781969203711-0.875523881765j))*x[1]
            ref[(1, 1, 2, 0)]=(0.947530969728-1.0782253518j)*dim
            arg[(1, 1, 2, 1)]=(-0.65485529423-0.717025615688j)*x[0] + ((0.24200063158-0.704051182108j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.412854662651-1.4210767978j)*dim
            arg[(1, 1, 2, 2)]=(0.579086342199+0.84492218219j)*x[0] + ((0.802264272952-0.870959421296j))*x[1]
            ref[(1, 1, 2, 2)]=(1.38135061515-0.0260372391055j)*dim
            arg[(1, 1, 3, 0)]=(-0.769125931831+0.139698214684j)*x[0] + ((0.504029665347+0.701057686278j))*x[1]
            ref[(1, 1, 3, 0)]=(-0.265096266484+0.840755900962j)*dim
            arg[(1, 1, 3, 1)]=(0.776530177345-0.367998262806j)*x[0] + ((0.999531513917+0.924811965955j))*x[1]
            ref[(1, 1, 3, 1)]=(1.77606169126+0.556813703149j)*dim
            arg[(1, 1, 3, 2)]=(-0.121970148941+0.280291839992j)*x[0] + ((0.434519031267+0.0972456122451j))*x[1]
            ref[(1, 1, 3, 2)]=(0.312548882326+0.377537452237j)*dim
            arg[(1, 2, 0, 0)]=(0.392813655725-0.397199731648j)*x[0] + ((0.0674721010692-0.624299454931j))*x[1]
            ref[(1, 2, 0, 0)]=(0.460285756794-1.02149918658j)*dim
            arg[(1, 2, 0, 1)]=(0.264230664648+0.168714117124j)*x[0] + ((0.975952390711-0.986590767548j))*x[1]
            ref[(1, 2, 0, 1)]=(1.24018305536-0.817876650424j)*dim
            arg[(1, 2, 0, 2)]=(-0.0470348264277-0.709849991736j)*x[0] + ((0.637673657022+0.931260288481j))*x[1]
            ref[(1, 2, 0, 2)]=(0.590638830594+0.221410296746j)*dim
            arg[(1, 2, 1, 0)]=(0.464023340648+0.752994334148j)*x[0] + ((-0.314328296881-0.445888002244j))*x[1]
            ref[(1, 2, 1, 0)]=(0.149695043768+0.307106331905j)*dim
            arg[(1, 2, 1, 1)]=(-0.515994641209-0.992636370207j)*x[0] + ((-0.292524339579-0.0393980603888j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.808518980788-1.0320344306j)*dim
            arg[(1, 2, 1, 2)]=(0.676642198953+0.750138152277j)*x[0] + ((-0.951075528358-0.992399471512j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.274433329405-0.242261319235j)*dim
            arg[(1, 2, 2, 0)]=(-0.0104221399253-0.800113970893j)*x[0] + ((0.156166695491-0.824323792755j))*x[1]
            ref[(1, 2, 2, 0)]=(0.145744555566-1.62443776365j)*dim
            arg[(1, 2, 2, 1)]=(-0.0518564989433-0.536053338127j)*x[0] + ((-0.793000875602+0.845717236445j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.844857374545+0.309663898318j)*dim
            arg[(1, 2, 2, 2)]=(0.812205995786+0.823356905457j)*x[0] + ((0.164668227106-0.665358412712j))*x[1]
            ref[(1, 2, 2, 2)]=(0.976874222893+0.157998492745j)*dim
            arg[(1, 2, 3, 0)]=(0.209267849853-0.974144333442j)*x[0] + ((-0.583287790297+0.190143685055j))*x[1]
            ref[(1, 2, 3, 0)]=(-0.374019940443-0.784000648387j)*dim
            arg[(1, 2, 3, 1)]=(-0.542887022875+0.469465214975j)*x[0] + ((-0.424378199102+0.28326571451j))*x[1]
            ref[(1, 2, 3, 1)]=(-0.967265221977+0.752730929485j)*dim
            arg[(1, 2, 3, 2)]=(0.0999342912958+0.244494211225j)*x[0] + ((-0.222139062363-0.329668906692j))*x[1]
            ref[(1, 2, 3, 2)]=(-0.122204771067-0.0851746954671j)*dim
            arg[(1, 3, 0, 0)]=(-0.998262916736+0.0111461944455j)*x[0] + ((0.994238614305-0.72239061121j))*x[1]
            ref[(1, 3, 0, 0)]=(-0.00402430243054-0.711244416765j)*dim
            arg[(1, 3, 0, 1)]=(0.307951790846-0.523843964367j)*x[0] + ((-0.919633325266-0.682159326007j))*x[1]
            ref[(1, 3, 0, 1)]=(-0.61168153442-1.20600329037j)*dim
            arg[(1, 3, 0, 2)]=(0.803138671736-0.00743068020713j)*x[0] + ((-0.659873084866+0.316593911491j))*x[1]
            ref[(1, 3, 0, 2)]=(0.14326558687+0.309163231284j)*dim
            arg[(1, 3, 1, 0)]=(0.0627449423272-0.884888593776j)*x[0] + ((0.855177005558-0.1885707039j))*x[1]
            ref[(1, 3, 1, 0)]=(0.917921947885-1.07345929768j)*dim
            arg[(1, 3, 1, 1)]=(0.0316194822704-0.666876058375j)*x[0] + ((-0.344259950603+0.229457492188j))*x[1]
            ref[(1, 3, 1, 1)]=(-0.312640468332-0.437418566187j)*dim
            arg[(1, 3, 1, 2)]=(-0.344635957195-0.0441224986246j)*x[0] + ((-0.991457325495+0.791837668471j))*x[1]
            ref[(1, 3, 1, 2)]=(-1.33609328269+0.747715169846j)*dim
            arg[(1, 3, 2, 0)]=(0.0603118712174+0.718266831417j)*x[0] + ((0.919859107706+0.115163217717j))*x[1]
            ref[(1, 3, 2, 0)]=(0.980170978923+0.833430049133j)*dim
            arg[(1, 3, 2, 1)]=(-0.925075424943+0.940980948905j)*x[0] + ((0.16151462525+0.597424759411j))*x[1]
            ref[(1, 3, 2, 1)]=(-0.763560799693+1.53840570832j)*dim
            arg[(1, 3, 2, 2)]=(-0.369202386161+0.589100303946j)*x[0] + ((-0.914916390093+0.771803684095j))*x[1]
            ref[(1, 3, 2, 2)]=(-1.28411877625+1.36090398804j)*dim
            arg[(1, 3, 3, 0)]=(0.772251536431+0.566584786181j)*x[0] + ((-0.0166102554798-0.508905078239j))*x[1]
            ref[(1, 3, 3, 0)]=(0.755641280951+0.0576797079427j)*dim
            arg[(1, 3, 3, 1)]=(0.0479041364297-0.908244694545j)*x[0] + ((-0.625082587204-0.466585659488j))*x[1]
            ref[(1, 3, 3, 1)]=(-0.577178450774-1.37483035403j)*dim
            arg[(1, 3, 3, 2)]=(-0.363077783922+0.613712324578j)*x[0] + ((-0.311529596919+0.291054535812j))*x[1]
            ref[(1, 3, 3, 2)]=(-0.674607380841+0.904766860389j)*dim
        else:
            arg[(0, 0, 0, 0)]=(0.522595353624+0.615593461982j)*x[0] + ((-0.514639297151-0.196958492295j))*x[1] + ((-0.160566972939+0.888645795149j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.152610916466+1.30728076484j)*dim
            arg[(0, 0, 0, 1)]=(-0.283727372921+0.644985567977j)*x[0] + ((-0.870677927809-0.279927556499j))*x[1] + ((0.538582802621-0.174071555302j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.615822498109+0.190986456176j)*dim
            arg[(0, 0, 0, 2)]=(-0.678572503446-0.199992185699j)*x[0] + ((-0.643897478405-0.453742879731j))*x[1] + ((-0.772651090823+0.729971663875j))*x[2]
            ref[(0, 0, 0, 2)]=(-2.09512107267+0.0762365984448j)*dim
            arg[(0, 0, 1, 0)]=(0.573876672502+0.801885459102j)*x[0] + ((-0.686877273235-0.470043909754j))*x[1] + ((0.704926752076-0.952498700533j))*x[2]
            ref[(0, 0, 1, 0)]=(0.591926151343-0.620657151185j)*dim
            arg[(0, 0, 1, 1)]=(0.169975854491-0.0692458809997j)*x[0] + ((-0.909491872173-0.267925636118j))*x[1] + ((-0.443421622104-0.597619247472j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.18293763979-0.93479076459j)*dim
            arg[(0, 0, 1, 2)]=(-0.63416633053-0.564809669629j)*x[0] + ((-0.611178860836+0.709746381546j))*x[1] + ((-0.0348780497555-0.062097887967j))*x[2]
            ref[(0, 0, 1, 2)]=(-1.28022324112+0.0828388239498j)*dim
            arg[(0, 0, 2, 0)]=(0.855997671403-0.0562354284941j)*x[0] + ((0.147136135677+0.632418917376j))*x[1] + ((0.9489479446+0.839997846754j))*x[2]
            ref[(0, 0, 2, 0)]=(1.95208175168+1.41618133564j)*dim
            arg[(0, 0, 2, 1)]=(-0.435415321739-0.484968675807j)*x[0] + ((-0.122058845216+0.380835498888j))*x[1] + ((0.122109066736+0.0262750913576j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.435365100218-0.0778580855616j)*dim
            arg[(0, 0, 2, 2)]=(-0.202474571765+0.157614182423j)*x[0] + ((0.596540136733-0.934341376049j))*x[1] + ((0.0674105359846+0.573913910338j))*x[2]
            ref[(0, 0, 2, 2)]=(0.461476100953-0.202813283288j)*dim
            arg[(0, 0, 3, 0)]=(0.295799670106-0.463211674133j)*x[0] + ((-0.0823788858433-0.942666537529j))*x[1] + ((0.990445233101-0.706558475963j))*x[2]
            ref[(0, 0, 3, 0)]=(1.20386601736-2.11243668763j)*dim
            arg[(0, 0, 3, 1)]=(0.716536079142+0.902041271314j)*x[0] + ((-0.90554221758-0.923027940999j))*x[1] + ((0.242636949022-0.493276127326j))*x[2]
            ref[(0, 0, 3, 1)]=(0.0536308105835-0.514262797011j)*dim
            arg[(0, 0, 3, 2)]=(-0.653451853556+0.777398720614j)*x[0] + ((-0.637931140084+0.663801373506j))*x[1] + ((-0.155252024242-0.25355322393j))*x[2]
            ref[(0, 0, 3, 2)]=(-1.44663501788+1.18764687019j)*dim
            arg[(0, 1, 0, 0)]=(0.182030847001+0.316699443767j)*x[0] + ((0.0703551795761+0.380226573811j))*x[1] + ((0.515418947614-0.631053641121j))*x[2]
            ref[(0, 1, 0, 0)]=(0.767804974191+0.0658723764569j)*dim
            arg[(0, 1, 0, 1)]=(-0.601828816347+0.787483501863j)*x[0] + ((0.91931003716-0.236016702066j))*x[1] + ((0.581087114488-0.252996412406j))*x[2]
            ref[(0, 1, 0, 1)]=(0.898568335302+0.298470387391j)*dim
            arg[(0, 1, 0, 2)]=(-0.0412242684442-0.466708413388j)*x[0] + ((-0.443382252547+0.944274981899j))*x[1] + ((-0.846047988865+0.528408026243j))*x[2]
            ref[(0, 1, 0, 2)]=(-1.33065450986+1.00597459475j)*dim
            arg[(0, 1, 1, 0)]=(-0.862165317437-0.7356332714j)*x[0] + ((0.266508831619+0.22493153233j))*x[1] + ((-0.927324047214+0.0647750064754j))*x[2]
            ref[(0, 1, 1, 0)]=(-1.52298053303-0.445926732594j)*dim
            arg[(0, 1, 1, 1)]=(0.659085266553-0.0783717169022j)*x[0] + ((-0.768330522655-0.97517813767j))*x[1] + ((0.217915754343-0.984473542011j))*x[2]
            ref[(0, 1, 1, 1)]=(0.108670498241-2.03802339658j)*dim
            arg[(0, 1, 1, 2)]=(-0.882644080795-0.0353026716921j)*x[0] + ((0.876060549433+0.870784256524j))*x[1] + ((0.804262096438+0.37762204161j))*x[2]
            ref[(0, 1, 1, 2)]=(0.797678565076+1.21310362644j)*dim
            arg[(0, 1, 2, 0)]=(-0.894659515224+0.138539560874j)*x[0] + ((0.380781032382-0.173237376293j))*x[1] + ((0.600833503596-0.803348882968j))*x[2]
            ref[(0, 1, 2, 0)]=(0.0869550207535-0.838046698387j)*dim
            arg[(0, 1, 2, 1)]=(0.390908874621-0.841646705439j)*x[0] + ((-0.660911886767+0.287206245279j))*x[1] + ((0.393263098727+0.0608724419306j))*x[2]
            ref[(0, 1, 2, 1)]=(0.123260086581-0.493568018229j)*dim
            arg[(0, 1, 2, 2)]=(0.487616407352+0.801153957756j)*x[0] + ((-0.12218100947+0.703303135203j))*x[1] + ((-0.966499027417+0.439362212142j))*x[2]
            ref[(0, 1, 2, 2)]=(-0.601063629535+1.9438193051j)*dim
            arg[(0, 1, 3, 0)]=(0.262336004207-0.20066055806j)*x[0] + ((0.214799704225+0.591275109672j))*x[1] + ((-0.0239729022574+0.0195672078376j))*x[2]
            ref[(0, 1, 3, 0)]=(0.453162806174+0.41018175945j)*dim
            arg[(0, 1, 3, 1)]=(-0.926624133272-0.672706410287j)*x[0] + ((0.659224863712+0.837410541967j))*x[1] + ((0.434480322483+0.215316108841j))*x[2]
            ref[(0, 1, 3, 1)]=(0.167081052923+0.380020240521j)*dim
            arg[(0, 1, 3, 2)]=(0.362172426125+0.983866394587j)*x[0] + ((-0.140624531286-0.00931678172476j))*x[1] + ((-0.0609318996696-0.733699357943j))*x[2]
            ref[(0, 1, 3, 2)]=(0.160615995169+0.240850254919j)*dim
            arg[(0, 2, 0, 0)]=(0.0225445882604+0.36565701787j)*x[0] + ((0.983311683237-0.539781312773j))*x[1] + ((-0.538912043028+0.636329718631j))*x[2]
            ref[(0, 2, 0, 0)]=(0.466944228469+0.462205423728j)*dim
            arg[(0, 2, 0, 1)]=(0.695751714625-0.285475932404j)*x[0] + ((0.560732094495+0.923810343107j))*x[1] + ((-0.267044731792-0.873799685104j))*x[2]
            ref[(0, 2, 0, 1)]=(0.989439077327-0.235465274401j)*dim
            arg[(0, 2, 0, 2)]=(0.110074038529-0.319883528854j)*x[0] + ((0.504860479928-0.0121256192531j))*x[1] + ((0.814714714093+0.790849883229j))*x[2]
            ref[(0, 2, 0, 2)]=(1.42964923255+0.458840735122j)*dim
            arg[(0, 2, 1, 0)]=(0.0699197638735-0.363237024036j)*x[0] + ((0.067758729841-0.231163482866j))*x[1] + ((0.435836267708-0.0621878288892j))*x[2]
            ref[(0, 2, 1, 0)]=(0.573514761422-0.656588335791j)*dim
            arg[(0, 2, 1, 1)]=(-0.450246296714+0.547158540649j)*x[0] + ((0.872853772119-0.969289895701j))*x[1] + ((-0.417692275789+0.0702567689656j))*x[2]
            ref[(0, 2, 1, 1)]=(0.0049151996159-0.351874586087j)*dim
            arg[(0, 2, 1, 2)]=(-0.0810924952042-0.780580111179j)*x[0] + ((0.257299343327-0.284562837566j))*x[1] + ((-0.323996253508+0.110258840888j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.147789405385-0.954884107858j)*dim
            arg[(0, 2, 2, 0)]=(-0.0615480356278+0.806536454947j)*x[0] + ((-0.225991006565+0.588767842515j))*x[1] + ((-0.694052474113-0.424101508249j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.981591516306+0.971202789214j)*dim
            arg[(0, 2, 2, 1)]=(-0.331064718846-0.312920207902j)*x[0] + ((0.883169778607+0.552437993184j))*x[1] + ((0.566941897239-0.627199117063j))*x[2]
            ref[(0, 2, 2, 1)]=(1.119046957-0.387681331781j)*dim
            arg[(0, 2, 2, 2)]=(0.698621123854+0.685234697012j)*x[0] + ((-0.4460209602-0.590770896752j))*x[1] + ((0.0455940928264-0.23173929148j))*x[2]
            ref[(0, 2, 2, 2)]=(0.298194256481-0.13727549122j)*dim
            arg[(0, 2, 3, 0)]=(-0.701385140315+0.0752221057946j)*x[0] + ((-0.0143748741722-0.524261423315j))*x[1] + ((0.28628743431-0.612636597333j))*x[2]
            ref[(0, 2, 3, 0)]=(-0.429472580177-1.06167591485j)*dim
            arg[(0, 2, 3, 1)]=(-0.632715880745-0.910144044791j)*x[0] + ((-0.199379851685-0.086961279141j))*x[1] + ((-0.0755470442778+0.697007678705j))*x[2]
            ref[(0, 2, 3, 1)]=(-0.907642776707-0.300097645227j)*dim
            arg[(0, 2, 3, 2)]=(-0.813044845164-0.269814298087j)*x[0] + ((0.125610817229-0.616041847625j))*x[1] + ((0.773048859792-0.269071633491j))*x[2]
            ref[(0, 2, 3, 2)]=(0.0856148318565-1.1549277792j)*dim
            arg[(0, 3, 0, 0)]=(0.692059125453+0.0494853347693j)*x[0] + ((-0.526357400811+0.805433181575j))*x[1] + ((0.716117265997-0.785380196429j))*x[2]
            ref[(0, 3, 0, 0)]=(0.881818990639+0.0695383199153j)*dim
            arg[(0, 3, 0, 1)]=(0.59315938188+0.878114824103j)*x[0] + ((0.565597743689+0.413316053008j))*x[1] + ((-0.346451595426+0.559748439311j))*x[2]
            ref[(0, 3, 0, 1)]=(0.812305530143+1.85117931642j)*dim
            arg[(0, 3, 0, 2)]=(-0.544731394067-0.810834969739j)*x[0] + ((0.0856243634188-0.652845990171j))*x[1] + ((-0.587658964893-0.611209857772j))*x[2]
            ref[(0, 3, 0, 2)]=(-1.04676599554-2.07489081768j)*dim
            arg[(0, 3, 1, 0)]=(0.489659148572+0.264973708646j)*x[0] + ((-0.0361533487791-0.854280262178j))*x[1] + ((0.203622653212+0.925547822114j))*x[2]
            ref[(0, 3, 1, 0)]=(0.657128453005+0.336241268582j)*dim
            arg[(0, 3, 1, 1)]=(-0.985546031819-0.0675566918577j)*x[0] + ((-0.217133525479-0.660992830044j))*x[1] + ((0.38340836679-0.657714526166j))*x[2]
            ref[(0, 3, 1, 1)]=(-0.819271190508-1.38626404807j)*dim
            arg[(0, 3, 1, 2)]=(-0.906692308549+0.970630162823j)*x[0] + ((0.687163518267-0.159194312001j))*x[1] + ((-0.523639196358+0.596839260887j))*x[2]
            ref[(0, 3, 1, 2)]=(-0.74316798664+1.40827511171j)*dim
            arg[(0, 3, 2, 0)]=(0.355532415963+0.984239449448j)*x[0] + ((0.12956945263+0.483784391641j))*x[1] + ((0.469653570055-0.336607728519j))*x[2]
            ref[(0, 3, 2, 0)]=(0.954755438648+1.13141611257j)*dim
            arg[(0, 3, 2, 1)]=(-0.636125288789-0.280835839743j)*x[0] + ((0.221884477193+0.421919925539j))*x[1] + ((0.489335136508-0.683610850826j))*x[2]
            ref[(0, 3, 2, 1)]=(0.0750943249125-0.54252676503j)*dim
            arg[(0, 3, 2, 2)]=(-0.0167689079029-0.218380225034j)*x[0] + ((-0.571283810773-0.257495071899j))*x[1] + ((-0.546822367524-0.130930296655j))*x[2]
            ref[(0, 3, 2, 2)]=(-1.1348750862-0.606805593588j)*dim
            arg[(0, 3, 3, 0)]=(-0.0321946881191-0.919858134565j)*x[0] + ((-0.4905440208-0.12808873963j))*x[1] + ((0.544108178977+0.156774362717j))*x[2]
            ref[(0, 3, 3, 0)]=(0.0213694700577-0.891172511479j)*dim
            arg[(0, 3, 3, 1)]=(0.181776312585+0.573679694133j)*x[0] + ((-0.936360205667-0.619690785167j))*x[1] + ((0.213438090441+0.701133774341j))*x[2]
            ref[(0, 3, 3, 1)]=(-0.541145802641+0.655122683307j)*dim
            arg[(0, 3, 3, 2)]=(-0.0276016530397+0.968793511949j)*x[0] + ((0.812077172644-0.601893548268j))*x[1] + ((-0.946636010739+0.0506538369319j))*x[2]
            ref[(0, 3, 3, 2)]=(-0.162160491135+0.417553800613j)*dim
            arg[(1, 0, 0, 0)]=(0.623849762585-0.815339273079j)*x[0] + ((0.155661954154-0.747590165189j))*x[1] + ((0.290816424599+0.716685334759j))*x[2]
            ref[(1, 0, 0, 0)]=(1.07032814134-0.84624410351j)*dim
            arg[(1, 0, 0, 1)]=(0.918833201472+0.202799169437j)*x[0] + ((0.636828947156-0.407182729396j))*x[1] + ((-0.819798135867+0.6822938978j))*x[2]
            ref[(1, 0, 0, 1)]=(0.735864012761+0.47791033784j)*dim
            arg[(1, 0, 0, 2)]=(0.552319787629-0.563640816068j)*x[0] + ((0.443040653303+0.574562397344j))*x[1] + ((0.0946959578792+0.276657706049j))*x[2]
            ref[(1, 0, 0, 2)]=(1.09005639881+0.287579287326j)*dim
            arg[(1, 0, 1, 0)]=(0.924634388669+0.277627599308j)*x[0] + ((0.638677436865+0.424305549582j))*x[1] + ((0.925975812954+0.852062409977j))*x[2]
            ref[(1, 0, 1, 0)]=(2.48928763849+1.55399555887j)*dim
            arg[(1, 0, 1, 1)]=(-0.0909817201459+0.839388929738j)*x[0] + ((0.757124686654+0.384726549015j))*x[1] + ((-0.887869244223-0.570603835568j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.221726277715+0.653511643185j)*dim
            arg[(1, 0, 1, 2)]=(0.73280185385+0.882100686053j)*x[0] + ((-0.982849384907-0.153906923099j))*x[1] + ((-0.402177286527-0.206459527811j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.652224817585+0.521734235143j)*dim
            arg[(1, 0, 2, 0)]=(0.727583531669+0.870793486021j)*x[0] + ((0.16034965802+0.279563750815j))*x[1] + ((-0.198398453013-0.500277238307j))*x[2]
            ref[(1, 0, 2, 0)]=(0.689534736675+0.650079998529j)*dim
            arg[(1, 0, 2, 1)]=(-0.0443133346082+0.431425592167j)*x[0] + ((-0.922722955171-0.98179009148j))*x[1] + ((0.855063315455-0.440440369457j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.111972974324-0.99080486877j)*dim
            arg[(1, 0, 2, 2)]=(0.0849955444908-0.0295403413957j)*x[0] + ((0.719441451174+0.0752836457622j))*x[1] + ((-0.605685243735+0.93679450847j))*x[2]
            ref[(1, 0, 2, 2)]=(0.19875175193+0.982537812837j)*dim
            arg[(1, 0, 3, 0)]=(0.868629150417-0.722973950344j)*x[0] + ((-0.693429335851+0.788569015951j))*x[1] + ((0.704324351179+0.334830340776j))*x[2]
            ref[(1, 0, 3, 0)]=(0.879524165745+0.400425406383j)*dim
            arg[(1, 0, 3, 1)]=(-0.105726127831+0.703646808661j)*x[0] + ((0.446069057613+0.819397469305j))*x[1] + ((-0.78069423626+0.963296523823j))*x[2]
            ref[(1, 0, 3, 1)]=(-0.440351306478+2.48634080179j)*dim
            arg[(1, 0, 3, 2)]=(-0.649927851158-0.225349694335j)*x[0] + ((0.1749401601-0.426928419167j))*x[1] + ((0.56999393142-0.9762506625j))*x[2]
            ref[(1, 0, 3, 2)]=(0.0950062403628-1.628528776j)*dim
            arg[(1, 1, 0, 0)]=(0.73696058768+0.0649013367042j)*x[0] + ((0.165339871104-0.492916055668j))*x[1] + ((-0.0571486324222+0.0487336204844j))*x[2]
            ref[(1, 1, 0, 0)]=(0.845151826362-0.379281098479j)*dim
            arg[(1, 1, 0, 1)]=(-0.470589458307+0.513916008669j)*x[0] + ((0.940537933471-0.215053093059j))*x[1] + ((-0.98536393479-0.637797841469j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.515415459625-0.338934925859j)*dim
            arg[(1, 1, 0, 2)]=(-0.366185500693+0.290262728509j)*x[0] + ((0.863048593847+0.814967658318j))*x[1] + ((-0.543208491078+0.937579409446j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.0463453979244+2.04280979627j)*dim
            arg[(1, 1, 1, 0)]=(-0.965103904305-0.940479095133j)*x[0] + ((0.728869128156-0.630288264903j))*x[1] + ((0.0796166070039-0.316778697793j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.156618169145-1.88754605783j)*dim
            arg[(1, 1, 1, 1)]=(0.622905344715+0.0537316225098j)*x[0] + ((0.33348482155-0.311741085543j))*x[1] + ((0.414231958522-0.613195552933j))*x[2]
            ref[(1, 1, 1, 1)]=(1.37062212479-0.871205015966j)*dim
            arg[(1, 1, 1, 2)]=(0.304759604419-0.0371923128433j)*x[0] + ((-0.887536901714-0.857333038759j))*x[1] + ((-0.627242727874-0.160295511037j))*x[2]
            ref[(1, 1, 1, 2)]=(-1.21002002517-1.05482086264j)*dim
            arg[(1, 1, 2, 0)]=(0.791864335185-0.00418646578295j)*x[0] + ((-0.0373952590936-0.185129509385j))*x[1] + ((-0.447361827081+0.685196015503j))*x[2]
            ref[(1, 1, 2, 0)]=(0.30710724901+0.495880040336j)*dim
            arg[(1, 1, 2, 1)]=(0.0574784410384+0.491266465199j)*x[0] + ((0.0444021964653+0.800319275009j))*x[1] + ((0.785496688929-0.977163540545j))*x[2]
            ref[(1, 1, 2, 1)]=(0.887377326432+0.314422199663j)*dim
            arg[(1, 1, 2, 2)]=(0.955443227738-0.337028050393j)*x[0] + ((-0.125956374008-0.785441987745j))*x[1] + ((-0.427711613916+0.263913619608j))*x[2]
            ref[(1, 1, 2, 2)]=(0.401775239814-0.85855641853j)*dim
            arg[(1, 1, 3, 0)]=(0.575688172362+0.895308631701j)*x[0] + ((0.89960127808-0.371439762558j))*x[1] + ((-0.216971495876+0.474484311194j))*x[2]
            ref[(1, 1, 3, 0)]=(1.25831795457+0.998353180337j)*dim
            arg[(1, 1, 3, 1)]=(-0.75404202337+0.580049493106j)*x[0] + ((-0.669768052532+0.11267127358j))*x[1] + ((0.0906619874477-0.419459972781j))*x[2]
            ref[(1, 1, 3, 1)]=(-1.33314808845+0.273260793905j)*dim
            arg[(1, 1, 3, 2)]=(0.535282644378+0.969216207354j)*x[0] + ((-0.296902449822+0.326925912382j))*x[1] + ((0.603805085221-0.910321762566j))*x[2]
            ref[(1, 1, 3, 2)]=(0.842185279777+0.38582035717j)*dim
            arg[(1, 2, 0, 0)]=(0.535689459122+0.835914192891j)*x[0] + ((-0.53006762382+0.694150511715j))*x[1] + ((-0.306076489217-0.30680588501j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.300454653915+1.2232588196j)*dim
            arg[(1, 2, 0, 1)]=(0.484749781975-0.87147301346j)*x[0] + ((-0.324031604563-0.834564822184j))*x[1] + ((0.738901424814+0.0243809312117j))*x[2]
            ref[(1, 2, 0, 1)]=(0.899619602226-1.68165690443j)*dim
            arg[(1, 2, 0, 2)]=(0.684922647387+0.0085088546275j)*x[0] + ((-0.466647069268+0.284574691603j))*x[1] + ((-0.972146382817+0.298877054674j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.753870804698+0.591960600905j)*dim
            arg[(1, 2, 1, 0)]=(-0.0754997220425-0.525777608102j)*x[0] + ((-0.927966860601-0.661704321005j))*x[1] + ((0.141323594206-0.324339747466j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.862142988438-1.51182167657j)*dim
            arg[(1, 2, 1, 1)]=(0.642672848533+0.876753583625j)*x[0] + ((0.4854207263-0.593337927451j))*x[1] + ((-0.68927650829+0.652477158486j))*x[2]
            ref[(1, 2, 1, 1)]=(0.438817066543+0.93589281466j)*dim
            arg[(1, 2, 1, 2)]=(-0.458867520034-0.529507891359j)*x[0] + ((0.305171460567-0.356968848708j))*x[1] + ((-0.108432603203-0.728075229361j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.26212866267-1.61455196943j)*dim
            arg[(1, 2, 2, 0)]=(-0.865098844223-0.633247066819j)*x[0] + ((0.0291177416723+0.68652701338j))*x[1] + ((-0.792959343284-0.317750676147j))*x[2]
            ref[(1, 2, 2, 0)]=(-1.62894044584-0.264470729586j)*dim
            arg[(1, 2, 2, 1)]=(-0.205510142151+0.874725805539j)*x[0] + ((0.0220809624056-0.163194364288j))*x[1] + ((-0.158286801642+0.290110176228j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.341715981387+1.00164161748j)*dim
            arg[(1, 2, 2, 2)]=(-0.296239409292-0.759461960481j)*x[0] + ((0.794649393144+0.774940491579j))*x[1] + ((-0.0770732813666+0.697026900114j))*x[2]
            ref[(1, 2, 2, 2)]=(0.421336702485+0.712505431211j)*dim
            arg[(1, 2, 3, 0)]=(0.165176271711+0.373827415314j)*x[0] + ((-0.97321600501+0.923397714435j))*x[1] + ((-0.906874673323+0.462082844674j))*x[2]
            ref[(1, 2, 3, 0)]=(-1.71491440662+1.75930797442j)*dim
            arg[(1, 2, 3, 1)]=(0.411618193656-0.371825448133j)*x[0] + ((-0.482976402734-0.349077043177j))*x[1] + ((0.464864547087-0.734069084511j))*x[2]
            ref[(1, 2, 3, 1)]=(0.393506338009-1.45497157582j)*dim
            arg[(1, 2, 3, 2)]=(-0.532452091844+0.605039639156j)*x[0] + ((0.453975950727+0.91276250521j))*x[1] + ((-0.987574712253+0.927188855508j))*x[2]
            ref[(1, 2, 3, 2)]=(-1.06605085337+2.44499099987j)*dim
            arg[(1, 3, 0, 0)]=(0.781541268792-0.0910034516008j)*x[0] + ((0.288740028088+0.290753595892j))*x[1] + ((0.822666066389-0.392697556049j))*x[2]
            ref[(1, 3, 0, 0)]=(1.89294736327-0.192947411758j)*dim
            arg[(1, 3, 0, 1)]=(-0.917070891103+0.414073350922j)*x[0] + ((0.624527719516-0.209999055241j))*x[1] + ((0.379914051333+0.623259486065j))*x[2]
            ref[(1, 3, 0, 1)]=(0.0873708797457+0.827333781746j)*dim
            arg[(1, 3, 0, 2)]=(-0.0329305141348-0.307878809673j)*x[0] + ((-0.599482749532+0.457283208161j))*x[1] + ((-0.309596614236+0.567330917796j))*x[2]
            ref[(1, 3, 0, 2)]=(-0.942009877904+0.716735316284j)*dim
            arg[(1, 3, 1, 0)]=(0.885543850546+0.244966308524j)*x[0] + ((-0.693547690834+0.586705441538j))*x[1] + ((0.883803307662-0.738262488333j))*x[2]
            ref[(1, 3, 1, 0)]=(1.07579946737+0.0934092617292j)*dim
            arg[(1, 3, 1, 1)]=(0.992419936724-0.561851264242j)*x[0] + ((0.972282496073+0.580862404791j))*x[1] + ((0.266625287153-0.979403855647j))*x[2]
            ref[(1, 3, 1, 1)]=(2.23132771995-0.960392715097j)*dim
            arg[(1, 3, 1, 2)]=(-0.631434675429-0.0625908313055j)*x[0] + ((0.288419589956+0.168430054174j))*x[1] + ((-0.447750771406-0.850015091958j))*x[2]
            ref[(1, 3, 1, 2)]=(-0.790765856879-0.74417586909j)*dim
            arg[(1, 3, 2, 0)]=(-0.529813212264+0.413858739577j)*x[0] + ((-0.559257763656+0.360044195937j))*x[1] + ((0.112405280173-0.254681414532j))*x[2]
            ref[(1, 3, 2, 0)]=(-0.976665695747+0.519221520982j)*dim
            arg[(1, 3, 2, 1)]=(0.0298314147407-0.18791227387j)*x[0] + ((0.89779946281+0.804653868511j))*x[1] + ((-0.38049117854+0.782172176746j))*x[2]
            ref[(1, 3, 2, 1)]=(0.54713969901+1.39891377139j)*dim
            arg[(1, 3, 2, 2)]=(0.862011429437-0.0191653003349j)*x[0] + ((0.830496882694+0.0685510127547j))*x[1] + ((0.0777968045396+0.847645769169j))*x[2]
            ref[(1, 3, 2, 2)]=(1.77030511667+0.897031481589j)*dim
            arg[(1, 3, 3, 0)]=(-0.213790885285+0.353108361287j)*x[0] + ((-0.506614900448-0.364409504578j))*x[1] + ((0.955966166518+0.924842312851j))*x[2]
            ref[(1, 3, 3, 0)]=(0.235560380785+0.91354116956j)*dim
            arg[(1, 3, 3, 1)]=(0.341219659565-0.682367601045j)*x[0] + ((0.76300322372-0.733466792454j))*x[1] + ((0.0957545306198-0.532597542088j))*x[2]
            ref[(1, 3, 3, 1)]=(1.19997741391-1.94843193559j)*dim
            arg[(1, 3, 3, 2)]=(-0.76747506445-0.247604889208j)*x[0] + ((0.680548725453+0.127088021164j))*x[1] + ((0.454318152731-0.966565598841j))*x[2]
            ref[(1, 3, 3, 2)]=(0.367391813734-1.08708246689j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.827619330928+0.27477832966j)*x[0]**o + ((0.477530376492-0.864718264735j))*x[0] + ((-0.412556763036+0.404534672172j))*x[1]**o + ((0.380237938942+0.195203756351j))*x[1]
            ref=(-1.24017609396+0.679313001832j)*(1+2.*(dim-1)/(o+1.)) + ((0.857768315434-0.669514508384j))*dim
        else:
            arg=(0.272246484666+0.791384156038j)*x[0]**o + ((-0.558549129179+0.0928596504345j))*x[0] + ((0.996856389999+0.568058458041j))*x[1]**o + ((0.827424010466-0.400142413796j))*x[1] + ((-0.407903973169+0.0080924316877j))*x[2]**o + ((-0.628598267043-0.667854196353j))*x[2]
            ref=(0.861198901496+1.36753504577j)*(1+2.*(dim-1)/(o+1.)) + ((-0.359723385756-0.975136959715j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.266036896041+0.0775180677277j)*x[0]**o + ((-0.880849970377+0.0854594436986j))*x[0] + ((0.332309178667+0.126382382847j))*x[1]**o + ((0.671503589401+0.164791659575j))*x[1]
            ref[(0,)]=(0.598346074708+0.203900450574j)*(1+2.*(dim-1)/(o+1.)) + ((-0.209346380976+0.250251103273j))*dim
            arg[(1,)]=(0.225310428867+0.769322386314j)*x[0]**o + ((0.247827818656+0.638746874514j))*x[0] + ((0.00622554220822-0.283233819934j))*x[1]**o + ((-0.807185002617+0.792078994321j))*x[1]
            ref[(1,)]=(0.231535971075+0.48608856638j)*(1+2.*(dim-1)/(o+1.)) + ((-0.559357183961+1.43082586884j))*dim
            arg[(2,)]=(-0.512842890663-0.527596231045j)*x[0]**o + ((0.873819929293-0.617805902667j))*x[0] + ((0.436150520248+0.820946421896j))*x[1]**o + ((0.983329379532-0.62494673596j))*x[1]
            ref[(2,)]=(-0.0766923704143+0.293350190851j)*(1+2.*(dim-1)/(o+1.)) + ((1.85714930882-1.24275263863j))*dim
            arg[(3,)]=(-0.642079754313+0.318498370052j)*x[0]**o + ((0.879027434425-0.602109804088j))*x[0] + ((0.827947064686-0.703442546029j))*x[1]**o + ((-0.347305024942+0.855211722481j))*x[1]
            ref[(3,)]=(0.185867310373-0.384944175977j)*(1+2.*(dim-1)/(o+1.)) + ((0.531722409483+0.253101918393j))*dim
        else:
            arg[(0,)]=(-0.768530960589+0.722097978115j)*x[0]**o + ((0.221448741802-0.602661606762j))*x[0] + ((-0.836646546877+0.593811218552j))*x[1]**o + ((0.848751738094-0.718288433683j))*x[1] + ((-0.194589048231+0.0145753381873j))*x[2]**o + ((0.394816698475-0.185372014121j))*x[2]
            ref[(0,)]=(-1.7997665557+1.33048453485j)*(1+2.*(dim-1)/(o+1.)) + ((1.46501717837-1.50632205457j))*dim
            arg[(1,)]=(0.0264397470133+0.531274694428j)*x[0]**o + ((0.229669837425+0.465771110641j))*x[0] + ((-0.270822727051+0.391952434988j))*x[1]**o + ((0.256063132846+0.143199403797j))*x[1] + ((0.51421853233+0.526078899315j))*x[2]**o + ((0.313782140571+0.999508353093j))*x[2]
            ref[(1,)]=(0.269835552292+1.44930602873j)*(1+2.*(dim-1)/(o+1.)) + ((0.799515110842+1.60847886753j))*dim
            arg[(2,)]=(-0.140376873462+0.55180904282j)*x[0]**o + ((0.361463462917-0.00648249137341j))*x[0] + ((-0.227409700929+0.849457062646j))*x[1]**o + ((0.286956950391-0.914316534964j))*x[1] + ((0.752902572814-0.876541805703j))*x[2]**o + ((0.743277557173+0.465691034815j))*x[2]
            ref[(2,)]=(0.385115998423+0.524724299763j)*(1+2.*(dim-1)/(o+1.)) + ((1.39169797048-0.455107991523j))*dim
            arg[(3,)]=(0.396475876463-0.105918061844j)*x[0]**o + ((-0.551203892038-0.768262078646j))*x[0] + ((-0.815429075685-0.0842429256021j))*x[1]**o + ((-0.695362537985+0.252839588737j))*x[1] + ((-0.513166263194+0.497868110067j))*x[2]**o + ((0.385498836449+0.216430937679j))*x[2]
            ref[(3,)]=(-0.932119462415+0.307707122622j)*(1+2.*(dim-1)/(o+1.)) + ((-0.861067593574-0.298991552229j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.84860251519+0.253018854716j)*x[0]**o + ((-0.455901167473-0.836571399733j))*x[0] + ((-0.34281387104-0.217032521132j))*x[1]**o + ((-0.593503273305-0.4201466039j))*x[1]
            ref[(0, 0)]=(0.50578864415+0.035986333584j)*(1+2.*(dim-1)/(o+1.)) + ((-1.04940444078-1.25671800363j))*dim
            arg[(0, 1)]=(-0.63798411892+0.299298152744j)*x[0]**o + ((0.876553353307-0.496027153954j))*x[0] + ((0.334636319336+0.456099932877j))*x[1]**o + ((0.284981270611+0.993008710414j))*x[1]
            ref[(0, 1)]=(-0.303347799584+0.755398085621j)*(1+2.*(dim-1)/(o+1.)) + ((1.16153462392+0.49698155646j))*dim
            arg[(0, 2)]=(0.801294029697-0.23354473737j)*x[0]**o + ((0.0368973121811-0.363579874264j))*x[0] + ((0.72072550857-0.131694279824j))*x[1]**o + ((0.926781864122-0.799493171899j))*x[1]
            ref[(0, 2)]=(1.52201953827-0.365239017194j)*(1+2.*(dim-1)/(o+1.)) + ((0.963679176303-1.16307304616j))*dim
            arg[(1, 0)]=(0.0173431938059-0.948456689961j)*x[0]**o + ((0.71950682266+0.208510862257j))*x[0] + ((0.0462928565945+0.532817817177j))*x[1]**o + ((0.475290108997+0.887884019092j))*x[1]
            ref[(1, 0)]=(0.0636360504004-0.415638872785j)*(1+2.*(dim-1)/(o+1.)) + ((1.19479693166+1.09639488135j))*dim
            arg[(1, 1)]=(-0.592393625784-0.739077779996j)*x[0]**o + ((0.822467758348+0.0863699718966j))*x[0] + ((-0.0416249432232+0.403470268407j))*x[1]**o + ((-0.107023250689-0.145560134841j))*x[1]
            ref[(1, 1)]=(-0.634018569008-0.335607511589j)*(1+2.*(dim-1)/(o+1.)) + ((0.715444507659-0.0591901629449j))*dim
            arg[(1, 2)]=(0.0308028795631-0.0547915455922j)*x[0]**o + ((-0.0409623119911+0.840073657494j))*x[0] + ((0.338596302475-0.538127978519j))*x[1]**o + ((0.112907305404-0.669504678809j))*x[1]
            ref[(1, 2)]=(0.369399182038-0.592919524111j)*(1+2.*(dim-1)/(o+1.)) + ((0.0719449934125+0.170568978684j))*dim
            arg[(2, 0)]=(-0.0140415177039+0.695106146138j)*x[0]**o + ((-0.647948182856-0.730498115042j))*x[0] + ((0.111861548891+0.272854856871j))*x[1]**o + ((-0.828159430507+0.348964519795j))*x[1]
            ref[(2, 0)]=(0.0978200311875+0.967961003009j)*(1+2.*(dim-1)/(o+1.)) + ((-1.47610761336-0.381533595247j))*dim
            arg[(2, 1)]=(-0.62300781501+0.618219211151j)*x[0]**o + ((0.172964945017-0.845473111425j))*x[0] + ((0.798470009052+0.847626486319j))*x[1]**o + ((0.714648248037+0.451762922823j))*x[1]
            ref[(2, 1)]=(0.175462194043+1.46584569747j)*(1+2.*(dim-1)/(o+1.)) + ((0.887613193054-0.393710188602j))*dim
            arg[(2, 2)]=(0.539525921109-0.636627328103j)*x[0]**o + ((0.274031638843-0.0174515209269j))*x[0] + ((0.37125805194+0.782484300626j))*x[1]**o + ((-0.990894689698-0.455851835182j))*x[1]
            ref[(2, 2)]=(0.910783973049+0.145856972522j)*(1+2.*(dim-1)/(o+1.)) + ((-0.716863050855-0.473303356109j))*dim
        else:
            arg[(0, 0)]=(-0.255614854153-0.402745701164j)*x[0]**o + ((-0.362038444541+0.826585647598j))*x[0] + ((-0.674725122195+0.540356087278j))*x[1]**o + ((0.11749000544+0.663053181607j))*x[1] + ((0.957464497001+0.202568834015j))*x[2]**o + ((-0.244604736745-0.135160450305j))*x[2]
            ref[(0, 0)]=(0.0271245206526+0.340179220129j)*(1+2.*(dim-1)/(o+1.)) + ((-0.489153175846+1.3544783789j))*dim
            arg[(0, 1)]=(0.32493897426+0.0559141185747j)*x[0]**o + ((0.134147836068+0.321638041674j))*x[0] + ((0.953988521617+0.625123723745j))*x[1]**o + ((-0.185174094787+0.730784085759j))*x[1] + ((0.907729958065+0.202582430326j))*x[2]**o + ((0.765992715394-0.458014224933j))*x[2]
            ref[(0, 1)]=(2.18665745394+0.883620272645j)*(1+2.*(dim-1)/(o+1.)) + ((0.714966456675+0.5944079025j))*dim
            arg[(0, 2)]=(-0.559192516901-0.075020163769j)*x[0]**o + ((-0.609947477115-0.592670134781j))*x[0] + ((0.475821124257+0.426709854769j))*x[1]**o + ((0.934566018617-0.0764989322653j))*x[1] + ((0.477779626565+0.0217183403669j))*x[2]**o + ((0.0552637012248-0.320180879306j))*x[2]
            ref[(0, 2)]=(0.394408233921+0.373408031367j)*(1+2.*(dim-1)/(o+1.)) + ((0.379882242727-0.989349946353j))*dim
            arg[(1, 0)]=(0.528277608693-0.131669628903j)*x[0]**o + ((0.812066509167-0.62390439246j))*x[0] + ((-0.40618534136+0.0202497523533j))*x[1]**o + ((0.658642330465+0.876921861433j))*x[1] + ((0.532676601261-0.0931726442867j))*x[2]**o + ((-0.259313105158-0.528774502416j))*x[2]
            ref[(1, 0)]=(0.654768868593-0.204592520836j)*(1+2.*(dim-1)/(o+1.)) + ((1.21139573447-0.275757033444j))*dim
            arg[(1, 1)]=(-0.210573769254+0.416779402902j)*x[0]**o + ((-0.56880538223+0.929139338087j))*x[0] + ((-0.630407796914+0.420309081559j))*x[1]**o + ((-0.327080114046+0.774549104484j))*x[1] + ((-0.0314716073107+0.42348158346j))*x[2]**o + ((-0.362146074296-0.0265823415632j))*x[2]
            ref[(1, 1)]=(-0.872453173479+1.26057006792j)*(1+2.*(dim-1)/(o+1.)) + ((-1.25803157057+1.67710610101j))*dim
            arg[(1, 2)]=(-0.643496890516+0.414214895467j)*x[0]**o + ((0.753291320034+0.0676188135842j))*x[0] + ((0.116115818808-0.461708845587j))*x[1]**o + ((-0.813505668879-0.696936978606j))*x[1] + ((-0.272607339852+0.281679783225j))*x[2]**o + ((0.643636778376+0.478714122428j))*x[2]
            ref[(1, 2)]=(-0.79998841156+0.234185833106j)*(1+2.*(dim-1)/(o+1.)) + ((0.58342242953-0.150604042594j))*dim
            arg[(2, 0)]=(-0.475241479171+0.976717935984j)*x[0]**o + ((-0.555006800667-0.10294763289j))*x[0] + ((-0.64410542787+0.0118802381803j))*x[1]**o + ((0.105841024384-0.650569602105j))*x[1] + ((-0.578229917321-0.451793495174j))*x[2]**o + ((-0.16356563849+0.672010338974j))*x[2]
            ref[(2, 0)]=(-1.69757682436+0.536804678991j)*(1+2.*(dim-1)/(o+1.)) + ((-0.612731414773-0.0815068960216j))*dim
            arg[(2, 1)]=(0.674682970184-0.25852658638j)*x[0]**o + ((0.873086782162+0.777137041386j))*x[0] + ((-0.196494528471+0.39511784237j))*x[1]**o + ((0.383503048403-0.638174232558j))*x[1] + ((0.436054836081-0.23711322332j))*x[2]**o + ((0.0313205487494+0.275625162946j))*x[2]
            ref[(2, 1)]=(0.914243277794-0.10052196733j)*(1+2.*(dim-1)/(o+1.)) + ((1.28791037931+0.414587971774j))*dim
            arg[(2, 2)]=(0.108206697898+0.389046876956j)*x[0]**o + ((-0.81416536671+0.287359008625j))*x[0] + ((0.00122584732329+0.871477073712j))*x[1]**o + ((-0.95888430656-0.965149297982j))*x[1] + ((0.584797016137+0.911538199003j))*x[2]**o + ((0.911090025775+0.203127450148j))*x[2]
            ref[(2, 2)]=(0.694229561359+2.17206214967j)*(1+2.*(dim-1)/(o+1.)) + ((-0.861959647495-0.474662839209j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2),w)
        ref=numpy.zeros((4, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.300740624145-0.946571755751j)*x[0]**o + ((-0.000795349989745+0.389981031662j))*x[0] + ((-0.468459682673-0.82573471948j))*x[1]**o + ((0.767969430835+0.189446736189j))*x[1]
            ref[(0, 0, 0)]=(-0.769200306818-1.77230647523j)*(1+2.*(dim-1)/(o+1.)) + ((0.767174080845+0.579427767851j))*dim
            arg[(0, 0, 1)]=(-0.742569886891-0.696231770992j)*x[0]**o + ((-0.0319897720402+0.925502461438j))*x[0] + ((0.540012410484+0.350990814506j))*x[1]**o + ((0.147725963766+0.812851860548j))*x[1]
            ref[(0, 0, 1)]=(-0.202557476408-0.345240956486j)*(1+2.*(dim-1)/(o+1.)) + ((0.115736191725+1.73835432199j))*dim
            arg[(0, 1, 0)]=(-0.863583667536-0.910549954344j)*x[0]**o + ((0.111648041436-0.73261374166j))*x[0] + ((0.997686666771+0.543089762684j))*x[1]**o + ((-0.57343002747+0.496487638008j))*x[1]
            ref[(0, 1, 0)]=(0.134102999234-0.36746019166j)*(1+2.*(dim-1)/(o+1.)) + ((-0.461781986034-0.236126103651j))*dim
            arg[(0, 1, 1)]=(0.358152076685-0.00401936057015j)*x[0]**o + ((0.995562878511-0.466566650381j))*x[0] + ((0.729385950746-0.139331758007j))*x[1]**o + ((0.386549042039-0.34703469933j))*x[1]
            ref[(0, 1, 1)]=(1.08753802743-0.143351118578j)*(1+2.*(dim-1)/(o+1.)) + ((1.38211192055-0.813601349711j))*dim
            arg[(0, 2, 0)]=(-0.817702565688-0.437182986361j)*x[0]**o + ((0.108365838809+0.028076439341j))*x[0] + ((-0.563734103494-0.336321047253j))*x[1]**o + ((0.952572601828-0.288694664575j))*x[1]
            ref[(0, 2, 0)]=(-1.38143666918-0.773504033613j)*(1+2.*(dim-1)/(o+1.)) + ((1.06093844064-0.260618225234j))*dim
            arg[(0, 2, 1)]=(0.524074278584+0.374941499444j)*x[0]**o + ((0.55888984318+0.464413756478j))*x[0] + ((-0.205977385681+0.881306004666j))*x[1]**o + ((0.147730938527+0.816479689663j))*x[1]
            ref[(0, 2, 1)]=(0.318096892903+1.25624750411j)*(1+2.*(dim-1)/(o+1.)) + ((0.706620781707+1.28089344614j))*dim
            arg[(0, 3, 0)]=(0.136533324007+0.0338510739615j)*x[0]**o + ((-0.547430429803-0.0940199555736j))*x[0] + ((0.945208764762-0.641505080177j))*x[1]**o + ((0.45722374893-0.510637521818j))*x[1]
            ref[(0, 3, 0)]=(1.08174208877-0.607654006215j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0902066808724-0.604657477391j))*dim
            arg[(0, 3, 1)]=(-0.104388435203-0.656240372058j)*x[0]**o + ((0.0773749992966-0.866055195074j))*x[0] + ((-0.906672358242+0.604088338822j))*x[1]**o + ((-0.642354404585+0.0761085362784j))*x[1]
            ref[(0, 3, 1)]=(-1.01106079345-0.0521520332366j)*(1+2.*(dim-1)/(o+1.)) + ((-0.564979405288-0.789946658795j))*dim
            arg[(1, 0, 0)]=(-0.256316635998-0.0919071359423j)*x[0]**o + ((0.763030814765-0.118291423734j))*x[0] + ((0.777870375672+0.79549555226j))*x[1]**o + ((-0.550802973012+0.13526324817j))*x[1]
            ref[(1, 0, 0)]=(0.521553739673+0.703588416318j)*(1+2.*(dim-1)/(o+1.)) + ((0.212227841753+0.0169718244361j))*dim
            arg[(1, 0, 1)]=(0.184647844199+0.161094606183j)*x[0]**o + ((0.238128140251-0.938025272012j))*x[0] + ((-0.0016755237165+0.373906684103j))*x[1]**o + ((-0.620746739243+0.889637954571j))*x[1]
            ref[(1, 0, 1)]=(0.182972320482+0.535001290287j)*(1+2.*(dim-1)/(o+1.)) + ((-0.382618598992-0.0483873174408j))*dim
            arg[(1, 1, 0)]=(-0.7434603042-0.0728184369873j)*x[0]**o + ((0.264519182612-0.247211228808j))*x[0] + ((-0.318537050884+0.185461388589j))*x[1]**o + ((0.418176542206+0.508937540379j))*x[1]
            ref[(1, 1, 0)]=(-1.06199735508+0.112642951601j)*(1+2.*(dim-1)/(o+1.)) + ((0.682695724818+0.261726311572j))*dim
            arg[(1, 1, 1)]=(-0.753948603782+0.94092190749j)*x[0]**o + ((-0.0533883398802-0.643034956726j))*x[0] + ((-0.122121593129+0.19021049379j))*x[1]**o + ((-0.279364706756-0.655909032589j))*x[1]
            ref[(1, 1, 1)]=(-0.876070196911+1.13113240128j)*(1+2.*(dim-1)/(o+1.)) + ((-0.332753046636-1.29894398932j))*dim
            arg[(1, 2, 0)]=(0.100451706202-0.453732888887j)*x[0]**o + ((0.578620127162+0.13272177197j))*x[0] + ((-0.999377471916+0.723474571454j))*x[1]**o + ((0.90098058967-0.500308718319j))*x[1]
            ref[(1, 2, 0)]=(-0.898925765714+0.269741682568j)*(1+2.*(dim-1)/(o+1.)) + ((1.47960071683-0.367586946349j))*dim
            arg[(1, 2, 1)]=(-0.126435755982-0.18143313897j)*x[0]**o + ((-0.772689831497-0.668341910224j))*x[0] + ((0.449151693208+0.357673053368j))*x[1]**o + ((0.554066798889-0.0423275437162j))*x[1]
            ref[(1, 2, 1)]=(0.322715937226+0.176239914397j)*(1+2.*(dim-1)/(o+1.)) + ((-0.218623032608-0.71066945394j))*dim
            arg[(1, 3, 0)]=(-0.128924291218-0.224030253031j)*x[0]**o + ((0.791307231362-0.055366538986j))*x[0] + ((-0.287042168101-0.985826685436j))*x[1]**o + ((-0.820648241936+0.0509500416774j))*x[1]
            ref[(1, 3, 0)]=(-0.415966459319-1.20985693847j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0293410105739-0.00441649730858j))*dim
            arg[(1, 3, 1)]=(0.330475778168+0.246708442867j)*x[0]**o + ((0.708818282382-0.790439565998j))*x[0] + ((0.363349502162-0.820483441253j))*x[1]**o + ((0.643103873049+0.156816371361j))*x[1]
            ref[(1, 3, 1)]=(0.693825280331-0.573774998386j)*(1+2.*(dim-1)/(o+1.)) + ((1.35192215543-0.633623194637j))*dim
            arg[(2, 0, 0)]=(-0.815777626515-0.410572499108j)*x[0]**o + ((-0.192305687843+0.806602231616j))*x[0] + ((0.681376877804-0.310370183513j))*x[1]**o + ((0.32501333134-0.70084591343j))*x[1]
            ref[(2, 0, 0)]=(-0.134400748711-0.720942682621j)*(1+2.*(dim-1)/(o+1.)) + ((0.132707643497+0.105756318187j))*dim
            arg[(2, 0, 1)]=(0.269186080956+0.685325744324j)*x[0]**o + ((-0.902275881103+0.825417428807j))*x[0] + ((0.964667604664+0.92268606448j))*x[1]**o + ((-0.992341118414+0.115586846952j))*x[1]
            ref[(2, 0, 1)]=(1.23385368562+1.6080118088j)*(1+2.*(dim-1)/(o+1.)) + ((-1.89461699952+0.941004275758j))*dim
            arg[(2, 1, 0)]=(0.525871161615+0.94741828501j)*x[0]**o + ((0.86832230918-0.810140455761j))*x[0] + ((0.579761000449+0.767339613177j))*x[1]**o + ((-0.906638044874-0.751312279289j))*x[1]
            ref[(2, 1, 0)]=(1.10563216206+1.71475789819j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0383157356948-1.56145273505j))*dim
            arg[(2, 1, 1)]=(-0.717976569796+0.907280415019j)*x[0]**o + ((0.808199596952-0.573454118445j))*x[0] + ((-0.628213152504-0.504426520619j))*x[1]**o + ((0.86163563707+0.622019898399j))*x[1]
            ref[(2, 1, 1)]=(-1.3461897223+0.4028538944j)*(1+2.*(dim-1)/(o+1.)) + ((1.66983523402+0.0485657799539j))*dim
            arg[(2, 2, 0)]=(-0.903508982689-0.00733023921409j)*x[0]**o + ((-0.947197589009-0.833436390356j))*x[0] + ((0.787128400793-0.614553940564j))*x[1]**o + ((-0.528371693053-0.390332248155j))*x[1]
            ref[(2, 2, 0)]=(-0.116380581895-0.621884179778j)*(1+2.*(dim-1)/(o+1.)) + ((-1.47556928206-1.22376863851j))*dim
            arg[(2, 2, 1)]=(-0.23729188764+0.368394210569j)*x[0]**o + ((0.160454474723-0.396354273034j))*x[0] + ((-0.509121463629-0.289034159462j))*x[1]**o + ((0.0120262437795-0.195120651617j))*x[1]
            ref[(2, 2, 1)]=(-0.746413351269+0.0793600511066j)*(1+2.*(dim-1)/(o+1.)) + ((0.172480718502-0.591474924651j))*dim
            arg[(2, 3, 0)]=(0.95558262271+0.60058859402j)*x[0]**o + ((0.240609174658-0.0282802468261j))*x[0] + ((-0.862614681164+0.820524773367j))*x[1]**o + ((-0.0909358802847+0.390097025633j))*x[1]
            ref[(2, 3, 0)]=(0.092967941546+1.42111336739j)*(1+2.*(dim-1)/(o+1.)) + ((0.149673294373+0.361816778807j))*dim
            arg[(2, 3, 1)]=(-0.316483542424-0.36036673163j)*x[0]**o + ((-0.313558303488+0.160711408278j))*x[0] + ((-0.00464866134459-0.550492037539j))*x[1]**o + ((-0.668822027312-0.606263710699j))*x[1]
            ref[(2, 3, 1)]=(-0.321132203769-0.910858769169j)*(1+2.*(dim-1)/(o+1.)) + ((-0.9823803308-0.445552302421j))*dim
            arg[(3, 0, 0)]=(0.76591510221-0.901206326166j)*x[0]**o + ((-0.438141466212-0.586506047389j))*x[0] + ((-0.528803291615-0.607722987847j))*x[1]**o + ((0.650999833934+0.213722850784j))*x[1]
            ref[(3, 0, 0)]=(0.237111810595-1.50892931401j)*(1+2.*(dim-1)/(o+1.)) + ((0.212858367722-0.372783196605j))*dim
            arg[(3, 0, 1)]=(-0.443413285815-0.449866791872j)*x[0]**o + ((0.23778667281+0.55933611433j))*x[0] + ((-0.862915919975-0.404020193711j))*x[1]**o + ((-0.727193198692+0.40387105285j))*x[1]
            ref[(3, 0, 1)]=(-1.30632920579-0.853886985583j)*(1+2.*(dim-1)/(o+1.)) + ((-0.489406525882+0.96320716718j))*dim
            arg[(3, 1, 0)]=(0.181770258394-0.793132563361j)*x[0]**o + ((0.543804799042+0.297219938687j))*x[0] + ((-0.606095471306-0.353539909671j))*x[1]**o + ((-0.425252731405-0.0771052115964j))*x[1]
            ref[(3, 1, 0)]=(-0.424325212912-1.14667247303j)*(1+2.*(dim-1)/(o+1.)) + ((0.118552067636+0.220114727091j))*dim
            arg[(3, 1, 1)]=(0.964952706937-0.694318082844j)*x[0]**o + ((0.113156924077+0.804115770693j))*x[0] + ((0.983763504329+0.276232749334j))*x[1]**o + ((0.539279086982-0.452806807182j))*x[1]
            ref[(3, 1, 1)]=(1.94871621127-0.418085333509j)*(1+2.*(dim-1)/(o+1.)) + ((0.652436011059+0.351308963512j))*dim
            arg[(3, 2, 0)]=(-0.527377982318-0.574733753827j)*x[0]**o + ((-0.543324673369+0.650285569308j))*x[0] + ((0.01254284838-0.9429449541j))*x[1]**o + ((0.986302851171-0.0984562117335j))*x[1]
            ref[(3, 2, 0)]=(-0.514835133938-1.51767870793j)*(1+2.*(dim-1)/(o+1.)) + ((0.442978177802+0.551829357575j))*dim
            arg[(3, 2, 1)]=(0.229796005725-0.000738255664547j)*x[0]**o + ((0.305964000429+0.702530315425j))*x[0] + ((-0.259893043859+0.896558875669j))*x[1]**o + ((-0.168209182161+0.828263655029j))*x[1]
            ref[(3, 2, 1)]=(-0.0300970381344+0.895820620004j)*(1+2.*(dim-1)/(o+1.)) + ((0.137754818268+1.53079397045j))*dim
            arg[(3, 3, 0)]=(0.136665725822+0.806620509643j)*x[0]**o + ((-0.515800972332-0.589720770636j))*x[0] + ((-0.462630145084-0.349145508834j))*x[1]**o + ((-0.327436066996-0.479001335884j))*x[1]
            ref[(3, 3, 0)]=(-0.325964419263+0.457475000809j)*(1+2.*(dim-1)/(o+1.)) + ((-0.843237039328-1.06872210652j))*dim
            arg[(3, 3, 1)]=(0.666735936378+0.178133414438j)*x[0]**o + ((-0.995325036746-0.659126957098j))*x[0] + ((0.91633955033+0.0659500417671j))*x[1]**o + ((-0.00475283702196-0.779439197781j))*x[1]
            ref[(3, 3, 1)]=(1.58307548671+0.244083456205j)*(1+2.*(dim-1)/(o+1.)) + ((-1.00007787377-1.43856615488j))*dim
        else:
            arg[(0, 0, 0)]=(0.764891783628+0.392907723152j)*x[0]**o + ((-0.368208959803+0.447261811005j))*x[0] + ((0.628809767301+0.174986278174j))*x[1]**o + ((0.670760468656+0.111348759279j))*x[1] + ((-0.51315848269-0.416159144455j))*x[2]**o + ((0.0886661920377+0.607622290405j))*x[2]
            ref[(0, 0, 0)]=(0.880543068239+0.15173485687j)*(1+2.*(dim-1)/(o+1.)) + ((0.391217700891+1.16623286069j))*dim
            arg[(0, 0, 1)]=(0.429188590773+0.529905751554j)*x[0]**o + ((-0.0621341613208-0.798948684458j))*x[0] + ((0.35204954578-0.778567871592j))*x[1]**o + ((-0.863434735487-0.80041427268j))*x[1] + ((-0.959622074386+0.0106742583257j))*x[2]**o + ((-0.335465677417+0.510013299965j))*x[2]
            ref[(0, 0, 1)]=(-0.178383937833-0.237987861712j)*(1+2.*(dim-1)/(o+1.)) + ((-1.26103457423-1.08934965717j))*dim
            arg[(0, 1, 0)]=(0.844945655361+0.369799939289j)*x[0]**o + ((-0.358045785546-0.293406649949j))*x[0] + ((0.786567208662+0.689824621383j))*x[1]**o + ((0.195669691904-0.521392356167j))*x[1] + ((0.158314565901-0.733236698822j))*x[2]**o + ((0.751544357144+0.983225798868j))*x[2]
            ref[(0, 1, 0)]=(1.78982742992+0.32638786185j)*(1+2.*(dim-1)/(o+1.)) + ((0.589168263502+0.168426792752j))*dim
            arg[(0, 1, 1)]=(0.172753815539+0.946512870403j)*x[0]**o + ((0.812857816573+0.764063339442j))*x[0] + ((-0.289154060397+0.576802507244j))*x[1]**o + ((0.492957054343-0.685619381218j))*x[1] + ((-0.552040978605-0.427699371603j))*x[2]**o + ((0.90410107717+0.172085328423j))*x[2]
            ref[(0, 1, 1)]=(-0.668441223463+1.09561600604j)*(1+2.*(dim-1)/(o+1.)) + ((2.20991594809+0.250529286646j))*dim
            arg[(0, 2, 0)]=(-0.646459381271-0.199459455344j)*x[0]**o + ((0.428504847138-0.893006700853j))*x[0] + ((-0.907527307619+0.851120445391j))*x[1]**o + ((-0.83584906684+0.954937889919j))*x[1] + ((0.226760590732+0.488322369017j))*x[2]**o + ((-0.201271107936-0.885679204757j))*x[2]
            ref[(0, 2, 0)]=(-1.32722609816+1.13998335906j)*(1+2.*(dim-1)/(o+1.)) + ((-0.608615327638-0.823748015692j))*dim
            arg[(0, 2, 1)]=(0.770667304947-0.18913895501j)*x[0]**o + ((0.608650437163-0.197106876391j))*x[0] + ((-0.544562307158+0.310893300871j))*x[1]**o + ((-0.23415309991+0.170063067058j))*x[1] + ((0.335292064784+0.894003970641j))*x[2]**o + ((-0.69608330151-0.0915821012488j))*x[2]
            ref[(0, 2, 1)]=(0.561397062573+1.0157583165j)*(1+2.*(dim-1)/(o+1.)) + ((-0.321585964257-0.118625910581j))*dim
            arg[(0, 3, 0)]=(-0.102004391274-0.732888386094j)*x[0]**o + ((-0.129120182695-0.274004880173j))*x[0] + ((-0.223628049974-0.324618860514j))*x[1]**o + ((-0.0158957923835+0.647646966306j))*x[1] + ((0.0806577071977-0.367716468114j))*x[2]**o + ((-0.608470777985+0.571469373915j))*x[2]
            ref[(0, 3, 0)]=(-0.244974734051-1.42522371472j)*(1+2.*(dim-1)/(o+1.)) + ((-0.753486753063+0.945111460049j))*dim
            arg[(0, 3, 1)]=(0.352842664705-0.318893494073j)*x[0]**o + ((-0.278737233775-0.693983172203j))*x[0] + ((-0.754639743102-0.855422204441j))*x[1]**o + ((-0.569576262233-0.33687609267j))*x[1] + ((-0.577807876667-0.914808164076j))*x[2]**o + ((0.228417805575-0.116794709314j))*x[2]
            ref[(0, 3, 1)]=(-0.979604955063-2.08912386259j)*(1+2.*(dim-1)/(o+1.)) + ((-0.619895690433-1.14765397419j))*dim
            arg[(1, 0, 0)]=(-0.178353716542+0.582474491842j)*x[0]**o + ((0.914590802287+0.820278243395j))*x[0] + ((-0.995432890419+0.481726151704j))*x[1]**o + ((0.905439031039+0.00466190630381j))*x[1] + ((-0.94834648228+0.485184570173j))*x[2]**o + ((-0.00950697448157+0.800495440402j))*x[2]
            ref[(1, 0, 0)]=(-2.12213308924+1.54938521372j)*(1+2.*(dim-1)/(o+1.)) + ((1.81052285884+1.6254355901j))*dim
            arg[(1, 0, 1)]=(-0.720212674174-0.810154512447j)*x[0]**o + ((0.482604768298+0.948371436771j))*x[0] + ((-0.838912962437+0.549494992806j))*x[1]**o + ((-0.998235985649-0.845599074454j))*x[1] + ((0.454513597315+0.955911916093j))*x[2]**o + ((0.500264791579+0.418858266953j))*x[2]
            ref[(1, 0, 1)]=(-1.1046120393+0.695252396452j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0153664257713+0.521630629271j))*dim
            arg[(1, 1, 0)]=(0.40051671393+0.862438025183j)*x[0]**o + ((0.688779521547+0.870044070607j))*x[0] + ((-0.528905476399+0.184592959991j))*x[1]**o + ((0.743152927851-0.629743178285j))*x[1] + ((-0.126417361176+0.985344921838j))*x[2]**o + ((-0.291667473803-0.0415750060049j))*x[2]
            ref[(1, 1, 0)]=(-0.254806123645+2.03237590701j)*(1+2.*(dim-1)/(o+1.)) + ((1.14026497559+0.198725886318j))*dim
            arg[(1, 1, 1)]=(-0.562479208357+0.890326642758j)*x[0]**o + ((-0.599676208832+0.177967307886j))*x[0] + ((-0.712340831511+0.316844667342j))*x[1]**o + ((0.143289879956-0.988191567643j))*x[1] + ((0.202795446642+0.416001478782j))*x[2]**o + ((-0.81499799886+0.446786667053j))*x[2]
            ref[(1, 1, 1)]=(-1.07202459323+1.62317278888j)*(1+2.*(dim-1)/(o+1.)) + ((-1.27138432774-0.363437592704j))*dim
            arg[(1, 2, 0)]=(0.473209335844-0.328449951475j)*x[0]**o + ((0.887150833108+0.488957116289j))*x[0] + ((0.22562902919-0.537157798764j))*x[1]**o + ((0.00961316338484+0.958746795973j))*x[1] + ((-0.81001525637-0.584306914822j))*x[2]**o + ((0.573931693918-0.676494656435j))*x[2]
            ref[(1, 2, 0)]=(-0.111176891337-1.44991466506j)*(1+2.*(dim-1)/(o+1.)) + ((1.47069569041+0.771209255827j))*dim
            arg[(1, 2, 1)]=(-0.136969773906-0.284219622079j)*x[0]**o + ((0.300290203591+0.590824625805j))*x[0] + ((-0.397685964249+0.873629116577j))*x[1]**o + ((-0.87403129168+0.540781315769j))*x[1] + ((-0.935986384342+0.145606840795j))*x[2]**o + ((-0.91473367623+0.033357936888j))*x[2]
            ref[(1, 2, 1)]=(-1.4706421225+0.735016335294j)*(1+2.*(dim-1)/(o+1.)) + ((-1.48847476432+1.16496387846j))*dim
            arg[(1, 3, 0)]=(-0.567846751184+0.583520108536j)*x[0]**o + ((0.635725462353+0.135940563794j))*x[0] + ((-0.121412277157-0.744541877987j))*x[1]**o + ((-0.716220134542-0.0156215403382j))*x[1] + ((-0.521695455977+0.74726637602j))*x[2]**o + ((0.671337451343+0.396344800684j))*x[2]
            ref[(1, 3, 0)]=(-1.21095448432+0.586244606569j)*(1+2.*(dim-1)/(o+1.)) + ((0.590842779154+0.51666382414j))*dim
            arg[(1, 3, 1)]=(-0.82951517254-0.939474872568j)*x[0]**o + ((0.950034943198-0.781036831716j))*x[0] + ((-0.645808040512-0.457316956868j))*x[1]**o + ((-0.215797682307-0.643242134456j))*x[1] + ((0.692192715271+0.622489871553j))*x[2]**o + ((0.020409470512-0.775002364073j))*x[2]
            ref[(1, 3, 1)]=(-0.783130497781-0.774301957883j)*(1+2.*(dim-1)/(o+1.)) + ((0.754646731403-2.19928133025j))*dim
            arg[(2, 0, 0)]=(0.991789609231-0.887444815685j)*x[0]**o + ((-0.40394293613-0.634806710583j))*x[0] + ((-0.195798128824+0.576305880223j))*x[1]**o + ((0.215334000818+0.0537376714908j))*x[1] + ((0.80356174864+0.460097834589j))*x[2]**o + ((0.792439204197+0.6114639312j))*x[2]
            ref[(2, 0, 0)]=(1.59955322905+0.148958899127j)*(1+2.*(dim-1)/(o+1.)) + ((0.603830268886+0.0303948921077j))*dim
            arg[(2, 0, 1)]=(-0.527954353568+0.109516731894j)*x[0]**o + ((-0.468495249212-0.480298344082j))*x[0] + ((0.0688531215024+0.774782945131j))*x[1]**o + ((0.10160466059+0.11172068739j))*x[1] + ((-0.10059037745-0.233308875281j))*x[2]**o + ((-0.839253680415-0.713995426521j))*x[2]
            ref[(2, 0, 1)]=(-0.559691609515+0.650990801745j)*(1+2.*(dim-1)/(o+1.)) + ((-1.20614426904-1.08257308321j))*dim
            arg[(2, 1, 0)]=(0.130623981665-0.804170020362j)*x[0]**o + ((-0.484301380191-0.733436688928j))*x[0] + ((0.231921098645+0.274548336735j))*x[1]**o + ((-0.373948332539-0.500764160779j))*x[1] + ((-0.373537801927-0.741199036594j))*x[2]**o + ((0.642283106396+0.960245140714j))*x[2]
            ref[(2, 1, 0)]=(-0.0109927216173-1.27082072022j)*(1+2.*(dim-1)/(o+1.)) + ((-0.215966606334-0.273955708994j))*dim
            arg[(2, 1, 1)]=(-0.556336484243+0.860995410805j)*x[0]**o + ((0.313225061236-0.845463991676j))*x[0] + ((0.0638891957477-0.883765999353j))*x[1]**o + ((-0.956626453085+0.32443872094j))*x[1] + ((0.890882448648-0.441423910393j))*x[2]**o + ((-0.191732634575-0.24156300027j))*x[2]
            ref[(2, 1, 1)]=(0.398435160153-0.46419449894j)*(1+2.*(dim-1)/(o+1.)) + ((-0.835134026425-0.762588271007j))*dim
            arg[(2, 2, 0)]=(-0.782322943394-0.588973165064j)*x[0]**o + ((-0.717704937585+0.0554372071217j))*x[0] + ((0.800318921986-0.636835488401j))*x[1]**o + ((0.971957037202+0.115315778663j))*x[1] + ((-0.335268099442-0.166706255456j))*x[2]**o + ((0.0153531920263-0.502354830234j))*x[2]
            ref[(2, 2, 0)]=(-0.317272120851-1.39251490892j)*(1+2.*(dim-1)/(o+1.)) + ((0.269605291643-0.33160184445j))*dim
            arg[(2, 2, 1)]=(-0.182251792828+0.460067314974j)*x[0]**o + ((0.813965953115+0.439051997331j))*x[0] + ((-0.590229398462+0.992220365905j))*x[1]**o + ((-0.527002825879+0.592934459449j))*x[1] + ((-0.229844548693+0.665657371787j))*x[2]**o + ((0.839466426997+0.353643064198j))*x[2]
            ref[(2, 2, 1)]=(-1.00232573998+2.11794505267j)*(1+2.*(dim-1)/(o+1.)) + ((1.12642955423+1.38562952098j))*dim
            arg[(2, 3, 0)]=(-0.954674094933+0.84282249847j)*x[0]**o + ((-0.181334185929+0.848747277986j))*x[0] + ((0.225618558838-0.988127408388j))*x[1]**o + ((0.994845966073-0.692674822414j))*x[1] + ((0.99380494861+0.76224650959j))*x[2]**o + ((-0.908901309769+0.663997889269j))*x[2]
            ref[(2, 3, 0)]=(0.264749412515+0.616941599672j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0953895296256+0.820070344841j))*dim
            arg[(2, 3, 1)]=(-0.0323602990091+0.215323970714j)*x[0]**o + ((-0.909806631678-0.389905003478j))*x[0] + ((0.542613621344+0.469085621957j))*x[1]**o + ((-0.105886435318+0.154730162778j))*x[1] + ((-0.744839229572-0.559807408504j))*x[2]**o + ((-0.869669275967+0.984524251292j))*x[2]
            ref[(2, 3, 1)]=(-0.234585907237+0.124602184167j)*(1+2.*(dim-1)/(o+1.)) + ((-1.88536234296+0.749349410591j))*dim
            arg[(3, 0, 0)]=(-0.911699598759+0.707318325115j)*x[0]**o + ((-0.0886805177637-0.14244062054j))*x[0] + ((-0.762724835293-0.636497024791j))*x[1]**o + ((0.45035091358+0.538244845895j))*x[1] + ((0.906470326574+0.774861585572j))*x[2]**o + ((-0.733946815918-0.506296926244j))*x[2]
            ref[(3, 0, 0)]=(-0.767954107477+0.845682885896j)*(1+2.*(dim-1)/(o+1.)) + ((-0.372276420101-0.110492700889j))*dim
            arg[(3, 0, 1)]=(0.773419143484-0.292495595416j)*x[0]**o + ((-0.0358789681072-0.886536454295j))*x[0] + ((-0.960865059104-0.953354421992j))*x[1]**o + ((0.937381673224-0.420524145443j))*x[1] + ((-0.00969459237088-0.765991078154j))*x[2]**o + ((0.624350224608-0.623748347742j))*x[2]
            ref[(3, 0, 1)]=(-0.197140507991-2.01184109556j)*(1+2.*(dim-1)/(o+1.)) + ((1.52585292972-1.93080894748j))*dim
            arg[(3, 1, 0)]=(-0.753704489855+0.0675153143118j)*x[0]**o + ((-0.867102786647-0.224279259588j))*x[0] + ((-0.46300004954-0.514959418594j))*x[1]**o + ((-0.32726158496-0.848499618263j))*x[1] + ((-0.959450813026+0.033581639359j))*x[2]**o + ((0.11802315086-0.0577208464906j))*x[2]
            ref[(3, 1, 0)]=(-2.17615535242-0.413862464923j)*(1+2.*(dim-1)/(o+1.)) + ((-1.07634122075-1.13049972434j))*dim
            arg[(3, 1, 1)]=(0.823404617186-0.547159970389j)*x[0]**o + ((-0.465677899148-0.314038041246j))*x[0] + ((0.52706697847+0.464309160946j))*x[1]**o + ((0.0599122705362+0.413119394283j))*x[1] + ((0.991622885839+0.273339964252j))*x[2]**o + ((-0.608852786598+0.0578665289838j))*x[2]
            ref[(3, 1, 1)]=(2.3420944815+0.190489154809j)*(1+2.*(dim-1)/(o+1.)) + ((-1.01461841521+0.156947882021j))*dim
            arg[(3, 2, 0)]=(-0.815224500082-0.336214849934j)*x[0]**o + ((-0.129325592155+0.852682243846j))*x[0] + ((-0.424363606376+0.21039050392j))*x[1]**o + ((-0.985575205705+0.737917572997j))*x[1] + ((0.790764311244+0.487646030848j))*x[2]**o + ((-0.732166280388-0.76843104347j))*x[2]
            ref[(3, 2, 0)]=(-0.448823795214+0.361821684835j)*(1+2.*(dim-1)/(o+1.)) + ((-1.84706707825+0.822168773374j))*dim
            arg[(3, 2, 1)]=(0.468662793622+0.668402999031j)*x[0]**o + ((-0.272560619746+0.0818123506882j))*x[0] + ((-0.574952879987+0.642155106114j))*x[1]**o + ((0.101880942981+0.411008503673j))*x[1] + ((-0.157311789645+0.78368036096j))*x[2]**o + ((0.672487498141+0.239612855793j))*x[2]
            ref[(3, 2, 1)]=(-0.26360187601+2.09423846611j)*(1+2.*(dim-1)/(o+1.)) + ((0.501807821376+0.732433710155j))*dim
            arg[(3, 3, 0)]=(0.141542807273-0.308753329371j)*x[0]**o + ((0.826616157087-0.517285162183j))*x[0] + ((-0.154685533692-0.723527467608j))*x[1]**o + ((-0.940466399655-0.573210379715j))*x[1] + ((-0.623410931473+0.94081076926j))*x[2]**o + ((0.445365506819-0.22940507305j))*x[2]
            ref[(3, 3, 0)]=(-0.636553657892-0.091470027718j)*(1+2.*(dim-1)/(o+1.)) + ((0.331515264251-1.31990061495j))*dim
            arg[(3, 3, 1)]=(-0.916586259939+0.665771840085j)*x[0]**o + ((0.127360526856+0.624615146479j))*x[0] + ((-0.158710907662-0.205776760128j))*x[1]**o + ((-0.664782000198+0.495937326129j))*x[1] + ((-0.427078629952+0.806837348271j))*x[2]**o + ((-0.538416184582+0.625333456404j))*x[2]
            ref[(3, 3, 1)]=(-1.50237579755+1.26683242823j)*(1+2.*(dim-1)/(o+1.)) + ((-1.07583765792+1.74588592901j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3, 3),w)
        ref=numpy.zeros((2, 4, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.48622602292+0.557990968252j)*x[0]**o + ((-0.0739871810082-0.3177963663j))*x[0] + ((0.841840392717-0.700098501496j))*x[1]**o + ((-0.817092341467-0.303545351728j))*x[1]
            ref[(0, 0, 0, 0)]=(0.355614369797-0.142107533244j)*(1+2.*(dim-1)/(o+1.)) + ((-0.891079522475-0.621341718028j))*dim
            arg[(0, 0, 0, 1)]=(0.989389908178-0.902576871498j)*x[0]**o + ((0.695954912315+0.631555356586j))*x[0] + ((0.228001550816-0.0823334662571j))*x[1]**o + ((-0.467780614355+0.99805052212j))*x[1]
            ref[(0, 0, 0, 1)]=(1.21739145899-0.984910337755j)*(1+2.*(dim-1)/(o+1.)) + ((0.22817429796+1.62960587871j))*dim
            arg[(0, 0, 0, 2)]=(-0.596805668522+0.0477708014306j)*x[0]**o + ((0.635473395341-0.0514442343313j))*x[0] + ((-0.985944655003+0.185892461827j))*x[1]**o + ((-0.684765785553-0.4985333325j))*x[1]
            ref[(0, 0, 0, 2)]=(-1.58275032353+0.233663263257j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0492923902123-0.549977566832j))*dim
            arg[(0, 0, 1, 0)]=(0.225454527047+0.421955479448j)*x[0]**o + ((-0.546985389661-0.665197121625j))*x[0] + ((0.038854849311+0.934081633555j))*x[1]**o + ((-0.724353546683-0.852783511163j))*x[1]
            ref[(0, 0, 1, 0)]=(0.264309376358+1.356037113j)*(1+2.*(dim-1)/(o+1.)) + ((-1.27133893634-1.51798063279j))*dim
            arg[(0, 0, 1, 1)]=(0.475518648729+0.150502682607j)*x[0]**o + ((-0.0783948782123+0.733907876772j))*x[0] + ((-0.497662058589+0.0981603637399j))*x[1]**o + ((0.767982461057-0.483879162403j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.0221434098596+0.248663046347j)*(1+2.*(dim-1)/(o+1.)) + ((0.689587582845+0.250028714369j))*dim
            arg[(0, 0, 1, 2)]=(-0.225724349988+0.882804382128j)*x[0]**o + ((-0.306352569769-0.874491578944j))*x[0] + ((0.861845620682-0.471949585783j))*x[1]**o + ((-0.892503894978-0.655827632333j))*x[1]
            ref[(0, 0, 1, 2)]=(0.636121270694+0.410854796345j)*(1+2.*(dim-1)/(o+1.)) + ((-1.19885646475-1.53031921128j))*dim
            arg[(0, 0, 2, 0)]=(-0.535749989752+0.836433113758j)*x[0]**o + ((-0.284777915584+0.340953441881j))*x[0] + ((0.900481455514-0.812578379304j))*x[1]**o + ((-0.854828205986-0.980295291156j))*x[1]
            ref[(0, 0, 2, 0)]=(0.364731465762+0.0238547344543j)*(1+2.*(dim-1)/(o+1.)) + ((-1.13960612157-0.639341849274j))*dim
            arg[(0, 0, 2, 1)]=(-0.718835324526+0.100009430078j)*x[0]**o + ((-0.342373081111-0.720629687029j))*x[0] + ((-0.114700976825+0.870223139765j))*x[1]**o + ((-0.882242783218+0.443192913385j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.833536301351+0.970232569843j)*(1+2.*(dim-1)/(o+1.)) + ((-1.22461586433-0.277436773645j))*dim
            arg[(0, 0, 2, 2)]=(-0.773806940556-0.504963996203j)*x[0]**o + ((0.556220871696+0.870420481835j))*x[0] + ((-0.171432705474-0.448261756576j))*x[1]**o + ((-0.557431990107+0.72233756848j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.94523964603-0.953225752779j)*(1+2.*(dim-1)/(o+1.)) + ((-0.00121111841114+1.59275805031j))*dim
            arg[(0, 1, 0, 0)]=(0.969103514779+0.302735736284j)*x[0]**o + ((0.899663993662-0.64491326631j))*x[0] + ((0.320461112073-0.129780985254j))*x[1]**o + ((0.185244965226-0.946196772266j))*x[1]
            ref[(0, 1, 0, 0)]=(1.28956462685+0.172954751029j)*(1+2.*(dim-1)/(o+1.)) + ((1.08490895889-1.59111003858j))*dim
            arg[(0, 1, 0, 1)]=(0.812096410438+0.403191017555j)*x[0]**o + ((-0.281467606867-0.660573931166j))*x[0] + ((-0.128780576755-0.836985548369j))*x[1]**o + ((0.341378521025+0.338813354021j))*x[1]
            ref[(0, 1, 0, 1)]=(0.683315833683-0.433794530813j)*(1+2.*(dim-1)/(o+1.)) + ((0.0599109141583-0.321760577145j))*dim
            arg[(0, 1, 0, 2)]=(-0.0557446322917-0.621273332606j)*x[0]**o + ((0.900947037386+0.890771503065j))*x[0] + ((-0.0868312723043-0.526311570694j))*x[1]**o + ((0.602970318631+0.534924154465j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.142575904596-1.1475849033j)*(1+2.*(dim-1)/(o+1.)) + ((1.50391735602+1.42569565753j))*dim
            arg[(0, 1, 1, 0)]=(0.783158892621+0.816617834584j)*x[0]**o + ((-0.335949200738-0.114838410911j))*x[0] + ((-0.699495842758-0.763002075679j))*x[1]**o + ((0.651912496893-0.110444702787j))*x[1]
            ref[(0, 1, 1, 0)]=(0.0836630498633+0.0536157589055j)*(1+2.*(dim-1)/(o+1.)) + ((0.315963296155-0.225283113698j))*dim
            arg[(0, 1, 1, 1)]=(-0.177369116127-0.746282645554j)*x[0]**o + ((0.00846832886613-0.933204078404j))*x[0] + ((0.385077140062-0.634442489564j))*x[1]**o + ((0.151807422189+0.0690086458465j))*x[1]
            ref[(0, 1, 1, 1)]=(0.207708023935-1.38072513512j)*(1+2.*(dim-1)/(o+1.)) + ((0.160275751055-0.864195432558j))*dim
            arg[(0, 1, 1, 2)]=(-0.870557791457+0.233085629886j)*x[0]**o + ((0.690362306909-0.567764367272j))*x[0] + ((0.0398899438513+0.779131667357j))*x[1]**o + ((0.332122446628-0.442042347744j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.830667847606+1.01221729724j)*(1+2.*(dim-1)/(o+1.)) + ((1.02248475354-1.00980671502j))*dim
            arg[(0, 1, 2, 0)]=(0.0662411795348+0.351890779341j)*x[0]**o + ((-0.640671972752-0.13678746802j))*x[0] + ((0.781181500515-0.449412563287j))*x[1]**o + ((-0.708996180796-0.0435102574622j))*x[1]
            ref[(0, 1, 2, 0)]=(0.847422680049-0.0975217839458j)*(1+2.*(dim-1)/(o+1.)) + ((-1.34966815355-0.180297725483j))*dim
            arg[(0, 1, 2, 1)]=(0.224555664794-0.642620779294j)*x[0]**o + ((0.960191717479-0.0328197183516j))*x[0] + ((-0.123665248274+0.412224333209j))*x[1]**o + ((0.690787966738-0.20913937335j))*x[1]
            ref[(0, 1, 2, 1)]=(0.10089041652-0.230396446085j)*(1+2.*(dim-1)/(o+1.)) + ((1.65097968422-0.241959091701j))*dim
            arg[(0, 1, 2, 2)]=(-0.331225943782+0.127643855386j)*x[0]**o + ((-0.900636391279-0.791565958298j))*x[0] + ((0.729264943572+0.571728280105j))*x[1]**o + ((-0.892470656239-0.55461468306j))*x[1]
            ref[(0, 1, 2, 2)]=(0.39803899979+0.699372135491j)*(1+2.*(dim-1)/(o+1.)) + ((-1.79310704752-1.34618064136j))*dim
            arg[(0, 2, 0, 0)]=(0.735840633886+0.589763320334j)*x[0]**o + ((-0.425349935828+0.269031633034j))*x[0] + ((-0.937267100569+0.222734931763j))*x[1]**o + ((0.385891401288-0.169341535841j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.201426466683+0.812498252097j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0394585345401+0.0996900971927j))*dim
            arg[(0, 2, 0, 1)]=(0.00280749908504+0.117046723198j)*x[0]**o + ((-0.10075352526-0.323186113997j))*x[0] + ((-0.537558202244+0.0872701241538j))*x[1]**o + ((-0.109792087241+0.986686609851j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.534750703159+0.204316847352j)*(1+2.*(dim-1)/(o+1.)) + ((-0.210545612501+0.663500495853j))*dim
            arg[(0, 2, 0, 2)]=(-0.222124282147+0.256491669177j)*x[0]**o + ((0.899155625895-0.354541202592j))*x[0] + ((-0.36318637735-0.853411087581j))*x[1]**o + ((-0.99078246584+0.308931839667j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.585310659496-0.596919418404j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0916268399447-0.0456093629244j))*dim
            arg[(0, 2, 1, 0)]=(0.544104596085+0.812819070584j)*x[0]**o + ((0.952216044927+0.948876189113j))*x[0] + ((0.411110173462+0.50377136305j))*x[1]**o + ((-0.636327238055+0.0272004792919j))*x[1]
            ref[(0, 2, 1, 0)]=(0.955214769546+1.31659043363j)*(1+2.*(dim-1)/(o+1.)) + ((0.315888806872+0.976076668405j))*dim
            arg[(0, 2, 1, 1)]=(0.846321270199-0.317277859158j)*x[0]**o + ((0.272108739065-0.99341196336j))*x[0] + ((0.896179051486-0.935237990961j))*x[1]**o + ((-0.386988724413-0.85692420964j))*x[1]
            ref[(0, 2, 1, 1)]=(1.74250032168-1.25251585012j)*(1+2.*(dim-1)/(o+1.)) + ((-0.114879985348-1.850336173j))*dim
            arg[(0, 2, 1, 2)]=(0.279182163815+0.637665288311j)*x[0]**o + ((0.570126400444+0.493999699468j))*x[0] + ((0.723245118874-0.968729401251j))*x[1]**o + ((-0.811046520024+0.927491051202j))*x[1]
            ref[(0, 2, 1, 2)]=(1.00242728269-0.331064112939j)*(1+2.*(dim-1)/(o+1.)) + ((-0.24092011958+1.42149075067j))*dim
            arg[(0, 2, 2, 0)]=(-0.267530044374-0.839893846015j)*x[0]**o + ((0.730024738534-0.241332339873j))*x[0] + ((-0.0514760043485-0.975026386593j))*x[1]**o + ((-0.485088551736+0.589474128139j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.319006048723-1.81492023261j)*(1+2.*(dim-1)/(o+1.)) + ((0.244936186798+0.348141788266j))*dim
            arg[(0, 2, 2, 1)]=(-0.44827474936+0.996287265561j)*x[0]**o + ((0.0434927583906+0.510301964932j))*x[0] + ((-0.549362401625-0.36490297916j))*x[1]**o + ((-0.343386999197-0.600621157362j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.997637150985+0.631384286401j)*(1+2.*(dim-1)/(o+1.)) + ((-0.299894240806-0.0903191924303j))*dim
            arg[(0, 2, 2, 2)]=(-0.969201629978-0.258161061306j)*x[0]**o + ((0.484710849212+0.648120115359j))*x[0] + ((0.124973585781-0.886448971822j))*x[1]**o + ((0.204096436796+0.145265094411j))*x[1]
            ref[(0, 2, 2, 2)]=(-0.844228044197-1.14461003313j)*(1+2.*(dim-1)/(o+1.)) + ((0.688807286008+0.79338520977j))*dim
            arg[(0, 3, 0, 0)]=(0.715078666959+0.939333466629j)*x[0]**o + ((-0.576397021428+0.429687915667j))*x[0] + ((-0.915821141036-0.802493151794j))*x[1]**o + ((0.510320910017+0.681036113976j))*x[1]
            ref[(0, 3, 0, 0)]=(-0.200742474077+0.136840314835j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0660761114106+1.11072402964j))*dim
            arg[(0, 3, 0, 1)]=(0.146872117101-0.487105479617j)*x[0]**o + ((0.864412577173-0.00394739323016j))*x[0] + ((-0.145978193792-0.283344473087j))*x[1]**o + ((-0.382863137451-0.420213037813j))*x[1]
            ref[(0, 3, 0, 1)]=(0.000893923309023-0.770449952704j)*(1+2.*(dim-1)/(o+1.)) + ((0.481549439722-0.424160431043j))*dim
            arg[(0, 3, 0, 2)]=(-0.998027352019-0.473676477729j)*x[0]**o + ((0.893405679432+0.546017306472j))*x[0] + ((-0.983477201379-0.352247213849j))*x[1]**o + ((0.925849198408+0.286006919657j))*x[1]
            ref[(0, 3, 0, 2)]=(-1.9815045534-0.825923691578j)*(1+2.*(dim-1)/(o+1.)) + ((1.81925487784+0.832024226129j))*dim
            arg[(0, 3, 1, 0)]=(0.717942400629+0.325309530814j)*x[0]**o + ((-0.325332260665+0.392648912913j))*x[0] + ((0.667826578103+0.928290887168j))*x[1]**o + ((0.441667069019-0.914039701419j))*x[1]
            ref[(0, 3, 1, 0)]=(1.38576897873+1.25360041798j)*(1+2.*(dim-1)/(o+1.)) + ((0.116334808355-0.521390788507j))*dim
            arg[(0, 3, 1, 1)]=(0.469648737822-0.890581058024j)*x[0]**o + ((0.811270148906-0.627504967089j))*x[0] + ((-0.868083373725-0.279577165111j))*x[1]**o + ((0.219502377813-0.526173476597j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.398434635903-1.17015822314j)*(1+2.*(dim-1)/(o+1.)) + ((1.03077252672-1.15367844369j))*dim
            arg[(0, 3, 1, 2)]=(-0.596652948249+0.764659635663j)*x[0]**o + ((-0.174736185608-0.33496178413j))*x[0] + ((0.427324396204-0.725094973166j))*x[1]**o + ((0.837726289664+0.7065253665j))*x[1]
            ref[(0, 3, 1, 2)]=(-0.169328552045+0.0395646624973j)*(1+2.*(dim-1)/(o+1.)) + ((0.662990104057+0.37156358237j))*dim
            arg[(0, 3, 2, 0)]=(-0.641093544818-0.156480977865j)*x[0]**o + ((0.652475899476-0.0485220058467j))*x[0] + ((-0.202976811989+0.304900829545j))*x[1]**o + ((-0.22122248957-0.782699631999j))*x[1]
            ref[(0, 3, 2, 0)]=(-0.844070356807+0.14841985168j)*(1+2.*(dim-1)/(o+1.)) + ((0.431253409906-0.831221637846j))*dim
            arg[(0, 3, 2, 1)]=(0.892716198184+0.763881820053j)*x[0]**o + ((0.542108095558+0.59678216125j))*x[0] + ((-0.094505704523+0.256120901456j))*x[1]**o + ((-0.828643517529+0.880809092248j))*x[1]
            ref[(0, 3, 2, 1)]=(0.798210493661+1.02000272151j)*(1+2.*(dim-1)/(o+1.)) + ((-0.286535421971+1.4775912535j))*dim
            arg[(0, 3, 2, 2)]=(0.628740497708+0.519620857146j)*x[0]**o + ((-0.614172937287+0.0273710706269j))*x[0] + ((0.657565474271-0.631835338404j))*x[1]**o + ((-0.465657067819+0.584115402625j))*x[1]
            ref[(0, 3, 2, 2)]=(1.28630597198-0.112214481258j)*(1+2.*(dim-1)/(o+1.)) + ((-1.07983000511+0.611486473252j))*dim
            arg[(1, 0, 0, 0)]=(-0.850191619767+0.39191886741j)*x[0]**o + ((-0.410089528495+0.0633041780594j))*x[0] + ((0.83144130836-0.845667134099j))*x[1]**o + ((0.54170664581+0.155449154498j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.018750311407-0.45374826669j)*(1+2.*(dim-1)/(o+1.)) + ((0.131617117315+0.218753332557j))*dim
            arg[(1, 0, 0, 1)]=(-0.383908312554+0.535839610771j)*x[0]**o + ((0.530122555437-0.690191239243j))*x[0] + ((-0.0803921191027-0.573660222638j))*x[1]**o + ((-0.140112965071-0.764654571512j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.464300431656-0.037820611867j)*(1+2.*(dim-1)/(o+1.)) + ((0.390009590366-1.45484581076j))*dim
            arg[(1, 0, 0, 2)]=(-0.658419821418+0.337806185622j)*x[0]**o + ((0.508580167362-0.928913641826j))*x[0] + ((-0.655684332034+0.681229360183j))*x[1]**o + ((-0.593550662633-0.66327368242j))*x[1]
            ref[(1, 0, 0, 2)]=(-1.31410415345+1.01903554581j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0849704952704-1.59218732425j))*dim
            arg[(1, 0, 1, 0)]=(-0.290572478842+0.0409317514957j)*x[0]**o + ((0.481147680675-0.921318669463j))*x[0] + ((-0.503810089439-0.579639281588j))*x[1]**o + ((0.547141411332+0.403928979938j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.79438256828-0.538707530093j)*(1+2.*(dim-1)/(o+1.)) + ((1.02828909201-0.517389689525j))*dim
            arg[(1, 0, 1, 1)]=(0.785961733808-0.10887023492j)*x[0]**o + ((-0.875046261564+0.853833177229j))*x[0] + ((0.790667391524+0.695128826113j))*x[1]**o + ((0.255066651662-0.826027048111j))*x[1]
            ref[(1, 0, 1, 1)]=(1.57662912533+0.586258591193j)*(1+2.*(dim-1)/(o+1.)) + ((-0.619979609903+0.027806129118j))*dim
            arg[(1, 0, 1, 2)]=(0.581823303123+0.807234228237j)*x[0]**o + ((0.585750993767+0.635823483626j))*x[0] + ((-0.749032111203+0.404486596734j))*x[1]**o + ((0.835903002855-0.0858954929338j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.16720880808+1.21172082497j)*(1+2.*(dim-1)/(o+1.)) + ((1.42165399662+0.549927990692j))*dim
            arg[(1, 0, 2, 0)]=(0.221503996856+0.135259301085j)*x[0]**o + ((-0.557941500341-0.493287993855j))*x[0] + ((-0.435275946204-0.715877177991j))*x[1]**o + ((0.321799883911+0.955783668402j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.213771949349-0.580617876907j)*(1+2.*(dim-1)/(o+1.)) + ((-0.23614161643+0.462495674547j))*dim
            arg[(1, 0, 2, 1)]=(0.569402742641+0.307933722182j)*x[0]**o + ((0.0922573844039-0.206028923024j))*x[0] + ((-0.795545808308-0.224355950359j))*x[1]**o + ((-0.146745316899-0.161281986423j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.226143065666+0.0835777718237j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0544879324948-0.367310909447j))*dim
            arg[(1, 0, 2, 2)]=(-0.458880103384+0.910097609303j)*x[0]**o + ((-0.155384305213+0.431533251766j))*x[0] + ((0.115552257836-0.852720437433j))*x[1]**o + ((0.0836368644377-0.472922385049j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.343327845547+0.0573771718703j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0717474407752-0.0413891332829j))*dim
            arg[(1, 1, 0, 0)]=(-0.0819841674349-0.64601925206j)*x[0]**o + ((0.998739324905-0.548300765521j))*x[0] + ((-0.960503127424+0.343275755959j))*x[1]**o + ((-0.411175714664+0.452550900083j))*x[1]
            ref[(1, 1, 0, 0)]=(-1.04248729486-0.302743496101j)*(1+2.*(dim-1)/(o+1.)) + ((0.587563610241-0.0957498654382j))*dim
            arg[(1, 1, 0, 1)]=(0.505071662013-0.381317588723j)*x[0]**o + ((-0.329418794838-0.51651810287j))*x[0] + ((-0.17856883616-0.689746258668j))*x[1]**o + ((-0.691009689578-0.102738511908j))*x[1]
            ref[(1, 1, 0, 1)]=(0.326502825853-1.07106384739j)*(1+2.*(dim-1)/(o+1.)) + ((-1.02042848442-0.619256614779j))*dim
            arg[(1, 1, 0, 2)]=(0.690311749953+0.926252136879j)*x[0]**o + ((-0.948729740873+0.832608123351j))*x[0] + ((0.167386878633-0.827658935745j))*x[1]**o + ((0.633579427506-0.0410275144768j))*x[1]
            ref[(1, 1, 0, 2)]=(0.857698628585+0.0985932011339j)*(1+2.*(dim-1)/(o+1.)) + ((-0.315150313367+0.791580608874j))*dim
            arg[(1, 1, 1, 0)]=(-0.186596330996-0.949355653964j)*x[0]**o + ((-0.671164352302+0.323586831363j))*x[0] + ((-0.966411739606-0.556232800981j))*x[1]**o + ((0.948895492082+0.683388075052j))*x[1]
            ref[(1, 1, 1, 0)]=(-1.1530080706-1.50558845494j)*(1+2.*(dim-1)/(o+1.)) + ((0.27773113978+1.00697490641j))*dim
            arg[(1, 1, 1, 1)]=(0.251247894351-0.708170664441j)*x[0]**o + ((-0.645960460851-0.414185203699j))*x[0] + ((0.135807041445+0.370577440721j))*x[1]**o + ((0.764948617507+0.623364984541j))*x[1]
            ref[(1, 1, 1, 1)]=(0.387054935796-0.33759322372j)*(1+2.*(dim-1)/(o+1.)) + ((0.118988156656+0.209179780842j))*dim
            arg[(1, 1, 1, 2)]=(-0.410133403665-0.457448257768j)*x[0]**o + ((0.43237543258+0.231589455092j))*x[0] + ((0.249641016871+0.736760861173j))*x[1]**o + ((0.278875124422-0.339425530502j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.160492386794+0.279312603405j)*(1+2.*(dim-1)/(o+1.)) + ((0.711250557002-0.107836075411j))*dim
            arg[(1, 1, 2, 0)]=(0.950053387435+0.844145539051j)*x[0]**o + ((-0.459914774417+0.112805450555j))*x[0] + ((0.941590995041+0.483892243214j))*x[1]**o + ((0.768446149707-0.819305883613j))*x[1]
            ref[(1, 1, 2, 0)]=(1.89164438248+1.32803778227j)*(1+2.*(dim-1)/(o+1.)) + ((0.30853137529-0.706500433058j))*dim
            arg[(1, 1, 2, 1)]=(0.0972006899118-0.822079853752j)*x[0]**o + ((-0.389599734834+0.414539667165j))*x[0] + ((0.0427026014289+0.138627326113j))*x[1]**o + ((0.102431842539-0.557356171551j))*x[1]
            ref[(1, 1, 2, 1)]=(0.139903291341-0.683452527639j)*(1+2.*(dim-1)/(o+1.)) + ((-0.287167892295-0.142816504386j))*dim
            arg[(1, 1, 2, 2)]=(-0.83041556721+0.235207995021j)*x[0]**o + ((-0.297220811482+0.0933903604022j))*x[0] + ((0.974727054452+0.616412627675j))*x[1]**o + ((-0.255361425963-0.561532960067j))*x[1]
            ref[(1, 1, 2, 2)]=(0.144311487242+0.851620622696j)*(1+2.*(dim-1)/(o+1.)) + ((-0.552582237445-0.468142599664j))*dim
            arg[(1, 2, 0, 0)]=(-0.212560922912+0.0404166976585j)*x[0]**o + ((0.805660122967+0.134262732847j))*x[0] + ((-0.0447657350648-0.431074544646j))*x[1]**o + ((0.295770243003+0.88175214243j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.257326657977-0.390657846987j)*(1+2.*(dim-1)/(o+1.)) + ((1.10143036597+1.01601487528j))*dim
            arg[(1, 2, 0, 1)]=(-0.103561567916-0.837464835394j)*x[0]**o + ((0.295781365318+0.783871865389j))*x[0] + ((-0.104791564171-0.561398555131j))*x[1]**o + ((-0.459499992938+0.512032387918j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.208353132087-1.39886339052j)*(1+2.*(dim-1)/(o+1.)) + ((-0.163718627621+1.29590425331j))*dim
            arg[(1, 2, 0, 2)]=(-0.645734833955-0.28770121075j)*x[0]**o + ((-0.176553022328-0.376363878316j))*x[0] + ((-0.971283045156-0.834381427357j))*x[1]**o + ((-0.444440805034-0.841562242397j))*x[1]
            ref[(1, 2, 0, 2)]=(-1.61701787911-1.12208263811j)*(1+2.*(dim-1)/(o+1.)) + ((-0.620993827361-1.21792612071j))*dim
            arg[(1, 2, 1, 0)]=(-0.0320428626219-0.714596661324j)*x[0]**o + ((-0.0951975313107+0.298308453817j))*x[0] + ((-0.320080805873+0.270450584999j))*x[1]**o + ((-0.860434626518+0.66419924721j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.352123668495-0.444146076325j)*(1+2.*(dim-1)/(o+1.)) + ((-0.955632157829+0.962507701027j))*dim
            arg[(1, 2, 1, 1)]=(-0.0337119513682-0.609553774958j)*x[0]**o + ((-0.798351514577-0.479712324503j))*x[0] + ((0.91187539984+0.125868367214j))*x[1]**o + ((-0.18975971772+0.525476861108j))*x[1]
            ref[(1, 2, 1, 1)]=(0.878163448472-0.483685407744j)*(1+2.*(dim-1)/(o+1.)) + ((-0.988111232296+0.0457645366051j))*dim
            arg[(1, 2, 1, 2)]=(0.899924266715+0.903383737343j)*x[0]**o + ((0.981173540428-0.399887626823j))*x[0] + ((-0.191379874311-0.576024755469j))*x[1]**o + ((0.566840927294+0.0996462592653j))*x[1]
            ref[(1, 2, 1, 2)]=(0.708544392404+0.327358981874j)*(1+2.*(dim-1)/(o+1.)) + ((1.54801446772-0.300241367558j))*dim
            arg[(1, 2, 2, 0)]=(0.423772477139-0.894283759899j)*x[0]**o + ((-0.062449921114+0.381072786453j))*x[0] + ((-0.917612434022+0.667566416838j))*x[1]**o + ((-0.991058193965-0.799842615759j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.493839956883-0.226717343061j)*(1+2.*(dim-1)/(o+1.)) + ((-1.05350811508-0.418769829307j))*dim
            arg[(1, 2, 2, 1)]=(-0.941321550286+0.191439873387j)*x[0]**o + ((0.394555345733-0.92671399392j))*x[0] + ((0.623477345505+0.755433146634j))*x[1]**o + ((-0.0648801866486-0.262577607048j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.317844204781+0.946873020021j)*(1+2.*(dim-1)/(o+1.)) + ((0.329675159084-1.18929160097j))*dim
            arg[(1, 2, 2, 2)]=(0.318004922472+0.299802559351j)*x[0]**o + ((-0.978646524794+0.369754608892j))*x[0] + ((0.311431886348+0.637286196353j))*x[1]**o + ((-0.939297849034+0.54012675935j))*x[1]
            ref[(1, 2, 2, 2)]=(0.629436808821+0.937088755704j)*(1+2.*(dim-1)/(o+1.)) + ((-1.91794437383+0.909881368242j))*dim
            arg[(1, 3, 0, 0)]=(-0.0509872590068-0.890601895118j)*x[0]**o + ((-0.0907614888183-0.340408753743j))*x[0] + ((0.945782575828+0.759906983234j))*x[1]**o + ((0.323733500794+0.175750613942j))*x[1]
            ref[(1, 3, 0, 0)]=(0.894795316821-0.130694911884j)*(1+2.*(dim-1)/(o+1.)) + ((0.232972011976-0.164658139801j))*dim
            arg[(1, 3, 0, 1)]=(-0.288720819726+0.685965999029j)*x[0]**o + ((0.384624543549+0.885155923511j))*x[0] + ((0.846149199096-0.119058436565j))*x[1]**o + ((-0.909204104743-0.331982693737j))*x[1]
            ref[(1, 3, 0, 1)]=(0.557428379371+0.566907562464j)*(1+2.*(dim-1)/(o+1.)) + ((-0.524579561195+0.553173229774j))*dim
            arg[(1, 3, 0, 2)]=(0.477725791187+0.630411320187j)*x[0]**o + ((-0.247084609896+0.971340274854j))*x[0] + ((0.367597001949+0.0519598849564j))*x[1]**o + ((-0.629631756751-0.00864001010262j))*x[1]
            ref[(1, 3, 0, 2)]=(0.845322793136+0.682371205144j)*(1+2.*(dim-1)/(o+1.)) + ((-0.876716366648+0.962700264751j))*dim
            arg[(1, 3, 1, 0)]=(0.0780001226192-0.539732587136j)*x[0]**o + ((-0.81525146487-0.560159792152j))*x[0] + ((-0.658190864407-0.97447677364j))*x[1]**o + ((0.371126668085-0.519529758718j))*x[1]
            ref[(1, 3, 1, 0)]=(-0.580190741788-1.51420936078j)*(1+2.*(dim-1)/(o+1.)) + ((-0.444124796785-1.07968955087j))*dim
            arg[(1, 3, 1, 1)]=(0.529157099085-0.963080929105j)*x[0]**o + ((-0.0460158902704+0.929355873316j))*x[0] + ((0.0144587285625-0.567411587305j))*x[1]**o + ((0.646525046783-0.693352215377j))*x[1]
            ref[(1, 3, 1, 1)]=(0.543615827647-1.53049251641j)*(1+2.*(dim-1)/(o+1.)) + ((0.600509156512+0.23600365794j))*dim
            arg[(1, 3, 1, 2)]=(-0.434916583398-0.336830401047j)*x[0]**o + ((-0.057851864783+0.263278939017j))*x[0] + ((0.940587561723+0.934706389337j))*x[1]**o + ((0.864001619092-0.57656897033j))*x[1]
            ref[(1, 3, 1, 2)]=(0.505670978325+0.59787598829j)*(1+2.*(dim-1)/(o+1.)) + ((0.806149754309-0.313290031313j))*dim
            arg[(1, 3, 2, 0)]=(0.603898798315+0.27571310298j)*x[0]**o + ((0.447001003773-0.983348097309j))*x[0] + ((0.110553939478-0.117087205808j))*x[1]**o + ((0.143228341577-0.493038133374j))*x[1]
            ref[(1, 3, 2, 0)]=(0.714452737794+0.158625897172j)*(1+2.*(dim-1)/(o+1.)) + ((0.59022934535-1.47638623068j))*dim
            arg[(1, 3, 2, 1)]=(0.939639542228+0.0364651992243j)*x[0]**o + ((-0.928206596056-0.535164514903j))*x[0] + ((-0.188185975721-0.226409748601j))*x[1]**o + ((-0.813370155341+0.0848849090853j))*x[1]
            ref[(1, 3, 2, 1)]=(0.751453566506-0.189944549377j)*(1+2.*(dim-1)/(o+1.)) + ((-1.7415767514-0.450279605818j))*dim
            arg[(1, 3, 2, 2)]=(0.679061757696+0.779074011725j)*x[0]**o + ((-0.566331928944-0.498103304915j))*x[0] + ((-0.726437676879-0.469613990144j))*x[1]**o + ((0.386515731739-0.971073221217j))*x[1]
            ref[(1, 3, 2, 2)]=(-0.0473759191825+0.309460021581j)*(1+2.*(dim-1)/(o+1.)) + ((-0.179816197205-1.46917652613j))*dim
        else:
            arg[(0, 0, 0, 0)]=(-0.512066688396+0.211570456258j)*x[0]**o + ((0.510121562533-0.0575315778931j))*x[0] + ((-0.0395378687145+0.210120176283j))*x[1]**o + ((-0.245550498431-0.931647653368j))*x[1] + ((-0.662055728574+0.938473448067j))*x[2]**o + ((-0.137385059865+0.536883441264j))*x[2]
            ref[(0, 0, 0, 0)]=(-1.21366028568+1.36016408061j)*(1+2.*(dim-1)/(o+1.)) + ((0.127186004236-0.452295789997j))*dim
            arg[(0, 0, 0, 1)]=(0.227539200044-0.552901161535j)*x[0]**o + ((0.150170290247-0.693567540982j))*x[0] + ((0.333986653287+0.000319936973041j))*x[1]**o + ((-0.0517064388221+0.996083469678j))*x[1] + ((-0.359045312207-0.835711089549j))*x[2]**o + ((-0.393919686938-0.698899208605j))*x[2]
            ref[(0, 0, 0, 1)]=(0.202480541125-1.38829231411j)*(1+2.*(dim-1)/(o+1.)) + ((-0.295455835514-0.39638327991j))*dim
            arg[(0, 0, 0, 2)]=(-0.0671634719464+0.780676175016j)*x[0]**o + ((0.246668416974+0.846091786553j))*x[0] + ((0.151220384609+0.156665675398j))*x[1]**o + ((-0.905810888636+0.70986711256j))*x[1] + ((0.451076813448+0.787801776139j))*x[2]**o + ((0.816268274403+0.838071679294j))*x[2]
            ref[(0, 0, 0, 2)]=(0.535133726111+1.72514362655j)*(1+2.*(dim-1)/(o+1.)) + ((0.157125802741+2.39403057841j))*dim
            arg[(0, 0, 1, 0)]=(-0.380217489151+0.334335012237j)*x[0]**o + ((0.0576834556692-0.110870062003j))*x[0] + ((-0.875233732282+0.264371799515j))*x[1]**o + ((-0.528965907557-0.1628212943j))*x[1] + ((0.0407785691047+0.283916447584j))*x[2]**o + ((-0.770332320095+0.941098491532j))*x[2]
            ref[(0, 0, 1, 0)]=(-1.21467265233+0.882623259336j)*(1+2.*(dim-1)/(o+1.)) + ((-1.24161477198+0.667407135229j))*dim
            arg[(0, 0, 1, 1)]=(-0.313844368913+0.574355833247j)*x[0]**o + ((0.288084925391+0.123751611052j))*x[0] + ((0.0283960678905+0.0416698069013j))*x[1]**o + ((0.997390670276-0.646116117687j))*x[1] + ((0.525321786191-0.735448312536j))*x[2]**o + ((0.0914229196573-0.325953210393j))*x[2]
            ref[(0, 0, 1, 1)]=(0.239873485168-0.119422672388j)*(1+2.*(dim-1)/(o+1.)) + ((1.37689851532-0.848317717028j))*dim
            arg[(0, 0, 1, 2)]=(0.517819303168-0.334701999438j)*x[0]**o + ((-0.981840453669+0.86286886747j))*x[0] + ((-0.580901395202+0.14153202146j))*x[1]**o + ((-0.250597302345+0.674078532603j))*x[1] + ((-0.511196674739-0.546092850397j))*x[2]**o + ((-0.570293851051+0.741237816658j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.574278766774-0.739262828375j)*(1+2.*(dim-1)/(o+1.)) + ((-1.80273160706+2.27818521673j))*dim
            arg[(0, 0, 2, 0)]=(-0.248914059664+0.237630369528j)*x[0]**o + ((-0.619670717469-0.462373055272j))*x[0] + ((0.846975348815-0.910021595431j))*x[1]**o + ((-0.798242953654-0.123745442477j))*x[1] + ((-0.992407927997-0.347739084579j))*x[2]**o + ((0.203848676698-0.923127187847j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.394346638846-1.02013031048j)*(1+2.*(dim-1)/(o+1.)) + ((-1.21406499442-1.5092456856j))*dim
            arg[(0, 0, 2, 1)]=(0.525586128748-0.0307256523982j)*x[0]**o + ((-0.486985305626-0.757864579804j))*x[0] + ((-0.690569247409-0.612307985241j))*x[1]**o + ((-0.666663475528-0.238143293272j))*x[1] + ((-0.734041878531+0.187703203951j))*x[2]**o + ((0.29051529832+0.725475610805j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.899024997192-0.455330433688j)*(1+2.*(dim-1)/(o+1.)) + ((-0.863133482833-0.27053226227j))*dim
            arg[(0, 0, 2, 2)]=(-0.877316922983+0.426052250072j)*x[0]**o + ((0.763306395193+0.475588870369j))*x[0] + ((-0.0891024590612-0.319363016066j))*x[1]**o + ((-0.677752381136+0.519053273598j))*x[1] + ((0.810472122672+0.725707145555j))*x[2]**o + ((0.906060177219-0.9044386786j))*x[2]
            ref[(0, 0, 2, 2)]=(-0.155947259373+0.832396379561j)*(1+2.*(dim-1)/(o+1.)) + ((0.991614191276+0.0902034653673j))*dim
            arg[(0, 1, 0, 0)]=(0.555196844974+0.0901114980048j)*x[0]**o + ((-0.175684392445+0.471362133984j))*x[0] + ((-0.106379715461+0.0968770860095j))*x[1]**o + ((0.659752491052+0.346455157233j))*x[1] + ((-0.357584232393+0.746808107081j))*x[2]**o + ((-0.652208950036-0.253018718427j))*x[2]
            ref[(0, 1, 0, 0)]=(0.0912328971197+0.933796691095j)*(1+2.*(dim-1)/(o+1.)) + ((-0.168140851429+0.56479857279j))*dim
            arg[(0, 1, 0, 1)]=(0.92387148886-0.758242315441j)*x[0]**o + ((0.191813129096-0.2883322916j))*x[0] + ((0.697611588991-0.234324248125j))*x[1]**o + ((-0.594362254529-0.566422321962j))*x[1] + ((0.71604215693-0.915011214903j))*x[2]**o + ((0.0393719127183-0.957580366388j))*x[2]
            ref[(0, 1, 0, 1)]=(2.33752523478-1.90757777847j)*(1+2.*(dim-1)/(o+1.)) + ((-0.363177212715-1.81233497995j))*dim
            arg[(0, 1, 0, 2)]=(-0.0971008453036+0.741852031908j)*x[0]**o + ((0.221105664553+0.620095989719j))*x[0] + ((0.656570744808-0.056586199183j))*x[1]**o + ((0.133663175252+0.700541061445j))*x[1] + ((0.406308269449+0.899431502181j))*x[2]**o + ((-0.931550224842+0.221442508968j))*x[2]
            ref[(0, 1, 0, 2)]=(0.965778168954+1.58469733491j)*(1+2.*(dim-1)/(o+1.)) + ((-0.576781385037+1.54207956013j))*dim
            arg[(0, 1, 1, 0)]=(0.39752015646+0.751923492851j)*x[0]**o + ((0.30387174012+0.00284191794827j))*x[0] + ((-0.841082505539-0.984624212511j))*x[1]**o + ((-0.0873477722135-0.954840433418j))*x[1] + ((0.817091216644-0.592709567901j))*x[2]**o + ((0.0829084882436-0.431466226032j))*x[2]
            ref[(0, 1, 1, 0)]=(0.373528867565-0.82541028756j)*(1+2.*(dim-1)/(o+1.)) + ((0.29943245615-1.3834647415j))*dim
            arg[(0, 1, 1, 1)]=(0.950981465621+0.810846814206j)*x[0]**o + ((-0.93182523259+0.718956400629j))*x[0] + ((0.0373267691158-0.435950524347j))*x[1]**o + ((-0.200139856271+0.470055206248j))*x[1] + ((0.715122208203+0.19976268794j))*x[2]**o + ((-0.384783965874-0.212918797679j))*x[2]
            ref[(0, 1, 1, 1)]=(1.70343044294+0.574658977799j)*(1+2.*(dim-1)/(o+1.)) + ((-1.51674905474+0.976092809198j))*dim
            arg[(0, 1, 1, 2)]=(-0.971753237422+0.844970717489j)*x[0]**o + ((0.862694356205+0.899899895435j))*x[0] + ((-0.525328502532+0.765825247531j))*x[1]**o + ((-0.00286603738744+0.984653478393j))*x[1] + ((0.988693062847-0.56403302934j))*x[2]**o + ((-0.207760222038-0.1085536677j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.508388677107+1.04676293568j)*(1+2.*(dim-1)/(o+1.)) + ((0.652068096779+1.77599970613j))*dim
            arg[(0, 1, 2, 0)]=(0.110072925245-0.821025388478j)*x[0]**o + ((-0.539091828096-0.42749104748j))*x[0] + ((-0.688019238331+0.785971544571j))*x[1]**o + ((-0.689560970402+0.0204024859107j))*x[1] + ((0.313656853999+0.277386203417j))*x[2]**o + ((0.632223207728+0.513247460836j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.264289459087+0.24233235951j)*(1+2.*(dim-1)/(o+1.)) + ((-0.596429590771+0.106158899266j))*dim
            arg[(0, 1, 2, 1)]=(0.843901251518-0.909526708107j)*x[0]**o + ((0.676596838214-0.530341282767j))*x[0] + ((-0.522528651718+0.869616484002j))*x[1]**o + ((-0.0471202613059-0.892397821329j))*x[1] + ((0.522511610386+0.856907769314j))*x[2]**o + ((-0.496349424365+0.791482631466j))*x[2]
            ref[(0, 1, 2, 1)]=(0.843884210186+0.81699754521j)*(1+2.*(dim-1)/(o+1.)) + ((0.133127152543-0.631256472631j))*dim
            arg[(0, 1, 2, 2)]=(0.86884944082+0.133674853211j)*x[0]**o + ((0.10564107827+0.89208107068j))*x[0] + ((0.172609257977+0.0837613482836j))*x[1]**o + ((-0.308655748857-0.238411369709j))*x[1] + ((-0.189253794753-0.0670070889865j))*x[2]**o + ((-0.244318167904-0.925139168434j))*x[2]
            ref[(0, 1, 2, 2)]=(0.852204904043+0.150429112508j)*(1+2.*(dim-1)/(o+1.)) + ((-0.447332838491-0.271469467463j))*dim
            arg[(0, 2, 0, 0)]=(0.330511921443+0.204339374891j)*x[0]**o + ((0.11946085431-0.199629814187j))*x[0] + ((-0.147281622235+0.796439027736j))*x[1]**o + ((-0.188920164941+0.929379010032j))*x[1] + ((-0.484071668191+0.353465786014j))*x[2]**o + ((0.678668684831+0.455078635872j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.300841368983+1.35424418864j)*(1+2.*(dim-1)/(o+1.)) + ((0.6092093742+1.18482783172j))*dim
            arg[(0, 2, 0, 1)]=(0.257985778422-0.120847547224j)*x[0]**o + ((-0.821651459893+0.908869203366j))*x[0] + ((-0.807613931323+0.386538339238j))*x[1]**o + ((0.296444559552+0.728522180422j))*x[1] + ((0.387813302929-0.907140141182j))*x[2]**o + ((-0.953828412961+0.799748303232j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.161814849972-0.641449349167j)*(1+2.*(dim-1)/(o+1.)) + ((-1.4790353133+2.43713968702j))*dim
            arg[(0, 2, 0, 2)]=(0.255919170831+0.129623795043j)*x[0]**o + ((-0.243091396957-0.512713191011j))*x[0] + ((0.392623288007-0.296750547032j))*x[1]**o + ((0.341660563259+0.374710155295j))*x[1] + ((-0.858622494615+0.184681635538j))*x[2]**o + ((-0.0276758637328+0.893379802287j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.210080035777+0.0175548835492j)*(1+2.*(dim-1)/(o+1.)) + ((0.0708933025687+0.755376766572j))*dim
            arg[(0, 2, 1, 0)]=(0.178188196363+0.0394097080945j)*x[0]**o + ((0.393807181669-0.33618741885j))*x[0] + ((0.877975202724-0.159502981903j))*x[1]**o + ((-0.407251669121+0.058684613764j))*x[1] + ((0.407009000021+0.462494583851j))*x[2]**o + ((-0.854536399924-0.310929470357j))*x[2]
            ref[(0, 2, 1, 0)]=(1.46317239911+0.342401310042j)*(1+2.*(dim-1)/(o+1.)) + ((-0.867980887375-0.588432275443j))*dim
            arg[(0, 2, 1, 1)]=(0.564342956999+0.611749847628j)*x[0]**o + ((-0.882552997282+0.857299038467j))*x[0] + ((0.266138659577-0.773253573451j))*x[1]**o + ((-0.112618167033-0.937248342494j))*x[1] + ((-0.498348848864-0.668003163527j))*x[2]**o + ((0.608430949063-0.0265399709701j))*x[2]
            ref[(0, 2, 1, 1)]=(0.332132767712-0.829506889349j)*(1+2.*(dim-1)/(o+1.)) + ((-0.386740215251-0.106489274997j))*dim
            arg[(0, 2, 1, 2)]=(-0.71304913841+0.0454700258862j)*x[0]**o + ((-0.163126124604-0.311769226761j))*x[0] + ((-0.211177588335+0.960738200245j))*x[1]**o + ((0.372422475346+0.0544323130026j))*x[1] + ((0.838990501368+0.983846311671j))*x[2]**o + ((-0.8616067288-0.735070934205j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.0852362253773+1.9900545378j)*(1+2.*(dim-1)/(o+1.)) + ((-0.652310378059-0.992407847964j))*dim
            arg[(0, 2, 2, 0)]=(0.994206719648-0.75934215959j)*x[0]**o + ((0.509289590749-0.335927704243j))*x[0] + ((0.817924220511+0.326725060633j))*x[1]**o + ((0.528496833679-0.069396143697j))*x[1] + ((0.344623018718-0.608706127899j))*x[2]**o + ((-0.0336231118523-0.0413065523816j))*x[2]
            ref[(0, 2, 2, 0)]=(2.15675395888-1.04132322686j)*(1+2.*(dim-1)/(o+1.)) + ((1.00416331258-0.446630400322j))*dim
            arg[(0, 2, 2, 1)]=(-0.977024055934-0.208647139732j)*x[0]**o + ((-0.301134643494-0.899827571032j))*x[0] + ((0.0721164702082-0.503564167494j))*x[1]**o + ((-0.583504163518-0.735032491653j))*x[1] + ((0.950748938016-0.623271859772j))*x[2]**o + ((-0.995607648634+0.636629258535j))*x[2]
            ref[(0, 2, 2, 1)]=(0.0458413522903-1.335483167j)*(1+2.*(dim-1)/(o+1.)) + ((-1.88024645565-0.998230804151j))*dim
            arg[(0, 2, 2, 2)]=(0.384727953671+0.0458992606739j)*x[0]**o + ((0.0338958722142-0.193090441409j))*x[0] + ((0.890707722743+0.361923853418j))*x[1]**o + ((-0.68678910466-0.161702427752j))*x[1] + ((0.946971578867-0.47914015707j))*x[2]**o + ((0.877349523011-0.619262150277j))*x[2]
            ref[(0, 2, 2, 2)]=(2.22240725528-0.0713170429779j)*(1+2.*(dim-1)/(o+1.)) + ((0.224456290566-0.974055019438j))*dim
            arg[(0, 3, 0, 0)]=(-0.0889535147472-0.357478176847j)*x[0]**o + ((0.896578139259+0.270334163925j))*x[0] + ((-0.607806122179-0.290845678689j))*x[1]**o + ((0.00764129384421+0.369363783593j))*x[1] + ((-0.748708476126+0.838029930103j))*x[2]**o + ((0.212719313142-0.802446335336j))*x[2]
            ref[(0, 3, 0, 0)]=(-1.44546811305+0.189706074568j)*(1+2.*(dim-1)/(o+1.)) + ((1.11693874625-0.162748387818j))*dim
            arg[(0, 3, 0, 1)]=(-0.573159191342-0.985727700989j)*x[0]**o + ((-0.96733369823+0.398930217848j))*x[0] + ((0.787716809913-0.767195789758j))*x[1]**o + ((-0.856292943246-0.739665191693j))*x[1] + ((0.0632679205796-0.362482395405j))*x[2]**o + ((0.587334200911+0.442392539633j))*x[2]
            ref[(0, 3, 0, 1)]=(0.277825539151-2.11540588615j)*(1+2.*(dim-1)/(o+1.)) + ((-1.23629244056+0.101657565788j))*dim
            arg[(0, 3, 0, 2)]=(0.155160486029-0.980359578791j)*x[0]**o + ((0.465687472556+0.189437667488j))*x[0] + ((-0.501923500309+0.234042915387j))*x[1]**o + ((0.865646834873-0.191939318748j))*x[1] + ((-0.590322357089-0.68611412633j))*x[2]**o + ((0.493219217991+0.16662387343j))*x[2]
            ref[(0, 3, 0, 2)]=(-0.937085371369-1.43243078973j)*(1+2.*(dim-1)/(o+1.)) + ((1.82455352542+0.164122222171j))*dim
            arg[(0, 3, 1, 0)]=(0.826059868069-0.281637182931j)*x[0]**o + ((0.119661457027+0.003854120297j))*x[0] + ((-0.314214016003+0.215955018048j))*x[1]**o + ((0.0548921272671+0.982901642218j))*x[1] + ((-0.128528896536-0.881820931555j))*x[2]**o + ((-0.232817513745+0.257416302498j))*x[2]
            ref[(0, 3, 1, 0)]=(0.383316955531-0.947503096439j)*(1+2.*(dim-1)/(o+1.)) + ((-0.058263929451+1.24417206501j))*dim
            arg[(0, 3, 1, 1)]=(0.934498617633+0.00362521187937j)*x[0]**o + ((-0.577390382704-0.477632744138j))*x[0] + ((0.56532690779+0.92073908058j))*x[1]**o + ((0.61905781274+0.192460960864j))*x[1] + ((-0.138624775478+0.488420753993j))*x[2]**o + ((0.5039913106+0.261736028398j))*x[2]
            ref[(0, 3, 1, 1)]=(1.36120074995+1.41278504645j)*(1+2.*(dim-1)/(o+1.)) + ((0.545658740637-0.0234357548767j))*dim
            arg[(0, 3, 1, 2)]=(0.0589070118144-0.98570544249j)*x[0]**o + ((-0.303456603253-0.230419806438j))*x[0] + ((0.429364479416+0.628718016333j))*x[1]**o + ((0.315988685842-0.16263125385j))*x[1] + ((-0.582038917153+0.108978425303j))*x[2]**o + ((-0.925835419106+0.549645879347j))*x[2]
            ref[(0, 3, 1, 2)]=(-0.0937674259226-0.248009000854j)*(1+2.*(dim-1)/(o+1.)) + ((-0.913303336517+0.156594819059j))*dim
            arg[(0, 3, 2, 0)]=(-0.0963595994932+0.0730842800491j)*x[0]**o + ((0.0281818977764+0.441450688307j))*x[0] + ((-0.710306456775+0.589741986075j))*x[1]**o + ((-0.272655929602+0.668858413796j))*x[1] + ((0.652578716086-0.294016379695j))*x[2]**o + ((-0.390483092993-0.133308362428j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.154087340183+0.36880988643j)*(1+2.*(dim-1)/(o+1.)) + ((-0.634957124819+0.977000739674j))*dim
            arg[(0, 3, 2, 1)]=(0.723679451192+0.707039946668j)*x[0]**o + ((-0.75897406786+0.831878721737j))*x[0] + ((-0.984969687377+0.780865414363j))*x[1]**o + ((0.834603035014+0.179562963706j))*x[1] + ((0.789131397218+0.149531761912j))*x[2]**o + ((-0.151478063689-0.198055013931j))*x[2]
            ref[(0, 3, 2, 1)]=(0.527841161032+1.63743712294j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0758490965356+0.813386671512j))*dim
            arg[(0, 3, 2, 2)]=(0.548366187064+0.42022823313j)*x[0]**o + ((0.210034868545+0.394629296196j))*x[0] + ((-0.253220924154-0.817994216944j))*x[1]**o + ((-0.0727597148766+0.234115789983j))*x[1] + ((0.150947416983-0.197728778748j))*x[2]**o + ((0.831409493648+0.581536085881j))*x[2]
            ref[(0, 3, 2, 2)]=(0.446092679893-0.595494762561j)*(1+2.*(dim-1)/(o+1.)) + ((0.968684647317+1.21028117206j))*dim
            arg[(1, 0, 0, 0)]=(-0.371184787397-0.226498288063j)*x[0]**o + ((-0.960356712229+0.147154251167j))*x[0] + ((0.0773085342727+0.647028647551j))*x[1]**o + ((0.633545284807+0.749444600138j))*x[1] + ((-0.141483031776+0.276718546917j))*x[2]**o + ((0.368792058422-0.196669828829j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.4353592849+0.697248906404j)*(1+2.*(dim-1)/(o+1.)) + ((0.0419806309998+0.699929022476j))*dim
            arg[(1, 0, 0, 1)]=(-0.648447691221+0.9645920999j)*x[0]**o + ((0.412757765884+0.16660998693j))*x[0] + ((-0.600072701148-0.228417715821j))*x[1]**o + ((-0.383426419556-0.842317904363j))*x[1] + ((-0.61694575748-0.504007311534j))*x[2]**o + ((0.994419648248+0.309104137378j))*x[2]
            ref[(1, 0, 0, 1)]=(-1.86546614985+0.232167072545j)*(1+2.*(dim-1)/(o+1.)) + ((1.02375099458-0.366603780054j))*dim
            arg[(1, 0, 0, 2)]=(0.880579520545+0.0766088034123j)*x[0]**o + ((-0.402902998272-0.381042312583j))*x[0] + ((0.634217856449-0.0473541103582j))*x[1]**o + ((-0.671486635797-0.594370906854j))*x[1] + ((0.669767481849-0.316333773592j))*x[2]**o + ((-0.482964731578+0.626446641027j))*x[2]
            ref[(1, 0, 0, 2)]=(2.18456485884-0.287079080538j)*(1+2.*(dim-1)/(o+1.)) + ((-1.55735436565-0.348966578411j))*dim
            arg[(1, 0, 1, 0)]=(-0.681608786701-0.0235392232066j)*x[0]**o + ((0.646377255594-0.579051113897j))*x[0] + ((-0.536971049089-0.977369367403j))*x[1]**o + ((0.410340989382-0.242825609266j))*x[1] + ((0.853074390595+0.146766138985j))*x[2]**o + ((0.170280001899+0.636518407966j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.365505445194-0.854142451624j)*(1+2.*(dim-1)/(o+1.)) + ((1.22699824688-0.185358315197j))*dim
            arg[(1, 0, 1, 1)]=(-0.566344646707+0.816511474245j)*x[0]**o + ((-0.921585445372+0.562721220022j))*x[0] + ((-0.967666243182+0.610439322327j))*x[1]**o + ((0.912784867761+0.455821655342j))*x[1] + ((0.254263171689-0.598440161392j))*x[2]**o + ((-0.346150330929+0.276365424731j))*x[2]
            ref[(1, 0, 1, 1)]=(-1.2797477182+0.82851063518j)*(1+2.*(dim-1)/(o+1.)) + ((-0.35495090854+1.2949083001j))*dim
            arg[(1, 0, 1, 2)]=(0.691156663169+0.442493830786j)*x[0]**o + ((0.967322081681+0.508208433908j))*x[0] + ((0.198358749343-0.408588526816j))*x[1]**o + ((0.089015698876+0.766571185365j))*x[1] + ((-0.554016534026-0.405010575425j))*x[2]**o + ((0.362976289632-0.0529613313733j))*x[2]
            ref[(1, 0, 1, 2)]=(0.335498878486-0.371105271454j)*(1+2.*(dim-1)/(o+1.)) + ((1.41931407019+1.2218182879j))*dim
            arg[(1, 0, 2, 0)]=(-0.0325589613032-0.761611154302j)*x[0]**o + ((0.0928543543393+0.256674227639j))*x[0] + ((-0.116613766958+0.755678513874j))*x[1]**o + ((-0.928343979683-0.887102264859j))*x[1] + ((0.365759111143-0.0105551227025j))*x[2]**o + ((0.0897882977268-0.340359388565j))*x[2]
            ref[(1, 0, 2, 0)]=(0.216586382882-0.016487763131j)*(1+2.*(dim-1)/(o+1.)) + ((-0.745701327617-0.970787425785j))*dim
            arg[(1, 0, 2, 1)]=(-0.47207769694+0.766832090147j)*x[0]**o + ((0.536515794393+0.849641216057j))*x[0] + ((-0.318496504377-0.504397757185j))*x[1]**o + ((0.464292273567+0.952354326796j))*x[1] + ((-0.502392011243+0.030519051004j))*x[2]**o + ((-0.258165671104-0.265076568411j))*x[2]
            ref[(1, 0, 2, 1)]=(-1.29296621256+0.292953383965j)*(1+2.*(dim-1)/(o+1.)) + ((0.742642396855+1.53691897444j))*dim
            arg[(1, 0, 2, 2)]=(0.476171729113-0.847088980353j)*x[0]**o + ((-0.0967684058131+0.876395997878j))*x[0] + ((0.564824313424+0.987147392444j))*x[1]**o + ((0.769896749605+0.32198378968j))*x[1] + ((0.441597121632-0.210393125681j))*x[2]**o + ((-0.189898654002-0.176416220235j))*x[2]
            ref[(1, 0, 2, 2)]=(1.48259316417-0.0703347135902j)*(1+2.*(dim-1)/(o+1.)) + ((0.48322968979+1.02196356732j))*dim
            arg[(1, 1, 0, 0)]=(-0.802498749594-0.869902677894j)*x[0]**o + ((-0.500389506914+0.732906666548j))*x[0] + ((-0.256423418585-0.713815535433j))*x[1]**o + ((-0.179861492124-0.897972422718j))*x[1] + ((-0.921267823415+0.0599118990209j))*x[2]**o + ((-0.524376136987+0.0226387674592j))*x[2]
            ref[(1, 1, 0, 0)]=(-1.98018999159-1.52380631431j)*(1+2.*(dim-1)/(o+1.)) + ((-1.20462713603-0.142426988711j))*dim
            arg[(1, 1, 0, 1)]=(-0.491240121379+0.354756837793j)*x[0]**o + ((-0.583461079652+0.54715136026j))*x[0] + ((-0.554878828837-0.863843727855j))*x[1]**o + ((-0.552478799702+0.456883108856j))*x[1] + ((0.848945544707-0.804395518755j))*x[2]**o + ((0.0580568256239-0.297629075549j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.197173405508-1.31348240882j)*(1+2.*(dim-1)/(o+1.)) + ((-1.07788305373+0.706405393567j))*dim
            arg[(1, 1, 0, 2)]=(-0.211531940623-0.57689994524j)*x[0]**o + ((-0.688930090469+0.263074740321j))*x[0] + ((0.166853027936+0.836241014606j))*x[1]**o + ((-0.939046112428-0.59298416134j))*x[1] + ((0.199506066361+0.883118332609j))*x[2]**o + ((-0.572148381071-0.261320145717j))*x[2]
            ref[(1, 1, 0, 2)]=(0.154827153674+1.14245940198j)*(1+2.*(dim-1)/(o+1.)) + ((-2.20012458397-0.591229566736j))*dim
            arg[(1, 1, 1, 0)]=(-0.906836511645-0.648644390818j)*x[0]**o + ((0.237329299141+0.853510766846j))*x[0] + ((0.800262560475-0.398760845717j))*x[1]**o + ((-0.249128275934+0.667616012411j))*x[1] + ((-0.448422377823+0.552773147401j))*x[2]**o + ((-0.881224142675-0.162572877633j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.554996328993-0.494632089134j)*(1+2.*(dim-1)/(o+1.)) + ((-0.893023119468+1.35855390162j))*dim
            arg[(1, 1, 1, 1)]=(0.313725952591-0.467516315368j)*x[0]**o + ((-0.558961504811+0.337433645842j))*x[0] + ((0.413979258615+0.735623990279j))*x[1]**o + ((0.239065925033-0.0502007461292j))*x[1] + ((-0.0864566962403+0.885781426476j))*x[2]**o + ((0.335697230627-0.574388866747j))*x[2]
            ref[(1, 1, 1, 1)]=(0.641248514966+1.15388910139j)*(1+2.*(dim-1)/(o+1.)) + ((0.0158016508487-0.287155967034j))*dim
            arg[(1, 1, 1, 2)]=(0.31532087209-0.253179968049j)*x[0]**o + ((0.497291086284+0.00807265294996j))*x[0] + ((0.972268441895-0.0983829071045j))*x[1]**o + ((0.625566547908-8.94902799859e-05j))*x[1] + ((-0.859420158726-0.018981239411j))*x[2]**o + ((-0.166790922016+0.354908226922j))*x[2]
            ref[(1, 1, 1, 2)]=(0.428169155259-0.370544114564j)*(1+2.*(dim-1)/(o+1.)) + ((0.956066712176+0.362891389592j))*dim
            arg[(1, 1, 2, 0)]=(0.248568038646-0.160742545393j)*x[0]**o + ((0.19192808126-0.111655498981j))*x[0] + ((0.773490136193+0.769503323j))*x[1]**o + ((0.116478623447+0.73696395769j))*x[1] + ((-0.700766073213+0.446739816853j))*x[2]**o + ((-0.979766771819+0.609418641877j))*x[2]
            ref[(1, 1, 2, 0)]=(0.321292101626+1.05550059446j)*(1+2.*(dim-1)/(o+1.)) + ((-0.671360067112+1.23472710059j))*dim
            arg[(1, 1, 2, 1)]=(-0.896558092514+0.43514304985j)*x[0]**o + ((-0.196787051208-0.105211818734j))*x[0] + ((0.0111280049607+0.179507369643j))*x[1]**o + ((0.212022810816+0.400293044653j))*x[1] + ((0.385656554036-0.896790045766j))*x[2]**o + ((-0.960969623934-0.262422905333j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.499773533517-0.282139626273j)*(1+2.*(dim-1)/(o+1.)) + ((-0.945733864326+0.0326583205874j))*dim
            arg[(1, 1, 2, 2)]=(0.334608729985-0.303718218371j)*x[0]**o + ((0.207077495134+0.841947490638j))*x[0] + ((-0.217190224762-0.51527211401j))*x[1]**o + ((-0.846558637105+0.873702128171j))*x[1] + ((0.604225295327-0.529362979345j))*x[2]**o + ((-0.116364710458-0.65561704698j))*x[2]
            ref[(1, 1, 2, 2)]=(0.72164380055-1.34835331173j)*(1+2.*(dim-1)/(o+1.)) + ((-0.755845852429+1.06003257183j))*dim
            arg[(1, 2, 0, 0)]=(-0.446376693546-0.38625345593j)*x[0]**o + ((-0.791727572452+0.365837469627j))*x[0] + ((-0.987890812788+0.45203367556j))*x[1]**o + ((-0.968350951035+0.404529273469j))*x[1] + ((0.287112696116-0.645833029752j))*x[2]**o + ((0.146688594254+0.553692895536j))*x[2]
            ref[(1, 2, 0, 0)]=(-1.14715481022-0.580052810122j)*(1+2.*(dim-1)/(o+1.)) + ((-1.61338992923+1.32405963863j))*dim
            arg[(1, 2, 0, 1)]=(0.349075166607+0.823468610537j)*x[0]**o + ((-0.254391026803-0.945548471374j))*x[0] + ((-0.75341780793+0.856009403555j))*x[1]**o + ((-0.207539584398-0.386323214729j))*x[1] + ((-0.600801870434+0.217350764833j))*x[2]**o + ((-0.557038895395+0.520712153381j))*x[2]
            ref[(1, 2, 0, 1)]=(-1.00514451176+1.89682877893j)*(1+2.*(dim-1)/(o+1.)) + ((-1.0189695066-0.811159532722j))*dim
            arg[(1, 2, 0, 2)]=(-0.757289123566-0.486278346524j)*x[0]**o + ((-0.347807414887-0.255782558473j))*x[0] + ((0.504130078725+0.846598714008j))*x[1]**o + ((0.39991022436-0.853039336514j))*x[1] + ((-0.0583622645084+0.531030277265j))*x[2]**o + ((-0.483434696859+0.740383931871j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.311521309349+0.89135064475j)*(1+2.*(dim-1)/(o+1.)) + ((-0.431331887386-0.368437963116j))*dim
            arg[(1, 2, 1, 0)]=(0.930384922007+0.737717922528j)*x[0]**o + ((0.886396598897-0.0093410429122j))*x[0] + ((0.371822280481+0.563571548093j))*x[1]**o + ((0.465523490897-0.24579616893j))*x[1] + ((-0.077591128158-0.0534267266533j))*x[2]**o + ((-0.553019981589+0.441324774207j))*x[2]
            ref[(1, 2, 1, 0)]=(1.22461607433+1.24786274397j)*(1+2.*(dim-1)/(o+1.)) + ((0.798900108206+0.186187562364j))*dim
            arg[(1, 2, 1, 1)]=(-0.0363910718548-0.120645157863j)*x[0]**o + ((0.473256115521-0.149757566591j))*x[0] + ((0.467489914387-0.744812493268j))*x[1]**o + ((0.711012668062-0.832961013564j))*x[1] + ((0.3611429325+0.504183734662j))*x[2]**o + ((0.51131702197+0.199811465993j))*x[2]
            ref[(1, 2, 1, 1)]=(0.792241775033-0.361273916469j)*(1+2.*(dim-1)/(o+1.)) + ((1.69558580555-0.782907114162j))*dim
            arg[(1, 2, 1, 2)]=(-0.178214273265-0.48465045706j)*x[0]**o + ((-0.0594325422541+0.0688236366079j))*x[0] + ((0.489060716095-0.558725451663j))*x[1]**o + ((0.905141253247+0.117289443699j))*x[1] + ((-0.931831566238-0.848475525697j))*x[2]**o + ((-0.427367143475-0.914407081398j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.620985123408-1.89185143442j)*(1+2.*(dim-1)/(o+1.)) + ((0.418341567518-0.728294001091j))*dim
            arg[(1, 2, 2, 0)]=(-0.277703940592+0.593181869065j)*x[0]**o + ((0.16074998055-0.203029380897j))*x[0] + ((0.649579648191-0.0906385145571j))*x[1]**o + ((-0.368356205726+0.923748488013j))*x[1] + ((0.887453665354+0.319569522905j))*x[2]**o + ((-0.897651599207+0.396858832061j))*x[2]
            ref[(1, 2, 2, 0)]=(1.25932937295+0.822112877413j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10525782438+1.11757793918j))*dim
            arg[(1, 2, 2, 1)]=(-0.163576424731-0.427860870782j)*x[0]**o + ((-0.967645957652+0.427047276331j))*x[0] + ((0.941888620272+0.702616825409j))*x[1]**o + ((-0.223752227038+0.454042200705j))*x[1] + ((-0.729747432839-0.686466421998j))*x[2]**o + ((0.202047427697+0.0680856020354j))*x[2]
            ref[(1, 2, 2, 1)]=(0.0485647627023-0.411710467371j)*(1+2.*(dim-1)/(o+1.)) + ((-0.989350756993+0.949175079072j))*dim
            arg[(1, 2, 2, 2)]=(0.072814111217-0.77368402708j)*x[0]**o + ((-0.583267022079+0.608853339793j))*x[0] + ((0.98035972402+0.823167203407j))*x[1]**o + ((0.175925371913+0.551016107029j))*x[1] + ((0.225102850451+0.922031055741j))*x[2]**o + ((0.256143602252-0.083121304442j))*x[2]
            ref[(1, 2, 2, 2)]=(1.27827668569+0.971514232069j)*(1+2.*(dim-1)/(o+1.)) + ((-0.151198047914+1.07674814238j))*dim
            arg[(1, 3, 0, 0)]=(-0.7517591471+0.240241661735j)*x[0]**o + ((-0.657314973145+0.87155931356j))*x[0] + ((0.0337814870787+0.602273477468j))*x[1]**o + ((0.109986460459-0.0160340155291j))*x[1] + ((-0.761208829533+0.682194102623j))*x[2]**o + ((0.342218614888-0.0266088383388j))*x[2]
            ref[(1, 3, 0, 0)]=(-1.47918648955+1.52470924183j)*(1+2.*(dim-1)/(o+1.)) + ((-0.205109897798+0.828916459692j))*dim
            arg[(1, 3, 0, 1)]=(-0.204434120306+0.796718574113j)*x[0]**o + ((0.621251343161-0.155829166707j))*x[0] + ((0.250417741555+0.319667706632j))*x[1]**o + ((-0.068744866013+0.211115119191j))*x[1] + ((0.271003548186-0.553298515886j))*x[2]**o + ((-0.081844739289-0.629367586352j))*x[2]
            ref[(1, 3, 0, 1)]=(0.316987169436+0.563087764859j)*(1+2.*(dim-1)/(o+1.)) + ((0.470661737859-0.574081633868j))*dim
            arg[(1, 3, 0, 2)]=(-0.243861658242+0.5455395063j)*x[0]**o + ((-0.23615698049-0.0779216645289j))*x[0] + ((-0.569095573653+0.339809199808j))*x[1]**o + ((-0.940821934552-0.00442383162311j))*x[1] + ((0.916743190591-0.296308882007j))*x[2]**o + ((-0.209714824366-0.285485681747j))*x[2]
            ref[(1, 3, 0, 2)]=(0.103785958696+0.589039824101j)*(1+2.*(dim-1)/(o+1.)) + ((-1.38669373941-0.367831177899j))*dim
            arg[(1, 3, 1, 0)]=(-0.227770803299+0.343281747137j)*x[0]**o + ((0.125779706028+0.548865802741j))*x[0] + ((0.395654162538+0.0705009208749j))*x[1]**o + ((-0.328032947848+0.557950949444j))*x[1] + ((0.405118092898+0.991490239497j))*x[2]**o + ((0.535401905253+0.877695345626j))*x[2]
            ref[(1, 3, 1, 0)]=(0.573001452137+1.40527290751j)*(1+2.*(dim-1)/(o+1.)) + ((0.333148663432+1.98451209781j))*dim
            arg[(1, 3, 1, 1)]=(-0.954945261507-0.786356236656j)*x[0]**o + ((0.313169860706+0.0406398842328j))*x[0] + ((0.932355374957-0.100126876038j))*x[1]**o + ((-0.504418320853-0.972604013869j))*x[1] + ((-0.430558074778-0.00612152751215j))*x[2]**o + ((0.0810072225007-0.784379718522j))*x[2]
            ref[(1, 3, 1, 1)]=(-0.453147961327-0.892604640206j)*(1+2.*(dim-1)/(o+1.)) + ((-0.110241237646-1.71634384816j))*dim
            arg[(1, 3, 1, 2)]=(-0.255972363039-0.127315987121j)*x[0]**o + ((0.616292537583+0.287229728006j))*x[0] + ((-0.297035410536-0.812355919441j))*x[1]**o + ((0.296953247983+0.418103422286j))*x[1] + ((0.965090563997+0.0935856875105j))*x[2]**o + ((0.123737175607-0.279934495396j))*x[2]
            ref[(1, 3, 1, 2)]=(0.412082790422-0.846086219051j)*(1+2.*(dim-1)/(o+1.)) + ((1.03698296117+0.425398654895j))*dim
            arg[(1, 3, 2, 0)]=(0.264120509437-0.165935198502j)*x[0]**o + ((-0.78201793496-0.140840497831j))*x[0] + ((0.129215717255-0.757353140089j))*x[1]**o + ((-0.518266537146+0.809030804377j))*x[1] + ((-0.319479276682+0.603451599829j))*x[2]**o + ((-0.552570452678-0.226962446816j))*x[2]
            ref[(1, 3, 2, 0)]=(0.0738569500102-0.319836738762j)*(1+2.*(dim-1)/(o+1.)) + ((-1.85285492478+0.441227859731j))*dim
            arg[(1, 3, 2, 1)]=(0.518403995162-0.332804550575j)*x[0]**o + ((0.323738360796+0.525200001638j))*x[0] + ((-0.602133171458-0.0479084830665j))*x[1]**o + ((0.11179269422+0.0297020242077j))*x[1] + ((-0.519775903498-0.778992779767j))*x[2]**o + ((0.491155264001-0.422671678362j))*x[2]
            ref[(1, 3, 2, 1)]=(-0.603505079794-1.15970581341j)*(1+2.*(dim-1)/(o+1.)) + ((0.926686319018+0.132230347484j))*dim
            arg[(1, 3, 2, 2)]=(0.890068394746-0.517070050602j)*x[0]**o + ((-0.585354578081-0.267745807633j))*x[0] + ((0.480996063102+0.520687107531j))*x[1]**o + ((-0.385566844276-0.509265838857j))*x[1] + ((0.772512236631+0.815649008268j))*x[2]**o + ((0.954889878372-0.350006190997j))*x[2]
            ref[(1, 3, 2, 2)]=(2.14357669448+0.819266065197j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0160315439858-1.12701783749j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.91512619199+0.692324809969j)*x[0]**o + ((-0.0995537994492+0.740820303387j))*x[0] + ((-0.721061667952+0.0454167120222j))*x[1]**o + ((0.0359074933568+0.175804010463j))*x[1]
            ref=(-1.63618785994+0.737741521991j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0636463060925+0.91662431385j))*dim
        else:
            arg=(0.799990259136-0.36397865824j)*x[0]**o + ((-0.0465403703429-0.254600336844j))*x[0] + ((0.0947362512368-0.64188550998j))*x[1]**o + ((-0.801922623506-0.573356530132j))*x[1] + ((-0.311423961316+0.0847152000276j))*x[2]**o + ((-0.659559416542+0.551418813152j))*x[2]
            ref=(0.583302549057-0.921148968192j)*(1+2.*(dim-1)/(o+1.)) + ((-1.50802241039-0.276538053824j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.574814822519+0.749067902303j)*x[0]**o + ((0.212965042542-0.192826815333j))*x[0] + ((-0.688166139643-0.317203355745j))*x[1]**o + ((0.710212913092+0.390852957028j))*x[1]
            ref[(0,)]=(-1.26298096216+0.431864546557j)*(1+2.*(dim-1)/(o+1.)) + ((0.923177955633+0.198026141695j))*dim
            arg[(1,)]=(-0.789055823939-0.446420068158j)*x[0]**o + ((-0.813722327731-0.648034681245j))*x[0] + ((0.918117151336+0.0970121236532j))*x[1]**o + ((0.463170157195-0.21186715703j))*x[1]
            ref[(1,)]=(0.129061327397-0.349407944505j)*(1+2.*(dim-1)/(o+1.)) + ((-0.350552170536-0.859901838275j))*dim
        else:
            arg[(0,)]=(0.502351358815-0.7385417665j)*x[0]**o + ((-0.619302531508+0.956443797531j))*x[0] + ((0.99665631487+0.625184224104j))*x[1]**o + ((0.556906233491+0.581562823005j))*x[1] + ((-0.145296021162-0.159247487291j))*x[2]**o + ((0.948902083483-0.146190837859j))*x[2]
            ref[(0,)]=(1.35371165252-0.272605029687j)*(1+2.*(dim-1)/(o+1.)) + ((0.886505785466+1.39181578268j))*dim
            arg[(1,)]=(-0.907943432247-0.494525707469j)*x[0]**o + ((-0.842223260022-0.774561595127j))*x[0] + ((-0.92039303947-0.383398277597j))*x[1]**o + ((-0.61879484496+0.730256578728j))*x[1] + ((0.368584351412+0.217148965623j))*x[2]**o + ((-0.94134866312+0.195718410299j))*x[2]
            ref[(1,)]=(-1.4597521203-0.660775019443j)*(1+2.*(dim-1)/(o+1.)) + ((-2.4023667681+0.1514133939j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.827742135692-0.765498970989j)*x[0]**o + ((-0.26078098511+0.572574686431j))*x[0] + ((0.528973744376+0.6786185644j))*x[1]**o + ((-0.806279176555+0.894988740016j))*x[1]
            ref[(0, 0)]=(-0.298768391316-0.0868804065895j)*(1+2.*(dim-1)/(o+1.)) + ((-1.06706016166+1.46756342645j))*dim
            arg[(0, 1)]=(0.417809389463+0.0131991765878j)*x[0]**o + ((0.482608188515+0.354050910932j))*x[0] + ((0.192419531149+0.457365309867j))*x[1]**o + ((0.621595915398+0.642655013334j))*x[1]
            ref[(0, 1)]=(0.610228920612+0.470564486455j)*(1+2.*(dim-1)/(o+1.)) + ((1.10420410391+0.996705924266j))*dim
            arg[(1, 0)]=(-0.756654990246-0.747929262118j)*x[0]**o + ((0.470574339325+0.693497164648j))*x[0] + ((0.492419967922+0.845000837674j))*x[1]**o + ((0.88816792528+0.791895872917j))*x[1]
            ref[(1, 0)]=(-0.264235022324+0.0970715755558j)*(1+2.*(dim-1)/(o+1.)) + ((1.35874226461+1.48539303757j))*dim
            arg[(1, 1)]=(-0.0164863489874-0.205974697462j)*x[0]**o + ((-0.892535475775-0.620833218956j))*x[0] + ((-0.4752613907+0.840592380483j))*x[1]**o + ((0.854268146362+0.200998343053j))*x[1]
            ref[(1, 1)]=(-0.491747739688+0.634617683021j)*(1+2.*(dim-1)/(o+1.)) + ((-0.038267329413-0.419834875903j))*dim
        else:
            arg[(0, 0)]=(0.235129879568-0.136810999642j)*x[0]**o + ((0.517770863056+0.70719719061j))*x[0] + ((0.767025653139+0.108585791654j))*x[1]**o + ((0.856629237963+0.296706280812j))*x[1] + ((0.249331080851-0.251652824144j))*x[2]**o + ((-0.651544698824+0.0823366420846j))*x[2]
            ref[(0, 0)]=(1.25148661356-0.279878032132j)*(1+2.*(dim-1)/(o+1.)) + ((0.722855402195+1.08624011351j))*dim
            arg[(0, 1)]=(0.241978279957-0.825764433734j)*x[0]**o + ((-0.607995282306-0.603561218242j))*x[0] + ((0.375841064281-0.95658429498j))*x[1]**o + ((-0.213991942796-0.790840656734j))*x[1] + ((0.533965818348-0.964135115308j))*x[2]**o + ((-0.619308173289+0.253640883576j))*x[2]
            ref[(0, 1)]=(1.15178516259-2.74648384402j)*(1+2.*(dim-1)/(o+1.)) + ((-1.44129539839-1.1407609914j))*dim
            arg[(1, 0)]=(0.815953522118+0.515234692938j)*x[0]**o + ((0.092304732597+0.0950958487135j))*x[0] + ((0.970047869383-0.909181797314j))*x[1]**o + ((0.0788869584843+0.181536852847j))*x[1] + ((0.0497834287121-0.886303009852j))*x[2]**o + ((0.180895708095+0.385505184188j))*x[2]
            ref[(1, 0)]=(1.83578482021-1.28025011423j)*(1+2.*(dim-1)/(o+1.)) + ((0.352087399177+0.662137885749j))*dim
            arg[(1, 1)]=(0.40740543994+0.499418712232j)*x[0]**o + ((-0.471203522199-0.240588940686j))*x[0] + ((-0.130975577648+0.284627458714j))*x[1]**o + ((-0.917491968388+0.515600908041j))*x[1] + ((-0.392601770241-0.0923945007407j))*x[2]**o + ((-0.19607047478-0.667822090806j))*x[2]
            ref[(1, 1)]=(-0.11617190795+0.691651670205j)*(1+2.*(dim-1)/(o+1.)) + ((-1.58476596537-0.392810123452j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref=numpy.zeros((4, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.388190183198-0.691597552188j)*x[0]**o + ((0.400770705659+0.141029951276j))*x[0] + ((0.766983634149+0.12400050266j))*x[1]**o + ((0.725134220969-0.118064644253j))*x[1]
            ref[(0, 0, 0)]=(1.15517381735-0.567597049528j)*(1+2.*(dim-1)/(o+1.)) + ((1.12590492663+0.0229653070226j))*dim
            arg[(0, 0, 1)]=(0.132208931003-0.435586035725j)*x[0]**o + ((-0.548312575454+0.561151364076j))*x[0] + ((0.839254186736-0.23948496394j))*x[1]**o + ((-0.652194747878+0.30319522679j))*x[1]
            ref[(0, 0, 1)]=(0.971463117739-0.675070999665j)*(1+2.*(dim-1)/(o+1.)) + ((-1.20050732333+0.864346590866j))*dim
            arg[(0, 1, 0)]=(-0.249584759659-0.00945654521107j)*x[0]**o + ((-0.0544081026767+0.541364197188j))*x[0] + ((0.263126944356+0.425148333547j))*x[1]**o + ((-0.80093527669-0.975213852373j))*x[1]
            ref[(0, 1, 0)]=(0.0135421846973+0.415691788336j)*(1+2.*(dim-1)/(o+1.)) + ((-0.855343379367-0.433849655186j))*dim
            arg[(0, 1, 1)]=(-0.382046537701-0.164925748513j)*x[0]**o + ((0.993208195229-0.408272440146j))*x[0] + ((-0.964545561308+0.0284654751952j))*x[1]**o + ((0.397648632227-0.366596806016j))*x[1]
            ref[(0, 1, 1)]=(-1.34659209901-0.136460273318j)*(1+2.*(dim-1)/(o+1.)) + ((1.39085682746-0.774869246162j))*dim
            arg[(1, 0, 0)]=(-0.657815456634+0.393798890382j)*x[0]**o + ((-0.0958011166277+0.969945361071j))*x[0] + ((0.38238273757-0.896920973641j))*x[1]**o + ((0.604978598485-0.152069083533j))*x[1]
            ref[(1, 0, 0)]=(-0.275432719065-0.503122083259j)*(1+2.*(dim-1)/(o+1.)) + ((0.509177481857+0.817876277539j))*dim
            arg[(1, 0, 1)]=(0.4163822192-0.838052514857j)*x[0]**o + ((-0.743511517632+0.956396475055j))*x[0] + ((-0.536082568301-0.541226912313j))*x[1]**o + ((-0.823921657953-0.928685694021j))*x[1]
            ref[(1, 0, 1)]=(-0.119700349101-1.37927942717j)*(1+2.*(dim-1)/(o+1.)) + ((-1.56743317558+0.0277107810331j))*dim
            arg[(1, 1, 0)]=(0.461828232469+0.280462732684j)*x[0]**o + ((0.385460656354-0.737451593546j))*x[0] + ((-0.929707733776-0.369043948896j))*x[1]**o + ((-0.00660062765777+0.802895851903j))*x[1]
            ref[(1, 1, 0)]=(-0.467879501306-0.0885812162121j)*(1+2.*(dim-1)/(o+1.)) + ((0.378860028696+0.0654442583577j))*dim
            arg[(1, 1, 1)]=(-0.365063758546+0.282658619897j)*x[0]**o + ((-0.150913878451+0.259439810661j))*x[0] + ((0.5349902969+0.118495381486j))*x[1]**o + ((-0.539766517375-0.677598424153j))*x[1]
            ref[(1, 1, 1)]=(0.169926538354+0.401154001383j)*(1+2.*(dim-1)/(o+1.)) + ((-0.690680395826-0.418158613492j))*dim
            arg[(2, 0, 0)]=(-0.398757605209+0.975813036868j)*x[0]**o + ((0.139011800616-0.310247234361j))*x[0] + ((-0.171149245034-0.117276290562j))*x[1]**o + ((0.10125270172-0.721857000486j))*x[1]
            ref[(2, 0, 0)]=(-0.569906850243+0.858536746306j)*(1+2.*(dim-1)/(o+1.)) + ((0.240264502336-1.03210423485j))*dim
            arg[(2, 0, 1)]=(0.741063323829+0.513766088811j)*x[0]**o + ((-0.370192954061-0.453757024421j))*x[0] + ((0.516217783376+0.595545729574j))*x[1]**o + ((0.815846408621-0.721224639671j))*x[1]
            ref[(2, 0, 1)]=(1.2572811072+1.10931181839j)*(1+2.*(dim-1)/(o+1.)) + ((0.44565345456-1.17498166409j))*dim
            arg[(2, 1, 0)]=(-0.39452734981+0.154901106634j)*x[0]**o + ((0.671865291658-0.84431959091j))*x[0] + ((-0.501498967042-0.0190221467403j))*x[1]**o + ((-0.774981292502+0.371683448406j))*x[1]
            ref[(2, 1, 0)]=(-0.896026316852+0.135878959893j)*(1+2.*(dim-1)/(o+1.)) + ((-0.103116000844-0.472636142504j))*dim
            arg[(2, 1, 1)]=(0.297688698389+0.928280606719j)*x[0]**o + ((0.811661040825+0.72080889376j))*x[0] + ((-0.329229687226+0.209948669956j))*x[1]**o + ((-0.876841464941-0.247678035631j))*x[1]
            ref[(2, 1, 1)]=(-0.0315409888374+1.13822927667j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0651804241161+0.473130858129j))*dim
            arg[(3, 0, 0)]=(0.47782081608+0.40496984965j)*x[0]**o + ((0.866159657661-0.974103434139j))*x[0] + ((0.498572846607-0.484047986845j))*x[1]**o + ((0.000778409420488-0.70231364322j))*x[1]
            ref[(3, 0, 0)]=(0.976393662687-0.0790781371956j)*(1+2.*(dim-1)/(o+1.)) + ((0.866938067081-1.67641707736j))*dim
            arg[(3, 0, 1)]=(-0.419024824735+0.157848454569j)*x[0]**o + ((-0.483642428649+0.444659213451j))*x[0] + ((0.382450673107-0.123606135303j))*x[1]**o + ((0.480874934619+0.106902489175j))*x[1]
            ref[(3, 0, 1)]=(-0.0365741516281+0.034242319266j)*(1+2.*(dim-1)/(o+1.)) + ((-0.00276749402958+0.551561702626j))*dim
            arg[(3, 1, 0)]=(0.663409018853-0.361288972354j)*x[0]**o + ((-0.0689462220358-0.605984812913j))*x[0] + ((-0.346400053808-0.0782672739677j))*x[1]**o + ((0.608082060084+0.387448296781j))*x[1]
            ref[(3, 1, 0)]=(0.317008965045-0.439556246321j)*(1+2.*(dim-1)/(o+1.)) + ((0.539135838048-0.218536516132j))*dim
            arg[(3, 1, 1)]=(-0.220303534846-0.804051512738j)*x[0]**o + ((-0.200254747912-0.142687616649j))*x[0] + ((0.705708625708-0.289809449948j))*x[1]**o + ((-0.171226518909-0.272899901507j))*x[1]
            ref[(3, 1, 1)]=(0.485405090862-1.09386096269j)*(1+2.*(dim-1)/(o+1.)) + ((-0.371481266821-0.415587518156j))*dim
        else:
            arg[(0, 0, 0)]=(-0.476082168824+0.031105682256j)*x[0]**o + ((-0.397532126514-0.899120354531j))*x[0] + ((0.354008766084+0.208562600414j))*x[1]**o + ((0.846918090151+0.322978613137j))*x[1] + ((0.0656535983179+0.899191454394j))*x[2]**o + ((0.512535254378+0.0066639563019j))*x[2]
            ref[(0, 0, 0)]=(-0.0564198044227+1.13885973706j)*(1+2.*(dim-1)/(o+1.)) + ((0.961921218014-0.569477785093j))*dim
            arg[(0, 0, 1)]=(0.400824520976-0.986024900315j)*x[0]**o + ((0.2368578203+0.664798086684j))*x[0] + ((0.984673605502+0.774073496706j))*x[1]**o + ((-0.663067099542-0.279604007362j))*x[1] + ((0.297326263405-0.940411422399j))*x[2]**o + ((-0.114082687471-0.345981677364j))*x[2]
            ref[(0, 0, 1)]=(1.68282438988-1.15236282601j)*(1+2.*(dim-1)/(o+1.)) + ((-0.540291966714+0.0392124019587j))*dim
            arg[(0, 1, 0)]=(-0.923935943691-0.847913580501j)*x[0]**o + ((-0.719187509153+0.683130195928j))*x[0] + ((0.793763444954-0.513393170758j))*x[1]**o + ((0.44062175037+0.564456263029j))*x[1] + ((0.480904810411-0.18067342446j))*x[2]**o + ((0.531258512456+0.00496863026065j))*x[2]
            ref[(0, 1, 0)]=(0.350732311674-1.54198017572j)*(1+2.*(dim-1)/(o+1.)) + ((0.252692753673+1.25255508922j))*dim
            arg[(0, 1, 1)]=(-0.223722795123+0.109809326453j)*x[0]**o + ((0.598735769926-0.134805453804j))*x[0] + ((0.111464615132-0.418648831867j))*x[1]**o + ((0.316716667482-0.334241487217j))*x[1] + ((0.785927631255+0.998124648439j))*x[2]**o + ((0.908588092319-0.657260419325j))*x[2]
            ref[(0, 1, 1)]=(0.673669451265+0.689285143026j)*(1+2.*(dim-1)/(o+1.)) + ((1.82404052973-1.12630736035j))*dim
            arg[(1, 0, 0)]=(-0.888953815637-0.71690365866j)*x[0]**o + ((0.786044670526-0.672995646554j))*x[0] + ((0.68552061888-0.75452214642j))*x[1]**o + ((-0.379363334814-0.786702557082j))*x[1] + ((-0.283494145854-0.826321509006j))*x[2]**o + ((-0.431423144666-0.842655250909j))*x[2]
            ref[(1, 0, 0)]=(-0.48692734261-2.29774731409j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0247418089546-2.30235345455j))*dim
            arg[(1, 0, 1)]=(-0.300024529853+0.648546068554j)*x[0]**o + ((-0.142143756298-0.920494736748j))*x[0] + ((-0.549986028834+0.790856471793j))*x[1]**o + ((0.954562831126+0.979389600602j))*x[1] + ((-0.705494853026+0.512439503225j))*x[2]**o + ((0.381451296214+0.801751368737j))*x[2]
            ref[(1, 0, 1)]=(-1.55550541171+1.95184204357j)*(1+2.*(dim-1)/(o+1.)) + ((1.19387037104+0.860646232591j))*dim
            arg[(1, 1, 0)]=(-0.384364778298+0.0800368344834j)*x[0]**o + ((0.0608486666675-0.896941570119j))*x[0] + ((0.638847955446-0.630717013791j))*x[1]**o + ((0.953622129943+0.4129907598j))*x[1] + ((0.0965657559982-0.233103871818j))*x[2]**o + ((0.174730523836-0.9309982137j))*x[2]
            ref[(1, 1, 0)]=(0.351048933146-0.783784051125j)*(1+2.*(dim-1)/(o+1.)) + ((1.18920132045-1.41494902402j))*dim
            arg[(1, 1, 1)]=(0.517174205232+0.636183452068j)*x[0]**o + ((0.837627083163+0.742165957227j))*x[0] + ((0.211883122772-0.143394216343j))*x[1]**o + ((0.898511047612+0.171802238646j))*x[1] + ((0.757509277128-0.841625305387j))*x[2]**o + ((0.72467324432+0.193199556266j))*x[2]
            ref[(1, 1, 1)]=(1.48656660513-0.348836069661j)*(1+2.*(dim-1)/(o+1.)) + ((2.4608113751+1.10716775214j))*dim
            arg[(2, 0, 0)]=(-0.166732261977+0.345822331592j)*x[0]**o + ((-0.723018325289-0.869589420479j))*x[0] + ((0.839830845919-0.411806695553j))*x[1]**o + ((-0.859498433257+0.92215525541j))*x[1] + ((0.229082795816-0.0379629453563j))*x[2]**o + ((-0.756828996322+0.0547379059672j))*x[2]
            ref[(2, 0, 0)]=(0.902181379757-0.103947309317j)*(1+2.*(dim-1)/(o+1.)) + ((-2.33934575487+0.107303740898j))*dim
            arg[(2, 0, 1)]=(-0.806099456562+0.259121418744j)*x[0]**o + ((0.163550465309-0.580940764453j))*x[0] + ((-0.873616481766-0.879752317937j))*x[1]**o + ((0.896715759809+0.495933782908j))*x[1] + ((0.438459461646+0.51967017447j))*x[2]**o + ((0.443865492294+0.072764934658j))*x[2]
            ref[(2, 0, 1)]=(-1.24125647668-0.100960724724j)*(1+2.*(dim-1)/(o+1.)) + ((1.50413171741-0.0122420468866j))*dim
            arg[(2, 1, 0)]=(-0.406712647334+0.156833371885j)*x[0]**o + ((0.834479954398-0.774536228371j))*x[0] + ((0.998593354907-0.382146728066j))*x[1]**o + ((0.677404334318+0.0502106311745j))*x[1] + ((-0.594035202113+0.591651601774j))*x[2]**o + ((-0.925227969469+0.709583670245j))*x[2]
            ref[(2, 1, 0)]=(-0.00215449454019+0.366338245593j)*(1+2.*(dim-1)/(o+1.)) + ((0.586656319247-0.014741926952j))*dim
            arg[(2, 1, 1)]=(-0.8110559197+0.676345059108j)*x[0]**o + ((-0.39150710248+0.0263241212302j))*x[0] + ((-0.508771521156-0.219760231881j))*x[1]**o + ((-0.648863175835+0.340646579347j))*x[1] + ((0.145841662864-0.984204315598j))*x[2]**o + ((-0.901533247763+0.0823506876427j))*x[2]
            ref[(2, 1, 1)]=(-1.17398577799-0.527619488371j)*(1+2.*(dim-1)/(o+1.)) + ((-1.94190352608+0.44932138822j))*dim
            arg[(3, 0, 0)]=(0.0449499038154-0.868342049348j)*x[0]**o + ((0.630093398101+0.42024701091j))*x[0] + ((-0.57677988302-0.577295954299j))*x[1]**o + ((-0.266897014329+0.0834248963747j))*x[1] + ((0.722553969698-0.498588419442j))*x[2]**o + ((0.685931701165-0.929313853989j))*x[2]
            ref[(3, 0, 0)]=(0.190723990493-1.94422642309j)*(1+2.*(dim-1)/(o+1.)) + ((1.04912808494-0.425641946704j))*dim
            arg[(3, 0, 1)]=(0.19899336926+0.88059889335j)*x[0]**o + ((0.0426462286393+0.368616340806j))*x[0] + ((0.946578138752+0.229684881456j))*x[1]**o + ((-0.49679004977+0.420460908694j))*x[1] + ((0.154243891822-0.105759312391j))*x[2]**o + ((0.944361075945+0.519816439012j))*x[2]
            ref[(3, 0, 1)]=(1.29981539983+1.00452446241j)*(1+2.*(dim-1)/(o+1.)) + ((0.490217254814+1.30889368851j))*dim
            arg[(3, 1, 0)]=(-0.49925602348-0.959097016341j)*x[0]**o + ((0.636321151715+0.360379496253j))*x[0] + ((0.651991433844+0.0927537563884j))*x[1]**o + ((-0.0326521389532-0.155568888918j))*x[1] + ((0.340094439221-0.624915132678j))*x[2]**o + ((0.479691255321-0.58170079657j))*x[2]
            ref[(3, 1, 0)]=(0.492829849584-1.49125839263j)*(1+2.*(dim-1)/(o+1.)) + ((1.08336026808-0.376890189235j))*dim
            arg[(3, 1, 1)]=(-0.99391252694-0.753068279472j)*x[0]**o + ((-0.296540411812-0.554982480368j))*x[0] + ((0.695516337639-0.895827166876j))*x[1]**o + ((0.00548409198628+0.131681964544j))*x[1] + ((-0.902086553478-0.701415600336j))*x[2]**o + ((-0.958158130568-0.540979709387j))*x[2]
            ref[(3, 1, 1)]=(-1.20048274278-2.35031104668j)*(1+2.*(dim-1)/(o+1.)) + ((-1.24921445039-0.964280225211j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2, 3),w)
        ref=numpy.zeros((2, 4, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.498331278002-0.844084874847j)*x[0]**o + ((0.0586352934086-0.330188472576j))*x[0] + ((-0.0750903583639-0.967084148525j))*x[1]**o + ((-0.0647257027246+0.766830935328j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.573421636366-1.81116902337j)*(1+2.*(dim-1)/(o+1.)) + ((-0.006090409316+0.436642462753j))*dim
            arg[(0, 0, 0, 1)]=(-0.460315262893+0.222677356115j)*x[0]**o + ((0.0377350398894+0.250645154562j))*x[0] + ((0.111437249429-0.868646449957j))*x[1]**o + ((-0.676836588296-0.417472809521j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.348878013465-0.645969093841j)*(1+2.*(dim-1)/(o+1.)) + ((-0.639101548406-0.166827654958j))*dim
            arg[(0, 0, 0, 2)]=(0.65887299035+0.157019354835j)*x[0]**o + ((0.78414919824+0.00788538141747j))*x[0] + ((-0.558979316804+0.25373974208j))*x[1]**o + ((-0.199242655759-0.278540419746j))*x[1]
            ref[(0, 0, 0, 2)]=(0.099893673546+0.410759096915j)*(1+2.*(dim-1)/(o+1.)) + ((0.584906542481-0.270655038328j))*dim
            arg[(0, 0, 1, 0)]=(-0.441848332887-0.0502637013671j)*x[0]**o + ((-0.145632837654+0.294698560989j))*x[0] + ((0.748021657372-0.234442189613j))*x[1]**o + ((0.228563929804+0.298222031762j))*x[1]
            ref[(0, 0, 1, 0)]=(0.306173324485-0.28470589098j)*(1+2.*(dim-1)/(o+1.)) + ((0.0829310921493+0.592920592751j))*dim
            arg[(0, 0, 1, 1)]=(-0.557428665026-0.540059250458j)*x[0]**o + ((0.815753804711+0.893204431582j))*x[0] + ((0.858009943208+0.976298851479j))*x[1]**o + ((-0.963162337344+0.0249756184163j))*x[1]
            ref[(0, 0, 1, 1)]=(0.300581278182+0.436239601021j)*(1+2.*(dim-1)/(o+1.)) + ((-0.147408532633+0.918180049998j))*dim
            arg[(0, 0, 1, 2)]=(-0.705102021873-0.114671152698j)*x[0]**o + ((-0.885910951884-0.811125218859j))*x[0] + ((-0.0133543198767+0.651612574263j))*x[1]**o + ((0.194499396897+0.942278998622j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.718456341749+0.536941421565j)*(1+2.*(dim-1)/(o+1.)) + ((-0.691411554987+0.131153779763j))*dim
            arg[(0, 1, 0, 0)]=(0.991160706662+0.47882329046j)*x[0]**o + ((-0.228082504611+0.669313747263j))*x[0] + ((-0.863604288479-0.840436933915j))*x[1]**o + ((-0.776265901007+0.216063147375j))*x[1]
            ref[(0, 1, 0, 0)]=(0.127556418183-0.361613643455j)*(1+2.*(dim-1)/(o+1.)) + ((-1.00434840562+0.885376894638j))*dim
            arg[(0, 1, 0, 1)]=(0.483321020782-0.637026915244j)*x[0]**o + ((0.93694120403-0.731926294977j))*x[0] + ((-0.25241072559-0.208737334504j))*x[1]**o + ((0.78728404852-0.536614117947j))*x[1]
            ref[(0, 1, 0, 1)]=(0.230910295193-0.845764249747j)*(1+2.*(dim-1)/(o+1.)) + ((1.72422525255-1.26854041292j))*dim
            arg[(0, 1, 0, 2)]=(0.586689742676+0.254717627458j)*x[0]**o + ((0.805578187418+0.105170416745j))*x[0] + ((0.799202188965+0.0768006013989j))*x[1]**o + ((0.209727493119-0.476221024666j))*x[1]
            ref[(0, 1, 0, 2)]=(1.38589193164+0.331518228857j)*(1+2.*(dim-1)/(o+1.)) + ((1.01530568054-0.371050607921j))*dim
            arg[(0, 1, 1, 0)]=(0.698949281565-0.566249604373j)*x[0]**o + ((-0.345508320972+0.183198327322j))*x[0] + ((0.33467209855+0.313725306061j))*x[1]**o + ((0.63227713437+0.115566687598j))*x[1]
            ref[(0, 1, 1, 0)]=(1.03362138011-0.252524298313j)*(1+2.*(dim-1)/(o+1.)) + ((0.286768813399+0.29876501492j))*dim
            arg[(0, 1, 1, 1)]=(0.559498564367+0.0859024807409j)*x[0]**o + ((0.211411331902+0.317384429222j))*x[0] + ((-0.01528707235+0.0774719161645j))*x[1]**o + ((-0.118208058875+0.921936077599j))*x[1]
            ref[(0, 1, 1, 1)]=(0.544211492017+0.163374396905j)*(1+2.*(dim-1)/(o+1.)) + ((0.0932032730266+1.23932050682j))*dim
            arg[(0, 1, 1, 2)]=(0.287919570424-0.135243190016j)*x[0]**o + ((-0.473654037892+0.00396572266272j))*x[0] + ((0.542794394653-0.344895762238j))*x[1]**o + ((0.223883695391-0.121156687735j))*x[1]
            ref[(0, 1, 1, 2)]=(0.830713965078-0.480138952254j)*(1+2.*(dim-1)/(o+1.)) + ((-0.249770342501-0.117190965072j))*dim
            arg[(0, 2, 0, 0)]=(-0.798664449259-0.900545269318j)*x[0]**o + ((-0.491498812703+0.211658683595j))*x[0] + ((0.575566445785-0.861572061905j))*x[1]**o + ((-0.610315629082+0.0947898147991j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.223098003474-1.76211733122j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10181444179+0.306448498394j))*dim
            arg[(0, 2, 0, 1)]=(0.604413022611-0.920178647132j)*x[0]**o + ((0.45021560235+0.254147987683j))*x[0] + ((0.768858759995-0.975162930242j))*x[1]**o + ((-0.331523880061+0.101705867741j))*x[1]
            ref[(0, 2, 0, 1)]=(1.37327178261-1.89534157737j)*(1+2.*(dim-1)/(o+1.)) + ((0.118691722289+0.355853855424j))*dim
            arg[(0, 2, 0, 2)]=(-0.855745297393+0.579875188705j)*x[0]**o + ((0.381036298272+0.283008838325j))*x[0] + ((-0.0234735892513-0.285908753897j))*x[1]**o + ((-0.89629891976-0.190013502106j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.879218886644+0.293966434808j)*(1+2.*(dim-1)/(o+1.)) + ((-0.515262621488+0.0929953362192j))*dim
            arg[(0, 2, 1, 0)]=(-0.0776535796797-0.459509705911j)*x[0]**o + ((0.760431825085+0.508814211741j))*x[0] + ((-0.508613468472-0.864334211919j))*x[1]**o + ((-0.250386762745+0.191007342334j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.586267048152-1.32384391783j)*(1+2.*(dim-1)/(o+1.)) + ((0.51004506234+0.699821554075j))*dim
            arg[(0, 2, 1, 1)]=(0.983226120759+0.81962175206j)*x[0]**o + ((0.452485858718-0.168627309444j))*x[0] + ((0.107643065379-0.792239074151j))*x[1]**o + ((0.736669797766-0.957668061593j))*x[1]
            ref[(0, 2, 1, 1)]=(1.09086918614+0.0273826779093j)*(1+2.*(dim-1)/(o+1.)) + ((1.18915565648-1.12629537104j))*dim
            arg[(0, 2, 1, 2)]=(0.557324621788-0.725476763447j)*x[0]**o + ((-0.760981366589+0.797685946366j))*x[0] + ((-0.401468717181-0.324275641994j))*x[1]**o + ((0.50286726027+0.0629082467501j))*x[1]
            ref[(0, 2, 1, 2)]=(0.155855904607-1.04975240544j)*(1+2.*(dim-1)/(o+1.)) + ((-0.258114106319+0.860594193116j))*dim
            arg[(0, 3, 0, 0)]=(0.539811120398-0.617227333882j)*x[0]**o + ((0.446796755435-0.793062157602j))*x[0] + ((0.0269583605614+0.456123003303j))*x[1]**o + ((0.972161667881+0.69065175058j))*x[1]
            ref[(0, 3, 0, 0)]=(0.566769480959-0.16110433058j)*(1+2.*(dim-1)/(o+1.)) + ((1.41895842332-0.102410407022j))*dim
            arg[(0, 3, 0, 1)]=(-0.616233756474-0.614079899268j)*x[0]**o + ((0.313113320952+0.566874610167j))*x[0] + ((0.40723843618-0.71342169625j))*x[1]**o + ((-0.211518880831-0.194502501893j))*x[1]
            ref[(0, 3, 0, 1)]=(-0.208995320294-1.32750159552j)*(1+2.*(dim-1)/(o+1.)) + ((0.10159444012+0.372372108274j))*dim
            arg[(0, 3, 0, 2)]=(0.706684091502-0.0705756534278j)*x[0]**o + ((-0.76008510937+0.0828875359684j))*x[0] + ((-0.434195326757-0.908825936009j))*x[1]**o + ((-0.096508259137-0.185281265645j))*x[1]
            ref[(0, 3, 0, 2)]=(0.272488764745-0.979401589437j)*(1+2.*(dim-1)/(o+1.)) + ((-0.856593368507-0.102393729677j))*dim
            arg[(0, 3, 1, 0)]=(-0.436943523626-0.73527276912j)*x[0]**o + ((0.80176391712+0.708282769421j))*x[0] + ((-0.431077696101+0.314148620749j))*x[1]**o + ((-0.87598306012-0.246861605685j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.868021219727-0.421124148371j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0742191430001+0.461421163737j))*dim
            arg[(0, 3, 1, 1)]=(-0.672561691496+0.407041955334j)*x[0]**o + ((0.278174980702+0.432619811486j))*x[0] + ((0.812813029871-0.469945964811j))*x[1]**o + ((0.496449311763-0.111262108484j))*x[1]
            ref[(0, 3, 1, 1)]=(0.140251338374-0.0629040094767j)*(1+2.*(dim-1)/(o+1.)) + ((0.774624292464+0.321357703002j))*dim
            arg[(0, 3, 1, 2)]=(-0.68190270862-0.801295912588j)*x[0]**o + ((-0.318060903448-0.739012102614j))*x[0] + ((-0.174251605493+0.376091847506j))*x[1]**o + ((-0.703248879241+0.326870681682j))*x[1]
            ref[(0, 3, 1, 2)]=(-0.856154314113-0.425204065082j)*(1+2.*(dim-1)/(o+1.)) + ((-1.02130978269-0.412141420932j))*dim
            arg[(1, 0, 0, 0)]=(-0.335716184173-0.865468558761j)*x[0]**o + ((-0.837454174121-0.924662597761j))*x[0] + ((-0.479909198545+0.834030127128j))*x[1]**o + ((-0.555256120518+0.25909194455j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.815625382718-0.0314384316326j)*(1+2.*(dim-1)/(o+1.)) + ((-1.39271029464-0.665570653211j))*dim
            arg[(1, 0, 0, 1)]=(-0.470497807293+0.971279028497j)*x[0]**o + ((-0.683161283772-0.35857023991j))*x[0] + ((0.144631442443+0.148518291573j))*x[1]**o + ((-0.67427426046-0.604615841333j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.32586636485+1.11979732007j)*(1+2.*(dim-1)/(o+1.)) + ((-1.35743554423-0.963186081243j))*dim
            arg[(1, 0, 0, 2)]=(0.315717482399+0.586337235499j)*x[0]**o + ((-0.340205720752-0.741742455861j))*x[0] + ((-0.318134563646+0.655922013733j))*x[1]**o + ((-0.231279694537+0.191808819347j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.00241708124684+1.24225924923j)*(1+2.*(dim-1)/(o+1.)) + ((-0.571485415289-0.549933636513j))*dim
            arg[(1, 0, 1, 0)]=(-0.446183471093-0.343253995282j)*x[0]**o + ((0.579186221799+0.963960420027j))*x[0] + ((0.0574848754929+0.563599361023j))*x[1]**o + ((0.639538062388-0.481588631042j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.3886985956+0.220345365741j)*(1+2.*(dim-1)/(o+1.)) + ((1.21872428419+0.482371788985j))*dim
            arg[(1, 0, 1, 1)]=(-0.464314487256-0.788380913572j)*x[0]**o + ((-0.573565714242+0.252217040727j))*x[0] + ((-0.289618692606-0.217038909587j))*x[1]**o + ((-0.400102970014+0.744763950608j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.753933179862-1.00541982316j)*(1+2.*(dim-1)/(o+1.)) + ((-0.973668684255+0.996980991335j))*dim
            arg[(1, 0, 1, 2)]=(0.0755236699471-0.122065227178j)*x[0]**o + ((0.575354615938-0.8075915313j))*x[0] + ((-0.294138082648+0.827038704126j))*x[1]**o + ((-0.505225841989-0.0293400862217j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.218614412701+0.704973476948j)*(1+2.*(dim-1)/(o+1.)) + ((0.070128773949-0.836931617522j))*dim
            arg[(1, 1, 0, 0)]=(-0.893995530103+0.0824259304036j)*x[0]**o + ((-0.941028714315+0.358178983294j))*x[0] + ((0.197268612569-0.819953347076j))*x[1]**o + ((-0.475632583276-0.42978610863j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.696726917533-0.737527416672j)*(1+2.*(dim-1)/(o+1.)) + ((-1.41666129759-0.0716071253358j))*dim
            arg[(1, 1, 0, 1)]=(-0.652875408725-0.744802339853j)*x[0]**o + ((0.00528708399951-0.393239896837j))*x[0] + ((0.962102870576+0.465752660412j))*x[1]**o + ((0.821158931773+0.883572744639j))*x[1]
            ref[(1, 1, 0, 1)]=(0.309227461851-0.279049679441j)*(1+2.*(dim-1)/(o+1.)) + ((0.826446015772+0.490332847802j))*dim
            arg[(1, 1, 0, 2)]=(0.828299945578-0.3854512978j)*x[0]**o + ((-0.190826136538+0.958467975747j))*x[0] + ((0.0678841521121+0.788835657207j))*x[1]**o + ((0.669267386992-0.0976762713729j))*x[1]
            ref[(1, 1, 0, 2)]=(0.896184097691+0.403384359407j)*(1+2.*(dim-1)/(o+1.)) + ((0.478441250454+0.860791704374j))*dim
            arg[(1, 1, 1, 0)]=(0.570326733326-0.502923615461j)*x[0]**o + ((0.942233622512-0.536078602593j))*x[0] + ((0.922840880393-0.859191939305j))*x[1]**o + ((-0.215378084439-0.537197059517j))*x[1]
            ref[(1, 1, 1, 0)]=(1.49316761372-1.36211555477j)*(1+2.*(dim-1)/(o+1.)) + ((0.726855538073-1.07327566211j))*dim
            arg[(1, 1, 1, 1)]=(0.726756279642-0.666528809751j)*x[0]**o + ((0.307868141858+0.638736708501j))*x[0] + ((-0.608898987475-0.330824713043j))*x[1]**o + ((0.664433458534+0.380545760863j))*x[1]
            ref[(1, 1, 1, 1)]=(0.117857292167-0.997353522794j)*(1+2.*(dim-1)/(o+1.)) + ((0.972301600392+1.01928246936j))*dim
            arg[(1, 1, 1, 2)]=(-0.781469209528+0.434273311577j)*x[0]**o + ((-0.300667010044+0.271338303084j))*x[0] + ((-0.875623241432+0.342118162587j))*x[1]**o + ((0.465285771961+0.722778075426j))*x[1]
            ref[(1, 1, 1, 2)]=(-1.65709245096+0.776391474164j)*(1+2.*(dim-1)/(o+1.)) + ((0.164618761917+0.994116378511j))*dim
            arg[(1, 2, 0, 0)]=(-0.134696452713-0.498315571126j)*x[0]**o + ((0.102528661327+0.229367666444j))*x[0] + ((-0.431186080204+0.056852542137j))*x[1]**o + ((0.07270605287-0.491553792761j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.565882532918-0.441463028989j)*(1+2.*(dim-1)/(o+1.)) + ((0.175234714197-0.262186126317j))*dim
            arg[(1, 2, 0, 1)]=(-0.861211306518-0.965694384605j)*x[0]**o + ((-0.642263739695-0.352849323894j))*x[0] + ((0.068679049678+0.0350969160146j))*x[1]**o + ((-0.172824769504-0.256581186313j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.79253225684-0.930597468591j)*(1+2.*(dim-1)/(o+1.)) + ((-0.815088509199-0.609430510207j))*dim
            arg[(1, 2, 0, 2)]=(-0.134319336855+0.289425864274j)*x[0]**o + ((0.571187449017-0.354862244097j))*x[0] + ((-0.0101595235403+0.322890911559j))*x[1]**o + ((0.0282203608265-0.839815469732j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.144478860396+0.612316775833j)*(1+2.*(dim-1)/(o+1.)) + ((0.599407809843-1.19467771383j))*dim
            arg[(1, 2, 1, 0)]=(-0.520580574884-0.31400629768j)*x[0]**o + ((0.812486859787+0.0607130731683j))*x[0] + ((0.690909578518+0.0151266905833j))*x[1]**o + ((0.0739058289208+0.842440214723j))*x[1]
            ref[(1, 2, 1, 0)]=(0.170329003634-0.298879607097j)*(1+2.*(dim-1)/(o+1.)) + ((0.886392688708+0.903153287891j))*dim
            arg[(1, 2, 1, 1)]=(0.479240723376+0.94851759997j)*x[0]**o + ((0.847804484653-0.755674177122j))*x[0] + ((-0.758422834888-0.525648029848j))*x[1]**o + ((0.628367401646+0.857446028948j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.279182111512+0.422869570122j)*(1+2.*(dim-1)/(o+1.)) + ((1.4761718863+0.101771851825j))*dim
            arg[(1, 2, 1, 2)]=(0.706233658707-0.845751299798j)*x[0]**o + ((0.377739416726-0.956064252521j))*x[0] + ((0.88143709051+0.820079374174j))*x[1]**o + ((0.0358400673936+0.67575435242j))*x[1]
            ref[(1, 2, 1, 2)]=(1.58767074922-0.0256719256236j)*(1+2.*(dim-1)/(o+1.)) + ((0.41357948412-0.2803099001j))*dim
            arg[(1, 3, 0, 0)]=(-0.53817022034-0.62231101014j)*x[0]**o + ((-0.900626964342-0.64596629271j))*x[0] + ((0.753974566706+0.447669557979j))*x[1]**o + ((0.635252319855-0.570796000796j))*x[1]
            ref[(1, 3, 0, 0)]=(0.215804346366-0.174641452161j)*(1+2.*(dim-1)/(o+1.)) + ((-0.265374644487-1.21676229351j))*dim
            arg[(1, 3, 0, 1)]=(-0.684757776403-0.161898284989j)*x[0]**o + ((0.176261603609+0.179422024833j))*x[0] + ((-0.753583333972+0.678165440693j))*x[1]**o + ((0.301429971156+0.940710212755j))*x[1]
            ref[(1, 3, 0, 1)]=(-1.43834111038+0.516267155705j)*(1+2.*(dim-1)/(o+1.)) + ((0.477691574765+1.12013223759j))*dim
            arg[(1, 3, 0, 2)]=(0.165726696571+0.91599373026j)*x[0]**o + ((0.403860828732-0.989852387343j))*x[0] + ((0.885841776401+0.509077944075j))*x[1]**o + ((0.684007301673-0.632568923088j))*x[1]
            ref[(1, 3, 0, 2)]=(1.05156847297+1.42507167434j)*(1+2.*(dim-1)/(o+1.)) + ((1.0878681304-1.62242131043j))*dim
            arg[(1, 3, 1, 0)]=(-0.0324292477188-0.123569425199j)*x[0]**o + ((-0.0192585958514-0.798379354833j))*x[0] + ((0.961348750404+0.962877518646j))*x[1]**o + ((0.662763474513-0.574651456508j))*x[1]
            ref[(1, 3, 1, 0)]=(0.928919502685+0.839308093447j)*(1+2.*(dim-1)/(o+1.)) + ((0.643504878661-1.37303081134j))*dim
            arg[(1, 3, 1, 1)]=(0.763887286003+0.646072494838j)*x[0]**o + ((0.824215140744+0.394121317462j))*x[0] + ((0.0233994422068-0.639901058361j))*x[1]**o + ((0.548333461006+0.582345490863j))*x[1]
            ref[(1, 3, 1, 1)]=(0.78728672821+0.0061714364771j)*(1+2.*(dim-1)/(o+1.)) + ((1.37254860175+0.976466808326j))*dim
            arg[(1, 3, 1, 2)]=(-0.349055348355-0.189245186263j)*x[0]**o + ((-0.434025345889+0.366590903061j))*x[0] + ((-0.744865861859-0.334828718497j))*x[1]**o + ((-0.0132850749639-0.600777534785j))*x[1]
            ref[(1, 3, 1, 2)]=(-1.09392121021-0.52407390476j)*(1+2.*(dim-1)/(o+1.)) + ((-0.447310420853-0.234186631724j))*dim
        else:
            arg[(0, 0, 0, 0)]=(-0.960975726248+0.928979636682j)*x[0]**o + ((0.370808327445-0.467979127856j))*x[0] + ((0.480292971038+0.177430171283j))*x[1]**o + ((-0.133295009719+0.14895827236j))*x[1] + ((0.506496087931-0.355227256073j))*x[2]**o + ((0.559075741078-0.907122507438j))*x[2]
            ref[(0, 0, 0, 0)]=(0.02581333272+0.751182551892j)*(1+2.*(dim-1)/(o+1.)) + ((0.796589058804-1.22614336293j))*dim
            arg[(0, 0, 0, 1)]=(0.171597101233-0.445446554186j)*x[0]**o + ((0.174796236821-0.958343924906j))*x[0] + ((-0.621717128143-0.514748321207j))*x[1]**o + ((0.229683273014+0.644425722156j))*x[1] + ((0.627829157382+0.321753767271j))*x[2]**o + ((0.826239484713-0.0952148707757j))*x[2]
            ref[(0, 0, 0, 1)]=(0.177709130472-0.638441108122j)*(1+2.*(dim-1)/(o+1.)) + ((1.23071899455-0.409133073526j))*dim
            arg[(0, 0, 0, 2)]=(-0.481243026528+0.254955375693j)*x[0]**o + ((0.653761563823+0.0421347553952j))*x[0] + ((-0.664629211829+0.857659469311j))*x[1]**o + ((0.21207161277-0.309650590795j))*x[1] + ((0.129868824673+0.101981829703j))*x[2]**o + ((-0.211947420257-0.192570514579j))*x[2]
            ref[(0, 0, 0, 2)]=(-1.01600341368+1.21459667471j)*(1+2.*(dim-1)/(o+1.)) + ((0.653885756336-0.460086349979j))*dim
            arg[(0, 0, 1, 0)]=(0.138271241013+0.0859966157655j)*x[0]**o + ((0.402702770099-0.607538434493j))*x[0] + ((-0.229570786667+0.362022339023j))*x[1]**o + ((0.424935126643-0.991148458171j))*x[1] + ((0.0315958186523+0.589292736095j))*x[2]**o + ((-0.365558533019-0.167917565006j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.0597037270015+1.03731169088j)*(1+2.*(dim-1)/(o+1.)) + ((0.462079363722-1.76660445767j))*dim
            arg[(0, 0, 1, 1)]=(-0.17797597264+0.230549805189j)*x[0]**o + ((0.465334718574-0.799710990683j))*x[0] + ((0.489758719601+0.649052355575j))*x[1]**o + ((-0.83086255946+0.302654916881j))*x[1] + ((0.698401125196+0.945208953842j))*x[2]**o + ((-0.898038516795-0.560209700957j))*x[2]
            ref[(0, 0, 1, 1)]=(1.01018387216+1.82481111461j)*(1+2.*(dim-1)/(o+1.)) + ((-1.26356635768-1.05726577476j))*dim
            arg[(0, 0, 1, 2)]=(-0.0470306856315-0.0258771665083j)*x[0]**o + ((-0.937275798739+0.818008946701j))*x[0] + ((0.536673637185-0.00136688713956j))*x[1]**o + ((-0.933306024649+0.354649801361j))*x[1] + ((0.439171194273-0.0128305211836j))*x[2]**o + ((0.265833959272+0.738811983716j))*x[2]
            ref[(0, 0, 1, 2)]=(0.928814145827-0.0400745748315j)*(1+2.*(dim-1)/(o+1.)) + ((-1.60474786412+1.91147073178j))*dim
            arg[(0, 1, 0, 0)]=(-0.692121244428-0.789241558227j)*x[0]**o + ((0.790342520237+0.235848283294j))*x[0] + ((-0.912032021693-0.937705991029j))*x[1]**o + ((0.289874249535+0.407822702632j))*x[1] + ((0.200911020594+0.658382837898j))*x[2]**o + ((0.46712047859+0.326804717264j))*x[2]
            ref[(0, 1, 0, 0)]=(-1.40324224553-1.06856471136j)*(1+2.*(dim-1)/(o+1.)) + ((1.54733724836+0.970475703189j))*dim
            arg[(0, 1, 0, 1)]=(0.732462094441+0.294752110679j)*x[0]**o + ((-0.611957577359+0.832003849915j))*x[0] + ((-0.268207393721+0.440047506047j))*x[1]**o + ((0.531236064278+0.146164475622j))*x[1] + ((0.134699302483+0.895093025208j))*x[2]**o + ((0.180670949205-0.303695462815j))*x[2]
            ref[(0, 1, 0, 1)]=(0.598954003202+1.62989264193j)*(1+2.*(dim-1)/(o+1.)) + ((0.0999494361246+0.674472862722j))*dim
            arg[(0, 1, 0, 2)]=(0.844335792937+0.830938998764j)*x[0]**o + ((-0.73852198138-0.633641879856j))*x[0] + ((0.198256818814-0.436489122598j))*x[1]**o + ((-0.110707756017+0.28326523458j))*x[1] + ((0.462323165682+0.992250002491j))*x[2]**o + ((0.476711834017-0.0498805513592j))*x[2]
            ref[(0, 1, 0, 2)]=(1.50491577743+1.38669987866j)*(1+2.*(dim-1)/(o+1.)) + ((-0.37251790338-0.400257196635j))*dim
            arg[(0, 1, 1, 0)]=(0.81334617958-0.288925326045j)*x[0]**o + ((0.70408631893+0.697185536979j))*x[0] + ((0.0382968519894-0.777893497334j))*x[1]**o + ((-0.25097429611-0.195496191835j))*x[1] + ((0.133635328874+0.659271252464j))*x[2]**o + ((-0.930819478734-0.48718466723j))*x[2]
            ref[(0, 1, 1, 0)]=(0.985278360443-0.407547570916j)*(1+2.*(dim-1)/(o+1.)) + ((-0.477707455915+0.0145046779127j))*dim
            arg[(0, 1, 1, 1)]=(0.511476033045-0.965826322154j)*x[0]**o + ((-0.739169734264+0.475142164437j))*x[0] + ((0.536396107536-0.944439048908j))*x[1]**o + ((-0.101569992913+0.231874857214j))*x[1] + ((0.364496708446-0.264958222671j))*x[2]**o + ((-0.562382485202-0.187052837543j))*x[2]
            ref[(0, 1, 1, 1)]=(1.41236884903-2.17522359373j)*(1+2.*(dim-1)/(o+1.)) + ((-1.40312221238+0.519964184108j))*dim
            arg[(0, 1, 1, 2)]=(-0.0323358097313-0.613447847068j)*x[0]**o + ((0.711718435254+0.671337120263j))*x[0] + ((-0.510761079933+0.164930132839j))*x[1]**o + ((-0.584320260874-0.270249940595j))*x[1] + ((-0.999419686639-0.865767783298j))*x[2]**o + ((-0.111631821845+0.22724397449j))*x[2]
            ref[(0, 1, 1, 2)]=(-1.5425165763-1.31428549753j)*(1+2.*(dim-1)/(o+1.)) + ((0.0157663525346+0.628331154158j))*dim
            arg[(0, 2, 0, 0)]=(0.154219625919+0.13241445284j)*x[0]**o + ((0.924070276935-0.995224147454j))*x[0] + ((0.415557757911-0.813123542083j))*x[1]**o + ((-0.0723746265889+0.163515089442j))*x[1] + ((-0.139291744423+0.194539585543j))*x[2]**o + ((-0.164731894811-0.034185752021j))*x[2]
            ref[(0, 2, 0, 0)]=(0.430485639407-0.4861695037j)*(1+2.*(dim-1)/(o+1.)) + ((0.686963755535-0.865894810034j))*dim
            arg[(0, 2, 0, 1)]=(0.399455344436-0.100483062286j)*x[0]**o + ((0.579165704641-0.808974266716j))*x[0] + ((0.399768399497-0.383629868742j))*x[1]**o + ((0.860994400074+0.946799531743j))*x[1] + ((-0.936447900381+0.830766615752j))*x[2]**o + ((-0.322673175188-0.685830127303j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.137224156447+0.346653684724j)*(1+2.*(dim-1)/(o+1.)) + ((1.11748692953-0.548004862276j))*dim
            arg[(0, 2, 0, 2)]=(-0.143021911406+0.962695448405j)*x[0]**o + ((0.179606688366-0.849531737119j))*x[0] + ((0.389551863073+0.0930952138124j))*x[1]**o + ((0.0455992669311-0.860493907088j))*x[1] + ((-0.877961215104-0.736538934493j))*x[2]**o + ((-0.100042584615-0.417952290394j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.631431263437+0.319251727724j)*(1+2.*(dim-1)/(o+1.)) + ((0.125163370682-2.1279779346j))*dim
            arg[(0, 2, 1, 0)]=(-0.893959686584+0.692693479889j)*x[0]**o + ((-0.61179640817-0.51299451004j))*x[0] + ((0.699546995825+0.355066904992j))*x[1]**o + ((-0.87314736876-0.755099091599j))*x[1] + ((-0.549798381376-0.870845086537j))*x[2]**o + ((-0.574711157173+0.650577813855j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.744211072135+0.176915298344j)*(1+2.*(dim-1)/(o+1.)) + ((-2.0596549341-0.617515787783j))*dim
            arg[(0, 2, 1, 1)]=(-0.901989418956-0.769525155215j)*x[0]**o + ((0.25854633414+0.312855172732j))*x[0] + ((-0.156998736787+0.903940130773j))*x[1]**o + ((-0.0169829040041+0.190336933725j))*x[1] + ((-0.0299724448821-0.892907671273j))*x[2]**o + ((-0.373649243171-0.846084105376j))*x[2]
            ref[(0, 2, 1, 1)]=(-1.08896060063-0.758492695715j)*(1+2.*(dim-1)/(o+1.)) + ((-0.132085813035-0.342891998919j))*dim
            arg[(0, 2, 1, 2)]=(0.0905154430271+0.611354274172j)*x[0]**o + ((0.652371072087+0.0252440594825j))*x[0] + ((-0.893105744755+0.873840436813j))*x[1]**o + ((-0.532027066127+0.704067125114j))*x[1] + ((0.859789246681+0.593669309309j))*x[2]**o + ((-0.362965392637+0.30951968949j))*x[2]
            ref[(0, 2, 1, 2)]=(0.0571989449531+2.07886402029j)*(1+2.*(dim-1)/(o+1.)) + ((-0.242621386677+1.03883087409j))*dim
            arg[(0, 3, 0, 0)]=(0.184969357527+0.387314543256j)*x[0]**o + ((-0.498902962423-0.433059987429j))*x[0] + ((-0.474099722306-0.56583521573j))*x[1]**o + ((-0.653490645574+0.400728420876j))*x[1] + ((0.678181263229+0.550520681924j))*x[2]**o + ((0.486079049081-0.754729567912j))*x[2]
            ref[(0, 3, 0, 0)]=(0.389050898451+0.372000009451j)*(1+2.*(dim-1)/(o+1.)) + ((-0.666314558916-0.787061134465j))*dim
            arg[(0, 3, 0, 1)]=(-0.388684223274+0.632065326164j)*x[0]**o + ((0.615373228291-0.771514734921j))*x[0] + ((0.624642557106+0.045924166591j))*x[1]**o + ((0.797074759072+0.612051607801j))*x[1] + ((0.445663896227+0.0242229390627j))*x[2]**o + ((0.0821335975043+0.077212358141j))*x[2]
            ref[(0, 3, 0, 1)]=(0.681622230059+0.702212431818j)*(1+2.*(dim-1)/(o+1.)) + ((1.49458158487-0.0822507689789j))*dim
            arg[(0, 3, 0, 2)]=(-0.0280659891687-0.991598222857j)*x[0]**o + ((0.812784036277+0.971187617104j))*x[0] + ((0.481956265165-0.294070143279j))*x[1]**o + ((0.175856212816-0.368259514977j))*x[1] + ((0.419642210929-0.0754936170613j))*x[2]**o + ((0.0348694328066+0.8413366281j))*x[2]
            ref[(0, 3, 0, 2)]=(0.873532486925-1.3611619832j)*(1+2.*(dim-1)/(o+1.)) + ((1.0235096819+1.44426473023j))*dim
            arg[(0, 3, 1, 0)]=(-0.117849633685-0.769368762178j)*x[0]**o + ((-0.176947897894+0.491301203705j))*x[0] + ((0.308490357246-0.701725367762j))*x[1]**o + ((-0.358288698573-0.933765330103j))*x[1] + ((-0.916420989398+0.263108213298j))*x[2]**o + ((0.307330714944-0.753811472957j))*x[2]
            ref[(0, 3, 1, 0)]=(-0.725780265837-1.20798591664j)*(1+2.*(dim-1)/(o+1.)) + ((-0.227905881524-1.19627559936j))*dim
            arg[(0, 3, 1, 1)]=(-0.88987848135-0.679273056862j)*x[0]**o + ((0.00601883109177+0.796840526072j))*x[0] + ((0.198466819634-0.435728218041j))*x[1]**o + ((-0.596960357965-0.863701947593j))*x[1] + ((-0.0336594674768+0.00429380476946j))*x[2]**o + ((-0.475238894656+0.845983781332j))*x[2]
            ref[(0, 3, 1, 1)]=(-0.725071129193-1.11070747013j)*(1+2.*(dim-1)/(o+1.)) + ((-1.06618042153+0.779122359811j))*dim
            arg[(0, 3, 1, 2)]=(-0.140777461703+0.664224815506j)*x[0]**o + ((0.737524455276+0.151915599555j))*x[0] + ((-0.645530657072+0.278585379185j))*x[1]**o + ((0.906226755478-0.587803162601j))*x[1] + ((0.0776381081818+0.811124779766j))*x[2]**o + ((-0.0828193225934+0.643282891978j))*x[2]
            ref[(0, 3, 1, 2)]=(-0.708670010593+1.75393497446j)*(1+2.*(dim-1)/(o+1.)) + ((1.56093188816+0.207395328932j))*dim
            arg[(1, 0, 0, 0)]=(-0.445760125105+0.669979991809j)*x[0]**o + ((-0.837717832385+0.921604219629j))*x[0] + ((-0.173260355091-0.644229290888j))*x[1]**o + ((-0.101594589184+0.162707871824j))*x[1] + ((-0.0359893986091-0.869369351355j))*x[2]**o + ((0.21329397886+0.162199830718j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.655009878805-0.843618650433j)*(1+2.*(dim-1)/(o+1.)) + ((-0.726018442708+1.24651192217j))*dim
            arg[(1, 0, 0, 1)]=(0.250544595183-0.131762814056j)*x[0]**o + ((0.51146071037-0.766452097545j))*x[0] + ((-0.100548018775-0.508975530106j))*x[1]**o + ((0.518405473386+0.825636238531j))*x[1] + ((0.689203088857-0.823725094495j))*x[2]**o + ((0.224295971485+0.452631822497j))*x[2]
            ref[(1, 0, 0, 1)]=(0.839199665265-1.46446343866j)*(1+2.*(dim-1)/(o+1.)) + ((1.25416215524+0.511815963482j))*dim
            arg[(1, 0, 0, 2)]=(-0.79510421532+0.11502494577j)*x[0]**o + ((0.866829703623-0.295269245513j))*x[0] + ((-0.490721596718+0.0112646237131j))*x[1]**o + ((0.22110629047+0.294821353197j))*x[1] + ((0.847705552475+0.786303394905j))*x[2]**o + ((0.956547124034-0.308142434715j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.438120259563+0.912592964388j)*(1+2.*(dim-1)/(o+1.)) + ((2.04448311813-0.30859032703j))*dim
            arg[(1, 0, 1, 0)]=(0.559044770252+0.00925800033596j)*x[0]**o + ((0.373618675085-0.863174509725j))*x[0] + ((0.991979286341-0.466237014059j))*x[1]**o + ((0.402501963648+0.735602003674j))*x[1] + ((-0.589264241453+0.321507670581j))*x[2]**o + ((-0.494289333155-0.225546317154j))*x[2]
            ref[(1, 0, 1, 0)]=(0.96175981514-0.135471343142j)*(1+2.*(dim-1)/(o+1.)) + ((0.281831305579-0.353118823205j))*dim
            arg[(1, 0, 1, 1)]=(0.2324870992-0.932699678719j)*x[0]**o + ((-0.701929874616-0.849515848435j))*x[0] + ((-0.604898652896+0.735213285892j))*x[1]**o + ((-0.549584236943+0.788719086435j))*x[1] + ((-0.145537343084+0.77532776947j))*x[2]**o + ((-0.656897419886-0.512068604893j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.51794889678+0.577841376643j)*(1+2.*(dim-1)/(o+1.)) + ((-1.90841153145-0.572865366893j))*dim
            arg[(1, 0, 1, 2)]=(0.549767345172+0.780494237955j)*x[0]**o + ((-0.0681768466503-0.858096095203j))*x[0] + ((-0.220173266725-0.928110045867j))*x[1]**o + ((0.604321838085-0.715498484104j))*x[1] + ((0.835522830799+0.28587885059j))*x[2]**o + ((0.276526449529+0.183115068695j))*x[2]
            ref[(1, 0, 1, 2)]=(1.16511690925+0.138263042678j)*(1+2.*(dim-1)/(o+1.)) + ((0.812671440964-1.39047951061j))*dim
            arg[(1, 1, 0, 0)]=(0.91499597654+0.938511756417j)*x[0]**o + ((0.276708546495+0.605780400321j))*x[0] + ((0.890621820332-0.0251878508792j))*x[1]**o + ((-0.468969956072-0.471435427129j))*x[1] + ((0.590199857421-0.98402376238j))*x[2]**o + ((0.515260165272-0.931303034439j))*x[2]
            ref[(1, 1, 0, 0)]=(2.39581765429-0.0706998568423j)*(1+2.*(dim-1)/(o+1.)) + ((0.322998755696-0.796958061247j))*dim
            arg[(1, 1, 0, 1)]=(0.664050966633-0.836500481478j)*x[0]**o + ((0.698588432092+0.417831241814j))*x[0] + ((-0.502746981166+0.47959440002j))*x[1]**o + ((0.342229344236+0.38647417192j))*x[1] + ((-0.815848898073+0.291574643566j))*x[2]**o + ((-0.915388296938+0.978207386267j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.654544912606-0.0653314378923j)*(1+2.*(dim-1)/(o+1.)) + ((0.12542947939+1.7825128j))*dim
            arg[(1, 1, 0, 2)]=(-0.0999786990959-0.782582331031j)*x[0]**o + ((-0.822786599702+0.250468927417j))*x[0] + ((-0.828964286753+0.350036394394j))*x[1]**o + ((0.83001627027-0.418086551636j))*x[1] + ((0.295643331968+0.397676547977j))*x[2]**o + ((0.519945051789+0.355661066922j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.633299653881-0.0348693886596j)*(1+2.*(dim-1)/(o+1.)) + ((0.527174722357+0.188043442704j))*dim
            arg[(1, 1, 1, 0)]=(0.816686513363+0.0590177519087j)*x[0]**o + ((-0.155886585221+0.607840579318j))*x[0] + ((0.267953180342+0.484780404921j))*x[1]**o + ((-0.0269614727545-0.933673415012j))*x[1] + ((0.209171184873-0.265985189364j))*x[2]**o + ((0.3955481097+0.804698803986j))*x[2]
            ref[(1, 1, 1, 0)]=(1.29381087858+0.277812967466j)*(1+2.*(dim-1)/(o+1.)) + ((0.212700051724+0.478865968293j))*dim
            arg[(1, 1, 1, 1)]=(0.166331467492+0.328829749015j)*x[0]**o + ((0.484192376621+0.83528175291j))*x[0] + ((-0.518390412637-0.170660053531j))*x[1]**o + ((0.844022827666+0.82027653511j))*x[1] + ((-0.83137148457-0.437358956396j))*x[2]**o + ((-0.124304675029+0.639667950756j))*x[2]
            ref[(1, 1, 1, 1)]=(-1.18343042971-0.279189260913j)*(1+2.*(dim-1)/(o+1.)) + ((1.20391052926+2.29522623878j))*dim
            arg[(1, 1, 1, 2)]=(-0.152029051365-0.238805891265j)*x[0]**o + ((0.625463494947+0.811838774765j))*x[0] + ((0.383685105884-0.376374282351j))*x[1]**o + ((0.321380002861-0.174061323673j))*x[1] + ((0.24230591511-0.919634797004j))*x[2]**o + ((0.0741688188382-0.0187611553491j))*x[2]
            ref[(1, 1, 1, 2)]=(0.473961969629-1.53481497062j)*(1+2.*(dim-1)/(o+1.)) + ((1.02101231665+0.619016295743j))*dim
            arg[(1, 2, 0, 0)]=(0.658693532637-0.0817240193765j)*x[0]**o + ((-0.779284498693-0.503488169202j))*x[0] + ((-0.200653496774-0.846198671152j))*x[1]**o + ((0.0821879994759-0.763584530604j))*x[1] + ((0.838209367811+0.350689056601j))*x[2]**o + ((0.59186692681+0.16512640456j))*x[2]
            ref[(1, 2, 0, 0)]=(1.29624940367-0.577233633928j)*(1+2.*(dim-1)/(o+1.)) + ((-0.105229572407-1.10194629525j))*dim
            arg[(1, 2, 0, 1)]=(0.332051983956+0.792926182343j)*x[0]**o + ((0.941771918873-0.991930577701j))*x[0] + ((0.695504115409-0.703776311294j))*x[1]**o + ((-0.787617115426-0.158337527439j))*x[1] + ((0.819362715294+0.655213753986j))*x[2]**o + ((0.456451311147+0.478222940547j))*x[2]
            ref[(1, 2, 0, 1)]=(1.84691881466+0.744363625035j)*(1+2.*(dim-1)/(o+1.)) + ((0.610606114594-0.672045164592j))*dim
            arg[(1, 2, 0, 2)]=(0.788484994995-0.711377666129j)*x[0]**o + ((-0.443709952401+0.425083334501j))*x[0] + ((0.349602550944+0.398850066388j))*x[1]**o + ((0.489033964753+0.175445574831j))*x[1] + ((-0.678418200073+0.607309426814j))*x[2]**o + ((0.286550032318-0.633324867291j))*x[2]
            ref[(1, 2, 0, 2)]=(0.459669345866+0.294781827073j)*(1+2.*(dim-1)/(o+1.)) + ((0.331874044671-0.0327959579589j))*dim
            arg[(1, 2, 1, 0)]=(0.391063901633-0.524317430909j)*x[0]**o + ((-0.664990775711+0.0327003951368j))*x[0] + ((-0.732692395251+0.412368641458j))*x[1]**o + ((-0.22480807137-0.483724147702j))*x[1] + ((-0.477059001147-0.682907056433j))*x[2]**o + ((-0.331347277836-0.192123589736j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.818687494765-0.794855845884j)*(1+2.*(dim-1)/(o+1.)) + ((-1.22114612492-0.643147342301j))*dim
            arg[(1, 2, 1, 1)]=(-0.955117772865-0.105247475453j)*x[0]**o + ((-0.234963619302-0.0290174796682j))*x[0] + ((0.798966216199-0.287388837414j))*x[1]**o + ((-0.945281909217-0.423393187079j))*x[1] + ((-0.903827620927+0.718774120674j))*x[2]**o + ((0.251609441661-0.25073431289j))*x[2]
            ref[(1, 2, 1, 1)]=(-1.05997917759+0.326137807807j)*(1+2.*(dim-1)/(o+1.)) + ((-0.928636086858-0.703144979637j))*dim
            arg[(1, 2, 1, 2)]=(-0.853440558713+0.179299577216j)*x[0]**o + ((0.464764236362+0.550084207587j))*x[0] + ((-0.944018934956-0.250418765999j))*x[1]**o + ((0.393900820348+0.601391264473j))*x[1] + ((0.925362548245+0.793986103312j))*x[2]**o + ((-0.827781059019-0.873763833486j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.872096945424+0.722866914529j)*(1+2.*(dim-1)/(o+1.)) + ((0.0308839976906+0.277711638574j))*dim
            arg[(1, 3, 0, 0)]=(-0.466135032914-0.503269948533j)*x[0]**o + ((-0.204636597039-0.536678295637j))*x[0] + ((-0.971322014656-0.911224274966j))*x[1]**o + ((0.367263727436+0.646503340002j))*x[1] + ((0.255255257811-0.799615841423j))*x[2]**o + ((0.779030376569-0.305664621671j))*x[2]
            ref[(1, 3, 0, 0)]=(-1.18220178976-2.21411006492j)*(1+2.*(dim-1)/(o+1.)) + ((0.941657506967-0.195839577306j))*dim
            arg[(1, 3, 0, 1)]=(-0.00788402909398+0.399758404229j)*x[0]**o + ((-0.335587421917+0.951752925996j))*x[0] + ((-0.0258512896878+0.999448525611j))*x[1]**o + ((-0.876037721546+0.118636774586j))*x[1] + ((0.384272117453+0.164348646621j))*x[2]**o + ((0.626307948785+0.510246593082j))*x[2]
            ref[(1, 3, 0, 1)]=(0.350536798672+1.56355557646j)*(1+2.*(dim-1)/(o+1.)) + ((-0.585317194678+1.58063629366j))*dim
            arg[(1, 3, 0, 2)]=(0.558388999802-0.67272749876j)*x[0]**o + ((-0.505713328359+0.251294694648j))*x[0] + ((0.0294639657623+0.750771504806j))*x[1]**o + ((0.425301932614+0.320098821282j))*x[1] + ((0.112510717721-0.128743219079j))*x[2]**o + ((0.236653970232+0.0274267577437j))*x[2]
            ref[(1, 3, 0, 2)]=(0.700363683286-0.0506992130328j)*(1+2.*(dim-1)/(o+1.)) + ((0.156242574486+0.598820273674j))*dim
            arg[(1, 3, 1, 0)]=(0.119636269807-0.379505285016j)*x[0]**o + ((0.492819834928-0.32473888118j))*x[0] + ((0.314060757003+0.715104685365j))*x[1]**o + ((0.266594627141-0.739977269459j))*x[1] + ((-0.16394141999-0.394594855673j))*x[2]**o + ((0.527873098886+0.00555113695331j))*x[2]
            ref[(1, 3, 1, 0)]=(0.26975560682-0.0589954553243j)*(1+2.*(dim-1)/(o+1.)) + ((1.28728756096-1.05916501369j))*dim
            arg[(1, 3, 1, 1)]=(0.456662459707+0.940738051137j)*x[0]**o + ((0.360047574169+0.351420659542j))*x[0] + ((0.332383818939-0.793084042607j))*x[1]**o + ((0.257978210029+0.768783235383j))*x[1] + ((0.485869628929+0.203649190958j))*x[2]**o + ((0.903396070043+0.217113534874j))*x[2]
            ref[(1, 3, 1, 1)]=(1.27491590757+0.351303199488j)*(1+2.*(dim-1)/(o+1.)) + ((1.52142185424+1.3373174298j))*dim
            arg[(1, 3, 1, 2)]=(0.700656853232+0.473259266565j)*x[0]**o + ((0.978693651382+0.73475598015j))*x[0] + ((-0.234181203903+0.574010369153j))*x[1]**o + ((-0.421641599842-0.253764090431j))*x[1] + ((-0.482017121008+0.0987685544774j))*x[2]**o + ((-0.272605432373-0.418330164429j))*x[2]
            ref[(1, 3, 1, 2)]=(-0.0155414716783+1.1460381902j)*(1+2.*(dim-1)/(o+1.)) + ((0.284446619167+0.0626617252901j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.892217064257+0.3010872635j)*x[0]**o + ((0.885715707907+0.989195922117j))*x[0] + ((-0.0920137400529-0.17775872456j))*x[1]**o + ((-0.658805705583-0.908968956199j))*x[1]
            ref=(0.800203324204+0.123328538941j)*(1+2.*(dim-1)/(o+1.)) + ((0.226910002324+0.080226965918j))*dim
        else:
            arg=(0.516733390776-0.638048845197j)*x[0]**o + ((0.955379165529-0.280775383957j))*x[0] + ((-0.180282058767+0.777120943822j))*x[1]**o + ((-0.638783496558-0.92630021829j))*x[1] + ((-0.60541818484-0.501197821348j))*x[2]**o + ((-0.49390608441-0.13985841391j))*x[2]
            ref=(-0.268966852832-0.362125722724j)*(1+2.*(dim-1)/(o+1.)) + ((-0.177310415439-1.34693401616j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.559490698498-0.705934777422j)*x[0]**o + ((0.783416987273-0.912936828688j))*x[0] + ((0.481404648355+0.400896470505j))*x[1]**o + ((-0.379390111877+0.777822701088j))*x[1]
            ref[(0,)]=(-0.0780860501433-0.305038306917j)*(1+2.*(dim-1)/(o+1.)) + ((0.404026875396-0.1351141276j))*dim
            arg[(1,)]=(0.307302562988+0.495043135604j)*x[0]**o + ((-0.291396340266+0.0968591444755j))*x[0] + ((0.425516043578-0.327159791204j))*x[1]**o + ((-0.30547941397+0.399347719446j))*x[1]
            ref[(1,)]=(0.732818606566+0.1678833444j)*(1+2.*(dim-1)/(o+1.)) + ((-0.596875754236+0.496206863921j))*dim
            arg[(2,)]=(0.628317439383+0.586517575508j)*x[0]**o + ((-0.251232039432+0.546327453761j))*x[0] + ((-0.751962038218-0.3380535027j))*x[1]**o + ((-0.970610014667-0.195832284708j))*x[1]
            ref[(2,)]=(-0.123644598835+0.248464072808j)*(1+2.*(dim-1)/(o+1.)) + ((-1.2218420541+0.350495169053j))*dim
        else:
            arg[(0,)]=(-0.639341511536-0.572224109581j)*x[0]**o + ((0.471985206094+0.109484951839j))*x[0] + ((-0.974547683957-0.518375502861j))*x[1]**o + ((0.774242257138-0.842210294839j))*x[1] + ((0.507870130121-0.616129105086j))*x[2]**o + ((-0.408118449557-0.546957466558j))*x[2]
            ref[(0,)]=(-1.10601906537-1.70672871753j)*(1+2.*(dim-1)/(o+1.)) + ((0.838109013675-1.27968280956j))*dim
            arg[(1,)]=(-0.361126793313-0.271951433668j)*x[0]**o + ((-0.553899249396-0.984328256333j))*x[0] + ((0.384978114159-0.0435840170215j))*x[1]**o + ((0.296103751033+0.088473756433j))*x[1] + ((0.95838730611+0.522696300044j))*x[2]**o + ((0.42962809588-0.520659219787j))*x[2]
            ref[(1,)]=(0.982238626956+0.207160849354j)*(1+2.*(dim-1)/(o+1.)) + ((0.171832597517-1.41651371969j))*dim
            arg[(2,)]=(-0.23231327205+0.663887127038j)*x[0]**o + ((0.235399597836-0.615507002675j))*x[0] + ((-0.926900260887-0.392798017728j))*x[1]**o + ((0.134851885291-0.555570713453j))*x[1] + ((-0.707304067531-0.470456239861j))*x[2]**o + ((-0.383516300911+0.834113262455j))*x[2]
            ref[(2,)]=(-1.86651760047-0.199367130552j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0132648177837-0.336964453673j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.20064387973+0.596240339513j)*x[0]**o + ((-0.0462482948679-0.480310018574j))*x[0] + ((0.57787528916-0.122529585954j))*x[1]**o + ((0.427884812034-0.208264467669j))*x[1]
            ref[(0, 0)]=(0.77851916889+0.473710753559j)*(1+2.*(dim-1)/(o+1.)) + ((0.381636517166-0.688574486243j))*dim
            arg[(0, 1)]=(0.812819491702+0.430482479597j)*x[0]**o + ((0.670579063879+0.64796391431j))*x[0] + ((-0.55611334879-0.380735103367j))*x[1]**o + ((0.789197204114+0.375192312193j))*x[1]
            ref[(0, 1)]=(0.256706142912+0.0497473762296j)*(1+2.*(dim-1)/(o+1.)) + ((1.45977626799+1.0231562265j))*dim
            arg[(1, 0)]=(0.283556160643-0.301147636396j)*x[0]**o + ((-0.942709632165+0.978865367982j))*x[0] + ((0.718944778481+0.848304230679j))*x[1]**o + ((0.506599327337+0.743481783106j))*x[1]
            ref[(1, 0)]=(1.00250093912+0.547156594283j)*(1+2.*(dim-1)/(o+1.)) + ((-0.436110304829+1.72234715109j))*dim
            arg[(1, 1)]=(-0.666966971848-0.910452675882j)*x[0]**o + ((0.573621727673-0.908191356031j))*x[0] + ((-0.476146895919-0.175630720287j))*x[1]**o + ((0.842343700485+0.21854668111j))*x[1]
            ref[(1, 1)]=(-1.14311386777-1.08608339617j)*(1+2.*(dim-1)/(o+1.)) + ((1.41596542816-0.68964467492j))*dim
        else:
            arg[(0, 0)]=(-0.951060205429-0.852903167243j)*x[0]**o + ((-0.811249639934+0.101962750313j))*x[0] + ((-0.710252956685-0.110643991326j))*x[1]**o + ((0.588840277259+0.666085699087j))*x[1] + ((-0.523083066666-0.897627184994j))*x[2]**o + ((-0.483968149935+0.010178826057j))*x[2]
            ref[(0, 0)]=(-2.18439622878-1.86117434356j)*(1+2.*(dim-1)/(o+1.)) + ((-0.706377512611+0.778227275457j))*dim
            arg[(0, 1)]=(-0.874956168309-0.108384587565j)*x[0]**o + ((-0.141616081015+0.124350759653j))*x[0] + ((-0.41205170877+0.00179077084943j))*x[1]**o + ((-0.715288972541+0.960902503277j))*x[1] + ((0.789515868958-0.0328049990144j))*x[2]**o + ((-0.713694968159-0.219040534936j))*x[2]
            ref[(0, 1)]=(-0.497492008122-0.13939881573j)*(1+2.*(dim-1)/(o+1.)) + ((-1.57060002172+0.866212727994j))*dim
            arg[(1, 0)]=(-0.0535641412805+0.349314592455j)*x[0]**o + ((-0.489658918758-0.793921222341j))*x[0] + ((-0.478885520457-0.34539123756j))*x[1]**o + ((-0.377852244619+0.82831896232j))*x[1] + ((-0.241098672513+0.917425142807j))*x[2]**o + ((-0.408906290448-0.899288935127j))*x[2]
            ref[(1, 0)]=(-0.773548334251+0.921348497702j)*(1+2.*(dim-1)/(o+1.)) + ((-1.27641745383-0.864891195148j))*dim
            arg[(1, 1)]=(0.645714849091-0.940776659182j)*x[0]**o + ((-0.609611608761-0.342827820696j))*x[0] + ((0.0730561565148+0.10027842049j))*x[1]**o + ((0.859137695814+0.879533036664j))*x[1] + ((0.911238932185+0.213861023972j))*x[2]**o + ((-0.395285869468+0.645437346227j))*x[2]
            ref[(1, 1)]=(1.63000993779-0.626637214721j)*(1+2.*(dim-1)/(o+1.)) + ((-0.145759782415+1.1821425622j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3),w)
        ref=numpy.zeros((3, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.542471857435-0.0197311624535j)*x[0]**o + ((-0.708874218526+0.905082559126j))*x[0] + ((0.31589699355-0.61603337319j))*x[1]**o + ((0.70640843202+0.0322094678575j))*x[1]
            ref[(0, 0, 0)]=(-0.226574863885-0.635764535643j)*(1+2.*(dim-1)/(o+1.)) + ((-0.00246578650524+0.937292026983j))*dim
            arg[(0, 0, 1)]=(-0.223972657386+0.691448918376j)*x[0]**o + ((0.27061585286+0.92657463549j))*x[0] + ((-0.0379863615249-0.64485254872j))*x[1]**o + ((0.961589508767+0.542954802277j))*x[1]
            ref[(0, 0, 1)]=(-0.261959018911+0.0465963696554j)*(1+2.*(dim-1)/(o+1.)) + ((1.23220536163+1.46952943777j))*dim
            arg[(0, 0, 2)]=(0.740897985933+0.953185606786j)*x[0]**o + ((0.39413495424-0.0245735283601j))*x[0] + ((0.815360083662-0.152245410974j))*x[1]**o + ((0.420732123138-0.3690106745j))*x[1]
            ref[(0, 0, 2)]=(1.55625806959+0.800940195812j)*(1+2.*(dim-1)/(o+1.)) + ((0.814867077377-0.39358420286j))*dim
            arg[(0, 1, 0)]=(-0.211813794777+0.643681645749j)*x[0]**o + ((-0.595780207159+0.93055773284j))*x[0] + ((0.108020614622+0.598827181566j))*x[1]**o + ((-0.539679371658+0.435686258952j))*x[1]
            ref[(0, 1, 0)]=(-0.103793180155+1.24250882731j)*(1+2.*(dim-1)/(o+1.)) + ((-1.13545957882+1.36624399179j))*dim
            arg[(0, 1, 1)]=(-0.907352162317+0.0527556439339j)*x[0]**o + ((0.694159843788+0.707758288863j))*x[0] + ((0.255279819783+0.00830629500521j))*x[1]**o + ((0.964508587903-0.419298217112j))*x[1]
            ref[(0, 1, 1)]=(-0.652072342534+0.0610619389391j)*(1+2.*(dim-1)/(o+1.)) + ((1.65866843169+0.288460071751j))*dim
            arg[(0, 1, 2)]=(-0.566251395283+0.467498672149j)*x[0]**o + ((-0.297077058184-0.826453490538j))*x[0] + ((-0.372215606908+0.00914612070147j))*x[1]**o + ((0.979776248028-0.354379262276j))*x[1]
            ref[(0, 1, 2)]=(-0.938467002192+0.47664479285j)*(1+2.*(dim-1)/(o+1.)) + ((0.682699189844-1.18083275281j))*dim
            arg[(0, 2, 0)]=(0.760918242371-0.885005294593j)*x[0]**o + ((0.580359848618+0.485782082923j))*x[0] + ((-0.504809924017+0.522448842183j))*x[1]**o + ((-0.707658775236-0.750756146215j))*x[1]
            ref[(0, 2, 0)]=(0.256108318355-0.362556452409j)*(1+2.*(dim-1)/(o+1.)) + ((-0.127298926618-0.264974063292j))*dim
            arg[(0, 2, 1)]=(-0.970863372893+0.779497145466j)*x[0]**o + ((0.362258547765+0.947534082403j))*x[0] + ((0.860052383542-0.631784186229j))*x[1]**o + ((-0.455704216589-0.0207981513398j))*x[1]
            ref[(0, 2, 1)]=(-0.110810989351+0.147712959237j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0934456688241+0.926735931063j))*dim
            arg[(0, 2, 2)]=(0.195652484871+0.49353526484j)*x[0]**o + ((0.52896712613+0.12561333594j))*x[0] + ((0.173812307112-0.671838612766j))*x[1]**o + ((-0.198122863156+0.945850986705j))*x[1]
            ref[(0, 2, 2)]=(0.369464791984-0.178303347927j)*(1+2.*(dim-1)/(o+1.)) + ((0.330844262974+1.07146432264j))*dim
            arg[(1, 0, 0)]=(0.400085176985+0.462350810379j)*x[0]**o + ((-0.328459667581-0.30726312625j))*x[0] + ((-0.233967073809-0.933589315528j))*x[1]**o + ((0.42756079338+0.621467520675j))*x[1]
            ref[(1, 0, 0)]=(0.166118103176-0.471238505149j)*(1+2.*(dim-1)/(o+1.)) + ((0.099101125799+0.314204394425j))*dim
            arg[(1, 0, 1)]=(0.879081888493+0.593204201868j)*x[0]**o + ((-0.465901965941+0.79727244767j))*x[0] + ((-0.328819037868-0.213999819861j))*x[1]**o + ((-0.795047667452-0.236812809374j))*x[1]
            ref[(1, 0, 1)]=(0.550262850625+0.379204382006j)*(1+2.*(dim-1)/(o+1.)) + ((-1.26094963339+0.560459638296j))*dim
            arg[(1, 0, 2)]=(0.815171643124-0.111865556393j)*x[0]**o + ((-0.604468968047+0.0340422391518j))*x[0] + ((0.983055441834-0.31711615772j))*x[1]**o + ((0.727981722112+0.584345527021j))*x[1]
            ref[(1, 0, 2)]=(1.79822708496-0.428981714113j)*(1+2.*(dim-1)/(o+1.)) + ((0.123512754064+0.618387766172j))*dim
            arg[(1, 1, 0)]=(0.830901850001-0.585391017483j)*x[0]**o + ((0.558197111675+0.049131646327j))*x[0] + ((-0.193925360039+0.854384455709j))*x[1]**o + ((-0.106626851208+0.669991497635j))*x[1]
            ref[(1, 1, 0)]=(0.636976489962+0.268993438226j)*(1+2.*(dim-1)/(o+1.)) + ((0.451570260467+0.719123143961j))*dim
            arg[(1, 1, 1)]=(-0.0951577083006+0.409467842628j)*x[0]**o + ((0.929489044876+0.789589235366j))*x[0] + ((-0.35690369971+0.608570787865j))*x[1]**o + ((-0.250415054456-0.654175620393j))*x[1]
            ref[(1, 1, 1)]=(-0.45206140801+1.01803863049j)*(1+2.*(dim-1)/(o+1.)) + ((0.679073990419+0.135413614974j))*dim
            arg[(1, 1, 2)]=(-0.701479195127-0.221176497683j)*x[0]**o + ((-0.457649489501+0.766120284748j))*x[0] + ((0.911639854753+0.95543831453j))*x[1]**o + ((-0.27475904703-0.906693278513j))*x[1]
            ref[(1, 1, 2)]=(0.210160659626+0.734261816847j)*(1+2.*(dim-1)/(o+1.)) + ((-0.732408536531-0.140572993765j))*dim
            arg[(1, 2, 0)]=(-0.765715750316+0.080472806578j)*x[0]**o + ((0.442274169345-0.0962897249045j))*x[0] + ((-0.822383724812+0.143248755034j))*x[1]**o + ((0.423381104559-0.303167264323j))*x[1]
            ref[(1, 2, 0)]=(-1.58809947513+0.223721561612j)*(1+2.*(dim-1)/(o+1.)) + ((0.865655273904-0.399456989228j))*dim
            arg[(1, 2, 1)]=(-0.556212756816+0.472923544861j)*x[0]**o + ((0.872151471542+0.292724487064j))*x[0] + ((0.461432127725-0.149451165769j))*x[1]**o + ((-0.466796029481+0.301377527491j))*x[1]
            ref[(1, 2, 1)]=(-0.0947806290907+0.323472379092j)*(1+2.*(dim-1)/(o+1.)) + ((0.405355442061+0.594102014555j))*dim
            arg[(1, 2, 2)]=(-0.0369103758686-0.742754591705j)*x[0]**o + ((-0.679080500152-0.723352908456j))*x[0] + ((-0.883515275656+0.455207859491j))*x[1]**o + ((-0.485956213014+0.0854591217711j))*x[1]
            ref[(1, 2, 2)]=(-0.920425651525-0.287546732214j)*(1+2.*(dim-1)/(o+1.)) + ((-1.16503671317-0.637893786685j))*dim
            arg[(2, 0, 0)]=(-0.983793879055+0.408653728515j)*x[0]**o + ((-0.682571989385+0.481011096044j))*x[0] + ((0.232626220409+0.504548724811j))*x[1]**o + ((0.615026116456+0.792222480756j))*x[1]
            ref[(2, 0, 0)]=(-0.751167658646+0.913202453326j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0675458729285+1.2732335768j))*dim
            arg[(2, 0, 1)]=(0.376836679612-0.830857584048j)*x[0]**o + ((0.00770982576689+0.252547451447j))*x[0] + ((-0.487547003562+0.640083056322j))*x[1]**o + ((-0.439068937342+0.382304481898j))*x[1]
            ref[(2, 0, 1)]=(-0.11071032395-0.190774527726j)*(1+2.*(dim-1)/(o+1.)) + ((-0.431359111575+0.634851933346j))*dim
            arg[(2, 0, 2)]=(0.395596005404+0.925402147706j)*x[0]**o + ((-0.503016766761+0.947193370828j))*x[0] + ((-0.869026633698+0.677076691951j))*x[1]**o + ((0.644999128647+0.13586053665j))*x[1]
            ref[(2, 0, 2)]=(-0.473430628293+1.60247883966j)*(1+2.*(dim-1)/(o+1.)) + ((0.141982361886+1.08305390748j))*dim
            arg[(2, 1, 0)]=(0.969992278699+0.400443179493j)*x[0]**o + ((-0.942866399374+0.766172738876j))*x[0] + ((-0.531093714683+0.16335151034j))*x[1]**o + ((0.000787179767018+0.0979818270218j))*x[1]
            ref[(2, 1, 0)]=(0.438898564015+0.563794689833j)*(1+2.*(dim-1)/(o+1.)) + ((-0.942079219607+0.864154565898j))*dim
            arg[(2, 1, 1)]=(-0.0888260446482-0.923851109104j)*x[0]**o + ((0.364439631912-0.353547354121j))*x[0] + ((0.126653456074-0.665150175253j))*x[1]**o + ((-0.276169087321-0.36619454513j))*x[1]
            ref[(2, 1, 1)]=(0.0378274114261-1.58900128436j)*(1+2.*(dim-1)/(o+1.)) + ((0.0882705445908-0.719741899251j))*dim
            arg[(2, 1, 2)]=(-0.791712115182-0.799491778459j)*x[0]**o + ((0.45135561966+0.140781299776j))*x[0] + ((-0.681434732474+0.787398682486j))*x[1]**o + ((0.850193113545+0.34398687504j))*x[1]
            ref[(2, 1, 2)]=(-1.47314684766-0.0120930959724j)*(1+2.*(dim-1)/(o+1.)) + ((1.30154873321+0.484768174816j))*dim
            arg[(2, 2, 0)]=(-0.292478735625-0.819358199537j)*x[0]**o + ((-0.550667811906+0.578379008598j))*x[0] + ((-0.425084813945+0.463231196965j))*x[1]**o + ((-0.552017807209+0.545511950276j))*x[1]
            ref[(2, 2, 0)]=(-0.71756354957-0.356127002572j)*(1+2.*(dim-1)/(o+1.)) + ((-1.10268561911+1.12389095887j))*dim
            arg[(2, 2, 1)]=(0.0789276483014-0.957298089117j)*x[0]**o + ((0.035502565996-0.629986464768j))*x[0] + ((-0.31841982987-0.161451312477j))*x[1]**o + ((-0.932477798794+0.761045535454j))*x[1]
            ref[(2, 2, 1)]=(-0.239492181568-1.11874940159j)*(1+2.*(dim-1)/(o+1.)) + ((-0.896975232798+0.131059070686j))*dim
            arg[(2, 2, 2)]=(-0.995997401579+0.689559085262j)*x[0]**o + ((-0.00946830008193-0.683103395127j))*x[0] + ((-0.86322859342-0.435613688245j))*x[1]**o + ((0.0530941483387-0.790835202932j))*x[1]
            ref[(2, 2, 2)]=(-1.859225995+0.253945397017j)*(1+2.*(dim-1)/(o+1.)) + ((0.0436258482567-1.47393859806j))*dim
        else:
            arg[(0, 0, 0)]=(-0.721890769973-0.641852296854j)*x[0]**o + ((-0.97025716536-0.0855720673391j))*x[0] + ((-0.47419683465+0.227665454221j))*x[1]**o + ((0.511328480442-0.449017797778j))*x[1] + ((0.706266563893+0.127380496888j))*x[2]**o + ((-0.507188031411-0.00547028662853j))*x[2]
            ref[(0, 0, 0)]=(-0.489821040729-0.286806345745j)*(1+2.*(dim-1)/(o+1.)) + ((-0.966116716329-0.540060151746j))*dim
            arg[(0, 0, 1)]=(0.0055825560729+0.787295824308j)*x[0]**o + ((0.256278567745-0.994687038193j))*x[0] + ((-0.674906190751-0.804772503578j))*x[1]**o + ((0.276355059906-0.713193143378j))*x[1] + ((-0.540361938259-0.64127610448j))*x[2]**o + ((0.336703812223-0.335692928742j))*x[2]
            ref[(0, 0, 1)]=(-1.20968557294-0.658752783751j)*(1+2.*(dim-1)/(o+1.)) + ((0.869337439874-2.04357311031j))*dim
            arg[(0, 0, 2)]=(-0.105241494559+0.101025991191j)*x[0]**o + ((0.636111947865+0.137519319162j))*x[0] + ((0.926289713459+0.633894793776j))*x[1]**o + ((-0.826189881159-0.314072291216j))*x[1] + ((0.408007063039-0.23742447279j))*x[2]**o + ((-0.825966042071+0.824941049615j))*x[2]
            ref[(0, 0, 2)]=(1.22905528194+0.497496312177j)*(1+2.*(dim-1)/(o+1.)) + ((-1.01604397537+0.648388077561j))*dim
            arg[(0, 1, 0)]=(0.661459345377-0.603644378461j)*x[0]**o + ((0.243611318235-0.510781988622j))*x[0] + ((-0.958627175704+0.781578089315j))*x[1]**o + ((-0.417526438912-0.563546139341j))*x[1] + ((0.910881414172+0.0531508940746j))*x[2]**o + ((0.774957443996-0.538518669534j))*x[2]
            ref[(0, 1, 0)]=(0.613713583845+0.231084604929j)*(1+2.*(dim-1)/(o+1.)) + ((0.601042323319-1.6128467975j))*dim
            arg[(0, 1, 1)]=(0.772759948826+0.239653250826j)*x[0]**o + ((-0.528367620316+0.43106974211j))*x[0] + ((0.584350123491-0.096382785913j))*x[1]**o + ((0.746087909704+0.734961883354j))*x[1] + ((-0.573783292115-0.590665548597j))*x[2]**o + ((-0.0546501691289+0.172146038271j))*x[2]
            ref[(0, 1, 1)]=(0.783326780202-0.447395083684j)*(1+2.*(dim-1)/(o+1.)) + ((0.163070120259+1.33817766374j))*dim
            arg[(0, 1, 2)]=(0.121491439713+0.631168412547j)*x[0]**o + ((-0.335318834093+0.151821483042j))*x[0] + ((0.567679505058+0.176584735518j))*x[1]**o + ((-0.75781390653-0.242069755032j))*x[1] + ((-0.399683705112-0.822241686759j))*x[2]**o + ((-0.0746559175611+0.756629230015j))*x[2]
            ref[(0, 1, 2)]=(0.289487239659-0.0144885386945j)*(1+2.*(dim-1)/(o+1.)) + ((-1.16778865818+0.666380958025j))*dim
            arg[(0, 2, 0)]=(0.444308568157-0.89260995662j)*x[0]**o + ((0.494372224035-0.529339592039j))*x[0] + ((-0.411187398091-0.0954722192421j))*x[1]**o + ((0.38380938929+0.2186668309j))*x[1] + ((0.792157972672+0.306767836355j))*x[2]**o + ((0.331705153893-0.166277691903j))*x[2]
            ref[(0, 2, 0)]=(0.825279142738-0.681314339508j)*(1+2.*(dim-1)/(o+1.)) + ((1.20988676722-0.476950453041j))*dim
            arg[(0, 2, 1)]=(0.738393056253-0.145614031377j)*x[0]**o + ((0.409472178692+0.318290116357j))*x[0] + ((0.785549150447-0.38229272428j))*x[1]**o + ((-0.0766401125861-0.44850626395j))*x[1] + ((0.294090521238-0.207084710093j))*x[2]**o + ((-0.0451680582283-0.8444516457j))*x[2]
            ref[(0, 2, 1)]=(1.81803272794-0.73499146575j)*(1+2.*(dim-1)/(o+1.)) + ((0.287664007877-0.974667793293j))*dim
            arg[(0, 2, 2)]=(-0.809908594893-0.172051905159j)*x[0]**o + ((0.821067356585+0.889895630967j))*x[0] + ((0.564657138679+0.427713891496j))*x[1]**o + ((0.0165255337448+0.912363972256j))*x[1] + ((-0.519812310037+0.493050824595j))*x[2]**o + ((0.269792000478+0.868657639699j))*x[2]
            ref[(0, 2, 2)]=(-0.765063766251+0.748712810932j)*(1+2.*(dim-1)/(o+1.)) + ((1.10738489081+2.67091724292j))*dim
            arg[(1, 0, 0)]=(0.976997330539-0.944942772202j)*x[0]**o + ((0.805368326663-0.347149250197j))*x[0] + ((-0.0577891943758-0.617233179574j))*x[1]**o + ((-0.465160753243-0.109854640056j))*x[1] + ((-0.89727057095-0.0718691377719j))*x[2]**o + ((-0.856553605786-0.981016163667j))*x[2]
            ref[(1, 0, 0)]=(0.0219375652129-1.63404508955j)*(1+2.*(dim-1)/(o+1.)) + ((-0.516346032366-1.43802005392j))*dim
            arg[(1, 0, 1)]=(-0.484153422725+0.353877895876j)*x[0]**o + ((0.221379032363-0.898971302698j))*x[0] + ((0.121082176751-0.161762775795j))*x[1]**o + ((-0.708742164344-0.245068285808j))*x[1] + ((0.902192449829-0.512380000694j))*x[2]**o + ((-0.358300427045+0.191730342286j))*x[2]
            ref[(1, 0, 1)]=(0.539121203854-0.320264880612j)*(1+2.*(dim-1)/(o+1.)) + ((-0.845663559025-0.95230924622j))*dim
            arg[(1, 0, 2)]=(0.702048020854-0.705168783126j)*x[0]**o + ((0.27721273696+0.434955636776j))*x[0] + ((-0.0437944376086+0.233088534789j))*x[1]**o + ((0.907766232824+0.715619042795j))*x[1] + ((0.71111406384-0.332256168997j))*x[2]**o + ((0.4281635238+0.883022699625j))*x[2]
            ref[(1, 0, 2)]=(1.36936764709-0.804336417335j)*(1+2.*(dim-1)/(o+1.)) + ((1.61314249358+2.0335973792j))*dim
            arg[(1, 1, 0)]=(0.0771915188158+0.983346157168j)*x[0]**o + ((-0.478503366209-0.407486657363j))*x[0] + ((-0.245418230648+0.0810758673301j))*x[1]**o + ((-0.322127915814-0.963213295079j))*x[1] + ((-0.447609115872-0.292428735635j))*x[2]**o + ((0.021842030862-0.658579443075j))*x[2]
            ref[(1, 1, 0)]=(-0.615835827704+0.771993288863j)*(1+2.*(dim-1)/(o+1.)) + ((-0.778789251161-2.02927939552j))*dim
            arg[(1, 1, 1)]=(-0.317191625692-0.508782444526j)*x[0]**o + ((-0.719562069665+0.551245795598j))*x[0] + ((0.185419378689-0.976513008008j))*x[1]**o + ((0.755173594178-0.504386249748j))*x[1] + ((0.658624673166-0.568929456705j))*x[2]**o + ((0.770985314308+0.0959689580692j))*x[2]
            ref[(1, 1, 1)]=(0.526852426162-2.05422490924j)*(1+2.*(dim-1)/(o+1.)) + ((0.806596838821+0.14282850392j))*dim
            arg[(1, 1, 2)]=(-0.0207759560395-0.994860581538j)*x[0]**o + ((0.272376561452-0.707235195306j))*x[0] + ((-0.549021523661-0.10153668739j))*x[1]**o + ((-0.670170424201-0.892548186867j))*x[1] + ((-0.858240961908-0.366302778375j))*x[2]**o + ((-0.979016842746-0.707785277109j))*x[2]
            ref[(1, 1, 2)]=(-1.42803844161-1.4627000473j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3768107055-2.30756865928j))*dim
            arg[(1, 2, 0)]=(-0.00409882417056-0.322974587355j)*x[0]**o + ((-0.164191012424-0.88446432069j))*x[0] + ((0.110517151895+0.884962189806j))*x[1]**o + ((0.0313582303018+0.0669816029534j))*x[1] + ((0.298152283846+0.654475017112j))*x[2]**o + ((-0.698421209962+0.577471897961j))*x[2]
            ref[(1, 2, 0)]=(0.404570611571+1.21646261956j)*(1+2.*(dim-1)/(o+1.)) + ((-0.831253992084-0.240010819775j))*dim
            arg[(1, 2, 1)]=(-0.580933715534-0.29359809728j)*x[0]**o + ((0.340185252449+0.781645860526j))*x[0] + ((-0.0551515185877-0.414750028034j))*x[1]**o + ((-0.588212760026+0.473566625386j))*x[1] + ((-0.0251644225311-0.377321007902j))*x[2]**o + ((0.690918413846-0.173068789612j))*x[2]
            ref[(1, 2, 1)]=(-0.661249656652-1.08566913322j)*(1+2.*(dim-1)/(o+1.)) + ((0.44289090627+1.0821436963j))*dim
            arg[(1, 2, 2)]=(0.984665380935+0.169777137125j)*x[0]**o + ((-0.740547857933+0.327409386632j))*x[0] + ((-0.976913578456-0.0533780237804j))*x[1]**o + ((0.141493493938-0.262601864937j))*x[1] + ((-0.151547428451-0.739605264528j))*x[2]**o + ((-0.847597961499-0.412022901316j))*x[2]
            ref[(1, 2, 2)]=(-0.143795625973-0.623206151183j)*(1+2.*(dim-1)/(o+1.)) + ((-1.44665232549-0.347215379622j))*dim
            arg[(2, 0, 0)]=(-0.936630789172+0.388894701368j)*x[0]**o + ((0.0417229075422+0.0726550557441j))*x[0] + ((-0.22616482924+0.0451264274397j))*x[1]**o + ((0.963393727711+0.561098116521j))*x[1] + ((-0.0425911239314-0.0015712727376j))*x[2]**o + ((-0.305619293064+0.706951285162j))*x[2]
            ref[(2, 0, 0)]=(-1.20538674234+0.432449856071j)*(1+2.*(dim-1)/(o+1.)) + ((0.699497342188+1.34070445743j))*dim
            arg[(2, 0, 1)]=(-0.761929515962-0.939244017044j)*x[0]**o + ((0.680370936486-0.291857109058j))*x[0] + ((0.412672105885-0.146550458374j))*x[1]**o + ((-0.061682567086+0.924685846205j))*x[1] + ((-0.858121312705-0.49210639307j))*x[2]**o + ((-0.859469083511-0.950285172653j))*x[2]
            ref[(2, 0, 1)]=(-1.20737872278-1.57790086849j)*(1+2.*(dim-1)/(o+1.)) + ((-0.240780714112-0.317456435506j))*dim
            arg[(2, 0, 2)]=(0.419960710168+0.311146108532j)*x[0]**o + ((-0.375845344627-0.699220313183j))*x[0] + ((-0.873455191331-0.130185044226j))*x[1]**o + ((-0.763762498415-0.23091473594j))*x[1] + ((0.790686255215+0.135959606227j))*x[2]**o + ((0.150890942757+0.344161636352j))*x[2]
            ref[(2, 0, 2)]=(0.337191774052+0.316920670534j)*(1+2.*(dim-1)/(o+1.)) + ((-0.988716900285-0.58597341277j))*dim
            arg[(2, 1, 0)]=(-0.130639533308-0.309178397811j)*x[0]**o + ((-0.672954268256+0.241131718096j))*x[0] + ((0.452904535083+0.814359089882j))*x[1]**o + ((-0.57135509792+0.195738525422j))*x[1] + ((0.568332785353-0.498581135876j))*x[2]**o + ((0.697709890888+0.0863591756225j))*x[2]
            ref[(2, 1, 0)]=(0.890597787128+0.00659955619487j)*(1+2.*(dim-1)/(o+1.)) + ((-0.546599475288+0.52322941914j))*dim
            arg[(2, 1, 1)]=(-0.0757442941578+0.152230444418j)*x[0]**o + ((-0.872556728094-0.388326199361j))*x[0] + ((0.137696402648-0.693172870288j))*x[1]**o + ((0.583814363538+0.339514515734j))*x[1] + ((0.485269093421+0.770055252775j))*x[2]**o + ((-0.836295763154-0.57990884275j))*x[2]
            ref[(2, 1, 1)]=(0.547221201912+0.229112826905j)*(1+2.*(dim-1)/(o+1.)) + ((-1.12503812771-0.628720526376j))*dim
            arg[(2, 1, 2)]=(0.723960276553-0.742369845263j)*x[0]**o + ((0.857167346864+0.905830061313j))*x[0] + ((-0.791035894047+0.62481783918j))*x[1]**o + ((-0.647781587609-0.607348873337j))*x[1] + ((0.879215267588+0.403683466833j))*x[2]**o + ((0.820736873773-0.195091534468j))*x[2]
            ref[(2, 1, 2)]=(0.812139650095+0.286131460751j)*(1+2.*(dim-1)/(o+1.)) + ((1.03012263303+0.103389653508j))*dim
            arg[(2, 2, 0)]=(0.830207739197+0.234690669717j)*x[0]**o + ((-0.913100658055-0.270648337968j))*x[0] + ((-0.109302426655+0.614244718242j))*x[1]**o + ((-0.410357421765-0.390416209026j))*x[1] + ((0.460556464989+0.301865738871j))*x[2]**o + ((-0.330094536354-0.89948965303j))*x[2]
            ref[(2, 2, 0)]=(1.18146177753+1.15080112683j)*(1+2.*(dim-1)/(o+1.)) + ((-1.65355261617-1.56055420002j))*dim
            arg[(2, 2, 1)]=(-0.657187666164+0.559156782333j)*x[0]**o + ((-0.93127502906-0.317548797524j))*x[0] + ((0.298579410065+0.68504824653j))*x[1]**o + ((-0.686073666308-0.584595428206j))*x[1] + ((-0.0811218634859+0.732730098456j))*x[2]**o + ((0.892125406207-0.148167432548j))*x[2]
            ref[(2, 2, 1)]=(-0.439730119586+1.97693512732j)*(1+2.*(dim-1)/(o+1.)) + ((-0.725223289162-1.05031165828j))*dim
            arg[(2, 2, 2)]=(0.113893662693+0.126748994997j)*x[0]**o + ((0.41116833409+0.0894211998493j))*x[0] + ((0.862949318996+0.876306537416j))*x[1]**o + ((0.998618443125+0.328760092032j))*x[1] + ((0.779914507908+0.468094828659j))*x[2]**o + ((-0.720598546584+0.974260754854j))*x[2]
            ref[(2, 2, 2)]=(1.7567574896+1.47115036107j)*(1+2.*(dim-1)/(o+1.)) + ((0.689188230631+1.39244204674j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 4),w)
        ref=numpy.zeros((3, 2, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.457470096239-0.0888131472087j)*x[0]**o + ((0.416661995798-0.710129554633j))*x[0] + ((0.966240788536+0.47675672061j))*x[1]**o + ((-0.607402776343-0.167868167369j))*x[1]
            ref[(0, 0, 0, 0)]=(0.508770692297+0.387943573401j)*(1+2.*(dim-1)/(o+1.)) + ((-0.190740780544-0.877997722002j))*dim
            arg[(0, 0, 0, 1)]=(-0.219885083994-0.259401715835j)*x[0]**o + ((0.72042542233-0.789824303433j))*x[0] + ((-0.542061556808-0.257676320257j))*x[1]**o + ((0.766301106178-0.317042917654j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.761946640801-0.517078036093j)*(1+2.*(dim-1)/(o+1.)) + ((1.48672652851-1.10686722109j))*dim
            arg[(0, 0, 0, 2)]=(-0.3938857731-0.318202641178j)*x[0]**o + ((0.298200772121-0.517797088723j))*x[0] + ((-0.0779689116085-0.109024027589j))*x[1]**o + ((0.0853935721719-0.131097515365j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.471854684709-0.427226668767j)*(1+2.*(dim-1)/(o+1.)) + ((0.383594344293-0.648894604088j))*dim
            arg[(0, 0, 0, 3)]=(0.729804995658+0.598670956817j)*x[0]**o + ((0.855775600921-0.531160874945j))*x[0] + ((-0.827486086883+0.940231444532j))*x[1]**o + ((-0.223136280067+0.178967684539j))*x[1]
            ref[(0, 0, 0, 3)]=(-0.0976810912251+1.53890240135j)*(1+2.*(dim-1)/(o+1.)) + ((0.632639320854-0.352193190406j))*dim
            arg[(0, 0, 1, 0)]=(-0.99405630035+0.0721733612163j)*x[0]**o + ((0.44001756664+0.0849629766982j))*x[0] + ((0.200543829412-0.00554991992971j))*x[1]**o + ((-0.380232533098+0.452215005374j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.793512470938+0.0666234412866j)*(1+2.*(dim-1)/(o+1.)) + ((0.0597850335416+0.537177982072j))*dim
            arg[(0, 0, 1, 1)]=(-0.572549295037-0.771181891163j)*x[0]**o + ((-0.57830927975-0.30562697327j))*x[0] + ((0.276694714031+0.387996970344j))*x[1]**o + ((0.393510934867-0.0286324671896j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.295854581006-0.383184920819j)*(1+2.*(dim-1)/(o+1.)) + ((-0.184798344883-0.334259440459j))*dim
            arg[(0, 0, 1, 2)]=(0.478372658194+0.986561059673j)*x[0]**o + ((0.885161663518-0.489939957278j))*x[0] + ((-0.747382660797+0.985541728842j))*x[1]**o + ((-0.370113741347+0.744027078445j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.269010002604+1.97210278852j)*(1+2.*(dim-1)/(o+1.)) + ((0.515047922171+0.254087121167j))*dim
            arg[(0, 0, 1, 3)]=(0.389500990143-0.692965274904j)*x[0]**o + ((-0.362865050483-0.131096656543j))*x[0] + ((0.107491085161+0.268161507177j))*x[1]**o + ((0.864090836733-0.303050792096j))*x[1]
            ref[(0, 0, 1, 3)]=(0.496992075304-0.424803767727j)*(1+2.*(dim-1)/(o+1.)) + ((0.50122578625-0.434147448639j))*dim
            arg[(0, 1, 0, 0)]=(-0.0168104144904-0.57410623156j)*x[0]**o + ((0.165418728879+0.972490779265j))*x[0] + ((0.933042919113-0.453189553955j))*x[1]**o + ((-0.0346430014703+0.747214966938j))*x[1]
            ref[(0, 1, 0, 0)]=(0.916232504622-1.02729578552j)*(1+2.*(dim-1)/(o+1.)) + ((0.130775727409+1.7197057462j))*dim
            arg[(0, 1, 0, 1)]=(0.656926765964-0.205035659378j)*x[0]**o + ((0.459201161257-0.0345804775335j))*x[0] + ((-0.94218000507-0.164637209664j))*x[1]**o + ((0.990763253974+0.831500839815j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.285253239107-0.369672869042j)*(1+2.*(dim-1)/(o+1.)) + ((1.44996441523+0.796920362282j))*dim
            arg[(0, 1, 0, 2)]=(0.0273116133019-0.589066911062j)*x[0]**o + ((-0.56061800925+0.856144953035j))*x[0] + ((-0.625870145572+0.328122068742j))*x[1]**o + ((-0.357292698432-0.732497413549j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.59855853227-0.260944842319j)*(1+2.*(dim-1)/(o+1.)) + ((-0.917910707682+0.123647539487j))*dim
            arg[(0, 1, 0, 3)]=(-0.431849683202-0.197967279573j)*x[0]**o + ((-0.487011345969+0.315431661411j))*x[0] + ((-0.697144314227+0.367825661125j))*x[1]**o + ((-0.397929143752-0.37520878019j))*x[1]
            ref[(0, 1, 0, 3)]=(-1.12899399743+0.169858381552j)*(1+2.*(dim-1)/(o+1.)) + ((-0.884940489721-0.0597771187796j))*dim
            arg[(0, 1, 1, 0)]=(0.597509440353+0.0550629273579j)*x[0]**o + ((0.450530304431+0.774581148408j))*x[0] + ((-0.693659116255-0.450352716544j))*x[1]**o + ((-0.296113244339+0.988848318189j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.0961496759028-0.395289789187j)*(1+2.*(dim-1)/(o+1.)) + ((0.154417060092+1.7634294666j))*dim
            arg[(0, 1, 1, 1)]=(-0.110817130729+0.984203064451j)*x[0]**o + ((0.212858907118-0.325484333265j))*x[0] + ((-0.372529495378+0.818118357241j))*x[1]**o + ((-0.903438193814+0.680056639469j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.483346626107+1.80232142169j)*(1+2.*(dim-1)/(o+1.)) + ((-0.690579286696+0.354572306204j))*dim
            arg[(0, 1, 1, 2)]=(-0.628817047287-0.322200604683j)*x[0]**o + ((0.245498852949+0.90883049658j))*x[0] + ((0.428002997184-0.273625381597j))*x[1]**o + ((0.536020891148-0.321501119381j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.200814050103-0.59582598628j)*(1+2.*(dim-1)/(o+1.)) + ((0.781519744097+0.587329377199j))*dim
            arg[(0, 1, 1, 3)]=(0.0542766819608+0.473510606225j)*x[0]**o + ((0.333075515029-0.337352989899j))*x[0] + ((-0.210046278726-0.819207065672j))*x[1]**o + ((-0.422008088549+0.655906833444j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.155769596765-0.345696459447j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0889325735195+0.318553843545j))*dim
            arg[(1, 0, 0, 0)]=(0.681670712715+0.417622448323j)*x[0]**o + ((0.558016205183-0.495704428097j))*x[0] + ((-0.435901493448-0.907063352107j))*x[1]**o + ((0.769142935945-0.289459567297j))*x[1]
            ref[(1, 0, 0, 0)]=(0.245769219266-0.489440903785j)*(1+2.*(dim-1)/(o+1.)) + ((1.32715914113-0.785163995394j))*dim
            arg[(1, 0, 0, 1)]=(-0.292920468369-0.0414837055561j)*x[0]**o + ((0.448787522747+0.877847552706j))*x[0] + ((-0.235985007518+0.979924907339j))*x[1]**o + ((0.470222835081+0.889378722958j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.528905475886+0.938441201783j)*(1+2.*(dim-1)/(o+1.)) + ((0.919010357827+1.76722627566j))*dim
            arg[(1, 0, 0, 2)]=(-0.0122659294575+0.893613825228j)*x[0]**o + ((0.124110255228+0.664036199003j))*x[0] + ((-0.443606644945-0.497745402651j))*x[1]**o + ((-0.838808402914-0.465764946167j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.455872574402+0.395868422577j)*(1+2.*(dim-1)/(o+1.)) + ((-0.714698147687+0.198271252837j))*dim
            arg[(1, 0, 0, 3)]=(-0.944988838783-0.495896941317j)*x[0]**o + ((-0.145645652176-0.918901743475j))*x[0] + ((0.619099765612-0.574734582106j))*x[1]**o + ((0.344999191058+0.986702852021j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.325889073171-1.07063152342j)*(1+2.*(dim-1)/(o+1.)) + ((0.199353538881+0.0678011085456j))*dim
            arg[(1, 0, 1, 0)]=(-0.967485204989+0.476022988726j)*x[0]**o + ((-0.889740111214-0.844487387506j))*x[0] + ((-0.644560371662+0.00776124396423j))*x[1]**o + ((0.263066619749+0.49749691178j))*x[1]
            ref[(1, 0, 1, 0)]=(-1.61204557665+0.48378423269j)*(1+2.*(dim-1)/(o+1.)) + ((-0.626673491465-0.346990475726j))*dim
            arg[(1, 0, 1, 1)]=(-0.0626354729949+0.0612428354675j)*x[0]**o + ((0.228292283319+0.81979087782j))*x[0] + ((-0.737747470291-0.353775424099j))*x[1]**o + ((-0.794322270679-0.179954676218j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.800382943286-0.292532588631j)*(1+2.*(dim-1)/(o+1.)) + ((-0.56602998736+0.639836201602j))*dim
            arg[(1, 0, 1, 2)]=(-0.909296483177-0.773489279409j)*x[0]**o + ((0.153864225421-0.505634529366j))*x[0] + ((-0.909930699687-0.230929066944j))*x[1]**o + ((-0.0818787102356-0.544785054295j))*x[1]
            ref[(1, 0, 1, 2)]=(-1.81922718286-1.00441834635j)*(1+2.*(dim-1)/(o+1.)) + ((0.0719855151857-1.05041958366j))*dim
            arg[(1, 0, 1, 3)]=(0.566604109804-0.30216072636j)*x[0]**o + ((-0.749360720514+0.24132781816j))*x[0] + ((0.672835581266-0.513723680991j))*x[1]**o + ((0.0863561472091+0.112492624872j))*x[1]
            ref[(1, 0, 1, 3)]=(1.23943969107-0.815884407352j)*(1+2.*(dim-1)/(o+1.)) + ((-0.663004573305+0.353820443032j))*dim
            arg[(1, 1, 0, 0)]=(0.0282153423413-0.833549181318j)*x[0]**o + ((0.872930533757-0.244231352003j))*x[0] + ((-0.303229301277-0.0524961050534j))*x[1]**o + ((-0.0363529509584+0.381598072537j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.275013958936-0.886045286372j)*(1+2.*(dim-1)/(o+1.)) + ((0.836577582799+0.137366720534j))*dim
            arg[(1, 1, 0, 1)]=(-0.728943853111-0.0520959187669j)*x[0]**o + ((-0.0758912302089+0.45221884448j))*x[0] + ((-0.27089248849-0.0317242412393j))*x[1]**o + ((-0.806067953422+0.932692389384j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.999836341601-0.0838201600062j)*(1+2.*(dim-1)/(o+1.)) + ((-0.881959183631+1.38491123386j))*dim
            arg[(1, 1, 0, 2)]=(0.474348921-0.765954317691j)*x[0]**o + ((-0.303163757339+0.745582790406j))*x[0] + ((0.780317661883+0.818160213169j))*x[1]**o + ((-0.961359441139+0.364430055796j))*x[1]
            ref[(1, 1, 0, 2)]=(1.25466658288+0.0522058954784j)*(1+2.*(dim-1)/(o+1.)) + ((-1.26452319848+1.1100128462j))*dim
            arg[(1, 1, 0, 3)]=(-0.597031727621-0.956438779386j)*x[0]**o + ((0.471842584122+0.520458086039j))*x[0] + ((0.58373553266-0.852181791855j))*x[1]**o + ((-0.970642250584+0.717512571067j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.0132961949615-1.80862057124j)*(1+2.*(dim-1)/(o+1.)) + ((-0.498799666462+1.23797065711j))*dim
            arg[(1, 1, 1, 0)]=(-0.604673825667-0.836828461343j)*x[0]**o + ((-0.691964680342-0.985362484199j))*x[0] + ((0.938369307721-0.941664266512j))*x[1]**o + ((0.393917636325+0.495967194154j))*x[1]
            ref[(1, 1, 1, 0)]=(0.333695482054-1.77849272785j)*(1+2.*(dim-1)/(o+1.)) + ((-0.298047044017-0.489395290045j))*dim
            arg[(1, 1, 1, 1)]=(0.598038378507-0.842558727156j)*x[0]**o + ((-0.116027358611+0.840072583155j))*x[0] + ((0.615579002166+0.616181931433j))*x[1]**o + ((0.866894860121+0.688605886364j))*x[1]
            ref[(1, 1, 1, 1)]=(1.21361738067-0.226376795723j)*(1+2.*(dim-1)/(o+1.)) + ((0.750867501509+1.52867846952j))*dim
            arg[(1, 1, 1, 2)]=(0.732398925936-0.0432946758118j)*x[0]**o + ((0.302680453092+0.0121531149415j))*x[0] + ((-0.0187015578083+0.722332327282j))*x[1]**o + ((0.393960887548+0.289675084603j))*x[1]
            ref[(1, 1, 1, 2)]=(0.713697368127+0.67903765147j)*(1+2.*(dim-1)/(o+1.)) + ((0.69664134064+0.301828199545j))*dim
            arg[(1, 1, 1, 3)]=(-0.560227028279-0.57367646381j)*x[0]**o + ((0.51040391783-0.575030436145j))*x[0] + ((-0.935282652795-0.36958071599j))*x[1]**o + ((-0.543600788559-0.243105213607j))*x[1]
            ref[(1, 1, 1, 3)]=(-1.49550968107-0.943257179801j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0331968707293-0.818135649752j))*dim
            arg[(2, 0, 0, 0)]=(-0.693055374164+0.254359688638j)*x[0]**o + ((0.622804702433-0.275799347049j))*x[0] + ((0.593830821818-0.897643491936j))*x[1]**o + ((-0.894294506329-0.928259747223j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.0992245523457-0.643283803298j)*(1+2.*(dim-1)/(o+1.)) + ((-0.271489803896-1.20405909427j))*dim
            arg[(2, 0, 0, 1)]=(0.218051672189+0.927707718226j)*x[0]**o + ((0.545758169848+0.993781586442j))*x[0] + ((-0.795968310401-0.326907565949j))*x[1]**o + ((0.447841662721-0.69205420006j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.577916638213+0.600800152277j)*(1+2.*(dim-1)/(o+1.)) + ((0.993599832569+0.301727386383j))*dim
            arg[(2, 0, 0, 2)]=(0.746861806136-0.987043208498j)*x[0]**o + ((-0.67021748521-0.818332860284j))*x[0] + ((0.769940726935+0.252843978783j))*x[1]**o + ((0.0246533950376-0.452345229862j))*x[1]
            ref[(2, 0, 0, 2)]=(1.51680253307-0.734199229715j)*(1+2.*(dim-1)/(o+1.)) + ((-0.645564090172-1.27067809015j))*dim
            arg[(2, 0, 0, 3)]=(-0.187972791933-0.541265723764j)*x[0]**o + ((-0.29575032088+0.820525045008j))*x[0] + ((-0.839163776934+0.195090572649j))*x[1]**o + ((0.982871340688+0.480942086604j))*x[1]
            ref[(2, 0, 0, 3)]=(-1.02713656887-0.346175151116j)*(1+2.*(dim-1)/(o+1.)) + ((0.687121019808+1.30146713161j))*dim
            arg[(2, 0, 1, 0)]=(-0.63446402755-0.206128458723j)*x[0]**o + ((0.081383448799+0.295254791374j))*x[0] + ((0.381284403239-0.803948997215j))*x[1]**o + ((-0.884947140001-0.578304609172j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.253179624311-1.01007745594j)*(1+2.*(dim-1)/(o+1.)) + ((-0.803563691202-0.283049817798j))*dim
            arg[(2, 0, 1, 1)]=(-0.766776254722-0.0956443853099j)*x[0]**o + ((0.0661350560464+0.302589514247j))*x[0] + ((0.64890522909+0.453211727523j))*x[1]**o + ((-0.614749687476+0.382137610539j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.117871025631+0.357567342213j)*(1+2.*(dim-1)/(o+1.)) + ((-0.54861463143+0.684727124786j))*dim
            arg[(2, 0, 1, 2)]=(-0.924615287352-0.883584265839j)*x[0]**o + ((0.154476802054-0.273934612125j))*x[0] + ((-0.0365835065835-0.978787714265j))*x[1]**o + ((-0.942283427539+0.61414139796j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.961198793935-1.8623719801j)*(1+2.*(dim-1)/(o+1.)) + ((-0.787806625484+0.340206785834j))*dim
            arg[(2, 0, 1, 3)]=(0.947006038123+0.396232049537j)*x[0]**o + ((0.848477466636+0.0698194439973j))*x[0] + ((0.831500779368+0.488425462607j))*x[1]**o + ((-0.918932456804+0.304347369106j))*x[1]
            ref[(2, 0, 1, 3)]=(1.77850681749+0.884657512143j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0704549901678+0.374166813103j))*dim
            arg[(2, 1, 0, 0)]=(-0.834698698937+0.894890228932j)*x[0]**o + ((-0.760964787012-0.493412004828j))*x[0] + ((0.546076795019+0.119521026089j))*x[1]**o + ((0.531262293078+0.0189636806794j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.288621903917+1.01441125502j)*(1+2.*(dim-1)/(o+1.)) + ((-0.229702493934-0.474448324148j))*dim
            arg[(2, 1, 0, 1)]=(0.724423777276+0.820906712522j)*x[0]**o + ((-0.0637882797063-0.531910443239j))*x[0] + ((-0.0302352098948-0.673843945033j))*x[1]**o + ((0.301828271172-0.0311030774616j))*x[1]
            ref[(2, 1, 0, 1)]=(0.694188567381+0.14706276749j)*(1+2.*(dim-1)/(o+1.)) + ((0.238039991466-0.563013520701j))*dim
            arg[(2, 1, 0, 2)]=(0.341124667244-0.0196014621262j)*x[0]**o + ((0.891363169632+0.0816028184065j))*x[0] + ((0.942089743453+0.973591656372j))*x[1]**o + ((-0.200109340332+0.13260525287j))*x[1]
            ref[(2, 1, 0, 2)]=(1.2832144107+0.953990194246j)*(1+2.*(dim-1)/(o+1.)) + ((0.6912538293+0.214208071276j))*dim
            arg[(2, 1, 0, 3)]=(0.569254061092-0.737230941054j)*x[0]**o + ((-0.172331075946+0.588116484553j))*x[0] + ((-0.954560040562-0.111650030293j))*x[1]**o + ((-0.318831257073+0.935892649415j))*x[1]
            ref[(2, 1, 0, 3)]=(-0.38530597947-0.848880971347j)*(1+2.*(dim-1)/(o+1.)) + ((-0.491162333019+1.52400913397j))*dim
            arg[(2, 1, 1, 0)]=(-0.18990683761+0.520502487268j)*x[0]**o + ((-0.0614377385751+0.803922495768j))*x[0] + ((-0.308499067196+0.298303033535j))*x[1]**o + ((-0.0499804927309-0.646681248308j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.498405904805+0.818805520803j)*(1+2.*(dim-1)/(o+1.)) + ((-0.111418231306+0.15724124746j))*dim
            arg[(2, 1, 1, 1)]=(-0.510677658468+0.898327532228j)*x[0]**o + ((0.879704829037-0.276083395925j))*x[0] + ((-0.308974647759-0.373394254324j))*x[1]**o + ((0.10441668442-0.888183621904j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.819652306227+0.524933277904j)*(1+2.*(dim-1)/(o+1.)) + ((0.984121513457-1.16426701783j))*dim
            arg[(2, 1, 1, 2)]=(0.252673949941+0.454397177157j)*x[0]**o + ((0.242828373992+0.828495628897j))*x[0] + ((-0.773926139109+0.794325715852j))*x[1]**o + ((-0.957502717688-0.639695674095j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.521252189168+1.24872289301j)*(1+2.*(dim-1)/(o+1.)) + ((-0.714674343696+0.188799954802j))*dim
            arg[(2, 1, 1, 3)]=(-0.898202652895-0.873056958792j)*x[0]**o + ((-0.982793611384+0.618904129934j))*x[0] + ((0.441610441261+0.611715432537j))*x[1]**o + ((0.85827345153+0.00655628115118j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.456592211634-0.261341526255j)*(1+2.*(dim-1)/(o+1.)) + ((-0.124520159854+0.625460411085j))*dim
        else:
            arg[(0, 0, 0, 0)]=(0.286222089976+0.493823962616j)*x[0]**o + ((-0.141282800026+0.729835199444j))*x[0] + ((-0.766009331426-0.22175570867j))*x[1]**o + ((0.971363495344-0.578667695395j))*x[1] + ((-0.746615237674+0.435496637397j))*x[2]**o + ((-0.474347590152-0.905016315632j))*x[2]
            ref[(0, 0, 0, 0)]=(-1.22640247912+0.707564891343j)*(1+2.*(dim-1)/(o+1.)) + ((0.355733105166-0.753848811583j))*dim
            arg[(0, 0, 0, 1)]=(-0.282244471556+0.768982395586j)*x[0]**o + ((0.0372214068615-0.953795449382j))*x[0] + ((-0.469567120272+0.859441889962j))*x[1]**o + ((0.430590704261+0.781245426313j))*x[1] + ((-0.772641754835-0.484986230676j))*x[2]**o + ((0.333277548921+0.179758424847j))*x[2]
            ref[(0, 0, 0, 1)]=(-1.52445334666+1.14343805487j)*(1+2.*(dim-1)/(o+1.)) + ((0.801089660043+0.00720840177774j))*dim
            arg[(0, 0, 0, 2)]=(0.924991733925-0.478383885438j)*x[0]**o + ((0.0266826865122-0.81934033876j))*x[0] + ((-0.678644754051+0.786843556042j))*x[1]**o + ((0.311427472608-0.971066222381j))*x[1] + ((0.670564910088-0.631568233773j))*x[2]**o + ((0.387355784969+0.640357285203j))*x[2]
            ref[(0, 0, 0, 2)]=(0.916911889962-0.323108563169j)*(1+2.*(dim-1)/(o+1.)) + ((0.72546594409-1.15004927594j))*dim
            arg[(0, 0, 0, 3)]=(0.253881575451-0.645234165281j)*x[0]**o + ((0.773819927906+0.869085393393j))*x[0] + ((0.397543364993+0.0205228016096j))*x[1]**o + ((-0.535690845002+0.806317007503j))*x[1] + ((-0.632720954537-0.238347542546j))*x[2]**o + ((0.401808871614-0.134299052809j))*x[2]
            ref[(0, 0, 0, 3)]=(0.018703985907-0.863058906218j)*(1+2.*(dim-1)/(o+1.)) + ((0.639937954519+1.54110334809j))*dim
            arg[(0, 0, 1, 0)]=(0.199012306762+0.312912686707j)*x[0]**o + ((0.553976678349-0.971232883035j))*x[0] + ((-0.424819616937-0.927575871258j))*x[1]**o + ((-0.691275464563+0.155462464679j))*x[1] + ((-0.156020313345+0.608676154384j))*x[2]**o + ((-0.669745682112+0.828727786785j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.38182762352-0.0059870301671j)*(1+2.*(dim-1)/(o+1.)) + ((-0.807044468325+0.0129573684295j))*dim
            arg[(0, 0, 1, 1)]=(0.887596056237-0.354671686988j)*x[0]**o + ((0.0822374409391-0.176106028119j))*x[0] + ((0.858351271097+0.30997961165j))*x[1]**o + ((0.588127861694-0.136633159976j))*x[1] + ((0.718868791255+0.471763741401j))*x[2]**o + ((-0.376579877809+0.5483337713j))*x[2]
            ref[(0, 0, 1, 1)]=(2.46481611859+0.427071666064j)*(1+2.*(dim-1)/(o+1.)) + ((0.293785424824+0.235594583205j))*dim
            arg[(0, 0, 1, 2)]=(0.128650545776-0.76267319621j)*x[0]**o + ((-0.327334127023-0.84100225384j))*x[0] + ((0.550625339203-0.797465393791j))*x[1]**o + ((0.691439497905+0.775407179412j))*x[1] + ((0.646676107251+0.363660879215j))*x[2]**o + ((0.540317536061+0.603517964242j))*x[2]
            ref[(0, 0, 1, 2)]=(1.32595199223-1.19647771079j)*(1+2.*(dim-1)/(o+1.)) + ((0.904422906944+0.537922889814j))*dim
            arg[(0, 0, 1, 3)]=(0.815500404802+0.524752205457j)*x[0]**o + ((0.170091536565+0.250406492877j))*x[0] + ((-0.766769422753-0.860936515554j))*x[1]**o + ((0.518915896306-0.604068999494j))*x[1] + ((0.325328118145+0.0120877563924j))*x[2]**o + ((-0.0268371782972+0.696765287435j))*x[2]
            ref[(0, 0, 1, 3)]=(0.374059100195-0.324096553704j)*(1+2.*(dim-1)/(o+1.)) + ((0.662170254573+0.343102780818j))*dim
            arg[(0, 1, 0, 0)]=(0.352184601229-0.443461634903j)*x[0]**o + ((-0.505987770797-0.125564211243j))*x[0] + ((-0.417395023712-0.897364525038j))*x[1]**o + ((-0.0991553577233+0.770958899288j))*x[1] + ((-0.0750879081248+0.6836987535j))*x[2]**o + ((-0.45272075836+0.646831865932j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.140298330607-0.657127406441j)*(1+2.*(dim-1)/(o+1.)) + ((-1.05786388688+1.29222655398j))*dim
            arg[(0, 1, 0, 1)]=(-0.776997481275-0.35516767196j)*x[0]**o + ((-0.371570050622-0.334453293618j))*x[0] + ((-0.692306363559-0.768818292946j))*x[1]**o + ((0.0786069482162+0.328394556632j))*x[1] + ((-0.747587613075-0.41169134879j))*x[2]**o + ((0.446612871172-0.516949601936j))*x[2]
            ref[(0, 1, 0, 1)]=(-2.21689145791-1.5356773137j)*(1+2.*(dim-1)/(o+1.)) + ((0.153649768767-0.523008338922j))*dim
            arg[(0, 1, 0, 2)]=(-0.224426470745-0.951860879734j)*x[0]**o + ((0.553249904891+0.264782779207j))*x[0] + ((-0.72759327448-0.759341034078j))*x[1]**o + ((0.713060777689+0.259505284846j))*x[1] + ((0.0239395539404+0.179516283253j))*x[2]**o + ((0.122198080824+0.804025272373j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.928080191285-1.53168563056j)*(1+2.*(dim-1)/(o+1.)) + ((1.3885087634+1.32831333643j))*dim
            arg[(0, 1, 0, 3)]=(0.538047797112-0.849451790305j)*x[0]**o + ((-0.928161086587+0.890423292322j))*x[0] + ((0.698667917453+0.777487774122j))*x[1]**o + ((0.131423374751+0.865957603441j))*x[1] + ((-0.559574501643-0.399529490388j))*x[2]**o + ((-0.730921348478-0.949570170105j))*x[2]
            ref[(0, 1, 0, 3)]=(0.677141212921-0.471493506571j)*(1+2.*(dim-1)/(o+1.)) + ((-1.52765906031+0.806810725659j))*dim
            arg[(0, 1, 1, 0)]=(0.50783436818+0.31654080098j)*x[0]**o + ((-0.0898956938225+0.60476210394j))*x[0] + ((0.333189352435+0.581684106853j))*x[1]**o + ((-0.632470714422-0.0292829556605j))*x[1] + ((0.869647074547+0.810589049533j))*x[2]**o + ((0.327264862207-0.481362809907j))*x[2]
            ref[(0, 1, 1, 0)]=(1.71067079516+1.70881395737j)*(1+2.*(dim-1)/(o+1.)) + ((-0.395101546037+0.094116338372j))*dim
            arg[(0, 1, 1, 1)]=(-0.925961397796+0.858282127027j)*x[0]**o + ((-0.537277426262-0.329614183914j))*x[0] + ((-0.888310158624+0.998475202495j))*x[1]**o + ((0.927050208592+0.210296630661j))*x[1] + ((0.764960044545-0.258588940938j))*x[2]**o + ((0.625925794193-0.185332015837j))*x[2]
            ref[(0, 1, 1, 1)]=(-1.04931151188+1.59816838858j)*(1+2.*(dim-1)/(o+1.)) + ((1.01569857652-0.304649569091j))*dim
            arg[(0, 1, 1, 2)]=(0.81518042805+0.485757384875j)*x[0]**o + ((0.147926732073+0.61906388336j))*x[0] + ((0.273792971611-0.419899104539j))*x[1]**o + ((-0.831231559706-0.948186125336j))*x[1] + ((-0.568908870716+0.0790657669454j))*x[2]**o + ((0.0542675125423+0.879781147789j))*x[2]
            ref[(0, 1, 1, 2)]=(0.520064528945+0.144924047282j)*(1+2.*(dim-1)/(o+1.)) + ((-0.62903731509+0.550658905813j))*dim
            arg[(0, 1, 1, 3)]=(0.685129564485-0.556365824022j)*x[0]**o + ((0.267483211258-0.823652074775j))*x[0] + ((0.192731659872-0.50398984431j))*x[1]**o + ((0.00987439976599+0.19502757384j))*x[1] + ((-0.825480482152+0.604609612254j))*x[2]**o + ((-0.339507674495+0.260677115473j))*x[2]
            ref[(0, 1, 1, 3)]=(0.0523807422057-0.455746056077j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0621500634712-0.367947385462j))*dim
            arg[(1, 0, 0, 0)]=(0.550525540641+0.864147481053j)*x[0]**o + ((0.787776594149-0.657693176092j))*x[0] + ((0.198920322168+0.130236491953j))*x[1]**o + ((-0.752487041381-0.0976167750154j))*x[1] + ((0.190066382202+0.0759470023412j))*x[2]**o + ((0.843702205674-0.768653367967j))*x[2]
            ref[(1, 0, 0, 0)]=(0.93951224501+1.07033097535j)*(1+2.*(dim-1)/(o+1.)) + ((0.878991758442-1.52396331907j))*dim
            arg[(1, 0, 0, 1)]=(0.740486843033-0.765159329834j)*x[0]**o + ((-0.892535536719+0.673637455536j))*x[0] + ((-0.338479187303-0.0332068437265j))*x[1]**o + ((-0.666769311387-0.463547575884j))*x[1] + ((0.140500593565+0.693906415461j))*x[2]**o + ((-0.753687536257-0.476498709797j))*x[2]
            ref[(1, 0, 0, 1)]=(0.542508249296-0.1044597581j)*(1+2.*(dim-1)/(o+1.)) + ((-2.31299238436-0.266408830145j))*dim
            arg[(1, 0, 0, 2)]=(-0.549205286816-0.350114213945j)*x[0]**o + ((-0.476644530709-0.974468461427j))*x[0] + ((-0.424744360424+0.880056538045j))*x[1]**o + ((-0.7655552119-0.291928810913j))*x[1] + ((-0.370230110918-0.720707593508j))*x[2]**o + ((0.911790307396-0.360523989927j))*x[2]
            ref[(1, 0, 0, 2)]=(-1.34417975816-0.190765269408j)*(1+2.*(dim-1)/(o+1.)) + ((-0.330409435213-1.62692126227j))*dim
            arg[(1, 0, 0, 3)]=(-0.848927705858-0.922925546957j)*x[0]**o + ((-0.870698295614+0.301485365612j))*x[0] + ((0.848451958072-0.158713189688j))*x[1]**o + ((-0.755561678493+0.456188344586j))*x[1] + ((0.00477041286382+0.256183290353j))*x[2]**o + ((-0.804885538557+0.899839240303j))*x[2]
            ref[(1, 0, 0, 3)]=(0.00429466507721-0.825455446292j)*(1+2.*(dim-1)/(o+1.)) + ((-2.43114551266+1.6575129505j))*dim
            arg[(1, 0, 1, 0)]=(-0.960052296555-0.180271180288j)*x[0]**o + ((0.475963802706-0.752598223084j))*x[0] + ((-0.204893302041-0.617710379608j))*x[1]**o + ((-0.950771002034-0.476922577848j))*x[1] + ((0.61090806627-0.241629921249j))*x[2]**o + ((0.47529602476+0.646408700579j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.554037532326-1.03961148114j)*(1+2.*(dim-1)/(o+1.)) + ((0.000488825431524-0.583112100353j))*dim
            arg[(1, 0, 1, 1)]=(-0.577102400924+0.653992743058j)*x[0]**o + ((0.518462564763+0.656787058238j))*x[0] + ((-0.597941592248-0.297175871476j))*x[1]**o + ((0.660371390285+0.751953902321j))*x[1] + ((0.638848481621+0.823380433696j))*x[2]**o + ((-0.8366210693-0.913970207096j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.536195511551+1.18019730528j)*(1+2.*(dim-1)/(o+1.)) + ((0.342212885748+0.494770753463j))*dim
            arg[(1, 0, 1, 2)]=(-0.549662728833+0.945312716149j)*x[0]**o + ((-0.198611340705-0.487084855265j))*x[0] + ((-0.106904197807-0.1181062396j))*x[1]**o + ((0.290951764398-0.174703336389j))*x[1] + ((-0.376750599134-0.744167501563j))*x[2]**o + ((0.404128650924-0.922263157628j))*x[2]
            ref[(1, 0, 1, 2)]=(-1.03331752577+0.0830389749855j)*(1+2.*(dim-1)/(o+1.)) + ((0.496469074618-1.58405134928j))*dim
            arg[(1, 0, 1, 3)]=(0.761865258194+0.84836753829j)*x[0]**o + ((-0.626579828119-0.99331907443j))*x[0] + ((0.354620634451-0.58220094599j))*x[1]**o + ((-0.325817118269+0.998688851233j))*x[1] + ((-0.237121449173-0.22229990747j))*x[2]**o + ((0.376562924611+0.709754707855j))*x[2]
            ref[(1, 0, 1, 3)]=(0.879364443472+0.0438666848295j)*(1+2.*(dim-1)/(o+1.)) + ((-0.575834021777+0.715124484658j))*dim
            arg[(1, 1, 0, 0)]=(0.162531243946+0.907619862776j)*x[0]**o + ((-0.975464805835+0.0182302573576j))*x[0] + ((0.910992199401+0.0556124329616j))*x[1]**o + ((-0.490307856245+0.993940275165j))*x[1] + ((0.607296617928+0.635513057845j))*x[2]**o + ((-0.246201120228-0.17460868121j))*x[2]
            ref[(1, 1, 0, 0)]=(1.68082006127+1.59874535358j)*(1+2.*(dim-1)/(o+1.)) + ((-1.71197378231+0.837561851313j))*dim
            arg[(1, 1, 0, 1)]=(-0.896684273166-0.0236022987663j)*x[0]**o + ((0.853694006069+0.65039593071j))*x[0] + ((0.373045581652-0.255746985895j))*x[1]**o + ((0.835349490397-0.5055893191j))*x[1] + ((-0.515620366217+0.786822500713j))*x[2]**o + ((-0.856632443251+0.218049404789j))*x[2]
            ref[(1, 1, 0, 1)]=(-1.03925905773+0.507473216052j)*(1+2.*(dim-1)/(o+1.)) + ((0.832411053215+0.362856016399j))*dim
            arg[(1, 1, 0, 2)]=(-0.182153978532-0.279876723139j)*x[0]**o + ((0.897327645845+0.675932091159j))*x[0] + ((0.564498077729+0.577217536011j))*x[1]**o + ((0.637629374836-0.250783655962j))*x[1] + ((0.951388418832-0.33886787657j))*x[2]**o + ((0.514152874792-0.910733475113j))*x[2]
            ref[(1, 1, 0, 2)]=(1.33373251803-0.0415270636978j)*(1+2.*(dim-1)/(o+1.)) + ((2.04910989547-0.485585039916j))*dim
            arg[(1, 1, 0, 3)]=(0.319919594061-0.351482967084j)*x[0]**o + ((-0.702769691134+0.632291178195j))*x[0] + ((-0.978081522104-0.580990001976j))*x[1]**o + ((-0.683170061734+0.175735928086j))*x[1] + ((0.477854427643+0.672086499462j))*x[2]**o + ((-0.863164853394-0.387382215335j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.180307500401-0.260386469598j)*(1+2.*(dim-1)/(o+1.)) + ((-2.24910460626+0.420644890946j))*dim
            arg[(1, 1, 1, 0)]=(0.0101669027311-0.736831252743j)*x[0]**o + ((-0.802223933892-0.604942240087j))*x[0] + ((-0.3250152895+0.797391032065j))*x[1]**o + ((-0.305974346761+0.236383733019j))*x[1] + ((0.984087108354-0.553342776153j))*x[2]**o + ((0.0730981469733+0.108184430892j))*x[2]
            ref[(1, 1, 1, 0)]=(0.669238721585-0.492782996831j)*(1+2.*(dim-1)/(o+1.)) + ((-1.03510013368-0.260374076176j))*dim
            arg[(1, 1, 1, 1)]=(0.126885917027+0.162755782024j)*x[0]**o + ((-0.99205688045+0.832943634511j))*x[0] + ((0.709131154753-0.718207816097j))*x[1]**o + ((0.00438807727903+0.384080938274j))*x[1] + ((0.022164976052-0.150898963046j))*x[2]**o + ((0.207591452229-0.620213323552j))*x[2]
            ref[(1, 1, 1, 1)]=(0.858182047832-0.70635099712j)*(1+2.*(dim-1)/(o+1.)) + ((-0.780077350942+0.596811249233j))*dim
            arg[(1, 1, 1, 2)]=(-0.472746403499+0.312184418323j)*x[0]**o + ((0.546593145208-0.326794161485j))*x[0] + ((0.592582468506-0.0782875930242j))*x[1]**o + ((0.606369530396-0.355087793502j))*x[1] + ((0.252852589547-0.814560978992j))*x[2]**o + ((-0.624358137015-0.257102767986j))*x[2]
            ref[(1, 1, 1, 2)]=(0.372688654553-0.580664153694j)*(1+2.*(dim-1)/(o+1.)) + ((0.528604538589-0.938984722972j))*dim
            arg[(1, 1, 1, 3)]=(0.630476614471+0.974349557042j)*x[0]**o + ((0.825475199305-0.738482095455j))*x[0] + ((0.658138389199+0.572997476398j))*x[1]**o + ((-0.753335497069-0.915796794556j))*x[1] + ((-0.698470904177-0.0423370885788j))*x[2]**o + ((0.339976826738+0.284110614408j))*x[2]
            ref[(1, 1, 1, 3)]=(0.590144099493+1.50500994486j)*(1+2.*(dim-1)/(o+1.)) + ((0.412116528974-1.3701682756j))*dim
            arg[(2, 0, 0, 0)]=(0.503640435328-0.574811157231j)*x[0]**o + ((-0.239939199993+0.931184327087j))*x[0] + ((0.539893038366+0.849433676843j))*x[1]**o + ((-0.730846084522-0.0539113604834j))*x[1] + ((0.35062112146-0.677058017277j))*x[2]**o + ((0.715901219559+0.751302170883j))*x[2]
            ref[(2, 0, 0, 0)]=(1.39415459515-0.402435497665j)*(1+2.*(dim-1)/(o+1.)) + ((-0.254884064957+1.62857513749j))*dim
            arg[(2, 0, 0, 1)]=(-0.377122251329-0.409749981472j)*x[0]**o + ((0.362440006321+0.628918832177j))*x[0] + ((-0.401820782291-0.0893159223212j))*x[1]**o + ((-0.970215624704-0.49749090855j))*x[1] + ((0.360330057509-0.0719146279182j))*x[2]**o + ((-0.340358610506-0.00204339966283j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.41861297611-0.570980531711j)*(1+2.*(dim-1)/(o+1.)) + ((-0.948134228889+0.129384523964j))*dim
            arg[(2, 0, 0, 2)]=(-0.0822939807753-0.201433723468j)*x[0]**o + ((-0.510147637563+0.955571489834j))*x[0] + ((-0.0510167491149-0.820166551078j))*x[1]**o + ((-0.0841569300518+0.369608986126j))*x[1] + ((0.810441938116+0.814189438856j))*x[2]**o + ((0.459474168725+0.0224184801631j))*x[2]
            ref[(2, 0, 0, 2)]=(0.677131208226-0.20741083569j)*(1+2.*(dim-1)/(o+1.)) + ((-0.13483039889+1.34759895612j))*dim
            arg[(2, 0, 0, 3)]=(0.607721930672-0.110038661072j)*x[0]**o + ((-0.948580095675+0.524436522574j))*x[0] + ((-0.198164734565-0.31905448815j))*x[1]**o + ((-0.216562757581-0.86696175666j))*x[1] + ((-0.0704770440891+0.0981532760309j))*x[2]**o + ((0.810650193655-0.532002214373j))*x[2]
            ref[(2, 0, 0, 3)]=(0.339080152018-0.330939873191j)*(1+2.*(dim-1)/(o+1.)) + ((-0.354492659601-0.874527448458j))*dim
            arg[(2, 0, 1, 0)]=(-0.882726886158+0.949893194863j)*x[0]**o + ((-0.833757857479+0.436847977056j))*x[0] + ((-0.839048723795-0.070131653102j))*x[1]**o + ((-0.752893207389+0.877998886606j))*x[1] + ((0.468105202504+0.854310456534j))*x[2]**o + ((0.798597352321-0.789078017344j))*x[2]
            ref[(2, 0, 1, 0)]=(-1.25367040745+1.7340719983j)*(1+2.*(dim-1)/(o+1.)) + ((-0.788053712548+0.525768846318j))*dim
            arg[(2, 0, 1, 1)]=(-0.301270471984+0.562936868197j)*x[0]**o + ((0.942852786045+0.919242998356j))*x[0] + ((-0.93175484015+0.993524202334j))*x[1]**o + ((-0.505447005187-0.122037907933j))*x[1] + ((-0.282498805169+0.0989389956612j))*x[2]**o + ((-0.583895103842-0.903393993244j))*x[2]
            ref[(2, 0, 1, 1)]=(-1.5155241173+1.65540006619j)*(1+2.*(dim-1)/(o+1.)) + ((-0.146489322984-0.106188902821j))*dim
            arg[(2, 0, 1, 2)]=(0.338546250682+0.188752139512j)*x[0]**o + ((0.7869292092+0.0256469139821j))*x[0] + ((-0.462265761566+0.0752056715741j))*x[1]**o + ((-0.0162031479975+0.352190723773j))*x[1] + ((-0.202864521887-0.428409384308j))*x[2]**o + ((0.806772113602-0.308689411288j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.326584032771-0.164451573222j)*(1+2.*(dim-1)/(o+1.)) + ((1.5774981748+0.0691482264665j))*dim
            arg[(2, 0, 1, 3)]=(0.574684172025+0.932672341759j)*x[0]**o + ((-0.094422106544+0.00534998023936j))*x[0] + ((0.618101640724+0.229525285226j))*x[1]**o + ((-0.981033384437+0.135945918762j))*x[1] + ((0.300573115234+0.413897242224j))*x[2]**o + ((0.651880343928+0.641025883553j))*x[2]
            ref[(2, 0, 1, 3)]=(1.49335892798+1.57609486921j)*(1+2.*(dim-1)/(o+1.)) + ((-0.423575147053+0.782321782555j))*dim
            arg[(2, 1, 0, 0)]=(-0.899738042607-0.97624166167j)*x[0]**o + ((-0.810129543722+0.346336386903j))*x[0] + ((-0.72021860369-0.405938804907j))*x[1]**o + ((-0.323631393375+0.474639983466j))*x[1] + ((-0.864193336628-0.498712641548j))*x[2]**o + ((0.273694573667+0.189473469185j))*x[2]
            ref[(2, 1, 0, 0)]=(-2.48414998292-1.88089310812j)*(1+2.*(dim-1)/(o+1.)) + ((-0.86006636343+1.01044983955j))*dim
            arg[(2, 1, 0, 1)]=(0.416699236226+0.649446169985j)*x[0]**o + ((0.855877210152+0.494819045507j))*x[0] + ((-0.255573665914-0.125937892173j))*x[1]**o + ((-0.982493466257+0.990615773936j))*x[1] + ((-0.445387684873+0.0516753914618j))*x[2]**o + ((0.424034166628+0.65461915277j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.284262114561+0.575183669274j)*(1+2.*(dim-1)/(o+1.)) + ((0.297417910523+2.14005397221j))*dim
            arg[(2, 1, 0, 2)]=(-0.494424158391+0.0114097284486j)*x[0]**o + ((-0.0423513126668-0.821480655667j))*x[0] + ((-0.217266865003-0.775903423947j))*x[1]**o + ((-0.508314689943-0.167470705622j))*x[1] + ((0.643585187722-0.164397884507j))*x[2]**o + ((-0.460849434493+0.0203808186564j))*x[2]
            ref[(2, 1, 0, 2)]=(-0.0681058356715-0.928891580005j)*(1+2.*(dim-1)/(o+1.)) + ((-1.0115154371-0.968570542632j))*dim
            arg[(2, 1, 0, 3)]=(-0.778242682637+0.483901740719j)*x[0]**o + ((0.184217659316+0.516077528939j))*x[0] + ((0.723197729954-0.118411151039j))*x[1]**o + ((-0.805537400949-0.408215799313j))*x[1] + ((-0.22505542712-0.296996944662j))*x[2]**o + ((0.240981402976-0.666679351382j))*x[2]
            ref[(2, 1, 0, 3)]=(-0.280100379804+0.0684936450177j)*(1+2.*(dim-1)/(o+1.)) + ((-0.380338338657-0.558817621756j))*dim
            arg[(2, 1, 1, 0)]=(0.442630519852-0.549751178603j)*x[0]**o + ((-0.133425316244-0.488527011654j))*x[0] + ((0.0912656476252+0.324546489261j))*x[1]**o + ((0.598632026681-0.00941782574478j))*x[1] + ((-0.387870482225+0.668784061089j))*x[2]**o + ((-0.411470066745+0.827616587327j))*x[2]
            ref[(2, 1, 1, 0)]=(0.146025685253+0.443579371747j)*(1+2.*(dim-1)/(o+1.)) + ((0.0537366436932+0.329671749928j))*dim
            arg[(2, 1, 1, 1)]=(0.402518319407+0.512728910385j)*x[0]**o + ((0.788925625998-0.599905932324j))*x[0] + ((0.97579763552+0.953579405988j))*x[1]**o + ((0.397325071453-0.159404729939j))*x[1] + ((0.67244029595-0.651468122076j))*x[2]**o + ((0.056355844144-0.864628139868j))*x[2]
            ref[(2, 1, 1, 1)]=(2.05075625088+0.814840194297j)*(1+2.*(dim-1)/(o+1.)) + ((1.24260654159-1.62393880213j))*dim
            arg[(2, 1, 1, 2)]=(0.207374940863+0.0527003668039j)*x[0]**o + ((0.722422609319+0.934462869964j))*x[0] + ((-0.0398883748409-0.826508546855j))*x[1]**o + ((0.0444101994681+0.716163521489j))*x[1] + ((0.432192244359-0.792223555127j))*x[2]**o + ((-0.861551911615+0.89183294299j))*x[2]
            ref[(2, 1, 1, 2)]=(0.599678810381-1.56603173518j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0947191028271+2.54245933444j))*dim
            arg[(2, 1, 1, 3)]=(0.95091904203+0.567111146443j)*x[0]**o + ((0.713346556896+0.0286680998225j))*x[0] + ((0.931729298666+0.438540425394j))*x[1]**o + ((-0.799876576586-0.744578836417j))*x[1] + ((-0.629104134833-0.310296688553j))*x[2]**o + ((-0.392145068558+0.800254546378j))*x[2]
            ref[(2, 1, 1, 3)]=(1.25354420586+0.695354883284j)*(1+2.*(dim-1)/(o+1.)) + ((-0.478675088247+0.0843438097831j))*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.578944725168+0.0940151932617j)*x[0] + ((-0.953668248491-0.344738683507j))*x[1]
            ref=(-0.374723523324-0.250723490245j)*dim
        else:
            arg=(-0.516804564608-0.244432754635j)*x[0] + ((0.339690794168-0.221844699369j))*x[1] + ((-0.501746257758+0.372366082378j))*x[2]
            ref=(-0.678860028198-0.0939113716255j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.68176068199+0.497398683381j)*x[0] + ((0.388174752527-0.468004136217j))*x[1]
            ref[(0,)]=(1.06993543452+0.0293945471633j)*dim
            arg[(1,)]=(-0.985868991495+0.379657858243j)*x[0] + ((-0.822482810298-0.191060989576j))*x[1]
            ref[(1,)]=(-1.80835180179+0.188596868667j)*dim
            arg[(2,)]=(-0.503063714235+0.991143449572j)*x[0] + ((0.455207405967-0.665354368081j))*x[1]
            ref[(2,)]=(-0.0478563082678+0.325789081491j)*dim
        else:
            arg[(0,)]=(-0.699930209447+0.373909731169j)*x[0] + ((-0.0317368158186-0.125090982246j))*x[1] + ((0.834045164533-0.188980556068j))*x[2]
            ref[(0,)]=(0.102378139267+0.0598381928553j)*dim
            arg[(1,)]=(-0.11503366595-0.747878115931j)*x[0] + ((0.99578578248-0.366124445087j))*x[1] + ((-0.968676914009-0.568266620602j))*x[2]
            ref[(1,)]=(-0.0879247974786-1.68226918162j)*dim
            arg[(2,)]=(-0.118641643344+0.826349289147j)*x[0] + ((0.122292560655-0.192095247966j))*x[1] + ((-0.149212520278+0.88688167147j))*x[2]
            ref[(2,)]=(-0.145561602968+1.52113571265j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.690389780667+0.945745678486j)*x[0] + ((-0.932114938111+0.905342408223j))*x[1]
            ref[(0, 0)]=(-1.62250471878+1.85108808671j)*dim
            arg[(0, 1)]=(0.460745697212-0.608519003267j)*x[0] + ((-0.869149430184+0.867994376262j))*x[1]
            ref[(0, 1)]=(-0.408403732972+0.259475372996j)*dim
            arg[(1, 0)]=(0.36109459744+0.316812373604j)*x[0] + ((0.848079552795-0.171794705223j))*x[1]
            ref[(1, 0)]=(1.20917415024+0.145017668381j)*dim
            arg[(1, 1)]=(-0.78304642476+0.649942053233j)*x[0] + ((0.363193307743+0.194163617849j))*x[1]
            ref[(1, 1)]=(-0.419853117018+0.844105671082j)*dim
        else:
            arg[(0, 0)]=(0.87545327607+0.792019761626j)*x[0] + ((0.242504569941+0.936720761532j))*x[1] + ((0.482941433546-0.307255274248j))*x[2]
            ref[(0, 0)]=(1.60089927956+1.42148524891j)*dim
            arg[(0, 1)]=(0.0162574128615+0.536309246832j)*x[0] + ((0.131494764299-0.607932432708j))*x[1] + ((0.827838265747-0.84029270886j))*x[2]
            ref[(0, 1)]=(0.975590442907-0.911915894736j)*dim
            arg[(1, 0)]=(-0.362525265035-0.246003853346j)*x[0] + ((-0.985908138247+0.891036701355j))*x[1] + ((0.65886775941-0.33338607253j))*x[2]
            ref[(1, 0)]=(-0.689565643872+0.31164677548j)*dim
            arg[(1, 1)]=(0.355049333588-0.39121314642j)*x[0] + ((0.12412362635-0.987356433521j))*x[1] + ((0.778680654281+0.0928894154703j))*x[2]
            ref[(1, 1)]=(1.25785361422-1.28568016447j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2),w)
        ref=numpy.zeros((2, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.923984999551-0.132126676935j)*x[0] + ((-0.748270586733+0.574619318335j))*x[1]
            ref[(0, 0, 0)]=(-1.67225558628+0.4424926414j)*dim
            arg[(0, 0, 1)]=(-0.49246685173+0.412994507373j)*x[0] + ((-0.295948642123-0.930317418431j))*x[1]
            ref[(0, 0, 1)]=(-0.788415493853-0.517322911059j)*dim
            arg[(0, 1, 0)]=(0.00522938524581-0.139380346537j)*x[0] + ((0.218337954962+0.0704126946487j))*x[1]
            ref[(0, 1, 0)]=(0.223567340207-0.0689676518888j)*dim
            arg[(0, 1, 1)]=(-0.0125364941579-0.690086759864j)*x[0] + ((-0.351786793064-0.675827638468j))*x[1]
            ref[(0, 1, 1)]=(-0.364323287222-1.36591439833j)*dim
            arg[(1, 0, 0)]=(0.216843772394+0.129293531296j)*x[0] + ((-0.407914323831-0.24135063142j))*x[1]
            ref[(1, 0, 0)]=(-0.191070551438-0.112057100124j)*dim
            arg[(1, 0, 1)]=(0.327565554962+0.77622767318j)*x[0] + ((0.743426818378+0.365174855233j))*x[1]
            ref[(1, 0, 1)]=(1.07099237334+1.14140252841j)*dim
            arg[(1, 1, 0)]=(-0.503861795376+0.42574411412j)*x[0] + ((-0.885900853779+0.0133462673852j))*x[1]
            ref[(1, 1, 0)]=(-1.38976264916+0.439090381505j)*dim
            arg[(1, 1, 1)]=(0.718862169881+0.833451476186j)*x[0] + ((0.152909710512+0.248607300947j))*x[1]
            ref[(1, 1, 1)]=(0.871771880394+1.08205877713j)*dim
        else:
            arg[(0, 0, 0)]=(-0.649418364354-0.347544119629j)*x[0] + ((0.113401013718-0.202738842465j))*x[1] + ((-0.135044641001-0.330980942589j))*x[2]
            ref[(0, 0, 0)]=(-0.671061991636-0.881263904682j)*dim
            arg[(0, 0, 1)]=(0.872676060658+0.533002933801j)*x[0] + ((-0.357000833183+0.123801770144j))*x[1] + ((-0.564232387854+0.264644846285j))*x[2]
            ref[(0, 0, 1)]=(-0.048557160378+0.92144955023j)*dim
            arg[(0, 1, 0)]=(-0.973814277479+0.290305708689j)*x[0] + ((-0.977388332222-0.210389944332j))*x[1] + ((-0.0377775488412-0.107307850936j))*x[2]
            ref[(0, 1, 0)]=(-1.98898015854-0.0273920865792j)*dim
            arg[(0, 1, 1)]=(-0.823660833548-0.72546252279j)*x[0] + ((0.0498589204242+0.303029162834j))*x[1] + ((0.403294544442-0.377940397418j))*x[2]
            ref[(0, 1, 1)]=(-0.370507368682-0.800373757373j)*dim
            arg[(1, 0, 0)]=(0.852822553246-0.850077709733j)*x[0] + ((0.626133855728+0.751805764242j))*x[1] + ((0.710569856831-0.608180051421j))*x[2]
            ref[(1, 0, 0)]=(2.1895262658-0.706451996913j)*dim
            arg[(1, 0, 1)]=(0.53939981462+0.627380103335j)*x[0] + ((-0.890321055397-0.380047621966j))*x[1] + ((-0.490010740279+0.463006905591j))*x[2]
            ref[(1, 0, 1)]=(-0.840931981056+0.71033938696j)*dim
            arg[(1, 1, 0)]=(-0.998332484668+0.569053303157j)*x[0] + ((0.0934657006562+0.0445731444954j))*x[1] + ((0.347327112614-0.995684255016j))*x[2]
            ref[(1, 1, 0)]=(-0.557539671398-0.382057807363j)*dim
            arg[(1, 1, 1)]=(0.096497269319-0.586180350044j)*x[0] + ((-0.629834289442-0.949496809072j))*x[1] + ((-0.63556225684+0.237406228448j))*x[2]
            ref[(1, 1, 1)]=(-1.16889927696-1.29827093067j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3, 2),w)
        ref=numpy.zeros((3, 2, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.46143680681+0.823922239652j)*x[0] + ((-0.95718642332+0.19752361598j))*x[1]
            ref[(0, 0, 0, 0)]=(-1.41862323013+1.02144585563j)*dim
            arg[(0, 0, 0, 1)]=(0.323181521694-0.722046490093j)*x[0] + ((0.234858901398+0.417366600958j))*x[1]
            ref[(0, 0, 0, 1)]=(0.558040423092-0.304679889135j)*dim
            arg[(0, 0, 1, 0)]=(-0.627371890906+0.319035629801j)*x[0] + ((0.709932191063+0.780650119445j))*x[1]
            ref[(0, 0, 1, 0)]=(0.0825603001569+1.09968574925j)*dim
            arg[(0, 0, 1, 1)]=(-0.201790437079-0.285873846571j)*x[0] + ((-0.132640248218+0.533781706232j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.334430685297+0.247907859661j)*dim
            arg[(0, 0, 2, 0)]=(0.623793292181+0.99621524804j)*x[0] + ((-0.722661526451-0.408090179143j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.0988682342706+0.588125068897j)*dim
            arg[(0, 0, 2, 1)]=(-0.209951118027-0.810300616567j)*x[0] + ((-0.736448445039+0.970043686479j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.946399563066+0.159743069912j)*dim
            arg[(0, 1, 0, 0)]=(-0.681782105944+0.518868212456j)*x[0] + ((-0.34397439921-0.32535277088j))*x[1]
            ref[(0, 1, 0, 0)]=(-1.02575650515+0.193515441575j)*dim
            arg[(0, 1, 0, 1)]=(0.0571529093711-0.203152082097j)*x[0] + ((0.719002135726+0.102810068703j))*x[1]
            ref[(0, 1, 0, 1)]=(0.776155045097-0.100342013394j)*dim
            arg[(0, 1, 1, 0)]=(-0.717305944589+0.181146403388j)*x[0] + ((0.263933779408+0.229751730621j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.453372165181+0.410898134009j)*dim
            arg[(0, 1, 1, 1)]=(-0.679732178265+0.752967508061j)*x[0] + ((0.986254000242-0.128852721493j))*x[1]
            ref[(0, 1, 1, 1)]=(0.306521821976+0.624114786568j)*dim
            arg[(0, 1, 2, 0)]=(-0.116379529025-0.179930199986j)*x[0] + ((-0.72574086509+0.0508011710068j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.842120394115-0.12912902898j)*dim
            arg[(0, 1, 2, 1)]=(-0.325974782345+0.0083334405098j)*x[0] + ((0.538919210436-0.0174858624955j))*x[1]
            ref[(0, 1, 2, 1)]=(0.212944428091-0.00915242198568j)*dim
            arg[(1, 0, 0, 0)]=(-0.00506274059389-0.840786218348j)*x[0] + ((0.629087493587+0.400791980642j))*x[1]
            ref[(1, 0, 0, 0)]=(0.624024752993-0.439994237706j)*dim
            arg[(1, 0, 0, 1)]=(0.999554794581+0.662468767403j)*x[0] + ((-0.492343103045+0.942778883428j))*x[1]
            ref[(1, 0, 0, 1)]=(0.507211691536+1.60524765083j)*dim
            arg[(1, 0, 1, 0)]=(-0.841367670725+0.678231004776j)*x[0] + ((0.0605037374174+0.100629302542j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.780863933308+0.778860307318j)*dim
            arg[(1, 0, 1, 1)]=(-0.936283093812-0.338628876491j)*x[0] + ((-0.971911706134-0.650931569627j))*x[1]
            ref[(1, 0, 1, 1)]=(-1.90819479995-0.989560446118j)*dim
            arg[(1, 0, 2, 0)]=(0.724060645223-0.106458084377j)*x[0] + ((-0.419734015402+0.829972815136j))*x[1]
            ref[(1, 0, 2, 0)]=(0.304326629821+0.723514730759j)*dim
            arg[(1, 0, 2, 1)]=(-0.910504818276+0.352364983428j)*x[0] + ((-0.141586780812+0.50828413849j))*x[1]
            ref[(1, 0, 2, 1)]=(-1.05209159909+0.860649121917j)*dim
            arg[(1, 1, 0, 0)]=(0.435057057613+0.21920447648j)*x[0] + ((0.972555763172+0.501977036123j))*x[1]
            ref[(1, 1, 0, 0)]=(1.40761282078+0.721181512602j)*dim
            arg[(1, 1, 0, 1)]=(0.301447200836-0.137483939953j)*x[0] + ((0.162576719501-0.772485511601j))*x[1]
            ref[(1, 1, 0, 1)]=(0.464023920337-0.909969451554j)*dim
            arg[(1, 1, 1, 0)]=(0.236953923475+0.309602158905j)*x[0] + ((0.501689073343-0.501389928728j))*x[1]
            ref[(1, 1, 1, 0)]=(0.738642996817-0.191787769823j)*dim
            arg[(1, 1, 1, 1)]=(0.626861216566-0.18749788779j)*x[0] + ((-0.958805123999+0.108628908086j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.331943907433-0.0788689797045j)*dim
            arg[(1, 1, 2, 0)]=(0.884636179627-0.28951954922j)*x[0] + ((-0.37106483006+0.497883677215j))*x[1]
            ref[(1, 1, 2, 0)]=(0.513571349567+0.208364127995j)*dim
            arg[(1, 1, 2, 1)]=(0.942221025311+0.929329399593j)*x[0] + ((0.40158667333+0.714966188261j))*x[1]
            ref[(1, 1, 2, 1)]=(1.34380769864+1.64429558785j)*dim
            arg[(2, 0, 0, 0)]=(0.470277980524+0.464085804246j)*x[0] + ((-0.0879231267912-0.495301712753j))*x[1]
            ref[(2, 0, 0, 0)]=(0.382354853732-0.0312159085068j)*dim
            arg[(2, 0, 0, 1)]=(-0.312554794594+0.844399958243j)*x[0] + ((0.0925704238441-0.875440938764j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.21998437075-0.0310409805211j)*dim
            arg[(2, 0, 1, 0)]=(-0.18573395695-0.672499432164j)*x[0] + ((0.797239880425+0.864692647421j))*x[1]
            ref[(2, 0, 1, 0)]=(0.611505923476+0.192193215256j)*dim
            arg[(2, 0, 1, 1)]=(0.927889962757+0.251719567706j)*x[0] + ((-0.793590896172-0.0751398857978j))*x[1]
            ref[(2, 0, 1, 1)]=(0.134299066586+0.176579681908j)*dim
            arg[(2, 0, 2, 0)]=(-0.580642427642-0.677897525146j)*x[0] + ((-0.390426989694-0.819868075455j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.971069417336-1.4977656006j)*dim
            arg[(2, 0, 2, 1)]=(0.966920981722+0.791158614029j)*x[0] + ((-0.41281867533-0.845974371881j))*x[1]
            ref[(2, 0, 2, 1)]=(0.554102306392-0.0548157578514j)*dim
            arg[(2, 1, 0, 0)]=(0.390006774846+0.156861889173j)*x[0] + ((0.0113494763298+0.320223241258j))*x[1]
            ref[(2, 1, 0, 0)]=(0.401356251175+0.477085130432j)*dim
            arg[(2, 1, 0, 1)]=(0.394651114876-0.744728192477j)*x[0] + ((-0.722550938785-0.682745012447j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.327899823908-1.42747320492j)*dim
            arg[(2, 1, 1, 0)]=(0.899868245466-0.456700287836j)*x[0] + ((0.0206293920636+0.216667822757j))*x[1]
            ref[(2, 1, 1, 0)]=(0.92049763753-0.240032465079j)*dim
            arg[(2, 1, 1, 1)]=(0.0118832317143+0.302501165729j)*x[0] + ((0.816858162405+0.346448624903j))*x[1]
            ref[(2, 1, 1, 1)]=(0.828741394119+0.648949790632j)*dim
            arg[(2, 1, 2, 0)]=(-0.297247787059+0.975352709687j)*x[0] + ((-0.0508746582885+0.687894121409j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.348122445347+1.6632468311j)*dim
            arg[(2, 1, 2, 1)]=(0.542268587709+0.780580287863j)*x[0] + ((0.643225447727-0.818520097006j))*x[1]
            ref[(2, 1, 2, 1)]=(1.18549403544-0.0379398091428j)*dim
        else:
            arg[(0, 0, 0, 0)]=(-0.693016857859+0.0212352533487j)*x[0] + ((-0.0744831249049+0.257550030009j))*x[1] + ((-0.536945351769+0.95684391623j))*x[2]
            ref[(0, 0, 0, 0)]=(-1.30444533453+1.23562919959j)*dim
            arg[(0, 0, 0, 1)]=(-0.423634635787-0.458655802043j)*x[0] + ((-0.845635676733+0.354586507336j))*x[1] + ((-0.279792276102+0.0798608608077j))*x[2]
            ref[(0, 0, 0, 1)]=(-1.54906258862-0.0242084338991j)*dim
            arg[(0, 0, 1, 0)]=(-0.617798107409+0.709213359115j)*x[0] + ((-0.349711393563+0.885117418662j))*x[1] + ((0.142385630265-0.880816680411j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.825123870706+0.713514097366j)*dim
            arg[(0, 0, 1, 1)]=(-0.335528659519+0.792691609191j)*x[0] + ((-0.324136355845+0.277944465684j))*x[1] + ((-0.724604712752-0.54299714203j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.38426972811+0.527638932845j)*dim
            arg[(0, 0, 2, 0)]=(-0.0716136115539-0.751695405094j)*x[0] + ((0.344288444514+0.952282817188j))*x[1] + ((0.612778260631-0.236381994281j))*x[2]
            ref[(0, 0, 2, 0)]=(0.885453093591-0.0357945821868j)*dim
            arg[(0, 0, 2, 1)]=(-0.544119179944+0.584273688493j)*x[0] + ((0.198078618138-0.351483645984j))*x[1] + ((0.608975052285+0.315573855525j))*x[2]
            ref[(0, 0, 2, 1)]=(0.26293449048+0.548363898034j)*dim
            arg[(0, 1, 0, 0)]=(-0.919255616249-0.0685542688492j)*x[0] + ((0.477902949795-0.354395028079j))*x[1] + ((-0.574470501888+0.798019549134j))*x[2]
            ref[(0, 1, 0, 0)]=(-1.01582316834+0.375070252206j)*dim
            arg[(0, 1, 0, 1)]=(0.387954976311-0.573492817974j)*x[0] + ((-0.404254845884-0.593912608231j))*x[1] + ((-0.659691401005-0.0139270906414j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.675991270579-1.18133251685j)*dim
            arg[(0, 1, 1, 0)]=(0.013197029285+0.933972692805j)*x[0] + ((0.75120416788+0.318720786808j))*x[1] + ((0.214122067848-0.111051539342j))*x[2]
            ref[(0, 1, 1, 0)]=(0.978523265013+1.14164194027j)*dim
            arg[(0, 1, 1, 1)]=(0.657701695521+0.322007902815j)*x[0] + ((0.991244758546-0.828913997605j))*x[1] + ((0.480567672141+0.924024837294j))*x[2]
            ref[(0, 1, 1, 1)]=(2.12951412621+0.417118742504j)*dim
            arg[(0, 1, 2, 0)]=(-0.59899467024+0.253418243976j)*x[0] + ((-0.837976631353+0.348117294577j))*x[1] + ((0.765123560686-0.234125682142j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.671847740907+0.367409856411j)*dim
            arg[(0, 1, 2, 1)]=(0.09312608539-0.17944758265j)*x[0] + ((-0.872442118285-0.354562901702j))*x[1] + ((-0.0932431400335-0.60350814282j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.872559172928-1.13751862717j)*dim
            arg[(1, 0, 0, 0)]=(-0.48629150962-0.678860859079j)*x[0] + ((0.889474759341-0.356622797801j))*x[1] + ((0.0418959766324+0.986498954967j))*x[2]
            ref[(1, 0, 0, 0)]=(0.445079226352-0.0489847019134j)*dim
            arg[(1, 0, 0, 1)]=(0.390717667825+0.877341439975j)*x[0] + ((-0.420256178334-0.0831711199894j))*x[1] + ((-0.364452817029+0.971439976841j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.393991327538+1.76561029683j)*dim
            arg[(1, 0, 1, 0)]=(0.443946510239-0.0892749816837j)*x[0] + ((-0.621456806513-0.61184562454j))*x[1] + ((0.381360413437+0.821836921025j))*x[2]
            ref[(1, 0, 1, 0)]=(0.203850117163+0.120716314801j)*dim
            arg[(1, 0, 1, 1)]=(-0.691363082558+0.833866249266j)*x[0] + ((-0.914475901968+0.0418888076043j))*x[1] + ((0.765433221963-0.623478165073j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.840405762563+0.252276891797j)*dim
            arg[(1, 0, 2, 0)]=(0.667996139784+0.853560078837j)*x[0] + ((0.321294329104+0.253769622472j))*x[1] + ((0.321456995968+0.234451433745j))*x[2]
            ref[(1, 0, 2, 0)]=(1.31074746486+1.34178113506j)*dim
            arg[(1, 0, 2, 1)]=(0.592213625379+0.867552750596j)*x[0] + ((0.598930103649+0.879360555666j))*x[1] + ((-0.741251011069+0.897680507427j))*x[2]
            ref[(1, 0, 2, 1)]=(0.449892717959+2.64459381369j)*dim
            arg[(1, 1, 0, 0)]=(0.915121137669-0.131705543212j)*x[0] + ((0.347144757917+0.722638043831j))*x[1] + ((-0.894089612481+0.215182406372j))*x[2]
            ref[(1, 1, 0, 0)]=(0.368176283105+0.806114906991j)*dim
            arg[(1, 1, 0, 1)]=(-0.89670239911+0.901315904095j)*x[0] + ((-0.338889271728+0.638914938112j))*x[1] + ((-0.615186819634+0.682465943622j))*x[2]
            ref[(1, 1, 0, 1)]=(-1.85077849047+2.22269678583j)*dim
            arg[(1, 1, 1, 0)]=(0.955118355845-0.94704356137j)*x[0] + ((0.615398014322-0.726379076411j))*x[1] + ((-0.239248754324-0.439715145527j))*x[2]
            ref[(1, 1, 1, 0)]=(1.33126761584-2.11313778331j)*dim
            arg[(1, 1, 1, 1)]=(-0.266371456736+0.322002862919j)*x[0] + ((-0.340947674645-0.0166883055072j))*x[1] + ((0.378401864577-0.517519956987j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.228917266804-0.212205399574j)*dim
            arg[(1, 1, 2, 0)]=(0.837639960921+0.205285267471j)*x[0] + ((0.438325695197-0.817949719916j))*x[1] + ((0.421455078088-0.760120029554j))*x[2]
            ref[(1, 1, 2, 0)]=(1.69742073421-1.372784482j)*dim
            arg[(1, 1, 2, 1)]=(0.611111389458-0.18606570241j)*x[0] + ((0.125772530039+0.408325722263j))*x[1] + ((-0.582495160796+0.367746263365j))*x[2]
            ref[(1, 1, 2, 1)]=(0.154388758701+0.590006283218j)*dim
            arg[(2, 0, 0, 0)]=(-0.60808413404+0.30757477089j)*x[0] + ((-0.409764086851-0.280076836322j))*x[1] + ((-0.767403046423-0.849115361277j))*x[2]
            ref[(2, 0, 0, 0)]=(-1.78525126731-0.821617426709j)*dim
            arg[(2, 0, 0, 1)]=(-0.926346865797+0.397555369785j)*x[0] + ((0.187675001149+0.207482051092j))*x[1] + ((-0.619987247654-0.404307387726j))*x[2]
            ref[(2, 0, 0, 1)]=(-1.3586591123+0.200730033151j)*dim
            arg[(2, 0, 1, 0)]=(0.607440419153+0.00483779557526j)*x[0] + ((0.818674277587+0.309102435351j))*x[1] + ((-0.8854320525+0.00291770812854j))*x[2]
            ref[(2, 0, 1, 0)]=(0.540682644239+0.316857939055j)*dim
            arg[(2, 0, 1, 1)]=(0.788537799703+0.595776133597j)*x[0] + ((0.18973651488+0.49771600898j))*x[1] + ((0.415092151908-0.136610311584j))*x[2]
            ref[(2, 0, 1, 1)]=(1.39336646649+0.956881830993j)*dim
            arg[(2, 0, 2, 0)]=(0.387422129417-0.0860223092867j)*x[0] + ((0.296090311014+0.915199610667j))*x[1] + ((0.0152837047697+0.240003302929j))*x[2]
            ref[(2, 0, 2, 0)]=(0.698796145201+1.06918060431j)*dim
            arg[(2, 0, 2, 1)]=(0.19217171758+0.700367990375j)*x[0] + ((-0.911331609968+0.414365095993j))*x[1] + ((-0.935310430888+0.131731998439j))*x[2]
            ref[(2, 0, 2, 1)]=(-1.65447032328+1.24646508481j)*dim
            arg[(2, 1, 0, 0)]=(0.967182479298-0.233653651941j)*x[0] + ((0.476650838415-0.307978472758j))*x[1] + ((-0.00838252068063+0.227366902344j))*x[2]
            ref[(2, 1, 0, 0)]=(1.43545079703-0.314265222354j)*dim
            arg[(2, 1, 0, 1)]=(0.657290248102+0.530961789447j)*x[0] + ((0.7880592016-0.208938375863j))*x[1] + ((-0.626183624941-0.854579882636j))*x[2]
            ref[(2, 1, 0, 1)]=(0.819165824762-0.532556469051j)*dim
            arg[(2, 1, 1, 0)]=(0.246968445671+0.507692919653j)*x[0] + ((0.153089170206-0.242149319954j))*x[1] + ((0.0175544982696+0.211326086859j))*x[2]
            ref[(2, 1, 1, 0)]=(0.417612114146+0.476869686558j)*dim
            arg[(2, 1, 1, 1)]=(-0.438572001334-0.580788822232j)*x[0] + ((0.308658007741+0.0317837910766j))*x[1] + ((-0.567270293265-0.284613651539j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.697184286858-0.833618682694j)*dim
            arg[(2, 1, 2, 0)]=(-0.661993639131-0.195732070993j)*x[0] + ((-0.900664622495+0.889314153999j))*x[1] + ((-0.870649034286+0.336513218869j))*x[2]
            ref[(2, 1, 2, 0)]=(-2.43330729591+1.03009530187j)*dim
            arg[(2, 1, 2, 1)]=(0.964946667697+0.243300755797j)*x[0] + ((0.995517307347+0.284916671701j))*x[1] + ((0.611847631349-0.0640691904754j))*x[2]
            ref[(2, 1, 2, 1)]=(2.57231160639+0.464148237023j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.314787471041+0.271771607506j)*x[0] + ((0.862493944504-0.464119840854j))*x[1]
            ref=(1.17728141555-0.192348233347j)*dim
        else:
            arg=(-0.859292250282+0.710154006784j)*x[0] + ((0.0846666051833+0.750814063654j))*x[1] + ((0.862073658638-0.377983128429j))*x[2]
            ref=(0.0874480135389+1.08298494201j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.00530291051299+0.183591621954j)*x[0] + ((0.303814307537-0.312541741174j))*x[1]
            ref[(0,)]=(0.30911721805-0.12895011922j)*dim
            arg[(1,)]=(-0.268325413476+0.766034087881j)*x[0] + ((0.865783178937+0.151635158999j))*x[1]
            ref[(1,)]=(0.59745776546+0.917669246881j)*dim
        else:
            arg[(0,)]=(-0.168962976142-0.394886153255j)*x[0] + ((0.312088172326+0.809272208543j))*x[1] + ((-0.475024150935-0.0981367452667j))*x[2]
            ref[(0,)]=(-0.331898954751+0.316249310022j)*dim
            arg[(1,)]=(0.967949115462+0.0509695264282j)*x[0] + ((-0.604371938349-0.126757015163j))*x[1] + ((-0.464204695083-0.704167611149j))*x[2]
            ref[(1,)]=(-0.100627517969-0.779955099883j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.503996537715-0.0513856494263j)*x[0] + ((0.411016616739-0.0697023298935j))*x[1]
            ref[(0, 0)]=(-0.0929799209752-0.12108797932j)*dim
            arg[(0, 1)]=(0.220538471463-0.589523397736j)*x[0] + ((0.242528155729-0.795040162023j))*x[1]
            ref[(0, 1)]=(0.463066627192-1.38456355976j)*dim
            arg[(1, 0)]=(0.235278496762-0.604051746677j)*x[0] + ((0.877999318256+0.0459510574328j))*x[1]
            ref[(1, 0)]=(1.11327781502-0.558100689244j)*dim
            arg[(1, 1)]=(0.744037469906-0.304734222397j)*x[0] + ((0.237229986766-0.0696123820739j))*x[1]
            ref[(1, 1)]=(0.981267456672-0.37434660447j)*dim
            arg[(2, 0)]=(0.322938350142+0.737498127266j)*x[0] + ((0.800835362507+0.106716457562j))*x[1]
            ref[(2, 0)]=(1.12377371265+0.844214584828j)*dim
            arg[(2, 1)]=(-0.0619707341533-0.967142805771j)*x[0] + ((0.861499270589+0.788845786587j))*x[1]
            ref[(2, 1)]=(0.799528536436-0.178297019183j)*dim
            arg[(3, 0)]=(-0.176238540478+0.446870495167j)*x[0] + ((-0.177739232093-0.860887122975j))*x[1]
            ref[(3, 0)]=(-0.353977772571-0.414016627807j)*dim
            arg[(3, 1)]=(-0.391275882472+0.337676346121j)*x[0] + ((0.765159372133-0.378746282426j))*x[1]
            ref[(3, 1)]=(0.373883489661-0.0410699363053j)*dim
        else:
            arg[(0, 0)]=(0.924662856068-0.69607677628j)*x[0] + ((-0.665559751793-0.694378201155j))*x[1] + ((-0.964061195769-0.383304973707j))*x[2]
            ref[(0, 0)]=(-0.704958091494-1.77375995114j)*dim
            arg[(0, 1)]=(-0.645240376621-0.856121427515j)*x[0] + ((0.208225920697-0.221135179532j))*x[1] + ((-0.418180952801+0.593099467357j))*x[2]
            ref[(0, 1)]=(-0.855195408725-0.48415713969j)*dim
            arg[(1, 0)]=(0.727176747845+0.175124272998j)*x[0] + ((0.490981077467+0.102085836168j))*x[1] + ((-0.00502985960742+0.0198206877039j))*x[2]
            ref[(1, 0)]=(1.2131279657+0.297030796871j)*dim
            arg[(1, 1)]=(-0.906940080002-0.21476665513j)*x[0] + ((0.228258063933+0.272866017105j))*x[1] + ((0.573966804845-0.0713498809127j))*x[2]
            ref[(1, 1)]=(-0.104715211225-0.0132505189381j)*dim
            arg[(2, 0)]=(0.291121422204-0.218485557202j)*x[0] + ((0.706530733299+0.803541614052j))*x[1] + ((0.433172370511-0.067725544182j))*x[2]
            ref[(2, 0)]=(1.43082452601+0.517330512668j)*dim
            arg[(2, 1)]=(0.66383993833-0.894059700375j)*x[0] + ((-0.340430747423+0.0373126730983j))*x[1] + ((0.593943020736+0.851149677978j))*x[2]
            ref[(2, 1)]=(0.917352211643-0.00559734929883j)*dim
            arg[(3, 0)]=(0.458314746041-0.734834094425j)*x[0] + ((0.137259014255-0.787614499309j))*x[1] + ((-0.965597651485-0.180833924218j))*x[2]
            ref[(3, 0)]=(-0.370023891189-1.70328251795j)*dim
            arg[(3, 1)]=(-0.265816620991+0.233182613761j)*x[0] + ((0.477508321043-0.503549250609j))*x[1] + ((0.333250103063+0.330902885278j))*x[2]
            ref[(3, 1)]=(0.544941803116+0.0605362484298j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3),w)
        ref=numpy.zeros((4, 4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.937544380387-0.86233925318j)*x[0] + ((0.784516514784-0.345865646676j))*x[1]
            ref[(0, 0, 0)]=(-0.153027865603-1.20820489986j)*dim
            arg[(0, 0, 1)]=(0.499214719945-0.659747089733j)*x[0] + ((-0.0546768371245+0.75284032699j))*x[1]
            ref[(0, 0, 1)]=(0.444537882821+0.0930932372571j)*dim
            arg[(0, 0, 2)]=(-0.032251329677+0.169620096114j)*x[0] + ((0.728291206514-0.844097380933j))*x[1]
            ref[(0, 0, 2)]=(0.696039876837-0.674477284819j)*dim
            arg[(0, 1, 0)]=(-0.817739554572+0.967298326823j)*x[0] + ((0.674704760289+0.245546858332j))*x[1]
            ref[(0, 1, 0)]=(-0.143034794284+1.21284518515j)*dim
            arg[(0, 1, 1)]=(0.342031682144+0.590685374393j)*x[0] + ((0.420931900515-0.174588749959j))*x[1]
            ref[(0, 1, 1)]=(0.762963582659+0.416096624434j)*dim
            arg[(0, 1, 2)]=(-0.961507082628-0.750017905693j)*x[0] + ((0.49348564413-0.725460174685j))*x[1]
            ref[(0, 1, 2)]=(-0.468021438498-1.47547808038j)*dim
            arg[(0, 2, 0)]=(-0.307973558007-0.812153637742j)*x[0] + ((0.934835847737+0.749953505574j))*x[1]
            ref[(0, 2, 0)]=(0.62686228973-0.0622001321685j)*dim
            arg[(0, 2, 1)]=(-0.292354009044-0.159689420451j)*x[0] + ((-0.50823574622-0.350960947483j))*x[1]
            ref[(0, 2, 1)]=(-0.800589755264-0.510650367934j)*dim
            arg[(0, 2, 2)]=(0.555511799119+0.589686667591j)*x[0] + ((0.899946003745+0.377619230286j))*x[1]
            ref[(0, 2, 2)]=(1.45545780286+0.967305897877j)*dim
            arg[(0, 3, 0)]=(0.303784815186-0.479259774877j)*x[0] + ((0.0919697600611+0.191594829436j))*x[1]
            ref[(0, 3, 0)]=(0.395754575247-0.287664945442j)*dim
            arg[(0, 3, 1)]=(0.961653916153+0.506356884507j)*x[0] + ((0.177078561118-0.0545957330963j))*x[1]
            ref[(0, 3, 1)]=(1.13873247727+0.45176115141j)*dim
            arg[(0, 3, 2)]=(0.956113503922-0.430828019663j)*x[0] + ((-0.264441435191-0.261068834499j))*x[1]
            ref[(0, 3, 2)]=(0.691672068731-0.691896854162j)*dim
            arg[(1, 0, 0)]=(0.274656143679-0.555373664288j)*x[0] + ((-0.756262318959+0.471178665568j))*x[1]
            ref[(1, 0, 0)]=(-0.48160617528-0.0841949987204j)*dim
            arg[(1, 0, 1)]=(0.923191724588+0.806059285112j)*x[0] + ((-0.973329207126-0.780104629394j))*x[1]
            ref[(1, 0, 1)]=(-0.0501374825389+0.025954655718j)*dim
            arg[(1, 0, 2)]=(0.470628194067-0.63928338631j)*x[0] + ((0.500715599229-0.318000043058j))*x[1]
            ref[(1, 0, 2)]=(0.971343793296-0.957283429368j)*dim
            arg[(1, 1, 0)]=(0.883340378744+0.96717820952j)*x[0] + ((-0.889347848417+0.112787266316j))*x[1]
            ref[(1, 1, 0)]=(-0.00600746967342+1.07996547584j)*dim
            arg[(1, 1, 1)]=(-0.769289787467-0.392643946453j)*x[0] + ((0.297652391017-0.947043044844j))*x[1]
            ref[(1, 1, 1)]=(-0.47163739645-1.3396869913j)*dim
            arg[(1, 1, 2)]=(0.241749871083-0.405303824286j)*x[0] + ((-0.82110560556-0.66761592372j))*x[1]
            ref[(1, 1, 2)]=(-0.579355734477-1.07291974801j)*dim
            arg[(1, 2, 0)]=(-0.970207446352+0.942046751555j)*x[0] + ((-0.814191152524-0.216055048368j))*x[1]
            ref[(1, 2, 0)]=(-1.78439859888+0.725991703186j)*dim
            arg[(1, 2, 1)]=(0.516511073263+0.66273623837j)*x[0] + ((-0.827497484948+0.388741488917j))*x[1]
            ref[(1, 2, 1)]=(-0.310986411685+1.05147772729j)*dim
            arg[(1, 2, 2)]=(0.353462732662-0.922690928763j)*x[0] + ((0.415701230538-0.892205021479j))*x[1]
            ref[(1, 2, 2)]=(0.7691639632-1.81489595024j)*dim
            arg[(1, 3, 0)]=(-0.43541861578+0.828114912615j)*x[0] + ((-0.967824768493+0.0686378462026j))*x[1]
            ref[(1, 3, 0)]=(-1.40324338427+0.896752758817j)*dim
            arg[(1, 3, 1)]=(-0.447958765119+0.560193114032j)*x[0] + ((0.167524513157+0.998826912941j))*x[1]
            ref[(1, 3, 1)]=(-0.280434251962+1.55902002697j)*dim
            arg[(1, 3, 2)]=(0.373398398832+0.833944727617j)*x[0] + ((0.795935257307+0.448449967467j))*x[1]
            ref[(1, 3, 2)]=(1.16933365614+1.28239469508j)*dim
            arg[(2, 0, 0)]=(-0.93579062241-0.159379861108j)*x[0] + ((0.299207557078+0.647627880707j))*x[1]
            ref[(2, 0, 0)]=(-0.636583065332+0.488248019599j)*dim
            arg[(2, 0, 1)]=(0.699734202036-0.550924943599j)*x[0] + ((0.701540194046+0.341508987442j))*x[1]
            ref[(2, 0, 1)]=(1.40127439608-0.209415956157j)*dim
            arg[(2, 0, 2)]=(-0.289639452981+0.396517823638j)*x[0] + ((-0.467868967039+0.139408544897j))*x[1]
            ref[(2, 0, 2)]=(-0.75750842002+0.535926368535j)*dim
            arg[(2, 1, 0)]=(0.960566650777-0.657741610753j)*x[0] + ((0.801208042209+0.431762452553j))*x[1]
            ref[(2, 1, 0)]=(1.76177469299-0.225979158199j)*dim
            arg[(2, 1, 1)]=(-0.818965997221-0.574222939589j)*x[0] + ((-0.746980689565+0.88584664142j))*x[1]
            ref[(2, 1, 1)]=(-1.56594668679+0.311623701831j)*dim
            arg[(2, 1, 2)]=(0.544564017066-0.249334782623j)*x[0] + ((-0.691966156246+0.732835849051j))*x[1]
            ref[(2, 1, 2)]=(-0.14740213918+0.483501066427j)*dim
            arg[(2, 2, 0)]=(-0.00570929293658+0.968002443117j)*x[0] + ((-0.665710631171-0.987482675958j))*x[1]
            ref[(2, 2, 0)]=(-0.671419924107-0.019480232841j)*dim
            arg[(2, 2, 1)]=(0.894252657077+0.922216219546j)*x[0] + ((0.349377251393-0.240430379366j))*x[1]
            ref[(2, 2, 1)]=(1.24362990847+0.68178584018j)*dim
            arg[(2, 2, 2)]=(-0.405640794878-0.0534643695444j)*x[0] + ((0.308910636571+0.993589062094j))*x[1]
            ref[(2, 2, 2)]=(-0.0967301583068+0.94012469255j)*dim
            arg[(2, 3, 0)]=(0.499746997682+0.68508073984j)*x[0] + ((0.281148568126-0.174557260426j))*x[1]
            ref[(2, 3, 0)]=(0.780895565808+0.510523479415j)*dim
            arg[(2, 3, 1)]=(0.633236411916-0.454586607753j)*x[0] + ((-0.634336517159-0.302749684751j))*x[1]
            ref[(2, 3, 1)]=(-0.00110010524297-0.757336292504j)*dim
            arg[(2, 3, 2)]=(-0.111374616685+0.0411493669145j)*x[0] + ((0.343120408169+0.604213769748j))*x[1]
            ref[(2, 3, 2)]=(0.231745791484+0.645363136663j)*dim
            arg[(3, 0, 0)]=(0.509341767007-0.315463574421j)*x[0] + ((-0.95178753915+0.831788494256j))*x[1]
            ref[(3, 0, 0)]=(-0.442445772144+0.516324919835j)*dim
            arg[(3, 0, 1)]=(-0.183103233579-0.41228988751j)*x[0] + ((-0.893731895044+0.997069047623j))*x[1]
            ref[(3, 0, 1)]=(-1.07683512862+0.584779160113j)*dim
            arg[(3, 0, 2)]=(0.749569012717-0.602261551185j)*x[0] + ((0.697068792986-0.450181310252j))*x[1]
            ref[(3, 0, 2)]=(1.4466378057-1.05244286144j)*dim
            arg[(3, 1, 0)]=(-0.380522121995+0.757229445534j)*x[0] + ((-0.838338268637-0.388903974469j))*x[1]
            ref[(3, 1, 0)]=(-1.21886039063+0.368325471065j)*dim
            arg[(3, 1, 1)]=(0.725788187289+0.88138679004j)*x[0] + ((0.809377442492-0.00678090987679j))*x[1]
            ref[(3, 1, 1)]=(1.53516562978+0.874605880163j)*dim
            arg[(3, 1, 2)]=(0.987237491791+0.0256411430072j)*x[0] + ((0.89086823333-0.0629891622258j))*x[1]
            ref[(3, 1, 2)]=(1.87810572512-0.0373480192186j)*dim
            arg[(3, 2, 0)]=(0.893338158418+0.657314583063j)*x[0] + ((0.0178879779253-0.375159063091j))*x[1]
            ref[(3, 2, 0)]=(0.911226136344+0.282155519972j)*dim
            arg[(3, 2, 1)]=(-0.309782966319+0.145610893952j)*x[0] + ((-0.900223457243+0.0405666995191j))*x[1]
            ref[(3, 2, 1)]=(-1.21000642356+0.186177593471j)*dim
            arg[(3, 2, 2)]=(-0.362717472335+0.966416306416j)*x[0] + ((0.183166996647+0.859010083511j))*x[1]
            ref[(3, 2, 2)]=(-0.179550475688+1.82542638993j)*dim
            arg[(3, 3, 0)]=(-0.355518655655+0.984100872767j)*x[0] + ((0.352711824959-0.375999305627j))*x[1]
            ref[(3, 3, 0)]=(-0.00280683069642+0.60810156714j)*dim
            arg[(3, 3, 1)]=(0.872785833836+0.775246154881j)*x[0] + ((0.744349241091-0.173469751621j))*x[1]
            ref[(3, 3, 1)]=(1.61713507493+0.60177640326j)*dim
            arg[(3, 3, 2)]=(0.618993036918+0.0778883428813j)*x[0] + ((0.760195952342+0.256619186904j))*x[1]
            ref[(3, 3, 2)]=(1.37918898926+0.334507529786j)*dim
        else:
            arg[(0, 0, 0)]=(0.0632582107423+0.175142778016j)*x[0] + ((-0.454733911092+0.00293842467806j))*x[1] + ((0.770736548208-0.801132042701j))*x[2]
            ref[(0, 0, 0)]=(0.379260847859-0.623050840008j)*dim
            arg[(0, 0, 1)]=(0.978939173369+0.0832052237444j)*x[0] + ((0.217026520828-0.196775927047j))*x[1] + ((-0.413610945565-0.786527240129j))*x[2]
            ref[(0, 0, 1)]=(0.782354748631-0.900097943432j)*dim
            arg[(0, 0, 2)]=(-0.0184066575593+0.258326704607j)*x[0] + ((0.402393774597-0.363879206145j))*x[1] + ((-0.178037235158-0.420511236364j))*x[2]
            ref[(0, 0, 2)]=(0.20594988188-0.526063737902j)*dim
            arg[(0, 1, 0)]=(0.346463050548-0.763762305375j)*x[0] + ((0.226612162709+0.646215264416j))*x[1] + ((-0.414659916783+0.827159050591j))*x[2]
            ref[(0, 1, 0)]=(0.158415296474+0.709612009631j)*dim
            arg[(0, 1, 1)]=(-0.502903970374-0.530477509566j)*x[0] + ((0.208283736819+0.824264095847j))*x[1] + ((0.676186248413-0.374960828845j))*x[2]
            ref[(0, 1, 1)]=(0.381566014858-0.0811742425636j)*dim
            arg[(0, 1, 2)]=(-0.204551349343+0.890694918757j)*x[0] + ((-0.826464165198+0.121623072918j))*x[1] + ((-0.61638183331+0.776420232095j))*x[2]
            ref[(0, 1, 2)]=(-1.64739734785+1.78873822377j)*dim
            arg[(0, 2, 0)]=(-0.413326066418+0.878843232108j)*x[0] + ((0.873671886421-0.150840884867j))*x[1] + ((-0.979145013842-0.78922340864j))*x[2]
            ref[(0, 2, 0)]=(-0.518799193839-0.0612210613989j)*dim
            arg[(0, 2, 1)]=(0.400311296141+0.140434136889j)*x[0] + ((-0.190523851628-0.568228659897j))*x[1] + ((0.16220359208-0.97545340928j))*x[2]
            ref[(0, 2, 1)]=(0.371991036593-1.40324793229j)*dim
            arg[(0, 2, 2)]=(0.61192830601-0.000929636408296j)*x[0] + ((0.347086396635+0.027902615324j))*x[1] + ((0.120491196608+0.820246097728j))*x[2]
            ref[(0, 2, 2)]=(1.07950589925+0.847219076644j)*dim
            arg[(0, 3, 0)]=(0.69418766438+0.523821557634j)*x[0] + ((0.366706863828+0.0317245491338j))*x[1] + ((-0.24404119453-0.230084166062j))*x[2]
            ref[(0, 3, 0)]=(0.816853333678+0.325461940705j)*dim
            arg[(0, 3, 1)]=(0.709013850569-0.634120144368j)*x[0] + ((0.151221090893-0.0595507404203j))*x[1] + ((-0.165590568685+0.00313979853388j))*x[2]
            ref[(0, 3, 1)]=(0.694644372776-0.690531086254j)*dim
            arg[(0, 3, 2)]=(0.697476966714-0.13752395727j)*x[0] + ((-0.0289745773518+0.556971114383j))*x[1] + ((-0.794766784744-0.400680858099j))*x[2]
            ref[(0, 3, 2)]=(-0.126264395382+0.018766299014j)*dim
            arg[(1, 0, 0)]=(0.121348794479+0.580762415815j)*x[0] + ((-0.679055064233-0.965164120425j))*x[1] + ((0.120220350735-0.945911520191j))*x[2]
            ref[(1, 0, 0)]=(-0.437485919019-1.3303132248j)*dim
            arg[(1, 0, 1)]=(-0.76761365166-0.0953709905018j)*x[0] + ((-0.769710444811+0.771019278814j))*x[1] + ((-0.562152208222-0.372530898854j))*x[2]
            ref[(1, 0, 1)]=(-2.09947630469+0.303117389458j)*dim
            arg[(1, 0, 2)]=(0.917227688932-0.721025302603j)*x[0] + ((-0.389424969113+0.290737812601j))*x[1] + ((0.632859382343+0.193198353465j))*x[2]
            ref[(1, 0, 2)]=(1.16066210216-0.237089136537j)*dim
            arg[(1, 1, 0)]=(-0.756264786953-0.0490163131012j)*x[0] + ((0.421282976094+0.545345369303j))*x[1] + ((-0.0625505754174-0.111840328976j))*x[2]
            ref[(1, 1, 0)]=(-0.397532386276+0.384488727226j)*dim
            arg[(1, 1, 1)]=(-0.428320921552+0.788640818539j)*x[0] + ((0.638215187899+0.605471776503j))*x[1] + ((-0.932921413563+0.0365197766741j))*x[2]
            ref[(1, 1, 1)]=(-0.723027147216+1.43063237172j)*dim
            arg[(1, 1, 2)]=(-0.971547115275+0.381296733504j)*x[0] + ((-0.308677184341+0.194142219997j))*x[1] + ((-0.439355673141-0.331572431585j))*x[2]
            ref[(1, 1, 2)]=(-1.71957997276+0.243866521916j)*dim
            arg[(1, 2, 0)]=(0.656925495018+0.93464410784j)*x[0] + ((-0.606085047111-0.0726482742042j))*x[1] + ((0.955340174564+0.418440208183j))*x[2]
            ref[(1, 2, 0)]=(1.00618062247+1.28043604182j)*dim
            arg[(1, 2, 1)]=(-0.783840668119-0.105936975494j)*x[0] + ((-0.80164158838-0.38889157248j))*x[1] + ((0.242248877684-0.0977920361914j))*x[2]
            ref[(1, 2, 1)]=(-1.34323337881-0.592620584165j)*dim
            arg[(1, 2, 2)]=(-0.326196060947-0.582318081155j)*x[0] + ((-0.833011271168+0.109603828492j))*x[1] + ((-0.898222044912-0.318780635255j))*x[2]
            ref[(1, 2, 2)]=(-2.05742937703-0.791494887918j)*dim
            arg[(1, 3, 0)]=(0.935588662561-0.729914584158j)*x[0] + ((-0.929896034092-0.558320604677j))*x[1] + ((-0.361440331014-0.246270454j))*x[2]
            ref[(1, 3, 0)]=(-0.355747702545-1.53450564284j)*dim
            arg[(1, 3, 1)]=(-0.100684514905+0.0508637014965j)*x[0] + ((-0.03993143014-0.872701348831j))*x[1] + ((-0.619292517691+0.311574025185j))*x[2]
            ref[(1, 3, 1)]=(-0.759908462736-0.51026362215j)*dim
            arg[(1, 3, 2)]=(-0.945667528656+0.328724463935j)*x[0] + ((0.906917638591-0.73890505745j))*x[1] + ((0.780904590855-0.542743728477j))*x[2]
            ref[(1, 3, 2)]=(0.742154700791-0.952924321992j)*dim
            arg[(2, 0, 0)]=(-0.210838953703+0.0920176546165j)*x[0] + ((0.8029185887+0.543827170008j))*x[1] + ((0.545729759861+0.463529640798j))*x[2]
            ref[(2, 0, 0)]=(1.13780939486+1.09937446542j)*dim
            arg[(2, 0, 1)]=(0.750498592939-0.0747475272146j)*x[0] + ((-0.596457910017+0.556355927973j))*x[1] + ((0.583027566944+0.860327912075j))*x[2]
            ref[(2, 0, 1)]=(0.737068249866+1.34193631283j)*dim
            arg[(2, 0, 2)]=(0.33926757964+0.812294508796j)*x[0] + ((0.806844018045+0.606849378599j))*x[1] + ((0.729122962391-0.681546324678j))*x[2]
            ref[(2, 0, 2)]=(1.87523456008+0.737597562717j)*dim
            arg[(2, 1, 0)]=(-0.723333806476+0.212533277715j)*x[0] + ((0.646375052631-0.982896570257j))*x[1] + ((-0.153503509431-0.199288734563j))*x[2]
            ref[(2, 1, 0)]=(-0.230462263275-0.969652027105j)*dim
            arg[(2, 1, 1)]=(-0.99429738183-0.287578920225j)*x[0] + ((0.820723118639-0.0217484853858j))*x[1] + ((0.806589130419+0.147793940114j))*x[2]
            ref[(2, 1, 1)]=(0.633014867228-0.161533465497j)*dim
            arg[(2, 1, 2)]=(0.891738526105-0.862253552291j)*x[0] + ((0.467344572558+0.783104002522j))*x[1] + ((0.0817722856153-0.503244399543j))*x[2]
            ref[(2, 1, 2)]=(1.44085538428-0.582393949312j)*dim
            arg[(2, 2, 0)]=(0.348411312167+0.488370753175j)*x[0] + ((0.985067814018+0.37031317055j))*x[1] + ((-0.869102405979+0.282860265758j))*x[2]
            ref[(2, 2, 0)]=(0.464376720207+1.14154418948j)*dim
            arg[(2, 2, 1)]=(0.507162516288-0.0541831006664j)*x[0] + ((-0.920760152537-0.399979555937j))*x[1] + ((-0.298784903361-0.638940859652j))*x[2]
            ref[(2, 2, 1)]=(-0.712382539609-1.09310351626j)*dim
            arg[(2, 2, 2)]=(0.804495569855-0.899236472016j)*x[0] + ((0.817895744879-0.325287511254j))*x[1] + ((0.403965908289-0.0682802481595j))*x[2]
            ref[(2, 2, 2)]=(2.02635722302-1.29280423143j)*dim
            arg[(2, 3, 0)]=(-0.362969082129-0.611930472024j)*x[0] + ((-0.419752568396-0.465824910483j))*x[1] + ((0.589530467939+0.00582645617093j))*x[2]
            ref[(2, 3, 0)]=(-0.193191182586-1.07192892634j)*dim
            arg[(2, 3, 1)]=(0.0612214687204-0.60712583553j)*x[0] + ((-0.232059840258-0.260546779149j))*x[1] + ((0.906350829957+0.306042615494j))*x[2]
            ref[(2, 3, 1)]=(0.73551245842-0.561629999184j)*dim
            arg[(2, 3, 2)]=(-0.0228808843743+0.846430291338j)*x[0] + ((-0.142729302051-0.577191948802j))*x[1] + ((0.29684545831-0.576946245318j))*x[2]
            ref[(2, 3, 2)]=(0.131235271884-0.307707902782j)*dim
            arg[(3, 0, 0)]=(-0.805572901631-0.629352538419j)*x[0] + ((-0.451673535578+0.657272901233j))*x[1] + ((-0.301754492946+0.453549300426j))*x[2]
            ref[(3, 0, 0)]=(-1.55900093016+0.48146966324j)*dim
            arg[(3, 0, 1)]=(-0.309365236643+0.202411722142j)*x[0] + ((-0.560852438098+0.410486829463j))*x[1] + ((-0.92310233896-0.0379567186113j))*x[2]
            ref[(3, 0, 1)]=(-1.7933200137+0.574941832994j)*dim
            arg[(3, 0, 2)]=(-0.695299232289+0.841215920209j)*x[0] + ((-0.246414646474-0.742350357558j))*x[1] + ((-0.617838800051-0.335995383673j))*x[2]
            ref[(3, 0, 2)]=(-1.55955267881-0.237129821022j)*dim
            arg[(3, 1, 0)]=(0.997961510351+0.46264032459j)*x[0] + ((0.71556298941-0.760852623324j))*x[1] + ((-0.580487053543+0.797821119851j))*x[2]
            ref[(3, 1, 0)]=(1.13303744622+0.499608821116j)*dim
            arg[(3, 1, 1)]=(-0.672939363338+0.71755502648j)*x[0] + ((-0.975939062081+0.580201511443j))*x[1] + ((-0.295923055541+0.729026130331j))*x[2]
            ref[(3, 1, 1)]=(-1.94480148096+2.02678266825j)*dim
            arg[(3, 1, 2)]=(0.831482759586-0.883768916241j)*x[0] + ((0.829359953114+0.500101449797j))*x[1] + ((-0.489489628241+0.667325041179j))*x[2]
            ref[(3, 1, 2)]=(1.17135308446+0.283657574735j)*dim
            arg[(3, 2, 0)]=(-0.942154694123+0.434551901732j)*x[0] + ((0.0755748983025+0.244417159492j))*x[1] + ((0.670730472112+0.0276046031083j))*x[2]
            ref[(3, 2, 0)]=(-0.195849323708+0.706573664333j)*dim
            arg[(3, 2, 1)]=(0.810101112528-0.293695595899j)*x[0] + ((-0.453329670838+0.789213713299j))*x[1] + ((-0.938044470271-0.845185128147j))*x[2]
            ref[(3, 2, 1)]=(-0.581273028581-0.349667010747j)*dim
            arg[(3, 2, 2)]=(-0.533292865336-0.846555326655j)*x[0] + ((-0.270703746794+0.765445351755j))*x[1] + ((0.620794655862+0.779792518025j))*x[2]
            ref[(3, 2, 2)]=(-0.183201956268+0.698682543125j)*dim
            arg[(3, 3, 0)]=(0.106403654592+0.496346330049j)*x[0] + ((-0.574163107995+0.80025550604j))*x[1] + ((-0.443623501873-0.060641265012j))*x[2]
            ref[(3, 3, 0)]=(-0.911382955276+1.23596057108j)*dim
            arg[(3, 3, 1)]=(-0.0594470402911-0.217143722387j)*x[0] + ((-0.46529641812-0.555983833255j))*x[1] + ((0.0147346505983+0.130267954979j))*x[2]
            ref[(3, 3, 1)]=(-0.510008807812-0.642859600663j)*dim
            arg[(3, 3, 2)]=(0.88333895059-0.150996096731j)*x[0] + ((-0.40361567738+0.164782845458j))*x[1] + ((-0.315586056608+0.862301217092j))*x[2]
            ref[(3, 3, 2)]=(0.164137216602+0.87608796582j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 4),w)
        ref=numpy.zeros((3, 2, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.445394377873-0.552367440087j)*x[0] + ((-0.115000845241+0.0797290609865j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.560395223113-0.4726383791j)*dim
            arg[(0, 0, 0, 1)]=(0.34885923748+0.187495583287j)*x[0] + ((0.778534960959+0.16642582961j))*x[1]
            ref[(0, 0, 0, 1)]=(1.12739419844+0.353921412897j)*dim
            arg[(0, 0, 0, 2)]=(0.939303696905-0.446270678251j)*x[0] + ((0.313911164094-0.782355832865j))*x[1]
            ref[(0, 0, 0, 2)]=(1.253214861-1.22862651112j)*dim
            arg[(0, 0, 0, 3)]=(-0.327606670359-0.245639038987j)*x[0] + ((-0.948358670213-0.709081748292j))*x[1]
            ref[(0, 0, 0, 3)]=(-1.27596534057-0.954720787278j)*dim
            arg[(0, 0, 1, 0)]=(-0.501115846163+0.221957202005j)*x[0] + ((0.527255389885-0.594365692788j))*x[1]
            ref[(0, 0, 1, 0)]=(0.0261395437217-0.372408490783j)*dim
            arg[(0, 0, 1, 1)]=(-0.187091663792+0.177991172017j)*x[0] + ((-0.464445737877-0.212451008836j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.651537401669-0.0344598368194j)*dim
            arg[(0, 0, 1, 2)]=(0.27818921256-0.476982591661j)*x[0] + ((-0.431160903473-0.939588221284j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.152971690913-1.41657081295j)*dim
            arg[(0, 0, 1, 3)]=(0.824921705415-0.658120173589j)*x[0] + ((-0.0218369212511-0.176250791917j))*x[1]
            ref[(0, 0, 1, 3)]=(0.803084784164-0.834370965506j)*dim
            arg[(0, 1, 0, 0)]=(0.682846062389-0.353633436267j)*x[0] + ((0.0270145520687+0.45665975943j))*x[1]
            ref[(0, 1, 0, 0)]=(0.709860614457+0.103026323163j)*dim
            arg[(0, 1, 0, 1)]=(-0.600728341123-0.0946787872135j)*x[0] + ((-0.799817010592-0.167607401527j))*x[1]
            ref[(0, 1, 0, 1)]=(-1.40054535172-0.262286188741j)*dim
            arg[(0, 1, 0, 2)]=(-0.720355646338-0.372516989998j)*x[0] + ((-0.355171864099+0.0418877214196j))*x[1]
            ref[(0, 1, 0, 2)]=(-1.07552751044-0.330629268579j)*dim
            arg[(0, 1, 0, 3)]=(0.598217372906+0.430862652649j)*x[0] + ((0.532604343649-0.247453815359j))*x[1]
            ref[(0, 1, 0, 3)]=(1.13082171656+0.18340883729j)*dim
            arg[(0, 1, 1, 0)]=(0.785667996196-0.398029303002j)*x[0] + ((-0.26926609899+0.126696210529j))*x[1]
            ref[(0, 1, 1, 0)]=(0.516401897206-0.271333092473j)*dim
            arg[(0, 1, 1, 1)]=(0.107335068787-0.25254306349j)*x[0] + ((0.649211837378-0.402762107696j))*x[1]
            ref[(0, 1, 1, 1)]=(0.756546906165-0.655305171186j)*dim
            arg[(0, 1, 1, 2)]=(0.886193513261+0.109862526635j)*x[0] + ((-0.655867734489+0.19019234493j))*x[1]
            ref[(0, 1, 1, 2)]=(0.230325778772+0.300054871565j)*dim
            arg[(0, 1, 1, 3)]=(0.622439935534-0.870593103049j)*x[0] + ((-0.202542379315-0.77415180993j))*x[1]
            ref[(0, 1, 1, 3)]=(0.41989755622-1.64474491298j)*dim
            arg[(1, 0, 0, 0)]=(0.559055570867-0.469364486369j)*x[0] + ((-0.78831590033+0.597113415804j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.229260329463+0.127748929435j)*dim
            arg[(1, 0, 0, 1)]=(-0.640714222525+0.203928262575j)*x[0] + ((0.974172926169+0.497774418309j))*x[1]
            ref[(1, 0, 0, 1)]=(0.333458703644+0.701702680884j)*dim
            arg[(1, 0, 0, 2)]=(-0.0459373864437+0.687283874764j)*x[0] + ((-0.683495578596-0.986399098793j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.72943296504-0.299115224029j)*dim
            arg[(1, 0, 0, 3)]=(-0.802706367959+0.600187859349j)*x[0] + ((-0.14612412155-0.590734577892j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.948830489509+0.00945328145633j)*dim
            arg[(1, 0, 1, 0)]=(-0.427503155983-0.176898963607j)*x[0] + ((0.711472126476+0.660680844813j))*x[1]
            ref[(1, 0, 1, 0)]=(0.283968970493+0.483781881206j)*dim
            arg[(1, 0, 1, 1)]=(0.188752428446-0.251823749325j)*x[0] + ((0.0223369239247-0.982697037873j))*x[1]
            ref[(1, 0, 1, 1)]=(0.211089352371-1.2345207872j)*dim
            arg[(1, 0, 1, 2)]=(0.698535432961-0.864635872672j)*x[0] + ((-0.586127051473-0.0733055106229j))*x[1]
            ref[(1, 0, 1, 2)]=(0.112408381488-0.937941383295j)*dim
            arg[(1, 0, 1, 3)]=(0.439750207947-0.706169339227j)*x[0] + ((0.121501477206+0.359464848851j))*x[1]
            ref[(1, 0, 1, 3)]=(0.561251685153-0.346704490375j)*dim
            arg[(1, 1, 0, 0)]=(-0.7148418795+0.427888235287j)*x[0] + ((-0.897471913897+0.0159103529103j))*x[1]
            ref[(1, 1, 0, 0)]=(-1.6123137934+0.443798588198j)*dim
            arg[(1, 1, 0, 1)]=(-0.517972909219-0.56655455669j)*x[0] + ((0.86840972665+0.505033614094j))*x[1]
            ref[(1, 1, 0, 1)]=(0.350436817431-0.0615209425958j)*dim
            arg[(1, 1, 0, 2)]=(-0.00336434796113+0.704010529227j)*x[0] + ((0.130280142395+0.0607819869335j))*x[1]
            ref[(1, 1, 0, 2)]=(0.126915794433+0.76479251616j)*dim
            arg[(1, 1, 0, 3)]=(0.273472552001-0.950101085392j)*x[0] + ((0.499986130394-0.732008018623j))*x[1]
            ref[(1, 1, 0, 3)]=(0.773458682395-1.68210910401j)*dim
            arg[(1, 1, 1, 0)]=(0.0540947584731+0.828702321702j)*x[0] + ((-0.220148769863-0.0551505450263j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.16605401139+0.773551776676j)*dim
            arg[(1, 1, 1, 1)]=(0.356735504475+0.0421639201023j)*x[0] + ((0.428202963318-0.844508625267j))*x[1]
            ref[(1, 1, 1, 1)]=(0.784938467793-0.802344705165j)*dim
            arg[(1, 1, 1, 2)]=(-0.106055921379-0.0237035460825j)*x[0] + ((-0.104302545085-0.5755927309j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.210358466464-0.599296276982j)*dim
            arg[(1, 1, 1, 3)]=(0.937650195649+0.564803074983j)*x[0] + ((0.296331026193+0.504811079494j))*x[1]
            ref[(1, 1, 1, 3)]=(1.23398122184+1.06961415448j)*dim
            arg[(2, 0, 0, 0)]=(0.269054892091+0.140646463848j)*x[0] + ((0.299934684199-0.828107955426j))*x[1]
            ref[(2, 0, 0, 0)]=(0.56898957629-0.687461491578j)*dim
            arg[(2, 0, 0, 1)]=(0.796749896142-0.311258459867j)*x[0] + ((-0.936346387412-0.198310382334j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.13959649127-0.509568842202j)*dim
            arg[(2, 0, 0, 2)]=(-0.864547518275-0.359106220084j)*x[0] + ((0.581464236174-0.846715149087j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.283083282101-1.20582136917j)*dim
            arg[(2, 0, 0, 3)]=(0.00206249392707+0.324864370331j)*x[0] + ((-0.581730914155+0.879015810704j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.579668420228+1.20388018103j)*dim
            arg[(2, 0, 1, 0)]=(-0.138822194457+0.640462222305j)*x[0] + ((0.694376251969+0.0146044436021j))*x[1]
            ref[(2, 0, 1, 0)]=(0.555554057512+0.655066665907j)*dim
            arg[(2, 0, 1, 1)]=(-0.755542080747-0.264251636327j)*x[0] + ((-0.607554369202+0.954753354498j))*x[1]
            ref[(2, 0, 1, 1)]=(-1.36309644995+0.690501718171j)*dim
            arg[(2, 0, 1, 2)]=(-0.23608333806-0.900794676969j)*x[0] + ((-0.0889307788442+0.716756206108j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.325014116905-0.184038470861j)*dim
            arg[(2, 0, 1, 3)]=(0.326525442815-0.956618650813j)*x[0] + ((0.38069700334+0.956293053033j))*x[1]
            ref[(2, 0, 1, 3)]=(0.707222446155-0.000325597779977j)*dim
            arg[(2, 1, 0, 0)]=(-0.802984236157-0.947672527158j)*x[0] + ((-0.0709684304535-0.0721836553377j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.873952666611-1.0198561825j)*dim
            arg[(2, 1, 0, 1)]=(-0.245111322605+0.0908420232889j)*x[0] + ((0.933168748628-0.611577790537j))*x[1]
            ref[(2, 1, 0, 1)]=(0.688057426023-0.520735767248j)*dim
            arg[(2, 1, 0, 2)]=(-0.652488643519-0.581502681474j)*x[0] + ((0.315919296555-0.440802147796j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.336569346964-1.02230482927j)*dim
            arg[(2, 1, 0, 3)]=(-0.515496922645+0.0982817848003j)*x[0] + ((-0.183371511317+0.143612576217j))*x[1]
            ref[(2, 1, 0, 3)]=(-0.698868433961+0.241894361017j)*dim
            arg[(2, 1, 1, 0)]=(0.532637908276-0.867306695178j)*x[0] + ((0.797744660455-0.236922986828j))*x[1]
            ref[(2, 1, 1, 0)]=(1.33038256873-1.10422968201j)*dim
            arg[(2, 1, 1, 1)]=(0.266493503111+0.692536587958j)*x[0] + ((-0.305339253018+0.337568736608j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.0388457499069+1.03010532457j)*dim
            arg[(2, 1, 1, 2)]=(-0.928911986765+0.823373218994j)*x[0] + ((0.993246184156-0.584041542246j))*x[1]
            ref[(2, 1, 1, 2)]=(0.0643341973909+0.239331676748j)*dim
            arg[(2, 1, 1, 3)]=(0.567936048062-0.337934984667j)*x[0] + ((-0.864769579133+0.844426213664j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.296833531071+0.506491228997j)*dim
        else:
            arg[(0, 0, 0, 0)]=(0.0507092648764-0.462181219885j)*x[0] + ((-0.476342737735+0.407358739885j))*x[1] + ((-0.943813224511-0.453851026112j))*x[2]
            ref[(0, 0, 0, 0)]=(-1.36944669737-0.508673506112j)*dim
            arg[(0, 0, 0, 1)]=(-0.813208649442-0.850286566612j)*x[0] + ((0.352109280365-0.796440329038j))*x[1] + ((-0.128320529147-0.63081029918j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.589419898224-2.27753719483j)*dim
            arg[(0, 0, 0, 2)]=(-0.428820241262-0.503826965822j)*x[0] + ((0.926221890528-0.388780949161j))*x[1] + ((0.854226185689+0.656266430308j))*x[2]
            ref[(0, 0, 0, 2)]=(1.35162783495-0.236341484675j)*dim
            arg[(0, 0, 0, 3)]=(-0.828110836022-0.102701802574j)*x[0] + ((0.841073376308+0.607331448892j))*x[1] + ((0.628789731337+0.35258539037j))*x[2]
            ref[(0, 0, 0, 3)]=(0.641752271623+0.857215036689j)*dim
            arg[(0, 0, 1, 0)]=(0.53734165469+0.528190428894j)*x[0] + ((-0.461286674404-0.82202070345j))*x[1] + ((0.660923618185-0.641703826266j))*x[2]
            ref[(0, 0, 1, 0)]=(0.736978598471-0.935534100822j)*dim
            arg[(0, 0, 1, 1)]=(0.598292095093+0.629919830082j)*x[0] + ((-0.19610202631-0.488465152058j))*x[1] + ((-0.531123408795+0.285677262909j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.128933340013+0.427131940933j)*dim
            arg[(0, 0, 1, 2)]=(0.930762003125-0.539925024169j)*x[0] + ((-0.425610092081-0.311454212857j))*x[1] + ((0.794843224179-0.850071531799j))*x[2]
            ref[(0, 0, 1, 2)]=(1.29999513522-1.70145076883j)*dim
            arg[(0, 0, 1, 3)]=(-0.168780302888+0.738631848208j)*x[0] + ((0.650632951552+0.7365637446j))*x[1] + ((0.907263822389+0.970987421156j))*x[2]
            ref[(0, 0, 1, 3)]=(1.38911647105+2.44618301396j)*dim
            arg[(0, 1, 0, 0)]=(-0.547685909795-0.0475932278157j)*x[0] + ((0.419451278839-0.148539073111j))*x[1] + ((0.616190663661-0.0964320090338j))*x[2]
            ref[(0, 1, 0, 0)]=(0.487956032705-0.29256430996j)*dim
            arg[(0, 1, 0, 1)]=(-0.38685286598+0.371675456785j)*x[0] + ((0.147617687242-0.80594573302j))*x[1] + ((0.897288349405+0.955483349542j))*x[2]
            ref[(0, 1, 0, 1)]=(0.658053170667+0.521213073307j)*dim
            arg[(0, 1, 0, 2)]=(-0.642977637757-0.414614472153j)*x[0] + ((-0.391011892789-0.795916642926j))*x[1] + ((0.794591163589-0.890507829313j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.239398366958-2.10103894439j)*dim
            arg[(0, 1, 0, 3)]=(-0.541976290974+0.225018093733j)*x[0] + ((0.632174534403-0.423683627986j))*x[1] + ((0.925661557667+0.234535084357j))*x[2]
            ref[(0, 1, 0, 3)]=(1.0158598011+0.0358695501047j)*dim
            arg[(0, 1, 1, 0)]=(0.484065985239-0.542166593944j)*x[0] + ((0.619690466235-0.39097147737j))*x[1] + ((-0.754031248242-0.304823177836j))*x[2]
            ref[(0, 1, 1, 0)]=(0.349725203232-1.23796124915j)*dim
            arg[(0, 1, 1, 1)]=(0.964559416827-0.646497071769j)*x[0] + ((-0.0552417157742-0.331742606431j))*x[1] + ((0.778612677355-0.452028228917j))*x[2]
            ref[(0, 1, 1, 1)]=(1.68793037841-1.43026790712j)*dim
            arg[(0, 1, 1, 2)]=(0.767686750351+0.0269390676768j)*x[0] + ((-0.562388468246-0.482900137817j))*x[1] + ((-0.874318090441-0.332431500514j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.669019808336-0.788392570655j)*dim
            arg[(0, 1, 1, 3)]=(-0.106303434794-0.68488843624j)*x[0] + ((0.832268817002+0.364524241134j))*x[1] + ((-0.250167755213-0.868144335419j))*x[2]
            ref[(0, 1, 1, 3)]=(0.475797626995-1.18850853053j)*dim
            arg[(1, 0, 0, 0)]=(-0.250960250669+0.516468005881j)*x[0] + ((0.728484671277-0.198158389216j))*x[1] + ((-0.876866006657+0.593089192236j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.399341586048+0.911398808902j)*dim
            arg[(1, 0, 0, 1)]=(0.521919121338-0.699411410029j)*x[0] + ((0.939524300709+0.123320087165j))*x[1] + ((-0.643025106774-0.220899405372j))*x[2]
            ref[(1, 0, 0, 1)]=(0.818418315274-0.796990728236j)*dim
            arg[(1, 0, 0, 2)]=(-0.825924369869-0.845839335038j)*x[0] + ((-0.0193198901793+0.742418658155j))*x[1] + ((-0.734860025839+0.347939589029j))*x[2]
            ref[(1, 0, 0, 2)]=(-1.58010428589+0.244518912146j)*dim
            arg[(1, 0, 0, 3)]=(0.831325580621-0.668170786132j)*x[0] + ((0.0106190464738-0.751804875975j))*x[1] + ((-0.0512140495571-0.525859644813j))*x[2]
            ref[(1, 0, 0, 3)]=(0.790730577538-1.94583530692j)*dim
            arg[(1, 0, 1, 0)]=(-0.419454030145+0.0910996917044j)*x[0] + ((0.459431267385-0.26420986555j))*x[1] + ((0.884485357532+0.380123029372j))*x[2]
            ref[(1, 0, 1, 0)]=(0.924462594772+0.207012855526j)*dim
            arg[(1, 0, 1, 1)]=(-0.347006212917-0.525327485712j)*x[0] + ((-0.671072471961+0.620441697896j))*x[1] + ((-0.357083595855+0.386558487545j))*x[2]
            ref[(1, 0, 1, 1)]=(-1.37516228073+0.481672699728j)*dim
            arg[(1, 0, 1, 2)]=(0.919989960113-0.186452334208j)*x[0] + ((-0.605551947077+0.806987467994j))*x[1] + ((-0.657090671449+0.281195850289j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.342652658413+0.901730984075j)*dim
            arg[(1, 0, 1, 3)]=(-0.51009489022+0.459245452854j)*x[0] + ((-0.318137510105+0.872680967071j))*x[1] + ((0.707177399441-0.463923685929j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.121055000884+0.868002733995j)*dim
            arg[(1, 1, 0, 0)]=(-0.357342108459-0.616268247025j)*x[0] + ((0.857471583132+0.744948101343j))*x[1] + ((0.401432500093+0.631019628071j))*x[2]
            ref[(1, 1, 0, 0)]=(0.901561974766+0.759699482389j)*dim
            arg[(1, 1, 0, 1)]=(-0.616079196827-0.669206994962j)*x[0] + ((0.92185071631-0.9294067017j))*x[1] + ((0.84449257058-0.928782657814j))*x[2]
            ref[(1, 1, 0, 1)]=(1.15026409006-2.52739635448j)*dim
            arg[(1, 1, 0, 2)]=(-0.887934423696-0.160978468305j)*x[0] + ((0.68826515991-0.62539221219j))*x[1] + ((0.889268779158+0.965591554341j))*x[2]
            ref[(1, 1, 0, 2)]=(0.689599515372+0.179220873846j)*dim
            arg[(1, 1, 0, 3)]=(0.340010277328-0.685453991795j)*x[0] + ((-0.386252538864+0.48248122332j))*x[1] + ((0.815551307278+0.657573085218j))*x[2]
            ref[(1, 1, 0, 3)]=(0.769309045742+0.454600316743j)*dim
            arg[(1, 1, 1, 0)]=(-0.566279985909-0.455113653796j)*x[0] + ((0.94581983204+0.321103469699j))*x[1] + ((-0.716846837373-0.157924429713j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.337306991243-0.29193461381j)*dim
            arg[(1, 1, 1, 1)]=(-0.625640939857+0.207710291402j)*x[0] + ((-0.858374996163+0.957232482147j))*x[1] + ((0.926756842-0.803962194208j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.557259094019+0.360980579341j)*dim
            arg[(1, 1, 1, 2)]=(-0.903119448435+0.266952722945j)*x[0] + ((-0.919744474431-0.256294161169j))*x[1] + ((0.249330505577-0.630835346871j))*x[2]
            ref[(1, 1, 1, 2)]=(-1.57353341729-0.620176785095j)*dim
            arg[(1, 1, 1, 3)]=(0.66535037591+0.92191797168j)*x[0] + ((0.504371777008+0.489152953076j))*x[1] + ((0.190648231994+0.0144533007096j))*x[2]
            ref[(1, 1, 1, 3)]=(1.36037038491+1.42552422547j)*dim
            arg[(2, 0, 0, 0)]=(0.712502206208-0.830749251712j)*x[0] + ((-0.206999998008+0.601946020627j))*x[1] + ((-0.7223357977-0.522960762066j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.216833589499-0.751763993152j)*dim
            arg[(2, 0, 0, 1)]=(0.355112105485+0.819944043066j)*x[0] + ((-0.886952585678-0.862988067397j))*x[1] + ((0.339946691927+0.895840361547j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.191893788265+0.852796337216j)*dim
            arg[(2, 0, 0, 2)]=(0.0905657743175+0.981193269297j)*x[0] + ((-0.570619756425+0.381997405732j))*x[1] + ((-0.808935426508+0.674043246605j))*x[2]
            ref[(2, 0, 0, 2)]=(-1.28898940862+2.03723392164j)*dim
            arg[(2, 0, 0, 3)]=(-0.347464316934-0.897726870554j)*x[0] + ((-0.0734948361566+0.403314113461j))*x[1] + ((0.872877153268-0.521146877374j))*x[2]
            ref[(2, 0, 0, 3)]=(0.451918000177-1.01555963447j)*dim
            arg[(2, 0, 1, 0)]=(0.447137520443+0.0583833501602j)*x[0] + ((0.998128971583-0.407884424086j))*x[1] + ((-0.242995870349+0.382148881368j))*x[2]
            ref[(2, 0, 1, 0)]=(1.20227062168+0.0326478074419j)*dim
            arg[(2, 0, 1, 1)]=(-0.180276673705+0.0922267744868j)*x[0] + ((0.969210840537+0.836733969412j))*x[1] + ((0.689641394251-0.225700799862j))*x[2]
            ref[(2, 0, 1, 1)]=(1.47857556108+0.703259944036j)*dim
            arg[(2, 0, 1, 2)]=(-0.207919792613+0.874830585643j)*x[0] + ((0.714647603522+0.327220449695j))*x[1] + ((-0.639342612507+0.892158338166j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.132614801598+2.0942093735j)*dim
            arg[(2, 0, 1, 3)]=(-0.560013921018-0.467400970205j)*x[0] + ((0.999087108031-0.84853894073j))*x[1] + ((0.78721940147+0.359958950669j))*x[2]
            ref[(2, 0, 1, 3)]=(1.22629258848-0.955980960266j)*dim
            arg[(2, 1, 0, 0)]=(0.601302416093+0.812556730514j)*x[0] + ((-0.510103448938+0.0401690504545j))*x[1] + ((0.32626775942+0.494906885926j))*x[2]
            ref[(2, 1, 0, 0)]=(0.417466726576+1.34763266689j)*dim
            arg[(2, 1, 0, 1)]=(0.754848399351+0.694816188635j)*x[0] + ((0.501973045481+0.728133064069j))*x[1] + ((0.308441381521+0.540481645872j))*x[2]
            ref[(2, 1, 0, 1)]=(1.56526282635+1.96343089858j)*dim
            arg[(2, 1, 0, 2)]=(0.418926470031-0.23274054904j)*x[0] + ((-0.659124083676+0.0456526773496j))*x[1] + ((-0.956473839525-0.580017492158j))*x[2]
            ref[(2, 1, 0, 2)]=(-1.19667145317-0.767105363849j)*dim
            arg[(2, 1, 0, 3)]=(0.18238384391+0.225804224953j)*x[0] + ((-0.541777062578-0.622591191909j))*x[1] + ((-0.468785268418-0.477763944587j))*x[2]
            ref[(2, 1, 0, 3)]=(-0.828178487087-0.874550911543j)*dim
            arg[(2, 1, 1, 0)]=(0.807630338722-0.0829382664592j)*x[0] + ((-0.372085362034+0.518805098132j))*x[1] + ((-0.120050374313+0.362908736364j))*x[2]
            ref[(2, 1, 1, 0)]=(0.315494602374+0.798775568037j)*dim
            arg[(2, 1, 1, 1)]=(0.691030076317-0.867007433927j)*x[0] + ((0.105000775857-0.602504960219j))*x[1] + ((0.87520352237+0.173821711104j))*x[2]
            ref[(2, 1, 1, 1)]=(1.67123437454-1.29569068304j)*dim
            arg[(2, 1, 1, 2)]=(-0.422793083969-0.685445232538j)*x[0] + ((-0.0818506507713-0.455614206449j))*x[1] + ((-0.69011535155-0.521074979151j))*x[2]
            ref[(2, 1, 1, 2)]=(-1.19475908629-1.66213441814j)*dim
            arg[(2, 1, 1, 3)]=(0.65754758038-0.471190057494j)*x[0] + ((-0.270919838801-0.184051426443j))*x[1] + ((-0.304875322415-0.262002142819j))*x[2]
            ref[(2, 1, 1, 3)]=(0.081752419165-0.917243626756j)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.325485472059-0.338847206806j)*x[0]**o + ((0.949207901159+0.276005100357j))*x[0] + ((-0.154867076355-0.271610748622j))*x[1]**o + ((0.811252812223+0.0334930207882j))*x[1]
            ref=(0.170618395704-0.610457955428j)*(1+2.*(dim-1)/(o+1.)) + ((1.76046071338+0.309498121145j))*dim
        else:
            arg=(0.599453807267+0.186802216539j)*x[0]**o + ((0.720515085141-0.228194825976j))*x[0] + ((-0.661246145368+0.277355568795j))*x[1]**o + ((0.777486363693-0.0249624016921j))*x[1] + ((0.0351851347583+0.195117774719j))*x[2]**o + ((-0.0697771749657+0.354279658524j))*x[2]
            ref=(-0.0266072033429+0.659275560053j)*(1+2.*(dim-1)/(o+1.)) + ((1.42822427387+0.101122430856j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.718889798637-0.375138762946j)*x[0]**o + ((0.839102182229+0.565183855308j))*x[0] + ((0.444407241398-0.942982870939j))*x[1]**o + ((0.568290231255+0.22992723442j))*x[1]
            ref[(0,)]=(-0.274482557239-1.31812163389j)*(1+2.*(dim-1)/(o+1.)) + ((1.40739241348+0.795111089728j))*dim
            arg[(1,)]=(-0.434793753465+0.643491132123j)*x[0]**o + ((0.430502885207+0.722458754246j))*x[0] + ((-0.466418553793-0.993544465992j))*x[1]**o + ((0.0437836595658-0.83701738135j))*x[1]
            ref[(1,)]=(-0.901212307257-0.350053333869j)*(1+2.*(dim-1)/(o+1.)) + ((0.474286544773-0.114558627104j))*dim
            arg[(2,)]=(0.0489565405414+0.966560741559j)*x[0]**o + ((-0.404539608679+0.932438351077j))*x[0] + ((0.905474950731+0.838758771762j))*x[1]**o + ((0.276670278233+0.840793703154j))*x[1]
            ref[(2,)]=(0.954431491272+1.80531951332j)*(1+2.*(dim-1)/(o+1.)) + ((-0.127869330445+1.77323205423j))*dim
        else:
            arg[(0,)]=(0.914985916657-0.493629087517j)*x[0]**o + ((0.420955796081+0.95792775666j))*x[0] + ((0.978442127312-0.132666032443j))*x[1]**o + ((0.555669774279-0.29368559592j))*x[1] + ((0.990193504118-0.98913997189j))*x[2]**o + ((0.0611204519203-0.59834240679j))*x[2]
            ref[(0,)]=(2.88362154809-1.61543509185j)*(1+2.*(dim-1)/(o+1.)) + ((1.03774602228+0.0658997539504j))*dim
            arg[(1,)]=(-0.992386803518+0.821528665891j)*x[0]**o + ((-0.385972751804-0.131996184982j))*x[0] + ((0.434023508364-0.955669694351j))*x[1]**o + ((0.34467207307+0.0439489273626j))*x[1] + ((0.875849175225+0.659458597223j))*x[2]**o + ((0.73356510526+0.789619052185j))*x[2]
            ref[(1,)]=(0.317485880071+0.525317568763j)*(1+2.*(dim-1)/(o+1.)) + ((0.692264426527+0.701571794565j))*dim
            arg[(2,)]=(-0.917106019332-0.656585780573j)*x[0]**o + ((-0.326139474819+0.122361898512j))*x[0] + ((0.0886845354352+0.946401225386j))*x[1]**o + ((0.70105893488-0.158783838501j))*x[1] + ((-0.879627195391-0.520741876743j))*x[2]**o + ((0.555259262245-0.582199826955j))*x[2]
            ref[(2,)]=(-1.70804867929-0.23092643193j)*(1+2.*(dim-1)/(o+1.)) + ((0.930178722306-0.618621766944j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.076042923532-0.378385453947j)*x[0]**o + ((0.703110526659+0.662316185743j))*x[0] + ((0.638111856205-0.578180332919j))*x[1]**o + ((-0.550080725372+0.0771937652674j))*x[1]
            ref[(0, 0)]=(0.714154779737-0.956565786866j)*(1+2.*(dim-1)/(o+1.)) + ((0.153029801287+0.73950995101j))*dim
            arg[(0, 1)]=(-0.926024283442+0.318394103957j)*x[0]**o + ((0.16810202889-0.397312628773j))*x[0] + ((-0.395147884919+0.163785085229j))*x[1]**o + ((0.315514874274-0.443555687127j))*x[1]
            ref[(0, 1)]=(-1.32117216836+0.482179189186j)*(1+2.*(dim-1)/(o+1.)) + ((0.483616903164-0.840868315901j))*dim
            arg[(0, 2)]=(-0.788657209385+0.805094924563j)*x[0]**o + ((0.26151191088-0.754916786736j))*x[0] + ((-0.296491887989-0.603423795064j))*x[1]**o + ((0.975515138053+0.311539100227j))*x[1]
            ref[(0, 2)]=(-1.08514909737+0.201671129499j)*(1+2.*(dim-1)/(o+1.)) + ((1.23702704893-0.443377686509j))*dim
            arg[(0, 3)]=(0.189124743086-0.939084815795j)*x[0]**o + ((-0.546871415989+0.412354123825j))*x[0] + ((-0.878862121098-0.602795198832j))*x[1]**o + ((0.430893407127+0.142827981787j))*x[1]
            ref[(0, 3)]=(-0.689737378012-1.54188001463j)*(1+2.*(dim-1)/(o+1.)) + ((-0.115978008862+0.555182105612j))*dim
            arg[(1, 0)]=(0.179898753123-0.921147326728j)*x[0]**o + ((0.788953835059-0.262094753176j))*x[0] + ((0.468208335578-0.729611316894j))*x[1]**o + ((-0.989467583439-0.325201080504j))*x[1]
            ref[(1, 0)]=(0.648107088701-1.65075864362j)*(1+2.*(dim-1)/(o+1.)) + ((-0.20051374838-0.58729583368j))*dim
            arg[(1, 1)]=(0.919439211657-0.0982117990545j)*x[0]**o + ((0.468150385893-0.723564699685j))*x[0] + ((-0.265327951865+0.257273530014j))*x[1]**o + ((0.0657526506057+0.252134404173j))*x[1]
            ref[(1, 1)]=(0.654111259792+0.15906173096j)*(1+2.*(dim-1)/(o+1.)) + ((0.533903036499-0.471430295512j))*dim
            arg[(1, 2)]=(0.826285481071+0.0174494984693j)*x[0]**o + ((0.306869775744-0.741511738181j))*x[0] + ((-0.922972976263+0.457533780215j))*x[1]**o + ((0.734491381691-0.590631453466j))*x[1]
            ref[(1, 2)]=(-0.0966874951919+0.474983278685j)*(1+2.*(dim-1)/(o+1.)) + ((1.04136115743-1.33214319165j))*dim
            arg[(1, 3)]=(0.174832152615+0.886239092667j)*x[0]**o + ((0.476394016636-0.0904678824462j))*x[0] + ((-0.169410971073+0.0922901492643j))*x[1]**o + ((-0.775704545188-0.306838866024j))*x[1]
            ref[(1, 3)]=(0.00542118154238+0.978529241931j)*(1+2.*(dim-1)/(o+1.)) + ((-0.299310528552-0.397306748471j))*dim
            arg[(2, 0)]=(0.708460460521-0.79097005136j)*x[0]**o + ((-0.562418641247+0.791907292656j))*x[0] + ((-0.636691596877-0.219783203438j))*x[1]**o + ((-0.363152106888-0.46147291724j))*x[1]
            ref[(2, 0)]=(0.0717688636444-1.0107532548j)*(1+2.*(dim-1)/(o+1.)) + ((-0.925570748135+0.330434375416j))*dim
            arg[(2, 1)]=(0.686502036536+0.998595405321j)*x[0]**o + ((-0.876581843699+0.928881431586j))*x[0] + ((0.853719702846+0.469026551863j))*x[1]**o + ((0.849067283358+0.580241320264j))*x[1]
            ref[(2, 1)]=(1.54022173938+1.46762195718j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0275145603403+1.50912275185j))*dim
            arg[(2, 2)]=(0.109936233883+0.283975690625j)*x[0]**o + ((-0.616101981271+0.564290073048j))*x[0] + ((-0.0596220737485+0.816530421452j))*x[1]**o + ((-0.224925774626-0.714259644563j))*x[1]
            ref[(2, 2)]=(0.0503141601343+1.10050611208j)*(1+2.*(dim-1)/(o+1.)) + ((-0.841027755896-0.149969571515j))*dim
            arg[(2, 3)]=(-0.907926471239-0.672975222138j)*x[0]**o + ((0.02392804109-0.214525688259j))*x[0] + ((0.758810948832+0.244460103726j))*x[1]**o + ((0.828220546551-0.973598664957j))*x[1]
            ref[(2, 3)]=(-0.149115522406-0.428515118412j)*(1+2.*(dim-1)/(o+1.)) + ((0.852148587641-1.18812435322j))*dim
        else:
            arg[(0, 0)]=(0.878785428422-0.574855970859j)*x[0]**o + ((0.0709950796501+0.0597323756979j))*x[0] + ((-0.941709447967+0.693896370222j))*x[1]**o + ((0.735190061608-0.804846416092j))*x[1] + ((0.699397699151+0.300895796133j))*x[2]**o + ((-0.803422252284-0.46721727657j))*x[2]
            ref[(0, 0)]=(0.636473679607+0.419936195496j)*(1+2.*(dim-1)/(o+1.)) + ((0.0027628889741-1.21233131696j))*dim
            arg[(0, 1)]=(-0.133425398231+0.936325450689j)*x[0]**o + ((-0.000642081563168+0.970411591602j))*x[0] + ((0.92985324571+0.765724720232j))*x[1]**o + ((0.862635972209+0.352846080539j))*x[1] + ((-0.00992887285954-0.405209547508j))*x[2]**o + ((-0.549865519048+0.0752743067525j))*x[2]
            ref[(0, 1)]=(0.78649897462+1.29684062341j)*(1+2.*(dim-1)/(o+1.)) + ((0.312128371598+1.39853197889j))*dim
            arg[(0, 2)]=(0.351484884083+0.581699103724j)*x[0]**o + ((0.406021821666+0.805313416823j))*x[0] + ((0.659016584174-0.492136368343j))*x[1]**o + ((0.754525173522+0.506159987851j))*x[1] + ((-0.989329832443-0.00184381516748j))*x[2]**o + ((-0.0372600674727-0.582516027976j))*x[2]
            ref[(0, 2)]=(0.0211716358141+0.0877189202142j)*(1+2.*(dim-1)/(o+1.)) + ((1.12328692771+0.728957376698j))*dim
            arg[(0, 3)]=(0.857558804476+0.03373336129j)*x[0]**o + ((0.166486218927+0.937572041989j))*x[0] + ((0.762342409282-0.180920122469j))*x[1]**o + ((-0.518408179607+0.148988362726j))*x[1] + ((0.7582683257+0.50983959503j))*x[2]**o + ((-0.36234971807-0.928935320031j))*x[2]
            ref[(0, 3)]=(2.37816953946+0.362652833851j)*(1+2.*(dim-1)/(o+1.)) + ((-0.71427167875+0.157625084683j))*dim
            arg[(1, 0)]=(-0.490072318502+0.12331302106j)*x[0]**o + ((0.984337551816+0.587368789888j))*x[0] + ((0.851504344983-0.23161594274j))*x[1]**o + ((0.950676139317-0.728302357585j))*x[1] + ((0.284633012658+0.332874117269j))*x[2]**o + ((0.771893538629+0.294981888613j))*x[2]
            ref[(1, 0)]=(0.64606503914+0.224571195589j)*(1+2.*(dim-1)/(o+1.)) + ((2.70690722976+0.154048320916j))*dim
            arg[(1, 1)]=(0.958727762205+0.871073530634j)*x[0]**o + ((0.882997024911-0.307031199597j))*x[0] + ((-0.382991255168+0.89052343667j))*x[1]**o + ((-0.443589052334+0.16913055538j))*x[1] + ((-0.330593483717-0.183246603311j))*x[2]**o + ((0.86115845855+0.459510837664j))*x[2]
            ref[(1, 1)]=(0.245143023321+1.57835036399j)*(1+2.*(dim-1)/(o+1.)) + ((1.30056643113+0.321610193447j))*dim
            arg[(1, 2)]=(-0.546066014411+0.915104088113j)*x[0]**o + ((0.529702237739-0.67000116235j))*x[0] + ((-0.75805264473+0.688207997707j))*x[1]**o + ((-0.44017471685-0.57619289868j))*x[1] + ((0.91479030466+0.802343279354j))*x[2]**o + ((-0.608993758953-0.580998297953j))*x[2]
            ref[(1, 2)]=(-0.389328354481+2.40565536517j)*(1+2.*(dim-1)/(o+1.)) + ((-0.519466238063-1.82719235898j))*dim
            arg[(1, 3)]=(-0.00447587072077-0.055673578162j)*x[0]**o + ((0.697263988716+0.71902773768j))*x[0] + ((0.921922985646-0.969398265254j))*x[1]**o + ((0.0932958229992-0.481758601787j))*x[1] + ((0.685215786588+0.686693342851j))*x[2]**o + ((0.24345282439+0.289745584372j))*x[2]
            ref[(1, 3)]=(1.60266290151-0.338378500565j)*(1+2.*(dim-1)/(o+1.)) + ((1.0340126361+0.527014720265j))*dim
            arg[(2, 0)]=(0.372300766412-0.756610818539j)*x[0]**o + ((0.0548441461395-0.790139447182j))*x[0] + ((-0.162958465813-0.870806844885j))*x[1]**o + ((-0.268834905508+0.48624188491j))*x[1] + ((-0.525897572999+0.750058236494j))*x[2]**o + ((0.0216620221914+0.899497998999j))*x[2]
            ref[(2, 0)]=(-0.316555272399-0.877359426931j)*(1+2.*(dim-1)/(o+1.)) + ((-0.192328737177+0.595600436726j))*dim
            arg[(2, 1)]=(-0.128192460896+0.589496521248j)*x[0]**o + ((-0.175021274287+0.0216994305513j))*x[0] + ((0.701637102957+0.908082820222j))*x[1]**o + ((-0.15866519125+0.564815347951j))*x[1] + ((-0.188194288151-0.355806470697j))*x[2]**o + ((-0.802986659422-0.443242738922j))*x[2]
            ref[(2, 1)]=(0.38525035391+1.14177287077j)*(1+2.*(dim-1)/(o+1.)) + ((-1.13667312496+0.14327203958j))*dim
            arg[(2, 2)]=(0.102633547164+0.907028473137j)*x[0]**o + ((0.537755510657-0.302028668169j))*x[0] + ((0.875190779721+0.0565081406656j))*x[1]**o + ((0.982661092643-0.462523457794j))*x[1] + ((-0.0504470711338+0.518393611813j))*x[2]**o + ((-0.886341852612+0.870920799998j))*x[2]
            ref[(2, 2)]=(0.927377255752+1.48193022562j)*(1+2.*(dim-1)/(o+1.)) + ((0.634074750689+0.106368674035j))*dim
            arg[(2, 3)]=(-0.390242356455+0.719894778545j)*x[0]**o + ((0.795267027489+0.999254423394j))*x[0] + ((-0.287452788365+0.436439554754j))*x[1]**o + ((0.139233174331-0.861054075261j))*x[1] + ((0.361187626707+0.894206086129j))*x[2]**o + ((0.459033511553-0.986903947359j))*x[2]
            ref[(2, 3)]=(-0.316507518113+2.05054041943j)*(1+2.*(dim-1)/(o+1.)) + ((1.39353371337-0.848703599226j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2),w)
        ref=numpy.zeros((4, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.209218018226+0.427734396583j)*x[0]**o + ((0.22415851896+0.142861603321j))*x[0] + ((-0.171969899125-0.123963740289j))*x[1]**o + ((-0.659230460339-0.708207033901j))*x[1]
            ref[(0, 0, 0)]=(0.0372481191015+0.303770656294j)*(1+2.*(dim-1)/(o+1.)) + ((-0.43507194138-0.56534543058j))*dim
            arg[(0, 0, 1)]=(-0.6898338446-0.816194652946j)*x[0]**o + ((0.743933413841+0.0688413501645j))*x[0] + ((-0.371069979776-0.97234388862j))*x[1]**o + ((-0.593536485517-0.176864274787j))*x[1]
            ref[(0, 0, 1)]=(-1.06090382438-1.78853854157j)*(1+2.*(dim-1)/(o+1.)) + ((0.150396928324-0.108022924623j))*dim
            arg[(0, 1, 0)]=(0.906368015539+0.499357764299j)*x[0]**o + ((0.571499488052+0.705122916784j))*x[0] + ((0.41725633169-0.0324627937349j))*x[1]**o + ((0.262712696928+0.463232438381j))*x[1]
            ref[(0, 1, 0)]=(1.32362434723+0.466894970565j)*(1+2.*(dim-1)/(o+1.)) + ((0.83421218498+1.16835535516j))*dim
            arg[(0, 1, 1)]=(0.388462503945+0.5446394166j)*x[0]**o + ((0.741213961684+0.812774391251j))*x[0] + ((-0.937605491486+0.556152557397j))*x[1]**o + ((-0.307477850497-0.197995860714j))*x[1]
            ref[(0, 1, 1)]=(-0.549142987541+1.100791974j)*(1+2.*(dim-1)/(o+1.)) + ((0.433736111187+0.614778530537j))*dim
            arg[(0, 2, 0)]=(0.83083834237-0.425410518259j)*x[0]**o + ((-0.120463220605-0.248932512727j))*x[0] + ((-0.154952895801+0.771505519463j))*x[1]**o + ((0.336892080829-0.627818043064j))*x[1]
            ref[(0, 2, 0)]=(0.675885446569+0.346095001204j)*(1+2.*(dim-1)/(o+1.)) + ((0.216428860224-0.876750555792j))*dim
            arg[(0, 2, 1)]=(-0.245006062261+0.106985930095j)*x[0]**o + ((-0.20045680414-0.803156625357j))*x[0] + ((0.212543080793-0.611594196536j))*x[1]**o + ((0.583481226563-0.830589734179j))*x[1]
            ref[(0, 2, 1)]=(-0.0324629814681-0.504608266441j)*(1+2.*(dim-1)/(o+1.)) + ((0.383024422423-1.63374635954j))*dim
            arg[(1, 0, 0)]=(0.321691876466+0.393518293168j)*x[0]**o + ((0.140913658369-0.673809380716j))*x[0] + ((0.67496209407+0.506047061566j))*x[1]**o + ((0.773639117614+0.932728915436j))*x[1]
            ref[(1, 0, 0)]=(0.996653970535+0.899565354734j)*(1+2.*(dim-1)/(o+1.)) + ((0.914552775983+0.25891953472j))*dim
            arg[(1, 0, 1)]=(0.293925159105-0.862669974023j)*x[0]**o + ((0.342999083168-0.272824269036j))*x[0] + ((0.745462640515+0.314022384363j))*x[1]**o + ((0.218583018606-0.575068023362j))*x[1]
            ref[(1, 0, 1)]=(1.03938779962-0.54864758966j)*(1+2.*(dim-1)/(o+1.)) + ((0.561582101774-0.847892292398j))*dim
            arg[(1, 1, 0)]=(-0.422135177049-0.894745400189j)*x[0]**o + ((-0.273084466018+0.119094106692j))*x[0] + ((-0.576271224479+0.203114218645j))*x[1]**o + ((-0.543725396418-0.0870937038183j))*x[1]
            ref[(1, 1, 0)]=(-0.998406401528-0.691631181544j)*(1+2.*(dim-1)/(o+1.)) + ((-0.816809862436+0.0320004028741j))*dim
            arg[(1, 1, 1)]=(0.793109586839+0.024525345865j)*x[0]**o + ((-0.382308370073+0.777649339628j))*x[0] + ((-0.103718990424-0.747583913361j))*x[1]**o + ((0.991434717843+0.85244281868j))*x[1]
            ref[(1, 1, 1)]=(0.689390596416-0.723058567496j)*(1+2.*(dim-1)/(o+1.)) + ((0.609126347769+1.63009215831j))*dim
            arg[(1, 2, 0)]=(-0.953204345877-0.380968958494j)*x[0]**o + ((-0.967885040774+0.55586855746j))*x[0] + ((0.766519362335-0.887794440331j))*x[1]**o + ((0.33749453928+0.483482257519j))*x[1]
            ref[(1, 2, 0)]=(-0.186684983543-1.26876339883j)*(1+2.*(dim-1)/(o+1.)) + ((-0.630390501494+1.03935081498j))*dim
            arg[(1, 2, 1)]=(0.393897957717-0.561883148543j)*x[0]**o + ((0.418255046043-0.097012327617j))*x[0] + ((-0.0523454305496-0.777117235793j))*x[1]**o + ((-0.738159950101-0.393314044562j))*x[1]
            ref[(1, 2, 1)]=(0.341552527167-1.33900038434j)*(1+2.*(dim-1)/(o+1.)) + ((-0.319904904058-0.490326372179j))*dim
            arg[(2, 0, 0)]=(-0.911056111466+0.650842586766j)*x[0]**o + ((-0.465720030006-0.450328075734j))*x[0] + ((0.607353732079+0.595954149796j))*x[1]**o + ((-0.983188327584+0.864767237654j))*x[1]
            ref[(2, 0, 0)]=(-0.303702379387+1.24679673656j)*(1+2.*(dim-1)/(o+1.)) + ((-1.44890835759+0.41443916192j))*dim
            arg[(2, 0, 1)]=(0.236972691673+0.38870434491j)*x[0]**o + ((0.816409996915-0.5961008981j))*x[0] + ((-0.169055543137-0.222825312132j))*x[1]**o + ((-0.482586264221+0.357949346675j))*x[1]
            ref[(2, 0, 1)]=(0.0679171485361+0.165879032779j)*(1+2.*(dim-1)/(o+1.)) + ((0.333823732694-0.238151551425j))*dim
            arg[(2, 1, 0)]=(0.865232685699-0.236213947062j)*x[0]**o + ((0.542797054428-0.496382301539j))*x[0] + ((-0.72100940501+0.838480886008j))*x[1]**o + ((0.16266691388+0.0773256393251j))*x[1]
            ref[(2, 1, 0)]=(0.144223280689+0.602266938946j)*(1+2.*(dim-1)/(o+1.)) + ((0.705463968308-0.419056662214j))*dim
            arg[(2, 1, 1)]=(0.0524419242451-0.770941036769j)*x[0]**o + ((0.683299681118-0.624467052999j))*x[0] + ((-0.774153944164-0.662741379946j))*x[1]**o + ((-0.477516832669+0.367990908156j))*x[1]
            ref[(2, 1, 1)]=(-0.721712019919-1.43368241671j)*(1+2.*(dim-1)/(o+1.)) + ((0.205782848448-0.256476144843j))*dim
            arg[(2, 2, 0)]=(0.584257909419-0.838151640803j)*x[0]**o + ((0.937490654102+0.127829756783j))*x[0] + ((0.676434727444-0.364246660306j))*x[1]**o + ((0.648723477802+0.824987345559j))*x[1]
            ref[(2, 2, 0)]=(1.26069263686-1.20239830111j)*(1+2.*(dim-1)/(o+1.)) + ((1.5862141319+0.952817102342j))*dim
            arg[(2, 2, 1)]=(0.263685912238+0.0808863990578j)*x[0]**o + ((0.421173010046-0.00271170940087j))*x[0] + ((-0.221603583101+0.695941091725j))*x[1]**o + ((-0.874004241727-0.188642796807j))*x[1]
            ref[(2, 2, 1)]=(0.0420823291366+0.776827490783j)*(1+2.*(dim-1)/(o+1.)) + ((-0.452831231682-0.191354506207j))*dim
            arg[(3, 0, 0)]=(-0.195326381416+0.753022750837j)*x[0]**o + ((-0.949004326906-0.582126864631j))*x[0] + ((0.817146621222-0.469422739698j))*x[1]**o + ((0.605582413134+0.480953213641j))*x[1]
            ref[(3, 0, 0)]=(0.621820239805+0.283600011139j)*(1+2.*(dim-1)/(o+1.)) + ((-0.343421913772-0.101173650991j))*dim
            arg[(3, 0, 1)]=(0.726364841201+0.728944109131j)*x[0]**o + ((0.208725685942+0.750196667615j))*x[0] + ((0.314786624254-0.251886224706j))*x[1]**o + ((-0.91628191658-0.87860902367j))*x[1]
            ref[(3, 0, 1)]=(1.04115146545+0.477057884424j)*(1+2.*(dim-1)/(o+1.)) + ((-0.707556230638-0.128412356055j))*dim
            arg[(3, 1, 0)]=(0.181163726429-0.239977990961j)*x[0]**o + ((0.814728689864+0.82144021725j))*x[0] + ((-0.438865628244+0.682340864503j))*x[1]**o + ((-0.669204634854+0.770822049145j))*x[1]
            ref[(3, 1, 0)]=(-0.257701901815+0.442362873542j)*(1+2.*(dim-1)/(o+1.)) + ((0.14552405501+1.5922622664j))*dim
            arg[(3, 1, 1)]=(0.407451783016-0.87119050327j)*x[0]**o + ((-0.0899841030569-0.639869403325j))*x[0] + ((-0.951654601784+0.780558418063j))*x[1]**o + ((0.563352618401-0.94865605957j))*x[1]
            ref[(3, 1, 1)]=(-0.544202818768-0.0906320852075j)*(1+2.*(dim-1)/(o+1.)) + ((0.473368515344-1.58852546289j))*dim
            arg[(3, 2, 0)]=(0.756499091685+0.616735704818j)*x[0]**o + ((-0.900313499908+0.0448025708367j))*x[0] + ((-0.885893021809+0.228330491358j))*x[1]**o + ((0.120238453997+0.295473723103j))*x[1]
            ref[(3, 2, 0)]=(-0.129393930124+0.845066196175j)*(1+2.*(dim-1)/(o+1.)) + ((-0.780075045912+0.34027629394j))*dim
            arg[(3, 2, 1)]=(-0.991785979075+0.0553574427169j)*x[0]**o + ((-0.728554936441+0.030640771512j))*x[0] + ((0.604572956422-0.0193183631604j))*x[1]**o + ((-0.898766610867-0.880237082551j))*x[1]
            ref[(3, 2, 1)]=(-0.387213022653+0.0360390795566j)*(1+2.*(dim-1)/(o+1.)) + ((-1.62732154731-0.849596311039j))*dim
        else:
            arg[(0, 0, 0)]=(0.156866879196-0.639139048963j)*x[0]**o + ((0.992178959924+0.965558459888j))*x[0] + ((0.227473181794-0.0420132642111j))*x[1]**o + ((0.739268826889-0.257976742848j))*x[1] + ((0.0245471252797+0.402833634913j))*x[2]**o + ((-0.847606225666-0.114807506684j))*x[2]
            ref[(0, 0, 0)]=(0.408887186269-0.278318678261j)*(1+2.*(dim-1)/(o+1.)) + ((0.883841561147+0.592774210356j))*dim
            arg[(0, 0, 1)]=(-0.999644284577+0.349496634683j)*x[0]**o + ((-0.313692634632-0.623537743751j))*x[0] + ((0.34294462444+0.342436607124j))*x[1]**o + ((-0.414336375503+0.0610813058085j))*x[1] + ((-0.406150609027-0.897949096383j))*x[2]**o + ((0.647689317581+0.500238053038j))*x[2]
            ref[(0, 0, 1)]=(-1.06285026916-0.206015854576j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0803396925543-0.0622183849047j))*dim
            arg[(0, 1, 0)]=(-0.593810526664-0.659064931565j)*x[0]**o + ((-0.188770401454-0.0380439344922j))*x[0] + ((-0.264313229722+0.374512747941j))*x[1]**o + ((0.476729995673-0.445273904661j))*x[1] + ((-0.958756937086+0.667525065742j))*x[2]**o + ((0.462348656838+0.596335476863j))*x[2]
            ref[(0, 1, 0)]=(-1.81688069347+0.382972882119j)*(1+2.*(dim-1)/(o+1.)) + ((0.750308251057+0.11301763771j))*dim
            arg[(0, 1, 1)]=(0.16579330312+0.747485649204j)*x[0]**o + ((0.896710835683+0.0862625059629j))*x[0] + ((-0.803061319033-0.881866308701j))*x[1]**o + ((-0.802076285906+0.028964000049j))*x[1] + ((-0.954949949707+0.736930733397j))*x[2]**o + ((-0.185450988473-0.356449723696j))*x[2]
            ref[(0, 1, 1)]=(-1.59221796562+0.6025500739j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0908164386965-0.241223217684j))*dim
            arg[(0, 2, 0)]=(0.271235604186+0.166763376737j)*x[0]**o + ((-0.343217003717-0.169737357866j))*x[0] + ((-0.450656921461+0.00441206964978j))*x[1]**o + ((-0.610553368558+0.562697580805j))*x[1] + ((0.530494378658-0.815429814538j))*x[2]**o + ((0.887931100179-0.440074075923j))*x[2]
            ref[(0, 2, 0)]=(0.351073061383-0.644254368151j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0658392720959-0.0471138529844j))*dim
            arg[(0, 2, 1)]=(-0.241350815991+0.931278359436j)*x[0]**o + ((-0.159727768724-0.471490494882j))*x[0] + ((0.735156202369+0.63326961133j))*x[1]**o + ((0.488681719322-0.473046296637j))*x[1] + ((0.169899706605-0.800672731494j))*x[2]**o + ((0.720686547898-0.788538617033j))*x[2]
            ref[(0, 2, 1)]=(0.663705092984+0.763875239271j)*(1+2.*(dim-1)/(o+1.)) + ((1.0496404985-1.73307540855j))*dim
            arg[(1, 0, 0)]=(0.297548358254+0.0522365257093j)*x[0]**o + ((0.684648895386-0.749378579019j))*x[0] + ((0.420410395909-0.46868721225j))*x[1]**o + ((0.149824563134-0.628580837602j))*x[1] + ((0.933867571354-0.224861097694j))*x[2]**o + ((-0.00851692777852-0.150473406944j))*x[2]
            ref[(1, 0, 0)]=(1.65182632552-0.641311784235j)*(1+2.*(dim-1)/(o+1.)) + ((0.825956530741-1.52843282357j))*dim
            arg[(1, 0, 1)]=(-0.497269765146+0.857844811452j)*x[0]**o + ((0.355742493162-0.114003034969j))*x[0] + ((-0.863734641067+0.329444946761j))*x[1]**o + ((-0.467136797759+0.223554382353j))*x[1] + ((0.788259597291+0.653193061955j))*x[2]**o + ((-0.727322225064+0.930412557346j))*x[2]
            ref[(1, 0, 1)]=(-0.572744808921+1.84048282017j)*(1+2.*(dim-1)/(o+1.)) + ((-0.83871652966+1.03996390473j))*dim
            arg[(1, 1, 0)]=(0.733498138774+0.621813238362j)*x[0]**o + ((0.64039924041+0.539307093127j))*x[0] + ((-0.592992405955+0.282062376856j))*x[1]**o + ((-0.893618672362+0.0126828970768j))*x[1] + ((-0.66933330459+0.168249105975j))*x[2]**o + ((-0.647349480818+0.934347501964j))*x[2]
            ref[(1, 1, 0)]=(-0.528827571771+1.07212472119j)*(1+2.*(dim-1)/(o+1.)) + ((-0.90056891277+1.48633749217j))*dim
            arg[(1, 1, 1)]=(-0.0416317969832+0.400334189455j)*x[0]**o + ((0.367697910523+0.124839072934j))*x[0] + ((0.00329852237677+0.615575574676j))*x[1]**o + ((0.751999243861+0.6975235647j))*x[1] + ((0.200612972153-0.557996533223j))*x[2]**o + ((0.202305135956+0.424850397859j))*x[2]
            ref[(1, 1, 1)]=(0.162279697547+0.457913230909j)*(1+2.*(dim-1)/(o+1.)) + ((1.32200229034+1.24721303549j))*dim
            arg[(1, 2, 0)]=(-0.441548067119-0.014797539812j)*x[0]**o + ((0.68965370059-0.651934838148j))*x[0] + ((-0.27710750278+0.234870383116j))*x[1]**o + ((-0.0541427100554+0.120478338712j))*x[1] + ((0.274596493467+0.36592828098j))*x[2]**o + ((-0.707766283666+0.0018454508252j))*x[2]
            ref[(1, 2, 0)]=(-0.444059076431+0.586001124285j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0722552931313-0.529611048611j))*dim
            arg[(1, 2, 1)]=(0.502323924049-0.63004069825j)*x[0]**o + ((-0.352612913066-0.802007370775j))*x[0] + ((-0.403376537578+0.831914833547j))*x[1]**o + ((-0.0384271389746-0.268804677286j))*x[1] + ((-0.71182180435-0.767203132832j))*x[2]**o + ((0.0677501623552+0.961131511512j))*x[2]
            ref[(1, 2, 1)]=(-0.612874417879-0.565328997535j)*(1+2.*(dim-1)/(o+1.)) + ((-0.323289889685-0.10968053655j))*dim
            arg[(2, 0, 0)]=(-0.791910583543+0.663383155034j)*x[0]**o + ((0.121334728679-0.789890314504j))*x[0] + ((0.117652212809+0.826676843697j))*x[1]**o + ((0.837429946813+0.150222207634j))*x[1] + ((0.889502240994-0.585549209202j))*x[2]**o + ((0.26318234878+0.728258176319j))*x[2]
            ref[(2, 0, 0)]=(0.21524387026+0.904510789529j)*(1+2.*(dim-1)/(o+1.)) + ((1.22194702427+0.0885900694492j))*dim
            arg[(2, 0, 1)]=(-0.684047708472+0.939915782164j)*x[0]**o + ((0.260916529886+0.653901735911j))*x[0] + ((-0.281833233056-0.501708490515j))*x[1]**o + ((-0.841434283532-0.528733862566j))*x[1] + ((-0.663698042638-0.718463660276j))*x[2]**o + ((0.203719558521+0.737680419558j))*x[2]
            ref[(2, 0, 1)]=(-1.62957898417-0.280256368627j)*(1+2.*(dim-1)/(o+1.)) + ((-0.376798195125+0.862848292903j))*dim
            arg[(2, 1, 0)]=(0.251670776171+0.0689643231226j)*x[0]**o + ((0.646301451969+0.834745314801j))*x[0] + ((0.388938188778+0.825627161952j))*x[1]**o + ((0.425430915936-0.955434816429j))*x[1] + ((-0.966608044109-0.832938235794j))*x[2]**o + ((0.986525567909+0.736841728721j))*x[2]
            ref[(2, 1, 0)]=(-0.325999079161+0.0616532492814j)*(1+2.*(dim-1)/(o+1.)) + ((2.05825793581+0.616152227093j))*dim
            arg[(2, 1, 1)]=(0.34439862775+0.720766228178j)*x[0]**o + ((0.555472684436-0.335961172992j))*x[0] + ((-0.776809570017-0.266995660364j))*x[1]**o + ((-0.779910293788-0.391120130045j))*x[1] + ((-0.519194323687+0.612169515553j))*x[2]**o + ((0.416238152785-0.104890758926j))*x[2]
            ref[(2, 1, 1)]=(-0.951605265954+1.06594008337j)*(1+2.*(dim-1)/(o+1.)) + ((0.191800543434-0.831972061964j))*dim
            arg[(2, 2, 0)]=(0.670689031873-0.361488155108j)*x[0]**o + ((-0.448942853966-0.599686905415j))*x[0] + ((-0.307969949198+0.412410551791j))*x[1]**o + ((0.354942090656+0.658144742613j))*x[1] + ((0.723102351198-0.983888661721j))*x[2]**o + ((-0.811186363703+0.743129084878j))*x[2]
            ref[(2, 2, 0)]=(1.08582143387-0.932966265038j)*(1+2.*(dim-1)/(o+1.)) + ((-0.905187127013+0.801586922076j))*dim
            arg[(2, 2, 1)]=(-0.478895103998-0.0976282240856j)*x[0]**o + ((0.984649629789-0.600623823061j))*x[0] + ((-0.12928404722+0.908138756467j))*x[1]**o + ((0.0609643291139-0.903343653902j))*x[1] + ((-0.29314985049+0.667524900275j))*x[2]**o + ((-0.309862637464-0.543890654038j))*x[2]
            ref[(2, 2, 1)]=(-0.901329001708+1.47803543266j)*(1+2.*(dim-1)/(o+1.)) + ((0.735751321439-2.047858131j))*dim
            arg[(3, 0, 0)]=(0.825923928287+0.613006875775j)*x[0]**o + ((-0.723257853214+0.478310219291j))*x[0] + ((-0.911052523728+0.291838543725j))*x[1]**o + ((0.619370291125+0.966111318259j))*x[1] + ((-0.476548653936+0.594057959587j))*x[2]**o + ((-0.96161104437-0.966150900708j))*x[2]
            ref[(3, 0, 0)]=(-0.561677249377+1.49890337909j)*(1+2.*(dim-1)/(o+1.)) + ((-1.06549860646+0.478270636842j))*dim
            arg[(3, 0, 1)]=(-0.997284397795+0.828272029054j)*x[0]**o + ((-0.745121675305-0.486719540622j))*x[0] + ((0.983940699596-0.304086052741j))*x[1]**o + ((0.0838255077853+0.208235575145j))*x[1] + ((-0.403463216158+0.228359663934j))*x[2]**o + ((0.555188754025-0.949288784772j))*x[2]
            ref[(3, 0, 1)]=(-0.416806914357+0.752545640247j)*(1+2.*(dim-1)/(o+1.)) + ((-0.106107413495-1.22777275025j))*dim
            arg[(3, 1, 0)]=(-0.814279689011+0.513856624786j)*x[0]**o + ((0.911482445909+0.252075786101j))*x[0] + ((-0.875193045673+0.230696408105j))*x[1]**o + ((-0.0865660836867-0.558597159362j))*x[1] + ((0.0572212837357-0.985012708958j))*x[2]**o + ((0.528547897635+0.934228957477j))*x[2]
            ref[(3, 1, 0)]=(-1.63225145095-0.240459676066j)*(1+2.*(dim-1)/(o+1.)) + ((1.35346425986+0.627707584216j))*dim
            arg[(3, 1, 1)]=(0.531878747706+0.341946526411j)*x[0]**o + ((0.290504314589+0.0316787820613j))*x[0] + ((-0.734854241873+0.716550320372j))*x[1]**o + ((-0.403324521227+0.0924032251166j))*x[1] + ((0.724118194521-0.470568421081j))*x[2]**o + ((-0.303855553486-0.442080524547j))*x[2]
            ref[(3, 1, 1)]=(0.521142700355+0.587928425702j)*(1+2.*(dim-1)/(o+1.)) + ((-0.416675760124-0.317998517369j))*dim
            arg[(3, 2, 0)]=(0.840598540904-0.338941336852j)*x[0]**o + ((0.0248768400458+0.549835083819j))*x[0] + ((-0.618796035887-0.695629949739j))*x[1]**o + ((-0.0296296616093+0.248715317911j))*x[1] + ((0.0996460620571-0.461520069099j))*x[2]**o + ((-0.648767115467-0.630877771318j))*x[2]
            ref[(3, 2, 0)]=(0.321448567075-1.49609135569j)*(1+2.*(dim-1)/(o+1.)) + ((-0.65351993703+0.167672630413j))*dim
            arg[(3, 2, 1)]=(0.887520941778-0.0599286469845j)*x[0]**o + ((-0.57152507423+0.989057513211j))*x[0] + ((0.334700577322+0.537723425891j))*x[1]**o + ((-0.0238228834198-0.518743485491j))*x[1] + ((0.456599071752+0.262228459676j))*x[2]**o + ((0.50596040227+0.688805536319j))*x[2]
            ref[(3, 2, 1)]=(1.67882059085+0.740023238583j)*(1+2.*(dim-1)/(o+1.)) + ((-0.089387555379+1.15911956404j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4, 4),w)
        ref=numpy.zeros((4, 2, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.153658127993-0.0512084152764j)*x[0]**o + ((-0.445428498557+0.270030040181j))*x[0] + ((-0.0413002978182+0.297664552369j))*x[1]**o + ((0.849745279398+0.660455923467j))*x[1]
            ref[(0, 0, 0, 0)]=(0.112357830175+0.246456137093j)*(1+2.*(dim-1)/(o+1.)) + ((0.404316780841+0.930485963648j))*dim
            arg[(0, 0, 0, 1)]=(-0.0583559930841+0.87427076822j)*x[0]**o + ((0.111246787898-0.534228026046j))*x[0] + ((0.602786345429+0.922912551546j))*x[1]**o + ((-0.6350648774+0.97049951819j))*x[1]
            ref[(0, 0, 0, 1)]=(0.544430352345+1.79718331977j)*(1+2.*(dim-1)/(o+1.)) + ((-0.523818089502+0.436271492145j))*dim
            arg[(0, 0, 0, 2)]=(-0.4132728912+0.680490575627j)*x[0]**o + ((-0.540552310278-0.991927513822j))*x[0] + ((-0.667692338933+0.763588483718j))*x[1]**o + ((0.974843406713-0.579365871173j))*x[1]
            ref[(0, 0, 0, 2)]=(-1.08096523013+1.44407905935j)*(1+2.*(dim-1)/(o+1.)) + ((0.434291096435-1.57129338499j))*dim
            arg[(0, 0, 0, 3)]=(-0.423735342767+0.982051574306j)*x[0]**o + ((0.162077024491+0.0553270313953j))*x[0] + ((-0.928911109485+0.786275774142j))*x[1]**o + ((0.672698998174-0.974175960348j))*x[1]
            ref[(0, 0, 0, 3)]=(-1.35264645225+1.76832734845j)*(1+2.*(dim-1)/(o+1.)) + ((0.834776022666-0.918848928952j))*dim
            arg[(0, 0, 1, 0)]=(-0.723902684675+0.989128095172j)*x[0]**o + ((-0.675525734443-0.326229897008j))*x[0] + ((0.38291047872+0.943986786244j))*x[1]**o + ((-0.106816601808+0.451730129008j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.340992205954+1.93311488142j)*(1+2.*(dim-1)/(o+1.)) + ((-0.782342336251+0.125500232j))*dim
            arg[(0, 0, 1, 1)]=(-0.972319387717-0.891353801706j)*x[0]**o + ((0.882927339909-0.937883111468j))*x[0] + ((-0.278462394411-0.276951385122j))*x[1]**o + ((0.542581513114+0.527120221747j))*x[1]
            ref[(0, 0, 1, 1)]=(-1.25078178213-1.16830518683j)*(1+2.*(dim-1)/(o+1.)) + ((1.42550885302-0.410762889721j))*dim
            arg[(0, 0, 1, 2)]=(0.779365575289-0.207433179239j)*x[0]**o + ((-0.0847601722865-0.0606878435159j))*x[0] + ((-0.72997454513+0.882918457815j))*x[1]**o + ((-0.403981154669-0.98477766373j))*x[1]
            ref[(0, 0, 1, 2)]=(0.0493910301582+0.675485278577j)*(1+2.*(dim-1)/(o+1.)) + ((-0.488741326955-1.04546550725j))*dim
            arg[(0, 0, 1, 3)]=(-0.412528354434+0.589582488913j)*x[0]**o + ((0.426562495063-0.764466378849j))*x[0] + ((-0.0580655577467-0.682399953752j))*x[1]**o + ((-0.516655260838+0.236616643514j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.470593912181-0.0928174648389j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0900927657748-0.527849735335j))*dim
            arg[(0, 0, 2, 0)]=(0.504724636115+0.776087184647j)*x[0]**o + ((0.761451430508+0.18045497969j))*x[0] + ((-0.686833454965+0.184399415537j))*x[1]**o + ((-0.609333052746+0.0249798357827j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.18210881885+0.960486600184j)*(1+2.*(dim-1)/(o+1.)) + ((0.152118377761+0.205434815473j))*dim
            arg[(0, 0, 2, 1)]=(-0.454437659795-0.476034510902j)*x[0]**o + ((0.0496428937362+0.324555689235j))*x[0] + ((0.3879899338-0.0227959540262j))*x[1]**o + ((0.995526722204-0.500735763001j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.0664477259948-0.498830464928j)*(1+2.*(dim-1)/(o+1.)) + ((1.04516961594-0.176180073766j))*dim
            arg[(0, 0, 2, 2)]=(-0.428697382436-0.0990702917172j)*x[0]**o + ((-0.890326003444+0.0820855673668j))*x[0] + ((-0.014649985277+0.244774994933j))*x[1]**o + ((-0.820530611307-0.112127166275j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.443347367713+0.145704703216j)*(1+2.*(dim-1)/(o+1.)) + ((-1.71085661475-0.030041598908j))*dim
            arg[(0, 0, 2, 3)]=(-0.141440265721+0.741995158788j)*x[0]**o + ((0.467346993721+0.61690126759j))*x[0] + ((-0.716335383725-0.193326595698j))*x[1]**o + ((0.477948421299+0.765970717759j))*x[1]
            ref[(0, 0, 2, 3)]=(-0.857775649446+0.548668563091j)*(1+2.*(dim-1)/(o+1.)) + ((0.94529541502+1.38287198535j))*dim
            arg[(0, 0, 3, 0)]=(0.757154591367+0.370160717597j)*x[0]**o + ((-0.690398314549+0.382084738137j))*x[0] + ((0.85849241962-0.343561194077j))*x[1]**o + ((0.430890198258+0.121343626887j))*x[1]
            ref[(0, 0, 3, 0)]=(1.61564701099+0.0265995235193j)*(1+2.*(dim-1)/(o+1.)) + ((-0.259508116291+0.503428365023j))*dim
            arg[(0, 0, 3, 1)]=(0.361038426692+0.670396393182j)*x[0]**o + ((-0.196495355024-0.422075833367j))*x[0] + ((0.821249588232+0.299421683814j))*x[1]**o + ((0.396373180334+0.883224095259j))*x[1]
            ref[(0, 0, 3, 1)]=(1.18228801492+0.969818076996j)*(1+2.*(dim-1)/(o+1.)) + ((0.19987782531+0.461148261892j))*dim
            arg[(0, 0, 3, 2)]=(-0.0845404825452-0.0385319313353j)*x[0]**o + ((0.0440450666052-0.603128228001j))*x[0] + ((0.00717181673015+0.00285436550145j))*x[1]**o + ((-0.214726282083+0.715496404135j))*x[1]
            ref[(0, 0, 3, 2)]=(-0.0773686658151-0.0356775658338j)*(1+2.*(dim-1)/(o+1.)) + ((-0.170681215478+0.112368176135j))*dim
            arg[(0, 0, 3, 3)]=(-0.854721460345+0.896018969214j)*x[0]**o + ((-0.00556580990462-0.539257461309j))*x[0] + ((0.608274968348-0.928946590187j))*x[1]**o + ((-0.347400018036-0.275546285631j))*x[1]
            ref[(0, 0, 3, 3)]=(-0.246446491997-0.0329276209729j)*(1+2.*(dim-1)/(o+1.)) + ((-0.352965827941-0.81480374694j))*dim
            arg[(0, 1, 0, 0)]=(0.187113641598+0.679340658111j)*x[0]**o + ((0.292826868763+0.446867489978j))*x[0] + ((-0.887315135565-0.0943745018928j))*x[1]**o + ((-0.744786787925+0.872125261117j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.700201493967+0.584966156219j)*(1+2.*(dim-1)/(o+1.)) + ((-0.451959919162+1.3189927511j))*dim
            arg[(0, 1, 0, 1)]=(0.700350283212-0.912311940199j)*x[0]**o + ((0.29511222653-0.937624089449j))*x[0] + ((-0.789905217902-0.555342753786j))*x[1]**o + ((-0.156888172881-0.445788153577j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.0895549346898-1.46765469399j)*(1+2.*(dim-1)/(o+1.)) + ((0.138224053649-1.38341224303j))*dim
            arg[(0, 1, 0, 2)]=(0.375261210622+0.675695009436j)*x[0]**o + ((0.902336872867-0.565681926949j))*x[0] + ((-0.729807883695+0.140925321807j))*x[1]**o + ((0.963907134379+0.314408258369j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.354546673073+0.816620331243j)*(1+2.*(dim-1)/(o+1.)) + ((1.86624400725-0.25127366858j))*dim
            arg[(0, 1, 0, 3)]=(0.649629695299+0.0103705988281j)*x[0]**o + ((0.0794517341735-0.116803971954j))*x[0] + ((-0.356311207769-0.777945806304j))*x[1]**o + ((-0.1225165786+0.0144941046842j))*x[1]
            ref[(0, 1, 0, 3)]=(0.29331848753-0.767575207476j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0430648444262-0.102309867269j))*dim
            arg[(0, 1, 1, 0)]=(-0.500185615097+0.336346501624j)*x[0]**o + ((0.0342790008016+0.729477789967j))*x[0] + ((0.457151629446-0.528304977238j))*x[1]**o + ((-0.849470979519+0.462644119032j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.0430339856516-0.191958475614j)*(1+2.*(dim-1)/(o+1.)) + ((-0.815191978717+1.192121909j))*dim
            arg[(0, 1, 1, 1)]=(0.0815683954304-0.379988077984j)*x[0]**o + ((-0.867169021249+0.88829907237j))*x[0] + ((0.699736099226-0.851329699551j))*x[1]**o + ((-0.797047051407-0.995419964363j))*x[1]
            ref[(0, 1, 1, 1)]=(0.781304494656-1.23131777753j)*(1+2.*(dim-1)/(o+1.)) + ((-1.66421607266-0.107120891992j))*dim
            arg[(0, 1, 1, 2)]=(-0.817632866122-0.641407635322j)*x[0]**o + ((0.749350053185-0.146328981498j))*x[0] + ((-0.6957488079-0.256624218062j))*x[1]**o + ((-0.783281449621+0.936453398916j))*x[1]
            ref[(0, 1, 1, 2)]=(-1.51338167402-0.898031853384j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0339313964357+0.790124417418j))*dim
            arg[(0, 1, 1, 3)]=(0.213186976504-0.323060684077j)*x[0]**o + ((-0.901338043334+0.24802590161j))*x[0] + ((0.700816587118+0.447156499269j))*x[1]**o + ((-0.679311261034+0.287886273494j))*x[1]
            ref[(0, 1, 1, 3)]=(0.914003563623+0.124095815192j)*(1+2.*(dim-1)/(o+1.)) + ((-1.58064930437+0.535912175104j))*dim
            arg[(0, 1, 2, 0)]=(-0.152784657764-0.701378376769j)*x[0]**o + ((-0.552258442366-0.247856120783j))*x[0] + ((-0.932823901976-0.385389394818j))*x[1]**o + ((-0.940279144852-0.612271366277j))*x[1]
            ref[(0, 1, 2, 0)]=(-1.08560855974-1.08676777159j)*(1+2.*(dim-1)/(o+1.)) + ((-1.49253758722-0.860127487061j))*dim
            arg[(0, 1, 2, 1)]=(0.0449309752192-0.101473959245j)*x[0]**o + ((-0.780133424327+0.397495809416j))*x[0] + ((-0.0775172803662-0.745835115948j))*x[1]**o + ((0.282331776324-0.227313090469j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.032586305147-0.847309075194j)*(1+2.*(dim-1)/(o+1.)) + ((-0.497801648002+0.170182718947j))*dim
            arg[(0, 1, 2, 2)]=(-0.0904506382813+0.661622877607j)*x[0]**o + ((-0.899209293723-0.0681515355624j))*x[0] + ((0.297226137883+0.766305814547j))*x[1]**o + ((-0.127811469453-0.394237565278j))*x[1]
            ref[(0, 1, 2, 2)]=(0.206775499601+1.42792869215j)*(1+2.*(dim-1)/(o+1.)) + ((-1.02702076318-0.46238910084j))*dim
            arg[(0, 1, 2, 3)]=(0.808694057822-0.324430819735j)*x[0]**o + ((0.352762198356+0.832978742337j))*x[0] + ((-0.796491823341+0.365967204327j))*x[1]**o + ((-0.0811360442616-0.459586829891j))*x[1]
            ref[(0, 1, 2, 3)]=(0.0122022344805+0.041536384592j)*(1+2.*(dim-1)/(o+1.)) + ((0.271626154095+0.373391912445j))*dim
            arg[(0, 1, 3, 0)]=(0.708480412642-0.0116635624951j)*x[0]**o + ((0.778185390975-0.0496603329438j))*x[0] + ((0.279149711117-0.642770842728j))*x[1]**o + ((0.949128813808+0.631589954043j))*x[1]
            ref[(0, 1, 3, 0)]=(0.987630123759-0.654434405223j)*(1+2.*(dim-1)/(o+1.)) + ((1.72731420478+0.581929621099j))*dim
            arg[(0, 1, 3, 1)]=(0.953403159194-0.443323594241j)*x[0]**o + ((0.00146293374622-0.456148640547j))*x[0] + ((-0.716308507661-0.436870048549j))*x[1]**o + ((0.923831976523-0.846922935655j))*x[1]
            ref[(0, 1, 3, 1)]=(0.237094651532-0.88019364279j)*(1+2.*(dim-1)/(o+1.)) + ((0.925294910269-1.3030715762j))*dim
            arg[(0, 1, 3, 2)]=(0.96049993885+0.964782517181j)*x[0]**o + ((0.648023913014+0.886816092275j))*x[0] + ((0.983966065205-0.261194883304j))*x[1]**o + ((-0.606789854564+0.190412738738j))*x[1]
            ref[(0, 1, 3, 2)]=(1.94446600405+0.703587633877j)*(1+2.*(dim-1)/(o+1.)) + ((0.0412340584499+1.07722883101j))*dim
            arg[(0, 1, 3, 3)]=(0.452805243065-0.810226806811j)*x[0]**o + ((-0.773513261559+0.380336573329j))*x[0] + ((0.610495403619+0.774970043552j))*x[1]**o + ((0.732707558064-0.226774416047j))*x[1]
            ref[(0, 1, 3, 3)]=(1.06330064668-0.0352567632595j)*(1+2.*(dim-1)/(o+1.)) + ((-0.040805703495+0.153562157283j))*dim
            arg[(1, 0, 0, 0)]=(-0.599621802163+0.412979597008j)*x[0]**o + ((0.323200489131+0.750817656923j))*x[0] + ((-0.338418774737+0.0107108457683j))*x[1]**o + ((-0.616050012162+0.624773140094j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.9380405769+0.423690442776j)*(1+2.*(dim-1)/(o+1.)) + ((-0.292849523032+1.37559079702j))*dim
            arg[(1, 0, 0, 1)]=(0.264397603565-0.69731392138j)*x[0]**o + ((-0.275240358223-0.0217543438731j))*x[0] + ((0.0834955719372+0.725628701638j))*x[1]**o + ((0.751555244148-0.954656943j))*x[1]
            ref[(1, 0, 0, 1)]=(0.347893175502+0.0283147802578j)*(1+2.*(dim-1)/(o+1.)) + ((0.476314885925-0.976411286873j))*dim
            arg[(1, 0, 0, 2)]=(0.727849280588-0.139161894475j)*x[0]**o + ((0.281498694921-0.639274751536j))*x[0] + ((-0.00154770467402+0.333117952103j))*x[1]**o + ((0.805504957469+0.270684383985j))*x[1]
            ref[(1, 0, 0, 2)]=(0.726301575914+0.193956057628j)*(1+2.*(dim-1)/(o+1.)) + ((1.08700365239-0.36859036755j))*dim
            arg[(1, 0, 0, 3)]=(0.465585354048+0.566887957976j)*x[0]**o + ((-0.40471768983-0.5312379664j))*x[0] + ((0.0649332740425-0.565502070153j))*x[1]**o + ((-0.734869243533-0.276356471064j))*x[1]
            ref[(1, 0, 0, 3)]=(0.53051862809+0.00138588782284j)*(1+2.*(dim-1)/(o+1.)) + ((-1.13958693336-0.807594437464j))*dim
            arg[(1, 0, 1, 0)]=(0.112414659114-0.593733783679j)*x[0]**o + ((0.549806815384+0.90995530682j))*x[0] + ((0.348924465452-0.862467588019j))*x[1]**o + ((0.601088261272-0.687617493538j))*x[1]
            ref[(1, 0, 1, 0)]=(0.461339124566-1.4562013717j)*(1+2.*(dim-1)/(o+1.)) + ((1.15089507666+0.222337813282j))*dim
            arg[(1, 0, 1, 1)]=(-0.161777566615+0.843593987655j)*x[0]**o + ((0.597814511041-0.666843268332j))*x[0] + ((0.95485389402-0.679731497351j))*x[1]**o + ((-0.0374510681807+0.309636630075j))*x[1]
            ref[(1, 0, 1, 1)]=(0.793076327405+0.163862490305j)*(1+2.*(dim-1)/(o+1.)) + ((0.56036344286-0.357206638257j))*dim
            arg[(1, 0, 1, 2)]=(-0.863025550219-0.340616504254j)*x[0]**o + ((0.79148436892-0.20952769272j))*x[0] + ((-0.354690415295+0.294185738925j))*x[1]**o + ((-0.364912194051-0.82027647876j))*x[1]
            ref[(1, 0, 1, 2)]=(-1.21771596551-0.0464307653288j)*(1+2.*(dim-1)/(o+1.)) + ((0.426572174869-1.02980417148j))*dim
            arg[(1, 0, 1, 3)]=(0.756404310753-0.849939179641j)*x[0]**o + ((-0.256179238279-0.462405372754j))*x[0] + ((0.612966193452-0.680961237848j))*x[1]**o + ((0.734109695484-0.744907491252j))*x[1]
            ref[(1, 0, 1, 3)]=(1.36937050421-1.53090041749j)*(1+2.*(dim-1)/(o+1.)) + ((0.477930457205-1.20731286401j))*dim
            arg[(1, 0, 2, 0)]=(-0.656374753916+0.380380810683j)*x[0]**o + ((0.634303068721+0.495830814915j))*x[0] + ((-0.7022802067+0.251932464165j))*x[1]**o + ((0.82875709786+0.171424099041j))*x[1]
            ref[(1, 0, 2, 0)]=(-1.35865496062+0.632313274848j)*(1+2.*(dim-1)/(o+1.)) + ((1.46306016658+0.667254913956j))*dim
            arg[(1, 0, 2, 1)]=(-0.0172556961877-0.411300538168j)*x[0]**o + ((-0.535727646087+0.171152487566j))*x[0] + ((-0.260511819416-0.591773071278j))*x[1]**o + ((-0.779032539981-0.197845649238j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.277767515604-1.00307360945j)*(1+2.*(dim-1)/(o+1.)) + ((-1.31476018607-0.0266931616713j))*dim
            arg[(1, 0, 2, 2)]=(0.173329643812+0.146266768827j)*x[0]**o + ((-0.874659579789+0.44308964289j))*x[0] + ((0.0583145015453-0.330970545222j))*x[1]**o + ((-0.205107445319-0.608144556572j))*x[1]
            ref[(1, 0, 2, 2)]=(0.231644145357-0.184703776395j)*(1+2.*(dim-1)/(o+1.)) + ((-1.07976702511-0.165054913682j))*dim
            arg[(1, 0, 2, 3)]=(0.321055797844+0.429872019136j)*x[0]**o + ((-0.474632688409-0.69583694888j))*x[0] + ((0.955766055778+0.147297246768j))*x[1]**o + ((-0.480098161085+0.349233245977j))*x[1]
            ref[(1, 0, 2, 3)]=(1.27682185362+0.577169265903j)*(1+2.*(dim-1)/(o+1.)) + ((-0.954730849494-0.346603702903j))*dim
            arg[(1, 0, 3, 0)]=(-0.347624977634+0.584885865034j)*x[0]**o + ((0.0923760576655+0.107996394903j))*x[0] + ((-0.27646135155-0.409471298802j))*x[1]**o + ((-0.384526678765+0.568707043394j))*x[1]
            ref[(1, 0, 3, 0)]=(-0.624086329185+0.175414566232j)*(1+2.*(dim-1)/(o+1.)) + ((-0.292150621099+0.676703438297j))*dim
            arg[(1, 0, 3, 1)]=(-0.172765675155+0.0909867336801j)*x[0]**o + ((0.464281858038-0.311097158272j))*x[0] + ((-0.259817588514-0.509566776013j))*x[1]**o + ((-0.924445896295-0.819716247212j))*x[1]
            ref[(1, 0, 3, 1)]=(-0.43258326367-0.418580042333j)*(1+2.*(dim-1)/(o+1.)) + ((-0.460164038257-1.13081340548j))*dim
            arg[(1, 0, 3, 2)]=(0.186501438519+0.787161817518j)*x[0]**o + ((0.470785095637-0.00293821687908j))*x[0] + ((0.717924911443+0.59201584695j))*x[1]**o + ((0.410859563363-0.264611334971j))*x[1]
            ref[(1, 0, 3, 2)]=(0.904426349961+1.37917766447j)*(1+2.*(dim-1)/(o+1.)) + ((0.881644659-0.26754955185j))*dim
            arg[(1, 0, 3, 3)]=(-0.922893747015+0.645729590343j)*x[0]**o + ((0.729247829853-0.998313597627j))*x[0] + ((0.30069569615-0.0512765748149j))*x[1]**o + ((0.394291755723+0.728483871223j))*x[1]
            ref[(1, 0, 3, 3)]=(-0.622198050865+0.594453015528j)*(1+2.*(dim-1)/(o+1.)) + ((1.12353958558-0.269829726404j))*dim
            arg[(1, 1, 0, 0)]=(0.139328562502-0.679764645204j)*x[0]**o + ((-0.693815818994-0.588488830244j))*x[0] + ((-0.232719526548-0.286918425373j))*x[1]**o + ((0.795262165681+0.606114780763j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.0933909640459-0.966683070577j)*(1+2.*(dim-1)/(o+1.)) + ((0.101446346687+0.017625950519j))*dim
            arg[(1, 1, 0, 1)]=(0.341755201928+0.375633118928j)*x[0]**o + ((-0.0217361160322-0.97839751831j))*x[0] + ((-0.443283400296+0.690755106898j))*x[1]**o + ((-0.969004750868+0.544242186857j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.101528198368+1.06638822583j)*(1+2.*(dim-1)/(o+1.)) + ((-0.9907408669-0.434155331453j))*dim
            arg[(1, 1, 0, 2)]=(0.869108255786+0.831692442168j)*x[0]**o + ((-0.0349102707804-0.904410380022j))*x[0] + ((0.594012350445-0.193697013642j))*x[1]**o + ((0.0927498540238-0.0345341064187j))*x[1]
            ref[(1, 1, 0, 2)]=(1.46312060623+0.637995428526j)*(1+2.*(dim-1)/(o+1.)) + ((0.0578395832434-0.93894448644j))*dim
            arg[(1, 1, 0, 3)]=(-0.813838147606-0.0807049329211j)*x[0]**o + ((-0.808795091038+0.0691399652103j))*x[0] + ((-0.860631181505-0.124562059706j))*x[1]**o + ((-0.705299812305+0.860872889569j))*x[1]
            ref[(1, 1, 0, 3)]=(-1.67446932911-0.205266992627j)*(1+2.*(dim-1)/(o+1.)) + ((-1.51409490334+0.930012854779j))*dim
            arg[(1, 1, 1, 0)]=(0.445720105287+0.184740738847j)*x[0]**o + ((-0.293020425393-0.876094974993j))*x[0] + ((-0.567163968721+0.0299338565358j))*x[1]**o + ((0.754201018255+0.793921619011j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.121443863434+0.214674595383j)*(1+2.*(dim-1)/(o+1.)) + ((0.461180592862-0.0821733559821j))*dim
            arg[(1, 1, 1, 1)]=(0.97505989291+0.687328270665j)*x[0]**o + ((0.725785075816-0.992732320566j))*x[0] + ((0.811636006475-0.19743401733j))*x[1]**o + ((0.126958633512-0.849164572108j))*x[1]
            ref[(1, 1, 1, 1)]=(1.78669589938+0.489894253335j)*(1+2.*(dim-1)/(o+1.)) + ((0.852743709328-1.84189689267j))*dim
            arg[(1, 1, 1, 2)]=(0.0181243600427+0.751002377445j)*x[0]**o + ((-0.69683659058-0.400143374982j))*x[0] + ((0.18331263982+0.166471978864j))*x[1]**o + ((-0.446542185582-0.265624135187j))*x[1]
            ref[(1, 1, 1, 2)]=(0.201436999863+0.917474356309j)*(1+2.*(dim-1)/(o+1.)) + ((-1.14337877616-0.665767510169j))*dim
            arg[(1, 1, 1, 3)]=(0.106279882388-0.852092090116j)*x[0]**o + ((0.0526589782617-0.885119760338j))*x[0] + ((-0.254775450315+0.786595574478j))*x[1]**o + ((-0.642580199979-0.282190912101j))*x[1]
            ref[(1, 1, 1, 3)]=(-0.148495567927-0.0654965156383j)*(1+2.*(dim-1)/(o+1.)) + ((-0.589921221717-1.16731067244j))*dim
            arg[(1, 1, 2, 0)]=(0.256589244191+0.871488833549j)*x[0]**o + ((-0.654996395019-0.477736691116j))*x[0] + ((-0.830985797413+0.0396697085533j))*x[1]**o + ((-0.652535393178+0.229569839917j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.574396553222+0.911158542103j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3075317882-0.248166851199j))*dim
            arg[(1, 1, 2, 1)]=(-0.567055637738-0.406917963759j)*x[0]**o + ((-0.637407237998+0.083708520922j))*x[0] + ((0.903103697491-0.463336321757j))*x[1]**o + ((0.911876465856+0.27003311535j))*x[1]
            ref[(1, 1, 2, 1)]=(0.336048059752-0.870254285516j)*(1+2.*(dim-1)/(o+1.)) + ((0.274469227858+0.353741636272j))*dim
            arg[(1, 1, 2, 2)]=(-0.0220861554948+0.466769766032j)*x[0]**o + ((0.776918350642+0.426009027632j))*x[0] + ((0.153019075663+0.374680156173j))*x[1]**o + ((0.306030762794-0.761659637366j))*x[1]
            ref[(1, 1, 2, 2)]=(0.130932920168+0.841449922206j)*(1+2.*(dim-1)/(o+1.)) + ((1.08294911344-0.335650609733j))*dim
            arg[(1, 1, 2, 3)]=(-0.154519236689-0.476579712727j)*x[0]**o + ((-0.75575022711+0.538551194508j))*x[0] + ((-0.468023782473-0.177788164584j))*x[1]**o + ((-0.137142227232-0.366422679023j))*x[1]
            ref[(1, 1, 2, 3)]=(-0.622543019163-0.654367877311j)*(1+2.*(dim-1)/(o+1.)) + ((-0.892892454342+0.172128515485j))*dim
            arg[(1, 1, 3, 0)]=(0.921258386171-0.285511147846j)*x[0]**o + ((-0.937643231458-0.895550481083j))*x[0] + ((0.642035700685-0.729576918431j))*x[1]**o + ((0.370276990668-0.85484588972j))*x[1]
            ref[(1, 1, 3, 0)]=(1.56329408686-1.01508806628j)*(1+2.*(dim-1)/(o+1.)) + ((-0.56736624079-1.7503963708j))*dim
            arg[(1, 1, 3, 1)]=(-0.0509930322886-0.258393400009j)*x[0]**o + ((-0.625033135254-0.472828412833j))*x[0] + ((-0.101457480809-0.187034335474j))*x[1]**o + ((-0.243171876702-0.821244330064j))*x[1]
            ref[(1, 1, 3, 1)]=(-0.152450513098-0.445427735482j)*(1+2.*(dim-1)/(o+1.)) + ((-0.868205011955-1.2940727429j))*dim
            arg[(1, 1, 3, 2)]=(0.0567625917823+0.868536679042j)*x[0]**o + ((-0.246970203045+0.0747318146042j))*x[0] + ((0.338360758793+0.344657449806j))*x[1]**o + ((-0.97751606681-0.466356608172j))*x[1]
            ref[(1, 1, 3, 2)]=(0.395123350575+1.21319412885j)*(1+2.*(dim-1)/(o+1.)) + ((-1.22448626986-0.391624793568j))*dim
            arg[(1, 1, 3, 3)]=(-0.350443347313+0.97814167133j)*x[0]**o + ((-0.525843765316-0.691116607921j))*x[0] + ((0.39811055729+0.0269335617621j))*x[1]**o + ((-0.845081996374-0.243995479276j))*x[1]
            ref[(1, 1, 3, 3)]=(0.0476672099764+1.00507523309j)*(1+2.*(dim-1)/(o+1.)) + ((-1.37092576169-0.935112087197j))*dim
            arg[(2, 0, 0, 0)]=(-0.568842912718+0.856241529131j)*x[0]**o + ((-0.686169555407+0.136578625752j))*x[0] + ((0.357282526225-0.511006210234j))*x[1]**o + ((0.32537135513+0.298037493571j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.211560386493+0.345235318897j)*(1+2.*(dim-1)/(o+1.)) + ((-0.360798200277+0.434616119323j))*dim
            arg[(2, 0, 0, 1)]=(-0.296561283526+0.830151925079j)*x[0]**o + ((0.525686288443-0.737616125957j))*x[0] + ((0.744119456906+0.413694914676j))*x[1]**o + ((-0.638773652924+0.315124312606j))*x[1]
            ref[(2, 0, 0, 1)]=(0.44755817338+1.24384683976j)*(1+2.*(dim-1)/(o+1.)) + ((-0.113087364481-0.42249181335j))*dim
            arg[(2, 0, 0, 2)]=(-0.278260477198-0.230861293449j)*x[0]**o + ((0.00307341618604-0.155464093659j))*x[0] + ((0.332905349997+0.71744749295j))*x[1]**o + ((-0.882163410958+0.788942866273j))*x[1]
            ref[(2, 0, 0, 2)]=(0.054644872799+0.486586199501j)*(1+2.*(dim-1)/(o+1.)) + ((-0.879089994772+0.633478772614j))*dim
            arg[(2, 0, 0, 3)]=(-0.750598093602-0.00162613218047j)*x[0]**o + ((-0.0455236068564-0.668288342956j))*x[0] + ((-0.0673436685701+0.59650606273j))*x[1]**o + ((0.521648240994-0.172261832126j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.817941762172+0.594879930549j)*(1+2.*(dim-1)/(o+1.)) + ((0.476124634138-0.840550175082j))*dim
            arg[(2, 0, 1, 0)]=(0.634144010782-0.302958398125j)*x[0]**o + ((-0.576204021145-0.177344807829j))*x[0] + ((-0.120415790565+0.566241648482j))*x[1]**o + ((-0.163076444332+0.683179528901j))*x[1]
            ref[(2, 0, 1, 0)]=(0.513728220217+0.263283250357j)*(1+2.*(dim-1)/(o+1.)) + ((-0.739280465478+0.505834721072j))*dim
            arg[(2, 0, 1, 1)]=(-0.0634362988355-0.867859066964j)*x[0]**o + ((-0.354293902078-0.706371456745j))*x[0] + ((-0.53051497472-0.256686349331j))*x[1]**o + ((0.552736871883+0.492279713118j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.593951273555-1.12454541629j)*(1+2.*(dim-1)/(o+1.)) + ((0.198442969805-0.214091743626j))*dim
            arg[(2, 0, 1, 2)]=(0.452401209448+0.607136612035j)*x[0]**o + ((0.893860003005+0.0132405545948j))*x[0] + ((0.0232146209216-0.672095245602j))*x[1]**o + ((-0.639823775588+0.746135349027j))*x[1]
            ref[(2, 0, 1, 2)]=(0.475615830369-0.0649586335671j)*(1+2.*(dim-1)/(o+1.)) + ((0.254036227417+0.759375903622j))*dim
            arg[(2, 0, 1, 3)]=(-0.318858250741+0.804485972515j)*x[0]**o + ((0.220400374693-0.910474998936j))*x[0] + ((-0.061694977534+0.358185160361j))*x[1]**o + ((-0.416625915141+0.196051271372j))*x[1]
            ref[(2, 0, 1, 3)]=(-0.380553228275+1.16267113288j)*(1+2.*(dim-1)/(o+1.)) + ((-0.196225540448-0.714423727564j))*dim
            arg[(2, 0, 2, 0)]=(-0.345724638198-0.472061822781j)*x[0]**o + ((0.431221752441+0.0691671941612j))*x[0] + ((-0.462860648645+0.174901798712j))*x[1]**o + ((0.812115701056+0.414526705681j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.808585286843-0.29716002407j)*(1+2.*(dim-1)/(o+1.)) + ((1.2433374535+0.483693899842j))*dim
            arg[(2, 0, 2, 1)]=(0.871322491488-0.235944969845j)*x[0]**o + ((-0.640431389187-0.944287042793j))*x[0] + ((-0.62028563322+0.0883696746338j))*x[1]**o + ((-0.224614930631+0.986881098435j))*x[1]
            ref[(2, 0, 2, 1)]=(0.251036858268-0.147575295211j)*(1+2.*(dim-1)/(o+1.)) + ((-0.865046319818+0.0425940556422j))*dim
            arg[(2, 0, 2, 2)]=(-0.202253770674-0.620572023279j)*x[0]**o + ((-0.515437299628-0.241712713084j))*x[0] + ((0.963617335652+0.411032535635j))*x[1]**o + ((-0.474292841264+0.769842459438j))*x[1]
            ref[(2, 0, 2, 2)]=(0.761363564978-0.209539487644j)*(1+2.*(dim-1)/(o+1.)) + ((-0.989730140892+0.528129746354j))*dim
            arg[(2, 0, 2, 3)]=(0.743113943679-0.298066939688j)*x[0]**o + ((0.966986625518-0.739154965085j))*x[0] + ((0.0797794518315-0.671760529928j))*x[1]**o + ((0.105297415128+0.552741492558j))*x[1]
            ref[(2, 0, 2, 3)]=(0.822893395511-0.969827469616j)*(1+2.*(dim-1)/(o+1.)) + ((1.07228404065-0.186413472528j))*dim
            arg[(2, 0, 3, 0)]=(0.327664240206+0.522827006365j)*x[0]**o + ((-0.889305093676-0.113092036385j))*x[0] + ((-0.481431574809-0.773498461835j))*x[1]**o + ((0.154897642156+0.604324042818j))*x[1]
            ref[(2, 0, 3, 0)]=(-0.153767334603-0.25067145547j)*(1+2.*(dim-1)/(o+1.)) + ((-0.73440745152+0.491232006433j))*dim
            arg[(2, 0, 3, 1)]=(-0.646625111087+0.196105793137j)*x[0]**o + ((-0.571962115981+0.128573188411j))*x[0] + ((0.0960326929986+0.905712818252j))*x[1]**o + ((-0.3376353717-0.444910910383j))*x[1]
            ref[(2, 0, 3, 1)]=(-0.550592418088+1.10181861139j)*(1+2.*(dim-1)/(o+1.)) + ((-0.909597487681-0.316337721972j))*dim
            arg[(2, 0, 3, 2)]=(-0.289532227998-0.0487162698083j)*x[0]**o + ((0.929204982629+0.701411855178j))*x[0] + ((-0.981835709605-0.577831910074j))*x[1]**o + ((0.164314421285+0.173092189789j))*x[1]
            ref[(2, 0, 3, 2)]=(-1.2713679376-0.626548179882j)*(1+2.*(dim-1)/(o+1.)) + ((1.09351940391+0.874504044967j))*dim
            arg[(2, 0, 3, 3)]=(0.585513229458-0.880176866441j)*x[0]**o + ((0.719879664671-0.884478635901j))*x[0] + ((0.728810947107-0.294717978168j))*x[1]**o + ((0.0448632793342+0.960413142985j))*x[1]
            ref[(2, 0, 3, 3)]=(1.31432417656-1.17489484461j)*(1+2.*(dim-1)/(o+1.)) + ((0.764742944006+0.0759345070834j))*dim
            arg[(2, 1, 0, 0)]=(-0.935942443325-0.42498350526j)*x[0]**o + ((0.353308043024+0.0576950809118j))*x[0] + ((-0.308124231311-0.182536587724j))*x[1]**o + ((0.705297660989-0.0617554412097j))*x[1]
            ref[(2, 1, 0, 0)]=(-1.24406667464-0.607520092984j)*(1+2.*(dim-1)/(o+1.)) + ((1.05860570401-0.00406036029788j))*dim
            arg[(2, 1, 0, 1)]=(-0.151419591711+0.244842887947j)*x[0]**o + ((-0.560219942821-0.116404762432j))*x[0] + ((0.862805887763-0.60157159962j))*x[1]**o + ((0.201867590092+0.064525785001j))*x[1]
            ref[(2, 1, 0, 1)]=(0.711386296052-0.356728711673j)*(1+2.*(dim-1)/(o+1.)) + ((-0.358352352729-0.0518789774314j))*dim
            arg[(2, 1, 0, 2)]=(0.541389238028+0.955105053916j)*x[0]**o + ((-0.825713579837-0.181904976871j))*x[0] + ((-0.716986905779-0.977817414456j))*x[1]**o + ((0.907514100946-0.576516018525j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.175597667752-0.0227123605395j)*(1+2.*(dim-1)/(o+1.)) + ((0.0818005211083-0.758420995396j))*dim
            arg[(2, 1, 0, 3)]=(0.281590871738-0.513150643139j)*x[0]**o + ((-0.766531551496+0.454598300598j))*x[0] + ((-0.257093377497+0.865419900276j))*x[1]**o + ((-0.961478977681-0.104475717393j))*x[1]
            ref[(2, 1, 0, 3)]=(0.0244974942407+0.352269257138j)*(1+2.*(dim-1)/(o+1.)) + ((-1.72801052918+0.350122583205j))*dim
            arg[(2, 1, 1, 0)]=(0.81260094864+0.169898177685j)*x[0]**o + ((0.39589079491+0.919364832406j))*x[0] + ((-0.256193399336+0.51630393209j))*x[1]**o + ((-0.644196783264+0.221632521152j))*x[1]
            ref[(2, 1, 1, 0)]=(0.556407549304+0.686202109774j)*(1+2.*(dim-1)/(o+1.)) + ((-0.248305988354+1.14099735356j))*dim
            arg[(2, 1, 1, 1)]=(-0.114690685185+0.478530608923j)*x[0]**o + ((0.55936095328+0.398248545895j))*x[0] + ((-0.372066933509-0.31311100413j))*x[1]**o + ((-0.270925854949-0.833209271258j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.486757618694+0.165419604793j)*(1+2.*(dim-1)/(o+1.)) + ((0.288435098332-0.434960725363j))*dim
            arg[(2, 1, 1, 2)]=(-0.489882373021+0.994690830711j)*x[0]**o + ((-0.268437601207+0.336869300309j))*x[0] + ((-0.164095247252-0.99793459062j))*x[1]**o + ((0.430001516631+0.417580748446j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.653977620274-0.00324375990929j)*(1+2.*(dim-1)/(o+1.)) + ((0.161563915424+0.754450048755j))*dim
            arg[(2, 1, 1, 3)]=(-0.465815127588-0.398543859265j)*x[0]**o + ((0.762855983845+0.91580698425j))*x[0] + ((-0.562990463452-0.460707320709j))*x[1]**o + ((-0.190720821479-0.611676084113j))*x[1]
            ref[(2, 1, 1, 3)]=(-1.02880559104-0.859251179974j)*(1+2.*(dim-1)/(o+1.)) + ((0.572135162366+0.304130900137j))*dim
            arg[(2, 1, 2, 0)]=(0.0242894883332+0.264138018534j)*x[0]**o + ((-0.97114918733+0.913960557494j))*x[0] + ((0.38910870024-0.911843655758j))*x[1]**o + ((0.251609820086-0.612715088831j))*x[1]
            ref[(2, 1, 2, 0)]=(0.413398188573-0.647705637223j)*(1+2.*(dim-1)/(o+1.)) + ((-0.719539367245+0.301245468663j))*dim
            arg[(2, 1, 2, 1)]=(0.127601079995-0.747036480625j)*x[0]**o + ((0.715002170719+0.199575653915j))*x[0] + ((-0.218644503719+0.851830511921j))*x[1]**o + ((0.155431400126-0.723664440156j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.091043423724+0.104794031296j)*(1+2.*(dim-1)/(o+1.)) + ((0.870433570845-0.524088786241j))*dim
            arg[(2, 1, 2, 2)]=(0.307872918213+0.134956564014j)*x[0]**o + ((0.0940971207722+0.843009062121j))*x[0] + ((0.0676870037834-0.0309129580231j))*x[1]**o + ((0.0177776597755-0.177042637122j))*x[1]
            ref[(2, 1, 2, 2)]=(0.375559921996+0.104043605991j)*(1+2.*(dim-1)/(o+1.)) + ((0.111874780548+0.665966424998j))*dim
            arg[(2, 1, 2, 3)]=(0.178903050277+0.0996685734903j)*x[0]**o + ((0.938998757218+0.818700787343j))*x[0] + ((0.175519411527+0.953249388811j))*x[1]**o + ((-0.395145144888+0.00626815308809j))*x[1]
            ref[(2, 1, 2, 3)]=(0.354422461805+1.0529179623j)*(1+2.*(dim-1)/(o+1.)) + ((0.54385361233+0.824968940431j))*dim
            arg[(2, 1, 3, 0)]=(0.044975976696-0.964331209967j)*x[0]**o + ((0.906983849727+0.349887622116j))*x[0] + ((0.429701673355-0.578905226505j))*x[1]**o + ((-0.61851332884-0.291348676946j))*x[1]
            ref[(2, 1, 3, 0)]=(0.474677650051-1.54323643647j)*(1+2.*(dim-1)/(o+1.)) + ((0.288470520887+0.0585389451696j))*dim
            arg[(2, 1, 3, 1)]=(-0.412011758575+0.540517067385j)*x[0]**o + ((-0.558392381675+0.680375674895j))*x[0] + ((0.485792084163+0.217574391548j))*x[1]**o + ((0.28763848429-0.380100028017j))*x[1]
            ref[(2, 1, 3, 1)]=(0.0737803255883+0.758091458933j)*(1+2.*(dim-1)/(o+1.)) + ((-0.270753897386+0.300275646877j))*dim
            arg[(2, 1, 3, 2)]=(0.57445554306+0.712365001863j)*x[0]**o + ((-0.627886823571-0.246355053417j))*x[0] + ((-0.662405145539-0.661026025771j))*x[1]**o + ((-0.440569130515-0.417004505427j))*x[1]
            ref[(2, 1, 3, 2)]=(-0.087949602479+0.0513389760927j)*(1+2.*(dim-1)/(o+1.)) + ((-1.06845595409-0.663359558844j))*dim
            arg[(2, 1, 3, 3)]=(0.534556361242+0.0292883497938j)*x[0]**o + ((-0.0204050760583+0.248429618216j))*x[0] + ((0.673055849623-0.980008017796j))*x[1]**o + ((-0.791172666741-0.0124672583425j))*x[1]
            ref[(2, 1, 3, 3)]=(1.20761221087-0.950719668002j)*(1+2.*(dim-1)/(o+1.)) + ((-0.811577742799+0.235962359874j))*dim
            arg[(3, 0, 0, 0)]=(0.443309233334+0.147048059409j)*x[0]**o + ((0.496499273542-0.360542535759j))*x[0] + ((0.870115886005+0.192264122596j))*x[1]**o + ((-0.174029148164-0.534961408959j))*x[1]
            ref[(3, 0, 0, 0)]=(1.31342511934+0.339312182005j)*(1+2.*(dim-1)/(o+1.)) + ((0.322470125378-0.895503944717j))*dim
            arg[(3, 0, 0, 1)]=(0.502226094449+0.630652148423j)*x[0]**o + ((0.659301927842+0.361167137527j))*x[0] + ((-0.935920757567-0.292664758789j))*x[1]**o + ((-0.545639994779+0.931558042263j))*x[1]
            ref[(3, 0, 0, 1)]=(-0.433694663118+0.337987389634j)*(1+2.*(dim-1)/(o+1.)) + ((0.113661933063+1.29272517979j))*dim
            arg[(3, 0, 0, 2)]=(-0.919388771274+0.0868386622232j)*x[0]**o + ((0.428266892305-0.939206955916j))*x[0] + ((-0.47574181681+0.379234209516j))*x[1]**o + ((0.416339928219+0.0621819741857j))*x[1]
            ref[(3, 0, 0, 2)]=(-1.39513058808+0.466072871739j)*(1+2.*(dim-1)/(o+1.)) + ((0.844606820524-0.877024981731j))*dim
            arg[(3, 0, 0, 3)]=(0.87835694417-0.38329316646j)*x[0]**o + ((0.103482916764-0.988073430528j))*x[0] + ((-0.645379891643-0.39208344744j))*x[1]**o + ((0.722492829657-0.746779049692j))*x[1]
            ref[(3, 0, 0, 3)]=(0.232977052527-0.7753766139j)*(1+2.*(dim-1)/(o+1.)) + ((0.825975746422-1.73485248022j))*dim
            arg[(3, 0, 1, 0)]=(0.452273858531+0.861591191713j)*x[0]**o + ((0.439543199199-0.62376428402j))*x[0] + ((0.551671792206-0.778262902638j))*x[1]**o + ((0.699692117842-0.664448165556j))*x[1]
            ref[(3, 0, 1, 0)]=(1.00394565074+0.0833282890747j)*(1+2.*(dim-1)/(o+1.)) + ((1.13923531704-1.28821244958j))*dim
            arg[(3, 0, 1, 1)]=(0.602144832969+0.87150098332j)*x[0]**o + ((-0.047912215496+0.18050319804j))*x[0] + ((-0.995185263757+0.0411423856971j))*x[1]**o + ((-0.138409258158+0.124645801484j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.393040430788+0.912643369017j)*(1+2.*(dim-1)/(o+1.)) + ((-0.186321473654+0.305148999524j))*dim
            arg[(3, 0, 1, 2)]=(-0.0432635541337+0.342630821175j)*x[0]**o + ((-0.890420356526+0.616223541171j))*x[0] + ((-0.386623009004+0.887282711547j))*x[1]**o + ((0.0445385086321-0.596202406323j))*x[1]
            ref[(3, 0, 1, 2)]=(-0.429886563138+1.22991353272j)*(1+2.*(dim-1)/(o+1.)) + ((-0.845881847893+0.0200211348487j))*dim
            arg[(3, 0, 1, 3)]=(-0.0550265670182-0.346667236617j)*x[0]**o + ((-0.57563714231+0.0864254338117j))*x[0] + ((0.982872489867-0.115094579677j))*x[1]**o + ((-0.168499332764+0.762531376545j))*x[1]
            ref[(3, 0, 1, 3)]=(0.927845922849-0.461761816294j)*(1+2.*(dim-1)/(o+1.)) + ((-0.744136475074+0.848956810356j))*dim
            arg[(3, 0, 2, 0)]=(-0.382499238646+0.382287607097j)*x[0]**o + ((-0.627672486722-0.836342401209j))*x[0] + ((0.95454796246-0.0935986690486j))*x[1]**o + ((0.639028346079+0.187617208763j))*x[1]
            ref[(3, 0, 2, 0)]=(0.572048723814+0.288688938049j)*(1+2.*(dim-1)/(o+1.)) + ((0.0113558593575-0.648725192446j))*dim
            arg[(3, 0, 2, 1)]=(-0.914547701337-0.622832447899j)*x[0]**o + ((-0.0732716672352-0.640767429758j))*x[0] + ((-0.764495833624+0.907922065229j))*x[1]**o + ((0.380647681827-0.944473269084j))*x[1]
            ref[(3, 0, 2, 1)]=(-1.67904353496+0.28508961733j)*(1+2.*(dim-1)/(o+1.)) + ((0.307376014592-1.58524069884j))*dim
            arg[(3, 0, 2, 2)]=(0.0561603493213-0.719950579766j)*x[0]**o + ((-0.867215248979+0.799701876955j))*x[0] + ((-0.139151309639-0.704067447747j))*x[1]**o + ((-0.130805904843-0.79313000482j))*x[1]
            ref[(3, 0, 2, 2)]=(-0.0829909603181-1.42401802751j)*(1+2.*(dim-1)/(o+1.)) + ((-0.998021153822+0.00657187213486j))*dim
            arg[(3, 0, 2, 3)]=(0.609204137057+0.693343523181j)*x[0]**o + ((-0.926089975934-0.589889550052j))*x[0] + ((-0.369799408434+0.418399021622j))*x[1]**o + ((0.251932831574+0.831980007115j))*x[1]
            ref[(3, 0, 2, 3)]=(0.239404728623+1.1117425448j)*(1+2.*(dim-1)/(o+1.)) + ((-0.67415714436+0.242090457062j))*dim
            arg[(3, 0, 3, 0)]=(0.174086276009+0.339876097015j)*x[0]**o + ((-0.791445438641+0.160728947264j))*x[0] + ((-0.0170598818301+0.887508332774j))*x[1]**o + ((0.185001101911+0.0385588752193j))*x[1]
            ref[(3, 0, 3, 0)]=(0.157026394179+1.22738442979j)*(1+2.*(dim-1)/(o+1.)) + ((-0.606444336729+0.199287822484j))*dim
            arg[(3, 0, 3, 1)]=(0.410858156371-0.701204727348j)*x[0]**o + ((0.667837147988+0.23693255999j))*x[0] + ((0.0813316000908+0.781138863751j))*x[1]**o + ((0.264949091772-0.292887439667j))*x[1]
            ref[(3, 0, 3, 1)]=(0.492189756462+0.0799341364038j)*(1+2.*(dim-1)/(o+1.)) + ((0.93278623976-0.0559548796775j))*dim
            arg[(3, 0, 3, 2)]=(0.810889391908+0.0959902319546j)*x[0]**o + ((0.399797631044+0.774575326549j))*x[0] + ((-0.0822002340359+0.952396798097j))*x[1]**o + ((0.489871534814+0.209917139256j))*x[1]
            ref[(3, 0, 3, 2)]=(0.728689157872+1.04838703005j)*(1+2.*(dim-1)/(o+1.)) + ((0.889669165858+0.984492465805j))*dim
            arg[(3, 0, 3, 3)]=(-0.185001199286+0.844287306112j)*x[0]**o + ((0.831691256116-0.0671717184174j))*x[0] + ((-0.324842893924-0.821864847927j))*x[1]**o + ((0.405493567614-0.774791810708j))*x[1]
            ref[(3, 0, 3, 3)]=(-0.50984409321+0.0224224581848j)*(1+2.*(dim-1)/(o+1.)) + ((1.23718482373-0.841963529125j))*dim
            arg[(3, 1, 0, 0)]=(-0.814030142813-0.44470124685j)*x[0]**o + ((-0.932471855944+0.54615832377j))*x[0] + ((-0.418343385253-0.91263454291j))*x[1]**o + ((0.21025302939-0.23757685322j))*x[1]
            ref[(3, 1, 0, 0)]=(-1.23237352807-1.35733578976j)*(1+2.*(dim-1)/(o+1.)) + ((-0.722218826555+0.30858147055j))*dim
            arg[(3, 1, 0, 1)]=(-0.971995488429-0.0881133414233j)*x[0]**o + ((-0.829391435795-0.431268734781j))*x[0] + ((-0.973145214383+0.965775061251j))*x[1]**o + ((0.556634511743-0.495621485447j))*x[1]
            ref[(3, 1, 0, 1)]=(-1.94514070281+0.877661719828j)*(1+2.*(dim-1)/(o+1.)) + ((-0.272756924052-0.926890220229j))*dim
            arg[(3, 1, 0, 2)]=(0.710315854763-0.78847458561j)*x[0]**o + ((0.925203668307-0.602702420214j))*x[0] + ((-0.184706227699+0.556280102582j))*x[1]**o + ((-0.260293527068-0.662029975638j))*x[1]
            ref[(3, 1, 0, 2)]=(0.525609627064-0.232194483029j)*(1+2.*(dim-1)/(o+1.)) + ((0.664910141239-1.26473239585j))*dim
            arg[(3, 1, 0, 3)]=(-0.600056417287-0.222292014631j)*x[0]**o + ((0.440147172184-0.165776850711j))*x[0] + ((0.235736228545-0.304539534608j))*x[1]**o + ((0.382186170773+0.0923189684756j))*x[1]
            ref[(3, 1, 0, 3)]=(-0.364320188741-0.526831549238j)*(1+2.*(dim-1)/(o+1.)) + ((0.822333342957-0.0734578822354j))*dim
            arg[(3, 1, 1, 0)]=(-0.256242991094+0.0274533906517j)*x[0]**o + ((-0.98396177993-0.146173843009j))*x[0] + ((-0.165556500563+0.0213822036133j))*x[1]**o + ((-0.563938327249+0.182410454796j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.421799491657+0.048835594265j)*(1+2.*(dim-1)/(o+1.)) + ((-1.54790010718+0.0362366117862j))*dim
            arg[(3, 1, 1, 1)]=(-0.921625221746-0.869597101022j)*x[0]**o + ((-0.864429192357-0.409019665982j))*x[0] + ((0.796767708724+0.527104807427j))*x[1]**o + ((-0.235164179588-0.942486489434j))*x[1]
            ref[(3, 1, 1, 1)]=(-0.124857513022-0.342492293596j)*(1+2.*(dim-1)/(o+1.)) + ((-1.09959337194-1.35150615542j))*dim
            arg[(3, 1, 1, 2)]=(-0.875352003522-0.147936415342j)*x[0]**o + ((0.0394014285506-0.92338650178j))*x[0] + ((0.40005011512+0.147925236407j))*x[1]**o + ((-0.695652894651-0.30098851944j))*x[1]
            ref[(3, 1, 1, 2)]=(-0.475301888401-1.117893492e-05j)*(1+2.*(dim-1)/(o+1.)) + ((-0.656251466101-1.22437502122j))*dim
            arg[(3, 1, 1, 3)]=(-0.815811779605-0.296527708265j)*x[0]**o + ((-0.382875952812-0.982395409234j))*x[0] + ((-0.365991867142+0.983990166239j))*x[1]**o + ((-0.926988796485+0.991365466056j))*x[1]
            ref[(3, 1, 1, 3)]=(-1.18180364675+0.687462457974j)*(1+2.*(dim-1)/(o+1.)) + ((-1.3098647493+0.00897005682213j))*dim
            arg[(3, 1, 2, 0)]=(0.0486039524717+0.662989405308j)*x[0]**o + ((-0.607876165163+0.140922331872j))*x[0] + ((0.80346792932+0.131068302749j))*x[1]**o + ((0.335872379329-0.834462347488j))*x[1]
            ref[(3, 1, 2, 0)]=(0.852071881792+0.794057708057j)*(1+2.*(dim-1)/(o+1.)) + ((-0.272003785834-0.693540015616j))*dim
            arg[(3, 1, 2, 1)]=(0.444779057936-0.907004265834j)*x[0]**o + ((0.579506672288+0.915259945126j))*x[0] + ((0.887726873964-0.776165468318j))*x[1]**o + ((0.0167532333647+0.147284649181j))*x[1]
            ref[(3, 1, 2, 1)]=(1.3325059319-1.68316973415j)*(1+2.*(dim-1)/(o+1.)) + ((0.596259905652+1.06254459431j))*dim
            arg[(3, 1, 2, 2)]=(-0.380928913177-0.150221499024j)*x[0]**o + ((-0.0531532558482-0.354642908616j))*x[0] + ((-0.413078897074+0.566686475446j))*x[1]**o + ((0.137522621008+0.31042717181j))*x[1]
            ref[(3, 1, 2, 2)]=(-0.794007810251+0.416464976422j)*(1+2.*(dim-1)/(o+1.)) + ((0.0843693651597-0.0442157368059j))*dim
            arg[(3, 1, 2, 3)]=(0.660646256446-0.588840539091j)*x[0]**o + ((-0.585632794883-0.730034936172j))*x[0] + ((0.769838150208-0.778214124737j))*x[1]**o + ((0.433462850669+0.456669483936j))*x[1]
            ref[(3, 1, 2, 3)]=(1.43048440665-1.36705466383j)*(1+2.*(dim-1)/(o+1.)) + ((-0.152169944214-0.273365452236j))*dim
            arg[(3, 1, 3, 0)]=(0.00448008430584-0.785837214146j)*x[0]**o + ((0.513738093322+0.442997914117j))*x[0] + ((0.69444910576+0.846552579536j))*x[1]**o + ((-0.671647888679-0.231401050704j))*x[1]
            ref[(3, 1, 3, 0)]=(0.698929190065+0.0607153653898j)*(1+2.*(dim-1)/(o+1.)) + ((-0.157909795356+0.211596863413j))*dim
            arg[(3, 1, 3, 1)]=(0.656588005533-0.171017699265j)*x[0]**o + ((-0.113315418641+0.0376034368853j))*x[0] + ((0.754913648096-0.678575997351j))*x[1]**o + ((-0.300019211559-0.860015078922j))*x[1]
            ref[(3, 1, 3, 1)]=(1.41150165363-0.849593696616j)*(1+2.*(dim-1)/(o+1.)) + ((-0.4133346302-0.822411642037j))*dim
            arg[(3, 1, 3, 2)]=(-0.441255577668-0.723266877819j)*x[0]**o + ((-0.280344055039+0.349855228107j))*x[0] + ((-0.748978226273+0.615865839293j))*x[1]**o + ((0.972386032362-0.696814895358j))*x[1]
            ref[(3, 1, 3, 2)]=(-1.19023380394-0.107401038525j)*(1+2.*(dim-1)/(o+1.)) + ((0.692041977323-0.346959667251j))*dim
            arg[(3, 1, 3, 3)]=(-0.519312080366+0.89430377619j)*x[0]**o + ((-0.368489147711+0.510943215306j))*x[0] + ((0.691174187811-0.0577403522124j))*x[1]**o + ((0.490168351635-0.188465260779j))*x[1]
            ref[(3, 1, 3, 3)]=(0.171862107445+0.836563423977j)*(1+2.*(dim-1)/(o+1.)) + ((0.121679203924+0.322477954527j))*dim
        else:
            arg[(0, 0, 0, 0)]=(0.272459879767-0.592984203879j)*x[0]**o + ((0.0944874977067+0.801502363293j))*x[0] + ((-0.262069481677+0.104900602878j))*x[1]**o + ((-0.69738257799+0.57543916735j))*x[1] + ((-0.0619896104004+0.509415201076j))*x[2]**o + ((-0.811822739239+0.197208525953j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.0515992123099+0.0213316000741j)*(1+2.*(dim-1)/(o+1.)) + ((-1.41471781952+1.5741500566j))*dim
            arg[(0, 0, 0, 1)]=(0.407647250164+0.446458919493j)*x[0]**o + ((0.0530143515333+0.508048840435j))*x[0] + ((-0.495021358061+0.358412215917j))*x[1]**o + ((-0.767652476362+0.00361427211714j))*x[1] + ((0.268840970061+0.294416996j))*x[2]**o + ((0.291226813839-0.798849834889j))*x[2]
            ref[(0, 0, 0, 1)]=(0.181466862164+1.09928813141j)*(1+2.*(dim-1)/(o+1.)) + ((-0.42341131099-0.287186722336j))*dim
            arg[(0, 0, 0, 2)]=(-0.343924074597-0.384377540999j)*x[0]**o + ((0.821992057888-0.0901688297545j))*x[0] + ((-0.624438277185-0.705458010365j))*x[1]**o + ((-0.884380060842-0.115394255228j))*x[1] + ((-0.669542770043-0.14362988565j))*x[2]**o + ((0.20539825879+0.671456066303j))*x[2]
            ref[(0, 0, 0, 2)]=(-1.63790512182-1.23346543701j)*(1+2.*(dim-1)/(o+1.)) + ((0.143010255836+0.465892981321j))*dim
            arg[(0, 0, 0, 3)]=(0.721508101638+0.295612983714j)*x[0]**o + ((-0.0901964901764+0.368540780417j))*x[0] + ((-0.242950210952-0.60303520283j))*x[1]**o + ((-0.781777134315-0.162210342462j))*x[1] + ((0.12137508427+0.196205923495j))*x[2]**o + ((-0.718298154239-0.613991584684j))*x[2]
            ref[(0, 0, 0, 3)]=(0.599932974955-0.111216295621j)*(1+2.*(dim-1)/(o+1.)) + ((-1.59027177873-0.407661146729j))*dim
            arg[(0, 0, 1, 0)]=(0.103392021215+0.914170521101j)*x[0]**o + ((-0.877751595233-0.0464804860381j))*x[0] + ((-0.469159184455+0.383195340293j))*x[1]**o + ((-0.516528525371-0.593104534144j))*x[1] + ((-0.914381423613-0.520758412824j))*x[2]**o + ((0.406338404073-0.3206582051j))*x[2]
            ref[(0, 0, 1, 0)]=(-1.28014858685+0.77660744857j)*(1+2.*(dim-1)/(o+1.)) + ((-0.987941716531-0.960243225282j))*dim
            arg[(0, 0, 1, 1)]=(0.543447114803-0.42956859413j)*x[0]**o + ((0.0372247765355-0.730487799123j))*x[0] + ((0.174607678673+0.341728334189j))*x[1]**o + ((0.298814427061-0.725506890842j))*x[1] + ((-0.456899453504+0.0792654621031j))*x[2]**o + ((0.0654896120056+0.897201347497j))*x[2]
            ref[(0, 0, 1, 1)]=(0.261155339972-0.00857479783827j)*(1+2.*(dim-1)/(o+1.)) + ((0.401528815602-0.558793342469j))*dim
            arg[(0, 0, 1, 2)]=(-0.875778345786-0.853277618006j)*x[0]**o + ((0.615093417435+0.264198119264j))*x[0] + ((-0.144862962834+0.0322919344044j))*x[1]**o + ((0.328981627014-0.257049099598j))*x[1] + ((0.237444498519+0.0157014364258j))*x[2]**o + ((0.345809866764-0.695975180631j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.783196810101-0.805284247176j)*(1+2.*(dim-1)/(o+1.)) + ((1.28988491121-0.688826160964j))*dim
            arg[(0, 0, 1, 3)]=(-0.370055286425+0.792862294311j)*x[0]**o + ((0.164316109955+0.579858245773j))*x[0] + ((0.589089891071-0.940770782344j))*x[1]**o + ((-0.58352060504-0.84180017073j))*x[1] + ((-0.652842375121+0.799598307517j))*x[2]**o + ((-0.307657231526-0.943018138136j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.433807770475+0.651689819484j)*(1+2.*(dim-1)/(o+1.)) + ((-0.726861726612-1.20496006309j))*dim
            arg[(0, 0, 2, 0)]=(-0.357849482745+0.994176231103j)*x[0]**o + ((0.734901629523-0.515409069774j))*x[0] + ((0.133898768617+0.794542622971j))*x[1]**o + ((-0.469538108772+0.0219493652663j))*x[1] + ((0.298912265381+0.965393072572j))*x[2]**o + ((0.477225883723+0.89271692438j))*x[2]
            ref[(0, 0, 2, 0)]=(0.0749615512523+2.75411192664j)*(1+2.*(dim-1)/(o+1.)) + ((0.742589404475+0.399257219872j))*dim
            arg[(0, 0, 2, 1)]=(-0.937146772146+0.441694507389j)*x[0]**o + ((-0.217604387715+0.655114568963j))*x[0] + ((0.117564435849+0.664174641124j))*x[1]**o + ((-0.226197177945+0.267584403237j))*x[1] + ((-0.919622058779-0.409834780476j))*x[2]**o + ((0.98881078386-0.872610447205j))*x[2]
            ref[(0, 0, 2, 1)]=(-1.73920439508+0.696034368037j)*(1+2.*(dim-1)/(o+1.)) + ((0.5450092182+0.0500885249947j))*dim
            arg[(0, 0, 2, 2)]=(-0.143004342618-0.255590207446j)*x[0]**o + ((-0.836535675763+0.513410268466j))*x[0] + ((-0.408184453096+0.271347843876j))*x[1]**o + ((-0.26098024382-0.519423064267j))*x[1] + ((0.598248107784-0.11326041616j))*x[2]**o + ((-0.457410753497+0.258511127861j))*x[2]
            ref[(0, 0, 2, 2)]=(0.0470593120699-0.0975027797291j)*(1+2.*(dim-1)/(o+1.)) + ((-1.55492667308+0.25249833206j))*dim
            arg[(0, 0, 2, 3)]=(-0.503136444323-0.577962215238j)*x[0]**o + ((0.00129144980335-0.295453944963j))*x[0] + ((-0.551944484023-0.487904616727j))*x[1]**o + ((-0.252260034162-0.688410695871j))*x[1] + ((0.998478354817-0.978631653894j))*x[2]**o + ((0.296160940682-0.200647258238j))*x[2]
            ref[(0, 0, 2, 3)]=(-0.0566025735288-2.04449848586j)*(1+2.*(dim-1)/(o+1.)) + ((0.0451923563236-1.18451189907j))*dim
            arg[(0, 0, 3, 0)]=(-0.589325984422+0.530188514768j)*x[0]**o + ((0.224534267371+0.592852653524j))*x[0] + ((0.841521009714+0.340320124272j))*x[1]**o + ((-0.507716986678+0.14462532492j))*x[1] + ((0.795123350023-0.740391998189j))*x[2]**o + ((0.135321230115-0.60829379678j))*x[2]
            ref[(0, 0, 3, 0)]=(1.04731837531+0.130116640851j)*(1+2.*(dim-1)/(o+1.)) + ((-0.147861489191+0.129184181665j))*dim
            arg[(0, 0, 3, 1)]=(-0.17659559791+0.822853889202j)*x[0]**o + ((-0.679541749269-0.440896907336j))*x[0] + ((0.576684210662-0.514458225926j))*x[1]**o + ((-0.498135526462+0.234773693419j))*x[1] + ((-0.406537163002-0.348576681125j))*x[2]**o + ((-0.781545292987+0.130575079804j))*x[2]
            ref[(0, 0, 3, 1)]=(-0.0064485502503-0.0401810178489j)*(1+2.*(dim-1)/(o+1.)) + ((-1.95922256872-0.0755481341132j))*dim
            arg[(0, 0, 3, 2)]=(0.0370717178673+0.954753817051j)*x[0]**o + ((0.244316426212+0.0846331252489j))*x[0] + ((0.971532126718+0.575206028979j))*x[1]**o + ((-0.738203519586-0.222572953726j))*x[1] + ((0.686422183168-0.0824423243731j))*x[2]**o + ((-0.171553458588+0.682693475625j))*x[2]
            ref[(0, 0, 3, 2)]=(1.69502602775+1.44751752166j)*(1+2.*(dim-1)/(o+1.)) + ((-0.665440551963+0.544753647148j))*dim
            arg[(0, 0, 3, 3)]=(0.366560746135-0.941861260888j)*x[0]**o + ((-0.417311036426-0.343416616343j))*x[0] + ((0.798197506278-0.0264601263031j))*x[1]**o + ((0.11524673214+0.780604864631j))*x[1] + ((-0.414284117439+0.303341931552j))*x[2]**o + ((-0.0516817739223+0.0919949987702j))*x[2]
            ref[(0, 0, 3, 3)]=(0.750474134974-0.664979455639j)*(1+2.*(dim-1)/(o+1.)) + ((-0.353746078209+0.529183247058j))*dim
            arg[(0, 1, 0, 0)]=(-0.116716976984+0.683836216092j)*x[0]**o + ((0.988657110096-0.358014249104j))*x[0] + ((0.823790535243+0.489896799981j))*x[1]**o + ((0.665015707366+0.148343523422j))*x[1] + ((-0.711608088829-0.058761693679j))*x[2]**o + ((0.879603272541+0.366038863633j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.00453453057065+1.11497132239j)*(1+2.*(dim-1)/(o+1.)) + ((2.53327609+0.156368137951j))*dim
            arg[(0, 1, 0, 1)]=(-0.232766810616+0.95434933075j)*x[0]**o + ((-0.929266899494+0.815778176423j))*x[0] + ((-0.862386753325+0.938425609531j))*x[1]**o + ((0.577636163584+0.773766503419j))*x[1] + ((0.0198761160368+0.225355266985j))*x[2]**o + ((-0.441759620818+0.183189536735j))*x[2]
            ref[(0, 1, 0, 1)]=(-1.0752774479+2.11813020727j)*(1+2.*(dim-1)/(o+1.)) + ((-0.793390356728+1.77273421658j))*dim
            arg[(0, 1, 0, 2)]=(-0.573863872797+0.754848438802j)*x[0]**o + ((-0.421880540931+0.956112591638j))*x[0] + ((-0.0295053348837-0.195478303683j))*x[1]**o + ((0.0053339437254-0.366729902797j))*x[1] + ((-0.909758906594+0.212281263835j))*x[2]**o + ((-0.422036369409+0.129523251664j))*x[2]
            ref[(0, 1, 0, 2)]=(-1.51312811428+0.771651398955j)*(1+2.*(dim-1)/(o+1.)) + ((-0.838582966615+0.718905940504j))*dim
            arg[(0, 1, 0, 3)]=(0.981974780746+0.680798629917j)*x[0]**o + ((-0.526880121635+0.390882642156j))*x[0] + ((-0.851767763419-0.249132474075j))*x[1]**o + ((0.48648458778+0.821889873249j))*x[1] + ((0.476790660472-0.468643505048j))*x[2]**o + ((-0.345010551693+0.929002751952j))*x[2]
            ref[(0, 1, 0, 3)]=(0.606997677799-0.0369773492066j)*(1+2.*(dim-1)/(o+1.)) + ((-0.385406085548+2.14177526736j))*dim
            arg[(0, 1, 1, 0)]=(-0.792946472257-0.897162852526j)*x[0]**o + ((-0.123859273112-0.859978089061j))*x[0] + ((-0.927165945027+0.32087528986j))*x[1]**o + ((-0.790137800163+0.282970730279j))*x[1] + ((-0.0402336847982+0.034038021211j))*x[2]**o + ((0.0723140478273-0.210814730619j))*x[2]
            ref[(0, 1, 1, 0)]=(-1.76034610208-0.542249541455j)*(1+2.*(dim-1)/(o+1.)) + ((-0.841683025448-0.787822089401j))*dim
            arg[(0, 1, 1, 1)]=(0.267774347774-0.996008530427j)*x[0]**o + ((0.699232790586+0.807207528269j))*x[0] + ((0.933954133038+0.74917014793j))*x[1]**o + ((-0.767584345542+0.773906804769j))*x[1] + ((0.99087792823+0.570059193248j))*x[2]**o + ((0.943312495759-0.639586094846j))*x[2]
            ref[(0, 1, 1, 1)]=(2.19260640904+0.323220810751j)*(1+2.*(dim-1)/(o+1.)) + ((0.874960940804+0.941528238192j))*dim
            arg[(0, 1, 1, 2)]=(0.201681103177+0.623254537413j)*x[0]**o + ((-0.940325711932-0.189950384637j))*x[0] + ((0.150262851288-0.361336810299j))*x[1]**o + ((0.215176660077+0.0492680054794j))*x[1] + ((0.328904801986-0.0970005747116j))*x[2]**o + ((-0.35485676172-0.713459113783j))*x[2]
            ref[(0, 1, 1, 2)]=(0.680848756451+0.164917152402j)*(1+2.*(dim-1)/(o+1.)) + ((-1.08000581357-0.854141492941j))*dim
            arg[(0, 1, 1, 3)]=(0.985010368589-0.394664745552j)*x[0]**o + ((0.522164987705-0.682678666769j))*x[0] + ((0.295442311857-0.70920749136j))*x[1]**o + ((0.319127721499-0.421988457948j))*x[1] + ((-0.835635802146+0.426841396896j))*x[2]**o + ((-0.650262624539+0.762764427274j))*x[2]
            ref[(0, 1, 1, 3)]=(0.4448168783-0.677030840017j)*(1+2.*(dim-1)/(o+1.)) + ((0.191030084665-0.341902697443j))*dim
            arg[(0, 1, 2, 0)]=(0.888810071212+0.196782402525j)*x[0]**o + ((0.206715549619+0.217307072448j))*x[0] + ((-0.867711684489-0.932627541621j))*x[1]**o + ((-0.989303033611-0.801794622954j))*x[1] + ((0.457319961675+0.700764522917j))*x[2]**o + ((-0.745085014283+0.406490982513j))*x[2]
            ref[(0, 1, 2, 0)]=(0.478418348399-0.0350806161794j)*(1+2.*(dim-1)/(o+1.)) + ((-1.52767249827-0.177996567993j))*dim
            arg[(0, 1, 2, 1)]=(-0.110911496038+0.00581979114302j)*x[0]**o + ((-0.742783917563+0.487914780782j))*x[0] + ((0.833295955965-0.662554781909j))*x[1]**o + ((0.367272960752+0.625986785j))*x[1] + ((0.207539486562+0.820839209271j))*x[2]**o + ((0.779795588099+0.661528319769j))*x[2]
            ref[(0, 1, 2, 1)]=(0.929923946489+0.164104218505j)*(1+2.*(dim-1)/(o+1.)) + ((0.404284631288+1.77542988555j))*dim
            arg[(0, 1, 2, 2)]=(0.444268668845-0.680977842621j)*x[0]**o + ((-0.86896968843+0.0886874902713j))*x[0] + ((0.516046952887+0.635880497542j))*x[1]**o + ((0.30488369292+0.755143416124j))*x[1] + ((-0.847137204903+0.897622070877j))*x[2]**o + ((-0.664915697693+0.896062501658j))*x[2]
            ref[(0, 1, 2, 2)]=(0.113178416828+0.852524725798j)*(1+2.*(dim-1)/(o+1.)) + ((-1.2290016932+1.73989340805j))*dim
            arg[(0, 1, 2, 3)]=(0.0462095829457+0.401457269452j)*x[0]**o + ((0.422198949267+0.064235360742j))*x[0] + ((-0.898992335441+0.457362176398j))*x[1]**o + ((-0.191563633192-0.109133511646j))*x[1] + ((0.766495059336-0.201119602418j))*x[2]**o + ((0.216370147333-0.147051486548j))*x[2]
            ref[(0, 1, 2, 3)]=(-0.0862876931593+0.657699843431j)*(1+2.*(dim-1)/(o+1.)) + ((0.447005463409-0.191949637452j))*dim
            arg[(0, 1, 3, 0)]=(-0.953300993208+0.598945008582j)*x[0]**o + ((0.879892228191-0.0971779927851j))*x[0] + ((0.298367149731+0.752567669351j))*x[1]**o + ((-0.0809003311735+0.837164419852j))*x[1] + ((-0.056390780392+0.287054123671j))*x[2]**o + ((0.731280988362-0.617603937004j))*x[2]
            ref[(0, 1, 3, 0)]=(-0.711324623869+1.6385668016j)*(1+2.*(dim-1)/(o+1.)) + ((1.53027288538+0.122382490063j))*dim
            arg[(0, 1, 3, 1)]=(0.113332816849-0.651874338005j)*x[0]**o + ((0.849800388789+0.020180311756j))*x[0] + ((-0.296492451388-0.257645123683j))*x[1]**o + ((0.584753938714+0.456501714366j))*x[1] + ((0.448609830716+0.261527066654j))*x[2]**o + ((0.842239479904+0.639108415749j))*x[2]
            ref[(0, 1, 3, 1)]=(0.265450196177-0.647992395035j)*(1+2.*(dim-1)/(o+1.)) + ((2.27679380741+1.11579044187j))*dim
            arg[(0, 1, 3, 2)]=(0.0538275312903+0.543732391129j)*x[0]**o + ((-0.708313355397+0.5224667092j))*x[0] + ((0.578633068675-0.0383129820081j))*x[1]**o + ((-0.554635455617+0.605255004517j))*x[1] + ((0.779077946119-0.789903962226j))*x[2]**o + ((0.0536869930722+0.555082994711j))*x[2]
            ref[(0, 1, 3, 2)]=(1.41153854608-0.284484553105j)*(1+2.*(dim-1)/(o+1.)) + ((-1.20926181794+1.68280470843j))*dim
            arg[(0, 1, 3, 3)]=(-0.185459453994-0.0677346562287j)*x[0]**o + ((0.224534589679+0.486191998502j))*x[0] + ((-0.636308358781-0.449381408411j))*x[1]**o + ((-0.663723020232+0.351256952846j))*x[1] + ((-0.736801904338+0.586689590972j))*x[2]**o + ((-0.249033950896-0.159085114157j))*x[2]
            ref[(0, 1, 3, 3)]=(-1.55856971711+0.0695735263323j)*(1+2.*(dim-1)/(o+1.)) + ((-0.688222381448+0.678363837191j))*dim
            arg[(1, 0, 0, 0)]=(-0.962865053976-0.926129376378j)*x[0]**o + ((0.356921353373+0.952696364587j))*x[0] + ((0.719441693871+0.46370143525j))*x[1]**o + ((0.322361958937+0.0122269424938j))*x[1] + ((0.795048494887+0.234263241582j))*x[2]**o + ((-0.967983106199+0.478136266175j))*x[2]
            ref[(1, 0, 0, 0)]=(0.551625134783-0.228164699546j)*(1+2.*(dim-1)/(o+1.)) + ((-0.288699793889+1.44305957325j))*dim
            arg[(1, 0, 0, 1)]=(0.787377222183+0.845983340887j)*x[0]**o + ((-0.877751303045-0.389456497825j))*x[0] + ((-0.792136514902+0.389269216693j))*x[1]**o + ((0.348884998216-0.104620368381j))*x[1] + ((0.476763999739-0.579568784174j))*x[2]**o + ((-0.772306732951-0.222875859549j))*x[2]
            ref[(1, 0, 0, 1)]=(0.472004707019+0.655683773406j)*(1+2.*(dim-1)/(o+1.)) + ((-1.30117303778-0.716952725756j))*dim
            arg[(1, 0, 0, 2)]=(0.0799446161196-0.240583609275j)*x[0]**o + ((-0.0770262531121+0.853458902073j))*x[0] + ((-0.617920252682-0.942904450553j))*x[1]**o + ((-0.888741648621-0.519107325936j))*x[1] + ((-0.548857887418-0.203129690276j))*x[2]**o + ((-0.50353134307-0.00294797029723j))*x[2]
            ref[(1, 0, 0, 2)]=(-1.08683352398-1.3866177501j)*(1+2.*(dim-1)/(o+1.)) + ((-1.4692992448+0.33140360584j))*dim
            arg[(1, 0, 0, 3)]=(-0.666571443745-0.0243408427821j)*x[0]**o + ((0.618446432281+0.531901374117j))*x[0] + ((0.59914386642+0.734261801766j))*x[1]**o + ((-0.0301313536917-0.19922116229j))*x[1] + ((0.171864187352-0.835594167119j))*x[2]**o + ((-0.805607896672-0.913705738977j))*x[2]
            ref[(1, 0, 0, 3)]=(0.104436610028-0.125673208135j)*(1+2.*(dim-1)/(o+1.)) + ((-0.217292818082-0.581025527151j))*dim
            arg[(1, 0, 1, 0)]=(-0.31419204128+0.0670161441916j)*x[0]**o + ((-0.0562219931779+0.787544505112j))*x[0] + ((0.874485953424-0.337929663101j))*x[1]**o + ((-0.00891739066516+0.336548119809j))*x[1] + ((0.334127715714-0.227175472368j))*x[2]**o + ((0.554146261916-0.400515861927j))*x[2]
            ref[(1, 0, 1, 0)]=(0.894421627858-0.498088991277j)*(1+2.*(dim-1)/(o+1.)) + ((0.489006878073+0.723576762994j))*dim
            arg[(1, 0, 1, 1)]=(0.46448392021-0.571385064565j)*x[0]**o + ((-0.031079231836+0.425178799773j))*x[0] + ((-0.240939706695-0.417000031523j))*x[1]**o + ((-0.901974243372-0.33090762283j))*x[1] + ((0.493065677823+0.546774487984j))*x[2]**o + ((-0.875689120717+0.89868948194j))*x[2]
            ref[(1, 0, 1, 1)]=(0.716609891338-0.441610608104j)*(1+2.*(dim-1)/(o+1.)) + ((-1.80874259593+0.992960658883j))*dim
            arg[(1, 0, 1, 2)]=(-0.522626222018+0.759513555432j)*x[0]**o + ((0.519325068884+0.339087033638j))*x[0] + ((0.450090288458-0.820037375801j))*x[1]**o + ((0.831508924919-0.367437427232j))*x[1] + ((0.780979142118+0.491231330849j))*x[2]**o + ((0.534636509274+0.57864917923j))*x[2]
            ref[(1, 0, 1, 2)]=(0.708443208558+0.43070751048j)*(1+2.*(dim-1)/(o+1.)) + ((1.88547050308+0.550298785636j))*dim
            arg[(1, 0, 1, 3)]=(0.585650375226+0.251419292437j)*x[0]**o + ((0.608155208048-0.69844913413j))*x[0] + ((-0.373141840343-0.250099410308j))*x[1]**o + ((-0.00185731823264-0.132934200232j))*x[1] + ((0.395640259024+0.0777037632323j))*x[2]**o + ((-0.954612807692+0.889478515786j))*x[2]
            ref[(1, 0, 1, 3)]=(0.608148793907+0.0790236453616j)*(1+2.*(dim-1)/(o+1.)) + ((-0.348314917876+0.0580951814238j))*dim
            arg[(1, 0, 2, 0)]=(-0.489963863863-0.161530065673j)*x[0]**o + ((-0.717402447412-0.125544835718j))*x[0] + ((-0.85629488813+0.302535604184j))*x[1]**o + ((0.371582925624+0.171531322455j))*x[1] + ((0.485795040325-0.0732812823252j))*x[2]**o + ((-0.537455259788-0.0770264196301j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.860463711668+0.0677242561854j)*(1+2.*(dim-1)/(o+1.)) + ((-0.883274781577-0.0310399328931j))*dim
            arg[(1, 0, 2, 1)]=(0.600892128608-0.0637690460337j)*x[0]**o + ((0.088720715626-0.0312336687914j))*x[0] + ((-0.688851596961+0.103824179454j))*x[1]**o + ((0.588519067957+0.538412282167j))*x[1] + ((0.739575839948-0.835252346148j))*x[2]**o + ((-0.452244223871+0.522750245326j))*x[2]
            ref[(1, 0, 2, 1)]=(0.651616371595-0.795197212728j)*(1+2.*(dim-1)/(o+1.)) + ((0.224995559712+1.0299288587j))*dim
            arg[(1, 0, 2, 2)]=(-0.764640029278+0.229633716229j)*x[0]**o + ((0.256218593917-0.670729808673j))*x[0] + ((0.639678250804-0.207720180865j))*x[1]**o + ((0.330924749071-0.176008537197j))*x[1] + ((-0.196784889147-0.146707081879j))*x[2]**o + ((-0.676298149588+0.18707933937j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.321746667621-0.124793546516j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0891548065997-0.6596590065j))*dim
            arg[(1, 0, 2, 3)]=(0.628973262584+0.0663319687686j)*x[0]**o + ((-0.00670155624256-0.613568101092j))*x[0] + ((0.145286431047-0.390078894183j))*x[1]**o + ((0.638199636164+0.518464474279j))*x[1] + ((0.874649202899+0.0724775781739j))*x[2]**o + ((-0.949133521167-0.494935385123j))*x[2]
            ref[(1, 0, 2, 3)]=(1.64890889653-0.25126934724j)*(1+2.*(dim-1)/(o+1.)) + ((-0.317635441246-0.590039011936j))*dim
            arg[(1, 0, 3, 0)]=(-0.33501704226+0.194197805803j)*x[0]**o + ((-0.128843184678-0.34177842347j))*x[0] + ((-0.180882833292+0.419254950966j))*x[1]**o + ((0.994631772391+0.218467117057j))*x[1] + ((0.14469481523-0.43248758164j))*x[2]**o + ((-0.492880018948-0.143540133139j))*x[2]
            ref[(1, 0, 3, 0)]=(-0.371205060322+0.180965175129j)*(1+2.*(dim-1)/(o+1.)) + ((0.372908568765-0.266851439553j))*dim
            arg[(1, 0, 3, 1)]=(-0.983989421414+0.323368500853j)*x[0]**o + ((0.40255689437+0.648782994772j))*x[0] + ((0.934358968433+0.689427487927j))*x[1]**o + ((0.326974934913-0.442085554663j))*x[1] + ((0.829674379103+0.983042198273j))*x[2]**o + ((-0.485823784446+0.528447001527j))*x[2]
            ref[(1, 0, 3, 1)]=(0.780043926122+1.99583818705j)*(1+2.*(dim-1)/(o+1.)) + ((0.243708044837+0.735144441636j))*dim
            arg[(1, 0, 3, 2)]=(0.0296687821157-0.389713479724j)*x[0]**o + ((-0.227370711046+0.285695554338j))*x[0] + ((-0.400520680358+0.089148501632j))*x[1]**o + ((-0.39634834558+0.139228814512j))*x[1] + ((-0.672855804603-0.823610571173j))*x[2]**o + ((-0.890273616742-0.384059395101j))*x[2]
            ref[(1, 0, 3, 2)]=(-1.04370770285-1.12417554926j)*(1+2.*(dim-1)/(o+1.)) + ((-1.51399267337+0.0408649737485j))*dim
            arg[(1, 0, 3, 3)]=(0.823420328576+0.544743125219j)*x[0]**o + ((-0.98886482569-0.869034447315j))*x[0] + ((-0.967846162762-0.376415688035j))*x[1]**o + ((0.866766460251-0.719475321119j))*x[1] + ((0.425653680747+0.75324238807j))*x[2]**o + ((-0.567709940117+0.986557525496j))*x[2]
            ref[(1, 0, 3, 3)]=(0.281227846562+0.921569825253j)*(1+2.*(dim-1)/(o+1.)) + ((-0.689808305556-0.601952242937j))*dim
            arg[(1, 1, 0, 0)]=(-0.70265607516+0.161234341286j)*x[0]**o + ((-0.830348425864-0.0873469048589j))*x[0] + ((0.631709553719-0.822950145035j))*x[1]**o + ((-0.760861846207-0.416542162489j))*x[1] + ((0.990191457571+0.5169580155j))*x[2]**o + ((0.359506087739-0.44535168002j))*x[2]
            ref[(1, 1, 0, 0)]=(0.91924493613-0.14475778825j)*(1+2.*(dim-1)/(o+1.)) + ((-1.23170418433-0.949240747368j))*dim
            arg[(1, 1, 0, 1)]=(-0.0977270755135-0.102232096792j)*x[0]**o + ((0.965080249301+0.62723065647j))*x[0] + ((0.382937277943-0.531822389807j))*x[1]**o + ((-0.0939628594669-0.603819806407j))*x[1] + ((0.0757903475291-0.669263041743j))*x[2]**o + ((-0.918875824584-0.19086125734j))*x[2]
            ref[(1, 1, 0, 1)]=(0.361000549958-1.30331752834j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0477584347502-0.167450407278j))*dim
            arg[(1, 1, 0, 2)]=(-0.781299488721+0.370197996434j)*x[0]**o + ((-0.376251388877+0.834672587721j))*x[0] + ((-0.116091987315-0.782922673763j))*x[1]**o + ((0.274609679883-0.128570214955j))*x[1] + ((0.910128697336-0.676296745346j))*x[2]**o + ((-0.183629774546-0.780049723064j))*x[2]
            ref[(1, 1, 0, 2)]=(0.0127372213003-1.08902142267j)*(1+2.*(dim-1)/(o+1.)) + ((-0.28527148354-0.0739473502985j))*dim
            arg[(1, 1, 0, 3)]=(0.022746138609-0.477061087447j)*x[0]**o + ((-0.318733818943-0.499334977305j))*x[0] + ((0.326374174719-0.873440407836j))*x[1]**o + ((-0.64991284665-0.0777253220994j))*x[1] + ((-0.574689738545-0.617811151151j))*x[2]**o + ((-0.148119140334+0.512511107487j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.225569425217-1.96831264643j)*(1+2.*(dim-1)/(o+1.)) + ((-1.11676580593-0.0645491919174j))*dim
            arg[(1, 1, 1, 0)]=(0.408529476734+0.401160019998j)*x[0]**o + ((-0.699786968322+0.649789244453j))*x[0] + ((0.375582645612-0.451745615453j))*x[1]**o + ((-0.47756209671+0.755246148562j))*x[1] + ((-0.575489251303+0.404945222965j))*x[2]**o + ((-0.817655433119+0.119575710334j))*x[2]
            ref[(1, 1, 1, 0)]=(0.208622871043+0.354359627511j)*(1+2.*(dim-1)/(o+1.)) + ((-1.99500449815+1.52461110335j))*dim
            arg[(1, 1, 1, 1)]=(-0.327019714439+0.0462401937834j)*x[0]**o + ((0.754939813018+0.904704020764j))*x[0] + ((0.775118051719+0.281454051326j))*x[1]**o + ((0.703393621991+0.353787531246j))*x[1] + ((-0.504010211421+0.555130660527j))*x[2]**o + ((-0.102441309281-0.35956532121j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.0559118741406+0.882824905636j)*(1+2.*(dim-1)/(o+1.)) + ((1.35589212573+0.8989262308j))*dim
            arg[(1, 1, 1, 2)]=(0.628720719374+0.0618018349563j)*x[0]**o + ((-0.140649074264-0.480559748644j))*x[0] + ((0.145450757061-0.159010589982j))*x[1]**o + ((0.264684509022+0.53855131845j))*x[1] + ((0.897385626314+0.657131980235j))*x[2]**o + ((-0.325455871578+0.565961062339j))*x[2]
            ref[(1, 1, 1, 2)]=(1.67155710275+0.559923225209j)*(1+2.*(dim-1)/(o+1.)) + ((-0.201420436819+0.623952632145j))*dim
            arg[(1, 1, 1, 3)]=(0.168513057449+0.376367572668j)*x[0]**o + ((0.896182110855+0.574927838521j))*x[0] + ((-0.72518545082-0.976403663532j))*x[1]**o + ((-0.285908969873+0.283971418889j))*x[1] + ((-0.636211265906+0.884710715981j))*x[2]**o + ((-0.643393093388+0.119775607483j))*x[2]
            ref[(1, 1, 1, 3)]=(-1.19288365928+0.284674625117j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0331199524068+0.978674864892j))*dim
            arg[(1, 1, 2, 0)]=(-0.116838003291+0.546510576896j)*x[0]**o + ((-0.708126865641+0.661345713025j))*x[0] + ((0.303305294384+0.558653315425j))*x[1]**o + ((-0.524083460255-0.816259490633j))*x[1] + ((0.983124901657-0.764103367546j))*x[2]**o + ((0.832969390722+0.617820865852j))*x[2]
            ref[(1, 1, 2, 0)]=(1.16959219275+0.341060524775j)*(1+2.*(dim-1)/(o+1.)) + ((-0.399240935174+0.462907088244j))*dim
            arg[(1, 1, 2, 1)]=(0.892487343113-0.486529309318j)*x[0]**o + ((0.292433436523+0.860952442344j))*x[0] + ((-0.97398700166-0.471567562604j))*x[1]**o + ((0.667185094519+0.626817656541j))*x[1] + ((0.279942051944-0.642700939363j))*x[2]**o + ((-0.712386340872+0.212769520904j))*x[2]
            ref[(1, 1, 2, 1)]=(0.198442393397-1.60079781128j)*(1+2.*(dim-1)/(o+1.)) + ((0.247232190169+1.70053961979j))*dim
            arg[(1, 1, 2, 2)]=(0.903700033217+0.814415404952j)*x[0]**o + ((0.593613803324+0.958543048252j))*x[0] + ((-0.907443015415-0.0297398603409j))*x[1]**o + ((-0.258184330084+0.019619074571j))*x[1] + ((-0.749551502413-0.771403930877j))*x[2]**o + ((-0.93681036226+0.669982650145j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.753294484611+0.0132716137335j)*(1+2.*(dim-1)/(o+1.)) + ((-0.60138088902+1.64814477297j))*dim
            arg[(1, 1, 2, 3)]=(0.119167776496+0.454013196032j)*x[0]**o + ((0.490483848941+0.467668348186j))*x[0] + ((0.632479519131+0.251496223495j))*x[1]**o + ((-0.649246304842+0.930709753373j))*x[1] + ((0.593615847579+0.839513642819j))*x[2]**o + ((0.589404355142+0.419681843966j))*x[2]
            ref[(1, 1, 2, 3)]=(1.34526314321+1.54502306235j)*(1+2.*(dim-1)/(o+1.)) + ((0.430641899241+1.81805994552j))*dim
            arg[(1, 1, 3, 0)]=(-0.167175641124-0.495085658302j)*x[0]**o + ((-0.499662599881-0.676405413213j))*x[0] + ((0.328770482189-0.807727376575j))*x[1]**o + ((0.54999953382+0.920176457014j))*x[1] + ((-0.368737413872+0.720567900939j))*x[2]**o + ((0.410053150827+0.804543695007j))*x[2]
            ref[(1, 1, 3, 0)]=(-0.207142572807-0.582245133938j)*(1+2.*(dim-1)/(o+1.)) + ((0.460390084766+1.04831473881j))*dim
            arg[(1, 1, 3, 1)]=(0.949970440556-0.72679727695j)*x[0]**o + ((0.928345193514+0.819999664435j))*x[0] + ((0.799138068961+0.305629299665j))*x[1]**o + ((-0.642524413806+0.0364404465878j))*x[1] + ((0.73726590884+0.199039513464j))*x[2]**o + ((0.832114245659+0.717978682062j))*x[2]
            ref[(1, 1, 3, 1)]=(2.48637441836-0.222128463821j)*(1+2.*(dim-1)/(o+1.)) + ((1.11793502537+1.57441879308j))*dim
            arg[(1, 1, 3, 2)]=(-0.273750037753+0.59392152926j)*x[0]**o + ((0.303448700676+0.846733429276j))*x[0] + ((-0.960399696486-0.0290406955815j))*x[1]**o + ((0.790511387726-0.398607041277j))*x[1] + ((0.941048042803-0.0559397900197j))*x[2]**o + ((0.905873405292+0.854340765433j))*x[2]
            ref[(1, 1, 3, 2)]=(-0.293101691437+0.508941043659j)*(1+2.*(dim-1)/(o+1.)) + ((1.99983349369+1.30246715343j))*dim
            arg[(1, 1, 3, 3)]=(-0.334171763619+0.998075558876j)*x[0]**o + ((0.427902684577+0.949640311976j))*x[0] + ((0.960867064547+0.312001760861j))*x[1]**o + ((0.243619958371+0.864565286485j))*x[1] + ((0.743623450127+0.860805351539j))*x[2]**o + ((0.0895934078508-0.603880912134j))*x[2]
            ref[(1, 1, 3, 3)]=(1.37031875106+2.17088267128j)*(1+2.*(dim-1)/(o+1.)) + ((0.761116050799+1.21032468633j))*dim
            arg[(2, 0, 0, 0)]=(-0.323391013934+0.20403613348j)*x[0]**o + ((0.682127618001+0.259945037491j))*x[0] + ((-0.70930702957+0.636385358663j))*x[1]**o + ((-0.366802092093+0.0852955467339j))*x[1] + ((0.25469160557+0.693449320542j))*x[2]**o + ((0.039997442449+0.47893263915j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.778006437934+1.53387081269j)*(1+2.*(dim-1)/(o+1.)) + ((0.355322968357+0.824173223374j))*dim
            arg[(2, 0, 0, 1)]=(-0.646229952743-0.588867749537j)*x[0]**o + ((-0.279253458555-0.151784646658j))*x[0] + ((0.25992328286+0.209991668944j))*x[1]**o + ((0.887458489169-0.575043977549j))*x[1] + ((-0.4580299777+0.650120135336j))*x[2]**o + ((-0.451895712335-0.212310676145j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.844336647583+0.271244054743j)*(1+2.*(dim-1)/(o+1.)) + ((0.156309318279-0.939139300352j))*dim
            arg[(2, 0, 0, 2)]=(0.577114950534+0.379924997297j)*x[0]**o + ((0.492172908128+0.960538115693j))*x[0] + ((-0.582005476034-0.808510204332j))*x[1]**o + ((-0.997312823986-0.8003610115j))*x[1] + ((-0.637637125826+0.251297684018j))*x[2]**o + ((0.194358939103+0.64511016545j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.642527651326-0.177287523017j)*(1+2.*(dim-1)/(o+1.)) + ((-0.310780976755+0.805287269643j))*dim
            arg[(2, 0, 0, 3)]=(0.672226517329+0.440725777517j)*x[0]**o + ((-0.648402946814+0.0981842476369j))*x[0] + ((-0.735483719059-0.212417441378j))*x[1]**o + ((-0.929951404142+0.519560158145j))*x[1] + ((-0.881526765665+0.751956109008j))*x[2]**o + ((0.855951381168-0.511116782481j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.944783967394+0.980264445146j)*(1+2.*(dim-1)/(o+1.)) + ((-0.722402969788+0.106627623301j))*dim
            arg[(2, 0, 1, 0)]=(0.475288761038+0.489943715341j)*x[0]**o + ((0.880337882257-0.174536341111j))*x[0] + ((0.408627504196+0.614440800786j))*x[1]**o + ((-0.906000376005+0.756622290839j))*x[1] + ((0.41109156123+0.255891608115j))*x[2]**o + ((-0.808789709512-0.983878660807j))*x[2]
            ref[(2, 0, 1, 0)]=(1.29500782646+1.36027612424j)*(1+2.*(dim-1)/(o+1.)) + ((-0.83445220326-0.401792711078j))*dim
            arg[(2, 0, 1, 1)]=(0.558623600069+0.307120625209j)*x[0]**o + ((-0.435190091239-0.49600457714j))*x[0] + ((0.377161921682+0.935962052379j))*x[1]**o + ((0.929825163864-0.213351272469j))*x[1] + ((0.424496186796-0.925289781111j))*x[2]**o + ((-0.385254483338+0.235380167083j))*x[2]
            ref[(2, 0, 1, 1)]=(1.36028170855+0.317792896477j)*(1+2.*(dim-1)/(o+1.)) + ((0.109380589287-0.473975682527j))*dim
            arg[(2, 0, 1, 2)]=(-0.212135312324-0.852971017783j)*x[0]**o + ((0.565423382394+0.415196446429j))*x[0] + ((-0.0815823148461+0.327331377194j))*x[1]**o + ((0.459535624544-0.274320167389j))*x[1] + ((-0.991902323225-0.139463284124j))*x[2]**o + ((0.126866450583-0.588140148434j))*x[2]
            ref[(2, 0, 1, 2)]=(-1.28561995039-0.665102924713j)*(1+2.*(dim-1)/(o+1.)) + ((1.15182545752-0.447263869394j))*dim
            arg[(2, 0, 1, 3)]=(0.604924387968-0.80463494642j)*x[0]**o + ((0.482645488536+0.766237579531j))*x[0] + ((0.650040223089+0.411517413457j))*x[1]**o + ((0.584267340665-0.131171010287j))*x[1] + ((0.300449595146-0.0292470837646j))*x[2]**o + ((-0.704755602994-0.419432324691j))*x[2]
            ref[(2, 0, 1, 3)]=(1.5554142062-0.422364616727j)*(1+2.*(dim-1)/(o+1.)) + ((0.362157226206+0.215634244552j))*dim
            arg[(2, 0, 2, 0)]=(-0.123934369564+0.355645400197j)*x[0]**o + ((-0.439150127992-0.510595602575j))*x[0] + ((0.312391159764-0.443465978616j))*x[1]**o + ((0.736065721665+0.327159846653j))*x[1] + ((-0.0128869730165+0.346273374094j))*x[2]**o + ((0.0363751672831-0.477476725694j))*x[2]
            ref[(2, 0, 2, 0)]=(0.175569817183+0.258452795675j)*(1+2.*(dim-1)/(o+1.)) + ((0.333290760957-0.660912481615j))*dim
            arg[(2, 0, 2, 1)]=(-0.135838783385-0.153559655511j)*x[0]**o + ((0.757042475292-0.518573356214j))*x[0] + ((-0.703593649533-0.351175353001j))*x[1]**o + ((0.522224072365-0.803163911345j))*x[1] + ((0.188959824089-0.357132352828j))*x[2]**o + ((-0.347828964827-0.989568283178j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.650472608828-0.861867361341j)*(1+2.*(dim-1)/(o+1.)) + ((0.93143758283-2.31130555074j))*dim
            arg[(2, 0, 2, 2)]=(0.113089895839+0.741587137433j)*x[0]**o + ((0.755519444449-0.952075330283j))*x[0] + ((0.210683528288-0.982849256142j))*x[1]**o + ((-0.397190517347-0.13248887884j))*x[1] + ((-0.821126872945+0.49838086355j))*x[2]**o + ((0.0717035680581-0.195396416524j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.497353448819+0.257118744841j)*(1+2.*(dim-1)/(o+1.)) + ((0.43003249516-1.27996062565j))*dim
            arg[(2, 0, 2, 3)]=(-0.449421926146+0.56357429763j)*x[0]**o + ((0.47306915932+0.196043361727j))*x[0] + ((0.353625978524-0.477286491031j))*x[1]**o + ((-0.239897639413+0.138044414372j))*x[1] + ((-0.0317620262533+0.410008377933j))*x[2]**o + ((0.783130016858-0.576019238309j))*x[2]
            ref[(2, 0, 2, 3)]=(-0.127557973876+0.496296184532j)*(1+2.*(dim-1)/(o+1.)) + ((1.01630153677-0.24193146221j))*dim
            arg[(2, 0, 3, 0)]=(0.0445130375514-0.655435855386j)*x[0]**o + ((-0.184807542836-0.193495699178j))*x[0] + ((0.354336809916-0.481023208499j))*x[1]**o + ((0.202169948721+0.399479229719j))*x[1] + ((0.114928547997+0.759877781162j))*x[2]**o + ((-0.664991553385+0.610460719178j))*x[2]
            ref[(2, 0, 3, 0)]=(0.513778395464-0.376581282722j)*(1+2.*(dim-1)/(o+1.)) + ((-0.647629147499+0.816444249719j))*dim
            arg[(2, 0, 3, 1)]=(0.644735475949-0.852611287772j)*x[0]**o + ((-0.633413013053+0.451310977501j))*x[0] + ((-0.21039628117+0.113404543604j))*x[1]**o + ((0.630878677632+0.0267320024067j))*x[1] + ((-0.261218720206-0.216840112396j))*x[2]**o + ((0.1533444012-0.345246630566j))*x[2]
            ref[(2, 0, 3, 1)]=(0.173120474574-0.956046856564j)*(1+2.*(dim-1)/(o+1.)) + ((0.150810065779+0.132796349342j))*dim
            arg[(2, 0, 3, 2)]=(0.804462880467-0.374351882092j)*x[0]**o + ((-0.0709790717823+0.508688178265j))*x[0] + ((-0.436101649109-0.50699911948j))*x[1]**o + ((0.342247709639+0.129115012491j))*x[1] + ((-0.466969817458+0.731629166016j))*x[2]**o + ((0.719389416403+0.274485031482j))*x[2]
            ref[(2, 0, 3, 2)]=(-0.0986085860993-0.149721835556j)*(1+2.*(dim-1)/(o+1.)) + ((0.99065805426+0.912288222239j))*dim
            arg[(2, 0, 3, 3)]=(-0.757805097792+0.330209674356j)*x[0]**o + ((0.576531764763-0.932762902272j))*x[0] + ((-0.493499199063+0.0389255684493j))*x[1]**o + ((-0.672789917066+0.758709300691j))*x[1] + ((0.294575228393+0.641154691756j))*x[2]**o + ((-0.994057686914-0.861172349718j))*x[2]
            ref[(2, 0, 3, 3)]=(-0.956729068463+1.01028993456j)*(1+2.*(dim-1)/(o+1.)) + ((-1.09031583922-1.0352259513j))*dim
            arg[(2, 1, 0, 0)]=(-0.775947398146+0.401528965695j)*x[0]**o + ((-0.240641140973-0.328387988567j))*x[0] + ((0.753961755816+0.221357700644j))*x[1]**o + ((-0.43149082298-0.710135217248j))*x[1] + ((0.00768150623731-0.813477981155j))*x[2]**o + ((-0.211583134162+0.634018909774j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.0143041360926-0.190591314816j)*(1+2.*(dim-1)/(o+1.)) + ((-0.883715098115-0.404504296041j))*dim
            arg[(2, 1, 0, 1)]=(0.467349139436+0.832983401591j)*x[0]**o + ((0.782945221514-0.257546571863j))*x[0] + ((-0.393341072983+0.0529544345955j))*x[1]**o + ((0.40969474745+0.234597657726j))*x[1] + ((-0.627913834561-0.750154264615j))*x[2]**o + ((0.226465372755+0.957500375029j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.553905768108+0.135783571571j)*(1+2.*(dim-1)/(o+1.)) + ((1.41910534172+0.934551460891j))*dim
            arg[(2, 1, 0, 2)]=(-0.16668447634+0.810254011546j)*x[0]**o + ((-0.0163516408045-0.870880695582j))*x[0] + ((-0.397967479785-0.600228253528j))*x[1]**o + ((-0.454166577453+0.23038946848j))*x[1] + ((0.0996099770596-0.20003124636j))*x[2]**o + ((-0.577280477529+0.454856877359j))*x[2]
            ref[(2, 1, 0, 2)]=(-0.465041979065+0.00999451165881j)*(1+2.*(dim-1)/(o+1.)) + ((-1.04779869579-0.185634349742j))*dim
            arg[(2, 1, 0, 3)]=(0.942813032912+0.662424533776j)*x[0]**o + ((0.257799375358-0.629975961777j))*x[0] + ((-0.0418444702838-0.378772270252j))*x[1]**o + ((0.431040372212-0.799201775433j))*x[1] + ((-0.78098604286+0.402824591872j))*x[2]**o + ((0.110007879956-0.468941816282j))*x[2]
            ref[(2, 1, 0, 3)]=(0.119982519768+0.686476855396j)*(1+2.*(dim-1)/(o+1.)) + ((0.798847627526-1.89811955349j))*dim
            arg[(2, 1, 1, 0)]=(-0.832341514044-0.0973193324716j)*x[0]**o + ((-0.771286016288-0.161500825453j))*x[0] + ((0.986097207603+0.848517063607j))*x[1]**o + ((-0.0344532302792-0.164237180071j))*x[1] + ((0.317602776205-0.955893494993j))*x[2]**o + ((-0.874842561993-0.00475359891282j))*x[2]
            ref[(2, 1, 1, 0)]=(0.471358469764-0.204695763858j)*(1+2.*(dim-1)/(o+1.)) + ((-1.68058180856-0.330491604436j))*dim
            arg[(2, 1, 1, 1)]=(0.283826716514+0.460479372331j)*x[0]**o + ((0.58451516717-0.976256276585j))*x[0] + ((-0.173843316252+0.747646505713j))*x[1]**o + ((-0.226503419414+0.792058745793j))*x[1] + ((-0.204159807263-0.685242508354j))*x[2]**o + ((-0.25306308989-0.579785906041j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.0941764070015+0.52288336969j)*(1+2.*(dim-1)/(o+1.)) + ((0.104948657866-0.763983436833j))*dim
            arg[(2, 1, 1, 2)]=(-0.405688421586+0.204677371449j)*x[0]**o + ((0.0419331054749+0.612960301092j))*x[0] + ((-0.0384081129237+0.929878837651j))*x[1]**o + ((0.806330293144-0.57380019627j))*x[1] + ((0.364386767749-0.0304353925549j))*x[2]**o + ((-0.812259449697-0.0814191018527j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.0797097667608+1.10412081655j)*(1+2.*(dim-1)/(o+1.)) + ((0.0360039489221-0.0422589970308j))*dim
            arg[(2, 1, 1, 3)]=(-0.655812027554-0.815397574712j)*x[0]**o + ((-0.620176949461-0.282548461269j))*x[0] + ((-0.906109047366-0.333678980138j))*x[1]**o + ((-0.447175963483-0.241435294306j))*x[1] + ((-0.863810109356+0.518907436585j))*x[2]**o + ((-0.411996385691+0.530480322898j))*x[2]
            ref[(2, 1, 1, 3)]=(-2.42573118428-0.630169118265j)*(1+2.*(dim-1)/(o+1.)) + ((-1.47934929863+0.00649656732311j))*dim
            arg[(2, 1, 2, 0)]=(0.0274969373751-0.473149014478j)*x[0]**o + ((0.134753996246+0.425515635079j))*x[0] + ((0.453116645278+0.201621302478j))*x[1]**o + ((0.751970896372-0.0597332361864j))*x[1] + ((0.578567585007-0.228890617619j))*x[2]**o + ((0.613521162052+0.880115844694j))*x[2]
            ref[(2, 1, 2, 0)]=(1.05918116766-0.500418329619j)*(1+2.*(dim-1)/(o+1.)) + ((1.50024605467+1.24589824359j))*dim
            arg[(2, 1, 2, 1)]=(-0.762802965237-0.251470786755j)*x[0]**o + ((0.604765799623+0.926319637857j))*x[0] + ((-0.414849021941-0.466386378298j))*x[1]**o + ((0.252742598709-0.104882810964j))*x[1] + ((-0.325570845709-0.309338607591j))*x[2]**o + ((0.802054123972+0.884125015137j))*x[2]
            ref[(2, 1, 2, 1)]=(-1.50322283289-1.02719577264j)*(1+2.*(dim-1)/(o+1.)) + ((1.6595625223+1.70556184203j))*dim
            arg[(2, 1, 2, 2)]=(-0.808896262439+0.383548616875j)*x[0]**o + ((0.0972079811216-0.102512570934j))*x[0] + ((0.629249789158-0.501377851444j))*x[1]**o + ((-0.215663189488-0.118877679976j))*x[1] + ((0.680859962198+0.780273929059j))*x[2]**o + ((0.728161579077-0.334578509572j))*x[2]
            ref[(2, 1, 2, 2)]=(0.501213488917+0.66244469449j)*(1+2.*(dim-1)/(o+1.)) + ((0.609706370711-0.555968760482j))*dim
            arg[(2, 1, 2, 3)]=(-0.674870080259+0.553741545711j)*x[0]**o + ((-0.473241446383+0.878856193152j))*x[0] + ((0.971039965917+0.0229693270172j))*x[1]**o + ((0.0150462975041+0.0151775772553j))*x[1] + ((-0.116123329653-0.0492780427328j))*x[2]**o + ((-0.434157824891-0.0708655198632j))*x[2]
            ref[(2, 1, 2, 3)]=(0.180046556005+0.527432829996j)*(1+2.*(dim-1)/(o+1.)) + ((-0.892352973769+0.823168250544j))*dim
            arg[(2, 1, 3, 0)]=(-0.698400562161-0.547801579809j)*x[0]**o + ((0.039582889177+0.0625752830193j))*x[0] + ((0.47795896067+0.540218772741j))*x[1]**o + ((-0.645841414402-0.740924954921j))*x[1] + ((-0.586232230937-0.592691345527j))*x[2]**o + ((0.146698291356-0.525471246917j))*x[2]
            ref[(2, 1, 3, 0)]=(-0.806673832427-0.600274152595j)*(1+2.*(dim-1)/(o+1.)) + ((-0.459560233869-1.20382091882j))*dim
            arg[(2, 1, 3, 1)]=(0.9966062186-0.586000913216j)*x[0]**o + ((-0.861591612352-0.77710034132j))*x[0] + ((-0.226885826709+0.163683970797j))*x[1]**o + ((-0.456192178412-0.380103403245j))*x[1] + ((0.69927878884+0.926322164667j))*x[2]**o + ((-0.0782622097779+0.0832895426952j))*x[2]
            ref[(2, 1, 3, 1)]=(1.46899918073+0.504005222249j)*(1+2.*(dim-1)/(o+1.)) + ((-1.39604600054-1.07391420187j))*dim
            arg[(2, 1, 3, 2)]=(-0.818454130378+0.17806958285j)*x[0]**o + ((-0.0270033920502-0.832519502688j))*x[0] + ((-0.113555619829-0.0153658548281j))*x[1]**o + ((-0.292566168391+0.498542380418j))*x[1] + ((-0.0893736776489-0.465380717651j))*x[2]**o + ((0.994045707334+0.786026204049j))*x[2]
            ref[(2, 1, 3, 2)]=(-1.02138342786-0.302676989629j)*(1+2.*(dim-1)/(o+1.)) + ((0.674476146892+0.45204908178j))*dim
            arg[(2, 1, 3, 3)]=(0.772786117449-0.0458534248943j)*x[0]**o + ((-0.095421145283-0.379189532706j))*x[0] + ((-0.120728999952-0.983398782225j))*x[1]**o + ((-0.614942057542-0.354663838843j))*x[1] + ((0.726303103045+0.484802554145j))*x[2]**o + ((0.619206516433-0.21749002554j))*x[2]
            ref[(2, 1, 3, 3)]=(1.37836022054-0.544449652974j)*(1+2.*(dim-1)/(o+1.)) + ((-0.0911566863919-0.951343397088j))*dim
            arg[(3, 0, 0, 0)]=(-0.505565124014-0.179099814954j)*x[0]**o + ((0.673672149904+0.772521157085j))*x[0] + ((-0.849297542088+0.521277877999j))*x[1]**o + ((-0.141787864653-0.800110558828j))*x[1] + ((-0.844077970863+0.402757199142j))*x[2]**o + ((-0.0950637734724+0.0380362583273j))*x[2]
            ref[(3, 0, 0, 0)]=(-2.19894063696+0.744935262187j)*(1+2.*(dim-1)/(o+1.)) + ((0.436820511779+0.0104468565851j))*dim
            arg[(3, 0, 0, 1)]=(-0.908236086978-0.163596986532j)*x[0]**o + ((0.802641823566-0.114043878437j))*x[0] + ((0.484003719296-0.34760324352j))*x[1]**o + ((-0.9392674659-0.1662010423j))*x[1] + ((0.388916525907+0.833842610973j))*x[2]**o + ((0.725521021649-0.607546298217j))*x[2]
            ref[(3, 0, 0, 1)]=(-0.0353158417754+0.322642380921j)*(1+2.*(dim-1)/(o+1.)) + ((0.588895379315-0.887791218954j))*dim
            arg[(3, 0, 0, 2)]=(0.858600689056-0.157278040928j)*x[0]**o + ((-0.845783452367+0.390137981593j))*x[0] + ((0.243217802117-0.182568472559j))*x[1]**o + ((-0.943519059721+0.993982592385j))*x[1] + ((0.13924237918+0.81719627463j))*x[2]**o + ((0.216472927626-0.465755361819j))*x[2]
            ref[(3, 0, 0, 2)]=(1.24106087035+0.477349761143j)*(1+2.*(dim-1)/(o+1.)) + ((-1.57282958446+0.918365212159j))*dim
            arg[(3, 0, 0, 3)]=(-0.572009362416+0.912931002996j)*x[0]**o + ((0.512588823251-0.49563393114j))*x[0] + ((-0.693918865371+0.919017428385j))*x[1]**o + ((0.0059258410356+0.356127278716j))*x[1] + ((0.827731875039+0.942486171062j))*x[2]**o + ((0.579128399068-0.350840049026j))*x[2]
            ref[(3, 0, 0, 3)]=(-0.438196352747+2.77443460244j)*(1+2.*(dim-1)/(o+1.)) + ((1.09764306335-0.490346701451j))*dim
            arg[(3, 0, 1, 0)]=(0.818172654019-0.882431258255j)*x[0]**o + ((-0.934720987031+0.0872475337751j))*x[0] + ((0.219520580014+0.0301251518649j))*x[1]**o + ((-0.828564452022-0.822762454694j))*x[1] + ((0.354352792299-0.4373870359j))*x[2]**o + ((0.392294239207+0.47263485345j))*x[2]
            ref[(3, 0, 1, 0)]=(1.39204602633-1.28969314229j)*(1+2.*(dim-1)/(o+1.)) + ((-1.37099119985-0.262880067469j))*dim
            arg[(3, 0, 1, 1)]=(-0.786353429325-0.64262286293j)*x[0]**o + ((0.819864063621-0.853060631309j))*x[0] + ((-0.402895859235-0.379020279634j))*x[1]**o + ((-0.919891213902-0.738678680852j))*x[1] + ((0.645322135424+0.527987274587j))*x[2]**o + ((-0.783009829996+0.498131733576j))*x[2]
            ref[(3, 0, 1, 1)]=(-0.543927153136-0.493655867977j)*(1+2.*(dim-1)/(o+1.)) + ((-0.883036980277-1.09360757858j))*dim
            arg[(3, 0, 1, 2)]=(0.200345980741-0.827475474991j)*x[0]**o + ((-0.275052324725-0.085612744286j))*x[0] + ((-0.908152339489+0.988450648502j))*x[1]**o + ((-0.943409493033+0.60528069924j))*x[1] + ((0.567573661914-0.594196037915j))*x[2]**o + ((-0.187614739289-0.956418196084j))*x[2]
            ref[(3, 0, 1, 2)]=(-0.140232696834-0.433220864404j)*(1+2.*(dim-1)/(o+1.)) + ((-1.40607655705-0.43675024113j))*dim
            arg[(3, 0, 1, 3)]=(0.786524594539+0.875945330623j)*x[0]**o + ((0.739776188865+0.642465999662j))*x[0] + ((-0.230254054079-0.662941825821j))*x[1]**o + ((-0.224860481467+0.323070504825j))*x[1] + ((-0.492348135866+0.354966987165j))*x[2]**o + ((0.506706158173-0.55614708317j))*x[2]
            ref[(3, 0, 1, 3)]=(0.0639224045942+0.567970491967j)*(1+2.*(dim-1)/(o+1.)) + ((1.02162186557+0.409389421317j))*dim
            arg[(3, 0, 2, 0)]=(0.591015897961-0.726866779307j)*x[0]**o + ((0.879215760298+0.46717491048j))*x[0] + ((-0.772550697132+0.187006553632j))*x[1]**o + ((-0.211177464074+0.502064638599j))*x[1] + ((-0.212738639724+0.805927005762j))*x[2]**o + ((0.48785982682+0.48030218764j))*x[2]
            ref[(3, 0, 2, 0)]=(-0.394273438894+0.266066780088j)*(1+2.*(dim-1)/(o+1.)) + ((1.15589812305+1.44954173672j))*dim
            arg[(3, 0, 2, 1)]=(0.961799920737-0.0236419013209j)*x[0]**o + ((0.316579408679+0.688500532175j))*x[0] + ((0.980734038612-0.554272082695j))*x[1]**o + ((0.200353173524-0.996860237043j))*x[1] + ((-0.879080279555-0.41931411998j))*x[2]**o + ((-0.252901032133+0.760537531427j))*x[2]
            ref[(3, 0, 2, 1)]=(1.06345367979-0.997228103996j)*(1+2.*(dim-1)/(o+1.)) + ((0.26403155007+0.452177826559j))*dim
            arg[(3, 0, 2, 2)]=(0.700779691907+0.284214945926j)*x[0]**o + ((-0.489794493051-0.946438127571j))*x[0] + ((0.806154443917-0.716186951249j))*x[1]**o + ((0.464191373239-0.881774878931j))*x[1] + ((0.0547178731077+0.680415562014j))*x[2]**o + ((-0.0845669176396+0.0690760357516j))*x[2]
            ref[(3, 0, 2, 2)]=(1.56165200893+0.24844355669j)*(1+2.*(dim-1)/(o+1.)) + ((-0.110170037452-1.75913697075j))*dim
            arg[(3, 0, 2, 3)]=(-0.23558409036+0.148676748991j)*x[0]**o + ((0.143481337865-0.999365617067j))*x[0] + ((0.36347822573-0.139681879225j))*x[1]**o + ((-0.219728487802-0.879147251889j))*x[1] + ((0.601433742016-0.768662410136j))*x[2]**o + ((-0.230265337344+0.711953352387j))*x[2]
            ref[(3, 0, 2, 3)]=(0.729327877386-0.75966754037j)*(1+2.*(dim-1)/(o+1.)) + ((-0.306512487281-1.16655951657j))*dim
            arg[(3, 0, 3, 0)]=(0.816457298427-0.0896508742064j)*x[0]**o + ((-0.911729721632-0.513013089625j))*x[0] + ((0.872677393022-0.441183900988j))*x[1]**o + ((0.737530794708-0.641724610941j))*x[1] + ((0.121241711404+0.609703969714j))*x[2]**o + ((0.276664422736+0.66789689037j))*x[2]
            ref[(3, 0, 3, 0)]=(1.81037640285+0.0788691945195j)*(1+2.*(dim-1)/(o+1.)) + ((0.102465495811-0.486840810197j))*dim
            arg[(3, 0, 3, 1)]=(0.685264794001-0.32558038995j)*x[0]**o + ((-0.659784044591+0.0353194054183j))*x[0] + ((0.0829115832313+0.321848563422j))*x[1]**o + ((0.113176843909-0.320469083865j))*x[1] + ((-0.691481264378-0.169503950157j))*x[2]**o + ((-0.47928427865+0.479544272802j))*x[2]
            ref[(3, 0, 3, 1)]=(0.0766951128548-0.173235776685j)*(1+2.*(dim-1)/(o+1.)) + ((-1.02589147933+0.194394594356j))*dim
            arg[(3, 0, 3, 2)]=(-0.0647037957658-0.219324573729j)*x[0]**o + ((0.298940784711-0.70136822312j))*x[0] + ((0.895766071432-0.171994170684j))*x[1]**o + ((0.484535103612+0.644250733399j))*x[1] + ((-0.0137727794876-0.936060538625j))*x[2]**o + ((-0.775440430961-0.729616986695j))*x[2]
            ref[(3, 0, 3, 2)]=(0.817289496178-1.32737928304j)*(1+2.*(dim-1)/(o+1.)) + ((0.0080354573617-0.786734476416j))*dim
            arg[(3, 0, 3, 3)]=(0.912410511659+0.551250132889j)*x[0]**o + ((-0.96060488763+0.542747586139j))*x[0] + ((0.966183522106-0.709106302276j))*x[1]**o + ((-0.114430249962+0.141352858518j))*x[1] + ((-0.751917696963-0.0641541524567j))*x[2]**o + ((-0.0715235388633-0.212231222278j))*x[2]
            ref[(3, 0, 3, 3)]=(1.1266763368-0.222010321844j)*(1+2.*(dim-1)/(o+1.)) + ((-1.14655867645+0.471869222379j))*dim
            arg[(3, 1, 0, 0)]=(0.170436100099+0.51037397536j)*x[0]**o + ((0.166082921227-0.879966977135j))*x[0] + ((-0.0591512021802+0.464961444542j))*x[1]**o + ((-0.766582858443-0.137585107081j))*x[1] + ((-0.986473857132+0.976382691885j))*x[2]**o + ((-0.65553795001+0.107259887897j))*x[2]
            ref[(3, 1, 0, 0)]=(-0.875188959213+1.95171811179j)*(1+2.*(dim-1)/(o+1.)) + ((-1.25603788723-0.910292196319j))*dim
            arg[(3, 1, 0, 1)]=(0.964062620667+0.531304492782j)*x[0]**o + ((0.445969851531+0.714781790019j))*x[0] + ((-0.941992330146-0.282568143011j))*x[1]**o + ((0.17696790139-0.402777647355j))*x[1] + ((-0.15238426556+0.927377548186j))*x[2]**o + ((-0.381406393828+0.830025951252j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.130313975039+1.17611389796j)*(1+2.*(dim-1)/(o+1.)) + ((0.241531359093+1.14203009392j))*dim
            arg[(3, 1, 0, 2)]=(-0.261395768252+0.271211156967j)*x[0]**o + ((0.890469231124+0.277785423783j))*x[0] + ((-0.349396453268-0.700597111711j))*x[1]**o + ((0.325334802904-0.805420924348j))*x[1] + ((0.0400688056493+0.0254835842309j))*x[2]**o + ((-0.808262592324-0.566814936211j))*x[2]
            ref[(3, 1, 0, 2)]=(-0.570723415871-0.403902370513j)*(1+2.*(dim-1)/(o+1.)) + ((0.407541441703-1.09445043678j))*dim
            arg[(3, 1, 0, 3)]=(0.660021039414+0.82802817043j)*x[0]**o + ((-0.96979650807-0.213008922452j))*x[0] + ((0.756218600945+0.272617595815j))*x[1]**o + ((0.260523037698+0.208210077213j))*x[1] + ((0.10164277948+0.78684644134j))*x[2]**o + ((-0.341766616427-0.852272649309j))*x[2]
            ref[(3, 1, 0, 3)]=(1.51788241984+1.88749220759j)*(1+2.*(dim-1)/(o+1.)) + ((-1.0510400868-0.857071494548j))*dim
            arg[(3, 1, 1, 0)]=(0.979929860114-0.440912375182j)*x[0]**o + ((-0.877907496053-0.400932591055j))*x[0] + ((-0.553789267252+0.147884300554j))*x[1]**o + ((0.218655992908+0.703421667563j))*x[1] + ((0.446972589098-0.563170742359j))*x[2]**o + ((-0.8326867882-0.749807133971j))*x[2]
            ref[(3, 1, 1, 0)]=(0.87311318196-0.856198816987j)*(1+2.*(dim-1)/(o+1.)) + ((-1.49193829134-0.447318057463j))*dim
            arg[(3, 1, 1, 1)]=(0.99649416129+0.44165657963j)*x[0]**o + ((-0.934992032613-0.426193901581j))*x[0] + ((0.447500645574-0.79694335665j))*x[1]**o + ((-0.051640206696-0.796668094217j))*x[1] + ((-0.7862928421+0.402694454852j))*x[2]**o + ((0.294870672995+0.534191250639j))*x[2]
            ref[(3, 1, 1, 1)]=(0.657701964764+0.0474076778331j)*(1+2.*(dim-1)/(o+1.)) + ((-0.691761566314-0.688670745159j))*dim
            arg[(3, 1, 1, 2)]=(0.337669319797-0.238044362832j)*x[0]**o + ((0.033747422203+0.246220957871j))*x[0] + ((0.74668799+0.404463988276j))*x[1]**o + ((0.96539790934+0.0515944788239j))*x[1] + ((0.547959720338+0.854676563352j))*x[2]**o + ((-0.824284388982-0.0170154044443j))*x[2]
            ref[(3, 1, 1, 2)]=(1.63231703013+1.0210961888j)*(1+2.*(dim-1)/(o+1.)) + ((0.17486094256+0.28080003225j))*dim
            arg[(3, 1, 1, 3)]=(0.756069386432+0.875935934776j)*x[0]**o + ((-0.746283477026+0.866400392975j))*x[0] + ((-0.816287389007+0.425489441147j))*x[1]**o + ((-0.863906067451-0.833007021277j))*x[1] + ((0.145518312571-0.0898062153462j))*x[2]**o + ((0.0903131353153+0.908940321971j))*x[2]
            ref[(3, 1, 1, 3)]=(0.0853003099958+1.21161916058j)*(1+2.*(dim-1)/(o+1.)) + ((-1.51987640916+0.942333693669j))*dim
            arg[(3, 1, 2, 0)]=(-0.131622067191-0.734800911864j)*x[0]**o + ((-0.194790993246+0.918958262251j))*x[0] + ((0.132264103176-0.745132068499j))*x[1]**o + ((0.887144485676-0.0806997279407j))*x[1] + ((-0.653558335839-0.28010660888j))*x[2]**o + ((0.823685016972+0.663957510263j))*x[2]
            ref[(3, 1, 2, 0)]=(-0.652916299854-1.76003958924j)*(1+2.*(dim-1)/(o+1.)) + ((1.5160385094+1.50221604457j))*dim
            arg[(3, 1, 2, 1)]=(0.347581437779+0.258363317222j)*x[0]**o + ((-0.543216869625+0.807943215832j))*x[0] + ((0.758994016206+0.207544687063j))*x[1]**o + ((-0.488402640495-0.304961923058j))*x[1] + ((0.834985002952-0.0486648067299j))*x[2]**o + ((-0.903894099361+0.52298490434j))*x[2]
            ref[(3, 1, 2, 1)]=(1.94156045694+0.417243197555j)*(1+2.*(dim-1)/(o+1.)) + ((-1.93551360948+1.02596619711j))*dim
            arg[(3, 1, 2, 2)]=(0.565881676523-0.940095127076j)*x[0]**o + ((-0.661149301013+0.576653188308j))*x[0] + ((0.213605437222-0.499722766982j))*x[1]**o + ((0.910564037455-0.764329741934j))*x[1] + ((-0.995004245985+0.634488980872j))*x[2]**o + ((-0.65903864966-0.0523347478327j))*x[2]
            ref[(3, 1, 2, 2)]=(-0.21551713224-0.805328913185j)*(1+2.*(dim-1)/(o+1.)) + ((-0.409623913218-0.240011301459j))*dim
            arg[(3, 1, 2, 3)]=(0.278255240239-0.67145359817j)*x[0]**o + ((0.73492893208-0.243081571932j))*x[0] + ((-0.620395988385+0.997177471921j))*x[1]**o + ((-0.0635085559295+0.219926896801j))*x[1] + ((-0.396979875786-0.142136633508j))*x[2]**o + ((0.535554110762+0.524052680242j))*x[2]
            ref[(3, 1, 2, 3)]=(-0.739120623933+0.183587240243j)*(1+2.*(dim-1)/(o+1.)) + ((1.20697448691+0.50089800511j))*dim
            arg[(3, 1, 3, 0)]=(-0.0136127890021+0.333179183149j)*x[0]**o + ((-0.356384059239+0.99093262228j))*x[0] + ((-0.457300988337-0.723683197795j))*x[1]**o + ((0.829247221289+0.65589344277j))*x[1] + ((-0.323354816524-0.954418492329j))*x[2]**o + ((0.601924703974-0.0465191332839j))*x[2]
            ref[(3, 1, 3, 0)]=(-0.794268593863-1.34492250697j)*(1+2.*(dim-1)/(o+1.)) + ((1.07478786602+1.60030693177j))*dim
            arg[(3, 1, 3, 1)]=(0.986562245069-0.196424294262j)*x[0]**o + ((-0.287588940674-0.194905599858j))*x[0] + ((0.880726769596-0.428394111301j))*x[1]**o + ((-0.39827749071+0.674922206847j))*x[1] + ((0.0833916776584+0.892817903477j))*x[2]**o + ((-0.168397983421+0.182309725185j))*x[2]
            ref[(3, 1, 3, 1)]=(1.95068069232+0.267999497915j)*(1+2.*(dim-1)/(o+1.)) + ((-0.854264414804+0.662326332174j))*dim
            arg[(3, 1, 3, 2)]=(0.809998113786-0.608196499683j)*x[0]**o + ((-0.935323523841-0.641200890635j))*x[0] + ((0.271961984318+0.169697243282j))*x[1]**o + ((0.670854408267+0.034572062581j))*x[1] + ((0.039830020176-0.2950204407j))*x[2]**o + ((-0.78950855854-0.396000683771j))*x[2]
            ref[(3, 1, 3, 2)]=(1.12179011828-0.733519697101j)*(1+2.*(dim-1)/(o+1.)) + ((-1.05397767411-1.00262951183j))*dim
            arg[(3, 1, 3, 3)]=(0.743931000052-0.901615848829j)*x[0]**o + ((-0.447822999537+0.0862588104392j))*x[0] + ((-0.160527263712-0.528343167918j))*x[1]**o + ((-0.800172828904-0.348170017525j))*x[1] + ((-0.0013763922528+0.915596263199j))*x[2]**o + ((0.104024256046+0.997496015192j))*x[2]
            ref[(3, 1, 3, 3)]=(0.582027344088-0.514362753548j)*(1+2.*(dim-1)/(o+1.)) + ((-1.14397157239+0.735584808105j))*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.277365244916*x[0]**o + (0.441201342429)*x[0] + (-0.821400237018)*x[1]**o + (0.27322008185)*x[1]
            ref=0.0851932160878-(-0.0906724986838)*(o-1.)
        else:
            arg=-0.217703120907*x[0]**o + (-0.294042370959)*x[0] + (0.45670020373)*x[1]**o + (0.32033634575)*x[1] + (-0.479045887512)*x[2]**o + (0.745376593391)*x[2]
            ref=0.265810881746-(-0.040008134115)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.282906871841*x[0]**o + (-0.754125714676)*x[0] + (-0.0317652588157)*x[1]**o + (-0.431102469495)*x[1]
            ref[(0,)]=-0.467043285573-(0.0418569355042)*(o-1.)
            arg[(1,)]=0.423495448487*x[0]**o + (-0.775723193792)*x[0] + (0.717913838532)*x[1]**o + (0.301480144945)*x[1]
            ref[(1,)]=0.333583119086-(0.19023488117)*(o-1.)
        else:
            arg[(0,)]=0.842287114721*x[0]**o + (-0.971548575354)*x[0] + (-0.406593467493)*x[1]**o + (0.276144390485)*x[1] + (0.937712208302)*x[2]**o + (-0.721314382808)*x[2]
            ref[(0,)]=-0.0216563560733-(0.228900975922)*(o-1.)
            arg[(1,)]=-0.225848490807*x[0]**o + (0.0385968757294)*x[0] + (0.297587261839)*x[1]**o + (-0.630343556088)*x[1] + (0.471230347016)*x[2]**o + (-0.448430866003)*x[2]
            ref[(1,)]=-0.248604214157-(0.0904948530081)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.485604106981*x[0]**o + (-0.37073322262)*x[0] + (-0.868630166079)*x[1]**o + (0.604293090526)*x[1]
            ref[(0, 0)]=-0.560337202577-(-0.225705712177)*(o-1.)
            arg[(0, 1)]=-0.268044924922*x[0]**o + (0.527644273896)*x[0] + (-0.00780046405464)*x[1]**o + (-0.63655818714)*x[1]
            ref[(0, 1)]=-0.19237965111-(-0.0459742314962)*(o-1.)
            arg[(0, 2)]=0.00634669941212*x[0]**o + (-0.0597744762059)*x[0] + (-0.490963267915)*x[1]**o + (-0.819835498291)*x[1]
            ref[(0, 2)]=-0.6821132715-(-0.0807694280837)*(o-1.)
            arg[(0, 3)]=-0.441384641812*x[0]**o + (-0.277602939478)*x[0] + (0.811183849894)*x[1]**o + (-0.947542633557)*x[1]
            ref[(0, 3)]=-0.427673182476-(0.061633201347)*(o-1.)
            arg[(1, 0)]=0.834134189045*x[0]**o + (-0.451032665086)*x[0] + (0.978923218103)*x[1]**o + (0.117749911531)*x[1]
            ref[(1, 0)]=0.739887326797-(0.302176234525)*(o-1.)
            arg[(1, 1)]=-0.00619027894682*x[0]**o + (-0.355552109455)*x[0] + (-0.827931421374)*x[1]**o + (0.754660166854)*x[1]
            ref[(1, 1)]=-0.217506821461-(-0.139020283387)*(o-1.)
            arg[(1, 2)]=0.628061378882*x[0]**o + (-0.0896196814307)*x[0] + (0.659375918138)*x[1]**o + (0.09739021662)*x[1]
            ref[(1, 2)]=0.647603916104-(0.214572882837)*(o-1.)
            arg[(1, 3)]=-0.690330555552*x[0]**o + (-0.417384195386)*x[0] + (0.351547222316)*x[1]**o + (-0.748516171278)*x[1]
            ref[(1, 3)]=-0.75234184995-(-0.0564638888726)*(o-1.)
            arg[(2, 0)]=0.983021044974*x[0]**o + (-0.764359616501)*x[0] + (0.790545125977)*x[1]**o + (-0.633060798712)*x[1]
            ref[(2, 0)]=0.188072877869-(0.295594361825)*(o-1.)
            arg[(2, 1)]=-0.883553551948*x[0]**o + (-0.965672738865)*x[0] + (0.223413178581)*x[1]**o + (0.156923191366)*x[1]
            ref[(2, 1)]=-0.734444960433-(-0.110023395561)*(o-1.)
            arg[(2, 2)]=0.159645518084*x[0]**o + (0.658052138226)*x[0] + (0.864161699821)*x[1]**o + (-0.154855596476)*x[1]
            ref[(2, 2)]=0.763501879828-(0.170634536318)*(o-1.)
            arg[(2, 3)]=0.976943367011*x[0]**o + (-0.88730347275)*x[0] + (0.399990720322)*x[1]**o + (-0.42782313544)*x[1]
            ref[(2, 3)]=0.0309037395717-(0.229489014556)*(o-1.)
            arg[(3, 0)]=0.846044160488*x[0]**o + (0.297712989029)*x[0] + (-0.713618506378)*x[1]**o + (0.940461871157)*x[1]
            ref[(3, 0)]=0.685300257148-(0.0220709423518)*(o-1.)
            arg[(3, 1)]=0.614995446032*x[0]**o + (0.56912635432)*x[0] + (0.708351101515)*x[1]**o + (-0.872920773719)*x[1]
            ref[(3, 1)]=0.509776064074-(0.220557757925)*(o-1.)
            arg[(3, 2)]=-0.982710521172*x[0]**o + (-0.951561158813)*x[0] + (-0.503998773012)*x[1]**o + (-0.62746038779)*x[1]
            ref[(3, 2)]=-1.53286542039-(-0.247784882364)*(o-1.)
            arg[(3, 3)]=-0.917085569785*x[0]**o + (0.764916389034)*x[0] + (-0.501744584946)*x[1]**o + (-0.983151763072)*x[1]
            ref[(3, 3)]=-0.818532764385-(-0.236471692455)*(o-1.)
        else:
            arg[(0, 0)]=-0.879061668081*x[0]**o + (0.655004752556)*x[0] + (-0.161373472423)*x[1]**o + (-0.664825388295)*x[1] + (0.577101161025)*x[2]**o + (0.790358564312)*x[2]
            ref[(0, 0)]=0.158601974548-(-0.0772223299131)*(o-1.)
            arg[(0, 1)]=0.412092034256*x[0]**o + (0.155308435003)*x[0] + (0.105715199222)*x[1]**o + (0.345771469062)*x[1] + (0.150061421771)*x[2]**o + (-0.791733023448)*x[2]
            ref[(0, 1)]=0.188607767933-(0.111311442541)*(o-1.)
            arg[(0, 2)]=-0.687250808497*x[0]**o + (-0.707220779964)*x[0] + (0.589900431916)*x[1]**o + (-0.158554869082)*x[1] + (-0.0290256924968)*x[2]**o + (-0.693303994263)*x[2]
            ref[(0, 2)]=-0.842727856193-(-0.0210626781797)*(o-1.)
            arg[(0, 3)]=0.00777479097274*x[0]**o + (0.38028603274)*x[0] + (0.937288884552)*x[1]**o + (-0.273993675172)*x[1] + (-0.683729427051)*x[2]**o + (0.824274236707)*x[2]
            ref[(0, 3)]=0.595950421375-(0.043555708079)*(o-1.)
            arg[(1, 0)]=-0.495138718255*x[0]**o + (0.6462386324)*x[0] + (0.677317191043)*x[1]**o + (-0.798270170815)*x[1] + (0.334267966974)*x[2]**o + (-0.637269543568)*x[2]
            ref[(1, 0)]=-0.136427321111-(0.0860744066269)*(o-1.)
            arg[(1, 1)]=0.564812675202*x[0]**o + (-0.803304343966)*x[0] + (-0.708314655627)*x[1]**o + (-0.781476200611)*x[1] + (-0.604253207764)*x[2]**o + (0.695348368374)*x[2]
            ref[(1, 1)]=-0.818593682196-(-0.124625864698)*(o-1.)
            arg[(1, 2)]=0.121753880246*x[0]**o + (0.106954939508)*x[0] + (-0.101078851666)*x[1]**o + (0.123084252675)*x[1] + (-0.582546010909)*x[2]**o + (0.475836174366)*x[2]
            ref[(1, 2)]=0.0720021921103-(-0.0936451637214)*(o-1.)
            arg[(1, 3)]=0.858083978891*x[0]**o + (-0.852957895106)*x[0] + (-0.405049709943)*x[1]**o + (0.909031306158)*x[1] + (-0.754038874679)*x[2]**o + (0.0406405964995)*x[2]
            ref[(1, 3)]=-0.10214529909-(-0.0501674342886)*(o-1.)
            arg[(2, 0)]=0.358103608263*x[0]**o + (0.467878338031)*x[0] + (-0.980609192324)*x[1]**o + (0.911329215851)*x[1] + (0.840639239206)*x[2]**o + (-0.0647153421153)*x[2]
            ref[(2, 0)]=0.766312933456-(0.0363556091908)*(o-1.)
            arg[(2, 1)]=-0.565594111477*x[0]**o + (-0.362015820782)*x[0] + (0.162093308305)*x[1]**o + (-0.320879708581)*x[1] + (-0.875666114054)*x[2]**o + (-0.0452705772905)*x[2]
            ref[(2, 1)]=-1.00366651194-(-0.213194486204)*(o-1.)
            arg[(2, 2)]=-0.464405249368*x[0]**o + (0.880301581532)*x[0] + (0.438993160594)*x[1]**o + (-0.94328863837)*x[1] + (0.629635566543)*x[2]**o + (0.151804847335)*x[2]
            ref[(2, 2)]=0.346520634133-(0.100703912962)*(o-1.)
            arg[(2, 3)]=-0.586827061929*x[0]**o + (-0.0273310137059)*x[0] + (0.926842973445)*x[1]**o + (-0.705711146561)*x[1] + (0.879588192144)*x[2]**o + (0.822056947208)*x[2]
            ref[(2, 3)]=0.6543094453-(0.20326735061)*(o-1.)
            arg[(3, 0)]=0.0315519137854*x[0]**o + (-0.560460393563)*x[0] + (0.349990686429)*x[1]**o + (0.532347219589)*x[1] + (0.394532814073)*x[2]**o + (0.639873565165)*x[2]
            ref[(3, 0)]=0.69391790274-(0.129345902381)*(o-1.)
            arg[(3, 1)]=-0.616506454262*x[0]**o + (0.546221189852)*x[0] + (0.259026213875)*x[1]**o + (0.401070616716)*x[1] + (0.978284523746)*x[2]**o + (0.327472411448)*x[2]
            ref[(3, 1)]=0.947784250687-(0.10346738056)*(o-1.)
            arg[(3, 2)]=0.21968364348*x[0]**o + (-0.10745730827)*x[0] + (-0.0451065426939)*x[1]**o + (0.430300093482)*x[1] + (0.027002106488)*x[2]**o + (-0.492533252641)*x[2]
            ref[(3, 2)]=0.0159443699228-(0.0335965345457)*(o-1.)
            arg[(3, 3)]=0.827103395698*x[0]**o + (-0.620640266541)*x[0] + (0.797444675188)*x[1]**o + (0.213454117991)*x[1] + (-0.0285987625177)*x[2]**o + (0.889107320363)*x[2]
            ref[(3, 3)]=1.03893524009-(0.265991551395)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref=numpy.zeros((3, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.285071330467*x[0]**o + (0.746087313288)*x[0] + (-0.575280632645)*x[1]**o + (0.139896098488)*x[1]
            ref[(0, 0, 0)]=0.297887054799-(-0.0483682170297)*(o-1.)
            arg[(0, 0, 1)]=0.428283688242*x[0]**o + (-0.00587836237221)*x[0] + (0.441108657851)*x[1]**o + (-0.3285596114)*x[1]
            ref[(0, 0, 1)]=0.26747718616-(0.144898724349)*(o-1.)
            arg[(0, 0, 2)]=0.764467293606*x[0]**o + (0.444778275571)*x[0] + (0.948508842865)*x[1]**o + (0.408871392369)*x[1]
            ref[(0, 0, 2)]=1.2833129022-(0.285496022745)*(o-1.)
            arg[(0, 0, 3)]=0.976008792484*x[0]**o + (-0.919541068302)*x[0] + (-0.893651320222)*x[1]**o + (-0.839104079907)*x[1]
            ref[(0, 0, 3)]=-0.838143837974-(0.0137262453769)*(o-1.)
            arg[(0, 1, 0)]=-0.759674726243*x[0]**o + (-0.931614580574)*x[0] + (0.561184458037)*x[1]**o + (0.749780652553)*x[1]
            ref[(0, 1, 0)]=-0.190162098114-(-0.0330817113677)*(o-1.)
            arg[(0, 1, 1)]=0.205020716389*x[0]**o + (0.358651225309)*x[0] + (0.362620735697)*x[1]**o + (-0.22671927823)*x[1]
            ref[(0, 1, 1)]=0.349786699583-(0.094606908681)*(o-1.)
            arg[(0, 1, 2)]=-0.469074374515*x[0]**o + (0.471389888542)*x[0] + (-0.89531158302)*x[1]**o + (0.574234070234)*x[1]
            ref[(0, 1, 2)]=-0.15938099938-(-0.227397659589)*(o-1.)
            arg[(0, 1, 3)]=0.736727815838*x[0]**o + (-0.795678524168)*x[0] + (-0.676935721212)*x[1]**o + (0.731689519933)*x[1]
            ref[(0, 1, 3)]=-0.00209845480454-(0.00996534910431)*(o-1.)
            arg[(0, 2, 0)]=0.347872782402*x[0]**o + (0.118055191877)*x[0] + (0.33435270634)*x[1]**o + (-0.493255849067)*x[1]
            ref[(0, 2, 0)]=0.153512415776-(0.113704248124)*(o-1.)
            arg[(0, 2, 1)]=0.335887797652*x[0]**o + (-0.379855344261)*x[0] + (-0.190582335135)*x[1]**o + (-0.610901511918)*x[1]
            ref[(0, 2, 1)]=-0.422725696831-(0.0242175770863)*(o-1.)
            arg[(0, 2, 2)]=-0.735330695294*x[0]**o + (0.863616983669)*x[0] + (0.765895022419)*x[1]**o + (0.625566392366)*x[1]
            ref[(0, 2, 2)]=0.75987385158-(0.00509405452084)*(o-1.)
            arg[(0, 2, 3)]=-0.506306239924*x[0]**o + (0.110333008044)*x[0] + (0.957564596899)*x[1]**o + (-0.00594310129786)*x[1]
            ref[(0, 2, 3)]=0.27782413186-(0.0752097261625)*(o-1.)
            arg[(0, 3, 0)]=0.354671398339*x[0]**o + (0.563441004674)*x[0] + (0.591377086964)*x[1]**o + (-0.280469080986)*x[1]
            ref[(0, 3, 0)]=0.614510204496-(0.157674747551)*(o-1.)
            arg[(0, 3, 1)]=0.57835929573*x[0]**o + (-0.652787941008)*x[0] + (0.809134078959)*x[1]**o + (0.535551709239)*x[1]
            ref[(0, 3, 1)]=0.63512857146-(0.231248895782)*(o-1.)
            arg[(0, 3, 2)]=-0.265070511428*x[0]**o + (0.781273337524)*x[0] + (-0.7134355806)*x[1]**o + (-0.0832641921925)*x[1]
            ref[(0, 3, 2)]=-0.140248473348-(-0.163084348671)*(o-1.)
            arg[(0, 3, 3)]=0.609090227043*x[0]**o + (0.394185461505)*x[0] + (-0.328672649613)*x[1]**o + (-0.328505613766)*x[1]
            ref[(0, 3, 3)]=0.173048712584-(0.0467362629049)*(o-1.)
            arg[(1, 0, 0)]=0.566902257839*x[0]**o + (0.68602369462)*x[0] + (0.0267530603307)*x[1]**o + (0.308345597075)*x[1]
            ref[(1, 0, 0)]=0.794012304932-(0.0989425530283)*(o-1.)
            arg[(1, 0, 1)]=0.1137548864*x[0]**o + (0.280467364575)*x[0] + (0.234935111672)*x[1]**o + (-0.60374615821)*x[1]
            ref[(1, 0, 1)]=0.0127056022183-(0.0581149996787)*(o-1.)
            arg[(1, 0, 2)]=0.929552455866*x[0]**o + (-0.896760218017)*x[0] + (-0.40772412885)*x[1]**o + (0.995954943501)*x[1]
            ref[(1, 0, 2)]=0.310511526249-(0.0869713878359)*(o-1.)
            arg[(1, 0, 3)]=0.885456332428*x[0]**o + (0.597326977464)*x[0] + (0.199303055989)*x[1]**o + (0.678782534741)*x[1]
            ref[(1, 0, 3)]=1.18043445031-(0.180793231403)*(o-1.)
            arg[(1, 1, 0)]=-0.607193267822*x[0]**o + (-0.307960968001)*x[0] + (-0.930499423235)*x[1]**o + (0.554414597551)*x[1]
            ref[(1, 1, 0)]=-0.645619530753-(-0.256282115176)*(o-1.)
            arg[(1, 1, 1)]=0.612590335903*x[0]**o + (-0.143093185113)*x[0] + (-0.831323110744)*x[1]**o + (0.460636904031)*x[1]
            ref[(1, 1, 1)]=0.0494054720382-(-0.0364554624735)*(o-1.)
            arg[(1, 1, 2)]=-0.868327775962*x[0]**o + (-0.41538380457)*x[0] + (-0.716448610745)*x[1]**o + (0.18233278031)*x[1]
            ref[(1, 1, 2)]=-0.908913705483-(-0.264129397785)*(o-1.)
            arg[(1, 1, 3)]=0.778636872604*x[0]**o + (-0.776795011588)*x[0] + (-0.193275833656)*x[1]**o + (0.661917766001)*x[1]
            ref[(1, 1, 3)]=0.23524189668-(0.0975601731581)*(o-1.)
            arg[(1, 2, 0)]=-0.875426369652*x[0]**o + (-0.437749507005)*x[0] + (0.948399497145)*x[1]**o + (-0.577619491858)*x[1]
            ref[(1, 2, 0)]=-0.471197935685-(0.0121621879155)*(o-1.)
            arg[(1, 2, 1)]=0.611454422598*x[0]**o + (-0.713967328876)*x[0] + (-0.782166345413)*x[1]**o + (-0.376807371161)*x[1]
            ref[(1, 2, 1)]=-0.630743311426-(-0.0284519871358)*(o-1.)
            arg[(1, 2, 2)]=0.714965349281*x[0]**o + (-0.366968771061)*x[0] + (-0.231437491582)*x[1]**o + (0.964872706601)*x[1]
            ref[(1, 2, 2)]=0.54071589662-(0.0805879762832)*(o-1.)
            arg[(1, 2, 3)]=-0.183241407814*x[0]**o + (-0.521072375209)*x[0] + (0.764703308202)*x[1]**o + (0.930940426343)*x[1]
            ref[(1, 2, 3)]=0.495664975761-(0.0969103167314)*(o-1.)
            arg[(1, 3, 0)]=-0.312382099034*x[0]**o + (0.999297211941)*x[0] + (-0.27339670323)*x[1]**o + (-0.473890953317)*x[1]
            ref[(1, 3, 0)]=-0.03018627182-(-0.0976298003773)*(o-1.)
            arg[(1, 3, 1)]=0.191366134537*x[0]**o + (0.377339391418)*x[0] + (-0.80409378555)*x[1]**o + (0.677848153143)*x[1]
            ref[(1, 3, 1)]=0.221229946774-(-0.102121275169)*(o-1.)
            arg[(1, 3, 2)]=-0.0884483394209*x[0]**o + (-0.995431585084)*x[0] + (-0.591651685137)*x[1]**o + (-0.534830440444)*x[1]
            ref[(1, 3, 2)]=-1.10518102504-(-0.113350004093)*(o-1.)
            arg[(1, 3, 3)]=0.869232661889*x[0]**o + (0.379518460096)*x[0] + (-0.123142752803)*x[1]**o + (-0.951463973027)*x[1]
            ref[(1, 3, 3)]=0.0870721980771-(0.124348318181)*(o-1.)
            arg[(2, 0, 0)]=-0.26229526737*x[0]**o + (-0.765176351118)*x[0] + (-0.286170437467)*x[1]**o + (0.726316052479)*x[1]
            ref[(2, 0, 0)]=-0.293663001738-(-0.0914109508062)*(o-1.)
            arg[(2, 0, 1)]=-0.435450334806*x[0]**o + (0.00733952524733)*x[0] + (-0.819883791052)*x[1]**o + (0.595634894706)*x[1]
            ref[(2, 0, 1)]=-0.326179852953-(-0.20922235431)*(o-1.)
            arg[(2, 0, 2)]=-0.476355253185*x[0]**o + (0.0505166202391)*x[0] + (-0.440061182818)*x[1]**o + (-0.560474394388)*x[1]
            ref[(2, 0, 2)]=-0.713187105076-(-0.152736072667)*(o-1.)
            arg[(2, 0, 3)]=0.611184217705*x[0]**o + (0.14265342315)*x[0] + (0.541131451719)*x[1]**o + (-0.638925222177)*x[1]
            ref[(2, 0, 3)]=0.328021935199-(0.192052611571)*(o-1.)
            arg[(2, 1, 0)]=0.734755598211*x[0]**o + (-0.498221420154)*x[0] + (0.724698130329)*x[1]**o + (0.223087107995)*x[1]
            ref[(2, 1, 0)]=0.592159708191-(0.24324228809)*(o-1.)
            arg[(2, 1, 1)]=-0.763762664444*x[0]**o + (-0.608923395702)*x[0] + (-0.71485943505)*x[1]**o + (-0.114206110386)*x[1]
            ref[(2, 1, 1)]=-1.10087580279-(-0.246437016582)*(o-1.)
            arg[(2, 1, 2)]=0.0421436316242*x[0]**o + (0.920234801453)*x[0] + (-0.736593536057)*x[1]**o + (-0.220727041974)*x[1]
            ref[(2, 1, 2)]=0.00252892752294-(-0.115741650739)*(o-1.)
            arg[(2, 1, 3)]=-0.79825288925*x[0]**o + (0.798556258136)*x[0] + (-0.160101038552)*x[1]**o + (-0.100790402845)*x[1]
            ref[(2, 1, 3)]=-0.130294036256-(-0.159725654634)*(o-1.)
            arg[(2, 2, 0)]=0.736373462072*x[0]**o + (0.363001655092)*x[0] + (-0.887265892804)*x[1]**o + (0.804402540113)*x[1]
            ref[(2, 2, 0)]=0.508255882236-(-0.0251487384554)*(o-1.)
            arg[(2, 2, 1)]=-0.195424037659*x[0]**o + (0.644864653209)*x[0] + (0.925161837503)*x[1]**o + (0.881284415057)*x[1]
            ref[(2, 2, 1)]=1.12794343406-(0.121622966641)*(o-1.)
            arg[(2, 2, 2)]=-0.312987443817*x[0]**o + (0.567926262208)*x[0] + (-0.6818743976)*x[1]**o + (-0.600910095916)*x[1]
            ref[(2, 2, 2)]=-0.513922837562-(-0.165810306903)*(o-1.)
            arg[(2, 2, 3)]=0.949312962784*x[0]**o + (0.439219306286)*x[0] + (0.488212898555)*x[1]**o + (-0.57394046767)*x[1]
            ref[(2, 2, 3)]=0.651402349978-(0.239587643557)*(o-1.)
            arg[(2, 3, 0)]=-0.973477642929*x[0]**o + (0.751573305278)*x[0] + (-0.346974766211)*x[1]**o + (0.681348871037)*x[1]
            ref[(2, 3, 0)]=0.0562348835878-(-0.220075401523)*(o-1.)
            arg[(2, 3, 1)]=-0.418796592904*x[0]**o + (-0.616192127969)*x[0] + (-0.938818435051)*x[1]**o + (-0.966773064826)*x[1]
            ref[(2, 3, 1)]=-1.47029011037-(-0.226269171326)*(o-1.)
            arg[(2, 3, 2)]=-0.136677770602*x[0]**o + (-0.523931096)*x[0] + (0.563934353133)*x[1]**o + (-0.531869840542)*x[1]
            ref[(2, 3, 2)]=-0.314272177006-(0.0712094304218)*(o-1.)
            arg[(2, 3, 3)]=0.0317811641385*x[0]**o + (-0.0374139979337)*x[0] + (-0.617296709182)*x[1]**o + (0.121501850411)*x[1]
            ref[(2, 3, 3)]=-0.250713846283-(-0.0975859241739)*(o-1.)
        else:
            arg[(0, 0, 0)]=-0.942655273679*x[0]**o + (-0.528581192885)*x[0] + (0.806336338022)*x[1]**o + (-0.820524454715)*x[1] + (-0.37497651064)*x[2]**o + (-0.101901274689)*x[2]
            ref[(0, 0, 0)]=-0.981151184293-(-0.085215907716)*(o-1.)
            arg[(0, 0, 1)]=-0.984502239638*x[0]**o + (0.250406675541)*x[0] + (0.48531124908)*x[1]**o + (-0.611188085894)*x[1] + (-0.24423768397)*x[2]**o + (-0.968483503133)*x[2]
            ref[(0, 0, 1)]=-1.03634679401-(-0.123904779088)*(o-1.)
            arg[(0, 0, 2)]=-0.624191430851*x[0]**o + (-0.163323686647)*x[0] + (-0.103846199092)*x[1]**o + (0.01756696686)*x[1] + (-0.0668913060206)*x[2]**o + (0.389395364113)*x[2]
            ref[(0, 0, 2)]=-0.275645145819-(-0.132488155994)*(o-1.)
            arg[(0, 0, 3)]=-0.0979182429579*x[0]**o + (-0.709553022368)*x[0] + (0.88428823213)*x[1]**o + (0.882996237494)*x[1] + (0.117344539266)*x[2]**o + (0.140993591758)*x[2]
            ref[(0, 0, 3)]=0.609075667661-(0.150619088073)*(o-1.)
            arg[(0, 1, 0)]=0.723397977078*x[0]**o + (-0.978241435219)*x[0] + (0.273572207786)*x[1]**o + (0.720057408109)*x[1] + (0.359692447558)*x[2]**o + (0.782362317474)*x[2]
            ref[(0, 1, 0)]=0.940420461393-(0.226110438737)*(o-1.)
            arg[(0, 1, 1)]=-0.378652653047*x[0]**o + (-0.619306982984)*x[0] + (0.835868233462)*x[1]**o + (-0.942026334214)*x[1] + (0.815994064506)*x[2]**o + (-0.243759486539)*x[2]
            ref[(0, 1, 1)]=-0.265941579408-(0.212201607487)*(o-1.)
            arg[(0, 1, 2)]=0.664598629704*x[0]**o + (0.117015635749)*x[0] + (0.609371260549)*x[1]**o + (0.708172078468)*x[1] + (0.123205528645)*x[2]**o + (0.564541793472)*x[2]
            ref[(0, 1, 2)]=1.39345246329-(0.232862569816)*(o-1.)
            arg[(0, 1, 3)]=-0.690361492003*x[0]**o + (-0.810352619744)*x[0] + (0.0621877405078)*x[1]**o + (-0.674634182294)*x[1] + (-0.938917734008)*x[2]**o + (-0.302992299096)*x[2]
            ref[(0, 1, 3)]=-1.67753529332-(-0.261181914251)*(o-1.)
            arg[(0, 2, 0)]=-0.441135910348*x[0]**o + (-0.283653512458)*x[0] + (0.343747398865)*x[1]**o + (-0.866251257338)*x[1] + (0.792225984093)*x[2]**o + (-0.362106308565)*x[2]
            ref[(0, 2, 0)]=-0.408586802875-(0.115806245435)*(o-1.)
            arg[(0, 2, 1)]=-0.737171723972*x[0]**o + (-0.128589262387)*x[0] + (0.184545330913)*x[1]**o + (-0.436588294179)*x[1] + (0.445375436229)*x[2]**o + (0.953593710382)*x[2]
            ref[(0, 2, 1)]=0.140582598493-(-0.0178751594717)*(o-1.)
            arg[(0, 2, 2)]=-0.737287101621*x[0]**o + (0.629697967135)*x[0] + (0.626736754423)*x[1]**o + (0.585607890965)*x[1] + (0.967471828414)*x[2]**o + (0.100321620291)*x[2]
            ref[(0, 2, 2)]=1.0862744798-(0.142820246869)*(o-1.)
            arg[(0, 2, 3)]=-0.107982497963*x[0]**o + (-0.318511237291)*x[0] + (-0.778050224453)*x[1]**o + (0.682081183421)*x[1] + (0.293969373114)*x[2]**o + (-0.617101921141)*x[2]
            ref[(0, 2, 3)]=-0.422797662157-(-0.0986772248837)*(o-1.)
            arg[(0, 3, 0)]=-0.137875839437*x[0]**o + (-0.933034739207)*x[0] + (0.778326306107)*x[1]**o + (-0.799871802723)*x[1] + (-0.344805862905)*x[2]**o + (0.804846997778)*x[2]
            ref[(0, 3, 0)]=-0.316207470194-(0.0492741006275)*(o-1.)
            arg[(0, 3, 1)]=0.523542322474*x[0]**o + (-0.695201629908)*x[0] + (-0.299434011287)*x[1]**o + (0.40046818149)*x[1] + (-0.219137964192)*x[2]**o + (-0.824040217722)*x[2]
            ref[(0, 3, 1)]=-0.556901659572-(0.000828391165957)*(o-1.)
            arg[(0, 3, 2)]=0.158068767249*x[0]**o + (0.704232483137)*x[0] + (-0.764831652225)*x[1]**o + (-0.721843381524)*x[1] + (0.826500297917)*x[2]**o + (-0.945795170625)*x[2]
            ref[(0, 3, 2)]=-0.371834328035-(0.0366229021568)*(o-1.)
            arg[(0, 3, 3)]=-0.356272320857*x[0]**o + (0.858734756922)*x[0] + (-0.147804832942)*x[1]**o + (-0.215643334357)*x[1] + (-0.533744538232)*x[2]**o + (0.0707668204305)*x[2]
            ref[(0, 3, 3)]=-0.161981724518-(-0.172970282005)*(o-1.)
            arg[(1, 0, 0)]=0.721049702343*x[0]**o + (0.294342483711)*x[0] + (-0.0989173430887)*x[1]**o + (0.558152021337)*x[1] + (0.0880834052542)*x[2]**o + (0.202684007287)*x[2]
            ref[(1, 0, 0)]=0.882697138422-(0.118369294085)*(o-1.)
            arg[(1, 0, 1)]=0.607204211958*x[0]**o + (0.0916702109354)*x[0] + (0.786668593036)*x[1]**o + (-0.142985835064)*x[1] + (0.881518029772)*x[2]**o + (0.909254770753)*x[2]
            ref[(1, 0, 1)]=1.56666499069-(0.379231805794)*(o-1.)
            arg[(1, 0, 2)]=0.142675330196*x[0]**o + (0.0421888264624)*x[0] + (0.731103347524)*x[1]**o + (0.697662491295)*x[1] + (-0.997533370745)*x[2]**o + (-0.349428598609)*x[2]
            ref[(1, 0, 2)]=0.133334013062-(-0.0206257821707)*(o-1.)
            arg[(1, 0, 3)]=-0.424067651356*x[0]**o + (0.2442905266)*x[0] + (-0.377720683367)*x[1]**o + (-0.796421107915)*x[1] + (-0.277963524464)*x[2]**o + (0.218216353425)*x[2]
            ref[(1, 0, 3)]=-0.706833043538-(-0.179958643198)*(o-1.)
            arg[(1, 1, 0)]=0.824041706038*x[0]**o + (-0.767671253455)*x[0] + (0.519876265626)*x[1]**o + (-0.949306491051)*x[1] + (0.212222258943)*x[2]**o + (0.895627234936)*x[2]
            ref[(1, 1, 0)]=0.367394860518-(0.259356705101)*(o-1.)
            arg[(1, 1, 1)]=-0.310881181197*x[0]**o + (-0.864521848118)*x[0] + (0.556455026389)*x[1]**o + (-0.11662856924)*x[1] + (0.709853611415)*x[2]**o + (-0.277519237257)*x[2]
            ref[(1, 1, 1)]=-0.151621099004-(0.159237909434)*(o-1.)
            arg[(1, 1, 2)]=-0.232380793228*x[0]**o + (-0.899941282521)*x[0] + (0.45121753511)*x[1]**o + (0.0977594208596)*x[1] + (-0.337639571717)*x[2]**o + (-0.921432997479)*x[2]
            ref[(1, 1, 2)]=-0.921208844488-(-0.0198004716391)*(o-1.)
            arg[(1, 1, 3)]=-0.427014266821*x[0]**o + (0.278462767479)*x[0] + (-0.687282301619)*x[1]**o + (-0.399122742784)*x[1] + (-0.332786137416)*x[2]**o + (0.562550840371)*x[2]
            ref[(1, 1, 3)]=-0.502595920395-(-0.241180450976)*(o-1.)
            arg[(1, 2, 0)]=0.232918531406*x[0]**o + (-0.674390260634)*x[0] + (0.0185058011632)*x[1]**o + (-0.721519294552)*x[1] + (-0.844022260434)*x[2]**o + (-0.356037122762)*x[2]
            ref[(1, 2, 0)]=-1.17227230291-(-0.0987663213109)*(o-1.)
            arg[(1, 2, 1)]=0.976663620228*x[0]**o + (-0.448272735146)*x[0] + (0.352551692683)*x[1]**o + (-0.32177397874)*x[1] + (0.220756856467)*x[2]**o + (-0.101057429756)*x[2]
            ref[(1, 2, 1)]=0.339434012868-(0.258328694896)*(o-1.)
            arg[(1, 2, 2)]=0.474865194698*x[0]**o + (-0.897727325797)*x[0] + (-0.370437903038)*x[1]**o + (-0.0660616740601)*x[1] + (0.109248926996)*x[2]**o + (0.526961693675)*x[2]
            ref[(1, 2, 2)]=-0.111575543763-(0.0356127031093)*(o-1.)
            arg[(1, 2, 3)]=-0.907852368718*x[0]**o + (0.0959873280139)*x[0] + (-0.30439629754)*x[1]**o + (-0.586278932572)*x[1] + (0.218326016646)*x[2]**o + (0.826592561131)*x[2]
            ref[(1, 2, 3)]=-0.328810846519-(-0.165653774935)*(o-1.)
            arg[(1, 3, 0)]=-0.391328757552*x[0]**o + (0.528820305806)*x[0] + (-0.560845797848)*x[1]**o + (-0.674951507048)*x[1] + (-0.869258932883)*x[2]**o + (-0.384377155301)*x[2]
            ref[(1, 3, 0)]=-1.17597092241-(-0.303572248047)*(o-1.)
            arg[(1, 3, 1)]=-0.631121824065*x[0]**o + (-0.431333882236)*x[0] + (-0.573688261271)*x[1]**o + (-0.534179690268)*x[1] + (-0.223752902863)*x[2]**o + (-0.0414837218448)*x[2]
            ref[(1, 3, 1)]=-1.21778014127-(-0.238093831367)*(o-1.)
            arg[(1, 3, 2)]=-0.836854683359*x[0]**o + (0.382820834114)*x[0] + (0.675380965829)*x[1]**o + (-0.979385871844)*x[1] + (-0.634731423471)*x[2]**o + (0.749293550971)*x[2]
            ref[(1, 3, 2)]=-0.32173831388-(-0.132700856834)*(o-1.)
            arg[(1, 3, 3)]=-0.30001256438*x[0]**o + (0.222137525527)*x[0] + (-0.114326421279)*x[1]**o + (0.345075639379)*x[1] + (0.0449884058312)*x[2]**o + (-0.475471158237)*x[2]
            ref[(1, 3, 3)]=-0.138804286579-(-0.0615584299712)*(o-1.)
            arg[(2, 0, 0)]=-0.229486497969*x[0]**o + (-0.865976516137)*x[0] + (-0.811293095532)*x[1]**o + (0.872167922716)*x[1] + (-0.466733839565)*x[2]**o + (0.80559140569)*x[2]
            ref[(2, 0, 0)]=-0.347865310398-(-0.251252238844)*(o-1.)
            arg[(2, 0, 1)]=-0.661606708611*x[0]**o + (0.288149741681)*x[0] + (-0.765162021073)*x[1]**o + (-0.291363850122)*x[1] + (-0.248242328333)*x[2]**o + (0.329591751922)*x[2]
            ref[(2, 0, 1)]=-0.674316707268-(-0.27916850967)*(o-1.)
            arg[(2, 0, 2)]=0.800247365868*x[0]**o + (-0.611997659413)*x[0] + (0.757399961889)*x[1]**o + (-0.604764488039)*x[1] + (-0.285949596701)*x[2]**o + (-0.266500305958)*x[2]
            ref[(2, 0, 2)]=-0.105782361178-(0.211949621843)*(o-1.)
            arg[(2, 0, 3)]=0.223221507188*x[0]**o + (-0.955396984867)*x[0] + (0.314075867446)*x[1]**o + (0.463323495966)*x[1] + (0.211491406238)*x[2]**o + (-0.54995925419)*x[2]
            ref[(2, 0, 3)]=-0.146621981109-(0.124798130145)*(o-1.)
            arg[(2, 1, 0)]=-0.467752863468*x[0]**o + (0.235695851014)*x[0] + (-0.805733074707)*x[1]**o + (-0.312054550083)*x[1] + (0.740334794607)*x[2]**o + (-0.224772862017)*x[2]
            ref[(2, 1, 0)]=-0.417141352327-(-0.088858523928)*(o-1.)
            arg[(2, 1, 1)]=-0.633375857758*x[0]**o + (0.916508514235)*x[0] + (-0.871691999128)*x[1]**o + (0.79767268768)*x[1] + (0.257575855077)*x[2]**o + (0.679155171569)*x[2]
            ref[(2, 1, 1)]=0.572922185837-(-0.207915333635)*(o-1.)
            arg[(2, 1, 2)]=0.101861480246*x[0]**o + (0.795743099658)*x[0] + (0.561056753488)*x[1]**o + (0.502457294934)*x[1] + (0.0510581252444)*x[2]**o + (0.00175646301886)*x[2]
            ref[(2, 1, 2)]=1.00696660829-(0.11899605983)*(o-1.)
            arg[(2, 1, 3)]=-0.434430507711*x[0]**o + (-0.246325474808)*x[0] + (0.504774216033)*x[1]**o + (0.395132276386)*x[1] + (-0.843017448246)*x[2]**o + (0.763851009695)*x[2]
            ref[(2, 1, 3)]=0.0699920356751-(-0.128778956654)*(o-1.)
            arg[(2, 2, 0)]=-0.143866506312*x[0]**o + (-0.859147935683)*x[0] + (0.0567422120115)*x[1]**o + (0.327479734514)*x[1] + (0.952235903755)*x[2]**o + (0.979784816039)*x[2]
            ref[(2, 2, 0)]=0.656614112162-(0.144185268243)*(o-1.)
            arg[(2, 2, 1)]=0.357587865122*x[0]**o + (0.971082125671)*x[0] + (0.812416090667)*x[1]**o + (0.0755849282537)*x[1] + (-0.135506688275)*x[2]**o + (-0.517755363831)*x[2]
            ref[(2, 2, 1)]=0.781704478804-(0.172416211252)*(o-1.)
            arg[(2, 2, 2)]=0.934788227963*x[0]**o + (-0.306559675782)*x[0] + (-0.582855546809)*x[1]**o + (-0.121473425459)*x[1] + (0.225167260221)*x[2]**o + (-0.20772895379)*x[2]
            ref[(2, 2, 2)]=-0.029331056828-(0.0961833235625)*(o-1.)
            arg[(2, 2, 3)]=-0.714654173434*x[0]**o + (0.167894275367)*x[0] + (0.60255464088)*x[1]**o + (-0.894715717161)*x[1] + (-0.0467864997452)*x[2]**o + (-0.0954487904963)*x[2]
            ref[(2, 2, 3)]=-0.490578132295-(-0.0264810053832)*(o-1.)
            arg[(2, 3, 0)]=0.42869016979*x[0]**o + (0.404322375317)*x[0] + (-0.837573923622)*x[1]**o + (0.280179933745)*x[1] + (0.0863807815479)*x[2]**o + (0.431997533113)*x[2]
            ref[(2, 3, 0)]=0.396998434946-(-0.0537504953805)*(o-1.)
            arg[(2, 3, 1)]=-0.648210430044*x[0]**o + (-0.403025570469)*x[0] + (-0.403170709309)*x[1]**o + (-0.0941328064019)*x[1] + (0.0676473967372)*x[2]**o + (0.350011317109)*x[2]
            ref[(2, 3, 1)]=-0.565440401189-(-0.163955623769)*(o-1.)
            arg[(2, 3, 2)]=0.410298054525*x[0]**o + (0.592040956463)*x[0] + (0.276338545834)*x[1]**o + (-0.0295411653844)*x[1] + (-0.897873384149)*x[2]**o + (0.460856149462)*x[2]
            ref[(2, 3, 2)]=0.406059578375-(-0.0352061306317)*(o-1.)
            arg[(2, 3, 3)]=-0.830005770479*x[0]**o + (0.395341050674)*x[0] + (-0.0347599519609)*x[1]**o + (0.878475540238)*x[1] + (0.573069559383)*x[2]**o + (-0.211652706785)*x[2]
            ref[(2, 3, 3)]=0.385233860535-(-0.0486160271761)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4, 2),w)
        ref=numpy.zeros((4, 2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.521805793978*x[0]**o + (0.150018198265)*x[0] + (0.987720883314)*x[1]**o + (0.796805868598)*x[1]
            ref[(0, 0, 0, 0)]=1.22817537208-(0.251587779549)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.878537405153*x[0]**o + (-0.916095523361)*x[0] + (0.564854454999)*x[1]**o + (-0.291888227767)*x[1]
            ref[(0, 0, 0, 1)]=-0.760833350641-(-0.0522804916923)*(o-1.)
            arg[(0, 0, 1, 0)]=-0.56250982298*x[0]**o + (0.160191896685)*x[0] + (0.0959806334463)*x[1]**o + (0.498998103143)*x[1]
            ref[(0, 0, 1, 0)]=0.0963304051471-(-0.0777548649223)*(o-1.)
            arg[(0, 0, 1, 1)]=0.895587461616*x[0]**o + (0.813991210873)*x[0] + (0.909453407359)*x[1]**o + (-0.491587700724)*x[1]
            ref[(0, 0, 1, 1)]=1.06372218956-(0.300840144829)*(o-1.)
            arg[(0, 0, 2, 0)]=-0.347276473219*x[0]**o + (0.125785154676)*x[0] + (-0.378541984596)*x[1]**o + (-0.762715951146)*x[1]
            ref[(0, 0, 2, 0)]=-0.681374627143-(-0.120969742969)*(o-1.)
            arg[(0, 0, 2, 1)]=0.730011398351*x[0]**o + (-0.621795299717)*x[0] + (-0.753996398995)*x[1]**o + (0.102867562266)*x[1]
            ref[(0, 0, 2, 1)]=-0.271456369048-(-0.00399750010738)*(o-1.)
            arg[(0, 0, 3, 0)]=-0.0983997762611*x[0]**o + (-0.451600130249)*x[0] + (0.00120792032254)*x[1]**o + (-0.771278432826)*x[1]
            ref[(0, 0, 3, 0)]=-0.660035209507-(-0.0161986426564)*(o-1.)
            arg[(0, 0, 3, 1)]=0.0432189463898*x[0]**o + (-0.579213928565)*x[0] + (0.252461150695)*x[1]**o + (0.896279912263)*x[1]
            ref[(0, 0, 3, 1)]=0.306373040392-(0.0492800161809)*(o-1.)
            arg[(0, 1, 0, 0)]=0.102467382947*x[0]**o + (-0.32469474401)*x[0] + (-0.850385839331)*x[1]**o + (-0.466319943408)*x[1]
            ref[(0, 1, 0, 0)]=-0.769466571901-(-0.124653076064)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.0508859366029*x[0]**o + (0.757435866978)*x[0] + (-0.500906412487)*x[1]**o + (-0.275970702841)*x[1]
            ref[(0, 1, 0, 1)]=-0.0351635924764-(-0.0919653915149)*(o-1.)
            arg[(0, 1, 1, 0)]=-0.816985122375*x[0]**o + (0.651248742368)*x[0] + (-0.0523123189953)*x[1]**o + (0.674702841549)*x[1]
            ref[(0, 1, 1, 0)]=0.228327071274-(-0.144882906895)*(o-1.)
            arg[(0, 1, 1, 1)]=0.515800443749*x[0]**o + (0.128586924713)*x[0] + (0.533656502401)*x[1]**o + (-0.358488566449)*x[1]
            ref[(0, 1, 1, 1)]=0.409777652207-(0.174909491025)*(o-1.)
            arg[(0, 1, 2, 0)]=-0.264726790623*x[0]**o + (0.330551524902)*x[0] + (0.609755420049)*x[1]**o + (-0.407750698368)*x[1]
            ref[(0, 1, 2, 0)]=0.13391472798-(0.057504771571)*(o-1.)
            arg[(0, 1, 2, 1)]=-0.588454614226*x[0]**o + (-0.24787133231)*x[0] + (0.666844686442)*x[1]**o + (0.271047437057)*x[1]
            ref[(0, 1, 2, 1)]=0.0507830884819-(0.0130650120361)*(o-1.)
            arg[(0, 1, 3, 0)]=-0.0213390710722*x[0]**o + (-0.30646399594)*x[0] + (0.419732207713)*x[1]**o + (-0.028490813121)*x[1]
            ref[(0, 1, 3, 0)]=0.0317191637899-(0.0663988561068)*(o-1.)
            arg[(0, 1, 3, 1)]=0.232540220235*x[0]**o + (0.144754220667)*x[0] + (0.722391183289)*x[1]**o + (-0.353358769567)*x[1]
            ref[(0, 1, 3, 1)]=0.373163427312-(0.159155233921)*(o-1.)
            arg[(1, 0, 0, 0)]=0.557577375148*x[0]**o + (0.641762439951)*x[0] + (-0.0196005488072)*x[1]**o + (0.959898700992)*x[1]
            ref[(1, 0, 0, 0)]=1.06981898364-(0.0896628043902)*(o-1.)
            arg[(1, 0, 0, 1)]=-0.502335612106*x[0]**o + (0.134067232416)*x[0] + (-0.27627567221)*x[1]**o + (-0.262787986655)*x[1]
            ref[(1, 0, 0, 1)]=-0.453666019277-(-0.129768547386)*(o-1.)
            arg[(1, 0, 1, 0)]=0.643828941862*x[0]**o + (0.929691268693)*x[0] + (-0.885323936634)*x[1]**o + (0.404106304871)*x[1]
            ref[(1, 0, 1, 0)]=0.546151289396-(-0.0402491657953)*(o-1.)
            arg[(1, 0, 1, 1)]=0.644366588835*x[0]**o + (-0.829690381466)*x[0] + (0.557046855785)*x[1]**o + (-0.945086908249)*x[1]
            ref[(1, 0, 1, 1)]=-0.286681922547-(0.200235574103)*(o-1.)
            arg[(1, 0, 2, 0)]=0.715811454066*x[0]**o + (0.592315198373)*x[0] + (-0.275149258991)*x[1]**o + (0.901120289723)*x[1]
            ref[(1, 0, 2, 0)]=0.967048841585-(0.0734436991793)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.733997051572*x[0]**o + (0.61706092292)*x[0] + (-0.425732521297)*x[1]**o + (0.657837656307)*x[1]
            ref[(1, 0, 2, 1)]=0.0575845031787-(-0.193288262145)*(o-1.)
            arg[(1, 0, 3, 0)]=0.751400023852*x[0]**o + (0.514826283895)*x[0] + (0.183345820032)*x[1]**o + (-0.450176645976)*x[1]
            ref[(1, 0, 3, 0)]=0.499697740901-(0.155790973981)*(o-1.)
            arg[(1, 0, 3, 1)]=0.298436631287*x[0]**o + (-0.309060507758)*x[0] + (-0.812661137201)*x[1]**o + (0.549095523633)*x[1]
            ref[(1, 0, 3, 1)]=-0.137094745019-(-0.0857040843189)*(o-1.)
            arg[(1, 1, 0, 0)]=0.876575579824*x[0]**o + (0.222780444568)*x[0] + (0.332040845347)*x[1]**o + (-0.343546660832)*x[1]
            ref[(1, 1, 0, 0)]=0.543925104454-(0.201436070862)*(o-1.)
            arg[(1, 1, 0, 1)]=-0.965154287046*x[0]**o + (-0.389204473297)*x[0] + (0.817356555175)*x[1]**o + (-0.10169233504)*x[1]
            ref[(1, 1, 0, 1)]=-0.319347270104-(-0.0246329553119)*(o-1.)
            arg[(1, 1, 1, 0)]=0.568774068243*x[0]**o + (-0.856424499564)*x[0] + (-0.989354404168)*x[1]**o + (0.522917306258)*x[1]
            ref[(1, 1, 1, 0)]=-0.377043764615-(-0.0700967226541)*(o-1.)
            arg[(1, 1, 1, 1)]=0.880123910798*x[0]**o + (0.251717065129)*x[0] + (-0.829656969692)*x[1]**o + (0.710663320739)*x[1]
            ref[(1, 1, 1, 1)]=0.506423663487-(0.00841115685098)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.405509222501*x[0]**o + (0.264773355678)*x[0] + (0.368358137685)*x[1]**o + (-0.791020563535)*x[1]
            ref[(1, 1, 2, 0)]=-0.281699146337-(-0.0061918474694)*(o-1.)
            arg[(1, 1, 2, 1)]=0.886467630456*x[0]**o + (0.904205023164)*x[0] + (0.526994986632)*x[1]**o + (0.14936089126)*x[1]
            ref[(1, 1, 2, 1)]=1.23351426576-(0.235577102848)*(o-1.)
            arg[(1, 1, 3, 0)]=0.898611242874*x[0]**o + (0.429352762295)*x[0] + (-0.704806957315)*x[1]**o + (-0.132143733908)*x[1]
            ref[(1, 1, 3, 0)]=0.245506656974-(0.0323007142599)*(o-1.)
            arg[(1, 1, 3, 1)]=0.0852359096517*x[0]**o + (0.87561315612)*x[0] + (0.659165792733)*x[1]**o + (0.229920195948)*x[1]
            ref[(1, 1, 3, 1)]=0.924967527226-(0.124066950397)*(o-1.)
            arg[(2, 0, 0, 0)]=-0.482281220855*x[0]**o + (0.212931869984)*x[0] + (0.742998235562)*x[1]**o + (0.179276138363)*x[1]
            ref[(2, 0, 0, 0)]=0.326462511527-(0.0434528357845)*(o-1.)
            arg[(2, 0, 0, 1)]=0.694066581689*x[0]**o + (0.0557059372953)*x[0] + (0.412603249198)*x[1]**o + (0.177980337521)*x[1]
            ref[(2, 0, 0, 1)]=0.670178052852-(0.184444971815)*(o-1.)
            arg[(2, 0, 1, 0)]=0.250694644523*x[0]**o + (-0.25686302078)*x[0] + (-0.207072606115)*x[1]**o + (0.936381310964)*x[1]
            ref[(2, 0, 1, 0)]=0.361570164296-(0.00727033973469)*(o-1.)
            arg[(2, 0, 1, 1)]=0.256082095456*x[0]**o + (-0.704046106672)*x[0] + (0.816596909349)*x[1]**o + (-0.55589420241)*x[1]
            ref[(2, 0, 1, 1)]=-0.0936306521385-(0.178779834134)*(o-1.)
            arg[(2, 0, 2, 0)]=0.416372236597*x[0]**o + (-0.00658626387361)*x[0] + (0.829410069305)*x[1]**o + (0.871314488495)*x[1]
            ref[(2, 0, 2, 0)]=1.05525526526-(0.207630384317)*(o-1.)
            arg[(2, 0, 2, 1)]=-0.0326300011726*x[0]**o + (-0.629672204068)*x[0] + (-0.726978820421)*x[1]**o + (-0.642440398208)*x[1]
            ref[(2, 0, 2, 1)]=-1.01586071193-(-0.126601470266)*(o-1.)
            arg[(2, 0, 3, 0)]=0.55259948667*x[0]**o + (-0.774709420566)*x[0] + (0.148261860859)*x[1]**o + (-0.739439627837)*x[1]
            ref[(2, 0, 3, 0)]=-0.406643850437-(0.116810224588)*(o-1.)
            arg[(2, 0, 3, 1)]=0.56396145166*x[0]**o + (0.933124235621)*x[0] + (0.673546452106)*x[1]**o + (-0.479242885901)*x[1]
            ref[(2, 0, 3, 1)]=0.845694626743-(0.206251317294)*(o-1.)
            arg[(2, 1, 0, 0)]=0.316945459919*x[0]**o + (-0.406269901765)*x[0] + (-0.96426269808)*x[1]**o + (0.0251546938617)*x[1]
            ref[(2, 1, 0, 0)]=-0.514216223032-(-0.10788620636)*(o-1.)
            arg[(2, 1, 0, 1)]=-0.900627916235*x[0]**o + (0.45148970718)*x[0] + (-0.792677910518)*x[1]**o + (0.357369824186)*x[1]
            ref[(2, 1, 0, 1)]=-0.442223147693-(-0.282217637792)*(o-1.)
            arg[(2, 1, 1, 0)]=0.449649212119*x[0]**o + (-0.587798770121)*x[0] + (0.286735957921)*x[1]**o + (0.0795951358215)*x[1]
            ref[(2, 1, 1, 0)]=0.11409076787-(0.122730861673)*(o-1.)
            arg[(2, 1, 1, 1)]=0.557614102266*x[0]**o + (0.901670076908)*x[0] + (0.500149228955)*x[1]**o + (-0.207456724869)*x[1]
            ref[(2, 1, 1, 1)]=0.87598834163-(0.176293888537)*(o-1.)
            arg[(2, 1, 2, 0)]=0.989971257576*x[0]**o + (-0.0919093564176)*x[0] + (-0.75006492301)*x[1]**o + (0.354407516511)*x[1]
            ref[(2, 1, 2, 0)]=0.25120224733-(0.0399843890945)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.61609962058*x[0]**o + (-0.73193689282)*x[0] + (0.876810423915)*x[1]**o + (0.778390748673)*x[1]
            ref[(2, 1, 2, 1)]=0.153582329594-(0.0434518005557)*(o-1.)
            arg[(2, 1, 3, 0)]=-0.0930191115252*x[0]**o + (-0.158603090037)*x[0] + (0.703431507829)*x[1]**o + (0.0348240208539)*x[1]
            ref[(2, 1, 3, 0)]=0.243316663561-(0.101735399384)*(o-1.)
            arg[(2, 1, 3, 1)]=0.218001400605*x[0]**o + (-0.420945293634)*x[0] + (0.824594727853)*x[1]**o + (0.732406478532)*x[1]
            ref[(2, 1, 3, 1)]=0.677028656678-(0.17376602141)*(o-1.)
            arg[(3, 0, 0, 0)]=-0.327510220726*x[0]**o + (0.660893408241)*x[0] + (0.956364636964)*x[1]**o + (-0.109401623592)*x[1]
            ref[(3, 0, 0, 0)]=0.590173100443-(0.104809069373)*(o-1.)
            arg[(3, 0, 0, 1)]=-0.107772624983*x[0]**o + (0.967507888501)*x[0] + (-0.63454646222)*x[1]**o + (0.0813899016402)*x[1]
            ref[(3, 0, 0, 1)]=0.153289351469-(-0.123719847867)*(o-1.)
            arg[(3, 0, 1, 0)]=-0.983464254103*x[0]**o + (0.664407499549)*x[0] + (0.803483725218)*x[1]**o + (0.226694360335)*x[1]
            ref[(3, 0, 1, 0)]=0.3555606655-(-0.0299967548141)*(o-1.)
            arg[(3, 0, 1, 1)]=-0.613809058769*x[0]**o + (0.374053572304)*x[0] + (-0.732381239665)*x[1]**o + (-0.0591329175137)*x[1]
            ref[(3, 0, 1, 1)]=-0.515634821822-(-0.224365049739)*(o-1.)
            arg[(3, 0, 2, 0)]=-0.806763156019*x[0]**o + (-0.190548597991)*x[0] + (-0.712406813101)*x[1]**o + (-0.886447481224)*x[1]
            ref[(3, 0, 2, 0)]=-1.29808302417-(-0.253194994853)*(o-1.)
            arg[(3, 0, 2, 1)]=-0.0805517350429*x[0]**o + (0.837332847767)*x[0] + (0.175578324236)*x[1]**o + (0.86570362552)*x[1]
            ref[(3, 0, 2, 1)]=0.89903153124-(0.0158377648655)*(o-1.)
            arg[(3, 0, 3, 0)]=-0.631906477859*x[0]**o + (-0.221240529344)*x[0] + (-0.36038210014)*x[1]**o + (-0.362109418635)*x[1]
            ref[(3, 0, 3, 0)]=-0.787819262989-(-0.165381429666)*(o-1.)
            arg[(3, 0, 3, 1)]=0.013368482168*x[0]**o + (-0.446214795921)*x[0] + (0.237209683943)*x[1]**o + (0.899489076733)*x[1]
            ref[(3, 0, 3, 1)]=0.351926223462-(0.0417630276852)*(o-1.)
            arg[(3, 1, 0, 0)]=0.0138752091465*x[0]**o + (0.897473489321)*x[0] + (-0.0195612025141)*x[1]**o + (-0.259809167208)*x[1]
            ref[(3, 1, 0, 0)]=0.315989164373-(-0.000947665561255)*(o-1.)
            arg[(3, 1, 0, 1)]=0.280042443951*x[0]**o + (-0.741096356724)*x[0] + (-0.200576994606)*x[1]**o + (-0.752936024226)*x[1]
            ref[(3, 1, 0, 1)]=-0.707283465803-(0.0132442415575)*(o-1.)
            arg[(3, 1, 1, 0)]=-0.119070066224*x[0]**o + (-0.478236819876)*x[0] + (-0.331297798926)*x[1]**o + (-0.559337276541)*x[1]
            ref[(3, 1, 1, 0)]=-0.743970980783-(-0.0750613108584)*(o-1.)
            arg[(3, 1, 1, 1)]=-0.0108647686918*x[0]**o + (-0.556734081291)*x[0] + (-0.112437569344)*x[1]**o + (-0.251312278908)*x[1]
            ref[(3, 1, 1, 1)]=-0.465674349117-(-0.0205503896726)*(o-1.)
            arg[(3, 1, 2, 0)]=-0.330106566265*x[0]**o + (-0.549210182469)*x[0] + (0.421390614778)*x[1]**o + (0.674070878842)*x[1]
            ref[(3, 1, 2, 0)]=0.108072372443-(0.0152140080854)*(o-1.)
            arg[(3, 1, 2, 1)]=-0.149328738187*x[0]**o + (-0.339555532129)*x[0] + (0.781830743929)*x[1]**o + (0.205542192181)*x[1]
            ref[(3, 1, 2, 1)]=0.249244332897-(0.105417000957)*(o-1.)
            arg[(3, 1, 3, 0)]=0.17361577473*x[0]**o + (0.835038258833)*x[0] + (-0.681819190123)*x[1]**o + (-0.738929194067)*x[1]
            ref[(3, 1, 3, 0)]=-0.206047175313-(-0.0847005692322)*(o-1.)
            arg[(3, 1, 3, 1)]=0.515065141676*x[0]**o + (-0.440301372922)*x[0] + (0.933262174955)*x[1]**o + (-0.640724830527)*x[1]
            ref[(3, 1, 3, 1)]=0.183650556591-(0.241387886105)*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=0.512995314461*x[0]**o + (-0.040542241417)*x[0] + (0.676731718401)*x[1]**o + (0.469744945751)*x[1] + (0.0611249686546)*x[2]**o + (0.360491131366)*x[2]
            ref[(0, 0, 0, 0)]=1.02027291861-(0.208475333586)*(o-1.)
            arg[(0, 0, 0, 1)]=0.573696830963*x[0]**o + (0.0627573494308)*x[0] + (-0.811536434399)*x[1]**o + (0.396599855785)*x[1] + (-0.237513893344)*x[2]**o + (-0.90531768033)*x[2]
            ref[(0, 0, 0, 1)]=-0.460656985947-(-0.0792255827966)*(o-1.)
            arg[(0, 0, 1, 0)]=-0.957333065497*x[0]**o + (-0.190789799596)*x[0] + (-0.653130566208)*x[1]**o + (0.0460656110734)*x[1] + (0.532836186292)*x[2]**o + (0.557123787921)*x[2]
            ref[(0, 0, 1, 0)]=-0.332613923008-(-0.179604574236)*(o-1.)
            arg[(0, 0, 1, 1)]=0.259296346877*x[0]**o + (-0.956807053177)*x[0] + (0.267267556688)*x[1]**o + (-0.768277275848)*x[1] + (-0.596630665017)*x[2]**o + (0.6108459203)*x[2]
            ref[(0, 0, 1, 1)]=-0.592152585089-(-0.0116777935753)*(o-1.)
            arg[(0, 0, 2, 0)]=0.9382451452*x[0]**o + (-0.618226338596)*x[0] + (0.624827696153)*x[1]**o + (0.258725229813)*x[1] + (-0.393133230586)*x[2]**o + (0.149282019095)*x[2]
            ref[(0, 0, 2, 0)]=0.479860260539-(0.194989935128)*(o-1.)
            arg[(0, 0, 2, 1)]=-0.212830695386*x[0]**o + (0.542508773369)*x[0] + (0.72974801334)*x[1]**o + (0.379427992191)*x[1] + (0.390327433134)*x[2]**o + (-0.6597702438)*x[2]
            ref[(0, 0, 2, 1)]=0.584705636424-(0.151207458515)*(o-1.)
            arg[(0, 0, 3, 0)]=-0.641428722114*x[0]**o + (0.458427527804)*x[0] + (0.8476833543)*x[1]**o + (0.561782673271)*x[1] + (-0.0162617627366)*x[2]**o + (-0.540235230077)*x[2]
            ref[(0, 0, 3, 0)]=0.334983920223-(0.0316654782416)*(o-1.)
            arg[(0, 0, 3, 1)]=0.758662175431*x[0]**o + (-0.417067533894)*x[0] + (0.143551026347)*x[1]**o + (0.773929575237)*x[1] + (0.502089699109)*x[2]**o + (-0.357112368462)*x[2]
            ref[(0, 0, 3, 1)]=0.702026286884-(0.234050483481)*(o-1.)
            arg[(0, 1, 0, 0)]=0.95483197687*x[0]**o + (0.797782509796)*x[0] + (-0.268498907185)*x[1]**o + (0.052030925151)*x[1] + (-0.577682574087)*x[2]**o + (-0.594293348501)*x[2]
            ref[(0, 1, 0, 0)]=0.182085291022-(0.018108415933)*(o-1.)
            arg[(0, 1, 0, 1)]=0.516058115853*x[0]**o + (0.0649188602655)*x[0] + (0.873064935491)*x[1]**o + (-0.0669665774531)*x[1] + (0.829880232239)*x[2]**o + (0.222464943158)*x[2]
            ref[(0, 1, 0, 1)]=1.21971025478-(0.369833880597)*(o-1.)
            arg[(0, 1, 1, 0)]=-0.320378137109*x[0]**o + (0.361561917886)*x[0] + (-0.284572732411)*x[1]**o + (0.0263069446825)*x[1] + (0.0174612733231)*x[2]**o + (-0.7100567355)*x[2]
            ref[(0, 1, 1, 0)]=-0.454838734564-(-0.0979149326994)*(o-1.)
            arg[(0, 1, 1, 1)]=0.316227760242*x[0]**o + (0.285290882345)*x[0] + (0.0462166107261)*x[1]**o + (0.0593137940394)*x[1] + (-0.783146878294)*x[2]**o + (-0.11459212374)*x[2]
            ref[(0, 1, 1, 1)]=-0.0953449773408-(-0.0701170845544)*(o-1.)
            arg[(0, 1, 2, 0)]=0.178188973234*x[0]**o + (-0.530036462297)*x[0] + (0.100833591208)*x[1]**o + (0.485430265207)*x[1] + (-0.714243482452)*x[2]**o + (-0.140852133277)*x[2]
            ref[(0, 1, 2, 0)]=-0.310339624188-(-0.0725368196684)*(o-1.)
            arg[(0, 1, 2, 1)]=0.765806432373*x[0]**o + (0.531276471754)*x[0] + (0.756110332413)*x[1]**o + (0.899798480099)*x[1] + (-0.723678797133)*x[2]**o + (0.66375296476)*x[2]
            ref[(0, 1, 2, 1)]=1.44653294213-(0.133039661275)*(o-1.)
            arg[(0, 1, 3, 0)]=0.184468351611*x[0]**o + (0.566930449186)*x[0] + (-0.521808079782)*x[1]**o + (0.104165488611)*x[1] + (-0.0375044992825)*x[2]**o + (0.647683844691)*x[2]
            ref[(0, 1, 3, 0)]=0.471967777517-(-0.062474037909)*(o-1.)
            arg[(0, 1, 3, 1)]=-0.152060829121*x[0]**o + (0.571362089911)*x[0] + (-0.244083908037)*x[1]**o + (0.463287522465)*x[1] + (-0.890251329772)*x[2]**o + (0.216608134217)*x[2]
            ref[(0, 1, 3, 1)]=-0.0175691601682-(-0.214399344488)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.190203279206*x[0]**o + (-0.707469475899)*x[0] + (-0.326653495259)*x[1]**o + (0.357922934696)*x[1] + (-0.759762254714)*x[2]**o + (0.50953809959)*x[2]
            ref[(1, 0, 0, 0)]=-0.558313735396-(-0.212769838197)*(o-1.)
            arg[(1, 0, 0, 1)]=-0.37232705333*x[0]**o + (-0.230824987836)*x[0] + (-0.690608201931)*x[1]**o + (0.994253501967)*x[1] + (-0.275084960666)*x[2]**o + (-0.160495829507)*x[2]
            ref[(1, 0, 0, 1)]=-0.367543765651-(-0.223003369321)*(o-1.)
            arg[(1, 0, 1, 0)]=0.462641336335*x[0]**o + (0.617158126546)*x[0] + (-0.520518144063)*x[1]**o + (0.551251300031)*x[1] + (0.795101725149)*x[2]**o + (-0.608697465741)*x[2]
            ref[(1, 0, 1, 0)]=0.648468439128-(0.12287081957)*(o-1.)
            arg[(1, 0, 1, 1)]=0.413470147281*x[0]**o + (0.236263374373)*x[0] + (-0.143218111797)*x[1]**o + (-0.906297832006)*x[1] + (0.733822093147)*x[2]**o + (0.753092795528)*x[2]
            ref[(1, 0, 1, 1)]=0.543566233263-(0.167345688105)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.752400285024*x[0]**o + (-0.995478223721)*x[0] + (-0.435198990913)*x[1]**o + (-0.324444626011)*x[1] + (0.320028857696)*x[2]**o + (-0.500033514463)*x[2]
            ref[(1, 0, 2, 0)]=-1.34376339122-(-0.144595069707)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.59007409379*x[0]**o + (-0.323007762176)*x[0] + (-0.311481926248)*x[1]**o + (-0.99383058291)*x[1] + (-0.498476263668)*x[2]**o + (-0.983001536346)*x[2]
            ref[(1, 0, 2, 1)]=-1.84993608257-(-0.233338713951)*(o-1.)
            arg[(1, 0, 3, 0)]=-0.826037435388*x[0]**o + (0.675962351467)*x[0] + (0.827988523385)*x[1]**o + (0.518154230438)*x[1] + (0.251740726804)*x[2]**o + (-0.889244886921)*x[2]
            ref[(1, 0, 3, 0)]=0.279281754892-(0.0422819691336)*(o-1.)
            arg[(1, 0, 3, 1)]=-0.77666802257*x[0]**o + (-0.684777679178)*x[0] + (-0.091451041212)*x[1]**o + (0.882931024241)*x[1] + (0.495718077947)*x[2]**o + (-0.626785648043)*x[2]
            ref[(1, 0, 3, 1)]=-0.400516644407-(-0.0620668309725)*(o-1.)
            arg[(1, 1, 0, 0)]=0.657353257691*x[0]**o + (0.282959086345)*x[0] + (-0.495020250076)*x[1]**o + (0.881444723515)*x[1] + (0.0825185246754)*x[2]**o + (-0.735671161754)*x[2]
            ref[(1, 1, 0, 0)]=0.336792090198-(0.0408085887151)*(o-1.)
            arg[(1, 1, 0, 1)]=0.986314807541*x[0]**o + (0.281305637869)*x[0] + (0.255380949006)*x[1]**o + (0.470865114157)*x[1] + (-0.52200248005)*x[2]**o + (0.19854869164)*x[2]
            ref[(1, 1, 0, 1)]=0.835206360081-(0.119948879416)*(o-1.)
            arg[(1, 1, 1, 0)]=0.241636662255*x[0]**o + (0.904742560141)*x[0] + (0.792799399034)*x[1]**o + (-0.332415639206)*x[1] + (0.628976751138)*x[2]**o + (0.372464302482)*x[2]
            ref[(1, 1, 1, 0)]=1.30410201792-(0.277235468738)*(o-1.)
            arg[(1, 1, 1, 1)]=0.392481358542*x[0]**o + (-0.666136648777)*x[0] + (-0.548580650714)*x[1]**o + (-0.135409961456)*x[1] + (-0.890734853782)*x[2]**o + (-0.487283692893)*x[2]
            ref[(1, 1, 1, 1)]=-1.16783222454-(-0.174472357659)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.523970921373*x[0]**o + (-0.688158949594)*x[0] + (0.572734055168)*x[1]**o + (-0.949375666215)*x[1] + (0.967059168583)*x[2]**o + (-0.976277761009)*x[2]
            ref[(1, 1, 2, 0)]=-0.79899503722-(0.169303717063)*(o-1.)
            arg[(1, 1, 2, 1)]=0.302334884507*x[0]**o + (-0.193039411169)*x[0] + (-0.380479019652)*x[1]**o + (-0.55574055598)*x[1] + (-0.242318610995)*x[2]**o + (0.102980620655)*x[2]
            ref[(1, 1, 2, 1)]=-0.483131046317-(-0.0534104576901)*(o-1.)
            arg[(1, 1, 3, 0)]=0.399551691342*x[0]**o + (-0.193591691443)*x[0] + (0.144640509694)*x[1]**o + (0.0320241901501)*x[1] + (0.17063857341)*x[2]**o + (-0.944480563359)*x[2]
            ref[(1, 1, 3, 0)]=-0.195608645103-(0.119138462408)*(o-1.)
            arg[(1, 1, 3, 1)]=-0.247388951055*x[0]**o + (0.151794429477)*x[0] + (-0.515822541443)*x[1]**o + (-0.557223009553)*x[1] + (-0.548171871925)*x[2]**o + (-0.764632883896)*x[2]
            ref[(1, 1, 3, 1)]=-1.2407224142-(-0.218563894071)*(o-1.)
            arg[(2, 0, 0, 0)]=0.743848968885*x[0]**o + (0.32511210848)*x[0] + (-0.467561364429)*x[1]**o + (0.300557711058)*x[1] + (0.367740110057)*x[2]**o + (-0.883826199274)*x[2]
            ref[(2, 0, 0, 0)]=0.192935667388-(0.107337952419)*(o-1.)
            arg[(2, 0, 0, 1)]=-0.883862684823*x[0]**o + (0.970076128326)*x[0] + (-0.901072877874)*x[1]**o + (0.408991997372)*x[1] + (0.53426190206)*x[2]**o + (-0.714389469613)*x[2]
            ref[(2, 0, 0, 1)]=-0.292997502276-(-0.208445610106)*(o-1.)
            arg[(2, 0, 1, 0)]=0.340289823982*x[0]**o + (-0.0752557171371)*x[0] + (0.422806355858)*x[1]**o + (-0.866233831206)*x[1] + (0.685978565079)*x[2]**o + (-0.893992945342)*x[2]
            ref[(2, 0, 1, 0)]=-0.193203874383-(0.241512457487)*(o-1.)
            arg[(2, 0, 1, 1)]=0.902361162874*x[0]**o + (-0.0889870849815)*x[0] + (-0.588541904364)*x[1]**o + (0.139603990728)*x[1] + (0.251750479269)*x[2]**o + (0.727111200057)*x[2]
            ref[(2, 0, 1, 1)]=0.671648921791-(0.0942616229632)*(o-1.)
            arg[(2, 0, 2, 0)]=0.776722263995*x[0]**o + (0.138597305618)*x[0] + (0.799583466389)*x[1]**o + (0.284783372452)*x[1] + (-0.292478717464)*x[2]**o + (0.0710307681478)*x[2]
            ref[(2, 0, 2, 0)]=0.889119229569-(0.21397116882)*(o-1.)
            arg[(2, 0, 2, 1)]=-0.787808805429*x[0]**o + (-0.177161689574)*x[0] + (0.598346323112)*x[1]**o + (0.694150250745)*x[1] + (0.463642903704)*x[2]**o + (-0.561258417568)*x[2]
            ref[(2, 0, 2, 1)]=0.114955282494-(0.0456967368977)*(o-1.)
            arg[(2, 0, 3, 0)]=0.845967160271*x[0]**o + (-0.410821007394)*x[0] + (-0.651829766097)*x[1]**o + (0.693037645932)*x[1] + (-0.908799772836)*x[2]**o + (0.404151182687)*x[2]
            ref[(2, 0, 3, 0)]=-0.014147278718-(-0.119110396443)*(o-1.)
            arg[(2, 0, 3, 1)]=-0.131314328345*x[0]**o + (-0.234872483821)*x[0] + (0.611207109923)*x[1]**o + (0.423601643415)*x[1] + (-0.564350144386)*x[2]**o + (-0.0852752538884)*x[2]
            ref[(2, 0, 3, 1)]=0.00949827144867-(-0.0140762271348)*(o-1.)
            arg[(2, 1, 0, 0)]=0.184926242051*x[0]**o + (0.570315769995)*x[0] + (-0.712276322346)*x[1]**o + (-0.876925082428)*x[1] + (-0.393016432123)*x[2]**o + (-0.608386599084)*x[2]
            ref[(2, 1, 0, 0)]=-0.917681211968-(-0.153394418736)*(o-1.)
            arg[(2, 1, 0, 1)]=0.97196802293*x[0]**o + (-0.0967351481327)*x[0] + (0.424424934754)*x[1]**o + (0.939857384262)*x[1] + (0.861203364282)*x[2]**o + (-0.765622850596)*x[2]
            ref[(2, 1, 0, 1)]=1.16754785375-(0.376266053661)*(o-1.)
            arg[(2, 1, 1, 0)]=-0.0945493807921*x[0]**o + (0.769417487191)*x[0] + (-0.00725084320423)*x[1]**o + (-0.623269409026)*x[1] + (0.0586294838152)*x[2]**o + (-0.345318991149)*x[2]
            ref[(2, 1, 1, 0)]=-0.121170826582-(-0.00719512336352)*(o-1.)
            arg[(2, 1, 1, 1)]=-0.293820047742*x[0]**o + (-0.544216189186)*x[0] + (0.916900619489)*x[1]**o + (-0.385593441595)*x[1] + (0.973017957104)*x[2]**o + (-0.875021022773)*x[2]
            ref[(2, 1, 1, 1)]=-0.104366062351-(0.266016421475)*(o-1.)
            arg[(2, 1, 2, 0)]=0.759921074207*x[0]**o + (-0.537109352453)*x[0] + (0.0207903031961)*x[1]**o + (-0.0401343155431)*x[1] + (0.370853265149)*x[2]**o + (0.0626565091681)*x[2]
            ref[(2, 1, 2, 0)]=0.318488741862-(0.191927440425)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.591041330648*x[0]**o + (0.93624503613)*x[0] + (-0.0160738843884)*x[1]**o + (-0.209370788129)*x[1] + (0.0301598857696)*x[2]**o + (-0.530491997772)*x[2]
            ref[(2, 1, 2, 1)]=-0.190286539519-(-0.0961592215445)*(o-1.)
            arg[(2, 1, 3, 0)]=-0.0705422636462*x[0]**o + (0.141688687504)*x[0] + (0.552693925031)*x[1]**o + (-0.512221148465)*x[1] + (0.180397417367)*x[2]**o + (-0.628668078469)*x[2]
            ref[(2, 1, 3, 0)]=-0.168325730339-(0.110424846459)*(o-1.)
            arg[(2, 1, 3, 1)]=0.229081974631*x[0]**o + (0.841007202343)*x[0] + (-0.447183254072)*x[1]**o + (-0.552137863748)*x[1] + (-0.743015233696)*x[2]**o + (-0.211482549219)*x[2]
            ref[(2, 1, 3, 1)]=-0.441864861881-(-0.160186085523)*(o-1.)
            arg[(3, 0, 0, 0)]=0.860029919596*x[0]**o + (0.546171902008)*x[0] + (0.24870976993)*x[1]**o + (-0.963053278201)*x[1] + (0.456366601681)*x[2]**o + (-0.634784070523)*x[2]
            ref[(3, 0, 0, 0)]=0.256720422246-(0.260851048534)*(o-1.)
            arg[(3, 0, 0, 1)]=0.665095352082*x[0]**o + (-0.854345410926)*x[0] + (0.345227020331)*x[1]**o + (0.737061889584)*x[1] + (0.236844939528)*x[2]**o + (-0.47330338955)*x[2]
            ref[(3, 0, 0, 1)]=0.328290200524-(0.207861218657)*(o-1.)
            arg[(3, 0, 1, 0)]=0.360099200734*x[0]**o + (0.145775620887)*x[0] + (0.0948907335909)*x[1]**o + (0.978743033285)*x[1] + (-0.473894637856)*x[2]**o + (-0.829659834447)*x[2]
            ref[(3, 0, 1, 0)]=0.137977058097-(-0.00315078392186)*(o-1.)
            arg[(3, 0, 1, 1)]=0.512191364817*x[0]**o + (-0.0342598339039)*x[0] + (-0.965665221039)*x[1]**o + (-0.540563729669)*x[1] + (-0.689281422748)*x[2]**o + (0.260389835624)*x[2]
            ref[(3, 0, 1, 1)]=-0.728594503459-(-0.190459213162)*(o-1.)
            arg[(3, 0, 2, 0)]=-0.422813756738*x[0]**o + (-0.998603989004)*x[0] + (0.0901992470712)*x[1]**o + (-0.106743349561)*x[1] + (0.390641315789)*x[2]**o + (-0.227888468292)*x[2]
            ref[(3, 0, 2, 0)]=-0.637604500367-(0.00967113435377)*(o-1.)
            arg[(3, 0, 2, 1)]=-0.295196742027*x[0]**o + (0.117396803301)*x[0] + (-0.762144103189)*x[1]**o + (-0.649613115872)*x[1] + (0.929284404339)*x[2]**o + (-0.0184734753727)*x[2]
            ref[(3, 0, 2, 1)]=-0.33937311441-(-0.0213427401461)*(o-1.)
            arg[(3, 0, 3, 0)]=-0.0182112668181*x[0]**o + (0.404309292539)*x[0] + (0.0814962582639)*x[1]**o + (-0.582580019288)*x[1] + (0.875500301436)*x[2]**o + (0.954591678578)*x[2]
            ref[(3, 0, 3, 0)]=0.857553122355-(0.15646421548)*(o-1.)
            arg[(3, 0, 3, 1)]=-0.906372733235*x[0]**o + (0.405780037556)*x[0] + (-0.329777678305)*x[1]**o + (0.589527442996)*x[1] + (0.118965565911)*x[2]**o + (-0.742031561409)*x[2]
            ref[(3, 0, 3, 1)]=-0.431954463243-(-0.186197474271)*(o-1.)
            arg[(3, 1, 0, 0)]=-0.132877533287*x[0]**o + (-0.53410922809)*x[0] + (0.901137609402)*x[1]**o + (-0.818684011122)*x[1] + (0.561010686985)*x[2]**o + (0.669253332786)*x[2]
            ref[(3, 1, 0, 0)]=0.322865428337-(0.221545127183)*(o-1.)
            arg[(3, 1, 0, 1)]=0.187080988162*x[0]**o + (0.0045504172384)*x[0] + (0.246534323239)*x[1]**o + (-0.635024569338)*x[1] + (0.759167074351)*x[2]**o + (-0.102349846896)*x[2]
            ref[(3, 1, 0, 1)]=0.229979193379-(0.198797064292)*(o-1.)
            arg[(3, 1, 1, 0)]=0.799042799879*x[0]**o + (-0.464132034897)*x[0] + (-0.432003293064)*x[1]**o + (0.321687481713)*x[1] + (-0.123821528922)*x[2]**o + (0.731370881252)*x[2]
            ref[(3, 1, 1, 0)]=0.41607215298-(0.0405363296488)*(o-1.)
            arg[(3, 1, 1, 1)]=0.943632461065*x[0]**o + (-0.103972441081)*x[0] + (0.545756998286)*x[1]**o + (0.537643810933)*x[1] + (0.383731620252)*x[2]**o + (0.26051810536)*x[2]
            ref[(3, 1, 1, 1)]=1.28365527741-(0.312186846601)*(o-1.)
            arg[(3, 1, 2, 0)]=0.949662295647*x[0]**o + (-0.0693219394267)*x[0] + (0.719538110789)*x[1]**o + (-0.885587791953)*x[1] + (-0.106210011852)*x[2]**o + (-0.993058560413)*x[2]
            ref[(3, 1, 2, 0)]=-0.192488948604-(0.260498399097)*(o-1.)
            arg[(3, 1, 2, 1)]=-0.740888337884*x[0]**o + (0.24891835296)*x[0] + (-0.858116669602)*x[1]**o + (-0.613382463627)*x[1] + (0.854483590453)*x[2]**o + (-0.461431277028)*x[2]
            ref[(3, 1, 2, 1)]=-0.785208402364-(-0.124086902839)*(o-1.)
            arg[(3, 1, 3, 0)]=-0.456203167683*x[0]**o + (-0.819900637606)*x[0] + (0.783087881024)*x[1]**o + (-0.0972303512675)*x[1] + (0.86766438064)*x[2]**o + (-0.72848545317)*x[2]
            ref[(3, 1, 3, 0)]=-0.225533674031-(0.199091515664)*(o-1.)
            arg[(3, 1, 3, 1)]=0.938518325817*x[0]**o + (0.588385344297)*x[0] + (0.762107215009)*x[1]**o + (0.566026706597)*x[1] + (-0.609577941076)*x[2]**o + (0.638463845444)*x[2]
            ref[(3, 1, 3, 1)]=1.44196174804-(0.181841266625)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.507178938321*x[0]**o + (0.352014641075)*x[0] + (-0.595749244415)*x[1]**o + (-0.344575063515)*x[1]
            ref=-0.547744302588-(-0.183821363789)*(o-1.)
        else:
            arg=-0.224606437654*x[0]**o + (-0.534715037978)*x[0] + (-0.866763240817)*x[1]**o + (0.530559502151)*x[1] + (-0.851576447526)*x[2]**o + (-0.589430899833)*x[2]
            ref=-1.26826628083-(-0.323824354333)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.159840363695*x[0]**o + (0.125956027111)*x[0] + (0.701780624424)*x[1]**o + (0.101093895132)*x[1]
            ref[(0,)]=0.384495091485-(0.090323376788)*(o-1.)
            arg[(1,)]=0.184322362089*x[0]**o + (0.617765000907)*x[0] + (0.566577605983)*x[1]**o + (0.186652018429)*x[1]
            ref[(1,)]=0.777658493704-(0.125149994679)*(o-1.)
            arg[(2,)]=-0.576903204043*x[0]**o + (0.0269220279996)*x[0] + (0.409531554844)*x[1]**o + (0.147270709776)*x[1]
            ref[(2,)]=0.00341054428855-(-0.0278952748664)*(o-1.)
        else:
            arg[(0,)]=0.447138318299*x[0]**o + (-0.84290507738)*x[0] + (0.159748878149)*x[1]**o + (0.907064695259)*x[1] + (-0.711359810529)*x[2]**o + (-0.183343719181)*x[2]
            ref[(0,)]=-0.111828357692-(-0.0174121023468)*(o-1.)
            arg[(1,)]=0.0764330567047*x[0]**o + (0.888785537057)*x[0] + (0.940176032946)*x[1]**o + (0.821181680267)*x[1] + (-0.475522348677)*x[2]**o + (-0.808245374676)*x[2]
            ref[(1,)]=0.721404291812-(0.0901811234957)*(o-1.)
            arg[(2,)]=-0.591960396895*x[0]**o + (-0.0437598674087)*x[0] + (-0.279734921017)*x[1]**o + (-0.601504499358)*x[1] + (-0.878683774267)*x[2]**o + (-0.1498795871)*x[2]
            ref[(2,)]=-1.27276152302-(-0.291729848696)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.292693771493*x[0]**o + (0.353958893114)*x[0] + (-0.402350385546)*x[1]**o + (-0.0167117513688)*x[1]
            ref[(0, 0)]=-0.178898507647-(-0.11584069284)*(o-1.)
            arg[(0, 1)]=0.309476924967*x[0]**o + (-0.644123828688)*x[0] + (0.125120453282)*x[1]**o + (-0.886061992034)*x[1]
            ref[(0, 1)]=-0.547794221237-(0.0724328963749)*(o-1.)
            arg[(0, 2)]=-0.0192634187694*x[0]**o + (-0.223221425876)*x[0] + (0.605167929341)*x[1]**o + (0.852998278404)*x[1]
            ref[(0, 2)]=0.60784068155-(0.097650751762)*(o-1.)
            arg[(1, 0)]=0.698833913468*x[0]**o + (0.655383794795)*x[0] + (0.89237207849)*x[1]**o + (-0.588175107054)*x[1]
            ref[(1, 0)]=0.82920733985-(0.26520099866)*(o-1.)
            arg[(1, 1)]=0.359332397628*x[0]**o + (-0.997135324144)*x[0] + (-0.283723742927)*x[1]**o + (-0.268159964372)*x[1]
            ref[(1, 1)]=-0.594843316908-(0.0126014424501)*(o-1.)
            arg[(1, 2)]=-0.0129625185282*x[0]**o + (-0.0570673081712)*x[0] + (0.526949226943)*x[1]**o + (0.126589793715)*x[1]
            ref[(1, 2)]=0.29175459698-(0.0856644514025)*(o-1.)
            arg[(2, 0)]=0.600068029653*x[0]**o + (-0.776810195029)*x[0] + (-0.787441050906)*x[1]**o + (0.490539706096)*x[1]
            ref[(2, 0)]=-0.236821755093-(-0.0312288368755)*(o-1.)
            arg[(2, 1)]=-0.0127418192535*x[0]**o + (-0.587096231003)*x[0] + (0.378152639839)*x[1]**o + (-0.011957132228)*x[1]
            ref[(2, 1)]=-0.116821271323-(0.0609018034309)*(o-1.)
            arg[(2, 2)]=0.544352912568*x[0]**o + (0.0746405632165)*x[0] + (0.730265530453)*x[1]**o + (0.260924853681)*x[1]
            ref[(2, 2)]=0.80509192996-(0.21243640717)*(o-1.)
        else:
            arg[(0, 0)]=-0.594969766764*x[0]**o + (-0.424781977699)*x[0] + (-0.460964352238)*x[1]**o + (-0.726039925916)*x[1] + (-0.853312434792)*x[2]**o + (0.924550483142)*x[2]
            ref[(0, 0)]=-1.06775898713-(-0.318207758966)*(o-1.)
            arg[(0, 1)]=0.34034098018*x[0]**o + (0.0527790301285)*x[0] + (0.493154340836)*x[1]**o + (-0.625250257299)*x[1] + (-0.744202083248)*x[2]**o + (0.550710738983)*x[2]
            ref[(0, 1)]=0.0337663747903-(0.0148822062947)*(o-1.)
            arg[(0, 2)]=0.0809926785161*x[0]**o + (-0.910267465408)*x[0] + (0.248551169416)*x[1]**o + (-0.0468665677276)*x[1] + (0.318225899623)*x[2]**o + (-0.836513209547)*x[2]
            ref[(0, 2)]=-0.572938747564-(0.107961624592)*(o-1.)
            arg[(1, 0)]=0.576631097231*x[0]**o + (0.625820386687)*x[0] + (0.839309959041)*x[1]**o + (-0.342224577096)*x[1] + (-0.812370999499)*x[2]**o + (0.0747129706433)*x[2]
            ref[(1, 0)]=0.480939418504-(0.100595009462)*(o-1.)
            arg[(1, 1)]=-0.240848368379*x[0]**o + (-0.751324684365)*x[0] + (0.0382963570203)*x[1]**o + (0.713214525942)*x[1] + (-0.782610109045)*x[2]**o + (-0.47231763932)*x[2]
            ref[(1, 1)]=-0.747794959073-(-0.164193686734)*(o-1.)
            arg[(1, 2)]=-0.813071383461*x[0]**o + (0.455836075852)*x[0] + (0.605970447099)*x[1]**o + (0.816717540694)*x[1] + (0.210352633542)*x[2]**o + (0.13146325607)*x[2]
            ref[(1, 2)]=0.703634284898-(0.000541949530007)*(o-1.)
            arg[(2, 0)]=-0.883185569967*x[0]**o + (0.843922898213)*x[0] + (-0.847283620677)*x[1]**o + (-0.325177933172)*x[1] + (0.951977223066)*x[2]**o + (-0.180162336492)*x[2]
            ref[(2, 0)]=-0.219954669515-(-0.129748661263)*(o-1.)
            arg[(2, 1)]=0.241882796047*x[0]**o + (-0.810020407588)*x[0] + (0.189356604567)*x[1]**o + (-0.339639489847)*x[1] + (-0.19866343169)*x[2]**o + (-0.872735848197)*x[2]
            ref[(2, 1)]=-0.894909888354-(0.0387626614873)*(o-1.)
            arg[(2, 2)]=-0.676334742143*x[0]**o + (0.0349957633573)*x[0] + (-0.334442763575)*x[1]**o + (0.379717864143)*x[1] + (0.0861160522043)*x[2]**o + (-0.530144061507)*x[2]
            ref[(2, 2)]=-0.52004594376-(-0.154110242252)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2),w)
        ref=numpy.zeros((2, 2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.0255447724228*x[0]**o + (-0.37923039087)*x[0] + (-0.952590192832)*x[1]**o + (-0.925859755384)*x[1]
            ref[(0, 0, 0)]=-1.14161255575-(-0.163022494209)*(o-1.)
            arg[(0, 0, 1)]=-0.38142255538*x[0]**o + (0.129129761789)*x[0] + (-0.96847977086)*x[1]**o + (-0.59386454368)*x[1]
            ref[(0, 0, 1)]=-0.907318554065-(-0.22498372104)*(o-1.)
            arg[(0, 1, 0)]=0.554011527752*x[0]**o + (0.663985656045)*x[0] + (-0.461149770522)*x[1]**o + (-0.564636797493)*x[1]
            ref[(0, 1, 0)]=0.0961053078909-(0.0154769595382)*(o-1.)
            arg[(0, 1, 1)]=-0.0308092555344*x[0]**o + (-0.678843091461)*x[0] + (0.517392256859)*x[1]**o + (0.597111647735)*x[1]
            ref[(0, 1, 1)]=0.202425778799-(0.0810971668874)*(o-1.)
            arg[(1, 0, 0)]=0.174163454581*x[0]**o + (-0.211347116748)*x[0] + (-0.643446321154)*x[1]**o + (0.460135105908)*x[1]
            ref[(1, 0, 0)]=-0.110247438706-(-0.0782138110954)*(o-1.)
            arg[(1, 0, 1)]=-0.508444715906*x[0]**o + (-0.176635850059)*x[0] + (-0.78056355665)*x[1]**o + (0.131731999783)*x[1]
            ref[(1, 0, 1)]=-0.666956061417-(-0.214834712093)*(o-1.)
            arg[(1, 1, 0)]=0.172903763148*x[0]**o + (-0.453968583371)*x[0] + (-0.982994535211)*x[1]**o + (-0.514307305966)*x[1]
            ref[(1, 1, 0)]=-0.8891833307-(-0.135015128677)*(o-1.)
            arg[(1, 1, 1)]=0.880698112642*x[0]**o + (-0.216348100918)*x[0] + (0.0836114433223)*x[1]**o + (-0.609370039773)*x[1]
            ref[(1, 1, 1)]=0.0692957076365-(0.160718259327)*(o-1.)
        else:
            arg[(0, 0, 0)]=-0.581329995162*x[0]**o + (0.253674151072)*x[0] + (-0.706024026612)*x[1]**o + (-0.518545182987)*x[1] + (-0.62537753336)*x[2]**o + (0.687707737734)*x[2]
            ref[(0, 0, 0)]=-0.744947424657-(-0.318788592522)*(o-1.)
            arg[(0, 0, 1)]=-0.593032905315*x[0]**o + (0.670078637201)*x[0] + (-0.296147584238)*x[1]**o + (-0.364626701617)*x[1] + (0.883520524505)*x[2]**o + (-0.406967311967)*x[2]
            ref[(0, 0, 1)]=-0.0535876707156-(-0.000943327507972)*(o-1.)
            arg[(0, 1, 0)]=-0.428855584402*x[0]**o + (0.30961419718)*x[0] + (-0.224678626758)*x[1]**o + (-0.008250281065)*x[1] + (-0.657227368201)*x[2]**o + (0.972540144264)*x[2]
            ref[(0, 1, 0)]=-0.0184287594905-(-0.218460263227)*(o-1.)
            arg[(0, 1, 1)]=0.0725564977837*x[0]**o + (0.910401983656)*x[0] + (0.768410984853)*x[1]**o + (-0.992383205115)*x[1] + (0.880572414888)*x[2]**o + (-0.307699609165)*x[2]
            ref[(0, 1, 1)]=0.66592953345-(0.286923316254)*(o-1.)
            arg[(1, 0, 0)]=0.00694812312377*x[0]**o + (0.161052257414)*x[0] + (-0.908085275579)*x[1]**o + (0.249073866548)*x[1] + (0.611470401848)*x[2]**o + (0.680641173684)*x[2]
            ref[(1, 0, 0)]=0.400550273519-(-0.0482777917678)*(o-1.)
            arg[(1, 0, 1)]=-0.149518288683*x[0]**o + (0.541189352457)*x[0] + (-0.701807865878)*x[1]**o + (0.824253981421)*x[1] + (-0.265471869833)*x[2]**o + (0.525369248034)*x[2]
            ref[(1, 0, 1)]=0.387007278759-(-0.186133004066)*(o-1.)
            arg[(1, 1, 0)]=-0.337488203022*x[0]**o + (-0.922048720671)*x[0] + (-0.421125831951)*x[1]**o + (-0.274763018463)*x[1] + (0.278260012161)*x[2]**o + (-0.891361623461)*x[2]
            ref[(1, 1, 0)]=-1.2842636927-(-0.0800590038022)*(o-1.)
            arg[(1, 1, 1)]=0.015087863073*x[0]**o + (0.683375097464)*x[0] + (0.30670029196)*x[1]**o + (-0.72564333267)*x[1] + (-0.1378175628)*x[2]**o + (-0.192063966309)*x[2]
            ref[(1, 1, 1)]=-0.0251808046412-(0.0306617653721)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3, 3),w)
        ref=numpy.zeros((4, 2, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.376929969488*x[0]**o + (-0.0776801427015)*x[0] + (-0.900851044033)*x[1]**o + (-0.977055223627)*x[1]
            ref[(0, 0, 0, 0)]=-1.16625818992-(-0.212963502253)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.292831828712*x[0]**o + (-0.968388184777)*x[0] + (0.532962315353)*x[1]**o + (0.282128521494)*x[1]
            ref[(0, 0, 0, 1)]=-0.223064588321-(0.0400217477735)*(o-1.)
            arg[(0, 0, 0, 2)]=0.493164399399*x[0]**o + (0.217744704381)*x[0] + (-0.310755334032)*x[1]**o + (0.842343234696)*x[1]
            ref[(0, 0, 0, 2)]=0.621248502222-(0.0304015108945)*(o-1.)
            arg[(0, 0, 1, 0)]=0.608997942729*x[0]**o + (-0.905070230767)*x[0] + (-0.738433675731)*x[1]**o + (-0.180206771463)*x[1]
            ref[(0, 0, 1, 0)]=-0.607356367616-(-0.0215726221669)*(o-1.)
            arg[(0, 0, 1, 1)]=0.895933329549*x[0]**o + (-0.382740975567)*x[0] + (-0.827982447306)*x[1]**o + (-0.143537632775)*x[1]
            ref[(0, 0, 1, 1)]=-0.22916386305-(0.0113251470405)*(o-1.)
            arg[(0, 0, 1, 2)]=0.430338819143*x[0]**o + (0.195143138552)*x[0] + (0.696803802801)*x[1]**o + (0.936897306395)*x[1]
            ref[(0, 0, 1, 2)]=1.12959153345-(0.187857103657)*(o-1.)
            arg[(0, 0, 2, 0)]=-0.280545027616*x[0]**o + (-0.000260723376507)*x[0] + (-0.0569447710589)*x[1]**o + (-0.508712894654)*x[1]
            ref[(0, 0, 2, 0)]=-0.423231708352-(-0.0562482997791)*(o-1.)
            arg[(0, 0, 2, 1)]=0.37425019658*x[0]**o + (0.31613976377)*x[0] + (-0.0936960358949)*x[1]**o + (0.421755524741)*x[1]
            ref[(0, 0, 2, 1)]=0.509224724598-(0.0467590267809)*(o-1.)
            arg[(0, 0, 2, 2)]=0.855961586434*x[0]**o + (-0.734939007064)*x[0] + (0.604846609528)*x[1]**o + (-0.0582417441101)*x[1]
            ref[(0, 0, 2, 2)]=0.333813722393-(0.24346803266)*(o-1.)
            arg[(0, 1, 0, 0)]=-0.904919777079*x[0]**o + (-0.460435265688)*x[0] + (-0.639980751978)*x[1]**o + (-0.155886378961)*x[1]
            ref[(0, 1, 0, 0)]=-1.08061108685-(-0.25748342151)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.332692269821*x[0]**o + (0.0722553437621)*x[0] + (-0.0862369607148)*x[1]**o + (-0.0875385262321)*x[1]
            ref[(0, 1, 0, 1)]=-0.217106206503-(-0.0698215384227)*(o-1.)
            arg[(0, 1, 0, 2)]=0.952231980453*x[0]**o + (0.585597441475)*x[0] + (0.447199692741)*x[1]**o + (0.539160602689)*x[1]
            ref[(0, 1, 0, 2)]=1.26209485868-(0.233238612199)*(o-1.)
            arg[(0, 1, 1, 0)]=-0.526319609003*x[0]**o + (-0.855891676345)*x[0] + (-0.887644038951)*x[1]**o + (0.311433244793)*x[1]
            ref[(0, 1, 1, 0)]=-0.979211039753-(-0.235660607992)*(o-1.)
            arg[(0, 1, 1, 1)]=-0.211231928846*x[0]**o + (-0.3164990975)*x[0] + (0.468354457885)*x[1]**o + (-0.188042603048)*x[1]
            ref[(0, 1, 1, 1)]=-0.123709585754-(0.0428537548399)*(o-1.)
            arg[(0, 1, 1, 2)]=0.964120125351*x[0]**o + (0.624468738307)*x[0] + (0.788663375647)*x[1]**o + (-0.868479687579)*x[1]
            ref[(0, 1, 1, 2)]=0.754386275863-(0.2921305835)*(o-1.)
            arg[(0, 1, 2, 0)]=-0.796563052217*x[0]**o + (-0.504386501976)*x[0] + (-0.557109217178)*x[1]**o + (0.837485155917)*x[1]
            ref[(0, 1, 2, 0)]=-0.510286807727-(-0.225612044899)*(o-1.)
            arg[(0, 1, 2, 1)]=-0.80108376236*x[0]**o + (0.876887101155)*x[0] + (-0.979128589878)*x[1]**o + (0.374765230626)*x[1]
            ref[(0, 1, 2, 1)]=-0.264280010229-(-0.296702058706)*(o-1.)
            arg[(0, 1, 2, 2)]=0.740996858524*x[0]**o + (0.303618566171)*x[0] + (0.401503596773)*x[1]**o + (0.0514728127616)*x[1]
            ref[(0, 1, 2, 2)]=0.748795917115-(0.19041674255)*(o-1.)
            arg[(1, 0, 0, 0)]=0.256014307779*x[0]**o + (-0.469925540474)*x[0] + (-0.91370530029)*x[1]**o + (-0.374205067334)*x[1]
            ref[(1, 0, 0, 0)]=-0.75091080016-(-0.109615165419)*(o-1.)
            arg[(1, 0, 0, 1)]=0.998205794799*x[0]**o + (0.0600275599841)*x[0] + (0.809844221745)*x[1]**o + (0.557381656327)*x[1]
            ref[(1, 0, 0, 1)]=1.21272961643-(0.301341669424)*(o-1.)
            arg[(1, 0, 0, 2)]=-0.868261277382*x[0]**o + (-0.203700682438)*x[0] + (-0.832559236494)*x[1]**o + (0.0348975293122)*x[1]
            ref[(1, 0, 0, 2)]=-0.934811833501-(-0.283470085646)*(o-1.)
            arg[(1, 0, 1, 0)]=0.926617860036*x[0]**o + (0.649015224125)*x[0] + (-0.885197579655)*x[1]**o + (-0.591157438537)*x[1]
            ref[(1, 0, 1, 0)]=0.0496390329845-(0.00690338006352)*(o-1.)
            arg[(1, 0, 1, 1)]=0.214160797924*x[0]**o + (-0.695503601059)*x[0] + (-0.446298972938)*x[1]**o + (0.843920198164)*x[1]
            ref[(1, 0, 1, 1)]=-0.0418607889543-(-0.0386896958357)*(o-1.)
            arg[(1, 0, 1, 2)]=-0.806433051998*x[0]**o + (-0.273863131034)*x[0] + (0.516146094092)*x[1]**o + (0.538079171891)*x[1]
            ref[(1, 0, 1, 2)]=-0.0130354585244-(-0.0483811596509)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.101119816588*x[0]**o + (-0.763726474202)*x[0] + (-0.787463136624)*x[1]**o + (-0.956265894404)*x[1]
            ref[(1, 0, 2, 0)]=-1.30428766091-(-0.148097158869)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.84811142476*x[0]**o + (0.867063967518)*x[0] + (0.655373218773)*x[1]**o + (0.804913139048)*x[1]
            ref[(1, 0, 2, 1)]=0.73961945029-(-0.0321230343311)*(o-1.)
            arg[(1, 0, 2, 2)]=-0.732691949548*x[0]**o + (0.237007003776)*x[0] + (-0.983737654792)*x[1]**o + (-0.870813359776)*x[1]
            ref[(1, 0, 2, 2)]=-1.17511798017-(-0.286071600723)*(o-1.)
            arg[(1, 1, 0, 0)]=-0.039912162285*x[0]**o + (-0.771298884426)*x[0] + (0.74393027968)*x[1]**o + (0.598953940987)*x[1]
            ref[(1, 1, 0, 0)]=0.265836586978-(0.117336352899)*(o-1.)
            arg[(1, 1, 0, 1)]=-0.254757638892*x[0]**o + (-0.569705015753)*x[0] + (-0.0140054600078)*x[1]**o + (-0.529904534639)*x[1]
            ref[(1, 1, 0, 1)]=-0.684186324646-(-0.0447938498167)*(o-1.)
            arg[(1, 1, 0, 2)]=-0.813767174868*x[0]**o + (-0.350283574619)*x[0] + (0.938771825686)*x[1]**o + (0.918599073915)*x[1]
            ref[(1, 1, 0, 2)]=0.346660075057-(0.0208341084697)*(o-1.)
            arg[(1, 1, 1, 0)]=0.641128099464*x[0]**o + (-0.289715346447)*x[0] + (0.0752620292253)*x[1]**o + (-0.219700379782)*x[1]
            ref[(1, 1, 1, 0)]=0.10348720123-(0.119398354782)*(o-1.)
            arg[(1, 1, 1, 1)]=-0.958097316463*x[0]**o + (-0.426190984728)*x[0] + (-0.236680284739)*x[1]**o + (-0.842215469965)*x[1]
            ref[(1, 1, 1, 1)]=-1.23159202795-(-0.1991296002)*(o-1.)
            arg[(1, 1, 1, 2)]=0.825905561338*x[0]**o + (0.814592152662)*x[0] + (0.384232585356)*x[1]**o + (0.0595320943392)*x[1]
            ref[(1, 1, 1, 2)]=1.04213119685-(0.201689691116)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.224473552953*x[0]**o + (-0.818845324148)*x[0] + (0.152909758615)*x[1]**o + (-0.889111273792)*x[1]
            ref[(1, 1, 2, 0)]=-0.889760196139-(-0.0119272990563)*(o-1.)
            arg[(1, 1, 2, 1)]=-0.435069375008*x[0]**o + (0.802280864782)*x[0] + (0.7124812554)*x[1]**o + (0.946731953012)*x[1]
            ref[(1, 1, 2, 1)]=1.01321234909-(0.0462353133986)*(o-1.)
            arg[(1, 1, 2, 2)]=-0.283743015209*x[0]**o + (0.811965004158)*x[0] + (0.356703962708)*x[1]**o + (0.362783107236)*x[1]
            ref[(1, 1, 2, 2)]=0.623854529446-(0.0121601579165)*(o-1.)
            arg[(2, 0, 0, 0)]=0.211012531317*x[0]**o + (0.609358299931)*x[0] + (0.315068587252)*x[1]**o + (-0.726568591957)*x[1]
            ref[(2, 0, 0, 0)]=0.204435413272-(0.0876801864281)*(o-1.)
            arg[(2, 0, 0, 1)]=0.218324238893*x[0]**o + (0.188272464394)*x[0] + (-0.362360543647)*x[1]**o + (-0.408526957316)*x[1]
            ref[(2, 0, 0, 1)]=-0.182145398838-(-0.0240060507923)*(o-1.)
            arg[(2, 0, 0, 2)]=0.349732522978*x[0]**o + (0.282509441348)*x[0] + (-0.224752607899)*x[1]**o + (-0.390948945871)*x[1]
            ref[(2, 0, 0, 2)]=0.00827020527788-(0.0208299858464)*(o-1.)
            arg[(2, 0, 1, 0)]=-0.226229004232*x[0]**o + (-0.768096596184)*x[0] + (-0.326804745838)*x[1]**o + (0.808164912414)*x[1]
            ref[(2, 0, 1, 0)]=-0.25648271692-(-0.0921722916784)*(o-1.)
            arg[(2, 0, 1, 1)]=-0.683946649304*x[0]**o + (-0.392039296716)*x[0] + (-0.974591876376)*x[1]**o + (-0.074241084955)*x[1]
            ref[(2, 0, 1, 1)]=-1.06240945368-(-0.276423087613)*(o-1.)
            arg[(2, 0, 1, 2)]=0.741023246235*x[0]**o + (0.314250495643)*x[0] + (0.109018852973)*x[1]**o + (0.504351271289)*x[1]
            ref[(2, 0, 1, 2)]=0.83432193307-(0.141673683201)*(o-1.)
            arg[(2, 0, 2, 0)]=0.347138959656*x[0]**o + (0.827437574567)*x[0] + (-0.759231379284)*x[1]**o + (-0.774542947361)*x[1]
            ref[(2, 0, 2, 0)]=-0.179598896211-(-0.068682069938)*(o-1.)
            arg[(2, 0, 2, 1)]=0.714905028596*x[0]**o + (-0.151870882368)*x[0] + (0.0769680654967)*x[1]**o + (0.0753839287898)*x[1]
            ref[(2, 0, 2, 1)]=0.357693070257-(0.131978849015)*(o-1.)
            arg[(2, 0, 2, 2)]=-0.582978820195*x[0]**o + (0.654860243366)*x[0] + (-0.63347458675)*x[1]**o + (-0.958641789417)*x[1]
            ref[(2, 0, 2, 2)]=-0.760117476498-(-0.202742234491)*(o-1.)
            arg[(2, 1, 0, 0)]=0.207800542358*x[0]**o + (-0.800841745785)*x[0] + (-0.827511194463)*x[1]**o + (-0.640202254746)*x[1]
            ref[(2, 1, 0, 0)]=-1.03037732632-(-0.103285108684)*(o-1.)
            arg[(2, 1, 0, 1)]=0.490179760011*x[0]**o + (0.812061439329)*x[0] + (0.756421367038)*x[1]**o + (0.162845128655)*x[1]
            ref[(2, 1, 0, 1)]=1.11075384752-(0.207766854508)*(o-1.)
            arg[(2, 1, 0, 2)]=0.410961157015*x[0]**o + (0.812602136493)*x[0] + (-0.967520051469)*x[1]**o + (0.871465326191)*x[1]
            ref[(2, 1, 0, 2)]=0.563754284115-(-0.0927598157424)*(o-1.)
            arg[(2, 1, 1, 0)]=-0.0295067131491*x[0]**o + (-0.896893525615)*x[0] + (-0.439653678559)*x[1]**o + (0.403222329579)*x[1]
            ref[(2, 1, 1, 0)]=-0.481415793872-(-0.0781933986181)*(o-1.)
            arg[(2, 1, 1, 1)]=-0.408483628466*x[0]**o + (-0.798908248853)*x[0] + (0.329792710349)*x[1]**o + (0.723840798865)*x[1]
            ref[(2, 1, 1, 1)]=-0.0768791840523-(-0.0131151530195)*(o-1.)
            arg[(2, 1, 1, 2)]=-0.939949160623*x[0]**o + (0.616473568811)*x[0] + (0.92933546487)*x[1]**o + (-0.955275030863)*x[1]
            ref[(2, 1, 1, 2)]=-0.174707578903-(-0.00176894929226)*(o-1.)
            arg[(2, 1, 2, 0)]=-0.0124881269393*x[0]**o + (0.243532953127)*x[0] + (-0.153673315302)*x[1]**o + (-0.240414744697)*x[1]
            ref[(2, 1, 2, 0)]=-0.0815216169056-(-0.0276935737069)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.13320954311*x[0]**o + (0.592295754878)*x[0] + (0.847821010184)*x[1]**o + (-0.931093886655)*x[1]
            ref[(2, 1, 2, 1)]=0.187906667649-(0.119101911179)*(o-1.)
            arg[(2, 1, 2, 2)]=0.638370936343*x[0]**o + (0.565181213117)*x[0] + (-0.96029923543)*x[1]**o + (-0.139687377872)*x[1]
            ref[(2, 1, 2, 2)]=0.0517827680793-(-0.0536547165145)*(o-1.)
            arg[(3, 0, 0, 0)]=-0.0563760379616*x[0]**o + (0.909401887187)*x[0] + (0.479424292464)*x[1]**o + (0.777359355409)*x[1]
            ref[(3, 0, 0, 0)]=1.05490474855-(0.0705080424171)*(o-1.)
            arg[(3, 0, 0, 1)]=-0.478356445959*x[0]**o + (-0.889065077281)*x[0] + (0.186071241617)*x[1]**o + (0.794799316378)*x[1]
            ref[(3, 0, 0, 1)]=-0.193275482622-(-0.0487142007236)*(o-1.)
            arg[(3, 0, 0, 2)]=-0.488165555685*x[0]**o + (0.201983464223)*x[0] + (-0.436943126126)*x[1]**o + (-0.11137785616)*x[1]
            ref[(3, 0, 0, 2)]=-0.417251536874-(-0.154184780302)*(o-1.)
            arg[(3, 0, 1, 0)]=-0.533342357254*x[0]**o + (0.300694133074)*x[0] + (-0.301740802765)*x[1]**o + (0.330869064872)*x[1]
            ref[(3, 0, 1, 0)]=-0.101759981036-(-0.13918052667)*(o-1.)
            arg[(3, 0, 1, 1)]=-0.294253423351*x[0]**o + (-0.830872055239)*x[0] + (-0.483716347814)*x[1]**o + (-0.762868998536)*x[1]
            ref[(3, 0, 1, 1)]=-1.18585541247-(-0.129661628527)*(o-1.)
            arg[(3, 0, 1, 2)]=0.22655466566*x[0]**o + (0.810314555166)*x[0] + (-0.182574475899)*x[1]**o + (0.18577205036)*x[1]
            ref[(3, 0, 1, 2)]=0.520033397643-(0.00733003162676)*(o-1.)
            arg[(3, 0, 2, 0)]=0.0950358407909*x[0]**o + (0.190502767889)*x[0] + (-0.428753704705)*x[1]**o + (-0.508989053665)*x[1]
            ref[(3, 0, 2, 0)]=-0.326102074845-(-0.0556196439856)*(o-1.)
            arg[(3, 0, 2, 1)]=-0.353805862822*x[0]**o + (-0.0532574054698)*x[0] + (0.727275629689)*x[1]**o + (-0.321990483489)*x[1]
            ref[(3, 0, 2, 1)]=-0.000889061046104-(0.0622449611444)*(o-1.)
            arg[(3, 0, 2, 2)]=-0.933888970269*x[0]**o + (-0.730480964758)*x[0] + (-0.477442921026)*x[1]**o + (0.42024806331)*x[1]
            ref[(3, 0, 2, 2)]=-0.860782396371-(-0.235221981882)*(o-1.)
            arg[(3, 1, 0, 0)]=0.0890809407802*x[0]**o + (-0.24327677472)*x[0] + (0.303800877938)*x[1]**o + (0.667959450805)*x[1]
            ref[(3, 1, 0, 0)]=0.408782247401-(0.0654803031197)*(o-1.)
            arg[(3, 1, 0, 1)]=0.342175730332*x[0]**o + (-0.0366737149937)*x[0] + (0.00629132211771)*x[1]**o + (-0.0995496635722)*x[1]
            ref[(3, 1, 0, 1)]=0.106121836942-(0.058077842075)*(o-1.)
            arg[(3, 1, 0, 2)]=0.984037892112*x[0]**o + (-0.253404538642)*x[0] + (0.0319445648035)*x[1]**o + (-0.311304364126)*x[1]
            ref[(3, 1, 0, 2)]=0.225636777073-(0.169330409486)*(o-1.)
            arg[(3, 1, 1, 0)]=-0.368905981161*x[0]**o + (-0.501484127579)*x[0] + (-0.0566721385646)*x[1]**o + (-0.752473988211)*x[1]
            ref[(3, 1, 1, 0)]=-0.839768117758-(-0.070929686621)*(o-1.)
            arg[(3, 1, 1, 1)]=0.839955550782*x[0]**o + (-0.835677742792)*x[0] + (-0.417983832912)*x[1]**o + (0.00405275059801)*x[1]
            ref[(3, 1, 1, 1)]=-0.204826637162-(0.070328619645)*(o-1.)
            arg[(3, 1, 1, 2)]=0.402170879449*x[0]**o + (0.285830312823)*x[0] + (0.631754326388)*x[1]**o + (-0.0989966638804)*x[1]
            ref[(3, 1, 1, 2)]=0.61037942739-(0.172320867639)*(o-1.)
            arg[(3, 1, 2, 0)]=0.223935443693*x[0]**o + (0.092814705674)*x[0] + (0.6866850568)*x[1]**o + (0.866075971142)*x[1]
            ref[(3, 1, 2, 0)]=0.934755588655-(0.151770083416)*(o-1.)
            arg[(3, 1, 2, 1)]=-0.287977742118*x[0]**o + (-0.61357775002)*x[0] + (0.0413928517675)*x[1]**o + (0.910303743063)*x[1]
            ref[(3, 1, 2, 1)]=0.0250705513464-(-0.041097481725)*(o-1.)
            arg[(3, 1, 2, 2)]=-0.0119039061903*x[0]**o + (0.255652724667)*x[0] + (0.751012316506)*x[1]**o + (-0.119121480727)*x[1]
            ref[(3, 1, 2, 2)]=0.437819827128-(0.123184735053)*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=-0.364766077898*x[0]**o + (0.0311728638925)*x[0] + (-0.428431218138)*x[1]**o + (-0.324520410927)*x[1] + (0.35013156665)*x[2]**o + (-0.957681647175)*x[2]
            ref[(0, 0, 0, 0)]=-0.847047461798-(-0.073844288231)*(o-1.)
            arg[(0, 0, 0, 1)]=0.917873477076*x[0]**o + (-0.186208344669)*x[0] + (0.316431078305)*x[1]**o + (0.365052711678)*x[1] + (0.0834995274508)*x[2]**o + (0.421061778333)*x[2]
            ref[(0, 0, 0, 1)]=0.958855114087-(0.219634013805)*(o-1.)
            arg[(0, 0, 0, 2)]=-0.598500138311*x[0]**o + (-0.872487369567)*x[0] + (-0.124867386428)*x[1]**o + (-0.105792124249)*x[1] + (-0.384561146709)*x[2]**o + (0.687777884179)*x[2]
            ref[(0, 0, 0, 2)]=-0.699215140542-(-0.184654778575)*(o-1.)
            arg[(0, 0, 1, 0)]=-0.0848850667178*x[0]**o + (-0.818883117332)*x[0] + (-0.870756301245)*x[1]**o + (-0.92392613569)*x[1] + (0.874143268343)*x[2]**o + (-0.619060891732)*x[2]
            ref[(0, 0, 1, 0)]=-1.22168412219-(-0.0135830166033)*(o-1.)
            arg[(0, 0, 1, 1)]=0.945219339373*x[0]**o + (-0.750163122272)*x[0] + (-0.68033219064)*x[1]**o + (0.0560323408835)*x[1] + (0.644120785034)*x[2]**o + (0.57337006838)*x[2]
            ref[(0, 0, 1, 1)]=0.39412361038-(0.151501322295)*(o-1.)
            arg[(0, 0, 1, 2)]=-0.697738229866*x[0]**o + (-0.0962249355458)*x[0] + (0.552903034539)*x[1]**o + (0.246386551835)*x[1] + (0.953933875884)*x[2]**o + (-0.278386184232)*x[2]
            ref[(0, 0, 1, 2)]=0.340437056308-(0.134849780093)*(o-1.)
            arg[(0, 0, 2, 0)]=0.614156571148*x[0]**o + (-0.391849220467)*x[0] + (-0.77286197156)*x[1]**o + (-0.292617333207)*x[1] + (-0.92834070489)*x[2]**o + (-0.624396815127)*x[2]
            ref[(0, 0, 2, 0)]=-1.19795473705-(-0.181174350884)*(o-1.)
            arg[(0, 0, 2, 1)]=-0.984494839556*x[0]**o + (0.303401202434)*x[0] + (-0.311998669352)*x[1]**o + (-0.17953173452)*x[1] + (-0.185412131412)*x[2]**o + (0.530370329561)*x[2]
            ref[(0, 0, 2, 1)]=-0.413832921423-(-0.246984273387)*(o-1.)
            arg[(0, 0, 2, 2)]=-0.625328358854*x[0]**o + (-0.645627818027)*x[0] + (0.466221707241)*x[1]**o + (0.0969459505148)*x[1] + (0.816210753936)*x[2]**o + (0.973970288451)*x[2]
            ref[(0, 0, 2, 2)]=0.541196261631-(0.109517350387)*(o-1.)
            arg[(0, 1, 0, 0)]=-0.972352274466*x[0]**o + (-0.243723657435)*x[0] + (0.165604148143)*x[1]**o + (-0.0132442628497)*x[1] + (0.815421399363)*x[2]**o + (0.709487569461)*x[2]
            ref[(0, 1, 0, 0)]=0.230596461108-(0.00144554550661)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.716663813799*x[0]**o + (0.183159150772)*x[0] + (0.875748867419)*x[1]**o + (0.432373218847)*x[1] + (-0.0335855614949)*x[2]**o + (-0.894175052153)*x[2]
            ref[(0, 1, 0, 1)]=-0.0765715952043-(0.0209165820208)*(o-1.)
            arg[(0, 1, 0, 2)]=0.234083795882*x[0]**o + (-0.764205348592)*x[0] + (0.383151940067)*x[1]**o + (0.6684739109)*x[1] + (0.410923582765)*x[2]**o + (0.0431982948022)*x[2]
            ref[(0, 1, 0, 2)]=0.487813087912-(0.171359886452)*(o-1.)
            arg[(0, 1, 1, 0)]=-0.508505622609*x[0]**o + (-0.453494700091)*x[0] + (0.499602093925)*x[1]**o + (0.0348763404227)*x[1] + (-0.389848652444)*x[2]**o + (0.383379503111)*x[2]
            ref[(0, 1, 1, 0)]=-0.216995518843-(-0.0664586968548)*(o-1.)
            arg[(0, 1, 1, 1)]=-0.254159432334*x[0]**o + (0.986249215221)*x[0] + (-0.664197188157)*x[1]**o + (-0.657041594809)*x[1] + (0.248657161545)*x[2]**o + (0.876399240915)*x[2]
            ref[(0, 1, 1, 1)]=0.267953701191-(-0.111616576491)*(o-1.)
            arg[(0, 1, 1, 2)]=-0.617173172286*x[0]**o + (-0.82079417309)*x[0] + (0.941181828922)*x[1]**o + (0.440384784682)*x[1] + (-0.969517063619)*x[2]**o + (-0.290064910581)*x[2]
            ref[(0, 1, 1, 2)]=-0.657991352986-(-0.107584734497)*(o-1.)
            arg[(0, 1, 2, 0)]=-0.0515652975478*x[0]**o + (0.281697528714)*x[0] + (0.882699241603)*x[1]**o + (-0.72672274541)*x[1] + (0.15545907572)*x[2]**o + (-0.0675349416714)*x[2]
            ref[(0, 1, 2, 0)]=0.237016430704-(0.164432169963)*(o-1.)
            arg[(0, 1, 2, 1)]=-0.836135113075*x[0]**o + (-0.361650103225)*x[0] + (-0.84576704347)*x[1]**o + (-0.442057033589)*x[1] + (-0.654119545003)*x[2]**o + (0.640550875033)*x[2]
            ref[(0, 1, 2, 1)]=-1.24958898166-(-0.389336950258)*(o-1.)
            arg[(0, 1, 2, 2)]=-0.719933366128*x[0]**o + (-0.181648876021)*x[0] + (0.557878050198)*x[1]**o + (0.565813105658)*x[1] + (-0.190618310003)*x[2]**o + (0.991024637689)*x[2]
            ref[(0, 1, 2, 2)]=0.511257620696-(-0.0587789376555)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.369913892818*x[0]**o + (-0.994594805727)*x[0] + (-0.848158410747)*x[1]**o + (0.129188514475)*x[1] + (-0.515547019878)*x[2]**o + (0.946397185283)*x[2]
            ref[(1, 0, 0, 0)]=-0.826314214707-(-0.288936553907)*(o-1.)
            arg[(1, 0, 0, 1)]=-0.222959133497*x[0]**o + (0.780239542857)*x[0] + (-0.66236467244)*x[1]**o + (0.076984558559)*x[1] + (0.220440403989)*x[2]**o + (0.920867200659)*x[2]
            ref[(1, 0, 0, 1)]=0.556603950064-(-0.110813900325)*(o-1.)
            arg[(1, 0, 0, 2)]=-0.0356516971106*x[0]**o + (0.0784181048641)*x[0] + (0.607619120854)*x[1]**o + (0.329067103338)*x[1] + (-0.917262893526)*x[2]**o + (-0.468881870402)*x[2]
            ref[(1, 0, 0, 2)]=-0.203346065991-(-0.0575492449638)*(o-1.)
            arg[(1, 0, 1, 0)]=0.331561724239*x[0]**o + (0.418637729303)*x[0] + (0.310431066804)*x[1]**o + (0.147683025315)*x[1] + (0.0831318334564)*x[2]**o + (0.707766516822)*x[2]
            ref[(1, 0, 1, 0)]=0.999605947969-(0.120854104083)*(o-1.)
            arg[(1, 0, 1, 1)]=0.362192978723*x[0]**o + (-0.122233254811)*x[0] + (0.928749382535)*x[1]**o + (-0.935634658701)*x[1] + (0.0458622284449)*x[2]**o + (0.395875882325)*x[2]
            ref[(1, 0, 1, 1)]=0.337406279258-(0.22280076495)*(o-1.)
            arg[(1, 0, 1, 2)]=-0.00517824364307*x[0]**o + (-0.450026436608)*x[0] + (0.819485859782)*x[1]**o + (0.672853905134)*x[1] + (-0.903600310108)*x[2]**o + (-0.745106972982)*x[2]
            ref[(1, 0, 1, 2)]=-0.305786099212-(-0.0148821156615)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.97406600317*x[0]**o + (-0.436392933149)*x[0] + (0.466669004327)*x[1]**o + (0.0282540717099)*x[1] + (-0.551263645499)*x[2]**o + (-0.994604629542)*x[2]
            ref[(1, 0, 2, 0)]=-1.23070206766-(-0.176443440723)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.22087539186*x[0]**o + (-0.648893229362)*x[0] + (0.0750274092781)*x[1]**o + (0.720402460865)*x[1] + (0.23891741266)*x[2]**o + (0.372649508684)*x[2]
            ref[(1, 0, 2, 1)]=0.268614085133-(0.0155115716797)*(o-1.)
            arg[(1, 0, 2, 2)]=0.10668139365*x[0]**o + (-0.904781691611)*x[0] + (-0.0325941243048)*x[1]**o + (0.790663359582)*x[1] + (-0.606272897847)*x[2]**o + (-0.00430958599828)*x[2]
            ref[(1, 0, 2, 2)]=-0.325306773265-(-0.0886976047504)*(o-1.)
            arg[(1, 1, 0, 0)]=-0.262764614935*x[0]**o + (0.320677209621)*x[0] + (0.427808019957)*x[1]**o + (-0.996991374204)*x[1] + (0.609117744464)*x[2]**o + (0.915896238133)*x[2]
            ref[(1, 1, 0, 0)]=0.506871611518-(0.129026858248)*(o-1.)
            arg[(1, 1, 0, 1)]=0.0601635563855*x[0]**o + (0.148610372875)*x[0] + (0.840604418442)*x[1]**o + (-0.355084562134)*x[1] + (0.212398461165)*x[2]**o + (-0.706917272758)*x[2]
            ref[(1, 1, 0, 1)]=0.0998874869878-(0.185527739332)*(o-1.)
            arg[(1, 1, 0, 2)]=-0.301345927838*x[0]**o + (-0.879923078821)*x[0] + (0.385721094784)*x[1]**o + (-0.0116081304225)*x[1] + (-0.925679174728)*x[2]**o + (-0.0701355505848)*x[2]
            ref[(1, 1, 0, 2)]=-0.901485383805-(-0.14021733463)*(o-1.)
            arg[(1, 1, 1, 0)]=-0.78107143692*x[0]**o + (-0.657613793249)*x[0] + (0.415215174891)*x[1]**o + (-0.115325955686)*x[1] + (0.672384264795)*x[2]**o + (0.0175556403526)*x[2]
            ref[(1, 1, 1, 0)]=-0.224428052908-(0.0510880004609)*(o-1.)
            arg[(1, 1, 1, 1)]=-0.195517128503*x[0]**o + (0.183202626486)*x[0] + (-0.69014422673)*x[1]**o + (-0.0919132735037)*x[1] + (-0.12828705856)*x[2]**o + (0.184386098654)*x[2]
            ref[(1, 1, 1, 1)]=-0.369136481078-(-0.168991402299)*(o-1.)
            arg[(1, 1, 1, 2)]=0.226911677848*x[0]**o + (-0.404093661192)*x[0] + (-0.0681377108264)*x[1]**o + (-0.61047381688)*x[1] + (-0.314907892237)*x[2]**o + (0.714132252636)*x[2]
            ref[(1, 1, 1, 2)]=-0.228284575325-(-0.0260223208691)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.433707428951*x[0]**o + (-0.991219403441)*x[0] + (0.259524683889)*x[1]**o + (0.820665846026)*x[1] + (-0.804927845828)*x[2]**o + (0.209098547146)*x[2]
            ref[(1, 1, 2, 0)]=-0.47028280058-(-0.163185098482)*(o-1.)
            arg[(1, 1, 2, 1)]=0.874652234592*x[0]**o + (-0.472633148216)*x[0] + (0.900013084418)*x[1]**o + (0.457281242758)*x[1] + (-0.533357706553)*x[2]**o + (-0.120422346048)*x[2]
            ref[(1, 1, 2, 1)]=0.552766680475-(0.206884602076)*(o-1.)
            arg[(1, 1, 2, 2)]=-0.566625932247*x[0]**o + (-0.672517299436)*x[0] + (-0.12022486784)*x[1]**o + (-0.860363726608)*x[1] + (0.0161007414633)*x[2]**o + (-0.911646134923)*x[2]
            ref[(1, 1, 2, 2)]=-1.5576386098-(-0.111791676437)*(o-1.)
            arg[(2, 0, 0, 0)]=-0.851756439024*x[0]**o + (0.215737081409)*x[0] + (-0.424437047132)*x[1]**o + (-0.647034081462)*x[1] + (0.47383144592)*x[2]**o + (0.0663569730688)*x[2]
            ref[(2, 0, 0, 0)]=-0.58365103361-(-0.133727006706)*(o-1.)
            arg[(2, 0, 0, 1)]=0.851152606614*x[0]**o + (0.684959962689)*x[0] + (0.436461701813)*x[1]**o + (0.978806552819)*x[1] + (0.82188593848)*x[2]**o + (0.918858325715)*x[2]
            ref[(2, 0, 0, 1)]=2.34606254407-(0.351583374485)*(o-1.)
            arg[(2, 0, 0, 2)]=0.766550528449*x[0]**o + (0.294911212124)*x[0] + (-0.192531426744)*x[1]**o + (0.826255459266)*x[1] + (-0.781259567962)*x[2]**o + (0.948478922474)*x[2]
            ref[(2, 0, 0, 2)]=0.931202563804-(-0.0345400777095)*(o-1.)
            arg[(2, 0, 1, 0)]=-0.918036385595*x[0]**o + (-0.00812779588224)*x[0] + (0.890909195843)*x[1]**o + (0.553849182746)*x[1] + (0.205001177467)*x[2]**o + (-0.701731029956)*x[2]
            ref[(2, 0, 1, 0)]=0.010932172312-(0.0296456646193)*(o-1.)
            arg[(2, 0, 1, 1)]=0.775768557221*x[0]**o + (0.575781869682)*x[0] + (-0.152624529884)*x[1]**o + (-0.471686925102)*x[1] + (0.200665211136)*x[2]**o + (0.99231575585)*x[2]
            ref[(2, 0, 1, 1)]=0.960109969451-(0.137301539745)*(o-1.)
            arg[(2, 0, 1, 2)]=0.378410655864*x[0]**o + (0.0465749409732)*x[0] + (0.893861814342)*x[1]**o + (-0.519456461491)*x[1] + (-0.904908395516)*x[2]**o + (-0.529025791086)*x[2]
            ref[(2, 0, 1, 2)]=-0.317271618457-(0.0612273457817)*(o-1.)
            arg[(2, 0, 2, 0)]=0.904422118196*x[0]**o + (0.767457786226)*x[0] + (-0.747782138138)*x[1]**o + (-0.589147415944)*x[1] + (-0.87692831689)*x[2]**o + (0.912898020127)*x[2]
            ref[(2, 0, 2, 0)]=0.185460026788-(-0.120048056139)*(o-1.)
            arg[(2, 0, 2, 1)]=0.977883570926*x[0]**o + (-0.716428496778)*x[0] + (0.410098254792)*x[1]**o + (0.876094641057)*x[1] + (-0.00766334055079)*x[2]**o + (-0.411758278401)*x[2]
            ref[(2, 0, 2, 1)]=0.564113175522-(0.230053080861)*(o-1.)
            arg[(2, 0, 2, 2)]=-0.502766225311*x[0]**o + (0.751412130741)*x[0] + (-0.601605980896)*x[1]**o + (-0.211927822548)*x[1] + (0.370667299005)*x[2]**o + (-0.407684982803)*x[2]
            ref[(2, 0, 2, 2)]=-0.300952790906-(-0.1222841512)*(o-1.)
            arg[(2, 1, 0, 0)]=-0.702649746212*x[0]**o + (-0.293823356839)*x[0] + (-0.0385161192123)*x[1]**o + (-0.767106828678)*x[1] + (0.683687514202)*x[2]**o + (0.253172874297)*x[2]
            ref[(2, 1, 0, 0)]=-0.432617831221-(-0.00957972520372)*(o-1.)
            arg[(2, 1, 0, 1)]=0.640653797207*x[0]**o + (-0.183394009587)*x[0] + (0.724446618102)*x[1]**o + (-0.551564101555)*x[1] + (0.738163411619)*x[2]**o + (0.571934975236)*x[2]
            ref[(2, 1, 0, 1)]=0.970120345511-(0.350543971155)*(o-1.)
            arg[(2, 1, 0, 2)]=0.810320625539*x[0]**o + (-0.0561506185554)*x[0] + (-0.423984683345)*x[1]**o + (0.912879512882)*x[1] + (0.56469576868)*x[2]**o + (-0.152308640728)*x[2]
            ref[(2, 1, 0, 2)]=0.827725982236-(0.158505285146)*(o-1.)
            arg[(2, 1, 1, 0)]=-0.443493337758*x[0]**o + (-0.752290783682)*x[0] + (0.259446952652)*x[1]**o + (-0.422209745409)*x[1] + (0.498435956027)*x[2]**o + (0.353560264071)*x[2]
            ref[(2, 1, 1, 0)]=-0.253275347049-(0.0523982618202)*(o-1.)
            arg[(2, 1, 1, 1)]=0.626532157072*x[0]**o + (0.925286881614)*x[0] + (0.579888384887)*x[1]**o + (-0.0237519017984)*x[1] + (-0.657902804008)*x[2]**o + (-0.29719899882)*x[2]
            ref[(2, 1, 1, 1)]=0.576426859473-(0.0914196229918)*(o-1.)
            arg[(2, 1, 1, 2)]=-0.00692843605327*x[0]**o + (-0.750374670939)*x[0] + (-0.323914048309)*x[1]**o + (0.0258885723305)*x[1] + (-0.505849552964)*x[2]**o + (-0.684368700679)*x[2]
            ref[(2, 1, 1, 2)]=-1.12277341831-(-0.139448672888)*(o-1.)
            arg[(2, 1, 2, 0)]=0.597454601586*x[0]**o + (-0.568873307516)*x[0] + (-0.075452345074)*x[1]**o + (0.634239500127)*x[1] + (-0.178206137178)*x[2]**o + (0.288222106538)*x[2]
            ref[(2, 1, 2, 0)]=0.348692209242-(0.0572993532224)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.489604931777*x[0]**o + (-0.0142010455337)*x[0] + (-0.666318342592)*x[1]**o + (0.236653752745)*x[1] + (-0.104830770344)*x[2]**o + (-0.0376422762867)*x[2]
            ref[(2, 1, 2, 1)]=-0.537971806895-(-0.210125674119)*(o-1.)
            arg[(2, 1, 2, 2)]=0.396634277386*x[0]**o + (0.0782193273246)*x[0] + (0.436494304447)*x[1]**o + (-0.215771529885)*x[1] + (-0.348864409293)*x[2]**o + (-0.73303681513)*x[2]
            ref[(2, 1, 2, 2)]=-0.193162422575-(0.0807106954233)*(o-1.)
            arg[(3, 0, 0, 0)]=0.727795771762*x[0]**o + (0.415697490012)*x[0] + (0.433036765001)*x[1]**o + (-0.923021109821)*x[1] + (0.545284061741)*x[2]**o + (-0.236060188182)*x[2]
            ref[(3, 0, 0, 0)]=0.481366395257-(0.284352766417)*(o-1.)
            arg[(3, 0, 0, 1)]=-0.673349217803*x[0]**o + (0.649618859044)*x[0] + (0.513381508059)*x[1]**o + (-0.147049249262)*x[1] + (0.911237845185)*x[2]**o + (-0.147739428642)*x[2]
            ref[(3, 0, 0, 1)]=0.55305015829-(0.12521168924)*(o-1.)
            arg[(3, 0, 0, 2)]=-0.403695427616*x[0]**o + (0.486903479491)*x[0] + (-0.309883667376)*x[1]**o + (-0.798392447591)*x[1] + (-0.353535385405)*x[2]**o + (0.937741105269)*x[2]
            ref[(3, 0, 0, 2)]=-0.220431171614-(-0.177852413399)*(o-1.)
            arg[(3, 0, 1, 0)]=-0.839442443902*x[0]**o + (-0.63934650707)*x[0] + (-0.338629870613)*x[1]**o + (-0.050253751271)*x[1] + (-0.726220300631)*x[2]**o + (-0.22213808153)*x[2]
            ref[(3, 0, 1, 0)]=-1.40801547751-(-0.317382102524)*(o-1.)
            arg[(3, 0, 1, 1)]=-0.454586566313*x[0]**o + (0.531269297281)*x[0] + (0.230611849827)*x[1]**o + (0.582038232359)*x[1] + (-0.138313985027)*x[2]**o + (-0.54420373478)*x[2]
            ref[(3, 0, 1, 1)]=0.103407546674-(-0.0603814502522)*(o-1.)
            arg[(3, 0, 1, 2)]=0.868110978727*x[0]**o + (-0.422140672223)*x[0] + (0.00818920375542)*x[1]**o + (-0.843960856115)*x[1] + (0.698685400958)*x[2]**o + (-0.85704403654)*x[2]
            ref[(3, 0, 1, 2)]=-0.274079990719-(0.26249759724)*(o-1.)
            arg[(3, 0, 2, 0)]=0.501155492229*x[0]**o + (-0.347741520583)*x[0] + (-0.330398466688)*x[1]**o + (-0.869120488255)*x[1] + (-0.251871422414)*x[2]**o + (-0.620357345252)*x[2]
            ref[(3, 0, 2, 0)]=-0.959166875481-(-0.0135190661455)*(o-1.)
            arg[(3, 0, 2, 1)]=-0.298759427619*x[0]**o + (-0.615165657876)*x[0] + (-0.00543198054467)*x[1]**o + (0.723510982283)*x[1] + (0.645456961212)*x[2]**o + (-0.153086487682)*x[2]
            ref[(3, 0, 2, 1)]=0.148262194887-(0.0568775921747)*(o-1.)
            arg[(3, 0, 2, 2)]=-0.790677814587*x[0]**o + (0.621202155857)*x[0] + (-0.699124684766)*x[1]**o + (-0.0235090178428)*x[1] + (-0.347078076332)*x[2]**o + (-0.0750084328834)*x[2]
            ref[(3, 0, 2, 2)]=-0.657097935277-(-0.306146762614)*(o-1.)
            arg[(3, 1, 0, 0)]=0.578560237296*x[0]**o + (-0.101611625433)*x[0] + (0.800201931637)*x[1]**o + (0.340955018461)*x[1] + (-0.309843769656)*x[2]**o + (-0.232040490665)*x[2]
            ref[(3, 1, 0, 0)]=0.53811065082-(0.178153066546)*(o-1.)
            arg[(3, 1, 0, 1)]=0.913223184154*x[0]**o + (-0.51766721756)*x[0] + (-0.485000233212)*x[1]**o + (0.755836608439)*x[1] + (0.526818391627)*x[2]**o + (-0.994531547977)*x[2]
            ref[(3, 1, 0, 1)]=0.0993395927355-(0.159173557095)*(o-1.)
            arg[(3, 1, 0, 2)]=-0.663465876838*x[0]**o + (-0.328313828168)*x[0] + (-0.93478652711)*x[1]**o + (-0.395506393106)*x[1] + (0.735731760503)*x[2]**o + (0.00271295257711)*x[2]
            ref[(3, 1, 0, 2)]=-0.791813956071-(-0.143753440574)*(o-1.)
            arg[(3, 1, 1, 0)]=0.251830271654*x[0]**o + (0.929538077915)*x[0] + (-0.0320847651416)*x[1]**o + (0.433244735231)*x[1] + (-0.170880523898)*x[2]**o + (-0.409116103201)*x[2]
            ref[(3, 1, 1, 0)]=0.50126584628-(0.00814416376902)*(o-1.)
            arg[(3, 1, 1, 1)]=0.333214753532*x[0]**o + (0.129423824192)*x[0] + (0.117172314694)*x[1]**o + (0.997779416402)*x[1] + (0.977137353397)*x[2]**o + (0.162549717159)*x[2]
            ref[(3, 1, 1, 1)]=1.35863868969-(0.237920736937)*(o-1.)
            arg[(3, 1, 1, 2)]=-0.756941279896*x[0]**o + (0.63307625079)*x[0] + (0.548754477649)*x[1]**o + (-0.558096504761)*x[1] + (0.301689016021)*x[2]**o + (-0.762024100081)*x[2]
            ref[(3, 1, 1, 2)]=-0.296771070139-(0.0155837022957)*(o-1.)
            arg[(3, 1, 2, 0)]=-0.879719514245*x[0]**o + (0.2115962301)*x[0] + (-0.393556814009)*x[1]**o + (-0.864899767029)*x[1] + (-0.534836396774)*x[2]**o + (0.929702475339)*x[2]
            ref[(3, 1, 2, 0)]=-0.765856893309-(-0.301352120838)*(o-1.)
            arg[(3, 1, 2, 1)]=-0.72307979968*x[0]**o + (0.231018152105)*x[0] + (-0.362187569826)*x[1]**o + (0.603830516451)*x[1] + (0.682901315621)*x[2]**o + (0.0521470626589)*x[2]
            ref[(3, 1, 2, 1)]=0.242314838665-(-0.067061008981)*(o-1.)
            arg[(3, 1, 2, 2)]=0.696088226452*x[0]**o + (0.504691945168)*x[0] + (-0.319513008968)*x[1]**o + (-0.653729471431)*x[1] + (0.263621220878)*x[2]**o + (-0.503546616801)*x[2]
            ref[(3, 1, 2, 2)]=-0.0061938523512-(0.106699406394)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.557661969402*x[0] + (-0.483794575726)*x[1]
            ref=0.0369336968381
        else:
            arg=-0.505991425307*x[0] + (-0.290414428839)*x[1] + (-0.323653831697)*x[2]
            ref=-0.560029842921
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.830705208778*x[0] + (0.166853652662)*x[1]
            ref[(0,)]=-0.331925778058
            arg[(1,)]=0.00263506025011*x[0] + (0.882684696622)*x[1]
            ref[(1,)]=0.442659878436
            arg[(2,)]=0.113288743824*x[0] + (0.119490144263)*x[1]
            ref[(2,)]=0.116389444044
            arg[(3,)]=0.0621060365372*x[0] + (-0.177287855888)*x[1]
            ref[(3,)]=-0.0575909096754
        else:
            arg[(0,)]=-0.92128816614*x[0] + (-0.475851284073)*x[1] + (0.27725525507)*x[2]
            ref[(0,)]=-0.559942097571
            arg[(1,)]=0.386560330002*x[0] + (-0.368397250102)*x[1] + (-0.280441313946)*x[2]
            ref[(1,)]=-0.131139117023
            arg[(2,)]=-0.417834374976*x[0] + (-0.791158997807)*x[1] + (0.403457652536)*x[2]
            ref[(2,)]=-0.402767860123
            arg[(3,)]=-0.792224396622*x[0] + (0.565265115724)*x[1] + (0.641342668181)*x[2]
            ref[(3,)]=0.207191693642
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.913652795072*x[0] + (-0.551147462383)*x[1]
            ref[(0, 0)]=0.181252666344
            arg[(0, 1)]=0.184588532682*x[0] + (0.271545677841)*x[1]
            ref[(0, 1)]=0.228067105261
            arg[(1, 0)]=0.13441892922*x[0] + (-0.923740007416)*x[1]
            ref[(1, 0)]=-0.394660539098
            arg[(1, 1)]=-0.467571007015*x[0] + (0.195271690719)*x[1]
            ref[(1, 1)]=-0.136149658148
            arg[(2, 0)]=-0.236184509335*x[0] + (-0.682407851939)*x[1]
            ref[(2, 0)]=-0.459296180637
            arg[(2, 1)]=-0.831002192206*x[0] + (0.621604518458)*x[1]
            ref[(2, 1)]=-0.104698836874
            arg[(3, 0)]=-0.0696642295929*x[0] + (0.199373125104)*x[1]
            ref[(3, 0)]=0.0648544477553
            arg[(3, 1)]=-0.980062157618*x[0] + (0.638403029277)*x[1]
            ref[(3, 1)]=-0.17082956417
        else:
            arg[(0, 0)]=0.434312704345*x[0] + (-0.0616220206247)*x[1] + (-0.182682579184)*x[2]
            ref[(0, 0)]=0.0950040522683
            arg[(0, 1)]=0.49041086859*x[0] + (-0.798397226434)*x[1] + (-0.387254198488)*x[2]
            ref[(0, 1)]=-0.347620278166
            arg[(1, 0)]=-0.613235959887*x[0] + (-0.133393854098)*x[1] + (0.737756671792)*x[2]
            ref[(1, 0)]=-0.00443657109659
            arg[(1, 1)]=0.800296205405*x[0] + (-0.995168719472)*x[1] + (0.448979033525)*x[2]
            ref[(1, 1)]=0.127053259729
            arg[(2, 0)]=-0.200474520325*x[0] + (0.116977980356)*x[1] + (-0.187284171876)*x[2]
            ref[(2, 0)]=-0.135390355923
            arg[(2, 1)]=-0.094965576268*x[0] + (-0.338040923634)*x[1] + (0.897630329725)*x[2]
            ref[(2, 1)]=0.232311914912
            arg[(3, 0)]=0.322557198737*x[0] + (-0.916444388464)*x[1] + (0.525041004463)*x[2]
            ref[(3, 0)]=-0.0344230926326
            arg[(3, 1)]=-0.0308609988448*x[0] + (-0.656486247214)*x[1] + (0.559207713766)*x[2]
            ref[(3, 1)]=-0.0640697661464
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3),w)
        ref=numpy.zeros((3, 2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.853799222078*x[0] + (0.86827177609)*x[1]
            ref[(0, 0, 0)]=0.00723627700632
            arg[(0, 0, 1)]=0.75264616646*x[0] + (0.114259909121)*x[1]
            ref[(0, 0, 1)]=0.433453037791
            arg[(0, 0, 2)]=-0.781394251418*x[0] + (-0.555844334507)*x[1]
            ref[(0, 0, 2)]=-0.668619292963
            arg[(0, 1, 0)]=0.982888491294*x[0] + (-0.199721158165)*x[1]
            ref[(0, 1, 0)]=0.391583666565
            arg[(0, 1, 1)]=0.625079213542*x[0] + (-0.55922653073)*x[1]
            ref[(0, 1, 1)]=0.0329263414057
            arg[(0, 1, 2)]=0.269631642232*x[0] + (0.422210057313)*x[1]
            ref[(0, 1, 2)]=0.345920849773
            arg[(1, 0, 0)]=-0.305672618382*x[0] + (0.63243867011)*x[1]
            ref[(1, 0, 0)]=0.163383025864
            arg[(1, 0, 1)]=-0.820236513763*x[0] + (0.0555809178219)*x[1]
            ref[(1, 0, 1)]=-0.38232779797
            arg[(1, 0, 2)]=0.0345015356582*x[0] + (0.635923062461)*x[1]
            ref[(1, 0, 2)]=0.33521229906
            arg[(1, 1, 0)]=-0.0617387134578*x[0] + (0.489713907934)*x[1]
            ref[(1, 1, 0)]=0.213987597238
            arg[(1, 1, 1)]=-0.713675761903*x[0] + (0.709300891795)*x[1]
            ref[(1, 1, 1)]=-0.0021874350542
            arg[(1, 1, 2)]=0.876295040307*x[0] + (-0.833532369446)*x[1]
            ref[(1, 1, 2)]=0.0213813354302
            arg[(2, 0, 0)]=0.373781397278*x[0] + (0.43467746071)*x[1]
            ref[(2, 0, 0)]=0.404229428994
            arg[(2, 0, 1)]=0.567180695412*x[0] + (0.688271186532)*x[1]
            ref[(2, 0, 1)]=0.627725940972
            arg[(2, 0, 2)]=0.568690747036*x[0] + (0.71116731124)*x[1]
            ref[(2, 0, 2)]=0.639929029138
            arg[(2, 1, 0)]=0.0604498201576*x[0] + (0.757070485443)*x[1]
            ref[(2, 1, 0)]=0.4087601528
            arg[(2, 1, 1)]=0.23847832016*x[0] + (0.11848874083)*x[1]
            ref[(2, 1, 1)]=0.178483530495
            arg[(2, 1, 2)]=0.906264091689*x[0] + (0.818403801518)*x[1]
            ref[(2, 1, 2)]=0.862333946603
        else:
            arg[(0, 0, 0)]=-0.055787496598*x[0] + (0.262961622209)*x[1] + (-0.814283252016)*x[2]
            ref[(0, 0, 0)]=-0.303554563202
            arg[(0, 0, 1)]=-0.760280513308*x[0] + (0.408576384702)*x[1] + (-0.756625221266)*x[2]
            ref[(0, 0, 1)]=-0.554164674936
            arg[(0, 0, 2)]=0.584506921627*x[0] + (-0.224330049086)*x[1] + (-0.683878172768)*x[2]
            ref[(0, 0, 2)]=-0.161850650114
            arg[(0, 1, 0)]=0.852885614178*x[0] + (0.103754031653)*x[1] + (0.477103541993)*x[2]
            ref[(0, 1, 0)]=0.716871593912
            arg[(0, 1, 1)]=-0.965447816018*x[0] + (0.378562452993)*x[1] + (-0.615277553458)*x[2]
            ref[(0, 1, 1)]=-0.601081458241
            arg[(0, 1, 2)]=-0.30882574824*x[0] + (-0.628210720118)*x[1] + (-0.396183738583)*x[2]
            ref[(0, 1, 2)]=-0.66661010347
            arg[(1, 0, 0)]=-0.0188612119813*x[0] + (0.94523184345)*x[1] + (-0.412405551916)*x[2]
            ref[(1, 0, 0)]=0.256982539776
            arg[(1, 0, 1)]=-0.403179014579*x[0] + (-0.421766101024)*x[1] + (0.741410619744)*x[2]
            ref[(1, 0, 1)]=-0.0417672479297
            arg[(1, 0, 2)]=-0.376475291564*x[0] + (0.240566531728)*x[1] + (0.834418152565)*x[2]
            ref[(1, 0, 2)]=0.349254696365
            arg[(1, 1, 0)]=0.801377436896*x[0] + (-0.28661021689)*x[1] + (-0.9718134899)*x[2]
            ref[(1, 1, 0)]=-0.228523134947
            arg[(1, 1, 1)]=-0.997146953479*x[0] + (0.596797822744)*x[1] + (-0.55269818229)*x[2]
            ref[(1, 1, 1)]=-0.476523656512
            arg[(1, 1, 2)]=-0.803549081701*x[0] + (0.538789650298)*x[1] + (0.957536522749)*x[2]
            ref[(1, 1, 2)]=0.346388545673
            arg[(2, 0, 0)]=-0.515206135218*x[0] + (-0.365711343289)*x[1] + (0.717825348276)*x[2]
            ref[(2, 0, 0)]=-0.0815460651155
            arg[(2, 0, 1)]=0.638499315108*x[0] + (0.220213740845)*x[1] + (-0.0793445530763)*x[2]
            ref[(2, 0, 1)]=0.389684251438
            arg[(2, 0, 2)]=0.966381951386*x[0] + (-0.323303266063)*x[1] + (-0.588637499089)*x[2]
            ref[(2, 0, 2)]=0.0272205931172
            arg[(2, 1, 0)]=0.57871599751*x[0] + (-0.970698874822)*x[1] + (-0.471569865119)*x[2]
            ref[(2, 1, 0)]=-0.431776371215
            arg[(2, 1, 1)]=0.411464804568*x[0] + (-0.287427746402)*x[1] + (0.455943753978)*x[2]
            ref[(2, 1, 1)]=0.289990406072
            arg[(2, 1, 2)]=0.0898148551833*x[0] + (0.00561332005964)*x[1] + (-0.953209313697)*x[2]
            ref[(2, 1, 2)]=-0.428890569227
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 3),w)
        ref=numpy.zeros((4, 4, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.523137247607*x[0] + (-0.789843411297)*x[1]
            ref[(0, 0, 0, 0)]=-0.656490329452
            arg[(0, 0, 0, 1)]=0.973753404493*x[0] + (0.600038688241)*x[1]
            ref[(0, 0, 0, 1)]=0.786896046367
            arg[(0, 0, 0, 2)]=-0.347373970877*x[0] + (0.246367784379)*x[1]
            ref[(0, 0, 0, 2)]=-0.0505030932489
            arg[(0, 0, 1, 0)]=-0.879813158557*x[0] + (0.0592176125521)*x[1]
            ref[(0, 0, 1, 0)]=-0.410297773003
            arg[(0, 0, 1, 1)]=-0.30065915413*x[0] + (-0.987879939127)*x[1]
            ref[(0, 0, 1, 1)]=-0.644269546628
            arg[(0, 0, 1, 2)]=-0.0746156209979*x[0] + (0.530497830553)*x[1]
            ref[(0, 0, 1, 2)]=0.227941104777
            arg[(0, 0, 2, 0)]=-0.067769545792*x[0] + (-0.915760459738)*x[1]
            ref[(0, 0, 2, 0)]=-0.491765002765
            arg[(0, 0, 2, 1)]=-0.353707294781*x[0] + (0.858627339858)*x[1]
            ref[(0, 0, 2, 1)]=0.252460022538
            arg[(0, 0, 2, 2)]=-0.153648332251*x[0] + (0.821280753608)*x[1]
            ref[(0, 0, 2, 2)]=0.333816210678
            arg[(0, 1, 0, 0)]=0.0732349968964*x[0] + (-0.99395029103)*x[1]
            ref[(0, 1, 0, 0)]=-0.460357647067
            arg[(0, 1, 0, 1)]=0.940097136447*x[0] + (-0.0656340673814)*x[1]
            ref[(0, 1, 0, 1)]=0.437231534533
            arg[(0, 1, 0, 2)]=-0.931399831805*x[0] + (0.854491995714)*x[1]
            ref[(0, 1, 0, 2)]=-0.0384539180456
            arg[(0, 1, 1, 0)]=0.402479126688*x[0] + (-0.732004486276)*x[1]
            ref[(0, 1, 1, 0)]=-0.164762679794
            arg[(0, 1, 1, 1)]=-0.683648425035*x[0] + (-0.938224679743)*x[1]
            ref[(0, 1, 1, 1)]=-0.810936552389
            arg[(0, 1, 1, 2)]=0.911426451998*x[0] + (-0.854280021353)*x[1]
            ref[(0, 1, 1, 2)]=0.0285732153227
            arg[(0, 1, 2, 0)]=-0.328935417234*x[0] + (0.995078477143)*x[1]
            ref[(0, 1, 2, 0)]=0.333071529954
            arg[(0, 1, 2, 1)]=0.246694010647*x[0] + (0.026357556747)*x[1]
            ref[(0, 1, 2, 1)]=0.136525783697
            arg[(0, 1, 2, 2)]=-0.880587145689*x[0] + (-0.960850649406)*x[1]
            ref[(0, 1, 2, 2)]=-0.920718897548
            arg[(0, 2, 0, 0)]=-0.0361579160997*x[0] + (-0.946629797708)*x[1]
            ref[(0, 2, 0, 0)]=-0.491393856904
            arg[(0, 2, 0, 1)]=-0.301458916224*x[0] + (0.741331148165)*x[1]
            ref[(0, 2, 0, 1)]=0.219936115971
            arg[(0, 2, 0, 2)]=-0.629941092415*x[0] + (-0.854016218817)*x[1]
            ref[(0, 2, 0, 2)]=-0.741978655616
            arg[(0, 2, 1, 0)]=-0.836738673736*x[0] + (0.638872111378)*x[1]
            ref[(0, 2, 1, 0)]=-0.0989332811786
            arg[(0, 2, 1, 1)]=0.857184020103*x[0] + (-0.405952797431)*x[1]
            ref[(0, 2, 1, 1)]=0.225615611336
            arg[(0, 2, 1, 2)]=0.0673723070864*x[0] + (-0.0600749885681)*x[1]
            ref[(0, 2, 1, 2)]=0.00364865925914
            arg[(0, 2, 2, 0)]=-0.643443869487*x[0] + (-0.231167074517)*x[1]
            ref[(0, 2, 2, 0)]=-0.437305472002
            arg[(0, 2, 2, 1)]=-0.513966460081*x[0] + (-0.848017503604)*x[1]
            ref[(0, 2, 2, 1)]=-0.680991981842
            arg[(0, 2, 2, 2)]=-0.886699144628*x[0] + (-0.517756579908)*x[1]
            ref[(0, 2, 2, 2)]=-0.702227862268
            arg[(0, 3, 0, 0)]=-0.616858814572*x[0] + (0.656450176756)*x[1]
            ref[(0, 3, 0, 0)]=0.019795681092
            arg[(0, 3, 0, 1)]=-0.492914030129*x[0] + (0.791821444263)*x[1]
            ref[(0, 3, 0, 1)]=0.149453707067
            arg[(0, 3, 0, 2)]=0.0515506953439*x[0] + (0.107918748373)*x[1]
            ref[(0, 3, 0, 2)]=0.0797347218586
            arg[(0, 3, 1, 0)]=-0.994368546804*x[0] + (-0.775016739341)*x[1]
            ref[(0, 3, 1, 0)]=-0.884692643072
            arg[(0, 3, 1, 1)]=0.838517861001*x[0] + (0.346733577179)*x[1]
            ref[(0, 3, 1, 1)]=0.59262571909
            arg[(0, 3, 1, 2)]=-0.152500482527*x[0] + (0.873709627521)*x[1]
            ref[(0, 3, 1, 2)]=0.360604572497
            arg[(0, 3, 2, 0)]=0.112521864953*x[0] + (-0.840583682569)*x[1]
            ref[(0, 3, 2, 0)]=-0.364030908808
            arg[(0, 3, 2, 1)]=0.295214864636*x[0] + (0.662795012863)*x[1]
            ref[(0, 3, 2, 1)]=0.47900493875
            arg[(0, 3, 2, 2)]=-0.300169187204*x[0] + (-0.26452062954)*x[1]
            ref[(0, 3, 2, 2)]=-0.282344908372
            arg[(1, 0, 0, 0)]=-0.466700679456*x[0] + (0.479237935874)*x[1]
            ref[(1, 0, 0, 0)]=0.00626862820885
            arg[(1, 0, 0, 1)]=-0.1560158987*x[0] + (-0.449348236205)*x[1]
            ref[(1, 0, 0, 1)]=-0.302682067453
            arg[(1, 0, 0, 2)]=0.735365681484*x[0] + (-0.423332985015)*x[1]
            ref[(1, 0, 0, 2)]=0.156016348235
            arg[(1, 0, 1, 0)]=0.406666995711*x[0] + (-0.848968512863)*x[1]
            ref[(1, 0, 1, 0)]=-0.221150758576
            arg[(1, 0, 1, 1)]=0.756715373041*x[0] + (-0.329977484086)*x[1]
            ref[(1, 0, 1, 1)]=0.213368944477
            arg[(1, 0, 1, 2)]=-0.11567150006*x[0] + (0.318705970654)*x[1]
            ref[(1, 0, 1, 2)]=0.101517235297
            arg[(1, 0, 2, 0)]=-0.471614449285*x[0] + (0.626745715557)*x[1]
            ref[(1, 0, 2, 0)]=0.0775656331359
            arg[(1, 0, 2, 1)]=-0.685846856069*x[0] + (0.169166452662)*x[1]
            ref[(1, 0, 2, 1)]=-0.258340201703
            arg[(1, 0, 2, 2)]=-0.3156982532*x[0] + (-0.0905298204722)*x[1]
            ref[(1, 0, 2, 2)]=-0.203114036836
            arg[(1, 1, 0, 0)]=-0.341335334139*x[0] + (-0.881670332147)*x[1]
            ref[(1, 1, 0, 0)]=-0.611502833143
            arg[(1, 1, 0, 1)]=0.188309111484*x[0] + (0.771111467226)*x[1]
            ref[(1, 1, 0, 1)]=0.479710289355
            arg[(1, 1, 0, 2)]=0.446876893603*x[0] + (0.484986407257)*x[1]
            ref[(1, 1, 0, 2)]=0.46593165043
            arg[(1, 1, 1, 0)]=-0.789131321943*x[0] + (-0.452447275047)*x[1]
            ref[(1, 1, 1, 0)]=-0.620789298495
            arg[(1, 1, 1, 1)]=0.742203336361*x[0] + (0.449349159496)*x[1]
            ref[(1, 1, 1, 1)]=0.595776247929
            arg[(1, 1, 1, 2)]=-0.0352016216714*x[0] + (0.339808700896)*x[1]
            ref[(1, 1, 1, 2)]=0.152303539612
            arg[(1, 1, 2, 0)]=0.508275788069*x[0] + (-0.985479016254)*x[1]
            ref[(1, 1, 2, 0)]=-0.238601614092
            arg[(1, 1, 2, 1)]=0.358087033341*x[0] + (-0.376247071638)*x[1]
            ref[(1, 1, 2, 1)]=-0.0090800191483
            arg[(1, 1, 2, 2)]=-0.977252225514*x[0] + (0.112692499878)*x[1]
            ref[(1, 1, 2, 2)]=-0.432279862818
            arg[(1, 2, 0, 0)]=-0.982353819854*x[0] + (-0.320925538111)*x[1]
            ref[(1, 2, 0, 0)]=-0.651639678983
            arg[(1, 2, 0, 1)]=0.870276594032*x[0] + (0.517618661589)*x[1]
            ref[(1, 2, 0, 1)]=0.693947627811
            arg[(1, 2, 0, 2)]=-0.656731987579*x[0] + (0.0247746171458)*x[1]
            ref[(1, 2, 0, 2)]=-0.315978685216
            arg[(1, 2, 1, 0)]=-0.23183047763*x[0] + (0.332479078571)*x[1]
            ref[(1, 2, 1, 0)]=0.0503243004706
            arg[(1, 2, 1, 1)]=0.0889432894427*x[0] + (-0.258742743126)*x[1]
            ref[(1, 2, 1, 1)]=-0.0848997268416
            arg[(1, 2, 1, 2)]=-0.797925975909*x[0] + (0.350336075871)*x[1]
            ref[(1, 2, 1, 2)]=-0.223794950019
            arg[(1, 2, 2, 0)]=0.464384492342*x[0] + (0.87495630552)*x[1]
            ref[(1, 2, 2, 0)]=0.669670398931
            arg[(1, 2, 2, 1)]=-0.443640515602*x[0] + (-0.687584165245)*x[1]
            ref[(1, 2, 2, 1)]=-0.565612340424
            arg[(1, 2, 2, 2)]=-0.802703812462*x[0] + (-0.383785070004)*x[1]
            ref[(1, 2, 2, 2)]=-0.593244441233
            arg[(1, 3, 0, 0)]=0.222196656909*x[0] + (-0.930410009305)*x[1]
            ref[(1, 3, 0, 0)]=-0.354106676198
            arg[(1, 3, 0, 1)]=-0.257640648515*x[0] + (-0.694262690174)*x[1]
            ref[(1, 3, 0, 1)]=-0.475951669345
            arg[(1, 3, 0, 2)]=-0.445662812359*x[0] + (0.5190083393)*x[1]
            ref[(1, 3, 0, 2)]=0.0366727634702
            arg[(1, 3, 1, 0)]=-0.316727253883*x[0] + (0.557523433211)*x[1]
            ref[(1, 3, 1, 0)]=0.120398089664
            arg[(1, 3, 1, 1)]=0.941288811525*x[0] + (-0.426951460548)*x[1]
            ref[(1, 3, 1, 1)]=0.257168675488
            arg[(1, 3, 1, 2)]=0.51125369099*x[0] + (-0.850359640603)*x[1]
            ref[(1, 3, 1, 2)]=-0.169552974807
            arg[(1, 3, 2, 0)]=-0.352371396507*x[0] + (-0.915415345822)*x[1]
            ref[(1, 3, 2, 0)]=-0.633893371164
            arg[(1, 3, 2, 1)]=0.312926185881*x[0] + (-0.115865807381)*x[1]
            ref[(1, 3, 2, 1)]=0.0985301892501
            arg[(1, 3, 2, 2)]=0.247216546192*x[0] + (0.0181879263947)*x[1]
            ref[(1, 3, 2, 2)]=0.132702236294
            arg[(2, 0, 0, 0)]=-0.0160376716153*x[0] + (0.29947698172)*x[1]
            ref[(2, 0, 0, 0)]=0.141719655052
            arg[(2, 0, 0, 1)]=-0.0192230260061*x[0] + (0.453943164378)*x[1]
            ref[(2, 0, 0, 1)]=0.217360069186
            arg[(2, 0, 0, 2)]=0.0116463401985*x[0] + (0.633398951856)*x[1]
            ref[(2, 0, 0, 2)]=0.322522646027
            arg[(2, 0, 1, 0)]=-0.751197457413*x[0] + (0.738953334706)*x[1]
            ref[(2, 0, 1, 0)]=-0.00612206135385
            arg[(2, 0, 1, 1)]=-0.848993884701*x[0] + (-0.342548429805)*x[1]
            ref[(2, 0, 1, 1)]=-0.595771157253
            arg[(2, 0, 1, 2)]=0.90395134785*x[0] + (-0.578960515125)*x[1]
            ref[(2, 0, 1, 2)]=0.162495416363
            arg[(2, 0, 2, 0)]=0.605320258715*x[0] + (-0.260103928125)*x[1]
            ref[(2, 0, 2, 0)]=0.172608165295
            arg[(2, 0, 2, 1)]=0.924871615754*x[0] + (-0.507392434563)*x[1]
            ref[(2, 0, 2, 1)]=0.208739590595
            arg[(2, 0, 2, 2)]=0.491905526486*x[0] + (-0.421623451751)*x[1]
            ref[(2, 0, 2, 2)]=0.0351410373676
            arg[(2, 1, 0, 0)]=0.358800520101*x[0] + (0.659524050551)*x[1]
            ref[(2, 1, 0, 0)]=0.509162285326
            arg[(2, 1, 0, 1)]=-0.0350783887157*x[0] + (0.460021127172)*x[1]
            ref[(2, 1, 0, 1)]=0.212471369228
            arg[(2, 1, 0, 2)]=-0.479068500424*x[0] + (0.0486279862792)*x[1]
            ref[(2, 1, 0, 2)]=-0.215220257072
            arg[(2, 1, 1, 0)]=0.928955605332*x[0] + (0.499427123)*x[1]
            ref[(2, 1, 1, 0)]=0.714191364166
            arg[(2, 1, 1, 1)]=-0.567047624491*x[0] + (-0.35417475138)*x[1]
            ref[(2, 1, 1, 1)]=-0.460611187936
            arg[(2, 1, 1, 2)]=-0.584054267868*x[0] + (-0.380325533711)*x[1]
            ref[(2, 1, 1, 2)]=-0.482189900789
            arg[(2, 1, 2, 0)]=-0.999290388066*x[0] + (0.676661032007)*x[1]
            ref[(2, 1, 2, 0)]=-0.161314678029
            arg[(2, 1, 2, 1)]=-0.392648723469*x[0] + (0.624919528357)*x[1]
            ref[(2, 1, 2, 1)]=0.116135402444
            arg[(2, 1, 2, 2)]=0.0478577181976*x[0] + (-0.662479459985)*x[1]
            ref[(2, 1, 2, 2)]=-0.307310870894
            arg[(2, 2, 0, 0)]=0.0127417084285*x[0] + (-0.279055387003)*x[1]
            ref[(2, 2, 0, 0)]=-0.133156839287
            arg[(2, 2, 0, 1)]=-0.928434312136*x[0] + (-0.876860921822)*x[1]
            ref[(2, 2, 0, 1)]=-0.902647616979
            arg[(2, 2, 0, 2)]=-0.184913494797*x[0] + (0.66904274984)*x[1]
            ref[(2, 2, 0, 2)]=0.242064627521
            arg[(2, 2, 1, 0)]=0.624174910558*x[0] + (-0.862342740604)*x[1]
            ref[(2, 2, 1, 0)]=-0.119083915023
            arg[(2, 2, 1, 1)]=0.582046334159*x[0] + (0.25425424798)*x[1]
            ref[(2, 2, 1, 1)]=0.418150291069
            arg[(2, 2, 1, 2)]=0.477255340625*x[0] + (-0.359203050399)*x[1]
            ref[(2, 2, 1, 2)]=0.0590261451126
            arg[(2, 2, 2, 0)]=-0.0544502278528*x[0] + (0.296745962514)*x[1]
            ref[(2, 2, 2, 0)]=0.121147867331
            arg[(2, 2, 2, 1)]=-0.415529720032*x[0] + (0.871124954884)*x[1]
            ref[(2, 2, 2, 1)]=0.227797617426
            arg[(2, 2, 2, 2)]=0.0651416130062*x[0] + (0.378402459745)*x[1]
            ref[(2, 2, 2, 2)]=0.221772036375
            arg[(2, 3, 0, 0)]=0.0895453520109*x[0] + (-0.90384140097)*x[1]
            ref[(2, 3, 0, 0)]=-0.40714802448
            arg[(2, 3, 0, 1)]=0.138703578182*x[0] + (-0.715863070858)*x[1]
            ref[(2, 3, 0, 1)]=-0.288579746338
            arg[(2, 3, 0, 2)]=0.638233688265*x[0] + (-0.457302607383)*x[1]
            ref[(2, 3, 0, 2)]=0.0904655404408
            arg[(2, 3, 1, 0)]=0.400666358328*x[0] + (0.715443148081)*x[1]
            ref[(2, 3, 1, 0)]=0.558054753205
            arg[(2, 3, 1, 1)]=-0.502951877151*x[0] + (0.633297591847)*x[1]
            ref[(2, 3, 1, 1)]=0.0651728573479
            arg[(2, 3, 1, 2)]=0.1793755988*x[0] + (0.602650374338)*x[1]
            ref[(2, 3, 1, 2)]=0.391012986569
            arg[(2, 3, 2, 0)]=-0.0901043284735*x[0] + (0.459888370378)*x[1]
            ref[(2, 3, 2, 0)]=0.184892020952
            arg[(2, 3, 2, 1)]=0.110472921508*x[0] + (0.125098193749)*x[1]
            ref[(2, 3, 2, 1)]=0.117785557629
            arg[(2, 3, 2, 2)]=-0.738091825686*x[0] + (-0.310488967256)*x[1]
            ref[(2, 3, 2, 2)]=-0.524290396471
            arg[(3, 0, 0, 0)]=0.534623180216*x[0] + (-0.880361638913)*x[1]
            ref[(3, 0, 0, 0)]=-0.172869229349
            arg[(3, 0, 0, 1)]=-0.00103826331024*x[0] + (0.478747426916)*x[1]
            ref[(3, 0, 0, 1)]=0.238854581803
            arg[(3, 0, 0, 2)]=0.823444253816*x[0] + (-0.0967479822859)*x[1]
            ref[(3, 0, 0, 2)]=0.363348135765
            arg[(3, 0, 1, 0)]=0.127101340136*x[0] + (0.386260039541)*x[1]
            ref[(3, 0, 1, 0)]=0.256680689838
            arg[(3, 0, 1, 1)]=-0.750770231248*x[0] + (0.539214019554)*x[1]
            ref[(3, 0, 1, 1)]=-0.105778105847
            arg[(3, 0, 1, 2)]=-0.889605758752*x[0] + (-0.918998545516)*x[1]
            ref[(3, 0, 1, 2)]=-0.904302152134
            arg[(3, 0, 2, 0)]=-0.39300532272*x[0] + (-0.794238905762)*x[1]
            ref[(3, 0, 2, 0)]=-0.593622114241
            arg[(3, 0, 2, 1)]=0.549528472408*x[0] + (-0.240379723754)*x[1]
            ref[(3, 0, 2, 1)]=0.154574374327
            arg[(3, 0, 2, 2)]=0.616124734257*x[0] + (-0.100545817263)*x[1]
            ref[(3, 0, 2, 2)]=0.257789458497
            arg[(3, 1, 0, 0)]=0.796675889928*x[0] + (-0.936861328707)*x[1]
            ref[(3, 1, 0, 0)]=-0.0700927193894
            arg[(3, 1, 0, 1)]=0.623294099886*x[0] + (-0.949200207402)*x[1]
            ref[(3, 1, 0, 1)]=-0.162953053758
            arg[(3, 1, 0, 2)]=-0.0143340160748*x[0] + (-0.36266763763)*x[1]
            ref[(3, 1, 0, 2)]=-0.188500826853
            arg[(3, 1, 1, 0)]=-0.22748989729*x[0] + (0.555488795658)*x[1]
            ref[(3, 1, 1, 0)]=0.163999449184
            arg[(3, 1, 1, 1)]=-0.74996933038*x[0] + (-0.190360695173)*x[1]
            ref[(3, 1, 1, 1)]=-0.470165012776
            arg[(3, 1, 1, 2)]=-0.784864950964*x[0] + (0.663796673232)*x[1]
            ref[(3, 1, 1, 2)]=-0.0605341388662
            arg[(3, 1, 2, 0)]=-0.62002328097*x[0] + (-0.591892533878)*x[1]
            ref[(3, 1, 2, 0)]=-0.605957907424
            arg[(3, 1, 2, 1)]=0.887898372123*x[0] + (0.983071196606)*x[1]
            ref[(3, 1, 2, 1)]=0.935484784365
            arg[(3, 1, 2, 2)]=-0.0650649994331*x[0] + (-0.108523551691)*x[1]
            ref[(3, 1, 2, 2)]=-0.0867942755622
            arg[(3, 2, 0, 0)]=0.611773528872*x[0] + (-0.534480643403)*x[1]
            ref[(3, 2, 0, 0)]=0.0386464427345
            arg[(3, 2, 0, 1)]=0.554915923527*x[0] + (-0.801704181494)*x[1]
            ref[(3, 2, 0, 1)]=-0.123394128983
            arg[(3, 2, 0, 2)]=-0.268943802051*x[0] + (-0.34748722206)*x[1]
            ref[(3, 2, 0, 2)]=-0.308215512055
            arg[(3, 2, 1, 0)]=-0.826328534661*x[0] + (0.815637088211)*x[1]
            ref[(3, 2, 1, 0)]=-0.00534572322493
            arg[(3, 2, 1, 1)]=0.28334824602*x[0] + (0.781104319749)*x[1]
            ref[(3, 2, 1, 1)]=0.532226282885
            arg[(3, 2, 1, 2)]=-0.853195568256*x[0] + (-0.83817229885)*x[1]
            ref[(3, 2, 1, 2)]=-0.845683933553
            arg[(3, 2, 2, 0)]=0.348242126349*x[0] + (0.119136602052)*x[1]
            ref[(3, 2, 2, 0)]=0.233689364201
            arg[(3, 2, 2, 1)]=-0.113414936007*x[0] + (-0.178833638847)*x[1]
            ref[(3, 2, 2, 1)]=-0.146124287427
            arg[(3, 2, 2, 2)]=-0.306520642322*x[0] + (0.86900480984)*x[1]
            ref[(3, 2, 2, 2)]=0.281242083759
            arg[(3, 3, 0, 0)]=0.706145817839*x[0] + (-0.250333708611)*x[1]
            ref[(3, 3, 0, 0)]=0.227906054614
            arg[(3, 3, 0, 1)]=-0.137495390348*x[0] + (-0.60355746441)*x[1]
            ref[(3, 3, 0, 1)]=-0.370526427379
            arg[(3, 3, 0, 2)]=-0.682300156754*x[0] + (0.700574415731)*x[1]
            ref[(3, 3, 0, 2)]=0.00913712948839
            arg[(3, 3, 1, 0)]=0.617248266058*x[0] + (-0.131467874657)*x[1]
            ref[(3, 3, 1, 0)]=0.242890195701
            arg[(3, 3, 1, 1)]=0.409616036845*x[0] + (0.0342397908999)*x[1]
            ref[(3, 3, 1, 1)]=0.221927913872
            arg[(3, 3, 1, 2)]=-0.252248161151*x[0] + (-0.755193643273)*x[1]
            ref[(3, 3, 1, 2)]=-0.503720902212
            arg[(3, 3, 2, 0)]=0.0885669621701*x[0] + (-0.0579690334438)*x[1]
            ref[(3, 3, 2, 0)]=0.0152989643632
            arg[(3, 3, 2, 1)]=0.46549588586*x[0] + (0.927326573284)*x[1]
            ref[(3, 3, 2, 1)]=0.696411229572
            arg[(3, 3, 2, 2)]=-0.892305412971*x[0] + (-0.265207435793)*x[1]
            ref[(3, 3, 2, 2)]=-0.578756424382
        else:
            arg[(0, 0, 0, 0)]=-0.100577875156*x[0] + (0.0845463311296)*x[1] + (0.810702656185)*x[2]
            ref[(0, 0, 0, 0)]=0.397335556079
            arg[(0, 0, 0, 1)]=-0.248029527676*x[0] + (0.597210810581)*x[1] + (0.269222371219)*x[2]
            ref[(0, 0, 0, 1)]=0.309201827062
            arg[(0, 0, 0, 2)]=-0.0461836152174*x[0] + (0.209486066228)*x[1] + (-0.374873923195)*x[2]
            ref[(0, 0, 0, 2)]=-0.105785736092
            arg[(0, 0, 1, 0)]=-0.604476433431*x[0] + (0.737995685699)*x[1] + (-0.818113272651)*x[2]
            ref[(0, 0, 1, 0)]=-0.342297010192
            arg[(0, 0, 1, 1)]=-0.33524366468*x[0] + (0.676634383964)*x[1] + (0.0890097958564)*x[2]
            ref[(0, 0, 1, 1)]=0.21520025757
            arg[(0, 0, 1, 2)]=0.740287563948*x[0] + (0.942384205616)*x[1] + (-0.739846258562)*x[2]
            ref[(0, 0, 1, 2)]=0.471412755501
            arg[(0, 0, 2, 0)]=-0.465458595254*x[0] + (0.837617733086)*x[1] + (-0.266115999015)*x[2]
            ref[(0, 0, 2, 0)]=0.0530215694088
            arg[(0, 0, 2, 1)]=0.903758624942*x[0] + (0.438084045248)*x[1] + (0.607636243464)*x[2]
            ref[(0, 0, 2, 1)]=0.974739456827
            arg[(0, 0, 2, 2)]=-0.293666920788*x[0] + (-0.296282569514)*x[1] + (-0.311538471299)*x[2]
            ref[(0, 0, 2, 2)]=-0.450743980801
            arg[(0, 1, 0, 0)]=-0.0249239269989*x[0] + (0.76654419906)*x[1] + (0.941450600876)*x[2]
            ref[(0, 1, 0, 0)]=0.841535436469
            arg[(0, 1, 0, 1)]=-0.0241295128203*x[0] + (0.451510697455)*x[1] + (0.0596542618327)*x[2]
            ref[(0, 1, 0, 1)]=0.243517723234
            arg[(0, 1, 0, 2)]=0.399204973807*x[0] + (0.462911145641)*x[1] + (0.0662450436909)*x[2]
            ref[(0, 1, 0, 2)]=0.464180581569
            arg[(0, 1, 1, 0)]=-0.384175080102*x[0] + (-0.590903404845)*x[1] + (0.74892077993)*x[2]
            ref[(0, 1, 1, 0)]=-0.113078852508
            arg[(0, 1, 1, 1)]=-0.902384945394*x[0] + (0.68731637663)*x[1] + (-0.554959008485)*x[2]
            ref[(0, 1, 1, 1)]=-0.385013788625
            arg[(0, 1, 1, 2)]=0.16445006026*x[0] + (-0.0722027302524)*x[1] + (0.185833083678)*x[2]
            ref[(0, 1, 1, 2)]=0.139040206843
            arg[(0, 1, 2, 0)]=0.0429788403381*x[0] + (-0.109298967713)*x[1] + (-0.284368330848)*x[2]
            ref[(0, 1, 2, 0)]=-0.175344229111
            arg[(0, 1, 2, 1)]=0.51955393212*x[0] + (-0.93145778648)*x[1] + (0.960130839658)*x[2]
            ref[(0, 1, 2, 1)]=0.274113492649
            arg[(0, 1, 2, 2)]=-0.00665914081079*x[0] + (-0.0428709187369)*x[1] + (0.884353575783)*x[2]
            ref[(0, 1, 2, 2)]=0.417411758118
            arg[(0, 2, 0, 0)]=-0.752720437912*x[0] + (0.621463553201)*x[1] + (-0.00445842967793)*x[2]
            ref[(0, 2, 0, 0)]=-0.0678576571944
            arg[(0, 2, 0, 1)]=-0.872841650357*x[0] + (0.453139618555)*x[1] + (-0.96538859101)*x[2]
            ref[(0, 2, 0, 1)]=-0.692545311406
            arg[(0, 2, 0, 2)]=0.638011455041*x[0] + (0.00577507731126)*x[1] + (-0.521784083196)*x[2]
            ref[(0, 2, 0, 2)]=0.0610012245778
            arg[(0, 2, 1, 0)]=0.216290648323*x[0] + (-0.715750156934)*x[1] + (-0.405402899615)*x[2]
            ref[(0, 2, 1, 0)]=-0.452431204113
            arg[(0, 2, 1, 1)]=0.625525043914*x[0] + (-0.982968156283)*x[1] + (0.0440979291686)*x[2]
            ref[(0, 2, 1, 1)]=-0.1566725916
            arg[(0, 2, 1, 2)]=-0.360909002229*x[0] + (-0.468845850122)*x[1] + (-0.833171148552)*x[2]
            ref[(0, 2, 1, 2)]=-0.831463000452
            arg[(0, 2, 2, 0)]=-0.936813475525*x[0] + (0.754481144914)*x[1] + (-0.874150800345)*x[2]
            ref[(0, 2, 2, 0)]=-0.528241565478
            arg[(0, 2, 2, 1)]=-0.942590226155*x[0] + (-0.135883483185)*x[1] + (0.729429643666)*x[2]
            ref[(0, 2, 2, 1)]=-0.174522032837
            arg[(0, 2, 2, 2)]=0.818238973382*x[0] + (-0.403400337548)*x[1] + (-0.328845615663)*x[2]
            ref[(0, 2, 2, 2)]=0.0429965100853
            arg[(0, 3, 0, 0)]=-0.885540294238*x[0] + (-0.325580284274)*x[1] + (-0.0224403102875)*x[2]
            ref[(0, 3, 0, 0)]=-0.6167804444
            arg[(0, 3, 0, 1)]=0.997732761002*x[0] + (-0.0278886151705)*x[1] + (0.689206567919)*x[2]
            ref[(0, 3, 0, 1)]=0.829525356875
            arg[(0, 3, 0, 2)]=-0.0300615297645*x[0] + (0.237686479797)*x[1] + (0.262476029579)*x[2]
            ref[(0, 3, 0, 2)]=0.235050489806
            arg[(0, 3, 1, 0)]=-0.375235993759*x[0] + (-0.730552257191)*x[1] + (-0.804391918325)*x[2]
            ref[(0, 3, 1, 0)]=-0.955090084637
            arg[(0, 3, 1, 1)]=-0.122721596848*x[0] + (-0.0475135862729)*x[1] + (0.57796426767)*x[2]
            ref[(0, 3, 1, 1)]=0.203864542274
            arg[(0, 3, 1, 2)]=-0.414518320166*x[0] + (0.57392992261)*x[1] + (0.734726519084)*x[2]
            ref[(0, 3, 1, 2)]=0.447069060764
            arg[(0, 3, 2, 0)]=-0.624198288562*x[0] + (0.410507503696)*x[1] + (-0.228703410577)*x[2]
            ref[(0, 3, 2, 0)]=-0.221197097722
            arg[(0, 3, 2, 1)]=-0.337448475888*x[0] + (0.566333504903)*x[1] + (-0.90627507264)*x[2]
            ref[(0, 3, 2, 1)]=-0.338695021812
            arg[(0, 3, 2, 2)]=-0.873233229714*x[0] + (-0.252292813894)*x[1] + (0.442979953594)*x[2]
            ref[(0, 3, 2, 2)]=-0.341273045007
            arg[(1, 0, 0, 0)]=-0.869583876086*x[0] + (-0.464874299087)*x[1] + (0.230293963715)*x[2]
            ref[(1, 0, 0, 0)]=-0.552082105728
            arg[(1, 0, 0, 1)]=0.0122982520116*x[0] + (0.509080231757)*x[1] + (-0.982041788187)*x[2]
            ref[(1, 0, 0, 1)]=-0.230331652209
            arg[(1, 0, 0, 2)]=0.249811269568*x[0] + (-0.567968604193)*x[1] + (0.820965454773)*x[2]
            ref[(1, 0, 0, 2)]=0.251404060074
            arg[(1, 0, 1, 0)]=0.873274109498*x[0] + (0.999689557448)*x[1] + (-0.276783890254)*x[2]
            ref[(1, 0, 1, 0)]=0.798089888346
            arg[(1, 0, 1, 1)]=-0.573076247364*x[0] + (-0.315201913005)*x[1] + (-0.222955716722)*x[2]
            ref[(1, 0, 1, 1)]=-0.555616938545
            arg[(1, 0, 1, 2)]=0.522710898628*x[0] + (-0.0126803844471)*x[1] + (0.256694668524)*x[2]
            ref[(1, 0, 1, 2)]=0.383362591352
            arg[(1, 0, 2, 0)]=0.100195316225*x[0] + (0.37717745821)*x[1] + (-0.737884005374)*x[2]
            ref[(1, 0, 2, 0)]=-0.130255615469
            arg[(1, 0, 2, 1)]=-0.45178267348*x[0] + (-0.391700743603)*x[1] + (0.0334388961467)*x[2]
            ref[(1, 0, 2, 1)]=-0.405022260468
            arg[(1, 0, 2, 2)]=0.92324433044*x[0] + (-0.395659651828)*x[1] + (-0.295428869071)*x[2]
            ref[(1, 0, 2, 2)]=0.116077904771
            arg[(1, 1, 0, 0)]=-0.673069581478*x[0] + (-0.521172349329)*x[1] + (-0.399845878717)*x[2]
            ref[(1, 1, 0, 0)]=-0.797043904762
            arg[(1, 1, 0, 1)]=0.596386687964*x[0] + (-0.357485332556)*x[1] + (-0.53312401342)*x[2]
            ref[(1, 1, 0, 1)]=-0.147111329006
            arg[(1, 1, 0, 2)]=0.440020809406*x[0] + (0.893428799176)*x[1] + (0.183299958135)*x[2]
            ref[(1, 1, 0, 2)]=0.758374783358
            arg[(1, 1, 1, 0)]=-0.231981458985*x[0] + (0.322350236463)*x[1] + (-0.578374433588)*x[2]
            ref[(1, 1, 1, 0)]=-0.244002828055
            arg[(1, 1, 1, 1)]=-0.235144107158*x[0] + (0.832220161666)*x[1] + (0.213967631953)*x[2]
            ref[(1, 1, 1, 1)]=0.40552184323
            arg[(1, 1, 1, 2)]=-0.567690941219*x[0] + (0.875729620554)*x[1] + (0.769766244934)*x[2]
            ref[(1, 1, 1, 2)]=0.538902462135
            arg[(1, 1, 2, 0)]=0.315601331287*x[0] + (-0.134608029861)*x[1] + (0.547116463444)*x[2]
            ref[(1, 1, 2, 0)]=0.364054882435
            arg[(1, 1, 2, 1)]=0.005705491512*x[0] + (0.777360759554)*x[1] + (-0.255101971067)*x[2]
            ref[(1, 1, 2, 1)]=0.263982139999
            arg[(1, 1, 2, 2)]=0.377096703989*x[0] + (-0.441877916009)*x[1] + (-0.855977596564)*x[2]
            ref[(1, 1, 2, 2)]=-0.460379404292
            arg[(1, 2, 0, 0)]=-0.946808229548*x[0] + (0.470202347809)*x[1] + (0.486930325492)*x[2]
            ref[(1, 2, 0, 0)]=0.00516222187644
            arg[(1, 2, 0, 1)]=0.872641568569*x[0] + (-0.443659413761)*x[1] + (-0.873573301814)*x[2]
            ref[(1, 2, 0, 1)]=-0.222295573503
            arg[(1, 2, 0, 2)]=-0.373164766671*x[0] + (-0.352861961852)*x[1] + (0.723253924792)*x[2]
            ref[(1, 2, 0, 2)]=-0.00138640186562
            arg[(1, 2, 1, 0)]=-0.896792763937*x[0] + (-0.402812019569)*x[1] + (0.452221248064)*x[2]
            ref[(1, 2, 1, 0)]=-0.423691767721
            arg[(1, 2, 1, 1)]=-0.961878092378*x[0] + (0.148545384832)*x[1] + (0.294774605333)*x[2]
            ref[(1, 2, 1, 1)]=-0.259279051106
            arg[(1, 2, 1, 2)]=-0.0466136998354*x[0] + (0.48856398386)*x[1] + (0.934857881016)*x[2]
            ref[(1, 2, 1, 2)]=0.688404082521
            arg[(1, 2, 2, 0)]=-0.328066967707*x[0] + (0.514527928236)*x[1] + (0.0636379296285)*x[2]
            ref[(1, 2, 2, 0)]=0.125049445079
            arg[(1, 2, 2, 1)]=0.547778348752*x[0] + (0.677559910931)*x[1] + (0.377541071019)*x[2]
            ref[(1, 2, 2, 1)]=0.801439665351
            arg[(1, 2, 2, 2)]=0.107889573467*x[0] + (0.686237875557)*x[1] + (-0.267502232877)*x[2]
            ref[(1, 2, 2, 2)]=0.263312608074
            arg[(1, 3, 0, 0)]=0.00976560959078*x[0] + (-0.816514821339)*x[1] + (0.79392828879)*x[2]
            ref[(1, 3, 0, 0)]=-0.00641046147935
            arg[(1, 3, 0, 1)]=0.412243958029*x[0] + (-0.699459751764)*x[1] + (0.925726630153)*x[2]
            ref[(1, 3, 0, 1)]=0.319255418209
            arg[(1, 3, 0, 2)]=0.322750527132*x[0] + (0.0708172150333)*x[1] + (0.817644387852)*x[2]
            ref[(1, 3, 0, 2)]=0.605606065009
            arg[(1, 3, 1, 0)]=0.181658059758*x[0] + (-0.10119286442)*x[1] + (0.62851946251)*x[2]
            ref[(1, 3, 1, 0)]=0.354492328924
            arg[(1, 3, 1, 1)]=0.555908361806*x[0] + (0.188193432376)*x[1] + (-0.512045569979)*x[2]
            ref[(1, 3, 1, 1)]=0.116028112101
            arg[(1, 3, 1, 2)]=-0.299696727235*x[0] + (-0.248570155169)*x[1] + (0.577215527275)*x[2]
            ref[(1, 3, 1, 2)]=0.0144743224356
            arg[(1, 3, 2, 0)]=-0.114739284399*x[0] + (0.944792403173)*x[1] + (-0.962489948512)*x[2]
            ref[(1, 3, 2, 0)]=-0.0662184148693
            arg[(1, 3, 2, 1)]=0.468509428799*x[0] + (0.0348766495965)*x[1] + (0.166895319257)*x[2]
            ref[(1, 3, 2, 1)]=0.335140698826
            arg[(1, 3, 2, 2)]=0.310299270787*x[0] + (-0.420341261523)*x[1] + (-0.481957208474)*x[2]
            ref[(1, 3, 2, 2)]=-0.295999599605
            arg[(2, 0, 0, 0)]=0.84493418662*x[0] + (-0.554331657499)*x[1] + (0.0972165866569)*x[2]
            ref[(2, 0, 0, 0)]=0.193909557889
            arg[(2, 0, 0, 1)]=0.237994171433*x[0] + (-0.561714000376)*x[1] + (0.252085166873)*x[2]
            ref[(2, 0, 0, 1)]=-0.0358173310351
            arg[(2, 0, 0, 2)]=-0.524188346348*x[0] + (0.130205402867)*x[1] + (-0.377057112996)*x[2]
            ref[(2, 0, 0, 2)]=-0.385520028239
            arg[(2, 0, 1, 0)]=-0.61853371727*x[0] + (0.915335333653)*x[1] + (-0.660082524606)*x[2]
            ref[(2, 0, 1, 0)]=-0.181640454112
            arg[(2, 0, 1, 1)]=0.803078019124*x[0] + (0.524477123303)*x[1] + (-0.482612028323)*x[2]
            ref[(2, 0, 1, 1)]=0.422471557052
            arg[(2, 0, 1, 2)]=0.543664946521*x[0] + (-0.43676249883)*x[1] + (-0.621718316436)*x[2]
            ref[(2, 0, 1, 2)]=-0.257407934373
            arg[(2, 0, 2, 0)]=-0.0889048475872*x[0] + (-0.859863740001)*x[1] + (-0.021021473181)*x[2]
            ref[(2, 0, 2, 0)]=-0.484895030385
            arg[(2, 0, 2, 1)]=-0.273802987846*x[0] + (0.466846857133)*x[1] + (0.792229021641)*x[2]
            ref[(2, 0, 2, 1)]=0.492636445464
            arg[(2, 0, 2, 2)]=0.210708126463*x[0] + (-0.00533269983688)*x[1] + (0.255518946531)*x[2]
            ref[(2, 0, 2, 2)]=0.230447186578
            arg[(2, 1, 0, 0)]=0.14752422737*x[0] + (0.404905129511)*x[1] + (0.322821502517)*x[2]
            ref[(2, 1, 0, 0)]=0.437625429699
            arg[(2, 1, 0, 1)]=0.98053529253*x[0] + (0.998374092958)*x[1] + (0.881279719632)*x[2]
            ref[(2, 1, 0, 1)]=1.43009455256
            arg[(2, 1, 0, 2)]=0.0892369250735*x[0] + (-0.00493188909891)*x[1] + (0.670793157246)*x[2]
            ref[(2, 1, 0, 2)]=0.37754909661
            arg[(2, 1, 1, 0)]=0.652192836477*x[0] + (0.833181844006)*x[1] + (-0.201187034789)*x[2]
            ref[(2, 1, 1, 0)]=0.642093822847
            arg[(2, 1, 1, 1)]=-0.895139454021*x[0] + (0.636837349285)*x[1] + (0.356320669271)*x[2]
            ref[(2, 1, 1, 1)]=0.0490092822675
            arg[(2, 1, 1, 2)]=-0.252150693452*x[0] + (-0.588556850946)*x[1] + (0.0852183820827)*x[2]
            ref[(2, 1, 1, 2)]=-0.377744581158
            arg[(2, 1, 2, 0)]=0.928571400135*x[0] + (-0.0928963077323)*x[1] + (0.513971949137)*x[2]
            ref[(2, 1, 2, 0)]=0.67482352077
            arg[(2, 1, 2, 1)]=-0.693921679981*x[0] + (-0.787095593892)*x[1] + (0.298805263502)*x[2]
            ref[(2, 1, 2, 1)]=-0.591106005185
            arg[(2, 1, 2, 2)]=0.566500257114*x[0] + (-0.433392176986)*x[1] + (-0.338313862121)*x[2]
            ref[(2, 1, 2, 2)]=-0.102602890996
            arg[(2, 2, 0, 0)]=0.483384623979*x[0] + (-0.700820934964)*x[1] + (-0.119688981891)*x[2]
            ref[(2, 2, 0, 0)]=-0.168562646438
            arg[(2, 2, 0, 1)]=-0.084515213789*x[0] + (0.824365117717)*x[1] + (0.613894321823)*x[2]
            ref[(2, 2, 0, 1)]=0.676872112875
            arg[(2, 2, 0, 2)]=0.785377804389*x[0] + (0.0429975772297)*x[1] + (0.503821673607)*x[2]
            ref[(2, 2, 0, 2)]=0.666098527613
            arg[(2, 2, 1, 0)]=0.30989635799*x[0] + (0.420393749119)*x[1] + (-0.397574488644)*x[2]
            ref[(2, 2, 1, 0)]=0.166357809233
            arg[(2, 2, 1, 1)]=0.916220057598*x[0] + (-0.419190194308)*x[1] + (0.393623177524)*x[2]
            ref[(2, 2, 1, 1)]=0.445326520407
            arg[(2, 2, 1, 2)]=-0.208888749579*x[0] + (0.811129762902)*x[1] + (0.039804841266)*x[2]
            ref[(2, 2, 1, 2)]=0.321022927294
            arg[(2, 2, 2, 0)]=-0.759087831229*x[0] + (0.431224474011)*x[1] + (-0.113729183574)*x[2]
            ref[(2, 2, 2, 0)]=-0.220796270396
            arg[(2, 2, 2, 1)]=0.152930977734*x[0] + (0.946628915904)*x[1] + (0.41058893075)*x[2]
            ref[(2, 2, 2, 1)]=0.755074412194
            arg[(2, 2, 2, 2)]=-0.605870920209*x[0] + (-0.37985043967)*x[1] + (0.0266024750542)*x[2]
            ref[(2, 2, 2, 2)]=-0.479559442412
            arg[(2, 3, 0, 0)]=-0.0240749606442*x[0] + (-0.410209548224)*x[1] + (0.0766080539052)*x[2]
            ref[(2, 3, 0, 0)]=-0.178838227482
            arg[(2, 3, 0, 1)]=0.924814692515*x[0] + (-0.0761769082543)*x[1] + (0.917620814354)*x[2]
            ref[(2, 3, 0, 1)]=0.883129299308
            arg[(2, 3, 0, 2)]=0.359572463764*x[0] + (-0.17005170552)*x[1] + (0.743613470809)*x[2]
            ref[(2, 3, 0, 2)]=0.466567114526
            arg[(2, 3, 1, 0)]=0.798951804033*x[0] + (-0.634134853528)*x[1] + (0.666567614489)*x[2]
            ref[(2, 3, 1, 0)]=0.415692282497
            arg[(2, 3, 1, 1)]=-0.618331741063*x[0] + (0.10516343645)*x[1] + (0.291984952013)*x[2]
            ref[(2, 3, 1, 1)]=-0.1105916763
            arg[(2, 3, 1, 2)]=0.271595290964*x[0] + (-0.93878710854)*x[1] + (-0.768923216009)*x[2]
            ref[(2, 3, 1, 2)]=-0.718057516792
            arg[(2, 3, 2, 0)]=0.293429383592*x[0] + (-0.5471284775)*x[1] + (0.31630612093)*x[2]
            ref[(2, 3, 2, 0)]=0.0313035135111
            arg[(2, 3, 2, 1)]=-0.0863307290095*x[0] + (-0.356130756261)*x[1] + (-0.570615955209)*x[2]
            ref[(2, 3, 2, 1)]=-0.50653872024
            arg[(2, 3, 2, 2)]=0.3007867595*x[0] + (-0.513179576374)*x[1] + (0.874976137892)*x[2]
            ref[(2, 3, 2, 2)]=0.331291660509
            arg[(3, 0, 0, 0)]=-0.122404969521*x[0] + (0.34585475657)*x[1] + (-0.966055195634)*x[2]
            ref[(3, 0, 0, 0)]=-0.371302704293
            arg[(3, 0, 0, 1)]=0.0649855364933*x[0] + (-0.267836781856)*x[1] + (0.869042347716)*x[2]
            ref[(3, 0, 0, 1)]=0.333095551177
            arg[(3, 0, 0, 2)]=-0.0160564261178*x[0] + (-0.68137755689)*x[1] + (-0.435716679231)*x[2]
            ref[(3, 0, 0, 2)]=-0.56657533112
            arg[(3, 0, 1, 0)]=0.221872281751*x[0] + (0.831064322133)*x[1] + (0.43029669953)*x[2]
            ref[(3, 0, 1, 0)]=0.741616651707
            arg[(3, 0, 1, 1)]=-0.708620809785*x[0] + (-0.663276271477)*x[1] + (-0.249752203296)*x[2]
            ref[(3, 0, 1, 1)]=-0.810824642279
            arg[(3, 0, 1, 2)]=-0.255044693658*x[0] + (-0.894377599581)*x[1] + (0.573112301772)*x[2]
            ref[(3, 0, 1, 2)]=-0.288154995734
            arg[(3, 0, 2, 0)]=0.612024661741*x[0] + (0.69873885119)*x[1] + (0.581113974867)*x[2]
            ref[(3, 0, 2, 0)]=0.945938743899
            arg[(3, 0, 2, 1)]=-0.421545268551*x[0] + (0.549541817726)*x[1] + (-0.784752033299)*x[2]
            ref[(3, 0, 2, 1)]=-0.328377742062
            arg[(3, 0, 2, 2)]=0.106171374301*x[0] + (-0.622401933184)*x[1] + (-0.222522173393)*x[2]
            ref[(3, 0, 2, 2)]=-0.369376366138
            arg[(3, 1, 0, 0)]=0.301948472439*x[0] + (0.804363896108)*x[1] + (0.577261616153)*x[2]
            ref[(3, 1, 0, 0)]=0.84178699235
            arg[(3, 1, 0, 1)]=0.514445622496*x[0] + (0.0426805732147)*x[1] + (-0.401870370059)*x[2]
            ref[(3, 1, 0, 1)]=0.0776279128259
            arg[(3, 1, 0, 2)]=-0.0362977111476*x[0] + (-0.968419623712)*x[1] + (0.845346602336)*x[2]
            ref[(3, 1, 0, 2)]=-0.0796853662621
            arg[(3, 1, 1, 0)]=0.222565532712*x[0] + (0.828102871536)*x[1] + (-0.596514907141)*x[2]
            ref[(3, 1, 1, 0)]=0.227076748554
            arg[(3, 1, 1, 1)]=-0.851546239077*x[0] + (0.350214621845)*x[1] + (0.0547079206406)*x[2]
            ref[(3, 1, 1, 1)]=-0.223311848296
            arg[(3, 1, 1, 2)]=0.56600084282*x[0] + (-0.194683653962)*x[1] + (-0.750860981709)*x[2]
            ref[(3, 1, 1, 2)]=-0.189771896425
            arg[(3, 1, 2, 0)]=-0.990565224743*x[0] + (0.667199308208)*x[1] + (0.606123589633)*x[2]
            ref[(3, 1, 2, 0)]=0.141378836549
            arg[(3, 1, 2, 1)]=0.759052995684*x[0] + (-0.946710378548)*x[1] + (-0.235029668929)*x[2]
            ref[(3, 1, 2, 1)]=-0.211343525896
            arg[(3, 1, 2, 2)]=0.188377795033*x[0] + (-0.890891177426)*x[1] + (0.0658253958177)*x[2]
            ref[(3, 1, 2, 2)]=-0.318343993288
            arg[(3, 2, 0, 0)]=0.226563797607*x[0] + (-0.0207414100099)*x[1] + (-0.861717716177)*x[2]
            ref[(3, 2, 0, 0)]=-0.32794766429
            arg[(3, 2, 0, 1)]=-0.770763342099*x[0] + (0.725998501653)*x[1] + (0.826812448743)*x[2]
            ref[(3, 2, 0, 1)]=0.391023804148
            arg[(3, 2, 0, 2)]=0.0385801071634*x[0] + (-0.155898052557)*x[1] + (-0.935073368782)*x[2]
            ref[(3, 2, 0, 2)]=-0.526195657088
            arg[(3, 2, 1, 0)]=-0.579947878451*x[0] + (0.0722404598366)*x[1] + (0.507096813758)*x[2]
            ref[(3, 2, 1, 0)]=-0.000305302428609
            arg[(3, 2, 1, 1)]=0.848548647393*x[0] + (0.106314199208)*x[1] + (-0.744249910363)*x[2]
            ref[(3, 2, 1, 1)]=0.105306468119
            arg[(3, 2, 1, 2)]=0.511767775405*x[0] + (-0.630150432079)*x[1] + (-0.237154660419)*x[2]
            ref[(3, 2, 1, 2)]=-0.177768658546
            arg[(3, 2, 2, 0)]=-0.627556727088*x[0] + (0.498372711537)*x[1] + (0.595845703973)*x[2]
            ref[(3, 2, 2, 0)]=0.233330844211
            arg[(3, 2, 2, 1)]=0.122830640924*x[0] + (-0.000142735295859)*x[1] + (-0.481610913178)*x[2]
            ref[(3, 2, 2, 1)]=-0.179461503775
            arg[(3, 2, 2, 2)]=0.867044424361*x[0] + (-0.119943114292)*x[1] + (0.0417609935922)*x[2]
            ref[(3, 2, 2, 2)]=0.394431151831
            arg[(3, 3, 0, 0)]=-0.5763540987*x[0] + (0.192674387615)*x[1] + (0.754561203009)*x[2]
            ref[(3, 3, 0, 0)]=0.185440745962
            arg[(3, 3, 0, 1)]=0.159548847399*x[0] + (0.803210692497)*x[1] + (-0.876357686101)*x[2]
            ref[(3, 3, 0, 1)]=0.0432009268975
            arg[(3, 3, 0, 2)]=0.661352683147*x[0] + (0.203526977747)*x[1] + (0.903450123944)*x[2]
            ref[(3, 3, 0, 2)]=0.884164892419
            arg[(3, 3, 1, 0)]=-0.281995870328*x[0] + (-0.35480229498)*x[1] + (0.321630741069)*x[2]
            ref[(3, 3, 1, 0)]=-0.157583712119
            arg[(3, 3, 1, 1)]=0.608942473891*x[0] + (-0.19517844704)*x[1] + (0.357591733442)*x[2]
            ref[(3, 3, 1, 1)]=0.385677880146
            arg[(3, 3, 1, 2)]=0.164789346881*x[0] + (-0.194079144044)*x[1] + (0.561049459773)*x[2]
            ref[(3, 3, 1, 2)]=0.265879831305
            arg[(3, 3, 2, 0)]=-0.130112561968*x[0] + (-0.309356585358)*x[1] + (-0.413926018126)*x[2]
            ref[(3, 3, 2, 0)]=-0.426697582726
            arg[(3, 3, 2, 1)]=0.417616593558*x[0] + (0.463572824175)*x[1] + (-0.129685384871)*x[2]
            ref[(3, 3, 2, 1)]=0.375752016431
            arg[(3, 3, 2, 2)]=-0.00222209878759*x[0] + (0.810477434131)*x[1] + (-0.742619200025)*x[2]
            ref[(3, 3, 2, 2)]=0.0328180676593
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.605691539574*x[0] + (-0.0923935233896)*x[1]
            ref=0.256649008092
        else:
            arg=0.121609229684*x[0] + (0.0537336842991)*x[1] + (0.127546487537)*x[2]
            ref=0.15144470076
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.397956393339*x[0] + (0.665204892035)*x[1]
            ref[(0,)]=0.133624249348
            arg[(1,)]=-0.308072006332*x[0] + (0.638744257179)*x[1]
            ref[(1,)]=0.165336125423
        else:
            arg[(0,)]=-0.919329210461*x[0] + (0.0130449141652)*x[1] + (0.542871696887)*x[2]
            ref[(0,)]=-0.181706299705
            arg[(1,)]=-0.256498956539*x[0] + (0.194123681577)*x[1] + (-0.350567057473)*x[2]
            ref[(1,)]=-0.206471166217
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.980638465693*x[0] + (0.100579984497)*x[1]
            ref[(0, 0)]=-0.440029240598
            arg[(0, 1)]=0.229311010766*x[0] + (0.427607132495)*x[1]
            ref[(0, 1)]=0.32845907163
            arg[(0, 2)]=-0.886382072253*x[0] + (0.23980880306)*x[1]
            ref[(0, 2)]=-0.323286634597
            arg[(0, 3)]=0.343418539682*x[0] + (-0.349032039982)*x[1]
            ref[(0, 3)]=-0.00280675014998
            arg[(1, 0)]=-0.641172869305*x[0] + (-0.711471741681)*x[1]
            ref[(1, 0)]=-0.676322305493
            arg[(1, 1)]=0.203829412598*x[0] + (-0.892896566564)*x[1]
            ref[(1, 1)]=-0.344533576983
            arg[(1, 2)]=0.0922714858295*x[0] + (0.145405244077)*x[1]
            ref[(1, 2)]=0.118838364953
            arg[(1, 3)]=0.646956358837*x[0] + (0.201582469521)*x[1]
            ref[(1, 3)]=0.424269414179
            arg[(2, 0)]=-0.574267945417*x[0] + (-0.0263733220556)*x[1]
            ref[(2, 0)]=-0.300320633736
            arg[(2, 1)]=0.826371223873*x[0] + (0.568786139689)*x[1]
            ref[(2, 1)]=0.697578681781
            arg[(2, 2)]=0.189079117336*x[0] + (-0.749170968168)*x[1]
            ref[(2, 2)]=-0.280045925416
            arg[(2, 3)]=0.331079627252*x[0] + (-0.308893633198)*x[1]
            ref[(2, 3)]=0.011092997027
        else:
            arg[(0, 0)]=0.976310794468*x[0] + (0.762023800101)*x[1] + (0.84394792784)*x[2]
            ref[(0, 0)]=1.2911412612
            arg[(0, 1)]=-0.233540648549*x[0] + (-0.90097393394)*x[1] + (-0.644662091711)*x[2]
            ref[(0, 1)]=-0.8895883371
            arg[(0, 2)]=-0.102279914212*x[0] + (0.834928912242)*x[1] + (-0.616400518523)*x[2]
            ref[(0, 2)]=0.0581242397535
            arg[(0, 3)]=-0.0515613684625*x[0] + (0.333479800063)*x[1] + (0.408222891122)*x[2]
            ref[(0, 3)]=0.345070661361
            arg[(1, 0)]=0.392394400556*x[0] + (-0.591636475858)*x[1] + (0.382461052694)*x[2]
            ref[(1, 0)]=0.091609488696
            arg[(1, 1)]=-0.974080232246*x[0] + (0.306577196057)*x[1] + (0.396299697098)*x[2]
            ref[(1, 1)]=-0.135601669546
            arg[(1, 2)]=-0.200696955821*x[0] + (0.396977610247)*x[1] + (-0.277524834783)*x[2]
            ref[(1, 2)]=-0.0406220901788
            arg[(1, 3)]=-0.580444754769*x[0] + (0.459647472315)*x[1] + (-0.474724248948)*x[2]
            ref[(1, 3)]=-0.297760765702
            arg[(2, 0)]=0.388668757911*x[0] + (-0.703580696666)*x[1] + (0.518364517623)*x[2]
            ref[(2, 0)]=0.101726289434
            arg[(2, 1)]=0.000562020774366*x[0] + (-0.254098764081)*x[1] + (0.407323338468)*x[2]
            ref[(2, 1)]=0.0768932975807
            arg[(2, 2)]=0.916927296573*x[0] + (-0.241422782005)*x[1] + (-0.897968359747)*x[2]
            ref[(2, 2)]=-0.111231922589
            arg[(2, 3)]=-0.573205991994*x[0] + (0.665615159272)*x[1] + (-0.770994070854)*x[2]
            ref[(2, 3)]=-0.339292451788
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4),w)
        ref=numpy.zeros((3, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.268011721123*x[0] + (-0.681950167062)*x[1]
            ref[(0, 0, 0)]=-0.206969222969
            arg[(0, 0, 1)]=0.429938925219*x[0] + (-0.380558979311)*x[1]
            ref[(0, 0, 1)]=0.0246899729538
            arg[(0, 0, 2)]=-0.285837695035*x[0] + (-0.177941405561)*x[1]
            ref[(0, 0, 2)]=-0.231889550298
            arg[(0, 0, 3)]=0.328258781663*x[0] + (0.577987607017)*x[1]
            ref[(0, 0, 3)]=0.45312319434
            arg[(0, 1, 0)]=-0.217895635891*x[0] + (-0.354503596142)*x[1]
            ref[(0, 1, 0)]=-0.286199616017
            arg[(0, 1, 1)]=-0.568425482362*x[0] + (0.176147640489)*x[1]
            ref[(0, 1, 1)]=-0.196138920937
            arg[(0, 1, 2)]=-0.495387290231*x[0] + (-0.242596020164)*x[1]
            ref[(0, 1, 2)]=-0.368991655198
            arg[(0, 1, 3)]=0.799276417601*x[0] + (-0.741991509981)*x[1]
            ref[(0, 1, 3)]=0.0286424538102
            arg[(1, 0, 0)]=0.709024651143*x[0] + (-0.461647053329)*x[1]
            ref[(1, 0, 0)]=0.123688798907
            arg[(1, 0, 1)]=-0.371956883565*x[0] + (-0.543253760761)*x[1]
            ref[(1, 0, 1)]=-0.457605322163
            arg[(1, 0, 2)]=-0.932648432911*x[0] + (-0.129410663297)*x[1]
            ref[(1, 0, 2)]=-0.531029548104
            arg[(1, 0, 3)]=-0.144128101976*x[0] + (-0.421851927973)*x[1]
            ref[(1, 0, 3)]=-0.282990014975
            arg[(1, 1, 0)]=0.864768635896*x[0] + (-0.62157279214)*x[1]
            ref[(1, 1, 0)]=0.121597921878
            arg[(1, 1, 1)]=-0.0808267036374*x[0] + (0.0881852840568)*x[1]
            ref[(1, 1, 1)]=0.0036792902097
            arg[(1, 1, 2)]=0.743355024333*x[0] + (-0.807289328424)*x[1]
            ref[(1, 1, 2)]=-0.0319671520456
            arg[(1, 1, 3)]=0.890743654193*x[0] + (-0.2656022096)*x[1]
            ref[(1, 1, 3)]=0.312570722296
            arg[(2, 0, 0)]=0.516651877684*x[0] + (-0.805852393328)*x[1]
            ref[(2, 0, 0)]=-0.144600257822
            arg[(2, 0, 1)]=-0.0156800318591*x[0] + (0.0136441522596)*x[1]
            ref[(2, 0, 1)]=-0.00101793979978
            arg[(2, 0, 2)]=-0.105136687381*x[0] + (-0.294447094516)*x[1]
            ref[(2, 0, 2)]=-0.199791890948
            arg[(2, 0, 3)]=-0.97439700765*x[0] + (0.854501395071)*x[1]
            ref[(2, 0, 3)]=-0.0599478062897
            arg[(2, 1, 0)]=0.963880277352*x[0] + (0.0417304972278)*x[1]
            ref[(2, 1, 0)]=0.50280538729
            arg[(2, 1, 1)]=0.605507022225*x[0] + (-0.280782838346)*x[1]
            ref[(2, 1, 1)]=0.16236209194
            arg[(2, 1, 2)]=0.339889306435*x[0] + (-0.785238747593)*x[1]
            ref[(2, 1, 2)]=-0.222674720579
            arg[(2, 1, 3)]=-0.457618564119*x[0] + (-0.683194604571)*x[1]
            ref[(2, 1, 3)]=-0.570406584345
        else:
            arg[(0, 0, 0)]=0.692798487996*x[0] + (-0.0286084022092)*x[1] + (0.258965985437)*x[2]
            ref[(0, 0, 0)]=0.461578035612
            arg[(0, 0, 1)]=-0.313613981185*x[0] + (0.298812078554)*x[1] + (0.144160347529)*x[2]
            ref[(0, 0, 1)]=0.0646792224489
            arg[(0, 0, 2)]=0.574756805002*x[0] + (-0.109178666577)*x[1] + (-0.821010310005)*x[2]
            ref[(0, 0, 2)]=-0.17771608579
            arg[(0, 0, 3)]=-0.0957102717257*x[0] + (0.149628887346)*x[1] + (0.350033867578)*x[2]
            ref[(0, 0, 3)]=0.201976241599
            arg[(0, 1, 0)]=-0.429897053986*x[0] + (0.394879181999)*x[1] + (0.963773932055)*x[2]
            ref[(0, 1, 0)]=0.464378030034
            arg[(0, 1, 1)]=-0.243124148245*x[0] + (0.377817249995)*x[1] + (-0.923073982021)*x[2]
            ref[(0, 1, 1)]=-0.394190440136
            arg[(0, 1, 2)]=-0.514991082947*x[0] + (0.918154235553)*x[1] + (-0.231322034834)*x[2]
            ref[(0, 1, 2)]=0.0859205588861
            arg[(0, 1, 3)]=0.916381008645*x[0] + (0.625123956784)*x[1] + (-0.720668564461)*x[2]
            ref[(0, 1, 3)]=0.410418200484
            arg[(1, 0, 0)]=-0.530916915203*x[0] + (-0.281185379467)*x[1] + (-0.290509924592)*x[2]
            ref[(1, 0, 0)]=-0.551306109631
            arg[(1, 0, 1)]=-0.967812987792*x[0] + (-0.461902057004)*x[1] + (0.499016770719)*x[2]
            ref[(1, 0, 1)]=-0.465349137038
            arg[(1, 0, 2)]=0.904476976488*x[0] + (0.70674459134)*x[1] + (0.861916810079)*x[2]
            ref[(1, 0, 2)]=1.23656918895
            arg[(1, 0, 3)]=0.41037284722*x[0] + (0.701441558659)*x[1] + (0.75666318304)*x[2]
            ref[(1, 0, 3)]=0.93423879446
            arg[(1, 1, 0)]=0.259646599765*x[0] + (0.791679855765)*x[1] + (-0.810549513878)*x[2]
            ref[(1, 1, 0)]=0.120388470826
            arg[(1, 1, 1)]=0.618127623719*x[0] + (-0.38881800659)*x[1] + (-0.600131059297)*x[2]
            ref[(1, 1, 1)]=-0.185410721084
            arg[(1, 1, 2)]=0.376667120268*x[0] + (0.37850942493)*x[1] + (-0.591176189806)*x[2]
            ref[(1, 1, 2)]=0.0820001776961
            arg[(1, 1, 3)]=0.917130034271*x[0] + (-0.920772350835)*x[1] + (0.862652090351)*x[2]
            ref[(1, 1, 3)]=0.429504886894
            arg[(2, 0, 0)]=-0.910541721331*x[0] + (-0.634952098137)*x[1] + (-0.728977900943)*x[2]
            ref[(2, 0, 0)]=-1.13723586021
            arg[(2, 0, 1)]=0.38588717561*x[0] + (0.40211936092)*x[1] + (-0.726581962065)*x[2]
            ref[(2, 0, 1)]=0.0307122872327
            arg[(2, 0, 2)]=-0.710425334725*x[0] + (0.345714578995)*x[1] + (0.525142490254)*x[2]
            ref[(2, 0, 2)]=0.0802158672617
            arg[(2, 0, 3)]=0.161814716832*x[0] + (0.526648074791)*x[1] + (-0.447558076087)*x[2]
            ref[(2, 0, 3)]=0.120452357768
            arg[(2, 1, 0)]=0.159408096033*x[0] + (0.614362022135)*x[1] + (-0.619656967112)*x[2]
            ref[(2, 1, 0)]=0.0770565755279
            arg[(2, 1, 1)]=-0.9845402914*x[0] + (0.668383389025)*x[1] + (-0.982517406738)*x[2]
            ref[(2, 1, 1)]=-0.649337154556
            arg[(2, 1, 2)]=0.513275962208*x[0] + (-0.60540126198)*x[1] + (0.999085134456)*x[2]
            ref[(2, 1, 2)]=0.453479917342
            arg[(2, 1, 3)]=0.0084210211321*x[0] + (0.678440012789)*x[1] + (-0.517570431547)*x[2]
            ref[(2, 1, 3)]=0.0846453011873
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 2),w)
        ref=numpy.zeros((4, 3, 2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.23696080618*x[0] + (0.154432259588)*x[1]
            ref[(0, 0, 0, 0)]=-0.0412642732961
            arg[(0, 0, 0, 1)]=0.671854250782*x[0] + (0.118229530751)*x[1]
            ref[(0, 0, 0, 1)]=0.395041890767
            arg[(0, 0, 1, 0)]=0.895933836663*x[0] + (0.457681152713)*x[1]
            ref[(0, 0, 1, 0)]=0.676807494688
            arg[(0, 0, 1, 1)]=0.263696428814*x[0] + (0.855507714276)*x[1]
            ref[(0, 0, 1, 1)]=0.559602071545
            arg[(0, 1, 0, 0)]=0.974147323279*x[0] + (-0.00789348184703)*x[1]
            ref[(0, 1, 0, 0)]=0.483126920716
            arg[(0, 1, 0, 1)]=0.332321979452*x[0] + (0.723152414197)*x[1]
            ref[(0, 1, 0, 1)]=0.527737196825
            arg[(0, 1, 1, 0)]=0.344263474414*x[0] + (0.441447394904)*x[1]
            ref[(0, 1, 1, 0)]=0.392855434659
            arg[(0, 1, 1, 1)]=0.55822893529*x[0] + (-0.733754031735)*x[1]
            ref[(0, 1, 1, 1)]=-0.0877625482226
            arg[(0, 2, 0, 0)]=-0.524256977658*x[0] + (0.222947666988)*x[1]
            ref[(0, 2, 0, 0)]=-0.150654655335
            arg[(0, 2, 0, 1)]=-0.457040829475*x[0] + (0.463688248428)*x[1]
            ref[(0, 2, 0, 1)]=0.00332370947618
            arg[(0, 2, 1, 0)]=-0.45790167591*x[0] + (-0.520740028763)*x[1]
            ref[(0, 2, 1, 0)]=-0.489320852336
            arg[(0, 2, 1, 1)]=-0.20924898412*x[0] + (0.709948044921)*x[1]
            ref[(0, 2, 1, 1)]=0.2503495304
            arg[(1, 0, 0, 0)]=0.113306801056*x[0] + (-0.0229364639352)*x[1]
            ref[(1, 0, 0, 0)]=0.0451851685606
            arg[(1, 0, 0, 1)]=-0.473273383854*x[0] + (-0.868612206961)*x[1]
            ref[(1, 0, 0, 1)]=-0.670942795408
            arg[(1, 0, 1, 0)]=-0.386089204357*x[0] + (-0.720108122582)*x[1]
            ref[(1, 0, 1, 0)]=-0.553098663469
            arg[(1, 0, 1, 1)]=0.557804805695*x[0] + (-0.232447750922)*x[1]
            ref[(1, 0, 1, 1)]=0.162678527386
            arg[(1, 1, 0, 0)]=0.914579687799*x[0] + (-0.820851714156)*x[1]
            ref[(1, 1, 0, 0)]=0.0468639868215
            arg[(1, 1, 0, 1)]=-0.240178663689*x[0] + (-0.839826847651)*x[1]
            ref[(1, 1, 0, 1)]=-0.54000275567
            arg[(1, 1, 1, 0)]=0.46134354678*x[0] + (0.60516769812)*x[1]
            ref[(1, 1, 1, 0)]=0.53325562245
            arg[(1, 1, 1, 1)]=0.123681503204*x[0] + (0.574601134705)*x[1]
            ref[(1, 1, 1, 1)]=0.349141318954
            arg[(1, 2, 0, 0)]=-0.43233132258*x[0] + (-0.342714097743)*x[1]
            ref[(1, 2, 0, 0)]=-0.387522710162
            arg[(1, 2, 0, 1)]=0.807327313194*x[0] + (0.295483157542)*x[1]
            ref[(1, 2, 0, 1)]=0.551405235368
            arg[(1, 2, 1, 0)]=-0.81445706792*x[0] + (0.552999461101)*x[1]
            ref[(1, 2, 1, 0)]=-0.130728803409
            arg[(1, 2, 1, 1)]=0.389777553023*x[0] + (-0.626839829722)*x[1]
            ref[(1, 2, 1, 1)]=-0.118531138349
            arg[(2, 0, 0, 0)]=-0.617610912218*x[0] + (-0.0238279211668)*x[1]
            ref[(2, 0, 0, 0)]=-0.320719416692
            arg[(2, 0, 0, 1)]=-0.999044200076*x[0] + (-0.831454546401)*x[1]
            ref[(2, 0, 0, 1)]=-0.915249373238
            arg[(2, 0, 1, 0)]=0.472038496024*x[0] + (0.428248743327)*x[1]
            ref[(2, 0, 1, 0)]=0.450143619675
            arg[(2, 0, 1, 1)]=-0.126219597788*x[0] + (0.154760805909)*x[1]
            ref[(2, 0, 1, 1)]=0.0142706040608
            arg[(2, 1, 0, 0)]=0.0459898273798*x[0] + (-0.713469270471)*x[1]
            ref[(2, 1, 0, 0)]=-0.333739721545
            arg[(2, 1, 0, 1)]=0.789976648954*x[0] + (0.745481692716)*x[1]
            ref[(2, 1, 0, 1)]=0.767729170835
            arg[(2, 1, 1, 0)]=0.395333605331*x[0] + (0.155081280917)*x[1]
            ref[(2, 1, 1, 0)]=0.275207443124
            arg[(2, 1, 1, 1)]=0.76702595922*x[0] + (-0.684814054907)*x[1]
            ref[(2, 1, 1, 1)]=0.0411059521565
            arg[(2, 2, 0, 0)]=-0.0957644423033*x[0] + (0.271166606169)*x[1]
            ref[(2, 2, 0, 0)]=0.087701081933
            arg[(2, 2, 0, 1)]=0.366432334262*x[0] + (0.214572639681)*x[1]
            ref[(2, 2, 0, 1)]=0.290502486972
            arg[(2, 2, 1, 0)]=-0.0597553275436*x[0] + (-0.699753062746)*x[1]
            ref[(2, 2, 1, 0)]=-0.379754195145
            arg[(2, 2, 1, 1)]=-0.303947333984*x[0] + (0.5796860051)*x[1]
            ref[(2, 2, 1, 1)]=0.137869335558
            arg[(3, 0, 0, 0)]=0.283865438749*x[0] + (0.0501876258367)*x[1]
            ref[(3, 0, 0, 0)]=0.167026532293
            arg[(3, 0, 0, 1)]=-0.091300873203*x[0] + (0.0306726243883)*x[1]
            ref[(3, 0, 0, 1)]=-0.0303141244074
            arg[(3, 0, 1, 0)]=-0.925220221821*x[0] + (0.653255848792)*x[1]
            ref[(3, 0, 1, 0)]=-0.135982186515
            arg[(3, 0, 1, 1)]=0.796737688634*x[0] + (-0.622918285356)*x[1]
            ref[(3, 0, 1, 1)]=0.0869097016388
            arg[(3, 1, 0, 0)]=-0.906364572534*x[0] + (0.728986629783)*x[1]
            ref[(3, 1, 0, 0)]=-0.0886889713754
            arg[(3, 1, 0, 1)]=0.355651581819*x[0] + (-0.359779441638)*x[1]
            ref[(3, 1, 0, 1)]=-0.00206392990948
            arg[(3, 1, 1, 0)]=-0.749949603068*x[0] + (-0.407475308614)*x[1]
            ref[(3, 1, 1, 0)]=-0.578712455841
            arg[(3, 1, 1, 1)]=-0.250704479288*x[0] + (-0.204745487599)*x[1]
            ref[(3, 1, 1, 1)]=-0.227724983443
            arg[(3, 2, 0, 0)]=-0.841577081474*x[0] + (-0.719891082265)*x[1]
            ref[(3, 2, 0, 0)]=-0.780734081869
            arg[(3, 2, 0, 1)]=-0.523122051258*x[0] + (-0.127100817847)*x[1]
            ref[(3, 2, 0, 1)]=-0.325111434552
            arg[(3, 2, 1, 0)]=0.534961711784*x[0] + (0.600389871985)*x[1]
            ref[(3, 2, 1, 0)]=0.567675791884
            arg[(3, 2, 1, 1)]=0.687841283635*x[0] + (-0.975488282232)*x[1]
            ref[(3, 2, 1, 1)]=-0.143823499298
        else:
            arg[(0, 0, 0, 0)]=-0.801487021135*x[0] + (-0.41828415341)*x[1] + (0.248666455869)*x[2]
            ref[(0, 0, 0, 0)]=-0.485552359338
            arg[(0, 0, 0, 1)]=-0.0839648871199*x[0] + (-0.858456610287)*x[1] + (-0.34005940063)*x[2]
            ref[(0, 0, 0, 1)]=-0.641240449018
            arg[(0, 0, 1, 0)]=-0.686039218378*x[0] + (-0.0123359235033)*x[1] + (0.00546413693993)*x[2]
            ref[(0, 0, 1, 0)]=-0.346455502471
            arg[(0, 0, 1, 1)]=0.123724558454*x[0] + (-0.297771167317)*x[1] + (0.0479204968655)*x[2]
            ref[(0, 0, 1, 1)]=-0.0630630559986
            arg[(0, 1, 0, 0)]=0.972345783589*x[0] + (0.489353773662)*x[1] + (0.979351632405)*x[2]
            ref[(0, 1, 0, 0)]=1.22052559483
            arg[(0, 1, 0, 1)]=-0.923655431533*x[0] + (-0.0888304606559)*x[1] + (0.619146828662)*x[2]
            ref[(0, 1, 0, 1)]=-0.196669531763
            arg[(0, 1, 1, 0)]=-0.854087897495*x[0] + (0.325759293431)*x[1] + (-0.448203899634)*x[2]
            ref[(0, 1, 1, 0)]=-0.488266251849
            arg[(0, 1, 1, 1)]=-0.871701007577*x[0] + (0.380188605506)*x[1] + (-0.685790015628)*x[2]
            ref[(0, 1, 1, 1)]=-0.588651208849
            arg[(0, 2, 0, 0)]=-0.373840722225*x[0] + (0.517560475889)*x[1] + (0.0900853497497)*x[2]
            ref[(0, 2, 0, 0)]=0.116902551707
            arg[(0, 2, 0, 1)]=0.710014961622*x[0] + (0.400891323229)*x[1] + (-0.684779524833)*x[2]
            ref[(0, 2, 0, 1)]=0.213063380009
            arg[(0, 2, 1, 0)]=0.294508055613*x[0] + (0.441424834977)*x[1] + (-0.630250683703)*x[2]
            ref[(0, 2, 1, 0)]=0.0528411034434
            arg[(0, 2, 1, 1)]=0.382339197517*x[0] + (0.90268214051)*x[1] + (-0.467696372063)*x[2]
            ref[(0, 2, 1, 1)]=0.408662482982
            arg[(1, 0, 0, 0)]=0.841964865995*x[0] + (0.0223932707629)*x[1] + (-0.365010413886)*x[2]
            ref[(1, 0, 0, 0)]=0.249673861436
            arg[(1, 0, 0, 1)]=0.199093816724*x[0] + (0.295055042685)*x[1] + (0.170533077003)*x[2]
            ref[(1, 0, 0, 1)]=0.332340968206
            arg[(1, 0, 1, 0)]=-0.429169902282*x[0] + (0.336806273347)*x[1] + (-0.955160818717)*x[2]
            ref[(1, 0, 1, 0)]=-0.523762223826
            arg[(1, 0, 1, 1)]=0.786359741509*x[0] + (0.348393495597)*x[1] + (-0.617494582822)*x[2]
            ref[(1, 0, 1, 1)]=0.258629327142
            arg[(1, 1, 0, 0)]=-0.153941491352*x[0] + (0.161981362266)*x[1] + (-0.731368092734)*x[2]
            ref[(1, 1, 0, 0)]=-0.36166411091
            arg[(1, 1, 0, 1)]=0.321348422678*x[0] + (0.766195140657)*x[1] + (0.873741383319)*x[2]
            ref[(1, 1, 0, 1)]=0.980642473327
            arg[(1, 1, 1, 0)]=-0.832746647821*x[0] + (-0.104434490504)*x[1] + (0.198329720064)*x[2]
            ref[(1, 1, 1, 0)]=-0.369425709131
            arg[(1, 1, 1, 1)]=0.74764002531*x[0] + (-0.684879897667)*x[1] + (0.146967335652)*x[2]
            ref[(1, 1, 1, 1)]=0.104863731647
            arg[(1, 2, 0, 0)]=0.362765269507*x[0] + (0.479857590794)*x[1] + (0.964613940365)*x[2]
            ref[(1, 2, 0, 0)]=0.903618400333
            arg[(1, 2, 0, 1)]=0.696646525478*x[0] + (0.436701718651)*x[1] + (0.101966746012)*x[2]
            ref[(1, 2, 0, 1)]=0.61765749507
            arg[(1, 2, 1, 0)]=0.014043009998*x[0] + (0.723856409726)*x[1] + (0.105188466273)*x[2]
            ref[(1, 2, 1, 0)]=0.421543942998
            arg[(1, 2, 1, 1)]=-0.674924990731*x[0] + (-0.726073887273)*x[1] + (0.502488722009)*x[2]
            ref[(1, 2, 1, 1)]=-0.449255077997
            arg[(2, 0, 0, 0)]=-0.258589320296*x[0] + (0.298253184937)*x[1] + (-0.556175242788)*x[2]
            ref[(2, 0, 0, 0)]=-0.258255689073
            arg[(2, 0, 0, 1)]=-0.773237710859*x[0] + (0.662850579668)*x[1] + (-0.937036922611)*x[2]
            ref[(2, 0, 0, 1)]=-0.523712026901
            arg[(2, 0, 1, 0)]=0.0879818345137*x[0] + (-0.679837678881)*x[1] + (0.943971567584)*x[2]
            ref[(2, 0, 1, 0)]=0.176057861609
            arg[(2, 0, 1, 1)]=0.627977743845*x[0] + (-0.573217982712)*x[1] + (-0.883951453073)*x[2]
            ref[(2, 0, 1, 1)]=-0.41459584597
            arg[(2, 1, 0, 0)]=-0.0769874927285*x[0] + (0.0724426727557)*x[1] + (-0.148165699677)*x[2]
            ref[(2, 1, 0, 0)]=-0.0763552598247
            arg[(2, 1, 0, 1)]=0.762783566932*x[0] + (0.346578349673)*x[1] + (-0.688273721412)*x[2]
            ref[(2, 1, 0, 1)]=0.210544097597
            arg[(2, 1, 1, 0)]=-0.87263570271*x[0] + (-0.0394828603869)*x[1] + (-0.353045758146)*x[2]
            ref[(2, 1, 1, 0)]=-0.632582160621
            arg[(2, 1, 1, 1)]=0.810121539822*x[0] + (0.785844736699)*x[1] + (-0.573636260214)*x[2]
            ref[(2, 1, 1, 1)]=0.511165008153
            arg[(2, 2, 0, 0)]=-0.126215812191*x[0] + (-0.971937510217)*x[1] + (-0.219658254876)*x[2]
            ref[(2, 2, 0, 0)]=-0.658905788642
            arg[(2, 2, 0, 1)]=0.302906395647*x[0] + (0.968566921174)*x[1] + (0.323286365917)*x[2]
            ref[(2, 2, 0, 1)]=0.797379841369
            arg[(2, 2, 1, 0)]=-0.667867437422*x[0] + (0.101691913366)*x[1] + (0.800301958276)*x[2]
            ref[(2, 2, 1, 0)]=0.11706321711
            arg[(2, 2, 1, 1)]=-0.120589132967*x[0] + (-0.830796731874)*x[1] + (-0.371533018499)*x[2]
            ref[(2, 2, 1, 1)]=-0.66145944167
            arg[(3, 0, 0, 0)]=0.964695567204*x[0] + (-0.980427044215)*x[1] + (0.696120503952)*x[2]
            ref[(3, 0, 0, 0)]=0.34019451347
            arg[(3, 0, 0, 1)]=0.93924480676*x[0] + (-0.779723992055)*x[1] + (0.283201632108)*x[2]
            ref[(3, 0, 0, 1)]=0.221361223407
            arg[(3, 0, 1, 0)]=0.132608654654*x[0] + (-0.598037123777)*x[1] + (-0.648394736544)*x[2]
            ref[(3, 0, 1, 0)]=-0.556911602834
            arg[(3, 0, 1, 1)]=-0.466930408462*x[0] + (-0.673079435287)*x[1] + (-0.0359421277311)*x[2]
            ref[(3, 0, 1, 1)]=-0.58797598574
            arg[(3, 1, 0, 0)]=-0.462392290161*x[0] + (-0.53466963944)*x[1] + (-0.952116642064)*x[2]
            ref[(3, 1, 0, 0)]=-0.974589285832
            arg[(3, 1, 0, 1)]=-0.846204530391*x[0] + (0.663639039197)*x[1] + (0.207914695396)*x[2]
            ref[(3, 1, 0, 1)]=0.0126746021008
            arg[(3, 1, 1, 0)]=0.488103585666*x[0] + (-0.0152706876212)*x[1] + (0.243475970836)*x[2]
            ref[(3, 1, 1, 0)]=0.358154434441
            arg[(3, 1, 1, 1)]=-0.500246504805*x[0] + (0.407105985276)*x[1] + (0.0766027501233)*x[2]
            ref[(3, 1, 1, 1)]=-0.00826888470296
            arg[(3, 2, 0, 0)]=-0.269944449689*x[0] + (0.325692486613)*x[1] + (0.825157452324)*x[2]
            ref[(3, 2, 0, 0)]=0.440452744624
            arg[(3, 2, 0, 1)]=0.781143996256*x[0] + (0.210933194087)*x[1] + (-0.674459609105)*x[2]
            ref[(3, 2, 0, 1)]=0.158808790619
            arg[(3, 2, 1, 0)]=-0.806950074736*x[0] + (0.41288796945)*x[1] + (0.264171471335)*x[2]
            ref[(3, 2, 1, 0)]=-0.0649453169751
            arg[(3, 2, 1, 1)]=-0.218411631144*x[0] + (0.599868484726)*x[1] + (-0.308176559869)*x[2]
            ref[(3, 2, 1, 1)]=0.0366401468568
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Function_rank0(self):
        """
        tests integral of rank 0 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.905589882796*x[0]**o + (-0.734606299454)*x[0] + (-0.493255165793)*x[1]**o + (-0.0988312297685)*x[1]
            ref=-1.11614128891-(-0.233140841432)*(o-1.)
        else:
            arg=0.192568789998*x[0]**o + (0.836413185277)*x[0] + (-0.313076842621)*x[1]**o + (0.794224229286)*x[1] + (0.0874387355097)*x[2]**o + (-0.310119011041)*x[2]
            ref=0.643724543205-(-0.00551155285229)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Function_rank1(self):
        """
        tests integral of rank 1 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.140466645186*x[0]**o + (-0.415842773968)*x[0] + (-0.417355396136)*x[1]**o + (0.344077515923)*x[1]
            ref[(0,)]=-0.314793649683-(-0.0929703402204)*(o-1.)
            arg[(1,)]=-0.0607885885496*x[0]**o + (0.103647211021)*x[0] + (0.309176886862)*x[1]**o + (0.130677520815)*x[1]
            ref[(1,)]=0.241356515074-(0.0413980497188)*(o-1.)
            arg[(2,)]=0.0691557460166*x[0]**o + (0.894081809134)*x[0] + (-0.153521301887)*x[1]**o + (0.07545014788)*x[1]
            ref[(2,)]=0.442583200572-(-0.0140609259784)*(o-1.)
        else:
            arg[(0,)]=-0.279179378274*x[0]**o + (0.475967444139)*x[0] + (-0.439544496476)*x[1]**o + (0.789884364382)*x[1] + (0.139014941086)*x[2]**o + (0.241467000307)*x[2]
            ref[(0,)]=0.463804937582-(-0.0966181556106)*(o-1.)
            arg[(1,)]=-0.567292120845*x[0]**o + (0.0679637417664)*x[0] + (0.660805677514)*x[1]**o + (-0.0675392276976)*x[1] + (0.914453007619)*x[2]**o + (-0.0883022546796)*x[2]
            ref[(1,)]=0.460044411839-(0.167994427381)*(o-1.)
            arg[(2,)]=0.41034217469*x[0]**o + (0.987683088725)*x[0] + (0.832579475152)*x[1]**o + (0.320178183636)*x[1] + (0.920942585004)*x[2]**o + (-0.618466016403)*x[2]
            ref[(2,)]=1.4266297454-(0.360644039141)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Function_rank2(self):
        """
        tests integral of rank 2 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.15083386317*x[0]**o + (-0.320295573556)*x[0] + (-0.06628678745)*x[1]**o + (-0.665699963224)*x[1]
            ref[(0, 0)]=-0.45072423053-(0.0140911792867)*(o-1.)
            arg[(0, 1)]=0.4606337082*x[0]**o + (0.59957050601)*x[0] + (0.380154362514)*x[1]**o + (-0.441751442975)*x[1]
            ref[(0, 1)]=0.499303566874-(0.140131345119)*(o-1.)
            arg[(1, 0)]=-0.604625074955*x[0]**o + (0.22811404776)*x[0] + (0.0552071062626)*x[1]**o + (0.937999146813)*x[1]
            ref[(1, 0)]=0.30834761294-(-0.0915696614488)*(o-1.)
            arg[(1, 1)]=0.803582480116*x[0]**o + (0.349945917729)*x[0] + (0.701133431481)*x[1]**o + (-0.988453826722)*x[1]
            ref[(1, 1)]=0.433104001302-(0.250785985266)*(o-1.)
            arg[(2, 0)]=-0.9702308847*x[0]**o + (-0.723933190643)*x[0] + (0.0528316201282)*x[1]**o + (0.916264068096)*x[1]
            ref[(2, 0)]=-0.36253419356-(-0.152899877429)*(o-1.)
            arg[(2, 1)]=-0.992679094865*x[0]**o + (-0.8047295294)*x[0] + (0.815268402588)*x[1]**o + (-0.190235419249)*x[1]
            ref[(2, 1)]=-0.586187820463-(-0.0295684487128)*(o-1.)
            arg[(3, 0)]=-0.205422569545*x[0]**o + (0.620662029833)*x[0] + (0.971666371362)*x[1]**o + (0.0882629513979)*x[1]
            ref[(3, 0)]=0.737584391524-(0.127707300303)*(o-1.)
            arg[(3, 1)]=-0.684891249084*x[0]**o + (-0.878127489413)*x[0] + (0.956532829)*x[1]**o + (0.574583417225)*x[1]
            ref[(3, 1)]=-0.0159512461357-(0.0452735966527)*(o-1.)
        else:
            arg[(0, 0)]=0.74509473113*x[0]**o + (0.759730192837)*x[0] + (-0.506831427335)*x[1]**o + (0.607414748702)*x[1] + (-0.362269699499)*x[2]**o + (-0.648732903327)*x[2]
            ref[(0, 0)]=0.297202821254-(-0.0206677326173)*(o-1.)
            arg[(0, 1)]=-0.546987398928*x[0]**o + (-0.144051067137)*x[0] + (-0.0111461801269)*x[1]**o + (0.436202786424)*x[1] + (-0.679651165711)*x[2]**o + (-0.583615603624)*x[2]
            ref[(0, 1)]=-0.764624314551-(-0.206297457461)*(o-1.)
            arg[(1, 0)]=0.341295356673*x[0]**o + (0.609178746507)*x[0] + (-0.602384618505)*x[1]**o + (-0.546588631847)*x[1] + (0.665629965581)*x[2]**o + (0.154606730501)*x[2]
            ref[(1, 0)]=0.310868774455-(0.0674234506249)*(o-1.)
            arg[(1, 1)]=0.703787492278*x[0]**o + (-0.424034857319)*x[0] + (0.172294656767)*x[1]**o + (-0.892909954235)*x[1] + (-0.476588974777)*x[2]**o + (-0.0972294681548)*x[2]
            ref[(1, 1)]=-0.50734055272-(0.0665821957114)*(o-1.)
            arg[(2, 0)]=-0.750645650729*x[0]**o + (-0.724196622032)*x[0] + (-0.440850237005)*x[1]**o + (-0.671322886248)*x[1] + (0.0201644950269)*x[2]**o + (0.676729697048)*x[2]
            ref[(2, 0)]=-0.94506060197-(-0.195221898785)*(o-1.)
            arg[(2, 1)]=0.225021392493*x[0]**o + (-0.928188022761)*x[0] + (0.52644710853)*x[1]**o + (0.848820767699)*x[1] + (0.623184322089)*x[2]**o + (0.819638693672)*x[2]
            ref[(2, 1)]=1.05746213086-(0.229108803852)*(o-1.)
            arg[(3, 0)]=-0.781091722275*x[0]**o + (0.610293423425)*x[0] + (-0.824950292779)*x[1]**o + (-0.440822364948)*x[1] + (0.912526916966)*x[2]**o + (0.525476074542)*x[2]
            ref[(3, 0)]=0.000716017465234-(-0.115585849681)*(o-1.)
            arg[(3, 1)]=0.0276047744353*x[0]**o + (0.313646504761)*x[0] + (0.49935464888)*x[1]**o + (0.648433551692)*x[1] + (-0.0423334615901)*x[2]**o + (0.659332483998)*x[2]
            ref[(3, 1)]=1.05301925109-(0.0807709936209)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Function_rank3(self):
        """
        tests integral of rank 3 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4),w)
        ref=numpy.zeros((3, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.715928485901*x[0]**o + (-0.670428087637)*x[0] + (0.164469597317)*x[1]**o + (-0.196233994453)*x[1]
            ref[(0, 0, 0)]=-0.709060485337-(-0.091909814764)*(o-1.)
            arg[(0, 0, 1)]=0.555854383731*x[0]**o + (0.843913875246)*x[0] + (0.862523437611)*x[1]**o + (-0.220773045305)*x[1]
            ref[(0, 0, 1)]=1.02075932564-(0.236396303557)*(o-1.)
            arg[(0, 0, 2)]=-0.280123208497*x[0]**o + (-0.485245223222)*x[0] + (-0.690544009667)*x[1]**o + (-0.326560687905)*x[1]
            ref[(0, 0, 2)]=-0.891236564645-(-0.161777869694)*(o-1.)
            arg[(0, 0, 3)]=0.802687890876*x[0]**o + (0.159055783403)*x[0] + (0.982257480774)*x[1]**o + (-0.370658853948)*x[1]
            ref[(0, 0, 3)]=0.786671150553-(0.297490895275)*(o-1.)
            arg[(0, 1, 0)]=-0.880664443778*x[0]**o + (-0.906369507325)*x[0] + (-0.517043807756)*x[1]**o + (0.282093776508)*x[1]
            ref[(0, 1, 0)]=-1.01099199118-(-0.232951375256)*(o-1.)
            arg[(0, 1, 1)]=0.139122744969*x[0]**o + (0.71802621612)*x[0] + (0.536626192896)*x[1]**o + (-0.707273426743)*x[1]
            ref[(0, 1, 1)]=0.343250863621-(0.112624822977)*(o-1.)
            arg[(0, 1, 2)]=0.0257652114876*x[0]**o + (0.701414529915)*x[0] + (0.0802832078711)*x[1]**o + (-0.550167787936)*x[1]
            ref[(0, 1, 2)]=0.128647580669-(0.0176747365598)*(o-1.)
            arg[(0, 1, 3)]=-0.281339913348*x[0]**o + (0.229524649186)*x[0] + (-0.820810320532)*x[1]**o + (-0.122092627809)*x[1]
            ref[(0, 1, 3)]=-0.497359106251-(-0.183691705647)*(o-1.)
            arg[(1, 0, 0)]=-0.852081808055*x[0]**o + (0.109459315761)*x[0] + (0.938496113995)*x[1]**o + (-0.847142796419)*x[1]
            ref[(1, 0, 0)]=-0.32563458736-(0.0144023843232)*(o-1.)
            arg[(1, 0, 1)]=-0.734785833867*x[0]**o + (0.183488358913)*x[0] + (0.650074600695)*x[1]**o + (0.917762093512)*x[1]
            ref[(1, 0, 1)]=0.508269609626-(-0.0141185388621)*(o-1.)
            arg[(1, 0, 2)]=-0.260704471218*x[0]**o + (-0.327909107813)*x[0] + (-0.310726472722)*x[1]**o + (0.0179866713714)*x[1]
            ref[(1, 0, 2)]=-0.440676690191-(-0.0952384906567)*(o-1.)
            arg[(1, 0, 3)]=-0.370732481965*x[0]**o + (0.604755241228)*x[0] + (-0.804454073278)*x[1]**o + (-0.648838501816)*x[1]
            ref[(1, 0, 3)]=-0.609634907915-(-0.195864425874)*(o-1.)
            arg[(1, 1, 0)]=0.718485821154*x[0]**o + (-0.391599133299)*x[0] + (0.488494894683)*x[1]**o + (-0.75961764548)*x[1]
            ref[(1, 1, 0)]=0.0278819685292-(0.20116345264)*(o-1.)
            arg[(1, 1, 1)]=0.442200353486*x[0]**o + (0.699358119066)*x[0] + (0.988796767786)*x[1]**o + (-0.246759944478)*x[1]
            ref[(1, 1, 1)]=0.94179764793-(0.238499520212)*(o-1.)
            arg[(1, 1, 2)]=0.916689050032*x[0]**o + (0.0887502286631)*x[0] + (0.0763199086496)*x[1]**o + (-0.555471850743)*x[1]
            ref[(1, 1, 2)]=0.263143668301-(0.165501493114)*(o-1.)
            arg[(1, 1, 3)]=-0.50479352386*x[0]**o + (-0.497576826701)*x[0] + (-0.120258645971)*x[1]**o + (-0.0769690617616)*x[1]
            ref[(1, 1, 3)]=-0.599799029147-(-0.104175361639)*(o-1.)
            arg[(2, 0, 0)]=-0.0788255743521*x[0]**o + (0.704685048524)*x[0] + (-0.675837161257)*x[1]**o + (0.98808710956)*x[1]
            ref[(2, 0, 0)]=0.469054711237-(-0.125777122602)*(o-1.)
            arg[(2, 0, 1)]=-0.110079157744*x[0]**o + (0.380563764614)*x[0] + (-0.436004063988)*x[1]**o + (0.146884656172)*x[1]
            ref[(2, 0, 1)]=-0.00931740047236-(-0.0910138702886)*(o-1.)
            arg[(2, 0, 2)]=0.0794913390613*x[0]**o + (-0.816456125396)*x[0] + (-0.408874089357)*x[1]**o + (-0.234309826737)*x[1]
            ref[(2, 0, 2)]=-0.690074351214-(-0.0548971250492)*(o-1.)
            arg[(2, 0, 3)]=0.0821215159491*x[0]**o + (-0.74998575663)*x[0] + (-0.559386721632)*x[1]**o + (0.846751669314)*x[1]
            ref[(2, 0, 3)]=-0.1902496465-(-0.0795442009472)*(o-1.)
            arg[(2, 1, 0)]=-0.4149891589*x[0]**o + (-0.316570616596)*x[0] + (0.651731779014)*x[1]**o + (-0.112770952978)*x[1]
            ref[(2, 1, 0)]=-0.0962994747303-(0.0394571033523)*(o-1.)
            arg[(2, 1, 1)]=0.20561270389*x[0]**o + (-0.589909579624)*x[0] + (-0.341874843009)*x[1]**o + (-0.203158814664)*x[1]
            ref[(2, 1, 1)]=-0.464665266704-(-0.0227103565198)*(o-1.)
            arg[(2, 1, 2)]=0.212544015592*x[0]**o + (0.759550781792)*x[0] + (-0.674850921981)*x[1]**o + (0.829194040345)*x[1]
            ref[(2, 1, 2)]=0.563218957874-(-0.0770511510648)*(o-1.)
            arg[(2, 1, 3)]=-0.0633156582471*x[0]**o + (0.180569508999)*x[0] + (-0.143512850255)*x[1]**o + (-0.909366152758)*x[1]
            ref[(2, 1, 3)]=-0.467812576131-(-0.0344714180836)*(o-1.)
        else:
            arg[(0, 0, 0)]=0.641159601504*x[0]**o + (-0.613750533422)*x[0] + (-0.910647990224)*x[1]**o + (0.638242830032)*x[1] + (0.817045813653)*x[2]**o + (0.426680845666)*x[2]
            ref[(0, 0, 0)]=0.499365283605-(0.0912595708223)*(o-1.)
            arg[(0, 0, 1)]=0.149742805347*x[0]**o + (0.778568455643)*x[0] + (0.449940081676)*x[1]**o + (-0.128431056175)*x[1] + (0.371377448857)*x[2]**o + (-0.120624289551)*x[2]
            ref[(0, 0, 1)]=0.750286722898-(0.161843389313)*(o-1.)
            arg[(0, 0, 2)]=0.50859985807*x[0]**o + (0.42053121426)*x[0] + (0.1594813052)*x[1]**o + (0.961950325066)*x[1] + (-0.488295655928)*x[2]**o + (0.97727463071)*x[2]
            ref[(0, 0, 2)]=1.26977083869-(0.0299642512236)*(o-1.)
            arg[(0, 0, 3)]=0.660502099306*x[0]**o + (0.637045622963)*x[0] + (0.851488479195)*x[1]**o + (-0.154993497757)*x[1] + (0.172446661083)*x[2]**o + (-0.743452997966)*x[2]
            ref[(0, 0, 3)]=0.711518183412-(0.280739539931)*(o-1.)
            arg[(0, 1, 0)]=0.253845223202*x[0]**o + (0.318228022469)*x[0] + (0.805345659521)*x[1]**o + (0.24175650351)*x[1] + (0.99168937366)*x[2]**o + (0.667427933007)*x[2]
            ref[(0, 1, 0)]=1.63914635768-(0.341813376064)*(o-1.)
            arg[(0, 1, 1)]=0.303539201528*x[0]**o + (-0.322400924539)*x[0] + (-0.985397655434)*x[1]**o + (-0.841838106371)*x[1] + (0.563009808198)*x[2]**o + (-0.729830239037)*x[2]
            ref[(0, 1, 1)]=-1.00645895783-(-0.019808107618)*(o-1.)
            arg[(0, 1, 2)]=-0.951905403128*x[0]**o + (0.403658288334)*x[0] + (-0.075062913402)*x[1]**o + (-0.243556856476)*x[1] + (-0.173765829122)*x[2]**o + (-0.000280357304945)*x[2]
            ref[(0, 1, 2)]=-0.52045653555-(-0.200122357609)*(o-1.)
            arg[(0, 1, 3)]=-0.967279271897*x[0]**o + (0.617069954834)*x[0] + (0.843151499223)*x[1]**o + (0.828646209511)*x[1] + (-0.692502513502)*x[2]**o + (-0.653594594866)*x[2]
            ref[(0, 1, 3)]=-0.0122543583484-(-0.136105047696)*(o-1.)
            arg[(1, 0, 0)]=-0.192350080579*x[0]**o + (0.439470853275)*x[0] + (0.305872191513)*x[1]**o + (0.602188554917)*x[1] + (0.0158355635529)*x[2]**o + (0.393200767391)*x[2]
            ref[(1, 0, 0)]=0.782108925035-(0.0215596124144)*(o-1.)
            arg[(1, 0, 1)]=-0.824651711979*x[0]**o + (-0.71121403792)*x[0] + (-0.585226283431)*x[1]**o + (-0.21624580257)*x[1] + (-0.9554908761)*x[2]**o + (0.0204409217584)*x[2]
            ref[(1, 0, 1)]=-1.63619389512-(-0.394228145252)*(o-1.)
            arg[(1, 0, 2)]=0.00287581881325*x[0]**o + (0.635576111057)*x[0] + (-0.419362434557)*x[1]**o + (-0.167531740102)*x[1] + (0.992218088574)*x[2]**o + (0.527815830902)*x[2]
            ref[(1, 0, 2)]=0.785795837344-(0.0959552454717)*(o-1.)
            arg[(1, 0, 3)]=-0.792621107554*x[0]**o + (-0.579821986413)*x[0] + (-0.181931555504)*x[1]**o + (0.313870734199)*x[1] + (-0.263721327538)*x[2]**o + (-0.218341829821)*x[2]
            ref[(1, 0, 3)]=-0.861283536315-(-0.206378998433)*(o-1.)
            arg[(1, 1, 0)]=0.391856146153*x[0]**o + (0.260240273746)*x[0] + (-0.815161465431)*x[1]**o + (-0.258754049812)*x[1] + (-0.479264781598)*x[2]**o + (0.398264163922)*x[2]
            ref[(1, 1, 0)]=-0.25140985651-(-0.150428350146)*(o-1.)
            arg[(1, 1, 1)]=-0.410535323129*x[0]**o + (-0.53254446375)*x[0] + (-0.85392956395)*x[1]**o + (0.766229432463)*x[1] + (-0.199161511869)*x[2]**o + (0.108248285244)*x[2]
            ref[(1, 1, 1)]=-0.560846572496-(-0.243937733158)*(o-1.)
            arg[(1, 1, 2)]=-0.132826276921*x[0]**o + (-0.911835983601)*x[0] + (0.783411033577)*x[1]**o + (-0.559538228544)*x[1] + (0.743611479126)*x[2]**o + (-0.702761267151)*x[2]
            ref[(1, 1, 2)]=-0.389969621757-(0.232366039297)*(o-1.)
            arg[(1, 1, 3)]=-0.140283462188*x[0]**o + (0.377131957662)*x[0] + (-0.469461578635)*x[1]**o + (-0.139022103568)*x[1] + (-0.984048829261)*x[2]**o + (-0.0434543844191)*x[2]
            ref[(1, 1, 3)]=-0.699569200205-(-0.265632311681)*(o-1.)
            arg[(2, 0, 0)]=-0.133328613066*x[0]**o + (0.150701526208)*x[0] + (0.45993048641)*x[1]**o + (0.466091237672)*x[1] + (-0.241307425712)*x[2]**o + (-0.573281195562)*x[2]
            ref[(2, 0, 0)]=0.0644030079748-(0.014215741272)*(o-1.)
            arg[(2, 0, 1)]=0.433248808189*x[0]**o + (-0.395044245344)*x[0] + (0.952910368737)*x[1]**o + (-0.480135057345)*x[1] + (-0.835857614017)*x[2]**o + (0.597596326922)*x[2]
            ref[(2, 0, 1)]=0.136359293571-(0.0917169271515)*(o-1.)
            arg[(2, 0, 2)]=0.517379439947*x[0]**o + (-0.931374034728)*x[0] + (-0.603366098392)*x[1]**o + (-0.368057946728)*x[1] + (0.276015528123)*x[2]**o + (-0.921420302344)*x[2]
            ref[(2, 0, 2)]=-1.01541170706-(0.0316714782797)*(o-1.)
            arg[(2, 0, 3)]=0.829797843058*x[0]**o + (0.0696036114884)*x[0] + (-0.272398855554)*x[1]**o + (0.0430943582338)*x[1] + (0.429407194577)*x[2]**o + (0.0597197636764)*x[2]
            ref[(2, 0, 3)]=0.57961195774-(0.164467697013)*(o-1.)
            arg[(2, 1, 0)]=0.24951538885*x[0]**o + (-0.823893443094)*x[0] + (0.335607925259)*x[1]**o + (-0.541700220463)*x[1] + (0.471276626558)*x[2]**o + (0.871610157196)*x[2]
            ref[(2, 1, 0)]=0.281208217153-(0.176066656778)*(o-1.)
            arg[(2, 1, 1)]=-0.984604554048*x[0]**o + (-0.524021684417)*x[0] + (-0.236730857227)*x[1]**o + (0.103763888402)*x[1] + (-0.929647449511)*x[2]**o + (0.642479238054)*x[2]
            ref[(2, 1, 1)]=-0.964380709374-(-0.358497143464)*(o-1.)
            arg[(2, 1, 2)]=-0.135412269956*x[0]**o + (0.622647814134)*x[0] + (-0.786559224755)*x[1]**o + (-0.540073970965)*x[1] + (0.595465682473)*x[2]**o + (0.470307721246)*x[2]
            ref[(2, 1, 2)]=0.113187876088-(-0.0544176353731)*(o-1.)
            arg[(2, 1, 3)]=-0.334168916428*x[0]**o + (0.318894104127)*x[0] + (0.356281150695)*x[1]**o + (0.883863093887)*x[1] + (0.689779941134)*x[2]**o + (-0.206392811786)*x[2]
            ref[(2, 1, 3)]=0.854128280815-(0.1186486959)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunction_fromData_Function_rank4(self):
        """
        tests integral of rank 4 Data on Function

        assumptions: Function(self.domain) exists
                     self.domain supports integral on Function
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = Function(self.domain)
        w = Function(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3, 2),w)
        ref=numpy.zeros((3, 4, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.622980655799*x[0]**o + (-0.884275606528)*x[0] + (-0.280243678513)*x[1]**o + (-0.562325113176)*x[1]
            ref[(0, 0, 0, 0)]=-0.551931871209-(0.0571228295477)*(o-1.)
            arg[(0, 0, 0, 1)]=0.649882151399*x[0]**o + (0.141445750407)*x[0] + (0.560331109762)*x[1]**o + (-0.066165332729)*x[1]
            ref[(0, 0, 0, 1)]=0.64274683942-(0.201702210194)*(o-1.)
            arg[(0, 0, 1, 0)]=0.497388807036*x[0]**o + (0.482320939106)*x[0] + (-0.605837578401)*x[1]**o + (-0.344076242632)*x[1]
            ref[(0, 0, 1, 0)]=0.0148979625544-(-0.0180747952275)*(o-1.)
            arg[(0, 0, 1, 1)]=-0.679652373519*x[0]**o + (-0.485189486874)*x[0] + (0.0868475046176)*x[1]**o + (-0.631326150535)*x[1]
            ref[(0, 0, 1, 1)]=-0.854660253155-(-0.0988008114835)*(o-1.)
            arg[(0, 0, 2, 0)]=0.0868196993395*x[0]**o + (-0.26147004244)*x[0] + (0.115010095475)*x[1]**o + (0.227006688719)*x[1]
            ref[(0, 0, 2, 0)]=0.0836832205466-(0.0336382991358)*(o-1.)
            arg[(0, 0, 2, 1)]=0.137349203171*x[0]**o + (-0.970549058368)*x[0] + (0.127422293107)*x[1]**o + (-0.893891633541)*x[1]
            ref[(0, 0, 2, 1)]=-0.799834597815-(0.044128582713)*(o-1.)
            arg[(0, 1, 0, 0)]=0.555944393874*x[0]**o + (-0.740257138484)*x[0] + (0.377721564663)*x[1]**o + (-0.312433637621)*x[1]
            ref[(0, 1, 0, 0)]=-0.0595124087838-(0.15561099309)*(o-1.)
            arg[(0, 1, 0, 1)]=0.477430659502*x[0]**o + (-0.667404072218)*x[0] + (-0.974194475762)*x[1]**o + (0.633448827511)*x[1]
            ref[(0, 1, 0, 1)]=-0.265359530483-(-0.0827939693767)*(o-1.)
            arg[(0, 1, 1, 0)]=-0.377453514333*x[0]**o + (-0.601114749942)*x[0] + (0.564018804677)*x[1]**o + (-0.925099711919)*x[1]
            ref[(0, 1, 1, 0)]=-0.669824585759-(0.0310942150572)*(o-1.)
            arg[(0, 1, 1, 1)]=0.670058206427*x[0]**o + (0.126527918805)*x[0] + (-0.510939911828)*x[1]**o + (-0.173443748342)*x[1]
            ref[(0, 1, 1, 1)]=0.0561012325305-(0.0265197157664)*(o-1.)
            arg[(0, 1, 2, 0)]=-0.271022682183*x[0]**o + (0.223680281373)*x[0] + (-0.77767497851)*x[1]**o + (-0.545505737985)*x[1]
            ref[(0, 1, 2, 0)]=-0.685261558652-(-0.174782943449)*(o-1.)
            arg[(0, 1, 2, 1)]=-0.924055162336*x[0]**o + (-0.986144308417)*x[0] + (0.811140736175)*x[1]**o + (0.363095954801)*x[1]
            ref[(0, 1, 2, 1)]=-0.367981389888-(-0.0188190710268)*(o-1.)
            arg[(0, 2, 0, 0)]=-0.388041829303*x[0]**o + (-0.38423567505)*x[0] + (-0.370019798335)*x[1]**o + (-0.354945434666)*x[1]
            ref[(0, 2, 0, 0)]=-0.748621368677-(-0.126343604606)*(o-1.)
            arg[(0, 2, 0, 1)]=-0.118478057244*x[0]**o + (-0.616111041027)*x[0] + (0.96378247283)*x[1]**o + (-0.127055134214)*x[1]
            ref[(0, 2, 0, 1)]=0.0510691201718-(0.140884069264)*(o-1.)
            arg[(0, 2, 1, 0)]=0.845184606892*x[0]**o + (0.548888323028)*x[0] + (-0.705213975787)*x[1]**o + (0.594470324811)*x[1]
            ref[(0, 2, 1, 0)]=0.641664639472-(0.0233284385176)*(o-1.)
            arg[(0, 2, 1, 1)]=-0.76571592847*x[0]**o + (0.00403820743118)*x[0] + (0.230156616135)*x[1]**o + (0.195653630776)*x[1]
            ref[(0, 2, 1, 1)]=-0.167933737064-(-0.0892598853892)*(o-1.)
            arg[(0, 2, 2, 0)]=0.184713116897*x[0]**o + (-0.347910716307)*x[0] + (-0.501334863262)*x[1]**o + (0.947583256122)*x[1]
            ref[(0, 2, 2, 0)]=0.141525396725-(-0.0527702910609)*(o-1.)
            arg[(0, 2, 2, 1)]=0.281220985907*x[0]**o + (-0.214726703516)*x[0] + (0.361581284369)*x[1]**o + (-0.135551655939)*x[1]
            ref[(0, 2, 2, 1)]=0.146261955411-(0.107133711713)*(o-1.)
            arg[(0, 3, 0, 0)]=0.0295963351696*x[0]**o + (-0.923833262772)*x[0] + (-0.986126013025)*x[1]**o + (0.986583025687)*x[1]
            ref[(0, 3, 0, 0)]=-0.44688995747-(-0.159421612976)*(o-1.)
            arg[(0, 3, 0, 1)]=0.0859834893513*x[0]**o + (0.185512352785)*x[0] + (0.0743536754394)*x[1]**o + (-0.417774397453)*x[1]
            ref[(0, 3, 0, 1)]=-0.0359624399385-(0.0267228607984)*(o-1.)
            arg[(0, 3, 1, 0)]=0.960928897491*x[0]**o + (-0.911352233673)*x[0] + (-0.377890076031)*x[1]**o + (0.549853218935)*x[1]
            ref[(0, 3, 1, 0)]=0.110769903362-(0.0971731369101)*(o-1.)
            arg[(0, 3, 1, 1)]=0.83891900461*x[0]**o + (0.634628404324)*x[0] + (0.154225276796)*x[1]**o + (0.632662927336)*x[1]
            ref[(0, 3, 1, 1)]=1.13021780653-(0.165524046901)*(o-1.)
            arg[(0, 3, 2, 0)]=-0.694169074767*x[0]**o + (-0.354286199248)*x[0] + (-0.160176790717)*x[1]**o + (-0.871366636785)*x[1]
            ref[(0, 3, 2, 0)]=-1.03999935076-(-0.142390977581)*(o-1.)
            arg[(0, 3, 2, 1)]=0.201868421255*x[0]**o + (-0.835429652545)*x[0] + (0.776454126594)*x[1]**o + (-0.952398085197)*x[1]
            ref[(0, 3, 2, 1)]=-0.404752594946-(0.163053757975)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.74621868696*x[0]**o + (0.0268187627922)*x[0] + (-0.576270104434)*x[1]**o + (0.700884233803)*x[1]
            ref[(1, 0, 0, 0)]=-0.297392897399-(-0.220414798566)*(o-1.)
            arg[(1, 0, 0, 1)]=0.621121023289*x[0]**o + (0.069468431747)*x[0] + (0.492964295243)*x[1]**o + (-0.624659893332)*x[1]
            ref[(1, 0, 0, 1)]=0.279446928473-(0.185680886422)*(o-1.)
            arg[(1, 0, 1, 0)]=0.540073853016*x[0]**o + (-0.647792790019)*x[0] + (-0.758932333524)*x[1]**o + (0.271136395614)*x[1]
            ref[(1, 0, 1, 0)]=-0.297757437457-(-0.0364764134179)*(o-1.)
            arg[(1, 0, 1, 1)]=-0.370523011022*x[0]**o + (0.946378676511)*x[0] + (-0.262472645299)*x[1]**o + (0.00199185896617)*x[1]
            ref[(1, 0, 1, 1)]=0.157687439578-(-0.105499276054)*(o-1.)
            arg[(1, 0, 2, 0)]=0.408931588107*x[0]**o + (0.223708223279)*x[0] + (0.296371810227)*x[1]**o + (-0.698103552459)*x[1]
            ref[(1, 0, 2, 0)]=0.115454034577-(0.117550566389)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.371627307474*x[0]**o + (0.862113225715)*x[0] + (0.887141462044)*x[1]**o + (-0.8064934131)*x[1]
            ref[(1, 0, 2, 1)]=0.285566983592-(0.0859190257617)*(o-1.)
            arg[(1, 1, 0, 0)]=-0.495669506525*x[0]**o + (0.810108869082)*x[0] + (-0.772235853163)*x[1]**o + (0.0450347608751)*x[1]
            ref[(1, 1, 0, 0)]=-0.206380864865-(-0.211317559948)*(o-1.)
            arg[(1, 1, 0, 1)]=-0.533340658741*x[0]**o + (-0.327705173422)*x[0] + (-0.879188747389)*x[1]**o + (0.50906452194)*x[1]
            ref[(1, 1, 0, 1)]=-0.615585028806-(-0.235421567688)*(o-1.)
            arg[(1, 1, 1, 0)]=0.801026163949*x[0]**o + (0.694547905881)*x[0] + (0.18461963741)*x[1]**o + (0.165408770151)*x[1]
            ref[(1, 1, 1, 0)]=0.922801238695-(0.164274300226)*(o-1.)
            arg[(1, 1, 1, 1)]=0.763668812872*x[0]**o + (-0.317296061108)*x[0] + (-0.753141627358)*x[1]**o + (0.239586590794)*x[1]
            ref[(1, 1, 1, 1)]=-0.0335911423996-(0.00175453091904)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.15785883444*x[0]**o + (-0.757026564236)*x[0] + (0.706357376698)*x[1]**o + (-0.276423840929)*x[1]
            ref[(1, 1, 2, 0)]=-0.242475931454-(0.0914164237096)*(o-1.)
            arg[(1, 1, 2, 1)]=0.121512057049*x[0]**o + (0.186462777798)*x[0] + (0.361273021861)*x[1]**o + (-0.962468030317)*x[1]
            ref[(1, 1, 2, 1)]=-0.146610086804-(0.0804641798185)*(o-1.)
            arg[(1, 2, 0, 0)]=-0.0817402867045*x[0]**o + (-0.800722371359)*x[0] + (0.150135802926)*x[1]**o + (-0.47114145452)*x[1]
            ref[(1, 2, 0, 0)]=-0.601734154829-(0.0113992527035)*(o-1.)
            arg[(1, 2, 0, 1)]=0.127100882131*x[0]**o + (-0.980425539399)*x[0] + (-0.575491383659)*x[1]**o + (-0.00755665872557)*x[1]
            ref[(1, 2, 0, 1)]=-0.718186349826-(-0.0747317502546)*(o-1.)
            arg[(1, 2, 1, 0)]=0.461545361883*x[0]**o + (0.100688054367)*x[0] + (-0.625208232091)*x[1]**o + (0.540597591165)*x[1]
            ref[(1, 2, 1, 0)]=0.238811387662-(-0.0272771450348)*(o-1.)
            arg[(1, 2, 1, 1)]=-0.341429329102*x[0]**o + (0.478910735934)*x[0] + (-0.510418399061)*x[1]**o + (0.181339523041)*x[1]
            ref[(1, 2, 1, 1)]=-0.0957987345938-(-0.14197462136)*(o-1.)
            arg[(1, 2, 2, 0)]=0.567228952903*x[0]**o + (-0.542648391974)*x[0] + (0.414705253461)*x[1]**o + (0.937920186133)*x[1]
            ref[(1, 2, 2, 0)]=0.688603000262-(0.163655701061)*(o-1.)
            arg[(1, 2, 2, 1)]=0.58750364968*x[0]**o + (0.676433399393)*x[0] + (0.885200677623)*x[1]**o + (0.114165790041)*x[1]
            ref[(1, 2, 2, 1)]=1.13165175837-(0.245450721217)*(o-1.)
            arg[(1, 3, 0, 0)]=0.367745040118*x[0]**o + (-0.792084773099)*x[0] + (-0.169192870671)*x[1]**o + (-0.152614175215)*x[1]
            ref[(1, 3, 0, 0)]=-0.373073389434-(0.0330920282411)*(o-1.)
            arg[(1, 3, 0, 1)]=0.462334923144*x[0]**o + (0.280900160354)*x[0] + (0.104161863728)*x[1]**o + (0.461617498946)*x[1]
            ref[(1, 3, 0, 1)]=0.654507223086-(0.0944161311453)*(o-1.)
            arg[(1, 3, 1, 0)]=0.914516789806*x[0]**o + (0.189285628365)*x[0] + (0.696425334497)*x[1]**o + (0.782196322301)*x[1]
            ref[(1, 3, 1, 0)]=1.29121203748-(0.268490354051)*(o-1.)
            arg[(1, 3, 1, 1)]=-0.747876792541*x[0]**o + (-0.228240535674)*x[0] + (-0.357471101369)*x[1]**o + (-0.729344293221)*x[1]
            ref[(1, 3, 1, 1)]=-1.0314663614-(-0.184224648985)*(o-1.)
            arg[(1, 3, 2, 0)]=-0.48027732615*x[0]**o + (0.259944924405)*x[0] + (-0.576361957464)*x[1]**o + (-0.538291267572)*x[1]
            ref[(1, 3, 2, 0)]=-0.66749281339-(-0.176106547269)*(o-1.)
            arg[(1, 3, 2, 1)]=-0.531888532253*x[0]**o + (0.926210970972)*x[0] + (0.360764559294)*x[1]**o + (0.811022169563)*x[1]
            ref[(1, 3, 2, 1)]=0.783054583788-(-0.0285206621598)*(o-1.)
            arg[(2, 0, 0, 0)]=-0.282473812785*x[0]**o + (0.841464325625)*x[0] + (0.165785378924)*x[1]**o + (-0.583529760912)*x[1]
            ref[(2, 0, 0, 0)]=0.0706230654263-(-0.0194480723102)*(o-1.)
            arg[(2, 0, 0, 1)]=0.604707414056*x[0]**o + (0.967646246874)*x[0] + (-0.181083182854)*x[1]**o + (0.843748086589)*x[1]
            ref[(2, 0, 0, 1)]=1.11750928233-(0.0706040385337)*(o-1.)
            arg[(2, 0, 1, 0)]=-0.462033938684*x[0]**o + (-0.625552002557)*x[0] + (0.672909321528)*x[1]**o + (-0.502513830862)*x[1]
            ref[(2, 0, 1, 0)]=-0.458595225287-(0.0351458971407)*(o-1.)
            arg[(2, 0, 1, 1)]=0.902555438377*x[0]**o + (-0.494615657194)*x[0] + (-0.302701891852)*x[1]**o + (0.487198790863)*x[1]
            ref[(2, 0, 1, 1)]=0.296218340097-(0.0999755910874)*(o-1.)
            arg[(2, 0, 2, 0)]=0.347938011018*x[0]**o + (0.969822945225)*x[0] + (0.150033239002)*x[1]**o + (0.24456271493)*x[1]
            ref[(2, 0, 2, 0)]=0.856178455087-(0.0829952083366)*(o-1.)
            arg[(2, 0, 2, 1)]=-0.635029393664*x[0]**o + (0.059943679894)*x[0] + (0.898019899128)*x[1]**o + (-0.431840206771)*x[1]
            ref[(2, 0, 2, 1)]=-0.0544530107063-(0.0438317509107)*(o-1.)
            arg[(2, 1, 0, 0)]=0.344207508656*x[0]**o + (-0.124858524194)*x[0] + (-0.140628176287)*x[1]**o + (-0.755735330703)*x[1]
            ref[(2, 1, 0, 0)]=-0.338507261264-(0.0339298887283)*(o-1.)
            arg[(2, 1, 0, 1)]=-0.817012739359*x[0]**o + (0.224912260872)*x[0] + (0.628713550644)*x[1]**o + (-0.467762443672)*x[1]
            ref[(2, 1, 0, 1)]=-0.215574685757-(-0.0313831981192)*(o-1.)
            arg[(2, 1, 1, 0)]=0.912098640935*x[0]**o + (-0.533735753838)*x[0] + (0.163270792903)*x[1]**o + (0.337487951195)*x[1]
            ref[(2, 1, 1, 0)]=0.439560815598-(0.179228238973)*(o-1.)
            arg[(2, 1, 1, 1)]=0.424764822587*x[0]**o + (0.0722824980383)*x[0] + (0.993023354837)*x[1]**o + (0.301469921154)*x[1]
            ref[(2, 1, 1, 1)]=0.895770298308-(0.236298029571)*(o-1.)
            arg[(2, 1, 2, 0)]=-0.198139712852*x[0]**o + (0.454928109051)*x[0] + (0.683333599928)*x[1]**o + (0.923973560607)*x[1]
            ref[(2, 1, 2, 0)]=0.932047778367-(0.080865647846)*(o-1.)
            arg[(2, 1, 2, 1)]=0.918369394639*x[0]**o + (-0.584149116249)*x[0] + (0.197302507654)*x[1]**o + (0.501198100827)*x[1]
            ref[(2, 1, 2, 1)]=0.516360443435-(0.185945317049)*(o-1.)
            arg[(2, 2, 0, 0)]=-0.0338572781744*x[0]**o + (0.0897062723902)*x[0] + (0.871406072623)*x[1]**o + (-0.184283861572)*x[1]
            ref[(2, 2, 0, 0)]=0.371485602633-(0.139591465741)*(o-1.)
            arg[(2, 2, 0, 1)]=0.701941886596*x[0]**o + (0.0810993461483)*x[0] + (-0.990798900496)*x[1]**o + (0.221562505131)*x[1]
            ref[(2, 2, 0, 1)]=0.00690241869007-(-0.0481428356499)*(o-1.)
            arg[(2, 2, 1, 0)]=0.683615816454*x[0]**o + (0.927774342903)*x[0] + (-0.407779957591)*x[1]**o + (-0.434825753128)*x[1]
            ref[(2, 2, 1, 0)]=0.384392224319-(0.0459726431439)*(o-1.)
            arg[(2, 2, 1, 1)]=0.155876502704*x[0]**o + (0.498215893092)*x[0] + (0.6041421109)*x[1]**o + (0.884206893398)*x[1]
            ref[(2, 2, 1, 1)]=1.07122070005-(0.126669768934)*(o-1.)
            arg[(2, 2, 2, 0)]=0.0654574965754*x[0]**o + (-0.580799653092)*x[0] + (-0.897536119352)*x[1]**o + (0.668661286285)*x[1]
            ref[(2, 2, 2, 0)]=-0.372108494792-(-0.138679770463)*(o-1.)
            arg[(2, 2, 2, 1)]=0.821772142906*x[0]**o + (-0.376954102065)*x[0] + (0.516059156651)*x[1]**o + (-0.802255517943)*x[1]
            ref[(2, 2, 2, 1)]=0.079310839775-(0.22297188326)*(o-1.)
            arg[(2, 3, 0, 0)]=0.102403670091*x[0]**o + (-0.335879009004)*x[0] + (0.665662336521)*x[1]**o + (0.202910823025)*x[1]
            ref[(2, 3, 0, 0)]=0.317548910316-(0.128011001102)*(o-1.)
            arg[(2, 3, 0, 1)]=-0.213777241037*x[0]**o + (0.044992983979)*x[0] + (0.0336274960395)*x[1]**o + (0.254378409015)*x[1]
            ref[(2, 3, 0, 1)]=0.059610823998-(-0.0300249574996)*(o-1.)
            arg[(2, 3, 1, 0)]=0.970244303212*x[0]**o + (-0.997000474633)*x[0] + (0.854901829904)*x[1]**o + (0.762171175685)*x[1]
            ref[(2, 3, 1, 0)]=0.795158417084-(0.304191022186)*(o-1.)
            arg[(2, 3, 1, 1)]=0.424060664815*x[0]**o + (0.938557426257)*x[0] + (-0.829362726943)*x[1]**o + (0.140005088377)*x[1]
            ref[(2, 3, 1, 1)]=0.336630226253-(-0.0675503436879)*(o-1.)
            arg[(2, 3, 2, 0)]=0.867992454859*x[0]**o + (-0.188056813622)*x[0] + (-0.163815725508)*x[1]**o + (0.143318584111)*x[1]
            ref[(2, 3, 2, 0)]=0.32971924992-(0.117362788225)*(o-1.)
            arg[(2, 3, 2, 1)]=0.422269600911*x[0]**o + (-0.699153322408)*x[0] + (0.932502462541)*x[1]**o + (0.500895640228)*x[1]
            ref[(2, 3, 2, 1)]=0.578257190636-(0.225795343909)*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=-0.612604884508*x[0]**o + (0.653168000274)*x[0] + (0.79007260768)*x[1]**o + (-0.305580455625)*x[1] + (0.982089939777)*x[2]**o + (-0.192794222826)*x[2]
            ref[(0, 0, 0, 0)]=0.657175492386-(0.193259610492)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.621820614309*x[0]**o + (0.304037175307)*x[0] + (0.378374280362)*x[1]**o + (0.868168482804)*x[1] + (-0.120870199731)*x[2]**o + (-0.760317027047)*x[2]
            ref[(0, 0, 0, 1)]=0.0237860486924-(-0.0607194222798)*(o-1.)
            arg[(0, 0, 1, 0)]=-0.434499743334*x[0]**o + (0.983119143632)*x[0] + (0.163116217512)*x[1]**o + (-0.950469206705)*x[1] + (0.501151339692)*x[2]**o + (-0.0542630018811)*x[2]
            ref[(0, 0, 1, 0)]=0.104077374458-(0.038294635645)*(o-1.)
            arg[(0, 0, 1, 1)]=-0.768315011305*x[0]**o + (-0.603606543509)*x[0] + (0.718027324972)*x[1]**o + (0.276715665422)*x[1] + (-0.341312769289)*x[2]**o + (-0.735433716415)*x[2]
            ref[(0, 0, 1, 1)]=-0.726962525062-(-0.0652667426036)*(o-1.)
            arg[(0, 0, 2, 0)]=-0.628854120012*x[0]**o + (0.526616947888)*x[0] + (-0.675476519214)*x[1]**o + (-0.196369105287)*x[1] + (-0.463643183053)*x[2]**o + (0.648788712751)*x[2]
            ref[(0, 0, 2, 0)]=-0.394468633464-(-0.294662303713)*(o-1.)
            arg[(0, 0, 2, 1)]=0.703927431466*x[0]**o + (-0.367235021897)*x[0] + (0.171941646911)*x[1]**o + (0.394712286913)*x[1] + (0.813997036061)*x[2]**o + (-0.184517261863)*x[2]
            ref[(0, 0, 2, 1)]=0.766413058795-(0.281644352406)*(o-1.)
            arg[(0, 1, 0, 0)]=-0.0399573893485*x[0]**o + (-0.0184105316571)*x[0] + (0.503723123266)*x[1]**o + (-0.576233186339)*x[1] + (-0.165637309206)*x[2]**o + (0.268543065436)*x[2]
            ref[(0, 1, 0, 0)]=-0.013986113925-(0.0496880707851)*(o-1.)
            arg[(0, 1, 0, 1)]=0.708154538923*x[0]**o + (0.735299650735)*x[0] + (0.379960065825)*x[1]**o + (0.483875768372)*x[1] + (0.728081647566)*x[2]**o + (0.00977737841956)*x[2]
            ref[(0, 1, 0, 1)]=1.52257452492-(0.302699375386)*(o-1.)
            arg[(0, 1, 1, 0)]=0.922250521412*x[0]**o + (0.364896360524)*x[0] + (0.202250886002)*x[1]**o + (-0.122828027175)*x[1] + (-0.185905541451)*x[2]**o + (0.128967139329)*x[2]
            ref[(0, 1, 1, 0)]=0.654815669321-(0.156432644327)*(o-1.)
            arg[(0, 1, 1, 1)]=0.0282173463349*x[0]**o + (0.815444658399)*x[0] + (-0.749555340737)*x[1]**o + (-0.0864674440875)*x[1] + (0.967964701233)*x[2]**o + (-0.196948027503)*x[2]
            ref[(0, 1, 1, 1)]=0.38932794682-(0.0411044511386)*(o-1.)
            arg[(0, 1, 2, 0)]=0.380405007401*x[0]**o + (0.19467370163)*x[0] + (-0.0372847071623)*x[1]**o + (0.57838843989)*x[1] + (-0.701167168181)*x[2]**o + (-0.403820725387)*x[2]
            ref[(0, 1, 2, 0)]=0.00559727409534-(-0.0596744779904)*(o-1.)
            arg[(0, 1, 2, 1)]=0.236132868883*x[0]**o + (0.643122434144)*x[0] + (0.925341655165)*x[1]**o + (-0.819023822905)*x[1] + (-0.839759642595)*x[2]**o + (0.929539204623)*x[2]
            ref[(0, 1, 2, 1)]=0.537676348658-(0.0536191469089)*(o-1.)
            arg[(0, 2, 0, 0)]=-0.350189656185*x[0]**o + (-0.576246710016)*x[0] + (0.381682437266)*x[1]**o + (-0.253372560006)*x[1] + (0.837871738706)*x[2]**o + (-0.901257041003)*x[2]
            ref[(0, 2, 0, 0)]=-0.43075589562-(0.144894086631)*(o-1.)
            arg[(0, 2, 0, 1)]=-0.311816290526*x[0]**o + (-0.104962931825)*x[0] + (0.259785294488)*x[1]**o + (0.227296416)*x[1] + (-0.384966188504)*x[2]**o + (-0.354807147771)*x[2]
            ref[(0, 2, 0, 1)]=-0.334735424069-(-0.0728328640904)*(o-1.)
            arg[(0, 2, 1, 0)]=-0.0569223974224*x[0]**o + (0.317743305881)*x[0] + (-0.477109473022)*x[1]**o + (0.50033826846)*x[1] + (0.373428338934)*x[2]**o + (0.652930157654)*x[2]
            ref[(0, 2, 1, 0)]=0.655204100242-(-0.0267672552517)*(o-1.)
            arg[(0, 2, 1, 1)]=-0.0983637954257*x[0]**o + (-0.258397056599)*x[0] + (0.151673043158)*x[1]**o + (0.826014295526)*x[1] + (-0.615996550508)*x[2]**o + (0.134078026859)*x[2]
            ref[(0, 2, 1, 1)]=0.0695039815054-(-0.0937812171293)*(o-1.)
            arg[(0, 2, 2, 0)]=-0.00434107921153*x[0]**o + (0.703780108085)*x[0] + (-0.421343644096)*x[1]**o + (-0.506838015773)*x[1] + (0.599092993659)*x[2]**o + (0.759975421135)*x[2]
            ref[(0, 2, 2, 0)]=0.565162891899-(0.028901378392)*(o-1.)
            arg[(0, 2, 2, 1)]=-0.172730331584*x[0]**o + (0.451561744136)*x[0] + (0.338329540802)*x[1]**o + (-0.133697175835)*x[1] + (0.914435551126)*x[2]**o + (0.563133727355)*x[2]
            ref[(0, 2, 2, 1)]=0.980516528001-(0.180005793391)*(o-1.)
            arg[(0, 3, 0, 0)]=0.48514885649*x[0]**o + (0.250678661576)*x[0] + (-0.530021410261)*x[1]**o + (-0.0957231253837)*x[1] + (-0.032144981731)*x[2]**o + (-0.107289766022)*x[2]
            ref[(0, 3, 0, 0)]=-0.0146758826655-(-0.0128362559169)*(o-1.)
            arg[(0, 3, 0, 1)]=0.933396725612*x[0]**o + (0.661351296566)*x[0] + (-0.988021534444)*x[1]**o + (0.381653350561)*x[1] + (-0.693032257557)*x[2]**o + (-0.266691123179)*x[2]
            ref[(0, 3, 0, 1)]=0.0143282287798-(-0.124609511065)*(o-1.)
            arg[(0, 3, 1, 0)]=-0.797255338022*x[0]**o + (0.0367711143526)*x[0] + (-0.702175757159)*x[1]**o + (-0.532420246108)*x[1] + (0.212831050583)*x[2]**o + (0.554750453363)*x[2]
            ref[(0, 3, 1, 0)]=-0.613749361495-(-0.214433340766)*(o-1.)
            arg[(0, 3, 1, 1)]=-0.248042394028*x[0]**o + (-0.783395798465)*x[0] + (-0.852301507722)*x[1]**o + (-0.651976015726)*x[1] + (0.282181152549)*x[2]**o + (-0.290484927118)*x[2]
            ref[(0, 3, 1, 1)]=-1.27200974526-(-0.1363604582)*(o-1.)
            arg[(0, 3, 2, 0)]=0.432703876589*x[0]**o + (0.0785417514864)*x[0] + (0.786540363501)*x[1]**o + (-0.368530235986)*x[1] + (0.643734154139)*x[2]**o + (0.0392105331251)*x[2]
            ref[(0, 3, 2, 0)]=0.806100221428-(0.310496399038)*(o-1.)
            arg[(0, 3, 2, 1)]=0.498522382074*x[0]**o + (-0.190535026367)*x[0] + (0.371369243528)*x[1]**o + (0.365528949679)*x[1] + (-0.732807512952)*x[2]**o + (-0.454471949777)*x[2]
            ref[(0, 3, 2, 1)]=-0.0711969569079-(0.0228473521082)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.0183372635742*x[0]**o + (-0.526649481238)*x[0] + (-0.643380059806)*x[1]**o + (-0.754149835463)*x[1] + (0.836981783014)*x[2]**o + (0.24950823037)*x[2]
            ref[(1, 0, 0, 0)]=-0.428013313349-(0.0292107432722)*(o-1.)
            arg[(1, 0, 0, 1)]=0.175828091138*x[0]**o + (-0.080239746646)*x[0] + (0.860915245557)*x[1]**o + (0.686852264067)*x[1] + (-0.890576767146)*x[2]**o + (-0.351171020222)*x[2]
            ref[(1, 0, 0, 1)]=0.200804033374-(0.0243610949247)*(o-1.)
            arg[(1, 0, 1, 0)]=-0.739985648888*x[0]**o + (0.24720068649)*x[0] + (0.180682016655)*x[1]**o + (0.562580627374)*x[1] + (-0.059935774276)*x[2]**o + (0.350919472659)*x[2]
            ref[(1, 0, 1, 0)]=0.270730690007-(-0.103206567752)*(o-1.)
            arg[(1, 0, 1, 1)]=-0.813040613513*x[0]**o + (0.928561891993)*x[0] + (0.669590651527)*x[1]**o + (-0.701770026939)*x[1] + (0.327326356418)*x[2]**o + (0.142448648219)*x[2]
            ref[(1, 0, 1, 1)]=0.276558453853-(0.0306460657387)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.836823700989*x[0]**o + (0.0591023302598)*x[0] + (0.266701629746)*x[1]**o + (0.693301337447)*x[1] + (-0.524900676789)*x[2]**o + (-0.818653012614)*x[2]
            ref[(1, 0, 2, 0)]=-0.58063604647-(-0.182503791339)*(o-1.)
            arg[(1, 0, 2, 1)]=0.734814949628*x[0]**o + (0.292293106112)*x[0] + (-0.169235791543)*x[1]**o + (-0.555555186507)*x[1] + (0.771208594688)*x[2]**o + (-0.702530303964)*x[2]
            ref[(1, 0, 2, 1)]=0.185497684207-(0.222797958795)*(o-1.)
            arg[(1, 1, 0, 0)]=0.271294756781*x[0]**o + (0.390889620403)*x[0] + (-0.0274126733381)*x[1]**o + (0.727637246788)*x[1] + (0.0658450268995)*x[2]**o + (-0.681211708824)*x[2]
            ref[(1, 1, 0, 0)]=0.373521134355-(0.051621185057)*(o-1.)
            arg[(1, 1, 0, 1)]=-0.175912965789*x[0]**o + (0.171112610716)*x[0] + (-0.658101632387)*x[1]**o + (0.416511960357)*x[1] + (-0.396869787313)*x[2]**o + (0.538252188902)*x[2]
            ref[(1, 1, 0, 1)]=-0.0525038127566-(-0.205147397581)*(o-1.)
            arg[(1, 1, 1, 0)]=0.519952753634*x[0]**o + (0.17775421425)*x[0] + (0.672605538686)*x[1]**o + (0.935962082381)*x[1] + (-0.6414812084)*x[2]**o + (0.327193258145)*x[2]
            ref[(1, 1, 1, 0)]=0.995993319348-(0.0918461806533)*(o-1.)
            arg[(1, 1, 1, 1)]=-0.0295526394116*x[0]**o + (-0.769485113944)*x[0] + (0.709974324451)*x[1]**o + (-0.382135949982)*x[1] + (0.879029117761)*x[2]**o + (0.651633681077)*x[2]
            ref[(1, 1, 1, 1)]=0.529731709975-(0.259908467133)*(o-1.)
            arg[(1, 1, 2, 0)]=0.505747368794*x[0]**o + (0.656804797329)*x[0] + (-0.100115070811)*x[1]**o + (0.338920378388)*x[1] + (-0.636636309894)*x[2]**o + (0.213799306345)*x[2]
            ref[(1, 1, 2, 0)]=0.489260235076-(-0.0385006686517)*(o-1.)
            arg[(1, 1, 2, 1)]=-0.476718854416*x[0]**o + (0.542927385767)*x[0] + (0.318668013107)*x[1]**o + (0.63774189596)*x[1] + (-0.197903828117)*x[2]**o + (-0.396369236512)*x[2]
            ref[(1, 1, 2, 1)]=0.214172687894-(-0.0593257782377)*(o-1.)
            arg[(1, 2, 0, 0)]=-0.751585063525*x[0]**o + (0.921036224311)*x[0] + (-0.410225575829)*x[1]**o + (0.23708978218)*x[1] + (-0.461892038444)*x[2]**o + (0.0524623572232)*x[2]
            ref[(1, 2, 0, 0)]=-0.206557157042-(-0.270617112966)*(o-1.)
            arg[(1, 2, 0, 1)]=-0.612073831884*x[0]**o + (0.599274019148)*x[0] + (-0.725047077603)*x[1]**o + (0.824088992875)*x[1] + (0.148623521151)*x[2]**o + (-0.28445640589)*x[2]
            ref[(1, 2, 0, 1)]=-0.0247953911016-(-0.198082898056)*(o-1.)
            arg[(1, 2, 1, 0)]=-0.743148592172*x[0]**o + (0.971477351704)*x[0] + (-0.921753630532)*x[1]**o + (-0.278260232815)*x[1] + (-0.600575038472)*x[2]**o + (0.569404659214)*x[2]
            ref[(1, 2, 1, 0)]=-0.501427741536-(-0.377579543529)*(o-1.)
            arg[(1, 2, 1, 1)]=0.275060060038*x[0]**o + (0.384355790851)*x[0] + (-0.658487327531)*x[1]**o + (0.928309885631)*x[1] + (0.180220626436)*x[2]**o + (-0.342929635003)*x[2]
            ref[(1, 2, 1, 1)]=0.383264700212-(-0.0338677735094)*(o-1.)
            arg[(1, 2, 2, 0)]=0.224704391594*x[0]**o + (0.890870225815)*x[0] + (-0.885973303099)*x[1]**o + (0.0112971026169)*x[1] + (-0.900447229599)*x[2]**o + (0.272420335596)*x[2]
            ref[(1, 2, 2, 0)]=-0.193564238538-(-0.260286023517)*(o-1.)
            arg[(1, 2, 2, 1)]=0.335206708381*x[0]**o + (-0.586359131897)*x[0] + (-0.213700381303)*x[1]**o + (-0.856130562244)*x[1] + (0.218694018988)*x[2]**o + (-0.217584422991)*x[2]
            ref[(1, 2, 2, 1)]=-0.659936885533-(0.0567000576778)*(o-1.)
            arg[(1, 3, 0, 0)]=-0.628284454579*x[0]**o + (0.814560287444)*x[0] + (-0.587693205149)*x[1]**o + (-0.809239111667)*x[1] + (-0.992458813411)*x[2]**o + (0.980165900519)*x[2]
            ref[(1, 3, 0, 0)]=-0.611474698422-(-0.368072745523)*(o-1.)
            arg[(1, 3, 0, 1)]=0.250385280344*x[0]**o + (-0.0911858216362)*x[0] + (-0.736795832562)*x[1]**o + (-0.0875853235882)*x[1] + (0.446428385734)*x[2]**o + (-0.58429984545)*x[2]
            ref[(1, 3, 0, 1)]=-0.40152657858-(-0.00666369441408)*(o-1.)
            arg[(1, 3, 1, 0)]=0.535164684718*x[0]**o + (-0.989549974302)*x[0] + (-0.889028827809)*x[1]**o + (-0.896014628226)*x[1] + (-0.759177961448)*x[2]**o + (0.963851073378)*x[2]
            ref[(1, 3, 1, 0)]=-1.01737781684-(-0.185507017423)*(o-1.)
            arg[(1, 3, 1, 1)]=-0.92918476478*x[0]**o + (-0.558325177017)*x[0] + (0.993394928184)*x[1]**o + (-0.0969160498031)*x[1] + (0.358456350118)*x[2]**o + (-0.76677473508)*x[2]
            ref[(1, 3, 1, 1)]=-0.499674724189-(0.0704444189205)*(o-1.)
            arg[(1, 3, 2, 0)]=-0.0448490162815*x[0]**o + (-0.330767123805)*x[0] + (-0.953207783893)*x[1]**o + (0.114903081101)*x[1] + (0.996347306557)*x[2]**o + (-0.453378514468)*x[2]
            ref[(1, 3, 2, 0)]=-0.335476025394-(-0.000284915602812)*(o-1.)
            arg[(1, 3, 2, 1)]=0.620807779049*x[0]**o + (0.81590891713)*x[0] + (0.381204420605)*x[1]**o + (0.129374950324)*x[1] + (-0.593991087007)*x[2]**o + (0.320121470878)*x[2]
            ref[(1, 3, 2, 1)]=0.83671322549-(0.0680035187745)*(o-1.)
            arg[(2, 0, 0, 0)]=-0.484044856252*x[0]**o + (-0.160088944365)*x[0] + (0.35270416861)*x[1]**o + (-0.637647748334)*x[1] + (-0.994196032196)*x[2]**o + (-0.53537601948)*x[2]
            ref[(2, 0, 0, 0)]=-1.22932471601-(-0.187589453306)*(o-1.)
            arg[(2, 0, 0, 1)]=0.164668907715*x[0]**o + (0.978807809559)*x[0] + (-0.9381679274)*x[1]**o + (-0.442600192818)*x[1] + (0.990299745328)*x[2]**o + (-0.550318243993)*x[2]
            ref[(2, 0, 0, 1)]=0.101345049195-(0.0361334542738)*(o-1.)
            arg[(2, 0, 1, 0)]=0.346895532538*x[0]**o + (0.559075402148)*x[0] + (0.79613331523)*x[1]**o + (-0.20485605513)*x[1] + (0.121326481024)*x[2]**o + (-0.116583942031)*x[2]
            ref[(2, 0, 1, 0)]=0.750995366889-(0.210725888132)*(o-1.)
            arg[(2, 0, 1, 1)]=-0.928477211663*x[0]**o + (-0.422994303354)*x[0] + (0.103461414508)*x[1]**o + (-0.469759519323)*x[1] + (-0.460484952323)*x[2]**o + (-0.112770153247)*x[2]
            ref[(2, 0, 1, 1)]=-1.1455123627-(-0.214250124913)*(o-1.)
            arg[(2, 0, 2, 0)]=-0.907650756567*x[0]**o + (0.771589456387)*x[0] + (0.621261066656)*x[1]**o + (-0.673006633457)*x[1] + (0.988508405857)*x[2]**o + (-0.823789094665)*x[2]
            ref[(2, 0, 2, 0)]=-0.0115437778943-(0.117019785991)*(o-1.)
            arg[(2, 0, 2, 1)]=-0.163943398219*x[0]**o + (0.678305342465)*x[0] + (-0.290092282227)*x[1]**o + (0.48306997595)*x[1] + (0.932353065795)*x[2]**o + (0.206569915679)*x[2]
            ref[(2, 0, 2, 1)]=0.923131309721-(0.0797195642247)*(o-1.)
            arg[(2, 1, 0, 0)]=-0.648077226843*x[0]**o + (-0.493834413977)*x[0] + (-0.272093579452)*x[1]**o + (-0.688061762163)*x[1] + (-0.0987888950285)*x[2]**o + (-0.515562183859)*x[2]
            ref[(2, 1, 0, 0)]=-1.35820903066-(-0.169826616887)*(o-1.)
            arg[(2, 1, 0, 1)]=-0.341711391867*x[0]**o + (-0.0819526418032)*x[0] + (-0.993041600229)*x[1]**o + (-0.848656174982)*x[1] + (0.471295084891)*x[2]**o + (0.24782302226)*x[2]
            ref[(2, 1, 0, 1)]=-0.773121850865-(-0.143909651201)*(o-1.)
            arg[(2, 1, 1, 0)]=-0.0977089259728*x[0]**o + (-0.68447365741)*x[0] + (-0.8057035848)*x[1]**o + (-0.842858145361)*x[1] + (-0.540317261558)*x[2]**o + (-0.941411073275)*x[2]
            ref[(2, 1, 1, 0)]=-1.95623632419-(-0.240621628722)*(o-1.)
            arg[(2, 1, 1, 1)]=-0.78113096905*x[0]**o + (0.0389755653594)*x[0] + (-0.0248170893687)*x[1]**o + (-0.72879521632)*x[1] + (-0.3698479644)*x[2]**o + (0.708455235309)*x[2]
            ref[(2, 1, 1, 1)]=-0.578580219235-(-0.195966003803)*(o-1.)
            arg[(2, 1, 2, 0)]=0.610584687605*x[0]**o + (0.306262563193)*x[0] + (0.711385163826)*x[1]**o + (-0.18840767525)*x[1] + (0.483116263586)*x[2]**o + (0.87201540342)*x[2]
            ref[(2, 1, 2, 0)]=1.39747820319-(0.300847685836)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.471508467859*x[0]**o + (0.0187534486129)*x[0] + (-0.774014109824)*x[1]**o + (-0.886623123415)*x[1] + (0.794216844798)*x[2]**o + (-0.525833140979)*x[2]
            ref[(2, 1, 2, 1)]=-0.922504274333-(-0.0752176221474)*(o-1.)
            arg[(2, 2, 0, 0)]=-0.830809517423*x[0]**o + (0.451213300188)*x[0] + (-0.883506695916)*x[1]**o + (0.780097413018)*x[1] + (-0.347129420993)*x[2]**o + (0.157750893668)*x[2]
            ref[(2, 2, 0, 0)]=-0.336192013729-(-0.343574272389)*(o-1.)
            arg[(2, 2, 0, 1)]=0.448349186252*x[0]**o + (0.989506291108)*x[0] + (-0.310595608746)*x[1]**o + (-0.614396805093)*x[1] + (0.79058001647)*x[2]**o + (0.0582274722308)*x[2]
            ref[(2, 2, 0, 1)]=0.680835276111-(0.154722265663)*(o-1.)
            arg[(2, 2, 1, 0)]=-0.669267677283*x[0]**o + (-0.352186099419)*x[0] + (0.069484133094)*x[1]**o + (0.357734510188)*x[1] + (-0.430209537795)*x[2]**o + (0.737214173293)*x[2]
            ref[(2, 2, 1, 0)]=-0.143615248961-(-0.171665513664)*(o-1.)
            arg[(2, 2, 1, 1)]=-0.442099022776*x[0]**o + (0.761965579271)*x[0] + (0.64356297168)*x[1]**o + (0.576926050027)*x[1] + (-0.722923605062)*x[2]**o + (-0.485259027872)*x[2]
            ref[(2, 2, 1, 1)]=0.166086472634-(-0.0869099426929)*(o-1.)
            arg[(2, 2, 2, 0)]=-0.353564682323*x[0]**o + (-0.789443978114)*x[0] + (-0.00151464566618)*x[1]**o + (-0.88725559645)*x[1] + (-0.697034772493)*x[2]**o + (-0.748365005212)*x[2]
            ref[(2, 2, 2, 0)]=-1.73858934013-(-0.17535235008)*(o-1.)
            arg[(2, 2, 2, 1)]=0.858013501535*x[0]**o + (0.957930697627)*x[0] + (-0.789494376132)*x[1]**o + (-0.608076680345)*x[1] + (-0.119201139547)*x[2]**o + (-0.404696996146)*x[2]
            ref[(2, 2, 2, 1)]=-0.0527624965041-(-0.00844700235727)*(o-1.)
            arg[(2, 3, 0, 0)]=-0.740355233001*x[0]**o + (-0.100194657225)*x[0] + (-0.970605034854)*x[1]**o + (0.772493244766)*x[1] + (-0.537679463429)*x[2]**o + (0.0630334758047)*x[2]
            ref[(2, 3, 0, 0)]=-0.756653833969-(-0.374773288547)*(o-1.)
            arg[(2, 3, 0, 1)]=0.656191508966*x[0]**o + (0.311259189112)*x[0] + (-0.642809969279)*x[1]**o + (-0.294233428314)*x[1] + (-0.833924268682)*x[2]**o + (-0.223097911106)*x[2]
            ref[(2, 3, 0, 1)]=-0.513307439652-(-0.136757121499)*(o-1.)
            arg[(2, 3, 1, 0)]=0.468460909586*x[0]**o + (0.288526203208)*x[0] + (0.428884265108)*x[1]**o + (-0.660938374924)*x[1] + (-0.155191615871)*x[2]**o + (0.02179304882)*x[2]
            ref[(2, 3, 1, 0)]=0.195767217963-(0.123692259804)*(o-1.)
            arg[(2, 3, 1, 1)]=0.292353401461*x[0]**o + (0.885064368186)*x[0] + (0.659810488578)*x[1]**o + (-0.359266310187)*x[1] + (-0.0365104010174)*x[2]**o + (0.756591502095)*x[2]
            ref[(2, 3, 1, 1)]=1.09902152456-(0.152608914837)*(o-1.)
            arg[(2, 3, 2, 0)]=0.722514249767*x[0]**o + (0.34974951899)*x[0] + (0.106081847771)*x[1]**o + (0.0052067928715)*x[1] + (0.567826067668)*x[2]**o + (-0.722708143966)*x[2]
            ref[(2, 3, 2, 0)]=0.51433516655-(0.232737027534)*(o-1.)
            arg[(2, 3, 2, 1)]=0.746144384838*x[0]**o + (-0.472062985221)*x[0] + (0.858983119701)*x[1]**o + (0.172429434268)*x[1] + (-0.0108126764488)*x[2]**o + (0.918264086275)*x[2]
            ref[(2, 3, 2, 1)]=1.10647268171-(0.265719138015)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.96693555508*x[0]**o + (-0.820523927188)*x[0] + (0.580454458393)*x[1]**o + (-0.820456651769)*x[1]
            ref=-0.0467952827415-(0.257898335579)*(o-1.)
        else:
            arg=-0.61982967279*x[0]**o + (-0.326783937211)*x[0] + (-0.193266575434)*x[1]**o + (-0.623436367449)*x[1] + (0.322655769998)*x[2]**o + (0.223569610471)*x[2]
            ref=-0.608545586207-(-0.0817400797043)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.626739738719*x[0]**o + (0.81214651651)*x[0] + (0.669968708144)*x[1]**o + (-0.544102092964)*x[1]
            ref[(0,)]=0.155636696485-(0.00720482823752)*(o-1.)
            arg[(1,)]=0.411124197237*x[0]**o + (-0.853913961896)*x[0] + (-0.567743701279)*x[1]**o + (-0.875754403626)*x[1]
            ref[(1,)]=-0.943143934782-(-0.0261032506737)*(o-1.)
            arg[(2,)]=-0.918822748186*x[0]**o + (-0.0654393692676)*x[0] + (-0.0626114524514)*x[1]**o + (-0.806647146934)*x[1]
            ref[(2,)]=-0.926760358419-(-0.163572366773)*(o-1.)
            arg[(3,)]=-0.79890632577*x[0]**o + (0.974081776569)*x[0] + (-0.939577563418)*x[1]**o + (0.647175775205)*x[1]
            ref[(3,)]=-0.0586131687073-(-0.289747314865)*(o-1.)
        else:
            arg[(0,)]=0.975066550257*x[0]**o + (-0.57231849451)*x[0] + (-0.803340399283)*x[1]**o + (0.146418798603)*x[1] + (-0.283905139322)*x[2]**o + (-0.156125427074)*x[2]
            ref[(0,)]=-0.347102055664-(-0.018696498058)*(o-1.)
            arg[(1,)]=0.141169341714*x[0]**o + (-0.387255833344)*x[0] + (0.280395350682)*x[1]**o + (0.0432186220531)*x[1] + (0.268891099262)*x[2]**o + (-0.0546494446658)*x[2]
            ref[(1,)]=0.145884567851-(0.115075965276)*(o-1.)
            arg[(2,)]=-0.277247298798*x[0]**o + (-0.0204810120322)*x[0] + (-0.553417671071)*x[1]**o + (0.605637104963)*x[1] + (-0.376251129)*x[2]**o + (-0.286426671933)*x[2]
            ref[(2,)]=-0.454093338935-(-0.201152683145)*(o-1.)
            arg[(3,)]=0.394230689075*x[0]**o + (0.668073022163)*x[0] + (-0.362475072662)*x[1]**o + (0.854574087465)*x[1] + (-0.887028915238)*x[2]**o + (0.151156336844)*x[2]
            ref[(3,)]=0.409265073824-(-0.142545549804)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.0340583928273*x[0]**o + (0.9307321622)*x[0] + (-0.957867984373)*x[1]**o + (0.68407997814)*x[1]
            ref[(0, 0)]=0.31144288157-(-0.165321062867)*(o-1.)
            arg[(0, 1)]=0.207912015284*x[0]**o + (-0.801569487317)*x[0] + (-0.776482906708)*x[1]**o + (0.722487616305)*x[1]
            ref[(0, 1)]=-0.323826381218-(-0.0947618152374)*(o-1.)
            arg[(1, 0)]=0.723705275642*x[0]**o + (-0.574289977118)*x[0] + (0.985062762812)*x[1]**o + (0.556591879147)*x[1]
            ref[(1, 0)]=0.845534970242-(0.284794673076)*(o-1.)
            arg[(1, 1)]=-0.0823449019105*x[0]**o + (-0.96631790638)*x[0] + (-0.466829063512)*x[1]**o + (0.00761866614477)*x[1]
            ref[(1, 1)]=-0.753936602829-(-0.091528994237)*(o-1.)
            arg[(2, 0)]=0.0779774541858*x[0]**o + (-0.954616338589)*x[0] + (-0.515762634389)*x[1]**o + (0.683776380487)*x[1]
            ref[(2, 0)]=-0.354312569152-(-0.0729641967005)*(o-1.)
            arg[(2, 1)]=-0.191963770795*x[0]**o + (0.923475030306)*x[0] + (-0.402615416323)*x[1]**o + (0.754066341629)*x[1]
            ref[(2, 1)]=0.541481092409-(-0.0990965311863)*(o-1.)
        else:
            arg[(0, 0)]=-0.721259667712*x[0]**o + (0.576008782375)*x[0] + (-0.79461315959)*x[1]**o + (-0.678092228055)*x[1] + (-0.409130776091)*x[2]**o + (-0.472998549969)*x[2]
            ref[(0, 0)]=-1.25004279952-(-0.320833933899)*(o-1.)
            arg[(0, 1)]=-0.296610804479*x[0]**o + (0.54111724093)*x[0] + (0.937796448429)*x[1]**o + (-0.219697672481)*x[1] + (-0.634514157516)*x[2]**o + (-0.835999126184)*x[2]
            ref[(0, 1)]=-0.253954035651-(0.0011119144055)*(o-1.)
            arg[(1, 0)]=0.727392226939*x[0]**o + (-0.292282304033)*x[0] + (-0.541729500862)*x[1]**o + (0.962619757162)*x[1] + (-0.524772750112)*x[2]**o + (-0.45954065852)*x[2]
            ref[(1, 0)]=-0.0641566147124-(-0.056518337339)*(o-1.)
            arg[(1, 1)]=0.763615474804*x[0]**o + (-0.469177994415)*x[0] + (-0.955594834012)*x[1]**o + (-0.230882439228)*x[1] + (-0.421857580142)*x[2]**o + (0.299907600677)*x[2]
            ref[(1, 1)]=-0.506994886158-(-0.102306156558)*(o-1.)
            arg[(2, 0)]=0.595667557456*x[0]**o + (0.683115489548)*x[0] + (0.686849169186)*x[1]**o + (-0.570968272295)*x[1] + (-0.126320300489)*x[2]**o + (0.969512282048)*x[2]
            ref[(2, 0)]=1.11892796273-(0.192699404359)*(o-1.)
            arg[(2, 1)]=0.447420796772*x[0]**o + (0.0820226966208)*x[0] + (-0.619582181871)*x[1]**o + (-0.531188444518)*x[1] + (-0.357420694376)*x[2]**o + (-0.883664081485)*x[2]
            ref[(2, 1)]=-0.931205954428-(-0.0882636799124)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4),w)
        ref=numpy.zeros((3, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.841632933878*x[0]**o + (-0.0913856651154)*x[0] + (0.719451676469)*x[1]**o + (0.490097950616)*x[1]
            ref[(0, 0, 0)]=0.979898447924-(0.260180768391)*(o-1.)
            arg[(0, 0, 1)]=-0.261277575912*x[0]**o + (-0.822207404844)*x[0] + (0.188445752241)*x[1]**o + (0.695627196359)*x[1]
            ref[(0, 0, 1)]=-0.0997060160783-(-0.0121386372785)*(o-1.)
            arg[(0, 0, 2)]=-0.0658985664955*x[0]**o + (0.278695695833)*x[0] + (-0.667019569335)*x[1]**o + (-0.422519268423)*x[1]
            ref[(0, 0, 2)]=-0.43837085421-(-0.122153022638)*(o-1.)
            arg[(0, 0, 3)]=-0.43266943292*x[0]**o + (0.77679315043)*x[0] + (-0.421860030157)*x[1]**o + (-0.540260437094)*x[1]
            ref[(0, 0, 3)]=-0.30899837487-(-0.14242157718)*(o-1.)
            arg[(0, 1, 0)]=0.880553692494*x[0]**o + (-0.764604006327)*x[0] + (-0.115223518983)*x[1]**o + (0.405199240122)*x[1]
            ref[(0, 1, 0)]=0.202962703653-(0.127555028919)*(o-1.)
            arg[(0, 1, 1)]=0.0012111574125*x[0]**o + (0.452241027488)*x[0] + (0.310570415951)*x[1]**o + (-0.0676343189823)*x[1]
            ref[(0, 1, 1)]=0.348194140934-(0.0519635955605)*(o-1.)
            arg[(0, 1, 2)]=0.82674426681*x[0]**o + (0.406360998805)*x[0] + (-0.869467402708)*x[1]**o + (0.379344885328)*x[1]
            ref[(0, 1, 2)]=0.371491374117-(-0.00712052264976)*(o-1.)
            arg[(0, 1, 3)]=0.632754553248*x[0]**o + (0.117009457295)*x[0] + (-0.7250286953)*x[1]**o + (-0.512972142224)*x[1]
            ref[(0, 1, 3)]=-0.24411841349-(-0.0153790236754)*(o-1.)
            arg[(1, 0, 0)]=-0.796239292496*x[0]**o + (0.934578956077)*x[0] + (0.332864788127)*x[1]**o + (-0.0151683259796)*x[1]
            ref[(1, 0, 0)]=0.228018062864-(-0.0772290840616)*(o-1.)
            arg[(1, 0, 1)]=0.945856950705*x[0]**o + (-0.374605514036)*x[0] + (0.764736934639)*x[1]**o + (-0.998889666758)*x[1]
            ref[(1, 0, 1)]=0.168549352275-(0.285098980891)*(o-1.)
            arg[(1, 0, 2)]=-0.497670060183*x[0]**o + (-0.733482785562)*x[0] + (0.505989851089)*x[1]**o + (-0.728015618918)*x[1]
            ref[(1, 0, 2)]=-0.726589306787-(0.00138663181765)*(o-1.)
            arg[(1, 0, 3)]=-0.350371400471*x[0]**o + (0.577336043297)*x[0] + (-0.397310102976)*x[1]**o + (0.10587295082)*x[1]
            ref[(1, 0, 3)]=-0.0322362546653-(-0.124613583908)*(o-1.)
            arg[(1, 1, 0)]=-0.291965912285*x[0]**o + (0.781951057254)*x[0] + (-0.580386325161)*x[1]**o + (0.0857145746102)*x[1]
            ref[(1, 1, 0)]=-0.00234330279072-(-0.145392039574)*(o-1.)
            arg[(1, 1, 1)]=-0.91115932481*x[0]**o + (0.663714150362)*x[0] + (0.830324110245)*x[1]**o + (0.074003133145)*x[1]
            ref[(1, 1, 1)]=0.328441034471-(-0.0134725357608)*(o-1.)
            arg[(1, 1, 2)]=-0.0449477347355*x[0]**o + (0.177057448554)*x[0] + (0.342937177989)*x[1]**o + (-0.0132132025814)*x[1]
            ref[(1, 1, 2)]=0.230916844613-(0.0496649072088)*(o-1.)
            arg[(1, 1, 3)]=-0.983009157473*x[0]**o + (-0.0433298735154)*x[0] + (0.56576010111)*x[1]**o + (0.653752550228)*x[1]
            ref[(1, 1, 3)]=0.096586810175-(-0.0695415093937)*(o-1.)
            arg[(2, 0, 0)]=-0.132651071385*x[0]**o + (-0.755850258943)*x[0] + (0.710164033438)*x[1]**o + (-0.232587181759)*x[1]
            ref[(2, 0, 0)]=-0.205462239325-(0.0962521603422)*(o-1.)
            arg[(2, 0, 1)]=0.983140457661*x[0]**o + (0.96044907319)*x[0] + (0.674176009425)*x[1]**o + (0.739349633002)*x[1]
            ref[(2, 0, 1)]=1.67855758664-(0.276219411181)*(o-1.)
            arg[(2, 0, 2)]=0.289746430376*x[0]**o + (0.689368252031)*x[0] + (0.361282516781)*x[1]**o + (0.950695045995)*x[1]
            ref[(2, 0, 2)]=1.14554612259-(0.108504824526)*(o-1.)
            arg[(2, 0, 3)]=0.97327136895*x[0]**o + (0.759660859749)*x[0] + (0.354169480761)*x[1]**o + (-0.2448393713)*x[1]
            ref[(2, 0, 3)]=0.92113116908-(0.221240141619)*(o-1.)
            arg[(2, 1, 0)]=0.512581316531*x[0]**o + (0.713410259458)*x[0] + (0.0760331230042)*x[1]**o + (0.513440447527)*x[1]
            ref[(2, 1, 0)]=0.907732573261-(0.0981024065893)*(o-1.)
            arg[(2, 1, 1)]=0.675678877254*x[0]**o + (0.903224813721)*x[0] + (-0.109508264509)*x[1]**o + (-0.483318173172)*x[1]
            ref[(2, 1, 1)]=0.493038626647-(0.0943617687908)*(o-1.)
            arg[(2, 1, 2)]=0.620178571022*x[0]**o + (0.109964345382)*x[0] + (0.4522467098)*x[1]**o + (-0.817733239473)*x[1]
            ref[(2, 1, 2)]=0.182328193366-(0.178737546804)*(o-1.)
            arg[(2, 1, 3)]=-0.512386949052*x[0]**o + (0.251386362094)*x[0] + (-0.5658836289)*x[1]**o + (-0.342070674138)*x[1]
            ref[(2, 1, 3)]=-0.584477444998-(-0.179711762992)*(o-1.)
        else:
            arg[(0, 0, 0)]=-0.359762150442*x[0]**o + (-0.13709087804)*x[0] + (-0.25109840598)*x[1]**o + (-0.752738057696)*x[1] + (-0.429513573827)*x[2]**o + (0.695592278017)*x[2]
            ref[(0, 0, 0)]=-0.617305393984-(-0.173395688375)*(o-1.)
            arg[(0, 0, 1)]=-0.848994369034*x[0]**o + (0.351824577134)*x[0] + (0.340088248825)*x[1]**o + (0.852003885997)*x[1] + (0.231514884767)*x[2]**o + (-0.0363006367965)*x[2]
            ref[(0, 0, 1)]=0.445068295446-(-0.0462318725737)*(o-1.)
            arg[(0, 0, 2)]=-0.704982654454*x[0]**o + (-0.952187139526)*x[0] + (-0.476054174315)*x[1]**o + (-0.882901618203)*x[1] + (0.319109735684)*x[2]**o + (-0.942641944353)*x[2]
            ref[(0, 0, 2)]=-1.81982889758-(-0.143654515514)*(o-1.)
            arg[(0, 0, 3)]=-0.180812083175*x[0]**o + (0.222795915304)*x[0] + (0.0076351706103)*x[1]**o + (-0.0835447297703)*x[1] + (-0.916514939925)*x[2]**o + (0.99869453493)*x[2]
            ref[(0, 0, 3)]=0.0241269339872-(-0.181615308748)*(o-1.)
            arg[(0, 1, 0)]=0.406945673541*x[0]**o + (-0.884800322598)*x[0] + (0.861491899868)*x[1]**o + (-0.805098852043)*x[1] + (0.318478502772)*x[2]**o + (-0.339462165797)*x[2]
            ref[(0, 1, 0)]=-0.221222632129-(0.264486012697)*(o-1.)
            arg[(0, 1, 1)]=-0.0284107446519*x[0]**o + (-0.295327994801)*x[0] + (0.0435223560975)*x[1]**o + (-0.539943185632)*x[1] + (-0.295347658973)*x[2]**o + (0.341427640643)*x[2]
            ref[(0, 1, 1)]=-0.387039793659-(-0.0467060079213)*(o-1.)
            arg[(0, 1, 2)]=0.460762691927*x[0]**o + (0.185499051746)*x[0] + (0.455422521746)*x[1]**o + (0.719711129765)*x[1] + (-0.848055783318)*x[2]**o + (0.820149875776)*x[2]
            ref[(0, 1, 2)]=0.896744743821-(0.0113549050592)*(o-1.)
            arg[(0, 1, 3)]=-0.115336071154*x[0]**o + (0.738843823159)*x[0] + (-0.0595080797545)*x[1]**o + (-0.467274969729)*x[1] + (0.290732474156)*x[2]**o + (0.853204886918)*x[2]
            ref[(0, 1, 3)]=0.620331031798-(0.0193147205412)*(o-1.)
            arg[(1, 0, 0)]=0.122135020154*x[0]**o + (0.943418199113)*x[0] + (0.0504908679056)*x[1]**o + (-0.176996104175)*x[1] + (-0.49617412582)*x[2]**o + (-0.745039559517)*x[2]
            ref[(1, 0, 0)]=-0.15108285117-(-0.0539247062934)*(o-1.)
            arg[(1, 0, 1)]=-0.142474237894*x[0]**o + (-0.583702452779)*x[0] + (-0.319550230997)*x[1]**o + (0.187281936472)*x[1] + (0.354736603966)*x[2]**o + (0.688776340693)*x[2]
            ref[(1, 0, 1)]=0.0925339797307-(-0.0178813108208)*(o-1.)
            arg[(1, 0, 2)]=0.581174079795*x[0]**o + (-0.409499434527)*x[0] + (0.64537033588)*x[1]**o + (0.66903869563)*x[1] + (0.234764221244)*x[2]**o + (0.342842139033)*x[2]
            ref[(1, 0, 2)]=1.03184501853-(0.243551439487)*(o-1.)
            arg[(1, 0, 3)]=-0.759316160818*x[0]**o + (0.351650042001)*x[0] + (0.788597661927)*x[1]**o + (-0.154961372764)*x[1] + (0.693016542204)*x[2]**o + (0.876212241934)*x[2]
            ref[(1, 0, 3)]=0.897599477243-(0.120383007219)*(o-1.)
            arg[(1, 1, 0)]=0.547429162722*x[0]**o + (0.138718887068)*x[0] + (-0.273515406407)*x[1]**o + (-0.70521726324)*x[1] + (-0.830131667348)*x[2]**o + (0.264346852705)*x[2]
            ref[(1, 1, 0)]=-0.429184717249-(-0.0927029851721)*(o-1.)
            arg[(1, 1, 1)]=-0.680510138225*x[0]**o + (0.359432323216)*x[0] + (0.894881215874)*x[1]**o + (0.79463191476)*x[1] + (0.195173306117)*x[2]**o + (-0.328079051433)*x[2]
            ref[(1, 1, 1)]=0.617764785155-(0.0682573972944)*(o-1.)
            arg[(1, 1, 2)]=0.239614607301*x[0]**o + (-0.197366007873)*x[0] + (0.946217664025)*x[1]**o + (-0.796576060933)*x[1] + (0.452257279409)*x[2]**o + (-0.849386157202)*x[2]
            ref[(1, 1, 2)]=-0.102619337636-(0.273014925123)*(o-1.)
            arg[(1, 1, 3)]=-0.362777592778*x[0]**o + (-0.961090317941)*x[0] + (0.741582537335)*x[1]**o + (0.0575747447671)*x[1] + (-0.481556997755)*x[2]**o + (-0.761009670164)*x[2]
            ref[(1, 1, 3)]=-0.883638648267-(-0.0171253421995)*(o-1.)
            arg[(2, 0, 0)]=0.766890127529*x[0]**o + (-0.342432295296)*x[0] + (-0.867357710028)*x[1]**o + (-0.0499496144447)*x[1] + (-0.160129325799)*x[2]**o + (0.191530301488)*x[2]
            ref[(2, 0, 0)]=-0.230724258276-(-0.0434328180497)*(o-1.)
            arg[(2, 0, 1)]=0.65351623168*x[0]**o + (0.481593250551)*x[0] + (-0.0886361011782)*x[1]**o + (0.100931269902)*x[1] + (-0.0794003675165)*x[2]**o + (-0.644834992066)*x[2]
            ref[(2, 0, 1)]=0.211584645686-(0.080913293831)*(o-1.)
            arg[(2, 0, 2)]=0.993189686158*x[0]**o + (0.260363778305)*x[0] + (-0.0164866113626)*x[1]**o + (0.214788807376)*x[1] + (-0.775645991303)*x[2]**o + (-0.17782137885)*x[2]
            ref[(2, 0, 2)]=0.249194145162-(0.0335095139154)*(o-1.)
            arg[(2, 0, 3)]=-0.00255427288765*x[0]**o + (0.150802340955)*x[0] + (-0.920385806903)*x[1]**o + (-0.484969541302)*x[1] + (0.162964010337)*x[2]**o + (-0.737470049281)*x[2]
            ref[(2, 0, 3)]=-0.915806659541-(-0.126662678242)*(o-1.)
            arg[(2, 1, 0)]=0.0106170429118*x[0]**o + (-0.165709187934)*x[0] + (-0.285923429326)*x[1]**o + (0.812774114735)*x[1] + (-0.372027268603)*x[2]**o + (-0.656488840055)*x[2]
            ref[(2, 1, 0)]=-0.328378784136-(-0.107888942503)*(o-1.)
            arg[(2, 1, 1)]=0.593404702527*x[0]**o + (-0.476302613059)*x[0] + (-0.043570339016)*x[1]**o + (-0.895413412543)*x[1] + (-0.710750340685)*x[2]**o + (0.272198112223)*x[2]
            ref[(2, 1, 1)]=-0.630216945277-(-0.026819329529)*(o-1.)
            arg[(2, 1, 2)]=-0.921369872006*x[0]**o + (-0.715525239238)*x[0] + (-0.0915507498952)*x[1]**o + (0.743668312216)*x[1] + (-0.458610793502)*x[2]**o + (0.770892346849)*x[2]
            ref[(2, 1, 2)]=-0.336247997788-(-0.245255235901)*(o-1.)
            arg[(2, 1, 3)]=-0.0377164939781*x[0]**o + (0.0560226616743)*x[0] + (0.146270346669)*x[1]**o + (-0.787124021276)*x[1] + (0.163422741096)*x[2]**o + (-0.0835314343348)*x[2]
            ref[(2, 1, 3)]=-0.271328100075-(0.045329432298)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3, 2),w)
        ref=numpy.zeros((3, 2, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.0330654699488*x[0]**o + (0.99035517267)*x[0] + (-0.482902907184)*x[1]**o + (-0.311233216978)*x[1]
            ref[(0, 0, 0, 0)]=0.0815767892798-(-0.0859947295221)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.87043202758*x[0]**o + (0.962664056846)*x[0] + (-0.922151745131)*x[1]**o + (0.293642299734)*x[1]
            ref[(0, 0, 0, 1)]=-0.268138708066-(-0.298763962118)*(o-1.)
            arg[(0, 0, 1, 0)]=0.274188385613*x[0]**o + (-0.335457055352)*x[0] + (0.663668307691)*x[1]**o + (0.938003524738)*x[1]
            ref[(0, 0, 1, 0)]=0.770201581344-(0.156309448884)*(o-1.)
            arg[(0, 0, 1, 1)]=-0.701630555542*x[0]**o + (0.61002558967)*x[0] + (0.506203734494)*x[1]**o + (0.0326190837696)*x[1]
            ref[(0, 0, 1, 1)]=0.223608926196-(-0.0325711368413)*(o-1.)
            arg[(0, 0, 2, 0)]=-0.783943272997*x[0]**o + (-0.209167450825)*x[0] + (0.213306215091)*x[1]**o + (0.823518775535)*x[1]
            ref[(0, 0, 2, 0)]=0.0218571334021-(-0.0951061763177)*(o-1.)
            arg[(0, 0, 2, 1)]=-0.745582836173*x[0]**o + (0.600262599619)*x[0] + (-0.587868101805)*x[1]**o + (0.986992360511)*x[1]
            ref[(0, 0, 2, 1)]=0.126902011076-(-0.222241822996)*(o-1.)
            arg[(0, 1, 0, 0)]=0.426619975452*x[0]**o + (-0.262053047377)*x[0] + (0.255154367152)*x[1]**o + (-0.471704065714)*x[1]
            ref[(0, 1, 0, 0)]=-0.0259913852442-(0.113629057101)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.775458297186*x[0]**o + (-0.417469450222)*x[0] + (0.114495121991)*x[1]**o + (-0.766326089631)*x[1]
            ref[(0, 1, 0, 1)]=-0.922379357524-(-0.110160529199)*(o-1.)
            arg[(0, 1, 1, 0)]=0.97794059862*x[0]**o + (0.407373748251)*x[0] + (0.0993765792937)*x[1]**o + (-0.851487754796)*x[1]
            ref[(0, 1, 1, 0)]=0.316601585684-(0.179552862986)*(o-1.)
            arg[(0, 1, 1, 1)]=-0.12764774001*x[0]**o + (-0.441997208866)*x[0] + (0.576616052269)*x[1]**o + (-0.131782414307)*x[1]
            ref[(0, 1, 1, 1)]=-0.0624056554574-(0.0748280520431)*(o-1.)
            arg[(0, 1, 2, 0)]=0.337531699375*x[0]**o + (-0.696751873788)*x[0] + (0.123330535304)*x[1]**o + (0.792731244187)*x[1]
            ref[(0, 1, 2, 0)]=0.278420802539-(0.0768103724465)*(o-1.)
            arg[(0, 1, 2, 1)]=-0.694150513797*x[0]**o + (-0.449107444131)*x[0] + (0.123920109026)*x[1]**o + (-0.407903840373)*x[1]
            ref[(0, 1, 2, 1)]=-0.713620844638-(-0.0950384007952)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.981418055077*x[0]**o + (-0.460258953519)*x[0] + (-0.32242025668)*x[1]**o + (0.304145213146)*x[1]
            ref[(1, 0, 0, 0)]=-0.729976026065-(-0.217306385293)*(o-1.)
            arg[(1, 0, 0, 1)]=-0.170750536865*x[0]**o + (0.824542256215)*x[0] + (-0.0210738382322)*x[1]**o + (0.146860965282)*x[1]
            ref[(1, 0, 0, 1)]=0.3897894232-(-0.0319707291829)*(o-1.)
            arg[(1, 0, 1, 0)]=0.263206970247*x[0]**o + (-0.972519046112)*x[0] + (0.355295516921)*x[1]**o + (-0.485659480262)*x[1]
            ref[(1, 0, 1, 0)]=-0.419838019603-(0.103083747861)*(o-1.)
            arg[(1, 0, 1, 1)]=0.935959148719*x[0]**o + (0.352206987545)*x[0] + (-0.0499972965473)*x[1]**o + (-0.657604161626)*x[1]
            ref[(1, 0, 1, 1)]=0.290282339046-(0.147660308695)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.12396389383*x[0]**o + (-0.466101629257)*x[0] + (-0.508998741447)*x[1]**o + (-0.0867938339061)*x[1]
            ref[(1, 0, 2, 0)]=-0.59292904922-(-0.105493772546)*(o-1.)
            arg[(1, 0, 2, 1)]=0.707622714663*x[0]**o + (-0.359377602827)*x[0] + (-0.108031509181)*x[1]**o + (-0.834420093492)*x[1]
            ref[(1, 0, 2, 1)]=-0.297103245419-(0.0999318675802)*(o-1.)
            arg[(1, 1, 0, 0)]=0.335435347067*x[0]**o + (0.739538991235)*x[0] + (0.883537100713)*x[1]**o + (0.40788247671)*x[1]
            ref[(1, 1, 0, 0)]=1.18319695786-(0.20316207463)*(o-1.)
            arg[(1, 1, 0, 1)]=-0.293466227786*x[0]**o + (0.383156816161)*x[0] + (-0.777669662745)*x[1]**o + (-0.270688761125)*x[1]
            ref[(1, 1, 0, 1)]=-0.479333917748-(-0.178522648422)*(o-1.)
            arg[(1, 1, 1, 0)]=-0.157295005024*x[0]**o + (0.334530522435)*x[0] + (-0.40634600005)*x[1]**o + (-0.131234030481)*x[1]
            ref[(1, 1, 1, 0)]=-0.18017225656-(-0.0939401675123)*(o-1.)
            arg[(1, 1, 1, 1)]=0.574038111888*x[0]**o + (-0.856410517256)*x[0] + (-0.0723098105937)*x[1]**o + (0.126565957349)*x[1]
            ref[(1, 1, 1, 1)]=-0.114058129306-(0.0836213835491)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.628079122992*x[0]**o + (0.951719677315)*x[0] + (-0.709227266589)*x[1]**o + (-0.310414291291)*x[1]
            ref[(1, 1, 2, 0)]=-0.348000501778-(-0.222884398263)*(o-1.)
            arg[(1, 1, 2, 1)]=0.780518075812*x[0]**o + (-0.869772709814)*x[0] + (0.811289239694)*x[1]**o + (-0.407405002911)*x[1]
            ref[(1, 1, 2, 1)]=0.15731480139-(0.265301219251)*(o-1.)
            arg[(2, 0, 0, 0)]=-0.77895302024*x[0]**o + (-0.142794081771)*x[0] + (-0.120120149459)*x[1]**o + (0.781178985895)*x[1]
            ref[(2, 0, 0, 0)]=-0.130344132788-(-0.149845528283)*(o-1.)
            arg[(2, 0, 0, 1)]=-0.713159580979*x[0]**o + (-0.784045929023)*x[0] + (0.518395611189)*x[1]**o + (-0.916318387331)*x[1]
            ref[(2, 0, 0, 1)]=-0.947564143072-(-0.0324606616318)*(o-1.)
            arg[(2, 0, 1, 0)]=-0.802319805006*x[0]**o + (0.79035059511)*x[0] + (0.49313887961)*x[1]**o + (0.94625520428)*x[1]
            ref[(2, 0, 1, 0)]=0.713712436997-(-0.0515301542327)*(o-1.)
            arg[(2, 0, 1, 1)]=-0.509771078206*x[0]**o + (0.86481154774)*x[0] + (-0.790240906663)*x[1]**o + (0.988887837559)*x[1]
            ref[(2, 0, 1, 1)]=0.276843700215-(-0.216668664145)*(o-1.)
            arg[(2, 0, 2, 0)]=-0.967915407334*x[0]**o + (0.491915199768)*x[0] + (-0.347931913831)*x[1]**o + (0.359542942032)*x[1]
            ref[(2, 0, 2, 0)]=-0.232194589682-(-0.219307886861)*(o-1.)
            arg[(2, 0, 2, 1)]=0.0105325987371*x[0]**o + (-0.948861231269)*x[0] + (0.710031464681)*x[1]**o + (0.164601914556)*x[1]
            ref[(2, 0, 2, 1)]=-0.0318476266474-(0.12009401057)*(o-1.)
            arg[(2, 1, 0, 0)]=0.780829474851*x[0]**o + (0.968467961359)*x[0] + (0.977794584775)*x[1]**o + (0.239562197231)*x[1]
            ref[(2, 1, 0, 0)]=1.48332710911-(0.293104009938)*(o-1.)
            arg[(2, 1, 0, 1)]=0.518793235488*x[0]**o + (0.872195196383)*x[0] + (-0.13465551117)*x[1]**o + (-0.987413763512)*x[1]
            ref[(2, 1, 0, 1)]=0.134459578595-(0.0640229540529)*(o-1.)
            arg[(2, 1, 1, 0)]=0.618404017836*x[0]**o + (0.729315377779)*x[0] + (-0.366646318466)*x[1]**o + (0.966575197715)*x[1]
            ref[(2, 1, 1, 0)]=0.973824137432-(0.0419596165616)*(o-1.)
            arg[(2, 1, 1, 1)]=-0.851419688599*x[0]**o + (-0.0770618808386)*x[0] + (-0.395150281425)*x[1]**o + (-0.568646677002)*x[1]
            ref[(2, 1, 1, 1)]=-0.946139263932-(-0.207761661671)*(o-1.)
            arg[(2, 1, 2, 0)]=0.313262112937*x[0]**o + (0.565864345034)*x[0] + (0.228623393344)*x[1]**o + (-0.889408563339)*x[1]
            ref[(2, 1, 2, 0)]=0.109170643988-(0.0903142510468)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.536454738302*x[0]**o + (-0.23164445392)*x[0] + (-0.215979882863)*x[1]**o + (0.677651901791)*x[1]
            ref[(2, 1, 2, 1)]=-0.153213586647-(-0.125405770194)*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=-0.921967732995*x[0]**o + (-0.727601999116)*x[0] + (0.778685703114)*x[1]**o + (-0.0925706169194)*x[1] + (-0.503482235225)*x[2]**o + (-0.834110454602)*x[2]
            ref[(0, 0, 0, 0)]=-1.15052366787-(-0.107794044184)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.419122135843*x[0]**o + (0.512631760642)*x[0] + (0.447543899707)*x[1]**o + (-0.933107312583)*x[1] + (0.919752704911)*x[2]**o + (0.216336971872)*x[2]
            ref[(0, 0, 0, 1)]=0.372017944353-(0.158029078129)*(o-1.)
            arg[(0, 0, 1, 0)]=-0.79446500853*x[0]**o + (-0.174452709804)*x[0] + (-0.377952674871)*x[1]**o + (-0.169716557896)*x[1] + (-0.98506826547)*x[2]**o + (0.843591554781)*x[2]
            ref[(0, 0, 1, 0)]=-0.829031830895-(-0.359580991478)*(o-1.)
            arg[(0, 0, 1, 1)]=0.416689817912*x[0]**o + (0.405101943575)*x[0] + (0.986519993318)*x[1]**o + (0.868351980074)*x[1] + (-0.971735153375)*x[2]**o + (0.0589238140977)*x[2]
            ref[(0, 0, 1, 1)]=0.8819261978-(0.0719124429757)*(o-1.)
            arg[(0, 0, 2, 0)]=0.522426931842*x[0]**o + (0.553398855871)*x[0] + (0.8103046608)*x[1]**o + (-0.853290058001)*x[1] + (-0.552357310663)*x[2]**o + (-0.892410546547)*x[2]
            ref[(0, 0, 2, 0)]=-0.205963733349-(0.13006238033)*(o-1.)
            arg[(0, 0, 2, 1)]=-0.703071904953*x[0]**o + (-0.675509664881)*x[0] + (0.0389828273783)*x[1]**o + (0.491660550279)*x[1] + (0.683602956567)*x[2]**o + (-0.922481730996)*x[2]
            ref[(0, 0, 2, 1)]=-0.543408483303-(0.00325231316525)*(o-1.)
            arg[(0, 1, 0, 0)]=0.893691626936*x[0]**o + (-0.684686541603)*x[0] + (0.0606793425521)*x[1]**o + (-0.42531595101)*x[1] + (-0.402474283467)*x[2]**o + (0.598972654318)*x[2]
            ref[(0, 1, 0, 0)]=0.0204334238635-(0.0919827810035)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.144945605346*x[0]**o + (0.00668606693287)*x[0] + (-0.331058106588)*x[1]**o + (-0.898667457175)*x[1] + (-0.914877601257)*x[2]**o + (0.658318797356)*x[2]
            ref[(0, 1, 0, 1)]=-0.812271953039-(-0.231813552198)*(o-1.)
            arg[(0, 1, 1, 0)]=-0.875786519881*x[0]**o + (-0.38249114951)*x[0] + (-0.854750227458)*x[1]**o + (0.125404125202)*x[1] + (0.102385990812)*x[2]**o + (0.958775594836)*x[2]
            ref[(0, 1, 1, 0)]=-0.463231093-(-0.271358459421)*(o-1.)
            arg[(0, 1, 1, 1)]=-0.595334326509*x[0]**o + (0.463324718312)*x[0] + (-0.84548892208)*x[1]**o + (0.219316211083)*x[1] + (0.742434726021)*x[2]**o + (0.505640543087)*x[2]
            ref[(0, 1, 1, 1)]=0.244946474957-(-0.116398087095)*(o-1.)
            arg[(0, 1, 2, 0)]=-0.935910716614*x[0]**o + (-0.593469131653)*x[0] + (0.0997299629115)*x[1]**o + (0.686478622912)*x[1] + (-0.257560462351)*x[2]**o + (0.42778085963)*x[2]
            ref[(0, 1, 2, 0)]=-0.286475432582-(-0.182290202676)*(o-1.)
            arg[(0, 1, 2, 1)]=0.481403425512*x[0]**o + (-0.908246601316)*x[0] + (0.97263022442)*x[1]**o + (-0.859396548202)*x[1] + (-0.394975276823)*x[2]**o + (-0.592394495785)*x[2]
            ref[(0, 1, 2, 1)]=-0.650489636097-(0.176509728851)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.622752305175*x[0]**o + (0.0432719086664)*x[0] + (0.977501807195)*x[1]**o + (-0.190254289956)*x[1] + (-0.624269152185)*x[2]**o + (-0.100587400548)*x[2]
            ref[(1, 0, 0, 0)]=-0.258544716002-(-0.0449199416943)*(o-1.)
            arg[(1, 0, 0, 1)]=-0.741385039743*x[0]**o + (-0.439836116125)*x[0] + (-0.646022699499)*x[1]**o + (-0.642416625627)*x[1] + (-0.484578488148)*x[2]**o + (-0.614988134264)*x[2]
            ref[(1, 0, 0, 1)]=-1.7846135517-(-0.311997704565)*(o-1.)
            arg[(1, 0, 1, 0)]=0.455973608289*x[0]**o + (0.205356559538)*x[0] + (-0.750066627998)*x[1]**o + (0.328776324652)*x[1] + (-0.0904559449331)*x[2]**o + (0.495706039268)*x[2]
            ref[(1, 0, 1, 0)]=0.322644979408-(-0.064091494107)*(o-1.)
            arg[(1, 0, 1, 1)]=0.542079216104*x[0]**o + (0.245652776152)*x[0] + (-0.706981901609)*x[1]**o + (0.726781927825)*x[1] + (-0.219925292981)*x[2]**o + (0.802131133236)*x[2]
            ref[(1, 0, 1, 1)]=0.694868929363-(-0.0641379964144)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.999061979519*x[0]**o + (0.745502819339)*x[0] + (0.544916893442)*x[1]**o + (0.456869905792)*x[1] + (0.488585237243)*x[2]**o + (0.209873260287)*x[2]
            ref[(1, 0, 2, 0)]=0.723343068292-(0.00574002519426)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.642936173511*x[0]**o + (-0.441425860907)*x[0] + (-0.20201415923)*x[1]**o + (-0.868217154917)*x[1] + (-0.362510162432)*x[2]**o + (-0.896987673647)*x[2]
            ref[(1, 0, 2, 1)]=-1.70704559232-(-0.201243415862)*(o-1.)
            arg[(1, 1, 0, 0)]=-0.161621368468*x[0]**o + (0.379125461148)*x[0] + (-0.703246000479)*x[1]**o + (0.416125352524)*x[1] + (0.893309493358)*x[2]**o + (0.607786251231)*x[2]
            ref[(1, 1, 0, 0)]=0.715739594656-(0.00474035406831)*(o-1.)
            arg[(1, 1, 0, 1)]=-0.755812684823*x[0]**o + (-0.250158950908)*x[0] + (0.73099129279)*x[1]**o + (-0.514439589816)*x[1] + (-0.870574627176)*x[2]**o + (0.954838212679)*x[2]
            ref[(1, 1, 0, 1)]=-0.352578173626-(-0.149232669868)*(o-1.)
            arg[(1, 1, 1, 0)]=0.241763676484*x[0]**o + (0.0686665369837)*x[0] + (0.538608923599)*x[1]**o + (-0.611585738437)*x[1] + (-0.189537296599)*x[2]**o + (-0.278589278349)*x[2]
            ref[(1, 1, 1, 0)]=-0.115336588159-(0.0984725505807)*(o-1.)
            arg[(1, 1, 1, 1)]=-0.556095652439*x[0]**o + (-0.474627659443)*x[0] + (-0.915366409072)*x[1]**o + (0.850329378744)*x[1] + (-0.364191227214)*x[2]**o + (0.867615646538)*x[2]
            ref[(1, 1, 1, 1)]=-0.296167961443-(-0.305942214788)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.782995883572*x[0]**o + (0.27292328272)*x[0] + (0.715952794494)*x[1]**o + (0.924799851157)*x[1] + (0.253992007442)*x[2]**o + (0.73091466611)*x[2]
            ref[(1, 1, 2, 0)]=1.05779335918-(0.0311581530606)*(o-1.)
            arg[(1, 1, 2, 1)]=0.65853965693*x[0]**o + (0.616049065005)*x[0] + (0.436181575743)*x[1]**o + (0.301984473824)*x[1] + (0.414666336262)*x[2]**o + (-0.298773577732)*x[2]
            ref[(1, 1, 2, 1)]=1.06432376502-(0.251564594822)*(o-1.)
            arg[(2, 0, 0, 0)]=-0.178974791747*x[0]**o + (0.0749967059682)*x[0] + (-0.189488876194)*x[1]**o + (0.0756009995525)*x[1] + (-0.725964132134)*x[2]**o + (-0.923993989696)*x[2]
            ref[(2, 0, 0, 0)]=-0.933912042125-(-0.182404633346)*(o-1.)
            arg[(2, 0, 0, 1)]=-0.238804600813*x[0]**o + (0.447284967136)*x[0] + (-0.386655516017)*x[1]**o + (0.517589596289)*x[1] + (-0.590552554677)*x[2]**o + (-0.121561277486)*x[2]
            ref[(2, 0, 0, 1)]=-0.186349692784-(-0.202668778584)*(o-1.)
            arg[(2, 0, 1, 0)]=-0.577811355025*x[0]**o + (-0.966640801232)*x[0] + (0.348934282793)*x[1]**o + (0.0433955168481)*x[1] + (0.915936650684)*x[2]**o + (-0.00609603411483)*x[2]
            ref[(2, 0, 1, 0)]=-0.121140870023-(0.114509929742)*(o-1.)
            arg[(2, 0, 1, 1)]=-0.783338413852*x[0]**o + (0.100181256434)*x[0] + (-0.151052632387)*x[1]**o + (-0.571798072814)*x[1] + (0.0151298014711)*x[2]**o + (-0.838147683869)*x[2]
            ref[(2, 0, 1, 1)]=-1.11451287251-(-0.153210207461)*(o-1.)
            arg[(2, 0, 2, 0)]=-0.0710967019129*x[0]**o + (-0.287762102466)*x[0] + (0.541059138123)*x[1]**o + (-0.0787476340861)*x[1] + (0.213166706028)*x[2]**o + (0.334919646132)*x[2]
            ref[(2, 0, 2, 0)]=0.325769525909-(0.11385485704)*(o-1.)
            arg[(2, 0, 2, 1)]=-0.0214255007116*x[0]**o + (-0.232343356)*x[0] + (0.805049495111)*x[1]**o + (-0.359589850914)*x[1] + (0.295223200371)*x[2]**o + (0.032986897224)*x[2]
            ref[(2, 0, 2, 1)]=0.25995044254-(0.179807865795)*(o-1.)
            arg[(2, 1, 0, 0)]=-0.773501443828*x[0]**o + (0.847309876186)*x[0] + (0.0615725260824)*x[1]**o + (-0.0359442537188)*x[1] + (-0.208975066874)*x[2]**o + (-0.648328311369)*x[2]
            ref[(2, 1, 0, 0)]=-0.378933336761-(-0.153483997437)*(o-1.)
            arg[(2, 1, 0, 1)]=-0.203743936846*x[0]**o + (-0.855837224221)*x[0] + (0.305096899373)*x[1]**o + (0.139820310675)*x[1] + (-0.653853166344)*x[2]**o + (0.924920304418)*x[2]
            ref[(2, 1, 0, 1)]=-0.171798406472-(-0.0920833673027)*(o-1.)
            arg[(2, 1, 1, 0)]=0.18759231233*x[0]**o + (0.55542909088)*x[0] + (-0.769880383201)*x[1]**o + (-0.487149815132)*x[1] + (-0.375533136064)*x[2]**o + (0.23846381162)*x[2]
            ref[(2, 1, 1, 0)]=-0.325539059783-(-0.159636867822)*(o-1.)
            arg[(2, 1, 1, 1)]=0.636271815267*x[0]**o + (0.403768878059)*x[0] + (0.439342895859)*x[1]**o + (-0.370330362482)*x[1] + (-0.0425726523659)*x[2]**o + (-0.341923507099)*x[2]
            ref[(2, 1, 1, 1)]=0.36227853362-(0.17217367646)*(o-1.)
            arg[(2, 1, 2, 0)]=-0.0572782487146*x[0]**o + (0.501958093157)*x[0] + (-0.488857892837)*x[1]**o + (0.185866288371)*x[1] + (0.413714021994)*x[2]**o + (0.0514034370356)*x[2]
            ref[(2, 1, 2, 0)]=0.303402849503-(-0.0220703532596)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.986286518982*x[0]**o + (0.227098065913)*x[0] + (0.0724323007939)*x[1]**o + (0.192786898795)*x[1] + (0.548522259357)*x[2]**o + (-0.44917138818)*x[2]
            ref[(2, 1, 2, 1)]=-0.197309191152-(-0.0608886598052)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.338553979871*x[0]**o + (0.585528292115)*x[0] + (0.942703734747)*x[1]**o + (0.036641788331)*x[1]
            ref=0.951713897532-(0.213542952436)*(o-1.)
        else:
            arg=-0.0340502260115*x[0]**o + (0.751841834766)*x[0] + (0.131410881588)*x[1]**o + (-0.861386591508)*x[1] + (0.48291626436)*x[2]**o + (0.44720500116)*x[2]
            ref=0.458968582177-(0.0967128199895)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.202878519218*x[0]**o + (-0.156735545333)*x[0] + (0.0242677344161)*x[1]**o + (0.766847042616)*x[1]
            ref[(0,)]=0.418628875458-(0.0378577089389)*(o-1.)
            arg[(1,)]=-0.478997958944*x[0]**o + (-0.635933291246)*x[0] + (-0.758264552278)*x[1]**o + (0.519180070081)*x[1]
            ref[(1,)]=-0.677007866194-(-0.206210418537)*(o-1.)
            arg[(2,)]=-0.213499354422*x[0]**o + (-0.945839358684)*x[0] + (-0.514229655901)*x[1]**o + (-0.929521677268)*x[1]
            ref[(2,)]=-1.30154502314-(-0.121288168387)*(o-1.)
        else:
            arg[(0,)]=-0.183189625775*x[0]**o + (0.0476108110552)*x[0] + (-0.310947958861)*x[1]**o + (0.257510125804)*x[1] + (0.167727111527)*x[2]**o + (0.852020519341)*x[2]
            ref[(0,)]=0.415365491545-(-0.0544017455182)*(o-1.)
            arg[(1,)]=0.499866086113*x[0]**o + (0.778946467403)*x[0] + (-0.312488232391)*x[1]**o + (-0.673068149298)*x[1] + (0.0368756733978)*x[2]**o + (-0.22882763661)*x[2]
            ref[(1,)]=0.0506521043073-(0.0373755878533)*(o-1.)
            arg[(2,)]=0.995911997439*x[0]**o + (-0.622439689152)*x[0] + (0.52954969791)*x[1]**o + (0.710271387662)*x[1] + (0.33531409988)*x[2]**o + (-0.844553675192)*x[2]
            ref[(2,)]=0.552026909274-(0.310129299205)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.858164122903*x[0]**o + (-0.475204499359)*x[0] + (-0.568911290812)*x[1]**o + (0.846202987675)*x[1]
            ref[(0, 0)]=-0.528038462699-(-0.237845902286)*(o-1.)
            arg[(0, 1)]=-0.206862352452*x[0]**o + (-0.174194928906)*x[0] + (-0.0125975081356)*x[1]**o + (0.983090580101)*x[1]
            ref[(0, 1)]=0.294717895304-(-0.0365766434313)*(o-1.)
            arg[(0, 2)]=0.277549017749*x[0]**o + (0.0845528282272)*x[0] + (-0.190872464191)*x[1]**o + (-0.499967216241)*x[1]
            ref[(0, 2)]=-0.164368917228-(0.0144460922596)*(o-1.)
            arg[(0, 3)]=-0.359083226991*x[0]**o + (0.727348327102)*x[0] + (0.964717299414)*x[1]**o + (0.580635195685)*x[1]
            ref[(0, 3)]=0.956808797604-(0.10093901207)*(o-1.)
            arg[(1, 0)]=0.514178061038*x[0]**o + (-0.643995786974)*x[0] + (-0.186367372325)*x[1]**o + (-0.337399466093)*x[1]
            ref[(1, 0)]=-0.326792282177-(0.0546351147854)*(o-1.)
            arg[(1, 1)]=0.315946183102*x[0]**o + (0.355323275319)*x[0] + (-0.58870826659)*x[1]**o + (-0.578441777609)*x[1]
            ref[(1, 1)]=-0.247940292888-(-0.0454603472478)*(o-1.)
            arg[(1, 2)]=-0.396526118532*x[0]**o + (-0.66170382627)*x[0] + (0.899421492847)*x[1]**o + (-0.196538253568)*x[1]
            ref[(1, 2)]=-0.177673352761-(0.0838158957192)*(o-1.)
            arg[(1, 3)]=-0.338636849569*x[0]**o + (0.0268232742455)*x[0] + (-0.0277377888233)*x[1]**o + (0.258488948293)*x[1]
            ref[(1, 3)]=-0.0405312079269-(-0.061062439732)*(o-1.)
        else:
            arg[(0, 0)]=0.764715004825*x[0]**o + (0.174131725578)*x[0] + (-0.76436333001)*x[1]**o + (0.444553537553)*x[1] + (-0.269915646316)*x[2]**o + (0.243665921937)*x[2]
            ref[(0, 0)]=0.296393606784-(-0.0449273285834)*(o-1.)
            arg[(0, 1)]=0.20785495325*x[0]**o + (0.736865487117)*x[0] + (-0.674729272353)*x[1]**o + (-0.82412698033)*x[1] + (0.644643182488)*x[2]**o + (-0.620428691761)*x[2]
            ref[(0, 1)]=-0.264960660795-(0.0296281438975)*(o-1.)
            arg[(0, 2)]=0.430746511234*x[0]**o + (0.0372386541473)*x[0] + (0.966145316505)*x[1]**o + (-0.279872732018)*x[1] + (0.477066352667)*x[2]**o + (-0.71906677215)*x[2]
            ref[(0, 2)]=0.456128665193-(0.312326363401)*(o-1.)
            arg[(0, 3)]=0.389961323948*x[0]**o + (0.983419904629)*x[0] + (-0.546694493449)*x[1]**o + (-0.988775119383)*x[1] + (-0.312092116236)*x[2]**o + (0.271424981487)*x[2]
            ref[(0, 3)]=-0.101377759502-(-0.078137547623)*(o-1.)
            arg[(1, 0)]=0.339610283869*x[0]**o + (0.20601133761)*x[0] + (-0.131273117113)*x[1]**o + (0.620804307692)*x[1] + (0.446962531823)*x[2]**o + (0.975366575678)*x[2]
            ref[(1, 0)]=1.22874095978-(0.10921661643)*(o-1.)
            arg[(1, 1)]=-0.374966080108*x[0]**o + (-0.466784112358)*x[0] + (-0.411751406475)*x[1]**o + (-0.508732744245)*x[1] + (0.904412254528)*x[2]**o + (-0.797328020177)*x[2]
            ref[(1, 1)]=-0.827575054418-(0.0196157946575)*(o-1.)
            arg[(1, 2)]=-0.401463847327*x[0]**o + (0.33799728714)*x[0] + (0.863494728261)*x[1]**o + (-0.637557001992)*x[1] + (0.595294688482)*x[2]**o + (-0.904329869617)*x[2]
            ref[(1, 2)]=-0.0732820075262-(0.176220928236)*(o-1.)
            arg[(1, 3)]=0.309248317018*x[0]**o + (-0.960394947308)*x[0] + (-0.538755871991)*x[1]**o + (0.133955831935)*x[1] + (-0.0714540631481)*x[2]**o + (0.955085409178)*x[2]
            ref[(1, 3)]=-0.0861576621584-(-0.0501602696869)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3),w)
        ref=numpy.zeros((3, 4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.0715792738784*x[0]**o + (-0.67049437469)*x[0] + (0.752481941744)*x[1]**o + (-0.265594582687)*x[1]
            ref[(0, 0, 0)]=-0.127593144756-(0.113483777978)*(o-1.)
            arg[(0, 0, 1)]=0.468435197241*x[0]**o + (0.545652766104)*x[0] + (-0.0849729211668)*x[1]**o + (-0.98727804695)*x[1]
            ref[(0, 0, 1)]=-0.0290815023861-(0.0639103793457)*(o-1.)
            arg[(0, 0, 2)]=-0.260288003876*x[0]**o + (0.697649895439)*x[0] + (-0.309304989368)*x[1]**o + (-0.70084598789)*x[1]
            ref[(0, 0, 2)]=-0.286394542848-(-0.0949321655408)*(o-1.)
            arg[(0, 1, 0)]=0.422351264972*x[0]**o + (-0.199465488182)*x[0] + (-0.556012371852)*x[1]**o + (0.938608407335)*x[1]
            ref[(0, 1, 0)]=0.302740906137-(-0.0222768511466)*(o-1.)
            arg[(0, 1, 1)]=-0.395316780231*x[0]**o + (0.859306898298)*x[0] + (-0.410546268647)*x[1]**o + (0.409424493469)*x[1]
            ref[(0, 1, 1)]=0.231434171445-(-0.134310508146)*(o-1.)
            arg[(0, 1, 2)]=-0.87783779657*x[0]**o + (-0.540506040634)*x[0] + (0.732249569214)*x[1]**o + (0.182666769861)*x[1]
            ref[(0, 1, 2)]=-0.251713749065-(-0.0242647045593)*(o-1.)
            arg[(0, 2, 0)]=-0.0476414639345*x[0]**o + (-0.642024360768)*x[0] + (-0.705974765559)*x[1]**o + (-0.657303918939)*x[1]
            ref[(0, 2, 0)]=-1.0264722546-(-0.125602704916)*(o-1.)
            arg[(0, 2, 1)]=-0.881393338005*x[0]**o + (-0.513085433042)*x[0] + (-0.995568057757)*x[1]**o + (0.290169743052)*x[1]
            ref[(0, 2, 1)]=-1.04993854288-(-0.312826899294)*(o-1.)
            arg[(0, 2, 2)]=-0.244400076479*x[0]**o + (0.658542822108)*x[0] + (0.790204743785)*x[1]**o + (0.729549060774)*x[1]
            ref[(0, 2, 2)]=0.966948275094-(0.090967444551)*(o-1.)
            arg[(0, 3, 0)]=0.407489266782*x[0]**o + (-0.345075714923)*x[0] + (-0.959330663191)*x[1]**o + (-0.5530435319)*x[1]
            ref[(0, 3, 0)]=-0.724980321616-(-0.0919735660681)*(o-1.)
            arg[(0, 3, 1)]=-0.837822323652*x[0]**o + (0.410315273318)*x[0] + (-0.231447200469)*x[1]**o + (0.0857224946514)*x[1]
            ref[(0, 3, 1)]=-0.286615878076-(-0.178211587354)*(o-1.)
            arg[(0, 3, 2)]=0.780257267216*x[0]**o + (-0.0794405799057)*x[0] + (-0.713635449051)*x[1]**o + (0.398976114967)*x[1]
            ref[(0, 3, 2)]=0.193078676614-(0.011103636361)*(o-1.)
            arg[(1, 0, 0)]=-0.232310394812*x[0]**o + (-0.315721937712)*x[0] + (-0.0976185358339)*x[1]**o + (-0.198937861697)*x[1]
            ref[(1, 0, 0)]=-0.422294365027-(-0.0549881551076)*(o-1.)
            arg[(1, 0, 1)]=0.387403201553*x[0]**o + (-0.174906357496)*x[0] + (-0.0375134346033)*x[1]**o + (0.433833714949)*x[1]
            ref[(1, 0, 1)]=0.304408562201-(0.0583149611582)*(o-1.)
            arg[(1, 0, 2)]=0.703515926762*x[0]**o + (-0.658589592003)*x[0] + (0.0210238216601)*x[1]**o + (0.891387596531)*x[1]
            ref[(1, 0, 2)]=0.478668876475-(0.120756624737)*(o-1.)
            arg[(1, 1, 0)]=0.213060338611*x[0]**o + (0.0346454439466)*x[0] + (-0.731733766165)*x[1]**o + (0.556138177818)*x[1]
            ref[(1, 1, 0)]=0.0360550971053-(-0.0864455712589)*(o-1.)
            arg[(1, 1, 1)]=0.470328071255*x[0]**o + (0.425951985946)*x[0] + (0.538663554733)*x[1]**o + (0.783183291081)*x[1]
            ref[(1, 1, 1)]=1.10906345151-(0.168165270998)*(o-1.)
            arg[(1, 1, 2)]=-0.662289137705*x[0]**o + (-0.724850630309)*x[0] + (0.881140888558)*x[1]**o + (0.278679799963)*x[1]
            ref[(1, 1, 2)]=-0.113659539746-(0.0364752918089)*(o-1.)
            arg[(1, 2, 0)]=-0.460066722603*x[0]**o + (0.577806441223)*x[0] + (0.834063193683)*x[1]**o + (0.337494079116)*x[1]
            ref[(1, 2, 0)]=0.644648495709-(0.06233274518)*(o-1.)
            arg[(1, 2, 1)]=0.8888207177*x[0]**o + (-0.906332205216)*x[0] + (0.969978369756)*x[1]**o + (0.221393140728)*x[1]
            ref[(1, 2, 1)]=0.586930011484-(0.309799847909)*(o-1.)
            arg[(1, 2, 2)]=-0.791313870347*x[0]**o + (0.906231012869)*x[0] + (0.537986805728)*x[1]**o + (-0.929285946186)*x[1]
            ref[(1, 2, 2)]=-0.138190998968-(-0.0422211774365)*(o-1.)
            arg[(1, 3, 0)]=0.0375944054836*x[0]**o + (0.263410311215)*x[0] + (-0.814795436843)*x[1]**o + (0.795688241429)*x[1]
            ref[(1, 3, 0)]=0.140948760642-(-0.129533505227)*(o-1.)
            arg[(1, 3, 1)]=0.69118273528*x[0]**o + (0.155314930134)*x[0] + (-0.538459640759)*x[1]**o + (0.229084361911)*x[1]
            ref[(1, 3, 1)]=0.268561193283-(0.0254538490868)*(o-1.)
            arg[(1, 3, 2)]=-0.992257269008*x[0]**o + (-0.225477419424)*x[0] + (-0.505573598522)*x[1]**o + (0.718831657259)*x[1]
            ref[(1, 3, 2)]=-0.502238314848-(-0.249638477922)*(o-1.)
            arg[(2, 0, 0)]=-0.846744481923*x[0]**o + (0.848414496169)*x[0] + (0.357958209102)*x[1]**o + (-0.256014920575)*x[1]
            ref[(2, 0, 0)]=0.0518066513868-(-0.0814643788034)*(o-1.)
            arg[(2, 0, 1)]=-0.151380756952*x[0]**o + (0.552850657133)*x[0] + (0.429576723451)*x[1]**o + (-0.258281246462)*x[1]
            ref[(2, 0, 1)]=0.286382688585-(0.0463659944165)*(o-1.)
            arg[(2, 0, 2)]=-0.690807626255*x[0]**o + (-0.233549104908)*x[0] + (-0.582181716217)*x[1]**o + (0.156870456752)*x[1]
            ref[(2, 0, 2)]=-0.674833995314-(-0.212164890412)*(o-1.)
            arg[(2, 1, 0)]=0.600511993711*x[0]**o + (-0.551041731588)*x[0] + (0.956536929297)*x[1]**o + (-0.888816081782)*x[1]
            ref[(2, 1, 0)]=0.058595554819-(0.259508153835)*(o-1.)
            arg[(2, 1, 1)]=0.520173174159*x[0]**o + (0.771886852391)*x[0] + (-0.48609161304)*x[1]**o + (0.701985958571)*x[1]
            ref[(2, 1, 1)]=0.75397718604-(0.00568026018643)*(o-1.)
            arg[(2, 1, 2)]=-0.168941632971*x[0]**o + (0.096079880748)*x[0] + (-0.703095948265)*x[1]**o + (0.236896752681)*x[1]
            ref[(2, 1, 2)]=-0.269530473903-(-0.145339596873)*(o-1.)
            arg[(2, 2, 0)]=0.668568168659*x[0]**o + (0.615065254635)*x[0] + (-0.88777562369)*x[1]**o + (-0.509774567637)*x[1]
            ref[(2, 2, 0)]=-0.0569583840161-(-0.0365345758384)*(o-1.)
            arg[(2, 2, 1)]=0.672528676982*x[0]**o + (0.147249381053)*x[0] + (0.908106946087)*x[1]**o + (-0.554855789958)*x[1]
            ref[(2, 2, 1)]=0.586514607082-(0.263439270512)*(o-1.)
            arg[(2, 2, 2)]=-0.517254199518*x[0]**o + (0.87676669298)*x[0] + (-0.859236139854)*x[1]**o + (-0.453317608339)*x[1]
            ref[(2, 2, 2)]=-0.476520627366-(-0.229415056562)*(o-1.)
            arg[(2, 3, 0)]=0.883261966324*x[0]**o + (-0.236804598491)*x[0] + (-0.972163816346)*x[1]**o + (0.60177897892)*x[1]
            ref[(2, 3, 0)]=0.138036265204-(-0.0148169750036)*(o-1.)
            arg[(2, 3, 1)]=-0.259156744127*x[0]**o + (0.696783005993)*x[0] + (0.197423814867)*x[1]**o + (-0.0704086578419)*x[1]
            ref[(2, 3, 1)]=0.282320709446-(-0.0102888215433)*(o-1.)
            arg[(2, 3, 2)]=-0.762318827754*x[0]**o + (-0.270605619645)*x[0] + (-0.75133104418)*x[1]**o + (0.0343882834542)*x[1]
            ref[(2, 3, 2)]=-0.874933604062-(-0.252274978656)*(o-1.)
        else:
            arg[(0, 0, 0)]=0.274162619923*x[0]**o + (0.281158366782)*x[0] + (-0.190175068248)*x[1]**o + (0.93939632726)*x[1] + (0.289945659554)*x[2]**o + (0.669567922486)*x[2]
            ref[(0, 0, 0)]=1.13202791388-(0.0623222018714)*(o-1.)
            arg[(0, 0, 1)]=0.370582630424*x[0]**o + (0.270772909608)*x[0] + (0.869966442762)*x[1]**o + (0.0797837493834)*x[1] + (0.345574402096)*x[2]**o + (0.815333796323)*x[2]
            ref[(0, 0, 1)]=1.3760069653-(0.264353912547)*(o-1.)
            arg[(0, 0, 2)]=0.459204159565*x[0]**o + (-0.831101680806)*x[0] + (-0.748941791844)*x[1]**o + (0.815701779062)*x[1] + (-0.942196980684)*x[2]**o + (0.0958216647873)*x[2]
            ref[(0, 0, 2)]=-0.57575642496-(-0.205322435494)*(o-1.)
            arg[(0, 1, 0)]=-0.157735991402*x[0]**o + (-0.0461361828872)*x[0] + (-0.742926138114)*x[1]**o + (-0.525552154398)*x[1] + (-0.200854489066)*x[2]**o + (-0.45053921931)*x[2]
            ref[(0, 1, 0)]=-1.06187208759-(-0.183586103097)*(o-1.)
            arg[(0, 1, 1)]=-0.876039254166*x[0]**o + (-0.498777486654)*x[0] + (-0.39907421893)*x[1]**o + (0.0666120744169)*x[1] + (0.0662230275359)*x[2]**o + (0.285664588493)*x[2]
            ref[(0, 1, 1)]=-0.677695634652-(-0.201481740927)*(o-1.)
            arg[(0, 1, 2)]=-0.00489998261674*x[0]**o + (0.734581157595)*x[0] + (-0.499336549743)*x[1]**o + (0.230902958473)*x[1] + (0.26889052645)*x[2]**o + (0.281241959851)*x[2]
            ref[(0, 1, 2)]=0.505690035005-(-0.0392243343183)*(o-1.)
            arg[(0, 2, 0)]=0.438866848195*x[0]**o + (-0.505523016452)*x[0] + (0.863230509529)*x[1]**o + (-0.288557331422)*x[1] + (0.401890886654)*x[2]**o + (-0.12823037499)*x[2]
            ref[(0, 2, 0)]=0.390838760757-(0.28399804073)*(o-1.)
            arg[(0, 2, 1)]=-0.0837840281109*x[0]**o + (0.685167910264)*x[0] + (-0.436146050402)*x[1]**o + (0.831270040667)*x[1] + (-0.981097257336)*x[2]**o + (-0.775691391517)*x[2]
            ref[(0, 2, 1)]=-0.380140388217-(-0.250171222642)*(o-1.)
            arg[(0, 2, 2)]=0.202981776449*x[0]**o + (-0.685016101322)*x[0] + (0.750062160353)*x[1]**o + (0.289276056068)*x[1] + (0.35067479269)*x[2]**o + (-0.820504339226)*x[2]
            ref[(0, 2, 2)]=0.0437371725063-(0.217286454915)*(o-1.)
            arg[(0, 3, 0)]=-0.735249710389*x[0]**o + (-0.53624406272)*x[0] + (-0.530250368857)*x[1]**o + (0.480489862593)*x[1] + (0.842504679302)*x[2]**o + (0.0949876241118)*x[2]
            ref[(0, 3, 0)]=-0.19188098798-(-0.070499233324)*(o-1.)
            arg[(0, 3, 1)]=-0.407093990323*x[0]**o + (-0.648874389137)*x[0] + (0.656595987856)*x[1]**o + (0.890574819585)*x[1] + (0.994352208378)*x[2]**o + (-0.101350171265)*x[2]
            ref[(0, 3, 1)]=0.692102232547-(0.207309034319)*(o-1.)
            arg[(0, 3, 2)]=0.0393984206976*x[0]**o + (-0.0717584367801)*x[0] + (-0.923468958647)*x[1]**o + (0.247506965128)*x[1] + (-0.805113070715)*x[2]**o + (0.173498314125)*x[2]
            ref[(0, 3, 2)]=-0.669968383096-(-0.281530601444)*(o-1.)
            arg[(1, 0, 0)]=0.00892140384608*x[0]**o + (0.142447343594)*x[0] + (-0.250435089142)*x[1]**o + (-0.557457898991)*x[1] + (0.033562647592)*x[2]**o + (-0.214512719974)*x[2]
            ref[(1, 0, 0)]=-0.418737156538-(-0.0346585062841)*(o-1.)
            arg[(1, 0, 1)]=0.1286060821*x[0]**o + (-0.651429245774)*x[0] + (0.0682423936473)*x[1]**o + (-0.417899433645)*x[1] + (0.961441473282)*x[2]**o + (-0.685999638802)*x[2]
            ref[(1, 0, 1)]=-0.298519184596-(0.193048324838)*(o-1.)
            arg[(1, 0, 2)]=-0.613718650904*x[0]**o + (0.647774204988)*x[0] + (-0.593987918633)*x[1]**o + (-0.839237277516)*x[1] + (0.876523134812)*x[2]**o + (0.338294758301)*x[2]
            ref[(1, 0, 2)]=-0.0921758744758-(-0.0551972391208)*(o-1.)
            arg[(1, 1, 0)]=-0.645151791417*x[0]**o + (0.162427605257)*x[0] + (-0.981312000128)*x[1]**o + (0.414476264225)*x[1] + (-0.941125479335)*x[2]**o + (-0.155531496729)*x[2]
            ref[(1, 1, 0)]=-1.07310844906-(-0.427931545147)*(o-1.)
            arg[(1, 1, 1)]=-0.532990113626*x[0]**o + (-0.245927750813)*x[0] + (-0.541436534881)*x[1]**o + (0.887792541896)*x[1] + (0.451519831106)*x[2]**o + (-0.709461911986)*x[2]
            ref[(1, 1, 1)]=-0.345251969152-(-0.1038178029)*(o-1.)
            arg[(1, 1, 2)]=0.907792202351*x[0]**o + (-0.655888011419)*x[0] + (0.0379147911004)*x[1]**o + (0.956752489909)*x[1] + (-0.472941526039)*x[2]**o + (-0.726674250069)*x[2]
            ref[(1, 1, 2)]=0.0234778479166-(0.0787942445686)*(o-1.)
            arg[(1, 2, 0)]=0.230688684208*x[0]**o + (0.186552359403)*x[0] + (0.981024782445)*x[1]**o + (-0.337239774727)*x[1] + (-0.630301818947)*x[2]**o + (-0.380273598813)*x[2]
            ref[(1, 2, 0)]=0.0252253167846-(0.0969019412844)*(o-1.)
            arg[(1, 2, 1)]=-0.297841809856*x[0]**o + (0.764818611592)*x[0] + (-0.00593134985797)*x[1]**o + (0.883088167327)*x[1] + (-0.313432774523)*x[2]**o + (-0.726856692891)*x[2]
            ref[(1, 2, 1)]=0.151922075896-(-0.102867655706)*(o-1.)
            arg[(1, 2, 2)]=0.124479174402*x[0]**o + (0.32733554855)*x[0] + (0.771613810973)*x[1]**o + (-0.36207463016)*x[1] + (0.210099656045)*x[2]**o + (-0.726774882438)*x[2]
            ref[(1, 2, 2)]=0.172339338686-(0.184365440237)*(o-1.)
            arg[(1, 3, 0)]=0.287844937814*x[0]**o + (0.34591225993)*x[0] + (-0.835684258706)*x[1]**o + (-0.894472666416)*x[1] + (0.654873883354)*x[2]**o + (-0.391631361192)*x[2]
            ref[(1, 3, 0)]=-0.416578602608-(0.0178390937437)*(o-1.)
            arg[(1, 3, 1)]=0.730872399059*x[0]**o + (-0.870226318793)*x[0] + (-0.819529764822)*x[1]**o + (-0.426873693136)*x[1] + (-0.849412893263)*x[2]**o + (-0.570032513116)*x[2]
            ref[(1, 3, 1)]=-1.40260139204-(-0.156345043171)*(o-1.)
            arg[(1, 3, 2)]=0.947309657207*x[0]**o + (0.785239838221)*x[0] + (0.798524178663)*x[1]**o + (0.231295197739)*x[1] + (0.37252235623)*x[2]**o + (0.312067147642)*x[2]
            ref[(1, 3, 2)]=1.72347918785-(0.35305936535)*(o-1.)
            arg[(2, 0, 0)]=0.0430597391102*x[0]**o + (-0.504308524254)*x[0] + (-0.174880163892)*x[1]**o + (-0.886495381051)*x[1] + (0.209838131425)*x[2]**o + (0.181335931183)*x[2]
            ref[(2, 0, 0)]=-0.565725133739-(0.0130029511073)*(o-1.)
            arg[(2, 0, 1)]=-0.428070063478*x[0]**o + (0.226285760275)*x[0] + (0.183832253106)*x[1]**o + (-0.603139958063)*x[1] + (-0.0697842112332)*x[2]**o + (-0.111823353848)*x[2]
            ref[(2, 0, 1)]=-0.40134978662-(-0.0523370036009)*(o-1.)
            arg[(2, 0, 2)]=0.809190707717*x[0]**o + (0.269914367387)*x[0] + (0.172702706499)*x[1]**o + (-0.44818808017)*x[1] + (0.708558017188)*x[2]**o + (0.547622130666)*x[2]
            ref[(2, 0, 2)]=1.02989992464-(0.281741905234)*(o-1.)
            arg[(2, 1, 0)]=-0.296263347637*x[0]**o + (-0.607630237538)*x[0] + (-0.0230685880858)*x[1]**o + (0.172874538608)*x[1] + (-0.745356467045)*x[2]**o + (-0.872132382005)*x[2]
            ref[(2, 1, 0)]=-1.18578824185-(-0.177448067128)*(o-1.)
            arg[(2, 1, 1)]=0.832004398241*x[0]**o + (-0.215026237268)*x[0] + (0.526563907407)*x[1]**o + (-0.872672775863)*x[1] + (-0.319064295055)*x[2]**o + (0.16575503661)*x[2]
            ref[(2, 1, 1)]=0.0587800170359-(0.173250668432)*(o-1.)
            arg[(2, 1, 2)]=0.368245778201*x[0]**o + (-0.0869992960108)*x[0] + (-0.669273232667)*x[1]**o + (-0.428398601325)*x[1] + (-0.688688453529)*x[2]**o + (-0.686805728924)*x[2]
            ref[(2, 1, 2)]=-1.09595976713-(-0.164952651332)*(o-1.)
            arg[(2, 2, 0)]=-0.238086700386*x[0]**o + (0.792471192547)*x[0] + (-0.964801761913)*x[1]**o + (-0.290220177106)*x[1] + (-0.29591886946)*x[2]**o + (0.882377908679)*x[2]
            ref[(2, 2, 0)]=-0.0570892038199-(-0.24980122196)*(o-1.)
            arg[(2, 2, 1)]=0.551252160463*x[0]**o + (0.299425307235)*x[0] + (-0.440665595528)*x[1]**o + (0.608752592509)*x[1] + (-0.553849094369)*x[2]**o + (0.937403405507)*x[2]
            ref[(2, 2, 1)]=0.701159387909-(-0.0738770882389)*(o-1.)
            arg[(2, 2, 2)]=0.447487624315*x[0]**o + (-0.562150790921)*x[0] + (-0.683824161833)*x[1]**o + (-0.140609977378)*x[1] + (0.122833744185)*x[2]**o + (-0.811606288261)*x[2]
            ref[(2, 2, 2)]=-0.813934924947-(-0.0189171322222)*(o-1.)
            arg[(2, 3, 0)]=0.25953382317*x[0]**o + (0.673342193074)*x[0] + (-0.383404221618)*x[1]**o + (0.924896918329)*x[1] + (-0.48580452411)*x[2]**o + (-0.281458410319)*x[2]
            ref[(2, 3, 0)]=0.353552889263-(-0.101612487093)*(o-1.)
            arg[(2, 3, 1)]=-0.071159588979*x[0]**o + (-0.680335253863)*x[0] + (-0.580703949174)*x[1]**o + (-0.165763052893)*x[1] + (0.549225735442)*x[2]**o + (-0.888015633961)*x[2]
            ref[(2, 3, 1)]=-0.918375871714-(-0.0171063004517)*(o-1.)
            arg[(2, 3, 2)]=-0.519819318872*x[0]**o + (-0.341393461466)*x[0] + (0.00322944063936)*x[1]**o + (-0.715869045945)*x[1] + (-0.00315500202676)*x[2]**o + (-0.272015814983)*x[2]
            ref[(2, 3, 2)]=-0.924511601327-(-0.0866241467099)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4, 4),w)
        ref=numpy.zeros((4, 3, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.204589121735*x[0]**o + (-0.651378649914)*x[0] + (-0.815711765936)*x[1]**o + (-0.958491108653)*x[1]
            ref[(0, 0, 0, 0)]=-1.31508532312-(-0.170050147945)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.23847160425*x[0]**o + (0.939718909336)*x[0] + (0.014283848185)*x[1]**o + (-0.2471841328)*x[1]
            ref[(0, 0, 0, 1)]=0.234173510235-(-0.0373646260108)*(o-1.)
            arg[(0, 0, 0, 2)]=0.374453256682*x[0]**o + (0.558383198604)*x[0] + (0.679028860905)*x[1]**o + (0.766880316144)*x[1]
            ref[(0, 0, 0, 2)]=1.18937281617-(0.175580352931)*(o-1.)
            arg[(0, 0, 0, 3)]=0.0286480558703*x[0]**o + (0.360755121634)*x[0] + (-0.76989786836)*x[1]**o + (0.677832159038)*x[1]
            ref[(0, 0, 0, 3)]=0.148668734091-(-0.123541635415)*(o-1.)
            arg[(0, 0, 1, 0)]=0.7158559468*x[0]**o + (0.0379831940946)*x[0] + (-0.860115099974)*x[1]**o + (0.92691523969)*x[1]
            ref[(0, 0, 1, 0)]=0.410319640305-(-0.0240431921957)*(o-1.)
            arg[(0, 0, 1, 1)]=-0.732577006144*x[0]**o + (-0.993523451811)*x[0] + (0.744566451689)*x[1]**o + (0.0335380837877)*x[1]
            ref[(0, 0, 1, 1)]=-0.473997961239-(0.00199824092411)*(o-1.)
            arg[(0, 0, 1, 2)]=0.122363331121*x[0]**o + (-0.0185790110216)*x[0] + (-0.158120838162)*x[1]**o + (0.871235098805)*x[1]
            ref[(0, 0, 1, 2)]=0.408449290371-(-0.00595958450679)*(o-1.)
            arg[(0, 0, 1, 3)]=-0.222736932675*x[0]**o + (-0.276229402909)*x[0] + (-0.736516591288)*x[1]**o + (-0.92024909797)*x[1]
            ref[(0, 0, 1, 3)]=-1.07786601242-(-0.159875587327)*(o-1.)
            arg[(0, 0, 2, 0)]=-0.423958526261*x[0]**o + (0.685076997318)*x[0] + (-0.398690324988)*x[1]**o + (0.0634673977458)*x[1]
            ref[(0, 0, 2, 0)]=-0.0370522280927-(-0.137108141875)*(o-1.)
            arg[(0, 0, 2, 1)]=0.543966826385*x[0]**o + (-0.104095992486)*x[0] + (-0.141200760901)*x[1]**o + (0.0922329589049)*x[1]
            ref[(0, 0, 2, 1)]=0.195451515952-(0.0671276775808)*(o-1.)
            arg[(0, 0, 2, 2)]=-0.487026164985*x[0]**o + (-0.853022156845)*x[0] + (0.39333247726)*x[1]**o + (-0.502286448455)*x[1]
            ref[(0, 0, 2, 2)]=-0.724501146513-(-0.0156156146208)*(o-1.)
            arg[(0, 0, 2, 3)]=0.598029997544*x[0]**o + (-0.457977899655)*x[0] + (0.798425698566)*x[1]**o + (-0.811436293603)*x[1]
            ref[(0, 0, 2, 3)]=0.0635207514256-(0.232742616018)*(o-1.)
            arg[(0, 0, 3, 0)]=-0.913745175854*x[0]**o + (0.0769215921978)*x[0] + (-0.917397131734)*x[1]**o + (0.103728567206)*x[1]
            ref[(0, 0, 3, 0)]=-0.825246074092-(-0.305190384598)*(o-1.)
            arg[(0, 0, 3, 1)]=0.79430940202*x[0]**o + (0.507712796282)*x[0] + (0.424962007595)*x[1]**o + (-0.706972225998)*x[1]
            ref[(0, 0, 3, 1)]=0.51000598995-(0.203211901603)*(o-1.)
            arg[(0, 0, 3, 2)]=0.318943768111*x[0]**o + (-0.492383156555)*x[0] + (-0.134650133198)*x[1]**o + (0.429926834827)*x[1]
            ref[(0, 0, 3, 2)]=0.0609186565927-(0.030715605819)*(o-1.)
            arg[(0, 0, 3, 3)]=0.119436295724*x[0]**o + (-0.40776720655)*x[0] + (0.897788555126)*x[1]**o + (-0.791306340481)*x[1]
            ref[(0, 0, 3, 3)]=-0.0909243480903-(0.169537475142)*(o-1.)
            arg[(0, 1, 0, 0)]=-0.287747885524*x[0]**o + (-0.922761211446)*x[0] + (0.70624367898)*x[1]**o + (-0.68105614341)*x[1]
            ref[(0, 1, 0, 0)]=-0.5926607807-(0.0697492989093)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.0321545803484*x[0]**o + (0.610231818067)*x[0] + (0.761666658364)*x[1]**o + (-0.988252986499)*x[1]
            ref[(0, 1, 0, 1)]=0.175745454792-(0.121585346336)*(o-1.)
            arg[(0, 1, 0, 2)]=-0.610434505897*x[0]**o + (0.709169503471)*x[0] + (-0.743522215397)*x[1]**o + (0.206720818466)*x[1]
            ref[(0, 1, 0, 2)]=-0.219033199679-(-0.225659453549)*(o-1.)
            arg[(0, 1, 0, 3)]=-0.148344699821*x[0]**o + (0.587103748645)*x[0] + (-0.264868727786)*x[1]**o + (-0.297169197416)*x[1]
            ref[(0, 1, 0, 3)]=-0.0616394381895-(-0.0688689046013)*(o-1.)
            arg[(0, 1, 1, 0)]=-0.74931577801*x[0]**o + (-0.648119320011)*x[0] + (-0.336885668992)*x[1]**o + (0.581877859446)*x[1]
            ref[(0, 1, 1, 0)]=-0.576221453784-(-0.1810335745)*(o-1.)
            arg[(0, 1, 1, 1)]=-0.889689828808*x[0]**o + (0.589687879285)*x[0] + (-0.906691687345)*x[1]**o + (0.624935374967)*x[1]
            ref[(0, 1, 1, 1)]=-0.29087913095-(-0.299396919359)*(o-1.)
            arg[(0, 1, 1, 2)]=0.774583743694*x[0]**o + (-0.504319492262)*x[0] + (-0.562489635316)*x[1]**o + (-0.958753915688)*x[1]
            ref[(0, 1, 1, 2)]=-0.625489649786-(0.0353490180629)*(o-1.)
            arg[(0, 1, 1, 3)]=-0.148040640574*x[0]**o + (-0.907604965049)*x[0] + (0.154033310711)*x[1]**o + (0.810985116097)*x[1]
            ref[(0, 1, 1, 3)]=-0.0453135894075-(0.000998778356211)*(o-1.)
            arg[(0, 1, 2, 0)]=-0.92754367232*x[0]**o + (-0.355954030591)*x[0] + (-0.209359211201)*x[1]**o + (0.335559002383)*x[1]
            ref[(0, 1, 2, 0)]=-0.578648955865-(-0.18948381392)*(o-1.)
            arg[(0, 1, 2, 1)]=0.10483852824*x[0]**o + (0.0507287779987)*x[0] + (-0.790590952895)*x[1]**o + (-0.307636522859)*x[1]
            ref[(0, 1, 2, 1)]=-0.471330084757-(-0.114292070776)*(o-1.)
            arg[(0, 1, 2, 2)]=-0.703114098567*x[0]**o + (0.612765643365)*x[0] + (0.755090886613)*x[1]**o + (-0.291229437106)*x[1]
            ref[(0, 1, 2, 2)]=0.186756497153-(0.00866279800771)*(o-1.)
            arg[(0, 1, 2, 3)]=-0.291230504248*x[0]**o + (-0.603518306595)*x[0] + (-0.111610318983)*x[1]**o + (-0.975778226673)*x[1]
            ref[(0, 1, 2, 3)]=-0.991068678249-(-0.0671401372051)*(o-1.)
            arg[(0, 1, 3, 0)]=-0.332527988703*x[0]**o + (-0.776136646425)*x[0] + (0.823305528579)*x[1]**o + (0.632779413703)*x[1]
            ref[(0, 1, 3, 0)]=0.173710153578-(0.0817962566461)*(o-1.)
            arg[(0, 1, 3, 1)]=0.993365142309*x[0]**o + (-0.717189984062)*x[0] + (0.83407977093)*x[1]**o + (-0.109453716979)*x[1]
            ref[(0, 1, 3, 1)]=0.500400606099-(0.304574152207)*(o-1.)
            arg[(0, 1, 3, 2)]=0.510146459171*x[0]**o + (0.733051994615)*x[0] + (0.710695809375)*x[1]**o + (0.388679535585)*x[1]
            ref[(0, 1, 3, 2)]=1.17128689937-(0.203473711424)*(o-1.)
            arg[(0, 1, 3, 3)]=0.252084768494*x[0]**o + (-0.346891451776)*x[0] + (0.688710434722)*x[1]**o + (-0.0621849167824)*x[1]
            ref[(0, 1, 3, 3)]=0.265859417329-(0.156799200536)*(o-1.)
            arg[(0, 2, 0, 0)]=0.738513371697*x[0]**o + (-0.354017173921)*x[0] + (-0.497723099273)*x[1]**o + (-0.747168036313)*x[1]
            ref[(0, 2, 0, 0)]=-0.430197468905-(0.0401317120707)*(o-1.)
            arg[(0, 2, 0, 1)]=0.253558595126*x[0]**o + (-0.878338380973)*x[0] + (0.57078282566)*x[1]**o + (0.612353107599)*x[1]
            ref[(0, 2, 0, 1)]=0.279178073706-(0.137390236798)*(o-1.)
            arg[(0, 2, 0, 2)]=-0.519461174559*x[0]**o + (0.415099380456)*x[0] + (0.856452356653)*x[1]**o + (0.773192699229)*x[1]
            ref[(0, 2, 0, 2)]=0.762641630889-(0.0561651970157)*(o-1.)
            arg[(0, 2, 0, 3)]=0.984461125187*x[0]**o + (0.553942259951)*x[0] + (0.620309507887)*x[1]**o + (-0.466823101442)*x[1]
            ref[(0, 2, 0, 3)]=0.845944895791-(0.267461772179)*(o-1.)
            arg[(0, 2, 1, 0)]=-0.0452319757176*x[0]**o + (0.770527234175)*x[0] + (-0.698141851195)*x[1]**o + (0.275744055449)*x[1]
            ref[(0, 2, 1, 0)]=0.151448731356-(-0.123895637819)*(o-1.)
            arg[(0, 2, 1, 1)]=-0.658495703964*x[0]**o + (0.14586381116)*x[0] + (-0.46805005361)*x[1]**o + (0.319326979423)*x[1]
            ref[(0, 2, 1, 1)]=-0.330677483495-(-0.187757626262)*(o-1.)
            arg[(0, 2, 1, 2)]=-0.541860837823*x[0]**o + (-0.223460594587)*x[0] + (0.463692323182)*x[1]**o + (-0.0711111749494)*x[1]
            ref[(0, 2, 1, 2)]=-0.186370142089-(-0.0130280857735)*(o-1.)
            arg[(0, 2, 1, 3)]=0.0199822167769*x[0]**o + (-0.324034630283)*x[0] + (-0.844690122366)*x[1]**o + (0.299767061507)*x[1]
            ref[(0, 2, 1, 3)]=-0.424487737183-(-0.137451317598)*(o-1.)
            arg[(0, 2, 2, 0)]=0.00901589439208*x[0]**o + (0.230259026007)*x[0] + (-0.704322902856)*x[1]**o + (0.226096792183)*x[1]
            ref[(0, 2, 2, 0)]=-0.119475595137-(-0.115884501411)*(o-1.)
            arg[(0, 2, 2, 1)]=0.226075005411*x[0]**o + (0.520924801783)*x[0] + (-0.230246637996)*x[1]**o + (0.00283046273712)*x[1]
            ref[(0, 2, 2, 1)]=0.259791815968-(-0.000695272097459)*(o-1.)
            arg[(0, 2, 2, 2)]=0.289405320282*x[0]**o + (0.448290314025)*x[0] + (-0.796631675556)*x[1]**o + (0.509610470189)*x[1]
            ref[(0, 2, 2, 2)]=0.22533721447-(-0.0845377258789)*(o-1.)
            arg[(0, 2, 2, 3)]=0.384670782598*x[0]**o + (-0.793685858416)*x[0] + (-0.109097042139)*x[1]**o + (-0.811380559765)*x[1]
            ref[(0, 2, 2, 3)]=-0.66474633886-(0.0459289567433)*(o-1.)
            arg[(0, 2, 3, 0)]=-0.0468325194063*x[0]**o + (0.978200290526)*x[0] + (-0.619410512749)*x[1]**o + (-0.477899848313)*x[1]
            ref[(0, 2, 3, 0)]=-0.0829712949715-(-0.111040505359)*(o-1.)
            arg[(0, 2, 3, 1)]=0.112205605141*x[0]**o + (-0.0274602778342)*x[0] + (0.264702567063)*x[1]**o + (-0.0744943250039)*x[1]
            ref[(0, 2, 3, 1)]=0.137476784683-(0.0628180287006)*(o-1.)
            arg[(0, 2, 3, 2)]=0.618109381252*x[0]**o + (0.877794785977)*x[0] + (0.0203874472149)*x[1]**o + (0.49284388172)*x[1]
            ref[(0, 2, 3, 2)]=1.00456774808-(0.106416138078)*(o-1.)
            arg[(0, 2, 3, 3)]=0.585519006903*x[0]**o + (-0.606022719983)*x[0] + (0.268092143632)*x[1]**o + (0.457555001081)*x[1]
            ref[(0, 2, 3, 3)]=0.352571715816-(0.142268525089)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.390487019468*x[0]**o + (-0.943583613841)*x[0] + (0.844612451567)*x[1]**o + (0.302610829313)*x[1]
            ref[(1, 0, 0, 0)]=-0.0934236762144-(0.0756875720166)*(o-1.)
            arg[(1, 0, 0, 1)]=0.587615920545*x[0]**o + (0.629421188516)*x[0] + (0.882929412975)*x[1]**o + (-0.530553997385)*x[1]
            ref[(1, 0, 0, 1)]=0.784706262325-(0.24509088892)*(o-1.)
            arg[(1, 0, 0, 2)]=-0.913932149754*x[0]**o + (-0.998329576053)*x[0] + (0.502189669901)*x[1]**o + (-0.548629707856)*x[1]
            ref[(1, 0, 0, 2)]=-0.979350881881-(-0.0686237466421)*(o-1.)
            arg[(1, 0, 0, 3)]=-0.768975347368*x[0]**o + (-0.437349959678)*x[0] + (0.999659838556)*x[1]**o + (0.204848846376)*x[1]
            ref[(1, 0, 0, 3)]=-0.000908311056789-(0.0384474151981)*(o-1.)
            arg[(1, 0, 1, 0)]=0.654870318936*x[0]**o + (0.683524075913)*x[0] + (0.700091866232)*x[1]**o + (-0.884377538838)*x[1]
            ref[(1, 0, 1, 0)]=0.577054361121-(0.225827030861)*(o-1.)
            arg[(1, 0, 1, 1)]=-0.0839970547879*x[0]**o + (-0.65739027026)*x[0] + (0.796535143177)*x[1]**o + (0.662320060138)*x[1]
            ref[(1, 0, 1, 1)]=0.358733939134-(0.118756348065)*(o-1.)
            arg[(1, 0, 1, 2)]=-0.695418949962*x[0]**o + (-0.566260859227)*x[0] + (-0.53750479631)*x[1]**o + (0.951460351885)*x[1]
            ref[(1, 0, 1, 2)]=-0.423862126807-(-0.205487291045)*(o-1.)
            arg[(1, 0, 1, 3)]=0.191938117559*x[0]**o + (-0.575705313792)*x[0] + (-0.5917893844)*x[1]**o + (-0.0242181351543)*x[1]
            ref[(1, 0, 1, 3)]=-0.499887357893-(-0.0666418778068)*(o-1.)
            arg[(1, 0, 2, 0)]=0.447600010359*x[0]**o + (0.783032582283)*x[0] + (0.942635725017)*x[1]**o + (-0.472368315669)*x[1]
            ref[(1, 0, 2, 0)]=0.850450000995-(0.231705955896)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.989482617531*x[0]**o + (-0.256393519939)*x[0] + (-0.881511629846)*x[1]**o + (-0.421047871267)*x[1]
            ref[(1, 0, 2, 1)]=-1.27421781929-(-0.311832374563)*(o-1.)
            arg[(1, 0, 2, 2)]=0.178184430367*x[0]**o + (-0.631735916665)*x[0] + (0.0835545826772)*x[1]**o + (-0.0262269819024)*x[1]
            ref[(1, 0, 2, 2)]=-0.198111942762-(0.0436231688408)*(o-1.)
            arg[(1, 0, 2, 3)]=-0.999940670725*x[0]**o + (-0.162906471807)*x[0] + (0.204716644631)*x[1]**o + (-0.207983359259)*x[1]
            ref[(1, 0, 2, 3)]=-0.58305692858-(-0.132537337682)*(o-1.)
            arg[(1, 0, 3, 0)]=0.711154147793*x[0]**o + (0.766486135289)*x[0] + (-0.82153673947)*x[1]**o + (-0.995506048102)*x[1]
            ref[(1, 0, 3, 0)]=-0.169701252245-(-0.0183970986128)*(o-1.)
            arg[(1, 0, 3, 1)]=-0.367617997901*x[0]**o + (-0.405053812797)*x[0] + (0.482538672414)*x[1]**o + (-0.0701205283759)*x[1]
            ref[(1, 0, 3, 1)]=-0.180126833331-(0.019153445752)*(o-1.)
            arg[(1, 0, 3, 2)]=0.647398028305*x[0]**o + (-0.870158122767)*x[0] + (-0.370229057211)*x[1]**o + (-0.277057734198)*x[1]
            ref[(1, 0, 3, 2)]=-0.435023442935-(0.0461948285157)*(o-1.)
            arg[(1, 0, 3, 3)]=-0.489565834922*x[0]**o + (0.694690259267)*x[0] + (0.444834701663)*x[1]**o + (0.674948696911)*x[1]
            ref[(1, 0, 3, 3)]=0.66245391146-(-0.00745518887652)*(o-1.)
            arg[(1, 1, 0, 0)]=0.629213858897*x[0]**o + (0.927117668038)*x[0] + (0.895864020357)*x[1]**o + (-0.159670624646)*x[1]
            ref[(1, 1, 0, 0)]=1.14626246132-(0.254179646542)*(o-1.)
            arg[(1, 1, 0, 1)]=0.825945999429*x[0]**o + (0.782883946881)*x[0] + (-0.308900391812)*x[1]**o + (0.232567203812)*x[1]
            ref[(1, 1, 0, 1)]=0.766248379155-(0.0861742679362)*(o-1.)
            arg[(1, 1, 0, 2)]=-0.821987429831*x[0]**o + (0.798999827003)*x[0] + (0.781889136955)*x[1]**o + (0.320294754743)*x[1]
            ref[(1, 1, 0, 2)]=0.539598144435-(-0.00668304881263)*(o-1.)
            arg[(1, 1, 0, 3)]=0.856910494371*x[0]**o + (0.500621234297)*x[0] + (-0.127611421978)*x[1]**o + (-0.811851941708)*x[1]
            ref[(1, 1, 0, 3)]=0.209034182491-(0.121549845399)*(o-1.)
            arg[(1, 1, 1, 0)]=0.203374029519*x[0]**o + (-0.0489083116432)*x[0] + (0.506092494617)*x[1]**o + (-0.0456169153602)*x[1]
            ref[(1, 1, 1, 0)]=0.307470648566-(0.118244420689)*(o-1.)
            arg[(1, 1, 1, 1)]=-0.215169345844*x[0]**o + (0.241044564732)*x[0] + (-0.456603839328)*x[1]**o + (-0.0501444183029)*x[1]
            ref[(1, 1, 1, 1)]=-0.240436519371-(-0.111962197529)*(o-1.)
            arg[(1, 1, 1, 2)]=-0.247688685259*x[0]**o + (-0.919348704957)*x[0] + (-0.0256015170212)*x[1]**o + (-0.0435585299741)*x[1]
            ref[(1, 1, 1, 2)]=-0.618098718606-(-0.0455483670467)*(o-1.)
            arg[(1, 1, 1, 3)]=0.87796542297*x[0]**o + (0.391677971455)*x[0] + (-0.997309249254)*x[1]**o + (-0.652133747528)*x[1]
            ref[(1, 1, 1, 3)]=-0.189899801179-(-0.019890637714)*(o-1.)
            arg[(1, 1, 2, 0)]=-0.441257549723*x[0]**o + (-0.0530917499296)*x[0] + (-0.0223936461758)*x[1]**o + (-0.601363617909)*x[1]
            ref[(1, 1, 2, 0)]=-0.559053281869-(-0.0772751993165)*(o-1.)
            arg[(1, 1, 2, 1)]=-0.194336393604*x[0]**o + (0.920241694239)*x[0] + (0.0537402609501)*x[1]**o + (-0.837566375026)*x[1]
            ref[(1, 1, 2, 1)]=-0.0289604067206-(-0.0234326887757)*(o-1.)
            arg[(1, 1, 2, 2)]=0.852287118802*x[0]**o + (0.0626742079227)*x[0] + (0.370251644541)*x[1]**o + (-0.838299883644)*x[1]
            ref[(1, 1, 2, 2)]=0.223456543811-(0.203756460557)*(o-1.)
            arg[(1, 1, 2, 3)]=0.862040628115*x[0]**o + (-0.414264431159)*x[0] + (-0.207760917282)*x[1]**o + (0.451812163033)*x[1]
            ref[(1, 1, 2, 3)]=0.345913721353-(0.109046618472)*(o-1.)
            arg[(1, 1, 3, 0)]=-0.932872610027*x[0]**o + (-0.0318834713021)*x[0] + (0.36143510033)*x[1]**o + (0.773525708578)*x[1]
            ref[(1, 1, 3, 0)]=0.0851023637896-(-0.0952395849495)*(o-1.)
            arg[(1, 1, 3, 1)]=-0.687159612505*x[0]**o + (0.860606761601)*x[0] + (-0.203458277806)*x[1]**o + (-0.826301686529)*x[1]
            ref[(1, 1, 3, 1)]=-0.42815640762-(-0.148436315052)*(o-1.)
            arg[(1, 1, 3, 2)]=-0.280052705721*x[0]**o + (-0.47980577621)*x[0] + (-0.397264174421)*x[1]**o + (-0.0234664476738)*x[1]
            ref[(1, 1, 3, 2)]=-0.590294552013-(-0.11288614669)*(o-1.)
            arg[(1, 1, 3, 3)]=-0.383369894239*x[0]**o + (-0.043496448511)*x[0] + (0.31961826817)*x[1]**o + (0.978656060851)*x[1]
            ref[(1, 1, 3, 3)]=0.435703993135-(-0.0106252710116)*(o-1.)
            arg[(1, 2, 0, 0)]=-0.699896400341*x[0]**o + (0.0759043257098)*x[0] + (-0.585913509591)*x[1]**o + (0.443014678725)*x[1]
            ref[(1, 2, 0, 0)]=-0.383445452749-(-0.214301651655)*(o-1.)
            arg[(1, 2, 0, 1)]=-0.699822936369*x[0]**o + (0.465086474306)*x[0] + (0.698418242016)*x[1]**o + (0.397560764831)*x[1]
            ref[(1, 2, 0, 1)]=0.430621272392-(-0.000234115725504)*(o-1.)
            arg[(1, 2, 0, 2)]=-0.25121377255*x[0]**o + (-0.047076522751)*x[0] + (0.70707061774)*x[1]**o + (0.702060007321)*x[1]
            ref[(1, 2, 0, 2)]=0.55542016488-(0.075976140865)*(o-1.)
            arg[(1, 2, 0, 3)]=0.360632460281*x[0]**o + (0.167967025916)*x[0] + (0.562212089832)*x[1]**o + (0.949493039342)*x[1]
            ref[(1, 2, 0, 3)]=1.02015230769-(0.153807425019)*(o-1.)
            arg[(1, 2, 1, 0)]=-0.974001271586*x[0]**o + (-0.739051151763)*x[0] + (-0.385664185537)*x[1]**o + (0.821169869041)*x[1]
            ref[(1, 2, 1, 0)]=-0.638773369922-(-0.22661090952)*(o-1.)
            arg[(1, 2, 1, 1)]=0.995655070515*x[0]**o + (-0.947667380115)*x[0] + (-0.597019906649)*x[1]**o + (-0.623318443785)*x[1]
            ref[(1, 2, 1, 1)]=-0.586175330017-(0.0664391939777)*(o-1.)
            arg[(1, 2, 1, 2)]=0.270682154638*x[0]**o + (-0.587130563985)*x[0] + (-0.86194738063)*x[1]**o + (0.730136328263)*x[1]
            ref[(1, 2, 1, 2)]=-0.224129730857-(-0.0985442043319)*(o-1.)
            arg[(1, 2, 1, 3)]=-0.42998453231*x[0]**o + (0.491661000966)*x[0] + (-0.668302226711)*x[1]**o + (-0.0295706435052)*x[1]
            ref[(1, 2, 1, 3)]=-0.31809820078-(-0.18304779317)*(o-1.)
            arg[(1, 2, 2, 0)]=-0.892061105678*x[0]**o + (-0.399557341063)*x[0] + (0.805634964002)*x[1]**o + (-0.618229788683)*x[1]
            ref[(1, 2, 2, 0)]=-0.552106635711-(-0.014404356946)*(o-1.)
            arg[(1, 2, 2, 1)]=-0.143334867273*x[0]**o + (-0.492541200633)*x[0] + (-0.0659044278079)*x[1]**o + (0.570843302113)*x[1]
            ref[(1, 2, 2, 1)]=-0.0654685968008-(-0.0348732158468)*(o-1.)
            arg[(1, 2, 2, 2)]=-0.788333527898*x[0]**o + (-0.128981729369)*x[0] + (-0.680387839018)*x[1]**o + (0.1488198618)*x[1]
            ref[(1, 2, 2, 2)]=-0.724441617243-(-0.244786894486)*(o-1.)
            arg[(1, 2, 2, 3)]=0.219212396273*x[0]**o + (0.805866769802)*x[0] + (0.308211775547)*x[1]**o + (0.411747742056)*x[1]
            ref[(1, 2, 2, 3)]=0.872519341839-(0.0879040286366)*(o-1.)
            arg[(1, 2, 3, 0)]=0.369516742099*x[0]**o + (0.0896289342521)*x[0] + (-0.550492763111)*x[1]**o + (0.0530979884099)*x[1]
            ref[(1, 2, 3, 0)]=-0.0191245491747-(-0.0301626701686)*(o-1.)
            arg[(1, 2, 3, 1)]=-0.375700861609*x[0]**o + (0.295374254206)*x[0] + (0.122860178922)*x[1]**o + (0.780923822046)*x[1]
            ref[(1, 2, 3, 1)]=0.411728696782-(-0.0421401137812)*(o-1.)
            arg[(1, 2, 3, 2)]=-0.565328559361*x[0]**o + (-0.201093806474)*x[0] + (0.664345988015)*x[1]**o + (0.951426669499)*x[1]
            ref[(1, 2, 3, 2)]=0.42467514584-(0.0165029047757)*(o-1.)
            arg[(1, 2, 3, 3)]=-0.670036349898*x[0]**o + (-0.130214166139)*x[0] + (-0.640276082751)*x[1]**o + (0.721446652112)*x[1]
            ref[(1, 2, 3, 3)]=-0.359539973338-(-0.218385405441)*(o-1.)
            arg[(2, 0, 0, 0)]=0.159323365962*x[0]**o + (-0.805418677345)*x[0] + (-0.568156306901)*x[1]**o + (-0.767311803021)*x[1]
            ref[(2, 0, 0, 0)]=-0.990781710653-(-0.0681388234899)*(o-1.)
            arg[(2, 0, 0, 1)]=0.820751169688*x[0]**o + (0.135641130298)*x[0] + (-0.60404522691)*x[1]**o + (0.159939311603)*x[1]
            ref[(2, 0, 0, 1)]=0.25614319234-(0.0361176571298)*(o-1.)
            arg[(2, 0, 0, 2)]=0.949535611991*x[0]**o + (-0.0798853951263)*x[0] + (0.513441511836)*x[1]**o + (0.220530091238)*x[1]
            ref[(2, 0, 0, 2)]=0.801810909969-(0.243829520638)*(o-1.)
            arg[(2, 0, 0, 3)]=0.277187205013*x[0]**o + (-0.301401855823)*x[0] + (0.295404928589)*x[1]**o + (0.447353989559)*x[1]
            ref[(2, 0, 0, 3)]=0.359272133669-(0.095432022267)*(o-1.)
            arg[(2, 0, 1, 0)]=0.796619148346*x[0]**o + (-0.648541093837)*x[0] + (0.813657486517)*x[1]**o + (-0.284443724435)*x[1]
            ref[(2, 0, 1, 0)]=0.338645908296-(0.268379439144)*(o-1.)
            arg[(2, 0, 1, 1)]=0.561356574952*x[0]**o + (-0.0607010937886)*x[0] + (-0.694826916514)*x[1]**o + (0.748220248258)*x[1]
            ref[(2, 0, 1, 1)]=0.277024406454-(-0.022245056927)*(o-1.)
            arg[(2, 0, 1, 2)]=0.272660976413*x[0]**o + (-0.250659912105)*x[0] + (0.619931824)*x[1]**o + (-0.825520640617)*x[1]
            ref[(2, 0, 1, 2)]=-0.091793876155-(0.148765466735)*(o-1.)
            arg[(2, 0, 1, 3)]=-0.387255496169*x[0]**o + (0.836835616029)*x[0] + (0.0172337375899)*x[1]**o + (0.0735479628832)*x[1]
            ref[(2, 0, 1, 3)]=0.270180910167-(-0.0616702930965)*(o-1.)
            arg[(2, 0, 2, 0)]=-0.0956571314201*x[0]**o + (-0.817114778407)*x[0] + (0.768070082148)*x[1]**o + (-0.145496712646)*x[1]
            ref[(2, 0, 2, 0)]=-0.145099270162-(0.112068825121)*(o-1.)
            arg[(2, 0, 2, 1)]=0.327193994304*x[0]**o + (0.888522994942)*x[0] + (-0.665302814464)*x[1]**o + (-0.433457271814)*x[1]
            ref[(2, 0, 2, 1)]=0.0584784514837-(-0.0563514700268)*(o-1.)
            arg[(2, 0, 2, 2)]=0.738181624239*x[0]**o + (0.551583661382)*x[0] + (0.212519405431)*x[1]**o + (-0.755725054343)*x[1]
            ref[(2, 0, 2, 2)]=0.373279818354-(0.158450171612)*(o-1.)
            arg[(2, 0, 2, 3)]=-0.953540709005*x[0]**o + (0.649445649071)*x[0] + (0.106593854242)*x[1]**o + (0.586689067378)*x[1]
            ref[(2, 0, 2, 3)]=0.194593930843-(-0.141157809127)*(o-1.)
            arg[(2, 0, 3, 0)]=-0.64782620354*x[0]**o + (-0.833010399203)*x[0] + (0.585487766238)*x[1]**o + (-0.747203959285)*x[1]
            ref[(2, 0, 3, 0)]=-0.821276397895-(-0.0103897395503)*(o-1.)
            arg[(2, 0, 3, 1)]=0.40691208427*x[0]**o + (-0.509499435216)*x[0] + (-0.428909142324)*x[1]**o + (0.398769133752)*x[1]
            ref[(2, 0, 3, 1)]=-0.0663636797585-(-0.0036661763423)*(o-1.)
            arg[(2, 0, 3, 2)]=-0.350663954665*x[0]**o + (-0.35740661718)*x[0] + (0.234897446889)*x[1]**o + (0.0529678926761)*x[1]
            ref[(2, 0, 3, 2)]=-0.21010261614-(-0.0192944179626)*(o-1.)
            arg[(2, 0, 3, 3)]=0.282867030642*x[0]**o + (-0.807550694958)*x[0] + (-0.195468319473)*x[1]**o + (0.402753742281)*x[1]
            ref[(2, 0, 3, 3)]=-0.158699120754-(0.0145664518614)*(o-1.)
            arg[(2, 1, 0, 0)]=0.456411684298*x[0]**o + (-0.0708320030356)*x[0] + (-0.589052841921)*x[1]**o + (-0.0949467467937)*x[1]
            ref[(2, 1, 0, 0)]=-0.149209953726-(-0.0221068596038)*(o-1.)
            arg[(2, 1, 0, 1)]=0.749761885597*x[0]**o + (-0.582651555948)*x[0] + (-0.994566973923)*x[1]**o + (0.943167889749)*x[1]
            ref[(2, 1, 0, 1)]=0.0578556227377-(-0.0408008480543)*(o-1.)
            arg[(2, 1, 0, 2)]=-0.708448632716*x[0]**o + (-0.0100659675127)*x[0] + (0.840964905488)*x[1]**o + (0.500613481513)*x[1]
            ref[(2, 1, 0, 2)]=0.311531893386-(0.022086045462)*(o-1.)
            arg[(2, 1, 0, 3)]=0.783632566103*x[0]**o + (-0.64728378336)*x[0] + (0.22306109041)*x[1]**o + (-0.79725800772)*x[1]
            ref[(2, 1, 0, 3)]=-0.218924067283-(0.167782276086)*(o-1.)
            arg[(2, 1, 1, 0)]=-0.887724781342*x[0]**o + (-0.205884238543)*x[0] + (0.17575575372)*x[1]**o + (-0.186650127776)*x[1]
            ref[(2, 1, 1, 0)]=-0.552251696971-(-0.118661504604)*(o-1.)
            arg[(2, 1, 1, 1)]=0.108241278448*x[0]**o + (-0.965241232042)*x[0] + (0.0305360535139)*x[1]**o + (-0.395430900817)*x[1]
            ref[(2, 1, 1, 1)]=-0.610947400449-(0.0231295553269)*(o-1.)
            arg[(2, 1, 1, 2)]=0.630778464175*x[0]**o + (-0.237419237732)*x[0] + (0.195128045767)*x[1]**o + (0.852819048548)*x[1]
            ref[(2, 1, 1, 2)]=0.720653160379-(0.13765108499)*(o-1.)
            arg[(2, 1, 1, 3)]=-0.0240552068756*x[0]**o + (0.126580941515)*x[0] + (-0.773557744859)*x[1]**o + (-0.859419988726)*x[1]
            ref[(2, 1, 1, 3)]=-0.765225999473-(-0.132935491956)*(o-1.)
            arg[(2, 1, 2, 0)]=-0.309613353907*x[0]**o + (0.149524393682)*x[0] + (0.789627835199)*x[1]**o + (-0.605980429218)*x[1]
            ref[(2, 1, 2, 0)]=0.0117792228783-(0.0800024135488)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.567200508425*x[0]**o + (0.159914893268)*x[0] + (-0.749995604708)*x[1]**o + (0.350713521772)*x[1]
            ref[(2, 1, 2, 1)]=-0.403283849046-(-0.219532685522)*(o-1.)
            arg[(2, 1, 2, 2)]=0.475868386603*x[0]**o + (0.799471276199)*x[0] + (0.749450553116)*x[1]**o + (-0.384523016166)*x[1]
            ref[(2, 1, 2, 2)]=0.820133599876-(0.204219823287)*(o-1.)
            arg[(2, 1, 2, 3)]=-0.422544884603*x[0]**o + (0.133927561662)*x[0] + (0.471473584338)*x[1]**o + (0.644086839466)*x[1]
            ref[(2, 1, 2, 3)]=0.413471550432-(0.00815478328918)*(o-1.)
            arg[(2, 1, 3, 0)]=0.963734746755*x[0]**o + (0.898354411364)*x[0] + (-0.629699487736)*x[1]**o + (0.971316033858)*x[1]
            ref[(2, 1, 3, 0)]=1.10185285212-(0.0556725431697)*(o-1.)
            arg[(2, 1, 3, 1)]=-0.476711516074*x[0]**o + (0.717808386636)*x[0] + (0.637820382869)*x[1]**o + (0.286365958986)*x[1]
            ref[(2, 1, 3, 1)]=0.582641606209-(0.0268514777991)*(o-1.)
            arg[(2, 1, 3, 2)]=0.745540339867*x[0]**o + (-0.077416411519)*x[0] + (0.265405940968)*x[1]**o + (-0.415133898652)*x[1]
            ref[(2, 1, 3, 2)]=0.259197985332-(0.168491046806)*(o-1.)
            arg[(2, 1, 3, 3)]=0.496254714306*x[0]**o + (-0.924035871302)*x[0] + (-0.430093948216)*x[1]**o + (0.959890212441)*x[1]
            ref[(2, 1, 3, 3)]=0.0510075536139-(0.0110267943483)*(o-1.)
            arg[(2, 2, 0, 0)]=-0.156531879413*x[0]**o + (-0.310900721615)*x[0] + (-0.884361913327)*x[1]**o + (0.165823916388)*x[1]
            ref[(2, 2, 0, 0)]=-0.592985298983-(-0.17348229879)*(o-1.)
            arg[(2, 2, 0, 1)]=0.537114840588*x[0]**o + (0.375491297209)*x[0] + (0.287750949715)*x[1]**o + (0.0689465354649)*x[1]
            ref[(2, 2, 0, 1)]=0.634651811488-(0.137477631717)*(o-1.)
            arg[(2, 2, 0, 2)]=-0.0737122882971*x[0]**o + (0.194233234322)*x[0] + (-0.381740353597)*x[1]**o + (0.392604232875)*x[1]
            ref[(2, 2, 0, 2)]=0.0656924126517-(-0.0759087736489)*(o-1.)
            arg[(2, 2, 0, 3)]=0.304733068701*x[0]**o + (0.764820273773)*x[0] + (0.69959268782)*x[1]**o + (-0.885222663547)*x[1]
            ref[(2, 2, 0, 3)]=0.441961683373-(0.167387626087)*(o-1.)
            arg[(2, 2, 1, 0)]=0.658188466611*x[0]**o + (-0.4805199903)*x[0] + (0.0429190599669)*x[1]**o + (0.0166481575571)*x[1]
            ref[(2, 2, 1, 0)]=0.118617846917-(0.11685125443)*(o-1.)
            arg[(2, 2, 1, 1)]=0.731824837481*x[0]**o + (0.200225083942)*x[0] + (0.757147212695)*x[1]**o + (0.215897789081)*x[1]
            ref[(2, 2, 1, 1)]=0.9525474616-(0.248162008363)*(o-1.)
            arg[(2, 2, 1, 2)]=-0.0840382598227*x[0]**o + (0.592179988472)*x[0] + (-0.0957883887782)*x[1]**o + (0.562456869515)*x[1]
            ref[(2, 2, 1, 2)]=0.487405104693-(-0.0299711081002)*(o-1.)
            arg[(2, 2, 1, 3)]=-0.205850072237*x[0]**o + (0.124948620499)*x[0] + (-0.254855125032)*x[1]**o + (-0.925067876419)*x[1]
            ref[(2, 2, 1, 3)]=-0.630412226595-(-0.0767841995449)*(o-1.)
            arg[(2, 2, 2, 0)]=-0.930429967854*x[0]**o + (0.965765312644)*x[0] + (0.880041536477)*x[1]**o + (0.275394027901)*x[1]
            ref[(2, 2, 2, 0)]=0.595385454585-(-0.0083980718961)*(o-1.)
            arg[(2, 2, 2, 1)]=0.639320488656*x[0]**o + (-0.467280206764)*x[0] + (-0.118755768572)*x[1]**o + (-0.499021360364)*x[1]
            ref[(2, 2, 2, 1)]=-0.222868423522-(0.0867607866807)*(o-1.)
            arg[(2, 2, 2, 2)]=-0.454411385516*x[0]**o + (-0.182320718888)*x[0] + (-0.971500940791)*x[1]**o + (0.0787176811811)*x[1]
            ref[(2, 2, 2, 2)]=-0.764757682008-(-0.237652054385)*(o-1.)
            arg[(2, 2, 2, 3)]=0.378601670517*x[0]**o + (0.282394772454)*x[0] + (-0.0272408950189)*x[1]**o + (-0.621689160741)*x[1]
            ref[(2, 2, 2, 3)]=0.00603319360575-(0.0585601292497)*(o-1.)
            arg[(2, 2, 3, 0)]=-0.431879321253*x[0]**o + (-0.146424435598)*x[0] + (0.641489907992)*x[1]**o + (0.748095309933)*x[1]
            ref[(2, 2, 3, 0)]=0.405640730537-(0.0349350977897)*(o-1.)
            arg[(2, 2, 3, 1)]=-0.960729513811*x[0]**o + (0.260711318914)*x[0] + (0.637659493504)*x[1]**o + (-0.7986344346)*x[1]
            ref[(2, 2, 3, 1)]=-0.430496567996-(-0.0538450033845)*(o-1.)
            arg[(2, 2, 3, 2)]=0.481546267478*x[0]**o + (-0.752012576164)*x[0] + (0.992562893895)*x[1]**o + (0.674633309645)*x[1]
            ref[(2, 2, 3, 2)]=0.698364947427-(0.245684860229)*(o-1.)
            arg[(2, 2, 3, 3)]=-0.721214681223*x[0]**o + (0.966782833827)*x[0] + (-0.342447923591)*x[1]**o + (-0.522822630101)*x[1]
            ref[(2, 2, 3, 3)]=-0.309851200544-(-0.177277100802)*(o-1.)
            arg[(3, 0, 0, 0)]=-0.81287126228*x[0]**o + (-0.305361063905)*x[0] + (0.765151890787)*x[1]**o + (-0.887377175885)*x[1]
            ref[(3, 0, 0, 0)]=-0.620228805642-(-0.00795322858219)*(o-1.)
            arg[(3, 0, 0, 1)]=-0.710890710131*x[0]**o + (0.50795284505)*x[0] + (0.622577239375)*x[1]**o + (0.240830332467)*x[1]
            ref[(3, 0, 0, 1)]=0.33023485338-(-0.0147189117926)*(o-1.)
            arg[(3, 0, 0, 2)]=0.908317297984*x[0]**o + (0.816849178505)*x[0] + (0.488233511237)*x[1]**o + (0.110101235838)*x[1]
            ref[(3, 0, 0, 2)]=1.16175061178-(0.232758468203)*(o-1.)
            arg[(3, 0, 0, 3)]=-0.478770565416*x[0]**o + (0.339049296377)*x[0] + (-0.966841026673)*x[1]**o + (0.898167898952)*x[1]
            ref[(3, 0, 0, 3)]=-0.10419719838-(-0.240935265348)*(o-1.)
            arg[(3, 0, 1, 0)]=0.968323655342*x[0]**o + (0.0031501776669)*x[0] + (0.475335259553)*x[1]**o + (0.851550455559)*x[1]
            ref[(3, 0, 1, 0)]=1.14917977406-(0.240609819149)*(o-1.)
            arg[(3, 0, 1, 1)]=0.092910693379*x[0]**o + (-0.35150189496)*x[0] + (0.545615612833)*x[1]**o + (0.0515806936613)*x[1]
            ref[(3, 0, 1, 1)]=0.169302552457-(0.106421051035)*(o-1.)
            arg[(3, 0, 1, 2)]=0.814363613006*x[0]**o + (-0.937618551096)*x[0] + (-0.164888223107)*x[1]**o + (-0.865184549738)*x[1]
            ref[(3, 0, 1, 2)]=-0.576663855468-(0.108245898316)*(o-1.)
            arg[(3, 0, 1, 3)]=-0.428325835219*x[0]**o + (0.28359389705)*x[0] + (0.0103018156216)*x[1]**o + (0.152923696259)*x[1]
            ref[(3, 0, 1, 3)]=0.00924678685566-(-0.0696706699329)*(o-1.)
            arg[(3, 0, 2, 0)]=0.351897981461*x[0]**o + (-0.765841056668)*x[0] + (-0.959459882222)*x[1]**o + (-0.502262174833)*x[1]
            ref[(3, 0, 2, 0)]=-0.937832566131-(-0.101260316794)*(o-1.)
            arg[(3, 0, 2, 1)]=0.870537183874*x[0]**o + (0.864339104635)*x[0] + (-0.887528284169)*x[1]**o + (0.518132000465)*x[1]
            ref[(3, 0, 2, 1)]=0.682740002403-(-0.00283185004915)*(o-1.)
            arg[(3, 0, 2, 2)]=0.148633157917*x[0]**o + (0.129699013546)*x[0] + (-0.711395285167)*x[1]**o + (0.0571781037968)*x[1]
            ref[(3, 0, 2, 2)]=-0.187942504954-(-0.093793687875)*(o-1.)
            arg[(3, 0, 2, 3)]=0.585515282237*x[0]**o + (-0.0212411432323)*x[0] + (-0.519059849453)*x[1]**o + (-0.342662230521)*x[1]
            ref[(3, 0, 2, 3)]=-0.148723970484-(0.0110759054641)*(o-1.)
            arg[(3, 0, 3, 0)]=0.804959880974*x[0]**o + (0.723486899331)*x[0] + (0.787992167686)*x[1]**o + (-0.890914280188)*x[1]
            ref[(3, 0, 3, 0)]=0.712762333902-(0.26549200811)*(o-1.)
            arg[(3, 0, 3, 1)]=0.347955278472*x[0]**o + (-0.0792752491726)*x[0] + (0.774259194923)*x[1]**o + (-0.379251039172)*x[1]
            ref[(3, 0, 3, 1)]=0.331844092525-(0.187035745566)*(o-1.)
            arg[(3, 0, 3, 2)]=-0.518684699348*x[0]**o + (0.0450058476934)*x[0] + (-0.884906801629)*x[1]**o + (0.738790355542)*x[1]
            ref[(3, 0, 3, 2)]=-0.309897648871-(-0.23393191683)*(o-1.)
            arg[(3, 0, 3, 3)]=0.0226095930872*x[0]**o + (0.370729455184)*x[0] + (-0.977995817338)*x[1]**o + (0.15616029005)*x[1]
            ref[(3, 0, 3, 3)]=-0.214248239508-(-0.159231037375)*(o-1.)
            arg[(3, 1, 0, 0)]=-0.332985728661*x[0]**o + (0.155269473288)*x[0] + (0.86417555028)*x[1]**o + (-0.152957269435)*x[1]
            ref[(3, 1, 0, 0)]=0.266751012736-(0.0885316369366)*(o-1.)
            arg[(3, 1, 0, 1)]=0.452139540494*x[0]**o + (-0.612454083201)*x[0] + (0.517305923987)*x[1]**o + (-0.141496675871)*x[1]
            ref[(3, 1, 0, 1)]=0.107747352704-(0.16157424408)*(o-1.)
            arg[(3, 1, 0, 2)]=-0.870675355862*x[0]**o + (0.870486063269)*x[0] + (-0.931668143339)*x[1]**o + (-0.862433849163)*x[1]
            ref[(3, 1, 0, 2)]=-0.897145642548-(-0.3003905832)*(o-1.)
            arg[(3, 1, 0, 3)]=0.521475953709*x[0]**o + (0.512610041362)*x[0] + (-0.473130191645)*x[1]**o + (0.335965854257)*x[1]
            ref[(3, 1, 0, 3)]=0.448460828841-(0.0080576270107)*(o-1.)
            arg[(3, 1, 1, 0)]=-0.268955771279*x[0]**o + (-0.888348181871)*x[0] + (-0.419921953877)*x[1]**o + (-0.0662489775961)*x[1]
            ref[(3, 1, 1, 0)]=-0.821737442311-(-0.114812954193)*(o-1.)
            arg[(3, 1, 1, 1)]=0.521680860994*x[0]**o + (0.731729627756)*x[0] + (0.812819775963)*x[1]**o + (0.3857420242)*x[1]
            ref[(3, 1, 1, 1)]=1.22598614446-(0.222416772826)*(o-1.)
            arg[(3, 1, 1, 2)]=-0.331293702164*x[0]**o + (-0.363343618398)*x[0] + (0.657213957937)*x[1]**o + (0.917651315296)*x[1]
            ref[(3, 1, 1, 2)]=0.440113976336-(0.0543200426288)*(o-1.)
            arg[(3, 1, 1, 3)]=0.225295070956*x[0]**o + (-0.397237630375)*x[0] + (-0.461887235835)*x[1]**o + (0.404995265378)*x[1]
            ref[(3, 1, 1, 3)]=-0.114417264937-(-0.0394320274798)*(o-1.)
            arg[(3, 1, 2, 0)]=0.240689889324*x[0]**o + (0.786888035703)*x[0] + (-0.266922788896)*x[1]**o + (0.394676959607)*x[1]
            ref[(3, 1, 2, 0)]=0.577666047869-(-0.0043721499288)*(o-1.)
            arg[(3, 1, 2, 1)]=0.886967042464*x[0]**o + (-0.111255462211)*x[0] + (0.0130694443548)*x[1]**o + (0.874305429841)*x[1]
            ref[(3, 1, 2, 1)]=0.831543227224-(0.150006081136)*(o-1.)
            arg[(3, 1, 2, 2)]=-0.730039242433*x[0]**o + (-0.695865613269)*x[0] + (0.95621588704)*x[1]**o + (0.0312224201449)*x[1]
            ref[(3, 1, 2, 2)]=-0.219233274259-(0.0376961074345)*(o-1.)
            arg[(3, 1, 2, 3)]=0.386118665552*x[0]**o + (0.643746546531)*x[0] + (-0.400241074908)*x[1]**o + (0.44815292466)*x[1]
            ref[(3, 1, 2, 3)]=0.538888530917-(-0.00235373489272)*(o-1.)
            arg[(3, 1, 3, 0)]=0.234535801488*x[0]**o + (0.259723280218)*x[0] + (0.789669033856)*x[1]**o + (-0.554493973094)*x[1]
            ref[(3, 1, 3, 0)]=0.364717071234-(0.170700805891)*(o-1.)
            arg[(3, 1, 3, 1)]=-0.868924106434*x[0]**o + (-0.161190036417)*x[0] + (-0.0166048758404)*x[1]**o + (0.507380047825)*x[1]
            ref[(3, 1, 3, 1)]=-0.269669485433-(-0.147588163712)*(o-1.)
            arg[(3, 1, 3, 2)]=-0.121570396535*x[0]**o + (-0.677254403029)*x[0] + (0.488511466788)*x[1]**o + (0.284563945579)*x[1]
            ref[(3, 1, 3, 2)]=-0.0128746935986-(0.0611568450421)*(o-1.)
            arg[(3, 1, 3, 3)]=-0.39032191898*x[0]**o + (-0.490090711567)*x[0] + (-0.98661448098)*x[1]**o + (-0.869917379754)*x[1]
            ref[(3, 1, 3, 3)]=-1.36847224564-(-0.229489399993)*(o-1.)
            arg[(3, 2, 0, 0)]=0.736054171468*x[0]**o + (-0.666277610282)*x[0] + (-0.00962915314394)*x[1]**o + (-0.530327214394)*x[1]
            ref[(3, 2, 0, 0)]=-0.235089903176-(0.121070836387)*(o-1.)
            arg[(3, 2, 0, 1)]=0.68178963532*x[0]**o + (-0.851796481878)*x[0] + (0.383106621701)*x[1]**o + (-0.982548381873)*x[1]
            ref[(3, 2, 0, 1)]=-0.384724303366-(0.177482709503)*(o-1.)
            arg[(3, 2, 0, 2)]=-0.970477849421*x[0]**o + (-0.980662856688)*x[0] + (0.579333591861)*x[1]**o + (0.810960905948)*x[1]
            ref[(3, 2, 0, 2)]=-0.280423104149-(-0.0651907095932)*(o-1.)
            arg[(3, 2, 0, 3)]=0.761333871702*x[0]**o + (0.129850429743)*x[0] + (0.102243301483)*x[1]**o + (0.0376709494879)*x[1]
            ref[(3, 2, 0, 3)]=0.515549276208-(0.143929528864)*(o-1.)
            arg[(3, 2, 1, 0)]=-0.89290997764*x[0]**o + (0.743478344052)*x[0] + (-0.39985006315)*x[1]**o + (0.0826844430693)*x[1]
            ref[(3, 2, 1, 0)]=-0.233298626834-(-0.215460006798)*(o-1.)
            arg[(3, 2, 1, 1)]=0.692675486667*x[0]**o + (-0.57150421839)*x[0] + (0.262804502811)*x[1]**o + (0.189191057939)*x[1]
            ref[(3, 2, 1, 1)]=0.286583414513-(0.159246664913)*(o-1.)
            arg[(3, 2, 1, 2)]=0.840162031219*x[0]**o + (0.187596797258)*x[0] + (-0.694207365296)*x[1]**o + (0.892347000205)*x[1]
            ref[(3, 2, 1, 2)]=0.612949231693-(0.0243257776539)*(o-1.)
            arg[(3, 2, 1, 3)]=-0.356167187692*x[0]**o + (-0.566390892127)*x[0] + (-0.688361531567)*x[1]**o + (-0.181340571508)*x[1]
            ref[(3, 2, 1, 3)]=-0.896130091447-(-0.174088119877)*(o-1.)
            arg[(3, 2, 2, 0)]=0.52387185008*x[0]**o + (-0.407180884117)*x[0] + (-0.734995138339)*x[1]**o + (0.662697767535)*x[1]
            ref[(3, 2, 2, 0)]=0.0221967975798-(-0.0351872147099)*(o-1.)
            arg[(3, 2, 2, 1)]=-0.973673169649*x[0]**o + (-0.712540677095)*x[0] + (0.9183243907)*x[1]**o + (0.656417182118)*x[1]
            ref[(3, 2, 2, 1)]=-0.0557361369632-(-0.00922479649148)*(o-1.)
            arg[(3, 2, 2, 2)]=0.781858821745*x[0]**o + (0.0704305144631)*x[0] + (-0.219838710723)*x[1]**o + (0.899474759407)*x[1]
            ref[(3, 2, 2, 2)]=0.765962692446-(0.0936700185037)*(o-1.)
            arg[(3, 2, 2, 3)]=-0.613781840104*x[0]**o + (-0.631361670556)*x[0] + (-0.443492476608)*x[1]**o + (0.0598700999701)*x[1]
            ref[(3, 2, 2, 3)]=-0.814382943649-(-0.176212386119)*(o-1.)
            arg[(3, 2, 3, 0)]=-0.838455410265*x[0]**o + (0.406867462529)*x[0] + (-0.233653956556)*x[1]**o + (0.992049640051)*x[1]
            ref[(3, 2, 3, 0)]=0.16340386788-(-0.17868489447)*(o-1.)
            arg[(3, 2, 3, 1)]=-0.0584129218907*x[0]**o + (0.198672602599)*x[0] + (-0.380231809748)*x[1]**o + (-0.583501365767)*x[1]
            ref[(3, 2, 3, 1)]=-0.411736747404-(-0.0731074552731)*(o-1.)
            arg[(3, 2, 3, 2)]=-0.0741382664361*x[0]**o + (-0.0911558434679)*x[0] + (-0.78841151187)*x[1]**o + (-0.523708408648)*x[1]
            ref[(3, 2, 3, 2)]=-0.738707015211-(-0.143758296384)*(o-1.)
            arg[(3, 2, 3, 3)]=-0.580183449356*x[0]**o + (-0.735461584421)*x[0] + (0.776123627499)*x[1]**o + (-0.350028225533)*x[1]
            ref[(3, 2, 3, 3)]=-0.444774815905-(0.0326566963572)*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=-0.850774589514*x[0]**o + (0.029497702703)*x[0] + (-0.301319712302)*x[1]**o + (0.252014224291)*x[1] + (-0.641832137749)*x[2]**o + (0.211862432805)*x[2]
            ref[(0, 0, 0, 0)]=-0.650276039883-(-0.298987739928)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.376487594644*x[0]**o + (-0.251123103028)*x[0] + (0.96053751087)*x[1]**o + (0.356649755984)*x[1] + (-0.603609072829)*x[2]**o + (-0.48868158501)*x[2]
            ref[(0, 0, 0, 1)]=-0.201357044329-(-0.00325985943391)*(o-1.)
            arg[(0, 0, 0, 2)]=0.192590544866*x[0]**o + (0.385779291189)*x[0] + (-0.985544723028)*x[1]**o + (0.232593389053)*x[1] + (0.921038577398)*x[2]**o + (0.291093054881)*x[2]
            ref[(0, 0, 0, 2)]=0.518775067179-(0.0213473998727)*(o-1.)
            arg[(0, 0, 0, 3)]=0.698154642191*x[0]**o + (-0.852229471646)*x[0] + (0.397374247847)*x[1]**o + (0.279679180906)*x[1] + (-0.474952225186)*x[2]**o + (0.244453100232)*x[2]
            ref[(0, 0, 0, 3)]=0.146239737172-(0.103429444142)*(o-1.)
            arg[(0, 0, 1, 0)]=-0.884018577373*x[0]**o + (-0.535703767077)*x[0] + (0.046723004783)*x[1]**o + (-0.768643215237)*x[1] + (0.427948975563)*x[2]**o + (0.404560080969)*x[2]
            ref[(0, 0, 1, 0)]=-0.654566749185-(-0.0682244328377)*(o-1.)
            arg[(0, 0, 1, 1)]=-0.848917085733*x[0]**o + (-0.861405582565)*x[0] + (0.109540325071)*x[1]**o + (0.116220967001)*x[1] + (0.450038893343)*x[2]**o + (0.252756706469)*x[2]
            ref[(0, 0, 1, 1)]=-0.390882888206-(-0.0482229778864)*(o-1.)
            arg[(0, 0, 1, 2)]=0.772773846184*x[0]**o + (-0.00335897720958)*x[0] + (0.375273865839)*x[1]**o + (-0.0519527071509)*x[1] + (-0.810064960652)*x[2]**o + (0.670198476876)*x[2]
            ref[(0, 0, 1, 2)]=0.476434771943-(0.0563304585616)*(o-1.)
            arg[(0, 0, 1, 3)]=-0.0135776887836*x[0]**o + (-0.704016121079)*x[0] + (0.767691793204)*x[1]**o + (-0.530070293301)*x[1] + (0.776071115822)*x[2]**o + (-0.358572562431)*x[2]
            ref[(0, 0, 1, 3)]=-0.0312368782846-(0.25503087004)*(o-1.)
            arg[(0, 0, 2, 0)]=0.394495575603*x[0]**o + (0.786314155627)*x[0] + (-0.0256428363455)*x[1]**o + (0.161617475601)*x[1] + (-0.585933481502)*x[2]**o + (0.268179917668)*x[2]
            ref[(0, 0, 2, 0)]=0.499515403326-(-0.0361801237074)*(o-1.)
            arg[(0, 0, 2, 1)]=-0.456420794049*x[0]**o + (0.908002198655)*x[0] + (0.0670364756703)*x[1]**o + (0.179238058374)*x[1] + (-0.539400701927)*x[2]**o + (0.0491810830823)*x[2]
            ref[(0, 0, 2, 1)]=0.103818159903-(-0.154797503384)*(o-1.)
            arg[(0, 0, 2, 2)]=-0.350846043118*x[0]**o + (0.377065782071)*x[0] + (-0.139048809666)*x[1]**o + (0.00548888499596)*x[1] + (-0.87062692006)*x[2]**o + (0.086226025447)*x[2]
            ref[(0, 0, 2, 2)]=-0.445870540166-(-0.226753628807)*(o-1.)
            arg[(0, 0, 2, 3)]=0.194638978909*x[0]**o + (-0.417251918804)*x[0] + (0.228618822338)*x[1]**o + (-0.595447931651)*x[1] + (0.97708282641)*x[2]**o + (-0.7176499735)*x[2]
            ref[(0, 0, 2, 3)]=-0.165004598149-(0.23339010461)*(o-1.)
            arg[(0, 0, 3, 0)]=0.0234986755916*x[0]**o + (-0.72533682484)*x[0] + (0.233967019156)*x[1]**o + (0.484898943298)*x[1] + (0.122718042644)*x[2]**o + (-0.469721860158)*x[2]
            ref[(0, 0, 3, 0)]=-0.164988002154-(0.0633639562319)*(o-1.)
            arg[(0, 0, 3, 1)]=-0.180115295042*x[0]**o + (-0.850860849467)*x[0] + (-0.701747479876)*x[1]**o + (0.410457096166)*x[1] + (-0.147599402305)*x[2]**o + (0.698136784124)*x[2]
            ref[(0, 0, 3, 1)]=-0.3858645732-(-0.171577029537)*(o-1.)
            arg[(0, 0, 3, 2)]=0.777607332735*x[0]**o + (-0.413057529529)*x[0] + (0.170989240917)*x[1]**o + (0.576489856626)*x[1] + (-0.14274437546)*x[2]**o + (0.983454342427)*x[2]
            ref[(0, 0, 3, 2)]=0.976369433859-(0.134308699699)*(o-1.)
            arg[(0, 0, 3, 3)]=0.515592914888*x[0]**o + (-0.836751857143)*x[0] + (0.0743762100176)*x[1]**o + (0.255248182756)*x[1] + (-0.714212021096)*x[2]**o + (-0.609063471584)*x[2]
            ref[(0, 0, 3, 3)]=-0.657405021081-(-0.020707149365)*(o-1.)
            arg[(0, 1, 0, 0)]=0.781845347862*x[0]**o + (-0.158767876072)*x[0] + (0.994530718154)*x[1]**o + (0.697050362775)*x[1] + (0.863551842505)*x[2]**o + (-0.743583271864)*x[2]
            ref[(0, 1, 0, 0)]=1.21731356168-(0.439987984754)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.57686129369*x[0]**o + (-0.138903341244)*x[0] + (-0.0156182314412)*x[1]**o + (0.772982791079)*x[1] + (-0.616229501093)*x[2]**o + (0.510084309368)*x[2]
            ref[(0, 1, 0, 1)]=-0.0322726335103-(-0.201451504371)*(o-1.)
            arg[(0, 1, 0, 2)]=-0.410092179111*x[0]**o + (0.24127848788)*x[0] + (0.489504966697)*x[1]**o + (0.938673427953)*x[1] + (0.903704016912)*x[2]**o + (0.427021401913)*x[2]
            ref[(0, 1, 0, 2)]=1.29504506112-(0.16385280075)*(o-1.)
            arg[(0, 1, 0, 3)]=-0.534424695069*x[0]**o + (-0.9208401706)*x[0] + (0.93808842154)*x[1]**o + (0.21049345623)*x[1] + (0.279499648146)*x[2]**o + (-0.215467448356)*x[2]
            ref[(0, 1, 0, 3)]=-0.121325394055-(0.113860562436)*(o-1.)
            arg[(0, 1, 1, 0)]=0.24970061246*x[0]**o + (-0.731972599896)*x[0] + (0.377035767134)*x[1]**o + (-0.834528343799)*x[1] + (-0.680290359158)*x[2]**o + (0.794054493549)*x[2]
            ref[(0, 1, 1, 0)]=-0.413000214855-(-0.00892566326057)*(o-1.)
            arg[(0, 1, 1, 1)]=0.611673243713*x[0]**o + (0.527426593874)*x[0] + (0.416206297878)*x[1]**o + (0.240234249319)*x[1] + (-0.723563793142)*x[2]**o + (0.868033324223)*x[2]
            ref[(0, 1, 1, 1)]=0.970004957932-(0.0507192914081)*(o-1.)
            arg[(0, 1, 1, 2)]=-0.140465648354*x[0]**o + (0.189363146279)*x[0] + (0.907185959211)*x[1]**o + (0.312196042928)*x[1] + (-0.217474266823)*x[2]**o + (-0.0910953967911)*x[2]
            ref[(0, 1, 1, 2)]=0.479854918225-(0.0915410073391)*(o-1.)
            arg[(0, 1, 1, 3)]=0.319308544381*x[0]**o + (-0.919498901015)*x[0] + (0.760443382073)*x[1]**o + (-0.399247217643)*x[1] + (0.764690551712)*x[2]**o + (0.577117164218)*x[2]
            ref[(0, 1, 1, 3)]=0.551406761863-(0.307407079694)*(o-1.)
            arg[(0, 1, 2, 0)]=0.877780136189*x[0]**o + (0.691371686039)*x[0] + (0.393444611535)*x[1]**o + (0.92886067029)*x[1] + (-0.0511253828955)*x[2]**o + (0.317565160969)*x[2]
            ref[(0, 1, 2, 0)]=1.57894844106-(0.203349894138)*(o-1.)
            arg[(0, 1, 2, 1)]=-0.456142164762*x[0]**o + (-0.961039563803)*x[0] + (0.318193437135)*x[1]**o + (0.203546381866)*x[1] + (-0.498206150972)*x[2]**o + (-0.63969798206)*x[2]
            ref[(0, 1, 2, 1)]=-1.0166730213-(-0.1060258131)*(o-1.)
            arg[(0, 1, 2, 2)]=-0.816455195056*x[0]**o + (-0.671289622461)*x[0] + (0.859656939425)*x[1]**o + (-0.287826310014)*x[1] + (-0.111748135679)*x[2]**o + (0.243699454283)*x[2]
            ref[(0, 1, 2, 2)]=-0.391981434751-(-0.0114243985515)*(o-1.)
            arg[(0, 1, 2, 3)]=0.319421315009*x[0]**o + (-0.453310551332)*x[0] + (0.497271813288)*x[1]**o + (-0.68696725866)*x[1] + (-0.974158614873)*x[2]**o + (-0.325191643399)*x[2]
            ref[(0, 1, 2, 3)]=-0.811467469983-(-0.0262442477626)*(o-1.)
            arg[(0, 1, 3, 0)]=0.947449639723*x[0]**o + (-0.987251232489)*x[0] + (0.778797991789)*x[1]**o + (-0.00329256623618)*x[1] + (0.972623608141)*x[2]**o + (0.94111018319)*x[2]
            ref[(0, 1, 3, 0)]=1.32471881206-(0.449811873275)*(o-1.)
            arg[(0, 1, 3, 1)]=0.0824640427634*x[0]**o + (-0.447960894766)*x[0] + (-0.694775900427)*x[1]**o + (-0.885526239561)*x[1] + (0.397669986093)*x[2]**o + (0.893100364223)*x[2]
            ref[(0, 1, 3, 1)]=-0.327514320837-(-0.0357736452617)*(o-1.)
            arg[(0, 1, 3, 2)]=0.229109108888*x[0]**o + (0.66526734947)*x[0] + (0.228766354651)*x[1]**o + (-0.352807939981)*x[1] + (0.114983068006)*x[2]**o + (0.872859752058)*x[2]
            ref[(0, 1, 3, 2)]=0.879088846546-(0.0954764219241)*(o-1.)
            arg[(0, 1, 3, 3)]=-0.588599124258*x[0]**o + (0.73317392118)*x[0] + (0.859759404352)*x[1]**o + (-0.153622998164)*x[1] + (0.255951884186)*x[2]**o + (-0.919986119189)*x[2]
            ref[(0, 1, 3, 3)]=0.0933384840536-(0.08785202738)*(o-1.)
            arg[(0, 2, 0, 0)]=0.25563813052*x[0]**o + (0.679895419173)*x[0] + (0.585784026079)*x[1]**o + (0.257554196597)*x[1] + (-0.642515095214)*x[2]**o + (0.558424963138)*x[2]
            ref[(0, 2, 0, 0)]=0.847390820146-(0.0331511768975)*(o-1.)
            arg[(0, 2, 0, 1)]=-0.515778618859*x[0]**o + (0.93840448458)*x[0] + (0.332174927194)*x[1]**o + (0.2822986107)*x[1] + (0.894972605533)*x[2]**o + (0.154149561276)*x[2]
            ref[(0, 2, 0, 1)]=1.04311078521-(0.118561485644)*(o-1.)
            arg[(0, 2, 0, 2)]=0.280409029401*x[0]**o + (0.952938908456)*x[0] + (-0.828596571239)*x[1]**o + (-0.0569249810397)*x[1] + (-0.178466423999)*x[2]**o + (-0.050789515067)*x[2]
            ref[(0, 2, 0, 2)]=0.0592852232563-(-0.121108994306)*(o-1.)
            arg[(0, 2, 0, 3)]=-0.103001933782*x[0]**o + (0.150880471904)*x[0] + (0.103832779538)*x[1]**o + (0.423980731479)*x[1] + (0.808881078558)*x[2]**o + (-0.8759375897)*x[2]
            ref[(0, 2, 0, 3)]=0.254317768999-(0.134951987386)*(o-1.)
            arg[(0, 2, 1, 0)]=-0.070197002103*x[0]**o + (-0.643210390947)*x[0] + (0.309701431235)*x[1]**o + (0.326700770858)*x[1] + (-0.253299556084)*x[2]**o + (-0.228972138048)*x[2]
            ref[(0, 2, 1, 0)]=-0.279638442545-(-0.00229918782538)*(o-1.)
            arg[(0, 2, 1, 1)]=-0.148937244896*x[0]**o + (-0.794044463098)*x[0] + (0.572347999857)*x[1]**o + (0.0292996266782)*x[1] + (0.687828441868)*x[2]**o + (0.0694867722762)*x[2]
            ref[(0, 2, 1, 1)]=0.207990566342-(0.185206532805)*(o-1.)
            arg[(0, 2, 1, 2)]=0.785156133361*x[0]**o + (0.979965401389)*x[0] + (0.315797113499)*x[1]**o + (-0.093859852852)*x[1] + (0.384390694133)*x[2]**o + (-0.364401074583)*x[2]
            ref[(0, 2, 1, 2)]=1.00352420747-(0.247557323499)*(o-1.)
            arg[(0, 2, 1, 3)]=-0.144061114039*x[0]**o + (0.937987932829)*x[0] + (-0.211439312633)*x[1]**o + (0.0661017777585)*x[1] + (0.777321573461)*x[2]**o + (0.750692165489)*x[2]
            ref[(0, 2, 1, 3)]=1.08830151143-(0.0703035244648)*(o-1.)
            arg[(0, 2, 2, 0)]=0.332578882056*x[0]**o + (0.274632219882)*x[0] + (-0.973836278518)*x[1]**o + (0.348856815698)*x[1] + (0.255314268146)*x[2]**o + (-0.326472437341)*x[2]
            ref[(0, 2, 2, 0)]=-0.0444632650387-(-0.0643238547194)*(o-1.)
            arg[(0, 2, 2, 1)]=-0.0509234269776*x[0]**o + (-0.0579199030462)*x[0] + (0.294566429241)*x[1]**o + (0.278922826271)*x[1] + (0.610502923168)*x[2]**o + (0.0544177967889)*x[2]
            ref[(0, 2, 2, 1)]=0.564783322723-(0.142357654239)*(o-1.)
            arg[(0, 2, 2, 2)]=-0.101672419342*x[0]**o + (0.162231431919)*x[0] + (-0.539607944879)*x[1]**o + (0.602581881322)*x[1] + (0.912826307893)*x[2]**o + (-0.23796758419)*x[2]
            ref[(0, 2, 2, 2)]=0.399195836361-(0.0452576572786)*(o-1.)
            arg[(0, 2, 2, 3)]=0.100962669652*x[0]**o + (-0.187439197485)*x[0] + (-0.722606709542)*x[1]**o + (-0.57449145344)*x[1] + (0.272114972403)*x[2]**o + (-0.32822296969)*x[2]
            ref[(0, 2, 2, 3)]=-0.719841344051-(-0.058254844581)*(o-1.)
            arg[(0, 2, 3, 0)]=-0.683967701869*x[0]**o + (-0.58089641713)*x[0] + (0.946098175406)*x[1]**o + (0.333477430063)*x[1] + (0.0174140829292)*x[2]**o + (-0.1676564847)*x[2]
            ref[(0, 2, 3, 0)]=-0.0677654576508-(0.046590759411)*(o-1.)
            arg[(0, 2, 3, 1)]=-0.496900241535*x[0]**o + (0.224992393477)*x[0] + (0.309499015339)*x[1]**o + (0.912109613853)*x[1] + (-0.508192144328)*x[2]**o + (0.710801953739)*x[2]
            ref[(0, 2, 3, 1)]=0.576155295273-(-0.115932228421)*(o-1.)
            arg[(0, 2, 3, 2)]=0.00766532150945*x[0]**o + (0.841967909664)*x[0] + (0.0453387645111)*x[1]**o + (0.249954175866)*x[1] + (-0.426464397859)*x[2]**o + (0.539032787021)*x[2]
            ref[(0, 2, 3, 2)]=0.628747280356-(-0.0622433853064)*(o-1.)
            arg[(0, 2, 3, 3)]=0.615676682001*x[0]**o + (0.61401907074)*x[0] + (0.79970823176)*x[1]**o + (-0.0632683524284)*x[1] + (0.943157968576)*x[2]**o + (-0.353501277587)*x[2]
            ref[(0, 2, 3, 3)]=1.27789616153-(0.39309048039)*(o-1.)
            arg[(1, 0, 0, 0)]=0.242137393849*x[0]**o + (-0.760017442283)*x[0] + (-0.705031557158)*x[1]**o + (0.979614863624)*x[1] + (-0.0189468739394)*x[2]**o + (-0.318597985504)*x[2]
            ref[(1, 0, 0, 0)]=-0.290420800705-(-0.0803068395414)*(o-1.)
            arg[(1, 0, 0, 1)]=0.0240374530294*x[0]**o + (-0.958997437186)*x[0] + (-0.761090287693)*x[1]**o + (0.819291088106)*x[1] + (0.448136812688)*x[2]**o + (0.000959097537334)*x[2]
            ref[(1, 0, 0, 1)]=-0.21383163676-(-0.0481526703294)*(o-1.)
            arg[(1, 0, 0, 2)]=0.398850777231*x[0]**o + (0.0074478175496)*x[0] + (-0.0428291503085)*x[1]**o + (-0.0591820889025)*x[1] + (0.640287074033)*x[2]**o + (0.506629821255)*x[2]
            ref[(1, 0, 0, 2)]=0.725602125429-(0.166051450159)*(o-1.)
            arg[(1, 0, 0, 3)]=0.993954504397*x[0]**o + (0.707627168974)*x[0] + (0.657911440911)*x[1]**o + (0.776788465689)*x[1] + (0.699682592304)*x[2]**o + (0.738543747497)*x[2]
            ref[(1, 0, 0, 3)]=2.28725395989-(0.391924756269)*(o-1.)
            arg[(1, 0, 1, 0)]=0.429886617744*x[0]**o + (-0.365443645661)*x[0] + (0.783813234107)*x[1]**o + (-0.823355056443)*x[1] + (-0.817036151785)*x[2]**o + (0.722960604217)*x[2]
            ref[(1, 0, 1, 0)]=-0.0345871989111-(0.0661106166775)*(o-1.)
            arg[(1, 0, 1, 1)]=-0.222243511611*x[0]**o + (0.881430303081)*x[0] + (-0.384607332249)*x[1]**o + (0.182315398108)*x[1] + (-0.583059066251)*x[2]**o + (0.709327413775)*x[2]
            ref[(1, 0, 1, 1)]=0.291581602427-(-0.198318318352)*(o-1.)
            arg[(1, 0, 1, 2)]=0.442755255202*x[0]**o + (0.857542025603)*x[0] + (0.31823333492)*x[1]**o + (-0.0554081148475)*x[1] + (0.0138917804334)*x[2]**o + (0.100288172158)*x[2]
            ref[(1, 0, 1, 2)]=0.838651226735-(0.129146728426)*(o-1.)
            arg[(1, 0, 1, 3)]=-0.826342600504*x[0]**o + (0.0226488095284)*x[0] + (-0.39353060545)*x[1]**o + (-0.849025572798)*x[1] + (-0.950145462355)*x[2]**o + (0.083406786978)*x[2]
            ref[(1, 0, 1, 3)]=-1.4564943223-(-0.361669778052)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.996241194232*x[0]**o + (-0.453939242592)*x[0] + (0.328000181009)*x[1]**o + (0.1385108967)*x[1] + (-0.299046958522)*x[2]**o + (0.758333262076)*x[2]
            ref[(1, 0, 2, 0)]=-0.262191527781-(-0.161214661957)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.563050797055*x[0]**o + (-0.591829418065)*x[0] + (0.785786279456)*x[1]**o + (0.653598535379)*x[1] + (0.679904485722)*x[2]**o + (-0.698071627155)*x[2]
            ref[(1, 0, 2, 1)]=0.133168729141-(0.150439994687)*(o-1.)
            arg[(1, 0, 2, 2)]=-0.612942476003*x[0]**o + (0.622497051988)*x[0] + (0.77549760714)*x[1]**o + (0.342688258594)*x[1] + (-0.289849255704)*x[2]**o + (0.178079356314)*x[2]
            ref[(1, 0, 2, 2)]=0.507985271164-(-0.021215687428)*(o-1.)
            arg[(1, 0, 2, 3)]=-0.844167270315*x[0]**o + (-0.15658431123)*x[0] + (0.858242722175)*x[1]**o + (0.930862013887)*x[1] + (0.593086967949)*x[2]**o + (-0.461088831348)*x[2]
            ref[(1, 0, 2, 3)]=0.460175645558-(0.101193736635)*(o-1.)
            arg[(1, 0, 3, 0)]=-0.0366930422652*x[0]**o + (-0.571815781016)*x[0] + (0.93744604192)*x[1]**o + (0.771032065116)*x[1] + (-0.908153320587)*x[2]**o + (-0.331823142372)*x[2]
            ref[(1, 0, 3, 0)]=-0.0700035896026-(-0.00123338682214)*(o-1.)
            arg[(1, 0, 3, 1)]=0.997867432346*x[0]**o + (-0.568970425919)*x[0] + (0.287011157363)*x[1]**o + (0.363860820496)*x[1] + (0.354478192813)*x[2]**o + (-0.913927419154)*x[2]
            ref[(1, 0, 3, 1)]=0.260159878972-(0.27322613042)*(o-1.)
            arg[(1, 0, 3, 2)]=0.98088997575*x[0]**o + (-0.180076136209)*x[0] + (-0.743130705199)*x[1]**o + (-0.843978792102)*x[1] + (0.96601149936)*x[2]**o + (0.349757248548)*x[2]
            ref[(1, 0, 3, 2)]=0.264736545074-(0.200628461652)*(o-1.)
            arg[(1, 0, 3, 3)]=0.82375270133*x[0]**o + (0.298601175547)*x[0] + (-0.292297307372)*x[1]**o + (-0.866650529056)*x[1] + (0.448946206814)*x[2]**o + (0.881666368981)*x[2]
            ref[(1, 0, 3, 3)]=0.647009308122-(0.163400266795)*(o-1.)
            arg[(1, 1, 0, 0)]=-0.734194588957*x[0]**o + (-0.788664387365)*x[0] + (-0.620471384732)*x[1]**o + (-0.992287238)*x[1] + (-0.262870424719)*x[2]**o + (-0.525843146162)*x[2]
            ref[(1, 1, 0, 0)]=-1.96216558497-(-0.269589399735)*(o-1.)
            arg[(1, 1, 0, 1)]=0.145376155032*x[0]**o + (-0.434846047478)*x[0] + (-0.806965521846)*x[1]**o + (-0.405834238777)*x[1] + (0.617157858292)*x[2]**o + (-0.634237710687)*x[2]
            ref[(1, 1, 0, 1)]=-0.759674752731-(-0.00740525142031)*(o-1.)
            arg[(1, 1, 0, 2)]=-0.396543776805*x[0]**o + (-0.110118080615)*x[0] + (-0.921306967074)*x[1]**o + (-0.66246289479)*x[1] + (0.16359111544)*x[2]**o + (0.401790621371)*x[2]
            ref[(1, 1, 0, 2)]=-0.762524991237-(-0.19237660474)*(o-1.)
            arg[(1, 1, 0, 3)]=-0.687984248236*x[0]**o + (0.00578252294211)*x[0] + (0.664717151022)*x[1]**o + (0.980895529366)*x[1] + (0.684099100213)*x[2]**o + (-0.521678080788)*x[2]
            ref[(1, 1, 0, 3)]=0.56291598726-(0.110138667167)*(o-1.)
            arg[(1, 1, 1, 0)]=0.0513722916797*x[0]**o + (0.467776814883)*x[0] + (0.973793639088)*x[1]**o + (-0.805444015529)*x[1] + (-0.317440766411)*x[2]**o + (-0.439739471882)*x[2]
            ref[(1, 1, 1, 0)]=-0.0348407540861-(0.117954194059)*(o-1.)
            arg[(1, 1, 1, 1)]=-0.844013308212*x[0]**o + (-0.894524483357)*x[0] + (-0.673449095848)*x[1]**o + (-0.417421034323)*x[1] + (-0.901693489564)*x[2]**o + (-0.357886499388)*x[2]
            ref[(1, 1, 1, 1)]=-2.04449395535-(-0.403192648937)*(o-1.)
            arg[(1, 1, 1, 2)]=-0.380460882619*x[0]**o + (-0.734947966642)*x[0] + (0.67450738135)*x[1]**o + (-0.133895641272)*x[1] + (0.715824877)*x[2]**o + (0.140459962478)*x[2]
            ref[(1, 1, 1, 2)]=0.140743865147-(0.168311895955)*(o-1.)
            arg[(1, 1, 1, 3)]=0.747917096626*x[0]**o + (-0.563086766354)*x[0] + (0.658040570592)*x[1]**o + (0.165056837049)*x[1] + (-0.314360099124)*x[2]**o + (0.674935865064)*x[2]
            ref[(1, 1, 1, 3)]=0.684251751926-(0.181932928016)*(o-1.)
            arg[(1, 1, 2, 0)]=0.242022775917*x[0]**o + (0.301167818559)*x[0] + (0.517741421119)*x[1]**o + (0.149423083586)*x[1] + (-0.431018859742)*x[2]**o + (-0.493266451743)*x[2]
            ref[(1, 1, 2, 0)]=0.143034893848-(0.0547908895489)*(o-1.)
            arg[(1, 1, 2, 1)]=-0.818431998799*x[0]**o + (0.95767463891)*x[0] + (0.377668361213)*x[1]**o + (0.444744246686)*x[1] + (0.804566186971)*x[2]**o + (0.550105881656)*x[2]
            ref[(1, 1, 2, 1)]=1.15816365832-(0.0606337582307)*(o-1.)
            arg[(1, 1, 2, 2)]=0.657565033174*x[0]**o + (0.0228945987038)*x[0] + (0.0249789297003)*x[1]**o + (-0.138286414866)*x[1] + (0.393390754742)*x[2]**o + (-0.824135844477)*x[2]
            ref[(1, 1, 2, 2)]=0.0682035284889-(0.179322452936)*(o-1.)
            arg[(1, 1, 2, 3)]=0.313593254706*x[0]**o + (0.616279414498)*x[0] + (-0.624639709616)*x[1]**o + (0.308318904811)*x[1] + (0.0298366066945)*x[2]**o + (0.81597791946)*x[2]
            ref[(1, 1, 2, 3)]=0.729683195277-(-0.046868308036)*(o-1.)
            arg[(1, 1, 3, 0)]=-0.227741072654*x[0]**o + (0.701748262793)*x[0] + (-0.0667782858468)*x[1]**o + (0.686243602933)*x[1] + (-0.371042320029)*x[2]**o + (0.868246528498)*x[2]
            ref[(1, 1, 3, 0)]=0.795338357847-(-0.110926946422)*(o-1.)
            arg[(1, 1, 3, 1)]=0.388295401733*x[0]**o + (-0.360477186555)*x[0] + (0.42903134317)*x[1]**o + (-0.745194495662)*x[1] + (-0.394572036318)*x[2]**o + (0.263253689198)*x[2]
            ref[(1, 1, 3, 1)]=-0.209831642216-(0.0704591180976)*(o-1.)
            arg[(1, 1, 3, 2)]=-0.942619706914*x[0]**o + (0.0336974530788)*x[0] + (0.213188715039)*x[1]**o + (-0.0304404371371)*x[1] + (-0.373319560764)*x[2]**o + (0.563516044894)*x[2]
            ref[(1, 1, 3, 2)]=-0.267988745902-(-0.183791758773)*(o-1.)
            arg[(1, 1, 3, 3)]=0.150856139039*x[0]**o + (-0.499354458201)*x[0] + (-0.134201827629)*x[1]**o + (-0.250144693976)*x[1] + (-0.796669938066)*x[2]**o + (0.583897167598)*x[2]
            ref[(1, 1, 3, 3)]=-0.472808805617-(-0.130002604443)*(o-1.)
            arg[(1, 2, 0, 0)]=-0.476108627175*x[0]**o + (-0.922019914973)*x[0] + (-0.249307899657)*x[1]**o + (-0.113809111803)*x[1] + (-0.768421788234)*x[2]**o + (0.777509242752)*x[2]
            ref[(1, 2, 0, 0)]=-0.876079049545-(-0.248973052511)*(o-1.)
            arg[(1, 2, 0, 1)]=-0.262471527011*x[0]**o + (0.084162870231)*x[0] + (0.914728802987)*x[1]**o + (0.678302876112)*x[1] + (0.366456005619)*x[2]**o + (0.476559391098)*x[2]
            ref[(1, 2, 0, 1)]=1.12886920952-(0.169785546932)*(o-1.)
            arg[(1, 2, 0, 2)]=0.892245891366*x[0]**o + (-0.632147759321)*x[0] + (0.181187793176)*x[1]**o + (-0.374151242382)*x[1] + (0.00954875984915)*x[2]**o + (0.35270565552)*x[2]
            ref[(1, 2, 0, 2)]=0.214694549105-(0.180497074065)*(o-1.)
            arg[(1, 2, 0, 3)]=0.715438304657*x[0]**o + (0.859162564213)*x[0] + (0.720866313101)*x[1]**o + (-0.650784249131)*x[1] + (0.112627235634)*x[2]**o + (0.219966748491)*x[2]
            ref[(1, 2, 0, 3)]=0.988638458482-(0.258155308899)*(o-1.)
            arg[(1, 2, 1, 0)]=-0.957598652455*x[0]**o + (-0.040485418926)*x[0] + (-0.624717870624)*x[1]**o + (0.0623118124189)*x[1] + (-0.372217406119)*x[2]**o + (-0.555457939861)*x[2]
            ref[(1, 2, 1, 0)]=-1.24408273778-(-0.325755654866)*(o-1.)
            arg[(1, 2, 1, 1)]=-0.487674051452*x[0]**o + (-0.847737228743)*x[0] + (-0.789414095767)*x[1]**o + (-0.745660325812)*x[1] + (-0.848979169267)*x[2]**o + (-0.79614511144)*x[2]
            ref[(1, 2, 1, 1)]=-2.25780499124-(-0.354344552748)*(o-1.)
            arg[(1, 2, 1, 2)]=-0.0216522341291*x[0]**o + (0.237385099422)*x[0] + (-0.266958618575)*x[1]**o + (0.699778403305)*x[1] + (0.341819308762)*x[2]**o + (0.421854906345)*x[2]
            ref[(1, 2, 1, 2)]=0.706113432565-(0.00886807600957)*(o-1.)
            arg[(1, 2, 1, 3)]=-0.556893261664*x[0]**o + (-0.597639633415)*x[0] + (0.962427458721)*x[1]**o + (-0.210750944947)*x[1] + (0.694206876697)*x[2]**o + (-0.0864475090038)*x[2]
            ref[(1, 2, 1, 3)]=0.102451493194-(0.183290178959)*(o-1.)
            arg[(1, 2, 2, 0)]=-0.993140836797*x[0]**o + (0.597738663043)*x[0] + (0.479063068474)*x[1]**o + (0.375387376744)*x[1] + (0.983113874087)*x[2]**o + (-0.330998420168)*x[2]
            ref[(1, 2, 2, 0)]=0.555581862692-(0.0781726842941)*(o-1.)
            arg[(1, 2, 2, 1)]=0.951494042413*x[0]**o + (0.603062995479)*x[0] + (-0.259533781078)*x[1]**o + (0.519575513132)*x[1] + (0.499054093171)*x[2]**o + (0.573556275393)*x[2]
            ref[(1, 2, 2, 1)]=1.44360456926-(0.198502392418)*(o-1.)
            arg[(1, 2, 2, 2)]=0.412081885403*x[0]**o + (0.548716039985)*x[0] + (-0.267994022962)*x[1]**o + (-0.26491999025)*x[1] + (0.159394587759)*x[2]**o + (0.242265512822)*x[2]
            ref[(1, 2, 2, 2)]=0.414772006379-(0.0505804083668)*(o-1.)
            arg[(1, 2, 2, 3)]=0.657508761853*x[0]**o + (-0.849894829906)*x[0] + (0.0728785998874)*x[1]**o + (0.583794402845)*x[1] + (-0.237315132824)*x[2]**o + (-0.604268986785)*x[2]
            ref[(1, 2, 2, 3)]=-0.188648592465-(0.0821787048194)*(o-1.)
            arg[(1, 2, 3, 0)]=-0.753092937945*x[0]**o + (0.416892681959)*x[0] + (-0.655593469158)*x[1]**o + (0.00891165660772)*x[1] + (-0.33465168279)*x[2]**o + (0.565741441607)*x[2]
            ref[(1, 2, 3, 0)]=-0.37589615486-(-0.290556348316)*(o-1.)
            arg[(1, 2, 3, 1)]=-0.699914431849*x[0]**o + (-0.0309587727713)*x[0] + (-0.0478830660096)*x[1]**o + (0.63160963704)*x[1] + (-0.750285800663)*x[2]**o + (0.90020651049)*x[2]
            ref[(1, 2, 3, 1)]=0.00138703811852-(-0.249680549754)*(o-1.)
            arg[(1, 2, 3, 2)]=-0.560873402496*x[0]**o + (-0.760614330745)*x[0] + (-0.550409259277)*x[1]**o + (-0.40921426038)*x[1] + (-0.113332742828)*x[2]**o + (-0.0618581397166)*x[2]
            ref[(1, 2, 3, 2)]=-1.22815106772-(-0.204102567434)*(o-1.)
            arg[(1, 2, 3, 3)]=-0.926824267303*x[0]**o + (0.76956777201)*x[0] + (0.413480149511)*x[1]**o + (-0.663455538271)*x[1] + (0.0100772427496)*x[2]**o + (-0.830070038793)*x[2]
            ref[(1, 2, 3, 3)]=-0.613612340049-(-0.083877812507)*(o-1.)
            arg[(2, 0, 0, 0)]=0.994575423912*x[0]**o + (-0.447247301599)*x[0] + (0.0218263545788)*x[1]**o + (0.730673282338)*x[1] + (0.224896697566)*x[2]**o + (0.984109317707)*x[2]
            ref[(2, 0, 0, 0)]=1.25441688725-(0.206883079343)*(o-1.)
            arg[(2, 0, 0, 1)]=0.895621803631*x[0]**o + (-0.925503215757)*x[0] + (-0.318142600518)*x[1]**o + (-0.679049596417)*x[1] + (-0.807674816913)*x[2]**o + (-0.249268573841)*x[2]
            ref[(2, 0, 0, 1)]=-1.04200849991-(-0.0383659356334)*(o-1.)
            arg[(2, 0, 0, 2)]=0.388372866162*x[0]**o + (0.270943344199)*x[0] + (-0.75726434396)*x[1]**o + (-0.342059776865)*x[1] + (0.441985979921)*x[2]**o + (-0.189558970241)*x[2]
            ref[(2, 0, 0, 2)]=-0.0937904503916-(0.0121824170206)*(o-1.)
            arg[(2, 0, 0, 3)]=0.339831336431*x[0]**o + (-0.31230065893)*x[0] + (-0.600936384804)*x[1]**o + (0.329296167532)*x[1] + (-0.0782718755894)*x[2]**o + (0.14462254009)*x[2]
            ref[(2, 0, 0, 3)]=-0.0888794376352-(-0.0565628206604)*(o-1.)
            arg[(2, 0, 1, 0)]=0.518916088486*x[0]**o + (0.457099360166)*x[0] + (-0.797183122637)*x[1]**o + (0.769642199548)*x[1] + (0.869908430779)*x[2]**o + (0.732004728853)*x[2]
            ref[(2, 0, 1, 0)]=1.2751938426-(0.0986068994379)*(o-1.)
            arg[(2, 0, 1, 1)]=-0.935079551396*x[0]**o + (-0.00815325107613)*x[0] + (-0.856070876561)*x[1]**o + (0.655186311163)*x[1] + (0.880187324143)*x[2]**o + (-0.371389311567)*x[2]
            ref[(2, 0, 1, 1)]=-0.317659677648-(-0.151827183969)*(o-1.)
            arg[(2, 0, 1, 2)]=0.0554036921337*x[0]**o + (-0.0349013222832)*x[0] + (0.0180047918021)*x[1]**o + (-0.839319039288)*x[1] + (-0.122118885824)*x[2]**o + (-0.0773282087257)*x[2]
            ref[(2, 0, 1, 2)]=-0.500129486092-(-0.00811840031463)*(o-1.)
            arg[(2, 0, 1, 3)]=0.800333830396*x[0]**o + (-0.724984507335)*x[0] + (0.362850865793)*x[1]**o + (-0.0242951116412)*x[1] + (0.83454854918)*x[2]**o + (0.97351397011)*x[2]
            ref[(2, 0, 1, 3)]=1.11098379825-(0.332955540895)*(o-1.)
            arg[(2, 0, 2, 0)]=-0.451895499031*x[0]**o + (0.240826602215)*x[0] + (0.521426328756)*x[1]**o + (0.435724226894)*x[1] + (-0.150471264571)*x[2]**o + (-0.746285842854)*x[2]
            ref[(2, 0, 2, 0)]=-0.0753377242959-(-0.0134900724744)*(o-1.)
            arg[(2, 0, 2, 1)]=-0.777203769922*x[0]**o + (-0.540338339781)*x[0] + (-0.167129557995)*x[1]**o + (-0.667144557333)*x[1] + (0.381231232377)*x[2]**o + (0.398414305222)*x[2]
            ref[(2, 0, 2, 1)]=-0.686085343716-(-0.0938503492566)*(o-1.)
            arg[(2, 0, 2, 2)]=-0.340813859211*x[0]**o + (0.859731005168)*x[0] + (-0.620253569569)*x[1]**o + (-0.586563230768)*x[1] + (0.794030561683)*x[2]**o + (-0.848762246248)*x[2]
            ref[(2, 0, 2, 2)]=-0.371315669473-(-0.0278394778495)*(o-1.)
            arg[(2, 0, 2, 3)]=-0.90580906638*x[0]**o + (-0.290337861988)*x[0] + (0.180280224615)*x[1]**o + (0.212489833514)*x[1] + (0.586943140849)*x[2]**o + (-0.301586672739)*x[2]
            ref[(2, 0, 2, 3)]=-0.259010201064-(-0.0230976168192)*(o-1.)
            arg[(2, 0, 3, 0)]=-0.465989257652*x[0]**o + (0.156799336776)*x[0] + (0.45603756678)*x[1]**o + (-0.0975944845549)*x[1] + (0.539267480868)*x[2]**o + (-0.476267942667)*x[2]
            ref[(2, 0, 3, 0)]=0.0561263497752-(0.0882192983327)*(o-1.)
            arg[(2, 0, 3, 1)]=0.286254834476*x[0]**o + (0.45044531544)*x[0] + (0.569848509483)*x[1]**o + (0.0543174251543)*x[1] + (-0.231515416618)*x[2]**o + (-0.960389554119)*x[2]
            ref[(2, 0, 3, 1)]=0.0844805569082-(0.10409798789)*(o-1.)
            arg[(2, 0, 3, 2)]=0.333224130521*x[0]**o + (-0.119435616787)*x[0] + (0.730749655614)*x[1]**o + (0.0325101350612)*x[1] + (0.812341920977)*x[2]**o + (-0.202665764773)*x[2]
            ref[(2, 0, 3, 2)]=0.793362230307-(0.312719284519)*(o-1.)
            arg[(2, 0, 3, 3)]=-0.695586130257*x[0]**o + (-0.786294680982)*x[0] + (-0.92688920741)*x[1]**o + (0.722399449278)*x[1] + (0.934953040571)*x[2]**o + (0.0534024525148)*x[2]
            ref[(2, 0, 3, 3)]=-0.349007538142-(-0.114587049516)*(o-1.)
            arg[(2, 1, 0, 0)]=0.755807064596*x[0]**o + (0.0837612267683)*x[0] + (-0.972098104626)*x[1]**o + (0.823972778476)*x[1] + (-0.897442850099)*x[2]**o + (-0.656228045372)*x[2]
            ref[(2, 1, 0, 0)]=-0.431113965128-(-0.185622315021)*(o-1.)
            arg[(2, 1, 0, 1)]=0.680945461901*x[0]**o + (-0.766922118905)*x[0] + (-0.983527719717)*x[1]**o + (0.231319159125)*x[1] + (0.534265818057)*x[2]**o + (0.275917670509)*x[2]
            ref[(2, 1, 0, 1)]=-0.0140008645151-(0.0386139267069)*(o-1.)
            arg[(2, 1, 0, 2)]=0.979632100674*x[0]**o + (-0.470376166533)*x[0] + (0.890616881753)*x[1]**o + (-0.504000637748)*x[1] + (0.466809174308)*x[2]**o + (-0.254421070253)*x[2]
            ref[(2, 1, 0, 2)]=0.554130141101-(0.389509692789)*(o-1.)
            arg[(2, 1, 0, 3)]=0.401155101983*x[0]**o + (0.116095324028)*x[0] + (-0.617065799424)*x[1]**o + (-0.686500991033)*x[1] + (0.238100792697)*x[2]**o + (-0.238724674755)*x[2]
            ref[(2, 1, 0, 3)]=-0.393470123251-(0.00369834920936)*(o-1.)
            arg[(2, 1, 1, 0)]=0.278347653661*x[0]**o + (-0.789611299078)*x[0] + (0.558471387093)*x[1]**o + (-0.289802221213)*x[1] + (0.305368841838)*x[2]**o + (-0.562925180158)*x[2]
            ref[(2, 1, 1, 0)]=-0.250075408929-(0.190364647099)*(o-1.)
            arg[(2, 1, 1, 1)]=0.798666222752*x[0]**o + (0.129608490936)*x[0] + (-0.288063341815)*x[1]**o + (-0.316331716542)*x[1] + (0.461756269592)*x[2]**o + (-0.732475849606)*x[2]
            ref[(2, 1, 1, 1)]=0.0265800376583-(0.162059858421)*(o-1.)
            arg[(2, 1, 1, 2)]=0.695885518813*x[0]**o + (0.0370522666952)*x[0] + (0.168344508028)*x[1]**o + (0.997681655863)*x[1] + (-0.144441741145)*x[2]**o + (-0.181406833925)*x[2]
            ref[(2, 1, 1, 2)]=0.786557687165-(0.119964714283)*(o-1.)
            arg[(2, 1, 1, 3)]=0.120591674385*x[0]**o + (0.165939617511)*x[0] + (0.0769755190379)*x[1]**o + (0.0352365869202)*x[1] + (-0.151874713798)*x[2]**o + (0.849226874833)*x[2]
            ref[(2, 1, 1, 3)]=0.548047779445-(0.00761541327075)*(o-1.)
            arg[(2, 1, 2, 0)]=0.740615262254*x[0]**o + (-0.927737004546)*x[0] + (0.590899288981)*x[1]**o + (-0.739757295014)*x[1] + (0.406644641442)*x[2]**o + (-0.944790958669)*x[2]
            ref[(2, 1, 2, 0)]=-0.437063032776-(0.289693198779)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.607561137775*x[0]**o + (-0.322161639442)*x[0] + (0.514236265045)*x[1]**o + (-0.511003138893)*x[1] + (0.0908438873811)*x[2]**o + (-0.743891206186)*x[2]
            ref[(2, 1, 2, 1)]=-0.789768484935-(-0.000413497558257)*(o-1.)
            arg[(2, 1, 2, 2)]=-0.332541236101*x[0]**o + (0.024974692683)*x[0] + (-0.402437443806)*x[1]**o + (-0.574102218124)*x[1] + (0.973459328436)*x[2]**o + (0.436741962863)*x[2]
            ref[(2, 1, 2, 2)]=0.0630475429756-(0.0397467747549)*(o-1.)
            arg[(2, 1, 2, 3)]=0.495598498302*x[0]**o + (-0.312099110517)*x[0] + (-0.287393800813)*x[1]**o + (0.429143773783)*x[1] + (0.340267844235)*x[2]**o + (-0.165101721652)*x[2]
            ref[(2, 1, 2, 3)]=0.250207741669-(0.0914120902872)*(o-1.)
            arg[(2, 1, 3, 0)]=-0.167254175528*x[0]**o + (0.233859368899)*x[0] + (0.760109926211)*x[1]**o + (0.0839747212495)*x[1] + (-0.744931158614)*x[2]**o + (-0.831620018696)*x[2]
            ref[(2, 1, 3, 0)]=-0.332930668239-(-0.0253459013218)*(o-1.)
            arg[(2, 1, 3, 1)]=0.48216583341*x[0]**o + (-0.284716966441)*x[0] + (-0.11302322449)*x[1]**o + (-0.779884434642)*x[1] + (0.912080795974)*x[2]**o + (0.112363295954)*x[2]
            ref[(2, 1, 3, 1)]=0.164492649883-(0.213537234149)*(o-1.)
            arg[(2, 1, 3, 2)]=0.947432497647*x[0]**o + (0.687426298088)*x[0] + (-0.488585266193)*x[1]**o + (-0.278879956276)*x[1] + (-0.803612023192)*x[2]**o + (0.642052509926)*x[2]
            ref[(2, 1, 3, 2)]=0.35291703-(-0.0574607986231)*(o-1.)
            arg[(2, 1, 3, 3)]=0.207917617213*x[0]**o + (-0.7989568338)*x[0] + (-0.751463717726)*x[1]**o + (0.365174408626)*x[1] + (0.899138813308)*x[2]**o + (0.936821325039)*x[2]
            ref[(2, 1, 3, 3)]=0.42931580633-(0.0592654521325)*(o-1.)
            arg[(2, 2, 0, 0)]=0.376491561118*x[0]**o + (-0.738333905985)*x[0] + (0.15136303661)*x[1]**o + (-0.251792086949)*x[1] + (-0.566341873943)*x[2]**o + (-0.220424718706)*x[2]
            ref[(2, 2, 0, 0)]=-0.624518993928-(-0.0064145460359)*(o-1.)
            arg[(2, 2, 0, 1)]=0.121162013833*x[0]**o + (-0.24739536719)*x[0] + (-0.690001295901)*x[1]**o + (0.957149586815)*x[1] + (0.811241017846)*x[2]**o + (0.200076600585)*x[2]
            ref[(2, 2, 0, 1)]=0.576116277994-(0.0404002892963)*(o-1.)
            arg[(2, 2, 0, 2)]=0.802984137484*x[0]**o + (-0.244528829653)*x[0] + (0.672293593831)*x[1]**o + (-0.0745781465034)*x[1] + (0.161111021648)*x[2]**o + (0.991415882686)*x[2]
            ref[(2, 2, 0, 2)]=1.15434882975-(0.272731458827)*(o-1.)
            arg[(2, 2, 0, 3)]=0.470834992389*x[0]**o + (-0.632520997977)*x[0] + (0.371638573484)*x[1]**o + (-0.00435422577952)*x[1] + (0.495215966191)*x[2]**o + (0.933453873989)*x[2]
            ref[(2, 2, 0, 3)]=0.817134091148-(0.222948255344)*(o-1.)
            arg[(2, 2, 1, 0)]=0.782941275793*x[0]**o + (0.280689753365)*x[0] + (-0.780094460329)*x[1]**o + (0.79221661494)*x[1] + (0.393133419401)*x[2]**o + (-0.499975514048)*x[2]
            ref[(2, 2, 1, 0)]=0.484455544562-(0.0659967058109)*(o-1.)
            arg[(2, 2, 1, 1)]=0.699019507473*x[0]**o + (0.979669825312)*x[0] + (-0.440973879207)*x[1]**o + (-0.170646768297)*x[1] + (-0.481498023131)*x[2]**o + (0.578373838954)*x[2]
            ref[(2, 2, 1, 1)]=0.581972250551-(-0.0372420658109)*(o-1.)
            arg[(2, 2, 1, 2)]=0.35240130591*x[0]**o + (0.151625686508)*x[0] + (0.498241784729)*x[1]**o + (-0.0249203274469)*x[1] + (0.811344606405)*x[2]**o + (0.560470600616)*x[2]
            ref[(2, 2, 1, 2)]=1.17458182836-(0.276997949507)*(o-1.)
            arg[(2, 2, 1, 3)]=0.845179686566*x[0]**o + (0.350839176981)*x[0] + (-0.281740278969)*x[1]**o + (-0.358403768138)*x[1] + (0.893554644565)*x[2]**o + (0.497040990106)*x[2]
            ref[(2, 2, 1, 3)]=0.973235225555-(0.242832342027)*(o-1.)
            arg[(2, 2, 2, 0)]=0.795256655049*x[0]**o + (-0.0577294063386)*x[0] + (0.765942501892)*x[1]**o + (0.397093939959)*x[1] + (0.990605516721)*x[2]**o + (0.12055910232)*x[2]
            ref[(2, 2, 2, 0)]=1.5058641548-(0.425300778944)*(o-1.)
            arg[(2, 2, 2, 1)]=-0.750979196305*x[0]**o + (0.24958866572)*x[0] + (-0.436681283535)*x[1]**o + (0.65727412048)*x[1] + (-0.575957946034)*x[2]**o + (-0.843186267185)*x[2]
            ref[(2, 2, 2, 1)]=-0.84997095343-(-0.293936404313)*(o-1.)
            arg[(2, 2, 2, 2)]=0.450175734759*x[0]**o + (0.725302906127)*x[0] + (-0.0745493742434)*x[1]**o + (0.004804558497)*x[1] + (-0.376783687325)*x[2]**o + (-0.799974398972)*x[2]
            ref[(2, 2, 2, 2)]=-0.0355121305784-(-0.000192887801501)*(o-1.)
            arg[(2, 2, 2, 3)]=-0.814000742293*x[0]**o + (-0.847427343579)*x[0] + (-0.630208579392)*x[1]**o + (0.259746912504)*x[1] + (0.467254066083)*x[2]**o + (-0.0375090404264)*x[2]
            ref[(2, 2, 2, 3)]=-0.801072363551-(-0.162825875934)*(o-1.)
            arg[(2, 2, 3, 0)]=-0.127377282498*x[0]**o + (0.489461727048)*x[0] + (0.574733174176)*x[1]**o + (-0.577275778132)*x[1] + (0.117017363137)*x[2]**o + (0.227445715155)*x[2]
            ref[(2, 2, 3, 0)]=0.352002459443-(0.094062209136)*(o-1.)
            arg[(2, 2, 3, 1)]=-0.0967853730403*x[0]**o + (0.414291510007)*x[0] + (-0.972667515192)*x[1]**o + (0.775682100882)*x[1] + (0.518828456037)*x[2]**o + (-0.213366261014)*x[2]
            ref[(2, 2, 3, 1)]=0.21299145884-(-0.0917707386992)*(o-1.)
            arg[(2, 2, 3, 2)]=0.389392192302*x[0]**o + (-0.0315197506783)*x[0] + (0.553368090426)*x[1]**o + (0.499399450554)*x[1] + (-0.284973153988)*x[2]**o + (-0.785406093356)*x[2]
            ref[(2, 2, 3, 2)]=0.17013036763-(0.109631188123)*(o-1.)
            arg[(2, 2, 3, 3)]=-0.534025373799*x[0]**o + (-0.167838857454)*x[0] + (0.485029912188)*x[1]**o + (0.0949920099399)*x[1] + (-0.952652774376)*x[2]**o + (0.143276703768)*x[2]
            ref[(2, 2, 3, 3)]=-0.465609189866-(-0.166941372665)*(o-1.)
            arg[(3, 0, 0, 0)]=0.110906700419*x[0]**o + (-0.777014163338)*x[0] + (0.377771192461)*x[1]**o + (0.353981383502)*x[1] + (-0.831288753336)*x[2]**o + (-0.573054947086)*x[2]
            ref[(3, 0, 0, 0)]=-0.669349293689-(-0.057101810076)*(o-1.)
            arg[(3, 0, 0, 1)]=0.264237235023*x[0]**o + (0.267606011915)*x[0] + (0.0517254491423)*x[1]**o + (0.393213348227)*x[1] + (0.449338699364)*x[2]**o + (0.928897608828)*x[2]
            ref[(3, 0, 0, 1)]=1.17750917625-(0.127550230588)*(o-1.)
            arg[(3, 0, 0, 2)]=0.830490049058*x[0]**o + (0.537879653918)*x[0] + (0.794088925909)*x[1]**o + (-0.107855480165)*x[1] + (-0.714961137219)*x[2]**o + (0.589614355417)*x[2]
            ref[(3, 0, 0, 2)]=0.964628183459-(0.151602972958)*(o-1.)
            arg[(3, 0, 0, 3)]=-0.57668482218*x[0]**o + (0.128429643235)*x[0] + (-0.0578463561012)*x[1]**o + (0.363072877182)*x[1] + (0.132390342975)*x[2]**o + (0.862081780263)*x[2]
            ref[(3, 0, 0, 3)]=0.425721732687-(-0.0836901392177)*(o-1.)
            arg[(3, 0, 1, 0)]=-0.213696134404*x[0]**o + (-0.232270595612)*x[0] + (-0.475817392784)*x[1]**o + (-0.538578339769)*x[1] + (-0.130483495643)*x[2]**o + (0.769081336293)*x[2]
            ref[(3, 0, 1, 0)]=-0.41088231096-(-0.136666170472)*(o-1.)
            arg[(3, 0, 1, 1)]=0.393752960468*x[0]**o + (0.303229590645)*x[0] + (0.427729604234)*x[1]**o + (0.703337677488)*x[1] + (-0.534072910993)*x[2]**o + (0.57825491753)*x[2]
            ref[(3, 0, 1, 1)]=0.936115919686-(0.0479016089514)*(o-1.)
            arg[(3, 0, 1, 2)]=-0.302498929358*x[0]**o + (0.659837898627)*x[0] + (-0.828643527297)*x[1]**o + (-0.173579948861)*x[1] + (0.216212410665)*x[2]**o + (0.507009287142)*x[2]
            ref[(3, 0, 1, 2)]=0.0391685954587-(-0.152488340998)*(o-1.)
            arg[(3, 0, 1, 3)]=-0.388909115509*x[0]**o + (-0.615229090649)*x[0] + (-0.952396772943)*x[1]**o + (0.31394572887)*x[1] + (-0.0495456635599)*x[2]**o + (-0.00569946581327)*x[2]
            ref[(3, 0, 1, 3)]=-0.848917189802-(-0.231808592002)*(o-1.)
            arg[(3, 0, 2, 0)]=0.304198386499*x[0]**o + (-0.853372020349)*x[0] + (0.933426251697)*x[1]**o + (0.555983238207)*x[1] + (0.636713858282)*x[2]**o + (0.295431456235)*x[2]
            ref[(3, 0, 2, 0)]=0.936190585285-(0.312389749413)*(o-1.)
            arg[(3, 0, 2, 1)]=-0.14197799833*x[0]**o + (-0.128972038309)*x[0] + (-0.0383825002012)*x[1]**o + (-0.609489176207)*x[1] + (-0.900238186067)*x[2]**o + (0.704140838526)*x[2]
            ref[(3, 0, 2, 1)]=-0.557459530294-(-0.180099780766)*(o-1.)
            arg[(3, 0, 2, 2)]=-0.85381307582*x[0]**o + (-0.0444184329921)*x[0] + (0.66907628618)*x[1]**o + (-0.153196717403)*x[1] + (-0.888288232842)*x[2]**o + (-0.707942698857)*x[2]
            ref[(3, 0, 2, 2)]=-0.989291435867-(-0.178837503747)*(o-1.)
            arg[(3, 0, 2, 3)]=-0.293477782612*x[0]**o + (-0.812899474576)*x[0] + (-0.0298679825962)*x[1]**o + (0.580844800085)*x[1] + (0.328266833134)*x[2]**o + (-0.950642647454)*x[2]
            ref[(3, 0, 2, 3)]=-0.58888812701-(0.000820177987549)*(o-1.)
            arg[(3, 0, 3, 0)]=-0.958141820734*x[0]**o + (0.489575852931)*x[0] + (-0.764017150553)*x[1]**o + (-0.0485536380355)*x[1] + (0.708257411556)*x[2]**o + (0.78813639903)*x[2]
            ref[(3, 0, 3, 0)]=0.107628527097-(-0.168983593289)*(o-1.)
            arg[(3, 0, 3, 1)]=-0.155446780548*x[0]**o + (-0.80684057276)*x[0] + (0.174832474486)*x[1]**o + (-0.792059062966)*x[1] + (-0.930874605889)*x[2]**o + (0.0462695840634)*x[2]
            ref[(3, 0, 3, 1)]=-1.23205948181-(-0.151914818659)*(o-1.)
            arg[(3, 0, 3, 2)]=-0.186284927986*x[0]**o + (0.621916213062)*x[0] + (-0.680261417546)*x[1]**o + (-0.213553460452)*x[1] + (-0.837986917638)*x[2]**o + (0.337357076977)*x[2]
            ref[(3, 0, 3, 2)]=-0.479406716791-(-0.284088877195)*(o-1.)
            arg[(3, 0, 3, 3)]=-0.992860711357*x[0]**o + (-0.77704869694)*x[0] + (-0.147775951414)*x[1]**o + (-0.361479169161)*x[1] + (0.317994935505)*x[2]**o + (0.5846402668)*x[2]
            ref[(3, 0, 3, 3)]=-0.688264663283-(-0.137106954544)*(o-1.)
            arg[(3, 1, 0, 0)]=-0.221903306779*x[0]**o + (-0.463146499842)*x[0] + (-0.324855532484)*x[1]**o + (0.14575766409)*x[1] + (0.347045786074)*x[2]**o + (-0.7430484608)*x[2]
            ref[(3, 1, 0, 0)]=-0.630075174871-(-0.0332855088649)*(o-1.)
            arg[(3, 1, 0, 1)]=0.0471248522054*x[0]**o + (0.217153345626)*x[0] + (-0.802082871076)*x[1]**o + (-0.693806762078)*x[1] + (-0.318447720571)*x[2]**o + (-0.138665320097)*x[2]
            ref[(3, 1, 0, 1)]=-0.844362237996-(-0.178900956574)*(o-1.)
            arg[(3, 1, 0, 2)]=-0.831214406915*x[0]**o + (0.0213299996882)*x[0] + (-0.521979005462)*x[1]**o + (-0.0175920946759)*x[1] + (0.850574126056)*x[2]**o + (0.574915925947)*x[2]
            ref[(3, 1, 0, 2)]=0.0380172723194-(-0.0837698810535)*(o-1.)
            arg[(3, 1, 0, 3)]=-0.0886769284437*x[0]**o + (0.391242926907)*x[0] + (-0.617927603268)*x[1]**o + (0.186472736832)*x[1] + (-0.978523161378)*x[2]**o + (-0.428803230527)*x[2]
            ref[(3, 1, 0, 3)]=-0.768107629939-(-0.280854615515)*(o-1.)
            arg[(3, 1, 1, 0)]=-0.675833504133*x[0]**o + (0.362272598649)*x[0] + (0.734347606249)*x[1]**o + (-0.444678822601)*x[1] + (-0.417348508532)*x[2]**o + (-0.220980917233)*x[2]
            ref[(3, 1, 1, 0)]=-0.3311107738-(-0.0598057344025)*(o-1.)
            arg[(3, 1, 1, 1)]=0.98384279838*x[0]**o + (0.953311569033)*x[0] + (0.480649579722)*x[1]**o + (0.0365755636194)*x[1] + (0.352281520778)*x[2]**o + (-0.867915640609)*x[2]
            ref[(3, 1, 1, 1)]=0.969372695462-(0.302795649813)*(o-1.)
            arg[(3, 1, 1, 2)]=-0.52641052548*x[0]**o + (0.486208396425)*x[0] + (-0.170723322574)*x[1]**o + (-0.899136606086)*x[1] + (-0.919504563535)*x[2]**o + (0.483905499443)*x[2]
            ref[(3, 1, 1, 2)]=-0.772830560904-(-0.269439735265)*(o-1.)
            arg[(3, 1, 1, 3)]=-0.221474681235*x[0]**o + (0.163343231109)*x[0] + (0.607446855487)*x[1]**o + (-0.259993950964)*x[1] + (0.724770600225)*x[2]**o + (0.768412392818)*x[2]
            ref[(3, 1, 1, 3)]=0.89125222372-(0.185123795746)*(o-1.)
            arg[(3, 1, 2, 0)]=-0.569594046343*x[0]**o + (0.963376233163)*x[0] + (-0.645499802944)*x[1]**o + (0.262514151555)*x[1] + (0.633109246693)*x[2]**o + (-0.593067368439)*x[2]
            ref[(3, 1, 2, 0)]=0.0254192068421-(-0.0969974337657)*(o-1.)
            arg[(3, 1, 2, 1)]=-0.879687589412*x[0]**o + (0.60248572164)*x[0] + (-0.638689886811)*x[1]**o + (0.995334948612)*x[1] + (-0.236844840252)*x[2]**o + (-0.52204577739)*x[2]
            ref[(3, 1, 2, 1)]=-0.339723711807-(-0.292537052746)*(o-1.)
            arg[(3, 1, 2, 2)]=-0.500574377165*x[0]**o + (0.623499881666)*x[0] + (-0.45746854426)*x[1]**o + (-0.585216505846)*x[1] + (-0.968918700247)*x[2]**o + (0.388394250902)*x[2]
            ref[(3, 1, 2, 2)]=-0.750141997475-(-0.321160270279)*(o-1.)
            arg[(3, 1, 2, 3)]=-0.714267027305*x[0]**o + (0.728053903169)*x[0] + (0.740751923565)*x[1]**o + (0.0487305219883)*x[1] + (0.0711994252659)*x[2]**o + (0.697858815303)*x[2]
            ref[(3, 1, 2, 3)]=0.786163780993-(0.0162807202542)*(o-1.)
            arg[(3, 1, 3, 0)]=-0.85858871439*x[0]**o + (-0.0924120526386)*x[0] + (-0.511576102059)*x[1]**o + (0.0298288589222)*x[1] + (-0.831479478407)*x[2]**o + (0.374352082883)*x[2]
            ref[(3, 1, 3, 0)]=-0.944937702845-(-0.366940715809)*(o-1.)
            arg[(3, 1, 3, 1)]=-0.729508051995*x[0]**o + (-0.630198609631)*x[0] + (-0.982882551943)*x[1]**o + (-0.957175579741)*x[1] + (-0.634084993908)*x[2]**o + (0.166098290744)*x[2]
            ref[(3, 1, 3, 1)]=-1.88387574824-(-0.391079266308)*(o-1.)
            arg[(3, 1, 3, 2)]=0.861594193303*x[0]**o + (-0.743779911679)*x[0] + (-0.697861440381)*x[1]**o + (-0.588100575148)*x[1] + (-0.475863286594)*x[2]**o + (0.719243942269)*x[2]
            ref[(3, 1, 3, 2)]=-0.462383539115-(-0.052021755612)*(o-1.)
            arg[(3, 1, 3, 3)]=-0.7444739154*x[0]**o + (0.0373773784072)*x[0] + (0.455908654718)*x[1]**o + (-0.519986715793)*x[1] + (0.870156913668)*x[2]**o + (-0.404470419139)*x[2]
            ref[(3, 1, 3, 3)]=-0.152744051769-(0.0969319421644)*(o-1.)
            arg[(3, 2, 0, 0)]=-0.245355009484*x[0]**o + (-0.755548437939)*x[0] + (-0.374310312087)*x[1]**o + (0.264387342318)*x[1] + (0.813254128357)*x[2]**o + (-0.832628334692)*x[2]
            ref[(3, 2, 0, 0)]=-0.565100311764-(0.0322648011309)*(o-1.)
            arg[(3, 2, 0, 1)]=-0.800536536058*x[0]**o + (0.578496542667)*x[0] + (0.765972377895)*x[1]**o + (0.76513585141)*x[1] + (0.0246240558436)*x[2]**o + (0.985273844954)*x[2]
            ref[(3, 2, 0, 1)]=1.15948306836-(-0.00165668372)*(o-1.)
            arg[(3, 2, 0, 2)]=0.152073217368*x[0]**o + (-0.185590247113)*x[0] + (-0.231417800157)*x[1]**o + (-0.450204802323)*x[1] + (-0.660281344727)*x[2]**o + (-0.954058317588)*x[2]
            ref[(3, 2, 0, 2)]=-1.16473964727-(-0.123270987919)*(o-1.)
            arg[(3, 2, 0, 3)]=-0.720576530759*x[0]**o + (0.250425288709)*x[0] + (-0.684408763602)*x[1]**o + (-0.299987826456)*x[1] + (0.905744951969)*x[2]**o + (-0.862244427787)*x[2]
            ref[(3, 2, 0, 3)]=-0.705523653962-(-0.0832067237318)*(o-1.)
            arg[(3, 2, 1, 0)]=0.651816301801*x[0]**o + (0.0983885623504)*x[0] + (0.418836838442)*x[1]**o + (0.714924909924)*x[1] + (-0.832475356694)*x[2]**o + (-0.316310822992)*x[2]
            ref[(3, 2, 1, 0)]=0.367590216415-(0.039696297258)*(o-1.)
            arg[(3, 2, 1, 1)]=-0.3789020505*x[0]**o + (-0.888524091281)*x[0] + (0.234188997368)*x[1]**o + (-0.310575506576)*x[1] + (0.859234090633)*x[2]**o + (-0.906323977153)*x[2]
            ref[(3, 2, 1, 1)]=-0.695451268754-(0.119086839584)*(o-1.)
            arg[(3, 2, 1, 2)]=0.582180789012*x[0]**o + (-0.164672802675)*x[0] + (0.286369269663)*x[1]**o + (-0.662952999339)*x[1] + (0.0866352537218)*x[2]**o + (-0.377741695919)*x[2]
            ref[(3, 2, 1, 2)]=-0.125091092768-(0.159197552066)*(o-1.)
            arg[(3, 2, 1, 3)]=0.718275642654*x[0]**o + (-0.591353045797)*x[0] + (0.721856240523)*x[1]**o + (-0.231774638205)*x[1] + (-0.249589876006)*x[2]**o + (0.929429496284)*x[2]
            ref[(3, 2, 1, 3)]=0.648421909726-(0.198423667862)*(o-1.)
            arg[(3, 2, 2, 0)]=0.0535709847442*x[0]**o + (-0.676493846886)*x[0] + (0.860881764337)*x[1]**o + (-0.616249927211)*x[1] + (0.861411713852)*x[2]**o + (-0.459681783477)*x[2]
            ref[(3, 2, 2, 0)]=0.0117194526797-(0.295977410489)*(o-1.)
            arg[(3, 2, 2, 1)]=-0.728731828206*x[0]**o + (0.931210195396)*x[0] + (0.958718552783)*x[1]**o + (0.192328087646)*x[1] + (0.731491206538)*x[2]**o + (-0.0194899585496)*x[2]
            ref[(3, 2, 2, 1)]=1.0327631278-(0.160246321852)*(o-1.)
            arg[(3, 2, 2, 2)]=-0.303336188902*x[0]**o + (0.645240866324)*x[0] + (-0.753678324582)*x[1]**o + (0.610802631761)*x[1] + (-0.900811311396)*x[2]**o + (0.624570002776)*x[2]
            ref[(3, 2, 2, 2)]=-0.0386061620092-(-0.326304304147)*(o-1.)
            arg[(3, 2, 2, 3)]=-0.626439481144*x[0]**o + (0.862329159428)*x[0] + (-0.683873353729)*x[1]**o + (0.512396726062)*x[1] + (0.762678654979)*x[2]**o + (0.511453693771)*x[2]
            ref[(3, 2, 2, 3)]=0.669272699683-(-0.0912723633158)*(o-1.)
            arg[(3, 2, 3, 0)]=0.73985459216*x[0]**o + (0.63156862479)*x[0] + (0.0911024455011)*x[1]**o + (-0.238397377256)*x[1] + (0.0766296630267)*x[2]**o + (0.249931127268)*x[2]
            ref[(3, 2, 3, 0)]=0.775344537745-(0.151264450115)*(o-1.)
            arg[(3, 2, 3, 1)]=-0.204951777361*x[0]**o + (-0.959409200446)*x[0] + (0.674042141943)*x[1]**o + (-0.69658357021)*x[1] + (-0.581135579858)*x[2]**o + (0.683303414621)*x[2]
            ref[(3, 2, 3, 1)]=-0.542367285655-(-0.018674202546)*(o-1.)
            arg[(3, 2, 3, 2)]=0.189154315804*x[0]**o + (-0.195581277632)*x[0] + (0.110259680097)*x[1]**o + (0.961691950694)*x[1] + (0.435018952267)*x[2]**o + (-0.902035005779)*x[2]
            ref[(3, 2, 3, 2)]=0.299254307725-(0.122405491361)*(o-1.)
            arg[(3, 2, 3, 3)]=-0.742622813274*x[0]**o + (-0.356491785781)*x[0] + (-0.583961336637)*x[1]**o + (-0.209309179818)*x[1] + (0.922181669606)*x[2]**o + (0.428370645751)*x[2]
            ref[(3, 2, 3, 3)]=-0.270916400077-(-0.0674004133843)*(o-1.)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.427967379695*x[0] + (0.149791232839)*x[1]
            ref=0.288879306267
        else:
            arg=0.71838765193*x[0] + (0.525108482337)*x[1] + (0.671953232712)*x[2]
            ref=0.95772468349
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.256344368962*x[0] + (0.53446253902)*x[1]
            ref[(0,)]=0.139059085029
            arg[(1,)]=-0.90714808546*x[0] + (0.778767334961)*x[1]
            ref[(1,)]=-0.0641903752496
            arg[(2,)]=-0.485022713514*x[0] + (-0.403216314635)*x[1]
            ref[(2,)]=-0.444119514074
            arg[(3,)]=0.810106185067*x[0] + (-0.669234693134)*x[1]
            ref[(3,)]=0.0704357459665
        else:
            arg[(0,)]=0.126874690968*x[0] + (0.449677634961)*x[1] + (-0.543722451894)*x[2]
            ref[(0,)]=0.0164149370179
            arg[(1,)]=0.131231716428*x[0] + (0.057808472633)*x[1] + (0.844215800878)*x[2]
            ref[(1,)]=0.51662799497
            arg[(2,)]=-0.534459692375*x[0] + (0.185852692624)*x[1] + (0.502506090789)*x[2]
            ref[(2,)]=0.0769495455191
            arg[(3,)]=-0.75752012649*x[0] + (0.156728774038)*x[1] + (0.954533700589)*x[2]
            ref[(3,)]=0.176871174068
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref=numpy.zeros((4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.207371426565*x[0] + (-0.336726396252)*x[1]
            ref[(0, 0)]=-0.272048911409
            arg[(0, 1)]=-0.245146428811*x[0] + (0.921857372153)*x[1]
            ref[(0, 1)]=0.338355471671
            arg[(0, 2)]=-0.828778335808*x[0] + (-0.155823427452)*x[1]
            ref[(0, 2)]=-0.49230088163
            arg[(1, 0)]=0.452741717649*x[0] + (-0.867724047371)*x[1]
            ref[(1, 0)]=-0.207491164861
            arg[(1, 1)]=0.021066678684*x[0] + (-0.490228543189)*x[1]
            ref[(1, 1)]=-0.234580932252
            arg[(1, 2)]=0.178344100403*x[0] + (-0.913309917924)*x[1]
            ref[(1, 2)]=-0.36748290876
            arg[(2, 0)]=0.150719938696*x[0] + (0.507769612827)*x[1]
            ref[(2, 0)]=0.329244775762
            arg[(2, 1)]=0.993115227469*x[0] + (0.115554414476)*x[1]
            ref[(2, 1)]=0.554334820972
            arg[(2, 2)]=-0.32231171637*x[0] + (-0.632786285517)*x[1]
            ref[(2, 2)]=-0.477549000943
            arg[(3, 0)]=-0.0748074705762*x[0] + (-0.956099772859)*x[1]
            ref[(3, 0)]=-0.515453621718
            arg[(3, 1)]=0.50575093487*x[0] + (-0.118419090013)*x[1]
            ref[(3, 1)]=0.193665922428
            arg[(3, 2)]=0.794795708231*x[0] + (0.306053511209)*x[1]
            ref[(3, 2)]=0.55042460972
        else:
            arg[(0, 0)]=-0.574390432211*x[0] + (-0.193603430936)*x[1] + (0.099091919279)*x[2]
            ref[(0, 0)]=-0.334450971934
            arg[(0, 1)]=-0.468168122975*x[0] + (0.436766914376)*x[1] + (-0.324770242443)*x[2]
            ref[(0, 1)]=-0.178085725521
            arg[(0, 2)]=0.937661503644*x[0] + (-0.439515967983)*x[1] + (-0.196182904517)*x[2]
            ref[(0, 2)]=0.150981315572
            arg[(1, 0)]=0.852735372595*x[0] + (-0.583061592958)*x[1] + (0.585043223869)*x[2]
            ref[(1, 0)]=0.427358501753
            arg[(1, 1)]=0.249980239094*x[0] + (-0.26098816368)*x[1] + (-0.556898108013)*x[2]
            ref[(1, 1)]=-0.283953016299
            arg[(1, 2)]=-0.236292224343*x[0] + (-0.530981320153)*x[1] + (-0.255776282365)*x[2]
            ref[(1, 2)]=-0.51152491343
            arg[(2, 0)]=-0.757850118496*x[0] + (-0.222627927577)*x[1] + (0.876541825399)*x[2]
            ref[(2, 0)]=-0.0519681103372
            arg[(2, 1)]=0.152746489533*x[0] + (0.271783841218)*x[1] + (0.656727519582)*x[2]
            ref[(2, 1)]=0.540628925166
            arg[(2, 2)]=-0.0537216081762*x[0] + (0.865702097545)*x[1] + (0.0480592346919)*x[2]
            ref[(2, 2)]=0.430019862031
            arg[(3, 0)]=-0.70159281727*x[0] + (0.0439772304475)*x[1] + (0.244929617044)*x[2]
            ref[(3, 0)]=-0.206342984889
            arg[(3, 1)]=-0.819879449361*x[0] + (-0.316813763715)*x[1] + (0.0549661498686)*x[2]
            ref[(3, 1)]=-0.540863531604
            arg[(3, 2)]=0.967677392374*x[0] + (0.580645226133)*x[1] + (0.453364673039)*x[2]
            ref[(3, 2)]=1.00084364577
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4),w)
        ref=numpy.zeros((2, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.366243819663*x[0] + (-0.00976825712818)*x[1]
            ref[(0, 0, 0)]=-0.188006038396
            arg[(0, 0, 1)]=0.0259274690944*x[0] + (0.0099137124225)*x[1]
            ref[(0, 0, 1)]=0.0179205907585
            arg[(0, 0, 2)]=0.0222696827102*x[0] + (-0.587974854875)*x[1]
            ref[(0, 0, 2)]=-0.282852586083
            arg[(0, 0, 3)]=0.886094994598*x[0] + (-0.587566959691)*x[1]
            ref[(0, 0, 3)]=0.149264017453
            arg[(0, 1, 0)]=-0.244221295817*x[0] + (-0.253317571469)*x[1]
            ref[(0, 1, 0)]=-0.248769433643
            arg[(0, 1, 1)]=0.250487151643*x[0] + (-0.211013898139)*x[1]
            ref[(0, 1, 1)]=0.0197366267522
            arg[(0, 1, 2)]=0.652637737715*x[0] + (0.633289062694)*x[1]
            ref[(0, 1, 2)]=0.642963400205
            arg[(0, 1, 3)]=0.564825093964*x[0] + (0.147825045398)*x[1]
            ref[(0, 1, 3)]=0.356325069681
            arg[(1, 0, 0)]=0.020259962463*x[0] + (0.957470611416)*x[1]
            ref[(1, 0, 0)]=0.48886528694
            arg[(1, 0, 1)]=-0.727111539552*x[0] + (-0.866715015727)*x[1]
            ref[(1, 0, 1)]=-0.79691327764
            arg[(1, 0, 2)]=-0.285690553508*x[0] + (0.0483255264114)*x[1]
            ref[(1, 0, 2)]=-0.118682513548
            arg[(1, 0, 3)]=0.618202056357*x[0] + (-0.162879985919)*x[1]
            ref[(1, 0, 3)]=0.227661035219
            arg[(1, 1, 0)]=-0.674356329788*x[0] + (0.90226535315)*x[1]
            ref[(1, 1, 0)]=0.113954511681
            arg[(1, 1, 1)]=-0.413805586207*x[0] + (-0.0659778433433)*x[1]
            ref[(1, 1, 1)]=-0.239891714775
            arg[(1, 1, 2)]=-0.00921294958169*x[0] + (0.824353273655)*x[1]
            ref[(1, 1, 2)]=0.407570162037
            arg[(1, 1, 3)]=-0.30616436179*x[0] + (0.485794646188)*x[1]
            ref[(1, 1, 3)]=0.0898151421986
        else:
            arg[(0, 0, 0)]=-0.695718939562*x[0] + (-0.65817719932)*x[1] + (-0.209143615771)*x[2]
            ref[(0, 0, 0)]=-0.781519877327
            arg[(0, 0, 1)]=-0.305625092468*x[0] + (-0.685575060027)*x[1] + (0.925372973525)*x[2]
            ref[(0, 0, 1)]=-0.0329135894847
            arg[(0, 0, 2)]=-0.191556142272*x[0] + (-0.579955601127)*x[1] + (-0.188335420767)*x[2]
            ref[(0, 0, 2)]=-0.479923582084
            arg[(0, 0, 3)]=0.572893279391*x[0] + (-0.773276891644)*x[1] + (-0.754604311597)*x[2]
            ref[(0, 0, 3)]=-0.477493961925
            arg[(0, 1, 0)]=-0.205047594465*x[0] + (-0.147436030405)*x[1] + (0.0619876412123)*x[2]
            ref[(0, 1, 0)]=-0.145247991829
            arg[(0, 1, 1)]=0.851474813853*x[0] + (0.229252521572)*x[1] + (0.962484078111)*x[2]
            ref[(0, 1, 1)]=1.02160570677
            arg[(0, 1, 2)]=0.252521993979*x[0] + (-0.28599826295)*x[1] + (-0.878793887512)*x[2]
            ref[(0, 1, 2)]=-0.456135078241
            arg[(0, 1, 3)]=0.819535123952*x[0] + (-0.754547205171)*x[1] + (0.665289709238)*x[2]
            ref[(0, 1, 3)]=0.365138814009
            arg[(1, 0, 0)]=-0.38439121637*x[0] + (-0.578048531812)*x[1] + (0.20493104498)*x[2]
            ref[(1, 0, 0)]=-0.378754351601
            arg[(1, 0, 1)]=-0.620932498448*x[0] + (-0.736770346558)*x[1] + (-0.243685318616)*x[2]
            ref[(1, 0, 1)]=-0.800694081811
            arg[(1, 0, 2)]=0.0258947053489*x[0] + (-0.757883929236)*x[1] + (-0.481980274975)*x[2]
            ref[(1, 0, 2)]=-0.606984749431
            arg[(1, 0, 3)]=0.357672769188*x[0] + (-0.0339554514531)*x[1] + (0.512718959105)*x[2]
            ref[(1, 0, 3)]=0.41821813842
            arg[(1, 1, 0)]=0.82096614707*x[0] + (0.871614924938)*x[1] + (-0.761204539688)*x[2]
            ref[(1, 1, 0)]=0.46568826616
            arg[(1, 1, 1)]=0.480270845394*x[0] + (-0.266742391955)*x[1] + (0.912202735378)*x[2]
            ref[(1, 1, 1)]=0.562865594409
            arg[(1, 1, 2)]=-0.0170374715948*x[0] + (-0.426272734284)*x[1] + (-0.0223781769785)*x[2]
            ref[(1, 1, 2)]=-0.232844191429
            arg[(1, 1, 3)]=-0.561794832537*x[0] + (-0.271055441421)*x[1] + (0.600709756619)*x[2]
            ref[(1, 1, 3)]=-0.11607025867
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 2),w)
        ref=numpy.zeros((4, 3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.170260043337*x[0] + (-0.191077037618)*x[1]
            ref[(0, 0, 0, 0)]=-0.180668540478
            arg[(0, 0, 0, 1)]=0.0881330346387*x[0] + (-0.349178523542)*x[1]
            ref[(0, 0, 0, 1)]=-0.130522744452
            arg[(0, 0, 1, 0)]=-0.352831937091*x[0] + (0.282654482207)*x[1]
            ref[(0, 0, 1, 0)]=-0.0350887274417
            arg[(0, 0, 1, 1)]=-0.182994491618*x[0] + (-0.655619912051)*x[1]
            ref[(0, 0, 1, 1)]=-0.419307201834
            arg[(0, 0, 2, 0)]=-0.488485384148*x[0] + (0.441517105326)*x[1]
            ref[(0, 0, 2, 0)]=-0.0234841394112
            arg[(0, 0, 2, 1)]=0.045962682953*x[0] + (-0.698200679408)*x[1]
            ref[(0, 0, 2, 1)]=-0.326118998227
            arg[(0, 1, 0, 0)]=-0.195607973238*x[0] + (-0.153009013409)*x[1]
            ref[(0, 1, 0, 0)]=-0.174308493323
            arg[(0, 1, 0, 1)]=0.993216359242*x[0] + (-0.328624946414)*x[1]
            ref[(0, 1, 0, 1)]=0.332295706414
            arg[(0, 1, 1, 0)]=-0.175229759943*x[0] + (-0.589893467452)*x[1]
            ref[(0, 1, 1, 0)]=-0.382561613697
            arg[(0, 1, 1, 1)]=-0.793034711307*x[0] + (-0.921313807388)*x[1]
            ref[(0, 1, 1, 1)]=-0.857174259348
            arg[(0, 1, 2, 0)]=-0.829393686425*x[0] + (-0.0586413127613)*x[1]
            ref[(0, 1, 2, 0)]=-0.444017499593
            arg[(0, 1, 2, 1)]=0.40137954331*x[0] + (-0.526383493456)*x[1]
            ref[(0, 1, 2, 1)]=-0.0625019750726
            arg[(0, 2, 0, 0)]=0.18605436106*x[0] + (-0.384778605865)*x[1]
            ref[(0, 2, 0, 0)]=-0.0993621224026
            arg[(0, 2, 0, 1)]=-0.158802435346*x[0] + (0.328911735851)*x[1]
            ref[(0, 2, 0, 1)]=0.0850546502526
            arg[(0, 2, 1, 0)]=0.698650215949*x[0] + (-0.628946495282)*x[1]
            ref[(0, 2, 1, 0)]=0.0348518603332
            arg[(0, 2, 1, 1)]=0.000428298077533*x[0] + (0.341859830626)*x[1]
            ref[(0, 2, 1, 1)]=0.171144064352
            arg[(0, 2, 2, 0)]=0.165821449126*x[0] + (-0.672823604118)*x[1]
            ref[(0, 2, 2, 0)]=-0.253501077496
            arg[(0, 2, 2, 1)]=-0.83628981651*x[0] + (0.350807147507)*x[1]
            ref[(0, 2, 2, 1)]=-0.242741334502
            arg[(1, 0, 0, 0)]=0.136842738266*x[0] + (0.381151904697)*x[1]
            ref[(1, 0, 0, 0)]=0.258997321481
            arg[(1, 0, 0, 1)]=0.826087183533*x[0] + (0.811100117628)*x[1]
            ref[(1, 0, 0, 1)]=0.818593650581
            arg[(1, 0, 1, 0)]=0.636681507367*x[0] + (0.989040546725)*x[1]
            ref[(1, 0, 1, 0)]=0.812861027046
            arg[(1, 0, 1, 1)]=0.723153737298*x[0] + (0.283578779101)*x[1]
            ref[(1, 0, 1, 1)]=0.5033662582
            arg[(1, 0, 2, 0)]=0.975695400997*x[0] + (0.123622826891)*x[1]
            ref[(1, 0, 2, 0)]=0.549659113944
            arg[(1, 0, 2, 1)]=0.813488121782*x[0] + (0.484010576661)*x[1]
            ref[(1, 0, 2, 1)]=0.648749349222
            arg[(1, 1, 0, 0)]=-0.331552230608*x[0] + (-0.296899041163)*x[1]
            ref[(1, 1, 0, 0)]=-0.314225635885
            arg[(1, 1, 0, 1)]=0.404855131631*x[0] + (-0.263724267565)*x[1]
            ref[(1, 1, 0, 1)]=0.0705654320328
            arg[(1, 1, 1, 0)]=0.217044794389*x[0] + (-0.0205862509933)*x[1]
            ref[(1, 1, 1, 0)]=0.0982292716979
            arg[(1, 1, 1, 1)]=-0.601085382014*x[0] + (0.695218477677)*x[1]
            ref[(1, 1, 1, 1)]=0.0470665478318
            arg[(1, 1, 2, 0)]=0.803322670593*x[0] + (0.789612293991)*x[1]
            ref[(1, 1, 2, 0)]=0.796467482292
            arg[(1, 1, 2, 1)]=0.117222124886*x[0] + (-0.474230780691)*x[1]
            ref[(1, 1, 2, 1)]=-0.178504327903
            arg[(1, 2, 0, 0)]=-0.0419983852209*x[0] + (0.25836262176)*x[1]
            ref[(1, 2, 0, 0)]=0.108182118269
            arg[(1, 2, 0, 1)]=-0.849569567505*x[0] + (0.932696802191)*x[1]
            ref[(1, 2, 0, 1)]=0.0415636173429
            arg[(1, 2, 1, 0)]=-0.750326410542*x[0] + (-0.921634588165)*x[1]
            ref[(1, 2, 1, 0)]=-0.835980499353
            arg[(1, 2, 1, 1)]=0.060462973374*x[0] + (0.567855843847)*x[1]
            ref[(1, 2, 1, 1)]=0.314159408611
            arg[(1, 2, 2, 0)]=0.422338051598*x[0] + (-0.163905927544)*x[1]
            ref[(1, 2, 2, 0)]=0.129216062027
            arg[(1, 2, 2, 1)]=-0.535992985574*x[0] + (-0.0660732336249)*x[1]
            ref[(1, 2, 2, 1)]=-0.301033109599
            arg[(2, 0, 0, 0)]=0.951124311445*x[0] + (0.122724839581)*x[1]
            ref[(2, 0, 0, 0)]=0.536924575513
            arg[(2, 0, 0, 1)]=0.208483669426*x[0] + (0.988435278821)*x[1]
            ref[(2, 0, 0, 1)]=0.598459474124
            arg[(2, 0, 1, 0)]=0.472391993069*x[0] + (0.969050157567)*x[1]
            ref[(2, 0, 1, 0)]=0.720721075318
            arg[(2, 0, 1, 1)]=0.09191955294*x[0] + (0.699094282344)*x[1]
            ref[(2, 0, 1, 1)]=0.395506917642
            arg[(2, 0, 2, 0)]=0.0793278033496*x[0] + (0.742065607282)*x[1]
            ref[(2, 0, 2, 0)]=0.410696705316
            arg[(2, 0, 2, 1)]=0.557729164859*x[0] + (-0.882958417588)*x[1]
            ref[(2, 0, 2, 1)]=-0.162614626365
            arg[(2, 1, 0, 0)]=-0.301617209051*x[0] + (0.275913559195)*x[1]
            ref[(2, 1, 0, 0)]=-0.0128518249283
            arg[(2, 1, 0, 1)]=-0.224404850925*x[0] + (0.212682059433)*x[1]
            ref[(2, 1, 0, 1)]=-0.00586139574618
            arg[(2, 1, 1, 0)]=0.867317502988*x[0] + (0.603497520283)*x[1]
            ref[(2, 1, 1, 0)]=0.735407511635
            arg[(2, 1, 1, 1)]=0.511415839358*x[0] + (0.769084073554)*x[1]
            ref[(2, 1, 1, 1)]=0.640249956456
            arg[(2, 1, 2, 0)]=0.164106745358*x[0] + (0.276749783527)*x[1]
            ref[(2, 1, 2, 0)]=0.220428264443
            arg[(2, 1, 2, 1)]=0.26158922262*x[0] + (-0.0584861206547)*x[1]
            ref[(2, 1, 2, 1)]=0.101551550983
            arg[(2, 2, 0, 0)]=-0.876785142459*x[0] + (0.0694870501988)*x[1]
            ref[(2, 2, 0, 0)]=-0.40364904613
            arg[(2, 2, 0, 1)]=0.893532648926*x[0] + (0.609953034434)*x[1]
            ref[(2, 2, 0, 1)]=0.75174284168
            arg[(2, 2, 1, 0)]=-0.674158930728*x[0] + (0.862887913044)*x[1]
            ref[(2, 2, 1, 0)]=0.094364491158
            arg[(2, 2, 1, 1)]=0.646693588642*x[0] + (-0.329524918071)*x[1]
            ref[(2, 2, 1, 1)]=0.158584335285
            arg[(2, 2, 2, 0)]=0.610219445188*x[0] + (-0.235292151192)*x[1]
            ref[(2, 2, 2, 0)]=0.187463646998
            arg[(2, 2, 2, 1)]=-0.409596627121*x[0] + (0.956950888137)*x[1]
            ref[(2, 2, 2, 1)]=0.273677130508
            arg[(3, 0, 0, 0)]=0.534632517366*x[0] + (0.221906163317)*x[1]
            ref[(3, 0, 0, 0)]=0.378269340342
            arg[(3, 0, 0, 1)]=-0.652060972757*x[0] + (0.725721007799)*x[1]
            ref[(3, 0, 0, 1)]=0.036830017521
            arg[(3, 0, 1, 0)]=-0.354343313379*x[0] + (-0.964789585295)*x[1]
            ref[(3, 0, 1, 0)]=-0.659566449337
            arg[(3, 0, 1, 1)]=-0.469159685*x[0] + (-0.443896407456)*x[1]
            ref[(3, 0, 1, 1)]=-0.456528046228
            arg[(3, 0, 2, 0)]=0.549064009552*x[0] + (0.331742269916)*x[1]
            ref[(3, 0, 2, 0)]=0.440403139734
            arg[(3, 0, 2, 1)]=0.94412092619*x[0] + (0.857396128129)*x[1]
            ref[(3, 0, 2, 1)]=0.90075852716
            arg[(3, 1, 0, 0)]=-0.682108586147*x[0] + (-0.487965102437)*x[1]
            ref[(3, 1, 0, 0)]=-0.585036844292
            arg[(3, 1, 0, 1)]=-0.429957352515*x[0] + (0.247998637505)*x[1]
            ref[(3, 1, 0, 1)]=-0.0909793575052
            arg[(3, 1, 1, 0)]=0.211964693679*x[0] + (0.324835000629)*x[1]
            ref[(3, 1, 1, 0)]=0.268399847154
            arg[(3, 1, 1, 1)]=-0.160466771006*x[0] + (0.958704985303)*x[1]
            ref[(3, 1, 1, 1)]=0.399119107148
            arg[(3, 1, 2, 0)]=-0.121105118185*x[0] + (-0.927982848338)*x[1]
            ref[(3, 1, 2, 0)]=-0.524543983261
            arg[(3, 1, 2, 1)]=-0.593505133845*x[0] + (-0.755334994149)*x[1]
            ref[(3, 1, 2, 1)]=-0.674420063997
            arg[(3, 2, 0, 0)]=0.262134110348*x[0] + (0.467697764628)*x[1]
            ref[(3, 2, 0, 0)]=0.364915937488
            arg[(3, 2, 0, 1)]=0.642108846989*x[0] + (-0.00469685097131)*x[1]
            ref[(3, 2, 0, 1)]=0.318705998009
            arg[(3, 2, 1, 0)]=0.137060305637*x[0] + (0.635513554802)*x[1]
            ref[(3, 2, 1, 0)]=0.386286930219
            arg[(3, 2, 1, 1)]=-0.419067468573*x[0] + (-0.0353180366867)*x[1]
            ref[(3, 2, 1, 1)]=-0.22719275263
            arg[(3, 2, 2, 0)]=-0.664421725844*x[0] + (0.215401404082)*x[1]
            ref[(3, 2, 2, 0)]=-0.224510160881
            arg[(3, 2, 2, 1)]=0.247736844558*x[0] + (-0.831968498724)*x[1]
            ref[(3, 2, 2, 1)]=-0.292115827083
        else:
            arg[(0, 0, 0, 0)]=-0.6260497905*x[0] + (-0.249052569853)*x[1] + (0.798595689388)*x[2]
            ref[(0, 0, 0, 0)]=-0.0382533354827
            arg[(0, 0, 0, 1)]=0.746327443795*x[0] + (0.0826027124713)*x[1] + (-0.347016468598)*x[2]
            ref[(0, 0, 0, 1)]=0.240956843834
            arg[(0, 0, 1, 0)]=0.100689618764*x[0] + (0.16345329315)*x[1] + (0.533247190774)*x[2]
            ref[(0, 0, 1, 0)]=0.398695051344
            arg[(0, 0, 1, 1)]=-0.886534602803*x[0] + (0.681977371456)*x[1] + (0.914112066834)*x[2]
            ref[(0, 0, 1, 1)]=0.354777417744
            arg[(0, 0, 2, 0)]=0.0808010645424*x[0] + (-0.542094037304)*x[1] + (-0.605529803047)*x[2]
            ref[(0, 0, 2, 0)]=-0.533411387904
            arg[(0, 0, 2, 1)]=-0.0469087565234*x[0] + (0.400084785143)*x[1] + (-0.0366495454058)*x[2]
            ref[(0, 0, 2, 1)]=0.158263241607
            arg[(0, 1, 0, 0)]=-0.406883181313*x[0] + (-0.686698383141)*x[1] + (-0.667159324059)*x[2]
            ref[(0, 1, 0, 0)]=-0.880370444256
            arg[(0, 1, 0, 1)]=-0.321338043149*x[0] + (0.555004376932)*x[1] + (-0.724788993534)*x[2]
            ref[(0, 1, 0, 1)]=-0.245561329876
            arg[(0, 1, 1, 0)]=0.536902207441*x[0] + (0.606955023014)*x[1] + (-0.85916992513)*x[2]
            ref[(0, 1, 1, 0)]=0.142343652662
            arg[(0, 1, 1, 1)]=0.461319684106*x[0] + (0.979341714305)*x[1] + (0.515300112034)*x[2]
            ref[(0, 1, 1, 1)]=0.977980755223
            arg[(0, 1, 2, 0)]=0.588188369738*x[0] + (0.951807726085)*x[1] + (-0.624625133721)*x[2]
            ref[(0, 1, 2, 0)]=0.457685481051
            arg[(0, 1, 2, 1)]=-0.622870039886*x[0] + (-0.714399260188)*x[1] + (0.858596579543)*x[2]
            ref[(0, 1, 2, 1)]=-0.239336360266
            arg[(0, 2, 0, 0)]=-0.492071842416*x[0] + (-0.241957342666)*x[1] + (-0.346308506472)*x[2]
            ref[(0, 2, 0, 0)]=-0.540168845777
            arg[(0, 2, 0, 1)]=-0.0244702216402*x[0] + (-0.522238512255)*x[1] + (0.429326245615)*x[2]
            ref[(0, 2, 0, 1)]=-0.0586912441402
            arg[(0, 2, 1, 0)]=0.669804708118*x[0] + (0.385819057532)*x[1] + (0.455873977786)*x[2]
            ref[(0, 2, 1, 0)]=0.755748871718
            arg[(0, 2, 1, 1)]=-0.818170984879*x[0] + (0.266829864552)*x[1] + (0.628449201844)*x[2]
            ref[(0, 2, 1, 1)]=0.0385540407586
            arg[(0, 2, 2, 0)]=0.932885001723*x[0] + (-0.360520691777)*x[1] + (-0.349385348592)*x[2]
            ref[(0, 2, 2, 0)]=0.111489480677
            arg[(0, 2, 2, 1)]=-0.359415806013*x[0] + (-0.520112298929)*x[1] + (-0.0674124473084)*x[2]
            ref[(0, 2, 2, 1)]=-0.473470276125
            arg[(1, 0, 0, 0)]=0.286653124232*x[0] + (0.740549853374)*x[1] + (0.841755525161)*x[2]
            ref[(1, 0, 0, 0)]=0.934479251383
            arg[(1, 0, 0, 1)]=0.332498948588*x[0] + (0.876448667471)*x[1] + (-0.640722896489)*x[2]
            ref[(1, 0, 0, 1)]=0.284112359785
            arg[(1, 0, 1, 0)]=-0.341201013877*x[0] + (0.455645543149)*x[1] + (-0.654469957373)*x[2]
            ref[(1, 0, 1, 0)]=-0.27001271405
            arg[(1, 0, 1, 1)]=-0.0775317714093*x[0] + (0.82645638911)*x[1] + (-0.673441621304)*x[2]
            ref[(1, 0, 1, 1)]=0.0377414981987
            arg[(1, 0, 2, 0)]=-0.225795660192*x[0] + (-0.438774347865)*x[1] + (-0.430200884091)*x[2]
            ref[(1, 0, 2, 0)]=-0.547385446074
            arg[(1, 0, 2, 1)]=0.79245666315*x[0] + (-0.811615853419)*x[1] + (-0.696356343232)*x[2]
            ref[(1, 0, 2, 1)]=-0.35775776675
            arg[(1, 1, 0, 0)]=-0.383932581801*x[0] + (0.109352831346)*x[1] + (-0.737325397433)*x[2]
            ref[(1, 1, 0, 0)]=-0.505952573944
            arg[(1, 1, 0, 1)]=-0.315679516408*x[0] + (0.249803157579)*x[1] + (0.552611403527)*x[2]
            ref[(1, 1, 0, 1)]=0.243367522348
            arg[(1, 1, 1, 0)]=-0.806113313403*x[0] + (0.644330405409)*x[1] + (0.649698296513)*x[2]
            ref[(1, 1, 1, 0)]=0.24395769426
            arg[(1, 1, 1, 1)]=-0.630387271827*x[0] + (-0.737945799542)*x[1] + (-0.948341555695)*x[2]
            ref[(1, 1, 1, 1)]=-1.15833731353
            arg[(1, 1, 2, 0)]=-0.243758155544*x[0] + (-0.36793134407)*x[1] + (0.407431868092)*x[2]
            ref[(1, 1, 2, 0)]=-0.102128815761
            arg[(1, 1, 2, 1)]=0.933211762621*x[0] + (-0.544141608293)*x[1] + (0.739561991862)*x[2]
            ref[(1, 1, 2, 1)]=0.564316073095
            arg[(1, 2, 0, 0)]=0.603539911484*x[0] + (0.83418934654)*x[1] + (0.415834938667)*x[2]
            ref[(1, 2, 0, 0)]=0.926782098346
            arg[(1, 2, 0, 1)]=0.445632791837*x[0] + (0.811573396131)*x[1] + (0.508880837146)*x[2]
            ref[(1, 2, 0, 1)]=0.883043512557
            arg[(1, 2, 1, 0)]=-0.217671578146*x[0] + (0.825102913518)*x[1] + (-0.153821249322)*x[2]
            ref[(1, 2, 1, 0)]=0.226805043026
            arg[(1, 2, 1, 1)]=-0.200811802158*x[0] + (-0.725386462647)*x[1] + (-0.527076347973)*x[2]
            ref[(1, 2, 1, 1)]=-0.726637306389
            arg[(1, 2, 2, 0)]=0.844971976096*x[0] + (0.0199868689141)*x[1] + (-0.979171935995)*x[2]
            ref[(1, 2, 2, 0)]=-0.0571065454924
            arg[(1, 2, 2, 1)]=0.904454535798*x[0] + (0.827664374518)*x[1] + (0.180644512188)*x[2]
            ref[(1, 2, 2, 1)]=0.956381711252
            arg[(2, 0, 0, 0)]=-0.524861560739*x[0] + (0.800426043247)*x[1] + (-0.470667705114)*x[2]
            ref[(2, 0, 0, 0)]=-0.0975516113029
            arg[(2, 0, 0, 1)]=0.794858007197*x[0] + (-0.889126928133)*x[1] + (0.735948038534)*x[2]
            ref[(2, 0, 0, 1)]=0.320839558799
            arg[(2, 0, 1, 0)]=-0.798099083124*x[0] + (0.864407801622)*x[1] + (-0.0603526292101)*x[2]
            ref[(2, 0, 1, 0)]=0.00297804464415
            arg[(2, 0, 1, 1)]=-0.438703438259*x[0] + (0.58129258086)*x[1] + (0.453358975563)*x[2]
            ref[(2, 0, 1, 1)]=0.297974059082
            arg[(2, 0, 2, 0)]=-0.141920657793*x[0] + (0.538340337943)*x[1] + (-0.833793302019)*x[2]
            ref[(2, 0, 2, 0)]=-0.218686810934
            arg[(2, 0, 2, 1)]=0.703911118061*x[0] + (0.636839013664)*x[1] + (0.148299896498)*x[2]
            ref[(2, 0, 2, 1)]=0.744525014111
            arg[(2, 1, 0, 0)]=0.441613886996*x[0] + (0.557444189533)*x[1] + (0.628822055287)*x[2]
            ref[(2, 1, 0, 0)]=0.813940065908
            arg[(2, 1, 0, 1)]=0.00671710094273*x[0] + (-0.808611303719)*x[1] + (0.235469672222)*x[2]
            ref[(2, 1, 0, 1)]=-0.283212265277
            arg[(2, 1, 1, 0)]=-0.483575953884*x[0] + (0.570535694992)*x[1] + (0.0275724429966)*x[2]
            ref[(2, 1, 1, 0)]=0.0572660920524
            arg[(2, 1, 1, 1)]=0.678208496175*x[0] + (0.399560291252)*x[1] + (0.98226108929)*x[2]
            ref[(2, 1, 1, 1)]=1.03001493836
            arg[(2, 1, 2, 0)]=0.816903138292*x[0] + (-0.356407121573)*x[1] + (-0.548695405235)*x[2]
            ref[(2, 1, 2, 0)]=-0.044099694258
            arg[(2, 1, 2, 1)]=-0.0622389103809*x[0] + (0.815905303879)*x[1] + (-0.7939044122)*x[2]
            ref[(2, 1, 2, 1)]=-0.0201190093507
            arg[(2, 2, 0, 0)]=-0.0011643329204*x[0] + (-0.888971595149)*x[1] + (0.508971060192)*x[2]
            ref[(2, 2, 0, 0)]=-0.190582433939
            arg[(2, 2, 0, 1)]=-0.603477065154*x[0] + (-0.160398841796)*x[1] + (0.228677033139)*x[2]
            ref[(2, 2, 0, 1)]=-0.267599436906
            arg[(2, 2, 1, 0)]=-0.964793507357*x[0] + (-0.915167812264)*x[1] + (-0.0556552059444)*x[2]
            ref[(2, 2, 1, 0)]=-0.967808262783
            arg[(2, 2, 1, 1)]=0.595048815898*x[0] + (0.391949630591)*x[1] + (-0.598780008636)*x[2]
            ref[(2, 2, 1, 1)]=0.194109218927
            arg[(2, 2, 2, 0)]=0.906319027549*x[0] + (-0.10435302087)*x[1] + (0.864117472915)*x[2]
            ref[(2, 2, 2, 0)]=0.833041739797
            arg[(2, 2, 2, 1)]=-0.0246384717384*x[0] + (0.83849822631)*x[1] + (-0.278014283616)*x[2]
            ref[(2, 2, 2, 1)]=0.267922735478
            arg[(3, 0, 0, 0)]=0.1983025284*x[0] + (0.948261782989)*x[1] + (-0.52533637615)*x[2]
            ref[(3, 0, 0, 0)]=0.310613967619
            arg[(3, 0, 0, 1)]=0.141864714767*x[0] + (0.774143298751)*x[1] + (-0.341587676584)*x[2]
            ref[(3, 0, 0, 1)]=0.287210168467
            arg[(3, 0, 1, 0)]=0.0908077599493*x[0] + (0.590408052905)*x[1] + (-0.601907087104)*x[2]
            ref[(3, 0, 1, 0)]=0.0396543628751
            arg[(3, 0, 1, 1)]=0.570015198657*x[0] + (0.467078200982)*x[1] + (0.0830557101713)*x[2]
            ref[(3, 0, 1, 1)]=0.560074554905
            arg[(3, 0, 2, 0)]=-0.441719880188*x[0] + (-0.423800421582)*x[1] + (0.138129991536)*x[2]
            ref[(3, 0, 2, 0)]=-0.363695155117
            arg[(3, 0, 2, 1)]=0.980224777579*x[0] + (0.810878089601)*x[1] + (-0.591957654325)*x[2]
            ref[(3, 0, 2, 1)]=0.599572606427
            arg[(3, 1, 0, 0)]=0.0223574620521*x[0] + (-0.911051841164)*x[1] + (-0.845390598516)*x[2]
            ref[(3, 1, 0, 0)]=-0.867042488814
            arg[(3, 1, 0, 1)]=-0.0640516374995*x[0] + (0.587604318425)*x[1] + (-0.792438693928)*x[2]
            ref[(3, 1, 0, 1)]=-0.134443006501
            arg[(3, 1, 1, 0)]=0.0126810344711*x[0] + (-0.873090643604)*x[1] + (-0.779766648519)*x[2]
            ref[(3, 1, 1, 0)]=-0.820088128826
            arg[(3, 1, 1, 1)]=0.160050780921*x[0] + (-0.235576708394)*x[1] + (0.558363291762)*x[2]
            ref[(3, 1, 1, 1)]=0.241418682144
            arg[(3, 1, 2, 0)]=0.660058945265*x[0] + (-0.731654085377)*x[1] + (0.861054998131)*x[2]
            ref[(3, 1, 2, 0)]=0.39472992901
            arg[(3, 1, 2, 1)]=-0.374470902494*x[0] + (0.216212479739)*x[1] + (-0.241420166823)*x[2]
            ref[(3, 1, 2, 1)]=-0.199839294789
            arg[(3, 2, 0, 0)]=0.390745123303*x[0] + (-0.133130078871)*x[1] + (0.0626620418611)*x[2]
            ref[(3, 2, 0, 0)]=0.160138543146
            arg[(3, 2, 0, 1)]=-0.726148114381*x[0] + (-0.164701880481)*x[1] + (0.591873060156)*x[2]
            ref[(3, 2, 0, 1)]=-0.149488467353
            arg[(3, 2, 1, 0)]=-0.229038251935*x[0] + (-0.459810790945)*x[1] + (-0.503851680643)*x[2]
            ref[(3, 2, 1, 0)]=-0.596350361762
            arg[(3, 2, 1, 1)]=0.154298667043*x[0] + (0.799484612212)*x[1] + (0.0666140654249)*x[2]
            ref[(3, 2, 1, 1)]=0.51019867234
            arg[(3, 2, 2, 0)]=-0.749572423866*x[0] + (0.604998210775)*x[1] + (-0.613568348613)*x[2]
            ref[(3, 2, 2, 0)]=-0.379071280852
            arg[(3, 2, 2, 1)]=-0.0785269622193*x[0] + (0.629804325756)*x[1] + (0.63649015527)*x[2]
            ref[(3, 2, 2, 1)]=0.593883759403
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.0163134202231*x[0] + (0.943301266781)*x[1]
            ref=0.479807343502
        else:
            arg=0.228235884789*x[0] + (-0.99302421142)*x[1] + (0.12364255923)*x[2]
            ref=-0.320572883701
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.928596941606*x[0] + (-0.407803209543)*x[1]
            ref[(0,)]=0.260396866032
            arg[(1,)]=0.131686542226*x[0] + (0.863842676815)*x[1]
            ref[(1,)]=0.49776460952
        else:
            arg[(0,)]=-0.165412862081*x[0] + (-0.928773293099)*x[1] + (0.898106036745)*x[2]
            ref[(0,)]=-0.0980400592176
            arg[(1,)]=0.185712853429*x[0] + (0.0125488371938)*x[1] + (-0.730052810749)*x[2]
            ref[(1,)]=-0.265895560063
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.327456099693*x[0] + (0.0178968026489)*x[1]
            ref[(0, 0)]=0.172676451171
            arg[(0, 1)]=-0.935787562366*x[0] + (0.796726868812)*x[1]
            ref[(0, 1)]=-0.0695303467771
            arg[(1, 0)]=-0.939767311074*x[0] + (-0.232753586869)*x[1]
            ref[(1, 0)]=-0.586260448972
            arg[(1, 1)]=-0.619975244402*x[0] + (-0.737292809174)*x[1]
            ref[(1, 1)]=-0.678634026788
        else:
            arg[(0, 0)]=-0.941865503587*x[0] + (-0.231834838479)*x[1] + (-0.141643498796)*x[2]
            ref[(0, 0)]=-0.657671920431
            arg[(0, 1)]=-0.0575275063702*x[0] + (-0.521893812412)*x[1] + (0.542788984199)*x[2]
            ref[(0, 1)]=-0.0183161672916
            arg[(1, 0)]=-0.722692481768*x[0] + (0.872825034818)*x[1] + (-0.43299321897)*x[2]
            ref[(1, 0)]=-0.14143033296
            arg[(1, 1)]=-0.905377538878*x[0] + (-0.254317176104)*x[1] + (0.106147488566)*x[2]
            ref[(1, 1)]=-0.526773613208
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref=numpy.zeros((2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.390581143393*x[0] + (0.886888069058)*x[1]
            ref[(0, 0, 0)]=0.638734606225
            arg[(0, 0, 1)]=0.00265870219562*x[0] + (-0.251155808571)*x[1]
            ref[(0, 0, 1)]=-0.124248553187
            arg[(0, 1, 0)]=0.237457262468*x[0] + (0.0265040998055)*x[1]
            ref[(0, 1, 0)]=0.131980681137
            arg[(0, 1, 1)]=-0.703301208287*x[0] + (-0.438566244931)*x[1]
            ref[(0, 1, 1)]=-0.570933726609
            arg[(0, 2, 0)]=0.418301873444*x[0] + (0.767874798826)*x[1]
            ref[(0, 2, 0)]=0.593088336135
            arg[(0, 2, 1)]=-0.299862677454*x[0] + (0.1937101015)*x[1]
            ref[(0, 2, 1)]=-0.0530762879768
            arg[(0, 3, 0)]=-0.0931955857236*x[0] + (0.378040580327)*x[1]
            ref[(0, 3, 0)]=0.142422497302
            arg[(0, 3, 1)]=-0.558796496187*x[0] + (-0.352123264731)*x[1]
            ref[(0, 3, 1)]=-0.455459880459
            arg[(1, 0, 0)]=0.808532839682*x[0] + (-0.0659075547218)*x[1]
            ref[(1, 0, 0)]=0.37131264248
            arg[(1, 0, 1)]=-0.760819902621*x[0] + (0.231336936359)*x[1]
            ref[(1, 0, 1)]=-0.264741483131
            arg[(1, 1, 0)]=0.572948135952*x[0] + (0.560313348246)*x[1]
            ref[(1, 1, 0)]=0.566630742099
            arg[(1, 1, 1)]=0.851977802073*x[0] + (0.561102662306)*x[1]
            ref[(1, 1, 1)]=0.706540232189
            arg[(1, 2, 0)]=-0.114474620697*x[0] + (-0.734257679805)*x[1]
            ref[(1, 2, 0)]=-0.424366150251
            arg[(1, 2, 1)]=0.615939204541*x[0] + (0.394708742737)*x[1]
            ref[(1, 2, 1)]=0.505323973639
            arg[(1, 3, 0)]=0.457726082355*x[0] + (0.378769776598)*x[1]
            ref[(1, 3, 0)]=0.418247929476
            arg[(1, 3, 1)]=0.435397826433*x[0] + (0.386414067268)*x[1]
            ref[(1, 3, 1)]=0.41090594685
        else:
            arg[(0, 0, 0)]=0.236984923034*x[0] + (0.337018992726)*x[1] + (0.310673795478)*x[2]
            ref[(0, 0, 0)]=0.442338855619
            arg[(0, 0, 1)]=0.745245080505*x[0] + (0.893511089121)*x[1] + (-0.933425050295)*x[2]
            ref[(0, 0, 1)]=0.352665559665
            arg[(0, 1, 0)]=-0.976975648553*x[0] + (0.00302288480895)*x[1] + (-0.809708807982)*x[2]
            ref[(0, 1, 0)]=-0.891830785863
            arg[(0, 1, 1)]=-0.639922719431*x[0] + (-0.814867097607)*x[1] + (0.706919942197)*x[2]
            ref[(0, 1, 1)]=-0.37393493742
            arg[(0, 2, 0)]=-0.707097076153*x[0] + (0.43455100962)*x[1] + (-0.5798294508)*x[2]
            ref[(0, 2, 0)]=-0.426187758666
            arg[(0, 2, 1)]=-0.988113415607*x[0] + (0.660968525057)*x[1] + (-0.949141669549)*x[2]
            ref[(0, 2, 1)]=-0.63814328005
            arg[(0, 3, 0)]=0.13371810513*x[0] + (0.812607037722)*x[1] + (0.493828434172)*x[2]
            ref[(0, 3, 0)]=0.720076788512
            arg[(0, 3, 1)]=0.821957373417*x[0] + (0.389383629633)*x[1] + (-0.209682934673)*x[2]
            ref[(0, 3, 1)]=0.500829034189
            arg[(1, 0, 0)]=0.00137407784162*x[0] + (-0.096032549727)*x[1] + (0.746355107098)*x[2]
            ref[(1, 0, 0)]=0.325848317606
            arg[(1, 0, 1)]=-0.796971369702*x[0] + (-0.40690460664)*x[1] + (0.44684127525)*x[2]
            ref[(1, 0, 1)]=-0.378517350546
            arg[(1, 1, 0)]=-0.840048357539*x[0] + (0.724950054353)*x[1] + (-0.991951766255)*x[2]
            ref[(1, 1, 0)]=-0.553525034721
            arg[(1, 1, 1)]=-0.588882413981*x[0] + (0.759592325689)*x[1] + (0.955967345152)*x[2]
            ref[(1, 1, 1)]=0.56333862843
            arg[(1, 2, 0)]=0.622699486759*x[0] + (0.247932699812)*x[1] + (-0.771236236124)*x[2]
            ref[(1, 2, 0)]=0.0496979752234
            arg[(1, 2, 1)]=-0.634619642029*x[0] + (0.40357188319)*x[1] + (0.901861938635)*x[2]
            ref[(1, 2, 1)]=0.335407089898
            arg[(1, 3, 0)]=0.799592374115*x[0] + (-0.060101128464)*x[1] + (0.877693634705)*x[2]
            ref[(1, 3, 0)]=0.808592440178
            arg[(1, 3, 1)]=-0.545285674248*x[0] + (-0.748981891258)*x[1] + (-0.218685957423)*x[2]
            ref[(1, 3, 1)]=-0.756476761464
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4, 2),w)
        ref=numpy.zeros((3, 2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.475602522209*x[0] + (0.845288761661)*x[1]
            ref[(0, 0, 0, 0)]=0.184843119726
            arg[(0, 0, 0, 1)]=-0.989935003789*x[0] + (0.364630108605)*x[1]
            ref[(0, 0, 0, 1)]=-0.312652447592
            arg[(0, 0, 1, 0)]=0.42489270977*x[0] + (-0.379976153475)*x[1]
            ref[(0, 0, 1, 0)]=0.0224582781474
            arg[(0, 0, 1, 1)]=-0.0369797646293*x[0] + (-0.783221499796)*x[1]
            ref[(0, 0, 1, 1)]=-0.410100632212
            arg[(0, 0, 2, 0)]=-0.249869029694*x[0] + (0.966263636296)*x[1]
            ref[(0, 0, 2, 0)]=0.358197303301
            arg[(0, 0, 2, 1)]=0.53780533427*x[0] + (-0.781420057555)*x[1]
            ref[(0, 0, 2, 1)]=-0.121807361643
            arg[(0, 0, 3, 0)]=0.75016417355*x[0] + (-0.754047293236)*x[1]
            ref[(0, 0, 3, 0)]=-0.00194155984291
            arg[(0, 0, 3, 1)]=-0.82493212477*x[0] + (-0.475573177039)*x[1]
            ref[(0, 0, 3, 1)]=-0.650252650905
            arg[(0, 1, 0, 0)]=-0.185792974127*x[0] + (-0.487174482357)*x[1]
            ref[(0, 1, 0, 0)]=-0.336483728242
            arg[(0, 1, 0, 1)]=-0.00763841861383*x[0] + (-0.93604741145)*x[1]
            ref[(0, 1, 0, 1)]=-0.471842915032
            arg[(0, 1, 1, 0)]=0.153440319081*x[0] + (0.652064247744)*x[1]
            ref[(0, 1, 1, 0)]=0.402752283413
            arg[(0, 1, 1, 1)]=0.000623583934979*x[0] + (0.530674334215)*x[1]
            ref[(0, 1, 1, 1)]=0.265648959075
            arg[(0, 1, 2, 0)]=-0.863542718003*x[0] + (-0.71000274769)*x[1]
            ref[(0, 1, 2, 0)]=-0.786772732847
            arg[(0, 1, 2, 1)]=0.346041734298*x[0] + (0.726290424136)*x[1]
            ref[(0, 1, 2, 1)]=0.536166079217
            arg[(0, 1, 3, 0)]=0.999967875445*x[0] + (-0.214737003392)*x[1]
            ref[(0, 1, 3, 0)]=0.392615436026
            arg[(0, 1, 3, 1)]=-0.783787363386*x[0] + (-0.587571261493)*x[1]
            ref[(0, 1, 3, 1)]=-0.685679312439
            arg[(1, 0, 0, 0)]=-0.0694391874538*x[0] + (-0.451214398315)*x[1]
            ref[(1, 0, 0, 0)]=-0.260326792884
            arg[(1, 0, 0, 1)]=0.0191113110032*x[0] + (0.385949396662)*x[1]
            ref[(1, 0, 0, 1)]=0.202530353832
            arg[(1, 0, 1, 0)]=0.561403597122*x[0] + (0.656346822237)*x[1]
            ref[(1, 0, 1, 0)]=0.60887520968
            arg[(1, 0, 1, 1)]=0.894396143388*x[0] + (-0.0209099666967)*x[1]
            ref[(1, 0, 1, 1)]=0.436743088346
            arg[(1, 0, 2, 0)]=0.23818268722*x[0] + (0.125479127963)*x[1]
            ref[(1, 0, 2, 0)]=0.181830907592
            arg[(1, 0, 2, 1)]=-0.501879602032*x[0] + (0.367600044297)*x[1]
            ref[(1, 0, 2, 1)]=-0.0671397788674
            arg[(1, 0, 3, 0)]=0.564559770026*x[0] + (-0.179168103206)*x[1]
            ref[(1, 0, 3, 0)]=0.19269583341
            arg[(1, 0, 3, 1)]=-0.516159471441*x[0] + (-0.885340206106)*x[1]
            ref[(1, 0, 3, 1)]=-0.700749838773
            arg[(1, 1, 0, 0)]=0.228921774473*x[0] + (-0.587914170523)*x[1]
            ref[(1, 1, 0, 0)]=-0.179496198025
            arg[(1, 1, 0, 1)]=-0.0618189416099*x[0] + (-0.191528025136)*x[1]
            ref[(1, 1, 0, 1)]=-0.126673483373
            arg[(1, 1, 1, 0)]=-0.181208576679*x[0] + (0.847453201642)*x[1]
            ref[(1, 1, 1, 0)]=0.333122312481
            arg[(1, 1, 1, 1)]=0.346286700658*x[0] + (-0.455097021774)*x[1]
            ref[(1, 1, 1, 1)]=-0.0544051605579
            arg[(1, 1, 2, 0)]=0.659939562916*x[0] + (0.776357361266)*x[1]
            ref[(1, 1, 2, 0)]=0.718148462091
            arg[(1, 1, 2, 1)]=0.976244940557*x[0] + (0.0508838328416)*x[1]
            ref[(1, 1, 2, 1)]=0.513564386699
            arg[(1, 1, 3, 0)]=0.951437917672*x[0] + (-0.93519705586)*x[1]
            ref[(1, 1, 3, 0)]=0.00812043090565
            arg[(1, 1, 3, 1)]=-0.139322684504*x[0] + (-0.947451222511)*x[1]
            ref[(1, 1, 3, 1)]=-0.543386953507
            arg[(2, 0, 0, 0)]=-0.663112421937*x[0] + (-0.766491738961)*x[1]
            ref[(2, 0, 0, 0)]=-0.714802080449
            arg[(2, 0, 0, 1)]=-0.186884317294*x[0] + (0.705687686452)*x[1]
            ref[(2, 0, 0, 1)]=0.259401684579
            arg[(2, 0, 1, 0)]=0.613657935794*x[0] + (0.433497505501)*x[1]
            ref[(2, 0, 1, 0)]=0.523577720647
            arg[(2, 0, 1, 1)]=0.289370654115*x[0] + (0.266997507384)*x[1]
            ref[(2, 0, 1, 1)]=0.278184080749
            arg[(2, 0, 2, 0)]=0.714248658627*x[0] + (-0.251918100377)*x[1]
            ref[(2, 0, 2, 0)]=0.231165279125
            arg[(2, 0, 2, 1)]=-0.137157825848*x[0] + (-0.610696882974)*x[1]
            ref[(2, 0, 2, 1)]=-0.373927354411
            arg[(2, 0, 3, 0)]=-0.0569824600856*x[0] + (0.388761771078)*x[1]
            ref[(2, 0, 3, 0)]=0.165889655496
            arg[(2, 0, 3, 1)]=-0.269247309978*x[0] + (-0.0504883753909)*x[1]
            ref[(2, 0, 3, 1)]=-0.159867842685
            arg[(2, 1, 0, 0)]=-0.853146797588*x[0] + (0.0368713875229)*x[1]
            ref[(2, 1, 0, 0)]=-0.408137705032
            arg[(2, 1, 0, 1)]=0.934431282878*x[0] + (0.328512037396)*x[1]
            ref[(2, 1, 0, 1)]=0.631471660137
            arg[(2, 1, 1, 0)]=-0.335973213155*x[0] + (0.312496394863)*x[1]
            ref[(2, 1, 1, 0)]=-0.0117384091464
            arg[(2, 1, 1, 1)]=0.569053422919*x[0] + (0.390285059196)*x[1]
            ref[(2, 1, 1, 1)]=0.479669241057
            arg[(2, 1, 2, 0)]=0.287228101568*x[0] + (-0.388180374528)*x[1]
            ref[(2, 1, 2, 0)]=-0.05047613648
            arg[(2, 1, 2, 1)]=0.751030387909*x[0] + (-0.592803669544)*x[1]
            ref[(2, 1, 2, 1)]=0.0791133591823
            arg[(2, 1, 3, 0)]=-0.973736880086*x[0] + (0.500942931076)*x[1]
            ref[(2, 1, 3, 0)]=-0.236396974505
            arg[(2, 1, 3, 1)]=-0.90017138194*x[0] + (-0.502195363982)*x[1]
            ref[(2, 1, 3, 1)]=-0.701183372961
        else:
            arg[(0, 0, 0, 0)]=-0.775740521775*x[0] + (0.400395454995)*x[1] + (-0.610224715845)*x[2]
            ref[(0, 0, 0, 0)]=-0.492784891312
            arg[(0, 0, 0, 1)]=-0.945133901775*x[0] + (0.401052732806)*x[1] + (0.352903672368)*x[2]
            ref[(0, 0, 0, 1)]=-0.0955887483007
            arg[(0, 0, 1, 0)]=-0.128762166426*x[0] + (0.66153886742)*x[1] + (0.809758671908)*x[2]
            ref[(0, 0, 1, 0)]=0.671267686451
            arg[(0, 0, 1, 1)]=0.202066061584*x[0] + (0.0782445870631)*x[1] + (0.974447109307)*x[2]
            ref[(0, 0, 1, 1)]=0.627378878977
            arg[(0, 0, 2, 0)]=0.0360671329512*x[0] + (-0.153770934996)*x[1] + (-0.283790394859)*x[2]
            ref[(0, 0, 2, 0)]=-0.200747098452
            arg[(0, 0, 2, 1)]=-0.984467578939*x[0] + (-0.746851773838)*x[1] + (0.0545056575871)*x[2]
            ref[(0, 0, 2, 1)]=-0.838406847595
            arg[(0, 0, 3, 0)]=-0.85051188324*x[0] + (-0.127976618753)*x[1] + (0.807749257101)*x[2]
            ref[(0, 0, 3, 0)]=-0.0853696224463
            arg[(0, 0, 3, 1)]=0.898836926918*x[0] + (0.839394834223)*x[1] + (0.424258626561)*x[2]
            ref[(0, 0, 3, 1)]=1.08124519385
            arg[(0, 1, 0, 0)]=0.673539465769*x[0] + (-0.145546535984)*x[1] + (0.178182368681)*x[2]
            ref[(0, 1, 0, 0)]=0.353087649233
            arg[(0, 1, 0, 1)]=-0.304118253261*x[0] + (0.849460722762)*x[1] + (-0.098011327708)*x[2]
            ref[(0, 1, 0, 1)]=0.223665570896
            arg[(0, 1, 1, 0)]=0.29176409035*x[0] + (-0.886606945717)*x[1] + (0.0523716354258)*x[2]
            ref[(0, 1, 1, 0)]=-0.27123560997
            arg[(0, 1, 1, 1)]=-0.0456608865406*x[0] + (-0.0875263791757)*x[1] + (-0.724424304363)*x[2]
            ref[(0, 1, 1, 1)]=-0.42880578504
            arg[(0, 1, 2, 0)]=0.106773627607*x[0] + (0.979618263145)*x[1] + (-0.861724173018)*x[2]
            ref[(0, 1, 2, 0)]=0.112333858867
            arg[(0, 1, 2, 1)]=0.25856736906*x[0] + (0.0383670618559)*x[1] + (0.115803687776)*x[2]
            ref[(0, 1, 2, 1)]=0.206369059346
            arg[(0, 1, 3, 0)]=0.771646090178*x[0] + (-0.868179956718)*x[1] + (-0.192111354634)*x[2]
            ref[(0, 1, 3, 0)]=-0.144322610587
            arg[(0, 1, 3, 1)]=0.0962499799063*x[0] + (-0.595076773029)*x[1] + (0.369417890023)*x[2]
            ref[(0, 1, 3, 1)]=-0.0647044515499
            arg[(1, 0, 0, 0)]=-0.539675434002*x[0] + (0.956621071483)*x[1] + (-0.181352205951)*x[2]
            ref[(1, 0, 0, 0)]=0.117796715765
            arg[(1, 0, 0, 1)]=0.884727154211*x[0] + (-0.413862572312)*x[1] + (-0.83812593786)*x[2]
            ref[(1, 0, 0, 1)]=-0.18363067798
            arg[(1, 0, 1, 0)]=0.412337024252*x[0] + (-0.276352122545)*x[1] + (0.45997799773)*x[2]
            ref[(1, 0, 1, 0)]=0.297981449718
            arg[(1, 0, 1, 1)]=-0.538267403337*x[0] + (-0.57842934852)*x[1] + (-0.472809170894)*x[2]
            ref[(1, 0, 1, 1)]=-0.794752961375
            arg[(1, 0, 2, 0)]=-0.366480847907*x[0] + (0.233416813982)*x[1] + (0.819449024725)*x[2]
            ref[(1, 0, 2, 0)]=0.3431924954
            arg[(1, 0, 2, 1)]=-0.71007834862*x[0] + (0.539939943791)*x[1] + (-0.723884303406)*x[2]
            ref[(1, 0, 2, 1)]=-0.447011354118
            arg[(1, 0, 3, 0)]=-0.670351737581*x[0] + (0.156461400986)*x[1] + (0.243694074221)*x[2]
            ref[(1, 0, 3, 0)]=-0.135098131187
            arg[(1, 0, 3, 1)]=0.220326430125*x[0] + (-0.702859490678)*x[1] + (-0.942847326543)*x[2]
            ref[(1, 0, 3, 1)]=-0.712690193548
            arg[(1, 1, 0, 0)]=0.565172412646*x[0] + (0.951155417008)*x[1] + (-0.332035106338)*x[2]
            ref[(1, 1, 0, 0)]=0.592146361658
            arg[(1, 1, 0, 1)]=0.660613952777*x[0] + (0.723444991813)*x[1] + (-0.0750451864986)*x[2]
            ref[(1, 1, 0, 1)]=0.654506879045
            arg[(1, 1, 1, 0)]=-0.53306851886*x[0] + (-0.187009066293)*x[1] + (0.213974376574)*x[2]
            ref[(1, 1, 1, 0)]=-0.253051604289
            arg[(1, 1, 1, 1)]=-0.100088545215*x[0] + (0.611441732552)*x[1] + (0.750419890376)*x[2]
            ref[(1, 1, 1, 1)]=0.630886538856
            arg[(1, 1, 2, 0)]=-0.935166038821*x[0] + (0.455740548631)*x[1] + (0.0878436798129)*x[2]
            ref[(1, 1, 2, 0)]=-0.195790905188
            arg[(1, 1, 2, 1)]=0.959638102417*x[0] + (0.14076450298)*x[1] + (-0.984597050407)*x[2]
            ref[(1, 1, 2, 1)]=0.0579027774947
            arg[(1, 1, 3, 0)]=0.703324879728*x[0] + (0.753998525802)*x[1] + (-0.712876156522)*x[2]
            ref[(1, 1, 3, 0)]=0.372223624504
            arg[(1, 1, 3, 1)]=-0.0400717227754*x[0] + (-0.826541703846)*x[1] + (-0.174329027985)*x[2]
            ref[(1, 1, 3, 1)]=-0.520471227303
            arg[(2, 0, 0, 0)]=0.0583232201108*x[0] + (0.422354104491)*x[1] + (0.861672732078)*x[2]
            ref[(2, 0, 0, 0)]=0.67117502834
            arg[(2, 0, 0, 1)]=-0.248493496746*x[0] + (0.0977888414427)*x[1] + (-0.971245819946)*x[2]
            ref[(2, 0, 0, 1)]=-0.560975237625
            arg[(2, 0, 1, 0)]=-0.320766657755*x[0] + (0.850962092443)*x[1] + (0.983393226637)*x[2]
            ref[(2, 0, 1, 0)]=0.756794330663
            arg[(2, 0, 1, 1)]=-0.10655899495*x[0] + (0.663661320409)*x[1] + (-0.365125966681)*x[2]
            ref[(2, 0, 1, 1)]=0.0959881793892
            arg[(2, 0, 2, 0)]=0.795673122294*x[0] + (-0.093678284197)*x[1] + (-0.950546559871)*x[2]
            ref[(2, 0, 2, 0)]=-0.124275860887
            arg[(2, 0, 2, 1)]=-0.418857805668*x[0] + (0.279009594319)*x[1] + (-0.997381004971)*x[2]
            ref[(2, 0, 2, 1)]=-0.56861460816
            arg[(2, 0, 3, 0)]=0.461041539343*x[0] + (-0.576150490609)*x[1] + (-0.931660964924)*x[2]
            ref[(2, 0, 3, 0)]=-0.523384958095
            arg[(2, 0, 3, 1)]=-0.636487453858*x[0] + (0.639548009246)*x[1] + (0.0820738442179)*x[2]
            ref[(2, 0, 3, 1)]=0.0425671998032
            arg[(2, 1, 0, 0)]=-0.542833140431*x[0] + (-0.165847726664)*x[1] + (0.0228080017635)*x[2]
            ref[(2, 1, 0, 0)]=-0.342936432666
            arg[(2, 1, 0, 1)]=-0.805082714996*x[0] + (0.522589273668)*x[1] + (-0.0706728913133)*x[2]
            ref[(2, 1, 0, 1)]=-0.176583166321
            arg[(2, 1, 1, 0)]=0.0939562785087*x[0] + (0.4247771457)*x[1] + (-0.727070071481)*x[2]
            ref[(2, 1, 1, 0)]=-0.104168323636
            arg[(2, 1, 1, 1)]=0.146493707534*x[0] + (-0.631160327078)*x[1] + (-0.646744276159)*x[2]
            ref[(2, 1, 1, 1)]=-0.565705447852
            arg[(2, 1, 2, 0)]=0.465155443877*x[0] + (0.876308432882)*x[1] + (-0.0379026033344)*x[2]
            ref[(2, 1, 2, 0)]=0.651780636712
            arg[(2, 1, 2, 1)]=-0.834413058079*x[0] + (0.555543460946)*x[1] + (0.160143121893)*x[2]
            ref[(2, 1, 2, 1)]=-0.0593632376199
            arg[(2, 1, 3, 0)]=-0.496873630402*x[0] + (-0.819516417535)*x[1] + (0.144539187442)*x[2]
            ref[(2, 1, 3, 0)]=-0.585925430248
            arg[(2, 1, 3, 1)]=-0.121956183057*x[0] + (-0.555105998999)*x[1] + (0.945881113748)*x[2]
            ref[(2, 1, 3, 1)]=0.134409465846
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.0474821417795*x[0]**o + (-0.410709377378)*x[0] + (-0.000713288210616)*x[1]**o + (0.264125000116)*x[1]
            ref=-0.0499077618465-(0.00779480892815)*(o-1.)
        else:
            arg=0.2529482573*x[0]**o + (0.831545698651)*x[0] + (-0.215202789356)*x[1]**o + (-0.707185237206)*x[1] + (-0.814064900051)*x[2]**o + (0.664162121746)*x[2]
            ref=0.00610157554205-(-0.129386572018)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.603394138085*x[0]**o + (-0.0872302918895)*x[0] + (-0.739919258184)*x[1]**o + (0.683292592944)*x[1]
            ref[(0,)]=-0.373625547607-(-0.223885566045)*(o-1.)
            arg[(1,)]=0.948325217082*x[0]**o + (0.344909963878)*x[0] + (-0.343990898987)*x[1]**o + (0.703949537837)*x[1]
            ref[(1,)]=0.826596909905-(0.100722386349)*(o-1.)
            arg[(2,)]=-0.854262591768*x[0]**o + (0.875277980032)*x[0] + (-0.00606278390583)*x[1]**o + (0.21208926402)*x[1]
            ref[(2,)]=0.113520934189-(-0.143387562612)*(o-1.)
        else:
            arg[(0,)]=-0.953403790657*x[0]**o + (-0.623070678041)*x[0] + (0.23273626626)*x[1]**o + (0.791845328993)*x[1] + (-0.0840599379587)*x[2]**o + (0.157134230959)*x[2]
            ref[(0,)]=-0.239409290222-(-0.134121243726)*(o-1.)
            arg[(1,)]=0.442781746109*x[0]**o + (0.290016794346)*x[0] + (-0.578274462224)*x[1]**o + (-0.919597134075)*x[1] + (0.0206902473173)*x[2]**o + (0.465636972882)*x[2]
            ref[(1,)]=-0.139372917823-(-0.0191337447997)*(o-1.)
            arg[(2,)]=-0.322058325416*x[0]**o + (0.157135553252)*x[0] + (0.307601593472)*x[1]**o + (0.477699411836)*x[1] + (-0.89396054474)*x[2]**o + (-0.726502902147)*x[2]
            ref[(2,)]=-0.500042606872-(-0.151402879447)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.399362563051*x[0]**o + (-0.233679961442)*x[0] + (0.358303747609)*x[1]**o + (-0.04844072492)*x[1]
            ref[(0, 0)]=-0.161589750902-(-0.00684313590696)*(o-1.)
            arg[(0, 1)]=-0.0793604117485*x[0]**o + (-0.275978671916)*x[0] + (0.849010126078)*x[1]**o + (0.993289452281)*x[1]
            ref[(0, 1)]=0.743480247347-(0.128274952388)*(o-1.)
            arg[(0, 2)]=-0.166213291467*x[0]**o + (0.512612584714)*x[0] + (0.574205401257)*x[1]**o + (-0.462087740875)*x[1]
            ref[(0, 2)]=0.229258476815-(0.0679986849649)*(o-1.)
            arg[(0, 3)]=-0.200559893761*x[0]**o + (-0.99764633923)*x[0] + (-0.677692235258)*x[1]**o + (0.271770919383)*x[1]
            ref[(0, 3)]=-0.802063774432-(-0.146375354836)*(o-1.)
            arg[(1, 0)]=-0.518306520055*x[0]**o + (-0.981084610077)*x[0] + (0.450959655642)*x[1]**o + (0.424775306866)*x[1]
            ref[(1, 0)]=-0.311828083812-(-0.0112244774021)*(o-1.)
            arg[(1, 1)]=0.847072687852*x[0]**o + (-0.365082605253)*x[0] + (0.829208526881)*x[1]**o + (-0.277252728394)*x[1]
            ref[(1, 1)]=0.516972940542-(0.279380202455)*(o-1.)
            arg[(1, 2)]=0.493718571123*x[0]**o + (0.988514060847)*x[0] + (-0.965535366503)*x[1]**o + (0.219709454388)*x[1]
            ref[(1, 2)]=0.368203359927-(-0.0786361325634)*(o-1.)
            arg[(1, 3)]=0.579173421522*x[0]**o + (0.602161159099)*x[0] + (0.304708717739)*x[1]**o + (0.377324107994)*x[1]
            ref[(1, 3)]=0.931683703177-(0.147313689877)*(o-1.)
        else:
            arg[(0, 0)]=-0.0041423195728*x[0]**o + (0.907340027017)*x[0] + (-0.177834808585)*x[1]**o + (-0.343229970691)*x[1] + (-0.551863018214)*x[2]**o + (0.467990281328)*x[2]
            ref[(0, 0)]=0.149130095642-(-0.122306691062)*(o-1.)
            arg[(0, 1)]=0.662433429516*x[0]**o + (-0.0481709641341)*x[0] + (0.557461289394)*x[1]**o + (0.376776372566)*x[1] + (0.588160893677)*x[2]**o + (-0.206385945016)*x[2]
            ref[(0, 1)]=0.965137538002-(0.301342602098)*(o-1.)
            arg[(0, 2)]=0.592292710622*x[0]**o + (-0.775024248715)*x[0] + (0.202421749572)*x[1]**o + (-0.832241256627)*x[1] + (-0.842410701165)*x[2]**o + (0.443034699157)*x[2]
            ref[(0, 2)]=-0.605963523578-(-0.00794937349509)*(o-1.)
            arg[(0, 3)]=-0.477756277924*x[0]**o + (0.0826969738662)*x[0] + (0.0903315111562)*x[1]**o + (-0.314905151858)*x[1] + (-0.269730959581)*x[2]**o + (-0.263823093119)*x[2]
            ref[(0, 3)]=-0.57659349873-(-0.109525954392)*(o-1.)
            arg[(1, 0)]=-0.541991794479*x[0]**o + (0.473762527852)*x[0] + (0.790418645906)*x[1]**o + (-0.551625144558)*x[1] + (0.847815630896)*x[2]**o + (0.344921008034)*x[2]
            ref[(1, 0)]=0.681650436826-(0.182707080387)*(o-1.)
            arg[(1, 1)]=-0.946853704818*x[0]**o + (-0.673470221682)*x[0] + (0.892422649183)*x[1]**o + (-0.69248036237)*x[1] + (0.962983424683)*x[2]**o + (-0.89453557866)*x[2]
            ref[(1, 1)]=-0.675966896832-(0.151425394841)*(o-1.)
            arg[(1, 2)]=-0.638251034967*x[0]**o + (-0.40763572363)*x[0] + (0.327292303599)*x[1]**o + (0.646702679906)*x[1] + (0.278326739837)*x[2]**o + (-0.137928251211)*x[2]
            ref[(1, 2)]=0.0342533567671-(-0.00543866525516)*(o-1.)
            arg[(1, 3)]=0.601861105317*x[0]**o + (0.823230891271)*x[0] + (-0.447580726264)*x[1]**o + (-0.217265802111)*x[1] + (-0.927418608356)*x[2]**o + (-0.652059191214)*x[2]
            ref[(1, 3)]=-0.409616165678-(-0.12885637155)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2),w)
        ref=numpy.zeros((2, 2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.429640329262*x[0]**o + (-0.407357250243)*x[0] + (-0.315522987315)*x[1]**o + (0.990128691307)*x[1]
            ref[(0, 0, 0)]=-0.0811959377561-(-0.124193886096)*(o-1.)
            arg[(0, 0, 1)]=-0.412343728334*x[0]**o + (0.149420494988)*x[0] + (0.651675204757)*x[1]**o + (0.353725931395)*x[1]
            ref[(0, 0, 1)]=0.371238951403-(0.0398885794039)*(o-1.)
            arg[(0, 1, 0)]=-0.433228280458*x[0]**o + (-0.0836879561213)*x[0] + (0.660324317373)*x[1]**o + (0.553898283075)*x[1]
            ref[(0, 1, 0)]=0.348653181934-(0.0378493394857)*(o-1.)
            arg[(0, 1, 1)]=-0.020707123478*x[0]**o + (0.921863140569)*x[0] + (-0.3628939308)*x[1]**o + (-0.0436504226127)*x[1]
            ref[(0, 1, 1)]=0.247305831839-(-0.0639335090464)*(o-1.)
            arg[(1, 0, 0)]=-0.837953702309*x[0]**o + (-0.291518122878)*x[0] + (0.331754590932)*x[1]**o + (-0.53657078047)*x[1]
            ref[(1, 0, 0)]=-0.667144007362-(-0.0843665185628)*(o-1.)
            arg[(1, 0, 1)]=0.469738504005*x[0]**o + (0.370719879046)*x[0] + (-0.84242062069)*x[1]**o + (0.255026675907)*x[1]
            ref[(1, 0, 1)]=0.126532219134-(-0.0621136861141)*(o-1.)
            arg[(1, 1, 0)]=-0.414519631637*x[0]**o + (-0.047100667087)*x[0] + (0.810404199734)*x[1]**o + (-0.931796556151)*x[1]
            ref[(1, 1, 0)]=-0.29150632757-(0.0659807613495)*(o-1.)
            arg[(1, 1, 1)]=-0.613996619464*x[0]**o + (0.621972054963)*x[0] + (-0.122877044609)*x[1]**o + (-0.84342937857)*x[1]
            ref[(1, 1, 1)]=-0.47916549384-(-0.122812277346)*(o-1.)
        else:
            arg[(0, 0, 0)]=0.773044117518*x[0]**o + (-0.0952692691821)*x[0] + (0.0811597086763)*x[1]**o + (0.361176221764)*x[1] + (-0.910190861793)*x[2]**o + (-0.392515953835)*x[2]
            ref[(0, 0, 0)]=-0.0912980184257-(-0.00933117259966)*(o-1.)
            arg[(0, 0, 1)]=-0.908954144036*x[0]**o + (-0.741401643684)*x[0] + (-0.168366860211)*x[1]**o + (-0.155643787211)*x[1] + (-0.790528601252)*x[2]**o + (0.0817069135799)*x[2]
            ref[(0, 0, 1)]=-1.34159406141-(-0.311308267583)*(o-1.)
            arg[(0, 1, 0)]=-0.368840763578*x[0]**o + (-0.337715358522)*x[0] + (0.056297888936)*x[1]**o + (0.0183325232529)*x[1] + (-0.0340085730064)*x[2]**o + (-0.457917542576)*x[2]
            ref[(0, 1, 0)]=-0.561925912746-(-0.057758574608)*(o-1.)
            arg[(0, 1, 1)]=0.245929378535*x[0]**o + (0.637395038923)*x[0] + (0.808301675247)*x[1]**o + (0.653661451422)*x[1] + (0.261332622993)*x[2]**o + (-0.8126384875)*x[2]
            ref[(0, 1, 1)]=0.896990839809-(0.219260612796)*(o-1.)
            arg[(1, 0, 0)]=0.912898926613*x[0]**o + (-0.479030988429)*x[0] + (0.504119506966)*x[1]**o + (0.839617178687)*x[1] + (-0.341552255898)*x[2]**o + (0.657653098164)*x[2]
            ref[(1, 0, 0)]=1.04685273305-(0.179244362947)*(o-1.)
            arg[(1, 0, 1)]=0.0705455278078*x[0]**o + (-0.493333174495)*x[0] + (-0.355357211766)*x[1]**o + (0.329233336598)*x[1] + (-0.364605831029)*x[2]**o + (-0.175846487215)*x[2]
            ref[(1, 0, 1)]=-0.49468192005-(-0.108236252498)*(o-1.)
            arg[(1, 1, 0)]=-0.220167475124*x[0]**o + (-0.338018733342)*x[0] + (0.176550943631)*x[1]**o + (0.574799118437)*x[1] + (-0.602649099031)*x[2]**o + (-0.369495918007)*x[2]
            ref[(1, 1, 0)]=-0.389490581718-(-0.107710938421)*(o-1.)
            arg[(1, 1, 1)]=0.297714635939*x[0]**o + (0.236366638905)*x[0] + (-0.63429841349)*x[1]**o + (0.743601496594)*x[1] + (0.428164585851)*x[2]**o + (-0.502487413607)*x[2]
            ref[(1, 1, 1)]=0.284530765096-(0.01526346805)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunction_fromData_ReducedFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunction

        assumptions: ReducedFunction(self.domain) exists
                     self.domain supports integral on ReducedFunction
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunction(self.domain)
        w = ReducedFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4, 4),w)
        ref=numpy.zeros((3, 3, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.822211316471*x[0]**o + (-0.666758753936)*x[0] + (0.915517394147)*x[1]**o + (-0.250196717285)*x[1]
            ref[(0, 0, 0, 0)]=0.410386619698-(0.28962145177)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.941115060833*x[0]**o + (-0.54510062585)*x[0] + (0.477313691935)*x[1]**o + (-0.853567863337)*x[1]
            ref[(0, 0, 0, 1)]=-0.931234929042-(-0.0773002281496)*(o-1.)
            arg[(0, 0, 0, 2)]=0.28483691094*x[0]**o + (0.0861092726942)*x[0] + (0.618863145577)*x[1]**o + (0.506809356396)*x[1]
            ref[(0, 0, 0, 2)]=0.748309342804-(0.150616676086)*(o-1.)
            arg[(0, 0, 0, 3)]=-0.916221504667*x[0]**o + (0.644722678057)*x[0] + (-0.722477892792)*x[1]**o + (0.0156570362455)*x[1]
            ref[(0, 0, 0, 3)]=-0.489159841578-(-0.273116566243)*(o-1.)
            arg[(0, 0, 1, 0)]=-0.00175139309027*x[0]**o + (0.71049168855)*x[0] + (0.0845947434504)*x[1]**o + (0.583723480115)*x[1]
            ref[(0, 0, 1, 0)]=0.688529259513-(0.01380722506)*(o-1.)
            arg[(0, 0, 1, 1)]=-0.199319764967*x[0]**o + (-0.424906973142)*x[0] + (0.830641441238)*x[1]**o + (0.391780142158)*x[1]
            ref[(0, 0, 1, 1)]=0.299097422643-(0.105220279379)*(o-1.)
            arg[(0, 0, 1, 2)]=-0.633459371915*x[0]**o + (-0.303316451381)*x[0] + (-0.842389550459)*x[1]**o + (0.594489629447)*x[1]
            ref[(0, 0, 1, 2)]=-0.592337872154-(-0.245974820396)*(o-1.)
            arg[(0, 0, 1, 3)]=0.0423572728242*x[0]**o + (0.296687287188)*x[0] + (0.204747795787)*x[1]**o + (-0.274587680927)*x[1]
            ref[(0, 0, 1, 3)]=0.134602337436-(0.0411841781018)*(o-1.)
            arg[(0, 0, 2, 0)]=-0.614771576467*x[0]**o + (-0.0401857640826)*x[0] + (0.7271362389)*x[1]**o + (-0.0889909176461)*x[1]
            ref[(0, 0, 2, 0)]=-0.00840600964757-(0.0187274437389)*(o-1.)
            arg[(0, 0, 2, 1)]=-0.462266231461*x[0]**o + (0.601641620815)*x[0] + (0.0983725496542)*x[1]**o + (0.146614073072)*x[1]
            ref[(0, 0, 2, 1)]=0.19218100604-(-0.0606489469678)*(o-1.)
            arg[(0, 0, 2, 2)]=0.444718330041*x[0]**o + (-0.907343055731)*x[0] + (0.802728255647)*x[1]**o + (-0.948270085288)*x[1]
            ref[(0, 0, 2, 2)]=-0.304083277665-(0.207907764281)*(o-1.)
            arg[(0, 0, 2, 3)]=-0.328989744027*x[0]**o + (-0.88048713154)*x[0] + (0.155368072724)*x[1]**o + (-0.0728512448157)*x[1]
            ref[(0, 0, 2, 3)]=-0.563480023829-(-0.028936945217)*(o-1.)
            arg[(0, 0, 3, 0)]=0.717128316095*x[0]**o + (-0.831946540504)*x[0] + (0.960149008968)*x[1]**o + (-0.764753132965)*x[1]
            ref[(0, 0, 3, 0)]=0.0402888257972-(0.279546220844)*(o-1.)
            arg[(0, 0, 3, 1)]=0.788916137455*x[0]**o + (-0.793018756988)*x[0] + (-0.920879969581)*x[1]**o + (0.935366431328)*x[1]
            ref[(0, 0, 3, 1)]=0.00519192110692-(-0.0219939720209)*(o-1.)
            arg[(0, 0, 3, 2)]=0.820631265983*x[0]**o + (0.562193080559)*x[0] + (-0.720832284668)*x[1]**o + (0.0477501748751)*x[1]
            ref[(0, 0, 3, 2)]=0.354871118374-(0.0166331635524)*(o-1.)
            arg[(0, 0, 3, 3)]=-0.632329841007*x[0]**o + (-0.00126529624256)*x[0] + (0.106149230933)*x[1]**o + (-0.937313195007)*x[1]
            ref[(0, 0, 3, 3)]=-0.732379550662-(-0.0876967683457)*(o-1.)
            arg[(0, 1, 0, 0)]=0.877825363581*x[0]**o + (-0.655618373244)*x[0] + (-0.356010229799)*x[1]**o + (-0.614438163052)*x[1]
            ref[(0, 1, 0, 0)]=-0.374120701257-(0.0869691889636)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.821404878095*x[0]**o + (-0.447465443232)*x[0] + (0.976304456957)*x[1]**o + (-0.441279121088)*x[1]
            ref[(0, 1, 0, 1)]=-0.366922492729-(0.025816596477)*(o-1.)
            arg[(0, 1, 0, 2)]=0.768508121613*x[0]**o + (-0.834126600636)*x[0] + (0.556605765238)*x[1]**o + (-0.228892447757)*x[1]
            ref[(0, 1, 0, 2)]=0.13104741923-(0.220852314475)*(o-1.)
            arg[(0, 1, 0, 3)]=0.82626596887*x[0]**o + (0.755923872317)*x[0] + (-0.596491119163)*x[1]**o + (-0.221866123527)*x[1]
            ref[(0, 1, 0, 3)]=0.381916299249-(0.0382958082845)*(o-1.)
            arg[(0, 1, 1, 0)]=0.541907837447*x[0]**o + (-0.762351091603)*x[0] + (-0.775628437025)*x[1]**o + (0.121746742994)*x[1]
            ref[(0, 1, 1, 0)]=-0.437162474094-(-0.0389534332631)*(o-1.)
            arg[(0, 1, 1, 1)]=0.36130148752*x[0]**o + (0.941966111328)*x[0] + (-0.848795897587)*x[1]**o + (-0.719123921406)*x[1]
            ref[(0, 1, 1, 1)]=-0.132326110073-(-0.0812490683446)*(o-1.)
            arg[(0, 1, 1, 2)]=-0.159218374136*x[0]**o + (-0.774798098552)*x[0] + (-0.166030154228)*x[1]**o + (-0.806298382427)*x[1]
            ref[(0, 1, 1, 2)]=-0.953172504672-(-0.0542080880607)*(o-1.)
            arg[(0, 1, 1, 3)]=0.557559414133*x[0]**o + (0.971532046698)*x[0] + (-0.406961513762)*x[1]**o + (-0.334301615142)*x[1]
            ref[(0, 1, 1, 3)]=0.393914165964-(0.0250996500619)*(o-1.)
            arg[(0, 1, 2, 0)]=0.164906308706*x[0]**o + (0.613098268828)*x[0] + (0.244960385879)*x[1]**o + (0.300743760835)*x[1]
            ref[(0, 1, 2, 0)]=0.661854362124-(0.0683111157642)*(o-1.)
            arg[(0, 1, 2, 1)]=0.373267986326*x[0]**o + (-0.215045164426)*x[0] + (0.525769362198)*x[1]**o + (-0.278570531574)*x[1]
            ref[(0, 1, 2, 1)]=0.202710826262-(0.149839558087)*(o-1.)
            arg[(0, 1, 2, 2)]=-0.97681575916*x[0]**o + (0.753520523704)*x[0] + (-0.720183391336)*x[1]**o + (-0.844307541487)*x[1]
            ref[(0, 1, 2, 2)]=-0.89389308414-(-0.282833191749)*(o-1.)
            arg[(0, 1, 2, 3)]=-0.987693310182*x[0]**o + (0.416922255481)*x[0] + (0.0604419898806)*x[1]**o + (0.25430485378)*x[1]
            ref[(0, 1, 2, 3)]=-0.12801210552-(-0.154541886717)*(o-1.)
            arg[(0, 1, 3, 0)]=0.233303200667*x[0]**o + (0.45179664754)*x[0] + (0.257627578632)*x[1]**o + (0.796467710259)*x[1]
            ref[(0, 1, 3, 0)]=0.869597568549-(0.0818217965499)*(o-1.)
            arg[(0, 1, 3, 1)]=0.61885387195*x[0]**o + (0.506437248799)*x[0] + (-0.709558546856)*x[1]**o + (0.691711729135)*x[1]
            ref[(0, 1, 3, 1)]=0.553722151514-(-0.0151174458176)*(o-1.)
            arg[(0, 1, 3, 2)]=-0.201816479862*x[0]**o + (0.651933188205)*x[0] + (-0.0265792357481)*x[1]**o + (0.591440857524)*x[1]
            ref[(0, 1, 3, 2)]=0.507489165059-(-0.0380659526017)*(o-1.)
            arg[(0, 1, 3, 3)]=0.970110338144*x[0]**o + (-0.5397965973)*x[0] + (-0.302990353449)*x[1]**o + (0.432395043473)*x[1]
            ref[(0, 1, 3, 3)]=0.279859215434-(0.111186664116)*(o-1.)
            arg[(0, 2, 0, 0)]=0.852843119611*x[0]**o + (-0.539695647624)*x[0] + (-0.358129981616)*x[1]**o + (0.485138955662)*x[1]
            ref[(0, 2, 0, 0)]=0.220078223016-(0.0824521896658)*(o-1.)
            arg[(0, 2, 0, 1)]=-0.325151330436*x[0]**o + (0.168643868341)*x[0] + (0.505570005394)*x[1]**o + (-0.592279725094)*x[1]
            ref[(0, 2, 0, 1)]=-0.121608590897-(0.0300697791597)*(o-1.)
            arg[(0, 2, 0, 2)]=-0.208334910846*x[0]**o + (0.831631904398)*x[0] + (-0.360946158623)*x[1]**o + (0.517231112432)*x[1]
            ref[(0, 2, 0, 2)]=0.38979097368-(-0.0948801782449)*(o-1.)
            arg[(0, 2, 0, 3)]=-0.679057233094*x[0]**o + (-0.245763794897)*x[0] + (0.746373224915)*x[1]**o + (-0.452529343926)*x[1]
            ref[(0, 2, 0, 3)]=-0.315488573501-(0.0112193319701)*(o-1.)
            arg[(0, 2, 1, 0)]=-0.273905351374*x[0]**o + (0.0494347877106)*x[0] + (0.968226772539)*x[1]**o + (-0.0850002395327)*x[1]
            ref[(0, 2, 1, 0)]=0.329377984671-(0.115720236861)*(o-1.)
            arg[(0, 2, 1, 1)]=-0.644194172596*x[0]**o + (0.113867050136)*x[0] + (-0.727985111763)*x[1]**o + (-0.586565390199)*x[1]
            ref[(0, 2, 1, 1)]=-0.922438812211-(-0.228696547393)*(o-1.)
            arg[(0, 2, 1, 2)]=-0.445068125474*x[0]**o + (0.594631962952)*x[0] + (0.779713086762)*x[1]**o + (-0.471639331079)*x[1]
            ref[(0, 2, 1, 2)]=0.228818796581-(0.0557741602147)*(o-1.)
            arg[(0, 2, 1, 3)]=-0.176620123755*x[0]**o + (0.461069886013)*x[0] + (-0.828648495811)*x[1]**o + (0.540588880226)*x[1]
            ref[(0, 2, 1, 3)]=-0.00180492666326-(-0.167544769928)*(o-1.)
            arg[(0, 2, 2, 0)]=-0.430999946429*x[0]**o + (-0.430061283764)*x[0] + (0.310998841218)*x[1]**o + (0.106221545262)*x[1]
            ref[(0, 2, 2, 0)]=-0.221920421857-(-0.020000184202)*(o-1.)
            arg[(0, 2, 2, 1)]=-0.978845866295*x[0]**o + (0.762373161787)*x[0] + (0.673221214164)*x[1]**o + (0.59580160175)*x[1]
            ref[(0, 2, 2, 1)]=0.526275055703-(-0.0509374420219)*(o-1.)
            arg[(0, 2, 2, 2)]=-0.225401641632*x[0]**o + (-0.259987399158)*x[0] + (-0.125875682598)*x[1]**o + (0.945744799955)*x[1]
            ref[(0, 2, 2, 2)]=0.167240038283-(-0.0585462207051)*(o-1.)
            arg[(0, 2, 2, 3)]=0.243083559748*x[0]**o + (0.529656703385)*x[0] + (-0.901224405948)*x[1]**o + (-0.0215598903936)*x[1]
            ref[(0, 2, 2, 3)]=-0.0750220166041-(-0.109690141033)*(o-1.)
            arg[(0, 2, 3, 0)]=-0.391100496177*x[0]**o + (-0.0446714174412)*x[0] + (0.300949415807)*x[1]**o + (0.763843310501)*x[1]
            ref[(0, 2, 3, 0)]=0.314510406345-(-0.0150251800617)*(o-1.)
            arg[(0, 2, 3, 1)]=-0.532044740756*x[0]**o + (0.189203848501)*x[0] + (0.14044888121)*x[1]**o + (0.461304546277)*x[1]
            ref[(0, 2, 3, 1)]=0.129456267616-(-0.0652659765911)*(o-1.)
            arg[(0, 2, 3, 2)]=-0.844783534795*x[0]**o + (-0.079830565529)*x[0] + (0.317475695107)*x[1]**o + (-0.347611426715)*x[1]
            ref[(0, 2, 3, 2)]=-0.477374915966-(-0.087884639948)*(o-1.)
            arg[(0, 2, 3, 3)]=-0.46620280463*x[0]**o + (-0.310142859878)*x[0] + (-0.463647532293)*x[1]**o + (0.610848904317)*x[1]
            ref[(0, 2, 3, 3)]=-0.314572146242-(-0.154975056154)*(o-1.)
            arg[(1, 0, 0, 0)]=0.808193482986*x[0]**o + (-0.0475750571437)*x[0] + (-0.505663851658)*x[1]**o + (-0.612280605237)*x[1]
            ref[(1, 0, 0, 0)]=-0.178663015526-(0.0504216052213)*(o-1.)
            arg[(1, 0, 0, 1)]=-0.337896865693*x[0]**o + (-0.351035118827)*x[0] + (-0.225590420886)*x[1]**o + (0.385028427873)*x[1]
            ref[(1, 0, 0, 1)]=-0.264746988766-(-0.0939145477632)*(o-1.)
            arg[(1, 0, 0, 2)]=-0.666292525385*x[0]**o + (0.833685665451)*x[0] + (0.447192185984)*x[1]**o + (-0.16892345416)*x[1]
            ref[(1, 0, 0, 2)]=0.222830935945-(-0.0365167232335)*(o-1.)
            arg[(1, 0, 0, 3)]=0.525759657067*x[0]**o + (-0.991397990929)*x[0] + (0.953313006688)*x[1]**o + (0.987105179969)*x[1]
            ref[(1, 0, 0, 3)]=0.737389926398-(0.246512110626)*(o-1.)
            arg[(1, 0, 1, 0)]=-0.149528714549*x[0]**o + (-0.37907997444)*x[0] + (0.36966314901)*x[1]**o + (-0.419675830507)*x[1]
            ref[(1, 0, 1, 0)]=-0.289310685243-(0.0366890724101)*(o-1.)
            arg[(1, 0, 1, 1)]=0.715349703553*x[0]**o + (-0.284425024433)*x[0] + (0.671621323232)*x[1]**o + (0.873213827381)*x[1]
            ref[(1, 0, 1, 1)]=0.987879914867-(0.231161837798)*(o-1.)
            arg[(1, 0, 1, 2)]=0.0433034198985*x[0]**o + (-0.815932981241)*x[0] + (-0.26410111168)*x[1]**o + (-0.18085341433)*x[1]
            ref[(1, 0, 1, 2)]=-0.608792043676-(-0.0367996152969)*(o-1.)
            arg[(1, 0, 1, 3)]=0.535730077365*x[0]**o + (0.968840037688)*x[0] + (0.110856247761)*x[1]**o + (-0.383923497257)*x[1]
            ref[(1, 0, 1, 3)]=0.615751432779-(0.107764387521)*(o-1.)
            arg[(1, 0, 2, 0)]=0.103313351442*x[0]**o + (0.495781253858)*x[0] + (-0.754333150824)*x[1]**o + (0.144382141582)*x[1]
            ref[(1, 0, 2, 0)]=-0.00542820197096-(-0.108503299897)*(o-1.)
            arg[(1, 0, 2, 1)]=-0.132678262125*x[0]**o + (0.0933166841207)*x[0] + (0.205936631757)*x[1]**o + (-0.497030199271)*x[1]
            ref[(1, 0, 2, 1)]=-0.165227572759-(0.012209728272)*(o-1.)
            arg[(1, 0, 2, 2)]=-0.318323622889*x[0]**o + (0.216035402629)*x[0] + (0.361415763439)*x[1]**o + (0.852678928311)*x[1]
            ref[(1, 0, 2, 2)]=0.555903235746-(0.00718202342512)*(o-1.)
            arg[(1, 0, 2, 3)]=-0.583359955745*x[0]**o + (0.61728818733)*x[0] + (0.336380437558)*x[1]**o + (-0.81359047026)*x[1]
            ref[(1, 0, 2, 3)]=-0.221640900558-(-0.0411632530311)*(o-1.)
            arg[(1, 0, 3, 0)]=0.0286742758439*x[0]**o + (0.150290520703)*x[0] + (-0.661502245789)*x[1]**o + (0.902840718844)*x[1]
            ref[(1, 0, 3, 0)]=0.210151634801-(-0.105471328324)*(o-1.)
            arg[(1, 0, 3, 1)]=0.0241588491615*x[0]**o + (0.793253564105)*x[0] + (-0.361570696612)*x[1]**o + (0.530903322005)*x[1]
            ref[(1, 0, 3, 1)]=0.49337251933-(-0.0562353079084)*(o-1.)
            arg[(1, 0, 3, 2)]=-0.210308335987*x[0]**o + (0.384570587563)*x[0] + (-0.277167940209)*x[1]**o + (0.757277438231)*x[1]
            ref[(1, 0, 3, 2)]=0.327185874799-(-0.0812460460326)*(o-1.)
            arg[(1, 0, 3, 3)]=0.0854856889821*x[0]**o + (0.912362036827)*x[0] + (0.189303256312)*x[1]**o + (0.711138077344)*x[1]
            ref[(1, 0, 3, 3)]=0.949144529733-(0.045798157549)*(o-1.)
            arg[(1, 1, 0, 0)]=-0.768099323152*x[0]**o + (-0.366311861168)*x[0] + (-0.819707845899)*x[1]**o + (-0.53713737826)*x[1]
            ref[(1, 1, 0, 0)]=-1.24562820424-(-0.264634528175)*(o-1.)
            arg[(1, 1, 0, 1)]=-0.286850059544*x[0]**o + (0.748573811794)*x[0] + (-0.106743498626)*x[1]**o + (-0.489499296145)*x[1]
            ref[(1, 1, 0, 1)]=-0.0672595212602-(-0.0655989263617)*(o-1.)
            arg[(1, 1, 0, 2)]=-0.958136925044*x[0]**o + (0.199312467449)*x[0] + (-0.758255958106)*x[1]**o + (-0.0928866045042)*x[1]
            ref[(1, 1, 0, 2)]=-0.804983510102-(-0.286065480525)*(o-1.)
            arg[(1, 1, 0, 3)]=0.127677689079*x[0]**o + (-0.901114155944)*x[0] + (-0.960585810794)*x[1]**o + (-0.502458580979)*x[1]
            ref[(1, 1, 0, 3)]=-1.11824042932-(-0.138818020286)*(o-1.)
            arg[(1, 1, 1, 0)]=0.330006032132*x[0]**o + (-0.412267210968)*x[0] + (0.206047378428)*x[1]**o + (0.406974018892)*x[1]
            ref[(1, 1, 1, 0)]=0.265380109242-(0.0893422350933)*(o-1.)
            arg[(1, 1, 1, 1)]=-0.988499340788*x[0]**o + (-0.749261419431)*x[0] + (-0.329607622552)*x[1]**o + (-0.654579912989)*x[1]
            ref[(1, 1, 1, 1)]=-1.36097414788-(-0.21968449389)*(o-1.)
            arg[(1, 1, 1, 2)]=-0.573098938097*x[0]**o + (-0.785398473121)*x[0] + (0.704468072767)*x[1]**o + (0.117972964618)*x[1]
            ref[(1, 1, 1, 2)]=-0.268028186916-(0.0218948557783)*(o-1.)
            arg[(1, 1, 1, 3)]=-0.186160537092*x[0]**o + (0.463356765951)*x[0] + (0.234183000514)*x[1]**o + (0.722553587466)*x[1]
            ref[(1, 1, 1, 3)]=0.61696640842-(0.00800374390374)*(o-1.)
            arg[(1, 1, 2, 0)]=0.356861894805*x[0]**o + (-0.639067867351)*x[0] + (0.57946938251)*x[1]**o + (0.778739193028)*x[1]
            ref[(1, 1, 2, 0)]=0.538001301496-(0.156055212886)*(o-1.)
            arg[(1, 1, 2, 1)]=-0.818894171374*x[0]**o + (-0.083677569505)*x[0] + (-0.186691519001)*x[1]**o + (0.725515007668)*x[1]
            ref[(1, 1, 2, 1)]=-0.181874126106-(-0.167597615063)*(o-1.)
            arg[(1, 1, 2, 2)]=0.718429713815*x[0]**o + (0.581012524898)*x[0] + (0.409330884245)*x[1]**o + (0.315206776699)*x[1]
            ref[(1, 1, 2, 2)]=1.01198994983-(0.187960099677)*(o-1.)
            arg[(1, 1, 2, 3)]=-0.341920116975*x[0]**o + (0.964064601708)*x[0] + (0.415824464904)*x[1]**o + (0.652028727691)*x[1]
            ref[(1, 1, 2, 3)]=0.844998838664-(0.0123173913215)*(o-1.)
            arg[(1, 1, 3, 0)]=-0.0263995318623*x[0]**o + (-0.377386904698)*x[0] + (-0.525245312263)*x[1]**o + (0.643706503206)*x[1]
            ref[(1, 1, 3, 0)]=-0.142662622809-(-0.0919408073542)*(o-1.)
            arg[(1, 1, 3, 1)]=0.895069519251*x[0]**o + (-0.575280575219)*x[0] + (-0.513559289113)*x[1]**o + (-0.153102799317)*x[1]
            ref[(1, 1, 3, 1)]=-0.1734365722-(0.0635850383563)*(o-1.)
            arg[(1, 1, 3, 2)]=0.376468758841*x[0]**o + (-0.212010054594)*x[0] + (0.290848123543)*x[1]**o + (0.910903633779)*x[1]
            ref[(1, 1, 3, 2)]=0.683105230785-(0.111219480397)*(o-1.)
            arg[(1, 1, 3, 3)]=0.285050708867*x[0]**o + (0.328879506713)*x[0] + (0.637470063362)*x[1]**o + (0.683742883749)*x[1]
            ref[(1, 1, 3, 3)]=0.967571581346-(0.153753462038)*(o-1.)
            arg[(1, 2, 0, 0)]=-0.165789589403*x[0]**o + (0.353341185838)*x[0] + (0.0604346188369)*x[1]**o + (-0.45862300248)*x[1]
            ref[(1, 2, 0, 0)]=-0.105318393604-(-0.0175591617611)*(o-1.)
            arg[(1, 2, 0, 1)]=0.487268072704*x[0]**o + (0.228152405212)*x[0] + (0.456705076026)*x[1]**o + (-0.884648285587)*x[1]
            ref[(1, 2, 0, 1)]=0.143738634178-(0.157328858122)*(o-1.)
            arg[(1, 2, 0, 2)]=-0.961721578534*x[0]**o + (0.659192931408)*x[0] + (-0.979643037386)*x[1]**o + (-0.537264409466)*x[1]
            ref[(1, 2, 0, 2)]=-0.90971804699-(-0.32356076932)*(o-1.)
            arg[(1, 2, 0, 3)]=-0.989217844537*x[0]**o + (-0.0257646413194)*x[0] + (-0.844053072038)*x[1]**o + (-0.212582183688)*x[1]
            ref[(1, 2, 0, 3)]=-1.03580887079-(-0.305545152763)*(o-1.)
            arg[(1, 2, 1, 0)]=0.250861114524*x[0]**o + (-0.511382085722)*x[0] + (-0.403413356039)*x[1]**o + (0.506197226744)*x[1]
            ref[(1, 2, 1, 0)]=-0.0788685502463-(-0.0254253735858)*(o-1.)
            arg[(1, 2, 1, 1)]=-0.898143455945*x[0]**o + (0.490036691074)*x[0] + (-0.0575978354064)*x[1]**o + (0.247371277752)*x[1]
            ref[(1, 2, 1, 1)]=-0.109166661263-(-0.159290215225)*(o-1.)
            arg[(1, 2, 1, 2)]=-0.503780876786*x[0]**o + (-0.0923784401234)*x[0] + (0.802176242841)*x[1]**o + (0.74298709087)*x[1]
            ref[(1, 2, 1, 2)]=0.474502008401-(0.0497325610093)*(o-1.)
            arg[(1, 2, 1, 3)]=0.375938629844*x[0]**o + (-0.0114523411934)*x[0] + (0.869363512794)*x[1]**o + (-0.537846936002)*x[1]
            ref[(1, 2, 1, 3)]=0.348001432721-(0.207550357106)*(o-1.)
            arg[(1, 2, 2, 0)]=-0.576853182751*x[0]**o + (-0.153066758837)*x[0] + (0.114994144487)*x[1]**o + (-0.118148996581)*x[1]
            ref[(1, 2, 2, 0)]=-0.366537396841-(-0.0769765063774)*(o-1.)
            arg[(1, 2, 2, 1)]=-0.783619481711*x[0]**o + (-0.572849302676)*x[0] + (0.340423845774)*x[1]**o + (0.464069457262)*x[1]
            ref[(1, 2, 2, 1)]=-0.275987740675-(-0.0738659393229)*(o-1.)
            arg[(1, 2, 2, 2)]=0.102050213544*x[0]**o + (0.72894824427)*x[0] + (-0.931019797233)*x[1]**o + (0.913084289218)*x[1]
            ref[(1, 2, 2, 2)]=0.4065314749-(-0.138161597281)*(o-1.)
            arg[(1, 2, 2, 3)]=-0.363376931402*x[0]**o + (0.714252561117)*x[0] + (-0.796530817351)*x[1]**o + (0.354672915621)*x[1]
            ref[(1, 2, 2, 3)]=-0.0454911360076-(-0.193317958125)*(o-1.)
            arg[(1, 2, 3, 0)]=-0.83992137859*x[0]**o + (0.744535240061)*x[0] + (0.822083084889)*x[1]**o + (-0.150721796761)*x[1]
            ref[(1, 2, 3, 0)]=0.2879875748-(-0.00297304895004)*(o-1.)
            arg[(1, 2, 3, 1)]=0.690506933818*x[0]**o + (0.321762426232)*x[0] + (-0.906879413724)*x[1]**o + (0.463864262316)*x[1]
            ref[(1, 2, 3, 1)]=0.284627104321-(-0.0360620799844)*(o-1.)
            arg[(1, 2, 3, 2)]=-0.102091397164*x[0]**o + (0.535788568925)*x[0] + (0.128404226236)*x[1]**o + (-0.880675095283)*x[1]
            ref[(1, 2, 3, 2)]=-0.159286848643-(0.00438547151204)*(o-1.)
            arg[(1, 2, 3, 3)]=0.771583594185*x[0]**o + (0.506749313564)*x[0] + (0.661872545814)*x[1]**o + (0.802359342008)*x[1]
            ref[(1, 2, 3, 3)]=1.37128239779-(0.238909356667)*(o-1.)
            arg[(2, 0, 0, 0)]=-0.561199820277*x[0]**o + (-0.157783063346)*x[0] + (0.177234046137)*x[1]**o + (0.0754339945103)*x[1]
            ref[(2, 0, 0, 0)]=-0.233157421488-(-0.0639942956901)*(o-1.)
            arg[(2, 0, 0, 1)]=0.205992259385*x[0]**o + (0.526057943186)*x[0] + (-0.366151033853)*x[1]**o + (-0.172325115335)*x[1]
            ref[(2, 0, 0, 1)]=0.0967870266919-(-0.0266931290779)*(o-1.)
            arg[(2, 0, 0, 2)]=0.802187400335*x[0]**o + (-0.0181071618141)*x[0] + (0.56322072443)*x[1]**o + (0.43941061322)*x[1]
            ref[(2, 0, 0, 2)]=0.893355788086-(0.227568020794)*(o-1.)
            arg[(2, 0, 0, 3)]=-0.43847077187*x[0]**o + (0.0438376426864)*x[0] + (0.166108444254)*x[1]**o + (-0.852316898631)*x[1]
            ref[(2, 0, 0, 3)]=-0.54042079178-(-0.0453937212694)*(o-1.)
            arg[(2, 0, 1, 0)]=-0.608880371348*x[0]**o + (0.564759001612)*x[0] + (-0.955930733725)*x[1]**o + (0.0663474818812)*x[1]
            ref[(2, 0, 1, 0)]=-0.46685231079-(-0.260801850846)*(o-1.)
            arg[(2, 0, 1, 1)]=-0.162694282811*x[0]**o + (0.0768621511142)*x[0] + (-0.527270292191)*x[1]**o + (0.0937482493027)*x[1]
            ref[(2, 0, 1, 1)]=-0.259677087293-(-0.114994095834)*(o-1.)
            arg[(2, 0, 1, 2)]=0.0310213709201*x[0]**o + (-0.912564215212)*x[0] + (-0.556055632881)*x[1]**o + (0.515637791459)*x[1]
            ref[(2, 0, 1, 2)]=-0.460980342857-(-0.0875057103268)*(o-1.)
            arg[(2, 0, 1, 3)]=0.781801727059*x[0]**o + (-0.607749070353)*x[0] + (0.12701983476)*x[1]**o + (-0.477340367421)*x[1]
            ref[(2, 0, 1, 3)]=-0.0881339379779-(0.151470260303)*(o-1.)
            arg[(2, 0, 2, 0)]=-0.433994682606*x[0]**o + (-0.108809644025)*x[0] + (0.954537758403)*x[1]**o + (-0.246656032353)*x[1]
            ref[(2, 0, 2, 0)]=0.0825386997096-(0.0867571792995)*(o-1.)
            arg[(2, 0, 2, 1)]=-0.998782782136*x[0]**o + (-0.519086644313)*x[0] + (0.895963044517)*x[1]**o + (-0.0360880535141)*x[1]
            ref[(2, 0, 2, 1)]=-0.328997217723-(-0.0171366229365)*(o-1.)
            arg[(2, 0, 2, 2)]=0.883136524289*x[0]**o + (-0.387758854684)*x[0] + (0.254786130262)*x[1]**o + (-0.132264508016)*x[1]
            ref[(2, 0, 2, 2)]=0.308949645925-(0.189653775758)*(o-1.)
            arg[(2, 0, 2, 3)]=0.0438413045*x[0]**o + (-0.773097652512)*x[0] + (-0.222812468495)*x[1]**o + (0.90183522038)*x[1]
            ref[(2, 0, 2, 3)]=-0.0251167980635-(-0.0298285273325)*(o-1.)
            arg[(2, 0, 3, 0)]=0.615616180109*x[0]**o + (-0.0127942735829)*x[0] + (0.269277676823)*x[1]**o + (0.626426041059)*x[1]
            ref[(2, 0, 3, 0)]=0.749262812204-(0.147482309489)*(o-1.)
            arg[(2, 0, 3, 1)]=0.710489313979*x[0]**o + (0.0389132268942)*x[0] + (-0.416846983124)*x[1]**o + (-0.950669729868)*x[1]
            ref[(2, 0, 3, 1)]=-0.30905708606-(0.0489403884758)*(o-1.)
            arg[(2, 0, 3, 2)]=-0.535758289034*x[0]**o + (-0.0261314857581)*x[0] + (0.359991123547)*x[1]**o + (-0.661693911494)*x[1]
            ref[(2, 0, 3, 2)]=-0.431796281369-(-0.0292945275811)*(o-1.)
            arg[(2, 0, 3, 3)]=0.84032337706*x[0]**o + (-0.904454778517)*x[0] + (0.238015771148)*x[1]**o + (-0.0362472341883)*x[1]
            ref[(2, 0, 3, 3)]=0.0688185677516-(0.179723191368)*(o-1.)
            arg[(2, 1, 0, 0)]=-0.635604895843*x[0]**o + (-0.412440682367)*x[0] + (0.743362105079)*x[1]**o + (0.806267484943)*x[1]
            ref[(2, 1, 0, 0)]=0.250792005906-(0.0179595348726)*(o-1.)
            arg[(2, 1, 0, 1)]=0.0421123038027*x[0]**o + (-0.562623233872)*x[0] + (-0.102200857956)*x[1]**o + (0.34864975557)*x[1]
            ref[(2, 1, 0, 1)]=-0.137031016228-(-0.0100147590255)*(o-1.)
            arg[(2, 1, 0, 2)]=-0.50518422875*x[0]**o + (0.97971594775)*x[0] + (-0.651111354695)*x[1]**o + (-0.561126687649)*x[1]
            ref[(2, 1, 0, 2)]=-0.368853161672-(-0.192715930574)*(o-1.)
            arg[(2, 1, 0, 3)]=0.340429336965*x[0]**o + (-0.275969059031)*x[0] + (-0.23388874258)*x[1]**o + (-0.0790671550486)*x[1]
            ref[(2, 1, 0, 3)]=-0.124247809847-(0.0177567657309)*(o-1.)
            arg[(2, 1, 1, 0)]=0.797339891699*x[0]**o + (-0.571733811666)*x[0] + (-0.463258943192)*x[1]**o + (-0.405586693427)*x[1]
            ref[(2, 1, 1, 0)]=-0.321619778293-(0.0556801580845)*(o-1.)
            arg[(2, 1, 1, 1)]=0.0131754612333*x[0]**o + (-0.505935674018)*x[0] + (-0.509790553991)*x[1]**o + (0.52640924293)*x[1]
            ref[(2, 1, 1, 1)]=-0.238070761922-(-0.0827691821262)*(o-1.)
            arg[(2, 1, 1, 2)]=-0.643181460619*x[0]**o + (0.811137229328)*x[0] + (0.231267132861)*x[1]**o + (-0.519574446773)*x[1]
            ref[(2, 1, 1, 2)]=-0.0601757726017-(-0.0686523879597)*(o-1.)
            arg[(2, 1, 1, 3)]=-0.878987143515*x[0]**o + (-0.75355067244)*x[0] + (-0.848648268103)*x[1]**o + (-0.387949384278)*x[1]
            ref[(2, 1, 1, 3)]=-1.43456773417-(-0.28793923527)*(o-1.)
            arg[(2, 1, 2, 0)]=0.301323614243*x[0]**o + (0.351765779889)*x[0] + (0.451279705146)*x[1]**o + (-0.646418461099)*x[1]
            ref[(2, 1, 2, 0)]=0.22897531909-(0.125433886565)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.945697134895*x[0]**o + (0.216911606411)*x[0] + (-0.730615093249)*x[1]**o + (-0.253932160732)*x[1]
            ref[(2, 1, 2, 1)]=-0.856666391233-(-0.279385371357)*(o-1.)
            arg[(2, 1, 2, 2)]=0.908944836699*x[0]**o + (0.924228996611)*x[0] + (0.124919338272)*x[1]**o + (-0.731665279291)*x[1]
            ref[(2, 1, 2, 2)]=0.613213946146-(0.172310695828)*(o-1.)
            arg[(2, 1, 2, 3)]=0.978139266751*x[0]**o + (-0.369468903324)*x[0] + (-0.306559524287)*x[1]**o + (0.563371384713)*x[1]
            ref[(2, 1, 2, 3)]=0.432741111927-(0.111929957077)*(o-1.)
            arg[(2, 1, 3, 0)]=0.0135898746466*x[0]**o + (-0.23948421363)*x[0] + (-0.576230015479)*x[1]**o + (-0.489515411987)*x[1]
            ref[(2, 1, 3, 0)]=-0.645819883225-(-0.0937733568055)*(o-1.)
            arg[(2, 1, 3, 1)]=-0.762122275393*x[0]**o + (-0.46733205366)*x[0] + (-0.673632998621)*x[1]**o + (0.509314783924)*x[1]
            ref[(2, 1, 3, 1)]=-0.696886271875-(-0.239292545669)*(o-1.)
            arg[(2, 1, 3, 2)]=0.926381180185*x[0]**o + (-0.149226681307)*x[0] + (-0.777599744397)*x[1]**o + (0.959538331634)*x[1]
            ref[(2, 1, 3, 2)]=0.479546543058-(0.0247969059647)*(o-1.)
            arg[(2, 1, 3, 3)]=-0.155663402306*x[0]**o + (0.295725371104)*x[0] + (-0.132099380928)*x[1]**o + (0.383722814309)*x[1]
            ref[(2, 1, 3, 3)]=0.195842701089-(-0.0479604638724)*(o-1.)
            arg[(2, 2, 0, 0)]=0.797157901472*x[0]**o + (-0.575542843458)*x[0] + (-0.110432287345)*x[1]**o + (0.980200088458)*x[1]
            ref[(2, 2, 0, 0)]=0.545691429563-(0.114454269021)*(o-1.)
            arg[(2, 2, 0, 1)]=0.480686552153*x[0]**o + (-0.00998949492069)*x[0] + (0.845319982053)*x[1]**o + (0.0811964190191)*x[1]
            ref[(2, 2, 0, 1)]=0.698606729152-(0.221001089034)*(o-1.)
            arg[(2, 2, 0, 2)]=-0.359561186512*x[0]**o + (0.486464707859)*x[0] + (0.188824261239)*x[1]**o + (-0.113180640848)*x[1]
            ref[(2, 2, 0, 2)]=0.101273570869-(-0.0284561542121)*(o-1.)
            arg[(2, 2, 0, 3)]=-0.455403798685*x[0]**o + (-0.310617544493)*x[0] + (-0.771454829115)*x[1]**o + (-0.785890638582)*x[1]
            ref[(2, 2, 0, 3)]=-1.16168340544-(-0.204476437967)*(o-1.)
            arg[(2, 2, 1, 0)]=-0.105010180782*x[0]**o + (0.791332607953)*x[0] + (-0.570503274912)*x[1]**o + (-0.651119740203)*x[1]
            ref[(2, 2, 1, 0)]=-0.267650293972-(-0.112585575949)*(o-1.)
            arg[(2, 2, 1, 1)]=0.0662553870807*x[0]**o + (0.799945085691)*x[0] + (-0.581709365481)*x[1]**o + (-0.402549742098)*x[1]
            ref[(2, 2, 1, 1)]=-0.0590293174034-(-0.0859089964)*(o-1.)
            arg[(2, 2, 1, 2)]=-0.829511582798*x[0]**o + (0.568986012697)*x[0] + (-0.857880312018)*x[1]**o + (0.330111737565)*x[1]
            ref[(2, 2, 1, 2)]=-0.394147072277-(-0.281231982469)*(o-1.)
            arg[(2, 2, 1, 3)]=-0.347062947086*x[0]**o + (0.709217562845)*x[0] + (0.238071075901)*x[1]**o + (-0.221980476107)*x[1]
            ref[(2, 2, 1, 3)]=0.189122607777-(-0.0181653118642)*(o-1.)
            arg[(2, 2, 2, 0)]=0.959867586995*x[0]**o + (0.981914103215)*x[0] + (0.869485903761)*x[1]**o + (-0.00852159621561)*x[1]
            ref[(2, 2, 2, 0)]=1.40137299888-(0.304892248459)*(o-1.)
            arg[(2, 2, 2, 1)]=0.337202746604*x[0]**o + (0.489660396213)*x[0] + (0.814307399003)*x[1]**o + (-0.245324396316)*x[1]
            ref[(2, 2, 2, 1)]=0.697923072752-(0.191918357601)*(o-1.)
            arg[(2, 2, 2, 2)]=-0.143546602058*x[0]**o + (-0.264769760908)*x[0] + (0.970621207959)*x[1]**o + (0.284418451458)*x[1]
            ref[(2, 2, 2, 2)]=0.423361648225-(0.13784576765)*(o-1.)
            arg[(2, 2, 2, 3)]=-0.689378785913*x[0]**o + (-0.637789116398)*x[0] + (0.439650403595)*x[1]**o + (0.960189293938)*x[1]
            ref[(2, 2, 2, 3)]=0.036335897611-(-0.041621397053)*(o-1.)
            arg[(2, 2, 3, 0)]=-0.844960542774*x[0]**o + (-0.887262744262)*x[0] + (0.999345333196)*x[1]**o + (-0.637481136013)*x[1]
            ref[(2, 2, 3, 0)]=-0.685179544926-(0.0257307984038)*(o-1.)
            arg[(2, 2, 3, 1)]=0.726311417503*x[0]**o + (-0.159923532957)*x[0] + (-0.0238918536005)*x[1]**o + (0.0729897812818)*x[1]
            ref[(2, 2, 3, 1)]=0.307742906114-(0.117069927317)*(o-1.)
            arg[(2, 2, 3, 2)]=-0.11704646563*x[0]**o + (-0.11096178177)*x[0] + (0.474913706598)*x[1]**o + (-0.38478084658)*x[1]
            ref[(2, 2, 3, 2)]=-0.0689376936908-(0.0596445401614)*(o-1.)
            arg[(2, 2, 3, 3)]=-0.425645938891*x[0]**o + (-0.899777275473)*x[0] + (0.39412338053)*x[1]**o + (-0.801639636344)*x[1]
            ref[(2, 2, 3, 3)]=-0.866469735089-(-0.00525375972689)*(o-1.)
        else:
            arg[(0, 0, 0, 0)]=0.280243702357*x[0]**o + (0.8457584242)*x[0] + (0.707993744519)*x[1]**o + (0.756620346085)*x[1] + (-0.986171113813)*x[2]**o + (0.942996202941)*x[2]
            ref[(0, 0, 0, 0)]=1.27372065314-(0.000344388843844)*(o-1.)
            arg[(0, 0, 0, 1)]=-0.757249191726*x[0]**o + (0.928918151109)*x[0] + (-0.713852158515)*x[1]**o + (0.0748187500822)*x[1] + (-0.10842966167)*x[2]**o + (0.828768897801)*x[2]
            ref[(0, 0, 0, 1)]=0.12648739354-(-0.263255168652)*(o-1.)
            arg[(0, 0, 0, 2)]=-0.120559896209*x[0]**o + (0.225238738533)*x[0] + (-0.798596349671)*x[1]**o + (0.939406331395)*x[1] + (-0.343007770232)*x[2]**o + (-0.388874728625)*x[2]
            ref[(0, 0, 0, 2)]=-0.243196837405-(-0.210360669352)*(o-1.)
            arg[(0, 0, 0, 3)]=-0.87119064537*x[0]**o + (-0.272916353163)*x[0] + (-0.985655007181)*x[1]**o + (0.629317639625)*x[1] + (-0.629621403662)*x[2]**o + (0.624299406274)*x[2]
            ref[(0, 0, 0, 3)]=-0.752883181738-(-0.414411176035)*(o-1.)
            arg[(0, 0, 1, 0)]=0.974616594603*x[0]**o + (0.911625398625)*x[0] + (0.0375579541421)*x[1]**o + (-0.150404391744)*x[1] + (-0.905445919575)*x[2]**o + (0.679153335742)*x[2]
            ref[(0, 0, 1, 0)]=0.773551485897-(0.0177881048617)*(o-1.)
            arg[(0, 0, 1, 1)]=0.693263393991*x[0]**o + (-0.425771101122)*x[0] + (-0.684336210587)*x[1]**o + (-0.0667177395547)*x[1] + (-0.938610559454)*x[2]**o + (-0.407276356806)*x[2]
            ref[(0, 0, 1, 1)]=-0.914724286766-(-0.154947229342)*(o-1.)
            arg[(0, 0, 1, 2)]=-0.417860226284*x[0]**o + (0.0464911778568)*x[0] + (-0.389163593843)*x[1]**o + (-0.012410774622)*x[1] + (-0.233666376567)*x[2]**o + (0.169694037566)*x[2]
            ref[(0, 0, 1, 2)]=-0.418457877946-(-0.173448366115)*(o-1.)
            arg[(0, 0, 1, 3)]=-0.588077726227*x[0]**o + (0.573031520362)*x[0] + (-0.743318314564)*x[1]**o + (-0.280823399418)*x[1] + (-0.38206619737)*x[2]**o + (-0.467135471746)*x[2]
            ref[(0, 0, 1, 3)]=-0.944194794482-(-0.285577039694)*(o-1.)
            arg[(0, 0, 2, 0)]=-0.726547923044*x[0]**o + (0.251784600917)*x[0] + (0.590364418381)*x[1]**o + (0.440883886649)*x[1] + (-0.213569921749)*x[2]**o + (-0.447497391682)*x[2]
            ref[(0, 0, 2, 0)]=-0.0522911652639-(-0.0582922377353)*(o-1.)
            arg[(0, 0, 2, 1)]=-0.136020646959*x[0]**o + (-0.524706635335)*x[0] + (0.761220995383)*x[1]**o + (0.034123807859)*x[1] + (0.122036030606)*x[2]**o + (0.68651953921)*x[2]
            ref[(0, 0, 2, 1)]=0.471586545382-(0.124539396505)*(o-1.)
            arg[(0, 0, 2, 2)]=0.997939333759*x[0]**o + (0.952391367597)*x[0] + (-0.227179484907)*x[1]**o + (-0.335813789554)*x[1] + (0.820584733712)*x[2]**o + (0.251302027077)*x[2]
            ref[(0, 0, 2, 2)]=1.22961209384-(0.265224097094)*(o-1.)
            arg[(0, 0, 2, 3)]=0.488035724674*x[0]**o + (0.744623438518)*x[0] + (-0.761651822748)*x[1]**o + (-0.390831622886)*x[1] + (0.859545760763)*x[2]**o + (0.300487539277)*x[2]
            ref[(0, 0, 2, 3)]=0.620104508799-(0.0976549437815)*(o-1.)
            arg[(0, 0, 3, 0)]=0.580552144084*x[0]**o + (-0.184845042091)*x[0] + (-0.214137286579)*x[1]**o + (0.366865227288)*x[1] + (-0.349819653075)*x[2]**o + (-0.760340141643)*x[2]
            ref[(0, 0, 3, 0)]=-0.280862376007-(0.00276586740516)*(o-1.)
            arg[(0, 0, 3, 1)]=-0.888832723579*x[0]**o + (-0.282245133918)*x[0] + (0.545311796488)*x[1]**o + (0.209232334285)*x[1] + (-0.222945410306)*x[2]**o + (0.148948683056)*x[2]
            ref[(0, 0, 3, 1)]=-0.245265226987-(-0.0944110562328)*(o-1.)
            arg[(0, 0, 3, 2)]=-0.162593836371*x[0]**o + (0.0811071268836)*x[0] + (-0.0510532900323)*x[1]**o + (-0.740340235277)*x[1] + (-0.272415460347)*x[2]**o + (-0.748909212797)*x[2]
            ref[(0, 0, 3, 2)]=-0.94710245397-(-0.0810104311251)*(o-1.)
            arg[(0, 0, 3, 3)]=0.907923584871*x[0]**o + (0.823648630441)*x[0] + (0.020058842801)*x[1]**o + (0.73112252919)*x[1] + (0.258967934527)*x[2]**o + (0.445617741055)*x[2]
            ref[(0, 0, 3, 3)]=1.59366963144-(0.197825060367)*(o-1.)
            arg[(0, 1, 0, 0)]=0.671076387781*x[0]**o + (0.566795899292)*x[0] + (-0.838639759797)*x[1]**o + (-0.0236220777634)*x[1] + (-0.231354353707)*x[2]**o + (0.897434177943)*x[2]
            ref[(0, 1, 0, 0)]=0.520845136875-(-0.0664862876203)*(o-1.)
            arg[(0, 1, 0, 1)]=-0.112299853262*x[0]**o + (0.538993187709)*x[0] + (-0.244336743989)*x[1]**o + (0.230873969742)*x[1] + (0.846098264209)*x[2]**o + (0.0801183462829)*x[2]
            ref[(0, 1, 0, 1)]=0.669723585346-(0.0815769444929)*(o-1.)
            arg[(0, 1, 0, 2)]=0.855344578899*x[0]**o + (-0.316476547896)*x[0] + (-0.629826394949)*x[1]**o + (0.765306601989)*x[1] + (0.634044463373)*x[2]**o + (-0.378328940093)*x[2]
            ref[(0, 1, 0, 2)]=0.465031880662-(0.143260441221)*(o-1.)
            arg[(0, 1, 0, 3)]=-0.471177790159*x[0]**o + (-0.537184190048)*x[0] + (0.407953117127)*x[1]**o + (-0.411268701439)*x[1] + (0.593669738872)*x[2]**o + (-0.920514759779)*x[2]
            ref[(0, 1, 0, 3)]=-0.669261292712-(0.0884075109734)*(o-1.)
            arg[(0, 1, 1, 0)]=0.497745079393*x[0]**o + (0.0480094210077)*x[0] + (0.269401604397)*x[1]**o + (-0.756137197765)*x[1] + (0.595347089795)*x[2]**o + (-0.158003592596)*x[2]
            ref[(0, 1, 1, 0)]=0.248181202116-(0.227082295597)*(o-1.)
            arg[(0, 1, 1, 1)]=-0.873528649842*x[0]**o + (-0.739141022988)*x[0] + (-0.629831722265)*x[1]**o + (-0.224855802677)*x[1] + (-0.961582169707)*x[2]**o + (0.240015450974)*x[2]
            ref[(0, 1, 1, 1)]=-1.59446195825-(-0.410823756969)*(o-1.)
            arg[(0, 1, 1, 2)]=0.0100749098616*x[0]**o + (-0.181187308257)*x[0] + (-0.143650926797)*x[1]**o + (0.192250032566)*x[1] + (-0.353815619677)*x[2]**o + (-0.564946630482)*x[2]
            ref[(0, 1, 1, 2)]=-0.520637771393-(-0.0812319394354)*(o-1.)
            arg[(0, 1, 1, 3)]=-0.0750743604966*x[0]**o + (0.476974532944)*x[0] + (0.188580832849)*x[1]**o + (-0.181035156344)*x[1] + (-0.0544128474214)*x[2]**o + (0.45868238982)*x[2]
            ref[(0, 1, 1, 3)]=0.406857695676-(0.00984893748859)*(o-1.)
            arg[(0, 1, 2, 0)]=0.714325443277*x[0]**o + (0.880577039315)*x[0] + (-0.508779428442)*x[1]**o + (-0.306909619232)*x[1] + (0.950893845433)*x[2]**o + (-0.319524136937)*x[2]
            ref[(0, 1, 2, 0)]=0.705291571706-(0.192739976711)*(o-1.)
            arg[(0, 1, 2, 1)]=0.401888285238*x[0]**o + (0.468476884053)*x[0] + (0.319613463847)*x[1]**o + (-0.0898133748148)*x[1] + (-0.615396379454)*x[2]**o + (0.481602736396)*x[2]
            ref[(0, 1, 2, 1)]=0.483185807632-(0.0176842282718)*(o-1.)
            arg[(0, 1, 2, 2)]=0.987110421877*x[0]**o + (0.221675678782)*x[0] + (0.0448349361108)*x[1]**o + (-0.48906680115)*x[1] + (0.27855924889)*x[2]**o + (0.985367275254)*x[2]
            ref[(0, 1, 2, 2)]=1.01424037988-(0.21841743448)*(o-1.)
            arg[(0, 1, 2, 3)]=-0.266017944562*x[0]**o + (-0.349598551556)*x[0] + (-0.638199668869)*x[1]**o + (0.69036506797)*x[1] + (-0.0759468536869)*x[2]**o + (-0.737941652957)*x[2]
            ref[(0, 1, 2, 3)]=-0.68866980183-(-0.16336074452)*(o-1.)
            arg[(0, 1, 3, 0)]=-0.458754394884*x[0]**o + (0.265339740565)*x[0] + (-0.24029342225)*x[1]**o + (0.786314499521)*x[1] + (0.318077548381)*x[2]**o + (-0.127549475132)*x[2]
            ref[(0, 1, 3, 0)]=0.2715672481-(-0.0634950447923)*(o-1.)
            arg[(0, 1, 3, 1)]=0.603875893424*x[0]**o + (-0.0709786722552)*x[0] + (-0.406792371057)*x[1]**o + (-0.108800236153)*x[1] + (0.51563368549)*x[2]**o + (0.707594722462)*x[2]
            ref[(0, 1, 3, 1)]=0.620266510955-(0.118786201309)*(o-1.)
            arg[(0, 1, 3, 2)]=-0.0651462040299*x[0]**o + (-0.428608945919)*x[0] + (0.410422586946)*x[1]**o + (-0.662706034241)*x[1] + (0.164787273222)*x[2]**o + (-0.185654112883)*x[2]
            ref[(0, 1, 3, 2)]=-0.383452718452-(0.0850106093564)*(o-1.)
            arg[(0, 1, 3, 3)]=0.17198416938*x[0]**o + (0.193011600536)*x[0] + (0.14153274164)*x[1]**o + (-0.318523354267)*x[1] + (-0.718762954313)*x[2]**o + (0.917888772383)*x[2]
            ref[(0, 1, 3, 3)]=0.193565487679-(-0.0675410072156)*(o-1.)
            arg[(0, 2, 0, 0)]=0.906136894452*x[0]**o + (-0.433217948922)*x[0] + (-0.975311119208)*x[1]**o + (0.674741341107)*x[1] + (0.0911497821213)*x[2]**o + (-0.659471564656)*x[2]
            ref[(0, 2, 0, 0)]=-0.197986307553-(0.0036625928943)*(o-1.)
            arg[(0, 2, 0, 1)]=-0.390736276998*x[0]**o + (0.78887058096)*x[0] + (0.870469199738)*x[1]**o + (-0.464112707104)*x[1] + (0.76028528682)*x[2]**o + (-0.782639503102)*x[2]
            ref[(0, 2, 0, 1)]=0.391068290157-(0.206669701593)*(o-1.)
            arg[(0, 2, 0, 2)]=-0.628720960558*x[0]**o + (0.101447186916)*x[0] + (-0.700038325308)*x[1]**o + (0.264911801197)*x[1] + (0.346570656317)*x[2]**o + (0.343303678382)*x[2]
            ref[(0, 2, 0, 2)]=-0.136262981527-(-0.163698104925)*(o-1.)
            arg[(0, 2, 0, 3)]=-0.0543225272871*x[0]**o + (0.838094457992)*x[0] + (0.553924606755)*x[1]**o + (-0.756648317724)*x[1] + (-0.039802009729)*x[2]**o + (0.0901874449064)*x[2]
            ref[(0, 2, 0, 3)]=0.315716827457-(0.0766333449564)*(o-1.)
            arg[(0, 2, 1, 0)]=0.986395800363*x[0]**o + (-0.520467266526)*x[0] + (-0.900960886469)*x[1]**o + (-0.96533912779)*x[1] + (-0.999896778251)*x[2]**o + (-0.84909434585)*x[2]
            ref[(0, 2, 1, 0)]=-1.62468130226-(-0.152410310726)*(o-1.)
            arg[(0, 2, 1, 1)]=0.00868526756601*x[0]**o + (0.5427342836)*x[0] + (0.249211991648)*x[1]**o + (-0.0856422228874)*x[1] + (-0.598422026794)*x[2]**o + (0.0237958425082)*x[2]
            ref[(0, 2, 1, 1)]=0.0701815678204-(-0.05675412793)*(o-1.)
            arg[(0, 2, 1, 2)]=0.616315675736*x[0]**o + (-0.57376182532)*x[0] + (0.0649627139086)*x[1]**o + (-0.932811690219)*x[1] + (-0.718209638959)*x[2]**o + (0.129791756979)*x[2]
            ref[(0, 2, 1, 2)]=-0.706856503937-(-0.00615520821905)*(o-1.)
            arg[(0, 2, 1, 3)]=0.466629179307*x[0]**o + (0.964463308359)*x[0] + (0.981061303163)*x[1]**o + (0.907997734593)*x[1] + (-0.202842793994)*x[2]**o + (0.889701549712)*x[2]
            ref[(0, 2, 1, 3)]=2.00350514057-(0.207474614746)*(o-1.)
            arg[(0, 2, 2, 0)]=0.890284302614*x[0]**o + (-0.972416174127)*x[0] + (-0.379619043052)*x[1]**o + (0.418694592288)*x[1] + (0.149549314113)*x[2]**o + (-0.929063471182)*x[2]
            ref[(0, 2, 2, 0)]=-0.411285239673-(0.110035762279)*(o-1.)
            arg[(0, 2, 2, 1)]=0.0145275267791*x[0]**o + (0.617708283445)*x[0] + (0.880498978761)*x[1]**o + (-0.0903627644324)*x[1] + (-0.875255916684)*x[2]**o + (0.410896258134)*x[2]
            ref[(0, 2, 2, 1)]=0.479006183001-(0.0032950981426)*(o-1.)
            arg[(0, 2, 2, 2)]=0.136307276821*x[0]**o + (-0.556577129751)*x[0] + (-0.533156446221)*x[1]**o + (-0.298568236245)*x[1] + (-0.711659154093)*x[2]**o + (-0.0898772389911)*x[2]
            ref[(0, 2, 2, 2)]=-1.02676546424-(-0.184751387249)*(o-1.)
            arg[(0, 2, 2, 3)]=-0.806212342096*x[0]**o + (-0.917690319915)*x[0] + (-0.607422785639)*x[1]**o + (-0.849688419251)*x[1] + (-0.632451053442)*x[2]**o + (0.116623972012)*x[2]
            ref[(0, 2, 2, 3)]=-1.84842047417-(-0.341014363529)*(o-1.)
            arg[(0, 2, 3, 0)]=0.44629972805*x[0]**o + (0.229977289719)*x[0] + (-0.921914353312)*x[1]**o + (-0.938565896778)*x[1] + (0.985988629379)*x[2]**o + (0.742248973969)*x[2]
            ref[(0, 2, 3, 0)]=0.272017185514-(0.0850623340195)*(o-1.)
            arg[(0, 2, 3, 1)]=0.0712872580557*x[0]**o + (0.492615496769)*x[0] + (0.0255855646706)*x[1]**o + (0.0962382900894)*x[1] + (0.0666913219214)*x[2]**o + (-0.754402468612)*x[2]
            ref[(0, 2, 3, 1)]=-0.000992268552833-(0.0272606907746)*(o-1.)
            arg[(0, 2, 3, 2)]=-0.611328337458*x[0]**o + (0.153727689132)*x[0] + (0.545888705151)*x[1]**o + (-0.273562558076)*x[1] + (-0.724037702754)*x[2]**o + (-0.66553932748)*x[2]
            ref[(0, 2, 3, 2)]=-0.787425765743-(-0.131579555844)*(o-1.)
            arg[(0, 2, 3, 3)]=0.424374071531*x[0]**o + (0.678348868412)*x[0] + (-0.298787126882)*x[1]**o + (0.497484603113)*x[1] + (0.121492202311)*x[2]**o + (-0.280535560511)*x[2]
            ref[(0, 2, 3, 3)]=0.571188528987-(0.0411798578267)*(o-1.)
            arg[(1, 0, 0, 0)]=-0.0514556705144*x[0]**o + (0.0715340014328)*x[0] + (0.762220429966)*x[1]**o + (-0.226686208251)*x[1] + (-0.42282742358)*x[2]**o + (0.680976641015)*x[2]
            ref[(1, 0, 0, 0)]=0.406880885034-(0.0479895559787)*(o-1.)
            arg[(1, 0, 0, 1)]=-0.625708653558*x[0]**o + (0.55493775364)*x[0] + (0.872169488157)*x[1]**o + (-0.000858775849666)*x[1] + (0.0131661064229)*x[2]**o + (-0.945381221771)*x[2]
            ref[(1, 0, 0, 1)]=-0.0658376514787-(0.0432711568371)*(o-1.)
            arg[(1, 0, 0, 2)]=0.594026948945*x[0]**o + (-0.900034666551)*x[0] + (-0.598505885945)*x[1]**o + (-0.724694642436)*x[1] + (-0.155949535817)*x[2]**o + (-0.241728195434)*x[2]
            ref[(1, 0, 0, 2)]=-1.01344298862-(-0.0267380788028)*(o-1.)
            arg[(1, 0, 0, 3)]=0.914973883649*x[0]**o + (-0.519959593851)*x[0] + (0.340130857946)*x[1]**o + (-0.863249477363)*x[1] + (-0.897148139392)*x[2]**o + (-0.173239345862)*x[2]
            ref[(1, 0, 0, 3)]=-0.599245907437-(0.0596594337003)*(o-1.)
            arg[(1, 0, 1, 0)]=0.801397006848*x[0]**o + (0.801032258247)*x[0] + (-0.29998453479)*x[1]**o + (-0.191542069201)*x[1] + (0.416405264233)*x[2]**o + (-0.58440321588)*x[2]
            ref[(1, 0, 1, 0)]=0.471452354729-(0.152969622715)*(o-1.)
            arg[(1, 0, 1, 1)]=-0.431741081964*x[0]**o + (0.269779522809)*x[0] + (-0.354121141814)*x[1]**o + (0.548017753102)*x[1] + (0.0923676442386)*x[2]**o + (-0.0597601283324)*x[2]
            ref[(1, 0, 1, 1)]=0.0322712840199-(-0.115582429923)*(o-1.)
            arg[(1, 0, 1, 2)]=0.782358649365*x[0]**o + (0.763948598813)*x[0] + (-0.173812420664)*x[1]**o + (0.0910787125876)*x[1] + (0.392549969312)*x[2]**o + (-0.307964166011)*x[2]
            ref[(1, 0, 1, 2)]=0.774079671702-(0.166849366336)*(o-1.)
            arg[(1, 0, 1, 3)]=0.283939186993*x[0]**o + (0.11578643294)*x[0] + (-0.681811431726)*x[1]**o + (-0.464892404105)*x[1] + (0.79072518326)*x[2]**o + (-0.736627502526)*x[2]
            ref[(1, 0, 1, 3)]=-0.346440267582-(0.0654754897544)*(o-1.)
            arg[(1, 0, 2, 0)]=-0.727091269598*x[0]**o + (-0.9933586895)*x[0] + (-0.14599390256)*x[1]**o + (-0.671037311059)*x[1] + (0.93149114748)*x[2]**o + (-0.707728410083)*x[2]
            ref[(1, 0, 2, 0)]=-1.15685921766-(0.00973432922037)*(o-1.)
            arg[(1, 0, 2, 1)]=0.537185682818*x[0]**o + (0.889371912868)*x[0] + (0.876358897753)*x[1]**o + (0.415961482249)*x[1] + (-0.763026205721)*x[2]**o + (0.563083845825)*x[2]
            ref[(1, 0, 2, 1)]=1.2594678079-(0.108419729142)*(o-1.)
            arg[(1, 0, 2, 2)]=-0.518346609151*x[0]**o + (0.173263481519)*x[0] + (0.17720688308)*x[1]**o + (-0.825375587073)*x[1] + (-0.606524333494)*x[2]**o + (0.629940354359)*x[2]
            ref[(1, 0, 2, 2)]=-0.48491790538-(-0.157944009927)*(o-1.)
            arg[(1, 0, 2, 3)]=-0.8031475383*x[0]**o + (-0.149456785091)*x[0] + (0.579845131265)*x[1]**o + (-0.909970669216)*x[1] + (0.863283021744)*x[2]**o + (0.016415073007)*x[2]
            ref[(1, 0, 2, 3)]=-0.201515883295-(0.106663435785)*(o-1.)
            arg[(1, 0, 3, 0)]=-0.722184121151*x[0]**o + (0.42154146061)*x[0] + (-0.495145830202)*x[1]**o + (0.690082812227)*x[1] + (0.89614432339)*x[2]**o + (0.956632934012)*x[2]
            ref[(1, 0, 3, 0)]=0.873535789443-(-0.0535309379938)*(o-1.)
            arg[(1, 0, 3, 1)]=-0.710348944787*x[0]**o + (0.597571171543)*x[0] + (0.530201978145)*x[1]**o + (0.686082191487)*x[1] + (0.855039835341)*x[2]**o + (0.494725092448)*x[2]
            ref[(1, 0, 3, 1)]=1.22663566209-(0.112482144783)*(o-1.)
            arg[(1, 0, 3, 2)]=0.656841736614*x[0]**o + (0.635062796574)*x[0] + (-0.884854552539)*x[1]**o + (-0.27083545249)*x[1] + (0.411658255344)*x[2]**o + (0.246157443326)*x[2]
            ref[(1, 0, 3, 2)]=0.397015113414-(0.0306075732365)*(o-1.)
            arg[(1, 0, 3, 3)]=0.752546921302*x[0]**o + (0.421838586471)*x[0] + (-0.377806186268)*x[1]**o + (0.502449825679)*x[1] + (0.301085799514)*x[2]**o + (0.426352887222)*x[2]
            ref[(1, 0, 3, 3)]=1.01323391696-(0.112637755758)*(o-1.)
            arg[(1, 1, 0, 0)]=-0.490639017106*x[0]**o + (-0.928367765483)*x[0] + (0.0781013815559)*x[1]**o + (0.607037250237)*x[1] + (-0.927970655587)*x[2]**o + (0.979662446411)*x[2]
            ref[(1, 1, 0, 0)]=-0.341088179986-(-0.223418048523)*(o-1.)
            arg[(1, 1, 0, 1)]=0.796006629877*x[0]**o + (0.91021935128)*x[0] + (0.134439618423)*x[1]**o + (-0.0969270704154)*x[1] + (-0.774583822491)*x[2]**o + (0.472915967461)*x[2]
            ref[(1, 1, 0, 1)]=0.721035337067-(0.0259770709682)*(o-1.)
            arg[(1, 1, 0, 2)]=0.866203947508*x[0]**o + (0.173306468414)*x[0] + (0.785967817438)*x[1]**o + (-0.492208175575)*x[1] + (-0.784464437563)*x[2]**o + (-0.893397675749)*x[2]
            ref[(1, 1, 0, 2)]=-0.172296027764-(0.144617887897)*(o-1.)
            arg[(1, 1, 0, 3)]=0.68216996518*x[0]**o + (0.80914676069)*x[0] + (-0.795327071145)*x[1]**o + (-0.569740693884)*x[1] + (-0.577622135992)*x[2]**o + (-0.968303460346)*x[2]
            ref[(1, 1, 0, 3)]=-0.709838317748-(-0.115129873659)*(o-1.)
            arg[(1, 1, 1, 0)]=-0.349683104688*x[0]**o + (-0.83567759917)*x[0] + (0.674940561688)*x[1]**o + (-0.416550465534)*x[1] + (0.549023930117)*x[2]**o + (-0.397683350473)*x[2]
            ref[(1, 1, 1, 0)]=-0.38781501403-(0.14571356452)*(o-1.)
            arg[(1, 1, 1, 1)]=0.238500714808*x[0]**o + (0.510382427361)*x[0] + (0.743529640439)*x[1]**o + (0.903706668788)*x[1] + (0.0916259635739)*x[2]**o + (-0.257717946922)*x[2]
            ref[(1, 1, 1, 1)]=1.11501373402-(0.178942719804)*(o-1.)
            arg[(1, 1, 1, 2)]=-0.258102436048*x[0]**o + (0.610111733372)*x[0] + (-0.250384392722)*x[1]**o + (0.439246718201)*x[1] + (-0.902408980651)*x[2]**o + (-0.449768438864)*x[2]
            ref[(1, 1, 1, 2)]=-0.405652898356-(-0.23514930157)*(o-1.)
            arg[(1, 1, 1, 3)]=0.588047818621*x[0]**o + (0.702768208086)*x[0] + (-0.501732916361)*x[1]**o + (-0.0533383761568)*x[1] + (-0.251507115184)*x[2]**o + (0.0618306151184)*x[2]
            ref[(1, 1, 1, 3)]=0.273034117062-(-0.0275320354873)*(o-1.)
            arg[(1, 1, 2, 0)]=0.663668206684*x[0]**o + (0.845221412384)*x[0] + (-0.530450254873)*x[1]**o + (-0.969676449759)*x[1] + (-0.592681728404)*x[2]**o + (-0.63081872176)*x[2]
            ref[(1, 1, 2, 0)]=-0.607368767864-(-0.0765772960989)*(o-1.)
            arg[(1, 1, 2, 1)]=-0.88227814515*x[0]**o + (0.593027275595)*x[0] + (-0.0817021221874)*x[1]**o + (0.023302251539)*x[1] + (-0.733306025083)*x[2]**o + (0.811186998277)*x[2]
            ref[(1, 1, 2, 1)]=-0.134884883505-(-0.282881048737)*(o-1.)
            arg[(1, 1, 2, 2)]=0.84598489369*x[0]**o + (-0.302571517044)*x[0] + (-0.403456735856)*x[1]**o + (0.644274957469)*x[1] + (-0.667734453925)*x[2]**o + (0.0233477681398)*x[2]
            ref[(1, 1, 2, 2)]=0.0699224562369-(-0.0375343826817)*(o-1.)
            arg[(1, 1, 2, 3)]=-0.480661027633*x[0]**o + (-0.06834600683)*x[0] + (-0.0217587949278)*x[1]**o + (0.524246508598)*x[1] + (0.17621895291)*x[2]**o + (0.430536037878)*x[2]
            ref[(1, 1, 2, 3)]=0.280117834998-(-0.0543668116084)*(o-1.)
            arg[(1, 1, 3, 0)]=-0.854241571941*x[0]**o + (0.0772009717218)*x[0] + (0.461497066488)*x[1]**o + (-0.160456143797)*x[1] + (0.309761257742)*x[2]**o + (-0.413368380792)*x[2]
            ref[(1, 1, 3, 0)]=-0.289803400289-(-0.0138305412851)*(o-1.)
            arg[(1, 1, 3, 1)]=0.941013631717*x[0]**o + (-0.306070039237)*x[0] + (0.744810539503)*x[1]**o + (-0.459368488957)*x[1] + (0.2596524328)*x[2]**o + (0.102788143506)*x[2]
            ref[(1, 1, 3, 1)]=0.641413109666-(0.32424610067)*(o-1.)
            arg[(1, 1, 3, 2)]=0.249299417876*x[0]**o + (0.681097020004)*x[0] + (-0.293245001436)*x[1]**o + (0.246577973759)*x[1] + (0.591391067616)*x[2]**o + (0.978248234378)*x[2]
            ref[(1, 1, 3, 2)]=1.2266843561-(0.0912409140093)*(o-1.)
            arg[(1, 1, 3, 3)]=0.826628292068*x[0]**o + (-0.743538007861)*x[0] + (0.379189583644)*x[1]**o + (0.311336063569)*x[1] + (-0.817120127712)*x[2]**o + (-0.281750617383)*x[2]
            ref[(1, 1, 3, 3)]=-0.162627406838-(0.064782958)*(o-1.)
            arg[(1, 2, 0, 0)]=-0.560639286099*x[0]**o + (-0.57763893434)*x[0] + (0.022103217656)*x[1]**o + (-0.750983747033)*x[1] + (-0.69256918888)*x[2]**o + (-0.947418904512)*x[2]
            ref[(1, 2, 0, 0)]=-1.7535734216-(-0.205184209554)*(o-1.)
            arg[(1, 2, 0, 1)]=-0.723716124344*x[0]**o + (0.492096444428)*x[0] + (-0.0993548678194)*x[1]**o + (-0.258938390605)*x[1] + (0.485853826503)*x[2]**o + (0.991101498774)*x[2]
            ref[(1, 2, 0, 1)]=0.443521193468-(-0.0562028609435)*(o-1.)
            arg[(1, 2, 0, 2)]=-0.393481448215*x[0]**o + (0.0768371179902)*x[0] + (0.506903923409)*x[1]**o + (-0.714300907835)*x[1] + (-0.364543775572)*x[2]**o + (-0.645565480848)*x[2]
            ref[(1, 2, 0, 2)]=-0.767075285536-(-0.041853550063)*(o-1.)
            arg[(1, 2, 0, 3)]=-0.380232340066*x[0]**o + (0.108226537313)*x[0] + (0.596738914399)*x[1]**o + (0.634102035402)*x[1] + (-0.531424251078)*x[2]**o + (0.581979828565)*x[2]
            ref[(1, 2, 0, 3)]=0.504695362267-(-0.0524862794574)*(o-1.)
            arg[(1, 2, 1, 0)]=0.958353526372*x[0]**o + (0.636207534439)*x[0] + (-0.857713907984)*x[1]**o + (-0.605286197568)*x[1] + (0.495497422314)*x[2]**o + (0.275500326496)*x[2]
            ref[(1, 2, 1, 0)]=0.451279352034-(0.0993561734502)*(o-1.)
            arg[(1, 2, 1, 1)]=-0.865828355134*x[0]**o + (0.760871330952)*x[0] + (-0.457665459279)*x[1]**o + (0.182288305685)*x[1] + (0.563091973729)*x[2]**o + (-0.208151891193)*x[2]
            ref[(1, 2, 1, 1)]=-0.0126970476199-(-0.126733640114)*(o-1.)
            arg[(1, 2, 1, 2)]=0.954957351295*x[0]**o + (-0.646811366035)*x[0] + (-0.292826483576)*x[1]**o + (-0.168394116148)*x[1] + (0.655781849986)*x[2]**o + (-0.239601110068)*x[2]
            ref[(1, 2, 1, 2)]=0.131553062727-(0.219652119617)*(o-1.)
            arg[(1, 2, 1, 3)]=-0.754624365649*x[0]**o + (0.832181113433)*x[0] + (0.103669521265)*x[1]**o + (-0.974149290414)*x[1] + (-0.967845990096)*x[2]**o + (-0.197189245947)*x[2]
            ref[(1, 2, 1, 3)]=-0.978979128704-(-0.26980013908)*(o-1.)
            arg[(1, 2, 2, 0)]=-0.89784666068*x[0]**o + (-0.970776508058)*x[0] + (0.981347190562)*x[1]**o + (-0.709278161535)*x[1] + (-0.276514414005)*x[2]**o + (-0.212685373608)*x[2]
            ref[(1, 2, 2, 0)]=-1.04287696366-(-0.0321689806873)*(o-1.)
            arg[(1, 2, 2, 1)]=-0.380259429242*x[0]**o + (0.0915512821974)*x[0] + (-0.640263684459)*x[1]**o + (0.778078776205)*x[1] + (-0.962372811871)*x[2]**o + (-0.640786249692)*x[2]
            ref[(1, 2, 2, 1)]=-0.877026058431-(-0.330482654262)*(o-1.)
            arg[(1, 2, 2, 2)]=-0.954870953352*x[0]**o + (0.190133348527)*x[0] + (-0.293465633395)*x[1]**o + (-0.308779198248)*x[1] + (-0.738214943271)*x[2]**o + (0.959293317836)*x[2]
            ref[(1, 2, 2, 2)]=-0.572952030952-(-0.33109192167)*(o-1.)
            arg[(1, 2, 2, 3)]=0.976258661975*x[0]**o + (0.0461771140924)*x[0] + (0.582929125213)*x[1]**o + (0.637478734048)*x[1] + (-0.918453979821)*x[2]**o + (0.828352186165)*x[2]
            ref[(1, 2, 2, 3)]=1.07637092084-(0.106788967894)*(o-1.)
            arg[(1, 2, 3, 0)]=0.913081109597*x[0]**o + (0.327165452751)*x[0] + (-0.614958356286)*x[1]**o + (0.640719507499)*x[1] + (0.294908145072)*x[2]**o + (-0.765107392463)*x[2]
            ref[(1, 2, 3, 0)]=0.397904233085-(0.0988384830639)*(o-1.)
            arg[(1, 2, 3, 1)]=0.611609032626*x[0]**o + (0.223947505014)*x[0] + (0.525829724584)*x[1]**o + (-0.364813486146)*x[1] + (0.0345186635141)*x[2]**o + (-0.271204913764)*x[2]
            ref[(1, 2, 3, 1)]=0.379943262914-(0.195326236787)*(o-1.)
            arg[(1, 2, 3, 2)]=0.0148556840287*x[0]**o + (-0.312261065398)*x[0] + (-0.836532012469)*x[1]**o + (-0.182227813656)*x[1] + (0.971062738105)*x[2]**o + (0.835780510337)*x[2]
            ref[(1, 2, 3, 2)]=0.245339020474-(0.0248977349441)*(o-1.)
            arg[(1, 2, 3, 3)]=0.752417943322*x[0]**o + (0.551150398597)*x[0] + (-0.00161246963317)*x[1]**o + (-0.325712183623)*x[1] + (0.0247979126448)*x[2]**o + (-0.873943479296)*x[2]
            ref[(1, 2, 3, 3)]=0.0635490610058-(0.129267231056)*(o-1.)
            arg[(2, 0, 0, 0)]=0.23351268236*x[0]**o + (0.13273157236)*x[0] + (0.291210964631)*x[1]**o + (-0.0436878058007)*x[1] + (0.843073012376)*x[2]**o + (-0.546681979671)*x[2]
            ref[(2, 0, 0, 0)]=0.455079223128-(0.227966109895)*(o-1.)
            arg[(2, 0, 0, 1)]=-0.785488593648*x[0]**o + (-0.731053744883)*x[0] + (0.755450100508)*x[1]**o + (-0.832097497205)*x[1] + (-0.341427333825)*x[2]**o + (-0.457912208299)*x[2]
            ref[(2, 0, 0, 1)]=-1.19626463868-(-0.0619109711609)*(o-1.)
            arg[(2, 0, 0, 2)]=-0.980763278762*x[0]**o + (0.941503105644)*x[0] + (0.399404179517)*x[1]**o + (0.555694381967)*x[1] + (-0.893468936886)*x[2]**o + (-0.864874643949)*x[2]
            ref[(2, 0, 0, 2)]=-0.421252596235-(-0.245804672689)*(o-1.)
            arg[(2, 0, 0, 3)]=0.502863532426*x[0]**o + (0.272946564252)*x[0] + (-0.459924427585)*x[1]**o + (0.85787704371)*x[1] + (0.0733146882975)*x[2]**o + (-0.358380506807)*x[2]
            ref[(2, 0, 0, 3)]=0.444348447146-(0.0193756321897)*(o-1.)
            arg[(2, 0, 1, 0)]=-0.521629267647*x[0]**o + (0.888363645677)*x[0] + (0.882577772848)*x[1]**o + (-0.714575646753)*x[1] + (-0.733242827454)*x[2]**o + (0.841697122018)*x[2]
            ref[(2, 0, 1, 0)]=0.321595399345-(-0.0620490537086)*(o-1.)
            arg[(2, 0, 1, 1)]=-0.196932763023*x[0]**o + (-0.896108499889)*x[0] + (-0.959246458257)*x[1]**o + (0.922846333692)*x[1] + (0.708905868962)*x[2]**o + (-0.387272997258)*x[2]
            ref[(2, 0, 1, 1)]=-0.403904257887-(-0.0745455587197)*(o-1.)
            arg[(2, 0, 1, 2)]=-0.45583064032*x[0]**o + (-0.637371498828)*x[0] + (-0.697899956087)*x[1]**o + (0.61051553434)*x[1] + (-0.923272297945)*x[2]**o + (0.284794164318)*x[2]
            ref[(2, 0, 1, 2)]=-0.909532347261-(-0.346167149059)*(o-1.)
            arg[(2, 0, 1, 3)]=0.0198028789913*x[0]**o + (-0.561357237352)*x[0] + (-0.130546609306)*x[1]**o + (-0.834258841217)*x[1] + (-0.565633278129)*x[2]**o + (-0.0620217992979)*x[2]
            ref[(2, 0, 1, 3)]=-1.06700744316-(-0.112729501407)*(o-1.)
            arg[(2, 0, 2, 0)]=0.233491783214*x[0]**o + (-0.740698403827)*x[0] + (0.947831100017)*x[1]**o + (0.651636248171)*x[1] + (-0.13015068966)*x[2]**o + (0.515230041262)*x[2]
            ref[(2, 0, 2, 0)]=0.738670039589-(0.175195365595)*(o-1.)
            arg[(2, 0, 2, 1)]=0.374959442917*x[0]**o + (-0.930298946781)*x[0] + (0.278149096882)*x[1]**o + (-0.362996081274)*x[1] + (0.0338220647483)*x[2]**o + (-0.978428854246)*x[2]
            ref[(2, 0, 2, 1)]=-0.792396638876-(0.114488434091)*(o-1.)
            arg[(2, 0, 2, 2)]=0.722605763261*x[0]**o + (-0.809054399511)*x[0] + (0.303788401259)*x[1]**o + (-0.235196635063)*x[1] + (0.760011221202)*x[2]**o + (-0.411949268846)*x[2]
            ref[(2, 0, 2, 2)]=0.165102541151-(0.297734230954)*(o-1.)
            arg[(2, 0, 2, 3)]=0.769177864541*x[0]**o + (0.854909478251)*x[0] + (0.294948975333)*x[1]**o + (0.405116302569)*x[1] + (-0.715231815182)*x[2]**o + (0.993255863285)*x[2]
            ref[(2, 0, 2, 3)]=1.3010883344-(0.0581491707819)*(o-1.)
            arg[(2, 0, 3, 0)]=-0.163700185062*x[0]**o + (-0.665099258526)*x[0] + (-0.941887496361)*x[1]**o + (-0.649548456645)*x[1] + (0.265810538645)*x[2]**o + (0.350855255957)*x[2]
            ref[(2, 0, 3, 0)]=-0.901784800996-(-0.13996285713)*(o-1.)
            arg[(2, 0, 3, 1)]=0.122804077635*x[0]**o + (0.334683935959)*x[0] + (0.678816172149)*x[1]**o + (-0.338054426771)*x[1] + (-0.974528918805)*x[2]**o + (0.109458464651)*x[2]
            ref[(2, 0, 3, 1)]=-0.0334103475905-(-0.0288181115034)*(o-1.)
            arg[(2, 0, 3, 2)]=0.228071868586*x[0]**o + (0.144637199848)*x[0] + (0.760332622168)*x[1]**o + (-0.98280763392)*x[1] + (0.66781178085)*x[2]**o + (-0.65916719795)*x[2]
            ref[(2, 0, 3, 2)]=0.0794393197906-(0.276036045267)*(o-1.)
            arg[(2, 0, 3, 3)]=-0.455506583643*x[0]**o + (-0.685525947653)*x[0] + (-0.275160984338)*x[1]**o + (-0.663250246043)*x[1] + (-0.825243340258)*x[2]**o + (0.0663727439017)*x[2]
            ref[(2, 0, 3, 3)]=-1.41915717902-(-0.259318484707)*(o-1.)
            arg[(2, 1, 0, 0)]=-0.320266588849*x[0]**o + (-0.0537224550665)*x[0] + (-0.744123765728)*x[1]**o + (-0.0413957033788)*x[1] + (-0.283181930061)*x[2]**o + (-0.189030007373)*x[2]
            ref[(2, 1, 0, 0)]=-0.815860225228-(-0.224595380773)*(o-1.)
            arg[(2, 1, 0, 1)]=0.840296323916*x[0]**o + (0.913890278514)*x[0] + (0.431581780994)*x[1]**o + (0.380130814273)*x[1] + (0.207448441484)*x[2]**o + (0.984424468039)*x[2]
            ref[(2, 1, 0, 1)]=1.87888605361-(0.246554424399)*(o-1.)
            arg[(2, 1, 0, 2)]=-0.974543350638*x[0]**o + (-0.800579405568)*x[0] + (0.603419034192)*x[1]**o + (-0.837208359601)*x[1] + (-0.898182393676)*x[2]**o + (0.139376525716)*x[2]
            ref[(2, 1, 0, 2)]=-1.38385897479-(-0.211551118354)*(o-1.)
            arg[(2, 1, 0, 3)]=0.887944910649*x[0]**o + (-0.793331839267)*x[0] + (0.631745331113)*x[1]**o + (-0.893805738023)*x[1] + (0.854475550937)*x[2]**o + (0.309402328535)*x[2]
            ref[(2, 1, 0, 3)]=0.498215271972-(0.395694298783)*(o-1.)
            arg[(2, 1, 1, 0)]=-0.719950356168*x[0]**o + (-0.0339363064915)*x[0] + (-0.00811166350548)*x[1]**o + (0.382040736233)*x[1] + (0.717345920274)*x[2]**o + (0.143159120364)*x[2]
            ref[(2, 1, 1, 0)]=0.240273725352-(-0.00178601656662)*(o-1.)
            arg[(2, 1, 1, 1)]=-0.493431721082*x[0]**o + (0.669211111633)*x[0] + (0.917527342639)*x[1]**o + (-0.0504457381062)*x[1] + (0.787600111832)*x[2]**o + (0.187478525675)*x[2]
            ref[(2, 1, 1, 1)]=1.0089698163-(0.201949288898)*(o-1.)
            arg[(2, 1, 1, 2)]=-0.472556687108*x[0]**o + (0.841316754042)*x[0] + (0.778970135484)*x[1]**o + (-0.863519463777)*x[1] + (0.00925359244753)*x[2]**o + (-0.569177019167)*x[2]
            ref[(2, 1, 1, 2)]=-0.137856344039-(0.0526111734706)*(o-1.)
            arg[(2, 1, 1, 3)]=-0.688798045058*x[0]**o + (-0.835493345141)*x[0] + (0.862942053437)*x[1]**o + (-0.475587235656)*x[1] + (-0.52393209211)*x[2]**o + (0.435224415763)*x[2]
            ref[(2, 1, 1, 3)]=-0.612822124383-(-0.0582980139552)*(o-1.)
            arg[(2, 1, 2, 0)]=-0.177092866048*x[0]**o + (-0.733328798855)*x[0] + (-0.806015056506)*x[1]**o + (-0.14175997472)*x[1] + (0.465933021436)*x[2]**o + (-0.874263913906)*x[2]
            ref[(2, 1, 2, 0)]=-1.1332637943-(-0.086195816853)*(o-1.)
            arg[(2, 1, 2, 1)]=-0.364025196942*x[0]**o + (0.953743717725)*x[0] + (0.731333356937)*x[1]**o + (0.953166630802)*x[1] + (-0.232987993658)*x[2]**o + (-0.411618490869)*x[2]
            ref[(2, 1, 2, 1)]=0.814806011997-(0.0223866943894)*(o-1.)
            arg[(2, 1, 2, 2)]=0.550104456622*x[0]**o + (-0.59451682663)*x[0] + (0.610495971111)*x[1]**o + (-0.636525913451)*x[1] + (0.197875928018)*x[2]**o + (-0.290199140402)*x[2]
            ref[(2, 1, 2, 2)]=-0.0813827623656-(0.226412725958)*(o-1.)
            arg[(2, 1, 2, 3)]=0.610492540005*x[0]**o + (-0.723753301115)*x[0] + (0.607727713791)*x[1]**o + (0.755056053397)*x[1] + (-0.827461630523)*x[2]**o + (-0.210253074148)*x[2]
            ref[(2, 1, 2, 3)]=0.105904150703-(0.0651264372122)*(o-1.)
            arg[(2, 1, 3, 0)]=0.92033858585*x[0]**o + (-0.740980200722)*x[0] + (-0.857095299571)*x[1]**o + (0.732589406418)*x[1] + (-0.0287794052089)*x[2]**o + (-0.088198011159)*x[2]
            ref[(2, 1, 3, 0)]=-0.0310624621965-(0.00574398017841)*(o-1.)
            arg[(2, 1, 3, 1)]=-0.223300062518*x[0]**o + (-0.579800192342)*x[0] + (0.32354044181)*x[1]**o + (-0.439865652754)*x[1] + (-0.303741470763)*x[2]**o + (-0.247641841873)*x[2]
            ref[(2, 1, 3, 1)]=-0.73540438922-(-0.0339168485786)*(o-1.)
            arg[(2, 1, 3, 2)]=0.775566720203*x[0]**o + (0.197284940572)*x[0] + (-0.289628120756)*x[1]**o + (-0.309838481291)*x[1] + (-0.660994527471)*x[2]**o + (-0.960331959408)*x[2]
            ref[(2, 1, 3, 2)]=-0.623970714076-(-0.0291759880042)*(o-1.)
            arg[(2, 1, 3, 3)]=-0.716973925255*x[0]**o + (0.502453749235)*x[0] + (-0.690213260468)*x[1]**o + (0.571935151242)*x[1] + (0.0782401550949)*x[2]**o + (0.64559024807)*x[2]
            ref[(2, 1, 3, 3)]=0.19551605896-(-0.221491171771)*(o-1.)
            arg[(2, 2, 0, 0)]=-0.508541638109*x[0]**o + (0.280396715296)*x[0] + (-0.485267805854)*x[1]**o + (0.985386156266)*x[1] + (0.657173153984)*x[2]**o + (-0.222904071472)*x[2]
            ref[(2, 2, 0, 0)]=0.353121255055-(-0.0561060483298)*(o-1.)
            arg[(2, 2, 0, 1)]=-0.668935210657*x[0]**o + (0.0495721358499)*x[0] + (0.411342558498)*x[1]**o + (0.793649443992)*x[1] + (-0.179175254923)*x[2]**o + (-0.073927984289)*x[2]
            ref[(2, 2, 0, 1)]=0.166262844235-(-0.0727946511804)*(o-1.)
            arg[(2, 2, 0, 2)]=0.488371927468*x[0]**o + (0.258258957146)*x[0] + (0.878129176402)*x[1]**o + (-0.261982529283)*x[1] + (0.367313407655)*x[2]**o + (-0.0824483483016)*x[2]
            ref[(2, 2, 0, 2)]=0.823821295543-(0.288969085254)*(o-1.)
            arg[(2, 2, 0, 3)]=-0.21232669675*x[0]**o + (0.401265781136)*x[0] + (-0.45768313629)*x[1]**o + (-0.632523924892)*x[1] + (-0.399722450756)*x[2]**o + (0.849569082729)*x[2]
            ref[(2, 2, 0, 3)]=-0.225710672411-(-0.178288713966)*(o-1.)
            arg[(2, 2, 1, 0)]=0.123619257307*x[0]**o + (0.561230893479)*x[0] + (0.0137418988097)*x[1]**o + (0.42405558883)*x[1] + (0.108551220493)*x[2]**o + (0.752199431131)*x[2]
            ref[(2, 2, 1, 0)]=0.991699145025-(0.0409853961016)*(o-1.)
            arg[(2, 2, 1, 1)]=-0.481485371605*x[0]**o + (-0.274995613245)*x[0] + (0.0454727888784)*x[1]**o + (0.323992019924)*x[1] + (-0.361922612865)*x[2]**o + (0.390852474968)*x[2]
            ref[(2, 2, 1, 1)]=-0.179043156972-(-0.132989199265)*(o-1.)
            arg[(2, 2, 1, 2)]=-0.0153757319845*x[0]**o + (-0.552729795345)*x[0] + (0.614221400001)*x[1]**o + (0.618352890746)*x[1] + (0.76572378065)*x[2]**o + (0.626222589409)*x[2]
            ref[(2, 2, 1, 2)]=1.02820756674-(0.227428241444)*(o-1.)
            arg[(2, 2, 1, 3)]=-0.87267644894*x[0]**o + (-0.172672661484)*x[0] + (-0.580101164455)*x[1]**o + (-0.407810090662)*x[1] + (0.43506057212)*x[2]**o + (-0.0509994633945)*x[2]
            ref[(2, 2, 1, 3)]=-0.824599628408-(-0.169619506879)*(o-1.)
            arg[(2, 2, 2, 0)]=0.00678055098736*x[0]**o + (-0.831304474892)*x[0] + (-0.303110528832)*x[1]**o + (-0.262523193641)*x[1] + (0.722144305488)*x[2]**o + (-0.362766007507)*x[2]
            ref[(2, 2, 2, 0)]=-0.515389674199-(0.0709690546072)*(o-1.)
            arg[(2, 2, 2, 1)]=-0.713121393109*x[0]**o + (0.321363799783)*x[0] + (0.412880982184)*x[1]**o + (-0.91416788028)*x[1] + (-0.798894331233)*x[2]**o + (0.96302576506)*x[2]
            ref[(2, 2, 2, 1)]=-0.364456528798-(-0.183189123693)*(o-1.)
            arg[(2, 2, 2, 2)]=0.140487039377*x[0]**o + (-0.747790060011)*x[0] + (-0.837344254443)*x[1]**o + (0.233625684195)*x[1] + (0.637267778782)*x[2]**o + (-0.58996216453)*x[2]
            ref[(2, 2, 2, 2)]=-0.581857988314-(-0.00993157271385)*(o-1.)
            arg[(2, 2, 2, 3)]=-0.717753182415*x[0]**o + (-0.873253754699)*x[0] + (-0.0833743331569)*x[1]**o + (0.826493977661)*x[1] + (-0.203388242541)*x[2]**o + (0.319800792693)*x[2]
            ref[(2, 2, 2, 3)]=-0.365737371228-(-0.167419293019)*(o-1.)
            arg[(2, 2, 3, 0)]=0.973599073775*x[0]**o + (-0.215586605756)*x[0] + (0.0240522084885)*x[1]**o + (-0.615914326286)*x[1] + (0.152155566663)*x[2]**o + (0.714631299193)*x[2]
            ref[(2, 2, 3, 0)]=0.516468608039-(0.191634474821)*(o-1.)
            arg[(2, 2, 3, 1)]=0.479602697889*x[0]**o + (0.634309975024)*x[0] + (-0.0136905469514)*x[1]**o + (-0.382112119422)*x[1] + (0.973761199581)*x[2]**o + (0.530924452082)*x[2]
            ref[(2, 2, 3, 1)]=1.1113978291-(0.23994555842)*(o-1.)
            arg[(2, 2, 3, 2)]=-0.220400682161*x[0]**o + (-0.172123032387)*x[0] + (-0.904698357617)*x[1]**o + (0.823247648693)*x[1] + (0.437266746997)*x[2]**o + (-0.956294277006)*x[2]
            ref[(2, 2, 3, 2)]=-0.49650097674-(-0.114638715463)*(o-1.)
            arg[(2, 2, 3, 3)]=-0.401472640652*x[0]**o + (0.35890617894)*x[0] + (0.372382593062)*x[1]**o + (-0.17092268251)*x[1] + (-0.380394197899)*x[2]**o + (0.12557670105)*x[2]
            ref[(2, 2, 3, 3)]=-0.0479620240048-(-0.0682473742481)*(o-1.)
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.174858053965*x[0]**o + (-0.945998817953)*x[0] + (0.575517588696)*x[1]**o + (-0.484956804035)*x[1]
            ref=0.750375642661*(1+2.*(dim-1)/(o+1.)) + (-1.43095562199)*dim
        else:
            arg=0.798410840396*x[0]**o + (0.245434864153)*x[0] + (0.147154668895)*x[1]**o + (0.0232214584935)*x[1] + (0.473318037759)*x[2]**o + (0.496323144351)*x[2]
            ref=1.41888354705*(1+2.*(dim-1)/(o+1.)) + (0.764979466997)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.639239401127*x[0]**o + (-0.840932012321)*x[0] + (0.0838610757373)*x[1]**o + (0.145929778245)*x[1]
            ref[(0,)]=0.723100476864*(1+2.*(dim-1)/(o+1.)) + (-0.695002234076)*dim
            arg[(1,)]=0.478830703396*x[0]**o + (0.0828399643409)*x[0] + (0.192262544783)*x[1]**o + (0.345685313048)*x[1]
            ref[(1,)]=0.67109324818*(1+2.*(dim-1)/(o+1.)) + (0.428525277389)*dim
            arg[(2,)]=-0.0387436274564*x[0]**o + (0.422546672806)*x[0] + (-0.749271400262)*x[1]**o + (0.333077624365)*x[1]
            ref[(2,)]=-0.788015027718*(1+2.*(dim-1)/(o+1.)) + (0.755624297171)*dim
        else:
            arg[(0,)]=0.548695248563*x[0]**o + (-0.682040581903)*x[0] + (-0.341863734446)*x[1]**o + (0.654239781251)*x[1] + (-0.501335128025)*x[2]**o + (-0.0495621778434)*x[2]
            ref[(0,)]=-0.294503613907*(1+2.*(dim-1)/(o+1.)) + (-0.0773629784954)*dim
            arg[(1,)]=0.309529963436*x[0]**o + (0.96735487183)*x[0] + (-0.846090058351)*x[1]**o + (0.0662092798971)*x[1] + (-0.383424382074)*x[2]**o + (0.211595257901)*x[2]
            ref[(1,)]=-0.919984476989*(1+2.*(dim-1)/(o+1.)) + (1.24515940963)*dim
            arg[(2,)]=-0.806520776614*x[0]**o + (-0.658210646078)*x[0] + (-0.372689241417)*x[1]**o + (-0.514008027919)*x[1] + (0.728110855309)*x[2]**o + (-0.0240482224881)*x[2]
            ref[(2,)]=-0.451099162722*(1+2.*(dim-1)/(o+1.)) + (-1.19626689649)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.00281689268589*x[0]**o + (-0.599053573894)*x[0] + (0.341216299776)*x[1]**o + (0.831391127218)*x[1]
            ref[(0, 0)]=0.344033192462*(1+2.*(dim-1)/(o+1.)) + (0.232337553324)*dim
            arg[(0, 1)]=0.685324632442*x[0]**o + (-0.892447784037)*x[0] + (-0.806391988895)*x[1]**o + (-0.138084472608)*x[1]
            ref[(0, 1)]=-0.121067356453*(1+2.*(dim-1)/(o+1.)) + (-1.03053225664)*dim
            arg[(0, 2)]=0.0637010302954*x[0]**o + (0.557138416718)*x[0] + (0.454333052629)*x[1]**o + (-0.296985850209)*x[1]
            ref[(0, 2)]=0.518034082925*(1+2.*(dim-1)/(o+1.)) + (0.260152566509)*dim
            arg[(0, 3)]=0.708568413905*x[0]**o + (0.733652798817)*x[0] + (-0.0994552283673)*x[1]**o + (0.351006900395)*x[1]
            ref[(0, 3)]=0.609113185538*(1+2.*(dim-1)/(o+1.)) + (1.08465969921)*dim
            arg[(1, 0)]=-0.169449290404*x[0]**o + (-0.447440129966)*x[0] + (-0.00649343393211)*x[1]**o + (-0.495267446008)*x[1]
            ref[(1, 0)]=-0.175942724336*(1+2.*(dim-1)/(o+1.)) + (-0.942707575974)*dim
            arg[(1, 1)]=0.258363816009*x[0]**o + (0.941223438299)*x[0] + (-0.884999853667)*x[1]**o + (-0.972956529379)*x[1]
            ref[(1, 1)]=-0.626636037657*(1+2.*(dim-1)/(o+1.)) + (-0.0317330910805)*dim
            arg[(1, 2)]=-0.0177784190147*x[0]**o + (-0.959091875101)*x[0] + (0.623277840206)*x[1]**o + (0.73403938938)*x[1]
            ref[(1, 2)]=0.605499421191*(1+2.*(dim-1)/(o+1.)) + (-0.225052485721)*dim
            arg[(1, 3)]=-0.255674533965*x[0]**o + (0.301554463064)*x[0] + (-0.0667366583377)*x[1]**o + (0.767812827038)*x[1]
            ref[(1, 3)]=-0.322411192303*(1+2.*(dim-1)/(o+1.)) + (1.0693672901)*dim
            arg[(2, 0)]=-0.178233700425*x[0]**o + (0.994408099597)*x[0] + (-0.779865434918)*x[1]**o + (-0.848800364285)*x[1]
            ref[(2, 0)]=-0.958099135343*(1+2.*(dim-1)/(o+1.)) + (0.145607735311)*dim
            arg[(2, 1)]=0.365185298277*x[0]**o + (-0.160005809133)*x[0] + (-0.0425354878604)*x[1]**o + (-0.659472512434)*x[1]
            ref[(2, 1)]=0.322649810417*(1+2.*(dim-1)/(o+1.)) + (-0.819478321567)*dim
            arg[(2, 2)]=0.0447661924425*x[0]**o + (-0.427496080621)*x[0] + (0.82664346246)*x[1]**o + (0.120620141974)*x[1]
            ref[(2, 2)]=0.871409654903*(1+2.*(dim-1)/(o+1.)) + (-0.306875938646)*dim
            arg[(2, 3)]=-0.78841076378*x[0]**o + (-0.33922155701)*x[0] + (0.331534109072)*x[1]**o + (0.427882479718)*x[1]
            ref[(2, 3)]=-0.456876654707*(1+2.*(dim-1)/(o+1.)) + (0.0886609227073)*dim
            arg[(3, 0)]=0.659930114842*x[0]**o + (-0.150901798223)*x[0] + (-0.866671736794)*x[1]**o + (0.0291057241318)*x[1]
            ref[(3, 0)]=-0.206741621953*(1+2.*(dim-1)/(o+1.)) + (-0.121796074091)*dim
            arg[(3, 1)]=0.868504890473*x[0]**o + (0.349587051255)*x[0] + (-0.86810301648)*x[1]**o + (-0.999586090305)*x[1]
            ref[(3, 1)]=0.00040187399353*(1+2.*(dim-1)/(o+1.)) + (-0.64999903905)*dim
            arg[(3, 2)]=-0.707249664156*x[0]**o + (-0.094807477351)*x[0] + (0.0299521986117)*x[1]**o + (0.630043225106)*x[1]
            ref[(3, 2)]=-0.677297465545*(1+2.*(dim-1)/(o+1.)) + (0.535235747755)*dim
            arg[(3, 3)]=0.578709133817*x[0]**o + (0.941791730612)*x[0] + (-0.470764656687)*x[1]**o + (0.10850660199)*x[1]
            ref[(3, 3)]=0.107944477129*(1+2.*(dim-1)/(o+1.)) + (1.0502983326)*dim
        else:
            arg[(0, 0)]=-0.236346795562*x[0]**o + (0.574817780141)*x[0] + (0.506017237447)*x[1]**o + (-0.854902847659)*x[1] + (-0.727669468233)*x[2]**o + (-0.146476233562)*x[2]
            ref[(0, 0)]=-0.457999026348*(1+2.*(dim-1)/(o+1.)) + (-0.42656130108)*dim
            arg[(0, 1)]=-0.442064009977*x[0]**o + (-0.344949982707)*x[0] + (-0.650245974061)*x[1]**o + (0.862666498507)*x[1] + (-0.52124062098)*x[2]**o + (0.77195236102)*x[2]
            ref[(0, 1)]=-1.61355060502*(1+2.*(dim-1)/(o+1.)) + (1.28966887682)*dim
            arg[(0, 2)]=0.747148497326*x[0]**o + (0.984891632506)*x[0] + (-0.755463725667)*x[1]**o + (-0.885953469453)*x[1] + (-0.904595004495)*x[2]**o + (0.79409090374)*x[2]
            ref[(0, 2)]=-0.912910232836*(1+2.*(dim-1)/(o+1.)) + (0.893029066793)*dim
            arg[(0, 3)]=0.374796972762*x[0]**o + (-0.645286024124)*x[0] + (-0.560555882037)*x[1]**o + (-0.946031780389)*x[1] + (0.762752743884)*x[2]**o + (0.443546991633)*x[2]
            ref[(0, 3)]=0.576993834609*(1+2.*(dim-1)/(o+1.)) + (-1.14777081288)*dim
            arg[(1, 0)]=0.751888689606*x[0]**o + (0.305853104319)*x[0] + (0.398615027449)*x[1]**o + (0.373394308214)*x[1] + (0.0255714194064)*x[2]**o + (0.356738682925)*x[2]
            ref[(1, 0)]=1.17607513646*(1+2.*(dim-1)/(o+1.)) + (1.03598609546)*dim
            arg[(1, 1)]=0.859327924933*x[0]**o + (-0.439133057203)*x[0] + (0.3764209733)*x[1]**o + (-0.429384492228)*x[1] + (0.161888445313)*x[2]**o + (-0.333398372037)*x[2]
            ref[(1, 1)]=1.39763734355*(1+2.*(dim-1)/(o+1.)) + (-1.20191592147)*dim
            arg[(1, 2)]=0.217996213414*x[0]**o + (-0.092359887371)*x[0] + (-0.0799811046365)*x[1]**o + (0.824133790641)*x[1] + (-0.933194214562)*x[2]**o + (0.300065425613)*x[2]
            ref[(1, 2)]=-0.795179105785*(1+2.*(dim-1)/(o+1.)) + (1.03183932888)*dim
            arg[(1, 3)]=0.983121916969*x[0]**o + (0.703961121359)*x[0] + (0.394976847846)*x[1]**o + (0.871808882846)*x[1] + (0.516709795318)*x[2]**o + (0.254794354004)*x[2]
            ref[(1, 3)]=1.89480856013*(1+2.*(dim-1)/(o+1.)) + (1.83056435821)*dim
            arg[(2, 0)]=-0.325301097703*x[0]**o + (0.6403131785)*x[0] + (0.429364805953)*x[1]**o + (-0.590503945807)*x[1] + (0.415753003649)*x[2]**o + (0.358279889005)*x[2]
            ref[(2, 0)]=0.519816711899*(1+2.*(dim-1)/(o+1.)) + (0.408089121698)*dim
            arg[(2, 1)]=0.464066318679*x[0]**o + (0.695863414095)*x[0] + (0.409093469168)*x[1]**o + (-0.276052632311)*x[1] + (0.281051462502)*x[2]**o + (-0.668976760409)*x[2]
            ref[(2, 1)]=1.15421125035*(1+2.*(dim-1)/(o+1.)) + (-0.249165978625)*dim
            arg[(2, 2)]=0.672499181606*x[0]**o + (0.44070129759)*x[0] + (0.649528695793)*x[1]**o + (-0.115447466172)*x[1] + (-0.878012564199)*x[2]**o + (-0.00915974441512)*x[2]
            ref[(2, 2)]=0.444015313201*(1+2.*(dim-1)/(o+1.)) + (0.316094087003)*dim
            arg[(2, 3)]=-0.127017861149*x[0]**o + (-0.826186907156)*x[0] + (-0.726836074382)*x[1]**o + (-0.84727349082)*x[1] + (-0.917856471554)*x[2]**o + (0.230069788566)*x[2]
            ref[(2, 3)]=-1.77171040709*(1+2.*(dim-1)/(o+1.)) + (-1.44339060941)*dim
            arg[(3, 0)]=0.427289921319*x[0]**o + (0.481650887599)*x[0] + (0.969360496569)*x[1]**o + (0.0375448135316)*x[1] + (-0.776336955588)*x[2]**o + (0.0998972804332)*x[2]
            ref[(3, 0)]=0.620313462299*(1+2.*(dim-1)/(o+1.)) + (0.619092981564)*dim
            arg[(3, 1)]=0.462144042247*x[0]**o + (0.410825856067)*x[0] + (-0.366892386047)*x[1]**o + (-0.484731677828)*x[1] + (-0.586900496405)*x[2]**o + (-0.435147252735)*x[2]
            ref[(3, 1)]=-0.491648840204*(1+2.*(dim-1)/(o+1.)) + (-0.509053074495)*dim
            arg[(3, 2)]=0.41571682089*x[0]**o + (0.721170950357)*x[0] + (-0.987962106035)*x[1]**o + (-0.55736717854)*x[1] + (-0.523680931356)*x[2]**o + (-0.736050599335)*x[2]
            ref[(3, 2)]=-1.0959262165*(1+2.*(dim-1)/(o+1.)) + (-0.572246827518)*dim
            arg[(3, 3)]=-0.142879981684*x[0]**o + (0.797508856165)*x[0] + (-0.907272239864)*x[1]**o + (-0.460956857122)*x[1] + (-0.329794776665)*x[2]**o + (0.000208759036622)*x[2]
            ref[(3, 3)]=-1.37994699821*(1+2.*(dim-1)/(o+1.)) + (0.336760758079)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3),w)
        ref=numpy.zeros((2, 2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.859166094222*x[0]**o + (0.706821492324)*x[0] + (-0.940079612964)*x[1]**o + (0.415851679477)*x[1]
            ref[(0, 0, 0)]=-1.79924570719*(1+2.*(dim-1)/(o+1.)) + (1.1226731718)*dim
            arg[(0, 0, 1)]=-0.481029194305*x[0]**o + (0.130686027975)*x[0] + (0.254959060974)*x[1]**o + (-0.393421541761)*x[1]
            ref[(0, 0, 1)]=-0.226070133331*(1+2.*(dim-1)/(o+1.)) + (-0.262735513785)*dim
            arg[(0, 0, 2)]=-0.994063641039*x[0]**o + (-0.751010617253)*x[0] + (-0.091379145171)*x[1]**o + (0.417623812155)*x[1]
            ref[(0, 0, 2)]=-1.08544278621*(1+2.*(dim-1)/(o+1.)) + (-0.333386805097)*dim
            arg[(0, 1, 0)]=-0.37290704308*x[0]**o + (0.918206057983)*x[0] + (-0.457335831155)*x[1]**o + (0.448316822249)*x[1]
            ref[(0, 1, 0)]=-0.830242874235*(1+2.*(dim-1)/(o+1.)) + (1.36652288023)*dim
            arg[(0, 1, 1)]=-0.139711654642*x[0]**o + (-0.0279555597376)*x[0] + (0.832680231121)*x[1]**o + (-0.48817777059)*x[1]
            ref[(0, 1, 1)]=0.692968576479*(1+2.*(dim-1)/(o+1.)) + (-0.516133330328)*dim
            arg[(0, 1, 2)]=0.928245273577*x[0]**o + (0.736866969669)*x[0] + (-0.648724337488)*x[1]**o + (0.962377390224)*x[1]
            ref[(0, 1, 2)]=0.279520936089*(1+2.*(dim-1)/(o+1.)) + (1.69924435989)*dim
            arg[(1, 0, 0)]=-0.0275102859567*x[0]**o + (0.775144756319)*x[0] + (0.255216914142)*x[1]**o + (0.427902433532)*x[1]
            ref[(1, 0, 0)]=0.227706628185*(1+2.*(dim-1)/(o+1.)) + (1.20304718985)*dim
            arg[(1, 0, 1)]=-0.888078672754*x[0]**o + (0.184483879608)*x[0] + (-0.242024748397)*x[1]**o + (0.874653901289)*x[1]
            ref[(1, 0, 1)]=-1.13010342115*(1+2.*(dim-1)/(o+1.)) + (1.0591377809)*dim
            arg[(1, 0, 2)]=-0.0844612160576*x[0]**o + (-0.484912298065)*x[0] + (-0.759607826912)*x[1]**o + (-0.421075583807)*x[1]
            ref[(1, 0, 2)]=-0.84406904297*(1+2.*(dim-1)/(o+1.)) + (-0.905987881871)*dim
            arg[(1, 1, 0)]=-0.408163808985*x[0]**o + (0.652332224346)*x[0] + (-0.780463393291)*x[1]**o + (-0.821310200339)*x[1]
            ref[(1, 1, 0)]=-1.18862720228*(1+2.*(dim-1)/(o+1.)) + (-0.168977975993)*dim
            arg[(1, 1, 1)]=-0.826862048275*x[0]**o + (-0.771905344581)*x[0] + (-0.0467799681172)*x[1]**o + (-0.0878784482851)*x[1]
            ref[(1, 1, 1)]=-0.873642016392*(1+2.*(dim-1)/(o+1.)) + (-0.859783792866)*dim
            arg[(1, 1, 2)]=-0.779440771231*x[0]**o + (0.781425962393)*x[0] + (-0.80724638009)*x[1]**o + (0.456257247752)*x[1]
            ref[(1, 1, 2)]=-1.58668715132*(1+2.*(dim-1)/(o+1.)) + (1.23768321014)*dim
        else:
            arg[(0, 0, 0)]=-0.699349071159*x[0]**o + (0.702521650285)*x[0] + (0.0972432865699)*x[1]**o + (-0.424939502913)*x[1] + (0.531132033269)*x[2]**o + (-0.24182742054)*x[2]
            ref[(0, 0, 0)]=-0.0709737513199*(1+2.*(dim-1)/(o+1.)) + (0.0357547268312)*dim
            arg[(0, 0, 1)]=-0.832123993187*x[0]**o + (0.278841344837)*x[0] + (0.462236712064)*x[1]**o + (0.677351267557)*x[1] + (0.162232754278)*x[2]**o + (-0.83176521086)*x[2]
            ref[(0, 0, 1)]=-0.207654526845*(1+2.*(dim-1)/(o+1.)) + (0.124427401533)*dim
            arg[(0, 0, 2)]=0.644128330381*x[0]**o + (0.206644279135)*x[0] + (0.215868980823)*x[1]**o + (0.421764500434)*x[1] + (0.49176309827)*x[2]**o + (0.280993578282)*x[2]
            ref[(0, 0, 2)]=1.35176040947*(1+2.*(dim-1)/(o+1.)) + (0.909402357851)*dim
            arg[(0, 1, 0)]=0.392546322884*x[0]**o + (0.781198850664)*x[0] + (-0.254324362683)*x[1]**o + (-0.630322865424)*x[1] + (-0.360293460577)*x[2]**o + (-0.78168457862)*x[2]
            ref[(0, 1, 0)]=-0.222071500376*(1+2.*(dim-1)/(o+1.)) + (-0.63080859338)*dim
            arg[(0, 1, 1)]=-0.143947009797*x[0]**o + (0.950604376519)*x[0] + (0.0218545522273)*x[1]**o + (0.836522992551)*x[1] + (-0.969838768546)*x[2]**o + (0.127479564396)*x[2]
            ref[(0, 1, 1)]=-1.09193122612*(1+2.*(dim-1)/(o+1.)) + (1.91460693347)*dim
            arg[(0, 1, 2)]=-0.265989321174*x[0]**o + (-0.792937828603)*x[0] + (0.328976757407)*x[1]**o + (0.675726998931)*x[1] + (-0.843113051408)*x[2]**o + (-0.00303771877944)*x[2]
            ref[(0, 1, 2)]=-0.780125615174*(1+2.*(dim-1)/(o+1.)) + (-0.120248548452)*dim
            arg[(1, 0, 0)]=-0.201013014959*x[0]**o + (0.498917599328)*x[0] + (-0.679659886168)*x[1]**o + (-0.786839119193)*x[1] + (-0.815092372042)*x[2]**o + (-0.159635886393)*x[2]
            ref[(1, 0, 0)]=-1.69576527317*(1+2.*(dim-1)/(o+1.)) + (-0.447557406258)*dim
            arg[(1, 0, 1)]=-0.657296385633*x[0]**o + (-0.209896360165)*x[0] + (-0.960633204668)*x[1]**o + (0.483519394693)*x[1] + (-0.255641397446)*x[2]**o + (-0.553728415949)*x[2]
            ref[(1, 0, 1)]=-1.87357098775*(1+2.*(dim-1)/(o+1.)) + (-0.280105381421)*dim
            arg[(1, 0, 2)]=0.513303662077*x[0]**o + (0.447962605137)*x[0] + (-0.112003831836)*x[1]**o + (-0.392079542799)*x[1] + (-0.504241816154)*x[2]**o + (-0.285097202331)*x[2]
            ref[(1, 0, 2)]=-0.102941985913*(1+2.*(dim-1)/(o+1.)) + (-0.229214139993)*dim
            arg[(1, 1, 0)]=0.276234567478*x[0]**o + (-0.683084601331)*x[0] + (0.372067302344)*x[1]**o + (0.92621929542)*x[1] + (-0.302117060865)*x[2]**o + (0.502690154482)*x[2]
            ref[(1, 1, 0)]=0.346184808957*(1+2.*(dim-1)/(o+1.)) + (0.745824848571)*dim
            arg[(1, 1, 1)]=-0.626075150356*x[0]**o + (0.306646131917)*x[0] + (-0.0210445549255)*x[1]**o + (0.631218088885)*x[1] + (-0.668467350182)*x[2]**o + (0.937179964232)*x[2]
            ref[(1, 1, 1)]=-1.31558705546*(1+2.*(dim-1)/(o+1.)) + (1.87504418503)*dim
            arg[(1, 1, 2)]=-0.114301588785*x[0]**o + (0.687719541246)*x[0] + (-0.756651094819)*x[1]**o + (-0.676207839867)*x[1] + (-0.645670814564)*x[2]**o + (0.0845191095893)*x[2]
            ref[(1, 1, 2)]=-1.51662349817*(1+2.*(dim-1)/(o+1.)) + (0.0960308109684)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 4),w)
        ref=numpy.zeros((2, 3, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.0334523494815*x[0]**o + (-0.704679723759)*x[0] + (0.233577064331)*x[1]**o + (-0.180198186385)*x[1]
            ref[(0, 0, 0, 0)]=0.267029413813*(1+2.*(dim-1)/(o+1.)) + (-0.884877910143)*dim
            arg[(0, 0, 0, 1)]=0.777021434259*x[0]**o + (0.42332001048)*x[0] + (0.838810358436)*x[1]**o + (0.616056941822)*x[1]
            ref[(0, 0, 0, 1)]=1.6158317927*(1+2.*(dim-1)/(o+1.)) + (1.0393769523)*dim
            arg[(0, 0, 0, 2)]=0.556642370173*x[0]**o + (-0.556117479782)*x[0] + (0.613588452483)*x[1]**o + (0.935287872392)*x[1]
            ref[(0, 0, 0, 2)]=1.17023082266*(1+2.*(dim-1)/(o+1.)) + (0.37917039261)*dim
            arg[(0, 0, 0, 3)]=-0.473201975517*x[0]**o + (-0.528418992674)*x[0] + (-0.426670769154)*x[1]**o + (0.600335546426)*x[1]
            ref[(0, 0, 0, 3)]=-0.89987274467*(1+2.*(dim-1)/(o+1.)) + (0.0719165537519)*dim
            arg[(0, 0, 1, 0)]=-0.164582317982*x[0]**o + (-0.936771534913)*x[0] + (0.836444279054)*x[1]**o + (0.0977728937458)*x[1]
            ref[(0, 0, 1, 0)]=0.671861961072*(1+2.*(dim-1)/(o+1.)) + (-0.838998641167)*dim
            arg[(0, 0, 1, 1)]=-0.115163006195*x[0]**o + (0.769637066887)*x[0] + (0.864943737038)*x[1]**o + (0.319634812401)*x[1]
            ref[(0, 0, 1, 1)]=0.749780730843*(1+2.*(dim-1)/(o+1.)) + (1.08927187929)*dim
            arg[(0, 0, 1, 2)]=-0.900137763629*x[0]**o + (-0.692933285199)*x[0] + (-0.724871869646)*x[1]**o + (-0.094764036153)*x[1]
            ref[(0, 0, 1, 2)]=-1.62500963327*(1+2.*(dim-1)/(o+1.)) + (-0.787697321352)*dim
            arg[(0, 0, 1, 3)]=-0.853838562332*x[0]**o + (-0.844784992412)*x[0] + (0.175518188955)*x[1]**o + (-0.0432475874062)*x[1]
            ref[(0, 0, 1, 3)]=-0.678320373377*(1+2.*(dim-1)/(o+1.)) + (-0.888032579818)*dim
            arg[(0, 0, 2, 0)]=-0.332481470513*x[0]**o + (-0.5189318068)*x[0] + (-0.845985469924)*x[1]**o + (-0.861713935141)*x[1]
            ref[(0, 0, 2, 0)]=-1.17846694044*(1+2.*(dim-1)/(o+1.)) + (-1.38064574194)*dim
            arg[(0, 0, 2, 1)]=0.758845724963*x[0]**o + (0.579562084746)*x[0] + (0.440208011086)*x[1]**o + (0.32469221741)*x[1]
            ref[(0, 0, 2, 1)]=1.19905373605*(1+2.*(dim-1)/(o+1.)) + (0.904254302155)*dim
            arg[(0, 0, 2, 2)]=0.235600536041*x[0]**o + (0.381339013142)*x[0] + (0.736678495289)*x[1]**o + (-0.739462644307)*x[1]
            ref[(0, 0, 2, 2)]=0.97227903133*(1+2.*(dim-1)/(o+1.)) + (-0.358123631164)*dim
            arg[(0, 0, 2, 3)]=-0.815854589222*x[0]**o + (0.852417295018)*x[0] + (0.0515811043368)*x[1]**o + (-0.208543154564)*x[1]
            ref[(0, 0, 2, 3)]=-0.764273484885*(1+2.*(dim-1)/(o+1.)) + (0.643874140455)*dim
            arg[(0, 1, 0, 0)]=-0.0181590189086*x[0]**o + (-0.700507884792)*x[0] + (-0.681100449783)*x[1]**o + (0.551141365296)*x[1]
            ref[(0, 1, 0, 0)]=-0.699259468692*(1+2.*(dim-1)/(o+1.)) + (-0.149366519496)*dim
            arg[(0, 1, 0, 1)]=0.608169576*x[0]**o + (-0.420535363717)*x[0] + (0.722614255501)*x[1]**o + (0.0940281917249)*x[1]
            ref[(0, 1, 0, 1)]=1.3307838315*(1+2.*(dim-1)/(o+1.)) + (-0.326507171992)*dim
            arg[(0, 1, 0, 2)]=-0.0116737820893*x[0]**o + (0.0745963437305)*x[0] + (-0.267260477142)*x[1]**o + (0.271039003497)*x[1]
            ref[(0, 1, 0, 2)]=-0.278934259231*(1+2.*(dim-1)/(o+1.)) + (0.345635347228)*dim
            arg[(0, 1, 0, 3)]=0.929515121638*x[0]**o + (-0.845639554369)*x[0] + (-0.187534726204)*x[1]**o + (0.639888471314)*x[1]
            ref[(0, 1, 0, 3)]=0.741980395434*(1+2.*(dim-1)/(o+1.)) + (-0.205751083055)*dim
            arg[(0, 1, 1, 0)]=-0.40793937196*x[0]**o + (0.118247743107)*x[0] + (0.392979109079)*x[1]**o + (0.08662480481)*x[1]
            ref[(0, 1, 1, 0)]=-0.0149602628809*(1+2.*(dim-1)/(o+1.)) + (0.204872547917)*dim
            arg[(0, 1, 1, 1)]=-0.347889397691*x[0]**o + (-0.622228419973)*x[0] + (-0.179728329827)*x[1]**o + (-0.417294691902)*x[1]
            ref[(0, 1, 1, 1)]=-0.527617727517*(1+2.*(dim-1)/(o+1.)) + (-1.03952311187)*dim
            arg[(0, 1, 1, 2)]=0.163292345217*x[0]**o + (-0.901064422027)*x[0] + (0.298086884622)*x[1]**o + (-0.800367051903)*x[1]
            ref[(0, 1, 1, 2)]=0.461379229839*(1+2.*(dim-1)/(o+1.)) + (-1.70143147393)*dim
            arg[(0, 1, 1, 3)]=-0.135154534686*x[0]**o + (-0.411349142517)*x[0] + (0.859728296097)*x[1]**o + (-0.0188330141698)*x[1]
            ref[(0, 1, 1, 3)]=0.724573761411*(1+2.*(dim-1)/(o+1.)) + (-0.430182156687)*dim
            arg[(0, 1, 2, 0)]=0.244055403123*x[0]**o + (0.426215626562)*x[0] + (-0.060825560943)*x[1]**o + (0.824507320077)*x[1]
            ref[(0, 1, 2, 0)]=0.18322984218*(1+2.*(dim-1)/(o+1.)) + (1.25072294664)*dim
            arg[(0, 1, 2, 1)]=-0.47216570302*x[0]**o + (0.949400316174)*x[0] + (0.374889834298)*x[1]**o + (-0.122467050884)*x[1]
            ref[(0, 1, 2, 1)]=-0.0972758687214*(1+2.*(dim-1)/(o+1.)) + (0.82693326529)*dim
            arg[(0, 1, 2, 2)]=-0.992509547911*x[0]**o + (-0.635599725451)*x[0] + (-0.341378516262)*x[1]**o + (-0.737882143029)*x[1]
            ref[(0, 1, 2, 2)]=-1.33388806417*(1+2.*(dim-1)/(o+1.)) + (-1.37348186848)*dim
            arg[(0, 1, 2, 3)]=-0.571219381621*x[0]**o + (0.387955672828)*x[0] + (-0.571675476918)*x[1]**o + (-0.306348737948)*x[1]
            ref[(0, 1, 2, 3)]=-1.14289485854*(1+2.*(dim-1)/(o+1.)) + (0.0816069348801)*dim
            arg[(0, 2, 0, 0)]=-0.0328302230322*x[0]**o + (0.375589798826)*x[0] + (0.769511051341)*x[1]**o + (0.978244661046)*x[1]
            ref[(0, 2, 0, 0)]=0.736680828309*(1+2.*(dim-1)/(o+1.)) + (1.35383445987)*dim
            arg[(0, 2, 0, 1)]=0.906222124476*x[0]**o + (-0.402549735309)*x[0] + (-0.759144035532)*x[1]**o + (0.77981644216)*x[1]
            ref[(0, 2, 0, 1)]=0.147078088943*(1+2.*(dim-1)/(o+1.)) + (0.377266706852)*dim
            arg[(0, 2, 0, 2)]=0.821480690226*x[0]**o + (0.105383385852)*x[0] + (0.395805864202)*x[1]**o + (-0.869389964532)*x[1]
            ref[(0, 2, 0, 2)]=1.21728655443*(1+2.*(dim-1)/(o+1.)) + (-0.76400657868)*dim
            arg[(0, 2, 0, 3)]=0.642749280811*x[0]**o + (0.601010078464)*x[0] + (0.866192014514)*x[1]**o + (0.607353527354)*x[1]
            ref[(0, 2, 0, 3)]=1.50894129532*(1+2.*(dim-1)/(o+1.)) + (1.20836360582)*dim
            arg[(0, 2, 1, 0)]=-0.795569544554*x[0]**o + (-0.92980511741)*x[0] + (0.726562859812)*x[1]**o + (0.30385188729)*x[1]
            ref[(0, 2, 1, 0)]=-0.0690066847416*(1+2.*(dim-1)/(o+1.)) + (-0.625953230119)*dim
            arg[(0, 2, 1, 1)]=-0.585863160394*x[0]**o + (-0.334052969285)*x[0] + (0.396008354148)*x[1]**o + (-0.534167496855)*x[1]
            ref[(0, 2, 1, 1)]=-0.189854806246*(1+2.*(dim-1)/(o+1.)) + (-0.868220466141)*dim
            arg[(0, 2, 1, 2)]=0.951219374563*x[0]**o + (-0.307976038019)*x[0] + (-0.58254106137)*x[1]**o + (0.848518209872)*x[1]
            ref[(0, 2, 1, 2)]=0.368678313193*(1+2.*(dim-1)/(o+1.)) + (0.540542171852)*dim
            arg[(0, 2, 1, 3)]=0.0909773228552*x[0]**o + (0.125916727331)*x[0] + (0.376033711454)*x[1]**o + (-0.790944148477)*x[1]
            ref[(0, 2, 1, 3)]=0.467011034309*(1+2.*(dim-1)/(o+1.)) + (-0.665027421146)*dim
            arg[(0, 2, 2, 0)]=-0.252175096614*x[0]**o + (0.173861686855)*x[0] + (0.0683324085555)*x[1]**o + (-0.595370940613)*x[1]
            ref[(0, 2, 2, 0)]=-0.183842688059*(1+2.*(dim-1)/(o+1.)) + (-0.421509253758)*dim
            arg[(0, 2, 2, 1)]=0.671624678445*x[0]**o + (0.769320570565)*x[0] + (-0.869241157303)*x[1]**o + (0.382093499608)*x[1]
            ref[(0, 2, 2, 1)]=-0.197616478859*(1+2.*(dim-1)/(o+1.)) + (1.15141407017)*dim
            arg[(0, 2, 2, 2)]=-0.514817059627*x[0]**o + (0.807185513129)*x[0] + (0.582331617456)*x[1]**o + (0.947780667317)*x[1]
            ref[(0, 2, 2, 2)]=0.0675145578285*(1+2.*(dim-1)/(o+1.)) + (1.75496618045)*dim
            arg[(0, 2, 2, 3)]=0.504595488872*x[0]**o + (-0.415333565081)*x[0] + (0.64206548423)*x[1]**o + (-0.0753503489732)*x[1]
            ref[(0, 2, 2, 3)]=1.1466609731*(1+2.*(dim-1)/(o+1.)) + (-0.490683914054)*dim
            arg[(1, 0, 0, 0)]=-0.743987891946*x[0]**o + (-0.170099677544)*x[0] + (-0.613921927585)*x[1]**o + (-0.998209887948)*x[1]
            ref[(1, 0, 0, 0)]=-1.35790981953*(1+2.*(dim-1)/(o+1.)) + (-1.16830956549)*dim
            arg[(1, 0, 0, 1)]=-0.60362304197*x[0]**o + (0.939326339221)*x[0] + (-0.212454671677)*x[1]**o + (0.31233310665)*x[1]
            ref[(1, 0, 0, 1)]=-0.816077713648*(1+2.*(dim-1)/(o+1.)) + (1.25165944587)*dim
            arg[(1, 0, 0, 2)]=-0.104281326724*x[0]**o + (-0.500865092806)*x[0] + (-0.520756263566)*x[1]**o + (0.283968897796)*x[1]
            ref[(1, 0, 0, 2)]=-0.625037590289*(1+2.*(dim-1)/(o+1.)) + (-0.216896195009)*dim
            arg[(1, 0, 0, 3)]=-0.91874611652*x[0]**o + (0.849976596896)*x[0] + (-0.294083167719)*x[1]**o + (0.991893182587)*x[1]
            ref[(1, 0, 0, 3)]=-1.21282928424*(1+2.*(dim-1)/(o+1.)) + (1.84186977948)*dim
            arg[(1, 0, 1, 0)]=-0.992659249674*x[0]**o + (0.427168380182)*x[0] + (0.0693663110298)*x[1]**o + (-0.695433938203)*x[1]
            ref[(1, 0, 1, 0)]=-0.923292938644*(1+2.*(dim-1)/(o+1.)) + (-0.268265558021)*dim
            arg[(1, 0, 1, 1)]=0.282060142145*x[0]**o + (-0.962096418334)*x[0] + (0.862688580891)*x[1]**o + (0.323065916635)*x[1]
            ref[(1, 0, 1, 1)]=1.14474872304*(1+2.*(dim-1)/(o+1.)) + (-0.639030501699)*dim
            arg[(1, 0, 1, 2)]=-0.516677970846*x[0]**o + (0.867278521387)*x[0] + (-0.840682413777)*x[1]**o + (0.806991869986)*x[1]
            ref[(1, 0, 1, 2)]=-1.35736038462*(1+2.*(dim-1)/(o+1.)) + (1.67427039137)*dim
            arg[(1, 0, 1, 3)]=0.881507813695*x[0]**o + (-0.567547943656)*x[0] + (-0.741481589263)*x[1]**o + (0.746968394856)*x[1]
            ref[(1, 0, 1, 3)]=0.140026224432*(1+2.*(dim-1)/(o+1.)) + (0.1794204512)*dim
            arg[(1, 0, 2, 0)]=-0.424337420382*x[0]**o + (-0.284730430941)*x[0] + (0.091960442303)*x[1]**o + (0.217554527367)*x[1]
            ref[(1, 0, 2, 0)]=-0.332376978079*(1+2.*(dim-1)/(o+1.)) + (-0.0671759035737)*dim
            arg[(1, 0, 2, 1)]=0.286196032423*x[0]**o + (-0.320557969029)*x[0] + (0.878605057604)*x[1]**o + (-0.399470531582)*x[1]
            ref[(1, 0, 2, 1)]=1.16480109003*(1+2.*(dim-1)/(o+1.)) + (-0.720028500611)*dim
            arg[(1, 0, 2, 2)]=-0.0423016125214*x[0]**o + (-0.81915496544)*x[0] + (-0.508893615622)*x[1]**o + (-0.914165073779)*x[1]
            ref[(1, 0, 2, 2)]=-0.551195228144*(1+2.*(dim-1)/(o+1.)) + (-1.73332003922)*dim
            arg[(1, 0, 2, 3)]=-0.231301736348*x[0]**o + (-0.394712137356)*x[0] + (-0.785121896704)*x[1]**o + (-0.257575263529)*x[1]
            ref[(1, 0, 2, 3)]=-1.01642363305*(1+2.*(dim-1)/(o+1.)) + (-0.652287400885)*dim
            arg[(1, 1, 0, 0)]=-0.153541101812*x[0]**o + (-0.566545831556)*x[0] + (0.825858340423)*x[1]**o + (0.0198253082499)*x[1]
            ref[(1, 1, 0, 0)]=0.672317238611*(1+2.*(dim-1)/(o+1.)) + (-0.546720523306)*dim
            arg[(1, 1, 0, 1)]=-0.530053487416*x[0]**o + (0.651392690683)*x[0] + (0.967796468312)*x[1]**o + (0.15707622387)*x[1]
            ref[(1, 1, 0, 1)]=0.437742980896*(1+2.*(dim-1)/(o+1.)) + (0.808468914553)*dim
            arg[(1, 1, 0, 2)]=-0.784145028673*x[0]**o + (0.839423746204)*x[0] + (0.434306114827)*x[1]**o + (-0.477637476814)*x[1]
            ref[(1, 1, 0, 2)]=-0.349838913845*(1+2.*(dim-1)/(o+1.)) + (0.36178626939)*dim
            arg[(1, 1, 0, 3)]=-0.719941362131*x[0]**o + (-0.661410946964)*x[0] + (-0.933420583635)*x[1]**o + (-0.641375699662)*x[1]
            ref[(1, 1, 0, 3)]=-1.65336194577*(1+2.*(dim-1)/(o+1.)) + (-1.30278664663)*dim
            arg[(1, 1, 1, 0)]=0.52530390511*x[0]**o + (-0.0162800460436)*x[0] + (0.928192843177)*x[1]**o + (0.710314604781)*x[1]
            ref[(1, 1, 1, 0)]=1.45349674829*(1+2.*(dim-1)/(o+1.)) + (0.694034558737)*dim
            arg[(1, 1, 1, 1)]=-0.82795600152*x[0]**o + (0.669093122394)*x[0] + (-0.771127078539)*x[1]**o + (0.387827685283)*x[1]
            ref[(1, 1, 1, 1)]=-1.59908308006*(1+2.*(dim-1)/(o+1.)) + (1.05692080768)*dim
            arg[(1, 1, 1, 2)]=0.275654115383*x[0]**o + (-0.359461000922)*x[0] + (0.272900968468)*x[1]**o + (-0.692454469052)*x[1]
            ref[(1, 1, 1, 2)]=0.548555083851*(1+2.*(dim-1)/(o+1.)) + (-1.05191546997)*dim
            arg[(1, 1, 1, 3)]=-0.705486187135*x[0]**o + (0.856109130832)*x[0] + (-0.749828007833)*x[1]**o + (-0.176819275022)*x[1]
            ref[(1, 1, 1, 3)]=-1.45531419497*(1+2.*(dim-1)/(o+1.)) + (0.67928985581)*dim
            arg[(1, 1, 2, 0)]=0.118263262328*x[0]**o + (0.939967092808)*x[0] + (-0.986831954051)*x[1]**o + (-0.709496206784)*x[1]
            ref[(1, 1, 2, 0)]=-0.868568691724*(1+2.*(dim-1)/(o+1.)) + (0.230470886025)*dim
            arg[(1, 1, 2, 1)]=0.893715297823*x[0]**o + (-0.277268722587)*x[0] + (-0.52469172739)*x[1]**o + (0.526935147791)*x[1]
            ref[(1, 1, 2, 1)]=0.369023570434*(1+2.*(dim-1)/(o+1.)) + (0.249666425204)*dim
            arg[(1, 1, 2, 2)]=-0.853538577182*x[0]**o + (0.55563951017)*x[0] + (0.564582651723)*x[1]**o + (0.196272021866)*x[1]
            ref[(1, 1, 2, 2)]=-0.288955925459*(1+2.*(dim-1)/(o+1.)) + (0.751911532037)*dim
            arg[(1, 1, 2, 3)]=-0.678010392234*x[0]**o + (0.351169330269)*x[0] + (0.765518864673)*x[1]**o + (0.756986810441)*x[1]
            ref[(1, 1, 2, 3)]=0.0875084724388*(1+2.*(dim-1)/(o+1.)) + (1.10815614071)*dim
            arg[(1, 2, 0, 0)]=0.72990444894*x[0]**o + (0.160414322361)*x[0] + (-0.610912386296)*x[1]**o + (0.50016897405)*x[1]
            ref[(1, 2, 0, 0)]=0.118992062644*(1+2.*(dim-1)/(o+1.)) + (0.660583296411)*dim
            arg[(1, 2, 0, 1)]=-0.029802068492*x[0]**o + (-0.955689005627)*x[0] + (0.102781541571)*x[1]**o + (0.306025726844)*x[1]
            ref[(1, 2, 0, 1)]=0.072979473079*(1+2.*(dim-1)/(o+1.)) + (-0.649663278782)*dim
            arg[(1, 2, 0, 2)]=-0.436693681064*x[0]**o + (0.62390594652)*x[0] + (-0.281949799977)*x[1]**o + (-0.69492760704)*x[1]
            ref[(1, 2, 0, 2)]=-0.718643481041*(1+2.*(dim-1)/(o+1.)) + (-0.0710216605197)*dim
            arg[(1, 2, 0, 3)]=-0.718059222239*x[0]**o + (0.394861016323)*x[0] + (-0.43130035041)*x[1]**o + (-0.455494398891)*x[1]
            ref[(1, 2, 0, 3)]=-1.14935957265*(1+2.*(dim-1)/(o+1.)) + (-0.0606333825681)*dim
            arg[(1, 2, 1, 0)]=0.620647703797*x[0]**o + (0.503872306952)*x[0] + (-0.0417092487597)*x[1]**o + (0.70748100445)*x[1]
            ref[(1, 2, 1, 0)]=0.578938455037*(1+2.*(dim-1)/(o+1.)) + (1.2113533114)*dim
            arg[(1, 2, 1, 1)]=0.429719141926*x[0]**o + (-0.732893100436)*x[0] + (-0.12988998336)*x[1]**o + (0.0795056608573)*x[1]
            ref[(1, 2, 1, 1)]=0.299829158566*(1+2.*(dim-1)/(o+1.)) + (-0.653387439579)*dim
            arg[(1, 2, 1, 2)]=0.737428726793*x[0]**o + (0.752650948575)*x[0] + (-0.0596221173151)*x[1]**o + (-0.873730576842)*x[1]
            ref[(1, 2, 1, 2)]=0.677806609478*(1+2.*(dim-1)/(o+1.)) + (-0.121079628267)*dim
            arg[(1, 2, 1, 3)]=0.15093626761*x[0]**o + (-0.501389910479)*x[0] + (0.864235333373)*x[1]**o + (0.159833141687)*x[1]
            ref[(1, 2, 1, 3)]=1.01517160098*(1+2.*(dim-1)/(o+1.)) + (-0.341556768792)*dim
            arg[(1, 2, 2, 0)]=-0.138343717728*x[0]**o + (-0.762241079532)*x[0] + (-0.641856096273)*x[1]**o + (-0.0786639868073)*x[1]
            ref[(1, 2, 2, 0)]=-0.780199814001*(1+2.*(dim-1)/(o+1.)) + (-0.840905066339)*dim
            arg[(1, 2, 2, 1)]=0.597142695003*x[0]**o + (0.0594114285758)*x[0] + (-0.624981026026)*x[1]**o + (0.0387684152754)*x[1]
            ref[(1, 2, 2, 1)]=-0.0278383310224*(1+2.*(dim-1)/(o+1.)) + (0.0981798438512)*dim
            arg[(1, 2, 2, 2)]=0.549783051681*x[0]**o + (-0.580367756619)*x[0] + (0.852193749895)*x[1]**o + (0.734779022086)*x[1]
            ref[(1, 2, 2, 2)]=1.40197680158*(1+2.*(dim-1)/(o+1.)) + (0.154411265467)*dim
            arg[(1, 2, 2, 3)]=0.199151506178*x[0]**o + (0.702789722657)*x[0] + (-0.488461521223)*x[1]**o + (-0.951359603086)*x[1]
            ref[(1, 2, 2, 3)]=-0.289310015045*(1+2.*(dim-1)/(o+1.)) + (-0.248569880429)*dim
        else:
            arg[(0, 0, 0, 0)]=0.577364875212*x[0]**o + (-0.193966979616)*x[0] + (0.0648043583013)*x[1]**o + (-0.608447326237)*x[1] + (0.507423939463)*x[2]**o + (0.0799494060518)*x[2]
            ref[(0, 0, 0, 0)]=1.14959317298*(1+2.*(dim-1)/(o+1.)) + (-0.722464899801)*dim
            arg[(0, 0, 0, 1)]=0.108304419272*x[0]**o + (-0.122081712155)*x[0] + (-0.776123334231)*x[1]**o + (0.344232254644)*x[1] + (0.418354348376)*x[2]**o + (-0.739766449568)*x[2]
            ref[(0, 0, 0, 1)]=-0.249464566583*(1+2.*(dim-1)/(o+1.)) + (-0.517615907078)*dim
            arg[(0, 0, 0, 2)]=-0.174580689796*x[0]**o + (-0.367309936931)*x[0] + (-0.328789216867)*x[1]**o + (-0.523812525219)*x[1] + (0.800285251949)*x[2]**o + (0.94176008728)*x[2]
            ref[(0, 0, 0, 2)]=0.296915345286*(1+2.*(dim-1)/(o+1.)) + (0.0506376251299)*dim
            arg[(0, 0, 0, 3)]=0.108373665157*x[0]**o + (0.862901489727)*x[0] + (0.6094491069)*x[1]**o + (-0.776373657749)*x[1] + (-0.0960743689092)*x[2]**o + (-0.108082773185)*x[2]
            ref[(0, 0, 0, 3)]=0.621748403147*(1+2.*(dim-1)/(o+1.)) + (-0.0215549412067)*dim
            arg[(0, 0, 1, 0)]=-0.197781902175*x[0]**o + (0.944431930338)*x[0] + (0.893797336499)*x[1]**o + (-0.869736196932)*x[1] + (-0.245495020917)*x[2]**o + (-0.671421430345)*x[2]
            ref[(0, 0, 1, 0)]=0.450520413407*(1+2.*(dim-1)/(o+1.)) + (-0.596725696939)*dim
            arg[(0, 0, 1, 1)]=-0.0608856121572*x[0]**o + (-0.851515391671)*x[0] + (-0.938797855851)*x[1]**o + (0.0739393978056)*x[1] + (0.601494284705)*x[2]**o + (0.748583359636)*x[2]
            ref[(0, 0, 1, 1)]=-0.398189183303*(1+2.*(dim-1)/(o+1.)) + (-0.0289926342292)*dim
            arg[(0, 0, 1, 2)]=-0.360537504677*x[0]**o + (-0.690747321042)*x[0] + (0.590681164241)*x[1]**o + (-0.0629619600119)*x[1] + (-0.67297494824)*x[2]**o + (0.327615702977)*x[2]
            ref[(0, 0, 1, 2)]=-0.442831288676*(1+2.*(dim-1)/(o+1.)) + (-0.426093578076)*dim
            arg[(0, 0, 1, 3)]=-0.626639401625*x[0]**o + (-0.897826939912)*x[0] + (-0.583649033895)*x[1]**o + (-0.974728081857)*x[1] + (-0.71308374284)*x[2]**o + (0.259169602414)*x[2]
            ref[(0, 0, 1, 3)]=-1.92337217836*(1+2.*(dim-1)/(o+1.)) + (-1.61338541935)*dim
            arg[(0, 0, 2, 0)]=-0.265560738705*x[0]**o + (-0.960943506588)*x[0] + (0.401334763943)*x[1]**o + (-0.752956534147)*x[1] + (0.796301135582)*x[2]**o + (-0.55558030888)*x[2]
            ref[(0, 0, 2, 0)]=0.93207516082*(1+2.*(dim-1)/(o+1.)) + (-2.26948034962)*dim
            arg[(0, 0, 2, 1)]=0.760059063374*x[0]**o + (-0.891153979326)*x[0] + (0.703369069264)*x[1]**o + (-0.401221536298)*x[1] + (-0.870625419911)*x[2]**o + (-0.359818637712)*x[2]
            ref[(0, 0, 2, 1)]=0.592802712727*(1+2.*(dim-1)/(o+1.)) + (-1.65219415334)*dim
            arg[(0, 0, 2, 2)]=-0.723589047563*x[0]**o + (0.175910254061)*x[0] + (0.211164646531)*x[1]**o + (-0.646500642719)*x[1] + (0.122041646386)*x[2]**o + (-0.626458270202)*x[2]
            ref[(0, 0, 2, 2)]=-0.390382754646*(1+2.*(dim-1)/(o+1.)) + (-1.09704865886)*dim
            arg[(0, 0, 2, 3)]=0.354207306824*x[0]**o + (0.964709821188)*x[0] + (0.882441382709)*x[1]**o + (-0.799729753639)*x[1] + (-0.664308336472)*x[2]**o + (0.28106727616)*x[2]
            ref[(0, 0, 2, 3)]=0.572340353062*(1+2.*(dim-1)/(o+1.)) + (0.446047343709)*dim
            arg[(0, 1, 0, 0)]=-0.274714767485*x[0]**o + (-0.52895472332)*x[0] + (0.0178088379172)*x[1]**o + (-0.621086868662)*x[1] + (0.641482982533)*x[2]**o + (0.358193554429)*x[2]
            ref[(0, 1, 0, 0)]=0.384577052965*(1+2.*(dim-1)/(o+1.)) + (-0.791848037554)*dim
            arg[(0, 1, 0, 1)]=-0.399114968766*x[0]**o + (0.761776607496)*x[0] + (-0.342912510301)*x[1]**o + (-0.615418744279)*x[1] + (-0.678643812648)*x[2]**o + (-0.39571598531)*x[2]
            ref[(0, 1, 0, 1)]=-1.42067129172*(1+2.*(dim-1)/(o+1.)) + (-0.249358122094)*dim
            arg[(0, 1, 0, 2)]=-0.665010732316*x[0]**o + (-0.0341664674128)*x[0] + (0.445956550149)*x[1]**o + (0.786163480694)*x[1] + (0.412306320406)*x[2]**o + (0.0284507057973)*x[2]
            ref[(0, 1, 0, 2)]=0.193252138239*(1+2.*(dim-1)/(o+1.)) + (0.780447719078)*dim
            arg[(0, 1, 0, 3)]=0.699723501062*x[0]**o + (0.59852979241)*x[0] + (-0.524203311648)*x[1]**o + (-0.459516758981)*x[1] + (0.225392639578)*x[2]**o + (0.685961453421)*x[2]
            ref[(0, 1, 0, 3)]=0.400912828991*(1+2.*(dim-1)/(o+1.)) + (0.82497448685)*dim
            arg[(0, 1, 1, 0)]=0.301290555836*x[0]**o + (-0.518373045386)*x[0] + (0.288176183335)*x[1]**o + (0.726908375058)*x[1] + (0.490498217309)*x[2]**o + (-0.924251955479)*x[2]
            ref[(0, 1, 1, 0)]=1.07996495648*(1+2.*(dim-1)/(o+1.)) + (-0.715716625806)*dim
            arg[(0, 1, 1, 1)]=0.958218895972*x[0]**o + (-0.0870281365231)*x[0] + (-0.95968660836)*x[1]**o + (0.874018075858)*x[1] + (-0.415136790931)*x[2]**o + (0.49602790852)*x[2]
            ref[(0, 1, 1, 1)]=-0.416604503318*(1+2.*(dim-1)/(o+1.)) + (1.28301784785)*dim
            arg[(0, 1, 1, 2)]=-0.0725523957282*x[0]**o + (0.570575234164)*x[0] + (-0.00819292925802)*x[1]**o + (0.25569331281)*x[1] + (-0.649617661554)*x[2]**o + (0.999043426648)*x[2]
            ref[(0, 1, 1, 2)]=-0.730362986541*(1+2.*(dim-1)/(o+1.)) + (1.82531197362)*dim
            arg[(0, 1, 1, 3)]=-0.927937600598*x[0]**o + (-0.326281346905)*x[0] + (0.58104449641)*x[1]**o + (-0.60009924699)*x[1] + (-0.0411393626841)*x[2]**o + (0.871664524649)*x[2]
            ref[(0, 1, 1, 3)]=-0.388032466871*(1+2.*(dim-1)/(o+1.)) + (-0.0547160692464)*dim
            arg[(0, 1, 2, 0)]=0.63094269103*x[0]**o + (-0.25398512762)*x[0] + (0.0545639890331)*x[1]**o + (-0.359837223595)*x[1] + (-0.246894223791)*x[2]**o + (0.857819555573)*x[2]
            ref[(0, 1, 2, 0)]=0.438612456272*(1+2.*(dim-1)/(o+1.)) + (0.243997204358)*dim
            arg[(0, 1, 2, 1)]=0.736179991173*x[0]**o + (0.654434891604)*x[0] + (-0.345280945243)*x[1]**o + (-0.0188816719907)*x[1] + (-0.240162385038)*x[2]**o + (0.70533749357)*x[2]
            ref[(0, 1, 2, 1)]=0.150736660892*(1+2.*(dim-1)/(o+1.)) + (1.34089071318)*dim
            arg[(0, 1, 2, 2)]=-0.920904280062*x[0]**o + (-0.344242577987)*x[0] + (0.811358252327)*x[1]**o + (-0.396789817325)*x[1] + (-0.431224919796)*x[2]**o + (-0.683939968065)*x[2]
            ref[(0, 1, 2, 2)]=-0.540770947531*(1+2.*(dim-1)/(o+1.)) + (-1.42497236338)*dim
            arg[(0, 1, 2, 3)]=0.831939545259*x[0]**o + (-0.882136871334)*x[0] + (-0.844515784576)*x[1]**o + (0.039212709076)*x[1] + (0.980222624229)*x[2]**o + (-0.207276904756)*x[2]
            ref[(0, 1, 2, 3)]=0.967646384912*(1+2.*(dim-1)/(o+1.)) + (-1.05020106701)*dim
            arg[(0, 2, 0, 0)]=-0.914771865678*x[0]**o + (-0.853636236794)*x[0] + (-0.597060777953)*x[1]**o + (-0.110464274083)*x[1] + (0.482900509641)*x[2]**o + (-0.468169711519)*x[2]
            ref[(0, 2, 0, 0)]=-1.02893213399*(1+2.*(dim-1)/(o+1.)) + (-1.4322702224)*dim
            arg[(0, 2, 0, 1)]=-0.0971706652643*x[0]**o + (0.437399903804)*x[0] + (-0.294175824)*x[1]**o + (0.0366022756764)*x[1] + (-0.913044412215)*x[2]**o + (-0.798932353004)*x[2]
            ref[(0, 2, 0, 1)]=-1.30439090148*(1+2.*(dim-1)/(o+1.)) + (-0.324930173524)*dim
            arg[(0, 2, 0, 2)]=-0.0649605972023*x[0]**o + (0.288946321209)*x[0] + (0.595738119895)*x[1]**o + (-0.975502278609)*x[1] + (0.649622086853)*x[2]**o + (0.79227866225)*x[2]
            ref[(0, 2, 0, 2)]=1.18039960955*(1+2.*(dim-1)/(o+1.)) + (0.10572270485)*dim
            arg[(0, 2, 0, 3)]=0.575402729559*x[0]**o + (0.299983782539)*x[0] + (0.660739121996)*x[1]**o + (-0.554443715797)*x[1] + (-0.791515636124)*x[2]**o + (0.572045907563)*x[2]
            ref[(0, 2, 0, 3)]=0.444626215431*(1+2.*(dim-1)/(o+1.)) + (0.317585974305)*dim
            arg[(0, 2, 1, 0)]=-0.547076965588*x[0]**o + (0.231370533662)*x[0] + (0.916171624205)*x[1]**o + (-0.911419102569)*x[1] + (0.39795440107)*x[2]**o + (0.0034049886173)*x[2]
            ref[(0, 2, 1, 0)]=0.767049059686*(1+2.*(dim-1)/(o+1.)) + (-0.67664358029)*dim
            arg[(0, 2, 1, 1)]=-0.893626043872*x[0]**o + (0.183525677228)*x[0] + (0.675151600809)*x[1]**o + (0.608268357709)*x[1] + (-0.344727646873)*x[2]**o + (-0.670745100224)*x[2]
            ref[(0, 2, 1, 1)]=-0.563202089936*(1+2.*(dim-1)/(o+1.)) + (0.121048934713)*dim
            arg[(0, 2, 1, 2)]=-0.752797432692*x[0]**o + (-0.133148637236)*x[0] + (0.929861735668)*x[1]**o + (-0.23562251654)*x[1] + (0.237642047681)*x[2]**o + (0.356370978505)*x[2]
            ref[(0, 2, 1, 2)]=0.414706350657*(1+2.*(dim-1)/(o+1.)) + (-0.0124001752704)*dim
            arg[(0, 2, 1, 3)]=-0.789841638888*x[0]**o + (0.17496617127)*x[0] + (0.987147360341)*x[1]**o + (0.495473485362)*x[1] + (-0.214320234158)*x[2]**o + (-0.636953736465)*x[2]
            ref[(0, 2, 1, 3)]=-0.0170145127048*(1+2.*(dim-1)/(o+1.)) + (0.0334859201674)*dim
            arg[(0, 2, 2, 0)]=-0.130345598374*x[0]**o + (0.792604963715)*x[0] + (0.801937860485)*x[1]**o + (-0.112837019036)*x[1] + (0.907668856544)*x[2]**o + (0.917541440013)*x[2]
            ref[(0, 2, 2, 0)]=1.57926111866*(1+2.*(dim-1)/(o+1.)) + (1.59730938469)*dim
            arg[(0, 2, 2, 1)]=0.210042034229*x[0]**o + (-0.555419955904)*x[0] + (0.707548226403)*x[1]**o + (-0.260412054451)*x[1] + (-0.0907347476938)*x[2]**o + (0.449727957476)*x[2]
            ref[(0, 2, 2, 1)]=0.826855512938*(1+2.*(dim-1)/(o+1.)) + (-0.366104052878)*dim
            arg[(0, 2, 2, 2)]=-0.0706238074902*x[0]**o + (0.757201057326)*x[0] + (0.540417126269)*x[1]**o + (0.605820638493)*x[1] + (0.652726654172)*x[2]**o + (0.368101365754)*x[2]
            ref[(0, 2, 2, 2)]=1.12251997295*(1+2.*(dim-1)/(o+1.)) + (1.73112306157)*dim
            arg[(0, 2, 2, 3)]=-0.559575777231*x[0]**o + (-0.155956006515)*x[0] + (-0.669741169795)*x[1]**o + (-0.065079750789)*x[1] + (0.0687597760214)*x[2]**o + (-0.256670347018)*x[2]
            ref[(0, 2, 2, 3)]=-1.160557171*(1+2.*(dim-1)/(o+1.)) + (-0.477706104322)*dim
            arg[(1, 0, 0, 0)]=0.314800087102*x[0]**o + (0.413732897766)*x[0] + (0.0434726750366)*x[1]**o + (0.929458500588)*x[1] + (-0.238466720959)*x[2]**o + (-0.305375855208)*x[2]
            ref[(1, 0, 0, 0)]=0.119806041179*(1+2.*(dim-1)/(o+1.)) + (1.03781554315)*dim
            arg[(1, 0, 0, 1)]=-0.017800922656*x[0]**o + (0.0489010242998)*x[0] + (0.557325054068)*x[1]**o + (-0.442579129764)*x[1] + (0.464674845543)*x[2]**o + (-0.756093952133)*x[2]
            ref[(1, 0, 0, 1)]=1.00419897696*(1+2.*(dim-1)/(o+1.)) + (-1.1497720576)*dim
            arg[(1, 0, 0, 2)]=0.654848861677*x[0]**o + (0.391994462524)*x[0] + (0.153863235137)*x[1]**o + (-0.358097573059)*x[1] + (0.494015180365)*x[2]**o + (-0.460375897432)*x[2]
            ref[(1, 0, 0, 2)]=1.30272727718*(1+2.*(dim-1)/(o+1.)) + (-0.426479007967)*dim
            arg[(1, 0, 0, 3)]=-0.338547563445*x[0]**o + (0.531331748688)*x[0] + (0.355421282988)*x[1]**o + (0.873529315036)*x[1] + (0.496370295941)*x[2]**o + (0.479674906447)*x[2]
            ref[(1, 0, 0, 3)]=0.513244015483*(1+2.*(dim-1)/(o+1.)) + (1.88453597017)*dim
            arg[(1, 0, 1, 0)]=-0.675469860649*x[0]**o + (0.303287041234)*x[0] + (-0.196608198189)*x[1]**o + (-0.915630996837)*x[1] + (-0.693545615818)*x[2]**o + (-0.673885733789)*x[2]
            ref[(1, 0, 1, 0)]=-1.56562367466*(1+2.*(dim-1)/(o+1.)) + (-1.28622968939)*dim
            arg[(1, 0, 1, 1)]=-0.582939294434*x[0]**o + (0.920568261397)*x[0] + (0.843712375755)*x[1]**o + (-0.0406114918457)*x[1] + (0.442945037976)*x[2]**o + (-0.542106484618)*x[2]
            ref[(1, 0, 1, 1)]=0.703718119297*(1+2.*(dim-1)/(o+1.)) + (0.337850284934)*dim
            arg[(1, 0, 1, 2)]=0.792685314519*x[0]**o + (0.367581657853)*x[0] + (0.461075221579)*x[1]**o + (0.552319932779)*x[1] + (-0.573741014939)*x[2]**o + (0.980392544467)*x[2]
            ref[(1, 0, 1, 2)]=0.680019521159*(1+2.*(dim-1)/(o+1.)) + (1.9002941351)*dim
            arg[(1, 0, 1, 3)]=0.469993668021*x[0]**o + (-0.486980511107)*x[0] + (0.862121613819)*x[1]**o + (0.826152769077)*x[1] + (-0.00718624871223)*x[2]**o + (-0.39233696238)*x[2]
            ref[(1, 0, 1, 3)]=1.32492903313*(1+2.*(dim-1)/(o+1.)) + (-0.0531647044098)*dim
            arg[(1, 0, 2, 0)]=0.547923209978*x[0]**o + (0.989748630077)*x[0] + (0.605201333796)*x[1]**o + (0.685546462117)*x[1] + (-0.422831417795)*x[2]**o + (0.580297951152)*x[2]
            ref[(1, 0, 2, 0)]=0.730293125978*(1+2.*(dim-1)/(o+1.)) + (2.25559304335)*dim
            arg[(1, 0, 2, 1)]=0.00923302662474*x[0]**o + (-0.427054249308)*x[0] + (0.0377864394097)*x[1]**o + (0.373168435268)*x[1] + (-0.173658570534)*x[2]**o + (0.162327783327)*x[2]
            ref[(1, 0, 2, 1)]=-0.1266391045*(1+2.*(dim-1)/(o+1.)) + (0.108441969288)*dim
            arg[(1, 0, 2, 2)]=-0.811693787154*x[0]**o + (-0.113839158777)*x[0] + (0.481839867563)*x[1]**o + (-0.643765703485)*x[1] + (0.270764414508)*x[2]**o + (-0.101286831251)*x[2]
            ref[(1, 0, 2, 2)]=-0.0590895050827*(1+2.*(dim-1)/(o+1.)) + (-0.858891693514)*dim
            arg[(1, 0, 2, 3)]=0.108863201163*x[0]**o + (-0.384038987719)*x[0] + (0.570014850338)*x[1]**o + (0.133193333047)*x[1] + (0.886719224386)*x[2]**o + (-0.553179999669)*x[2]
            ref[(1, 0, 2, 3)]=1.56559727589*(1+2.*(dim-1)/(o+1.)) + (-0.804025654341)*dim
            arg[(1, 1, 0, 0)]=-0.310750758763*x[0]**o + (-0.49338375036)*x[0] + (-0.0254004943348)*x[1]**o + (-0.116223728651)*x[1] + (-0.506091354918)*x[2]**o + (-0.513904380174)*x[2]
            ref[(1, 1, 0, 0)]=-0.842242608016*(1+2.*(dim-1)/(o+1.)) + (-1.12351185919)*dim
            arg[(1, 1, 0, 1)]=0.81742278805*x[0]**o + (-0.408671616325)*x[0] + (-0.495093083392)*x[1]**o + (-0.605850210669)*x[1] + (-0.706113227651)*x[2]**o + (-0.822914638429)*x[2]
            ref[(1, 1, 0, 1)]=-0.383783522993*(1+2.*(dim-1)/(o+1.)) + (-1.83743646542)*dim
            arg[(1, 1, 0, 2)]=-0.402437335512*x[0]**o + (0.381468861986)*x[0] + (0.501766004441)*x[1]**o + (0.957112551704)*x[1] + (-0.566479367387)*x[2]**o + (0.221882155032)*x[2]
            ref[(1, 1, 0, 2)]=-0.467150698457*(1+2.*(dim-1)/(o+1.)) + (1.56046356872)*dim
            arg[(1, 1, 0, 3)]=-0.189733313671*x[0]**o + (0.641380189891)*x[0] + (0.180173812183)*x[1]**o + (-0.327940549068)*x[1] + (-0.407465680916)*x[2]**o + (-0.558818211902)*x[2]
            ref[(1, 1, 0, 3)]=-0.417025182404*(1+2.*(dim-1)/(o+1.)) + (-0.245378571079)*dim
            arg[(1, 1, 1, 0)]=0.138204911218*x[0]**o + (-0.53991670956)*x[0] + (0.0552595177668)*x[1]**o + (-0.855942662226)*x[1] + (-0.493221239055)*x[2]**o + (-0.468463270989)*x[2]
            ref[(1, 1, 1, 0)]=-0.29975681007*(1+2.*(dim-1)/(o+1.)) + (-1.86432264277)*dim
            arg[(1, 1, 1, 1)]=-0.783669893358*x[0]**o + (-0.432744514402)*x[0] + (-0.0505978022705)*x[1]**o + (-0.628460525616)*x[1] + (0.759054209102)*x[2]**o + (-0.927866864044)*x[2]
            ref[(1, 1, 1, 1)]=-0.0752134865265*(1+2.*(dim-1)/(o+1.)) + (-1.98907190406)*dim
            arg[(1, 1, 1, 2)]=-0.941900183771*x[0]**o + (0.365602166141)*x[0] + (0.675492959954)*x[1]**o + (-0.898955264061)*x[1] + (-0.831303549244)*x[2]**o + (0.102471706702)*x[2]
            ref[(1, 1, 1, 2)]=-1.09771077306*(1+2.*(dim-1)/(o+1.)) + (-0.430881391218)*dim
            arg[(1, 1, 1, 3)]=0.677714245529*x[0]**o + (-0.899194507941)*x[0] + (-0.938709050754)*x[1]**o + (0.813879185445)*x[1] + (0.360274554781)*x[2]**o + (0.973119309281)*x[2]
            ref[(1, 1, 1, 3)]=0.0992797495557*(1+2.*(dim-1)/(o+1.)) + (0.887803986785)*dim
            arg[(1, 1, 2, 0)]=0.824205410593*x[0]**o + (0.988922319927)*x[0] + (0.52949075636)*x[1]**o + (0.600957316928)*x[1] + (0.92806172243)*x[2]**o + (-0.254561372164)*x[2]
            ref[(1, 1, 2, 0)]=2.28175788938*(1+2.*(dim-1)/(o+1.)) + (1.33531826469)*dim
            arg[(1, 1, 2, 1)]=-0.891590729241*x[0]**o + (-0.550038795713)*x[0] + (-0.280931893487)*x[1]**o + (-0.361139136465)*x[1] + (-0.805427707404)*x[2]**o + (0.0391442815152)*x[2]
            ref[(1, 1, 2, 1)]=-1.97795033013*(1+2.*(dim-1)/(o+1.)) + (-0.872033650663)*dim
            arg[(1, 1, 2, 2)]=-0.247443791763*x[0]**o + (-0.149399342688)*x[0] + (-0.742401976713)*x[1]**o + (-0.665772791285)*x[1] + (-0.889583652886)*x[2]**o + (0.86727169955)*x[2]
            ref[(1, 1, 2, 2)]=-1.87942942136*(1+2.*(dim-1)/(o+1.)) + (0.0520995655763)*dim
            arg[(1, 1, 2, 3)]=0.293098423688*x[0]**o + (0.333149269098)*x[0] + (-0.999195297619)*x[1]**o + (-0.821476573587)*x[1] + (0.106989046585)*x[2]**o + (0.170078676867)*x[2]
            ref[(1, 1, 2, 3)]=-0.599107827346*(1+2.*(dim-1)/(o+1.)) + (-0.318248627622)*dim
            arg[(1, 2, 0, 0)]=0.0465935374375*x[0]**o + (0.965615083582)*x[0] + (-0.888343631021)*x[1]**o + (-0.529141847783)*x[1] + (0.0556882683432)*x[2]**o + (-0.14500158587)*x[2]
            ref[(1, 2, 0, 0)]=-0.786061825241*(1+2.*(dim-1)/(o+1.)) + (0.291471649929)*dim
            arg[(1, 2, 0, 1)]=-0.367636288851*x[0]**o + (-0.645868525052)*x[0] + (-0.803241253965)*x[1]**o + (-0.836672119627)*x[1] + (-0.420625130092)*x[2]**o + (-0.893662457968)*x[2]
            ref[(1, 2, 0, 1)]=-1.59150267291*(1+2.*(dim-1)/(o+1.)) + (-2.37620310265)*dim
            arg[(1, 2, 0, 2)]=-0.187742304184*x[0]**o + (0.770981799515)*x[0] + (0.0245162582468)*x[1]**o + (-0.159084986675)*x[1] + (-0.657281821561)*x[2]**o + (-0.511993727257)*x[2]
            ref[(1, 2, 0, 2)]=-0.820507867498*(1+2.*(dim-1)/(o+1.)) + (0.0999030855827)*dim
            arg[(1, 2, 0, 3)]=0.895757583141*x[0]**o + (-0.924121470899)*x[0] + (0.257606337086)*x[1]**o + (0.482787009046)*x[1] + (0.931209835752)*x[2]**o + (0.152063673098)*x[2]
            ref[(1, 2, 0, 3)]=2.08457375598*(1+2.*(dim-1)/(o+1.)) + (-0.289270788755)*dim
            arg[(1, 2, 1, 0)]=-0.0984440733768*x[0]**o + (-0.227181764293)*x[0] + (-0.767790484378)*x[1]**o + (0.239973020289)*x[1] + (-0.429812914958)*x[2]**o + (0.39809172967)*x[2]
            ref[(1, 2, 1, 0)]=-1.29604747271*(1+2.*(dim-1)/(o+1.)) + (0.410882985666)*dim
            arg[(1, 2, 1, 1)]=0.430682201826*x[0]**o + (-0.825022268619)*x[0] + (-0.493464079649)*x[1]**o + (-0.67355831454)*x[1] + (0.52788898074)*x[2]**o + (-0.968104861182)*x[2]
            ref[(1, 2, 1, 1)]=0.465107102918*(1+2.*(dim-1)/(o+1.)) + (-2.46668544434)*dim
            arg[(1, 2, 1, 2)]=-0.805819212237*x[0]**o + (-0.102949618938)*x[0] + (-0.0845203456383)*x[1]**o + (-0.819496873214)*x[1] + (0.603193610643)*x[2]**o + (0.274995397064)*x[2]
            ref[(1, 2, 1, 2)]=-0.287145947232*(1+2.*(dim-1)/(o+1.)) + (-0.647451095088)*dim
            arg[(1, 2, 1, 3)]=0.901281968343*x[0]**o + (-0.747927506435)*x[0] + (-0.729662463332)*x[1]**o + (0.644782110522)*x[1] + (-0.059108819367)*x[2]**o + (-0.594981461372)*x[2]
            ref[(1, 2, 1, 3)]=0.112510685644*(1+2.*(dim-1)/(o+1.)) + (-0.698126857285)*dim
            arg[(1, 2, 2, 0)]=0.967504340217*x[0]**o + (-0.821436631294)*x[0] + (0.627479687705)*x[1]**o + (0.673020635454)*x[1] + (-0.76791338183)*x[2]**o + (0.369923951053)*x[2]
            ref[(1, 2, 2, 0)]=0.827070646093*(1+2.*(dim-1)/(o+1.)) + (0.221507955212)*dim
            arg[(1, 2, 2, 1)]=0.140265499122*x[0]**o + (0.652452244031)*x[0] + (0.0267329872114)*x[1]**o + (-0.392070796166)*x[1] + (-0.103741045885)*x[2]**o + (0.8719598556)*x[2]
            ref[(1, 2, 2, 1)]=0.0632574404478*(1+2.*(dim-1)/(o+1.)) + (1.13234130347)*dim
            arg[(1, 2, 2, 2)]=-0.876983010208*x[0]**o + (0.430576345144)*x[0] + (-0.834122302486)*x[1]**o + (0.13602990626)*x[1] + (-0.898547580339)*x[2]**o + (-0.898408794122)*x[2]
            ref[(1, 2, 2, 2)]=-2.60965289303*(1+2.*(dim-1)/(o+1.)) + (-0.331802542718)*dim
            arg[(1, 2, 2, 3)]=0.0529101610858*x[0]**o + (-0.0408541145549)*x[0] + (-0.432107882731)*x[1]**o + (0.826581022822)*x[1] + (0.419372641036)*x[2]**o + (-0.473547954457)*x[2]
            ref[(1, 2, 2, 3)]=0.0401749193909*(1+2.*(dim-1)/(o+1.)) + (0.312178953809)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.0627440828319*x[0]**o + (0.929464317295)*x[0] + (-0.354403762369)*x[1]**o + (-0.970894097356)*x[1]
            ref=-0.291659679537*(1+2.*(dim-1)/(o+1.)) + (-0.041429780061)*dim
        else:
            arg=0.950698588696*x[0]**o + (0.472557029778)*x[0] + (0.80860296652)*x[1]**o + (0.994684028277)*x[1] + (-0.933849314987)*x[2]**o + (-0.607158890643)*x[2]
            ref=0.82545224023*(1+2.*(dim-1)/(o+1.)) + (0.860082167413)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.375495535273*x[0]**o + (0.199653673474)*x[0] + (0.0691862089119)*x[1]**o + (0.787630270714)*x[1]
            ref[(0,)]=-0.306309326361*(1+2.*(dim-1)/(o+1.)) + (0.987283944189)*dim
            arg[(1,)]=-0.183538220672*x[0]**o + (0.671572815785)*x[0] + (-0.087762618095)*x[1]**o + (0.990267079561)*x[1]
            ref[(1,)]=-0.271300838767*(1+2.*(dim-1)/(o+1.)) + (1.66183989535)*dim
        else:
            arg[(0,)]=0.723439009664*x[0]**o + (-0.0210522482639)*x[0] + (-0.791953749148)*x[1]**o + (-0.824256087149)*x[1] + (0.493772264023)*x[2]**o + (0.333910251135)*x[2]
            ref[(0,)]=0.42525752454*(1+2.*(dim-1)/(o+1.)) + (-0.511398084279)*dim
            arg[(1,)]=-0.902612623287*x[0]**o + (0.297507804689)*x[0] + (-0.670241152999)*x[1]**o + (-0.941867116757)*x[1] + (0.0497204966704)*x[2]**o + (-0.0916212934521)*x[2]
            ref[(1,)]=-1.52313327962*(1+2.*(dim-1)/(o+1.)) + (-0.735980605519)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.817536971671*x[0]**o + (0.0510292032188)*x[0] + (0.202421194592)*x[1]**o + (-0.635948812992)*x[1]
            ref[(0, 0)]=-0.61511577708*(1+2.*(dim-1)/(o+1.)) + (-0.584919609774)*dim
            arg[(0, 1)]=-0.598717088197*x[0]**o + (-0.679113972614)*x[0] + (-0.48023312194)*x[1]**o + (0.486765918374)*x[1]
            ref[(0, 1)]=-1.07895021014*(1+2.*(dim-1)/(o+1.)) + (-0.19234805424)*dim
            arg[(1, 0)]=0.645718292255*x[0]**o + (0.841761091807)*x[0] + (-0.507237846187)*x[1]**o + (-0.528024566433)*x[1]
            ref[(1, 0)]=0.138480446068*(1+2.*(dim-1)/(o+1.)) + (0.313736525374)*dim
            arg[(1, 1)]=-0.559827278251*x[0]**o + (0.881761197344)*x[0] + (-0.718627173949)*x[1]**o + (-0.791486582514)*x[1]
            ref[(1, 1)]=-1.2784544522*(1+2.*(dim-1)/(o+1.)) + (0.0902746148298)*dim
            arg[(2, 0)]=-0.976457826401*x[0]**o + (0.19770961725)*x[0] + (-0.644358862649)*x[1]**o + (0.0812200858563)*x[1]
            ref[(2, 0)]=-1.62081668905*(1+2.*(dim-1)/(o+1.)) + (0.278929703106)*dim
            arg[(2, 1)]=-0.269555440767*x[0]**o + (0.941484443435)*x[0] + (0.14435997714)*x[1]**o + (0.300671378822)*x[1]
            ref[(2, 1)]=-0.125195463626*(1+2.*(dim-1)/(o+1.)) + (1.24215582226)*dim
            arg[(3, 0)]=-0.227937712461*x[0]**o + (0.0283233033332)*x[0] + (0.475517197994)*x[1]**o + (0.327195691938)*x[1]
            ref[(3, 0)]=0.247579485533*(1+2.*(dim-1)/(o+1.)) + (0.355518995271)*dim
            arg[(3, 1)]=0.243992597814*x[0]**o + (-0.965488807199)*x[0] + (0.0795402888069)*x[1]**o + (-0.11195840941)*x[1]
            ref[(3, 1)]=0.323532886621*(1+2.*(dim-1)/(o+1.)) + (-1.07744721661)*dim
        else:
            arg[(0, 0)]=-0.276661505595*x[0]**o + (0.672606151391)*x[0] + (-0.929850137191)*x[1]**o + (-0.961317858807)*x[1] + (0.392808279417)*x[2]**o + (-0.0458752818354)*x[2]
            ref[(0, 0)]=-0.813703363368*(1+2.*(dim-1)/(o+1.)) + (-0.334586989251)*dim
            arg[(0, 1)]=0.0647908636592*x[0]**o + (-0.99735746359)*x[0] + (-0.95059321966)*x[1]**o + (0.335139067126)*x[1] + (0.862372375477)*x[2]**o + (0.62306381749)*x[2]
            ref[(0, 1)]=-0.023429980523*(1+2.*(dim-1)/(o+1.)) + (-0.0391545789741)*dim
            arg[(1, 0)]=0.713828766887*x[0]**o + (-0.0966598269212)*x[0] + (0.854346082494)*x[1]**o + (-0.838587183979)*x[1] + (-0.200122556355)*x[2]**o + (-0.963391564934)*x[2]
            ref[(1, 0)]=1.36805229303*(1+2.*(dim-1)/(o+1.)) + (-1.89863857583)*dim
            arg[(1, 1)]=-0.884490438968*x[0]**o + (0.860751726542)*x[0] + (-0.0379427233948)*x[1]**o + (-0.17262968527)*x[1] + (0.119350713136)*x[2]**o + (0.814998679758)*x[2]
            ref[(1, 1)]=-0.803082449227*(1+2.*(dim-1)/(o+1.)) + (1.50312072103)*dim
            arg[(2, 0)]=-0.478514181814*x[0]**o + (-0.813099805955)*x[0] + (-0.928682169201)*x[1]**o + (-0.154866164907)*x[1] + (0.0464394002462)*x[2]**o + (0.648558024719)*x[2]
            ref[(2, 0)]=-1.36075695077*(1+2.*(dim-1)/(o+1.)) + (-0.319407946143)*dim
            arg[(2, 1)]=-0.254729220805*x[0]**o + (-0.243140714551)*x[0] + (0.208007510301)*x[1]**o + (0.467987073472)*x[1] + (0.229064535546)*x[2]**o + (-0.713106397565)*x[2]
            ref[(2, 1)]=0.182342825041*(1+2.*(dim-1)/(o+1.)) + (-0.488260038644)*dim
            arg[(3, 0)]=-0.603265100155*x[0]**o + (0.098747053137)*x[0] + (-0.247784530371)*x[1]**o + (0.468784943638)*x[1] + (0.870424526437)*x[2]**o + (0.582799448453)*x[2]
            ref[(3, 0)]=0.0193748959114*(1+2.*(dim-1)/(o+1.)) + (1.15033144523)*dim
            arg[(3, 1)]=-0.464449013113*x[0]**o + (0.0808350617982)*x[0] + (-0.401988483489)*x[1]**o + (-0.702121577896)*x[1] + (-0.104760862243)*x[2]**o + (-0.326247402219)*x[2]
            ref[(3, 1)]=-0.971198358845*(1+2.*(dim-1)/(o+1.)) + (-0.947533918317)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref=numpy.zeros((4, 2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.683542272361*x[0]**o + (-0.289072668704)*x[0] + (-0.864564879577)*x[1]**o + (-0.295664988991)*x[1]
            ref[(0, 0, 0)]=-1.54810715194*(1+2.*(dim-1)/(o+1.)) + (-0.584737657695)*dim
            arg[(0, 0, 1)]=-0.437157216974*x[0]**o + (0.25619667359)*x[0] + (-0.0856417979726)*x[1]**o + (-0.0531034802662)*x[1]
            ref[(0, 0, 1)]=-0.522799014946*(1+2.*(dim-1)/(o+1.)) + (0.203093193324)*dim
            arg[(0, 1, 0)]=-0.048595771291*x[0]**o + (-0.265775586114)*x[0] + (0.177863445447)*x[1]**o + (-0.194733731961)*x[1]
            ref[(0, 1, 0)]=0.129267674156*(1+2.*(dim-1)/(o+1.)) + (-0.460509318075)*dim
            arg[(0, 1, 1)]=0.309076262209*x[0]**o + (0.550155571484)*x[0] + (0.509809353367)*x[1]**o + (-0.714881945263)*x[1]
            ref[(0, 1, 1)]=0.818885615576*(1+2.*(dim-1)/(o+1.)) + (-0.164726373779)*dim
            arg[(1, 0, 0)]=-0.523684056955*x[0]**o + (0.244604600527)*x[0] + (-0.138307423093)*x[1]**o + (-0.0276234595351)*x[1]
            ref[(1, 0, 0)]=-0.661991480048*(1+2.*(dim-1)/(o+1.)) + (0.216981140992)*dim
            arg[(1, 0, 1)]=-0.122425588079*x[0]**o + (0.499037439188)*x[0] + (-0.609128431018)*x[1]**o + (-0.15439532998)*x[1]
            ref[(1, 0, 1)]=-0.731554019097*(1+2.*(dim-1)/(o+1.)) + (0.344642109208)*dim
            arg[(1, 1, 0)]=0.426401309775*x[0]**o + (0.154454349228)*x[0] + (-0.175608823392)*x[1]**o + (0.53795052148)*x[1]
            ref[(1, 1, 0)]=0.250792486383*(1+2.*(dim-1)/(o+1.)) + (0.692404870708)*dim
            arg[(1, 1, 1)]=-0.987581533442*x[0]**o + (0.886960317857)*x[0] + (-0.749494958691)*x[1]**o + (0.256894665668)*x[1]
            ref[(1, 1, 1)]=-1.73707649213*(1+2.*(dim-1)/(o+1.)) + (1.14385498353)*dim
            arg[(2, 0, 0)]=0.806248326087*x[0]**o + (-0.9390524527)*x[0] + (-0.859300295827)*x[1]**o + (0.595998163021)*x[1]
            ref[(2, 0, 0)]=-0.0530519697401*(1+2.*(dim-1)/(o+1.)) + (-0.343054289679)*dim
            arg[(2, 0, 1)]=0.949560275043*x[0]**o + (-0.927089011304)*x[0] + (-0.522455432566)*x[1]**o + (-0.519017657412)*x[1]
            ref[(2, 0, 1)]=0.427104842476*(1+2.*(dim-1)/(o+1.)) + (-1.44610666872)*dim
            arg[(2, 1, 0)]=0.04003677777*x[0]**o + (0.209022136457)*x[0] + (0.670453094203)*x[1]**o + (0.779323288201)*x[1]
            ref[(2, 1, 0)]=0.710489871973*(1+2.*(dim-1)/(o+1.)) + (0.988345424658)*dim
            arg[(2, 1, 1)]=-0.643839943416*x[0]**o + (0.0224974011887)*x[0] + (0.504286803623)*x[1]**o + (-0.804765303477)*x[1]
            ref[(2, 1, 1)]=-0.139553139793*(1+2.*(dim-1)/(o+1.)) + (-0.782267902288)*dim
            arg[(3, 0, 0)]=-0.566471165938*x[0]**o + (0.884863990479)*x[0] + (0.29049202698)*x[1]**o + (0.177679819021)*x[1]
            ref[(3, 0, 0)]=-0.275979138958*(1+2.*(dim-1)/(o+1.)) + (1.0625438095)*dim
            arg[(3, 0, 1)]=0.471165628602*x[0]**o + (-0.478541488496)*x[0] + (-0.0979647967872)*x[1]**o + (0.855374500438)*x[1]
            ref[(3, 0, 1)]=0.373200831815*(1+2.*(dim-1)/(o+1.)) + (0.376833011941)*dim
            arg[(3, 1, 0)]=-0.793574150593*x[0]**o + (0.391188972887)*x[0] + (0.164299043749)*x[1]**o + (-0.317369890395)*x[1]
            ref[(3, 1, 0)]=-0.629275106844*(1+2.*(dim-1)/(o+1.)) + (0.0738190824921)*dim
            arg[(3, 1, 1)]=0.212166336823*x[0]**o + (0.835688235827)*x[0] + (-0.378960935297)*x[1]**o + (-0.29028433969)*x[1]
            ref[(3, 1, 1)]=-0.166794598475*(1+2.*(dim-1)/(o+1.)) + (0.545403896136)*dim
        else:
            arg[(0, 0, 0)]=-0.576033003985*x[0]**o + (-0.377442448498)*x[0] + (0.968426266863)*x[1]**o + (0.473352277516)*x[1] + (-0.395593673136)*x[2]**o + (0.216078409394)*x[2]
            ref[(0, 0, 0)]=-0.00320041025884*(1+2.*(dim-1)/(o+1.)) + (0.311988238411)*dim
            arg[(0, 0, 1)]=-0.566293110944*x[0]**o + (-0.262417414697)*x[0] + (0.617315182278)*x[1]**o + (-0.501665254339)*x[1] + (0.50872518166)*x[2]**o + (-0.383141697723)*x[2]
            ref[(0, 0, 1)]=0.559747252994*(1+2.*(dim-1)/(o+1.)) + (-1.14722436676)*dim
            arg[(0, 1, 0)]=0.268012232788*x[0]**o + (-0.588566632665)*x[0] + (0.405666226261)*x[1]**o + (-0.906475157412)*x[1] + (-0.544751711331)*x[2]**o + (-0.753832966077)*x[2]
            ref[(0, 1, 0)]=0.128926747718*(1+2.*(dim-1)/(o+1.)) + (-2.24887475615)*dim
            arg[(0, 1, 1)]=0.468923193254*x[0]**o + (-0.64903099446)*x[0] + (-0.817802880279)*x[1]**o + (0.320955424232)*x[1] + (-0.773743777373)*x[2]**o + (0.293501332344)*x[2]
            ref[(0, 1, 1)]=-1.1226234644*(1+2.*(dim-1)/(o+1.)) + (-0.0345742378843)*dim
            arg[(1, 0, 0)]=0.78664270612*x[0]**o + (0.181536579883)*x[0] + (0.0212378371295)*x[1]**o + (0.861337025746)*x[1] + (0.61336680437)*x[2]**o + (0.028249561714)*x[2]
            ref[(1, 0, 0)]=1.42124734762*(1+2.*(dim-1)/(o+1.)) + (1.07112316734)*dim
            arg[(1, 0, 1)]=-0.408133695114*x[0]**o + (0.110279664603)*x[0] + (-0.796083822985)*x[1]**o + (-0.547091552462)*x[1] + (-0.719100760715)*x[2]**o + (0.35954186799)*x[2]
            ref[(1, 0, 1)]=-1.92331827881*(1+2.*(dim-1)/(o+1.)) + (-0.0772700198685)*dim
            arg[(1, 1, 0)]=-0.544965280957*x[0]**o + (0.650831721351)*x[0] + (0.942960144083)*x[1]**o + (-0.748135159459)*x[1] + (0.686688688232)*x[2]**o + (0.328253578531)*x[2]
            ref[(1, 1, 0)]=1.08468355136*(1+2.*(dim-1)/(o+1.)) + (0.230950140423)*dim
            arg[(1, 1, 1)]=0.56446288241*x[0]**o + (-0.73099715678)*x[0] + (0.232652147777)*x[1]**o + (0.455037376801)*x[1] + (0.515802194548)*x[2]**o + (-0.564538273846)*x[2]
            ref[(1, 1, 1)]=1.31291722474*(1+2.*(dim-1)/(o+1.)) + (-0.840498053826)*dim
            arg[(2, 0, 0)]=0.162507314675*x[0]**o + (0.149483586413)*x[0] + (0.990009836215)*x[1]**o + (-0.130533755513)*x[1] + (-0.571341820054)*x[2]**o + (0.578288153491)*x[2]
            ref[(2, 0, 0)]=0.581175330836*(1+2.*(dim-1)/(o+1.)) + (0.597237984391)*dim
            arg[(2, 0, 1)]=-0.817377182924*x[0]**o + (0.777281115735)*x[0] + (0.22250871576)*x[1]**o + (-0.276553401189)*x[1] + (0.720493864257)*x[2]**o + (0.72461025181)*x[2]
            ref[(2, 0, 1)]=0.125625397093*(1+2.*(dim-1)/(o+1.)) + (1.22533796636)*dim
            arg[(2, 1, 0)]=-0.136954357178*x[0]**o + (-0.996610386063)*x[0] + (-0.901243491185)*x[1]**o + (0.738794003065)*x[1] + (0.995467666612)*x[2]**o + (0.766789049324)*x[2]
            ref[(2, 1, 0)]=-0.0427301817512*(1+2.*(dim-1)/(o+1.)) + (0.508972666326)*dim
            arg[(2, 1, 1)]=-0.139705221853*x[0]**o + (0.0243496926221)*x[0] + (-0.954439143281)*x[1]**o + (0.127456414979)*x[1] + (-0.377415160674)*x[2]**o + (0.655176076807)*x[2]
            ref[(2, 1, 1)]=-1.47155952581*(1+2.*(dim-1)/(o+1.)) + (0.806982184407)*dim
            arg[(3, 0, 0)]=0.468736503384*x[0]**o + (0.721944788217)*x[0] + (0.631606989218)*x[1]**o + (0.0705952392487)*x[1] + (-0.240073260521)*x[2]**o + (-0.378505363206)*x[2]
            ref[(3, 0, 0)]=0.860270232081*(1+2.*(dim-1)/(o+1.)) + (0.41403466426)*dim
            arg[(3, 0, 1)]=-0.279920745536*x[0]**o + (0.520657130145)*x[0] + (0.645120828651)*x[1]**o + (0.404035500988)*x[1] + (0.434659998127)*x[2]**o + (-0.65769403032)*x[2]
            ref[(3, 0, 1)]=0.799860081242*(1+2.*(dim-1)/(o+1.)) + (0.266998600813)*dim
            arg[(3, 1, 0)]=-0.746751980262*x[0]**o + (0.902473717339)*x[0] + (-0.56009695919)*x[1]**o + (0.592186079772)*x[1] + (-0.266356156077)*x[2]**o + (-0.900527465141)*x[2]
            ref[(3, 1, 0)]=-1.57320509553*(1+2.*(dim-1)/(o+1.)) + (0.594132331971)*dim
            arg[(3, 1, 1)]=-0.32760209498*x[0]**o + (-0.390336103536)*x[0] + (-0.0647083360776)*x[1]**o + (-0.91703365726)*x[1] + (0.8669104787)*x[2]**o + (0.347949736882)*x[2]
            ref[(3, 1, 1)]=0.474600047642*(1+2.*(dim-1)/(o+1.)) + (-0.959420023914)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4, 4),w)
        ref=numpy.zeros((2, 2, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.197922408808*x[0]**o + (-0.430494694547)*x[0] + (0.38464512584)*x[1]**o + (-0.0738144949618)*x[1]
            ref[(0, 0, 0, 0)]=0.582567534648*(1+2.*(dim-1)/(o+1.)) + (-0.504309189509)*dim
            arg[(0, 0, 0, 1)]=0.571448294548*x[0]**o + (0.0364368093017)*x[0] + (0.26376547547)*x[1]**o + (0.257308609272)*x[1]
            ref[(0, 0, 0, 1)]=0.835213770018*(1+2.*(dim-1)/(o+1.)) + (0.293745418574)*dim
            arg[(0, 0, 0, 2)]=-0.202173859659*x[0]**o + (-0.751572555045)*x[0] + (0.272213666918)*x[1]**o + (-0.289805373439)*x[1]
            ref[(0, 0, 0, 2)]=0.0700398072593*(1+2.*(dim-1)/(o+1.)) + (-1.04137792848)*dim
            arg[(0, 0, 0, 3)]=-0.0372235701286*x[0]**o + (-0.109278946099)*x[0] + (-0.412050503568)*x[1]**o + (0.416534754489)*x[1]
            ref[(0, 0, 0, 3)]=-0.449274073697*(1+2.*(dim-1)/(o+1.)) + (0.30725580839)*dim
            arg[(0, 0, 1, 0)]=-0.420628970272*x[0]**o + (-0.640209000265)*x[0] + (-0.448073054619)*x[1]**o + (0.479982996589)*x[1]
            ref[(0, 0, 1, 0)]=-0.86870202489*(1+2.*(dim-1)/(o+1.)) + (-0.160226003676)*dim
            arg[(0, 0, 1, 1)]=0.0611174774135*x[0]**o + (0.337620979827)*x[0] + (-0.817963807899)*x[1]**o + (0.11484640869)*x[1]
            ref[(0, 0, 1, 1)]=-0.756846330486*(1+2.*(dim-1)/(o+1.)) + (0.452467388517)*dim
            arg[(0, 0, 1, 2)]=0.402864219192*x[0]**o + (-0.0511126227922)*x[0] + (-0.0341855364237)*x[1]**o + (0.557783332689)*x[1]
            ref[(0, 0, 1, 2)]=0.368678682769*(1+2.*(dim-1)/(o+1.)) + (0.506670709897)*dim
            arg[(0, 0, 1, 3)]=-0.0409895411953*x[0]**o + (-0.115457351309)*x[0] + (0.919953836132)*x[1]**o + (0.953498167978)*x[1]
            ref[(0, 0, 1, 3)]=0.878964294937*(1+2.*(dim-1)/(o+1.)) + (0.838040816669)*dim
            arg[(0, 0, 2, 0)]=-0.289645378165*x[0]**o + (0.548579513281)*x[0] + (0.312455978104)*x[1]**o + (-0.691492624879)*x[1]
            ref[(0, 0, 2, 0)]=0.02281059994*(1+2.*(dim-1)/(o+1.)) + (-0.142913111598)*dim
            arg[(0, 0, 2, 1)]=0.104672457657*x[0]**o + (-0.885929623735)*x[0] + (0.715199006131)*x[1]**o + (0.515452468563)*x[1]
            ref[(0, 0, 2, 1)]=0.819871463788*(1+2.*(dim-1)/(o+1.)) + (-0.370477155171)*dim
            arg[(0, 0, 2, 2)]=-0.825934875235*x[0]**o + (-0.998115374109)*x[0] + (0.410018235134)*x[1]**o + (-0.658274093506)*x[1]
            ref[(0, 0, 2, 2)]=-0.415916640102*(1+2.*(dim-1)/(o+1.)) + (-1.65638946761)*dim
            arg[(0, 0, 2, 3)]=0.650872119953*x[0]**o + (0.62388518651)*x[0] + (0.588550230342)*x[1]**o + (0.620519464764)*x[1]
            ref[(0, 0, 2, 3)]=1.2394223503*(1+2.*(dim-1)/(o+1.)) + (1.24440465127)*dim
            arg[(0, 0, 3, 0)]=-0.260657566539*x[0]**o + (0.850435225002)*x[0] + (-0.281262897952)*x[1]**o + (0.275277941307)*x[1]
            ref[(0, 0, 3, 0)]=-0.541920464491*(1+2.*(dim-1)/(o+1.)) + (1.12571316631)*dim
            arg[(0, 0, 3, 1)]=-0.625685254252*x[0]**o + (0.910148720458)*x[0] + (-0.47006824462)*x[1]**o + (-0.0244597199773)*x[1]
            ref[(0, 0, 3, 1)]=-1.09575349887*(1+2.*(dim-1)/(o+1.)) + (0.88568900048)*dim
            arg[(0, 0, 3, 2)]=0.654007300234*x[0]**o + (0.86152338915)*x[0] + (0.523590612388)*x[1]**o + (-0.342578310019)*x[1]
            ref[(0, 0, 3, 2)]=1.17759791262*(1+2.*(dim-1)/(o+1.)) + (0.518945079131)*dim
            arg[(0, 0, 3, 3)]=0.0458708358248*x[0]**o + (-0.355720380979)*x[0] + (0.0719125232477)*x[1]**o + (-0.978631858845)*x[1]
            ref[(0, 0, 3, 3)]=0.117783359072*(1+2.*(dim-1)/(o+1.)) + (-1.33435223982)*dim
            arg[(0, 1, 0, 0)]=-0.796168175075*x[0]**o + (0.765283581468)*x[0] + (0.721808348643)*x[1]**o + (0.855075177849)*x[1]
            ref[(0, 1, 0, 0)]=-0.0743598264322*(1+2.*(dim-1)/(o+1.)) + (1.62035875932)*dim
            arg[(0, 1, 0, 1)]=0.404887007182*x[0]**o + (0.529297146074)*x[0] + (-0.225104943725)*x[1]**o + (-0.495309728651)*x[1]
            ref[(0, 1, 0, 1)]=0.179782063457*(1+2.*(dim-1)/(o+1.)) + (0.0339874174223)*dim
            arg[(0, 1, 0, 2)]=-0.397419851643*x[0]**o + (0.302989544655)*x[0] + (-0.16227494014)*x[1]**o + (-0.539163768882)*x[1]
            ref[(0, 1, 0, 2)]=-0.559694791783*(1+2.*(dim-1)/(o+1.)) + (-0.236174224227)*dim
            arg[(0, 1, 0, 3)]=0.0626308895917*x[0]**o + (-0.0757905055075)*x[0] + (-0.172788576765)*x[1]**o + (-0.112644059481)*x[1]
            ref[(0, 1, 0, 3)]=-0.110157687173*(1+2.*(dim-1)/(o+1.)) + (-0.188434564989)*dim
            arg[(0, 1, 1, 0)]=-0.441408756698*x[0]**o + (0.952073326864)*x[0] + (-0.902727170184)*x[1]**o + (-0.70690615174)*x[1]
            ref[(0, 1, 1, 0)]=-1.34413592688*(1+2.*(dim-1)/(o+1.)) + (0.245167175124)*dim
            arg[(0, 1, 1, 1)]=-0.822633522491*x[0]**o + (0.845406401405)*x[0] + (0.275660202865)*x[1]**o + (0.101740017116)*x[1]
            ref[(0, 1, 1, 1)]=-0.546973319626*(1+2.*(dim-1)/(o+1.)) + (0.94714641852)*dim
            arg[(0, 1, 1, 2)]=0.399635328332*x[0]**o + (-0.319516961687)*x[0] + (-0.779481731989)*x[1]**o + (0.212016773872)*x[1]
            ref[(0, 1, 1, 2)]=-0.379846403657*(1+2.*(dim-1)/(o+1.)) + (-0.107500187815)*dim
            arg[(0, 1, 1, 3)]=-0.732599866077*x[0]**o + (0.816280321377)*x[0] + (0.107626001954)*x[1]**o + (-0.854598223258)*x[1]
            ref[(0, 1, 1, 3)]=-0.624973864123*(1+2.*(dim-1)/(o+1.)) + (-0.0383179018804)*dim
            arg[(0, 1, 2, 0)]=0.502638174721*x[0]**o + (0.499826435348)*x[0] + (-0.115355642414)*x[1]**o + (0.460572780581)*x[1]
            ref[(0, 1, 2, 0)]=0.387282532307*(1+2.*(dim-1)/(o+1.)) + (0.960399215929)*dim
            arg[(0, 1, 2, 1)]=-0.85952604621*x[0]**o + (-0.507907809532)*x[0] + (0.816647547545)*x[1]**o + (0.735034564731)*x[1]
            ref[(0, 1, 2, 1)]=-0.0428784986649*(1+2.*(dim-1)/(o+1.)) + (0.227126755199)*dim
            arg[(0, 1, 2, 2)]=0.778808296276*x[0]**o + (0.360078413932)*x[0] + (0.985442815531)*x[1]**o + (-0.501587296569)*x[1]
            ref[(0, 1, 2, 2)]=1.76425111181*(1+2.*(dim-1)/(o+1.)) + (-0.141508882637)*dim
            arg[(0, 1, 2, 3)]=-0.739535253378*x[0]**o + (0.771935891834)*x[0] + (-0.0504683067973)*x[1]**o + (0.799517838449)*x[1]
            ref[(0, 1, 2, 3)]=-0.790003560175*(1+2.*(dim-1)/(o+1.)) + (1.57145373028)*dim
            arg[(0, 1, 3, 0)]=0.119043843251*x[0]**o + (-0.683537456861)*x[0] + (0.0470441565095)*x[1]**o + (-0.00392503452077)*x[1]
            ref[(0, 1, 3, 0)]=0.166087999761*(1+2.*(dim-1)/(o+1.)) + (-0.687462491382)*dim
            arg[(0, 1, 3, 1)]=0.751393492392*x[0]**o + (0.97097318867)*x[0] + (0.605433729377)*x[1]**o + (-0.558567611686)*x[1]
            ref[(0, 1, 3, 1)]=1.35682722177*(1+2.*(dim-1)/(o+1.)) + (0.412405576984)*dim
            arg[(0, 1, 3, 2)]=-0.0757676850673*x[0]**o + (0.96336761317)*x[0] + (0.153152188048)*x[1]**o + (0.267837120894)*x[1]
            ref[(0, 1, 3, 2)]=0.0773845029812*(1+2.*(dim-1)/(o+1.)) + (1.23120473406)*dim
            arg[(0, 1, 3, 3)]=0.861391702382*x[0]**o + (-0.202751218869)*x[0] + (-0.0336239564586)*x[1]**o + (-0.559552867029)*x[1]
            ref[(0, 1, 3, 3)]=0.827767745924*(1+2.*(dim-1)/(o+1.)) + (-0.762304085898)*dim
            arg[(1, 0, 0, 0)]=0.730227404656*x[0]**o + (0.266802574158)*x[0] + (-0.679680948716)*x[1]**o + (0.407828635387)*x[1]
            ref[(1, 0, 0, 0)]=0.0505464559404*(1+2.*(dim-1)/(o+1.)) + (0.674631209544)*dim
            arg[(1, 0, 0, 1)]=0.174544432962*x[0]**o + (-0.873122864493)*x[0] + (-0.906240275173)*x[1]**o + (-0.702168575935)*x[1]
            ref[(1, 0, 0, 1)]=-0.731695842211*(1+2.*(dim-1)/(o+1.)) + (-1.57529144043)*dim
            arg[(1, 0, 0, 2)]=-0.948652720493*x[0]**o + (-0.299000698687)*x[0] + (-0.0681250386796)*x[1]**o + (0.543104541881)*x[1]
            ref[(1, 0, 0, 2)]=-1.01677775917*(1+2.*(dim-1)/(o+1.)) + (0.244103843194)*dim
            arg[(1, 0, 0, 3)]=0.280999978002*x[0]**o + (0.772793563701)*x[0] + (0.705864367106)*x[1]**o + (-0.944886224513)*x[1]
            ref[(1, 0, 0, 3)]=0.986864345108*(1+2.*(dim-1)/(o+1.)) + (-0.172092660811)*dim
            arg[(1, 0, 1, 0)]=0.820542088553*x[0]**o + (-0.939909417525)*x[0] + (-0.4630982548)*x[1]**o + (0.966470163764)*x[1]
            ref[(1, 0, 1, 0)]=0.357443833753*(1+2.*(dim-1)/(o+1.)) + (0.0265607462386)*dim
            arg[(1, 0, 1, 1)]=-0.400990376895*x[0]**o + (0.978875540045)*x[0] + (-0.628397953271)*x[1]**o + (0.0412127799976)*x[1]
            ref[(1, 0, 1, 1)]=-1.02938833017*(1+2.*(dim-1)/(o+1.)) + (1.02008832004)*dim
            arg[(1, 0, 1, 2)]=0.978264307359*x[0]**o + (-0.741066200668)*x[0] + (0.0949007438119)*x[1]**o + (0.333701237229)*x[1]
            ref[(1, 0, 1, 2)]=1.07316505117*(1+2.*(dim-1)/(o+1.)) + (-0.407364963439)*dim
            arg[(1, 0, 1, 3)]=0.68194270275*x[0]**o + (-0.845252112751)*x[0] + (-0.19551689221)*x[1]**o + (0.199393774611)*x[1]
            ref[(1, 0, 1, 3)]=0.48642581054*(1+2.*(dim-1)/(o+1.)) + (-0.64585833814)*dim
            arg[(1, 0, 2, 0)]=-0.39116203087*x[0]**o + (0.20850045733)*x[0] + (0.58471644377)*x[1]**o + (0.0989083369956)*x[1]
            ref[(1, 0, 2, 0)]=0.1935544129*(1+2.*(dim-1)/(o+1.)) + (0.307408794325)*dim
            arg[(1, 0, 2, 1)]=0.912836596291*x[0]**o + (0.793695502106)*x[0] + (0.375854326156)*x[1]**o + (0.509310182858)*x[1]
            ref[(1, 0, 2, 1)]=1.28869092245*(1+2.*(dim-1)/(o+1.)) + (1.30300568496)*dim
            arg[(1, 0, 2, 2)]=-0.827005676118*x[0]**o + (-0.0934664444775)*x[0] + (0.547177826505)*x[1]**o + (0.629121655941)*x[1]
            ref[(1, 0, 2, 2)]=-0.279827849613*(1+2.*(dim-1)/(o+1.)) + (0.535655211464)*dim
            arg[(1, 0, 2, 3)]=0.878514819692*x[0]**o + (-0.560417044752)*x[0] + (-0.142386690516)*x[1]**o + (-0.569146464131)*x[1]
            ref[(1, 0, 2, 3)]=0.736128129176*(1+2.*(dim-1)/(o+1.)) + (-1.12956350888)*dim
            arg[(1, 0, 3, 0)]=-0.858637241148*x[0]**o + (-0.0382883531223)*x[0] + (-0.894261064065)*x[1]**o + (0.249056813164)*x[1]
            ref[(1, 0, 3, 0)]=-1.75289830521*(1+2.*(dim-1)/(o+1.)) + (0.210768460041)*dim
            arg[(1, 0, 3, 1)]=-0.188949835841*x[0]**o + (0.189108083026)*x[0] + (0.8765696392)*x[1]**o + (-0.407528280684)*x[1]
            ref[(1, 0, 3, 1)]=0.687619803359*(1+2.*(dim-1)/(o+1.)) + (-0.218420197658)*dim
            arg[(1, 0, 3, 2)]=0.762479277257*x[0]**o + (-0.639259677847)*x[0] + (-0.418641217772)*x[1]**o + (-0.292394536826)*x[1]
            ref[(1, 0, 3, 2)]=0.343838059485*(1+2.*(dim-1)/(o+1.)) + (-0.931654214673)*dim
            arg[(1, 0, 3, 3)]=-0.297823241615*x[0]**o + (-0.337593386899)*x[0] + (-0.863633444502)*x[1]**o + (-0.233129318884)*x[1]
            ref[(1, 0, 3, 3)]=-1.16145668612*(1+2.*(dim-1)/(o+1.)) + (-0.570722705782)*dim
            arg[(1, 1, 0, 0)]=0.899403396208*x[0]**o + (-0.395799044171)*x[0] + (0.82331932452)*x[1]**o + (0.723941683435)*x[1]
            ref[(1, 1, 0, 0)]=1.72272272073*(1+2.*(dim-1)/(o+1.)) + (0.328142639264)*dim
            arg[(1, 1, 0, 1)]=-0.470960588734*x[0]**o + (0.459288277002)*x[0] + (0.553072327998)*x[1]**o + (0.925936642484)*x[1]
            ref[(1, 1, 0, 1)]=0.0821117392645*(1+2.*(dim-1)/(o+1.)) + (1.38522491949)*dim
            arg[(1, 1, 0, 2)]=0.858589607143*x[0]**o + (-0.929049902719)*x[0] + (-0.381055785676)*x[1]**o + (0.117673029513)*x[1]
            ref[(1, 1, 0, 2)]=0.477533821467*(1+2.*(dim-1)/(o+1.)) + (-0.811376873206)*dim
            arg[(1, 1, 0, 3)]=-0.70010435743*x[0]**o + (-0.73134355366)*x[0] + (0.485110129811)*x[1]**o + (0.77536492404)*x[1]
            ref[(1, 1, 0, 3)]=-0.214994227619*(1+2.*(dim-1)/(o+1.)) + (0.0440213703802)*dim
            arg[(1, 1, 1, 0)]=0.648696912802*x[0]**o + (-0.671696093962)*x[0] + (0.619869683234)*x[1]**o + (-0.384978751628)*x[1]
            ref[(1, 1, 1, 0)]=1.26856659604*(1+2.*(dim-1)/(o+1.)) + (-1.05667484559)*dim
            arg[(1, 1, 1, 1)]=-0.774266357202*x[0]**o + (-0.463902685879)*x[0] + (-0.016668244489)*x[1]**o + (0.0112016305676)*x[1]
            ref[(1, 1, 1, 1)]=-0.790934601691*(1+2.*(dim-1)/(o+1.)) + (-0.452701055311)*dim
            arg[(1, 1, 1, 2)]=-0.301760997743*x[0]**o + (0.850498820406)*x[0] + (-0.6523421515)*x[1]**o + (0.420599736615)*x[1]
            ref[(1, 1, 1, 2)]=-0.954103149243*(1+2.*(dim-1)/(o+1.)) + (1.27109855702)*dim
            arg[(1, 1, 1, 3)]=0.0942483437353*x[0]**o + (0.666259119532)*x[0] + (0.931997211318)*x[1]**o + (0.80443443528)*x[1]
            ref[(1, 1, 1, 3)]=1.02624555505*(1+2.*(dim-1)/(o+1.)) + (1.47069355481)*dim
            arg[(1, 1, 2, 0)]=0.970971639047*x[0]**o + (0.36396668305)*x[0] + (0.211713184092)*x[1]**o + (0.391845874991)*x[1]
            ref[(1, 1, 2, 0)]=1.18268482314*(1+2.*(dim-1)/(o+1.)) + (0.755812558041)*dim
            arg[(1, 1, 2, 1)]=-0.304440886384*x[0]**o + (-0.54778739425)*x[0] + (0.0371549717556)*x[1]**o + (0.582846092263)*x[1]
            ref[(1, 1, 2, 1)]=-0.267285914628*(1+2.*(dim-1)/(o+1.)) + (0.0350586980136)*dim
            arg[(1, 1, 2, 2)]=-0.974909521155*x[0]**o + (-0.326309156272)*x[0] + (0.696137765024)*x[1]**o + (0.330480438963)*x[1]
            ref[(1, 1, 2, 2)]=-0.278771756131*(1+2.*(dim-1)/(o+1.)) + (0.00417128269084)*dim
            arg[(1, 1, 2, 3)]=0.544994060088*x[0]**o + (0.323602745804)*x[0] + (0.0210441390453)*x[1]**o + (0.401696320368)*x[1]
            ref[(1, 1, 2, 3)]=0.566038199133*(1+2.*(dim-1)/(o+1.)) + (0.725299066171)*dim
            arg[(1, 1, 3, 0)]=0.467725371432*x[0]**o + (0.967959270869)*x[0] + (0.219064769278)*x[1]**o + (-0.32816857551)*x[1]
            ref[(1, 1, 3, 0)]=0.68679014071*(1+2.*(dim-1)/(o+1.)) + (0.639790695359)*dim
            arg[(1, 1, 3, 1)]=-0.713715415597*x[0]**o + (0.818412244451)*x[0] + (-0.776177758382)*x[1]**o + (0.483233817353)*x[1]
            ref[(1, 1, 3, 1)]=-1.48989317398*(1+2.*(dim-1)/(o+1.)) + (1.3016460618)*dim
            arg[(1, 1, 3, 2)]=0.727689676998*x[0]**o + (0.074898597754)*x[0] + (0.986946700601)*x[1]**o + (-0.266659473969)*x[1]
            ref[(1, 1, 3, 2)]=1.7146363776*(1+2.*(dim-1)/(o+1.)) + (-0.191760876215)*dim
            arg[(1, 1, 3, 3)]=0.112304595742*x[0]**o + (0.768904003531)*x[0] + (-0.21236888805)*x[1]**o + (-0.945707621957)*x[1]
            ref[(1, 1, 3, 3)]=-0.100064292308*(1+2.*(dim-1)/(o+1.)) + (-0.176803618426)*dim
        else:
            arg[(0, 0, 0, 0)]=0.152970888627*x[0]**o + (-0.68375826934)*x[0] + (-0.958017831932)*x[1]**o + (-0.326766148758)*x[1] + (-0.764796971017)*x[2]**o + (0.10246196067)*x[2]
            ref[(0, 0, 0, 0)]=-1.56984391432*(1+2.*(dim-1)/(o+1.)) + (-0.908062457428)*dim
            arg[(0, 0, 0, 1)]=0.444196864611*x[0]**o + (-0.19061106679)*x[0] + (-0.809306800596)*x[1]**o + (0.86481247523)*x[1] + (-0.90863599834)*x[2]**o + (-0.411435764102)*x[2]
            ref[(0, 0, 0, 1)]=-1.27374593432*(1+2.*(dim-1)/(o+1.)) + (0.262765644338)*dim
            arg[(0, 0, 0, 2)]=-0.93948471218*x[0]**o + (0.13443945792)*x[0] + (0.435816024805)*x[1]**o + (-0.954061315666)*x[1] + (0.13454392974)*x[2]**o + (0.63872255973)*x[2]
            ref[(0, 0, 0, 2)]=-0.369124757635*(1+2.*(dim-1)/(o+1.)) + (-0.180899298015)*dim
            arg[(0, 0, 0, 3)]=0.55497429575*x[0]**o + (0.229899865446)*x[0] + (0.408741004016)*x[1]**o + (-0.509923602614)*x[1] + (0.347283543294)*x[2]**o + (0.334014435564)*x[2]
            ref[(0, 0, 0, 3)]=1.31099884306*(1+2.*(dim-1)/(o+1.)) + (0.0539906983965)*dim
            arg[(0, 0, 1, 0)]=0.662800804691*x[0]**o + (0.00756434952051)*x[0] + (0.485172731538)*x[1]**o + (-0.527751285842)*x[1] + (0.543253581502)*x[2]**o + (0.703792483476)*x[2]
            ref[(0, 0, 1, 0)]=1.69122711773*(1+2.*(dim-1)/(o+1.)) + (0.183605547155)*dim
            arg[(0, 0, 1, 1)]=-0.183345028362*x[0]**o + (0.521676262979)*x[0] + (-0.833637137089)*x[1]**o + (0.725921434328)*x[1] + (-0.230699352268)*x[2]**o + (-0.252664199005)*x[2]
            ref[(0, 0, 1, 1)]=-1.24768151772*(1+2.*(dim-1)/(o+1.)) + (0.994933498301)*dim
            arg[(0, 0, 1, 2)]=-0.00233389247845*x[0]**o + (-0.918183537284)*x[0] + (-0.357312818789)*x[1]**o + (0.212656100922)*x[1] + (-0.333450176392)*x[2]**o + (0.587774334608)*x[2]
            ref[(0, 0, 1, 2)]=-0.69309688766*(1+2.*(dim-1)/(o+1.)) + (-0.117753101754)*dim
            arg[(0, 0, 1, 3)]=-0.884440641389*x[0]**o + (-0.357729372543)*x[0] + (-0.771986924552)*x[1]**o + (0.42144851359)*x[1] + (-0.982222337876)*x[2]**o + (0.574386600622)*x[2]
            ref[(0, 0, 1, 3)]=-2.63864990382*(1+2.*(dim-1)/(o+1.)) + (0.638105741669)*dim
            arg[(0, 0, 2, 0)]=-0.987782652992*x[0]**o + (0.662072529052)*x[0] + (0.291887526347)*x[1]**o + (-0.781049552821)*x[1] + (-0.0244107508782)*x[2]**o + (0.269418588667)*x[2]
            ref[(0, 0, 2, 0)]=-0.720305877523*(1+2.*(dim-1)/(o+1.)) + (0.150441564897)*dim
            arg[(0, 0, 2, 1)]=0.675980997612*x[0]**o + (0.960162236308)*x[0] + (-0.280839128495)*x[1]**o + (-0.822625423346)*x[1] + (-0.855099460928)*x[2]**o + (-0.449388169726)*x[2]
            ref[(0, 0, 2, 1)]=-0.459957591811*(1+2.*(dim-1)/(o+1.)) + (-0.311851356763)*dim
            arg[(0, 0, 2, 2)]=0.242262903711*x[0]**o + (0.959085508747)*x[0] + (-0.402401824592)*x[1]**o + (0.691368704814)*x[1] + (-0.621011254646)*x[2]**o + (0.730863263777)*x[2]
            ref[(0, 0, 2, 2)]=-0.781150175527*(1+2.*(dim-1)/(o+1.)) + (2.38131747734)*dim
            arg[(0, 0, 2, 3)]=-0.862381353701*x[0]**o + (0.547604125132)*x[0] + (0.550558997835)*x[1]**o + (-0.119466866108)*x[1] + (-0.198972944688)*x[2]**o + (0.349909747912)*x[2]
            ref[(0, 0, 2, 3)]=-0.510795300554*(1+2.*(dim-1)/(o+1.)) + (0.778047006936)*dim
            arg[(0, 0, 3, 0)]=0.0816789290314*x[0]**o + (0.877375847236)*x[0] + (0.795876628045)*x[1]**o + (0.212413805384)*x[1] + (-0.0289163217748)*x[2]**o + (0.214216183578)*x[2]
            ref[(0, 0, 3, 0)]=0.848639235302*(1+2.*(dim-1)/(o+1.)) + (1.3040058362)*dim
            arg[(0, 0, 3, 1)]=-0.140267136821*x[0]**o + (0.718200858604)*x[0] + (-0.155279369064)*x[1]**o + (0.486542428494)*x[1] + (0.503131605375)*x[2]**o + (0.746937931724)*x[2]
            ref[(0, 0, 3, 1)]=0.20758509949*(1+2.*(dim-1)/(o+1.)) + (1.95168121882)*dim
            arg[(0, 0, 3, 2)]=-0.864835053863*x[0]**o + (-0.202354958808)*x[0] + (0.234226552335)*x[1]**o + (-0.611117720911)*x[1] + (0.889044190804)*x[2]**o + (-0.599454236728)*x[2]
            ref[(0, 0, 3, 2)]=0.258435689276*(1+2.*(dim-1)/(o+1.)) + (-1.41292691645)*dim
            arg[(0, 0, 3, 3)]=0.182551991703*x[0]**o + (0.219782984909)*x[0] + (0.802780513064)*x[1]**o + (0.92723762314)*x[1] + (0.963313067051)*x[2]**o + (-0.57079186696)*x[2]
            ref[(0, 0, 3, 3)]=1.94864557182*(1+2.*(dim-1)/(o+1.)) + (0.57622874109)*dim
            arg[(0, 1, 0, 0)]=-0.531773616398*x[0]**o + (0.945167612279)*x[0] + (-0.586129778466)*x[1]**o + (0.62827326767)*x[1] + (-0.188318133388)*x[2]**o + (-0.31183755578)*x[2]
            ref[(0, 1, 0, 0)]=-1.30622152825*(1+2.*(dim-1)/(o+1.)) + (1.26160332417)*dim
            arg[(0, 1, 0, 1)]=0.575717154335*x[0]**o + (-0.441678548767)*x[0] + (0.767689149757)*x[1]**o + (0.150837640782)*x[1] + (-0.942699092669)*x[2]**o + (-0.146839828124)*x[2]
            ref[(0, 1, 0, 1)]=0.400707211422*(1+2.*(dim-1)/(o+1.)) + (-0.437680736109)*dim
            arg[(0, 1, 0, 2)]=-0.804181465197*x[0]**o + (-0.451796983191)*x[0] + (0.307573878049)*x[1]**o + (0.973235350315)*x[1] + (-0.42517687031)*x[2]**o + (-0.469235890706)*x[2]
            ref[(0, 1, 0, 2)]=-0.921784457458*(1+2.*(dim-1)/(o+1.)) + (0.0522024764174)*dim
            arg[(0, 1, 0, 3)]=0.360402056605*x[0]**o + (0.607464276644)*x[0] + (-0.146253122956)*x[1]**o + (-0.0567846149844)*x[1] + (-0.742926262871)*x[2]**o + (-0.992820497404)*x[2]
            ref[(0, 1, 0, 3)]=-0.528777329221*(1+2.*(dim-1)/(o+1.)) + (-0.442140835745)*dim
            arg[(0, 1, 1, 0)]=0.320630705809*x[0]**o + (-0.282518434002)*x[0] + (0.872714499163)*x[1]**o + (0.360476464608)*x[1] + (-0.746333440384)*x[2]**o + (-0.464837277756)*x[2]
            ref[(0, 1, 1, 0)]=0.447011764588*(1+2.*(dim-1)/(o+1.)) + (-0.38687924715)*dim
            arg[(0, 1, 1, 1)]=0.282539976906*x[0]**o + (0.596058603331)*x[0] + (-0.355957903402)*x[1]**o + (0.0895937067101)*x[1] + (-0.620629270422)*x[2]**o + (-0.977131480355)*x[2]
            ref[(0, 1, 1, 1)]=-0.694047196918*(1+2.*(dim-1)/(o+1.)) + (-0.291479170314)*dim
            arg[(0, 1, 1, 2)]=-0.417588468849*x[0]**o + (0.316408180989)*x[0] + (-0.871979550161)*x[1]**o + (0.651953691994)*x[1] + (0.104936827087)*x[2]**o + (-0.089922840747)*x[2]
            ref[(0, 1, 1, 2)]=-1.18463119192*(1+2.*(dim-1)/(o+1.)) + (0.878439032236)*dim
            arg[(0, 1, 1, 3)]=0.796234087157*x[0]**o + (0.542389875438)*x[0] + (0.315198750236)*x[1]**o + (-0.958085683439)*x[1] + (-0.943002552412)*x[2]**o + (-0.111219938076)*x[2]
            ref[(0, 1, 1, 3)]=0.168430284982*(1+2.*(dim-1)/(o+1.)) + (-0.526915746077)*dim
            arg[(0, 1, 2, 0)]=0.288355630146*x[0]**o + (0.965969399166)*x[0] + (-0.394386118729)*x[1]**o + (-0.411475487713)*x[1] + (-0.266616613613)*x[2]**o + (-0.569574699729)*x[2]
            ref[(0, 1, 2, 0)]=-0.372647102197*(1+2.*(dim-1)/(o+1.)) + (-0.0150807882768)*dim
            arg[(0, 1, 2, 1)]=0.0794091596975*x[0]**o + (0.946033244853)*x[0] + (0.770735091847)*x[1]**o + (-0.294625446683)*x[1] + (0.46841651621)*x[2]**o + (-0.592149719372)*x[2]
            ref[(0, 1, 2, 1)]=1.31856076775*(1+2.*(dim-1)/(o+1.)) + (0.059258078798)*dim
            arg[(0, 1, 2, 2)]=0.206615600522*x[0]**o + (-0.815040480209)*x[0] + (0.0120440610509)*x[1]**o + (0.904842723767)*x[1] + (0.427761413843)*x[2]**o + (0.717296832232)*x[2]
            ref[(0, 1, 2, 2)]=0.646421075416*(1+2.*(dim-1)/(o+1.)) + (0.807099075789)*dim
            arg[(0, 1, 2, 3)]=-0.871389744629*x[0]**o + (-0.166599011299)*x[0] + (-0.421025108456)*x[1]**o + (0.122848220353)*x[1] + (0.0480380474271)*x[2]**o + (0.418768121878)*x[2]
            ref[(0, 1, 2, 3)]=-1.24437680566*(1+2.*(dim-1)/(o+1.)) + (0.375017330933)*dim
            arg[(0, 1, 3, 0)]=-0.814221378845*x[0]**o + (-0.628271374462)*x[0] + (-0.586764576628)*x[1]**o + (0.551773273371)*x[1] + (-0.498366069095)*x[2]**o + (0.310445918093)*x[2]
            ref[(0, 1, 3, 0)]=-1.89935202457*(1+2.*(dim-1)/(o+1.)) + (0.233947817003)*dim
            arg[(0, 1, 3, 1)]=0.145288759433*x[0]**o + (-0.202419708598)*x[0] + (0.808020711022)*x[1]**o + (0.742012273349)*x[1] + (-0.262391514266)*x[2]**o + (-0.221910988833)*x[2]
            ref[(0, 1, 3, 1)]=0.690917956189*(1+2.*(dim-1)/(o+1.)) + (0.317681575918)*dim
            arg[(0, 1, 3, 2)]=-0.179369680547*x[0]**o + (0.575961844134)*x[0] + (-0.825141482816)*x[1]**o + (0.37512423371)*x[1] + (-0.969126897235)*x[2]**o + (-0.770086460032)*x[2]
            ref[(0, 1, 3, 2)]=-1.9736380606*(1+2.*(dim-1)/(o+1.)) + (0.180999617812)*dim
            arg[(0, 1, 3, 3)]=-0.540058774882*x[0]**o + (-0.0387173853868)*x[0] + (-0.898168433521)*x[1]**o + (-0.967255663405)*x[1] + (0.951965986985)*x[2]**o + (-0.0552219466712)*x[2]
            ref[(0, 1, 3, 3)]=-0.486261221418*(1+2.*(dim-1)/(o+1.)) + (-1.06119499546)*dim
            arg[(1, 0, 0, 0)]=0.253592582098*x[0]**o + (0.45580204866)*x[0] + (-0.323390409506)*x[1]**o + (0.0832441164224)*x[1] + (0.31412060633)*x[2]**o + (0.916789543779)*x[2]
            ref[(1, 0, 0, 0)]=0.244322778922*(1+2.*(dim-1)/(o+1.)) + (1.45583570886)*dim
            arg[(1, 0, 0, 1)]=-0.367410365571*x[0]**o + (0.944498731531)*x[0] + (0.723123632119)*x[1]**o + (0.956896961454)*x[1] + (-0.408744195029)*x[2]**o + (-0.133993228671)*x[2]
            ref[(1, 0, 0, 1)]=-0.0530309284809*(1+2.*(dim-1)/(o+1.)) + (1.76740246431)*dim
            arg[(1, 0, 0, 2)]=-0.0841540121076*x[0]**o + (0.233212739329)*x[0] + (-0.240541094628)*x[1]**o + (-0.7009148531)*x[1] + (0.109147081081)*x[2]**o + (-0.896917488171)*x[2]
            ref[(1, 0, 0, 2)]=-0.215548025655*(1+2.*(dim-1)/(o+1.)) + (-1.36461960194)*dim
            arg[(1, 0, 0, 3)]=0.446689648803*x[0]**o + (0.31017678754)*x[0] + (0.878817732216)*x[1]**o + (0.914582840239)*x[1] + (0.597583291973)*x[2]**o + (0.600063369975)*x[2]
            ref[(1, 0, 0, 3)]=1.92309067299*(1+2.*(dim-1)/(o+1.)) + (1.82482299775)*dim
            arg[(1, 0, 1, 0)]=0.802672964414*x[0]**o + (-0.65330618914)*x[0] + (0.733493952654)*x[1]**o + (0.11967626735)*x[1] + (-0.205613190668)*x[2]**o + (0.409978858735)*x[2]
            ref[(1, 0, 1, 0)]=1.3305537264*(1+2.*(dim-1)/(o+1.)) + (-0.123651063055)*dim
            arg[(1, 0, 1, 1)]=-0.364649712399*x[0]**o + (0.214004257824)*x[0] + (0.450452314742)*x[1]**o + (0.506018466846)*x[1] + (-0.289384022397)*x[2]**o + (0.746675311998)*x[2]
            ref[(1, 0, 1, 1)]=-0.203581420055*(1+2.*(dim-1)/(o+1.)) + (1.46669803667)*dim
            arg[(1, 0, 1, 2)]=-0.08273164135*x[0]**o + (0.764730629473)*x[0] + (-0.195864193326)*x[1]**o + (-0.454099026699)*x[1] + (0.585938627896)*x[2]**o + (0.582383735028)*x[2]
            ref[(1, 0, 1, 2)]=0.307342793221*(1+2.*(dim-1)/(o+1.)) + (0.893015337803)*dim
            arg[(1, 0, 1, 3)]=0.58184229901*x[0]**o + (0.333612707624)*x[0] + (-0.242719632575)*x[1]**o + (0.91113731751)*x[1] + (-0.473206352966)*x[2]**o + (-0.490954861746)*x[2]
            ref[(1, 0, 1, 3)]=-0.134083686531*(1+2.*(dim-1)/(o+1.)) + (0.753795163388)*dim
            arg[(1, 0, 2, 0)]=0.258631210458*x[0]**o + (-0.568384296394)*x[0] + (0.0611658659348)*x[1]**o + (0.538858295704)*x[1] + (0.331998180593)*x[2]**o + (0.479985960342)*x[2]
            ref[(1, 0, 2, 0)]=0.651795256986*(1+2.*(dim-1)/(o+1.)) + (0.450459959652)*dim
            arg[(1, 0, 2, 1)]=-0.219687311491*x[0]**o + (0.226318599575)*x[0] + (-0.602140728926)*x[1]**o + (0.0760583923686)*x[1] + (0.692433546099)*x[2]**o + (-0.124840470005)*x[2]
            ref[(1, 0, 2, 1)]=-0.129394494317*(1+2.*(dim-1)/(o+1.)) + (0.177536521939)*dim
            arg[(1, 0, 2, 2)]=0.0323752216421*x[0]**o + (-0.669731676833)*x[0] + (0.57494561424)*x[1]**o + (-0.0860157817487)*x[1] + (0.717738806697)*x[2]**o + (-0.784430696879)*x[2]
            ref[(1, 0, 2, 2)]=1.32505964258*(1+2.*(dim-1)/(o+1.)) + (-1.54017815546)*dim
            arg[(1, 0, 2, 3)]=0.0562883286487*x[0]**o + (0.11200989066)*x[0] + (0.57282653432)*x[1]**o + (0.770330684872)*x[1] + (0.758349017599)*x[2]**o + (0.138877648273)*x[2]
            ref[(1, 0, 2, 3)]=1.38746388057*(1+2.*(dim-1)/(o+1.)) + (1.02121822381)*dim
            arg[(1, 0, 3, 0)]=0.0175541893917*x[0]**o + (0.521560344752)*x[0] + (0.375998147326)*x[1]**o + (0.0838779128904)*x[1] + (-0.123751794758)*x[2]**o + (0.273577911696)*x[2]
            ref[(1, 0, 3, 0)]=0.26980054196*(1+2.*(dim-1)/(o+1.)) + (0.879016169338)*dim
            arg[(1, 0, 3, 1)]=0.309865079972*x[0]**o + (0.102767050412)*x[0] + (-0.0067023994642)*x[1]**o + (0.772014350823)*x[1] + (0.296564013594)*x[2]**o + (0.46302760207)*x[2]
            ref[(1, 0, 3, 1)]=0.599726694101*(1+2.*(dim-1)/(o+1.)) + (1.3378090033)*dim
            arg[(1, 0, 3, 2)]=0.35612792486*x[0]**o + (0.549572846877)*x[0] + (0.564833619141)*x[1]**o + (0.563406294062)*x[1] + (-0.131201666249)*x[2]**o + (-0.358785647198)*x[2]
            ref[(1, 0, 3, 2)]=0.789759877752*(1+2.*(dim-1)/(o+1.)) + (0.754193493742)*dim
            arg[(1, 0, 3, 3)]=-0.408918309668*x[0]**o + (0.653668623231)*x[0] + (-0.591301094185)*x[1]**o + (-0.657741182699)*x[1] + (-0.495763562214)*x[2]**o + (0.425564978444)*x[2]
            ref[(1, 0, 3, 3)]=-1.49598296607*(1+2.*(dim-1)/(o+1.)) + (0.421492418976)*dim
            arg[(1, 1, 0, 0)]=-0.22803583795*x[0]**o + (-0.442080022094)*x[0] + (-0.882576024944)*x[1]**o + (-0.634550632372)*x[1] + (-0.0279192903139)*x[2]**o + (0.518177175085)*x[2]
            ref[(1, 1, 0, 0)]=-1.13853115321*(1+2.*(dim-1)/(o+1.)) + (-0.558453479382)*dim
            arg[(1, 1, 0, 1)]=-0.790176318891*x[0]**o + (-0.865290973829)*x[0] + (0.959048120829)*x[1]**o + (-0.956608440894)*x[1] + (-0.181403588073)*x[2]**o + (-0.993721868305)*x[2]
            ref[(1, 1, 0, 1)]=-0.0125317861351*(1+2.*(dim-1)/(o+1.)) + (-2.81562128303)*dim
            arg[(1, 1, 0, 2)]=-0.535808916046*x[0]**o + (-0.931980307297)*x[0] + (-0.081297078059)*x[1]**o + (-0.917104836573)*x[1] + (0.829258079689)*x[2]**o + (0.301116887526)*x[2]
            ref[(1, 1, 0, 2)]=0.212152085584*(1+2.*(dim-1)/(o+1.)) + (-1.54796825634)*dim
            arg[(1, 1, 0, 3)]=-0.459567664776*x[0]**o + (-0.733005862556)*x[0] + (0.584710589038)*x[1]**o + (0.516052927556)*x[1] + (0.678622350213)*x[2]**o + (-0.825988830501)*x[2]
            ref[(1, 1, 0, 3)]=0.803765274476*(1+2.*(dim-1)/(o+1.)) + (-1.0429417655)*dim
            arg[(1, 1, 1, 0)]=-0.934590782621*x[0]**o + (-0.639796295646)*x[0] + (0.340135488763)*x[1]**o + (0.776608828603)*x[1] + (-0.912170096543)*x[2]**o + (-0.595624827006)*x[2]
            ref[(1, 1, 1, 0)]=-1.5066253904*(1+2.*(dim-1)/(o+1.)) + (-0.458812294049)*dim
            arg[(1, 1, 1, 1)]=-0.647801680841*x[0]**o + (0.530161484755)*x[0] + (0.0102383756366)*x[1]**o + (-0.543847361194)*x[1] + (-0.865212953852)*x[2]**o + (0.224897455333)*x[2]
            ref[(1, 1, 1, 1)]=-1.50277625906*(1+2.*(dim-1)/(o+1.)) + (0.211211578894)*dim
            arg[(1, 1, 1, 2)]=-0.25301834539*x[0]**o + (0.060289299082)*x[0] + (0.50704248756)*x[1]**o + (0.180618293356)*x[1] + (0.343379488042)*x[2]**o + (-0.317294207828)*x[2]
            ref[(1, 1, 1, 2)]=0.597403630212*(1+2.*(dim-1)/(o+1.)) + (-0.0763866153903)*dim
            arg[(1, 1, 1, 3)]=0.708460312344*x[0]**o + (-0.106544378611)*x[0] + (-0.366217707346)*x[1]**o + (0.459587524244)*x[1] + (-0.424150525836)*x[2]**o + (-0.980028222614)*x[2]
            ref[(1, 1, 1, 3)]=-0.0819079208369*(1+2.*(dim-1)/(o+1.)) + (-0.62698507698)*dim
            arg[(1, 1, 2, 0)]=-0.863888210113*x[0]**o + (-0.375937613559)*x[0] + (0.253116338899)*x[1]**o + (0.321724435294)*x[1] + (0.788852198883)*x[2]**o + (-0.84087346896)*x[2]
            ref[(1, 1, 2, 0)]=0.178080327669*(1+2.*(dim-1)/(o+1.)) + (-0.895086647225)*dim
            arg[(1, 1, 2, 1)]=0.563925267596*x[0]**o + (0.294936067098)*x[0] + (0.139096658615)*x[1]**o + (0.20861818747)*x[1] + (0.625076674716)*x[2]**o + (0.498135615755)*x[2]
            ref[(1, 1, 2, 1)]=1.32809860093*(1+2.*(dim-1)/(o+1.)) + (1.00168987032)*dim
            arg[(1, 1, 2, 2)]=-0.807489800541*x[0]**o + (0.997304397518)*x[0] + (-0.336897150894)*x[1]**o + (-0.290353910009)*x[1] + (-0.207507665497)*x[2]**o + (-0.182165223411)*x[2]
            ref[(1, 1, 2, 2)]=-1.35189461693*(1+2.*(dim-1)/(o+1.)) + (0.524785264098)*dim
            arg[(1, 1, 2, 3)]=0.394379590073*x[0]**o + (-0.497608103921)*x[0] + (0.503926286375)*x[1]**o + (0.495714156786)*x[1] + (0.188229406504)*x[2]**o + (-0.477063512905)*x[2]
            ref[(1, 1, 2, 3)]=1.08653528295*(1+2.*(dim-1)/(o+1.)) + (-0.47895746004)*dim
            arg[(1, 1, 3, 0)]=0.289714940846*x[0]**o + (-0.523426147737)*x[0] + (-0.842653781884)*x[1]**o + (-0.458028036043)*x[1] + (0.706500300727)*x[2]**o + (0.858029013273)*x[2]
            ref[(1, 1, 3, 0)]=0.153561459689*(1+2.*(dim-1)/(o+1.)) + (-0.123425170507)*dim
            arg[(1, 1, 3, 1)]=-0.396287252063*x[0]**o + (-0.93660184791)*x[0] + (0.182172987749)*x[1]**o + (-0.555375382315)*x[1] + (-0.367620048659)*x[2]**o + (0.0925606558592)*x[2]
            ref[(1, 1, 3, 1)]=-0.581734312973*(1+2.*(dim-1)/(o+1.)) + (-1.39941657437)*dim
            arg[(1, 1, 3, 2)]=0.63825446184*x[0]**o + (0.856307864073)*x[0] + (0.631423053902)*x[1]**o + (-0.899931385624)*x[1] + (-0.861606514567)*x[2]**o + (-0.304732028229)*x[2]
            ref[(1, 1, 3, 2)]=0.408071001175*(1+2.*(dim-1)/(o+1.)) + (-0.348355549779)*dim
            arg[(1, 1, 3, 3)]=0.828886783951*x[0]**o + (0.397160705493)*x[0] + (-0.105959636075)*x[1]**o + (-0.248654157642)*x[1] + (-0.360268620283)*x[2]**o + (0.886980286077)*x[2]
            ref[(1, 1, 3, 3)]=0.362658527593*(1+2.*(dim-1)/(o+1.)) + (1.03548683393)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.686256837308*x[0] + (0.931867392426)*x[1]
            ref=0.245610555118*dim
        else:
            arg=-0.716872176597*x[0] + (0.241341419494)*x[1] + (0.956488213921)*x[2]
            ref=0.480957456818*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.282199629915*x[0] + (-0.739336256892)*x[1]
            ref[(0,)]=-0.457136626977*dim
            arg[(1,)]=0.686105932904*x[0] + (0.498783771106)*x[1]
            ref[(1,)]=1.18488970401*dim
            arg[(2,)]=-0.652710785148*x[0] + (-0.458494545546)*x[1]
            ref[(2,)]=-1.11120533069*dim
        else:
            arg[(0,)]=-0.92574306465*x[0] + (0.293644227502)*x[1] + (-0.401272037985)*x[2]
            ref[(0,)]=-1.03337087513*dim
            arg[(1,)]=-0.911384689431*x[0] + (0.708993156888)*x[1] + (0.621967916477)*x[2]
            ref[(1,)]=0.419576383935*dim
            arg[(2,)]=0.522857947649*x[0] + (0.800344753054)*x[1] + (-0.238156909832)*x[2]
            ref[(2,)]=1.08504579087*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.684197182019*x[0] + (0.345763261899)*x[1]
            ref[(0, 0)]=1.02996044392*dim
            arg[(0, 1)]=-0.824609209621*x[0] + (-0.958354268364)*x[1]
            ref[(0, 1)]=-1.78296347798*dim
            arg[(1, 0)]=-0.0665540442299*x[0] + (-0.416224763929)*x[1]
            ref[(1, 0)]=-0.482778808159*dim
            arg[(1, 1)]=0.290673563323*x[0] + (0.944593119812)*x[1]
            ref[(1, 1)]=1.23526668313*dim
            arg[(2, 0)]=-0.0205046988665*x[0] + (0.743076563133)*x[1]
            ref[(2, 0)]=0.722571864266*dim
            arg[(2, 1)]=0.259038705152*x[0] + (0.624077256598)*x[1]
            ref[(2, 1)]=0.88311596175*dim
            arg[(3, 0)]=0.24949984735*x[0] + (0.643514120677)*x[1]
            ref[(3, 0)]=0.893013968028*dim
            arg[(3, 1)]=0.340932570231*x[0] + (-0.905491305445)*x[1]
            ref[(3, 1)]=-0.564558735214*dim
        else:
            arg[(0, 0)]=-0.247805572406*x[0] + (-0.610922309783)*x[1] + (-0.434935790301)*x[2]
            ref[(0, 0)]=-1.29366367249*dim
            arg[(0, 1)]=0.374407010767*x[0] + (-0.356569402377)*x[1] + (0.530445155897)*x[2]
            ref[(0, 1)]=0.548282764286*dim
            arg[(1, 0)]=-0.198244934202*x[0] + (0.748133689686)*x[1] + (0.891412006497)*x[2]
            ref[(1, 0)]=1.44130076198*dim
            arg[(1, 1)]=-0.193121517761*x[0] + (-0.149731280768)*x[1] + (0.153332179265)*x[2]
            ref[(1, 1)]=-0.189520619264*dim
            arg[(2, 0)]=-0.28111081228*x[0] + (0.784991705771)*x[1] + (-0.394056926099)*x[2]
            ref[(2, 0)]=0.109823967392*dim
            arg[(2, 1)]=-0.551651910528*x[0] + (0.018895621573)*x[1] + (-0.0703933123166)*x[2]
            ref[(2, 1)]=-0.603149601271*dim
            arg[(3, 0)]=0.423959793759*x[0] + (-0.0132713997413)*x[1] + (-0.536768807668)*x[2]
            ref[(3, 0)]=-0.126080413651*dim
            arg[(3, 1)]=-0.62973851176*x[0] + (0.397869822019)*x[1] + (0.430077638907)*x[2]
            ref[(3, 1)]=0.198208949165*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4),w)
        ref=numpy.zeros((3, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.299945646483*x[0] + (0.543914931801)*x[1]
            ref[(0, 0, 0)]=0.243969285318*dim
            arg[(0, 0, 1)]=-0.949170025772*x[0] + (-0.762525901423)*x[1]
            ref[(0, 0, 1)]=-1.7116959272*dim
            arg[(0, 0, 2)]=-0.421409083002*x[0] + (0.00528913840303)*x[1]
            ref[(0, 0, 2)]=-0.416119944599*dim
            arg[(0, 0, 3)]=0.951781697984*x[0] + (-0.15942704756)*x[1]
            ref[(0, 0, 3)]=0.792354650424*dim
            arg[(0, 1, 0)]=0.440205228025*x[0] + (0.945941974827)*x[1]
            ref[(0, 1, 0)]=1.38614720285*dim
            arg[(0, 1, 1)]=-0.269972414188*x[0] + (0.397165225128)*x[1]
            ref[(0, 1, 1)]=0.127192810939*dim
            arg[(0, 1, 2)]=-0.750028873992*x[0] + (0.0239258036951)*x[1]
            ref[(0, 1, 2)]=-0.726103070297*dim
            arg[(0, 1, 3)]=0.0117954555583*x[0] + (-0.228022125941)*x[1]
            ref[(0, 1, 3)]=-0.216226670383*dim
            arg[(1, 0, 0)]=0.202260708795*x[0] + (-0.307463008268)*x[1]
            ref[(1, 0, 0)]=-0.105202299473*dim
            arg[(1, 0, 1)]=0.0483555815303*x[0] + (0.655981163179)*x[1]
            ref[(1, 0, 1)]=0.70433674471*dim
            arg[(1, 0, 2)]=0.173400454687*x[0] + (0.137199108747)*x[1]
            ref[(1, 0, 2)]=0.310599563434*dim
            arg[(1, 0, 3)]=-0.198521832482*x[0] + (-0.170127617268)*x[1]
            ref[(1, 0, 3)]=-0.36864944975*dim
            arg[(1, 1, 0)]=0.366199071254*x[0] + (0.994791489937)*x[1]
            ref[(1, 1, 0)]=1.36099056119*dim
            arg[(1, 1, 1)]=0.947902083146*x[0] + (-0.883180770037)*x[1]
            ref[(1, 1, 1)]=0.0647213131088*dim
            arg[(1, 1, 2)]=-0.758844504836*x[0] + (-0.675408365149)*x[1]
            ref[(1, 1, 2)]=-1.43425286999*dim
            arg[(1, 1, 3)]=-0.0168108070157*x[0] + (-0.589930470701)*x[1]
            ref[(1, 1, 3)]=-0.606741277716*dim
            arg[(2, 0, 0)]=-0.148495236642*x[0] + (0.250443915723)*x[1]
            ref[(2, 0, 0)]=0.101948679081*dim
            arg[(2, 0, 1)]=-0.190295535121*x[0] + (-0.170441002878)*x[1]
            ref[(2, 0, 1)]=-0.360736538*dim
            arg[(2, 0, 2)]=0.607148570262*x[0] + (-0.21311431438)*x[1]
            ref[(2, 0, 2)]=0.394034255882*dim
            arg[(2, 0, 3)]=0.955534376031*x[0] + (0.097953982789)*x[1]
            ref[(2, 0, 3)]=1.05348835882*dim
            arg[(2, 1, 0)]=0.0108273932731*x[0] + (-0.830442472954)*x[1]
            ref[(2, 1, 0)]=-0.819615079681*dim
            arg[(2, 1, 1)]=-0.687851796976*x[0] + (0.117740424889)*x[1]
            ref[(2, 1, 1)]=-0.570111372088*dim
            arg[(2, 1, 2)]=-0.529448837774*x[0] + (-0.603372877097)*x[1]
            ref[(2, 1, 2)]=-1.13282171487*dim
            arg[(2, 1, 3)]=0.639943754704*x[0] + (0.726990084808)*x[1]
            ref[(2, 1, 3)]=1.36693383951*dim
        else:
            arg[(0, 0, 0)]=0.0170294919322*x[0] + (0.0210250365067)*x[1] + (-0.956677049169)*x[2]
            ref[(0, 0, 0)]=-0.918622520731*dim
            arg[(0, 0, 1)]=0.115636437978*x[0] + (-0.816579200937)*x[1] + (0.403940710417)*x[2]
            ref[(0, 0, 1)]=-0.297002052541*dim
            arg[(0, 0, 2)]=-0.484770588588*x[0] + (0.0557519622316)*x[1] + (-0.843912940748)*x[2]
            ref[(0, 0, 2)]=-1.2729315671*dim
            arg[(0, 0, 3)]=0.353390995481*x[0] + (-0.306622248018)*x[1] + (0.500415833112)*x[2]
            ref[(0, 0, 3)]=0.547184580574*dim
            arg[(0, 1, 0)]=-0.262691105312*x[0] + (-0.225179891795)*x[1] + (-0.0899576110805)*x[2]
            ref[(0, 1, 0)]=-0.577828608188*dim
            arg[(0, 1, 1)]=0.214995286468*x[0] + (0.059118902089)*x[1] + (-0.525603901637)*x[2]
            ref[(0, 1, 1)]=-0.25148971308*dim
            arg[(0, 1, 2)]=0.051652692702*x[0] + (0.0937832317043)*x[1] + (0.0677182275842)*x[2]
            ref[(0, 1, 2)]=0.213154151991*dim
            arg[(0, 1, 3)]=-0.0684204219158*x[0] + (0.411661754795)*x[1] + (-0.37777550843)*x[2]
            ref[(0, 1, 3)]=-0.0345341755516*dim
            arg[(1, 0, 0)]=0.415620632577*x[0] + (-0.0534988750983)*x[1] + (-0.647146758496)*x[2]
            ref[(1, 0, 0)]=-0.285025001017*dim
            arg[(1, 0, 1)]=-0.0901529722588*x[0] + (0.685100261207)*x[1] + (0.672145356577)*x[2]
            ref[(1, 0, 1)]=1.26709264553*dim
            arg[(1, 0, 2)]=0.272108946558*x[0] + (-0.718662496336)*x[1] + (0.414658673574)*x[2]
            ref[(1, 0, 2)]=-0.0318948762034*dim
            arg[(1, 0, 3)]=0.885126646775*x[0] + (0.392626611368)*x[1] + (-0.851474703123)*x[2]
            ref[(1, 0, 3)]=0.426278555021*dim
            arg[(1, 1, 0)]=-0.68179287199*x[0] + (0.215148004994)*x[1] + (-0.461178983122)*x[2]
            ref[(1, 1, 0)]=-0.927823850119*dim
            arg[(1, 1, 1)]=0.770255604319*x[0] + (-0.516918971609)*x[1] + (-0.057628001966)*x[2]
            ref[(1, 1, 1)]=0.195708630744*dim
            arg[(1, 1, 2)]=-0.858375648622*x[0] + (-0.885196371776)*x[1] + (0.197834344581)*x[2]
            ref[(1, 1, 2)]=-1.54573767582*dim
            arg[(1, 1, 3)]=-0.779068769393*x[0] + (-0.0804153401226)*x[1] + (-0.00549429790775)*x[2]
            ref[(1, 1, 3)]=-0.864978407423*dim
            arg[(2, 0, 0)]=-0.994495213916*x[0] + (-0.739294693619)*x[1] + (-0.443210125689)*x[2]
            ref[(2, 0, 0)]=-2.17700003322*dim
            arg[(2, 0, 1)]=-0.894491249265*x[0] + (-0.383926668061)*x[1] + (-0.72062259873)*x[2]
            ref[(2, 0, 1)]=-1.99904051606*dim
            arg[(2, 0, 2)]=-0.0319067412631*x[0] + (0.585904170399)*x[1] + (0.262631798143)*x[2]
            ref[(2, 0, 2)]=0.816629227279*dim
            arg[(2, 0, 3)]=-0.514043008184*x[0] + (-0.629991443637)*x[1] + (0.857532212559)*x[2]
            ref[(2, 0, 3)]=-0.286502239261*dim
            arg[(2, 1, 0)]=-0.711945719779*x[0] + (-0.938505148189)*x[1] + (0.259582255266)*x[2]
            ref[(2, 1, 0)]=-1.3908686127*dim
            arg[(2, 1, 1)]=0.334904977424*x[0] + (-0.442199218147)*x[1] + (0.806260521149)*x[2]
            ref[(2, 1, 1)]=0.698966280427*dim
            arg[(2, 1, 2)]=0.955031541178*x[0] + (0.704457417578)*x[1] + (0.998041169765)*x[2]
            ref[(2, 1, 2)]=2.65753012852*dim
            arg[(2, 1, 3)]=0.241194533327*x[0] + (-0.345725508581)*x[1] + (-0.297027821741)*x[2]
            ref[(2, 1, 3)]=-0.401558796995*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4, 4),w)
        ref=numpy.zeros((4, 4, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.624145218751*x[0] + (-0.376312695512)*x[1]
            ref[(0, 0, 0, 0)]=0.247832523239*dim
            arg[(0, 0, 0, 1)]=-0.192012573909*x[0] + (0.552825846859)*x[1]
            ref[(0, 0, 0, 1)]=0.36081327295*dim
            arg[(0, 0, 0, 2)]=0.822866586391*x[0] + (-0.552382165587)*x[1]
            ref[(0, 0, 0, 2)]=0.270484420804*dim
            arg[(0, 0, 0, 3)]=-0.928836392164*x[0] + (0.463299963665)*x[1]
            ref[(0, 0, 0, 3)]=-0.465536428499*dim
            arg[(0, 0, 1, 0)]=0.231005889843*x[0] + (-0.693469302842)*x[1]
            ref[(0, 0, 1, 0)]=-0.462463412999*dim
            arg[(0, 0, 1, 1)]=-0.160608671205*x[0] + (0.133337929754)*x[1]
            ref[(0, 0, 1, 1)]=-0.0272707414513*dim
            arg[(0, 0, 1, 2)]=0.223420942075*x[0] + (-0.494838317047)*x[1]
            ref[(0, 0, 1, 2)]=-0.271417374971*dim
            arg[(0, 0, 1, 3)]=0.717912643007*x[0] + (0.918474508129)*x[1]
            ref[(0, 0, 1, 3)]=1.63638715114*dim
            arg[(0, 0, 2, 0)]=0.676350720786*x[0] + (-0.385610763606)*x[1]
            ref[(0, 0, 2, 0)]=0.29073995718*dim
            arg[(0, 0, 2, 1)]=-0.725971152387*x[0] + (0.625896584009)*x[1]
            ref[(0, 0, 2, 1)]=-0.100074568377*dim
            arg[(0, 0, 2, 2)]=0.295911650086*x[0] + (-0.398563473903)*x[1]
            ref[(0, 0, 2, 2)]=-0.102651823816*dim
            arg[(0, 0, 2, 3)]=0.402657471876*x[0] + (0.469842341356)*x[1]
            ref[(0, 0, 2, 3)]=0.872499813233*dim
            arg[(0, 0, 3, 0)]=-0.375288657333*x[0] + (0.780497025946)*x[1]
            ref[(0, 0, 3, 0)]=0.405208368612*dim
            arg[(0, 0, 3, 1)]=0.229429283278*x[0] + (-0.970375369527)*x[1]
            ref[(0, 0, 3, 1)]=-0.740946086249*dim
            arg[(0, 0, 3, 2)]=0.295801013177*x[0] + (-0.125764834047)*x[1]
            ref[(0, 0, 3, 2)]=0.17003617913*dim
            arg[(0, 0, 3, 3)]=-0.796080150569*x[0] + (0.896587086859)*x[1]
            ref[(0, 0, 3, 3)]=0.10050693629*dim
            arg[(0, 1, 0, 0)]=0.518787027365*x[0] + (0.868975322979)*x[1]
            ref[(0, 1, 0, 0)]=1.38776235034*dim
            arg[(0, 1, 0, 1)]=0.354291024399*x[0] + (-0.429689235196)*x[1]
            ref[(0, 1, 0, 1)]=-0.0753982107973*dim
            arg[(0, 1, 0, 2)]=0.155399259853*x[0] + (0.578341233321)*x[1]
            ref[(0, 1, 0, 2)]=0.733740493173*dim
            arg[(0, 1, 0, 3)]=0.0699624455336*x[0] + (-0.768644599642)*x[1]
            ref[(0, 1, 0, 3)]=-0.698682154109*dim
            arg[(0, 1, 1, 0)]=-0.75923783721*x[0] + (-0.966807130414)*x[1]
            ref[(0, 1, 1, 0)]=-1.72604496762*dim
            arg[(0, 1, 1, 1)]=0.612856480644*x[0] + (-0.184209129904)*x[1]
            ref[(0, 1, 1, 1)]=0.42864735074*dim
            arg[(0, 1, 1, 2)]=-0.856526200238*x[0] + (-0.834270267521)*x[1]
            ref[(0, 1, 1, 2)]=-1.69079646776*dim
            arg[(0, 1, 1, 3)]=0.622361817971*x[0] + (0.347493355337)*x[1]
            ref[(0, 1, 1, 3)]=0.969855173308*dim
            arg[(0, 1, 2, 0)]=0.474622226612*x[0] + (-0.524791521889)*x[1]
            ref[(0, 1, 2, 0)]=-0.0501692952766*dim
            arg[(0, 1, 2, 1)]=0.642137820823*x[0] + (-0.0366768921081)*x[1]
            ref[(0, 1, 2, 1)]=0.605460928715*dim
            arg[(0, 1, 2, 2)]=-0.256375550063*x[0] + (-0.0131816653284)*x[1]
            ref[(0, 1, 2, 2)]=-0.269557215392*dim
            arg[(0, 1, 2, 3)]=-0.409218648401*x[0] + (0.224969246457)*x[1]
            ref[(0, 1, 2, 3)]=-0.184249401944*dim
            arg[(0, 1, 3, 0)]=-0.874347002457*x[0] + (0.833868722405)*x[1]
            ref[(0, 1, 3, 0)]=-0.0404782800525*dim
            arg[(0, 1, 3, 1)]=0.808514682492*x[0] + (-0.0347100279754)*x[1]
            ref[(0, 1, 3, 1)]=0.773804654517*dim
            arg[(0, 1, 3, 2)]=0.394636610859*x[0] + (0.415123462172)*x[1]
            ref[(0, 1, 3, 2)]=0.809760073031*dim
            arg[(0, 1, 3, 3)]=-0.0386968994973*x[0] + (-0.90051690451)*x[1]
            ref[(0, 1, 3, 3)]=-0.939213804007*dim
            arg[(0, 2, 0, 0)]=-0.222343410178*x[0] + (0.979435504309)*x[1]
            ref[(0, 2, 0, 0)]=0.757092094131*dim
            arg[(0, 2, 0, 1)]=-0.696099247165*x[0] + (-0.45317517159)*x[1]
            ref[(0, 2, 0, 1)]=-1.14927441875*dim
            arg[(0, 2, 0, 2)]=-0.946187329063*x[0] + (0.0294486584706)*x[1]
            ref[(0, 2, 0, 2)]=-0.916738670593*dim
            arg[(0, 2, 0, 3)]=-0.858258979684*x[0] + (0.487791042692)*x[1]
            ref[(0, 2, 0, 3)]=-0.370467936992*dim
            arg[(0, 2, 1, 0)]=0.0843363472296*x[0] + (-0.639016357436)*x[1]
            ref[(0, 2, 1, 0)]=-0.554680010207*dim
            arg[(0, 2, 1, 1)]=-0.0369089914127*x[0] + (0.91714036925)*x[1]
            ref[(0, 2, 1, 1)]=0.880231377837*dim
            arg[(0, 2, 1, 2)]=-0.491338622585*x[0] + (-0.0281567939031)*x[1]
            ref[(0, 2, 1, 2)]=-0.519495416489*dim
            arg[(0, 2, 1, 3)]=-0.75654758947*x[0] + (-0.791118355572)*x[1]
            ref[(0, 2, 1, 3)]=-1.54766594504*dim
            arg[(0, 2, 2, 0)]=-0.736972758931*x[0] + (-0.7165553218)*x[1]
            ref[(0, 2, 2, 0)]=-1.45352808073*dim
            arg[(0, 2, 2, 1)]=-0.737605489508*x[0] + (-0.246847531535)*x[1]
            ref[(0, 2, 2, 1)]=-0.984453021044*dim
            arg[(0, 2, 2, 2)]=-0.68921084485*x[0] + (-0.782540055665)*x[1]
            ref[(0, 2, 2, 2)]=-1.47175090051*dim
            arg[(0, 2, 2, 3)]=0.879185851853*x[0] + (0.827565009259)*x[1]
            ref[(0, 2, 2, 3)]=1.70675086111*dim
            arg[(0, 2, 3, 0)]=0.415531280307*x[0] + (-0.950327441954)*x[1]
            ref[(0, 2, 3, 0)]=-0.534796161647*dim
            arg[(0, 2, 3, 1)]=-0.491875765976*x[0] + (0.633477675072)*x[1]
            ref[(0, 2, 3, 1)]=0.141601909096*dim
            arg[(0, 2, 3, 2)]=0.579473617376*x[0] + (-0.946166558381)*x[1]
            ref[(0, 2, 3, 2)]=-0.366692941005*dim
            arg[(0, 2, 3, 3)]=0.918637637463*x[0] + (0.834063303226)*x[1]
            ref[(0, 2, 3, 3)]=1.75270094069*dim
            arg[(0, 3, 0, 0)]=-0.908587548644*x[0] + (0.378141338028)*x[1]
            ref[(0, 3, 0, 0)]=-0.530446210616*dim
            arg[(0, 3, 0, 1)]=-0.177172792956*x[0] + (0.422337394411)*x[1]
            ref[(0, 3, 0, 1)]=0.245164601456*dim
            arg[(0, 3, 0, 2)]=-0.979628053554*x[0] + (0.198287619743)*x[1]
            ref[(0, 3, 0, 2)]=-0.781340433812*dim
            arg[(0, 3, 0, 3)]=0.855569667623*x[0] + (0.626834422169)*x[1]
            ref[(0, 3, 0, 3)]=1.48240408979*dim
            arg[(0, 3, 1, 0)]=-0.903118686678*x[0] + (-0.779060338624)*x[1]
            ref[(0, 3, 1, 0)]=-1.6821790253*dim
            arg[(0, 3, 1, 1)]=-0.966146051543*x[0] + (-0.0639601943665)*x[1]
            ref[(0, 3, 1, 1)]=-1.03010624591*dim
            arg[(0, 3, 1, 2)]=-0.494141931649*x[0] + (-0.952211589535)*x[1]
            ref[(0, 3, 1, 2)]=-1.44635352118*dim
            arg[(0, 3, 1, 3)]=0.612388579574*x[0] + (0.512804562671)*x[1]
            ref[(0, 3, 1, 3)]=1.12519314224*dim
            arg[(0, 3, 2, 0)]=-0.820941973331*x[0] + (0.63870281467)*x[1]
            ref[(0, 3, 2, 0)]=-0.182239158661*dim
            arg[(0, 3, 2, 1)]=-0.936570869536*x[0] + (-0.240527988512)*x[1]
            ref[(0, 3, 2, 1)]=-1.17709885805*dim
            arg[(0, 3, 2, 2)]=0.37976538191*x[0] + (-0.817228196386)*x[1]
            ref[(0, 3, 2, 2)]=-0.437462814476*dim
            arg[(0, 3, 2, 3)]=-0.376224308272*x[0] + (-0.708273065194)*x[1]
            ref[(0, 3, 2, 3)]=-1.08449737347*dim
            arg[(0, 3, 3, 0)]=0.147854142434*x[0] + (0.28234293426)*x[1]
            ref[(0, 3, 3, 0)]=0.430197076693*dim
            arg[(0, 3, 3, 1)]=0.803284248087*x[0] + (-0.120336154355)*x[1]
            ref[(0, 3, 3, 1)]=0.682948093733*dim
            arg[(0, 3, 3, 2)]=-0.86749054503*x[0] + (-0.47278252591)*x[1]
            ref[(0, 3, 3, 2)]=-1.34027307094*dim
            arg[(0, 3, 3, 3)]=0.038803250662*x[0] + (-0.721358543905)*x[1]
            ref[(0, 3, 3, 3)]=-0.682555293243*dim
            arg[(1, 0, 0, 0)]=-0.378348190909*x[0] + (0.0852677933699)*x[1]
            ref[(1, 0, 0, 0)]=-0.293080397539*dim
            arg[(1, 0, 0, 1)]=0.355725770252*x[0] + (0.613285863599)*x[1]
            ref[(1, 0, 0, 1)]=0.969011633851*dim
            arg[(1, 0, 0, 2)]=-0.498083317145*x[0] + (-0.93602619419)*x[1]
            ref[(1, 0, 0, 2)]=-1.43410951134*dim
            arg[(1, 0, 0, 3)]=0.505551691701*x[0] + (-0.0278521380403)*x[1]
            ref[(1, 0, 0, 3)]=0.477699553661*dim
            arg[(1, 0, 1, 0)]=0.530891385641*x[0] + (-0.693019791784)*x[1]
            ref[(1, 0, 1, 0)]=-0.162128406142*dim
            arg[(1, 0, 1, 1)]=0.858743537903*x[0] + (-0.840207915453)*x[1]
            ref[(1, 0, 1, 1)]=0.0185356224498*dim
            arg[(1, 0, 1, 2)]=0.0115396631919*x[0] + (0.807486417449)*x[1]
            ref[(1, 0, 1, 2)]=0.819026080641*dim
            arg[(1, 0, 1, 3)]=-0.898101394892*x[0] + (0.321887196486)*x[1]
            ref[(1, 0, 1, 3)]=-0.576214198406*dim
            arg[(1, 0, 2, 0)]=0.844581202456*x[0] + (0.675765761255)*x[1]
            ref[(1, 0, 2, 0)]=1.52034696371*dim
            arg[(1, 0, 2, 1)]=0.398060688973*x[0] + (-0.600643248918)*x[1]
            ref[(1, 0, 2, 1)]=-0.202582559945*dim
            arg[(1, 0, 2, 2)]=0.698752802015*x[0] + (-0.0113988941813)*x[1]
            ref[(1, 0, 2, 2)]=0.687353907834*dim
            arg[(1, 0, 2, 3)]=-0.407221893608*x[0] + (-0.0221759506328)*x[1]
            ref[(1, 0, 2, 3)]=-0.429397844241*dim
            arg[(1, 0, 3, 0)]=-0.657421968132*x[0] + (0.276109344116)*x[1]
            ref[(1, 0, 3, 0)]=-0.381312624017*dim
            arg[(1, 0, 3, 1)]=-0.799723601284*x[0] + (-0.602929874664)*x[1]
            ref[(1, 0, 3, 1)]=-1.40265347595*dim
            arg[(1, 0, 3, 2)]=0.442500777687*x[0] + (-0.83730900985)*x[1]
            ref[(1, 0, 3, 2)]=-0.394808232163*dim
            arg[(1, 0, 3, 3)]=0.015268019854*x[0] + (-0.236758185931)*x[1]
            ref[(1, 0, 3, 3)]=-0.221490166077*dim
            arg[(1, 1, 0, 0)]=0.399156664423*x[0] + (-0.535101822314)*x[1]
            ref[(1, 1, 0, 0)]=-0.135945157891*dim
            arg[(1, 1, 0, 1)]=0.73979307298*x[0] + (0.909572875066)*x[1]
            ref[(1, 1, 0, 1)]=1.64936594805*dim
            arg[(1, 1, 0, 2)]=0.126542337985*x[0] + (0.19234962103)*x[1]
            ref[(1, 1, 0, 2)]=0.318891959015*dim
            arg[(1, 1, 0, 3)]=-0.907960625157*x[0] + (0.228093126331)*x[1]
            ref[(1, 1, 0, 3)]=-0.679867498826*dim
            arg[(1, 1, 1, 0)]=0.618786118407*x[0] + (-0.34315504812)*x[1]
            ref[(1, 1, 1, 0)]=0.275631070287*dim
            arg[(1, 1, 1, 1)]=-0.557751439583*x[0] + (0.224178919259)*x[1]
            ref[(1, 1, 1, 1)]=-0.333572520324*dim
            arg[(1, 1, 1, 2)]=-0.715872240617*x[0] + (0.631879776491)*x[1]
            ref[(1, 1, 1, 2)]=-0.0839924641258*dim
            arg[(1, 1, 1, 3)]=0.58760343508*x[0] + (0.633435175187)*x[1]
            ref[(1, 1, 1, 3)]=1.22103861027*dim
            arg[(1, 1, 2, 0)]=-0.464094675149*x[0] + (-0.844464388761)*x[1]
            ref[(1, 1, 2, 0)]=-1.30855906391*dim
            arg[(1, 1, 2, 1)]=-0.543882288367*x[0] + (-0.824481305256)*x[1]
            ref[(1, 1, 2, 1)]=-1.36836359362*dim
            arg[(1, 1, 2, 2)]=-0.17859553669*x[0] + (-0.75539878163)*x[1]
            ref[(1, 1, 2, 2)]=-0.93399431832*dim
            arg[(1, 1, 2, 3)]=0.061567123947*x[0] + (0.00658032270416)*x[1]
            ref[(1, 1, 2, 3)]=0.0681474466511*dim
            arg[(1, 1, 3, 0)]=-0.457693832828*x[0] + (-0.479822314252)*x[1]
            ref[(1, 1, 3, 0)]=-0.93751614708*dim
            arg[(1, 1, 3, 1)]=-0.888938885718*x[0] + (-0.699498533689)*x[1]
            ref[(1, 1, 3, 1)]=-1.58843741941*dim
            arg[(1, 1, 3, 2)]=0.702964573118*x[0] + (0.813573210641)*x[1]
            ref[(1, 1, 3, 2)]=1.51653778376*dim
            arg[(1, 1, 3, 3)]=-0.742878157555*x[0] + (-0.432379847052)*x[1]
            ref[(1, 1, 3, 3)]=-1.17525800461*dim
            arg[(1, 2, 0, 0)]=-0.421292450872*x[0] + (-0.429843041682)*x[1]
            ref[(1, 2, 0, 0)]=-0.851135492553*dim
            arg[(1, 2, 0, 1)]=0.336674513782*x[0] + (-0.582606858875)*x[1]
            ref[(1, 2, 0, 1)]=-0.245932345093*dim
            arg[(1, 2, 0, 2)]=-0.406910155384*x[0] + (-0.658005356594)*x[1]
            ref[(1, 2, 0, 2)]=-1.06491551198*dim
            arg[(1, 2, 0, 3)]=0.551730212274*x[0] + (0.977193680315)*x[1]
            ref[(1, 2, 0, 3)]=1.52892389259*dim
            arg[(1, 2, 1, 0)]=0.828633051591*x[0] + (0.393431031861)*x[1]
            ref[(1, 2, 1, 0)]=1.22206408345*dim
            arg[(1, 2, 1, 1)]=0.27046793424*x[0] + (0.605763575228)*x[1]
            ref[(1, 2, 1, 1)]=0.876231509468*dim
            arg[(1, 2, 1, 2)]=-0.419978554243*x[0] + (0.529459659148)*x[1]
            ref[(1, 2, 1, 2)]=0.109481104905*dim
            arg[(1, 2, 1, 3)]=0.512910139978*x[0] + (-0.747003779425)*x[1]
            ref[(1, 2, 1, 3)]=-0.234093639447*dim
            arg[(1, 2, 2, 0)]=-0.41518071767*x[0] + (-0.0585480881236)*x[1]
            ref[(1, 2, 2, 0)]=-0.473728805794*dim
            arg[(1, 2, 2, 1)]=-0.895690194296*x[0] + (0.770029859036)*x[1]
            ref[(1, 2, 2, 1)]=-0.12566033526*dim
            arg[(1, 2, 2, 2)]=-0.090946246648*x[0] + (-0.672468578563)*x[1]
            ref[(1, 2, 2, 2)]=-0.763414825211*dim
            arg[(1, 2, 2, 3)]=-0.75757400314*x[0] + (-0.435875055058)*x[1]
            ref[(1, 2, 2, 3)]=-1.1934490582*dim
            arg[(1, 2, 3, 0)]=0.79392864442*x[0] + (0.816001989532)*x[1]
            ref[(1, 2, 3, 0)]=1.60993063395*dim
            arg[(1, 2, 3, 1)]=-0.355750980289*x[0] + (0.0793343658813)*x[1]
            ref[(1, 2, 3, 1)]=-0.276416614408*dim
            arg[(1, 2, 3, 2)]=0.301585117897*x[0] + (-0.963545980497)*x[1]
            ref[(1, 2, 3, 2)]=-0.6619608626*dim
            arg[(1, 2, 3, 3)]=0.0204554335841*x[0] + (0.123660620137)*x[1]
            ref[(1, 2, 3, 3)]=0.144116053721*dim
            arg[(1, 3, 0, 0)]=-0.204878128018*x[0] + (-0.282399840083)*x[1]
            ref[(1, 3, 0, 0)]=-0.487277968101*dim
            arg[(1, 3, 0, 1)]=-0.689901593805*x[0] + (-0.93021697208)*x[1]
            ref[(1, 3, 0, 1)]=-1.62011856589*dim
            arg[(1, 3, 0, 2)]=-0.480473050488*x[0] + (0.256466357712)*x[1]
            ref[(1, 3, 0, 2)]=-0.224006692776*dim
            arg[(1, 3, 0, 3)]=0.298519005778*x[0] + (-0.394854552873)*x[1]
            ref[(1, 3, 0, 3)]=-0.0963355470944*dim
            arg[(1, 3, 1, 0)]=0.274950821232*x[0] + (-0.247223589235)*x[1]
            ref[(1, 3, 1, 0)]=0.0277272319973*dim
            arg[(1, 3, 1, 1)]=-0.0482161745881*x[0] + (-0.103996714521)*x[1]
            ref[(1, 3, 1, 1)]=-0.152212889109*dim
            arg[(1, 3, 1, 2)]=0.6997834142*x[0] + (0.781913564905)*x[1]
            ref[(1, 3, 1, 2)]=1.4816969791*dim
            arg[(1, 3, 1, 3)]=-0.0766845238661*x[0] + (-0.659703230836)*x[1]
            ref[(1, 3, 1, 3)]=-0.736387754702*dim
            arg[(1, 3, 2, 0)]=-0.454803425042*x[0] + (0.0381648322908)*x[1]
            ref[(1, 3, 2, 0)]=-0.416638592751*dim
            arg[(1, 3, 2, 1)]=-0.298352814121*x[0] + (0.0463987899273)*x[1]
            ref[(1, 3, 2, 1)]=-0.251954024194*dim
            arg[(1, 3, 2, 2)]=0.449178762129*x[0] + (-0.953240215959)*x[1]
            ref[(1, 3, 2, 2)]=-0.50406145383*dim
            arg[(1, 3, 2, 3)]=0.699197108253*x[0] + (0.836742572358)*x[1]
            ref[(1, 3, 2, 3)]=1.53593968061*dim
            arg[(1, 3, 3, 0)]=0.528119002644*x[0] + (-0.177209221189)*x[1]
            ref[(1, 3, 3, 0)]=0.350909781456*dim
            arg[(1, 3, 3, 1)]=0.847718769392*x[0] + (0.855338006835)*x[1]
            ref[(1, 3, 3, 1)]=1.70305677623*dim
            arg[(1, 3, 3, 2)]=0.0873312518672*x[0] + (-0.0587081843933)*x[1]
            ref[(1, 3, 3, 2)]=0.0286230674738*dim
            arg[(1, 3, 3, 3)]=0.842613943895*x[0] + (0.317870958481)*x[1]
            ref[(1, 3, 3, 3)]=1.16048490238*dim
            arg[(2, 0, 0, 0)]=-0.345767971762*x[0] + (-0.481155784846)*x[1]
            ref[(2, 0, 0, 0)]=-0.826923756608*dim
            arg[(2, 0, 0, 1)]=0.792259075143*x[0] + (0.83056357156)*x[1]
            ref[(2, 0, 0, 1)]=1.6228226467*dim
            arg[(2, 0, 0, 2)]=-0.0718242054962*x[0] + (-0.04293702515)*x[1]
            ref[(2, 0, 0, 2)]=-0.114761230646*dim
            arg[(2, 0, 0, 3)]=0.705806829231*x[0] + (-0.959130195572)*x[1]
            ref[(2, 0, 0, 3)]=-0.253323366342*dim
            arg[(2, 0, 1, 0)]=0.356221806362*x[0] + (-0.768765104887)*x[1]
            ref[(2, 0, 1, 0)]=-0.412543298525*dim
            arg[(2, 0, 1, 1)]=0.751066479616*x[0] + (-0.92002618447)*x[1]
            ref[(2, 0, 1, 1)]=-0.168959704854*dim
            arg[(2, 0, 1, 2)]=-0.596551418862*x[0] + (0.210695700128)*x[1]
            ref[(2, 0, 1, 2)]=-0.385855718734*dim
            arg[(2, 0, 1, 3)]=0.677050969755*x[0] + (-0.791458372675)*x[1]
            ref[(2, 0, 1, 3)]=-0.11440740292*dim
            arg[(2, 0, 2, 0)]=0.415287435474*x[0] + (0.582872231947)*x[1]
            ref[(2, 0, 2, 0)]=0.998159667421*dim
            arg[(2, 0, 2, 1)]=-0.123661062082*x[0] + (-0.953623637798)*x[1]
            ref[(2, 0, 2, 1)]=-1.07728469988*dim
            arg[(2, 0, 2, 2)]=-0.796316112987*x[0] + (0.993857510524)*x[1]
            ref[(2, 0, 2, 2)]=0.197541397537*dim
            arg[(2, 0, 2, 3)]=-0.366980657073*x[0] + (-0.0332554950011)*x[1]
            ref[(2, 0, 2, 3)]=-0.400236152074*dim
            arg[(2, 0, 3, 0)]=-0.135727870503*x[0] + (-0.127483977109)*x[1]
            ref[(2, 0, 3, 0)]=-0.263211847613*dim
            arg[(2, 0, 3, 1)]=-0.194421669112*x[0] + (-0.0982704230279)*x[1]
            ref[(2, 0, 3, 1)]=-0.29269209214*dim
            arg[(2, 0, 3, 2)]=-0.297887443938*x[0] + (0.663910520186)*x[1]
            ref[(2, 0, 3, 2)]=0.366023076248*dim
            arg[(2, 0, 3, 3)]=0.03536113751*x[0] + (-0.676598230397)*x[1]
            ref[(2, 0, 3, 3)]=-0.641237092887*dim
            arg[(2, 1, 0, 0)]=0.358892645215*x[0] + (0.0871474952798)*x[1]
            ref[(2, 1, 0, 0)]=0.446040140494*dim
            arg[(2, 1, 0, 1)]=-0.267020769305*x[0] + (0.706600326878)*x[1]
            ref[(2, 1, 0, 1)]=0.439579557573*dim
            arg[(2, 1, 0, 2)]=0.997449733728*x[0] + (-0.766893975139)*x[1]
            ref[(2, 1, 0, 2)]=0.230555758589*dim
            arg[(2, 1, 0, 3)]=0.911459076162*x[0] + (-0.0931625512855)*x[1]
            ref[(2, 1, 0, 3)]=0.818296524876*dim
            arg[(2, 1, 1, 0)]=-0.642183228419*x[0] + (-0.100395159914)*x[1]
            ref[(2, 1, 1, 0)]=-0.742578388333*dim
            arg[(2, 1, 1, 1)]=0.659118248752*x[0] + (0.486525976822)*x[1]
            ref[(2, 1, 1, 1)]=1.14564422557*dim
            arg[(2, 1, 1, 2)]=0.618962553513*x[0] + (0.212861962442)*x[1]
            ref[(2, 1, 1, 2)]=0.831824515955*dim
            arg[(2, 1, 1, 3)]=0.168114255395*x[0] + (0.645162111467)*x[1]
            ref[(2, 1, 1, 3)]=0.813276366862*dim
            arg[(2, 1, 2, 0)]=-0.186720055247*x[0] + (-0.315350720137)*x[1]
            ref[(2, 1, 2, 0)]=-0.502070775384*dim
            arg[(2, 1, 2, 1)]=0.300739869263*x[0] + (-0.111640680995)*x[1]
            ref[(2, 1, 2, 1)]=0.189099188268*dim
            arg[(2, 1, 2, 2)]=-0.414962140402*x[0] + (0.489569594316)*x[1]
            ref[(2, 1, 2, 2)]=0.0746074539141*dim
            arg[(2, 1, 2, 3)]=0.987852320115*x[0] + (-0.0949419996525)*x[1]
            ref[(2, 1, 2, 3)]=0.892910320462*dim
            arg[(2, 1, 3, 0)]=0.629936250459*x[0] + (0.406205812834)*x[1]
            ref[(2, 1, 3, 0)]=1.03614206329*dim
            arg[(2, 1, 3, 1)]=-0.213289587197*x[0] + (0.987954368411)*x[1]
            ref[(2, 1, 3, 1)]=0.774664781213*dim
            arg[(2, 1, 3, 2)]=-0.0211313427796*x[0] + (-0.0588463116831)*x[1]
            ref[(2, 1, 3, 2)]=-0.0799776544627*dim
            arg[(2, 1, 3, 3)]=-0.882749787873*x[0] + (0.271225737956)*x[1]
            ref[(2, 1, 3, 3)]=-0.611524049917*dim
            arg[(2, 2, 0, 0)]=-0.620581524132*x[0] + (0.295534703617)*x[1]
            ref[(2, 2, 0, 0)]=-0.325046820515*dim
            arg[(2, 2, 0, 1)]=0.552480456232*x[0] + (0.389662674807)*x[1]
            ref[(2, 2, 0, 1)]=0.942143131038*dim
            arg[(2, 2, 0, 2)]=0.511296259336*x[0] + (-0.947717558548)*x[1]
            ref[(2, 2, 0, 2)]=-0.436421299213*dim
            arg[(2, 2, 0, 3)]=-0.966001600003*x[0] + (0.127678341744)*x[1]
            ref[(2, 2, 0, 3)]=-0.838323258259*dim
            arg[(2, 2, 1, 0)]=0.620836552893*x[0] + (0.211594226988)*x[1]
            ref[(2, 2, 1, 0)]=0.832430779881*dim
            arg[(2, 2, 1, 1)]=0.62992917231*x[0] + (-0.227679409137)*x[1]
            ref[(2, 2, 1, 1)]=0.402249763173*dim
            arg[(2, 2, 1, 2)]=0.296022253272*x[0] + (0.407540883243)*x[1]
            ref[(2, 2, 1, 2)]=0.703563136515*dim
            arg[(2, 2, 1, 3)]=0.0123174316137*x[0] + (0.0993167520299)*x[1]
            ref[(2, 2, 1, 3)]=0.111634183644*dim
            arg[(2, 2, 2, 0)]=-0.566097896534*x[0] + (-0.372710050704)*x[1]
            ref[(2, 2, 2, 0)]=-0.938807947238*dim
            arg[(2, 2, 2, 1)]=-0.767010360281*x[0] + (-0.849846522502)*x[1]
            ref[(2, 2, 2, 1)]=-1.61685688278*dim
            arg[(2, 2, 2, 2)]=-0.0342042465328*x[0] + (-0.992024089715)*x[1]
            ref[(2, 2, 2, 2)]=-1.02622833625*dim
            arg[(2, 2, 2, 3)]=0.216667843805*x[0] + (-0.715988500424)*x[1]
            ref[(2, 2, 2, 3)]=-0.499320656619*dim
            arg[(2, 2, 3, 0)]=-0.37594691731*x[0] + (0.776907054634)*x[1]
            ref[(2, 2, 3, 0)]=0.400960137323*dim
            arg[(2, 2, 3, 1)]=-0.168652189812*x[0] + (-0.21607685556)*x[1]
            ref[(2, 2, 3, 1)]=-0.384729045372*dim
            arg[(2, 2, 3, 2)]=0.575300132037*x[0] + (-0.59587331188)*x[1]
            ref[(2, 2, 3, 2)]=-0.0205731798427*dim
            arg[(2, 2, 3, 3)]=0.946433838197*x[0] + (-0.792253526367)*x[1]
            ref[(2, 2, 3, 3)]=0.15418031183*dim
            arg[(2, 3, 0, 0)]=-0.0516958351806*x[0] + (-0.926159262481)*x[1]
            ref[(2, 3, 0, 0)]=-0.977855097661*dim
            arg[(2, 3, 0, 1)]=-0.830975539435*x[0] + (-0.936959624734)*x[1]
            ref[(2, 3, 0, 1)]=-1.76793516417*dim
            arg[(2, 3, 0, 2)]=0.44097579316*x[0] + (-0.105273028996)*x[1]
            ref[(2, 3, 0, 2)]=0.335702764165*dim
            arg[(2, 3, 0, 3)]=0.472104105125*x[0] + (0.214150961286)*x[1]
            ref[(2, 3, 0, 3)]=0.686255066411*dim
            arg[(2, 3, 1, 0)]=0.479872671086*x[0] + (-0.0574367507095)*x[1]
            ref[(2, 3, 1, 0)]=0.422435920376*dim
            arg[(2, 3, 1, 1)]=0.953105452777*x[0] + (-0.889418803679)*x[1]
            ref[(2, 3, 1, 1)]=0.0636866490983*dim
            arg[(2, 3, 1, 2)]=-0.467944585428*x[0] + (-0.280979247485)*x[1]
            ref[(2, 3, 1, 2)]=-0.748923832913*dim
            arg[(2, 3, 1, 3)]=-0.369843888378*x[0] + (0.0537566491089)*x[1]
            ref[(2, 3, 1, 3)]=-0.316087239269*dim
            arg[(2, 3, 2, 0)]=0.248476563655*x[0] + (-0.577798380233)*x[1]
            ref[(2, 3, 2, 0)]=-0.329321816578*dim
            arg[(2, 3, 2, 1)]=0.3330316331*x[0] + (0.0761762864387)*x[1]
            ref[(2, 3, 2, 1)]=0.409207919539*dim
            arg[(2, 3, 2, 2)]=0.350232376032*x[0] + (0.795675953241)*x[1]
            ref[(2, 3, 2, 2)]=1.14590832927*dim
            arg[(2, 3, 2, 3)]=-0.353556655504*x[0] + (0.305387247116)*x[1]
            ref[(2, 3, 2, 3)]=-0.0481694083881*dim
            arg[(2, 3, 3, 0)]=0.178390401955*x[0] + (0.847380770158)*x[1]
            ref[(2, 3, 3, 0)]=1.02577117211*dim
            arg[(2, 3, 3, 1)]=0.315410750518*x[0] + (-0.0743349419937)*x[1]
            ref[(2, 3, 3, 1)]=0.241075808525*dim
            arg[(2, 3, 3, 2)]=-0.707630617943*x[0] + (-0.545545505244)*x[1]
            ref[(2, 3, 3, 2)]=-1.25317612319*dim
            arg[(2, 3, 3, 3)]=-0.96040724582*x[0] + (-0.25360490844)*x[1]
            ref[(2, 3, 3, 3)]=-1.21401215426*dim
            arg[(3, 0, 0, 0)]=-0.228902351591*x[0] + (0.715838728077)*x[1]
            ref[(3, 0, 0, 0)]=0.486936376486*dim
            arg[(3, 0, 0, 1)]=-0.964358316323*x[0] + (0.546333741704)*x[1]
            ref[(3, 0, 0, 1)]=-0.418024574618*dim
            arg[(3, 0, 0, 2)]=-0.596938684608*x[0] + (0.623298136526)*x[1]
            ref[(3, 0, 0, 2)]=0.0263594519176*dim
            arg[(3, 0, 0, 3)]=0.928942247165*x[0] + (-0.411047532447)*x[1]
            ref[(3, 0, 0, 3)]=0.517894714718*dim
            arg[(3, 0, 1, 0)]=0.869706147241*x[0] + (-0.278580968586)*x[1]
            ref[(3, 0, 1, 0)]=0.591125178655*dim
            arg[(3, 0, 1, 1)]=0.200736963323*x[0] + (-0.562309659749)*x[1]
            ref[(3, 0, 1, 1)]=-0.361572696426*dim
            arg[(3, 0, 1, 2)]=0.708553642334*x[0] + (-0.765186139515)*x[1]
            ref[(3, 0, 1, 2)]=-0.0566324971817*dim
            arg[(3, 0, 1, 3)]=-0.209944688389*x[0] + (0.764146205308)*x[1]
            ref[(3, 0, 1, 3)]=0.554201516919*dim
            arg[(3, 0, 2, 0)]=-0.475307012638*x[0] + (0.785742144335)*x[1]
            ref[(3, 0, 2, 0)]=0.310435131698*dim
            arg[(3, 0, 2, 1)]=0.53888455004*x[0] + (0.836645987105)*x[1]
            ref[(3, 0, 2, 1)]=1.37553053715*dim
            arg[(3, 0, 2, 2)]=-0.709363916168*x[0] + (0.726496399613)*x[1]
            ref[(3, 0, 2, 2)]=0.0171324834445*dim
            arg[(3, 0, 2, 3)]=-0.544492131965*x[0] + (-0.19210619377)*x[1]
            ref[(3, 0, 2, 3)]=-0.736598325734*dim
            arg[(3, 0, 3, 0)]=0.2528891886*x[0] + (0.341948849138)*x[1]
            ref[(3, 0, 3, 0)]=0.594838037738*dim
            arg[(3, 0, 3, 1)]=-0.14913698031*x[0] + (0.39338906242)*x[1]
            ref[(3, 0, 3, 1)]=0.24425208211*dim
            arg[(3, 0, 3, 2)]=0.288786702295*x[0] + (0.19542936735)*x[1]
            ref[(3, 0, 3, 2)]=0.484216069646*dim
            arg[(3, 0, 3, 3)]=0.941514936491*x[0] + (-0.124595974278)*x[1]
            ref[(3, 0, 3, 3)]=0.816918962213*dim
            arg[(3, 1, 0, 0)]=-0.728185016798*x[0] + (0.245453200113)*x[1]
            ref[(3, 1, 0, 0)]=-0.482731816685*dim
            arg[(3, 1, 0, 1)]=-0.102504710541*x[0] + (-0.672661342646)*x[1]
            ref[(3, 1, 0, 1)]=-0.775166053187*dim
            arg[(3, 1, 0, 2)]=0.279065014629*x[0] + (-0.574603335324)*x[1]
            ref[(3, 1, 0, 2)]=-0.295538320695*dim
            arg[(3, 1, 0, 3)]=-0.722683777437*x[0] + (0.868405447775)*x[1]
            ref[(3, 1, 0, 3)]=0.145721670339*dim
            arg[(3, 1, 1, 0)]=0.777427350724*x[0] + (-0.288451396525)*x[1]
            ref[(3, 1, 1, 0)]=0.488975954199*dim
            arg[(3, 1, 1, 1)]=-0.739103765965*x[0] + (-0.46076744778)*x[1]
            ref[(3, 1, 1, 1)]=-1.19987121375*dim
            arg[(3, 1, 1, 2)]=-0.226127296826*x[0] + (-0.360559867113)*x[1]
            ref[(3, 1, 1, 2)]=-0.586687163939*dim
            arg[(3, 1, 1, 3)]=-0.841011266882*x[0] + (0.0912174476494)*x[1]
            ref[(3, 1, 1, 3)]=-0.749793819233*dim
            arg[(3, 1, 2, 0)]=-0.0310242765852*x[0] + (0.930528278307)*x[1]
            ref[(3, 1, 2, 0)]=0.899504001722*dim
            arg[(3, 1, 2, 1)]=0.155180335382*x[0] + (-0.588501593461)*x[1]
            ref[(3, 1, 2, 1)]=-0.433321258079*dim
            arg[(3, 1, 2, 2)]=-0.369038536015*x[0] + (0.16314804713)*x[1]
            ref[(3, 1, 2, 2)]=-0.205890488884*dim
            arg[(3, 1, 2, 3)]=0.116502363596*x[0] + (-0.487660560044)*x[1]
            ref[(3, 1, 2, 3)]=-0.371158196448*dim
            arg[(3, 1, 3, 0)]=0.0755876335635*x[0] + (-0.389161218898)*x[1]
            ref[(3, 1, 3, 0)]=-0.313573585335*dim
            arg[(3, 1, 3, 1)]=0.40017350215*x[0] + (-0.00953427251416)*x[1]
            ref[(3, 1, 3, 1)]=0.390639229636*dim
            arg[(3, 1, 3, 2)]=-0.124668990289*x[0] + (-0.589578400723)*x[1]
            ref[(3, 1, 3, 2)]=-0.714247391012*dim
            arg[(3, 1, 3, 3)]=-0.0660360719728*x[0] + (-0.621796933879)*x[1]
            ref[(3, 1, 3, 3)]=-0.687833005852*dim
            arg[(3, 2, 0, 0)]=0.630967307214*x[0] + (0.255102350738)*x[1]
            ref[(3, 2, 0, 0)]=0.886069657953*dim
            arg[(3, 2, 0, 1)]=0.0670834108741*x[0] + (0.698588839306)*x[1]
            ref[(3, 2, 0, 1)]=0.76567225018*dim
            arg[(3, 2, 0, 2)]=0.0513119022209*x[0] + (-0.478771330096)*x[1]
            ref[(3, 2, 0, 2)]=-0.427459427875*dim
            arg[(3, 2, 0, 3)]=0.00335029797262*x[0] + (0.229464900456)*x[1]
            ref[(3, 2, 0, 3)]=0.232815198429*dim
            arg[(3, 2, 1, 0)]=-0.307685774991*x[0] + (-0.1026123829)*x[1]
            ref[(3, 2, 1, 0)]=-0.41029815789*dim
            arg[(3, 2, 1, 1)]=-0.658953772535*x[0] + (-0.429208519328)*x[1]
            ref[(3, 2, 1, 1)]=-1.08816229186*dim
            arg[(3, 2, 1, 2)]=0.31827279959*x[0] + (0.954510203208)*x[1]
            ref[(3, 2, 1, 2)]=1.2727830028*dim
            arg[(3, 2, 1, 3)]=-0.442141978601*x[0] + (-0.572709070832)*x[1]
            ref[(3, 2, 1, 3)]=-1.01485104943*dim
            arg[(3, 2, 2, 0)]=-0.253912571047*x[0] + (-0.603985337196)*x[1]
            ref[(3, 2, 2, 0)]=-0.857897908243*dim
            arg[(3, 2, 2, 1)]=-0.493147710799*x[0] + (0.953169033693)*x[1]
            ref[(3, 2, 2, 1)]=0.460021322894*dim
            arg[(3, 2, 2, 2)]=-0.456601922305*x[0] + (0.305421193435)*x[1]
            ref[(3, 2, 2, 2)]=-0.151180728869*dim
            arg[(3, 2, 2, 3)]=0.482514334424*x[0] + (-0.134893349639)*x[1]
            ref[(3, 2, 2, 3)]=0.347620984785*dim
            arg[(3, 2, 3, 0)]=0.648995838471*x[0] + (-0.909635360659)*x[1]
            ref[(3, 2, 3, 0)]=-0.260639522189*dim
            arg[(3, 2, 3, 1)]=0.339641351854*x[0] + (0.0694201915271)*x[1]
            ref[(3, 2, 3, 1)]=0.409061543381*dim
            arg[(3, 2, 3, 2)]=0.675112404444*x[0] + (-0.575211388171)*x[1]
            ref[(3, 2, 3, 2)]=0.099901016273*dim
            arg[(3, 2, 3, 3)]=-0.630753413511*x[0] + (0.02561269366)*x[1]
            ref[(3, 2, 3, 3)]=-0.605140719851*dim
            arg[(3, 3, 0, 0)]=-0.676902351618*x[0] + (0.896665189897)*x[1]
            ref[(3, 3, 0, 0)]=0.219762838279*dim
            arg[(3, 3, 0, 1)]=-0.597841158812*x[0] + (0.865857251852)*x[1]
            ref[(3, 3, 0, 1)]=0.268016093041*dim
            arg[(3, 3, 0, 2)]=-0.797196065729*x[0] + (0.0201149904553)*x[1]
            ref[(3, 3, 0, 2)]=-0.777081075274*dim
            arg[(3, 3, 0, 3)]=0.375193220887*x[0] + (-0.439995621734)*x[1]
            ref[(3, 3, 0, 3)]=-0.0648024008464*dim
            arg[(3, 3, 1, 0)]=0.734151960477*x[0] + (-0.604436540149)*x[1]
            ref[(3, 3, 1, 0)]=0.129715420328*dim
            arg[(3, 3, 1, 1)]=-0.790834972429*x[0] + (0.371501992599)*x[1]
            ref[(3, 3, 1, 1)]=-0.41933297983*dim
            arg[(3, 3, 1, 2)]=-0.141660579537*x[0] + (0.135280568704)*x[1]
            ref[(3, 3, 1, 2)]=-0.00638001083266*dim
            arg[(3, 3, 1, 3)]=0.119048606769*x[0] + (-0.653497753482)*x[1]
            ref[(3, 3, 1, 3)]=-0.534449146713*dim
            arg[(3, 3, 2, 0)]=-0.384021560377*x[0] + (-0.29472774295)*x[1]
            ref[(3, 3, 2, 0)]=-0.678749303327*dim
            arg[(3, 3, 2, 1)]=-0.125886180481*x[0] + (0.839373020562)*x[1]
            ref[(3, 3, 2, 1)]=0.713486840081*dim
            arg[(3, 3, 2, 2)]=0.271667159169*x[0] + (-0.753974286486)*x[1]
            ref[(3, 3, 2, 2)]=-0.482307127317*dim
            arg[(3, 3, 2, 3)]=-0.860680638377*x[0] + (0.440860068366)*x[1]
            ref[(3, 3, 2, 3)]=-0.419820570011*dim
            arg[(3, 3, 3, 0)]=-0.323120455693*x[0] + (0.409131087482)*x[1]
            ref[(3, 3, 3, 0)]=0.0860106317884*dim
            arg[(3, 3, 3, 1)]=0.243328555258*x[0] + (0.438925044709)*x[1]
            ref[(3, 3, 3, 1)]=0.682253599967*dim
            arg[(3, 3, 3, 2)]=0.977693498344*x[0] + (-0.700965028172)*x[1]
            ref[(3, 3, 3, 2)]=0.276728470172*dim
            arg[(3, 3, 3, 3)]=0.344428586301*x[0] + (-0.944879089399)*x[1]
            ref[(3, 3, 3, 3)]=-0.600450503098*dim
        else:
            arg[(0, 0, 0, 0)]=0.301027998468*x[0] + (0.935433399519)*x[1] + (-0.0426185054063)*x[2]
            ref[(0, 0, 0, 0)]=1.19384289258*dim
            arg[(0, 0, 0, 1)]=-0.181730936116*x[0] + (0.843348634688)*x[1] + (0.307060882602)*x[2]
            ref[(0, 0, 0, 1)]=0.968678581173*dim
            arg[(0, 0, 0, 2)]=-0.140518784949*x[0] + (0.22545045335)*x[1] + (0.66231834712)*x[2]
            ref[(0, 0, 0, 2)]=0.747250015521*dim
            arg[(0, 0, 0, 3)]=0.889106502149*x[0] + (-0.59694290555)*x[1] + (-0.97580816461)*x[2]
            ref[(0, 0, 0, 3)]=-0.68364456801*dim
            arg[(0, 0, 1, 0)]=-0.927086386464*x[0] + (0.354752103449)*x[1] + (0.863532842191)*x[2]
            ref[(0, 0, 1, 0)]=0.291198559177*dim
            arg[(0, 0, 1, 1)]=-0.793431284017*x[0] + (0.635363581109)*x[1] + (-0.993821903164)*x[2]
            ref[(0, 0, 1, 1)]=-1.15188960607*dim
            arg[(0, 0, 1, 2)]=0.382796752572*x[0] + (-0.565410502797)*x[1] + (-0.553225136375)*x[2]
            ref[(0, 0, 1, 2)]=-0.7358388866*dim
            arg[(0, 0, 1, 3)]=-0.586188049762*x[0] + (0.320209732563)*x[1] + (-0.068261150178)*x[2]
            ref[(0, 0, 1, 3)]=-0.334239467376*dim
            arg[(0, 0, 2, 0)]=0.515337422095*x[0] + (-0.492658247859)*x[1] + (0.717784150079)*x[2]
            ref[(0, 0, 2, 0)]=0.740463324315*dim
            arg[(0, 0, 2, 1)]=-0.922403853061*x[0] + (-0.0403420625106)*x[1] + (-0.0949576511583)*x[2]
            ref[(0, 0, 2, 1)]=-1.05770356673*dim
            arg[(0, 0, 2, 2)]=0.84919054489*x[0] + (-0.531049261045)*x[1] + (0.0809264009163)*x[2]
            ref[(0, 0, 2, 2)]=0.39906768476*dim
            arg[(0, 0, 2, 3)]=-0.0837462574193*x[0] + (-0.309363270045)*x[1] + (-0.100828287706)*x[2]
            ref[(0, 0, 2, 3)]=-0.49393781517*dim
            arg[(0, 0, 3, 0)]=0.797593437361*x[0] + (-0.800933562379)*x[1] + (-0.0913886187128)*x[2]
            ref[(0, 0, 3, 0)]=-0.0947287437307*dim
            arg[(0, 0, 3, 1)]=0.534849973557*x[0] + (0.240079714404)*x[1] + (0.33592856507)*x[2]
            ref[(0, 0, 3, 1)]=1.11085825303*dim
            arg[(0, 0, 3, 2)]=-0.384573114704*x[0] + (-0.871660623996)*x[1] + (-0.437365672657)*x[2]
            ref[(0, 0, 3, 2)]=-1.69359941136*dim
            arg[(0, 0, 3, 3)]=0.183332786511*x[0] + (0.792181628558)*x[1] + (-0.124986200994)*x[2]
            ref[(0, 0, 3, 3)]=0.850528214075*dim
            arg[(0, 1, 0, 0)]=-0.824368632197*x[0] + (-0.00386795583376)*x[1] + (0.844327802642)*x[2]
            ref[(0, 1, 0, 0)]=0.0160912146111*dim
            arg[(0, 1, 0, 1)]=-0.102926762809*x[0] + (-0.980983583386)*x[1] + (-0.785941036634)*x[2]
            ref[(0, 1, 0, 1)]=-1.86985138283*dim
            arg[(0, 1, 0, 2)]=-0.139841310592*x[0] + (0.20695920049)*x[1] + (0.302125886492)*x[2]
            ref[(0, 1, 0, 2)]=0.36924377639*dim
            arg[(0, 1, 0, 3)]=-0.61163651615*x[0] + (-0.203643396666)*x[1] + (0.951521822006)*x[2]
            ref[(0, 1, 0, 3)]=0.136241909191*dim
            arg[(0, 1, 1, 0)]=-0.475934022797*x[0] + (-0.345602076638)*x[1] + (-0.176469264888)*x[2]
            ref[(0, 1, 1, 0)]=-0.998005364322*dim
            arg[(0, 1, 1, 1)]=0.22056292371*x[0] + (0.991424881292)*x[1] + (0.384957434551)*x[2]
            ref[(0, 1, 1, 1)]=1.59694523955*dim
            arg[(0, 1, 1, 2)]=-0.250032528196*x[0] + (0.602735990672)*x[1] + (0.326162095155)*x[2]
            ref[(0, 1, 1, 2)]=0.678865557631*dim
            arg[(0, 1, 1, 3)]=0.894419018625*x[0] + (-0.859384206495)*x[1] + (-0.340518563346)*x[2]
            ref[(0, 1, 1, 3)]=-0.305483751216*dim
            arg[(0, 1, 2, 0)]=-0.254692898423*x[0] + (-0.0501089180295)*x[1] + (-0.150826108825)*x[2]
            ref[(0, 1, 2, 0)]=-0.455627925278*dim
            arg[(0, 1, 2, 1)]=-0.872931048729*x[0] + (-0.152531995765)*x[1] + (0.0416621529487)*x[2]
            ref[(0, 1, 2, 1)]=-0.983800891545*dim
            arg[(0, 1, 2, 2)]=0.506417645092*x[0] + (0.293715322415)*x[1] + (0.307537355293)*x[2]
            ref[(0, 1, 2, 2)]=1.1076703228*dim
            arg[(0, 1, 2, 3)]=-0.740097497615*x[0] + (0.0331185500758)*x[1] + (-0.427565413646)*x[2]
            ref[(0, 1, 2, 3)]=-1.13454436118*dim
            arg[(0, 1, 3, 0)]=-0.535337145344*x[0] + (-0.543039187214)*x[1] + (0.664072242547)*x[2]
            ref[(0, 1, 3, 0)]=-0.414304090011*dim
            arg[(0, 1, 3, 1)]=-0.641252975352*x[0] + (-0.328639022146)*x[1] + (-0.333881175978)*x[2]
            ref[(0, 1, 3, 1)]=-1.30377317348*dim
            arg[(0, 1, 3, 2)]=-0.0160805581787*x[0] + (0.952122394411)*x[1] + (-0.163038387002)*x[2]
            ref[(0, 1, 3, 2)]=0.773003449231*dim
            arg[(0, 1, 3, 3)]=0.094867927842*x[0] + (-0.412643213056)*x[1] + (0.592041915242)*x[2]
            ref[(0, 1, 3, 3)]=0.274266630028*dim
            arg[(0, 2, 0, 0)]=0.500464362859*x[0] + (0.923089473452)*x[1] + (-0.1237565766)*x[2]
            ref[(0, 2, 0, 0)]=1.29979725971*dim
            arg[(0, 2, 0, 1)]=-0.160552567062*x[0] + (0.36936896774)*x[1] + (-0.672984788813)*x[2]
            ref[(0, 2, 0, 1)]=-0.464168388135*dim
            arg[(0, 2, 0, 2)]=-0.262073384351*x[0] + (0.852096768759)*x[1] + (0.327301222672)*x[2]
            ref[(0, 2, 0, 2)]=0.91732460708*dim
            arg[(0, 2, 0, 3)]=0.924678520251*x[0] + (0.424635807005)*x[1] + (-0.956027536515)*x[2]
            ref[(0, 2, 0, 3)]=0.393286790741*dim
            arg[(0, 2, 1, 0)]=-0.9183714216*x[0] + (-0.843574671533)*x[1] + (0.300744460868)*x[2]
            ref[(0, 2, 1, 0)]=-1.46120163226*dim
            arg[(0, 2, 1, 1)]=-0.649759547866*x[0] + (-0.499659261862)*x[1] + (-0.110498962505)*x[2]
            ref[(0, 2, 1, 1)]=-1.25991777223*dim
            arg[(0, 2, 1, 2)]=-0.766934760069*x[0] + (0.437463087186)*x[1] + (-0.650299421278)*x[2]
            ref[(0, 2, 1, 2)]=-0.979771094161*dim
            arg[(0, 2, 1, 3)]=-0.502067068563*x[0] + (-0.0114746534)*x[1] + (0.496305913557)*x[2]
            ref[(0, 2, 1, 3)]=-0.0172358084059*dim
            arg[(0, 2, 2, 0)]=0.259789416709*x[0] + (-0.0903736364549)*x[1] + (0.560221881943)*x[2]
            ref[(0, 2, 2, 0)]=0.729637662197*dim
            arg[(0, 2, 2, 1)]=-0.708336606563*x[0] + (0.317685989416)*x[1] + (-0.492518186041)*x[2]
            ref[(0, 2, 2, 1)]=-0.883168803187*dim
            arg[(0, 2, 2, 2)]=-0.879839515601*x[0] + (0.677923129383)*x[1] + (-0.565309092454)*x[2]
            ref[(0, 2, 2, 2)]=-0.767225478672*dim
            arg[(0, 2, 2, 3)]=0.445850869787*x[0] + (0.0229072458773)*x[1] + (0.406254447419)*x[2]
            ref[(0, 2, 2, 3)]=0.875012563084*dim
            arg[(0, 2, 3, 0)]=-0.0170086793984*x[0] + (0.612962342612)*x[1] + (-0.634053262858)*x[2]
            ref[(0, 2, 3, 0)]=-0.0380995996448*dim
            arg[(0, 2, 3, 1)]=-0.969414304191*x[0] + (0.839481677709)*x[1] + (-0.57909123763)*x[2]
            ref[(0, 2, 3, 1)]=-0.709023864111*dim
            arg[(0, 2, 3, 2)]=0.751512505759*x[0] + (-0.818133858566)*x[1] + (-0.338605100347)*x[2]
            ref[(0, 2, 3, 2)]=-0.405226453154*dim
            arg[(0, 2, 3, 3)]=-0.307251956755*x[0] + (0.376525543418)*x[1] + (0.515872966234)*x[2]
            ref[(0, 2, 3, 3)]=0.585146552897*dim
            arg[(0, 3, 0, 0)]=0.317411643552*x[0] + (-0.667317186741)*x[1] + (0.686361108126)*x[2]
            ref[(0, 3, 0, 0)]=0.336455564938*dim
            arg[(0, 3, 0, 1)]=-0.50075845585*x[0] + (-0.472871278848)*x[1] + (-0.880453833958)*x[2]
            ref[(0, 3, 0, 1)]=-1.85408356866*dim
            arg[(0, 3, 0, 2)]=-0.516673117335*x[0] + (0.550733133367)*x[1] + (-0.0583523034222)*x[2]
            ref[(0, 3, 0, 2)]=-0.0242922873895*dim
            arg[(0, 3, 0, 3)]=0.895193762761*x[0] + (-0.0776742632265)*x[1] + (0.247513204162)*x[2]
            ref[(0, 3, 0, 3)]=1.0650327037*dim
            arg[(0, 3, 1, 0)]=-0.457546612604*x[0] + (0.322470146789)*x[1] + (0.161642603078)*x[2]
            ref[(0, 3, 1, 0)]=0.0265661372624*dim
            arg[(0, 3, 1, 1)]=0.830329142472*x[0] + (0.208138105802)*x[1] + (-0.972579291611)*x[2]
            ref[(0, 3, 1, 1)]=0.0658879566633*dim
            arg[(0, 3, 1, 2)]=0.0206186544047*x[0] + (0.507181363673)*x[1] + (-0.251242990234)*x[2]
            ref[(0, 3, 1, 2)]=0.276557027843*dim
            arg[(0, 3, 1, 3)]=-0.0972614623957*x[0] + (0.959811448157)*x[1] + (0.178444445696)*x[2]
            ref[(0, 3, 1, 3)]=1.04099443146*dim
            arg[(0, 3, 2, 0)]=-0.93488199667*x[0] + (-0.376412410661)*x[1] + (0.787119407675)*x[2]
            ref[(0, 3, 2, 0)]=-0.524174999656*dim
            arg[(0, 3, 2, 1)]=-0.762326498309*x[0] + (-0.242984793547)*x[1] + (-0.00867839965818)*x[2]
            ref[(0, 3, 2, 1)]=-1.01398969151*dim
            arg[(0, 3, 2, 2)]=-0.929853128532*x[0] + (0.448482567186)*x[1] + (0.619649954547)*x[2]
            ref[(0, 3, 2, 2)]=0.138279393201*dim
            arg[(0, 3, 2, 3)]=-0.407247987814*x[0] + (0.636670380037)*x[1] + (-0.557660106192)*x[2]
            ref[(0, 3, 2, 3)]=-0.328237713969*dim
            arg[(0, 3, 3, 0)]=0.200284493596*x[0] + (0.843781451793)*x[1] + (-0.345505667091)*x[2]
            ref[(0, 3, 3, 0)]=0.698560278298*dim
            arg[(0, 3, 3, 1)]=-0.153183847422*x[0] + (0.176229350548)*x[1] + (0.0130745007455)*x[2]
            ref[(0, 3, 3, 1)]=0.0361200038712*dim
            arg[(0, 3, 3, 2)]=0.225349973568*x[0] + (0.966228777981)*x[1] + (-0.896914038305)*x[2]
            ref[(0, 3, 3, 2)]=0.294664713243*dim
            arg[(0, 3, 3, 3)]=-0.913708070301*x[0] + (-0.735974441831)*x[1] + (0.35624112532)*x[2]
            ref[(0, 3, 3, 3)]=-1.29344138681*dim
            arg[(1, 0, 0, 0)]=-0.766566284347*x[0] + (0.662092268263)*x[1] + (-0.376468197199)*x[2]
            ref[(1, 0, 0, 0)]=-0.480942213283*dim
            arg[(1, 0, 0, 1)]=0.405809648712*x[0] + (0.5738006591)*x[1] + (0.609478903545)*x[2]
            ref[(1, 0, 0, 1)]=1.58908921136*dim
            arg[(1, 0, 0, 2)]=0.587006388244*x[0] + (-0.426997675712)*x[1] + (-0.830053465763)*x[2]
            ref[(1, 0, 0, 2)]=-0.670044753232*dim
            arg[(1, 0, 0, 3)]=0.670254138911*x[0] + (-0.297861428357)*x[1] + (0.346171812888)*x[2]
            ref[(1, 0, 0, 3)]=0.718564523442*dim
            arg[(1, 0, 1, 0)]=-0.406805666347*x[0] + (0.987819096515)*x[1] + (0.45366586498)*x[2]
            ref[(1, 0, 1, 0)]=1.03467929515*dim
            arg[(1, 0, 1, 1)]=-0.771831222463*x[0] + (-0.287241215678)*x[1] + (0.257427820576)*x[2]
            ref[(1, 0, 1, 1)]=-0.801644617564*dim
            arg[(1, 0, 1, 2)]=-0.694305505534*x[0] + (-0.338094343944)*x[1] + (0.707348957713)*x[2]
            ref[(1, 0, 1, 2)]=-0.325050891765*dim
            arg[(1, 0, 1, 3)]=0.297939487745*x[0] + (-0.634695584805)*x[1] + (-0.955139570144)*x[2]
            ref[(1, 0, 1, 3)]=-1.2918956672*dim
            arg[(1, 0, 2, 0)]=0.51835241735*x[0] + (0.159445512077)*x[1] + (-0.922709782163)*x[2]
            ref[(1, 0, 2, 0)]=-0.244911852736*dim
            arg[(1, 0, 2, 1)]=-0.116455527494*x[0] + (-0.110668849489)*x[1] + (0.730055757956)*x[2]
            ref[(1, 0, 2, 1)]=0.502931380973*dim
            arg[(1, 0, 2, 2)]=-0.242285956202*x[0] + (-0.363893724229)*x[1] + (-0.244059333102)*x[2]
            ref[(1, 0, 2, 2)]=-0.850239013533*dim
            arg[(1, 0, 2, 3)]=-0.986194806435*x[0] + (0.431524992624)*x[1] + (-0.455641770752)*x[2]
            ref[(1, 0, 2, 3)]=-1.01031158456*dim
            arg[(1, 0, 3, 0)]=-0.744062267382*x[0] + (-0.412251411293)*x[1] + (0.105246425293)*x[2]
            ref[(1, 0, 3, 0)]=-1.05106725338*dim
            arg[(1, 0, 3, 1)]=0.797303760166*x[0] + (-0.18586872394)*x[1] + (-0.538588054918)*x[2]
            ref[(1, 0, 3, 1)]=0.0728469813075*dim
            arg[(1, 0, 3, 2)]=0.216197335534*x[0] + (0.102223027603)*x[1] + (-0.139167763372)*x[2]
            ref[(1, 0, 3, 2)]=0.179252599765*dim
            arg[(1, 0, 3, 3)]=0.32197058213*x[0] + (0.625468631516)*x[1] + (0.185936681692)*x[2]
            ref[(1, 0, 3, 3)]=1.13337589534*dim
            arg[(1, 1, 0, 0)]=0.0931980267237*x[0] + (0.0262345798949)*x[1] + (0.278613444174)*x[2]
            ref[(1, 1, 0, 0)]=0.398046050793*dim
            arg[(1, 1, 0, 1)]=-0.116641790099*x[0] + (-0.694585229048)*x[1] + (-0.257509145326)*x[2]
            ref[(1, 1, 0, 1)]=-1.06873616447*dim
            arg[(1, 1, 0, 2)]=0.800554192559*x[0] + (-0.597636901462)*x[1] + (0.167018440145)*x[2]
            ref[(1, 1, 0, 2)]=0.369935731243*dim
            arg[(1, 1, 0, 3)]=-0.0211640971312*x[0] + (-0.778123285397)*x[1] + (0.318543460256)*x[2]
            ref[(1, 1, 0, 3)]=-0.480743922272*dim
            arg[(1, 1, 1, 0)]=-0.395377453668*x[0] + (-0.414200282445)*x[1] + (-0.376981373345)*x[2]
            ref[(1, 1, 1, 0)]=-1.18655910946*dim
            arg[(1, 1, 1, 1)]=0.166493729289*x[0] + (0.549996145328)*x[1] + (-0.275956101341)*x[2]
            ref[(1, 1, 1, 1)]=0.440533773277*dim
            arg[(1, 1, 1, 2)]=0.639126987032*x[0] + (-0.329753258806)*x[1] + (-0.668527536632)*x[2]
            ref[(1, 1, 1, 2)]=-0.359153808406*dim
            arg[(1, 1, 1, 3)]=0.76254745715*x[0] + (0.496151942827)*x[1] + (-0.167321200175)*x[2]
            ref[(1, 1, 1, 3)]=1.0913781998*dim
            arg[(1, 1, 2, 0)]=-0.965876035333*x[0] + (-0.170039060768)*x[1] + (-0.45052389557)*x[2]
            ref[(1, 1, 2, 0)]=-1.58643899167*dim
            arg[(1, 1, 2, 1)]=0.0356143632608*x[0] + (0.626051257373)*x[1] + (0.995293496816)*x[2]
            ref[(1, 1, 2, 1)]=1.65695911745*dim
            arg[(1, 1, 2, 2)]=-0.45080657421*x[0] + (0.148002380581)*x[1] + (-0.862458838638)*x[2]
            ref[(1, 1, 2, 2)]=-1.16526303227*dim
            arg[(1, 1, 2, 3)]=0.36918403798*x[0] + (0.976824077058)*x[1] + (-0.508100167133)*x[2]
            ref[(1, 1, 2, 3)]=0.837907947904*dim
            arg[(1, 1, 3, 0)]=-0.922297706733*x[0] + (-0.965529952468)*x[1] + (0.573694331762)*x[2]
            ref[(1, 1, 3, 0)]=-1.31413332744*dim
            arg[(1, 1, 3, 1)]=0.0311569058614*x[0] + (-0.349011835097)*x[1] + (0.711950116109)*x[2]
            ref[(1, 1, 3, 1)]=0.394095186873*dim
            arg[(1, 1, 3, 2)]=0.775465978826*x[0] + (-0.240113814427)*x[1] + (0.840617397386)*x[2]
            ref[(1, 1, 3, 2)]=1.37596956178*dim
            arg[(1, 1, 3, 3)]=-0.589631446129*x[0] + (-0.0651689341666)*x[1] + (-0.0974832311494)*x[2]
            ref[(1, 1, 3, 3)]=-0.752283611445*dim
            arg[(1, 2, 0, 0)]=-0.983314040731*x[0] + (0.853036515181)*x[1] + (0.700123186083)*x[2]
            ref[(1, 2, 0, 0)]=0.569845660532*dim
            arg[(1, 2, 0, 1)]=-0.4855105605*x[0] + (-0.898398624741)*x[1] + (0.969578541525)*x[2]
            ref[(1, 2, 0, 1)]=-0.414330643716*dim
            arg[(1, 2, 0, 2)]=0.235175992922*x[0] + (0.764767897917)*x[1] + (-0.117283811326)*x[2]
            ref[(1, 2, 0, 2)]=0.882660079512*dim
            arg[(1, 2, 0, 3)]=0.432394739059*x[0] + (0.610302025987)*x[1] + (0.722151804028)*x[2]
            ref[(1, 2, 0, 3)]=1.76484856907*dim
            arg[(1, 2, 1, 0)]=-0.825806770459*x[0] + (0.565219257621)*x[1] + (-0.127755329703)*x[2]
            ref[(1, 2, 1, 0)]=-0.388342842541*dim
            arg[(1, 2, 1, 1)]=-0.407659659683*x[0] + (0.900038291641)*x[1] + (-0.642999711731)*x[2]
            ref[(1, 2, 1, 1)]=-0.150621079772*dim
            arg[(1, 2, 1, 2)]=-0.12825587891*x[0] + (0.465313107479)*x[1] + (0.697625628206)*x[2]
            ref[(1, 2, 1, 2)]=1.03468285678*dim
            arg[(1, 2, 1, 3)]=-0.526433459484*x[0] + (0.875360091455)*x[1] + (-0.19478564055)*x[2]
            ref[(1, 2, 1, 3)]=0.15414099142*dim
            arg[(1, 2, 2, 0)]=-0.878199662116*x[0] + (-0.181624365847)*x[1] + (0.987159102591)*x[2]
            ref[(1, 2, 2, 0)]=-0.0726649253716*dim
            arg[(1, 2, 2, 1)]=0.978682751298*x[0] + (0.0678314837158)*x[1] + (-0.631254276351)*x[2]
            ref[(1, 2, 2, 1)]=0.415259958664*dim
            arg[(1, 2, 2, 2)]=-0.303766397347*x[0] + (-0.962463350506)*x[1] + (0.927816641595)*x[2]
            ref[(1, 2, 2, 2)]=-0.338413106258*dim
            arg[(1, 2, 2, 3)]=0.950209683391*x[0] + (-0.931844747587)*x[1] + (-0.0402367795485)*x[2]
            ref[(1, 2, 2, 3)]=-0.0218718437439*dim
            arg[(1, 2, 3, 0)]=-0.672116516859*x[0] + (0.893344604213)*x[1] + (0.720300850599)*x[2]
            ref[(1, 2, 3, 0)]=0.941528937952*dim
            arg[(1, 2, 3, 1)]=0.936555913004*x[0] + (0.467071427415)*x[1] + (-0.350697212166)*x[2]
            ref[(1, 2, 3, 1)]=1.05293012825*dim
            arg[(1, 2, 3, 2)]=-0.946734440085*x[0] + (-0.147198975736)*x[1] + (-0.909251637982)*x[2]
            ref[(1, 2, 3, 2)]=-2.0031850538*dim
            arg[(1, 2, 3, 3)]=0.452421936944*x[0] + (0.461789685954)*x[1] + (0.777976360098)*x[2]
            ref[(1, 2, 3, 3)]=1.692187983*dim
            arg[(1, 3, 0, 0)]=0.989798275798*x[0] + (0.543300835559)*x[1] + (0.435459708922)*x[2]
            ref[(1, 3, 0, 0)]=1.96855882028*dim
            arg[(1, 3, 0, 1)]=0.454050359966*x[0] + (0.604774631548)*x[1] + (0.359195387797)*x[2]
            ref[(1, 3, 0, 1)]=1.41802037931*dim
            arg[(1, 3, 0, 2)]=0.511349725472*x[0] + (-0.157935827457)*x[1] + (0.318091497866)*x[2]
            ref[(1, 3, 0, 2)]=0.671505395882*dim
            arg[(1, 3, 0, 3)]=-0.214064310048*x[0] + (-0.179140365565)*x[1] + (-0.81449244704)*x[2]
            ref[(1, 3, 0, 3)]=-1.20769712265*dim
            arg[(1, 3, 1, 0)]=0.0196531937802*x[0] + (-0.102438567575)*x[1] + (0.880469805854)*x[2]
            ref[(1, 3, 1, 0)]=0.79768443206*dim
            arg[(1, 3, 1, 1)]=-0.91418976034*x[0] + (-0.313365676201)*x[1] + (-0.635702661638)*x[2]
            ref[(1, 3, 1, 1)]=-1.86325809818*dim
            arg[(1, 3, 1, 2)]=0.817910307368*x[0] + (0.730168360801)*x[1] + (-0.949476252004)*x[2]
            ref[(1, 3, 1, 2)]=0.598602416165*dim
            arg[(1, 3, 1, 3)]=-0.6008888058*x[0] + (-0.761806361154)*x[1] + (-0.7989607513)*x[2]
            ref[(1, 3, 1, 3)]=-2.16165591825*dim
            arg[(1, 3, 2, 0)]=0.790027868567*x[0] + (0.227241310525)*x[1] + (0.800308525886)*x[2]
            ref[(1, 3, 2, 0)]=1.81757770498*dim
            arg[(1, 3, 2, 1)]=0.609825653699*x[0] + (-0.996973078157)*x[1] + (0.979139987414)*x[2]
            ref[(1, 3, 2, 1)]=0.591992562956*dim
            arg[(1, 3, 2, 2)]=-0.884968645537*x[0] + (-0.361723511256)*x[1] + (0.713565530613)*x[2]
            ref[(1, 3, 2, 2)]=-0.53312662618*dim
            arg[(1, 3, 2, 3)]=-0.0381921482091*x[0] + (0.248420500075)*x[1] + (0.0279706909719)*x[2]
            ref[(1, 3, 2, 3)]=0.238199042838*dim
            arg[(1, 3, 3, 0)]=-0.414292598533*x[0] + (0.467938728578)*x[1] + (0.855732183932)*x[2]
            ref[(1, 3, 3, 0)]=0.909378313976*dim
            arg[(1, 3, 3, 1)]=-0.317441972583*x[0] + (0.659513924448)*x[1] + (0.252618037518)*x[2]
            ref[(1, 3, 3, 1)]=0.594689989384*dim
            arg[(1, 3, 3, 2)]=0.18560087043*x[0] + (-0.949867325612)*x[1] + (0.331141557742)*x[2]
            ref[(1, 3, 3, 2)]=-0.433124897439*dim
            arg[(1, 3, 3, 3)]=0.307502208374*x[0] + (0.650391973824)*x[1] + (-0.348000104962)*x[2]
            ref[(1, 3, 3, 3)]=0.609894077237*dim
            arg[(2, 0, 0, 0)]=0.120966974331*x[0] + (0.0640249956945)*x[1] + (0.234720888093)*x[2]
            ref[(2, 0, 0, 0)]=0.419712858119*dim
            arg[(2, 0, 0, 1)]=-0.726283882957*x[0] + (-0.615448534951)*x[1] + (-0.327024031459)*x[2]
            ref[(2, 0, 0, 1)]=-1.66875644937*dim
            arg[(2, 0, 0, 2)]=0.387051578332*x[0] + (0.317594461114)*x[1] + (-0.455472378493)*x[2]
            ref[(2, 0, 0, 2)]=0.249173660953*dim
            arg[(2, 0, 0, 3)]=0.517909584154*x[0] + (-0.745354124347)*x[1] + (-0.950309660271)*x[2]
            ref[(2, 0, 0, 3)]=-1.17775420046*dim
            arg[(2, 0, 1, 0)]=-0.354230783772*x[0] + (0.972485431505)*x[1] + (-0.92227977854)*x[2]
            ref[(2, 0, 1, 0)]=-0.304025130808*dim
            arg[(2, 0, 1, 1)]=-0.547651110402*x[0] + (-0.536713722843)*x[1] + (-0.110182348175)*x[2]
            ref[(2, 0, 1, 1)]=-1.19454718142*dim
            arg[(2, 0, 1, 2)]=0.165498449751*x[0] + (0.72924668866)*x[1] + (0.404184008266)*x[2]
            ref[(2, 0, 1, 2)]=1.29892914668*dim
            arg[(2, 0, 1, 3)]=-0.0931867872726*x[0] + (-0.722604211489)*x[1] + (-0.967758701441)*x[2]
            ref[(2, 0, 1, 3)]=-1.7835497002*dim
            arg[(2, 0, 2, 0)]=0.0860950652836*x[0] + (-0.131102363166)*x[1] + (0.858585093271)*x[2]
            ref[(2, 0, 2, 0)]=0.813577795389*dim
            arg[(2, 0, 2, 1)]=-0.104927855355*x[0] + (0.137084838974)*x[1] + (0.460410116874)*x[2]
            ref[(2, 0, 2, 1)]=0.492567100494*dim
            arg[(2, 0, 2, 2)]=0.399212653069*x[0] + (0.129787437669)*x[1] + (0.792183339112)*x[2]
            ref[(2, 0, 2, 2)]=1.32118342985*dim
            arg[(2, 0, 2, 3)]=-0.183957895271*x[0] + (-0.919528389457)*x[1] + (-0.199528910417)*x[2]
            ref[(2, 0, 2, 3)]=-1.30301519515*dim
            arg[(2, 0, 3, 0)]=-0.0451054255133*x[0] + (-0.826945401599)*x[1] + (-0.931861409641)*x[2]
            ref[(2, 0, 3, 0)]=-1.80391223675*dim
            arg[(2, 0, 3, 1)]=0.147761797383*x[0] + (-0.468273789242)*x[1] + (0.201213858678)*x[2]
            ref[(2, 0, 3, 1)]=-0.119298133181*dim
            arg[(2, 0, 3, 2)]=-0.77518536541*x[0] + (-0.188133247406)*x[1] + (0.845079917433)*x[2]
            ref[(2, 0, 3, 2)]=-0.118238695383*dim
            arg[(2, 0, 3, 3)]=-0.343136036196*x[0] + (0.59433868181)*x[1] + (0.385380432651)*x[2]
            ref[(2, 0, 3, 3)]=0.636583078265*dim
            arg[(2, 1, 0, 0)]=0.580938297067*x[0] + (-0.22086519446)*x[1] + (-0.116894769592)*x[2]
            ref[(2, 1, 0, 0)]=0.243178333015*dim
            arg[(2, 1, 0, 1)]=-0.100654305993*x[0] + (-0.976445784122)*x[1] + (-0.909335560639)*x[2]
            ref[(2, 1, 0, 1)]=-1.98643565075*dim
            arg[(2, 1, 0, 2)]=0.247666940497*x[0] + (0.973832396995)*x[1] + (0.205545763837)*x[2]
            ref[(2, 1, 0, 2)]=1.42704510133*dim
            arg[(2, 1, 0, 3)]=-0.808746569068*x[0] + (-0.375528140622)*x[1] + (0.241370361085)*x[2]
            ref[(2, 1, 0, 3)]=-0.942904348605*dim
            arg[(2, 1, 1, 0)]=-0.514945479073*x[0] + (-0.0116754295952)*x[1] + (-0.97751088172)*x[2]
            ref[(2, 1, 1, 0)]=-1.50413179039*dim
            arg[(2, 1, 1, 1)]=-0.71744752142*x[0] + (0.100035642076)*x[1] + (-0.683435352712)*x[2]
            ref[(2, 1, 1, 1)]=-1.30084723206*dim
            arg[(2, 1, 1, 2)]=-0.215437892784*x[0] + (0.725007744296)*x[1] + (0.322813028965)*x[2]
            ref[(2, 1, 1, 2)]=0.832382880477*dim
            arg[(2, 1, 1, 3)]=-0.599038295453*x[0] + (0.646004205294)*x[1] + (0.346184777455)*x[2]
            ref[(2, 1, 1, 3)]=0.393150687296*dim
            arg[(2, 1, 2, 0)]=-0.821095564635*x[0] + (0.34712378619)*x[1] + (0.914326164273)*x[2]
            ref[(2, 1, 2, 0)]=0.440354385829*dim
            arg[(2, 1, 2, 1)]=-0.420711372628*x[0] + (0.921437183639)*x[1] + (-0.875454521095)*x[2]
            ref[(2, 1, 2, 1)]=-0.374728710084*dim
            arg[(2, 1, 2, 2)]=0.897918095883*x[0] + (-0.914385318659)*x[1] + (-0.802121372596)*x[2]
            ref[(2, 1, 2, 2)]=-0.818588595372*dim
            arg[(2, 1, 2, 3)]=-0.414605258604*x[0] + (-0.613359478324)*x[1] + (0.828694845961)*x[2]
            ref[(2, 1, 2, 3)]=-0.199269890967*dim
            arg[(2, 1, 3, 0)]=-0.0728619293457*x[0] + (-0.639029427142)*x[1] + (-0.0527229251563)*x[2]
            ref[(2, 1, 3, 0)]=-0.764614281644*dim
            arg[(2, 1, 3, 1)]=-0.10733290253*x[0] + (0.32659498015)*x[1] + (-0.982504973499)*x[2]
            ref[(2, 1, 3, 1)]=-0.763242895879*dim
            arg[(2, 1, 3, 2)]=0.22481755996*x[0] + (-0.278794329665)*x[1] + (0.690867769806)*x[2]
            ref[(2, 1, 3, 2)]=0.636891000101*dim
            arg[(2, 1, 3, 3)]=-0.906322022143*x[0] + (0.164757831816)*x[1] + (0.981541953718)*x[2]
            ref[(2, 1, 3, 3)]=0.239977763391*dim
            arg[(2, 2, 0, 0)]=-0.164008695461*x[0] + (-0.831352653451)*x[1] + (-0.694460050594)*x[2]
            ref[(2, 2, 0, 0)]=-1.68982139951*dim
            arg[(2, 2, 0, 1)]=0.838933636798*x[0] + (-0.893014053236)*x[1] + (-0.421761946906)*x[2]
            ref[(2, 2, 0, 1)]=-0.475842363344*dim
            arg[(2, 2, 0, 2)]=-0.707773064274*x[0] + (-0.474501913607)*x[1] + (0.306278733972)*x[2]
            ref[(2, 2, 0, 2)]=-0.875996243909*dim
            arg[(2, 2, 0, 3)]=0.421465088204*x[0] + (-0.101625466209)*x[1] + (0.489263539281)*x[2]
            ref[(2, 2, 0, 3)]=0.809103161276*dim
            arg[(2, 2, 1, 0)]=0.578881791951*x[0] + (-0.920039855318)*x[1] + (-0.237024198924)*x[2]
            ref[(2, 2, 1, 0)]=-0.578182262291*dim
            arg[(2, 2, 1, 1)]=0.484417133029*x[0] + (-0.624512587774)*x[1] + (0.34065970119)*x[2]
            ref[(2, 2, 1, 1)]=0.200564246445*dim
            arg[(2, 2, 1, 2)]=0.484504984988*x[0] + (0.184604221987)*x[1] + (0.79198240873)*x[2]
            ref[(2, 2, 1, 2)]=1.46109161571*dim
            arg[(2, 2, 1, 3)]=-0.836064005738*x[0] + (0.129072040756)*x[1] + (0.569696336117)*x[2]
            ref[(2, 2, 1, 3)]=-0.137295628866*dim
            arg[(2, 2, 2, 0)]=-0.107716292841*x[0] + (0.288573621596)*x[1] + (-0.114367518557)*x[2]
            ref[(2, 2, 2, 0)]=0.0664898101978*dim
            arg[(2, 2, 2, 1)]=0.550333470935*x[0] + (-0.252074911615)*x[1] + (-0.826221313642)*x[2]
            ref[(2, 2, 2, 1)]=-0.527962754322*dim
            arg[(2, 2, 2, 2)]=0.492585839459*x[0] + (0.496476559247)*x[1] + (0.470472649194)*x[2]
            ref[(2, 2, 2, 2)]=1.4595350479*dim
            arg[(2, 2, 2, 3)]=0.436402178947*x[0] + (-0.45720989506)*x[1] + (-0.530190690191)*x[2]
            ref[(2, 2, 2, 3)]=-0.550998406303*dim
            arg[(2, 2, 3, 0)]=0.570816811475*x[0] + (-0.768007967736)*x[1] + (0.533592823995)*x[2]
            ref[(2, 2, 3, 0)]=0.336401667734*dim
            arg[(2, 2, 3, 1)]=0.376386717156*x[0] + (0.0583308140772)*x[1] + (-0.603375836816)*x[2]
            ref[(2, 2, 3, 1)]=-0.168658305583*dim
            arg[(2, 2, 3, 2)]=-0.145099306587*x[0] + (-0.40764526696)*x[1] + (-0.637296337113)*x[2]
            ref[(2, 2, 3, 2)]=-1.19004091066*dim
            arg[(2, 2, 3, 3)]=0.920712191043*x[0] + (-0.817939330154)*x[1] + (0.329277525005)*x[2]
            ref[(2, 2, 3, 3)]=0.432050385893*dim
            arg[(2, 3, 0, 0)]=0.483844299987*x[0] + (0.949230961688)*x[1] + (-0.0213255282205)*x[2]
            ref[(2, 3, 0, 0)]=1.41174973345*dim
            arg[(2, 3, 0, 1)]=-0.478548661037*x[0] + (-0.762417901463)*x[1] + (0.993618380294)*x[2]
            ref[(2, 3, 0, 1)]=-0.247348182207*dim
            arg[(2, 3, 0, 2)]=0.228757710631*x[0] + (-0.779578335712)*x[1] + (-0.513592848696)*x[2]
            ref[(2, 3, 0, 2)]=-1.06441347378*dim
            arg[(2, 3, 0, 3)]=0.933693952149*x[0] + (-0.254363101499)*x[1] + (0.312274222808)*x[2]
            ref[(2, 3, 0, 3)]=0.991605073459*dim
            arg[(2, 3, 1, 0)]=0.442590512588*x[0] + (0.897670463942)*x[1] + (-0.900881772359)*x[2]
            ref[(2, 3, 1, 0)]=0.43937920417*dim
            arg[(2, 3, 1, 1)]=0.30961679574*x[0] + (-0.17173839469)*x[1] + (0.459485697103)*x[2]
            ref[(2, 3, 1, 1)]=0.597364098153*dim
            arg[(2, 3, 1, 2)]=0.318672698555*x[0] + (0.989040428201)*x[1] + (-0.618714406434)*x[2]
            ref[(2, 3, 1, 2)]=0.688998720322*dim
            arg[(2, 3, 1, 3)]=0.972878011935*x[0] + (0.172358580442)*x[1] + (-0.395156961983)*x[2]
            ref[(2, 3, 1, 3)]=0.750079630394*dim
            arg[(2, 3, 2, 0)]=0.606497517517*x[0] + (-0.861592193905)*x[1] + (-0.823863268879)*x[2]
            ref[(2, 3, 2, 0)]=-1.07895794527*dim
            arg[(2, 3, 2, 1)]=0.759723938992*x[0] + (0.155626328351)*x[1] + (-0.648761293292)*x[2]
            ref[(2, 3, 2, 1)]=0.266588974051*dim
            arg[(2, 3, 2, 2)]=-0.403585701509*x[0] + (0.30594167768)*x[1] + (0.617811095204)*x[2]
            ref[(2, 3, 2, 2)]=0.520167071376*dim
            arg[(2, 3, 2, 3)]=-0.0121159210593*x[0] + (0.77774165829)*x[1] + (-0.42212677005)*x[2]
            ref[(2, 3, 2, 3)]=0.34349896718*dim
            arg[(2, 3, 3, 0)]=0.91528578389*x[0] + (0.339902106098)*x[1] + (0.610101085483)*x[2]
            ref[(2, 3, 3, 0)]=1.86528897547*dim
            arg[(2, 3, 3, 1)]=-0.110287241971*x[0] + (-0.221316041051)*x[1] + (0.304347870126)*x[2]
            ref[(2, 3, 3, 1)]=-0.0272554128957*dim
            arg[(2, 3, 3, 2)]=-0.958649962787*x[0] + (-0.143023105282)*x[1] + (0.913461891477)*x[2]
            ref[(2, 3, 3, 2)]=-0.188211176593*dim
            arg[(2, 3, 3, 3)]=0.900685462171*x[0] + (-0.42524516423)*x[1] + (-0.243742256025)*x[2]
            ref[(2, 3, 3, 3)]=0.231698041916*dim
            arg[(3, 0, 0, 0)]=0.396819690667*x[0] + (-0.100469294075)*x[1] + (0.541058583541)*x[2]
            ref[(3, 0, 0, 0)]=0.837408980133*dim
            arg[(3, 0, 0, 1)]=0.461205196417*x[0] + (-0.266132349194)*x[1] + (-0.455149029703)*x[2]
            ref[(3, 0, 0, 1)]=-0.26007618248*dim
            arg[(3, 0, 0, 2)]=-0.222334760509*x[0] + (-0.29630700366)*x[1] + (-0.14470845384)*x[2]
            ref[(3, 0, 0, 2)]=-0.663350218009*dim
            arg[(3, 0, 0, 3)]=-0.922042840082*x[0] + (-0.584156096728)*x[1] + (-0.595603879689)*x[2]
            ref[(3, 0, 0, 3)]=-2.1018028165*dim
            arg[(3, 0, 1, 0)]=-0.0604788673754*x[0] + (-0.0787482771606)*x[1] + (0.730800791762)*x[2]
            ref[(3, 0, 1, 0)]=0.591573647226*dim
            arg[(3, 0, 1, 1)]=0.635166889848*x[0] + (-0.964828939214)*x[1] + (-0.940965343771)*x[2]
            ref[(3, 0, 1, 1)]=-1.27062739314*dim
            arg[(3, 0, 1, 2)]=0.297804392958*x[0] + (0.273173639295)*x[1] + (-0.299660034455)*x[2]
            ref[(3, 0, 1, 2)]=0.271317997798*dim
            arg[(3, 0, 1, 3)]=-0.204278091824*x[0] + (-0.607442926135)*x[1] + (0.702970478679)*x[2]
            ref[(3, 0, 1, 3)]=-0.10875053928*dim
            arg[(3, 0, 2, 0)]=0.221552988285*x[0] + (-0.0663592436555)*x[1] + (0.872366354057)*x[2]
            ref[(3, 0, 2, 0)]=1.02756009869*dim
            arg[(3, 0, 2, 1)]=-0.449424533409*x[0] + (0.67306780003)*x[1] + (-0.746976459838)*x[2]
            ref[(3, 0, 2, 1)]=-0.523333193216*dim
            arg[(3, 0, 2, 2)]=-0.375376428088*x[0] + (-0.343997991173)*x[1] + (-0.84614379314)*x[2]
            ref[(3, 0, 2, 2)]=-1.5655182124*dim
            arg[(3, 0, 2, 3)]=0.218825895969*x[0] + (-0.960167716473)*x[1] + (0.976839895272)*x[2]
            ref[(3, 0, 2, 3)]=0.235498074768*dim
            arg[(3, 0, 3, 0)]=0.0942828655193*x[0] + (0.251641247437)*x[1] + (-0.136775489293)*x[2]
            ref[(3, 0, 3, 0)]=0.209148623663*dim
            arg[(3, 0, 3, 1)]=0.574372173094*x[0] + (-0.227479086136)*x[1] + (-0.692251684998)*x[2]
            ref[(3, 0, 3, 1)]=-0.34535859804*dim
            arg[(3, 0, 3, 2)]=-0.0803644675104*x[0] + (0.771560911051)*x[1] + (-0.511094159868)*x[2]
            ref[(3, 0, 3, 2)]=0.180102283672*dim
            arg[(3, 0, 3, 3)]=0.16051373837*x[0] + (-0.824625726336)*x[1] + (-0.510756731063)*x[2]
            ref[(3, 0, 3, 3)]=-1.17486871903*dim
            arg[(3, 1, 0, 0)]=-0.593665046535*x[0] + (0.0657840658043)*x[1] + (0.481755333565)*x[2]
            ref[(3, 1, 0, 0)]=-0.0461256471661*dim
            arg[(3, 1, 0, 1)]=0.115058870427*x[0] + (0.558896044809)*x[1] + (0.95791028849)*x[2]
            ref[(3, 1, 0, 1)]=1.63186520373*dim
            arg[(3, 1, 0, 2)]=-0.847197463094*x[0] + (-0.849139295571)*x[1] + (0.724284563515)*x[2]
            ref[(3, 1, 0, 2)]=-0.972052195149*dim
            arg[(3, 1, 0, 3)]=-0.570569046334*x[0] + (0.599604407664)*x[1] + (0.885959724702)*x[2]
            ref[(3, 1, 0, 3)]=0.914995086031*dim
            arg[(3, 1, 1, 0)]=-0.218948705315*x[0] + (0.392050668651)*x[1] + (-0.347301246986)*x[2]
            ref[(3, 1, 1, 0)]=-0.174199283649*dim
            arg[(3, 1, 1, 1)]=0.823877200355*x[0] + (-0.84590427361)*x[1] + (-0.123226272901)*x[2]
            ref[(3, 1, 1, 1)]=-0.145253346156*dim
            arg[(3, 1, 1, 2)]=0.0301956016541*x[0] + (-0.0560023292407)*x[1] + (-0.255054623715)*x[2]
            ref[(3, 1, 1, 2)]=-0.280861351302*dim
            arg[(3, 1, 1, 3)]=-0.0526839893317*x[0] + (-0.885653878285)*x[1] + (0.175729513605)*x[2]
            ref[(3, 1, 1, 3)]=-0.762608354012*dim
            arg[(3, 1, 2, 0)]=0.474474842458*x[0] + (0.759367536168)*x[1] + (-0.100056034645)*x[2]
            ref[(3, 1, 2, 0)]=1.13378634398*dim
            arg[(3, 1, 2, 1)]=0.538506147116*x[0] + (-0.694670645749)*x[1] + (-0.522650002358)*x[2]
            ref[(3, 1, 2, 1)]=-0.678814500991*dim
            arg[(3, 1, 2, 2)]=-0.345790011616*x[0] + (0.540653516437)*x[1] + (-0.346328553625)*x[2]
            ref[(3, 1, 2, 2)]=-0.151465048804*dim
            arg[(3, 1, 2, 3)]=-0.205089669551*x[0] + (0.979954072546)*x[1] + (0.0533456721459)*x[2]
            ref[(3, 1, 2, 3)]=0.828210075141*dim
            arg[(3, 1, 3, 0)]=-0.963443399592*x[0] + (0.802063286337)*x[1] + (-0.0399579948305)*x[2]
            ref[(3, 1, 3, 0)]=-0.201338108085*dim
            arg[(3, 1, 3, 1)]=-0.727054514816*x[0] + (-0.528350651399)*x[1] + (-0.0902902895529)*x[2]
            ref[(3, 1, 3, 1)]=-1.34569545577*dim
            arg[(3, 1, 3, 2)]=0.30590678371*x[0] + (0.891308737924)*x[1] + (0.660505709686)*x[2]
            ref[(3, 1, 3, 2)]=1.85772123132*dim
            arg[(3, 1, 3, 3)]=-0.835957257032*x[0] + (0.35817572425)*x[1] + (0.0998035886554)*x[2]
            ref[(3, 1, 3, 3)]=-0.377977944126*dim
            arg[(3, 2, 0, 0)]=-0.86949215132*x[0] + (0.190078997614)*x[1] + (0.0617965398194)*x[2]
            ref[(3, 2, 0, 0)]=-0.617616613886*dim
            arg[(3, 2, 0, 1)]=0.55233912668*x[0] + (-0.755047381703)*x[1] + (-0.204262022577)*x[2]
            ref[(3, 2, 0, 1)]=-0.4069702776*dim
            arg[(3, 2, 0, 2)]=0.142214234555*x[0] + (-0.199404133936)*x[1] + (-0.0965921824117)*x[2]
            ref[(3, 2, 0, 2)]=-0.153782081792*dim
            arg[(3, 2, 0, 3)]=-0.0734658166899*x[0] + (-0.788922908311)*x[1] + (0.859218647761)*x[2]
            ref[(3, 2, 0, 3)]=-0.00317007723969*dim
            arg[(3, 2, 1, 0)]=0.8515282161*x[0] + (0.106523991418)*x[1] + (-0.407474200757)*x[2]
            ref[(3, 2, 1, 0)]=0.550578006761*dim
            arg[(3, 2, 1, 1)]=0.80033496821*x[0] + (-0.856115879489)*x[1] + (0.292345475893)*x[2]
            ref[(3, 2, 1, 1)]=0.236564564614*dim
            arg[(3, 2, 1, 2)]=-0.699234193047*x[0] + (-0.754092091883)*x[1] + (-0.351690223358)*x[2]
            ref[(3, 2, 1, 2)]=-1.80501650829*dim
            arg[(3, 2, 1, 3)]=0.516273851428*x[0] + (0.717662962171)*x[1] + (-0.445973446052)*x[2]
            ref[(3, 2, 1, 3)]=0.787963367546*dim
            arg[(3, 2, 2, 0)]=-0.416243623583*x[0] + (-0.758925028594)*x[1] + (0.646524731797)*x[2]
            ref[(3, 2, 2, 0)]=-0.528643920381*dim
            arg[(3, 2, 2, 1)]=0.760905950592*x[0] + (-0.789133143864)*x[1] + (0.327148420912)*x[2]
            ref[(3, 2, 2, 1)]=0.29892122764*dim
            arg[(3, 2, 2, 2)]=-0.357708026709*x[0] + (-0.786372813822)*x[1] + (0.0929852003285)*x[2]
            ref[(3, 2, 2, 2)]=-1.0510956402*dim
            arg[(3, 2, 2, 3)]=-0.488675338545*x[0] + (-0.878042936033)*x[1] + (0.91365352437)*x[2]
            ref[(3, 2, 2, 3)]=-0.453064750207*dim
            arg[(3, 2, 3, 0)]=-0.532396177347*x[0] + (-0.408702585953)*x[1] + (0.698775504713)*x[2]
            ref[(3, 2, 3, 0)]=-0.242323258587*dim
            arg[(3, 2, 3, 1)]=-0.103212854375*x[0] + (0.0986803105791)*x[1] + (-0.715772407655)*x[2]
            ref[(3, 2, 3, 1)]=-0.720304951451*dim
            arg[(3, 2, 3, 2)]=-0.473069329708*x[0] + (-0.153053928853)*x[1] + (0.389152816597)*x[2]
            ref[(3, 2, 3, 2)]=-0.236970441965*dim
            arg[(3, 2, 3, 3)]=-0.0732959327428*x[0] + (0.310824028637)*x[1] + (0.68982741737)*x[2]
            ref[(3, 2, 3, 3)]=0.927355513264*dim
            arg[(3, 3, 0, 0)]=-0.595047353603*x[0] + (0.733285714371)*x[1] + (0.288603440451)*x[2]
            ref[(3, 3, 0, 0)]=0.426841801219*dim
            arg[(3, 3, 0, 1)]=0.687589568374*x[0] + (0.932398088991)*x[1] + (0.168484731099)*x[2]
            ref[(3, 3, 0, 1)]=1.78847238846*dim
            arg[(3, 3, 0, 2)]=-0.334840821468*x[0] + (-0.172627940914)*x[1] + (0.180762455698)*x[2]
            ref[(3, 3, 0, 2)]=-0.326706306684*dim
            arg[(3, 3, 0, 3)]=0.266155887338*x[0] + (-0.351660974461)*x[1] + (0.76921595702)*x[2]
            ref[(3, 3, 0, 3)]=0.683710869897*dim
            arg[(3, 3, 1, 0)]=-0.170403527878*x[0] + (0.656705641669)*x[1] + (0.725658244331)*x[2]
            ref[(3, 3, 1, 0)]=1.21196035812*dim
            arg[(3, 3, 1, 1)]=-0.758545893902*x[0] + (-0.0599085587185)*x[1] + (0.528049456317)*x[2]
            ref[(3, 3, 1, 1)]=-0.290404996304*dim
            arg[(3, 3, 1, 2)]=-0.321318894941*x[0] + (0.129397239898)*x[1] + (0.993718109581)*x[2]
            ref[(3, 3, 1, 2)]=0.801796454538*dim
            arg[(3, 3, 1, 3)]=-0.233003767305*x[0] + (0.115065929407)*x[1] + (0.601056139234)*x[2]
            ref[(3, 3, 1, 3)]=0.483118301336*dim
            arg[(3, 3, 2, 0)]=0.0963756310159*x[0] + (0.204267129139)*x[1] + (0.408526468786)*x[2]
            ref[(3, 3, 2, 0)]=0.709169228941*dim
            arg[(3, 3, 2, 1)]=0.960015407629*x[0] + (0.825774367845)*x[1] + (-0.327457406736)*x[2]
            ref[(3, 3, 2, 1)]=1.45833236874*dim
            arg[(3, 3, 2, 2)]=0.0218549658316*x[0] + (0.0811923386543)*x[1] + (0.763292125022)*x[2]
            ref[(3, 3, 2, 2)]=0.866339429508*dim
            arg[(3, 3, 2, 3)]=0.253354154412*x[0] + (0.917467246413)*x[1] + (-0.382584536681)*x[2]
            ref[(3, 3, 2, 3)]=0.788236864143*dim
            arg[(3, 3, 3, 0)]=0.675409706049*x[0] + (0.4146056895)*x[1] + (0.0403098384152)*x[2]
            ref[(3, 3, 3, 0)]=1.13032523396*dim
            arg[(3, 3, 3, 1)]=-0.442807900748*x[0] + (-0.0807924513887)*x[1] + (-0.476023144079)*x[2]
            ref[(3, 3, 3, 1)]=-0.999623496216*dim
            arg[(3, 3, 3, 2)]=0.793155964154*x[0] + (-0.605076433859)*x[1] + (0.0047666067363)*x[2]
            ref[(3, 3, 3, 2)]=0.192846137032*dim
            arg[(3, 3, 3, 3)]=-0.456516049847*x[0] + (-0.843812183862)*x[1] + (0.313511843321)*x[2]
            ref[(3, 3, 3, 3)]=-0.986816390388*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.654405351328*x[0] + (-0.739294192823)*x[1]
            ref=-0.0848888414945*dim
        else:
            arg=-0.207377415186*x[0] + (0.861462235853)*x[1] + (-0.147692368192)*x[2]
            ref=0.506392452475*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.638647353652*x[0] + (0.604014919614)*x[1]
            ref[(0,)]=-0.0346324340379*dim
            arg[(1,)]=-0.566757634477*x[0] + (-0.385803419786)*x[1]
            ref[(1,)]=-0.952561054263*dim
            arg[(2,)]=0.700368698956*x[0] + (-0.628139161387)*x[1]
            ref[(2,)]=0.0722295375692*dim
        else:
            arg[(0,)]=0.364737225587*x[0] + (-0.417136821917)*x[1] + (0.687842677559)*x[2]
            ref[(0,)]=0.635443081228*dim
            arg[(1,)]=-0.807953329688*x[0] + (-0.285691859168)*x[1] + (-0.840156694707)*x[2]
            ref[(1,)]=-1.93380188356*dim
            arg[(2,)]=0.130735406727*x[0] + (-0.0642866213191)*x[1] + (-0.626035874656)*x[2]
            ref[(2,)]=-0.559587089248*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.343623452056*x[0] + (0.674104286139)*x[1]
            ref[(0, 0)]=1.0177277382*dim
            arg[(0, 1)]=0.2068083607*x[0] + (-0.290561298223)*x[1]
            ref[(0, 1)]=-0.0837529375222*dim
            arg[(1, 0)]=-0.0213928554605*x[0] + (0.701149135445)*x[1]
            ref[(1, 0)]=0.679756279985*dim
            arg[(1, 1)]=0.288737834025*x[0] + (0.978294404058)*x[1]
            ref[(1, 1)]=1.26703223808*dim
            arg[(2, 0)]=-0.52198377108*x[0] + (0.0584840207576)*x[1]
            ref[(2, 0)]=-0.463499750323*dim
            arg[(2, 1)]=0.946649483761*x[0] + (0.251106870097)*x[1]
            ref[(2, 1)]=1.19775635386*dim
        else:
            arg[(0, 0)]=-0.375810687516*x[0] + (-0.527320917535)*x[1] + (-0.584073742502)*x[2]
            ref[(0, 0)]=-1.48720534755*dim
            arg[(0, 1)]=0.323158268987*x[0] + (0.647719703411)*x[1] + (-0.537544933425)*x[2]
            ref[(0, 1)]=0.433333038973*dim
            arg[(1, 0)]=0.842255773825*x[0] + (0.639503542247)*x[1] + (-0.519424348641)*x[2]
            ref[(1, 0)]=0.962334967431*dim
            arg[(1, 1)]=0.107397616447*x[0] + (0.695531558855)*x[1] + (0.898465740161)*x[2]
            ref[(1, 1)]=1.70139491546*dim
            arg[(2, 0)]=0.798164838505*x[0] + (-0.769616021711)*x[1] + (-0.712492657455)*x[2]
            ref[(2, 0)]=-0.683943840661*dim
            arg[(2, 1)]=0.528889106041*x[0] + (0.989753302958)*x[1] + (-0.491268891404)*x[2]
            ref[(2, 1)]=1.02737351759*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref=numpy.zeros((3, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.116127505626*x[0] + (0.702177196159)*x[1]
            ref[(0, 0, 0)]=0.818304701785*dim
            arg[(0, 0, 1)]=0.181924174355*x[0] + (0.716496542166)*x[1]
            ref[(0, 0, 1)]=0.898420716521*dim
            arg[(0, 0, 2)]=0.941509707908*x[0] + (0.446613826435)*x[1]
            ref[(0, 0, 2)]=1.38812353434*dim
            arg[(0, 0, 3)]=0.2510225275*x[0] + (0.298415943022)*x[1]
            ref[(0, 0, 3)]=0.549438470523*dim
            arg[(0, 1, 0)]=0.929773279731*x[0] + (0.288819546953)*x[1]
            ref[(0, 1, 0)]=1.21859282668*dim
            arg[(0, 1, 1)]=-0.368286314652*x[0] + (-0.817102510471)*x[1]
            ref[(0, 1, 1)]=-1.18538882512*dim
            arg[(0, 1, 2)]=0.412933238619*x[0] + (-0.726436991071)*x[1]
            ref[(0, 1, 2)]=-0.313503752453*dim
            arg[(0, 1, 3)]=0.955495871436*x[0] + (-0.747419000105)*x[1]
            ref[(0, 1, 3)]=0.208076871331*dim
            arg[(0, 2, 0)]=0.784865530081*x[0] + (0.973517191395)*x[1]
            ref[(0, 2, 0)]=1.75838272148*dim
            arg[(0, 2, 1)]=-0.868906737349*x[0] + (0.173043196381)*x[1]
            ref[(0, 2, 1)]=-0.695863540968*dim
            arg[(0, 2, 2)]=0.0373905180122*x[0] + (-0.222382725224)*x[1]
            ref[(0, 2, 2)]=-0.184992207212*dim
            arg[(0, 2, 3)]=0.140468251763*x[0] + (-0.543318676965)*x[1]
            ref[(0, 2, 3)]=-0.402850425202*dim
            arg[(1, 0, 0)]=0.380796122124*x[0] + (0.818169752199)*x[1]
            ref[(1, 0, 0)]=1.19896587432*dim
            arg[(1, 0, 1)]=-0.953626518922*x[0] + (-0.944828036814)*x[1]
            ref[(1, 0, 1)]=-1.89845455574*dim
            arg[(1, 0, 2)]=0.454293220914*x[0] + (0.150084042698)*x[1]
            ref[(1, 0, 2)]=0.604377263613*dim
            arg[(1, 0, 3)]=0.946077643878*x[0] + (0.259977830501)*x[1]
            ref[(1, 0, 3)]=1.20605547438*dim
            arg[(1, 1, 0)]=-0.0914922348539*x[0] + (0.333027260296)*x[1]
            ref[(1, 1, 0)]=0.241535025442*dim
            arg[(1, 1, 1)]=0.854453129578*x[0] + (0.392858875824)*x[1]
            ref[(1, 1, 1)]=1.2473120054*dim
            arg[(1, 1, 2)]=-0.432562043759*x[0] + (0.286038638615)*x[1]
            ref[(1, 1, 2)]=-0.146523405144*dim
            arg[(1, 1, 3)]=0.718535302869*x[0] + (-0.071590921535)*x[1]
            ref[(1, 1, 3)]=0.646944381334*dim
            arg[(1, 2, 0)]=0.253370147727*x[0] + (-0.374896420127)*x[1]
            ref[(1, 2, 0)]=-0.121526272401*dim
            arg[(1, 2, 1)]=0.175781601503*x[0] + (0.421507028874)*x[1]
            ref[(1, 2, 1)]=0.597288630377*dim
            arg[(1, 2, 2)]=-0.924906492185*x[0] + (0.665385057696)*x[1]
            ref[(1, 2, 2)]=-0.259521434489*dim
            arg[(1, 2, 3)]=-0.0716198054608*x[0] + (0.743567263946)*x[1]
            ref[(1, 2, 3)]=0.671947458485*dim
            arg[(2, 0, 0)]=-0.0609086791428*x[0] + (0.630002126528)*x[1]
            ref[(2, 0, 0)]=0.569093447385*dim
            arg[(2, 0, 1)]=-0.0177648866142*x[0] + (-0.27935513386)*x[1]
            ref[(2, 0, 1)]=-0.297120020474*dim
            arg[(2, 0, 2)]=0.0492960697054*x[0] + (0.292897533636)*x[1]
            ref[(2, 0, 2)]=0.342193603341*dim
            arg[(2, 0, 3)]=0.793282590602*x[0] + (-0.740308041698)*x[1]
            ref[(2, 0, 3)]=0.0529745489039*dim
            arg[(2, 1, 0)]=0.74468915486*x[0] + (-0.679752781791)*x[1]
            ref[(2, 1, 0)]=0.0649363730692*dim
            arg[(2, 1, 1)]=-0.364852954628*x[0] + (-0.971138174834)*x[1]
            ref[(2, 1, 1)]=-1.33599112946*dim
            arg[(2, 1, 2)]=-0.39699658407*x[0] + (0.943917868704)*x[1]
            ref[(2, 1, 2)]=0.546921284634*dim
            arg[(2, 1, 3)]=0.453173757322*x[0] + (-0.208982229634)*x[1]
            ref[(2, 1, 3)]=0.244191527688*dim
            arg[(2, 2, 0)]=-0.776357891889*x[0] + (0.288418059691)*x[1]
            ref[(2, 2, 0)]=-0.487939832198*dim
            arg[(2, 2, 1)]=-0.742703515298*x[0] + (0.293306181439)*x[1]
            ref[(2, 2, 1)]=-0.449397333859*dim
            arg[(2, 2, 2)]=0.958167470799*x[0] + (0.20571192292)*x[1]
            ref[(2, 2, 2)]=1.16387939372*dim
            arg[(2, 2, 3)]=-0.703352037325*x[0] + (-0.814189336035)*x[1]
            ref[(2, 2, 3)]=-1.51754137336*dim
        else:
            arg[(0, 0, 0)]=-0.0961378060809*x[0] + (0.999217693029)*x[1] + (0.390859381244)*x[2]
            ref[(0, 0, 0)]=1.29393926819*dim
            arg[(0, 0, 1)]=0.43658725715*x[0] + (0.157922274697)*x[1] + (-0.746907777082)*x[2]
            ref[(0, 0, 1)]=-0.152398245235*dim
            arg[(0, 0, 2)]=-0.000243824582959*x[0] + (-0.9929337765)*x[1] + (-0.847159472723)*x[2]
            ref[(0, 0, 2)]=-1.84033707381*dim
            arg[(0, 0, 3)]=-0.165178828978*x[0] + (0.533870698271)*x[1] + (0.702027194752)*x[2]
            ref[(0, 0, 3)]=1.07071906405*dim
            arg[(0, 1, 0)]=0.54433977272*x[0] + (-0.640186876991)*x[1] + (0.298420354939)*x[2]
            ref[(0, 1, 0)]=0.202573250668*dim
            arg[(0, 1, 1)]=-0.216152786845*x[0] + (-0.774712101111)*x[1] + (0.712924801264)*x[2]
            ref[(0, 1, 1)]=-0.277940086692*dim
            arg[(0, 1, 2)]=0.135383694994*x[0] + (-0.457275453006)*x[1] + (0.291988573198)*x[2]
            ref[(0, 1, 2)]=-0.0299031848135*dim
            arg[(0, 1, 3)]=0.691856041473*x[0] + (-0.417684602492)*x[1] + (-0.506696610451)*x[2]
            ref[(0, 1, 3)]=-0.23252517147*dim
            arg[(0, 2, 0)]=0.774420389991*x[0] + (-0.324204406679)*x[1] + (0.65175561622)*x[2]
            ref[(0, 2, 0)]=1.10197159953*dim
            arg[(0, 2, 1)]=0.580509810194*x[0] + (0.994983477044)*x[1] + (-0.852789965447)*x[2]
            ref[(0, 2, 1)]=0.722703321791*dim
            arg[(0, 2, 2)]=0.105849440226*x[0] + (0.772846328277)*x[1] + (0.29886665876)*x[2]
            ref[(0, 2, 2)]=1.17756242726*dim
            arg[(0, 2, 3)]=-0.155238156353*x[0] + (0.78681220676)*x[1] + (-0.592051125367)*x[2]
            ref[(0, 2, 3)]=0.0395229250398*dim
            arg[(1, 0, 0)]=0.827844253357*x[0] + (-0.162116238742)*x[1] + (-0.15826579933)*x[2]
            ref[(1, 0, 0)]=0.507462215285*dim
            arg[(1, 0, 1)]=-0.964039950616*x[0] + (-0.779348062771)*x[1] + (0.452847573006)*x[2]
            ref[(1, 0, 1)]=-1.29054044038*dim
            arg[(1, 0, 2)]=-0.0965985725065*x[0] + (0.108375602376)*x[1] + (0.183767297863)*x[2]
            ref[(1, 0, 2)]=0.195544327733*dim
            arg[(1, 0, 3)]=0.0738482638388*x[0] + (0.79354733547)*x[1] + (-0.315282344894)*x[2]
            ref[(1, 0, 3)]=0.552113254415*dim
            arg[(1, 1, 0)]=-0.787085588022*x[0] + (-0.390516354758)*x[1] + (-0.912432955602)*x[2]
            ref[(1, 1, 0)]=-2.09003489838*dim
            arg[(1, 1, 1)]=0.675801732016*x[0] + (-0.422857000007)*x[1] + (0.31676955901)*x[2]
            ref[(1, 1, 1)]=0.569714291018*dim
            arg[(1, 1, 2)]=0.907386160679*x[0] + (-0.594324004687)*x[1] + (-0.697928194084)*x[2]
            ref[(1, 1, 2)]=-0.384866038092*dim
            arg[(1, 1, 3)]=0.454163454453*x[0] + (-0.716726518611)*x[1] + (-0.249425677385)*x[2]
            ref[(1, 1, 3)]=-0.511988741543*dim
            arg[(1, 2, 0)]=0.0364664994283*x[0] + (-0.308241154025)*x[1] + (0.578415271097)*x[2]
            ref[(1, 2, 0)]=0.3066406165*dim
            arg[(1, 2, 1)]=-0.403714330125*x[0] + (0.995707999504)*x[1] + (-0.714340162375)*x[2]
            ref[(1, 2, 1)]=-0.122346492996*dim
            arg[(1, 2, 2)]=0.761492893316*x[0] + (-0.512992800351)*x[1] + (-0.888280721948)*x[2]
            ref[(1, 2, 2)]=-0.639780628983*dim
            arg[(1, 2, 3)]=0.0364296138142*x[0] + (-0.535917428899)*x[1] + (-0.428148564564)*x[2]
            ref[(1, 2, 3)]=-0.927636379648*dim
            arg[(2, 0, 0)]=0.450208091628*x[0] + (0.921746770664)*x[1] + (0.63126412068)*x[2]
            ref[(2, 0, 0)]=2.00321898297*dim
            arg[(2, 0, 1)]=-0.519989617915*x[0] + (-0.131320546417)*x[1] + (0.892199177935)*x[2]
            ref[(2, 0, 1)]=0.240889013602*dim
            arg[(2, 0, 2)]=-0.415246661284*x[0] + (-0.825964206373)*x[1] + (0.319423429483)*x[2]
            ref[(2, 0, 2)]=-0.921787438174*dim
            arg[(2, 0, 3)]=-0.0304106314492*x[0] + (0.100093259836)*x[1] + (-0.713261900615)*x[2]
            ref[(2, 0, 3)]=-0.643579272228*dim
            arg[(2, 1, 0)]=-0.361479814039*x[0] + (-0.349805957363)*x[1] + (0.0324994080201)*x[2]
            ref[(2, 1, 0)]=-0.678786363382*dim
            arg[(2, 1, 1)]=-0.419539320354*x[0] + (-0.546022913288)*x[1] + (-0.727929691088)*x[2]
            ref[(2, 1, 1)]=-1.69349192473*dim
            arg[(2, 1, 2)]=-0.885333644392*x[0] + (0.016091530502)*x[1] + (-0.242402215432)*x[2]
            ref[(2, 1, 2)]=-1.11164432932*dim
            arg[(2, 1, 3)]=0.188504680383*x[0] + (-0.0307690831353)*x[1] + (0.961686753797)*x[2]
            ref[(2, 1, 3)]=1.11942235104*dim
            arg[(2, 2, 0)]=-0.0809090646716*x[0] + (0.352752250786)*x[1] + (0.778988192829)*x[2]
            ref[(2, 2, 0)]=1.05083137894*dim
            arg[(2, 2, 1)]=-0.956716311027*x[0] + (-0.535992498367)*x[1] + (-0.116466150732)*x[2]
            ref[(2, 2, 1)]=-1.60917496013*dim
            arg[(2, 2, 2)]=-0.985231924163*x[0] + (-0.646279386413)*x[1] + (0.886985825589)*x[2]
            ref[(2, 2, 2)]=-0.744525484987*dim
            arg[(2, 2, 3)]=-0.707926510735*x[0] + (0.252730124237)*x[1] + (-0.498819775744)*x[2]
            ref[(2, 2, 3)]=-0.954016162242*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2, 2),w)
        ref=numpy.zeros((4, 2, 2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.902651896441*x[0] + (-0.881884866826)*x[1]
            ref[(0, 0, 0, 0)]=-1.78453676327*dim
            arg[(0, 0, 0, 1)]=0.422780910263*x[0] + (0.538952803995)*x[1]
            ref[(0, 0, 0, 1)]=0.961733714259*dim
            arg[(0, 0, 1, 0)]=-0.175381619145*x[0] + (-0.594413748779)*x[1]
            ref[(0, 0, 1, 0)]=-0.769795367925*dim
            arg[(0, 0, 1, 1)]=0.452016283911*x[0] + (0.626271612084)*x[1]
            ref[(0, 0, 1, 1)]=1.078287896*dim
            arg[(0, 1, 0, 0)]=0.391207688117*x[0] + (-0.338189747433)*x[1]
            ref[(0, 1, 0, 0)]=0.0530179406842*dim
            arg[(0, 1, 0, 1)]=-0.271283051794*x[0] + (-0.748205306816)*x[1]
            ref[(0, 1, 0, 1)]=-1.01948835861*dim
            arg[(0, 1, 1, 0)]=0.832602363382*x[0] + (-0.979868287386)*x[1]
            ref[(0, 1, 1, 0)]=-0.147265924004*dim
            arg[(0, 1, 1, 1)]=0.901058625407*x[0] + (-0.161612914056)*x[1]
            ref[(0, 1, 1, 1)]=0.739445711351*dim
            arg[(1, 0, 0, 0)]=-0.492148768199*x[0] + (0.840489936981)*x[1]
            ref[(1, 0, 0, 0)]=0.348341168782*dim
            arg[(1, 0, 0, 1)]=0.737971279939*x[0] + (0.411926232342)*x[1]
            ref[(1, 0, 0, 1)]=1.14989751228*dim
            arg[(1, 0, 1, 0)]=0.647652117542*x[0] + (0.101893337278)*x[1]
            ref[(1, 0, 1, 0)]=0.749545454821*dim
            arg[(1, 0, 1, 1)]=0.80237250097*x[0] + (0.707103919136)*x[1]
            ref[(1, 0, 1, 1)]=1.50947642011*dim
            arg[(1, 1, 0, 0)]=0.192658632581*x[0] + (-0.748563263321)*x[1]
            ref[(1, 1, 0, 0)]=-0.55590463074*dim
            arg[(1, 1, 0, 1)]=-0.349363632139*x[0] + (0.318094241861)*x[1]
            ref[(1, 1, 0, 1)]=-0.0312693902772*dim
            arg[(1, 1, 1, 0)]=-0.195679932642*x[0] + (-0.0357747664774)*x[1]
            ref[(1, 1, 1, 0)]=-0.23145469912*dim
            arg[(1, 1, 1, 1)]=-0.456467998596*x[0] + (-0.211408551365)*x[1]
            ref[(1, 1, 1, 1)]=-0.667876549961*dim
            arg[(2, 0, 0, 0)]=0.997951046842*x[0] + (0.0225509893824)*x[1]
            ref[(2, 0, 0, 0)]=1.02050203622*dim
            arg[(2, 0, 0, 1)]=0.562949365534*x[0] + (0.122968283806)*x[1]
            ref[(2, 0, 0, 1)]=0.685917649339*dim
            arg[(2, 0, 1, 0)]=0.261439796595*x[0] + (0.237622163829)*x[1]
            ref[(2, 0, 1, 0)]=0.499061960424*dim
            arg[(2, 0, 1, 1)]=0.689754522312*x[0] + (-0.870071333796)*x[1]
            ref[(2, 0, 1, 1)]=-0.180316811484*dim
            arg[(2, 1, 0, 0)]=-0.455775390888*x[0] + (-0.916160030794)*x[1]
            ref[(2, 1, 0, 0)]=-1.37193542168*dim
            arg[(2, 1, 0, 1)]=-0.0823263383603*x[0] + (-0.488236345283)*x[1]
            ref[(2, 1, 0, 1)]=-0.570562683643*dim
            arg[(2, 1, 1, 0)]=0.15763774325*x[0] + (0.309530851556)*x[1]
            ref[(2, 1, 1, 0)]=0.467168594806*dim
            arg[(2, 1, 1, 1)]=-0.564375219927*x[0] + (-0.0364214723649)*x[1]
            ref[(2, 1, 1, 1)]=-0.600796692292*dim
            arg[(3, 0, 0, 0)]=-0.81744534093*x[0] + (-0.18407592699)*x[1]
            ref[(3, 0, 0, 0)]=-1.00152126792*dim
            arg[(3, 0, 0, 1)]=-0.199914931103*x[0] + (-0.779140456084)*x[1]
            ref[(3, 0, 0, 1)]=-0.979055387188*dim
            arg[(3, 0, 1, 0)]=0.188234892669*x[0] + (-0.704497373266)*x[1]
            ref[(3, 0, 1, 0)]=-0.516262480598*dim
            arg[(3, 0, 1, 1)]=0.180742417662*x[0] + (-0.674498824145)*x[1]
            ref[(3, 0, 1, 1)]=-0.493756406483*dim
            arg[(3, 1, 0, 0)]=-0.334199908875*x[0] + (0.507507093408)*x[1]
            ref[(3, 1, 0, 0)]=0.173307184533*dim
            arg[(3, 1, 0, 1)]=-0.869943729526*x[0] + (-0.108501794061)*x[1]
            ref[(3, 1, 0, 1)]=-0.978445523587*dim
            arg[(3, 1, 1, 0)]=-0.600963064703*x[0] + (0.0900109130573)*x[1]
            ref[(3, 1, 1, 0)]=-0.510952151646*dim
            arg[(3, 1, 1, 1)]=0.618312354252*x[0] + (0.837730942987)*x[1]
            ref[(3, 1, 1, 1)]=1.45604329724*dim
        else:
            arg[(0, 0, 0, 0)]=0.65801195327*x[0] + (-0.94602067918)*x[1] + (0.907951202486)*x[2]
            ref[(0, 0, 0, 0)]=0.619942476575*dim
            arg[(0, 0, 0, 1)]=-0.858014468136*x[0] + (0.867893607611)*x[1] + (-0.450397122915)*x[2]
            ref[(0, 0, 0, 1)]=-0.44051798344*dim
            arg[(0, 0, 1, 0)]=-0.541826265952*x[0] + (-0.60659878107)*x[1] + (-0.887477741708)*x[2]
            ref[(0, 0, 1, 0)]=-2.03590278873*dim
            arg[(0, 0, 1, 1)]=-0.524578097877*x[0] + (0.132141285653)*x[1] + (0.920274659516)*x[2]
            ref[(0, 0, 1, 1)]=0.527837847293*dim
            arg[(0, 1, 0, 0)]=-0.20961177863*x[0] + (0.985314843425)*x[1] + (0.209857924904)*x[2]
            ref[(0, 1, 0, 0)]=0.985560989699*dim
            arg[(0, 1, 0, 1)]=0.988809265294*x[0] + (0.288931213421)*x[1] + (-0.382974406778)*x[2]
            ref[(0, 1, 0, 1)]=0.894766071937*dim
            arg[(0, 1, 1, 0)]=0.16219757558*x[0] + (0.367454403394)*x[1] + (-0.176563093567)*x[2]
            ref[(0, 1, 1, 0)]=0.353088885408*dim
            arg[(0, 1, 1, 1)]=-0.0968305954732*x[0] + (0.723027810903)*x[1] + (0.551768443413)*x[2]
            ref[(0, 1, 1, 1)]=1.17796565884*dim
            arg[(1, 0, 0, 0)]=-0.295513977522*x[0] + (-0.266581338333)*x[1] + (-0.86685520397)*x[2]
            ref[(1, 0, 0, 0)]=-1.42895051982*dim
            arg[(1, 0, 0, 1)]=0.191893744558*x[0] + (-0.319064381573)*x[1] + (0.498571766838)*x[2]
            ref[(1, 0, 0, 1)]=0.371401129823*dim
            arg[(1, 0, 1, 0)]=-0.837793964729*x[0] + (0.08439572794)*x[1] + (0.655764386311)*x[2]
            ref[(1, 0, 1, 0)]=-0.0976338504785*dim
            arg[(1, 0, 1, 1)]=0.521850341501*x[0] + (-0.27566351247)*x[1] + (0.436039397453)*x[2]
            ref[(1, 0, 1, 1)]=0.682226226484*dim
            arg[(1, 1, 0, 0)]=-0.159975373539*x[0] + (-0.912709278586)*x[1] + (0.566074788121)*x[2]
            ref[(1, 1, 0, 0)]=-0.506609864004*dim
            arg[(1, 1, 0, 1)]=-0.802297282727*x[0] + (0.00980186973815)*x[1] + (-0.334010881754)*x[2]
            ref[(1, 1, 0, 1)]=-1.12650629474*dim
            arg[(1, 1, 1, 0)]=0.961527191557*x[0] + (-0.474685440361)*x[1] + (0.0620556929961)*x[2]
            ref[(1, 1, 1, 0)]=0.548897444193*dim
            arg[(1, 1, 1, 1)]=0.58801140653*x[0] + (-0.230354627265)*x[1] + (-0.706577896108)*x[2]
            ref[(1, 1, 1, 1)]=-0.348921116843*dim
            arg[(2, 0, 0, 0)]=0.0128714283379*x[0] + (0.120014060272)*x[1] + (0.426779803422)*x[2]
            ref[(2, 0, 0, 0)]=0.559665292032*dim
            arg[(2, 0, 0, 1)]=0.720278712758*x[0] + (-0.118560817004)*x[1] + (-0.444340911176)*x[2]
            ref[(2, 0, 0, 1)]=0.157376984577*dim
            arg[(2, 0, 1, 0)]=0.282389172914*x[0] + (-0.00313182406191)*x[1] + (0.614009004232)*x[2]
            ref[(2, 0, 1, 0)]=0.893266353084*dim
            arg[(2, 0, 1, 1)]=-0.863700482543*x[0] + (-0.645370829593)*x[1] + (0.156107994713)*x[2]
            ref[(2, 0, 1, 1)]=-1.35296331742*dim
            arg[(2, 1, 0, 0)]=0.0997624808447*x[0] + (-0.671639972995)*x[1] + (0.311229850888)*x[2]
            ref[(2, 1, 0, 0)]=-0.260647641262*dim
            arg[(2, 1, 0, 1)]=0.335402122896*x[0] + (-0.904431239999)*x[1] + (-0.902512305159)*x[2]
            ref[(2, 1, 0, 1)]=-1.47154142226*dim
            arg[(2, 1, 1, 0)]=0.992278887104*x[0] + (0.541415922336)*x[1] + (0.693787954741)*x[2]
            ref[(2, 1, 1, 0)]=2.22748276418*dim
            arg[(2, 1, 1, 1)]=-0.442691276651*x[0] + (0.979344461669)*x[1] + (0.516206565058)*x[2]
            ref[(2, 1, 1, 1)]=1.05285975008*dim
            arg[(3, 0, 0, 0)]=-0.505802592531*x[0] + (-0.319626547166)*x[1] + (0.698264462753)*x[2]
            ref[(3, 0, 0, 0)]=-0.127164676943*dim
            arg[(3, 0, 0, 1)]=-0.614997149841*x[0] + (-0.146625083347)*x[1] + (-0.390987960178)*x[2]
            ref[(3, 0, 0, 1)]=-1.15261019337*dim
            arg[(3, 0, 1, 0)]=0.0552845923072*x[0] + (0.586999145352)*x[1] + (0.780938093129)*x[2]
            ref[(3, 0, 1, 0)]=1.42322183079*dim
            arg[(3, 0, 1, 1)]=-0.0273335158453*x[0] + (0.456653486395)*x[1] + (-0.978445722886)*x[2]
            ref[(3, 0, 1, 1)]=-0.549125752337*dim
            arg[(3, 1, 0, 0)]=0.682292909267*x[0] + (0.849142339143)*x[1] + (0.581469164261)*x[2]
            ref[(3, 1, 0, 0)]=2.11290441267*dim
            arg[(3, 1, 0, 1)]=-0.685889620183*x[0] + (0.802107527057)*x[1] + (0.449913092995)*x[2]
            ref[(3, 1, 0, 1)]=0.566130999869*dim
            arg[(3, 1, 1, 0)]=0.630395643778*x[0] + (-0.775374985806)*x[1] + (-0.622504943483)*x[2]
            ref[(3, 1, 1, 0)]=-0.767484285512*dim
            arg[(3, 1, 1, 1)]=-0.909293436894*x[0] + (-0.509979883794)*x[1] + (0.489785699699)*x[2]
            ref[(3, 1, 1, 1)]=-0.92948762099*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.89539406703*x[0]**o + (0.61667754481)*x[0] + (0.303688870663)*x[1]**o + (-0.488921042377)*x[1]
            ref=-0.591705196367*(1+2.*(dim-1)/(o+1.)) + (0.127756502433)*dim
        else:
            arg=-0.30321379927*x[0]**o + (-0.744412518299)*x[0] + (0.520098500907)*x[1]**o + (0.399978220269)*x[1] + (-0.534428716591)*x[2]**o + (0.987054137413)*x[2]
            ref=-0.317544014954*(1+2.*(dim-1)/(o+1.)) + (0.642619839384)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.0190260743586*x[0]**o + (-0.469345759354)*x[0] + (-0.792153283692)*x[1]**o + (-0.975091000378)*x[1]
            ref[(0,)]=-0.81117935805*(1+2.*(dim-1)/(o+1.)) + (-1.44443675973)*dim
            arg[(1,)]=-0.619129327724*x[0]**o + (-0.932450883827)*x[0] + (-0.664410062356)*x[1]**o + (-0.0843969656609)*x[1]
            ref[(1,)]=-1.28353939008*(1+2.*(dim-1)/(o+1.)) + (-1.01684784949)*dim
            arg[(2,)]=-0.519801585148*x[0]**o + (-0.43153186337)*x[0] + (-0.974834862321)*x[1]**o + (0.725704076206)*x[1]
            ref[(2,)]=-1.49463644747*(1+2.*(dim-1)/(o+1.)) + (0.294172212837)*dim
            arg[(3,)]=0.589836645932*x[0]**o + (-0.131761556249)*x[0] + (0.87487794151)*x[1]**o + (0.33391533004)*x[1]
            ref[(3,)]=1.46471458744*(1+2.*(dim-1)/(o+1.)) + (0.202153773791)*dim
        else:
            arg[(0,)]=0.174499136557*x[0]**o + (-0.822865430833)*x[0] + (-0.417668960819)*x[1]**o + (0.460852416675)*x[1] + (-0.902819749351)*x[2]**o + (-0.36995108282)*x[2]
            ref[(0,)]=-1.14598957361*(1+2.*(dim-1)/(o+1.)) + (-0.731964096978)*dim
            arg[(1,)]=0.213503682108*x[0]**o + (0.396926800258)*x[0] + (-0.545315125514)*x[1]**o + (-0.773794701372)*x[1] + (-0.240754746615)*x[2]**o + (0.569287908596)*x[2]
            ref[(1,)]=-0.572566190022*(1+2.*(dim-1)/(o+1.)) + (0.192420007481)*dim
            arg[(2,)]=-0.347293326407*x[0]**o + (-0.0209548914462)*x[0] + (0.729420988283)*x[1]**o + (0.0826774332593)*x[1] + (0.368147453135)*x[2]**o + (-0.395605288819)*x[2]
            ref[(2,)]=0.750275115011*(1+2.*(dim-1)/(o+1.)) + (-0.333882747006)*dim
            arg[(3,)]=-0.605360795878*x[0]**o + (-0.334221504644)*x[0] + (0.843659383776)*x[1]**o + (0.227065059637)*x[1] + (-0.675246827497)*x[2]**o + (0.741119349799)*x[2]
            ref[(3,)]=-0.436948239598*(1+2.*(dim-1)/(o+1.)) + (0.633962904791)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.304596106489*x[0]**o + (-0.771473087764)*x[0] + (-0.114757438931)*x[1]**o + (-0.649225592877)*x[1]
            ref[(0, 0)]=0.189838667558*(1+2.*(dim-1)/(o+1.)) + (-1.42069868064)*dim
            arg[(0, 1)]=-0.929693078433*x[0]**o + (-0.315890871873)*x[0] + (-0.151628630903)*x[1]**o + (0.834287075559)*x[1]
            ref[(0, 1)]=-1.08132170934*(1+2.*(dim-1)/(o+1.)) + (0.518396203686)*dim
            arg[(0, 2)]=-0.929431311741*x[0]**o + (0.23252853819)*x[0] + (0.0309823517674)*x[1]**o + (0.858708581441)*x[1]
            ref[(0, 2)]=-0.898448959973*(1+2.*(dim-1)/(o+1.)) + (1.09123711963)*dim
            arg[(0, 3)]=0.0311901405125*x[0]**o + (-0.285553835516)*x[0] + (-0.0350923696482)*x[1]**o + (0.499427481694)*x[1]
            ref[(0, 3)]=-0.00390222913565*(1+2.*(dim-1)/(o+1.)) + (0.213873646178)*dim
            arg[(1, 0)]=0.716290279917*x[0]**o + (0.0313686463774)*x[0] + (0.882468846697)*x[1]**o + (-0.837474235311)*x[1]
            ref[(1, 0)]=1.59875912661*(1+2.*(dim-1)/(o+1.)) + (-0.806105588934)*dim
            arg[(1, 1)]=-0.640005275231*x[0]**o + (-0.987076291832)*x[0] + (-0.00782799639444)*x[1]**o + (-0.191891002363)*x[1]
            ref[(1, 1)]=-0.647833271626*(1+2.*(dim-1)/(o+1.)) + (-1.17896729419)*dim
            arg[(1, 2)]=0.411919829989*x[0]**o + (-0.375065120942)*x[0] + (-0.215463138055)*x[1]**o + (0.567275348714)*x[1]
            ref[(1, 2)]=0.196456691934*(1+2.*(dim-1)/(o+1.)) + (0.192210227773)*dim
            arg[(1, 3)]=-0.997900074899*x[0]**o + (0.912377722435)*x[0] + (0.623996418093)*x[1]**o + (-0.599245588248)*x[1]
            ref[(1, 3)]=-0.373903656807*(1+2.*(dim-1)/(o+1.)) + (0.313132134187)*dim
        else:
            arg[(0, 0)]=0.292106711837*x[0]**o + (-0.413475310848)*x[0] + (0.751548322435)*x[1]**o + (0.957473758595)*x[1] + (-0.28732833101)*x[2]**o + (-0.463935823016)*x[2]
            ref[(0, 0)]=0.756326703263*(1+2.*(dim-1)/(o+1.)) + (0.0800626247308)*dim
            arg[(0, 1)]=-0.113828913155*x[0]**o + (0.675944244194)*x[0] + (-0.117260750334)*x[1]**o + (-0.799646636474)*x[1] + (0.0337156877283)*x[2]**o + (-0.866205429319)*x[2]
            ref[(0, 1)]=-0.19737397576*(1+2.*(dim-1)/(o+1.)) + (-0.989907821599)*dim
            arg[(0, 2)]=-0.746310286303*x[0]**o + (0.0109208255018)*x[0] + (0.0202594259911)*x[1]**o + (-0.291648074522)*x[1] + (0.0696456797056)*x[2]**o + (0.792985163701)*x[2]
            ref[(0, 2)]=-0.656405180606*(1+2.*(dim-1)/(o+1.)) + (0.512257914681)*dim
            arg[(0, 3)]=-0.976159393448*x[0]**o + (0.850292000681)*x[0] + (-0.893071486537)*x[1]**o + (0.661516879112)*x[1] + (-0.516197177262)*x[2]**o + (0.423470493177)*x[2]
            ref[(0, 3)]=-2.38542805725*(1+2.*(dim-1)/(o+1.)) + (1.93527937297)*dim
            arg[(1, 0)]=-0.600498802388*x[0]**o + (0.985540473379)*x[0] + (0.756424482556)*x[1]**o + (0.703272032833)*x[1] + (-0.332654073337)*x[2]**o + (-0.0981179929931)*x[2]
            ref[(1, 0)]=-0.17672839317*(1+2.*(dim-1)/(o+1.)) + (1.59069451322)*dim
            arg[(1, 1)]=-0.409423449737*x[0]**o + (0.56640479441)*x[0] + (-0.669816081925)*x[1]**o + (-0.748262693833)*x[1] + (-0.516678426444)*x[2]**o + (0.626989197078)*x[2]
            ref[(1, 1)]=-1.59591795811*(1+2.*(dim-1)/(o+1.)) + (0.445131297655)*dim
            arg[(1, 2)]=-0.901292639307*x[0]**o + (-0.327575234956)*x[0] + (-0.559793944719)*x[1]**o + (0.887318928442)*x[1] + (-0.927249043839)*x[2]**o + (-0.00860809191367)*x[2]
            ref[(1, 2)]=-2.38833562786*(1+2.*(dim-1)/(o+1.)) + (0.551135601572)*dim
            arg[(1, 3)]=-0.83167490542*x[0]**o + (0.978742162591)*x[0] + (0.578250747954)*x[1]**o + (-0.145579056094)*x[1] + (0.509653074506)*x[2]**o + (0.113731631456)*x[2]
            ref[(1, 3)]=0.25622891704*(1+2.*(dim-1)/(o+1.)) + (0.946894737953)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref=numpy.zeros((4, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.325385107513*x[0]**o + (0.746797655017)*x[0] + (-0.204979651647)*x[1]**o + (0.426922886319)*x[1]
            ref[(0, 0, 0)]=-0.530364759159*(1+2.*(dim-1)/(o+1.)) + (1.17372054134)*dim
            arg[(0, 0, 1)]=0.909602129371*x[0]**o + (-0.133400607301)*x[0] + (0.308734194865)*x[1]**o + (-0.640665491997)*x[1]
            ref[(0, 0, 1)]=1.21833632424*(1+2.*(dim-1)/(o+1.)) + (-0.774066099298)*dim
            arg[(0, 0, 2)]=0.669206233806*x[0]**o + (-0.611617967816)*x[0] + (-0.764839340257)*x[1]**o + (0.55834962863)*x[1]
            ref[(0, 0, 2)]=-0.0956331064508*(1+2.*(dim-1)/(o+1.)) + (-0.0532683391856)*dim
            arg[(0, 0, 3)]=-0.962488309974*x[0]**o + (-0.276854259934)*x[0] + (-0.423391558218)*x[1]**o + (-0.55597834678)*x[1]
            ref[(0, 0, 3)]=-1.38587986819*(1+2.*(dim-1)/(o+1.)) + (-0.832832606714)*dim
            arg[(0, 1, 0)]=-0.491855420142*x[0]**o + (0.57189145238)*x[0] + (-0.353538644813)*x[1]**o + (-0.131849335218)*x[1]
            ref[(0, 1, 0)]=-0.845394064955*(1+2.*(dim-1)/(o+1.)) + (0.440042117163)*dim
            arg[(0, 1, 1)]=-0.258950074033*x[0]**o + (0.619717501103)*x[0] + (-0.229492217305)*x[1]**o + (-0.430010049888)*x[1]
            ref[(0, 1, 1)]=-0.488442291338*(1+2.*(dim-1)/(o+1.)) + (0.189707451215)*dim
            arg[(0, 1, 2)]=0.0398866642786*x[0]**o + (-0.498059202193)*x[0] + (0.360113249141)*x[1]**o + (0.585806217739)*x[1]
            ref[(0, 1, 2)]=0.39999991342*(1+2.*(dim-1)/(o+1.)) + (0.0877470155461)*dim
            arg[(0, 1, 3)]=0.693780855111*x[0]**o + (-0.210103516712)*x[0] + (0.127329012159)*x[1]**o + (0.156304332925)*x[1]
            ref[(0, 1, 3)]=0.82110986727*(1+2.*(dim-1)/(o+1.)) + (-0.0537991837872)*dim
            arg[(1, 0, 0)]=-0.211041203473*x[0]**o + (0.0769592520998)*x[0] + (0.575198312381)*x[1]**o + (-0.770248264145)*x[1]
            ref[(1, 0, 0)]=0.364157108908*(1+2.*(dim-1)/(o+1.)) + (-0.693289012045)*dim
            arg[(1, 0, 1)]=0.454398462377*x[0]**o + (0.716239673573)*x[0] + (0.385622539758)*x[1]**o + (0.133569651628)*x[1]
            ref[(1, 0, 1)]=0.840021002135*(1+2.*(dim-1)/(o+1.)) + (0.849809325201)*dim
            arg[(1, 0, 2)]=-0.528181585176*x[0]**o + (-0.84792205334)*x[0] + (0.979698556047)*x[1]**o + (0.369339543494)*x[1]
            ref[(1, 0, 2)]=0.451516970871*(1+2.*(dim-1)/(o+1.)) + (-0.478582509845)*dim
            arg[(1, 0, 3)]=0.920379212505*x[0]**o + (-0.193526465368)*x[0] + (0.24147120389)*x[1]**o + (0.901211382985)*x[1]
            ref[(1, 0, 3)]=1.1618504164*(1+2.*(dim-1)/(o+1.)) + (0.707684917617)*dim
            arg[(1, 1, 0)]=-0.419024404194*x[0]**o + (-0.496711837516)*x[0] + (0.789765324706)*x[1]**o + (-0.162162029503)*x[1]
            ref[(1, 1, 0)]=0.370740920512*(1+2.*(dim-1)/(o+1.)) + (-0.658873867019)*dim
            arg[(1, 1, 1)]=0.744928932678*x[0]**o + (-0.499321455524)*x[0] + (-0.744698586971)*x[1]**o + (0.0490209188378)*x[1]
            ref[(1, 1, 1)]=0.000230345706934*(1+2.*(dim-1)/(o+1.)) + (-0.450300536686)*dim
            arg[(1, 1, 2)]=0.446459221968*x[0]**o + (0.461883834585)*x[0] + (0.662483106701)*x[1]**o + (0.993684218522)*x[1]
            ref[(1, 1, 2)]=1.10894232867*(1+2.*(dim-1)/(o+1.)) + (1.45556805311)*dim
            arg[(1, 1, 3)]=0.378187767621*x[0]**o + (0.830677488689)*x[0] + (0.429374086417)*x[1]**o + (0.626887791885)*x[1]
            ref[(1, 1, 3)]=0.807561854038*(1+2.*(dim-1)/(o+1.)) + (1.45756528057)*dim
            arg[(2, 0, 0)]=0.921779606886*x[0]**o + (0.862452320592)*x[0] + (-0.518152539383)*x[1]**o + (0.423666498441)*x[1]
            ref[(2, 0, 0)]=0.403627067503*(1+2.*(dim-1)/(o+1.)) + (1.28611881903)*dim
            arg[(2, 0, 1)]=0.820227707775*x[0]**o + (0.722307731642)*x[0] + (-0.313882589942)*x[1]**o + (-0.680432133836)*x[1]
            ref[(2, 0, 1)]=0.506345117833*(1+2.*(dim-1)/(o+1.)) + (0.0418755978064)*dim
            arg[(2, 0, 2)]=-0.0246790028213*x[0]**o + (0.101476620345)*x[0] + (-0.454112041925)*x[1]**o + (-0.918668232514)*x[1]
            ref[(2, 0, 2)]=-0.478791044746*(1+2.*(dim-1)/(o+1.)) + (-0.817191612169)*dim
            arg[(2, 0, 3)]=0.147709199666*x[0]**o + (0.526008519306)*x[0] + (0.321088776829)*x[1]**o + (-0.981276286714)*x[1]
            ref[(2, 0, 3)]=0.468797976495*(1+2.*(dim-1)/(o+1.)) + (-0.455267767408)*dim
            arg[(2, 1, 0)]=-0.0570658142806*x[0]**o + (-0.0343697471482)*x[0] + (-0.736575595194)*x[1]**o + (0.309519208312)*x[1]
            ref[(2, 1, 0)]=-0.793641409475*(1+2.*(dim-1)/(o+1.)) + (0.275149461164)*dim
            arg[(2, 1, 1)]=-0.154049876001*x[0]**o + (0.731010458551)*x[0] + (0.934898297037)*x[1]**o + (-0.969844513412)*x[1]
            ref[(2, 1, 1)]=0.780848421035*(1+2.*(dim-1)/(o+1.)) + (-0.238834054861)*dim
            arg[(2, 1, 2)]=-0.784372983998*x[0]**o + (-0.643726187156)*x[0] + (0.575959556133)*x[1]**o + (-0.951135342553)*x[1]
            ref[(2, 1, 2)]=-0.208413427865*(1+2.*(dim-1)/(o+1.)) + (-1.59486152971)*dim
            arg[(2, 1, 3)]=0.641772476398*x[0]**o + (0.958671065286)*x[0] + (-0.701584149455)*x[1]**o + (0.748669058555)*x[1]
            ref[(2, 1, 3)]=-0.0598116730569*(1+2.*(dim-1)/(o+1.)) + (1.70734012384)*dim
            arg[(3, 0, 0)]=-0.0471633014379*x[0]**o + (0.166296302411)*x[0] + (0.935295318052)*x[1]**o + (-0.509280141057)*x[1]
            ref[(3, 0, 0)]=0.888132016614*(1+2.*(dim-1)/(o+1.)) + (-0.342983838646)*dim
            arg[(3, 0, 1)]=-0.807341133134*x[0]**o + (-0.35628340475)*x[0] + (0.0483291976782)*x[1]**o + (0.38914517257)*x[1]
            ref[(3, 0, 1)]=-0.759011935456*(1+2.*(dim-1)/(o+1.)) + (0.0328617678199)*dim
            arg[(3, 0, 2)]=-0.750015394512*x[0]**o + (0.305272940267)*x[0] + (0.049282572013)*x[1]**o + (0.0769998117616)*x[1]
            ref[(3, 0, 2)]=-0.700732822499*(1+2.*(dim-1)/(o+1.)) + (0.382272752029)*dim
            arg[(3, 0, 3)]=0.650893370234*x[0]**o + (-0.702884929756)*x[0] + (-0.921054297888)*x[1]**o + (0.0300784783234)*x[1]
            ref[(3, 0, 3)]=-0.270160927654*(1+2.*(dim-1)/(o+1.)) + (-0.672806451433)*dim
            arg[(3, 1, 0)]=-0.803859656637*x[0]**o + (0.260055046164)*x[0] + (-0.793239508017)*x[1]**o + (0.628856563562)*x[1]
            ref[(3, 1, 0)]=-1.59709916465*(1+2.*(dim-1)/(o+1.)) + (0.888911609726)*dim
            arg[(3, 1, 1)]=0.241357519022*x[0]**o + (-0.56707160347)*x[0] + (0.622187332861)*x[1]**o + (-0.458635625188)*x[1]
            ref[(3, 1, 1)]=0.863544851883*(1+2.*(dim-1)/(o+1.)) + (-1.02570722866)*dim
            arg[(3, 1, 2)]=-0.600201064457*x[0]**o + (-0.394921454832)*x[0] + (-0.950309759131)*x[1]**o + (0.0483906007009)*x[1]
            ref[(3, 1, 2)]=-1.55051082359*(1+2.*(dim-1)/(o+1.)) + (-0.346530854132)*dim
            arg[(3, 1, 3)]=0.935248785706*x[0]**o + (-0.724822560859)*x[0] + (-0.3669585053)*x[1]**o + (-0.974203380179)*x[1]
            ref[(3, 1, 3)]=0.568290280406*(1+2.*(dim-1)/(o+1.)) + (-1.69902594104)*dim
        else:
            arg[(0, 0, 0)]=0.562670323096*x[0]**o + (0.269008677985)*x[0] + (-0.134002823449)*x[1]**o + (-0.473863069316)*x[1] + (-0.416827771992)*x[2]**o + (0.545245163806)*x[2]
            ref[(0, 0, 0)]=0.011839727655*(1+2.*(dim-1)/(o+1.)) + (0.340390772475)*dim
            arg[(0, 0, 1)]=0.0922178530777*x[0]**o + (-0.351573216675)*x[0] + (0.562978661287)*x[1]**o + (-0.9969146782)*x[1] + (0.316891867448)*x[2]**o + (-0.564529884287)*x[2]
            ref[(0, 0, 1)]=0.972088381812*(1+2.*(dim-1)/(o+1.)) + (-1.91301777916)*dim
            arg[(0, 0, 2)]=0.962813440679*x[0]**o + (0.914752044584)*x[0] + (-0.207639320382)*x[1]**o + (0.755993575238)*x[1] + (-0.760200229837)*x[2]**o + (-0.993359914831)*x[2]
            ref[(0, 0, 2)]=-0.00502610953904*(1+2.*(dim-1)/(o+1.)) + (0.677385704991)*dim
            arg[(0, 0, 3)]=-0.493335412366*x[0]**o + (-0.279301564875)*x[0] + (-0.823629043263)*x[1]**o + (0.648490050966)*x[1] + (0.76667718176)*x[2]**o + (-0.455126236023)*x[2]
            ref[(0, 0, 3)]=-0.550287273869*(1+2.*(dim-1)/(o+1.)) + (-0.0859377499315)*dim
            arg[(0, 1, 0)]=-0.077520414458*x[0]**o + (-0.228456721859)*x[0] + (-0.0567333199564)*x[1]**o + (0.592561156441)*x[1] + (-0.605648871711)*x[2]**o + (-0.283048262085)*x[2]
            ref[(0, 1, 0)]=-0.739902606125*(1+2.*(dim-1)/(o+1.)) + (0.0810561724976)*dim
            arg[(0, 1, 1)]=0.194139371303*x[0]**o + (0.993696145623)*x[0] + (-0.775167473974)*x[1]**o + (0.0460232223747)*x[1] + (0.885548119224)*x[2]**o + (-0.539869261262)*x[2]
            ref[(0, 1, 1)]=0.304520016554*(1+2.*(dim-1)/(o+1.)) + (0.499850106735)*dim
            arg[(0, 1, 2)]=-0.150869025228*x[0]**o + (0.709723692679)*x[0] + (-0.58619664183)*x[1]**o + (0.794678989562)*x[1] + (-0.788297429217)*x[2]**o + (-0.58071733323)*x[2]
            ref[(0, 1, 2)]=-1.52536309627*(1+2.*(dim-1)/(o+1.)) + (0.923685349011)*dim
            arg[(0, 1, 3)]=-0.438210832206*x[0]**o + (0.515512122985)*x[0] + (0.0866541989507)*x[1]**o + (-0.922318738257)*x[1] + (0.124831632414)*x[2]**o + (-0.277162093778)*x[2]
            ref[(0, 1, 3)]=-0.226725000841*(1+2.*(dim-1)/(o+1.)) + (-0.68396870905)*dim
            arg[(1, 0, 0)]=-0.623071056662*x[0]**o + (0.101717438959)*x[0] + (0.18872607046)*x[1]**o + (-0.167354985987)*x[1] + (-0.752529993697)*x[2]**o + (-0.906960060663)*x[2]
            ref[(1, 0, 0)]=-1.1868749799*(1+2.*(dim-1)/(o+1.)) + (-0.972597607691)*dim
            arg[(1, 0, 1)]=0.160419721337*x[0]**o + (0.930565787622)*x[0] + (-0.181674825913)*x[1]**o + (0.523401591315)*x[1] + (-0.310314619436)*x[2]**o + (0.731236636731)*x[2]
            ref[(1, 0, 1)]=-0.331569724012*(1+2.*(dim-1)/(o+1.)) + (2.18520401567)*dim
            arg[(1, 0, 2)]=0.409086967956*x[0]**o + (-0.354667041904)*x[0] + (-0.90125214689)*x[1]**o + (-0.69020461551)*x[1] + (-0.525287849435)*x[2]**o + (0.742078663044)*x[2]
            ref[(1, 0, 2)]=-1.01745302837*(1+2.*(dim-1)/(o+1.)) + (-0.30279299437)*dim
            arg[(1, 0, 3)]=0.00458129700174*x[0]**o + (0.00288092185701)*x[0] + (0.702459196798)*x[1]**o + (0.00753286559551)*x[1] + (-0.984485862606)*x[2]**o + (-0.836068293058)*x[2]
            ref[(1, 0, 3)]=-0.277445368806*(1+2.*(dim-1)/(o+1.)) + (-0.825654505605)*dim
            arg[(1, 1, 0)]=-0.767630434246*x[0]**o + (-0.892726946512)*x[0] + (0.914312063716)*x[1]**o + (0.645383915836)*x[1] + (0.383071534231)*x[2]**o + (0.861885167248)*x[2]
            ref[(1, 1, 0)]=0.529753163702*(1+2.*(dim-1)/(o+1.)) + (0.614542136572)*dim
            arg[(1, 1, 1)]=-0.755311251586*x[0]**o + (-0.887114170549)*x[0] + (-0.130152889025)*x[1]**o + (0.150039227647)*x[1] + (-0.368120260715)*x[2]**o + (-0.22664277893)*x[2]
            ref[(1, 1, 1)]=-1.25358440133*(1+2.*(dim-1)/(o+1.)) + (-0.963717721832)*dim
            arg[(1, 1, 2)]=-0.916789304809*x[0]**o + (0.289830421625)*x[0] + (0.719393785198)*x[1]**o + (-0.494495956671)*x[1] + (0.734554887568)*x[2]**o + (-0.181712960582)*x[2]
            ref[(1, 1, 2)]=0.537159367957*(1+2.*(dim-1)/(o+1.)) + (-0.386378495627)*dim
            arg[(1, 1, 3)]=0.694871555363*x[0]**o + (0.5572252388)*x[0] + (0.194249647755)*x[1]**o + (-0.323670931105)*x[1] + (-0.127810201186)*x[2]**o + (-0.807895712777)*x[2]
            ref[(1, 1, 3)]=0.761311001931*(1+2.*(dim-1)/(o+1.)) + (-0.574341405082)*dim
            arg[(2, 0, 0)]=-0.202505599975*x[0]**o + (0.68263570912)*x[0] + (0.169330466682)*x[1]**o + (-0.32053183552)*x[1] + (0.999651242245)*x[2]**o + (-0.618321263668)*x[2]
            ref[(2, 0, 0)]=0.966476108951*(1+2.*(dim-1)/(o+1.)) + (-0.256217390068)*dim
            arg[(2, 0, 1)]=0.953082144567*x[0]**o + (0.627723291803)*x[0] + (-0.727497549505)*x[1]**o + (0.607959871236)*x[1] + (0.162738511021)*x[2]**o + (-0.629903603317)*x[2]
            ref[(2, 0, 1)]=0.388323106082*(1+2.*(dim-1)/(o+1.)) + (0.605779559722)*dim
            arg[(2, 0, 2)]=-0.937028269552*x[0]**o + (-0.707749494035)*x[0] + (0.842202826652)*x[1]**o + (-0.637394717557)*x[1] + (0.0402917938617)*x[2]**o + (0.909084932036)*x[2]
            ref[(2, 0, 2)]=-0.0545336490385*(1+2.*(dim-1)/(o+1.)) + (-0.436059279557)*dim
            arg[(2, 0, 3)]=0.180147987016*x[0]**o + (-0.34258949075)*x[0] + (0.890670695456)*x[1]**o + (-0.0329038526186)*x[1] + (-0.696386054679)*x[2]**o + (-0.952820727808)*x[2]
            ref[(2, 0, 3)]=0.374432627793*(1+2.*(dim-1)/(o+1.)) + (-1.32831407118)*dim
            arg[(2, 1, 0)]=-0.969301882656*x[0]**o + (-0.822481641852)*x[0] + (-0.669843808196)*x[1]**o + (-0.61002615863)*x[1] + (-0.0936618420681)*x[2]**o + (0.557835971106)*x[2]
            ref[(2, 1, 0)]=-1.73280753292*(1+2.*(dim-1)/(o+1.)) + (-0.874671829376)*dim
            arg[(2, 1, 1)]=0.894359659535*x[0]**o + (0.227730858811)*x[0] + (0.378493194155)*x[1]**o + (-0.0929612975629)*x[1] + (0.849827260832)*x[2]**o + (-0.498637102743)*x[2]
            ref[(2, 1, 1)]=2.12268011452*(1+2.*(dim-1)/(o+1.)) + (-0.363867541495)*dim
            arg[(2, 1, 2)]=0.69541399586*x[0]**o + (-0.141042218877)*x[0] + (-0.59110597255)*x[1]**o + (-0.0704885124143)*x[1] + (-0.969030559605)*x[2]**o + (-0.615844955425)*x[2]
            ref[(2, 1, 2)]=-0.864722536295*(1+2.*(dim-1)/(o+1.)) + (-0.827375686716)*dim
            arg[(2, 1, 3)]=0.313715465166*x[0]**o + (0.361173884405)*x[0] + (-0.762636781876)*x[1]**o + (0.98279624465)*x[1] + (0.776691336038)*x[2]**o + (-0.47922292849)*x[2]
            ref[(2, 1, 3)]=0.327770019328*(1+2.*(dim-1)/(o+1.)) + (0.864747200565)*dim
            arg[(3, 0, 0)]=-0.222162003433*x[0]**o + (0.501184516378)*x[0] + (0.207666792058)*x[1]**o + (-0.141074904233)*x[1] + (0.941912287601)*x[2]**o + (-0.728478585152)*x[2]
            ref[(3, 0, 0)]=0.927417076225*(1+2.*(dim-1)/(o+1.)) + (-0.368368973007)*dim
            arg[(3, 0, 1)]=-0.75051486905*x[0]**o + (0.0795958881131)*x[0] + (0.913605484636)*x[1]**o + (-0.953869344548)*x[1] + (0.828178770902)*x[2]**o + (-0.891539043765)*x[2]
            ref[(3, 0, 1)]=0.991269386488*(1+2.*(dim-1)/(o+1.)) + (-1.7658125002)*dim
            arg[(3, 0, 2)]=-0.125480871033*x[0]**o + (0.248231740063)*x[0] + (0.747233097543)*x[1]**o + (0.299517907544)*x[1] + (0.232181915797)*x[2]**o + (0.92953223317)*x[2]
            ref[(3, 0, 2)]=0.853934142307*(1+2.*(dim-1)/(o+1.)) + (1.47728188078)*dim
            arg[(3, 0, 3)]=0.0750368101666*x[0]**o + (0.35569732279)*x[0] + (0.464416171878)*x[1]**o + (0.478483555731)*x[1] + (0.516147942577)*x[2]**o + (0.795313365745)*x[2]
            ref[(3, 0, 3)]=1.05560092462*(1+2.*(dim-1)/(o+1.)) + (1.62949424427)*dim
            arg[(3, 1, 0)]=0.274051749748*x[0]**o + (0.674796442559)*x[0] + (-0.392149522673)*x[1]**o + (0.919872119849)*x[1] + (0.403766778259)*x[2]**o + (-0.866688593588)*x[2]
            ref[(3, 1, 0)]=0.285669005334*(1+2.*(dim-1)/(o+1.)) + (0.72797996882)*dim
            arg[(3, 1, 1)]=-0.0805222518306*x[0]**o + (0.551306088674)*x[0] + (0.981784571019)*x[1]**o + (-0.956852924639)*x[1] + (0.869382820005)*x[2]**o + (-0.100729706551)*x[2]
            ref[(3, 1, 1)]=1.77064513919*(1+2.*(dim-1)/(o+1.)) + (-0.506276542516)*dim
            arg[(3, 1, 2)]=-0.535546836781*x[0]**o + (0.317206142969)*x[0] + (-0.117515775764)*x[1]**o + (0.656867956582)*x[1] + (-0.906061631673)*x[2]**o + (-0.760537029869)*x[2]
            ref[(3, 1, 2)]=-1.55912424422*(1+2.*(dim-1)/(o+1.)) + (0.213537069682)*dim
            arg[(3, 1, 3)]=0.60645330128*x[0]**o + (-0.574937542221)*x[0] + (0.78007146532)*x[1]**o + (0.199643327581)*x[1] + (0.447906490042)*x[2]**o + (0.937303031813)*x[2]
            ref[(3, 1, 3)]=1.83443125664*(1+2.*(dim-1)/(o+1.)) + (0.562008817174)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnBoundary_fromData_FunctionOnBoundary_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnBoundary

        assumptions: FunctionOnBoundary(self.domain) exists
                     self.domain supports integral on FunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnBoundary(self.domain)
        w = FunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4, 2),w)
        ref=numpy.zeros((2, 2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.0205097804485*x[0]**o + (-0.435005286542)*x[0] + (0.790458717467)*x[1]**o + (-0.811592811395)*x[1]
            ref[(0, 0, 0, 0)]=0.769948937019*(1+2.*(dim-1)/(o+1.)) + (-1.24659809794)*dim
            arg[(0, 0, 0, 1)]=-0.591056543602*x[0]**o + (-0.53357021464)*x[0] + (-0.730942667807)*x[1]**o + (-0.29495921681)*x[1]
            ref[(0, 0, 0, 1)]=-1.32199921141*(1+2.*(dim-1)/(o+1.)) + (-0.828529431449)*dim
            arg[(0, 0, 1, 0)]=0.999525528064*x[0]**o + (0.427371387684)*x[0] + (-0.354563508941)*x[1]**o + (0.0837906156115)*x[1]
            ref[(0, 0, 1, 0)]=0.644962019124*(1+2.*(dim-1)/(o+1.)) + (0.511162003296)*dim
            arg[(0, 0, 1, 1)]=-0.109025930209*x[0]**o + (-0.850778458681)*x[0] + (-0.987285812931)*x[1]**o + (0.308846741759)*x[1]
            ref[(0, 0, 1, 1)]=-1.09631174314*(1+2.*(dim-1)/(o+1.)) + (-0.541931716922)*dim
            arg[(0, 0, 2, 0)]=0.759704587638*x[0]**o + (0.15255271126)*x[0] + (-0.859638486142)*x[1]**o + (0.214054178428)*x[1]
            ref[(0, 0, 2, 0)]=-0.0999338985046*(1+2.*(dim-1)/(o+1.)) + (0.366606889688)*dim
            arg[(0, 0, 2, 1)]=-0.513998869011*x[0]**o + (0.812141375609)*x[0] + (-0.780994830195)*x[1]**o + (-0.540233117229)*x[1]
            ref[(0, 0, 2, 1)]=-1.29499369921*(1+2.*(dim-1)/(o+1.)) + (0.27190825838)*dim
            arg[(0, 0, 3, 0)]=0.978157861565*x[0]**o + (0.884604432424)*x[0] + (-0.848350928456)*x[1]**o + (-0.652237266949)*x[1]
            ref[(0, 0, 3, 0)]=0.129806933109*(1+2.*(dim-1)/(o+1.)) + (0.232367165475)*dim
            arg[(0, 0, 3, 1)]=-0.301407008686*x[0]**o + (0.105596877907)*x[0] + (-0.984442877518)*x[1]**o + (0.394495948655)*x[1]
            ref[(0, 0, 3, 1)]=-1.2858498862*(1+2.*(dim-1)/(o+1.)) + (0.500092826563)*dim
            arg[(0, 1, 0, 0)]=0.604938497137*x[0]**o + (0.883974671024)*x[0] + (0.612727143059)*x[1]**o + (-0.8174463839)*x[1]
            ref[(0, 1, 0, 0)]=1.2176656402*(1+2.*(dim-1)/(o+1.)) + (0.0665282871233)*dim
            arg[(0, 1, 0, 1)]=0.746045434606*x[0]**o + (-0.31131428267)*x[0] + (0.890397688317)*x[1]**o + (0.66467185946)*x[1]
            ref[(0, 1, 0, 1)]=1.63644312292*(1+2.*(dim-1)/(o+1.)) + (0.35335757679)*dim
            arg[(0, 1, 1, 0)]=0.554073097036*x[0]**o + (-0.290411427434)*x[0] + (0.655081770216)*x[1]**o + (-0.555597495123)*x[1]
            ref[(0, 1, 1, 0)]=1.20915486725*(1+2.*(dim-1)/(o+1.)) + (-0.846008922558)*dim
            arg[(0, 1, 1, 1)]=-0.152858948112*x[0]**o + (-0.822209291868)*x[0] + (0.517528106861)*x[1]**o + (0.678106066905)*x[1]
            ref[(0, 1, 1, 1)]=0.364669158749*(1+2.*(dim-1)/(o+1.)) + (-0.144103224964)*dim
            arg[(0, 1, 2, 0)]=0.325643781015*x[0]**o + (0.278971273178)*x[0] + (0.377229952917)*x[1]**o + (-0.216854202115)*x[1]
            ref[(0, 1, 2, 0)]=0.702873733933*(1+2.*(dim-1)/(o+1.)) + (0.0621170710634)*dim
            arg[(0, 1, 2, 1)]=-0.0527342194332*x[0]**o + (-0.699774531128)*x[0] + (-0.352144388619)*x[1]**o + (0.624724505186)*x[1]
            ref[(0, 1, 2, 1)]=-0.404878608052*(1+2.*(dim-1)/(o+1.)) + (-0.0750500259419)*dim
            arg[(0, 1, 3, 0)]=0.968843850435*x[0]**o + (0.632215191841)*x[0] + (-0.213311943624)*x[1]**o + (-0.517194926043)*x[1]
            ref[(0, 1, 3, 0)]=0.755531906811*(1+2.*(dim-1)/(o+1.)) + (0.115020265798)*dim
            arg[(0, 1, 3, 1)]=-0.224330526166*x[0]**o + (0.366895165955)*x[0] + (0.681369994615)*x[1]**o + (-0.547167185593)*x[1]
            ref[(0, 1, 3, 1)]=0.457039468449*(1+2.*(dim-1)/(o+1.)) + (-0.180272019638)*dim
            arg[(1, 0, 0, 0)]=0.0784223315974*x[0]**o + (0.223261263943)*x[0] + (-0.0280286276776)*x[1]**o + (0.699107649832)*x[1]
            ref[(1, 0, 0, 0)]=0.0503937039198*(1+2.*(dim-1)/(o+1.)) + (0.922368913775)*dim
            arg[(1, 0, 0, 1)]=-0.315871409573*x[0]**o + (-0.298691846966)*x[0] + (-0.796977022588)*x[1]**o + (0.861413116552)*x[1]
            ref[(1, 0, 0, 1)]=-1.11284843216*(1+2.*(dim-1)/(o+1.)) + (0.562721269586)*dim
            arg[(1, 0, 1, 0)]=-0.0628896157078*x[0]**o + (0.511736274096)*x[0] + (0.511263183361)*x[1]**o + (0.709359149132)*x[1]
            ref[(1, 0, 1, 0)]=0.448373567654*(1+2.*(dim-1)/(o+1.)) + (1.22109542323)*dim
            arg[(1, 0, 1, 1)]=-0.91837686061*x[0]**o + (-0.373863508948)*x[0] + (-0.227925253312)*x[1]**o + (0.102084740251)*x[1]
            ref[(1, 0, 1, 1)]=-1.14630211392*(1+2.*(dim-1)/(o+1.)) + (-0.271778768698)*dim
            arg[(1, 0, 2, 0)]=-0.820926849224*x[0]**o + (0.18485982256)*x[0] + (-0.732290446978)*x[1]**o + (-0.492668931623)*x[1]
            ref[(1, 0, 2, 0)]=-1.5532172962*(1+2.*(dim-1)/(o+1.)) + (-0.307809109063)*dim
            arg[(1, 0, 2, 1)]=-0.48968334643*x[0]**o + (-0.830977704496)*x[0] + (0.954409623233)*x[1]**o + (0.169787369123)*x[1]
            ref[(1, 0, 2, 1)]=0.464726276803*(1+2.*(dim-1)/(o+1.)) + (-0.661190335373)*dim
            arg[(1, 0, 3, 0)]=-0.708560085873*x[0]**o + (-0.021190958967)*x[0] + (-0.188549499023)*x[1]**o + (0.512349871153)*x[1]
            ref[(1, 0, 3, 0)]=-0.897109584895*(1+2.*(dim-1)/(o+1.)) + (0.491158912186)*dim
            arg[(1, 0, 3, 1)]=0.789324682712*x[0]**o + (-0.984323374401)*x[0] + (-0.467804908667)*x[1]**o + (0.0518839055206)*x[1]
            ref[(1, 0, 3, 1)]=0.321519774045*(1+2.*(dim-1)/(o+1.)) + (-0.93243946888)*dim
            arg[(1, 1, 0, 0)]=-0.926285874178*x[0]**o + (-0.0770811350074)*x[0] + (-0.45050188523)*x[1]**o + (-0.338990847915)*x[1]
            ref[(1, 1, 0, 0)]=-1.37678775941*(1+2.*(dim-1)/(o+1.)) + (-0.416071982923)*dim
            arg[(1, 1, 0, 1)]=-0.481613762075*x[0]**o + (-0.983823070323)*x[0] + (-0.669016396537)*x[1]**o + (0.558115494067)*x[1]
            ref[(1, 1, 0, 1)]=-1.15063015861*(1+2.*(dim-1)/(o+1.)) + (-0.425707576257)*dim
            arg[(1, 1, 1, 0)]=0.469266308259*x[0]**o + (-0.995673674058)*x[0] + (-0.011681994987)*x[1]**o + (0.0828626593392)*x[1]
            ref[(1, 1, 1, 0)]=0.457584313272*(1+2.*(dim-1)/(o+1.)) + (-0.912811014719)*dim
            arg[(1, 1, 1, 1)]=0.0695972746607*x[0]**o + (-0.066275959)*x[0] + (0.626550307396)*x[1]**o + (0.550653459434)*x[1]
            ref[(1, 1, 1, 1)]=0.696147582057*(1+2.*(dim-1)/(o+1.)) + (0.484377500434)*dim
            arg[(1, 1, 2, 0)]=-0.0620192433736*x[0]**o + (-0.727069314447)*x[0] + (-0.290571587559)*x[1]**o + (0.248877619576)*x[1]
            ref[(1, 1, 2, 0)]=-0.352590830932*(1+2.*(dim-1)/(o+1.)) + (-0.478191694872)*dim
            arg[(1, 1, 2, 1)]=0.779600148436*x[0]**o + (0.899865305113)*x[0] + (-0.843434177036)*x[1]**o + (-0.52532962968)*x[1]
            ref[(1, 1, 2, 1)]=-0.0638340286006*(1+2.*(dim-1)/(o+1.)) + (0.374535675433)*dim
            arg[(1, 1, 3, 0)]=-0.25862981833*x[0]**o + (-0.880408748736)*x[0] + (-0.762188761198)*x[1]**o + (0.398137899459)*x[1]
            ref[(1, 1, 3, 0)]=-1.02081857953*(1+2.*(dim-1)/(o+1.)) + (-0.482270849277)*dim
            arg[(1, 1, 3, 1)]=-0.983671551008*x[0]**o + (-0.702263444875)*x[0] + (0.260680367673)*x[1]**o + (0.453469271097)*x[1]
            ref[(1, 1, 3, 1)]=-0.722991183335*(1+2.*(dim-1)/(o+1.)) + (-0.248794173778)*dim
        else:
            arg[(0, 0, 0, 0)]=0.750580351096*x[0]**o + (-0.472646168695)*x[0] + (-0.743882404212)*x[1]**o + (0.974714093446)*x[1] + (0.117269580643)*x[2]**o + (-0.288875397689)*x[2]
            ref[(0, 0, 0, 0)]=0.123967527527*(1+2.*(dim-1)/(o+1.)) + (0.213192527063)*dim
            arg[(0, 0, 0, 1)]=-0.689178312727*x[0]**o + (0.916863704788)*x[0] + (0.0902376016549)*x[1]**o + (0.25186945903)*x[1] + (-0.130098602683)*x[2]**o + (-0.312760312048)*x[2]
            ref[(0, 0, 0, 1)]=-0.729039313756*(1+2.*(dim-1)/(o+1.)) + (0.85597285177)*dim
            arg[(0, 0, 1, 0)]=-0.0441774054829*x[0]**o + (-0.800040486293)*x[0] + (0.0476014729365)*x[1]**o + (-0.63392528509)*x[1] + (-0.0438835015857)*x[2]**o + (-0.802693993253)*x[2]
            ref[(0, 0, 1, 0)]=-0.040459434132*(1+2.*(dim-1)/(o+1.)) + (-2.23665976464)*dim
            arg[(0, 0, 1, 1)]=0.0705122121745*x[0]**o + (0.784103238764)*x[0] + (0.321647889992)*x[1]**o + (-0.189075172081)*x[1] + (-0.139001601035)*x[2]**o + (-0.428130184618)*x[2]
            ref[(0, 0, 1, 1)]=0.253158501131*(1+2.*(dim-1)/(o+1.)) + (0.166897882065)*dim
            arg[(0, 0, 2, 0)]=0.274321634088*x[0]**o + (-0.534126424551)*x[0] + (0.193472338674)*x[1]**o + (0.733487747719)*x[1] + (0.17444521249)*x[2]**o + (0.853957180853)*x[2]
            ref[(0, 0, 2, 0)]=0.642239185251*(1+2.*(dim-1)/(o+1.)) + (1.05331850402)*dim
            arg[(0, 0, 2, 1)]=0.74454399464*x[0]**o + (0.151537873685)*x[0] + (-0.699628932164)*x[1]**o + (-0.395529428349)*x[1] + (0.569128961008)*x[2]**o + (0.608519382326)*x[2]
            ref[(0, 0, 2, 1)]=0.614044023484*(1+2.*(dim-1)/(o+1.)) + (0.364527827661)*dim
            arg[(0, 0, 3, 0)]=0.0383906969288*x[0]**o + (-0.0747094252714)*x[0] + (-0.242640008415)*x[1]**o + (-0.605893347186)*x[1] + (0.507714640578)*x[2]**o + (0.654105263699)*x[2]
            ref[(0, 0, 3, 0)]=0.303465329092*(1+2.*(dim-1)/(o+1.)) + (-0.0264975087584)*dim
            arg[(0, 0, 3, 1)]=-0.597676497242*x[0]**o + (0.929954084511)*x[0] + (-0.955601004792)*x[1]**o + (0.487369288721)*x[1] + (-0.0969702655104)*x[2]**o + (-0.952242595483)*x[2]
            ref[(0, 0, 3, 1)]=-1.65024776754*(1+2.*(dim-1)/(o+1.)) + (0.465080777749)*dim
            arg[(0, 1, 0, 0)]=-0.746875870302*x[0]**o + (-0.356186757232)*x[0] + (-0.861768296546)*x[1]**o + (0.964417852551)*x[1] + (0.0920757704149)*x[2]**o + (-0.797008109067)*x[2]
            ref[(0, 1, 0, 0)]=-1.51656839643*(1+2.*(dim-1)/(o+1.)) + (-0.188777013748)*dim
            arg[(0, 1, 0, 1)]=-0.761603407692*x[0]**o + (-0.907806053035)*x[0] + (-0.28364059052)*x[1]**o + (0.883636445249)*x[1] + (-0.567400551233)*x[2]**o + (-0.120323629255)*x[2]
            ref[(0, 1, 0, 1)]=-1.61264454945*(1+2.*(dim-1)/(o+1.)) + (-0.14449323704)*dim
            arg[(0, 1, 1, 0)]=-0.733995501393*x[0]**o + (-0.891073009975)*x[0] + (-0.0627949362611)*x[1]**o + (-0.117986895034)*x[1] + (-0.244400369257)*x[2]**o + (0.165674994404)*x[2]
            ref[(0, 1, 1, 0)]=-1.04119080691*(1+2.*(dim-1)/(o+1.)) + (-0.843384910604)*dim
            arg[(0, 1, 1, 1)]=-0.962293849381*x[0]**o + (-0.910375389996)*x[0] + (-0.587599824284)*x[1]**o + (-0.591518533125)*x[1] + (-0.157855263133)*x[2]**o + (0.0686480756743)*x[2]
            ref[(0, 1, 1, 1)]=-1.7077489368*(1+2.*(dim-1)/(o+1.)) + (-1.43324584745)*dim
            arg[(0, 1, 2, 0)]=-0.815096524683*x[0]**o + (-0.167724230539)*x[0] + (-0.85157631525)*x[1]**o + (0.421394175865)*x[1] + (0.503733144825)*x[2]**o + (-0.287072195927)*x[2]
            ref[(0, 1, 2, 0)]=-1.16293969511*(1+2.*(dim-1)/(o+1.)) + (-0.0334022506007)*dim
            arg[(0, 1, 2, 1)]=-0.746953555003*x[0]**o + (-0.29650615358)*x[0] + (-0.305537831987)*x[1]**o + (-0.500929931736)*x[1] + (0.515951173694)*x[2]**o + (0.183665087974)*x[2]
            ref[(0, 1, 2, 1)]=-0.536540213296*(1+2.*(dim-1)/(o+1.)) + (-0.613770997342)*dim
            arg[(0, 1, 3, 0)]=0.165606963762*x[0]**o + (-0.931394440073)*x[0] + (-0.591655390371)*x[1]**o + (0.740449339016)*x[1] + (0.9978370585)*x[2]**o + (-0.214129049302)*x[2]
            ref[(0, 1, 3, 0)]=0.571788631891*(1+2.*(dim-1)/(o+1.)) + (-0.405074150359)*dim
            arg[(0, 1, 3, 1)]=-0.454548957347*x[0]**o + (0.929042890354)*x[0] + (0.75351716504)*x[1]**o + (0.189311914772)*x[1] + (0.771746122407)*x[2]**o + (0.826988122288)*x[2]
            ref[(0, 1, 3, 1)]=1.0707143301*(1+2.*(dim-1)/(o+1.)) + (1.94534292741)*dim
            arg[(1, 0, 0, 0)]=-0.0490770997589*x[0]**o + (0.911604451992)*x[0] + (-0.506287813784)*x[1]**o + (0.103991552204)*x[1] + (0.270678295028)*x[2]**o + (-0.351452491724)*x[2]
            ref[(1, 0, 0, 0)]=-0.284686618515*(1+2.*(dim-1)/(o+1.)) + (0.664143512471)*dim
            arg[(1, 0, 0, 1)]=-0.193435968688*x[0]**o + (0.631207648911)*x[0] + (-0.41117894544)*x[1]**o + (-0.644436080832)*x[1] + (-0.722092836059)*x[2]**o + (0.837784331441)*x[2]
            ref[(1, 0, 0, 1)]=-1.32670775019*(1+2.*(dim-1)/(o+1.)) + (0.824555899521)*dim
            arg[(1, 0, 1, 0)]=0.616716207428*x[0]**o + (-0.495552267206)*x[0] + (-0.682217499621)*x[1]**o + (-0.209139333493)*x[1] + (-0.115201650038)*x[2]**o + (-0.299027344562)*x[2]
            ref[(1, 0, 1, 0)]=-0.180702942231*(1+2.*(dim-1)/(o+1.)) + (-1.00371894526)*dim
            arg[(1, 0, 1, 1)]=0.425689430584*x[0]**o + (-0.57637506168)*x[0] + (-0.459860347866)*x[1]**o + (-0.454735864854)*x[1] + (-0.717963183777)*x[2]**o + (-0.492554307763)*x[2]
            ref[(1, 0, 1, 1)]=-0.752134101059*(1+2.*(dim-1)/(o+1.)) + (-1.5236652343)*dim
            arg[(1, 0, 2, 0)]=0.878953659134*x[0]**o + (-0.772321952951)*x[0] + (-0.362697843135)*x[1]**o + (0.842244729136)*x[1] + (0.571687741457)*x[2]**o + (0.629325061492)*x[2]
            ref[(1, 0, 2, 0)]=1.08794355746*(1+2.*(dim-1)/(o+1.)) + (0.699247837678)*dim
            arg[(1, 0, 2, 1)]=0.999843097178*x[0]**o + (0.919511729146)*x[0] + (-0.774498886902)*x[1]**o + (-0.110419725401)*x[1] + (0.28417814639)*x[2]**o + (0.684398577692)*x[2]
            ref[(1, 0, 2, 1)]=0.509522356667*(1+2.*(dim-1)/(o+1.)) + (1.49349058144)*dim
            arg[(1, 0, 3, 0)]=0.207106451297*x[0]**o + (-0.204381357937)*x[0] + (-0.446316749219)*x[1]**o + (0.0605741854775)*x[1] + (-0.701450594128)*x[2]**o + (0.296270364282)*x[2]
            ref[(1, 0, 3, 0)]=-0.94066089205*(1+2.*(dim-1)/(o+1.)) + (0.152463191822)*dim
            arg[(1, 0, 3, 1)]=-0.290700990459*x[0]**o + (-0.562965962003)*x[0] + (0.477279784076)*x[1]**o + (-0.615425129138)*x[1] + (-0.241699391642)*x[2]**o + (-0.72325630579)*x[2]
            ref[(1, 0, 3, 1)]=-0.0551205980261*(1+2.*(dim-1)/(o+1.)) + (-1.90164739693)*dim
            arg[(1, 1, 0, 0)]=0.63930649453*x[0]**o + (0.346421127845)*x[0] + (0.211124315838)*x[1]**o + (0.68035369809)*x[1] + (-0.861409292195)*x[2]**o + (-0.934387201428)*x[2]
            ref[(1, 1, 0, 0)]=-0.0109784818271*(1+2.*(dim-1)/(o+1.)) + (0.0923876245058)*dim
            arg[(1, 1, 0, 1)]=-0.0162316379455*x[0]**o + (-0.60091495556)*x[0] + (0.297721154386)*x[1]**o + (0.921406457824)*x[1] + (-0.0435092894964)*x[2]**o + (-0.934542560025)*x[2]
            ref[(1, 1, 0, 1)]=0.237980226944*(1+2.*(dim-1)/(o+1.)) + (-0.614051057762)*dim
            arg[(1, 1, 1, 0)]=-0.196105035311*x[0]**o + (0.0766377345017)*x[0] + (-0.936976393376)*x[1]**o + (-0.0891036664187)*x[1] + (-0.294002122706)*x[2]**o + (-0.810815012128)*x[2]
            ref[(1, 1, 1, 0)]=-1.42708355139*(1+2.*(dim-1)/(o+1.)) + (-0.823280944045)*dim
            arg[(1, 1, 1, 1)]=-0.448979793865*x[0]**o + (0.646947345976)*x[0] + (0.668033245946)*x[1]**o + (0.357111915278)*x[1] + (0.934610435209)*x[2]**o + (-0.855632524154)*x[2]
            ref[(1, 1, 1, 1)]=1.15366388729*(1+2.*(dim-1)/(o+1.)) + (0.148426737099)*dim
            arg[(1, 1, 2, 0)]=-0.89646756444*x[0]**o + (0.160542495526)*x[0] + (0.6015134157)*x[1]**o + (-0.279858084423)*x[1] + (-0.365184160054)*x[2]**o + (-0.367831441355)*x[2]
            ref[(1, 1, 2, 0)]=-0.660138308794*(1+2.*(dim-1)/(o+1.)) + (-0.487147030252)*dim
            arg[(1, 1, 2, 1)]=0.681680223366*x[0]**o + (0.0312462685266)*x[0] + (0.432425138783)*x[1]**o + (-0.821176112465)*x[1] + (-0.776198201304)*x[2]**o + (0.456032025192)*x[2]
            ref[(1, 1, 2, 1)]=0.337907160845*(1+2.*(dim-1)/(o+1.)) + (-0.333897818747)*dim
            arg[(1, 1, 3, 0)]=-0.584992643285*x[0]**o + (-0.0207859739174)*x[0] + (-0.0224390046315)*x[1]**o + (-0.262425658974)*x[1] + (0.532614680723)*x[2]**o + (-0.874062815966)*x[2]
            ref[(1, 1, 3, 0)]=-0.0748169671938*(1+2.*(dim-1)/(o+1.)) + (-1.15727444886)*dim
            arg[(1, 1, 3, 1)]=-0.673245443891*x[0]**o + (0.471348634269)*x[0] + (-0.683169264705)*x[1]**o + (0.999282364117)*x[1] + (-0.933101459324)*x[2]**o + (-0.876288181184)*x[2]
            ref[(1, 1, 3, 1)]=-2.28951616792*(1+2.*(dim-1)/(o+1.)) + (0.594342817202)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.0288070574056*x[0]**o + (-0.610182417623)*x[0] + (0.657585058616)*x[1]**o + (-0.530029517197)*x[1]
            ref=0.62877800121*(1+2.*(dim-1)/(o+1.)) + (-1.14021193482)*dim
        else:
            arg=-0.474241534901*x[0]**o + (0.493875251257)*x[0] + (-0.813573226613)*x[1]**o + (-0.24318447124)*x[1] + (-0.886168134273)*x[2]**o + (0.326754645035)*x[2]
            ref=-2.17398289579*(1+2.*(dim-1)/(o+1.)) + (0.577445425052)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.0397741771941*x[0]**o + (-0.0072039493509)*x[0] + (0.56570576065)*x[1]**o + (0.167053312665)*x[1]
            ref[(0,)]=0.605479937844*(1+2.*(dim-1)/(o+1.)) + (0.159849363314)*dim
            arg[(1,)]=0.0641699962848*x[0]**o + (0.885994867966)*x[0] + (0.599176471852)*x[1]**o + (0.292729608816)*x[1]
            ref[(1,)]=0.663346468136*(1+2.*(dim-1)/(o+1.)) + (1.17872447678)*dim
            arg[(2,)]=-0.05609242323*x[0]**o + (-0.244796834803)*x[0] + (0.269028119283)*x[1]**o + (0.802577028971)*x[1]
            ref[(2,)]=0.212935696053*(1+2.*(dim-1)/(o+1.)) + (0.557780194168)*dim
        else:
            arg[(0,)]=-0.19729698126*x[0]**o + (0.760281697505)*x[0] + (0.0700149659395)*x[1]**o + (0.801083523595)*x[1] + (0.0497168809502)*x[2]**o + (0.143296554721)*x[2]
            ref[(0,)]=-0.0775651343699*(1+2.*(dim-1)/(o+1.)) + (1.70466177582)*dim
            arg[(1,)]=-0.817787058639*x[0]**o + (0.800879029094)*x[0] + (0.508730120029)*x[1]**o + (0.408709113705)*x[1] + (0.193301665314)*x[2]**o + (-0.244243266797)*x[2]
            ref[(1,)]=-0.115755273295*(1+2.*(dim-1)/(o+1.)) + (0.965344876002)*dim
            arg[(2,)]=0.162495050033*x[0]**o + (-0.306340230285)*x[0] + (-0.925150985183)*x[1]**o + (-0.319278974614)*x[1] + (0.982367358662)*x[2]**o + (-0.129010908181)*x[2]
            ref[(2,)]=0.219711423512*(1+2.*(dim-1)/(o+1.)) + (-0.75463011308)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.880043229494*x[0]**o + (-0.964370003997)*x[0] + (0.868508675932)*x[1]**o + (0.332617299138)*x[1]
            ref[(0, 0)]=1.74855190543*(1+2.*(dim-1)/(o+1.)) + (-0.631752704859)*dim
            arg[(0, 1)]=-0.106829684351*x[0]**o + (-0.49697942954)*x[0] + (-0.696441584182)*x[1]**o + (-0.121216416275)*x[1]
            ref[(0, 1)]=-0.803271268533*(1+2.*(dim-1)/(o+1.)) + (-0.618195845815)*dim
            arg[(1, 0)]=-0.672131940019*x[0]**o + (-0.100058950051)*x[0] + (-0.0307972585686)*x[1]**o + (0.771415083191)*x[1]
            ref[(1, 0)]=-0.702929198587*(1+2.*(dim-1)/(o+1.)) + (0.67135613314)*dim
            arg[(1, 1)]=-0.421679002506*x[0]**o + (0.509905082609)*x[0] + (0.287056531255)*x[1]**o + (0.500430762116)*x[1]
            ref[(1, 1)]=-0.134622471251*(1+2.*(dim-1)/(o+1.)) + (1.01033584472)*dim
        else:
            arg[(0, 0)]=-0.78517763492*x[0]**o + (-0.078053314639)*x[0] + (-0.436571857308)*x[1]**o + (0.913321168715)*x[1] + (-0.608234752498)*x[2]**o + (-0.101578773768)*x[2]
            ref[(0, 0)]=-1.82998424473*(1+2.*(dim-1)/(o+1.)) + (0.733689080307)*dim
            arg[(0, 1)]=0.613184260756*x[0]**o + (0.891640862885)*x[0] + (-0.47950304333)*x[1]**o + (0.378866120765)*x[1] + (0.54401032644)*x[2]**o + (-0.778943083301)*x[2]
            ref[(0, 1)]=0.677691543866*(1+2.*(dim-1)/(o+1.)) + (0.491563900348)*dim
            arg[(1, 0)]=-0.883904226908*x[0]**o + (0.963002554608)*x[0] + (0.913284695668)*x[1]**o + (0.813559899138)*x[1] + (0.844260693193)*x[2]**o + (-0.116367888813)*x[2]
            ref[(1, 0)]=0.873641161954*(1+2.*(dim-1)/(o+1.)) + (1.66019456493)*dim
            arg[(1, 1)]=-0.649415109243*x[0]**o + (0.0123142985157)*x[0] + (0.842327738256)*x[1]**o + (0.586237569996)*x[1] + (-0.827422756649)*x[2]**o + (0.438437747859)*x[2]
            ref[(1, 1)]=-0.634510127637*(1+2.*(dim-1)/(o+1.)) + (1.03698961637)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2),w)
        ref=numpy.zeros((3, 2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.904633288468*x[0]**o + (0.0951599042294)*x[0] + (0.986648056204)*x[1]**o + (-0.63353219431)*x[1]
            ref[(0, 0, 0)]=0.0820147677364*(1+2.*(dim-1)/(o+1.)) + (-0.538372290081)*dim
            arg[(0, 0, 1)]=0.456483614767*x[0]**o + (-0.463694152886)*x[0] + (-0.179883048598)*x[1]**o + (-0.234653062894)*x[1]
            ref[(0, 0, 1)]=0.276600566169*(1+2.*(dim-1)/(o+1.)) + (-0.69834721578)*dim
            arg[(0, 1, 0)]=-0.208361029206*x[0]**o + (0.655647018717)*x[0] + (0.189597541984)*x[1]**o + (0.704126753139)*x[1]
            ref[(0, 1, 0)]=-0.0187634872218*(1+2.*(dim-1)/(o+1.)) + (1.35977377186)*dim
            arg[(0, 1, 1)]=0.249958931808*x[0]**o + (0.946799925843)*x[0] + (0.658770370695)*x[1]**o + (-0.830366933409)*x[1]
            ref[(0, 1, 1)]=0.908729302504*(1+2.*(dim-1)/(o+1.)) + (0.116432992433)*dim
            arg[(1, 0, 0)]=0.942056583149*x[0]**o + (-0.0991193272274)*x[0] + (0.861508801189)*x[1]**o + (-0.309224043935)*x[1]
            ref[(1, 0, 0)]=1.80356538434*(1+2.*(dim-1)/(o+1.)) + (-0.408343371162)*dim
            arg[(1, 0, 1)]=0.882709542766*x[0]**o + (-0.0306135715257)*x[0] + (0.32700618974)*x[1]**o + (-0.898852627883)*x[1]
            ref[(1, 0, 1)]=1.20971573251*(1+2.*(dim-1)/(o+1.)) + (-0.929466199409)*dim
            arg[(1, 1, 0)]=0.471685841374*x[0]**o + (0.716295550634)*x[0] + (-0.670440423625)*x[1]**o + (0.813180741384)*x[1]
            ref[(1, 1, 0)]=-0.198754582251*(1+2.*(dim-1)/(o+1.)) + (1.52947629202)*dim
            arg[(1, 1, 1)]=0.562694448164*x[0]**o + (0.871420329509)*x[0] + (0.370449573705)*x[1]**o + (-0.91593190217)*x[1]
            ref[(1, 1, 1)]=0.93314402187*(1+2.*(dim-1)/(o+1.)) + (-0.0445115726611)*dim
            arg[(2, 0, 0)]=-0.671404740309*x[0]**o + (0.89457771325)*x[0] + (0.175006480657)*x[1]**o + (0.246189112434)*x[1]
            ref[(2, 0, 0)]=-0.496398259652*(1+2.*(dim-1)/(o+1.)) + (1.14076682568)*dim
            arg[(2, 0, 1)]=-0.0570840276229*x[0]**o + (0.550292135213)*x[0] + (-0.210067656599)*x[1]**o + (-0.521336450119)*x[1]
            ref[(2, 0, 1)]=-0.267151684222*(1+2.*(dim-1)/(o+1.)) + (0.0289556850944)*dim
            arg[(2, 1, 0)]=-0.841700873214*x[0]**o + (-0.940798262536)*x[0] + (-0.20198639445)*x[1]**o + (-0.571480841176)*x[1]
            ref[(2, 1, 0)]=-1.04368726766*(1+2.*(dim-1)/(o+1.)) + (-1.51227910371)*dim
            arg[(2, 1, 1)]=0.718642121498*x[0]**o + (0.673578480138)*x[0] + (0.675577777432)*x[1]**o + (0.0309591450575)*x[1]
            ref[(2, 1, 1)]=1.39421989893*(1+2.*(dim-1)/(o+1.)) + (0.704537625196)*dim
        else:
            arg[(0, 0, 0)]=-0.687533263418*x[0]**o + (0.938647751291)*x[0] + (0.23515778707)*x[1]**o + (-0.991367936895)*x[1] + (0.988730491079)*x[2]**o + (0.802904272917)*x[2]
            ref[(0, 0, 0)]=0.536355014732*(1+2.*(dim-1)/(o+1.)) + (0.750184087312)*dim
            arg[(0, 0, 1)]=-0.399228793451*x[0]**o + (0.284307805615)*x[0] + (0.988713412585)*x[1]**o + (-0.000680842758495)*x[1] + (0.483500483409)*x[2]**o + (0.0315102919221)*x[2]
            ref[(0, 0, 1)]=1.07298510254*(1+2.*(dim-1)/(o+1.)) + (0.315137254779)*dim
            arg[(0, 1, 0)]=0.935036592503*x[0]**o + (0.263167707661)*x[0] + (-0.313599973398)*x[1]**o + (0.195771514059)*x[1] + (0.147245097563)*x[2]**o + (0.846380855438)*x[2]
            ref[(0, 1, 0)]=0.768681716669*(1+2.*(dim-1)/(o+1.)) + (1.30532007716)*dim
            arg[(0, 1, 1)]=-0.506259797247*x[0]**o + (0.0624507613466)*x[0] + (0.71779312987)*x[1]**o + (-0.37975418784)*x[1] + (-0.403096173672)*x[2]**o + (-0.193563020357)*x[2]
            ref[(0, 1, 1)]=-0.19156284105*(1+2.*(dim-1)/(o+1.)) + (-0.51086644685)*dim
            arg[(1, 0, 0)]=0.800795175615*x[0]**o + (0.57954593527)*x[0] + (0.841705725802)*x[1]**o + (0.170171625848)*x[1] + (0.45687511424)*x[2]**o + (-0.915593222691)*x[2]
            ref[(1, 0, 0)]=2.09937601566*(1+2.*(dim-1)/(o+1.)) + (-0.165875661573)*dim
            arg[(1, 0, 1)]=0.88337912926*x[0]**o + (-0.863543201441)*x[0] + (0.255585736524)*x[1]**o + (-0.438045137882)*x[1] + (-0.0437969476371)*x[2]**o + (-0.259347147708)*x[2]
            ref[(1, 0, 1)]=1.09516791815*(1+2.*(dim-1)/(o+1.)) + (-1.56093548703)*dim
            arg[(1, 1, 0)]=-0.942862916188*x[0]**o + (-0.505283880895)*x[0] + (0.796186831836)*x[1]**o + (0.508422470418)*x[1] + (0.668611029232)*x[2]**o + (-0.216415550738)*x[2]
            ref[(1, 1, 0)]=0.52193494488*(1+2.*(dim-1)/(o+1.)) + (-0.213276961216)*dim
            arg[(1, 1, 1)]=-0.706075424926*x[0]**o + (0.739200141148)*x[0] + (0.343737371598)*x[1]**o + (0.284160320013)*x[1] + (-0.133117905701)*x[2]**o + (0.797992412603)*x[2]
            ref[(1, 1, 1)]=-0.49545595903*(1+2.*(dim-1)/(o+1.)) + (1.82135287376)*dim
            arg[(2, 0, 0)]=-0.964055594364*x[0]**o + (-0.132200213687)*x[0] + (-0.932621368827)*x[1]**o + (-0.00275641398551)*x[1] + (-0.415560269685)*x[2]**o + (0.41162091397)*x[2]
            ref[(2, 0, 0)]=-2.31223723288*(1+2.*(dim-1)/(o+1.)) + (0.276664286297)*dim
            arg[(2, 0, 1)]=0.261373860867*x[0]**o + (0.229671618584)*x[0] + (0.410632581557)*x[1]**o + (-0.869783044741)*x[1] + (0.630961443292)*x[2]**o + (-0.641634486167)*x[2]
            ref[(2, 0, 1)]=1.30296788572*(1+2.*(dim-1)/(o+1.)) + (-1.28174591232)*dim
            arg[(2, 1, 0)]=-0.7740396058*x[0]**o + (0.629018609429)*x[0] + (0.916805399417)*x[1]**o + (-0.157702117104)*x[1] + (0.0895526473873)*x[2]**o + (-0.403442981074)*x[2]
            ref[(2, 1, 0)]=0.232318441004*(1+2.*(dim-1)/(o+1.)) + (0.0678735112503)*dim
            arg[(2, 1, 1)]=-0.598173627943*x[0]**o + (0.332105501805)*x[0] + (-0.110496264747)*x[1]**o + (-0.151372226557)*x[1] + (-0.637779776598)*x[2]**o + (0.138004063286)*x[2]
            ref[(2, 1, 1)]=-1.34644966929*(1+2.*(dim-1)/(o+1.)) + (0.318737338533)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 4),w)
        ref=numpy.zeros((3, 2, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.873501233428*x[0]**o + (-0.0894842760108)*x[0] + (0.411603107665)*x[1]**o + (-0.284737786315)*x[1]
            ref[(0, 0, 0, 0)]=-0.461898125764*(1+2.*(dim-1)/(o+1.)) + (-0.374222062326)*dim
            arg[(0, 0, 0, 1)]=-0.265489025236*x[0]**o + (0.191538806519)*x[0] + (0.459068320142)*x[1]**o + (-0.228464129004)*x[1]
            ref[(0, 0, 0, 1)]=0.193579294905*(1+2.*(dim-1)/(o+1.)) + (-0.0369253224847)*dim
            arg[(0, 0, 0, 2)]=0.0769299623452*x[0]**o + (0.914531942658)*x[0] + (-0.893941688152)*x[1]**o + (-0.520733351618)*x[1]
            ref[(0, 0, 0, 2)]=-0.817011725807*(1+2.*(dim-1)/(o+1.)) + (0.39379859104)*dim
            arg[(0, 0, 0, 3)]=-0.316998810571*x[0]**o + (-0.076050282676)*x[0] + (-0.461795105341)*x[1]**o + (-0.152111872475)*x[1]
            ref[(0, 0, 0, 3)]=-0.778793915913*(1+2.*(dim-1)/(o+1.)) + (-0.228162155151)*dim
            arg[(0, 0, 1, 0)]=0.309845842702*x[0]**o + (-0.940948621625)*x[0] + (0.099413216739)*x[1]**o + (0.552729939844)*x[1]
            ref[(0, 0, 1, 0)]=0.409259059441*(1+2.*(dim-1)/(o+1.)) + (-0.388218681781)*dim
            arg[(0, 0, 1, 1)]=-0.493025611232*x[0]**o + (-0.451426202793)*x[0] + (-0.164507887315)*x[1]**o + (0.0136917381285)*x[1]
            ref[(0, 0, 1, 1)]=-0.657533498547*(1+2.*(dim-1)/(o+1.)) + (-0.437734464665)*dim
            arg[(0, 0, 1, 2)]=0.4668541153*x[0]**o + (0.973667232322)*x[0] + (0.428388378587)*x[1]**o + (-0.413379926953)*x[1]
            ref[(0, 0, 1, 2)]=0.895242493887*(1+2.*(dim-1)/(o+1.)) + (0.560287305369)*dim
            arg[(0, 0, 1, 3)]=-0.0684262730267*x[0]**o + (0.0176087220924)*x[0] + (-0.806100024065)*x[1]**o + (0.12412058957)*x[1]
            ref[(0, 0, 1, 3)]=-0.874526297092*(1+2.*(dim-1)/(o+1.)) + (0.141729311663)*dim
            arg[(0, 1, 0, 0)]=0.125713353325*x[0]**o + (0.150441848434)*x[0] + (0.888281891445)*x[1]**o + (0.987190546884)*x[1]
            ref[(0, 1, 0, 0)]=1.01399524477*(1+2.*(dim-1)/(o+1.)) + (1.13763239532)*dim
            arg[(0, 1, 0, 1)]=-0.732833846587*x[0]**o + (-0.632040245088)*x[0] + (-0.415812365013)*x[1]**o + (-0.542265896568)*x[1]
            ref[(0, 1, 0, 1)]=-1.1486462116*(1+2.*(dim-1)/(o+1.)) + (-1.17430614166)*dim
            arg[(0, 1, 0, 2)]=-0.150908657862*x[0]**o + (0.977299691403)*x[0] + (0.576887557236)*x[1]**o + (0.2959447761)*x[1]
            ref[(0, 1, 0, 2)]=0.425978899374*(1+2.*(dim-1)/(o+1.)) + (1.2732444675)*dim
            arg[(0, 1, 0, 3)]=0.612930324062*x[0]**o + (0.939359529898)*x[0] + (0.19523275742)*x[1]**o + (-0.152393644065)*x[1]
            ref[(0, 1, 0, 3)]=0.808163081482*(1+2.*(dim-1)/(o+1.)) + (0.786965885833)*dim
            arg[(0, 1, 1, 0)]=0.239335761908*x[0]**o + (-0.699837113537)*x[0] + (0.689199242491)*x[1]**o + (0.815359500892)*x[1]
            ref[(0, 1, 1, 0)]=0.928535004399*(1+2.*(dim-1)/(o+1.)) + (0.115522387355)*dim
            arg[(0, 1, 1, 1)]=0.750982662229*x[0]**o + (0.462506770601)*x[0] + (-0.471637116974)*x[1]**o + (-0.420109826662)*x[1]
            ref[(0, 1, 1, 1)]=0.279345545255*(1+2.*(dim-1)/(o+1.)) + (0.0423969439384)*dim
            arg[(0, 1, 1, 2)]=0.574241649501*x[0]**o + (0.21345282111)*x[0] + (0.277364792594)*x[1]**o + (-0.627510397344)*x[1]
            ref[(0, 1, 1, 2)]=0.851606442094*(1+2.*(dim-1)/(o+1.)) + (-0.414057576234)*dim
            arg[(0, 1, 1, 3)]=0.134677055128*x[0]**o + (-0.152955886049)*x[0] + (0.919081397724)*x[1]**o + (0.226470499709)*x[1]
            ref[(0, 1, 1, 3)]=1.05375845285*(1+2.*(dim-1)/(o+1.)) + (0.0735146136598)*dim
            arg[(1, 0, 0, 0)]=0.144909840304*x[0]**o + (-0.609468174848)*x[0] + (0.448642420845)*x[1]**o + (-0.498314079651)*x[1]
            ref[(1, 0, 0, 0)]=0.593552261149*(1+2.*(dim-1)/(o+1.)) + (-1.1077822545)*dim
            arg[(1, 0, 0, 1)]=-0.0105407562685*x[0]**o + (-0.196854418616)*x[0] + (-0.161816044517)*x[1]**o + (-0.688412009485)*x[1]
            ref[(1, 0, 0, 1)]=-0.172356800785*(1+2.*(dim-1)/(o+1.)) + (-0.885266428101)*dim
            arg[(1, 0, 0, 2)]=0.444353378942*x[0]**o + (0.687623417778)*x[0] + (-0.343762321249)*x[1]**o + (0.483700209457)*x[1]
            ref[(1, 0, 0, 2)]=0.100591057693*(1+2.*(dim-1)/(o+1.)) + (1.17132362723)*dim
            arg[(1, 0, 0, 3)]=-0.129812054775*x[0]**o + (0.804479121455)*x[0] + (-0.856890089272)*x[1]**o + (0.67565016208)*x[1]
            ref[(1, 0, 0, 3)]=-0.986702144048*(1+2.*(dim-1)/(o+1.)) + (1.48012928354)*dim
            arg[(1, 0, 1, 0)]=0.0779095133449*x[0]**o + (-0.00577799906638)*x[0] + (0.939245589022)*x[1]**o + (-0.889969240183)*x[1]
            ref[(1, 0, 1, 0)]=1.01715510237*(1+2.*(dim-1)/(o+1.)) + (-0.895747239249)*dim
            arg[(1, 0, 1, 1)]=0.759156177708*x[0]**o + (0.450789087849)*x[0] + (0.0411939487381)*x[1]**o + (-0.407593632723)*x[1]
            ref[(1, 0, 1, 1)]=0.800350126446*(1+2.*(dim-1)/(o+1.)) + (0.0431954551258)*dim
            arg[(1, 0, 1, 2)]=-0.977874744677*x[0]**o + (-0.761666128621)*x[0] + (0.0632401890371)*x[1]**o + (-0.00645276118604)*x[1]
            ref[(1, 0, 1, 2)]=-0.91463455564*(1+2.*(dim-1)/(o+1.)) + (-0.768118889807)*dim
            arg[(1, 0, 1, 3)]=-0.386649847055*x[0]**o + (0.119913979498)*x[0] + (-0.910488711238)*x[1]**o + (0.48321351188)*x[1]
            ref[(1, 0, 1, 3)]=-1.29713855829*(1+2.*(dim-1)/(o+1.)) + (0.603127491378)*dim
            arg[(1, 1, 0, 0)]=-0.0108732487229*x[0]**o + (0.526811915871)*x[0] + (0.29496835433)*x[1]**o + (0.426350350899)*x[1]
            ref[(1, 1, 0, 0)]=0.284095105608*(1+2.*(dim-1)/(o+1.)) + (0.95316226677)*dim
            arg[(1, 1, 0, 1)]=0.858905670323*x[0]**o + (-0.877131181278)*x[0] + (-0.971262457374)*x[1]**o + (-0.16322180515)*x[1]
            ref[(1, 1, 0, 1)]=-0.112356787051*(1+2.*(dim-1)/(o+1.)) + (-1.04035298643)*dim
            arg[(1, 1, 0, 2)]=-0.82327353872*x[0]**o + (0.583608371438)*x[0] + (0.795888851388)*x[1]**o + (0.781911186743)*x[1]
            ref[(1, 1, 0, 2)]=-0.0273846873317*(1+2.*(dim-1)/(o+1.)) + (1.36551955818)*dim
            arg[(1, 1, 0, 3)]=-0.965030499196*x[0]**o + (0.788652542363)*x[0] + (0.460384857539)*x[1]**o + (-0.551743501542)*x[1]
            ref[(1, 1, 0, 3)]=-0.504645641657*(1+2.*(dim-1)/(o+1.)) + (0.236909040821)*dim
            arg[(1, 1, 1, 0)]=0.442336615499*x[0]**o + (0.00897838287881)*x[0] + (-0.552972438785)*x[1]**o + (-0.735060955227)*x[1]
            ref[(1, 1, 1, 0)]=-0.110635823285*(1+2.*(dim-1)/(o+1.)) + (-0.726082572348)*dim
            arg[(1, 1, 1, 1)]=0.368174463134*x[0]**o + (-0.624788905159)*x[0] + (0.0519739067261)*x[1]**o + (0.656267584738)*x[1]
            ref[(1, 1, 1, 1)]=0.420148369861*(1+2.*(dim-1)/(o+1.)) + (0.0314786795796)*dim
            arg[(1, 1, 1, 2)]=-0.185705621134*x[0]**o + (-0.19475217211)*x[0] + (-0.358519826131)*x[1]**o + (-0.424395323813)*x[1]
            ref[(1, 1, 1, 2)]=-0.544225447264*(1+2.*(dim-1)/(o+1.)) + (-0.619147495923)*dim
            arg[(1, 1, 1, 3)]=0.786806832983*x[0]**o + (-0.631217141205)*x[0] + (-0.44658081992)*x[1]**o + (-0.174768170617)*x[1]
            ref[(1, 1, 1, 3)]=0.340226013063*(1+2.*(dim-1)/(o+1.)) + (-0.805985311822)*dim
            arg[(2, 0, 0, 0)]=-0.110569832058*x[0]**o + (0.311079758518)*x[0] + (0.277379601134)*x[1]**o + (-0.361098949461)*x[1]
            ref[(2, 0, 0, 0)]=0.166809769076*(1+2.*(dim-1)/(o+1.)) + (-0.0500191909435)*dim
            arg[(2, 0, 0, 1)]=-0.468217709213*x[0]**o + (-0.376536644396)*x[0] + (0.984534010471)*x[1]**o + (-0.309408239207)*x[1]
            ref[(2, 0, 0, 1)]=0.516316301258*(1+2.*(dim-1)/(o+1.)) + (-0.685944883604)*dim
            arg[(2, 0, 0, 2)]=-0.254487774285*x[0]**o + (0.112527606336)*x[0] + (0.972716918553)*x[1]**o + (0.555033613892)*x[1]
            ref[(2, 0, 0, 2)]=0.718229144268*(1+2.*(dim-1)/(o+1.)) + (0.667561220228)*dim
            arg[(2, 0, 0, 3)]=-0.36523252659*x[0]**o + (0.663425189461)*x[0] + (0.306865735141)*x[1]**o + (0.609811992685)*x[1]
            ref[(2, 0, 0, 3)]=-0.0583667914483*(1+2.*(dim-1)/(o+1.)) + (1.27323718215)*dim
            arg[(2, 0, 1, 0)]=-0.270653719163*x[0]**o + (-0.744521868184)*x[0] + (-0.268628912147)*x[1]**o + (-0.806656862623)*x[1]
            ref[(2, 0, 1, 0)]=-0.539282631309*(1+2.*(dim-1)/(o+1.)) + (-1.55117873081)*dim
            arg[(2, 0, 1, 1)]=-0.988402893017*x[0]**o + (0.405633449509)*x[0] + (0.742550085732)*x[1]**o + (0.263717802147)*x[1]
            ref[(2, 0, 1, 1)]=-0.245852807285*(1+2.*(dim-1)/(o+1.)) + (0.669351251655)*dim
            arg[(2, 0, 1, 2)]=-0.977187899909*x[0]**o + (-0.92266812493)*x[0] + (0.120811228326)*x[1]**o + (0.18708641467)*x[1]
            ref[(2, 0, 1, 2)]=-0.856376671583*(1+2.*(dim-1)/(o+1.)) + (-0.73558171026)*dim
            arg[(2, 0, 1, 3)]=0.713967074292*x[0]**o + (-0.922701503934)*x[0] + (-0.00203943242183)*x[1]**o + (-0.540087459948)*x[1]
            ref[(2, 0, 1, 3)]=0.71192764187*(1+2.*(dim-1)/(o+1.)) + (-1.46278896388)*dim
            arg[(2, 1, 0, 0)]=0.719186344234*x[0]**o + (0.208074313856)*x[0] + (0.465525144553)*x[1]**o + (-0.959522623326)*x[1]
            ref[(2, 1, 0, 0)]=1.18471148879*(1+2.*(dim-1)/(o+1.)) + (-0.75144830947)*dim
            arg[(2, 1, 0, 1)]=0.858584857487*x[0]**o + (-0.836846650934)*x[0] + (0.972983458416)*x[1]**o + (0.683590408379)*x[1]
            ref[(2, 1, 0, 1)]=1.8315683159*(1+2.*(dim-1)/(o+1.)) + (-0.153256242555)*dim
            arg[(2, 1, 0, 2)]=0.318967359945*x[0]**o + (0.0237958925138)*x[0] + (0.877677425774)*x[1]**o + (-0.870998734175)*x[1]
            ref[(2, 1, 0, 2)]=1.19664478572*(1+2.*(dim-1)/(o+1.)) + (-0.847202841661)*dim
            arg[(2, 1, 0, 3)]=0.902841202784*x[0]**o + (0.45063904329)*x[0] + (-0.721052269991)*x[1]**o + (-0.876926878448)*x[1]
            ref[(2, 1, 0, 3)]=0.181788932793*(1+2.*(dim-1)/(o+1.)) + (-0.426287835157)*dim
            arg[(2, 1, 1, 0)]=0.907822902496*x[0]**o + (-0.384819517205)*x[0] + (-0.0304205850762)*x[1]**o + (0.575323738224)*x[1]
            ref[(2, 1, 1, 0)]=0.87740231742*(1+2.*(dim-1)/(o+1.)) + (0.190504221019)*dim
            arg[(2, 1, 1, 1)]=0.535996717324*x[0]**o + (-0.00100617517023)*x[0] + (-0.429152191005)*x[1]**o + (0.879315692927)*x[1]
            ref[(2, 1, 1, 1)]=0.106844526318*(1+2.*(dim-1)/(o+1.)) + (0.878309517756)*dim
            arg[(2, 1, 1, 2)]=-0.165150443258*x[0]**o + (0.153764283712)*x[0] + (-0.649039013656)*x[1]**o + (-0.375732946054)*x[1]
            ref[(2, 1, 1, 2)]=-0.814189456914*(1+2.*(dim-1)/(o+1.)) + (-0.221968662343)*dim
            arg[(2, 1, 1, 3)]=0.0874087323*x[0]**o + (0.224334692599)*x[0] + (-0.603369737654)*x[1]**o + (-0.939480189404)*x[1]
            ref[(2, 1, 1, 3)]=-0.515961005354*(1+2.*(dim-1)/(o+1.)) + (-0.715145496805)*dim
        else:
            arg[(0, 0, 0, 0)]=-0.170386484536*x[0]**o + (-0.257741188657)*x[0] + (0.893929252635)*x[1]**o + (-0.591237305962)*x[1] + (-0.439590920802)*x[2]**o + (-0.0684804382388)*x[2]
            ref[(0, 0, 0, 0)]=0.283951847296*(1+2.*(dim-1)/(o+1.)) + (-0.917458932858)*dim
            arg[(0, 0, 0, 1)]=-0.25709520605*x[0]**o + (-0.676860858635)*x[0] + (-0.6446443698)*x[1]**o + (0.527705350602)*x[1] + (-0.227455408404)*x[2]**o + (-0.961063418625)*x[2]
            ref[(0, 0, 0, 1)]=-1.12919498426*(1+2.*(dim-1)/(o+1.)) + (-1.11021892666)*dim
            arg[(0, 0, 0, 2)]=-0.946947055472*x[0]**o + (-0.947206549112)*x[0] + (0.0943113147268)*x[1]**o + (-0.15630227063)*x[1] + (0.558794697837)*x[2]**o + (-0.182514555956)*x[2]
            ref[(0, 0, 0, 2)]=-0.293841042909*(1+2.*(dim-1)/(o+1.)) + (-1.2860233757)*dim
            arg[(0, 0, 0, 3)]=-0.478932136964*x[0]**o + (0.223752982672)*x[0] + (0.762544000663)*x[1]**o + (-0.00968792776438)*x[1] + (0.154546222366)*x[2]**o + (0.215440562165)*x[2]
            ref[(0, 0, 0, 3)]=0.438158086065*(1+2.*(dim-1)/(o+1.)) + (0.429505617073)*dim
            arg[(0, 0, 1, 0)]=0.454254968888*x[0]**o + (0.876301149996)*x[0] + (0.678968883154)*x[1]**o + (-0.0712074807073)*x[1] + (0.568663064008)*x[2]**o + (0.578132726612)*x[2]
            ref[(0, 0, 1, 0)]=1.70188691605*(1+2.*(dim-1)/(o+1.)) + (1.3832263959)*dim
            arg[(0, 0, 1, 1)]=0.381318053283*x[0]**o + (-0.156420828054)*x[0] + (0.885162184964)*x[1]**o + (0.789996504493)*x[1] + (-0.672758321275)*x[2]**o + (0.566984592036)*x[2]
            ref[(0, 0, 1, 1)]=0.593721916972*(1+2.*(dim-1)/(o+1.)) + (1.20056026848)*dim
            arg[(0, 0, 1, 2)]=-0.698381897008*x[0]**o + (0.269646295523)*x[0] + (0.380236169639)*x[1]**o + (0.499890410426)*x[1] + (0.121210296762)*x[2]**o + (0.563409784862)*x[2]
            ref[(0, 0, 1, 2)]=-0.196935430606*(1+2.*(dim-1)/(o+1.)) + (1.33294649081)*dim
            arg[(0, 0, 1, 3)]=0.864853613359*x[0]**o + (0.221267407268)*x[0] + (-0.219873115065)*x[1]**o + (0.540006867389)*x[1] + (-0.991025639205)*x[2]**o + (0.876298578179)*x[2]
            ref[(0, 0, 1, 3)]=-0.346045140911*(1+2.*(dim-1)/(o+1.)) + (1.63757285284)*dim
            arg[(0, 1, 0, 0)]=0.732536540745*x[0]**o + (-0.710050473282)*x[0] + (-0.840530155762)*x[1]**o + (0.221903747975)*x[1] + (0.409526097055)*x[2]**o + (-0.172385141537)*x[2]
            ref[(0, 1, 0, 0)]=0.301532482038*(1+2.*(dim-1)/(o+1.)) + (-0.660531866845)*dim
            arg[(0, 1, 0, 1)]=0.323180065193*x[0]**o + (0.0955757789194)*x[0] + (-0.691466108168)*x[1]**o + (0.361179133553)*x[1] + (-0.305249638189)*x[2]**o + (0.243423391713)*x[2]
            ref[(0, 1, 0, 1)]=-0.673535681164*(1+2.*(dim-1)/(o+1.)) + (0.700178304185)*dim
            arg[(0, 1, 0, 2)]=-0.587890701199*x[0]**o + (0.673068061958)*x[0] + (0.868987242915)*x[1]**o + (0.0279755122712)*x[1] + (0.250408480476)*x[2]**o + (-0.399885239212)*x[2]
            ref[(0, 1, 0, 2)]=0.531505022192*(1+2.*(dim-1)/(o+1.)) + (0.301158335018)*dim
            arg[(0, 1, 0, 3)]=0.171077162515*x[0]**o + (0.649456755353)*x[0] + (-0.201603780322)*x[1]**o + (-0.294709394869)*x[1] + (0.421902531614)*x[2]**o + (0.391959932789)*x[2]
            ref[(0, 1, 0, 3)]=0.391375913807*(1+2.*(dim-1)/(o+1.)) + (0.746707293272)*dim
            arg[(0, 1, 1, 0)]=0.74524896034*x[0]**o + (0.310208017145)*x[0] + (-0.276358591936)*x[1]**o + (-0.361957769561)*x[1] + (0.927880496689)*x[2]**o + (-0.231757870133)*x[2]
            ref[(0, 1, 1, 0)]=1.39677086509*(1+2.*(dim-1)/(o+1.)) + (-0.28350762255)*dim
            arg[(0, 1, 1, 1)]=0.0160171834469*x[0]**o + (0.613125855838)*x[0] + (0.886290925256)*x[1]**o + (-0.571149801564)*x[1] + (0.376345965715)*x[2]**o + (0.229751235916)*x[2]
            ref[(0, 1, 1, 1)]=1.27865407442*(1+2.*(dim-1)/(o+1.)) + (0.271727290189)*dim
            arg[(0, 1, 1, 2)]=0.773842245044*x[0]**o + (0.989029571249)*x[0] + (-0.265259775851)*x[1]**o + (-0.132430037995)*x[1] + (-0.335044661102)*x[2]**o + (-0.821657835031)*x[2]
            ref[(0, 1, 1, 2)]=0.17353780809*(1+2.*(dim-1)/(o+1.)) + (0.0349416982225)*dim
            arg[(0, 1, 1, 3)]=0.986180894047*x[0]**o + (-0.914378668441)*x[0] + (-0.331466874545)*x[1]**o + (-0.522138666589)*x[1] + (0.764554981498)*x[2]**o + (0.665859731287)*x[2]
            ref[(0, 1, 1, 3)]=1.419269001*(1+2.*(dim-1)/(o+1.)) + (-0.770657603743)*dim
            arg[(1, 0, 0, 0)]=-0.00646785778042*x[0]**o + (-0.162638670282)*x[0] + (-0.78706863836)*x[1]**o + (0.0543500562415)*x[1] + (0.0979879499892)*x[2]**o + (-0.0647960326226)*x[2]
            ref[(1, 0, 0, 0)]=-0.695548546151*(1+2.*(dim-1)/(o+1.)) + (-0.173084646663)*dim
            arg[(1, 0, 0, 1)]=-0.32083162357*x[0]**o + (0.269061192572)*x[0] + (0.356852355463)*x[1]**o + (0.35559621222)*x[1] + (0.847370753723)*x[2]**o + (-0.5519220671)*x[2]
            ref[(1, 0, 0, 1)]=0.883391485616*(1+2.*(dim-1)/(o+1.)) + (0.0727353376914)*dim
            arg[(1, 0, 0, 2)]=0.0534626118524*x[0]**o + (-0.883787480991)*x[0] + (-0.858378109937)*x[1]**o + (-0.698586448694)*x[1] + (-0.110584440818)*x[2]**o + (-0.422552414447)*x[2]
            ref[(1, 0, 0, 2)]=-0.915499938902*(1+2.*(dim-1)/(o+1.)) + (-2.00492634413)*dim
            arg[(1, 0, 0, 3)]=0.0483990860041*x[0]**o + (0.741638634133)*x[0] + (-0.559145368423)*x[1]**o + (-0.832084496184)*x[1] + (0.793734968887)*x[2]**o + (0.848602331767)*x[2]
            ref[(1, 0, 0, 3)]=0.282988686468*(1+2.*(dim-1)/(o+1.)) + (0.758156469717)*dim
            arg[(1, 0, 1, 0)]=0.525170725753*x[0]**o + (-0.847689093848)*x[0] + (-0.965408827554)*x[1]**o + (0.719613212565)*x[1] + (0.261959259806)*x[2]**o + (-0.0361144732024)*x[2]
            ref[(1, 0, 1, 0)]=-0.178278841994*(1+2.*(dim-1)/(o+1.)) + (-0.164190354486)*dim
            arg[(1, 0, 1, 1)]=-0.48035975941*x[0]**o + (0.813449072162)*x[0] + (-0.456969232685)*x[1]**o + (0.631639223033)*x[1] + (0.768572177024)*x[2]**o + (0.154228629406)*x[2]
            ref[(1, 0, 1, 1)]=-0.168756815071*(1+2.*(dim-1)/(o+1.)) + (1.5993169246)*dim
            arg[(1, 0, 1, 2)]=-0.848574621783*x[0]**o + (-0.463481249976)*x[0] + (0.525427016714)*x[1]**o + (-0.494380412412)*x[1] + (-0.375630741546)*x[2]**o + (0.11001564204)*x[2]
            ref[(1, 0, 1, 2)]=-0.698778346615*(1+2.*(dim-1)/(o+1.)) + (-0.847846020348)*dim
            arg[(1, 0, 1, 3)]=-0.449173471302*x[0]**o + (0.253304592768)*x[0] + (0.109461661809)*x[1]**o + (-0.731337232767)*x[1] + (0.899311337224)*x[2]**o + (-0.816153469744)*x[2]
            ref[(1, 0, 1, 3)]=0.559599527731*(1+2.*(dim-1)/(o+1.)) + (-1.29418610974)*dim
            arg[(1, 1, 0, 0)]=0.842728311041*x[0]**o + (0.0623212062797)*x[0] + (0.87670944911)*x[1]**o + (-0.105601748477)*x[1] + (-0.9221046222)*x[2]**o + (-0.190624682864)*x[2]
            ref[(1, 1, 0, 0)]=0.797333137952*(1+2.*(dim-1)/(o+1.)) + (-0.233905225061)*dim
            arg[(1, 1, 0, 1)]=0.247735376206*x[0]**o + (0.587249969582)*x[0] + (-0.445500985255)*x[1]**o + (-0.660469791651)*x[1] + (0.658642904506)*x[2]**o + (0.723033231796)*x[2]
            ref[(1, 1, 0, 1)]=0.460877295457*(1+2.*(dim-1)/(o+1.)) + (0.649813409727)*dim
            arg[(1, 1, 0, 2)]=0.769992494862*x[0]**o + (0.787884867427)*x[0] + (-0.543395991481)*x[1]**o + (-0.0771142371138)*x[1] + (-0.737987780773)*x[2]**o + (0.631449919151)*x[2]
            ref[(1, 1, 0, 2)]=-0.511391277391*(1+2.*(dim-1)/(o+1.)) + (1.34222054946)*dim
            arg[(1, 1, 0, 3)]=0.977177937975*x[0]**o + (0.00853572230276)*x[0] + (0.52420114456)*x[1]**o + (-0.729746254432)*x[1] + (0.434340215162)*x[2]**o + (0.849734430913)*x[2]
            ref[(1, 1, 0, 3)]=1.9357192977*(1+2.*(dim-1)/(o+1.)) + (0.128523898784)*dim
            arg[(1, 1, 1, 0)]=-0.0432795088735*x[0]**o + (-0.728204287424)*x[0] + (-0.740075754761)*x[1]**o + (0.286566759601)*x[1] + (0.722171262776)*x[2]**o + (0.283168026177)*x[2]
            ref[(1, 1, 1, 0)]=-0.0611840008584*(1+2.*(dim-1)/(o+1.)) + (-0.158469501646)*dim
            arg[(1, 1, 1, 1)]=-0.844945481272*x[0]**o + (0.579632309778)*x[0] + (0.124929704982)*x[1]**o + (-0.758878175155)*x[1] + (-0.209316198043)*x[2]**o + (0.961007408531)*x[2]
            ref[(1, 1, 1, 1)]=-0.929331974332*(1+2.*(dim-1)/(o+1.)) + (0.781761543154)*dim
            arg[(1, 1, 1, 2)]=0.711583392194*x[0]**o + (0.46214580283)*x[0] + (0.304203703084)*x[1]**o + (0.471525006411)*x[1] + (-0.71564965147)*x[2]**o + (-0.501364950175)*x[2]
            ref[(1, 1, 1, 2)]=0.300137443807*(1+2.*(dim-1)/(o+1.)) + (0.432305859066)*dim
            arg[(1, 1, 1, 3)]=-0.944101153402*x[0]**o + (0.273601544952)*x[0] + (-0.0943897806341)*x[1]**o + (-0.832569910268)*x[1] + (0.712964619232)*x[2]**o + (-0.703467779352)*x[2]
            ref[(1, 1, 1, 3)]=-0.325526314804*(1+2.*(dim-1)/(o+1.)) + (-1.26243614467)*dim
            arg[(2, 0, 0, 0)]=-0.367191128728*x[0]**o + (-0.985879909661)*x[0] + (-0.743590596034)*x[1]**o + (0.787208897007)*x[1] + (0.174569466023)*x[2]**o + (-0.245006625571)*x[2]
            ref[(2, 0, 0, 0)]=-0.93621225874*(1+2.*(dim-1)/(o+1.)) + (-0.443677638225)*dim
            arg[(2, 0, 0, 1)]=-0.380898069139*x[0]**o + (0.135323980394)*x[0] + (-0.197255989414)*x[1]**o + (-0.498431767682)*x[1] + (-0.58805355611)*x[2]**o + (-0.902465760689)*x[2]
            ref[(2, 0, 0, 1)]=-1.16620761466*(1+2.*(dim-1)/(o+1.)) + (-1.26557354798)*dim
            arg[(2, 0, 0, 2)]=-0.655291723873*x[0]**o + (0.599376325102)*x[0] + (-0.912476086292)*x[1]**o + (-0.696645943358)*x[1] + (-0.90270245358)*x[2]**o + (-0.321224082191)*x[2]
            ref[(2, 0, 0, 2)]=-2.47047026374*(1+2.*(dim-1)/(o+1.)) + (-0.418493700447)*dim
            arg[(2, 0, 0, 3)]=-0.896623069697*x[0]**o + (-0.398884633709)*x[0] + (0.803754693346)*x[1]**o + (0.839542912617)*x[1] + (0.811388326243)*x[2]**o + (-0.901484634489)*x[2]
            ref[(2, 0, 0, 3)]=0.718519949892*(1+2.*(dim-1)/(o+1.)) + (-0.460826355581)*dim
            arg[(2, 0, 1, 0)]=0.973973342464*x[0]**o + (0.657962105312)*x[0] + (-0.137595396374)*x[1]**o + (-0.719532855753)*x[1] + (0.455899890598)*x[2]**o + (0.74886778272)*x[2]
            ref[(2, 0, 1, 0)]=1.29227783669*(1+2.*(dim-1)/(o+1.)) + (0.68729703228)*dim
            arg[(2, 0, 1, 1)]=-0.232976643926*x[0]**o + (0.406419352912)*x[0] + (0.850823616023)*x[1]**o + (-0.762868595066)*x[1] + (-0.15736813344)*x[2]**o + (0.644646983851)*x[2]
            ref[(2, 0, 1, 1)]=0.460478838658*(1+2.*(dim-1)/(o+1.)) + (0.288197741697)*dim
            arg[(2, 0, 1, 2)]=-0.659620608261*x[0]**o + (-0.855113077223)*x[0] + (-0.822173201173)*x[1]**o + (-0.203035967453)*x[1] + (-0.700200510749)*x[2]**o + (-0.548699725383)*x[2]
            ref[(2, 0, 1, 2)]=-2.18199432018*(1+2.*(dim-1)/(o+1.)) + (-1.60684877006)*dim
            arg[(2, 0, 1, 3)]=0.614820824648*x[0]**o + (0.469364897614)*x[0] + (-0.461805138851)*x[1]**o + (0.582451987407)*x[1] + (-0.93152160498)*x[2]**o + (-0.855858353424)*x[2]
            ref[(2, 0, 1, 3)]=-0.778505919183*(1+2.*(dim-1)/(o+1.)) + (0.195958531597)*dim
            arg[(2, 1, 0, 0)]=-0.260739051146*x[0]**o + (0.370429300558)*x[0] + (-0.308490632064)*x[1]**o + (-0.514271009908)*x[1] + (0.0166659386815)*x[2]**o + (0.126091247556)*x[2]
            ref[(2, 1, 0, 0)]=-0.552563744529*(1+2.*(dim-1)/(o+1.)) + (-0.0177504617953)*dim
            arg[(2, 1, 0, 1)]=0.00478931899893*x[0]**o + (-0.277754345209)*x[0] + (0.479757873888)*x[1]**o + (0.649544275012)*x[1] + (0.0874611730112)*x[2]**o + (0.90739735247)*x[2]
            ref[(2, 1, 0, 1)]=0.572008365898*(1+2.*(dim-1)/(o+1.)) + (1.27918728227)*dim
            arg[(2, 1, 0, 2)]=0.494121859386*x[0]**o + (-0.701593499174)*x[0] + (-0.249705076123)*x[1]**o + (-0.487253998463)*x[1] + (-0.524046470546)*x[2]**o + (-0.821990069144)*x[2]
            ref[(2, 1, 0, 2)]=-0.279629687283*(1+2.*(dim-1)/(o+1.)) + (-2.01083756678)*dim
            arg[(2, 1, 0, 3)]=0.453678260545*x[0]**o + (0.134234394337)*x[0] + (-0.591402431706)*x[1]**o + (0.619067465314)*x[1] + (-0.814572959206)*x[2]**o + (0.855714585724)*x[2]
            ref[(2, 1, 0, 3)]=-0.952297130368*(1+2.*(dim-1)/(o+1.)) + (1.60901644538)*dim
            arg[(2, 1, 1, 0)]=0.856731412723*x[0]**o + (-0.788420402831)*x[0] + (-0.832195721226)*x[1]**o + (-0.989045120409)*x[1] + (-0.0832012843268)*x[2]**o + (0.806858991606)*x[2]
            ref[(2, 1, 1, 0)]=-0.0586655928299*(1+2.*(dim-1)/(o+1.)) + (-0.970606531634)*dim
            arg[(2, 1, 1, 1)]=0.955329484472*x[0]**o + (-0.921134184758)*x[0] + (-0.354431499586)*x[1]**o + (-0.987508746915)*x[1] + (0.648054633939)*x[2]**o + (0.0559213308256)*x[2]
            ref[(2, 1, 1, 1)]=1.24895261883*(1+2.*(dim-1)/(o+1.)) + (-1.85272160085)*dim
            arg[(2, 1, 1, 2)]=-0.497436360951*x[0]**o + (-0.712847796071)*x[0] + (0.21862937343)*x[1]**o + (0.342369339142)*x[1] + (0.458026926195)*x[2]**o + (0.519476143206)*x[2]
            ref[(2, 1, 1, 2)]=0.179219938673*(1+2.*(dim-1)/(o+1.)) + (0.148997686276)*dim
            arg[(2, 1, 1, 3)]=0.249955080839*x[0]**o + (-0.853347962881)*x[0] + (0.53585402333)*x[1]**o + (-0.194915374597)*x[1] + (-0.168796229459)*x[2]**o + (0.0216296911306)*x[2]
            ref[(2, 1, 1, 3)]=0.617012874711*(1+2.*(dim-1)/(o+1.)) + (-1.02663364635)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.508825776817*x[0]**o + (-0.930588414846)*x[0] + (-0.0544576972879)*x[1]**o + (-0.856211644051)*x[1]
            ref=0.454368079529*(1+2.*(dim-1)/(o+1.)) + (-1.7868000589)*dim
        else:
            arg=0.919347604213*x[0]**o + (-0.562734813266)*x[0] + (-0.806566462015)*x[1]**o + (0.943858873376)*x[1] + (-0.549994966214)*x[2]**o + (-0.6017108856)*x[2]
            ref=-0.437213824016*(1+2.*(dim-1)/(o+1.)) + (-0.22058682549)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.957394551215*x[0]**o + (-0.00723212577991)*x[0] + (0.802661697081)*x[1]**o + (-0.770927035287)*x[1]
            ref[(0,)]=1.7600562483*(1+2.*(dim-1)/(o+1.)) + (-0.778159161067)*dim
            arg[(1,)]=-0.914052876866*x[0]**o + (-0.950201761577)*x[0] + (-0.852344320882)*x[1]**o + (0.669207168947)*x[1]
            ref[(1,)]=-1.76639719775*(1+2.*(dim-1)/(o+1.)) + (-0.28099459263)*dim
            arg[(2,)]=0.181199342595*x[0]**o + (0.163513021417)*x[0] + (0.941859046072)*x[1]**o + (0.784414101241)*x[1]
            ref[(2,)]=1.12305838867*(1+2.*(dim-1)/(o+1.)) + (0.947927122659)*dim
        else:
            arg[(0,)]=0.106881308212*x[0]**o + (0.232124173163)*x[0] + (-0.894696425442)*x[1]**o + (-0.320291899158)*x[1] + (-0.220296601805)*x[2]**o + (-0.619615808593)*x[2]
            ref[(0,)]=-1.00811171903*(1+2.*(dim-1)/(o+1.)) + (-0.707783534588)*dim
            arg[(1,)]=-0.0916775292819*x[0]**o + (0.382108308873)*x[0] + (-0.136280507837)*x[1]**o + (0.508919888415)*x[1] + (0.786889779977)*x[2]**o + (-0.65313092277)*x[2]
            ref[(1,)]=0.558931742858*(1+2.*(dim-1)/(o+1.)) + (0.237897274518)*dim
            arg[(2,)]=0.732085209528*x[0]**o + (0.726403798508)*x[0] + (-0.552201766936)*x[1]**o + (-0.333295199334)*x[1] + (0.491949689034)*x[2]**o + (0.942291931133)*x[2]
            ref[(2,)]=0.671833131626*(1+2.*(dim-1)/(o+1.)) + (1.33540053031)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.451004366786*x[0]**o + (-0.238411601825)*x[0] + (0.34187946384)*x[1]**o + (-0.456234325404)*x[1]
            ref[(0, 0)]=0.792883830626*(1+2.*(dim-1)/(o+1.)) + (-0.694645927228)*dim
            arg[(0, 1)]=0.76229924347*x[0]**o + (-0.580925772691)*x[0] + (0.0555621714057)*x[1]**o + (-0.28669645224)*x[1]
            ref[(0, 1)]=0.817861414876*(1+2.*(dim-1)/(o+1.)) + (-0.867622224931)*dim
            arg[(0, 2)]=-0.296216033591*x[0]**o + (0.294970641195)*x[0] + (-0.166931351598)*x[1]**o + (-0.84573603515)*x[1]
            ref[(0, 2)]=-0.463147385189*(1+2.*(dim-1)/(o+1.)) + (-0.550765393955)*dim
            arg[(0, 3)]=-0.632148810421*x[0]**o + (0.116663960246)*x[0] + (-0.32482719174)*x[1]**o + (-0.231535343645)*x[1]
            ref[(0, 3)]=-0.956976002161*(1+2.*(dim-1)/(o+1.)) + (-0.114871383399)*dim
            arg[(1, 0)]=0.342257778585*x[0]**o + (0.434178408446)*x[0] + (-0.411936664094)*x[1]**o + (0.893148321322)*x[1]
            ref[(1, 0)]=-0.0696788855098*(1+2.*(dim-1)/(o+1.)) + (1.32732672977)*dim
            arg[(1, 1)]=-0.670935956748*x[0]**o + (-0.447269176134)*x[0] + (-0.885914811339)*x[1]**o + (0.506219006315)*x[1]
            ref[(1, 1)]=-1.55685076809*(1+2.*(dim-1)/(o+1.)) + (0.0589498301812)*dim
            arg[(1, 2)]=0.142390787173*x[0]**o + (-0.704953247522)*x[0] + (0.126995205704)*x[1]**o + (0.401890791099)*x[1]
            ref[(1, 2)]=0.269385992877*(1+2.*(dim-1)/(o+1.)) + (-0.303062456423)*dim
            arg[(1, 3)]=-0.937618904343*x[0]**o + (-0.80138872945)*x[0] + (-0.0549002815426)*x[1]**o + (-0.197128583126)*x[1]
            ref[(1, 3)]=-0.992519185886*(1+2.*(dim-1)/(o+1.)) + (-0.998517312576)*dim
        else:
            arg[(0, 0)]=0.599240474732*x[0]**o + (0.568531004564)*x[0] + (0.468133587363)*x[1]**o + (-0.139159591185)*x[1] + (-0.873660890128)*x[2]**o + (-0.649976597513)*x[2]
            ref[(0, 0)]=0.193713171968*(1+2.*(dim-1)/(o+1.)) + (-0.220605184133)*dim
            arg[(0, 1)]=-0.0184789231762*x[0]**o + (0.872632148193)*x[0] + (0.975546121071)*x[1]**o + (0.391782265434)*x[1] + (0.0346115003657)*x[2]**o + (0.554338427046)*x[2]
            ref[(0, 1)]=0.99167869826*(1+2.*(dim-1)/(o+1.)) + (1.81875284067)*dim
            arg[(0, 2)]=0.3388266896*x[0]**o + (-0.0947534244755)*x[0] + (0.0819254021728)*x[1]**o + (-0.331635616401)*x[1] + (-0.00394250973)*x[2]**o + (0.0566455013335)*x[2]
            ref[(0, 2)]=0.416809582042*(1+2.*(dim-1)/(o+1.)) + (-0.369743539543)*dim
            arg[(0, 3)]=-0.460975243521*x[0]**o + (0.712969503006)*x[0] + (0.250630714557)*x[1]**o + (-0.644306077127)*x[1] + (-0.00290052677306)*x[2]**o + (0.869681046245)*x[2]
            ref[(0, 3)]=-0.213245055737*(1+2.*(dim-1)/(o+1.)) + (0.938344472125)*dim
            arg[(1, 0)]=0.85393377133*x[0]**o + (-0.663607834105)*x[0] + (-0.789673789815)*x[1]**o + (-0.19834202501)*x[1] + (0.718766636311)*x[2]**o + (-0.177150825743)*x[2]
            ref[(1, 0)]=0.783026617826*(1+2.*(dim-1)/(o+1.)) + (-1.03910068486)*dim
            arg[(1, 1)]=-0.576102479574*x[0]**o + (0.974120434479)*x[0] + (0.418234546383)*x[1]**o + (0.631648223474)*x[1] + (0.656794157789)*x[2]**o + (-0.310972223334)*x[2]
            ref[(1, 1)]=0.498926224598*(1+2.*(dim-1)/(o+1.)) + (1.29479643462)*dim
            arg[(1, 2)]=0.363667200399*x[0]**o + (0.610886325994)*x[0] + (-0.542168567845)*x[1]**o + (-0.0591593981997)*x[1] + (0.0118749873966)*x[2]**o + (0.509573596637)*x[2]
            ref[(1, 2)]=-0.16662638005*(1+2.*(dim-1)/(o+1.)) + (1.06130052443)*dim
            arg[(1, 3)]=0.392263923684*x[0]**o + (-0.247611859124)*x[0] + (0.162155811899)*x[1]**o + (-0.480350939166)*x[1] + (0.0586782491727)*x[2]**o + (-0.0217519017725)*x[2]
            ref[(1, 3)]=0.613097984756*(1+2.*(dim-1)/(o+1.)) + (-0.749714700063)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3),w)
        ref=numpy.zeros((4, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.367433367676*x[0]**o + (-0.177863364228)*x[0] + (-0.897838587665)*x[1]**o + (-0.733339106561)*x[1]
            ref[(0, 0, 0)]=-1.26527195534*(1+2.*(dim-1)/(o+1.)) + (-0.91120247079)*dim
            arg[(0, 0, 1)]=-0.505163865763*x[0]**o + (-0.124484385655)*x[0] + (-0.168212430775)*x[1]**o + (-0.869063253352)*x[1]
            ref[(0, 0, 1)]=-0.673376296539*(1+2.*(dim-1)/(o+1.)) + (-0.993547639007)*dim
            arg[(0, 0, 2)]=0.512217057201*x[0]**o + (0.416132869202)*x[0] + (0.161118748928)*x[1]**o + (-0.802705099843)*x[1]
            ref[(0, 0, 2)]=0.673335806128*(1+2.*(dim-1)/(o+1.)) + (-0.386572230641)*dim
            arg[(0, 1, 0)]=0.947750049809*x[0]**o + (-0.832385246717)*x[0] + (-0.759583146385)*x[1]**o + (0.0329167422965)*x[1]
            ref[(0, 1, 0)]=0.188166903424*(1+2.*(dim-1)/(o+1.)) + (-0.799468504421)*dim
            arg[(0, 1, 1)]=0.976320894544*x[0]**o + (0.188430815889)*x[0] + (0.136626939795)*x[1]**o + (0.348665999825)*x[1]
            ref[(0, 1, 1)]=1.11294783434*(1+2.*(dim-1)/(o+1.)) + (0.537096815714)*dim
            arg[(0, 1, 2)]=-0.518479065186*x[0]**o + (0.340684874791)*x[0] + (0.971322911673)*x[1]**o + (0.808469454145)*x[1]
            ref[(0, 1, 2)]=0.452843846487*(1+2.*(dim-1)/(o+1.)) + (1.14915432894)*dim
            arg[(0, 2, 0)]=0.815521742079*x[0]**o + (-0.963813935957)*x[0] + (-0.740583625412)*x[1]**o + (-0.205462327823)*x[1]
            ref[(0, 2, 0)]=0.0749381166666*(1+2.*(dim-1)/(o+1.)) + (-1.16927626378)*dim
            arg[(0, 2, 1)]=-0.350857571255*x[0]**o + (0.976884971342)*x[0] + (-0.410246750366)*x[1]**o + (-0.459002787588)*x[1]
            ref[(0, 2, 1)]=-0.761104321621*(1+2.*(dim-1)/(o+1.)) + (0.517882183754)*dim
            arg[(0, 2, 2)]=0.799332329304*x[0]**o + (-0.335950494255)*x[0] + (0.410616659086)*x[1]**o + (-0.788219418091)*x[1]
            ref[(0, 2, 2)]=1.20994898839*(1+2.*(dim-1)/(o+1.)) + (-1.12416991235)*dim
            arg[(1, 0, 0)]=-0.895551141*x[0]**o + (-0.0386804367612)*x[0] + (0.0777664983517)*x[1]**o + (0.489439652249)*x[1]
            ref[(1, 0, 0)]=-0.817784642648*(1+2.*(dim-1)/(o+1.)) + (0.450759215488)*dim
            arg[(1, 0, 1)]=-0.821845565294*x[0]**o + (-0.246247305893)*x[0] + (0.953158005657)*x[1]**o + (0.0310639995303)*x[1]
            ref[(1, 0, 1)]=0.131312440363*(1+2.*(dim-1)/(o+1.)) + (-0.215183306363)*dim
            arg[(1, 0, 2)]=-0.779481531259*x[0]**o + (0.196886984505)*x[0] + (0.58125585929)*x[1]**o + (-0.917222250435)*x[1]
            ref[(1, 0, 2)]=-0.198225671969*(1+2.*(dim-1)/(o+1.)) + (-0.72033526593)*dim
            arg[(1, 1, 0)]=0.815208304971*x[0]**o + (0.952945764702)*x[0] + (-0.0532598118533)*x[1]**o + (0.920947035181)*x[1]
            ref[(1, 1, 0)]=0.761948493118*(1+2.*(dim-1)/(o+1.)) + (1.87389279988)*dim
            arg[(1, 1, 1)]=-0.175012801927*x[0]**o + (-0.572260036225)*x[0] + (0.50030472008)*x[1]**o + (-0.493519239528)*x[1]
            ref[(1, 1, 1)]=0.325291918153*(1+2.*(dim-1)/(o+1.)) + (-1.06577927575)*dim
            arg[(1, 1, 2)]=-0.67804441986*x[0]**o + (-0.219194466717)*x[0] + (0.529915621672)*x[1]**o + (-0.138296967081)*x[1]
            ref[(1, 1, 2)]=-0.148128798189*(1+2.*(dim-1)/(o+1.)) + (-0.357491433798)*dim
            arg[(1, 2, 0)]=-0.454402015795*x[0]**o + (0.937050509211)*x[0] + (-0.177396380482)*x[1]**o + (-0.450735412113)*x[1]
            ref[(1, 2, 0)]=-0.631798396277*(1+2.*(dim-1)/(o+1.)) + (0.486315097099)*dim
            arg[(1, 2, 1)]=0.034120417146*x[0]**o + (-0.298945153259)*x[0] + (0.951674479556)*x[1]**o + (-0.754042901562)*x[1]
            ref[(1, 2, 1)]=0.985794896702*(1+2.*(dim-1)/(o+1.)) + (-1.05298805482)*dim
            arg[(1, 2, 2)]=-0.116680201975*x[0]**o + (-0.138791876925)*x[0] + (-0.875593865546)*x[1]**o + (-0.0227352354918)*x[1]
            ref[(1, 2, 2)]=-0.992274067522*(1+2.*(dim-1)/(o+1.)) + (-0.161527112417)*dim
            arg[(2, 0, 0)]=-0.315368285838*x[0]**o + (-0.0215964001361)*x[0] + (0.661517198403)*x[1]**o + (-0.740739255177)*x[1]
            ref[(2, 0, 0)]=0.346148912565*(1+2.*(dim-1)/(o+1.)) + (-0.762335655313)*dim
            arg[(2, 0, 1)]=-0.381055727715*x[0]**o + (-0.258568016813)*x[0] + (-0.278839961578)*x[1]**o + (-0.876293241905)*x[1]
            ref[(2, 0, 1)]=-0.659895689293*(1+2.*(dim-1)/(o+1.)) + (-1.13486125872)*dim
            arg[(2, 0, 2)]=-0.279347215692*x[0]**o + (-0.0854119256988)*x[0] + (0.514367245407)*x[1]**o + (0.820837813355)*x[1]
            ref[(2, 0, 2)]=0.235020029716*(1+2.*(dim-1)/(o+1.)) + (0.735425887656)*dim
            arg[(2, 1, 0)]=-0.361844045634*x[0]**o + (0.827191665426)*x[0] + (0.59761461094)*x[1]**o + (0.908679518325)*x[1]
            ref[(2, 1, 0)]=0.235770565306*(1+2.*(dim-1)/(o+1.)) + (1.73587118375)*dim
            arg[(2, 1, 1)]=0.601964824632*x[0]**o + (-0.778451350318)*x[0] + (-0.766604195776)*x[1]**o + (0.205638992563)*x[1]
            ref[(2, 1, 1)]=-0.164639371144*(1+2.*(dim-1)/(o+1.)) + (-0.572812357754)*dim
            arg[(2, 1, 2)]=-0.428502641016*x[0]**o + (0.825940014263)*x[0] + (-0.464460446211)*x[1]**o + (-0.874901203941)*x[1]
            ref[(2, 1, 2)]=-0.892963087227*(1+2.*(dim-1)/(o+1.)) + (-0.0489611896783)*dim
            arg[(2, 2, 0)]=0.296330822268*x[0]**o + (-0.182609200723)*x[0] + (-0.162705123582)*x[1]**o + (-0.525737637536)*x[1]
            ref[(2, 2, 0)]=0.133625698686*(1+2.*(dim-1)/(o+1.)) + (-0.708346838259)*dim
            arg[(2, 2, 1)]=0.07088593215*x[0]**o + (0.00751383634832)*x[0] + (-0.269684516076)*x[1]**o + (0.356606982243)*x[1]
            ref[(2, 2, 1)]=-0.198798583926*(1+2.*(dim-1)/(o+1.)) + (0.364120818591)*dim
            arg[(2, 2, 2)]=0.912556471403*x[0]**o + (0.0166150780495)*x[0] + (-0.770220619334)*x[1]**o + (-0.924531867835)*x[1]
            ref[(2, 2, 2)]=0.142335852069*(1+2.*(dim-1)/(o+1.)) + (-0.907916789785)*dim
            arg[(3, 0, 0)]=0.408848638116*x[0]**o + (-0.0362133701459)*x[0] + (0.596895013923)*x[1]**o + (-0.202441134509)*x[1]
            ref[(3, 0, 0)]=1.00574365204*(1+2.*(dim-1)/(o+1.)) + (-0.238654504655)*dim
            arg[(3, 0, 1)]=0.44137856335*x[0]**o + (-0.653032308602)*x[0] + (-0.381397417473)*x[1]**o + (0.617425269746)*x[1]
            ref[(3, 0, 1)]=0.0599811458773*(1+2.*(dim-1)/(o+1.)) + (-0.0356070388564)*dim
            arg[(3, 0, 2)]=-0.491745612839*x[0]**o + (0.0787889494795)*x[0] + (0.236115797029)*x[1]**o + (0.752096303864)*x[1]
            ref[(3, 0, 2)]=-0.25562981581*(1+2.*(dim-1)/(o+1.)) + (0.830885253344)*dim
            arg[(3, 1, 0)]=0.65569009686*x[0]**o + (-0.966569436515)*x[0] + (-0.690733797394)*x[1]**o + (0.498085726756)*x[1]
            ref[(3, 1, 0)]=-0.0350437005347*(1+2.*(dim-1)/(o+1.)) + (-0.468483709759)*dim
            arg[(3, 1, 1)]=0.10704754873*x[0]**o + (-0.199021300444)*x[0] + (-0.764240094077)*x[1]**o + (-0.311163986052)*x[1]
            ref[(3, 1, 1)]=-0.657192545347*(1+2.*(dim-1)/(o+1.)) + (-0.510185286496)*dim
            arg[(3, 1, 2)]=-0.99656514033*x[0]**o + (0.357147916091)*x[0] + (0.0868613339244)*x[1]**o + (-0.36745882097)*x[1]
            ref[(3, 1, 2)]=-0.909703806406*(1+2.*(dim-1)/(o+1.)) + (-0.0103109048792)*dim
            arg[(3, 2, 0)]=-0.824105179653*x[0]**o + (0.448505292168)*x[0] + (0.588766219841)*x[1]**o + (0.185527157174)*x[1]
            ref[(3, 2, 0)]=-0.235338959812*(1+2.*(dim-1)/(o+1.)) + (0.634032449342)*dim
            arg[(3, 2, 1)]=0.628337407298*x[0]**o + (-0.162849005207)*x[0] + (0.507660943762)*x[1]**o + (0.565807509464)*x[1]
            ref[(3, 2, 1)]=1.13599835106*(1+2.*(dim-1)/(o+1.)) + (0.402958504256)*dim
            arg[(3, 2, 2)]=0.503102844383*x[0]**o + (0.689638278575)*x[0] + (-0.895959426654)*x[1]**o + (0.904037830694)*x[1]
            ref[(3, 2, 2)]=-0.392856582272*(1+2.*(dim-1)/(o+1.)) + (1.59367610927)*dim
        else:
            arg[(0, 0, 0)]=-0.15192578628*x[0]**o + (-0.20270324985)*x[0] + (0.706899066448)*x[1]**o + (0.272946757677)*x[1] + (-0.952230630501)*x[2]**o + (0.69919071952)*x[2]
            ref[(0, 0, 0)]=-0.397257350333*(1+2.*(dim-1)/(o+1.)) + (0.769434227347)*dim
            arg[(0, 0, 1)]=-0.973017287048*x[0]**o + (0.459753102962)*x[0] + (-0.279309056262)*x[1]**o + (-0.842643576978)*x[1] + (0.0350653712101)*x[2]**o + (0.381048678084)*x[2]
            ref[(0, 0, 1)]=-1.2172609721*(1+2.*(dim-1)/(o+1.)) + (-0.00184179593202)*dim
            arg[(0, 0, 2)]=0.0780364316543*x[0]**o + (0.0783880696174)*x[0] + (-0.425100159281)*x[1]**o + (-0.203755976298)*x[1] + (0.980829751021)*x[2]**o + (0.543835804841)*x[2]
            ref[(0, 0, 2)]=0.633766023395*(1+2.*(dim-1)/(o+1.)) + (0.41846789816)*dim
            arg[(0, 1, 0)]=-0.95080298715*x[0]**o + (-0.298807017913)*x[0] + (-0.308721329236)*x[1]**o + (-0.336273245598)*x[1] + (0.532053136711)*x[2]**o + (0.234031597981)*x[2]
            ref[(0, 1, 0)]=-0.727471179675*(1+2.*(dim-1)/(o+1.)) + (-0.401048665529)*dim
            arg[(0, 1, 1)]=0.724179391439*x[0]**o + (0.192988830219)*x[0] + (-0.219425298119)*x[1]**o + (-0.650101105711)*x[1] + (0.174389667851)*x[2]**o + (0.573589996937)*x[2]
            ref[(0, 1, 1)]=0.67914376117*(1+2.*(dim-1)/(o+1.)) + (0.116477721445)*dim
            arg[(0, 1, 2)]=-0.213448578768*x[0]**o + (0.601618544843)*x[0] + (0.88182047712)*x[1]**o + (0.614601466678)*x[1] + (-0.975992620523)*x[2]**o + (0.298573595326)*x[2]
            ref[(0, 1, 2)]=-0.307620722171*(1+2.*(dim-1)/(o+1.)) + (1.51479360685)*dim
            arg[(0, 2, 0)]=0.677805047913*x[0]**o + (0.234035626228)*x[0] + (0.790872019689)*x[1]**o + (-0.852776288394)*x[1] + (0.177211507965)*x[2]**o + (0.354539379657)*x[2]
            ref[(0, 2, 0)]=1.64588857557*(1+2.*(dim-1)/(o+1.)) + (-0.264201282509)*dim
            arg[(0, 2, 1)]=0.227486221221*x[0]**o + (0.550953353434)*x[0] + (-0.0896354522059)*x[1]**o + (-0.978506042822)*x[1] + (-0.79555409006)*x[2]**o + (-0.188946416458)*x[2]
            ref[(0, 2, 1)]=-0.657703321044*(1+2.*(dim-1)/(o+1.)) + (-0.616499105846)*dim
            arg[(0, 2, 2)]=-0.151553482182*x[0]**o + (0.72405374232)*x[0] + (0.461384162977)*x[1]**o + (0.1209352197)*x[1] + (-0.564931364835)*x[2]**o + (0.877791151808)*x[2]
            ref[(0, 2, 2)]=-0.255100684039*(1+2.*(dim-1)/(o+1.)) + (1.72278011383)*dim
            arg[(1, 0, 0)]=-0.0316790911041*x[0]**o + (0.166336104147)*x[0] + (-0.0778628897636)*x[1]**o + (0.963631149154)*x[1] + (-0.352836486206)*x[2]**o + (0.0371494740848)*x[2]
            ref[(1, 0, 0)]=-0.462378467074*(1+2.*(dim-1)/(o+1.)) + (1.16711672739)*dim
            arg[(1, 0, 1)]=0.0493664842126*x[0]**o + (0.31005061846)*x[0] + (0.754006762236)*x[1]**o + (0.847207610321)*x[1] + (-0.564215593863)*x[2]**o + (-0.0599741624584)*x[2]
            ref[(1, 0, 1)]=0.239157652586*(1+2.*(dim-1)/(o+1.)) + (1.09728406632)*dim
            arg[(1, 0, 2)]=-0.787888748636*x[0]**o + (0.538656989729)*x[0] + (-0.983327967134)*x[1]**o + (-0.359958571295)*x[1] + (0.555520984663)*x[2]**o + (-0.389417602197)*x[2]
            ref[(1, 0, 2)]=-1.21569573111*(1+2.*(dim-1)/(o+1.)) + (-0.210719183763)*dim
            arg[(1, 1, 0)]=0.43028197428*x[0]**o + (0.457945759298)*x[0] + (-0.2856465922)*x[1]**o + (0.995590338599)*x[1] + (-0.102338759103)*x[2]**o + (-0.982916371491)*x[2]
            ref[(1, 1, 0)]=0.0422966229766*(1+2.*(dim-1)/(o+1.)) + (0.470619726407)*dim
            arg[(1, 1, 1)]=-0.36784289994*x[0]**o + (-0.75410496061)*x[0] + (-0.0903861592663)*x[1]**o + (0.723571408207)*x[1] + (0.34893262103)*x[2]**o + (0.250695621058)*x[2]
            ref[(1, 1, 1)]=-0.109296438177*(1+2.*(dim-1)/(o+1.)) + (0.220162068655)*dim
            arg[(1, 1, 2)]=0.742725341919*x[0]**o + (0.122507684685)*x[0] + (-0.83432750847)*x[1]**o + (0.655309136223)*x[1] + (0.806293992355)*x[2]**o + (-0.990484953105)*x[2]
            ref[(1, 1, 2)]=0.714691825803*(1+2.*(dim-1)/(o+1.)) + (-0.212668132197)*dim
            arg[(1, 2, 0)]=0.119212866926*x[0]**o + (-0.177529771038)*x[0] + (-0.469869613231)*x[1]**o + (0.356540963949)*x[1] + (-0.132584857709)*x[2]**o + (-0.128082719683)*x[2]
            ref[(1, 2, 0)]=-0.483241604014*(1+2.*(dim-1)/(o+1.)) + (0.0509284732281)*dim
            arg[(1, 2, 1)]=0.133181738503*x[0]**o + (-0.151847507784)*x[0] + (0.0954581410452)*x[1]**o + (0.835230098684)*x[1] + (-0.447958558119)*x[2]**o + (0.823034029083)*x[2]
            ref[(1, 2, 1)]=-0.219318678571*(1+2.*(dim-1)/(o+1.)) + (1.50641661998)*dim
            arg[(1, 2, 2)]=0.441990986183*x[0]**o + (-0.371060733951)*x[0] + (0.911128603954)*x[1]**o + (-0.207844564668)*x[1] + (0.514162909964)*x[2]**o + (0.616842794307)*x[2]
            ref[(1, 2, 2)]=1.8672825001*(1+2.*(dim-1)/(o+1.)) + (0.0379374956878)*dim
            arg[(2, 0, 0)]=0.964645687068*x[0]**o + (0.303891079131)*x[0] + (-0.126823394601)*x[1]**o + (0.425430222087)*x[1] + (0.510083622505)*x[2]**o + (-0.0529332193547)*x[2]
            ref[(2, 0, 0)]=1.34790591497*(1+2.*(dim-1)/(o+1.)) + (0.676388081863)*dim
            arg[(2, 0, 1)]=0.649529037516*x[0]**o + (0.370206831261)*x[0] + (-0.152921861208)*x[1]**o + (0.444817786075)*x[1] + (0.865268566633)*x[2]**o + (-0.8418302698)*x[2]
            ref[(2, 0, 1)]=1.36187574294*(1+2.*(dim-1)/(o+1.)) + (-0.0268056524637)*dim
            arg[(2, 0, 2)]=0.0544212531384*x[0]**o + (0.163820574333)*x[0] + (-0.836463219223)*x[1]**o + (0.605394259554)*x[1] + (-0.876910693863)*x[2]**o + (-0.632063704422)*x[2]
            ref[(2, 0, 2)]=-1.65895265995*(1+2.*(dim-1)/(o+1.)) + (0.137151129464)*dim
            arg[(2, 1, 0)]=0.913700618338*x[0]**o + (-0.2694306599)*x[0] + (0.908428993969)*x[1]**o + (-0.625003027105)*x[1] + (-0.323081485422)*x[2]**o + (-0.462420303268)*x[2]
            ref[(2, 1, 0)]=1.49904812688*(1+2.*(dim-1)/(o+1.)) + (-1.35685399027)*dim
            arg[(2, 1, 1)]=0.00123421317284*x[0]**o + (0.773674522836)*x[0] + (0.10329889884)*x[1]**o + (0.499130020198)*x[1] + (-0.726583662387)*x[2]**o + (0.174124127593)*x[2]
            ref[(2, 1, 1)]=-0.622050550374*(1+2.*(dim-1)/(o+1.)) + (1.44692867063)*dim
            arg[(2, 1, 2)]=0.528604327514*x[0]**o + (0.281316523792)*x[0] + (-0.725968615462)*x[1]**o + (0.930173597857)*x[1] + (0.533662343515)*x[2]**o + (-0.00386476931098)*x[2]
            ref[(2, 1, 2)]=0.336298055568*(1+2.*(dim-1)/(o+1.)) + (1.20762535234)*dim
            arg[(2, 2, 0)]=0.469731904352*x[0]**o + (-0.533434059767)*x[0] + (-0.257395112468)*x[1]**o + (0.718470827018)*x[1] + (-0.933876278102)*x[2]**o + (-0.0273050574556)*x[2]
            ref[(2, 2, 0)]=-0.721539486218*(1+2.*(dim-1)/(o+1.)) + (0.157731709795)*dim
            arg[(2, 2, 1)]=-0.829582226978*x[0]**o + (-0.0752794043016)*x[0] + (0.938561774392)*x[1]**o + (0.622417550045)*x[1] + (-0.306084128328)*x[2]**o + (0.287099630447)*x[2]
            ref[(2, 2, 1)]=-0.197104580915*(1+2.*(dim-1)/(o+1.)) + (0.83423777619)*dim
            arg[(2, 2, 2)]=0.0316163848599*x[0]**o + (0.770669594087)*x[0] + (0.23655352775)*x[1]**o + (-0.526901573867)*x[1] + (0.097823688492)*x[2]**o + (-0.0278098251106)*x[2]
            ref[(2, 2, 2)]=0.365993601102*(1+2.*(dim-1)/(o+1.)) + (0.215958195108)*dim
            arg[(3, 0, 0)]=0.421451500084*x[0]**o + (0.767920738318)*x[0] + (-0.604850194077)*x[1]**o + (0.763242932248)*x[1] + (-0.212343228949)*x[2]**o + (0.293345952933)*x[2]
            ref[(3, 0, 0)]=-0.395741922942*(1+2.*(dim-1)/(o+1.)) + (1.8245096235)*dim
            arg[(3, 0, 1)]=-0.208804122966*x[0]**o + (0.88754748046)*x[0] + (-0.883510542223)*x[1]**o + (-0.0698259288483)*x[1] + (0.643187425166)*x[2]**o + (-0.47221804114)*x[2]
            ref[(3, 0, 1)]=-0.449127240023*(1+2.*(dim-1)/(o+1.)) + (0.345503510471)*dim
            arg[(3, 0, 2)]=0.397521854869*x[0]**o + (-0.555255114021)*x[0] + (-0.762215765221)*x[1]**o + (-0.725788480459)*x[1] + (0.00603147552379)*x[2]**o + (0.973419850009)*x[2]
            ref[(3, 0, 2)]=-0.358662434828*(1+2.*(dim-1)/(o+1.)) + (-0.30762374447)*dim
            arg[(3, 1, 0)]=-0.479613506931*x[0]**o + (-0.860328109514)*x[0] + (-0.144769548824)*x[1]**o + (0.366320124544)*x[1] + (-0.470623402871)*x[2]**o + (-0.274793314982)*x[2]
            ref[(3, 1, 0)]=-1.09500645863*(1+2.*(dim-1)/(o+1.)) + (-0.768801299953)*dim
            arg[(3, 1, 1)]=-0.965155351334*x[0]**o + (0.863859306637)*x[0] + (-0.818036753333)*x[1]**o + (0.678776640783)*x[1] + (0.544431557624)*x[2]**o + (0.680489775235)*x[2]
            ref[(3, 1, 1)]=-1.23876054704*(1+2.*(dim-1)/(o+1.)) + (2.22312572265)*dim
            arg[(3, 1, 2)]=0.351629877273*x[0]**o + (-0.525270605555)*x[0] + (0.0426020919006)*x[1]**o + (0.19676858126)*x[1] + (-0.254766447752)*x[2]**o + (0.256524110731)*x[2]
            ref[(3, 1, 2)]=0.139465521421*(1+2.*(dim-1)/(o+1.)) + (-0.0719779135641)*dim
            arg[(3, 2, 0)]=0.00344468535465*x[0]**o + (-0.259812969265)*x[0] + (-0.207604734966)*x[1]**o + (0.216341945063)*x[1] + (-0.571093854789)*x[2]**o + (-0.104390518726)*x[2]
            ref[(3, 2, 0)]=-0.7752539044*(1+2.*(dim-1)/(o+1.)) + (-0.147861542928)*dim
            arg[(3, 2, 1)]=-0.104816063265*x[0]**o + (-0.243408597001)*x[0] + (-0.615934051632)*x[1]**o + (0.583131616735)*x[1] + (-0.334742272856)*x[2]**o + (0.327810884502)*x[2]
            ref[(3, 2, 1)]=-1.05549238775*(1+2.*(dim-1)/(o+1.)) + (0.667533904236)*dim
            arg[(3, 2, 2)]=-0.995304159965*x[0]**o + (0.047957661065)*x[0] + (-0.948333496871)*x[1]**o + (0.38677985404)*x[1] + (0.854164311424)*x[2]**o + (-0.0518391463624)*x[2]
            ref[(3, 2, 2)]=-1.08947334541*(1+2.*(dim-1)/(o+1.)) + (0.382898368743)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 2),w)
        ref=numpy.zeros((4, 4, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.062392485879*x[0]**o + (-0.886012171129)*x[0] + (-0.377324382385)*x[1]**o + (-0.324481986828)*x[1]
            ref[(0, 0, 0, 0)]=-0.439716868264*(1+2.*(dim-1)/(o+1.)) + (-1.21049415796)*dim
            arg[(0, 0, 0, 1)]=0.0935831760145*x[0]**o + (-0.478925417858)*x[0] + (-0.00875980227422)*x[1]**o + (0.642611303059)*x[1]
            ref[(0, 0, 0, 1)]=0.0848233737403*(1+2.*(dim-1)/(o+1.)) + (0.163685885201)*dim
            arg[(0, 0, 1, 0)]=-0.779467114004*x[0]**o + (-0.017706210622)*x[0] + (0.145431854034)*x[1]**o + (0.689382097831)*x[1]
            ref[(0, 0, 1, 0)]=-0.63403525997*(1+2.*(dim-1)/(o+1.)) + (0.671675887209)*dim
            arg[(0, 0, 1, 1)]=0.505709475894*x[0]**o + (0.494977886853)*x[0] + (0.20327645195)*x[1]**o + (-0.833266368998)*x[1]
            ref[(0, 0, 1, 1)]=0.708985927844*(1+2.*(dim-1)/(o+1.)) + (-0.338288482145)*dim
            arg[(0, 0, 2, 0)]=0.770285395779*x[0]**o + (-0.909020418826)*x[0] + (0.731478827411)*x[1]**o + (0.858039073983)*x[1]
            ref[(0, 0, 2, 0)]=1.50176422319*(1+2.*(dim-1)/(o+1.)) + (-0.0509813448437)*dim
            arg[(0, 0, 2, 1)]=0.926538198011*x[0]**o + (-0.0558965688877)*x[0] + (0.26312229854)*x[1]**o + (-0.652827876599)*x[1]
            ref[(0, 0, 2, 1)]=1.18966049655*(1+2.*(dim-1)/(o+1.)) + (-0.708724445486)*dim
            arg[(0, 1, 0, 0)]=0.323211085929*x[0]**o + (0.465641731256)*x[0] + (-0.573124114423)*x[1]**o + (-0.667906237677)*x[1]
            ref[(0, 1, 0, 0)]=-0.249913028494*(1+2.*(dim-1)/(o+1.)) + (-0.202264506421)*dim
            arg[(0, 1, 0, 1)]=-0.624898221749*x[0]**o + (-0.482418929873)*x[0] + (-0.817825201698)*x[1]**o + (-0.0777900239668)*x[1]
            ref[(0, 1, 0, 1)]=-1.44272342345*(1+2.*(dim-1)/(o+1.)) + (-0.56020895384)*dim
            arg[(0, 1, 1, 0)]=0.691477845427*x[0]**o + (0.793767755705)*x[0] + (-0.966037444649)*x[1]**o + (0.351071297087)*x[1]
            ref[(0, 1, 1, 0)]=-0.274559599223*(1+2.*(dim-1)/(o+1.)) + (1.14483905279)*dim
            arg[(0, 1, 1, 1)]=0.652528113452*x[0]**o + (-0.939443563337)*x[0] + (-0.305526453735)*x[1]**o + (0.216575152277)*x[1]
            ref[(0, 1, 1, 1)]=0.347001659716*(1+2.*(dim-1)/(o+1.)) + (-0.72286841106)*dim
            arg[(0, 1, 2, 0)]=-0.602150822805*x[0]**o + (-0.516258945949)*x[0] + (-0.369736646856)*x[1]**o + (-0.283225840192)*x[1]
            ref[(0, 1, 2, 0)]=-0.971887469661*(1+2.*(dim-1)/(o+1.)) + (-0.799484786141)*dim
            arg[(0, 1, 2, 1)]=0.139761493491*x[0]**o + (0.386904709304)*x[0] + (0.584122242321)*x[1]**o + (0.528874878245)*x[1]
            ref[(0, 1, 2, 1)]=0.723883735812*(1+2.*(dim-1)/(o+1.)) + (0.91577958755)*dim
            arg[(0, 2, 0, 0)]=-0.472824210098*x[0]**o + (0.81877180553)*x[0] + (-0.479038827098)*x[1]**o + (0.635124955379)*x[1]
            ref[(0, 2, 0, 0)]=-0.951863037196*(1+2.*(dim-1)/(o+1.)) + (1.45389676091)*dim
            arg[(0, 2, 0, 1)]=-0.572562928026*x[0]**o + (-0.61470492569)*x[0] + (-0.299505300675)*x[1]**o + (0.835726611228)*x[1]
            ref[(0, 2, 0, 1)]=-0.872068228701*(1+2.*(dim-1)/(o+1.)) + (0.221021685539)*dim
            arg[(0, 2, 1, 0)]=0.610627468954*x[0]**o + (-0.571828348247)*x[0] + (0.0646828364203)*x[1]**o + (0.667461105742)*x[1]
            ref[(0, 2, 1, 0)]=0.675310305374*(1+2.*(dim-1)/(o+1.)) + (0.0956327574944)*dim
            arg[(0, 2, 1, 1)]=-0.526930270435*x[0]**o + (-0.0716130324807)*x[0] + (-0.645525665897)*x[1]**o + (-0.561194332054)*x[1]
            ref[(0, 2, 1, 1)]=-1.17245593633*(1+2.*(dim-1)/(o+1.)) + (-0.632807364534)*dim
            arg[(0, 2, 2, 0)]=0.582191515116*x[0]**o + (-0.00536712626791)*x[0] + (-0.253272112514)*x[1]**o + (0.484109646773)*x[1]
            ref[(0, 2, 2, 0)]=0.328919402602*(1+2.*(dim-1)/(o+1.)) + (0.478742520505)*dim
            arg[(0, 2, 2, 1)]=-0.556312677716*x[0]**o + (0.0455392100953)*x[0] + (0.771966467665)*x[1]**o + (-0.461035323431)*x[1]
            ref[(0, 2, 2, 1)]=0.215653789949*(1+2.*(dim-1)/(o+1.)) + (-0.415496113336)*dim
            arg[(0, 3, 0, 0)]=0.4317130348*x[0]**o + (0.381246010844)*x[0] + (-0.16003775566)*x[1]**o + (-0.853193224145)*x[1]
            ref[(0, 3, 0, 0)]=0.271675279141*(1+2.*(dim-1)/(o+1.)) + (-0.471947213301)*dim
            arg[(0, 3, 0, 1)]=0.653317885258*x[0]**o + (0.313971937405)*x[0] + (-0.18169903218)*x[1]**o + (0.448681781229)*x[1]
            ref[(0, 3, 0, 1)]=0.471618853078*(1+2.*(dim-1)/(o+1.)) + (0.762653718634)*dim
            arg[(0, 3, 1, 0)]=0.298612743432*x[0]**o + (-0.917899826454)*x[0] + (0.361770271133)*x[1]**o + (-0.472567235846)*x[1]
            ref[(0, 3, 1, 0)]=0.660383014566*(1+2.*(dim-1)/(o+1.)) + (-1.3904670623)*dim
            arg[(0, 3, 1, 1)]=-0.0293700042603*x[0]**o + (0.168425649002)*x[0] + (0.9945705229)*x[1]**o + (-0.944924010034)*x[1]
            ref[(0, 3, 1, 1)]=0.96520051864*(1+2.*(dim-1)/(o+1.)) + (-0.776498361032)*dim
            arg[(0, 3, 2, 0)]=-0.664944864062*x[0]**o + (-0.460174990515)*x[0] + (-0.406993939428)*x[1]**o + (-0.252189526128)*x[1]
            ref[(0, 3, 2, 0)]=-1.07193880349*(1+2.*(dim-1)/(o+1.)) + (-0.712364516643)*dim
            arg[(0, 3, 2, 1)]=-0.36836890451*x[0]**o + (-0.506188621069)*x[0] + (0.869709205377)*x[1]**o + (0.870562173873)*x[1]
            ref[(0, 3, 2, 1)]=0.501340300867*(1+2.*(dim-1)/(o+1.)) + (0.364373552804)*dim
            arg[(1, 0, 0, 0)]=-0.586748509339*x[0]**o + (-0.572124117532)*x[0] + (0.908426263631)*x[1]**o + (0.634164508876)*x[1]
            ref[(1, 0, 0, 0)]=0.321677754292*(1+2.*(dim-1)/(o+1.)) + (0.0620403913446)*dim
            arg[(1, 0, 0, 1)]=-0.320404378572*x[0]**o + (-0.162517072841)*x[0] + (0.315089384209)*x[1]**o + (-0.960192766556)*x[1]
            ref[(1, 0, 0, 1)]=-0.00531499436259*(1+2.*(dim-1)/(o+1.)) + (-1.1227098394)*dim
            arg[(1, 0, 1, 0)]=-0.706606909655*x[0]**o + (0.76359595472)*x[0] + (0.605872970717)*x[1]**o + (-0.711636896014)*x[1]
            ref[(1, 0, 1, 0)]=-0.100733938938*(1+2.*(dim-1)/(o+1.)) + (0.0519590587063)*dim
            arg[(1, 0, 1, 1)]=0.576423636991*x[0]**o + (-0.239301304759)*x[0] + (0.550160195905)*x[1]**o + (0.236754721093)*x[1]
            ref[(1, 0, 1, 1)]=1.1265838329*(1+2.*(dim-1)/(o+1.)) + (-0.00254658366557)*dim
            arg[(1, 0, 2, 0)]=0.0254921239388*x[0]**o + (-0.196997378073)*x[0] + (-0.505674417071)*x[1]**o + (0.571351972077)*x[1]
            ref[(1, 0, 2, 0)]=-0.480182293132*(1+2.*(dim-1)/(o+1.)) + (0.374354594004)*dim
            arg[(1, 0, 2, 1)]=-0.156287382393*x[0]**o + (0.0486376621009)*x[0] + (-0.25941873064)*x[1]**o + (0.722471532647)*x[1]
            ref[(1, 0, 2, 1)]=-0.415706113033*(1+2.*(dim-1)/(o+1.)) + (0.771109194748)*dim
            arg[(1, 1, 0, 0)]=-0.988130077191*x[0]**o + (-0.949062093354)*x[0] + (0.737234340254)*x[1]**o + (-0.691647442043)*x[1]
            ref[(1, 1, 0, 0)]=-0.250895736937*(1+2.*(dim-1)/(o+1.)) + (-1.6407095354)*dim
            arg[(1, 1, 0, 1)]=-0.61032002859*x[0]**o + (-0.678929416148)*x[0] + (0.497126408381)*x[1]**o + (-0.0203135187238)*x[1]
            ref[(1, 1, 0, 1)]=-0.113193620209*(1+2.*(dim-1)/(o+1.)) + (-0.699242934872)*dim
            arg[(1, 1, 1, 0)]=0.495203098866*x[0]**o + (-0.702897849677)*x[0] + (-0.444809396568)*x[1]**o + (-0.358184207532)*x[1]
            ref[(1, 1, 1, 0)]=0.0503937022975*(1+2.*(dim-1)/(o+1.)) + (-1.06108205721)*dim
            arg[(1, 1, 1, 1)]=0.251170753821*x[0]**o + (-0.0183099751776)*x[0] + (0.620359474601)*x[1]**o + (-0.772218100317)*x[1]
            ref[(1, 1, 1, 1)]=0.871530228422*(1+2.*(dim-1)/(o+1.)) + (-0.790528075495)*dim
            arg[(1, 1, 2, 0)]=-0.0150418361188*x[0]**o + (-0.469840343153)*x[0] + (0.372325385939)*x[1]**o + (-0.512096749269)*x[1]
            ref[(1, 1, 2, 0)]=0.35728354982*(1+2.*(dim-1)/(o+1.)) + (-0.981937092422)*dim
            arg[(1, 1, 2, 1)]=-0.191490480651*x[0]**o + (0.298639747035)*x[0] + (0.627080469636)*x[1]**o + (-0.165485429102)*x[1]
            ref[(1, 1, 2, 1)]=0.435589988985*(1+2.*(dim-1)/(o+1.)) + (0.133154317933)*dim
            arg[(1, 2, 0, 0)]=-0.777153249344*x[0]**o + (0.415588794132)*x[0] + (-0.472686884093)*x[1]**o + (-0.330246945617)*x[1]
            ref[(1, 2, 0, 0)]=-1.24984013344*(1+2.*(dim-1)/(o+1.)) + (0.0853418485154)*dim
            arg[(1, 2, 0, 1)]=-0.890058495316*x[0]**o + (-0.046248029276)*x[0] + (-0.148290341389)*x[1]**o + (0.585382271694)*x[1]
            ref[(1, 2, 0, 1)]=-1.03834883671*(1+2.*(dim-1)/(o+1.)) + (0.539134242418)*dim
            arg[(1, 2, 1, 0)]=-0.664227944907*x[0]**o + (-0.083316977951)*x[0] + (0.984489217994)*x[1]**o + (0.0525795167568)*x[1]
            ref[(1, 2, 1, 0)]=0.320261273088*(1+2.*(dim-1)/(o+1.)) + (-0.0307374611942)*dim
            arg[(1, 2, 1, 1)]=0.123267549054*x[0]**o + (0.779978072521)*x[0] + (-0.293653142868)*x[1]**o + (-0.89609230406)*x[1]
            ref[(1, 2, 1, 1)]=-0.170385593814*(1+2.*(dim-1)/(o+1.)) + (-0.11611423154)*dim
            arg[(1, 2, 2, 0)]=0.477146558406*x[0]**o + (-0.99154217917)*x[0] + (0.0316343634257)*x[1]**o + (0.142543866064)*x[1]
            ref[(1, 2, 2, 0)]=0.508780921832*(1+2.*(dim-1)/(o+1.)) + (-0.848998313106)*dim
            arg[(1, 2, 2, 1)]=0.913867274272*x[0]**o + (-0.00679696207532)*x[0] + (0.889904874822)*x[1]**o + (-0.685896260179)*x[1]
            ref[(1, 2, 2, 1)]=1.80377214909*(1+2.*(dim-1)/(o+1.)) + (-0.692693222254)*dim
            arg[(1, 3, 0, 0)]=-0.76079492176*x[0]**o + (0.628607961793)*x[0] + (-0.507619848966)*x[1]**o + (0.312425163185)*x[1]
            ref[(1, 3, 0, 0)]=-1.26841477073*(1+2.*(dim-1)/(o+1.)) + (0.941033124978)*dim
            arg[(1, 3, 0, 1)]=0.439177618385*x[0]**o + (0.419161715229)*x[0] + (0.747306211657)*x[1]**o + (-0.409689526718)*x[1]
            ref[(1, 3, 0, 1)]=1.18648383004*(1+2.*(dim-1)/(o+1.)) + (0.00947218851042)*dim
            arg[(1, 3, 1, 0)]=-0.920921716712*x[0]**o + (0.046201917608)*x[0] + (-0.610637868927)*x[1]**o + (-0.340077447409)*x[1]
            ref[(1, 3, 1, 0)]=-1.53155958564*(1+2.*(dim-1)/(o+1.)) + (-0.293875529801)*dim
            arg[(1, 3, 1, 1)]=-0.627888230292*x[0]**o + (0.581465589891)*x[0] + (-0.476666313968)*x[1]**o + (-0.00637462213865)*x[1]
            ref[(1, 3, 1, 1)]=-1.10455454426*(1+2.*(dim-1)/(o+1.)) + (0.575090967752)*dim
            arg[(1, 3, 2, 0)]=0.106524766086*x[0]**o + (0.213099977731)*x[0] + (0.0841865550072)*x[1]**o + (0.842155541676)*x[1]
            ref[(1, 3, 2, 0)]=0.190711321093*(1+2.*(dim-1)/(o+1.)) + (1.05525551941)*dim
            arg[(1, 3, 2, 1)]=0.71582289693*x[0]**o + (0.539105813895)*x[0] + (0.629565522031)*x[1]**o + (0.0786023175614)*x[1]
            ref[(1, 3, 2, 1)]=1.34538841896*(1+2.*(dim-1)/(o+1.)) + (0.617708131456)*dim
            arg[(2, 0, 0, 0)]=-0.810101057216*x[0]**o + (-0.52091022792)*x[0] + (-0.0111170932403)*x[1]**o + (-0.894465237733)*x[1]
            ref[(2, 0, 0, 0)]=-0.821218150457*(1+2.*(dim-1)/(o+1.)) + (-1.41537546565)*dim
            arg[(2, 0, 0, 1)]=0.144298098137*x[0]**o + (0.415222356651)*x[0] + (-0.525255726509)*x[1]**o + (-0.310304115129)*x[1]
            ref[(2, 0, 0, 1)]=-0.380957628372*(1+2.*(dim-1)/(o+1.)) + (0.104918241522)*dim
            arg[(2, 0, 1, 0)]=-0.469975721444*x[0]**o + (0.773664997074)*x[0] + (-0.475615791959)*x[1]**o + (-0.664435868603)*x[1]
            ref[(2, 0, 1, 0)]=-0.945591513404*(1+2.*(dim-1)/(o+1.)) + (0.109229128471)*dim
            arg[(2, 0, 1, 1)]=-0.912597916243*x[0]**o + (0.168614913541)*x[0] + (-0.12955830497)*x[1]**o + (0.295535838607)*x[1]
            ref[(2, 0, 1, 1)]=-1.04215622121*(1+2.*(dim-1)/(o+1.)) + (0.464150752148)*dim
            arg[(2, 0, 2, 0)]=0.0916871281485*x[0]**o + (-0.124759863401)*x[0] + (0.844774521918)*x[1]**o + (0.791452018293)*x[1]
            ref[(2, 0, 2, 0)]=0.936461650066*(1+2.*(dim-1)/(o+1.)) + (0.666692154892)*dim
            arg[(2, 0, 2, 1)]=-0.762379794519*x[0]**o + (0.814615249605)*x[0] + (-0.175929108493)*x[1]**o + (0.335374435016)*x[1]
            ref[(2, 0, 2, 1)]=-0.938308903012*(1+2.*(dim-1)/(o+1.)) + (1.14998968462)*dim
            arg[(2, 1, 0, 0)]=0.656930088712*x[0]**o + (-0.0966343744811)*x[0] + (0.00711689574247)*x[1]**o + (0.0213808794119)*x[1]
            ref[(2, 1, 0, 0)]=0.664046984454*(1+2.*(dim-1)/(o+1.)) + (-0.0752534950693)*dim
            arg[(2, 1, 0, 1)]=0.431256891397*x[0]**o + (-0.911865979643)*x[0] + (-0.901676144674)*x[1]**o + (0.108686499336)*x[1]
            ref[(2, 1, 0, 1)]=-0.470419253278*(1+2.*(dim-1)/(o+1.)) + (-0.803179480307)*dim
            arg[(2, 1, 1, 0)]=0.289006846158*x[0]**o + (0.420996085146)*x[0] + (-0.0759861464692)*x[1]**o + (0.278045683391)*x[1]
            ref[(2, 1, 1, 0)]=0.213020699689*(1+2.*(dim-1)/(o+1.)) + (0.699041768537)*dim
            arg[(2, 1, 1, 1)]=0.22285117227*x[0]**o + (0.320326566682)*x[0] + (0.47941675718)*x[1]**o + (-0.198591073014)*x[1]
            ref[(2, 1, 1, 1)]=0.70226792945*(1+2.*(dim-1)/(o+1.)) + (0.121735493668)*dim
            arg[(2, 1, 2, 0)]=-0.596416271944*x[0]**o + (0.600440269738)*x[0] + (-0.879095067601)*x[1]**o + (0.313567333034)*x[1]
            ref[(2, 1, 2, 0)]=-1.47551133954*(1+2.*(dim-1)/(o+1.)) + (0.914007602772)*dim
            arg[(2, 1, 2, 1)]=-0.0729712859192*x[0]**o + (-0.322030708065)*x[0] + (-0.991469179282)*x[1]**o + (0.877112949301)*x[1]
            ref[(2, 1, 2, 1)]=-1.0644404652*(1+2.*(dim-1)/(o+1.)) + (0.555082241236)*dim
            arg[(2, 2, 0, 0)]=-0.796440856953*x[0]**o + (-0.828172944419)*x[0] + (0.341134333808)*x[1]**o + (-0.139501273715)*x[1]
            ref[(2, 2, 0, 0)]=-0.455306523144*(1+2.*(dim-1)/(o+1.)) + (-0.967674218134)*dim
            arg[(2, 2, 0, 1)]=-0.0140443667097*x[0]**o + (-0.0542259688072)*x[0] + (0.275960303412)*x[1]**o + (-0.571932538448)*x[1]
            ref[(2, 2, 0, 1)]=0.261915936703*(1+2.*(dim-1)/(o+1.)) + (-0.626158507255)*dim
            arg[(2, 2, 1, 0)]=0.0384760980241*x[0]**o + (-0.933826243681)*x[0] + (0.534108608642)*x[1]**o + (-0.425504966651)*x[1]
            ref[(2, 2, 1, 0)]=0.572584706666*(1+2.*(dim-1)/(o+1.)) + (-1.35933121033)*dim
            arg[(2, 2, 1, 1)]=-0.512025299847*x[0]**o + (-0.636178547513)*x[0] + (-0.999499102232)*x[1]**o + (-0.216306434098)*x[1]
            ref[(2, 2, 1, 1)]=-1.51152440208*(1+2.*(dim-1)/(o+1.)) + (-0.852484981611)*dim
            arg[(2, 2, 2, 0)]=-0.541484762141*x[0]**o + (0.822676301199)*x[0] + (-0.355136217074)*x[1]**o + (0.287099206339)*x[1]
            ref[(2, 2, 2, 0)]=-0.896620979215*(1+2.*(dim-1)/(o+1.)) + (1.10977550754)*dim
            arg[(2, 2, 2, 1)]=0.367992235319*x[0]**o + (0.743475091969)*x[0] + (-0.986269890085)*x[1]**o + (0.737410611743)*x[1]
            ref[(2, 2, 2, 1)]=-0.618277654766*(1+2.*(dim-1)/(o+1.)) + (1.48088570371)*dim
            arg[(2, 3, 0, 0)]=-0.812226837186*x[0]**o + (-0.451788168559)*x[0] + (0.228028730466)*x[1]**o + (-0.367012717583)*x[1]
            ref[(2, 3, 0, 0)]=-0.58419810672*(1+2.*(dim-1)/(o+1.)) + (-0.818800886142)*dim
            arg[(2, 3, 0, 1)]=-0.283300090457*x[0]**o + (0.515966947115)*x[0] + (0.0541235584344)*x[1]**o + (0.376810459727)*x[1]
            ref[(2, 3, 0, 1)]=-0.229176532023*(1+2.*(dim-1)/(o+1.)) + (0.892777406843)*dim
            arg[(2, 3, 1, 0)]=-0.838517898564*x[0]**o + (-0.865660050512)*x[0] + (0.483661495253)*x[1]**o + (0.977265878583)*x[1]
            ref[(2, 3, 1, 0)]=-0.354856403311*(1+2.*(dim-1)/(o+1.)) + (0.111605828071)*dim
            arg[(2, 3, 1, 1)]=-0.0273343154694*x[0]**o + (-0.262901398137)*x[0] + (-0.705150204788)*x[1]**o + (-0.942328644663)*x[1]
            ref[(2, 3, 1, 1)]=-0.732484520258*(1+2.*(dim-1)/(o+1.)) + (-1.2052300428)*dim
            arg[(2, 3, 2, 0)]=0.899492952594*x[0]**o + (-0.900855293192)*x[0] + (0.286938974837)*x[1]**o + (-0.767725484194)*x[1]
            ref[(2, 3, 2, 0)]=1.18643192743*(1+2.*(dim-1)/(o+1.)) + (-1.66858077739)*dim
            arg[(2, 3, 2, 1)]=0.6122473693*x[0]**o + (0.827749444738)*x[0] + (-0.490365639585)*x[1]**o + (-0.39995494771)*x[1]
            ref[(2, 3, 2, 1)]=0.121881729715*(1+2.*(dim-1)/(o+1.)) + (0.427794497028)*dim
            arg[(3, 0, 0, 0)]=-0.026724645387*x[0]**o + (0.132126063868)*x[0] + (0.551396494784)*x[1]**o + (-0.898871882329)*x[1]
            ref[(3, 0, 0, 0)]=0.524671849397*(1+2.*(dim-1)/(o+1.)) + (-0.766745818461)*dim
            arg[(3, 0, 0, 1)]=0.768606632288*x[0]**o + (-0.642185878182)*x[0] + (0.763073964725)*x[1]**o + (0.526876610913)*x[1]
            ref[(3, 0, 0, 1)]=1.53168059701*(1+2.*(dim-1)/(o+1.)) + (-0.115309267269)*dim
            arg[(3, 0, 1, 0)]=-0.368667819579*x[0]**o + (0.182656626322)*x[0] + (0.518581200944)*x[1]**o + (0.792021375837)*x[1]
            ref[(3, 0, 1, 0)]=0.149913381365*(1+2.*(dim-1)/(o+1.)) + (0.974678002159)*dim
            arg[(3, 0, 1, 1)]=0.0901801102642*x[0]**o + (-0.835489418362)*x[0] + (-0.675172148112)*x[1]**o + (-0.757487444529)*x[1]
            ref[(3, 0, 1, 1)]=-0.584992037848*(1+2.*(dim-1)/(o+1.)) + (-1.59297686289)*dim
            arg[(3, 0, 2, 0)]=-0.752039265196*x[0]**o + (-0.822063215259)*x[0] + (0.495238251664)*x[1]**o + (0.339540634013)*x[1]
            ref[(3, 0, 2, 0)]=-0.256801013532*(1+2.*(dim-1)/(o+1.)) + (-0.482522581247)*dim
            arg[(3, 0, 2, 1)]=0.618918394655*x[0]**o + (0.764793429605)*x[0] + (0.255423242252)*x[1]**o + (0.0832213649301)*x[1]
            ref[(3, 0, 2, 1)]=0.874341636907*(1+2.*(dim-1)/(o+1.)) + (0.848014794535)*dim
            arg[(3, 1, 0, 0)]=0.637256901764*x[0]**o + (0.0318360699892)*x[0] + (-0.24900220319)*x[1]**o + (0.951876892332)*x[1]
            ref[(3, 1, 0, 0)]=0.388254698574*(1+2.*(dim-1)/(o+1.)) + (0.983712962321)*dim
            arg[(3, 1, 0, 1)]=0.566195203802*x[0]**o + (-0.9031285175)*x[0] + (-0.7208703051)*x[1]**o + (-0.181395822972)*x[1]
            ref[(3, 1, 0, 1)]=-0.154675101298*(1+2.*(dim-1)/(o+1.)) + (-1.08452434047)*dim
            arg[(3, 1, 1, 0)]=0.369377446408*x[0]**o + (0.598844762505)*x[0] + (-0.215295275343)*x[1]**o + (0.733942122467)*x[1]
            ref[(3, 1, 1, 0)]=0.154082171065*(1+2.*(dim-1)/(o+1.)) + (1.33278688497)*dim
            arg[(3, 1, 1, 1)]=0.0740838659431*x[0]**o + (0.0893278102285)*x[0] + (0.57128629844)*x[1]**o + (0.533370037295)*x[1]
            ref[(3, 1, 1, 1)]=0.645370164383*(1+2.*(dim-1)/(o+1.)) + (0.622697847524)*dim
            arg[(3, 1, 2, 0)]=-0.465953104356*x[0]**o + (0.0383529253345)*x[0] + (0.773501207315)*x[1]**o + (0.0739683117353)*x[1]
            ref[(3, 1, 2, 0)]=0.307548102959*(1+2.*(dim-1)/(o+1.)) + (0.11232123707)*dim
            arg[(3, 1, 2, 1)]=-0.81507446613*x[0]**o + (-0.344009678973)*x[0] + (0.544781878698)*x[1]**o + (-0.519130564742)*x[1]
            ref[(3, 1, 2, 1)]=-0.270292587432*(1+2.*(dim-1)/(o+1.)) + (-0.863140243715)*dim
            arg[(3, 2, 0, 0)]=-0.176474069205*x[0]**o + (-0.41321814321)*x[0] + (0.825654744652)*x[1]**o + (-0.704994414343)*x[1]
            ref[(3, 2, 0, 0)]=0.649180675447*(1+2.*(dim-1)/(o+1.)) + (-1.11821255755)*dim
            arg[(3, 2, 0, 1)]=0.262350396701*x[0]**o + (-0.114726739013)*x[0] + (0.724451448506)*x[1]**o + (-0.157337600788)*x[1]
            ref[(3, 2, 0, 1)]=0.986801845207*(1+2.*(dim-1)/(o+1.)) + (-0.272064339802)*dim
            arg[(3, 2, 1, 0)]=0.424166665599*x[0]**o + (-0.0908892521671)*x[0] + (0.0764035742095)*x[1]**o + (0.638024432842)*x[1]
            ref[(3, 2, 1, 0)]=0.500570239808*(1+2.*(dim-1)/(o+1.)) + (0.547135180675)*dim
            arg[(3, 2, 1, 1)]=-0.48309264436*x[0]**o + (-0.505029424564)*x[0] + (-0.163711208792)*x[1]**o + (-0.982935083004)*x[1]
            ref[(3, 2, 1, 1)]=-0.646803853152*(1+2.*(dim-1)/(o+1.)) + (-1.48796450757)*dim
            arg[(3, 2, 2, 0)]=-0.61862882402*x[0]**o + (-0.12347241252)*x[0] + (-0.831526661358)*x[1]**o + (0.37725157712)*x[1]
            ref[(3, 2, 2, 0)]=-1.45015548538*(1+2.*(dim-1)/(o+1.)) + (0.2537791646)*dim
            arg[(3, 2, 2, 1)]=0.0408417651102*x[0]**o + (-0.132004365332)*x[0] + (0.290024663955)*x[1]**o + (-0.359982296193)*x[1]
            ref[(3, 2, 2, 1)]=0.330866429066*(1+2.*(dim-1)/(o+1.)) + (-0.491986661524)*dim
            arg[(3, 3, 0, 0)]=-0.378813040505*x[0]**o + (0.652041424079)*x[0] + (0.425995734564)*x[1]**o + (-0.400385994381)*x[1]
            ref[(3, 3, 0, 0)]=0.0471826940588*(1+2.*(dim-1)/(o+1.)) + (0.251655429698)*dim
            arg[(3, 3, 0, 1)]=0.747488953982*x[0]**o + (-0.784145033045)*x[0] + (0.363266955371)*x[1]**o + (-0.191087593575)*x[1]
            ref[(3, 3, 0, 1)]=1.11075590935*(1+2.*(dim-1)/(o+1.)) + (-0.97523262662)*dim
            arg[(3, 3, 1, 0)]=0.507867566663*x[0]**o + (-0.718565925516)*x[0] + (-0.0458963353292)*x[1]**o + (-0.212496001288)*x[1]
            ref[(3, 3, 1, 0)]=0.461971231333*(1+2.*(dim-1)/(o+1.)) + (-0.931061926804)*dim
            arg[(3, 3, 1, 1)]=0.996621600288*x[0]**o + (0.795723891348)*x[0] + (-0.557395018687)*x[1]**o + (0.817250063379)*x[1]
            ref[(3, 3, 1, 1)]=0.439226581601*(1+2.*(dim-1)/(o+1.)) + (1.61297395473)*dim
            arg[(3, 3, 2, 0)]=-0.285213323811*x[0]**o + (0.229866006555)*x[0] + (0.956931203929)*x[1]**o + (0.359972238111)*x[1]
            ref[(3, 3, 2, 0)]=0.671717880118*(1+2.*(dim-1)/(o+1.)) + (0.589838244667)*dim
            arg[(3, 3, 2, 1)]=-0.590070433667*x[0]**o + (0.139004421002)*x[0] + (-0.410245737714)*x[1]**o + (0.0309607759492)*x[1]
            ref[(3, 3, 2, 1)]=-1.00031617138*(1+2.*(dim-1)/(o+1.)) + (0.169965196952)*dim
        else:
            arg[(0, 0, 0, 0)]=0.686717727345*x[0]**o + (-0.0801971830877)*x[0] + (-0.00546452507803)*x[1]**o + (0.489115963386)*x[1] + (-0.360225668515)*x[2]**o + (-0.610962969218)*x[2]
            ref[(0, 0, 0, 0)]=0.321027533752*(1+2.*(dim-1)/(o+1.)) + (-0.20204418892)*dim
            arg[(0, 0, 0, 1)]=0.209158443256*x[0]**o + (0.750501883181)*x[0] + (0.976503458316)*x[1]**o + (-0.985026947234)*x[1] + (-0.138008084391)*x[2]**o + (-0.771613116351)*x[2]
            ref[(0, 0, 0, 1)]=1.04765381718*(1+2.*(dim-1)/(o+1.)) + (-1.0061381804)*dim
            arg[(0, 0, 1, 0)]=-0.640093691706*x[0]**o + (-0.553252416539)*x[0] + (0.597656250075)*x[1]**o + (0.970240497432)*x[1] + (-0.747888975955)*x[2]**o + (0.0464305767769)*x[2]
            ref[(0, 0, 1, 0)]=-0.790326417586*(1+2.*(dim-1)/(o+1.)) + (0.46341865767)*dim
            arg[(0, 0, 1, 1)]=0.0827640994619*x[0]**o + (-0.00964290060683)*x[0] + (-0.682611411141)*x[1]**o + (0.00834144722826)*x[1] + (-0.100574476377)*x[2]**o + (0.440908168079)*x[2]
            ref[(0, 0, 1, 1)]=-0.700421788056*(1+2.*(dim-1)/(o+1.)) + (0.4396067147)*dim
            arg[(0, 0, 2, 0)]=0.484806450875*x[0]**o + (0.171554196454)*x[0] + (0.380871563711)*x[1]**o + (-0.206336837058)*x[1] + (-0.953418239993)*x[2]**o + (0.101010646978)*x[2]
            ref[(0, 0, 2, 0)]=-0.0877402254066*(1+2.*(dim-1)/(o+1.)) + (0.0662280063744)*dim
            arg[(0, 0, 2, 1)]=0.943162456654*x[0]**o + (0.60756811471)*x[0] + (0.434936654516)*x[1]**o + (0.486549899521)*x[1] + (0.924154530247)*x[2]**o + (-0.891825579112)*x[2]
            ref[(0, 0, 2, 1)]=2.30225364142*(1+2.*(dim-1)/(o+1.)) + (0.202292435119)*dim
            arg[(0, 1, 0, 0)]=0.503950780009*x[0]**o + (0.839724495387)*x[0] + (0.972913049974)*x[1]**o + (0.27148066685)*x[1] + (-0.694996164046)*x[2]**o + (0.590960447716)*x[2]
            ref[(0, 1, 0, 0)]=0.781867665936*(1+2.*(dim-1)/(o+1.)) + (1.70216560995)*dim
            arg[(0, 1, 0, 1)]=0.919768347114*x[0]**o + (-0.597972315064)*x[0] + (-0.466547327138)*x[1]**o + (-0.86589936423)*x[1] + (-0.247167620081)*x[2]**o + (-0.842928421683)*x[2]
            ref[(0, 1, 0, 1)]=0.206053399895*(1+2.*(dim-1)/(o+1.)) + (-2.30680010098)*dim
            arg[(0, 1, 1, 0)]=0.900951528217*x[0]**o + (0.465367136193)*x[0] + (0.577459754293)*x[1]**o + (-0.353581446601)*x[1] + (0.196119897174)*x[2]**o + (0.320790135829)*x[2]
            ref[(0, 1, 1, 0)]=1.67453117968*(1+2.*(dim-1)/(o+1.)) + (0.432575825421)*dim
            arg[(0, 1, 1, 1)]=-0.366505781481*x[0]**o + (-0.476986583898)*x[0] + (-0.485670459914)*x[1]**o + (0.922587987777)*x[1] + (-0.943400399797)*x[2]**o + (0.409048557831)*x[2]
            ref[(0, 1, 1, 1)]=-1.79557664119*(1+2.*(dim-1)/(o+1.)) + (0.85464996171)*dim
            arg[(0, 1, 2, 0)]=0.143462311817*x[0]**o + (0.95205524947)*x[0] + (-0.318739629549)*x[1]**o + (0.419930610133)*x[1] + (0.247468077498)*x[2]**o + (0.408594171265)*x[2]
            ref[(0, 1, 2, 0)]=0.0721907597661*(1+2.*(dim-1)/(o+1.)) + (1.78058003087)*dim
            arg[(0, 1, 2, 1)]=-0.61004152011*x[0]**o + (-0.555742466143)*x[0] + (0.273645812264)*x[1]**o + (-0.100596999372)*x[1] + (0.192669024501)*x[2]**o + (0.98789098848)*x[2]
            ref[(0, 1, 2, 1)]=-0.143726683344*(1+2.*(dim-1)/(o+1.)) + (0.331551522964)*dim
            arg[(0, 2, 0, 0)]=0.51706393094*x[0]**o + (-0.901342982053)*x[0] + (0.65903783329)*x[1]**o + (-0.119190320473)*x[1] + (0.906043740769)*x[2]**o + (-0.22547779609)*x[2]
            ref[(0, 2, 0, 0)]=2.082145505*(1+2.*(dim-1)/(o+1.)) + (-1.24601109862)*dim
            arg[(0, 2, 0, 1)]=-0.540967117342*x[0]**o + (0.382840305447)*x[0] + (-0.17249048162)*x[1]**o + (-0.472586475408)*x[1] + (0.938529086054)*x[2]**o + (-0.138707319693)*x[2]
            ref[(0, 2, 0, 1)]=0.225071487092*(1+2.*(dim-1)/(o+1.)) + (-0.228453489654)*dim
            arg[(0, 2, 1, 0)]=-0.621755453215*x[0]**o + (0.217181046259)*x[0] + (0.794916210282)*x[1]**o + (-0.942900903913)*x[1] + (0.652125890959)*x[2]**o + (0.620452070038)*x[2]
            ref[(0, 2, 1, 0)]=0.825286648026*(1+2.*(dim-1)/(o+1.)) + (-0.105267787616)*dim
            arg[(0, 2, 1, 1)]=-0.891951900785*x[0]**o + (-0.953196499088)*x[0] + (0.731772590841)*x[1]**o + (-0.139564727227)*x[1] + (0.944298135735)*x[2]**o + (-0.719800706057)*x[2]
            ref[(0, 2, 1, 1)]=0.78411882579*(1+2.*(dim-1)/(o+1.)) + (-1.81256193237)*dim
            arg[(0, 2, 2, 0)]=-0.124602971665*x[0]**o + (-0.797804820604)*x[0] + (-0.546490953571)*x[1]**o + (0.0493884486283)*x[1] + (-0.0454874664421)*x[2]**o + (-0.707327850878)*x[2]
            ref[(0, 2, 2, 0)]=-0.716581391679*(1+2.*(dim-1)/(o+1.)) + (-1.45574422285)*dim
            arg[(0, 2, 2, 1)]=0.417475764666*x[0]**o + (0.130224117002)*x[0] + (0.723996665002)*x[1]**o + (0.50132434573)*x[1] + (0.360511245465)*x[2]**o + (-0.361974458955)*x[2]
            ref[(0, 2, 2, 1)]=1.50198367513*(1+2.*(dim-1)/(o+1.)) + (0.269574003776)*dim
            arg[(0, 3, 0, 0)]=-0.101387202368*x[0]**o + (-0.340792388463)*x[0] + (-0.673634189101)*x[1]**o + (-0.527745083193)*x[1] + (0.905081616847)*x[2]**o + (-0.297593840641)*x[2]
            ref[(0, 3, 0, 0)]=0.130060225378*(1+2.*(dim-1)/(o+1.)) + (-1.1661313123)*dim
            arg[(0, 3, 0, 1)]=-0.863163546009*x[0]**o + (-0.703638687185)*x[0] + (-0.792218550219)*x[1]**o + (-0.161101024359)*x[1] + (-0.204154377686)*x[2]**o + (-0.832157835312)*x[2]
            ref[(0, 3, 0, 1)]=-1.85953647391*(1+2.*(dim-1)/(o+1.)) + (-1.69689754686)*dim
            arg[(0, 3, 1, 0)]=0.154001644102*x[0]**o + (-0.405731679485)*x[0] + (0.832707380751)*x[1]**o + (0.0854186301646)*x[1] + (-0.779035436855)*x[2]**o + (0.9953373199)*x[2]
            ref[(0, 3, 1, 0)]=0.207673587998*(1+2.*(dim-1)/(o+1.)) + (0.675024270579)*dim
            arg[(0, 3, 1, 1)]=0.769713578158*x[0]**o + (0.163984636778)*x[0] + (0.50280209336)*x[1]**o + (0.203927290713)*x[1] + (-0.939086701549)*x[2]**o + (0.477141036705)*x[2]
            ref[(0, 3, 1, 1)]=0.33342896997*(1+2.*(dim-1)/(o+1.)) + (0.845052964196)*dim
            arg[(0, 3, 2, 0)]=-0.381829234752*x[0]**o + (-0.886421230105)*x[0] + (-0.718042290747)*x[1]**o + (0.249305361346)*x[1] + (0.843675027039)*x[2]**o + (0.321616714059)*x[2]
            ref[(0, 3, 2, 0)]=-0.256196498459*(1+2.*(dim-1)/(o+1.)) + (-0.3154991547)*dim
            arg[(0, 3, 2, 1)]=-0.554407523219*x[0]**o + (0.253076280335)*x[0] + (-0.837570299985)*x[1]**o + (0.528509969731)*x[1] + (-0.40276619052)*x[2]**o + (0.890261880243)*x[2]
            ref[(0, 3, 2, 1)]=-1.79474401372*(1+2.*(dim-1)/(o+1.)) + (1.67184813031)*dim
            arg[(1, 0, 0, 0)]=0.495160375308*x[0]**o + (0.533717859398)*x[0] + (0.36753984338)*x[1]**o + (-0.0725896411379)*x[1] + (0.279288166203)*x[2]**o + (0.0600650526301)*x[2]
            ref[(1, 0, 0, 0)]=1.14198838489*(1+2.*(dim-1)/(o+1.)) + (0.52119327089)*dim
            arg[(1, 0, 0, 1)]=-0.232165720836*x[0]**o + (-0.0101369435346)*x[0] + (0.236662728989)*x[1]**o + (0.276918568126)*x[1] + (0.208006892852)*x[2]**o + (0.611822848246)*x[2]
            ref[(1, 0, 0, 1)]=0.212503901004*(1+2.*(dim-1)/(o+1.)) + (0.878604472837)*dim
            arg[(1, 0, 1, 0)]=-0.87581928775*x[0]**o + (0.81311313504)*x[0] + (-0.212891038277)*x[1]**o + (0.56570811715)*x[1] + (0.718720018964)*x[2]**o + (-0.614448432786)*x[2]
            ref[(1, 0, 1, 0)]=-0.369990307063*(1+2.*(dim-1)/(o+1.)) + (0.764372819404)*dim
            arg[(1, 0, 1, 1)]=0.471327773278*x[0]**o + (-0.559692581622)*x[0] + (-0.611272126559)*x[1]**o + (-0.626898752888)*x[1] + (-0.433865847686)*x[2]**o + (-0.15462949866)*x[2]
            ref[(1, 0, 1, 1)]=-0.573810200967*(1+2.*(dim-1)/(o+1.)) + (-1.34122083317)*dim
            arg[(1, 0, 2, 0)]=0.73222523795*x[0]**o + (-0.954800137481)*x[0] + (-0.273960890798)*x[1]**o + (0.197913409121)*x[1] + (-0.433012104843)*x[2]**o + (0.118988982271)*x[2]
            ref[(1, 0, 2, 0)]=0.0252522423094*(1+2.*(dim-1)/(o+1.)) + (-0.637897746089)*dim
            arg[(1, 0, 2, 1)]=0.571501427821*x[0]**o + (-0.172282924799)*x[0] + (-0.554696482485)*x[1]**o + (0.987509511149)*x[1] + (-0.0169560747761)*x[2]**o + (-0.942649560468)*x[2]
            ref[(1, 0, 2, 1)]=-0.000151129439995*(1+2.*(dim-1)/(o+1.)) + (-0.127422974117)*dim
            arg[(1, 1, 0, 0)]=-0.964352017054*x[0]**o + (-0.505059249574)*x[0] + (-0.729928749631)*x[1]**o + (-0.736151206567)*x[1] + (0.932714668976)*x[2]**o + (-0.0288839122255)*x[2]
            ref[(1, 1, 0, 0)]=-0.761566097709*(1+2.*(dim-1)/(o+1.)) + (-1.27009436837)*dim
            arg[(1, 1, 0, 1)]=-0.766446611512*x[0]**o + (-0.771046991779)*x[0] + (0.0306098051665)*x[1]**o + (-0.876620756284)*x[1] + (0.29968957136)*x[2]**o + (0.421342156667)*x[2]
            ref[(1, 1, 0, 1)]=-0.436147234986*(1+2.*(dim-1)/(o+1.)) + (-1.2263255914)*dim
            arg[(1, 1, 1, 0)]=0.870866309072*x[0]**o + (0.423831428707)*x[0] + (0.555413504404)*x[1]**o + (0.745225320921)*x[1] + (-0.286519692447)*x[2]**o + (0.294479869816)*x[2]
            ref[(1, 1, 1, 0)]=1.13976012103*(1+2.*(dim-1)/(o+1.)) + (1.46353661944)*dim
            arg[(1, 1, 1, 1)]=0.0802633692414*x[0]**o + (-0.380585250637)*x[0] + (-0.887938415442)*x[1]**o + (-0.362078397356)*x[1] + (-0.0744859857284)*x[2]**o + (-0.149118250568)*x[2]
            ref[(1, 1, 1, 1)]=-0.882161031929*(1+2.*(dim-1)/(o+1.)) + (-0.891781898561)*dim
            arg[(1, 1, 2, 0)]=0.0732631147826*x[0]**o + (-0.304014321618)*x[0] + (-0.723454018629)*x[1]**o + (-0.740665185135)*x[1] + (-0.996294322149)*x[2]**o + (0.305775210301)*x[2]
            ref[(1, 1, 2, 0)]=-1.64648522599*(1+2.*(dim-1)/(o+1.)) + (-0.738904296453)*dim
            arg[(1, 1, 2, 1)]=0.920228212374*x[0]**o + (0.162690458268)*x[0] + (0.787881726801)*x[1]**o + (-0.870280440884)*x[1] + (0.423309315881)*x[2]**o + (-0.353492258627)*x[2]
            ref[(1, 1, 2, 1)]=2.13141925506*(1+2.*(dim-1)/(o+1.)) + (-1.06108224124)*dim
            arg[(1, 2, 0, 0)]=0.299940802332*x[0]**o + (0.275278388265)*x[0] + (-0.196180084795)*x[1]**o + (-0.165721015512)*x[1] + (-0.773397141987)*x[2]**o + (-0.870153649678)*x[2]
            ref[(1, 2, 0, 0)]=-0.66963642445*(1+2.*(dim-1)/(o+1.)) + (-0.760596276926)*dim
            arg[(1, 2, 0, 1)]=0.307228387656*x[0]**o + (0.196279708892)*x[0] + (-0.908954152861)*x[1]**o + (0.112449225385)*x[1] + (-0.99852921227)*x[2]**o + (0.175102631608)*x[2]
            ref[(1, 2, 0, 1)]=-1.60025497748*(1+2.*(dim-1)/(o+1.)) + (0.483831565885)*dim
            arg[(1, 2, 1, 0)]=-0.764855963618*x[0]**o + (-0.742528540223)*x[0] + (-0.480005145669)*x[1]**o + (0.710582110289)*x[1] + (0.535731624298)*x[2]**o + (0.478285551359)*x[2]
            ref[(1, 2, 1, 0)]=-0.709129484989*(1+2.*(dim-1)/(o+1.)) + (0.446339121425)*dim
            arg[(1, 2, 1, 1)]=-0.849592882512*x[0]**o + (-0.0981358817722)*x[0] + (-0.203780011132)*x[1]**o + (-0.687969231998)*x[1] + (-0.705065223098)*x[2]**o + (-0.272024981146)*x[2]
            ref[(1, 2, 1, 1)]=-1.75843811674*(1+2.*(dim-1)/(o+1.)) + (-1.05813009492)*dim
            arg[(1, 2, 2, 0)]=-0.734839033613*x[0]**o + (-0.192792993303)*x[0] + (0.0509826024579)*x[1]**o + (0.352523758091)*x[1] + (0.0347214375555)*x[2]**o + (-0.832103852808)*x[2]
            ref[(1, 2, 2, 0)]=-0.6491349936*(1+2.*(dim-1)/(o+1.)) + (-0.672373088019)*dim
            arg[(1, 2, 2, 1)]=-0.834228338613*x[0]**o + (-0.762315543949)*x[0] + (-0.587461731576)*x[1]**o + (0.363828818054)*x[1] + (-0.721164345679)*x[2]**o + (-0.136671573146)*x[2]
            ref[(1, 2, 2, 1)]=-2.14285441587*(1+2.*(dim-1)/(o+1.)) + (-0.535158299041)*dim
            arg[(1, 3, 0, 0)]=0.809722764636*x[0]**o + (0.412430583765)*x[0] + (-0.23549853665)*x[1]**o + (0.900672207186)*x[1] + (-0.849982988683)*x[2]**o + (0.283359305198)*x[2]
            ref[(1, 3, 0, 0)]=-0.275758760697*(1+2.*(dim-1)/(o+1.)) + (1.59646209615)*dim
            arg[(1, 3, 0, 1)]=0.153359861787*x[0]**o + (0.0990422990577)*x[0] + (-0.280327859895)*x[1]**o + (0.266526653449)*x[1] + (0.131404408974)*x[2]**o + (-0.464089250384)*x[2]
            ref[(1, 3, 0, 1)]=0.00443641086636*(1+2.*(dim-1)/(o+1.)) + (-0.0985202978775)*dim
            arg[(1, 3, 1, 0)]=0.0505615759212*x[0]**o + (-0.321193316212)*x[0] + (0.656493757292)*x[1]**o + (0.175414609708)*x[1] + (0.348826770806)*x[2]**o + (-0.282839752513)*x[2]
            ref[(1, 3, 1, 0)]=1.05588210402*(1+2.*(dim-1)/(o+1.)) + (-0.428618459017)*dim
            arg[(1, 3, 1, 1)]=-0.216727617023*x[0]**o + (0.339509864563)*x[0] + (-0.952494092689)*x[1]**o + (0.223743334764)*x[1] + (-0.651458547638)*x[2]**o + (-0.601909996204)*x[2]
            ref[(1, 3, 1, 1)]=-1.82068025735*(1+2.*(dim-1)/(o+1.)) + (-0.0386567968767)*dim
            arg[(1, 3, 2, 0)]=-0.203901879295*x[0]**o + (0.351809836968)*x[0] + (0.00257320603222)*x[1]**o + (0.801446169346)*x[1] + (0.612119177)*x[2]**o + (0.638471202729)*x[2]
            ref[(1, 3, 2, 0)]=0.410790503737*(1+2.*(dim-1)/(o+1.)) + (1.79172720904)*dim
            arg[(1, 3, 2, 1)]=-0.535146472644*x[0]**o + (-0.599724659459)*x[0] + (0.393954613283)*x[1]**o + (0.233503947115)*x[1] + (0.217052825548)*x[2]**o + (-0.0795515864016)*x[2]
            ref[(1, 3, 2, 1)]=0.0758609661873*(1+2.*(dim-1)/(o+1.)) + (-0.445772298746)*dim
            arg[(2, 0, 0, 0)]=-0.594095397867*x[0]**o + (0.0134688842522)*x[0] + (0.560986146735)*x[1]**o + (-0.733956140836)*x[1] + (0.560112364069)*x[2]**o + (0.151700828557)*x[2]
            ref[(2, 0, 0, 0)]=0.527003112937*(1+2.*(dim-1)/(o+1.)) + (-0.568786428027)*dim
            arg[(2, 0, 0, 1)]=0.267099195014*x[0]**o + (0.825800473634)*x[0] + (-0.507949850389)*x[1]**o + (-0.37958061828)*x[1] + (0.412114358057)*x[2]**o + (-0.884670015748)*x[2]
            ref[(2, 0, 0, 1)]=0.171263702682*(1+2.*(dim-1)/(o+1.)) + (-0.438450160394)*dim
            arg[(2, 0, 1, 0)]=0.404578461376*x[0]**o + (0.25319727866)*x[0] + (0.266083114416)*x[1]**o + (-0.769057975495)*x[1] + (-0.290998101193)*x[2]**o + (0.371272972958)*x[2]
            ref[(2, 0, 1, 0)]=0.379663474598*(1+2.*(dim-1)/(o+1.)) + (-0.144587723877)*dim
            arg[(2, 0, 1, 1)]=-0.911886176037*x[0]**o + (0.506874626751)*x[0] + (0.212752244205)*x[1]**o + (0.75616769304)*x[1] + (-0.380976928326)*x[2]**o + (0.312392738701)*x[2]
            ref[(2, 0, 1, 1)]=-1.08011086016*(1+2.*(dim-1)/(o+1.)) + (1.57543505849)*dim
            arg[(2, 0, 2, 0)]=0.610294486546*x[0]**o + (-0.596218731596)*x[0] + (0.297022135846)*x[1]**o + (-0.870526139253)*x[1] + (0.998716389292)*x[2]**o + (-0.210044272164)*x[2]
            ref[(2, 0, 2, 0)]=1.90603301168*(1+2.*(dim-1)/(o+1.)) + (-1.67678914301)*dim
            arg[(2, 0, 2, 1)]=-0.0315098571675*x[0]**o + (-0.128327238462)*x[0] + (-0.917964543204)*x[1]**o + (-0.879702213453)*x[1] + (-0.844013010394)*x[2]**o + (-0.534118923032)*x[2]
            ref[(2, 0, 2, 1)]=-1.79348741077*(1+2.*(dim-1)/(o+1.)) + (-1.54214837495)*dim
            arg[(2, 1, 0, 0)]=-0.789797320287*x[0]**o + (-0.884864249697)*x[0] + (-0.549475550046)*x[1]**o + (-0.465339782607)*x[1] + (-0.172420363681)*x[2]**o + (0.641867735213)*x[2]
            ref[(2, 1, 0, 0)]=-1.51169323401*(1+2.*(dim-1)/(o+1.)) + (-0.70833629709)*dim
            arg[(2, 1, 0, 1)]=-0.294318209157*x[0]**o + (0.140347448072)*x[0] + (0.839201519591)*x[1]**o + (0.116701977733)*x[1] + (0.0183349870623)*x[2]**o + (-0.789696028067)*x[2]
            ref[(2, 1, 0, 1)]=0.563218297497*(1+2.*(dim-1)/(o+1.)) + (-0.532646602262)*dim
            arg[(2, 1, 1, 0)]=-0.482794443111*x[0]**o + (0.131993309642)*x[0] + (-0.779400946338)*x[1]**o + (0.713166387433)*x[1] + (0.959476473002)*x[2]**o + (-0.831390453987)*x[2]
            ref[(2, 1, 1, 0)]=-0.302718916447*(1+2.*(dim-1)/(o+1.)) + (0.0137692430885)*dim
            arg[(2, 1, 1, 1)]=0.299822159899*x[0]**o + (0.291605499234)*x[0] + (-0.03240333044)*x[1]**o + (0.753698794009)*x[1] + (-0.512875271259)*x[2]**o + (-0.789622760365)*x[2]
            ref[(2, 1, 1, 1)]=-0.2454564418*(1+2.*(dim-1)/(o+1.)) + (0.255681532878)*dim
            arg[(2, 1, 2, 0)]=-0.292685945067*x[0]**o + (-0.963440989567)*x[0] + (-0.711009890887)*x[1]**o + (0.399945347212)*x[1] + (-0.816348599583)*x[2]**o + (-0.993301054747)*x[2]
            ref[(2, 1, 2, 0)]=-1.82004443554*(1+2.*(dim-1)/(o+1.)) + (-1.5567966971)*dim
            arg[(2, 1, 2, 1)]=-0.957478603988*x[0]**o + (0.695952683159)*x[0] + (-0.872571545456)*x[1]**o + (0.0701341960123)*x[1] + (-0.460915508098)*x[2]**o + (0.668463571732)*x[2]
            ref[(2, 1, 2, 1)]=-2.29096565754*(1+2.*(dim-1)/(o+1.)) + (1.4345504509)*dim
            arg[(2, 2, 0, 0)]=-0.022140537545*x[0]**o + (-0.322544581955)*x[0] + (0.173270158774)*x[1]**o + (-0.0735561092001)*x[1] + (-0.752047201408)*x[2]**o + (0.949956580944)*x[2]
            ref[(2, 2, 0, 0)]=-0.60091758018*(1+2.*(dim-1)/(o+1.)) + (0.553855889789)*dim
            arg[(2, 2, 0, 1)]=0.00273448577954*x[0]**o + (0.323287475561)*x[0] + (0.025158305147)*x[1]**o + (0.271539041921)*x[1] + (-0.299592171432)*x[2]**o + (-0.013111495481)*x[2]
            ref[(2, 2, 0, 1)]=-0.271699380505*(1+2.*(dim-1)/(o+1.)) + (0.581715022002)*dim
            arg[(2, 2, 1, 0)]=0.82096148208*x[0]**o + (0.555601842036)*x[0] + (0.285916790961)*x[1]**o + (0.737225592361)*x[1] + (0.445669788447)*x[2]**o + (-0.272416348558)*x[2]
            ref[(2, 2, 1, 0)]=1.55254806149*(1+2.*(dim-1)/(o+1.)) + (1.02041108584)*dim
            arg[(2, 2, 1, 1)]=-0.0545840011904*x[0]**o + (-0.240048297738)*x[0] + (0.230239236285)*x[1]**o + (-0.940017358719)*x[1] + (0.213170163323)*x[2]**o + (0.175616503044)*x[2]
            ref[(2, 2, 1, 1)]=0.388825398418*(1+2.*(dim-1)/(o+1.)) + (-1.00444915341)*dim
            arg[(2, 2, 2, 0)]=0.798508256458*x[0]**o + (-0.398380822974)*x[0] + (0.527954681656)*x[1]**o + (0.317021580048)*x[1] + (0.746782727738)*x[2]**o + (-0.475764809401)*x[2]
            ref[(2, 2, 2, 0)]=2.07324566585*(1+2.*(dim-1)/(o+1.)) + (-0.557124052328)*dim
            arg[(2, 2, 2, 1)]=-0.887983578564*x[0]**o + (-0.311091145676)*x[0] + (0.589769287266)*x[1]**o + (0.485558943576)*x[1] + (0.956590193135)*x[2]**o + (-0.638810560112)*x[2]
            ref[(2, 2, 2, 1)]=0.658375901836*(1+2.*(dim-1)/(o+1.)) + (-0.464342762212)*dim
            arg[(2, 3, 0, 0)]=0.41400843001*x[0]**o + (0.856684994001)*x[0] + (0.249894908767)*x[1]**o + (0.0116347583476)*x[1] + (-0.558826270804)*x[2]**o + (-0.0941244150063)*x[2]
            ref[(2, 3, 0, 0)]=0.105077067973*(1+2.*(dim-1)/(o+1.)) + (0.774195337343)*dim
            arg[(2, 3, 0, 1)]=-0.764790870809*x[0]**o + (-0.248084319192)*x[0] + (0.66705841678)*x[1]**o + (0.649981000507)*x[1] + (-0.388703845963)*x[2]**o + (-0.909896467418)*x[2]
            ref[(2, 3, 0, 1)]=-0.486436299992*(1+2.*(dim-1)/(o+1.)) + (-0.507999786104)*dim
            arg[(2, 3, 1, 0)]=-0.691246260241*x[0]**o + (-0.883845850736)*x[0] + (-0.985476977705)*x[1]**o + (0.0622283342234)*x[1] + (-0.496602739467)*x[2]**o + (-0.290561622125)*x[2]
            ref[(2, 3, 1, 0)]=-2.17332597741*(1+2.*(dim-1)/(o+1.)) + (-1.11217913864)*dim
            arg[(2, 3, 1, 1)]=0.23061929321*x[0]**o + (-0.799007401281)*x[0] + (0.164959177247)*x[1]**o + (-0.748619147456)*x[1] + (-0.701866218446)*x[2]**o + (0.914658109711)*x[2]
            ref[(2, 3, 1, 1)]=-0.306287747989*(1+2.*(dim-1)/(o+1.)) + (-0.632968439026)*dim
            arg[(2, 3, 2, 0)]=-0.400460694036*x[0]**o + (-0.25774822591)*x[0] + (-0.00785274747965)*x[1]**o + (0.502162241971)*x[1] + (-0.427641384803)*x[2]**o + (-0.927664362637)*x[2]
            ref[(2, 3, 2, 0)]=-0.835954826319*(1+2.*(dim-1)/(o+1.)) + (-0.683250346576)*dim
            arg[(2, 3, 2, 1)]=0.689299826332*x[0]**o + (-0.0160284918964)*x[0] + (-0.0111575837238)*x[1]**o + (0.24634945806)*x[1] + (-0.656224657281)*x[2]**o + (-0.839954370452)*x[2]
            ref[(2, 3, 2, 1)]=0.0219175853268*(1+2.*(dim-1)/(o+1.)) + (-0.609633404288)*dim
            arg[(3, 0, 0, 0)]=0.201486843878*x[0]**o + (-0.425456433146)*x[0] + (-0.247553262333)*x[1]**o + (-0.0611123749327)*x[1] + (0.308408420948)*x[2]**o + (-0.0795365459086)*x[2]
            ref[(3, 0, 0, 0)]=0.262342002493*(1+2.*(dim-1)/(o+1.)) + (-0.566105353987)*dim
            arg[(3, 0, 0, 1)]=-0.787610750346*x[0]**o + (0.332190127956)*x[0] + (-0.490893859808)*x[1]**o + (-0.339375041521)*x[1] + (-0.942757489972)*x[2]**o + (-0.53366148008)*x[2]
            ref[(3, 0, 0, 1)]=-2.22126210013*(1+2.*(dim-1)/(o+1.)) + (-0.540846393645)*dim
            arg[(3, 0, 1, 0)]=-0.542628868206*x[0]**o + (-0.0214773902515)*x[0] + (-0.821266870203)*x[1]**o + (0.125660373625)*x[1] + (-0.776431509398)*x[2]**o + (0.528549105545)*x[2]
            ref[(3, 0, 1, 0)]=-2.14032724781*(1+2.*(dim-1)/(o+1.)) + (0.632732088918)*dim
            arg[(3, 0, 1, 1)]=0.379562176684*x[0]**o + (-0.859842805014)*x[0] + (0.788482028821)*x[1]**o + (-0.181076468424)*x[1] + (0.879590347342)*x[2]**o + (0.122760470328)*x[2]
            ref[(3, 0, 1, 1)]=2.04763455285*(1+2.*(dim-1)/(o+1.)) + (-0.91815880311)*dim
            arg[(3, 0, 2, 0)]=-0.206977759566*x[0]**o + (0.176185710921)*x[0] + (0.0661049491711)*x[1]**o + (0.732234186403)*x[1] + (-0.923136657128)*x[2]**o + (-0.440295615541)*x[2]
            ref[(3, 0, 2, 0)]=-1.06400946752*(1+2.*(dim-1)/(o+1.)) + (0.468124281784)*dim
            arg[(3, 0, 2, 1)]=-0.266363487043*x[0]**o + (-0.606541085844)*x[0] + (0.432746821035)*x[1]**o + (-0.677544825912)*x[1] + (0.835828397802)*x[2]**o + (-0.172820094291)*x[2]
            ref[(3, 0, 2, 1)]=1.00221173179*(1+2.*(dim-1)/(o+1.)) + (-1.45690600605)*dim
            arg[(3, 1, 0, 0)]=0.669035606613*x[0]**o + (0.606718725644)*x[0] + (0.010500926142)*x[1]**o + (0.524755168933)*x[1] + (0.822345940071)*x[2]**o + (0.613595839747)*x[2]
            ref[(3, 1, 0, 0)]=1.50188247283*(1+2.*(dim-1)/(o+1.)) + (1.74506973432)*dim
            arg[(3, 1, 0, 1)]=0.130187754139*x[0]**o + (-0.164957556387)*x[0] + (-0.0167273334955)*x[1]**o + (0.845997854751)*x[1] + (0.18109023297)*x[2]**o + (0.873031582406)*x[2]
            ref[(3, 1, 0, 1)]=0.294550653614*(1+2.*(dim-1)/(o+1.)) + (1.55407188077)*dim
            arg[(3, 1, 1, 0)]=-0.270701098188*x[0]**o + (0.892937676877)*x[0] + (0.984505623022)*x[1]**o + (-0.900772260664)*x[1] + (0.438860525014)*x[2]**o + (0.205380264785)*x[2]
            ref[(3, 1, 1, 0)]=1.15266504985*(1+2.*(dim-1)/(o+1.)) + (0.197545680998)*dim
            arg[(3, 1, 1, 1)]=-0.877299370185*x[0]**o + (0.596646695582)*x[0] + (0.401223775461)*x[1]**o + (-0.0960995724053)*x[1] + (-0.993190496175)*x[2]**o + (-0.122036792036)*x[2]
            ref[(3, 1, 1, 1)]=-1.4692660909*(1+2.*(dim-1)/(o+1.)) + (0.378510331141)*dim
            arg[(3, 1, 2, 0)]=0.761496147063*x[0]**o + (-0.119839338059)*x[0] + (-0.342648757291)*x[1]**o + (-0.295903042224)*x[1] + (0.268693333545)*x[2]**o + (-0.929733951984)*x[2]
            ref[(3, 1, 2, 0)]=0.687540723316*(1+2.*(dim-1)/(o+1.)) + (-1.34547633227)*dim
            arg[(3, 1, 2, 1)]=0.69286868047*x[0]**o + (0.246835541706)*x[0] + (-0.968850082137)*x[1]**o + (-0.67695689405)*x[1] + (0.97019178281)*x[2]**o + (-0.77160967706)*x[2]
            ref[(3, 1, 2, 1)]=0.694210381144*(1+2.*(dim-1)/(o+1.)) + (-1.2017310294)*dim
            arg[(3, 2, 0, 0)]=0.590076775952*x[0]**o + (0.680468942487)*x[0] + (0.301373935165)*x[1]**o + (0.961534174615)*x[1] + (-0.930213792507)*x[2]**o + (0.749346851941)*x[2]
            ref[(3, 2, 0, 0)]=-0.0387630813896*(1+2.*(dim-1)/(o+1.)) + (2.39134996904)*dim
            arg[(3, 2, 0, 1)]=0.0966132996384*x[0]**o + (0.683075853817)*x[0] + (0.580440708257)*x[1]**o + (0.510979066019)*x[1] + (0.529364573386)*x[2]**o + (-0.268059398096)*x[2]
            ref[(3, 2, 0, 1)]=1.20641858128*(1+2.*(dim-1)/(o+1.)) + (0.92599552174)*dim
            arg[(3, 2, 1, 0)]=0.365571702041*x[0]**o + (0.858669171572)*x[0] + (0.055976127713)*x[1]**o + (0.751371277008)*x[1] + (0.198975959226)*x[2]**o + (-0.467578263584)*x[2]
            ref[(3, 2, 1, 0)]=0.62052378898*(1+2.*(dim-1)/(o+1.)) + (1.142462185)*dim
            arg[(3, 2, 1, 1)]=-0.407639470812*x[0]**o + (-0.592311840279)*x[0] + (-0.557034575673)*x[1]**o + (-0.541186951057)*x[1] + (-0.549472393006)*x[2]**o + (0.713911853828)*x[2]
            ref[(3, 2, 1, 1)]=-1.51414643949*(1+2.*(dim-1)/(o+1.)) + (-0.419586937508)*dim
            arg[(3, 2, 2, 0)]=-0.158269681021*x[0]**o + (0.109125047814)*x[0] + (-0.249055341801)*x[1]**o + (-0.339579697924)*x[1] + (0.52942351524)*x[2]**o + (-0.725210398013)*x[2]
            ref[(3, 2, 2, 0)]=0.122098492417*(1+2.*(dim-1)/(o+1.)) + (-0.955665048123)*dim
            arg[(3, 2, 2, 1)]=0.142995865304*x[0]**o + (0.071899115777)*x[0] + (0.481387117003)*x[1]**o + (-0.834942135902)*x[1] + (0.96282989415)*x[2]**o + (-0.858359013477)*x[2]
            ref[(3, 2, 2, 1)]=1.58721287646*(1+2.*(dim-1)/(o+1.)) + (-1.6214020336)*dim
            arg[(3, 3, 0, 0)]=0.460732896562*x[0]**o + (-0.174544213173)*x[0] + (-0.606853205235)*x[1]**o + (-0.52087830538)*x[1] + (0.346115990695)*x[2]**o + (0.60593851763)*x[2]
            ref[(3, 3, 0, 0)]=0.199995682022*(1+2.*(dim-1)/(o+1.)) + (-0.0894840009234)*dim
            arg[(3, 3, 0, 1)]=-0.0987347139895*x[0]**o + (-0.639631185313)*x[0] + (0.461730230304)*x[1]**o + (-0.427809635784)*x[1] + (-0.990249101346)*x[2]**o + (0.323490331808)*x[2]
            ref[(3, 3, 0, 1)]=-0.627253585031*(1+2.*(dim-1)/(o+1.)) + (-0.74395048929)*dim
            arg[(3, 3, 1, 0)]=-0.479186448213*x[0]**o + (-0.660562233579)*x[0] + (0.959345453287)*x[1]**o + (0.326423767498)*x[1] + (-0.262122320576)*x[2]**o + (0.744493790879)*x[2]
            ref[(3, 3, 1, 0)]=0.218036684499*(1+2.*(dim-1)/(o+1.)) + (0.410355324798)*dim
            arg[(3, 3, 1, 1)]=0.619901548748*x[0]**o + (0.676882490702)*x[0] + (0.374744710228)*x[1]**o + (0.00421975649081)*x[1] + (-0.45533392261)*x[2]**o + (-0.935138479488)*x[2]
            ref[(3, 3, 1, 1)]=0.539312336367*(1+2.*(dim-1)/(o+1.)) + (-0.254036232296)*dim
            arg[(3, 3, 2, 0)]=0.110183138557*x[0]**o + (0.656618391927)*x[0] + (0.429385272439)*x[1]**o + (-0.992854029438)*x[1] + (0.372234361278)*x[2]**o + (0.823688232636)*x[2]
            ref[(3, 3, 2, 0)]=0.911802772274*(1+2.*(dim-1)/(o+1.)) + (0.487452595126)*dim
            arg[(3, 3, 2, 1)]=0.573667127848*x[0]**o + (-0.790297755757)*x[0] + (0.751789747029)*x[1]**o + (0.587577416798)*x[1] + (0.96055625141)*x[2]**o + (-0.575054217477)*x[2]
            ref[(3, 3, 2, 1)]=2.28601312629*(1+2.*(dim-1)/(o+1.)) + (-0.777774556436)*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.206556706288*x[0] + (-0.946215486466)*x[1]
            ref=-0.739658780178*dim
        else:
            arg=0.809648438129*x[0] + (-0.523939024198)*x[1] + (0.301316488927)*x[2]
            ref=0.587025902858*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.624170936764*x[0] + (-0.528999954121)*x[1]
            ref[(0,)]=-1.15317089089*dim
            arg[(1,)]=0.827488552515*x[0] + (0.0406557551302)*x[1]
            ref[(1,)]=0.868144307645*dim
            arg[(2,)]=0.593984856528*x[0] + (0.730444268186)*x[1]
            ref[(2,)]=1.32442912471*dim
        else:
            arg[(0,)]=0.37927264701*x[0] + (-0.119878947213)*x[1] + (0.669754220485)*x[2]
            ref[(0,)]=0.929147920282*dim
            arg[(1,)]=0.413349921834*x[0] + (-0.009859743728)*x[1] + (0.589528360037)*x[2]
            ref[(1,)]=0.993018538144*dim
            arg[(2,)]=-0.872003141182*x[0] + (-0.744928787148)*x[1] + (0.988268376073)*x[2]
            ref[(2,)]=-0.628663552258*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.32253861817*x[0] + (0.247698748904)*x[1]
            ref[(0, 0)]=0.570237367074*dim
            arg[(0, 1)]=-0.278114139891*x[0] + (0.759481646398)*x[1]
            ref[(0, 1)]=0.481367506507*dim
            arg[(0, 2)]=-0.666049431341*x[0] + (0.775431822598)*x[1]
            ref[(0, 2)]=0.109382391257*dim
            arg[(0, 3)]=-0.685416370121*x[0] + (0.856635288148)*x[1]
            ref[(0, 3)]=0.171218918027*dim
            arg[(1, 0)]=-0.497156685533*x[0] + (0.152993401765)*x[1]
            ref[(1, 0)]=-0.344163283768*dim
            arg[(1, 1)]=-0.0957230259158*x[0] + (-0.056545638582)*x[1]
            ref[(1, 1)]=-0.152268664498*dim
            arg[(1, 2)]=0.881331512317*x[0] + (-0.422823205445)*x[1]
            ref[(1, 2)]=0.458508306871*dim
            arg[(1, 3)]=-0.830193987439*x[0] + (0.416812103856)*x[1]
            ref[(1, 3)]=-0.413381883583*dim
            arg[(2, 0)]=-0.51657024019*x[0] + (0.750564726892)*x[1]
            ref[(2, 0)]=0.233994486702*dim
            arg[(2, 1)]=-0.592211158416*x[0] + (-0.908289557246)*x[1]
            ref[(2, 1)]=-1.50050071566*dim
            arg[(2, 2)]=-0.532012970557*x[0] + (0.252101856787)*x[1]
            ref[(2, 2)]=-0.279911113771*dim
            arg[(2, 3)]=-0.610060253702*x[0] + (-0.587686508889)*x[1]
            ref[(2, 3)]=-1.19774676259*dim
            arg[(3, 0)]=-0.765725024825*x[0] + (-0.0596150149475)*x[1]
            ref[(3, 0)]=-0.825340039772*dim
            arg[(3, 1)]=-0.874911423077*x[0] + (0.00199213249481)*x[1]
            ref[(3, 1)]=-0.872919290582*dim
            arg[(3, 2)]=0.139939363191*x[0] + (0.843143920995)*x[1]
            ref[(3, 2)]=0.983083284186*dim
            arg[(3, 3)]=0.896667705883*x[0] + (0.481631853074)*x[1]
            ref[(3, 3)]=1.37829955896*dim
        else:
            arg[(0, 0)]=-0.265901961603*x[0] + (0.640748410975)*x[1] + (-0.876366515294)*x[2]
            ref[(0, 0)]=-0.501520065922*dim
            arg[(0, 1)]=-0.464431713337*x[0] + (0.0629226089156)*x[1] + (-0.369672316721)*x[2]
            ref[(0, 1)]=-0.771181421142*dim
            arg[(0, 2)]=0.781608411811*x[0] + (0.0804215925494)*x[1] + (0.763936804315)*x[2]
            ref[(0, 2)]=1.62596680868*dim
            arg[(0, 3)]=0.326655485908*x[0] + (-0.0595135014875)*x[1] + (-0.127734450043)*x[2]
            ref[(0, 3)]=0.139407534377*dim
            arg[(1, 0)]=-0.102555190795*x[0] + (0.881138407933)*x[1] + (0.257674758293)*x[2]
            ref[(1, 0)]=1.03625797543*dim
            arg[(1, 1)]=-0.268622865766*x[0] + (0.962056520755)*x[1] + (-0.9448830877)*x[2]
            ref[(1, 1)]=-0.251449432711*dim
            arg[(1, 2)]=-0.412145124818*x[0] + (-0.739457005684)*x[1] + (-0.761392135013)*x[2]
            ref[(1, 2)]=-1.91299426552*dim
            arg[(1, 3)]=-0.865992800001*x[0] + (0.24069947939)*x[1] + (-0.172300053407)*x[2]
            ref[(1, 3)]=-0.797593374018*dim
            arg[(2, 0)]=0.304003003051*x[0] + (0.806128595948)*x[1] + (-0.237900794193)*x[2]
            ref[(2, 0)]=0.872230804806*dim
            arg[(2, 1)]=-0.729267835562*x[0] + (-0.606850352164)*x[1] + (-0.0536779412342)*x[2]
            ref[(2, 1)]=-1.38979612896*dim
            arg[(2, 2)]=-0.236344161024*x[0] + (0.509574233335)*x[1] + (-0.528601384676)*x[2]
            ref[(2, 2)]=-0.255371312365*dim
            arg[(2, 3)]=0.628905383244*x[0] + (0.883013222696)*x[1] + (-0.0468168339704)*x[2]
            ref[(2, 3)]=1.46510177197*dim
            arg[(3, 0)]=-0.764753050391*x[0] + (-0.396957763172)*x[1] + (-0.876621022794)*x[2]
            ref[(3, 0)]=-2.03833183636*dim
            arg[(3, 1)]=-0.33430349226*x[0] + (0.715747752755)*x[1] + (0.602473206617)*x[2]
            ref[(3, 1)]=0.983917467112*dim
            arg[(3, 2)]=-0.288827985609*x[0] + (-0.89686530075)*x[1] + (-0.52639572478)*x[2]
            ref[(3, 2)]=-1.71208901114*dim
            arg[(3, 3)]=0.198191867526*x[0] + (0.407487782329)*x[1] + (-0.346697458437)*x[2]
            ref[(3, 3)]=0.258982191418*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref=numpy.zeros((3, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.171738722521*x[0] + (0.253181025286)*x[1]
            ref[(0, 0, 0)]=0.424919747806*dim
            arg[(0, 0, 1)]=-0.725613635947*x[0] + (-0.204109097091)*x[1]
            ref[(0, 0, 1)]=-0.929722733037*dim
            arg[(0, 0, 2)]=0.553757399051*x[0] + (0.460830918086)*x[1]
            ref[(0, 0, 2)]=1.01458831714*dim
            arg[(0, 0, 3)]=0.400675305347*x[0] + (0.594841616882)*x[1]
            ref[(0, 0, 3)]=0.995516922228*dim
            arg[(0, 1, 0)]=0.837091982966*x[0] + (-0.368554087313)*x[1]
            ref[(0, 1, 0)]=0.468537895653*dim
            arg[(0, 1, 1)]=0.737205018283*x[0] + (0.180643035766)*x[1]
            ref[(0, 1, 1)]=0.917848054049*dim
            arg[(0, 1, 2)]=0.111237195678*x[0] + (0.190093362799)*x[1]
            ref[(0, 1, 2)]=0.301330558477*dim
            arg[(0, 1, 3)]=0.252766843289*x[0] + (0.457675759448)*x[1]
            ref[(0, 1, 3)]=0.710442602738*dim
            arg[(0, 2, 0)]=-0.042205006756*x[0] + (-0.943292979313)*x[1]
            ref[(0, 2, 0)]=-0.985497986069*dim
            arg[(0, 2, 1)]=0.0890666720188*x[0] + (0.511851339048)*x[1]
            ref[(0, 2, 1)]=0.600918011067*dim
            arg[(0, 2, 2)]=0.27784204168*x[0] + (0.0609196663816)*x[1]
            ref[(0, 2, 2)]=0.338761708062*dim
            arg[(0, 2, 3)]=-0.779829184555*x[0] + (0.360188736665)*x[1]
            ref[(0, 2, 3)]=-0.41964044789*dim
            arg[(1, 0, 0)]=-0.381885930902*x[0] + (0.916596978419)*x[1]
            ref[(1, 0, 0)]=0.534711047517*dim
            arg[(1, 0, 1)]=0.638711268567*x[0] + (0.00894278927133)*x[1]
            ref[(1, 0, 1)]=0.647654057838*dim
            arg[(1, 0, 2)]=-0.962707224572*x[0] + (0.483444550919)*x[1]
            ref[(1, 0, 2)]=-0.479262673652*dim
            arg[(1, 0, 3)]=-0.0813565595696*x[0] + (-0.315688223446)*x[1]
            ref[(1, 0, 3)]=-0.397044783016*dim
            arg[(1, 1, 0)]=-0.738733767295*x[0] + (0.696982626672)*x[1]
            ref[(1, 1, 0)]=-0.0417511406225*dim
            arg[(1, 1, 1)]=0.394326824388*x[0] + (-0.642726720565)*x[1]
            ref[(1, 1, 1)]=-0.248399896177*dim
            arg[(1, 1, 2)]=0.0205552213103*x[0] + (-0.965259260306)*x[1]
            ref[(1, 1, 2)]=-0.944704038996*dim
            arg[(1, 1, 3)]=0.46841202*x[0] + (-0.341654993386)*x[1]
            ref[(1, 1, 3)]=0.126757026614*dim
            arg[(1, 2, 0)]=0.404063333883*x[0] + (-0.450941422417)*x[1]
            ref[(1, 2, 0)]=-0.0468780885341*dim
            arg[(1, 2, 1)]=0.104359257281*x[0] + (-0.287080291918)*x[1]
            ref[(1, 2, 1)]=-0.182721034637*dim
            arg[(1, 2, 2)]=0.207641212467*x[0] + (-0.682128657908)*x[1]
            ref[(1, 2, 2)]=-0.474487445442*dim
            arg[(1, 2, 3)]=0.382123483547*x[0] + (0.964773128628)*x[1]
            ref[(1, 2, 3)]=1.34689661218*dim
            arg[(2, 0, 0)]=0.244788590866*x[0] + (-0.659533142322)*x[1]
            ref[(2, 0, 0)]=-0.414744551456*dim
            arg[(2, 0, 1)]=-0.278131146122*x[0] + (-0.988685538137)*x[1]
            ref[(2, 0, 1)]=-1.26681668426*dim
            arg[(2, 0, 2)]=0.392295298419*x[0] + (0.708580403088)*x[1]
            ref[(2, 0, 2)]=1.10087570151*dim
            arg[(2, 0, 3)]=-0.821114878884*x[0] + (0.444843330889)*x[1]
            ref[(2, 0, 3)]=-0.376271547996*dim
            arg[(2, 1, 0)]=0.764353544091*x[0] + (-0.00703729059127)*x[1]
            ref[(2, 1, 0)]=0.757316253499*dim
            arg[(2, 1, 1)]=-0.142529992546*x[0] + (-0.847726864187)*x[1]
            ref[(2, 1, 1)]=-0.990256856733*dim
            arg[(2, 1, 2)]=-0.0843855050683*x[0] + (0.465933524305)*x[1]
            ref[(2, 1, 2)]=0.381548019237*dim
            arg[(2, 1, 3)]=0.0191456441168*x[0] + (-0.718858959209)*x[1]
            ref[(2, 1, 3)]=-0.699713315092*dim
            arg[(2, 2, 0)]=0.800538755666*x[0] + (0.659586523362)*x[1]
            ref[(2, 2, 0)]=1.46012527903*dim
            arg[(2, 2, 1)]=-0.530148519767*x[0] + (0.229264083113)*x[1]
            ref[(2, 2, 1)]=-0.300884436654*dim
            arg[(2, 2, 2)]=-0.0896801349006*x[0] + (0.168322024036)*x[1]
            ref[(2, 2, 2)]=0.0786418891352*dim
            arg[(2, 2, 3)]=-0.277570759117*x[0] + (0.354328828327)*x[1]
            ref[(2, 2, 3)]=0.0767580692097*dim
        else:
            arg[(0, 0, 0)]=0.897622574237*x[0] + (-0.340611560927)*x[1] + (-0.730491235371)*x[2]
            ref[(0, 0, 0)]=-0.173480222061*dim
            arg[(0, 0, 1)]=0.406480414248*x[0] + (-0.226295711018)*x[1] + (0.650955149276)*x[2]
            ref[(0, 0, 1)]=0.831139852506*dim
            arg[(0, 0, 2)]=-0.854837576432*x[0] + (-0.960370771717)*x[1] + (0.131958600133)*x[2]
            ref[(0, 0, 2)]=-1.68324974802*dim
            arg[(0, 0, 3)]=0.92891998447*x[0] + (0.138314204528)*x[1] + (0.662909234111)*x[2]
            ref[(0, 0, 3)]=1.73014342311*dim
            arg[(0, 1, 0)]=0.408810365675*x[0] + (-0.421093137242)*x[1] + (-0.899935494502)*x[2]
            ref[(0, 1, 0)]=-0.912218266068*dim
            arg[(0, 1, 1)]=0.0508787410905*x[0] + (0.577930191849)*x[1] + (0.741117405983)*x[2]
            ref[(0, 1, 1)]=1.36992633892*dim
            arg[(0, 1, 2)]=-0.0600079813125*x[0] + (0.74974327166)*x[1] + (-0.462753807521)*x[2]
            ref[(0, 1, 2)]=0.226981482826*dim
            arg[(0, 1, 3)]=-0.153431318481*x[0] + (0.9417106052)*x[1] + (0.782731858486)*x[2]
            ref[(0, 1, 3)]=1.57101114521*dim
            arg[(0, 2, 0)]=-0.825651947698*x[0] + (-0.820719629967)*x[1] + (0.118001368173)*x[2]
            ref[(0, 2, 0)]=-1.52837020949*dim
            arg[(0, 2, 1)]=-0.981555614293*x[0] + (-0.53563422117)*x[1] + (0.99584877857)*x[2]
            ref[(0, 2, 1)]=-0.521341056893*dim
            arg[(0, 2, 2)]=0.498761367183*x[0] + (0.603490096811)*x[1] + (-0.294670574713)*x[2]
            ref[(0, 2, 2)]=0.80758088928*dim
            arg[(0, 2, 3)]=-0.10476415225*x[0] + (0.0385013092931)*x[1] + (-0.106150196661)*x[2]
            ref[(0, 2, 3)]=-0.172413039618*dim
            arg[(1, 0, 0)]=0.388137430861*x[0] + (-0.538569064188)*x[1] + (-0.144153146666)*x[2]
            ref[(1, 0, 0)]=-0.294584779993*dim
            arg[(1, 0, 1)]=-0.803274296569*x[0] + (-0.672089683878)*x[1] + (0.710847651689)*x[2]
            ref[(1, 0, 1)]=-0.764516328758*dim
            arg[(1, 0, 2)]=-0.92534440487*x[0] + (0.241423358101)*x[1] + (0.26246935802)*x[2]
            ref[(1, 0, 2)]=-0.421451688748*dim
            arg[(1, 0, 3)]=-0.393732744114*x[0] + (-0.896988254353)*x[1] + (-0.0825742761039)*x[2]
            ref[(1, 0, 3)]=-1.37329527457*dim
            arg[(1, 1, 0)]=-0.534719254149*x[0] + (0.420011815676)*x[1] + (-0.00578768812638)*x[2]
            ref[(1, 1, 0)]=-0.120495126599*dim
            arg[(1, 1, 1)]=-0.202346065885*x[0] + (0.869027168488)*x[1] + (-0.538847386825)*x[2]
            ref[(1, 1, 1)]=0.127833715777*dim
            arg[(1, 1, 2)]=0.457069789492*x[0] + (-0.04863831631)*x[1] + (0.249271095997)*x[2]
            ref[(1, 1, 2)]=0.657702569179*dim
            arg[(1, 1, 3)]=-0.62417054939*x[0] + (-0.859144060002)*x[1] + (0.570385065139)*x[2]
            ref[(1, 1, 3)]=-0.912929544252*dim
            arg[(1, 2, 0)]=0.928447178604*x[0] + (0.496844258881)*x[1] + (-0.295043626851)*x[2]
            ref[(1, 2, 0)]=1.13024781063*dim
            arg[(1, 2, 1)]=-0.502728749133*x[0] + (0.335977706147)*x[1] + (0.599883035334)*x[2]
            ref[(1, 2, 1)]=0.433131992348*dim
            arg[(1, 2, 2)]=-0.58267458436*x[0] + (0.964312912826)*x[1] + (0.789930093489)*x[2]
            ref[(1, 2, 2)]=1.17156842196*dim
            arg[(1, 2, 3)]=-0.0214473564925*x[0] + (-0.823741608625)*x[1] + (-0.392286853742)*x[2]
            ref[(1, 2, 3)]=-1.23747581886*dim
            arg[(2, 0, 0)]=-0.360455902134*x[0] + (-0.134495535216)*x[1] + (-0.796474412913)*x[2]
            ref[(2, 0, 0)]=-1.29142585026*dim
            arg[(2, 0, 1)]=0.865429155064*x[0] + (-0.79913190349)*x[1] + (0.543395473885)*x[2]
            ref[(2, 0, 1)]=0.609692725459*dim
            arg[(2, 0, 2)]=0.382039984249*x[0] + (-0.782579457811)*x[1] + (-0.174572196501)*x[2]
            ref[(2, 0, 2)]=-0.575111670063*dim
            arg[(2, 0, 3)]=-0.904216245488*x[0] + (0.187118529262)*x[1] + (0.982395295216)*x[2]
            ref[(2, 0, 3)]=0.26529757899*dim
            arg[(2, 1, 0)]=-0.797696740693*x[0] + (0.191499339342)*x[1] + (0.569227963908)*x[2]
            ref[(2, 1, 0)]=-0.0369694374427*dim
            arg[(2, 1, 1)]=-0.215451907683*x[0] + (-0.0271685667611)*x[1] + (0.962029382083)*x[2]
            ref[(2, 1, 1)]=0.719408907638*dim
            arg[(2, 1, 2)]=-0.33427894476*x[0] + (0.762801146978)*x[1] + (-0.222261724526)*x[2]
            ref[(2, 1, 2)]=0.206260477692*dim
            arg[(2, 1, 3)]=-0.396823381844*x[0] + (0.0399980883065)*x[1] + (0.620196003847)*x[2]
            ref[(2, 1, 3)]=0.26337071031*dim
            arg[(2, 2, 0)]=-0.363039559479*x[0] + (-0.318527623642)*x[1] + (0.058961911153)*x[2]
            ref[(2, 2, 0)]=-0.622605271968*dim
            arg[(2, 2, 1)]=0.681058953369*x[0] + (-0.339968013993)*x[1] + (-0.383619292743)*x[2]
            ref[(2, 2, 1)]=-0.0425283533667*dim
            arg[(2, 2, 2)]=-0.642623998749*x[0] + (0.697911264116)*x[1] + (-0.261911236423)*x[2]
            ref[(2, 2, 2)]=-0.206623971056*dim
            arg[(2, 2, 3)]=-0.652987233906*x[0] + (-0.0199752761979)*x[1] + (-0.232334753331)*x[2]
            ref[(2, 2, 3)]=-0.905297263435*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4, 4),w)
        ref=numpy.zeros((4, 3, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.608274026894*x[0] + (-0.501349484623)*x[1]
            ref[(0, 0, 0, 0)]=-1.10962351152*dim
            arg[(0, 0, 0, 1)]=0.683810616371*x[0] + (0.976504589175)*x[1]
            ref[(0, 0, 0, 1)]=1.66031520555*dim
            arg[(0, 0, 0, 2)]=0.354466427992*x[0] + (-0.239653597043)*x[1]
            ref[(0, 0, 0, 2)]=0.114812830949*dim
            arg[(0, 0, 0, 3)]=0.928605847922*x[0] + (-0.210187607002)*x[1]
            ref[(0, 0, 0, 3)]=0.718418240921*dim
            arg[(0, 0, 1, 0)]=0.488149487942*x[0] + (-0.836533570176)*x[1]
            ref[(0, 0, 1, 0)]=-0.348384082233*dim
            arg[(0, 0, 1, 1)]=-0.658831352427*x[0] + (0.957102531589)*x[1]
            ref[(0, 0, 1, 1)]=0.298271179163*dim
            arg[(0, 0, 1, 2)]=0.965138811149*x[0] + (0.525298471666)*x[1]
            ref[(0, 0, 1, 2)]=1.49043728282*dim
            arg[(0, 0, 1, 3)]=-0.960989888594*x[0] + (-0.0886834645251)*x[1]
            ref[(0, 0, 1, 3)]=-1.04967335312*dim
            arg[(0, 0, 2, 0)]=-0.571543502871*x[0] + (0.475318962025)*x[1]
            ref[(0, 0, 2, 0)]=-0.0962245408458*dim
            arg[(0, 0, 2, 1)]=0.162787057073*x[0] + (0.943255467263)*x[1]
            ref[(0, 0, 2, 1)]=1.10604252434*dim
            arg[(0, 0, 2, 2)]=0.736428485237*x[0] + (-0.438530767668)*x[1]
            ref[(0, 0, 2, 2)]=0.297897717569*dim
            arg[(0, 0, 2, 3)]=0.907494125162*x[0] + (0.997079847259)*x[1]
            ref[(0, 0, 2, 3)]=1.90457397242*dim
            arg[(0, 0, 3, 0)]=0.818174501857*x[0] + (-0.59092722348)*x[1]
            ref[(0, 0, 3, 0)]=0.227247278377*dim
            arg[(0, 0, 3, 1)]=-0.748666614779*x[0] + (-0.544761748961)*x[1]
            ref[(0, 0, 3, 1)]=-1.29342836374*dim
            arg[(0, 0, 3, 2)]=-0.0975974647477*x[0] + (0.126081380512)*x[1]
            ref[(0, 0, 3, 2)]=0.0284839157639*dim
            arg[(0, 0, 3, 3)]=0.860746883806*x[0] + (-0.642693747856)*x[1]
            ref[(0, 0, 3, 3)]=0.21805313595*dim
            arg[(0, 1, 0, 0)]=0.960791419957*x[0] + (-0.676645326366)*x[1]
            ref[(0, 1, 0, 0)]=0.28414609359*dim
            arg[(0, 1, 0, 1)]=0.155437537403*x[0] + (-0.87886039243)*x[1]
            ref[(0, 1, 0, 1)]=-0.723422855027*dim
            arg[(0, 1, 0, 2)]=-0.697900165058*x[0] + (-0.928392176155)*x[1]
            ref[(0, 1, 0, 2)]=-1.62629234121*dim
            arg[(0, 1, 0, 3)]=0.685152364163*x[0] + (-0.494496074079)*x[1]
            ref[(0, 1, 0, 3)]=0.190656290084*dim
            arg[(0, 1, 1, 0)]=0.599403094687*x[0] + (0.872069403231)*x[1]
            ref[(0, 1, 1, 0)]=1.47147249792*dim
            arg[(0, 1, 1, 1)]=0.4481999143*x[0] + (0.299385991642)*x[1]
            ref[(0, 1, 1, 1)]=0.747585905942*dim
            arg[(0, 1, 1, 2)]=0.545310482047*x[0] + (0.65867842755)*x[1]
            ref[(0, 1, 1, 2)]=1.2039889096*dim
            arg[(0, 1, 1, 3)]=0.651281965725*x[0] + (0.0355735211654)*x[1]
            ref[(0, 1, 1, 3)]=0.68685548689*dim
            arg[(0, 1, 2, 0)]=0.308073155085*x[0] + (-0.875901297215)*x[1]
            ref[(0, 1, 2, 0)]=-0.567828142131*dim
            arg[(0, 1, 2, 1)]=-0.963118265471*x[0] + (-0.082513961942)*x[1]
            ref[(0, 1, 2, 1)]=-1.04563222741*dim
            arg[(0, 1, 2, 2)]=0.452346103097*x[0] + (0.690216177965)*x[1]
            ref[(0, 1, 2, 2)]=1.14256228106*dim
            arg[(0, 1, 2, 3)]=0.123927522061*x[0] + (0.227716535159)*x[1]
            ref[(0, 1, 2, 3)]=0.35164405722*dim
            arg[(0, 1, 3, 0)]=0.800845794574*x[0] + (-0.545103707618)*x[1]
            ref[(0, 1, 3, 0)]=0.255742086957*dim
            arg[(0, 1, 3, 1)]=0.571384618972*x[0] + (-0.882942425845)*x[1]
            ref[(0, 1, 3, 1)]=-0.311557806873*dim
            arg[(0, 1, 3, 2)]=0.273424016214*x[0] + (0.057579763393)*x[1]
            ref[(0, 1, 3, 2)]=0.331003779607*dim
            arg[(0, 1, 3, 3)]=0.786535569538*x[0] + (0.292553262966)*x[1]
            ref[(0, 1, 3, 3)]=1.0790888325*dim
            arg[(0, 2, 0, 0)]=0.62859360775*x[0] + (-0.528565937643)*x[1]
            ref[(0, 2, 0, 0)]=0.100027670107*dim
            arg[(0, 2, 0, 1)]=-0.360096331404*x[0] + (0.626306403062)*x[1]
            ref[(0, 2, 0, 1)]=0.266210071659*dim
            arg[(0, 2, 0, 2)]=0.732722311958*x[0] + (-0.199137600043)*x[1]
            ref[(0, 2, 0, 2)]=0.533584711915*dim
            arg[(0, 2, 0, 3)]=-0.101954906699*x[0] + (-0.962357295076)*x[1]
            ref[(0, 2, 0, 3)]=-1.06431220177*dim
            arg[(0, 2, 1, 0)]=0.550267078724*x[0] + (0.749145274908)*x[1]
            ref[(0, 2, 1, 0)]=1.29941235363*dim
            arg[(0, 2, 1, 1)]=0.543392649115*x[0] + (0.971918842585)*x[1]
            ref[(0, 2, 1, 1)]=1.5153114917*dim
            arg[(0, 2, 1, 2)]=0.110660976813*x[0] + (-0.684509322481)*x[1]
            ref[(0, 2, 1, 2)]=-0.573848345668*dim
            arg[(0, 2, 1, 3)]=-0.46168866581*x[0] + (0.434214128615)*x[1]
            ref[(0, 2, 1, 3)]=-0.0274745371945*dim
            arg[(0, 2, 2, 0)]=-0.826296610049*x[0] + (0.664306794565)*x[1]
            ref[(0, 2, 2, 0)]=-0.161989815485*dim
            arg[(0, 2, 2, 1)]=0.985662457463*x[0] + (-0.543195607378)*x[1]
            ref[(0, 2, 2, 1)]=0.442466850085*dim
            arg[(0, 2, 2, 2)]=0.536665891486*x[0] + (-0.490947993326)*x[1]
            ref[(0, 2, 2, 2)]=0.0457178981596*dim
            arg[(0, 2, 2, 3)]=-0.195668488338*x[0] + (-0.416128582199)*x[1]
            ref[(0, 2, 2, 3)]=-0.611797070537*dim
            arg[(0, 2, 3, 0)]=0.414026468364*x[0] + (-0.376485142703)*x[1]
            ref[(0, 2, 3, 0)]=0.0375413256609*dim
            arg[(0, 2, 3, 1)]=-0.624755166261*x[0] + (-0.000848835921833)*x[1]
            ref[(0, 2, 3, 1)]=-0.625604002183*dim
            arg[(0, 2, 3, 2)]=-0.313606580849*x[0] + (0.0985306910964)*x[1]
            ref[(0, 2, 3, 2)]=-0.215075889753*dim
            arg[(0, 2, 3, 3)]=0.443137623858*x[0] + (-0.919442405376)*x[1]
            ref[(0, 2, 3, 3)]=-0.476304781518*dim
            arg[(1, 0, 0, 0)]=0.171656825075*x[0] + (-0.343046478003)*x[1]
            ref[(1, 0, 0, 0)]=-0.171389652928*dim
            arg[(1, 0, 0, 1)]=0.945389092929*x[0] + (0.281030697919)*x[1]
            ref[(1, 0, 0, 1)]=1.22641979085*dim
            arg[(1, 0, 0, 2)]=-0.892546966283*x[0] + (-0.642117508726)*x[1]
            ref[(1, 0, 0, 2)]=-1.53466447501*dim
            arg[(1, 0, 0, 3)]=0.983234439067*x[0] + (-0.170690369416)*x[1]
            ref[(1, 0, 0, 3)]=0.81254406965*dim
            arg[(1, 0, 1, 0)]=0.550105779428*x[0] + (-0.446506745842)*x[1]
            ref[(1, 0, 1, 0)]=0.103599033586*dim
            arg[(1, 0, 1, 1)]=0.530520079303*x[0] + (-0.909436272843)*x[1]
            ref[(1, 0, 1, 1)]=-0.37891619354*dim
            arg[(1, 0, 1, 2)]=0.473460781097*x[0] + (0.934609104003)*x[1]
            ref[(1, 0, 1, 2)]=1.4080698851*dim
            arg[(1, 0, 1, 3)]=-0.810686482718*x[0] + (0.459306819368)*x[1]
            ref[(1, 0, 1, 3)]=-0.35137966335*dim
            arg[(1, 0, 2, 0)]=0.790854627957*x[0] + (0.320123497357)*x[1]
            ref[(1, 0, 2, 0)]=1.11097812531*dim
            arg[(1, 0, 2, 1)]=-0.893605115778*x[0] + (0.945141255902)*x[1]
            ref[(1, 0, 2, 1)]=0.0515361401246*dim
            arg[(1, 0, 2, 2)]=-0.929516660644*x[0] + (0.139547822302)*x[1]
            ref[(1, 0, 2, 2)]=-0.789968838341*dim
            arg[(1, 0, 2, 3)]=-0.705010075104*x[0] + (-0.378705130496)*x[1]
            ref[(1, 0, 2, 3)]=-1.0837152056*dim
            arg[(1, 0, 3, 0)]=0.929503401807*x[0] + (0.681172109509)*x[1]
            ref[(1, 0, 3, 0)]=1.61067551132*dim
            arg[(1, 0, 3, 1)]=0.813304604959*x[0] + (-0.033609134794)*x[1]
            ref[(1, 0, 3, 1)]=0.779695470165*dim
            arg[(1, 0, 3, 2)]=-0.396096148721*x[0] + (-0.752476861804)*x[1]
            ref[(1, 0, 3, 2)]=-1.14857301053*dim
            arg[(1, 0, 3, 3)]=-0.552094134633*x[0] + (-0.261326129126)*x[1]
            ref[(1, 0, 3, 3)]=-0.813420263759*dim
            arg[(1, 1, 0, 0)]=0.337039589806*x[0] + (-0.157588731905)*x[1]
            ref[(1, 1, 0, 0)]=0.179450857901*dim
            arg[(1, 1, 0, 1)]=0.69266553079*x[0] + (0.764452390991)*x[1]
            ref[(1, 1, 0, 1)]=1.45711792178*dim
            arg[(1, 1, 0, 2)]=-0.0253745852204*x[0] + (-0.730407248573)*x[1]
            ref[(1, 1, 0, 2)]=-0.755781833793*dim
            arg[(1, 1, 0, 3)]=0.0886589794625*x[0] + (0.255667008984)*x[1]
            ref[(1, 1, 0, 3)]=0.344325988446*dim
            arg[(1, 1, 1, 0)]=-0.701539539026*x[0] + (0.0580832423763)*x[1]
            ref[(1, 1, 1, 0)]=-0.64345629665*dim
            arg[(1, 1, 1, 1)]=0.42430180017*x[0] + (-0.01720570918)*x[1]
            ref[(1, 1, 1, 1)]=0.40709609099*dim
            arg[(1, 1, 1, 2)]=0.172165509921*x[0] + (-0.92058260926)*x[1]
            ref[(1, 1, 1, 2)]=-0.748417099339*dim
            arg[(1, 1, 1, 3)]=-0.986320480712*x[0] + (0.680463004055)*x[1]
            ref[(1, 1, 1, 3)]=-0.305857476658*dim
            arg[(1, 1, 2, 0)]=0.843847820466*x[0] + (0.852789923656)*x[1]
            ref[(1, 1, 2, 0)]=1.69663774412*dim
            arg[(1, 1, 2, 1)]=0.36041203355*x[0] + (0.0951917403342)*x[1]
            ref[(1, 1, 2, 1)]=0.455603773884*dim
            arg[(1, 1, 2, 2)]=-0.282308922526*x[0] + (0.452475528641)*x[1]
            ref[(1, 1, 2, 2)]=0.170166606115*dim
            arg[(1, 1, 2, 3)]=-0.303777612281*x[0] + (-0.576619568923)*x[1]
            ref[(1, 1, 2, 3)]=-0.880397181204*dim
            arg[(1, 1, 3, 0)]=0.261021485564*x[0] + (0.198589169155)*x[1]
            ref[(1, 1, 3, 0)]=0.459610654719*dim
            arg[(1, 1, 3, 1)]=0.465245040816*x[0] + (-0.893713984866)*x[1]
            ref[(1, 1, 3, 1)]=-0.42846894405*dim
            arg[(1, 1, 3, 2)]=-0.653422878928*x[0] + (-0.637658009508)*x[1]
            ref[(1, 1, 3, 2)]=-1.29108088844*dim
            arg[(1, 1, 3, 3)]=0.635494903314*x[0] + (0.722719741073)*x[1]
            ref[(1, 1, 3, 3)]=1.35821464439*dim
            arg[(1, 2, 0, 0)]=0.926649157629*x[0] + (0.360149136276)*x[1]
            ref[(1, 2, 0, 0)]=1.28679829391*dim
            arg[(1, 2, 0, 1)]=0.341112967222*x[0] + (-0.440721076569)*x[1]
            ref[(1, 2, 0, 1)]=-0.0996081093473*dim
            arg[(1, 2, 0, 2)]=0.439290733775*x[0] + (-0.973559914711)*x[1]
            ref[(1, 2, 0, 2)]=-0.534269180936*dim
            arg[(1, 2, 0, 3)]=0.88808929349*x[0] + (-0.55017786061)*x[1]
            ref[(1, 2, 0, 3)]=0.33791143288*dim
            arg[(1, 2, 1, 0)]=0.48677991645*x[0] + (-0.85267184605)*x[1]
            ref[(1, 2, 1, 0)]=-0.365891929599*dim
            arg[(1, 2, 1, 1)]=0.309936074523*x[0] + (-0.57617653046)*x[1]
            ref[(1, 2, 1, 1)]=-0.266240455937*dim
            arg[(1, 2, 1, 2)]=-0.767337142892*x[0] + (-0.406883358584)*x[1]
            ref[(1, 2, 1, 2)]=-1.17422050148*dim
            arg[(1, 2, 1, 3)]=0.994654586737*x[0] + (-0.850805069749)*x[1]
            ref[(1, 2, 1, 3)]=0.143849516988*dim
            arg[(1, 2, 2, 0)]=-0.859324721137*x[0] + (-0.463713999583)*x[1]
            ref[(1, 2, 2, 0)]=-1.32303872072*dim
            arg[(1, 2, 2, 1)]=-0.193576804048*x[0] + (0.296623903121)*x[1]
            ref[(1, 2, 2, 1)]=0.103047099073*dim
            arg[(1, 2, 2, 2)]=-0.794250731978*x[0] + (0.161680621832)*x[1]
            ref[(1, 2, 2, 2)]=-0.632570110145*dim
            arg[(1, 2, 2, 3)]=0.281636551349*x[0] + (-0.696365338379)*x[1]
            ref[(1, 2, 2, 3)]=-0.41472878703*dim
            arg[(1, 2, 3, 0)]=-0.534979476868*x[0] + (-0.459880753246)*x[1]
            ref[(1, 2, 3, 0)]=-0.994860230114*dim
            arg[(1, 2, 3, 1)]=0.650510253421*x[0] + (-0.713242854158)*x[1]
            ref[(1, 2, 3, 1)]=-0.0627326007367*dim
            arg[(1, 2, 3, 2)]=-0.796171141661*x[0] + (-0.931865717231)*x[1]
            ref[(1, 2, 3, 2)]=-1.72803685889*dim
            arg[(1, 2, 3, 3)]=-0.883791141686*x[0] + (-0.584696553236)*x[1]
            ref[(1, 2, 3, 3)]=-1.46848769492*dim
            arg[(2, 0, 0, 0)]=0.0170267113668*x[0] + (-0.0327324906719)*x[1]
            ref[(2, 0, 0, 0)]=-0.0157057793052*dim
            arg[(2, 0, 0, 1)]=0.12862455635*x[0] + (0.514471594783)*x[1]
            ref[(2, 0, 0, 1)]=0.643096151133*dim
            arg[(2, 0, 0, 2)]=0.16037171341*x[0] + (-0.580576960796)*x[1]
            ref[(2, 0, 0, 2)]=-0.420205247386*dim
            arg[(2, 0, 0, 3)]=0.521646917259*x[0] + (-0.489498671066)*x[1]
            ref[(2, 0, 0, 3)]=0.0321482461932*dim
            arg[(2, 0, 1, 0)]=0.834519437866*x[0] + (0.931945332268)*x[1]
            ref[(2, 0, 1, 0)]=1.76646477013*dim
            arg[(2, 0, 1, 1)]=-0.611870091266*x[0] + (-0.334790899353)*x[1]
            ref[(2, 0, 1, 1)]=-0.946660990619*dim
            arg[(2, 0, 1, 2)]=-0.0669244443356*x[0] + (0.853143573664)*x[1]
            ref[(2, 0, 1, 2)]=0.786219129328*dim
            arg[(2, 0, 1, 3)]=0.0587685770788*x[0] + (-0.33128324866)*x[1]
            ref[(2, 0, 1, 3)]=-0.272514671582*dim
            arg[(2, 0, 2, 0)]=-0.756989730372*x[0] + (-0.756877734452)*x[1]
            ref[(2, 0, 2, 0)]=-1.51386746482*dim
            arg[(2, 0, 2, 1)]=-0.282260443452*x[0] + (-0.702416448738)*x[1]
            ref[(2, 0, 2, 1)]=-0.98467689219*dim
            arg[(2, 0, 2, 2)]=0.46488460639*x[0] + (-0.0963579987892)*x[1]
            ref[(2, 0, 2, 2)]=0.3685266076*dim
            arg[(2, 0, 2, 3)]=-0.0114807151471*x[0] + (-0.106661885791)*x[1]
            ref[(2, 0, 2, 3)]=-0.118142600938*dim
            arg[(2, 0, 3, 0)]=0.338201590388*x[0] + (-0.984426398346)*x[1]
            ref[(2, 0, 3, 0)]=-0.646224807957*dim
            arg[(2, 0, 3, 1)]=0.309177951409*x[0] + (0.858151822618)*x[1]
            ref[(2, 0, 3, 1)]=1.16732977403*dim
            arg[(2, 0, 3, 2)]=0.326182820422*x[0] + (0.293513403543)*x[1]
            ref[(2, 0, 3, 2)]=0.619696223964*dim
            arg[(2, 0, 3, 3)]=0.429811003008*x[0] + (0.253733308003)*x[1]
            ref[(2, 0, 3, 3)]=0.683544311011*dim
            arg[(2, 1, 0, 0)]=0.262380494454*x[0] + (-0.407029614928)*x[1]
            ref[(2, 1, 0, 0)]=-0.144649120474*dim
            arg[(2, 1, 0, 1)]=0.474659315765*x[0] + (-0.618862496909)*x[1]
            ref[(2, 1, 0, 1)]=-0.144203181144*dim
            arg[(2, 1, 0, 2)]=0.117805059402*x[0] + (0.350657895947)*x[1]
            ref[(2, 1, 0, 2)]=0.468462955349*dim
            arg[(2, 1, 0, 3)]=-0.43375946647*x[0] + (-0.338131916969)*x[1]
            ref[(2, 1, 0, 3)]=-0.771891383439*dim
            arg[(2, 1, 1, 0)]=-0.44599784635*x[0] + (-0.556525952312)*x[1]
            ref[(2, 1, 1, 0)]=-1.00252379866*dim
            arg[(2, 1, 1, 1)]=-0.869870552871*x[0] + (-0.795554939723)*x[1]
            ref[(2, 1, 1, 1)]=-1.66542549259*dim
            arg[(2, 1, 1, 2)]=-0.571096560217*x[0] + (-0.458248620446)*x[1]
            ref[(2, 1, 1, 2)]=-1.02934518066*dim
            arg[(2, 1, 1, 3)]=0.664634320613*x[0] + (-0.387822417605)*x[1]
            ref[(2, 1, 1, 3)]=0.276811903007*dim
            arg[(2, 1, 2, 0)]=0.960667224489*x[0] + (-0.0979267066027)*x[1]
            ref[(2, 1, 2, 0)]=0.862740517886*dim
            arg[(2, 1, 2, 1)]=0.891089229249*x[0] + (-0.416409619839)*x[1]
            ref[(2, 1, 2, 1)]=0.474679609409*dim
            arg[(2, 1, 2, 2)]=0.402915468839*x[0] + (-0.581923867839)*x[1]
            ref[(2, 1, 2, 2)]=-0.179008399*dim
            arg[(2, 1, 2, 3)]=-0.413493041497*x[0] + (0.643134055445)*x[1]
            ref[(2, 1, 2, 3)]=0.229641013948*dim
            arg[(2, 1, 3, 0)]=-0.358346370032*x[0] + (0.00775880214212)*x[1]
            ref[(2, 1, 3, 0)]=-0.35058756789*dim
            arg[(2, 1, 3, 1)]=-0.102842519445*x[0] + (-0.969330517487)*x[1]
            ref[(2, 1, 3, 1)]=-1.07217303693*dim
            arg[(2, 1, 3, 2)]=-0.026288206437*x[0] + (-0.642846968797)*x[1]
            ref[(2, 1, 3, 2)]=-0.669135175234*dim
            arg[(2, 1, 3, 3)]=0.957159090647*x[0] + (0.538943465222)*x[1]
            ref[(2, 1, 3, 3)]=1.49610255587*dim
            arg[(2, 2, 0, 0)]=-0.767463138648*x[0] + (0.581411916748)*x[1]
            ref[(2, 2, 0, 0)]=-0.1860512219*dim
            arg[(2, 2, 0, 1)]=-0.577250063243*x[0] + (0.465725142612)*x[1]
            ref[(2, 2, 0, 1)]=-0.111524920631*dim
            arg[(2, 2, 0, 2)]=0.356061280926*x[0] + (0.446300216307)*x[1]
            ref[(2, 2, 0, 2)]=0.802361497232*dim
            arg[(2, 2, 0, 3)]=-0.198133015787*x[0] + (0.389660117068)*x[1]
            ref[(2, 2, 0, 3)]=0.19152710128*dim
            arg[(2, 2, 1, 0)]=-0.817996609024*x[0] + (-0.712399312227)*x[1]
            ref[(2, 2, 1, 0)]=-1.53039592125*dim
            arg[(2, 2, 1, 1)]=0.323684837763*x[0] + (0.480068233243)*x[1]
            ref[(2, 2, 1, 1)]=0.803753071006*dim
            arg[(2, 2, 1, 2)]=0.564540120968*x[0] + (-0.39917482423)*x[1]
            ref[(2, 2, 1, 2)]=0.165365296738*dim
            arg[(2, 2, 1, 3)]=0.739458376357*x[0] + (-0.494586366547)*x[1]
            ref[(2, 2, 1, 3)]=0.244872009811*dim
            arg[(2, 2, 2, 0)]=-0.661554282027*x[0] + (-0.710365898476)*x[1]
            ref[(2, 2, 2, 0)]=-1.3719201805*dim
            arg[(2, 2, 2, 1)]=-0.454866140784*x[0] + (0.485118599625)*x[1]
            ref[(2, 2, 2, 1)]=0.0302524588417*dim
            arg[(2, 2, 2, 2)]=-0.222911620533*x[0] + (0.469587929464)*x[1]
            ref[(2, 2, 2, 2)]=0.24667630893*dim
            arg[(2, 2, 2, 3)]=0.444801485766*x[0] + (0.708993399612)*x[1]
            ref[(2, 2, 2, 3)]=1.15379488538*dim
            arg[(2, 2, 3, 0)]=-0.127473589372*x[0] + (0.221065572348)*x[1]
            ref[(2, 2, 3, 0)]=0.093591982976*dim
            arg[(2, 2, 3, 1)]=0.0797741307628*x[0] + (-0.29226815489)*x[1]
            ref[(2, 2, 3, 1)]=-0.212494024127*dim
            arg[(2, 2, 3, 2)]=0.573869889041*x[0] + (0.694207663995)*x[1]
            ref[(2, 2, 3, 2)]=1.26807755304*dim
            arg[(2, 2, 3, 3)]=-0.0858284922754*x[0] + (-0.786179214729)*x[1]
            ref[(2, 2, 3, 3)]=-0.872007707005*dim
            arg[(3, 0, 0, 0)]=0.48568708604*x[0] + (0.703858679038)*x[1]
            ref[(3, 0, 0, 0)]=1.18954576508*dim
            arg[(3, 0, 0, 1)]=-0.00631830466443*x[0] + (0.414936282084)*x[1]
            ref[(3, 0, 0, 1)]=0.40861797742*dim
            arg[(3, 0, 0, 2)]=-0.848255131698*x[0] + (0.131289444287)*x[1]
            ref[(3, 0, 0, 2)]=-0.716965687411*dim
            arg[(3, 0, 0, 3)]=-0.160676743266*x[0] + (-0.701440321957)*x[1]
            ref[(3, 0, 0, 3)]=-0.862117065223*dim
            arg[(3, 0, 1, 0)]=0.803357865513*x[0] + (0.198673979295)*x[1]
            ref[(3, 0, 1, 0)]=1.00203184481*dim
            arg[(3, 0, 1, 1)]=0.19110911821*x[0] + (-0.537229100491)*x[1]
            ref[(3, 0, 1, 1)]=-0.346119982281*dim
            arg[(3, 0, 1, 2)]=-0.314531886325*x[0] + (0.120219213895)*x[1]
            ref[(3, 0, 1, 2)]=-0.19431267243*dim
            arg[(3, 0, 1, 3)]=0.533239721557*x[0] + (-0.522747954188)*x[1]
            ref[(3, 0, 1, 3)]=0.0104917673691*dim
            arg[(3, 0, 2, 0)]=-0.997242974479*x[0] + (0.122150729273)*x[1]
            ref[(3, 0, 2, 0)]=-0.875092245206*dim
            arg[(3, 0, 2, 1)]=-0.765042896017*x[0] + (0.0129907085751)*x[1]
            ref[(3, 0, 2, 1)]=-0.752052187442*dim
            arg[(3, 0, 2, 2)]=0.182652633082*x[0] + (0.0146032011717)*x[1]
            ref[(3, 0, 2, 2)]=0.197255834254*dim
            arg[(3, 0, 2, 3)]=-0.138531985989*x[0] + (-0.0159490090534)*x[1]
            ref[(3, 0, 2, 3)]=-0.154480995042*dim
            arg[(3, 0, 3, 0)]=-0.735426811045*x[0] + (0.414832485364)*x[1]
            ref[(3, 0, 3, 0)]=-0.320594325681*dim
            arg[(3, 0, 3, 1)]=-0.907415880312*x[0] + (0.438431447745)*x[1]
            ref[(3, 0, 3, 1)]=-0.468984432567*dim
            arg[(3, 0, 3, 2)]=-0.150932977806*x[0] + (-0.420405231436)*x[1]
            ref[(3, 0, 3, 2)]=-0.571338209242*dim
            arg[(3, 0, 3, 3)]=-0.000784078043883*x[0] + (0.891590677891)*x[1]
            ref[(3, 0, 3, 3)]=0.890806599847*dim
            arg[(3, 1, 0, 0)]=0.784266483393*x[0] + (-0.0808635629205)*x[1]
            ref[(3, 1, 0, 0)]=0.703402920472*dim
            arg[(3, 1, 0, 1)]=-0.440320853436*x[0] + (-0.215943315787)*x[1]
            ref[(3, 1, 0, 1)]=-0.656264169223*dim
            arg[(3, 1, 0, 2)]=-0.237614942084*x[0] + (-0.737277608863)*x[1]
            ref[(3, 1, 0, 2)]=-0.974892550946*dim
            arg[(3, 1, 0, 3)]=-0.445669555455*x[0] + (0.330166641341)*x[1]
            ref[(3, 1, 0, 3)]=-0.115502914114*dim
            arg[(3, 1, 1, 0)]=-0.434694839336*x[0] + (0.370845121782)*x[1]
            ref[(3, 1, 1, 0)]=-0.0638497175539*dim
            arg[(3, 1, 1, 1)]=0.263382602022*x[0] + (0.34715424754)*x[1]
            ref[(3, 1, 1, 1)]=0.610536849562*dim
            arg[(3, 1, 1, 2)]=-0.420582206092*x[0] + (-0.459281405382)*x[1]
            ref[(3, 1, 1, 2)]=-0.879863611473*dim
            arg[(3, 1, 1, 3)]=0.493334511414*x[0] + (-0.586069093136)*x[1]
            ref[(3, 1, 1, 3)]=-0.0927345817224*dim
            arg[(3, 1, 2, 0)]=0.191015064457*x[0] + (-0.382283041726)*x[1]
            ref[(3, 1, 2, 0)]=-0.19126797727*dim
            arg[(3, 1, 2, 1)]=-0.738476337219*x[0] + (-0.282288567292)*x[1]
            ref[(3, 1, 2, 1)]=-1.02076490451*dim
            arg[(3, 1, 2, 2)]=0.00471257849824*x[0] + (-0.459942522725)*x[1]
            ref[(3, 1, 2, 2)]=-0.455229944226*dim
            arg[(3, 1, 2, 3)]=0.31051518689*x[0] + (-0.414039991145)*x[1]
            ref[(3, 1, 2, 3)]=-0.103524804255*dim
            arg[(3, 1, 3, 0)]=0.714875245908*x[0] + (-0.0796715252949)*x[1]
            ref[(3, 1, 3, 0)]=0.635203720613*dim
            arg[(3, 1, 3, 1)]=-0.898347143104*x[0] + (-0.453055051487)*x[1]
            ref[(3, 1, 3, 1)]=-1.35140219459*dim
            arg[(3, 1, 3, 2)]=-0.607655734191*x[0] + (0.513243128844)*x[1]
            ref[(3, 1, 3, 2)]=-0.0944126053475*dim
            arg[(3, 1, 3, 3)]=0.763035924071*x[0] + (0.25812740093)*x[1]
            ref[(3, 1, 3, 3)]=1.021163325*dim
            arg[(3, 2, 0, 0)]=0.756523373058*x[0] + (-0.771250478093)*x[1]
            ref[(3, 2, 0, 0)]=-0.0147271050353*dim
            arg[(3, 2, 0, 1)]=0.897318326167*x[0] + (0.830839380611)*x[1]
            ref[(3, 2, 0, 1)]=1.72815770678*dim
            arg[(3, 2, 0, 2)]=0.125635299245*x[0] + (-0.213912057348)*x[1]
            ref[(3, 2, 0, 2)]=-0.0882767581029*dim
            arg[(3, 2, 0, 3)]=0.444862237748*x[0] + (0.0240525235093)*x[1]
            ref[(3, 2, 0, 3)]=0.468914761258*dim
            arg[(3, 2, 1, 0)]=0.354538623005*x[0] + (0.111570394496)*x[1]
            ref[(3, 2, 1, 0)]=0.466109017501*dim
            arg[(3, 2, 1, 1)]=0.952084049466*x[0] + (-0.879784834857)*x[1]
            ref[(3, 2, 1, 1)]=0.072299214609*dim
            arg[(3, 2, 1, 2)]=0.409954135873*x[0] + (-0.585372063448)*x[1]
            ref[(3, 2, 1, 2)]=-0.175417927576*dim
            arg[(3, 2, 1, 3)]=0.110181297075*x[0] + (-0.914206783116)*x[1]
            ref[(3, 2, 1, 3)]=-0.804025486041*dim
            arg[(3, 2, 2, 0)]=0.284012615647*x[0] + (0.368918602973)*x[1]
            ref[(3, 2, 2, 0)]=0.652931218621*dim
            arg[(3, 2, 2, 1)]=-0.576805141787*x[0] + (-0.152143526281)*x[1]
            ref[(3, 2, 2, 1)]=-0.728948668068*dim
            arg[(3, 2, 2, 2)]=0.524601254658*x[0] + (-0.321370353599)*x[1]
            ref[(3, 2, 2, 2)]=0.203230901059*dim
            arg[(3, 2, 2, 3)]=0.118853930538*x[0] + (-0.540259969669)*x[1]
            ref[(3, 2, 2, 3)]=-0.421406039131*dim
            arg[(3, 2, 3, 0)]=-0.480838014296*x[0] + (-0.295421135298)*x[1]
            ref[(3, 2, 3, 0)]=-0.776259149595*dim
            arg[(3, 2, 3, 1)]=0.81502951209*x[0] + (-0.426893576464)*x[1]
            ref[(3, 2, 3, 1)]=0.388135935626*dim
            arg[(3, 2, 3, 2)]=-0.544689005237*x[0] + (0.758261856474)*x[1]
            ref[(3, 2, 3, 2)]=0.213572851237*dim
            arg[(3, 2, 3, 3)]=-0.445171214819*x[0] + (0.999040351061)*x[1]
            ref[(3, 2, 3, 3)]=0.553869136243*dim
        else:
            arg[(0, 0, 0, 0)]=0.063171511053*x[0] + (0.779752754304)*x[1] + (0.702539463594)*x[2]
            ref[(0, 0, 0, 0)]=1.54546372895*dim
            arg[(0, 0, 0, 1)]=0.627440319922*x[0] + (0.722080722669)*x[1] + (0.388094383865)*x[2]
            ref[(0, 0, 0, 1)]=1.73761542646*dim
            arg[(0, 0, 0, 2)]=-0.315662494019*x[0] + (-0.0864563538266)*x[1] + (-0.724637392642)*x[2]
            ref[(0, 0, 0, 2)]=-1.12675624049*dim
            arg[(0, 0, 0, 3)]=0.0837913940004*x[0] + (-0.16949629041)*x[1] + (0.367913537901)*x[2]
            ref[(0, 0, 0, 3)]=0.282208641491*dim
            arg[(0, 0, 1, 0)]=-0.535230161699*x[0] + (-0.579948404845)*x[1] + (-0.827631122987)*x[2]
            ref[(0, 0, 1, 0)]=-1.94280968953*dim
            arg[(0, 0, 1, 1)]=-0.642422798427*x[0] + (0.705385830467)*x[1] + (0.205204422959)*x[2]
            ref[(0, 0, 1, 1)]=0.268167454999*dim
            arg[(0, 0, 1, 2)]=-0.36327193992*x[0] + (0.494465526383)*x[1] + (-0.109748498977)*x[2]
            ref[(0, 0, 1, 2)]=0.0214450874868*dim
            arg[(0, 0, 1, 3)]=-0.280574294747*x[0] + (-0.261712192549)*x[1] + (-0.853108286728)*x[2]
            ref[(0, 0, 1, 3)]=-1.39539477402*dim
            arg[(0, 0, 2, 0)]=-0.244559445927*x[0] + (-0.446327882931)*x[1] + (0.990172345196)*x[2]
            ref[(0, 0, 2, 0)]=0.299285016338*dim
            arg[(0, 0, 2, 1)]=-0.605002448531*x[0] + (0.8027575873)*x[1] + (-0.683658389392)*x[2]
            ref[(0, 0, 2, 1)]=-0.485903250623*dim
            arg[(0, 0, 2, 2)]=-0.362261591759*x[0] + (0.221662868516)*x[1] + (0.224753009823)*x[2]
            ref[(0, 0, 2, 2)]=0.0841542865796*dim
            arg[(0, 0, 2, 3)]=0.993460477561*x[0] + (0.438702377588)*x[1] + (0.203573421412)*x[2]
            ref[(0, 0, 2, 3)]=1.63573627656*dim
            arg[(0, 0, 3, 0)]=-0.993396115228*x[0] + (0.62013204639)*x[1] + (0.549303076196)*x[2]
            ref[(0, 0, 3, 0)]=0.176039007358*dim
            arg[(0, 0, 3, 1)]=0.178171757115*x[0] + (-0.101695021831)*x[1] + (0.52229114587)*x[2]
            ref[(0, 0, 3, 1)]=0.598767881155*dim
            arg[(0, 0, 3, 2)]=-0.881982869961*x[0] + (-0.826092378498)*x[1] + (-0.81823151598)*x[2]
            ref[(0, 0, 3, 2)]=-2.52630676444*dim
            arg[(0, 0, 3, 3)]=0.729184593272*x[0] + (0.745537502554)*x[1] + (0.478321237255)*x[2]
            ref[(0, 0, 3, 3)]=1.95304333308*dim
            arg[(0, 1, 0, 0)]=0.475406634853*x[0] + (0.0275229289305)*x[1] + (0.794568373427)*x[2]
            ref[(0, 1, 0, 0)]=1.29749793721*dim
            arg[(0, 1, 0, 1)]=0.663706826407*x[0] + (-0.605101992898)*x[1] + (0.51336171583)*x[2]
            ref[(0, 1, 0, 1)]=0.571966549338*dim
            arg[(0, 1, 0, 2)]=-0.311015474618*x[0] + (0.254991100882)*x[1] + (-0.870982293453)*x[2]
            ref[(0, 1, 0, 2)]=-0.927006667189*dim
            arg[(0, 1, 0, 3)]=-0.183111509323*x[0] + (0.679846565192)*x[1] + (0.879987572751)*x[2]
            ref[(0, 1, 0, 3)]=1.37672262862*dim
            arg[(0, 1, 1, 0)]=-0.790653834382*x[0] + (0.278847934357)*x[1] + (-0.200420677167)*x[2]
            ref[(0, 1, 1, 0)]=-0.712226577193*dim
            arg[(0, 1, 1, 1)]=-0.828440322265*x[0] + (0.601359413472)*x[1] + (0.52111056302)*x[2]
            ref[(0, 1, 1, 1)]=0.294029654228*dim
            arg[(0, 1, 1, 2)]=-0.414157042913*x[0] + (-0.477367934296)*x[1] + (0.885132535034)*x[2]
            ref[(0, 1, 1, 2)]=-0.00639244217493*dim
            arg[(0, 1, 1, 3)]=0.47839968598*x[0] + (0.474002461737)*x[1] + (0.94284849156)*x[2]
            ref[(0, 1, 1, 3)]=1.89525063928*dim
            arg[(0, 1, 2, 0)]=0.195059747401*x[0] + (-0.678817553018)*x[1] + (0.943409818002)*x[2]
            ref[(0, 1, 2, 0)]=0.459652012385*dim
            arg[(0, 1, 2, 1)]=0.0453485035431*x[0] + (0.856090804844)*x[1] + (-0.889753084218)*x[2]
            ref[(0, 1, 2, 1)]=0.0116862241692*dim
            arg[(0, 1, 2, 2)]=-0.0931793742888*x[0] + (0.640890621374)*x[1] + (-0.856668425759)*x[2]
            ref[(0, 1, 2, 2)]=-0.308957178674*dim
            arg[(0, 1, 2, 3)]=-0.627450046503*x[0] + (-0.542368750692)*x[1] + (-0.88096344888)*x[2]
            ref[(0, 1, 2, 3)]=-2.05078224607*dim
            arg[(0, 1, 3, 0)]=-0.238977628104*x[0] + (-0.313493301401)*x[1] + (0.0144900152093)*x[2]
            ref[(0, 1, 3, 0)]=-0.537980914296*dim
            arg[(0, 1, 3, 1)]=0.586097120302*x[0] + (-0.713166975803)*x[1] + (-0.261704627903)*x[2]
            ref[(0, 1, 3, 1)]=-0.388774483403*dim
            arg[(0, 1, 3, 2)]=-0.0341497076313*x[0] + (-0.421335846387)*x[1] + (-0.472787714632)*x[2]
            ref[(0, 1, 3, 2)]=-0.92827326865*dim
            arg[(0, 1, 3, 3)]=-0.876705446272*x[0] + (-0.783514326778)*x[1] + (-0.772337651845)*x[2]
            ref[(0, 1, 3, 3)]=-2.43255742489*dim
            arg[(0, 2, 0, 0)]=0.49659075234*x[0] + (-0.484959954296)*x[1] + (0.114151008921)*x[2]
            ref[(0, 2, 0, 0)]=0.125781806965*dim
            arg[(0, 2, 0, 1)]=-0.94523186158*x[0] + (-0.00586650723508)*x[1] + (0.701260639185)*x[2]
            ref[(0, 2, 0, 1)]=-0.249837729629*dim
            arg[(0, 2, 0, 2)]=0.458689574776*x[0] + (-0.753267404441)*x[1] + (0.18497344251)*x[2]
            ref[(0, 2, 0, 2)]=-0.109604387156*dim
            arg[(0, 2, 0, 3)]=-0.973067779505*x[0] + (-0.431186955038)*x[1] + (-0.319860698147)*x[2]
            ref[(0, 2, 0, 3)]=-1.72411543269*dim
            arg[(0, 2, 1, 0)]=0.26375126941*x[0] + (0.569405318654)*x[1] + (0.618623080432)*x[2]
            ref[(0, 2, 1, 0)]=1.4517796685*dim
            arg[(0, 2, 1, 1)]=0.633468693428*x[0] + (0.470590407181)*x[1] + (0.761948641763)*x[2]
            ref[(0, 2, 1, 1)]=1.86600774237*dim
            arg[(0, 2, 1, 2)]=0.73662057307*x[0] + (0.806738787192)*x[1] + (-0.410677999612)*x[2]
            ref[(0, 2, 1, 2)]=1.13268136065*dim
            arg[(0, 2, 1, 3)]=-0.658937550011*x[0] + (0.820676271843)*x[1] + (0.166345171368)*x[2]
            ref[(0, 2, 1, 3)]=0.3280838932*dim
            arg[(0, 2, 2, 0)]=0.465892875074*x[0] + (0.711902159612)*x[1] + (0.704119646189)*x[2]
            ref[(0, 2, 2, 0)]=1.88191468088*dim
            arg[(0, 2, 2, 1)]=-0.414798652845*x[0] + (0.143306734288)*x[1] + (0.574123669332)*x[2]
            ref[(0, 2, 2, 1)]=0.302631750775*dim
            arg[(0, 2, 2, 2)]=0.0477339799158*x[0] + (0.568755611139)*x[1] + (-0.892569719849)*x[2]
            ref[(0, 2, 2, 2)]=-0.276080128794*dim
            arg[(0, 2, 2, 3)]=0.199431623111*x[0] + (-0.616858235029)*x[1] + (0.466371222943)*x[2]
            ref[(0, 2, 2, 3)]=0.0489446110248*dim
            arg[(0, 2, 3, 0)]=0.558807714787*x[0] + (-0.590137115552)*x[1] + (-0.0852873985299)*x[2]
            ref[(0, 2, 3, 0)]=-0.116616799295*dim
            arg[(0, 2, 3, 1)]=-0.723982510654*x[0] + (0.51727548175)*x[1] + (0.634840323809)*x[2]
            ref[(0, 2, 3, 1)]=0.428133294905*dim
            arg[(0, 2, 3, 2)]=0.201784918986*x[0] + (0.628632663895)*x[1] + (0.954593329145)*x[2]
            ref[(0, 2, 3, 2)]=1.78501091203*dim
            arg[(0, 2, 3, 3)]=-0.0647757270809*x[0] + (0.822816078156)*x[1] + (-0.0131612483869)*x[2]
            ref[(0, 2, 3, 3)]=0.744879102688*dim
            arg[(1, 0, 0, 0)]=0.12762091663*x[0] + (0.494637271506)*x[1] + (0.221979110137)*x[2]
            ref[(1, 0, 0, 0)]=0.844237298273*dim
            arg[(1, 0, 0, 1)]=-0.543063788797*x[0] + (-0.802462024522)*x[1] + (-0.460606560267)*x[2]
            ref[(1, 0, 0, 1)]=-1.80613237359*dim
            arg[(1, 0, 0, 2)]=-0.392869014201*x[0] + (-0.846284073246)*x[1] + (-0.376619615715)*x[2]
            ref[(1, 0, 0, 2)]=-1.61577270316*dim
            arg[(1, 0, 0, 3)]=0.651372180516*x[0] + (0.118669495694)*x[1] + (-0.285758150333)*x[2]
            ref[(1, 0, 0, 3)]=0.484283525877*dim
            arg[(1, 0, 1, 0)]=-0.761100640653*x[0] + (0.64371735567)*x[1] + (-0.754041172037)*x[2]
            ref[(1, 0, 1, 0)]=-0.87142445702*dim
            arg[(1, 0, 1, 1)]=-0.469877665858*x[0] + (-0.0755458832264)*x[1] + (-0.461327642718)*x[2]
            ref[(1, 0, 1, 1)]=-1.0067511918*dim
            arg[(1, 0, 1, 2)]=-0.597045618369*x[0] + (0.846851960078)*x[1] + (-0.485046578466)*x[2]
            ref[(1, 0, 1, 2)]=-0.235240236757*dim
            arg[(1, 0, 1, 3)]=-0.658192631419*x[0] + (-0.430641963922)*x[1] + (-0.459003770874)*x[2]
            ref[(1, 0, 1, 3)]=-1.54783836621*dim
            arg[(1, 0, 2, 0)]=0.255788246397*x[0] + (0.796244182299)*x[1] + (0.257718301166)*x[2]
            ref[(1, 0, 2, 0)]=1.30975072986*dim
            arg[(1, 0, 2, 1)]=0.414913988969*x[0] + (0.444741471825)*x[1] + (0.341397972462)*x[2]
            ref[(1, 0, 2, 1)]=1.20105343326*dim
            arg[(1, 0, 2, 2)]=-0.603356525421*x[0] + (-0.690324866374)*x[1] + (0.333180151744)*x[2]
            ref[(1, 0, 2, 2)]=-0.960501240051*dim
            arg[(1, 0, 2, 3)]=-0.63049786372*x[0] + (-0.887333702221)*x[1] + (-0.247582788307)*x[2]
            ref[(1, 0, 2, 3)]=-1.76541435425*dim
            arg[(1, 0, 3, 0)]=0.20617235894*x[0] + (0.607691570564)*x[1] + (-0.993161041394)*x[2]
            ref[(1, 0, 3, 0)]=-0.179297111891*dim
            arg[(1, 0, 3, 1)]=0.875547769696*x[0] + (-0.273423075377)*x[1] + (0.130625260308)*x[2]
            ref[(1, 0, 3, 1)]=0.732749954626*dim
            arg[(1, 0, 3, 2)]=-0.601891749717*x[0] + (0.337674080625)*x[1] + (0.873452792777)*x[2]
            ref[(1, 0, 3, 2)]=0.609235123685*dim
            arg[(1, 0, 3, 3)]=-0.822963320075*x[0] + (0.592869725848)*x[1] + (0.361549058764)*x[2]
            ref[(1, 0, 3, 3)]=0.131455464537*dim
            arg[(1, 1, 0, 0)]=0.0382966513683*x[0] + (-0.14530341712)*x[1] + (0.699295482424)*x[2]
            ref[(1, 1, 0, 0)]=0.592288716672*dim
            arg[(1, 1, 0, 1)]=-0.217091316243*x[0] + (0.0720162657441)*x[1] + (-0.727177027842)*x[2]
            ref[(1, 1, 0, 1)]=-0.872252078341*dim
            arg[(1, 1, 0, 2)]=-0.819865029402*x[0] + (0.501452222713)*x[1] + (0.411365471579)*x[2]
            ref[(1, 1, 0, 2)]=0.0929526648902*dim
            arg[(1, 1, 0, 3)]=-0.364067682795*x[0] + (0.403891594381)*x[1] + (-0.26215021777)*x[2]
            ref[(1, 1, 0, 3)]=-0.222326306184*dim
            arg[(1, 1, 1, 0)]=-0.363350383714*x[0] + (-0.232364596548)*x[1] + (0.0816656645997)*x[2]
            ref[(1, 1, 1, 0)]=-0.514049315663*dim
            arg[(1, 1, 1, 1)]=-0.845709132618*x[0] + (-0.29051806773)*x[1] + (0.321408722075)*x[2]
            ref[(1, 1, 1, 1)]=-0.814818478273*dim
            arg[(1, 1, 1, 2)]=-0.279416156792*x[0] + (0.964632710687)*x[1] + (-0.142454457623)*x[2]
            ref[(1, 1, 1, 2)]=0.542762096272*dim
            arg[(1, 1, 1, 3)]=-0.974703555766*x[0] + (-0.689634488096)*x[1] + (-0.496904050938)*x[2]
            ref[(1, 1, 1, 3)]=-2.1612420948*dim
            arg[(1, 1, 2, 0)]=0.33536286819*x[0] + (0.300035629358)*x[1] + (0.330801493329)*x[2]
            ref[(1, 1, 2, 0)]=0.966199990877*dim
            arg[(1, 1, 2, 1)]=-0.670118816572*x[0] + (-0.784176645323)*x[1] + (-0.619804376377)*x[2]
            ref[(1, 1, 2, 1)]=-2.07409983827*dim
            arg[(1, 1, 2, 2)]=-0.677491991281*x[0] + (0.781411299124)*x[1] + (0.571425734473)*x[2]
            ref[(1, 1, 2, 2)]=0.675345042317*dim
            arg[(1, 1, 2, 3)]=0.975903503756*x[0] + (0.755256936611)*x[1] + (0.145162222661)*x[2]
            ref[(1, 1, 2, 3)]=1.87632266303*dim
            arg[(1, 1, 3, 0)]=0.0464413443277*x[0] + (0.486367829282)*x[1] + (0.877860900103)*x[2]
            ref[(1, 1, 3, 0)]=1.41067007371*dim
            arg[(1, 1, 3, 1)]=0.39806179455*x[0] + (-0.00692103379757)*x[1] + (0.774805619941)*x[2]
            ref[(1, 1, 3, 1)]=1.16594638069*dim
            arg[(1, 1, 3, 2)]=-0.870140115842*x[0] + (0.13078665522)*x[1] + (-0.128537943565)*x[2]
            ref[(1, 1, 3, 2)]=-0.867891404187*dim
            arg[(1, 1, 3, 3)]=0.413247502628*x[0] + (0.397314984086)*x[1] + (-0.35758302954)*x[2]
            ref[(1, 1, 3, 3)]=0.452979457174*dim
            arg[(1, 2, 0, 0)]=-0.128527625874*x[0] + (-0.677487285069)*x[1] + (0.184018446096)*x[2]
            ref[(1, 2, 0, 0)]=-0.621996464847*dim
            arg[(1, 2, 0, 1)]=-0.541899960755*x[0] + (-0.83650083599)*x[1] + (0.0776829720419)*x[2]
            ref[(1, 2, 0, 1)]=-1.3007178247*dim
            arg[(1, 2, 0, 2)]=-0.735390354067*x[0] + (0.097459199974)*x[1] + (0.707823838822)*x[2]
            ref[(1, 2, 0, 2)]=0.0698926847293*dim
            arg[(1, 2, 0, 3)]=0.243013840388*x[0] + (-0.150572488306)*x[1] + (0.780476524774)*x[2]
            ref[(1, 2, 0, 3)]=0.872917876856*dim
            arg[(1, 2, 1, 0)]=0.598830960537*x[0] + (0.934128602936)*x[1] + (0.792294943329)*x[2]
            ref[(1, 2, 1, 0)]=2.3252545068*dim
            arg[(1, 2, 1, 1)]=0.735418392493*x[0] + (-0.582483364581)*x[1] + (-0.741106033538)*x[2]
            ref[(1, 2, 1, 1)]=-0.588171005626*dim
            arg[(1, 2, 1, 2)]=0.960853859069*x[0] + (0.508264488595)*x[1] + (-0.508169272417)*x[2]
            ref[(1, 2, 1, 2)]=0.960949075247*dim
            arg[(1, 2, 1, 3)]=0.529890082919*x[0] + (-0.108990470612)*x[1] + (0.120695370308)*x[2]
            ref[(1, 2, 1, 3)]=0.541594982616*dim
            arg[(1, 2, 2, 0)]=0.913079607156*x[0] + (-0.226795854873)*x[1] + (0.680664835306)*x[2]
            ref[(1, 2, 2, 0)]=1.36694858759*dim
            arg[(1, 2, 2, 1)]=-0.679147771596*x[0] + (-0.343207225738)*x[1] + (0.389139832026)*x[2]
            ref[(1, 2, 2, 1)]=-0.633215165307*dim
            arg[(1, 2, 2, 2)]=0.557067311274*x[0] + (-0.0636550862034)*x[1] + (0.933563622946)*x[2]
            ref[(1, 2, 2, 2)]=1.42697584802*dim
            arg[(1, 2, 2, 3)]=0.144694327916*x[0] + (0.917895274861)*x[1] + (0.766503630017)*x[2]
            ref[(1, 2, 2, 3)]=1.82909323279*dim
            arg[(1, 2, 3, 0)]=0.243822432661*x[0] + (0.338388177971)*x[1] + (0.441146660079)*x[2]
            ref[(1, 2, 3, 0)]=1.02335727071*dim
            arg[(1, 2, 3, 1)]=0.0330609423113*x[0] + (-0.910221138252)*x[1] + (0.0334281667599)*x[2]
            ref[(1, 2, 3, 1)]=-0.843732029181*dim
            arg[(1, 2, 3, 2)]=0.247215347633*x[0] + (-0.120985830731)*x[1] + (-0.712846870295)*x[2]
            ref[(1, 2, 3, 2)]=-0.586617353393*dim
            arg[(1, 2, 3, 3)]=-0.275560886819*x[0] + (-0.737623456061)*x[1] + (0.0274264260725)*x[2]
            ref[(1, 2, 3, 3)]=-0.985757916808*dim
            arg[(2, 0, 0, 0)]=0.673787548635*x[0] + (0.61027622111)*x[1] + (-0.453899241001)*x[2]
            ref[(2, 0, 0, 0)]=0.830164528744*dim
            arg[(2, 0, 0, 1)]=-0.353200401252*x[0] + (0.191152267133)*x[1] + (0.603479269053)*x[2]
            ref[(2, 0, 0, 1)]=0.441431134934*dim
            arg[(2, 0, 0, 2)]=0.00244025727376*x[0] + (-0.81952493766)*x[1] + (0.469692389761)*x[2]
            ref[(2, 0, 0, 2)]=-0.347392290625*dim
            arg[(2, 0, 0, 3)]=0.768366736004*x[0] + (-0.769481738235)*x[1] + (-0.502842407245)*x[2]
            ref[(2, 0, 0, 3)]=-0.503957409475*dim
            arg[(2, 0, 1, 0)]=-0.275747234361*x[0] + (0.903859699454)*x[1] + (-0.682289688163)*x[2]
            ref[(2, 0, 1, 0)]=-0.0541772230704*dim
            arg[(2, 0, 1, 1)]=0.501594592363*x[0] + (-0.586643246432)*x[1] + (0.846034427397)*x[2]
            ref[(2, 0, 1, 1)]=0.760985773329*dim
            arg[(2, 0, 1, 2)]=0.479274797772*x[0] + (0.768464117686)*x[1] + (0.517729069323)*x[2]
            ref[(2, 0, 1, 2)]=1.76546798478*dim
            arg[(2, 0, 1, 3)]=0.794887318047*x[0] + (-0.564600557553)*x[1] + (-0.511299166127)*x[2]
            ref[(2, 0, 1, 3)]=-0.281012405633*dim
            arg[(2, 0, 2, 0)]=-0.180088639542*x[0] + (-0.0253869220338)*x[1] + (-0.0299195213764)*x[2]
            ref[(2, 0, 2, 0)]=-0.235395082952*dim
            arg[(2, 0, 2, 1)]=-0.551646857053*x[0] + (-0.0430927912743)*x[1] + (-0.795928570864)*x[2]
            ref[(2, 0, 2, 1)]=-1.39066821919*dim
            arg[(2, 0, 2, 2)]=-0.995702408388*x[0] + (-0.181647825632)*x[1] + (-0.755090166852)*x[2]
            ref[(2, 0, 2, 2)]=-1.93244040087*dim
            arg[(2, 0, 2, 3)]=0.7883441772*x[0] + (-0.825613950903)*x[1] + (0.914188372433)*x[2]
            ref[(2, 0, 2, 3)]=0.87691859873*dim
            arg[(2, 0, 3, 0)]=-0.246633273189*x[0] + (-0.388383785195)*x[1] + (-0.152610267982)*x[2]
            ref[(2, 0, 3, 0)]=-0.787627326366*dim
            arg[(2, 0, 3, 1)]=-0.0376322496512*x[0] + (-0.0495666926116)*x[1] + (-0.320213884588)*x[2]
            ref[(2, 0, 3, 1)]=-0.407412826851*dim
            arg[(2, 0, 3, 2)]=-0.385692897446*x[0] + (-0.0699617355721)*x[1] + (-0.0775707218753)*x[2]
            ref[(2, 0, 3, 2)]=-0.533225354894*dim
            arg[(2, 0, 3, 3)]=-0.573414974025*x[0] + (-0.746359042605)*x[1] + (0.778903720306)*x[2]
            ref[(2, 0, 3, 3)]=-0.540870296324*dim
            arg[(2, 1, 0, 0)]=0.489526204766*x[0] + (-0.221961044438)*x[1] + (-0.446696302339)*x[2]
            ref[(2, 1, 0, 0)]=-0.179131142011*dim
            arg[(2, 1, 0, 1)]=0.312240994551*x[0] + (-0.0865198283788)*x[1] + (-0.571497828873)*x[2]
            ref[(2, 1, 0, 1)]=-0.345776662701*dim
            arg[(2, 1, 0, 2)]=-0.735537642983*x[0] + (-0.375730788157)*x[1] + (0.0206114524906)*x[2]
            ref[(2, 1, 0, 2)]=-1.09065697865*dim
            arg[(2, 1, 0, 3)]=-0.294733484913*x[0] + (-0.306658818206)*x[1] + (0.387468730404)*x[2]
            ref[(2, 1, 0, 3)]=-0.213923572715*dim
            arg[(2, 1, 1, 0)]=-0.532586473865*x[0] + (0.850975064153)*x[1] + (-0.68553819488)*x[2]
            ref[(2, 1, 1, 0)]=-0.367149604592*dim
            arg[(2, 1, 1, 1)]=0.497324880179*x[0] + (-0.208606092228)*x[1] + (-0.542432102455)*x[2]
            ref[(2, 1, 1, 1)]=-0.253713314504*dim
            arg[(2, 1, 1, 2)]=0.144697319323*x[0] + (-0.51106187879)*x[1] + (-0.260197814156)*x[2]
            ref[(2, 1, 1, 2)]=-0.626562373623*dim
            arg[(2, 1, 1, 3)]=-0.0725255574933*x[0] + (-0.471806515436)*x[1] + (0.598215891041)*x[2]
            ref[(2, 1, 1, 3)]=0.0538838181122*dim
            arg[(2, 1, 2, 0)]=0.643240271697*x[0] + (0.173390086443)*x[1] + (-0.889176789368)*x[2]
            ref[(2, 1, 2, 0)]=-0.0725464312277*dim
            arg[(2, 1, 2, 1)]=-0.5794770208*x[0] + (-0.593844931561)*x[1] + (-0.673576210546)*x[2]
            ref[(2, 1, 2, 1)]=-1.84689816291*dim
            arg[(2, 1, 2, 2)]=-0.612025522742*x[0] + (-0.646479129359)*x[1] + (0.547245261727)*x[2]
            ref[(2, 1, 2, 2)]=-0.711259390374*dim
            arg[(2, 1, 2, 3)]=-0.618156049381*x[0] + (-0.371703823983)*x[1] + (0.579925516298)*x[2]
            ref[(2, 1, 2, 3)]=-0.409934357066*dim
            arg[(2, 1, 3, 0)]=-0.875091849006*x[0] + (-0.00413851561131)*x[1] + (0.801572344917)*x[2]
            ref[(2, 1, 3, 0)]=-0.0776580196999*dim
            arg[(2, 1, 3, 1)]=-0.674949303821*x[0] + (-0.584115402506)*x[1] + (0.960700677545)*x[2]
            ref[(2, 1, 3, 1)]=-0.298364028783*dim
            arg[(2, 1, 3, 2)]=0.0555004021809*x[0] + (0.882157582933)*x[1] + (0.25969971223)*x[2]
            ref[(2, 1, 3, 2)]=1.19735769734*dim
            arg[(2, 1, 3, 3)]=0.635526216771*x[0] + (-0.147169102444)*x[1] + (-0.463934430688)*x[2]
            ref[(2, 1, 3, 3)]=0.0244226836395*dim
            arg[(2, 2, 0, 0)]=0.380554636478*x[0] + (-0.0173602410879)*x[1] + (0.531077402096)*x[2]
            ref[(2, 2, 0, 0)]=0.894271797486*dim
            arg[(2, 2, 0, 1)]=0.113070199914*x[0] + (0.390031266834)*x[1] + (0.457819398413)*x[2]
            ref[(2, 2, 0, 1)]=0.960920865161*dim
            arg[(2, 2, 0, 2)]=-0.580921085156*x[0] + (0.692807998622)*x[1] + (-0.0533549882871)*x[2]
            ref[(2, 2, 0, 2)]=0.0585319251784*dim
            arg[(2, 2, 0, 3)]=0.0643648274093*x[0] + (0.575004426356)*x[1] + (0.291185738379)*x[2]
            ref[(2, 2, 0, 3)]=0.930554992144*dim
            arg[(2, 2, 1, 0)]=-0.141029675356*x[0] + (0.945981944316)*x[1] + (-0.283825230364)*x[2]
            ref[(2, 2, 1, 0)]=0.521127038596*dim
            arg[(2, 2, 1, 1)]=-0.141608914395*x[0] + (-0.491880026624)*x[1] + (0.562765313064)*x[2]
            ref[(2, 2, 1, 1)]=-0.0707236279555*dim
            arg[(2, 2, 1, 2)]=0.320982452201*x[0] + (0.387912016327)*x[1] + (-0.0323840029604)*x[2]
            ref[(2, 2, 1, 2)]=0.676510465568*dim
            arg[(2, 2, 1, 3)]=0.823907346531*x[0] + (0.425209730793)*x[1] + (-0.153639138553)*x[2]
            ref[(2, 2, 1, 3)]=1.09547793877*dim
            arg[(2, 2, 2, 0)]=0.710938313114*x[0] + (0.847167114248)*x[1] + (-0.305253248226)*x[2]
            ref[(2, 2, 2, 0)]=1.25285217914*dim
            arg[(2, 2, 2, 1)]=0.244895589138*x[0] + (-0.829749993616)*x[1] + (-0.37848449691)*x[2]
            ref[(2, 2, 2, 1)]=-0.963338901388*dim
            arg[(2, 2, 2, 2)]=0.734449040517*x[0] + (-0.282488067857)*x[1] + (-0.596718940322)*x[2]
            ref[(2, 2, 2, 2)]=-0.144757967662*dim
            arg[(2, 2, 2, 3)]=0.392539946212*x[0] + (0.00518781085593)*x[1] + (-0.0458453841871)*x[2]
            ref[(2, 2, 2, 3)]=0.351882372881*dim
            arg[(2, 2, 3, 0)]=0.545369963635*x[0] + (0.598514115332)*x[1] + (-0.0749940301736)*x[2]
            ref[(2, 2, 3, 0)]=1.06889004879*dim
            arg[(2, 2, 3, 1)]=-0.15916172929*x[0] + (-0.8229327377)*x[1] + (-0.57200188339)*x[2]
            ref[(2, 2, 3, 1)]=-1.55409635038*dim
            arg[(2, 2, 3, 2)]=0.606161230557*x[0] + (-0.897586404734)*x[1] + (0.7342969469)*x[2]
            ref[(2, 2, 3, 2)]=0.442871772723*dim
            arg[(2, 2, 3, 3)]=-0.608624575421*x[0] + (-0.184149561159)*x[1] + (-0.721727085816)*x[2]
            ref[(2, 2, 3, 3)]=-1.5145012224*dim
            arg[(3, 0, 0, 0)]=-0.590376614371*x[0] + (-0.998294387695)*x[1] + (-0.534600464093)*x[2]
            ref[(3, 0, 0, 0)]=-2.12327146616*dim
            arg[(3, 0, 0, 1)]=0.699274107495*x[0] + (0.176231741753)*x[1] + (0.875483162031)*x[2]
            ref[(3, 0, 0, 1)]=1.75098901128*dim
            arg[(3, 0, 0, 2)]=0.78482502553*x[0] + (0.158575019832)*x[1] + (-0.816249477537)*x[2]
            ref[(3, 0, 0, 2)]=0.127150567825*dim
            arg[(3, 0, 0, 3)]=0.631832894608*x[0] + (0.87013118879)*x[1] + (0.7487541079)*x[2]
            ref[(3, 0, 0, 3)]=2.2507181913*dim
            arg[(3, 0, 1, 0)]=0.66857462485*x[0] + (-0.459970140723)*x[1] + (0.885597602786)*x[2]
            ref[(3, 0, 1, 0)]=1.09420208691*dim
            arg[(3, 0, 1, 1)]=-0.516472376931*x[0] + (-0.637518957518)*x[1] + (0.959524963478)*x[2]
            ref[(3, 0, 1, 1)]=-0.194466370971*dim
            arg[(3, 0, 1, 2)]=-0.268873933787*x[0] + (-0.248939161633)*x[1] + (-0.637224526209)*x[2]
            ref[(3, 0, 1, 2)]=-1.15503762163*dim
            arg[(3, 0, 1, 3)]=-0.881054510016*x[0] + (0.712302455057)*x[1] + (0.492548203061)*x[2]
            ref[(3, 0, 1, 3)]=0.323796148102*dim
            arg[(3, 0, 2, 0)]=0.210046551362*x[0] + (0.83272680996)*x[1] + (0.589720258836)*x[2]
            ref[(3, 0, 2, 0)]=1.63249362016*dim
            arg[(3, 0, 2, 1)]=-0.250927252353*x[0] + (0.0253110388082)*x[1] + (-0.688388748485)*x[2]
            ref[(3, 0, 2, 1)]=-0.91400496203*dim
            arg[(3, 0, 2, 2)]=0.879635768439*x[0] + (0.790951508573)*x[1] + (0.972970792383)*x[2]
            ref[(3, 0, 2, 2)]=2.64355806939*dim
            arg[(3, 0, 2, 3)]=0.523509065851*x[0] + (0.164093921619)*x[1] + (-0.879535586394)*x[2]
            ref[(3, 0, 2, 3)]=-0.191932598924*dim
            arg[(3, 0, 3, 0)]=-0.952843564312*x[0] + (0.784158172204)*x[1] + (0.355598627841)*x[2]
            ref[(3, 0, 3, 0)]=0.186913235732*dim
            arg[(3, 0, 3, 1)]=0.426863281049*x[0] + (0.608331236227)*x[1] + (0.519224982012)*x[2]
            ref[(3, 0, 3, 1)]=1.55441949929*dim
            arg[(3, 0, 3, 2)]=-0.719625135619*x[0] + (0.979719949932)*x[1] + (-0.28203035183)*x[2]
            ref[(3, 0, 3, 2)]=-0.0219355375169*dim
            arg[(3, 0, 3, 3)]=-0.237215367312*x[0] + (0.612993090736)*x[1] + (0.318386128964)*x[2]
            ref[(3, 0, 3, 3)]=0.694163852388*dim
            arg[(3, 1, 0, 0)]=-0.346226875994*x[0] + (0.537099351353)*x[1] + (-0.662397959898)*x[2]
            ref[(3, 1, 0, 0)]=-0.471525484539*dim
            arg[(3, 1, 0, 1)]=-0.811561944647*x[0] + (0.833271595352)*x[1] + (0.227004131849)*x[2]
            ref[(3, 1, 0, 1)]=0.248713782554*dim
            arg[(3, 1, 0, 2)]=0.313559161046*x[0] + (-0.383466733529)*x[1] + (-0.00971682907755)*x[2]
            ref[(3, 1, 0, 2)]=-0.0796244015607*dim
            arg[(3, 1, 0, 3)]=0.805884466776*x[0] + (0.265153188263)*x[1] + (0.027421331563)*x[2]
            ref[(3, 1, 0, 3)]=1.0984589866*dim
            arg[(3, 1, 1, 0)]=0.793610562349*x[0] + (0.654126518451)*x[1] + (0.84398512417)*x[2]
            ref[(3, 1, 1, 0)]=2.29172220497*dim
            arg[(3, 1, 1, 1)]=-0.364312900971*x[0] + (-0.155017159284)*x[1] + (0.518504120535)*x[2]
            ref[(3, 1, 1, 1)]=-0.000825939719287*dim
            arg[(3, 1, 1, 2)]=0.100426533937*x[0] + (0.257835346028)*x[1] + (0.109275560743)*x[2]
            ref[(3, 1, 1, 2)]=0.467537440708*dim
            arg[(3, 1, 1, 3)]=-0.316813401268*x[0] + (0.44174219668)*x[1] + (0.394190766351)*x[2]
            ref[(3, 1, 1, 3)]=0.519119561763*dim
            arg[(3, 1, 2, 0)]=-0.434258168453*x[0] + (-0.804167983011)*x[1] + (-0.898014608911)*x[2]
            ref[(3, 1, 2, 0)]=-2.13644076038*dim
            arg[(3, 1, 2, 1)]=-0.569013074602*x[0] + (0.71545519328)*x[1] + (-0.861450632653)*x[2]
            ref[(3, 1, 2, 1)]=-0.715008513974*dim
            arg[(3, 1, 2, 2)]=0.188558531874*x[0] + (0.766870317243)*x[1] + (0.408849258027)*x[2]
            ref[(3, 1, 2, 2)]=1.36427810714*dim
            arg[(3, 1, 2, 3)]=0.532427926664*x[0] + (0.12996159329)*x[1] + (0.207437140129)*x[2]
            ref[(3, 1, 2, 3)]=0.869826660084*dim
            arg[(3, 1, 3, 0)]=-0.145403833291*x[0] + (-0.89344836798)*x[1] + (0.217025186199)*x[2]
            ref[(3, 1, 3, 0)]=-0.821827015072*dim
            arg[(3, 1, 3, 1)]=-0.851578629143*x[0] + (0.56395170972)*x[1] + (-0.268111682608)*x[2]
            ref[(3, 1, 3, 1)]=-0.555738602031*dim
            arg[(3, 1, 3, 2)]=-0.200995456345*x[0] + (-0.548486375883)*x[1] + (0.248952310439)*x[2]
            ref[(3, 1, 3, 2)]=-0.500529521789*dim
            arg[(3, 1, 3, 3)]=0.0861288344674*x[0] + (0.571387598645)*x[1] + (-0.820011693417)*x[2]
            ref[(3, 1, 3, 3)]=-0.162495260304*dim
            arg[(3, 2, 0, 0)]=0.28605167634*x[0] + (0.321517935856)*x[1] + (0.643270989944)*x[2]
            ref[(3, 2, 0, 0)]=1.25084060214*dim
            arg[(3, 2, 0, 1)]=0.646479155657*x[0] + (0.517415572584)*x[1] + (-0.506490604154)*x[2]
            ref[(3, 2, 0, 1)]=0.657404124087*dim
            arg[(3, 2, 0, 2)]=0.90982653193*x[0] + (0.542571623578)*x[1] + (-0.336541750512)*x[2]
            ref[(3, 2, 0, 2)]=1.115856405*dim
            arg[(3, 2, 0, 3)]=0.695280370921*x[0] + (-0.115286770006)*x[1] + (-0.849483100062)*x[2]
            ref[(3, 2, 0, 3)]=-0.269489499146*dim
            arg[(3, 2, 1, 0)]=0.436906231717*x[0] + (-0.990097406147)*x[1] + (0.590020875659)*x[2]
            ref[(3, 2, 1, 0)]=0.0368297012297*dim
            arg[(3, 2, 1, 1)]=0.243596989974*x[0] + (-0.686132670657)*x[1] + (0.784067455293)*x[2]
            ref[(3, 2, 1, 1)]=0.34153177461*dim
            arg[(3, 2, 1, 2)]=-0.0422038544111*x[0] + (-0.728604828538)*x[1] + (0.755299833096)*x[2]
            ref[(3, 2, 1, 2)]=-0.0155088498527*dim
            arg[(3, 2, 1, 3)]=-0.849729570151*x[0] + (0.523363630582)*x[1] + (-0.104264276248)*x[2]
            ref[(3, 2, 1, 3)]=-0.430630215817*dim
            arg[(3, 2, 2, 0)]=-0.386943089521*x[0] + (-0.661792274237)*x[1] + (0.079222486761)*x[2]
            ref[(3, 2, 2, 0)]=-0.969512876996*dim
            arg[(3, 2, 2, 1)]=-0.810577428831*x[0] + (-0.438789343685)*x[1] + (-0.0909113611398)*x[2]
            ref[(3, 2, 2, 1)]=-1.34027813366*dim
            arg[(3, 2, 2, 2)]=-0.207793359314*x[0] + (0.210769078613)*x[1] + (0.870904198953)*x[2]
            ref[(3, 2, 2, 2)]=0.873879918252*dim
            arg[(3, 2, 2, 3)]=0.573340916713*x[0] + (0.209688861473)*x[1] + (0.542184473956)*x[2]
            ref[(3, 2, 2, 3)]=1.32521425214*dim
            arg[(3, 2, 3, 0)]=0.567830044868*x[0] + (-0.462075174386)*x[1] + (0.737205331561)*x[2]
            ref[(3, 2, 3, 0)]=0.842960202042*dim
            arg[(3, 2, 3, 1)]=0.717061228011*x[0] + (-0.695239995127)*x[1] + (0.187209412505)*x[2]
            ref[(3, 2, 3, 1)]=0.209030645389*dim
            arg[(3, 2, 3, 2)]=0.632418348852*x[0] + (-0.884599323241)*x[1] + (-0.23429381791)*x[2]
            ref[(3, 2, 3, 2)]=-0.486474792298*dim
            arg[(3, 2, 3, 3)]=0.0679735897243*x[0] + (0.985558294107)*x[1] + (-0.216037864242)*x[2]
            ref[(3, 2, 3, 3)]=0.837494019589*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.533765121768*x[0] + (0.937850841263)*x[1]
            ref=0.404085719495*dim
        else:
            arg=-0.221717452824*x[0] + (0.424360590846)*x[1] + (-0.413644484795)*x[2]
            ref=-0.211001346774*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.810056941484*x[0] + (-0.507906892166)*x[1]
            ref[(0,)]=0.302150049318*dim
            arg[(1,)]=0.595398285046*x[0] + (0.352316946361)*x[1]
            ref[(1,)]=0.947715231408*dim
            arg[(2,)]=0.943592795614*x[0] + (0.257158634223)*x[1]
            ref[(2,)]=1.20075142984*dim
            arg[(3,)]=-0.689341991675*x[0] + (-0.186888559301)*x[1]
            ref[(3,)]=-0.876230550977*dim
        else:
            arg[(0,)]=0.999848499741*x[0] + (-0.0518911257807)*x[1] + (0.0274259258733)*x[2]
            ref[(0,)]=0.975383299833*dim
            arg[(1,)]=-0.891522570091*x[0] + (-0.209552753192)*x[1] + (-0.819872256633)*x[2]
            ref[(1,)]=-1.92094757992*dim
            arg[(2,)]=-0.746383182012*x[0] + (-0.658318231442)*x[1] + (0.548294322291)*x[2]
            ref[(2,)]=-0.856407091163*dim
            arg[(3,)]=-0.687440431117*x[0] + (0.873477389005)*x[1] + (0.167826839426)*x[2]
            ref[(3,)]=0.353863797314*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.731299960632*x[0] + (0.848883832431)*x[1]
            ref[(0, 0)]=0.117583871799*dim
            arg[(0, 1)]=-0.451679673081*x[0] + (-0.728863970628)*x[1]
            ref[(0, 1)]=-1.18054364371*dim
            arg[(1, 0)]=0.0891600175635*x[0] + (-0.631249107307)*x[1]
            ref[(1, 0)]=-0.542089089744*dim
            arg[(1, 1)]=0.419174025719*x[0] + (0.41686155074)*x[1]
            ref[(1, 1)]=0.83603557646*dim
            arg[(2, 0)]=0.62203076392*x[0] + (-0.885193814168)*x[1]
            ref[(2, 0)]=-0.263163050249*dim
            arg[(2, 1)]=-0.20542441482*x[0] + (0.172647203488)*x[1]
            ref[(2, 1)]=-0.032777211332*dim
        else:
            arg[(0, 0)]=0.790751459787*x[0] + (0.920104516996)*x[1] + (-0.419429966847)*x[2]
            ref[(0, 0)]=1.29142600994*dim
            arg[(0, 1)]=-0.924255242083*x[0] + (0.0552737106128)*x[1] + (-0.815781450431)*x[2]
            ref[(0, 1)]=-1.6847629819*dim
            arg[(1, 0)]=-0.449542330197*x[0] + (-0.674502497932)*x[1] + (-0.248023789149)*x[2]
            ref[(1, 0)]=-1.37206861728*dim
            arg[(1, 1)]=-0.213631589324*x[0] + (-0.45617977841)*x[1] + (0.549958543574)*x[2]
            ref[(1, 1)]=-0.119852824159*dim
            arg[(2, 0)]=-0.285145908266*x[0] + (0.0667102822537)*x[1] + (0.520060851447)*x[2]
            ref[(2, 0)]=0.301625225435*dim
            arg[(2, 1)]=-0.536899873572*x[0] + (-0.901388182777)*x[1] + (-0.222966888499)*x[2]
            ref[(2, 1)]=-1.66125494485*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref=numpy.zeros((2, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.76651148493*x[0] + (-0.614382251494)*x[1]
            ref[(0, 0, 0)]=-1.38089373642*dim
            arg[(0, 0, 1)]=0.99234751155*x[0] + (0.0492025773433)*x[1]
            ref[(0, 0, 1)]=1.04155008889*dim
            arg[(0, 0, 2)]=-0.0393873751136*x[0] + (-0.943270860897)*x[1]
            ref[(0, 0, 2)]=-0.98265823601*dim
            arg[(0, 1, 0)]=-0.405091317944*x[0] + (-0.433392793501)*x[1]
            ref[(0, 1, 0)]=-0.838484111445*dim
            arg[(0, 1, 1)]=0.650972923174*x[0] + (0.835476360037)*x[1]
            ref[(0, 1, 1)]=1.48644928321*dim
            arg[(0, 1, 2)]=0.899042831657*x[0] + (-0.551601944999)*x[1]
            ref[(0, 1, 2)]=0.347440886658*dim
            arg[(0, 2, 0)]=0.722060160934*x[0] + (0.552704463003)*x[1]
            ref[(0, 2, 0)]=1.27476462394*dim
            arg[(0, 2, 1)]=0.839750211855*x[0] + (0.148802614268)*x[1]
            ref[(0, 2, 1)]=0.988552826123*dim
            arg[(0, 2, 2)]=-0.895340802386*x[0] + (0.321313526859)*x[1]
            ref[(0, 2, 2)]=-0.574027275527*dim
            arg[(1, 0, 0)]=0.792467212417*x[0] + (0.724077069267)*x[1]
            ref[(1, 0, 0)]=1.51654428168*dim
            arg[(1, 0, 1)]=0.711353673879*x[0] + (-0.851115419211)*x[1]
            ref[(1, 0, 1)]=-0.139761745331*dim
            arg[(1, 0, 2)]=-0.702032614475*x[0] + (0.96033085898)*x[1]
            ref[(1, 0, 2)]=0.258298244504*dim
            arg[(1, 1, 0)]=-0.699797715386*x[0] + (0.0134646191049)*x[1]
            ref[(1, 1, 0)]=-0.686333096281*dim
            arg[(1, 1, 1)]=-0.883811880417*x[0] + (0.365932959277)*x[1]
            ref[(1, 1, 1)]=-0.51787892114*dim
            arg[(1, 1, 2)]=0.51087195595*x[0] + (-0.302844163802)*x[1]
            ref[(1, 1, 2)]=0.208027792149*dim
            arg[(1, 2, 0)]=-0.781153714185*x[0] + (0.869520788164)*x[1]
            ref[(1, 2, 0)]=0.0883670739789*dim
            arg[(1, 2, 1)]=0.0130003857799*x[0] + (0.0865546676195)*x[1]
            ref[(1, 2, 1)]=0.0995550533994*dim
            arg[(1, 2, 2)]=-0.369733799402*x[0] + (0.850855818512)*x[1]
            ref[(1, 2, 2)]=0.48112201911*dim
        else:
            arg[(0, 0, 0)]=-0.577030995731*x[0] + (-0.262238584393)*x[1] + (-0.833745700428)*x[2]
            ref[(0, 0, 0)]=-1.67301528055*dim
            arg[(0, 0, 1)]=-0.150792229054*x[0] + (0.431337700595)*x[1] + (-0.585087036536)*x[2]
            ref[(0, 0, 1)]=-0.304541564995*dim
            arg[(0, 0, 2)]=0.532816892517*x[0] + (0.739629232574)*x[1] + (-0.627589554839)*x[2]
            ref[(0, 0, 2)]=0.644856570253*dim
            arg[(0, 1, 0)]=-0.491636107511*x[0] + (-0.176073432277)*x[1] + (-0.729796331576)*x[2]
            ref[(0, 1, 0)]=-1.39750587136*dim
            arg[(0, 1, 1)]=-0.649009555521*x[0] + (-0.287438635067)*x[1] + (0.820012249163)*x[2]
            ref[(0, 1, 1)]=-0.116435941425*dim
            arg[(0, 1, 2)]=-0.52492692461*x[0] + (0.683294442391)*x[1] + (0.502248048288)*x[2]
            ref[(0, 1, 2)]=0.660615566069*dim
            arg[(0, 2, 0)]=0.984967441032*x[0] + (0.524181965896)*x[1] + (-0.867861973181)*x[2]
            ref[(0, 2, 0)]=0.641287433747*dim
            arg[(0, 2, 1)]=0.642625099455*x[0] + (-0.797116028628)*x[1] + (-0.291432340017)*x[2]
            ref[(0, 2, 1)]=-0.44592326919*dim
            arg[(0, 2, 2)]=0.603236345531*x[0] + (0.923944951183)*x[1] + (0.391971091343)*x[2]
            ref[(0, 2, 2)]=1.91915238806*dim
            arg[(1, 0, 0)]=-0.914474842089*x[0] + (0.178365524689)*x[1] + (-0.181922950689)*x[2]
            ref[(1, 0, 0)]=-0.91803226809*dim
            arg[(1, 0, 1)]=0.14285900547*x[0] + (-0.182207066408)*x[1] + (0.0658147982666)*x[2]
            ref[(1, 0, 1)]=0.0264667373292*dim
            arg[(1, 0, 2)]=-0.117858628956*x[0] + (-0.529702947128)*x[1] + (-0.448777519268)*x[2]
            ref[(1, 0, 2)]=-1.09633909535*dim
            arg[(1, 1, 0)]=0.2716382771*x[0] + (0.913014685754)*x[1] + (-0.564482534541)*x[2]
            ref[(1, 1, 0)]=0.620170428314*dim
            arg[(1, 1, 1)]=0.798167118849*x[0] + (-0.567383394901)*x[1] + (0.733919989204)*x[2]
            ref[(1, 1, 1)]=0.964703713153*dim
            arg[(1, 1, 2)]=0.582033967233*x[0] + (-0.428517374381)*x[1] + (0.989645162571)*x[2]
            ref[(1, 1, 2)]=1.14316175542*dim
            arg[(1, 2, 0)]=-0.361089158578*x[0] + (0.903253092234)*x[1] + (0.904736737463)*x[2]
            ref[(1, 2, 0)]=1.44690067112*dim
            arg[(1, 2, 1)]=-0.335008959302*x[0] + (0.850560971594)*x[1] + (-0.509511161943)*x[2]
            ref[(1, 2, 1)]=0.0060408503492*dim
            arg[(1, 2, 2)]=0.490949653997*x[0] + (-0.410805037938)*x[1] + (0.718607301045)*x[2]
            ref[(1, 2, 2)]=0.798751917105*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 3),w)
        ref=numpy.zeros((4, 3, 2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.033966142729*x[0] + (0.79566008183)*x[1]
            ref[(0, 0, 0, 0)]=0.761693939101*dim
            arg[(0, 0, 0, 1)]=0.661901161853*x[0] + (0.677873958813)*x[1]
            ref[(0, 0, 0, 1)]=1.33977512067*dim
            arg[(0, 0, 0, 2)]=-0.518842235496*x[0] + (0.550851946297)*x[1]
            ref[(0, 0, 0, 2)]=0.0320097108016*dim
            arg[(0, 0, 1, 0)]=-0.944320835272*x[0] + (0.651075158538)*x[1]
            ref[(0, 0, 1, 0)]=-0.293245676733*dim
            arg[(0, 0, 1, 1)]=0.609580952527*x[0] + (0.00242972408513)*x[1]
            ref[(0, 0, 1, 1)]=0.612010676612*dim
            arg[(0, 0, 1, 2)]=0.132334714073*x[0] + (-0.329554108517)*x[1]
            ref[(0, 0, 1, 2)]=-0.197219394444*dim
            arg[(0, 1, 0, 0)]=0.223534172041*x[0] + (0.559026681846)*x[1]
            ref[(0, 1, 0, 0)]=0.782560853887*dim
            arg[(0, 1, 0, 1)]=-0.106338441121*x[0] + (-0.600984171854)*x[1]
            ref[(0, 1, 0, 1)]=-0.707322612975*dim
            arg[(0, 1, 0, 2)]=0.803339728203*x[0] + (0.521671678846)*x[1]
            ref[(0, 1, 0, 2)]=1.32501140705*dim
            arg[(0, 1, 1, 0)]=0.576791462073*x[0] + (-0.734112901213)*x[1]
            ref[(0, 1, 1, 0)]=-0.157321439141*dim
            arg[(0, 1, 1, 1)]=-0.0299585071462*x[0] + (0.41816597237)*x[1]
            ref[(0, 1, 1, 1)]=0.388207465224*dim
            arg[(0, 1, 1, 2)]=-0.312819281446*x[0] + (0.0794199870136)*x[1]
            ref[(0, 1, 1, 2)]=-0.233399294432*dim
            arg[(0, 2, 0, 0)]=-0.818158680524*x[0] + (-0.763297490566)*x[1]
            ref[(0, 2, 0, 0)]=-1.58145617109*dim
            arg[(0, 2, 0, 1)]=-0.327206700346*x[0] + (0.0327523543747)*x[1]
            ref[(0, 2, 0, 1)]=-0.294454345971*dim
            arg[(0, 2, 0, 2)]=0.115074805855*x[0] + (-0.540097591017)*x[1]
            ref[(0, 2, 0, 2)]=-0.425022785163*dim
            arg[(0, 2, 1, 0)]=-0.901197741681*x[0] + (-0.839005009552)*x[1]
            ref[(0, 2, 1, 0)]=-1.74020275123*dim
            arg[(0, 2, 1, 1)]=0.974433132111*x[0] + (-0.213191797622)*x[1]
            ref[(0, 2, 1, 1)]=0.761241334489*dim
            arg[(0, 2, 1, 2)]=0.662351569412*x[0] + (0.119548217976)*x[1]
            ref[(0, 2, 1, 2)]=0.781899787388*dim
            arg[(1, 0, 0, 0)]=0.546216964907*x[0] + (-0.197986494541)*x[1]
            ref[(1, 0, 0, 0)]=0.348230470367*dim
            arg[(1, 0, 0, 1)]=-0.842895238816*x[0] + (-0.617250561941)*x[1]
            ref[(1, 0, 0, 1)]=-1.46014580076*dim
            arg[(1, 0, 0, 2)]=0.804903610737*x[0] + (0.601373233269)*x[1]
            ref[(1, 0, 0, 2)]=1.40627684401*dim
            arg[(1, 0, 1, 0)]=0.0295383782662*x[0] + (-0.89681052672)*x[1]
            ref[(1, 0, 1, 0)]=-0.867272148454*dim
            arg[(1, 0, 1, 1)]=-0.0708455011307*x[0] + (-0.0442873059718)*x[1]
            ref[(1, 0, 1, 1)]=-0.115132807103*dim
            arg[(1, 0, 1, 2)]=0.856825212278*x[0] + (-0.503053807106)*x[1]
            ref[(1, 0, 1, 2)]=0.353771405172*dim
            arg[(1, 1, 0, 0)]=0.841063535014*x[0] + (0.30867019605)*x[1]
            ref[(1, 1, 0, 0)]=1.14973373106*dim
            arg[(1, 1, 0, 1)]=-0.00132556564358*x[0] + (0.339711083766)*x[1]
            ref[(1, 1, 0, 1)]=0.338385518122*dim
            arg[(1, 1, 0, 2)]=-0.984754525134*x[0] + (-0.340918705386)*x[1]
            ref[(1, 1, 0, 2)]=-1.32567323052*dim
            arg[(1, 1, 1, 0)]=-0.405427136867*x[0] + (0.224022432039)*x[1]
            ref[(1, 1, 1, 0)]=-0.181404704828*dim
            arg[(1, 1, 1, 1)]=-0.670327500326*x[0] + (-0.210501400214)*x[1]
            ref[(1, 1, 1, 1)]=-0.88082890054*dim
            arg[(1, 1, 1, 2)]=-0.471822179986*x[0] + (-0.415351564706)*x[1]
            ref[(1, 1, 1, 2)]=-0.887173744692*dim
            arg[(1, 2, 0, 0)]=-0.16953895526*x[0] + (0.411109977698)*x[1]
            ref[(1, 2, 0, 0)]=0.241571022438*dim
            arg[(1, 2, 0, 1)]=0.812733791634*x[0] + (-0.864263004103)*x[1]
            ref[(1, 2, 0, 1)]=-0.0515292124683*dim
            arg[(1, 2, 0, 2)]=-0.939391780014*x[0] + (-0.137813623272)*x[1]
            ref[(1, 2, 0, 2)]=-1.07720540329*dim
            arg[(1, 2, 1, 0)]=0.037032685124*x[0] + (-0.298927492007)*x[1]
            ref[(1, 2, 1, 0)]=-0.261894806883*dim
            arg[(1, 2, 1, 1)]=-0.612303767105*x[0] + (0.472460004237)*x[1]
            ref[(1, 2, 1, 1)]=-0.139843762868*dim
            arg[(1, 2, 1, 2)]=-0.874391473793*x[0] + (0.185019755611)*x[1]
            ref[(1, 2, 1, 2)]=-0.689371718181*dim
            arg[(2, 0, 0, 0)]=0.248198507035*x[0] + (0.0845707135751)*x[1]
            ref[(2, 0, 0, 0)]=0.33276922061*dim
            arg[(2, 0, 0, 1)]=0.313154594651*x[0] + (-0.0835776399936)*x[1]
            ref[(2, 0, 0, 1)]=0.229576954657*dim
            arg[(2, 0, 0, 2)]=-0.447239680531*x[0] + (-0.392367996592)*x[1]
            ref[(2, 0, 0, 2)]=-0.839607677123*dim
            arg[(2, 0, 1, 0)]=0.0858568060781*x[0] + (-0.644238747379)*x[1]
            ref[(2, 0, 1, 0)]=-0.558381941301*dim
            arg[(2, 0, 1, 1)]=-0.513639743711*x[0] + (-0.70171643871)*x[1]
            ref[(2, 0, 1, 1)]=-1.21535618242*dim
            arg[(2, 0, 1, 2)]=0.818228799401*x[0] + (0.668489302409)*x[1]
            ref[(2, 0, 1, 2)]=1.48671810181*dim
            arg[(2, 1, 0, 0)]=-0.835671832346*x[0] + (0.972661399775)*x[1]
            ref[(2, 1, 0, 0)]=0.13698956743*dim
            arg[(2, 1, 0, 1)]=0.354342412797*x[0] + (0.877027203004)*x[1]
            ref[(2, 1, 0, 1)]=1.2313696158*dim
            arg[(2, 1, 0, 2)]=0.204984561402*x[0] + (0.185431819286)*x[1]
            ref[(2, 1, 0, 2)]=0.390416380689*dim
            arg[(2, 1, 1, 0)]=0.236171595687*x[0] + (0.0394739947125)*x[1]
            ref[(2, 1, 1, 0)]=0.2756455904*dim
            arg[(2, 1, 1, 1)]=-0.716920152959*x[0] + (0.769314371573)*x[1]
            ref[(2, 1, 1, 1)]=0.052394218614*dim
            arg[(2, 1, 1, 2)]=-0.669345381066*x[0] + (-0.370495087031)*x[1]
            ref[(2, 1, 1, 2)]=-1.0398404681*dim
            arg[(2, 2, 0, 0)]=-0.666124341037*x[0] + (-0.0990789324653)*x[1]
            ref[(2, 2, 0, 0)]=-0.765203273502*dim
            arg[(2, 2, 0, 1)]=0.300986902711*x[0] + (0.568553327327)*x[1]
            ref[(2, 2, 0, 1)]=0.869540230038*dim
            arg[(2, 2, 0, 2)]=0.620225975679*x[0] + (-0.325964423744)*x[1]
            ref[(2, 2, 0, 2)]=0.294261551935*dim
            arg[(2, 2, 1, 0)]=-0.2639965488*x[0] + (0.404663182612)*x[1]
            ref[(2, 2, 1, 0)]=0.140666633811*dim
            arg[(2, 2, 1, 1)]=-0.159172981066*x[0] + (-0.796327385819)*x[1]
            ref[(2, 2, 1, 1)]=-0.955500366885*dim
            arg[(2, 2, 1, 2)]=0.375208125084*x[0] + (0.548501188583)*x[1]
            ref[(2, 2, 1, 2)]=0.923709313667*dim
            arg[(3, 0, 0, 0)]=0.277681937998*x[0] + (0.72504682141)*x[1]
            ref[(3, 0, 0, 0)]=1.00272875941*dim
            arg[(3, 0, 0, 1)]=0.154269657499*x[0] + (0.619975075094)*x[1]
            ref[(3, 0, 0, 1)]=0.774244732592*dim
            arg[(3, 0, 0, 2)]=0.952592521232*x[0] + (-0.0265837275439)*x[1]
            ref[(3, 0, 0, 2)]=0.926008793688*dim
            arg[(3, 0, 1, 0)]=0.666968021029*x[0] + (0.653493062)*x[1]
            ref[(3, 0, 1, 0)]=1.32046108303*dim
            arg[(3, 0, 1, 1)]=-0.65357731911*x[0] + (-0.530762005958)*x[1]
            ref[(3, 0, 1, 1)]=-1.18433932507*dim
            arg[(3, 0, 1, 2)]=0.919933904996*x[0] + (0.278589617619)*x[1]
            ref[(3, 0, 1, 2)]=1.19852352261*dim
            arg[(3, 1, 0, 0)]=0.176345006461*x[0] + (-0.0496474913453)*x[1]
            ref[(3, 1, 0, 0)]=0.126697515116*dim
            arg[(3, 1, 0, 1)]=0.531279082807*x[0] + (0.22233146075)*x[1]
            ref[(3, 1, 0, 1)]=0.753610543557*dim
            arg[(3, 1, 0, 2)]=0.207992037034*x[0] + (0.816651166876)*x[1]
            ref[(3, 1, 0, 2)]=1.02464320391*dim
            arg[(3, 1, 1, 0)]=0.490229114976*x[0] + (0.550349584932)*x[1]
            ref[(3, 1, 1, 0)]=1.04057869991*dim
            arg[(3, 1, 1, 1)]=0.629641602723*x[0] + (-0.839780467811)*x[1]
            ref[(3, 1, 1, 1)]=-0.210138865088*dim
            arg[(3, 1, 1, 2)]=-0.895556415929*x[0] + (-0.447916643154)*x[1]
            ref[(3, 1, 1, 2)]=-1.34347305908*dim
            arg[(3, 2, 0, 0)]=-0.900166063123*x[0] + (-0.731999556978)*x[1]
            ref[(3, 2, 0, 0)]=-1.6321656201*dim
            arg[(3, 2, 0, 1)]=-0.420249079371*x[0] + (0.933617450833)*x[1]
            ref[(3, 2, 0, 1)]=0.513368371462*dim
            arg[(3, 2, 0, 2)]=-0.689816523328*x[0] + (-0.656440259516)*x[1]
            ref[(3, 2, 0, 2)]=-1.34625678284*dim
            arg[(3, 2, 1, 0)]=-0.00143645001065*x[0] + (-0.831656291429)*x[1]
            ref[(3, 2, 1, 0)]=-0.83309274144*dim
            arg[(3, 2, 1, 1)]=-0.837614016403*x[0] + (-0.626599507879)*x[1]
            ref[(3, 2, 1, 1)]=-1.46421352428*dim
            arg[(3, 2, 1, 2)]=0.275992812651*x[0] + (-0.289576166211)*x[1]
            ref[(3, 2, 1, 2)]=-0.0135833535592*dim
        else:
            arg[(0, 0, 0, 0)]=0.515290854733*x[0] + (-0.454244015812)*x[1] + (0.746307486424)*x[2]
            ref[(0, 0, 0, 0)]=0.807354325345*dim
            arg[(0, 0, 0, 1)]=-0.854114586352*x[0] + (0.814115614808)*x[1] + (-0.180772057974)*x[2]
            ref[(0, 0, 0, 1)]=-0.220771029518*dim
            arg[(0, 0, 0, 2)]=-0.37425336581*x[0] + (0.435218139185)*x[1] + (-0.157781025566)*x[2]
            ref[(0, 0, 0, 2)]=-0.0968162521913*dim
            arg[(0, 0, 1, 0)]=-0.729634014113*x[0] + (0.645149746003)*x[1] + (0.81588380623)*x[2]
            ref[(0, 0, 1, 0)]=0.73139953812*dim
            arg[(0, 0, 1, 1)]=0.425900948676*x[0] + (-0.377149260352)*x[1] + (-0.694288726357)*x[2]
            ref[(0, 0, 1, 1)]=-0.645537038034*dim
            arg[(0, 0, 1, 2)]=0.35807381037*x[0] + (0.976409014939)*x[1] + (0.216971791079)*x[2]
            ref[(0, 0, 1, 2)]=1.55145461639*dim
            arg[(0, 1, 0, 0)]=-0.195491616289*x[0] + (-0.917743797177)*x[1] + (0.12424906726)*x[2]
            ref[(0, 1, 0, 0)]=-0.988986346206*dim
            arg[(0, 1, 0, 1)]=0.217195621971*x[0] + (-0.13643501611)*x[1] + (0.668520764945)*x[2]
            ref[(0, 1, 0, 1)]=0.749281370806*dim
            arg[(0, 1, 0, 2)]=-0.60319547856*x[0] + (-0.0523068793452)*x[1] + (0.459380657478)*x[2]
            ref[(0, 1, 0, 2)]=-0.196121700427*dim
            arg[(0, 1, 1, 0)]=0.827413532034*x[0] + (-0.552819887839)*x[1] + (-0.443078405695)*x[2]
            ref[(0, 1, 1, 0)]=-0.1684847615*dim
            arg[(0, 1, 1, 1)]=-0.920165658123*x[0] + (0.493975383216)*x[1] + (0.955472127284)*x[2]
            ref[(0, 1, 1, 1)]=0.529281852377*dim
            arg[(0, 1, 1, 2)]=-0.214333513109*x[0] + (0.921317472177)*x[1] + (0.992001458465)*x[2]
            ref[(0, 1, 1, 2)]=1.69898541753*dim
            arg[(0, 2, 0, 0)]=0.926475765669*x[0] + (-0.543247025236)*x[1] + (-0.580058898188)*x[2]
            ref[(0, 2, 0, 0)]=-0.196830157754*dim
            arg[(0, 2, 0, 1)]=-0.915181109042*x[0] + (0.697713218155)*x[1] + (-0.637200248604)*x[2]
            ref[(0, 2, 0, 1)]=-0.854668139492*dim
            arg[(0, 2, 0, 2)]=0.789029003131*x[0] + (-0.403592676747)*x[1] + (0.954773384053)*x[2]
            ref[(0, 2, 0, 2)]=1.34020971044*dim
            arg[(0, 2, 1, 0)]=-0.260904933683*x[0] + (-0.859840490522)*x[1] + (-0.64771742784)*x[2]
            ref[(0, 2, 1, 0)]=-1.76846285205*dim
            arg[(0, 2, 1, 1)]=-0.451810839212*x[0] + (-0.760026050308)*x[1] + (-0.0299893228521)*x[2]
            ref[(0, 2, 1, 1)]=-1.24182621237*dim
            arg[(0, 2, 1, 2)]=-0.451017533624*x[0] + (0.161528532529)*x[1] + (-0.503939887498)*x[2]
            ref[(0, 2, 1, 2)]=-0.793428888593*dim
            arg[(1, 0, 0, 0)]=0.336702775427*x[0] + (-0.16674418883)*x[1] + (-0.309192981019)*x[2]
            ref[(1, 0, 0, 0)]=-0.139234394423*dim
            arg[(1, 0, 0, 1)]=0.143839980052*x[0] + (-0.466580868516)*x[1] + (0.0764954969087)*x[2]
            ref[(1, 0, 0, 1)]=-0.246245391555*dim
            arg[(1, 0, 0, 2)]=-0.28358305501*x[0] + (0.111118477715)*x[1] + (-0.195715478139)*x[2]
            ref[(1, 0, 0, 2)]=-0.368180055434*dim
            arg[(1, 0, 1, 0)]=-0.949627469049*x[0] + (0.91449508266)*x[1] + (0.169415707764)*x[2]
            ref[(1, 0, 1, 0)]=0.134283321376*dim
            arg[(1, 0, 1, 1)]=-0.898386410398*x[0] + (0.655334598904)*x[1] + (0.511021318696)*x[2]
            ref[(1, 0, 1, 1)]=0.267969507203*dim
            arg[(1, 0, 1, 2)]=0.285653782263*x[0] + (-0.310187322309)*x[1] + (-0.683586652371)*x[2]
            ref[(1, 0, 1, 2)]=-0.708120192417*dim
            arg[(1, 1, 0, 0)]=0.595380838929*x[0] + (-0.999999707447)*x[1] + (0.375434016772)*x[2]
            ref[(1, 1, 0, 0)]=-0.0291848517455*dim
            arg[(1, 1, 0, 1)]=0.305758679842*x[0] + (-0.97486484607)*x[1] + (-0.925886607171)*x[2]
            ref[(1, 1, 0, 1)]=-1.5949927734*dim
            arg[(1, 1, 0, 2)]=-0.904407932318*x[0] + (0.685401236777)*x[1] + (-0.286222002101)*x[2]
            ref[(1, 1, 0, 2)]=-0.505228697641*dim
            arg[(1, 1, 1, 0)]=-0.40909395693*x[0] + (0.859566598142)*x[1] + (0.656402960508)*x[2]
            ref[(1, 1, 1, 0)]=1.10687560172*dim
            arg[(1, 1, 1, 1)]=0.966140595731*x[0] + (0.429143217284)*x[1] + (-0.171915601433)*x[2]
            ref[(1, 1, 1, 1)]=1.22336821158*dim
            arg[(1, 1, 1, 2)]=-0.258632234045*x[0] + (0.558446472736)*x[1] + (0.465908362113)*x[2]
            ref[(1, 1, 1, 2)]=0.765722600804*dim
            arg[(1, 2, 0, 0)]=0.971090053691*x[0] + (-0.822931879538)*x[1] + (0.132221792305)*x[2]
            ref[(1, 2, 0, 0)]=0.280379966459*dim
            arg[(1, 2, 0, 1)]=-0.174757090174*x[0] + (0.307686084858)*x[1] + (0.946714602515)*x[2]
            ref[(1, 2, 0, 1)]=1.0796435972*dim
            arg[(1, 2, 0, 2)]=0.268858870526*x[0] + (-0.692397365082)*x[1] + (0.534252031329)*x[2]
            ref[(1, 2, 0, 2)]=0.110713536774*dim
            arg[(1, 2, 1, 0)]=-0.265893215533*x[0] + (0.667994757119)*x[1] + (-0.582977639566)*x[2]
            ref[(1, 2, 1, 0)]=-0.180876097979*dim
            arg[(1, 2, 1, 1)]=-0.119549106053*x[0] + (-0.0452786913216)*x[1] + (0.555749796162)*x[2]
            ref[(1, 2, 1, 1)]=0.390921998787*dim
            arg[(1, 2, 1, 2)]=0.594402875167*x[0] + (0.33094997673)*x[1] + (-0.799301247737)*x[2]
            ref[(1, 2, 1, 2)]=0.12605160416*dim
            arg[(2, 0, 0, 0)]=0.407953758507*x[0] + (0.95681182591)*x[1] + (-0.366484969596)*x[2]
            ref[(2, 0, 0, 0)]=0.998280614821*dim
            arg[(2, 0, 0, 1)]=-0.13802360616*x[0] + (0.53118898093)*x[1] + (-0.0634854903644)*x[2]
            ref[(2, 0, 0, 1)]=0.329679884406*dim
            arg[(2, 0, 0, 2)]=-0.039262751092*x[0] + (0.601530922952)*x[1] + (0.702532085975)*x[2]
            ref[(2, 0, 0, 2)]=1.26480025784*dim
            arg[(2, 0, 1, 0)]=-0.82638291938*x[0] + (0.122883434907)*x[1] + (-0.543695917303)*x[2]
            ref[(2, 0, 1, 0)]=-1.24719540178*dim
            arg[(2, 0, 1, 1)]=0.96015239893*x[0] + (-0.00389464128005)*x[1] + (-0.872613761343)*x[2]
            ref[(2, 0, 1, 1)]=0.0836439963072*dim
            arg[(2, 0, 1, 2)]=-0.440447904097*x[0] + (0.0979850499227)*x[1] + (0.995174264536)*x[2]
            ref[(2, 0, 1, 2)]=0.652711410362*dim
            arg[(2, 1, 0, 0)]=0.262496192442*x[0] + (0.262162986102)*x[1] + (-0.0953360363016)*x[2]
            ref[(2, 1, 0, 0)]=0.429323142242*dim
            arg[(2, 1, 0, 1)]=-0.0576515259112*x[0] + (-0.0733603139776)*x[1] + (-0.849654121157)*x[2]
            ref[(2, 1, 0, 1)]=-0.980665961046*dim
            arg[(2, 1, 0, 2)]=-0.0918361830474*x[0] + (0.983359077017)*x[1] + (0.0339682387184)*x[2]
            ref[(2, 1, 0, 2)]=0.925491132688*dim
            arg[(2, 1, 1, 0)]=0.410162084272*x[0] + (-0.339231787369)*x[1] + (-0.42285219136)*x[2]
            ref[(2, 1, 1, 0)]=-0.351921894457*dim
            arg[(2, 1, 1, 1)]=0.910629071938*x[0] + (-0.416853189835)*x[1] + (-0.046443085414)*x[2]
            ref[(2, 1, 1, 1)]=0.447332796688*dim
            arg[(2, 1, 1, 2)]=-0.56316967226*x[0] + (0.367893896859)*x[1] + (0.42899061602)*x[2]
            ref[(2, 1, 1, 2)]=0.233714840619*dim
            arg[(2, 2, 0, 0)]=-0.0526489424751*x[0] + (-0.652943248943)*x[1] + (-0.140630455771)*x[2]
            ref[(2, 2, 0, 0)]=-0.846222647188*dim
            arg[(2, 2, 0, 1)]=-0.00342365129625*x[0] + (-0.59855481778)*x[1] + (0.975875437011)*x[2]
            ref[(2, 2, 0, 1)]=0.373896967935*dim
            arg[(2, 2, 0, 2)]=-0.714214460568*x[0] + (-0.120076442819)*x[1] + (0.141011505319)*x[2]
            ref[(2, 2, 0, 2)]=-0.693279398068*dim
            arg[(2, 2, 1, 0)]=0.870876668372*x[0] + (-0.351752109633)*x[1] + (0.768828778539)*x[2]
            ref[(2, 2, 1, 0)]=1.28795333728*dim
            arg[(2, 2, 1, 1)]=-0.10940928306*x[0] + (0.903176351286)*x[1] + (0.208371364954)*x[2]
            ref[(2, 2, 1, 1)]=1.00213843318*dim
            arg[(2, 2, 1, 2)]=0.0573162289557*x[0] + (-0.119281226845)*x[1] + (-0.608224100466)*x[2]
            ref[(2, 2, 1, 2)]=-0.670189098356*dim
            arg[(3, 0, 0, 0)]=0.906181414363*x[0] + (-0.596565384288)*x[1] + (0.835956266435)*x[2]
            ref[(3, 0, 0, 0)]=1.14557229651*dim
            arg[(3, 0, 0, 1)]=0.902544789886*x[0] + (-0.0615870968677)*x[1] + (-0.154910662823)*x[2]
            ref[(3, 0, 0, 1)]=0.686047030196*dim
            arg[(3, 0, 0, 2)]=-0.20758629015*x[0] + (-0.554314124883)*x[1] + (-0.475525647342)*x[2]
            ref[(3, 0, 0, 2)]=-1.23742606238*dim
            arg[(3, 0, 1, 0)]=0.457437162954*x[0] + (-0.140151326845)*x[1] + (0.982813322628)*x[2]
            ref[(3, 0, 1, 0)]=1.30009915874*dim
            arg[(3, 0, 1, 1)]=0.737252630023*x[0] + (-0.243591266823)*x[1] + (0.775413501153)*x[2]
            ref[(3, 0, 1, 1)]=1.26907486435*dim
            arg[(3, 0, 1, 2)]=0.159578160506*x[0] + (-0.349958433484)*x[1] + (0.257672026372)*x[2]
            ref[(3, 0, 1, 2)]=0.0672917533936*dim
            arg[(3, 1, 0, 0)]=0.454161782234*x[0] + (-0.652252116832)*x[1] + (0.555204940286)*x[2]
            ref[(3, 1, 0, 0)]=0.357114605689*dim
            arg[(3, 1, 0, 1)]=-0.689535794573*x[0] + (-0.31335446586)*x[1] + (0.0217232884367)*x[2]
            ref[(3, 1, 0, 1)]=-0.981166971996*dim
            arg[(3, 1, 0, 2)]=-0.891382551087*x[0] + (-0.198790547192)*x[1] + (0.639299293056)*x[2]
            ref[(3, 1, 0, 2)]=-0.450873805223*dim
            arg[(3, 1, 1, 0)]=0.184828484994*x[0] + (-0.443317882766)*x[1] + (-0.976592156382)*x[2]
            ref[(3, 1, 1, 0)]=-1.23508155415*dim
            arg[(3, 1, 1, 1)]=0.831520824538*x[0] + (-0.0234394022369)*x[1] + (-0.105606884613)*x[2]
            ref[(3, 1, 1, 1)]=0.702474537688*dim
            arg[(3, 1, 1, 2)]=-0.254211780731*x[0] + (0.966740906576)*x[1] + (-0.950934102859)*x[2]
            ref[(3, 1, 1, 2)]=-0.238404977014*dim
            arg[(3, 2, 0, 0)]=-0.976422601178*x[0] + (0.496535600197)*x[1] + (0.919914853258)*x[2]
            ref[(3, 2, 0, 0)]=0.440027852278*dim
            arg[(3, 2, 0, 1)]=0.199669401886*x[0] + (0.778547273929)*x[1] + (-0.880921340479)*x[2]
            ref[(3, 2, 0, 1)]=0.097295335336*dim
            arg[(3, 2, 0, 2)]=0.282831785219*x[0] + (-0.0603000986937)*x[1] + (0.674011162545)*x[2]
            ref[(3, 2, 0, 2)]=0.896542849071*dim
            arg[(3, 2, 1, 0)]=0.129602735232*x[0] + (0.375155302563)*x[1] + (0.855977794336)*x[2]
            ref[(3, 2, 1, 0)]=1.36073583213*dim
            arg[(3, 2, 1, 1)]=-0.884420463029*x[0] + (0.936800324944)*x[1] + (0.557167743884)*x[2]
            ref[(3, 2, 1, 1)]=0.609547605798*dim
            arg[(3, 2, 1, 2)]=-0.800041146068*x[0] + (0.167289025862)*x[1] + (-0.765552490039)*x[2]
            ref[(3, 2, 1, 2)]=-1.39830461025*dim
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.374915716642*x[0]**o + (0.791773608568)*x[0] + (0.537929169266)*x[1]**o + (-0.634496770846)*x[1]
            ref=0.912844885908*(1+2.*(dim-1)/(o+1.)) + (0.157276837722)*dim
        else:
            arg=0.673231394939*x[0]**o + (-0.244538653612)*x[0] + (-0.289564561683)*x[1]**o + (0.510809496468)*x[1] + (-0.88536103548)*x[2]**o + (-0.88509085546)*x[2]
            ref=-0.501694202224*(1+2.*(dim-1)/(o+1.)) + (-0.618820012604)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.107738740486*x[0]**o + (0.130954571377)*x[0] + (0.930896819503)*x[1]**o + (0.599010643978)*x[1]
            ref[(0,)]=1.03863555999*(1+2.*(dim-1)/(o+1.)) + (0.729965215355)*dim
            arg[(1,)]=-0.888139253386*x[0]**o + (0.671637920167)*x[0] + (0.191455114593)*x[1]**o + (0.539932009319)*x[1]
            ref[(1,)]=-0.696684138793*(1+2.*(dim-1)/(o+1.)) + (1.21156992949)*dim
            arg[(2,)]=0.788814059172*x[0]**o + (-0.715426509758)*x[0] + (0.117500191019)*x[1]**o + (0.500723493975)*x[1]
            ref[(2,)]=0.90631425019*(1+2.*(dim-1)/(o+1.)) + (-0.214703015783)*dim
            arg[(3,)]=-0.921866873191*x[0]**o + (0.137485668309)*x[0] + (-0.308200931497)*x[1]**o + (-0.687754649274)*x[1]
            ref[(3,)]=-1.23006780469*(1+2.*(dim-1)/(o+1.)) + (-0.550268980966)*dim
        else:
            arg[(0,)]=-0.477178297477*x[0]**o + (-0.759933235196)*x[0] + (0.0686959258319)*x[1]**o + (-0.700901248522)*x[1] + (0.948004500426)*x[2]**o + (-0.592491115076)*x[2]
            ref[(0,)]=0.539522128781*(1+2.*(dim-1)/(o+1.)) + (-2.05332559879)*dim
            arg[(1,)]=0.591669231716*x[0]**o + (-0.0709455337234)*x[0] + (0.0830768298147)*x[1]**o + (-0.321463646887)*x[1] + (0.861731286558)*x[2]**o + (0.913570972862)*x[2]
            ref[(1,)]=1.53647734809*(1+2.*(dim-1)/(o+1.)) + (0.521161792252)*dim
            arg[(2,)]=-0.842188466746*x[0]**o + (-0.596342510976)*x[0] + (-0.544942050652)*x[1]**o + (-0.318676155925)*x[1] + (0.567634400993)*x[2]**o + (-0.303619435395)*x[2]
            ref[(2,)]=-0.819496116404*(1+2.*(dim-1)/(o+1.)) + (-1.2186381023)*dim
            arg[(3,)]=-0.801732065516*x[0]**o + (0.658679996741)*x[0] + (0.842814922796)*x[1]**o + (0.840682380138)*x[1] + (0.189235453546)*x[2]**o + (0.817220555727)*x[2]
            ref[(3,)]=0.230318310826*(1+2.*(dim-1)/(o+1.)) + (2.31658293261)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.986553590484*x[0]**o + (-0.775526869769)*x[0] + (0.628697987571)*x[1]**o + (-0.276317102011)*x[1]
            ref[(0, 0)]=1.61525157805*(1+2.*(dim-1)/(o+1.)) + (-1.05184397178)*dim
            arg[(0, 1)]=-0.829263719561*x[0]**o + (-0.318738771718)*x[0] + (-0.627794088413)*x[1]**o + (-0.0689104666528)*x[1]
            ref[(0, 1)]=-1.45705780797*(1+2.*(dim-1)/(o+1.)) + (-0.387649238371)*dim
            arg[(0, 2)]=0.283708722429*x[0]**o + (-0.67359599414)*x[0] + (-0.273622155302)*x[1]**o + (-0.0643620430331)*x[1]
            ref[(0, 2)]=0.0100865671271*(1+2.*(dim-1)/(o+1.)) + (-0.737958037173)*dim
            arg[(1, 0)]=0.225758980892*x[0]**o + (-0.388543039882)*x[0] + (-0.708566380631)*x[1]**o + (0.856812282128)*x[1]
            ref[(1, 0)]=-0.482807399739*(1+2.*(dim-1)/(o+1.)) + (0.468269242246)*dim
            arg[(1, 1)]=-0.823092983766*x[0]**o + (0.83470464147)*x[0] + (0.477503860964)*x[1]**o + (0.0464875699937)*x[1]
            ref[(1, 1)]=-0.345589122802*(1+2.*(dim-1)/(o+1.)) + (0.881192211464)*dim
            arg[(1, 2)]=-0.0315922238535*x[0]**o + (-0.98473958224)*x[0] + (0.353059017538)*x[1]**o + (0.493852446476)*x[1]
            ref[(1, 2)]=0.321466793685*(1+2.*(dim-1)/(o+1.)) + (-0.490887135764)*dim
            arg[(2, 0)]=-0.822729883866*x[0]**o + (-0.651928343131)*x[0] + (0.0238728613994)*x[1]**o + (-0.67461963949)*x[1]
            ref[(2, 0)]=-0.798857022467*(1+2.*(dim-1)/(o+1.)) + (-1.32654798262)*dim
            arg[(2, 1)]=0.130017207276*x[0]**o + (0.24261548893)*x[0] + (0.266320300244)*x[1]**o + (0.278672258033)*x[1]
            ref[(2, 1)]=0.39633750752*(1+2.*(dim-1)/(o+1.)) + (0.521287746962)*dim
            arg[(2, 2)]=0.99137014869*x[0]**o + (0.691179363672)*x[0] + (-0.293709726165)*x[1]**o + (-0.0882150411031)*x[1]
            ref[(2, 2)]=0.697660422525*(1+2.*(dim-1)/(o+1.)) + (0.602964322569)*dim
        else:
            arg[(0, 0)]=0.300067739317*x[0]**o + (-0.57297612396)*x[0] + (0.826266160964)*x[1]**o + (-0.481607883424)*x[1] + (-0.679642175625)*x[2]**o + (0.395303946799)*x[2]
            ref[(0, 0)]=0.446691724655*(1+2.*(dim-1)/(o+1.)) + (-0.659280060584)*dim
            arg[(0, 1)]=0.615148502657*x[0]**o + (0.570903770625)*x[0] + (0.35747376851)*x[1]**o + (-0.799800552094)*x[1] + (-0.813736962383)*x[2]**o + (0.947882279032)*x[2]
            ref[(0, 1)]=0.158885308785*(1+2.*(dim-1)/(o+1.)) + (0.718985497564)*dim
            arg[(0, 2)]=0.317364939872*x[0]**o + (-0.228716920657)*x[0] + (0.0706117958857)*x[1]**o + (-0.618295700433)*x[1] + (-0.428720127559)*x[2]**o + (-0.594174760591)*x[2]
            ref[(0, 2)]=-0.0407433918022*(1+2.*(dim-1)/(o+1.)) + (-1.44118738168)*dim
            arg[(1, 0)]=0.269228235314*x[0]**o + (0.0969106710423)*x[0] + (0.944903225433)*x[1]**o + (0.133979260293)*x[1] + (0.97315903251)*x[2]**o + (-0.791873597258)*x[2]
            ref[(1, 0)]=2.18729049326*(1+2.*(dim-1)/(o+1.)) + (-0.560983665923)*dim
            arg[(1, 1)]=-0.48066839783*x[0]**o + (0.326801737602)*x[0] + (0.623997031241)*x[1]**o + (-0.794195265343)*x[1] + (0.103290479755)*x[2]**o + (-0.826232399589)*x[2]
            ref[(1, 1)]=0.246619113166*(1+2.*(dim-1)/(o+1.)) + (-1.29362592733)*dim
            arg[(1, 2)]=-0.633807890399*x[0]**o + (-0.643953375031)*x[0] + (0.382858969158)*x[1]**o + (0.0116922223468)*x[1] + (0.56480414969)*x[2]**o + (-0.455379028253)*x[2]
            ref[(1, 2)]=0.313855228449*(1+2.*(dim-1)/(o+1.)) + (-1.08764018094)*dim
            arg[(2, 0)]=-0.12634437242*x[0]**o + (-0.296768510482)*x[0] + (-0.95357263181)*x[1]**o + (0.27797336788)*x[1] + (-0.0521211215157)*x[2]**o + (0.844468505167)*x[2]
            ref[(2, 0)]=-1.13203812575*(1+2.*(dim-1)/(o+1.)) + (0.825673362565)*dim
            arg[(2, 1)]=-0.743963729333*x[0]**o + (-0.896909317533)*x[0] + (-0.875716855449)*x[1]**o + (0.338228899692)*x[1] + (-0.947431756598)*x[2]**o + (0.401371463411)*x[2]
            ref[(2, 1)]=-2.56711234138*(1+2.*(dim-1)/(o+1.)) + (-0.15730895443)*dim
            arg[(2, 2)]=0.153409905295*x[0]**o + (-0.603907610012)*x[0] + (0.144880186797)*x[1]**o + (-0.61688633641)*x[1] + (-0.934050085017)*x[2]**o + (-0.00531645672975)*x[2]
            ref[(2, 2)]=-0.635759992925*(1+2.*(dim-1)/(o+1.)) + (-1.22611040315)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref=numpy.zeros((3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.850405033041*x[0]**o + (0.375268933296)*x[0] + (-0.142795963829)*x[1]**o + (0.940285758022)*x[1]
            ref[(0, 0, 0)]=0.707609069212*(1+2.*(dim-1)/(o+1.)) + (1.31555469132)*dim
            arg[(0, 0, 1)]=0.571748341873*x[0]**o + (0.349996712675)*x[0] + (0.40104696405)*x[1]**o + (0.776584699536)*x[1]
            ref[(0, 0, 1)]=0.972795305923*(1+2.*(dim-1)/(o+1.)) + (1.12658141221)*dim
            arg[(0, 1, 0)]=-0.790867988201*x[0]**o + (-0.928031968495)*x[0] + (0.243143615602)*x[1]**o + (0.677470938595)*x[1]
            ref[(0, 1, 0)]=-0.547724372599*(1+2.*(dim-1)/(o+1.)) + (-0.2505610299)*dim
            arg[(0, 1, 1)]=-0.525734114842*x[0]**o + (0.651975498593)*x[0] + (-0.198704998067)*x[1]**o + (0.63242803382)*x[1]
            ref[(0, 1, 1)]=-0.724439112909*(1+2.*(dim-1)/(o+1.)) + (1.28440353241)*dim
            arg[(0, 2, 0)]=-0.455459450499*x[0]**o + (0.874776739033)*x[0] + (-0.49542989175)*x[1]**o + (0.27356561711)*x[1]
            ref[(0, 2, 0)]=-0.950889342249*(1+2.*(dim-1)/(o+1.)) + (1.14834235614)*dim
            arg[(0, 2, 1)]=-0.299975861621*x[0]**o + (-0.493479982013)*x[0] + (0.854239828153)*x[1]**o + (0.186511173036)*x[1]
            ref[(0, 2, 1)]=0.554263966532*(1+2.*(dim-1)/(o+1.)) + (-0.306968808977)*dim
            arg[(1, 0, 0)]=0.408506129778*x[0]**o + (0.801536678787)*x[0] + (0.151203771784)*x[1]**o + (-0.489450284328)*x[1]
            ref[(1, 0, 0)]=0.559709901562*(1+2.*(dim-1)/(o+1.)) + (0.312086394459)*dim
            arg[(1, 0, 1)]=0.82117258971*x[0]**o + (-0.276938851028)*x[0] + (0.902255941816)*x[1]**o + (0.105105521608)*x[1]
            ref[(1, 0, 1)]=1.72342853153*(1+2.*(dim-1)/(o+1.)) + (-0.17183332942)*dim
            arg[(1, 1, 0)]=0.316767319098*x[0]**o + (0.309613367458)*x[0] + (-0.859508300474)*x[1]**o + (-0.0670569799802)*x[1]
            ref[(1, 1, 0)]=-0.542740981376*(1+2.*(dim-1)/(o+1.)) + (0.242556387477)*dim
            arg[(1, 1, 1)]=-0.739775142757*x[0]**o + (-0.498245317008)*x[0] + (-0.0479628414208)*x[1]**o + (0.204144423097)*x[1]
            ref[(1, 1, 1)]=-0.787737984178*(1+2.*(dim-1)/(o+1.)) + (-0.294100893911)*dim
            arg[(1, 2, 0)]=0.287985485271*x[0]**o + (-0.561073708254)*x[0] + (0.944472938519)*x[1]**o + (0.125014365055)*x[1]
            ref[(1, 2, 0)]=1.23245842379*(1+2.*(dim-1)/(o+1.)) + (-0.436059343199)*dim
            arg[(1, 2, 1)]=-0.148912018216*x[0]**o + (0.457882365503)*x[0] + (0.668124288492)*x[1]**o + (0.409161603433)*x[1]
            ref[(1, 2, 1)]=0.519212270276*(1+2.*(dim-1)/(o+1.)) + (0.867043968936)*dim
            arg[(2, 0, 0)]=-0.447579807098*x[0]**o + (-0.723915161829)*x[0] + (0.963287814941)*x[1]**o + (0.807574430813)*x[1]
            ref[(2, 0, 0)]=0.515708007843*(1+2.*(dim-1)/(o+1.)) + (0.0836592689836)*dim
            arg[(2, 0, 1)]=-0.719396768413*x[0]**o + (-0.69069032873)*x[0] + (-0.385942930887)*x[1]**o + (0.868332258992)*x[1]
            ref[(2, 0, 1)]=-1.1053396993*(1+2.*(dim-1)/(o+1.)) + (0.177641930262)*dim
            arg[(2, 1, 0)]=0.854535405836*x[0]**o + (0.549418059072)*x[0] + (-0.299681980572)*x[1]**o + (0.462650551105)*x[1]
            ref[(2, 1, 0)]=0.554853425264*(1+2.*(dim-1)/(o+1.)) + (1.01206861018)*dim
            arg[(2, 1, 1)]=-0.9159522473*x[0]**o + (-0.0321760138253)*x[0] + (-0.118894100712)*x[1]**o + (-0.949944206687)*x[1]
            ref[(2, 1, 1)]=-1.03484634801*(1+2.*(dim-1)/(o+1.)) + (-0.982120220513)*dim
            arg[(2, 2, 0)]=-0.887594534386*x[0]**o + (-0.792465966402)*x[0] + (-0.0746013163432)*x[1]**o + (-0.0359043654946)*x[1]
            ref[(2, 2, 0)]=-0.96219585073*(1+2.*(dim-1)/(o+1.)) + (-0.828370331897)*dim
            arg[(2, 2, 1)]=0.661948739453*x[0]**o + (-0.261980883923)*x[0] + (-0.675494765258)*x[1]**o + (-0.103192956415)*x[1]
            ref[(2, 2, 1)]=-0.0135460258055*(1+2.*(dim-1)/(o+1.)) + (-0.365173840338)*dim
        else:
            arg[(0, 0, 0)]=-0.208022537256*x[0]**o + (-0.729453540261)*x[0] + (-0.439750309964)*x[1]**o + (0.159062162253)*x[1] + (0.421947561477)*x[2]**o + (0.386276364033)*x[2]
            ref[(0, 0, 0)]=-0.225825285744*(1+2.*(dim-1)/(o+1.)) + (-0.184115013975)*dim
            arg[(0, 0, 1)]=-0.66845150825*x[0]**o + (-0.178654461368)*x[0] + (0.0845438079896)*x[1]**o + (0.716221028069)*x[1] + (0.608126162365)*x[2]**o + (-0.842257023324)*x[2]
            ref[(0, 0, 1)]=0.0242184621045*(1+2.*(dim-1)/(o+1.)) + (-0.304690456623)*dim
            arg[(0, 1, 0)]=-0.72236551563*x[0]**o + (0.52055085962)*x[0] + (0.361553029164)*x[1]**o + (0.0318278963127)*x[1] + (0.0564074775277)*x[2]**o + (0.945810959476)*x[2]
            ref[(0, 1, 0)]=-0.304405008938*(1+2.*(dim-1)/(o+1.)) + (1.49818971541)*dim
            arg[(0, 1, 1)]=0.645088877763*x[0]**o + (-0.925106654061)*x[0] + (-0.219843458915)*x[1]**o + (0.390199718693)*x[1] + (0.512585750342)*x[2]**o + (-0.485204282848)*x[2]
            ref[(0, 1, 1)]=0.937831169191*(1+2.*(dim-1)/(o+1.)) + (-1.02011121822)*dim
            arg[(0, 2, 0)]=0.549871476574*x[0]**o + (0.291428555685)*x[0] + (-0.0266239931428)*x[1]**o + (0.169219991352)*x[1] + (0.868970639802)*x[2]**o + (0.999506014038)*x[2]
            ref[(0, 2, 0)]=1.39221812323*(1+2.*(dim-1)/(o+1.)) + (1.46015456107)*dim
            arg[(0, 2, 1)]=0.380706861717*x[0]**o + (-0.85293214675)*x[0] + (-0.71145631057)*x[1]**o + (0.38345829965)*x[1] + (-0.439969351456)*x[2]**o + (-0.461745620537)*x[2]
            ref[(0, 2, 1)]=-0.77071880031*(1+2.*(dim-1)/(o+1.)) + (-0.931219467637)*dim
            arg[(1, 0, 0)]=-0.784573482819*x[0]**o + (-0.497279679236)*x[0] + (-0.807798981025)*x[1]**o + (0.314784039448)*x[1] + (-0.63701069895)*x[2]**o + (0.00644183594232)*x[2]
            ref[(1, 0, 0)]=-2.22938316279*(1+2.*(dim-1)/(o+1.)) + (-0.176053803845)*dim
            arg[(1, 0, 1)]=-0.233887347485*x[0]**o + (0.910807807492)*x[0] + (-0.717344340368)*x[1]**o + (0.921235146288)*x[1] + (0.472680616203)*x[2]**o + (0.586963591638)*x[2]
            ref[(1, 0, 1)]=-0.478551071649*(1+2.*(dim-1)/(o+1.)) + (2.41900654542)*dim
            arg[(1, 1, 0)]=0.944773559077*x[0]**o + (0.345193394947)*x[0] + (0.592133701762)*x[1]**o + (0.0165910371404)*x[1] + (-0.836804214383)*x[2]**o + (-0.544468461671)*x[2]
            ref[(1, 1, 0)]=0.700103046456*(1+2.*(dim-1)/(o+1.)) + (-0.182684029584)*dim
            arg[(1, 1, 1)]=0.49661566542*x[0]**o + (0.259466290345)*x[0] + (-0.721123771709)*x[1]**o + (0.439476174467)*x[1] + (-0.475796392063)*x[2]**o + (-0.370731944116)*x[2]
            ref[(1, 1, 1)]=-0.700304498351*(1+2.*(dim-1)/(o+1.)) + (0.328210520696)*dim
            arg[(1, 2, 0)]=0.46043964526*x[0]**o + (0.449311819635)*x[0] + (-0.980471762588)*x[1]**o + (0.444071493951)*x[1] + (0.306922288311)*x[2]**o + (-0.773206223602)*x[2]
            ref[(1, 2, 0)]=-0.213109829017*(1+2.*(dim-1)/(o+1.)) + (0.120177089984)*dim
            arg[(1, 2, 1)]=0.16802741437*x[0]**o + (0.512810624657)*x[0] + (0.139081162299)*x[1]**o + (-0.557001964928)*x[1] + (-0.188942282099)*x[2]**o + (-0.830350568907)*x[2]
            ref[(1, 2, 1)]=0.118166294569*(1+2.*(dim-1)/(o+1.)) + (-0.874541909178)*dim
            arg[(2, 0, 0)]=-0.94253089368*x[0]**o + (-0.184213759292)*x[0] + (0.831082444977)*x[1]**o + (-0.968980097449)*x[1] + (0.497275203315)*x[2]**o + (-0.284804222555)*x[2]
            ref[(2, 0, 0)]=0.385826754612*(1+2.*(dim-1)/(o+1.)) + (-1.4379980793)*dim
            arg[(2, 0, 1)]=-0.598376165594*x[0]**o + (0.217056018923)*x[0] + (0.422339289738)*x[1]**o + (0.0169324577878)*x[1] + (0.119887333102)*x[2]**o + (0.949033820048)*x[2]
            ref[(2, 0, 1)]=-0.0561495427536*(1+2.*(dim-1)/(o+1.)) + (1.18302229676)*dim
            arg[(2, 1, 0)]=-0.823513780406*x[0]**o + (0.62725896057)*x[0] + (0.322331474213)*x[1]**o + (-0.308109297515)*x[1] + (-0.196580683113)*x[2]**o + (-0.561399906064)*x[2]
            ref[(2, 1, 0)]=-0.697762989306*(1+2.*(dim-1)/(o+1.)) + (-0.242250243009)*dim
            arg[(2, 1, 1)]=-0.720710642182*x[0]**o + (-0.300330965664)*x[0] + (-0.081467732507)*x[1]**o + (-0.0992275397727)*x[1] + (-0.44488928055)*x[2]**o + (-0.874957890721)*x[2]
            ref[(2, 1, 1)]=-1.24706765524*(1+2.*(dim-1)/(o+1.)) + (-1.27451639616)*dim
            arg[(2, 2, 0)]=0.687891276132*x[0]**o + (0.222324325486)*x[0] + (-0.0951499598083)*x[1]**o + (0.541052378544)*x[1] + (-0.0369513284413)*x[2]**o + (-0.202828067547)*x[2]
            ref[(2, 2, 0)]=0.555789987882*(1+2.*(dim-1)/(o+1.)) + (0.560548636483)*dim
            arg[(2, 2, 1)]=-0.249699586846*x[0]**o + (-0.157731456042)*x[0] + (-0.210118537128)*x[1]**o + (-0.723264065328)*x[1] + (0.343397715012)*x[2]**o + (0.928523362584)*x[2]
            ref[(2, 2, 1)]=-0.116420408962*(1+2.*(dim-1)/(o+1.)) + (0.0475278412136)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnBoundary_fromData_ReducedFunctionOnBoundary_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnBoundary

        assumptions: ReducedFunctionOnBoundary(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnBoundary
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnBoundary(self.domain)
        w = ReducedFunctionOnBoundary(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3, 3),w)
        ref=numpy.zeros((3, 2, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.377891366546*x[0]**o + (-0.99903576729)*x[0] + (0.698119983212)*x[1]**o + (0.120047956696)*x[1]
            ref[(0, 0, 0, 0)]=0.320228616666*(1+2.*(dim-1)/(o+1.)) + (-0.878987810595)*dim
            arg[(0, 0, 0, 1)]=-0.643806381767*x[0]**o + (-0.154831474413)*x[0] + (0.52066457505)*x[1]**o + (0.412594834411)*x[1]
            ref[(0, 0, 0, 1)]=-0.123141806718*(1+2.*(dim-1)/(o+1.)) + (0.257763359998)*dim
            arg[(0, 0, 0, 2)]=-0.1433192778*x[0]**o + (0.998657864471)*x[0] + (-0.42484789932)*x[1]**o + (-0.988577890079)*x[1]
            ref[(0, 0, 0, 2)]=-0.56816717712*(1+2.*(dim-1)/(o+1.)) + (0.0100799743914)*dim
            arg[(0, 0, 1, 0)]=0.17774244487*x[0]**o + (0.673937883133)*x[0] + (-0.351493998845)*x[1]**o + (0.416954106252)*x[1]
            ref[(0, 0, 1, 0)]=-0.173751553975*(1+2.*(dim-1)/(o+1.)) + (1.09089198938)*dim
            arg[(0, 0, 1, 1)]=0.324487541852*x[0]**o + (-0.980967669966)*x[0] + (0.653044889272)*x[1]**o + (-0.25095189606)*x[1]
            ref[(0, 0, 1, 1)]=0.977532431124*(1+2.*(dim-1)/(o+1.)) + (-1.23191956603)*dim
            arg[(0, 0, 1, 2)]=0.105068157594*x[0]**o + (0.101023187187)*x[0] + (0.96985583666)*x[1]**o + (-0.342237308549)*x[1]
            ref[(0, 0, 1, 2)]=1.07492399425*(1+2.*(dim-1)/(o+1.)) + (-0.241214121363)*dim
            arg[(0, 0, 2, 0)]=0.750130490643*x[0]**o + (-0.126042011241)*x[0] + (0.357611829776)*x[1]**o + (0.948062212486)*x[1]
            ref[(0, 0, 2, 0)]=1.10774232042*(1+2.*(dim-1)/(o+1.)) + (0.822020201245)*dim
            arg[(0, 0, 2, 1)]=0.914069745061*x[0]**o + (0.941418693252)*x[0] + (-0.0153672297252)*x[1]**o + (-0.219406405569)*x[1]
            ref[(0, 0, 2, 1)]=0.898702515336*(1+2.*(dim-1)/(o+1.)) + (0.722012287683)*dim
            arg[(0, 0, 2, 2)]=-0.915038348177*x[0]**o + (-0.576311476024)*x[0] + (-0.77687485644)*x[1]**o + (0.780801291725)*x[1]
            ref[(0, 0, 2, 2)]=-1.69191320462*(1+2.*(dim-1)/(o+1.)) + (0.2044898157)*dim
            arg[(0, 1, 0, 0)]=-0.658466613258*x[0]**o + (0.247015086506)*x[0] + (0.0449197211268)*x[1]**o + (0.372325075822)*x[1]
            ref[(0, 1, 0, 0)]=-0.613546892131*(1+2.*(dim-1)/(o+1.)) + (0.619340162328)*dim
            arg[(0, 1, 0, 1)]=0.586658298312*x[0]**o + (0.843691437469)*x[0] + (-0.738499756518)*x[1]**o + (-0.332909614031)*x[1]
            ref[(0, 1, 0, 1)]=-0.151841458206*(1+2.*(dim-1)/(o+1.)) + (0.510781823438)*dim
            arg[(0, 1, 0, 2)]=0.339422112891*x[0]**o + (-0.317176981508)*x[0] + (0.784275382895)*x[1]**o + (-0.550041130196)*x[1]
            ref[(0, 1, 0, 2)]=1.12369749579*(1+2.*(dim-1)/(o+1.)) + (-0.867218111703)*dim
            arg[(0, 1, 1, 0)]=-0.378560555638*x[0]**o + (0.146669829126)*x[0] + (0.558486722252)*x[1]**o + (-0.820276056172)*x[1]
            ref[(0, 1, 1, 0)]=0.179926166615*(1+2.*(dim-1)/(o+1.)) + (-0.673606227046)*dim
            arg[(0, 1, 1, 1)]=-0.286460816757*x[0]**o + (0.455434083227)*x[0] + (-0.453842204126)*x[1]**o + (-0.63847026335)*x[1]
            ref[(0, 1, 1, 1)]=-0.740303020882*(1+2.*(dim-1)/(o+1.)) + (-0.183036180123)*dim
            arg[(0, 1, 1, 2)]=0.507212331857*x[0]**o + (0.302489811745)*x[0] + (0.771777199403)*x[1]**o + (0.561172434703)*x[1]
            ref[(0, 1, 1, 2)]=1.27898953126*(1+2.*(dim-1)/(o+1.)) + (0.863662246448)*dim
            arg[(0, 1, 2, 0)]=-0.190744248598*x[0]**o + (-0.545473693804)*x[0] + (0.57375822164)*x[1]**o + (-0.932591717292)*x[1]
            ref[(0, 1, 2, 0)]=0.383013973042*(1+2.*(dim-1)/(o+1.)) + (-1.4780654111)*dim
            arg[(0, 1, 2, 1)]=-0.681230659676*x[0]**o + (-0.775079668829)*x[0] + (-0.584737978134)*x[1]**o + (0.687085949782)*x[1]
            ref[(0, 1, 2, 1)]=-1.26596863781*(1+2.*(dim-1)/(o+1.)) + (-0.0879937190477)*dim
            arg[(0, 1, 2, 2)]=-0.214897932117*x[0]**o + (-0.735729158833)*x[0] + (-0.608250896275)*x[1]**o + (0.486195016402)*x[1]
            ref[(0, 1, 2, 2)]=-0.823148828391*(1+2.*(dim-1)/(o+1.)) + (-0.249534142431)*dim
            arg[(1, 0, 0, 0)]=-0.54027408852*x[0]**o + (-0.565129121914)*x[0] + (0.298265593823)*x[1]**o + (0.603876214235)*x[1]
            ref[(1, 0, 0, 0)]=-0.242008494697*(1+2.*(dim-1)/(o+1.)) + (0.0387470923205)*dim
            arg[(1, 0, 0, 1)]=-0.665664000336*x[0]**o + (-0.283529377772)*x[0] + (0.249549782183)*x[1]**o + (-0.229631501115)*x[1]
            ref[(1, 0, 0, 1)]=-0.416114218153*(1+2.*(dim-1)/(o+1.)) + (-0.513160878886)*dim
            arg[(1, 0, 0, 2)]=0.869840084251*x[0]**o + (-0.744757770982)*x[0] + (-0.803179684811)*x[1]**o + (0.563328394281)*x[1]
            ref[(1, 0, 0, 2)]=0.0666603994399*(1+2.*(dim-1)/(o+1.)) + (-0.181429376701)*dim
            arg[(1, 0, 1, 0)]=0.73794755341*x[0]**o + (0.794455630787)*x[0] + (-0.0244940210534)*x[1]**o + (-0.858578080617)*x[1]
            ref[(1, 0, 1, 0)]=0.713453532357*(1+2.*(dim-1)/(o+1.)) + (-0.0641224498301)*dim
            arg[(1, 0, 1, 1)]=0.456314075424*x[0]**o + (0.450294567938)*x[0] + (-0.0735868475416)*x[1]**o + (0.985708442444)*x[1]
            ref[(1, 0, 1, 1)]=0.382727227882*(1+2.*(dim-1)/(o+1.)) + (1.43600301038)*dim
            arg[(1, 0, 1, 2)]=-0.565516820018*x[0]**o + (-0.465003107878)*x[0] + (6.26905718242e-05)*x[1]**o + (-0.255955435765)*x[1]
            ref[(1, 0, 1, 2)]=-0.565454129446*(1+2.*(dim-1)/(o+1.)) + (-0.720958543643)*dim
            arg[(1, 0, 2, 0)]=-0.507465482875*x[0]**o + (0.787557614647)*x[0] + (0.080246725403)*x[1]**o + (0.766750689737)*x[1]
            ref[(1, 0, 2, 0)]=-0.427218757472*(1+2.*(dim-1)/(o+1.)) + (1.55430830438)*dim
            arg[(1, 0, 2, 1)]=0.690228979093*x[0]**o + (-0.673238506013)*x[0] + (0.631645571592)*x[1]**o + (0.4037693878)*x[1]
            ref[(1, 0, 2, 1)]=1.32187455069*(1+2.*(dim-1)/(o+1.)) + (-0.269469118213)*dim
            arg[(1, 0, 2, 2)]=0.578385502187*x[0]**o + (0.673107440055)*x[0] + (-0.0838713467529)*x[1]**o + (0.532993493723)*x[1]
            ref[(1, 0, 2, 2)]=0.494514155434*(1+2.*(dim-1)/(o+1.)) + (1.20610093378)*dim
            arg[(1, 1, 0, 0)]=-0.321265868869*x[0]**o + (0.747137149759)*x[0] + (0.0774801158654)*x[1]**o + (-0.0541797926957)*x[1]
            ref[(1, 1, 0, 0)]=-0.243785753004*(1+2.*(dim-1)/(o+1.)) + (0.692957357064)*dim
            arg[(1, 1, 0, 1)]=0.493666766573*x[0]**o + (-0.878367521599)*x[0] + (-0.390713684387)*x[1]**o + (0.759111035453)*x[1]
            ref[(1, 1, 0, 1)]=0.102953082186*(1+2.*(dim-1)/(o+1.)) + (-0.119256486146)*dim
            arg[(1, 1, 0, 2)]=-0.328871975764*x[0]**o + (0.242162767619)*x[0] + (-0.0592362077087)*x[1]**o + (-0.81254168212)*x[1]
            ref[(1, 1, 0, 2)]=-0.388108183472*(1+2.*(dim-1)/(o+1.)) + (-0.570378914501)*dim
            arg[(1, 1, 1, 0)]=-0.980079142105*x[0]**o + (-0.358546240176)*x[0] + (0.841073538018)*x[1]**o + (-0.551132105262)*x[1]
            ref[(1, 1, 1, 0)]=-0.139005604087*(1+2.*(dim-1)/(o+1.)) + (-0.909678345438)*dim
            arg[(1, 1, 1, 1)]=0.283807120699*x[0]**o + (-0.59499009476)*x[0] + (-0.442783061929)*x[1]**o + (0.992615901904)*x[1]
            ref[(1, 1, 1, 1)]=-0.158975941231*(1+2.*(dim-1)/(o+1.)) + (0.397625807143)*dim
            arg[(1, 1, 1, 2)]=0.251176406237*x[0]**o + (-0.878831931387)*x[0] + (0.983603475958)*x[1]**o + (-0.524651387243)*x[1]
            ref[(1, 1, 1, 2)]=1.2347798822*(1+2.*(dim-1)/(o+1.)) + (-1.40348331863)*dim
            arg[(1, 1, 2, 0)]=-0.531579828318*x[0]**o + (-0.724924725903)*x[0] + (0.439580308003)*x[1]**o + (-0.812665256523)*x[1]
            ref[(1, 1, 2, 0)]=-0.0919995203144*(1+2.*(dim-1)/(o+1.)) + (-1.53758998243)*dim
            arg[(1, 1, 2, 1)]=0.583121692897*x[0]**o + (0.484371799973)*x[0] + (0.42244206095)*x[1]**o + (-0.457658235779)*x[1]
            ref[(1, 1, 2, 1)]=1.00556375385*(1+2.*(dim-1)/(o+1.)) + (0.0267135641942)*dim
            arg[(1, 1, 2, 2)]=-0.163804841602*x[0]**o + (-0.990567858148)*x[0] + (-0.472821675833)*x[1]**o + (-0.554410225683)*x[1]
            ref[(1, 1, 2, 2)]=-0.636626517435*(1+2.*(dim-1)/(o+1.)) + (-1.54497808383)*dim
            arg[(2, 0, 0, 0)]=0.620419511602*x[0]**o + (-0.52277750723)*x[0] + (-0.755438809304)*x[1]**o + (-0.680491467774)*x[1]
            ref[(2, 0, 0, 0)]=-0.135019297702*(1+2.*(dim-1)/(o+1.)) + (-1.203268975)*dim
            arg[(2, 0, 0, 1)]=-0.846338777262*x[0]**o + (-0.09504297721)*x[0] + (-0.285725082213)*x[1]**o + (-0.0552199218739)*x[1]
            ref[(2, 0, 0, 1)]=-1.13206385948*(1+2.*(dim-1)/(o+1.)) + (-0.150262899084)*dim
            arg[(2, 0, 0, 2)]=0.608537056486*x[0]**o + (-0.773021587219)*x[0] + (0.859637205236)*x[1]**o + (0.844030216052)*x[1]
            ref[(2, 0, 0, 2)]=1.46817426172*(1+2.*(dim-1)/(o+1.)) + (0.0710086288326)*dim
            arg[(2, 0, 1, 0)]=-0.0712695218759*x[0]**o + (0.509360831038)*x[0] + (-0.636172965208)*x[1]**o + (-0.601071043979)*x[1]
            ref[(2, 0, 1, 0)]=-0.707442487084*(1+2.*(dim-1)/(o+1.)) + (-0.0917102129404)*dim
            arg[(2, 0, 1, 1)]=-0.0195769871223*x[0]**o + (-0.871923918477)*x[0] + (0.207645317754)*x[1]**o + (-0.565140578528)*x[1]
            ref[(2, 0, 1, 1)]=0.188068330632*(1+2.*(dim-1)/(o+1.)) + (-1.437064497)*dim
            arg[(2, 0, 1, 2)]=0.30009238801*x[0]**o + (-0.605802587925)*x[0] + (0.707933210073)*x[1]**o + (0.238322603715)*x[1]
            ref[(2, 0, 1, 2)]=1.00802559808*(1+2.*(dim-1)/(o+1.)) + (-0.36747998421)*dim
            arg[(2, 0, 2, 0)]=0.713072275051*x[0]**o + (-0.938130593301)*x[0] + (0.548514368644)*x[1]**o + (-0.795041794852)*x[1]
            ref[(2, 0, 2, 0)]=1.2615866437*(1+2.*(dim-1)/(o+1.)) + (-1.73317238815)*dim
            arg[(2, 0, 2, 1)]=0.45785238847*x[0]**o + (0.914484235525)*x[0] + (0.0389752917579)*x[1]**o + (-0.984281408126)*x[1]
            ref[(2, 0, 2, 1)]=0.496827680228*(1+2.*(dim-1)/(o+1.)) + (-0.0697971726007)*dim
            arg[(2, 0, 2, 2)]=0.41573584134*x[0]**o + (0.124396522977)*x[0] + (0.80358693207)*x[1]**o + (0.994849579944)*x[1]
            ref[(2, 0, 2, 2)]=1.21932277341*(1+2.*(dim-1)/(o+1.)) + (1.11924610292)*dim
            arg[(2, 1, 0, 0)]=-0.894569593089*x[0]**o + (-0.354957344834)*x[0] + (0.284781392328)*x[1]**o + (-0.490548636518)*x[1]
            ref[(2, 1, 0, 0)]=-0.609788200761*(1+2.*(dim-1)/(o+1.)) + (-0.845505981352)*dim
            arg[(2, 1, 0, 1)]=-0.0179088702806*x[0]**o + (0.119840172034)*x[0] + (-0.925476335611)*x[1]**o + (-0.588385323539)*x[1]
            ref[(2, 1, 0, 1)]=-0.943385205892*(1+2.*(dim-1)/(o+1.)) + (-0.468545151504)*dim
            arg[(2, 1, 0, 2)]=-0.949299800653*x[0]**o + (-0.688141118675)*x[0] + (0.507133040207)*x[1]**o + (0.373767025971)*x[1]
            ref[(2, 1, 0, 2)]=-0.442166760446*(1+2.*(dim-1)/(o+1.)) + (-0.314374092704)*dim
            arg[(2, 1, 1, 0)]=0.235851721233*x[0]**o + (-0.312408402069)*x[0] + (-0.253297426246)*x[1]**o + (0.275233449289)*x[1]
            ref[(2, 1, 1, 0)]=-0.0174457050134*(1+2.*(dim-1)/(o+1.)) + (-0.0371749527808)*dim
            arg[(2, 1, 1, 1)]=0.060244220998*x[0]**o + (-0.552516885467)*x[0] + (0.813841738517)*x[1]**o + (-0.561657004316)*x[1]
            ref[(2, 1, 1, 1)]=0.874085959515*(1+2.*(dim-1)/(o+1.)) + (-1.11417388978)*dim
            arg[(2, 1, 1, 2)]=-0.983194812992*x[0]**o + (-0.943696377128)*x[0] + (-0.56281715989)*x[1]**o + (0.010163707939)*x[1]
            ref[(2, 1, 1, 2)]=-1.54601197288*(1+2.*(dim-1)/(o+1.)) + (-0.933532669189)*dim
            arg[(2, 1, 2, 0)]=-0.441379605598*x[0]**o + (-0.534531818654)*x[0] + (-0.811824110674)*x[1]**o + (0.886844951203)*x[1]
            ref[(2, 1, 2, 0)]=-1.25320371627*(1+2.*(dim-1)/(o+1.)) + (0.35231313255)*dim
            arg[(2, 1, 2, 1)]=-0.811407357292*x[0]**o + (0.930013438007)*x[0] + (-0.112915537257)*x[1]**o + (0.987956738184)*x[1]
            ref[(2, 1, 2, 1)]=-0.924322894549*(1+2.*(dim-1)/(o+1.)) + (1.91797017619)*dim
            arg[(2, 1, 2, 2)]=-0.715916259515*x[0]**o + (-0.554770926104)*x[0] + (-0.00670385120245)*x[1]**o + (-0.0919369154198)*x[1]
            ref[(2, 1, 2, 2)]=-0.722620110718*(1+2.*(dim-1)/(o+1.)) + (-0.646707841524)*dim
        else:
            arg[(0, 0, 0, 0)]=0.1837968797*x[0]**o + (0.67875901795)*x[0] + (0.66418977833)*x[1]**o + (-0.161274326218)*x[1] + (-0.819335918449)*x[2]**o + (-0.846828036649)*x[2]
            ref[(0, 0, 0, 0)]=0.0286507395816*(1+2.*(dim-1)/(o+1.)) + (-0.329343344917)*dim
            arg[(0, 0, 0, 1)]=-0.625691922267*x[0]**o + (-0.990115847355)*x[0] + (-0.280703132507)*x[1]**o + (0.667966788221)*x[1] + (0.752293901432)*x[2]**o + (0.285451230977)*x[2]
            ref[(0, 0, 0, 1)]=-0.154101153342*(1+2.*(dim-1)/(o+1.)) + (-0.0366978281571)*dim
            arg[(0, 0, 0, 2)]=-0.828341859012*x[0]**o + (-0.1730320802)*x[0] + (0.927332479569)*x[1]**o + (0.40366632144)*x[1] + (-0.49135934831)*x[2]**o + (-0.551137031313)*x[2]
            ref[(0, 0, 0, 2)]=-0.392368727753*(1+2.*(dim-1)/(o+1.)) + (-0.320502790072)*dim
            arg[(0, 0, 1, 0)]=-0.760673028942*x[0]**o + (-0.548831389651)*x[0] + (-0.37751882844)*x[1]**o + (0.796968895188)*x[1] + (-0.822078718795)*x[2]**o + (0.694864676112)*x[2]
            ref[(0, 0, 1, 0)]=-1.96027057618*(1+2.*(dim-1)/(o+1.)) + (0.943002181648)*dim
            arg[(0, 0, 1, 1)]=0.652778653819*x[0]**o + (-0.0768131755857)*x[0] + (0.608851060458)*x[1]**o + (-0.135475411963)*x[1] + (0.477160760978)*x[2]**o + (-0.821113513299)*x[2]
            ref[(0, 0, 1, 1)]=1.73879047526*(1+2.*(dim-1)/(o+1.)) + (-1.03340210085)*dim
            arg[(0, 0, 1, 2)]=-0.613037168544*x[0]**o + (0.0635448460756)*x[0] + (-0.999835684721)*x[1]**o + (-0.566899685564)*x[1] + (0.193118578104)*x[2]**o + (-0.748670676823)*x[2]
            ref[(0, 0, 1, 2)]=-1.41975427516*(1+2.*(dim-1)/(o+1.)) + (-1.25202551631)*dim
            arg[(0, 0, 2, 0)]=-0.84444724021*x[0]**o + (-0.994679909294)*x[0] + (0.445075001427)*x[1]**o + (0.0205953653702)*x[1] + (-0.905990198335)*x[2]**o + (-0.292853368345)*x[2]
            ref[(0, 0, 2, 0)]=-1.30536243712*(1+2.*(dim-1)/(o+1.)) + (-1.26693791227)*dim
            arg[(0, 0, 2, 1)]=0.543364959068*x[0]**o + (-0.705860794417)*x[0] + (-0.0152048448506)*x[1]**o + (-0.553157029342)*x[1] + (0.733095036021)*x[2]**o + (-0.109027381616)*x[2]
            ref[(0, 0, 2, 1)]=1.26125515024*(1+2.*(dim-1)/(o+1.)) + (-1.36804520537)*dim
            arg[(0, 0, 2, 2)]=-0.417792269768*x[0]**o + (0.229026559291)*x[0] + (-0.603622306115)*x[1]**o + (-0.555808044928)*x[1] + (0.226712504283)*x[2]**o + (-0.276527930831)*x[2]
            ref[(0, 0, 2, 2)]=-0.794702071601*(1+2.*(dim-1)/(o+1.)) + (-0.603309416468)*dim
            arg[(0, 1, 0, 0)]=0.401784285046*x[0]**o + (0.702520447894)*x[0] + (0.511853836432)*x[1]**o + (-0.00233516806318)*x[1] + (0.608741071431)*x[2]**o + (-0.513573103994)*x[2]
            ref[(0, 1, 0, 0)]=1.52237919291*(1+2.*(dim-1)/(o+1.)) + (0.186612175838)*dim
            arg[(0, 1, 0, 1)]=0.637703174504*x[0]**o + (-0.805677398219)*x[0] + (0.400621695081)*x[1]**o + (-0.818567624561)*x[1] + (0.78180493162)*x[2]**o + (0.348147688371)*x[2]
            ref[(0, 1, 0, 1)]=1.82012980121*(1+2.*(dim-1)/(o+1.)) + (-1.27609733441)*dim
            arg[(0, 1, 0, 2)]=0.44865657941*x[0]**o + (-0.166535054078)*x[0] + (-0.62256262679)*x[1]**o + (0.439020380752)*x[1] + (-0.896542907602)*x[2]**o + (0.577426795237)*x[2]
            ref[(0, 1, 0, 2)]=-1.07044895498*(1+2.*(dim-1)/(o+1.)) + (0.849912121911)*dim
            arg[(0, 1, 1, 0)]=-0.713473817969*x[0]**o + (0.755992607025)*x[0] + (0.829502283136)*x[1]**o + (0.571391451237)*x[1] + (-0.16397820908)*x[2]**o + (-0.0812805187038)*x[2]
            ref[(0, 1, 1, 0)]=-0.0479497439134*(1+2.*(dim-1)/(o+1.)) + (1.24610353956)*dim
            arg[(0, 1, 1, 1)]=0.508919960035*x[0]**o + (-0.521000636697)*x[0] + (0.625301450136)*x[1]**o + (0.293013307699)*x[1] + (0.864352392157)*x[2]**o + (0.390811513234)*x[2]
            ref[(0, 1, 1, 1)]=1.99857380233*(1+2.*(dim-1)/(o+1.)) + (0.162824184236)*dim
            arg[(0, 1, 1, 2)]=-0.777396456934*x[0]**o + (-0.228029972131)*x[0] + (0.811473036846)*x[1]**o + (0.303078111792)*x[1] + (0.872593408715)*x[2]**o + (0.115789209075)*x[2]
            ref[(0, 1, 1, 2)]=0.906669988626*(1+2.*(dim-1)/(o+1.)) + (0.190837348737)*dim
            arg[(0, 1, 2, 0)]=-0.96459115586*x[0]**o + (-0.844288877297)*x[0] + (0.393056129593)*x[1]**o + (0.827018805637)*x[1] + (-0.85715798268)*x[2]**o + (0.204765875798)*x[2]
            ref[(0, 1, 2, 0)]=-1.42869300895*(1+2.*(dim-1)/(o+1.)) + (0.187495804138)*dim
            arg[(0, 1, 2, 1)]=-0.466350005371*x[0]**o + (0.354872510106)*x[0] + (0.0231916427038)*x[1]**o + (0.92867291439)*x[1] + (0.100587254231)*x[2]**o + (-0.342791809543)*x[2]
            ref[(0, 1, 2, 1)]=-0.342571108436*(1+2.*(dim-1)/(o+1.)) + (0.940753614953)*dim
            arg[(0, 1, 2, 2)]=-0.266406040035*x[0]**o + (0.632986680684)*x[0] + (0.165565591423)*x[1]**o + (-0.756229520142)*x[1] + (0.157248779484)*x[2]**o + (-0.174875117132)*x[2]
            ref[(0, 1, 2, 2)]=0.0564083308719*(1+2.*(dim-1)/(o+1.)) + (-0.298117956589)*dim
            arg[(1, 0, 0, 0)]=0.874511639237*x[0]**o + (0.354990177455)*x[0] + (0.920052712073)*x[1]**o + (0.056613927617)*x[1] + (-0.488959738825)*x[2]**o + (0.686296302542)*x[2]
            ref[(1, 0, 0, 0)]=1.30560461249*(1+2.*(dim-1)/(o+1.)) + (1.09790040761)*dim
            arg[(1, 0, 0, 1)]=0.743473081188*x[0]**o + (0.952687111184)*x[0] + (0.669080972599)*x[1]**o + (0.218010187467)*x[1] + (0.562994629983)*x[2]**o + (-0.955811775186)*x[2]
            ref[(1, 0, 0, 1)]=1.97554868377*(1+2.*(dim-1)/(o+1.)) + (0.214885523464)*dim
            arg[(1, 0, 0, 2)]=0.690632907196*x[0]**o + (0.934440092789)*x[0] + (0.537268574483)*x[1]**o + (0.0571222667146)*x[1] + (0.953356471137)*x[2]**o + (0.993223306422)*x[2]
            ref[(1, 0, 0, 2)]=2.18125795282*(1+2.*(dim-1)/(o+1.)) + (1.98478566593)*dim
            arg[(1, 0, 1, 0)]=-0.830732468158*x[0]**o + (0.455262704874)*x[0] + (0.461151325807)*x[1]**o + (0.323623745549)*x[1] + (-0.390869966226)*x[2]**o + (-0.232943878398)*x[2]
            ref[(1, 0, 1, 0)]=-0.760451108577*(1+2.*(dim-1)/(o+1.)) + (0.545942572025)*dim
            arg[(1, 0, 1, 1)]=0.502832816549*x[0]**o + (-0.927685345772)*x[0] + (-0.0136754208111)*x[1]**o + (0.890256231089)*x[1] + (-0.461643322877)*x[2]**o + (0.475308672572)*x[2]
            ref[(1, 0, 1, 1)]=0.0275140728614*(1+2.*(dim-1)/(o+1.)) + (0.437879557889)*dim
            arg[(1, 0, 1, 2)]=-0.673009747181*x[0]**o + (0.575652707844)*x[0] + (-0.119175248503)*x[1]**o + (0.112140534391)*x[1] + (0.210576106172)*x[2]**o + (-0.619663000378)*x[2]
            ref[(1, 0, 1, 2)]=-0.581608889512*(1+2.*(dim-1)/(o+1.)) + (0.0681302418567)*dim
            arg[(1, 0, 2, 0)]=0.0170722196998*x[0]**o + (0.733930637859)*x[0] + (-0.604609910827)*x[1]**o + (-0.1022495773)*x[1] + (-0.470934759493)*x[2]**o + (0.19091112361)*x[2]
            ref[(1, 0, 2, 0)]=-1.05847245062*(1+2.*(dim-1)/(o+1.)) + (0.822592184169)*dim
            arg[(1, 0, 2, 1)]=-0.182433013812*x[0]**o + (0.673464164198)*x[0] + (-0.749761305596)*x[1]**o + (-0.361832719386)*x[1] + (0.205553873863)*x[2]**o + (0.722429369669)*x[2]
            ref[(1, 0, 2, 1)]=-0.726640445545*(1+2.*(dim-1)/(o+1.)) + (1.03406081448)*dim
            arg[(1, 0, 2, 2)]=-0.618022705158*x[0]**o + (0.252424874208)*x[0] + (0.0744100233828)*x[1]**o + (-0.350395662655)*x[1] + (-0.679700169015)*x[2]**o + (0.0423076843586)*x[2]
            ref[(1, 0, 2, 2)]=-1.22331285079*(1+2.*(dim-1)/(o+1.)) + (-0.0556631040887)*dim
            arg[(1, 1, 0, 0)]=-0.00129429445975*x[0]**o + (0.426290770124)*x[0] + (-0.752813845388)*x[1]**o + (-0.476161763861)*x[1] + (-0.654405543968)*x[2]**o + (0.234717057025)*x[2]
            ref[(1, 1, 0, 0)]=-1.40851368382*(1+2.*(dim-1)/(o+1.)) + (0.184846063287)*dim
            arg[(1, 1, 0, 1)]=-0.664167553324*x[0]**o + (0.827854904466)*x[0] + (0.724243143126)*x[1]**o + (0.148063546536)*x[1] + (0.66716711604)*x[2]**o + (-0.150590380378)*x[2]
            ref[(1, 1, 0, 1)]=0.727242705842*(1+2.*(dim-1)/(o+1.)) + (0.825328070624)*dim
            arg[(1, 1, 0, 2)]=-0.122395743577*x[0]**o + (-0.697913066562)*x[0] + (0.643467628004)*x[1]**o + (0.945703864929)*x[1] + (0.938217880691)*x[2]**o + (0.31991419381)*x[2]
            ref[(1, 1, 0, 2)]=1.45928976512*(1+2.*(dim-1)/(o+1.)) + (0.567704992178)*dim
            arg[(1, 1, 1, 0)]=-0.440164501563*x[0]**o + (0.225159558874)*x[0] + (-0.393054790401)*x[1]**o + (0.353574756796)*x[1] + (0.534808828397)*x[2]**o + (0.895098604516)*x[2]
            ref[(1, 1, 1, 0)]=-0.298410463567*(1+2.*(dim-1)/(o+1.)) + (1.47383292019)*dim
            arg[(1, 1, 1, 1)]=-0.736766254737*x[0]**o + (-0.536982865678)*x[0] + (0.611983449342)*x[1]**o + (-0.960352393103)*x[1] + (-0.692112830044)*x[2]**o + (0.360546418581)*x[2]
            ref[(1, 1, 1, 1)]=-0.816895635439*(1+2.*(dim-1)/(o+1.)) + (-1.1367888402)*dim
            arg[(1, 1, 1, 2)]=0.0535481352872*x[0]**o + (0.754548763301)*x[0] + (0.118308215778)*x[1]**o + (0.469621413188)*x[1] + (-0.701320984608)*x[2]**o + (-0.422192717248)*x[2]
            ref[(1, 1, 1, 2)]=-0.529464633542*(1+2.*(dim-1)/(o+1.)) + (0.80197745924)*dim
            arg[(1, 1, 2, 0)]=-0.666726637484*x[0]**o + (0.197598033527)*x[0] + (0.987287579447)*x[1]**o + (-0.410246493734)*x[1] + (-0.633506526908)*x[2]**o + (-0.871799974843)*x[2]
            ref[(1, 1, 2, 0)]=-0.312945584945*(1+2.*(dim-1)/(o+1.)) + (-1.08444843505)*dim
            arg[(1, 1, 2, 1)]=-0.286833277512*x[0]**o + (-0.254536036501)*x[0] + (0.178125330029)*x[1]**o + (-0.861890420301)*x[1] + (-0.73513512222)*x[2]**o + (0.432347418376)*x[2]
            ref[(1, 1, 2, 1)]=-0.843843069703*(1+2.*(dim-1)/(o+1.)) + (-0.684079038425)*dim
            arg[(1, 1, 2, 2)]=-0.311563409444*x[0]**o + (0.138519884514)*x[0] + (0.268331907049)*x[1]**o + (0.450911489348)*x[1] + (-0.914357568211)*x[2]**o + (0.174436391679)*x[2]
            ref[(1, 1, 2, 2)]=-0.957589070606*(1+2.*(dim-1)/(o+1.)) + (0.763867765541)*dim
            arg[(2, 0, 0, 0)]=0.433605091993*x[0]**o + (-0.496275985274)*x[0] + (0.494049054077)*x[1]**o + (0.462601322494)*x[1] + (-0.155322953849)*x[2]**o + (0.983343254064)*x[2]
            ref[(2, 0, 0, 0)]=0.772331192221*(1+2.*(dim-1)/(o+1.)) + (0.949668591284)*dim
            arg[(2, 0, 0, 1)]=0.112580376428*x[0]**o + (0.832724279052)*x[0] + (-0.308169725624)*x[1]**o + (-0.996797762922)*x[1] + (-0.933100362692)*x[2]**o + (-0.0747976918801)*x[2]
            ref[(2, 0, 0, 1)]=-1.12868971189*(1+2.*(dim-1)/(o+1.)) + (-0.23887117575)*dim
            arg[(2, 0, 0, 2)]=-0.116451597554*x[0]**o + (-0.0969036374332)*x[0] + (0.242439170117)*x[1]**o + (0.417435204006)*x[1] + (0.384470106445)*x[2]**o + (-0.175428343845)*x[2]
            ref[(2, 0, 0, 2)]=0.510457679008*(1+2.*(dim-1)/(o+1.)) + (0.145103222728)*dim
            arg[(2, 0, 1, 0)]=0.736903146281*x[0]**o + (0.606864398195)*x[0] + (-0.50634821311)*x[1]**o + (-0.783846928017)*x[1] + (0.0541209715343)*x[2]**o + (-0.718992322143)*x[2]
            ref[(2, 0, 1, 0)]=0.284675904705*(1+2.*(dim-1)/(o+1.)) + (-0.895974851965)*dim
            arg[(2, 0, 1, 1)]=0.611338247369*x[0]**o + (-0.597072790551)*x[0] + (-0.78579019558)*x[1]**o + (-0.78398937495)*x[1] + (0.764785853573)*x[2]**o + (-0.00318190124647)*x[2]
            ref[(2, 0, 1, 1)]=0.590333905362*(1+2.*(dim-1)/(o+1.)) + (-1.38424406675)*dim
            arg[(2, 0, 1, 2)]=-0.237158437717*x[0]**o + (0.0945094831434)*x[0] + (0.402266029296)*x[1]**o + (0.380106821341)*x[1] + (-0.701031148493)*x[2]**o + (0.312042467326)*x[2]
            ref[(2, 0, 1, 2)]=-0.535923556914*(1+2.*(dim-1)/(o+1.)) + (0.78665877181)*dim
            arg[(2, 0, 2, 0)]=0.430146769624*x[0]**o + (-0.0588408558548)*x[0] + (-0.725968262424)*x[1]**o + (-0.256453936081)*x[1] + (0.525074720015)*x[2]**o + (0.227438124949)*x[2]
            ref[(2, 0, 2, 0)]=0.229253227215*(1+2.*(dim-1)/(o+1.)) + (-0.087856666987)*dim
            arg[(2, 0, 2, 1)]=-0.461780339344*x[0]**o + (-0.490579474846)*x[0] + (0.368865666841)*x[1]**o + (-0.406808090228)*x[1] + (0.151617137346)*x[2]**o + (0.840925423512)*x[2]
            ref[(2, 0, 2, 1)]=0.0587024648431*(1+2.*(dim-1)/(o+1.)) + (-0.0564621415622)*dim
            arg[(2, 0, 2, 2)]=-0.929231127235*x[0]**o + (-0.633628509371)*x[0] + (0.587855368218)*x[1]**o + (0.651725146809)*x[1] + (-0.549278852938)*x[2]**o + (-0.299184113229)*x[2]
            ref[(2, 0, 2, 2)]=-0.890654611954*(1+2.*(dim-1)/(o+1.)) + (-0.28108747579)*dim
            arg[(2, 1, 0, 0)]=0.685530378318*x[0]**o + (0.876695319732)*x[0] + (-0.426739220314)*x[1]**o + (0.989412744543)*x[1] + (0.941617552888)*x[2]**o + (-0.121852490597)*x[2]
            ref[(2, 1, 0, 0)]=1.20040871089*(1+2.*(dim-1)/(o+1.)) + (1.74425557368)*dim
            arg[(2, 1, 0, 1)]=-0.273276509681*x[0]**o + (-0.661041104411)*x[0] + (-0.22573271581)*x[1]**o + (0.10516997088)*x[1] + (0.686678996512)*x[2]**o + (0.999014102007)*x[2]
            ref[(2, 1, 0, 1)]=0.187669771022*(1+2.*(dim-1)/(o+1.)) + (0.443142968476)*dim
            arg[(2, 1, 0, 2)]=0.559841316329*x[0]**o + (0.410396971826)*x[0] + (-0.536688548082)*x[1]**o + (-0.378110302135)*x[1] + (0.876505683966)*x[2]**o + (-0.18295556788)*x[2]
            ref[(2, 1, 0, 2)]=0.899658452213*(1+2.*(dim-1)/(o+1.)) + (-0.15066889819)*dim
            arg[(2, 1, 1, 0)]=-0.805730965342*x[0]**o + (-0.867226399319)*x[0] + (-0.927797923204)*x[1]**o + (-0.94090406724)*x[1] + (-0.558940557247)*x[2]**o + (-0.84954394695)*x[2]
            ref[(2, 1, 1, 0)]=-2.29246944579*(1+2.*(dim-1)/(o+1.)) + (-2.65767441351)*dim
            arg[(2, 1, 1, 1)]=-0.784461211933*x[0]**o + (-0.227594512212)*x[0] + (-0.857681623293)*x[1]**o + (-0.938313363143)*x[1] + (0.67859937329)*x[2]**o + (0.944583593027)*x[2]
            ref[(2, 1, 1, 1)]=-0.963543461936*(1+2.*(dim-1)/(o+1.)) + (-0.221324282327)*dim
            arg[(2, 1, 1, 2)]=-0.706191016324*x[0]**o + (-0.769775052397)*x[0] + (0.752073274483)*x[1]**o + (0.353931870601)*x[1] + (0.167707466921)*x[2]**o + (-0.539347467128)*x[2]
            ref[(2, 1, 1, 2)]=0.213589725079*(1+2.*(dim-1)/(o+1.)) + (-0.955190648924)*dim
            arg[(2, 1, 2, 0)]=-0.0299377946279*x[0]**o + (0.981638396008)*x[0] + (0.304769339182)*x[1]**o + (-0.0167322054296)*x[1] + (0.431861178758)*x[2]**o + (-0.945929548106)*x[2]
            ref[(2, 1, 2, 0)]=0.706692723312*(1+2.*(dim-1)/(o+1.)) + (0.0189766424725)*dim
            arg[(2, 1, 2, 1)]=-0.842799886266*x[0]**o + (0.363433885631)*x[0] + (0.0362503045395)*x[1]**o + (0.66972820652)*x[1] + (-0.0575756055242)*x[2]**o + (-0.41042325978)*x[2]
            ref[(2, 1, 2, 1)]=-0.86412518725*(1+2.*(dim-1)/(o+1.)) + (0.622738832371)*dim
            arg[(2, 1, 2, 2)]=-0.999674198296*x[0]**o + (-0.398834195997)*x[0] + (0.911984959444)*x[1]**o + (-0.979827863574)*x[1] + (0.493869480341)*x[2]**o + (-0.504578317144)*x[2]
            ref[(2, 1, 2, 2)]=0.40618024149*(1+2.*(dim-1)/(o+1.)) + (-1.88324037672)*dim
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

class Test_Util_Integration(Test_Util_Integration_noContact):
    RES_TOL=1.e-8

    def test_integrateC_onFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.3058268883-0.860884936139j)*x[0]**o + ((0.432472425565+0.755362325173j))*x[0] + ((-0.612077322905-0.941790370362j))*x[1]**o + ((-0.341601272643+0.00738526017793j))*x[1]
            ref=(-0.612077322905-0.941790370362j)/(o+1.)+((0.0454355764613+0.381373792676j))+((0.3058268883-0.860884936139j))*0.5**o
        else:
            arg=(0.188221931743-0.613203692878j)*x[0]**o + ((0.312446341642-0.0354355851091j))*x[0] + ((-0.346622180945+0.944402850827j))*x[1]**o + ((-0.782377164297+0.236465414583j))*x[1] + ((0.332848222895-0.247835288988j))*x[2]**o + ((0.80107316993-0.695470162618j))*x[2]
            ref=(-0.01377395805+0.696567561839j)/(o+1.)+((0.165571173638-0.247220166572j))+((0.188221931743-0.613203692878j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.398512010277-0.0167914754745j)*x[0]**o + ((-0.126764434429+0.121867699091j))*x[0] + ((-0.737484488201-0.535951981365j))*x[1]**o + ((0.942932504405-0.0257586135248j))*x[1]
            ref[(0,)]=(-0.737484488201-0.535951981365j)/(o+1.)+((0.408084034988+0.048054542783j))+((-0.398512010277-0.0167914754745j))*0.5**o
            arg[(1,)]=(-0.0479047170204+0.25950422373j)*x[0]**o + ((-0.819217727939-0.995080346779j))*x[0] + ((-0.821112075927+0.590196929215j))*x[1]**o + ((-0.664531388254+0.415965918878j))*x[1]
            ref[(1,)]=(-0.821112075927+0.590196929215j)/(o+1.)+((-0.741874558096-0.28955721395j))+((-0.0479047170204+0.25950422373j))*0.5**o
            arg[(2,)]=(-0.663321802614-0.335121224429j)*x[0]**o + ((0.60810616433+0.934142945837j))*x[0] + ((0.0688358437197-0.694816397082j))*x[1]**o + ((0.25675105646-0.757664667251j))*x[1]
            ref[(2,)]=(0.0688358437197-0.694816397082j)/(o+1.)+((0.432428610395+0.0882391392931j))+((-0.663321802614-0.335121224429j))*0.5**o
        else:
            arg[(0,)]=(-0.809250304196-0.995979778824j)*x[0]**o + ((-0.226870991217-0.598550090425j))*x[0] + ((0.818215280937+0.547876818732j))*x[1]**o + ((0.283213900613-0.941579578129j))*x[1] + ((-0.758549797938-0.0102363224564j))*x[2]**o + ((-0.904531373529+0.360315787573j))*x[2]
            ref[(0,)]=(0.059665482999+0.537640496275j)/(o+1.)+((-0.424094232066-0.58990694049j))+((-0.809250304196-0.995979778824j))*0.5**o
            arg[(1,)]=(-0.941955718298-0.891624267313j)*x[0]**o + ((0.898302260403-0.132667060827j))*x[0] + ((-0.72708050205-0.631855557523j))*x[1]**o + ((-0.22268614333-0.269347264321j))*x[1] + ((0.702659881314-0.438840241795j))*x[2]**o + ((0.766273877745+0.190218547337j))*x[2]
            ref[(1,)]=(-0.024420620736-1.07069579932j)/(o+1.)+((0.720944997409-0.105897888906j))+((-0.941955718298-0.891624267313j))*0.5**o
            arg[(2,)]=(0.308419161352+0.819790738537j)*x[0]**o + ((-0.929387877508+0.378695601715j))*x[0] + ((-0.883423952617-0.907576047551j))*x[1]**o + ((-0.646218084098-0.111360713907j))*x[1] + ((0.999914671681+0.492187869634j))*x[2]**o + ((0.885381979075+0.21433540647j))*x[2]
            ref[(2,)]=(0.116490719064-0.415388177917j)/(o+1.)+((-0.345111991266+0.240835147139j))+((0.308419161352+0.819790738537j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.686991610574+0.267087918779j)*x[0]**o + ((-0.180083990581-0.697467719943j))*x[0] + ((-0.917448577039+0.569865471499j))*x[1]**o + ((0.775955739416+0.91919525524j))*x[1]
            ref[(0, 0)]=(-0.917448577039+0.569865471499j)/(o+1.)+((0.297935874417+0.110863767648j))+((0.686991610574+0.267087918779j))*0.5**o
            arg[(0, 1)]=(-0.0666074569795-0.931651846638j)*x[0]**o + ((0.110337321638-0.724758186651j))*x[0] + ((-0.468183892192-0.0584407388657j))*x[1]**o + ((0.761245411401-0.686194662168j))*x[1]
            ref[(0, 1)]=(-0.468183892192-0.0584407388657j)/(o+1.)+((0.43579136652-0.70547642441j))+((-0.0666074569795-0.931651846638j))*0.5**o
            arg[(0, 2)]=(0.489999605989-0.865023454322j)*x[0]**o + ((0.684194702576-0.0668197402447j))*x[0] + ((-0.133913961398+0.777509178271j))*x[1]**o + ((0.459806621667+0.0757389226466j))*x[1]
            ref[(0, 2)]=(-0.133913961398+0.777509178271j)/(o+1.)+((0.572000662122+0.00445959120097j))+((0.489999605989-0.865023454322j))*0.5**o
            arg[(0, 3)]=(0.862166986929-0.460876788576j)*x[0]**o + ((0.283104489619-0.709286905567j))*x[0] + ((-0.458471552669+0.700825479759j))*x[1]**o + ((-0.742503674414-0.00698347840387j))*x[1]
            ref[(0, 3)]=(-0.458471552669+0.700825479759j)/(o+1.)+((-0.229699592398-0.358135191985j))+((0.862166986929-0.460876788576j))*0.5**o
            arg[(1, 0)]=(0.0694772819726-0.301658443243j)*x[0]**o + ((-0.553906635432-0.784626176282j))*x[0] + ((0.00955428059745-0.994596396444j))*x[1]**o + ((-0.0925829112944-0.184396063009j))*x[1]
            ref[(1, 0)]=(0.00955428059745-0.994596396444j)/(o+1.)+((-0.323244773363-0.484511119646j))+((0.0694772819726-0.301658443243j))*0.5**o
            arg[(1, 1)]=(-0.235898588188+0.55732651455j)*x[0]**o + ((-0.892974213758-0.958639821446j))*x[0] + ((-0.546022340228-0.0599029609417j))*x[1]**o + ((0.735682385555+0.451215798025j))*x[1]
            ref[(1, 1)]=(-0.546022340228-0.0599029609417j)/(o+1.)+((-0.0786459141015-0.253712011711j))+((-0.235898588188+0.55732651455j))*0.5**o
            arg[(1, 2)]=(-0.562979785482+0.00741087037157j)*x[0]**o + ((-0.30141085868+0.861871095703j))*x[0] + ((-0.857905990965-0.381958935514j))*x[1]**o + ((-0.510048983755+0.390643303574j))*x[1]
            ref[(1, 2)]=(-0.857905990965-0.381958935514j)/(o+1.)+((-0.405729921218+0.626257199638j))+((-0.562979785482+0.00741087037157j))*0.5**o
            arg[(1, 3)]=(-0.281236004693+0.142074318559j)*x[0]**o + ((-0.966882308935-0.352864530403j))*x[0] + ((-0.299247385989-0.139750710318j))*x[1]**o + ((-0.953388404139+0.498357434773j))*x[1]
            ref[(1, 3)]=(-0.299247385989-0.139750710318j)/(o+1.)+((-0.960135356537+0.0727464521848j))+((-0.281236004693+0.142074318559j))*0.5**o
            arg[(2, 0)]=(-0.438905682519+0.0904344227097j)*x[0]**o + ((0.477979450835-0.075781777588j))*x[0] + ((-0.757941958441-0.185370483111j))*x[1]**o + ((0.372140222623+0.685767871935j))*x[1]
            ref[(2, 0)]=(-0.757941958441-0.185370483111j)/(o+1.)+((0.425059836729+0.304993047173j))+((-0.438905682519+0.0904344227097j))*0.5**o
            arg[(2, 1)]=(-0.620546044601-0.0191103745348j)*x[0]**o + ((0.825124245549+0.402939938551j))*x[0] + ((-0.384187337167+0.965597511759j))*x[1]**o + ((-0.665513656445-0.902353167515j))*x[1]
            ref[(2, 1)]=(-0.384187337167+0.965597511759j)/(o+1.)+((0.0798052945521-0.249706614482j))+((-0.620546044601-0.0191103745348j))*0.5**o
            arg[(2, 2)]=(0.559235660031-0.820845472311j)*x[0]**o + ((0.857077625129-0.834446120061j))*x[0] + ((0.503489397134+0.648706601045j))*x[1]**o + ((-0.614602251643-0.577886264846j))*x[1]
            ref[(2, 2)]=(0.503489397134+0.648706601045j)/(o+1.)+((0.121237686743-0.706166192454j))+((0.559235660031-0.820845472311j))*0.5**o
            arg[(2, 3)]=(-0.665017908606-0.132610913195j)*x[0]**o + ((-0.811974783631+0.781348785829j))*x[0] + ((0.534298868228+0.129559312272j))*x[1]**o + ((-0.00252337111601-0.0663521290331j))*x[1]
            ref[(2, 3)]=(0.534298868228+0.129559312272j)/(o+1.)+((-0.407249077374+0.357498328398j))+((-0.665017908606-0.132610913195j))*0.5**o
            arg[(3, 0)]=(0.720222340372-0.843715513184j)*x[0]**o + ((-0.637592599184+0.782036251228j))*x[0] + ((0.412132373566+0.412800220256j))*x[1]**o + ((0.822970166312-0.204377785098j))*x[1]
            ref[(3, 0)]=(0.412132373566+0.412800220256j)/(o+1.)+((0.0926887835644+0.288829233065j))+((0.720222340372-0.843715513184j))*0.5**o
            arg[(3, 1)]=(0.00833350743381+0.482106557435j)*x[0]**o + ((-0.962490649108+0.501199729163j))*x[0] + ((-0.415512928737+0.800423607012j))*x[1]**o + ((-0.980184065138-0.972363157816j))*x[1]
            ref[(3, 1)]=(-0.415512928737+0.800423607012j)/(o+1.)+((-0.971337357123-0.235581714327j))+((0.00833350743381+0.482106557435j))*0.5**o
            arg[(3, 2)]=(0.0446932000557+0.998556725782j)*x[0]**o + ((-0.547177030304-0.778342112859j))*x[0] + ((-0.971991826993-0.627394180822j))*x[1]**o + ((-0.951832343022+0.164661691379j))*x[1]
            ref[(3, 2)]=(-0.971991826993-0.627394180822j)/(o+1.)+((-0.749504686663-0.30684021074j))+((0.0446932000557+0.998556725782j))*0.5**o
            arg[(3, 3)]=(-0.56477634109-0.811703209848j)*x[0]**o + ((-0.949392922466-0.0855114214294j))*x[0] + ((-0.96379925297-0.657999167525j))*x[1]**o + ((0.660980120212+0.0588028920046j))*x[1]
            ref[(3, 3)]=(-0.96379925297-0.657999167525j)/(o+1.)+((-0.144206401127-0.0133542647124j))+((-0.56477634109-0.811703209848j))*0.5**o
        else:
            arg[(0, 0)]=(-0.745599604768-0.767725411426j)*x[0]**o + ((0.923633121317-0.0684186387511j))*x[0] + ((-0.470650730612-0.839733286419j))*x[1]**o + ((-0.833444316859+0.717003324637j))*x[1] + ((-0.346879067051-0.619294041877j))*x[2]**o + ((-0.611599525829+0.504192588426j))*x[2]
            ref[(0, 0)]=(-0.817529797663-1.4590273283j)/(o+1.)+((-0.260705360685+0.576388637156j))+((-0.745599604768-0.767725411426j))*0.5**o
            arg[(0, 1)]=(-0.353161069989+0.674735677986j)*x[0]**o + ((-0.721334555762+0.063371027803j))*x[0] + ((0.087692190003+0.199662953822j))*x[1]**o + ((-0.937033827332+0.765306823943j))*x[1] + ((-0.882075874619+0.206678301182j))*x[2]**o + ((0.524760794459+0.328696077447j))*x[2]
            ref[(0, 1)]=(-0.794383684616+0.406341255004j)/(o+1.)+((-0.566803794318+0.578686964597j))+((-0.353161069989+0.674735677986j))*0.5**o
            arg[(0, 2)]=(0.964470782515-0.782663848333j)*x[0]**o + ((-0.0965513552579+0.970046561403j))*x[0] + ((0.553448881547+0.0360642569771j))*x[1]**o + ((0.614673440141+0.379034228185j))*x[1] + ((0.786094486986-0.526396412004j))*x[2]**o + ((-0.12802887643-0.39070035307j))*x[2]
            ref[(0, 2)]=(1.33954336853-0.490332155027j)/(o+1.)+((0.195046604227+0.479190218259j))+((0.964470782515-0.782663848333j))*0.5**o
            arg[(0, 3)]=(-0.422557037114-0.492329567375j)*x[0]**o + ((0.289470551663-0.404262482296j))*x[0] + ((0.418148362351+0.987325424266j))*x[1]**o + ((-0.783171505364+0.63093815771j))*x[1] + ((0.7298416187+0.223754941113j))*x[2]**o + ((-0.122373784056-0.138111191217j))*x[2]
            ref[(0, 3)]=(1.14798998105+1.21108036538j)/(o+1.)+((-0.308037368878+0.0442822420984j))+((-0.422557037114-0.492329567375j))*0.5**o
            arg[(1, 0)]=(-0.794552888927+0.895759302285j)*x[0]**o + ((0.0472145261756-0.320796217532j))*x[0] + ((0.728764564795-0.429095073421j))*x[1]**o + ((-0.94719447355+0.681717319465j))*x[1] + ((-0.647893603705+0.437460618928j))*x[2]**o + ((-0.187843905307+0.266702863122j))*x[2]
            ref[(1, 0)]=(0.08087096109+0.00836554550706j)/(o+1.)+((-0.543911926341+0.313811982528j))+((-0.794552888927+0.895759302285j))*0.5**o
            arg[(1, 1)]=(0.60483169979-0.277662932141j)*x[0]**o + ((-0.0266494718722+0.614856792057j))*x[0] + ((0.0643195420738+0.718432171265j))*x[1]**o + ((0.783612830184+0.622138837754j))*x[1] + ((-0.975684016184+0.773451407732j))*x[2]**o + ((-0.99832936607-0.0980075397741j))*x[2]
            ref[(1, 1)]=(-0.91136447411+1.491883579j)/(o+1.)+((-0.120683003879+0.569494045018j))+((0.60483169979-0.277662932141j))*0.5**o
            arg[(1, 2)]=(0.577048241116+0.731222013967j)*x[0]**o + ((-0.688608452456-0.418931436958j))*x[0] + ((0.703430438934-0.173641561229j))*x[1]**o + ((-0.346456820481+0.695072529824j))*x[1] + ((0.314647635922-0.820507791257j))*x[2]**o + ((0.554842477986+0.147904125279j))*x[2]
            ref[(1, 2)]=(1.01807807486-0.994149352486j)/(o+1.)+((-0.240111397476+0.212022609073j))+((0.577048241116+0.731222013967j))*0.5**o
            arg[(1, 3)]=(-0.340987539022-0.892962213791j)*x[0]**o + ((-0.620992120412-0.422956133596j))*x[0] + ((-0.591819319943+0.793782369869j))*x[1]**o + ((0.17290357817-0.805954123791j))*x[1] + ((0.687295056081-0.219418718594j))*x[2]**o + ((-0.597248022428+0.0706802815492j))*x[2]
            ref[(1, 3)]=(0.0954757361382+0.574363651275j)/(o+1.)+((-0.522668282335-0.579114987919j))+((-0.340987539022-0.892962213791j))*0.5**o
            arg[(2, 0)]=(-0.739538159415-0.34878325939j)*x[0]**o + ((0.510609824087-0.388418087516j))*x[0] + ((0.92036754149-0.115508167339j))*x[1]**o + ((0.0663742393956+0.853843037172j))*x[1] + ((0.843745722613-0.183634962474j))*x[2]**o + ((-0.505918398905-0.572064375877j))*x[2]
            ref[(2, 0)]=(1.7641132641-0.299143129813j)/(o+1.)+((0.0355328322889-0.0533197131102j))+((-0.739538159415-0.34878325939j))*0.5**o
            arg[(2, 1)]=(-0.265131097712-0.85742494508j)*x[0]**o + ((-0.514273793791-0.0309292810845j))*x[0] + ((0.610424929926-0.579889031554j))*x[1]**o + ((0.609599863167-0.783889434837j))*x[1] + ((0.585319336111+0.364314915679j))*x[2]**o + ((-0.268651932261-0.507021336075j))*x[2]
            ref[(2, 1)]=(1.19574426604-0.215574115874j)/(o+1.)+((-0.0866629314422-0.660920025998j))+((-0.265131097712-0.85742494508j))*0.5**o
            arg[(2, 2)]=(0.48328128103+0.48439847839j)*x[0]**o + ((0.977279983345-0.220927648681j))*x[0] + ((-0.499986858316+0.0841845828625j))*x[1]**o + ((-0.817107111272-0.824273827737j))*x[1] + ((0.334534070087-0.477583114392j))*x[2]**o + ((0.979063979788+0.283207478173j))*x[2]
            ref[(2, 2)]=(-0.16545278823-0.39339853153j)/(o+1.)+((0.569618425931-0.380996999122j))+((0.48328128103+0.48439847839j))*0.5**o
            arg[(2, 3)]=(-0.555972750362+0.561255281536j)*x[0]**o + ((0.591483965289+0.163164559168j))*x[0] + ((-0.755562527231+0.442953296855j))*x[1]**o + ((-0.95994248572-0.660648737286j))*x[1] + ((-0.761537526625+0.616945646732j))*x[2]**o + ((-0.586945020502+0.694269351116j))*x[2]
            ref[(2, 3)]=(-1.51710005386+1.05989894359j)/(o+1.)+((-0.477701770467+0.0983925864986j))+((-0.555972750362+0.561255281536j))*0.5**o
            arg[(3, 0)]=(-0.351201721786-0.713412429164j)*x[0]**o + ((0.701237409633-0.511936478653j))*x[0] + ((0.977656346814+0.578439784015j))*x[1]**o + ((0.35778739368+0.276879319056j))*x[1] + ((-0.874331190667+0.893160184365j))*x[2]**o + ((-0.0340707114074+0.0266410974079j))*x[2]
            ref[(3, 0)]=(0.103325156148+1.47159996838j)/(o+1.)+((0.512477045953-0.104208031095j))+((-0.351201721786-0.713412429164j))*0.5**o
            arg[(3, 1)]=(0.439761129332-0.0453253533706j)*x[0]**o + ((-0.841809402748+0.219304983406j))*x[0] + ((-0.0832948729759+0.279568089155j))*x[1]**o + ((0.548232337786+0.804529713748j))*x[1] + ((-0.311436358913-0.36699266401j))*x[2]**o + ((-0.944929992459-0.74915373141j))*x[2]
            ref[(3, 1)]=(-0.394731231889-0.0874245748551j)/(o+1.)+((-0.619253528711+0.137340482872j))+((0.439761129332-0.0453253533706j))*0.5**o
            arg[(3, 2)]=(0.0395834608978-0.213463333937j)*x[0]**o + ((0.864630648865-0.976245308803j))*x[0] + ((-0.810455042409-0.652881055113j))*x[1]**o + ((-0.975557876455+0.598778667358j))*x[1] + ((-0.139364059535+0.833514610444j))*x[2]**o + ((-0.246948977204-0.156755492956j))*x[2]
            ref[(3, 2)]=(-0.949819101943+0.180633555331j)/(o+1.)+((-0.178938102397-0.2671110672j))+((0.0395834608978-0.213463333937j))*0.5**o
            arg[(3, 3)]=(0.566614566143-0.330225859083j)*x[0]**o + ((-0.689499883881+0.835202285024j))*x[0] + ((0.266773263405-0.721385200769j))*x[1]**o + ((0.645753341946-0.113064568706j))*x[1] + ((0.912603287144-0.51692435902j))*x[2]**o + ((-0.764774325019+0.580026665425j))*x[2]
            ref[(3, 3)]=(1.17937655055-1.23830955979j)/(o+1.)+((-0.404260433477+0.651082190871j))+((0.566614566143-0.330225859083j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3),w)
        ref=numpy.zeros((4, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.369228186337+0.383763844283j)*x[0]**o + ((0.167243194237-0.815186613114j))*x[0] + ((-0.834796270905+0.447488749896j))*x[1]**o + ((-0.947933793493-0.163614358487j))*x[1]
            ref[(0, 0, 0)]=(-0.834796270905+0.447488749896j)/(o+1.)+((-0.390345299628-0.4894004858j))+((0.369228186337+0.383763844283j))*0.5**o
            arg[(0, 0, 1)]=(0.442928330087-0.911582822676j)*x[0]**o + ((-0.944321489548-0.735330174705j))*x[0] + ((-0.693035180524-0.0075672165904j))*x[1]**o + ((0.773392082834-0.828710428039j))*x[1]
            ref[(0, 0, 1)]=(-0.693035180524-0.0075672165904j)/(o+1.)+((-0.0854647033569-0.782020301372j))+((0.442928330087-0.911582822676j))*0.5**o
            arg[(0, 0, 2)]=(0.216894499312+0.758609012772j)*x[0]**o + ((0.553605862877-0.264008901106j))*x[0] + ((0.595539697656-0.0931002009973j))*x[1]**o + ((0.276324252947+0.575632691586j))*x[1]
            ref[(0, 0, 2)]=(0.595539697656-0.0931002009973j)/(o+1.)+((0.414965057912+0.15581189524j))+((0.216894499312+0.758609012772j))*0.5**o
            arg[(0, 1, 0)]=(0.300038388082-0.0169004259247j)*x[0]**o + ((0.423456776322+0.782736518191j))*x[0] + ((0.213293251162+0.422497126213j))*x[1]**o + ((0.0141405098975-0.0736366559006j))*x[1]
            ref[(0, 1, 0)]=(0.213293251162+0.422497126213j)/(o+1.)+((0.21879864311+0.354549931145j))+((0.300038388082-0.0169004259247j))*0.5**o
            arg[(0, 1, 1)]=(-0.502783853056-0.537984297017j)*x[0]**o + ((0.749096019784+0.724683993486j))*x[0] + ((-0.173673366612+0.0268476222947j))*x[1]**o + ((-0.0951856958719+0.845520735751j))*x[1]
            ref[(0, 1, 1)]=(-0.173673366612+0.0268476222947j)/(o+1.)+((0.326955161956+0.785102364618j))+((-0.502783853056-0.537984297017j))*0.5**o
            arg[(0, 1, 2)]=(-0.743831063649-0.348816184225j)*x[0]**o + ((0.939484395482+0.803557067814j))*x[0] + ((0.369824054272+0.0816608242421j))*x[1]**o + ((0.431081061385+0.845654823044j))*x[1]
            ref[(0, 1, 2)]=(0.369824054272+0.0816608242421j)/(o+1.)+((0.685282728433+0.824605945429j))+((-0.743831063649-0.348816184225j))*0.5**o
            arg[(0, 2, 0)]=(-0.485894749497+0.0452997783477j)*x[0]**o + ((0.439304830693+0.765160438809j))*x[0] + ((-0.59622197487+0.80325588269j))*x[1]**o + ((0.183611787522-0.670617118618j))*x[1]
            ref[(0, 2, 0)]=(-0.59622197487+0.80325588269j)/(o+1.)+((0.311458309107+0.0472716600956j))+((-0.485894749497+0.0452997783477j))*0.5**o
            arg[(0, 2, 1)]=(-0.577274393474+0.301795392244j)*x[0]**o + ((-0.0643271185326+0.293371894301j))*x[0] + ((-0.40103761849+0.541998356103j))*x[1]**o + ((0.908633665505+0.0777459362508j))*x[1]
            ref[(0, 2, 1)]=(-0.40103761849+0.541998356103j)/(o+1.)+((0.422153273486+0.185558915276j))+((-0.577274393474+0.301795392244j))*0.5**o
            arg[(0, 2, 2)]=(0.42283882772-0.116180986303j)*x[0]**o + ((-0.685211968892+0.262442843146j))*x[0] + ((0.370764857628-0.162999534135j))*x[1]**o + ((0.453185264934-0.249523594012j))*x[1]
            ref[(0, 2, 2)]=(0.370764857628-0.162999534135j)/(o+1.)+((-0.116013351979+0.00645962456677j))+((0.42283882772-0.116180986303j))*0.5**o
            arg[(1, 0, 0)]=(-0.277971521597-0.211037959455j)*x[0]**o + ((-0.195453846541-0.637149737561j))*x[0] + ((-0.463753840213-0.796529755674j))*x[1]**o + ((0.109056980012-0.898401411387j))*x[1]
            ref[(1, 0, 0)]=(-0.463753840213-0.796529755674j)/(o+1.)+((-0.0431984332643-0.767775574474j))+((-0.277971521597-0.211037959455j))*0.5**o
            arg[(1, 0, 1)]=(0.760192107764+0.729436946067j)*x[0]**o + ((0.625457383231-0.891874115557j))*x[0] + ((-0.483105072132-0.738796246391j))*x[1]**o + ((-0.66953680784+0.65572111081j))*x[1]
            ref[(1, 0, 1)]=(-0.483105072132-0.738796246391j)/(o+1.)+((-0.0220397123045-0.118076502373j))+((0.760192107764+0.729436946067j))*0.5**o
            arg[(1, 0, 2)]=(0.724770471779-0.0898054270915j)*x[0]**o + ((-0.846935405939+0.0185312196756j))*x[0] + ((0.35296212268-0.36842326596j))*x[1]**o + ((0.715755611806+0.537038159816j))*x[1]
            ref[(1, 0, 2)]=(0.35296212268-0.36842326596j)/(o+1.)+((-0.0655898970663+0.277784689746j))+((0.724770471779-0.0898054270915j))*0.5**o
            arg[(1, 1, 0)]=(-0.650647007229+0.0642962955643j)*x[0]**o + ((-0.618892979622+0.222049383494j))*x[0] + ((-0.562839433046+0.3755617348j))*x[1]**o + ((0.416268275498-0.500601937231j))*x[1]
            ref[(1, 1, 0)]=(-0.562839433046+0.3755617348j)/(o+1.)+((-0.101312352062-0.139276276869j))+((-0.650647007229+0.0642962955643j))*0.5**o
            arg[(1, 1, 1)]=(-0.115867094582-0.929277339915j)*x[0]**o + ((-0.979257511236-0.902862933669j))*x[0] + ((-0.0811964245037+0.769895538618j))*x[1]**o + ((-0.472485512551-0.501636071742j))*x[1]
            ref[(1, 1, 1)]=(-0.0811964245037+0.769895538618j)/(o+1.)+((-0.725871511893-0.702249502705j))+((-0.115867094582-0.929277339915j))*0.5**o
            arg[(1, 1, 2)]=(-0.894909018625-0.144650781828j)*x[0]**o + ((-0.198344320685+0.827111411935j))*x[0] + ((-0.471407330275-0.856031120571j))*x[1]**o + ((0.609208538684+0.419415471783j))*x[1]
            ref[(1, 1, 2)]=(-0.471407330275-0.856031120571j)/(o+1.)+((0.205432109+0.623263441859j))+((-0.894909018625-0.144650781828j))*0.5**o
            arg[(1, 2, 0)]=(0.350452556849+0.413525990846j)*x[0]**o + ((0.877894442151+0.146807837993j))*x[0] + ((-0.393682206059+0.72204544386j))*x[1]**o + ((0.895207025466-0.0142283019803j))*x[1]
            ref[(1, 2, 0)]=(-0.393682206059+0.72204544386j)/(o+1.)+((0.886550733809+0.0662897680064j))+((0.350452556849+0.413525990846j))*0.5**o
            arg[(1, 2, 1)]=(0.262306816586-0.204811743552j)*x[0]**o + ((0.0328462329747+0.650207159605j))*x[0] + ((-0.039752669702-0.736762396508j))*x[1]**o + ((-0.291976540516-0.0840979985855j))*x[1]
            ref[(1, 2, 1)]=(-0.039752669702-0.736762396508j)/(o+1.)+((-0.129565153771+0.28305458051j))+((0.262306816586-0.204811743552j))*0.5**o
            arg[(1, 2, 2)]=(0.11100058121+0.919554467236j)*x[0]**o + ((-0.497110058434+0.974779574146j))*x[0] + ((-0.3891524211-0.0508746928211j))*x[1]**o + ((-0.642652246369-0.586503126147j))*x[1]
            ref[(1, 2, 2)]=(-0.3891524211-0.0508746928211j)/(o+1.)+((-0.569881152402+0.194138223999j))+((0.11100058121+0.919554467236j))*0.5**o
            arg[(2, 0, 0)]=(0.0578892740687+0.902919380241j)*x[0]**o + ((-0.787443335253-0.666050426001j))*x[0] + ((-0.389390459616+0.8013883576j))*x[1]**o + ((0.574059743668+0.457566424197j))*x[1]
            ref[(2, 0, 0)]=(-0.389390459616+0.8013883576j)/(o+1.)+((-0.106691795792-0.104242000902j))+((0.0578892740687+0.902919380241j))*0.5**o
            arg[(2, 0, 1)]=(-0.081916928985+0.615095925423j)*x[0]**o + ((-0.364157195137+0.875695563233j))*x[0] + ((0.453387568637-0.547454132853j))*x[1]**o + ((0.421422191923-0.238433624j))*x[1]
            ref[(2, 0, 1)]=(0.453387568637-0.547454132853j)/(o+1.)+((0.0286324983928+0.318630969616j))+((-0.081916928985+0.615095925423j))*0.5**o
            arg[(2, 0, 2)]=(-0.772895482106+0.407262305356j)*x[0]**o + ((-0.257942045181+0.302977352257j))*x[0] + ((0.937680684301-0.109833555967j))*x[1]**o + ((0.235815646867-0.308181731042j))*x[1]
            ref[(2, 0, 2)]=(0.937680684301-0.109833555967j)/(o+1.)+((-0.0110631991569-0.00260218939244j))+((-0.772895482106+0.407262305356j))*0.5**o
            arg[(2, 1, 0)]=(0.495651751279+0.763717423205j)*x[0]**o + ((0.53963142721-0.627430652314j))*x[0] + ((0.789790892744-0.10315842835j))*x[1]**o + ((0.782438297641+0.0315448742538j))*x[1]
            ref[(2, 1, 0)]=(0.789790892744-0.10315842835j)/(o+1.)+((0.661034862425-0.29794288903j))+((0.495651751279+0.763717423205j))*0.5**o
            arg[(2, 1, 1)]=(0.992539503779+0.493321758091j)*x[0]**o + ((-0.644192397724-0.405234998663j))*x[0] + ((-0.665227837834+0.340984366976j))*x[1]**o + ((0.993350157581-0.466167733027j))*x[1]
            ref[(2, 1, 1)]=(-0.665227837834+0.340984366976j)/(o+1.)+((0.174578879928-0.435701365845j))+((0.992539503779+0.493321758091j))*0.5**o
            arg[(2, 1, 2)]=(0.108867380479-0.92090514764j)*x[0]**o + ((0.827519865683-0.370684253829j))*x[0] + ((-0.715731583293-0.284656649501j))*x[1]**o + ((0.0426909528977+0.165519013938j))*x[1]
            ref[(2, 1, 2)]=(-0.715731583293-0.284656649501j)/(o+1.)+((0.43510540929-0.102582619945j))+((0.108867380479-0.92090514764j))*0.5**o
            arg[(2, 2, 0)]=(-0.0158899201526+0.551524114835j)*x[0]**o + ((-0.890937179805-0.738791561755j))*x[0] + ((-0.810580267055+0.583581114884j))*x[1]**o + ((0.143441081864+0.808866964349j))*x[1]
            ref[(2, 2, 0)]=(-0.810580267055+0.583581114884j)/(o+1.)+((-0.373748048971+0.035037701297j))+((-0.0158899201526+0.551524114835j))*0.5**o
            arg[(2, 2, 1)]=(-0.523721435544+0.401244605708j)*x[0]**o + ((-0.665453256331+0.532725870093j))*x[0] + ((-0.115266626518-0.708324098391j))*x[1]**o + ((-0.760424205873+0.712102063424j))*x[1]
            ref[(2, 2, 1)]=(-0.115266626518-0.708324098391j)/(o+1.)+((-0.712938731102+0.622413966758j))+((-0.523721435544+0.401244605708j))*0.5**o
            arg[(2, 2, 2)]=(-0.524956293094-0.648972237065j)*x[0]**o + ((-0.621730608556+0.12233403065j))*x[0] + ((-0.886408612965-0.0334686389658j))*x[1]**o + ((-0.727707855186+0.586751513077j))*x[1]
            ref[(2, 2, 2)]=(-0.886408612965-0.0334686389658j)/(o+1.)+((-0.674719231871+0.354542771863j))+((-0.524956293094-0.648972237065j))*0.5**o
            arg[(3, 0, 0)]=(0.932564376028-0.629772001273j)*x[0]**o + ((-0.801915207843+0.680440997449j))*x[0] + ((-0.178163380766-0.387688579777j))*x[1]**o + ((0.58284751892+0.88780371868j))*x[1]
            ref[(3, 0, 0)]=(-0.178163380766-0.387688579777j)/(o+1.)+((-0.109533844461+0.784122358065j))+((0.932564376028-0.629772001273j))*0.5**o
            arg[(3, 0, 1)]=(0.387692298012+0.390189251935j)*x[0]**o + ((-0.325270309686-0.200172814793j))*x[0] + ((0.619058471055-0.355385487039j))*x[1]**o + ((-0.796830029398+0.316102587038j))*x[1]
            ref[(3, 0, 1)]=(0.619058471055-0.355385487039j)/(o+1.)+((-0.561050169542+0.0579648861224j))+((0.387692298012+0.390189251935j))*0.5**o
            arg[(3, 0, 2)]=(0.935236188109-0.177628818371j)*x[0]**o + ((0.690419254043+0.139442576992j))*x[0] + ((-0.738304185492-0.575388914121j))*x[1]**o + ((-0.985996459975-0.385530154835j))*x[1]
            ref[(3, 0, 2)]=(-0.738304185492-0.575388914121j)/(o+1.)+((-0.147788602966-0.123043788922j))+((0.935236188109-0.177628818371j))*0.5**o
            arg[(3, 1, 0)]=(-0.814040116768+0.0861061331378j)*x[0]**o + ((-0.851987118413-0.571977661945j))*x[0] + ((0.0519029709802-0.4586180983j))*x[1]**o + ((-0.741373733236-0.0707746285959j))*x[1]
            ref[(3, 1, 0)]=(0.0519029709802-0.4586180983j)/(o+1.)+((-0.796680425825-0.32137614527j))+((-0.814040116768+0.0861061331378j))*0.5**o
            arg[(3, 1, 1)]=(-0.0112779781765+0.221985225857j)*x[0]**o + ((0.16762301058-0.164073109236j))*x[0] + ((0.693616568105+0.804826935533j))*x[1]**o + ((0.616065117672+0.560348802152j))*x[1]
            ref[(3, 1, 1)]=(0.693616568105+0.804826935533j)/(o+1.)+((0.391844064126+0.198137846458j))+((-0.0112779781765+0.221985225857j))*0.5**o
            arg[(3, 1, 2)]=(-0.122357981935-0.66096457569j)*x[0]**o + ((-0.911790217733-0.157583357011j))*x[0] + ((0.664532758086+0.624187201086j))*x[1]**o + ((0.571659626048-0.845002201698j))*x[1]
            ref[(3, 1, 2)]=(0.664532758086+0.624187201086j)/(o+1.)+((-0.170065295842-0.501292779354j))+((-0.122357981935-0.66096457569j))*0.5**o
            arg[(3, 2, 0)]=(-0.77909133148-0.179105523312j)*x[0]**o + ((-0.366601440213-0.704009318136j))*x[0] + ((-0.796985057287+0.127449771371j))*x[1]**o + ((0.714272008781-0.35764402726j))*x[1]
            ref[(3, 2, 0)]=(-0.796985057287+0.127449771371j)/(o+1.)+((0.173835284284-0.530826672698j))+((-0.77909133148-0.179105523312j))*0.5**o
            arg[(3, 2, 1)]=(0.423068604097-0.359619646637j)*x[0]**o + ((0.00023899272212+0.658402401751j))*x[0] + ((0.68950863355-0.11256530037j))*x[1]**o + ((-0.916392210215-0.3138750177j))*x[1]
            ref[(3, 2, 1)]=(0.68950863355-0.11256530037j)/(o+1.)+((-0.458076608746+0.172263692025j))+((0.423068604097-0.359619646637j))*0.5**o
            arg[(3, 2, 2)]=(-0.821155370533+0.876161065544j)*x[0]**o + ((0.146977163268-0.619625333435j))*x[0] + ((-0.715033837203+0.642083149717j))*x[1]**o + ((-0.13830224043+0.412499487121j))*x[1]
            ref[(3, 2, 2)]=(-0.715033837203+0.642083149717j)/(o+1.)+((0.00433746141906-0.103562923157j))+((-0.821155370533+0.876161065544j))*0.5**o
        else:
            arg[(0, 0, 0)]=(0.192986405001-0.0386068210492j)*x[0]**o + ((-0.0729963454947+0.576580859549j))*x[0] + ((-0.664749094738+0.756308949363j))*x[1]**o + ((0.558744416781-0.433217757477j))*x[1] + ((0.946233040326+0.286818930285j))*x[2]**o + ((-0.67570101106+0.990832807391j))*x[2]
            ref[(0, 0, 0)]=(0.281483945588+1.04312787965j)/(o+1.)+((-0.0949764698866+0.567097954732j))+((0.192986405001-0.0386068210492j))*0.5**o
            arg[(0, 0, 1)]=(-0.257341562027-0.367052319028j)*x[0]**o + ((0.175745191056-0.171420440274j))*x[0] + ((-0.965962231502+0.282257933232j))*x[1]**o + ((-0.593647879607-0.619153230357j))*x[1] + ((0.818434330212-0.405520104428j))*x[2]**o + ((0.429726092651+0.551321698155j))*x[2]
            ref[(0, 0, 1)]=(-0.14752790129-0.123262171196j)/(o+1.)+((0.00591170204997-0.119625986238j))+((-0.257341562027-0.367052319028j))*0.5**o
            arg[(0, 0, 2)]=(0.999727949923-0.80794367934j)*x[0]**o + ((-0.171409237965+0.716513551429j))*x[0] + ((-0.550772261951-0.254548130356j))*x[1]**o + ((0.550484382888+0.84938851481j))*x[1] + ((0.195275826534-0.807378526544j))*x[2]**o + ((0.410273731131+0.935947012008j))*x[2]
            ref[(0, 0, 2)]=(-0.355496435417-1.0619266569j)/(o+1.)+((0.394674438027+1.25092453912j))+((0.999727949923-0.80794367934j))*0.5**o
            arg[(0, 1, 0)]=(-0.854915060558-0.668198617847j)*x[0]**o + ((-0.0462381992017-0.89273999645j))*x[0] + ((-0.392373432001+0.992858468226j))*x[1]**o + ((0.787547171976-0.140380580116j))*x[1] + ((0.00173157471873+0.498573981545j))*x[2]**o + ((-0.624646438568+0.739606075744j))*x[2]
            ref[(0, 1, 0)]=(-0.390641857282+1.49143244977j)/(o+1.)+((0.0583312671032-0.146757250411j))+((-0.854915060558-0.668198617847j))*0.5**o
            arg[(0, 1, 1)]=(-0.613996835024+0.45310919922j)*x[0]**o + ((0.646760212066-0.597725469427j))*x[0] + ((-0.942863401222-0.22864596301j))*x[1]**o + ((-0.982066243867+0.985047553018j))*x[1] + ((0.615443573502+0.51070613059j))*x[2]**o + ((0.468654563333-0.953221875449j))*x[2]
            ref[(0, 1, 1)]=(-0.327419827719+0.28206016758j)/(o+1.)+((0.0666742657662-0.282949895929j))+((-0.613996835024+0.45310919922j))*0.5**o
            arg[(0, 1, 2)]=(-0.861370535499+0.904270892534j)*x[0]**o + ((0.0702912759643+0.778809926168j))*x[0] + ((-0.292570375606-0.632700763228j))*x[1]**o + ((-0.456682102231+0.0680657753199j))*x[1] + ((0.854098245548-0.82840750544j))*x[2]**o + ((0.886669533627+0.998161804259j))*x[2]
            ref[(0, 1, 2)]=(0.561527869942-1.46110826867j)/(o+1.)+((0.25013935368+0.922518752873j))+((-0.861370535499+0.904270892534j))*0.5**o
            arg[(0, 2, 0)]=(0.436199402472-0.616992643233j)*x[0]**o + ((0.712299498933+0.590126246497j))*x[0] + ((-0.0734734110832+0.592089667016j))*x[1]**o + ((0.301966597575+0.422799179232j))*x[1] + ((-0.0680821424175+0.185479632947j))*x[2]**o + ((0.0967129593118-0.165091172611j))*x[2]
            ref[(0, 2, 0)]=(-0.141555553501+0.777569299963j)/(o+1.)+((0.55548952791+0.423917126559j))+((0.436199402472-0.616992643233j))*0.5**o
            arg[(0, 2, 1)]=(-0.555075403677-0.549502166447j)*x[0]**o + ((-0.6184260192+0.807677454677j))*x[0] + ((0.173813206796+0.898435821002j))*x[1]**o + ((0.118243240385+0.675107955414j))*x[1] + ((0.529386386484-0.113101333974j))*x[2]**o + ((-0.939078962999+0.860715771554j))*x[2]
            ref[(0, 2, 1)]=(0.703199593279+0.785334487028j)/(o+1.)+((-0.719630870907+1.17175059082j))+((-0.555075403677-0.549502166447j))*0.5**o
            arg[(0, 2, 2)]=(-0.106687790851+0.682590026419j)*x[0]**o + ((0.745834442539-0.578151124307j))*x[0] + ((0.907160950766+0.523302199538j))*x[1]**o + ((-0.494046304553-0.805045127676j))*x[1] + ((0.12692788482-0.144309558666j))*x[2]**o + ((0.338866062197+0.0612916801176j))*x[2]
            ref[(0, 2, 2)]=(1.03408883559+0.378992640873j)/(o+1.)+((0.295327100091-0.660952285933j))+((-0.106687790851+0.682590026419j))*0.5**o
            arg[(1, 0, 0)]=(0.396877907622-0.754431090507j)*x[0]**o + ((0.68711842053+0.811802282952j))*x[0] + ((-0.583212425117-0.948306069881j))*x[1]**o + ((0.637639669556+0.886044771087j))*x[1] + ((-0.138434853378+0.722512049192j))*x[2]**o + ((0.129704597786+0.296272025922j))*x[2]
            ref[(1, 0, 0)]=(-0.721647278495-0.225794020689j)/(o+1.)+((0.727231343936+0.99705953998j))+((0.396877907622-0.754431090507j))*0.5**o
            arg[(1, 0, 1)]=(0.721936327885+0.891710342384j)*x[0]**o + ((0.7711387357-0.346870364124j))*x[0] + ((0.95948374711+0.403580763201j))*x[1]**o + ((-0.204453388003+0.15457956894j))*x[1] + ((0.436546550218+0.883835271928j))*x[2]**o + ((0.61212050663+0.252267303561j))*x[2]
            ref[(1, 0, 1)]=(1.39603029733+1.28741603513j)/(o+1.)+((0.589402927164+0.0299882541886j))+((0.721936327885+0.891710342384j))*0.5**o
            arg[(1, 0, 2)]=(0.60513450904-0.374959206725j)*x[0]**o + ((-0.755927956365+0.504682765449j))*x[0] + ((0.577996527858+0.0808835873844j))*x[1]**o + ((-0.831797831222+0.539334712198j))*x[1] + ((-0.803092172452-0.83650989985j))*x[2]**o + ((-0.820960685851+0.259829391025j))*x[2]
            ref[(1, 0, 2)]=(-0.225095644594-0.755626312465j)/(o+1.)+((-1.20434323672+0.651923434336j))+((0.60513450904-0.374959206725j))*0.5**o
            arg[(1, 1, 0)]=(0.656177852393-0.945569952951j)*x[0]**o + ((-0.875918562667+0.8137815878j))*x[0] + ((0.675682768432+0.117673029921j))*x[1]**o + ((0.744693826542+0.351680235971j))*x[1] + ((-0.828639867191+0.9922600865j))*x[2]**o + ((-0.136282085972-0.638539009593j))*x[2]
            ref[(1, 1, 0)]=(-0.152957098759+1.10993311642j)/(o+1.)+((-0.133753411048+0.263461407089j))+((0.656177852393-0.945569952951j))*0.5**o
            arg[(1, 1, 1)]=(0.427576374655+0.212848319316j)*x[0]**o + ((0.0495598376384-0.930295395306j))*x[0] + ((-0.798449507027+0.0374128946905j))*x[1]**o + ((-0.959588677208-0.685699924273j))*x[1] + ((0.848321370154+0.632715739731j))*x[2]**o + ((-0.368387295904+0.535149226949j))*x[2]
            ref[(1, 1, 1)]=(0.0498718631273+0.670128634421j)/(o+1.)+((-0.639208067737-0.540423046316j))+((0.427576374655+0.212848319316j))*0.5**o
            arg[(1, 1, 2)]=(-0.265709942883-0.46223306212j)*x[0]**o + ((0.882171443566+0.400524054558j))*x[0] + ((0.864126712978+0.767538301048j))*x[1]**o + ((-0.927098521878-0.382726825209j))*x[1] + ((0.0389555363195-0.370611402721j))*x[2]**o + ((-0.218729575568+0.156323139958j))*x[2]
            ref[(1, 1, 2)]=(0.903082249298+0.396926898327j)/(o+1.)+((-0.13182832694+0.0870601846539j))+((-0.265709942883-0.46223306212j))*0.5**o
            arg[(1, 2, 0)]=(-0.0033547272957-0.578629206627j)*x[0]**o + ((0.137058175834-0.607016836982j))*x[0] + ((-0.284445188956+0.809351104832j))*x[1]**o + ((-0.792067364938-0.1978306026j))*x[1] + ((-0.588951932173-0.314206267539j))*x[2]**o + ((0.43175625559+0.36557758418j))*x[2]
            ref[(1, 2, 0)]=(-0.873397121129+0.495144837292j)/(o+1.)+((-0.111626466757-0.219634927701j))+((-0.0033547272957-0.578629206627j))*0.5**o
            arg[(1, 2, 1)]=(0.186526906544+0.20185538626j)*x[0]**o + ((0.421535114471+0.0892273345597j))*x[0] + ((-0.138705677107+0.675085220037j))*x[1]**o + ((-0.128702896562-0.148963557604j))*x[1] + ((0.532962171053+0.311495652842j))*x[2]**o + ((-0.751441818954-0.223837419918j))*x[2]
            ref[(1, 2, 1)]=(0.394256493946+0.98658087288j)/(o+1.)+((-0.229304800523-0.141786821481j))+((0.186526906544+0.20185538626j))*0.5**o
            arg[(1, 2, 2)]=(0.815150841567+0.797653145039j)*x[0]**o + ((0.0967859971362+0.123919593026j))*x[0] + ((-0.763311492216-0.977275283682j))*x[1]**o + ((0.490535795489-0.0515310939424j))*x[1] + ((0.774398148726-0.605414229276j))*x[2]**o + ((-0.819408496445+0.908823760607j))*x[2]
            ref[(1, 2, 2)]=(0.0110866565091-1.58268951296j)/(o+1.)+((-0.11604335191+0.490606129845j))+((0.815150841567+0.797653145039j))*0.5**o
            arg[(2, 0, 0)]=(-0.125590374538+0.945405868675j)*x[0]**o + ((0.0184413553307-0.642817840267j))*x[0] + ((0.366419988963+0.19640658799j))*x[1]**o + ((0.0613696466906+0.0250114882148j))*x[1] + ((-0.773610680092+0.37238212789j))*x[2]**o + ((-0.24914044635-0.105200565383j))*x[2]
            ref[(2, 0, 0)]=(-0.407190691129+0.56878871588j)/(o+1.)+((-0.0846647221641-0.361503458718j))+((-0.125590374538+0.945405868675j))*0.5**o
            arg[(2, 0, 1)]=(0.310906007306+0.896240809786j)*x[0]**o + ((-0.237398683206-0.997375303535j))*x[0] + ((-0.752049112179+0.139540371629j))*x[1]**o + ((0.981986842247+0.867108238259j))*x[1] + ((-0.427071516294-0.733631070145j))*x[2]**o + ((0.595273759431-0.670502842353j))*x[2]
            ref[(2, 0, 1)]=(-1.17912062847-0.594090698516j)/(o+1.)+((0.669930959236-0.400384953814j))+((0.310906007306+0.896240809786j))*0.5**o
            arg[(2, 0, 2)]=(0.943494727012+0.798046022264j)*x[0]**o + ((0.700452179141-0.709842071742j))*x[0] + ((0.469779198863+0.133578890407j))*x[1]**o + ((0.827972322466+0.390025992671j))*x[1] + ((0.865181426515-0.314260655872j))*x[2]**o + ((-0.188152916318-0.496550834964j))*x[2]
            ref[(2, 0, 2)]=(1.33496062538-0.180681765465j)/(o+1.)+((0.670135792645-0.408183457017j))+((0.943494727012+0.798046022264j))*0.5**o
            arg[(2, 1, 0)]=(-0.0254955705105+0.416372217507j)*x[0]**o + ((0.580593797662-0.763240634545j))*x[0] + ((-0.89842690909+0.283370362347j))*x[1]**o + ((0.605991729932-0.837301574522j))*x[1] + ((-0.851455206233-0.0347356335027j))*x[2]**o + ((-0.520376229124+0.672948716957j))*x[2]
            ref[(2, 1, 0)]=(-1.74988211532+0.248634728845j)/(o+1.)+((0.333104649235-0.463796746055j))+((-0.0254955705105+0.416372217507j))*0.5**o
            arg[(2, 1, 1)]=(0.0382946668651+0.683968978273j)*x[0]**o + ((-0.133171467654-0.438507828138j))*x[0] + ((-0.648213395525+0.404455195173j))*x[1]**o + ((0.800805174034+0.695257444005j))*x[1] + ((-0.817807482716-0.638944552996j))*x[2]**o + ((0.152199110176-0.885994657795j))*x[2]
            ref[(2, 1, 1)]=(-1.46602087824-0.234489357823j)/(o+1.)+((0.409916408278-0.314622520964j))+((0.0382946668651+0.683968978273j))*0.5**o
            arg[(2, 1, 2)]=(0.992748061253+0.310261790348j)*x[0]**o + ((-0.459280055661-0.611217337021j))*x[0] + ((-0.71998566479-0.469307055467j))*x[1]**o + ((0.646985274563+0.443586721945j))*x[1] + ((-0.327543822572-0.371367075777j))*x[2]**o + ((0.186108931925+0.48523890251j))*x[2]
            ref[(2, 1, 2)]=(-1.04752948736-0.840674131244j)/(o+1.)+((0.186907075414+0.158804143717j))+((0.992748061253+0.310261790348j))*0.5**o
            arg[(2, 2, 0)]=(-0.407382433202-0.246590254248j)*x[0]**o + ((0.167342208768+0.294023628729j))*x[0] + ((0.528884475128+0.346682474288j))*x[1]**o + ((0.503830467272-0.961582979489j))*x[1] + ((0.171367401005-0.249727004859j))*x[2]**o + ((0.587935768428-0.540028401347j))*x[2]
            ref[(2, 2, 0)]=(0.700251876133+0.0969554694285j)/(o+1.)+((0.629554222234-0.603793876053j))+((-0.407382433202-0.246590254248j))*0.5**o
            arg[(2, 2, 1)]=(-0.253796496093-0.271639912391j)*x[0]**o + ((-0.308266229926+0.983244509834j))*x[0] + ((0.85375637286+0.0639901295411j))*x[1]**o + ((-0.435184959197-0.0513569014904j))*x[1] + ((-0.985482045898-0.14870779101j))*x[2]**o + ((-0.990644094584+0.689244655261j))*x[2]
            ref[(2, 2, 1)]=(-0.131725673037-0.0847176614689j)/(o+1.)+((-0.867047641853+0.810566131802j))+((-0.253796496093-0.271639912391j))*0.5**o
            arg[(2, 2, 2)]=(-0.424454555317-0.418383013035j)*x[0]**o + ((0.587762909628-0.570561241525j))*x[0] + ((0.320929245383+0.589641617683j))*x[1]**o + ((-0.386462046471-0.367612320584j))*x[1] + ((0.676969462567-0.800825902581j))*x[2]**o + ((0.868857896749+0.967698750555j))*x[2]
            ref[(2, 2, 2)]=(0.99789870795-0.211184284898j)/(o+1.)+((0.535079379953+0.0147625942231j))+((-0.424454555317-0.418383013035j))*0.5**o
            arg[(3, 0, 0)]=(-0.0491559575892+0.459355564381j)*x[0]**o + ((0.240594797916-0.0146875664415j))*x[0] + ((0.990876780055+0.751499771059j))*x[1]**o + ((0.108948188581-0.677383386617j))*x[1] + ((0.693303498104+0.011357343123j))*x[2]**o + ((-0.398084838394+0.407127643233j))*x[2]
            ref[(3, 0, 0)]=(1.68418027816+0.762857114182j)/(o+1.)+((-0.0242709259483-0.142471654913j))+((-0.0491559575892+0.459355564381j))*0.5**o
            arg[(3, 0, 1)]=(-0.406720519154-0.346923493338j)*x[0]**o + ((-0.829675954435-0.163060862075j))*x[0] + ((0.0237968393841+0.132404719433j))*x[1]**o + ((-0.297519595813-0.030367954469j))*x[1] + ((-0.10606664623+0.810314941506j))*x[2]**o + ((0.134349705819+0.643840040863j))*x[2]
            ref[(3, 0, 1)]=(-0.0822698068456+0.942719660939j)/(o+1.)+((-0.496422922215+0.225205612159j))+((-0.406720519154-0.346923493338j))*0.5**o
            arg[(3, 0, 2)]=(0.900047308654-0.931893131845j)*x[0]**o + ((-0.214929822836-0.966715868348j))*x[0] + ((0.421649076713-0.118231841011j))*x[1]**o + ((0.523520036388-0.0945177758162j))*x[1] + ((0.602914713389-0.601930340318j))*x[2]**o + ((0.0688568572474+0.758475970955j))*x[2]
            ref[(3, 0, 2)]=(1.0245637901-0.720162181329j)/(o+1.)+((0.1887235354-0.151378836605j))+((0.900047308654-0.931893131845j))*0.5**o
            arg[(3, 1, 0)]=(0.107678725403+0.139473765323j)*x[0]**o + ((0.938401663306+0.705759114733j))*x[0] + ((-0.630689315089-0.3030344337j))*x[1]**o + ((-0.0415793129474-0.257395964987j))*x[1] + ((-0.260280285677+0.815077186591j))*x[2]**o + ((-0.0295366920277-0.627950385826j))*x[2]
            ref[(3, 1, 0)]=(-0.890969600766+0.512042752891j)/(o+1.)+((0.433642829166-0.0897936180401j))+((0.107678725403+0.139473765323j))*0.5**o
            arg[(3, 1, 1)]=(-0.568492841674-0.805874547396j)*x[0]**o + ((-0.460797007778-0.65825900085j))*x[0] + ((0.610406456624+0.645023762662j))*x[1]**o + ((0.107191896258-0.270083982667j))*x[1] + ((0.691516042003-0.917397882636j))*x[2]**o + ((-0.637837760384+0.840311870444j))*x[2]
            ref[(3, 1, 1)]=(1.30192249863-0.272374119975j)/(o+1.)+((-0.495721435952-0.0440155565364j))+((-0.568492841674-0.805874547396j))*0.5**o
            arg[(3, 1, 2)]=(0.393054782944+0.582800299717j)*x[0]**o + ((0.425880971754-0.467373792693j))*x[0] + ((0.824331051289+0.0758942117258j))*x[1]**o + ((-0.141122284977-0.000660629979839j))*x[1] + ((0.993799147878+0.777435321663j))*x[2]**o + ((-0.39010057582+0.935743554722j))*x[2]
            ref[(3, 1, 2)]=(1.81813019917+0.853329533389j)/(o+1.)+((-0.052670944522+0.233854566025j))+((0.393054782944+0.582800299717j))*0.5**o
            arg[(3, 2, 0)]=(-0.666523847377-0.406120044624j)*x[0]**o + ((0.505359715705-0.202477481555j))*x[0] + ((0.514071411022-0.360795527822j))*x[1]**o + ((-0.967677697165+0.818244430657j))*x[1] + ((0.295504524273-0.38057431303j))*x[2]**o + ((0.811465131258+0.934683840783j))*x[2]
            ref[(3, 2, 0)]=(0.809575935295-0.741369840852j)/(o+1.)+((0.174573574899+0.775225394942j))+((-0.666523847377-0.406120044624j))*0.5**o
            arg[(3, 2, 1)]=(-0.976836509498+0.881594941248j)*x[0]**o + ((0.153094173779-0.171958949688j))*x[0] + ((0.642101234773+0.948952805905j))*x[1]**o + ((0.229227288559-0.641714429581j))*x[1] + ((-0.67705462917-0.454885226654j))*x[2]**o + ((-0.259444516655-0.065158975983j))*x[2]
            ref[(3, 2, 1)]=(-0.0349533943967+0.494067579251j)/(o+1.)+((0.0614384728414-0.439416177626j))+((-0.976836509498+0.881594941248j))*0.5**o
            arg[(3, 2, 2)]=(-0.991454196727+0.375113371152j)*x[0]**o + ((0.363516849491+0.454997424195j))*x[0] + ((-0.995510426163+0.317486341472j))*x[1]**o + ((-0.465260063247+0.278533887264j))*x[1] + ((0.00763610015791+0.435982491983j))*x[2]**o + ((0.0713374376923+0.789657010131j))*x[2]
            ref[(3, 2, 2)]=(-0.987874326005+0.753468833454j)/(o+1.)+((-0.0152028880318+0.761594160795j))+((-0.991454196727+0.375113371152j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3, 3),w)
        ref=numpy.zeros((4, 2, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.34877213733-0.782582790056j)*x[0]**o + ((-0.242754257442+0.234890953189j))*x[0] + ((0.471425856511-0.82533453483j))*x[1]**o + ((-0.932578806739-0.466754412495j))*x[1]
            ref[(0, 0, 0, 0)]=(0.471425856511-0.82533453483j)/(o+1.)+((-0.587666532091-0.115931729653j))+((-0.34877213733-0.782582790056j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.166090921683+0.760410900117j)*x[0]**o + ((0.738602145913-0.655263835998j))*x[0] + ((-0.848589095389-0.861026165958j))*x[1]**o + ((0.233311215442+0.358292003186j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.848589095389-0.861026165958j)/(o+1.)+((0.485956680677-0.148485916406j))+((-0.166090921683+0.760410900117j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.0112870568649-0.36633850357j)*x[0]**o + ((0.95034650026+0.445669999152j))*x[0] + ((-0.799144486431-0.265813803766j))*x[1]**o + ((0.331444831084+0.241113040692j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.799144486431-0.265813803766j)/(o+1.)+((0.640895665672+0.343391519922j))+((-0.0112870568649-0.36633850357j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.377817632569+0.850607195625j)*x[0]**o + ((0.769455494601-0.767151512514j))*x[0] + ((0.078701067238-0.997938092489j))*x[1]**o + ((0.564719893006-0.846235217966j))*x[1]
            ref[(0, 0, 1, 0)]=(0.078701067238-0.997938092489j)/(o+1.)+((0.667087693804-0.80669336524j))+((-0.377817632569+0.850607195625j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.451239660961+0.0705211344677j)*x[0]**o + ((-0.944657160933-0.0359033573971j))*x[0] + ((-0.519636835825-0.37375084266j))*x[1]**o + ((-0.171459904275-0.663142384676j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.519636835825-0.37375084266j)/(o+1.)+((-0.558058532604-0.349522871037j))+((0.451239660961+0.0705211344677j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.569774314021+0.245280322533j)*x[0]**o + ((0.365987543739+0.7291818901j))*x[0] + ((0.382804929673+0.619007794736j))*x[1]**o + ((7.618293312e-05+0.299429311632j))*x[1]
            ref[(0, 0, 1, 2)]=(0.382804929673+0.619007794736j)/(o+1.)+((0.183031863336+0.514305600866j))+((0.569774314021+0.245280322533j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.886460960766+0.502238922088j)*x[0]**o + ((0.000300452445812-0.312591680266j))*x[0] + ((0.578176093656-0.242284246019j))*x[1]**o + ((0.656747122768+0.7142617756j))*x[1]
            ref[(0, 0, 2, 0)]=(0.578176093656-0.242284246019j)/(o+1.)+((0.328523787607+0.200835047667j))+((0.886460960766+0.502238922088j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.194666643897+0.117486126581j)*x[0]**o + ((0.923289903054-0.752856669083j))*x[0] + ((0.354519059549+0.31612792213j))*x[1]**o + ((-0.990328517258-0.705598278028j))*x[1]
            ref[(0, 0, 2, 1)]=(0.354519059549+0.31612792213j)/(o+1.)+((-0.0335193071018-0.729227473556j))+((-0.194666643897+0.117486126581j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.922586733481+0.0288788676427j)*x[0]**o + ((-0.219336094675-0.59795792935j))*x[0] + ((-0.0177426480877-0.215973982526j))*x[1]**o + ((0.162730856356+0.481166625763j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.0177426480877-0.215973982526j)/(o+1.)+((-0.0283026191599-0.0583956517939j))+((0.922586733481+0.0288788676427j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.234824088617-0.156426670566j)*x[0]**o + ((0.762225952235-0.427887728685j))*x[0] + ((0.0797576823959+0.980154884346j))*x[1]**o + ((0.0216373013071-0.22375955252j))*x[1]
            ref[(0, 1, 0, 0)]=(0.0797576823959+0.980154884346j)/(o+1.)+((0.391931626771-0.325823640603j))+((-0.234824088617-0.156426670566j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.0686605079342+0.804402991682j)*x[0]**o + ((0.441028804069+0.587317276594j))*x[0] + ((0.432515914139+0.456737366972j))*x[1]**o + ((0.330066862954-0.90675191594j))*x[1]
            ref[(0, 1, 0, 1)]=(0.432515914139+0.456737366972j)/(o+1.)+((0.385547833511-0.159717319673j))+((0.0686605079342+0.804402991682j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.48708601445+0.280864614259j)*x[0]**o + ((-0.00833349451949+0.313015412659j))*x[0] + ((-0.263076900892-0.620443003658j))*x[1]**o + ((0.433531905454-0.739534258707j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.263076900892-0.620443003658j)/(o+1.)+((0.212599205467-0.213259423024j))+((-0.48708601445+0.280864614259j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.953994146168-0.508770138225j)*x[0]**o + ((-0.461829302309-0.124013600043j))*x[0] + ((0.862600559747+0.847212162588j))*x[1]**o + ((-0.783345168349-0.60147501833j))*x[1]
            ref[(0, 1, 1, 0)]=(0.862600559747+0.847212162588j)/(o+1.)+((-0.622587235329-0.362744309186j))+((0.953994146168-0.508770138225j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.746519071569-0.910340663982j)*x[0]**o + ((-0.950202117305+0.539609433041j))*x[0] + ((0.347770360282+0.355227027876j))*x[1]**o + ((-0.911835351219-0.739036330927j))*x[1]
            ref[(0, 1, 1, 1)]=(0.347770360282+0.355227027876j)/(o+1.)+((-0.931018734262-0.0997134489429j))+((0.746519071569-0.910340663982j))*0.5**o
            arg[(0, 1, 1, 2)]=(-0.58038821815+0.165821806029j)*x[0]**o + ((-0.827985324721-0.243261731345j))*x[0] + ((-0.896806875274+0.203396199745j))*x[1]**o + ((0.672300583679-0.939931437578j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.896806875274+0.203396199745j)/(o+1.)+((-0.0778423705209-0.591596584461j))+((-0.58038821815+0.165821806029j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.803287872218-0.492910322464j)*x[0]**o + ((0.759797068292+0.00777002091225j))*x[0] + ((0.920077895197-0.847834964478j))*x[1]**o + ((-0.787320396543-0.160461223728j))*x[1]
            ref[(0, 1, 2, 0)]=(0.920077895197-0.847834964478j)/(o+1.)+((-0.0137616641251-0.0763456014076j))+((-0.803287872218-0.492910322464j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.921816556179-0.912455052673j)*x[0]**o + ((-0.482382480147+0.269355015714j))*x[0] + ((-0.602140425631+0.91015513167j))*x[1]**o + ((-0.403617878938-0.683214671462j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.602140425631+0.91015513167j)/(o+1.)+((-0.443000179543-0.206929827874j))+((0.921816556179-0.912455052673j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.66217228549+0.549428347802j)*x[0]**o + ((-0.333943257596+0.865376023099j))*x[0] + ((0.292433278623+0.142228613724j))*x[1]**o + ((-0.371278656846-0.617649881625j))*x[1]
            ref[(0, 1, 2, 2)]=(0.292433278623+0.142228613724j)/(o+1.)+((-0.352610957221+0.123863070737j))+((-0.66217228549+0.549428347802j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.837011415274-0.200305485052j)*x[0]**o + ((0.604883514995+0.589532830936j))*x[0] + ((0.448626589723-0.244671442369j))*x[1]**o + ((-0.568209195004+0.0764132773177j))*x[1]
            ref[(1, 0, 0, 0)]=(0.448626589723-0.244671442369j)/(o+1.)+((0.0183371599956+0.332973054127j))+((0.837011415274-0.200305485052j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.692906143881+0.758227342336j)*x[0]**o + ((0.328977435923+0.206819996046j))*x[0] + ((-0.599622344604+0.355786834788j))*x[1]**o + ((0.953643858916-0.31482034619j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.599622344604+0.355786834788j)/(o+1.)+((0.64131064742-0.054000175072j))+((0.692906143881+0.758227342336j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.692084844839-0.556061214182j)*x[0]**o + ((0.15857723596+0.812223925744j))*x[0] + ((-0.699307018543+0.345664805625j))*x[1]**o + ((0.0736341098782-0.96042819449j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.699307018543+0.345664805625j)/(o+1.)+((0.116105672919-0.0741021343729j))+((-0.692084844839-0.556061214182j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.557233082455+0.775860997665j)*x[0]**o + ((0.92553349989-0.531558858484j))*x[0] + ((-0.922894947883-0.436943520028j))*x[1]**o + ((0.121105350084+0.958586838405j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.922894947883-0.436943520028j)/(o+1.)+((0.523319424987+0.21351398996j))+((0.557233082455+0.775860997665j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.523132252115+0.651631902926j)*x[0]**o + ((-0.494775772732-0.719976992051j))*x[0] + ((0.142284801948-0.275980109652j))*x[1]**o + ((0.233161834209-0.904014511889j))*x[1]
            ref[(1, 0, 1, 1)]=(0.142284801948-0.275980109652j)/(o+1.)+((-0.130806969261-0.81199575197j))+((0.523132252115+0.651631902926j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.349605763143-0.402154249079j)*x[0]**o + ((-0.446734798738+0.959032644126j))*x[0] + ((-0.809001003577+0.376952461626j))*x[1]**o + ((0.796420190833+0.622548857106j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.809001003577+0.376952461626j)/(o+1.)+((0.174842696047+0.790790750616j))+((0.349605763143-0.402154249079j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.881900886832+0.0914071695954j)*x[0]**o + ((0.134891855406+0.698969537416j))*x[0] + ((-0.277823555517+0.68829928423j))*x[1]**o + ((-0.500779094754-0.708021744489j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.277823555517+0.68829928423j)/(o+1.)+((-0.182943619674-0.00452610353639j))+((0.881900886832+0.0914071695954j))*0.5**o
            arg[(1, 0, 2, 1)]=(-0.438708500421-0.649036748797j)*x[0]**o + ((-0.705371892529+0.0475934474146j))*x[0] + ((0.386292874679+0.687220661122j))*x[1]**o + ((-0.222077363062-0.976856649797j))*x[1]
            ref[(1, 0, 2, 1)]=(0.386292874679+0.687220661122j)/(o+1.)+((-0.463724627795-0.464631601191j))+((-0.438708500421-0.649036748797j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.0520209750023+0.897658117443j)*x[0]**o + ((-0.217323890319+0.757925859852j))*x[0] + ((0.411335686086+0.0780102223298j))*x[1]**o + ((0.647892171526+0.408476398729j))*x[1]
            ref[(1, 0, 2, 2)]=(0.411335686086+0.0780102223298j)/(o+1.)+((0.215284140604+0.583201129291j))+((-0.0520209750023+0.897658117443j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.0271328318956+0.533148026004j)*x[0]**o + ((0.497546850361+0.683337411627j))*x[0] + ((0.916454622038-0.435027918627j))*x[1]**o + ((-0.387769083399+0.995211742167j))*x[1]
            ref[(1, 1, 0, 0)]=(0.916454622038-0.435027918627j)/(o+1.)+((0.0548888834812+0.839274576897j))+((0.0271328318956+0.533148026004j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.058286278183-0.0173109842018j)*x[0]**o + ((-0.189046835337-0.925688440089j))*x[0] + ((0.360445950721-0.939873657844j))*x[1]**o + ((0.0269465832466+0.105051500932j))*x[1]
            ref[(1, 1, 0, 1)]=(0.360445950721-0.939873657844j)/(o+1.)+((-0.0810501260453-0.410318469578j))+((0.058286278183-0.0173109842018j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.693201861799+0.644557549739j)*x[0]**o + ((0.0905991129937-0.868548998531j))*x[0] + ((-0.505178985682-0.557247128947j))*x[1]**o + ((-0.444977112882+0.655548273876j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.505178985682-0.557247128947j)/(o+1.)+((-0.177188999944-0.106500362327j))+((0.693201861799+0.644557549739j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.156897084824+0.811794246604j)*x[0]**o + ((-0.411762078732-0.412937164405j))*x[0] + ((-0.475945857104-0.460891867978j))*x[1]**o + ((0.435516700561+0.514999336337j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.475945857104-0.460891867978j)/(o+1.)+((0.0118773109148+0.051031085966j))+((-0.156897084824+0.811794246604j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.00453588780354-0.16455126614j)*x[0]**o + ((-0.902885978391-0.810318591869j))*x[0] + ((0.218303654208-0.537904344598j))*x[1]**o + ((-0.979767330533+0.284101423838j))*x[1]
            ref[(1, 1, 1, 1)]=(0.218303654208-0.537904344598j)/(o+1.)+((-0.941326654462-0.263108584015j))+((-0.00453588780354-0.16455126614j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.463619005452+0.580999763011j)*x[0]**o + ((-0.438654317733-0.871885740368j))*x[0] + ((-0.64653047309-0.980780279386j))*x[1]**o + ((0.647022741607+0.914670296851j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.64653047309-0.980780279386j)/(o+1.)+((0.104184211937+0.0213922782415j))+((-0.463619005452+0.580999763011j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.306098333561-0.122957511637j)*x[0]**o + ((-0.381570650347-0.807054335393j))*x[0] + ((-0.0172805037133+0.238971785252j))*x[1]**o + ((-0.200221845051-0.206924464125j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.0172805037133+0.238971785252j)/(o+1.)+((-0.290896247699-0.506989399759j))+((0.306098333561-0.122957511637j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.52327335599-0.711234676305j)*x[0]**o + ((-0.54705994515+0.14237184701j))*x[0] + ((0.224042572194+0.88584132399j))*x[1]**o + ((-0.0075378103922-0.603930814532j))*x[1]
            ref[(1, 1, 2, 1)]=(0.224042572194+0.88584132399j)/(o+1.)+((-0.277298877771-0.230779483761j))+((-0.52327335599-0.711234676305j))*0.5**o
            arg[(1, 1, 2, 2)]=(-0.105332035084-0.267357748526j)*x[0]**o + ((-0.725107715502+0.00689200455623j))*x[0] + ((0.655060076243-0.885015863409j))*x[1]**o + ((0.361865031204+0.115801038298j))*x[1]
            ref[(1, 1, 2, 2)]=(0.655060076243-0.885015863409j)/(o+1.)+((-0.181621342149+0.0613465214271j))+((-0.105332035084-0.267357748526j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.913417508998+0.80954829714j)*x[0]**o + ((0.805880904827-0.664964417078j))*x[0] + ((-0.744013464807-0.1420923905j))*x[1]**o + ((0.354856687354-0.262429352684j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.744013464807-0.1420923905j)/(o+1.)+((0.58036879609-0.463696884881j))+((-0.913417508998+0.80954829714j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.928531986325+0.432366277845j)*x[0]**o + ((0.373231348008+0.119770259991j))*x[0] + ((-0.872976125153+0.813524740513j))*x[1]**o + ((0.397190762908-0.861719265812j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.872976125153+0.813524740513j)/(o+1.)+((0.385211055458-0.370974502911j))+((0.928531986325+0.432366277845j))*0.5**o
            arg[(2, 0, 0, 2)]=(0.865909935583-0.256915862995j)*x[0]**o + ((-0.507062769022-0.165682492738j))*x[0] + ((-0.867791247615+0.937668025891j))*x[1]**o + ((0.874133826041-0.109976454332j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.867791247615+0.937668025891j)/(o+1.)+((0.18353552851-0.137829473535j))+((0.865909935583-0.256915862995j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.895169626764+0.860435329875j)*x[0]**o + ((-0.331227463066+0.781950971332j))*x[0] + ((-0.0771094887683+0.190870647966j))*x[1]**o + ((-0.163871271516-0.684952377486j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.0771094887683+0.190870647966j)/(o+1.)+((-0.247549367291+0.0484992969231j))+((-0.895169626764+0.860435329875j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.0145861873315+0.927516048116j)*x[0]**o + ((-0.790894821237-0.0195337844479j))*x[0] + ((-0.348669085097+0.910385343355j))*x[1]**o + ((0.333924037125-0.951275359789j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.348669085097+0.910385343355j)/(o+1.)+((-0.228485392056-0.485404572118j))+((0.0145861873315+0.927516048116j))*0.5**o
            arg[(2, 0, 1, 2)]=(0.546331256679-0.188332850927j)*x[0]**o + ((-0.0366286926333+0.284929200327j))*x[0] + ((0.688145245217-0.29780859686j))*x[1]**o + ((-0.267992200518-0.522395024151j))*x[1]
            ref[(2, 0, 1, 2)]=(0.688145245217-0.29780859686j)/(o+1.)+((-0.152310446576-0.118732911912j))+((0.546331256679-0.188332850927j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.0907204529394-0.229774845043j)*x[0]**o + ((0.821403551556-0.381605206781j))*x[0] + ((-0.258274686119+0.92148570187j))*x[1]**o + ((-0.682906584557+0.820797783391j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.258274686119+0.92148570187j)/(o+1.)+((0.0692484834994+0.219596288305j))+((-0.0907204529394-0.229774845043j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.650119455636+0.617686251969j)*x[0]**o + ((-0.133689415126+0.979956144166j))*x[0] + ((-0.268962473462+0.808830754736j))*x[1]**o + ((-0.447799206387+0.1754747186j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.268962473462+0.808830754736j)/(o+1.)+((-0.290744310757+0.577715431383j))+((0.650119455636+0.617686251969j))*0.5**o
            arg[(2, 0, 2, 2)]=(-0.0638179056743+0.420098358627j)*x[0]**o + ((-0.287246809304+0.548782841639j))*x[0] + ((0.46659586355+0.0947681709134j))*x[1]**o + ((0.717642924581-0.815865070918j))*x[1]
            ref[(2, 0, 2, 2)]=(0.46659586355+0.0947681709134j)/(o+1.)+((0.215198057638-0.13354111464j))+((-0.0638179056743+0.420098358627j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.838565666382-0.315105964544j)*x[0]**o + ((-0.789609546562-0.644549832964j))*x[0] + ((0.676699710748+0.809144928321j))*x[1]**o + ((-0.190549080244-0.223020363216j))*x[1]
            ref[(2, 1, 0, 0)]=(0.676699710748+0.809144928321j)/(o+1.)+((-0.490079313403-0.43378509809j))+((-0.838565666382-0.315105964544j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.0643032058363-0.376474532485j)*x[0]**o + ((-0.704839169361+0.883306040014j))*x[0] + ((-0.408644819304+0.886524989535j))*x[1]**o + ((-0.357752795643-0.278400264071j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.408644819304+0.886524989535j)/(o+1.)+((-0.531295982502+0.302452887972j))+((-0.0643032058363-0.376474532485j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.447163011585-0.55662196327j)*x[0]**o + ((0.682006069011-0.357395535309j))*x[0] + ((0.998759029259+0.634348589169j))*x[1]**o + ((0.700138479001-0.277496859649j))*x[1]
            ref[(2, 1, 0, 2)]=(0.998759029259+0.634348589169j)/(o+1.)+((0.691072274006-0.317446197479j))+((-0.447163011585-0.55662196327j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.0571413438274-0.0123946240335j)*x[0]**o + ((0.960934554818-0.853048168028j))*x[0] + ((0.49633154191-0.384862539049j))*x[1]**o + ((-0.749678269033+0.66627710003j))*x[1]
            ref[(2, 1, 1, 0)]=(0.49633154191-0.384862539049j)/(o+1.)+((0.105628142893-0.093385533999j))+((0.0571413438274-0.0123946240335j))*0.5**o
            arg[(2, 1, 1, 1)]=(0.903957501713-0.0873971577239j)*x[0]**o + ((-0.478683120355+0.171823186718j))*x[0] + ((0.38581862796+0.92677661983j))*x[1]**o + ((0.589037486303+0.827237341136j))*x[1]
            ref[(2, 1, 1, 1)]=(0.38581862796+0.92677661983j)/(o+1.)+((0.055177182974+0.499530263927j))+((0.903957501713-0.0873971577239j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.522159864488+0.33827988428j)*x[0]**o + ((0.0590945458747+0.380022785522j))*x[0] + ((-0.519477408087+0.933902194808j))*x[1]**o + ((-0.514652354826+0.338814362168j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.519477408087+0.933902194808j)/(o+1.)+((-0.227778904475+0.359418573845j))+((0.522159864488+0.33827988428j))*0.5**o
            arg[(2, 1, 2, 0)]=(0.570334796439+0.936028753655j)*x[0]**o + ((0.0909831903484+0.136893726993j))*x[0] + ((0.9252126408-0.549295852284j))*x[1]**o + ((-0.930960606471+0.0776101752263j))*x[1]
            ref[(2, 1, 2, 0)]=(0.9252126408-0.549295852284j)/(o+1.)+((-0.419988708061+0.10725195111j))+((0.570334796439+0.936028753655j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.493809202509-0.19299740364j)*x[0]**o + ((0.52630524305+0.505966360432j))*x[0] + ((0.503333978106+0.913017635669j))*x[1]**o + ((0.409808179511-0.890116064723j))*x[1]
            ref[(2, 1, 2, 1)]=(0.503333978106+0.913017635669j)/(o+1.)+((0.46805671128-0.192074852146j))+((-0.493809202509-0.19299740364j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.320705634953+0.669651489953j)*x[0]**o + ((-0.320924383253-0.330812525913j))*x[0] + ((-0.941405906464+0.833370272301j))*x[1]**o + ((-0.499914180317+0.69124522592j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.941405906464+0.833370272301j)/(o+1.)+((-0.410419281785+0.180216350003j))+((0.320705634953+0.669651489953j))*0.5**o
            arg[(3, 0, 0, 0)]=(-0.268495822599-0.0225949794799j)*x[0]**o + ((0.702732091319+0.131511445483j))*x[0] + ((0.369718370367-0.259518284596j))*x[1]**o + ((0.773802168666+0.263545674716j))*x[1]
            ref[(3, 0, 0, 0)]=(0.369718370367-0.259518284596j)/(o+1.)+((0.738267129993+0.197528560099j))+((-0.268495822599-0.0225949794799j))*0.5**o
            arg[(3, 0, 0, 1)]=(-0.0545231486644-0.0856805853277j)*x[0]**o + ((-0.541465077184+0.478532536091j))*x[0] + ((-0.773534761226-0.541771870465j))*x[1]**o + ((-0.846864214975-0.676760043575j))*x[1]
            ref[(3, 0, 0, 1)]=(-0.773534761226-0.541771870465j)/(o+1.)+((-0.69416464608-0.0991137537419j))+((-0.0545231486644-0.0856805853277j))*0.5**o
            arg[(3, 0, 0, 2)]=(0.70937542779+0.512257571082j)*x[0]**o + ((0.0339905739814-0.576469772858j))*x[0] + ((-0.280981192197+0.183486728085j))*x[1]**o + ((0.141412704798-0.353426867609j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.280981192197+0.183486728085j)/(o+1.)+((0.0877016393895-0.464948320234j))+((0.70937542779+0.512257571082j))*0.5**o
            arg[(3, 0, 1, 0)]=(0.213562210874-0.637026514479j)*x[0]**o + ((-0.502122543309+0.0741675651822j))*x[0] + ((0.121202017114-0.742929457959j))*x[1]**o + ((-0.924421802782+0.25732808809j))*x[1]
            ref[(3, 0, 1, 0)]=(0.121202017114-0.742929457959j)/(o+1.)+((-0.713272173046+0.165747826636j))+((0.213562210874-0.637026514479j))*0.5**o
            arg[(3, 0, 1, 1)]=(-0.776671456164-0.302964385445j)*x[0]**o + ((-0.689748893628+0.738115605373j))*x[0] + ((0.301266575255+0.829439255781j))*x[1]**o + ((-0.0728367187807+0.479509346383j))*x[1]
            ref[(3, 0, 1, 1)]=(0.301266575255+0.829439255781j)/(o+1.)+((-0.381292806205+0.608812475878j))+((-0.776671456164-0.302964385445j))*0.5**o
            arg[(3, 0, 1, 2)]=(0.829934253583+0.725678801219j)*x[0]**o + ((-0.517414597662+0.117381876395j))*x[0] + ((-0.540134567264-0.912598414423j))*x[1]**o + ((0.817976292833+0.0275230109183j))*x[1]
            ref[(3, 0, 1, 2)]=(-0.540134567264-0.912598414423j)/(o+1.)+((0.150280847586+0.0724524436568j))+((0.829934253583+0.725678801219j))*0.5**o
            arg[(3, 0, 2, 0)]=(0.688129107896+0.405272140549j)*x[0]**o + ((-0.649254755851-0.618698932035j))*x[0] + ((0.974809778987+0.518465044941j))*x[1]**o + ((0.00482751162587+0.840757015268j))*x[1]
            ref[(3, 0, 2, 0)]=(0.974809778987+0.518465044941j)/(o+1.)+((-0.322213622113+0.111029041616j))+((0.688129107896+0.405272140549j))*0.5**o
            arg[(3, 0, 2, 1)]=(0.719148478167+0.329517117406j)*x[0]**o + ((0.303871179707-0.849718273522j))*x[0] + ((0.485068318006+0.441616541602j))*x[1]**o + ((0.795854339446-0.798622793849j))*x[1]
            ref[(3, 0, 2, 1)]=(0.485068318006+0.441616541602j)/(o+1.)+((0.549862759577-0.824170533686j))+((0.719148478167+0.329517117406j))*0.5**o
            arg[(3, 0, 2, 2)]=(-0.219839816764-0.987357318373j)*x[0]**o + ((-0.208802041793-0.413795677618j))*x[0] + ((-0.9513778178-0.77278122847j))*x[1]**o + ((0.799296757409+0.39967153727j))*x[1]
            ref[(3, 0, 2, 2)]=(-0.9513778178-0.77278122847j)/(o+1.)+((0.295247357808-0.00706207017439j))+((-0.219839816764-0.987357318373j))*0.5**o
            arg[(3, 1, 0, 0)]=(-0.706015604138+0.121366183765j)*x[0]**o + ((0.725846213012+0.119962078943j))*x[0] + ((-0.0834186617948+0.352780253711j))*x[1]**o + ((0.81950288976-0.733995030479j))*x[1]
            ref[(3, 1, 0, 0)]=(-0.0834186617948+0.352780253711j)/(o+1.)+((0.772674551386-0.307016475768j))+((-0.706015604138+0.121366183765j))*0.5**o
            arg[(3, 1, 0, 1)]=(-0.641318444461-0.397847628454j)*x[0]**o + ((-0.452452239319-0.957420976426j))*x[0] + ((0.592415679487+0.403590773093j))*x[1]**o + ((-0.726294801745-0.667099580655j))*x[1]
            ref[(3, 1, 0, 1)]=(0.592415679487+0.403590773093j)/(o+1.)+((-0.589373520532-0.81226027854j))+((-0.641318444461-0.397847628454j))*0.5**o
            arg[(3, 1, 0, 2)]=(0.97299512124-0.747292506789j)*x[0]**o + ((0.388853794609+0.0872914910072j))*x[0] + ((-0.835955577439+0.252665497897j))*x[1]**o + ((-0.395256557479-0.100405754173j))*x[1]
            ref[(3, 1, 0, 2)]=(-0.835955577439+0.252665497897j)/(o+1.)+((-0.0032013814352-0.00655713158285j))+((0.97299512124-0.747292506789j))*0.5**o
            arg[(3, 1, 1, 0)]=(0.935323857287-0.265237860711j)*x[0]**o + ((0.303807424415+0.674596797794j))*x[0] + ((0.599611586032-0.171917511522j))*x[1]**o + ((0.802674546262+0.598813297298j))*x[1]
            ref[(3, 1, 1, 0)]=(0.599611586032-0.171917511522j)/(o+1.)+((0.553240985339+0.636705047546j))+((0.935323857287-0.265237860711j))*0.5**o
            arg[(3, 1, 1, 1)]=(-0.239522580166-0.407709548098j)*x[0]**o + ((-0.499939962667+0.677874523952j))*x[0] + ((0.895904996841-0.224839268795j))*x[1]**o + ((0.922297860653-0.986861536233j))*x[1]
            ref[(3, 1, 1, 1)]=(0.895904996841-0.224839268795j)/(o+1.)+((0.211178948993-0.154493506141j))+((-0.239522580166-0.407709548098j))*0.5**o
            arg[(3, 1, 1, 2)]=(-0.607345725141+0.191618485957j)*x[0]**o + ((-0.745184277657+0.698295500745j))*x[0] + ((0.485523053189+0.338614378492j))*x[1]**o + ((-0.989138001429-0.882036958583j))*x[1]
            ref[(3, 1, 1, 2)]=(0.485523053189+0.338614378492j)/(o+1.)+((-0.867161139543-0.0918707289193j))+((-0.607345725141+0.191618485957j))*0.5**o
            arg[(3, 1, 2, 0)]=(-0.39941776409-0.154096355589j)*x[0]**o + ((-0.700486993507+0.353377132268j))*x[0] + ((-0.530833434799+0.892790454204j))*x[1]**o + ((-0.714577307755+0.502498452945j))*x[1]
            ref[(3, 1, 2, 0)]=(-0.530833434799+0.892790454204j)/(o+1.)+((-0.707532150631+0.427937792606j))+((-0.39941776409-0.154096355589j))*0.5**o
            arg[(3, 1, 2, 1)]=(0.991663090812+0.987119819269j)*x[0]**o + ((0.309976854829+0.669197844006j))*x[0] + ((-0.696289363848+0.510727523412j))*x[1]**o + ((-0.786676182815+0.279520997713j))*x[1]
            ref[(3, 1, 2, 1)]=(-0.696289363848+0.510727523412j)/(o+1.)+((-0.238349663993+0.47435942086j))+((0.991663090812+0.987119819269j))*0.5**o
            arg[(3, 1, 2, 2)]=(-0.884552674655-0.751935656751j)*x[0]**o + ((-0.192966535672-0.888699006874j))*x[0] + ((0.848405954166-0.22629989486j))*x[1]**o + ((0.800587068601+0.276358675283j))*x[1]
            ref[(3, 1, 2, 2)]=(0.848405954166-0.22629989486j)/(o+1.)+((0.303810266464-0.306170165796j))+((-0.884552674655-0.751935656751j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.13123029276+0.28805001968j)*x[0]**o + ((-0.184814382658+0.144678687474j))*x[0] + ((0.661911585026-0.0307029844838j))*x[1]**o + ((0.797951450067+0.215201593996j))*x[1] + ((-0.079242409627-0.195024127251j))*x[2]**o + ((-0.574961170005-0.240739929412j))*x[2]
            ref[(0, 0, 0, 0)]=(0.582669175399-0.225727111735j)/(o+1.)+((0.0190879487017+0.0595701760288j))+((0.13123029276+0.28805001968j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.751013429938-0.206106171628j)*x[0]**o + ((0.797671441228+0.43190313891j))*x[0] + ((-0.589173954893-0.619764239636j))*x[1]**o + ((0.547213625629+0.378169421351j))*x[1] + ((-0.317315523166-0.0411694904743j))*x[2]**o + ((-0.186894299592-0.358266140911j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.906489478059-0.66093373011j)/(o+1.)+((0.578995383632+0.225903209675j))+((0.751013429938-0.206106171628j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.088643124937+0.320690054357j)*x[0]**o + ((0.602968773043+0.0612179677229j))*x[0] + ((-0.960965081112+0.573135432537j))*x[1]**o + ((-0.492220988184-0.859172603481j))*x[1] + ((-0.301955149963+0.135348595915j))*x[2]**o + ((0.653069822789+0.258605897333j))*x[2]
            ref[(0, 0, 0, 2)]=(-1.26292023107+0.708484028451j)/(o+1.)+((0.381908803824-0.269674369212j))+((0.088643124937+0.320690054357j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.966361976589-0.825039656158j)*x[0]**o + ((-0.861330653702+0.954507180696j))*x[0] + ((0.197645387742+0.111833164291j))*x[1]**o + ((0.91086638792+0.843602752765j))*x[1] + ((0.143390904402-0.916989488544j))*x[2]**o + ((-0.436402007008-0.357284798408j))*x[2]
            ref[(0, 0, 1, 0)]=(0.341036292144-0.805156324253j)/(o+1.)+((-0.193433136395+0.720412567526j))+((0.966361976589-0.825039656158j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.284218818499+0.0691240218218j)*x[0]**o + ((0.995515837709-0.383072517273j))*x[0] + ((0.55851098245+0.319540248046j))*x[1]**o + ((-0.769020819059-0.395561804405j))*x[1] + ((0.650306704219+0.899851344114j))*x[2]**o + ((-0.299715333784+0.245494994792j))*x[2]
            ref[(0, 0, 1, 1)]=(1.20881768667+1.21939159216j)/(o+1.)+((-0.0366101575672-0.266569663443j))+((0.284218818499+0.0691240218218j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.872915769386-0.443603599564j)*x[0]**o + ((0.120552198376+0.0815049478978j))*x[0] + ((-0.516782565626+0.0725503243612j))*x[1]**o + ((0.987178032942-0.536293444863j))*x[1] + ((-0.911394446478+0.0846639703883j))*x[2]**o + ((-0.979163625216+0.358284916027j))*x[2]
            ref[(0, 0, 1, 2)]=(-1.4281770121+0.157214294749j)/(o+1.)+((0.0642833030507-0.0482517904688j))+((0.872915769386-0.443603599564j))*0.5**o
            arg[(0, 0, 2, 0)]=(-0.179021422108+0.352352884157j)*x[0]**o + ((0.277579059678+0.581162341364j))*x[0] + ((0.743485665309-0.515026147267j))*x[1]**o + ((-0.447761510691+0.700407130506j))*x[1] + ((0.268463521991-0.589393210281j))*x[2]**o + ((-0.0154429394262+0.0205296233888j))*x[2]
            ref[(0, 0, 2, 0)]=(1.0119491873-1.10441935755j)/(o+1.)+((-0.0928126952194+0.651049547629j))+((-0.179021422108+0.352352884157j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.838465332457-0.542732733149j)*x[0]**o + ((0.0845342915293+0.418066277005j))*x[0] + ((0.325603488909-0.462099104791j))*x[1]**o + ((-0.403090677566-0.255262345769j))*x[1] + ((0.0884933164564-0.582912549207j))*x[2]**o + ((-0.453054752451-0.525966621563j))*x[2]
            ref[(0, 0, 2, 1)]=(0.414096805366-1.045011654j)/(o+1.)+((-0.385805569244-0.181581345164j))+((0.838465332457-0.542732733149j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.596102041888-0.0282127196025j)*x[0]**o + ((0.226317334147+0.442815577987j))*x[0] + ((0.902702530682-0.733699778084j))*x[1]**o + ((0.623374339697-0.224278690464j))*x[1] + ((0.186380733576+0.80602481798j))*x[2]**o + ((-0.115825479311-0.422520000707j))*x[2]
            ref[(0, 0, 2, 2)]=(1.08908326426+0.0723250398955j)/(o+1.)+((0.366933097266-0.101991556592j))+((0.596102041888-0.0282127196025j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.58328150594+0.0955781469666j)*x[0]**o + ((-0.548412895854+0.817163350674j))*x[0] + ((0.276551429291-0.532272432705j))*x[1]**o + ((0.961591835732-0.601906379515j))*x[1] + ((0.805645083872+0.218856698685j))*x[2]**o + ((0.981512495301+0.935422041904j))*x[2]
            ref[(0, 1, 0, 0)]=(1.08219651316-0.31341573402j)/(o+1.)+((0.69734571759+0.575339506531j))+((-0.58328150594+0.0955781469666j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.51022551791+0.752808152843j)*x[0]**o + ((0.465827016815+0.738123228545j))*x[0] + ((0.059010803563+0.991330771703j))*x[1]**o + ((0.930152432252-0.866082918377j))*x[1] + ((-0.90923178955-0.762657956937j))*x[2]**o + ((-0.702729188675-0.855505445503j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.850220985987+0.228672814766j)/(o+1.)+((0.346625130196-0.491732567667j))+((-0.51022551791+0.752808152843j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.178938414066-0.504286760748j)*x[0]**o + ((0.87720957771-0.187539227656j))*x[0] + ((0.0962761269399-0.850550618323j))*x[1]**o + ((0.169741238955+0.141404358433j))*x[1] + ((-0.270655119577+0.199561579615j))*x[2]**o + ((0.631016236912-0.0184600916977j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.174378992637-0.650989038708j)/(o+1.)+((0.838983526789-0.0322974804601j))+((-0.178938414066-0.504286760748j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.378312802578-0.555220020266j)*x[0]**o + ((0.921959568922-0.791187236636j))*x[0] + ((-0.891728665073+0.765666085427j))*x[1]**o + ((-0.277737548952-0.124246477563j))*x[1] + ((0.190265484055-0.896498578167j))*x[2]**o + ((-0.743701393104+0.626611044071j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.701463181017-0.13083249274j)/(o+1.)+((-0.0497396865668-0.144411335063j))+((0.378312802578-0.555220020266j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.242988166975+0.0233897907079j)*x[0]**o + ((0.32332570695+0.976487189539j))*x[0] + ((0.161891539798-0.776126398321j))*x[1]**o + ((0.805480066942+0.116367461517j))*x[1] + ((-0.20394485205-0.49039566447j))*x[2]**o + ((-0.827196608664-0.372869912869j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.0420533122518-1.26652206279j)/(o+1.)+((0.150804582614+0.359992369094j))+((0.242988166975+0.0233897907079j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.317264133574+0.328282604305j)*x[0]**o + ((-0.192952874279+0.0317332963921j))*x[0] + ((-0.0843682432889-0.238135363007j))*x[1]**o + ((-0.915329619045-0.28832427089j))*x[1] + ((-0.474837048318+0.0273001369212j))*x[2]**o + ((-0.0466778182017+0.613044061832j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.559205291606-0.210835226086j)/(o+1.)+((-0.577480155763+0.178226543667j))+((0.317264133574+0.328282604305j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.753384542133+0.601186588786j)*x[0]**o + ((0.861096833723-0.800816140659j))*x[0] + ((-0.38210412126-0.0594280167932j))*x[1]**o + ((-0.474267006973+0.360343454117j))*x[1] + ((-0.081006884551+0.0597758801915j))*x[2]**o + ((-0.217251936061-0.849785979425j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.463111005811+0.000347863398267j)/(o+1.)+((0.0847889453447-0.645129332984j))+((-0.753384542133+0.601186588786j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.134005371617+0.00104484321776j)*x[0]**o + ((0.476191336076+0.425704955507j))*x[0] + ((-0.389825288979+0.0923856549097j))*x[1]**o + ((-0.471108958593+0.487338365431j))*x[1] + ((0.210206275773-0.559492998341j))*x[2]**o + ((-0.141749366274-0.863346101299j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.179619013206-0.467107343431j)/(o+1.)+((-0.0683334943959+0.0248486098197j))+((0.134005371617+0.00104484321776j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.766798623907-0.460566427953j)*x[0]**o + ((-0.257243050653-0.923878488764j))*x[0] + ((-0.92929926084+0.520967155421j))*x[1]**o + ((0.118862968835-0.221656854515j))*x[1] + ((-0.461138057824+0.538335351003j))*x[2]**o + ((0.818868779809+0.76642867946j))*x[2]
            ref[(0, 1, 2, 2)]=(-1.39043731866+1.05930250642j)/(o+1.)+((0.340244348995-0.189553331909j))+((-0.766798623907-0.460566427953j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.95695093305+0.727224075016j)*x[0]**o + ((-0.0395938728445+0.46907041089j))*x[0] + ((0.829170060836+0.229405849565j))*x[1]**o + ((-0.612314482267-0.867063066488j))*x[1] + ((0.875017100766-0.744275831215j))*x[2]**o + ((-0.972521084949-0.11813784125j))*x[2]
            ref[(1, 0, 0, 0)]=(1.7041871616-0.51486998165j)/(o+1.)+((-0.81221472003-0.258065248424j))+((-0.95695093305+0.727224075016j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.141461834578+0.159545371658j)*x[0]**o + ((-0.464509519922-0.384795340503j))*x[0] + ((-0.64690718842+0.725580716352j))*x[1]**o + ((-0.17977269925+0.168630101922j))*x[1] + ((0.451283684179-0.679385711597j))*x[2]**o + ((0.882320585305+0.149191959293j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.195623504241+0.046195004755j)/(o+1.)+((0.119019183067-0.033486639644j))+((0.141461834578+0.159545371658j))*0.5**o
            arg[(1, 0, 0, 2)]=(0.883718852996+0.0164033926178j)*x[0]**o + ((0.385793537074+0.433366174736j))*x[0] + ((-0.425115027725-0.175508663996j))*x[1]**o + ((0.274131710863-0.993141601763j))*x[1] + ((0.401139240719-0.986701694578j))*x[2]**o + ((0.133219626482-0.230512905759j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.0239757870053-1.16221035857j)/(o+1.)+((0.396572437209-0.395144166393j))+((0.883718852996+0.0164033926178j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.0605073023894-0.996084985034j)*x[0]**o + ((0.589277027131-0.889136182775j))*x[0] + ((-0.746164831552-0.607410712561j))*x[1]**o + ((-0.673576112496-0.266451762921j))*x[1] + ((0.944606445274-0.982761333535j))*x[2]**o + ((0.953867255918-0.638922628367j))*x[2]
            ref[(1, 0, 1, 0)]=(0.198441613722-1.5901720461j)/(o+1.)+((0.434784085276-0.897255287031j))+((0.0605073023894-0.996084985034j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.650662110545+0.894627362757j)*x[0]**o + ((-0.414680216715+0.620617592187j))*x[0] + ((-0.975213890372-0.165800367822j))*x[1]**o + ((-0.408912182827+0.479896820309j))*x[1] + ((-0.762789388422-0.419052223114j))*x[2]**o + ((0.681740862576+0.663904767446j))*x[2]
            ref[(1, 0, 1, 1)]=(-1.73800327879-0.584852590936j)/(o+1.)+((-0.070925768483+0.882209589971j))+((0.650662110545+0.894627362757j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.0597261481875-0.0723091191491j)*x[0]**o + ((0.415490778411+0.538052331087j))*x[0] + ((-0.441734347216+0.377096406252j))*x[1]**o + ((0.53721899886+0.601158452584j))*x[1] + ((0.850032269456+0.118521376438j))*x[2]**o + ((0.591075997163+0.435509091356j))*x[2]
            ref[(1, 0, 1, 2)]=(0.40829792224+0.495617782691j)/(o+1.)+((0.771892887217+0.787359937514j))+((0.0597261481875-0.0723091191491j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.900838008347+0.685329406664j)*x[0]**o + ((-0.309406502818-0.164166491904j))*x[0] + ((0.75455721807+0.0791120682673j))*x[1]**o + ((-0.33480447094-0.255783152712j))*x[1] + ((0.14256081058-0.569975397642j))*x[2]**o + ((0.0875721041022-0.290403570868j))*x[2]
            ref[(1, 0, 2, 0)]=(0.89711802865-0.490863329375j)/(o+1.)+((-0.278319434828-0.355176607742j))+((0.900838008347+0.685329406664j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.129623457813+0.110270276889j)*x[0]**o + ((-0.173225480907-0.178401013063j))*x[0] + ((0.243773070769+0.54830087295j))*x[1]**o + ((-0.917662430319-0.376407042266j))*x[1] + ((-0.0903637934771-0.655806716143j))*x[2]**o + ((0.640467632346+0.641495545279j))*x[2]
            ref[(1, 0, 2, 1)]=(0.153409277292-0.107505843193j)/(o+1.)+((-0.22521013944+0.0433437449747j))+((0.129623457813+0.110270276889j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.26881957317-0.717525723383j)*x[0]**o + ((0.30090299789-0.0258122674401j))*x[0] + ((-0.887319188556+0.152511562803j))*x[1]**o + ((0.70705912016+0.199421397799j))*x[1] + ((0.939938868997-0.859591290039j))*x[2]**o + ((0.910883996181-0.541911178621j))*x[2]
            ref[(1, 0, 2, 2)]=(0.0526196804418-0.707079727235j)/(o+1.)+((0.959423057115-0.184151024131j))+((-0.26881957317-0.717525723383j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.661388850399+0.967991860093j)*x[0]**o + ((0.245053057083-0.203257450638j))*x[0] + ((0.623225693962-0.797883636779j))*x[1]**o + ((-0.889147662642-0.3627186008j))*x[1] + ((-0.648441469028-0.512494896569j))*x[2]**o + ((0.750552597622+0.130505967141j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.0252157750665-1.31037853335j)/(o+1.)+((0.0532289960316-0.217735042149j))+((-0.661388850399+0.967991860093j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.836310525387+0.895727662573j)*x[0]**o + ((-0.0687955668295+0.208399483575j))*x[0] + ((-0.369404599597+0.486712778005j))*x[1]**o + ((0.637670923098+0.833707081089j))*x[1] + ((-0.298226190319+0.300146642132j))*x[2]**o + ((0.658692970531-0.971467997192j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.667630789916+0.786859420137j)/(o+1.)+((0.613784163399+0.0353192837362j))+((0.836310525387+0.895727662573j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.637884727935+0.469245150675j)*x[0]**o + ((-0.787429834773-0.328466456461j))*x[0] + ((0.112318911756+0.271265881971j))*x[1]**o + ((0.983771739728+0.0530366116634j))*x[1] + ((-0.601339042863-0.150128321372j))*x[2]**o + ((-0.0342863892876-0.716673708221j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.489020131107+0.121137560599j)/(o+1.)+((0.0810277578335-0.496051776509j))+((0.637884727935+0.469245150675j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.511308199278+0.5894432691j)*x[0]**o + ((-0.0530285987857+0.010706198063j))*x[0] + ((0.649742210475-0.561694158814j))*x[1]**o + ((-0.731349937143+0.614109883479j))*x[1] + ((0.325160238194-0.474452967601j))*x[2]**o + ((0.0364030200337+0.629164622982j))*x[2]
            ref[(1, 1, 1, 0)]=(0.974902448669-1.03614712641j)/(o+1.)+((-0.373987757948+0.626990352262j))+((0.511308199278+0.5894432691j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.345375775577-0.712998421283j)*x[0]**o + ((0.67977048499-0.973613838501j))*x[0] + ((0.675552091202-0.351060884478j))*x[1]**o + ((-0.770726237646+0.543337785202j))*x[1] + ((0.518035807289-0.339503530753j))*x[2]**o + ((-0.721331653225+0.0278462800067j))*x[2]
            ref[(1, 1, 1, 1)]=(1.19358789849-0.690564415232j)/(o+1.)+((-0.40614370294-0.201214886647j))+((0.345375775577-0.712998421283j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.233154548914+0.556979378213j)*x[0]**o + ((-0.264103405338+0.233769982363j))*x[0] + ((0.368777178771+0.86027558479j))*x[1]**o + ((-0.892961832-0.633952983546j))*x[1] + ((-0.631602901661-0.86780075796j))*x[2]**o + ((-0.168853290106-0.801909711512j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.26282572289-0.00752517316977j)/(o+1.)+((-0.662959263722-0.601046356347j))+((0.233154548914+0.556979378213j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.58741029059+0.571938712344j)*x[0]**o + ((-0.139721412098+0.394712508101j))*x[0] + ((0.0785761812458-0.689371994636j))*x[1]**o + ((0.717504777992-0.63506754299j))*x[1] + ((0.781778854614+0.00645911019804j))*x[2]**o + ((-0.644686196208+0.286369584126j))*x[2]
            ref[(1, 1, 2, 0)]=(0.86035503586-0.682912884438j)/(o+1.)+((-0.0334514151572+0.0230072746187j))+((-0.58741029059+0.571938712344j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.771762761813+0.85820645581j)*x[0]**o + ((0.172796113639+0.0569563504873j))*x[0] + ((-0.183900984521-0.835376430471j))*x[1]**o + ((-0.932271944763+0.286773759316j))*x[1] + ((-0.354189522524-0.450866800728j))*x[2]**o + ((-0.846217170161-0.499729511636j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.538090507045-1.2862432312j)/(o+1.)+((-0.802846500642-0.0779997009161j))+((-0.771762761813+0.85820645581j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.3757631822-0.29795941079j)*x[0]**o + ((0.361767565917+0.574037987075j))*x[0] + ((0.207256842252+0.873128003563j))*x[1]**o + ((0.172721179363-0.456545377367j))*x[1] + ((-0.352629253395-0.771754075945j))*x[2]**o + ((-0.863749632675+0.91701373707j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.145372411143+0.101373927617j)/(o+1.)+((-0.164630443698+0.517253173389j))+((0.3757631822-0.29795941079j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.455189630705+0.102889951577j)*x[0]**o + ((-0.0751613832819-0.321118545106j))*x[0] + ((-0.291343459287-0.240534601137j))*x[1]**o + ((0.333508127039+0.983959664305j))*x[1] + ((0.620521028609-0.75122229002j))*x[2]**o + ((0.948304295612-0.707252054536j))*x[2]
            ref[(2, 0, 0, 0)]=(0.329177569322-0.991756891158j)/(o+1.)+((0.603325519684-0.0222054676688j))+((0.455189630705+0.102889951577j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.216163916628-0.869171451803j)*x[0]**o + ((-0.563439964553-0.934551903993j))*x[0] + ((-0.155795615364+0.60395322481j))*x[1]**o + ((0.4426674981-0.647953120693j))*x[1] + ((-0.756850728367-0.644077679919j))*x[2]**o + ((-0.920897184102+0.744471230963j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.912646343731-0.040124455109j)/(o+1.)+((-0.520834825277-0.419016896861j))+((0.216163916628-0.869171451803j))*0.5**o
            arg[(2, 0, 0, 2)]=(-0.470756765915+0.511077923763j)*x[0]**o + ((0.359362372271+0.0407739693296j))*x[0] + ((0.889562158729+0.614108329374j))*x[1]**o + ((0.453231098895+0.750712198822j))*x[1] + ((0.121884947423-0.398469914205j))*x[2]**o + ((0.538805725056+0.692470595697j))*x[2]
            ref[(2, 0, 0, 2)]=(1.01144710615+0.21563841517j)/(o+1.)+((0.675699598111+0.741978381924j))+((-0.470756765915+0.511077923763j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.841755668348-0.149071658631j)*x[0]**o + ((0.407064093716+0.580226475346j))*x[0] + ((0.525210792886+0.3578132681j))*x[1]**o + ((-0.364767257651-0.393296333603j))*x[1] + ((0.540476038989+0.149618632185j))*x[2]**o + ((0.210290031335+0.798722219635j))*x[2]
            ref[(2, 0, 1, 0)]=(1.06568683187+0.507431900285j)/(o+1.)+((0.1262934337+0.492826180689j))+((-0.841755668348-0.149071658631j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.0338463105262-0.52404750302j)*x[0]**o + ((-0.436568409176+0.398442658642j))*x[0] + ((-0.0698744099619+0.548203060799j))*x[1]**o + ((0.280592393842+0.377182648591j))*x[1] + ((0.467523020053+0.568451134945j))*x[2]**o + ((0.361665686552-0.374949930286j))*x[2]
            ref[(2, 0, 1, 1)]=(0.397648610092+1.11665419574j)/(o+1.)+((0.102844835609+0.200337688474j))+((0.0338463105262-0.52404750302j))*0.5**o
            arg[(2, 0, 1, 2)]=(0.703329760505-0.250711900224j)*x[0]**o + ((-0.83927485757+0.363103460871j))*x[0] + ((0.708490396819+0.519434693934j))*x[1]**o + ((-0.260041391235-0.208752191272j))*x[1] + ((0.19226915124-0.0837598195585j))*x[2]**o + ((0.0646892725814-0.243052774571j))*x[2]
            ref[(2, 0, 1, 2)]=(0.900759548059+0.435674874376j)/(o+1.)+((-0.517313488112-0.0443507524861j))+((0.703329760505-0.250711900224j))*0.5**o
            arg[(2, 0, 2, 0)]=(0.511971723855+0.449555726062j)*x[0]**o + ((0.015356146196-0.551641344602j))*x[0] + ((-0.637627853967-0.50105939487j))*x[1]**o + ((-0.718111039585-0.377543461566j))*x[1] + ((0.325277534702-0.464453454291j))*x[2]**o + ((0.301381973153+0.681252550857j))*x[2]
            ref[(2, 0, 2, 0)]=(-0.312350319264-0.965512849161j)/(o+1.)+((-0.200686460118-0.123966127655j))+((0.511971723855+0.449555726062j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.318856448838-0.483059527052j)*x[0]**o + ((0.883537491094+0.245646483726j))*x[0] + ((-0.516513556196-0.343071890509j))*x[1]**o + ((0.608727291627+0.56733990959j))*x[1] + ((0.882828430357+0.727852338051j))*x[2]**o + ((0.889863514797+0.706327127273j))*x[2]
            ref[(2, 0, 2, 1)]=(0.366314874161+0.384780447542j)/(o+1.)+((1.19106414876+0.759656760295j))+((0.318856448838-0.483059527052j))*0.5**o
            arg[(2, 0, 2, 2)]=(0.623413038872-0.0873955036517j)*x[0]**o + ((0.640864846455+0.319710978815j))*x[0] + ((-0.630973104836-0.469198995396j))*x[1]**o + ((-0.663617855188-0.292261778629j))*x[1] + ((-0.191048187789-0.546938241966j))*x[2]**o + ((-0.297648758746+0.787928646536j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.822021292625-1.01613723736j)/(o+1.)+((-0.160200883739+0.407688923361j))+((0.623413038872-0.0873955036517j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.873514200014+0.711421318195j)*x[0]**o + ((-0.175160991281+0.0296988078898j))*x[0] + ((-0.398487578529-0.428142503109j))*x[1]**o + ((0.927308299634+0.0161256185309j))*x[1] + ((0.239422609601+0.0738028387912j))*x[2]**o + ((-0.695994308914+0.490399822797j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.159064968928-0.354339664318j)/(o+1.)+((0.0280764997195+0.268112124609j))+((-0.873514200014+0.711421318195j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.116684519971-0.962808126043j)*x[0]**o + ((0.350873966168-0.248816239593j))*x[0] + ((-0.220084606283+0.60399859062j))*x[1]**o + ((-0.218554545419+0.77422321682j))*x[1] + ((-0.515423400165-0.104912337959j))*x[2]**o + ((-0.979870439448+0.974843788861j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.735508006448+0.49908625266j)/(o+1.)+((-0.42377550935+0.750125383044j))+((-0.116684519971-0.962808126043j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.286769825476+0.787550592677j)*x[0]**o + ((-0.79045282541+0.0254103138442j))*x[0] + ((0.564215039845-0.830698354574j))*x[1]**o + ((0.537586876746+0.313135485727j))*x[1] + ((0.469777799733+0.779062525352j))*x[2]**o + ((-0.643133175999-0.727900264384j))*x[2]
            ref[(2, 1, 0, 2)]=(1.03399283958-0.051635829222j)/(o+1.)+((-0.447999562332-0.194677232406j))+((-0.286769825476+0.787550592677j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.0137344072662+0.200364239565j)*x[0]**o + ((-0.0695765338748+0.937529742247j))*x[0] + ((-0.270934326975-0.921155504537j))*x[1]**o + ((0.756342338849+0.653151066743j))*x[1] + ((0.812978645109-0.202705703425j))*x[2]**o + ((0.47137800908-0.778573077613j))*x[2]
            ref[(2, 1, 1, 0)]=(0.542044318134-1.12386120796j)/(o+1.)+((0.579071907027+0.406053865688j))+((0.0137344072662+0.200364239565j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.00283482508463+0.0563606431558j)*x[0]**o + ((0.409041882953-0.823647649372j))*x[0] + ((0.253338002837+0.20224444703j))*x[1]**o + ((-0.36113351404-0.812155038289j))*x[1] + ((0.414579337454-0.145675506046j))*x[2]**o + ((0.335834985162+0.930744445912j))*x[2]
            ref[(2, 1, 1, 1)]=(0.667917340291+0.0565689409838j)/(o+1.)+((0.191871677038-0.352529120875j))+((-0.00283482508463+0.0563606431558j))*0.5**o
            arg[(2, 1, 1, 2)]=(-0.650860727737-0.522048180038j)*x[0]**o + ((0.996122081449+0.556720497881j))*x[0] + ((0.158672662014-0.0901296882084j))*x[1]**o + ((-0.702932589864+0.532074696999j))*x[1] + ((-0.948255970145+0.690667402827j))*x[2]**o + ((0.60394093173-0.399936887416j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.789583308131+0.600537714619j)/(o+1.)+((0.448565211657+0.344429153732j))+((-0.650860727737-0.522048180038j))*0.5**o
            arg[(2, 1, 2, 0)]=(0.712491012468-0.212680897454j)*x[0]**o + ((0.296050973508+0.0277383108435j))*x[0] + ((-0.384956308778+0.288794493001j))*x[1]**o + ((0.182634440004+0.130346598341j))*x[1] + ((-0.194363905365-0.217720486278j))*x[2]**o + ((0.863411882484+0.199204925981j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.579320214143+0.0710740067232j)/(o+1.)+((0.671048647998+0.178644917583j))+((0.712491012468-0.212680897454j))*0.5**o
            arg[(2, 1, 2, 1)]=(0.400250900919+0.0756047004672j)*x[0]**o + ((-0.434608497404-0.261562437313j))*x[0] + ((-0.0987088179551-0.530273344382j))*x[1]**o + ((-0.547175924954-0.186999434737j))*x[1] + ((0.579604236197-0.218130250957j))*x[2]**o + ((0.932465267861+0.113343434893j))*x[2]
            ref[(2, 1, 2, 1)]=(0.480895418242-0.748403595339j)/(o+1.)+((-0.0246595772484-0.167609218578j))+((0.400250900919+0.0756047004672j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.655989131941-0.246711545018j)*x[0]**o + ((-0.380504935862-0.242237338731j))*x[0] + ((0.091459096369-0.818648118111j))*x[1]**o + ((0.754956766365+0.827036981033j))*x[1] + ((-0.698604826462-0.405004727182j))*x[2]**o + ((0.0120743393582-0.75740479904j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.607145730093-1.22365284529j)/(o+1.)+((0.193263084931-0.0863025783691j))+((0.655989131941-0.246711545018j))*0.5**o
            arg[(3, 0, 0, 0)]=(0.478519398209-0.500965272066j)*x[0]**o + ((-0.269673474812-0.771275156377j))*x[0] + ((-0.801431052836-0.47668480303j))*x[1]**o + ((0.759832671502+0.103678416219j))*x[1] + ((-0.854126071137+0.445602394223j))*x[2]**o + ((-0.0358158916927-0.680795903577j))*x[2]
            ref[(3, 0, 0, 0)]=(-1.65555712397-0.031082408807j)/(o+1.)+((0.227171652499-0.674196321868j))+((0.478519398209-0.500965272066j))*0.5**o
            arg[(3, 0, 0, 1)]=(-0.488630100242-0.469467518023j)*x[0]**o + ((-0.844816520674+0.925222840346j))*x[0] + ((-0.0685184861003+0.51418993395j))*x[1]**o + ((0.802428217293-0.470162782337j))*x[1] + ((-0.34429336958+0.105536860946j))*x[2]**o + ((0.923450925181+0.876124092456j))*x[2]
            ref[(3, 0, 0, 1)]=(-0.41281185568+0.619726794897j)/(o+1.)+((0.4405313109+0.665592075233j))+((-0.488630100242-0.469467518023j))*0.5**o
            arg[(3, 0, 0, 2)]=(-0.931422027992+0.97216154815j)*x[0]**o + ((0.6402263166+0.597804318805j))*x[0] + ((-0.182095531378-0.868222750325j))*x[1]**o + ((0.110715867088+0.718390895434j))*x[1] + ((0.0158304407276+0.748308131117j))*x[2]**o + ((0.219995129401+0.483914965239j))*x[2]
            ref[(3, 0, 0, 2)]=(-0.166265090651-0.119914619208j)/(o+1.)+((0.485468656545+0.900055089739j))+((-0.931422027992+0.97216154815j))*0.5**o
            arg[(3, 0, 1, 0)]=(0.162398666649+0.41707214972j)*x[0]**o + ((-0.309132818671+0.148856822725j))*x[0] + ((-0.259911547426+0.45762160692j))*x[1]**o + ((0.0906818309619-0.295071548713j))*x[1] + ((0.584537197306-0.568677377187j))*x[2]**o + ((0.508094317559+0.825448805916j))*x[2]
            ref[(3, 0, 1, 0)]=(0.32462564988-0.111055770267j)/(o+1.)+((0.144821664925+0.339617039964j))+((0.162398666649+0.41707214972j))*0.5**o
            arg[(3, 0, 1, 1)]=(-0.240117954309+0.185548430126j)*x[0]**o + ((0.44066492863+0.503485329374j))*x[0] + ((-0.166326090336-0.0559642773611j))*x[1]**o + ((-0.821492852979-0.753716918786j))*x[1] + ((-0.465983612877+0.271649810071j))*x[2]**o + ((0.446395312056+0.955845141556j))*x[2]
            ref[(3, 0, 1, 1)]=(-0.632309703213+0.21568553271j)/(o+1.)+((0.0327836938536+0.352806776073j))+((-0.240117954309+0.185548430126j))*0.5**o
            arg[(3, 0, 1, 2)]=(-0.766939083523+0.818982019495j)*x[0]**o + ((0.00458298444469-0.425307403909j))*x[0] + ((-0.15859160318-0.768680251909j))*x[1]**o + ((-0.0462644926259-0.173040647479j))*x[1] + ((-0.173219137696-0.427377214724j))*x[2]**o + ((0.737466623805-0.865307946542j))*x[2]
            ref[(3, 0, 1, 2)]=(-0.331810740875-1.19605746663j)/(o+1.)+((0.347892557812-0.731827998965j))+((-0.766939083523+0.818982019495j))*0.5**o
            arg[(3, 0, 2, 0)]=(-0.463400278664-0.942428382052j)*x[0]**o + ((0.629476810193-0.648639882218j))*x[0] + ((0.264664510101-0.835903185494j))*x[1]**o + ((0.9077701242-0.395671421977j))*x[1] + ((-0.0379738468624+0.125299007655j))*x[2]**o + ((0.407637373099+0.824503798125j))*x[2]
            ref[(3, 0, 2, 0)]=(0.226690663239-0.710604177839j)/(o+1.)+((0.972442153746-0.109903753035j))+((-0.463400278664-0.942428382052j))*0.5**o
            arg[(3, 0, 2, 1)]=(-0.246435559004+0.60525636832j)*x[0]**o + ((-0.619806627239-0.546067045114j))*x[0] + ((0.562774525338+0.268952440261j))*x[1]**o + ((0.0786577373439+0.267669313375j))*x[1] + ((-0.299162000569+0.538298430952j))*x[2]**o + ((0.442188994498+0.724836296555j))*x[2]
            ref[(3, 0, 2, 1)]=(0.263612524769+0.807250871213j)/(o+1.)+((-0.0494799476987+0.223219282408j))+((-0.246435559004+0.60525636832j))*0.5**o
            arg[(3, 0, 2, 2)]=(0.137282832993-0.446901079088j)*x[0]**o + ((-0.666455531904+0.759603066784j))*x[0] + ((-0.618160911414+0.933101421595j))*x[1]**o + ((0.329974255811+0.2417633728j))*x[1] + ((-0.545648886939+0.11072946307j))*x[2]**o + ((0.56388412661-0.740838380368j))*x[2]
            ref[(3, 0, 2, 2)]=(-1.16380979835+1.04383088466j)/(o+1.)+((0.113701425259+0.130264029608j))+((0.137282832993-0.446901079088j))*0.5**o
            arg[(3, 1, 0, 0)]=(-0.274793439798-0.924700185945j)*x[0]**o + ((0.371802431719+0.621735531607j))*x[0] + ((-0.332205459721-0.532865669368j))*x[1]**o + ((-0.771605037016-0.919191473171j))*x[1] + ((-0.109192381565+0.397073308059j))*x[2]**o + ((-0.234139006057-0.560552074144j))*x[2]
            ref[(3, 1, 0, 0)]=(-0.441397841286-0.135792361309j)/(o+1.)+((-0.316970805677-0.429004007854j))+((-0.274793439798-0.924700185945j))*0.5**o
            arg[(3, 1, 0, 1)]=(-0.829070028724-0.565767531123j)*x[0]**o + ((-0.208815801832-0.82116143923j))*x[0] + ((-0.0853893450888+0.900216398689j))*x[1]**o + ((0.278765102479-0.871360952378j))*x[1] + ((0.457633677518+0.0447259945177j))*x[2]**o + ((-0.218820984726+0.933549337519j))*x[2]
            ref[(3, 1, 0, 1)]=(0.372244332429+0.944942393207j)/(o+1.)+((-0.0744358420396-0.379486527045j))+((-0.829070028724-0.565767531123j))*0.5**o
            arg[(3, 1, 0, 2)]=(-0.611819736342+0.92403745596j)*x[0]**o + ((0.03185616809-0.554361422656j))*x[0] + ((0.268400387503+0.704578699992j))*x[1]**o + ((-0.335997156047-0.695250221131j))*x[1] + ((0.285911327219-0.754828007356j))*x[2]**o + ((0.409997375012+0.979027958796j))*x[2]
            ref[(3, 1, 0, 2)]=(0.554311714721-0.0502493073641j)/(o+1.)+((0.0529281935275-0.135291842496j))+((-0.611819736342+0.92403745596j))*0.5**o
            arg[(3, 1, 1, 0)]=(0.724753341457+0.137498534969j)*x[0]**o + ((0.559580213634+0.287647629912j))*x[0] + ((0.918929458162-0.806883153629j))*x[1]**o + ((0.300981128669+0.893295314325j))*x[1] + ((-0.125716114412+0.996013811719j))*x[2]**o + ((-0.943729253502-0.643845238216j))*x[2]
            ref[(3, 1, 1, 0)]=(0.79321334375+0.18913065809j)/(o+1.)+((-0.0415839555996+0.26854885301j))+((0.724753341457+0.137498534969j))*0.5**o
            arg[(3, 1, 1, 1)]=(0.278997340402-0.617132260001j)*x[0]**o + ((0.382495536258-0.610181855313j))*x[0] + ((-0.165964749869-0.0942706051193j))*x[1]**o + ((-0.130130215419+0.136002961771j))*x[1] + ((0.286488181414-0.0112632382622j))*x[2]**o + ((-0.250085825122+0.675755488183j))*x[2]
            ref[(3, 1, 1, 1)]=(0.120523431545-0.105533843382j)/(o+1.)+((0.00113974785866+0.100788297321j))+((0.278997340402-0.617132260001j))*0.5**o
            arg[(3, 1, 1, 2)]=(-0.585351301+0.503368061581j)*x[0]**o + ((0.376328675543-0.102117080382j))*x[0] + ((0.273116994567+0.573073648705j))*x[1]**o + ((0.383270237954+0.481665014147j))*x[1] + ((-0.397433580835+0.994544579543j))*x[2]**o + ((0.134042389837+0.220590332077j))*x[2]
            ref[(3, 1, 1, 2)]=(-0.124316586268+1.56761822825j)/(o+1.)+((0.446820651667+0.300069132921j))+((-0.585351301+0.503368061581j))*0.5**o
            arg[(3, 1, 2, 0)]=(0.624274507344-0.332237406906j)*x[0]**o + ((0.409327945774+0.386804857751j))*x[0] + ((0.317688106+0.050051248246j))*x[1]**o + ((-0.323027742158-0.0396571176356j))*x[1] + ((0.515496519023+0.353272996336j))*x[2]**o + ((0.548016544061+0.927841870224j))*x[2]
            ref[(3, 1, 2, 0)]=(0.833184625022+0.403324244582j)/(o+1.)+((0.317158373838+0.637494805169j))+((0.624274507344-0.332237406906j))*0.5**o
            arg[(3, 1, 2, 1)]=(-0.346431678152-0.647004814978j)*x[0]**o + ((-0.454153732123-0.630437065573j))*x[0] + ((0.458495711831+0.26538629568j))*x[1]**o + ((0.101323316391+0.0450455660791j))*x[1] + ((0.822713763382-0.579475733043j))*x[2]**o + ((-0.666907510311+0.210392492944j))*x[2]
            ref[(3, 1, 2, 1)]=(1.28120947521-0.314089437364j)/(o+1.)+((-0.509868963021-0.187499503275j))+((-0.346431678152-0.647004814978j))*0.5**o
            arg[(3, 1, 2, 2)]=(0.978630488516+0.66356313323j)*x[0]**o + ((-0.161107171238+0.045399084752j))*x[0] + ((0.667720273861+0.0665519413895j))*x[1]**o + ((-0.222304430922-0.859391522473j))*x[1] + ((-0.773905977675-0.493879115228j))*x[2]**o + ((0.220205781619+0.848358674655j))*x[2]
            ref[(3, 1, 2, 2)]=(-0.106185703814-0.427327173838j)/(o+1.)+((-0.0816029102706+0.017183118467j))+((0.978630488516+0.66356313323j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.189149385732-0.153565083252j)*x[0]**o + ((0.689409927468-0.81502628237j))*x[0] + ((0.242752387574-0.732669724286j))*x[1]**o + ((-0.212858378573-0.961837930425j))*x[1]
            ref=(0.242752387574-0.732669724286j)/(o+1.)+((0.238275774447-0.888432106398j))+((-0.189149385732-0.153565083252j))*0.5**o
        else:
            arg=(-0.915650372869+0.139920233242j)*x[0]**o + ((-0.178909756149+0.729558519868j))*x[0] + ((-0.404959738552+0.651752911103j))*x[1]**o + ((-0.964997386406-0.814246346887j))*x[1] + ((-0.317934390733+0.813841390617j))*x[2]**o + ((0.86962709767+0.919913770259j))*x[2]
            ref=(-0.722894129285+1.46559430172j)/(o+1.)+((-0.137140022442+0.41761297162j))+((-0.915650372869+0.139920233242j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.666208291392-0.458045280196j)*x[0]**o + ((-0.343211697071-0.0213707015595j))*x[0] + ((-0.0454887482286-0.83759866317j))*x[1]**o + ((0.320762433696-0.854361067492j))*x[1]
            ref[(0,)]=(-0.0454887482286-0.83759866317j)/(o+1.)+((-0.0112246316876-0.437865884526j))+((-0.666208291392-0.458045280196j))*0.5**o
            arg[(1,)]=(0.784965900571+0.671060768682j)*x[0]**o + ((0.531684293192+0.819396292749j))*x[0] + ((0.00746052441151-0.654531879781j))*x[1]**o + ((-0.609720046391-0.414440161168j))*x[1]
            ref[(1,)]=(0.00746052441151-0.654531879781j)/(o+1.)+((-0.0390178765993+0.202478065791j))+((0.784965900571+0.671060768682j))*0.5**o
        else:
            arg[(0,)]=(-0.573756714876+0.0243831982248j)*x[0]**o + ((-0.595640696232-0.194236952886j))*x[0] + ((-0.745476177427+0.455719861812j))*x[1]**o + ((-0.0834581006932+0.966848086529j))*x[1] + ((0.2584076429-0.259363339561j))*x[2]**o + ((-0.414996510388+0.976188137385j))*x[2]
            ref[(0,)]=(-0.487068534527+0.196356522251j)/(o+1.)+((-0.547047653657+0.874399635514j))+((-0.573756714876+0.0243831982248j))*0.5**o
            arg[(1,)]=(-0.0201261966538-0.0989256163701j)*x[0]**o + ((0.230622275965-0.134120140355j))*x[0] + ((-0.805822898951-0.604360811717j))*x[1]**o + ((-0.105127655439-0.244703584532j))*x[1] + ((-0.23317921066-0.105708953503j))*x[2]**o + ((0.471255366324-0.918359878043j))*x[2]
            ref[(1,)]=(-1.03900210961-0.71006976522j)/(o+1.)+((0.298374993425-0.648591801465j))+((-0.0201261966538-0.0989256163701j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.414180404475-0.611884935822j)*x[0]**o + ((-0.363705313848-0.681349689134j))*x[0] + ((0.430143910086-0.713076205061j))*x[1]**o + ((0.741282623493-0.778580880416j))*x[1]
            ref[(0, 0)]=(0.430143910086-0.713076205061j)/(o+1.)+((0.188788654822-0.729965284775j))+((0.414180404475-0.611884935822j))*0.5**o
            arg[(0, 1)]=(-0.36122319994-0.929211208396j)*x[0]**o + ((0.216600838585-0.756163589628j))*x[0] + ((-0.148755817321-0.443010396856j))*x[1]**o + ((0.479202794943+0.897646141892j))*x[1]
            ref[(0, 1)]=(-0.148755817321-0.443010396856j)/(o+1.)+((0.347901816764+0.0707412761321j))+((-0.36122319994-0.929211208396j))*0.5**o
            arg[(1, 0)]=(0.019408259117-0.782073588127j)*x[0]**o + ((0.9752650936-0.671214014847j))*x[0] + ((-0.697708485162-0.349219765061j))*x[1]**o + ((0.866463104485-0.473978901506j))*x[1]
            ref[(1, 0)]=(-0.697708485162-0.349219765061j)/(o+1.)+((0.920864099043-0.572596458176j))+((0.019408259117-0.782073588127j))*0.5**o
            arg[(1, 1)]=(-0.809920406328-0.625008460052j)*x[0]**o + ((-0.78989012157-0.568011764448j))*x[0] + ((-0.48294655421+0.887425411885j))*x[1]**o + ((0.90234243379+0.588281325869j))*x[1]
            ref[(1, 1)]=(-0.48294655421+0.887425411885j)/(o+1.)+((0.0562261561097+0.0101347807103j))+((-0.809920406328-0.625008460052j))*0.5**o
        else:
            arg[(0, 0)]=(0.983944487956-0.674623324958j)*x[0]**o + ((0.0851567691347-0.890760016598j))*x[0] + ((0.182262609663+0.040762530934j))*x[1]**o + ((0.805126426897-0.332260679022j))*x[1] + ((0.408549857148+0.085394516498j))*x[2]**o + ((0.199720879543+0.343789134588j))*x[2]
            ref[(0, 0)]=(0.590812466811+0.126157047432j)/(o+1.)+((0.545002037787-0.439615780516j))+((0.983944487956-0.674623324958j))*0.5**o
            arg[(0, 1)]=(-0.79956509786-0.219795368978j)*x[0]**o + ((0.468656175578-0.568772726715j))*x[0] + ((-0.897695811879-0.749479413416j))*x[1]**o + ((0.934466804811+0.499729497489j))*x[1] + ((-0.24658575371+0.894945540565j))*x[2]**o + ((0.63302517193-0.54196468053j))*x[2]
            ref[(0, 1)]=(-1.14428156559+0.145466127149j)/(o+1.)+((1.01807407616-0.305503954878j))+((-0.79956509786-0.219795368978j))*0.5**o
            arg[(1, 0)]=(0.652797619915-0.284107935922j)*x[0]**o + ((0.164952723567-0.908377702432j))*x[0] + ((-0.840091129824-0.337440383229j))*x[1]**o + ((0.664923048383+0.696252294226j))*x[1] + ((0.778232615755+0.190616430062j))*x[2]**o + ((-0.00983896897497+0.102537423161j))*x[2]
            ref[(1, 0)]=(-0.0618585140689-0.146823953168j)/(o+1.)+((0.410018401487-0.0547939925228j))+((0.652797619915-0.284107935922j))*0.5**o
            arg[(1, 1)]=(-0.413999100763+0.539179354738j)*x[0]**o + ((0.0188534158068+0.818206106039j))*x[0] + ((-0.864687679959+0.329232723083j))*x[1]**o + ((0.684025030422+0.276071499293j))*x[1] + ((0.362093296968-0.399126693779j))*x[2]**o + ((-0.616997774227-0.0918582161277j))*x[2]
            ref[(1, 1)]=(-0.502594382991-0.0698939706956j)/(o+1.)+((0.0429403360007+0.501209694602j))+((-0.413999100763+0.539179354738j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2),w)
        ref=numpy.zeros((4, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.0116809036069+0.201687351832j)*x[0]**o + ((0.768615955789+0.958364240967j))*x[0] + ((-0.570381511518-0.120675301003j))*x[1]**o + ((0.585170377913-0.652580469183j))*x[1]
            ref[(0, 0, 0)]=(-0.570381511518-0.120675301003j)/(o+1.)+((0.676893166851+0.152891885892j))+((-0.0116809036069+0.201687351832j))*0.5**o
            arg[(0, 0, 1)]=(0.851473753958+0.523453849859j)*x[0]**o + ((-0.767404468794-0.87971174928j))*x[0] + ((-0.578006157079+0.477901224219j))*x[1]**o + ((0.684115724856-0.698961663802j))*x[1]
            ref[(0, 0, 1)]=(-0.578006157079+0.477901224219j)/(o+1.)+((-0.0416443719691-0.789336706541j))+((0.851473753958+0.523453849859j))*0.5**o
            arg[(0, 1, 0)]=(0.974451280885+0.255283403131j)*x[0]**o + ((0.979289235044+0.220632973291j))*x[0] + ((-0.611571624962+0.660111424097j))*x[1]**o + ((0.430201904171+0.943431221839j))*x[1]
            ref[(0, 1, 0)]=(-0.611571624962+0.660111424097j)/(o+1.)+((0.704745569608+0.582032097565j))+((0.974451280885+0.255283403131j))*0.5**o
            arg[(0, 1, 1)]=(-0.012913888374-0.270955490469j)*x[0]**o + ((-0.100359948314-0.0244531851513j))*x[0] + ((-0.401858831074-0.860062965774j))*x[1]**o + ((-0.211956190647-0.707636365247j))*x[1]
            ref[(0, 1, 1)]=(-0.401858831074-0.860062965774j)/(o+1.)+((-0.156158069481-0.366044775199j))+((-0.012913888374-0.270955490469j))*0.5**o
            arg[(0, 2, 0)]=(-0.441454516187-0.502281497293j)*x[0]**o + ((0.232065351052+0.383363717259j))*x[0] + ((-0.681915208597+0.723692118544j))*x[1]**o + ((-0.112589994203-0.0413833846062j))*x[1]
            ref[(0, 2, 0)]=(-0.681915208597+0.723692118544j)/(o+1.)+((0.0597376784247+0.170990166327j))+((-0.441454516187-0.502281497293j))*0.5**o
            arg[(0, 2, 1)]=(0.704414479359-0.00557908609613j)*x[0]**o + ((0.391517366999-0.973571637749j))*x[0] + ((-0.464873988339-0.741829628429j))*x[1]**o + ((0.39547937898+0.61258913357j))*x[1]
            ref[(0, 2, 1)]=(-0.464873988339-0.741829628429j)/(o+1.)+((0.39349837299-0.180491252089j))+((0.704414479359-0.00557908609613j))*0.5**o
            arg[(1, 0, 0)]=(0.619861909126-0.222017201205j)*x[0]**o + ((0.245210858865+0.882604639203j))*x[0] + ((-0.0942593357642+0.542717763669j))*x[1]**o + ((0.408514804686-0.738738051702j))*x[1]
            ref[(1, 0, 0)]=(-0.0942593357642+0.542717763669j)/(o+1.)+((0.326862831775+0.0719332937504j))+((0.619861909126-0.222017201205j))*0.5**o
            arg[(1, 0, 1)]=(0.404126634292+0.819918236025j)*x[0]**o + ((-0.00973481337984-0.516949564184j))*x[0] + ((-0.343073336991+0.448738468959j))*x[1]**o + ((0.219878091928-0.0736216909695j))*x[1]
            ref[(1, 0, 1)]=(-0.343073336991+0.448738468959j)/(o+1.)+((0.105071639274-0.295285627577j))+((0.404126634292+0.819918236025j))*0.5**o
            arg[(1, 1, 0)]=(-0.507742290016-0.280914805741j)*x[0]**o + ((-0.731045982185+0.676650034137j))*x[0] + ((-0.525278111514-0.930545438798j))*x[1]**o + ((-0.395621027245-0.214807640448j))*x[1]
            ref[(1, 1, 0)]=(-0.525278111514-0.930545438798j)/(o+1.)+((-0.563333504715+0.230921196844j))+((-0.507742290016-0.280914805741j))*0.5**o
            arg[(1, 1, 1)]=(-0.235000462628+0.327081224816j)*x[0]**o + ((-0.341205512202-0.281782977061j))*x[0] + ((-0.670387875744-0.369796074119j))*x[1]**o + ((-0.893997904509+0.605563547j))*x[1]
            ref[(1, 1, 1)]=(-0.670387875744-0.369796074119j)/(o+1.)+((-0.617601708355+0.16189028497j))+((-0.235000462628+0.327081224816j))*0.5**o
            arg[(1, 2, 0)]=(-0.964492052403-0.195091478002j)*x[0]**o + ((0.993265929002+0.525891623431j))*x[0] + ((-0.419338764426+0.63804195022j))*x[1]**o + ((0.794020630477-0.948193930702j))*x[1]
            ref[(1, 2, 0)]=(-0.419338764426+0.63804195022j)/(o+1.)+((0.89364327974-0.211151153635j))+((-0.964492052403-0.195091478002j))*0.5**o
            arg[(1, 2, 1)]=(-0.470437233019+0.147286891507j)*x[0]**o + ((-0.173988709884-0.449903559836j))*x[0] + ((0.435547202126-0.559353676427j))*x[1]**o + ((-0.191578425328+0.565540455473j))*x[1]
            ref[(1, 2, 1)]=(0.435547202126-0.559353676427j)/(o+1.)+((-0.182783567606+0.0578184478185j))+((-0.470437233019+0.147286891507j))*0.5**o
            arg[(2, 0, 0)]=(-0.480825398135+0.71128905697j)*x[0]**o + ((0.939827906981-0.871091876358j))*x[0] + ((0.33291793897-0.791180935836j))*x[1]**o + ((-0.981181431992-0.770528315237j))*x[1]
            ref[(2, 0, 0)]=(0.33291793897-0.791180935836j)/(o+1.)+((-0.0206767625054-0.820810095797j))+((-0.480825398135+0.71128905697j))*0.5**o
            arg[(2, 0, 1)]=(0.618629341799+0.885718207742j)*x[0]**o + ((-0.480656248029+0.802104731112j))*x[0] + ((0.0606989409651+0.0672087830253j))*x[1]**o + ((-0.554206450277-0.907422911797j))*x[1]
            ref[(2, 0, 1)]=(0.0606989409651+0.0672087830253j)/(o+1.)+((-0.517431349153-0.0526590903422j))+((0.618629341799+0.885718207742j))*0.5**o
            arg[(2, 1, 0)]=(-0.819728500107+0.915878294861j)*x[0]**o + ((0.297331834696+0.493104689838j))*x[0] + ((-0.979069053483+0.871793045074j))*x[1]**o + ((-0.213023244815-0.63669526468j))*x[1]
            ref[(2, 1, 0)]=(-0.979069053483+0.871793045074j)/(o+1.)+((0.0421542949405-0.0717952874212j))+((-0.819728500107+0.915878294861j))*0.5**o
            arg[(2, 1, 1)]=(0.390190739649+0.294556066736j)*x[0]**o + ((-0.722527415754+0.576641468542j))*x[0] + ((-0.445652095962-0.432841580994j))*x[1]**o + ((-0.708035755782+0.938221541381j))*x[1]
            ref[(2, 1, 1)]=(-0.445652095962-0.432841580994j)/(o+1.)+((-0.715281585768+0.757431504961j))+((0.390190739649+0.294556066736j))*0.5**o
            arg[(2, 2, 0)]=(0.600756778148+0.860441514228j)*x[0]**o + ((-0.1831353967-0.461614661361j))*x[0] + ((0.346010738582-0.218869780052j))*x[1]**o + ((0.209807836026+0.379105587141j))*x[1]
            ref[(2, 2, 0)]=(0.346010738582-0.218869780052j)/(o+1.)+((0.0133362196631-0.04125453711j))+((0.600756778148+0.860441514228j))*0.5**o
            arg[(2, 2, 1)]=(0.724181200952+0.588898608742j)*x[0]**o + ((-0.941902276498-0.325691471858j))*x[0] + ((0.619816819036-0.390029609293j))*x[1]**o + ((0.737527671712-0.575897561652j))*x[1]
            ref[(2, 2, 1)]=(0.619816819036-0.390029609293j)/(o+1.)+((-0.102187302393-0.450794516755j))+((0.724181200952+0.588898608742j))*0.5**o
            arg[(3, 0, 0)]=(-0.444744052441-0.191854298384j)*x[0]**o + ((-0.41659333915-0.732920067639j))*x[0] + ((-0.565952822037+0.733970283294j))*x[1]**o + ((-0.132009652663-0.359366258008j))*x[1]
            ref[(3, 0, 0)]=(-0.565952822037+0.733970283294j)/(o+1.)+((-0.274301495907-0.546143162824j))+((-0.444744052441-0.191854298384j))*0.5**o
            arg[(3, 0, 1)]=(0.468060615847-0.520480052373j)*x[0]**o + ((0.0549845438079+0.304419406017j))*x[0] + ((-0.754035903243-0.479217875642j))*x[1]**o + ((0.47629384286+0.980579170442j))*x[1]
            ref[(3, 0, 1)]=(-0.754035903243-0.479217875642j)/(o+1.)+((0.265639193334+0.64249928823j))+((0.468060615847-0.520480052373j))*0.5**o
            arg[(3, 1, 0)]=(0.799633720066+0.919920224658j)*x[0]**o + ((0.252309338797-0.959408004742j))*x[0] + ((-0.913248685864-0.97306468041j))*x[1]**o + ((0.930349413995-0.00302127180743j))*x[1]
            ref[(3, 1, 0)]=(-0.913248685864-0.97306468041j)/(o+1.)+((0.591329376396-0.481214638275j))+((0.799633720066+0.919920224658j))*0.5**o
            arg[(3, 1, 1)]=(-0.592067553047-0.680657735278j)*x[0]**o + ((0.917617139686-0.775932998522j))*x[0] + ((-0.582277089788+0.306780491846j))*x[1]**o + ((-0.430800426547+0.573698465203j))*x[1]
            ref[(3, 1, 1)]=(-0.582277089788+0.306780491846j)/(o+1.)+((0.24340835657-0.101117266659j))+((-0.592067553047-0.680657735278j))*0.5**o
            arg[(3, 2, 0)]=(-0.00267080340249+0.216936264508j)*x[0]**o + ((-0.907589727008+0.568874957955j))*x[0] + ((-0.354731284964+0.201299071631j))*x[1]**o + ((-0.970262302327-0.48667616538j))*x[1]
            ref[(3, 2, 0)]=(-0.354731284964+0.201299071631j)/(o+1.)+((-0.938926014668+0.0410993962877j))+((-0.00267080340249+0.216936264508j))*0.5**o
            arg[(3, 2, 1)]=(-0.495342423166+0.222207419313j)*x[0]**o + ((0.465049603702-0.913488314592j))*x[0] + ((-0.269689821948-0.816431769486j))*x[1]**o + ((0.57672448402+0.645762638278j))*x[1]
            ref[(3, 2, 1)]=(-0.269689821948-0.816431769486j)/(o+1.)+((0.520887043861-0.133862838157j))+((-0.495342423166+0.222207419313j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.925729536967-0.0734842128825j)*x[0]**o + ((0.851728083409-0.514316238115j))*x[0] + ((-0.360849986184+0.0775207324507j))*x[1]**o + ((0.618416052068-0.512925867965j))*x[1] + ((-0.731138460244+0.0849571503993j))*x[2]**o + ((-0.91496549842-0.0624056156387j))*x[2]
            ref[(0, 0, 0)]=(-1.09198844643+0.16247788285j)/(o+1.)+((0.277589318529-0.544823860859j))+((-0.925729536967-0.0734842128825j))*0.5**o
            arg[(0, 0, 1)]=(0.0581338166007-0.537006608997j)*x[0]**o + ((-0.962347886945-0.553856922272j))*x[0] + ((-0.231528567676-0.124790727645j))*x[1]**o + ((-0.537049342007-0.45449134609j))*x[1] + ((0.289070271609-0.558576754093j))*x[2]**o + ((0.0938706178377-0.673479578379j))*x[2]
            ref[(0, 0, 1)]=(0.0575417039333-0.683367481738j)/(o+1.)+((-0.702763305557-0.840913923371j))+((0.0581338166007-0.537006608997j))*0.5**o
            arg[(0, 1, 0)]=(-0.73927794832+0.716125588428j)*x[0]**o + ((-0.615442556187+0.404327591974j))*x[0] + ((-0.351334990217-0.572363178909j))*x[1]**o + ((-0.29398995266+0.422652361266j))*x[1] + ((-0.84540374194+0.463431227495j))*x[2]**o + ((0.179193411235-0.672887728159j))*x[2]
            ref[(0, 1, 0)]=(-1.19673873216-0.108931951415j)/(o+1.)+((-0.365119548806+0.0770461125403j))+((-0.73927794832+0.716125588428j))*0.5**o
            arg[(0, 1, 1)]=(0.0671329567212+0.126080410633j)*x[0]**o + ((0.036559090747-0.735641368446j))*x[0] + ((-0.143045521756-0.273517548785j))*x[1]**o + ((-0.0822065642892+0.518524300389j))*x[1] + ((0.956815714304+0.522775226988j))*x[2]**o + ((0.281035272703-0.0558833430124j))*x[2]
            ref[(0, 1, 1)]=(0.813770192548+0.249257678203j)/(o+1.)+((0.11769389958-0.136500205535j))+((0.0671329567212+0.126080410633j))*0.5**o
            arg[(0, 2, 0)]=(0.429302066994+0.804732862103j)*x[0]**o + ((-0.411667759566-0.0785910178707j))*x[0] + ((-0.354710607262-0.0708419896689j))*x[1]**o + ((0.990638482326-0.699071936267j))*x[1] + ((-0.557373766808-0.0714963511079j))*x[2]**o + ((0.96062874549-0.275459374803j))*x[2]
            ref[(0, 2, 0)]=(-0.91208437407-0.142338340777j)/(o+1.)+((0.769799734125-0.526561164471j))+((0.429302066994+0.804732862103j))*0.5**o
            arg[(0, 2, 1)]=(0.554488395433-0.345417412261j)*x[0]**o + ((-0.332868214178-0.0324720636365j))*x[0] + ((0.460207056601-0.461783795709j))*x[1]**o + ((-0.0652290598529-0.633306029117j))*x[1] + ((0.217668062121+0.894326155801j))*x[2]**o + ((-0.574786837133+0.395003541858j))*x[2]
            ref[(0, 2, 1)]=(0.677875118722+0.432542360092j)/(o+1.)+((-0.486442055582-0.135387275448j))+((0.554488395433-0.345417412261j))*0.5**o
            arg[(1, 0, 0)]=(0.0249729877486+0.789852607192j)*x[0]**o + ((0.577801616975-0.122805899278j))*x[0] + ((-0.220950733669-0.662860144282j))*x[1]**o + ((0.411788408833+0.650692256233j))*x[1] + ((-0.765402476037+0.246229860368j))*x[2]**o + ((-0.0468372689276-0.109123096651j))*x[2]
            ref[(1, 0, 0)]=(-0.986353209706-0.416630283914j)/(o+1.)+((0.47137637844+0.209381630152j))+((0.0249729877486+0.789852607192j))*0.5**o
            arg[(1, 0, 1)]=(-0.983374197771+0.273525878376j)*x[0]**o + ((0.571528807361+0.594170922859j))*x[0] + ((-0.997228572366-0.394932333036j))*x[1]**o + ((-0.102978257591+0.190239748979j))*x[1] + ((0.547735234646+0.972959743167j))*x[2]**o + ((-0.334382881178-0.318801698226j))*x[2]
            ref[(1, 0, 1)]=(-0.44949333772+0.578027410131j)/(o+1.)+((0.0670838342959+0.232804486806j))+((-0.983374197771+0.273525878376j))*0.5**o
            arg[(1, 1, 0)]=(-0.991142131981+0.180701399747j)*x[0]**o + ((-0.63271085527-0.333072457297j))*x[0] + ((0.284111919355-0.610115968633j))*x[1]**o + ((-0.354546733349-0.397404182704j))*x[1] + ((0.582982648119-0.85922148347j))*x[2]**o + ((-0.844800669471+0.45264176746j))*x[2]
            ref[(1, 1, 0)]=(0.867094567474-1.4693374521j)/(o+1.)+((-0.916029129045-0.13891743627j))+((-0.991142131981+0.180701399747j))*0.5**o
            arg[(1, 1, 1)]=(0.154623217722+0.118349421049j)*x[0]**o + ((-0.160191446937+0.357134852558j))*x[0] + ((0.428976416895+0.302896064869j))*x[1]**o + ((0.618832377407-0.335592772554j))*x[1] + ((-0.185257542616+0.344555622084j))*x[2]**o + ((-0.856848220571+0.645334107934j))*x[2]
            ref[(1, 1, 1)]=(0.243718874279+0.647451686953j)/(o+1.)+((-0.19910364505+0.333438093969j))+((0.154623217722+0.118349421049j))*0.5**o
            arg[(1, 2, 0)]=(0.467399626788-0.895182808696j)*x[0]**o + ((-0.764599075256-0.284243216883j))*x[0] + ((0.278893467518+0.175207881719j))*x[1]**o + ((0.305584533586+0.893282159974j))*x[1] + ((0.506237083116-0.675392699303j))*x[2]**o + ((-0.302069440158-0.724784282072j))*x[2]
            ref[(1, 2, 0)]=(0.785130550633-0.500184817584j)/(o+1.)+((-0.380541990914-0.0578726694909j))+((0.467399626788-0.895182808696j))*0.5**o
            arg[(1, 2, 1)]=(0.499426564842-0.174279405731j)*x[0]**o + ((0.822014995942+0.875788073222j))*x[0] + ((-0.655892330512+0.260611697179j))*x[1]**o + ((-0.31639196024+0.43748201488j))*x[1] + ((0.413064687043+0.717916843297j))*x[2]**o + ((0.304699411048+0.616702800831j))*x[2]
            ref[(1, 2, 1)]=(-0.242827643469+0.978528540476j)/(o+1.)+((0.405161223375+0.964986444467j))+((0.499426564842-0.174279405731j))*0.5**o
            arg[(2, 0, 0)]=(0.685145707531+0.362182920978j)*x[0]**o + ((0.516834870271-0.134146149564j))*x[0] + ((0.373368732166-0.744370816602j))*x[1]**o + ((-0.413541425751-0.765484984242j))*x[1] + ((0.111454913706-0.629355996498j))*x[2]**o + ((-0.947720225838-0.0568393289671j))*x[2]
            ref[(2, 0, 0)]=(0.484823645873-1.3737268131j)/(o+1.)+((-0.422213390659-0.478235231387j))+((0.685145707531+0.362182920978j))*0.5**o
            arg[(2, 0, 1)]=(-0.554820627835+0.0630534192982j)*x[0]**o + ((0.813315480001-0.723668849549j))*x[0] + ((-0.980756792936+0.414022986528j))*x[1]**o + ((0.70012237184+0.964695164347j))*x[1] + ((0.891553403582-0.806248265978j))*x[2]**o + ((0.000465908462671+0.660391384682j))*x[2]
            ref[(2, 0, 1)]=(-0.0892033893536-0.39222527945j)/(o+1.)+((0.756951880152+0.45070884974j))+((-0.554820627835+0.0630534192982j))*0.5**o
            arg[(2, 1, 0)]=(0.393961552555+0.588255016818j)*x[0]**o + ((0.566716892161+0.508568764209j))*x[0] + ((-0.873491848889-0.359383150704j))*x[1]**o + ((0.575936587856+0.388173676685j))*x[1] + ((0.153263177653+0.609731783184j))*x[2]**o + ((-0.924165297703-0.860133246025j))*x[2]
            ref[(2, 1, 0)]=(-0.720228671236+0.25034863248j)/(o+1.)+((0.109244091157+0.0183045974348j))+((0.393961552555+0.588255016818j))*0.5**o
            arg[(2, 1, 1)]=(-0.801297583804-0.65504390396j)*x[0]**o + ((-0.908700841587-0.794377932487j))*x[0] + ((-0.473252733774+0.0958357576629j))*x[1]**o + ((0.0763136754431-0.304811680135j))*x[1] + ((-0.012745739771+0.730048210857j))*x[2]**o + ((-0.104379108902-0.408967781687j))*x[2]
            ref[(2, 1, 1)]=(-0.485998473545+0.82588396852j)/(o+1.)+((-0.468383137523-0.754078697155j))+((-0.801297583804-0.65504390396j))*0.5**o
            arg[(2, 2, 0)]=(0.136004377202+0.55834475848j)*x[0]**o + ((0.121959483131+0.640847114378j))*x[0] + ((-0.348744855389-0.0517275676895j))*x[1]**o + ((-0.0466102588181-0.978956935548j))*x[1] + ((-0.902818366164-0.215663672145j))*x[2]**o + ((-0.213247740537-0.261310760146j))*x[2]
            ref[(2, 2, 0)]=(-1.25156322155-0.267391239835j)/(o+1.)+((-0.068949258112-0.299710290658j))+((0.136004377202+0.55834475848j))*0.5**o
            arg[(2, 2, 1)]=(0.551098675958+0.172868507938j)*x[0]**o + ((-0.205488207577-0.644259530803j))*x[0] + ((0.8508476202-0.181603961787j))*x[1]**o + ((0.926317155032+0.815307523614j))*x[1] + ((0.654426216553-0.197777902857j))*x[2]**o + ((-0.49858188113+0.70732999794j))*x[2]
            ref[(2, 2, 1)]=(1.50527383675-0.379381864645j)/(o+1.)+((0.111123533163+0.439188995375j))+((0.551098675958+0.172868507938j))*0.5**o
            arg[(3, 0, 0)]=(-0.503055332745-0.851763524085j)*x[0]**o + ((-0.0727232606904+0.723597032888j))*x[0] + ((-0.423659472762+0.440333695154j))*x[1]**o + ((-0.155035552626+0.77452094238j))*x[1] + ((0.181848334701-0.119606664302j))*x[2]**o + ((-0.245238251771+0.215595356795j))*x[2]
            ref[(3, 0, 0)]=(-0.241811138061+0.320727030852j)/(o+1.)+((-0.236498532543+0.856856666032j))+((-0.503055332745-0.851763524085j))*0.5**o
            arg[(3, 0, 1)]=(-0.909493702898+0.0140092747992j)*x[0]**o + ((0.639837004102+0.738285499993j))*x[0] + ((-0.314883849398-0.803054663802j))*x[1]**o + ((-0.928634443982+0.0721628304224j))*x[1] + ((0.889945424703+0.295274362637j))*x[2]**o + ((-0.630704067771-0.939156009126j))*x[2]
            ref[(3, 0, 1)]=(0.575061575305-0.507780301165j)/(o+1.)+((-0.459750753825-0.0643538393556j))+((-0.909493702898+0.0140092747992j))*0.5**o
            arg[(3, 1, 0)]=(0.50622137517+0.872959730348j)*x[0]**o + ((0.545024311017+0.230113121112j))*x[0] + ((0.0938926232024-0.445713767512j))*x[1]**o + ((0.808060861945+0.412476291263j))*x[1] + ((0.373440463977+0.255758907381j))*x[2]**o + ((0.919520558044-0.270623248584j))*x[2]
            ref[(3, 1, 0)]=(0.467333087179-0.189954860131j)/(o+1.)+((1.1363028655+0.185983081896j))+((0.50622137517+0.872959730348j))*0.5**o
            arg[(3, 1, 1)]=(0.933714444308-0.0166891238756j)*x[0]**o + ((-0.474382971311-0.280647289402j))*x[0] + ((0.125999839692-0.488970515723j))*x[1]**o + ((0.943243718378-0.191931985398j))*x[1] + ((-0.669685646274-0.00145780777204j))*x[2]**o + ((0.0601357762098-0.104388768548j))*x[2]
            ref[(3, 1, 1)]=(-0.543685806582-0.490428323495j)/(o+1.)+((0.264498261638-0.288484021674j))+((0.933714444308-0.0166891238756j))*0.5**o
            arg[(3, 2, 0)]=(-0.178459715025+0.914735857708j)*x[0]**o + ((-0.361311699888+0.0198672005525j))*x[0] + ((-0.896784882276-0.807772632505j))*x[1]**o + ((-0.20408295389+0.187691371381j))*x[1] + ((-0.628040224274+0.350190449843j))*x[2]**o + ((-0.968737473835+0.649749210492j))*x[2]
            ref[(3, 2, 0)]=(-1.52482510655-0.457582182662j)/(o+1.)+((-0.767066063807+0.428653891212j))+((-0.178459715025+0.914735857708j))*0.5**o
            arg[(3, 2, 1)]=(0.662407581573+0.562636627765j)*x[0]**o + ((0.5766440065+0.391945842302j))*x[0] + ((0.559909103917+0.778192858487j))*x[1]**o + ((-0.0529949042226+0.194724496802j))*x[1] + ((0.878068462627-0.862749442296j))*x[2]**o + ((-0.996175405031+0.00267289690711j))*x[2]
            ref[(3, 2, 1)]=(1.43797756654-0.0845565838084j)/(o+1.)+((-0.236263151377+0.294671618005j))+((0.662407581573+0.562636627765j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 3),w)
        ref=numpy.zeros((4, 4, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.291083778299+0.426973500589j)*x[0]**o + ((0.458176386359+0.520228399033j))*x[0] + ((0.972755659365-0.467715132558j))*x[1]**o + ((-0.111278238936+0.0193625941744j))*x[1]
            ref[(0, 0, 0, 0)]=(0.972755659365-0.467715132558j)/(o+1.)+((0.173449073711+0.269795496604j))+((0.291083778299+0.426973500589j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.0574680404024-0.314326106369j)*x[0]**o + ((0.215247027437+0.133032716358j))*x[0] + ((0.0118923103949+0.252419703423j))*x[1]**o + ((0.38236304914+0.51821504475j))*x[1]
            ref[(0, 0, 0, 1)]=(0.0118923103949+0.252419703423j)/(o+1.)+((0.298805038289+0.325623880554j))+((0.0574680404024-0.314326106369j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.871102016175+0.609900434508j)*x[0]**o + ((-0.432393650309-0.336618829065j))*x[0] + ((-0.278018433286+0.644488492656j))*x[1]**o + ((0.876287128375-0.0368189964733j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.278018433286+0.644488492656j)/(o+1.)+((0.221946739033-0.186718912769j))+((-0.871102016175+0.609900434508j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.480359236205+0.718484669634j)*x[0]**o + ((0.563249946343+0.904600664286j))*x[0] + ((-0.719369567529+0.697332422186j))*x[1]**o + ((0.126165228444-0.0915531768805j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.719369567529+0.697332422186j)/(o+1.)+((0.344707587394+0.406523743703j))+((-0.480359236205+0.718484669634j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.850767185247-0.660269889036j)*x[0]**o + ((-0.048113460422-0.971254863976j))*x[0] + ((-0.252573821937-0.592321973424j))*x[1]**o + ((0.347358939229-0.585906439258j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.252573821937-0.592321973424j)/(o+1.)+((0.149622739404-0.778580651617j))+((0.850767185247-0.660269889036j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.809005719879+0.610054623313j)*x[0]**o + ((-0.245331999913+0.665550106399j))*x[0] + ((0.0822171045575+0.796515923253j))*x[1]**o + ((0.0200022776009-0.307355337303j))*x[1]
            ref[(0, 0, 1, 2)]=(0.0822171045575+0.796515923253j)/(o+1.)+((-0.112664861156+0.179097384548j))+((-0.809005719879+0.610054623313j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.927324892252+0.336139022304j)*x[0]**o + ((-0.0782289598664-0.730438327951j))*x[0] + ((0.611457453241+0.490652784043j))*x[1]**o + ((-0.953490267085-0.694270667776j))*x[1]
            ref[(0, 0, 2, 0)]=(0.611457453241+0.490652784043j)/(o+1.)+((-0.515859613476-0.712354497863j))+((0.927324892252+0.336139022304j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.912518170573+0.769838728385j)*x[0]**o + ((-0.849451068198-0.404483834151j))*x[0] + ((0.984385645734-0.352289479537j))*x[1]**o + ((0.163637397399-0.553939406916j))*x[1]
            ref[(0, 0, 2, 1)]=(0.984385645734-0.352289479537j)/(o+1.)+((-0.3429068354-0.479211620534j))+((0.912518170573+0.769838728385j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.508708169055+0.468454347329j)*x[0]**o + ((-0.656090127812+0.976621704036j))*x[0] + ((-0.332371622058+0.481147914628j))*x[1]**o + ((-0.662541086911+0.947101184692j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.332371622058+0.481147914628j)/(o+1.)+((-0.659315607362+0.961861444364j))+((0.508708169055+0.468454347329j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.34999242037-0.156648995836j)*x[0]**o + ((-0.665271926414+0.81423021821j))*x[0] + ((-0.402563809325-0.0158714169721j))*x[1]**o + ((0.204326002758+0.719190350681j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.402563809325-0.0158714169721j)/(o+1.)+((-0.230472961828+0.766710284446j))+((-0.34999242037-0.156648995836j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.728077765214-0.627557402854j)*x[0]**o + ((0.80766588483-0.585831489033j))*x[0] + ((-0.715011178432-0.980848074657j))*x[1]**o + ((0.560794523674-0.770088250101j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.715011178432-0.980848074657j)/(o+1.)+((0.684230204252-0.677959869567j))+((-0.728077765214-0.627557402854j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.198687677598-0.19684121747j)*x[0]**o + ((-0.0537117575293-0.582572281963j))*x[0] + ((0.269835947884+0.941378406142j))*x[1]**o + ((-0.965461402519-0.227950738205j))*x[1]
            ref[(0, 1, 0, 2)]=(0.269835947884+0.941378406142j)/(o+1.)+((-0.509586580024-0.405261510084j))+((-0.198687677598-0.19684121747j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.0641294491692-0.98603122027j)*x[0]**o + ((-0.62458592335+0.178806721425j))*x[0] + ((0.474069821631+0.392211168226j))*x[1]**o + ((0.158708240703-0.903022979523j))*x[1]
            ref[(0, 1, 1, 0)]=(0.474069821631+0.392211168226j)/(o+1.)+((-0.232938841324-0.362108129049j))+((0.0641294491692-0.98603122027j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.692540585057+0.40673065013j)*x[0]**o + ((-0.486234878401-0.629366486395j))*x[0] + ((0.553206233299+0.327449975994j))*x[1]**o + ((0.915346117846-0.190278678204j))*x[1]
            ref[(0, 1, 1, 1)]=(0.553206233299+0.327449975994j)/(o+1.)+((0.214555619722-0.4098225823j))+((0.692540585057+0.40673065013j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.0555528731856-0.754951948466j)*x[0]**o + ((0.259830420085+0.727980367805j))*x[0] + ((-0.340127312695+0.110714652781j))*x[1]**o + ((-0.361831568443-0.284391872702j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.340127312695+0.110714652781j)/(o+1.)+((-0.0510005741788+0.221794247552j))+((0.0555528731856-0.754951948466j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.168420619911-0.871482443315j)*x[0]**o + ((-0.11153065713+0.0412376157373j))*x[0] + ((0.491851235741-0.299207285588j))*x[1]**o + ((0.474822116515+0.924443353251j))*x[1]
            ref[(0, 1, 2, 0)]=(0.491851235741-0.299207285588j)/(o+1.)+((0.181645729692+0.482840484494j))+((0.168420619911-0.871482443315j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.940810301679+0.599069335782j)*x[0]**o + ((0.564119803919-0.0430811742806j))*x[0] + ((0.931949488335-0.184289441608j))*x[1]**o + ((-0.566122565761-0.202275967776j))*x[1]
            ref[(0, 1, 2, 1)]=(0.931949488335-0.184289441608j)/(o+1.)+((-0.00100138092112-0.122678571028j))+((0.940810301679+0.599069335782j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.037958341095-0.231113547128j)*x[0]**o + ((0.985685599777+0.959334142255j))*x[0] + ((0.961491565573+0.96533815779j))*x[1]**o + ((0.944151912919-0.277495682686j))*x[1]
            ref[(0, 1, 2, 2)]=(0.961491565573+0.96533815779j)/(o+1.)+((0.964918756348+0.340919229784j))+((-0.037958341095-0.231113547128j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.0816082379885+0.567649184838j)*x[0]**o + ((0.724751194988-0.989331710054j))*x[0] + ((-0.512013539349+0.399717439031j))*x[1]**o + ((-0.136578790336-0.403242943005j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.512013539349+0.399717439031j)/(o+1.)+((0.294086202326-0.696287326529j))+((-0.0816082379885+0.567649184838j))*0.5**o
            arg[(0, 2, 0, 1)]=(-0.553089370003+0.751791545099j)*x[0]**o + ((-0.0913044618314-0.0296190840919j))*x[0] + ((-0.24453091552-0.379048410754j))*x[1]**o + ((-0.289327239391+0.805573031121j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.24453091552-0.379048410754j)/(o+1.)+((-0.190315850611+0.387976973514j))+((-0.553089370003+0.751791545099j))*0.5**o
            arg[(0, 2, 0, 2)]=(-0.648069640189-0.925064689902j)*x[0]**o + ((0.421392718686+0.401190096222j))*x[0] + ((0.464793983099+0.811315791616j))*x[1]**o + ((0.484322211352-0.325513574359j))*x[1]
            ref[(0, 2, 0, 2)]=(0.464793983099+0.811315791616j)/(o+1.)+((0.452857465019+0.0378382609312j))+((-0.648069640189-0.925064689902j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.858913563858-0.0297420871831j)*x[0]**o + ((0.705183065522-0.550289943889j))*x[0] + ((0.363749497276-0.255407741511j))*x[1]**o + ((0.160943468197-0.57917388225j))*x[1]
            ref[(0, 2, 1, 0)]=(0.363749497276-0.255407741511j)/(o+1.)+((0.433063266859-0.564731913069j))+((0.858913563858-0.0297420871831j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.446070258472-0.574507469756j)*x[0]**o + ((-0.524137482082+0.281781995413j))*x[0] + ((-0.194998506661-0.309116206886j))*x[1]**o + ((0.286232065769-0.74913743764j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.194998506661-0.309116206886j)/(o+1.)+((-0.118952708156-0.233677721113j))+((-0.446070258472-0.574507469756j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.700089862299+0.570055864529j)*x[0]**o + ((-0.0394821179604-0.889023819001j))*x[0] + ((0.190588530167-0.921876167063j))*x[1]**o + ((-0.296417542568+0.823450462601j))*x[1]
            ref[(0, 2, 1, 2)]=(0.190588530167-0.921876167063j)/(o+1.)+((-0.167949830264-0.0327866781997j))+((-0.700089862299+0.570055864529j))*0.5**o
            arg[(0, 2, 2, 0)]=(0.573917822109-0.758750306057j)*x[0]**o + ((0.00567327269432+0.285570120636j))*x[0] + ((-0.172730374722+0.776781864187j))*x[1]**o + ((-0.13366658326+0.135326069229j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.172730374722+0.776781864187j)/(o+1.)+((-0.0639966552829+0.210448094933j))+((0.573917822109-0.758750306057j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.281662505385+0.452973409478j)*x[0]**o + ((-0.76554752355+0.351716120249j))*x[0] + ((-0.813444948915+0.135398831987j))*x[1]**o + ((-0.752770872016-0.789671880233j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.813444948915+0.135398831987j)/(o+1.)+((-0.759159197783-0.218977879992j))+((0.281662505385+0.452973409478j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.89101379357+0.654412053835j)*x[0]**o + ((0.719924089844-0.663900062294j))*x[0] + ((0.315288032047-0.861599394482j))*x[1]**o + ((-0.0926323726599-0.753468131364j))*x[1]
            ref[(0, 2, 2, 2)]=(0.315288032047-0.861599394482j)/(o+1.)+((0.313645858592-0.708684096829j))+((0.89101379357+0.654412053835j))*0.5**o
            arg[(0, 3, 0, 0)]=(0.162955887724+0.688316433038j)*x[0]**o + ((0.455143356871+0.5137291592j))*x[0] + ((-0.866732744228-0.921171047432j))*x[1]**o + ((0.240662196128-0.752136166137j))*x[1]
            ref[(0, 3, 0, 0)]=(-0.866732744228-0.921171047432j)/(o+1.)+((0.3479027765-0.119203503468j))+((0.162955887724+0.688316433038j))*0.5**o
            arg[(0, 3, 0, 1)]=(-0.152567037781+0.507184395424j)*x[0]**o + ((-0.67982460323+0.877071089393j))*x[0] + ((-0.693940084798-0.659506581987j))*x[1]**o + ((0.478003041582+0.528359585646j))*x[1]
            ref[(0, 3, 0, 1)]=(-0.693940084798-0.659506581987j)/(o+1.)+((-0.100910780824+0.702715337519j))+((-0.152567037781+0.507184395424j))*0.5**o
            arg[(0, 3, 0, 2)]=(-0.357462715104-0.548806245347j)*x[0]**o + ((-0.977609456258-0.888367418945j))*x[0] + ((0.569324674022-0.912571686038j))*x[1]**o + ((0.730194017868-0.662022581224j))*x[1]
            ref[(0, 3, 0, 2)]=(0.569324674022-0.912571686038j)/(o+1.)+((-0.123707719195-0.775195000084j))+((-0.357462715104-0.548806245347j))*0.5**o
            arg[(0, 3, 1, 0)]=(-0.478286527142-0.732512713284j)*x[0]**o + ((-0.509568441848+0.373453903844j))*x[0] + ((-0.612646097147+0.749192144172j))*x[1]**o + ((-0.504840587976+0.908046973705j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.612646097147+0.749192144172j)/(o+1.)+((-0.507204514912+0.640750438774j))+((-0.478286527142-0.732512713284j))*0.5**o
            arg[(0, 3, 1, 1)]=(-0.442393581923-0.453433454838j)*x[0]**o + ((0.570506886487+0.638823824559j))*x[0] + ((-0.674637565668-0.851813357512j))*x[1]**o + ((-0.453197505747-0.826802793258j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.674637565668-0.851813357512j)/(o+1.)+((0.0586546903702-0.0939894843498j))+((-0.442393581923-0.453433454838j))*0.5**o
            arg[(0, 3, 1, 2)]=(0.272738391725+0.946641807816j)*x[0]**o + ((-0.354549696668-0.762894687913j))*x[0] + ((-0.912107194492+0.967996929892j))*x[1]**o + ((0.733904074611+0.601684096937j))*x[1]
            ref[(0, 3, 1, 2)]=(-0.912107194492+0.967996929892j)/(o+1.)+((0.189677188971-0.0806052954879j))+((0.272738391725+0.946641807816j))*0.5**o
            arg[(0, 3, 2, 0)]=(0.225191598796-0.690814369374j)*x[0]**o + ((0.383334510302+0.0245452398531j))*x[0] + ((-0.61269172193-0.303186265827j))*x[1]**o + ((0.212380962834+0.811861969137j))*x[1]
            ref[(0, 3, 2, 0)]=(-0.61269172193-0.303186265827j)/(o+1.)+((0.297857736568+0.418203604495j))+((0.225191598796-0.690814369374j))*0.5**o
            arg[(0, 3, 2, 1)]=(-0.954060998195+0.289269413951j)*x[0]**o + ((-0.910502440657-0.175740550515j))*x[0] + ((0.203546055765-0.215075749738j))*x[1]**o + ((-0.671186822433+0.914847423406j))*x[1]
            ref[(0, 3, 2, 1)]=(0.203546055765-0.215075749738j)/(o+1.)+((-0.790844631545+0.369553436445j))+((-0.954060998195+0.289269413951j))*0.5**o
            arg[(0, 3, 2, 2)]=(0.442653482259+0.167569615595j)*x[0]**o + ((0.513273280356+0.671328119706j))*x[0] + ((-0.448725844884-0.996729737224j))*x[1]**o + ((-0.166612316074-0.652814972053j))*x[1]
            ref[(0, 3, 2, 2)]=(-0.448725844884-0.996729737224j)/(o+1.)+((0.173330482141+0.00925657382684j))+((0.442653482259+0.167569615595j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.155378541039+0.701143174661j)*x[0]**o + ((0.833845936555-0.388116645619j))*x[0] + ((0.877926580341+0.278996951966j))*x[1]**o + ((0.201084322118+0.91358199972j))*x[1]
            ref[(1, 0, 0, 0)]=(0.877926580341+0.278996951966j)/(o+1.)+((0.517465129337+0.26273267705j))+((-0.155378541039+0.701143174661j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.831760430147-0.129536738447j)*x[0]**o + ((-0.648954729019-0.457583987432j))*x[0] + ((-0.964931948251-0.502724541768j))*x[1]**o + ((-0.235953956658+0.280503932666j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.964931948251-0.502724541768j)/(o+1.)+((-0.442454342838-0.0885400273835j))+((0.831760430147-0.129536738447j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.640996552035-0.957943068104j)*x[0]**o + ((-0.955760534702-0.3246583521j))*x[0] + ((-0.102127524433+0.497415762731j))*x[1]**o + ((-0.15377185656+0.754130706917j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.102127524433+0.497415762731j)/(o+1.)+((-0.554766195631+0.214736177408j))+((-0.640996552035-0.957943068104j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.0053642410942-0.0414486544731j)*x[0]**o + ((0.663931262822+0.817890102097j))*x[0] + ((0.860060175211+0.64013054153j))*x[1]**o + ((-0.271517449706+0.0682296513005j))*x[1]
            ref[(1, 0, 1, 0)]=(0.860060175211+0.64013054153j)/(o+1.)+((0.196206906558+0.443059876699j))+((-0.0053642410942-0.0414486544731j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.399506328442-0.183738153805j)*x[0]**o + ((-0.668894793908+0.183062967972j))*x[0] + ((0.586784859103-0.0142470516544j))*x[1]**o + ((0.272731301339+0.198438528321j))*x[1]
            ref[(1, 0, 1, 1)]=(0.586784859103-0.0142470516544j)/(o+1.)+((-0.198081746285+0.190750748146j))+((0.399506328442-0.183738153805j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.0593847705465+0.738281313453j)*x[0]**o + ((0.77209704523-0.483615874684j))*x[0] + ((0.490299899681+0.496536240482j))*x[1]**o + ((0.0132789981625-0.322894520774j))*x[1]
            ref[(1, 0, 1, 2)]=(0.490299899681+0.496536240482j)/(o+1.)+((0.392688021696-0.403255197729j))+((0.0593847705465+0.738281313453j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.809530177938+0.197124375212j)*x[0]**o + ((-0.222856702933-0.134135887963j))*x[0] + ((-0.750165302831-0.267960559837j))*x[1]**o + ((-0.75237200093+0.842016277479j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.750165302831-0.267960559837j)/(o+1.)+((-0.487614351931+0.353940194758j))+((0.809530177938+0.197124375212j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.214370033095+0.0558965126765j)*x[0]**o + ((0.303230184347+0.35660115256j))*x[0] + ((0.986084543454-0.847179040845j))*x[1]**o + ((0.238061216677+0.404049202479j))*x[1]
            ref[(1, 0, 2, 1)]=(0.986084543454-0.847179040845j)/(o+1.)+((0.270645700512+0.380325177519j))+((0.214370033095+0.0558965126765j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.707187547933+0.4415438222j)*x[0]**o + ((0.0256464812544-0.11618481577j))*x[0] + ((0.833429461173-0.485688289337j))*x[1]**o + ((0.704480575179-0.16935022013j))*x[1]
            ref[(1, 0, 2, 2)]=(0.833429461173-0.485688289337j)/(o+1.)+((0.365063528217-0.14276751795j))+((-0.707187547933+0.4415438222j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.270695209096-0.626435917296j)*x[0]**o + ((0.550075758621+0.122305917373j))*x[0] + ((0.843759519327-0.0076923283101j))*x[1]**o + ((-0.654460858892-0.00612978645765j))*x[1]
            ref[(1, 1, 0, 0)]=(0.843759519327-0.0076923283101j)/(o+1.)+((-0.0521925501351+0.0580880654577j))+((-0.270695209096-0.626435917296j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.908629609921-0.334671205839j)*x[0]**o + ((0.681552706402+0.672503123855j))*x[0] + ((0.971929605346+0.117703363068j))*x[1]**o + ((0.552679337914+0.841150034596j))*x[1]
            ref[(1, 1, 0, 1)]=(0.971929605346+0.117703363068j)/(o+1.)+((0.617116022158+0.756826579225j))+((-0.908629609921-0.334671205839j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.859343268265+0.349367145674j)*x[0]**o + ((0.882035902882-0.265469295034j))*x[0] + ((0.39073941562+0.667583338463j))*x[1]**o + ((-0.0674052243475+0.474860830939j))*x[1]
            ref[(1, 1, 0, 2)]=(0.39073941562+0.667583338463j)/(o+1.)+((0.407315339267+0.104695767952j))+((0.859343268265+0.349367145674j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.310165597372+0.696554588812j)*x[0]**o + ((-0.633945656202+0.504962466013j))*x[0] + ((0.94467928528-0.416276358861j))*x[1]**o + ((0.937877513737-0.0875426970966j))*x[1]
            ref[(1, 1, 1, 0)]=(0.94467928528-0.416276358861j)/(o+1.)+((0.151965928767+0.208709884458j))+((0.310165597372+0.696554588812j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.38078188839-0.670140725014j)*x[0]**o + ((-0.0559702690718+0.70704274357j))*x[0] + ((-0.349297239406-0.903734030867j))*x[1]**o + ((0.207306694872+0.872342846233j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.349297239406-0.903734030867j)/(o+1.)+((0.0756682129002+0.789692794902j))+((-0.38078188839-0.670140725014j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.697095276982+0.999771861384j)*x[0]**o + ((0.302109662727-0.705858625688j))*x[0] + ((0.59040337959-0.794697575785j))*x[1]**o + ((-0.379115376986+0.768364104054j))*x[1]
            ref[(1, 1, 1, 2)]=(0.59040337959-0.794697575785j)/(o+1.)+((-0.0385028571298+0.0312527391832j))+((0.697095276982+0.999771861384j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.715403319272-0.435451421643j)*x[0]**o + ((-0.533801232644-0.871874633617j))*x[0] + ((-0.0110496048986-0.749301691657j))*x[1]**o + ((-0.128555927689-0.871178107292j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.0110496048986-0.749301691657j)/(o+1.)+((-0.331178580166-0.871526370455j))+((-0.715403319272-0.435451421643j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.608692420463-0.685154492642j)*x[0]**o + ((0.81652470977-0.567004201414j))*x[0] + ((0.641155114847-0.693917619831j))*x[1]**o + ((-0.910376158479-0.732713224468j))*x[1]
            ref[(1, 1, 2, 1)]=(0.641155114847-0.693917619831j)/(o+1.)+((-0.0469257243549-0.649858712941j))+((-0.608692420463-0.685154492642j))*0.5**o
            arg[(1, 1, 2, 2)]=(-0.831145968875-0.857614268459j)*x[0]**o + ((-0.684112156472-0.866779020525j))*x[0] + ((-0.340730934661+0.717444802259j))*x[1]**o + ((-0.381818877789+0.0981393449155j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.340730934661+0.717444802259j)/(o+1.)+((-0.532965517131-0.384319837805j))+((-0.831145968875-0.857614268459j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.67037345591+0.36376281533j)*x[0]**o + ((-0.566706906302+0.56419286665j))*x[0] + ((-0.0540475712119-0.716096902354j))*x[1]**o + ((0.46166781699-0.126431300844j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.0540475712119-0.716096902354j)/(o+1.)+((-0.0525195446559+0.218880782903j))+((-0.67037345591+0.36376281533j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.201207630478-0.0909129130219j)*x[0]**o + ((-0.940988077541-0.0156896398306j))*x[0] + ((-0.666703803936-0.528008286124j))*x[1]**o + ((0.699079765722-0.0960084477554j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.666703803936-0.528008286124j)/(o+1.)+((-0.120954155909-0.055849043793j))+((-0.201207630478-0.0909129130219j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.396223002292-0.436222709377j)*x[0]**o + ((0.980277936072+0.494283575909j))*x[0] + ((-0.364061997948+0.01999948268j))*x[1]**o + ((0.811575093631-0.797674548955j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.364061997948+0.01999948268j)/(o+1.)+((0.895926514852-0.151695486523j))+((0.396223002292-0.436222709377j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.753135297788+0.76758293722j)*x[0]**o + ((0.958392529135-0.540576162595j))*x[0] + ((-0.310911512013-0.146345843029j))*x[1]**o + ((0.468346623519-0.995414453038j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.310911512013-0.146345843029j)/(o+1.)+((0.713369576327-0.767995307816j))+((-0.753135297788+0.76758293722j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.061429147739-0.672470138264j)*x[0]**o + ((-0.391826300191+0.817668468007j))*x[0] + ((0.0430472719275+0.787882637856j))*x[1]**o + ((-0.0855574676886+0.341482808671j))*x[1]
            ref[(1, 2, 1, 1)]=(0.0430472719275+0.787882637856j)/(o+1.)+((-0.23869188394+0.579575638339j))+((0.061429147739-0.672470138264j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.0134095904218+0.681688341715j)*x[0]**o + ((-0.240698217745+0.511692649036j))*x[0] + ((-0.619921251177+0.619398021017j))*x[1]**o + ((0.203603024897-0.630216310502j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.619921251177+0.619398021017j)/(o+1.)+((-0.018547596424-0.0592618307331j))+((-0.0134095904218+0.681688341715j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.769658072605-0.398024976344j)*x[0]**o + ((-0.873682445589+0.813434509021j))*x[0] + ((0.361850441786+0.917845070632j))*x[1]**o + ((-0.226610018954-0.291109269343j))*x[1]
            ref[(1, 2, 2, 0)]=(0.361850441786+0.917845070632j)/(o+1.)+((-0.550146232271+0.261162619839j))+((-0.769658072605-0.398024976344j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.463343228081-0.944464299388j)*x[0]**o + ((0.83298021411+0.391662168037j))*x[0] + ((-0.451703106149-0.486615580478j))*x[1]**o + ((-0.77915537501+0.46969419415j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.451703106149-0.486615580478j)/(o+1.)+((0.0269124195504+0.430678181094j))+((-0.463343228081-0.944464299388j))*0.5**o
            arg[(1, 2, 2, 2)]=(-0.951002834131+0.261660421987j)*x[0]**o + ((-0.272489741304+0.719105682958j))*x[0] + ((0.387837227404-0.376457489348j))*x[1]**o + ((0.331390546559-0.853531684214j))*x[1]
            ref[(1, 2, 2, 2)]=(0.387837227404-0.376457489348j)/(o+1.)+((0.0294504026277-0.067213000628j))+((-0.951002834131+0.261660421987j))*0.5**o
            arg[(1, 3, 0, 0)]=(0.972961114097+0.86801820279j)*x[0]**o + ((0.871690218567+0.867470791194j))*x[0] + ((-0.775020006836-0.446674073591j))*x[1]**o + ((0.449990215501+0.963946616783j))*x[1]
            ref[(1, 3, 0, 0)]=(-0.775020006836-0.446674073591j)/(o+1.)+((0.660840217034+0.915708703989j))+((0.972961114097+0.86801820279j))*0.5**o
            arg[(1, 3, 0, 1)]=(-0.533072865159-0.676359536257j)*x[0]**o + ((-0.383104438131+0.0488425140768j))*x[0] + ((0.877267695967+0.193139535238j))*x[1]**o + ((-0.0630384525222-0.380208104066j))*x[1]
            ref[(1, 3, 0, 1)]=(0.877267695967+0.193139535238j)/(o+1.)+((-0.223071445327-0.165682794995j))+((-0.533072865159-0.676359536257j))*0.5**o
            arg[(1, 3, 0, 2)]=(0.0859650352186+0.959453338487j)*x[0]**o + ((0.650312717903+0.473588491786j))*x[0] + ((0.812715338711+0.713115956061j))*x[1]**o + ((0.653764543938-0.0939688824139j))*x[1]
            ref[(1, 3, 0, 2)]=(0.812715338711+0.713115956061j)/(o+1.)+((0.652038630921+0.189809804686j))+((0.0859650352186+0.959453338487j))*0.5**o
            arg[(1, 3, 1, 0)]=(-0.749907861613+0.871148689657j)*x[0]**o + ((-0.819012848184+0.553999910921j))*x[0] + ((-0.278255633906-0.245418297934j))*x[1]**o + ((-0.857587140361-0.445068685173j))*x[1]
            ref[(1, 3, 1, 0)]=(-0.278255633906-0.245418297934j)/(o+1.)+((-0.838299994273+0.0544656128741j))+((-0.749907861613+0.871148689657j))*0.5**o
            arg[(1, 3, 1, 1)]=(0.0732566212895+0.709004255836j)*x[0]**o + ((0.586424349464-0.327229890127j))*x[0] + ((-0.7543999111-0.525857584179j))*x[1]**o + ((0.302319737843+0.948241577886j))*x[1]
            ref[(1, 3, 1, 1)]=(-0.7543999111-0.525857584179j)/(o+1.)+((0.444372043653+0.310505843879j))+((0.0732566212895+0.709004255836j))*0.5**o
            arg[(1, 3, 1, 2)]=(-0.396251321341-0.857027425603j)*x[0]**o + ((-0.348199355046-0.0572431118309j))*x[0] + ((0.0206523612026+0.109276903288j))*x[1]**o + ((-0.861982664679+0.451145822127j))*x[1]
            ref[(1, 3, 1, 2)]=(0.0206523612026+0.109276903288j)/(o+1.)+((-0.605091009863+0.196951355148j))+((-0.396251321341-0.857027425603j))*0.5**o
            arg[(1, 3, 2, 0)]=(0.798102884092+0.456494249573j)*x[0]**o + ((-0.619028894316-0.770290177059j))*x[0] + ((0.104428200857-0.572153091742j))*x[1]**o + ((0.771069731073+0.890443430567j))*x[1]
            ref[(1, 3, 2, 0)]=(0.104428200857-0.572153091742j)/(o+1.)+((0.0760204183785+0.0600766267543j))+((0.798102884092+0.456494249573j))*0.5**o
            arg[(1, 3, 2, 1)]=(0.529287655308-0.658772374106j)*x[0]**o + ((-0.413339346511+0.489671900771j))*x[0] + ((-0.945875352794+0.32348322211j))*x[1]**o + ((-0.943046215943-0.242343311244j))*x[1]
            ref[(1, 3, 2, 1)]=(-0.945875352794+0.32348322211j)/(o+1.)+((-0.678192781227+0.123664294763j))+((0.529287655308-0.658772374106j))*0.5**o
            arg[(1, 3, 2, 2)]=(-0.0327909847498-0.562687369687j)*x[0]**o + ((-0.256822580841+0.58582571172j))*x[0] + ((0.716844458886-0.382496014842j))*x[1]**o + ((0.438685559471-0.769568645016j))*x[1]
            ref[(1, 3, 2, 2)]=(0.716844458886-0.382496014842j)/(o+1.)+((0.0909314893151-0.0918714666477j))+((-0.0327909847498-0.562687369687j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.0943643688101-0.0369864068652j)*x[0]**o + ((-0.619651192865+0.301046802131j))*x[0] + ((0.554801170757-0.875879390423j))*x[1]**o + ((-0.489017826438+0.638172293866j))*x[1]
            ref[(2, 0, 0, 0)]=(0.554801170757-0.875879390423j)/(o+1.)+((-0.554334509651+0.469609547999j))+((-0.0943643688101-0.0369864068652j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.0410619374327+0.994488499943j)*x[0]**o + ((0.200161119196+0.272592233812j))*x[0] + ((0.321841338518+0.818699384868j))*x[1]**o + ((0.831660033606+0.127263120421j))*x[1]
            ref[(2, 0, 0, 1)]=(0.321841338518+0.818699384868j)/(o+1.)+((0.515910576401+0.199927677117j))+((-0.0410619374327+0.994488499943j))*0.5**o
            arg[(2, 0, 0, 2)]=(-0.39943024212+0.561856602354j)*x[0]**o + ((0.527093371224+0.783010366351j))*x[0] + ((-0.428299236052+0.930195923882j))*x[1]**o + ((0.626749101357+0.725851342072j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.428299236052+0.930195923882j)/(o+1.)+((0.576921236291+0.754430854212j))+((-0.39943024212+0.561856602354j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.41715343553-0.552135432378j)*x[0]**o + ((-0.27535307744+0.711989029045j))*x[0] + ((0.901955020007+0.118065386245j))*x[1]**o + ((-0.525062929835+0.94920691611j))*x[1]
            ref[(2, 0, 1, 0)]=(0.901955020007+0.118065386245j)/(o+1.)+((-0.400208003637+0.830597972578j))+((-0.41715343553-0.552135432378j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.692576513704-0.828290805387j)*x[0]**o + ((0.0284191100034+0.297365431888j))*x[0] + ((0.301248303512+0.537985241562j))*x[1]**o + ((0.963415057417-0.0482149653015j))*x[1]
            ref[(2, 0, 1, 1)]=(0.301248303512+0.537985241562j)/(o+1.)+((0.49591708371+0.124575233293j))+((0.692576513704-0.828290805387j))*0.5**o
            arg[(2, 0, 1, 2)]=(-0.180964685362-0.952225958224j)*x[0]**o + ((-0.154388255051-0.839079391908j))*x[0] + ((0.0611911367932-0.264398006232j))*x[1]**o + ((0.642619437955+0.032975030031j))*x[1]
            ref[(2, 0, 1, 2)]=(0.0611911367932-0.264398006232j)/(o+1.)+((0.244115591452-0.403052180938j))+((-0.180964685362-0.952225958224j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.21982741838-0.305950503429j)*x[0]**o + ((-0.658029522959-0.283749689436j))*x[0] + ((0.457738076368-0.32237768158j))*x[1]**o + ((0.563288668154+0.342364143676j))*x[1]
            ref[(2, 0, 2, 0)]=(0.457738076368-0.32237768158j)/(o+1.)+((-0.0473704274025+0.02930722712j))+((-0.21982741838-0.305950503429j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.822636465417+0.520525523512j)*x[0]**o + ((0.901009064603-0.547177349208j))*x[0] + ((0.127260068242-0.378175055268j))*x[1]**o + ((0.996725417335+0.823864492617j))*x[1]
            ref[(2, 0, 2, 1)]=(0.127260068242-0.378175055268j)/(o+1.)+((0.948867240969+0.138343571705j))+((0.822636465417+0.520525523512j))*0.5**o
            arg[(2, 0, 2, 2)]=(-0.666734191924-0.309276097278j)*x[0]**o + ((0.912884737952+0.82357192635j))*x[0] + ((-0.955484632899-0.0022785127804j))*x[1]**o + ((-0.456381538172-0.0534482903754j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.955484632899-0.0022785127804j)/(o+1.)+((0.22825159989+0.385061817987j))+((-0.666734191924-0.309276097278j))*0.5**o
            arg[(2, 1, 0, 0)]=(0.479248169642-0.0030747443257j)*x[0]**o + ((0.204062371066-0.919166874001j))*x[0] + ((-0.0697663434419+0.717923432924j))*x[1]**o + ((-0.958294153842-0.684255655157j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.0697663434419+0.717923432924j)/(o+1.)+((-0.377115891388-0.801711264579j))+((0.479248169642-0.0030747443257j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.0124632649099-0.283323338307j)*x[0]**o + ((-0.698653157051+0.616964709212j))*x[0] + ((0.0749563802328-0.00135903498209j))*x[1]**o + ((-0.694448837535+0.042434629462j))*x[1]
            ref[(2, 1, 0, 1)]=(0.0749563802328-0.00135903498209j)/(o+1.)+((-0.696550997293+0.329699669337j))+((-0.0124632649099-0.283323338307j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.450676248596+0.783694499021j)*x[0]**o + ((-0.15860976309+0.0687021288363j))*x[0] + ((-0.758287650799-0.657578963005j))*x[1]**o + ((0.43923933977+0.529577979957j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.758287650799-0.657578963005j)/(o+1.)+((0.14031478834+0.299140054397j))+((-0.450676248596+0.783694499021j))*0.5**o
            arg[(2, 1, 1, 0)]=(-0.132198870594-0.554504529708j)*x[0]**o + ((0.445838479335+0.702169265433j))*x[0] + ((0.593356711408+0.61885568424j))*x[1]**o + ((0.182806643287+0.88085436703j))*x[1]
            ref[(2, 1, 1, 0)]=(0.593356711408+0.61885568424j)/(o+1.)+((0.314322561311+0.791511816232j))+((-0.132198870594-0.554504529708j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.392350002254+0.042288715845j)*x[0]**o + ((-0.881410003088+0.314635200256j))*x[0] + ((-0.965497604897-0.826556727277j))*x[1]**o + ((0.0662990736553-0.502210890551j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.965497604897-0.826556727277j)/(o+1.)+((-0.407555464716-0.0937878451474j))+((-0.392350002254+0.042288715845j))*0.5**o
            arg[(2, 1, 1, 2)]=(-0.0983093508856+0.119388562156j)*x[0]**o + ((0.929826417863-0.34185985122j))*x[0] + ((0.860214303526-0.63330539722j))*x[1]**o + ((0.922985807969+0.893702126038j))*x[1]
            ref[(2, 1, 1, 2)]=(0.860214303526-0.63330539722j)/(o+1.)+((0.926406112916+0.275921137409j))+((-0.0983093508856+0.119388562156j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.889957903109-0.257755185065j)*x[0]**o + ((-0.0564293847635+0.447481411346j))*x[0] + ((-0.2461904+0.562145503925j))*x[1]**o + ((0.28681177159+0.483852328374j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.2461904+0.562145503925j)/(o+1.)+((0.115191193413+0.46566686986j))+((-0.889957903109-0.257755185065j))*0.5**o
            arg[(2, 1, 2, 1)]=(0.246601488577-0.415223163771j)*x[0]**o + ((-0.441716262614-0.724663829289j))*x[0] + ((-0.549585258131-0.916124548232j))*x[1]**o + ((-0.987003563477+0.335291515608j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.549585258131-0.916124548232j)/(o+1.)+((-0.714359913046-0.194686156841j))+((0.246601488577-0.415223163771j))*0.5**o
            arg[(2, 1, 2, 2)]=(-0.280658047947+0.493842692186j)*x[0]**o + ((0.23545245011-0.552876098643j))*x[0] + ((-0.643790350085-0.621824179129j))*x[1]**o + ((0.499163400986+0.860960709623j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.643790350085-0.621824179129j)/(o+1.)+((0.367307925548+0.15404230549j))+((-0.280658047947+0.493842692186j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.793930585458-0.941228372352j)*x[0]**o + ((-0.641652390325+0.115241176897j))*x[0] + ((0.621662319674+0.772509022069j))*x[1]**o + ((-0.174334397793-0.234318854607j))*x[1]
            ref[(2, 2, 0, 0)]=(0.621662319674+0.772509022069j)/(o+1.)+((-0.407993394059-0.0595388388551j))+((-0.793930585458-0.941228372352j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.536787001169+0.312119312691j)*x[0]**o + ((-0.579688520474+0.153235883538j))*x[0] + ((-0.80913669138+0.758623589761j))*x[1]**o + ((0.525397598944+0.0754341558232j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.80913669138+0.758623589761j)/(o+1.)+((-0.0271454607649+0.114335019681j))+((0.536787001169+0.312119312691j))*0.5**o
            arg[(2, 2, 0, 2)]=(0.552374641404+0.0419346735235j)*x[0]**o + ((0.735514624783-0.383308847791j))*x[0] + ((-0.955467956582-0.931058160823j))*x[1]**o + ((0.581755371955-0.0640486959845j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.955467956582-0.931058160823j)/(o+1.)+((0.658634998369-0.223678771888j))+((0.552374641404+0.0419346735235j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.0190235988697+0.846976191795j)*x[0]**o + ((0.596198345262+0.219249071316j))*x[0] + ((0.284123368655+0.39882852059j))*x[1]**o + ((0.956340189922+0.852067091939j))*x[1]
            ref[(2, 2, 1, 0)]=(0.284123368655+0.39882852059j)/(o+1.)+((0.776269267592+0.535658081628j))+((0.0190235988697+0.846976191795j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.616414746496-0.749986140303j)*x[0]**o + ((0.0470627393691+0.014266698704j))*x[0] + ((0.721231634121+0.339223360747j))*x[1]**o + ((-0.162774352629+0.376433950484j))*x[1]
            ref[(2, 2, 1, 1)]=(0.721231634121+0.339223360747j)/(o+1.)+((-0.0578558066299+0.195350324594j))+((0.616414746496-0.749986140303j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.969570586008-0.509845444214j)*x[0]**o + ((0.401299369634-8.21037346479e-05j))*x[0] + ((-0.361188873518-0.99479696506j))*x[1]**o + ((-0.0833333357423+0.149745259108j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.361188873518-0.99479696506j)/(o+1.)+((0.158983016946+0.0748315776865j))+((-0.969570586008-0.509845444214j))*0.5**o
            arg[(2, 2, 2, 0)]=(-0.881079814079-0.917665459247j)*x[0]**o + ((0.725459122123-0.20589004935j))*x[0] + ((-0.89054059641+0.421575166119j))*x[1]**o + ((-0.931176548473+0.63273337502j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.89054059641+0.421575166119j)/(o+1.)+((-0.102858713175+0.213421662835j))+((-0.881079814079-0.917665459247j))*0.5**o
            arg[(2, 2, 2, 1)]=(-0.414746058947-0.749508424858j)*x[0]**o + ((0.988463804043+0.347968807426j))*x[0] + ((-0.415999368161-0.96240449817j))*x[1]**o + ((0.714496175867-0.163921697149j))*x[1]
            ref[(2, 2, 2, 1)]=(-0.415999368161-0.96240449817j)/(o+1.)+((0.851479989955+0.0920235551386j))+((-0.414746058947-0.749508424858j))*0.5**o
            arg[(2, 2, 2, 2)]=(-0.579040701997+0.962653798878j)*x[0]**o + ((0.535172542684+0.771659377057j))*x[0] + ((0.670086683892+0.95550124094j))*x[1]**o + ((-0.903309013754-0.35470772461j))*x[1]
            ref[(2, 2, 2, 2)]=(0.670086683892+0.95550124094j)/(o+1.)+((-0.184068235535+0.208475826224j))+((-0.579040701997+0.962653798878j))*0.5**o
            arg[(2, 3, 0, 0)]=(0.836608727455+0.369054321334j)*x[0]**o + ((0.14090169748+0.467543747354j))*x[0] + ((0.0746696529624-0.343046110173j))*x[1]**o + ((0.896023396745+0.707092403215j))*x[1]
            ref[(2, 3, 0, 0)]=(0.0746696529624-0.343046110173j)/(o+1.)+((0.518462547112+0.587318075285j))+((0.836608727455+0.369054321334j))*0.5**o
            arg[(2, 3, 0, 1)]=(0.792376360898-0.540458994537j)*x[0]**o + ((-0.663871550653+0.840300386057j))*x[0] + ((0.0415454122937-0.0862172095564j))*x[1]**o + ((-0.361606761271+0.678234414446j))*x[1]
            ref[(2, 3, 0, 1)]=(0.0415454122937-0.0862172095564j)/(o+1.)+((-0.512739155962+0.759267400251j))+((0.792376360898-0.540458994537j))*0.5**o
            arg[(2, 3, 0, 2)]=(-0.723661849248-0.338338591476j)*x[0]**o + ((0.83168489284+0.614060217262j))*x[0] + ((-0.153253511107+0.521769499954j))*x[1]**o + ((0.418707011733+0.184818219775j))*x[1]
            ref[(2, 3, 0, 2)]=(-0.153253511107+0.521769499954j)/(o+1.)+((0.625195952287+0.399439218519j))+((-0.723661849248-0.338338591476j))*0.5**o
            arg[(2, 3, 1, 0)]=(-0.283920221029-0.750181480227j)*x[0]**o + ((0.610575913098-0.350890630134j))*x[0] + ((0.688851491169-0.150833181787j))*x[1]**o + ((0.216855719763-0.783238765808j))*x[1]
            ref[(2, 3, 1, 0)]=(0.688851491169-0.150833181787j)/(o+1.)+((0.41371581643-0.567064697971j))+((-0.283920221029-0.750181480227j))*0.5**o
            arg[(2, 3, 1, 1)]=(-0.690145771796+0.560377938839j)*x[0]**o + ((-0.617932339867-0.212580613317j))*x[0] + ((0.542417260755+0.345894516375j))*x[1]**o + ((0.684169795592-0.699201089601j))*x[1]
            ref[(2, 3, 1, 1)]=(0.542417260755+0.345894516375j)/(o+1.)+((0.0331187278629-0.455890851459j))+((-0.690145771796+0.560377938839j))*0.5**o
            arg[(2, 3, 1, 2)]=(0.531486160216-0.404259010275j)*x[0]**o + ((0.345163498593-0.501092581234j))*x[0] + ((0.273983281356-0.864403914409j))*x[1]**o + ((0.30127079029-0.154571110524j))*x[1]
            ref[(2, 3, 1, 2)]=(0.273983281356-0.864403914409j)/(o+1.)+((0.323217144441-0.327831845879j))+((0.531486160216-0.404259010275j))*0.5**o
            arg[(2, 3, 2, 0)]=(0.4313922797-0.0350339856132j)*x[0]**o + ((0.353303709035-0.83157301717j))*x[0] + ((-0.710268152002-0.0557781227942j))*x[1]**o + ((0.331471689632+0.957999180007j))*x[1]
            ref[(2, 3, 2, 0)]=(-0.710268152002-0.0557781227942j)/(o+1.)+((0.342387699333+0.0632130814184j))+((0.4313922797-0.0350339856132j))*0.5**o
            arg[(2, 3, 2, 1)]=(0.228981554595+0.882504189912j)*x[0]**o + ((-0.556120743827+0.618824549948j))*x[0] + ((-0.170430531761-0.661166927926j))*x[1]**o + ((0.190489543322+0.259254787193j))*x[1]
            ref[(2, 3, 2, 1)]=(-0.170430531761-0.661166927926j)/(o+1.)+((-0.182815600252+0.439039668571j))+((0.228981554595+0.882504189912j))*0.5**o
            arg[(2, 3, 2, 2)]=(-0.67213731241+0.9645829787j)*x[0]**o + ((-0.339719887774-0.323421090115j))*x[0] + ((-0.778533747181-0.0370843641013j))*x[1]**o + ((-0.729751698191+0.219320468771j))*x[1]
            ref[(2, 3, 2, 2)]=(-0.778533747181-0.0370843641013j)/(o+1.)+((-0.534735792982-0.0520503106721j))+((-0.67213731241+0.9645829787j))*0.5**o
            arg[(3, 0, 0, 0)]=(-0.586175586222-0.612431040151j)*x[0]**o + ((0.441497224268+0.215590604145j))*x[0] + ((-0.882338862209+0.635756435054j))*x[1]**o + ((0.600346310101-0.369175780252j))*x[1]
            ref[(3, 0, 0, 0)]=(-0.882338862209+0.635756435054j)/(o+1.)+((0.520921767185-0.0767925880538j))+((-0.586175586222-0.612431040151j))*0.5**o
            arg[(3, 0, 0, 1)]=(-0.873545619751-0.759490273461j)*x[0]**o + ((-0.432388541372+0.789597304869j))*x[0] + ((-0.4536284975+0.401735722473j))*x[1]**o + ((-0.0482032838452+0.961717779615j))*x[1]
            ref[(3, 0, 0, 1)]=(-0.4536284975+0.401735722473j)/(o+1.)+((-0.240295912609+0.875657542242j))+((-0.873545619751-0.759490273461j))*0.5**o
            arg[(3, 0, 0, 2)]=(-0.513880703126+0.84979863816j)*x[0]**o + ((0.217916820627+0.277867117166j))*x[0] + ((-0.22275365191-0.641411823518j))*x[1]**o + ((-0.449053121982+0.49490791377j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.22275365191-0.641411823518j)/(o+1.)+((-0.115568150678+0.386387515468j))+((-0.513880703126+0.84979863816j))*0.5**o
            arg[(3, 0, 1, 0)]=(0.8175375028+0.288433374906j)*x[0]**o + ((-0.147673773585+0.184594375313j))*x[0] + ((-0.463092713379+0.174137030249j))*x[1]**o + ((0.39755829048+0.568130647647j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.463092713379+0.174137030249j)/(o+1.)+((0.124942258448+0.37636251148j))+((0.8175375028+0.288433374906j))*0.5**o
            arg[(3, 0, 1, 1)]=(-0.966863750155-0.582987033293j)*x[0]**o + ((-0.0534350476445-0.632868771182j))*x[0] + ((-0.79706865963+0.510429706638j))*x[1]**o + ((0.80590097105+0.0716753817001j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.79706865963+0.510429706638j)/(o+1.)+((0.376232961703-0.280596694741j))+((-0.966863750155-0.582987033293j))*0.5**o
            arg[(3, 0, 1, 2)]=(0.0206484893779+0.958917704576j)*x[0]**o + ((0.573290219243-0.0398443443269j))*x[0] + ((-0.735296653381-0.239244749249j))*x[1]**o + ((0.725304644239-0.31037481307j))*x[1]
            ref[(3, 0, 1, 2)]=(-0.735296653381-0.239244749249j)/(o+1.)+((0.649297431741-0.175109578699j))+((0.0206484893779+0.958917704576j))*0.5**o
            arg[(3, 0, 2, 0)]=(0.43778444677-0.211943014487j)*x[0]**o + ((0.977149273988+0.0695670639547j))*x[0] + ((0.231171090686-0.707537141052j))*x[1]**o + ((0.566058185683-0.675675336181j))*x[1]
            ref[(3, 0, 2, 0)]=(0.231171090686-0.707537141052j)/(o+1.)+((0.771603729836-0.303054136113j))+((0.43778444677-0.211943014487j))*0.5**o
            arg[(3, 0, 2, 1)]=(-0.380042262051+0.536024329753j)*x[0]**o + ((0.0342324305707-0.0866662065278j))*x[0] + ((0.293218818377-0.329767938096j))*x[1]**o + ((-0.82008023816+0.468528809317j))*x[1]
            ref[(3, 0, 2, 1)]=(0.293218818377-0.329767938096j)/(o+1.)+((-0.392923903794+0.190931301394j))+((-0.380042262051+0.536024329753j))*0.5**o
            arg[(3, 0, 2, 2)]=(0.380666293726+0.144281139986j)*x[0]**o + ((-0.911932618284-0.893422721339j))*x[0] + ((0.582500369885+0.973319869436j))*x[1]**o + ((-0.767922719173-0.739029267015j))*x[1]
            ref[(3, 0, 2, 2)]=(0.582500369885+0.973319869436j)/(o+1.)+((-0.839927668728-0.816225994177j))+((0.380666293726+0.144281139986j))*0.5**o
            arg[(3, 1, 0, 0)]=(0.909063573574+0.264816522324j)*x[0]**o + ((0.443021369548+0.465083376521j))*x[0] + ((-0.561571529984-0.937673613488j))*x[1]**o + ((-0.70379976458-0.158064635099j))*x[1]
            ref[(3, 1, 0, 0)]=(-0.561571529984-0.937673613488j)/(o+1.)+((-0.130389197516+0.153509370711j))+((0.909063573574+0.264816522324j))*0.5**o
            arg[(3, 1, 0, 1)]=(-0.400074829028-0.97838252524j)*x[0]**o + ((-0.985979549553+0.895453950733j))*x[0] + ((-0.37983340088+0.700303624962j))*x[1]**o + ((0.159841177546-0.933716408784j))*x[1]
            ref[(3, 1, 0, 1)]=(-0.37983340088+0.700303624962j)/(o+1.)+((-0.413069186003-0.0191312290251j))+((-0.400074829028-0.97838252524j))*0.5**o
            arg[(3, 1, 0, 2)]=(-0.390084007539-0.648860241179j)*x[0]**o + ((0.816171734716-0.324742998404j))*x[0] + ((0.698740831633-0.0284498782212j))*x[1]**o + ((0.592985465098-0.411353452189j))*x[1]
            ref[(3, 1, 0, 2)]=(0.698740831633-0.0284498782212j)/(o+1.)+((0.704578599907-0.368048225297j))+((-0.390084007539-0.648860241179j))*0.5**o
            arg[(3, 1, 1, 0)]=(-0.118509902169+0.0581402123213j)*x[0]**o + ((0.846419976536-0.048769898066j))*x[0] + ((-0.396333034363-0.315865016439j))*x[1]**o + ((0.203896329493-0.960366348292j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.396333034363-0.315865016439j)/(o+1.)+((0.525158153014-0.504568123179j))+((-0.118509902169+0.0581402123213j))*0.5**o
            arg[(3, 1, 1, 1)]=(-0.192345795822-0.624410873055j)*x[0]**o + ((0.0940307917967-0.864261270706j))*x[0] + ((0.588310246439+0.932826388978j))*x[1]**o + ((0.763259154143+0.419924399029j))*x[1]
            ref[(3, 1, 1, 1)]=(0.588310246439+0.932826388978j)/(o+1.)+((0.42864497297-0.222168435839j))+((-0.192345795822-0.624410873055j))*0.5**o
            arg[(3, 1, 1, 2)]=(-0.0553881127247+0.736529778064j)*x[0]**o + ((-0.127447493012-0.425997086391j))*x[0] + ((0.130017882238+0.6849655571j))*x[1]**o + ((0.730975404147-0.488181368611j))*x[1]
            ref[(3, 1, 1, 2)]=(0.130017882238+0.6849655571j)/(o+1.)+((0.301763955567-0.457089227501j))+((-0.0553881127247+0.736529778064j))*0.5**o
            arg[(3, 1, 2, 0)]=(-0.747559093016+0.0270987716308j)*x[0]**o + ((-0.0869096997784+0.589077479488j))*x[0] + ((-0.563855256335+0.544247512451j))*x[1]**o + ((-0.305663439126-0.145865459734j))*x[1]
            ref[(3, 1, 2, 0)]=(-0.563855256335+0.544247512451j)/(o+1.)+((-0.196286569452+0.221606009877j))+((-0.747559093016+0.0270987716308j))*0.5**o
            arg[(3, 1, 2, 1)]=(-0.00534157177815+0.00868868481908j)*x[0]**o + ((0.0196985778212-0.683454756586j))*x[0] + ((-0.602697820049+0.19775746003j))*x[1]**o + ((0.1303847766-0.0778672270452j))*x[1]
            ref[(3, 1, 2, 1)]=(-0.602697820049+0.19775746003j)/(o+1.)+((0.0750416772105-0.380660991816j))+((-0.00534157177815+0.00868868481908j))*0.5**o
            arg[(3, 1, 2, 2)]=(0.195111448161+0.430823553903j)*x[0]**o + ((0.714925911394+0.556931209644j))*x[0] + ((-0.278822882429-0.146506282003j))*x[1]**o + ((-0.209606361864-0.965540644995j))*x[1]
            ref[(3, 1, 2, 2)]=(-0.278822882429-0.146506282003j)/(o+1.)+((0.252659774765-0.204304717675j))+((0.195111448161+0.430823553903j))*0.5**o
            arg[(3, 2, 0, 0)]=(0.595220064413-0.219153753877j)*x[0]**o + ((-0.99025811594-0.422533708514j))*x[0] + ((-0.210668586402+0.429415458844j))*x[1]**o + ((0.454321854713-0.550179808551j))*x[1]
            ref[(3, 2, 0, 0)]=(-0.210668586402+0.429415458844j)/(o+1.)+((-0.267968130613-0.486356758532j))+((0.595220064413-0.219153753877j))*0.5**o
            arg[(3, 2, 0, 1)]=(-0.633831043107-0.816934845709j)*x[0]**o + ((0.777175942863+0.7641033829j))*x[0] + ((-0.560798507381+0.241189766781j))*x[1]**o + ((-0.0516692331856-0.850922201054j))*x[1]
            ref[(3, 2, 0, 1)]=(-0.560798507381+0.241189766781j)/(o+1.)+((0.362753354839-0.043409409077j))+((-0.633831043107-0.816934845709j))*0.5**o
            arg[(3, 2, 0, 2)]=(0.0306556950421-0.740862121255j)*x[0]**o + ((0.497920178318-0.705851760367j))*x[0] + ((0.295144827553-0.102904813777j))*x[1]**o + ((0.588793364213-0.195805349776j))*x[1]
            ref[(3, 2, 0, 2)]=(0.295144827553-0.102904813777j)/(o+1.)+((0.543356771265-0.450828555071j))+((0.0306556950421-0.740862121255j))*0.5**o
            arg[(3, 2, 1, 0)]=(-0.0273266658425+0.171370629458j)*x[0]**o + ((0.121481470436-0.403442570108j))*x[0] + ((-0.676998091916+0.373313418053j))*x[1]**o + ((0.259241164089-0.0776782602065j))*x[1]
            ref[(3, 2, 1, 0)]=(-0.676998091916+0.373313418053j)/(o+1.)+((0.190361317262-0.240560415157j))+((-0.0273266658425+0.171370629458j))*0.5**o
            arg[(3, 2, 1, 1)]=(-0.314687652576-0.93068996065j)*x[0]**o + ((-0.921512414081-0.150258432249j))*x[0] + ((-0.122179370216+0.87045969764j))*x[1]**o + ((0.904556194573-0.50253559659j))*x[1]
            ref[(3, 2, 1, 1)]=(-0.122179370216+0.87045969764j)/(o+1.)+((-0.00847810975425-0.326397014419j))+((-0.314687652576-0.93068996065j))*0.5**o
            arg[(3, 2, 1, 2)]=(-0.677923569463-0.317992017324j)*x[0]**o + ((-0.0711808114529-0.720438784157j))*x[0] + ((-0.0776104939581-0.00632821090283j))*x[1]**o + ((0.0640403192962+0.547605267815j))*x[1]
            ref[(3, 2, 1, 2)]=(-0.0776104939581-0.00632821090283j)/(o+1.)+((-0.00357024607835-0.0864167581712j))+((-0.677923569463-0.317992017324j))*0.5**o
            arg[(3, 2, 2, 0)]=(0.697240766304+0.663511531435j)*x[0]**o + ((0.286321913921+0.599724737247j))*x[0] + ((-0.356251685483+0.228056882499j))*x[1]**o + ((-0.425476952256-0.620729914101j))*x[1]
            ref[(3, 2, 2, 0)]=(-0.356251685483+0.228056882499j)/(o+1.)+((-0.0695775191678-0.010502588427j))+((0.697240766304+0.663511531435j))*0.5**o
            arg[(3, 2, 2, 1)]=(0.176970217913-0.776236762885j)*x[0]**o + ((-0.859859174588-0.629092179057j))*x[0] + ((0.0177353778084+0.832827780597j))*x[1]**o + ((-0.140536359273-0.195252601526j))*x[1]
            ref[(3, 2, 2, 1)]=(0.0177353778084+0.832827780597j)/(o+1.)+((-0.500197766931-0.412172390292j))+((0.176970217913-0.776236762885j))*0.5**o
            arg[(3, 2, 2, 2)]=(-0.564102996757-0.328713262723j)*x[0]**o + ((-0.262567398567-0.424553995658j))*x[0] + ((-0.0784373409508+0.214892220231j))*x[1]**o + ((-0.902720828773-0.400344581463j))*x[1]
            ref[(3, 2, 2, 2)]=(-0.0784373409508+0.214892220231j)/(o+1.)+((-0.58264411367-0.41244928856j))+((-0.564102996757-0.328713262723j))*0.5**o
            arg[(3, 3, 0, 0)]=(-0.935387320117+0.796328360549j)*x[0]**o + ((-0.991610823691-0.155366538596j))*x[0] + ((-0.684540146359+0.770487747583j))*x[1]**o + ((-0.484620562345-0.540294416501j))*x[1]
            ref[(3, 3, 0, 0)]=(-0.684540146359+0.770487747583j)/(o+1.)+((-0.738115693018-0.347830477548j))+((-0.935387320117+0.796328360549j))*0.5**o
            arg[(3, 3, 0, 1)]=(-0.616947396562-0.946675252723j)*x[0]**o + ((0.823333050016-0.143492657604j))*x[0] + ((-0.622755626198+0.894978090326j))*x[1]**o + ((-0.112513425051-0.637798308529j))*x[1]
            ref[(3, 3, 0, 1)]=(-0.622755626198+0.894978090326j)/(o+1.)+((0.355409812483-0.390645483067j))+((-0.616947396562-0.946675252723j))*0.5**o
            arg[(3, 3, 0, 2)]=(-0.250361073285+0.852038204458j)*x[0]**o + ((0.46585520654+0.85937546717j))*x[0] + ((0.928321778833-0.378897790559j))*x[1]**o + ((0.2020222156-0.314308572061j))*x[1]
            ref[(3, 3, 0, 2)]=(0.928321778833-0.378897790559j)/(o+1.)+((0.33393871107+0.272533447555j))+((-0.250361073285+0.852038204458j))*0.5**o
            arg[(3, 3, 1, 0)]=(-0.00684998230272+0.30006635621j)*x[0]**o + ((0.944761222134+0.236352743463j))*x[0] + ((-0.31735344306+0.461812644136j))*x[1]**o + ((-0.497392772751+0.214024547722j))*x[1]
            ref[(3, 3, 1, 0)]=(-0.31735344306+0.461812644136j)/(o+1.)+((0.223684224692+0.225188645593j))+((-0.00684998230272+0.30006635621j))*0.5**o
            arg[(3, 3, 1, 1)]=(0.064497965699-0.0543522499509j)*x[0]**o + ((0.912652621091-0.601896059104j))*x[0] + ((-0.462640783434+0.907253026504j))*x[1]**o + ((-0.954504379591+0.544689577987j))*x[1]
            ref[(3, 3, 1, 1)]=(-0.462640783434+0.907253026504j)/(o+1.)+((-0.0209258792499-0.0286032405584j))+((0.064497965699-0.0543522499509j))*0.5**o
            arg[(3, 3, 1, 2)]=(0.187502296591+0.898696717902j)*x[0]**o + ((-0.733344414228+0.353366397641j))*x[0] + ((-0.0293980435805+0.947850716284j))*x[1]**o + ((-0.497798535816-0.937574093749j))*x[1]
            ref[(3, 3, 1, 2)]=(-0.0293980435805+0.947850716284j)/(o+1.)+((-0.615571475022-0.292103848054j))+((0.187502296591+0.898696717902j))*0.5**o
            arg[(3, 3, 2, 0)]=(0.260925368706-0.290905719665j)*x[0]**o + ((-0.161565048982+0.20489568941j))*x[0] + ((0.436731764679-0.31420964188j))*x[1]**o + ((0.637007750315-0.399145621099j))*x[1]
            ref[(3, 3, 2, 0)]=(0.436731764679-0.31420964188j)/(o+1.)+((0.237721350667-0.0971249658445j))+((0.260925368706-0.290905719665j))*0.5**o
            arg[(3, 3, 2, 1)]=(-0.361605107781+0.274432771698j)*x[0]**o + ((0.262209266247-0.205867401785j))*x[0] + ((0.22758709501-0.875587290482j))*x[1]**o + ((-0.767115625157-0.343472654908j))*x[1]
            ref[(3, 3, 2, 1)]=(0.22758709501-0.875587290482j)/(o+1.)+((-0.252453179455-0.274670028346j))+((-0.361605107781+0.274432771698j))*0.5**o
            arg[(3, 3, 2, 2)]=(-0.892367034457+0.595398448851j)*x[0]**o + ((0.341583218937-0.861507670572j))*x[0] + ((-0.17768094548-0.690270939341j))*x[1]**o + ((0.933397068755-0.212109438492j))*x[1]
            ref[(3, 3, 2, 2)]=(-0.17768094548-0.690270939341j)/(o+1.)+((0.637490143846-0.536808554532j))+((-0.892367034457+0.595398448851j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.736409774216-0.997918860512j)*x[0]**o + ((-0.584900033997-0.104526928954j))*x[0] + ((-0.561671040417+0.186066193577j))*x[1]**o + ((-0.46604987913-0.828178842537j))*x[1] + ((0.765801024582-0.870947748407j))*x[2]**o + ((-0.980141123671+0.958232512996j))*x[2]
            ref[(0, 0, 0, 0)]=(0.204129984165-0.68488155483j)/(o+1.)+((-1.0155455184+0.012763370752j))+((0.736409774216-0.997918860512j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.135741287833-0.971814707372j)*x[0]**o + ((-0.899466352287+0.136978124658j))*x[0] + ((-0.485537463314-0.13675890571j))*x[1]**o + ((0.811719986377-0.901254751953j))*x[1] + ((0.828835367143-0.914359672805j))*x[2]**o + ((-0.543051010299-0.333005041708j))*x[2]
            ref[(0, 0, 0, 1)]=(0.343297903829-1.05111857852j)/(o+1.)+((-0.315398688104-0.548640834502j))+((0.135741287833-0.971814707372j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.198762648465+0.740016419215j)*x[0]**o + ((0.158218853222-0.428135096506j))*x[0] + ((-0.891379818006+0.89329083893j))*x[1]**o + ((0.810523583564-0.116064884778j))*x[1] + ((0.0504593594211-0.272050541383j))*x[2]**o + ((-0.715944259714-0.261358722396j))*x[2]
            ref[(0, 0, 0, 2)]=(-0.840920458585+0.621240297547j)/(o+1.)+((0.126399088536-0.40277935184j))+((-0.198762648465+0.740016419215j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.432117432125+0.0875436103348j)*x[0]**o + ((-0.940176857238+0.2685902728j))*x[0] + ((0.390861116556-0.376353339466j))*x[1]**o + ((-0.78905808007-0.239758455165j))*x[1] + ((-0.320372912928+0.272881045403j))*x[2]**o + ((-0.266502054069-0.070171517024j))*x[2]
            ref[(0, 0, 1, 0)]=(0.0704882036281-0.103472294063j)/(o+1.)+((-0.997868495688-0.0206698496945j))+((-0.432117432125+0.0875436103348j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.632713323802-0.324018448593j)*x[0]**o + ((0.4785511991+0.0180664199884j))*x[0] + ((-0.601809961304+0.892398331123j))*x[1]**o + ((0.893605410339-0.895269250387j))*x[1] + ((-0.550528939298+0.395996043481j))*x[2]**o + ((-0.14309508246+0.961953886388j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.1523389006+1.2883943746j)/(o+1.)+((0.614530763489+0.0423755279946j))+((-0.632713323802-0.324018448593j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.0316206716752+0.233596683468j)*x[0]**o + ((-0.307538426479+0.385570839445j))*x[0] + ((0.67408284491+0.689760954337j))*x[1]**o + ((-0.266548962747+0.121979382565j))*x[1] + ((-0.484971182663-0.938138281622j))*x[2]**o + ((0.481628926224+0.295512188582j))*x[2]
            ref[(0, 0, 1, 2)]=(0.189111662247-0.248377327286j)/(o+1.)+((-0.0462292315011+0.401531205297j))+((0.0316206716752+0.233596683468j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.822447243662-0.276198735358j)*x[0]**o + ((0.714653861194-0.895324046479j))*x[0] + ((0.489029213221-0.204698528899j))*x[1]**o + ((0.843174815643+0.846105827729j))*x[1] + ((-0.553796968349-0.839717986245j))*x[2]**o + ((0.315544297462-0.336988546967j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.0647677551283-1.04441651514j)/(o+1.)+((0.93668648715-0.193103382858j))+((0.822447243662-0.276198735358j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.766299963736-0.320246975553j)*x[0]**o + ((0.337753998399+0.488745776424j))*x[0] + ((-0.919534499701+0.558599379931j))*x[1]**o + ((0.228304058504-0.180683632559j))*x[1] + ((-0.0897142901116-0.513650952962j))*x[2]**o + ((0.865724572868+0.752512210822j))*x[2]
            ref[(0, 0, 2, 1)]=(-1.00924878981+0.0449484269685j)/(o+1.)+((0.715891314885+0.530287177343j))+((-0.766299963736-0.320246975553j))*0.5**o
            arg[(0, 0, 2, 2)]=(-0.892607689771+0.0756876426311j)*x[0]**o + ((-0.398180250108+0.518244414904j))*x[0] + ((0.757927039059-0.939419789559j))*x[1]**o + ((-0.0376716329204+0.213212012965j))*x[1] + ((0.937752482842+0.849650536486j))*x[2]**o + ((0.619573509484-0.942549182768j))*x[2]
            ref[(0, 0, 2, 2)]=(1.6956795219-0.0897692530735j)/(o+1.)+((0.091860813228-0.10554637745j))+((-0.892607689771+0.0756876426311j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.493662233147-0.020675905531j)*x[0]**o + ((-0.803225577423+0.713138045212j))*x[0] + ((0.506678496053+0.177606683837j))*x[1]**o + ((-0.84000779441-0.77018881611j))*x[1] + ((-0.200344011723-0.471101722503j))*x[2]**o + ((-0.096239033536+0.169014815353j))*x[2]
            ref[(0, 1, 0, 0)]=(0.30633448433-0.293495038666j)/(o+1.)+((-0.869736202685+0.0559820222278j))+((-0.493662233147-0.020675905531j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.865026631698-0.956896537483j)*x[0]**o + ((-0.751760600265+0.663035630433j))*x[0] + ((-0.216319018612-0.737925646876j))*x[1]**o + ((-0.951541155798+0.0100105115645j))*x[1] + ((-0.8365962751-0.406077518442j))*x[2]**o + ((0.346885684419+0.91137378545j))*x[2]
            ref[(0, 1, 0, 1)]=(-1.05291529371-1.14400316532j)/(o+1.)+((-0.678208035822+0.792209963724j))+((0.865026631698-0.956896537483j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.165541505122-0.281791198956j)*x[0]**o + ((0.533036328434-0.153807874173j))*x[0] + ((0.969854818769-0.881850110649j))*x[1]**o + ((-0.500483083396-0.101453872946j))*x[1] + ((0.980297346039-0.762951478486j))*x[2]**o + ((-0.1197156576+0.432614735943j))*x[2]
            ref[(0, 1, 0, 2)]=(1.95015216481-1.64480158913j)/(o+1.)+((-0.0435812062808+0.0886764944118j))+((-0.165541505122-0.281791198956j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.943640778969+0.0284761723258j)*x[0]**o + ((0.375259211044+0.453676696529j))*x[0] + ((-0.130972968159+0.210251579767j))*x[1]**o + ((0.119000187953-0.400150935707j))*x[1] + ((0.554432443234-0.371899448026j))*x[2]**o + ((0.862869860204-0.657025021827j))*x[2]
            ref[(0, 1, 1, 0)]=(0.423459475075-0.161647868259j)/(o+1.)+((0.678564629601-0.301749630503j))+((0.943640778969+0.0284761723258j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.0244220571469-0.958360311789j)*x[0]**o + ((0.453390274388-0.0796421693083j))*x[0] + ((-0.154038304983-0.96356864624j))*x[1]**o + ((-0.613994995505-0.357875282221j))*x[1] + ((0.900841471628+0.404614945423j))*x[2]**o + ((-0.846253331167-0.0527889287038j))*x[2]
            ref[(0, 1, 1, 1)]=(0.746803166645-0.558953700818j)/(o+1.)+((-0.503429026142-0.245153190116j))+((-0.0244220571469-0.958360311789j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.73512326919+0.983352040838j)*x[0]**o + ((0.641544053465-0.395102956917j))*x[0] + ((-0.249329977327-0.14687176344j))*x[1]**o + ((0.256971297152-0.536874272876j))*x[1] + ((-0.472064451894-0.46855659313j))*x[2]**o + ((-0.765314280403+0.39697666541j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.721394429221-0.61542835657j)/(o+1.)+((0.0666005351073-0.267500282192j))+((0.73512326919+0.983352040838j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.744982416875+0.276351971677j)*x[0]**o + ((-2.2084849167e-05-0.329788544426j))*x[0] + ((0.307280087892-0.748378287432j))*x[1]**o + ((0.528508471415-0.920025138601j))*x[1] + ((-0.378108538145+0.628346196828j))*x[2]**o + ((-0.507121900965-0.0334171894341j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.0708284502538-0.120032090604j)/(o+1.)+((0.0106822428004-0.641615436231j))+((0.744982416875+0.276351971677j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.0708303947803+0.972263816123j)*x[0]**o + ((0.92762587348+0.323279684251j))*x[0] + ((-0.751832203078-0.0309354671503j))*x[1]**o + ((0.243276538006-0.890817426335j))*x[1] + ((-0.418772451867+0.588261601251j))*x[2]**o + ((0.254661480917+0.784471814237j))*x[2]
            ref[(0, 1, 2, 1)]=(-1.17060465495+0.557326134101j)/(o+1.)+((0.712781946201+0.108467036076j))+((-0.0708303947803+0.972263816123j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.142921830303-0.174980130205j)*x[0]**o + ((0.491965819507-0.397484876253j))*x[0] + ((0.37811521698+0.72901689j))*x[1]**o + ((-0.113460183725+0.13950696337j))*x[1] + ((0.292191992329+0.0623244730863j))*x[2]**o + ((0.88544695083-0.987367228173j))*x[2]
            ref[(0, 1, 2, 2)]=(0.670307209309+0.791341363086j)/(o+1.)+((0.631976293306-0.622672570528j))+((-0.142921830303-0.174980130205j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.89979139472-0.587022014005j)*x[0]**o + ((0.897803199559-0.231996100597j))*x[0] + ((0.297773004093+0.446441164489j))*x[1]**o + ((0.211708650018+0.100016041779j))*x[1] + ((0.366479488166-0.702347452666j))*x[2]**o + ((0.0212011154382-0.697531652438j))*x[2]
            ref[(0, 2, 0, 0)]=(0.664252492259-0.255906288177j)/(o+1.)+((0.565356482508-0.414755855628j))+((-0.89979139472-0.587022014005j))*0.5**o
            arg[(0, 2, 0, 1)]=(-0.770161580869-0.710025272627j)*x[0]**o + ((-0.527436291888-0.922264874176j))*x[0] + ((-0.67775263102+0.877364248851j))*x[1]**o + ((0.274828385414+0.957808894026j))*x[1] + ((-0.53143930655-0.620468970832j))*x[2]**o + ((0.805328365887+0.388298402341j))*x[2]
            ref[(0, 2, 0, 1)]=(-1.20919193757+0.256895278019j)/(o+1.)+((0.276360229706+0.211921211096j))+((-0.770161580869-0.710025272627j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.184215497938+0.752991997415j)*x[0]**o + ((-0.56220107321+0.125721064714j))*x[0] + ((0.751581053799-0.579610801325j))*x[1]**o + ((0.948267228095+0.954825091921j))*x[1] + ((-0.776893330212-0.435501731847j))*x[2]**o + ((0.477917575875-0.866041733774j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.0253122764133-1.01511253317j)/(o+1.)+((0.43199186538+0.10725221143j))+((0.184215497938+0.752991997415j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.259939645699-0.907444851336j)*x[0]**o + ((0.494522554724-0.0826115404368j))*x[0] + ((0.853051537105-0.137513925772j))*x[1]**o + ((-0.650947875447-0.0722959207798j))*x[1] + ((-0.439993267366+0.428332499847j))*x[2]**o + ((-0.0298190454699-0.7877413971j))*x[2]
            ref[(0, 2, 1, 0)]=(0.413058269739+0.290818574075j)/(o+1.)+((-0.0931221830964-0.471324429158j))+((0.259939645699-0.907444851336j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.533943119066+0.763180901225j)*x[0]**o + ((-0.911779417674-0.164332538478j))*x[0] + ((0.0453670652313-0.480046827947j))*x[1]**o + ((-0.554113470076-0.885849609915j))*x[1] + ((0.633349846085-0.0264111402343j))*x[2]**o + ((0.928596781906-0.657723573334j))*x[2]
            ref[(0, 2, 1, 1)]=(0.678716911316-0.506457968182j)/(o+1.)+((-0.268648052921-0.853952860864j))+((0.533943119066+0.763180901225j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.097155702461+0.48382732253j)*x[0]**o + ((-0.0601377007111-0.0471976886816j))*x[0] + ((0.295650362794-0.567843684096j))*x[1]**o + ((-0.0135357387305+0.796186337896j))*x[1] + ((0.0817701232488-0.168120272013j))*x[2]**o + ((-0.920421097946-0.922884457352j))*x[2]
            ref[(0, 2, 1, 2)]=(0.377420486043-0.735963956109j)/(o+1.)+((-0.497047268694-0.086947904069j))+((-0.097155702461+0.48382732253j))*0.5**o
            arg[(0, 2, 2, 0)]=(0.237646209587-0.0813274318849j)*x[0]**o + ((-0.660992505242+0.829593192758j))*x[0] + ((0.227191695896+0.0603606311991j))*x[1]**o + ((-0.603481566243+0.443588410789j))*x[1] + ((0.157444060678-0.791419411038j))*x[2]**o + ((-0.780488378182+0.394272569011j))*x[2]
            ref[(0, 2, 2, 0)]=(0.384635756573-0.731058779839j)/(o+1.)+((-1.02248122483+0.833727086279j))+((0.237646209587-0.0813274318849j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.143628852676+0.621680364232j)*x[0]**o + ((-0.0258180357324-0.241848703612j))*x[0] + ((0.314098105644+0.754200296305j))*x[1]**o + ((0.603345610004+0.414900231214j))*x[1] + ((-0.740988675131-0.976189173574j))*x[2]**o + ((-0.997656947331-0.683875493011j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.426890569486-0.221988877268j)/(o+1.)+((-0.21006468653-0.255411982705j))+((0.143628852676+0.621680364232j))*0.5**o
            arg[(0, 2, 2, 2)]=(-0.352639499039+0.104891229051j)*x[0]**o + ((-0.947668446331+0.35339263531j))*x[0] + ((-0.096182271565+0.941489976846j))*x[1]**o + ((-0.790743628886-0.450189186926j))*x[1] + ((0.418010945597-0.330378362633j))*x[2]**o + ((-0.664885395113-0.412802975777j))*x[2]
            ref[(0, 2, 2, 2)]=(0.321828674032+0.611111614212j)/(o+1.)+((-1.20164873517-0.254799763696j))+((-0.352639499039+0.104891229051j))*0.5**o
            arg[(0, 3, 0, 0)]=(0.424766851973+0.933440125174j)*x[0]**o + ((0.222337282223+0.682231370804j))*x[0] + ((0.747267037178+0.240606038103j))*x[1]**o + ((0.833206448675+0.548419655716j))*x[1] + ((0.289206442821-0.345524770387j))*x[2]**o + ((0.562516986759+0.838067192909j))*x[2]
            ref[(0, 3, 0, 0)]=(1.03647348-0.104918732284j)/(o+1.)+((0.809030358828+1.03435910971j))+((0.424766851973+0.933440125174j))*0.5**o
            arg[(0, 3, 0, 1)]=(0.89143088112+0.305961327777j)*x[0]**o + ((-0.649193041911+0.751568874842j))*x[0] + ((-0.597993423588+0.834265068317j))*x[1]**o + ((0.704252643292-0.901122529757j))*x[1] + ((-0.696482986409-0.4154001943j))*x[2]**o + ((0.169479213278-0.720271290401j))*x[2]
            ref[(0, 3, 0, 1)]=(-1.29447641+0.418864874016j)/(o+1.)+((0.112269407329-0.434912472658j))+((0.89143088112+0.305961327777j))*0.5**o
            arg[(0, 3, 0, 2)]=(0.780077081103+0.798917240617j)*x[0]**o + ((0.0345458867364-0.12963306878j))*x[0] + ((-0.415545692664+0.0988302703181j))*x[1]**o + ((0.673348773297+0.185249297416j))*x[1] + ((-0.891831753661-0.71404566689j))*x[2]**o + ((-0.679495690034+0.553013475184j))*x[2]
            ref[(0, 3, 0, 2)]=(-1.30737744633-0.615215396571j)/(o+1.)+((0.0141994849996+0.30431485191j))+((0.780077081103+0.798917240617j))*0.5**o
            arg[(0, 3, 1, 0)]=(0.0750489251492-0.254356722654j)*x[0]**o + ((0.399684868671-0.221823543177j))*x[0] + ((-0.622631427471+0.0814518882064j))*x[1]**o + ((0.313263345352+0.130969966684j))*x[1] + ((-0.236565439275-0.610788906144j))*x[2]**o + ((0.275482139101+0.70436251339j))*x[2]
            ref[(0, 3, 1, 0)]=(-0.859196866746-0.529337017937j)/(o+1.)+((0.494215176562+0.306754468449j))+((0.0750489251492-0.254356722654j))*0.5**o
            arg[(0, 3, 1, 1)]=(-0.534481334728+0.370416920965j)*x[0]**o + ((-0.0383807116288+0.0216848071767j))*x[0] + ((-0.517989738066+0.677758812719j))*x[1]**o + ((0.928006519319+0.158403087936j))*x[1] + ((-0.767201856662+0.979376268108j))*x[2]**o + ((-0.087044268042+0.649934201771j))*x[2]
            ref[(0, 3, 1, 1)]=(-1.28519159473+1.65713508083j)/(o+1.)+((0.401290769824+0.415011048442j))+((-0.534481334728+0.370416920965j))*0.5**o
            arg[(0, 3, 1, 2)]=(0.225540766881-0.393012828259j)*x[0]**o + ((-0.404719609004-0.873437309663j))*x[0] + ((0.670859891004-0.770793328556j))*x[1]**o + ((-0.573969155852+0.444059369287j))*x[1] + ((-0.274746160094-0.741901824826j))*x[2]**o + ((0.951647494693-0.340287434506j))*x[2]
            ref[(0, 3, 1, 2)]=(0.39611373091-1.51269515338j)/(o+1.)+((-0.0135206350818-0.384832687441j))+((0.225540766881-0.393012828259j))*0.5**o
            arg[(0, 3, 2, 0)]=(-0.708541843349+0.289648466502j)*x[0]**o + ((-0.345636804866+0.592483221871j))*x[0] + ((-0.0478748388037+0.495987100335j))*x[1]**o + ((-0.928445976631+0.471847862023j))*x[1] + ((-0.706162630135+0.262333094816j))*x[2]**o + ((0.689412463394+0.99352478834j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.754037468939+0.758320195151j)/(o+1.)+((-0.292335159052+1.02892793612j))+((-0.708541843349+0.289648466502j))*0.5**o
            arg[(0, 3, 2, 1)]=(0.218693401007-0.784035805991j)*x[0]**o + ((-0.0772615928099+0.471534272677j))*x[0] + ((0.497209349066+0.122551193587j))*x[1]**o + ((0.854637622514-0.496980218431j))*x[1] + ((0.852248983976+0.950092173397j))*x[2]**o + ((0.27820957063+0.959626349168j))*x[2]
            ref[(0, 3, 2, 1)]=(1.34945833304+1.07264336698j)/(o+1.)+((0.527792800167+0.467090201707j))+((0.218693401007-0.784035805991j))*0.5**o
            arg[(0, 3, 2, 2)]=(0.0156875838187+0.875527488753j)*x[0]**o + ((0.461374016458+0.194799591296j))*x[0] + ((0.467597068513-0.268759590814j))*x[1]**o + ((-0.797183992619+0.961357797719j))*x[1] + ((0.388938941148+0.784699682424j))*x[2]**o + ((-0.386196901567+0.425429970502j))*x[2]
            ref[(0, 3, 2, 2)]=(0.856536009661+0.51594009161j)/(o+1.)+((-0.361003438864+0.790793679758j))+((0.0156875838187+0.875527488753j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.11711027173-0.359455632214j)*x[0]**o + ((-0.713367647338+0.892013479698j))*x[0] + ((0.853297926768+0.93973871126j))*x[1]**o + ((0.219879063764+0.00178712629611j))*x[1] + ((0.406363721506+0.354639793245j))*x[2]**o + ((-0.826559539611-0.667364206321j))*x[2]
            ref[(1, 0, 0, 0)]=(1.25966164827+1.2943785045j)/(o+1.)+((-0.660024061592+0.113218199837j))+((0.11711027173-0.359455632214j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.0102533370335-0.511479158723j)*x[0]**o + ((-0.827492310394+0.654728176618j))*x[0] + ((-0.0684928306682-0.413778819566j))*x[1]**o + ((0.636412726696-0.919687353101j))*x[1] + ((0.32274297861-0.802422667959j))*x[2]**o + ((0.486403712661+0.117929170036j))*x[2]
            ref[(1, 0, 0, 1)]=(0.254250147942-1.21620148753j)/(o+1.)+((0.147662064482-0.0735150032235j))+((0.0102533370335-0.511479158723j))*0.5**o
            arg[(1, 0, 0, 2)]=(0.507484129633-0.29003249995j)*x[0]**o + ((-0.617109366399-0.778264003527j))*x[0] + ((-0.0421532706889-0.732186234653j))*x[1]**o + ((-0.946615069278-0.513598281045j))*x[1] + ((0.260710552451-0.301579971377j))*x[2]**o + ((0.940307400954+0.694020111741j))*x[2]
            ref[(1, 0, 0, 2)]=(0.218557281762-1.03376620603j)/(o+1.)+((-0.311708517361-0.298921086415j))+((0.507484129633-0.29003249995j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.365991121663-0.552556780527j)*x[0]**o + ((0.888808598273-0.817719637233j))*x[0] + ((-0.975628968562-0.896133149365j))*x[1]**o + ((0.932693935606-0.201541689838j))*x[1] + ((-0.706811425983-0.264695686537j))*x[2]**o + ((-0.0750565231762-0.446014331626j))*x[2]
            ref[(1, 0, 1, 0)]=(-1.68244039455-1.1608288359j)/(o+1.)+((0.873223005351-0.732637829348j))+((-0.365991121663-0.552556780527j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.466921838303-0.921625232125j)*x[0]**o + ((0.236137766777-0.351047581176j))*x[0] + ((-0.277559278422+0.346308544549j))*x[1]**o + ((0.3782293915-0.799539468168j))*x[1] + ((0.381741246417-0.173003280089j))*x[2]**o + ((-0.944288738135-0.59633647907j))*x[2]
            ref[(1, 0, 1, 1)]=(0.104181967995+0.17330526446j)/(o+1.)+((-0.164960789929-0.873461764207j))+((-0.466921838303-0.921625232125j))*0.5**o
            arg[(1, 0, 1, 2)]=(-0.747649747041-0.298210404003j)*x[0]**o + ((-0.454816591974+0.827702181526j))*x[0] + ((-0.16271165822+0.231445335972j))*x[1]**o + ((-0.35084445256-0.911423270972j))*x[1] + ((0.658964990572+0.787907095499j))*x[2]**o + ((-0.495619603632-0.434758568069j))*x[2]
            ref[(1, 0, 1, 2)]=(0.496253332352+1.01935243147j)/(o+1.)+((-0.650640324083-0.259239828758j))+((-0.747649747041-0.298210404003j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.511345698565+0.0484439100434j)*x[0]**o + ((-0.996786925866-0.957667763407j))*x[0] + ((0.410178289846+0.90961895331j))*x[1]**o + ((0.932183693102-0.200186192962j))*x[1] + ((-0.992742756167-0.179607522081j))*x[2]**o + ((0.563652424056+0.265936833266j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.582564466321+0.73001143123j)/(o+1.)+((0.249524595646-0.445958561552j))+((0.511345698565+0.0484439100434j))*0.5**o
            arg[(1, 0, 2, 1)]=(-0.119742786458+0.855344393404j)*x[0]**o + ((0.241515058739+0.183180968162j))*x[0] + ((-0.985708510943+0.259614157413j))*x[1]**o + ((0.741047606749+0.295503725479j))*x[1] + ((0.00744940862544+0.184817278137j))*x[2]**o + ((-0.332189540504+0.683066740594j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.978259102317+0.44443143555j)/(o+1.)+((0.325186562492+0.580875717117j))+((-0.119742786458+0.855344393404j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.970256596523+0.838335161041j)*x[0]**o + ((-0.903712245052+0.276645117042j))*x[0] + ((0.553078815697+0.428902934135j))*x[1]**o + ((0.478487093931+0.705003515708j))*x[1] + ((-0.986056291325+0.990164038793j))*x[2]**o + ((-0.00974579304157+0.303299964063j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.432977475627+1.41906697293j)/(o+1.)+((-0.217485472081+0.642474298406j))+((-0.970256596523+0.838335161041j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.12455007938+0.186600069613j)*x[0]**o + ((0.302698732836-0.662581714399j))*x[0] + ((0.21486664812-0.819588762047j))*x[1]**o + ((-0.0974158828748+0.128565261588j))*x[1] + ((-0.436330276472-0.140291803093j))*x[2]**o + ((0.99158480296-0.694369391048j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.221463628352-0.95988056514j)/(o+1.)+((0.59843382646-0.61419292193j))+((-0.12455007938+0.186600069613j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.272496328018+0.595441409277j)*x[0]**o + ((0.746906343318+0.9714284223j))*x[0] + ((0.261001074712+0.390249211577j))*x[1]**o + ((-0.324010558526-0.0546439683445j))*x[1] + ((-0.0934335785222+0.592590060865j))*x[2]**o + ((0.670105134916+0.900529337588j))*x[2]
            ref[(1, 1, 0, 1)]=(0.167567496189+0.982839272442j)/(o+1.)+((0.546500459854+0.908656895771j))+((0.272496328018+0.595441409277j))*0.5**o
            arg[(1, 1, 0, 2)]=(-0.427705138132-0.376283633273j)*x[0]**o + ((0.681106939946+0.922540286936j))*x[0] + ((0.882065356454+0.754920883688j))*x[1]**o + ((-0.899527909764+0.24018920391j))*x[1] + ((-0.233920604144+0.905840448208j))*x[2]**o + ((-0.41413704117+0.318150972503j))*x[2]
            ref[(1, 1, 0, 2)]=(0.64814475231+1.6607613319j)/(o+1.)+((-0.316279005494+0.740440231674j))+((-0.427705138132-0.376283633273j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.251551866744+0.164569094693j)*x[0]**o + ((-0.764457042892+0.234785085103j))*x[0] + ((-0.100237754463+0.306354422577j))*x[1]**o + ((-0.871207471165-0.980347202605j))*x[1] + ((0.130203111374-0.986947833965j))*x[2]**o + ((-0.50089894606+0.40467006845j))*x[2]
            ref[(1, 1, 1, 0)]=(0.0299653569103-0.680593411388j)/(o+1.)+((-1.06828173006-0.170446024526j))+((0.251551866744+0.164569094693j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.988288297842-0.76477692837j)*x[0]**o + ((0.742324404822-0.188338442165j))*x[0] + ((0.48916716389+0.901350204106j))*x[1]**o + ((-0.152878814278+0.430693585486j))*x[1] + ((-0.514819796808-0.91320794481j))*x[2]**o + ((0.437232864293-0.315535001425j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.0256526329182-0.0118577407036j)/(o+1.)+((0.513339227418-0.0365899290516j))+((-0.988288297842-0.76477692837j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.740493259697-0.903169774212j)*x[0]**o + ((0.858186334526-0.724641257148j))*x[0] + ((0.312992935158+0.566997770713j))*x[1]**o + ((0.940343849977-0.232445884222j))*x[1] + ((-0.515442721453+0.553836092381j))*x[2]**o + ((-0.510833754419+0.421932457952j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.202449786295+1.12083386309j)/(o+1.)+((0.643848215042-0.267577341709j))+((0.740493259697-0.903169774212j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.884119198442+0.260856974557j)*x[0]**o + ((0.520036475856-0.768173768292j))*x[0] + ((0.769679342662+0.42083542205j))*x[1]**o + ((0.0740026712863+0.510414283412j))*x[1] + ((-0.803321117699-0.0537319979249j))*x[2]**o + ((0.524717800904+0.716716203949j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.0336417750372+0.367103424125j)/(o+1.)+((0.559378474023+0.229478359534j))+((0.884119198442+0.260856974557j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.88472420364-0.827422991056j)*x[0]**o + ((0.341937300584+0.897018657309j))*x[0] + ((0.300784482587-0.0281480934071j))*x[1]**o + ((0.356448850637+0.578001458257j))*x[1] + ((-0.569527211731+0.119652659535j))*x[2]**o + ((0.087440632036+0.787561407779j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.268742729143+0.0915045661281j)/(o+1.)+((0.392913391628+1.13129076167j))+((-0.88472420364-0.827422991056j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.0399844056204-0.168865527774j)*x[0]**o + ((-0.161490287263-0.0957690464955j))*x[0] + ((0.303997934565-0.972346598032j))*x[1]**o + ((0.0560046694832+0.870161568886j))*x[1] + ((0.77777450279+0.645814119181j))*x[2]**o + ((-0.27969564784-0.694729052758j))*x[2]
            ref[(1, 1, 2, 2)]=(1.08177243735-0.326532478852j)/(o+1.)+((-0.19259063281+0.0398317348161j))+((0.0399844056204-0.168865527774j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.960355002038+0.609503890046j)*x[0]**o + ((0.420801502615+0.333792861291j))*x[0] + ((0.170575860552+0.801448871252j))*x[1]**o + ((0.0295932365677-0.261720776261j))*x[1] + ((-0.917871209423-0.848658800577j))*x[2]**o + ((-0.446597837504-0.910572165898j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.747295348871-0.0472099293246j)/(o+1.)+((0.00189845083938-0.419250040434j))+((-0.960355002038+0.609503890046j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.0271685667098+0.746101180968j)*x[0]**o + ((0.607586680388-0.119155228435j))*x[0] + ((-0.0725752434338-0.23164259634j))*x[1]**o + ((-0.487965005654-0.0780764206741j))*x[1] + ((-0.0345815327217-0.263378474326j))*x[2]**o + ((0.0636159646461+0.337902830595j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.107156776155-0.495021070666j)/(o+1.)+((0.0916188196899+0.0703355907429j))+((0.0271685667098+0.746101180968j))*0.5**o
            arg[(1, 2, 0, 2)]=(-0.176486859644-0.513954208964j)*x[0]**o + ((0.40761280643-0.280737579069j))*x[0] + ((-0.960631221611+0.609301894501j))*x[1]**o + ((0.340011487685+0.243987486695j))*x[1] + ((0.462478612754-0.370963129467j))*x[2]**o + ((-0.550456299482+0.793721794711j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.498152608857+0.238338765034j)/(o+1.)+((0.0985839973159+0.378485851168j))+((-0.176486859644-0.513954208964j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.0317949275132-0.622592903637j)*x[0]**o + ((-0.686697563956+0.322932547151j))*x[0] + ((-0.805033808523-0.2788182019j))*x[1]**o + ((-0.699371811505+0.990568921611j))*x[1] + ((0.460082334889-0.350050949471j))*x[2]**o + ((0.522224154575+0.915572755498j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.344951473634-0.628869151371j)/(o+1.)+((-0.431922610443+1.11453711213j))+((-0.0317949275132-0.622592903637j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.871429908333-0.258995765567j)*x[0]**o + ((-0.162798920686+0.576891962296j))*x[0] + ((-0.202840027839+0.317582206306j))*x[1]**o + ((0.986246559695+0.399019859419j))*x[1] + ((-0.57412189468-0.916962074919j))*x[2]**o + ((0.230104680372+0.280174155044j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.776961922519-0.599379868614j)/(o+1.)+((0.526776159691+0.62804298838j))+((0.871429908333-0.258995765567j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.757762024473-0.685087939558j)*x[0]**o + ((-0.766996043252+0.826703055844j))*x[0] + ((-0.457842554482-0.365077047666j))*x[1]**o + ((-0.991801314619+0.389951457764j))*x[1] + ((0.761459690731-0.954511871205j))*x[2]**o + ((-0.0278343645231+0.023834092503j))*x[2]
            ref[(1, 2, 1, 2)]=(0.303617136249-1.31958891887j)/(o+1.)+((-0.893315861197+0.620244303056j))+((-0.757762024473-0.685087939558j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.408601282002-0.790066525626j)*x[0]**o + ((0.738016569381-0.665392050693j))*x[0] + ((-0.290840999317+0.0444117060555j))*x[1]**o + ((-0.953771502558+0.326972240999j))*x[1] + ((-0.301159795407+0.4037602405j))*x[2]**o + ((-0.34149192752+0.065906557393j))*x[2]
            ref[(1, 2, 2, 0)]=(-0.592000794723+0.448171946555j)/(o+1.)+((-0.278623430349-0.136256626151j))+((-0.408601282002-0.790066525626j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.966312487018+0.805117063515j)*x[0]**o + ((-0.124697946567+0.513932469875j))*x[0] + ((-0.0285133284927+0.956188649617j))*x[1]**o + ((0.491796588232+0.299764875647j))*x[1] + ((-0.576196402562-0.357409018859j))*x[2]**o + ((-0.32095129027+0.0883547647634j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.604709731055+0.598779630759j)/(o+1.)+((0.0230736756974+0.451026055143j))+((-0.966312487018+0.805117063515j))*0.5**o
            arg[(1, 2, 2, 2)]=(-0.569913963076-0.645414350724j)*x[0]**o + ((0.842947480936+0.230166933904j))*x[0] + ((-0.30502245393+0.867882254456j))*x[1]**o + ((-0.151873455433+0.619461962215j))*x[1] + ((0.428199671514-0.56808656893j))*x[2]**o + ((-0.33530018836+0.144141091514j))*x[2]
            ref[(1, 2, 2, 2)]=(0.123177217584+0.299795685526j)/(o+1.)+((0.177886918572+0.496884993817j))+((-0.569913963076-0.645414350724j))*0.5**o
            arg[(1, 3, 0, 0)]=(-0.896357900269-0.922315310988j)*x[0]**o + ((-0.769191172734+0.885384397186j))*x[0] + ((-0.0915509690028+0.934482265203j))*x[1]**o + ((0.084034805326-0.203570832463j))*x[1] + ((-0.835648496931+0.10225689016j))*x[2]**o + ((0.266097015779+0.287769315748j))*x[2]
            ref[(1, 3, 0, 0)]=(-0.927199465933+1.03673915536j)/(o+1.)+((-0.209529675814+0.484791440236j))+((-0.896357900269-0.922315310988j))*0.5**o
            arg[(1, 3, 0, 1)]=(-0.0401777756946+0.868883237848j)*x[0]**o + ((0.14120191988+0.135752919273j))*x[0] + ((-0.878874130987-0.34530984046j))*x[1]**o + ((0.563742672153-0.124369572878j))*x[1] + ((-0.0627111297338-0.596477753748j))*x[2]**o + ((-0.712651216036+0.586047585019j))*x[2]
            ref[(1, 3, 0, 1)]=(-0.941585260721-0.941787594208j)/(o+1.)+((-0.0038533120015+0.298715465707j))+((-0.0401777756946+0.868883237848j))*0.5**o
            arg[(1, 3, 0, 2)]=(0.780433034538+0.946649412541j)*x[0]**o + ((0.273241280902+0.651862810493j))*x[0] + ((-0.706413885907+0.910973853591j))*x[1]**o + ((-0.621516684142+0.00345182750484j))*x[1] + ((-0.903090213614-0.659192474784j))*x[2]**o + ((0.828514805303+0.97019837027j))*x[2]
            ref[(1, 3, 0, 2)]=(-1.60950409952+0.251781378807j)/(o+1.)+((0.240119701031+0.812756504134j))+((0.780433034538+0.946649412541j))*0.5**o
            arg[(1, 3, 1, 0)]=(0.924722442636-0.867005132183j)*x[0]**o + ((-0.232461491992-0.651920691111j))*x[0] + ((0.349773742907-0.600950511674j))*x[1]**o + ((-0.466849690153-0.0973228665722j))*x[1] + ((0.644190440564+0.443157496272j))*x[2]**o + ((-0.0863329427674+0.205548703136j))*x[2]
            ref[(1, 3, 1, 0)]=(0.993964183471-0.157793015402j)/(o+1.)+((-0.392822062456-0.271847427274j))+((0.924722442636-0.867005132183j))*0.5**o
            arg[(1, 3, 1, 1)]=(-0.631000991576+0.86198196357j)*x[0]**o + ((0.673725580842+0.229621752431j))*x[0] + ((0.885993996512-0.945799764854j))*x[1]**o + ((-0.276488372603-0.373046767356j))*x[1] + ((0.338613965407+0.659501801112j))*x[2]**o + ((0.0583666737667-0.991757304245j))*x[2]
            ref[(1, 3, 1, 1)]=(1.22460796192-0.286297963741j)/(o+1.)+((0.227801941003-0.567591159585j))+((-0.631000991576+0.86198196357j))*0.5**o
            arg[(1, 3, 1, 2)]=(0.543683922853-0.083744156065j)*x[0]**o + ((0.648273504216+0.905730948302j))*x[0] + ((-0.0235587189459-0.718183400209j))*x[1]**o + ((0.323792789361+0.940113754875j))*x[1] + ((-0.760885343576+0.398501334598j))*x[2]**o + ((-0.119838470079-0.760951950695j))*x[2]
            ref[(1, 3, 1, 2)]=(-0.784444062522-0.319682065611j)/(o+1.)+((0.426113911749+0.542446376241j))+((0.543683922853-0.083744156065j))*0.5**o
            arg[(1, 3, 2, 0)]=(-0.502121686172-0.161815668992j)*x[0]**o + ((-0.824229115369-0.682157281627j))*x[0] + ((-0.595564887389+0.699706948967j))*x[1]**o + ((0.429491216655+0.504935335718j))*x[1] + ((0.698837318968+0.187601728108j))*x[2]**o + ((-0.0421864336784+0.00499698477252j))*x[2]
            ref[(1, 3, 2, 0)]=(0.103272431579+0.887308677075j)/(o+1.)+((-0.218462166196-0.0861124805683j))+((-0.502121686172-0.161815668992j))*0.5**o
            arg[(1, 3, 2, 1)]=(0.728730756918+0.258098071899j)*x[0]**o + ((0.424076653122-0.765526300626j))*x[0] + ((0.149591758432-0.902609774179j))*x[1]**o + ((0.966233381129+0.624581366971j))*x[1] + ((-0.202199301716-0.119904419205j))*x[2]**o + ((-0.527055288623-0.41484616638j))*x[2]
            ref[(1, 3, 2, 1)]=(-0.0526075432844-1.02251419338j)/(o+1.)+((0.431627372814-0.277895550018j))+((0.728730756918+0.258098071899j))*0.5**o
            arg[(1, 3, 2, 2)]=(0.298007012539+0.596600933795j)*x[0]**o + ((0.963899406526-0.0201452242498j))*x[0] + ((-0.459583281245-0.98901075864j))*x[1]**o + ((-0.527088554861-0.476369879199j))*x[1] + ((0.207177189946-0.0347210040817j))*x[2]**o + ((0.486457158687+0.402984293274j))*x[2]
            ref[(1, 3, 2, 2)]=(-0.252406091299-1.02373176272j)/(o+1.)+((0.461634005176-0.0467654050874j))+((0.298007012539+0.596600933795j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.176245459105-0.565514274718j)*x[0]**o + ((0.930328665759+0.986354042022j))*x[0] + ((0.768289854391-0.704486566968j))*x[1]**o + ((0.00509966902217-0.828619668413j))*x[1] + ((0.789500903312-0.398049689568j))*x[2]**o + ((0.779070421779-0.652606841117j))*x[2]
            ref[(2, 0, 0, 0)]=(1.5577907577-1.10253625654j)/(o+1.)+((0.85724937828-0.247436233754j))+((0.176245459105-0.565514274718j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.0574505024224-0.0607825342378j)*x[0]**o + ((-0.997269034579-0.986955003278j))*x[0] + ((-0.0424667111775-0.607788626448j))*x[1]**o + ((-0.663613088289-0.240564091541j))*x[1] + ((0.470237234861+0.0364138706841j))*x[2]**o + ((0.455885797387-0.878649193573j))*x[2]
            ref[(2, 0, 0, 1)]=(0.427770523683-0.571374755764j)/(o+1.)+((-0.60249816274-1.0530841442j))+((-0.0574505024224-0.0607825342378j))*0.5**o
            arg[(2, 0, 0, 2)]=(0.931895362783+0.0164295460677j)*x[0]**o + ((0.336645489973+0.233523577672j))*x[0] + ((0.842247058599-0.321574347963j))*x[1]**o + ((0.392653931022+0.742821039633j))*x[1] + ((-0.806884782468-0.0689105496597j))*x[2]**o + ((0.0692295498552-0.45115774311j))*x[2]
            ref[(2, 0, 0, 2)]=(0.0353622761302-0.390484897623j)/(o+1.)+((0.399264485425+0.262593437098j))+((0.931895362783+0.0164295460677j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.511285921049-0.727834571325j)*x[0]**o + ((-0.182491941447+0.712387237428j))*x[0] + ((0.0087351885662+0.484275201574j))*x[1]**o + ((-0.00283551863787-0.553999994401j))*x[1] + ((0.252888558173-0.948712177325j))*x[2]**o + ((0.672663342814+0.78861331806j))*x[2]
            ref[(2, 0, 1, 0)]=(0.261623746739-0.464436975752j)/(o+1.)+((0.243667941364+0.473500280543j))+((0.511285921049-0.727834571325j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.38569815411-0.997163695042j)*x[0]**o + ((-0.481552295312+0.55097690975j))*x[0] + ((0.532973168917-0.695206262119j))*x[1]**o + ((0.0689957042234+0.943676475516j))*x[1] + ((-0.184235681831-0.887529220222j))*x[2]**o + ((0.133265760253-0.631455349101j))*x[2]
            ref[(2, 0, 1, 1)]=(0.348737487086-1.58273548234j)/(o+1.)+((-0.139645415418+0.431599018082j))+((0.38569815411-0.997163695042j))*0.5**o
            arg[(2, 0, 1, 2)]=(0.636056812272+0.874897482487j)*x[0]**o + ((0.13538634371+0.682578667148j))*x[0] + ((-0.734130839322+0.560579637128j))*x[1]**o + ((-0.0557507684334+0.000835098070425j))*x[1] + ((0.544916052457-0.0688688059825j))*x[2]**o + ((0.954803468945+0.227660092883j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.189214786866+0.491710831145j)/(o+1.)+((0.517219522111+0.455536929051j))+((0.636056812272+0.874897482487j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.274129921828+0.839478467157j)*x[0]**o + ((-0.985354054267+0.833284184338j))*x[0] + ((-0.618444307944-0.998952564128j))*x[1]**o + ((0.955603857216+0.333651342776j))*x[1] + ((0.201436239706+0.56419528761j))*x[2]**o + ((-0.753270100909-0.673612079329j))*x[2]
            ref[(2, 0, 2, 0)]=(-0.417008068239-0.434757276517j)/(o+1.)+((-0.39151014898+0.246661723893j))+((-0.274129921828+0.839478467157j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.366326103161-0.425046911523j)*x[0]**o + ((0.877062804433+0.457428789566j))*x[0] + ((0.26186616871+0.891243148604j))*x[1]**o + ((-0.832521153175-0.263497896601j))*x[1] + ((0.193329449794-0.929052325389j))*x[2]**o + ((0.392670976877+0.427284138097j))*x[2]
            ref[(2, 0, 2, 1)]=(0.455195618504-0.0378091767849j)/(o+1.)+((0.218606314068+0.310607515531j))+((-0.366326103161-0.425046911523j))*0.5**o
            arg[(2, 0, 2, 2)]=(0.539021831357-0.31882077801j)*x[0]**o + ((0.108470125312+0.713146215578j))*x[0] + ((0.479260786168+0.210495474374j))*x[1]**o + ((0.764522928568+0.29923101656j))*x[1] + ((-0.996837132327-0.776425467663j))*x[2]**o + ((0.434002879566-0.48740475767j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.517576346159-0.565929993289j)/(o+1.)+((0.653497966723+0.262486237234j))+((0.539021831357-0.31882077801j))*0.5**o
            arg[(2, 1, 0, 0)]=(0.923157597106+0.296702431407j)*x[0]**o + ((0.307175314717-0.458661564559j))*x[0] + ((0.646844005555+0.0862530289102j))*x[1]**o + ((0.972085590889+0.669301750128j))*x[1] + ((-0.417756839341-0.656465973392j))*x[2]**o + ((-0.905265463094+0.189713264483j))*x[2]
            ref[(2, 1, 0, 0)]=(0.229087166214-0.570212944482j)/(o+1.)+((0.186997721256+0.200176725026j))+((0.923157597106+0.296702431407j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.224408615519+0.588497189717j)*x[0]**o + ((-0.518892729325-0.415811495164j))*x[0] + ((-0.395114601894+0.598477445621j))*x[1]**o + ((-0.124090586765+0.88764529056j))*x[1] + ((0.960326180724+0.281166090063j))*x[2]**o + ((0.963096284147-0.854754007758j))*x[2]
            ref[(2, 1, 0, 1)]=(0.565211578831+0.879643535684j)/(o+1.)+((0.160056484028-0.191460106181j))+((-0.224408615519+0.588497189717j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.011458481755-0.814306342251j)*x[0]**o + ((-0.783599779315+0.481202754204j))*x[0] + ((0.53555080609-0.429987000303j))*x[1]**o + ((0.144369766153-0.312039954071j))*x[1] + ((0.863287030303-0.740570541113j))*x[2]**o + ((-0.0438472820839-0.0936543003588j))*x[2]
            ref[(2, 1, 0, 2)]=(1.39883783639-1.17055754142j)/(o+1.)+((-0.341538647623+0.0377542498874j))+((-0.011458481755-0.814306342251j))*0.5**o
            arg[(2, 1, 1, 0)]=(-0.562984621612+0.718124648843j)*x[0]**o + ((-0.771301018712+0.561290989809j))*x[0] + ((-0.636547625817+0.563104772235j))*x[1]**o + ((-0.481245905792-0.591877263168j))*x[1] + ((-0.723736364024-0.044371757376j))*x[2]**o + ((0.598959721496+0.14182177657j))*x[2]
            ref[(2, 1, 1, 0)]=(-1.36028398984+0.518733014859j)/(o+1.)+((-0.326793601504+0.055617751606j))+((-0.562984621612+0.718124648843j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.285058136694+0.519365004701j)*x[0]**o + ((0.445530921295-0.0452400018718j))*x[0] + ((-0.388077689077-0.0437202007116j))*x[1]**o + ((0.0184839840459-0.912463076201j))*x[1] + ((0.563550182054-0.979759468003j))*x[2]**o + ((0.589632245941-0.111988174533j))*x[2]
            ref[(2, 1, 1, 1)]=(0.175472492977-1.02347966871j)/(o+1.)+((0.526823575641-0.534845626303j))+((-0.285058136694+0.519365004701j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.359270352619-0.0286217213222j)*x[0]**o + ((-0.845219718699+0.276878299834j))*x[0] + ((-0.032089947478-0.322307559629j))*x[1]**o + ((0.796358881383-0.591231252089j))*x[1] + ((0.543842493844-0.707939686612j))*x[2]**o + ((-0.443456469495-0.45713454428j))*x[2]
            ref[(2, 1, 1, 2)]=(0.511752546366-1.03024724624j)/(o+1.)+((-0.246158653406-0.385743748268j))+((0.359270352619-0.0286217213222j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.311412920469-0.0965539979243j)*x[0]**o + ((0.220221668257+0.846763545387j))*x[0] + ((0.750532659979+0.470524076406j))*x[1]**o + ((-0.442612660854+0.0416217428397j))*x[1] + ((0.828578176435-0.863800900794j))*x[2]**o + ((0.0794256797801+0.749688878349j))*x[2]
            ref[(2, 1, 2, 0)]=(1.57911083641-0.393276824387j)/(o+1.)+((-0.0714826564087+0.819037083287j))+((-0.311412920469-0.0965539979243j))*0.5**o
            arg[(2, 1, 2, 1)]=(0.275128644109-0.279688326475j)*x[0]**o + ((0.597258568424-0.902339270662j))*x[0] + ((-0.152381196936-0.964078895746j))*x[1]**o + ((-0.611873548477-0.598051038579j))*x[1] + ((-0.485091069249+0.714563969477j))*x[2]**o + ((-0.662806326095+0.617665604178j))*x[2]
            ref[(2, 1, 2, 1)]=(-0.637472266185-0.249514926269j)/(o+1.)+((-0.338710653074-0.441362352531j))+((0.275128644109-0.279688326475j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.419453225216-0.608963352752j)*x[0]**o + ((0.759676797202+0.99158320805j))*x[0] + ((-0.387029701052-0.773376145994j))*x[1]**o + ((0.93375033474-0.162349250114j))*x[1] + ((-0.82084113423+0.982201068041j))*x[2]**o + ((-0.121549441784-0.028391142055j))*x[2]
            ref[(2, 1, 2, 2)]=(-1.20787083528+0.208824922047j)/(o+1.)+((0.785938845079+0.400421407941j))+((0.419453225216-0.608963352752j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.760998774036+0.395886208447j)*x[0]**o + ((0.85650314514-0.562337187732j))*x[0] + ((-0.920517908802+0.140577240369j))*x[1]**o + ((-0.15394249782+0.741711041711j))*x[1] + ((-0.5763416883-0.759952136664j))*x[2]**o + ((-0.311457028053+0.0385426118765j))*x[2]
            ref[(2, 2, 0, 0)]=(-1.4968595971-0.619374896294j)/(o+1.)+((0.195551809633+0.108958232928j))+((-0.760998774036+0.395886208447j))*0.5**o
            arg[(2, 2, 0, 1)]=(-0.940023871363-0.958896297009j)*x[0]**o + ((-0.135273944135-0.174794277465j))*x[0] + ((-0.120498276733-0.540967391907j))*x[1]**o + ((-0.515251320792+0.901087879249j))*x[1] + ((-0.517236457412+0.789471603145j))*x[2]**o + ((-0.87525557749+0.681471929747j))*x[2]
            ref[(2, 2, 0, 1)]=(-0.637734734145+0.248504211238j)/(o+1.)+((-0.762890421209+0.703882765765j))+((-0.940023871363-0.958896297009j))*0.5**o
            arg[(2, 2, 0, 2)]=(0.805005145454+0.302405604904j)*x[0]**o + ((0.781254841372+0.197921631283j))*x[0] + ((0.792385773419-0.256965313723j))*x[1]**o + ((-0.110822823264+0.768128368495j))*x[1] + ((0.328526975494+0.373833804364j))*x[2]**o + ((0.328996915526-0.478823001274j))*x[2]
            ref[(2, 2, 0, 2)]=(1.12091274891+0.116868490641j)/(o+1.)+((0.499714466817+0.243613499252j))+((0.805005145454+0.302405604904j))*0.5**o
            arg[(2, 2, 1, 0)]=(-0.182391888978+0.5091895989j)*x[0]**o + ((0.322831616542-0.532236266267j))*x[0] + ((0.881470263134+0.430016654383j))*x[1]**o + ((0.384264234597-0.117057788912j))*x[1] + ((-0.81144083553+0.353254259796j))*x[2]**o + ((0.729459574963-0.309089024178j))*x[2]
            ref[(2, 2, 1, 0)]=(0.0700294276048+0.783270914179j)/(o+1.)+((0.718277713051-0.479191539679j))+((-0.182391888978+0.5091895989j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.084988586748+0.089001577448j)*x[0]**o + ((-0.627732513356-0.830706750692j))*x[0] + ((-0.116482175947-0.701798960519j))*x[1]**o + ((-0.190550510838-0.651932795247j))*x[1] + ((-0.990802368379-0.739674739271j))*x[2]**o + ((-0.555863604312+0.412285215946j))*x[2]
            ref[(2, 2, 1, 1)]=(-1.10728454433-1.44147369979j)/(o+1.)+((-0.687073314253-0.535177164996j))+((0.084988586748+0.089001577448j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.275397215889-0.988486920361j)*x[0]**o + ((0.511151124953-0.97307318922j))*x[0] + ((0.974617785515-0.623594115532j))*x[1]**o + ((0.897694916193-0.848796209116j))*x[1] + ((0.965983567462-0.364065524985j))*x[2]**o + ((0.629765679638-0.06525102002j))*x[2]
            ref[(2, 2, 1, 2)]=(1.94060135298-0.987659640516j)/(o+1.)+((1.01930586039-0.943560209178j))+((-0.275397215889-0.988486920361j))*0.5**o
            arg[(2, 2, 2, 0)]=(0.837036419624-0.892449377499j)*x[0]**o + ((0.119079465669-0.225453531014j))*x[0] + ((-0.200252142861+0.147317363676j))*x[1]**o + ((-0.434547378671+0.648025439955j))*x[1] + ((-0.36642716338-0.158786959671j))*x[2]**o + ((0.669108788564-0.592476350652j))*x[2]
            ref[(2, 2, 2, 0)]=(-0.566679306242-0.0114695959949j)/(o+1.)+((0.176820437781-0.0849522208558j))+((0.837036419624-0.892449377499j))*0.5**o
            arg[(2, 2, 2, 1)]=(0.67892089973+0.805890986885j)*x[0]**o + ((0.233021617201-0.485535329082j))*x[0] + ((0.260033021958+0.869469089521j))*x[1]**o + ((0.67616663927+0.406757836067j))*x[1] + ((0.159138740559-0.997428858207j))*x[2]**o + ((0.214709341674-0.45481146428j))*x[2]
            ref[(2, 2, 2, 1)]=(0.419171762517-0.127959768686j)/(o+1.)+((0.561948799073-0.266794478647j))+((0.67892089973+0.805890986885j))*0.5**o
            arg[(2, 2, 2, 2)]=(-0.544149601186-0.583853062599j)*x[0]**o + ((-0.372914557108+0.197748982347j))*x[0] + ((0.821006358469-0.299070050606j))*x[1]**o + ((0.593285126496+0.418857510071j))*x[1] + ((0.0147630928415-0.00984288196531j))*x[2]**o + ((-0.0481044914249-0.288636224353j))*x[2]
            ref[(2, 2, 2, 2)]=(0.83576945131-0.308912932572j)/(o+1.)+((0.0861330389813+0.163985134032j))+((-0.544149601186-0.583853062599j))*0.5**o
            arg[(2, 3, 0, 0)]=(0.606557922869-0.498374022326j)*x[0]**o + ((0.454598493539+0.710138765489j))*x[0] + ((0.448425725268+0.706152038617j))*x[1]**o + ((-0.343340724829+0.220725654201j))*x[1] + ((0.552323647818-0.882167669059j))*x[2]**o + ((-0.742976836463+0.817420612607j))*x[2]
            ref[(2, 3, 0, 0)]=(1.00074937309-0.176015630442j)/(o+1.)+((-0.315859533876+0.874142516148j))+((0.606557922869-0.498374022326j))*0.5**o
            arg[(2, 3, 0, 1)]=(0.991504852242+0.707111229831j)*x[0]**o + ((-0.703763769844-0.36138506319j))*x[0] + ((-0.444995997375+0.64325882403j))*x[1]**o + ((-0.0346319393459+0.569696877471j))*x[1] + ((-0.65443998584+0.972520982987j))*x[2]**o + ((0.601534680138-0.329027943512j))*x[2]
            ref[(2, 3, 0, 1)]=(-1.09943598321+1.61577980702j)/(o+1.)+((-0.0684305145263-0.0603580646158j))+((0.991504852242+0.707111229831j))*0.5**o
            arg[(2, 3, 0, 2)]=(-0.698167572289-0.32177774451j)*x[0]**o + ((-0.158278581316-0.0787767876358j))*x[0] + ((-0.578207584658-0.414306191828j))*x[1]**o + ((0.608036848428-0.448147624649j))*x[1] + ((-0.269235182815+0.499623205511j))*x[2]**o + ((0.120480436794+0.671462961657j))*x[2]
            ref[(2, 3, 0, 2)]=(-0.847442767474+0.0853170136827j)/(o+1.)+((0.285119351953+0.0722692746861j))+((-0.698167572289-0.32177774451j))*0.5**o
            arg[(2, 3, 1, 0)]=(-0.337868090881-0.0478026341031j)*x[0]**o + ((-0.551426075457+0.0214590407529j))*x[0] + ((0.432733913112+0.531483782215j))*x[1]**o + ((0.768942714165+0.945214685642j))*x[1] + ((-0.602572596221-0.421980480418j))*x[2]**o + ((-0.843800035478-0.120677673023j))*x[2]
            ref[(2, 3, 1, 0)]=(-0.169838683108+0.109503301797j)/(o+1.)+((-0.313141698385+0.422998026686j))+((-0.337868090881-0.0478026341031j))*0.5**o
            arg[(2, 3, 1, 1)]=(-0.276487442243-0.531122754334j)*x[0]**o + ((0.365666742565+0.288141755279j))*x[0] + ((-0.380714375871+0.363845922137j))*x[1]**o + ((0.00639730320411+0.132693937287j))*x[1] + ((-0.891288566191-0.266429691518j))*x[2]**o + ((-0.0874784251934+0.105814887622j))*x[2]
            ref[(2, 3, 1, 1)]=(-1.27200294206+0.0974162306187j)/(o+1.)+((0.142292810288+0.263325290094j))+((-0.276487442243-0.531122754334j))*0.5**o
            arg[(2, 3, 1, 2)]=(-0.166696513482+0.387757664427j)*x[0]**o + ((-0.772041428767-0.468064189317j))*x[0] + ((0.0380995468545+0.667090254189j))*x[1]**o + ((-0.336433179742+0.207598051087j))*x[1] + ((0.18234655199+0.141971147183j))*x[2]**o + ((0.922503243334+0.803142095006j))*x[2]
            ref[(2, 3, 1, 2)]=(0.220446098845+0.809061401372j)/(o+1.)+((-0.0929856825876+0.271337978388j))+((-0.166696513482+0.387757664427j))*0.5**o
            arg[(2, 3, 2, 0)]=(0.93875243118+0.499066582005j)*x[0]**o + ((-0.244906627284+0.878162283454j))*x[0] + ((0.85582079471+0.605991047412j))*x[1]**o + ((-0.989852534943+0.906285079779j))*x[1] + ((0.267036736133-0.25776148332j))*x[2]**o + ((0.322241308482-0.840175676984j))*x[2]
            ref[(2, 3, 2, 0)]=(1.12285753084+0.348229564092j)/(o+1.)+((-0.456258926873+0.472135843125j))+((0.93875243118+0.499066582005j))*0.5**o
            arg[(2, 3, 2, 1)]=(0.14282716128+0.22606104839j)*x[0]**o + ((0.280579550405-0.864567831311j))*x[0] + ((-0.486361678076+0.529989649425j))*x[1]**o + ((0.968114321849+0.628456566662j))*x[1] + ((-0.115092735252+0.372108454539j))*x[2]**o + ((0.864184146331-0.795584208527j))*x[2]
            ref[(2, 3, 2, 1)]=(-0.601454413328+0.902098103964j)/(o+1.)+((1.05643900929-0.515847736588j))+((0.14282716128+0.22606104839j))*0.5**o
            arg[(2, 3, 2, 2)]=(-0.689196457001+0.15261025069j)*x[0]**o + ((-0.810918381616+0.555606820529j))*x[0] + ((-0.49176939799-0.697899606951j))*x[1]**o + ((0.764725896948-0.745453675075j))*x[1] + ((-0.196867385095-0.321493461527j))*x[2]**o + ((0.463850253256-0.203697866872j))*x[2]
            ref[(2, 3, 2, 2)]=(-0.688636783086-1.01939306848j)/(o+1.)+((0.208828884294-0.19677236071j))+((-0.689196457001+0.15261025069j))*0.5**o
            arg[(3, 0, 0, 0)]=(0.919454249974-0.426853233972j)*x[0]**o + ((-0.38562936145-0.666028078135j))*x[0] + ((-0.689531205641+0.888479746293j))*x[1]**o + ((0.345594456617-0.875506682992j))*x[1] + ((-0.037585782169-0.547869748155j))*x[2]**o + ((-0.455382050193-0.301527625949j))*x[2]
            ref[(3, 0, 0, 0)]=(-0.72711698781+0.340609998138j)/(o+1.)+((-0.247708477514-0.921531193538j))+((0.919454249974-0.426853233972j))*0.5**o
            arg[(3, 0, 0, 1)]=(0.228922884591-0.164433103335j)*x[0]**o + ((0.491135211363+0.63566406152j))*x[0] + ((0.986491644883-0.481417497734j))*x[1]**o + ((-0.414706808759+0.0577203903421j))*x[1] + ((0.648795521693-0.802476819848j))*x[2]**o + ((0.0536572658126+0.933369682664j))*x[2]
            ref[(3, 0, 0, 1)]=(1.63528716658-1.28389431758j)/(o+1.)+((0.0650428342081+0.813377067263j))+((0.228922884591-0.164433103335j))*0.5**o
            arg[(3, 0, 0, 2)]=(-0.121743460911+0.494650302779j)*x[0]**o + ((0.30643024083+0.770789485713j))*x[0] + ((-0.811975899423-0.0618902975726j))*x[1]**o + ((-0.764087285329+0.804787097835j))*x[1] + ((0.95113504524+0.667108088764j))*x[2]**o + ((-0.34724597605+0.308727168709j))*x[2]
            ref[(3, 0, 0, 2)]=(0.139159145818+0.605217791192j)/(o+1.)+((-0.402451510275+0.942151876128j))+((-0.121743460911+0.494650302779j))*0.5**o
            arg[(3, 0, 1, 0)]=(-0.771809682333+0.717763729425j)*x[0]**o + ((0.285000443267-0.569149764506j))*x[0] + ((0.957737471631+0.775895968996j))*x[1]**o + ((-0.998577664083-0.784480992625j))*x[1] + ((0.913403267052-0.529021107968j))*x[2]**o + ((-0.570540648099-0.336057696041j))*x[2]
            ref[(3, 0, 1, 0)]=(1.87114073868+0.246874861028j)/(o+1.)+((-0.642058934457-0.844844226586j))+((-0.771809682333+0.717763729425j))*0.5**o
            arg[(3, 0, 1, 1)]=(0.905673153577-0.87714609865j)*x[0]**o + ((0.657794246828+0.125736642914j))*x[0] + ((-0.676021268584-0.990186492585j))*x[1]**o + ((0.0532739563775-0.520217194503j))*x[1] + ((-0.972905029962+0.71269544154j))*x[2]**o + ((0.551674280177+0.646182739087j))*x[2]
            ref[(3, 0, 1, 1)]=(-1.64892629855-0.277491051045j)/(o+1.)+((0.631371241691+0.125851093749j))+((0.905673153577-0.87714609865j))*0.5**o
            arg[(3, 0, 1, 2)]=(0.0146628726668+0.484877448087j)*x[0]**o + ((0.903518221582-0.81534869826j))*x[0] + ((0.511315345242+0.227111403265j))*x[1]**o + ((0.942166572087-0.355744191544j))*x[1] + ((0.427405708833-0.811714526525j))*x[2]**o + ((0.773821008031-0.812130570307j))*x[2]
            ref[(3, 0, 1, 2)]=(0.938721054075-0.58460312326j)/(o+1.)+((1.30975290085-0.991611730055j))+((0.0146628726668+0.484877448087j))*0.5**o
            arg[(3, 0, 2, 0)]=(0.395726391121+0.517284171006j)*x[0]**o + ((0.710325968279+0.341044535872j))*x[0] + ((-0.265468325086-0.940474677044j))*x[1]**o + ((-0.0535421094835+0.970665980305j))*x[1] + ((0.800478341761+0.702377634086j))*x[2]**o + ((-0.245826575736-0.053407093798j))*x[2]
            ref[(3, 0, 2, 0)]=(0.535010016676-0.238097042958j)/(o+1.)+((0.20547864153+0.629151711189j))+((0.395726391121+0.517284171006j))*0.5**o
            arg[(3, 0, 2, 1)]=(0.489349291091-0.257153935043j)*x[0]**o + ((-0.729695459378-0.883255173338j))*x[0] + ((0.615039115836+0.464977262489j))*x[1]**o + ((0.964733939556+0.71390060432j))*x[1] + ((0.732516930804+0.153032503807j))*x[2]**o + ((0.790907092196+0.246160905009j))*x[2]
            ref[(3, 0, 2, 1)]=(1.34755604664+0.618009766295j)/(o+1.)+((0.512972786187+0.0384031679955j))+((0.489349291091-0.257153935043j))*0.5**o
            arg[(3, 0, 2, 2)]=(0.539802960397+0.261025982297j)*x[0]**o + ((-0.075569229622+0.0335346103771j))*x[0] + ((-0.841290566326+0.384170700778j))*x[1]**o + ((-0.466441950391+0.193275416357j))*x[1] + ((0.448747698936-0.409870639851j))*x[2]**o + ((0.260799666538-0.961424247152j))*x[2]
            ref[(3, 0, 2, 2)]=(-0.39254286739-0.0256999390724j)/(o+1.)+((-0.140605756737-0.367307110209j))+((0.539802960397+0.261025982297j))*0.5**o
            arg[(3, 1, 0, 0)]=(-0.819576164696+0.557442267082j)*x[0]**o + ((-0.848772206646-0.635548422075j))*x[0] + ((0.00357204420405-0.604736379814j))*x[1]**o + ((-0.261346638547-0.636068156437j))*x[1] + ((0.649158591352-0.0211404413955j))*x[2]**o + ((0.816262444986-0.298102399355j))*x[2]
            ref[(3, 1, 0, 0)]=(0.652730635556-0.62587682121j)/(o+1.)+((-0.146928200104-0.784859488934j))+((-0.819576164696+0.557442267082j))*0.5**o
            arg[(3, 1, 0, 1)]=(0.677369138899+0.214268296496j)*x[0]**o + ((-0.154439794044-0.403725507389j))*x[0] + ((0.718398933143+0.735843295026j))*x[1]**o + ((-0.539398542164-0.887518249875j))*x[1] + ((-0.216891376943+0.747520613794j))*x[2]**o + ((-0.257710410626-0.372999141438j))*x[2]
            ref[(3, 1, 0, 1)]=(0.5015075562+1.48336390882j)/(o+1.)+((-0.475774373417-0.832121449351j))+((0.677369138899+0.214268296496j))*0.5**o
            arg[(3, 1, 0, 2)]=(0.991157663783-0.192126433193j)*x[0]**o + ((-0.981530913511+0.686230319646j))*x[0] + ((0.722886796002+0.531602067046j))*x[1]**o + ((-0.200670024565-0.65011015522j))*x[1] + ((-0.0461873599109+0.50427064032j))*x[2]**o + ((0.221421129684-0.961908716088j))*x[2]
            ref[(3, 1, 0, 2)]=(0.676699436091+1.03587270737j)/(o+1.)+((-0.480389904196-0.462894275831j))+((0.991157663783-0.192126433193j))*0.5**o
            arg[(3, 1, 1, 0)]=(-0.391216442959+0.775568521887j)*x[0]**o + ((-0.871488641496-0.861106135828j))*x[0] + ((-0.156168091019+0.488667058137j))*x[1]**o + ((-0.237374095443-0.454364219741j))*x[1] + ((-0.120382622338-0.94334181895j))*x[2]**o + ((-0.768436603929-0.888461991289j))*x[2]
            ref[(3, 1, 1, 0)]=(-0.276550713357-0.454674760813j)/(o+1.)+((-0.938649670434-1.10196617343j))+((-0.391216442959+0.775568521887j))*0.5**o
            arg[(3, 1, 1, 1)]=(-0.0799345227548-0.863481367511j)*x[0]**o + ((-0.21340778231-0.528304527914j))*x[0] + ((-0.223581233675+0.851814632312j))*x[1]**o + ((0.95692404827+0.465901773328j))*x[1] + ((-0.0430345449012-0.869118073246j))*x[2]**o + ((-0.857122297753+0.758285024651j))*x[2]
            ref[(3, 1, 1, 1)]=(-0.266615778577-0.0173034409345j)/(o+1.)+((-0.0568030158961+0.347941135033j))+((-0.0799345227548-0.863481367511j))*0.5**o
            arg[(3, 1, 1, 2)]=(0.405566550212-0.251333691775j)*x[0]**o + ((-0.272615290282-0.0408502339211j))*x[0] + ((-0.81613202857+0.479455622434j))*x[1]**o + ((-0.458322639166+0.743003587341j))*x[1] + ((-0.141637226485+0.696585784879j))*x[2]**o + ((-0.380655427745-0.961427596127j))*x[2]
            ref[(3, 1, 1, 2)]=(-0.957769255055+1.17604140731j)/(o+1.)+((-0.555796678596-0.129637121354j))+((0.405566550212-0.251333691775j))*0.5**o
            arg[(3, 1, 2, 0)]=(0.647828143554+0.443102581392j)*x[0]**o + ((0.15635645301-0.545263375122j))*x[0] + ((-0.44523315046+0.35770117036j))*x[1]**o + ((0.996051572644+0.274910253444j))*x[1] + ((-0.707110652755-0.351250808755j))*x[2]**o + ((0.140500952168+0.885484412425j))*x[2]
            ref[(3, 1, 2, 0)]=(-1.15234380321+0.0064503616052j)/(o+1.)+((0.646454488911+0.307565645374j))+((0.647828143554+0.443102581392j))*0.5**o
            arg[(3, 1, 2, 1)]=(-0.517849147687-0.231912273115j)*x[0]**o + ((0.960079934042-0.104035437614j))*x[0] + ((-0.616357072439-0.485915537902j))*x[1]**o + ((0.436784761962-0.319526781885j))*x[1] + ((0.483753213566+0.499092497935j))*x[2]**o + ((0.874968459058+0.197279440378j))*x[2]
            ref[(3, 1, 2, 1)]=(-0.132603858873+0.0131769600328j)/(o+1.)+((1.13591657753-0.11314138956j))+((-0.517849147687-0.231912273115j))*0.5**o
            arg[(3, 1, 2, 2)]=(0.384874293916+0.23683178195j)*x[0]**o + ((0.883412816781+0.623918881532j))*x[0] + ((0.705753160622-0.164263063033j))*x[1]**o + ((-0.619720712609-0.0464907135924j))*x[1] + ((0.430607563606-0.100685484079j))*x[2]**o + ((-0.411726848965-0.719125452054j))*x[2]
            ref[(3, 1, 2, 2)]=(1.13636072423-0.264948547112j)/(o+1.)+((-0.0740173723967-0.0708486420575j))+((0.384874293916+0.23683178195j))*0.5**o
            arg[(3, 2, 0, 0)]=(0.392994285534-0.643093759125j)*x[0]**o + ((-0.665957490561+0.217948372753j))*x[0] + ((0.645008879797+0.875865254318j))*x[1]**o + ((-0.878890598854-0.254325902506j))*x[1] + ((0.701843321744-0.636836170627j))*x[2]**o + ((0.574190556093-0.875887425583j))*x[2]
            ref[(3, 2, 0, 0)]=(1.34685220154+0.239029083691j)/(o+1.)+((-0.485328766661-0.456132477668j))+((0.392994285534-0.643093759125j))*0.5**o
            arg[(3, 2, 0, 1)]=(-0.692700949774+0.0747224966078j)*x[0]**o + ((0.587732851334+0.00548909970028j))*x[0] + ((-0.573946308375-0.55524424707j))*x[1]**o + ((0.472424226204-0.0347961584515j))*x[1] + ((-0.647703661049+0.421783558737j))*x[2]**o + ((0.427167833882+0.557952850256j))*x[2]
            ref[(3, 2, 0, 1)]=(-1.22164996942-0.133460688333j)/(o+1.)+((0.743662455711+0.264322895752j))+((-0.692700949774+0.0747224966078j))*0.5**o
            arg[(3, 2, 0, 2)]=(0.516718922351-0.00103089082079j)*x[0]**o + ((0.311453425953+0.168839485584j))*x[0] + ((0.693375258805-0.244308085185j))*x[1]**o + ((-0.490573957405-0.287027408776j))*x[1] + ((0.0380180845263-0.349993012408j))*x[2]**o + ((0.895857848008-0.559952602676j))*x[2]
            ref[(3, 2, 0, 2)]=(0.731393343331-0.594301097593j)/(o+1.)+((0.358368658278-0.339070262934j))+((0.516718922351-0.00103089082079j))*0.5**o
            arg[(3, 2, 1, 0)]=(-0.0627292016275+0.710252723258j)*x[0]**o + ((0.0509747006608+0.947382573795j))*x[0] + ((-0.74378208891-0.313937394418j))*x[1]**o + ((-0.336489422015+0.363837323366j))*x[1] + ((0.473831523962-0.232873870401j))*x[2]**o + ((0.0846230870784+0.0373968962287j))*x[2]
            ref[(3, 2, 1, 0)]=(-0.269950564949-0.546811264819j)/(o+1.)+((-0.100445817138+0.674308396694j))+((-0.0627292016275+0.710252723258j))*0.5**o
            arg[(3, 2, 1, 1)]=(0.984495565295+0.739375159056j)*x[0]**o + ((0.886707797872-0.850070052206j))*x[0] + ((0.872283968189-0.522954222051j))*x[1]**o + ((0.626917147461-0.940209281289j))*x[1] + ((-0.605654632802+0.838207183331j))*x[2]**o + ((-0.0218023043978-0.0246596699913j))*x[2]
            ref[(3, 2, 1, 1)]=(0.266629335387+0.31525296128j)/(o+1.)+((0.745911320468-0.907469501744j))+((0.984495565295+0.739375159056j))*0.5**o
            arg[(3, 2, 1, 2)]=(0.166202342217+0.915065849391j)*x[0]**o + ((0.831846128146+0.645384320677j))*x[0] + ((-0.974095515044-0.868320412454j))*x[1]**o + ((-0.990244225232-0.499364991845j))*x[1] + ((-0.115164621253+0.483948170499j))*x[2]**o + ((-0.745986998605-0.775621800591j))*x[2]
            ref[(3, 2, 1, 2)]=(-1.0892601363-0.384372241955j)/(o+1.)+((-0.452192547846-0.31480123588j))+((0.166202342217+0.915065849391j))*0.5**o
            arg[(3, 2, 2, 0)]=(-0.836479822148+0.59760160729j)*x[0]**o + ((-0.960619010617+0.471192570869j))*x[0] + ((-0.0156414804031+0.21628643066j))*x[1]**o + ((0.101204851987-0.86276479413j))*x[1] + ((0.353357822657-0.200417305729j))*x[2]**o + ((0.727663776072+0.220959078462j))*x[2]
            ref[(3, 2, 2, 0)]=(0.337716342254+0.0158691249308j)/(o+1.)+((-0.0658751912796-0.0853065723992j))+((-0.836479822148+0.59760160729j))*0.5**o
            arg[(3, 2, 2, 1)]=(-0.786354836367-0.460610038851j)*x[0]**o + ((0.117581810588-0.271985648107j))*x[0] + ((-0.255490074208+0.180806791677j))*x[1]**o + ((-0.0559524595935-0.954306494877j))*x[1] + ((0.88584625309+0.00329567191759j))*x[2]**o + ((-0.730498284922+0.42784961756j))*x[2]
            ref[(3, 2, 2, 1)]=(0.630356178883+0.184102463595j)/(o+1.)+((-0.334434466963-0.399221262712j))+((-0.786354836367-0.460610038851j))*0.5**o
            arg[(3, 2, 2, 2)]=(0.783577036981+0.239886618001j)*x[0]**o + ((-0.981053278403+0.167477641415j))*x[0] + ((0.843831258121+0.766571385631j))*x[1]**o + ((-0.40925012004-0.958661492782j))*x[1] + ((-0.147515769688-0.217338601036j))*x[2]**o + ((-0.701337747244-0.570312139951j))*x[2]
            ref[(3, 2, 2, 2)]=(0.696315488433+0.549232784595j)/(o+1.)+((-1.04582057284-0.680747995659j))+((0.783577036981+0.239886618001j))*0.5**o
            arg[(3, 3, 0, 0)]=(-0.203809160987-0.191822020432j)*x[0]**o + ((0.473925724223-0.143325876289j))*x[0] + ((0.992120091767-0.725399031291j))*x[1]**o + ((0.235272353419+0.861713349345j))*x[1] + ((0.579804446411-0.241583175076j))*x[2]**o + ((-0.751166297852+0.586769630286j))*x[2]
            ref[(3, 3, 0, 0)]=(1.57192453818-0.966982206367j)/(o+1.)+((-0.0209841101054+0.652578551671j))+((-0.203809160987-0.191822020432j))*0.5**o
            arg[(3, 3, 0, 1)]=(0.129653737114+0.57425733092j)*x[0]**o + ((0.693707800292+0.22819453454j))*x[0] + ((0.022382177701-0.101752671095j))*x[1]**o + ((-0.155118204+0.471481926601j))*x[1] + ((0.853263832409-0.139722504866j))*x[2]**o + ((-0.0372688534798+0.816766618384j))*x[2]
            ref[(3, 3, 0, 1)]=(0.87564601011-0.241475175961j)/(o+1.)+((0.250660371406+0.758221539762j))+((0.129653737114+0.57425733092j))*0.5**o
            arg[(3, 3, 0, 2)]=(0.0637767249453+0.518378626668j)*x[0]**o + ((0.482449291241-0.245113575679j))*x[0] + ((-0.217790974838-0.251310287624j))*x[1]**o + ((0.119268114372-0.828288640647j))*x[1] + ((-0.519349151514-0.817863041188j))*x[2]**o + ((0.898281637064+0.160725066365j))*x[2]
            ref[(3, 3, 0, 2)]=(-0.737140126352-1.06917332881j)/(o+1.)+((0.749999521338-0.456338574981j))+((0.0637767249453+0.518378626668j))*0.5**o
            arg[(3, 3, 1, 0)]=(-0.460040866715-0.432357318877j)*x[0]**o + ((-0.582611981257+0.924218142767j))*x[0] + ((0.365729895517+0.855226101331j))*x[1]**o + ((-0.028540246505-0.9358688853j))*x[1] + ((-0.993353123375+0.533377442857j))*x[2]**o + ((-0.530530995278-0.492388494601j))*x[2]
            ref[(3, 3, 1, 0)]=(-0.627623227857+1.38860354419j)/(o+1.)+((-0.57084161152-0.252019618567j))+((-0.460040866715-0.432357318877j))*0.5**o
            arg[(3, 3, 1, 1)]=(-0.301462282013+0.111538023601j)*x[0]**o + ((0.172387111142-0.902406639135j))*x[0] + ((0.945186717305-0.251619699049j))*x[1]**o + ((-0.413899027056+0.162567145711j))*x[1] + ((-0.65181899759+0.119142149632j))*x[2]**o + ((-0.336345906231-0.562615686159j))*x[2]
            ref[(3, 3, 1, 1)]=(0.293367719715-0.132477549417j)/(o+1.)+((-0.288928911073-0.651227589791j))+((-0.301462282013+0.111538023601j))*0.5**o
            arg[(3, 3, 1, 2)]=(0.671785058925-0.224573650265j)*x[0]**o + ((-0.0621706640499+0.834258740745j))*x[0] + ((0.581262412202-0.859397424723j))*x[1]**o + ((-0.418178595732-0.101481466109j))*x[1] + ((0.251271478757-0.437170230261j))*x[2]**o + ((-0.0661704485067+0.455321108163j))*x[2]
            ref[(3, 3, 1, 2)]=(0.832533890958-1.29656765498j)/(o+1.)+((-0.273259854144+0.594049191399j))+((0.671785058925-0.224573650265j))*0.5**o
            arg[(3, 3, 2, 0)]=(0.139311635944-0.0921356012111j)*x[0]**o + ((0.645753464389-0.246060118457j))*x[0] + ((0.472491275192+0.821978793643j))*x[1]**o + ((0.597899534981-0.643823146315j))*x[1] + ((0.318023991858-0.150802646151j))*x[2]**o + ((-0.394102305638-0.572789396528j))*x[2]
            ref[(3, 3, 2, 0)]=(0.79051526705+0.671176147491j)/(o+1.)+((0.424775346866-0.73133633065j))+((0.139311635944-0.0921356012111j))*0.5**o
            arg[(3, 3, 2, 1)]=(-0.0959325791754+0.337062516631j)*x[0]**o + ((-0.826415194175+0.686910472678j))*x[0] + ((0.300740725355+0.762371388499j))*x[1]**o + ((0.692772399977+0.830874257938j))*x[1] + ((0.0100532030265+0.563773326241j))*x[2]**o + ((0.78568985719-0.875341533038j))*x[2]
            ref[(3, 3, 2, 1)]=(0.310793928382+1.32614471474j)/(o+1.)+((0.326023531497+0.321221598789j))+((-0.0959325791754+0.337062516631j))*0.5**o
            arg[(3, 3, 2, 2)]=(-0.946684625103-0.160430293496j)*x[0]**o + ((-0.60068572829-0.236951750394j))*x[0] + ((-0.722995402918-0.148150352723j))*x[1]**o + ((0.632908662911-0.959806456129j))*x[1] + ((0.418289208646-0.295229533739j))*x[2]**o + ((0.745573293036-0.477732343891j))*x[2]
            ref[(3, 3, 2, 2)]=(-0.304706194272-0.443379886461j)/(o+1.)+((0.388898113828-0.837245275207j))+((-0.946684625103-0.160430293496j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.442483852582-0.860280434685j)*x[0] + ((-0.209913316719+0.409765824637j))*x[1]
            ref=(0.116285267931-0.225257305024j)
        else:
            arg=(-0.540326338819-0.00113918714802j)*x[0] + ((0.95847165255+0.27957801125j))*x[1] + ((-0.712827151123+0.654312393156j))*x[2]
            ref=(-0.147340918696+0.466375608629j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.123547055833-0.87119726354j)*x[0] + ((-0.100832512978-0.655206111714j))*x[1]
            ref[(0,)]=(0.0113572714273-0.763201687627j)
            arg[(1,)]=(-0.669841982519+0.465620729118j)*x[0] + ((0.808407656907-0.801387085779j))*x[1]
            ref[(1,)]=(0.069282837194-0.167883178331j)
        else:
            arg[(0,)]=(0.247274292065-0.173722303908j)*x[0] + ((0.585740864228+0.309279123291j))*x[1] + ((-0.28914625323+0.888198219127j))*x[2]
            ref[(0,)]=(0.271934451531+0.511877519255j)
            arg[(1,)]=(-0.30966944999-0.295284162493j)*x[0] + ((0.704848791408+0.189315570153j))*x[1] + ((-0.63427384368-0.106722197032j))*x[2]
            ref[(1,)]=(-0.11954725113-0.106345394686j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.66428773459-0.576928850234j)*x[0] + ((-0.377903937522+0.747316237264j))*x[1]
            ref[(0, 0)]=(0.143191898534+0.085193693515j)
            arg[(0, 1)]=(-0.77700902579+0.479976723873j)*x[0] + ((-0.979410444687+0.190887725261j))*x[1]
            ref[(0, 1)]=(-0.878209735239+0.335432224567j)
            arg[(0, 2)]=(-0.712402470951+0.115473879822j)*x[0] + ((0.787549991828-0.226270632222j))*x[1]
            ref[(0, 2)]=(0.0375737604385-0.0553983761998j)
            arg[(0, 3)]=(0.555299907814-0.248065649237j)*x[0] + ((-0.829968091681-0.163729326622j))*x[1]
            ref[(0, 3)]=(-0.137334091934-0.20589748793j)
            arg[(1, 0)]=(-0.0644594749722+0.0634285249639j)*x[0] + ((0.969747305585-0.261731287077j))*x[1]
            ref[(1, 0)]=(0.452643915306-0.0991513810567j)
            arg[(1, 1)]=(-0.70026869158+0.758432134736j)*x[0] + ((-0.31053406046-0.318166383316j))*x[1]
            ref[(1, 1)]=(-0.50540137602+0.22013287571j)
            arg[(1, 2)]=(0.490804634752-0.00837036327084j)*x[0] + ((0.352126515557+0.927465362688j))*x[1]
            ref[(1, 2)]=(0.421465575154+0.459547499709j)
            arg[(1, 3)]=(0.048028306981-0.36590421941j)*x[0] + ((0.441450574774-0.696839132123j))*x[1]
            ref[(1, 3)]=(0.244739440877-0.531371675767j)
        else:
            arg[(0, 0)]=(-0.436514497416-0.0646779399741j)*x[0] + ((-0.614691622296+0.478266839528j))*x[1] + ((-0.865410416371-0.621638209949j))*x[2]
            ref[(0, 0)]=(-0.958308268041-0.104024655198j)
            arg[(0, 1)]=(0.788089942415-0.701877283146j)*x[0] + ((-0.0130202626694-0.910442909861j))*x[1] + ((0.684532365328-0.705695927682j))*x[2]
            ref[(0, 1)]=(0.729801022537-1.15900806034j)
            arg[(0, 2)]=(-0.601930082144-0.286101532431j)*x[0] + ((-0.758271039799+0.50886969989j))*x[1] + ((-0.164789356498+0.0740313747534j))*x[2]
            ref[(0, 2)]=(-0.76249523922+0.148399771106j)
            arg[(0, 3)]=(0.18696593581+0.196872172987j)*x[0] + ((0.679382342651+0.569542650294j))*x[1] + ((-0.309940318383-0.469944204992j))*x[2]
            ref[(0, 3)]=(0.278203980039+0.148235309145j)
            arg[(1, 0)]=(-0.903310880456-0.162109582693j)*x[0] + ((0.404422222559-0.575019375802j))*x[1] + ((-0.235824320772+0.185817829961j))*x[2]
            ref[(1, 0)]=(-0.367356489335-0.275655564267j)
            arg[(1, 1)]=(-0.411872499635+0.340941593366j)*x[0] + ((-0.369683421164+0.795591679046j))*x[1] + ((-0.862354186226+0.813962669116j))*x[2]
            ref[(1, 1)]=(-0.821955053512+0.975247970764j)
            arg[(1, 2)]=(-0.967081179683+0.650055470625j)*x[0] + ((0.680450837618-0.804105164555j))*x[1] + ((0.589794506318-0.888483933891j))*x[2]
            ref[(1, 2)]=(0.151582082126-0.52126681391j)
            arg[(1, 3)]=(-0.72820458958+0.91496706353j)*x[0] + ((-0.293412477728-0.318811626995j))*x[1] + ((0.558579511378+0.925933079652j))*x[2]
            ref[(1, 3)]=(-0.231518777965+0.761044258093j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref=numpy.zeros((3, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.823015252644-0.767205852501j)*x[0] + ((-0.744033050405-0.495556423136j))*x[1]
            ref[(0, 0, 0)]=(0.0394911011196-0.631381137818j)
            arg[(0, 0, 1)]=(0.108310893923-0.326413139853j)*x[0] + ((0.27721869568+0.80901334499j))*x[1]
            ref[(0, 0, 1)]=(0.192764794802+0.241300102569j)
            arg[(0, 0, 2)]=(-0.586254423097-0.929379689091j)*x[0] + ((-0.549401690785-0.932447175733j))*x[1]
            ref[(0, 0, 2)]=(-0.567828056941-0.930913432412j)
            arg[(0, 0, 3)]=(-0.127917918349-0.155755938182j)*x[0] + ((0.424559067913+0.0278269020143j))*x[1]
            ref[(0, 0, 3)]=(0.148320574782-0.0639645180839j)
            arg[(0, 1, 0)]=(0.376976210353+0.6285879733j)*x[0] + ((-0.483295601408+0.169442649858j))*x[1]
            ref[(0, 1, 0)]=(-0.0531596955279+0.399015311579j)
            arg[(0, 1, 1)]=(0.449336850316+0.432835245669j)*x[0] + ((-0.588310206162+0.956018211797j))*x[1]
            ref[(0, 1, 1)]=(-0.0694866779234+0.694426728733j)
            arg[(0, 1, 2)]=(-0.554647659163-0.921911333925j)*x[0] + ((0.816667774858+0.834050761906j))*x[1]
            ref[(0, 1, 2)]=(0.131010057847-0.0439302860095j)
            arg[(0, 1, 3)]=(0.068518973634-0.262180537853j)*x[0] + ((-0.366694143662-0.374665867013j))*x[1]
            ref[(0, 1, 3)]=(-0.149087585014-0.318423202433j)
            arg[(0, 2, 0)]=(0.384845371913+0.642917652223j)*x[0] + ((-0.722744280137-0.0569039585019j))*x[1]
            ref[(0, 2, 0)]=(-0.168949454112+0.293006846861j)
            arg[(0, 2, 1)]=(0.78504993563+0.590086753341j)*x[0] + ((0.12694624745+0.594216360761j))*x[1]
            ref[(0, 2, 1)]=(0.45599809154+0.592151557051j)
            arg[(0, 2, 2)]=(0.523265755924+0.153181761789j)*x[0] + ((-0.236895677884-0.233999945269j))*x[1]
            ref[(0, 2, 2)]=(0.14318503902-0.0404090917398j)
            arg[(0, 2, 3)]=(0.92467289216-0.877640080062j)*x[0] + ((0.802195228181+0.757177269526j))*x[1]
            ref[(0, 2, 3)]=(0.86343406017-0.0602314052681j)
            arg[(0, 3, 0)]=(-0.0135980898139-0.791976872069j)*x[0] + ((-0.750500317593-0.993074797483j))*x[1]
            ref[(0, 3, 0)]=(-0.382049203704-0.892525834776j)
            arg[(0, 3, 1)]=(-0.403782849153-0.991872630169j)*x[0] + ((0.9494182255+0.386758213572j))*x[1]
            ref[(0, 3, 1)]=(0.272817688173-0.302557208299j)
            arg[(0, 3, 2)]=(0.555080698962+0.370977937421j)*x[0] + ((0.990971812177+0.393841590746j))*x[1]
            ref[(0, 3, 2)]=(0.773026255569+0.382409764084j)
            arg[(0, 3, 3)]=(-0.8986726825+0.97664146664j)*x[0] + ((-0.0127646390006+0.300611926515j))*x[1]
            ref[(0, 3, 3)]=(-0.45571866075+0.638626696577j)
            arg[(1, 0, 0)]=(-0.0461502136811+0.217358794449j)*x[0] + ((-0.365165683275+0.519294282546j))*x[1]
            ref[(1, 0, 0)]=(-0.205657948478+0.368326538497j)
            arg[(1, 0, 1)]=(-0.634165306454-0.890934737062j)*x[0] + ((0.783496005923+0.639629389095j))*x[1]
            ref[(1, 0, 1)]=(0.0746653497344-0.125652673984j)
            arg[(1, 0, 2)]=(0.0868762710733+0.620666210042j)*x[0] + ((0.397588211184+0.458971237314j))*x[1]
            ref[(1, 0, 2)]=(0.242232241129+0.539818723678j)
            arg[(1, 0, 3)]=(0.168391927041+0.843635537168j)*x[0] + ((0.763669110937-0.577528746023j))*x[1]
            ref[(1, 0, 3)]=(0.466030518989+0.133053395573j)
            arg[(1, 1, 0)]=(-0.0848992013992+0.94346925067j)*x[0] + ((0.441094338443+0.123336554155j))*x[1]
            ref[(1, 1, 0)]=(0.178097568522+0.533402902413j)
            arg[(1, 1, 1)]=(-0.241539508311-0.255133914596j)*x[0] + ((0.170910230737+0.486531398066j))*x[1]
            ref[(1, 1, 1)]=(-0.0353146387866+0.115698741735j)
            arg[(1, 1, 2)]=(-0.109323038701+0.301509334048j)*x[0] + ((0.974995277417+0.791575713985j))*x[1]
            ref[(1, 1, 2)]=(0.432836119358+0.546542524017j)
            arg[(1, 1, 3)]=(0.349719123054+0.271928095037j)*x[0] + ((0.40135049901+0.330138172096j))*x[1]
            ref[(1, 1, 3)]=(0.375534811032+0.301033133567j)
            arg[(1, 2, 0)]=(-0.245900168775+0.959908869851j)*x[0] + ((0.629573877269-0.350388586099j))*x[1]
            ref[(1, 2, 0)]=(0.191836854247+0.304760141876j)
            arg[(1, 2, 1)]=(0.010237248053+0.676044123855j)*x[0] + ((0.961424921714+0.419312229615j))*x[1]
            ref[(1, 2, 1)]=(0.485831084883+0.547678176735j)
            arg[(1, 2, 2)]=(0.30514109486+0.00874777689826j)*x[0] + ((0.480216336147-0.0249038873064j))*x[1]
            ref[(1, 2, 2)]=(0.392678715504-0.00807805520405j)
            arg[(1, 2, 3)]=(0.159845292993-0.269701198152j)*x[0] + ((0.336681944737+0.0880453563166j))*x[1]
            ref[(1, 2, 3)]=(0.248263618865-0.0908279209179j)
            arg[(1, 3, 0)]=(0.611134862624-0.921603252443j)*x[0] + ((0.174342146042+0.618413565251j))*x[1]
            ref[(1, 3, 0)]=(0.392738504333-0.151594843596j)
            arg[(1, 3, 1)]=(0.724085085989-0.775012116076j)*x[0] + ((0.576565480679-0.381034293672j))*x[1]
            ref[(1, 3, 1)]=(0.650325283334-0.578023204874j)
            arg[(1, 3, 2)]=(0.49839220569+0.185585843611j)*x[0] + ((-0.68022513912+0.568896071508j))*x[1]
            ref[(1, 3, 2)]=(-0.0909164667149+0.37724095756j)
            arg[(1, 3, 3)]=(-0.0552389825575+0.828598852405j)*x[0] + ((0.237826526243+0.408372580136j))*x[1]
            ref[(1, 3, 3)]=(0.091293771843+0.61848571627j)
            arg[(2, 0, 0)]=(-0.585998882107-0.629038717908j)*x[0] + ((-0.0676188551309+0.888076406708j))*x[1]
            ref[(2, 0, 0)]=(-0.326808868619+0.1295188444j)
            arg[(2, 0, 1)]=(0.26253800064+0.0698096083227j)*x[0] + ((0.130167607614+0.224210492448j))*x[1]
            ref[(2, 0, 1)]=(0.196352804127+0.147010050385j)
            arg[(2, 0, 2)]=(0.939441531909-0.13474652195j)*x[0] + ((0.558442332903-0.437175504221j))*x[1]
            ref[(2, 0, 2)]=(0.748941932406-0.285961013085j)
            arg[(2, 0, 3)]=(-0.0183496476153-0.572108742035j)*x[0] + ((0.75209076483-0.867600500674j))*x[1]
            ref[(2, 0, 3)]=(0.366870558607-0.719854621354j)
            arg[(2, 1, 0)]=(-0.413676877223+0.52116081217j)*x[0] + ((-0.721144466719+0.69538033008j))*x[1]
            ref[(2, 1, 0)]=(-0.567410671971+0.608270571125j)
            arg[(2, 1, 1)]=(-0.645249492717-0.373767427926j)*x[0] + ((-0.35842630089+0.90445552277j))*x[1]
            ref[(2, 1, 1)]=(-0.501837896804+0.265344047422j)
            arg[(2, 1, 2)]=(-0.297656675314-0.846528082522j)*x[0] + ((-0.70014342919+0.475815831563j))*x[1]
            ref[(2, 1, 2)]=(-0.498900052252-0.185356125479j)
            arg[(2, 1, 3)]=(-0.873407073741-0.646443301481j)*x[0] + ((-0.974151752589-0.5328604749j))*x[1]
            ref[(2, 1, 3)]=(-0.923779413165-0.589651888191j)
            arg[(2, 2, 0)]=(-0.656503929501-0.701577361927j)*x[0] + ((0.157771175369-0.92863974186j))*x[1]
            ref[(2, 2, 0)]=(-0.249366377066-0.815108551893j)
            arg[(2, 2, 1)]=(-0.461918642676+0.229990132337j)*x[0] + ((0.677992597798-0.489407286606j))*x[1]
            ref[(2, 2, 1)]=(0.108036977561-0.129708577134j)
            arg[(2, 2, 2)]=(-0.808680481505+0.619868090514j)*x[0] + ((0.97511493706+0.365854160204j))*x[1]
            ref[(2, 2, 2)]=(0.0832172277774+0.492861125359j)
            arg[(2, 2, 3)]=(0.986892559793-0.338606142138j)*x[0] + ((0.613207544419+0.784248250045j))*x[1]
            ref[(2, 2, 3)]=(0.800050052106+0.222821053954j)
            arg[(2, 3, 0)]=(0.709856126858-0.404776609336j)*x[0] + ((-0.528275382548-0.164982503258j))*x[1]
            ref[(2, 3, 0)]=(0.0907903721551-0.284879556297j)
            arg[(2, 3, 1)]=(-0.723152530746-0.0700552797467j)*x[0] + ((0.21587860089+0.185479090265j))*x[1]
            ref[(2, 3, 1)]=(-0.253636964928+0.057711905259j)
            arg[(2, 3, 2)]=(0.801939763251+0.263874603019j)*x[0] + ((-0.205079128111+0.823271049395j))*x[1]
            ref[(2, 3, 2)]=(0.29843031757+0.543572826207j)
            arg[(2, 3, 3)]=(0.35538180268-0.711323139768j)*x[0] + ((-0.150364450847-0.224594469093j))*x[1]
            ref[(2, 3, 3)]=(0.102508675917-0.467958804431j)
        else:
            arg[(0, 0, 0)]=(-0.567477914781-0.0818638288909j)*x[0] + ((0.173314652855+0.578234743215j))*x[1] + ((-0.719793625786-0.82547149742j))*x[2]
            ref[(0, 0, 0)]=(-0.556978443856-0.164550291548j)
            arg[(0, 0, 1)]=(0.510973497042-0.20064260886j)*x[0] + ((-0.759436990487-0.00785846283716j))*x[1] + ((0.923157743229-0.143608850911j))*x[2]
            ref[(0, 0, 1)]=(0.337347124892-0.176054961304j)
            arg[(0, 0, 2)]=(-0.321830534158+0.275355709438j)*x[0] + ((0.694067619386-0.942407152844j))*x[1] + ((-0.300527535632+0.368242815832j))*x[2]
            ref[(0, 0, 2)]=(0.035854774798-0.149404313787j)
            arg[(0, 0, 3)]=(0.036082286845+0.384651512388j)*x[0] + ((-0.755277248598-0.968810640651j))*x[1] + ((-0.706400124537+0.0204169933108j))*x[2]
            ref[(0, 0, 3)]=(-0.712797543145-0.281871067476j)
            arg[(0, 1, 0)]=(-0.625804673268+0.178912579656j)*x[0] + ((0.712401211667+0.984183856077j))*x[1] + ((0.202883243624+0.0441628828678j))*x[2]
            ref[(0, 1, 0)]=(0.144739891012+0.6036296593j)
            arg[(0, 1, 1)]=(-0.543293186504-0.20640460942j)*x[0] + ((-0.89790502341+0.738245468476j))*x[1] + ((-0.734764394656+0.344108535194j))*x[2]
            ref[(0, 1, 1)]=(-1.08798130228+0.437974697125j)
            arg[(0, 1, 2)]=(-0.143608928133+0.667329628372j)*x[0] + ((0.651063605886+0.0528251190438j))*x[1] + ((0.737140488296-0.557314839892j))*x[2]
            ref[(0, 1, 2)]=(0.622297583024+0.0814199537619j)
            arg[(0, 1, 3)]=(-0.308653822657-0.675068126819j)*x[0] + ((-0.949101018236+0.364648191883j))*x[1] + ((-0.42206493073+0.0757994737641j))*x[2]
            ref[(0, 1, 3)]=(-0.839909885811-0.117310230586j)
            arg[(0, 2, 0)]=(0.543518346709+0.267576530071j)*x[0] + ((-0.335818695+0.419350799881j))*x[1] + ((-0.941241101771-0.455601775382j))*x[2]
            ref[(0, 2, 0)]=(-0.366770725031+0.115662777285j)
            arg[(0, 2, 1)]=(0.447903705626-0.345728534828j)*x[0] + ((-0.444641311104-0.327823581177j))*x[1] + ((0.758152926081-0.55924187451j))*x[2]
            ref[(0, 2, 1)]=(0.380707660302-0.616396995258j)
            arg[(0, 2, 2)]=(-0.702392687874-0.940916897567j)*x[0] + ((-0.175472325827+0.223779260003j))*x[1] + ((0.977455240384+0.927927177654j))*x[2]
            ref[(0, 2, 2)]=(0.0497951133415+0.105394770045j)
            arg[(0, 2, 3)]=(-0.778213648983+0.133760992588j)*x[0] + ((-0.0022498165187-0.0611638457655j))*x[1] + ((0.638077091154+0.868179607895j))*x[2]
            ref[(0, 2, 3)]=(-0.0711931871737+0.470388377359j)
            arg[(0, 3, 0)]=(-0.0656147684597+0.425198297589j)*x[0] + ((-0.000139393370999-0.631212576255j))*x[1] + ((0.580910280042-0.322392142719j))*x[2]
            ref[(0, 3, 0)]=(0.257578059106-0.264203210692j)
            arg[(0, 3, 1)]=(0.759021787628-0.357453871881j)*x[0] + ((-0.936209245849+0.515403532846j))*x[1] + ((0.175877718635-0.34362511154j))*x[2]
            ref[(0, 3, 1)]=(-0.000654869792768-0.0928377252881j)
            arg[(0, 3, 2)]=(-0.401324980744-0.831380146023j)*x[0] + ((0.285896785024-0.785024167515j))*x[1] + ((-0.687652171904-0.524431728686j))*x[2]
            ref[(0, 3, 2)]=(-0.401540183811-1.07041802111j)
            arg[(0, 3, 3)]=(0.766963580273-0.705217182943j)*x[0] + ((0.529615640696-0.924492238434j))*x[1] + ((0.513792760703+0.920887776361j))*x[2]
            ref[(0, 3, 3)]=(0.905185990837-0.354410822508j)
            arg[(1, 0, 0)]=(0.324683477337+0.572028470611j)*x[0] + ((-0.531848181895-0.737786164395j))*x[1] + ((0.700370999414-0.277498381413j))*x[2]
            ref[(1, 0, 0)]=(0.246603147428-0.221628037599j)
            arg[(1, 0, 1)]=(-0.467292825985+0.664928741658j)*x[0] + ((-0.173686751683+0.756847435678j))*x[1] + ((-0.600549547268+0.957709182384j))*x[2]
            ref[(1, 0, 1)]=(-0.620764562468+1.18974267986j)
            arg[(1, 0, 2)]=(0.422665759461+0.0594946833903j)*x[0] + ((0.520377657306+0.578601351462j))*x[1] + ((-0.588091701404+0.00186968895912j))*x[2]
            ref[(1, 0, 2)]=(0.177475857681+0.319982861906j)
            arg[(1, 0, 3)]=(-0.19138464232+0.495257732865j)*x[0] + ((0.39025710575+0.975261545839j))*x[1] + ((-0.460239833663+0.809010654618j))*x[2]
            ref[(1, 0, 3)]=(-0.130683685116+1.13976496666j)
            arg[(1, 1, 0)]=(0.00958950842434-0.353632827029j)*x[0] + ((0.696927981971-0.278828684182j))*x[1] + ((0.693321570354-0.0847567642437j))*x[2]
            ref[(1, 1, 0)]=(0.699919530375-0.358609137727j)
            arg[(1, 1, 1)]=(0.0069930816319-0.297757754658j)*x[0] + ((-0.959009229685+0.0250382494753j))*x[1] + ((0.322308654358-0.572043347773j))*x[2]
            ref[(1, 1, 1)]=(-0.314853746847-0.422381426478j)
            arg[(1, 1, 2)]=(0.721674369501+0.145361680327j)*x[0] + ((0.477593151107+0.953709253433j))*x[1] + ((-0.344960647584-0.994488485579j))*x[2]
            ref[(1, 1, 2)]=(0.427153436512+0.0522912240902j)
            arg[(1, 1, 3)]=(-0.65058259731+0.178768633961j)*x[0] + ((-0.12342021995-0.119405046128j))*x[1] + ((-0.577301227108+0.730374793382j))*x[2]
            ref[(1, 1, 3)]=(-0.675652022184+0.394869190607j)
            arg[(1, 2, 0)]=(0.687655392756+0.0437138842112j)*x[0] + ((0.971970349515+0.95557786235j))*x[1] + ((0.0533686752659+0.275596477295j))*x[2]
            ref[(1, 2, 0)]=(0.856497208769+0.637444111928j)
            arg[(1, 2, 1)]=(-0.691397775841+0.85166248745j)*x[0] + ((-0.933653358825+0.647957852556j))*x[1] + ((0.4519734224+0.942781405789j))*x[2]
            ref[(1, 2, 1)]=(-0.586538856133+1.2212008729j)
            arg[(1, 2, 2)]=(-0.174035597025-0.647732398453j)*x[0] + ((0.935374062481+0.0194191072336j))*x[1] + ((0.614939128318+0.0922391371257j))*x[2]
            ref[(1, 2, 2)]=(0.688138796887-0.268037077047j)
            arg[(1, 2, 3)]=(-0.184941278214-0.753079551106j)*x[0] + ((-0.0828646780572-0.635125229686j))*x[1] + ((-0.132345515711+0.317057962895j))*x[2]
            ref[(1, 2, 3)]=(-0.200075735991-0.535573408949j)
            arg[(1, 3, 0)]=(-0.982671654033+0.941014115991j)*x[0] + ((0.925123619491-0.520684243838j))*x[1] + ((-0.0764148954623-0.874731843817j))*x[2]
            ref[(1, 3, 0)]=(-0.0669814650023-0.227200985832j)
            arg[(1, 3, 1)]=(0.613791552988+0.104258924189j)*x[0] + ((-0.264932949481-0.175542090605j))*x[1] + ((-0.891276080512+0.663723768623j))*x[2]
            ref[(1, 3, 1)]=(-0.271208738502+0.296220301104j)
            arg[(1, 3, 2)]=(-0.838522582437-0.0859434410022j)*x[0] + ((-0.71077665979+0.987010633801j))*x[1] + ((0.062425079602-0.974624097824j))*x[2]
            ref[(1, 3, 2)]=(-0.743437081312-0.0367784525127j)
            arg[(1, 3, 3)]=(0.50627550271+0.171680476695j)*x[0] + ((-0.626067961414+0.270406323811j))*x[1] + ((0.559406797223-0.975689493904j))*x[2]
            ref[(1, 3, 3)]=(0.21980716926-0.266801346699j)
            arg[(2, 0, 0)]=(-0.497251059686+0.0907751061507j)*x[0] + ((-0.799087637287+0.502734916129j))*x[1] + ((0.546857053977-0.672929877086j))*x[2]
            ref[(2, 0, 0)]=(-0.374740821498-0.0397099274029j)
            arg[(2, 0, 1)]=(-0.662430589654-0.886616886398j)*x[0] + ((0.0867789647642+0.244550607222j))*x[1] + ((0.264985864663-0.328487849682j))*x[2]
            ref[(2, 0, 1)]=(-0.155332880113-0.485277064429j)
            arg[(2, 0, 2)]=(-0.594068661913+0.156942582754j)*x[0] + ((-0.320898723621+0.535039187096j))*x[1] + ((0.0414448271577+0.852658469515j))*x[2]
            ref[(2, 0, 2)]=(-0.436761279188+0.772320119683j)
            arg[(2, 0, 3)]=(-0.631515487193+0.903638843172j)*x[0] + ((0.685802541706+0.433020712164j))*x[1] + ((-0.454496327289-0.479460851274j))*x[2]
            ref[(2, 0, 3)]=(-0.200104636388+0.428599352031j)
            arg[(2, 1, 0)]=(-0.0741651898659+0.00243679500436j)*x[0] + ((-0.967740014251+0.116248129005j))*x[1] + ((-0.266048399868+0.117390043852j))*x[2]
            ref[(2, 1, 0)]=(-0.653976801993+0.118037483931j)
            arg[(2, 1, 1)]=(0.313134290122+0.536670257462j)*x[0] + ((-0.0447889414059-0.152893322703j))*x[1] + ((-0.103062462823-0.572391903172j))*x[2]
            ref[(2, 1, 1)]=(0.0826414429465-0.0943074842062j)
            arg[(2, 1, 2)]=(0.817821241009-0.602605605172j)*x[0] + ((-0.724406262925-0.537309597761j))*x[1] + ((0.998805396979-0.0742989413132j))*x[2]
            ref[(2, 1, 2)]=(0.546110187532-0.607107072123j)
            arg[(2, 1, 3)]=(-0.624337480752-0.846267602627j)*x[0] + ((-0.519314322993+0.931053178267j))*x[1] + ((-0.878397275166+0.589454090631j))*x[2]
            ref[(2, 1, 3)]=(-1.01102453946+0.337119833136j)
            arg[(2, 2, 0)]=(0.884322635507-0.353010060511j)*x[0] + ((0.508377091452-0.0371905343716j))*x[1] + ((0.0513314201017-0.0411115796116j))*x[2]
            ref[(2, 2, 0)]=(0.72201557353-0.215656087247j)
            arg[(2, 2, 1)]=(-0.219463070576+0.5072097916j)*x[0] + ((0.795520580179+0.318485584669j))*x[1] + ((0.249546252061-0.510764330574j))*x[2]
            ref[(2, 2, 1)]=(0.412801880832+0.157465522847j)
            arg[(2, 2, 2)]=(0.825929410543+0.337592818248j)*x[0] + ((-0.811366133918-0.653284599601j))*x[1] + ((0.316584343972-0.640247585764j))*x[2]
            ref[(2, 2, 2)]=(0.165573810299-0.477969683559j)
            arg[(2, 2, 3)]=(0.482852576523+0.135349794328j)*x[0] + ((0.594945978219-0.352703517929j))*x[1] + ((-0.848449269902+0.0680101633923j))*x[2]
            ref[(2, 2, 3)]=(0.11467464242-0.0746717801042j)
            arg[(2, 3, 0)]=(0.511506769734+0.850620576773j)*x[0] + ((0.399135257665-0.354946908008j))*x[1] + ((0.122245807164+0.284125317565j))*x[2]
            ref[(2, 3, 0)]=(0.516443917281+0.389899493165j)
            arg[(2, 3, 1)]=(0.0656255269247+0.0507162903511j)*x[0] + ((0.851706843442-0.526389418344j))*x[1] + ((-0.521576556345-0.706756506296j))*x[2]
            ref[(2, 3, 1)]=(0.197877907011-0.591214817144j)
            arg[(2, 3, 2)]=(0.283941005795+0.667287456318j)*x[0] + ((-0.338259964983+0.600174992207j))*x[1] + ((0.728642215495+0.900110606872j))*x[2]
            ref[(2, 3, 2)]=(0.337161628154+1.0837865277j)
            arg[(2, 3, 3)]=(-0.158315964921-0.813800069124j)*x[0] + ((-0.333780015306-0.448356813892j))*x[1] + ((-0.627432935057-0.532442740651j))*x[2]
            ref[(2, 3, 3)]=(-0.559764457642-0.897299811833j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 4),w)
        ref=numpy.zeros((4, 3, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.334815724479-0.437252915538j)*x[0] + ((-0.575250713258-0.297816546477j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.455033218868-0.367534731008j)
            arg[(0, 0, 0, 1)]=(-0.503065008628-0.777002904135j)*x[0] + ((0.27261420227-0.245747990591j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.115225403179-0.511375447363j)
            arg[(0, 0, 0, 2)]=(0.948792909465+0.343354006222j)*x[0] + ((-0.0643679842623+0.548821674368j))*x[1]
            ref[(0, 0, 0, 2)]=(0.442212462602+0.446087840295j)
            arg[(0, 0, 0, 3)]=(0.327356122355+0.128569492929j)*x[0] + ((0.122775370715+0.429387818512j))*x[1]
            ref[(0, 0, 0, 3)]=(0.225065746535+0.278978655721j)
            arg[(0, 0, 1, 0)]=(0.347945812686+0.71998282391j)*x[0] + ((-0.0985720044724+0.256005129952j))*x[1]
            ref[(0, 0, 1, 0)]=(0.124686904107+0.487993976931j)
            arg[(0, 0, 1, 1)]=(-0.996467820329+0.469285064398j)*x[0] + ((0.822928829734-0.420941975004j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.0867694952976+0.0241715446972j)
            arg[(0, 0, 1, 2)]=(-0.701256208979-0.044258511785j)*x[0] + ((-0.772059689664+0.225154834359j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.736657949322+0.0904481612869j)
            arg[(0, 0, 1, 3)]=(0.470657236749-0.371497545394j)*x[0] + ((-0.526677188965+0.80632316331j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.0280099761077+0.217412808958j)
            arg[(0, 1, 0, 0)]=(-0.147643668763+0.152839664709j)*x[0] + ((-0.639184450508+0.992471532287j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.393414059636+0.572655598498j)
            arg[(0, 1, 0, 1)]=(0.974250621733-0.588370610132j)*x[0] + ((0.180359845543+0.315614582295j))*x[1]
            ref[(0, 1, 0, 1)]=(0.577305233638-0.136378013918j)
            arg[(0, 1, 0, 2)]=(0.18796738552-0.278411595546j)*x[0] + ((-0.428649308122-0.153125937003j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.120340961301-0.215768766275j)
            arg[(0, 1, 0, 3)]=(0.6221684376-0.370097757129j)*x[0] + ((-0.0358331686525+0.77115408121j))*x[1]
            ref[(0, 1, 0, 3)]=(0.293167634474+0.20052816204j)
            arg[(0, 1, 1, 0)]=(-0.782384207649-0.804932106479j)*x[0] + ((-0.529012608225+0.55596173256j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.655698407937-0.12448518696j)
            arg[(0, 1, 1, 1)]=(0.379298105+0.995333502314j)*x[0] + ((0.40235718786-0.684797473477j))*x[1]
            ref[(0, 1, 1, 1)]=(0.39082764643+0.155268014419j)
            arg[(0, 1, 1, 2)]=(0.712741443632-0.745757541096j)*x[0] + ((0.924306827111+0.802031943984j))*x[1]
            ref[(0, 1, 1, 2)]=(0.818524135371+0.0281372014438j)
            arg[(0, 1, 1, 3)]=(-0.147757539683+0.603549277194j)*x[0] + ((-0.541804078238-0.487173381396j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.34478080896+0.0581879478989j)
            arg[(0, 2, 0, 0)]=(-0.136838670022+0.0414574933391j)*x[0] + ((0.74739265657+0.418278970506j))*x[1]
            ref[(0, 2, 0, 0)]=(0.305276993274+0.229868231922j)
            arg[(0, 2, 0, 1)]=(-0.514948688418-0.943194901786j)*x[0] + ((-0.999204295357-0.800630356641j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.757076491888-0.871912629213j)
            arg[(0, 2, 0, 2)]=(0.376225389819-0.83453476551j)*x[0] + ((-0.620044465657+0.43937649392j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.121909537919-0.197579135795j)
            arg[(0, 2, 0, 3)]=(0.146635486614+0.97552708407j)*x[0] + ((0.369414636388+0.181642081322j))*x[1]
            ref[(0, 2, 0, 3)]=(0.258025061501+0.578584582696j)
            arg[(0, 2, 1, 0)]=(-0.678971686523+0.371707983076j)*x[0] + ((0.651906547947-0.342068066221j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.013532569288+0.0148199584277j)
            arg[(0, 2, 1, 1)]=(0.292953936193+0.265125408464j)*x[0] + ((-0.489558231632+0.571042679886j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.0983021477199+0.418084044175j)
            arg[(0, 2, 1, 2)]=(0.805395061324-0.75983283092j)*x[0] + ((0.302890374799+0.430715411256j))*x[1]
            ref[(0, 2, 1, 2)]=(0.554142718061-0.164558709832j)
            arg[(0, 2, 1, 3)]=(0.347352603791+0.741700579876j)*x[0] + ((0.682951966874-0.506951804727j))*x[1]
            ref[(0, 2, 1, 3)]=(0.515152285332+0.117374387574j)
            arg[(1, 0, 0, 0)]=(-0.76826327087+0.863770053245j)*x[0] + ((0.808871391747+0.559533721561j))*x[1]
            ref[(1, 0, 0, 0)]=(0.0203040604386+0.711651887403j)
            arg[(1, 0, 0, 1)]=(-0.982005602418-0.596546038974j)*x[0] + ((0.89259293921-0.947715367279j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.0447063316043-0.772130703127j)
            arg[(1, 0, 0, 2)]=(0.37409301639-0.757439586424j)*x[0] + ((0.0969710498954+0.692913411927j))*x[1]
            ref[(1, 0, 0, 2)]=(0.235532033143-0.0322630872484j)
            arg[(1, 0, 0, 3)]=(0.458140458233+0.924130382362j)*x[0] + ((-0.470719530977+0.694189337234j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.0062895363716+0.809159859798j)
            arg[(1, 0, 1, 0)]=(0.177861406981-0.198794653661j)*x[0] + ((0.620160729534-0.0383134484568j))*x[1]
            ref[(1, 0, 1, 0)]=(0.399011068258-0.118554051059j)
            arg[(1, 0, 1, 1)]=(0.325803861543-0.464197378999j)*x[0] + ((0.458078040141+0.775778116405j))*x[1]
            ref[(1, 0, 1, 1)]=(0.391940950842+0.155790368703j)
            arg[(1, 0, 1, 2)]=(-0.0863703912883+0.973866798047j)*x[0] + ((0.954091674911-0.235047129269j))*x[1]
            ref[(1, 0, 1, 2)]=(0.433860641811+0.369409834389j)
            arg[(1, 0, 1, 3)]=(-0.152177149976+0.278964588308j)*x[0] + ((-0.661404418644-0.589010823745j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.40679078431-0.155023117718j)
            arg[(1, 1, 0, 0)]=(0.545155484648+0.576156351644j)*x[0] + ((-0.754753415389+0.582838423914j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.10479896537+0.579497387779j)
            arg[(1, 1, 0, 1)]=(0.933814298627-0.142048345676j)*x[0] + ((-0.501299462788+0.486431989627j))*x[1]
            ref[(1, 1, 0, 1)]=(0.216257417919+0.172191821976j)
            arg[(1, 1, 0, 2)]=(0.321358496967-0.459557367439j)*x[0] + ((0.526940648115-0.114749964828j))*x[1]
            ref[(1, 1, 0, 2)]=(0.424149572541-0.287153666133j)
            arg[(1, 1, 0, 3)]=(0.853650076067+0.651898541493j)*x[0] + ((-0.932416900799+0.83130663725j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.0393834123658+0.741602589371j)
            arg[(1, 1, 1, 0)]=(0.19733683191-0.042080767103j)*x[0] + ((0.276768243581-0.0858753222866j))*x[1]
            ref[(1, 1, 1, 0)]=(0.237052537745-0.0639780446948j)
            arg[(1, 1, 1, 1)]=(-0.275909699993-0.211312402405j)*x[0] + ((-0.537916010997+0.817946311663j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.406912855495+0.303316954629j)
            arg[(1, 1, 1, 2)]=(0.399607203861+0.547378232634j)*x[0] + ((0.229267339974+0.0204190485474j))*x[1]
            ref[(1, 1, 1, 2)]=(0.314437271917+0.283898640591j)
            arg[(1, 1, 1, 3)]=(-0.652586765312-0.246739027128j)*x[0] + ((-0.337500566535+0.379952453878j))*x[1]
            ref[(1, 1, 1, 3)]=(-0.495043665924+0.0666067133746j)
            arg[(1, 2, 0, 0)]=(-0.342105026973-0.0202461305434j)*x[0] + ((0.336120796523+0.54062118374j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.00299211522523+0.260187526598j)
            arg[(1, 2, 0, 1)]=(-0.219639278162+0.764888076019j)*x[0] + ((0.336930175837-0.281082288165j))*x[1]
            ref[(1, 2, 0, 1)]=(0.0586454488377+0.241902893927j)
            arg[(1, 2, 0, 2)]=(0.12425226168-0.360851111472j)*x[0] + ((0.638535437306+0.551851388287j))*x[1]
            ref[(1, 2, 0, 2)]=(0.381393849493+0.0955001384076j)
            arg[(1, 2, 0, 3)]=(-0.763234577612-0.306866296635j)*x[0] + ((0.83604670743+0.755068837734j))*x[1]
            ref[(1, 2, 0, 3)]=(0.0364060649088+0.22410127055j)
            arg[(1, 2, 1, 0)]=(-0.848729548557-0.0742968180607j)*x[0] + ((0.887401677443+0.182212651234j))*x[1]
            ref[(1, 2, 1, 0)]=(0.0193360644431+0.0539579165867j)
            arg[(1, 2, 1, 1)]=(0.974325616253-0.159917802197j)*x[0] + ((0.575961833197+0.0918604060571j))*x[1]
            ref[(1, 2, 1, 1)]=(0.775143724725-0.0340286980702j)
            arg[(1, 2, 1, 2)]=(0.0280644299385+0.114413324127j)*x[0] + ((-0.239741346105-0.0890563446978j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.105838458083+0.0126784897146j)
            arg[(1, 2, 1, 3)]=(0.891380095795+0.201004402673j)*x[0] + ((-0.994448271762+0.607689102204j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.0515340879832+0.404346752438j)
            arg[(2, 0, 0, 0)]=(0.0410090869767-0.816326837977j)*x[0] + ((0.639137501982+0.392736016551j))*x[1]
            ref[(2, 0, 0, 0)]=(0.34007329448-0.211795410713j)
            arg[(2, 0, 0, 1)]=(0.80143369878+0.139264458783j)*x[0] + ((0.713198229018-0.384045715756j))*x[1]
            ref[(2, 0, 0, 1)]=(0.757315963899-0.122390628487j)
            arg[(2, 0, 0, 2)]=(-0.378120964595+0.809130510631j)*x[0] + ((0.308223036651+0.970330725632j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.0349489639717+0.889730618131j)
            arg[(2, 0, 0, 3)]=(0.162061062742-0.639238789706j)*x[0] + ((0.756980559519+0.707586813146j))*x[1]
            ref[(2, 0, 0, 3)]=(0.45952081113+0.0341740117196j)
            arg[(2, 0, 1, 0)]=(-0.0131596634327-0.273436617608j)*x[0] + ((0.203299261171-0.0471866967847j))*x[1]
            ref[(2, 0, 1, 0)]=(0.0950697988694-0.160311657196j)
            arg[(2, 0, 1, 1)]=(-0.576583649887-0.671630209257j)*x[0] + ((0.853491133664-0.173129314342j))*x[1]
            ref[(2, 0, 1, 1)]=(0.138453741889-0.422379761799j)
            arg[(2, 0, 1, 2)]=(-0.892252918309+0.55648239265j)*x[0] + ((-0.714595651516-0.192833110021j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.803424284912+0.181824641315j)
            arg[(2, 0, 1, 3)]=(-0.0720025039555-0.855982000549j)*x[0] + ((0.389075962987-0.394776842131j))*x[1]
            ref[(2, 0, 1, 3)]=(0.158536729516-0.62537942134j)
            arg[(2, 1, 0, 0)]=(-0.983143329519+0.730201550074j)*x[0] + ((-0.780590386967+0.530108551757j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.881866858243+0.630155050915j)
            arg[(2, 1, 0, 1)]=(-0.661359043871+0.794557922441j)*x[0] + ((-0.30376990617+0.764203758967j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.48256447502+0.779380840704j)
            arg[(2, 1, 0, 2)]=(-0.982578881546-0.567284559695j)*x[0] + ((-0.384901296873-0.398883330442j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.683740089209-0.483083945069j)
            arg[(2, 1, 0, 3)]=(-0.966438415011-0.821467009819j)*x[0] + ((0.385327696726+0.687562027579j))*x[1]
            ref[(2, 1, 0, 3)]=(-0.290555359142-0.0669524911196j)
            arg[(2, 1, 1, 0)]=(-0.882781888019+0.0596733789486j)*x[0] + ((0.314089051639+0.0782145304231j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.28434641819+0.0689439546859j)
            arg[(2, 1, 1, 1)]=(0.105187482606+0.443841077279j)*x[0] + ((-0.975772288701-0.0985872866974j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.435292403047+0.172626895291j)
            arg[(2, 1, 1, 2)]=(-0.502154446912+0.115620580514j)*x[0] + ((-0.399922126068+0.472208367362j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.45103828649+0.293914473938j)
            arg[(2, 1, 1, 3)]=(-0.162625801853-0.0780939693137j)*x[0] + ((0.15087112109-0.277377575816j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.00587734038139-0.177735772565j)
            arg[(2, 2, 0, 0)]=(0.860355444596-0.513388301251j)*x[0] + ((-0.0881896819608-0.670508511491j))*x[1]
            ref[(2, 2, 0, 0)]=(0.386082881318-0.591948406371j)
            arg[(2, 2, 0, 1)]=(-0.0797410153942+0.158889845552j)*x[0] + ((0.0135156975417-0.446613245251j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.0331126589263-0.14386169985j)
            arg[(2, 2, 0, 2)]=(-0.654820714388+0.502796362863j)*x[0] + ((0.440132965891-0.127939351613j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.107343874249+0.187428505625j)
            arg[(2, 2, 0, 3)]=(0.084306778756+0.0496886265509j)*x[0] + ((-0.213934245615+0.860540967592j))*x[1]
            ref[(2, 2, 0, 3)]=(-0.0648137334297+0.455114797071j)
            arg[(2, 2, 1, 0)]=(0.579186843665-0.941197031541j)*x[0] + ((-0.00313543394731-0.767081365688j))*x[1]
            ref[(2, 2, 1, 0)]=(0.288025704859-0.854139198614j)
            arg[(2, 2, 1, 1)]=(0.139831619043-0.956940806086j)*x[0] + ((0.660882756288+0.0382404624101j))*x[1]
            ref[(2, 2, 1, 1)]=(0.400357187665-0.459350171838j)
            arg[(2, 2, 1, 2)]=(-0.678422217371+0.96755737132j)*x[0] + ((0.22725651952+0.227685669489j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.225582848925+0.597621520404j)
            arg[(2, 2, 1, 3)]=(0.122663774425+0.279819607215j)*x[0] + ((-0.192502694697-0.895079607182j))*x[1]
            ref[(2, 2, 1, 3)]=(-0.0349194601357-0.307629999983j)
            arg[(3, 0, 0, 0)]=(-0.903459027021+0.166190328779j)*x[0] + ((0.26903031257-0.582223600617j))*x[1]
            ref[(3, 0, 0, 0)]=(-0.317214357225-0.208016635919j)
            arg[(3, 0, 0, 1)]=(-0.738473941477-0.595445153863j)*x[0] + ((0.540471032568-0.410104521081j))*x[1]
            ref[(3, 0, 0, 1)]=(-0.0990014544547-0.502774837472j)
            arg[(3, 0, 0, 2)]=(-0.840625265837+0.531055234104j)*x[0] + ((-0.0454863419757+0.120765076396j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.443055803906+0.32591015525j)
            arg[(3, 0, 0, 3)]=(0.368449399575-0.306678851161j)*x[0] + ((-0.621273377604+0.576352704086j))*x[1]
            ref[(3, 0, 0, 3)]=(-0.126411989014+0.134836926462j)
            arg[(3, 0, 1, 0)]=(-0.414910128568-0.12490033253j)*x[0] + ((-0.675052962954+0.99211121001j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.544981545761+0.43360543874j)
            arg[(3, 0, 1, 1)]=(-0.646347515977+0.375325940154j)*x[0] + ((-0.337389543837-0.96549856723j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.491868529907-0.295086313538j)
            arg[(3, 0, 1, 2)]=(-0.079930128643+0.200191959727j)*x[0] + ((-0.375812049278-0.596317816659j))*x[1]
            ref[(3, 0, 1, 2)]=(-0.227871088961-0.198062928466j)
            arg[(3, 0, 1, 3)]=(0.167443418717-0.683549415277j)*x[0] + ((-0.222619194711+0.779465173069j))*x[1]
            ref[(3, 0, 1, 3)]=(-0.0275878879972+0.0479578788959j)
            arg[(3, 1, 0, 0)]=(-0.726979049906-0.735136197418j)*x[0] + ((0.459307837945+0.514052352153j))*x[1]
            ref[(3, 1, 0, 0)]=(-0.133835605981-0.110541922632j)
            arg[(3, 1, 0, 1)]=(0.821214296467+0.810901358296j)*x[0] + ((0.74217118443-0.850669986837j))*x[1]
            ref[(3, 1, 0, 1)]=(0.781692740449-0.0198843142703j)
            arg[(3, 1, 0, 2)]=(-0.823961574373-0.10772008137j)*x[0] + ((-0.621861285879+0.461573532219j))*x[1]
            ref[(3, 1, 0, 2)]=(-0.722911430126+0.176926725425j)
            arg[(3, 1, 0, 3)]=(-0.871901615644-0.602889621869j)*x[0] + ((-0.602286497575-0.109061555183j))*x[1]
            ref[(3, 1, 0, 3)]=(-0.737094056609-0.355975588526j)
            arg[(3, 1, 1, 0)]=(-0.433285702034+0.0639568230503j)*x[0] + ((-0.057679986904+0.252722048138j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.245482844469+0.158339435594j)
            arg[(3, 1, 1, 1)]=(0.0436474570602-0.219906864306j)*x[0] + ((0.959782318617-0.238637912646j))*x[1]
            ref[(3, 1, 1, 1)]=(0.501714887839-0.229272388476j)
            arg[(3, 1, 1, 2)]=(0.00764415243473-0.691999767287j)*x[0] + ((-0.519432419569+0.316553585791j))*x[1]
            ref[(3, 1, 1, 2)]=(-0.255894133567-0.187723090748j)
            arg[(3, 1, 1, 3)]=(0.0427790653163+0.243726589237j)*x[0] + ((0.255953596875-0.262142978236j))*x[1]
            ref[(3, 1, 1, 3)]=(0.149366331096-0.00920819449923j)
            arg[(3, 2, 0, 0)]=(-0.360391818984-0.331598822002j)*x[0] + ((0.60878666959+0.596890514075j))*x[1]
            ref[(3, 2, 0, 0)]=(0.124197425303+0.132645846036j)
            arg[(3, 2, 0, 1)]=(0.395319507241+0.51083597028j)*x[0] + ((0.342340890694+0.680238527634j))*x[1]
            ref[(3, 2, 0, 1)]=(0.368830198968+0.595537248957j)
            arg[(3, 2, 0, 2)]=(0.752989048083+0.320089877025j)*x[0] + ((0.53079341819+0.168948941619j))*x[1]
            ref[(3, 2, 0, 2)]=(0.641891233136+0.244519409322j)
            arg[(3, 2, 0, 3)]=(-0.746325376814+0.429995195587j)*x[0] + ((-0.73360629222+0.183218490554j))*x[1]
            ref[(3, 2, 0, 3)]=(-0.739965834517+0.30660684307j)
            arg[(3, 2, 1, 0)]=(0.707413941421+0.280333557337j)*x[0] + ((-0.769564644508+0.661893846651j))*x[1]
            ref[(3, 2, 1, 0)]=(-0.0310753515435+0.471113701994j)
            arg[(3, 2, 1, 1)]=(-0.509764776981+0.595301605522j)*x[0] + ((0.485536674902+0.0438965534015j))*x[1]
            ref[(3, 2, 1, 1)]=(-0.012114051039+0.319599079462j)
            arg[(3, 2, 1, 2)]=(0.403169965624-0.576131465198j)*x[0] + ((-0.817326544327+0.0472615107008j))*x[1]
            ref[(3, 2, 1, 2)]=(-0.207078289352-0.264434977249j)
            arg[(3, 2, 1, 3)]=(-0.806892534784-0.278693451401j)*x[0] + ((-0.530841689886-0.453922265677j))*x[1]
            ref[(3, 2, 1, 3)]=(-0.668867112335-0.366307858539j)
        else:
            arg[(0, 0, 0, 0)]=(0.942630159029-0.671425804222j)*x[0] + ((-0.994590572872+0.10935051058j))*x[1] + ((-0.56272776777+0.198073924027j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.307344090806-0.182000684808j)
            arg[(0, 0, 0, 1)]=(0.889117625527+0.958078895544j)*x[0] + ((0.40478749413+0.344826401674j))*x[1] + ((-0.934644997112+0.450445145118j))*x[2]
            ref[(0, 0, 0, 1)]=(0.179630061273+0.876675221168j)
            arg[(0, 0, 0, 2)]=(0.109304833378-0.0950511273497j)*x[0] + ((0.174639866268-0.626965411471j))*x[1] + ((0.873194227799+0.594352169309j))*x[2]
            ref[(0, 0, 0, 2)]=(0.578569463722-0.0638321847558j)
            arg[(0, 0, 0, 3)]=(0.224711794263-0.923345406058j)*x[0] + ((-0.612411695379-0.809153017981j))*x[1] + ((-0.554543511071-0.475095816422j))*x[2]
            ref[(0, 0, 0, 3)]=(-0.471121706093-1.10379712023j)
            arg[(0, 0, 1, 0)]=(0.0454057231683-0.753473479478j)*x[0] + ((-0.279918770453-0.562460100472j))*x[1] + ((-0.329365413051+0.85599162073j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.281939230168-0.22997097961j)
            arg[(0, 0, 1, 1)]=(0.976122084434-0.296830023104j)*x[0] + ((-0.84810355868+0.190633638164j))*x[1] + ((0.265989524403+0.965217528077j))*x[2]
            ref[(0, 0, 1, 1)]=(0.197004025079+0.429510571568j)
            arg[(0, 0, 1, 2)]=(0.20750195055-0.209434182302j)*x[0] + ((0.201763923051-0.540917314078j))*x[1] + ((0.521021143232+0.503020187451j))*x[2]
            ref[(0, 0, 1, 2)]=(0.465143508417-0.123665654464j)
            arg[(0, 0, 1, 3)]=(0.0999327929975+0.872884770052j)*x[0] + ((-0.241131530529+0.73094863462j))*x[1] + ((-0.10811491322-0.576648993288j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.124656825376+0.513592205692j)
            arg[(0, 1, 0, 0)]=(-0.491483096569-0.298701098864j)*x[0] + ((-0.346748573611+0.470861699517j))*x[1] + ((0.967192319511+0.620076357016j))*x[2]
            ref[(0, 1, 0, 0)]=(0.0644803246656+0.396118478834j)
            arg[(0, 1, 0, 1)]=(-0.695390486681-0.250744463929j)*x[0] + ((-0.657092781928-0.298713667112j))*x[1] + ((0.406916516528-0.368853384849j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.472783376041-0.459155757945j)
            arg[(0, 1, 0, 2)]=(-0.384288410135-0.236314111859j)*x[0] + ((0.691273924463-0.318158973751j))*x[1] + ((-0.278486799427-0.695378614478j))*x[2]
            ref[(0, 1, 0, 2)]=(0.0142493574505-0.624925850044j)
            arg[(0, 1, 0, 3)]=(0.611046973293-0.512838637795j)*x[0] + ((0.276295510954-0.837482159787j))*x[1] + ((-0.215780895345+0.582567039938j))*x[2]
            ref[(0, 1, 0, 3)]=(0.335780794451-0.383876878822j)
            arg[(0, 1, 1, 0)]=(0.173293482913-0.413395700327j)*x[0] + ((-0.185406871397+0.822357634473j))*x[1] + ((0.763096767578+0.606461437485j))*x[2]
            ref[(0, 1, 1, 0)]=(0.375491689547+0.507711685815j)
            arg[(0, 1, 1, 1)]=(0.5339123531+0.497080633472j)*x[0] + ((-0.70599882499+0.360644734317j))*x[1] + ((0.758968338349+0.773745100129j))*x[2]
            ref[(0, 1, 1, 1)]=(0.29344093323+0.815735233959j)
            arg[(0, 1, 1, 2)]=(0.308771825896-0.468276573806j)*x[0] + ((-0.945344356247-0.235668533306j))*x[1] + ((-0.0857610878607-0.778532624613j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.361166809105-0.741238865863j)
            arg[(0, 1, 1, 3)]=(-0.747931306401+0.280297403313j)*x[0] + ((0.501791076114+0.436773810417j))*x[1] + ((0.297997308495+0.499622322066j))*x[2]
            ref[(0, 1, 1, 3)]=(0.0259285391039+0.608346767898j)
            arg[(0, 2, 0, 0)]=(0.25645492484-0.896445739778j)*x[0] + ((0.93402553388-0.801254875301j))*x[1] + ((0.315500827578+0.62004999045j))*x[2]
            ref[(0, 2, 0, 0)]=(0.752990643149-0.538825312315j)
            arg[(0, 2, 0, 1)]=(0.264412846306+0.252759456451j)*x[0] + ((0.796179143682+0.412330692748j))*x[1] + ((-0.939324637518-0.688089223838j))*x[2]
            ref[(0, 2, 0, 1)]=(0.060633676235-0.0114995373194j)
            arg[(0, 2, 0, 2)]=(-0.579255335506+0.879733804552j)*x[0] + ((-0.69486852592-0.424456795647j))*x[1] + ((0.0197789910858+0.0662908541557j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.62717243517+0.26078393153j)
            arg[(0, 2, 0, 3)]=(-0.61123515791+0.982396749666j)*x[0] + ((0.469422982969+0.266967043053j))*x[1] + ((0.867061234681+0.499641563896j))*x[2]
            ref[(0, 2, 0, 3)]=(0.36262452987+0.874502678307j)
            arg[(0, 2, 1, 0)]=(-0.266157246981-0.354235831504j)*x[0] + ((-0.755211096462-0.285525401121j))*x[1] + ((0.584205046561-0.987992360923j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.218581648441-0.813876796774j)
            arg[(0, 2, 1, 1)]=(-0.945336112278+0.155819119649j)*x[0] + ((0.711998190614-0.219208936091j))*x[1] + ((-0.386712970556-0.0865164333932j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.31002544611-0.0749531249174j)
            arg[(0, 2, 1, 2)]=(-0.00221827162903-0.423028529193j)*x[0] + ((0.61720449144+0.911525270023j))*x[1] + ((0.875877189144+0.257576711264j))*x[2]
            ref[(0, 2, 1, 2)]=(0.745431704478+0.373036726047j)
            arg[(0, 2, 1, 3)]=(-0.763890162488+0.726211960026j)*x[0] + ((0.831725221735+0.707519118031j))*x[1] + ((-0.218760147545+0.0975578969436j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.0754625441488+0.765644487501j)
            arg[(1, 0, 0, 0)]=(-0.897191305595-0.380675894671j)*x[0] + ((0.0355281322268-0.726760100962j))*x[1] + ((0.81295758544+0.428824774552j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.0243527939638-0.33930561054j)
            arg[(1, 0, 0, 1)]=(0.240709440648+0.45580859401j)*x[0] + ((-0.211322436817-0.178107502334j))*x[1] + ((0.0452759361126+0.677784497652j))*x[2]
            ref[(1, 0, 0, 1)]=(0.0373314699718+0.477742794664j)
            arg[(1, 0, 0, 2)]=(0.531193688274-0.0738389689871j)*x[0] + ((-0.310581830747-0.0214916910488j))*x[1] + ((0.137152277657-0.925319716259j))*x[2]
            ref[(1, 0, 0, 2)]=(0.178882067592-0.510325188148j)
            arg[(1, 0, 0, 3)]=(-0.215899963591-0.545638394145j)*x[0] + ((0.111433025853-0.427930427772j))*x[1] + ((-0.982139138674+0.0146955376529j))*x[2]
            ref[(1, 0, 0, 3)]=(-0.543303038207-0.479436642132j)
            arg[(1, 0, 1, 0)]=(0.96784132361+0.177422898948j)*x[0] + ((0.898120239309-0.490226141946j))*x[1] + ((0.997272516942-0.679497901056j))*x[2]
            ref[(1, 0, 1, 0)]=(1.43161703993-0.496150572027j)
            arg[(1, 0, 1, 1)]=(0.994510416283-0.201569252902j)*x[0] + ((-0.019814291527+0.0212748242817j))*x[1] + ((-0.218327988732+0.528999944017j))*x[2]
            ref[(1, 0, 1, 1)]=(0.378184068012+0.174352757699j)
            arg[(1, 0, 1, 2)]=(0.784964064357-0.809770972924j)*x[0] + ((0.849140468956+0.741687979798j))*x[1] + ((-0.268474227779-0.318950387186j))*x[2]
            ref[(1, 0, 1, 2)]=(0.682815152767-0.193516690156j)
            arg[(1, 0, 1, 3)]=(-0.130402692742-0.906048524088j)*x[0] + ((0.373508672387+0.600164130488j))*x[1] + ((0.674716690838+0.00284125170403j))*x[2]
            ref[(1, 0, 1, 3)]=(0.458911335242-0.151521570948j)
            arg[(1, 1, 0, 0)]=(-0.648283169935+0.582982136035j)*x[0] + ((0.803802479145+0.89594061294j))*x[1] + ((0.659198330595+0.593402340392j))*x[2]
            ref[(1, 1, 0, 0)]=(0.407358819902+1.03616254468j)
            arg[(1, 1, 0, 1)]=(-0.331145114796-0.32728889569j)*x[0] + ((0.156143239726+0.486448706267j))*x[1] + ((0.0461117908286+0.151867307395j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.0644450421211+0.155513558986j)
            arg[(1, 1, 0, 2)]=(0.246601118998-0.46381334504j)*x[0] + ((0.0111993572395-0.0387186827186j))*x[1] + ((-0.504599261423-0.225004450946j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.123399392593-0.363768239352j)
            arg[(1, 1, 0, 3)]=(-0.606874288429-0.0655537265104j)*x[0] + ((-0.611453234128-0.553780212198j))*x[1] + ((-0.616892482527+0.904824351891j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.917610002542+0.142745206591j)
            arg[(1, 1, 1, 0)]=(0.888217158856-0.472332004588j)*x[0] + ((-0.179212869573+0.804329943621j))*x[1] + ((-0.510468989844+0.584982603314j))*x[2]
            ref[(1, 1, 1, 0)]=(0.0992676497191+0.458490271174j)
            arg[(1, 1, 1, 1)]=(-0.564673890203+0.732534915349j)*x[0] + ((0.784085415491+0.576724771748j))*x[1] + ((0.170316587511+0.471624905578j))*x[2]
            ref[(1, 1, 1, 1)]=(0.1948640564+0.890442296337j)
            arg[(1, 1, 1, 2)]=(0.221215008977-0.162397451368j)*x[0] + ((0.86312973829+0.634242339449j))*x[1] + ((0.971764728824+0.0518935995939j))*x[2]
            ref[(1, 1, 1, 2)]=(1.02805473805+0.261869243838j)
            arg[(1, 1, 1, 3)]=(-0.245130255139+0.574472952104j)*x[0] + ((0.280109541123-0.211959519269j))*x[1] + ((-0.762107002283-0.53084072586j))*x[2]
            ref[(1, 1, 1, 3)]=(-0.36356385815-0.0841636465123j)
            arg[(1, 2, 0, 0)]=(-0.37583947151+0.0098522836492j)*x[0] + ((-0.0403663224341+0.951436448365j))*x[1] + ((0.437017793283+0.870213326995j))*x[2]
            ref[(1, 2, 0, 0)]=(0.0104059996694+0.915751029505j)
            arg[(1, 2, 0, 1)]=(-0.10255837671+0.556777325822j)*x[0] + ((0.599847112399+0.922448243544j))*x[1] + ((-0.670871729754+0.240606571912j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.0867914970327+0.859916070639j)
            arg[(1, 2, 0, 2)]=(-0.904949612888+0.593048630821j)*x[0] + ((0.479611614121+0.93337431474j))*x[1] + ((0.0458758601433+0.935797973688j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.189731069312+1.23111045962j)
            arg[(1, 2, 0, 3)]=(0.420297440663-0.597610750761j)*x[0] + ((-0.693255035685-0.943485809135j))*x[1] + ((0.595707704344-0.898653367393j))*x[2]
            ref[(1, 2, 0, 3)]=(0.161375054661-1.21987496365j)
            arg[(1, 2, 1, 0)]=(0.746010679557-0.698666226802j)*x[0] + ((-0.375692119711-0.834906704045j))*x[1] + ((-0.711272719512+0.221908212542j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.170477079833-0.655832359153j)
            arg[(1, 2, 1, 1)]=(-0.498231094976+0.0582704373828j)*x[0] + ((0.485771908543+0.659838521904j))*x[1] + ((0.00330510274321-0.311234715579j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.0045770418448+0.203437121853j)
            arg[(1, 2, 1, 2)]=(0.842098642145-0.300133476608j)*x[0] + ((0.809949517568-0.656113292743j))*x[1] + ((-0.749979285913-0.745090783374j))*x[2]
            ref[(1, 2, 1, 2)]=(0.4510344369-0.850668776362j)
            arg[(1, 2, 1, 3)]=(0.260320785417+0.518832512759j)*x[0] + ((0.839605737752-0.134379315564j))*x[1] + ((-0.196489019826-0.12832548665j))*x[2]
            ref[(1, 2, 1, 3)]=(0.451718751671+0.128063855273j)
            arg[(2, 0, 0, 0)]=(-0.870778334652-0.135604381158j)*x[0] + ((0.724821662311-0.425434437777j))*x[1] + ((0.797290285138-0.369266020393j))*x[2]
            ref[(2, 0, 0, 0)]=(0.325666806399-0.465152419664j)
            arg[(2, 0, 0, 1)]=(-0.71436862241+0.619798470147j)*x[0] + ((0.346603957188-0.363828169732j))*x[1] + ((0.917433969494+0.773594252649j))*x[2]
            ref[(2, 0, 0, 1)]=(0.274834652136+0.514782276531j)
            arg[(2, 0, 0, 2)]=(-0.744332909719-0.526181053416j)*x[0] + ((0.024672433121+0.0397464833044j))*x[1] + ((0.329011934914+0.00828004157063j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.195324270842-0.23907726427j)
            arg[(2, 0, 0, 3)]=(-0.529369167416+0.373371016653j)*x[0] + ((-0.430713309699+0.739023587677j))*x[1] + ((0.724225959907+0.496221287962j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.117928258604+0.804307946146j)
            arg[(2, 0, 1, 0)]=(0.987166170625-0.0121929378543j)*x[0] + ((-0.507429301836-0.187445637439j))*x[1] + ((0.173445535305-0.499034371561j))*x[2]
            ref[(2, 0, 1, 0)]=(0.326591202047-0.349336473427j)
            arg[(2, 0, 1, 1)]=(0.22073309849+0.976453336931j)*x[0] + ((0.698018645492+0.430034720204j))*x[1] + ((0.507987593806+0.857476873111j))*x[2]
            ref[(2, 0, 1, 1)]=(0.713369668894+1.13198246512j)
            arg[(2, 0, 1, 2)]=(-0.567927991339-0.495272017876j)*x[0] + ((-0.237721942525-0.982422780006j))*x[1] + ((0.345945544383-0.935316515704j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.229852194741-1.20650565679j)
            arg[(2, 0, 1, 3)]=(-0.945887078054-0.628642254876j)*x[0] + ((0.371166950967-0.980207479588j))*x[1] + ((0.243573278087-0.966857557052j))*x[2]
            ref[(2, 0, 1, 3)]=(-0.1655734245-1.28785364576j)
            arg[(2, 1, 0, 0)]=(0.643409461477-0.205684412452j)*x[0] + ((-0.618621846396+0.125522861442j))*x[1] + ((0.0104337475564-0.679929728817j))*x[2]
            ref[(2, 1, 0, 0)]=(0.0176106813189-0.380045639914j)
            arg[(2, 1, 0, 1)]=(0.251960338105+0.729864208871j)*x[0] + ((0.302772458456-0.686128180239j))*x[1] + ((-0.867482207745-0.257622620536j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.156374705592-0.106943295952j)
            arg[(2, 1, 0, 2)]=(0.635149473872-0.233963643555j)*x[0] + ((0.392730085552-0.318532592031j))*x[1] + ((0.745589049964-0.887918029437j))*x[2]
            ref[(2, 1, 0, 2)]=(0.886734304694-0.720207132511j)
            arg[(2, 1, 0, 3)]=(0.747357872345+0.823556760628j)*x[0] + ((-0.562158834705-0.368777937042j))*x[1] + ((0.45362611174+0.172885967513j))*x[2]
            ref[(2, 1, 0, 3)]=(0.31941257469+0.31383239555j)
            arg[(2, 1, 1, 0)]=(0.116003078849+0.707088641845j)*x[0] + ((0.750016270189+0.705859598586j))*x[1] + ((0.489662939438+0.243788626609j))*x[2]
            ref[(2, 1, 1, 0)]=(0.677841144238+0.82836843352j)
            arg[(2, 1, 1, 1)]=(0.781896212382+0.889163178939j)*x[0] + ((-0.82622282285+0.626367867204j))*x[1] + ((-0.776639906119-0.934850468214j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.410483258294+0.290340288964j)
            arg[(2, 1, 1, 2)]=(-0.624284589038-0.383520724622j)*x[0] + ((-0.471918018871-0.731090392718j))*x[1] + ((0.802349525402-0.882252076625j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.146926541253-0.998431596982j)
            arg[(2, 1, 1, 3)]=(0.222242679763-0.0606758850867j)*x[0] + ((0.77448809945-0.792149399984j))*x[1] + ((0.825219793053-0.219274322442j))*x[2]
            ref[(2, 1, 1, 3)]=(0.910975286133-0.536049803756j)
            arg[(2, 2, 0, 0)]=(0.152238980338+0.265702774153j)*x[0] + ((0.0141528922857+0.340488117922j))*x[1] + ((0.586234590572+0.101468090307j))*x[2]
            ref[(2, 2, 0, 0)]=(0.376313231598+0.353829491191j)
            arg[(2, 2, 0, 1)]=(0.425301277967+0.155950814543j)*x[0] + ((-0.265035556045-0.942359453355j))*x[1] + ((0.112714012838-0.670001780522j))*x[2]
            ref[(2, 2, 0, 1)]=(0.13648986738-0.728205209667j)
            arg[(2, 2, 0, 2)]=(-0.309980530612-0.495086416628j)*x[0] + ((-0.855061116222+0.0417638653254j))*x[1] + ((0.754171740558+0.75570023437j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.205434953138+0.151188841534j)
            arg[(2, 2, 0, 3)]=(0.565925791764-0.242903934025j)*x[0] + ((-0.24875537026-0.314590479027j))*x[1] + ((-0.916174660899+0.366208410049j))*x[2]
            ref[(2, 2, 0, 3)]=(-0.299502119697-0.0956430015019j)
            arg[(2, 2, 1, 0)]=(-0.671159445347-0.89835518238j)*x[0] + ((0.833830203296-0.662344113332j))*x[1] + ((-0.402504629281+0.579059284117j))*x[2]
            ref[(2, 2, 1, 0)]=(-0.119916935666-0.490820005797j)
            arg[(2, 2, 1, 1)]=(-0.0579589835838+0.343794608909j)*x[0] + ((0.396582079022+0.801911573342j))*x[1] + ((0.396038611973+0.535015028787j))*x[2]
            ref[(2, 2, 1, 1)]=(0.367330853706+0.840360605519j)
            arg[(2, 2, 1, 2)]=(-0.497987817847+0.434600463602j)*x[0] + ((-0.47037515522-0.251088772109j))*x[1] + ((0.61663710414+0.0650673448107j))*x[2]
            ref[(2, 2, 1, 2)]=(-0.175862934463+0.124289518152j)
            arg[(2, 2, 1, 3)]=(0.928300176095-0.314985734609j)*x[0] + ((-0.532653941005-0.335042348411j))*x[1] + ((0.446838447382-0.836376288539j))*x[2]
            ref[(2, 2, 1, 3)]=(0.421242341236-0.743202185779j)
            arg[(3, 0, 0, 0)]=(0.870871985953+0.840990186186j)*x[0] + ((0.222559989172+0.182888671135j))*x[1] + ((0.816514263884-0.368676449014j))*x[2]
            ref[(3, 0, 0, 0)]=(0.954973119505+0.327601204154j)
            arg[(3, 0, 0, 1)]=(-0.539626619637+0.0711211940402j)*x[0] + ((0.188335947649-0.162815060275j))*x[1] + ((-0.791236779945-0.339404584744j))*x[2]
            ref[(3, 0, 0, 1)]=(-0.571263725966-0.215549225489j)
            arg[(3, 0, 0, 2)]=(-0.324534137276+0.616379697627j)*x[0] + ((-0.390360856742-0.26712915476j))*x[1] + ((0.109076210876-0.25441185631j))*x[2]
            ref[(3, 0, 0, 2)]=(-0.302909391571+0.0474193432788j)
            arg[(3, 0, 0, 3)]=(-0.560722289401-0.704369018396j)*x[0] + ((-0.0240738266088-0.482662954349j))*x[1] + ((-0.103457255542-0.0969312181997j))*x[2]
            ref[(3, 0, 0, 3)]=(-0.344126685776-0.641981595472j)
            arg[(3, 0, 1, 0)]=(0.333172967147-0.564575687002j)*x[0] + ((0.278379544168-0.00218780744975j))*x[1] + ((0.339710609734-0.725614427525j))*x[2]
            ref[(3, 0, 1, 0)]=(0.475631560524-0.646188960988j)
            arg[(3, 0, 1, 1)]=(0.972739360927+0.0691975531147j)*x[0] + ((-0.310937819766+0.856673403674j))*x[1] + ((0.876098528357+0.0639443435948j))*x[2]
            ref[(3, 0, 1, 1)]=(0.768950034759+0.494907650192j)
            arg[(3, 0, 1, 2)]=(0.00435060405667-0.405772968018j)*x[0] + ((-0.00639886347964-0.243056927888j))*x[1] + ((0.270703110481-0.781715760443j))*x[2]
            ref[(3, 0, 1, 2)]=(0.134327425529-0.715272828175j)
            arg[(3, 0, 1, 3)]=(-0.441248625401+0.455424688576j)*x[0] + ((-0.610090333206+0.575479678487j))*x[1] + ((0.223580629237+0.511950631261j))*x[2]
            ref[(3, 0, 1, 3)]=(-0.413879164685+0.771427499162j)
            arg[(3, 1, 0, 0)]=(0.9643091599+0.985202423208j)*x[0] + ((0.233934194822+0.264644996875j))*x[1] + ((-0.968840724427-0.335060012403j))*x[2]
            ref[(3, 1, 0, 0)]=(0.114701315147+0.45739370384j)
            arg[(3, 1, 0, 1)]=(0.580933257478+0.821755487286j)*x[0] + ((-0.443230864093-0.820020838019j))*x[1] + ((-0.839606700952+0.249541836069j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.350952153783+0.125638242668j)
            arg[(3, 1, 0, 2)]=(-0.802001355573-0.149115841918j)*x[0] + ((0.0351743812194+0.776439635699j))*x[1] + ((-0.955927445984+0.790194271712j))*x[2]
            ref[(3, 1, 0, 2)]=(-0.861377210169+0.708759032746j)
            arg[(3, 1, 0, 3)]=(0.997777003309+0.793956403482j)*x[0] + ((-0.879954191794-0.923754338457j))*x[1] + ((-0.951923735506-0.597492430728j))*x[2]
            ref[(3, 1, 0, 3)]=(-0.417050461995-0.363645182852j)
            arg[(3, 1, 1, 0)]=(-0.321315830843-0.431993343138j)*x[0] + ((-0.657843080396-0.5844931936j))*x[1] + ((0.18811559006+0.971637587733j))*x[2]
            ref[(3, 1, 1, 0)]=(-0.39552166059-0.0224244745024j)
            arg[(3, 1, 1, 1)]=(0.932912133268-0.727852123901j)*x[0] + ((-0.60599905898-0.658793279489j))*x[1] + ((0.925499507401-0.438956199545j))*x[2]
            ref[(3, 1, 1, 1)]=(0.626206290844-0.912800801467j)
            arg[(3, 1, 1, 2)]=(0.471492702987+0.867366652819j)*x[0] + ((-0.213752806338-0.295158804174j))*x[1] + ((-0.458279674342+0.248342523573j))*x[2]
            ref[(3, 1, 1, 2)]=(-0.100269888846+0.410275186109j)
            arg[(3, 1, 1, 3)]=(-0.00716954257624+0.751112330236j)*x[0] + ((-0.490556143044+0.0104793315943j))*x[1] + ((-0.156031496247+0.47106723107j))*x[2]
            ref[(3, 1, 1, 3)]=(-0.326878590934+0.61632944645j)
            arg[(3, 2, 0, 0)]=(-0.315475764485+0.780928702416j)*x[0] + ((0.330208910612-0.677252801695j))*x[1] + ((0.0931758079013+0.899259199836j))*x[2]
            ref[(3, 2, 0, 0)]=(0.0539544770141+0.501467550278j)
            arg[(3, 2, 0, 1)]=(-0.0274669951152-0.0487770355185j)*x[0] + ((0.146902229006+0.413359485731j))*x[1] + ((-0.231854956852-0.343833413449j))*x[2]
            ref[(3, 2, 0, 1)]=(-0.056209861481+0.0103745183818j)
            arg[(3, 2, 0, 2)]=(0.469109268435-0.746563174364j)*x[0] + ((-0.380440176732-0.573709568814j))*x[1] + ((0.10869469767+0.758022545277j))*x[2]
            ref[(3, 2, 0, 2)]=(0.0986818946865-0.281125098951j)
            arg[(3, 2, 0, 3)]=(-0.346018419265-0.427367202389j)*x[0] + ((0.519348448863+0.831042055155j))*x[1] + ((0.532204627433+0.393479399082j))*x[2]
            ref[(3, 2, 0, 3)]=(0.352767328515+0.398577125924j)
            arg[(3, 2, 1, 0)]=(0.720605488626+0.933056099604j)*x[0] + ((-0.569251248491+0.286484019006j))*x[1] + ((0.214326688902+0.98396175234j))*x[2]
            ref[(3, 2, 1, 0)]=(0.182840464519+1.10175093547j)
            arg[(3, 2, 1, 1)]=(0.943567243231-0.0631837049491j)*x[0] + ((-0.797994018356-0.510561844232j))*x[1] + ((-0.729851580556+0.0291320262096j))*x[2]
            ref[(3, 2, 1, 1)]=(-0.29213917784-0.272306761486j)
            arg[(3, 2, 1, 2)]=(-0.0517144814425-0.209841292328j)*x[0] + ((0.921967338961-0.72044432645j))*x[1] + ((-0.665204444912-0.295306234808j))*x[2]
            ref[(3, 2, 1, 2)]=(0.102524206304-0.612795926793j)
            arg[(3, 2, 1, 3)]=(-0.744844802154-0.362466562651j)*x[0] + ((-0.491761647615-0.858590120629j))*x[1] + ((0.629512183992-0.68865626694j))*x[2]
            ref[(3, 2, 1, 3)]=(-0.303547132889-0.95485647511j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.726623089511-0.35100118855j)*x[0] + ((-0.467265725508-0.678826487201j))*x[1]
            ref=(-0.59694440751-0.514913837876j)
        else:
            arg=(-0.0614718190271-0.870231561821j)*x[0] + ((-0.519138098249-0.287452115709j))*x[1] + ((0.153696835266-0.37213320963j))*x[2]
            ref=(-0.213456541005-0.76490844358j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.145693684757+0.0279352010151j)*x[0] + ((-0.574553767346+0.466206263039j))*x[1]
            ref[(0,)]=(-0.214430041294+0.247070732027j)
            arg[(1,)]=(0.749699826431-0.614586589317j)*x[0] + ((0.516030230572-0.697877907344j))*x[1]
            ref[(1,)]=(0.632865028501-0.65623224833j)
            arg[(2,)]=(0.456051105924+0.0058739768257j)*x[0] + ((0.0431059391672-0.197067699212j))*x[1]
            ref[(2,)]=(0.249578522546-0.095596861193j)
        else:
            arg[(0,)]=(0.315826027611+0.303666495875j)*x[0] + ((-0.789122820031+0.280295127226j))*x[1] + ((-0.897157410573-0.530108387838j))*x[2]
            ref[(0,)]=(-0.685227101497+0.0269266176317j)
            arg[(1,)]=(-0.414992815544+0.239558470877j)*x[0] + ((0.351224985995+0.546781790563j))*x[1] + ((-0.613668863771+0.0320435365385j))*x[2]
            ref[(1,)]=(-0.33871834666+0.409191898989j)
            arg[(2,)]=(-0.845664363008-0.71215587495j)*x[0] + ((0.358429586348+0.254710645283j))*x[1] + ((0.406705749257+0.937664375634j))*x[2]
            ref[(2,)]=(-0.0402645137015+0.240109572984j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.560708201499-0.944738388496j)*x[0] + ((0.639408517374+0.198943548317j))*x[1]
            ref[(0, 0)]=(0.600058359436-0.37289742009j)
            arg[(0, 1)]=(0.407636289614-0.307460637472j)*x[0] + ((0.988468626602-0.58566475227j))*x[1]
            ref[(0, 1)]=(0.698052458108-0.446562694871j)
            arg[(0, 2)]=(-0.158778571023-0.459842847265j)*x[0] + ((-0.740436015182-0.512674724292j))*x[1]
            ref[(0, 2)]=(-0.449607293103-0.486258785779j)
            arg[(0, 3)]=(-0.019704134993+0.79527661419j)*x[0] + ((0.257978721146-0.810281632945j))*x[1]
            ref[(0, 3)]=(0.119137293076-0.00750250937754j)
            arg[(1, 0)]=(-0.846047796207+0.573069940321j)*x[0] + ((0.909140124466-0.0265304861696j))*x[1]
            ref[(1, 0)]=(0.0315461641294+0.273269727076j)
            arg[(1, 1)]=(0.852050866877+0.709199908405j)*x[0] + ((-0.814427336349-0.47690731416j))*x[1]
            ref[(1, 1)]=(0.0188117652643+0.116146297122j)
            arg[(1, 2)]=(-0.145441199849+0.723297683013j)*x[0] + ((-0.929132026125+0.724688910688j))*x[1]
            ref[(1, 2)]=(-0.537286612987+0.72399329685j)
            arg[(1, 3)]=(0.729611755419-0.650913861312j)*x[0] + ((0.607202328532-0.513034006886j))*x[1]
            ref[(1, 3)]=(0.668407041975-0.581973934099j)
            arg[(2, 0)]=(0.356669648556+0.608283894416j)*x[0] + ((0.330493570088-0.984196932857j))*x[1]
            ref[(2, 0)]=(0.343581609322-0.18795651922j)
            arg[(2, 1)]=(-0.834604097692-0.973104622927j)*x[0] + ((-0.672867996984-0.331884130412j))*x[1]
            ref[(2, 1)]=(-0.753736047338-0.652494376669j)
            arg[(2, 2)]=(0.659832118354+0.522671099168j)*x[0] + ((-0.0233197082021-0.0905117061661j))*x[1]
            ref[(2, 2)]=(0.318256205076+0.216079696501j)
            arg[(2, 3)]=(0.604094797661+0.816292323946j)*x[0] + ((-0.517372402813+0.123525046542j))*x[1]
            ref[(2, 3)]=(0.0433611974241+0.469908685244j)
        else:
            arg[(0, 0)]=(-0.696902436235+0.925481190733j)*x[0] + ((0.755789796411+0.0307579162685j))*x[1] + ((-0.971630073233-0.686566282297j))*x[2]
            ref[(0, 0)]=(-0.456371356529+0.134836412352j)
            arg[(0, 1)]=(-0.937770629315+0.72715088843j)*x[0] + ((0.878420872401+0.921803243759j))*x[1] + ((0.00811986845882-0.870578118416j))*x[2]
            ref[(0, 1)]=(-0.0256149442277+0.389188006887j)
            arg[(0, 2)]=(0.781258222325+0.102899138473j)*x[0] + ((-0.208864357026-0.409428423872j))*x[1] + ((-0.385945828015-0.0336607080295j))*x[2]
            ref[(0, 2)]=(0.093224018642-0.170094996715j)
            arg[(0, 3)]=(-0.205132889059+0.995520134894j)*x[0] + ((0.975322331415+0.496726422426j))*x[1] + ((-0.494959968129+0.33891914354j))*x[2]
            ref[(0, 3)]=(0.137614737113+0.91558285043j)
            arg[(1, 0)]=(0.436232043778-0.029553623344j)*x[0] + ((0.293214542118-0.328810731214j))*x[1] + ((-0.904547988384-0.379191071899j))*x[2]
            ref[(1, 0)]=(-0.0875507012441-0.368777713229j)
            arg[(1, 1)]=(-0.217908204768-0.921451165309j)*x[0] + ((0.409321910478-0.3813117578j))*x[1] + ((-0.991963691025-0.138996867502j))*x[2]
            ref[(1, 1)]=(-0.400274992658-0.720879895305j)
            arg[(1, 2)]=(0.713718180342-0.264172719746j)*x[0] + ((-0.714479329584+0.0501879705316j))*x[1] + ((-0.905049112323-0.758729539325j))*x[2]
            ref[(1, 2)]=(-0.452905130783-0.48635714427j)
            arg[(1, 3)]=(0.694006480787-0.985897449201j)*x[0] + ((-0.421105145335+0.191269585182j))*x[1] + ((-0.339905054326-0.527574340408j))*x[2]
            ref[(1, 3)]=(-0.0335018594371-0.661101102213j)
            arg[(2, 0)]=(0.581570115998-0.863497009009j)*x[0] + ((-0.73635412206-0.16174556439j))*x[1] + ((-0.721472737507+0.0120720979092j))*x[2]
            ref[(2, 0)]=(-0.438128371785-0.506585237745j)
            arg[(2, 1)]=(-0.862062180074+0.981934216385j)*x[0] + ((0.5483777728-0.552967258008j))*x[1] + ((0.764469617624+0.116708107131j))*x[2]
            ref[(2, 1)]=(0.225392605175+0.272837532754j)
            arg[(2, 2)]=(0.66017697112-0.323099507598j)*x[0] + ((0.29801428149+0.780079202124j))*x[1] + ((0.322668070186+0.26448686207j))*x[2]
            ref[(2, 2)]=(0.640429661398+0.360733278298j)
            arg[(2, 3)]=(-0.264351163954+0.274294838343j)*x[0] + ((0.440376535197-0.540612550165j))*x[1] + ((-0.923787916198+0.375131352411j))*x[2]
            ref[(2, 3)]=(-0.373881272478+0.0544068202949j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref=numpy.zeros((4, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.333218270327+0.285736208142j)*x[0] + ((0.889884782933+0.748841012415j))*x[1]
            ref[(0, 0, 0)]=(0.61155152663+0.517288610278j)
            arg[(0, 0, 1)]=(0.721611373018+0.00484176799867j)*x[0] + ((-0.716957202645+0.779171644153j))*x[1]
            ref[(0, 0, 1)]=(0.00232708518696+0.392006706076j)
            arg[(0, 0, 2)]=(0.541633503844+0.0938243931924j)*x[0] + ((0.73172203702-0.588226055076j))*x[1]
            ref[(0, 0, 2)]=(0.636677770432-0.247200830942j)
            arg[(0, 0, 3)]=(-0.660311524445+0.294778004118j)*x[0] + ((0.293233008708+0.700612387289j))*x[1]
            ref[(0, 0, 3)]=(-0.183539257869+0.497695195704j)
            arg[(0, 1, 0)]=(-0.216008296045-0.363852789341j)*x[0] + ((-0.981747795115-0.238522908226j))*x[1]
            ref[(0, 1, 0)]=(-0.59887804558-0.301187848783j)
            arg[(0, 1, 1)]=(0.837484331158+0.445624723821j)*x[0] + ((0.788029360431-0.204156294707j))*x[1]
            ref[(0, 1, 1)]=(0.812756845795+0.120734214557j)
            arg[(0, 1, 2)]=(0.678491746953+0.763402484739j)*x[0] + ((0.064925922092+0.723672297493j))*x[1]
            ref[(0, 1, 2)]=(0.371708834522+0.743537391116j)
            arg[(0, 1, 3)]=(0.774394389694-0.248661513901j)*x[0] + ((0.0317381545616-0.200515902495j))*x[1]
            ref[(0, 1, 3)]=(0.403066272128-0.224588708198j)
            arg[(0, 2, 0)]=(-0.60219398393+0.339266869132j)*x[0] + ((0.634916268201-0.870385748718j))*x[1]
            ref[(0, 2, 0)]=(0.0163611421357-0.265559439793j)
            arg[(0, 2, 1)]=(-0.0991846895572+0.369653022124j)*x[0] + ((-0.107226432224+0.903422971808j))*x[1]
            ref[(0, 2, 1)]=(-0.103205560891+0.636537996966j)
            arg[(0, 2, 2)]=(0.658025061032+0.373452857843j)*x[0] + ((-0.81876125361-0.212210215296j))*x[1]
            ref[(0, 2, 2)]=(-0.0803680962888+0.0806213212736j)
            arg[(0, 2, 3)]=(-0.953250983436+0.976925456846j)*x[0] + ((0.201954505431+0.207918799506j))*x[1]
            ref[(0, 2, 3)]=(-0.375648239003+0.592422128176j)
            arg[(0, 3, 0)]=(0.809811042786-0.458726641958j)*x[0] + ((-0.907695412221-0.835994139881j))*x[1]
            ref[(0, 3, 0)]=(-0.0489421847178-0.64736039092j)
            arg[(0, 3, 1)]=(0.299412272647-0.871667360139j)*x[0] + ((0.903466679263+0.823892219834j))*x[1]
            ref[(0, 3, 1)]=(0.601439475955-0.0238875701527j)
            arg[(0, 3, 2)]=(-0.484831171214-0.966666684615j)*x[0] + ((-0.837208889018+0.237525382854j))*x[1]
            ref[(0, 3, 2)]=(-0.661020030116-0.36457065088j)
            arg[(0, 3, 3)]=(-0.545999531354+0.953780463772j)*x[0] + ((0.00906629172167+0.403115121735j))*x[1]
            ref[(0, 3, 3)]=(-0.268466619816+0.678447792753j)
            arg[(1, 0, 0)]=(-0.440383747287+0.292472283939j)*x[0] + ((-0.695405652431+0.00427309238993j))*x[1]
            ref[(1, 0, 0)]=(-0.567894699859+0.148372688165j)
            arg[(1, 0, 1)]=(0.803064432618-0.255244480546j)*x[0] + ((-0.344008928375+0.95973984709j))*x[1]
            ref[(1, 0, 1)]=(0.229527752122+0.352247683272j)
            arg[(1, 0, 2)]=(0.97829322567-0.961804292375j)*x[0] + ((0.559585828189-0.987919704128j))*x[1]
            ref[(1, 0, 2)]=(0.768939526929-0.974861998251j)
            arg[(1, 0, 3)]=(-0.171528565013+0.9427489934j)*x[0] + ((-0.417921203845+0.427433847068j))*x[1]
            ref[(1, 0, 3)]=(-0.294724884429+0.685091420234j)
            arg[(1, 1, 0)]=(0.644915121445+0.696733390561j)*x[0] + ((-0.354227799719-0.723007430139j))*x[1]
            ref[(1, 1, 0)]=(0.145343660863-0.0131370197887j)
            arg[(1, 1, 1)]=(-0.120812491465-0.363409772244j)*x[0] + ((0.255488990816-0.341816496161j))*x[1]
            ref[(1, 1, 1)]=(0.0673382496758-0.352613134203j)
            arg[(1, 1, 2)]=(0.0186248847486-0.240842117485j)*x[0] + ((-0.0893916774707-0.650608157253j))*x[1]
            ref[(1, 1, 2)]=(-0.0353833963611-0.445725137369j)
            arg[(1, 1, 3)]=(-0.878651728565+0.784640498938j)*x[0] + ((0.774671696806-0.961017598712j))*x[1]
            ref[(1, 1, 3)]=(-0.0519900158799-0.0881885498871j)
            arg[(1, 2, 0)]=(0.341353357745-0.47045602916j)*x[0] + ((-0.372366920373-0.32455739772j))*x[1]
            ref[(1, 2, 0)]=(-0.0155067813137-0.39750671344j)
            arg[(1, 2, 1)]=(-0.13910820918+0.523583405849j)*x[0] + ((0.545677381915-0.311819145612j))*x[1]
            ref[(1, 2, 1)]=(0.203284586368+0.105882130119j)
            arg[(1, 2, 2)]=(0.150354259053-0.804433300844j)*x[0] + ((-0.203962307793+0.178977026545j))*x[1]
            ref[(1, 2, 2)]=(-0.0268040243699-0.31272813715j)
            arg[(1, 2, 3)]=(0.327224356477-0.829411853558j)*x[0] + ((0.320867790988-0.800299299724j))*x[1]
            ref[(1, 2, 3)]=(0.324046073733-0.814855576641j)
            arg[(1, 3, 0)]=(-0.200013682759+0.339066450958j)*x[0] + ((0.2444664272+0.00233640338249j))*x[1]
            ref[(1, 3, 0)]=(0.0222263722205+0.17070142717j)
            arg[(1, 3, 1)]=(0.838790054262-0.145784788846j)*x[0] + ((0.969506354896-0.141338725221j))*x[1]
            ref[(1, 3, 1)]=(0.904148204579-0.143561757034j)
            arg[(1, 3, 2)]=(0.500731567788-0.931249611583j)*x[0] + ((0.141915145558+0.326571956248j))*x[1]
            ref[(1, 3, 2)]=(0.321323356673-0.302338827667j)
            arg[(1, 3, 3)]=(0.758841609389-0.126855442765j)*x[0] + ((0.0185418954631-0.202188444128j))*x[1]
            ref[(1, 3, 3)]=(0.388691752426-0.164521943446j)
            arg[(2, 0, 0)]=(0.824631326275+0.666400387853j)*x[0] + ((0.489936937031-0.0703468689937j))*x[1]
            ref[(2, 0, 0)]=(0.657284131653+0.29802675943j)
            arg[(2, 0, 1)]=(0.746196346051-0.903285198612j)*x[0] + ((-0.305265827076-0.935751155939j))*x[1]
            ref[(2, 0, 1)]=(0.220465259488-0.919518177275j)
            arg[(2, 0, 2)]=(0.952208620014-0.101983734564j)*x[0] + ((0.290955315056-0.0939833387448j))*x[1]
            ref[(2, 0, 2)]=(0.621581967535-0.0979835366544j)
            arg[(2, 0, 3)]=(0.612316274587+0.0570633202832j)*x[0] + ((0.923396375193+0.00793310527455j))*x[1]
            ref[(2, 0, 3)]=(0.76785632489+0.0324982127789j)
            arg[(2, 1, 0)]=(0.713290661605+0.0977051953036j)*x[0] + ((0.547166715909+0.906872959306j))*x[1]
            ref[(2, 1, 0)]=(0.630228688757+0.502289077305j)
            arg[(2, 1, 1)]=(0.585130473379-0.00756103121424j)*x[0] + ((-0.34245196866+0.377772194706j))*x[1]
            ref[(2, 1, 1)]=(0.121339252359+0.185105581746j)
            arg[(2, 1, 2)]=(0.127026844955-0.357654993828j)*x[0] + ((0.622023323805+0.0496507511004j))*x[1]
            ref[(2, 1, 2)]=(0.37452508438-0.154002121364j)
            arg[(2, 1, 3)]=(0.880048060129+0.82812636164j)*x[0] + ((-0.384444073444-0.0230265744382j))*x[1]
            ref[(2, 1, 3)]=(0.247801993342+0.402549893601j)
            arg[(2, 2, 0)]=(0.940752091975+0.35111024654j)*x[0] + ((0.999688215785-0.782235008412j))*x[1]
            ref[(2, 2, 0)]=(0.97022015388-0.215562380936j)
            arg[(2, 2, 1)]=(-0.445058519067-0.360038567267j)*x[0] + ((-0.255223316626-0.709245187851j))*x[1]
            ref[(2, 2, 1)]=(-0.350140917846-0.534641877559j)
            arg[(2, 2, 2)]=(-0.736559844153+0.867152244276j)*x[0] + ((-0.435951722702+0.507363520381j))*x[1]
            ref[(2, 2, 2)]=(-0.586255783428+0.687257882328j)
            arg[(2, 2, 3)]=(-0.992538796193+0.81786149803j)*x[0] + ((0.521159568925-0.580755692451j))*x[1]
            ref[(2, 2, 3)]=(-0.235689613634+0.11855290279j)
            arg[(2, 3, 0)]=(0.438288084641+0.31263021932j)*x[0] + ((-0.386271069983+0.804279800159j))*x[1]
            ref[(2, 3, 0)]=(0.0260085073291+0.558455009739j)
            arg[(2, 3, 1)]=(0.576869514383+0.109437433524j)*x[0] + ((0.941999526388-0.0526866621823j))*x[1]
            ref[(2, 3, 1)]=(0.759434520385+0.0283753856709j)
            arg[(2, 3, 2)]=(0.00281387885168+0.599394850599j)*x[0] + ((0.0899282809804-0.0601323785495j))*x[1]
            ref[(2, 3, 2)]=(0.0463710799161+0.269631236025j)
            arg[(2, 3, 3)]=(0.460135395527-0.161166349038j)*x[0] + ((-0.798621993333-0.553866524632j))*x[1]
            ref[(2, 3, 3)]=(-0.169243298903-0.357516436835j)
            arg[(3, 0, 0)]=(0.106832478858-0.154344142535j)*x[0] + ((-0.334849409804-0.637191295449j))*x[1]
            ref[(3, 0, 0)]=(-0.114008465473-0.395767718992j)
            arg[(3, 0, 1)]=(0.105202733677-0.0579606910556j)*x[0] + ((0.00897682100678-0.463502302002j))*x[1]
            ref[(3, 0, 1)]=(0.0570897773418-0.260731496529j)
            arg[(3, 0, 2)]=(0.901563919573+0.176383875716j)*x[0] + ((-0.977948775035-0.00864035971222j))*x[1]
            ref[(3, 0, 2)]=(-0.0381924277308+0.0838717580017j)
            arg[(3, 0, 3)]=(0.51043533871+0.365622276211j)*x[0] + ((-0.232121820238-0.355082951846j))*x[1]
            ref[(3, 0, 3)]=(0.139156759236+0.00526966218254j)
            arg[(3, 1, 0)]=(-0.577008695617-0.993217935824j)*x[0] + ((0.530027143165-0.254767647871j))*x[1]
            ref[(3, 1, 0)]=(-0.023490776226-0.623992791848j)
            arg[(3, 1, 1)]=(0.480572585254-0.549891601428j)*x[0] + ((0.144296000325-0.352047463749j))*x[1]
            ref[(3, 1, 1)]=(0.312434292789-0.450969532588j)
            arg[(3, 1, 2)]=(-0.0128012649371+0.456969529913j)*x[0] + ((0.826257928111-0.204537225177j))*x[1]
            ref[(3, 1, 2)]=(0.406728331587+0.126216152368j)
            arg[(3, 1, 3)]=(-0.903596962844-0.577203939217j)*x[0] + ((0.947926269063+0.281447021954j))*x[1]
            ref[(3, 1, 3)]=(0.0221646531096-0.147878458632j)
            arg[(3, 2, 0)]=(-0.355286746893+0.207090635572j)*x[0] + ((-0.710944422926+0.00591751945011j))*x[1]
            ref[(3, 2, 0)]=(-0.53311558491+0.106504077511j)
            arg[(3, 2, 1)]=(-0.592995022706-0.475913898988j)*x[0] + ((-0.886963731934+0.11267713805j))*x[1]
            ref[(3, 2, 1)]=(-0.73997937732-0.181618380469j)
            arg[(3, 2, 2)]=(-0.577087889157+0.956417470937j)*x[0] + ((0.336060303149+0.499034726126j))*x[1]
            ref[(3, 2, 2)]=(-0.120513793004+0.727726098531j)
            arg[(3, 2, 3)]=(-0.947066939869+0.959654001246j)*x[0] + ((-0.761830713898+0.231934067245j))*x[1]
            ref[(3, 2, 3)]=(-0.854448826884+0.595794034246j)
            arg[(3, 3, 0)]=(-0.219646501749-0.223501283566j)*x[0] + ((-0.94411330209-0.402983343408j))*x[1]
            ref[(3, 3, 0)]=(-0.58187990192-0.313242313487j)
            arg[(3, 3, 1)]=(0.683347183109-0.407745616919j)*x[0] + ((-0.218644125384-0.00224288628894j))*x[1]
            ref[(3, 3, 1)]=(0.232351528862-0.204994251604j)
            arg[(3, 3, 2)]=(-0.932896350587+0.615614060897j)*x[0] + ((0.601426725112-0.774673056088j))*x[1]
            ref[(3, 3, 2)]=(-0.165734812738-0.0795294975955j)
            arg[(3, 3, 3)]=(0.886201930922-0.438363735529j)*x[0] + ((-0.810764008372-0.588165634401j))*x[1]
            ref[(3, 3, 3)]=(0.0377189612747-0.513264684965j)
        else:
            arg[(0, 0, 0)]=(-0.812598259344+0.511658682995j)*x[0] + ((0.12189664155+0.798722390158j))*x[1] + ((0.521084481658+0.940064082888j))*x[2]
            ref[(0, 0, 0)]=(-0.0848085680685+1.12522257802j)
            arg[(0, 0, 1)]=(-0.570833588141-0.698095205624j)*x[0] + ((0.753954072095-0.072636620383j))*x[1] + ((0.382701381584+0.446337516908j))*x[2]
            ref[(0, 0, 1)]=(0.282910932769-0.16219715455j)
            arg[(0, 0, 2)]=(0.598522174822-0.187641891265j)*x[0] + ((0.714408847434-0.639318470067j))*x[1] + ((-0.346695339684+0.253454593031j))*x[2]
            ref[(0, 0, 2)]=(0.483117841286-0.28675288415j)
            arg[(0, 0, 3)]=(-0.808759590331+0.975674436159j)*x[0] + ((-0.363303818782+0.578114853093j))*x[1] + ((0.9900099271+0.147120376662j))*x[2]
            ref[(0, 0, 3)]=(-0.0910267410068+0.850454832957j)
            arg[(0, 1, 0)]=(-0.0687651310714+0.286558589769j)*x[0] + ((0.0757070999791+0.249602178862j))*x[1] + ((0.225035057691+0.42991061467j))*x[2]
            ref[(0, 1, 0)]=(0.115988513299+0.483035691651j)
            arg[(0, 1, 1)]=(0.415827669455+0.33762389332j)*x[0] + ((-0.672567631026-0.772752911707j))*x[1] + ((-0.607403005547+0.160917202525j))*x[2]
            ref[(0, 1, 1)]=(-0.432071483559-0.137105907931j)
            arg[(0, 1, 2)]=(-0.938553095208-0.571578450486j)*x[0] + ((-0.506754801876-0.253030411682j))*x[1] + ((0.223311522636+0.472727384916j))*x[2]
            ref[(0, 1, 2)]=(-0.610998187224-0.175940738625j)
            arg[(0, 1, 3)]=(-0.362010866324-0.503903567223j)*x[0] + ((0.260039948892+0.0626320821888j))*x[1] + ((0.407769660472-0.0749259896392j))*x[2]
            ref[(0, 1, 3)]=(0.15289937152-0.258098737337j)
            arg[(0, 2, 0)]=(0.2499131996-0.2917484947j)*x[0] + ((-0.845706838666+0.390113159337j))*x[1] + ((-0.262738148481+0.412929041944j))*x[2]
            ref[(0, 2, 0)]=(-0.429265893773+0.255646853291j)
            arg[(0, 2, 1)]=(0.274175701739-0.481654768258j)*x[0] + ((-0.735758531708-0.564477336257j))*x[1] + ((-0.293533011315-0.780668291024j))*x[2]
            ref[(0, 2, 1)]=(-0.377557920642-0.91340019777j)
            arg[(0, 2, 2)]=(-0.73456056082+0.0686752019564j)*x[0] + ((0.431070647617+0.737783851785j))*x[1] + ((-0.713846322035-0.490119614632j))*x[2]
            ref[(0, 2, 2)]=(-0.508668117619+0.158169719555j)
            arg[(0, 2, 3)]=(-0.876391652749-0.993792632078j)*x[0] + ((-0.956030410682+0.736067986643j))*x[1] + ((0.801999778104+0.649022926429j))*x[2]
            ref[(0, 2, 3)]=(-0.515211142663+0.195649140497j)
            arg[(0, 3, 0)]=(-0.319394580049+0.945527834657j)*x[0] + ((-0.741561368373+0.872644580374j))*x[1] + ((-0.48696501073-0.106274723585j))*x[2]
            ref[(0, 3, 0)]=(-0.773960479576+0.855948845723j)
            arg[(0, 3, 1)]=(0.397576633018-0.0622708606621j)*x[0] + ((0.0870325245582+0.902536775899j))*x[1] + ((-0.474073623115+0.482771907413j))*x[2]
            ref[(0, 3, 1)]=(0.00526776723065+0.661518911325j)
            arg[(0, 3, 2)]=(-0.852859526479-0.857875086368j)*x[0] + ((-0.0354278474975+0.744153323301j))*x[1] + ((0.844608473491+0.133381261418j))*x[2]
            ref[(0, 3, 2)]=(-0.0218394502428+0.00982974917525j)
            arg[(0, 3, 3)]=(-0.219084969519-0.0986933052141j)*x[0] + ((-0.685705347411+0.431212405538j))*x[1] + ((0.659047992309-0.550481412198j))*x[2]
            ref[(0, 3, 3)]=(-0.122871162311-0.108981155937j)
            arg[(1, 0, 0)]=(-0.0912573760359+0.669863204736j)*x[0] + ((0.652220778458-0.425884427957j))*x[1] + ((-0.465563768528-0.799431305939j))*x[2]
            ref[(1, 0, 0)]=(0.0476998169469-0.27772626458j)
            arg[(1, 0, 1)]=(-0.23157874039+0.0116690174485j)*x[0] + ((-0.597472114716-0.144235450115j))*x[1] + ((0.679617040064-0.0824279200138j))*x[2]
            ref[(1, 0, 1)]=(-0.0747169075206-0.10749717634j)
            arg[(1, 0, 2)]=(-0.157459607069-0.604425542034j)*x[0] + ((0.0113471665264+0.0211978166225j))*x[1] + ((0.603578933878+0.263674084225j))*x[2]
            ref[(1, 0, 2)]=(0.228733246667-0.159776820594j)
            arg[(1, 0, 3)]=(-0.478615974976+0.453151819745j)*x[0] + ((-0.927033834811+0.231418916562j))*x[1] + ((-0.518321830147-0.435925233261j))*x[2]
            ref[(1, 0, 3)]=(-0.961985819967+0.124322751523j)
            arg[(1, 1, 0)]=(0.1490583673-0.674232416273j)*x[0] + ((-0.906210346417-0.748337396707j))*x[1] + ((-0.947724297491-0.266846760799j))*x[2]
            ref[(1, 1, 0)]=(-0.852438138303-0.844708286889j)
            arg[(1, 1, 1)]=(-0.337718467449+0.212306407j)*x[0] + ((0.0331817550992+0.343336740346j))*x[1] + ((0.656099157753+0.370216441511j))*x[2]
            ref[(1, 1, 1)]=(0.175781222701+0.462929794428j)
            arg[(1, 1, 2)]=(0.0346456208354-0.634584404298j)*x[0] + ((-0.769200854531-0.930115093343j))*x[1] + ((0.706290986427+0.496057001956j))*x[2]
            ref[(1, 1, 2)]=(-0.0141321236342-0.534321247842j)
            arg[(1, 1, 3)]=(-0.658146971219-0.461705951232j)*x[0] + ((-0.401743104695+0.360206608358j))*x[1] + ((-0.750057056858+0.863799059795j))*x[2]
            ref[(1, 1, 3)]=(-0.904973566386+0.381149858461j)
            arg[(1, 2, 0)]=(0.411081513989-0.515524570234j)*x[0] + ((-0.329289989009+0.0153732900317j))*x[1] + ((0.320882894399-0.13879077614j))*x[2]
            ref[(1, 2, 0)]=(0.20133720969-0.319471028171j)
            arg[(1, 2, 1)]=(0.439716982057-0.985822787302j)*x[0] + ((-0.655704204973-0.0247718931086j))*x[1] + ((0.252906011731+0.8780801328j))*x[2]
            ref[(1, 2, 1)]=(0.0184593944074-0.066257273805j)
            arg[(1, 2, 2)]=(0.579332851046+0.386861064514j)*x[0] + ((-0.187121825114+0.747948748717j))*x[1] + ((0.136123237239-0.0753116224874j))*x[2]
            ref[(1, 2, 2)]=(0.264167131586+0.529749095372j)
            arg[(1, 2, 3)]=(-0.342161348572-0.145744390788j)*x[0] + ((-0.76369040186+0.237086057849j))*x[1] + ((0.466146582249+0.771270323163j))*x[2]
            ref[(1, 2, 3)]=(-0.319852584092+0.431305995112j)
            arg[(1, 3, 0)]=(0.263166818849+0.775835883739j)*x[0] + ((0.968138448914-0.650732204448j))*x[1] + ((-0.486758679523-0.655372382299j))*x[2]
            ref[(1, 3, 0)]=(0.37227329412-0.265134351504j)
            arg[(1, 3, 1)]=(-0.275802356412-0.00301473608571j)*x[0] + ((0.117211013507-0.302182601187j))*x[1] + ((-0.355642305733-0.560279881289j))*x[2]
            ref[(1, 3, 1)]=(-0.257116824319-0.432738609281j)
            arg[(1, 3, 2)]=(-0.409927492936-0.317523476069j)*x[0] + ((-0.935397485972-0.0519369800901j))*x[1] + ((-0.406022195451+0.410560850235j))*x[2]
            ref[(1, 3, 2)]=(-0.875673587179+0.0205501970382j)
            arg[(1, 3, 3)]=(0.158307222504+0.394799987737j)*x[0] + ((0.275627793841+0.033306847747j))*x[1] + ((-0.181118980522-0.578615575624j))*x[2]
            ref[(1, 3, 3)]=(0.126408017912-0.0752543700701j)
            arg[(2, 0, 0)]=(0.393904947552+0.356755182913j)*x[0] + ((-0.409748071229-0.707750243825j))*x[1] + ((0.259674478432-0.61498160728j))*x[2]
            ref[(2, 0, 0)]=(0.121915677377-0.482988334096j)
            arg[(2, 0, 1)]=(-0.0122897765799-0.910746234595j)*x[0] + ((-0.216982573541+0.0335174773381j))*x[1] + ((0.802869192747+0.133720177076j))*x[2]
            ref[(2, 0, 1)]=(0.286798421313-0.37175429009j)
            arg[(2, 0, 2)]=(0.794942335623-0.64609714931j)*x[0] + ((0.323008421166+0.88803697581j))*x[1] + ((0.528259109984-0.049536048373j))*x[2]
            ref[(2, 0, 2)]=(0.823104933387+0.0962018890635j)
            arg[(2, 0, 3)]=(-0.011434857273-0.31305678213j)*x[0] + ((0.862789289472+0.501877492125j))*x[1] + ((0.0509798335836+0.787395582254j))*x[2]
            ref[(2, 0, 3)]=(0.451167132891+0.488108146125j)
            arg[(2, 1, 0)]=(-0.45762759976+0.519336269229j)*x[0] + ((-0.0250701815287+0.795627391999j))*x[1] + ((-0.245176943813+0.109239575704j))*x[2]
            ref[(2, 1, 0)]=(-0.363937362551+0.712101618466j)
            arg[(2, 1, 1)]=(-0.151955112415-0.42201706253j)*x[0] + ((0.917165449609-0.247870384172j))*x[1] + ((0.816361654761+0.362871069754j))*x[2]
            ref[(2, 1, 1)]=(0.790785995978-0.153508188473j)
            arg[(2, 1, 2)]=(-0.806795596962+0.478509817649j)*x[0] + ((0.256500764744-0.217639094513j))*x[1] + ((0.519382862075+0.207624699767j))*x[2]
            ref[(2, 1, 2)]=(-0.0154559850712+0.234247711451j)
            arg[(2, 1, 3)]=(-0.26459859121+0.766019373106j)*x[0] + ((0.72980055639-0.300636680564j))*x[1] + ((0.256611393302+0.405747000923j))*x[2]
            ref[(2, 1, 3)]=(0.360906679241+0.435564846733j)
            arg[(2, 2, 0)]=(0.993460040514-0.135894636242j)*x[0] + ((0.722864331652-0.684273833504j))*x[1] + ((0.387198177081-0.557378121514j))*x[2]
            ref[(2, 2, 0)]=(1.05176127462-0.68877329563j)
            arg[(2, 2, 1)]=(0.716580940218+0.477753510618j)*x[0] + ((0.859521873204+0.64450202529j))*x[1] + ((-0.101691865214+0.416334224072j))*x[2]
            ref[(2, 2, 1)]=(0.737205474104+0.76929487999j)
            arg[(2, 2, 2)]=(-0.233859403358+0.651716822316j)*x[0] + ((0.439259827945-0.138752882673j))*x[1] + ((-0.503282535493-0.144746043457j))*x[2]
            ref[(2, 2, 2)]=(-0.148941055453+0.184108948093j)
            arg[(2, 2, 3)]=(0.462449833624+0.325433403761j)*x[0] + ((-0.947933423424+0.719400094807j))*x[1] + ((0.900537827816-0.632022610874j))*x[2]
            ref[(2, 2, 3)]=(0.207527119008+0.206405443847j)
            arg[(2, 3, 0)]=(0.495359265906-0.461003785819j)*x[0] + ((0.920326854209+0.14434506497j))*x[1] + ((0.48438194151-0.861180494876j))*x[2]
            ref[(2, 3, 0)]=(0.950034030813-0.588919607862j)
            arg[(2, 3, 1)]=(-0.341681811019+0.97140071524j)*x[0] + ((0.272045342028+0.577964684784j))*x[1] + ((-0.532612050931+0.948635949887j))*x[2]
            ref[(2, 3, 1)]=(-0.301124259961+1.24900067496j)
            arg[(2, 3, 2)]=(0.242632146382-0.657816209343j)*x[0] + ((0.588037241735+0.0799386018049j))*x[1] + ((-0.185357797135+0.846547018841j))*x[2]
            ref[(2, 3, 2)]=(0.322655795491+0.134334705651j)
            arg[(2, 3, 3)]=(0.926001712574+0.543440252621j)*x[0] + ((0.296332153539-0.631814859672j))*x[1] + ((-0.46246889381-0.963879382653j))*x[2]
            ref[(2, 3, 3)]=(0.379932486151-0.526126994852j)
            arg[(3, 0, 0)]=(-0.742628481156-0.203216600226j)*x[0] + ((-0.461971784197-0.976536842231j))*x[1] + ((0.387769228661-0.576959986668j))*x[2]
            ref[(3, 0, 0)]=(-0.408415518346-0.878356714563j)
            arg[(3, 0, 1)]=(-0.862703068407-0.740807112872j)*x[0] + ((-0.587909040148+0.527342037009j))*x[1] + ((0.936731010915-0.711986920481j))*x[2]
            ref[(3, 0, 1)]=(-0.25694054882-0.462725998172j)
            arg[(3, 0, 2)]=(0.0607051307239-0.874322826586j)*x[0] + ((-0.888361253614+0.756237414297j))*x[1] + ((0.152384629929+0.774304009549j))*x[2]
            ref[(3, 0, 2)]=(-0.33763574648+0.32810929863j)
            arg[(3, 0, 3)]=(0.240639575594-0.559599840446j)*x[0] + ((0.763883047189-0.447532900749j))*x[1] + ((-0.0379671117108-0.0978829081357j))*x[2]
            ref[(3, 0, 3)]=(0.483277755536-0.552507824666j)
            arg[(3, 1, 0)]=(-0.375614086713+0.713222289356j)*x[0] + ((-0.981803602621-0.839320750157j))*x[1] + ((0.416240713029+0.34543099546j))*x[2]
            ref[(3, 1, 0)]=(-0.470588488152+0.109666267329j)
            arg[(3, 1, 1)]=(-0.342681797467-0.271088697982j)*x[0] + ((-0.828325395854+0.0256358787027j))*x[1] + ((-0.470529893117+0.438381244508j))*x[2]
            ref[(3, 1, 1)]=(-0.820768543219+0.0964642126142j)
            arg[(3, 1, 2)]=(-0.168768610044-0.695040629703j)*x[0] + ((0.0313848379556+0.198608547727j))*x[1] + ((0.678235378262+0.0875070496074j))*x[2]
            ref[(3, 1, 2)]=(0.270425803087-0.204462516184j)
            arg[(3, 1, 3)]=(0.260213272398+0.100223051523j)*x[0] + ((-0.634548564066-0.61143518162j))*x[1] + ((0.000389088698949-0.859430756668j))*x[2]
            ref[(3, 1, 3)]=(-0.186973101485-0.685321443382j)
            arg[(3, 2, 0)]=(-0.422685995144+0.555906902677j)*x[0] + ((-0.983027102489-0.153665083175j))*x[1] + ((-0.780817458203-0.517151990316j))*x[2]
            ref[(3, 2, 0)]=(-1.09326527792-0.0574550854067j)
            arg[(3, 2, 1)]=(-0.522081647897+0.681365141157j)*x[0] + ((0.297183308863-0.137153884949j))*x[1] + ((0.304977829242-0.0106641812381j))*x[2]
            ref[(3, 2, 1)]=(0.0400397451041+0.266773537485j)
            arg[(3, 2, 2)]=(-0.77894747266+0.97444373708j)*x[0] + ((-0.538764641775+0.381142530523j))*x[1] + ((-0.116357798283-0.782876720041j))*x[2]
            ref[(3, 2, 2)]=(-0.717034956359+0.286354773781j)
            arg[(3, 2, 3)]=(0.984686522337+0.671909266524j)*x[0] + ((-0.675362053118+0.787420223157j))*x[1] + ((0.659557321352-0.107825956778j))*x[2]
            ref[(3, 2, 3)]=(0.484440895285+0.675751766451j)
            arg[(3, 3, 0)]=(0.0564713180104+0.537698461349j)*x[0] + ((0.196916099598-0.671379255595j))*x[1] + ((0.494570314472+0.0270768721649j))*x[2]
            ref[(3, 3, 0)]=(0.37397886604-0.0533019610404j)
            arg[(3, 3, 1)]=(0.847478546194-0.181096921738j)*x[0] + ((0.455221687764+0.715724697574j))*x[1] + ((0.2882879589-0.381668649175j))*x[2]
            ref[(3, 3, 1)]=(0.795494096429+0.0764795633304j)
            arg[(3, 3, 2)]=(0.198357927479+0.904239418009j)*x[0] + ((-0.1052212433-0.0438652735993j))*x[1] + ((-0.418348552002+0.154952043861j))*x[2]
            ref[(3, 3, 2)]=(-0.162605933912+0.507663094135j)
            arg[(3, 3, 3)]=(0.935422099457+0.383196168571j)*x[0] + ((0.483740321685-0.47254025577j))*x[1] + ((-0.270635796052-0.842689280747j))*x[2]
            ref[(3, 3, 3)]=(0.574263312545-0.466016683973j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 4),w)
        ref=numpy.zeros((4, 3, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.719782969125+0.139787549672j)*x[0] + ((0.290194008344+0.0665990854635j))*x[1]
            ref[(0, 0, 0, 0)]=(0.504988488735+0.103193317568j)
            arg[(0, 0, 0, 1)]=(-0.460661652994-0.440558906118j)*x[0] + ((0.0329705105308+0.541735502101j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.213845571232+0.0505882979916j)
            arg[(0, 0, 0, 2)]=(-0.0782850025218+0.707651801454j)*x[0] + ((0.170231262478-0.884145923566j))*x[1]
            ref[(0, 0, 0, 2)]=(0.0459731299779-0.088247061056j)
            arg[(0, 0, 0, 3)]=(0.703508331294+0.227026400201j)*x[0] + ((0.775154420004+0.937155558441j))*x[1]
            ref[(0, 0, 0, 3)]=(0.739331375649+0.582090979321j)
            arg[(0, 0, 1, 0)]=(-0.672248868354-0.724085584774j)*x[0] + ((0.267360282728+0.478555922049j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.202444292813-0.122764831363j)
            arg[(0, 0, 1, 1)]=(-0.898022723404-0.472327024573j)*x[0] + ((0.0923800022416-0.658209715337j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.402821360581-0.565268369955j)
            arg[(0, 0, 1, 2)]=(-0.387414461285-0.487105971673j)*x[0] + ((0.928390413042+0.447405930209j))*x[1]
            ref[(0, 0, 1, 2)]=(0.270487975879-0.0198500207316j)
            arg[(0, 0, 1, 3)]=(0.0716026825797-0.501186975019j)*x[0] + ((0.237756362041+0.469086765617j))*x[1]
            ref[(0, 0, 1, 3)]=(0.15467952231-0.016050104701j)
            arg[(0, 0, 2, 0)]=(0.505155999466+0.634155063084j)*x[0] + ((-0.0624750187328+0.709055307144j))*x[1]
            ref[(0, 0, 2, 0)]=(0.221340490367+0.671605185114j)
            arg[(0, 0, 2, 1)]=(0.608609536965+0.769987173808j)*x[0] + ((0.138134970509-0.167334408117j))*x[1]
            ref[(0, 0, 2, 1)]=(0.373372253737+0.301326382845j)
            arg[(0, 0, 2, 2)]=(0.213696569268+0.597905134607j)*x[0] + ((-0.26719928055-0.246910207731j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.0267513556412+0.175497463438j)
            arg[(0, 0, 2, 3)]=(-0.845365565984-0.413989460819j)*x[0] + ((0.1884058793+0.230958372115j))*x[1]
            ref[(0, 0, 2, 3)]=(-0.328479843342-0.091515544352j)
            arg[(0, 1, 0, 0)]=(0.76452784536+0.46505324702j)*x[0] + ((-0.0334887353344-0.393164956326j))*x[1]
            ref[(0, 1, 0, 0)]=(0.365519555013+0.0359441453466j)
            arg[(0, 1, 0, 1)]=(-0.344600847792+0.524993238775j)*x[0] + ((-0.132121141677+0.716197455165j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.238360994734+0.62059534697j)
            arg[(0, 1, 0, 2)]=(-0.218785169344-0.935224935155j)*x[0] + ((-0.350011497126-0.0541931143622j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.284398333235-0.494709024758j)
            arg[(0, 1, 0, 3)]=(0.68353927258-0.375981409261j)*x[0] + ((-0.966315058508-0.549892729662j))*x[1]
            ref[(0, 1, 0, 3)]=(-0.141387892964-0.462937069462j)
            arg[(0, 1, 1, 0)]=(0.0683319894418+0.116426375015j)*x[0] + ((-0.517090161176-0.557636788255j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.224379085867-0.22060520662j)
            arg[(0, 1, 1, 1)]=(0.46279745703+0.333068433695j)*x[0] + ((-0.74703735048-0.956663079538j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.142119946725-0.311797322922j)
            arg[(0, 1, 1, 2)]=(0.356016134902+0.1025930018j)*x[0] + ((0.314367798074+0.573641527905j))*x[1]
            ref[(0, 1, 1, 2)]=(0.335191966488+0.338117264852j)
            arg[(0, 1, 1, 3)]=(0.19123043475+0.160551786132j)*x[0] + ((-0.459077272657+0.410428947286j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.133923418953+0.285490366709j)
            arg[(0, 1, 2, 0)]=(0.742804362312+0.212179599079j)*x[0] + ((0.0250454770738+0.314125102818j))*x[1]
            ref[(0, 1, 2, 0)]=(0.383924919693+0.263152350949j)
            arg[(0, 1, 2, 1)]=(-0.999682031158+0.745843276017j)*x[0] + ((-0.0618962632043+0.867072844425j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.530789147181+0.806458060221j)
            arg[(0, 1, 2, 2)]=(-0.126297683864-0.390166182321j)*x[0] + ((-0.873722647577+0.277816925752j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.500010165721-0.0561746282846j)
            arg[(0, 1, 2, 3)]=(-0.120741042138-0.646211946616j)*x[0] + ((0.882632760274-0.36959633653j))*x[1]
            ref[(0, 1, 2, 3)]=(0.380945859068-0.507904141573j)
            arg[(0, 2, 0, 0)]=(-0.376554995807-0.822646051908j)*x[0] + ((-0.294019044066-0.416826502022j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.335287019937-0.619736276965j)
            arg[(0, 2, 0, 1)]=(0.120607443495-0.164187322765j)*x[0] + ((0.87127309396+0.650819326468j))*x[1]
            ref[(0, 2, 0, 1)]=(0.495940268727+0.243316001852j)
            arg[(0, 2, 0, 2)]=(-0.977061079777+0.40435384438j)*x[0] + ((-0.398613344004+0.0341463719966j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.68783721189+0.219250108188j)
            arg[(0, 2, 0, 3)]=(0.976734387425-0.638379468871j)*x[0] + ((0.302596119421+0.572505636164j))*x[1]
            ref[(0, 2, 0, 3)]=(0.639665253423-0.0329369163533j)
            arg[(0, 2, 1, 0)]=(0.534623829457-0.904235824759j)*x[0] + ((-0.594478395591-0.462449764974j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.0299272830671-0.683342794866j)
            arg[(0, 2, 1, 1)]=(0.841351199979+0.892566064726j)*x[0] + ((-0.548011377447+0.385785955076j))*x[1]
            ref[(0, 2, 1, 1)]=(0.146669911266+0.639176009901j)
            arg[(0, 2, 1, 2)]=(-0.439150960142+0.168733817897j)*x[0] + ((0.500529209354+0.481551893575j))*x[1]
            ref[(0, 2, 1, 2)]=(0.0306891246059+0.325142855736j)
            arg[(0, 2, 1, 3)]=(0.341423471091+0.361058281046j)*x[0] + ((-0.326276935741+0.395980457499j))*x[1]
            ref[(0, 2, 1, 3)]=(0.00757326767481+0.378519369273j)
            arg[(0, 2, 2, 0)]=(-0.215897576073+0.334341461982j)*x[0] + ((-0.755932060124+0.875959298834j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.485914818098+0.605150380408j)
            arg[(0, 2, 2, 1)]=(-0.384837644192+0.792815076573j)*x[0] + ((-0.240320562422+0.8402051307j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.312579103307+0.816510103636j)
            arg[(0, 2, 2, 2)]=(0.992861204879+0.34339388982j)*x[0] + ((0.295092963082-0.388406649064j))*x[1]
            ref[(0, 2, 2, 2)]=(0.643977083981-0.0225063796221j)
            arg[(0, 2, 2, 3)]=(-0.536334791893-0.452725188903j)*x[0] + ((-0.982026922364-0.49377412653j))*x[1]
            ref[(0, 2, 2, 3)]=(-0.759180857128-0.473249657716j)
            arg[(1, 0, 0, 0)]=(-0.340433439176+0.59459793121j)*x[0] + ((0.165222898294-0.564703990978j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.0876052704408+0.0149469701158j)
            arg[(1, 0, 0, 1)]=(-0.605510297883-0.479082818842j)*x[0] + ((-0.340004399898-0.67934322464j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.472757348891-0.579213021741j)
            arg[(1, 0, 0, 2)]=(0.357468200389-0.562459656438j)*x[0] + ((-0.132938259061+0.474408485385j))*x[1]
            ref[(1, 0, 0, 2)]=(0.112264970664-0.0440255855263j)
            arg[(1, 0, 0, 3)]=(0.293840469869+0.37638012095j)*x[0] + ((-0.645167753054+0.535652567369j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.175663641593+0.45601634416j)
            arg[(1, 0, 1, 0)]=(0.774107673086-0.0532045755134j)*x[0] + ((0.758521283426+0.393443877282j))*x[1]
            ref[(1, 0, 1, 0)]=(0.766314478256+0.170119650884j)
            arg[(1, 0, 1, 1)]=(-0.346557914983-0.408133784261j)*x[0] + ((-0.805853885192+0.749148942269j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.576205900087+0.170507579004j)
            arg[(1, 0, 1, 2)]=(-0.0518640815362+0.817000897798j)*x[0] + ((0.101533672058+0.383989786895j))*x[1]
            ref[(1, 0, 1, 2)]=(0.0248347952611+0.600495342346j)
            arg[(1, 0, 1, 3)]=(-0.884669582009+0.867087013962j)*x[0] + ((-0.119863021169+0.311848086006j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.502266301589+0.589467549984j)
            arg[(1, 0, 2, 0)]=(-0.748487797954+0.105754507463j)*x[0] + ((0.141573924224-0.829104644319j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.303456936865-0.361675068428j)
            arg[(1, 0, 2, 1)]=(0.312168128119-0.666869181278j)*x[0] + ((-0.0317179723622-0.427005022725j))*x[1]
            ref[(1, 0, 2, 1)]=(0.140225077878-0.546937102001j)
            arg[(1, 0, 2, 2)]=(0.00374216385625+0.354270207175j)*x[0] + ((-0.948419872583-0.41603265761j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.472338854363-0.0308812252172j)
            arg[(1, 0, 2, 3)]=(0.109153349137+0.494622101125j)*x[0] + ((0.93915759896-0.853930224017j))*x[1]
            ref[(1, 0, 2, 3)]=(0.524155474049-0.179654061446j)
            arg[(1, 1, 0, 0)]=(0.517589005542+0.731986924689j)*x[0] + ((-0.924417499977-0.898245418459j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.203414247217-0.0831292468854j)
            arg[(1, 1, 0, 1)]=(0.00928344699485+0.918015607252j)*x[0] + ((0.60716157385-0.978501730634j))*x[1]
            ref[(1, 1, 0, 1)]=(0.308222510422-0.030243061691j)
            arg[(1, 1, 0, 2)]=(0.44750577514-0.749461935014j)*x[0] + ((0.767688677577-0.668714951521j))*x[1]
            ref[(1, 1, 0, 2)]=(0.607597226358-0.709088443268j)
            arg[(1, 1, 0, 3)]=(-0.677902514051-0.698116258422j)*x[0] + ((0.671988619057-0.0845307771577j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.00295694749686-0.39132351779j)
            arg[(1, 1, 1, 0)]=(-0.916740239137+0.850617919793j)*x[0] + ((0.733933955577+0.157398867883j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.09140314178+0.504008393838j)
            arg[(1, 1, 1, 1)]=(-0.284675332333+0.871275655918j)*x[0] + ((0.134764597335+0.450183696707j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.0749553674991+0.660729676313j)
            arg[(1, 1, 1, 2)]=(-0.295002855931-0.50866858622j)*x[0] + ((-0.16670573684+0.349681137155j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.230854296385-0.0794937245326j)
            arg[(1, 1, 1, 3)]=(0.584865887731+0.879572867948j)*x[0] + ((0.67048173683+0.659129045554j))*x[1]
            ref[(1, 1, 1, 3)]=(0.62767381228+0.769350956751j)
            arg[(1, 1, 2, 0)]=(0.100315788202-0.442006593816j)*x[0] + ((0.731818175955+0.681168533076j))*x[1]
            ref[(1, 1, 2, 0)]=(0.416066982079+0.11958096963j)
            arg[(1, 1, 2, 1)]=(-0.129650045018+0.503005790802j)*x[0] + ((0.566360766955+0.92213928372j))*x[1]
            ref[(1, 1, 2, 1)]=(0.218355360968+0.712572537261j)
            arg[(1, 1, 2, 2)]=(0.86743703947+0.795614860921j)*x[0] + ((0.096902970326-0.685192239537j))*x[1]
            ref[(1, 1, 2, 2)]=(0.482170004898+0.0552113106918j)
            arg[(1, 1, 2, 3)]=(-0.705652372164+0.490041799783j)*x[0] + ((0.570260506213+0.809431434264j))*x[1]
            ref[(1, 1, 2, 3)]=(-0.0676959329755+0.649736617023j)
            arg[(1, 2, 0, 0)]=(-0.53352315787+0.657145139776j)*x[0] + ((-0.202992768293+0.570533994378j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.368257963081+0.613839567077j)
            arg[(1, 2, 0, 1)]=(-0.960940752616+0.427069860895j)*x[0] + ((0.611599111182+0.111064418857j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.174670820717+0.269067139876j)
            arg[(1, 2, 0, 2)]=(0.181960456361-0.573307831463j)*x[0] + ((0.027129769773+0.279154780724j))*x[1]
            ref[(1, 2, 0, 2)]=(0.104545113067-0.14707652537j)
            arg[(1, 2, 0, 3)]=(0.129839709482-0.213474675099j)*x[0] + ((-0.619061127794+0.101414841155j))*x[1]
            ref[(1, 2, 0, 3)]=(-0.244610709156-0.0560299169719j)
            arg[(1, 2, 1, 0)]=(-0.0825500407232+0.774286354505j)*x[0] + ((0.832370287482+0.542243344813j))*x[1]
            ref[(1, 2, 1, 0)]=(0.374910123379+0.658264849659j)
            arg[(1, 2, 1, 1)]=(0.403128720893+0.107522579792j)*x[0] + ((0.412283156668+0.00798353006558j))*x[1]
            ref[(1, 2, 1, 1)]=(0.40770593878+0.0577530549287j)
            arg[(1, 2, 1, 2)]=(-0.491053081645+0.106180529509j)*x[0] + ((0.733111601424+0.135036106526j))*x[1]
            ref[(1, 2, 1, 2)]=(0.12102925989+0.120608318017j)
            arg[(1, 2, 1, 3)]=(-0.431756535475-0.642628686861j)*x[0] + ((0.883667196054+0.336020849643j))*x[1]
            ref[(1, 2, 1, 3)]=(0.22595533029-0.153303918609j)
            arg[(1, 2, 2, 0)]=(0.48241304895-0.95102624135j)*x[0] + ((0.0259263304486+0.461995605119j))*x[1]
            ref[(1, 2, 2, 0)]=(0.254169689699-0.244515318115j)
            arg[(1, 2, 2, 1)]=(-0.8161936872+0.263876943811j)*x[0] + ((0.853900072321-0.714772966646j))*x[1]
            ref[(1, 2, 2, 1)]=(0.0188531925606-0.225448011418j)
            arg[(1, 2, 2, 2)]=(-0.274147725852+0.902134250376j)*x[0] + ((0.209264144343+0.970305135614j))*x[1]
            ref[(1, 2, 2, 2)]=(-0.0324417907546+0.936219692995j)
            arg[(1, 2, 2, 3)]=(0.8468213674-0.793080443646j)*x[0] + ((0.321049115797-0.937705048704j))*x[1]
            ref[(1, 2, 2, 3)]=(0.583935241598-0.865392746175j)
            arg[(2, 0, 0, 0)]=(-0.421445979884+0.893738768557j)*x[0] + ((-0.491260282888-0.294954050339j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.456353131386+0.299392359109j)
            arg[(2, 0, 0, 1)]=(-0.932120298671+0.509118316335j)*x[0] + ((0.637544319526+0.0038510659833j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.147287989573+0.256484691159j)
            arg[(2, 0, 0, 2)]=(-0.430726825899+0.745673198305j)*x[0] + ((-0.6579273795+0.361114576052j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.5443271027+0.553393887179j)
            arg[(2, 0, 0, 3)]=(0.111792088885+0.121110112853j)*x[0] + ((-0.169871111349-0.587089680043j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.0290395112321-0.232989783595j)
            arg[(2, 0, 1, 0)]=(-0.167342842931+0.249638771877j)*x[0] + ((-0.628062971165-0.775716312659j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.397702907048-0.263038770391j)
            arg[(2, 0, 1, 1)]=(-0.624261259924+0.761976927411j)*x[0] + ((0.35528569962-0.536983314252j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.134487780152+0.11249680658j)
            arg[(2, 0, 1, 2)]=(-0.0599579527005+0.207822843695j)*x[0] + ((0.62568152864-0.468543108252j))*x[1]
            ref[(2, 0, 1, 2)]=(0.28286178797-0.130360132279j)
            arg[(2, 0, 1, 3)]=(-0.74536972111-0.636644967994j)*x[0] + ((-0.907232355041+0.108783242492j))*x[1]
            ref[(2, 0, 1, 3)]=(-0.826301038075-0.263930862751j)
            arg[(2, 0, 2, 0)]=(0.532545083704+0.76573998973j)*x[0] + ((0.641155144746-0.765411429974j))*x[1]
            ref[(2, 0, 2, 0)]=(0.586850114225+0.000164279877802j)
            arg[(2, 0, 2, 1)]=(-0.606420253973-0.741894602919j)*x[0] + ((-0.575761198028-0.462326172641j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.591090726-0.60211038778j)
            arg[(2, 0, 2, 2)]=(-0.908984824175-0.107281879341j)*x[0] + ((0.401599392268+0.772182139492j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.253692715953+0.332450130075j)
            arg[(2, 0, 2, 3)]=(0.0649383934089+0.69809190889j)*x[0] + ((0.265644982286-0.0469670237758j))*x[1]
            ref[(2, 0, 2, 3)]=(0.165291687848+0.325562442557j)
            arg[(2, 1, 0, 0)]=(0.103759553936+0.93202428553j)*x[0] + ((-0.275932826408+0.409501702511j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.0860866362358+0.670762994021j)
            arg[(2, 1, 0, 1)]=(-0.422106443948-0.545606204736j)*x[0] + ((-0.0683943683493+0.743303124039j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.245250406149+0.0988484596517j)
            arg[(2, 1, 0, 2)]=(0.431993694382-0.647477125543j)*x[0] + ((-0.34984300861+0.726382223507j))*x[1]
            ref[(2, 1, 0, 2)]=(0.0410753428858+0.039452548982j)
            arg[(2, 1, 0, 3)]=(0.62484781903+0.528380249501j)*x[0] + ((0.791705743837-0.563554863965j))*x[1]
            ref[(2, 1, 0, 3)]=(0.708276781433-0.0175873072317j)
            arg[(2, 1, 1, 0)]=(0.403134890331+0.178478870097j)*x[0] + ((-0.0825521242722+0.558167083349j))*x[1]
            ref[(2, 1, 1, 0)]=(0.160291383029+0.368322976723j)
            arg[(2, 1, 1, 1)]=(0.467140582066-0.206384165625j)*x[0] + ((0.299078660941+0.39724900508j))*x[1]
            ref[(2, 1, 1, 1)]=(0.383109621503+0.0954324197273j)
            arg[(2, 1, 1, 2)]=(0.773030336134-0.959199810126j)*x[0] + ((-0.546634501304+0.0770595264179j))*x[1]
            ref[(2, 1, 1, 2)]=(0.113197917415-0.441070141854j)
            arg[(2, 1, 1, 3)]=(-0.904952605006+0.816842334728j)*x[0] + ((0.434606561356-0.218974761031j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.235173021825+0.298933786848j)
            arg[(2, 1, 2, 0)]=(0.49116129663+0.356156375649j)*x[0] + ((0.413363634233+0.652424363509j))*x[1]
            ref[(2, 1, 2, 0)]=(0.452262465432+0.504290369579j)
            arg[(2, 1, 2, 1)]=(-0.624864767469-0.44158821636j)*x[0] + ((-0.509089075898-0.903111732597j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.566976921684-0.672349974479j)
            arg[(2, 1, 2, 2)]=(0.0992163838441-0.0647070593849j)*x[0] + ((-0.93641973543+0.334137993689j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.418601675793+0.134715467152j)
            arg[(2, 1, 2, 3)]=(-0.263310235502-0.255549658909j)*x[0] + ((-0.931896822792+0.3457316286j))*x[1]
            ref[(2, 1, 2, 3)]=(-0.597603529147+0.0450909848454j)
            arg[(2, 2, 0, 0)]=(-0.642223320718+0.547528040075j)*x[0] + ((0.00139475495489-0.244773295579j))*x[1]
            ref[(2, 2, 0, 0)]=(-0.320414282882+0.151377372248j)
            arg[(2, 2, 0, 1)]=(0.891587530431-0.834443790026j)*x[0] + ((-0.961337817947-0.23506326654j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.0348751437581-0.534753528283j)
            arg[(2, 2, 0, 2)]=(0.360979824642+0.909938012792j)*x[0] + ((-0.458625562588-0.349013966845j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.0488228689727+0.280462022973j)
            arg[(2, 2, 0, 3)]=(0.281716215973-0.829753044624j)*x[0] + ((-0.312071754619+0.377290259755j))*x[1]
            ref[(2, 2, 0, 3)]=(-0.0151777693226-0.226231392434j)
            arg[(2, 2, 1, 0)]=(-0.788656987084-0.216040703301j)*x[0] + ((-0.970816860586-0.535720596241j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.879736923835-0.375880649771j)
            arg[(2, 2, 1, 1)]=(-0.402876347629+0.617738174389j)*x[0] + ((-0.103228652717-0.152159531357j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.253052500173+0.232789321516j)
            arg[(2, 2, 1, 2)]=(-0.650026430436+0.71037174331j)*x[0] + ((0.566207025028+0.337975181401j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.0419097027042+0.524173462356j)
            arg[(2, 2, 1, 3)]=(0.208051803899+0.411866923873j)*x[0] + ((0.495195712722-0.79197051482j))*x[1]
            ref[(2, 2, 1, 3)]=(0.35162375831-0.190051795473j)
            arg[(2, 2, 2, 0)]=(-0.453747042279-0.915490298098j)*x[0] + ((0.0235380985759-0.124695453201j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.215104471852-0.52009287565j)
            arg[(2, 2, 2, 1)]=(0.294847387465+0.935327649736j)*x[0] + ((-0.250107749007+0.366662229277j))*x[1]
            ref[(2, 2, 2, 1)]=(0.022369819229+0.650994939507j)
            arg[(2, 2, 2, 2)]=(-0.996515353325-0.640633826144j)*x[0] + ((0.73003266012-0.0812572064301j))*x[1]
            ref[(2, 2, 2, 2)]=(-0.133241346602-0.360945516287j)
            arg[(2, 2, 2, 3)]=(0.167619356874-0.559364712153j)*x[0] + ((0.0432213057165+0.969433600528j))*x[1]
            ref[(2, 2, 2, 3)]=(0.105420331295+0.205034444188j)
            arg[(3, 0, 0, 0)]=(0.858607369327+0.933843200903j)*x[0] + ((0.185206521033+0.157808651139j))*x[1]
            ref[(3, 0, 0, 0)]=(0.52190694518+0.545825926021j)
            arg[(3, 0, 0, 1)]=(-0.420198368709+0.948585422144j)*x[0] + ((0.800779788073-0.929333688475j))*x[1]
            ref[(3, 0, 0, 1)]=(0.190290709682+0.00962586683474j)
            arg[(3, 0, 0, 2)]=(0.00685845611321+0.209849817201j)*x[0] + ((-0.773403723835-0.290983073685j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.383272633861-0.0405666282419j)
            arg[(3, 0, 0, 3)]=(0.199163608756-0.309915643506j)*x[0] + ((-0.962392716235+0.613807221139j))*x[1]
            ref[(3, 0, 0, 3)]=(-0.38161455374+0.151945788817j)
            arg[(3, 0, 1, 0)]=(0.0755547716074+0.458089181734j)*x[0] + ((-0.892009747757+0.649681866568j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.408227488075+0.553885524151j)
            arg[(3, 0, 1, 1)]=(-0.205798760653+0.523742865676j)*x[0] + ((-0.924641880549-0.534249814952j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.565220320601-0.00525347463808j)
            arg[(3, 0, 1, 2)]=(0.945784376175+0.362218724365j)*x[0] + ((-0.780203536955+0.0105609625566j))*x[1]
            ref[(3, 0, 1, 2)]=(0.0827904196097+0.186389843461j)
            arg[(3, 0, 1, 3)]=(-0.386127346286+0.689752794779j)*x[0] + ((-0.880635009084-0.646323445992j))*x[1]
            ref[(3, 0, 1, 3)]=(-0.633381177685+0.0217146743937j)
            arg[(3, 0, 2, 0)]=(0.46934510934+0.985463647182j)*x[0] + ((0.572241633561+0.434825431914j))*x[1]
            ref[(3, 0, 2, 0)]=(0.520793371451+0.710144539548j)
            arg[(3, 0, 2, 1)]=(-0.209671341835-0.374039568809j)*x[0] + ((-0.940516007312-0.937478741405j))*x[1]
            ref[(3, 0, 2, 1)]=(-0.575093674573-0.655759155107j)
            arg[(3, 0, 2, 2)]=(0.2758086821-0.414425895676j)*x[0] + ((-0.111895914539-0.00241609093952j))*x[1]
            ref[(3, 0, 2, 2)]=(0.0819563837805-0.208420993308j)
            arg[(3, 0, 2, 3)]=(-0.155397777938-0.825480220109j)*x[0] + ((0.153855200427+0.831161411982j))*x[1]
            ref[(3, 0, 2, 3)]=(-0.000771288755258+0.00284059593628j)
            arg[(3, 1, 0, 0)]=(0.37459565579+0.757329879403j)*x[0] + ((0.898327629227+0.719306702482j))*x[1]
            ref[(3, 1, 0, 0)]=(0.636461642509+0.738318290943j)
            arg[(3, 1, 0, 1)]=(0.876468067122+0.0659119009993j)*x[0] + ((-0.59043940452+0.817198523407j))*x[1]
            ref[(3, 1, 0, 1)]=(0.143014331301+0.441555212203j)
            arg[(3, 1, 0, 2)]=(-0.468098695536-0.430232891882j)*x[0] + ((-0.64822380287-0.0763523642392j))*x[1]
            ref[(3, 1, 0, 2)]=(-0.558161249203-0.253292628061j)
            arg[(3, 1, 0, 3)]=(-0.258884007213+0.810903327385j)*x[0] + ((-0.684415732594+0.0990266178794j))*x[1]
            ref[(3, 1, 0, 3)]=(-0.471649869903+0.454964972632j)
            arg[(3, 1, 1, 0)]=(-0.125184078645-0.225957907766j)*x[0] + ((-0.963912500812+0.294381105897j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.544548289729+0.0342115990656j)
            arg[(3, 1, 1, 1)]=(-0.231532349929+0.921451241735j)*x[0] + ((-0.661921618542+0.196305182713j))*x[1]
            ref[(3, 1, 1, 1)]=(-0.446726984235+0.558878212224j)
            arg[(3, 1, 1, 2)]=(-0.62615056751+0.510222344335j)*x[0] + ((0.601746640811-0.605895911418j))*x[1]
            ref[(3, 1, 1, 2)]=(-0.0122019633496-0.0478367835416j)
            arg[(3, 1, 1, 3)]=(0.127252008737-0.148965709861j)*x[0] + ((0.935945489641+0.848421707199j))*x[1]
            ref[(3, 1, 1, 3)]=(0.531598749189+0.349727998669j)
            arg[(3, 1, 2, 0)]=(0.681545779823+0.471912798357j)*x[0] + ((-0.454616369129+0.351300326601j))*x[1]
            ref[(3, 1, 2, 0)]=(0.113464705347+0.411606562479j)
            arg[(3, 1, 2, 1)]=(0.254085651636+0.520363317726j)*x[0] + ((-0.476611094954+0.115987583011j))*x[1]
            ref[(3, 1, 2, 1)]=(-0.111262721659+0.318175450369j)
            arg[(3, 1, 2, 2)]=(-0.960523330888+0.665607550495j)*x[0] + ((0.12864805881+0.28168835899j))*x[1]
            ref[(3, 1, 2, 2)]=(-0.415937636039+0.473647954743j)
            arg[(3, 1, 2, 3)]=(-0.671111584805-0.0706114105071j)*x[0] + ((0.413425713291+0.590748078919j))*x[1]
            ref[(3, 1, 2, 3)]=(-0.128842935757+0.260068334206j)
            arg[(3, 2, 0, 0)]=(-0.0984538275477-0.615627382498j)*x[0] + ((-0.331309744254+0.404928101315j))*x[1]
            ref[(3, 2, 0, 0)]=(-0.214881785901-0.105349640591j)
            arg[(3, 2, 0, 1)]=(0.892513377077+0.714894056023j)*x[0] + ((0.856927531868-0.438321230272j))*x[1]
            ref[(3, 2, 0, 1)]=(0.874720454472+0.138286412876j)
            arg[(3, 2, 0, 2)]=(0.924471490894+0.395710558023j)*x[0] + ((0.418348537594+0.504118452431j))*x[1]
            ref[(3, 2, 0, 2)]=(0.671410014244+0.449914505227j)
            arg[(3, 2, 0, 3)]=(-0.824368380845+0.128470445627j)*x[0] + ((-0.955060169328+0.53107138541j))*x[1]
            ref[(3, 2, 0, 3)]=(-0.889714275086+0.329770915518j)
            arg[(3, 2, 1, 0)]=(-0.125759060242+0.641027971823j)*x[0] + ((0.822375152394+0.332293893741j))*x[1]
            ref[(3, 2, 1, 0)]=(0.348308046076+0.486660932782j)
            arg[(3, 2, 1, 1)]=(0.178104875733-0.463424101587j)*x[0] + ((0.456051586753-0.358170548997j))*x[1]
            ref[(3, 2, 1, 1)]=(0.317078231243-0.410797325292j)
            arg[(3, 2, 1, 2)]=(-0.700499955024+0.0202919981438j)*x[0] + ((-0.857050719995-0.237345626717j))*x[1]
            ref[(3, 2, 1, 2)]=(-0.77877533751-0.108526814286j)
            arg[(3, 2, 1, 3)]=(0.729125078406+0.441044843529j)*x[0] + ((0.308617041266-0.936786388763j))*x[1]
            ref[(3, 2, 1, 3)]=(0.518871059836-0.247870772617j)
            arg[(3, 2, 2, 0)]=(-0.855645952491+0.511807351618j)*x[0] + ((0.145985820441+0.596564524377j))*x[1]
            ref[(3, 2, 2, 0)]=(-0.354830066025+0.554185937997j)
            arg[(3, 2, 2, 1)]=(-0.605741546419-0.495648451996j)*x[0] + ((0.468407629189+0.0362593521072j))*x[1]
            ref[(3, 2, 2, 1)]=(-0.0686669586148-0.229694549944j)
            arg[(3, 2, 2, 2)]=(-0.114600782008-0.291007022448j)*x[0] + ((-0.628201893776+0.650414751841j))*x[1]
            ref[(3, 2, 2, 2)]=(-0.371401337892+0.179703864697j)
            arg[(3, 2, 2, 3)]=(-0.96903327506+0.978730422564j)*x[0] + ((0.515204671244+0.490823583791j))*x[1]
            ref[(3, 2, 2, 3)]=(-0.226914301908+0.734777003178j)
        else:
            arg[(0, 0, 0, 0)]=(-0.2385701298+0.695627628201j)*x[0] + ((-0.138643279294+0.833711068996j))*x[1] + ((-0.807482071872-0.31947110236j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.592347740483+0.604933797418j)
            arg[(0, 0, 0, 1)]=(0.679829584678+0.665073781854j)*x[0] + ((-0.921437654237+0.305311867896j))*x[1] + ((0.973060878645+0.99310645774j))*x[2]
            ref[(0, 0, 0, 1)]=(0.365726404543+0.981746053745j)
            arg[(0, 0, 0, 2)]=(0.736346610398-0.00665422048501j)*x[0] + ((0.518975645149+0.844011946714j))*x[1] + ((-0.271696116819-0.841111488575j))*x[2]
            ref[(0, 0, 0, 2)]=(0.491813069364-0.00187688117283j)
            arg[(0, 0, 0, 3)]=(-0.848237464183+0.0485469289735j)*x[0] + ((-0.424885846628+0.94203580449j))*x[1] + ((0.403864175547+0.125227457454j))*x[2]
            ref[(0, 0, 0, 3)]=(-0.434629567632+0.557905095459j)
            arg[(0, 0, 1, 0)]=(0.62321922174+0.472654431746j)*x[0] + ((-0.796539208577+0.287549538273j))*x[1] + ((-0.331529123023-0.732713336433j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.25242455493+0.0137453167931j)
            arg[(0, 0, 1, 1)]=(-0.479405716132-0.867157436039j)*x[0] + ((-0.320728696398+0.00449889148067j))*x[1] + ((-0.995787391971-0.647511599756j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.897960902251-0.755085072157j)
            arg[(0, 0, 1, 2)]=(-0.886206775783-0.71211407343j)*x[0] + ((0.286440095429-0.916478788237j))*x[1] + ((0.539827425194-0.147359942689j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.02996962758-0.887976402178j)
            arg[(0, 0, 1, 3)]=(0.803176714781+0.229151121216j)*x[0] + ((0.0246350277899+0.388845630521j))*x[1] + ((-0.935594742574-0.262464508368j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.0538915000015+0.177766121685j)
            arg[(0, 0, 2, 0)]=(-0.755994321149-0.461479998443j)*x[0] + ((-0.410934515762-0.585646400068j))*x[1] + ((-0.449431378004+0.735801308365j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.808180107457-0.155662545073j)
            arg[(0, 0, 2, 1)]=(-0.295704301547+0.135627104247j)*x[0] + ((-0.980478016358+0.303952198855j))*x[1] + ((-0.728610625385-0.570595554429j))*x[2]
            ref[(0, 0, 2, 1)]=(-1.00239647165-0.0655081256638j)
            arg[(0, 0, 2, 2)]=(0.585326179817+0.790549820476j)*x[0] + ((0.537040921874+0.465983949632j))*x[1] + ((-0.528268470427+0.256682714186j))*x[2]
            ref[(0, 0, 2, 2)]=(0.297049315632+0.756608242147j)
            arg[(0, 0, 2, 3)]=(0.0315482069742+0.487824917358j)*x[0] + ((-0.703588675743+0.442198803503j))*x[1] + ((0.627961272716-0.0253939338691j))*x[2]
            ref[(0, 0, 2, 3)]=(-0.0220395980266+0.452314893496j)
            arg[(0, 1, 0, 0)]=(-0.286629442492+0.890973871597j)*x[0] + ((-0.444651440756-0.0780751498043j))*x[1] + ((-0.231766252746+0.439991928977j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.481523567997+0.626445325385j)
            arg[(0, 1, 0, 1)]=(0.308166892941-0.285612116609j)*x[0] + ((0.246053377437+0.782423316808j))*x[1] + ((-0.424901246965+0.508458780254j))*x[2]
            ref[(0, 1, 0, 1)]=(0.0646595117064+0.502634990227j)
            arg[(0, 1, 0, 2)]=(-0.71713965621-0.0930834017886j)*x[0] + ((0.0115806162478+0.416257247762j))*x[1] + ((0.0120643878485-0.646624380237j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.346747326057-0.161725267132j)
            arg[(0, 1, 0, 3)]=(0.398952611169+0.813974160093j)*x[0] + ((0.508286158263+0.277071446278j))*x[1] + ((0.516346769999+0.958276066094j))*x[2]
            ref[(0, 1, 0, 3)]=(0.711792769716+1.02466083623j)
            arg[(0, 1, 1, 0)]=(0.805175353508-0.886637103874j)*x[0] + ((0.515708650356+0.796968035125j))*x[1] + ((0.270413230549+0.0658877584534j))*x[2]
            ref[(0, 1, 1, 0)]=(0.795648617207-0.0118906551475j)
            arg[(0, 1, 1, 1)]=(0.596171303672+0.384523701144j)*x[0] + ((0.309304356547-0.775778659016j))*x[1] + ((-0.728662110346+0.869564964485j))*x[2]
            ref[(0, 1, 1, 1)]=(0.0884067749362+0.239155003307j)
            arg[(0, 1, 1, 2)]=(-0.070925651276-0.0872816639141j)*x[0] + ((-0.885388335607-0.19880286834j))*x[1] + ((0.24221021591+0.329732728686j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.357051885487+0.021824098216j)
            arg[(0, 1, 1, 3)]=(-0.0886231366093+0.560372972129j)*x[0] + ((0.42781155014-0.00830957329546j))*x[1] + ((0.706964225843-0.240457002826j))*x[2]
            ref[(0, 1, 1, 3)]=(0.523076319687+0.155803198004j)
            arg[(0, 1, 2, 0)]=(0.461836783298-0.739449275644j)*x[0] + ((-0.951871736455-0.824225050483j))*x[1] + ((-0.974523359378-0.850721935505j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.732279156268-1.20719813082j)
            arg[(0, 1, 2, 1)]=(0.203866520334+0.200800284391j)*x[0] + ((-0.339497911265-0.845285858496j))*x[1] + ((-0.7850254782+0.121628003483j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.460328434565-0.261428785311j)
            arg[(0, 1, 2, 2)]=(0.175381638564-0.668639244662j)*x[0] + ((0.276243367717+0.668944531089j))*x[1] + ((-0.90023185266+0.406838551802j))*x[2]
            ref[(0, 1, 2, 2)]=(-0.22430342319+0.203571919114j)
            arg[(0, 1, 2, 3)]=(0.531746142487+0.97565234502j)*x[0] + ((-0.201671923642+0.702723284977j))*x[1] + ((0.101342076168+0.491349063393j))*x[2]
            ref[(0, 1, 2, 3)]=(0.215708147507+1.0848623467j)
            arg[(0, 2, 0, 0)]=(0.679047364499-0.906491101343j)*x[0] + ((-0.117989313832+0.320058337895j))*x[1] + ((0.309181032286-0.362165237j))*x[2]
            ref[(0, 2, 0, 0)]=(0.435119541476-0.474299000224j)
            arg[(0, 2, 0, 1)]=(-0.0977991980115-0.760222730556j)*x[0] + ((0.0778093400711-0.680425753237j))*x[1] + ((-0.644897524358-0.70850632998j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.332443691149-1.07457740689j)
            arg[(0, 2, 0, 2)]=(-0.830532353923+0.603049929909j)*x[0] + ((-0.824260617246+0.207652468811j))*x[1] + ((-0.60616604768-0.5662653322j))*x[2]
            ref[(0, 2, 0, 2)]=(-1.13047950942+0.12221853326j)
            arg[(0, 2, 0, 3)]=(-0.867541020557-0.298902801045j)*x[0] + ((-0.408878059123-0.399171098576j))*x[1] + ((-0.399418688538-0.88226256583j))*x[2]
            ref[(0, 2, 0, 3)]=(-0.83791888411-0.790168232726j)
            arg[(0, 2, 1, 0)]=(-0.0681438356552-0.0322087476765j)*x[0] + ((0.445868149877+0.000161868078424j))*x[1] + ((0.37380411751-0.267441286279j))*x[2]
            ref[(0, 2, 1, 0)]=(0.375764215866-0.149744082939j)
            arg[(0, 2, 1, 1)]=(0.583292147359+0.175194933989j)*x[0] + ((-0.323482216915+0.438089173158j))*x[1] + ((0.598753578958+0.335420554182j))*x[2]
            ref[(0, 2, 1, 1)]=(0.429281754701+0.474352330665j)
            arg[(0, 2, 1, 2)]=(-0.950154593904-0.160997110595j)*x[0] + ((-0.264761243311+0.464064815966j))*x[1] + ((0.846799436859-0.486179293108j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.184058200178-0.0915557938685j)
            arg[(0, 2, 1, 3)]=(-0.426912834845+0.684215445567j)*x[0] + ((0.893579300374-0.33519510001j))*x[1] + ((-0.744447880676-0.557040706392j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.138890707574-0.104010180417j)
            arg[(0, 2, 2, 0)]=(-0.659101398233+0.444218976004j)*x[0] + ((-0.349385453568-0.5359542202j))*x[1] + ((-0.819362510699-0.31482318813j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.91392468125-0.203279216163j)
            arg[(0, 2, 2, 1)]=(0.962864831076-0.976849768046j)*x[0] + ((0.477867447646+0.95617687593j))*x[1] + ((0.573678941435-0.709885973653j))*x[2]
            ref[(0, 2, 2, 1)]=(1.00720561008-0.365279432884j)
            arg[(0, 2, 2, 2)]=(-0.358272279163+0.137630368767j)*x[0] + ((0.910726656987+0.869797254681j))*x[1] + ((-0.977831126708+0.0232752502134j))*x[2]
            ref[(0, 2, 2, 2)]=(-0.212688374442+0.515351436831j)
            arg[(0, 2, 2, 3)]=(0.37158862553-0.578967505949j)*x[0] + ((-0.708784145184+0.201370008021j))*x[1] + ((0.0294583769172+0.401368220872j))*x[2]
            ref[(0, 2, 2, 3)]=(-0.153868571368+0.0118853614722j)
            arg[(1, 0, 0, 0)]=(0.551179923536+0.426359187433j)*x[0] + ((-0.456786422971+0.103623405961j))*x[1] + ((-0.281852965094+0.668815093662j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.0937297322643+0.599398843528j)
            arg[(1, 0, 0, 1)]=(0.0730508700401-0.806961569361j)*x[0] + ((0.488955438671+0.0458408191524j))*x[1] + ((-0.384594672087+0.477243370328j))*x[2]
            ref[(1, 0, 0, 1)]=(0.0887058183122-0.14193868994j)
            arg[(1, 0, 0, 2)]=(-0.412458390855-0.47717783003j)*x[0] + ((-0.224981690951-0.191273918965j))*x[1] + ((-0.463474444114-0.00763479725251j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.55045726296-0.338043273124j)
            arg[(1, 0, 0, 3)]=(0.136148017009-0.745761252805j)*x[0] + ((-0.341573531623-0.290709524365j))*x[1] + ((0.586299047206+0.815253068864j))*x[2]
            ref[(1, 0, 0, 3)]=(0.190436766295-0.110608854153j)
            arg[(1, 0, 1, 0)]=(-0.259215752606+0.241394562565j)*x[0] + ((-0.127510455299-0.379373461628j))*x[1] + ((0.723808277655+0.400143836924j))*x[2]
            ref[(1, 0, 1, 0)]=(0.168541034875+0.13108246893j)
            arg[(1, 0, 1, 1)]=(-0.220633692689-0.730390230572j)*x[0] + ((-0.471557858203-0.288418078712j))*x[1] + ((0.972558238426-0.106691454665j))*x[2]
            ref[(1, 0, 1, 1)]=(0.140183343767-0.562749881974j)
            arg[(1, 0, 1, 2)]=(-0.828376164568+0.44730102722j)*x[0] + ((-0.434828660408-0.388188043692j))*x[1] + ((0.263633489347-0.468897339542j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.499785667815-0.204892178007j)
            arg[(1, 0, 1, 3)]=(-0.443585838034+0.692467080794j)*x[0] + ((0.246107658957-0.216077348648j))*x[1] + ((0.0749009876203-0.451094428259j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.0612885957281+0.0126476519437j)
            arg[(1, 0, 2, 0)]=(-0.503508732769+0.223188559185j)*x[0] + ((-0.318293124097+0.612629948864j))*x[1] + ((-0.202918415977-0.988271020814j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.512360136422-0.0762262563824j)
            arg[(1, 0, 2, 1)]=(0.932812333405-0.430784707926j)*x[0] + ((0.172680368618+0.271746897256j))*x[1] + ((0.971514160735-0.492651429174j))*x[2]
            ref[(1, 0, 2, 1)]=(1.03850343138-0.325844619922j)
            arg[(1, 0, 2, 2)]=(0.804863480075+0.76116399723j)*x[0] + ((-0.678360403311-0.256456993874j))*x[1] + ((-0.898763224594-0.377863760959j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.386130073915+0.0634216211988j)
            arg[(1, 0, 2, 3)]=(0.936868594091-0.684384717232j)*x[0] + ((0.857037917709+0.465236819206j))*x[1] + ((0.812149185557+0.467931908832j))*x[2]
            ref[(1, 0, 2, 3)]=(1.30302784868+0.124392005404j)
            arg[(1, 1, 0, 0)]=(0.544286259178+0.120811131964j)*x[0] + ((0.628507151213+0.25401949969j))*x[1] + ((-0.156357241689-0.166919154135j))*x[2]
            ref[(1, 1, 0, 0)]=(0.508218084351+0.10395573876j)
            arg[(1, 1, 0, 1)]=(0.670671549966-0.641807827603j)*x[0] + ((-0.957322146534-0.741584863673j))*x[1] + ((-0.658295640685-0.00365929994263j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.472473118627-0.693525995609j)
            arg[(1, 1, 0, 2)]=(0.826336521061-0.0364544780883j)*x[0] + ((0.0126415820109-0.163816285845j))*x[1] + ((0.74582176823-0.565517303249j))*x[2]
            ref[(1, 1, 0, 2)]=(0.792399935651-0.382894033591j)
            arg[(1, 1, 0, 3)]=(0.479235437892-0.568820640726j)*x[0] + ((-0.784323577897+0.10911381039j))*x[1] + ((0.14874135471+0.887222468109j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.0781733926475+0.213757818886j)
            arg[(1, 1, 1, 0)]=(0.285140753909-0.457520881114j)*x[0] + ((0.368973163311-0.880253502296j))*x[1] + ((-0.988775814528-0.762412803876j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.167330948654-1.05009359364j)
            arg[(1, 1, 1, 1)]=(0.0346945255777-0.782844779947j)*x[0] + ((0.283760163584-0.801984160263j))*x[1] + ((0.341581896732+0.62246193758j))*x[2]
            ref[(1, 1, 1, 1)]=(0.330018292947-0.481183501315j)
            arg[(1, 1, 1, 2)]=(0.273124067448+0.278487047515j)*x[0] + ((0.654755251974+0.802253026412j))*x[1] + ((-0.51870942632-0.575572262426j))*x[2]
            ref[(1, 1, 1, 2)]=(0.204584946551+0.25258390575j)
            arg[(1, 1, 1, 3)]=(-0.15506275953+0.859554052219j)*x[0] + ((0.036513258202-0.129016163258j))*x[1] + ((-0.171720643095-0.570945788111j))*x[2]
            ref[(1, 1, 1, 3)]=(-0.145135072212+0.0797960504254j)
            arg[(1, 1, 2, 0)]=(0.168928980186-0.983977525287j)*x[0] + ((-0.217317886388+0.116715277064j))*x[1] + ((0.889223075478-0.676593255109j))*x[2]
            ref[(1, 1, 2, 0)]=(0.420417084638-0.771927751666j)
            arg[(1, 1, 2, 1)]=(-0.923135119009+0.0868520912833j)*x[0] + ((-0.242804619607-0.942597775267j))*x[1] + ((-0.905287144435-0.497681988654j))*x[2]
            ref[(1, 1, 2, 1)]=(-1.03561344153-0.676713836319j)
            arg[(1, 1, 2, 2)]=(-0.278108168069+0.590018222755j)*x[0] + ((0.259524755385-0.27050647863j))*x[1] + ((0.427649478802+0.377231178801j))*x[2]
            ref[(1, 1, 2, 2)]=(0.204533033058+0.348371461463j)
            arg[(1, 1, 2, 3)]=(-0.0455213937816-0.377003414664j)*x[0] + ((-0.14149239034-0.567162597057j))*x[1] + ((0.456531427537-0.683014714743j))*x[2]
            ref[(1, 1, 2, 3)]=(0.134758821708-0.813590363232j)
            arg[(1, 2, 0, 0)]=(0.866041230742+0.432480160128j)*x[0] + ((0.338229545571+0.547843881377j))*x[1] + ((-0.291509422525-0.497218648385j))*x[2]
            ref[(1, 2, 0, 0)]=(0.456380676894+0.241552696559j)
            arg[(1, 2, 0, 1)]=(-0.708991297674-0.406581417963j)*x[0] + ((0.130898573502-0.314821730813j))*x[1] + ((-0.796134581174-0.167319257803j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.687113652673-0.44436120329j)
            arg[(1, 2, 0, 2)]=(0.159652472395-0.249012504946j)*x[0] + ((-0.0405186504397+0.244511149979j))*x[1] + ((-0.100016830253-0.357792582873j))*x[2]
            ref[(1, 2, 0, 2)]=(0.00955849585116-0.18114696892j)
            arg[(1, 2, 0, 3)]=(-0.739697594082-0.448665694344j)*x[0] + ((0.805796342833+0.460271820889j))*x[1] + ((0.893168845181+0.280881344646j))*x[2]
            ref[(1, 2, 0, 3)]=(0.479633796966+0.146243735596j)
            arg[(1, 2, 1, 0)]=(-0.882690305684-0.509167920219j)*x[0] + ((-0.685508587768-0.177325832456j))*x[1] + ((-0.845666251373-0.665939515842j))*x[2]
            ref[(1, 2, 1, 0)]=(-1.20693257241-0.676216634259j)
            arg[(1, 2, 1, 1)]=(-0.154672096371-0.728622705197j)*x[0] + ((0.930787321487+0.736970755407j))*x[1] + ((0.154810534087+0.361933898521j))*x[2]
            ref[(1, 2, 1, 1)]=(0.465462879602+0.185140974366j)
            arg[(1, 2, 1, 2)]=(0.130104898425-0.343186478951j)*x[0] + ((0.313369878906+0.176839699407j))*x[1] + ((0.965499377549+0.458100216962j))*x[2]
            ref[(1, 2, 1, 2)]=(0.70448707744+0.145876718709j)
            arg[(1, 2, 1, 3)]=(-0.93044011841-0.509825521054j)*x[0] + ((0.814918360503-0.163963597107j))*x[1] + ((-0.71957332613+0.381419365024j))*x[2]
            ref[(1, 2, 1, 3)]=(-0.417547542019-0.146184876569j)
            arg[(1, 2, 2, 0)]=(0.791288629589-0.114486817759j)*x[0] + ((0.00632791521796+0.999085520378j))*x[1] + ((-0.776091881115-0.886757479123j))*x[2]
            ref[(1, 2, 2, 0)]=(0.010762331846-0.00107938825164j)
            arg[(1, 2, 2, 1)]=(-0.312189004062+0.679317226487j)*x[0] + ((0.266392833354-0.519665411669j))*x[1] + ((-0.874945859324-0.692067785243j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.460371015016-0.266207985213j)
            arg[(1, 2, 2, 2)]=(0.920912103212+0.776102807686j)*x[0] + ((-0.96402004244+0.620630752927j))*x[1] + ((0.567342428398-0.479300393003j))*x[2]
            ref[(1, 2, 2, 2)]=(0.262117244585+0.458716583805j)
            arg[(1, 2, 2, 3)]=(-0.842736808477+0.752070805645j)*x[0] + ((0.787019118094-0.286658706299j))*x[1] + ((-0.913303357125-0.422000822949j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.484510523753+0.0217056381988j)
            arg[(2, 0, 0, 0)]=(0.168272243496+0.0815343639386j)*x[0] + ((0.15963944869-0.600808853153j))*x[1] + ((-0.484479389577+0.0868934869769j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.0782838486957-0.216190501119j)
            arg[(2, 0, 0, 1)]=(0.636813490202+0.494538348056j)*x[0] + ((0.452318276022+0.51944185709j))*x[1] + ((-0.858748506842+0.649066316281j))*x[2]
            ref[(2, 0, 0, 1)]=(0.115191629691+0.831523260714j)
            arg[(2, 0, 0, 2)]=(0.863954906269-0.773785413634j)*x[0] + ((-0.768027132056+0.940628690678j))*x[1] + ((-0.197586412663-0.616327513239j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.0508293192249-0.224742118097j)
            arg[(2, 0, 0, 3)]=(-0.237418788716+0.342472236284j)*x[0] + ((-0.42879960611-0.960746640068j))*x[1] + ((-0.259245633727-0.605327399829j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.462732014276-0.611800901806j)
            arg[(2, 0, 1, 0)]=(0.912123603428+0.419037175129j)*x[0] + ((0.760840580148-0.621270252687j))*x[1] + ((-0.653684770059-0.749093435868j))*x[2]
            ref[(2, 0, 1, 0)]=(0.509639706759-0.475663256713j)
            arg[(2, 0, 1, 1)]=(0.502857405888+0.588243424402j)*x[0] + ((-0.91152383869+0.730631859668j))*x[1] + ((0.916767806082-0.931785073536j))*x[2]
            ref[(2, 0, 1, 1)]=(0.25405068664+0.193545105267j)
            arg[(2, 0, 1, 2)]=(-0.628304205314+0.904461335576j)*x[0] + ((0.509966992128-0.547435504586j))*x[1] + ((0.943623847676-0.739498412504j))*x[2]
            ref[(2, 0, 1, 2)]=(0.412643317245-0.191236290757j)
            arg[(2, 0, 1, 3)]=(-0.48550924583-0.900336154828j)*x[0] + ((0.812525596148+0.88817142384j))*x[1] + ((-0.103832122384-0.0117243321858j))*x[2]
            ref[(2, 0, 1, 3)]=(0.111592113967-0.0119445315869j)
            arg[(2, 0, 2, 0)]=(0.709264248952+0.896451160843j)*x[0] + ((0.364671326719+0.860815423927j))*x[1] + ((-0.64944159876-0.429319424955j))*x[2]
            ref[(2, 0, 2, 0)]=(0.212246988456+0.663973579907j)
            arg[(2, 0, 2, 1)]=(0.231140863242+0.240065237324j)*x[0] + ((-0.0738643930959-0.47629719416j))*x[1] + ((-0.139983005239-0.921764729907j))*x[2]
            ref[(2, 0, 2, 1)]=(0.00864673245343-0.578998343371j)
            arg[(2, 0, 2, 2)]=(0.798229323795+0.405937287634j)*x[0] + ((-0.320974636233-0.535123479336j))*x[1] + ((-0.757630172438+0.706018313625j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.140187742438+0.288416060962j)
            arg[(2, 0, 2, 3)]=(0.16817442113+0.0612924122592j)*x[0] + ((-0.641588548314-0.673168292617j))*x[1] + ((-0.76402080966+0.712911413319j))*x[2]
            ref[(2, 0, 2, 3)]=(-0.618717468422+0.0505177664808j)
            arg[(2, 1, 0, 0)]=(-0.0375308697251-0.860048734266j)*x[0] + ((0.784719990455+0.887198885124j))*x[1] + ((0.439390714477-0.977547015903j))*x[2]
            ref[(2, 1, 0, 0)]=(0.593289917603-0.475198432522j)
            arg[(2, 1, 0, 1)]=(-0.0644731063552-0.563836797317j)*x[0] + ((0.71628253659-0.592868151997j))*x[1] + ((0.380251566707-0.48944371139j))*x[2]
            ref[(2, 1, 0, 1)]=(0.516030498471-0.823074330352j)
            arg[(2, 1, 0, 2)]=(0.359261562983-0.788021227138j)*x[0] + ((0.172934287172-0.274137274886j))*x[1] + ((-0.959190224973+0.504756485551j))*x[2]
            ref[(2, 1, 0, 2)]=(-0.213497187409-0.278701008236j)
            arg[(2, 1, 0, 3)]=(-0.691172800941-0.402413304802j)*x[0] + ((-0.782823140422-0.599808198151j))*x[1] + ((-0.0831944442624+0.853952899902j))*x[2]
            ref[(2, 1, 0, 3)]=(-0.778595192812-0.0741343015254j)
            arg[(2, 1, 1, 0)]=(-0.014928918959-0.252025490277j)*x[0] + ((-0.396721593496-0.343776000195j))*x[1] + ((0.450991359319+0.209119244408j))*x[2]
            ref[(2, 1, 1, 0)]=(0.0196704234319-0.193341123032j)
            arg[(2, 1, 1, 1)]=(0.384492101163-0.713229691681j)*x[0] + ((0.173045313928+0.348674622168j))*x[1] + ((0.718825553666-0.70237331471j))*x[2]
            ref[(2, 1, 1, 1)]=(0.638181484379-0.533464192112j)
            arg[(2, 1, 1, 2)]=(-0.36884991455-0.495432941556j)*x[0] + ((-0.661276743234-0.0478580206867j))*x[1] + ((-0.0940439175251-0.438574145632j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.562085287654-0.490932553937j)
            arg[(2, 1, 1, 3)]=(-0.825784391407-0.349508151438j)*x[0] + ((0.929276536282-0.968933301844j))*x[1] + ((0.790787513575+0.308803432198j))*x[2]
            ref[(2, 1, 1, 3)]=(0.447139829225-0.504819010542j)
            arg[(2, 1, 2, 0)]=(-0.0474726242769-0.733236409956j)*x[0] + ((-0.28568214372+0.260849929284j))*x[1] + ((-0.555060081431-0.313749781511j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.444107424714-0.393068131092j)
            arg[(2, 1, 2, 1)]=(-0.367341512296+0.940143136704j)*x[0] + ((0.0171294706992-0.848008865053j))*x[1] + ((-0.623875119158+0.33730907968j))*x[2]
            ref[(2, 1, 2, 1)]=(-0.487043580377+0.214721675665j)
            arg[(2, 1, 2, 2)]=(0.744611896185+0.439210196049j)*x[0] + ((-0.540199675089+0.073088271859j))*x[1] + ((0.581943162052-0.429371741742j))*x[2]
            ref[(2, 1, 2, 2)]=(0.393177691574+0.0414633630832j)
            arg[(2, 1, 2, 3)]=(-0.383925990237-0.296142859017j)*x[0] + ((0.958800977472+0.209545006694j))*x[1] + ((0.404006448628+0.082219042911j))*x[2]
            ref[(2, 1, 2, 3)]=(0.489440717931-0.00218940470631j)
            arg[(2, 2, 0, 0)]=(-0.709352621215-0.861917734753j)*x[0] + ((-0.414929116342-0.857617626475j))*x[1] + ((-0.713635191505+0.869127948879j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.918958464531-0.425203706175j)
            arg[(2, 2, 0, 1)]=(-0.972485327662+0.524687727117j)*x[0] + ((0.124586047914-0.668813823834j))*x[1] + ((0.0155896884271-0.247875788851j))*x[2]
            ref[(2, 2, 0, 1)]=(-0.41615479566-0.196000942784j)
            arg[(2, 2, 0, 2)]=(0.402506138551+0.317292309465j)*x[0] + ((-0.892015599398-0.204509621691j))*x[1] + ((0.335896157208+0.989613762396j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.0768066518197+0.551198225085j)
            arg[(2, 2, 0, 3)]=(-0.699086375124-0.522301128374j)*x[0] + ((-0.0189819422636-0.489219246315j))*x[1] + ((-0.702894986279+0.45366419602j))*x[2]
            ref[(2, 2, 0, 3)]=(-0.710481651833-0.278928089335j)
            arg[(2, 2, 1, 0)]=(0.859888708987+0.135134750617j)*x[0] + ((0.912869994948+0.209103492278j))*x[1] + ((-0.717360470693+0.717387791692j))*x[2]
            ref[(2, 2, 1, 0)]=(0.527699116621+0.530813017293j)
            arg[(2, 2, 1, 1)]=(0.870669528173-0.608860070454j)*x[0] + ((0.374812091739+0.819851935434j))*x[1] + ((-0.157907834548+0.201810614158j))*x[2]
            ref[(2, 2, 1, 1)]=(0.543786892682+0.206401239569j)
            arg[(2, 2, 1, 2)]=(-0.94893365897-0.85138117523j)*x[0] + ((0.639516757249-0.385297670299j))*x[1] + ((-0.428112625818+0.162212156028j))*x[2]
            ref[(2, 2, 1, 2)]=(-0.36876476377-0.53723334475j)
            arg[(2, 2, 1, 3)]=(-0.282009131893-0.98187986327j)*x[0] + ((-0.871084352891+0.12708239573j))*x[1] + ((0.927067116922+0.366235725242j))*x[2]
            ref[(2, 2, 1, 3)]=(-0.113013183931-0.244280871149j)
            arg[(2, 2, 2, 0)]=(0.187590349113-0.466706646231j)*x[0] + ((-0.880797305966+0.774181048746j))*x[1] + ((0.910034319141+0.482469912926j))*x[2]
            ref[(2, 2, 2, 0)]=(0.108413681144+0.39497215772j)
            arg[(2, 2, 2, 1)]=(-0.0288558181499+0.45768566923j)*x[0] + ((-0.907190383394+0.183893989089j))*x[1] + ((-0.514576865257+0.547665712985j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.7253115334+0.594622685652j)
            arg[(2, 2, 2, 2)]=(0.376787323133+0.849038031723j)*x[0] + ((0.959816341034-0.496417637671j))*x[1] + ((-0.207869115803+0.367426688489j))*x[2]
            ref[(2, 2, 2, 2)]=(0.564367274182+0.360023541271j)
            arg[(2, 2, 2, 3)]=(0.367628456081+0.135760441991j)*x[0] + ((0.776720556626+0.0670776770114j))*x[1] + ((0.625065208572+0.184457395365j))*x[2]
            ref[(2, 2, 2, 3)]=(0.88470711064+0.193647757183j)
            arg[(3, 0, 0, 0)]=(0.0987111280659+0.353217187244j)*x[0] + ((0.613552312404-0.601709877001j))*x[1] + ((0.0442297320219-0.627592994655j))*x[2]
            ref[(3, 0, 0, 0)]=(0.378246586246-0.438042842206j)
            arg[(3, 0, 0, 1)]=(0.780096971892-0.545835072638j)*x[0] + ((0.672348803057+0.726665659921j))*x[1] + ((-0.799714137694+0.625958307174j))*x[2]
            ref[(3, 0, 0, 1)]=(0.326365818628+0.403394447229j)
            arg[(3, 0, 0, 2)]=(-0.408237198536-0.669914299419j)*x[0] + ((0.0307863988644+0.320726882109j))*x[1] + ((0.476901163127-0.329718903785j))*x[2]
            ref[(3, 0, 0, 2)]=(0.0497251817276-0.339453160547j)
            arg[(3, 0, 0, 3)]=(0.957815246504-0.872517330171j)*x[0] + ((0.346811623537+0.0711426689406j))*x[1] + ((-0.916328864244-0.484551626391j))*x[2]
            ref[(3, 0, 0, 3)]=(0.194149002899-0.642963143811j)
            arg[(3, 0, 1, 0)]=(0.749432546166-0.148813206669j)*x[0] + ((-0.0908497066617-0.517251251572j))*x[1] + ((-0.179479114669-0.166406391324j))*x[2]
            ref[(3, 0, 1, 0)]=(0.239551862418-0.416235424783j)
            arg[(3, 0, 1, 1)]=(0.74402059097-0.88581193867j)*x[0] + ((0.499972950959+0.189412878625j))*x[1] + ((-0.576694840292-0.680070138961j))*x[2]
            ref[(3, 0, 1, 1)]=(0.333649350818-0.688234599503j)
            arg[(3, 0, 1, 2)]=(-0.993561830509-0.2040157062j)*x[0] + ((0.899469399991+0.703150628212j))*x[1] + ((0.290813097823-0.734938786j))*x[2]
            ref[(3, 0, 1, 2)]=(0.0983603336527-0.117901931994j)
            arg[(3, 0, 1, 3)]=(0.544253091181-0.241902202008j)*x[0] + ((0.913304827968-0.577656555349j))*x[1] + ((0.663625771882+0.148491053479j))*x[2]
            ref[(3, 0, 1, 3)]=(1.06059184552-0.33553385194j)
            arg[(3, 0, 2, 0)]=(-0.301433454294+0.762473265799j)*x[0] + ((0.84633553917-0.426156361298j))*x[1] + ((-0.00571881911536+0.800623970832j))*x[2]
            ref[(3, 0, 2, 0)]=(0.26959163288+0.568470437667j)
            arg[(3, 0, 2, 1)]=(-0.973785701238+0.434272623104j)*x[0] + ((0.401987621682-0.723056193239j))*x[1] + ((0.0810254149162+0.700425219922j))*x[2]
            ref[(3, 0, 2, 1)]=(-0.24538633232+0.205820824893j)
            arg[(3, 0, 2, 2)]=(0.389352050867+0.485127629723j)*x[0] + ((-0.082536762103-0.501415408937j))*x[1] + ((0.529813827084+0.178389339414j))*x[2]
            ref[(3, 0, 2, 2)]=(0.418314557924+0.0810507801002j)
            arg[(3, 0, 2, 3)]=(0.685336841482-0.509394957418j)*x[0] + ((-0.162441604418-0.719989161568j))*x[1] + ((0.340119580091-0.103810071698j))*x[2]
            ref[(3, 0, 2, 3)]=(0.431507408578-0.666597095342j)
            arg[(3, 1, 0, 0)]=(0.425894185044+0.265605149939j)*x[0] + ((-0.491630251781-0.0194633915092j))*x[1] + ((0.564959079276+0.0634443507623j))*x[2]
            ref[(3, 1, 0, 0)]=(0.24961150627+0.154793054596j)
            arg[(3, 1, 0, 1)]=(-0.0700372027321-0.804058224382j)*x[0] + ((-0.552803378156-0.624572849904j))*x[1] + ((0.492273276207+0.58499964139j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.0652836523406-0.421815716448j)
            arg[(3, 1, 0, 2)]=(0.477201007339-0.702448351039j)*x[0] + ((-0.735331310629+0.589883492353j))*x[1] + ((-0.15704509419-0.953799611592j))*x[2]
            ref[(3, 1, 0, 2)]=(-0.20758769874-0.533182235139j)
            arg[(3, 1, 0, 3)]=(-0.612569519467-0.413952775666j)*x[0] + ((0.239356162576-0.183666222642j))*x[1] + ((-0.675299253488-0.352904610777j))*x[2]
            ref[(3, 1, 0, 3)]=(-0.524256305189-0.475261804543j)
            arg[(3, 1, 1, 0)]=(-0.334893586652+0.458115627825j)*x[0] + ((-0.253673737968-0.0624680174366j))*x[1] + ((-0.294561059976-0.644041080119j))*x[2]
            ref[(3, 1, 1, 0)]=(-0.441564192298-0.124196734865j)
            arg[(3, 1, 1, 1)]=(-0.101472737652+0.607239826321j)*x[0] + ((0.60362621115+0.616079096103j))*x[1] + ((0.577575405563-0.107170128151j))*x[2]
            ref[(3, 1, 1, 1)]=(0.53986443953+0.558074397136j)
            arg[(3, 1, 1, 2)]=(0.78062207326+0.228035772145j)*x[0] + ((-0.460156990877+0.910594618493j))*x[1] + ((-0.0293993381711-0.834453156021j))*x[2]
            ref[(3, 1, 1, 2)]=(0.145532872106+0.152088617309j)
            arg[(3, 1, 1, 3)]=(-0.513380036475-0.252516608858j)*x[0] + ((-0.820657648485-0.433612740001j))*x[1] + ((-0.595497514063+0.35920616495j))*x[2]
            ref[(3, 1, 1, 3)]=(-0.964767599512-0.163461591955j)
            arg[(3, 1, 2, 0)]=(0.497707589488-0.00328456292248j)*x[0] + ((0.584592894917+0.780399876179j))*x[1] + ((0.269601534175+0.0451924296137j))*x[2]
            ref[(3, 1, 2, 0)]=(0.67595100929+0.411153871435j)
            arg[(3, 1, 2, 1)]=(0.45256613663+0.259228315431j)*x[0] + ((-0.498485335368-0.642640379308j))*x[1] + ((0.988103951808+0.00467256880963j))*x[2]
            ref[(3, 1, 2, 1)]=(0.471092376535-0.189369747534j)
            arg[(3, 1, 2, 2)]=(-0.786498826928+0.449024720263j)*x[0] + ((-0.908188670635-0.224629016736j))*x[1] + ((0.294266666716+0.0692141710257j))*x[2]
            ref[(3, 1, 2, 2)]=(-0.700210415423+0.146804937277j)
            arg[(3, 1, 2, 3)]=(0.53851783517+0.0446346592192j)*x[0] + ((0.298108929702+0.67806442976j))*x[1] + ((-0.0222842697655+0.703948494718j))*x[2]
            ref[(3, 1, 2, 3)]=(0.407171247553+0.713323791848j)
            arg[(3, 2, 0, 0)]=(0.594023123111-0.166079081715j)*x[0] + ((-0.663833433081-0.568775666529j))*x[1] + ((0.0580673736255-0.235544782366j))*x[2]
            ref[(3, 2, 0, 0)]=(-0.00587146817188-0.485199765305j)
            arg[(3, 2, 0, 1)]=(-0.767033374666+0.595234998076j)*x[0] + ((0.586223617787+0.859014869417j))*x[1] + ((0.377993026101+0.258334413171j))*x[2]
            ref[(3, 2, 0, 1)]=(0.0985916346112+0.856292140332j)
            arg[(3, 2, 0, 2)]=(-0.19043302783-0.83374692553j)*x[0] + ((-0.819427294894+0.0785559939077j))*x[1] + ((0.250378209452+0.52057963933j))*x[2]
            ref[(3, 2, 0, 2)]=(-0.379741056636-0.117305646146j)
            arg[(3, 2, 0, 3)]=(-0.231634796758+0.237554661854j)*x[0] + ((-0.556608275228+0.902520742062j))*x[1] + ((-0.967200377412+0.0215807091116j))*x[2]
            ref[(3, 2, 0, 3)]=(-0.877721724699+0.580828056514j)
            arg[(3, 2, 1, 0)]=(-0.0143761075059-0.930276473494j)*x[0] + ((-0.953016335455+0.413986389937j))*x[1] + ((-0.876821127602+0.193424987497j))*x[2]
            ref[(3, 2, 1, 0)]=(-0.922106785281-0.16143254803j)
            arg[(3, 2, 1, 1)]=(0.375645490361-0.317468379612j)*x[0] + ((-0.500574704925+0.488722205055j))*x[1] + ((-0.161698120296+0.923873418197j))*x[2]
            ref[(3, 2, 1, 1)]=(-0.14331366743+0.54756362182j)
            arg[(3, 2, 1, 2)]=(-0.448710428325-0.137369848537j)*x[0] + ((-0.496394559218+0.00262096222326j))*x[1] + ((0.237680350503-0.507459518314j))*x[2]
            ref[(3, 2, 1, 2)]=(-0.35371231852-0.321104202314j)
            arg[(3, 2, 1, 3)]=(-0.667751670726-0.766103816172j)*x[0] + ((-0.495692615397-0.995265636458j))*x[1] + ((-0.633369357664+0.716145175621j))*x[2]
            ref[(3, 2, 1, 3)]=(-0.898406821894-0.522612138504j)
            arg[(3, 2, 2, 0)]=(-0.719561153428+0.567165106688j)*x[0] + ((0.131174907598+0.320806836396j))*x[1] + ((0.101619464538+0.545091809721j))*x[2]
            ref[(3, 2, 2, 0)]=(-0.243383390646+0.716531876403j)
            arg[(3, 2, 2, 1)]=(0.216359692809+0.587567756493j)*x[0] + ((-0.327121486148+0.316681745334j))*x[1] + ((-0.0454691411709-0.559498790402j))*x[2]
            ref[(3, 2, 2, 1)]=(-0.0781154672551+0.172375355713j)
            arg[(3, 2, 2, 2)]=(0.814698056612+0.773956760184j)*x[0] + ((-0.741553586157-0.445823837097j))*x[1] + ((-0.717942597424-0.57908167388j))*x[2]
            ref[(3, 2, 2, 2)]=(-0.322399063484-0.125474375396j)
            arg[(3, 2, 2, 3)]=(0.203583822321-0.1063859966j)*x[0] + ((-0.46515842409+0.595710158451j))*x[1] + ((-0.111793540656-0.815362976302j))*x[2]
            ref[(3, 2, 2, 3)]=(-0.186684071213-0.163019407225j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.446564213116-0.331912376372j)*x[0]**o + ((0.0132580443004+0.139363334498j))*x[0] + ((0.777978493326+0.811955084055j))*x[1]**o + ((0.857555579748-0.75988970807j))*x[1]
            ref=(0.777978493326+0.811955084055j)/(o+1.)+((0.435406812024-0.310263186786j))+((0.446564213116-0.331912376372j))*0.5**o
        else:
            arg=(-0.206774985052-0.657819503486j)*x[0]**o + ((0.776484797638-0.302055943865j))*x[0] + ((0.269148776288-0.0720781474159j))*x[1]**o + ((-0.66387960584-0.365445134986j))*x[1] + ((0.648919471259-0.498419963149j))*x[2]**o + ((0.089751532437+0.535079773061j))*x[2]
            ref=(0.918068247547-0.570498110565j)/(o+1.)+((0.101178362117-0.0662106528952j))+((-0.206774985052-0.657819503486j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.423899854753+0.458150119571j)*x[0]**o + ((-0.608664018883-0.151580395943j))*x[0] + ((-0.0790267922502-0.90753631629j))*x[1]**o + ((0.351539383724+0.975185506497j))*x[1]
            ref[(0,)]=(-0.0790267922502-0.90753631629j)/(o+1.)+((-0.128562317579+0.411802555277j))+((0.423899854753+0.458150119571j))*0.5**o
            arg[(1,)]=(0.617185886997-0.665251128405j)*x[0]**o + ((-0.817970495019+0.4231682981j))*x[0] + ((0.169272207493-0.895294740977j))*x[1]**o + ((-0.878244014582-0.616066482165j))*x[1]
            ref[(1,)]=(0.169272207493-0.895294740977j)/(o+1.)+((-0.8481072548-0.0964490920326j))+((0.617185886997-0.665251128405j))*0.5**o
            arg[(2,)]=(-0.402196571343+0.218977521733j)*x[0]**o + ((-0.797420026073+0.0119771224618j))*x[0] + ((0.956767423277-0.927976173055j))*x[1]**o + ((-0.344827261639-0.862894463559j))*x[1]
            ref[(2,)]=(0.956767423277-0.927976173055j)/(o+1.)+((-0.571123643856-0.425458670548j))+((-0.402196571343+0.218977521733j))*0.5**o
        else:
            arg[(0,)]=(0.603504298827-0.593805066986j)*x[0]**o + ((-0.785270984205-0.438365675778j))*x[0] + ((-0.178446477095+0.30504718628j))*x[1]**o + ((-0.428609020463+0.0875158510002j))*x[1] + ((-0.756219147378+0.715003141253j))*x[2]**o + ((0.524402051739-0.641967249342j))*x[2]
            ref[(0,)]=(-0.934665624473+1.02005032753j)/(o+1.)+((-0.344738976464-0.49640853706j))+((0.603504298827-0.593805066986j))*0.5**o
            arg[(1,)]=(-0.880497083841-0.258981095359j)*x[0]**o + ((-0.583888910444-0.0981851210505j))*x[0] + ((-0.156378744394+0.0670968239367j))*x[1]**o + ((-0.105592228583-0.232917248739j))*x[1] + ((0.009328591423-0.760478029219j))*x[2]**o + ((-0.394826269754+0.950611820038j))*x[2]
            ref[(1,)]=(-0.147050152971-0.693381205282j)/(o+1.)+((-0.54215370439+0.309754725124j))+((-0.880497083841-0.258981095359j))*0.5**o
            arg[(2,)]=(0.70381878172-0.790640203623j)*x[0]**o + ((0.90808732505-0.916033310271j))*x[0] + ((0.72885913276-0.941787307018j))*x[1]**o + ((-0.548198835912+0.520063118788j))*x[1] + ((0.665371466069+0.246168923824j))*x[2]**o + ((0.751963576088-0.0320744966868j))*x[2]
            ref[(2,)]=(1.39423059883-0.695618383193j)/(o+1.)+((0.555926032613-0.214022344085j))+((0.70381878172-0.790640203623j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.89964785509-0.0515171798265j)*x[0]**o + ((-0.953425801086+0.573107894318j))*x[0] + ((-0.283554151106+0.565693679861j))*x[1]**o + ((0.253478318964-0.366178075751j))*x[1]
            ref[(0, 0)]=(-0.283554151106+0.565693679861j)/(o+1.)+((-0.349973741061+0.103464909284j))+((-0.89964785509-0.0515171798265j))*0.5**o
            arg[(0, 1)]=(-0.43118193194+0.546287021789j)*x[0]**o + ((-0.907000236687-0.881578457725j))*x[0] + ((-0.196673213059-0.735907589267j))*x[1]**o + ((0.712737332577-0.239262294022j))*x[1]
            ref[(0, 1)]=(-0.196673213059-0.735907589267j)/(o+1.)+((-0.0971314520548-0.560420375873j))+((-0.43118193194+0.546287021789j))*0.5**o
            arg[(0, 2)]=(0.0336770446872-0.0107454470561j)*x[0]**o + ((-0.523769312188+0.393216201098j))*x[0] + ((-0.970189645541-0.357629425681j))*x[1]**o + ((-0.0844222345665+0.791643767561j))*x[1]
            ref[(0, 2)]=(-0.970189645541-0.357629425681j)/(o+1.)+((-0.304095773377+0.59242998433j))+((0.0336770446872-0.0107454470561j))*0.5**o
            arg[(1, 0)]=(-0.507975842547-0.248146888532j)*x[0]**o + ((0.0079197472177-0.31026237569j))*x[0] + ((0.824961575746+0.141675695457j))*x[1]**o + ((-0.351032547092+0.361158094799j))*x[1]
            ref[(1, 0)]=(0.824961575746+0.141675695457j)/(o+1.)+((-0.171556399937+0.0254478595548j))+((-0.507975842547-0.248146888532j))*0.5**o
            arg[(1, 1)]=(-0.829378645538-0.619125327454j)*x[0]**o + ((-0.905219069348+0.407500434892j))*x[0] + ((-0.562757091585-0.605753940588j))*x[1]**o + ((-0.528834510528-0.848795275984j))*x[1]
            ref[(1, 1)]=(-0.562757091585-0.605753940588j)/(o+1.)+((-0.717026789938-0.220647420546j))+((-0.829378645538-0.619125327454j))*0.5**o
            arg[(1, 2)]=(0.650369695878-0.115948781899j)*x[0]**o + ((0.25874198759-0.0331097801043j))*x[0] + ((0.661080561178-0.660602845467j))*x[1]**o + ((-0.500815100717-0.0909039245359j))*x[1]
            ref[(1, 2)]=(0.661080561178-0.660602845467j)/(o+1.)+((-0.121036556563-0.0620068523201j))+((0.650369695878-0.115948781899j))*0.5**o
            arg[(2, 0)]=(-0.466874073661-0.391140444247j)*x[0]**o + ((-0.685760252399-0.0054734008586j))*x[0] + ((-0.235051688972-0.948367288845j))*x[1]**o + ((-0.312069042343+0.0269675529145j))*x[1]
            ref[(2, 0)]=(-0.235051688972-0.948367288845j)/(o+1.)+((-0.498914647371+0.010747076028j))+((-0.466874073661-0.391140444247j))*0.5**o
            arg[(2, 1)]=(-0.651541575589+0.492098542666j)*x[0]**o + ((-0.237955940432+0.706398825638j))*x[0] + ((-0.5107363818+0.522284382654j))*x[1]**o + ((-0.0947032269274+0.693687511679j))*x[1]
            ref[(2, 1)]=(-0.5107363818+0.522284382654j)/(o+1.)+((-0.16632958368+0.700043168658j))+((-0.651541575589+0.492098542666j))*0.5**o
            arg[(2, 2)]=(0.957330439778-0.73221575578j)*x[0]**o + ((-0.784287827277+0.875935035243j))*x[0] + ((-0.0254235322029-0.891481964576j))*x[1]**o + ((0.61623759734+0.416489000602j))*x[1]
            ref[(2, 2)]=(-0.0254235322029-0.891481964576j)/(o+1.)+((-0.0840251149687+0.646212017922j))+((0.957330439778-0.73221575578j))*0.5**o
        else:
            arg[(0, 0)]=(-0.0596542695643-0.469271016786j)*x[0]**o + ((-0.151028132163-0.0676598818931j))*x[0] + ((-0.226928880121-0.381707137701j))*x[1]**o + ((-0.918066743744-0.711672796353j))*x[1] + ((-0.0963692121425+0.323466329213j))*x[2]**o + ((0.463259276735+0.291720476773j))*x[2]
            ref[(0, 0)]=(-0.323298092264-0.0582408084884j)/(o+1.)+((-0.302917799585-0.243806100737j))+((-0.0596542695643-0.469271016786j))*0.5**o
            arg[(0, 1)]=(-0.460717840631+0.431395765987j)*x[0]**o + ((0.639888831169+0.781482500878j))*x[0] + ((0.44088049068+0.910135261613j))*x[1]**o + ((-0.0659168434166+0.0430561235976j))*x[1] + ((0.658503075094+0.93805068057j))*x[2]**o + ((-0.638023516413+0.0126215692469j))*x[2]
            ref[(0, 1)]=(1.09938356577+1.84818594218j)/(o+1.)+((-0.0320257643306+0.418580096861j))+((-0.460717840631+0.431395765987j))*0.5**o
            arg[(0, 2)]=(0.967049264004-0.787328583344j)*x[0]**o + ((-0.623009523553+0.115750080897j))*x[0] + ((-0.475048151785-0.306884141783j))*x[1]**o + ((-0.0387131259864-0.198699575721j))*x[1] + ((-0.904010350755+0.547907205829j))*x[2]**o + ((-0.614782668741-0.127767446105j))*x[2]
            ref[(0, 2)]=(-1.37905850254+0.241023064045j)/(o+1.)+((-0.638252659141-0.105358470464j))+((0.967049264004-0.787328583344j))*0.5**o
            arg[(1, 0)]=(-0.254191628706-0.741630125506j)*x[0]**o + ((0.376993588981+0.266886471725j))*x[0] + ((0.204686530451-0.840775784068j))*x[1]**o + ((-0.320417206836-0.00411603141849j))*x[1] + ((0.766386145287+0.789427416816j))*x[2]**o + ((-0.656481346833-0.650382831987j))*x[2]
            ref[(1, 0)]=(0.971072675739-0.0513483672516j)/(o+1.)+((-0.299952482344-0.193806195841j))+((-0.254191628706-0.741630125506j))*0.5**o
            arg[(1, 1)]=(0.00306176030658+0.554741051173j)*x[0]**o + ((-0.64251525141+0.391160343484j))*x[0] + ((0.160037624613+0.871034376987j))*x[1]**o + ((0.166718075065+0.676117572215j))*x[1] + ((0.717199840318-0.621689122445j))*x[2]**o + ((0.513711678516+0.271176840777j))*x[2]
            ref[(1, 1)]=(0.87723746493+0.249345254542j)/(o+1.)+((0.0189572510852+0.669227378238j))+((0.00306176030658+0.554741051173j))*0.5**o
            arg[(1, 2)]=(-0.721900780956-0.996254838518j)*x[0]**o + ((-0.505860267234-0.71860408466j))*x[0] + ((0.936172096229-0.683769953797j))*x[1]**o + ((-0.628900486022-0.417454762979j))*x[1] + ((-0.688082981125-0.634984258117j))*x[2]**o + ((0.909173344875-0.824896503994j))*x[2]
            ref[(1, 2)]=(0.248089115104-1.31875421191j)/(o+1.)+((-0.11279370419-0.980477675816j))+((-0.721900780956-0.996254838518j))*0.5**o
            arg[(2, 0)]=(-0.753280199103+0.954768454703j)*x[0]**o + ((-0.921576295098+0.526737889695j))*x[0] + ((0.438220615072-0.214826593905j))*x[1]**o + ((0.85677817413-0.456668949796j))*x[1] + ((-0.181912954041-0.510489383898j))*x[2]**o + ((-0.0549214352435+0.474456465421j))*x[2]
            ref[(2, 0)]=(0.25630766103-0.725315977803j)/(o+1.)+((-0.0598597781058+0.27226270266j))+((-0.753280199103+0.954768454703j))*0.5**o
            arg[(2, 1)]=(0.393475680122+0.822476037747j)*x[0]**o + ((-0.557178985527-0.938103820807j))*x[0] + ((-0.209018508171-0.397860668456j))*x[1]**o + ((0.14157379756-0.328698862564j))*x[1] + ((-0.864527845957-0.922669900685j))*x[2]**o + ((-0.362648574135+0.0314123102678j))*x[2]
            ref[(2, 1)]=(-1.07354635413-1.32053056914j)/(o+1.)+((-0.389126881051-0.617695186552j))+((0.393475680122+0.822476037747j))*0.5**o
            arg[(2, 2)]=(0.111274456357+0.490752456346j)*x[0]**o + ((0.237315588272-0.639511430671j))*x[0] + ((-0.247458288925-0.534630911509j))*x[1]**o + ((0.164196960115-0.899580464931j))*x[1] + ((-0.0310467603962+0.502629107495j))*x[2]**o + ((0.50127836656-0.961152569131j))*x[2]
            ref[(2, 2)]=(-0.278505049321-0.0320018040144j)/(o+1.)+((0.451395457474-1.25012223237j))+((0.111274456357+0.490752456346j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref=numpy.zeros((4, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.537802431801+0.762406890398j)*x[0]**o + ((0.796940963519-0.0486338628111j))*x[0] + ((0.677651954708-0.740664139385j))*x[1]**o + ((-0.746285170504-0.210421458654j))*x[1]
            ref[(0, 0, 0)]=(0.677651954708-0.740664139385j)/(o+1.)+((0.0253278965075-0.129527660733j))+((-0.537802431801+0.762406890398j))*0.5**o
            arg[(0, 0, 1)]=(-0.827739808205+0.371637718755j)*x[0]**o + ((0.237130216046-0.0643915676092j))*x[0] + ((-0.500469928746-0.248106597233j))*x[1]**o + ((0.851708509136-0.830167597385j))*x[1]
            ref[(0, 0, 1)]=(-0.500469928746-0.248106597233j)/(o+1.)+((0.544419362591-0.447279582497j))+((-0.827739808205+0.371637718755j))*0.5**o
            arg[(0, 0, 2)]=(0.49663277546-0.451136680936j)*x[0]**o + ((0.202508745724+0.215646166797j))*x[0] + ((0.493692912248+0.883930999861j))*x[1]**o + ((0.260566969044-0.856822203049j))*x[1]
            ref[(0, 0, 2)]=(0.493692912248+0.883930999861j)/(o+1.)+((0.231537857384-0.320588018126j))+((0.49663277546-0.451136680936j))*0.5**o
            arg[(0, 0, 3)]=(0.337179796732+0.554239035111j)*x[0]**o + ((-0.198587005699+0.767411426477j))*x[0] + ((-0.937527587098+0.103166539381j))*x[1]**o + ((-0.562838017053+0.585831991618j))*x[1]
            ref[(0, 0, 3)]=(-0.937527587098+0.103166539381j)/(o+1.)+((-0.380712511376+0.676621709047j))+((0.337179796732+0.554239035111j))*0.5**o
            arg[(0, 1, 0)]=(-0.447953607074-0.323141163998j)*x[0]**o + ((-0.427980562408-0.567592487714j))*x[0] + ((0.537257041031-0.987034600654j))*x[1]**o + ((0.249384435422-0.224144029534j))*x[1]
            ref[(0, 1, 0)]=(0.537257041031-0.987034600654j)/(o+1.)+((-0.089298063493-0.395868258624j))+((-0.447953607074-0.323141163998j))*0.5**o
            arg[(0, 1, 1)]=(-0.165137177884-0.963929055304j)*x[0]**o + ((0.560807452899-0.117036931334j))*x[0] + ((0.143791128628+0.674195760904j))*x[1]**o + ((0.561695454755-0.21506220957j))*x[1]
            ref[(0, 1, 1)]=(0.143791128628+0.674195760904j)/(o+1.)+((0.561251453827-0.166049570452j))+((-0.165137177884-0.963929055304j))*0.5**o
            arg[(0, 1, 2)]=(0.642732172621+0.949919625591j)*x[0]**o + ((0.365083944306+0.042472922423j))*x[0] + ((0.801418376599+0.764947656204j))*x[1]**o + ((-0.821299019571+0.331754980501j))*x[1]
            ref[(0, 1, 2)]=(0.801418376599+0.764947656204j)/(o+1.)+((-0.228107537633+0.187113951462j))+((0.642732172621+0.949919625591j))*0.5**o
            arg[(0, 1, 3)]=(0.883846126028-0.994657477164j)*x[0]**o + ((-0.461301961526-0.0029516056974j))*x[0] + ((0.51674063309+0.282128279284j))*x[1]**o + ((-0.17345501701-0.507573747232j))*x[1]
            ref[(0, 1, 3)]=(0.51674063309+0.282128279284j)/(o+1.)+((-0.317378489268-0.255262676465j))+((0.883846126028-0.994657477164j))*0.5**o
            arg[(1, 0, 0)]=(0.662160103185-0.94912012378j)*x[0]**o + ((0.846665190908+0.967970168102j))*x[0] + ((0.17497204567+0.786498736098j))*x[1]**o + ((-0.561198250971-0.794910792121j))*x[1]
            ref[(1, 0, 0)]=(0.17497204567+0.786498736098j)/(o+1.)+((0.142733469968+0.0865296879902j))+((0.662160103185-0.94912012378j))*0.5**o
            arg[(1, 0, 1)]=(-0.468926270654-0.435895944897j)*x[0]**o + ((-0.766659088076-0.621539343792j))*x[0] + ((0.191856226412+0.471368284689j))*x[1]**o + ((-0.706422129738+0.683257044645j))*x[1]
            ref[(1, 0, 1)]=(0.191856226412+0.471368284689j)/(o+1.)+((-0.736540608907+0.0308588504265j))+((-0.468926270654-0.435895944897j))*0.5**o
            arg[(1, 0, 2)]=(-0.857235148874-0.442187776913j)*x[0]**o + ((0.250828704383+0.405729615483j))*x[0] + ((-0.538700112989-0.528025322496j))*x[1]**o + ((-0.0955075963645-0.507374567245j))*x[1]
            ref[(1, 0, 2)]=(-0.538700112989-0.528025322496j)/(o+1.)+((0.0776605540093-0.0508224758809j))+((-0.857235148874-0.442187776913j))*0.5**o
            arg[(1, 0, 3)]=(0.143674467142+0.412890861144j)*x[0]**o + ((-0.588238953866-0.70254233008j))*x[0] + ((0.644545079408-0.0385220027514j))*x[1]**o + ((-0.46511473973+0.00635357442365j))*x[1]
            ref[(1, 0, 3)]=(0.644545079408-0.0385220027514j)/(o+1.)+((-0.526676846798-0.348094377828j))+((0.143674467142+0.412890861144j))*0.5**o
            arg[(1, 1, 0)]=(-0.575031322138-0.258915787415j)*x[0]**o + ((-0.475994487086-0.137195856419j))*x[0] + ((-0.776457797245+0.706463175958j))*x[1]**o + ((0.621007609945-0.600067181868j))*x[1]
            ref[(1, 1, 0)]=(-0.776457797245+0.706463175958j)/(o+1.)+((0.0725065614296-0.368631519143j))+((-0.575031322138-0.258915787415j))*0.5**o
            arg[(1, 1, 1)]=(-0.254859255772-0.554096620494j)*x[0]**o + ((-0.197061133805-0.679477082704j))*x[0] + ((-0.243933109624+0.44193673684j))*x[1]**o + ((-0.0455549691446-0.185081578491j))*x[1]
            ref[(1, 1, 1)]=(-0.243933109624+0.44193673684j)/(o+1.)+((-0.121308051475-0.432279330598j))+((-0.254859255772-0.554096620494j))*0.5**o
            arg[(1, 1, 2)]=(0.597936929784+0.425810798225j)*x[0]**o + ((0.365426933651-0.506971704536j))*x[0] + ((0.450045541695-0.166474497591j))*x[1]**o + ((0.333931589177-0.294522231032j))*x[1]
            ref[(1, 1, 2)]=(0.450045541695-0.166474497591j)/(o+1.)+((0.349679261414-0.400746967784j))+((0.597936929784+0.425810798225j))*0.5**o
            arg[(1, 1, 3)]=(0.844802729532-0.00390619761141j)*x[0]**o + ((0.618368589215-0.0399427849595j))*x[0] + ((0.383503056877-0.444745598425j))*x[1]**o + ((0.628055083429-0.156748282211j))*x[1]
            ref[(1, 1, 3)]=(0.383503056877-0.444745598425j)/(o+1.)+((0.623211836322-0.0983455335852j))+((0.844802729532-0.00390619761141j))*0.5**o
            arg[(2, 0, 0)]=(0.180196693978+0.70689708997j)*x[0]**o + ((0.568983314752+0.805812180096j))*x[0] + ((-0.720172928376-0.433422496144j))*x[1]**o + ((0.655170199737+0.39962262744j))*x[1]
            ref[(2, 0, 0)]=(-0.720172928376-0.433422496144j)/(o+1.)+((0.612076757244+0.602717403768j))+((0.180196693978+0.70689708997j))*0.5**o
            arg[(2, 0, 1)]=(-0.309487597898-0.0402449553446j)*x[0]**o + ((-0.615649386973-0.347241677082j))*x[0] + ((-0.778798414099-0.747092681499j))*x[1]**o + ((0.318237801485+0.101915944221j))*x[1]
            ref[(2, 0, 1)]=(-0.778798414099-0.747092681499j)/(o+1.)+((-0.148705792744-0.12266286643j))+((-0.309487597898-0.0402449553446j))*0.5**o
            arg[(2, 0, 2)]=(-0.169136833224+0.254892844402j)*x[0]**o + ((-0.0751064403165-0.605333221219j))*x[0] + ((-0.772092599817-0.0439137308382j))*x[1]**o + ((-0.406581788997-0.818907238637j))*x[1]
            ref[(2, 0, 2)]=(-0.772092599817-0.0439137308382j)/(o+1.)+((-0.240844114657-0.712120229928j))+((-0.169136833224+0.254892844402j))*0.5**o
            arg[(2, 0, 3)]=(-0.881989409632-0.123993336491j)*x[0]**o + ((-0.910621314754-0.0267770029441j))*x[0] + ((0.931959770739-0.138747514765j))*x[1]**o + ((-0.550422594285+0.214497197602j))*x[1]
            ref[(2, 0, 3)]=(0.931959770739-0.138747514765j)/(o+1.)+((-0.73052195452+0.0938600973291j))+((-0.881989409632-0.123993336491j))*0.5**o
            arg[(2, 1, 0)]=(0.188678361913-0.734782203097j)*x[0]**o + ((0.57657081719+0.758299079903j))*x[0] + ((0.278151465629-0.164562951976j))*x[1]**o + ((0.894019706679+0.659331820786j))*x[1]
            ref[(2, 1, 0)]=(0.278151465629-0.164562951976j)/(o+1.)+((0.735295261934+0.708815450345j))+((0.188678361913-0.734782203097j))*0.5**o
            arg[(2, 1, 1)]=(-0.93814469207+0.0693029403358j)*x[0]**o + ((-0.379207576209-0.719118329483j))*x[0] + ((0.6967407928-0.481637362591j))*x[1]**o + ((-0.247565940704+0.182005697648j))*x[1]
            ref[(2, 1, 1)]=(0.6967407928-0.481637362591j)/(o+1.)+((-0.313386758457-0.268556315918j))+((-0.93814469207+0.0693029403358j))*0.5**o
            arg[(2, 1, 2)]=(-0.0446271102633+0.257041503366j)*x[0]**o + ((0.503517410327+0.446520537887j))*x[0] + ((-0.267219965285+0.676869763692j))*x[1]**o + ((0.616895486933+0.0913528286973j))*x[1]
            ref[(2, 1, 2)]=(-0.267219965285+0.676869763692j)/(o+1.)+((0.56020644863+0.268936683292j))+((-0.0446271102633+0.257041503366j))*0.5**o
            arg[(2, 1, 3)]=(-0.389650446882+0.328245763464j)*x[0]**o + ((-0.302719959745+0.748115424571j))*x[0] + ((-0.35825752502+0.223528666742j))*x[1]**o + ((0.212770158312-0.258795765407j))*x[1]
            ref[(2, 1, 3)]=(-0.35825752502+0.223528666742j)/(o+1.)+((-0.0449749007164+0.244659829582j))+((-0.389650446882+0.328245763464j))*0.5**o
            arg[(3, 0, 0)]=(-0.200881848328-0.560560748579j)*x[0]**o + ((-0.843268265104-0.469838618183j))*x[0] + ((0.785885349756+0.751284857093j))*x[1]**o + ((0.850386704137-0.80382068054j))*x[1]
            ref[(3, 0, 0)]=(0.785885349756+0.751284857093j)/(o+1.)+((0.00355921951662-0.636829649362j))+((-0.200881848328-0.560560748579j))*0.5**o
            arg[(3, 0, 1)]=(0.756454183624-0.246284130434j)*x[0]**o + ((-0.724832316785+0.967303756171j))*x[0] + ((-0.557610718399-0.638492188857j))*x[1]**o + ((-0.28684648996-0.497926582096j))*x[1]
            ref[(3, 0, 1)]=(-0.557610718399-0.638492188857j)/(o+1.)+((-0.505839403373+0.234688587037j))+((0.756454183624-0.246284130434j))*0.5**o
            arg[(3, 0, 2)]=(-0.442828187868-0.61009121831j)*x[0]**o + ((0.0455443754378+0.943285035975j))*x[0] + ((-0.688702303752+0.559832827346j))*x[1]**o + ((0.422025223297-0.597292626402j))*x[1]
            ref[(3, 0, 2)]=(-0.688702303752+0.559832827346j)/(o+1.)+((0.233784799368+0.172996204787j))+((-0.442828187868-0.61009121831j))*0.5**o
            arg[(3, 0, 3)]=(0.00272026520521+0.916790910848j)*x[0]**o + ((-0.540760808829-0.257788197077j))*x[0] + ((-0.20951523358+0.0123013663121j))*x[1]**o + ((-0.689623305449+0.305962080734j))*x[1]
            ref[(3, 0, 3)]=(-0.20951523358+0.0123013663121j)/(o+1.)+((-0.615192057139+0.0240869418287j))+((0.00272026520521+0.916790910848j))*0.5**o
            arg[(3, 1, 0)]=(0.458950708072-0.827718169485j)*x[0]**o + ((0.614204461-0.925208998921j))*x[0] + ((0.334449344627-0.94793490604j))*x[1]**o + ((0.520588524083-0.0810165434055j))*x[1]
            ref[(3, 1, 0)]=(0.334449344627-0.94793490604j)/(o+1.)+((0.567396492541-0.503112771163j))+((0.458950708072-0.827718169485j))*0.5**o
            arg[(3, 1, 1)]=(-0.465878713743+0.407654899813j)*x[0]**o + ((0.89010860678-0.440406926475j))*x[0] + ((-0.336773373782+0.288715795408j))*x[1]**o + ((0.696253050272-0.134429447921j))*x[1]
            ref[(3, 1, 1)]=(-0.336773373782+0.288715795408j)/(o+1.)+((0.793180828526-0.287418187198j))+((-0.465878713743+0.407654899813j))*0.5**o
            arg[(3, 1, 2)]=(-0.0869218809509+0.171547144638j)*x[0]**o + ((0.380461914549+0.144370882641j))*x[0] + ((-0.852055496709-0.221497581094j))*x[1]**o + ((0.256966603548-0.357451546202j))*x[1]
            ref[(3, 1, 2)]=(-0.852055496709-0.221497581094j)/(o+1.)+((0.318714259048-0.10654033178j))+((-0.0869218809509+0.171547144638j))*0.5**o
            arg[(3, 1, 3)]=(0.533179700386+0.625156913371j)*x[0]**o + ((0.391495350773-0.458577188207j))*x[0] + ((-0.0801158247425-0.756127096017j))*x[1]**o + ((0.296301136886+0.34854655245j))*x[1]
            ref[(3, 1, 3)]=(-0.0801158247425-0.756127096017j)/(o+1.)+((0.343898243829-0.0550153178788j))+((0.533179700386+0.625156913371j))*0.5**o
        else:
            arg[(0, 0, 0)]=(0.0455697424396+0.51042872618j)*x[0]**o + ((-0.512941822687-0.460035724933j))*x[0] + ((-0.727574404704+0.25252497815j))*x[1]**o + ((0.575429214968+0.900840728416j))*x[1] + ((0.0342704843791+0.115713443584j))*x[2]**o + ((-0.608479915428+0.394163923544j))*x[2]
            ref[(0, 0, 0)]=(-0.693303920325+0.368238421735j)/(o+1.)+((-0.272996261574+0.417484463513j))+((0.0455697424396+0.51042872618j))*0.5**o
            arg[(0, 0, 1)]=(0.467745323756-0.658311661537j)*x[0]**o + ((-0.624872093914-0.217611635815j))*x[0] + ((-0.0167085248768-0.75863342916j))*x[1]**o + ((0.718887100542-0.015344335396j))*x[1] + ((0.129485068162-0.414925883954j))*x[2]**o + ((-0.91074474304+0.725005619769j))*x[2]
            ref[(0, 0, 1)]=(0.112776543286-1.17355931311j)/(o+1.)+((-0.408364868206+0.246024824279j))+((0.467745323756-0.658311661537j))*0.5**o
            arg[(0, 0, 2)]=(-0.996329589468+0.420024794592j)*x[0]**o + ((0.00539098700884-0.455671147076j))*x[0] + ((-0.326571584303+0.112642344524j))*x[1]**o + ((-0.457034006105-0.716723146286j))*x[1] + ((0.0608739872911+0.0438036514457j))*x[2]**o + ((0.546542858198+0.922820462268j))*x[2]
            ref[(0, 0, 2)]=(-0.265697597012+0.15644599597j)/(o+1.)+((0.0474499195514-0.124786915547j))+((-0.996329589468+0.420024794592j))*0.5**o
            arg[(0, 0, 3)]=(-0.430492394068+0.579896835622j)*x[0]**o + ((0.927142406672+0.334320519456j))*x[0] + ((0.838151570176-0.68825820258j))*x[1]**o + ((0.970862500865-0.573723479383j))*x[1] + ((0.217583351253-0.863951254346j))*x[2]**o + ((0.133401071152-0.0458489794117j))*x[2]
            ref[(0, 0, 3)]=(1.05573492143-1.55220945693j)/(o+1.)+((1.01570298934-0.142625969669j))+((-0.430492394068+0.579896835622j))*0.5**o
            arg[(0, 1, 0)]=(0.16781692318-0.900692891601j)*x[0]**o + ((0.778992910227+0.985565263543j))*x[0] + ((0.446651670515-0.748600205266j))*x[1]**o + ((-0.755036032303+0.626022946437j))*x[1] + ((-0.579077441471+0.188446161059j))*x[2]**o + ((-0.0109084977918-0.838989444943j))*x[2]
            ref[(0, 1, 0)]=(-0.132425770956-0.560154044208j)/(o+1.)+((0.00652419006605+0.386299382518j))+((0.16781692318-0.900692891601j))*0.5**o
            arg[(0, 1, 1)]=(-0.943025955793-0.11926375247j)*x[0]**o + ((0.173790949564+0.326501291307j))*x[0] + ((-0.730064409347+0.987702336528j))*x[1]**o + ((-0.235546519069+0.970984556267j))*x[1] + ((0.819426054609+0.260302428057j))*x[2]**o + ((-0.965047172548+0.889030522064j))*x[2]
            ref[(0, 1, 1)]=(0.0893616452615+1.24800476458j)/(o+1.)+((-0.513401371027+1.09325818482j))+((-0.943025955793-0.11926375247j))*0.5**o
            arg[(0, 1, 2)]=(-0.732072243549+0.104870658506j)*x[0]**o + ((0.184754891772+0.80867528496j))*x[0] + ((-0.391629759293+0.233882122299j))*x[1]**o + ((-0.951083763885-0.117569580081j))*x[1] + ((0.0398989354949+0.476199527892j))*x[2]**o + ((-0.328384932801+0.438479267667j))*x[2]
            ref[(0, 1, 2)]=(-0.351730823798+0.710081650191j)/(o+1.)+((-0.547356902457+0.564792486273j))+((-0.732072243549+0.104870658506j))*0.5**o
            arg[(0, 1, 3)]=(0.111895797723-0.443278451881j)*x[0]**o + ((-0.23057063988-0.926575665572j))*x[0] + ((0.405919057441-0.183634760688j))*x[1]**o + ((-0.33880077811-0.693303996144j))*x[1] + ((0.570881122184-0.416864397101j))*x[2]**o + ((0.968164643553+0.0289194082792j))*x[2]
            ref[(0, 1, 3)]=(0.976800179625-0.600499157789j)/(o+1.)+((0.199396612781-0.795480126718j))+((0.111895797723-0.443278451881j))*0.5**o
            arg[(1, 0, 0)]=(0.25980916933+0.857763622617j)*x[0]**o + ((0.0357446953725-0.0299976295499j))*x[0] + ((0.971605245988+0.281116914086j))*x[1]**o + ((-0.14174524522-0.0474284846757j))*x[1] + ((0.0312441904602-0.575993766378j))*x[2]**o + ((-0.191844368153-0.654710556631j))*x[2]
            ref[(1, 0, 0)]=(1.00284943645-0.294876852291j)/(o+1.)+((-0.148922459-0.366068335428j))+((0.25980916933+0.857763622617j))*0.5**o
            arg[(1, 0, 1)]=(0.5741838859+0.886019030139j)*x[0]**o + ((0.731638090036+0.51913632299j))*x[0] + ((-0.144400758916-0.740366954326j))*x[1]**o + ((0.939105889637-0.0308350073937j))*x[1] + ((0.673296259679+0.631010327636j))*x[2]**o + ((-0.865934536577-0.0734116231288j))*x[2]
            ref[(1, 0, 1)]=(0.528895500763-0.10935662669j)/(o+1.)+((0.402404721548+0.207444846234j))+((0.5741838859+0.886019030139j))*0.5**o
            arg[(1, 0, 2)]=(-0.671714706058+0.994760628333j)*x[0]**o + ((0.405783919764+0.867384434444j))*x[0] + ((-0.0948125798482-0.518535849646j))*x[1]**o + ((-0.810522751313+0.869118321634j))*x[1] + ((0.886380464242+0.916474273643j))*x[2]**o + ((-0.462601755731+0.137840811386j))*x[2]
            ref[(1, 0, 2)]=(0.791567884394+0.397938423997j)/(o+1.)+((-0.43367029364+0.937171783732j))+((-0.671714706058+0.994760628333j))*0.5**o
            arg[(1, 0, 3)]=(0.502448871173+0.114108640909j)*x[0]**o + ((0.582665779976+0.948708295308j))*x[0] + ((-0.94533753853+0.90008670287j))*x[1]**o + ((-0.739100756414-0.0606587181676j))*x[1] + ((-0.879086316359+0.386772949101j))*x[2]**o + ((0.847482140219+0.544718597475j))*x[2]
            ref[(1, 0, 3)]=(-1.82442385489+1.28685965197j)/(o+1.)+((0.34552358189+0.716384087308j))+((0.502448871173+0.114108640909j))*0.5**o
            arg[(1, 1, 0)]=(0.965957279402+0.400499720326j)*x[0]**o + ((-0.162263101357+0.290422903927j))*x[0] + ((0.724356351656-0.957137182648j))*x[1]**o + ((-0.0985856889521+0.396696475704j))*x[1] + ((0.35236835371+0.105082477847j))*x[2]**o + ((0.425893912636-0.625087392797j))*x[2]
            ref[(1, 1, 0)]=(1.07672470537-0.852054704801j)/(o+1.)+((0.0825225611632+0.0310159934172j))+((0.965957279402+0.400499720326j))*0.5**o
            arg[(1, 1, 1)]=(0.635635631416-0.192246064223j)*x[0]**o + ((0.606447160609-0.442094455646j))*x[0] + ((-0.212914376355+0.135588561655j))*x[1]**o + ((-0.476679236639-0.86781590721j))*x[1] + ((-0.0645454310503-0.694382133189j))*x[2]**o + ((0.318414652201+0.727755311277j))*x[2]
            ref[(1, 1, 1)]=(-0.277459807405-0.558793571534j)/(o+1.)+((0.224091288086-0.291077525789j))+((0.635635631416-0.192246064223j))*0.5**o
            arg[(1, 1, 2)]=(0.702759372874+0.612689004259j)*x[0]**o + ((0.609159605683+0.309234322318j))*x[0] + ((0.980267804095+0.979913789849j))*x[1]**o + ((0.8140187573-0.669668157447j))*x[1] + ((-0.190068481624+0.325659622191j))*x[2]**o + ((-0.0855157631847+0.716113458244j))*x[2]
            ref[(1, 1, 2)]=(0.790199322471+1.30557341204j)/(o+1.)+((0.668831299899+0.177839811557j))+((0.702759372874+0.612689004259j))*0.5**o
            arg[(1, 1, 3)]=(0.980932145201-0.0566733679744j)*x[0]**o + ((0.223459101209+0.571587088017j))*x[0] + ((0.522531281727+0.43756978582j))*x[1]**o + ((0.838478370863+0.439591395437j))*x[1] + ((0.815883694701+0.298556210683j))*x[2]**o + ((0.313128635874-0.847296460538j))*x[2]
            ref[(1, 1, 3)]=(1.33841497643+0.736125996502j)/(o+1.)+((0.687533053973+0.0819410114577j))+((0.980932145201-0.0566733679744j))*0.5**o
            arg[(2, 0, 0)]=(-0.156077411124-0.903814153912j)*x[0]**o + ((-0.0196859316159+0.450024443277j))*x[0] + ((0.34093981078+0.326565491956j))*x[1]**o + ((0.790437899693-0.674920100208j))*x[1] + ((-0.679118309595+0.612678896617j))*x[2]**o + ((-0.770242119343-0.426066051347j))*x[2]
            ref[(2, 0, 0)]=(-0.338178498816+0.939244388574j)/(o+1.)+((0.000254924367255-0.325480854139j))+((-0.156077411124-0.903814153912j))*0.5**o
            arg[(2, 0, 1)]=(-0.947020448998+0.196199868657j)*x[0]**o + ((0.921867203393+0.106455460744j))*x[0] + ((-0.0361506298513-0.729656511636j))*x[1]**o + ((-0.693660213961-0.562295804131j))*x[1] + ((0.144800723946+0.534163298673j))*x[2]**o + ((-0.622364453581-0.510497822841j))*x[2]
            ref[(2, 0, 1)]=(0.108650094094-0.195493212963j)/(o+1.)+((-0.197078732075-0.483169083114j))+((-0.947020448998+0.196199868657j))*0.5**o
            arg[(2, 0, 2)]=(-0.493114814459+0.033886341795j)*x[0]**o + ((-0.15887655805-0.189379346267j))*x[0] + ((0.538750825404-0.670989355926j))*x[1]**o + ((-0.992286678847+0.176645556154j))*x[1] + ((0.216684294756-0.0261157286j))*x[2]**o + ((0.320685027301+0.986301681684j))*x[2]
            ref[(2, 0, 2)]=(0.75543512016-0.697105084526j)/(o+1.)+((-0.415239104798+0.486783945786j))+((-0.493114814459+0.033886341795j))*0.5**o
            arg[(2, 0, 3)]=(0.337012987096-0.362328971534j)*x[0]**o + ((-0.361073565734+0.644026145862j))*x[0] + ((0.940872065628-0.344732604689j))*x[1]**o + ((0.716939856771+0.474069507703j))*x[1] + ((0.950753687765-0.966975712545j))*x[2]**o + ((0.0831592580683+0.35820512893j))*x[2]
            ref[(2, 0, 3)]=(1.89162575339-1.31170831723j)/(o+1.)+((0.219512774553+0.738150391247j))+((0.337012987096-0.362328971534j))*0.5**o
            arg[(2, 1, 0)]=(-0.0725651368273-0.76333205024j)*x[0]**o + ((0.365319098086-0.0541326811474j))*x[0] + ((0.373717151599+0.0714032282994j))*x[1]**o + ((-0.704075244426-0.688522714955j))*x[1] + ((-0.759085425455+0.0218168965557j))*x[2]**o + ((-0.0658565468496+0.647554186875j))*x[2]
            ref[(2, 1, 0)]=(-0.385368273856+0.0932201248551j)/(o+1.)+((-0.202306346594-0.0475506046139j))+((-0.0725651368273-0.76333205024j))*0.5**o
            arg[(2, 1, 1)]=(-0.504643474217+0.412814903463j)*x[0]**o + ((0.0111643003983+0.497664249501j))*x[0] + ((0.974161385551-0.0454617519543j))*x[1]**o + ((-0.209283870617+0.0368916625128j))*x[1] + ((0.318257311656-0.864640673661j))*x[2]**o + ((-0.213985331911-0.790122912786j))*x[2]
            ref[(2, 1, 1)]=(1.29241869721-0.910102425616j)/(o+1.)+((-0.206052451065-0.127783500386j))+((-0.504643474217+0.412814903463j))*0.5**o
            arg[(2, 1, 2)]=(-0.887232425667+0.361389871692j)*x[0]**o + ((0.237284206412-0.621071882839j))*x[0] + ((-0.591578598616+0.0596946617033j))*x[1]**o + ((0.0312339097847+0.474683899061j))*x[1] + ((0.763527149245+0.420206340152j))*x[2]**o + ((-0.188199868937-0.675321944208j))*x[2]
            ref[(2, 1, 2)]=(0.171948550629+0.479901001855j)/(o+1.)+((0.0401591236299-0.410854963993j))+((-0.887232425667+0.361389871692j))*0.5**o
            arg[(2, 1, 3)]=(0.921100408038+0.840401339467j)*x[0]**o + ((-0.868889572717-0.879425912893j))*x[0] + ((0.542890382683-0.927753487383j))*x[1]**o + ((-0.794503284279-0.0137637118513j))*x[1] + ((0.482006774911+0.620895215728j))*x[2]**o + ((-0.626108011603+0.73458210018j))*x[2]
            ref[(2, 1, 3)]=(1.02489715759-0.306858271655j)/(o+1.)+((-1.1447504343-0.079303762282j))+((0.921100408038+0.840401339467j))*0.5**o
            arg[(3, 0, 0)]=(-0.813676025305+0.977577146833j)*x[0]**o + ((-0.574002811553+0.80324014882j))*x[0] + ((0.830495577804-0.31346847109j))*x[1]**o + ((-0.181957854482-0.842488809238j))*x[1] + ((-0.778939219849-0.754470468081j))*x[2]**o + ((0.343748590128-0.909052774618j))*x[2]
            ref[(3, 0, 0)]=(0.0515563579557-1.06793893917j)/(o+1.)+((-0.206106037954-0.474150717518j))+((-0.813676025305+0.977577146833j))*0.5**o
            arg[(3, 0, 1)]=(-0.0296478306293-0.711132260993j)*x[0]**o + ((0.167850810729-0.00053984132316j))*x[0] + ((0.422595042139-0.161404055274j))*x[1]**o + ((0.734050401445+0.459528587405j))*x[1] + ((-0.109964885198-0.251061178548j))*x[2]**o + ((0.836107705824+0.694826096931j))*x[2]
            ref[(3, 0, 1)]=(0.312630156941-0.412465233822j)/(o+1.)+((0.869004458999+0.576907421507j))+((-0.0296478306293-0.711132260993j))*0.5**o
            arg[(3, 0, 2)]=(0.0138959678638-0.740725223659j)*x[0]**o + ((0.728587827266-0.872737174289j))*x[0] + ((0.26034275308-0.484127224558j))*x[1]**o + ((0.909784922146+0.737350480199j))*x[1] + ((-0.23324157292+0.938226099366j))*x[2]**o + ((0.255223117818-0.785309069019j))*x[2]
            ref[(3, 0, 2)]=(0.0271011801605+0.454098874808j)/(o+1.)+((0.946797933615-0.460347881555j))+((0.0138959678638-0.740725223659j))*0.5**o
            arg[(3, 0, 3)]=(-0.643664947095-0.848264912378j)*x[0]**o + ((0.451036510513+0.412496142065j))*x[0] + ((-0.0573357623601-0.814660021618j))*x[1]**o + ((-0.708176932332+0.111634650854j))*x[1] + ((-0.696719354447-0.927030971923j))*x[2]**o + ((-0.0261451698388+0.73020734956j))*x[2]
            ref[(3, 0, 3)]=(-0.754055116807-1.74169099354j)/(o+1.)+((-0.141642795829+0.62716907124j))+((-0.643664947095-0.848264912378j))*0.5**o
            arg[(3, 1, 0)]=(0.532039578668-0.391680430788j)*x[0]**o + ((-0.236835191138+0.45572034931j))*x[0] + ((-0.989938480475-0.0893060483046j))*x[1]**o + ((-0.211806440538+0.743899911768j))*x[1] + ((0.182475634985-0.396667598647j))*x[2]**o + ((-0.925655043247-0.56979848603j))*x[2]
            ref[(3, 1, 0)]=(-0.80746284549-0.485973646952j)/(o+1.)+((-0.687148337461+0.314910887524j))+((0.532039578668-0.391680430788j))*0.5**o
            arg[(3, 1, 1)]=(0.953028792328-0.544587675065j)*x[0]**o + ((-0.564471570435-0.709245609092j))*x[0] + ((0.059119430788+0.805108630938j))*x[1]**o + ((-0.855318895335-0.398764019431j))*x[1] + ((0.932466936763+0.80925828398j))*x[2]**o + ((-0.0179008171337-0.77784901617j))*x[2]
            ref[(3, 1, 1)]=(0.991586367551+1.61436691492j)/(o+1.)+((-0.718845641452-0.942929322347j))+((0.953028792328-0.544587675065j))*0.5**o
            arg[(3, 1, 2)]=(0.725979794301-0.801257938008j)*x[0]**o + ((-0.294621654975-0.210965864999j))*x[0] + ((-0.106297930568+0.111105484043j))*x[1]**o + ((0.917850378417+0.602878585646j))*x[1] + ((-0.468854049286+0.942467725797j))*x[2]**o + ((-0.958557773233-0.317562106506j))*x[2]
            ref[(3, 1, 2)]=(-0.575151979855+1.05357320984j)/(o+1.)+((-0.167664524896+0.0371753070703j))+((0.725979794301-0.801257938008j))*0.5**o
            arg[(3, 1, 3)]=(-0.26252666453+0.27509752979j)*x[0]**o + ((0.924399788452-0.764123303113j))*x[0] + ((0.00918143957868-0.0217936626686j))*x[1]**o + ((-0.588981195901-0.0745885609534j))*x[1] + ((0.780007584937-0.453340406028j))*x[2]**o + ((-0.469469706349-0.524525543165j))*x[2]
            ref[(3, 1, 3)]=(0.789189024516-0.475134068697j)/(o+1.)+((-0.067025556899-0.681618703615j))+((-0.26252666453+0.27509752979j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3, 4),w)
        ref=numpy.zeros((4, 4, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.91147957649-0.493967129511j)*x[0]**o + ((-0.970397002686+0.862165257691j))*x[0] + ((-0.589884948535-0.0392281305838j))*x[1]**o + ((0.980415202013+0.069987594224j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.589884948535-0.0392281305838j)/(o+1.)+((0.00500909966369+0.466076425958j))+((-0.91147957649-0.493967129511j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.567731158804+0.967174300233j)*x[0]**o + ((0.490335349811-0.898518711466j))*x[0] + ((0.593211881028+0.542409405902j))*x[1]**o + ((-0.205840032988+0.524826748079j))*x[1]
            ref[(0, 0, 0, 1)]=(0.593211881028+0.542409405902j)/(o+1.)+((0.142247658411-0.186845981694j))+((0.567731158804+0.967174300233j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.121223999398-0.189393714912j)*x[0]**o + ((-0.713745783893+0.428813701546j))*x[0] + ((-0.263684056895-0.287436796206j))*x[1]**o + ((-0.82898435443-0.450735064031j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.263684056895-0.287436796206j)/(o+1.)+((-0.771365069161-0.0109606812422j))+((0.121223999398-0.189393714912j))*0.5**o
            arg[(0, 0, 0, 3)]=(-0.492595309497+0.305769763273j)*x[0]**o + ((-0.990141094404+0.768111423916j))*x[0] + ((-0.134031345524+0.0694996380498j))*x[1]**o + ((0.313042878981+0.548061597573j))*x[1]
            ref[(0, 0, 0, 3)]=(-0.134031345524+0.0694996380498j)/(o+1.)+((-0.338549107712+0.658086510744j))+((-0.492595309497+0.305769763273j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.299912927825+0.33462355585j)*x[0]**o + ((0.70944585011-0.336505573729j))*x[0] + ((-0.522022713676-0.184039893447j))*x[1]**o + ((-0.725793937453+0.674979243391j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.522022713676-0.184039893447j)/(o+1.)+((-0.00817404367169+0.169236834831j))+((0.299912927825+0.33462355585j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.552098960486+0.0238497749796j)*x[0]**o + ((-0.975590967035+0.859370342586j))*x[0] + ((0.281656648153-0.260743319171j))*x[1]**o + ((-0.978236322905+0.150638324237j))*x[1]
            ref[(0, 0, 1, 1)]=(0.281656648153-0.260743319171j)/(o+1.)+((-0.97691364497+0.505004333411j))+((0.552098960486+0.0238497749796j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.396935000084+0.784664752879j)*x[0]**o + ((0.101993130634-0.456835732175j))*x[0] + ((-0.308321232578-0.647388783731j))*x[1]**o + ((0.026503866698-0.882257961052j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.308321232578-0.647388783731j)/(o+1.)+((0.0642484986661-0.669546846613j))+((-0.396935000084+0.784664752879j))*0.5**o
            arg[(0, 0, 1, 3)]=(0.30028591825+0.682835770229j)*x[0]**o + ((0.177022292428-0.751877820886j))*x[0] + ((-0.365057649226+0.09566373107j))*x[1]**o + ((0.0769630201903+0.631384344726j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.365057649226+0.09566373107j)/(o+1.)+((0.126992656309-0.0602467380801j))+((0.30028591825+0.682835770229j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.0640791037788-0.738943722742j)*x[0]**o + ((0.877790331621+0.0687886930629j))*x[0] + ((0.953863391468+0.837387791427j))*x[1]**o + ((0.701544727679+0.135359729376j))*x[1]
            ref[(0, 0, 2, 0)]=(0.953863391468+0.837387791427j)/(o+1.)+((0.78966752965+0.10207421122j))+((0.0640791037788-0.738943722742j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.403474925125-0.778151797008j)*x[0]**o + ((0.253886372942-0.0477021284117j))*x[0] + ((-0.854934218344-0.602593440081j))*x[1]**o + ((0.446575787615-0.340196562111j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.854934218344-0.602593440081j)/(o+1.)+((0.350231080279-0.193949345261j))+((-0.403474925125-0.778151797008j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.533969140576-0.544845596161j)*x[0]**o + ((0.391417854927+0.251338024071j))*x[0] + ((-0.640911956004+0.202377742262j))*x[1]**o + ((-0.935628914188-0.309418652868j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.640911956004+0.202377742262j)/(o+1.)+((-0.27210552963-0.0290403143986j))+((0.533969140576-0.544845596161j))*0.5**o
            arg[(0, 0, 2, 3)]=(-0.704550525319+0.626438973138j)*x[0]**o + ((-0.376504943012-0.242222695162j))*x[0] + ((-0.0284422410824-0.95342594991j))*x[1]**o + ((-0.664904202403-0.0212558566306j))*x[1]
            ref[(0, 0, 2, 3)]=(-0.0284422410824-0.95342594991j)/(o+1.)+((-0.520704572707-0.131739275896j))+((-0.704550525319+0.626438973138j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.0566568767646+0.961658396051j)*x[0]**o + ((0.855745698159-0.629537618672j))*x[0] + ((0.549976197834+0.945478889968j))*x[1]**o + ((-0.313726065902-0.197981987098j))*x[1]
            ref[(0, 1, 0, 0)]=(0.549976197834+0.945478889968j)/(o+1.)+((0.271009816129-0.413759802885j))+((0.0566568767646+0.961658396051j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.394269581947-0.541108154243j)*x[0]**o + ((-0.139302644319-0.164343625035j))*x[0] + ((-0.888755592384+0.604917416165j))*x[1]**o + ((0.955790493192-0.276537404454j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.888755592384+0.604917416165j)/(o+1.)+((0.408243924437-0.220440514744j))+((0.394269581947-0.541108154243j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.334960306124+0.654673915761j)*x[0]**o + ((0.0136719081951+0.201918838596j))*x[0] + ((-0.333986190812+0.0747016985776j))*x[1]**o + ((-0.65974214927+0.576611013308j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.333986190812+0.0747016985776j)/(o+1.)+((-0.323035120537+0.389264925952j))+((-0.334960306124+0.654673915761j))*0.5**o
            arg[(0, 1, 0, 3)]=(0.910908286563+0.701729136345j)*x[0]**o + ((-0.364783969723-0.542484014855j))*x[0] + ((-0.653111579994+0.41389157744j))*x[1]**o + ((0.449836732329-0.696711151526j))*x[1]
            ref[(0, 1, 0, 3)]=(-0.653111579994+0.41389157744j)/(o+1.)+((0.0425263813032-0.619597583191j))+((0.910908286563+0.701729136345j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.841717568009-0.258198132599j)*x[0]**o + ((-0.761605727921+0.384744727722j))*x[0] + ((0.343781895749-0.371775996865j))*x[1]**o + ((0.187813760241+0.466440003415j))*x[1]
            ref[(0, 1, 1, 0)]=(0.343781895749-0.371775996865j)/(o+1.)+((-0.28689598384+0.425592365569j))+((0.841717568009-0.258198132599j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.248703895734-0.436348392776j)*x[0]**o + ((0.84772485414-0.444945781412j))*x[0] + ((0.775452242712+0.404064439266j))*x[1]**o + ((0.367082034689-0.30478123275j))*x[1]
            ref[(0, 1, 1, 1)]=(0.775452242712+0.404064439266j)/(o+1.)+((0.607403444414-0.374863507081j))+((0.248703895734-0.436348392776j))*0.5**o
            arg[(0, 1, 1, 2)]=(-0.892448873473+0.67376903625j)*x[0]**o + ((0.805975087431+0.297103597219j))*x[0] + ((-0.273810489775-0.831453438987j))*x[1]**o + ((-0.172445600513-0.0982488903081j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.273810489775-0.831453438987j)/(o+1.)+((0.316764743459+0.0994273534556j))+((-0.892448873473+0.67376903625j))*0.5**o
            arg[(0, 1, 1, 3)]=(0.331550042168+0.527507789915j)*x[0]**o + ((-0.886215103823+0.0178097463809j))*x[0] + ((0.0307779580481+0.375657675114j))*x[1]**o + ((0.518859567752+0.0759252433139j))*x[1]
            ref[(0, 1, 1, 3)]=(0.0307779580481+0.375657675114j)/(o+1.)+((-0.183677768036+0.0468674948474j))+((0.331550042168+0.527507789915j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.736058510518-0.334677155625j)*x[0]**o + ((-0.649698026799+0.781439725563j))*x[0] + ((-0.631579927403+0.37808594654j))*x[1]**o + ((0.346669175903+0.119542133366j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.631579927403+0.37808594654j)/(o+1.)+((-0.151514425448+0.450490929464j))+((0.736058510518-0.334677155625j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.941791824202+0.811409306106j)*x[0]**o + ((0.924381553024-0.320240455486j))*x[0] + ((0.656237600498+0.148346096972j))*x[1]**o + ((-0.260253290228-0.381848926096j))*x[1]
            ref[(0, 1, 2, 1)]=(0.656237600498+0.148346096972j)/(o+1.)+((0.332064131398-0.351044690791j))+((0.941791824202+0.811409306106j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.127833373995+0.298791876835j)*x[0]**o + ((0.130242930572-0.531778697758j))*x[0] + ((0.255135698982+0.638276515813j))*x[1]**o + ((0.276953188788+0.0711303919097j))*x[1]
            ref[(0, 1, 2, 2)]=(0.255135698982+0.638276515813j)/(o+1.)+((0.20359805968-0.230324152924j))+((-0.127833373995+0.298791876835j))*0.5**o
            arg[(0, 1, 2, 3)]=(0.932202407522-0.46688016071j)*x[0]**o + ((-0.670816042705-0.691943031909j))*x[0] + ((0.304922692189-0.783746612761j))*x[1]**o + ((0.443936179692-0.696015167732j))*x[1]
            ref[(0, 1, 2, 3)]=(0.304922692189-0.783746612761j)/(o+1.)+((-0.113439931506-0.693979099821j))+((0.932202407522-0.46688016071j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.911161329498-0.930457051938j)*x[0]**o + ((-0.67836975148+0.101922736657j))*x[0] + ((0.196024591632+0.9610367479j))*x[1]**o + ((-0.213963614775+0.0643473708616j))*x[1]
            ref[(0, 2, 0, 0)]=(0.196024591632+0.9610367479j)/(o+1.)+((-0.446166683127+0.0831350537594j))+((0.911161329498-0.930457051938j))*0.5**o
            arg[(0, 2, 0, 1)]=(-0.0120031125959+0.728117730969j)*x[0]**o + ((0.524674985117+0.342981680285j))*x[0] + ((0.955822925332+0.178576315675j))*x[1]**o + ((-0.103685164498+0.690420117947j))*x[1]
            ref[(0, 2, 0, 1)]=(0.955822925332+0.178576315675j)/(o+1.)+((0.21049491031+0.516700899116j))+((-0.0120031125959+0.728117730969j))*0.5**o
            arg[(0, 2, 0, 2)]=(-0.576227136776+0.893682067772j)*x[0]**o + ((-0.675052701213+0.659820321228j))*x[0] + ((0.416485579218-0.422926686248j))*x[1]**o + ((-0.0371848823978+0.683013311006j))*x[1]
            ref[(0, 2, 0, 2)]=(0.416485579218-0.422926686248j)/(o+1.)+((-0.356118791805+0.671416816117j))+((-0.576227136776+0.893682067772j))*0.5**o
            arg[(0, 2, 0, 3)]=(0.145035494998+0.099885658966j)*x[0]**o + ((-0.0710399532351+0.00115880915127j))*x[0] + ((-0.093768159555+0.1655859198j))*x[1]**o + ((0.549171562329-0.317922640839j))*x[1]
            ref[(0, 2, 0, 3)]=(-0.093768159555+0.1655859198j)/(o+1.)+((0.239065804547-0.158381915844j))+((0.145035494998+0.099885658966j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.5836893913+0.496492330868j)*x[0]**o + ((0.717562314246+0.909389292825j))*x[0] + ((0.659295953105-0.49906460575j))*x[1]**o + ((-0.252958835279+0.480193863762j))*x[1]
            ref[(0, 2, 1, 0)]=(0.659295953105-0.49906460575j)/(o+1.)+((0.232301739484+0.694791578293j))+((0.5836893913+0.496492330868j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.444332588772-0.28112598742j)*x[0]**o + ((-0.00193188065738-0.338947566819j))*x[0] + ((0.0927873617432+0.424939880715j))*x[1]**o + ((0.644572918952-0.0256494313025j))*x[1]
            ref[(0, 2, 1, 1)]=(0.0927873617432+0.424939880715j)/(o+1.)+((0.321320519147-0.182298499061j))+((0.444332588772-0.28112598742j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.0515171788211+0.818332137696j)*x[0]**o + ((0.430464891299+0.995565940554j))*x[0] + ((-0.27079734121+0.617479878399j))*x[1]**o + ((-0.203574345111+0.481688728353j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.27079734121+0.617479878399j)/(o+1.)+((0.113445273094+0.738627334453j))+((0.0515171788211+0.818332137696j))*0.5**o
            arg[(0, 2, 1, 3)]=(-0.391424838894+0.592811085849j)*x[0]**o + ((-0.0426463163195+0.942980699297j))*x[0] + ((0.809079955442+0.943868514599j))*x[1]**o + ((0.291294346984-0.553774149154j))*x[1]
            ref[(0, 2, 1, 3)]=(0.809079955442+0.943868514599j)/(o+1.)+((0.124324015332+0.194603275072j))+((-0.391424838894+0.592811085849j))*0.5**o
            arg[(0, 2, 2, 0)]=(0.384565974541-0.118824104947j)*x[0]**o + ((0.873773309655-0.876269372863j))*x[0] + ((-0.463253808501+0.592283900357j))*x[1]**o + ((-0.534590103925+0.139232355823j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.463253808501+0.592283900357j)/(o+1.)+((0.169591602865-0.36851850852j))+((0.384565974541-0.118824104947j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.205697510341-0.625530622302j)*x[0]**o + ((0.51811691771-0.90181833298j))*x[0] + ((-0.47435825624-0.243270019807j))*x[1]**o + ((0.332317404373-0.788503377226j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.47435825624-0.243270019807j)/(o+1.)+((0.425217161042-0.845160855103j))+((0.205697510341-0.625530622302j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.102051085052-0.726894621634j)*x[0]**o + ((0.341279743478+0.890554090659j))*x[0] + ((0.168942836942-0.9829893662j))*x[1]**o + ((0.58537659686+0.601574942047j))*x[1]
            ref[(0, 2, 2, 2)]=(0.168942836942-0.9829893662j)/(o+1.)+((0.463328170169+0.746064516353j))+((0.102051085052-0.726894621634j))*0.5**o
            arg[(0, 2, 2, 3)]=(-0.977889756752-0.377364212152j)*x[0]**o + ((-0.209432565299-0.952784105819j))*x[0] + ((0.936832946504-0.111815808015j))*x[1]**o + ((-0.342446877256+0.902039632118j))*x[1]
            ref[(0, 2, 2, 3)]=(0.936832946504-0.111815808015j)/(o+1.)+((-0.275939721278-0.0253722368509j))+((-0.977889756752-0.377364212152j))*0.5**o
            arg[(0, 3, 0, 0)]=(-0.621239799451-0.750011321578j)*x[0]**o + ((-0.792923777151-0.0564373233354j))*x[0] + ((0.933036248113+0.0257725331801j))*x[1]**o + ((0.485492854136-0.431718393755j))*x[1]
            ref[(0, 3, 0, 0)]=(0.933036248113+0.0257725331801j)/(o+1.)+((-0.153715461507-0.244077858545j))+((-0.621239799451-0.750011321578j))*0.5**o
            arg[(0, 3, 0, 1)]=(-0.507259573878-0.900269855083j)*x[0]**o + ((0.549006463161+0.0415814283243j))*x[0] + ((-0.161412322403-0.29008125491j))*x[1]**o + ((-0.149645252027+0.0579102391046j))*x[1]
            ref[(0, 3, 0, 1)]=(-0.161412322403-0.29008125491j)/(o+1.)+((0.199680605567+0.0497458337144j))+((-0.507259573878-0.900269855083j))*0.5**o
            arg[(0, 3, 0, 2)]=(-0.123891778306-0.488487059946j)*x[0]**o + ((-0.597447389002+0.237231831437j))*x[0] + ((0.0716937074927-0.0428084522379j))*x[1]**o + ((-0.441580537331-0.785506960011j))*x[1]
            ref[(0, 3, 0, 2)]=(0.0716937074927-0.0428084522379j)/(o+1.)+((-0.519513963166-0.274137564287j))+((-0.123891778306-0.488487059946j))*0.5**o
            arg[(0, 3, 0, 3)]=(0.905074747512-0.0500732841292j)*x[0]**o + ((0.325852716951+0.75939607863j))*x[0] + ((-0.785817552055-0.904261829691j))*x[1]**o + ((-0.524862716442-0.504067901162j))*x[1]
            ref[(0, 3, 0, 3)]=(-0.785817552055-0.904261829691j)/(o+1.)+((-0.0995049997456+0.127664088734j))+((0.905074747512-0.0500732841292j))*0.5**o
            arg[(0, 3, 1, 0)]=(0.442549835065-0.135067626284j)*x[0]**o + ((0.509418845306+0.543541426188j))*x[0] + ((0.968917642605-0.933342267281j))*x[1]**o + ((-0.417466007296+0.76092483762j))*x[1]
            ref[(0, 3, 1, 0)]=(0.968917642605-0.933342267281j)/(o+1.)+((0.0459764190046+0.652233131904j))+((0.442549835065-0.135067626284j))*0.5**o
            arg[(0, 3, 1, 1)]=(-0.343063274162-0.0855216464149j)*x[0]**o + ((-0.11190105724+0.471357774921j))*x[0] + ((-0.793931576842-0.894307232613j))*x[1]**o + ((-0.267188839266-0.701218085174j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.793931576842-0.894307232613j)/(o+1.)+((-0.189544948253-0.114930155126j))+((-0.343063274162-0.0855216464149j))*0.5**o
            arg[(0, 3, 1, 2)]=(-0.239016257455-0.53016228422j)*x[0]**o + ((-0.545699552826+0.278712622685j))*x[0] + ((0.265502697296+0.563902010951j))*x[1]**o + ((0.559552014236-0.787724902628j))*x[1]
            ref[(0, 3, 1, 2)]=(0.265502697296+0.563902010951j)/(o+1.)+((0.00692623070473-0.254506139972j))+((-0.239016257455-0.53016228422j))*0.5**o
            arg[(0, 3, 1, 3)]=(-0.0579071823059+0.393528316219j)*x[0]**o + ((-0.872381667759-0.970625137676j))*x[0] + ((0.76068713539+0.350916678857j))*x[1]**o + ((0.86291142993-0.908882703978j))*x[1]
            ref[(0, 3, 1, 3)]=(0.76068713539+0.350916678857j)/(o+1.)+((-0.00473511891484-0.939753920827j))+((-0.0579071823059+0.393528316219j))*0.5**o
            arg[(0, 3, 2, 0)]=(-0.178383561262+0.664512786485j)*x[0]**o + ((0.522477055305-0.956350490678j))*x[0] + ((0.743331835901+0.13524360867j))*x[1]**o + ((0.685710072266-0.449188517445j))*x[1]
            ref[(0, 3, 2, 0)]=(0.743331835901+0.13524360867j)/(o+1.)+((0.604093563786-0.702769504061j))+((-0.178383561262+0.664512786485j))*0.5**o
            arg[(0, 3, 2, 1)]=(-0.612607442722+0.197614325426j)*x[0]**o + ((-0.0989846864171-0.0512900757083j))*x[0] + ((0.273860510684-0.988723100385j))*x[1]**o + ((0.865731821119-0.338472326501j))*x[1]
            ref[(0, 3, 2, 1)]=(0.273860510684-0.988723100385j)/(o+1.)+((0.383373567351-0.194881201105j))+((-0.612607442722+0.197614325426j))*0.5**o
            arg[(0, 3, 2, 2)]=(0.34871370429-0.747855836621j)*x[0]**o + ((0.845880847725+0.900286122912j))*x[0] + ((0.935961989629+0.424750069245j))*x[1]**o + ((0.222143854208-0.701032566839j))*x[1]
            ref[(0, 3, 2, 2)]=(0.935961989629+0.424750069245j)/(o+1.)+((0.534012350966+0.0996267780365j))+((0.34871370429-0.747855836621j))*0.5**o
            arg[(0, 3, 2, 3)]=(0.363112183814+0.722358372054j)*x[0]**o + ((0.0712492182113+0.455397910346j))*x[0] + ((-0.836373745306-0.632715027877j))*x[1]**o + ((0.0775974009945+0.0678708775426j))*x[1]
            ref[(0, 3, 2, 3)]=(-0.836373745306-0.632715027877j)/(o+1.)+((0.0744233096029+0.261634393944j))+((0.363112183814+0.722358372054j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.162650792671+0.00159045266263j)*x[0]**o + ((0.829134276854+0.957455941392j))*x[0] + ((-0.836666928642+0.151288685131j))*x[1]**o + ((0.540701449445+0.78701779512j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.836666928642+0.151288685131j)/(o+1.)+((0.68491786315+0.872236868256j))+((-0.162650792671+0.00159045266263j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.320605092513-0.0518550607418j)*x[0]**o + ((-0.219007491928+0.386938807618j))*x[0] + ((-0.926466369164+0.267125742371j))*x[1]**o + ((-0.69202392806+0.9357205208j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.926466369164+0.267125742371j)/(o+1.)+((-0.455515709994+0.661329664209j))+((-0.320605092513-0.0518550607418j))*0.5**o
            arg[(1, 0, 0, 2)]=(0.795394998379+0.953598051855j)*x[0]**o + ((-0.598570368556+0.117601680666j))*x[0] + ((-0.0698130075238+0.184812550751j))*x[1]**o + ((0.163152095166+0.713984434523j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.0698130075238+0.184812550751j)/(o+1.)+((-0.217709136695+0.415793057595j))+((0.795394998379+0.953598051855j))*0.5**o
            arg[(1, 0, 0, 3)]=(-0.411367795738+0.835671023104j)*x[0]**o + ((-0.0603426186459-0.151681886718j))*x[0] + ((0.323903968643-0.361235180769j))*x[1]**o + ((0.431050629004-0.425620041445j))*x[1]
            ref[(1, 0, 0, 3)]=(0.323903968643-0.361235180769j)/(o+1.)+((0.185354005179-0.288650964081j))+((-0.411367795738+0.835671023104j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.891868096887-0.588469953046j)*x[0]**o + ((-0.541067293284+0.16527403376j))*x[0] + ((0.928006990965+0.340759859513j))*x[1]**o + ((-0.96960388252+0.992354682292j))*x[1]
            ref[(1, 0, 1, 0)]=(0.928006990965+0.340759859513j)/(o+1.)+((-0.755335587902+0.578814358026j))+((-0.891868096887-0.588469953046j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.47145154729-0.403803682556j)*x[0]**o + ((-0.759114820754+0.299320447141j))*x[0] + ((-0.47807641103+0.0958317756504j))*x[1]**o + ((0.542323084695-0.0534918562013j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.47807641103+0.0958317756504j)/(o+1.)+((-0.10839586803+0.12291429547j))+((0.47145154729-0.403803682556j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.107291280798-0.307917689312j)*x[0]**o + ((0.556309763865+0.0258538546103j))*x[0] + ((-0.544050663799-0.341548855588j))*x[1]**o + ((0.389620272288+0.973532484845j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.544050663799-0.341548855588j)/(o+1.)+((0.472965018077+0.499693169727j))+((0.107291280798-0.307917689312j))*0.5**o
            arg[(1, 0, 1, 3)]=(-0.0907190835043+0.390489352973j)*x[0]**o + ((-0.752346531752-0.052804425358j))*x[0] + ((-0.0767879980996-0.713944758308j))*x[1]**o + ((0.819788942078+0.174541572339j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.0767879980996-0.713944758308j)/(o+1.)+((0.0337212051634+0.0608685734906j))+((-0.0907190835043+0.390489352973j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.82743028142-0.0950337775775j)*x[0]**o + ((0.565556881253+0.275846402075j))*x[0] + ((0.0892139121199+0.514608197794j))*x[1]**o + ((0.0370746380799-0.887943736295j))*x[1]
            ref[(1, 0, 2, 0)]=(0.0892139121199+0.514608197794j)/(o+1.)+((0.301315759667-0.30604866711j))+((-0.82743028142-0.0950337775775j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.875412981789+0.668159493652j)*x[0]**o + ((0.643820884844+0.694034640111j))*x[0] + ((-0.147801274118-0.0557796627607j))*x[1]**o + ((-0.907338102116+0.890012563293j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.147801274118-0.0557796627607j)/(o+1.)+((-0.131758608636+0.792023601702j))+((0.875412981789+0.668159493652j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.412428008577-0.384058669133j)*x[0]**o + ((0.988059103377-0.515747990875j))*x[0] + ((-0.831043713475+0.411675019651j))*x[1]**o + ((-0.781666303697-0.933478310464j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.831043713475+0.411675019651j)/(o+1.)+((0.10319639984-0.724613150669j))+((-0.412428008577-0.384058669133j))*0.5**o
            arg[(1, 0, 2, 3)]=(-0.539766572591-0.130418634351j)*x[0]**o + ((-0.39678198434-0.192059568477j))*x[0] + ((-0.62446336999-0.604050752202j))*x[1]**o + ((-0.216850607455-0.317384937651j))*x[1]
            ref[(1, 0, 2, 3)]=(-0.62446336999-0.604050752202j)/(o+1.)+((-0.306816295898-0.254722253064j))+((-0.539766572591-0.130418634351j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.39676231519+0.97463226341j)*x[0]**o + ((0.716935445666-0.100814640638j))*x[0] + ((0.00826456217275-0.425545546594j))*x[1]**o + ((0.839516849161-0.184907669628j))*x[1]
            ref[(1, 1, 0, 0)]=(0.00826456217275-0.425545546594j)/(o+1.)+((0.778226147414-0.142861155133j))+((0.39676231519+0.97463226341j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.150869338053+0.112259829253j)*x[0]**o + ((0.343576671655+0.95846016211j))*x[0] + ((-0.107984493978+0.885749723559j))*x[1]**o + ((-0.692329017081+0.39992477166j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.107984493978+0.885749723559j)/(o+1.)+((-0.174376172713+0.679192466885j))+((-0.150869338053+0.112259829253j))*0.5**o
            arg[(1, 1, 0, 2)]=(-0.889541420263+0.201832152637j)*x[0]**o + ((0.520787987793-0.600235274449j))*x[0] + ((-0.715695642292+0.710374398541j))*x[1]**o + ((0.85215332665+0.886776378981j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.715695642292+0.710374398541j)/(o+1.)+((0.686470657221+0.143270552266j))+((-0.889541420263+0.201832152637j))*0.5**o
            arg[(1, 1, 0, 3)]=(-0.703775479468+0.891519900681j)*x[0]**o + ((0.281430251029+0.862027632794j))*x[0] + ((0.579349754439-0.179091031341j))*x[1]**o + ((0.138300552061-0.431535852629j))*x[1]
            ref[(1, 1, 0, 3)]=(0.579349754439-0.179091031341j)/(o+1.)+((0.209865401545+0.215245890082j))+((-0.703775479468+0.891519900681j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.753164542568+0.0838736066167j)*x[0]**o + ((0.809170412325-0.156014261456j))*x[0] + ((0.516078446038-0.982647110154j))*x[1]**o + ((-0.127967657315+0.194701984483j))*x[1]
            ref[(1, 1, 1, 0)]=(0.516078446038-0.982647110154j)/(o+1.)+((0.340601377505+0.0193438615138j))+((-0.753164542568+0.0838736066167j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.0936211987262-0.324799691137j)*x[0]**o + ((0.0188518412013-0.111014038196j))*x[0] + ((0.321847097306+0.103526132609j))*x[1]**o + ((0.47810745414+0.233874184546j))*x[1]
            ref[(1, 1, 1, 1)]=(0.321847097306+0.103526132609j)/(o+1.)+((0.248479647671+0.061430073175j))+((-0.0936211987262-0.324799691137j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.607276346975-0.781225019385j)*x[0]**o + ((0.836466647626+0.257144553256j))*x[0] + ((-0.0879218732538-0.494507097207j))*x[1]**o + ((-0.177110504931-0.453097801521j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.0879218732538-0.494507097207j)/(o+1.)+((0.329678071347-0.0979766241327j))+((0.607276346975-0.781225019385j))*0.5**o
            arg[(1, 1, 1, 3)]=(0.576089097012+0.335342402988j)*x[0]**o + ((0.339132862981-0.331917453057j))*x[0] + ((0.154155330594+0.261003624357j))*x[1]**o + ((-0.197115249475-0.924044544265j))*x[1]
            ref[(1, 1, 1, 3)]=(0.154155330594+0.261003624357j)/(o+1.)+((0.0710088067528-0.627980998661j))+((0.576089097012+0.335342402988j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.0309249202052+0.196579088885j)*x[0]**o + ((0.880920504014-0.0554107131148j))*x[0] + ((0.357895461354+0.062802108723j))*x[1]**o + ((0.116655231615-0.461579648565j))*x[1]
            ref[(1, 1, 2, 0)]=(0.357895461354+0.062802108723j)/(o+1.)+((0.498787867814-0.25849518084j))+((0.0309249202052+0.196579088885j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.339859210517+0.147010186723j)*x[0]**o + ((-0.931884775576-0.028708772883j))*x[0] + ((0.126667767461-0.240493848547j))*x[1]**o + ((0.56787984465+0.975502959346j))*x[1]
            ref[(1, 1, 2, 1)]=(0.126667767461-0.240493848547j)/(o+1.)+((-0.182002465463+0.473397093231j))+((0.339859210517+0.147010186723j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.0939321252607+0.877388758363j)*x[0]**o + ((-0.315299826561-0.974754888807j))*x[0] + ((-0.398380036278-0.448897006045j))*x[1]**o + ((0.253030791473-0.496690721766j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.398380036278-0.448897006045j)/(o+1.)+((-0.0311345175441-0.735722805286j))+((0.0939321252607+0.877388758363j))*0.5**o
            arg[(1, 1, 2, 3)]=(-0.645269164149+0.29805729604j)*x[0]**o + ((0.723049902394+0.499746948198j))*x[0] + ((-0.0863539608552+0.806815278373j))*x[1]**o + ((-0.462219022387+0.560295394137j))*x[1]
            ref[(1, 1, 2, 3)]=(-0.0863539608552+0.806815278373j)/(o+1.)+((0.130415440003+0.530021171167j))+((-0.645269164149+0.29805729604j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.333523088577-0.482781572653j)*x[0]**o + ((0.589874581824-0.0687140330068j))*x[0] + ((0.111911922502+0.690194203593j))*x[1]**o + ((0.263939678294+0.0265588810346j))*x[1]
            ref[(1, 2, 0, 0)]=(0.111911922502+0.690194203593j)/(o+1.)+((0.426907130059-0.0210775759861j))+((-0.333523088577-0.482781572653j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.0338081769514+0.706391837009j)*x[0]**o + ((-0.86635695527+0.310392038567j))*x[0] + ((0.508891654922-0.118207264328j))*x[1]**o + ((-0.650136937945-0.341066012406j))*x[1]
            ref[(1, 2, 0, 1)]=(0.508891654922-0.118207264328j)/(o+1.)+((-0.758246946608-0.0153369869191j))+((-0.0338081769514+0.706391837009j))*0.5**o
            arg[(1, 2, 0, 2)]=(-0.657365538576-0.309197987685j)*x[0]**o + ((-0.675189140319-0.489723618633j))*x[0] + ((-0.803823595904-0.410933478359j))*x[1]**o + ((0.00995051973937+0.498435403447j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.803823595904-0.410933478359j)/(o+1.)+((-0.33261931029+0.004355892407j))+((-0.657365538576-0.309197987685j))*0.5**o
            arg[(1, 2, 0, 3)]=(0.53982547071+0.582983311227j)*x[0]**o + ((-0.989188640857-0.0671323378861j))*x[0] + ((0.0192354796869+0.149864919813j))*x[1]**o + ((-0.985608220318-0.919477868241j))*x[1]
            ref[(1, 2, 0, 3)]=(0.0192354796869+0.149864919813j)/(o+1.)+((-0.987398430587-0.493305103064j))+((0.53982547071+0.582983311227j))*0.5**o
            arg[(1, 2, 1, 0)]=(0.442917488952+0.299095829036j)*x[0]**o + ((-0.755805598348-0.137500017919j))*x[0] + ((0.495717933038+0.953090419174j))*x[1]**o + ((0.7746591129+0.438709710275j))*x[1]
            ref[(1, 2, 1, 0)]=(0.495717933038+0.953090419174j)/(o+1.)+((0.009426757276+0.150604846178j))+((0.442917488952+0.299095829036j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.18447433526-0.817411928702j)*x[0]**o + ((0.0740490374776+0.526758872165j))*x[0] + ((0.999822902995+0.239639294481j))*x[1]**o + ((0.392099340763-0.391291109744j))*x[1]
            ref[(1, 2, 1, 1)]=(0.999822902995+0.239639294481j)/(o+1.)+((0.233074189121+0.0677338812106j))+((0.18447433526-0.817411928702j))*0.5**o
            arg[(1, 2, 1, 2)]=(0.579445025633+0.0934191062876j)*x[0]**o + ((0.0113286840497+0.771466711311j))*x[0] + ((0.341581982943-0.28399523405j))*x[1]**o + ((0.34594189736-0.41164166081j))*x[1]
            ref[(1, 2, 1, 2)]=(0.341581982943-0.28399523405j)/(o+1.)+((0.178635290705+0.17991252525j))+((0.579445025633+0.0934191062876j))*0.5**o
            arg[(1, 2, 1, 3)]=(-0.726049271197+0.375624235367j)*x[0]**o + ((0.510446801897+0.408376198581j))*x[0] + ((0.862883783322-0.096484827599j))*x[1]**o + ((0.0502446174839-0.58159279304j))*x[1]
            ref[(1, 2, 1, 3)]=(0.862883783322-0.096484827599j)/(o+1.)+((0.28034570969-0.0866082972296j))+((-0.726049271197+0.375624235367j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.0233648375526+0.361757315146j)*x[0]**o + ((0.501379826343+0.64956741572j))*x[0] + ((0.220610960893+0.922106250822j))*x[1]**o + ((-0.661503353138+0.476334745809j))*x[1]
            ref[(1, 2, 2, 0)]=(0.220610960893+0.922106250822j)/(o+1.)+((-0.0800617633975+0.562951080765j))+((-0.0233648375526+0.361757315146j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.3971658053-0.921378138579j)*x[0]**o + ((-0.516972219586+0.802322856468j))*x[0] + ((-0.231982629686-0.75644097156j))*x[1]**o + ((0.981660672261+0.607899130649j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.231982629686-0.75644097156j)/(o+1.)+((0.232344226338+0.705110993558j))+((0.3971658053-0.921378138579j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.977283328224+0.147661651554j)*x[0]**o + ((0.155002338129-0.826322255954j))*x[0] + ((-0.517154376057-0.590511491243j))*x[1]**o + ((0.109245623564-0.284444399419j))*x[1]
            ref[(1, 2, 2, 2)]=(-0.517154376057-0.590511491243j)/(o+1.)+((0.132123980846-0.555383327686j))+((0.977283328224+0.147661651554j))*0.5**o
            arg[(1, 2, 2, 3)]=(0.176138545421+0.107825836119j)*x[0]**o + ((-0.828126340975-0.52495209308j))*x[0] + ((-0.617315431782+0.471235877779j))*x[1]**o + ((-0.987903109032-0.0937324226878j))*x[1]
            ref[(1, 2, 2, 3)]=(-0.617315431782+0.471235877779j)/(o+1.)+((-0.908014725003-0.309342257884j))+((0.176138545421+0.107825836119j))*0.5**o
            arg[(1, 3, 0, 0)]=(0.703642295696-0.542880839244j)*x[0]**o + ((-0.766469859167+0.954195360986j))*x[0] + ((0.722237619903-0.0124124645143j))*x[1]**o + ((0.689215561459+0.830815233327j))*x[1]
            ref[(1, 3, 0, 0)]=(0.722237619903-0.0124124645143j)/(o+1.)+((-0.0386271488544+0.892505297156j))+((0.703642295696-0.542880839244j))*0.5**o
            arg[(1, 3, 0, 1)]=(-0.301443420688-0.879713800789j)*x[0]**o + ((-0.409572983063-0.484012749164j))*x[0] + ((-0.679066463966-0.355195701386j))*x[1]**o + ((-0.831775940604-0.554025305641j))*x[1]
            ref[(1, 3, 0, 1)]=(-0.679066463966-0.355195701386j)/(o+1.)+((-0.620674461834-0.519019027403j))+((-0.301443420688-0.879713800789j))*0.5**o
            arg[(1, 3, 0, 2)]=(-0.332223020827-0.839934347007j)*x[0]**o + ((-0.0079112481274+0.49122467731j))*x[0] + ((-0.171643140163-0.424902054346j))*x[1]**o + ((-0.339501216096-0.280382911384j))*x[1]
            ref[(1, 3, 0, 2)]=(-0.171643140163-0.424902054346j)/(o+1.)+((-0.173706232112+0.105420882963j))+((-0.332223020827-0.839934347007j))*0.5**o
            arg[(1, 3, 0, 3)]=(-0.983404830444+0.856925276897j)*x[0]**o + ((-0.552171993428+0.428443237594j))*x[0] + ((-0.0972160675081+0.35005514926j))*x[1]**o + ((0.571148805995+0.194454547624j))*x[1]
            ref[(1, 3, 0, 3)]=(-0.0972160675081+0.35005514926j)/(o+1.)+((0.0094884062837+0.311448892609j))+((-0.983404830444+0.856925276897j))*0.5**o
            arg[(1, 3, 1, 0)]=(-0.542725065621+0.217741629948j)*x[0]**o + ((0.409217440326+0.412602507605j))*x[0] + ((0.890624573375+0.311241878506j))*x[1]**o + ((0.0302071003928-0.00860892088446j))*x[1]
            ref[(1, 3, 1, 0)]=(0.890624573375+0.311241878506j)/(o+1.)+((0.219712270359+0.20199679336j))+((-0.542725065621+0.217741629948j))*0.5**o
            arg[(1, 3, 1, 1)]=(0.665828177608+0.363173854638j)*x[0]**o + ((-0.604734853587-0.0280207459232j))*x[0] + ((0.867709494119+0.761515708474j))*x[1]**o + ((0.831675661579-0.676895896154j))*x[1]
            ref[(1, 3, 1, 1)]=(0.867709494119+0.761515708474j)/(o+1.)+((0.113470403996-0.352458321039j))+((0.665828177608+0.363173854638j))*0.5**o
            arg[(1, 3, 1, 2)]=(0.235377778147-0.8497826838j)*x[0]**o + ((0.917233262616+0.395381756043j))*x[0] + ((0.96217939752-0.668978419547j))*x[1]**o + ((-0.545803877803-0.187826298889j))*x[1]
            ref[(1, 3, 1, 2)]=(0.96217939752-0.668978419547j)/(o+1.)+((0.185714692406+0.103777728577j))+((0.235377778147-0.8497826838j))*0.5**o
            arg[(1, 3, 1, 3)]=(0.0579117909154-0.525384908986j)*x[0]**o + ((-0.366424600586+0.96735754005j))*x[0] + ((0.438719449168-0.511260909278j))*x[1]**o + ((0.758053127652-0.742560383882j))*x[1]
            ref[(1, 3, 1, 3)]=(0.438719449168-0.511260909278j)/(o+1.)+((0.195814263533+0.112398578084j))+((0.0579117909154-0.525384908986j))*0.5**o
            arg[(1, 3, 2, 0)]=(-0.0150571732201-0.812639100149j)*x[0]**o + ((-0.393420733229-0.247606956357j))*x[0] + ((-0.560826423749+0.80320135229j))*x[1]**o + ((0.789040004841-0.252858360144j))*x[1]
            ref[(1, 3, 2, 0)]=(-0.560826423749+0.80320135229j)/(o+1.)+((0.197809635806-0.250232658251j))+((-0.0150571732201-0.812639100149j))*0.5**o
            arg[(1, 3, 2, 1)]=(-0.0241297975857+0.551796593943j)*x[0]**o + ((0.0138642081551-0.0447130813882j))*x[0] + ((-0.840027938781+0.993214075599j))*x[1]**o + ((-0.918812205922-0.00833157078755j))*x[1]
            ref[(1, 3, 2, 1)]=(-0.840027938781+0.993214075599j)/(o+1.)+((-0.452473998884-0.0265223260879j))+((-0.0241297975857+0.551796593943j))*0.5**o
            arg[(1, 3, 2, 2)]=(0.397028092602-0.222260302936j)*x[0]**o + ((-0.491991566734+0.634368250933j))*x[0] + ((0.226830261625+0.67783609636j))*x[1]**o + ((0.907137152892-0.130703617547j))*x[1]
            ref[(1, 3, 2, 2)]=(0.226830261625+0.67783609636j)/(o+1.)+((0.207572793079+0.251832316693j))+((0.397028092602-0.222260302936j))*0.5**o
            arg[(1, 3, 2, 3)]=(-0.440556804929-0.972055426069j)*x[0]**o + ((-0.121043761714+0.774360861714j))*x[0] + ((-0.192037505375+0.442988149085j))*x[1]**o + ((-0.382321401318-0.448626078897j))*x[1]
            ref[(1, 3, 2, 3)]=(-0.192037505375+0.442988149085j)/(o+1.)+((-0.251682581516+0.162867391409j))+((-0.440556804929-0.972055426069j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.368904235431+0.597849194594j)*x[0]**o + ((-0.493341594542-0.28698709567j))*x[0] + ((0.995146758583+0.696373952006j))*x[1]**o + ((-0.700799344612-0.832956434405j))*x[1]
            ref[(2, 0, 0, 0)]=(0.995146758583+0.696373952006j)/(o+1.)+((-0.597070469577-0.559971765037j))+((0.368904235431+0.597849194594j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.734534746378+0.989660352581j)*x[0]**o + ((-0.688047562095+0.893347056271j))*x[0] + ((0.217616920402+0.868049005342j))*x[1]**o + ((0.90466622477+0.550342984576j))*x[1]
            ref[(2, 0, 0, 1)]=(0.217616920402+0.868049005342j)/(o+1.)+((0.108309331337+0.721845020424j))+((-0.734534746378+0.989660352581j))*0.5**o
            arg[(2, 0, 0, 2)]=(0.314522097736-0.711402042968j)*x[0]**o + ((-0.818780633515+0.280601482006j))*x[0] + ((0.275307702969-0.663650703855j))*x[1]**o + ((0.168564786834+0.352155771151j))*x[1]
            ref[(2, 0, 0, 2)]=(0.275307702969-0.663650703855j)/(o+1.)+((-0.325107923341+0.316378626578j))+((0.314522097736-0.711402042968j))*0.5**o
            arg[(2, 0, 0, 3)]=(0.336028471534+0.915803674624j)*x[0]**o + ((0.351425487108-0.97007910349j))*x[0] + ((-0.985312629404-0.33614305496j))*x[1]**o + ((-0.827980129669-0.208523196744j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.985312629404-0.33614305496j)/(o+1.)+((-0.23827732128-0.589301150117j))+((0.336028471534+0.915803674624j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.52826135802-0.684433928504j)*x[0]**o + ((0.784629103512-0.310515815815j))*x[0] + ((-0.578483774863+0.698127844396j))*x[1]**o + ((-0.913039651654-0.0977060397278j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.578483774863+0.698127844396j)/(o+1.)+((-0.0642052740711-0.204110927771j))+((-0.52826135802-0.684433928504j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.618087952137+0.726928077359j)*x[0]**o + ((0.629807632744-0.106077978591j))*x[0] + ((0.322322660746-0.970365862575j))*x[1]**o + ((-0.469499250617-0.298620555734j))*x[1]
            ref[(2, 0, 1, 1)]=(0.322322660746-0.970365862575j)/(o+1.)+((0.0801541910636-0.202349267163j))+((0.618087952137+0.726928077359j))*0.5**o
            arg[(2, 0, 1, 2)]=(0.0628611714441-0.560622042397j)*x[0]**o + ((-0.133384110108-0.263995006712j))*x[0] + ((-0.225335016433-0.642475624273j))*x[1]**o + ((0.280066938142-0.105585446125j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.225335016433-0.642475624273j)/(o+1.)+((0.073341414017-0.184790226418j))+((0.0628611714441-0.560622042397j))*0.5**o
            arg[(2, 0, 1, 3)]=(-0.958465850476+0.218549141806j)*x[0]**o + ((0.0287818165933+0.257287679617j))*x[0] + ((0.161263711477-0.510564466611j))*x[1]**o + ((0.771771997393+0.330623243644j))*x[1]
            ref[(2, 0, 1, 3)]=(0.161263711477-0.510564466611j)/(o+1.)+((0.400276906993+0.29395546163j))+((-0.958465850476+0.218549141806j))*0.5**o
            arg[(2, 0, 2, 0)]=(0.031037104346+0.872567712733j)*x[0]**o + ((0.171626168796-0.899353870547j))*x[0] + ((0.696119690891+0.14489335615j))*x[1]**o + ((0.101988843744-0.326822974725j))*x[1]
            ref[(2, 0, 2, 0)]=(0.696119690891+0.14489335615j)/(o+1.)+((0.13680750627-0.613088422636j))+((0.031037104346+0.872567712733j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.910555625893+0.0476401884751j)*x[0]**o + ((0.000911234486975-0.239963493073j))*x[0] + ((-0.290728625198-0.762096793996j))*x[1]**o + ((-0.256843690303-0.0509683654529j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.290728625198-0.762096793996j)/(o+1.)+((-0.127966227908-0.145465929263j))+((-0.910555625893+0.0476401884751j))*0.5**o
            arg[(2, 0, 2, 2)]=(-0.206773990633+0.484737017021j)*x[0]**o + ((0.0186972426097-0.55538016424j))*x[0] + ((-0.0355858023325+0.155979422393j))*x[1]**o + ((-0.555033838459-0.826364076552j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.0355858023325+0.155979422393j)/(o+1.)+((-0.268168297925-0.690872120396j))+((-0.206773990633+0.484737017021j))*0.5**o
            arg[(2, 0, 2, 3)]=(-0.774177241579-0.189268678067j)*x[0]**o + ((-0.46117086107-0.27530660929j))*x[0] + ((0.396771868935-0.611634681205j))*x[1]**o + ((-0.340272048111-0.863188613186j))*x[1]
            ref[(2, 0, 2, 3)]=(0.396771868935-0.611634681205j)/(o+1.)+((-0.400721454591-0.569247611238j))+((-0.774177241579-0.189268678067j))*0.5**o
            arg[(2, 1, 0, 0)]=(0.731622309616+0.966864141375j)*x[0]**o + ((-0.380608358479-0.875958620821j))*x[0] + ((0.0574081634813+0.00566097396189j))*x[1]**o + ((-0.632628992063+0.598497390459j))*x[1]
            ref[(2, 1, 0, 0)]=(0.0574081634813+0.00566097396189j)/(o+1.)+((-0.506618675271-0.138730615181j))+((0.731622309616+0.966864141375j))*0.5**o
            arg[(2, 1, 0, 1)]=(0.846483206857+0.37577105578j)*x[0]**o + ((0.91953021301-0.264793229785j))*x[0] + ((0.683123418138+0.642316699204j))*x[1]**o + ((-0.023642315369-0.72976784088j))*x[1]
            ref[(2, 1, 0, 1)]=(0.683123418138+0.642316699204j)/(o+1.)+((0.44794394882-0.497280535332j))+((0.846483206857+0.37577105578j))*0.5**o
            arg[(2, 1, 0, 2)]=(0.328997524566+0.424948401052j)*x[0]**o + ((-0.361393136527+0.0092570496016j))*x[0] + ((-0.659298496149-0.0578975030967j))*x[1]**o + ((-0.579250457616-0.484713561481j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.659298496149-0.0578975030967j)/(o+1.)+((-0.470321797072-0.23772825594j))+((0.328997524566+0.424948401052j))*0.5**o
            arg[(2, 1, 0, 3)]=(0.561084545754-0.820899658141j)*x[0]**o + ((-0.520566869471+0.334898198385j))*x[0] + ((-0.110849354719-0.478403869607j))*x[1]**o + ((-0.378486611046-0.428512548391j))*x[1]
            ref[(2, 1, 0, 3)]=(-0.110849354719-0.478403869607j)/(o+1.)+((-0.449526740259-0.0468071750028j))+((0.561084545754-0.820899658141j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.208098629877+0.340167946969j)*x[0]**o + ((-0.314873099517-0.702677541176j))*x[0] + ((-0.341187559039-0.478639708087j))*x[1]**o + ((0.555370233176-0.752273106233j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.341187559039-0.478639708087j)/(o+1.)+((0.12024856683-0.727475323705j))+((0.208098629877+0.340167946969j))*0.5**o
            arg[(2, 1, 1, 1)]=(0.918818362636-0.156096483835j)*x[0]**o + ((0.586455995919-0.213714068822j))*x[0] + ((0.842528595467-0.592509486436j))*x[1]**o + ((-0.164731458193-0.0220996869756j))*x[1]
            ref[(2, 1, 1, 1)]=(0.842528595467-0.592509486436j)/(o+1.)+((0.210862268863-0.117906877899j))+((0.918818362636-0.156096483835j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.429045686244+0.537116125187j)*x[0]**o + ((-0.0152420039836-0.193128922619j))*x[0] + ((0.278831790014-0.402062617792j))*x[1]**o + ((-0.802525795248+0.0109313877042j))*x[1]
            ref[(2, 1, 1, 2)]=(0.278831790014-0.402062617792j)/(o+1.)+((-0.408883899616-0.0910987674573j))+((0.429045686244+0.537116125187j))*0.5**o
            arg[(2, 1, 1, 3)]=(-0.691918852629+0.013998920418j)*x[0]**o + ((0.105335642804+0.00589229259488j))*x[0] + ((0.193726356204-0.534073077388j))*x[1]**o + ((0.075365999889+0.859477498207j))*x[1]
            ref[(2, 1, 1, 3)]=(0.193726356204-0.534073077388j)/(o+1.)+((0.0903508213467+0.432684895401j))+((-0.691918852629+0.013998920418j))*0.5**o
            arg[(2, 1, 2, 0)]=(0.140214904802-0.32157205476j)*x[0]**o + ((0.165986929404+0.53009294033j))*x[0] + ((-0.90870546057+0.670051496791j))*x[1]**o + ((0.255625291899-0.331053552657j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.90870546057+0.670051496791j)/(o+1.)+((0.210806110651+0.0995196938365j))+((0.140214904802-0.32157205476j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.193321696518-0.0580955685398j)*x[0]**o + ((0.137716295719-0.265305622658j))*x[0] + ((-0.929900903341-0.933806740499j))*x[1]**o + ((-0.180782192639+0.9580646953j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.929900903341-0.933806740499j)/(o+1.)+((-0.02153294846+0.346379536321j))+((-0.193321696518-0.0580955685398j))*0.5**o
            arg[(2, 1, 2, 2)]=(-0.701060554547-0.720639123095j)*x[0]**o + ((-0.351470895038-0.377245598639j))*x[0] + ((-0.267316015467-0.597328124607j))*x[1]**o + ((-0.606275725349+0.791001410028j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.267316015467-0.597328124607j)/(o+1.)+((-0.478873310194+0.206877905695j))+((-0.701060554547-0.720639123095j))*0.5**o
            arg[(2, 1, 2, 3)]=(-0.152061009333+0.335729186294j)*x[0]**o + ((-0.841772024467+0.379378056576j))*x[0] + ((-0.380648726834+0.276059785946j))*x[1]**o + ((-0.593783478051-0.0177266086656j))*x[1]
            ref[(2, 1, 2, 3)]=(-0.380648726834+0.276059785946j)/(o+1.)+((-0.717777751259+0.180825723955j))+((-0.152061009333+0.335729186294j))*0.5**o
            arg[(2, 2, 0, 0)]=(0.634186920195-0.821373001124j)*x[0]**o + ((0.316102911406+0.720970921224j))*x[0] + ((0.952579974206-0.789719170917j))*x[1]**o + ((-0.649528450841+0.786037600875j))*x[1]
            ref[(2, 2, 0, 0)]=(0.952579974206-0.789719170917j)/(o+1.)+((-0.166712769718+0.75350426105j))+((0.634186920195-0.821373001124j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.203349640446+0.507437447698j)*x[0]**o + ((-0.989693858205-0.364004353671j))*x[0] + ((-0.328464647694+0.715038769237j))*x[1]**o + ((-0.957080144447-0.965711745682j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.328464647694+0.715038769237j)/(o+1.)+((-0.973387001326-0.664858049676j))+((0.203349640446+0.507437447698j))*0.5**o
            arg[(2, 2, 0, 2)]=(-0.531862650037-0.335223169146j)*x[0]**o + ((-0.616526908166+0.156024717535j))*x[0] + ((-0.273731892443+0.188098703716j))*x[1]**o + ((-0.966302170578-0.0274527048991j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.273731892443+0.188098703716j)/(o+1.)+((-0.791414539372+0.0642860063181j))+((-0.531862650037-0.335223169146j))*0.5**o
            arg[(2, 2, 0, 3)]=(-0.922159720964-0.125169051039j)*x[0]**o + ((-0.510962142633-0.147493411259j))*x[0] + ((0.355506289631-0.0446803250445j))*x[1]**o + ((-0.445471610046-0.889335888783j))*x[1]
            ref[(2, 2, 0, 3)]=(0.355506289631-0.0446803250445j)/(o+1.)+((-0.47821687634-0.518414650021j))+((-0.922159720964-0.125169051039j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.383441903193-0.843002896274j)*x[0]**o + ((0.583807709642+0.969854434299j))*x[0] + ((0.837593640098+0.302355046005j))*x[1]**o + ((-0.748743533983+0.261114038547j))*x[1]
            ref[(2, 2, 1, 0)]=(0.837593640098+0.302355046005j)/(o+1.)+((-0.0824679121707+0.615484236423j))+((0.383441903193-0.843002896274j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.757477507348-0.877133291137j)*x[0]**o + ((-0.321420551387+0.896179500588j))*x[0] + ((-0.410556965248+0.40433821314j))*x[1]**o + ((0.420718139089+0.403239063673j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.410556965248+0.40433821314j)/(o+1.)+((0.0496487938512+0.64970928213j))+((0.757477507348-0.877133291137j))*0.5**o
            arg[(2, 2, 1, 2)]=(0.389828099862+0.74940659395j)*x[0]**o + ((-0.232011431604+0.830500908555j))*x[0] + ((-0.925382526993+0.42825216384j))*x[1]**o + ((0.381585424186-0.904022491086j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.925382526993+0.42825216384j)/(o+1.)+((0.0747869962909-0.0367607912653j))+((0.389828099862+0.74940659395j))*0.5**o
            arg[(2, 2, 1, 3)]=(0.664280676302-0.666318781158j)*x[0]**o + ((-0.902015158348+0.803597140129j))*x[0] + ((0.804872881221+0.102690704755j))*x[1]**o + ((0.692128614933-0.0754279566907j))*x[1]
            ref[(2, 2, 1, 3)]=(0.804872881221+0.102690704755j)/(o+1.)+((-0.104943271707+0.364084591719j))+((0.664280676302-0.666318781158j))*0.5**o
            arg[(2, 2, 2, 0)]=(-0.84957123519-0.446626271395j)*x[0]**o + ((0.623614341422+0.746994810022j))*x[0] + ((0.360500610452-0.755339455971j))*x[1]**o + ((0.276329179429-0.648278471493j))*x[1]
            ref[(2, 2, 2, 0)]=(0.360500610452-0.755339455971j)/(o+1.)+((0.449971760426+0.0493581692647j))+((-0.84957123519-0.446626271395j))*0.5**o
            arg[(2, 2, 2, 1)]=(-0.551406919766-0.983902506636j)*x[0]**o + ((0.28228913633-0.120488132012j))*x[0] + ((0.684446736799+0.223308720317j))*x[1]**o + ((-0.627017988598-0.784876146205j))*x[1]
            ref[(2, 2, 2, 1)]=(0.684446736799+0.223308720317j)/(o+1.)+((-0.172364426134-0.452682139108j))+((-0.551406919766-0.983902506636j))*0.5**o
            arg[(2, 2, 2, 2)]=(-0.589886673416-0.292910630104j)*x[0]**o + ((0.577249376457+0.608198187709j))*x[0] + ((-0.290609582821+0.37322796821j))*x[1]**o + ((-0.444780017826+0.979781467712j))*x[1]
            ref[(2, 2, 2, 2)]=(-0.290609582821+0.37322796821j)/(o+1.)+((0.0662346793154+0.793989827711j))+((-0.589886673416-0.292910630104j))*0.5**o
            arg[(2, 2, 2, 3)]=(-0.614591427701-0.932158384915j)*x[0]**o + ((-0.134910768876-0.240586210101j))*x[0] + ((0.582587241808+0.702816735622j))*x[1]**o + ((0.722872160729-0.485191295077j))*x[1]
            ref[(2, 2, 2, 3)]=(0.582587241808+0.702816735622j)/(o+1.)+((0.293980695927-0.362888752589j))+((-0.614591427701-0.932158384915j))*0.5**o
            arg[(2, 3, 0, 0)]=(0.619299909117-0.764050230968j)*x[0]**o + ((-0.35735695281-0.26480745053j))*x[0] + ((-0.0806608086788-0.753304725374j))*x[1]**o + ((-0.0449580553344-0.101856282675j))*x[1]
            ref[(2, 3, 0, 0)]=(-0.0806608086788-0.753304725374j)/(o+1.)+((-0.201157504072-0.183331866603j))+((0.619299909117-0.764050230968j))*0.5**o
            arg[(2, 3, 0, 1)]=(0.0852430611939-0.526114119789j)*x[0]**o + ((0.784071956334-0.554335772047j))*x[0] + ((-0.451661775921+0.859189918452j))*x[1]**o + ((0.260134515711-0.652052807706j))*x[1]
            ref[(2, 3, 0, 1)]=(-0.451661775921+0.859189918452j)/(o+1.)+((0.522103236022-0.603194289877j))+((0.0852430611939-0.526114119789j))*0.5**o
            arg[(2, 3, 0, 2)]=(0.0948950786814-0.0739014341024j)*x[0]**o + ((0.869563991923+0.871842832281j))*x[0] + ((-0.965834134807-0.804125341155j))*x[1]**o + ((-0.438578477557-0.094181615967j))*x[1]
            ref[(2, 3, 0, 2)]=(-0.965834134807-0.804125341155j)/(o+1.)+((0.215492757183+0.388830608157j))+((0.0948950786814-0.0739014341024j))*0.5**o
            arg[(2, 3, 0, 3)]=(0.441802052122-0.604223739673j)*x[0]**o + ((0.673366529694-0.13394533887j))*x[0] + ((-0.441679905005+0.130596295636j))*x[1]**o + ((-0.96870001781+0.38414045616j))*x[1]
            ref[(2, 3, 0, 3)]=(-0.441679905005+0.130596295636j)/(o+1.)+((-0.147666744058+0.125097558645j))+((0.441802052122-0.604223739673j))*0.5**o
            arg[(2, 3, 1, 0)]=(0.281856461014-0.069990723348j)*x[0]**o + ((-0.284013724254-0.69645954237j))*x[0] + ((0.492051504434+0.44867323471j))*x[1]**o + ((-0.0941410784655+0.421052350839j))*x[1]
            ref[(2, 3, 1, 0)]=(0.492051504434+0.44867323471j)/(o+1.)+((-0.18907740136-0.137703595766j))+((0.281856461014-0.069990723348j))*0.5**o
            arg[(2, 3, 1, 1)]=(0.495031716957-0.531888048323j)*x[0]**o + ((0.891257002395-0.61649219481j))*x[0] + ((-0.662141475164-0.627247925935j))*x[1]**o + ((0.357226681032+0.597628012674j))*x[1]
            ref[(2, 3, 1, 1)]=(-0.662141475164-0.627247925935j)/(o+1.)+((0.624241841714-0.00943209106839j))+((0.495031716957-0.531888048323j))*0.5**o
            arg[(2, 3, 1, 2)]=(-0.872043331547+0.341431855304j)*x[0]**o + ((0.877250390896+0.760107016709j))*x[0] + ((0.638886168192+0.880162370373j))*x[1]**o + ((-0.249479740789-0.67432324553j))*x[1]
            ref[(2, 3, 1, 2)]=(0.638886168192+0.880162370373j)/(o+1.)+((0.313885325054+0.0428918855898j))+((-0.872043331547+0.341431855304j))*0.5**o
            arg[(2, 3, 1, 3)]=(0.216432318139-0.315199238853j)*x[0]**o + ((0.462653593648+0.522918597792j))*x[0] + ((0.82760455107-0.24919348733j))*x[1]**o + ((-0.555285217001+0.952041168827j))*x[1]
            ref[(2, 3, 1, 3)]=(0.82760455107-0.24919348733j)/(o+1.)+((-0.0463158116767+0.73747988331j))+((0.216432318139-0.315199238853j))*0.5**o
            arg[(2, 3, 2, 0)]=(-0.689267747593-0.979558020402j)*x[0]**o + ((0.665145210056+0.354484516705j))*x[0] + ((0.518333103917-0.534457450269j))*x[1]**o + ((-0.627735256666-0.33382327636j))*x[1]
            ref[(2, 3, 2, 0)]=(0.518333103917-0.534457450269j)/(o+1.)+((0.0187049766951+0.0103306201725j))+((-0.689267747593-0.979558020402j))*0.5**o
            arg[(2, 3, 2, 1)]=(-0.221482939728+0.831051368915j)*x[0]**o + ((0.00756138199623+0.358720841953j))*x[0] + ((0.939319530959+0.307078320879j))*x[1]**o + ((0.520574925243+0.0335386798784j))*x[1]
            ref[(2, 3, 2, 1)]=(0.939319530959+0.307078320879j)/(o+1.)+((0.264068153619+0.196129760916j))+((-0.221482939728+0.831051368915j))*0.5**o
            arg[(2, 3, 2, 2)]=(-0.750275086228+0.473215804545j)*x[0]**o + ((-0.255235136296-0.43933132656j))*x[0] + ((0.0731690037585-0.628167172207j))*x[1]**o + ((0.540162376295+0.657359441514j))*x[1]
            ref[(2, 3, 2, 2)]=(0.0731690037585-0.628167172207j)/(o+1.)+((0.14246362+0.109014057477j))+((-0.750275086228+0.473215804545j))*0.5**o
            arg[(2, 3, 2, 3)]=(-0.343198380657-0.74722597761j)*x[0]**o + ((-0.317565050825+0.284828715766j))*x[0] + ((-0.495809018731-0.49748375494j))*x[1]**o + ((-0.151533509761-0.803512938088j))*x[1]
            ref[(2, 3, 2, 3)]=(-0.495809018731-0.49748375494j)/(o+1.)+((-0.234549280293-0.259342111161j))+((-0.343198380657-0.74722597761j))*0.5**o
            arg[(3, 0, 0, 0)]=(-0.212355870622+0.87728316804j)*x[0]**o + ((0.903627695639-0.973372378093j))*x[0] + ((0.780806838885-0.337695242708j))*x[1]**o + ((-0.506444272665+0.424521513663j))*x[1]
            ref[(3, 0, 0, 0)]=(0.780806838885-0.337695242708j)/(o+1.)+((0.198591711487-0.274425432215j))+((-0.212355870622+0.87728316804j))*0.5**o
            arg[(3, 0, 0, 1)]=(-0.403274076548+0.817273779993j)*x[0]**o + ((0.191224315973+0.158565278043j))*x[0] + ((0.197330469015+0.928482262426j))*x[1]**o + ((0.349754063838+0.384808497517j))*x[1]
            ref[(3, 0, 0, 1)]=(0.197330469015+0.928482262426j)/(o+1.)+((0.270489189906+0.27168688778j))+((-0.403274076548+0.817273779993j))*0.5**o
            arg[(3, 0, 0, 2)]=(0.934022921411-0.534014161813j)*x[0]**o + ((0.818880620431+0.0174924495011j))*x[0] + ((-0.162126706917+0.133799663422j))*x[1]**o + ((-0.428112446853+0.520950470245j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.162126706917+0.133799663422j)/(o+1.)+((0.195384086789+0.269221459873j))+((0.934022921411-0.534014161813j))*0.5**o
            arg[(3, 0, 0, 3)]=(0.184582068773-0.410462807643j)*x[0]**o + ((0.57966137297-0.714335786533j))*x[0] + ((0.740483025537+0.791067227653j))*x[1]**o + ((-0.0593105350619-0.87766773117j))*x[1]
            ref[(3, 0, 0, 3)]=(0.740483025537+0.791067227653j)/(o+1.)+((0.260175418954-0.796001758852j))+((0.184582068773-0.410462807643j))*0.5**o
            arg[(3, 0, 1, 0)]=(0.601208535271+0.00637193721914j)*x[0]**o + ((0.980987551196+0.199209383893j))*x[0] + ((-0.674336144939+0.65614331351j))*x[1]**o + ((0.262390394532+0.528442406577j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.674336144939+0.65614331351j)/(o+1.)+((0.621688972864+0.363825895235j))+((0.601208535271+0.00637193721914j))*0.5**o
            arg[(3, 0, 1, 1)]=(-0.555767961101-0.159373534881j)*x[0]**o + ((0.897920234306+0.600482363971j))*x[0] + ((-0.433045754903+0.481499966503j))*x[1]**o + ((-0.497920523511-0.544622133783j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.433045754903+0.481499966503j)/(o+1.)+((0.199999855398+0.0279301150944j))+((-0.555767961101-0.159373534881j))*0.5**o
            arg[(3, 0, 1, 2)]=(0.594091123375+0.0610523978311j)*x[0]**o + ((0.415655270136-0.544626663472j))*x[0] + ((-0.238322803492+0.861175474648j))*x[1]**o + ((0.106783743008+0.956166096003j))*x[1]
            ref[(3, 0, 1, 2)]=(-0.238322803492+0.861175474648j)/(o+1.)+((0.261219506572+0.205769716266j))+((0.594091123375+0.0610523978311j))*0.5**o
            arg[(3, 0, 1, 3)]=(0.41741333489-0.855685535986j)*x[0]**o + ((-0.70422015147-0.0876028668063j))*x[0] + ((0.0376118119342-0.478666704682j))*x[1]**o + ((0.487224904938-0.375257383693j))*x[1]
            ref[(3, 0, 1, 3)]=(0.0376118119342-0.478666704682j)/(o+1.)+((-0.108497623266-0.23143012525j))+((0.41741333489-0.855685535986j))*0.5**o
            arg[(3, 0, 2, 0)]=(0.87138471939+0.344616455485j)*x[0]**o + ((-0.577351893693+0.944695146721j))*x[0] + ((-0.567769241596-0.651731477229j))*x[1]**o + ((0.677109345797+0.67901073304j))*x[1]
            ref[(3, 0, 2, 0)]=(-0.567769241596-0.651731477229j)/(o+1.)+((0.0498787260525+0.81185293988j))+((0.87138471939+0.344616455485j))*0.5**o
            arg[(3, 0, 2, 1)]=(-0.838030793724+0.327708762655j)*x[0]**o + ((-0.517224113276-0.58049815925j))*x[0] + ((-0.435005389365-0.837035441581j))*x[1]**o + ((0.571477638337-0.895098630887j))*x[1]
            ref[(3, 0, 2, 1)]=(-0.435005389365-0.837035441581j)/(o+1.)+((0.0271267625307-0.737798395069j))+((-0.838030793724+0.327708762655j))*0.5**o
            arg[(3, 0, 2, 2)]=(0.0212999885281-0.452575254718j)*x[0]**o + ((-0.554903627947+0.820368655615j))*x[0] + ((0.186627007931-0.121424053169j))*x[1]**o + ((-0.934760881556+0.50555629339j))*x[1]
            ref[(3, 0, 2, 2)]=(0.186627007931-0.121424053169j)/(o+1.)+((-0.744832254751+0.662962474502j))+((0.0212999885281-0.452575254718j))*0.5**o
            arg[(3, 0, 2, 3)]=(0.224888360619-0.451402770244j)*x[0]**o + ((0.911060719936+0.898037088917j))*x[0] + ((-0.411463162496+0.095532514542j))*x[1]**o + ((-0.233436958274+0.180039228302j))*x[1]
            ref[(3, 0, 2, 3)]=(-0.411463162496+0.095532514542j)/(o+1.)+((0.338811880831+0.53903815861j))+((0.224888360619-0.451402770244j))*0.5**o
            arg[(3, 1, 0, 0)]=(-0.778884396785+0.910581709906j)*x[0]**o + ((-0.680802015738-0.520109292739j))*x[0] + ((-0.0503014473868+0.207295298778j))*x[1]**o + ((0.4813632184-0.345604288979j))*x[1]
            ref[(3, 1, 0, 0)]=(-0.0503014473868+0.207295298778j)/(o+1.)+((-0.099719398669-0.432856790859j))+((-0.778884396785+0.910581709906j))*0.5**o
            arg[(3, 1, 0, 1)]=(0.870229585654-0.266342290721j)*x[0]**o + ((-0.841415379835+0.811757906175j))*x[0] + ((0.418549342275+0.169259499135j))*x[1]**o + ((-0.80872959597-0.465406323508j))*x[1]
            ref[(3, 1, 0, 1)]=(0.418549342275+0.169259499135j)/(o+1.)+((-0.825072487903+0.173175791334j))+((0.870229585654-0.266342290721j))*0.5**o
            arg[(3, 1, 0, 2)]=(0.769277831366+0.855274468882j)*x[0]**o + ((-0.526207007021-0.192737568123j))*x[0] + ((0.653463302079+0.0955020976593j))*x[1]**o + ((-0.186189424579+0.985334940671j))*x[1]
            ref[(3, 1, 0, 2)]=(0.653463302079+0.0955020976593j)/(o+1.)+((-0.3561982158+0.396298686274j))+((0.769277831366+0.855274468882j))*0.5**o
            arg[(3, 1, 0, 3)]=(-0.740546018977+0.959539415928j)*x[0]**o + ((-0.05976486054-0.484892420478j))*x[0] + ((-0.424455615616+0.76731485284j))*x[1]**o + ((-0.650245270171-0.704347586135j))*x[1]
            ref[(3, 1, 0, 3)]=(-0.424455615616+0.76731485284j)/(o+1.)+((-0.355005065356-0.594620003307j))+((-0.740546018977+0.959539415928j))*0.5**o
            arg[(3, 1, 1, 0)]=(0.760211482289+0.406006543393j)*x[0]**o + ((-0.142074564193+0.116092622964j))*x[0] + ((0.939565795001+0.724301819555j))*x[1]**o + ((0.0287225437969+0.220244226347j))*x[1]
            ref[(3, 1, 1, 0)]=(0.939565795001+0.724301819555j)/(o+1.)+((-0.0566760101981+0.168168424655j))+((0.760211482289+0.406006543393j))*0.5**o
            arg[(3, 1, 1, 1)]=(0.307070086093-0.572260806577j)*x[0]**o + ((0.449042324066-0.459755071433j))*x[0] + ((0.94119162352+0.630750345085j))*x[1]**o + ((-0.638964001642-0.765111418712j))*x[1]
            ref[(3, 1, 1, 1)]=(0.94119162352+0.630750345085j)/(o+1.)+((-0.0949608387884-0.612433245072j))+((0.307070086093-0.572260806577j))*0.5**o
            arg[(3, 1, 1, 2)]=(0.784668047637-0.690239795555j)*x[0]**o + ((0.936751182644-0.985611891141j))*x[0] + ((0.33532841433+0.859718888056j))*x[1]**o + ((0.52701660484-0.162106171392j))*x[1]
            ref[(3, 1, 1, 2)]=(0.33532841433+0.859718888056j)/(o+1.)+((0.731883893742-0.573859031266j))+((0.784668047637-0.690239795555j))*0.5**o
            arg[(3, 1, 1, 3)]=(0.721617339711+0.526093903154j)*x[0]**o + ((0.852684353956-0.6034235968j))*x[0] + ((0.609941163709+0.339846557604j))*x[1]**o + ((0.959051480343+0.568382526738j))*x[1]
            ref[(3, 1, 1, 3)]=(0.609941163709+0.339846557604j)/(o+1.)+((0.90586791715-0.0175205350306j))+((0.721617339711+0.526093903154j))*0.5**o
            arg[(3, 1, 2, 0)]=(0.377819630247-0.110563169185j)*x[0]**o + ((0.870150792667-0.911161562372j))*x[0] + ((0.674212263268+0.0107120461318j))*x[1]**o + ((0.457239549671+0.00901576865788j))*x[1]
            ref[(3, 1, 2, 0)]=(0.674212263268+0.0107120461318j)/(o+1.)+((0.663695171169-0.451072896857j))+((0.377819630247-0.110563169185j))*0.5**o
            arg[(3, 1, 2, 1)]=(0.109023571776-0.0877952542948j)*x[0]**o + ((0.509524853126-0.437138039212j))*x[0] + ((0.189080680538-0.678379833671j))*x[1]**o + ((-0.598931191676-0.649191163635j))*x[1]
            ref[(3, 1, 2, 1)]=(0.189080680538-0.678379833671j)/(o+1.)+((-0.0447031692754-0.543164601424j))+((0.109023571776-0.0877952542948j))*0.5**o
            arg[(3, 1, 2, 2)]=(0.987214597463+0.6659779389j)*x[0]**o + ((-0.202586767173-0.199247373784j))*x[0] + ((-0.390372417555-0.410601076929j))*x[1]**o + ((0.258677305421-0.248908148669j))*x[1]
            ref[(3, 1, 2, 2)]=(-0.390372417555-0.410601076929j)/(o+1.)+((0.0280452691241-0.224077761226j))+((0.987214597463+0.6659779389j))*0.5**o
            arg[(3, 1, 2, 3)]=(-0.229687782046+0.672011500534j)*x[0]**o + ((-0.577027855146-0.687434573072j))*x[0] + ((-0.566581532302+0.641433006643j))*x[1]**o + ((-0.214171437415+0.045603817648j))*x[1]
            ref[(3, 1, 2, 3)]=(-0.566581532302+0.641433006643j)/(o+1.)+((-0.395599646281-0.320915377712j))+((-0.229687782046+0.672011500534j))*0.5**o
            arg[(3, 2, 0, 0)]=(-0.890453028818+0.903350079185j)*x[0]**o + ((0.35771953883-0.695422173628j))*x[0] + ((-0.535515513382-0.530806134033j))*x[1]**o + ((0.293766962447+0.0686876420164j))*x[1]
            ref[(3, 2, 0, 0)]=(-0.535515513382-0.530806134033j)/(o+1.)+((0.325743250639-0.313367265806j))+((-0.890453028818+0.903350079185j))*0.5**o
            arg[(3, 2, 0, 1)]=(0.96022914222+0.867553784265j)*x[0]**o + ((0.681478862453-0.184516253909j))*x[0] + ((0.711392297894-0.0439882031608j))*x[1]**o + ((0.86881841646+0.690558117391j))*x[1]
            ref[(3, 2, 0, 1)]=(0.711392297894-0.0439882031608j)/(o+1.)+((0.775148639456+0.253020931741j))+((0.96022914222+0.867553784265j))*0.5**o
            arg[(3, 2, 0, 2)]=(-0.166352700056+0.564047636725j)*x[0]**o + ((0.371551487399+0.334380729188j))*x[0] + ((-0.114693196682+0.445703679521j))*x[1]**o + ((-0.476395308506-0.679537023732j))*x[1]
            ref[(3, 2, 0, 2)]=(-0.114693196682+0.445703679521j)/(o+1.)+((-0.0524219105534-0.172578147272j))+((-0.166352700056+0.564047636725j))*0.5**o
            arg[(3, 2, 0, 3)]=(0.518578587581-0.903374595445j)*x[0]**o + ((-0.881430988396+0.350627785487j))*x[0] + ((-0.376311870741+0.477720566065j))*x[1]**o + ((0.824154271969-0.535676018013j))*x[1]
            ref[(3, 2, 0, 3)]=(-0.376311870741+0.477720566065j)/(o+1.)+((-0.0286383582136-0.0925241162633j))+((0.518578587581-0.903374595445j))*0.5**o
            arg[(3, 2, 1, 0)]=(-0.205838058842-0.0403411091352j)*x[0]**o + ((-0.90308805429-0.202548034699j))*x[0] + ((-0.591675436603+0.545550131881j))*x[1]**o + ((0.962912590285-0.133652041855j))*x[1]
            ref[(3, 2, 1, 0)]=(-0.591675436603+0.545550131881j)/(o+1.)+((0.0299122679976-0.168100038277j))+((-0.205838058842-0.0403411091352j))*0.5**o
            arg[(3, 2, 1, 1)]=(-0.968733484765-0.317093641185j)*x[0]**o + ((0.723408412128+0.324735780122j))*x[0] + ((-0.195643847194+0.395533104474j))*x[1]**o + ((0.319824692854-0.945290857695j))*x[1]
            ref[(3, 2, 1, 1)]=(-0.195643847194+0.395533104474j)/(o+1.)+((0.521616552491-0.310277538787j))+((-0.968733484765-0.317093641185j))*0.5**o
            arg[(3, 2, 1, 2)]=(0.433357841871+0.870502693533j)*x[0]**o + ((0.286588845615+0.357824036156j))*x[0] + ((-0.773322776709-0.00149786104834j))*x[1]**o + ((0.227540028237-0.337903901811j))*x[1]
            ref[(3, 2, 1, 2)]=(-0.773322776709-0.00149786104834j)/(o+1.)+((0.257064436926+0.00996006717247j))+((0.433357841871+0.870502693533j))*0.5**o
            arg[(3, 2, 1, 3)]=(-0.863488490986+0.905895896876j)*x[0]**o + ((-0.528041275136-0.271691060315j))*x[0] + ((-0.69342923456-0.0473724874209j))*x[1]**o + ((0.880718702719-0.615879178295j))*x[1]
            ref[(3, 2, 1, 3)]=(-0.69342923456-0.0473724874209j)/(o+1.)+((0.176338713791-0.443785119305j))+((-0.863488490986+0.905895896876j))*0.5**o
            arg[(3, 2, 2, 0)]=(0.473869368821+0.521087113669j)*x[0]**o + ((-0.542079078995+0.67065997735j))*x[0] + ((-0.728205805344+0.171896395067j))*x[1]**o + ((-0.653135913271-0.588610660886j))*x[1]
            ref[(3, 2, 2, 0)]=(-0.728205805344+0.171896395067j)/(o+1.)+((-0.597607496133+0.0410246582322j))+((0.473869368821+0.521087113669j))*0.5**o
            arg[(3, 2, 2, 1)]=(0.798944017563-0.953047152905j)*x[0]**o + ((0.689262597793+0.395878648819j))*x[0] + ((0.186821078378-0.132267384975j))*x[1]**o + ((0.216156258356-0.0546162557288j))*x[1]
            ref[(3, 2, 2, 1)]=(0.186821078378-0.132267384975j)/(o+1.)+((0.452709428075+0.170631196545j))+((0.798944017563-0.953047152905j))*0.5**o
            arg[(3, 2, 2, 2)]=(-0.0440294776327-0.85787668095j)*x[0]**o + ((-0.571766687123-0.0826794294019j))*x[0] + ((-0.565738556244-0.161087062043j))*x[1]**o + ((-0.211724917608+0.782186472674j))*x[1]
            ref[(3, 2, 2, 2)]=(-0.565738556244-0.161087062043j)/(o+1.)+((-0.391745802366+0.349753521636j))+((-0.0440294776327-0.85787668095j))*0.5**o
            arg[(3, 2, 2, 3)]=(0.882104001493-0.41308391329j)*x[0]**o + ((0.349334222394+0.299544234197j))*x[0] + ((-0.600679709538-0.147969286635j))*x[1]**o + ((-0.743133105293+0.386704512606j))*x[1]
            ref[(3, 2, 2, 3)]=(-0.600679709538-0.147969286635j)/(o+1.)+((-0.196899441449+0.343124373401j))+((0.882104001493-0.41308391329j))*0.5**o
            arg[(3, 3, 0, 0)]=(-0.343455754711-0.147323528726j)*x[0]**o + ((-0.424908457249-0.32390051334j))*x[0] + ((0.897076231355-0.371878488274j))*x[1]**o + ((0.926118339677+0.292750136242j))*x[1]
            ref[(3, 3, 0, 0)]=(0.897076231355-0.371878488274j)/(o+1.)+((0.250604941214-0.0155751885492j))+((-0.343455754711-0.147323528726j))*0.5**o
            arg[(3, 3, 0, 1)]=(0.147544097069+0.296092193054j)*x[0]**o + ((-0.301288717114+0.865517003499j))*x[0] + ((0.643133863217-0.0550986450276j))*x[1]**o + ((-0.213399970343-0.953920956404j))*x[1]
            ref[(3, 3, 0, 1)]=(0.643133863217-0.0550986450276j)/(o+1.)+((-0.257344343728-0.0442019764526j))+((0.147544097069+0.296092193054j))*0.5**o
            arg[(3, 3, 0, 2)]=(-0.0353986681291-0.998461073011j)*x[0]**o + ((0.0145152548085+0.973753693172j))*x[0] + ((-0.398172181844-0.966442384295j))*x[1]**o + ((-0.621122404877+0.742745900352j))*x[1]
            ref[(3, 3, 0, 2)]=(-0.398172181844-0.966442384295j)/(o+1.)+((-0.303303575034+0.858249796762j))+((-0.0353986681291-0.998461073011j))*0.5**o
            arg[(3, 3, 0, 3)]=(-0.731615101324-0.726403311046j)*x[0]**o + ((0.210630093428+0.951627730793j))*x[0] + ((-0.661107591812+0.535152284731j))*x[1]**o + ((-0.344539319438-0.687324821755j))*x[1]
            ref[(3, 3, 0, 3)]=(-0.661107591812+0.535152284731j)/(o+1.)+((-0.0669546130048+0.132151454519j))+((-0.731615101324-0.726403311046j))*0.5**o
            arg[(3, 3, 1, 0)]=(-0.266473264858+0.37135966158j)*x[0]**o + ((-0.219943062504+0.696253207092j))*x[0] + ((-0.271947228291+0.748287511678j))*x[1]**o + ((0.417802585295-0.670483063297j))*x[1]
            ref[(3, 3, 1, 0)]=(-0.271947228291+0.748287511678j)/(o+1.)+((0.0989297613955+0.0128850718977j))+((-0.266473264858+0.37135966158j))*0.5**o
            arg[(3, 3, 1, 1)]=(0.345511467852-0.551164369703j)*x[0]**o + ((0.115034361366+0.58064906907j))*x[0] + ((0.424864905544+0.0374472359306j))*x[1]**o + ((0.722348910957-0.286976596152j))*x[1]
            ref[(3, 3, 1, 1)]=(0.424864905544+0.0374472359306j)/(o+1.)+((0.418691636161+0.146836236459j))+((0.345511467852-0.551164369703j))*0.5**o
            arg[(3, 3, 1, 2)]=(0.788966629935+0.051169694013j)*x[0]**o + ((0.746758764387-0.693776146022j))*x[0] + ((-0.0236473948033-0.704804498917j))*x[1]**o + ((-0.712202721694+0.034050344394j))*x[1]
            ref[(3, 3, 1, 2)]=(-0.0236473948033-0.704804498917j)/(o+1.)+((0.0172780213464-0.329862900814j))+((0.788966629935+0.051169694013j))*0.5**o
            arg[(3, 3, 1, 3)]=(-0.441509893653-0.203697701488j)*x[0]**o + ((-0.0619947845619-0.786783592974j))*x[0] + ((0.917426919999+0.156838975144j))*x[1]**o + ((0.00660832941232+0.893897796846j))*x[1]
            ref[(3, 3, 1, 3)]=(0.917426919999+0.156838975144j)/(o+1.)+((-0.0276932275748+0.0535571019361j))+((-0.441509893653-0.203697701488j))*0.5**o
            arg[(3, 3, 2, 0)]=(0.183003166718-0.900118144107j)*x[0]**o + ((0.560313270784+0.24752931637j))*x[0] + ((0.55892694447+0.0219849140477j))*x[1]**o + ((-0.936942718924-0.466998736369j))*x[1]
            ref[(3, 3, 2, 0)]=(0.55892694447+0.0219849140477j)/(o+1.)+((-0.18831472407-0.109734709999j))+((0.183003166718-0.900118144107j))*0.5**o
            arg[(3, 3, 2, 1)]=(0.260135086612+0.248387921149j)*x[0]**o + ((-0.353927777582-0.070447069507j))*x[0] + ((0.173337707135+0.827860770531j))*x[1]**o + ((-0.555723716738+0.662453503523j))*x[1]
            ref[(3, 3, 2, 1)]=(0.173337707135+0.827860770531j)/(o+1.)+((-0.45482574716+0.296003217008j))+((0.260135086612+0.248387921149j))*0.5**o
            arg[(3, 3, 2, 2)]=(0.670030583416+0.450920459731j)*x[0]**o + ((-0.812182071314-0.834166304027j))*x[0] + ((-0.64970316314-0.3590153211j))*x[1]**o + ((0.986517250716+0.409384314684j))*x[1]
            ref[(3, 3, 2, 2)]=(-0.64970316314-0.3590153211j)/(o+1.)+((0.0871675897009-0.212390994671j))+((0.670030583416+0.450920459731j))*0.5**o
            arg[(3, 3, 2, 3)]=(-0.0512115567753+0.463010233762j)*x[0]**o + ((0.3543362191+0.988406199056j))*x[0] + ((0.863890033372-0.202670982j))*x[1]**o + ((-0.0744802746746+0.156142066187j))*x[1]
            ref[(3, 3, 2, 3)]=(0.863890033372-0.202670982j)/(o+1.)+((0.139927972213+0.572274132621j))+((-0.0512115567753+0.463010233762j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(-0.788933405772+0.962440730243j)*x[0]**o + ((0.704022900765-0.735254731373j))*x[0] + ((0.193845566929-0.402996288266j))*x[1]**o + ((0.603178023886-0.65130042377j))*x[1] + ((0.0239851477578+0.476859819439j))*x[2]**o + ((0.473219536871+0.904645413002j))*x[2]
            ref[(0, 0, 0, 0)]=(0.217830714686+0.073863531173j)/(o+1.)+((0.890210230761-0.240954871071j))+((-0.788933405772+0.962440730243j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.726038457404-0.709980452821j)*x[0]**o + ((0.826954092362+0.36490414762j))*x[0] + ((0.129587376709-0.625690001008j))*x[1]**o + ((0.68161682603+0.362127204134j))*x[1] + ((-0.474107437115-0.978335194043j))*x[2]**o + ((-0.133375149262+0.442020936932j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.344520060406-1.60402519505j)/(o+1.)+((0.687597884565+0.584526144343j))+((-0.726038457404-0.709980452821j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.812686041772-0.464117026806j)*x[0]**o + ((0.708548026218-0.221082027614j))*x[0] + ((0.639990759478+0.225662553146j))*x[1]**o + ((0.328960933445-0.0206700024191j))*x[1] + ((0.0237942622408-0.770137947044j))*x[2]**o + ((0.914675812933-0.826544354902j))*x[2]
            ref[(0, 0, 0, 2)]=(0.663785021719-0.544475393897j)/(o+1.)+((0.976092386298-0.534148192467j))+((0.812686041772-0.464117026806j))*0.5**o
            arg[(0, 0, 0, 3)]=(0.533975742282-0.0207350571392j)*x[0]**o + ((-0.164266712316+0.975902143693j))*x[0] + ((-0.355338429857-0.352043746453j))*x[1]**o + ((-0.902405751646+0.192403719192j))*x[1] + ((-0.705753974748+0.0778997539873j))*x[2]**o + ((-0.125136449134-0.289800307313j))*x[2]
            ref[(0, 0, 0, 3)]=(-1.06109240461-0.274143992465j)/(o+1.)+((-0.595904456548+0.439252777786j))+((0.533975742282-0.0207350571392j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.014846692413+0.791753609091j)*x[0]**o + ((-0.447457747994-0.380700490156j))*x[0] + ((-0.593373021776+0.136167079134j))*x[1]**o + ((-0.86777038233+0.7866771418j))*x[1] + ((-0.762447860539+0.778394026346j))*x[2]**o + ((-0.109650829933-0.716549754494j))*x[2]
            ref[(0, 0, 1, 0)]=(-1.35582088232+0.91456110548j)/(o+1.)+((-0.712439480129-0.155286551425j))+((-0.014846692413+0.791753609091j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.281375435302-0.0968231657583j)*x[0]**o + ((-0.0988302594538-0.933581203056j))*x[0] + ((-0.745528450258-0.727657167091j))*x[1]**o + ((-0.524983083812+0.219304655721j))*x[1] + ((-0.86595992458+0.666539515083j))*x[2]**o + ((-0.443849104467+0.287245493078j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.61148837484-0.0611176520081j)/(o+1.)+((-0.533831223867-0.213515527128j))+((-0.281375435302-0.0968231657583j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.714754447018+0.949909201867j)*x[0]**o + ((0.136052472799+0.772390083058j))*x[0] + ((0.276296229263-0.386087685237j))*x[1]**o + ((-0.420238529281+0.212523614229j))*x[1] + ((-0.88809463904-0.531680022122j))*x[2]**o + ((-0.0329694982842+0.125423182421j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.611798409777-0.917767707359j)/(o+1.)+((-0.158577777383+0.555168439854j))+((-0.714754447018+0.949909201867j))*0.5**o
            arg[(0, 0, 1, 3)]=(-0.537149699871+0.0970814916605j)*x[0]**o + ((0.520588158432+0.199894037987j))*x[0] + ((0.292833905927-0.32544485783j))*x[1]**o + ((0.963789819996-0.550778692951j))*x[1] + ((-0.948879286557-0.0616782430655j))*x[2]**o + ((-0.890299498871+0.184033754207j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.65604538063-0.387123100895j)/(o+1.)+((0.297039239778-0.0834254503787j))+((-0.537149699871+0.0970814916605j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.70724255492+0.728376418675j)*x[0]**o + ((0.675720903841+0.0243322697845j))*x[0] + ((-0.468576592729-0.37846115502j))*x[1]**o + ((0.730812607353+0.729134631902j))*x[1] + ((-0.388332962034+0.738513635976j))*x[2]**o + ((0.710322580134+0.147128299388j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.856909554763+0.360052480956j)/(o+1.)+((1.05842804566+0.450297600538j))+((0.70724255492+0.728376418675j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.95379710038-0.157383266606j)*x[0]**o + ((-0.54949146313+0.917076458145j))*x[0] + ((0.444031748549+0.203146150713j))*x[1]**o + ((0.0583135147905-0.469740342873j))*x[1] + ((0.573413978419-0.0551164528906j))*x[2]**o + ((0.0893078295903+0.148887766894j))*x[2]
            ref[(0, 0, 2, 1)]=(1.01744572697+0.148029697822j)/(o+1.)+((-0.200935059374+0.298111941083j))+((-0.95379710038-0.157383266606j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.25639680539-0.0804168721569j)*x[0]**o + ((-0.249926091394+0.36618666478j))*x[0] + ((-0.205234823319-0.260661481085j))*x[1]**o + ((-0.985509878156+0.925070670201j))*x[1] + ((-0.884470843177-0.0277978427462j))*x[2]**o + ((-0.0656587338927-0.395724860332j))*x[2]
            ref[(0, 0, 2, 2)]=(-1.0897056665-0.288459323831j)/(o+1.)+((-0.650547351721+0.447766237325j))+((0.25639680539-0.0804168721569j))*0.5**o
            arg[(0, 0, 2, 3)]=(-0.269587180422+0.909367040158j)*x[0]**o + ((0.200396408541+0.743011442696j))*x[0] + ((0.0916746226297+0.523966587104j))*x[1]**o + ((0.10798746498+0.298163164655j))*x[1] + ((0.0578671243032+0.718062119307j))*x[2]**o + ((0.952342594849-0.166730081869j))*x[2]
            ref[(0, 0, 2, 3)]=(0.149541746933+1.24202870641j)/(o+1.)+((0.630363234185+0.437222262741j))+((-0.269587180422+0.909367040158j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.879951654604+0.775800228644j)*x[0]**o + ((0.47833747058+0.0735809709592j))*x[0] + ((0.750721352636-0.998621610557j))*x[1]**o + ((-0.134113948192+0.354812881569j))*x[1] + ((-0.723952631961+0.0728423309982j))*x[2]**o + ((-0.903961057783+0.000554172835415j))*x[2]
            ref[(0, 1, 0, 0)]=(0.0267687206742-0.925779279558j)/(o+1.)+((-0.279868767697+0.214474012682j))+((0.879951654604+0.775800228644j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.142317942738+0.999068444193j)*x[0]**o + ((-0.331583535872+0.622209271832j))*x[0] + ((-0.153330617584-0.691557743087j))*x[1]**o + ((0.0865771614028+0.81738835475j))*x[1] + ((0.573490282309-0.836935419293j))*x[2]**o + ((-0.92375618839-0.400247105999j))*x[2]
            ref[(0, 1, 0, 1)]=(0.420159664725-1.52849316238j)/(o+1.)+((-0.584381281429+0.519675260292j))+((-0.142317942738+0.999068444193j))*0.5**o
            arg[(0, 1, 0, 2)]=(0.944826606918+0.06350501754j)*x[0]**o + ((-0.603381294468+0.631017521711j))*x[0] + ((0.211503505106-0.954607467417j))*x[1]**o + ((0.667956215782+0.151286324505j))*x[1] + ((0.499403705729-0.400695306641j))*x[2]**o + ((-0.922116360594-0.595541508614j))*x[2]
            ref[(0, 1, 0, 2)]=(0.710907210835-1.35530277406j)/(o+1.)+((-0.42877071964+0.0933811688014j))+((0.944826606918+0.06350501754j))*0.5**o
            arg[(0, 1, 0, 3)]=(-0.725873815441+0.218147534548j)*x[0]**o + ((0.140805590233+0.0839980270144j))*x[0] + ((-0.302257093777+0.792184691538j))*x[1]**o + ((-0.674161189898+0.244013270832j))*x[1] + ((-0.582278839482+0.929415548342j))*x[2]**o + ((-0.301532490765-0.149864692454j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.884535933259+1.72160023988j)/(o+1.)+((-0.417444045215+0.089073302696j))+((-0.725873815441+0.218147534548j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.697863894651+0.278707212803j)*x[0]**o + ((-0.259680730714+0.553054673136j))*x[0] + ((0.636719272528-0.440286530108j))*x[1]**o + ((-0.443905574924+0.451825521093j))*x[1] + ((0.257782803867-0.33508944337j))*x[2]**o + ((-0.791944204688+0.424590030416j))*x[2]
            ref[(0, 1, 1, 0)]=(0.894502076396-0.775375973477j)/(o+1.)+((-0.747765255163+0.714735112322j))+((-0.697863894651+0.278707212803j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.308874389593-0.518939087264j)*x[0]**o + ((-0.672222161296-0.873213826521j))*x[0] + ((-0.260878027061-0.978477388867j))*x[1]**o + ((-0.15203593126+0.689170064458j))*x[1] + ((-0.709983006006+0.626406992851j))*x[2]**o + ((0.903021277375-0.151258773014j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.970861033068-0.352070396016j)/(o+1.)+((0.0393815924098-0.167651267538j))+((0.308874389593-0.518939087264j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.484523472759-0.504396678161j)*x[0]**o + ((-0.156969460498-0.456349143171j))*x[0] + ((0.784627856786+0.152485023394j))*x[1]**o + ((0.259488733824-0.00506872304289j))*x[1] + ((-0.434268476989-0.600672896516j))*x[2]**o + ((-0.621110769966-0.557577689569j))*x[2]
            ref[(0, 1, 1, 2)]=(0.350359379797-0.448187873123j)/(o+1.)+((-0.25929574832-0.509497777891j))+((0.484523472759-0.504396678161j))*0.5**o
            arg[(0, 1, 1, 3)]=(0.691538047819-0.714589608373j)*x[0]**o + ((-0.598480508113+0.32812885107j))*x[0] + ((0.00489854249906+0.238097979101j))*x[1]**o + ((0.54438845102-0.974980025114j))*x[1] + ((-0.00278957439921-0.974016872718j))*x[2]**o + ((0.946844032501-0.689411811488j))*x[2]
            ref[(0, 1, 1, 3)]=(0.00210896809985-0.735918893617j)/(o+1.)+((0.446375987704-0.668131492766j))+((0.691538047819-0.714589608373j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.68182558337+0.282192543582j)*x[0]**o + ((0.565265164339-0.245928720524j))*x[0] + ((0.988611544028+0.0670090675312j))*x[1]**o + ((0.430603092646-0.998206332267j))*x[1] + ((0.290767098304+0.512287906003j))*x[2]**o + ((0.598430222345+0.4953996174j))*x[2]
            ref[(0, 1, 2, 0)]=(1.27937864233+0.579296973534j)/(o+1.)+((0.797149239665-0.374367717696j))+((0.68182558337+0.282192543582j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.173165204082-0.416549977938j)*x[0]**o + ((0.537357454347-0.248128823772j))*x[0] + ((0.440303628161-0.0611926514973j))*x[1]**o + ((-0.77933526889+0.706351396557j))*x[1] + ((-0.639347669225-0.689869576137j))*x[2]**o + ((-0.962068785675+0.0370267736373j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.199044041064-0.751062227635j)/(o+1.)+((-0.602023300109+0.247624673211j))+((-0.173165204082-0.416549977938j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.940261966718+0.0995932331853j)*x[0]**o + ((-0.154415480208+0.201147353884j))*x[0] + ((0.1611860454+0.260686600638j))*x[1]**o + ((0.177469690173+0.132267319313j))*x[1] + ((0.466343898829+0.31775531292j))*x[2]**o + ((0.902080337703+0.986644829193j))*x[2]
            ref[(0, 1, 2, 2)]=(0.627529944229+0.578441913557j)/(o+1.)+((0.462567273834+0.660029751195j))+((-0.940261966718+0.0995932331853j))*0.5**o
            arg[(0, 1, 2, 3)]=(0.780266099567-0.309670418498j)*x[0]**o + ((-0.308511416102+0.878717289542j))*x[0] + ((0.194407758752-0.585160139377j))*x[1]**o + ((-0.438911359551+0.811257237978j))*x[1] + ((0.307612115758-0.124130996838j))*x[2]**o + ((0.468179001538-0.70782840227j))*x[2]
            ref[(0, 1, 2, 3)]=(0.50201987451-0.709291136215j)/(o+1.)+((-0.139621887057+0.491073062625j))+((0.780266099567-0.309670418498j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.824295705912-0.227393104727j)*x[0]**o + ((-0.348554014241-0.422107117606j))*x[0] + ((0.516691646474+0.606559743686j))*x[1]**o + ((0.203379102351-0.22087738978j))*x[1] + ((-0.178400931686-0.84184313691j))*x[2]**o + ((-0.641591731413+0.228488234283j))*x[2]
            ref[(0, 2, 0, 0)]=(0.338290714788-0.235283393225j)/(o+1.)+((-0.393383321652-0.207248136551j))+((0.824295705912-0.227393104727j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.243769722711-0.26547159663j)*x[0]**o + ((0.157837710373+0.600433612819j))*x[0] + ((-0.0687273408113-0.184101597415j))*x[1]**o + ((-0.201287350151+0.379564444224j))*x[1] + ((0.0736186123624-0.463965314028j))*x[2]**o + ((0.555729459831-0.481941595938j))*x[2]
            ref[(0, 2, 0, 1)]=(0.00489127155108-0.648066911444j)/(o+1.)+((0.256139910027+0.249028230553j))+((0.243769722711-0.26547159663j))*0.5**o
            arg[(0, 2, 0, 2)]=(-0.0551582802072+0.562785652107j)*x[0]**o + ((-0.395085422526+0.571731211354j))*x[0] + ((0.207509892268-0.842429060497j))*x[1]**o + ((0.798755716176-0.222626069247j))*x[1] + ((0.586845895367+0.806829718311j))*x[2]**o + ((0.326633447062-0.565631935997j))*x[2]
            ref[(0, 2, 0, 2)]=(0.794355787635-0.0355993421856j)/(o+1.)+((0.365151870356-0.108263396945j))+((-0.0551582802072+0.562785652107j))*0.5**o
            arg[(0, 2, 0, 3)]=(-0.537780087781-0.20349710055j)*x[0]**o + ((0.0258805498883+0.331644995947j))*x[0] + ((-0.588057033103+0.700803442051j))*x[1]**o + ((-0.319675882481-0.433361925912j))*x[1] + ((-0.0222336994614-0.664204362032j))*x[2]**o + ((-0.181324880419-0.66120773124j))*x[2]
            ref[(0, 2, 0, 3)]=(-0.610290732564+0.0365990800187j)/(o+1.)+((-0.237560106506-0.381462330602j))+((-0.537780087781-0.20349710055j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.603738867817-0.959554485971j)*x[0]**o + ((-0.153818030932-0.418799679219j))*x[0] + ((-0.747146765177+0.0403861961031j))*x[1]**o + ((0.649322011034+0.467682245655j))*x[1] + ((-0.861183616751-0.808338102083j))*x[2]**o + ((-0.906103165463-0.630022333133j))*x[2]
            ref[(0, 2, 1, 0)]=(-1.60833038193-0.76795190598j)/(o+1.)+((-0.205299592681-0.290569883348j))+((0.603738867817-0.959554485971j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.318414044394-0.301215506866j)*x[0]**o + ((-0.792152997278-0.12204098771j))*x[0] + ((-0.872608369066+0.687009543064j))*x[1]**o + ((-0.18858035612-0.804348275713j))*x[1] + ((-0.120855767232-0.735181570912j))*x[2]**o + ((0.756671293423-0.715910518547j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.993464136298-0.048172027848j)/(o+1.)+((-0.112031029987-0.821149890985j))+((0.318414044394-0.301215506866j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.299526451076+0.772824308902j)*x[0]**o + ((0.338653294277+0.07215586913j))*x[0] + ((-0.847322467634-0.659850017951j))*x[1]**o + ((-0.593172415867-0.018167215167j))*x[1] + ((-0.97436472514-0.476299971047j))*x[2]**o + ((-0.14352166666+0.768455365566j))*x[2]
            ref[(0, 2, 1, 2)]=(-1.82168719277-1.136149989j)/(o+1.)+((-0.199020394125+0.411222009765j))+((0.299526451076+0.772824308902j))*0.5**o
            arg[(0, 2, 1, 3)]=(0.516045974586-0.0148519961134j)*x[0]**o + ((0.42946420336-0.661496677746j))*x[0] + ((-0.575305850189-0.878806433268j))*x[1]**o + ((0.640355613232-0.736888577386j))*x[1] + ((-0.762914123408-0.905399849084j))*x[2]**o + ((-0.0960477876504+0.974234679977j))*x[2]
            ref[(0, 2, 1, 3)]=(-1.3382199736-1.78420628235j)/(o+1.)+((0.486886014471-0.212075287577j))+((0.516045974586-0.0148519961134j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.828053665498-0.858622900319j)*x[0]**o + ((0.333331664281-0.99908564914j))*x[0] + ((-0.852338803644+0.204853409623j))*x[1]**o + ((0.782416480899-0.0575870703211j))*x[1] + ((0.717130989953+0.715516368287j))*x[2]**o + ((0.178774347795+0.164298180791j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.135207813691+0.92036977791j)/(o+1.)+((0.647261246488-0.446187269335j))+((-0.828053665498-0.858622900319j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.225445918885-0.122148909611j)*x[0]**o + ((-0.664209829833+0.869585122963j))*x[0] + ((0.614449282435+0.949989688944j))*x[1]**o + ((0.79387790887+0.158928361936j))*x[1] + ((-0.894819740131+0.751595021653j))*x[2]**o + ((0.867872115955-0.842024980016j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.280370457697+1.7015847106j)/(o+1.)+((0.498770097496+0.0932442524418j))+((0.225445918885-0.122148909611j))*0.5**o
            arg[(0, 2, 2, 2)]=(-0.133143189991-0.707745568346j)*x[0]**o + ((0.072398555823-0.157737583695j))*x[0] + ((-0.729819185166-0.656057793098j))*x[1]**o + ((0.964998926915-0.0267824800133j))*x[1] + ((0.0214500940219+0.0326909156259j))*x[2]**o + ((-0.511293386997+0.987916194002j))*x[2]
            ref[(0, 2, 2, 2)]=(-0.708369091144-0.623366877472j)/(o+1.)+((0.26305204787+0.401698065147j))+((-0.133143189991-0.707745568346j))*0.5**o
            arg[(0, 2, 2, 3)]=(0.207900912396-0.731025200508j)*x[0]**o + ((-0.761535741158-0.906017367592j))*x[0] + ((-0.46573741667+0.00167379393311j))*x[1]**o + ((0.012282700433-0.559868296062j))*x[1] + ((-0.668598576664+0.969564378819j))*x[2]**o + ((0.580219309832-0.962838689176j))*x[2]
            ref[(0, 2, 2, 3)]=(-1.13433599333+0.971238172753j)/(o+1.)+((-0.0845168654464-1.21436217642j))+((0.207900912396-0.731025200508j))*0.5**o
            arg[(0, 3, 0, 0)]=(-0.137335149994+0.402102636533j)*x[0]**o + ((0.527615653659+0.106871971366j))*x[0] + ((-0.696380745865+0.75025847258j))*x[1]**o + ((0.639696640648+0.474413265277j))*x[1] + ((0.748362503902-0.939899254481j))*x[2]**o + ((0.00913507943762+0.736518589215j))*x[2]
            ref[(0, 3, 0, 0)]=(0.0519817580365-0.189640781901j)/(o+1.)+((0.588223686872+0.658901912929j))+((-0.137335149994+0.402102636533j))*0.5**o
            arg[(0, 3, 0, 1)]=(0.936614803235+0.218379122304j)*x[0]**o + ((0.591162984773+0.0784257626572j))*x[0] + ((-0.958619952528+0.368113619563j))*x[1]**o + ((-0.445609344089-0.900633045624j))*x[1] + ((0.732978112083+0.763336680117j))*x[2]**o + ((0.973451465996-0.938955416827j))*x[2]
            ref[(0, 3, 0, 1)]=(-0.225641840444+1.13145029968j)/(o+1.)+((0.55950255334-0.880581349897j))+((0.936614803235+0.218379122304j))*0.5**o
            arg[(0, 3, 0, 2)]=(0.162259453042-0.758921305594j)*x[0]**o + ((0.451834750092+0.460880050317j))*x[0] + ((-0.472849491635-0.636275489311j))*x[1]**o + ((0.504313290012-0.845585877487j))*x[1] + ((-0.389099702121+0.608186136972j))*x[2]**o + ((-0.843814045505+0.0142727605113j))*x[2]
            ref[(0, 3, 0, 2)]=(-0.861949193757-0.0280893523391j)/(o+1.)+((0.0561669972994-0.185216533329j))+((0.162259453042-0.758921305594j))*0.5**o
            arg[(0, 3, 0, 3)]=(-0.370525216117-0.452275178579j)*x[0]**o + ((-0.913926735723+0.843817999816j))*x[0] + ((-0.863807957965+0.91482485331j))*x[1]**o + ((0.971247477384-0.711426542025j))*x[1] + ((-0.254038375182-0.0135670743506j))*x[2]**o + ((-0.139576733915-0.730524795805j))*x[2]
            ref[(0, 3, 0, 3)]=(-1.11784633315+0.901257778959j)/(o+1.)+((-0.0411279961267-0.299066669007j))+((-0.370525216117-0.452275178579j))*0.5**o
            arg[(0, 3, 1, 0)]=(0.351352870826+0.43549724511j)*x[0]**o + ((-0.99200380359+0.26394616135j))*x[0] + ((0.559726458066-0.619912661601j))*x[1]**o + ((0.0928041065425+0.529789277752j))*x[1] + ((-0.11982415884-0.512063890974j))*x[2]**o + ((-0.485461123001-0.777135133443j))*x[2]
            ref[(0, 3, 1, 0)]=(0.439902299226-1.13197655258j)/(o+1.)+((-0.692330410024+0.00830015282924j))+((0.351352870826+0.43549724511j))*0.5**o
            arg[(0, 3, 1, 1)]=(0.930201489827+0.749480821975j)*x[0]**o + ((-0.402232139473+0.0841981063154j))*x[0] + ((-0.307329331371+0.357379139201j))*x[1]**o + ((0.67507735558-0.668682568379j))*x[1] + ((0.418855525403+0.432937704221j))*x[2]**o + ((-0.336646092334+0.286274236545j))*x[2]
            ref[(0, 3, 1, 1)]=(0.111526194032+0.790316843422j)/(o+1.)+((-0.0319004381137-0.149105112759j))+((0.930201489827+0.749480821975j))*0.5**o
            arg[(0, 3, 1, 2)]=(0.0449805300639+0.21005086973j)*x[0]**o + ((-0.643936963177+0.716831994119j))*x[0] + ((-0.147625422034+0.972988650245j))*x[1]**o + ((0.986850369326+0.0580917972214j))*x[1] + ((-0.6461668764+0.532710206044j))*x[2]**o + ((-0.950293261797-0.418317842461j))*x[2]
            ref[(0, 3, 1, 2)]=(-0.793792298434+1.50569885629j)/(o+1.)+((-0.303689927823+0.17830297444j))+((0.0449805300639+0.21005086973j))*0.5**o
            arg[(0, 3, 1, 3)]=(0.544791682482-0.129499107592j)*x[0]**o + ((0.871275314823-0.00856095894161j))*x[0] + ((0.505643294372-0.542287174327j))*x[1]**o + ((0.608091972398+0.584876328499j))*x[1] + ((-0.769991992193+0.992750327556j))*x[2]**o + ((-0.72949600831+0.364829255535j))*x[2]
            ref[(0, 3, 1, 3)]=(-0.264348697821+0.450463153229j)/(o+1.)+((0.374935639455+0.470572312546j))+((0.544791682482-0.129499107592j))*0.5**o
            arg[(0, 3, 2, 0)]=(0.327647780316-0.725951421146j)*x[0]**o + ((-0.893617088104+0.837679515704j))*x[0] + ((-0.532025463065-0.113909449663j))*x[1]**o + ((0.144668323878-0.381528117259j))*x[1] + ((0.416410478552+0.852192581472j))*x[2]**o + ((-0.627718245247-0.569142043421j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.115614984513+0.738283131808j)/(o+1.)+((-0.688333504737-0.0564953224883j))+((0.327647780316-0.725951421146j))*0.5**o
            arg[(0, 3, 2, 1)]=(0.431890962412-0.204054369376j)*x[0]**o + ((-0.0457001858502-0.701003533185j))*x[0] + ((0.0579429519583+0.456390790343j))*x[1]**o + ((-0.900045713727-0.0129597509769j))*x[1] + ((0.179796563941+0.816032633259j))*x[2]**o + ((-0.261298762334+0.6054602986j))*x[2]
            ref[(0, 3, 2, 1)]=(0.237739515899+1.2724234236j)/(o+1.)+((-0.603522330956-0.0542514927807j))+((0.431890962412-0.204054369376j))*0.5**o
            arg[(0, 3, 2, 2)]=(-0.910162142815+0.847730087576j)*x[0]**o + ((0.754864910903+0.424980543513j))*x[0] + ((0.871879668984-0.20345960648j))*x[1]**o + ((-0.330803193583-0.772393637262j))*x[1] + ((-0.666880390205-0.414406877673j))*x[2]**o + ((-0.206560375558-0.178426385039j))*x[2]
            ref[(0, 3, 2, 2)]=(0.204999278779-0.617866484153j)/(o+1.)+((0.108750670881-0.262919739394j))+((-0.910162142815+0.847730087576j))*0.5**o
            arg[(0, 3, 2, 3)]=(0.620820599603-0.582653739917j)*x[0]**o + ((-0.190918317559-0.141715038339j))*x[0] + ((0.454162673064-0.251523084456j))*x[1]**o + ((0.59164427723-0.181592995862j))*x[1] + ((-0.379663841307-0.102915751376j))*x[2]**o + ((0.295151372168-0.859160631454j))*x[2]
            ref[(0, 3, 2, 3)]=(0.074498831758-0.354438835833j)/(o+1.)+((0.34793866592-0.591234332828j))+((0.620820599603-0.582653739917j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.404467639324+0.96665157735j)*x[0]**o + ((0.485498770841-0.876531970746j))*x[0] + ((0.654137722771+0.0519347782601j))*x[1]**o + ((0.986682490307+0.159462201843j))*x[1] + ((0.314487925215+0.400802307338j))*x[2]**o + ((-0.491212871934+0.332846758197j))*x[2]
            ref[(1, 0, 0, 0)]=(0.968625647986+0.452737085598j)/(o+1.)+((0.490484194606-0.192111505353j))+((-0.404467639324+0.96665157735j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.481413228675+0.9269589287j)*x[0]**o + ((0.87446449231+0.125121528228j))*x[0] + ((0.90028597665-0.877765597631j))*x[1]**o + ((-0.345911933848-0.792131739758j))*x[1] + ((-0.702778310123+0.782787992735j))*x[2]**o + ((0.431426377611-0.906159210036j))*x[2]
            ref[(1, 0, 0, 1)]=(0.197507666527-0.094977604896j)/(o+1.)+((0.479989468036-0.786584710783j))+((-0.481413228675+0.9269589287j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.164344101131+0.591994810298j)*x[0]**o + ((-0.0801394765775+0.217846022233j))*x[0] + ((0.512862419012+0.0482005958637j))*x[1]**o + ((-0.0818508318762-0.621582162699j))*x[1] + ((-0.351913977342+0.439522718356j))*x[2]**o + ((0.0747884664884+0.10956014814j))*x[2]
            ref[(1, 0, 0, 2)]=(0.16094844167+0.48772331422j)/(o+1.)+((-0.0436009209826-0.147087996163j))+((-0.164344101131+0.591994810298j))*0.5**o
            arg[(1, 0, 0, 3)]=(-0.911131026884+0.143029164416j)*x[0]**o + ((-0.399777225156+0.826350389513j))*x[0] + ((-0.83301037291-0.311106903747j))*x[1]**o + ((-0.881898725866-0.82224521224j))*x[1] + ((0.719145814846-0.439928291189j))*x[2]**o + ((0.388745435168-0.543339938397j))*x[2]
            ref[(1, 0, 0, 3)]=(-0.113864558063-0.751035194937j)/(o+1.)+((-0.446465257927-0.269617380562j))+((-0.911131026884+0.143029164416j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.217598788159-0.851441527786j)*x[0]**o + ((0.209572789754+0.716206450148j))*x[0] + ((0.052070566586-0.428396663579j))*x[1]**o + ((0.0364847182622+0.600360077536j))*x[1] + ((0.0857918167241-0.320416551451j))*x[2]**o + ((0.235348308264-0.90691575799j))*x[2]
            ref[(1, 0, 1, 0)]=(0.13786238331-0.74881321503j)/(o+1.)+((0.24070290814+0.204825384847j))+((0.217598788159-0.851441527786j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.489643748465-0.282408954251j)*x[0]**o + ((-0.605420124631-0.180462004769j))*x[0] + ((-0.785209256672-0.38861274881j))*x[1]**o + ((-0.57946893689+0.71906169098j))*x[1] + ((0.551255459857+0.385235877442j))*x[2]**o + ((0.976634690404-0.39610276716j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.233953796815-0.00337687136837j)/(o+1.)+((-0.104127185558+0.0712484595253j))+((0.489643748465-0.282408954251j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.505228765469+0.71034031937j)*x[0]**o + ((0.45094384492+0.411364012931j))*x[0] + ((-0.902999296385-0.749897620383j))*x[1]**o + ((-0.950552733998-0.965869137674j))*x[1] + ((-0.886761741961+0.890904493827j))*x[2]**o + ((-0.458606963276+0.877737153229j))*x[2]
            ref[(1, 0, 1, 2)]=(-1.78976103835+0.141006873445j)/(o+1.)+((-0.479107926177+0.161616014243j))+((0.505228765469+0.71034031937j))*0.5**o
            arg[(1, 0, 1, 3)]=(0.791203480461-0.970053097578j)*x[0]**o + ((0.641011806633+0.715090626644j))*x[0] + ((-0.391996518988+0.243887458246j))*x[1]**o + ((-0.865927143259-0.873915929469j))*x[1] + ((0.386472657763-0.0250826902969j))*x[2]**o + ((0.0456266938137+0.375839944461j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.0055238612252+0.218804767949j)/(o+1.)+((-0.0896443214061+0.108507320818j))+((0.791203480461-0.970053097578j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.132676206174+0.514543802849j)*x[0]**o + ((-0.708069581497+0.983569158831j))*x[0] + ((0.146652161692+0.406923857257j))*x[1]**o + ((0.303584700337-0.184882616692j))*x[1] + ((-0.783618604371-0.588132616219j))*x[2]**o + ((-0.0111449963958-0.200042794476j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.636966442679-0.181208758961j)/(o+1.)+((-0.207814938778+0.299321873831j))+((-0.132676206174+0.514543802849j))*0.5**o
            arg[(1, 0, 2, 1)]=(-0.19447439556-0.614726043152j)*x[0]**o + ((0.798043085115-0.065131078259j))*x[0] + ((0.237204122237-0.921648565357j))*x[1]**o + ((0.365803230391+0.605174434095j))*x[1] + ((-0.329826757908-0.0715553186098j))*x[2]**o + ((-0.193174280083+0.779441049145j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.0926226356709-0.993203883966j)/(o+1.)+((0.485336017711+0.659742202491j))+((-0.19447439556-0.614726043152j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.94777769788+0.657807473703j)*x[0]**o + ((0.634952406297-0.937950023345j))*x[0] + ((-0.544680123353+0.609310454732j))*x[1]**o + ((-0.392712693944+0.454014983359j))*x[1] + ((0.71438277712-0.350365770424j))*x[2]**o + ((-0.380673504502+0.0154906348765j))*x[2]
            ref[(1, 0, 2, 2)]=(0.169702653766+0.258944684309j)/(o+1.)+((-0.0692168960748-0.234222202555j))+((-0.94777769788+0.657807473703j))*0.5**o
            arg[(1, 0, 2, 3)]=(0.0328693468514-0.468522675319j)*x[0]**o + ((0.0548849496385-0.151219327127j))*x[0] + ((-0.581716585873+0.00586781311327j))*x[1]**o + ((0.815206242342+0.534246749335j))*x[1] + ((-0.550549176129+0.443624537174j))*x[2]**o + ((0.991307541958-0.712925921156j))*x[2]
            ref[(1, 0, 2, 3)]=(-1.132265762+0.449492350287j)/(o+1.)+((0.930699366969-0.164949249474j))+((0.0328693468514-0.468522675319j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.288823256437+0.598733303109j)*x[0]**o + ((-0.943391766919+0.540783781445j))*x[0] + ((-0.0354053433645+0.746685589559j))*x[1]**o + ((-0.330160064372-0.0573145447225j))*x[1] + ((0.359281377611+0.455918265135j))*x[2]**o + ((-0.328624743925-0.473390078711j))*x[2]
            ref[(1, 1, 0, 0)]=(0.323876034246+1.20260385469j)/(o+1.)+((-0.801088287608+0.00503957900602j))+((-0.288823256437+0.598733303109j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.575914206746-0.0791959631133j)*x[0]**o + ((-0.698237653164-0.95063008739j))*x[0] + ((0.0941181294857+0.319174705158j))*x[1]**o + ((-0.0874922886437+0.850837382946j))*x[1] + ((0.593959911808+0.965002986289j))*x[2]**o + ((-0.796884816267+0.949869690935j))*x[2]
            ref[(1, 1, 0, 1)]=(0.688078041294+1.28417769145j)/(o+1.)+((-0.791307379037+0.425038493245j))+((-0.575914206746-0.0791959631133j))*0.5**o
            arg[(1, 1, 0, 2)]=(-0.784439134885+0.342327966899j)*x[0]**o + ((0.575817107675-0.316146881532j))*x[0] + ((0.0333497065565-0.456781312056j))*x[1]**o + ((0.732895872883+0.0225129112012j))*x[1] + ((0.405208718434-0.554783413224j))*x[2]**o + ((0.267756983035+0.402367029655j))*x[2]
            ref[(1, 1, 0, 2)]=(0.43855842499-1.01156472528j)/(o+1.)+((0.788234981796+0.054366529662j))+((-0.784439134885+0.342327966899j))*0.5**o
            arg[(1, 1, 0, 3)]=(-0.747739194353-0.980102473067j)*x[0]**o + ((0.876448234667+0.0999377373027j))*x[0] + ((-0.579065395151+0.952690155629j))*x[1]**o + ((0.796879232769-0.0640703426861j))*x[1] + ((-0.597225770608+0.49192413698j))*x[2]**o + ((0.0772037356429-0.381720147465j))*x[2]
            ref[(1, 1, 0, 3)]=(-1.17629116576+1.44461429261j)/(o+1.)+((0.875265601539-0.172926376424j))+((-0.747739194353-0.980102473067j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.96884091896+0.966480246107j)*x[0]**o + ((0.113179857348+0.981905698347j))*x[0] + ((0.313697909923-0.561010117215j))*x[1]**o + ((-0.969079276223+0.483448367179j))*x[1] + ((0.854284682465+0.370259583288j))*x[2]**o + ((-0.278676868794+0.739716758067j))*x[2]
            ref[(1, 1, 1, 0)]=(1.16798259239-0.190750533927j)/(o+1.)+((-0.567288143834+1.1025354118j))+((0.96884091896+0.966480246107j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.132887112982+0.694741536931j)*x[0]**o + ((-0.0316826716854-0.981657056768j))*x[0] + ((-0.633885032459+0.913337103505j))*x[1]**o + ((0.924157303547-0.79485459774j))*x[1] + ((0.571083607612+0.0932724449036j))*x[2]**o + ((-0.957514007606+0.363635697126j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.0628014248471+1.00660954841j)/(o+1.)+((-0.0325196878719-0.706437978691j))+((0.132887112982+0.694741536931j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.128382744013+0.654787332668j)*x[0]**o + ((0.0712803294929-0.00948012341684j))*x[0] + ((-0.676604405197-0.46931799783j))*x[1]**o + ((-0.818555243814-0.265933377999j))*x[1] + ((-0.472718062463+0.422852771636j))*x[2]**o + ((-0.679463400596-0.907034426493j))*x[2]
            ref[(1, 1, 1, 2)]=(-1.14932246766-0.0464652261935j)/(o+1.)+((-0.713369157458-0.591223963954j))+((-0.128382744013+0.654787332668j))*0.5**o
            arg[(1, 1, 1, 3)]=(-0.898582093593-0.372259178316j)*x[0]**o + ((0.911930681958-0.991446271106j))*x[0] + ((0.578521927853-0.943324110919j))*x[1]**o + ((-0.498777013572-0.252307344874j))*x[1] + ((0.71513009314+0.041635322544j))*x[2]**o + ((0.553532819545-0.312704714019j))*x[2]
            ref[(1, 1, 1, 3)]=(1.29365202099-0.901688788375j)/(o+1.)+((0.483343243966-0.778229164999j))+((-0.898582093593-0.372259178316j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.140578373316+0.141329644082j)*x[0]**o + ((0.603505043464-0.347688687446j))*x[0] + ((0.371215224067-0.239442776405j))*x[1]**o + ((0.785653851169-0.451431008103j))*x[1] + ((-0.849977533197+0.614268298566j))*x[2]**o + ((0.904523956536+0.330236563667j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.478762309131+0.37482552216j)/(o+1.)+((1.14684142558-0.234441565941j))+((0.140578373316+0.141329644082j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.64954312847+0.902426268717j)*x[0]**o + ((0.416909517042+0.820115773407j))*x[0] + ((0.468443232461-0.377777186178j))*x[1]**o + ((0.313331010515+0.534662098443j))*x[1] + ((0.246561382406-0.401929998288j))*x[2]**o + ((0.625072617792+0.689103095146j))*x[2]
            ref[(1, 1, 2, 1)]=(0.715004614868-0.779707184466j)/(o+1.)+((0.677656572674+1.0219404835j))+((0.64954312847+0.902426268717j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.709469147816+0.87951369672j)*x[0]**o + ((0.0299999823295-0.699941822838j))*x[0] + ((0.785145935478+0.761496968263j))*x[1]**o + ((0.343235177013+0.6386425331j))*x[1] + ((-0.904634765289+0.0524559438441j))*x[2]**o + ((0.657027828526-0.254913881804j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.119488829811+0.813952912107j)/(o+1.)+((0.515131493934-0.158106585771j))+((0.709469147816+0.87951369672j))*0.5**o
            arg[(1, 1, 2, 3)]=(-0.227809330841+0.511245159237j)*x[0]**o + ((0.524512280415-0.965778035597j))*x[0] + ((0.00570779707222+0.368764468784j))*x[1]**o + ((0.0453704869362-0.0280840720329j))*x[1] + ((0.83308198432+0.932552507865j))*x[2]**o + ((-0.875438675658-0.562049177808j))*x[2]
            ref[(1, 1, 2, 3)]=(0.838789781393+1.30131697665j)/(o+1.)+((-0.152777954153-0.777955642719j))+((-0.227809330841+0.511245159237j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.774348399195+0.440172626544j)*x[0]**o + ((-0.0373896025958-0.410113870141j))*x[0] + ((0.548802940403-0.409333215827j))*x[1]**o + ((-0.330088164294+0.449293545991j))*x[1] + ((-0.0599002202549+0.795680354586j))*x[2]**o + ((0.441991131157-0.697743955127j))*x[2]
            ref[(1, 2, 0, 0)]=(0.488902720148+0.386347138759j)/(o+1.)+((0.0372566821339-0.329282139638j))+((-0.774348399195+0.440172626544j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.0765146674257+0.365984268928j)*x[0]**o + ((0.0516907930342+0.124605970407j))*x[0] + ((0.0564683583327+0.713083307052j))*x[1]**o + ((0.0802687081329-0.520394408157j))*x[1] + ((-0.549756114279+0.760795676376j))*x[2]**o + ((-0.274045952721-0.00108897452628j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.493287755946+1.47387898343j)/(o+1.)+((-0.0710432257767-0.198438706138j))+((0.0765146674257+0.365984268928j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.0854254256773+0.131680804927j)*x[0]**o + ((-0.889503919144-0.41052260364j))*x[0] + ((-0.505492042738-0.700698358161j))*x[1]**o + ((-0.466543022096+0.511952858591j))*x[1] + ((0.0819526003815-0.75701144509j))*x[2]**o + ((0.601092734768-0.335517135327j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.423539442357-1.45770980325j)/(o+1.)+((-0.377477103236-0.117043440188j))+((0.0854254256773+0.131680804927j))*0.5**o
            arg[(1, 2, 0, 3)]=(-0.398220553572-0.0437158267163j)*x[0]**o + ((0.345428262304+0.073043388459j))*x[0] + ((-0.549098246094-0.149098285998j))*x[1]**o + ((0.717260215591-0.253620632114j))*x[1] + ((-0.395995807544+0.214329145895j))*x[2]**o + ((-0.576452889076+0.79320440872j))*x[2]
            ref[(1, 2, 0, 3)]=(-0.945094053638+0.0652308598968j)/(o+1.)+((0.243117794409+0.306313582533j))+((-0.398220553572-0.0437158267163j))*0.5**o
            arg[(1, 2, 1, 0)]=(0.073209138013+0.856390272984j)*x[0]**o + ((-0.575911741653+0.915513181373j))*x[0] + ((-0.885405552881-0.9802902777j))*x[1]**o + ((0.420540565315-0.300326433639j))*x[1] + ((0.0513138239926-0.748495230306j))*x[2]**o + ((-0.175101892709-0.441167940731j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.834091728889-1.72878550801j)/(o+1.)+((-0.165236534524+0.0870094035019j))+((0.073209138013+0.856390272984j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.42282284096-0.365052033593j)*x[0]**o + ((-0.0123278811606-0.0508116368206j))*x[0] + ((-0.951629278217-0.735457299485j))*x[1]**o + ((-0.00738620662096-0.932103293055j))*x[1] + ((-0.058095614031+0.618513272764j))*x[2]**o + ((-0.892316603292+0.952933156774j))*x[2]
            ref[(1, 2, 1, 1)]=(-1.00972489225-0.116944026721j)/(o+1.)+((-0.456015345537-0.014990886551j))+((0.42282284096-0.365052033593j))*0.5**o
            arg[(1, 2, 1, 2)]=(0.645608649883-0.928103335617j)*x[0]**o + ((-0.878537962492-0.887970823168j))*x[0] + ((0.234345810537-0.406068120255j))*x[1]**o + ((-0.262658115649+0.834999661088j))*x[1] + ((0.366088103044-0.58953600752j))*x[2]**o + ((0.681721492247+0.0403788774167j))*x[2]
            ref[(1, 2, 1, 2)]=(0.60043391358-0.995604127774j)/(o+1.)+((-0.229737292947-0.00629614233176j))+((0.645608649883-0.928103335617j))*0.5**o
            arg[(1, 2, 1, 3)]=(-0.940076345254-0.769310275894j)*x[0]**o + ((0.38497897892+0.954391745185j))*x[0] + ((-0.966318823549-0.38257903387j))*x[1]**o + ((-0.8027078483-0.719839392601j))*x[1] + ((0.957133603668+0.209098657987j))*x[2]**o + ((-0.697431655954+0.112154224082j))*x[2]
            ref[(1, 2, 1, 3)]=(-0.0091852198813-0.173480375883j)/(o+1.)+((-0.557580262667+0.173353288333j))+((-0.940076345254-0.769310275894j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.0475009553937+0.271323622049j)*x[0]**o + ((-0.982433142353-0.808085907603j))*x[0] + ((-0.989979456942+0.519959902238j))*x[1]**o + ((0.0374046585535-0.992248893697j))*x[1] + ((-0.75772524262-0.310955564918j))*x[2]**o + ((0.558466459078-0.365469246215j))*x[2]
            ref[(1, 2, 2, 0)]=(-1.74770469956+0.20900433732j)/(o+1.)+((-0.19328101236-1.08290202376j))+((-0.0475009553937+0.271323622049j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.0747377463508-0.593465302875j)*x[0]**o + ((0.593128559462-0.105165009011j))*x[0] + ((0.192075848206+0.0491379779922j))*x[1]**o + ((-0.191959957897+0.371018762148j))*x[1] + ((-0.0328755774168+0.555591847841j))*x[2]**o + ((-0.829301638221-0.402894674359j))*x[2]
            ref[(1, 2, 2, 1)]=(0.159200270789+0.604729825833j)/(o+1.)+((-0.214066518328-0.0685204606108j))+((-0.0747377463508-0.593465302875j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.4659195169+0.166568168002j)*x[0]**o + ((-0.70231748625+0.758254226866j))*x[0] + ((-0.69052239861+0.195747896675j))*x[1]**o + ((-0.0554129575748-0.573135180815j))*x[1] + ((0.0986247555265-0.456660095776j))*x[2]**o + ((-0.429858080883+0.96521234086j))*x[2]
            ref[(1, 2, 2, 2)]=(-0.591897643083-0.2609121991j)/(o+1.)+((-0.593794262354+0.575165693456j))+((0.4659195169+0.166568168002j))*0.5**o
            arg[(1, 2, 2, 3)]=(0.765308006767+0.189562176119j)*x[0]**o + ((0.146938229533+0.0450826545052j))*x[0] + ((-0.27483878426-0.931467667227j))*x[1]**o + ((0.300189233835+0.599351856969j))*x[1] + ((-0.326622582452-0.298394664253j))*x[2]**o + ((-0.989798237295-0.104353721345j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.601461366711-1.22986233148j)/(o+1.)+((-0.271335386963+0.270040395065j))+((0.765308006767+0.189562176119j))*0.5**o
            arg[(1, 3, 0, 0)]=(-0.105619271909-0.591813107109j)*x[0]**o + ((0.872165497532-0.823815435855j))*x[0] + ((-0.281436034467+0.615311203289j))*x[1]**o + ((0.176182198857-0.0747650375106j))*x[1] + ((0.801240756119-0.721855637898j))*x[2]**o + ((0.745137104814+0.899567726349j))*x[2]
            ref[(1, 3, 0, 0)]=(0.519804721652-0.106544434609j)/(o+1.)+((0.896742400601+0.000493626491226j))+((-0.105619271909-0.591813107109j))*0.5**o
            arg[(1, 3, 0, 1)]=(0.144991128063-0.918744879661j)*x[0]**o + ((-0.145815244643-0.645399356623j))*x[0] + ((0.0359758949225+0.0895386507555j))*x[1]**o + ((0.168295963616-0.901233937806j))*x[1] + ((-0.143398170044-0.790145417273j))*x[2]**o + ((0.45456838377+0.900341521083j))*x[2]
            ref[(1, 3, 0, 1)]=(-0.107422275121-0.700606766518j)/(o+1.)+((0.238524551372-0.323145886673j))+((0.144991128063-0.918744879661j))*0.5**o
            arg[(1, 3, 0, 2)]=(0.674950389248+0.622152121234j)*x[0]**o + ((-0.746894808676+0.837580613966j))*x[0] + ((-0.982722866024+0.0390211859462j))*x[1]**o + ((0.303279633417-0.609743886898j))*x[1] + ((-0.759563257919+0.406511464319j))*x[2]**o + ((0.527701469978-0.775052160658j))*x[2]
            ref[(1, 3, 0, 2)]=(-1.74228612394+0.445532650265j)/(o+1.)+((0.0420431473593-0.273607716795j))+((0.674950389248+0.622152121234j))*0.5**o
            arg[(1, 3, 0, 3)]=(-0.118002758612-0.305795441283j)*x[0]**o + ((0.464962678098+0.693477006673j))*x[0] + ((0.716254262775-0.208100505821j))*x[1]**o + ((-0.0520993712665+0.585503086468j))*x[1] + ((-0.158688229666-0.634217698896j))*x[2]**o + ((0.636400091041-0.472145387589j))*x[2]
            ref[(1, 3, 0, 3)]=(0.557566033109-0.842318204717j)/(o+1.)+((0.524631698936+0.403417352776j))+((-0.118002758612-0.305795441283j))*0.5**o
            arg[(1, 3, 1, 0)]=(0.357603799316+0.21021664743j)*x[0]**o + ((0.916158729116-0.351947743987j))*x[0] + ((0.355339364412-0.17103672971j))*x[1]**o + ((-0.414044598451-0.829148930587j))*x[1] + ((-0.762280263722-0.229094822388j))*x[2]**o + ((-0.979226879716-0.35615783565j))*x[2]
            ref[(1, 3, 1, 0)]=(-0.40694089931-0.400131552098j)/(o+1.)+((-0.238556374525-0.768627255112j))+((0.357603799316+0.21021664743j))*0.5**o
            arg[(1, 3, 1, 1)]=(0.547744961504-0.214318875591j)*x[0]**o + ((0.866144923314+0.542522104767j))*x[0] + ((-0.059928886571+0.0447966151686j))*x[1]**o + ((0.879527473243-0.919093993995j))*x[1] + ((0.567265169819+0.211851976399j))*x[2]**o + ((-0.172137322174+0.854765946139j))*x[2]
            ref[(1, 3, 1, 1)]=(0.507336283248+0.256648591568j)/(o+1.)+((0.786767537192+0.239097028455j))+((0.547744961504-0.214318875591j))*0.5**o
            arg[(1, 3, 1, 2)]=(0.311145728966+0.363451474373j)*x[0]**o + ((0.976862407833-0.364722630545j))*x[0] + ((0.444672835933-0.208966791133j))*x[1]**o + ((0.758329040398-0.227815023344j))*x[1] + ((0.282965446343+0.741935211412j))*x[2]**o + ((-0.98857496568+0.0133202718181j))*x[2]
            ref[(1, 3, 1, 2)]=(0.727638282276+0.532968420279j)/(o+1.)+((0.373308241275-0.289608691036j))+((0.311145728966+0.363451474373j))*0.5**o
            arg[(1, 3, 1, 3)]=(-0.365849598815-0.196860586413j)*x[0]**o + ((-0.539270899959+0.477816068994j))*x[0] + ((-0.495474422794+0.997747099638j))*x[1]**o + ((-0.371049272084-0.337751448378j))*x[1] + ((0.537208844654-0.633712100322j))*x[2]**o + ((0.585462154955+0.385785811658j))*x[2]
            ref[(1, 3, 1, 3)]=(0.0417344218596+0.364034999316j)/(o+1.)+((-0.162429008544+0.262925216137j))+((-0.365849598815-0.196860586413j))*0.5**o
            arg[(1, 3, 2, 0)]=(-0.88548453276-0.0852156330296j)*x[0]**o + ((-0.773168267033-0.527146978703j))*x[0] + ((-0.110234072865+0.0734850845192j))*x[1]**o + ((0.315508871564-0.237132921341j))*x[1] + ((-0.749134277708-0.989713450023j))*x[2]**o + ((0.43300174655+0.212480897349j))*x[2]
            ref[(1, 3, 2, 0)]=(-0.859368350573-0.916228365503j)/(o+1.)+((-0.0123288244592-0.275899501347j))+((-0.88548453276-0.0852156330296j))*0.5**o
            arg[(1, 3, 2, 1)]=(0.751656985801+0.595084422411j)*x[0]**o + ((0.364097665715-0.630507574254j))*x[0] + ((-0.524239381115+0.249744004578j))*x[1]**o + ((-0.992471617955+0.593825276408j))*x[1] + ((-0.964949674732-0.477530965272j))*x[2]**o + ((-0.402141123128-0.333428689159j))*x[2]
            ref[(1, 3, 2, 1)]=(-1.48918905585-0.227786960694j)/(o+1.)+((-0.515257537684-0.185055493502j))+((0.751656985801+0.595084422411j))*0.5**o
            arg[(1, 3, 2, 2)]=(-0.973870139444+0.910117008647j)*x[0]**o + ((0.0589976031822-0.764640480391j))*x[0] + ((-0.482048106061+0.283567136086j))*x[1]**o + ((0.838043941199+0.334064674586j))*x[1] + ((0.0456783719657+0.638575591026j))*x[2]**o + ((-0.766716797283-0.935756000891j))*x[2]
            ref[(1, 3, 2, 2)]=(-0.436369734095+0.922142727112j)/(o+1.)+((0.0651623735491-0.683165903348j))+((-0.973870139444+0.910117008647j))*0.5**o
            arg[(1, 3, 2, 3)]=(-0.0136588526234+0.247080326076j)*x[0]**o + ((0.249024413874+0.813943111462j))*x[0] + ((0.281020799965-0.606864822584j))*x[1]**o + ((0.52805597152-0.704476448519j))*x[1] + ((0.871891404525-0.90226355008j))*x[2]**o + ((0.610833397958+0.612276724924j))*x[2]
            ref[(1, 3, 2, 3)]=(1.15291220449-1.50912837266j)/(o+1.)+((0.693956891676+0.360871693933j))+((-0.0136588526234+0.247080326076j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.60863691695-0.948725367107j)*x[0]**o + ((0.802642269445+0.486206961305j))*x[0] + ((0.906607985579+0.999186463694j))*x[1]**o + ((0.470488216041-0.267449681381j))*x[1] + ((0.139055237671+0.278396705094j))*x[2]**o + ((-0.512424583117-0.814758991899j))*x[2]
            ref[(2, 0, 0, 0)]=(1.04566322325+1.27758316879j)/(o+1.)+((0.380352951185-0.298000855988j))+((0.60863691695-0.948725367107j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.668851748191-0.594655578334j)*x[0]**o + ((-0.2730834471+0.114188427874j))*x[0] + ((-0.597568150629-0.984573662945j))*x[1]**o + ((0.511719920763-0.373683393267j))*x[1] + ((0.174326743832-0.932948508048j))*x[2]**o + ((-0.15558691852-0.459473355076j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.423241406797-1.91752217099j)/(o+1.)+((0.0415247775711-0.359484160235j))+((-0.668851748191-0.594655578334j))*0.5**o
            arg[(2, 0, 0, 2)]=(0.421878280059-0.274413365845j)*x[0]**o + ((0.515646540382+0.843992710298j))*x[0] + ((-0.144632213391-0.161879580988j))*x[1]**o + ((-0.729711945192+0.793409267358j))*x[1] + ((-0.210243407369-0.024443241588j))*x[2]**o + ((0.937928160507+0.0900422093749j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.35487562076-0.186322822576j)/(o+1.)+((0.361931377849+0.863722093515j))+((0.421878280059-0.274413365845j))*0.5**o
            arg[(2, 0, 0, 3)]=(0.973526766892+0.314320290344j)*x[0]**o + ((0.653254325296+0.371573736229j))*x[0] + ((-0.967293704254-0.49191509237j))*x[1]**o + ((-0.83075484+0.833096117167j))*x[1] + ((0.468902952327+0.548931925002j))*x[2]**o + ((0.311131086409-0.127093774686j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.498390751927+0.0570168326325j)/(o+1.)+((0.0668152858526+0.538788039355j))+((0.973526766892+0.314320290344j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.99028536706+0.544251057259j)*x[0]**o + ((-0.393971543049-0.868058143496j))*x[0] + ((0.965541236718+0.920892320401j))*x[1]**o + ((0.0828890381876+0.535372278477j))*x[1] + ((0.0451720645774-0.866612169177j))*x[2]**o + ((-0.48720374926+0.964320095035j))*x[2]
            ref[(2, 0, 1, 0)]=(1.0107133013+0.0542801512242j)/(o+1.)+((-0.399143127061+0.315817115008j))+((0.99028536706+0.544251057259j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.781668323149-0.987832097821j)*x[0]**o + ((-0.455612255851-0.994657638032j))*x[0] + ((0.826288129712+0.566736914686j))*x[1]**o + ((-0.514083779483-0.548819844425j))*x[1] + ((-0.0938138942432+0.0494667827299j))*x[2]**o + ((-0.748344008584+0.255202330683j))*x[2]
            ref[(2, 0, 1, 1)]=(0.732474235468+0.616203697416j)/(o+1.)+((-0.859020021959-0.644137575887j))+((0.781668323149-0.987832097821j))*0.5**o
            arg[(2, 0, 1, 2)]=(0.992454803665-0.397009839831j)*x[0]**o + ((0.705927986705+0.24478831516j))*x[0] + ((-0.0713681583031-0.794881807589j))*x[1]**o + ((0.834440076875-0.641304489588j))*x[1] + ((-0.523448772166+0.639125556264j))*x[2]**o + ((-0.194853071998-0.0290058817709j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.594816930469-0.155756251324j)/(o+1.)+((0.672757495791-0.2127610281j))+((0.992454803665-0.397009839831j))*0.5**o
            arg[(2, 0, 1, 3)]=(0.696508244887+0.664932855897j)*x[0]**o + ((-0.864400279104-0.028623866167j))*x[0] + ((-0.855650663067+0.659449698273j))*x[1]**o + ((-0.897812667958-0.617811802359j))*x[1] + ((0.775986377488+0.490171078809j))*x[2]**o + ((0.170599328833-0.170961565684j))*x[2]
            ref[(2, 0, 1, 3)]=(-0.0796642855789+1.14962077708j)/(o+1.)+((-0.795806809115-0.408698617105j))+((0.696508244887+0.664932855897j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.247073879301-0.963770267686j)*x[0]**o + ((-0.724741566348-0.628586500614j))*x[0] + ((0.719401488382-0.70008264448j))*x[1]**o + ((0.890184613557-0.9648771853j))*x[1] + ((-0.674851478609-0.515220529163j))*x[2]**o + ((-0.877471427818+0.126745197981j))*x[2]
            ref[(2, 0, 2, 0)]=(0.0445500097725-1.21530317364j)/(o+1.)+((-0.356014190305-0.733359243966j))+((-0.247073879301-0.963770267686j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.344975780556-0.473039553138j)*x[0]**o + ((-0.16399358338+0.433533426908j))*x[0] + ((-0.374268409978-0.638814175949j))*x[1]**o + ((-0.257798980574+0.671423188973j))*x[1] + ((0.447688212529-0.916935012625j))*x[2]**o + ((-0.100909068097+0.157498440123j))*x[2]
            ref[(2, 0, 2, 1)]=(0.0734198025508-1.55574918857j)/(o+1.)+((-0.261350816025+0.631227528002j))+((-0.344975780556-0.473039553138j))*0.5**o
            arg[(2, 0, 2, 2)]=(-0.0421686519285-0.273545077052j)*x[0]**o + ((-0.870627706431-0.719903756016j))*x[0] + ((0.737986850314-0.850544389562j))*x[1]**o + ((0.912318175864+0.285484406845j))*x[1] + ((-0.178292394918-0.706207981479j))*x[2]**o + ((0.823010925845+0.415059742255j))*x[2]
            ref[(2, 0, 2, 2)]=(0.559694455396-1.55675237104j)/(o+1.)+((0.432350697639-0.00967980345807j))+((-0.0421686519285-0.273545077052j))*0.5**o
            arg[(2, 0, 2, 3)]=(-0.492194473284-0.908236930563j)*x[0]**o + ((0.377489198101+0.70085168515j))*x[0] + ((-0.551161352082+0.52784715821j))*x[1]**o + ((0.0474664317256-0.630167652802j))*x[1] + ((-0.0106563759754-0.355983085392j))*x[2]**o + ((-0.161114468416-0.878932446609j))*x[2]
            ref[(2, 0, 2, 3)]=(-0.561817728058+0.171864072817j)/(o+1.)+((0.131920580705-0.404124207131j))+((-0.492194473284-0.908236930563j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.257452197117+0.912665291143j)*x[0]**o + ((0.270727813362+0.306013859911j))*x[0] + ((-0.351421607652-0.455634136832j))*x[1]**o + ((-0.375975944925+0.805675696371j))*x[1] + ((0.360601432438+0.496464815602j))*x[2]**o + ((0.236940563881-0.15058345228j))*x[2]
            ref[(2, 1, 0, 0)]=(0.00917982478579+0.0408306787704j)/(o+1.)+((0.0658462161592+0.480553052001j))+((-0.257452197117+0.912665291143j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.767041669729-0.831735871095j)*x[0]**o + ((0.0286964765257+0.522267239557j))*x[0] + ((-0.00988521688366+0.994774580193j))*x[1]**o + ((-0.235573348331+0.37423464692j))*x[1] + ((-0.71594789129+0.960886130549j))*x[2]**o + ((-0.933853803818+0.768698813164j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.725833108174+1.95566071074j)/(o+1.)+((-0.570365337812+0.83260034982j))+((-0.767041669729-0.831735871095j))*0.5**o
            arg[(2, 1, 0, 2)]=(0.165152480867+0.333771378674j)*x[0]**o + ((-0.641299188255+0.23103548846j))*x[0] + ((0.988159362218+0.753177995977j))*x[1]**o + ((0.43326494149+0.840353468835j))*x[1] + ((-0.544890388816+0.941909304857j))*x[2]**o + ((0.147629741577+0.226008838027j))*x[2]
            ref[(2, 1, 0, 2)]=(0.443268973402+1.69508730083j)/(o+1.)+((-0.0302022525942+0.648698897661j))+((0.165152480867+0.333771378674j))*0.5**o
            arg[(2, 1, 0, 3)]=(-0.797622887992-0.763518296156j)*x[0]**o + ((-0.65573680129-0.0142738307495j))*x[0] + ((-0.481894414097-0.656392615268j))*x[1]**o + ((-0.764818828635-0.191080824752j))*x[1] + ((0.72053042689+0.817568143371j))*x[2]**o + ((0.437947933955+0.700354833226j))*x[2]
            ref[(2, 1, 0, 3)]=(0.238636012792+0.161175528103j)/(o+1.)+((-0.491303847986+0.247500088863j))+((-0.797622887992-0.763518296156j))*0.5**o
            arg[(2, 1, 1, 0)]=(-0.312588483158+0.0021339272333j)*x[0]**o + ((-0.0622015862842-0.0935180876271j))*x[0] + ((-0.909456448729+0.488641311146j))*x[1]**o + ((0.465548101414-0.0169009271742j))*x[1] + ((-0.524272503338-0.978924113412j))*x[2]**o + ((-0.112385186725-0.15924095977j))*x[2]
            ref[(2, 1, 1, 0)]=(-1.43372895207-0.490282802266j)/(o+1.)+((0.145480664203-0.134829987286j))+((-0.312588483158+0.0021339272333j))*0.5**o
            arg[(2, 1, 1, 1)]=(0.144616227632-0.198386028091j)*x[0]**o + ((0.122520800857-0.621965749075j))*x[0] + ((0.0793701195087-0.88617773641j))*x[1]**o + ((0.891719974868+0.292667669981j))*x[1] + ((0.634058904541-0.0966610575168j))*x[2]**o + ((-0.00833226402812-0.488726165907j))*x[2]
            ref[(2, 1, 1, 1)]=(0.713429024049-0.982838793927j)/(o+1.)+((0.502954255849-0.409012122501j))+((0.144616227632-0.198386028091j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.101395957617+0.275302579312j)*x[0]**o + ((0.568667549964+0.934411114635j))*x[0] + ((-0.083181713753-0.0766599838043j))*x[1]**o + ((-0.269284594965-0.67180840969j))*x[1] + ((0.802036605492+0.609282933504j))*x[2]**o + ((-0.492248448261-0.234140933001j))*x[2]
            ref[(2, 1, 1, 2)]=(0.718854891739+0.5326229497j)/(o+1.)+((-0.0964327466307+0.0142308859723j))+((0.101395957617+0.275302579312j))*0.5**o
            arg[(2, 1, 1, 3)]=(0.604890630686-0.565108421492j)*x[0]**o + ((-0.31998345401-0.00557646816526j))*x[0] + ((-0.372648543953+0.0438199302599j))*x[1]**o + ((0.282575444101-0.839091247559j))*x[1] + ((-0.775126673295+0.353798221802j))*x[2]**o + ((0.271291475653-0.0217917529155j))*x[2]
            ref[(2, 1, 1, 3)]=(-1.14777521725+0.397618152062j)/(o+1.)+((0.116941732872-0.43322973432j))+((0.604890630686-0.565108421492j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.500896344983-0.431175602738j)*x[0]**o + ((-0.0951814297031-0.834115854276j))*x[0] + ((0.311789457614-0.66822859195j))*x[1]**o + ((-0.881689887362+0.219714369995j))*x[1] + ((0.131520786886+0.422067955475j))*x[2]**o + ((-0.298218111672-0.838639827998j))*x[2]
            ref[(2, 1, 2, 0)]=(0.4433102445-0.246160636475j)/(o+1.)+((-0.637544714369-0.72652065614j))+((-0.500896344983-0.431175602738j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.153090989556+0.763595673142j)*x[0]**o + ((-0.924674847903-0.977567308516j))*x[0] + ((0.567351805454-0.414209201227j))*x[1]**o + ((0.225140922213+0.475030815289j))*x[1] + ((0.62501512328+0.202285922157j))*x[2]**o + ((-0.67201625067+0.0241016032687j))*x[2]
            ref[(2, 1, 2, 1)]=(1.19236692873-0.211923279071j)/(o+1.)+((-0.68577508818-0.239217444979j))+((-0.153090989556+0.763595673142j))*0.5**o
            arg[(2, 1, 2, 2)]=(-0.877338630288-0.624282228669j)*x[0]**o + ((0.698102646401+0.37566399766j))*x[0] + ((-0.581925739691+0.184946597807j))*x[1]**o + ((0.565430585326-0.860793541771j))*x[1] + ((0.0697606300831+0.110196944442j))*x[2]**o + ((-0.960885394821-0.438672334583j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.512165109608+0.295143542249j)/(o+1.)+((0.151323918453-0.461900939347j))+((-0.877338630288-0.624282228669j))*0.5**o
            arg[(2, 1, 2, 3)]=(-0.673118048761-0.72761309089j)*x[0]**o + ((-0.111010917995+0.978074819038j))*x[0] + ((0.280968642021-0.334908024915j))*x[1]**o + ((-0.628375114254+0.33377727784j))*x[1] + ((-0.634709498444-0.380041944928j))*x[2]**o + ((-0.50146771341+0.573223947167j))*x[2]
            ref[(2, 1, 2, 3)]=(-0.353740856423-0.714949969842j)/(o+1.)+((-0.620426872829+0.942538022023j))+((-0.673118048761-0.72761309089j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.220261215702-0.249616373761j)*x[0]**o + ((-0.0462056846393-0.398840976273j))*x[0] + ((-0.116735550037+0.216159975688j))*x[1]**o + ((-0.559336148275-0.588088959942j))*x[1] + ((-0.284956148967-0.0138756360417j))*x[2]**o + ((-0.0396259899972-0.168762393565j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.401691699003+0.202284339647j)/(o+1.)+((-0.322583911456-0.57784616489j))+((-0.220261215702-0.249616373761j))*0.5**o
            arg[(2, 2, 0, 1)]=(-0.305857022176+0.708047683518j)*x[0]**o + ((-0.601616301267-0.569051174019j))*x[0] + ((-0.29641845912+0.848419098411j))*x[1]**o + ((0.549391466936-0.258807218562j))*x[1] + ((0.743758447687+0.802761331165j))*x[2]**o + ((-0.284976700285-0.700447254938j))*x[2]
            ref[(2, 2, 0, 1)]=(0.447339988568+1.65118042958j)/(o+1.)+((-0.168600767308-0.764152823759j))+((-0.305857022176+0.708047683518j))*0.5**o
            arg[(2, 2, 0, 2)]=(-0.828076252465-0.970158245799j)*x[0]**o + ((-0.255681010489-0.375405575239j))*x[0] + ((-0.335012448154+0.702601773734j))*x[1]**o + ((-0.330899794767-0.51141258569j))*x[1] + ((0.762201587512+0.541584477242j))*x[2]**o + ((-0.419170567908-0.0537419207207j))*x[2]
            ref[(2, 2, 0, 2)]=(0.427189139358+1.24418625098j)/(o+1.)+((-0.502875686582-0.470280040824j))+((-0.828076252465-0.970158245799j))*0.5**o
            arg[(2, 2, 0, 3)]=(0.843448620885+0.302582939349j)*x[0]**o + ((0.7818456889-0.881218414542j))*x[0] + ((0.880712875533+0.699302374083j))*x[1]**o + ((0.878089628322+0.61743951862j))*x[1] + ((-0.584748728827-0.746225992334j))*x[2]**o + ((0.675280267187-0.836369861775j))*x[2]
            ref[(2, 2, 0, 3)]=(0.295964146706-0.0469236182516j)/(o+1.)+((1.1676077922-0.550074378849j))+((0.843448620885+0.302582939349j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.387151706195+0.505197208652j)*x[0]**o + ((-0.545777742293-0.429498972392j))*x[0] + ((-0.824138303401-0.743560761878j))*x[1]**o + ((-0.250045289681+0.966517276241j))*x[1] + ((0.710610056891-0.0806611451863j))*x[2]**o + ((-0.523185610074+0.442187384053j))*x[2]
            ref[(2, 2, 1, 0)]=(-0.113528246509-0.824221907065j)/(o+1.)+((-0.659504321024+0.489602843951j))+((0.387151706195+0.505197208652j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.403823058474-0.109340086544j)*x[0]**o + ((0.419854908704-0.676979974168j))*x[0] + ((-0.717298989323+0.459823856306j))*x[1]**o + ((-0.326597044375+0.898749126021j))*x[1] + ((-0.140759696655-0.384121507927j))*x[2]**o + ((-0.53084972908+0.894155467813j))*x[2]
            ref[(2, 2, 1, 1)]=(-0.858058685979+0.0757023483791j)/(o+1.)+((-0.218795932375+0.557962309833j))+((0.403823058474-0.109340086544j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.598187763613-0.542807767906j)*x[0]**o + ((-0.369903379716+0.173580184269j))*x[0] + ((0.62630710594+0.754478402506j))*x[1]**o + ((-0.0569135124714+0.539616221647j))*x[1] + ((0.401781332853+0.817653605811j))*x[2]**o + ((-0.545951320815-0.9935146112j))*x[2]
            ref[(2, 2, 1, 2)]=(1.02808843879+1.57213200832j)/(o+1.)+((-0.486384106501-0.140159102642j))+((-0.598187763613-0.542807767906j))*0.5**o
            arg[(2, 2, 1, 3)]=(-0.330773435807+0.86044421292j)*x[0]**o + ((-0.134833168237+0.834403358209j))*x[0] + ((0.735441300847+0.71513875896j))*x[1]**o + ((0.216651420526+0.0288591167444j))*x[1] + ((-0.395224017299+0.63461144071j))*x[2]**o + ((-0.0746147499352+0.345354156433j))*x[2]
            ref[(2, 2, 1, 3)]=(0.340217283548+1.34975019967j)/(o+1.)+((0.00360175117666+0.604308315693j))+((-0.330773435807+0.86044421292j))*0.5**o
            arg[(2, 2, 2, 0)]=(0.651246222866+0.36463572605j)*x[0]**o + ((-0.329929060719+0.31718380678j))*x[0] + ((-0.303175373376+0.0404453182312j))*x[1]**o + ((0.355645987707-0.646360114547j))*x[1] + ((-0.226595507408+0.844088272524j))*x[2]**o + ((0.497828706997-0.0706674139239j))*x[2]
            ref[(2, 2, 2, 0)]=(-0.529770880783+0.884533590755j)/(o+1.)+((0.261772816992-0.199921860845j))+((0.651246222866+0.36463572605j))*0.5**o
            arg[(2, 2, 2, 1)]=(0.784506905904-0.526672835561j)*x[0]**o + ((-0.221171383365-0.329950813899j))*x[0] + ((0.81660607331+0.962639365172j))*x[1]**o + ((-0.974208333417+0.00401225669299j))*x[1] + ((-0.804004841647+0.62174030963j))*x[2]**o + ((-0.236202591522+0.813927594237j))*x[2]
            ref[(2, 2, 2, 1)]=(0.0126012316632+1.5843796748j)/(o+1.)+((-0.715791154152+0.243994518516j))+((0.784506905904-0.526672835561j))*0.5**o
            arg[(2, 2, 2, 2)]=(0.977984960741-0.180998426246j)*x[0]**o + ((0.687219031506+0.260297685129j))*x[0] + ((-0.0440775109999+0.232150119681j))*x[1]**o + ((0.264351703597-0.202468401245j))*x[1] + ((0.269701043722-0.937278783356j))*x[2]**o + ((0.249381678205-0.87983118583j))*x[2]
            ref[(2, 2, 2, 2)]=(0.225623532722-0.705128663675j)/(o+1.)+((0.600476206654-0.411000950973j))+((0.977984960741-0.180998426246j))*0.5**o
            arg[(2, 2, 2, 3)]=(-0.0137397941207-0.868959213106j)*x[0]**o + ((0.897952078201+0.470616093993j))*x[0] + ((-0.486350280789+0.390662156872j))*x[1]**o + ((0.204506391069-0.605007024793j))*x[1] + ((0.430575575916-0.904732934802j))*x[2]**o + ((0.446198642907+0.513436183419j))*x[2]
            ref[(2, 2, 2, 3)]=(-0.0557747048734-0.51407077793j)/(o+1.)+((0.774328556089+0.189522626309j))+((-0.0137397941207-0.868959213106j))*0.5**o
            arg[(2, 3, 0, 0)]=(0.196268119472+0.046818869923j)*x[0]**o + ((-0.657323351553-0.0534762320536j))*x[0] + ((0.514977679661+0.218485969208j))*x[1]**o + ((-0.69364191691-0.0248100354609j))*x[1] + ((0.585488642466+0.853956668802j))*x[2]**o + ((-0.87424472737-0.0930387692745j))*x[2]
            ref[(2, 3, 0, 0)]=(1.10046632213+1.07244263801j)/(o+1.)+((-1.11260499792-0.0856625183945j))+((0.196268119472+0.046818869923j))*0.5**o
            arg[(2, 3, 0, 1)]=(0.289147030199+0.650035879475j)*x[0]**o + ((-0.998745821937+0.972735624305j))*x[0] + ((-0.816838076689-0.614764530666j))*x[1]**o + ((-0.377082077496+0.740258378983j))*x[1] + ((-0.567103888694+0.566495900452j))*x[2]**o + ((-0.869885746225-0.292977924125j))*x[2]
            ref[(2, 3, 0, 1)]=(-1.38394196538-0.0482686302141j)/(o+1.)+((-1.12285682283+0.710008039582j))+((0.289147030199+0.650035879475j))*0.5**o
            arg[(2, 3, 0, 2)]=(-0.980109019242+0.197583141401j)*x[0]**o + ((0.92219315864+0.559550213685j))*x[0] + ((0.200522204589-0.191656516473j))*x[1]**o + ((0.0490028426043-0.0648556638272j))*x[1] + ((-0.352836629442-0.461040633869j))*x[2]**o + ((0.0273085208712+0.250448820902j))*x[2]
            ref[(2, 3, 0, 2)]=(-0.152314424853-0.652697150342j)/(o+1.)+((0.499252261058+0.37257168538j))+((-0.980109019242+0.197583141401j))*0.5**o
            arg[(2, 3, 0, 3)]=(-0.787757130246+0.968904874961j)*x[0]**o + ((-0.421724800767-0.408261312942j))*x[0] + ((0.358106311705-0.00330699032484j))*x[1]**o + ((0.98509124418+0.0803521372641j))*x[1] + ((-0.297905535526-0.526368503088j))*x[2]**o + ((-0.77527466837-0.810927309981j))*x[2]
            ref[(2, 3, 0, 3)]=(0.0602007761786-0.529675493412j)/(o+1.)+((-0.105954112479-0.56941824283j))+((-0.787757130246+0.968904874961j))*0.5**o
            arg[(2, 3, 1, 0)]=(-0.973434915956-0.745747636264j)*x[0]**o + ((-0.746380716663+0.922020634178j))*x[0] + ((0.575835853932+0.537521170716j))*x[1]**o + ((-0.00814241212717+0.893263469488j))*x[1] + ((0.832941472542-0.374758625731j))*x[2]**o + ((0.528626241527-0.409202164018j))*x[2]
            ref[(2, 3, 1, 0)]=(1.40877732647+0.162762544986j)/(o+1.)+((-0.112948443632+0.703040969824j))+((-0.973434915956-0.745747636264j))*0.5**o
            arg[(2, 3, 1, 1)]=(-0.649087602099+0.279101514203j)*x[0]**o + ((0.334930390354-0.263692825084j))*x[0] + ((-0.462680050253+0.907880539399j))*x[1]**o + ((0.62569226463-0.0333402878457j))*x[1] + ((0.354455962425-0.968216505658j))*x[2]**o + ((-0.375410427885+0.271532794021j))*x[2]
            ref[(2, 3, 1, 1)]=(-0.108224087828-0.0603359662596j)/(o+1.)+((0.292606113549-0.0127501594545j))+((-0.649087602099+0.279101514203j))*0.5**o
            arg[(2, 3, 1, 2)]=(0.901331457801-0.484860075589j)*x[0]**o + ((-0.156118909324-0.279863928229j))*x[0] + ((-0.986839133655+0.107694845207j))*x[1]**o + ((-0.610682124049-0.792854672857j))*x[1] + ((-0.32047360626-0.834464674351j))*x[2]**o + ((-0.395886718359+0.177423620416j))*x[2]
            ref[(2, 3, 1, 2)]=(-1.30731273991-0.726769829144j)/(o+1.)+((-0.581343875866-0.447647490335j))+((0.901331457801-0.484860075589j))*0.5**o
            arg[(2, 3, 1, 3)]=(0.961496680581+0.99540453634j)*x[0]**o + ((-0.49118325087+0.236059703601j))*x[0] + ((-0.894770870248+0.132124348308j))*x[1]**o + ((0.0242624199681-0.106185091386j))*x[1] + ((-0.981576745281+0.725015405733j))*x[2]**o + ((-0.252561784905-0.159864530396j))*x[2]
            ref[(2, 3, 1, 3)]=(-1.87634761553+0.857139754041j)/(o+1.)+((-0.359741307903-0.0149949590908j))+((0.961496680581+0.99540453634j))*0.5**o
            arg[(2, 3, 2, 0)]=(-0.298747356464-0.277670528526j)*x[0]**o + ((-0.588766679535-0.845249586882j))*x[0] + ((-0.0341702574778-0.0941097343316j))*x[1]**o + ((-0.441264115826+0.0111943241625j))*x[1] + ((-0.0960308131702-0.135479697815j))*x[2]**o + ((0.618561002457+0.66447510952j))*x[2]
            ref[(2, 3, 2, 0)]=(-0.130201070648-0.229589432146j)/(o+1.)+((-0.205734896452-0.0847900765996j))+((-0.298747356464-0.277670528526j))*0.5**o
            arg[(2, 3, 2, 1)]=(0.0913358249488+0.43596679661j)*x[0]**o + ((0.887138764295+0.0352534080268j))*x[0] + ((0.796415638356-0.623366753268j))*x[1]**o + ((-0.0937632630346-0.362953720598j))*x[1] + ((-0.403001880289+0.757499557402j))*x[2]**o + ((0.335941759869+0.647992312845j))*x[2]
            ref[(2, 3, 2, 1)]=(0.393413758067+0.134132804134j)/(o+1.)+((0.564658630565+0.160146000137j))+((0.0913358249488+0.43596679661j))*0.5**o
            arg[(2, 3, 2, 2)]=(0.926055552485-0.221279282622j)*x[0]**o + ((-0.322034718891+0.45200824166j))*x[0] + ((0.0790059906602+0.0919443419035j))*x[1]**o + ((-0.046149816761-0.614451824662j))*x[1] + ((0.0496271455213+0.477494759216j))*x[2]**o + ((0.0919006338665-0.036568544774j))*x[2]
            ref[(2, 3, 2, 2)]=(0.128633136181+0.56943910112j)/(o+1.)+((-0.138141950893-0.0995060638881j))+((0.926055552485-0.221279282622j))*0.5**o
            arg[(2, 3, 2, 3)]=(0.253807120653+0.782593489372j)*x[0]**o + ((-0.874779521335+0.293116924842j))*x[0] + ((0.460913346713-0.130071464398j))*x[1]**o + ((0.804922602827-0.953096634526j))*x[1] + ((-0.858524418503-0.635322065741j))*x[2]**o + ((0.00178125084608-0.601767414456j))*x[2]
            ref[(2, 3, 2, 3)]=(-0.397611071789-0.765393530139j)/(o+1.)+((-0.0340378338311-0.63087356207j))+((0.253807120653+0.782593489372j))*0.5**o
            arg[(3, 0, 0, 0)]=(-0.444731399897+0.574339175474j)*x[0]**o + ((-0.636622451358+0.394380868206j))*x[0] + ((-0.803115153275+0.0362253738377j))*x[1]**o + ((0.0194739979684-0.266415143435j))*x[1] + ((0.559071931119+0.599139147481j))*x[2]**o + ((-0.30352029958-0.140211992487j))*x[2]
            ref[(3, 0, 0, 0)]=(-0.244043222156+0.635364521319j)/(o+1.)+((-0.460334376485-0.00612313385757j))+((-0.444731399897+0.574339175474j))*0.5**o
            arg[(3, 0, 0, 1)]=(-0.583442691383-0.18023795269j)*x[0]**o + ((0.60608172166-0.141456203984j))*x[0] + ((-0.946307388152+0.53246322839j))*x[1]**o + ((-0.570745256624+0.682624457063j))*x[1] + ((0.0853737252758+0.497584862835j))*x[2]**o + ((0.753898371593-0.440318423935j))*x[2]
            ref[(3, 0, 0, 1)]=(-0.860933662877+1.03004809122j)/(o+1.)+((0.394617418314+0.0504249145723j))+((-0.583442691383-0.18023795269j))*0.5**o
            arg[(3, 0, 0, 2)]=(-0.910541627241+0.784278300278j)*x[0]**o + ((0.970762919656+0.784850243136j))*x[0] + ((-0.731006040402-0.243582600748j))*x[1]**o + ((-0.840442301454-0.911845535774j))*x[1] + ((-0.779108435924-0.909779561806j))*x[2]**o + ((-0.916278181086+0.680092304123j))*x[2]
            ref[(3, 0, 0, 2)]=(-1.51011447633-1.15336216255j)/(o+1.)+((-0.392978781442+0.276548505743j))+((-0.910541627241+0.784278300278j))*0.5**o
            arg[(3, 0, 0, 3)]=(-0.440511678752+0.672166025772j)*x[0]**o + ((0.623199173499+0.60577219156j))*x[0] + ((-0.72960104405-0.589122026126j))*x[1]**o + ((-0.138696091507+0.219582184055j))*x[1] + ((0.0644896194049-0.734120811295j))*x[2]**o + ((0.27883087255-0.278748468881j))*x[2]
            ref[(3, 0, 0, 3)]=(-0.665111424645-1.32324283742j)/(o+1.)+((0.381666977271+0.273302953367j))+((-0.440511678752+0.672166025772j))*0.5**o
            arg[(3, 0, 1, 0)]=(0.0460763149792-0.082785472288j)*x[0]**o + ((0.0183334808068+0.960601737648j))*x[0] + ((-0.0193133110405-0.70706695043j))*x[1]**o + ((0.840536417077+0.176798955643j))*x[1] + ((-0.777995199369-0.454529824051j))*x[2]**o + ((-0.430286426237-0.703746636123j))*x[2]
            ref[(3, 0, 1, 0)]=(-0.79730851041-1.16159677448j)/(o+1.)+((0.214291735824+0.216827028584j))+((0.0460763149792-0.082785472288j))*0.5**o
            arg[(3, 0, 1, 1)]=(0.453521256699-0.240637924513j)*x[0]**o + ((-0.0455870788917+0.16883818403j))*x[0] + ((0.0699097904399+0.692659038644j))*x[1]**o + ((0.182530453284-0.223147323785j))*x[1] + ((-0.15906903093+0.560565074326j))*x[2]**o + ((0.240248598227+0.353666734889j))*x[2]
            ref[(3, 0, 1, 1)]=(-0.0891592404899+1.25322411297j)/(o+1.)+((0.18859598631+0.149678797567j))+((0.453521256699-0.240637924513j))*0.5**o
            arg[(3, 0, 1, 2)]=(-0.107209310955+0.898047446063j)*x[0]**o + ((-0.720064977229+0.0430763342483j))*x[0] + ((-0.042504475909+0.865108768635j))*x[1]**o + ((-0.466013966041-0.428815348185j))*x[1] + ((-0.608514400389+0.984529247431j))*x[2]**o + ((0.0261076434814-0.109470515781j))*x[2]
            ref[(3, 0, 1, 2)]=(-0.651018876298+1.84963801607j)/(o+1.)+((-0.579985649894-0.247604764859j))+((-0.107209310955+0.898047446063j))*0.5**o
            arg[(3, 0, 1, 3)]=(-0.49668970804+0.882209850071j)*x[0]**o + ((-0.0888411452657-0.536397023472j))*x[0] + ((-0.163227624997+0.976056572192j))*x[1]**o + ((-0.731735288641-0.512552002468j))*x[1] + ((-0.486676378359+0.319003738097j))*x[2]**o + ((-0.0137019082318+0.651046603622j))*x[2]
            ref[(3, 0, 1, 3)]=(-0.649904003356+1.29506031029j)/(o+1.)+((-0.417139171069-0.198951211159j))+((-0.49668970804+0.882209850071j))*0.5**o
            arg[(3, 0, 2, 0)]=(0.578207364-0.00015702999758j)*x[0]**o + ((-0.319748474833+0.912370460227j))*x[0] + ((-0.991490050969-0.362179412984j))*x[1]**o + ((0.379686844233-0.921981830763j))*x[1] + ((-0.544464826175-0.225531409169j))*x[2]**o + ((-0.735745699392+0.91492031524j))*x[2]
            ref[(3, 0, 2, 0)]=(-1.53595487714-0.587710822154j)/(o+1.)+((-0.337903664996+0.452654472352j))+((0.578207364-0.00015702999758j))*0.5**o
            arg[(3, 0, 2, 1)]=(-0.236689006052-0.608199565522j)*x[0]**o + ((0.00445023851097-0.995827282322j))*x[0] + ((-0.356583648447-0.834177510169j))*x[1]**o + ((0.375128592334+0.17721550967j))*x[1] + ((-0.564470288766-0.768763043371j))*x[2]**o + ((-0.562481028454+0.433952837729j))*x[2]
            ref[(3, 0, 2, 1)]=(-0.921053937214-1.60294055354j)/(o+1.)+((-0.0914510988043-0.192329467461j))+((-0.236689006052-0.608199565522j))*0.5**o
            arg[(3, 0, 2, 2)]=(0.135610943141+0.20509018413j)*x[0]**o + ((-0.341651460081-0.604536169562j))*x[0] + ((-0.517802385934-0.322480783433j))*x[1]**o + ((0.799149028347-0.771140742908j))*x[1] + ((0.694083180253-0.539494585379j))*x[2]**o + ((0.0398366573701+0.0480600472142j))*x[2]
            ref[(3, 0, 2, 2)]=(0.17628079432-0.861975368812j)/(o+1.)+((0.248667112818-0.663808432628j))+((0.135610943141+0.20509018413j))*0.5**o
            arg[(3, 0, 2, 3)]=(-0.222330602957+0.22778848297j)*x[0]**o + ((-0.130396919267-0.363836685278j))*x[0] + ((0.348163303584+0.0401160038562j))*x[1]**o + ((-0.710930916253+0.941504642273j))*x[1] + ((0.831534429712-0.462601215776j))*x[2]**o + ((0.12432270864+0.671218611056j))*x[2]
            ref[(3, 0, 2, 3)]=(1.1796977333-0.42248521192j)/(o+1.)+((-0.35850256344+0.624443284026j))+((-0.222330602957+0.22778848297j))*0.5**o
            arg[(3, 1, 0, 0)]=(0.646318227894+0.686328782084j)*x[0]**o + ((-0.6876289665+0.612161868909j))*x[0] + ((-0.148834455072+0.288514622169j))*x[1]**o + ((0.647538042422+0.457256055631j))*x[1] + ((-0.750062037874+0.495780875958j))*x[2]**o + ((0.274775762867-0.156926359811j))*x[2]
            ref[(3, 1, 0, 0)]=(-0.898896492946+0.784295498127j)/(o+1.)+((0.117342419394+0.456245782365j))+((0.646318227894+0.686328782084j))*0.5**o
            arg[(3, 1, 0, 1)]=(0.0464934539027+0.741803277209j)*x[0]**o + ((-0.237206215407+0.185662081405j))*x[0] + ((-0.942099148055-0.637331404045j))*x[1]**o + ((0.312053562292+0.67970109148j))*x[1] + ((0.721810498595-0.583076057335j))*x[2]**o + ((-0.533918290406-0.446412366014j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.22028864946-1.22040746138j)/(o+1.)+((-0.229535471761+0.209475403435j))+((0.0464934539027+0.741803277209j))*0.5**o
            arg[(3, 1, 0, 2)]=(0.784176283494+0.757088975316j)*x[0]**o + ((0.52420471094-0.928779994355j))*x[0] + ((-0.660575388021-0.24007291897j))*x[1]**o + ((0.799667628195+0.987111190889j))*x[1] + ((-0.193157535423-0.120723747012j))*x[2]**o + ((0.814110213379-0.736706416108j))*x[2]
            ref[(3, 1, 0, 2)]=(-0.853732923444-0.360796665982j)/(o+1.)+((1.06899127626-0.339187609787j))+((0.784176283494+0.757088975316j))*0.5**o
            arg[(3, 1, 0, 3)]=(0.876312319642+0.135470646873j)*x[0]**o + ((-0.481437774985-0.709917479848j))*x[0] + ((0.093203483003+0.574046372613j))*x[1]**o + ((0.512379950917-0.681992391553j))*x[1] + ((-0.840038371128-0.526805898438j))*x[2]**o + ((0.00390930714556+0.134188492736j))*x[2]
            ref[(3, 1, 0, 3)]=(-0.746834888125+0.0472404741749j)/(o+1.)+((0.017425741539-0.628860689332j))+((0.876312319642+0.135470646873j))*0.5**o
            arg[(3, 1, 1, 0)]=(-0.123071562902+0.733766336824j)*x[0]**o + ((0.373097351342-0.665650796324j))*x[0] + ((-0.851946017636+0.411887657851j))*x[1]**o + ((-0.600658028756+0.99862733373j))*x[1] + ((-0.371985736598-0.476934711568j))*x[2]**o + ((0.243913601528-0.331703579295j))*x[2]
            ref[(3, 1, 1, 0)]=(-1.22393175423-0.0650470537172j)/(o+1.)+((0.00817646205708+0.000636479055463j))+((-0.123071562902+0.733766336824j))*0.5**o
            arg[(3, 1, 1, 1)]=(0.632035781248-0.781455318061j)*x[0]**o + ((-0.284213739371+0.156128292239j))*x[0] + ((0.904340695351+0.410838255365j))*x[1]**o + ((-0.645885802446+0.558601889001j))*x[1] + ((-0.955356546223+0.889523912346j))*x[2]**o + ((0.192404515381+0.113570226317j))*x[2]
            ref[(3, 1, 1, 1)]=(-0.0510158508721+1.30036216771j)/(o+1.)+((-0.368847513218+0.414150203779j))+((0.632035781248-0.781455318061j))*0.5**o
            arg[(3, 1, 1, 2)]=(-0.295572413118+0.271085602357j)*x[0]**o + ((-0.615935287959+0.136646781808j))*x[0] + ((0.683315295341-0.962263077503j))*x[1]**o + ((-0.874485104958+0.553955075257j))*x[1] + ((-0.206625911375-0.707157204587j))*x[2]**o + ((-0.591889778659+0.972088050851j))*x[2]
            ref[(3, 1, 1, 2)]=(0.476689383966-1.66942028209j)/(o+1.)+((-1.04115508579+0.831344953958j))+((-0.295572413118+0.271085602357j))*0.5**o
            arg[(3, 1, 1, 3)]=(0.494298740552+0.673940225955j)*x[0]**o + ((0.838585840755-0.478514764209j))*x[0] + ((0.964189324479+0.853776255645j))*x[1]**o + ((0.239000589763-0.327977402204j))*x[1] + ((-0.885598646079-0.00729102383477j))*x[2]**o + ((-0.394226036044-0.4974073207j))*x[2]
            ref[(3, 1, 1, 3)]=(0.0785906783994+0.84648523181j)/(o+1.)+((0.341680197237-0.651949743557j))+((0.494298740552+0.673940225955j))*0.5**o
            arg[(3, 1, 2, 0)]=(-0.190442930917-0.108816215032j)*x[0]**o + ((0.490875574841-0.33417131696j))*x[0] + ((-0.850813231283-0.664295975762j))*x[1]**o + ((-0.883735620587+0.320068232969j))*x[1] + ((0.954014521224-0.980421349513j))*x[2]**o + ((-0.314602688208+0.418155665948j))*x[2]
            ref[(3, 1, 2, 0)]=(0.103201289941-1.64471732527j)/(o+1.)+((-0.353731366977+0.202026290978j))+((-0.190442930917-0.108816215032j))*0.5**o
            arg[(3, 1, 2, 1)]=(0.470037277097-0.886575295249j)*x[0]**o + ((0.832784450976+0.864238969961j))*x[0] + ((-0.0164145014936-0.793563451473j))*x[1]**o + ((0.277740872787-0.790676914298j))*x[1] + ((0.00793752743004-0.767429910944j))*x[2]**o + ((0.123584517678-0.651346539886j))*x[2]
            ref[(3, 1, 2, 1)]=(-0.00847697406357-1.56099336242j)/(o+1.)+((0.617054920721-0.288892242112j))+((0.470037277097-0.886575295249j))*0.5**o
            arg[(3, 1, 2, 2)]=(0.506553852305+0.657971794424j)*x[0]**o + ((-0.22930154921+0.860080546732j))*x[0] + ((0.768922696354+0.595269085804j))*x[1]**o + ((0.154093500564+0.0895959503459j))*x[1] + ((0.352173813877-0.464118351403j))*x[2]**o + ((-0.0988378484305-0.110239008067j))*x[2]
            ref[(3, 1, 2, 2)]=(1.12109651023+0.131150734401j)/(o+1.)+((-0.0870229485385+0.419718744506j))+((0.506553852305+0.657971794424j))*0.5**o
            arg[(3, 1, 2, 3)]=(-0.313715356397-0.00456889887528j)*x[0]**o + ((0.000792189823043-0.126847903506j))*x[0] + ((0.937478501981-0.236746039327j))*x[1]**o + ((-0.543234080325-0.48172723265j))*x[1] + ((-0.736003588379-0.817063970001j))*x[2]**o + ((0.755766547651+0.172991068644j))*x[2]
            ref[(3, 1, 2, 3)]=(0.201474913601-1.05381000933j)/(o+1.)+((0.106662328574-0.217792033756j))+((-0.313715356397-0.00456889887528j))*0.5**o
            arg[(3, 2, 0, 0)]=(-0.310400416085-0.129222757585j)*x[0]**o + ((0.976837752815+0.432485810259j))*x[0] + ((0.33748673382+0.102661916952j))*x[1]**o + ((0.292273656041-0.744146044771j))*x[1] + ((0.509294585576+0.319551976696j))*x[2]**o + ((-0.194594043181+0.278004872459j))*x[2]
            ref[(3, 2, 0, 0)]=(0.846781319396+0.422213893648j)/(o+1.)+((0.537258682837-0.0168276810263j))+((-0.310400416085-0.129222757585j))*0.5**o
            arg[(3, 2, 0, 1)]=(0.465752133008-0.991311995469j)*x[0]**o + ((-0.222362063517-0.844738400681j))*x[0] + ((-0.012777493301-0.235423397729j))*x[1]**o + ((-0.918658605963-0.640338108379j))*x[1] + ((-0.955268831629+0.303791269175j))*x[2]**o + ((0.809410436015-0.680977829251j))*x[2]
            ref[(3, 2, 0, 1)]=(-0.96804632493+0.0683678714457j)/(o+1.)+((-0.165805116732-1.08302716916j))+((0.465752133008-0.991311995469j))*0.5**o
            arg[(3, 2, 0, 2)]=(-0.964292239434-0.98313851988j)*x[0]**o + ((-0.245578739863+0.391439801105j))*x[0] + ((-0.812192282825+0.244165678965j))*x[1]**o + ((0.380552373238+0.481752394336j))*x[1] + ((-0.676138122287+0.387881100092j))*x[2]**o + ((0.427293227534+0.823127734993j))*x[2]
            ref[(3, 2, 0, 2)]=(-1.48833040511+0.632046779057j)/(o+1.)+((0.281133430454+0.848159965217j))+((-0.964292239434-0.98313851988j))*0.5**o
            arg[(3, 2, 0, 3)]=(-0.50675561369+0.0365608777685j)*x[0]**o + ((-0.176410936002+0.314255440065j))*x[0] + ((0.723322160087+0.514695602916j))*x[1]**o + ((0.671754702956+0.357037620076j))*x[1] + ((-0.272895944948+0.308092803337j))*x[2]**o + ((0.541972525785-0.447000139853j))*x[2]
            ref[(3, 2, 0, 3)]=(0.450426215139+0.822788406253j)/(o+1.)+((0.51865814637+0.112146460144j))+((-0.50675561369+0.0365608777685j))*0.5**o
            arg[(3, 2, 1, 0)]=(0.739558799325-0.344374078386j)*x[0]**o + ((-0.972404106495+0.592529288019j))*x[0] + ((0.534677608435+0.559146072967j))*x[1]**o + ((0.429377977587+0.493453216612j))*x[1] + ((0.58911198314-0.423967249856j))*x[2]**o + ((0.0494688724062-0.981805021501j))*x[2]
            ref[(3, 2, 1, 0)]=(1.12378959157+0.135178823111j)/(o+1.)+((-0.246778628251+0.0520887415651j))+((0.739558799325-0.344374078386j))*0.5**o
            arg[(3, 2, 1, 1)]=(0.909865417784-0.449446392974j)*x[0]**o + ((-0.164288789725-0.409652408889j))*x[0] + ((0.885192718061-0.311790667994j))*x[1]**o + ((-0.414649149264-0.638105484576j))*x[1] + ((0.813736355972+0.96009530138j))*x[2]**o + ((0.236356915522-0.219594227793j))*x[2]
            ref[(3, 2, 1, 1)]=(1.69892907403+0.648304633386j)/(o+1.)+((-0.171290511733-0.633676060629j))+((0.909865417784-0.449446392974j))*0.5**o
            arg[(3, 2, 1, 2)]=(0.152999965331+0.0230525109215j)*x[0]**o + ((0.391733325797-0.602509557462j))*x[0] + ((-0.319883944894-0.789407040729j))*x[1]**o + ((0.498623892036-0.155717972341j))*x[1] + ((-0.195057995917-0.620192034438j))*x[2]**o + ((-0.201515325653-0.274584748282j))*x[2]
            ref[(3, 2, 1, 2)]=(-0.514941940812-1.40959907517j)/(o+1.)+((0.34442094609-0.516406139043j))+((0.152999965331+0.0230525109215j))*0.5**o
            arg[(3, 2, 1, 3)]=(0.0640594015025+0.899462064905j)*x[0]**o + ((-0.10827039965+0.175502240874j))*x[0] + ((0.694015079259+0.467026618533j))*x[1]**o + ((0.333078717997+0.322286975333j))*x[1] + ((-0.259514693253+0.233121383087j))*x[2]**o + ((-0.249260868992-0.240177334546j))*x[2]
            ref[(3, 2, 1, 3)]=(0.434500386007+0.70014800162j)/(o+1.)+((-0.0122262753226+0.12880594083j))+((0.0640594015025+0.899462064905j))*0.5**o
            arg[(3, 2, 2, 0)]=(0.860035359178-0.905928421126j)*x[0]**o + ((-0.579605964438-0.821800243342j))*x[0] + ((-0.701160286817+0.0534643385989j))*x[1]**o + ((0.873485537712-0.605563798925j))*x[1] + ((0.422159300567+0.166280999055j))*x[2]**o + ((-0.221640269444+0.942295700689j))*x[2]
            ref[(3, 2, 2, 0)]=(-0.27900098625+0.219745337654j)/(o+1.)+((0.0361196519155-0.242534170789j))+((0.860035359178-0.905928421126j))*0.5**o
            arg[(3, 2, 2, 1)]=(0.0575498511953-0.733995584717j)*x[0]**o + ((-0.310431676403+0.716202072264j))*x[0] + ((-0.344765483854-0.302706053077j))*x[1]**o + ((0.135365357523-0.766518645392j))*x[1] + ((-0.593679561037-0.589973519026j))*x[2]**o + ((0.679077210694-0.805205676035j))*x[2]
            ref[(3, 2, 2, 1)]=(-0.938445044891-0.892679572103j)/(o+1.)+((0.252005445907-0.427761124582j))+((0.0575498511953-0.733995584717j))*0.5**o
            arg[(3, 2, 2, 2)]=(0.0169932949154+0.0400777068634j)*x[0]**o + ((-0.368092900754-0.0572426418891j))*x[0] + ((0.613399868743-0.962574261231j))*x[1]**o + ((0.232127752014+0.929070206355j))*x[1] + ((-0.986781328488-0.756450243596j))*x[2]**o + ((-0.411351069826-0.127924582917j))*x[2]
            ref[(3, 2, 2, 2)]=(-0.373381459744-1.71902450483j)/(o+1.)+((-0.273658109283+0.371951490774j))+((0.0169932949154+0.0400777068634j))*0.5**o
            arg[(3, 2, 2, 3)]=(0.124003080085-0.00197635296777j)*x[0]**o + ((-0.0527921432442+0.00841474372989j))*x[0] + ((0.439554870178-0.404795081114j))*x[1]**o + ((-0.319096255701+0.42598555455j))*x[1] + ((-0.937478264719-0.372485840262j))*x[2]**o + ((0.339354833603-0.10055731271j))*x[2]
            ref[(3, 2, 2, 3)]=(-0.497923394541-0.777280921377j)/(o+1.)+((-0.0162667826709+0.166921492785j))+((0.124003080085-0.00197635296777j))*0.5**o
            arg[(3, 3, 0, 0)]=(-0.471738901257-0.903370013498j)*x[0]**o + ((-0.197137644358+0.79414665463j))*x[0] + ((0.770205576736+0.25855361105j))*x[1]**o + ((-0.337211713666+0.843510395083j))*x[1] + ((0.971227553445-0.617867077418j))*x[2]**o + ((0.771946508993-0.768889162537j))*x[2]
            ref[(3, 3, 0, 0)]=(1.74143313018-0.359313466367j)/(o+1.)+((0.118798575485+0.434383943588j))+((-0.471738901257-0.903370013498j))*0.5**o
            arg[(3, 3, 0, 1)]=(-0.209825583152+0.787056518782j)*x[0]**o + ((0.59297799801-0.423311827024j))*x[0] + ((0.511765130794+0.412655652399j))*x[1]**o + ((-0.72824662559+0.431915282819j))*x[1] + ((0.286068186819-0.512050267116j))*x[2]**o + ((-0.36481047408+0.953936849619j))*x[2]
            ref[(3, 3, 0, 1)]=(0.797833317613-0.0993946147171j)/(o+1.)+((-0.25003955083+0.481270152707j))+((-0.209825583152+0.787056518782j))*0.5**o
            arg[(3, 3, 0, 2)]=(0.0273131627208+0.453008511673j)*x[0]**o + ((0.865361397319-0.803175104854j))*x[0] + ((0.432391724242+0.74918554432j))*x[1]**o + ((-0.971002379947-0.620625359697j))*x[1] + ((0.541319796304+0.609848758006j))*x[2]**o + ((0.103688191939-0.316972558212j))*x[2]
            ref[(3, 3, 0, 2)]=(0.973711520546+1.35903430233j)/(o+1.)+((-0.000976395344002-0.870386511381j))+((0.0273131627208+0.453008511673j))*0.5**o
            arg[(3, 3, 0, 3)]=(0.728739538301+0.902124999191j)*x[0]**o + ((-0.842358953406+0.916805418857j))*x[0] + ((-0.0684953943284-0.189893233298j))*x[1]**o + ((0.314634997194+0.134756455533j))*x[1] + ((-0.555665013129+0.305105742584j))*x[2]**o + ((-0.967423289101+0.701184462554j))*x[2]
            ref[(3, 3, 0, 3)]=(-0.624160407458+0.115212509286j)/(o+1.)+((-0.747573622656+0.876373168472j))+((0.728739538301+0.902124999191j))*0.5**o
            arg[(3, 3, 1, 0)]=(-0.1136494238+0.948426657823j)*x[0]**o + ((0.93343679767+0.276005310222j))*x[0] + ((-0.745238491669+0.98064360972j))*x[1]**o + ((0.592481919446-0.642602421949j))*x[1] + ((0.447806266199-0.783546252182j))*x[2]**o + ((0.978213411295+0.273451712813j))*x[2]
            ref[(3, 3, 1, 0)]=(-0.29743222547+0.197097357539j)/(o+1.)+((1.25206606421-0.0465726994566j))+((-0.1136494238+0.948426657823j))*0.5**o
            arg[(3, 3, 1, 1)]=(-0.414997837817-0.12092092531j)*x[0]**o + ((0.768233725088-0.0586924150808j))*x[0] + ((-0.71917129299+0.234730216224j))*x[1]**o + ((0.767022134985+0.357829140899j))*x[1] + ((-0.57458016925+0.474099268932j))*x[2]**o + ((0.54398981995-0.519522581428j))*x[2]
            ref[(3, 3, 1, 1)]=(-1.29375146224+0.708829485156j)/(o+1.)+((1.03962284001-0.110192927805j))+((-0.414997837817-0.12092092531j))*0.5**o
            arg[(3, 3, 1, 2)]=(-0.354926457-0.318211520037j)*x[0]**o + ((-0.984751404469+0.382374481635j))*x[0] + ((-0.855194195994+0.267701765844j))*x[1]**o + ((-0.388942261764-0.0130999926569j))*x[1] + ((0.374014110894+0.891543173709j))*x[2]**o + ((0.800481014322+0.26726852234j))*x[2]
            ref[(3, 3, 1, 2)]=(-0.4811800851+1.15924493955j)/(o+1.)+((-0.286606325956+0.318271505659j))+((-0.354926457-0.318211520037j))*0.5**o
            arg[(3, 3, 1, 3)]=(0.117668807657+0.909917781761j)*x[0]**o + ((0.302450069865-0.244364239712j))*x[0] + ((0.960501854902+0.546461444941j))*x[1]**o + ((0.785929811118-0.448617392305j))*x[1] + ((-0.694335246552-0.838875267423j))*x[2]**o + ((0.736734388187+0.042391922957j))*x[2]
            ref[(3, 3, 1, 3)]=(0.26616660835-0.292413822481j)/(o+1.)+((0.912557134585-0.32529485453j))+((0.117668807657+0.909917781761j))*0.5**o
            arg[(3, 3, 2, 0)]=(0.186854276356+0.733656135919j)*x[0]**o + ((0.998675652063-0.246903492535j))*x[0] + ((0.475692985329+0.648455809452j))*x[1]**o + ((0.71732404723-0.430834530887j))*x[1] + ((-0.629275525918-0.161965639062j))*x[2]**o + ((-0.156444051993+0.211802820558j))*x[2]
            ref[(3, 3, 2, 0)]=(-0.153582540589+0.48649017039j)/(o+1.)+((0.77977782365-0.232967601432j))+((0.186854276356+0.733656135919j))*0.5**o
            arg[(3, 3, 2, 1)]=(-0.660005069634+0.671268795914j)*x[0]**o + ((0.485434898484+0.88443888932j))*x[0] + ((-0.347504183901-0.697581038164j))*x[1]**o + ((0.30485473975-0.107821015461j))*x[1] + ((-0.85715088351-0.451231592997j))*x[2]**o + ((0.500514165861+0.0796472764426j))*x[2]
            ref[(3, 3, 2, 1)]=(-1.20465506741-1.14881263116j)/(o+1.)+((0.645401902047+0.428132575151j))+((-0.660005069634+0.671268795914j))*0.5**o
            arg[(3, 3, 2, 2)]=(-0.693346064596-0.209522658453j)*x[0]**o + ((0.288164993864+0.0179244822136j))*x[0] + ((0.769652344767-0.318893493816j))*x[1]**o + ((0.582985525065-0.433727690936j))*x[1] + ((-0.190415055801-0.0445145479514j))*x[2]**o + ((-0.679914563343+0.0511180436774j))*x[2]
            ref[(3, 3, 2, 2)]=(0.579237288966-0.363408041767j)/(o+1.)+((0.0956179777932-0.182342582523j))+((-0.693346064596-0.209522658453j))*0.5**o
            arg[(3, 3, 2, 3)]=(-0.451201370347-0.554064872815j)*x[0]**o + ((0.575002310154-0.0467308312095j))*x[0] + ((-0.158808736176+0.502474571564j))*x[1]**o + ((0.25921032048+0.180219960049j))*x[1] + ((-0.0751731853727+0.0613685521498j))*x[2]**o + ((0.00409443691596+0.141420951453j))*x[2]
            ref[(3, 3, 2, 3)]=(-0.233981921548+0.563843123714j)/(o+1.)+((0.419153533775+0.137455040146j))+((-0.451201370347-0.554064872815j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.266128525231-0.594893013043j)*x[0]**o + ((-0.0541775661103-0.0308800985337j))*x[0] + ((-0.813743962701-0.0222719843424j))*x[1]**o + ((-0.738215480128-0.748002534561j))*x[1]
            ref=(-0.813743962701-0.0222719843424j)/(o+1.)+((-0.396196523119-0.389441316548j))+((0.266128525231-0.594893013043j))*0.5**o
        else:
            arg=(0.73615277542+0.685523411971j)*x[0]**o + ((-0.0537438534733+0.493323568452j))*x[0] + ((0.0720776137681-0.211247489023j))*x[1]**o + ((0.0264464998001+0.273034311939j))*x[1] + ((0.901221617678+0.104503408492j))*x[2]**o + ((0.496868931807-0.802190255406j))*x[2]
            ref=(0.973299231446-0.106744080532j)/(o+1.)+((0.234785789067-0.0179161875074j))+((0.73615277542+0.685523411971j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.701877592996-0.414543643137j)*x[0]**o + ((0.0554503989637+0.034088184747j))*x[0] + ((-0.23524926989-0.246712463617j))*x[1]**o + ((-0.76478878653+0.816831232382j))*x[1]
            ref[(0,)]=(-0.23524926989-0.246712463617j)/(o+1.)+((-0.354669193783+0.425459708564j))+((-0.701877592996-0.414543643137j))*0.5**o
            arg[(1,)]=(-0.511197030556+0.82027795354j)*x[0]**o + ((0.541786683185-0.83832151041j))*x[0] + ((-0.595744337181+0.032061143641j))*x[1]**o + ((-0.980836875728+0.738875897902j))*x[1]
            ref[(1,)]=(-0.595744337181+0.032061143641j)/(o+1.)+((-0.219525096271-0.049722806254j))+((-0.511197030556+0.82027795354j))*0.5**o
            arg[(2,)]=(0.672851776081-0.521015570736j)*x[0]**o + ((0.411081170971-0.871981367993j))*x[0] + ((0.457684629831-0.0474511164334j))*x[1]**o + ((0.518599454274-0.269195992724j))*x[1]
            ref[(2,)]=(0.457684629831-0.0474511164334j)/(o+1.)+((0.464840312623-0.570588680358j))+((0.672851776081-0.521015570736j))*0.5**o
        else:
            arg[(0,)]=(-0.999966716139+0.852955711431j)*x[0]**o + ((0.467241847798-0.170348958925j))*x[0] + ((-0.480040341575-0.265733161923j))*x[1]**o + ((0.705359485407+0.524339551462j))*x[1] + ((-0.132566635871-0.958071951345j))*x[2]**o + ((0.178126179412-0.956226944213j))*x[2]
            ref[(0,)]=(-0.612606977445-1.22380511327j)/(o+1.)+((0.675363756308-0.301118175838j))+((-0.999966716139+0.852955711431j))*0.5**o
            arg[(1,)]=(0.090531812-0.278358540066j)*x[0]**o + ((0.974728353931-0.845760867906j))*x[0] + ((-0.73022941311+0.376375120502j))*x[1]**o + ((0.430302753155+0.708900455435j))*x[1] + ((0.0124094760528+0.0322366631768j))*x[2]**o + ((0.418638096573-0.832731912553j))*x[2]
            ref[(1,)]=(-0.717819937057+0.408611783679j)/(o+1.)+((0.911834601829-0.484796162512j))+((0.090531812-0.278358540066j))*0.5**o
            arg[(2,)]=(-0.837068962002-0.401877931802j)*x[0]**o + ((-0.706733982855+0.657181053466j))*x[0] + ((-0.900264520107+0.0246822003592j))*x[1]**o + ((-0.0481799878969-0.545169191906j))*x[1] + ((-0.700855355894+0.58686933928j))*x[2]**o + ((0.204241995649+0.607643866467j))*x[2]
            ref[(2,)]=(-1.601119876+0.611551539639j)/(o+1.)+((-0.275335987551+0.359827864014j))+((-0.837068962002-0.401877931802j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.940717928779-0.460487995455j)*x[0]**o + ((0.197219609274-0.429144172573j))*x[0] + ((0.551170913342-0.504370747356j))*x[1]**o + ((0.307086498437+0.0670217880454j))*x[1]
            ref[(0, 0)]=(0.551170913342-0.504370747356j)/(o+1.)+((0.252153053856-0.181061192264j))+((0.940717928779-0.460487995455j))*0.5**o
            arg[(0, 1)]=(-0.141822577234-0.388237203584j)*x[0]**o + ((0.850845659766-0.996652807609j))*x[0] + ((-0.219646788875-0.331733952005j))*x[1]**o + ((0.516320006914-0.963063844378j))*x[1]
            ref[(0, 1)]=(-0.219646788875-0.331733952005j)/(o+1.)+((0.68358283334-0.979858325993j))+((-0.141822577234-0.388237203584j))*0.5**o
            arg[(0, 2)]=(0.495387000696-0.793381519758j)*x[0]**o + ((-0.545449665304+0.872594493408j))*x[0] + ((-0.283754366618-0.995901132182j))*x[1]**o + ((0.970385130063+0.539007361945j))*x[1]
            ref[(0, 2)]=(-0.283754366618-0.995901132182j)/(o+1.)+((0.212467732379+0.705800927676j))+((0.495387000696-0.793381519758j))*0.5**o
            arg[(0, 3)]=(-0.164080635578+0.540674575733j)*x[0]**o + ((0.0354882079556-0.16409720122j))*x[0] + ((-0.730778468979-0.897035917908j))*x[1]**o + ((-0.638398633876+0.838944157138j))*x[1]
            ref[(0, 3)]=(-0.730778468979-0.897035917908j)/(o+1.)+((-0.30145521296+0.337423477959j))+((-0.164080635578+0.540674575733j))*0.5**o
            arg[(1, 0)]=(0.355662269953+0.969229663051j)*x[0]**o + ((-0.00849732175285-0.42368006397j))*x[0] + ((-0.95679433198+0.286349304505j))*x[1]**o + ((-0.881731834045+0.217911302277j))*x[1]
            ref[(1, 0)]=(-0.95679433198+0.286349304505j)/(o+1.)+((-0.445114577899-0.102884380847j))+((0.355662269953+0.969229663051j))*0.5**o
            arg[(1, 1)]=(0.771970055257+0.731181586311j)*x[0]**o + ((-0.624337962956-0.421793482529j))*x[0] + ((-0.592896306341+0.812034441736j))*x[1]**o + ((0.5884435267-0.798828432294j))*x[1]
            ref[(1, 1)]=(-0.592896306341+0.812034441736j)/(o+1.)+((-0.017947218128-0.610310957411j))+((0.771970055257+0.731181586311j))*0.5**o
            arg[(1, 2)]=(-0.781853382917+0.0787390449702j)*x[0]**o + ((-0.990768258752+0.892074172792j))*x[0] + ((-0.536475353976+0.176786051884j))*x[1]**o + ((0.227591856653+0.699308531857j))*x[1]
            ref[(1, 2)]=(-0.536475353976+0.176786051884j)/(o+1.)+((-0.38158820105+0.795691352325j))+((-0.781853382917+0.0787390449702j))*0.5**o
            arg[(1, 3)]=(0.981301666638+0.957396271352j)*x[0]**o + ((-0.233704868462+0.772541466808j))*x[0] + ((-0.151033242714+0.582485363477j))*x[1]**o + ((-0.192830542224-0.227870875704j))*x[1]
            ref[(1, 3)]=(-0.151033242714+0.582485363477j)/(o+1.)+((-0.213267705343+0.272335295552j))+((0.981301666638+0.957396271352j))*0.5**o
        else:
            arg[(0, 0)]=(-0.452405841932-0.684292590442j)*x[0]**o + ((-0.108762782653-0.327554876836j))*x[0] + ((0.646602824858+0.92325524062j))*x[1]**o + ((0.876562353795+0.878135533699j))*x[1] + ((0.861859754785+0.531029532435j))*x[2]**o + ((-0.900046858727-0.261329966622j))*x[2]
            ref[(0, 0)]=(1.50846257964+1.45428477306j)/(o+1.)+((-0.0661236437928+0.14462534512j))+((-0.452405841932-0.684292590442j))*0.5**o
            arg[(0, 1)]=(0.471261552665-0.470571229437j)*x[0]**o + ((0.127841885858-0.344283991497j))*x[0] + ((-0.60681863347+0.814501498427j))*x[1]**o + ((-0.423182746059+0.600164099136j))*x[1] + ((0.954222048395-0.945614566446j))*x[2]**o + ((-0.557215287264-0.172950718115j))*x[2]
            ref[(0, 1)]=(0.347403414925-0.131113068019j)/(o+1.)+((-0.426278073732+0.0414646947618j))+((0.471261552665-0.470571229437j))*0.5**o
            arg[(0, 2)]=(0.876503711282+0.24651703439j)*x[0]**o + ((0.463392762647+0.375682270305j))*x[0] + ((-0.0267062171869+0.573799026974j))*x[1]**o + ((-0.655205808253+0.966558964719j))*x[1] + ((-0.96094416928-0.340320867592j))*x[2]**o + ((0.745255946757+0.0117256703993j))*x[2]
            ref[(0, 2)]=(-0.987650386467+0.233478159382j)/(o+1.)+((0.276721450576+0.676983452712j))+((0.876503711282+0.24651703439j))*0.5**o
            arg[(0, 3)]=(0.616744923849+0.9711970233j)*x[0]**o + ((0.680390559213+0.184525464969j))*x[0] + ((0.49424644351+0.880394612454j))*x[1]**o + ((-0.301016802879-0.708689588266j))*x[1] + ((-0.666929531553-0.0217909549304j))*x[2]**o + ((-0.965492664532-0.570451750031j))*x[2]
            ref[(0, 3)]=(-0.172683088043+0.858603657524j)/(o+1.)+((-0.293059454099-0.547307936664j))+((0.616744923849+0.9711970233j))*0.5**o
            arg[(1, 0)]=(-0.073408647251-0.0550266930925j)*x[0]**o + ((0.218310529619-0.200164966772j))*x[0] + ((-0.247601651357-0.508988967121j))*x[1]**o + ((0.134946242501-0.421755033395j))*x[1] + ((-0.767748311718-0.797132527234j))*x[2]**o + ((-0.675456147372+0.174832289351j))*x[2]
            ref[(1, 0)]=(-1.01534996308-1.30612149435j)/(o+1.)+((-0.161099687626-0.223543855408j))+((-0.073408647251-0.0550266930925j))*0.5**o
            arg[(1, 1)]=(0.588644856259+0.91304680437j)*x[0]**o + ((0.670482442379-0.0352613984933j))*x[0] + ((-0.943131978437+0.284595368573j))*x[1]**o + ((0.189630571065-0.0180561518806j))*x[1] + ((0.532684964652-0.373470065882j))*x[2]**o + ((0.409461112547+0.691465723312j))*x[2]
            ref[(1, 1)]=(-0.410447013784-0.0888746973089j)/(o+1.)+((0.634787062995+0.319074086469j))+((0.588644856259+0.91304680437j))*0.5**o
            arg[(1, 2)]=(0.981029188518-0.881320117232j)*x[0]**o + ((0.252927762912-0.979456446423j))*x[0] + ((0.207327873284+0.846508248249j))*x[1]**o + ((-0.718928058423+0.616940958914j))*x[1] + ((-0.352278003903+0.693737642944j))*x[2]**o + ((0.559723560795+0.399848222232j))*x[2]
            ref[(1, 2)]=(-0.144950130619+1.54024589119j)/(o+1.)+((0.0468616326419+0.0186663673614j))+((0.981029188518-0.881320117232j))*0.5**o
            arg[(1, 3)]=(-0.117372209296-0.55323373112j)*x[0]**o + ((-0.76374576774-0.0987875877314j))*x[0] + ((0.750226260463+0.59754330494j))*x[1]**o + ((-0.33175853779+0.572540193966j))*x[1] + ((-0.0437170411835-0.758330659322j))*x[2]**o + ((0.425442017363+0.0964322342435j))*x[2]
            ref[(1, 3)]=(0.70650921928-0.160787354382j)/(o+1.)+((-0.335031144084+0.285092420239j))+((-0.117372209296-0.55323373112j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3),w)
        ref=numpy.zeros((3, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.666744768599+0.596364290258j)*x[0]**o + ((-0.395872281491-0.967412444536j))*x[0] + ((-0.331338150484+0.769215065373j))*x[1]**o + ((0.182837817868+0.441327333673j))*x[1]
            ref[(0, 0, 0)]=(-0.331338150484+0.769215065373j)/(o+1.)+((-0.106517231812-0.263042555432j))+((-0.666744768599+0.596364290258j))*0.5**o
            arg[(0, 0, 1)]=(0.731105534631-0.720450683079j)*x[0]**o + ((-0.000541511488928-0.556265165586j))*x[0] + ((-0.527178856457+0.80827769917j))*x[1]**o + ((0.657514633708+0.438855535911j))*x[1]
            ref[(0, 0, 1)]=(-0.527178856457+0.80827769917j)/(o+1.)+((0.32848656111-0.0587048148376j))+((0.731105534631-0.720450683079j))*0.5**o
            arg[(0, 0, 2)]=(0.0732883273696-0.52756654473j)*x[0]**o + ((-0.69665238479+0.657688837687j))*x[0] + ((-0.412877792677-0.940930063757j))*x[1]**o + ((0.0414889320483-0.786882355346j))*x[1]
            ref[(0, 0, 2)]=(-0.412877792677-0.940930063757j)/(o+1.)+((-0.327581726371-0.0645967588293j))+((0.0732883273696-0.52756654473j))*0.5**o
            arg[(0, 1, 0)]=(0.465744459927-0.212524461782j)*x[0]**o + ((0.93720608569-0.623988661058j))*x[0] + ((-0.787361581338-0.859394092425j))*x[1]**o + ((0.655413046279-0.0970510035065j))*x[1]
            ref[(0, 1, 0)]=(-0.787361581338-0.859394092425j)/(o+1.)+((0.796309565985-0.360519832282j))+((0.465744459927-0.212524461782j))*0.5**o
            arg[(0, 1, 1)]=(-0.128736182925+0.827688413613j)*x[0]**o + ((0.728112761949+0.806332519637j))*x[0] + ((-0.834668780703+0.263628168292j))*x[1]**o + ((0.664849336861+0.631151195844j))*x[1]
            ref[(0, 1, 1)]=(-0.834668780703+0.263628168292j)/(o+1.)+((0.696481049405+0.71874185774j))+((-0.128736182925+0.827688413613j))*0.5**o
            arg[(0, 1, 2)]=(-0.966210804897-0.471637310404j)*x[0]**o + ((0.0368323306457-0.82849255544j))*x[0] + ((0.0181154553688+0.841648186679j))*x[1]**o + ((-0.142835018761+0.576079691019j))*x[1]
            ref[(0, 1, 2)]=(0.0181154553688+0.841648186679j)/(o+1.)+((-0.0530013440576-0.12620643221j))+((-0.966210804897-0.471637310404j))*0.5**o
            arg[(1, 0, 0)]=(-0.702043334113-0.0291047025515j)*x[0]**o + ((0.735585343404+0.969791772765j))*x[0] + ((-0.342797569239+0.335605473612j))*x[1]**o + ((-0.229841648403-0.0737052895343j))*x[1]
            ref[(1, 0, 0)]=(-0.342797569239+0.335605473612j)/(o+1.)+((0.2528718475+0.448043241615j))+((-0.702043334113-0.0291047025515j))*0.5**o
            arg[(1, 0, 1)]=(-0.638559823231+0.946571808163j)*x[0]**o + ((-0.283280444427+0.1186316308j))*x[0] + ((-0.547563675021+0.513216355117j))*x[1]**o + ((-0.285835364701+0.403799520095j))*x[1]
            ref[(1, 0, 1)]=(-0.547563675021+0.513216355117j)/(o+1.)+((-0.284557904564+0.261215575447j))+((-0.638559823231+0.946571808163j))*0.5**o
            arg[(1, 0, 2)]=(-0.934999211547-0.475170311462j)*x[0]**o + ((0.0818460659983-0.0220468224405j))*x[0] + ((0.135491880176-0.15307423841j))*x[1]**o + ((0.688436875073-0.078807856536j))*x[1]
            ref[(1, 0, 2)]=(0.135491880176-0.15307423841j)/(o+1.)+((0.385141470535-0.0504273394883j))+((-0.934999211547-0.475170311462j))*0.5**o
            arg[(1, 1, 0)]=(-0.648857642716+0.155716051305j)*x[0]**o + ((0.209104765119+0.2436073367j))*x[0] + ((-0.141185526304-0.129000808202j))*x[1]**o + ((-0.0157883561541-0.69828904485j))*x[1]
            ref[(1, 1, 0)]=(-0.141185526304-0.129000808202j)/(o+1.)+((0.0966582044823-0.227340854075j))+((-0.648857642716+0.155716051305j))*0.5**o
            arg[(1, 1, 1)]=(0.182877727978+0.518260518978j)*x[0]**o + ((0.363939462436+0.448376313332j))*x[0] + ((-0.395316209881-0.99039766427j))*x[1]**o + ((0.740824632014+0.62503954243j))*x[1]
            ref[(1, 1, 1)]=(-0.395316209881-0.99039766427j)/(o+1.)+((0.552382047225+0.536707927881j))+((0.182877727978+0.518260518978j))*0.5**o
            arg[(1, 1, 2)]=(-0.0266999155306+0.0260674775545j)*x[0]**o + ((-0.111589914625+0.571563228976j))*x[0] + ((-0.133942176608-0.208631976752j))*x[1]**o + ((-0.912746393032-0.0864359197108j))*x[1]
            ref[(1, 1, 2)]=(-0.133942176608-0.208631976752j)/(o+1.)+((-0.512168153828+0.242563654633j))+((-0.0266999155306+0.0260674775545j))*0.5**o
            arg[(2, 0, 0)]=(-0.872647073307+0.107554032193j)*x[0]**o + ((0.350392997817+0.682892164275j))*x[0] + ((0.783158909657-0.460281240786j))*x[1]**o + ((-0.518202666856-0.598172022671j))*x[1]
            ref[(2, 0, 0)]=(0.783158909657-0.460281240786j)/(o+1.)+((-0.0839048345192+0.042360070802j))+((-0.872647073307+0.107554032193j))*0.5**o
            arg[(2, 0, 1)]=(-0.427089118676-0.768267978897j)*x[0]**o + ((0.651852138573+0.944336814908j))*x[0] + ((-0.128274344548-0.382592713621j))*x[1]**o + ((0.0834251000167-0.646476608859j))*x[1]
            ref[(2, 0, 1)]=(-0.128274344548-0.382592713621j)/(o+1.)+((0.367638619295+0.148930103025j))+((-0.427089118676-0.768267978897j))*0.5**o
            arg[(2, 0, 2)]=(0.969344557717-0.890636073192j)*x[0]**o + ((0.0538511054767-0.904030187723j))*x[0] + ((0.718941031921+0.00405665472097j))*x[1]**o + ((-0.281862525728-0.503993094824j))*x[1]
            ref[(2, 0, 2)]=(0.718941031921+0.00405665472097j)/(o+1.)+((-0.114005710126-0.704011641273j))+((0.969344557717-0.890636073192j))*0.5**o
            arg[(2, 1, 0)]=(0.140313898941+0.790151387547j)*x[0]**o + ((0.717546402722+0.00467017685379j))*x[0] + ((-0.24218173537+0.889850234425j))*x[1]**o + ((-0.840863537255-0.65556671338j))*x[1]
            ref[(2, 1, 0)]=(-0.24218173537+0.889850234425j)/(o+1.)+((-0.0616585672663-0.325448268263j))+((0.140313898941+0.790151387547j))*0.5**o
            arg[(2, 1, 1)]=(-0.475192811092+0.094873686656j)*x[0]**o + ((0.181575081563+0.459443588622j))*x[0] + ((-0.823673759662-0.159425784609j))*x[1]**o + ((0.00699914705146-0.389929549656j))*x[1]
            ref[(2, 1, 1)]=(-0.823673759662-0.159425784609j)/(o+1.)+((0.0942871143072+0.0347570194834j))+((-0.475192811092+0.094873686656j))*0.5**o
            arg[(2, 1, 2)]=(-0.260751133988-0.286711211858j)*x[0]**o + ((0.383370502362-0.321413209433j))*x[0] + ((-0.158611703752-0.491102976323j))*x[1]**o + ((0.986811169727-0.887527697204j))*x[1]
            ref[(2, 1, 2)]=(-0.158611703752-0.491102976323j)/(o+1.)+((0.685090836045-0.604470453318j))+((-0.260751133988-0.286711211858j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.530501304522+0.119517700189j)*x[0]**o + ((0.739000173265-0.776393882783j))*x[0] + ((-0.122283296457+0.486272319959j))*x[1]**o + ((0.332196503238+0.595125352067j))*x[1] + ((-0.795590866854+0.931813782625j))*x[2]**o + ((-0.843746859894+0.341168704765j))*x[2]
            ref[(0, 0, 0)]=(-0.917874163311+1.41808610258j)/(o+1.)+((0.113724908304+0.0799500870249j))+((-0.530501304522+0.119517700189j))*0.5**o
            arg[(0, 0, 1)]=(-0.748266958281+0.924716558355j)*x[0]**o + ((-0.142672638743+0.735858537078j))*x[0] + ((0.184942466589-0.928681767153j))*x[1]**o + ((0.18514599026+0.610683533525j))*x[1] + ((0.242509603676+0.971609377656j))*x[2]**o + ((-0.0891537741206+0.407682807137j))*x[2]
            ref[(0, 0, 1)]=(0.427452070265+0.0429276105022j)/(o+1.)+((-0.0233402113017+0.87711243887j))+((-0.748266958281+0.924716558355j))*0.5**o
            arg[(0, 0, 2)]=(-0.764777815323-0.30982224654j)*x[0]**o + ((-0.317399697448-0.28805189435j))*x[0] + ((0.576458813928-0.89779674586j))*x[1]**o + ((0.356686422798-0.477227171724j))*x[1] + ((-0.570498141521-0.593582654901j))*x[2]**o + ((0.491362200152+0.797686328088j))*x[2]
            ref[(0, 0, 2)]=(0.00596067240728-1.49137940076j)/(o+1.)+((0.265324462751+0.0162036310069j))+((-0.764777815323-0.30982224654j))*0.5**o
            arg[(0, 1, 0)]=(0.0483866976534-0.2183555965j)*x[0]**o + ((-0.627185726086+0.383296314134j))*x[0] + ((-0.561285222234-0.304649862147j))*x[1]**o + ((0.815642526628+0.497273477195j))*x[1] + ((0.607199467298+0.188337869667j))*x[2]**o + ((0.899197499727-0.720907516731j))*x[2]
            ref[(0, 1, 0)]=(0.0459142450632-0.116311992479j)/(o+1.)+((0.543827150134+0.0798311372993j))+((0.0483866976534-0.2183555965j))*0.5**o
            arg[(0, 1, 1)]=(-0.0919020152424-0.982421951667j)*x[0]**o + ((0.0920101537668-0.635520813788j))*x[0] + ((-0.969223405921-0.940710366547j))*x[1]**o + ((-0.303418027381-0.393090511681j))*x[1] + ((-0.442035808833+0.294952291482j))*x[2]**o + ((0.100938733251+0.124997107082j))*x[2]
            ref[(0, 1, 1)]=(-1.41125921475-0.645758075065j)/(o+1.)+((-0.0552345701816-0.451807109193j))+((-0.0919020152424-0.982421951667j))*0.5**o
            arg[(0, 1, 2)]=(-0.19564089735+0.22187602797j)*x[0]**o + ((0.613035329532+0.154347562099j))*x[0] + ((0.807935581969+0.014589058472j))*x[1]**o + ((0.435580611366+0.899723060048j))*x[1] + ((-0.192302397292+0.531171279898j))*x[2]**o + ((-0.843564043092+0.541527811821j))*x[2]
            ref[(0, 1, 2)]=(0.615633184677+0.54576033837j)/(o+1.)+((0.102525948903+0.797799216984j))+((-0.19564089735+0.22187602797j))*0.5**o
            arg[(1, 0, 0)]=(0.161684383138-0.208919421731j)*x[0]**o + ((0.590763357935-0.697284678462j))*x[0] + ((-0.264924860762+0.668759190422j))*x[1]**o + ((0.0662443769416+0.794486525744j))*x[1] + ((0.687770274927+0.147054643057j))*x[2]**o + ((-0.303304132969-0.0145646028465j))*x[2]
            ref[(1, 0, 0)]=(0.422845414165+0.815813833479j)/(o+1.)+((0.176851800954+0.0413186222174j))+((0.161684383138-0.208919421731j))*0.5**o
            arg[(1, 0, 1)]=(-0.247352997789-0.751122690261j)*x[0]**o + ((-0.245777577638+0.308842460119j))*x[0] + ((-0.0205705342508+0.85796288332j))*x[1]**o + ((0.883230993799+0.553394065792j))*x[1] + ((-0.300601345981+0.376392516201j))*x[2]**o + ((0.0101753094033-0.926743793867j))*x[2]
            ref[(1, 0, 1)]=(-0.321171880232+1.23435539952j)/(o+1.)+((0.323814362782-0.0322536339782j))+((-0.247352997789-0.751122690261j))*0.5**o
            arg[(1, 0, 2)]=(-0.619686872975+0.216985946135j)*x[0]**o + ((-0.903482915417+0.59652132911j))*x[0] + ((-0.0297017490223+0.992689472992j))*x[1]**o + ((-0.780223970968-0.489413238466j))*x[1] + ((-0.867975413007+0.0333696236576j))*x[2]**o + ((-0.796323836646-0.964888081697j))*x[2]
            ref[(1, 0, 2)]=(-0.897677162029+1.02605909665j)/(o+1.)+((-1.24001536152-0.428889995527j))+((-0.619686872975+0.216985946135j))*0.5**o
            arg[(1, 1, 0)]=(-0.864461146186+0.884275308041j)*x[0]**o + ((-0.978823238765+0.168088741321j))*x[0] + ((-0.877009857141+0.837529122242j))*x[1]**o + ((-0.386784387479+0.325187369811j))*x[1] + ((0.860077517091-0.208218370567j))*x[2]**o + ((-0.404028476737-0.679747615601j))*x[2]
            ref[(1, 1, 0)]=(-0.0169323400495+0.629310751675j)/(o+1.)+((-0.884818051491-0.0932357522348j))+((-0.864461146186+0.884275308041j))*0.5**o
            arg[(1, 1, 1)]=(0.813006094803-0.158729417702j)*x[0]**o + ((-0.0906367274538-0.598670788719j))*x[0] + ((0.904635114404-0.114738181056j))*x[1]**o + ((0.894582480069+0.882672918563j))*x[1] + ((0.853922498422-0.147036709881j))*x[2]**o + ((0.134635970832+0.603695808152j))*x[2]
            ref[(1, 1, 1)]=(1.75855761283-0.261774890937j)/(o+1.)+((0.469290861723+0.443848968998j))+((0.813006094803-0.158729417702j))*0.5**o
            arg[(1, 1, 2)]=(-0.992661189838+0.706911766185j)*x[0]**o + ((0.19802927473-0.87873246429j))*x[0] + ((0.0304056466827+0.522471174717j))*x[1]**o + ((-0.835628929454+0.239965676681j))*x[1] + ((-0.60401342054-0.291878338072j))*x[2]**o + ((-0.427899213278-0.879623536636j))*x[2]
            ref[(1, 1, 2)]=(-0.573607773857+0.230592836645j)/(o+1.)+((-0.532749434001-0.759195162123j))+((-0.992661189838+0.706911766185j))*0.5**o
            arg[(2, 0, 0)]=(-0.827083067302-0.0137078478074j)*x[0]**o + ((-0.561807720876-0.929301918549j))*x[0] + ((0.392560948242-0.618086431724j))*x[1]**o + ((-0.0186160053203-0.063148883394j))*x[1] + ((0.844631123337+0.751548737596j))*x[2]**o + ((0.558725515503+0.675718865542j))*x[2]
            ref[(2, 0, 0)]=(1.23719207158+0.133462305873j)/(o+1.)+((-0.0108491053465-0.158365968201j))+((-0.827083067302-0.0137078478074j))*0.5**o
            arg[(2, 0, 1)]=(0.582317119417+0.28526089966j)*x[0]**o + ((0.770700012223-0.853844237469j))*x[0] + ((0.846690153546-0.0702491692814j))*x[1]**o + ((-0.428580032745+0.526729864347j))*x[1] + ((0.55785859584-0.602254824168j))*x[2]**o + ((-0.00610145065913-0.699253433474j))*x[2]
            ref[(2, 0, 1)]=(1.40454874939-0.672503993449j)/(o+1.)+((0.168009264409-0.513183903298j))+((0.582317119417+0.28526089966j))*0.5**o
            arg[(2, 0, 2)]=(-0.645961844745+0.537009474758j)*x[0]**o + ((0.767092389179-0.949375919559j))*x[0] + ((-0.942294473939-0.697582317501j))*x[1]**o + ((0.655623781995-0.346966532584j))*x[1] + ((0.490502955928-0.137130469728j))*x[2]**o + ((-0.94704469034+0.502857633709j))*x[2]
            ref[(2, 0, 2)]=(-0.451791518011-0.834712787229j)/(o+1.)+((0.237835740417-0.396742409217j))+((-0.645961844745+0.537009474758j))*0.5**o
            arg[(2, 1, 0)]=(-0.112455803061+0.496566673014j)*x[0]**o + ((-0.462523312498+0.963906770281j))*x[0] + ((-0.562682520407-0.732666229734j))*x[1]**o + ((0.913234942825-0.107496275095j))*x[1] + ((0.438111952756-0.692680714853j))*x[2]**o + ((-0.84398360518+0.0818036019921j))*x[2]
            ref[(2, 1, 0)]=(-0.124570567651-1.42534694459j)/(o+1.)+((-0.196635987427+0.469107048589j))+((-0.112455803061+0.496566673014j))*0.5**o
            arg[(2, 1, 1)]=(0.0260247445616+0.558749752518j)*x[0]**o + ((-0.736908252686-0.264368045367j))*x[0] + ((-0.097406477034+0.245319551363j))*x[1]**o + ((-0.276948939334+0.6159326771j))*x[1] + ((-0.628689561185+0.0143714220922j))*x[2]**o + ((0.405120229074+0.823914368265j))*x[2]
            ref[(2, 1, 1)]=(-0.726096038219+0.259690973455j)/(o+1.)+((-0.304368481473+0.587739499999j))+((0.0260247445616+0.558749752518j))*0.5**o
            arg[(2, 1, 2)]=(-0.736353010306+0.539397742071j)*x[0]**o + ((-0.234421465938+0.314084795273j))*x[0] + ((-0.407682645788+0.664123244699j))*x[1]**o + ((0.564554249488+0.303412219029j))*x[1] + ((0.0243607976655+0.485279150487j))*x[2]**o + ((0.947664523979-0.888241582654j))*x[2]
            ref[(2, 1, 2)]=(-0.383321848123+1.14940239519j)/(o+1.)+((0.638898653764-0.135372284176j))+((-0.736353010306+0.539397742071j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4, 3),w)
        ref=numpy.zeros((3, 3, 4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.218784656453+0.153206350584j)*x[0]**o + ((0.433054696239+0.1406287589j))*x[0] + ((-0.594104160047-0.458550606748j))*x[1]**o + ((0.837249933906+0.976031442154j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.594104160047-0.458550606748j)/(o+1.)+((0.635152315072+0.558330100527j))+((0.218784656453+0.153206350584j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.059084429105-0.0447601355887j)*x[0]**o + ((-0.769809873921-0.0951984376425j))*x[0] + ((-0.767629958335+0.382915834728j))*x[1]**o + ((-0.791144717183+0.83788602348j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.767629958335+0.382915834728j)/(o+1.)+((-0.780477295552+0.371343792918j))+((-0.059084429105-0.0447601355887j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.867214833309-0.49793821568j)*x[0]**o + ((0.0847746089256-0.788283889398j))*x[0] + ((0.868854509518-0.110858031475j))*x[1]**o + ((-0.861994205133+0.191752555478j))*x[1]
            ref[(0, 0, 0, 2)]=(0.868854509518-0.110858031475j)/(o+1.)+((-0.388609798104-0.29826566696j))+((0.867214833309-0.49793821568j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.499927318438+0.37226008598j)*x[0]**o + ((0.123887982421-0.212240077466j))*x[0] + ((-0.338205590386+0.265761163476j))*x[1]**o + ((0.887112636965+0.649329583536j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.338205590386+0.265761163476j)/(o+1.)+((0.505500309693+0.218544753035j))+((0.499927318438+0.37226008598j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.514905849489-0.379550903197j)*x[0]**o + ((0.790146706818+0.331206586931j))*x[0] + ((0.244771867759+0.436407529183j))*x[1]**o + ((0.941735737225+0.418080996508j))*x[1]
            ref[(0, 0, 1, 1)]=(0.244771867759+0.436407529183j)/(o+1.)+((0.865941222021+0.374643791719j))+((0.514905849489-0.379550903197j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.0362268013896-0.880058997701j)*x[0]**o + ((-0.529374840215+0.893995875236j))*x[0] + ((0.120630506422-0.848480023217j))*x[1]**o + ((0.430493529689+0.785151906601j))*x[1]
            ref[(0, 0, 1, 2)]=(0.120630506422-0.848480023217j)/(o+1.)+((-0.0494406552628+0.839573890918j))+((0.0362268013896-0.880058997701j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.350775070421+0.624364843308j)*x[0]**o + ((0.109647860928-0.679547663068j))*x[0] + ((-0.25368158064+0.667712303277j))*x[1]**o + ((-0.735990412813+0.270580663003j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.25368158064+0.667712303277j)/(o+1.)+((-0.313171275942-0.204483500032j))+((0.350775070421+0.624364843308j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.15706744603+0.399234602384j)*x[0]**o + ((0.493175947271+0.565243724388j))*x[0] + ((-0.463708851982+0.481404162904j))*x[1]**o + ((-0.520212231396+0.141973894507j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.463708851982+0.481404162904j)/(o+1.)+((-0.0135181420624+0.353608809448j))+((-0.15706744603+0.399234602384j))*0.5**o
            arg[(0, 0, 2, 2)]=(-0.822812626257+0.133466954978j)*x[0]**o + ((-0.593978465162-0.0782212008847j))*x[0] + ((0.507721755763-0.766935069324j))*x[1]**o + ((-0.529498196095-0.918449439059j))*x[1]
            ref[(0, 0, 2, 2)]=(0.507721755763-0.766935069324j)/(o+1.)+((-0.561738330629-0.498335319972j))+((-0.822812626257+0.133466954978j))*0.5**o
            arg[(0, 0, 3, 0)]=(-0.276817143592-0.870721080965j)*x[0]**o + ((0.671694262834-0.00555543748921j))*x[0] + ((-0.954719305402-0.438314305582j))*x[1]**o + ((0.810207568716-0.563714600107j))*x[1]
            ref[(0, 0, 3, 0)]=(-0.954719305402-0.438314305582j)/(o+1.)+((0.740950915775-0.284635018798j))+((-0.276817143592-0.870721080965j))*0.5**o
            arg[(0, 0, 3, 1)]=(-0.436224089002-0.141727658558j)*x[0]**o + ((0.865429876735-0.862885491712j))*x[0] + ((0.158221581279+0.468530165942j))*x[1]**o + ((-0.0637185347517+0.633681515414j))*x[1]
            ref[(0, 0, 3, 1)]=(0.158221581279+0.468530165942j)/(o+1.)+((0.400855670992-0.114601988149j))+((-0.436224089002-0.141727658558j))*0.5**o
            arg[(0, 0, 3, 2)]=(-0.750087738173+0.98430721412j)*x[0]**o + ((-0.640787807969-0.788837957469j))*x[0] + ((-0.293410310563-0.756934350284j))*x[1]**o + ((0.492062663519+0.4690267002j))*x[1]
            ref[(0, 0, 3, 2)]=(-0.293410310563-0.756934350284j)/(o+1.)+((-0.074362572225-0.159905628635j))+((-0.750087738173+0.98430721412j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.730917197079-0.816378199335j)*x[0]**o + ((-0.507661855148+0.287870347762j))*x[0] + ((-0.163111888808+0.338900885124j))*x[1]**o + ((0.791225547132+0.699215262331j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.163111888808+0.338900885124j)/(o+1.)+((0.141781845992+0.493542805047j))+((0.730917197079-0.816378199335j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.447770623771+0.913453197378j)*x[0]**o + ((0.271129696702-0.786602061788j))*x[0] + ((-0.154239635069+0.794648616462j))*x[1]**o + ((-0.86437738664-0.717433906648j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.154239635069+0.794648616462j)/(o+1.)+((-0.296623844969-0.752017984218j))+((-0.447770623771+0.913453197378j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.0340523064523+0.119649790288j)*x[0]**o + ((-0.965409290981+0.328877481885j))*x[0] + ((0.82797565635+0.867449982001j))*x[1]**o + ((-0.174571901601-0.207797488035j))*x[1]
            ref[(0, 1, 0, 2)]=(0.82797565635+0.867449982001j)/(o+1.)+((-0.569990596291+0.0605399969249j))+((-0.0340523064523+0.119649790288j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.48848363895-0.904336526802j)*x[0]**o + ((0.918208128079+0.515385775547j))*x[0] + ((-0.69525953259+0.987674518427j))*x[1]**o + ((-0.766449723422-0.498214010603j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.69525953259+0.987674518427j)/(o+1.)+((0.0758792023285+0.00858588247176j))+((-0.48848363895-0.904336526802j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.407568125653+0.428499877489j)*x[0]**o + ((-0.596651678506+0.155492196834j))*x[0] + ((-0.591995898583-0.715285896722j))*x[1]**o + ((0.263357101422-0.0812199031166j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.591995898583-0.715285896722j)/(o+1.)+((-0.166647288542+0.0371361468588j))+((0.407568125653+0.428499877489j))*0.5**o
            arg[(0, 1, 1, 2)]=(-0.873914920961+0.297656422799j)*x[0]**o + ((0.128145312484-0.172653103951j))*x[0] + ((-0.460424483127+0.207134834231j))*x[1]**o + ((0.459223336595-0.094465475856j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.460424483127+0.207134834231j)/(o+1.)+((0.293684324539-0.133559289904j))+((-0.873914920961+0.297656422799j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.668268519026-0.590652242316j)*x[0]**o + ((0.00125439408664+0.888339807849j))*x[0] + ((0.332022334559+0.694308147578j))*x[1]**o + ((-0.707097877078-0.872854486149j))*x[1]
            ref[(0, 1, 2, 0)]=(0.332022334559+0.694308147578j)/(o+1.)+((-0.352921741496+0.00774266085014j))+((-0.668268519026-0.590652242316j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.178257140876+0.909939161928j)*x[0]**o + ((0.745955025164-0.396739764865j))*x[0] + ((-0.583361902876-0.344685291383j))*x[1]**o + ((0.70221030785-0.588068624024j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.583361902876-0.344685291383j)/(o+1.)+((0.724082666507-0.492404194444j))+((-0.178257140876+0.909939161928j))*0.5**o
            arg[(0, 1, 2, 2)]=(0.683359538516-0.937983486915j)*x[0]**o + ((-0.799857908404-0.19643909413j))*x[0] + ((0.152736178733+0.701601000469j))*x[1]**o + ((0.169314839936+0.0121754224711j))*x[1]
            ref[(0, 1, 2, 2)]=(0.152736178733+0.701601000469j)/(o+1.)+((-0.315271534234-0.0921318358296j))+((0.683359538516-0.937983486915j))*0.5**o
            arg[(0, 1, 3, 0)]=(0.702224088643-0.577211924282j)*x[0]**o + ((-0.667403626247+0.0216453696063j))*x[0] + ((-0.229564823191+0.459699934334j))*x[1]**o + ((0.702268498863-0.87621315213j))*x[1]
            ref[(0, 1, 3, 0)]=(-0.229564823191+0.459699934334j)/(o+1.)+((0.0174324363081-0.427283891262j))+((0.702224088643-0.577211924282j))*0.5**o
            arg[(0, 1, 3, 1)]=(0.541431162549+0.768651344522j)*x[0]**o + ((0.573353794076-0.62631467974j))*x[0] + ((-0.430680411872+0.417279193058j))*x[1]**o + ((0.190260962939-0.0800544261847j))*x[1]
            ref[(0, 1, 3, 1)]=(-0.430680411872+0.417279193058j)/(o+1.)+((0.381807378508-0.353184552962j))+((0.541431162549+0.768651344522j))*0.5**o
            arg[(0, 1, 3, 2)]=(-0.417648203767-0.337683022109j)*x[0]**o + ((-0.155460463903+0.882926609152j))*x[0] + ((0.319124266118+0.105185866656j))*x[1]**o + ((-0.363107282443+0.577039305375j))*x[1]
            ref[(0, 1, 3, 2)]=(0.319124266118+0.105185866656j)/(o+1.)+((-0.259283873173+0.729982957264j))+((-0.417648203767-0.337683022109j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.701605264322-0.272687311929j)*x[0]**o + ((-0.971803534089+0.932664671308j))*x[0] + ((-0.0591748632252-0.441137010438j))*x[1]**o + ((0.225166660451-0.512608766891j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.0591748632252-0.441137010438j)/(o+1.)+((-0.373318436819+0.210027952209j))+((0.701605264322-0.272687311929j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.50747804465-0.127508105663j)*x[0]**o + ((0.0289177804072+0.282752768866j))*x[0] + ((0.132972130677+0.246977043954j))*x[1]**o + ((0.63587524094-0.192348873807j))*x[1]
            ref[(0, 2, 0, 1)]=(0.132972130677+0.246977043954j)/(o+1.)+((0.332396510674+0.0452019475297j))+((0.50747804465-0.127508105663j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.240954246478+0.0924246393893j)*x[0]**o + ((0.0481181426486+0.156478361691j))*x[0] + ((0.0704589746169-0.519922254162j))*x[1]**o + ((-0.704875432037+0.988244298264j))*x[1]
            ref[(0, 2, 0, 2)]=(0.0704589746169-0.519922254162j)/(o+1.)+((-0.328378644694+0.572361329978j))+((0.240954246478+0.0924246393893j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.0915280335746-0.443617871231j)*x[0]**o + ((0.940943022699+0.0408857563632j))*x[0] + ((0.905511033301-0.233281321974j))*x[1]**o + ((0.633398603413-0.655824744216j))*x[1]
            ref[(0, 2, 1, 0)]=(0.905511033301-0.233281321974j)/(o+1.)+((0.787170813056-0.307469493926j))+((-0.0915280335746-0.443617871231j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.614335767253-0.586603982639j)*x[0]**o + ((0.69772566817-0.49470171628j))*x[0] + ((-0.523043130733+0.00438841760833j))*x[1]**o + ((-0.420708750513-0.344029390577j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.523043130733+0.00438841760833j)/(o+1.)+((0.138508458828-0.419365553429j))+((-0.614335767253-0.586603982639j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.57640360218-0.822638628023j)*x[0]**o + ((-0.856298161578-0.0532384508279j))*x[0] + ((-0.881493488288-0.456534771662j))*x[1]**o + ((0.43579062747+0.217501189654j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.881493488288-0.456534771662j)/(o+1.)+((-0.210253767054+0.0821313694133j))+((0.57640360218-0.822638628023j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.951907185098-0.29598840779j)*x[0]**o + ((0.913460708445+0.654784078251j))*x[0] + ((-0.504854193179-0.958124233597j))*x[1]**o + ((0.356395282892-0.79843542426j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.504854193179-0.958124233597j)/(o+1.)+((0.634927995669-0.0718256730049j))+((-0.951907185098-0.29598840779j))*0.5**o
            arg[(0, 2, 2, 1)]=(-0.322504466884+0.128411756611j)*x[0]**o + ((-0.7063425579-0.956710390052j))*x[0] + ((0.945838377279-0.221199679885j))*x[1]**o + ((-0.390023763047+0.303548697727j))*x[1]
            ref[(0, 2, 2, 1)]=(0.945838377279-0.221199679885j)/(o+1.)+((-0.548183160474-0.326580846163j))+((-0.322504466884+0.128411756611j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.634954412186-0.737793564398j)*x[0]**o + ((0.559448472447-0.663007527802j))*x[0] + ((-0.852972780108+0.787124731787j))*x[1]**o + ((-0.416711295426+0.688402910339j))*x[1]
            ref[(0, 2, 2, 2)]=(-0.852972780108+0.787124731787j)/(o+1.)+((0.0713685885104+0.0126976912686j))+((0.634954412186-0.737793564398j))*0.5**o
            arg[(0, 2, 3, 0)]=(0.241143277358+0.991608042577j)*x[0]**o + ((0.379719521897+0.973318441181j))*x[0] + ((0.341850330749+0.401981052891j))*x[1]**o + ((0.273220715379+0.830142607456j))*x[1]
            ref[(0, 2, 3, 0)]=(0.341850330749+0.401981052891j)/(o+1.)+((0.326470118638+0.901730524319j))+((0.241143277358+0.991608042577j))*0.5**o
            arg[(0, 2, 3, 1)]=(-0.468195444072+0.284864602864j)*x[0]**o + ((0.203737897314+0.559207436418j))*x[0] + ((-0.211517523766+0.791326443835j))*x[1]**o + ((-0.13746398264-0.664680546999j))*x[1]
            ref[(0, 2, 3, 1)]=(-0.211517523766+0.791326443835j)/(o+1.)+((0.0331369573372-0.0527365552903j))+((-0.468195444072+0.284864602864j))*0.5**o
            arg[(0, 2, 3, 2)]=(0.964011573615+0.892021224318j)*x[0]**o + ((-0.718387716092-0.654548191891j))*x[0] + ((0.410330250602+0.959958034487j))*x[1]**o + ((-0.770246816003+0.810627107686j))*x[1]
            ref[(0, 2, 3, 2)]=(0.410330250602+0.959958034487j)/(o+1.)+((-0.744317266047+0.0780394578976j))+((0.964011573615+0.892021224318j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.754292590548+0.767186033263j)*x[0]**o + ((0.911067076531-0.0220048267263j))*x[0] + ((-0.0236993711147-0.875696973289j))*x[1]**o + ((0.896882828571-0.151152367659j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.0236993711147-0.875696973289j)/(o+1.)+((0.903974952551-0.0865785971928j))+((0.754292590548+0.767186033263j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.274240796581-0.122603803731j)*x[0]**o + ((0.131191554341-0.273711737531j))*x[0] + ((0.574100325469+0.966085578473j))*x[1]**o + ((-0.0990136304902+0.224472996456j))*x[1]
            ref[(1, 0, 0, 1)]=(0.574100325469+0.966085578473j)/(o+1.)+((0.0160889619256-0.0246193705376j))+((0.274240796581-0.122603803731j))*0.5**o
            arg[(1, 0, 0, 2)]=(0.622473326127-0.734912183766j)*x[0]**o + ((-0.409842518015+0.24995914803j))*x[0] + ((0.882514216466+0.499504245703j))*x[1]**o + ((0.0805157480897+0.631044080769j))*x[1]
            ref[(1, 0, 0, 2)]=(0.882514216466+0.499504245703j)/(o+1.)+((-0.164663384962+0.440501614399j))+((0.622473326127-0.734912183766j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.341072536121-0.844269341589j)*x[0]**o + ((-0.448929987209-0.179263060027j))*x[0] + ((0.764246313087-0.880997753168j))*x[1]**o + ((-0.545440308802+0.493627639622j))*x[1]
            ref[(1, 0, 1, 0)]=(0.764246313087-0.880997753168j)/(o+1.)+((-0.497185148005+0.157182289798j))+((0.341072536121-0.844269341589j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.635991358285+0.43110164374j)*x[0]**o + ((0.500996693069+0.740555128939j))*x[0] + ((-0.146949517923-0.951398620234j))*x[1]**o + ((-0.979464562904+0.878211089411j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.146949517923-0.951398620234j)/(o+1.)+((-0.239233934917+0.809383109175j))+((-0.635991358285+0.43110164374j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.328094724804-0.579805697866j)*x[0]**o + ((0.756662930927-0.241427983721j))*x[0] + ((-0.688046014633+0.812478368348j))*x[1]**o + ((-0.414307623016+0.935551805028j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.688046014633+0.812478368348j)/(o+1.)+((0.171177653956+0.347061910654j))+((0.328094724804-0.579805697866j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.869002554726+0.845490122189j)*x[0]**o + ((-0.338999223251+0.225980175517j))*x[0] + ((-0.0157297524266+0.294668340982j))*x[1]**o + ((-0.0193684453994-0.814988661003j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.0157297524266+0.294668340982j)/(o+1.)+((-0.179183834325-0.294504242743j))+((0.869002554726+0.845490122189j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.267484258294+0.683212455801j)*x[0]**o + ((-0.599566978867-0.384230452328j))*x[0] + ((0.933839421634+0.725596645264j))*x[1]**o + ((-0.785989138889-0.148426956083j))*x[1]
            ref[(1, 0, 2, 1)]=(0.933839421634+0.725596645264j)/(o+1.)+((-0.692778058878-0.266328704205j))+((0.267484258294+0.683212455801j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.580039348694-0.394243185998j)*x[0]**o + ((-0.819292028552-0.459799744313j))*x[0] + ((0.632775562066-0.716079445534j))*x[1]**o + ((0.251098436313-0.239919701153j))*x[1]
            ref[(1, 0, 2, 2)]=(0.632775562066-0.716079445534j)/(o+1.)+((-0.284096796119-0.349859722733j))+((-0.580039348694-0.394243185998j))*0.5**o
            arg[(1, 0, 3, 0)]=(0.978783261976+0.897690260275j)*x[0]**o + ((-0.928189570721-0.294242233687j))*x[0] + ((0.115489840402+0.633832742741j))*x[1]**o + ((-0.485189336098+0.403773146036j))*x[1]
            ref[(1, 0, 3, 0)]=(0.115489840402+0.633832742741j)/(o+1.)+((-0.706689453409+0.0547654561749j))+((0.978783261976+0.897690260275j))*0.5**o
            arg[(1, 0, 3, 1)]=(0.569686338718-0.609541041014j)*x[0]**o + ((-0.618306435681-0.744523945408j))*x[0] + ((0.0541250777279+0.106092962768j))*x[1]**o + ((-0.670432324362-0.181724304285j))*x[1]
            ref[(1, 0, 3, 1)]=(0.0541250777279+0.106092962768j)/(o+1.)+((-0.644369380022-0.463124124847j))+((0.569686338718-0.609541041014j))*0.5**o
            arg[(1, 0, 3, 2)]=(-0.98701380987+0.833397852194j)*x[0]**o + ((0.969764688023+0.450554522358j))*x[0] + ((-0.57081212849+0.492080747011j))*x[1]**o + ((0.741129599033+0.897829165079j))*x[1]
            ref[(1, 0, 3, 2)]=(-0.57081212849+0.492080747011j)/(o+1.)+((0.855447143528+0.674191843719j))+((-0.98701380987+0.833397852194j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.636713103507-0.27393839342j)*x[0]**o + ((-0.619737153689+0.0486490272866j))*x[0] + ((-0.992269944747+0.10302982528j))*x[1]**o + ((0.984348513478-0.635122351182j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.992269944747+0.10302982528j)/(o+1.)+((0.182305679894-0.293236661948j))+((-0.636713103507-0.27393839342j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.366889006511+0.546921521374j)*x[0]**o + ((-0.263718364166-0.480477188501j))*x[0] + ((0.762550813664+0.597037905393j))*x[1]**o + ((-0.43195226726+0.735200140397j))*x[1]
            ref[(1, 1, 0, 1)]=(0.762550813664+0.597037905393j)/(o+1.)+((-0.347835315713+0.127361475948j))+((0.366889006511+0.546921521374j))*0.5**o
            arg[(1, 1, 0, 2)]=(-0.692324488+0.522600431493j)*x[0]**o + ((0.945819822226-0.283131932385j))*x[0] + ((-0.737029531319+0.647379507219j))*x[1]**o + ((-0.407352367418-0.159038123381j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.737029531319+0.647379507219j)/(o+1.)+((0.269233727404-0.221085027883j))+((-0.692324488+0.522600431493j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.267325467099-0.11270086734j)*x[0]**o + ((-0.224347930903-0.512425810085j))*x[0] + ((0.703532809047-0.55882836801j))*x[1]**o + ((0.911983941308+0.128692075832j))*x[1]
            ref[(1, 1, 1, 0)]=(0.703532809047-0.55882836801j)/(o+1.)+((0.343818005203-0.191866867126j))+((-0.267325467099-0.11270086734j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.592215668378-0.851706393675j)*x[0]**o + ((-0.452050947822-0.56649453428j))*x[0] + ((0.731197107875-0.357465852145j))*x[1]**o + ((0.986890506256+0.314658690716j))*x[1]
            ref[(1, 1, 1, 1)]=(0.731197107875-0.357465852145j)/(o+1.)+((0.267419779217-0.125917921782j))+((0.592215668378-0.851706393675j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.893183128563+0.629737827694j)*x[0]**o + ((-0.809863524269-0.507345989688j))*x[0] + ((-0.382417281543-0.499499898254j))*x[1]**o + ((-0.442768244643+0.115010565687j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.382417281543-0.499499898254j)/(o+1.)+((-0.626315884456-0.196167712001j))+((-0.893183128563+0.629737827694j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.156550529985-0.271046394386j)*x[0]**o + ((-0.275631933233-0.682548304458j))*x[0] + ((0.916690662664+0.329439959828j))*x[1]**o + ((-0.986550284555-0.65212984212j))*x[1]
            ref[(1, 1, 2, 0)]=(0.916690662664+0.329439959828j)/(o+1.)+((-0.631091108894-0.667339073289j))+((0.156550529985-0.271046394386j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.500639208578-0.683136353804j)*x[0]**o + ((-0.381538386233+0.587998774652j))*x[0] + ((-0.312649069484-0.869611208393j))*x[1]**o + ((0.898653990867+0.103336413164j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.312649069484-0.869611208393j)/(o+1.)+((0.258557802317+0.345667593908j))+((0.500639208578-0.683136353804j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.639736242609+0.0228372273846j)*x[0]**o + ((0.129929242863+0.0917963366199j))*x[0] + ((-0.237821928316+0.407071212782j))*x[1]**o + ((-0.572484846045-0.776308405504j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.237821928316+0.407071212782j)/(o+1.)+((-0.221277801591-0.342256034442j))+((0.639736242609+0.0228372273846j))*0.5**o
            arg[(1, 1, 3, 0)]=(0.659530281908+0.219046659365j)*x[0]**o + ((0.275222139399+0.796549532417j))*x[0] + ((-0.15143650949-0.527406575709j))*x[1]**o + ((-0.637465209747-0.996027509047j))*x[1]
            ref[(1, 1, 3, 0)]=(-0.15143650949-0.527406575709j)/(o+1.)+((-0.181121535174-0.099738988315j))+((0.659530281908+0.219046659365j))*0.5**o
            arg[(1, 1, 3, 1)]=(0.408192423444+0.816171603952j)*x[0]**o + ((-0.167203676372+0.519244419294j))*x[0] + ((0.0227351963212-0.600617636746j))*x[1]**o + ((-0.276028088487+0.58862695361j))*x[1]
            ref[(1, 1, 3, 1)]=(0.0227351963212-0.600617636746j)/(o+1.)+((-0.221615882429+0.553935686452j))+((0.408192423444+0.816171603952j))*0.5**o
            arg[(1, 1, 3, 2)]=(0.51228393225+0.739061394486j)*x[0]**o + ((0.127824605175-0.47795352748j))*x[0] + ((-0.229570588484+0.930593026973j))*x[1]**o + ((-0.775151832584+0.0809644987698j))*x[1]
            ref[(1, 1, 3, 2)]=(-0.229570588484+0.930593026973j)/(o+1.)+((-0.323663613704-0.198494514355j))+((0.51228393225+0.739061394486j))*0.5**o
            arg[(1, 2, 0, 0)]=(0.678869071416+0.606143956673j)*x[0]**o + ((-0.325752626792-0.515961330285j))*x[0] + ((0.534200567593-0.521042939048j))*x[1]**o + ((0.926033414878+0.0579542401275j))*x[1]
            ref[(1, 2, 0, 0)]=(0.534200567593-0.521042939048j)/(o+1.)+((0.300140394043-0.229003545079j))+((0.678869071416+0.606143956673j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.747041576023-0.225335370431j)*x[0]**o + ((-0.29758687312-0.391545846495j))*x[0] + ((0.757298868099-0.411218060837j))*x[1]**o + ((-0.221659797491-0.14710092114j))*x[1]
            ref[(1, 2, 0, 1)]=(0.757298868099-0.411218060837j)/(o+1.)+((-0.259623335306-0.269323383817j))+((0.747041576023-0.225335370431j))*0.5**o
            arg[(1, 2, 0, 2)]=(-0.994651118981+0.806396217069j)*x[0]**o + ((0.972934291495+0.783310733126j))*x[0] + ((-0.563542993903+0.832836203529j))*x[1]**o + ((-0.68960485672+0.534720942066j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.563542993903+0.832836203529j)/(o+1.)+((0.141664717388+0.659015837596j))+((-0.994651118981+0.806396217069j))*0.5**o
            arg[(1, 2, 1, 0)]=(0.101577394602-0.759296379349j)*x[0]**o + ((-0.74642911084-0.109829000868j))*x[0] + ((0.0266200621428+0.0273507856104j))*x[1]**o + ((0.0254301147611-0.0452778933651j))*x[1]
            ref[(1, 2, 1, 0)]=(0.0266200621428+0.0273507856104j)/(o+1.)+((-0.360499498039-0.0775534471164j))+((0.101577394602-0.759296379349j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.505639015842-0.376506428694j)*x[0]**o + ((0.256212196704+0.674239510542j))*x[0] + ((0.0170480393101-0.667836774807j))*x[1]**o + ((0.51282120314+0.349855892508j))*x[1]
            ref[(1, 2, 1, 1)]=(0.0170480393101-0.667836774807j)/(o+1.)+((0.384516699922+0.512047701525j))+((-0.505639015842-0.376506428694j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.117112419416+0.772543420273j)*x[0]**o + ((-0.791152883265-0.012830024642j))*x[0] + ((-0.317582017547-0.35947935353j))*x[1]**o + ((-0.601960707642+0.832207976911j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.317582017547-0.35947935353j)/(o+1.)+((-0.696556795454+0.409688976134j))+((-0.117112419416+0.772543420273j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.56912984354-0.785370562298j)*x[0]**o + ((0.878868608384-0.268018674887j))*x[0] + ((0.825225703982-0.189807708058j))*x[1]**o + ((0.663432056815-0.336310888036j))*x[1]
            ref[(1, 2, 2, 0)]=(0.825225703982-0.189807708058j)/(o+1.)+((0.7711503326-0.302164781461j))+((-0.56912984354-0.785370562298j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.819551813121-0.2139376316j)*x[0]**o + ((0.57377363101+0.66888590849j))*x[0] + ((0.116875451597+0.181865284813j))*x[1]**o + ((-0.72597024555-0.497654922793j))*x[1]
            ref[(1, 2, 2, 1)]=(0.116875451597+0.181865284813j)/(o+1.)+((-0.0760983072702+0.0856154928486j))+((0.819551813121-0.2139376316j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.998854186821-0.0901870874662j)*x[0]**o + ((0.74044462709+0.572065379222j))*x[0] + ((-0.223097556601-0.179568186411j))*x[1]**o + ((-0.433118914925-0.819676811802j))*x[1]
            ref[(1, 2, 2, 2)]=(-0.223097556601-0.179568186411j)/(o+1.)+((0.153662856083-0.12380571629j))+((0.998854186821-0.0901870874662j))*0.5**o
            arg[(1, 2, 3, 0)]=(0.351182934143-0.656170592695j)*x[0]**o + ((-0.588031318253-0.715843116776j))*x[0] + ((0.0174296398563-0.426585343091j))*x[1]**o + ((0.540777771729-0.857185071806j))*x[1]
            ref[(1, 2, 3, 0)]=(0.0174296398563-0.426585343091j)/(o+1.)+((-0.0236267732622-0.786514094291j))+((0.351182934143-0.656170592695j))*0.5**o
            arg[(1, 2, 3, 1)]=(-0.0680497368679-0.133423446877j)*x[0]**o + ((-0.299078444081-0.138670072503j))*x[0] + ((0.698640201651-0.220850423799j))*x[1]**o + ((0.946742663125-0.440933398175j))*x[1]
            ref[(1, 2, 3, 1)]=(0.698640201651-0.220850423799j)/(o+1.)+((0.323832109522-0.289801735339j))+((-0.0680497368679-0.133423446877j))*0.5**o
            arg[(1, 2, 3, 2)]=(0.442252595114-0.434750147241j)*x[0]**o + ((-0.576359441423+0.696807258378j))*x[0] + ((0.148261864618+0.119256419865j))*x[1]**o + ((-0.0874039218718-0.223448390644j))*x[1]
            ref[(1, 2, 3, 2)]=(0.148261864618+0.119256419865j)/(o+1.)+((-0.331881681648+0.236679433867j))+((0.442252595114-0.434750147241j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.7872005523-0.186090810861j)*x[0]**o + ((0.878771160768+0.984545571551j))*x[0] + ((-0.367742489488-0.696962965026j))*x[1]**o + ((-0.18013180282-0.751025417044j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.367742489488-0.696962965026j)/(o+1.)+((0.349319678974+0.116760077254j))+((0.7872005523-0.186090810861j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.674069310251+0.148838136546j)*x[0]**o + ((-0.499211576459-0.967767052366j))*x[0] + ((-0.214889252768-0.618562939021j))*x[1]**o + ((0.260325927737+0.435951673145j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.214889252768-0.618562939021j)/(o+1.)+((-0.119442824361-0.265907689611j))+((-0.674069310251+0.148838136546j))*0.5**o
            arg[(2, 0, 0, 2)]=(-0.98477921207-0.357223371955j)*x[0]**o + ((-0.731106418124+0.907791154743j))*x[0] + ((-0.0376480241588-0.734894817928j))*x[1]**o + ((-0.637459747614+0.571689059539j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.0376480241588-0.734894817928j)/(o+1.)+((-0.684283082869+0.739740107141j))+((-0.98477921207-0.357223371955j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.641902424752+0.123421203842j)*x[0]**o + ((0.0923875842625-0.984768407282j))*x[0] + ((-0.78513731032-0.791392078873j))*x[1]**o + ((-0.00214582093462-0.268229475193j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.78513731032-0.791392078873j)/(o+1.)+((0.0451208816639-0.626498941238j))+((0.641902424752+0.123421203842j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.339490731992+0.480714564985j)*x[0]**o + ((0.384750307128+0.890283709718j))*x[0] + ((0.590951478138+0.368998347415j))*x[1]**o + ((0.43078604776+0.961988577091j))*x[1]
            ref[(2, 0, 1, 1)]=(0.590951478138+0.368998347415j)/(o+1.)+((0.407768177444+0.926136143405j))+((0.339490731992+0.480714564985j))*0.5**o
            arg[(2, 0, 1, 2)]=(-0.213918142999-0.910054294242j)*x[0]**o + ((-0.254940868575-0.182465943843j))*x[0] + ((-0.623721469859+0.510540254119j))*x[1]**o + ((-0.0989463532663+0.738679562772j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.623721469859+0.510540254119j)/(o+1.)+((-0.176943610921+0.278106809465j))+((-0.213918142999-0.910054294242j))*0.5**o
            arg[(2, 0, 2, 0)]=(0.822623596357-0.662978838737j)*x[0]**o + ((-0.0809102637007+0.59704719117j))*x[0] + ((0.0607083488824+0.28194633598j))*x[1]**o + ((-0.183824372708+0.461159604763j))*x[1]
            ref[(2, 0, 2, 0)]=(0.0607083488824+0.28194633598j)/(o+1.)+((-0.132367318205+0.529103397967j))+((0.822623596357-0.662978838737j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.0343279209704+0.329069885762j)*x[0]**o + ((-0.607418165356+0.928228681384j))*x[0] + ((0.118942000593-0.789215379658j))*x[1]**o + ((-0.0859317383301-0.80371540105j))*x[1]
            ref[(2, 0, 2, 1)]=(0.118942000593-0.789215379658j)/(o+1.)+((-0.346674951843+0.0622566401666j))+((-0.0343279209704+0.329069885762j))*0.5**o
            arg[(2, 0, 2, 2)]=(0.846413250914-0.280834017178j)*x[0]**o + ((-0.27003735804+0.483271933821j))*x[0] + ((-0.983945474899+0.755283215184j))*x[1]**o + ((0.609448982501+0.286047820666j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.983945474899+0.755283215184j)/(o+1.)+((0.16970581223+0.384659877244j))+((0.846413250914-0.280834017178j))*0.5**o
            arg[(2, 0, 3, 0)]=(-0.575031311313-0.0747377484451j)*x[0]**o + ((0.339438366345+0.347927956312j))*x[0] + ((-0.162360067786-0.502607345734j))*x[1]**o + ((0.128852336771-0.392320456277j))*x[1]
            ref[(2, 0, 3, 0)]=(-0.162360067786-0.502607345734j)/(o+1.)+((0.234145351558-0.0221962499828j))+((-0.575031311313-0.0747377484451j))*0.5**o
            arg[(2, 0, 3, 1)]=(0.599760470892-0.0721439905245j)*x[0]**o + ((-0.38055785915+0.252348554104j))*x[0] + ((0.659459412679+0.54069849011j))*x[1]**o + ((-0.67405299948-0.916771734879j))*x[1]
            ref[(2, 0, 3, 1)]=(0.659459412679+0.54069849011j)/(o+1.)+((-0.527305429315-0.332211590387j))+((0.599760470892-0.0721439905245j))*0.5**o
            arg[(2, 0, 3, 2)]=(-0.290881299398+0.26272059183j)*x[0]**o + ((0.977093468585+0.998055937523j))*x[0] + ((0.089859258667-0.326705693522j))*x[1]**o + ((0.50394936665+0.938321229197j))*x[1]
            ref[(2, 0, 3, 2)]=(0.089859258667-0.326705693522j)/(o+1.)+((0.740521417618+0.96818858336j))+((-0.290881299398+0.26272059183j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.963963394456+0.582883733701j)*x[0]**o + ((0.519227906155+0.804832190351j))*x[0] + ((0.668219073506+0.89547233768j))*x[1]**o + ((-0.61529309432+0.561170403398j))*x[1]
            ref[(2, 1, 0, 0)]=(0.668219073506+0.89547233768j)/(o+1.)+((-0.0480325940825+0.683001296875j))+((-0.963963394456+0.582883733701j))*0.5**o
            arg[(2, 1, 0, 1)]=(0.0380980952064-0.945266266367j)*x[0]**o + ((0.368575330259+0.963651078047j))*x[0] + ((0.597399382615+0.980296950426j))*x[1]**o + ((0.0201757574156-0.413139875765j))*x[1]
            ref[(2, 1, 0, 1)]=(0.597399382615+0.980296950426j)/(o+1.)+((0.194375543837+0.275255601141j))+((0.0380980952064-0.945266266367j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.267779046535-0.583756692652j)*x[0]**o + ((0.844794153575+0.672635415929j))*x[0] + ((0.212756578126-0.943563253281j))*x[1]**o + ((-0.76433641378-0.94977438349j))*x[1]
            ref[(2, 1, 0, 2)]=(0.212756578126-0.943563253281j)/(o+1.)+((0.0402288698974-0.138569483781j))+((-0.267779046535-0.583756692652j))*0.5**o
            arg[(2, 1, 1, 0)]=(-0.970742266634-0.0125647398062j)*x[0]**o + ((0.607467670959+0.499149947759j))*x[0] + ((-0.458734177047-0.33104353227j))*x[1]**o + ((0.765976314103+0.829581206014j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.458734177047-0.33104353227j)/(o+1.)+((0.686721992531+0.664365576887j))+((-0.970742266634-0.0125647398062j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.642982891526-0.486141219313j)*x[0]**o + ((0.432766334952+0.601525340436j))*x[0] + ((0.223138600343+0.352648872094j))*x[1]**o + ((-0.681811916687+0.0215061956743j))*x[1]
            ref[(2, 1, 1, 1)]=(0.223138600343+0.352648872094j)/(o+1.)+((-0.124522790868+0.311515768055j))+((-0.642982891526-0.486141219313j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.846221605186-0.72977111693j)*x[0]**o + ((-0.9125086947+0.549245708801j))*x[0] + ((-0.119650264351-0.930853742695j))*x[1]**o + ((0.296971223539+0.794083365477j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.119650264351-0.930853742695j)/(o+1.)+((-0.30776873558+0.671664537139j))+((0.846221605186-0.72977111693j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.728063941303+0.437719571498j)*x[0]**o + ((0.47136279849-0.666746545033j))*x[0] + ((0.491193986055-0.514150873164j))*x[1]**o + ((-0.494823962919+0.105642787909j))*x[1]
            ref[(2, 1, 2, 0)]=(0.491193986055-0.514150873164j)/(o+1.)+((-0.0117305822145-0.280551878562j))+((-0.728063941303+0.437719571498j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.149261109341+0.470257785042j)*x[0]**o + ((-0.92653803776-0.99189097444j))*x[0] + ((-0.700029798716+0.0524652446073j))*x[1]**o + ((0.319950544017+0.0636708581285j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.700029798716+0.0524652446073j)/(o+1.)+((-0.303293746872-0.464110058156j))+((-0.149261109341+0.470257785042j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.143654543437-0.777812315042j)*x[0]**o + ((-0.640152838761-0.165199356199j))*x[0] + ((-0.498761945478-0.325680055002j))*x[1]**o + ((0.0308477688811+0.0557856672004j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.498761945478-0.325680055002j)/(o+1.)+((-0.30465253494-0.0547068444995j))+((0.143654543437-0.777812315042j))*0.5**o
            arg[(2, 1, 3, 0)]=(0.537691451403-0.675601807413j)*x[0]**o + ((0.327311920711-0.868286023741j))*x[0] + ((0.436355062869+0.699739429815j))*x[1]**o + ((-0.236871210543+0.263041160635j))*x[1]
            ref[(2, 1, 3, 0)]=(0.436355062869+0.699739429815j)/(o+1.)+((0.0452203550842-0.302622431553j))+((0.537691451403-0.675601807413j))*0.5**o
            arg[(2, 1, 3, 1)]=(0.449788819375-0.707679698414j)*x[0]**o + ((-0.914956962229+0.679441467895j))*x[0] + ((0.604971759015+0.11519272155j))*x[1]**o + ((0.396126902099+0.0203038227887j))*x[1]
            ref[(2, 1, 3, 1)]=(0.604971759015+0.11519272155j)/(o+1.)+((-0.259415030065+0.349872645342j))+((0.449788819375-0.707679698414j))*0.5**o
            arg[(2, 1, 3, 2)]=(-0.33649146428+0.388984805023j)*x[0]**o + ((-0.615892096337+0.883604009385j))*x[0] + ((0.155094066581+0.167567106962j))*x[1]**o + ((0.89400370542+0.574273251038j))*x[1]
            ref[(2, 1, 3, 2)]=(0.155094066581+0.167567106962j)/(o+1.)+((0.139055804541+0.728938630212j))+((-0.33649146428+0.388984805023j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.329147142264+0.382670067702j)*x[0]**o + ((-0.336224699361+0.933114057868j))*x[0] + ((-0.592059160966+0.598534939592j))*x[1]**o + ((0.441962849322-0.986038745798j))*x[1]
            ref[(2, 2, 0, 0)]=(-0.592059160966+0.598534939592j)/(o+1.)+((0.0528690749807-0.0264623439651j))+((-0.329147142264+0.382670067702j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.144591465691+0.816717714222j)*x[0]**o + ((0.546641822218-0.228648610467j))*x[0] + ((0.853659962828+0.635333104853j))*x[1]**o + ((-0.774579992295+0.371314671046j))*x[1]
            ref[(2, 2, 0, 1)]=(0.853659962828+0.635333104853j)/(o+1.)+((-0.113969085039+0.0713330302895j))+((0.144591465691+0.816717714222j))*0.5**o
            arg[(2, 2, 0, 2)]=(0.137453691851+0.935493066586j)*x[0]**o + ((0.945350007346+0.701916395806j))*x[0] + ((-0.226573699646+0.20874009836j))*x[1]**o + ((0.442408858746-0.264522100709j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.226573699646+0.20874009836j)/(o+1.)+((0.693879433046+0.218697147548j))+((0.137453691851+0.935493066586j))*0.5**o
            arg[(2, 2, 1, 0)]=(-0.0838372228714+0.338470397266j)*x[0]**o + ((0.708834973409+0.726816779218j))*x[0] + ((-0.981634648637+0.695315014008j))*x[1]**o + ((0.903555012608-0.930290616959j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.981634648637+0.695315014008j)/(o+1.)+((0.806194993009-0.101736918871j))+((-0.0838372228714+0.338470397266j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.0420637327971-0.792149773398j)*x[0]**o + ((0.548530896345+0.236943969767j))*x[0] + ((0.00616533071423-0.842891028539j))*x[1]**o + ((0.429188844708+0.530595175895j))*x[1]
            ref[(2, 2, 1, 1)]=(0.00616533071423-0.842891028539j)/(o+1.)+((0.488859870527+0.383769572831j))+((0.0420637327971-0.792149773398j))*0.5**o
            arg[(2, 2, 1, 2)]=(0.95890545688+0.00839168735441j)*x[0]**o + ((-0.0309589155356+0.942417151764j))*x[0] + ((-0.614876743607+0.296440898901j))*x[1]**o + ((-0.0364175372967-0.39126991148j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.614876743607+0.296440898901j)/(o+1.)+((-0.0336882264161+0.275573620142j))+((0.95890545688+0.00839168735441j))*0.5**o
            arg[(2, 2, 2, 0)]=(-0.376509790416-0.99266453779j)*x[0]**o + ((-0.878776275988-0.0973997793553j))*x[0] + ((0.078019452081-0.731961203936j))*x[1]**o + ((-0.47907720735-0.616451651308j))*x[1]
            ref[(2, 2, 2, 0)]=(0.078019452081-0.731961203936j)/(o+1.)+((-0.678926741669-0.356925715332j))+((-0.376509790416-0.99266453779j))*0.5**o
            arg[(2, 2, 2, 1)]=(-0.800381084569-0.481724440069j)*x[0]**o + ((-0.568873977497-0.767975739586j))*x[0] + ((0.171817817474+0.428950036103j))*x[1]**o + ((-0.708746870976+0.0162292949916j))*x[1]
            ref[(2, 2, 2, 1)]=(0.171817817474+0.428950036103j)/(o+1.)+((-0.638810424237-0.375873222297j))+((-0.800381084569-0.481724440069j))*0.5**o
            arg[(2, 2, 2, 2)]=(-0.493008108315+0.934629460328j)*x[0]**o + ((-0.361430240793+0.110186070633j))*x[0] + ((0.350197504319-0.740968369787j))*x[1]**o + ((0.32127288308-0.343457745906j))*x[1]
            ref[(2, 2, 2, 2)]=(0.350197504319-0.740968369787j)/(o+1.)+((-0.0200786788568-0.116635837636j))+((-0.493008108315+0.934629460328j))*0.5**o
            arg[(2, 2, 3, 0)]=(-0.814184724053+0.0697590017329j)*x[0]**o + ((-0.371117099359-0.680843099579j))*x[0] + ((0.839748007848+0.5451553605j))*x[1]**o + ((-0.154479737464-0.320778371859j))*x[1]
            ref[(2, 2, 3, 0)]=(0.839748007848+0.5451553605j)/(o+1.)+((-0.262798418412-0.500810735719j))+((-0.814184724053+0.0697590017329j))*0.5**o
            arg[(2, 2, 3, 1)]=(0.417395140471-0.694688562505j)*x[0]**o + ((-0.754741987297-0.697999855447j))*x[0] + ((0.778223477707+0.256913305439j))*x[1]**o + ((0.546576050008+0.505887262184j))*x[1]
            ref[(2, 2, 3, 1)]=(0.778223477707+0.256913305439j)/(o+1.)+((-0.104082968645-0.096056296631j))+((0.417395140471-0.694688562505j))*0.5**o
            arg[(2, 2, 3, 2)]=(0.373058698957-0.521764454469j)*x[0]**o + ((0.275468372756-0.0680924591853j))*x[0] + ((-0.585875893532+0.193460258665j))*x[1]**o + ((0.0494272832677-0.538355545082j))*x[1]
            ref[(2, 2, 3, 2)]=(-0.585875893532+0.193460258665j)/(o+1.)+((0.162447828012-0.303224002134j))+((0.373058698957-0.521764454469j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(-0.649857231792-0.799759985956j)*x[0]**o + ((0.251193836489+0.523039174446j))*x[0] + ((0.905052293257+0.870858835717j))*x[1]**o + ((0.0965173488845-0.308942649892j))*x[1] + ((0.508863265519+0.29400078004j))*x[2]**o + ((0.673465308025+0.502729284373j))*x[2]
            ref[(0, 0, 0, 0)]=(1.41391555878+1.16485961576j)/(o+1.)+((0.5105882467+0.358412904463j))+((-0.649857231792-0.799759985956j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.890295026496-0.406464038435j)*x[0]**o + ((-0.303757846649+0.407706210648j))*x[0] + ((0.980295067036+0.184546273287j))*x[1]**o + ((0.311543943077+0.183458897492j))*x[1] + ((-0.209301660447-0.00366392773503j))*x[2]**o + ((0.257220772304+0.994653566754j))*x[2]
            ref[(0, 0, 0, 1)]=(0.770993406589+0.180882345552j)/(o+1.)+((0.132503434366+0.792909337447j))+((-0.890295026496-0.406464038435j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.584634607693+0.44482147561j)*x[0]**o + ((-0.881347230739+0.919133821906j))*x[0] + ((0.538827863812+0.939796843174j))*x[1]**o + ((-0.107095648863+0.367563580696j))*x[1] + ((0.640600798523-0.0580039376329j))*x[2]**o + ((-0.988852347115-0.467501173822j))*x[2]
            ref[(0, 0, 0, 2)]=(1.17942866233+0.881792905542j)/(o+1.)+((-0.988647613359+0.40959811439j))+((0.584634607693+0.44482147561j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.462232374176-0.61670582316j)*x[0]**o + ((-0.551348902051+0.134676909624j))*x[0] + ((-0.823798118764-0.855293839737j))*x[1]**o + ((0.936838470221+0.715151794696j))*x[1] + ((-0.0233717540959+0.616328042186j))*x[2]**o + ((-0.0172763963196+0.0478124494466j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.84716987286-0.238965797551j)/(o+1.)+((0.184106585926+0.448820576884j))+((0.462232374176-0.61670582316j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.281107791097+0.764671214608j)*x[0]**o + ((0.420689284933-0.0262298701985j))*x[0] + ((0.52967843878+0.0421413225104j))*x[1]**o + ((-0.31609315261-0.121528989485j))*x[1] + ((-0.127436089991+0.240475892226j))*x[2]**o + ((0.453100742762+0.345980854105j))*x[2]
            ref[(0, 0, 1, 1)]=(0.40224234879+0.282617214736j)/(o+1.)+((0.278848437542+0.0991109972105j))+((0.281107791097+0.764671214608j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.984062951208+0.640705527143j)*x[0]**o + ((-0.60865132806-0.184922604736j))*x[0] + ((0.0544705716234+0.376353512235j))*x[1]**o + ((-0.83407887414-0.0658661474026j))*x[1] + ((-0.911843685819+0.50794634288j))*x[2]**o + ((-0.911339594008+0.0741690067995j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.857373114195+0.884299855115j)/(o+1.)+((-1.1770348981-0.0883098726695j))+((0.984062951208+0.640705527143j))*0.5**o
            arg[(0, 0, 2, 0)]=(-0.305615243436-0.588587868036j)*x[0]**o + ((-0.577387549069-0.35397607965j))*x[0] + ((-0.873142746751+0.447307284883j))*x[1]**o + ((-0.693653360749+0.982498279064j))*x[1] + ((0.133534612127+0.41911451891j))*x[2]**o + ((0.387730744146-0.784119989712j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.739608134624+0.866421803793j)/(o+1.)+((-0.441655082837-0.0777988951494j))+((-0.305615243436-0.588587868036j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.0911026920404+0.396582070785j)*x[0]**o + ((0.356406474494+0.664633567256j))*x[0] + ((0.236400598719-0.411091732333j))*x[1]**o + ((-0.351520252717-0.445225583733j))*x[1] + ((0.339215495602-0.0397766196412j))*x[2]**o + ((-0.327425596693-0.963264968755j))*x[2]
            ref[(0, 0, 2, 1)]=(0.575616094321-0.450868351974j)/(o+1.)+((-0.161269687458-0.371928492616j))+((0.0911026920404+0.396582070785j))*0.5**o
            arg[(0, 0, 2, 2)]=(-0.546049380512-0.125201482743j)*x[0]**o + ((-0.446361729454+0.978551105095j))*x[0] + ((0.846882950391+0.857982102129j))*x[1]**o + ((0.750276557202-0.783167159799j))*x[1] + ((-0.833199427076+0.934839966702j))*x[2]**o + ((-0.149515393225+0.517609761479j))*x[2]
            ref[(0, 0, 2, 2)]=(0.013683523315+1.79282206883j)/(o+1.)+((0.0771997172614+0.356496853387j))+((-0.546049380512-0.125201482743j))*0.5**o
            arg[(0, 0, 3, 0)]=(0.12564374527+0.632489117445j)*x[0]**o + ((0.292279257331-0.272559584164j))*x[0] + ((-0.615031760483+0.449944240367j))*x[1]**o + ((0.0366146702399-0.0483117096352j))*x[1] + ((0.798715883409+0.326789335083j))*x[2]**o + ((-0.996001706958+0.864245454262j))*x[2]
            ref[(0, 0, 3, 0)]=(0.183684122925+0.77673357545j)/(o+1.)+((-0.333553889693+0.271687080232j))+((0.12564374527+0.632489117445j))*0.5**o
            arg[(0, 0, 3, 1)]=(-0.133623415302+0.415009010975j)*x[0]**o + ((0.950486859918-0.0401736374288j))*x[0] + ((-0.216645229589+0.371651854864j))*x[1]**o + ((0.189148943802-0.104569099651j))*x[1] + ((-0.231138951305-0.266332410628j))*x[2]**o + ((-0.563157885205-0.542511695594j))*x[2]
            ref[(0, 0, 3, 1)]=(-0.447784180894+0.105319444236j)/(o+1.)+((0.288238959258-0.343627216337j))+((-0.133623415302+0.415009010975j))*0.5**o
            arg[(0, 0, 3, 2)]=(-0.113405042347-0.933773129134j)*x[0]**o + ((-0.237024456125-0.880782519927j))*x[0] + ((-0.952246763086-0.885488200804j))*x[1]**o + ((0.962941157445+0.555347306454j))*x[1] + ((-0.388172040584+0.319407587832j))*x[2]**o + ((-0.551950471947-0.294318341782j))*x[2]
            ref[(0, 0, 3, 2)]=(-1.34041880367-0.566080612972j)/(o+1.)+((0.0869831146867-0.309876777627j))+((-0.113405042347-0.933773129134j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.013373109961-0.481779455954j)*x[0]**o + ((0.351913398832-0.0921647704556j))*x[0] + ((0.882781633777+0.662428770751j))*x[1]**o + ((0.764286128915-0.59062516499j))*x[1] + ((-0.772659373485-0.671678078658j))*x[2]**o + ((-0.847990320151+0.937961619202j))*x[2]
            ref[(0, 1, 0, 0)]=(0.110122260292-0.00924930790612j)/(o+1.)+((0.134104603798+0.127585841878j))+((-0.013373109961-0.481779455954j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.301163974304+0.172187623662j)*x[0]**o + ((-0.899110929367-0.208529617739j))*x[0] + ((0.822415518403+0.976640519928j))*x[1]**o + ((-0.24820301707-0.980554983372j))*x[1] + ((-0.13979251915+0.959057916143j))*x[2]**o + ((-0.633350161238-0.0790944480362j))*x[2]
            ref[(0, 1, 0, 1)]=(0.682622999253+1.93569843607j)/(o+1.)+((-0.890332053837-0.634089524574j))+((0.301163974304+0.172187623662j))*0.5**o
            arg[(0, 1, 0, 2)]=(0.824708410978-0.362445324976j)*x[0]**o + ((-0.240316473524+0.600242589921j))*x[0] + ((-0.439404508752-0.911433732998j))*x[1]**o + ((0.823703430813+0.926930573966j))*x[1] + ((0.459275301567-0.661440218247j))*x[2]**o + ((-0.266943814421+0.680476353308j))*x[2]
            ref[(0, 1, 0, 2)]=(0.0198707928147-1.57287395125j)/(o+1.)+((0.158221571434+1.1038247586j))+((0.824708410978-0.362445324976j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.984757316136+0.99796105954j)*x[0]**o + ((0.740524263904+0.69196614013j))*x[0] + ((0.442135439327-0.918172530773j))*x[1]**o + ((0.578114183364+0.651003411113j))*x[1] + ((-0.507359680801+0.0277731790215j))*x[2]**o + ((0.854293472109-0.953212661456j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.0652242414737-0.890399351752j)/(o+1.)+((1.08646595969+0.194878444893j))+((0.984757316136+0.99796105954j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.438187395304+0.596303439519j)*x[0]**o + ((0.242052608007+0.630821144368j))*x[0] + ((0.528976266162-0.564787738687j))*x[1]**o + ((0.243293969782+0.409477203779j))*x[1] + ((-0.768270862864+0.682984572342j))*x[2]**o + ((0.480256204818-0.938460941053j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.239294596702+0.118196833655j)/(o+1.)+((0.482801391304+0.050918703547j))+((0.438187395304+0.596303439519j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.907133405635-0.99756239219j)*x[0]**o + ((-0.833627072414+0.258008859957j))*x[0] + ((0.0235261399673+0.201081985922j))*x[1]**o + ((0.838085293501-0.353530155038j))*x[1] + ((-0.754208456015-0.0170382444785j))*x[2]**o + ((-0.496016476088-0.0192508470949j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.730682316048+0.184043741443j)/(o+1.)+((-0.245779127501-0.0573860710882j))+((0.907133405635-0.99756239219j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.619884884589-0.879125350259j)*x[0]**o + ((-0.36722260734-0.728410490767j))*x[0] + ((0.110537260832-0.822271740683j))*x[1]**o + ((-0.248004150109-0.504852366522j))*x[1] + ((-0.916156295154-0.0023693322706j))*x[2]**o + ((-0.211560501013+0.997724401405j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.805619034322-0.824641072953j)/(o+1.)+((-0.413393629231-0.117769227942j))+((-0.619884884589-0.879125350259j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.0877421493161+0.763115016607j)*x[0]**o + ((0.235798006788-0.888503360285j))*x[0] + ((-0.471471268549-0.00996770248415j))*x[1]**o + ((0.671248771453-0.811383846836j))*x[1] + ((0.933552223151+0.194365734768j))*x[2]**o + ((-0.416647489908-0.57140311643j))*x[2]
            ref[(0, 1, 2, 1)]=(0.462080954601+0.184398032283j)/(o+1.)+((0.245199644167-1.13564516178j))+((-0.0877421493161+0.763115016607j))*0.5**o
            arg[(0, 1, 2, 2)]=(0.213816481322+0.987094957607j)*x[0]**o + ((-0.106927281538+0.0924906371358j))*x[0] + ((-0.590390156284+0.776302397852j))*x[1]**o + ((-0.315523572344-0.589317265677j))*x[1] + ((-0.426143381638+0.765065847028j))*x[2]**o + ((-0.545948518592+0.515224323555j))*x[2]
            ref[(0, 1, 2, 2)]=(-1.01653353792+1.54136824488j)/(o+1.)+((-0.484199686237+0.00919884750677j))+((0.213816481322+0.987094957607j))*0.5**o
            arg[(0, 1, 3, 0)]=(-0.74638764316+0.925355034681j)*x[0]**o + ((0.386707174153-0.350878208726j))*x[0] + ((0.858898577301+0.85648712001j))*x[1]**o + ((-0.652364697593-0.0480272227381j))*x[1] + ((0.528195057818-0.423512544722j))*x[2]**o + ((0.487035510992+0.036702978631j))*x[2]
            ref[(0, 1, 3, 0)]=(1.38709363512+0.432974575288j)/(o+1.)+((0.110688993776-0.181101226417j))+((-0.74638764316+0.925355034681j))*0.5**o
            arg[(0, 1, 3, 1)]=(-0.143736619237+0.572237633424j)*x[0]**o + ((-0.168046686717-0.274862664606j))*x[0] + ((-0.248575614717-0.941339888333j))*x[1]**o + ((0.435662413565-0.63901061292j))*x[1] + ((-0.267108957832-0.511770573959j))*x[2]**o + ((0.124214118846+0.386558351824j))*x[2]
            ref[(0, 1, 3, 1)]=(-0.515684572549-1.45311046229j)/(o+1.)+((0.195914922847-0.263657462851j))+((-0.143736619237+0.572237633424j))*0.5**o
            arg[(0, 1, 3, 2)]=(-0.804356246083+0.0801202007474j)*x[0]**o + ((-0.0277024086652-0.312486311443j))*x[0] + ((-0.209221748491+0.903421656629j))*x[1]**o + ((-0.0905907551946-0.51091968877j))*x[1] + ((0.650988125271-0.839250743222j))*x[2]**o + ((0.247709617824-0.0863018343822j))*x[2]
            ref[(0, 1, 3, 2)]=(0.441766376781+0.0641709134072j)/(o+1.)+((0.064708226982-0.454853917297j))+((-0.804356246083+0.0801202007474j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.722186690238+0.340338905254j)*x[0]**o + ((0.0630558558888-0.379099642506j))*x[0] + ((-0.754845717971-0.731781040447j))*x[1]**o + ((-0.959396198354+0.502397302085j))*x[1] + ((-0.26168274029-0.846453636251j))*x[2]**o + ((0.94104782751-0.650958155133j))*x[2]
            ref[(0, 2, 0, 0)]=(-1.01652845826-1.5782346767j)/(o+1.)+((0.0223537425223-0.263830247777j))+((-0.722186690238+0.340338905254j))*0.5**o
            arg[(0, 2, 0, 1)]=(-0.640800702949-0.170251788649j)*x[0]**o + ((0.22288505187+0.181774655142j))*x[0] + ((0.817053429297+0.780183733842j))*x[1]**o + ((-0.176652394821+0.213770800155j))*x[1] + ((0.323501145016-0.151674347303j))*x[2]**o + ((-0.447460732637-0.221212151356j))*x[2]
            ref[(0, 2, 0, 1)]=(1.14055457431+0.628509386539j)/(o+1.)+((-0.200614037794+0.0871666519704j))+((-0.640800702949-0.170251788649j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.778291464682+0.45649679128j)*x[0]**o + ((0.656629585629+0.882507897007j))*x[0] + ((-0.936508334201+0.0491900367261j))*x[1]**o + ((0.813356159693+0.904622333102j))*x[1] + ((0.236101011672+0.483800152369j))*x[2]**o + ((-0.498978430555-0.574095084459j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.700407322529+0.532990189095j)/(o+1.)+((0.485503657384+0.606517572825j))+((0.778291464682+0.45649679128j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.0715904093111+0.949013984711j)*x[0]**o + ((0.895385288274+0.274744041204j))*x[0] + ((0.71633912228+0.628432352565j))*x[1]**o + ((0.18439454607+0.406794648736j))*x[1] + ((0.507224204888+0.45633564883j))*x[2]**o + ((-0.668458163479+0.947988872255j))*x[2]
            ref[(0, 2, 1, 0)]=(1.22356332717+1.08476800139j)/(o+1.)+((0.205660835432+0.814763781097j))+((-0.0715904093111+0.949013984711j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.763127487348-0.132722727973j)*x[0]**o + ((-0.945430609985-0.147551821549j))*x[0] + ((-0.424354297848-0.404788536107j))*x[1]**o + ((0.806748106591-0.927033021294j))*x[1] + ((-0.893980576372+0.0383026319625j))*x[2]**o + ((-0.771785119422-0.299259271632j))*x[2]
            ref[(0, 2, 1, 1)]=(-1.31833487422-0.366485904144j)/(o+1.)+((-0.455233811408-0.686922057237j))+((0.763127487348-0.132722727973j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.368992432353+0.741195981396j)*x[0]**o + ((-0.417647893331+0.28820667096j))*x[0] + ((-0.998540713653+0.702416341836j))*x[1]**o + ((-0.350104257659-0.999206336307j))*x[1] + ((-0.185916842622+0.189619012743j))*x[2]**o + ((-0.770450201834-0.46682689404j))*x[2]
            ref[(0, 2, 1, 2)]=(-1.18445755628+0.892035354579j)/(o+1.)+((-0.769101176412-0.588913279693j))+((0.368992432353+0.741195981396j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.383978274166-0.705574826835j)*x[0]**o + ((0.903211803904-0.794909164467j))*x[0] + ((0.198342562503+0.482279521865j))*x[1]**o + ((0.455336830672-0.0803240926655j))*x[1] + ((-0.722590165996+0.368180193075j))*x[2]**o + ((0.770081397582+0.411915678473j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.524247603492+0.850459714939j)/(o+1.)+((1.06431501608-0.23165878933j))+((-0.383978274166-0.705574826835j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.594479411227+0.691942184228j)*x[0]**o + ((0.174911783504+0.981227960141j))*x[0] + ((-0.736952781402+0.822715115135j))*x[1]**o + ((0.517539377035-0.61835320223j))*x[1] + ((-0.0822617370337+0.288529756781j))*x[2]**o + ((-0.601698932294+0.145352624383j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.819214518435+1.11124487192j)/(o+1.)+((0.0453761141224+0.254113691147j))+((0.594479411227+0.691942184228j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.993410259584-0.70181233435j)*x[0]**o + ((0.310959213407-0.954579911166j))*x[0] + ((-0.521963138476+0.99798793564j))*x[1]**o + ((-0.876114597694+0.223708246392j))*x[1] + ((-0.139679565271+0.640895140804j))*x[2]**o + ((-0.0601207591818-0.0984519892868j))*x[2]
            ref[(0, 2, 2, 2)]=(-0.661642703747+1.63888307644j)/(o+1.)+((-0.312638071734-0.41466182703j))+((0.993410259584-0.70181233435j))*0.5**o
            arg[(0, 2, 3, 0)]=(0.891499082308+0.574042080813j)*x[0]**o + ((-0.88517997954+0.336004286044j))*x[0] + ((0.468718210082+0.692714128774j))*x[1]**o + ((-0.622361820085+0.81127180547j))*x[1] + ((0.580287765519-0.756193432583j))*x[2]**o + ((-0.608111132427+0.796005382245j))*x[2]
            ref[(0, 2, 3, 0)]=(1.0490059756-0.0634793038092j)/(o+1.)+((-1.05782646603+0.97164073688j))+((0.891499082308+0.574042080813j))*0.5**o
            arg[(0, 2, 3, 1)]=(0.523303903575+0.921883987753j)*x[0]**o + ((-0.848004283371+0.101756973219j))*x[0] + ((0.70321104211-0.45757899299j))*x[1]**o + ((-0.0562745380846+0.965159549504j))*x[1] + ((0.588215331976-0.878200194235j))*x[2]**o + ((-0.763159947859+0.693016460948j))*x[2]
            ref[(0, 2, 3, 1)]=(1.29142637409-1.33577918723j)/(o+1.)+((-0.833719384657+0.879966491835j))+((0.523303903575+0.921883987753j))*0.5**o
            arg[(0, 2, 3, 2)]=(-0.944161934492+0.66852996595j)*x[0]**o + ((0.248081381851-0.598807003168j))*x[0] + ((0.289521193606-0.355385245907j))*x[1]**o + ((-0.839194659353-0.14895747566j))*x[1] + ((-0.841711808643+0.739838727555j))*x[2]**o + ((0.22274396969+0.66473686571j))*x[2]
            ref[(0, 2, 3, 2)]=(-0.552190615037+0.384453481647j)/(o+1.)+((-0.184184653906-0.0415138065588j))+((-0.944161934492+0.66852996595j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.149701387331-0.0965152767931j)*x[0]**o + ((-0.357658566615-0.0934803058403j))*x[0] + ((-0.835987745823-0.331754632404j))*x[1]**o + ((0.847668236815-0.837833586792j))*x[1] + ((-0.172910740797+0.370167655563j))*x[2]**o + ((-0.00994649525564-0.771556051072j))*x[2]
            ref[(1, 0, 0, 0)]=(-1.00889848662+0.0384130231592j)/(o+1.)+((0.240031587472-0.851434971852j))+((-0.149701387331-0.0965152767931j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.809425089003+0.549764000975j)*x[0]**o + ((-0.552201867455-0.59714832774j))*x[0] + ((-0.260833420349-0.272209400796j))*x[1]**o + ((0.355817573594+0.168186873539j))*x[1] + ((-0.0274560849272+0.114849548385j))*x[2]**o + ((-0.832911333859+0.7748888085j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.288289505277-0.157359852412j)/(o+1.)+((-0.51464781386+0.17296367715j))+((-0.809425089003+0.549764000975j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.504726042007-0.417917309856j)*x[0]**o + ((0.159366913415+0.689207882031j))*x[0] + ((0.595430467487+0.705279388753j))*x[1]**o + ((0.307658828198+0.983024870861j))*x[1] + ((0.601919840883-0.923137153784j))*x[2]**o + ((-0.506472668509-0.0679673713162j))*x[2]
            ref[(1, 0, 0, 2)]=(1.19735030837-0.217857765031j)/(o+1.)+((-0.0197234634481+0.802132690788j))+((-0.504726042007-0.417917309856j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.795801401961+0.489032352129j)*x[0]**o + ((0.463465032311-0.659755381992j))*x[0] + ((0.793153519441-0.139312277045j))*x[1]**o + ((-0.150369316536+0.397293843984j))*x[1] + ((0.262087608275-0.750799042158j))*x[2]**o + ((0.317106556073-0.00818757003138j))*x[2]
            ref[(1, 0, 1, 0)]=(1.05524112772-0.890111319203j)/(o+1.)+((0.315101135924-0.13532455402j))+((0.795801401961+0.489032352129j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.0461827189362+0.82117919394j)*x[0]**o + ((0.15043083203-0.0309284543585j))*x[0] + ((0.217296268458-0.281680845309j))*x[1]**o + ((0.175945482378+0.467641246278j))*x[1] + ((-0.618885894732+0.893630869837j))*x[2]**o + ((-0.705248667886-0.416539440126j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.401589626273+0.611950024528j)/(o+1.)+((-0.189436176739+0.0100866758965j))+((0.0461827189362+0.82117919394j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.806964672531+0.228569292713j)*x[0]**o + ((0.306647192367+0.231287033877j))*x[0] + ((-0.790389617183+0.402163893968j))*x[1]**o + ((-0.550414383851-0.738513734036j))*x[1] + ((0.243971144865-0.117378339136j))*x[2]**o + ((-0.771172424939-0.420760284153j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.546418472318+0.284785554832j)/(o+1.)+((-0.507469808211-0.463993492156j))+((0.806964672531+0.228569292713j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.136157854579+0.014352210154j)*x[0]**o + ((0.170839083723+0.0708924719723j))*x[0] + ((-0.583802141957+0.0555157761316j))*x[1]**o + ((-0.823253198229-0.741115940923j))*x[1] + ((0.387785619372-0.372674976177j))*x[2]**o + ((-0.817713952256+0.586774705695j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.196016522585-0.317159200046j)/(o+1.)+((-0.735064033381-0.041724381628j))+((0.136157854579+0.014352210154j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.503145051573+0.373287724364j)*x[0]**o + ((-0.201693459551-0.693739865508j))*x[0] + ((-0.0219349031533-0.031300992557j))*x[1]**o + ((0.357474201175+0.276086090717j))*x[1] + ((-0.417378579839+0.220145684155j))*x[2]**o + ((0.0853931441939+0.291456025652j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.439313482992+0.188844691598j)/(o+1.)+((0.120586942909-0.0630988745694j))+((0.503145051573+0.373287724364j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.676310881539+0.985568735008j)*x[0]**o + ((-0.22474438296+0.364364361406j))*x[0] + ((0.160864876933+0.217430196198j))*x[1]**o + ((0.605217986865-0.13551457347j))*x[1] + ((-0.667704981497-0.253881005557j))*x[2]**o + ((-0.410999210593+0.809032548363j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.506840104564-0.0364508093587j)/(o+1.)+((-0.0152628033444+0.518941168149j))+((-0.676310881539+0.985568735008j))*0.5**o
            arg[(1, 0, 3, 0)]=(0.628900190667+0.674141302185j)*x[0]**o + ((-0.732301921384+0.582087825856j))*x[0] + ((-0.777918817925-0.988323099092j))*x[1]**o + ((-0.3888688701+0.718106203709j))*x[1] + ((-0.224632735865-0.628773159963j))*x[2]**o + ((-0.782345010167-0.443060936235j))*x[2]
            ref[(1, 0, 3, 0)]=(-1.00255155379-1.61709625906j)/(o+1.)+((-0.951757900825+0.428566546665j))+((0.628900190667+0.674141302185j))*0.5**o
            arg[(1, 0, 3, 1)]=(-0.413005924106+0.184568080731j)*x[0]**o + ((-0.627993920198+0.587734548658j))*x[0] + ((0.642224451928-0.610843361972j))*x[1]**o + ((-0.0525537081506+0.698001879353j))*x[1] + ((0.424751612611-0.422403883535j))*x[2]**o + ((0.426206486096+0.872701511871j))*x[2]
            ref[(1, 0, 3, 1)]=(1.06697606454-1.03324724551j)/(o+1.)+((-0.127170571126+1.07921896994j))+((-0.413005924106+0.184568080731j))*0.5**o
            arg[(1, 0, 3, 2)]=(0.292581590686+0.674231337929j)*x[0]**o + ((0.884928322212+0.376272474999j))*x[0] + ((0.563930553342+0.717228141076j))*x[1]**o + ((0.730617130698-0.189692425123j))*x[1] + ((0.174496376792+0.851584118428j))*x[2]**o + ((-0.32698262276-0.0141181123305j))*x[2]
            ref[(1, 0, 3, 2)]=(0.738426930134+1.5688122595j)/(o+1.)+((0.644281415075+0.0862309687732j))+((0.292581590686+0.674231337929j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.00630514314981+0.51153290103j)*x[0]**o + ((0.883572167196-0.464777557893j))*x[0] + ((-0.135773433877+0.504252475698j))*x[1]**o + ((0.518689739868-0.43677863052j))*x[1] + ((0.101694001704+0.721446238108j))*x[2]**o + ((-0.806351872356-0.761098863103j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.0340794321733+1.22569871381j)/(o+1.)+((0.297955017354-0.831327525758j))+((0.00630514314981+0.51153290103j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.73778319318+0.857331476257j)*x[0]**o + ((0.592031940211-0.66095140382j))*x[0] + ((-0.731664061209+0.233719572371j))*x[1]**o + ((0.261395874415+0.542725440287j))*x[1] + ((0.205839948359+0.40919715339j))*x[2]**o + ((0.523188197546-0.281360088045j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.525824112849+0.642916725761j)/(o+1.)+((0.688308006086-0.199793025789j))+((0.73778319318+0.857331476257j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.503264725287+0.675798072371j)*x[0]**o + ((0.924771163785-0.537997806985j))*x[0] + ((0.181490740893+0.4179749695j))*x[1]**o + ((-0.409012655027+0.792383536202j))*x[1] + ((-0.625748762996-0.511339600667j))*x[2]**o + ((-0.158327694697+0.340338120113j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.444258022103-0.0933646311664j)/(o+1.)+((0.17871540703+0.297361924665j))+((0.503264725287+0.675798072371j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.675509642891-0.0527440353507j)*x[0]**o + ((0.491570037338-0.272093378795j))*x[0] + ((0.789595498766-0.172782153981j))*x[1]**o + ((0.417117369358-0.71197072398j))*x[1] + ((0.0769069181636+0.25543019842j))*x[2]**o + ((0.929637841461-0.32392742562j))*x[2]
            ref[(1, 1, 1, 0)]=(0.866502416929+0.0826480444391j)/(o+1.)+((0.919162624079-0.653995764198j))+((-0.675509642891-0.0527440353507j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.404478028351-0.169464873762j)*x[0]**o + ((-0.587318810569+0.823708443299j))*x[0] + ((-0.964624979357-0.727581530501j))*x[1]**o + ((-0.036686045907+0.464151219363j))*x[1] + ((0.675422887885-0.777437071678j))*x[2]**o + ((-0.0710781182367+0.357504051327j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.289202091472-1.50501860218j)/(o+1.)+((-0.347541487356+0.822681856995j))+((0.404478028351-0.169464873762j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.137855454006-0.971167885565j)*x[0]**o + ((-0.766921161778-0.630288998971j))*x[0] + ((0.833899950216+0.0432398156974j))*x[1]**o + ((-0.832272886853-0.130318123285j))*x[1] + ((-0.0359017486413-0.245400394582j))*x[2]**o + ((0.672574399177-0.615899508911j))*x[2]
            ref[(1, 1, 1, 2)]=(0.797998201575-0.202160578885j)/(o+1.)+((-0.463309824727-0.688253315584j))+((0.137855454006-0.971167885565j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.499001310822-0.207357371077j)*x[0]**o + ((-0.465422711759+0.974170141711j))*x[0] + ((-0.636675778062-0.36964723759j))*x[1]**o + ((0.327685058442-0.825155144856j))*x[1] + ((0.389590260169+0.296717650196j))*x[2]**o + ((-0.947300171799-0.170452382183j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.247085517893-0.0729295873949j)/(o+1.)+((-0.542518912558-0.0107186926642j))+((-0.499001310822-0.207357371077j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.274083328378-0.377283392701j)*x[0]**o + ((-0.877247009287-0.535989819401j))*x[0] + ((-0.681941532001-0.197188064785j))*x[1]**o + ((-0.242179007895-0.461933288074j))*x[1] + ((-0.145478677811+0.152176367653j))*x[2]**o + ((-0.0907730827557-0.827678744254j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.827420209812-0.045011697132j)/(o+1.)+((-0.605099549969-0.912800925865j))+((-0.274083328378-0.377283392701j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.483330130513+0.550433039657j)*x[0]**o + ((0.589373317291-0.232102338287j))*x[0] + ((0.294638104868-0.889248072071j))*x[1]**o + ((0.0105595954572-0.457219697379j))*x[1] + ((0.284602276916+0.847718648596j))*x[2]**o + ((-0.0765025545008+0.0353592581127j))*x[2]
            ref[(1, 1, 2, 2)]=(0.579240381784-0.0415294234757j)/(o+1.)+((0.261715179124-0.326981388777j))+((0.483330130513+0.550433039657j))*0.5**o
            arg[(1, 1, 3, 0)]=(-0.031852123216-0.86568786191j)*x[0]**o + ((-0.286872621553+0.781452794333j))*x[0] + ((-0.434899687458+0.0847590180599j))*x[1]**o + ((0.395496693262-0.184371951833j))*x[1] + ((-0.0807583226243+0.582467928953j))*x[2]**o + ((-0.402747388053-0.800368865557j))*x[2]
            ref[(1, 1, 3, 0)]=(-0.515658010082+0.667226947013j)/(o+1.)+((-0.147061658172-0.101644011528j))+((-0.031852123216-0.86568786191j))*0.5**o
            arg[(1, 1, 3, 1)]=(0.0562973803314+0.570346592156j)*x[0]**o + ((-0.50856517471+0.658667683466j))*x[0] + ((0.279621479938-0.219528595642j))*x[1]**o + ((0.225322727947+0.133153456306j))*x[1] + ((-0.922091081205-0.285786580111j))*x[2]**o + ((-0.560803345175+0.594294287273j))*x[2]
            ref[(1, 1, 3, 1)]=(-0.642469601267-0.505315175753j)/(o+1.)+((-0.422022895969+0.693057713523j))+((0.0562973803314+0.570346592156j))*0.5**o
            arg[(1, 1, 3, 2)]=(0.576345495952+0.867619528765j)*x[0]**o + ((0.631379626856-0.881304551915j))*x[0] + ((0.51214085489+0.58183038997j))*x[1]**o + ((0.598543368773+0.0171658194887j))*x[1] + ((-0.366648092785-0.134342566434j))*x[2]**o + ((-0.76224599132+0.752472885787j))*x[2]
            ref[(1, 1, 3, 2)]=(0.145492762105+0.447487823536j)/(o+1.)+((0.233838502155-0.0558329233197j))+((0.576345495952+0.867619528765j))*0.5**o
            arg[(1, 2, 0, 0)]=(0.701906031165+0.713486345111j)*x[0]**o + ((0.0195258989571+0.733636848062j))*x[0] + ((-0.291347292285+0.778585877251j))*x[1]**o + ((0.126610974158+0.724572776408j))*x[1] + ((0.0809541859307+0.716383400079j))*x[2]**o + ((0.838332440094-0.570275261221j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.210393106354+1.49496927733j)/(o+1.)+((0.492234656604+0.443967181624j))+((0.701906031165+0.713486345111j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.734644274412-0.96858274606j)*x[0]**o + ((0.0284843480224+0.272177696344j))*x[0] + ((-0.172884726351+0.44653795895j))*x[1]**o + ((-0.137573707194-0.104870000132j))*x[1] + ((0.0603810116028-0.306430387644j))*x[2]**o + ((0.116663855451+0.201554402079j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.112503714749+0.140107571306j)/(o+1.)+((0.00378724813948+0.184431049146j))+((0.734644274412-0.96858274606j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.929128380774+0.505842814928j)*x[0]**o + ((0.885178884526+0.0684195338775j))*x[0] + ((-0.937567541069+0.399251896846j))*x[1]**o + ((0.813975388018-0.618461511868j))*x[1] + ((-0.116336174182-0.597645543473j))*x[2]**o + ((-0.561275083479+0.346372681125j))*x[2]
            ref[(1, 2, 0, 2)]=(-1.05390371525-0.198393646628j)/(o+1.)+((0.568939594533-0.101834648433j))+((0.929128380774+0.505842814928j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.946421898911+0.946043718547j)*x[0]**o + ((0.48772710653+0.837221117958j))*x[0] + ((-0.188006702832-0.76532743004j))*x[1]**o + ((-0.480605624234-0.797488947435j))*x[1] + ((-0.690978361033-0.0237099635878j))*x[2]**o + ((0.636835794546+0.343434176474j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.878985063865-0.789037393627j)/(o+1.)+((0.321978638421+0.191583173499j))+((-0.946421898911+0.946043718547j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.116097529953-0.234675077263j)*x[0]**o + ((-0.930716164833+0.534384473041j))*x[0] + ((-0.899050246603+0.538045736785j))*x[1]**o + ((0.73907923177+0.77237740856j))*x[1] + ((0.58882030689-0.461675506089j))*x[2]**o + ((0.805660887572+0.391930659133j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.310229939714+0.0763702306955j)/(o+1.)+((0.307011977254+0.849346270367j))+((-0.116097529953-0.234675077263j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.626728127976+0.809706951278j)*x[0]**o + ((0.641299620426-0.788292667186j))*x[0] + ((0.412899372402+0.933065349394j))*x[1]**o + ((0.176780083905+0.691241411197j))*x[1] + ((0.633256523969-0.214031710582j))*x[2]**o + ((0.688832066019+0.112892215098j))*x[2]
            ref[(1, 2, 1, 2)]=(1.04615589637+0.719033638812j)/(o+1.)+((0.753455885175+0.00792047955411j))+((-0.626728127976+0.809706951278j))*0.5**o
            arg[(1, 2, 2, 0)]=(0.627133841101-0.967011944599j)*x[0]**o + ((0.794154753758+0.8349646339j))*x[0] + ((-0.938697088883+0.245631837938j))*x[1]**o + ((0.151419000615-0.228480646123j))*x[1] + ((-0.703677262102-0.899703845523j))*x[2]**o + ((0.418118647238+0.0273108916962j))*x[2]
            ref[(1, 2, 2, 0)]=(-1.64237435099-0.654072007585j)/(o+1.)+((0.681846200806+0.316897439737j))+((0.627133841101-0.967011944599j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.13320875953-0.73750818389j)*x[0]**o + ((-0.172923985622-0.365507812515j))*x[0] + ((-0.845261794543+0.157518517367j))*x[1]**o + ((-0.961846610501-0.550971602423j))*x[1] + ((0.99887303512+0.105179306398j))*x[2]**o + ((0.0225819118975+0.0304207414675j))*x[2]
            ref[(1, 2, 2, 1)]=(0.153611240577+0.262697823765j)/(o+1.)+((-0.556094342113-0.443029336736j))+((0.13320875953-0.73750818389j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.152798469365-0.49642448927j)*x[0]**o + ((0.175328519088+0.532226352625j))*x[0] + ((0.380191180228-0.276097155516j))*x[1]**o + ((-0.980193269819-0.885793687499j))*x[1] + ((-0.677089444755-0.560029399969j))*x[2]**o + ((0.467346098678+0.857645904282j))*x[2]
            ref[(1, 2, 2, 2)]=(-0.296898264527-0.836126555485j)/(o+1.)+((-0.168759326026+0.252039284704j))+((0.152798469365-0.49642448927j))*0.5**o
            arg[(1, 2, 3, 0)]=(-0.370632982083-0.583474194881j)*x[0]**o + ((0.482013665043-0.397327733554j))*x[0] + ((-0.949958153367+0.024880627955j))*x[1]**o + ((-0.990826366594-0.0987048068115j))*x[1] + ((-0.40176149029-0.764044458815j))*x[2]**o + ((-0.333118730515-0.852431875527j))*x[2]
            ref[(1, 2, 3, 0)]=(-1.35171964366-0.73916383086j)/(o+1.)+((-0.420965716033-0.674232207946j))+((-0.370632982083-0.583474194881j))*0.5**o
            arg[(1, 2, 3, 1)]=(0.779767321782-0.614660476007j)*x[0]**o + ((0.701154469495+0.525181985524j))*x[0] + ((0.0106382590319+0.961395545732j))*x[1]**o + ((0.994718372047-0.326715932978j))*x[1] + ((0.720615642605+0.388790157166j))*x[2]**o + ((0.417486563772+0.416849208479j))*x[2]
            ref[(1, 2, 3, 1)]=(0.731253901637+1.3501857029j)/(o+1.)+((1.05667970266+0.307657630513j))+((0.779767321782-0.614660476007j))*0.5**o
            arg[(1, 2, 3, 2)]=(0.531630560994+0.360446970203j)*x[0]**o + ((0.187015881873+0.48435871704j))*x[0] + ((0.218404230933+0.609404613069j))*x[1]**o + ((-0.293929370483+0.135129843867j))*x[1] + ((-0.119734693481+0.463778828182j))*x[2]**o + ((-0.606299731782-0.690388235513j))*x[2]
            ref[(1, 2, 3, 2)]=(0.0986695374519+1.07318344125j)/(o+1.)+((-0.356606610196-0.0354498373026j))+((0.531630560994+0.360446970203j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.561651303947+0.0872251372241j)*x[0]**o + ((0.891959606809+0.783201637698j))*x[0] + ((-0.451220843908-0.487405567885j))*x[1]**o + ((0.284073372177-0.269497469281j))*x[1] + ((-0.537388262311-0.115836955188j))*x[2]**o + ((-0.803183507861+0.41482912789j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.988609106219-0.603242523072j)/(o+1.)+((0.186424735562+0.464266648153j))+((0.561651303947+0.0872251372241j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.309927734035-0.00780019908516j)*x[0]**o + ((-0.196200991742-0.118685906219j))*x[0] + ((0.692484255635-0.52239544293j))*x[1]**o + ((-0.931639406093-0.00683390352892j))*x[1] + ((-0.215097629198-0.220450549345j))*x[2]**o + ((0.909953557219+0.797032715103j))*x[2]
            ref[(2, 0, 0, 1)]=(0.477386626438-0.742845992275j)/(o+1.)+((-0.108943420308+0.335756452678j))+((0.309927734035-0.00780019908516j))*0.5**o
            arg[(2, 0, 0, 2)]=(-0.873858810813+0.0960142722243j)*x[0]**o + ((-0.836113194311+0.679241783533j))*x[0] + ((-0.776793461678-0.895042437613j))*x[1]**o + ((-0.784355336506+0.620484948046j))*x[1] + ((0.956925404419-0.368718587694j))*x[2]**o + ((0.704430264926-0.0303550973646j))*x[2]
            ref[(2, 0, 0, 2)]=(0.180131942741-1.26376102531j)/(o+1.)+((-0.458019132946+0.634685817107j))+((-0.873858810813+0.0960142722243j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.823344446788+0.742279443648j)*x[0]**o + ((0.779528414925-0.483970265611j))*x[0] + ((0.370710182228-0.102362162937j))*x[1]**o + ((0.334944316124+0.557875010122j))*x[1] + ((0.0292141753931-0.452467737064j))*x[2]**o + ((0.830517202122+0.201109217861j))*x[2]
            ref[(2, 0, 1, 0)]=(0.399924357621-0.554829900001j)/(o+1.)+((0.972494966585+0.137506981186j))+((-0.823344446788+0.742279443648j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.0196994342918+0.182425034043j)*x[0]**o + ((0.577926732354+0.920382959688j))*x[0] + ((0.179437345864-0.241570555751j))*x[1]**o + ((-0.540961225841-0.360903953232j))*x[1] + ((0.0706885638138+0.355816200525j))*x[2]**o + ((-0.771657008601+0.268997731883j))*x[2]
            ref[(2, 0, 1, 1)]=(0.250125909678+0.114245644774j)/(o+1.)+((-0.367345751044+0.414238369169j))+((-0.0196994342918+0.182425034043j))*0.5**o
            arg[(2, 0, 1, 2)]=(0.779581116564-0.923612097834j)*x[0]**o + ((0.505254714168+0.0475286421946j))*x[0] + ((-0.113466713649-0.88757727629j))*x[1]**o + ((-0.366768777126-0.883468970793j))*x[1] + ((-0.0529103579405-0.0520659700996j))*x[2]**o + ((0.334391064859+0.859892607349j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.16637707159-0.939643246389j)/(o+1.)+((0.23643850095+0.0119761393755j))+((0.779581116564-0.923612097834j))*0.5**o
            arg[(2, 0, 2, 0)]=(0.433715677522+0.629715768207j)*x[0]**o + ((0.011401874244+0.864825711399j))*x[0] + ((0.328018307677-0.0999864501265j))*x[1]**o + ((-0.545046067612-0.336234101134j))*x[1] + ((-0.159361791449+0.318733499283j))*x[2]**o + ((-0.592651601582+0.472132344915j))*x[2]
            ref[(2, 0, 2, 0)]=(0.168656516228+0.218747049156j)/(o+1.)+((-0.563147897475+0.500361977589j))+((0.433715677522+0.629715768207j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.610696988845-0.658268066092j)*x[0]**o + ((-0.35427030892+0.933795663792j))*x[0] + ((-0.134785926828-0.521104582578j))*x[1]**o + ((-0.990377003842-0.771820435763j))*x[1] + ((0.727034180883-0.775856641223j))*x[2]**o + ((0.0565699203032-0.0245233201062j))*x[2]
            ref[(2, 0, 2, 1)]=(0.592248254055-1.2969612238j)/(o+1.)+((-0.644038696229+0.0687259539614j))+((-0.610696988845-0.658268066092j))*0.5**o
            arg[(2, 0, 2, 2)]=(0.562260695023-0.8728469781j)*x[0]**o + ((0.934049983332-0.216588944617j))*x[0] + ((0.355920017162-0.877057708017j))*x[1]**o + ((-0.709999614115+0.852616155635j))*x[1] + ((0.853874441986-0.636484615292j))*x[2]**o + ((0.558379204362-0.331259431668j))*x[2]
            ref[(2, 0, 2, 2)]=(1.20979445915-1.51354232331j)/(o+1.)+((0.391214786789+0.152383889675j))+((0.562260695023-0.8728469781j))*0.5**o
            arg[(2, 0, 3, 0)]=(-0.153109476522+0.149732428615j)*x[0]**o + ((-0.867708691843-0.77494950083j))*x[0] + ((-0.441707221766-0.18308837411j))*x[1]**o + ((-0.125729886991+0.483990902657j))*x[1] + ((0.748844714221-0.0164862194079j))*x[2]**o + ((0.593496898862+0.661672792929j))*x[2]
            ref[(2, 0, 3, 0)]=(0.307137492456-0.199574593518j)/(o+1.)+((-0.199970839986+0.185357097378j))+((-0.153109476522+0.149732428615j))*0.5**o
            arg[(2, 0, 3, 1)]=(-0.660754802706-0.463806836722j)*x[0]**o + ((-0.543755556243-0.345690822798j))*x[0] + ((0.843749431257+0.356421325348j))*x[1]**o + ((-0.463828982242+0.101880405378j))*x[1] + ((-0.328211985671-0.957184425042j))*x[2]**o + ((-0.788699306831-0.599277843283j))*x[2]
            ref[(2, 0, 3, 1)]=(0.515537445586-0.600763099694j)/(o+1.)+((-0.898141922657-0.421544130351j))+((-0.660754802706-0.463806836722j))*0.5**o
            arg[(2, 0, 3, 2)]=(0.43614642391-0.646707100003j)*x[0]**o + ((-0.717845683277+0.244086296562j))*x[0] + ((-0.0935602677626-0.444977831599j))*x[1]**o + ((-0.0797942622959+0.463302484763j))*x[1] + ((-0.541910937458+0.624652145532j))*x[2]**o + ((0.189947193532-0.530515645835j))*x[2]
            ref[(2, 0, 3, 2)]=(-0.63547120522+0.179674313934j)/(o+1.)+((-0.30384637602+0.0884365677448j))+((0.43614642391-0.646707100003j))*0.5**o
            arg[(2, 1, 0, 0)]=(0.233410897334-0.698034421864j)*x[0]**o + ((0.784220064615-0.586569650554j))*x[0] + ((-0.488654159538+0.597388949141j))*x[1]**o + ((-0.317148563985+0.598134317335j))*x[1] + ((-0.0736635325882+0.570955054391j))*x[2]**o + ((-0.137279941311-0.104701349059j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.562317692127+1.16834400353j)/(o+1.)+((0.164895779659-0.0465683411393j))+((0.233410897334-0.698034421864j))*0.5**o
            arg[(2, 1, 0, 1)]=(0.457146740563+0.0993304593331j)*x[0]**o + ((0.400672954611-0.716707416281j))*x[0] + ((0.0567376360239-0.311420690073j))*x[1]**o + ((-0.695365316924+0.658605542362j))*x[1] + ((-0.57184556371+0.879447399379j))*x[2]**o + ((0.60036054205+0.859363159663j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.515107927686+0.568026709305j)/(o+1.)+((0.152834089868+0.400630642872j))+((0.457146740563+0.0993304593331j))*0.5**o
            arg[(2, 1, 0, 2)]=(0.581649554002+0.454953235354j)*x[0]**o + ((-0.312794728064-0.988943657523j))*x[0] + ((0.826982691943+0.786086130196j))*x[1]**o + ((-0.828254032947-0.493145590708j))*x[1] + ((0.0964444787748-0.769609825337j))*x[2]**o + ((0.194923213264+0.697855920499j))*x[2]
            ref[(2, 1, 0, 2)]=(0.923427170718+0.0164763048589j)/(o+1.)+((-0.473062773874-0.392116663865j))+((0.581649554002+0.454953235354j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.0871990981468-0.509603715614j)*x[0]**o + ((-0.800237811045+0.167877292372j))*x[0] + ((-0.0366920642128+0.322811674734j))*x[1]**o + ((0.85669966295-0.79981635326j))*x[1] + ((0.114059530146-0.635171886881j))*x[2]**o + ((-0.729569658168+0.10175575115j))*x[2]
            ref[(2, 1, 1, 0)]=(0.0773674659332-0.312360212147j)/(o+1.)+((-0.336553903131-0.265091654869j))+((0.0871990981468-0.509603715614j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.203781552542+0.55008053277j)*x[0]**o + ((0.833756796898-0.0423427764022j))*x[0] + ((-0.430818661171-0.401906719963j))*x[1]**o + ((0.168575993573+0.611683471653j))*x[1] + ((0.255496727076+0.897940934793j))*x[2]**o + ((9.93407436516e-05+0.309876425435j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.175321934095+0.49603421483j)/(o+1.)+((0.501216065607+0.439608560343j))+((-0.203781552542+0.55008053277j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.411708567669+0.137661092758j)*x[0]**o + ((-0.392983254138+0.332507381767j))*x[0] + ((0.806277441503+0.0781993733509j))*x[1]**o + ((0.656654728953+0.962270282818j))*x[1] + ((-0.743871042945-0.722738009885j))*x[2]**o + ((0.585699639788+0.411872029985j))*x[2]
            ref[(2, 1, 1, 2)]=(0.0624063985588-0.644538636534j)/(o+1.)+((0.424685557301+0.853324847285j))+((0.411708567669+0.137661092758j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.902832095865+0.554242916877j)*x[0]**o + ((0.634026121604-0.68669083439j))*x[0] + ((-0.394319405547-0.596600149677j))*x[1]**o + ((-0.663865919097-0.00335182623215j))*x[1] + ((-0.34646506623-0.290772978887j))*x[2]**o + ((-0.292855678942+0.246118997305j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.740784471777-0.887373128564j)/(o+1.)+((-0.161347738217-0.221961831659j))+((-0.902832095865+0.554242916877j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.649651317007-0.389429748601j)*x[0]**o + ((-0.957753339378+0.518037224801j))*x[0] + ((-0.710841981194-0.661329545749j))*x[1]**o + ((-0.644707479646+0.726951472386j))*x[1] + ((-0.10031997782+0.690539103367j))*x[2]**o + ((-0.782706073986-0.775832000141j))*x[2]
            ref[(2, 1, 2, 1)]=(-0.811161959014+0.0292095576178j)/(o+1.)+((-1.1925834465+0.234578348523j))+((-0.649651317007-0.389429748601j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.971573662772-0.675136222565j)*x[0]**o + ((-0.0133739277959+0.981926733841j))*x[0] + ((0.636458790841+0.192837463623j))*x[1]**o + ((-0.523782845749+0.189120977993j))*x[1] + ((-0.333043332624+0.870959847973j))*x[2]**o + ((-0.707712074224-0.345045840678j))*x[2]
            ref[(2, 1, 2, 2)]=(0.303415458216+1.0637973116j)/(o+1.)+((-0.622434423884+0.413000935578j))+((0.971573662772-0.675136222565j))*0.5**o
            arg[(2, 1, 3, 0)]=(0.76630626713-0.0283212298717j)*x[0]**o + ((-0.231538864655+0.350487265727j))*x[0] + ((0.640869971474+0.362361861053j))*x[1]**o + ((0.113855541927+0.22245911933j))*x[1] + ((-0.825234677727-0.398218239781j))*x[2]**o + ((-0.991030906684-0.725612754048j))*x[2]
            ref[(2, 1, 3, 0)]=(-0.184364706253-0.0358563787276j)/(o+1.)+((-0.554357114706-0.0763331844956j))+((0.76630626713-0.0283212298717j))*0.5**o
            arg[(2, 1, 3, 1)]=(0.166779879093+0.42594499681j)*x[0]**o + ((0.352146914417-0.0584208501199j))*x[0] + ((0.936675871907-0.607393563521j))*x[1]**o + ((-0.0270521109645+0.109342083869j))*x[1] + ((0.475858292438+0.524008369416j))*x[2]**o + ((-0.856375673373+0.647753699415j))*x[2]
            ref[(2, 1, 3, 1)]=(1.41253416435-0.0833851941045j)/(o+1.)+((-0.26564043496+0.349337466582j))+((0.166779879093+0.42594499681j))*0.5**o
            arg[(2, 1, 3, 2)]=(0.0985594921893+0.341894544738j)*x[0]**o + ((-0.430592495961+0.575176124892j))*x[0] + ((0.150805215068+0.292336702294j))*x[1]**o + ((-0.67944170489-0.147426308718j))*x[1] + ((0.187310341619+0.935637290051j))*x[2]**o + ((-0.0687873395239-0.2132768179j))*x[2]
            ref[(2, 1, 3, 2)]=(0.338115556687+1.22797399234j)/(o+1.)+((-0.589410770187+0.107236499137j))+((0.0985594921893+0.341894544738j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.0750041778879+0.399041466119j)*x[0]**o + ((0.766987936221-0.844218119427j))*x[0] + ((-0.483529378185+0.397535592173j))*x[1]**o + ((0.891847589268+0.067684641763j))*x[1] + ((0.11189113589-0.171785909685j))*x[2]**o + ((-0.14504859266-0.856181212662j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.371638242295+0.225749682487j)/(o+1.)+((0.756893466414-0.816357345163j))+((-0.0750041778879+0.399041466119j))*0.5**o
            arg[(2, 2, 0, 1)]=(-0.757431431866+0.768751409411j)*x[0]**o + ((-0.192204728003+0.160273052107j))*x[0] + ((0.261443186246+0.0633988229034j))*x[1]**o + ((0.319491607411+0.473723381707j))*x[1] + ((-0.0856336913483-0.764987016317j))*x[2]**o + ((-0.530768919881-0.0812892025155j))*x[2]
            ref[(2, 2, 0, 1)]=(0.175809494898-0.701588193414j)/(o+1.)+((-0.201741020236+0.276353615649j))+((-0.757431431866+0.768751409411j))*0.5**o
            arg[(2, 2, 0, 2)]=(-0.754235457167-0.183464182459j)*x[0]**o + ((0.397571843304-0.246025047198j))*x[0] + ((0.444875936847-0.959648640841j))*x[1]**o + ((-0.743111952993-0.659575338616j))*x[1] + ((0.107327290977+0.0159845207309j))*x[2]**o + ((0.610837579727-0.388051009924j))*x[2]
            ref[(2, 2, 0, 2)]=(0.552203227824-0.94366412011j)/(o+1.)+((0.132648735019-0.646825697869j))+((-0.754235457167-0.183464182459j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.134222585534+0.110762160941j)*x[0]**o + ((0.551653342258-0.11263677249j))*x[0] + ((0.667042007406-0.879499411107j))*x[1]**o + ((0.100528603834-0.0657333520113j))*x[1] + ((0.959661120907-0.47476140521j))*x[2]**o + ((0.727247909922-0.390548317188j))*x[2]
            ref[(2, 2, 1, 0)]=(1.62670312831-1.35426081632j)/(o+1.)+((0.689714928007-0.284459220845j))+((0.134222585534+0.110762160941j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.874711404594-0.0960150936686j)*x[0]**o + ((0.73251573144-0.754078973645j))*x[0] + ((-0.813056343331+0.102971868199j))*x[1]**o + ((-0.178048903831+0.561964797979j))*x[1] + ((0.154973031534-0.334654060337j))*x[2]**o + ((-0.734862551124-0.749152223102j))*x[2]
            ref[(2, 2, 1, 1)]=(-0.658083311797-0.231682192138j)/(o+1.)+((-0.0901978617573-0.470633199384j))+((0.874711404594-0.0960150936686j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.533966379901+0.376600012896j)*x[0]**o + ((-0.63751112883+0.532847914585j))*x[0] + ((-0.378242827216-0.255400103654j))*x[1]**o + ((0.870429715849-0.344214589004j))*x[1] + ((0.896682319748+0.293668768087j))*x[2]**o + ((0.753193166472+0.312790781653j))*x[2]
            ref[(2, 2, 1, 2)]=(0.518439492532+0.0382686644331j)/(o+1.)+((0.493055876746+0.250712053617j))+((-0.533966379901+0.376600012896j))*0.5**o
            arg[(2, 2, 2, 0)]=(-0.86516362098+0.672086883205j)*x[0]**o + ((0.303698910859+0.688271404967j))*x[0] + ((0.918847429946-0.831824863244j))*x[1]**o + ((0.280540595433-0.729065147713j))*x[1] + ((0.282748675803-0.266204865203j))*x[2]**o + ((0.548534912711-0.570865316735j))*x[2]
            ref[(2, 2, 2, 0)]=(1.20159610575-1.09802972845j)/(o+1.)+((0.566387209502-0.305829529741j))+((-0.86516362098+0.672086883205j))*0.5**o
            arg[(2, 2, 2, 1)]=(-0.516558219009+0.455176934801j)*x[0]**o + ((0.691234878302+0.961455461015j))*x[0] + ((0.420452540083+0.969918216375j))*x[1]**o + ((-0.26576127624-0.144457222899j))*x[1] + ((-0.262639029391+0.716335800468j))*x[2]**o + ((-0.983883271253+0.132835065057j))*x[2]
            ref[(2, 2, 2, 1)]=(0.157813510693+1.68625401684j)/(o+1.)+((-0.279204834595+0.474916651587j))+((-0.516558219009+0.455176934801j))*0.5**o
            arg[(2, 2, 2, 2)]=(0.761526152228-0.433263321475j)*x[0]**o + ((-0.732523753591-0.900877819099j))*x[0] + ((0.330623307907+0.55503885651j))*x[1]**o + ((-0.148167686808+0.141806627319j))*x[1] + ((-0.922534784482-0.0253116147844j))*x[2]**o + ((0.83030638171+0.0914366642154j))*x[2]
            ref[(2, 2, 2, 2)]=(-0.591911476576+0.529727241725j)/(o+1.)+((-0.0251925293439-0.333817263782j))+((0.761526152228-0.433263321475j))*0.5**o
            arg[(2, 2, 3, 0)]=(0.486047430731+0.459154727846j)*x[0]**o + ((0.741367336633-0.0849782106433j))*x[0] + ((0.103014355722-0.512266831209j))*x[1]**o + ((-0.190575807018-0.525206522779j))*x[1] + ((0.803259995779+0.665324149214j))*x[2]**o + ((-0.387437374315+0.81350448261j))*x[2]
            ref[(2, 2, 3, 0)]=(0.906274351501+0.153057318005j)/(o+1.)+((0.0816770776501+0.101659874594j))+((0.486047430731+0.459154727846j))*0.5**o
            arg[(2, 2, 3, 1)]=(0.971647244836-0.9628804256j)*x[0]**o + ((0.828078019993-0.304011568212j))*x[0] + ((0.426076009874+0.341770933987j))*x[1]**o + ((-0.00791572605164-0.954111262378j))*x[1] + ((-0.437560751885-0.561306390089j))*x[2]**o + ((-0.848615364226-0.862059673378j))*x[2]
            ref[(2, 2, 3, 1)]=(-0.0114847420109-0.219535456103j)/(o+1.)+((-0.0142265351425-1.06009125198j))+((0.971647244836-0.9628804256j))*0.5**o
            arg[(2, 2, 3, 2)]=(-0.521761200145+0.169961794522j)*x[0]**o + ((0.697627097845-0.0635837527057j))*x[0] + ((0.822833961632-0.692960484745j))*x[1]**o + ((0.725919807773-0.15569277375j))*x[1] + ((-0.447245221255-0.138579250066j))*x[2]**o + ((0.261770054797+0.432957992338j))*x[2]
            ref[(2, 2, 3, 2)]=(0.375588740377-0.831539734812j)/(o+1.)+((0.842658480208+0.106840732941j))+((-0.521761200145+0.169961794522j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.0822250357497-0.586804749633j)*x[0]**o + ((0.604242039584-0.96442340273j))*x[0] + ((-0.0310947771699+0.513758673485j))*x[1]**o + ((-0.389587840558+0.178568215239j))*x[1]
            ref=(-0.0310947771699+0.513758673485j)/(o+1.)+((0.107327099513-0.392927593745j))+((-0.0822250357497-0.586804749633j))*0.5**o
        else:
            arg=(0.897724970585+0.906154923684j)*x[0]**o + ((0.326218410353-0.401635640389j))*x[0] + ((0.527174171691-0.152547787567j))*x[1]**o + ((0.739603977264-0.0378272798472j))*x[1] + ((0.300115158962+0.290082210883j))*x[2]**o + ((-0.0871607386749-0.238536773777j))*x[2]
            ref=(0.827289330653+0.137534423316j)/(o+1.)+((0.489330824471-0.338999847006j))+((0.897724970585+0.906154923684j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.47187442487-0.89326977052j)*x[0]**o + ((0.657346001313+0.963150425771j))*x[0] + ((-0.877598570408+0.0185932673993j))*x[1]**o + ((0.046391952173-0.890517350198j))*x[1]
            ref[(0,)]=(-0.877598570408+0.0185932673993j)/(o+1.)+((0.351868976743+0.0363165377865j))+((-0.47187442487-0.89326977052j))*0.5**o
            arg[(1,)]=(-0.212875944731+0.555663082503j)*x[0]**o + ((-0.086475854813-0.139291399689j))*x[0] + ((0.119455574689-0.419046151132j))*x[1]**o + ((-0.527592221122+0.131821272867j))*x[1]
            ref[(1,)]=(0.119455574689-0.419046151132j)/(o+1.)+((-0.307034037968-0.00373506341124j))+((-0.212875944731+0.555663082503j))*0.5**o
        else:
            arg[(0,)]=(-0.416693099362-0.23168379708j)*x[0]**o + ((-0.0773119785567-0.026045353574j))*x[0] + ((-0.871927293532-0.198053759055j))*x[1]**o + ((-0.257327627403+0.0694252728561j))*x[1] + ((-0.826086602589-0.241750478897j))*x[2]**o + ((-0.481775623986-0.320181707987j))*x[2]
            ref[(0,)]=(-1.69801389612-0.439804237952j)/(o+1.)+((-0.408207614973-0.138400894353j))+((-0.416693099362-0.23168379708j))*0.5**o
            arg[(1,)]=(-0.764320332248+0.00304412804137j)*x[0]**o + ((-0.977356063719+0.469275176132j))*x[0] + ((0.711897027698-0.909580485097j))*x[1]**o + ((0.877875891741+0.450618133753j))*x[1] + ((-0.00555595556697+0.318897829777j))*x[2]**o + ((-0.691524765989+0.0711899178888j))*x[2]
            ref[(1,)]=(0.706341072131-0.59068265532j)/(o+1.)+((-0.395502468984+0.495541613887j))+((-0.764320332248+0.00304412804137j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.988375340963+0.0151978676726j)*x[0]**o + ((0.939250128999-0.930435492834j))*x[0] + ((0.918674249922+0.246217233824j))*x[1]**o + ((0.332917864738-0.0788785973668j))*x[1]
            ref[(0, 0)]=(0.918674249922+0.246217233824j)/(o+1.)+((0.636083996869-0.5046570451j))+((-0.988375340963+0.0151978676726j))*0.5**o
            arg[(0, 1)]=(-0.983458376914+0.0270382742646j)*x[0]**o + ((0.955042585649+0.658492292678j))*x[0] + ((0.627142676811-0.874433135882j))*x[1]**o + ((0.088513572347+0.327036505977j))*x[1]
            ref[(0, 1)]=(0.627142676811-0.874433135882j)/(o+1.)+((0.521778078998+0.492764399327j))+((-0.983458376914+0.0270382742646j))*0.5**o
            arg[(0, 2)]=(0.604476097961-0.993170539216j)*x[0]**o + ((0.642907802012-0.180726232361j))*x[0] + ((-0.72234505375+0.947982580188j))*x[1]**o + ((-0.0908449119696-0.529336420942j))*x[1]
            ref[(0, 2)]=(-0.72234505375+0.947982580188j)/(o+1.)+((0.276031445021-0.355031326651j))+((0.604476097961-0.993170539216j))*0.5**o
            arg[(0, 3)]=(0.869705291427+0.483126750923j)*x[0]**o + ((0.5758790703+0.998520592015j))*x[0] + ((0.242231047489+0.491005892753j))*x[1]**o + ((-0.282770566546+0.0745979666928j))*x[1]
            ref[(0, 3)]=(0.242231047489+0.491005892753j)/(o+1.)+((0.146554251877+0.536559279354j))+((0.869705291427+0.483126750923j))*0.5**o
            arg[(1, 0)]=(-0.950094725646-0.936306260251j)*x[0]**o + ((-0.075016929391+0.840712712495j))*x[0] + ((-0.558146404022-0.342287476454j))*x[1]**o + ((0.100778412849-0.799893449946j))*x[1]
            ref[(1, 0)]=(-0.558146404022-0.342287476454j)/(o+1.)+((0.0128807417292+0.0204096312747j))+((-0.950094725646-0.936306260251j))*0.5**o
            arg[(1, 1)]=(0.175797825427-0.732205035996j)*x[0]**o + ((0.790186837825-0.850380231395j))*x[0] + ((-0.710404512054+0.780479483551j))*x[1]**o + ((-0.54715518615+0.843716142862j))*x[1]
            ref[(1, 1)]=(-0.710404512054+0.780479483551j)/(o+1.)+((0.121515825837-0.00333204426667j))+((0.175797825427-0.732205035996j))*0.5**o
            arg[(1, 2)]=(0.55927631645+0.319494778374j)*x[0]**o + ((-0.876241019345-0.173202541702j))*x[0] + ((-0.966493599387+0.125845927215j))*x[1]**o + ((0.824425211262-0.0702572319897j))*x[1]
            ref[(1, 2)]=(-0.966493599387+0.125845927215j)/(o+1.)+((-0.0259079040416-0.121729886846j))+((0.55927631645+0.319494778374j))*0.5**o
            arg[(1, 3)]=(-0.241142338037+0.864281623095j)*x[0]**o + ((-0.803748092392-0.836723211686j))*x[0] + ((0.0578011997365-0.457247329113j))*x[1]**o + ((0.830945797698+0.361189788112j))*x[1]
            ref[(1, 3)]=(0.0578011997365-0.457247329113j)/(o+1.)+((0.0135988526529-0.237766711787j))+((-0.241142338037+0.864281623095j))*0.5**o
            arg[(2, 0)]=(-0.546840147907+0.0883431469067j)*x[0]**o + ((-0.828233061238+0.47013330772j))*x[0] + ((0.533324400536-0.290280587769j))*x[1]**o + ((-0.892599102885+0.823935143039j))*x[1]
            ref[(2, 0)]=(0.533324400536-0.290280587769j)/(o+1.)+((-0.860416082061+0.64703422538j))+((-0.546840147907+0.0883431469067j))*0.5**o
            arg[(2, 1)]=(0.516684422103+0.529048747833j)*x[0]**o + ((0.298945812244-0.730804529857j))*x[0] + ((-0.335705103719-0.703659848492j))*x[1]**o + ((0.327554782498+0.726662524856j))*x[1]
            ref[(2, 1)]=(-0.335705103719-0.703659848492j)/(o+1.)+((0.313250297371-0.00207100250089j))+((0.516684422103+0.529048747833j))*0.5**o
            arg[(2, 2)]=(0.316436572073+0.401022997364j)*x[0]**o + ((0.517216505654+0.320395647731j))*x[0] + ((-0.239472435598-0.10659864428j))*x[1]**o + ((-0.00848075397044+0.220716735349j))*x[1]
            ref[(2, 2)]=(-0.239472435598-0.10659864428j)/(o+1.)+((0.254367875842+0.27055619154j))+((0.316436572073+0.401022997364j))*0.5**o
            arg[(2, 3)]=(0.182303167002+0.0512485679346j)*x[0]**o + ((0.71911148175-0.343636867188j))*x[0] + ((-0.511945797596-0.0675845244098j))*x[1]**o + ((0.802840804364+0.661204465099j))*x[1]
            ref[(2, 3)]=(-0.511945797596-0.0675845244098j)/(o+1.)+((0.760976143057+0.158783798955j))+((0.182303167002+0.0512485679346j))*0.5**o
            arg[(3, 0)]=(-0.286017629227+0.248038201973j)*x[0]**o + ((0.321263502521+0.845753182185j))*x[0] + ((0.110713841804-0.468868727978j))*x[1]**o + ((0.115414964455-0.200879157619j))*x[1]
            ref[(3, 0)]=(0.110713841804-0.468868727978j)/(o+1.)+((0.218339233488+0.322437012283j))+((-0.286017629227+0.248038201973j))*0.5**o
            arg[(3, 1)]=(0.135026669716+0.0692369809421j)*x[0]**o + ((-0.0354514416856+0.199993866059j))*x[0] + ((-0.888408610672-0.134081342566j))*x[1]**o + ((0.784768463113+0.543863568478j))*x[1]
            ref[(3, 1)]=(-0.888408610672-0.134081342566j)/(o+1.)+((0.374658510713+0.371928717268j))+((0.135026669716+0.0692369809421j))*0.5**o
            arg[(3, 2)]=(-0.213993391144-0.535860291223j)*x[0]**o + ((-0.49407090303-0.11542253836j))*x[0] + ((-0.987355109863+0.988194377415j))*x[1]**o + ((0.35743936649-0.970136487883j))*x[1]
            ref[(3, 2)]=(-0.987355109863+0.988194377415j)/(o+1.)+((-0.06831576827-0.542779513121j))+((-0.213993391144-0.535860291223j))*0.5**o
            arg[(3, 3)]=(0.29017487382+0.449911831437j)*x[0]**o + ((-0.182238987823+0.287545664025j))*x[0] + ((-0.447842591383+0.555159869937j))*x[1]**o + ((0.527583270588-0.852681117135j))*x[1]
            ref[(3, 3)]=(-0.447842591383+0.555159869937j)/(o+1.)+((0.172672141382-0.282567726555j))+((0.29017487382+0.449911831437j))*0.5**o
        else:
            arg[(0, 0)]=(0.719378855855+0.793605426877j)*x[0]**o + ((-0.338553191589+0.0642078703708j))*x[0] + ((0.593973493228+0.907930440366j))*x[1]**o + ((0.253263221414+0.454290395165j))*x[1] + ((-0.204613426106+0.548432747085j))*x[2]**o + ((0.587069818286+0.531330394j))*x[2]
            ref[(0, 0)]=(0.389360067122+1.45636318745j)/(o+1.)+((0.250889924055+0.524914329768j))+((0.719378855855+0.793605426877j))*0.5**o
            arg[(0, 1)]=(0.934540669241+0.571531928269j)*x[0]**o + ((0.928489736074+0.431181835028j))*x[0] + ((-0.0616298856247+0.715103072364j))*x[1]**o + ((-0.510017210018+0.354211980182j))*x[1] + ((0.170257665939+0.520819677919j))*x[2]**o + ((-0.894430238239-0.954444185706j))*x[2]
            ref[(0, 1)]=(0.108627780314+1.23592275028j)/(o+1.)+((-0.237978856091-0.0845251852482j))+((0.934540669241+0.571531928269j))*0.5**o
            arg[(0, 2)]=(0.419336228498+0.656565465271j)*x[0]**o + ((0.904842282455+0.362383260536j))*x[0] + ((0.608050149214+0.746724793466j))*x[1]**o + ((0.906035872432+0.0616521140997j))*x[1] + ((-0.860473149748+0.400049720475j))*x[2]**o + ((-0.281481129737+0.152265854344j))*x[2]
            ref[(0, 2)]=(-0.252423000534+1.14677451394j)/(o+1.)+((0.764698512575+0.28815061449j))+((0.419336228498+0.656565465271j))*0.5**o
            arg[(0, 3)]=(-0.420684767532+0.12270927372j)*x[0]**o + ((0.418875712862-0.359128586825j))*x[0] + ((-0.532416957963+0.033057990674j))*x[1]**o + ((0.760943331203-0.984796203382j))*x[1] + ((-0.927902153872-0.874069613752j))*x[2]**o + ((-0.0169551946813-0.397903150286j))*x[2]
            ref[(0, 3)]=(-1.46031911183-0.841011623078j)/(o+1.)+((0.581431924692-0.870913970246j))+((-0.420684767532+0.12270927372j))*0.5**o
            arg[(1, 0)]=(0.349171565567+0.161433747014j)*x[0]**o + ((0.417502255628-0.320201791914j))*x[0] + ((0.321214369439+0.419629415175j))*x[1]**o + ((0.453648652561+0.720952113681j))*x[1] + ((0.828265683173+0.211668573309j))*x[2]**o + ((0.795757751424-0.491241766719j))*x[2]
            ref[(1, 0)]=(1.14948005261+0.631297988484j)/(o+1.)+((0.833454329807-0.0452457224762j))+((0.349171565567+0.161433747014j))*0.5**o
            arg[(1, 1)]=(0.931106870085-0.378791613973j)*x[0]**o + ((0.239891346897+0.0834849180001j))*x[0] + ((0.594522761435+0.729239264282j))*x[1]**o + ((0.157886325858-0.232322244264j))*x[1] + ((0.591561549048+0.231994401714j))*x[2]**o + ((-0.345856144701-0.574237245058j))*x[2]
            ref[(1, 1)]=(1.18608431048+0.961233665996j)/(o+1.)+((0.0259607640273-0.361537285661j))+((0.931106870085-0.378791613973j))*0.5**o
            arg[(1, 2)]=(-0.324955966624+0.585940284221j)*x[0]**o + ((-0.512447995899-0.843525638642j))*x[0] + ((-0.338487277876-0.957068171092j))*x[1]**o + ((0.856680986862+0.517517667412j))*x[1] + ((0.679875414517-0.785888158424j))*x[2]**o + ((0.327378018137-0.908560123593j))*x[2]
            ref[(1, 2)]=(0.341388136641-1.74295632952j)/(o+1.)+((0.33580550455-0.617284047412j))+((-0.324955966624+0.585940284221j))*0.5**o
            arg[(1, 3)]=(0.630760595801+0.661431569549j)*x[0]**o + ((-0.946288157384-0.759481070659j))*x[0] + ((0.127584313782-0.132413168974j))*x[1]**o + ((0.407264258939+0.979934817589j))*x[1] + ((-0.574290179894+0.440624523837j))*x[2]**o + ((0.370639708237-0.733227685015j))*x[2]
            ref[(1, 3)]=(-0.446705866112+0.308211354863j)/(o+1.)+((-0.0841920951042-0.256386969042j))+((0.630760595801+0.661431569549j))*0.5**o
            arg[(2, 0)]=(-0.359185962255-0.00803577100554j)*x[0]**o + ((0.306253772382-0.860912344401j))*x[0] + ((-0.310897522398-0.929020657803j))*x[1]**o + ((-0.7067614513+0.0161119035131j))*x[1] + ((-0.0826324262684-0.731627340174j))*x[2]**o + ((0.234040328167+0.617351535647j))*x[2]
            ref[(2, 0)]=(-0.393529948666-1.66064799798j)/(o+1.)+((-0.0832336753755-0.11372445262j))+((-0.359185962255-0.00803577100554j))*0.5**o
            arg[(2, 1)]=(-0.301126859323-0.765063442857j)*x[0]**o + ((0.542026268294-0.235090966254j))*x[0] + ((0.0535803067576-0.312181661002j))*x[1]**o + ((-0.975970275968+0.410956354778j))*x[1] + ((0.812216764192-0.687201608017j))*x[2]**o + ((-0.631285460939+0.811833991758j))*x[2]
            ref[(2, 1)]=(0.86579707095-0.999383269019j)/(o+1.)+((-0.532614734306+0.493849690141j))+((-0.301126859323-0.765063442857j))*0.5**o
            arg[(2, 2)]=(0.284736349756-0.880780217414j)*x[0]**o + ((0.620219708232-0.759090151983j))*x[0] + ((0.110380428193-0.649047822749j))*x[1]**o + ((-0.614611071144-0.712302079311j))*x[1] + ((-0.531723258165-0.239475281082j))*x[2]**o + ((0.509470393082+0.609681685455j))*x[2]
            ref[(2, 2)]=(-0.421342829972-0.888523103831j)/(o+1.)+((0.257539515086-0.430855272919j))+((0.284736349756-0.880780217414j))*0.5**o
            arg[(2, 3)]=(0.951677110004+0.561134695259j)*x[0]**o + ((0.22499362018-0.788064509162j))*x[0] + ((0.507446296954+0.989371878606j))*x[1]**o + ((0.0620702904651+0.338237736528j))*x[1] + ((0.521218124789+0.559844262507j))*x[2]**o + ((-0.0644080920859-0.0294753746607j))*x[2]
            ref[(2, 3)]=(1.02866442174+1.54921614111j)/(o+1.)+((0.111327909279-0.239651073647j))+((0.951677110004+0.561134695259j))*0.5**o
            arg[(3, 0)]=(-0.286225910165+0.784846193399j)*x[0]**o + ((0.201337119114+0.927871787829j))*x[0] + ((0.292795862624+0.255223457324j))*x[1]**o + ((0.323027867638-0.447875282302j))*x[1] + ((0.249517556353+0.0192643993045j))*x[2]**o + ((-0.641162501181-0.573443541878j))*x[2]
            ref[(3, 0)]=(0.542313418977+0.274487856629j)/(o+1.)+((-0.0583987572141-0.0467235181754j))+((-0.286225910165+0.784846193399j))*0.5**o
            arg[(3, 1)]=(-0.488881140071-0.568894899825j)*x[0]**o + ((0.557410403956-0.690434772491j))*x[0] + ((-0.858454586836+0.544928138115j))*x[1]**o + ((0.393079430344+0.612483711414j))*x[1] + ((-0.385861519809-0.250362503959j))*x[2]**o + ((-0.0331693606663+0.653048734433j))*x[2]
            ref[(3, 1)]=(-1.24431610664+0.294565634157j)/(o+1.)+((0.458660236817+0.287548836678j))+((-0.488881140071-0.568894899825j))*0.5**o
            arg[(3, 2)]=(-0.0936507247459+0.556262820438j)*x[0]**o + ((0.233144660316+0.465773670016j))*x[0] + ((0.909582017677-0.281174667931j))*x[1]**o + ((0.534009602235+0.535568392161j))*x[1] + ((0.08550326012-0.766185107327j))*x[2]**o + ((-0.458354104312-0.897115050473j))*x[2]
            ref[(3, 2)]=(0.995085277797-1.04735977526j)/(o+1.)+((0.15440007912+0.0521135058515j))+((-0.0936507247459+0.556262820438j))*0.5**o
            arg[(3, 3)]=(0.14833474558+0.676197709048j)*x[0]**o + ((-0.750597660379-0.845081172513j))*x[0] + ((0.157254919569+0.776506946852j))*x[1]**o + ((-0.746016481389-0.319530019177j))*x[1] + ((-0.102095736853+0.180707082677j))*x[2]**o + ((0.778000513122-0.220679154162j))*x[2]
            ref[(3, 3)]=(0.0551591827164+0.957214029529j)/(o+1.)+((-0.359306814323-0.692645172926j))+((0.14833474558+0.676197709048j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref=numpy.zeros((3, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.2866145325+0.576677379889j)*x[0]**o + ((0.789512224644-0.44149387802j))*x[0] + ((0.33150156345-0.742765956995j))*x[1]**o + ((0.748645315706-0.0700901164893j))*x[1]
            ref[(0, 0, 0)]=(0.33150156345-0.742765956995j)/(o+1.)+((0.769078770175-0.255791997255j))+((0.2866145325+0.576677379889j))*0.5**o
            arg[(0, 0, 1)]=(-0.400233173308-0.915930911897j)*x[0]**o + ((0.11695303401+0.543113749317j))*x[0] + ((0.400587605574+0.979548581962j))*x[1]**o + ((-0.893297484763+0.340114092539j))*x[1]
            ref[(0, 0, 1)]=(0.400587605574+0.979548581962j)/(o+1.)+((-0.388172225376+0.441613920928j))+((-0.400233173308-0.915930911897j))*0.5**o
            arg[(0, 0, 2)]=(-0.766962877106+0.342549048988j)*x[0]**o + ((-0.592931879808+0.699455023705j))*x[0] + ((-0.73620276765-0.79493918263j))*x[1]**o + ((0.403999563806+0.0784556761026j))*x[1]
            ref[(0, 0, 2)]=(-0.73620276765-0.79493918263j)/(o+1.)+((-0.094466158001+0.388955349904j))+((-0.766962877106+0.342549048988j))*0.5**o
            arg[(0, 0, 3)]=(-0.968224121536-0.862253050738j)*x[0]**o + ((-0.728336417816+0.321304331583j))*x[0] + ((-0.494376714039-0.916447994761j))*x[1]**o + ((-0.544111055027+0.791597276368j))*x[1]
            ref[(0, 0, 3)]=(-0.494376714039-0.916447994761j)/(o+1.)+((-0.636223736422+0.556450803976j))+((-0.968224121536-0.862253050738j))*0.5**o
            arg[(0, 1, 0)]=(0.9549384896+0.733277042978j)*x[0]**o + ((-0.764768727235+0.524657726553j))*x[0] + ((0.903130256992+0.732407570879j))*x[1]**o + ((-0.538836917731+0.0712430401061j))*x[1]
            ref[(0, 1, 0)]=(0.903130256992+0.732407570879j)/(o+1.)+((-0.651802822483+0.29795038333j))+((0.9549384896+0.733277042978j))*0.5**o
            arg[(0, 1, 1)]=(-0.963445144027+0.39371162376j)*x[0]**o + ((0.297787512531-0.172256346014j))*x[0] + ((-0.0627251666411+0.659523676509j))*x[1]**o + ((-0.525445310511-0.722367876674j))*x[1]
            ref[(0, 1, 1)]=(-0.0627251666411+0.659523676509j)/(o+1.)+((-0.11382889899-0.447312111344j))+((-0.963445144027+0.39371162376j))*0.5**o
            arg[(0, 1, 2)]=(-0.817596497694+0.829267309924j)*x[0]**o + ((0.46255582114-0.105618137574j))*x[0] + ((0.174159235216+0.807695037834j))*x[1]**o + ((-0.547968777235+0.827973758887j))*x[1]
            ref[(0, 1, 2)]=(0.174159235216+0.807695037834j)/(o+1.)+((-0.0427064780476+0.361177810656j))+((-0.817596497694+0.829267309924j))*0.5**o
            arg[(0, 1, 3)]=(-0.292196190454-0.162743337397j)*x[0]**o + ((-0.469701636277-0.333654016804j))*x[0] + ((0.723027446981+0.661481536197j))*x[1]**o + ((-0.486902159918+0.231972206676j))*x[1]
            ref[(0, 1, 3)]=(0.723027446981+0.661481536197j)/(o+1.)+((-0.478301898098-0.0508409050644j))+((-0.292196190454-0.162743337397j))*0.5**o
            arg[(0, 2, 0)]=(0.945452496946-0.434439698919j)*x[0]**o + ((0.646860612598+0.807329905742j))*x[0] + ((-0.810926409691-0.53752043452j))*x[1]**o + ((0.642042197296-0.131728298271j))*x[1]
            ref[(0, 2, 0)]=(-0.810926409691-0.53752043452j)/(o+1.)+((0.644451404947+0.337800803735j))+((0.945452496946-0.434439698919j))*0.5**o
            arg[(0, 2, 1)]=(0.281899833156+0.255984847774j)*x[0]**o + ((-0.604597387303-0.131169369123j))*x[0] + ((0.682626081371+0.364974158853j))*x[1]**o + ((-0.544974957566+0.678066464399j))*x[1]
            ref[(0, 2, 1)]=(0.682626081371+0.364974158853j)/(o+1.)+((-0.574786172434+0.273448547638j))+((0.281899833156+0.255984847774j))*0.5**o
            arg[(0, 2, 2)]=(-0.250458025886+0.926063097875j)*x[0]**o + ((0.546383046847-0.22021632165j))*x[0] + ((-0.769722572894-0.0514156859549j))*x[1]**o + ((-0.937215378733+0.376423623242j))*x[1]
            ref[(0, 2, 2)]=(-0.769722572894-0.0514156859549j)/(o+1.)+((-0.195416165943+0.0781036507963j))+((-0.250458025886+0.926063097875j))*0.5**o
            arg[(0, 2, 3)]=(-0.997805264863+0.516657528832j)*x[0]**o + ((0.146525574527+0.868017817334j))*x[0] + ((0.404023812703-0.432922049576j))*x[1]**o + ((0.926565735201+0.790041256112j))*x[1]
            ref[(0, 2, 3)]=(0.404023812703-0.432922049576j)/(o+1.)+((0.536545654864+0.829029536723j))+((-0.997805264863+0.516657528832j))*0.5**o
            arg[(1, 0, 0)]=(0.999578242754+0.665125086519j)*x[0]**o + ((0.852099025131-0.883573033462j))*x[0] + ((-0.618145383045+0.537124299932j))*x[1]**o + ((-0.20661774898-0.0877786531651j))*x[1]
            ref[(1, 0, 0)]=(-0.618145383045+0.537124299932j)/(o+1.)+((0.322740638076-0.485675843314j))+((0.999578242754+0.665125086519j))*0.5**o
            arg[(1, 0, 1)]=(0.429939800672-0.72087409535j)*x[0]**o + ((-0.938476045062+0.412944190953j))*x[0] + ((-0.983960589262-0.642688631205j))*x[1]**o + ((-0.883460740073+0.857066284537j))*x[1]
            ref[(1, 0, 1)]=(-0.983960589262-0.642688631205j)/(o+1.)+((-0.910968392567+0.635005237745j))+((0.429939800672-0.72087409535j))*0.5**o
            arg[(1, 0, 2)]=(-0.878512528237-0.37301236722j)*x[0]**o + ((0.72878971609-0.311181745936j))*x[0] + ((0.950982811105-0.0413290714501j))*x[1]**o + ((-0.499363157965+0.822090493404j))*x[1]
            ref[(1, 0, 2)]=(0.950982811105-0.0413290714501j)/(o+1.)+((0.114713279063+0.255454373734j))+((-0.878512528237-0.37301236722j))*0.5**o
            arg[(1, 0, 3)]=(-0.471287339155-0.0680945100953j)*x[0]**o + ((-0.27377180214-0.107143894198j))*x[0] + ((-0.849605284459-0.751702502522j))*x[1]**o + ((0.623936539934-0.151611514825j))*x[1]
            ref[(1, 0, 3)]=(-0.849605284459-0.751702502522j)/(o+1.)+((0.175082368897-0.129377704511j))+((-0.471287339155-0.0680945100953j))*0.5**o
            arg[(1, 1, 0)]=(-0.359154492038+0.0953372599009j)*x[0]**o + ((-0.27021091205+0.948189132865j))*x[0] + ((0.319470811414+0.347582532933j))*x[1]**o + ((-0.689425284944+0.991157354285j))*x[1]
            ref[(1, 1, 0)]=(0.319470811414+0.347582532933j)/(o+1.)+((-0.479818098497+0.969673243575j))+((-0.359154492038+0.0953372599009j))*0.5**o
            arg[(1, 1, 1)]=(0.629567661664+0.266751841421j)*x[0]**o + ((-0.332841609012+0.598670601346j))*x[0] + ((0.931064640697-0.976774254428j))*x[1]**o + ((-0.556609853982-0.113097114088j))*x[1]
            ref[(1, 1, 1)]=(0.931064640697-0.976774254428j)/(o+1.)+((-0.444725731497+0.242786743629j))+((0.629567661664+0.266751841421j))*0.5**o
            arg[(1, 1, 2)]=(-0.473903965508+0.97870516927j)*x[0]**o + ((0.983523391116-0.503229895425j))*x[0] + ((-0.148406404022+0.00960457891273j))*x[1]**o + ((-0.589596166845+0.859763577723j))*x[1]
            ref[(1, 1, 2)]=(-0.148406404022+0.00960457891273j)/(o+1.)+((0.196963612135+0.178266841149j))+((-0.473903965508+0.97870516927j))*0.5**o
            arg[(1, 1, 3)]=(0.22149061708-0.199983582856j)*x[0]**o + ((0.805002461785-0.363665476603j))*x[0] + ((0.573619994403+0.116610087635j))*x[1]**o + ((-0.53680659298+0.81334470211j))*x[1]
            ref[(1, 1, 3)]=(0.573619994403+0.116610087635j)/(o+1.)+((0.134097934403+0.224839612753j))+((0.22149061708-0.199983582856j))*0.5**o
            arg[(1, 2, 0)]=(0.0326078681874+0.404639082858j)*x[0]**o + ((-0.748717174331+0.621655627844j))*x[0] + ((0.422369678655+0.423768148973j))*x[1]**o + ((-0.661952973907-0.170407480839j))*x[1]
            ref[(1, 2, 0)]=(0.422369678655+0.423768148973j)/(o+1.)+((-0.705335074119+0.225624073502j))+((0.0326078681874+0.404639082858j))*0.5**o
            arg[(1, 2, 1)]=(-0.755801534858+0.561892877098j)*x[0]**o + ((-0.550471887564+0.652785734035j))*x[0] + ((0.978046730556-0.785657975024j))*x[1]**o + ((0.491741869131+0.607294330391j))*x[1]
            ref[(1, 2, 1)]=(0.978046730556-0.785657975024j)/(o+1.)+((-0.0293650092163+0.630040032213j))+((-0.755801534858+0.561892877098j))*0.5**o
            arg[(1, 2, 2)]=(-0.389311250701-0.0405212302894j)*x[0]**o + ((0.782628023803-0.837639655141j))*x[0] + ((-0.172093500092+0.514608364473j))*x[1]**o + ((0.744590229332-0.980295047855j))*x[1]
            ref[(1, 2, 2)]=(-0.172093500092+0.514608364473j)/(o+1.)+((0.763609126567-0.908967351498j))+((-0.389311250701-0.0405212302894j))*0.5**o
            arg[(1, 2, 3)]=(-0.154935735555+0.881537182977j)*x[0]**o + ((-0.667671072945-0.834039342432j))*x[0] + ((0.759875495738-0.33139704616j))*x[1]**o + ((0.393478638977-0.252282347633j))*x[1]
            ref[(1, 2, 3)]=(0.759875495738-0.33139704616j)/(o+1.)+((-0.137096216984-0.543160845032j))+((-0.154935735555+0.881537182977j))*0.5**o
            arg[(2, 0, 0)]=(0.972682887334-0.824502702731j)*x[0]**o + ((-0.0125138954109-0.00204183750633j))*x[0] + ((0.891724497078+0.111263855097j))*x[1]**o + ((-0.859978657196+0.741916411701j))*x[1]
            ref[(2, 0, 0)]=(0.891724497078+0.111263855097j)/(o+1.)+((-0.436246276304+0.369937287097j))+((0.972682887334-0.824502702731j))*0.5**o
            arg[(2, 0, 1)]=(0.155721121615+0.0671453859089j)*x[0]**o + ((0.233652678336-0.87099916437j))*x[0] + ((0.11263933165+0.639189247298j))*x[1]**o + ((-0.961737367673+0.90618209752j))*x[1]
            ref[(2, 0, 1)]=(0.11263933165+0.639189247298j)/(o+1.)+((-0.364042344668+0.0175914665753j))+((0.155721121615+0.0671453859089j))*0.5**o
            arg[(2, 0, 2)]=(-0.144336137213+0.097384145955j)*x[0]**o + ((-0.908768239976-0.686139853436j))*x[0] + ((-0.310870453356+0.468149560987j))*x[1]**o + ((0.374451705625+0.657708882465j))*x[1]
            ref[(2, 0, 2)]=(-0.310870453356+0.468149560987j)/(o+1.)+((-0.267158267176-0.0142154854856j))+((-0.144336137213+0.097384145955j))*0.5**o
            arg[(2, 0, 3)]=(0.207731101028+0.99904367424j)*x[0]**o + ((0.139637502729-0.00102857817754j))*x[0] + ((-0.966455039027-0.505316671633j))*x[1]**o + ((0.291421022509+0.14162577273j))*x[1]
            ref[(2, 0, 3)]=(-0.966455039027-0.505316671633j)/(o+1.)+((0.215529262619+0.0702985972764j))+((0.207731101028+0.99904367424j))*0.5**o
            arg[(2, 1, 0)]=(0.279428056663+0.339106943246j)*x[0]**o + ((-0.430227779152+0.417151640431j))*x[0] + ((-0.714160203814-0.226955015069j))*x[1]**o + ((-0.460734341635+0.346880771667j))*x[1]
            ref[(2, 1, 0)]=(-0.714160203814-0.226955015069j)/(o+1.)+((-0.445481060394+0.382016206049j))+((0.279428056663+0.339106943246j))*0.5**o
            arg[(2, 1, 1)]=(0.674673927009-0.587790875096j)*x[0]**o + ((-0.590133005165-0.953872581846j))*x[0] + ((-0.0413282379284+0.302723370341j))*x[1]**o + ((0.770183835806-0.647685533593j))*x[1]
            ref[(2, 1, 1)]=(-0.0413282379284+0.302723370341j)/(o+1.)+((0.0900254153203-0.800779057719j))+((0.674673927009-0.587790875096j))*0.5**o
            arg[(2, 1, 2)]=(0.678625989027-0.0482028268922j)*x[0]**o + ((-0.352973427728+0.29802392125j))*x[0] + ((-0.986037247363-0.00731799585548j))*x[1]**o + ((-0.952838215061+0.770424162318j))*x[1]
            ref[(2, 1, 2)]=(-0.986037247363-0.00731799585548j)/(o+1.)+((-0.652905821394+0.534224041784j))+((0.678625989027-0.0482028268922j))*0.5**o
            arg[(2, 1, 3)]=(-0.906563312947-0.120303826773j)*x[0]**o + ((-0.380991022993+0.70054931849j))*x[0] + ((-0.462092045095+0.492221904807j))*x[1]**o + ((-0.602371884011+0.616867799045j))*x[1]
            ref[(2, 1, 3)]=(-0.462092045095+0.492221904807j)/(o+1.)+((-0.491681453502+0.658708558767j))+((-0.906563312947-0.120303826773j))*0.5**o
            arg[(2, 2, 0)]=(0.00830398817433-0.634434272462j)*x[0]**o + ((-0.0406864426387-0.297232412075j))*x[0] + ((-0.625309908679+0.00148858779221j))*x[1]**o + ((0.53614265821+0.668701362683j))*x[1]
            ref[(2, 2, 0)]=(-0.625309908679+0.00148858779221j)/(o+1.)+((0.247728107786+0.185734475304j))+((0.00830398817433-0.634434272462j))*0.5**o
            arg[(2, 2, 1)]=(-0.628289698478-0.54660683139j)*x[0]**o + ((0.645316973759+0.719437327722j))*x[0] + ((-0.749205698692+0.535417545528j))*x[1]**o + ((0.551779674352-0.607623523667j))*x[1]
            ref[(2, 2, 1)]=(-0.749205698692+0.535417545528j)/(o+1.)+((0.598548324056+0.0559069020273j))+((-0.628289698478-0.54660683139j))*0.5**o
            arg[(2, 2, 2)]=(-0.172759160603-0.244632940131j)*x[0]**o + ((0.88970672095+0.051234410139j))*x[0] + ((-0.306931570113-0.429462793922j))*x[1]**o + ((0.145157962033-0.878617923182j))*x[1]
            ref[(2, 2, 2)]=(-0.306931570113-0.429462793922j)/(o+1.)+((0.517432341492-0.413691756521j))+((-0.172759160603-0.244632940131j))*0.5**o
            arg[(2, 2, 3)]=(-0.641990581209+0.97921742102j)*x[0]**o + ((0.201705702608+0.765197072531j))*x[0] + ((-0.686389274813-0.293212853092j))*x[1]**o + ((0.237229455812+0.981662455578j))*x[1]
            ref[(2, 2, 3)]=(-0.686389274813-0.293212853092j)/(o+1.)+((0.21946757921+0.873429764054j))+((-0.641990581209+0.97921742102j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.764101310052+0.100848744032j)*x[0]**o + ((-0.885158331723+0.396422974737j))*x[0] + ((-0.565342491451+0.91005615935j))*x[1]**o + ((0.59820540695+0.592156632565j))*x[1] + ((0.696669750434-0.274699214482j))*x[2]**o + ((0.878576226844-0.514027582088j))*x[2]
            ref[(0, 0, 0)]=(0.131327258982+0.635356944868j)/(o+1.)+((0.295811651036+0.237276012607j))+((-0.764101310052+0.100848744032j))*0.5**o
            arg[(0, 0, 1)]=(0.674125031867+0.502857422105j)*x[0]**o + ((0.0622622298665-0.766993655724j))*x[0] + ((-0.84115263052+0.685871921777j))*x[1]**o + ((0.651357972801-0.859681457831j))*x[1] + ((-0.427130456837+0.558801434566j))*x[2]**o + ((0.249297071823-0.680728385363j))*x[2]
            ref[(0, 0, 1)]=(-1.26828308736+1.24467335634j)/(o+1.)+((0.481458637245-1.15370174946j))+((0.674125031867+0.502857422105j))*0.5**o
            arg[(0, 0, 2)]=(-0.21211517418-0.843017960104j)*x[0]**o + ((-0.108168483715+0.238594999318j))*x[0] + ((-0.488978071295-0.0120690237942j))*x[1]**o + ((0.904505434035+0.223448053229j))*x[1] + ((0.0812960856987+0.970571928271j))*x[2]**o + ((-0.243555384426-0.926400683355j))*x[2]
            ref[(0, 0, 2)]=(-0.407681985596+0.958502904477j)/(o+1.)+((0.276390782947-0.232178815404j))+((-0.21211517418-0.843017960104j))*0.5**o
            arg[(0, 0, 3)]=(-0.958044974719+0.217867335218j)*x[0]**o + ((0.653822443149+0.470905139361j))*x[0] + ((-0.919318209962-0.382628163875j))*x[1]**o + ((0.498597835808+0.380113205773j))*x[1] + ((0.860820522154+0.554847603683j))*x[2]**o + ((-0.42820583002-0.432598626498j))*x[2]
            ref[(0, 0, 3)]=(-0.0584976878082+0.172219439808j)/(o+1.)+((0.362107224469+0.209209859318j))+((-0.958044974719+0.217867335218j))*0.5**o
            arg[(0, 1, 0)]=(-0.1718031836-0.674655691581j)*x[0]**o + ((-0.65634324023+0.162035238727j))*x[0] + ((-0.267622741555-0.69019825101j))*x[1]**o + ((-0.55473866286+0.306805076982j))*x[1] + ((0.88461673977-0.265727360426j))*x[2]**o + ((0.908879475644-0.0194113179271j))*x[2]
            ref[(0, 1, 0)]=(0.616993998216-0.955925611436j)/(o+1.)+((-0.151101213723+0.224714498891j))+((-0.1718031836-0.674655691581j))*0.5**o
            arg[(0, 1, 1)]=(0.617089845913-0.0872330989588j)*x[0]**o + ((0.157653025938+0.921762237192j))*x[0] + ((-0.847684401638+0.230196668982j))*x[1]**o + ((-0.883491363914+0.0408379865397j))*x[1] + ((-0.967080963224-0.798985110639j))*x[2]**o + ((0.0976247572659+0.145430932723j))*x[2]
            ref[(0, 1, 1)]=(-1.81476536486-0.568788441657j)/(o+1.)+((-0.314106790355+0.554015578228j))+((0.617089845913-0.0872330989588j))*0.5**o
            arg[(0, 1, 2)]=(0.208748800809-0.102483778109j)*x[0]**o + ((0.6165313114-0.521835319077j))*x[0] + ((-0.740643010852+0.777350901076j))*x[1]**o + ((-0.743200599221+0.81486901319j))*x[1] + ((-0.871529628848-0.744175428647j))*x[2]**o + ((-0.114806342083-0.341516795801j))*x[2]
            ref[(0, 1, 2)]=(-1.6121726397+0.0331754724291j)/(o+1.)+((-0.120737814952-0.0242415508446j))+((0.208748800809-0.102483778109j))*0.5**o
            arg[(0, 1, 3)]=(-0.28877415983-0.159694818386j)*x[0]**o + ((0.776030767817-0.80497907423j))*x[0] + ((-0.0145595777107+0.754453429826j))*x[1]**o + ((0.412405318197+0.587517278598j))*x[1] + ((0.82560684376+0.416576706105j))*x[2]**o + ((0.69737289342+0.0557880208055j))*x[2]
            ref[(0, 1, 3)]=(0.811047266049+1.17103013593j)/(o+1.)+((0.942904489717-0.0808368874132j))+((-0.28877415983-0.159694818386j))*0.5**o
            arg[(0, 2, 0)]=(-0.377111404151+0.685825848065j)*x[0]**o + ((-0.0727061262082+0.216711617543j))*x[0] + ((-0.402567208882+0.682629113271j))*x[1]**o + ((-0.194070094567+0.148432676425j))*x[1] + ((-0.385007276452-0.469419941654j))*x[2]**o + ((-0.259497615304-0.0369571709577j))*x[2]
            ref[(0, 2, 0)]=(-0.787574485334+0.213209171617j)/(o+1.)+((-0.26313691804+0.164093561505j))+((-0.377111404151+0.685825848065j))*0.5**o
            arg[(0, 2, 1)]=(0.954008828318-0.67085856289j)*x[0]**o + ((0.441443439172+0.145412250562j))*x[0] + ((-0.0142243098281-0.780477710458j))*x[1]**o + ((0.565359769655+0.233034091568j))*x[1] + ((-0.00498930755654+0.8699362378j))*x[2]**o + ((0.336205775541+0.0198424295128j))*x[2]
            ref[(0, 2, 1)]=(-0.0192136173846+0.0894585273425j)/(o+1.)+((0.671504492184+0.199144385821j))+((0.954008828318-0.67085856289j))*0.5**o
            arg[(0, 2, 2)]=(-0.475937327545+0.0168507084293j)*x[0]**o + ((0.836192530031+0.00547763228617j))*x[0] + ((0.87828187825+0.377071326222j))*x[1]**o + ((0.419741158609-0.348011184987j))*x[1] + ((0.812611371863-0.0933614962643j))*x[2]**o + ((0.00835292069056+0.634429923366j))*x[2]
            ref[(0, 2, 2)]=(1.69089325011+0.283709829958j)/(o+1.)+((0.632143304666+0.145948185333j))+((-0.475937327545+0.0168507084293j))*0.5**o
            arg[(0, 2, 3)]=(-0.752017049853-0.420292589732j)*x[0]**o + ((0.557142621139+0.830562064415j))*x[0] + ((-0.655384845427-0.830018874125j))*x[1]**o + ((0.320082497027-0.497930129742j))*x[1] + ((-0.423007583974+0.237996582438j))*x[2]**o + ((0.94977352419+0.349979382801j))*x[2]
            ref[(0, 2, 3)]=(-1.0783924294-0.592022291687j)/(o+1.)+((0.913499321178+0.341305658737j))+((-0.752017049853-0.420292589732j))*0.5**o
            arg[(1, 0, 0)]=(0.741385262344+0.221807496272j)*x[0]**o + ((0.78619352743+0.122589500243j))*x[0] + ((-0.562303232657+0.67155748878j))*x[1]**o + ((0.499104229563+0.8141849802j))*x[1] + ((-0.444001558458-0.267338264404j))*x[2]**o + ((0.20415904132+0.819362428207j))*x[2]
            ref[(1, 0, 0)]=(-1.00630479111+0.404219224376j)/(o+1.)+((0.744728399156+0.878068454325j))+((0.741385262344+0.221807496272j))*0.5**o
            arg[(1, 0, 1)]=(0.48019630218-0.167799476294j)*x[0]**o + ((0.822534076314+0.413718699379j))*x[0] + ((0.986981440892-0.678903421331j))*x[1]**o + ((-0.212623682758+0.454854781059j))*x[1] + ((0.476437901906+0.56577037549j))*x[2]**o + ((0.545746929787+0.513859279523j))*x[2]
            ref[(1, 0, 1)]=(1.4634193428-0.113133045841j)/(o+1.)+((0.577828661671+0.691216379981j))+((0.48019630218-0.167799476294j))*0.5**o
            arg[(1, 0, 2)]=(0.61432304029+0.362827428041j)*x[0]**o + ((0.638754818748-0.971904989977j))*x[0] + ((0.341442243364+0.298267154829j))*x[1]**o + ((0.629941027288-0.664205952834j))*x[1] + ((-0.723913185528+0.727022532175j))*x[2]**o + ((0.355855001791+0.288841183697j))*x[2]
            ref[(1, 0, 2)]=(-0.382470942164+1.025289687j)/(o+1.)+((0.812275423913-0.673634879557j))+((0.61432304029+0.362827428041j))*0.5**o
            arg[(1, 0, 3)]=(-0.80428811374+0.647108792441j)*x[0]**o + ((-0.927690076512+0.327811588869j))*x[0] + ((-0.769009432538-0.646563229317j))*x[1]**o + ((0.136789170371+0.998043165582j))*x[1] + ((0.726507384426-0.500325292812j))*x[2]**o + ((0.0700195438656-0.156822085541j))*x[2]
            ref[(1, 0, 3)]=(-0.0425020481121-1.14688852213j)/(o+1.)+((-0.360440681138+0.584516334455j))+((-0.80428811374+0.647108792441j))*0.5**o
            arg[(1, 1, 0)]=(0.817292682251-0.838062270084j)*x[0]**o + ((0.980670467627+0.721965569174j))*x[0] + ((-0.683657354967-0.414964557167j))*x[1]**o + ((0.854679722771+0.450740741674j))*x[1] + ((-0.48334994122+0.682682385613j))*x[2]**o + ((0.901901122442+0.953917407519j))*x[2]
            ref[(1, 1, 0)]=(-1.16700729619+0.267717828447j)/(o+1.)+((1.36862565642+1.06331185918j))+((0.817292682251-0.838062270084j))*0.5**o
            arg[(1, 1, 1)]=(-0.237447447474+0.590820411578j)*x[0]**o + ((-0.791328412155+0.492164132225j))*x[0] + ((0.581890002922+0.565927051079j))*x[1]**o + ((0.574367848834+0.985035115681j))*x[1] + ((-0.568094347555-0.205618830845j))*x[2]**o + ((-0.165598675896+0.654367423651j))*x[2]
            ref[(1, 1, 1)]=(0.0137956553672+0.360308220234j)/(o+1.)+((-0.191279619608+1.06578333578j))+((-0.237447447474+0.590820411578j))*0.5**o
            arg[(1, 1, 2)]=(-0.376676111563-0.727841328278j)*x[0]**o + ((-0.648922592609-0.992934169618j))*x[0] + ((0.377972859694+0.762959985288j))*x[1]**o + ((-0.762926408434-0.245277709038j))*x[1] + ((-0.722406687358-0.957572274245j))*x[2]**o + ((-0.456102229652+0.0641057587007j))*x[2]
            ref[(1, 1, 2)]=(-0.344433827664-0.194612288956j)/(o+1.)+((-0.933975615347-0.587053059978j))+((-0.376676111563-0.727841328278j))*0.5**o
            arg[(1, 1, 3)]=(0.784161642286-0.386348092647j)*x[0]**o + ((0.619636426982-0.634750462738j))*x[0] + ((-0.390833481133-0.1715539646j))*x[1]**o + ((-0.451914833936+0.322898912092j))*x[1] + ((0.441279361796-0.600570679787j))*x[2]**o + ((-0.292745551468+0.447991387895j))*x[2]
            ref[(1, 1, 3)]=(0.0504458806626-0.772124644388j)/(o+1.)+((-0.0625119792108+0.068069918625j))+((0.784161642286-0.386348092647j))*0.5**o
            arg[(1, 2, 0)]=(0.90010923901-0.0864208794452j)*x[0]**o + ((-0.66103223332-0.430351447996j))*x[0] + ((0.00374442108901+0.0721479990011j))*x[1]**o + ((-0.874176083953-0.225355324155j))*x[1] + ((0.951137866225-0.360495093607j))*x[2]**o + ((-0.727333579649+0.0915491324404j))*x[2]
            ref[(1, 2, 0)]=(0.954882287314-0.288347094606j)/(o+1.)+((-1.13127094846-0.282078819855j))+((0.90010923901-0.0864208794452j))*0.5**o
            arg[(1, 2, 1)]=(0.201193382312-0.510160357553j)*x[0]**o + ((0.903848162535-0.819550094449j))*x[0] + ((-0.591051398989-0.978703826965j))*x[1]**o + ((0.383765429637-0.770550091773j))*x[1] + ((-0.143126556325-0.730870105564j))*x[2]**o + ((0.169741807051+0.0468743870717j))*x[2]
            ref[(1, 2, 1)]=(-0.734177955315-1.70957393253j)/(o+1.)+((0.728677699612-0.771612899575j))+((0.201193382312-0.510160357553j))*0.5**o
            arg[(1, 2, 2)]=(0.37250953503-0.37077905146j)*x[0]**o + ((0.674835912733-0.225712556601j))*x[0] + ((0.675207523986-0.208257397656j))*x[1]**o + ((-0.356385694896+0.567688038941j))*x[1] + ((-0.677684171148-0.105159854417j))*x[2]**o + ((-0.559237821984-0.0685606918675j))*x[2]
            ref[(1, 2, 2)]=(-0.00247664716288-0.313417252073j)/(o+1.)+((-0.120393802074+0.136707395236j))+((0.37250953503-0.37077905146j))*0.5**o
            arg[(1, 2, 3)]=(0.302721738011-0.545872580747j)*x[0]**o + ((0.312587764246-0.372372602699j))*x[0] + ((-0.0108852213724+0.0868379184574j))*x[1]**o + ((0.193515899867+0.619759634717j))*x[1] + ((-0.147474285568+0.0709305872927j))*x[2]**o + ((-0.0224321208924+0.410757492609j))*x[2]
            ref[(1, 2, 3)]=(-0.15835950694+0.15776850575j)/(o+1.)+((0.241835771611+0.329072262313j))+((0.302721738011-0.545872580747j))*0.5**o
            arg[(2, 0, 0)]=(0.0403256755552+0.080197677178j)*x[0]**o + ((0.985106262235+0.857574371351j))*x[0] + ((-0.886890185348+0.19457980812j))*x[1]**o + ((0.352246704812-0.363054849617j))*x[1] + ((-0.699170657109-0.00852172505211j))*x[2]**o + ((0.745391630873+0.443760231722j))*x[2]
            ref[(2, 0, 0)]=(-1.58606084246+0.186058083068j)/(o+1.)+((1.04137229896+0.469139876728j))+((0.0403256755552+0.080197677178j))*0.5**o
            arg[(2, 0, 1)]=(0.337696647148-0.247280693473j)*x[0]**o + ((-0.687620270347-0.839218294646j))*x[0] + ((0.433965282103+0.712101607315j))*x[1]**o + ((-0.677977701786-0.557213390606j))*x[1] + ((-0.539249941479-0.44820484247j))*x[2]**o + ((-0.772915220175-0.7016683708j))*x[2]
            ref[(2, 0, 1)]=(-0.105284659375+0.263896764845j)/(o+1.)+((-1.06925659615-1.04905002803j))+((0.337696647148-0.247280693473j))*0.5**o
            arg[(2, 0, 2)]=(-0.482122266126-0.26912530081j)*x[0]**o + ((-0.274727402761+0.377867867412j))*x[0] + ((-0.879639349551-0.510226799009j))*x[1]**o + ((-0.794248546957+0.0249836217805j))*x[1] + ((-0.572574378369+0.40103650199j))*x[2]**o + ((0.70696526839+0.0984615321391j))*x[2]
            ref[(2, 0, 2)]=(-1.45221372792-0.109190297019j)/(o+1.)+((-0.181005340664+0.250656510666j))+((-0.482122266126-0.26912530081j))*0.5**o
            arg[(2, 0, 3)]=(0.41225750316-0.741097405086j)*x[0]**o + ((-0.0987339060254+0.408436982161j))*x[0] + ((0.698480322744+0.643639702414j))*x[1]**o + ((0.92029978418+0.554474301749j))*x[1] + ((-0.685405835967-0.490989764638j))*x[2]**o + ((0.138834704496+0.668831972442j))*x[2]
            ref[(2, 0, 3)]=(0.0130744867769+0.152649937776j)/(o+1.)+((0.480200291326+0.815871628176j))+((0.41225750316-0.741097405086j))*0.5**o
            arg[(2, 1, 0)]=(-0.57466220177+0.31608028586j)*x[0]**o + ((0.271082008388+0.820103166206j))*x[0] + ((-0.120329210467-0.848450161079j))*x[1]**o + ((-0.641145023794-0.106251310233j))*x[1] + ((-0.465536718788+0.508331636943j))*x[2]**o + ((-0.232293460087+0.67037530399j))*x[2]
            ref[(2, 1, 0)]=(-0.585865929255-0.340118524136j)/(o+1.)+((-0.301178237747+0.692113579981j))+((-0.57466220177+0.31608028586j))*0.5**o
            arg[(2, 1, 1)]=(-0.515620100111-0.889307265978j)*x[0]**o + ((0.498720754322-0.0758678758563j))*x[0] + ((-0.28970963606-0.392743435615j))*x[1]**o + ((0.507739455129+0.996702202516j))*x[1] + ((-0.587824731201-0.611233904386j))*x[2]**o + ((0.681384491265+0.974259422169j))*x[2]
            ref[(2, 1, 1)]=(-0.877534367261-1.00397734j)/(o+1.)+((0.843922350358+0.947546874414j))+((-0.515620100111-0.889307265978j))*0.5**o
            arg[(2, 1, 2)]=(-0.54113155068-0.251305460626j)*x[0]**o + ((0.384063263373+0.400784543435j))*x[0] + ((-0.0981739578299+0.577150793473j))*x[1]**o + ((0.400379439746-0.361528321159j))*x[1] + ((0.542411321983+0.347258896147j))*x[2]**o + ((0.497375416689-0.666397851597j))*x[2]
            ref[(2, 1, 2)]=(0.444237364153+0.924409689619j)/(o+1.)+((0.640909059904-0.31357081466j))+((-0.54113155068-0.251305460626j))*0.5**o
            arg[(2, 1, 3)]=(-0.312364959949+0.273343890721j)*x[0]**o + ((-0.106187700815-0.351927491597j))*x[0] + ((-0.0470379190247-0.625018470594j))*x[1]**o + ((-0.094981927807+0.93962795843j))*x[1] + ((-0.577496734816-0.951140218291j))*x[2]**o + ((0.856102290793+0.113776350999j))*x[2]
            ref[(2, 1, 3)]=(-0.62453465384-1.57615868889j)/(o+1.)+((0.327466331086+0.350738408916j))+((-0.312364959949+0.273343890721j))*0.5**o
            arg[(2, 2, 0)]=(0.0471926050219-0.809046855864j)*x[0]**o + ((-0.0530234877003-0.0581015927116j))*x[0] + ((-0.509489325954-0.276988841964j))*x[1]**o + ((-0.865515795143-0.233158990266j))*x[1] + ((-0.0599363160739-0.265326288292j))*x[2]**o + ((0.313447807491+0.758466535689j))*x[2]
            ref[(2, 2, 0)]=(-0.569425642028-0.542315130256j)/(o+1.)+((-0.302545737676+0.233602976356j))+((0.0471926050219-0.809046855864j))*0.5**o
            arg[(2, 2, 1)]=(0.862919468104+0.270917486392j)*x[0]**o + ((0.545414070609+0.740321371756j))*x[0] + ((-0.288440427459-0.835486993656j))*x[1]**o + ((-0.36659317721+0.81869625941j))*x[1] + ((0.593524993098+0.119198556452j))*x[2]**o + ((0.0354040327738+0.813255193476j))*x[2]
            ref[(2, 2, 1)]=(0.305084565639-0.716288437204j)/(o+1.)+((0.107112463086+1.18613641232j))+((0.862919468104+0.270917486392j))*0.5**o
            arg[(2, 2, 2)]=(-0.159185732417-0.0992035498704j)*x[0]**o + ((0.251879024334-0.670154663634j))*x[0] + ((0.982439271005+0.520503760446j))*x[1]**o + ((-0.0502811554726+0.00918645293139j))*x[1] + ((-0.878575268956+0.59231756757j))*x[2]**o + ((0.113146846192+0.11199805999j))*x[2]
            ref[(2, 2, 2)]=(0.103864002049+1.11282132802j)/(o+1.)+((0.157372357527-0.274485075356j))+((-0.159185732417-0.0992035498704j))*0.5**o
            arg[(2, 2, 3)]=(-0.0313354563951+0.702165233395j)*x[0]**o + ((0.465581406704+0.300025810073j))*x[0] + ((0.604644549319-0.466176601588j))*x[1]**o + ((-0.396159662574-0.539013912503j))*x[1] + ((-0.705624715986+0.975162445477j))*x[2]**o + ((0.597119106234+0.516645838343j))*x[2]
            ref[(2, 2, 3)]=(-0.100980166666+0.508985843889j)/(o+1.)+((0.333270425182+0.138828867957j))+((-0.0313354563951+0.702165233395j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 2),w)
        ref=numpy.zeros((4, 3, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.218392590821-0.106003251739j)*x[0]**o + ((0.864336278249+0.562478479574j))*x[0] + ((-0.888265322593-0.373194474855j))*x[1]**o + ((0.518359514256-0.104739749826j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.888265322593-0.373194474855j)/(o+1.)+((0.691347896252+0.228869364874j))+((-0.218392590821-0.106003251739j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.75920574566-0.755058297363j)*x[0]**o + ((-0.0755050161155+0.691918233268j))*x[0] + ((-0.655653847829+0.588607720285j))*x[1]**o + ((-0.906032113317-0.0378456585349j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.655653847829+0.588607720285j)/(o+1.)+((-0.490768564716+0.327036287367j))+((0.75920574566-0.755058297363j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.299699172192+0.940716192444j)*x[0]**o + ((-0.949547778831-0.172435407774j))*x[0] + ((0.633246757965-0.879270103817j))*x[1]**o + ((0.86310091013+0.0747083755362j))*x[1]
            ref[(0, 0, 1, 0)]=(0.633246757965-0.879270103817j)/(o+1.)+((-0.0432234343506-0.0488635161189j))+((0.299699172192+0.940716192444j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.433569273444-0.449954789476j)*x[0]**o + ((-0.463256436283+0.689392795464j))*x[0] + ((0.875292204895-0.181329057761j))*x[1]**o + ((-0.28976806325+0.841309130448j))*x[1]
            ref[(0, 0, 1, 1)]=(0.875292204895-0.181329057761j)/(o+1.)+((-0.376512249766+0.765350962956j))+((0.433569273444-0.449954789476j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.35514548207-0.375367954145j)*x[0]**o + ((-0.0284069831884-0.92825694506j))*x[0] + ((0.333367705142+0.268344485705j))*x[1]**o + ((0.979016410551+0.219802458876j))*x[1]
            ref[(0, 0, 2, 0)]=(0.333367705142+0.268344485705j)/(o+1.)+((0.475304713681-0.354227243092j))+((0.35514548207-0.375367954145j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.453213818742+0.0860171724085j)*x[0]**o + ((-0.333988192718-0.290005068786j))*x[0] + ((-0.299687992626-0.468697651328j))*x[1]**o + ((-0.117698699708+0.434030003763j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.299687992626-0.468697651328j)/(o+1.)+((-0.225843446213+0.0720124674884j))+((0.453213818742+0.0860171724085j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.994304120099+0.87909471862j)*x[0]**o + ((0.425622857178-0.481685236192j))*x[0] + ((-0.758890356928-0.408676796036j))*x[1]**o + ((0.932166150245+0.743419669896j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.758890356928-0.408676796036j)/(o+1.)+((0.678894503711+0.130867216852j))+((0.994304120099+0.87909471862j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.572181538072-0.637379675822j)*x[0]**o + ((0.644792967936-0.0865246074374j))*x[0] + ((-0.657453149953+0.375536988762j))*x[1]**o + ((-0.489282044567-0.528337118668j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.657453149953+0.375536988762j)/(o+1.)+((0.0777554616842-0.307430863053j))+((-0.572181538072-0.637379675822j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.654868625069+0.834809919346j)*x[0]**o + ((0.77272074554+0.416798799233j))*x[0] + ((0.761570959316+0.228268807838j))*x[1]**o + ((0.454337811384+0.130809139114j))*x[1]
            ref[(0, 1, 1, 0)]=(0.761570959316+0.228268807838j)/(o+1.)+((0.613529278462+0.273803969174j))+((-0.654868625069+0.834809919346j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.893682930222+0.651631940289j)*x[0]**o + ((0.37167955538+0.834784279571j))*x[0] + ((-0.40791520148-0.181054784079j))*x[1]**o + ((0.0765430934992-0.737490773706j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.40791520148-0.181054784079j)/(o+1.)+((0.22411132444+0.0486467529329j))+((0.893682930222+0.651631940289j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.892145182698-0.414147381135j)*x[0]**o + ((-0.88076325786-0.42635502113j))*x[0] + ((0.551922857468+0.504632651865j))*x[1]**o + ((-0.139955299653-0.717133622746j))*x[1]
            ref[(0, 1, 2, 0)]=(0.551922857468+0.504632651865j)/(o+1.)+((-0.510359278756-0.571744321938j))+((-0.892145182698-0.414147381135j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.807605633585-0.499841525679j)*x[0]**o + ((0.514279894627+0.0831937969013j))*x[0] + ((-0.444468518734+0.038246702767j))*x[1]**o + ((0.811030032972-0.826468444196j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.444468518734+0.038246702767j)/(o+1.)+((0.6626549638-0.371637323647j))+((0.807605633585-0.499841525679j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.75831853167-0.363103034243j)*x[0]**o + ((0.115236617073+0.841699505792j))*x[0] + ((0.675975315125+0.511168632394j))*x[1]**o + ((-0.0177874485125+0.370607808728j))*x[1]
            ref[(0, 2, 0, 0)]=(0.675975315125+0.511168632394j)/(o+1.)+((0.0487245842804+0.60615365726j))+((0.75831853167-0.363103034243j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.191620315711-0.736272827438j)*x[0]**o + ((0.886126660412+0.525683541105j))*x[0] + ((0.070872116804+0.615851235338j))*x[1]**o + ((-0.463634008072-0.785912830289j))*x[1]
            ref[(0, 2, 0, 1)]=(0.070872116804+0.615851235338j)/(o+1.)+((0.21124632617-0.130114644592j))+((0.191620315711-0.736272827438j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.0190116207614+0.943795814833j)*x[0]**o + ((-0.752115533738+0.65853610855j))*x[0] + ((-0.686139696985-0.800641485405j))*x[1]**o + ((0.116421269705+0.0605115948779j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.686139696985-0.800641485405j)/(o+1.)+((-0.317847132017+0.359523851714j))+((-0.0190116207614+0.943795814833j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.933524849766+0.896231423957j)*x[0]**o + ((-0.609686469665-0.622799757865j))*x[0] + ((-0.843159568029+0.232339516666j))*x[1]**o + ((-0.697212539761+0.268907622775j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.843159568029+0.232339516666j)/(o+1.)+((-0.653449504713-0.176946067545j))+((-0.933524849766+0.896231423957j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.687037225644+0.935125631941j)*x[0]**o + ((0.197281548464+0.847862753666j))*x[0] + ((0.73849822145-0.141905762582j))*x[1]**o + ((0.268915752455-0.567727261998j))*x[1]
            ref[(0, 2, 2, 0)]=(0.73849822145-0.141905762582j)/(o+1.)+((0.23309865046+0.140067745834j))+((-0.687037225644+0.935125631941j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.165496340567-0.458993840454j)*x[0]**o + ((-0.487370666856+0.693537010855j))*x[0] + ((-0.711863161874+0.821988664039j))*x[1]**o + ((0.127445471661+0.820496923577j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.711863161874+0.821988664039j)/(o+1.)+((-0.179962597597+0.757016967216j))+((0.165496340567-0.458993840454j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.43423347566+0.468088151672j)*x[0]**o + ((-0.776891064997-0.859290750621j))*x[0] + ((-0.083254143433+0.656095353443j))*x[1]**o + ((-0.646954370724+0.076828996531j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.083254143433+0.656095353443j)/(o+1.)+((-0.711922717861-0.391230877045j))+((0.43423347566+0.468088151672j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.486590421276-0.645079668253j)*x[0]**o + ((-0.563426230939+0.0277699464269j))*x[0] + ((0.409330970033-0.973245786281j))*x[1]**o + ((0.788666751293-0.272340321006j))*x[1]
            ref[(1, 0, 0, 1)]=(0.409330970033-0.973245786281j)/(o+1.)+((0.112620260177-0.122285187289j))+((-0.486590421276-0.645079668253j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.160632189025+0.69463088025j)*x[0]**o + ((0.281694889407-0.805719253114j))*x[0] + ((-0.349290217634+0.950742100197j))*x[1]**o + ((0.735680407916-0.725815162536j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.349290217634+0.950742100197j)/(o+1.)+((0.508687648662-0.765767207825j))+((0.160632189025+0.69463088025j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.319966184197+0.38439640167j)*x[0]**o + ((-0.708699059473+0.00403266195424j))*x[0] + ((-0.0361255901117+0.88573284086j))*x[1]**o + ((0.797181000035+0.326726517552j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.0361255901117+0.88573284086j)/(o+1.)+((0.0442409702813+0.165379589753j))+((0.319966184197+0.38439640167j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.452655415654+0.0511715404942j)*x[0]**o + ((0.252948359409+0.567166927031j))*x[0] + ((-0.298009837401+0.429517740333j))*x[1]**o + ((0.383767010348+0.452628791214j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.298009837401+0.429517740333j)/(o+1.)+((0.318357684879+0.509897859122j))+((-0.452655415654+0.0511715404942j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.338933458761+0.0130451513372j)*x[0]**o + ((-0.810902925559+0.707697000832j))*x[0] + ((-0.881907860453+0.36559007584j))*x[1]**o + ((0.584487619174+0.953244124082j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.881907860453+0.36559007584j)/(o+1.)+((-0.113207653193+0.830470562457j))+((0.338933458761+0.0130451513372j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.529124539357+0.722012714387j)*x[0]**o + ((0.731496473024-0.179862920328j))*x[0] + ((-0.708185574157+0.639498876639j))*x[1]**o + ((0.69758586472-0.393945653752j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.708185574157+0.639498876639j)/(o+1.)+((0.714541168872-0.28690428704j))+((-0.529124539357+0.722012714387j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.495080881202-0.391383925508j)*x[0]**o + ((-0.112211567904+0.438889773153j))*x[0] + ((-0.36543040954+0.596485176397j))*x[1]**o + ((-0.25899349495-0.0302460382013j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.36543040954+0.596485176397j)/(o+1.)+((-0.185602531427+0.204321867476j))+((0.495080881202-0.391383925508j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.481092968999-0.353163027665j)*x[0]**o + ((-0.1257120419-0.248384299318j))*x[0] + ((-0.431271158321+0.326241367991j))*x[1]**o + ((-0.371642866873+0.725599079043j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.431271158321+0.326241367991j)/(o+1.)+((-0.248677454386+0.238607389862j))+((-0.481092968999-0.353163027665j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.962702799059+0.355269601214j)*x[0]**o + ((-0.831164365396+0.496620637634j))*x[0] + ((-0.837238605823+0.706976798498j))*x[1]**o + ((0.954933795534+0.857506043876j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.837238605823+0.706976798498j)/(o+1.)+((0.0618847150689+0.677063340755j))+((-0.962702799059+0.355269601214j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.00348994303968+0.399823723243j)*x[0]**o + ((0.324037514874+0.145850117352j))*x[0] + ((0.519554168902-0.259042072984j))*x[1]**o + ((-0.978270300414+0.407589719557j))*x[1]
            ref[(1, 1, 2, 0)]=(0.519554168902-0.259042072984j)/(o+1.)+((-0.32711639277+0.276719918455j))+((0.00348994303968+0.399823723243j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.433490660599-0.901150255971j)*x[0]**o + ((0.277091486994-0.0716160202593j))*x[0] + ((0.145437387985-0.300186933064j))*x[1]**o + ((0.377159084186+0.582606370765j))*x[1]
            ref[(1, 1, 2, 1)]=(0.145437387985-0.300186933064j)/(o+1.)+((0.32712528559+0.255495175253j))+((0.433490660599-0.901150255971j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.914613499239-0.623611946691j)*x[0]**o + ((-0.783651476269-0.683762513452j))*x[0] + ((0.795769899774+0.224596914212j))*x[1]**o + ((-0.944248228851-0.228439609925j))*x[1]
            ref[(1, 2, 0, 0)]=(0.795769899774+0.224596914212j)/(o+1.)+((-0.86394985256-0.456101061688j))+((-0.914613499239-0.623611946691j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.408868784289-0.958784273454j)*x[0]**o + ((-0.992493579824+0.930234410136j))*x[0] + ((-0.440125735839+0.977746227589j))*x[1]**o + ((-0.814081442963-0.792003746156j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.440125735839+0.977746227589j)/(o+1.)+((-0.903287511393+0.06911533199j))+((-0.408868784289-0.958784273454j))*0.5**o
            arg[(1, 2, 1, 0)]=(0.225765969322+0.627814327997j)*x[0]**o + ((0.79023088249-0.426260895277j))*x[0] + ((-0.114711949591-0.955796982041j))*x[1]**o + ((-0.246742230678-0.11306727558j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.114711949591-0.955796982041j)/(o+1.)+((0.271744325906-0.269664085429j))+((0.225765969322+0.627814327997j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.707757563726-0.278022971088j)*x[0]**o + ((-0.565211045759-0.521418790033j))*x[0] + ((-0.78447700988-0.180891417752j))*x[1]**o + ((-0.557189440443-0.40720085547j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.78447700988-0.180891417752j)/(o+1.)+((-0.561200243101-0.464309822752j))+((-0.707757563726-0.278022971088j))*0.5**o
            arg[(1, 2, 2, 0)]=(0.629593772472+0.4731418591j)*x[0]**o + ((-0.329791582599+0.556785538952j))*x[0] + ((-0.872155659531-0.581699712353j))*x[1]**o + ((-0.118465435798+0.338954472866j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.872155659531-0.581699712353j)/(o+1.)+((-0.224128509198+0.447870005909j))+((0.629593772472+0.4731418591j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.610551143161-0.0142907154207j)*x[0]**o + ((-0.546828022643-0.0424230552701j))*x[0] + ((-0.763492980447+0.44677483554j))*x[1]**o + ((0.460842207101-0.721270871515j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.763492980447+0.44677483554j)/(o+1.)+((-0.042992907771-0.381846963393j))+((-0.610551143161-0.0142907154207j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.629867740219-0.36875117858j)*x[0]**o + ((-0.227292026584+0.946600708681j))*x[0] + ((0.912323142384+0.707907227555j))*x[1]**o + ((0.814248178573+0.749748465738j))*x[1]
            ref[(2, 0, 0, 0)]=(0.912323142384+0.707907227555j)/(o+1.)+((0.293478075995+0.84817458721j))+((-0.629867740219-0.36875117858j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.290717368558-0.943958831186j)*x[0]**o + ((0.705473733456+0.80249880145j))*x[0] + ((0.0520070680932-0.182893218404j))*x[1]**o + ((0.239872349336+0.713561049484j))*x[1]
            ref[(2, 0, 0, 1)]=(0.0520070680932-0.182893218404j)/(o+1.)+((0.472673041396+0.758029925467j))+((0.290717368558-0.943958831186j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.491618509067-0.0336467886839j)*x[0]**o + ((0.806549967515-0.0725878623363j))*x[0] + ((-0.45982432748-0.6524975462j))*x[1]**o + ((-0.695392061854-0.305254001332j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.45982432748-0.6524975462j)/(o+1.)+((0.0555789528308-0.188920931834j))+((0.491618509067-0.0336467886839j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.59741717794+0.239373813533j)*x[0]**o + ((0.21712703921-0.0671910747958j))*x[0] + ((-0.0967558193637-0.0213409346923j))*x[1]**o + ((0.91189343976-0.0240368017562j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.0967558193637-0.0213409346923j)/(o+1.)+((0.564510239485-0.045613938276j))+((0.59741717794+0.239373813533j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.427237528039+0.171265120825j)*x[0]**o + ((0.244632307141-0.109094511534j))*x[0] + ((0.529582154699+0.322085788568j))*x[1]**o + ((0.15565130357-0.238906274974j))*x[1]
            ref[(2, 0, 2, 0)]=(0.529582154699+0.322085788568j)/(o+1.)+((0.200141805356-0.174000393254j))+((-0.427237528039+0.171265120825j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.294169592803+0.43257509298j)*x[0]**o + ((-0.841929250744-0.295705628587j))*x[0] + ((-0.500165974126-0.67464863394j))*x[1]**o + ((-0.71652249908+0.361778563035j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.500165974126-0.67464863394j)/(o+1.)+((-0.779225874912+0.0330364672242j))+((0.294169592803+0.43257509298j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.0740055665458+0.797498246067j)*x[0]**o + ((0.085885146072+0.398468435015j))*x[0] + ((0.0958686350304+0.292371264047j))*x[1]**o + ((0.806522210587+0.0887519200153j))*x[1]
            ref[(2, 1, 0, 0)]=(0.0958686350304+0.292371264047j)/(o+1.)+((0.446203678329+0.243610177515j))+((-0.0740055665458+0.797498246067j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.434580345489-0.869975284956j)*x[0]**o + ((0.141065311824-0.248746162609j))*x[0] + ((-0.748012449524-0.0442384279991j))*x[1]**o + ((0.782885217028-0.072795101422j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.748012449524-0.0442384279991j)/(o+1.)+((0.461975264426-0.160770632015j))+((-0.434580345489-0.869975284956j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.703895670449-0.430047625444j)*x[0]**o + ((0.835796292929-0.26844320736j))*x[0] + ((0.959562610637-0.802420914981j))*x[1]**o + ((0.273214510245+0.742007041561j))*x[1]
            ref[(2, 1, 1, 0)]=(0.959562610637-0.802420914981j)/(o+1.)+((0.554505401587+0.236781917101j))+((0.703895670449-0.430047625444j))*0.5**o
            arg[(2, 1, 1, 1)]=(0.931436155292-0.563430119285j)*x[0]**o + ((0.199977022033+0.163585166145j))*x[0] + ((-0.104935947919-0.031283972683j))*x[1]**o + ((-0.994946483711-0.300972099099j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.104935947919-0.031283972683j)/(o+1.)+((-0.397484730839-0.0686934664768j))+((0.931436155292-0.563430119285j))*0.5**o
            arg[(2, 1, 2, 0)]=(0.3476251105+0.94157995267j)*x[0]**o + ((-0.542471346562+0.766117768597j))*x[0] + ((0.883935653266+0.494214254303j))*x[1]**o + ((0.73563448451+0.0783269814773j))*x[1]
            ref[(2, 1, 2, 0)]=(0.883935653266+0.494214254303j)/(o+1.)+((0.0965815689737+0.422222375037j))+((0.3476251105+0.94157995267j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.670993921674+0.194961535867j)*x[0]**o + ((-0.114510928274-0.371774042025j))*x[0] + ((0.881466530051+0.0565630917513j))*x[1]**o + ((-0.932103340782-0.255451005324j))*x[1]
            ref[(2, 1, 2, 1)]=(0.881466530051+0.0565630917513j)/(o+1.)+((-0.523307134528-0.313612523674j))+((-0.670993921674+0.194961535867j))*0.5**o
            arg[(2, 2, 0, 0)]=(0.651582554504+0.927033562134j)*x[0]**o + ((0.534544237601-0.830914180064j))*x[0] + ((-0.832488359977-0.644381363792j))*x[1]**o + ((0.145277583262+0.557589371012j))*x[1]
            ref[(2, 2, 0, 0)]=(-0.832488359977-0.644381363792j)/(o+1.)+((0.339910910432-0.136662404526j))+((0.651582554504+0.927033562134j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.791121147471+0.649068662956j)*x[0]**o + ((0.854381193679-0.172285213312j))*x[0] + ((0.314457493971-0.709938868551j))*x[1]**o + ((0.542505589187+0.0598880083448j))*x[1]
            ref[(2, 2, 0, 1)]=(0.314457493971-0.709938868551j)/(o+1.)+((0.698443391433-0.0561986024836j))+((0.791121147471+0.649068662956j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.84662277766-0.288923761954j)*x[0]**o + ((0.111913420925+0.107407595267j))*x[0] + ((-0.726785473658+0.820742049602j))*x[1]**o + ((0.738022592611+0.700443502683j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.726785473658+0.820742049602j)/(o+1.)+((0.424968006768+0.403925548975j))+((0.84662277766-0.288923761954j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.636917755569+0.134683520709j)*x[0]**o + ((0.823068206643-0.159414844631j))*x[0] + ((-0.985289869525-0.011204765723j))*x[1]**o + ((0.66806531956+0.500687004114j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.985289869525-0.011204765723j)/(o+1.)+((0.745566763101+0.170636079742j))+((0.636917755569+0.134683520709j))*0.5**o
            arg[(2, 2, 2, 0)]=(-0.718190770845-0.261726320582j)*x[0]**o + ((0.00426472006466+0.628854211254j))*x[0] + ((0.583719520294+0.691764946217j))*x[1]**o + ((0.68950057325-0.348464653999j))*x[1]
            ref[(2, 2, 2, 0)]=(0.583719520294+0.691764946217j)/(o+1.)+((0.346882646658+0.140194778627j))+((-0.718190770845-0.261726320582j))*0.5**o
            arg[(2, 2, 2, 1)]=(0.3523868761+0.9039836753j)*x[0]**o + ((-0.274343527739-0.506499665491j))*x[0] + ((0.62381148356+0.02520394019j))*x[1]**o + ((0.850029127953-0.126522021543j))*x[1]
            ref[(2, 2, 2, 1)]=(0.62381148356+0.02520394019j)/(o+1.)+((0.287842800107-0.316510843517j))+((0.3523868761+0.9039836753j))*0.5**o
            arg[(3, 0, 0, 0)]=(-0.979338719487-0.907320834638j)*x[0]**o + ((0.633917067546+0.399345733295j))*x[0] + ((0.204022007796-0.255881049714j))*x[1]**o + ((-0.587293083174-0.725054968912j))*x[1]
            ref[(3, 0, 0, 0)]=(0.204022007796-0.255881049714j)/(o+1.)+((0.0233119921861-0.162854617808j))+((-0.979338719487-0.907320834638j))*0.5**o
            arg[(3, 0, 0, 1)]=(0.238032429378+0.888450097954j)*x[0]**o + ((0.387284080556+0.87846517585j))*x[0] + ((0.403734481653-0.809914759129j))*x[1]**o + ((-0.529600959683-0.964673857156j))*x[1]
            ref[(3, 0, 0, 1)]=(0.403734481653-0.809914759129j)/(o+1.)+((-0.0711584395632-0.0431043406527j))+((0.238032429378+0.888450097954j))*0.5**o
            arg[(3, 0, 1, 0)]=(-0.840959325659-0.0692018590434j)*x[0]**o + ((-0.213187843321+0.776659238652j))*x[0] + ((-0.370672584351-0.0864814346424j))*x[1]**o + ((-0.325203471736-0.924006649905j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.370672584351-0.0864814346424j)/(o+1.)+((-0.269195657529-0.0736737056265j))+((-0.840959325659-0.0692018590434j))*0.5**o
            arg[(3, 0, 1, 1)]=(0.815809268933-0.981309657602j)*x[0]**o + ((0.679990786396-0.139799460714j))*x[0] + ((0.472594164189+0.455637100268j))*x[1]**o + ((-0.459644912039+0.765665581819j))*x[1]
            ref[(3, 0, 1, 1)]=(0.472594164189+0.455637100268j)/(o+1.)+((0.110172937178+0.312933060552j))+((0.815809268933-0.981309657602j))*0.5**o
            arg[(3, 0, 2, 0)]=(-0.273258975388-0.162990564443j)*x[0]**o + ((-0.637826076146+0.739176283707j))*x[0] + ((-0.0176846391441-0.878154958732j))*x[1]**o + ((0.0315263980739+0.977498826341j))*x[1]
            ref[(3, 0, 2, 0)]=(-0.0176846391441-0.878154958732j)/(o+1.)+((-0.303149839036+0.858337555024j))+((-0.273258975388-0.162990564443j))*0.5**o
            arg[(3, 0, 2, 1)]=(-0.910606710391-0.285724024534j)*x[0]**o + ((-0.996205270708+0.71298595066j))*x[0] + ((0.794420356466-0.0848055572578j))*x[1]**o + ((-0.963709942224+0.136041508849j))*x[1]
            ref[(3, 0, 2, 1)]=(0.794420356466-0.0848055572578j)/(o+1.)+((-0.979957606466+0.424513729754j))+((-0.910606710391-0.285724024534j))*0.5**o
            arg[(3, 1, 0, 0)]=(-0.868604284615-0.922448400593j)*x[0]**o + ((0.368841006581+0.472192126208j))*x[0] + ((-0.828094770114-0.648627674166j))*x[1]**o + ((-0.935346046326-0.569896607713j))*x[1]
            ref[(3, 1, 0, 0)]=(-0.828094770114-0.648627674166j)/(o+1.)+((-0.283252519872-0.0488522407526j))+((-0.868604284615-0.922448400593j))*0.5**o
            arg[(3, 1, 0, 1)]=(-0.940669013397-0.735427174035j)*x[0]**o + ((0.217396323385+0.0668718571003j))*x[0] + ((-0.107729703096+0.934463614967j))*x[1]**o + ((-0.895754457903+0.832193614005j))*x[1]
            ref[(3, 1, 0, 1)]=(-0.107729703096+0.934463614967j)/(o+1.)+((-0.339179067259+0.449532735553j))+((-0.940669013397-0.735427174035j))*0.5**o
            arg[(3, 1, 1, 0)]=(-0.0128453907286+0.0292169871326j)*x[0]**o + ((0.504228204451+0.00749157589059j))*x[0] + ((-0.964057029869-0.255161611928j))*x[1]**o + ((0.985581766759-0.349784568158j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.964057029869-0.255161611928j)/(o+1.)+((0.744904985605-0.171146496134j))+((-0.0128453907286+0.0292169871326j))*0.5**o
            arg[(3, 1, 1, 1)]=(-0.885368630642-0.919805441204j)*x[0]**o + ((-0.347998042592-0.763744735245j))*x[0] + ((0.660227279926-0.674617693019j))*x[1]**o + ((-0.112877034907+0.476471833627j))*x[1]
            ref[(3, 1, 1, 1)]=(0.660227279926-0.674617693019j)/(o+1.)+((-0.230437538749-0.143636450809j))+((-0.885368630642-0.919805441204j))*0.5**o
            arg[(3, 1, 2, 0)]=(0.736192779233+0.400116160964j)*x[0]**o + ((-0.207424700277+0.975890079194j))*x[0] + ((-0.209611562406+0.931439867325j))*x[1]**o + ((0.818434124293+0.566479534486j))*x[1]
            ref[(3, 1, 2, 0)]=(-0.209611562406+0.931439867325j)/(o+1.)+((0.305504712008+0.77118480684j))+((0.736192779233+0.400116160964j))*0.5**o
            arg[(3, 1, 2, 1)]=(-0.714391221136+0.39960645669j)*x[0]**o + ((0.981012860869-0.718512096124j))*x[0] + ((-0.708373946632-0.588761914032j))*x[1]**o + ((-0.239244583095-0.950214887149j))*x[1]
            ref[(3, 1, 2, 1)]=(-0.708373946632-0.588761914032j)/(o+1.)+((0.370884138887-0.834363491637j))+((-0.714391221136+0.39960645669j))*0.5**o
            arg[(3, 2, 0, 0)]=(0.446049434461-0.622094610551j)*x[0]**o + ((0.567839232955+0.295678073734j))*x[0] + ((-0.755975792113-0.117035376822j))*x[1]**o + ((-0.552595396389+0.801399382443j))*x[1]
            ref[(3, 2, 0, 0)]=(-0.755975792113-0.117035376822j)/(o+1.)+((0.00762191828284+0.548538728088j))+((0.446049434461-0.622094610551j))*0.5**o
            arg[(3, 2, 0, 1)]=(0.138954791314+0.22819720733j)*x[0]**o + ((-0.21472921589-0.085930220537j))*x[0] + ((0.167492267544+0.914778732243j))*x[1]**o + ((-0.353838539199+0.705039329254j))*x[1]
            ref[(3, 2, 0, 1)]=(0.167492267544+0.914778732243j)/(o+1.)+((-0.284283877545+0.309554554358j))+((0.138954791314+0.22819720733j))*0.5**o
            arg[(3, 2, 1, 0)]=(0.898834477596-0.996392542226j)*x[0]**o + ((-0.11587678009+0.0348245141014j))*x[0] + ((0.0848773993696+0.952193940506j))*x[1]**o + ((0.140402641526-0.415596349949j))*x[1]
            ref[(3, 2, 1, 0)]=(0.0848773993696+0.952193940506j)/(o+1.)+((0.0122629307179-0.190385917924j))+((0.898834477596-0.996392542226j))*0.5**o
            arg[(3, 2, 1, 1)]=(-0.257180290683+0.787837590916j)*x[0]**o + ((-0.665334014163-0.00725244627705j))*x[0] + ((0.291271392432+0.435034444504j))*x[1]**o + ((0.35028508662+0.00882716530829j))*x[1]
            ref[(3, 2, 1, 1)]=(0.291271392432+0.435034444504j)/(o+1.)+((-0.157524463771+0.00078735951562j))+((-0.257180290683+0.787837590916j))*0.5**o
            arg[(3, 2, 2, 0)]=(-0.662163988924-0.653109802552j)*x[0]**o + ((-0.395999061127+0.326421757306j))*x[0] + ((-0.966374350078-0.105832550374j))*x[1]**o + ((0.699497313091-0.618662577411j))*x[1]
            ref[(3, 2, 2, 0)]=(-0.966374350078-0.105832550374j)/(o+1.)+((0.151749125982-0.146120410053j))+((-0.662163988924-0.653109802552j))*0.5**o
            arg[(3, 2, 2, 1)]=(-0.682928733593-0.800130613967j)*x[0]**o + ((0.425900584481-0.876025456573j))*x[0] + ((0.149569703321-0.427523226291j))*x[1]**o + ((-0.249134740432-0.824631780786j))*x[1]
            ref[(3, 2, 2, 1)]=(0.149569703321-0.427523226291j)/(o+1.)+((0.0883829220245-0.85032861868j))+((-0.682928733593-0.800130613967j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.844633006001+0.951216429994j)*x[0]**o + ((0.996298689369-0.896438912618j))*x[0] + ((-0.580739093602+0.131793583245j))*x[1]**o + ((0.734134581232+0.977935013356j))*x[1] + ((0.707861280464-0.917844704441j))*x[2]**o + ((-0.735220590555-0.584306231393j))*x[2]
            ref[(0, 0, 0, 0)]=(0.127122186861-0.786051121195j)/(o+1.)+((0.497606340023-0.251405065328j))+((0.844633006001+0.951216429994j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.232323443782+0.0984440662698j)*x[0]**o + ((-0.881837510383+0.383405530896j))*x[0] + ((-0.763724534957+0.564267297834j))*x[1]**o + ((-0.260412071596-0.677538234995j))*x[1] + ((-0.543395778339-0.460975921944j))*x[2]**o + ((0.0739514133322-0.371123799961j))*x[2]
            ref[(0, 0, 0, 1)]=(-1.3071203133+0.10329137589j)/(o+1.)+((-0.534149084324-0.33262825203j))+((-0.232323443782+0.0984440662698j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.244484156738+0.22028719665j)*x[0]**o + ((0.894212825288-0.621621411326j))*x[0] + ((0.240134918017+0.0232061149494j))*x[1]**o + ((-0.817097170889+0.422338764477j))*x[1] + ((-0.921808479936-0.792797191647j))*x[2]**o + ((0.870828932438+0.822064486449j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.681673561919-0.769591076698j)/(o+1.)+((0.473972293419+0.3113909198j))+((-0.244484156738+0.22028719665j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.65079074924+0.269020752613j)*x[0]**o + ((0.70413364603-0.158362090844j))*x[0] + ((0.652345834738+0.23370004797j))*x[1]**o + ((0.0805080086764+0.0762496627023j))*x[1] + ((-0.641415925341-0.976246827344j))*x[2]**o + ((-0.405250129236-0.623536758904j))*x[2]
            ref[(0, 0, 1, 1)]=(0.010929909397-0.742546779374j)/(o+1.)+((0.189695762735-0.352824593523j))+((0.65079074924+0.269020752613j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.800377670452+0.024853985259j)*x[0]**o + ((0.464689120746-0.23793771619j))*x[0] + ((0.389541516032-0.284286778251j))*x[1]**o + ((-0.116421136793-0.0020595570081j))*x[1] + ((0.0387306208458-0.796515425571j))*x[2]**o + ((0.293579444767-0.64040957496j))*x[2]
            ref[(0, 0, 2, 0)]=(0.428272136877-1.08080220382j)/(o+1.)+((0.32092371436-0.440203424079j))+((0.800377670452+0.024853985259j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.835360782114-0.439080490969j)*x[0]**o + ((0.135658942431+0.97006601211j))*x[0] + ((0.223873326862+0.509001354547j))*x[1]**o + ((0.294059150765+0.30149524964j))*x[1] + ((0.577849140057-0.801321546412j))*x[2]**o + ((0.842163258151-0.523019576002j))*x[2]
            ref[(0, 0, 2, 1)]=(0.801722466919-0.292320191865j)/(o+1.)+((0.635940675673+0.374270842874j))+((-0.835360782114-0.439080490969j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.617567620295+0.000505811180041j)*x[0]**o + ((-0.715389727081+0.626477745301j))*x[0] + ((-0.859222225301+0.281929250902j))*x[1]**o + ((0.324154192572+0.237413677306j))*x[1] + ((0.0625866712378+0.508026927204j))*x[2]**o + ((-0.0172771991136+0.932351780629j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.796635554063+0.789956178105j)/(o+1.)+((-0.204256366811+0.898121601618j))+((0.617567620295+0.000505811180041j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.423586334748+0.279836636819j)*x[0]**o + ((0.318642855501+0.725032461291j))*x[0] + ((0.968340984396-0.21303886405j))*x[1]**o + ((-0.877719585352-0.290387628045j))*x[1] + ((0.864260709551+0.325982173858j))*x[2]**o + ((0.851502582949+0.426692889294j))*x[2]
            ref[(0, 1, 0, 1)]=(1.83260169395+0.112943309808j)/(o+1.)+((0.146212926549+0.43066886127j))+((-0.423586334748+0.279836636819j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.0592066497638+0.688777907518j)*x[0]**o + ((-0.975345824706+0.510450343522j))*x[0] + ((0.926933904784+0.412284035067j))*x[1]**o + ((0.317377907349+0.271341818588j))*x[1] + ((-0.0707862762069+0.265422841869j))*x[2]**o + ((0.492674175141-0.171173757594j))*x[2]
            ref[(0, 1, 1, 0)]=(0.856147628577+0.677706876936j)/(o+1.)+((-0.082646871108+0.305309202258j))+((-0.0592066497638+0.688777907518j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.618436658552-0.741932232326j)*x[0]**o + ((0.388578484189+0.457409820273j))*x[0] + ((-0.0516362840865-0.601585573431j))*x[1]**o + ((-0.200390355616-0.610953083561j))*x[1] + ((0.902853789393-0.992538257325j))*x[2]**o + ((-0.748582240356-0.221829955943j))*x[2]
            ref[(0, 1, 1, 1)]=(0.851217505307-1.59412383076j)/(o+1.)+((-0.280197055891-0.187686609616j))+((-0.618436658552-0.741932232326j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.51803679995+0.495233947252j)*x[0]**o + ((0.333471157037-0.695015400255j))*x[0] + ((-0.458896022375+0.487454916895j))*x[1]**o + ((-0.0219626033709-0.0692017570006j))*x[1] + ((-0.853444846834-0.182724482282j))*x[2]**o + ((-0.94129532981+0.812786181087j))*x[2]
            ref[(0, 1, 2, 0)]=(-1.31234086921+0.304730434614j)/(o+1.)+((-0.314893388072+0.0242845119157j))+((-0.51803679995+0.495233947252j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.278011325322-0.699228449474j)*x[0]**o + ((-0.479642811592+0.941442997937j))*x[0] + ((0.813328387132+0.593972072329j))*x[1]**o + ((0.930673025584-0.511260131599j))*x[1] + ((-0.294759908153-0.519214478871j))*x[2]**o + ((0.434212410913-0.369658077874j))*x[2]
            ref[(0, 1, 2, 1)]=(0.518568478979+0.0747575934587j)/(o+1.)+((0.442621312452+0.0302623942318j))+((0.278011325322-0.699228449474j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.916531931517+0.444248164716j)*x[0]**o + ((-0.919423173389-0.462781958531j))*x[0] + ((0.763461977658+0.232720943684j))*x[1]**o + ((0.708792229492-0.366292262454j))*x[1] + ((-0.557582613546+0.364241524614j))*x[2]**o + ((-0.727861436941-0.158852124853j))*x[2]
            ref[(0, 2, 0, 0)]=(0.205879364112+0.596962468298j)/(o+1.)+((-0.469246190419-0.493963172919j))+((-0.916531931517+0.444248164716j))*0.5**o
            arg[(0, 2, 0, 1)]=(-0.898200360703+0.679461507063j)*x[0]**o + ((0.313458141831-0.0145215677198j))*x[0] + ((-0.712724599589+0.907499911013j))*x[1]**o + ((-0.878110736701+0.388579368574j))*x[1] + ((-0.414860979952-0.814546088832j))*x[2]**o + ((0.561466119783-0.334908216541j))*x[2]
            ref[(0, 2, 0, 1)]=(-1.12758557954+0.0929538221807j)/(o+1.)+((-0.00159323754351+0.0195747921569j))+((-0.898200360703+0.679461507063j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.210907508387+0.531395585991j)*x[0]**o + ((-0.737965149884-0.489117790274j))*x[0] + ((-0.192188231917-0.863552865807j))*x[1]**o + ((0.910782848921-0.622573557757j))*x[1] + ((0.0523566530021-0.234191327671j))*x[2]**o + ((-0.819901926753+0.94883446568j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.139831578915-1.09774419348j)/(o+1.)+((-0.323542113858-0.081428441175j))+((0.210907508387+0.531395585991j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.206009211401-0.304856364927j)*x[0]**o + ((0.271703803943+0.469253252453j))*x[0] + ((-0.657569660844-0.972024442148j))*x[1]**o + ((0.270080234332-0.932203777258j))*x[1] + ((0.730748842912+0.876225566595j))*x[2]**o + ((0.208146297824-0.722644513757j))*x[2]
            ref[(0, 2, 1, 1)]=(0.0731791820682-0.0957988755534j)/(o+1.)+((0.374965168049-0.592797519281j))+((-0.206009211401-0.304856364927j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.166427340745+0.628781051135j)*x[0]**o + ((-0.909457603561+0.968769567539j))*x[0] + ((0.00379748371898-0.422802600523j))*x[1]**o + ((0.391526666818+0.365013557693j))*x[1] + ((-0.0973730235615+0.144845244989j))*x[2]**o + ((0.924323806569+0.164868066582j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.0935755398425-0.277957355534j)/(o+1.)+((0.203196434913+0.749325595907j))+((-0.166427340745+0.628781051135j))*0.5**o
            arg[(0, 2, 2, 1)]=(-0.016417062681-0.0268907669042j)*x[0]**o + ((-0.384219649591-0.666031803998j))*x[0] + ((-0.936854439626-0.54358746197j))*x[1]**o + ((-0.67507163796+0.92122930733j))*x[1] + ((-0.231305222603-0.764578040605j))*x[2]**o + ((-0.539313001373-0.151363334516j))*x[2]
            ref[(0, 2, 2, 1)]=(-1.16815966223-1.30816550258j)/(o+1.)+((-0.799302144462+0.0519170844083j))+((-0.016417062681-0.0268907669042j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.0023523042781+0.226177890373j)*x[0]**o + ((0.497882686515+0.497260710875j))*x[0] + ((0.274249673556+0.790592952713j))*x[1]**o + ((0.900004657595+0.626032990289j))*x[1] + ((0.405768618244+0.80211953308j))*x[2]**o + ((0.823300513251+0.126220886828j))*x[2]
            ref[(1, 0, 0, 0)]=(0.6800182918+1.59271248579j)/(o+1.)+((1.11059392868+0.624757293996j))+((-0.0023523042781+0.226177890373j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.838858193022-0.988844557743j)*x[0]**o + ((0.985905587374+0.267415189878j))*x[0] + ((0.648211029668+0.347596801942j))*x[1]**o + ((-0.394112929722-0.510806906496j))*x[1] + ((-0.35228215321-0.265685150061j))*x[2]**o + ((0.0283946781003+0.518484681218j))*x[2]
            ref[(1, 0, 0, 1)]=(0.295928876458+0.0819116518803j)/(o+1.)+((0.310093667876+0.1375464823j))+((-0.838858193022-0.988844557743j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.169399551384-0.808943700391j)*x[0]**o + ((-0.330833434376+0.210132661128j))*x[0] + ((0.358251138321+0.514648344395j))*x[1]**o + ((-0.693574870599-0.0194733623569j))*x[1] + ((-0.279274735815+0.0932146340466j))*x[2]**o + ((0.420955303782+0.49744918668j))*x[2]
            ref[(1, 0, 1, 0)]=(0.0789764025068+0.607862978441j)/(o+1.)+((-0.301726500596+0.344054242725j))+((-0.169399551384-0.808943700391j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.45889788617-0.655761793812j)*x[0]**o + ((-0.905095777463-0.779382753159j))*x[0] + ((-0.139162093945-0.342029380669j))*x[1]**o + ((0.149339550626+0.409019918012j))*x[1] + ((0.251256413837-0.369081582095j))*x[2]**o + ((-0.353155991692+0.453120258566j))*x[2]
            ref[(1, 0, 1, 1)]=(0.112094319892-0.711110962764j)/(o+1.)+((-0.554456109264+0.0413787117092j))+((-0.45889788617-0.655761793812j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.972153617959+0.0380021466793j)*x[0]**o + ((0.67726124381+0.00512819067505j))*x[0] + ((-0.551610637263-0.366747699125j))*x[1]**o + ((0.407484197645+0.512302956613j))*x[1] + ((-0.452498958011+0.170036267927j))*x[2]**o + ((0.946183099843+0.241538700518j))*x[2]
            ref[(1, 0, 2, 0)]=(-1.00410959527-0.196711431199j)/(o+1.)+((1.01546427065+0.379484923903j))+((-0.972153617959+0.0380021466793j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.540428661693+0.571006379228j)*x[0]**o + ((-0.686051189732+0.918055283512j))*x[0] + ((0.744790785316-0.0660789023225j))*x[1]**o + ((-0.387335042328+0.00781145096713j))*x[1] + ((0.887448292514+0.680875772494j))*x[2]**o + ((-0.0732886438428-0.121495343388j))*x[2]
            ref[(1, 0, 2, 1)]=(1.63223907783+0.614796870172j)/(o+1.)+((-0.573337437952+0.402185695546j))+((0.540428661693+0.571006379228j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.850031454124-0.738475404402j)*x[0]**o + ((-0.446282294317+0.191224558285j))*x[0] + ((0.455613554083-0.0895650617015j))*x[1]**o + ((0.845386890612+0.775458311533j))*x[1] + ((0.972757347117+0.740559150164j))*x[2]**o + ((-0.096394789014-0.247254949627j))*x[2]
            ref[(1, 1, 0, 0)]=(1.4283709012+0.650994088463j)/(o+1.)+((0.15135490364+0.359713960095j))+((0.850031454124-0.738475404402j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.811735119027+0.94983308235j)*x[0]**o + ((-0.817400354182-0.654343080579j))*x[0] + ((0.0337637220772+0.912817216503j))*x[1]**o + ((-0.947268972227-0.505290786222j))*x[1] + ((-0.471430145256-0.0198990418343j))*x[2]**o + ((0.674186753458+0.89403542391j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.437666423178+0.892918174669j)/(o+1.)+((-0.545241286476-0.132799221445j))+((0.811735119027+0.94983308235j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.278209360554-0.397510117804j)*x[0]**o + ((-0.085901064889-0.0440308344518j))*x[0] + ((0.0200095277079+0.838616933664j))*x[1]**o + ((-0.12998219462-0.393459526118j))*x[1] + ((0.36464607078-0.93309138737j))*x[2]**o + ((0.287671947036-0.683543222031j))*x[2]
            ref[(1, 1, 1, 0)]=(0.384655598488-0.0944744537053j)/(o+1.)+((0.0358943437636-0.5605167913j))+((-0.278209360554-0.397510117804j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.865858217699+0.979557188568j)*x[0]**o + ((0.739024109533+0.305651696781j))*x[0] + ((-0.081391580586-0.244253085173j))*x[1]**o + ((-0.836638113755-0.562293159179j))*x[1] + ((-0.594454238986-0.504016863682j))*x[2]**o + ((-0.915016987887+0.579748219959j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.675845819572-0.748269948854j)/(o+1.)+((-0.506315496055+0.161553378781j))+((0.865858217699+0.979557188568j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.406595990184-0.448081506714j)*x[0]**o + ((-0.455886648047-0.227107064726j))*x[0] + ((-0.342222838159-0.433735774807j))*x[1]**o + ((-0.345269156657-0.0729513933159j))*x[1] + ((-0.402172235863+0.136123440758j))*x[2]**o + ((-0.567129178463+0.451782395178j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.744395074023-0.297612334048j)/(o+1.)+((-0.684142491584+0.0758619685683j))+((0.406595990184-0.448081506714j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.223235059296-0.429481096185j)*x[0]**o + ((0.484898743408+0.978701685732j))*x[0] + ((0.0401134020801+0.797416230927j))*x[1]**o + ((0.141474118228-0.632041228524j))*x[1] + ((0.661840521776-0.762270559201j))*x[2]**o + ((-0.502684584584-0.197606198172j))*x[2]
            ref[(1, 1, 2, 1)]=(0.701953923856+0.0351456717264j)/(o+1.)+((0.0618441385262+0.0745271295183j))+((0.223235059296-0.429481096185j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.172461513169+0.478609140836j)*x[0]**o + ((-0.581610353486+0.390548985512j))*x[0] + ((0.414349542751-0.410038134352j))*x[1]**o + ((0.0126993438904-0.236495687948j))*x[1] + ((0.152871718396-0.58701620607j))*x[2]**o + ((-0.848929540642+0.464893567349j))*x[2]
            ref[(1, 2, 0, 0)]=(0.567221261148-0.997054340422j)/(o+1.)+((-0.708920275119+0.309473432457j))+((-0.172461513169+0.478609140836j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.994569368031+0.0590638424425j)*x[0]**o + ((-0.147105942599-0.548082521154j))*x[0] + ((-0.709774935795-0.45851208118j))*x[1]**o + ((-0.954220215297-0.803105886704j))*x[1] + ((0.245473106343-0.456745261158j))*x[2]**o + ((-0.847380542364-0.849558142146j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.464301829452-0.915257342338j)/(o+1.)+((-0.97435335013-1.100373275j))+((0.994569368031+0.0590638424425j))*0.5**o
            arg[(1, 2, 1, 0)]=(0.414347355442-0.370633111803j)*x[0]**o + ((0.296891857874-0.247844090113j))*x[0] + ((-0.698337610096+0.999105891921j))*x[1]**o + ((-0.0468571692916+0.788066572341j))*x[1] + ((-0.312772106037-0.152064189644j))*x[2]**o + ((-0.0919509558643+0.59863549328j))*x[2]
            ref[(1, 2, 1, 0)]=(-1.01110971613+0.847041702277j)/(o+1.)+((0.0790418663591+0.569428987754j))+((0.414347355442-0.370633111803j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.853813829329+0.87312612039j)*x[0]**o + ((0.713045176685+0.066155505592j))*x[0] + ((-0.0986780017271+0.147510278796j))*x[1]**o + ((-0.201786023287+0.599226288385j))*x[1] + ((-0.55974252234+0.641287380711j))*x[2]**o + ((0.904348044634+0.127916548913j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.658420524067+0.788797659507j)/(o+1.)+((0.707803599016+0.396649171445j))+((-0.853813829329+0.87312612039j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.310194189566-0.861916839199j)*x[0]**o + ((0.122930518765+0.803349286724j))*x[0] + ((0.84177952132-0.488526433146j))*x[1]**o + ((-0.413703939025+0.117137131786j))*x[1] + ((-0.243370734935-0.724358884196j))*x[2]**o + ((-0.858584531015-0.95708710167j))*x[2]
            ref[(1, 2, 2, 0)]=(0.598408786385-1.21288531734j)/(o+1.)+((-0.574678975637-0.0183003415801j))+((-0.310194189566-0.861916839199j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.934010060316-0.836692939498j)*x[0]**o + ((0.444720224855-0.454004235501j))*x[0] + ((0.173421426438-0.547103844002j))*x[1]**o + ((-0.424247221585-0.0928599235507j))*x[1] + ((-0.657448033193+0.645129547895j))*x[2]**o + ((-0.619284975115-0.243606391379j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.484026606755+0.0980257038934j)/(o+1.)+((-0.299405985922-0.395235275216j))+((0.934010060316-0.836692939498j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.438374732551+0.392721072348j)*x[0]**o + ((0.358267294538-0.950889688272j))*x[0] + ((-0.636075597201+0.755087098399j))*x[1]**o + ((-0.964471979591+0.65291324316j))*x[1] + ((-0.478571490086-0.34672438302j))*x[2]**o + ((0.160483772655-0.41092866581j))*x[2]
            ref[(2, 0, 0, 0)]=(-1.11464708729+0.408362715379j)/(o+1.)+((-0.222860456199-0.354452555461j))+((0.438374732551+0.392721072348j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.541878884075+0.40565237828j)*x[0]**o + ((-0.521252405776+0.167320320178j))*x[0] + ((0.357628747255+0.759752730864j))*x[1]**o + ((0.546354063633-0.707544087297j))*x[1] + ((-0.177408127019-0.771373404119j))*x[2]**o + ((0.086756861796+0.166992695776j))*x[2]
            ref[(2, 0, 0, 1)]=(0.180220620236-0.0116206732556j)/(o+1.)+((0.0559292598266-0.186615535672j))+((-0.541878884075+0.40565237828j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.894850850063+0.690701368425j)*x[0]**o + ((0.423018623626+0.430468435221j))*x[0] + ((-0.669775768464-0.529244625606j))*x[1]**o + ((-0.353497110702-0.982772966377j))*x[1] + ((0.651657993436+0.57318303388j))*x[2]**o + ((-0.0647409815784-0.80860643424j))*x[2]
            ref[(2, 0, 1, 0)]=(-0.0181177750287+0.0439384082741j)/(o+1.)+((0.00239026567247-0.680455482698j))+((-0.894850850063+0.690701368425j))*0.5**o
            arg[(2, 0, 1, 1)]=(0.561882143123-0.240136328694j)*x[0]**o + ((0.604579848549-0.209256248056j))*x[0] + ((0.535500661383-0.497451827584j))*x[1]**o + ((0.800880521077-0.174683149825j))*x[1] + ((-0.93342597946+0.529029381886j))*x[2]**o + ((-0.491920403255-0.606014388824j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.397925318076+0.0315775543019j)/(o+1.)+((0.456769983186-0.494976893352j))+((0.561882143123-0.240136328694j))*0.5**o
            arg[(2, 0, 2, 0)]=(0.0478127400861+0.455144259011j)*x[0]**o + ((0.775883784676-0.333010827958j))*x[0] + ((-0.950563790359+0.349537642755j))*x[1]**o + ((0.677116490773-0.405450165016j))*x[1] + ((-0.570402279581+0.0230334070859j))*x[2]**o + ((-0.502653561376+0.943089431741j))*x[2]
            ref[(2, 0, 2, 0)]=(-1.52096606994+0.372571049841j)/(o+1.)+((0.475173357036+0.102314219383j))+((0.0478127400861+0.455144259011j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.116359972427-0.74404757669j)*x[0]**o + ((-0.751189692019-0.237493658681j))*x[0] + ((0.547397423951+0.30530486242j))*x[1]**o + ((-0.885156190893+0.485613166017j))*x[1] + ((-0.637541770513+0.821876496249j))*x[2]**o + ((-0.883536143054-0.0765771280111j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.0901443465618+1.12718135867j)/(o+1.)+((-1.25994101298+0.0857711896624j))+((0.116359972427-0.74404757669j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.666158862927-0.131834476805j)*x[0]**o + ((-0.485499416187-0.62972951282j))*x[0] + ((-0.330368532123-0.958175210555j))*x[1]**o + ((0.115828854757+0.740464026923j))*x[1] + ((0.706060000242+0.586887826244j))*x[2]**o + ((-0.650089876198-0.287282617129j))*x[2]
            ref[(2, 1, 0, 0)]=(0.375691468119-0.371287384311j)/(o+1.)+((-0.509880218814-0.0882740515128j))+((-0.666158862927-0.131834476805j))*0.5**o
            arg[(2, 1, 0, 1)]=(0.470923870407+0.760149760613j)*x[0]**o + ((0.0370543564182-0.0867621328338j))*x[0] + ((-0.646533392625-0.938223261683j))*x[1]**o + ((-0.893767576475+0.472241560187j))*x[1] + ((0.440366977477+0.981290873716j))*x[2]**o + ((-0.0822125684512-0.449067551538j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.206166415148+0.0430676120323j)/(o+1.)+((-0.469462894254-0.0317940620924j))+((0.470923870407+0.760149760613j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.486297427308+0.626153116675j)*x[0]**o + ((-0.514257663922-0.411910292614j))*x[0] + ((0.575830144179+0.411954268779j))*x[1]**o + ((0.106824145643-0.569239104907j))*x[1] + ((-0.1947756419-0.0343158620276j))*x[2]**o + ((0.56161827686+0.448163052666j))*x[2]
            ref[(2, 1, 1, 0)]=(0.381054502279+0.377638406751j)/(o+1.)+((0.0770923792906-0.266493172428j))+((0.486297427308+0.626153116675j))*0.5**o
            arg[(2, 1, 1, 1)]=(0.219885442649-0.339515381333j)*x[0]**o + ((-0.196724444058+0.282720742041j))*x[0] + ((0.641701450555+0.351324895526j))*x[1]**o + ((0.610670404496+0.397300958391j))*x[1] + ((-0.652768313919+0.484087137697j))*x[2]**o + ((0.568675885529+0.982177168407j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.0110668633637+0.835412033223j)/(o+1.)+((0.491310922983+0.831099434419j))+((0.219885442649-0.339515381333j))*0.5**o
            arg[(2, 1, 2, 0)]=(0.0311913006471-0.613110379421j)*x[0]**o + ((0.522198648123-0.297602963591j))*x[0] + ((0.393049184319+0.169864662253j))*x[1]**o + ((-0.604461521614-0.471577322452j))*x[1] + ((-0.245234572783-0.227335452417j))*x[2]**o + ((-0.301615921133+0.0813155882082j))*x[2]
            ref[(2, 1, 2, 0)]=(0.147814611536-0.0574707901643j)/(o+1.)+((-0.191939397312-0.343932348918j))+((0.0311913006471-0.613110379421j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.52041419432-0.653822994417j)*x[0]**o + ((0.0964136636426-0.648693023702j))*x[0] + ((-0.589107525112-0.539616490843j))*x[1]**o + ((-0.732857682839+0.677791810235j))*x[1] + ((-0.676542568573+0.919676776473j))*x[2]**o + ((-0.346567342415+0.682255970411j))*x[2]
            ref[(2, 1, 2, 1)]=(-1.26565009369+0.38006028563j)/(o+1.)+((-0.491505680806+0.355677378472j))+((-0.52041419432-0.653822994417j))*0.5**o
            arg[(2, 2, 0, 0)]=(0.115234322137-0.0343123559222j)*x[0]**o + ((-0.531537775845+0.848599199938j))*x[0] + ((-0.124917283001+0.269834845631j))*x[1]**o + ((-0.642463607326-0.701413036423j))*x[1] + ((-0.905996577796+0.257181664882j))*x[2]**o + ((0.998676363097+0.993344475394j))*x[2]
            ref[(2, 2, 0, 0)]=(-1.0309138608+0.527016510513j)/(o+1.)+((-0.0876625100375+0.570265319455j))+((0.115234322137-0.0343123559222j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.57792122525+0.410598232594j)*x[0]**o + ((-0.368270398002+0.993360461214j))*x[0] + ((0.266392626044-0.307198562922j))*x[1]**o + ((-0.380552897415+0.64245688165j))*x[1] + ((-0.367836645401+0.623088101225j))*x[2]**o + ((0.946765250773+0.897091863597j))*x[2]
            ref[(2, 2, 0, 1)]=(-0.101444019357+0.315889538303j)/(o+1.)+((0.0989709776778+1.26645460323j))+((0.57792122525+0.410598232594j))*0.5**o
            arg[(2, 2, 1, 0)]=(-0.348902975876-0.32805748144j)*x[0]**o + ((-0.525962876742-0.319538912169j))*x[0] + ((0.368371470599-0.263999328103j))*x[1]**o + ((0.741193177508-0.94698307865j))*x[1] + ((0.999323102146+0.555819458694j))*x[2]**o + ((0.793870713825-0.731039569659j))*x[2]
            ref[(2, 2, 1, 0)]=(1.36769457275+0.291820130591j)/(o+1.)+((0.504550507295-0.998780780239j))+((-0.348902975876-0.32805748144j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.0902767017683+0.15464243989j)*x[0]**o + ((0.466208077065-0.43819665078j))*x[0] + ((-0.396282241129+0.734910797713j))*x[1]**o + ((-0.797371571453+0.809453828315j))*x[1] + ((0.606854593179+0.873001820631j))*x[2]**o + ((0.881753367102-0.966788724882j))*x[2]
            ref[(2, 2, 1, 1)]=(0.21057235205+1.60791261834j)/(o+1.)+((0.275294936357-0.297765773673j))+((0.0902767017683+0.15464243989j))*0.5**o
            arg[(2, 2, 2, 0)]=(0.875208756337-0.0767044578762j)*x[0]**o + ((-0.691345465574-0.916181892269j))*x[0] + ((0.0818626088552+0.630051740939j))*x[1]**o + ((0.47591515072+0.947796967117j))*x[1] + ((0.282156675046-0.376944154145j))*x[2]**o + ((0.834657909464+0.195005300369j))*x[2]
            ref[(2, 2, 2, 0)]=(0.364019283902+0.253107586794j)/(o+1.)+((0.309613797305+0.113310187608j))+((0.875208756337-0.0767044578762j))*0.5**o
            arg[(2, 2, 2, 1)]=(0.0688609020898-0.839401972261j)*x[0]**o + ((-0.96441369637-0.43401011058j))*x[0] + ((-0.586185481984+0.885566005887j))*x[1]**o + ((0.47963984714+0.663241088585j))*x[1] + ((0.113056344696+0.578287983095j))*x[2]**o + ((-0.973100775363-0.56572147637j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.473129137288+1.46385398898j)/(o+1.)+((-0.728937312296-0.168245249182j))+((0.0688609020898-0.839401972261j))*0.5**o
            arg[(3, 0, 0, 0)]=(0.325892221904-0.76476799497j)*x[0]**o + ((0.14443651253+0.818565728641j))*x[0] + ((-0.208762141901-0.0274315588522j))*x[1]**o + ((0.243983647818-0.504287991656j))*x[1] + ((0.400060968507-0.629948954588j))*x[2]**o + ((0.085624121601-0.573774585932j))*x[2]
            ref[(3, 0, 0, 0)]=(0.191298826606-0.65738051344j)/(o+1.)+((0.237022140975-0.129748424473j))+((0.325892221904-0.76476799497j))*0.5**o
            arg[(3, 0, 0, 1)]=(0.0505945368152+0.306846578871j)*x[0]**o + ((0.101956299211-0.405301265814j))*x[0] + ((-0.706032264966+0.723526095814j))*x[1]**o + ((0.157907501724-0.87379042652j))*x[1] + ((0.785977092254-0.717371250285j))*x[2]**o + ((-0.78420709966+0.601537573457j))*x[2]
            ref[(3, 0, 0, 1)]=(0.0799448272882+0.00615484552914j)/(o+1.)+((-0.262171649363-0.338777059438j))+((0.0505945368152+0.306846578871j))*0.5**o
            arg[(3, 0, 1, 0)]=(-0.0109536662627+0.322100163557j)*x[0]**o + ((0.489267660392-0.671182471865j))*x[0] + ((0.841896784-0.855682230679j))*x[1]**o + ((0.159026203846+0.492379279986j))*x[1] + ((0.202579992576+0.822404049348j))*x[2]**o + ((0.154285326736+0.322802727432j))*x[2]
            ref[(3, 0, 1, 0)]=(1.04447677658-0.0332781813306j)/(o+1.)+((0.401289595487+0.0719997677764j))+((-0.0109536662627+0.322100163557j))*0.5**o
            arg[(3, 0, 1, 1)]=(-0.828269415858+0.263058662411j)*x[0]**o + ((-0.0423544571698-0.0397297722832j))*x[0] + ((0.875639471169+0.945353736748j))*x[1]**o + ((0.409653114393+0.818281070456j))*x[1] + ((0.78563994046+0.0640910266423j))*x[2]**o + ((0.116333640051-0.954669560326j))*x[2]
            ref[(3, 0, 1, 1)]=(1.66127941163+1.00944476339j)/(o+1.)+((0.241816148637-0.0880591310764j))+((-0.828269415858+0.263058662411j))*0.5**o
            arg[(3, 0, 2, 0)]=(0.22739126086-0.439256689977j)*x[0]**o + ((0.936149252106-0.888894163368j))*x[0] + ((-0.30797710472-0.823254655027j))*x[1]**o + ((0.16096177527-0.864676129095j))*x[1] + ((-0.204206906512-0.267533089169j))*x[2]**o + ((-0.460323555134+0.193840442715j))*x[2]
            ref[(3, 0, 2, 0)]=(-0.512184011232-1.0907877442j)/(o+1.)+((0.318393736121-0.779864924874j))+((0.22739126086-0.439256689977j))*0.5**o
            arg[(3, 0, 2, 1)]=(-0.143725747452+0.587469975725j)*x[0]**o + ((0.335166337705+0.066313213649j))*x[0] + ((0.432416781102-0.103176233167j))*x[1]**o + ((-0.266974139286-0.242071848855j))*x[1] + ((0.448172909766+0.531491671112j))*x[2]**o + ((0.290553122034+0.287378977486j))*x[2]
            ref[(3, 0, 2, 1)]=(0.880589690868+0.428315437945j)/(o+1.)+((0.179372660227+0.0558101711401j))+((-0.143725747452+0.587469975725j))*0.5**o
            arg[(3, 1, 0, 0)]=(-0.248926844674+0.971466656683j)*x[0]**o + ((-0.696729297043-0.345595692722j))*x[0] + ((0.0609308234262+0.0782610697923j))*x[1]**o + ((0.856315907004-0.678084356907j))*x[1] + ((0.718059584608+0.968363617573j))*x[2]**o + ((-0.815932776844+0.817600307066j))*x[2]
            ref[(3, 1, 0, 0)]=(0.778990408034+1.04662468737j)/(o+1.)+((-0.328173083442-0.103039871282j))+((-0.248926844674+0.971466656683j))*0.5**o
            arg[(3, 1, 0, 1)]=(0.175900038799+0.776763100037j)*x[0]**o + ((0.712776158548+0.7011248768j))*x[0] + ((0.0119011484563+0.43249053862j))*x[1]**o + ((0.164285146197+0.291155210766j))*x[1] + ((-0.226166026548-0.138119509784j))*x[2]**o + ((-0.686200337184-0.499954761696j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.214264878092+0.294371028835j)/(o+1.)+((0.0954304837808+0.246162662935j))+((0.175900038799+0.776763100037j))*0.5**o
            arg[(3, 1, 1, 0)]=(-0.7132782381+0.748557973157j)*x[0]**o + ((0.876669407098+0.533278762007j))*x[0] + ((-0.354729159185+0.505391069654j))*x[1]**o + ((0.485401238337+0.126166144904j))*x[1] + ((0.434423325478+0.105479490801j))*x[2]**o + ((0.420449018413-0.724678479665j))*x[2]
            ref[(3, 1, 1, 0)]=(0.079694166293+0.610870560455j)/(o+1.)+((0.891259831924-0.032616786377j))+((-0.7132782381+0.748557973157j))*0.5**o
            arg[(3, 1, 1, 1)]=(0.576627149399+0.866361432724j)*x[0]**o + ((-0.735083718712-0.966957705146j))*x[0] + ((-0.497359726164-0.520927002918j))*x[1]**o + ((-0.787812925413-0.56035465128j))*x[1] + ((0.786696166309+0.777077562614j))*x[2]**o + ((-0.932843030016+0.368636909493j))*x[2]
            ref[(3, 1, 1, 1)]=(0.289336440145+0.256150559696j)/(o+1.)+((-1.22786983707-0.579337723466j))+((0.576627149399+0.866361432724j))*0.5**o
            arg[(3, 1, 2, 0)]=(-0.0222006297312+0.687210319802j)*x[0]**o + ((-0.171816469728-0.673814561407j))*x[0] + ((-0.454860439449+0.821702562583j))*x[1]**o + ((0.481805053223+0.844832542363j))*x[1] + ((0.358627446291-0.171143588427j))*x[2]**o + ((0.346161949767+0.841901572234j))*x[2]
            ref[(3, 1, 2, 0)]=(-0.0962329931573+0.650558974156j)/(o+1.)+((0.328075266631+0.506459776595j))+((-0.0222006297312+0.687210319802j))*0.5**o
            arg[(3, 1, 2, 1)]=(0.145988714286-0.455830290006j)*x[0]**o + ((-0.00315449138558-0.546767229035j))*x[0] + ((-0.0294140214312-0.868870441375j))*x[1]**o + ((0.139381531288+0.371353112679j))*x[1] + ((-0.974433214812+0.012277320398j))*x[2]**o + ((-0.748127495283-0.85362955823j))*x[2]
            ref[(3, 1, 2, 1)]=(-1.00384723624-0.856593120977j)/(o+1.)+((-0.30595022769-0.514521837293j))+((0.145988714286-0.455830290006j))*0.5**o
            arg[(3, 2, 0, 0)]=(-0.391541168446+0.322558391785j)*x[0]**o + ((0.608288136072+0.275784715159j))*x[0] + ((0.604618238865-0.600272483479j))*x[1]**o + ((-0.298547973752+0.939936982116j))*x[1] + ((0.432004684936+0.159365600405j))*x[2]**o + ((0.766057352691-0.518505327222j))*x[2]
            ref[(3, 2, 0, 0)]=(1.0366229238-0.440906883074j)/(o+1.)+((0.537898757506+0.348608185026j))+((-0.391541168446+0.322558391785j))*0.5**o
            arg[(3, 2, 0, 1)]=(0.194147344948-0.863455649764j)*x[0]**o + ((0.176528256089-0.545605512343j))*x[0] + ((-0.330773179228-0.995943048445j))*x[1]**o + ((-0.0204783072662+0.983672569992j))*x[1] + ((-0.0843306439916+0.608208531583j))*x[2]**o + ((-0.833881842304-0.516317200673j))*x[2]
            ref[(3, 2, 0, 1)]=(-0.415103823219-0.387734516862j)/(o+1.)+((-0.338915946741-0.0391250715121j))+((0.194147344948-0.863455649764j))*0.5**o
            arg[(3, 2, 1, 0)]=(0.233103261613+0.0795698854505j)*x[0]**o + ((0.0136973618044+0.665936859697j))*x[0] + ((-0.612411445432+0.26486984676j))*x[1]**o + ((-0.496998928545-0.184471660346j))*x[1] + ((-0.87137665895-0.429878769839j))*x[2]**o + ((0.973752945443-0.979981370022j))*x[2]
            ref[(3, 2, 1, 0)]=(-1.48378810438-0.165008923079j)/(o+1.)+((0.245225689351-0.249258085335j))+((0.233103261613+0.0795698854505j))*0.5**o
            arg[(3, 2, 1, 1)]=(-0.705281057146-0.0151409459343j)*x[0]**o + ((-0.805847117221-0.238353101987j))*x[0] + ((0.308105692453-0.109394312595j))*x[1]**o + ((-0.959962269793+0.0188587457897j))*x[1] + ((-0.610878662897+0.036498730697j))*x[2]**o + ((0.0161250685968-0.706994080589j))*x[2]
            ref[(3, 2, 1, 1)]=(-0.302772970444-0.0728955818979j)/(o+1.)+((-0.874842159208-0.463244218393j))+((-0.705281057146-0.0151409459343j))*0.5**o
            arg[(3, 2, 2, 0)]=(-0.227190982882+0.232109824525j)*x[0]**o + ((0.660113065449+0.626312595705j))*x[0] + ((0.620127844137-0.380991040542j))*x[1]**o + ((-0.653917312603-0.380995210383j))*x[1] + ((0.161664557561-0.969670207198j))*x[2]**o + ((-0.696119198185-0.293099360294j))*x[2]
            ref[(3, 2, 2, 0)]=(0.781792401698-1.35066124774j)/(o+1.)+((-0.34496172267-0.023890987486j))+((-0.227190982882+0.232109824525j))*0.5**o
            arg[(3, 2, 2, 1)]=(-0.446167680297+0.65228618695j)*x[0]**o + ((0.606735993734+0.549059777849j))*x[0] + ((0.408966462731+0.3732754207j))*x[1]**o + ((-0.553498228648+0.578159888844j))*x[1] + ((0.729865615161-0.660166463166j))*x[2]**o + ((0.0701607079742+0.674520139292j))*x[2]
            ref[(3, 2, 2, 1)]=(1.13883207789-0.286891042466j)/(o+1.)+((0.0616992365303+0.900869902993j))+((-0.446167680297+0.65228618695j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.56512216384-0.0874856674643j)*x[0] + ((-0.734759248538+0.531681520962j))*x[1]
            ref=(-0.0848185423487+0.222097926749j)
        else:
            arg=(-0.398265831298+0.299000222939j)*x[0] + ((-0.265206381763-0.373370706626j))*x[1] + ((-0.265781491821-0.847266330384j))*x[2]
            ref=(-0.464626852441-0.460818407036j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.856318879278-0.0765847367273j)*x[0] + ((-0.942625329338-0.30007892568j))*x[1]
            ref[(0,)]=(-0.0431532250302-0.188331831203j)
            arg[(1,)]=(0.471308570782-0.495636102045j)*x[0] + ((-0.232638239776+0.918984734848j))*x[1]
            ref[(1,)]=(0.119335165503+0.211674316402j)
            arg[(2,)]=(-0.171997845086+0.26163457908j)*x[0] + ((-0.803630715047+0.505497191238j))*x[1]
            ref[(2,)]=(-0.487814280066+0.383565885159j)
            arg[(3,)]=(0.752258757259+0.989669522064j)*x[0] + ((0.0539720724019-0.389252167279j))*x[1]
            ref[(3,)]=(0.403115414831+0.300208677392j)
        else:
            arg[(0,)]=(-0.696469461848-0.650349022822j)*x[0] + ((-0.146488159836-0.680515609129j))*x[1] + ((-0.105841194478+0.321687552352j))*x[2]
            ref[(0,)]=(-0.474399408081-0.5045885398j)
            arg[(1,)]=(-0.928231318174-0.493966454208j)*x[0] + ((0.0871465568624-0.949017588788j))*x[1] + ((-0.70889966792-0.233838159971j))*x[2]
            ref[(1,)]=(-0.774992214615-0.838411101484j)
            arg[(2,)]=(-0.495430423365+0.569922267164j)*x[0] + ((0.320053873292+0.642528807772j))*x[1] + ((-0.688939617529-0.912897016329j))*x[2]
            ref[(2,)]=(-0.432158083801+0.149777029304j)
            arg[(3,)]=(-0.14170904386-0.2661233024j)*x[0] + ((0.753121759866+0.942855387539j))*x[1] + ((-0.972443675954-0.402251532695j))*x[2]
            ref[(3,)]=(-0.180515479974+0.137240276222j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.180120019457-0.72416325589j)*x[0] + ((0.236328318685+0.930971652334j))*x[1]
            ref[(0, 0)]=(0.208224169071+0.103404198222j)
            arg[(0, 1)]=(-0.293747964793+0.352060337453j)*x[0] + ((-0.147061101383+0.546604663743j))*x[1]
            ref[(0, 1)]=(-0.220404533088+0.449332500598j)
            arg[(0, 2)]=(-0.274812780854+0.54823264502j)*x[0] + ((-0.500103453935-0.373996079138j))*x[1]
            ref[(0, 2)]=(-0.387458117394+0.0871182829406j)
            arg[(0, 3)]=(0.932172865937-0.505194096548j)*x[0] + ((0.0324394303232-0.840952276674j))*x[1]
            ref[(0, 3)]=(0.48230614813-0.673073186611j)
            arg[(1, 0)]=(0.730899287904+0.695414625706j)*x[0] + ((0.606794845263-0.331004219955j))*x[1]
            ref[(1, 0)]=(0.668847066583+0.182205202876j)
            arg[(1, 1)]=(0.0732753665849+0.0139143011894j)*x[0] + ((-0.0989191487592+0.558267180242j))*x[1]
            ref[(1, 1)]=(-0.0128218910871+0.286090740716j)
            arg[(1, 2)]=(-0.259192620993+0.913515315964j)*x[0] + ((0.903877546862+0.637068675084j))*x[1]
            ref[(1, 2)]=(0.322342462934+0.775291995524j)
            arg[(1, 3)]=(-0.835754644387+0.420998454391j)*x[0] + ((-0.694671002256-0.793455508947j))*x[1]
            ref[(1, 3)]=(-0.765212823322-0.186228527278j)
        else:
            arg[(0, 0)]=(-0.246731220201+0.606821464632j)*x[0] + ((-0.126474565683+0.786254560914j))*x[1] + ((-0.933695920847+0.578133560842j))*x[2]
            ref[(0, 0)]=(-0.653450853365+0.985604793194j)
            arg[(0, 1)]=(-0.0299055670723+0.0822169084347j)*x[0] + ((-0.502841638551+0.0438894963149j))*x[1] + ((-0.472585047587-0.264157589818j))*x[2]
            ref[(0, 1)]=(-0.502666126605-0.0690255925343j)
            arg[(0, 2)]=(0.956642271585+0.681733721359j)*x[0] + ((0.853492988579+0.0915857966359j))*x[1] + ((0.16336291351-0.416247310545j))*x[2]
            ref[(0, 2)]=(0.986749086837+0.178536103725j)
            arg[(0, 3)]=(0.237507189187-0.324457820529j)*x[0] + ((-0.905332241982+0.19160202229j))*x[1] + ((0.995891566519+0.454957357513j))*x[2]
            ref[(0, 3)]=(0.164033256862+0.161050779637j)
            arg[(1, 0)]=(-0.252112797106+0.0937801022086j)*x[0] + ((-0.183667912139-0.927745804492j))*x[1] + ((0.843788972965-0.628085469288j))*x[2]
            ref[(1, 0)]=(0.20400413186-0.731025585786j)
            arg[(1, 1)]=(0.450915072445+0.965046264202j)*x[0] + ((0.717853338458+0.478512978094j))*x[1] + ((0.331146798443-0.0751695579029j))*x[2]
            ref[(1, 1)]=(0.749957604673+0.684194842196j)
            arg[(1, 2)]=(-0.862736300513-0.142761760189j)*x[0] + ((0.359254749564-0.0814147590658j))*x[1] + ((0.954546309128+0.884069526949j))*x[2]
            ref[(1, 2)]=(0.22553237909+0.329946503847j)
            arg[(1, 3)]=(-0.373790178003-0.259963984307j)*x[0] + ((0.318080665379-0.478677780726j))*x[1] + ((-0.458469700495+0.450982326146j))*x[2]
            ref[(1, 3)]=(-0.25708960656-0.143829719444j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2),w)
        ref=numpy.zeros((3, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.378070077889+0.534615406954j)*x[0] + ((0.798925024948+0.652983263396j))*x[1]
            ref[(0, 0, 0)]=(0.21042747353+0.593799335175j)
            arg[(0, 0, 1)]=(-0.580668358847-0.574097450251j)*x[0] + ((0.913802880388-0.100757335553j))*x[1]
            ref[(0, 0, 1)]=(0.166567260771-0.337427392902j)
            arg[(0, 1, 0)]=(-0.48790860363+0.97772137663j)*x[0] + ((-0.734800945502-0.282691755878j))*x[1]
            ref[(0, 1, 0)]=(-0.611354774566+0.347514810376j)
            arg[(0, 1, 1)]=(-0.671895567719-0.477495062424j)*x[0] + ((0.399625812986+0.0297868754291j))*x[1]
            ref[(0, 1, 1)]=(-0.136134877366-0.223854093497j)
            arg[(1, 0, 0)]=(-0.261358643558+0.462536782558j)*x[0] + ((0.13814850935-0.434405683576j))*x[1]
            ref[(1, 0, 0)]=(-0.0616050671036+0.014065549491j)
            arg[(1, 0, 1)]=(-0.373809006771+0.715008220131j)*x[0] + ((-0.843457480628-0.514512835153j))*x[1]
            ref[(1, 0, 1)]=(-0.6086332437+0.100247692489j)
            arg[(1, 1, 0)]=(-0.372456143091+0.729885275824j)*x[0] + ((-0.60410554174+0.48317151598j))*x[1]
            ref[(1, 1, 0)]=(-0.488280842416+0.606528395902j)
            arg[(1, 1, 1)]=(-0.914027912555+0.735387316026j)*x[0] + ((0.0638766127275-0.6563293753j))*x[1]
            ref[(1, 1, 1)]=(-0.425075649914+0.0395289703632j)
            arg[(2, 0, 0)]=(-0.88309017265+0.727896921674j)*x[0] + ((-0.715822802274+0.643979458498j))*x[1]
            ref[(2, 0, 0)]=(-0.799456487462+0.685938190086j)
            arg[(2, 0, 1)]=(-0.596623003491-0.94354956822j)*x[0] + ((0.431790803268-0.171576885371j))*x[1]
            ref[(2, 0, 1)]=(-0.0824161001117-0.557563226796j)
            arg[(2, 1, 0)]=(-0.208203172087-0.054691538564j)*x[0] + ((0.743382253577+0.94968454762j))*x[1]
            ref[(2, 1, 0)]=(0.267589540745+0.447496504528j)
            arg[(2, 1, 1)]=(-0.208157321381+0.116197812048j)*x[0] + ((-0.945519670938+0.70821512306j))*x[1]
            ref[(2, 1, 1)]=(-0.57683849616+0.412206467554j)
        else:
            arg[(0, 0, 0)]=(-0.268173228413-0.192961198256j)*x[0] + ((0.0713861118311-0.719975042055j))*x[1] + ((-0.982309945498+0.560027558981j))*x[2]
            ref[(0, 0, 0)]=(-0.58954853104-0.176454340665j)
            arg[(0, 0, 1)]=(-0.767409629588+0.789657206198j)*x[0] + ((-0.282140884478+0.390969773426j))*x[1] + ((0.612785892951+0.434565728674j))*x[2]
            ref[(0, 0, 1)]=(-0.218382310557+0.807596354149j)
            arg[(0, 1, 0)]=(0.92782410817-0.0313130798174j)*x[0] + ((-0.974575799253-0.59393536514j))*x[1] + ((0.0302992633654-0.252878073781j))*x[2]
            ref[(0, 1, 0)]=(-0.00822621385839-0.439063259369j)
            arg[(0, 1, 1)]=(0.946466060912+0.382523862564j)*x[0] + ((-0.892755661638+0.795783132483j))*x[1] + ((0.962454124982+0.804990287185j))*x[2]
            ref[(0, 1, 1)]=(0.508082262128+0.991648641116j)
            arg[(1, 0, 0)]=(0.94483746141-0.707632387314j)*x[0] + ((-0.799590086771-0.411083947759j))*x[1] + ((0.315604571583+0.315990689127j))*x[2]
            ref[(1, 0, 0)]=(0.230425973111-0.401362822974j)
            arg[(1, 0, 1)]=(-0.498018047441-0.323559938973j)*x[0] + ((0.0683255408809+0.562483013097j))*x[1] + ((-0.659933864602+0.984881633209j))*x[2]
            ref[(1, 0, 1)]=(-0.544813185581+0.611902353666j)
            arg[(1, 1, 0)]=(-0.344230901528+0.822990351438j)*x[0] + ((0.959299459555+0.532456883181j))*x[1] + ((-0.652919316222-0.585004908749j))*x[2]
            ref[(1, 1, 0)]=(-0.0189253790978+0.385221162935j)
            arg[(1, 1, 1)]=(-0.841153537568-0.196530927438j)*x[0] + ((-0.833535410268-0.348815792381j))*x[1] + ((-0.489809798498-0.375805857624j))*x[2]
            ref[(1, 1, 1)]=(-1.08224937317-0.460576288722j)
            arg[(2, 0, 0)]=(-0.943595124754-0.384108191009j)*x[0] + ((0.0776325265586+0.370540553818j))*x[1] + ((-0.331405790572+0.284898593923j))*x[2]
            ref[(2, 0, 0)]=(-0.598684194384+0.135665478366j)
            arg[(2, 0, 1)]=(-0.171956546081+0.304056102152j)*x[0] + ((-0.854026236059-0.349786690752j))*x[1] + ((-0.692426426891+0.480686430364j))*x[2]
            ref[(2, 0, 1)]=(-0.859204604515+0.217477920882j)
            arg[(2, 1, 0)]=(-0.425946018805-0.96336316571j)*x[0] + ((-0.519676898024-0.792040069291j))*x[1] + ((-0.204639596213-0.35662552835j))*x[2]
            ref[(2, 1, 0)]=(-0.575131256521-1.05601438168j)
            arg[(2, 1, 1)]=(0.445023765881-0.157000387534j)*x[0] + ((-0.764978194989+0.447401439689j))*x[1] + ((-0.652720294706+0.431699445975j))*x[2]
            ref[(2, 1, 1)]=(-0.486337361907+0.361050249065j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2, 2),w)
        ref=numpy.zeros((2, 2, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.049320466395-0.339773742638j)*x[0] + ((-0.683504739381-0.819356410137j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.366412602888-0.579565076388j)
            arg[(0, 0, 0, 1)]=(0.154747008656-0.864008946958j)*x[0] + ((-0.504005743359+0.491407574761j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.174629367352-0.186300686099j)
            arg[(0, 0, 1, 0)]=(-0.536116859361+0.378837548131j)*x[0] + ((-0.693153881409+0.829979920036j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.614635370385+0.604408734084j)
            arg[(0, 0, 1, 1)]=(-0.955840273005+0.835923458087j)*x[0] + ((0.869057623617-0.0983855270894j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.0433913246941+0.368768965499j)
            arg[(0, 1, 0, 0)]=(0.592545191775+0.322367056653j)*x[0] + ((0.279879595135-0.411730291406j))*x[1]
            ref[(0, 1, 0, 0)]=(0.436212393455-0.0446816173764j)
            arg[(0, 1, 0, 1)]=(0.243458413622-0.323380329323j)*x[0] + ((0.592153470266-0.0647394326463j))*x[1]
            ref[(0, 1, 0, 1)]=(0.417805941944-0.194059880985j)
            arg[(0, 1, 1, 0)]=(-0.818040565008-0.138914327227j)*x[0] + ((-0.355777627612-0.96022470615j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.58690909631-0.549569516688j)
            arg[(0, 1, 1, 1)]=(-0.285251255417-0.286154068213j)*x[0] + ((0.110153605452-0.0663661578751j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.0875488249824-0.176260113044j)
            arg[(1, 0, 0, 0)]=(0.662054640282-0.919422144358j)*x[0] + ((0.866312151347+0.924227908117j))*x[1]
            ref[(1, 0, 0, 0)]=(0.764183395814+0.00240288187936j)
            arg[(1, 0, 0, 1)]=(-0.765482795874+0.208580445398j)*x[0] + ((0.153251377895+0.568386843593j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.30611570899+0.388483644496j)
            arg[(1, 0, 1, 0)]=(-0.376755222929+0.79224736175j)*x[0] + ((-0.49558347892-0.104436059795j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.436169350925+0.343905650977j)
            arg[(1, 0, 1, 1)]=(0.400273588645-0.798214155069j)*x[0] + ((0.307294403817-0.392970905387j))*x[1]
            ref[(1, 0, 1, 1)]=(0.353783996231-0.595592530228j)
            arg[(1, 1, 0, 0)]=(-0.439145241041+0.792730881739j)*x[0] + ((-0.606627383836-0.390348592223j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.522886312439+0.201191144758j)
            arg[(1, 1, 0, 1)]=(-0.00781644677129-0.133479640468j)*x[0] + ((0.285707275621+0.585024035964j))*x[1]
            ref[(1, 1, 0, 1)]=(0.138945414425+0.225772197748j)
            arg[(1, 1, 1, 0)]=(0.972022774912+0.100085717076j)*x[0] + ((-0.644971697956+0.971089798433j))*x[1]
            ref[(1, 1, 1, 0)]=(0.163525538478+0.535587757754j)
            arg[(1, 1, 1, 1)]=(-0.244075384122-0.744008904086j)*x[0] + ((-0.0243110929445+0.585268449285j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.134193238533-0.0793702274007j)
        else:
            arg[(0, 0, 0, 0)]=(-0.592535246923-0.5703773056j)*x[0] + ((-0.763089174002+0.905285787343j))*x[1] + ((0.971054907091-0.0516794805863j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.192284756917+0.141614500578j)
            arg[(0, 0, 0, 1)]=(-0.22665168292+0.116027858166j)*x[0] + ((-0.643158763409-0.54452708188j))*x[1] + ((-0.958724297385-0.372086669506j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.914267371857-0.40029294661j)
            arg[(0, 0, 1, 0)]=(0.606817435039+0.70781691291j)*x[0] + ((0.549597608495-0.530377967859j))*x[1] + ((-0.600516900661-0.481414831293j))*x[2]
            ref[(0, 0, 1, 0)]=(0.277949071436-0.151987943121j)
            arg[(0, 0, 1, 1)]=(-0.642581622856-0.495589071678j)*x[0] + ((0.0199707599481-0.0549999583822j))*x[1] + ((0.121431302294-0.640381553761j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.250589780307-0.595485291911j)
            arg[(0, 1, 0, 0)]=(-0.890459203318-0.496858464031j)*x[0] + ((0.691622749189-0.582422197825j))*x[1] + ((0.75077606569-0.828142167483j))*x[2]
            ref[(0, 1, 0, 0)]=(0.27596980578-0.95371141467j)
            arg[(0, 1, 0, 1)]=(-0.788166215982-0.116385327408j)*x[0] + ((0.919272405441+0.402258643233j))*x[1] + ((0.0521732734919-0.376289979422j))*x[2]
            ref[(0, 1, 0, 1)]=(0.0916397314758-0.0452083317982j)
            arg[(0, 1, 1, 0)]=(-0.148812768407-0.618182318892j)*x[0] + ((0.956288737226+0.199215954707j))*x[1] + ((-0.684179047872+0.57919848364j))*x[2]
            ref[(0, 1, 1, 0)]=(0.0616484604736+0.0801160597274j)
            arg[(0, 1, 1, 1)]=(-0.192876760395-0.665973291004j)*x[0] + ((0.496482732209+0.927764238111j))*x[1] + ((-0.227444152589+0.979099930585j))*x[2]
            ref[(0, 1, 1, 1)]=(0.0380809096128+0.620445438846j)
            arg[(1, 0, 0, 0)]=(0.553487386564+0.538469448424j)*x[0] + ((0.2856790242-0.23895959626j))*x[1] + ((-0.160112418286-0.259478452366j))*x[2]
            ref[(1, 0, 0, 0)]=(0.339526996239+0.0200156998988j)
            arg[(1, 0, 0, 1)]=(-0.070333606295+0.516461526486j)*x[0] + ((-0.0521379825955+0.26470206252j))*x[1] + ((-0.572723457295-0.914232674273j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.347597523093-0.0665345426335j)
            arg[(1, 0, 1, 0)]=(-0.00207769971964+0.683206344334j)*x[0] + ((0.688013587289-0.794981521452j))*x[1] + ((-0.0188190957698-0.876523390471j))*x[2]
            ref[(1, 0, 1, 0)]=(0.3335583959-0.494149283795j)
            arg[(1, 0, 1, 1)]=(0.191015325757+0.247801166566j)*x[0] + ((0.219891402441-0.088463700844j))*x[1] + ((-0.914317518173-0.366823763128j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.251705394988-0.103743148703j)
            arg[(1, 1, 0, 0)]=(0.909951694276-0.311737927447j)*x[0] + ((0.821348680114-0.916578767029j))*x[1] + ((-0.471355605115-0.280320454017j))*x[2]
            ref[(1, 1, 0, 0)]=(0.629972384638-0.754318574246j)
            arg[(1, 1, 0, 1)]=(-0.385720975214+0.740525677562j)*x[0] + ((-0.552017263192-0.186330041987j))*x[1] + ((-0.305529246655+0.891810388735j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.62163374253+0.723003012155j)
            arg[(1, 1, 1, 0)]=(-0.607670136679+0.84414913086j)*x[0] + ((-0.0607073049217+0.271149286989j))*x[1] + ((0.786320979958-0.0846386801014j))*x[2]
            ref[(1, 1, 1, 0)]=(0.0589717691789+0.515329868874j)
            arg[(1, 1, 1, 1)]=(0.650164740564-0.152627857888j)*x[0] + ((0.84161343093-0.106051365077j))*x[1] + ((0.565239764509-0.537721874047j))*x[2]
            ref[(1, 1, 1, 1)]=(1.028508968-0.398200548506j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.874589536617-0.197768051479j)*x[0] + ((-0.11875798451+0.819507470167j))*x[1]
            ref=(-0.496673760564+0.310869709344j)
        else:
            arg=(0.166529886731-0.0716938592547j)*x[0] + ((0.927810504093+0.653062027534j))*x[1] + ((0.854068643224-0.666024217319j))*x[2]
            ref=(0.974204517024-0.0423280245199j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.229148928894-0.886394450139j)*x[0] + ((0.121321173698+0.805228877627j))*x[1]
            ref[(0,)]=(-0.0539138775982-0.0405827862557j)
            arg[(1,)]=(-0.826528853539-0.274176844546j)*x[0] + ((0.616978431242+0.740717200139j))*x[1]
            ref[(1,)]=(-0.104775211149+0.233270177796j)
            arg[(2,)]=(-0.611651748497+0.127619606683j)*x[0] + ((-0.440609153869+0.835675053463j))*x[1]
            ref[(2,)]=(-0.526130451183+0.481647330073j)
            arg[(3,)]=(-0.359659051766+0.542531977509j)*x[0] + ((0.0861522170267+0.241187500137j))*x[1]
            ref[(3,)]=(-0.13675341737+0.391859738823j)
        else:
            arg[(0,)]=(0.168027969055+0.947212704637j)*x[0] + ((0.90866048859-0.769740318266j))*x[1] + ((-0.978161870134+0.181762097523j))*x[2]
            ref[(0,)]=(0.0492632937558+0.179617241947j)
            arg[(1,)]=(0.217307459759+0.868858067852j)*x[0] + ((-0.26116405873-0.720258542158j))*x[1] + ((0.432671023681-0.781413491597j))*x[2]
            ref[(1,)]=(0.194407212355-0.316406982951j)
            arg[(2,)]=(0.474303654948+0.0664990825575j)*x[0] + ((0.198824502889+0.108843858846j))*x[1] + ((-0.71000081343+0.217000216643j))*x[2]
            ref[(2,)]=(-0.0184363277965+0.196171579023j)
            arg[(3,)]=(-0.926558197914+0.79433796659j)*x[0] + ((0.00429365174786+0.155207207398j))*x[1] + ((-0.835243231948+0.56970501652j))*x[2]
            ref[(3,)]=(-0.878753889057+0.759625095254j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.205709888267-0.531785136882j)*x[0] + ((-0.0305271835146-0.536809847028j))*x[1]
            ref[(0, 0)]=(-0.118118535891-0.534297491955j)
            arg[(0, 1)]=(0.631050783454-0.177486346322j)*x[0] + ((-0.701301405173-0.048628941605j))*x[1]
            ref[(0, 1)]=(-0.0351253108595-0.113057643963j)
            arg[(0, 2)]=(0.720494639835-0.655580768509j)*x[0] + ((0.228694027612+0.550186439444j))*x[1]
            ref[(0, 2)]=(0.474594333723-0.0526971645324j)
            arg[(1, 0)]=(0.582041832814-0.397796711849j)*x[0] + ((-0.68478592523-0.765693269536j))*x[1]
            ref[(1, 0)]=(-0.0513720462077-0.581744990692j)
            arg[(1, 1)]=(-0.376228406785+0.159091017284j)*x[0] + ((-0.397625328282-0.131970435685j))*x[1]
            ref[(1, 1)]=(-0.386926867533+0.0135602907993j)
            arg[(1, 2)]=(-0.519256507913+0.529387571224j)*x[0] + ((0.527923430853+0.390713226219j))*x[1]
            ref[(1, 2)]=(0.00433346147004+0.460050398721j)
            arg[(2, 0)]=(-0.887368777628-0.251356977676j)*x[0] + ((-0.592758776261-0.750397269659j))*x[1]
            ref[(2, 0)]=(-0.740063776945-0.500877123668j)
            arg[(2, 1)]=(-0.783259799462+0.850680725446j)*x[0] + ((-0.744027742984+0.541758925624j))*x[1]
            ref[(2, 1)]=(-0.763643771223+0.696219825535j)
            arg[(2, 2)]=(0.150834453129+0.0496951910706j)*x[0] + ((0.688638370552-0.121407466562j))*x[1]
            ref[(2, 2)]=(0.419736411841-0.0358561377458j)
        else:
            arg[(0, 0)]=(0.617878655965-0.707114488963j)*x[0] + ((0.861120056184+0.353904102261j))*x[1] + ((-0.671576016566+0.138879978105j))*x[2]
            ref[(0, 0)]=(0.403711347792-0.107165204298j)
            arg[(0, 1)]=(0.869676072192+0.991713397641j)*x[0] + ((0.429768129753+0.837576879326j))*x[1] + ((-0.332681154788+0.934048777416j))*x[2]
            ref[(0, 1)]=(0.483381523578+1.38166952719j)
            arg[(0, 2)]=(0.475492692976+0.543670045524j)*x[0] + ((0.77736374144-0.39482252914j))*x[1] + ((0.828926187947+0.692748103552j))*x[2]
            ref[(0, 2)]=(1.04089131118+0.420797809968j)
            arg[(1, 0)]=(-0.732895057974-0.412059871684j)*x[0] + ((0.689841005883+0.882239444422j))*x[1] + ((-0.38003104279+0.765878920062j))*x[2]
            ref[(1, 0)]=(-0.21154254744+0.6180292464j)
            arg[(1, 1)]=(0.0233846592959+0.901686368828j)*x[0] + ((-0.376146729424+0.430512258149j))*x[1] + ((-0.912739786808+0.447356841796j))*x[2]
            ref[(1, 1)]=(-0.632750928468+0.889777734386j)
            arg[(1, 2)]=(-0.989063184471-0.893569703241j)*x[0] + ((-0.218479472285+0.803766707717j))*x[1] + ((-0.488773948495+0.655708588201j))*x[2]
            ref[(1, 2)]=(-0.848158302625+0.282952796339j)
            arg[(2, 0)]=(-0.152505601385-0.272620145297j)*x[0] + ((0.368340630805+0.803362739257j))*x[1] + ((0.258396070402+0.817193732042j))*x[2]
            ref[(2, 0)]=(0.237115549911+0.673968163001j)
            arg[(2, 1)]=(-0.200307050015-0.537615789467j)*x[0] + ((0.70352492253+0.155701073609j))*x[1] + ((0.929498156112+0.414693260865j))*x[2]
            ref[(2, 1)]=(0.716358014314+0.0163892725036j)
            arg[(2, 2)]=(-0.760207872943+0.248726345704j)*x[0] + ((-0.0765007635922-0.799367179204j))*x[1] + ((-0.215404511081-0.683615732932j))*x[2]
            ref[(2, 2)]=(-0.526056573808-0.617128283216j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2),w)
        ref=numpy.zeros((4, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.764073730248+0.0348153011552j)*x[0] + ((-0.53646466487+0.0927584592773j))*x[1]
            ref[(0, 0, 0)]=(-0.650269197559+0.0637868802163j)
            arg[(0, 0, 1)]=(0.400504526675-0.532509991257j)*x[0] + ((-0.303091650447-0.195501051633j))*x[1]
            ref[(0, 0, 1)]=(0.0487064381139-0.364005521445j)
            arg[(0, 1, 0)]=(-0.434928016698+0.86104409036j)*x[0] + ((0.829398528329+0.746872441754j))*x[1]
            ref[(0, 1, 0)]=(0.197235255815+0.803958266057j)
            arg[(0, 1, 1)]=(0.572295959736-0.318096615128j)*x[0] + ((-0.797305537557+0.994725207315j))*x[1]
            ref[(0, 1, 1)]=(-0.11250478891+0.338314296094j)
            arg[(1, 0, 0)]=(0.317264469738-0.364333762219j)*x[0] + ((-0.904414965302-0.63783471568j))*x[1]
            ref[(1, 0, 0)]=(-0.293575247782-0.50108423895j)
            arg[(1, 0, 1)]=(0.940792538959-0.355932285893j)*x[0] + ((-0.647289452899+0.938073810256j))*x[1]
            ref[(1, 0, 1)]=(0.14675154303+0.291070762181j)
            arg[(1, 1, 0)]=(-0.0543347204629-0.787034464349j)*x[0] + ((0.400950744271-0.175861336622j))*x[1]
            ref[(1, 1, 0)]=(0.173308011904-0.481447900486j)
            arg[(1, 1, 1)]=(0.0684622925724+0.806412207468j)*x[0] + ((0.000128151616858+0.373678398982j))*x[1]
            ref[(1, 1, 1)]=(0.0342952220946+0.590045303225j)
            arg[(2, 0, 0)]=(0.237477754666+0.650432106429j)*x[0] + ((-0.326363569098+0.529334070203j))*x[1]
            ref[(2, 0, 0)]=(-0.0444429072157+0.589883088316j)
            arg[(2, 0, 1)]=(0.0316538692331+0.323122390231j)*x[0] + ((0.734076060778+0.595893499566j))*x[1]
            ref[(2, 0, 1)]=(0.382864965006+0.459507944899j)
            arg[(2, 1, 0)]=(-0.519720696555-0.668196304414j)*x[0] + ((0.64595287395+0.0733617721271j))*x[1]
            ref[(2, 1, 0)]=(0.0631160886973-0.297417266143j)
            arg[(2, 1, 1)]=(0.70139607964+0.159645735862j)*x[0] + ((-0.781275718512+0.144036721509j))*x[1]
            ref[(2, 1, 1)]=(-0.0399398194363+0.151841228686j)
            arg[(3, 0, 0)]=(0.0571909162093-0.103035998401j)*x[0] + ((0.593353556192+0.262518411348j))*x[1]
            ref[(3, 0, 0)]=(0.325272236201+0.0797412064736j)
            arg[(3, 0, 1)]=(-0.313588393098-0.299929411943j)*x[0] + ((-0.528262982343+0.699743270287j))*x[1]
            ref[(3, 0, 1)]=(-0.42092568772+0.199906929172j)
            arg[(3, 1, 0)]=(0.404559182666+0.102860446219j)*x[0] + ((-0.972348599427-0.472243681488j))*x[1]
            ref[(3, 1, 0)]=(-0.28389470838-0.184691617635j)
            arg[(3, 1, 1)]=(0.580405858302+0.430865703591j)*x[0] + ((0.936979109432-0.0144811489193j))*x[1]
            ref[(3, 1, 1)]=(0.758692483867+0.208192277336j)
        else:
            arg[(0, 0, 0)]=(-0.130777853711-0.521389170015j)*x[0] + ((-0.821285435214-0.791649553853j))*x[1] + ((-0.50816471251+0.942487195064j))*x[2]
            ref[(0, 0, 0)]=(-0.730114000718-0.185275764402j)
            arg[(0, 0, 1)]=(-0.590949466086-0.162243398366j)*x[0] + ((0.00900827002444+0.786832716375j))*x[1] + ((-0.142273899979+0.852926605342j))*x[2]
            ref[(0, 0, 1)]=(-0.36210754802+0.738757961675j)
            arg[(0, 1, 0)]=(0.932301466803-0.34246265159j)*x[0] + ((-0.37821816471+0.0497788991308j))*x[1] + ((-0.895924788102+0.600590496725j))*x[2]
            ref[(0, 1, 0)]=(-0.170920743005+0.153953372132j)
            arg[(0, 1, 1)]=(-0.361045312546-0.442238419699j)*x[0] + ((-0.79780570993+0.727557963392j))*x[1] + ((-0.939113896248+0.394276479623j))*x[2]
            ref[(0, 1, 1)]=(-1.04898245936+0.339798011658j)
            arg[(1, 0, 0)]=(-0.188639888623+0.771354370077j)*x[0] + ((-0.988390475846-0.174765593935j))*x[1] + ((-0.869151007397+0.299898796739j))*x[2]
            ref[(1, 0, 0)]=(-1.02309068593+0.448243786441j)
            arg[(1, 0, 1)]=(-0.142856371158-0.131337511554j)*x[0] + ((-0.530137381995+0.580446371572j))*x[1] + ((0.181424722697+0.579859517219j))*x[2]
            ref[(1, 0, 1)]=(-0.245784515228+0.514484188618j)
            arg[(1, 1, 0)]=(0.830688201017-0.247630273079j)*x[0] + ((0.322399643078-0.857277983216j))*x[1] + ((0.737123642727+0.537133838702j))*x[2]
            ref[(1, 1, 0)]=(0.945105743411-0.283887208797j)
            arg[(1, 1, 1)]=(-0.48522973738+0.392888014718j)*x[0] + ((-0.745111763907+0.800119243882j))*x[1] + ((-0.767768397981+0.822444464253j))*x[2]
            ref[(1, 1, 1)]=(-0.999054949634+1.00772586143j)
            arg[(2, 0, 0)]=(-0.847272481628-0.372539325732j)*x[0] + ((-0.828747930415-0.708872785262j))*x[1] + ((-0.0239272261955+0.63710183276j))*x[2]
            ref[(2, 0, 0)]=(-0.849973819119-0.222155139117j)
            arg[(2, 0, 1)]=(0.639633236877+0.337818196991j)*x[0] + ((0.598852842901+0.268230801173j))*x[1] + ((-0.842296921847+0.273946060378j))*x[2]
            ref[(2, 0, 1)]=(0.198094578965+0.439997529271j)
            arg[(2, 1, 0)]=(0.499244708634-0.311372249651j)*x[0] + ((-0.452901782803+0.722537963814j))*x[1] + ((0.8871077215-0.0725508697993j))*x[2]
            ref[(2, 1, 0)]=(0.466725323665+0.169307422182j)
            arg[(2, 1, 1)]=(0.620241805006-0.0632704313972j)*x[0] + ((-0.155437767037+0.268413364586j))*x[1] + ((-0.402791860363+0.86729813373j))*x[2]
            ref[(2, 1, 1)]=(0.0310060888027+0.53622053346j)
            arg[(3, 0, 0)]=(0.713739810332-0.0237800191993j)*x[0] + ((-0.630212012311+0.545018604835j))*x[1] + ((-0.106588668426+0.195935576586j))*x[2]
            ref[(3, 0, 0)]=(-0.0115304352026+0.358587081111j)
            arg[(3, 0, 1)]=(0.329764509344+0.0336448983198j)*x[0] + ((-0.200061896441+0.584881767678j))*x[1] + ((0.0897208142827-0.104303917682j))*x[2]
            ref[(3, 0, 1)]=(0.109711713593+0.257111374158j)
            arg[(3, 1, 0)]=(-0.805367989706-0.733651486336j)*x[0] + ((-0.457709251935+0.791623707496j))*x[1] + ((-0.171366514996+0.781179314227j))*x[2]
            ref[(3, 1, 0)]=(-0.717221878318+0.419575767694j)
            arg[(3, 1, 1)]=(0.885500447081+0.00670024537606j)*x[0] + ((-0.580613443788-0.593504040443j))*x[1] + ((0.580700201113+0.45837022478j))*x[2]
            ref[(3, 1, 1)]=(0.442793602203-0.0642167851437j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 4),w)
        ref=numpy.zeros((4, 3, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.519439674827-0.780887227565j)*x[0] + ((-0.903929580842+0.617706997265j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.711684627834-0.0815901151502j)
            arg[(0, 0, 0, 1)]=(-0.507287944737+0.0414086638955j)*x[0] + ((0.129289998953-0.728849201043j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.188998972892-0.343720268574j)
            arg[(0, 0, 0, 2)]=(-0.20249083976+0.838972498473j)*x[0] + ((0.896095600141+0.268797615062j))*x[1]
            ref[(0, 0, 0, 2)]=(0.34680238019+0.553885056768j)
            arg[(0, 0, 0, 3)]=(0.730434793457+0.81158172548j)*x[0] + ((-0.0674762616328+0.864429197922j))*x[1]
            ref[(0, 0, 0, 3)]=(0.331479265912+0.838005461701j)
            arg[(0, 0, 1, 0)]=(-0.0633003629468-0.470983840671j)*x[0] + ((-0.914465119302+0.607187859899j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.488882741125+0.0681020096138j)
            arg[(0, 0, 1, 1)]=(-0.710724047694+0.118456909677j)*x[0] + ((0.363922973392-0.174122026352j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.173400537151-0.0278325583373j)
            arg[(0, 0, 1, 2)]=(-0.347898398403-0.0642433553732j)*x[0] + ((-0.0770121567012-0.824721300329j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.212455277552-0.444482327851j)
            arg[(0, 0, 1, 3)]=(-0.101565818105+0.959098983552j)*x[0] + ((0.478879988826+0.201519812614j))*x[1]
            ref[(0, 0, 1, 3)]=(0.188657085361+0.580309398083j)
            arg[(0, 1, 0, 0)]=(-0.471697337215+0.804053268706j)*x[0] + ((-0.116733954932-0.210873600079j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.294215646073+0.296589834313j)
            arg[(0, 1, 0, 1)]=(-0.283712478466-0.481308994639j)*x[0] + ((-0.210257681147-0.275448873846j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.246985079807-0.378378934242j)
            arg[(0, 1, 0, 2)]=(-0.781763011598+0.473841666591j)*x[0] + ((-0.750641043563+0.307753634732j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.76620202758+0.390797650662j)
            arg[(0, 1, 0, 3)]=(0.607326378833-0.365886793291j)*x[0] + ((0.947979289191-0.177705687558j))*x[1]
            ref[(0, 1, 0, 3)]=(0.777652834012-0.271796240425j)
            arg[(0, 1, 1, 0)]=(0.779990516003-0.396074447195j)*x[0] + ((-0.879985121161-0.740796555187j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.0499973025792-0.568435501191j)
            arg[(0, 1, 1, 1)]=(0.884620670555+0.677418367804j)*x[0] + ((-0.651501152085+0.149194677856j))*x[1]
            ref[(0, 1, 1, 1)]=(0.116559759235+0.41330652283j)
            arg[(0, 1, 1, 2)]=(0.45344189934-0.204751078633j)*x[0] + ((-0.371151441371+0.560191457457j))*x[1]
            ref[(0, 1, 1, 2)]=(0.0411452289842+0.177720189412j)
            arg[(0, 1, 1, 3)]=(-0.838193822421-0.538029177037j)*x[0] + ((-0.766116424089-0.637600661273j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.802155123255-0.587814919155j)
            arg[(0, 2, 0, 0)]=(0.193045611483-0.400041426219j)*x[0] + ((-0.362872020215+0.806144201344j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.0849132043661+0.203051387563j)
            arg[(0, 2, 0, 1)]=(0.392065341867+0.737271642722j)*x[0] + ((-0.9310283477+0.612393814616j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.269481502917+0.674832728669j)
            arg[(0, 2, 0, 2)]=(0.199771179533-0.548907186298j)*x[0] + ((0.819400595291-0.590772139959j))*x[1]
            ref[(0, 2, 0, 2)]=(0.509585887412-0.569839663129j)
            arg[(0, 2, 0, 3)]=(0.985403260691-0.0677821040828j)*x[0] + ((-0.454340055469-0.4330868633j))*x[1]
            ref[(0, 2, 0, 3)]=(0.265531602611-0.250434483692j)
            arg[(0, 2, 1, 0)]=(-0.241292540278-0.548609751584j)*x[0] + ((-0.965677036727-0.628971717468j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.603484788503-0.588790734526j)
            arg[(0, 2, 1, 1)]=(-0.905535741566+0.515410954307j)*x[0] + ((0.500852320478-0.744296501008j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.202341710544-0.11444277335j)
            arg[(0, 2, 1, 2)]=(0.640182666623-0.215598630355j)*x[0] + ((-0.0108450672385+0.561010298458j))*x[1]
            ref[(0, 2, 1, 2)]=(0.314668799692+0.172705834052j)
            arg[(0, 2, 1, 3)]=(-0.987125519181-0.383077805946j)*x[0] + ((0.784511399567+0.0035314366501j))*x[1]
            ref[(0, 2, 1, 3)]=(-0.101307059807-0.189773184648j)
            arg[(1, 0, 0, 0)]=(0.972662971209-0.120953881995j)*x[0] + ((-0.245449141189+0.296698626622j))*x[1]
            ref[(1, 0, 0, 0)]=(0.36360691501+0.0878723723137j)
            arg[(1, 0, 0, 1)]=(-0.554181675032-0.281948648711j)*x[0] + ((0.783663522978+0.31028869484j))*x[1]
            ref[(1, 0, 0, 1)]=(0.114740923973+0.0141700230643j)
            arg[(1, 0, 0, 2)]=(0.500796659412+0.55302111437j)*x[0] + ((0.673003290783+0.763269446019j))*x[1]
            ref[(1, 0, 0, 2)]=(0.586899975098+0.658145280194j)
            arg[(1, 0, 0, 3)]=(0.278178581968-0.354240516631j)*x[0] + ((-0.547003625461+0.0635575456703j))*x[1]
            ref[(1, 0, 0, 3)]=(-0.134412521746-0.14534148548j)
            arg[(1, 0, 1, 0)]=(-0.856631559591-0.809731977734j)*x[0] + ((0.621335737725+0.967642858262j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.117647910933+0.0789554402643j)
            arg[(1, 0, 1, 1)]=(-0.017908685283+0.76466852052j)*x[0] + ((0.21752623771+0.188804536773j))*x[1]
            ref[(1, 0, 1, 1)]=(0.0998087762138+0.476736528647j)
            arg[(1, 0, 1, 2)]=(0.756460197235-0.328278636499j)*x[0] + ((-0.0494000283621+0.517599597712j))*x[1]
            ref[(1, 0, 1, 2)]=(0.353530084436+0.0946604806062j)
            arg[(1, 0, 1, 3)]=(-0.30001478282+0.582571961689j)*x[0] + ((-0.614673273944+0.64164850216j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.457344028382+0.612110231924j)
            arg[(1, 1, 0, 0)]=(-0.329434427981-0.194130472794j)*x[0] + ((-0.597420519548-0.49262440529j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.463427473764-0.343377439042j)
            arg[(1, 1, 0, 1)]=(0.515468831093-0.260942910893j)*x[0] + ((-0.881905455818+0.833316510499j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.183218312362+0.286186799803j)
            arg[(1, 1, 0, 2)]=(0.410825650836-0.741905270098j)*x[0] + ((0.538199815191+0.0710340488751j))*x[1]
            ref[(1, 1, 0, 2)]=(0.474512733013-0.335435610612j)
            arg[(1, 1, 0, 3)]=(-0.505487061714+0.0703658182147j)*x[0] + ((0.201422273974-0.813667014984j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.15203239387-0.371650598385j)
            arg[(1, 1, 1, 0)]=(0.339481477397+0.64561280114j)*x[0] + ((0.139186804571+0.18271070088j))*x[1]
            ref[(1, 1, 1, 0)]=(0.239334140984+0.41416175101j)
            arg[(1, 1, 1, 1)]=(-0.18537676397-0.35013019078j)*x[0] + ((-0.661266692445+0.616745231144j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.423321728207+0.133307520182j)
            arg[(1, 1, 1, 2)]=(0.221415355128-0.176892856019j)*x[0] + ((-0.659498755889+0.224252778058j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.21904170038+0.0236799610197j)
            arg[(1, 1, 1, 3)]=(0.93127641112-0.274357693204j)*x[0] + ((0.619379595825+0.9729352457j))*x[1]
            ref[(1, 1, 1, 3)]=(0.775328003473+0.349288776248j)
            arg[(1, 2, 0, 0)]=(-0.53681869343-0.0769782612606j)*x[0] + ((-0.062222305165-0.944284455279j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.299520499298-0.51063135827j)
            arg[(1, 2, 0, 1)]=(-0.0801967417911+0.728186697834j)*x[0] + ((0.863421768111+0.441480476755j))*x[1]
            ref[(1, 2, 0, 1)]=(0.39161251316+0.584833587295j)
            arg[(1, 2, 0, 2)]=(-0.226504115655+0.502075107462j)*x[0] + ((-0.792411251267-0.0714892231681j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.509457683461+0.215292942147j)
            arg[(1, 2, 0, 3)]=(0.794399653427+0.931509812784j)*x[0] + ((0.277166824012+0.556129853152j))*x[1]
            ref[(1, 2, 0, 3)]=(0.535783238719+0.743819832968j)
            arg[(1, 2, 1, 0)]=(-0.504284745869+0.296597709857j)*x[0] + ((-0.0278210269959-0.824244897103j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.266052886433-0.263823593623j)
            arg[(1, 2, 1, 1)]=(-0.476067642721-0.298962597687j)*x[0] + ((0.922148957557+0.486299441203j))*x[1]
            ref[(1, 2, 1, 1)]=(0.223040657418+0.0936684217575j)
            arg[(1, 2, 1, 2)]=(0.0785179597853-0.312345277859j)*x[0] + ((0.849114424594-0.802634444905j))*x[1]
            ref[(1, 2, 1, 2)]=(0.46381619219-0.557489861382j)
            arg[(1, 2, 1, 3)]=(-0.0942727407155+0.50044397019j)*x[0] + ((-0.707013709495+0.483974248686j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.400643225105+0.492209109438j)
            arg[(2, 0, 0, 0)]=(-0.45305098201-0.510955975119j)*x[0] + ((-0.868334244376+0.0306651045751j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.660692613193-0.240145435272j)
            arg[(2, 0, 0, 1)]=(-0.0255236999541+0.128408971639j)*x[0] + ((-0.605232571927+0.967886864657j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.315378135941+0.548147918148j)
            arg[(2, 0, 0, 2)]=(-0.717317712737-0.454056209146j)*x[0] + ((0.676079461936-0.838655936568j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.0206191254007-0.646356072857j)
            arg[(2, 0, 0, 3)]=(-0.461658534867+0.192189041586j)*x[0] + ((0.887186225788+0.604447362054j))*x[1]
            ref[(2, 0, 0, 3)]=(0.21276384546+0.39831820182j)
            arg[(2, 0, 1, 0)]=(-0.165751707859-0.833333702158j)*x[0] + ((-0.755387368256+0.524051611869j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.460569538058-0.154641045145j)
            arg[(2, 0, 1, 1)]=(0.893049781627+0.646371445865j)*x[0] + ((-0.715553074405+0.390426543015j))*x[1]
            ref[(2, 0, 1, 1)]=(0.0887483536113+0.51839899444j)
            arg[(2, 0, 1, 2)]=(-0.220783072029-0.440401251572j)*x[0] + ((-0.912709694714+0.906065564084j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.566746383372+0.232832156256j)
            arg[(2, 0, 1, 3)]=(0.525526682093+0.725675105015j)*x[0] + ((0.356793964719+0.24620120493j))*x[1]
            ref[(2, 0, 1, 3)]=(0.441160323406+0.485938154972j)
            arg[(2, 1, 0, 0)]=(0.242866634808+0.430346786431j)*x[0] + ((0.641960197741-0.794524199352j))*x[1]
            ref[(2, 1, 0, 0)]=(0.442413416274-0.182088706461j)
            arg[(2, 1, 0, 1)]=(-0.917311432028-0.850043137321j)*x[0] + ((-0.240020310776+0.626590685888j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.578665871402-0.111726225716j)
            arg[(2, 1, 0, 2)]=(0.702477188788-0.0150442324217j)*x[0] + ((0.333365840108-0.918769779069j))*x[1]
            ref[(2, 1, 0, 2)]=(0.517921514448-0.466907005745j)
            arg[(2, 1, 0, 3)]=(0.861429349772-0.825368392753j)*x[0] + ((0.849671347057+0.973756478869j))*x[1]
            ref[(2, 1, 0, 3)]=(0.855550348415+0.0741940430576j)
            arg[(2, 1, 1, 0)]=(-0.497101525473-0.0916527052176j)*x[0] + ((0.0843295988331-0.963312179423j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.20638596332-0.52748244232j)
            arg[(2, 1, 1, 1)]=(-0.885944324958-0.292980176253j)*x[0] + ((0.561861732473-0.199833986378j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.162041296242-0.246407081316j)
            arg[(2, 1, 1, 2)]=(0.0243040577036+0.714182139534j)*x[0] + ((0.928296500138+0.865684431246j))*x[1]
            ref[(2, 1, 1, 2)]=(0.476300278921+0.78993328539j)
            arg[(2, 1, 1, 3)]=(0.819039764171+0.885595308894j)*x[0] + ((-0.111397099163-0.849476080811j))*x[1]
            ref[(2, 1, 1, 3)]=(0.353821332504+0.0180596140418j)
            arg[(2, 2, 0, 0)]=(0.524725635087-0.279014178252j)*x[0] + ((0.149937261058+0.1839989074j))*x[1]
            ref[(2, 2, 0, 0)]=(0.337331448073-0.0475076354261j)
            arg[(2, 2, 0, 1)]=(0.337361723775+0.259958004257j)*x[0] + ((-0.262852736326+0.555532686916j))*x[1]
            ref[(2, 2, 0, 1)]=(0.0372544937244+0.407745345586j)
            arg[(2, 2, 0, 2)]=(0.579305136721-0.165766680088j)*x[0] + ((-0.785402739637+0.89685100538j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.103048801458+0.365542162646j)
            arg[(2, 2, 0, 3)]=(-0.106609596287-0.1559350177j)*x[0] + ((0.268980697148-0.0382085324893j))*x[1]
            ref[(2, 2, 0, 3)]=(0.0811855504306-0.0970717750948j)
            arg[(2, 2, 1, 0)]=(0.127305453714-0.639363347939j)*x[0] + ((-0.908290482521+0.439621997313j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.390492514404-0.099870675313j)
            arg[(2, 2, 1, 1)]=(-0.145814796397-0.130505131876j)*x[0] + ((-0.837366060099-0.383871140229j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.491590428248-0.257188136052j)
            arg[(2, 2, 1, 2)]=(0.968623655716+0.439050714815j)*x[0] + ((0.338222857428-0.130086768613j))*x[1]
            ref[(2, 2, 1, 2)]=(0.653423256572+0.154481973101j)
            arg[(2, 2, 1, 3)]=(0.240821274615-0.151717626732j)*x[0] + ((-0.00392520957235+0.71671087333j))*x[1]
            ref[(2, 2, 1, 3)]=(0.118448032522+0.282496623299j)
            arg[(3, 0, 0, 0)]=(-0.3629933662-0.83939182125j)*x[0] + ((-0.937391825302+0.218026132715j))*x[1]
            ref[(3, 0, 0, 0)]=(-0.650192595751-0.310682844268j)
            arg[(3, 0, 0, 1)]=(-0.816423064542+0.43654074227j)*x[0] + ((-0.759907025928-0.0810183703053j))*x[1]
            ref[(3, 0, 0, 1)]=(-0.788165045235+0.177761185982j)
            arg[(3, 0, 0, 2)]=(-0.158929137303+0.863853715132j)*x[0] + ((0.00790018203855+0.574742045685j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.0755144776323+0.719297880409j)
            arg[(3, 0, 0, 3)]=(-0.0549269016481-0.795521416462j)*x[0] + ((-0.921752463092-0.0410618022735j))*x[1]
            ref[(3, 0, 0, 3)]=(-0.48833968237-0.418291609368j)
            arg[(3, 0, 1, 0)]=(-0.126167103736-0.436185059448j)*x[0] + ((-0.352648851733+0.997356695583j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.239407977734+0.280585818068j)
            arg[(3, 0, 1, 1)]=(-0.015263696491+0.573977607036j)*x[0] + ((-0.461169115552-0.810920651683j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.238216406022-0.118471522323j)
            arg[(3, 0, 1, 2)]=(0.346148795522+0.697069333761j)*x[0] + ((-0.387169062048-0.345874594243j))*x[1]
            ref[(3, 0, 1, 2)]=(-0.0205101332629+0.175597369759j)
            arg[(3, 0, 1, 3)]=(-0.644994333607+0.793374597824j)*x[0] + ((-0.936185766298+0.0900191116442j))*x[1]
            ref[(3, 0, 1, 3)]=(-0.790590049952+0.441696854734j)
            arg[(3, 1, 0, 0)]=(0.221087296827-0.57493551125j)*x[0] + ((-0.157419376248-0.296411350903j))*x[1]
            ref[(3, 1, 0, 0)]=(0.0318339602894-0.435673431076j)
            arg[(3, 1, 0, 1)]=(0.944845350632+0.141634944336j)*x[0] + ((-0.322858396786-0.978192749986j))*x[1]
            ref[(3, 1, 0, 1)]=(0.310993476923-0.418278902825j)
            arg[(3, 1, 0, 2)]=(-0.791988183472+0.418441003281j)*x[0] + ((0.713677726806+0.834736046186j))*x[1]
            ref[(3, 1, 0, 2)]=(-0.0391552283326+0.626588524734j)
            arg[(3, 1, 0, 3)]=(0.63950449157+0.667661287642j)*x[0] + ((0.484351324484+0.312760234343j))*x[1]
            ref[(3, 1, 0, 3)]=(0.561927908027+0.490210760993j)
            arg[(3, 1, 1, 0)]=(-0.664318852352+0.211563550417j)*x[0] + ((0.6020032125+0.47708020473j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.0311578199264+0.344321877574j)
            arg[(3, 1, 1, 1)]=(0.16024044279-0.21009055989j)*x[0] + ((0.510733151667-0.44008893893j))*x[1]
            ref[(3, 1, 1, 1)]=(0.335486797229-0.32508974941j)
            arg[(3, 1, 1, 2)]=(0.617166260298+0.549325522007j)*x[0] + ((-0.354588698961-0.974238253309j))*x[1]
            ref[(3, 1, 1, 2)]=(0.131288780669-0.212456365651j)
            arg[(3, 1, 1, 3)]=(-0.941535938728-0.870799795006j)*x[0] + ((0.43539398576+0.426234798227j))*x[1]
            ref[(3, 1, 1, 3)]=(-0.253070976484-0.22228249839j)
            arg[(3, 2, 0, 0)]=(-0.485953290382-0.00824839766581j)*x[0] + ((0.491441003604-0.940011847313j))*x[1]
            ref[(3, 2, 0, 0)]=(0.00274385661056-0.47413012249j)
            arg[(3, 2, 0, 1)]=(0.920629868971+0.434932075173j)*x[0] + ((-0.62579911136+0.890108754232j))*x[1]
            ref[(3, 2, 0, 1)]=(0.147415378806+0.662520414703j)
            arg[(3, 2, 0, 2)]=(0.243999754512+0.538822384969j)*x[0] + ((0.803038754545-0.26462683486j))*x[1]
            ref[(3, 2, 0, 2)]=(0.523519254529+0.137097775055j)
            arg[(3, 2, 0, 3)]=(-0.0927963313125+0.611572646074j)*x[0] + ((-0.60554041968+0.026645738929j))*x[1]
            ref[(3, 2, 0, 3)]=(-0.349168375496+0.319109192502j)
            arg[(3, 2, 1, 0)]=(0.733713310906-0.998566539748j)*x[0] + ((-0.614499138838+0.865097949035j))*x[1]
            ref[(3, 2, 1, 0)]=(0.0596070860341-0.0667342953565j)
            arg[(3, 2, 1, 1)]=(-0.985715934364-0.47641732713j)*x[0] + ((0.972100672674+0.7086845741j))*x[1]
            ref[(3, 2, 1, 1)]=(-0.00680763084515+0.116133623485j)
            arg[(3, 2, 1, 2)]=(0.600782803518-0.152772847511j)*x[0] + ((-0.475425397154+0.714538854661j))*x[1]
            ref[(3, 2, 1, 2)]=(0.0626787031822+0.280883003575j)
            arg[(3, 2, 1, 3)]=(-0.657681184392-0.0607757399708j)*x[0] + ((-0.443772509715+0.590623003966j))*x[1]
            ref[(3, 2, 1, 3)]=(-0.550726847053+0.264923631997j)
        else:
            arg[(0, 0, 0, 0)]=(-0.117326921042+0.263280173848j)*x[0] + ((0.865021103924-0.487507722148j))*x[1] + ((0.0502464639711-0.253196347195j))*x[2]
            ref[(0, 0, 0, 0)]=(0.398970323427-0.238711947748j)
            arg[(0, 0, 0, 1)]=(-0.992272780718-0.0309232731228j)*x[0] + ((0.532173081023-0.601037253702j))*x[1] + ((0.0517544797064+0.254017556569j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.204172609994-0.188971485128j)
            arg[(0, 0, 0, 2)]=(0.617943704458+0.941291894276j)*x[0] + ((-0.0290308219025+0.00136583465023j))*x[1] + ((-0.222005360979+0.853107743855j))*x[2]
            ref[(0, 0, 0, 2)]=(0.183453760788+0.897882736391j)
            arg[(0, 0, 0, 3)]=(0.881033243877-0.739546890796j)*x[0] + ((-0.871307385335-0.643865845479j))*x[1] + ((0.63487883955+0.395919396535j))*x[2]
            ref[(0, 0, 0, 3)]=(0.322302349046-0.49374666987j)
            arg[(0, 0, 1, 0)]=(0.0193548672919+0.664245760047j)*x[0] + ((0.42345797728+0.0499100278723j))*x[1] + ((0.464492116274+0.430311508993j))*x[2]
            ref[(0, 0, 1, 0)]=(0.453652480423+0.572233648456j)
            arg[(0, 0, 1, 1)]=(-0.89205270685-0.578852065692j)*x[0] + ((-0.288315756402+0.789081444236j))*x[1] + ((0.146952992663-0.827074245618j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.516707735294-0.308422433537j)
            arg[(0, 0, 1, 2)]=(-0.562298918026-0.390605184303j)*x[0] + ((-0.0818097466219+0.778384781285j))*x[1] + ((0.311608862501-0.202923823271j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.166249901073+0.092427886856j)
            arg[(0, 0, 1, 3)]=(0.817481833537-0.171803394344j)*x[0] + ((-0.942107163467-0.90430428862j))*x[1] + ((0.219474190634-0.0714801429066j))*x[2]
            ref[(0, 0, 1, 3)]=(0.0474244303525-0.573793912935j)
            arg[(0, 1, 0, 0)]=(-0.412883661164+0.169263505226j)*x[0] + ((0.926087800464-0.0582857454824j))*x[1] + ((0.218128493522-0.511363996888j))*x[2]
            ref[(0, 1, 0, 0)]=(0.365666316411-0.200193118572j)
            arg[(0, 1, 0, 1)]=(0.196888325836+0.321708325657j)*x[0] + ((0.623239355632+0.359831342341j))*x[1] + ((-0.0469311933541+0.813337180359j))*x[2]
            ref[(0, 1, 0, 1)]=(0.386598244057+0.747438424179j)
            arg[(0, 1, 0, 2)]=(-0.936835206824-0.787112498554j)*x[0] + ((-0.131346399386-0.356572825875j))*x[1] + ((-0.806968901174+0.76878177766j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.937575253692-0.187451773385j)
            arg[(0, 1, 0, 3)]=(-0.723577955897+0.301537350407j)*x[0] + ((-0.459537241155+0.487142101732j))*x[1] + ((-0.928619729448+0.206098127618j))*x[2]
            ref[(0, 1, 0, 3)]=(-1.05586746325+0.497388789879j)
            arg[(0, 1, 1, 0)]=(-0.558618213345+0.273442589136j)*x[0] + ((0.174792060672-0.17693912031j))*x[1] + ((-0.537442109821+0.520325487717j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.460634131247+0.308414478272j)
            arg[(0, 1, 1, 1)]=(0.685933337951-0.712732654974j)*x[0] + ((-0.0513225168487-0.448469759874j))*x[1] + ((0.319284522542+0.441160815562j))*x[2]
            ref[(0, 1, 1, 1)]=(0.476947671822-0.360020799642j)
            arg[(0, 1, 1, 2)]=(-0.744908950056+0.529854517219j)*x[0] + ((0.843987911818+0.325411346245j))*x[1] + ((-0.275326181236-0.506498244907j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.0881236097369+0.174383809279j)
            arg[(0, 1, 1, 3)]=(-0.661647099551+0.7749066674j)*x[0] + ((-0.824504034408-0.32290745749j))*x[1] + ((0.0244243436564-0.768278588205j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.730863395151-0.158139689148j)
            arg[(0, 2, 0, 0)]=(0.783592840346+0.311638137674j)*x[0] + ((0.433108196996+0.183180744717j))*x[1] + ((0.918929512872+0.21663749703j))*x[2]
            ref[(0, 2, 0, 0)]=(1.06781527511+0.355728189711j)
            arg[(0, 2, 0, 1)]=(0.509175601471+0.469610571408j)*x[0] + ((0.591966299272+0.320962469907j))*x[1] + ((-0.390925855977+0.608698235455j))*x[2]
            ref[(0, 2, 0, 1)]=(0.355108022383+0.699635638385j)
            arg[(0, 2, 0, 2)]=(0.318288849836-0.0113165743002j)*x[0] + ((-0.969863590993-0.5434042165j))*x[1] + ((0.499537656993+0.257966462666j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.0760185420819-0.148377164067j)
            arg[(0, 2, 0, 3)]=(-0.168691379355+0.181206901927j)*x[0] + ((0.215326929951-0.0783841321931j))*x[1] + ((-0.12426354633-0.540673234847j))*x[2]
            ref[(0, 2, 0, 3)]=(-0.0388139978672-0.218925232556j)
            arg[(0, 2, 1, 0)]=(-0.95482361367-0.810709375234j)*x[0] + ((-0.612545063041+0.13407932452j))*x[1] + ((0.666413089313+0.897621259104j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.450477793699+0.110495604195j)
            arg[(0, 2, 1, 1)]=(-0.154944017338+0.35512492121j)*x[0] + ((-0.0509646357219-0.929021908272j))*x[1] + ((-0.97533538374-0.903232684475j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.5906220184-0.738564835769j)
            arg[(0, 2, 1, 2)]=(-0.816516035138+0.384130164667j)*x[0] + ((0.60140245755-0.43673469883j))*x[1] + ((-0.935805703633-0.758154347726j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.575459640611-0.405379440945j)
            arg[(0, 2, 1, 3)]=(0.574145431209-0.466931526304j)*x[0] + ((0.503117188502+0.849053451976j))*x[1] + ((-0.0800459279891+0.633456325023j))*x[2]
            ref[(0, 2, 1, 3)]=(0.498608345861+0.507789125347j)
            arg[(1, 0, 0, 0)]=(0.838780787107+0.248830140044j)*x[0] + ((0.357762642953+0.634886946707j))*x[1] + ((-0.958927437988-0.0301932034887j))*x[2]
            ref[(1, 0, 0, 0)]=(0.118807996036+0.426761941631j)
            arg[(1, 0, 0, 1)]=(-0.786030831273-0.841921292511j)*x[0] + ((-0.711964596918-0.308960193732j))*x[1] + ((0.44493025893-0.312066656132j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.526532584631-0.731474071188j)
            arg[(1, 0, 0, 2)]=(-0.244516293196-0.672434320451j)*x[0] + ((-0.233099761457-0.900519531588j))*x[1] + ((-0.335540974304-0.619126909513j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.406578514478-1.09604038078j)
            arg[(1, 0, 0, 3)]=(0.477402209859+0.226435105095j)*x[0] + ((0.610730700161-0.385247806786j))*x[1] + ((0.114149207418+0.91339787523j))*x[2]
            ref[(1, 0, 0, 3)]=(0.601141058719+0.37729258677j)
            arg[(1, 0, 1, 0)]=(-0.147796757163-0.472139331851j)*x[0] + ((0.640323794107-0.772174696284j))*x[1] + ((-0.394533973944+0.226386846262j))*x[2]
            ref[(1, 0, 1, 0)]=(0.0489965315002-0.508963590936j)
            arg[(1, 0, 1, 1)]=(0.0968016405748-0.409208489831j)*x[0] + ((0.545758788553-0.238871565864j))*x[1] + ((-0.194789187335-0.690233617847j))*x[2]
            ref[(1, 0, 1, 1)]=(0.223885620896-0.669156836771j)
            arg[(1, 0, 1, 2)]=(0.563334573956+0.880049397712j)*x[0] + ((0.752013260888+0.29263129523j))*x[1] + ((0.992468390411+0.35328650623j))*x[2]
            ref[(1, 0, 1, 2)]=(1.15390811263+0.762983599586j)
            arg[(1, 0, 1, 3)]=(-0.188079684802-0.854045334678j)*x[0] + ((-0.359661899728+0.441861030958j))*x[1] + ((-0.796680552778+0.373627481017j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.672211068654-0.0192784113515j)
            arg[(1, 1, 0, 0)]=(-0.915948531555+0.068160220422j)*x[0] + ((0.827991532009-0.254035243331j))*x[1] + ((-0.104878552963+0.818537846312j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.0964177762546+0.316331411702j)
            arg[(1, 1, 0, 1)]=(-0.287597247915+0.0142768999547j)*x[0] + ((-0.0599247039281-0.185630389524j))*x[1] + ((0.757875308615-0.921356701876j))*x[2]
            ref[(1, 1, 0, 1)]=(0.205176678386-0.546355095723j)
            arg[(1, 1, 0, 2)]=(-0.992004396234-0.281307335654j)*x[0] + ((0.92704914818-0.236348366855j))*x[1] + ((-0.996766118799+0.757119626211j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.530860683426+0.119731961851j)
            arg[(1, 1, 0, 3)]=(0.711389246841+0.726060646236j)*x[0] + ((0.956971621872+0.170990087014j))*x[1] + ((0.000993914070411+0.47489074839j))*x[2]
            ref[(1, 1, 0, 3)]=(0.834677391392+0.685970740821j)
            arg[(1, 1, 1, 0)]=(-0.0546891102777+0.319122587231j)*x[0] + ((-0.802164388321-0.777133874339j))*x[1] + ((0.781340544432+0.413048035321j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.0377564770835-0.0224816258935j)
            arg[(1, 1, 1, 1)]=(0.335886214228-0.849107198249j)*x[0] + ((-0.711118158671-0.219180081745j))*x[1] + ((-0.0531014955211-0.147391565233j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.214166719982-0.607839422614j)
            arg[(1, 1, 1, 2)]=(-0.169839938348+0.0347277632953j)*x[0] + ((0.0297682799818-0.409527233136j))*x[1] + ((-0.544472981096-0.0272062994816j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.342272319731-0.201002884661j)
            arg[(1, 1, 1, 3)]=(-0.407777872354-0.216546854777j)*x[0] + ((-0.765939251172-0.300990310158j))*x[1] + ((0.139942912989-0.898287940945j))*x[2]
            ref[(1, 1, 1, 3)]=(-0.516887105269-0.70791255294j)
            arg[(1, 2, 0, 0)]=(-0.775398563381+0.0621728361985j)*x[0] + ((-0.514037468057+0.0824776933978j))*x[1] + ((-0.382163193871-0.530974763102j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.835799612654-0.193162116753j)
            arg[(1, 2, 0, 1)]=(0.90963244216+0.866810832063j)*x[0] + ((-0.0892184455647+0.770202619609j))*x[1] + ((0.419951141488-0.305985564727j))*x[2]
            ref[(1, 2, 0, 1)]=(0.620182569042+0.665513943473j)
            arg[(1, 2, 0, 2)]=(-0.567449236084+0.622918842137j)*x[0] + ((0.852904085068+0.987217627891j))*x[1] + ((-0.967571101682+0.543874085011j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.341058126349+1.07700527752j)
            arg[(1, 2, 0, 3)]=(-0.394411382211-0.758709272214j)*x[0] + ((-0.23140777063+0.784601155462j))*x[1] + ((-0.432668434529-0.729782304307j))*x[2]
            ref[(1, 2, 0, 3)]=(-0.529243793685-0.35194521053j)
            arg[(1, 2, 1, 0)]=(0.370159785046+0.639417036219j)*x[0] + ((0.200611207185+0.670292499098j))*x[1] + ((0.129032153993-0.714389543299j))*x[2]
            ref[(1, 2, 1, 0)]=(0.349901573112+0.297659996009j)
            arg[(1, 2, 1, 1)]=(0.368417362903+0.798308272548j)*x[0] + ((-0.875388868691+0.955412670553j))*x[1] + ((0.738108484399-0.703014426394j))*x[2]
            ref[(1, 2, 1, 1)]=(0.115568489306+0.525353258354j)
            arg[(1, 2, 1, 2)]=(0.241736295945+0.806843425174j)*x[0] + ((0.10883842511+0.776749793692j))*x[1] + ((-0.107806528041+0.160070938224j))*x[2]
            ref[(1, 2, 1, 2)]=(0.121384096507+0.871832078545j)
            arg[(1, 2, 1, 3)]=(-0.588354416516-0.235040439893j)*x[0] + ((0.242056079526+0.508231429124j))*x[1] + ((0.849759197583+0.744897407719j))*x[2]
            ref[(1, 2, 1, 3)]=(0.251730430297+0.509044198475j)
            arg[(2, 0, 0, 0)]=(0.681652536913-0.850325027619j)*x[0] + ((0.0874396609355-0.805185477484j))*x[1] + ((-0.140045279597+0.644233278502j))*x[2]
            ref[(2, 0, 0, 0)]=(0.314523459126-0.505638613301j)
            arg[(2, 0, 0, 1)]=(-0.0470488264633-0.722277119638j)*x[0] + ((-0.719192993266+0.438334473259j))*x[1] + ((0.669717438321+0.659218365201j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.0482621907041+0.187637859411j)
            arg[(2, 0, 0, 2)]=(0.520759219755-0.739100450124j)*x[0] + ((0.53769660255-0.817714328262j))*x[1] + ((0.740238299969+0.522869462374j))*x[2]
            ref[(2, 0, 0, 2)]=(0.899347061137-0.516972658006j)
            arg[(2, 0, 0, 3)]=(0.729384763517-0.634819547524j)*x[0] + ((0.922792896142+0.146128524209j))*x[1] + ((-0.779112491767+0.0605843235621j))*x[2]
            ref[(2, 0, 0, 3)]=(0.436532583946-0.214053349877j)
            arg[(2, 0, 1, 0)]=(0.261880816163+0.753735124931j)*x[0] + ((-0.223325544629+0.31816323516j))*x[1] + ((-0.0559954352676+0.36358038564j))*x[2]
            ref[(2, 0, 1, 0)]=(-0.00872008186659+0.717739372866j)
            arg[(2, 0, 1, 1)]=(-0.322281461405+0.219962972618j)*x[0] + ((0.805690878152+0.692414837477j))*x[1] + ((-0.411939016568-0.285404096211j))*x[2]
            ref[(2, 0, 1, 1)]=(0.0357352000893+0.313486856942j)
            arg[(2, 0, 1, 2)]=(-0.00414490431755-0.939561959603j)*x[0] + ((0.111311065514-0.111035225383j))*x[1] + ((0.485284812629-0.943926199284j))*x[2]
            ref[(2, 0, 1, 2)]=(0.296225486913-0.997261692135j)
            arg[(2, 0, 1, 3)]=(0.125568777237-0.130682637311j)*x[0] + ((-0.231315585249-0.941612256048j))*x[1] + ((0.57187113151+0.420590570749j))*x[2]
            ref[(2, 0, 1, 3)]=(0.233062161749-0.325852161305j)
            arg[(2, 1, 0, 0)]=(-0.945476034659-0.82987030404j)*x[0] + ((-0.884745744277+0.651045710952j))*x[1] + ((-0.396932052301+0.176467699711j))*x[2]
            ref[(2, 1, 0, 0)]=(-1.11357691562-0.00117844668894j)
            arg[(2, 1, 0, 1)]=(-0.0720653716204+0.982684678995j)*x[0] + ((0.463182891136+0.898609995127j))*x[1] + ((-0.534728210131+0.180271494287j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.0718053453076+1.0307830842j)
            arg[(2, 1, 0, 2)]=(-0.742088100815-0.66614788117j)*x[0] + ((0.365578289552+0.401804540883j))*x[1] + ((-0.992908534456+0.798382944823j))*x[2]
            ref[(2, 1, 0, 2)]=(-0.68470917286+0.267019802268j)
            arg[(2, 1, 0, 3)]=(0.443133814826+0.343889925953j)*x[0] + ((-0.173472790259-0.25950097703j))*x[1] + ((-0.529636096063+0.381029158649j))*x[2]
            ref[(2, 1, 0, 3)]=(-0.129987535748+0.232709053786j)
            arg[(2, 1, 1, 0)]=(-0.960599209323-0.573097929922j)*x[0] + ((0.886021091702-0.647219590943j))*x[1] + ((0.892574597646-0.272513110478j))*x[2]
            ref[(2, 1, 1, 0)]=(0.408998240013-0.746415315671j)
            arg[(2, 1, 1, 1)]=(0.75973922145+0.738606990731j)*x[0] + ((0.778300365459-0.0244719323817j))*x[1] + ((-0.920155139899-0.813481329397j))*x[2]
            ref[(2, 1, 1, 1)]=(0.308942223505-0.0496731355241j)
            arg[(2, 1, 1, 2)]=(-0.765327873863-0.347971601649j)*x[0] + ((0.525656337648+0.652081070754j))*x[1] + ((-0.936800540005+0.806561172428j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.58823603811+0.555335320767j)
            arg[(2, 1, 1, 3)]=(-0.0868924867803-0.639654536014j)*x[0] + ((0.192805251445+0.124523977419j))*x[1] + ((-0.721467682694+0.848136758253j))*x[2]
            ref[(2, 1, 1, 3)]=(-0.307777459015+0.166503099829j)
            arg[(2, 2, 0, 0)]=(0.861631086592-0.986987436498j)*x[0] + ((0.95503845154-0.547166053649j))*x[1] + ((0.738865096001+0.956885329674j))*x[2]
            ref[(2, 2, 0, 0)]=(1.27776731707-0.288634080237j)
            arg[(2, 2, 0, 1)]=(0.602772836229+0.701426662243j)*x[0] + ((0.0343312791469+0.169011829588j))*x[1] + ((-0.332536601453+0.309366910288j))*x[2]
            ref[(2, 2, 0, 1)]=(0.152283756961+0.589902701059j)
            arg[(2, 2, 0, 2)]=(-0.263782331096+0.194609823132j)*x[0] + ((-0.00877371937229-0.777889503769j))*x[1] + ((-0.503741517889-0.240065016766j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.388148784179-0.411672348701j)
            arg[(2, 2, 0, 3)]=(0.497122404696+0.105754907871j)*x[0] + ((-0.677685457474+0.463474098291j))*x[1] + ((0.380385992589+0.867235547959j))*x[2]
            ref[(2, 2, 0, 3)]=(0.0999114699056+0.71823227706j)
            arg[(2, 2, 1, 0)]=(-0.954328333685-0.143849367427j)*x[0] + ((0.532535222484-0.0371079384626j))*x[1] + ((0.905674411746-0.0165647262538j))*x[2]
            ref[(2, 2, 1, 0)]=(0.241940650272-0.0987610160719j)
            arg[(2, 2, 1, 1)]=(0.618632724845+0.985408262942j)*x[0] + ((0.993896547343+0.37640323074j))*x[1] + ((0.710550677727+0.366474267977j))*x[2]
            ref[(2, 2, 1, 1)]=(1.16153997496+0.86414288083j)
            arg[(2, 2, 1, 2)]=(0.46801844178+0.782922845777j)*x[0] + ((0.997593387687+0.428686864929j))*x[1] + ((0.425648243716-0.376540011028j))*x[2]
            ref[(2, 2, 1, 2)]=(0.945630036592+0.417534849839j)
            arg[(2, 2, 1, 3)]=(0.0765096488436+0.252662685426j)*x[0] + ((0.628491143411+0.183586258625j))*x[1] + ((-0.618156472256-0.418797282597j))*x[2]
            ref[(2, 2, 1, 3)]=(0.0434221599991+0.00872583072763j)
            arg[(3, 0, 0, 0)]=(-0.709023258157-0.821794979877j)*x[0] + ((0.0455074766283-0.233463224412j))*x[1] + ((-0.253749001319+0.132591766893j))*x[2]
            ref[(3, 0, 0, 0)]=(-0.458632391424-0.461333218698j)
            arg[(3, 0, 0, 1)]=(0.785560414779+0.615323143332j)*x[0] + ((0.128182512277+0.130528936603j))*x[1] + ((-0.476485650661+0.843683581914j))*x[2]
            ref[(3, 0, 0, 1)]=(0.218628638197+0.794767830924j)
            arg[(3, 0, 0, 2)]=(0.0956875798379+0.664428821465j)*x[0] + ((-0.883407741589+0.0512370602844j))*x[1] + ((-0.959436854361+0.785699309186j))*x[2]
            ref[(3, 0, 0, 2)]=(-0.873578508056+0.750682595468j)
            arg[(3, 0, 0, 3)]=(0.80993769208-0.564554945787j)*x[0] + ((-0.881273890876+0.423204706383j))*x[1] + ((0.424612267728-0.01427647634j))*x[2]
            ref[(3, 0, 0, 3)]=(0.176638034466-0.0778133578722j)
            arg[(3, 0, 1, 0)]=(-0.296650452911+0.310688871344j)*x[0] + ((-0.23399497307+0.539222623414j))*x[1] + ((-0.479134961368-0.642172927575j))*x[2]
            ref[(3, 0, 1, 0)]=(-0.504890193675+0.103869283592j)
            arg[(3, 0, 1, 1)]=(-0.641722569141-0.913325765606j)*x[0] + ((0.456580085235-0.866898457669j))*x[1] + ((-0.958409059806+0.00190869472607j))*x[2]
            ref[(3, 0, 1, 1)]=(-0.571775771856-0.889157764274j)
            arg[(3, 0, 1, 2)]=(-0.864101801294-0.0274433987764j)*x[0] + ((0.226863998947+0.22608295148j))*x[1] + ((-0.115496962428-0.308820868408j))*x[2]
            ref[(3, 0, 1, 2)]=(-0.376367382387-0.0550906578522j)
            arg[(3, 0, 1, 3)]=(0.792042560238-0.0900547573894j)*x[0] + ((0.457185890692+0.476294020571j))*x[1] + ((-0.255733739739+0.150473471975j))*x[2]
            ref[(3, 0, 1, 3)]=(0.496747355595+0.268356367578j)
            arg[(3, 1, 0, 0)]=(0.495433179356-0.125711806349j)*x[0] + ((0.0453015345523+0.287536185475j))*x[1] + ((0.31480084913-0.385162685479j))*x[2]
            ref[(3, 1, 0, 0)]=(0.427767781519-0.111669153176j)
            arg[(3, 1, 0, 1)]=(-0.207314813909-0.858448254355j)*x[0] + ((-0.685710809004+0.756582030315j))*x[1] + ((-0.917400539015+0.832459049462j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.905213080964+0.365296412711j)
            arg[(3, 1, 0, 2)]=(0.843784776735-0.336439936197j)*x[0] + ((0.950387869743-0.888384126359j))*x[1] + ((0.65835564482-0.444714857966j))*x[2]
            ref[(3, 1, 0, 2)]=(1.22626414565-0.834769460261j)
            arg[(3, 1, 0, 3)]=(-0.434940675927-0.784334403199j)*x[0] + ((0.53201824306+0.995873435583j))*x[1] + ((-0.900326815711+0.295161339476j))*x[2]
            ref[(3, 1, 0, 3)]=(-0.401624624289+0.25335018593j)
            arg[(3, 1, 1, 0)]=(0.547547201515+0.776366936373j)*x[0] + ((0.306033429639-0.717051213522j))*x[1] + ((0.259076833339+0.933661396066j))*x[2]
            ref[(3, 1, 1, 0)]=(0.556328732246+0.496488559459j)
            arg[(3, 1, 1, 1)]=(0.779014634033-0.778991870864j)*x[0] + ((0.585683277007-0.237971753432j))*x[1] + ((0.538104264837-0.453291447615j))*x[2]
            ref[(3, 1, 1, 1)]=(0.951401087939-0.735127535955j)
            arg[(3, 1, 1, 2)]=(-0.450629412083+0.785528606751j)*x[0] + ((0.867662012224-0.662510965709j))*x[1] + ((0.319055631221-0.236251172341j))*x[2]
            ref[(3, 1, 1, 2)]=(0.368044115681-0.056616765649j)
            arg[(3, 1, 1, 3)]=(0.767694171094-0.207942905382j)*x[0] + ((0.796850860667+0.770330850524j))*x[1] + ((-0.953868693604+0.0695793445021j))*x[2]
            ref[(3, 1, 1, 3)]=(0.305338169079+0.315983644822j)
            arg[(3, 2, 0, 0)]=(0.0885647806327+0.0230172532095j)*x[0] + ((-0.0847120408783+0.42475230773j))*x[1] + ((0.311715740145+0.91375664091j))*x[2]
            ref[(3, 2, 0, 0)]=(0.15778423995+0.680763100925j)
            arg[(3, 2, 0, 1)]=(0.136383880014+0.156275084417j)*x[0] + ((-0.355980088286-0.16390887045j))*x[1] + ((-0.193936061966+0.89247441534j))*x[2]
            ref[(3, 2, 0, 1)]=(-0.206766135119+0.442420314654j)
            arg[(3, 2, 0, 2)]=(-0.183462898732-0.633875902783j)*x[0] + ((0.811446982473-0.517764671822j))*x[1] + ((0.670951993242-0.220220022069j))*x[2]
            ref[(3, 2, 0, 2)]=(0.649468038491-0.685930298337j)
            arg[(3, 2, 0, 3)]=(-0.798745918466+0.241173350307j)*x[0] + ((-0.488359193218-0.0624152644449j))*x[1] + ((0.71587253407+0.766085707043j))*x[2]
            ref[(3, 2, 0, 3)]=(-0.285616288807+0.472421896452j)
            arg[(3, 2, 1, 0)]=(-0.0834617710515+0.452594772414j)*x[0] + ((0.84301197756+0.0725877760157j))*x[1] + ((-0.0622734959368-0.699017823563j))*x[2]
            ref[(3, 2, 1, 0)]=(0.348638355286-0.0869176375669j)
            arg[(3, 2, 1, 1)]=(0.0250748162393-0.0928145533718j)*x[0] + ((0.394524482671+0.446235440433j))*x[1] + ((-0.521324232734-0.067885417951j))*x[2]
            ref[(3, 2, 1, 1)]=(-0.0508624669118+0.142767734555j)
            arg[(3, 2, 1, 2)]=(0.767124543525+0.590862261423j)*x[0] + ((0.947466189337+0.258491322492j))*x[1] + ((-0.112554055409+0.347187425826j))*x[2]
            ref[(3, 2, 1, 2)]=(0.801018338727+0.598270504871j)
            arg[(3, 2, 1, 3)]=(-0.00496767706306+0.58033671468j)*x[0] + ((0.322586331974+0.624523240757j))*x[1] + ((-0.53231718433-0.880753066651j))*x[2]
            ref[(3, 2, 1, 3)]=(-0.10734926471+0.162053444393j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.814423557721-0.57731842104j)*x[0]**o + ((0.987012568184-0.0835343749129j))*x[0] + ((-0.939209982008-0.144116708539j))*x[1]**o + ((0.904088679389-0.618635567513j))*x[1]
            ref=(-0.939209982008-0.144116708539j)/(o+1.)+((0.945550623786-0.351084971213j))+((-0.814423557721-0.57731842104j))*0.5**o
        else:
            arg=(-0.702139088463-0.272736639934j)*x[0]**o + ((-0.507375183439-0.125556815288j))*x[0] + ((-0.797467367567-0.0157734588304j))*x[1]**o + ((0.135758748197+0.540717760885j))*x[1] + ((-0.316618481454+0.640085717084j))*x[2]**o + ((0.715737585725+0.201592102299j))*x[2]
            ref=(-1.11408584902+0.624312258254j)/(o+1.)+((0.172060575242+0.308376523948j))+((-0.702139088463-0.272736639934j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.335152775119+0.403743638055j)*x[0]**o + ((0.375379470597+0.690147786649j))*x[0] + ((0.304185481014+0.898941296382j))*x[1]**o + ((-0.195435050463-0.646454593676j))*x[1]
            ref[(0,)]=(0.304185481014+0.898941296382j)/(o+1.)+((0.089972210067+0.0218465964864j))+((0.335152775119+0.403743638055j))*0.5**o
            arg[(1,)]=(0.0756910774193-0.117821570153j)*x[0]**o + ((0.451880711094+0.347645355607j))*x[0] + ((0.601872847037-0.76746652234j))*x[1]**o + ((0.912581598161+0.652452513749j))*x[1]
            ref[(1,)]=(0.601872847037-0.76746652234j)/(o+1.)+((0.682231154627+0.500048934678j))+((0.0756910774193-0.117821570153j))*0.5**o
        else:
            arg[(0,)]=(0.232305647131-0.675060329229j)*x[0]**o + ((-0.594369120058-0.453639425762j))*x[0] + ((-0.862889106289-0.78922408776j))*x[1]**o + ((-0.977130831716-0.488263431916j))*x[1] + ((-0.348367037794-0.0372198811257j))*x[2]**o + ((0.45215103632+0.26643576438j))*x[2]
            ref[(0,)]=(-1.21125614408-0.826443968886j)/(o+1.)+((-0.559674457727-0.337733546649j))+((0.232305647131-0.675060329229j))*0.5**o
            arg[(1,)]=(-0.497724238382+0.53999019038j)*x[0]**o + ((-0.881325644186+0.723992181318j))*x[0] + ((0.824561807083-0.0932032135917j))*x[1]**o + ((-0.886538814791+0.689713722053j))*x[1] + ((0.754861968413-0.16092373777j))*x[2]**o + ((0.124958180381+0.00772828258508j))*x[2]
            ref[(1,)]=(1.5794237755-0.254126951362j)/(o+1.)+((-0.821453139298+0.710717092978j))+((-0.497724238382+0.53999019038j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.716484539253-0.553788899647j)*x[0]**o + ((0.926051982877-0.449914505239j))*x[0] + ((-0.42984665865+0.384627707967j))*x[1]**o + ((-0.953837828141+0.449209159709j))*x[1]
            ref[(0, 0)]=(-0.42984665865+0.384627707967j)/(o+1.)+((-0.0138929226318-0.000352672765082j))+((0.716484539253-0.553788899647j))*0.5**o
            arg[(0, 1)]=(0.578094064656-0.00762462658766j)*x[0]**o + ((-0.744196738211-0.585037850464j))*x[0] + ((-0.50837492455-0.4453059205j))*x[1]**o + ((-0.0802987628933-0.716618954628j))*x[1]
            ref[(0, 1)]=(-0.50837492455-0.4453059205j)/(o+1.)+((-0.412247750552-0.650828402546j))+((0.578094064656-0.00762462658766j))*0.5**o
            arg[(0, 2)]=(-0.0676178493333+0.316926503875j)*x[0]**o + ((-0.507863196552+0.492472474884j))*x[0] + ((0.943773828678+0.238959230065j))*x[1]**o + ((0.661164332291-0.872003371123j))*x[1]
            ref[(0, 2)]=(0.943773828678+0.238959230065j)/(o+1.)+((0.0766505678692-0.18976544812j))+((-0.0676178493333+0.316926503875j))*0.5**o
            arg[(0, 3)]=(-0.0506441994112-0.823334420697j)*x[0]**o + ((-0.408021520807-0.731275715486j))*x[0] + ((-0.646865589784+0.899778678433j))*x[1]**o + ((-0.947957278626+0.661373430306j))*x[1]
            ref[(0, 3)]=(-0.646865589784+0.899778678433j)/(o+1.)+((-0.677989399717-0.0349511425901j))+((-0.0506441994112-0.823334420697j))*0.5**o
            arg[(1, 0)]=(-0.944321601999+0.079897612698j)*x[0]**o + ((0.0954521809572-0.0907505491898j))*x[0] + ((-0.379689750701-0.243239358896j))*x[1]**o + ((0.625491514122+0.456242350674j))*x[1]
            ref[(1, 0)]=(-0.379689750701-0.243239358896j)/(o+1.)+((0.36047184754+0.182745900742j))+((-0.944321601999+0.079897612698j))*0.5**o
            arg[(1, 1)]=(-0.989441329525-0.55707642737j)*x[0]**o + ((-0.0862792820386+0.648375679397j))*x[0] + ((-0.436400837118-0.576808688086j))*x[1]**o + ((-0.913051774514+0.911174695487j))*x[1]
            ref[(1, 1)]=(-0.436400837118-0.576808688086j)/(o+1.)+((-0.499665528276+0.779775187442j))+((-0.989441329525-0.55707642737j))*0.5**o
            arg[(1, 2)]=(0.899703752164+0.993994806662j)*x[0]**o + ((-0.634994567307-0.68906287542j))*x[0] + ((0.747946556218-0.565056691594j))*x[1]**o + ((-0.861034443764-0.884034171663j))*x[1]
            ref[(1, 2)]=(0.747946556218-0.565056691594j)/(o+1.)+((-0.748014505536-0.786548523541j))+((0.899703752164+0.993994806662j))*0.5**o
            arg[(1, 3)]=(-0.635560962618+0.24380869445j)*x[0]**o + ((0.164693443604+0.933873888474j))*x[0] + ((-0.163938828684-0.772731358903j))*x[1]**o + ((-0.293268171756-0.185606890287j))*x[1]
            ref[(1, 3)]=(-0.163938828684-0.772731358903j)/(o+1.)+((-0.064287364076+0.374133499094j))+((-0.635560962618+0.24380869445j))*0.5**o
            arg[(2, 0)]=(0.0124556217483-0.244483684429j)*x[0]**o + ((0.0192844231744-0.649361106688j))*x[0] + ((-0.685703729016-0.389955228928j))*x[1]**o + ((0.671814704113+0.883482754063j))*x[1]
            ref[(2, 0)]=(-0.685703729016-0.389955228928j)/(o+1.)+((0.345549563644+0.117060823688j))+((0.0124556217483-0.244483684429j))*0.5**o
            arg[(2, 1)]=(0.15389586682+0.701225898176j)*x[0]**o + ((-0.983450103459-0.380054572444j))*x[0] + ((-0.995090076029+0.817139139668j))*x[1]**o + ((-0.174603606338-0.148666724042j))*x[1]
            ref[(2, 1)]=(-0.995090076029+0.817139139668j)/(o+1.)+((-0.579026854898-0.264360648243j))+((0.15389586682+0.701225898176j))*0.5**o
            arg[(2, 2)]=(0.0288592735809-0.724357523574j)*x[0]**o + ((0.114117043388+0.686593397386j))*x[0] + ((0.179883266101+0.686489492189j))*x[1]**o + ((-0.978402316668-0.0357361600757j))*x[1]
            ref[(2, 2)]=(0.179883266101+0.686489492189j)/(o+1.)+((-0.43214263664+0.325428618655j))+((0.0288592735809-0.724357523574j))*0.5**o
            arg[(2, 3)]=(0.65855919123-0.272166471484j)*x[0]**o + ((0.687948433467+0.601277943933j))*x[0] + ((0.225182863413-0.507610519118j))*x[1]**o + ((0.807814147732+0.249933043831j))*x[1]
            ref[(2, 3)]=(0.225182863413-0.507610519118j)/(o+1.)+((0.747881290599+0.425605493882j))+((0.65855919123-0.272166471484j))*0.5**o
            arg[(3, 0)]=(-0.538179087632+0.869602854708j)*x[0]**o + ((0.149302125479+0.312244171278j))*x[0] + ((-0.159952411361-0.388944188493j))*x[1]**o + ((0.458300964066+0.32144547037j))*x[1]
            ref[(3, 0)]=(-0.159952411361-0.388944188493j)/(o+1.)+((0.303801544773+0.316844820824j))+((-0.538179087632+0.869602854708j))*0.5**o
            arg[(3, 1)]=(-0.932068291333+0.180547339467j)*x[0]**o + ((0.802225644932-0.0127717681506j))*x[0] + ((-0.547885712334+0.974185965985j))*x[1]**o + ((-0.91611258988-0.139338055003j))*x[1]
            ref[(3, 1)]=(-0.547885712334+0.974185965985j)/(o+1.)+((-0.0569434724738-0.0760549115767j))+((-0.932068291333+0.180547339467j))*0.5**o
            arg[(3, 2)]=(-0.211094813032-0.0545593807021j)*x[0]**o + ((0.141880150955+0.265277467321j))*x[0] + ((0.994682841467-0.620647393093j))*x[1]**o + ((0.801840229163+0.361060448719j))*x[1]
            ref[(3, 2)]=(0.994682841467-0.620647393093j)/(o+1.)+((0.471860190059+0.31316895802j))+((-0.211094813032-0.0545593807021j))*0.5**o
            arg[(3, 3)]=(-0.829093807114-0.63262817305j)*x[0]**o + ((-0.519257960643+0.567060655277j))*x[0] + ((-0.91441768254+0.277321071689j))*x[1]**o + ((0.747771720407+0.622624995294j))*x[1]
            ref[(3, 3)]=(-0.91441768254+0.277321071689j)/(o+1.)+((0.114256879882+0.594842825285j))+((-0.829093807114-0.63262817305j))*0.5**o
        else:
            arg[(0, 0)]=(0.638579593842-0.234883497444j)*x[0]**o + ((-0.672974644142+0.650952147136j))*x[0] + ((-0.510013238118+0.706513393327j))*x[1]**o + ((-0.177251807272+0.279049430467j))*x[1] + ((0.492887573074+0.935559546292j))*x[2]**o + ((0.0392662051+0.147537600898j))*x[2]
            ref[(0, 0)]=(-0.0171256650433+1.64207293962j)/(o+1.)+((-0.405480123157+0.538769589251j))+((0.638579593842-0.234883497444j))*0.5**o
            arg[(0, 1)]=(-0.616834224914+0.672758577799j)*x[0]**o + ((0.149937099691+0.58284284119j))*x[0] + ((-0.851175078483-0.0500399852613j))*x[1]**o + ((0.204929693076+0.301890938964j))*x[1] + ((-0.822477721994+0.714571163876j))*x[2]**o + ((0.470176762525-0.19838939959j))*x[2]
            ref[(0, 1)]=(-1.67365280048+0.664531178615j)/(o+1.)+((0.412521777646+0.343172190282j))+((-0.616834224914+0.672758577799j))*0.5**o
            arg[(0, 2)]=(0.0808714531125-0.25194593262j)*x[0]**o + ((-0.893227782854+0.160960106918j))*x[0] + ((-0.53793198187-0.780540175937j))*x[1]**o + ((-0.60852372869+0.556941531473j))*x[1] + ((-0.78357819887-0.627320943212j))*x[2]**o + ((0.306976327596-0.0752862273862j))*x[2]
            ref[(0, 2)]=(-1.32151018074-1.40786111915j)/(o+1.)+((-0.597387591974+0.321307705502j))+((0.0808714531125-0.25194593262j))*0.5**o
            arg[(0, 3)]=(0.507794631268-0.739927375644j)*x[0]**o + ((0.750248841149-0.555758879247j))*x[0] + ((-0.0600034255393-0.263386165045j))*x[1]**o + ((-0.543527388416-0.898810398627j))*x[1] + ((-0.266269478325-0.217854775978j))*x[2]**o + ((0.598885528679+0.690186302624j))*x[2]
            ref[(0, 3)]=(-0.326272903864-0.481240941024j)/(o+1.)+((0.402803490706-0.382191487625j))+((0.507794631268-0.739927375644j))*0.5**o
            arg[(1, 0)]=(-0.855988461317+0.695985079623j)*x[0]**o + ((-0.204039149597+0.670871339337j))*x[0] + ((0.529336682757+0.294687138467j))*x[1]**o + ((-0.0980233968503+0.282786646632j))*x[1] + ((0.0447696920028-0.862970906185j))*x[2]**o + ((-0.171270858485-0.395408477057j))*x[2]
            ref[(1, 0)]=(0.57410637476-0.568283767718j)/(o+1.)+((-0.236666702466+0.279124754455j))+((-0.855988461317+0.695985079623j))*0.5**o
            arg[(1, 1)]=(0.21855026333-0.232995582604j)*x[0]**o + ((0.925573824165+0.351506862478j))*x[0] + ((0.952236593484-0.407299735324j))*x[1]**o + ((-0.666616227763-0.078919102182j))*x[1] + ((-0.570004621101+0.845586850279j))*x[2]**o + ((-0.343168125411-0.0950853648303j))*x[2]
            ref[(1, 1)]=(0.382231972383+0.438287114955j)/(o+1.)+((-0.0421052645045+0.0887511977328j))+((0.21855026333-0.232995582604j))*0.5**o
            arg[(1, 2)]=(0.138848565079+0.839434907851j)*x[0]**o + ((0.395407590169+0.376398920764j))*x[0] + ((-0.273314141374+0.609333939681j))*x[1]**o + ((-0.280682373099-0.196727576975j))*x[1] + ((-0.759289614687+0.040875478679j))*x[2]**o + ((0.998920297608-0.643785886534j))*x[2]
            ref[(1, 2)]=(-1.03260375606+0.65020941836j)/(o+1.)+((0.556822757339-0.232057271373j))+((0.138848565079+0.839434907851j))*0.5**o
            arg[(1, 3)]=(-0.443890122447+0.950911702861j)*x[0]**o + ((-0.516080938041+0.792608444857j))*x[0] + ((-0.885823470481+0.820257512619j))*x[1]**o + ((0.36979182086-0.0765777516389j))*x[1] + ((-0.919099409137+0.811866267239j))*x[2]**o + ((0.978657924598-0.0499470548814j))*x[2]
            ref[(1, 3)]=(-1.80492287962+1.63212377986j)/(o+1.)+((0.416184403709+0.333041819168j))+((-0.443890122447+0.950911702861j))*0.5**o
            arg[(2, 0)]=(-0.728655471422+0.586284417567j)*x[0]**o + ((0.160788111697-0.286441908174j))*x[0] + ((-0.0718002913061+0.897134767298j))*x[1]**o + ((0.909102782264+0.742399604588j))*x[1] + ((0.74789940252+0.807130416199j))*x[2]**o + ((0.687546142245-0.990787006821j))*x[2]
            ref[(2, 0)]=(0.676099111214+1.7042651835j)/(o+1.)+((0.878718518104-0.267414655204j))+((-0.728655471422+0.586284417567j))*0.5**o
            arg[(2, 1)]=(-0.253464407109+0.170147927473j)*x[0]**o + ((0.648327756313-0.241492642956j))*x[0] + ((-0.640228956779+0.469500584355j))*x[1]**o + ((-0.555767527244+0.432725831406j))*x[1] + ((0.780458554203-0.347900946245j))*x[2]**o + ((0.00712160103699-0.220644972148j))*x[2]
            ref[(2, 1)]=(0.140229597423+0.12159963811j)/(o+1.)+((0.049840915053-0.0147058918492j))+((-0.253464407109+0.170147927473j))*0.5**o
            arg[(2, 2)]=(0.0900934950944+0.309247832011j)*x[0]**o + ((0.0499207944457+0.301450135926j))*x[0] + ((0.253208083444-0.495660822886j))*x[1]**o + ((0.690445717265-0.0745090537083j))*x[1] + ((0.944704309831-0.381120043752j))*x[2]**o + ((-0.831864647235+0.0330314705989j))*x[2]
            ref[(2, 2)]=(1.19791239327-0.876780866638j)/(o+1.)+((-0.0457490677623+0.129986276408j))+((0.0900934950944+0.309247832011j))*0.5**o
            arg[(2, 3)]=(0.236832672195+0.112587650112j)*x[0]**o + ((0.386249842126-0.700128568168j))*x[0] + ((0.561208503825+0.192417891443j))*x[1]**o + ((-0.816013072188+0.242138491954j))*x[1] + ((0.882782800938+0.667483543628j))*x[2]**o + ((0.0117030679883-0.443248348206j))*x[2]
            ref[(2, 3)]=(1.44399130476+0.859901435071j)/(o+1.)+((-0.209030081037-0.45061921221j))+((0.236832672195+0.112587650112j))*0.5**o
            arg[(3, 0)]=(-0.997433618174-0.909941799765j)*x[0]**o + ((-0.261170599367-0.535528083602j))*x[0] + ((0.118818178859+0.461934528115j))*x[1]**o + ((-0.569220749506+0.787860130597j))*x[1] + ((0.559703793852-0.0422622280439j))*x[2]**o + ((-0.924548791867+0.736736663299j))*x[2]
            ref[(3, 0)]=(0.678521972711+0.419672300071j)/(o+1.)+((-0.87747007037+0.494534355147j))+((-0.997433618174-0.909941799765j))*0.5**o
            arg[(3, 1)]=(-0.0289246100897-0.710132455224j)*x[0]**o + ((0.19076099531-0.85758382994j))*x[0] + ((-0.306901546598-0.145564499709j))*x[1]**o + ((0.137942527398-0.606749191387j))*x[1] + ((0.255411886622-0.930847600397j))*x[2]**o + ((-0.788657430907-0.883124817008j))*x[2]
            ref[(3, 1)]=(-0.0514896599757-1.07641210011j)/(o+1.)+((-0.2299769541-1.17372891917j))+((-0.0289246100897-0.710132455224j))*0.5**o
            arg[(3, 2)]=(-0.734134071251-0.0477376355617j)*x[0]**o + ((-0.403959166953+0.603466302794j))*x[0] + ((0.0774613499182-0.729608679548j))*x[1]**o + ((0.790878147+0.274411506145j))*x[1] + ((-0.752382693813+0.00489096276083j))*x[2]**o + ((0.050044874138-0.88190731249j))*x[2]
            ref[(3, 2)]=(-0.674921343895-0.724717716787j)/(o+1.)+((0.218481927093-0.00201475177553j))+((-0.734134071251-0.0477376355617j))*0.5**o
            arg[(3, 3)]=(-0.137615325471-0.987428524211j)*x[0]**o + ((0.950782884499-0.637595318348j))*x[0] + ((0.451505225609+0.982885730925j))*x[1]**o + ((-0.143014563997+0.511854320062j))*x[1] + ((0.615727158841-0.295231601177j))*x[2]**o + ((0.631445217899+0.0881395120442j))*x[2]
            ref[(3, 3)]=(1.06723238445+0.687654129748j)/(o+1.)+((0.719606769201-0.0188007431207j))+((-0.137615325471-0.987428524211j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref=numpy.zeros((3, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.967415668236+0.439162852574j)*x[0]**o + ((-0.279024960032-0.338197586881j))*x[0] + ((0.790970816523-0.785189032759j))*x[1]**o + ((-0.896846193239-0.126608070161j))*x[1]
            ref[(0, 0, 0)]=(0.790970816523-0.785189032759j)/(o+1.)+((-0.587935576635-0.232402828521j))+((-0.967415668236+0.439162852574j))*0.5**o
            arg[(0, 0, 1)]=(-0.554551905356+0.997830966086j)*x[0]**o + ((0.907624851598+0.730973590596j))*x[0] + ((0.858966434109-0.756422897098j))*x[1]**o + ((-0.771643779888-0.367153454091j))*x[1]
            ref[(0, 0, 1)]=(0.858966434109-0.756422897098j)/(o+1.)+((0.067990535855+0.181910068252j))+((-0.554551905356+0.997830966086j))*0.5**o
            arg[(0, 0, 2)]=(0.371442089494+0.568745203225j)*x[0]**o + ((-0.0789593173098+0.566228313735j))*x[0] + ((0.0549993199031-0.138736161909j))*x[1]**o + ((0.923660911181-0.129182221445j))*x[1]
            ref[(0, 0, 2)]=(0.0549993199031-0.138736161909j)/(o+1.)+((0.422350796935+0.218523046145j))+((0.371442089494+0.568745203225j))*0.5**o
            arg[(0, 0, 3)]=(0.686703403305+0.0184513787221j)*x[0]**o + ((-0.705515494945-0.145253866366j))*x[0] + ((0.0286748147219+0.930896633066j))*x[1]**o + ((0.285623134168+0.724282262088j))*x[1]
            ref[(0, 0, 3)]=(0.0286748147219+0.930896633066j)/(o+1.)+((-0.209946180388+0.289514197861j))+((0.686703403305+0.0184513787221j))*0.5**o
            arg[(0, 1, 0)]=(0.186337372828-0.478678089957j)*x[0]**o + ((-0.566842888518-0.708636444384j))*x[0] + ((-0.0229056211824+0.0207314116317j))*x[1]**o + ((-0.0905902855074+0.823376510007j))*x[1]
            ref[(0, 1, 0)]=(-0.0229056211824+0.0207314116317j)/(o+1.)+((-0.328716587013+0.0573700328116j))+((0.186337372828-0.478678089957j))*0.5**o
            arg[(0, 1, 1)]=(-0.0892807598315-0.926130695906j)*x[0]**o + ((0.528711833324-0.914568175064j))*x[0] + ((0.635942289792-0.207778535901j))*x[1]**o + ((-0.331668372544+0.735937602047j))*x[1]
            ref[(0, 1, 1)]=(0.635942289792-0.207778535901j)/(o+1.)+((0.0985217303901-0.0893152865085j))+((-0.0892807598315-0.926130695906j))*0.5**o
            arg[(0, 1, 2)]=(0.231253282582+0.233924457518j)*x[0]**o + ((0.373218036656-0.529000854928j))*x[0] + ((-0.973959208845+0.618165310477j))*x[1]**o + ((0.461187332532+0.428123145533j))*x[1]
            ref[(0, 1, 2)]=(-0.973959208845+0.618165310477j)/(o+1.)+((0.417202684594-0.0504388546976j))+((0.231253282582+0.233924457518j))*0.5**o
            arg[(0, 1, 3)]=(0.0178435123172+0.97136673127j)*x[0]**o + ((0.690506442251-0.635328222482j))*x[0] + ((0.0101294525187+0.321719922868j))*x[1]**o + ((0.462468686068-0.185291963973j))*x[1]
            ref[(0, 1, 3)]=(0.0101294525187+0.321719922868j)/(o+1.)+((0.576487564159-0.410310093228j))+((0.0178435123172+0.97136673127j))*0.5**o
            arg[(0, 2, 0)]=(0.127355114759-0.274486761496j)*x[0]**o + ((0.674640349065-0.021620873356j))*x[0] + ((-0.435464218833-0.31285574266j))*x[1]**o + ((-0.560777943648+0.164714235811j))*x[1]
            ref[(0, 2, 0)]=(-0.435464218833-0.31285574266j)/(o+1.)+((0.0569312027086+0.0715466812274j))+((0.127355114759-0.274486761496j))*0.5**o
            arg[(0, 2, 1)]=(-0.267280263156+0.488112146873j)*x[0]**o + ((0.159103732685-0.548879938367j))*x[0] + ((-0.834579704253+0.892320292263j))*x[1]**o + ((-0.970113258563+0.686074609398j))*x[1]
            ref[(0, 2, 1)]=(-0.834579704253+0.892320292263j)/(o+1.)+((-0.405504762939+0.0685973355154j))+((-0.267280263156+0.488112146873j))*0.5**o
            arg[(0, 2, 2)]=(-0.638862633548-0.793181589143j)*x[0]**o + ((0.60318021223-0.387106969897j))*x[0] + ((0.860364774848+0.230576526255j))*x[1]**o + ((-0.318196539522-0.313014802237j))*x[1]
            ref[(0, 2, 2)]=(0.860364774848+0.230576526255j)/(o+1.)+((0.142491836354-0.350060886067j))+((-0.638862633548-0.793181589143j))*0.5**o
            arg[(0, 2, 3)]=(-0.625564579873+0.136802907095j)*x[0]**o + ((0.607706418958-0.703536361845j))*x[0] + ((-0.261220085577-0.489145431113j))*x[1]**o + ((0.0423542563806-0.631457610782j))*x[1]
            ref[(0, 2, 3)]=(-0.261220085577-0.489145431113j)/(o+1.)+((0.32503033767-0.667496986313j))+((-0.625564579873+0.136802907095j))*0.5**o
            arg[(0, 3, 0)]=(-0.533714381259+0.486402781149j)*x[0]**o + ((-0.718616426105-0.115166008702j))*x[0] + ((-0.130209123708+0.218899253428j))*x[1]**o + ((0.0916805338828-0.248262633779j))*x[1]
            ref[(0, 3, 0)]=(-0.130209123708+0.218899253428j)/(o+1.)+((-0.313467946111-0.18171432124j))+((-0.533714381259+0.486402781149j))*0.5**o
            arg[(0, 3, 1)]=(0.855281838376-0.561293332303j)*x[0]**o + ((-0.883372122606+0.129651057163j))*x[0] + ((-0.976386074927-0.0718545523174j))*x[1]**o + ((0.333282274672-0.392545904374j))*x[1]
            ref[(0, 3, 1)]=(-0.976386074927-0.0718545523174j)/(o+1.)+((-0.275044923967-0.131447423605j))+((0.855281838376-0.561293332303j))*0.5**o
            arg[(0, 3, 2)]=(0.779405829571+0.332446690491j)*x[0]**o + ((-0.681837376527-0.893564136997j))*x[0] + ((0.255334862982+0.938347053778j))*x[1]**o + ((-0.696422639853-0.927713342697j))*x[1]
            ref[(0, 3, 2)]=(0.255334862982+0.938347053778j)/(o+1.)+((-0.68913000819-0.910638739847j))+((0.779405829571+0.332446690491j))*0.5**o
            arg[(0, 3, 3)]=(0.99791808787+0.794511014312j)*x[0]**o + ((0.381726466519+0.348075573855j))*x[0] + ((0.118565786818+0.361452600015j))*x[1]**o + ((0.409279751253-0.970873222128j))*x[1]
            ref[(0, 3, 3)]=(0.118565786818+0.361452600015j)/(o+1.)+((0.395503108886-0.311398824136j))+((0.99791808787+0.794511014312j))*0.5**o
            arg[(1, 0, 0)]=(-0.128805567831-0.426991632444j)*x[0]**o + ((-0.408451837525-0.933212711682j))*x[0] + ((0.140132495324+0.231120014611j))*x[1]**o + ((0.161199276463-0.368139932138j))*x[1]
            ref[(1, 0, 0)]=(0.140132495324+0.231120014611j)/(o+1.)+((-0.123626280531-0.65067632191j))+((-0.128805567831-0.426991632444j))*0.5**o
            arg[(1, 0, 1)]=(0.133986960396+0.58627862717j)*x[0]**o + ((0.161084464798-0.811811414092j))*x[0] + ((-0.610312851557+0.756896432193j))*x[1]**o + ((0.906216518989-0.965832520852j))*x[1]
            ref[(1, 0, 1)]=(-0.610312851557+0.756896432193j)/(o+1.)+((0.533650491893-0.888821967472j))+((0.133986960396+0.58627862717j))*0.5**o
            arg[(1, 0, 2)]=(0.91640943724-0.430398808443j)*x[0]**o + ((-0.0782466637862-0.124108453775j))*x[0] + ((0.12260953798-0.837748551965j))*x[1]**o + ((0.0573555609668-0.116831328711j))*x[1]
            ref[(1, 0, 2)]=(0.12260953798-0.837748551965j)/(o+1.)+((-0.0104455514097-0.120469891243j))+((0.91640943724-0.430398808443j))*0.5**o
            arg[(1, 0, 3)]=(0.334440148858-0.00777854264602j)*x[0]**o + ((0.779622108759-0.301608972028j))*x[0] + ((-0.0698926833257-0.802035258743j))*x[1]**o + ((0.220279619577+0.102764642899j))*x[1]
            ref[(1, 0, 3)]=(-0.0698926833257-0.802035258743j)/(o+1.)+((0.499950864168-0.0994221645645j))+((0.334440148858-0.00777854264602j))*0.5**o
            arg[(1, 1, 0)]=(0.749345881544+0.414642999762j)*x[0]**o + ((-0.436202414692+0.218326096699j))*x[0] + ((0.783433178276+0.797005525617j))*x[1]**o + ((-0.990874461267-0.290292377653j))*x[1]
            ref[(1, 1, 0)]=(0.783433178276+0.797005525617j)/(o+1.)+((-0.713538437979-0.0359831404772j))+((0.749345881544+0.414642999762j))*0.5**o
            arg[(1, 1, 1)]=(0.391125939624-0.91143569348j)*x[0]**o + ((-0.463081328829+0.4171996976j))*x[0] + ((0.781854150973+0.68414054234j))*x[1]**o + ((0.133120017233+0.70542170643j))*x[1]
            ref[(1, 1, 1)]=(0.781854150973+0.68414054234j)/(o+1.)+((-0.164980655798+0.561310702015j))+((0.391125939624-0.91143569348j))*0.5**o
            arg[(1, 1, 2)]=(0.106991447018+0.72894664731j)*x[0]**o + ((0.767948616538+0.991241952475j))*x[0] + ((-0.114690295954-0.286640246986j))*x[1]**o + ((0.167735204343+0.664306766631j))*x[1]
            ref[(1, 1, 2)]=(-0.114690295954-0.286640246986j)/(o+1.)+((0.46784191044+0.827774359553j))+((0.106991447018+0.72894664731j))*0.5**o
            arg[(1, 1, 3)]=(-0.948513394524-0.736257144881j)*x[0]**o + ((-0.376390657155-0.80526071292j))*x[0] + ((-0.527789872946-0.255305664031j))*x[1]**o + ((-0.503301342255+0.438705706607j))*x[1]
            ref[(1, 1, 3)]=(-0.527789872946-0.255305664031j)/(o+1.)+((-0.439845999705-0.183277503157j))+((-0.948513394524-0.736257144881j))*0.5**o
            arg[(1, 2, 0)]=(-0.246024989353+0.297705497175j)*x[0]**o + ((0.889035148278-0.727993845556j))*x[0] + ((-0.634123430045+0.151179896624j))*x[1]**o + ((-0.489192592195+0.66611483479j))*x[1]
            ref[(1, 2, 0)]=(-0.634123430045+0.151179896624j)/(o+1.)+((0.199921278042-0.0309395053827j))+((-0.246024989353+0.297705497175j))*0.5**o
            arg[(1, 2, 1)]=(-0.198787849889-0.134601961835j)*x[0]**o + ((-0.723526438791-0.25103203885j))*x[0] + ((-0.00131787343425-0.854009090527j))*x[1]**o + ((-0.0649705858467-0.27821782325j))*x[1]
            ref[(1, 2, 1)]=(-0.00131787343425-0.854009090527j)/(o+1.)+((-0.394248512319-0.26462493105j))+((-0.198787849889-0.134601961835j))*0.5**o
            arg[(1, 2, 2)]=(0.924747059372+0.476686754832j)*x[0]**o + ((0.731602090847+0.562112428939j))*x[0] + ((-0.748750463722-0.688067604629j))*x[1]**o + ((-0.618652511772+0.475070638861j))*x[1]
            ref[(1, 2, 2)]=(-0.748750463722-0.688067604629j)/(o+1.)+((0.0564747895375+0.5185915339j))+((0.924747059372+0.476686754832j))*0.5**o
            arg[(1, 2, 3)]=(-0.0161025858955-0.210856028593j)*x[0]**o + ((-0.442813262554+0.696785954802j))*x[0] + ((-0.517561828656+0.28286987198j))*x[1]**o + ((0.294923454052-0.916811403233j))*x[1]
            ref[(1, 2, 3)]=(-0.517561828656+0.28286987198j)/(o+1.)+((-0.0739449042509-0.110012724216j))+((-0.0161025858955-0.210856028593j))*0.5**o
            arg[(1, 3, 0)]=(-0.516707663242-0.483888026823j)*x[0]**o + ((-0.134312939272-0.969134980567j))*x[0] + ((-0.0157317556406+0.338790555995j))*x[1]**o + ((0.575264409754-0.437384263149j))*x[1]
            ref[(1, 3, 0)]=(-0.0157317556406+0.338790555995j)/(o+1.)+((0.220475735241-0.703259621858j))+((-0.516707663242-0.483888026823j))*0.5**o
            arg[(1, 3, 1)]=(0.727535375976-0.82759200308j)*x[0]**o + ((0.958240570711+0.985342548624j))*x[0] + ((-0.125930870637-0.502377870234j))*x[1]**o + ((-0.368469490303+0.192392861847j))*x[1]
            ref[(1, 3, 1)]=(-0.125930870637-0.502377870234j)/(o+1.)+((0.294885540204+0.588867705235j))+((0.727535375976-0.82759200308j))*0.5**o
            arg[(1, 3, 2)]=(-0.729271942643+0.0934229599368j)*x[0]**o + ((0.384621821918-0.413105608093j))*x[0] + ((0.231949770212-0.490587472668j))*x[1]**o + ((-0.857264241894-0.383338039617j))*x[1]
            ref[(1, 3, 2)]=(0.231949770212-0.490587472668j)/(o+1.)+((-0.236321209988-0.398221823855j))+((-0.729271942643+0.0934229599368j))*0.5**o
            arg[(1, 3, 3)]=(-0.379636865179+0.886352000965j)*x[0]**o + ((-0.352959898928-0.0190380523016j))*x[0] + ((-0.0802693976171-0.457207296804j))*x[1]**o + ((0.757589795407-0.885066670451j))*x[1]
            ref[(1, 3, 3)]=(-0.0802693976171-0.457207296804j)/(o+1.)+((0.202314948239-0.452052361376j))+((-0.379636865179+0.886352000965j))*0.5**o
            arg[(2, 0, 0)]=(-0.926922611776-0.112082361196j)*x[0]**o + ((-0.149127207082+0.766009958651j))*x[0] + ((-0.504013973231+0.657981284719j))*x[1]**o + ((-0.112769936367+0.70348844819j))*x[1]
            ref[(2, 0, 0)]=(-0.504013973231+0.657981284719j)/(o+1.)+((-0.130948571725+0.734749203421j))+((-0.926922611776-0.112082361196j))*0.5**o
            arg[(2, 0, 1)]=(-0.376881983321-0.171641176117j)*x[0]**o + ((0.415685556835-0.750413025395j))*x[0] + ((0.527960741163-0.166790265554j))*x[1]**o + ((0.768107956536-0.592611124303j))*x[1]
            ref[(2, 0, 1)]=(0.527960741163-0.166790265554j)/(o+1.)+((0.591896756685-0.671512074849j))+((-0.376881983321-0.171641176117j))*0.5**o
            arg[(2, 0, 2)]=(0.515311279589+0.928906837722j)*x[0]**o + ((0.882017691887+0.901337544827j))*x[0] + ((-0.1676672357-0.95710237955j))*x[1]**o + ((0.458012751138-0.910693843364j))*x[1]
            ref[(2, 0, 2)]=(-0.1676672357-0.95710237955j)/(o+1.)+((0.670015221513-0.00467814926849j))+((0.515311279589+0.928906837722j))*0.5**o
            arg[(2, 0, 3)]=(-0.74749290834-0.503725197688j)*x[0]**o + ((0.440028603292-0.721106563663j))*x[0] + ((0.893194674755-0.203817691614j))*x[1]**o + ((-0.777246327732+0.229330215909j))*x[1]
            ref[(2, 0, 3)]=(0.893194674755-0.203817691614j)/(o+1.)+((-0.16860886222-0.245888173877j))+((-0.74749290834-0.503725197688j))*0.5**o
            arg[(2, 1, 0)]=(-0.394484087964+0.384103005621j)*x[0]**o + ((-0.756164032084+0.767382468068j))*x[0] + ((0.317064039763-0.188772993187j))*x[1]**o + ((-0.530964553237+0.0354379558947j))*x[1]
            ref[(2, 1, 0)]=(0.317064039763-0.188772993187j)/(o+1.)+((-0.64356429266+0.401410211981j))+((-0.394484087964+0.384103005621j))*0.5**o
            arg[(2, 1, 1)]=(-0.899286603204+0.989230438248j)*x[0]**o + ((0.472633613867+0.854386423595j))*x[0] + ((-0.0451543446899+0.223404767318j))*x[1]**o + ((0.433421359548-0.605082148771j))*x[1]
            ref[(2, 1, 1)]=(-0.0451543446899+0.223404767318j)/(o+1.)+((0.453027486707+0.124652137412j))+((-0.899286603204+0.989230438248j))*0.5**o
            arg[(2, 1, 2)]=(0.938604917179-0.767719299184j)*x[0]**o + ((-0.831130345445+0.777868989925j))*x[0] + ((0.802194945752-0.357523602742j))*x[1]**o + ((0.486717061024+0.227110627515j))*x[1]
            ref[(2, 1, 2)]=(0.802194945752-0.357523602742j)/(o+1.)+((-0.17220664221+0.50248980872j))+((0.938604917179-0.767719299184j))*0.5**o
            arg[(2, 1, 3)]=(0.701803297055-0.634785197489j)*x[0]**o + ((0.155218234164+0.483143287774j))*x[0] + ((0.0467233488376-0.866800625174j))*x[1]**o + ((0.256215448785+0.206229186495j))*x[1]
            ref[(2, 1, 3)]=(0.0467233488376-0.866800625174j)/(o+1.)+((0.205716841475+0.344686237135j))+((0.701803297055-0.634785197489j))*0.5**o
            arg[(2, 2, 0)]=(-0.965293505692-0.199793219491j)*x[0]**o + ((-0.514420596368+0.61362617022j))*x[0] + ((-0.177939823618-0.254162609087j))*x[1]**o + ((0.0671373484701+0.214090718915j))*x[1]
            ref[(2, 2, 0)]=(-0.177939823618-0.254162609087j)/(o+1.)+((-0.223641623949+0.413858444567j))+((-0.965293505692-0.199793219491j))*0.5**o
            arg[(2, 2, 1)]=(0.581024845652+0.522226688463j)*x[0]**o + ((-0.129770569695-0.0781050540916j))*x[0] + ((-0.455320058956-0.79376307764j))*x[1]**o + ((0.0478072498936+0.322561032886j))*x[1]
            ref[(2, 2, 1)]=(-0.455320058956-0.79376307764j)/(o+1.)+((-0.0409816599007+0.122227989397j))+((0.581024845652+0.522226688463j))*0.5**o
            arg[(2, 2, 2)]=(0.0682159824098+0.0275611453936j)*x[0]**o + ((-0.0861628418268+0.924469091049j))*x[0] + ((-0.771008870519+0.738435759837j))*x[1]**o + ((0.560392085215-0.525420093966j))*x[1]
            ref[(2, 2, 2)]=(-0.771008870519+0.738435759837j)/(o+1.)+((0.237114621694+0.199524498541j))+((0.0682159824098+0.0275611453936j))*0.5**o
            arg[(2, 2, 3)]=(-0.0906702850891+0.145977418779j)*x[0]**o + ((-0.341851313465+0.598969422593j))*x[0] + ((-0.342584815029+0.52346430476j))*x[1]**o + ((-0.194113952939-0.415461458268j))*x[1]
            ref[(2, 2, 3)]=(-0.342584815029+0.52346430476j)/(o+1.)+((-0.267982633202+0.0917539821625j))+((-0.0906702850891+0.145977418779j))*0.5**o
            arg[(2, 3, 0)]=(-0.945632268932-0.270028893377j)*x[0]**o + ((-0.575248037654-0.445499041829j))*x[0] + ((-0.959002002113-0.863141268286j))*x[1]**o + ((0.192822971949+0.562213226172j))*x[1]
            ref[(2, 3, 0)]=(-0.959002002113-0.863141268286j)/(o+1.)+((-0.191212532853+0.0583570921716j))+((-0.945632268932-0.270028893377j))*0.5**o
            arg[(2, 3, 1)]=(0.0389943001465+0.73107800222j)*x[0]**o + ((0.00137996210747+0.464874110324j))*x[0] + ((0.931562220501+0.866844449378j))*x[1]**o + ((0.291308650969+0.976754809063j))*x[1]
            ref[(2, 3, 1)]=(0.931562220501+0.866844449378j)/(o+1.)+((0.146344306538+0.720814459693j))+((0.0389943001465+0.73107800222j))*0.5**o
            arg[(2, 3, 2)]=(0.308533703255-0.631487566515j)*x[0]**o + ((-0.717825513739+0.501527568176j))*x[0] + ((0.691718864786-0.28686651725j))*x[1]**o + ((0.102861958228-0.00712971293464j))*x[1]
            ref[(2, 3, 2)]=(0.691718864786-0.28686651725j)/(o+1.)+((-0.307481777755+0.247198927621j))+((0.308533703255-0.631487566515j))*0.5**o
            arg[(2, 3, 3)]=(0.456770915658+0.0662516859814j)*x[0]**o + ((0.225590324263-0.920063281392j))*x[0] + ((-0.98583306826-0.273960699098j))*x[1]**o + ((0.0340460644452-0.911140158179j))*x[1]
            ref[(2, 3, 3)]=(-0.98583306826-0.273960699098j)/(o+1.)+((0.129818194354-0.915601719786j))+((0.456770915658+0.0662516859814j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.490724754483-0.341711093976j)*x[0]**o + ((0.182320112734-0.744665428401j))*x[0] + ((-0.744472514081+0.295513074309j))*x[1]**o + ((0.258146576236-0.997815481382j))*x[1] + ((-0.597349910994-0.231766330819j))*x[2]**o + ((0.1803449318-0.062334486087j))*x[2]
            ref[(0, 0, 0)]=(-1.34182242507+0.0637467434907j)/(o+1.)+((0.310405810386-0.902407697935j))+((-0.490724754483-0.341711093976j))*0.5**o
            arg[(0, 0, 1)]=(0.577402274241+0.95377855202j)*x[0]**o + ((-0.370013465987-0.766783118556j))*x[0] + ((0.196969683823-0.23523169507j))*x[1]**o + ((-0.396704475879-0.277289639647j))*x[1] + ((-0.279797121968-0.883116135834j))*x[2]**o + ((0.412562674278+0.408622285089j))*x[2]
            ref[(0, 0, 1)]=(-0.0828274381447-1.1183478309j)/(o+1.)+((-0.177077633793-0.317725236557j))+((0.577402274241+0.95377855202j))*0.5**o
            arg[(0, 0, 2)]=(0.515907379049-0.354111237951j)*x[0]**o + ((-0.13870852789-0.272910343769j))*x[0] + ((-0.723720462066+0.940790454072j))*x[1]**o + ((0.277841453177+0.10789391145j))*x[1] + ((-0.030010429955-0.428697394063j))*x[2]**o + ((-0.685672957435-0.275313315845j))*x[2]
            ref[(0, 0, 2)]=(-0.753730892021+0.512093060009j)/(o+1.)+((-0.273270016074-0.220164874082j))+((0.515907379049-0.354111237951j))*0.5**o
            arg[(0, 0, 3)]=(-0.495229634377+0.724971860902j)*x[0]**o + ((0.111918881248-0.855024690766j))*x[0] + ((0.619408213097-0.072442214818j))*x[1]**o + ((-0.454847695045+0.414348659987j))*x[1] + ((0.492509440785-0.4804699965j))*x[2]**o + ((0.941580730786-0.145751847886j))*x[2]
            ref[(0, 0, 3)]=(1.11191765388-0.552912211318j)/(o+1.)+((0.299325958495-0.293213939332j))+((-0.495229634377+0.724971860902j))*0.5**o
            arg[(0, 1, 0)]=(-0.619372138632+0.731001505028j)*x[0]**o + ((-0.460633134491-0.410482600251j))*x[0] + ((0.62904823288+0.997693191739j))*x[1]**o + ((0.420750312728-0.582729525834j))*x[1] + ((0.0912526196722-0.357281959185j))*x[2]**o + ((-0.110527927894-0.788223400042j))*x[2]
            ref[(0, 1, 0)]=(0.720300852552+0.640411232554j)/(o+1.)+((-0.0752053748288-0.890717763064j))+((-0.619372138632+0.731001505028j))*0.5**o
            arg[(0, 1, 1)]=(-0.532497880058+0.335633335234j)*x[0]**o + ((0.0170842894396-0.159588913023j))*x[0] + ((-0.557464754219+0.0404993589741j))*x[1]**o + ((-0.327817074596-0.254858541726j))*x[1] + ((-0.990177595345-0.520230935994j))*x[2]**o + ((-0.831197550075-0.872701304062j))*x[2]
            ref[(0, 1, 1)]=(-1.54764234956-0.47973157702j)/(o+1.)+((-0.570965167616-0.643574379406j))+((-0.532497880058+0.335633335234j))*0.5**o
            arg[(0, 1, 2)]=(-0.270397992587+0.0507302712414j)*x[0]**o + ((0.855218764706+0.680162373988j))*x[0] + ((0.225644729876-0.780557509529j))*x[1]**o + ((0.200284276232+0.13680335958j))*x[1] + ((-0.657408366905+0.0366145378389j))*x[2]**o + ((-0.157250261321+0.332136045121j))*x[2]
            ref[(0, 1, 2)]=(-0.431763637029-0.74394297169j)/(o+1.)+((0.449126389809+0.574550889345j))+((-0.270397992587+0.0507302712414j))*0.5**o
            arg[(0, 1, 3)]=(0.299444770411-0.454523825059j)*x[0]**o + ((-0.100687207392-0.189307265731j))*x[0] + ((-0.0647043146303-0.716927659165j))*x[1]**o + ((-0.29446314745+0.177733239548j))*x[1] + ((-0.784974657083-0.728007440613j))*x[2]**o + ((0.865433311617-0.0611268466611j))*x[2]
            ref[(0, 1, 3)]=(-0.849678971714-1.44493509978j)/(o+1.)+((0.235141478388-0.036350436422j))+((0.299444770411-0.454523825059j))*0.5**o
            arg[(0, 2, 0)]=(0.27988547624-0.452954113709j)*x[0]**o + ((0.258512794947-0.653869437778j))*x[0] + ((-0.229438154458-0.571709787506j))*x[1]**o + ((-0.296462285039-0.255061781105j))*x[1] + ((0.0133810947487-0.385092434178j))*x[2]**o + ((-0.323782933926-0.212712975991j))*x[2]
            ref[(0, 2, 0)]=(-0.21605705971-0.956802221684j)/(o+1.)+((-0.180866212009-0.560822097437j))+((0.27988547624-0.452954113709j))*0.5**o
            arg[(0, 2, 1)]=(-0.785330065663+0.50760868994j)*x[0]**o + ((-0.382615086265-0.338584917187j))*x[0] + ((0.817900315258-0.520701864956j))*x[1]**o + ((-0.696820356473-0.881085089156j))*x[1] + ((0.964647381716+0.552254235618j))*x[2]**o + ((0.489783920856-0.539335729969j))*x[2]
            ref[(0, 2, 1)]=(1.78254769697+0.031552370662j)/(o+1.)+((-0.294825760941-0.879502868156j))+((-0.785330065663+0.50760868994j))*0.5**o
            arg[(0, 2, 2)]=(-0.619501367758-0.914757308867j)*x[0]**o + ((0.228757371268-0.289091538623j))*x[0] + ((0.308345906021-0.111238690399j))*x[1]**o + ((-0.771851749133+0.145848374576j))*x[1] + ((0.706705603469+0.822131941714j))*x[2]**o + ((-0.394049849361+0.173222505713j))*x[2]
            ref[(0, 2, 2)]=(1.01505150949+0.710893251316j)/(o+1.)+((-0.468572113613+0.0149896708335j))+((-0.619501367758-0.914757308867j))*0.5**o
            arg[(0, 2, 3)]=(-0.0305730630114+0.646093353896j)*x[0]**o + ((-0.820055439313-0.913679276215j))*x[0] + ((0.522133674695-0.0520007104715j))*x[1]**o + ((0.132471585765+0.0537434645471j))*x[1] + ((0.762276417225-0.527550974412j))*x[2]**o + ((0.505873040141+0.637099124623j))*x[2]
            ref[(0, 2, 3)]=(1.28441009192-0.579551684883j)/(o+1.)+((-0.0908554067033-0.111418343522j))+((-0.0305730630114+0.646093353896j))*0.5**o
            arg[(0, 3, 0)]=(0.687739913141+0.490892548726j)*x[0]**o + ((-0.0544842476244-0.178635990171j))*x[0] + ((-0.844365382071-0.650434106594j))*x[1]**o + ((0.406991675669-0.430730315408j))*x[1] + ((-0.327278340273-0.398189944741j))*x[2]**o + ((0.86009945786-0.453409503427j))*x[2]
            ref[(0, 3, 0)]=(-1.17164372234-1.04862405134j)/(o+1.)+((0.606303442953-0.531387904503j))+((0.687739913141+0.490892548726j))*0.5**o
            arg[(0, 3, 1)]=(0.927608383675+0.260971888749j)*x[0]**o + ((-0.312396450466-0.522788611227j))*x[0] + ((-0.587258587421+0.0761210873369j))*x[1]**o + ((0.304684517615+0.0424736080674j))*x[1] + ((-0.180147438544+0.413272845978j))*x[2]**o + ((-0.845158348081-0.834114509906j))*x[2]
            ref[(0, 3, 1)]=(-0.767406025964+0.489393933315j)/(o+1.)+((-0.426435140466-0.657214756533j))+((0.927608383675+0.260971888749j))*0.5**o
            arg[(0, 3, 2)]=(0.662067626545-0.885831978824j)*x[0]**o + ((0.836095651615+0.655054827426j))*x[0] + ((0.0451683876323+0.854846250867j))*x[1]**o + ((-0.137939537525+0.602042165847j))*x[1] + ((-0.790876232754-0.925691621518j))*x[2]**o + ((-0.900591556062+0.641292291228j))*x[2]
            ref[(0, 3, 2)]=(-0.745707845122-0.0708453706505j)/(o+1.)+((-0.101217720986+0.94919464225j))+((0.662067626545-0.885831978824j))*0.5**o
            arg[(0, 3, 3)]=(0.754050302267+0.973660932708j)*x[0]**o + ((-0.659719652453-0.91860801318j))*x[0] + ((-0.121858841725-0.609440677362j))*x[1]**o + ((0.565154031178-0.618162528297j))*x[1] + ((0.060827203321+0.733635245212j))*x[2]**o + ((0.536869906834+0.490713970535j))*x[2]
            ref[(0, 3, 3)]=(-0.0610316384037+0.12419456785j)/(o+1.)+((0.221152142779-0.523028285471j))+((0.754050302267+0.973660932708j))*0.5**o
            arg[(1, 0, 0)]=(0.159468107932-0.184257693384j)*x[0]**o + ((0.664601558236+0.481239730134j))*x[0] + ((0.0193044663146+0.752309242597j))*x[1]**o + ((-0.526070060084+0.141452528973j))*x[1] + ((-0.0437232295178-0.172926945679j))*x[2]**o + ((0.393316172818-0.342847968742j))*x[2]
            ref[(1, 0, 0)]=(-0.0244187632032+0.579382296918j)/(o+1.)+((0.265923835485+0.139922145183j))+((0.159468107932-0.184257693384j))*0.5**o
            arg[(1, 0, 1)]=(-0.931980983011+0.989453439033j)*x[0]**o + ((0.4021810554-0.137847050711j))*x[0] + ((-0.127565862546-0.403789778731j))*x[1]**o + ((-0.88447916032-0.854680446968j))*x[1] + ((0.668392428936+0.115938210492j))*x[2]**o + ((0.0594186659317+0.552352422517j))*x[2]
            ref[(1, 0, 1)]=(0.54082656639-0.287851568239j)/(o+1.)+((-0.211439719494-0.220087537581j))+((-0.931980983011+0.989453439033j))*0.5**o
            arg[(1, 0, 2)]=(0.601976615883+0.104394003766j)*x[0]**o + ((-0.773106944304-0.708010147673j))*x[0] + ((-0.943271271853-0.0705400986177j))*x[1]**o + ((-0.69529895862+0.557569059177j))*x[1] + ((-0.622064730427+0.104849739049j))*x[2]**o + ((0.134589055724-0.108652921956j))*x[2]
            ref[(1, 0, 2)]=(-1.56533600228+0.0343096404316j)/(o+1.)+((-0.666908423601-0.129547005226j))+((0.601976615883+0.104394003766j))*0.5**o
            arg[(1, 0, 3)]=(0.347818083354-0.156396715695j)*x[0]**o + ((0.506763199197-0.341025078126j))*x[0] + ((0.904983755014-0.0798887388021j))*x[1]**o + ((0.864943476458-0.900641871799j))*x[1] + ((0.726129118156+0.240114603957j))*x[2]**o + ((-0.35805006679+0.733555042084j))*x[2]
            ref[(1, 0, 3)]=(1.63111287317+0.160225865155j)/(o+1.)+((0.506828304432-0.254055953921j))+((0.347818083354-0.156396715695j))*0.5**o
            arg[(1, 1, 0)]=(0.22870361653+0.0559526641595j)*x[0]**o + ((-0.335557870418+0.220762756101j))*x[0] + ((-0.47943013072+0.171353881895j))*x[1]**o + ((0.113906716767+0.947254495083j))*x[1] + ((0.482760480972-0.318581199321j))*x[2]**o + ((-0.941362986416+0.132475270659j))*x[2]
            ref[(1, 1, 0)]=(0.00333035025257-0.147227317427j)/(o+1.)+((-0.581507070033+0.650246260922j))+((0.22870361653+0.0559526641595j))*0.5**o
            arg[(1, 1, 1)]=(-0.126041934362-0.942973314333j)*x[0]**o + ((-0.841367229796-0.788553187667j))*x[0] + ((-0.626846189818-0.0711870789939j))*x[1]**o + ((0.765569084764+0.0485746949701j))*x[1] + ((0.421163960094+0.0910216030597j))*x[2]**o + ((0.31623225126+0.448585894646j))*x[2]
            ref[(1, 1, 1)]=(-0.205682229724+0.0198345240658j)/(o+1.)+((0.120217053114-0.145696299025j))+((-0.126041934362-0.942973314333j))*0.5**o
            arg[(1, 1, 2)]=(0.71324416739+0.211048371128j)*x[0]**o + ((0.626538861189+0.542632586827j))*x[0] + ((-0.133106776798-0.759641776819j))*x[1]**o + ((0.8041195874-0.271376656517j))*x[1] + ((-0.392554907436-0.474344307396j))*x[2]**o + ((0.117605917782+0.748980865971j))*x[2]
            ref[(1, 1, 2)]=(-0.525661684234-1.23398608421j)/(o+1.)+((0.774132183185+0.510118398141j))+((0.71324416739+0.211048371128j))*0.5**o
            arg[(1, 1, 3)]=(0.946120396786-0.822597774906j)*x[0]**o + ((0.920499575225+0.80847666j))*x[0] + ((0.840410979536+0.436075262057j))*x[1]**o + ((0.975272250023+0.418526521411j))*x[1] + ((0.891372794748+0.6205210956j))*x[2]**o + ((-0.570306034781-0.739183351067j))*x[2]
            ref[(1, 1, 3)]=(1.73178377428+1.05659635766j)/(o+1.)+((0.662732895234+0.243909915172j))+((0.946120396786-0.822597774906j))*0.5**o
            arg[(1, 2, 0)]=(0.156336586725+0.46511825395j)*x[0]**o + ((-0.555628183749+0.280808472198j))*x[0] + ((0.165262440844+0.852599442358j))*x[1]**o + ((0.893573307767+0.582873864567j))*x[1] + ((0.46455445215+0.529206446471j))*x[2]**o + ((0.839899426108+0.487575231748j))*x[2]
            ref[(1, 2, 0)]=(0.629816892994+1.38180588883j)/(o+1.)+((0.588922275063+0.675628784256j))+((0.156336586725+0.46511825395j))*0.5**o
            arg[(1, 2, 1)]=(0.403648787587+0.036677123011j)*x[0]**o + ((0.967117518201+0.612372293364j))*x[0] + ((-0.875373492585-0.238413795079j))*x[1]**o + ((0.248083887095-0.625458920617j))*x[1] + ((0.34245532101+0.511615528171j))*x[2]**o + ((0.15605672895+0.00461039285406j))*x[2]
            ref[(1, 2, 1)]=(-0.532918171575+0.273201733092j)/(o+1.)+((0.685629067123-0.00423811719957j))+((0.403648787587+0.036677123011j))*0.5**o
            arg[(1, 2, 2)]=(-0.155579904887-0.658126003718j)*x[0]**o + ((-0.115528298986+0.468894665793j))*x[0] + ((0.824894704593-0.146276001799j))*x[1]**o + ((0.0971284911327+0.515806429755j))*x[1] + ((-0.0881988905399-0.86762325519j))*x[2]**o + ((-0.317628210541+0.353259738679j))*x[2]
            ref[(1, 2, 2)]=(0.736695814054-1.01389925699j)/(o+1.)+((-0.168014009197+0.668980417114j))+((-0.155579904887-0.658126003718j))*0.5**o
            arg[(1, 2, 3)]=(-0.129990904-0.227810001014j)*x[0]**o + ((0.538686430306+0.418738056731j))*x[0] + ((0.65909982499+0.147289613473j))*x[1]**o + ((-0.198463051126+0.933356636963j))*x[1] + ((0.657693760451+0.116121908427j))*x[2]**o + ((0.879409296201+0.478902003587j))*x[2]
            ref[(1, 2, 3)]=(1.31679358544+0.2634115219j)/(o+1.)+((0.60981633769+0.915498348641j))+((-0.129990904-0.227810001014j))*0.5**o
            arg[(1, 3, 0)]=(-0.292423183679-0.64398333011j)*x[0]**o + ((0.833407121155-0.563778510965j))*x[0] + ((-0.263165716817-0.0371161901858j))*x[1]**o + ((0.988444083324-0.843198747772j))*x[1] + ((-0.274734045221-0.110080111932j))*x[2]**o + ((-0.131957910903-0.863736335696j))*x[2]
            ref[(1, 3, 0)]=(-0.537899762038-0.147196302118j)/(o+1.)+((0.844946646788-1.13535679722j))+((-0.292423183679-0.64398333011j))*0.5**o
            arg[(1, 3, 1)]=(0.155551487366-0.784503149799j)*x[0]**o + ((-0.498623927756-0.271927746893j))*x[0] + ((-0.782750111851-0.186353506133j))*x[1]**o + ((0.0913958090629-0.673499839865j))*x[1] + ((-0.519422936203+0.948107779781j))*x[2]**o + ((0.142662953289+0.998104583949j))*x[2]
            ref[(1, 3, 1)]=(-1.30217304805+0.761754273648j)/(o+1.)+((-0.132282582702+0.0263384985957j))+((0.155551487366-0.784503149799j))*0.5**o
            arg[(1, 3, 2)]=(0.356250313033-0.732666038752j)*x[0]**o + ((-0.931672682928+0.463107105964j))*x[0] + ((-0.300536857926-0.374618818535j))*x[1]**o + ((0.174255617976-0.95791664745j))*x[1] + ((0.393831644181+0.460542143488j))*x[2]**o + ((0.266821695705-0.766524169002j))*x[2]
            ref[(1, 3, 2)]=(0.0932947862551+0.0859233249523j)/(o+1.)+((-0.245297684624-0.630666855244j))+((0.356250313033-0.732666038752j))*0.5**o
            arg[(1, 3, 3)]=(-0.409334124229-0.293458024788j)*x[0]**o + ((0.370223909237-0.398513496186j))*x[0] + ((-0.833760600642-0.427720384516j))*x[1]**o + ((0.523918639943-0.67033642026j))*x[1] + ((0.578057817644+0.494576559476j))*x[2]**o + ((-0.312840915748-0.294041580231j))*x[2]
            ref[(1, 3, 3)]=(-0.255702782998+0.0668561749598j)/(o+1.)+((0.290650816716-0.681445748338j))+((-0.409334124229-0.293458024788j))*0.5**o
            arg[(2, 0, 0)]=(-0.916502976217+0.468448024532j)*x[0]**o + ((-0.632596408282-0.27114704583j))*x[0] + ((-0.102438205623+0.243208648339j))*x[1]**o + ((-0.166556469622+0.902091068124j))*x[1] + ((0.967889535985-0.118685297652j))*x[2]**o + ((-0.825604088463+0.0285510668898j))*x[2]
            ref[(2, 0, 0)]=(0.865451330363+0.124523350688j)/(o+1.)+((-0.812378483184+0.329747544592j))+((-0.916502976217+0.468448024532j))*0.5**o
            arg[(2, 0, 1)]=(0.535372207122+0.841162974617j)*x[0]**o + ((-0.757678557786-0.0905060800873j))*x[0] + ((-0.381076407072+0.744663342398j))*x[1]**o + ((-0.312102472451-0.349274659864j))*x[1] + ((0.749987000949-0.546258562643j))*x[2]**o + ((0.850614457329-0.279898241305j))*x[2]
            ref[(2, 0, 1)]=(0.368910593877+0.198404779756j)/(o+1.)+((-0.109583286454-0.359839490628j))+((0.535372207122+0.841162974617j))*0.5**o
            arg[(2, 0, 2)]=(0.401105194513+0.0713827091859j)*x[0]**o + ((-0.765892448823-0.096822672372j))*x[0] + ((-0.142397088638+0.865959081009j))*x[1]**o + ((0.766685078287-0.974335178591j))*x[1] + ((0.614366134743+0.781689856035j))*x[2]**o + ((0.488172478357+0.93134336835j))*x[2]
            ref[(2, 0, 2)]=(0.471969046105+1.64764893704j)/(o+1.)+((0.24448255391-0.0699072413064j))+((0.401105194513+0.0713827091859j))*0.5**o
            arg[(2, 0, 3)]=(0.580249366046+0.549771742108j)*x[0]**o + ((-0.682932480785+0.53472491469j))*x[0] + ((-0.717259732171+0.925660114443j))*x[1]**o + ((0.12647451841+0.598553603335j))*x[1] + ((0.04396669534+0.76569636071j))*x[2]**o + ((0.888756041047+0.922436243105j))*x[2]
            ref[(2, 0, 3)]=(-0.673293036831+1.69135647515j)/(o+1.)+((0.166149039336+1.02785738056j))+((0.580249366046+0.549771742108j))*0.5**o
            arg[(2, 1, 0)]=(0.284423149743+0.0982672284169j)*x[0]**o + ((0.493236578151-0.84644414673j))*x[0] + ((-0.894565007403-0.451218037605j))*x[1]**o + ((0.715247625361+0.437247011674j))*x[1] + ((0.526019950718+0.873789801839j))*x[2]**o + ((-0.76170045316-0.155760376092j))*x[2]
            ref[(2, 1, 0)]=(-0.368545056685+0.422571764234j)/(o+1.)+((0.223391875176-0.282478755574j))+((0.284423149743+0.0982672284169j))*0.5**o
            arg[(2, 1, 1)]=(-0.904410488295+0.980375734042j)*x[0]**o + ((-0.569385506089-0.00645039414003j))*x[0] + ((-0.653402323546+0.74511299476j))*x[1]**o + ((0.978787342069-0.671416942604j))*x[1] + ((0.152816472737+0.548264731861j))*x[2]**o + ((0.74568216257-0.291466726278j))*x[2]
            ref[(2, 1, 1)]=(-0.500585850809+1.29337772662j)/(o+1.)+((0.577541999275-0.484667031511j))+((-0.904410488295+0.980375734042j))*0.5**o
            arg[(2, 1, 2)]=(-0.771291866814+0.438939161872j)*x[0]**o + ((0.710189193522+0.93101307402j))*x[0] + ((-0.909892283477-0.500669062481j))*x[1]**o + ((-0.37182656301-0.628745255863j))*x[1] + ((-0.971311770333+0.0765894803778j))*x[2]**o + ((-0.780890592551-0.297920569882j))*x[2]
            ref[(2, 1, 2)]=(-1.88120405381-0.424079582103j)/(o+1.)+((-0.22126398102+0.00217362413699j))+((-0.771291866814+0.438939161872j))*0.5**o
            arg[(2, 1, 3)]=(-0.246107147035-0.111024779853j)*x[0]**o + ((0.655198472935-0.196130779532j))*x[0] + ((-0.783469041217+0.592812382854j))*x[1]**o + ((-0.903007972146+0.574007499383j))*x[1] + ((-0.745790759274+0.00621541285917j))*x[2]**o + ((-0.0535321839607+0.940716719027j))*x[2]
            ref[(2, 1, 3)]=(-1.52925980049+0.599027795713j)/(o+1.)+((-0.150670841586+0.659296719439j))+((-0.246107147035-0.111024779853j))*0.5**o
            arg[(2, 2, 0)]=(0.0420475093974-0.772984326794j)*x[0]**o + ((-0.888812541533-0.233798666494j))*x[0] + ((0.261199740397-0.00658281616119j))*x[1]**o + ((0.912966912301-0.472264873835j))*x[1] + ((0.446934314415-0.391702307326j))*x[2]**o + ((0.119906122033+0.206046126399j))*x[2]
            ref[(2, 2, 0)]=(0.708134054812-0.398285123487j)/(o+1.)+((0.0720302464002-0.250008706965j))+((0.0420475093974-0.772984326794j))*0.5**o
            arg[(2, 2, 1)]=(0.295704385715-0.0411942473866j)*x[0]**o + ((-0.238323417893-0.828638436053j))*x[0] + ((0.192991065373-0.670432222607j))*x[1]**o + ((0.14976597689-0.913177364411j))*x[1] + ((-0.717550727055+0.0362885769711j))*x[2]**o + ((-0.0189708326183+0.0197971104244j))*x[2]
            ref[(2, 2, 1)]=(-0.524559661681-0.634143645636j)/(o+1.)+((-0.0537641368102-0.86100934502j))+((0.295704385715-0.0411942473866j))*0.5**o
            arg[(2, 2, 2)]=(0.28456470621+0.533651158298j)*x[0]**o + ((0.103926680168+0.724372928357j))*x[0] + ((0.230411858253-0.158123173227j))*x[1]**o + ((0.618087995665-0.846685664049j))*x[1] + ((0.0205272672038+0.9149972158j))*x[2]**o + ((0.34003508551+0.183415817888j))*x[2]
            ref[(2, 2, 2)]=(0.250939125457+0.756874042573j)/(o+1.)+((0.531024880672+0.030551541098j))+((0.28456470621+0.533651158298j))*0.5**o
            arg[(2, 2, 3)]=(-0.23545153172+0.491091308364j)*x[0]**o + ((-0.706065024433-0.808237299117j))*x[0] + ((0.597443356414+0.0638029938036j))*x[1]**o + ((0.636381449083-0.0224171065169j))*x[1] + ((-0.527810217869+0.700371952335j))*x[2]**o + ((-0.52805160856-0.175017344263j))*x[2]
            ref[(2, 2, 3)]=(0.0696331385451+0.764174946139j)/(o+1.)+((-0.298867591955-0.502835874948j))+((-0.23545153172+0.491091308364j))*0.5**o
            arg[(2, 3, 0)]=(0.112793138825-0.269221534837j)*x[0]**o + ((0.491144747942+0.716011992326j))*x[0] + ((0.633027001645+0.814114332828j))*x[1]**o + ((0.963642014758+0.332873006299j))*x[1] + ((0.0826284800842-0.526677164844j))*x[2]**o + ((0.732136894509-0.95809432036j))*x[2]
            ref[(2, 3, 0)]=(0.715655481729+0.287437167984j)/(o+1.)+((1.0934618286+0.0453953391329j))+((0.112793138825-0.269221534837j))*0.5**o
            arg[(2, 3, 1)]=(0.389466273439-0.324201173876j)*x[0]**o + ((-0.642832292157-0.707302647686j))*x[0] + ((0.611754576624+0.665804726056j))*x[1]**o + ((0.752562974403-0.815057588098j))*x[1] + ((-0.153042282351+0.421231710877j))*x[2]**o + ((-0.565403843503-0.710524092776j))*x[2]
            ref[(2, 3, 1)]=(0.458712294273+1.08703643693j)/(o+1.)+((-0.227836580629-1.11644216428j))+((0.389466273439-0.324201173876j))*0.5**o
            arg[(2, 3, 2)]=(0.736045815136+0.2396133213j)*x[0]**o + ((-0.701828226789-0.523322384426j))*x[0] + ((-0.148010997249-0.873620648624j))*x[1]**o + ((-0.473846553273+0.984965213817j))*x[1] + ((-0.601823322581-0.31718300393j))*x[2]**o + ((0.924343739565+0.860507380495j))*x[2]
            ref[(2, 3, 2)]=(-0.74983431983-1.19080365255j)/(o+1.)+((-0.125665520249+0.661075104943j))+((0.736045815136+0.2396133213j))*0.5**o
            arg[(2, 3, 3)]=(-0.988903166474-0.530949463297j)*x[0]**o + ((-0.967925003635+0.922186259533j))*x[0] + ((-0.873813822692+0.941199774799j))*x[1]**o + ((0.135150767134+0.226127215689j))*x[1] + ((0.125395382873+0.716386890329j))*x[2]**o + ((-0.774829455068-0.847331105836j))*x[2]
            ref[(2, 3, 3)]=(-0.748418439818+1.65758666513j)/(o+1.)+((-0.803801845784+0.150491184694j))+((-0.988903166474-0.530949463297j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4, 4),w)
        ref=numpy.zeros((3, 3, 4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.826236969489-0.77672476508j)*x[0]**o + ((0.816366373226-0.044945977745j))*x[0] + ((0.378352173236+0.2105793523j))*x[1]**o + ((0.610676998515+0.596376703089j))*x[1]
            ref[(0, 0, 0, 0)]=(0.378352173236+0.2105793523j)/(o+1.)+((0.713521685871+0.275715362672j))+((-0.826236969489-0.77672476508j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.271473575503+0.176385629023j)*x[0]**o + ((0.602998936908+0.821769778819j))*x[0] + ((-0.998624028988+0.913698604714j))*x[1]**o + ((0.154563714862-0.495775430768j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.998624028988+0.913698604714j)/(o+1.)+((0.378781325885+0.162997174025j))+((-0.271473575503+0.176385629023j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.501159335416-0.171088885001j)*x[0]**o + ((0.963318053802-0.396771951629j))*x[0] + ((0.856640640774-0.172497024733j))*x[1]**o + ((-0.769090001955-0.0735367457094j))*x[1]
            ref[(0, 0, 0, 2)]=(0.856640640774-0.172497024733j)/(o+1.)+((0.0971140259238-0.235154348669j))+((0.501159335416-0.171088885001j))*0.5**o
            arg[(0, 0, 0, 3)]=(-0.487218503295-0.702176845476j)*x[0]**o + ((-0.871536906158-0.849825693207j))*x[0] + ((0.607363685369-0.797002169683j))*x[1]**o + ((0.894742092296-0.655569398399j))*x[1]
            ref[(0, 0, 0, 3)]=(0.607363685369-0.797002169683j)/(o+1.)+((0.0116025930691-0.752697545803j))+((-0.487218503295-0.702176845476j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.852453024123+0.787607589325j)*x[0]**o + ((-0.513678325333+0.995373135014j))*x[0] + ((-0.815638722573-0.813649519596j))*x[1]**o + ((0.55225001026+0.897059428662j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.815638722573-0.813649519596j)/(o+1.)+((0.0192858424637+0.946216281838j))+((0.852453024123+0.787607589325j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.36100533495+0.56254114651j)*x[0]**o + ((-0.646946712867+0.207739619188j))*x[0] + ((-0.841201840867-0.131525906362j))*x[1]**o + ((0.965944055517-0.937074014781j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.841201840867-0.131525906362j)/(o+1.)+((0.159498671325-0.364667197797j))+((0.36100533495+0.56254114651j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.827526637351+0.259051032842j)*x[0]**o + ((-0.998854411495-0.564730560513j))*x[0] + ((-0.421786943262+0.842265822143j))*x[1]**o + ((0.691382797993+0.0723872519825j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.421786943262+0.842265822143j)/(o+1.)+((-0.153735806751-0.246171654265j))+((-0.827526637351+0.259051032842j))*0.5**o
            arg[(0, 0, 1, 3)]=(-0.221650635245+0.471559792985j)*x[0]**o + ((0.562848325453-0.938914864453j))*x[0] + ((-0.551555572718-0.164095509174j))*x[1]**o + ((0.732220391506-0.752469264624j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.551555572718-0.164095509174j)/(o+1.)+((0.647534358479-0.845692064538j))+((-0.221650635245+0.471559792985j))*0.5**o
            arg[(0, 0, 2, 0)]=(-0.678730933596-0.281153983946j)*x[0]**o + ((0.320255835666+0.715312934927j))*x[0] + ((0.653151415708+0.129758143324j))*x[1]**o + ((-0.79068174101+0.519665593843j))*x[1]
            ref[(0, 0, 2, 0)]=(0.653151415708+0.129758143324j)/(o+1.)+((-0.235212952672+0.617489264385j))+((-0.678730933596-0.281153983946j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.920910714799+0.892922477786j)*x[0]**o + ((-0.746649857942-0.216883671046j))*x[0] + ((0.07385523214+0.598761839798j))*x[1]**o + ((0.161987506587-0.875256253028j))*x[1]
            ref[(0, 0, 2, 1)]=(0.07385523214+0.598761839798j)/(o+1.)+((-0.292331175678-0.546069962037j))+((0.920910714799+0.892922477786j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.0913831450452+0.897023813928j)*x[0]**o + ((0.612949464375+0.18186910659j))*x[0] + ((0.0156490390303-0.00385494289901j))*x[1]**o + ((0.37088435912+0.422093168159j))*x[1]
            ref[(0, 0, 2, 2)]=(0.0156490390303-0.00385494289901j)/(o+1.)+((0.491916911747+0.301981137375j))+((0.0913831450452+0.897023813928j))*0.5**o
            arg[(0, 0, 2, 3)]=(-0.4152031649+0.982261870728j)*x[0]**o + ((0.537604978777-0.384526275739j))*x[0] + ((0.774603234908+0.562665027177j))*x[1]**o + ((-0.374331272396-0.105248662202j))*x[1]
            ref[(0, 0, 2, 3)]=(0.774603234908+0.562665027177j)/(o+1.)+((0.0816368531906-0.244887468971j))+((-0.4152031649+0.982261870728j))*0.5**o
            arg[(0, 0, 3, 0)]=(-0.24923204763+0.908506782505j)*x[0]**o + ((0.45894532934-0.923332084245j))*x[0] + ((0.0147390244176+0.369407914983j))*x[1]**o + ((0.510218790568+0.756887316478j))*x[1]
            ref[(0, 0, 3, 0)]=(0.0147390244176+0.369407914983j)/(o+1.)+((0.484582059954-0.0832223838835j))+((-0.24923204763+0.908506782505j))*0.5**o
            arg[(0, 0, 3, 1)]=(0.214459227364+0.67566748923j)*x[0]**o + ((0.599687296504+0.149792810651j))*x[0] + ((-0.741308385672+0.180995074743j))*x[1]**o + ((-0.00454972216763+0.79533631592j))*x[1]
            ref[(0, 0, 3, 1)]=(-0.741308385672+0.180995074743j)/(o+1.)+((0.297568787168+0.472564563285j))+((0.214459227364+0.67566748923j))*0.5**o
            arg[(0, 0, 3, 2)]=(0.640930120475+0.223899516744j)*x[0]**o + ((-0.805054320523-0.372407160281j))*x[0] + ((-0.442180350257-0.867025167509j))*x[1]**o + ((-0.561843805309-0.366167726141j))*x[1]
            ref[(0, 0, 3, 2)]=(-0.442180350257-0.867025167509j)/(o+1.)+((-0.683449062916-0.369287443211j))+((0.640930120475+0.223899516744j))*0.5**o
            arg[(0, 0, 3, 3)]=(-0.2908298126+0.907958588706j)*x[0]**o + ((-0.130094559284+0.578181593079j))*x[0] + ((0.215378051044+0.712462372475j))*x[1]**o + ((-0.282429168533-0.562816602459j))*x[1]
            ref[(0, 0, 3, 3)]=(0.215378051044+0.712462372475j)/(o+1.)+((-0.206261863909+0.00768249530978j))+((-0.2908298126+0.907958588706j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.462156588156+0.320548476299j)*x[0]**o + ((-0.890980408279+0.841201925156j))*x[0] + ((-0.278329176011-0.527993145121j))*x[1]**o + ((0.0617830281929-0.97831851561j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.278329176011-0.527993145121j)/(o+1.)+((-0.414598690043-0.0685582952268j))+((-0.462156588156+0.320548476299j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.637580449481+0.106556150349j)*x[0]**o + ((-0.805603941114+0.310612202649j))*x[0] + ((-0.314405684882+0.500184919671j))*x[1]**o + ((-0.754571937143+0.0496991840581j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.314405684882+0.500184919671j)/(o+1.)+((-0.780087939129+0.180155693354j))+((-0.637580449481+0.106556150349j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.15179415551+0.305829713j)*x[0]**o + ((0.197842410965-0.213858760246j))*x[0] + ((-0.36217865343-0.277480843833j))*x[1]**o + ((-0.811478965018-0.726181791638j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.36217865343-0.277480843833j)/(o+1.)+((-0.306818277026-0.470020275942j))+((-0.15179415551+0.305829713j))*0.5**o
            arg[(0, 1, 0, 3)]=(0.656391921308-0.975765759921j)*x[0]**o + ((-0.407619192621+0.868449447692j))*x[0] + ((0.131275045913-0.949452733309j))*x[1]**o + ((0.173768374479-0.727763932149j))*x[1]
            ref[(0, 1, 0, 3)]=(0.131275045913-0.949452733309j)/(o+1.)+((-0.116925409071+0.0703427577712j))+((0.656391921308-0.975765759921j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.578237948823+0.991076207561j)*x[0]**o + ((-0.0639931893499+0.727189465948j))*x[0] + ((0.913521972441-0.187293331315j))*x[1]**o + ((-0.196384134994-0.659810485507j))*x[1]
            ref[(0, 1, 1, 0)]=(0.913521972441-0.187293331315j)/(o+1.)+((-0.130188662172+0.0336894902204j))+((0.578237948823+0.991076207561j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.193103382737-0.639216742364j)*x[0]**o + ((-0.400299645448+0.64682790581j))*x[0] + ((-0.80609672529-0.532031725061j))*x[1]**o + ((-0.90268609919+0.890163227195j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.80609672529-0.532031725061j)/(o+1.)+((-0.651492872319+0.768495566503j))+((-0.193103382737-0.639216742364j))*0.5**o
            arg[(0, 1, 1, 2)]=(-0.618401859173-0.0209136220805j)*x[0]**o + ((0.577373663721+0.756968622724j))*x[0] + ((0.733579309533+0.617733446041j))*x[1]**o + ((-0.303186183685-0.546693935459j))*x[1]
            ref[(0, 1, 1, 2)]=(0.733579309533+0.617733446041j)/(o+1.)+((0.137093740018+0.105137343633j))+((-0.618401859173-0.0209136220805j))*0.5**o
            arg[(0, 1, 1, 3)]=(-0.328185620126+0.45113290234j)*x[0]**o + ((-0.43030801754+0.962392682544j))*x[0] + ((0.992266484537-0.181632849034j))*x[1]**o + ((0.42501523853-0.57226716775j))*x[1]
            ref[(0, 1, 1, 3)]=(0.992266484537-0.181632849034j)/(o+1.)+((-0.00264638950513+0.195062757397j))+((-0.328185620126+0.45113290234j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.189246474499+0.945142201867j)*x[0]**o + ((0.586500076787+0.891290178383j))*x[0] + ((0.508251448354-0.564914280718j))*x[1]**o + ((0.0312959122566+0.4255306796j))*x[1]
            ref[(0, 1, 2, 0)]=(0.508251448354-0.564914280718j)/(o+1.)+((0.308897994522+0.658410428992j))+((0.189246474499+0.945142201867j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.805870952393+0.474589943827j)*x[0]**o + ((-0.13716625973+0.948234242513j))*x[0] + ((-0.807809123174-0.637168554715j))*x[1]**o + ((0.346646808425+0.992939027625j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.807809123174-0.637168554715j)/(o+1.)+((0.104740274347+0.970586635069j))+((-0.805870952393+0.474589943827j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.58041876504+0.812585503864j)*x[0]**o + ((-0.349790752501+0.714678613246j))*x[0] + ((-0.719854350161+0.51412814361j))*x[1]**o + ((-0.985154584377-0.463833189099j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.719854350161+0.51412814361j)/(o+1.)+((-0.667472668439+0.125422712073j))+((-0.58041876504+0.812585503864j))*0.5**o
            arg[(0, 1, 2, 3)]=(0.878510458121-0.974835844046j)*x[0]**o + ((-0.152406791521+0.938426740463j))*x[0] + ((-0.753064253887+0.729981475921j))*x[1]**o + ((-0.787526810628+0.479879052838j))*x[1]
            ref[(0, 1, 2, 3)]=(-0.753064253887+0.729981475921j)/(o+1.)+((-0.469966801075+0.709152896651j))+((0.878510458121-0.974835844046j))*0.5**o
            arg[(0, 1, 3, 0)]=(-0.0758282659636-0.398766235097j)*x[0]**o + ((-0.585139878343+0.61279467204j))*x[0] + ((-0.119470319026+0.978252241485j))*x[1]**o + ((0.727953395628+0.149628410236j))*x[1]
            ref[(0, 1, 3, 0)]=(-0.119470319026+0.978252241485j)/(o+1.)+((0.0714067586423+0.381211541138j))+((-0.0758282659636-0.398766235097j))*0.5**o
            arg[(0, 1, 3, 1)]=(-0.612935533221+0.65581221463j)*x[0]**o + ((-0.803304949893-0.841246992801j))*x[0] + ((0.458526884585+0.772323190432j))*x[1]**o + ((0.337543184394+0.0896761500257j))*x[1]
            ref[(0, 1, 3, 1)]=(0.458526884585+0.772323190432j)/(o+1.)+((-0.23288088275-0.375785421388j))+((-0.612935533221+0.65581221463j))*0.5**o
            arg[(0, 1, 3, 2)]=(0.0361532587656+0.900195819715j)*x[0]**o + ((-0.646485709895+0.672758069248j))*x[0] + ((-0.525078291338-0.207659722469j))*x[1]**o + ((0.328112981425+0.21220410663j))*x[1]
            ref[(0, 1, 3, 2)]=(-0.525078291338-0.207659722469j)/(o+1.)+((-0.159186364235+0.442481087939j))+((0.0361532587656+0.900195819715j))*0.5**o
            arg[(0, 1, 3, 3)]=(-0.388107002098-0.849546554816j)*x[0]**o + ((0.130025965005+0.737755905782j))*x[0] + ((-0.948319302336-0.699518652547j))*x[1]**o + ((-0.16267893426-0.846638435639j))*x[1]
            ref[(0, 1, 3, 3)]=(-0.948319302336-0.699518652547j)/(o+1.)+((-0.0163264846272-0.0544412649285j))+((-0.388107002098-0.849546554816j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.689961631186-0.53164292745j)*x[0]**o + ((-0.638907714186+0.0616797711189j))*x[0] + ((0.825322492844+0.131312073511j))*x[1]**o + ((-0.048874755332-0.71990766528j))*x[1]
            ref[(0, 2, 0, 0)]=(0.825322492844+0.131312073511j)/(o+1.)+((-0.343891234759-0.329113947081j))+((0.689961631186-0.53164292745j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.0848315729381-0.829074920082j)*x[0]**o + ((0.367190643144-0.30039693299j))*x[0] + ((-0.896003630805+0.699941232562j))*x[1]**o + ((0.57731884308-0.480234062491j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.896003630805+0.699941232562j)/(o+1.)+((0.472254743112-0.390315497741j))+((0.0848315729381-0.829074920082j))*0.5**o
            arg[(0, 2, 0, 2)]=(-0.813136388599-0.775310683858j)*x[0]**o + ((-0.0503182971906+0.113231498078j))*x[0] + ((0.0268555925953+0.597836960064j))*x[1]**o + ((0.946720637394+0.910153115807j))*x[1]
            ref[(0, 2, 0, 2)]=(0.0268555925953+0.597836960064j)/(o+1.)+((0.448201170101+0.511692306942j))+((-0.813136388599-0.775310683858j))*0.5**o
            arg[(0, 2, 0, 3)]=(-0.816576244995+0.208869195609j)*x[0]**o + ((0.921559377278-0.386796043478j))*x[0] + ((0.176227078881-0.740339877319j))*x[1]**o + ((-0.847897039107-0.689524109934j))*x[1]
            ref[(0, 2, 0, 3)]=(0.176227078881-0.740339877319j)/(o+1.)+((0.0368311690858-0.538160076706j))+((-0.816576244995+0.208869195609j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.995045947433+0.526775756437j)*x[0]**o + ((-0.790429814778-0.13360532451j))*x[0] + ((0.929573020409+0.176841661137j))*x[1]**o + ((0.790755906776+0.196014875825j))*x[1]
            ref[(0, 2, 1, 0)]=(0.929573020409+0.176841661137j)/(o+1.)+((0.000163045998966+0.0312047756572j))+((-0.995045947433+0.526775756437j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.983614802975+0.694620428682j)*x[0]**o + ((0.713563806366-0.541558427569j))*x[0] + ((0.485521788501-0.408108431864j))*x[1]**o + ((0.613409313851-0.673687681107j))*x[1]
            ref[(0, 2, 1, 1)]=(0.485521788501-0.408108431864j)/(o+1.)+((0.663486560109-0.607623054338j))+((-0.983614802975+0.694620428682j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.390595882096-0.161211802341j)*x[0]**o + ((0.978977831844+0.829897840448j))*x[0] + ((0.573585607413+0.610297613751j))*x[1]**o + ((-0.390846931184+0.413020568841j))*x[1]
            ref[(0, 2, 1, 2)]=(0.573585607413+0.610297613751j)/(o+1.)+((0.29406545033+0.621459204644j))+((-0.390595882096-0.161211802341j))*0.5**o
            arg[(0, 2, 1, 3)]=(0.841065373531+0.433110246948j)*x[0]**o + ((-0.886218702495-0.675806619392j))*x[0] + ((0.0013783858092+0.0675922303747j))*x[1]**o + ((0.438630897119-0.886540018398j))*x[1]
            ref[(0, 2, 1, 3)]=(0.0013783858092+0.0675922303747j)/(o+1.)+((-0.223793902688-0.781173318895j))+((0.841065373531+0.433110246948j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.282117443539-0.681027870799j)*x[0]**o + ((-0.991243494961+0.663526063999j))*x[0] + ((-0.537975459738+0.892175840824j))*x[1]**o + ((-0.865331248016+0.615556939101j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.537975459738+0.892175840824j)/(o+1.)+((-0.928287371489+0.63954150155j))+((-0.282117443539-0.681027870799j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.93642443437-0.627457328105j)*x[0]**o + ((-0.405837643852+0.289101063582j))*x[0] + ((-0.450706371481+0.600229426637j))*x[1]**o + ((0.474680094153-0.81485635425j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.450706371481+0.600229426637j)/(o+1.)+((0.0344212251502-0.262877645334j))+((0.93642443437-0.627457328105j))*0.5**o
            arg[(0, 2, 2, 2)]=(-0.497229943897+0.184577008392j)*x[0]**o + ((0.525577877804+0.214885353556j))*x[0] + ((0.194686730619+0.791890347408j))*x[1]**o + ((-0.128226637-0.355762507074j))*x[1]
            ref[(0, 2, 2, 2)]=(0.194686730619+0.791890347408j)/(o+1.)+((0.198675620402-0.0704385767592j))+((-0.497229943897+0.184577008392j))*0.5**o
            arg[(0, 2, 2, 3)]=(0.979037402335+0.294518436327j)*x[0]**o + ((-0.44229342112+0.550316330992j))*x[0] + ((0.569032058549+0.181110686894j))*x[1]**o + ((0.847332354346-0.516233379481j))*x[1]
            ref[(0, 2, 2, 3)]=(0.569032058549+0.181110686894j)/(o+1.)+((0.202519466613+0.0170414757557j))+((0.979037402335+0.294518436327j))*0.5**o
            arg[(0, 2, 3, 0)]=(-0.838610055435-0.876052888495j)*x[0]**o + ((-0.598773823305+0.394600420892j))*x[0] + ((-0.918397508327+0.0627105226738j))*x[1]**o + ((-0.478103348311+0.65709034698j))*x[1]
            ref[(0, 2, 3, 0)]=(-0.918397508327+0.0627105226738j)/(o+1.)+((-0.538438585808+0.525845383936j))+((-0.838610055435-0.876052888495j))*0.5**o
            arg[(0, 2, 3, 1)]=(-0.852447167409-0.755116805951j)*x[0]**o + ((0.319182749379-0.740984989993j))*x[0] + ((0.91267765344+0.0348711935599j))*x[1]**o + ((0.0124453919068+0.66674430202j))*x[1]
            ref[(0, 2, 3, 1)]=(0.91267765344+0.0348711935599j)/(o+1.)+((0.165814070643-0.0371203439866j))+((-0.852447167409-0.755116805951j))*0.5**o
            arg[(0, 2, 3, 2)]=(-0.258311092941+0.00182904039468j)*x[0]**o + ((-0.0295513229348-0.273702121484j))*x[0] + ((0.809810829296-0.171746629857j))*x[1]**o + ((0.0252885100754+0.468324061419j))*x[1]
            ref[(0, 2, 3, 2)]=(0.809810829296-0.171746629857j)/(o+1.)+((-0.00213140642969+0.0973109699677j))+((-0.258311092941+0.00182904039468j))*0.5**o
            arg[(0, 2, 3, 3)]=(0.681083186623+0.331902546635j)*x[0]**o + ((-0.371418330781+0.0380886729535j))*x[0] + ((-0.205866500858-0.621362034025j))*x[1]**o + ((0.130275065343+0.554870601678j))*x[1]
            ref[(0, 2, 3, 3)]=(-0.205866500858-0.621362034025j)/(o+1.)+((-0.120571632719+0.296479637316j))+((0.681083186623+0.331902546635j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.616890718046-0.52162984589j)*x[0]**o + ((0.661929536737+0.964302520734j))*x[0] + ((-0.759755656547-0.0446836488376j))*x[1]**o + ((-0.344431242778+0.540192822259j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.759755656547-0.0446836488376j)/(o+1.)+((0.15874914698+0.752247671496j))+((-0.616890718046-0.52162984589j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.277059486613+0.0474274860222j)*x[0]**o + ((-0.970023200044-0.709922146672j))*x[0] + ((0.833614797155+0.230489970778j))*x[1]**o + ((-0.316433366911+0.408029338103j))*x[1]
            ref[(1, 0, 0, 1)]=(0.833614797155+0.230489970778j)/(o+1.)+((-0.643228283477-0.150946404284j))+((-0.277059486613+0.0474274860222j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.0995529902627-0.253144923188j)*x[0]**o + ((0.249585373832-0.144720251419j))*x[0] + ((0.071372927439-0.943626890978j))*x[1]**o + ((0.902924693618-0.462162940284j))*x[1]
            ref[(1, 0, 0, 2)]=(0.071372927439-0.943626890978j)/(o+1.)+((0.576255033725-0.303441595851j))+((-0.0995529902627-0.253144923188j))*0.5**o
            arg[(1, 0, 0, 3)]=(-0.688415170981-0.108101088233j)*x[0]**o + ((0.705168056418-0.108304611368j))*x[0] + ((0.226047982946+0.78552329987j))*x[1]**o + ((0.0918967732659+0.719900315153j))*x[1]
            ref[(1, 0, 0, 3)]=(0.226047982946+0.78552329987j)/(o+1.)+((0.398532414842+0.305797851893j))+((-0.688415170981-0.108101088233j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.344895773189-0.776107495978j)*x[0]**o + ((0.542904744925-0.157355314466j))*x[0] + ((-0.176910193127-0.517654925272j))*x[1]**o + ((-0.0434521157441-0.483209265986j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.176910193127-0.517654925272j)/(o+1.)+((0.24972631459-0.320282290226j))+((-0.344895773189-0.776107495978j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.458697040244-0.22518727093j)*x[0]**o + ((-0.673368228384-0.447235598814j))*x[0] + ((0.819804682458-0.331504005271j))*x[1]**o + ((-0.633024305194+0.92157755068j))*x[1]
            ref[(1, 0, 1, 1)]=(0.819804682458-0.331504005271j)/(o+1.)+((-0.653196266789+0.237170975933j))+((0.458697040244-0.22518727093j))*0.5**o
            arg[(1, 0, 1, 2)]=(-0.406582398906-0.293644177867j)*x[0]**o + ((-0.883623684293-0.150636354588j))*x[0] + ((-0.713482454853+0.559321742126j))*x[1]**o + ((-0.369055513815-0.921712409009j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.713482454853+0.559321742126j)/(o+1.)+((-0.626339599054-0.536174381799j))+((-0.406582398906-0.293644177867j))*0.5**o
            arg[(1, 0, 1, 3)]=(-0.0291506925393-0.0509217823643j)*x[0]**o + ((0.218761978198+0.531223709285j))*x[0] + ((-0.579526425047+0.576883921882j))*x[1]**o + ((-0.290320903028-0.931894442907j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.579526425047+0.576883921882j)/(o+1.)+((-0.0357794624147-0.200335366811j))+((-0.0291506925393-0.0509217823643j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.0686054785696+0.436320674437j)*x[0]**o + ((0.86172383917+0.0564566662965j))*x[0] + ((0.405564709252-0.219186927203j))*x[1]**o + ((-0.0454438711826-0.717313223167j))*x[1]
            ref[(1, 0, 2, 0)]=(0.405564709252-0.219186927203j)/(o+1.)+((0.408139983994-0.330428278435j))+((0.0686054785696+0.436320674437j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.705176698131+0.872899335394j)*x[0]**o + ((0.80584396137+0.31907096118j))*x[0] + ((-0.279670094906-0.475353676399j))*x[1]**o + ((-0.105336040958+0.696081545769j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.279670094906-0.475353676399j)/(o+1.)+((0.350253960206+0.507576253475j))+((0.705176698131+0.872899335394j))*0.5**o
            arg[(1, 0, 2, 2)]=(0.569766363664+0.936161406423j)*x[0]**o + ((0.175154180823+0.965927534037j))*x[0] + ((0.512813323707-0.960656182742j))*x[1]**o + ((-0.762418335009+0.45162582562j))*x[1]
            ref[(1, 0, 2, 2)]=(0.512813323707-0.960656182742j)/(o+1.)+((-0.293632077093+0.708776679829j))+((0.569766363664+0.936161406423j))*0.5**o
            arg[(1, 0, 2, 3)]=(-0.979914411607-0.481703628136j)*x[0]**o + ((0.984141002987+0.414790637312j))*x[0] + ((0.0488657810712-0.0512975747041j))*x[1]**o + ((-0.368482323939+0.309415989935j))*x[1]
            ref[(1, 0, 2, 3)]=(0.0488657810712-0.0512975747041j)/(o+1.)+((0.307829339524+0.362103313624j))+((-0.979914411607-0.481703628136j))*0.5**o
            arg[(1, 0, 3, 0)]=(-0.491281564247+0.0561641202483j)*x[0]**o + ((0.340091299373+0.332840813068j))*x[0] + ((-0.0250212825209-0.783519398032j))*x[1]**o + ((-0.285883037442-0.872290981681j))*x[1]
            ref[(1, 0, 3, 0)]=(-0.0250212825209-0.783519398032j)/(o+1.)+((0.0271041309652-0.269725084306j))+((-0.491281564247+0.0561641202483j))*0.5**o
            arg[(1, 0, 3, 1)]=(-0.773200401043+0.668918595726j)*x[0]**o + ((-0.118966615828+0.496188327317j))*x[0] + ((-0.174019616193-0.684041460024j))*x[1]**o + ((0.259854134392-0.966299274017j))*x[1]
            ref[(1, 0, 3, 1)]=(-0.174019616193-0.684041460024j)/(o+1.)+((0.070443759282-0.23505547335j))+((-0.773200401043+0.668918595726j))*0.5**o
            arg[(1, 0, 3, 2)]=(0.0528137639319-0.564512180226j)*x[0]**o + ((0.404552269962+0.507258865054j))*x[0] + ((0.541272153313-0.928477138796j))*x[1]**o + ((0.10071623419-0.934095381371j))*x[1]
            ref[(1, 0, 3, 2)]=(0.541272153313-0.928477138796j)/(o+1.)+((0.252634252076-0.213418258158j))+((0.0528137639319-0.564512180226j))*0.5**o
            arg[(1, 0, 3, 3)]=(0.394871919189-0.267152020102j)*x[0]**o + ((0.994046778196+0.615260380992j))*x[0] + ((-0.207969703719+0.781946295544j))*x[1]**o + ((-0.0257914738924+0.683551900735j))*x[1]
            ref[(1, 0, 3, 3)]=(-0.207969703719+0.781946295544j)/(o+1.)+((0.484127652152+0.649406140864j))+((0.394871919189-0.267152020102j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.0567583372832-0.629411660816j)*x[0]**o + ((0.0608849497965-0.43407278281j))*x[0] + ((0.0642146738444+0.249535672447j))*x[1]**o + ((-0.58811760236-0.730142128025j))*x[1]
            ref[(1, 1, 0, 0)]=(0.0642146738444+0.249535672447j)/(o+1.)+((-0.263616326282-0.582107455417j))+((-0.0567583372832-0.629411660816j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.563057773232+0.531503183957j)*x[0]**o + ((-0.354937997258-0.169660972928j))*x[0] + ((-0.109577673668-0.974505918575j))*x[1]**o + ((0.615737147238-0.861950526927j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.109577673668-0.974505918575j)/(o+1.)+((0.13039957499-0.515805749927j))+((0.563057773232+0.531503183957j))*0.5**o
            arg[(1, 1, 0, 2)]=(-0.199193790893+0.491979734452j)*x[0]**o + ((0.539850443832-0.081734822323j))*x[0] + ((0.363125991231-0.442496186094j))*x[1]**o + ((0.967367931572+0.252019587708j))*x[1]
            ref[(1, 1, 0, 2)]=(0.363125991231-0.442496186094j)/(o+1.)+((0.753609187702+0.0851423826927j))+((-0.199193790893+0.491979734452j))*0.5**o
            arg[(1, 1, 0, 3)]=(-0.40186293293+0.831312307786j)*x[0]**o + ((-0.133424611458-0.670470367098j))*x[0] + ((0.265904562557-0.073766784219j))*x[1]**o + ((0.628290969377+0.551502800197j))*x[1]
            ref[(1, 1, 0, 3)]=(0.265904562557-0.073766784219j)/(o+1.)+((0.24743317896-0.0594837834503j))+((-0.40186293293+0.831312307786j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.204340813653+0.906427280267j)*x[0]**o + ((-0.0288105052931-0.977457981671j))*x[0] + ((-0.910219389525+0.736352908713j))*x[1]**o + ((0.652541827364-0.633498899928j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.910219389525+0.736352908713j)/(o+1.)+((0.311865661036-0.8054784408j))+((-0.204340813653+0.906427280267j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.489081589419-0.113624919143j)*x[0]**o + ((-0.225890248588+0.128546617501j))*x[0] + ((0.804066045733+0.664387932578j))*x[1]**o + ((0.971664898668-0.968247399801j))*x[1]
            ref[(1, 1, 1, 1)]=(0.804066045733+0.664387932578j)/(o+1.)+((0.37288732504-0.41985039115j))+((-0.489081589419-0.113624919143j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.986717871104-0.652646599697j)*x[0]**o + ((0.364657804122+0.604704274236j))*x[0] + ((0.504952903589+0.78553313064j))*x[1]**o + ((0.846199722775+0.0897780128457j))*x[1]
            ref[(1, 1, 1, 2)]=(0.504952903589+0.78553313064j)/(o+1.)+((0.605428763448+0.347241143541j))+((0.986717871104-0.652646599697j))*0.5**o
            arg[(1, 1, 1, 3)]=(-0.873520218722+0.5637623719j)*x[0]**o + ((0.738059086604-0.0519883261677j))*x[0] + ((0.0675836673314+0.896374662864j))*x[1]**o + ((0.340302865694-0.178155359518j))*x[1]
            ref[(1, 1, 1, 3)]=(0.0675836673314+0.896374662864j)/(o+1.)+((0.539180976149-0.115071842843j))+((-0.873520218722+0.5637623719j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.251792991064+0.636501198942j)*x[0]**o + ((-0.819965169977-0.0315144750619j))*x[0] + ((-0.421543837325+0.729901718147j))*x[1]**o + ((0.844470302511+0.000686984148931j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.421543837325+0.729901718147j)/(o+1.)+((0.0122525662666-0.0154137454565j))+((-0.251792991064+0.636501198942j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.127841071481-0.276962787424j)*x[0]**o + ((0.176975050038+0.57999538422j))*x[0] + ((0.342511134663+0.105791698911j))*x[1]**o + ((0.947197751522-0.926774402603j))*x[1]
            ref[(1, 1, 2, 1)]=(0.342511134663+0.105791698911j)/(o+1.)+((0.56208640078-0.173389509191j))+((0.127841071481-0.276962787424j))*0.5**o
            arg[(1, 1, 2, 2)]=(-0.322963327003+0.772718253549j)*x[0]**o + ((-0.235071404733-0.965239079249j))*x[0] + ((-0.764566176789+0.15581538117j))*x[1]**o + ((-0.908174121039-0.242534514209j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.764566176789+0.15581538117j)/(o+1.)+((-0.571622762886-0.603886796729j))+((-0.322963327003+0.772718253549j))*0.5**o
            arg[(1, 1, 2, 3)]=(-0.798693273507+0.126472798851j)*x[0]**o + ((0.582238859281+0.843839856282j))*x[0] + ((0.281508786111+0.962753412063j))*x[1]**o + ((0.642450402015-0.340389762806j))*x[1]
            ref[(1, 1, 2, 3)]=(0.281508786111+0.962753412063j)/(o+1.)+((0.612344630648+0.251725046738j))+((-0.798693273507+0.126472798851j))*0.5**o
            arg[(1, 1, 3, 0)]=(-0.626281016541+0.421196594194j)*x[0]**o + ((-0.316489861958+0.954626378976j))*x[0] + ((-0.418596109106+0.987355479571j))*x[1]**o + ((0.671840690408+0.306543733137j))*x[1]
            ref[(1, 1, 3, 0)]=(-0.418596109106+0.987355479571j)/(o+1.)+((0.177675414225+0.630585056056j))+((-0.626281016541+0.421196594194j))*0.5**o
            arg[(1, 1, 3, 1)]=(0.364435538323-0.83361213815j)*x[0]**o + ((-0.614982027135-0.880328543606j))*x[0] + ((0.726392048831-0.479114900911j))*x[1]**o + ((0.804788893348-0.029421383021j))*x[1]
            ref[(1, 1, 3, 1)]=(0.726392048831-0.479114900911j)/(o+1.)+((0.0949034331064-0.454874963314j))+((0.364435538323-0.83361213815j))*0.5**o
            arg[(1, 1, 3, 2)]=(-0.950444897668+0.228431858073j)*x[0]**o + ((0.194109697655+0.548531843881j))*x[0] + ((-0.854045566119-0.470307477544j))*x[1]**o + ((0.963575975326-0.630812734055j))*x[1]
            ref[(1, 1, 3, 2)]=(-0.854045566119-0.470307477544j)/(o+1.)+((0.57884283649-0.0411404450869j))+((-0.950444897668+0.228431858073j))*0.5**o
            arg[(1, 1, 3, 3)]=(-0.466078548087+0.326295450248j)*x[0]**o + ((0.452745425654+0.720229038017j))*x[0] + ((0.88832258006+0.757493742574j))*x[1]**o + ((0.64284952812-0.646418790591j))*x[1]
            ref[(1, 1, 3, 3)]=(0.88832258006+0.757493742574j)/(o+1.)+((0.547797476887+0.0369051237127j))+((-0.466078548087+0.326295450248j))*0.5**o
            arg[(1, 2, 0, 0)]=(0.709234503274-0.14748648204j)*x[0]**o + ((0.410928900731-0.284333270904j))*x[0] + ((-0.165255664811-0.812642343543j))*x[1]**o + ((-0.0705789371391+0.139856103689j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.165255664811-0.812642343543j)/(o+1.)+((0.170174981796-0.0722385836077j))+((0.709234503274-0.14748648204j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.432222825813-0.439988214538j)*x[0]**o + ((0.105114054132+0.436997194404j))*x[0] + ((0.294253540492+0.129022656223j))*x[1]**o + ((0.870257477634+0.716453771642j))*x[1]
            ref[(1, 2, 0, 1)]=(0.294253540492+0.129022656223j)/(o+1.)+((0.487685765883+0.576725483023j))+((-0.432222825813-0.439988214538j))*0.5**o
            arg[(1, 2, 0, 2)]=(-0.822935509117+0.64512665851j)*x[0]**o + ((0.833933008156-0.513991890836j))*x[0] + ((-0.0987981317986+0.0582152756536j))*x[1]**o + ((0.835423586315-0.867301397029j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.0987981317986+0.0582152756536j)/(o+1.)+((0.834678297236-0.690646643933j))+((-0.822935509117+0.64512665851j))*0.5**o
            arg[(1, 2, 0, 3)]=(-0.0425957154903+0.488596043404j)*x[0]**o + ((0.674427261465-0.514609540686j))*x[0] + ((-0.892169654114+0.510038581479j))*x[1]**o + ((-0.0387120245581-0.336403685479j))*x[1]
            ref[(1, 2, 0, 3)]=(-0.892169654114+0.510038581479j)/(o+1.)+((0.317857618454-0.425506613083j))+((-0.0425957154903+0.488596043404j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.903029429271-0.925273512453j)*x[0]**o + ((0.185278099403-0.836188330537j))*x[0] + ((0.536227842406+0.274917213517j))*x[1]**o + ((-0.553643093274+0.962185326623j))*x[1]
            ref[(1, 2, 1, 0)]=(0.536227842406+0.274917213517j)/(o+1.)+((-0.184182496936+0.0629984980432j))+((-0.903029429271-0.925273512453j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.181964837149-0.58835965707j)*x[0]**o + ((-0.480110366243+0.966387697412j))*x[0] + ((0.550739093728+0.417456071369j))*x[1]**o + ((0.943163651427+0.164684522762j))*x[1]
            ref[(1, 2, 1, 1)]=(0.550739093728+0.417456071369j)/(o+1.)+((0.231526642592+0.565536110087j))+((0.181964837149-0.58835965707j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.868091941897-0.867543411883j)*x[0]**o + ((0.885832562475+0.904895591358j))*x[0] + ((-0.586144001352-0.199115035302j))*x[1]**o + ((0.0317420076031+0.811158791511j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.586144001352-0.199115035302j)/(o+1.)+((0.458787285039+0.858027191434j))+((-0.868091941897-0.867543411883j))*0.5**o
            arg[(1, 2, 1, 3)]=(0.3825003584-0.9665017537j)*x[0]**o + ((0.0868980615294+0.697533445727j))*x[0] + ((-0.117344257606-0.728045010099j))*x[1]**o + ((0.461203497713-0.609884585515j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.117344257606-0.728045010099j)/(o+1.)+((0.274050779621+0.0438244301059j))+((0.3825003584-0.9665017537j))*0.5**o
            arg[(1, 2, 2, 0)]=(0.10702515996-0.055365796709j)*x[0]**o + ((0.234563028452+0.738349619227j))*x[0] + ((-0.991884702535+0.331767912361j))*x[1]**o + ((0.257737395164-0.969888500359j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.991884702535+0.331767912361j)/(o+1.)+((0.246150211808-0.115769440566j))+((0.10702515996-0.055365796709j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.331418263108+0.112658093576j)*x[0]**o + ((-0.138521993516-0.98714152412j))*x[0] + ((0.028842544096-0.168439539403j))*x[1]**o + ((0.761736053443-0.642465542096j))*x[1]
            ref[(1, 2, 2, 1)]=(0.028842544096-0.168439539403j)/(o+1.)+((0.311607029963-0.814803533108j))+((0.331418263108+0.112658093576j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.926735777637-0.791626540553j)*x[0]**o + ((-0.852873060821-0.852414992976j))*x[0] + ((-0.48046460351-0.0877577794499j))*x[1]**o + ((-0.971816875015-0.713613785624j))*x[1]
            ref[(1, 2, 2, 2)]=(-0.48046460351-0.0877577794499j)/(o+1.)+((-0.912344967918-0.7830143893j))+((0.926735777637-0.791626540553j))*0.5**o
            arg[(1, 2, 2, 3)]=(-0.177676726437-0.98850184691j)*x[0]**o + ((0.140418871996-0.96710428115j))*x[0] + ((-0.976011136126+0.957169125874j))*x[1]**o + ((-0.199727015745-0.669951217791j))*x[1]
            ref[(1, 2, 2, 3)]=(-0.976011136126+0.957169125874j)/(o+1.)+((-0.0296540718744-0.818527749471j))+((-0.177676726437-0.98850184691j))*0.5**o
            arg[(1, 2, 3, 0)]=(-0.024997831944+0.449936983049j)*x[0]**o + ((-0.304462182864+0.105986142163j))*x[0] + ((-0.675608608258-0.9009088465j))*x[1]**o + ((-0.974446453197+0.0255945049536j))*x[1]
            ref[(1, 2, 3, 0)]=(-0.675608608258-0.9009088465j)/(o+1.)+((-0.63945431803+0.0657903235584j))+((-0.024997831944+0.449936983049j))*0.5**o
            arg[(1, 2, 3, 1)]=(-0.852018387309-0.467520096466j)*x[0]**o + ((0.20690770877+0.759861784333j))*x[0] + ((-0.38893634063-0.0705824996095j))*x[1]**o + ((0.625109149168-0.595921575963j))*x[1]
            ref[(1, 2, 3, 1)]=(-0.38893634063-0.0705824996095j)/(o+1.)+((0.416008428969+0.081970104185j))+((-0.852018387309-0.467520096466j))*0.5**o
            arg[(1, 2, 3, 2)]=(0.70939334912+0.888990922474j)*x[0]**o + ((0.651355443035+0.299874634559j))*x[0] + ((-0.0222562570297-0.64997550334j))*x[1]**o + ((0.132241300932-0.0262006647673j))*x[1]
            ref[(1, 2, 3, 2)]=(-0.0222562570297-0.64997550334j)/(o+1.)+((0.391798371983+0.136836984896j))+((0.70939334912+0.888990922474j))*0.5**o
            arg[(1, 2, 3, 3)]=(0.350693980561-0.161606708872j)*x[0]**o + ((0.84800719757-0.874192919895j))*x[0] + ((-0.170874686743+0.78685315749j))*x[1]**o + ((0.954584925633+0.786061486042j))*x[1]
            ref[(1, 2, 3, 3)]=(-0.170874686743+0.78685315749j)/(o+1.)+((0.901296061602-0.0440657169269j))+((0.350693980561-0.161606708872j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.264286881549-0.679084415158j)*x[0]**o + ((-0.433666466509+0.13071474918j))*x[0] + ((0.917096473986-0.617601810844j))*x[1]**o + ((-0.743510037981-0.570804931459j))*x[1]
            ref[(2, 0, 0, 0)]=(0.917096473986-0.617601810844j)/(o+1.)+((-0.588588252245-0.22004509114j))+((0.264286881549-0.679084415158j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.904162721637-0.933936026169j)*x[0]**o + ((-0.406286329014-0.988147711276j))*x[0] + ((-0.892266207867+0.92159784888j))*x[1]**o + ((-0.799097859617+0.692880159155j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.892266207867+0.92159784888j)/(o+1.)+((-0.602692094315-0.14763377606j))+((-0.904162721637-0.933936026169j))*0.5**o
            arg[(2, 0, 0, 2)]=(-0.205270222254-0.532967048915j)*x[0]**o + ((-0.0407829451353-0.595429900461j))*x[0] + ((-0.736590205392-0.74566307309j))*x[1]**o + ((0.45879308198-0.698474594628j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.736590205392-0.74566307309j)/(o+1.)+((0.209005068422-0.646952247544j))+((-0.205270222254-0.532967048915j))*0.5**o
            arg[(2, 0, 0, 3)]=(-0.55235469032-0.825703319453j)*x[0]**o + ((-0.677056292281+0.840018276515j))*x[0] + ((-0.641061726577+0.183688402126j))*x[1]**o + ((0.829228894409-0.832804369687j))*x[1]
            ref[(2, 0, 0, 3)]=(-0.641061726577+0.183688402126j)/(o+1.)+((0.0760863010636+0.00360695341396j))+((-0.55235469032-0.825703319453j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.0323039052359+0.408130090905j)*x[0]**o + ((0.55128592505+0.0105892985131j))*x[0] + ((0.625783240929+0.283617356509j))*x[1]**o + ((-0.488754976571-0.207402280264j))*x[1]
            ref[(2, 0, 1, 0)]=(0.625783240929+0.283617356509j)/(o+1.)+((0.0312654742395-0.0984064908753j))+((-0.0323039052359+0.408130090905j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.461618920025+0.213635864912j)*x[0]**o + ((-0.131031273682+0.610084485066j))*x[0] + ((0.88999291097+0.0122981217293j))*x[1]**o + ((-0.183554984131+0.126380112054j))*x[1]
            ref[(2, 0, 1, 1)]=(0.88999291097+0.0122981217293j)/(o+1.)+((-0.157293128907+0.36823229856j))+((-0.461618920025+0.213635864912j))*0.5**o
            arg[(2, 0, 1, 2)]=(-0.223336298534+0.835452400343j)*x[0]**o + ((-0.18740009369-0.0159021293187j))*x[0] + ((0.81253308477-0.664128129959j))*x[1]**o + ((0.0796378620717+0.521317925514j))*x[1]
            ref[(2, 0, 1, 2)]=(0.81253308477-0.664128129959j)/(o+1.)+((-0.0538811158092+0.252707898098j))+((-0.223336298534+0.835452400343j))*0.5**o
            arg[(2, 0, 1, 3)]=(0.17675857363+0.440043532149j)*x[0]**o + ((-0.367826713078+0.792769646442j))*x[0] + ((-0.0099490820777+0.334518395082j))*x[1]**o + ((0.720469614233-0.182206913904j))*x[1]
            ref[(2, 0, 1, 3)]=(-0.0099490820777+0.334518395082j)/(o+1.)+((0.176321450577+0.305281366269j))+((0.17675857363+0.440043532149j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.00759023512853-0.313706302715j)*x[0]**o + ((-0.524812646225-0.212192321252j))*x[0] + ((-0.193189882104+0.86166238198j))*x[1]**o + ((0.488868081304+0.00100101488849j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.193189882104+0.86166238198j)/(o+1.)+((-0.0179722824605-0.105595653182j))+((-0.00759023512853-0.313706302715j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.203372303089-0.338588170615j)*x[0]**o + ((-0.284578696685-0.781079541766j))*x[0] + ((0.0549877101761-0.732207972877j))*x[1]**o + ((-0.525152955925+0.409886093555j))*x[1]
            ref[(2, 0, 2, 1)]=(0.0549877101761-0.732207972877j)/(o+1.)+((-0.404865826305-0.185596724105j))+((0.203372303089-0.338588170615j))*0.5**o
            arg[(2, 0, 2, 2)]=(-0.460639705038-0.162889930045j)*x[0]**o + ((-0.806083692654-0.678983673124j))*x[0] + ((-0.227785776864+0.896713075939j))*x[1]**o + ((0.5870546814+0.585007032726j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.227785776864+0.896713075939j)/(o+1.)+((-0.109514505627-0.0469883201988j))+((-0.460639705038-0.162889930045j))*0.5**o
            arg[(2, 0, 2, 3)]=(0.403418934292-0.787328448114j)*x[0]**o + ((0.223943088836+0.874524068545j))*x[0] + ((-0.694977038375-0.224720829867j))*x[1]**o + ((0.680155213692+0.779034179249j))*x[1]
            ref[(2, 0, 2, 3)]=(-0.694977038375-0.224720829867j)/(o+1.)+((0.452049151264+0.826779123897j))+((0.403418934292-0.787328448114j))*0.5**o
            arg[(2, 0, 3, 0)]=(-0.747875694507+0.844124140651j)*x[0]**o + ((-0.882458328276-0.726529368939j))*x[0] + ((-0.865641215904-0.212522417275j))*x[1]**o + ((0.628132740808+0.759953979424j))*x[1]
            ref[(2, 0, 3, 0)]=(-0.865641215904-0.212522417275j)/(o+1.)+((-0.127162793734+0.0167123052424j))+((-0.747875694507+0.844124140651j))*0.5**o
            arg[(2, 0, 3, 1)]=(0.713287056538+0.959419599653j)*x[0]**o + ((-0.391745563798-0.562517539746j))*x[0] + ((0.937532639837-0.00943597350878j))*x[1]**o + ((-0.870751523908-0.591656542939j))*x[1]
            ref[(2, 0, 3, 1)]=(0.937532639837-0.00943597350878j)/(o+1.)+((-0.631248543853-0.577087041343j))+((0.713287056538+0.959419599653j))*0.5**o
            arg[(2, 0, 3, 2)]=(-0.0850993755074-0.697838658005j)*x[0]**o + ((0.670021454115+0.38848048627j))*x[0] + ((0.975791068378-0.611474776535j))*x[1]**o + ((0.18732839707+0.281969010909j))*x[1]
            ref[(2, 0, 3, 2)]=(0.975791068378-0.611474776535j)/(o+1.)+((0.428674925592+0.33522474859j))+((-0.0850993755074-0.697838658005j))*0.5**o
            arg[(2, 0, 3, 3)]=(-0.414634223988+0.445837056765j)*x[0]**o + ((0.75184794853+0.441825308959j))*x[0] + ((0.800521015098-0.694511907226j))*x[1]**o + ((0.388446317562-0.588371729116j))*x[1]
            ref[(2, 0, 3, 3)]=(0.800521015098-0.694511907226j)/(o+1.)+((0.570147133046-0.0732732100784j))+((-0.414634223988+0.445837056765j))*0.5**o
            arg[(2, 1, 0, 0)]=(0.825089760101+0.350192839054j)*x[0]**o + ((0.844736567266-0.792922284047j))*x[0] + ((-0.567100472258-0.929898952968j))*x[1]**o + ((0.25589116644-0.622712425856j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.567100472258-0.929898952968j)/(o+1.)+((0.550313866853-0.707817354952j))+((0.825089760101+0.350192839054j))*0.5**o
            arg[(2, 1, 0, 1)]=(0.273101000897+0.997832180913j)*x[0]**o + ((0.0582351003002+0.578077541797j))*x[0] + ((-0.444027171107-0.046245309271j))*x[1]**o + ((0.986363882437-0.87874178256j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.444027171107-0.046245309271j)/(o+1.)+((0.522299491368-0.150332120381j))+((0.273101000897+0.997832180913j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.370841379204-0.0747779661787j)*x[0]**o + ((-0.457846972176+0.923820276115j))*x[0] + ((0.267488942291-0.41751755559j))*x[1]**o + ((0.419495965768+0.481848306747j))*x[1]
            ref[(2, 1, 0, 2)]=(0.267488942291-0.41751755559j)/(o+1.)+((-0.0191755032044+0.702834291431j))+((-0.370841379204-0.0747779661787j))*0.5**o
            arg[(2, 1, 0, 3)]=(-0.185028362935-0.749149221789j)*x[0]**o + ((0.976540423842+0.377964619803j))*x[0] + ((0.279304775118+0.362164205912j))*x[1]**o + ((0.534666487439+0.620447505774j))*x[1]
            ref[(2, 1, 0, 3)]=(0.279304775118+0.362164205912j)/(o+1.)+((0.75560345564+0.499206062789j))+((-0.185028362935-0.749149221789j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.833163962086+0.671955953219j)*x[0]**o + ((-0.562232222053+0.0364705790199j))*x[0] + ((-0.246231075047+0.687203613505j))*x[1]**o + ((-0.0937450505465+0.291843316742j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.246231075047+0.687203613505j)/(o+1.)+((-0.3279886363+0.164156947881j))+((0.833163962086+0.671955953219j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.369469286175+0.0122071724317j)*x[0]**o + ((0.348488381587-0.270283578643j))*x[0] + ((-0.753766056939+0.81695844976j))*x[1]**o + ((-0.388878170346+0.757339435954j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.753766056939+0.81695844976j)/(o+1.)+((-0.0201948943795+0.243527928655j))+((-0.369469286175+0.0122071724317j))*0.5**o
            arg[(2, 1, 1, 2)]=(-0.459394287523+0.704933016775j)*x[0]**o + ((0.840991045282+0.186543960066j))*x[0] + ((-0.597370478757+0.364334192828j))*x[1]**o + ((0.425067760541-0.612683078867j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.597370478757+0.364334192828j)/(o+1.)+((0.633029402912-0.213069559401j))+((-0.459394287523+0.704933016775j))*0.5**o
            arg[(2, 1, 1, 3)]=(-0.897954249884-0.493334264857j)*x[0]**o + ((-0.595168291791-0.246469809343j))*x[0] + ((-0.571646994841-0.193325047603j))*x[1]**o + ((-0.834111367466+0.993250679457j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.571646994841-0.193325047603j)/(o+1.)+((-0.714639829629+0.373390435057j))+((-0.897954249884-0.493334264857j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.353997798414-0.213789925338j)*x[0]**o + ((0.950034176079-0.578450540335j))*x[0] + ((0.430646472152-0.939211179656j))*x[1]**o + ((-0.803158810368-0.494899471952j))*x[1]
            ref[(2, 1, 2, 0)]=(0.430646472152-0.939211179656j)/(o+1.)+((0.0734376828559-0.536675006143j))+((-0.353997798414-0.213789925338j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.639710812377-0.884935019053j)*x[0]**o + ((-0.59732334689-0.173598154461j))*x[0] + ((0.208956340896-0.844039130148j))*x[1]**o + ((-0.371124181551+0.780445756968j))*x[1]
            ref[(2, 1, 2, 1)]=(0.208956340896-0.844039130148j)/(o+1.)+((-0.484223764221+0.303423801254j))+((-0.639710812377-0.884935019053j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.342851433553+0.166543820267j)*x[0]**o + ((-0.699979422442-0.507755078404j))*x[0] + ((-0.49801928207-0.448597109728j))*x[1]**o + ((0.76495895707+0.762589896356j))*x[1]
            ref[(2, 1, 2, 2)]=(-0.49801928207-0.448597109728j)/(o+1.)+((0.0324897673139+0.127417408976j))+((0.342851433553+0.166543820267j))*0.5**o
            arg[(2, 1, 2, 3)]=(0.851745430651+0.201514732468j)*x[0]**o + ((-0.961816662386-0.218367623232j))*x[0] + ((0.856189918119+0.154292326541j))*x[1]**o + ((0.437911439977+0.557611395171j))*x[1]
            ref[(2, 1, 2, 3)]=(0.856189918119+0.154292326541j)/(o+1.)+((-0.261952611205+0.16962188597j))+((0.851745430651+0.201514732468j))*0.5**o
            arg[(2, 1, 3, 0)]=(0.526107126084+0.286167387257j)*x[0]**o + ((0.230735640888+0.230057450692j))*x[0] + ((0.6087031472+0.769556698304j))*x[1]**o + ((-0.246003273537+0.0894804487601j))*x[1]
            ref[(2, 1, 3, 0)]=(0.6087031472+0.769556698304j)/(o+1.)+((-0.00763381632452+0.159768949726j))+((0.526107126084+0.286167387257j))*0.5**o
            arg[(2, 1, 3, 1)]=(0.814945465093+0.409830361979j)*x[0]**o + ((-0.900832173317+0.201052215808j))*x[0] + ((-0.284689819372+0.130334103051j))*x[1]**o + ((-0.238103704058+0.35252343967j))*x[1]
            ref[(2, 1, 3, 1)]=(-0.284689819372+0.130334103051j)/(o+1.)+((-0.569467938688+0.276787827739j))+((0.814945465093+0.409830361979j))*0.5**o
            arg[(2, 1, 3, 2)]=(0.412359989764-0.463417990216j)*x[0]**o + ((0.710244548651+0.785150088862j))*x[0] + ((-0.882955261788+0.290773411965j))*x[1]**o + ((0.879028384241+0.286921094775j))*x[1]
            ref[(2, 1, 3, 2)]=(-0.882955261788+0.290773411965j)/(o+1.)+((0.794636466446+0.536035591819j))+((0.412359989764-0.463417990216j))*0.5**o
            arg[(2, 1, 3, 3)]=(0.349270638546+0.916042626708j)*x[0]**o + ((0.362794923574-0.635091205529j))*x[0] + ((-0.0403304494517+0.95094320481j))*x[1]**o + ((-0.839667468737-0.891164600756j))*x[1]
            ref[(2, 1, 3, 3)]=(-0.0403304494517+0.95094320481j)/(o+1.)+((-0.238436272581-0.763127903143j))+((0.349270638546+0.916042626708j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.493934612094-0.186208528369j)*x[0]**o + ((-0.175732363447+0.139859531637j))*x[0] + ((-0.395312412501-0.860964327466j))*x[1]**o + ((-0.841827614202-0.836585711624j))*x[1]
            ref[(2, 2, 0, 0)]=(-0.395312412501-0.860964327466j)/(o+1.)+((-0.508779988825-0.348363089993j))+((-0.493934612094-0.186208528369j))*0.5**o
            arg[(2, 2, 0, 1)]=(-0.792790355948+0.725056143787j)*x[0]**o + ((0.963539052084-0.069847254391j))*x[0] + ((-0.0981411770595+0.953014681468j))*x[1]**o + ((-0.203858625363-0.211472231933j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.0981411770595+0.953014681468j)/(o+1.)+((0.37984021336-0.140659743162j))+((-0.792790355948+0.725056143787j))*0.5**o
            arg[(2, 2, 0, 2)]=(-0.403209360828-0.0190972931468j)*x[0]**o + ((0.590830690748+0.883311342371j))*x[0] + ((-0.00183162140672+0.75044074005j))*x[1]**o + ((-0.817887672434+0.13909614154j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.00183162140672+0.75044074005j)/(o+1.)+((-0.113528490843+0.511203741956j))+((-0.403209360828-0.0190972931468j))*0.5**o
            arg[(2, 2, 0, 3)]=(0.997343638846+0.497210496187j)*x[0]**o + ((-0.0360328482257-0.415919624651j))*x[0] + ((0.474566711075-0.679632728401j))*x[1]**o + ((-0.0323910762694-0.0245844615848j))*x[1]
            ref[(2, 2, 0, 3)]=(0.474566711075-0.679632728401j)/(o+1.)+((-0.0342119622475-0.220252043118j))+((0.997343638846+0.497210496187j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.576822238882+0.870104699392j)*x[0]**o + ((0.0973787324027+0.893579443883j))*x[0] + ((0.884648507486+0.691940085703j))*x[1]**o + ((-0.822564855765-0.625747942975j))*x[1]
            ref[(2, 2, 1, 0)]=(0.884648507486+0.691940085703j)/(o+1.)+((-0.362593061681+0.133915750454j))+((0.576822238882+0.870104699392j))*0.5**o
            arg[(2, 2, 1, 1)]=(-0.629180107765-0.935843841004j)*x[0]**o + ((-0.672205447241+0.494677766262j))*x[0] + ((0.57303918087+0.399779591533j))*x[1]**o + ((0.124476037874-0.189988185246j))*x[1]
            ref[(2, 2, 1, 1)]=(0.57303918087+0.399779591533j)/(o+1.)+((-0.273864704684+0.152344790508j))+((-0.629180107765-0.935843841004j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.268147253256+0.577645716536j)*x[0]**o + ((0.352584924825+0.767237363997j))*x[0] + ((-0.439429387296+0.371207004887j))*x[1]**o + ((-0.231900954907+0.517298355051j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.439429387296+0.371207004887j)/(o+1.)+((0.060341984959+0.642267859524j))+((-0.268147253256+0.577645716536j))*0.5**o
            arg[(2, 2, 1, 3)]=(-0.948543793099-0.633223047027j)*x[0]**o + ((0.591591823604-0.141863093152j))*x[0] + ((-0.359279612919+0.856094008096j))*x[1]**o + ((-0.333762539606+0.240778560333j))*x[1]
            ref[(2, 2, 1, 3)]=(-0.359279612919+0.856094008096j)/(o+1.)+((0.128914641999+0.0494577335905j))+((-0.948543793099-0.633223047027j))*0.5**o
            arg[(2, 2, 2, 0)]=(0.429847344452-0.494690954988j)*x[0]**o + ((0.794122990617+0.608245991367j))*x[0] + ((-0.0142672353907+0.814468285319j))*x[1]**o + ((-0.290871792079-0.125880250685j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.0142672353907+0.814468285319j)/(o+1.)+((0.251625599269+0.241182870341j))+((0.429847344452-0.494690954988j))*0.5**o
            arg[(2, 2, 2, 1)]=(0.39669824097-0.621174090727j)*x[0]**o + ((0.615626650751+0.595181894142j))*x[0] + ((0.26215522116+0.358170260475j))*x[1]**o + ((-0.375387853064+0.480841640425j))*x[1]
            ref[(2, 2, 2, 1)]=(0.26215522116+0.358170260475j)/(o+1.)+((0.120119398844+0.538011767283j))+((0.39669824097-0.621174090727j))*0.5**o
            arg[(2, 2, 2, 2)]=(0.320768554719+0.0860527157583j)*x[0]**o + ((0.736514755373+0.0295879161775j))*x[0] + ((-0.30591546925+0.900600130252j))*x[1]**o + ((0.982538719238-0.424341072367j))*x[1]
            ref[(2, 2, 2, 2)]=(-0.30591546925+0.900600130252j)/(o+1.)+((0.859526737306-0.197376578095j))+((0.320768554719+0.0860527157583j))*0.5**o
            arg[(2, 2, 2, 3)]=(-0.544551688055-0.712808467379j)*x[0]**o + ((-0.89070439604+0.661431165967j))*x[0] + ((-0.803403871943-0.8879079557j))*x[1]**o + ((-0.194594416519-0.866234012038j))*x[1]
            ref[(2, 2, 2, 3)]=(-0.803403871943-0.8879079557j)/(o+1.)+((-0.54264940628-0.102401423036j))+((-0.544551688055-0.712808467379j))*0.5**o
            arg[(2, 2, 3, 0)]=(-0.848205666356-0.923037486826j)*x[0]**o + ((0.871487428942-0.022911892593j))*x[0] + ((-0.833608902651+0.645264499628j))*x[1]**o + ((-0.755441833812-0.98960566659j))*x[1]
            ref[(2, 2, 3, 0)]=(-0.833608902651+0.645264499628j)/(o+1.)+((0.0580227975652-0.506258779591j))+((-0.848205666356-0.923037486826j))*0.5**o
            arg[(2, 2, 3, 1)]=(-0.232003700842-0.968894482185j)*x[0]**o + ((0.647634104306-0.241910310328j))*x[0] + ((-0.67344725142+0.511872414147j))*x[1]**o + ((0.576660607802-0.0231158185066j))*x[1]
            ref[(2, 2, 3, 1)]=(-0.67344725142+0.511872414147j)/(o+1.)+((0.612147356054-0.132513064418j))+((-0.232003700842-0.968894482185j))*0.5**o
            arg[(2, 2, 3, 2)]=(0.509438871806-0.0165088025187j)*x[0]**o + ((-0.374155399318+0.143012316958j))*x[0] + ((0.872709435893-0.279985606776j))*x[1]**o + ((0.381975787836-0.985468790717j))*x[1]
            ref[(2, 2, 3, 2)]=(0.872709435893-0.279985606776j)/(o+1.)+((0.00391019425911-0.42122823688j))+((0.509438871806-0.0165088025187j))*0.5**o
            arg[(2, 2, 3, 3)]=(0.89798397477+0.500572895506j)*x[0]**o + ((-0.95597333873-0.653109403338j))*x[0] + ((0.0242471351593+0.385753504419j))*x[1]**o + ((0.765956364837-0.844226905788j))*x[1]
            ref[(2, 2, 3, 3)]=(0.0242471351593+0.385753504419j)/(o+1.)+((-0.095008486946-0.748668154563j))+((0.89798397477+0.500572895506j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.322562049367-0.611247580161j)*x[0]**o + ((-0.840652075666-0.713537981705j))*x[0] + ((0.0187209892533-0.957743634404j))*x[1]**o + ((0.444573263803-0.824679012821j))*x[1] + ((-0.0283446884762-0.636679692983j))*x[2]**o + ((-0.330652518085+0.459779338709j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.00962369922286-1.59442332739j)/(o+1.)+((-0.363365664974-0.539218827908j))+((0.322562049367-0.611247580161j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.413466383918+0.679114114934j)*x[0]**o + ((-0.511638088789-0.0158521258319j))*x[0] + ((-0.988681820143+0.0015994343828j))*x[1]**o + ((-0.753776879503-0.118319868757j))*x[1] + ((0.836471615973-0.0425886075363j))*x[2]**o + ((0.819352315007-0.495781445205j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.15221020417-0.0409891731535j)/(o+1.)+((-0.223031326643-0.314976719897j))+((-0.413466383918+0.679114114934j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.27650972745+0.624108404715j)*x[0]**o + ((0.913787148698+0.563288997573j))*x[0] + ((0.0703192260012-0.763843065138j))*x[1]**o + ((-0.178619770051-0.469553686009j))*x[1] + ((-0.336277769438-0.271808629328j))*x[2]**o + ((-0.0869488078724-0.084382595678j))*x[2]
            ref[(0, 0, 0, 2)]=(-0.265958543437-1.03565169447j)/(o+1.)+((0.324109285387+0.00467635794283j))+((-0.27650972745+0.624108404715j))*0.5**o
            arg[(0, 0, 0, 3)]=(-0.511495497247+0.79394182705j)*x[0]**o + ((0.062844140241-0.514266245273j))*x[0] + ((-0.185685232935+0.15064257587j))*x[1]**o + ((0.373185756161+0.288428658888j))*x[1] + ((0.376649175346+0.369302091222j))*x[2]**o + ((-0.799231613415+0.0598846502594j))*x[2]
            ref[(0, 0, 0, 3)]=(0.190963942411+0.519944667091j)/(o+1.)+((-0.181600858506-0.0829764680627j))+((-0.511495497247+0.79394182705j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.600022204028-0.830526224886j)*x[0]**o + ((0.465842428953+0.807174183578j))*x[0] + ((-0.865480587871+0.715935373562j))*x[1]**o + ((-0.703328212936+0.944245669775j))*x[1] + ((-0.405234792003-0.0953500273036j))*x[2]**o + ((0.0415740581288-0.0630150869397j))*x[2]
            ref[(0, 0, 1, 0)]=(-1.27071537987+0.620585346258j)/(o+1.)+((-0.0979558629269+0.844202383206j))+((-0.600022204028-0.830526224886j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.241435864851-0.781828951229j)*x[0]**o + ((-0.744749776196-0.988202569336j))*x[0] + ((0.436771117754+0.977284138329j))*x[1]**o + ((0.744385300152+0.186448763993j))*x[1] + ((0.0502036866739-0.86061228431j))*x[2]**o + ((-0.794530676948-0.72975070972j))*x[2]
            ref[(0, 0, 1, 1)]=(0.486974804428+0.11667185402j)/(o+1.)+((-0.397447576496-0.765752257531j))+((-0.241435864851-0.781828951229j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.400499321487-0.228178905978j)*x[0]**o + ((-0.684539542645+0.559179510571j))*x[0] + ((-0.265850512977+0.666124477997j))*x[1]**o + ((-0.32570161947+0.892856785369j))*x[1] + ((-0.589080642946-0.639767723149j))*x[2]**o + ((-0.476682374345-0.185788621712j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.854931155923+0.0263567548477j)/(o+1.)+((-0.743461768231+0.633123837114j))+((0.400499321487-0.228178905978j))*0.5**o
            arg[(0, 0, 1, 3)]=(-0.787099423636-0.389349458288j)*x[0]**o + ((-0.929760025942-0.890404413491j))*x[0] + ((-0.359673246561-0.948326671748j))*x[1]**o + ((0.0565740875245+0.159377582951j))*x[1] + ((0.616887212696-0.517482285073j))*x[2]**o + ((-0.137363053744+0.775877653676j))*x[2]
            ref[(0, 0, 1, 3)]=(0.257213966135-1.46580895682j)/(o+1.)+((-0.505274496081+0.0224254115681j))+((-0.787099423636-0.389349458288j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.439027896008+0.275529092583j)*x[0]**o + ((0.337963683938-0.758051464564j))*x[0] + ((0.829414858164-0.498741073847j))*x[1]**o + ((-0.3422482959+0.157177350314j))*x[1] + ((0.331277797879+0.0682193923222j))*x[2]**o + ((-0.498992404078+0.799106393817j))*x[2]
            ref[(0, 0, 2, 0)]=(1.16069265604-0.430521681525j)/(o+1.)+((-0.251638508019+0.0991161397835j))+((0.439027896008+0.275529092583j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.368729454872+0.604273264332j)*x[0]**o + ((0.544543521924-0.380560958461j))*x[0] + ((0.347004383704+0.504541164835j))*x[1]**o + ((0.495731667546-0.761982417229j))*x[1] + ((-0.517458531809-0.223201165214j))*x[2]**o + ((0.719746981302+0.648055265519j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.170454148105+0.281339999622j)/(o+1.)+((0.880011085386-0.247244055085j))+((-0.368729454872+0.604273264332j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.0770009791745+0.0305712372925j)*x[0]**o + ((0.827158067092+0.638989097242j))*x[0] + ((-0.292578641686-0.855197872697j))*x[1]**o + ((0.579532797592+0.702697770796j))*x[1] + ((-0.0439404314633-0.868551668274j))*x[2]**o + ((-0.467998948476+0.0636267375302j))*x[2]
            ref[(0, 0, 2, 2)]=(-0.336519073149-1.72374954097j)/(o+1.)+((0.469345958104+0.702656802784j))+((0.0770009791745+0.0305712372925j))*0.5**o
            arg[(0, 0, 2, 3)]=(-0.273610381143-0.625685893328j)*x[0]**o + ((0.966570310868+0.451698302382j))*x[0] + ((0.687438350906-0.69668392016j))*x[1]**o + ((0.799211543304+0.606365852594j))*x[1] + ((-0.484117219627+0.00969924399492j))*x[2]**o + ((0.0345072879835+0.471334796935j))*x[2]
            ref[(0, 0, 2, 3)]=(0.203321131278-0.686984676166j)/(o+1.)+((0.900144571078+0.764699475955j))+((-0.273610381143-0.625685893328j))*0.5**o
            arg[(0, 0, 3, 0)]=(-0.971611124681-0.0801720390388j)*x[0]**o + ((0.456913593701+0.520354351439j))*x[0] + ((-0.556482702738-0.319962991587j))*x[1]**o + ((0.561565990003-0.293970249762j))*x[1] + ((0.704011537958-0.540636501236j))*x[2]**o + ((-0.625380751928-0.634477300698j))*x[2]
            ref[(0, 0, 3, 0)]=(0.147528835221-0.860599492823j)/(o+1.)+((0.196549415888-0.204046599511j))+((-0.971611124681-0.0801720390388j))*0.5**o
            arg[(0, 0, 3, 1)]=(0.580358707255-0.643531798927j)*x[0]**o + ((-0.529543889593+0.300065416411j))*x[0] + ((-0.317176095893+0.590877211514j))*x[1]**o + ((-0.0419299810668+0.3194787832j))*x[1] + ((0.859507255301-0.551883169794j))*x[2]**o + ((-0.973796309403+0.215451445143j))*x[2]
            ref[(0, 0, 3, 1)]=(0.542331159408+0.0389940417198j)/(o+1.)+((-0.772635090032+0.417497822377j))+((0.580358707255-0.643531798927j))*0.5**o
            arg[(0, 0, 3, 2)]=(0.444649048848+0.8360230941j)*x[0]**o + ((0.606604012082-0.121517885241j))*x[0] + ((-0.624945644309-0.602452452795j))*x[1]**o + ((0.436719363655+0.717302876602j))*x[1] + ((-0.495243198866-0.265106174688j))*x[2]**o + ((-0.261524840258-0.804649432177j))*x[2]
            ref[(0, 0, 3, 2)]=(-1.12018884317-0.867558627483j)/(o+1.)+((0.39089926774-0.104432220408j))+((0.444649048848+0.8360230941j))*0.5**o
            arg[(0, 0, 3, 3)]=(0.613190772875-0.757978377778j)*x[0]**o + ((0.0296917304243+0.045725338147j))*x[0] + ((0.730404116964-0.1555604106j))*x[1]**o + ((-0.861764770313+0.641311787773j))*x[1] + ((0.510487600514-0.704441503969j))*x[2]**o + ((-0.231642872687-0.455732339323j))*x[2]
            ref[(0, 0, 3, 3)]=(1.24089171748-0.860001914569j)/(o+1.)+((-0.531857956287+0.115652393298j))+((0.613190772875-0.757978377778j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.840600877026+0.670880504914j)*x[0]**o + ((-0.0999156828854-0.180863008763j))*x[0] + ((0.527130794418-0.890420702262j))*x[1]**o + ((0.685267204295+0.134448941439j))*x[1] + ((-0.0309595002754-0.891137552748j))*x[2]**o + ((0.178638443621-0.768930004265j))*x[2]
            ref[(0, 1, 0, 0)]=(0.496171294142-1.78155825501j)/(o+1.)+((0.381994982515-0.407672035794j))+((-0.840600877026+0.670880504914j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.948784431985+0.717160024874j)*x[0]**o + ((-0.471785416389-0.473631514464j))*x[0] + ((-0.791744969239+0.754260432563j))*x[1]**o + ((-0.685396796437+0.637922649953j))*x[1] + ((0.596860293521+0.199464926144j))*x[2]**o + ((-0.800203625569-0.284483451243j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.194884675719+0.953725358707j)/(o+1.)+((-0.978692919198-0.0600961578769j))+((-0.948784431985+0.717160024874j))*0.5**o
            arg[(0, 1, 0, 2)]=(0.676752737054+0.974592481605j)*x[0]**o + ((0.446048019258-0.558552768235j))*x[0] + ((0.840774731539+0.979107534548j))*x[1]**o + ((-0.349178937576+0.173533479614j))*x[1] + ((-0.914904046415+0.886037820268j))*x[2]**o + ((0.439273942236-0.957774970867j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.0741293148761+1.86514535482j)/(o+1.)+((0.268071511959-0.671397129744j))+((0.676752737054+0.974592481605j))*0.5**o
            arg[(0, 1, 0, 3)]=(-0.279226277375-0.154448716111j)*x[0]**o + ((-0.354711901515+0.328469180231j))*x[0] + ((0.379776721492-0.262856879441j))*x[1]**o + ((0.162767277447-0.328160193952j))*x[1] + ((-0.847452432347-0.26054959269j))*x[2]**o + ((-0.0743764510098-0.106534559615j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.467675710855-0.523406472131j)/(o+1.)+((-0.133160537539-0.0531127866679j))+((-0.279226277375-0.154448716111j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.0454215081883-0.565471870786j)*x[0]**o + ((0.47752899282-0.178144198495j))*x[0] + ((-0.99100888007-0.512197058258j))*x[1]**o + ((-0.0616129564335-0.252152148751j))*x[1] + ((-0.421721053443-0.81448093199j))*x[2]**o + ((0.389804546759+0.539410795117j))*x[2]
            ref[(0, 1, 1, 0)]=(-1.41272993351-1.32667799025j)/(o+1.)+((0.402860291573+0.0545572239356j))+((0.0454215081883-0.565471870786j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.442908278029+0.17085022925j)*x[0]**o + ((0.64191710325-0.410541350742j))*x[0] + ((-0.840993271723-0.621059826868j))*x[1]**o + ((-0.153296439783-0.0710658405077j))*x[1] + ((0.350638902278-0.0023903499086j))*x[2]**o + ((0.392578193513+0.820288959537j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.490354369444-0.623450176777j)/(o+1.)+((0.44059942849+0.169340884144j))+((-0.442908278029+0.17085022925j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.269101315368-0.902398739945j)*x[0]**o + ((0.853281182611-0.225881682827j))*x[0] + ((0.303950560289+0.951808464895j))*x[1]**o + ((-0.75705211479+0.600473310782j))*x[1] + ((0.868663988055+0.916496756805j))*x[2]**o + ((-0.316189307434+0.0919308957536j))*x[2]
            ref[(0, 1, 1, 2)]=(1.17261454834+1.8683052217j)/(o+1.)+((-0.109980119806+0.233261261854j))+((0.269101315368-0.902398739945j))*0.5**o
            arg[(0, 1, 1, 3)]=(0.266078785928-0.796614891489j)*x[0]**o + ((-0.645549651393+0.293814644653j))*x[0] + ((0.0592346703358-0.717548406469j))*x[1]**o + ((-0.103495842456-0.169948896847j))*x[1] + ((-0.657570210769-0.957651167189j))*x[2]**o + ((0.446232731151-0.200855686598j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.598335540433-1.67519957366j)/(o+1.)+((-0.151406381349-0.0384949693963j))+((0.266078785928-0.796614891489j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.71851820891-0.715078283462j)*x[0]**o + ((-0.133509795907+0.372406483703j))*x[0] + ((0.258418885925+0.915572129155j))*x[1]**o + ((0.339176390354-0.164203288805j))*x[1] + ((0.548906594178+0.585232132683j))*x[2]**o + ((0.806958504971-0.939910681909j))*x[2]
            ref[(0, 1, 2, 0)]=(0.807325480103+1.50080426184j)/(o+1.)+((0.506312549709-0.365853743505j))+((0.71851820891-0.715078283462j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.478817644983+0.729626285146j)*x[0]**o + ((0.578694192946+0.209362103322j))*x[0] + ((0.12600990344+0.52111541857j))*x[1]**o + ((0.423380949361-0.875434900613j))*x[1] + ((0.817476169353-0.128958995467j))*x[2]**o + ((-0.653747741727-0.719741088244j))*x[2]
            ref[(0, 1, 2, 1)]=(0.943486072794+0.392156423102j)/(o+1.)+((0.17416370029-0.692906942767j))+((0.478817644983+0.729626285146j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.653822111629+0.054071207751j)*x[0]**o + ((0.87225196702-0.728826703793j))*x[0] + ((-0.878108820672+0.14167612348j))*x[1]**o + ((-0.20417508568+0.212739196292j))*x[1] + ((0.58095568437-0.580423729927j))*x[2]**o + ((0.914020708209-0.199566505603j))*x[2]
            ref[(0, 1, 2, 2)]=(-0.297153136302-0.438747606447j)/(o+1.)+((0.791048794775-0.357827006552j))+((-0.653822111629+0.054071207751j))*0.5**o
            arg[(0, 1, 2, 3)]=(-0.415653067078+0.439630597589j)*x[0]**o + ((0.712719011333+0.410400653955j))*x[0] + ((0.0186329459124-0.291520251925j))*x[1]**o + ((-0.829862880132+0.377997669101j))*x[1] + ((0.836140041561-0.696264748776j))*x[2]**o + ((0.0425581196411-0.700208042277j))*x[2]
            ref[(0, 1, 2, 3)]=(0.854772987473-0.987785000701j)/(o+1.)+((-0.0372928745789+0.0440951403896j))+((-0.415653067078+0.439630597589j))*0.5**o
            arg[(0, 1, 3, 0)]=(-0.360797366158-0.248387229865j)*x[0]**o + ((0.0711485093883-0.170475002805j))*x[0] + ((0.272845668712-0.970393123088j))*x[1]**o + ((-0.374434578362-0.309155600876j))*x[1] + ((0.794517937885+0.509624850295j))*x[2]**o + ((-0.580963015997+0.169690415879j))*x[2]
            ref[(0, 1, 3, 0)]=(1.0673636066-0.460768272793j)/(o+1.)+((-0.442124542485-0.154970093901j))+((-0.360797366158-0.248387229865j))*0.5**o
            arg[(0, 1, 3, 1)]=(0.527203698118+0.636324333549j)*x[0]**o + ((-0.498321943455-0.301984376673j))*x[0] + ((-0.726677590546+0.192489532138j))*x[1]**o + ((0.761695717117+0.109969565733j))*x[1] + ((0.18672563908-0.447499480213j))*x[2]**o + ((0.705072052349+0.246793080519j))*x[2]
            ref[(0, 1, 3, 1)]=(-0.539951951467-0.255009948076j)/(o+1.)+((0.484222913005+0.0273891347896j))+((0.527203698118+0.636324333549j))*0.5**o
            arg[(0, 1, 3, 2)]=(-0.309950438213-0.434203140351j)*x[0]**o + ((0.802263194628+0.122061029206j))*x[0] + ((-0.0944715843034+0.0859432939688j))*x[1]**o + ((0.801372996389+0.398022096175j))*x[1] + ((0.542398997086-0.931273035419j))*x[2]**o + ((-0.859911057717-0.214226588298j))*x[2]
            ref[(0, 1, 3, 2)]=(0.447927412783-0.84532974145j)/(o+1.)+((0.37186256665+0.152928268542j))+((-0.309950438213-0.434203140351j))*0.5**o
            arg[(0, 1, 3, 3)]=(-0.423454431982+0.798735938907j)*x[0]**o + ((-0.366135924524+0.231297347762j))*x[0] + ((-0.201185629402+0.713666410717j))*x[1]**o + ((-0.835785421268-0.0995028413044j))*x[1] + ((0.0394433520039+0.0273255736915j))*x[2]**o + ((-0.230942963447+0.257589790869j))*x[2]
            ref[(0, 1, 3, 3)]=(-0.161742277398+0.740991984409j)/(o+1.)+((-0.716432154619+0.194692148663j))+((-0.423454431982+0.798735938907j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.806757134597-0.0362406534107j)*x[0]**o + ((-0.129820240325-0.351924917873j))*x[0] + ((-0.0536615108218-0.468695049409j))*x[1]**o + ((0.3611435656+0.430126316875j))*x[1] + ((0.587912929327-0.487857336928j))*x[2]**o + ((-0.170843443534+0.467531145216j))*x[2]
            ref[(0, 2, 0, 0)]=(0.534251418505-0.956552386337j)/(o+1.)+((0.030239940871+0.272866272109j))+((0.806757134597-0.0362406534107j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.389092044012-0.596842511695j)*x[0]**o + ((-0.364456243227-0.842069331869j))*x[0] + ((0.785447242929+0.846132941667j))*x[1]**o + ((-0.877007677594+0.054979778243j))*x[1] + ((-0.871938746602+0.0876839226965j))*x[2]**o + ((0.786509606245+0.50527192443j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.0864915036733+0.933816864363j)/(o+1.)+((-0.227477157288-0.140908814598j))+((0.389092044012-0.596842511695j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.26676591066+0.592948405596j)*x[0]**o + ((-0.265276163526+0.308708591151j))*x[0] + ((0.489423962198+0.682269742995j))*x[1]**o + ((-0.565081696784-0.805459662492j))*x[1] + ((-0.340217582971-0.886841569199j))*x[2]**o + ((-0.339533000097-0.367556045907j))*x[2]
            ref[(0, 2, 0, 2)]=(0.149206379227-0.204571826204j)/(o+1.)+((-0.584945430204-0.432153558624j))+((0.26676591066+0.592948405596j))*0.5**o
            arg[(0, 2, 0, 3)]=(0.138034459166+0.567969444122j)*x[0]**o + ((-0.206487348124-0.698254089663j))*x[0] + ((0.989380797574+0.835821085303j))*x[1]**o + ((0.0177971240439-0.221265661738j))*x[1] + ((-0.55212462619+0.233869580041j))*x[2]**o + ((0.727628661337-0.0616935209126j))*x[2]
            ref[(0, 2, 0, 3)]=(0.437256171384+1.06969066534j)/(o+1.)+((0.269469218628-0.490606636157j))+((0.138034459166+0.567969444122j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.102296636263-0.236855944832j)*x[0]**o + ((0.329489104981+0.0680825758463j))*x[0] + ((0.396740412946-0.636683990613j))*x[1]**o + ((0.91550347191-0.294052134409j))*x[1] + ((0.0395529132714+0.0843274859566j))*x[2]**o + ((-0.550722315311-0.767281005516j))*x[2]
            ref[(0, 2, 1, 0)]=(0.436293326217-0.552356504657j)/(o+1.)+((0.34713513079-0.496625282039j))+((-0.102296636263-0.236855944832j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.930132150756-0.417221666517j)*x[0]**o + ((0.523475883877-0.46512586922j))*x[0] + ((-0.160377284911-0.496229428886j))*x[1]**o + ((0.646534511291+0.595197244208j))*x[1] + ((-0.803197702087-0.872427007969j))*x[2]**o + ((-0.696491260858-0.920122238185j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.963574986998-1.36865643686j)/(o+1.)+((0.236759567155-0.395025431599j))+((0.930132150756-0.417221666517j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.815030609536+0.631499053846j)*x[0]**o + ((0.40854469031+0.264915132866j))*x[0] + ((0.892819920664-0.639794819406j))*x[1]**o + ((-0.0958266244649+0.741732982214j))*x[1] + ((0.182029492197-0.316530292606j))*x[2]**o + ((-0.445353017721+0.156948576816j))*x[2]
            ref[(0, 2, 1, 2)]=(1.07484941286-0.956325112012j)/(o+1.)+((-0.0663174759377+0.581798345948j))+((0.815030609536+0.631499053846j))*0.5**o
            arg[(0, 2, 1, 3)]=(0.395900586949-0.682198724813j)*x[0]**o + ((0.928899420736-0.666739783538j))*x[0] + ((0.312650943977+0.175888872825j))*x[1]**o + ((0.582849707885+0.177708436784j))*x[1] + ((-0.328265057454-0.193699985619j))*x[2]**o + ((0.121253192522+0.450225828644j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.0156141134771-0.0178111127943j)/(o+1.)+((0.816501160572-0.0194027590552j))+((0.395900586949-0.682198724813j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.859665493965+0.750000497221j)*x[0]**o + ((0.0601645171076-0.624089872848j))*x[0] + ((0.133589513212-0.0974779298415j))*x[1]**o + ((0.25097194875-0.140107982288j))*x[1] + ((0.0498014684101-0.0883357935982j))*x[2]**o + ((-0.0115318743027-0.923062410243j))*x[2]
            ref[(0, 2, 2, 0)]=(0.183390981622-0.18581372344j)/(o+1.)+((0.149802295778-0.843630132689j))+((-0.859665493965+0.750000497221j))*0.5**o
            arg[(0, 2, 2, 1)]=(-0.644346240221-0.61481994276j)*x[0]**o + ((-0.164961269215-0.490074088736j))*x[0] + ((0.738383879579+0.0339563311841j))*x[1]**o + ((0.609275693646+0.839414095298j))*x[1] + ((-0.039076389617-0.582672285125j))*x[2]**o + ((-0.406205963943+0.434704300305j))*x[2]
            ref[(0, 2, 2, 1)]=(0.699307489962-0.548715953941j)/(o+1.)+((0.0190542302441+0.392022153433j))+((-0.644346240221-0.61481994276j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.423434927991-0.791949866776j)*x[0]**o + ((0.599410736623-0.801905636005j))*x[0] + ((0.678547054819+0.838057700321j))*x[1]**o + ((0.515296221897+0.450750167234j))*x[1] + ((0.0154896240315-0.0471644922339j))*x[2]**o + ((-0.629818831438+0.0446560547578j))*x[2]
            ref[(0, 2, 2, 2)]=(0.694036678851+0.790893208087j)/(o+1.)+((0.242444063541-0.153249707007j))+((0.423434927991-0.791949866776j))*0.5**o
            arg[(0, 2, 2, 3)]=(-0.0952834677654+0.651078756343j)*x[0]**o + ((-0.5726154595+0.0796888284908j))*x[0] + ((-0.0335118791553+0.806951711031j))*x[1]**o + ((-0.981148635596+0.216946725021j))*x[1] + ((0.243012591586-0.299723405899j))*x[2]**o + ((0.703924582996+0.852651453109j))*x[2]
            ref[(0, 2, 2, 3)]=(0.209500712431+0.507228305131j)/(o+1.)+((-0.42491975605+0.57464350331j))+((-0.0952834677654+0.651078756343j))*0.5**o
            arg[(0, 2, 3, 0)]=(-0.615120900389-0.438248865972j)*x[0]**o + ((0.157288976339+0.677661366862j))*x[0] + ((-0.520032587341-0.498307874991j))*x[1]**o + ((-0.779281699912+0.0541001232628j))*x[1] + ((-0.797344573294-0.0514992138176j))*x[2]**o + ((0.185611285195-0.542746935716j))*x[2]
            ref[(0, 2, 3, 0)]=(-1.31737716064-0.549807088808j)/(o+1.)+((-0.218190719189+0.0945072772043j))+((-0.615120900389-0.438248865972j))*0.5**o
            arg[(0, 2, 3, 1)]=(-0.0942349214796-0.875697918877j)*x[0]**o + ((-0.879103725642+0.235881104459j))*x[0] + ((0.873007220334-0.0247593204236j))*x[1]**o + ((-0.677341536121+0.0136999224119j))*x[1] + ((-0.470380169332+0.0741932484195j))*x[2]**o + ((-0.273370943787+0.697566426451j))*x[2]
            ref[(0, 2, 3, 1)]=(0.402627051002+0.0494339279959j)/(o+1.)+((-0.914908102775+0.473573726661j))+((-0.0942349214796-0.875697918877j))*0.5**o
            arg[(0, 2, 3, 2)]=(0.218428150261+0.66244227463j)*x[0]**o + ((-0.765366139929-0.747760696843j))*x[0] + ((0.403580296327+0.906711648124j))*x[1]**o + ((0.42688853967+0.43085986578j))*x[1] + ((0.556664617495+0.149604274673j))*x[2]**o + ((0.61742827531-0.127390682176j))*x[2]
            ref[(0, 2, 3, 2)]=(0.960244913822+1.0563159228j)/(o+1.)+((0.139475337525-0.222145756619j))+((0.218428150261+0.66244227463j))*0.5**o
            arg[(0, 2, 3, 3)]=(0.190212698986-0.320277737224j)*x[0]**o + ((0.931923479855+0.954529633221j))*x[0] + ((0.507722616435+0.746112666502j))*x[1]**o + ((-0.645411264853-0.568294176453j))*x[1] + ((-0.148514365474+0.458968397805j))*x[2]**o + ((-0.251303801381-0.00102547749557j))*x[2]
            ref[(0, 2, 3, 3)]=(0.359208250961+1.20508106431j)/(o+1.)+((0.0176042068109+0.192604989636j))+((0.190212698986-0.320277737224j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.627570807437+0.784905474507j)*x[0]**o + ((-0.857963957779+0.84287719561j))*x[0] + ((-0.461504875663-0.695176170161j))*x[1]**o + ((0.950125273659-0.393515868069j))*x[1] + ((-0.189210881145+0.160447303617j))*x[2]**o + ((-0.568847712682-0.939109310747j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.650715756808-0.534728866544j)/(o+1.)+((-0.238343198401-0.244873991603j))+((0.627570807437+0.784905474507j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.483435600113-0.399665677135j)*x[0]**o + ((0.101440223059-0.0757753206469j))*x[0] + ((0.806321238386-0.735039045598j))*x[1]**o + ((-0.40763609951+0.712572976658j))*x[1] + ((-0.366695526876+0.964690903842j))*x[2]**o + ((-0.952465172652-0.438244448807j))*x[2]
            ref[(1, 0, 0, 1)]=(0.43962571151+0.229651858244j)/(o+1.)+((-0.629330524551+0.0992766036021j))+((0.483435600113-0.399665677135j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.893431254569-0.150570125163j)*x[0]**o + ((0.387410958389+0.229024467137j))*x[0] + ((0.117033452125-0.241075147687j))*x[1]**o + ((-0.89539271998-0.786617977175j))*x[1] + ((0.386107175341+0.882461287047j))*x[2]**o + ((0.20751837199+0.063916850006j))*x[2]
            ref[(1, 0, 0, 2)]=(0.503140627466+0.64138613936j)/(o+1.)+((-0.150231694801-0.246838330016j))+((-0.893431254569-0.150570125163j))*0.5**o
            arg[(1, 0, 0, 3)]=(-0.983109121174-0.498649688157j)*x[0]**o + ((0.490546539196+0.370038724998j))*x[0] + ((0.744905077685-0.514697200124j))*x[1]**o + ((0.536018885552-0.607742809986j))*x[1] + ((0.0971318574722+0.921900225589j))*x[2]**o + ((-0.226509672566+0.613369901228j))*x[2]
            ref[(1, 0, 0, 3)]=(0.842036935157+0.407203025465j)/(o+1.)+((0.400027876091+0.18783290812j))+((-0.983109121174-0.498649688157j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.36884284771+0.097715554689j)*x[0]**o + ((0.128108104426+0.166995328838j))*x[0] + ((0.534047847184+0.986617868609j))*x[1]**o + ((-0.884940191994-0.843939677012j))*x[1] + ((0.0869672807549-0.647774176897j))*x[2]**o + ((-0.640376170439-0.720698547665j))*x[2]
            ref[(1, 0, 1, 0)]=(0.621015127939+0.338843691712j)/(o+1.)+((-0.698604129004-0.698821447919j))+((0.36884284771+0.097715554689j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.711135564021+0.717542833836j)*x[0]**o + ((-0.588087269297-0.477640466694j))*x[0] + ((-0.296481634276+0.346467904181j))*x[1]**o + ((0.459525793428-0.408251902031j))*x[1] + ((-0.796609490299-0.350974945645j))*x[2]**o + ((0.0939723799448-0.46142951356j))*x[2]
            ref[(1, 0, 1, 1)]=(-1.09309112458-0.00450704146477j)/(o+1.)+((-0.0172945479617-0.673660941142j))+((0.711135564021+0.717542833836j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.302059095099+0.557718405617j)*x[0]**o + ((-0.624406907694-0.0612600278448j))*x[0] + ((-0.0847695031095+0.0320764895213j))*x[1]**o + ((-0.325143703461-0.837698221112j))*x[1] + ((-0.703137420296+0.180109821105j))*x[2]**o + ((-0.90424754124+0.310451467202j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.787906923405+0.212186310626j)/(o+1.)+((-0.926899076197-0.294253390877j))+((0.302059095099+0.557718405617j))*0.5**o
            arg[(1, 0, 1, 3)]=(0.701300964918-0.746519004107j)*x[0]**o + ((-0.130608848201-0.492621223259j))*x[0] + ((-0.563830556241+0.0340451029315j))*x[1]**o + ((-0.101953238379+0.342432360829j))*x[1] + ((0.886885834388-0.89603972371j))*x[2]**o + ((-0.275949535629+0.725726859523j))*x[2]
            ref[(1, 0, 1, 3)]=(0.323055278147-0.861994620778j)/(o+1.)+((-0.254255811105+0.287768998546j))+((0.701300964918-0.746519004107j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.771800662894+0.0524133272025j)*x[0]**o + ((-0.076979695605+0.128116422171j))*x[0] + ((0.121452441437+0.246473793587j))*x[1]**o + ((0.212795606846-0.509236605671j))*x[1] + ((-0.378954401144+0.273976503498j))*x[2]**o + ((0.773318248264+0.153275254658j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.257501959707+0.520450297085j)/(o+1.)+((0.454567079753-0.113922464421j))+((-0.771800662894+0.0524133272025j))*0.5**o
            arg[(1, 0, 2, 1)]=(-0.820487142241-0.0684100019296j)*x[0]**o + ((0.492082648027-0.519245375651j))*x[0] + ((-0.860631733439-0.161096421765j))*x[1]**o + ((-0.619803223316-0.403624425741j))*x[1] + ((-0.247363403842-0.0646177318478j))*x[2]**o + ((0.445025516339+0.173354996916j))*x[2]
            ref[(1, 0, 2, 1)]=(-1.10799513728-0.225714153612j)/(o+1.)+((0.158652470525-0.374757402238j))+((-0.820487142241-0.0684100019296j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.180718104752+0.0842786193033j)*x[0]**o + ((-0.852851178833+0.465164346153j))*x[0] + ((-0.991008833923-0.308006624801j))*x[1]**o + ((-0.393681356658+0.580973267634j))*x[1] + ((0.445843815526+0.891568407212j))*x[2]**o + ((-0.463821287725-0.304545376078j))*x[2]
            ref[(1, 0, 2, 2)]=(-0.545165018397+0.583561782411j)/(o+1.)+((-0.855176911608+0.370796118854j))+((-0.180718104752+0.0842786193033j))*0.5**o
            arg[(1, 0, 2, 3)]=(-0.487073155982+0.404962868528j)*x[0]**o + ((-0.111472936411+0.50464337658j))*x[0] + ((-0.891967069205-0.607505456275j))*x[1]**o + ((0.821787214217+0.199391377017j))*x[1] + ((-0.614024329829+0.887942636261j))*x[2]**o + ((0.580108964424+0.315940372104j))*x[2]
            ref[(1, 0, 2, 3)]=(-1.50599139903+0.280437179986j)/(o+1.)+((0.645211621115+0.509987562851j))+((-0.487073155982+0.404962868528j))*0.5**o
            arg[(1, 0, 3, 0)]=(0.389160767098-0.35122311892j)*x[0]**o + ((-0.330915839542-0.573923578073j))*x[0] + ((0.779889729997+0.708814016053j))*x[1]**o + ((-0.852323360592-0.565557501346j))*x[1] + ((0.0156736353721-0.945794627337j))*x[2]**o + ((0.753797018018+0.579376225578j))*x[2]
            ref[(1, 0, 3, 0)]=(0.795563365369-0.236980611283j)/(o+1.)+((-0.214721091058-0.28005242692j))+((0.389160767098-0.35122311892j))*0.5**o
            arg[(1, 0, 3, 1)]=(-0.533704343456-0.61296888331j)*x[0]**o + ((-0.708676891995-0.92188485233j))*x[0] + ((-0.694352074191-0.411161702856j))*x[1]**o + ((0.322903554699-0.947049943232j))*x[1] + ((-0.816810200932-0.404251264274j))*x[2]**o + ((0.216217778484-0.00145425483155j))*x[2]
            ref[(1, 0, 3, 1)]=(-1.51116227512-0.81541296713j)/(o+1.)+((-0.0847777794059-0.935194525197j))+((-0.533704343456-0.61296888331j))*0.5**o
            arg[(1, 0, 3, 2)]=(0.0967385183372+0.445302205731j)*x[0]**o + ((0.152678325578-0.243703419564j))*x[0] + ((0.671045362751+0.143953919072j))*x[1]**o + ((0.643353952583-0.0742740346403j))*x[1] + ((0.420770317686-0.602531740793j))*x[2]**o + ((0.0288963039112-0.361300744668j))*x[2]
            ref[(1, 0, 3, 2)]=(1.09181568044-0.458577821721j)/(o+1.)+((0.412464291036-0.339639099436j))+((0.0967385183372+0.445302205731j))*0.5**o
            arg[(1, 0, 3, 3)]=(-0.0487716387314-0.633549447778j)*x[0]**o + ((0.251115650362+0.353716252782j))*x[0] + ((-0.068034394756-0.747894188697j))*x[1]**o + ((-0.475558602879+0.208555688134j))*x[1] + ((-0.239591822628+0.743916778538j))*x[2]**o + ((0.57579176599+0.760665290997j))*x[2]
            ref[(1, 0, 3, 3)]=(-0.307626217384-0.00397741015873j)/(o+1.)+((0.175674406736+0.661468615957j))+((-0.0487716387314-0.633549447778j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.509252264661-0.845100099216j)*x[0]**o + ((0.095442339796-0.118620881247j))*x[0] + ((-0.681644406822+0.159034451315j))*x[1]**o + ((-0.809857256965+0.0966234200403j))*x[1] + ((-0.651059591161-0.0342622772931j))*x[2]**o + ((0.282335165707+0.407584801381j))*x[2]
            ref[(1, 1, 0, 0)]=(-1.33270399798+0.124772174022j)/(o+1.)+((-0.216039875731+0.192793670087j))+((0.509252264661-0.845100099216j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.863512859067-0.627218694382j)*x[0]**o + ((0.312489080268+0.269850408397j))*x[0] + ((0.237101689477-0.315613317796j))*x[1]**o + ((-0.878824137893+0.133461532958j))*x[1] + ((-0.266571255891+0.312167797549j))*x[2]**o + ((0.740216841721+0.0486296741503j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.0294695664132-0.00344552024651j)/(o+1.)+((0.0869408920485+0.225970807752j))+((0.863512859067-0.627218694382j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.379566848237-0.628952353341j)*x[0]**o + ((-0.179690968151+0.492902472057j))*x[0] + ((0.0108542162475+0.303041334631j))*x[1]**o + ((-0.886104591716+0.653347649916j))*x[1] + ((-0.905643689758+0.427947348686j))*x[2]**o + ((-0.644633324885-0.959174194213j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.89478947351+0.730988683317j)/(o+1.)+((-0.855214442376+0.09353796388j))+((0.379566848237-0.628952353341j))*0.5**o
            arg[(1, 1, 0, 3)]=(0.810423976188-0.322232049071j)*x[0]**o + ((-0.972058464309-0.502233693233j))*x[0] + ((0.932189049926+0.907312047704j))*x[1]**o + ((-0.899988179568-0.0649711677277j))*x[1] + ((-0.950207316537+0.08425535567j))*x[2]**o + ((-0.521647876766-0.0648767893994j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.0180182666119+0.991567403374j)/(o+1.)+((-1.19684726032-0.31604082518j))+((0.810423976188-0.322232049071j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.343428405653-0.0536053049918j)*x[0]**o + ((0.810157967092+0.856598736637j))*x[0] + ((0.900497243022-0.0539021570978j))*x[1]**o + ((0.0618433700897-0.692329612578j))*x[1] + ((-0.164402867382-0.851990321973j))*x[2]**o + ((0.835918102044-0.118412547147j))*x[2]
            ref[(1, 1, 1, 0)]=(0.73609437564-0.905892479071j)/(o+1.)+((0.853959719613+0.0229282884564j))+((0.343428405653-0.0536053049918j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.994899235234+0.995384541208j)*x[0]**o + ((0.708784646312-0.144666808732j))*x[0] + ((-0.148312471494-0.848602918178j))*x[1]**o + ((-0.622587365987+0.00714151538384j))*x[1] + ((0.674671349817+0.382333244342j))*x[2]**o + ((-0.447630176252-0.520756965604j))*x[2]
            ref[(1, 1, 1, 1)]=(0.526358878323-0.466269673836j)/(o+1.)+((-0.180716447964-0.329141129476j))+((-0.994899235234+0.995384541208j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.223070966311-0.656537999725j)*x[0]**o + ((0.891125129758-0.0968921785427j))*x[0] + ((0.879525811951-0.774195537622j))*x[1]**o + ((-0.185151914259+0.825465733985j))*x[1] + ((0.16287929754+0.278863959077j))*x[2]**o + ((0.681153416477+0.96473567705j))*x[2]
            ref[(1, 1, 1, 2)]=(1.04240510949-0.495331578545j)/(o+1.)+((0.693563315988+0.846654616246j))+((-0.223070966311-0.656537999725j))*0.5**o
            arg[(1, 1, 1, 3)]=(0.99487300638+0.551769611648j)*x[0]**o + ((-0.730768210023+0.866167873385j))*x[0] + ((0.728723787041-0.229157209474j))*x[1]**o + ((0.884719876525+0.541695957942j))*x[1] + ((0.618738398332+0.713760052967j))*x[2]**o + ((0.848802166537+0.737792007774j))*x[2]
            ref[(1, 1, 1, 3)]=(1.34746218537+0.484602843493j)/(o+1.)+((0.501376916519+1.07282791955j))+((0.99487300638+0.551769611648j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.104976077989+0.762034669838j)*x[0]**o + ((-0.584888924148-0.189473894607j))*x[0] + ((-0.149095109115-0.850819690034j))*x[1]**o + ((-0.0767313209846-0.623240532653j))*x[1] + ((0.359419800999-0.257126059457j))*x[2]**o + ((0.195976366344-0.0956843750575j))*x[2]
            ref[(1, 1, 2, 0)]=(0.210324691885-1.10794574949j)/(o+1.)+((-0.232821939394-0.454199401159j))+((0.104976077989+0.762034669838j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.415314410696+0.00867758763618j)*x[0]**o + ((0.16955615801-0.0345067262949j))*x[0] + ((0.133219520424-0.515387499927j))*x[1]**o + ((0.703251059266+0.101351493011j))*x[1] + ((0.150336312877+0.901524497607j))*x[2]**o + ((0.368800727005+0.598490779201j))*x[2]
            ref[(1, 1, 2, 1)]=(0.283555833301+0.38613699768j)/(o+1.)+((0.620803972141+0.332667772958j))+((0.415314410696+0.00867758763618j))*0.5**o
            arg[(1, 1, 2, 2)]=(-0.157879425355+0.652473819495j)*x[0]**o + ((0.474164960489+0.37178495888j))*x[0] + ((-0.657423631176-0.655134024771j))*x[1]**o + ((-0.942141782909+0.819746212702j))*x[1] + ((0.194069887908-0.728793510411j))*x[2]**o + ((-0.589974382044-0.463964113871j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.463353743268-1.38392753518j)/(o+1.)+((-0.528975602232+0.363783528855j))+((-0.157879425355+0.652473819495j))*0.5**o
            arg[(1, 1, 2, 3)]=(0.24417235294+0.228549272746j)*x[0]**o + ((0.819654551187+0.212951909316j))*x[0] + ((0.957805753452-0.206131157347j))*x[1]**o + ((-0.749266669292-0.647192449335j))*x[1] + ((-0.352915963097-0.78447228161j))*x[2]**o + ((0.543435621336-0.883496570613j))*x[2]
            ref[(1, 1, 2, 3)]=(0.604889790354-0.990603438958j)/(o+1.)+((0.306911751615-0.658868555315j))+((0.24417235294+0.228549272746j))*0.5**o
            arg[(1, 1, 3, 0)]=(0.673275571342+0.0695353104298j)*x[0]**o + ((-2.97547205401e-05-0.949067788466j))*x[0] + ((0.801805030824-0.726925952454j))*x[1]**o + ((-0.172446695517+0.415702095298j))*x[1] + ((-0.858814220897+0.973931270915j))*x[2]**o + ((-0.962089493347+0.353712776755j))*x[2]
            ref[(1, 1, 3, 0)]=(-0.0570091900733+0.247005318461j)/(o+1.)+((-0.567282971792-0.0898264582064j))+((0.673275571342+0.0695353104298j))*0.5**o
            arg[(1, 1, 3, 1)]=(0.57558828177+0.825464310744j)*x[0]**o + ((0.0153235740674-0.552776621386j))*x[0] + ((-0.619048560316-0.679648004653j))*x[1]**o + ((-0.721424860028+0.0593932654965j))*x[1] + ((-0.983235292835-0.739731102308j))*x[2]**o + ((-0.847592226586+0.629703343969j))*x[2]
            ref[(1, 1, 3, 1)]=(-1.60228385315-1.41937910696j)/(o+1.)+((-0.776846756273+0.0681599940395j))+((0.57558828177+0.825464310744j))*0.5**o
            arg[(1, 1, 3, 2)]=(-0.305258922505-0.127969947087j)*x[0]**o + ((-0.302803149024+0.91450221816j))*x[0] + ((0.612447770835-0.00657382478334j))*x[1]**o + ((0.892111613701-0.653751590175j))*x[1] + ((0.267178418819+0.0268444667743j))*x[2]**o + ((-0.249359327606+0.316625732472j))*x[2]
            ref[(1, 1, 3, 2)]=(0.879626189654+0.0202706419909j)/(o+1.)+((0.169974568536+0.288688180229j))+((-0.305258922505-0.127969947087j))*0.5**o
            arg[(1, 1, 3, 3)]=(0.846734602299-0.931845018952j)*x[0]**o + ((0.01067725616+0.563942479044j))*x[0] + ((0.470624364573+0.474546279213j))*x[1]**o + ((-0.0690762314649+0.168867067265j))*x[1] + ((-0.0478656634772-0.0115894913866j))*x[2]**o + ((-0.0868659692007+0.828329768369j))*x[2]
            ref[(1, 1, 3, 3)]=(0.422758701096+0.462956787827j)/(o+1.)+((-0.0726324722528+0.780569657339j))+((0.846734602299-0.931845018952j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.60488717424+0.175899580852j)*x[0]**o + ((0.838368808967+0.736311052971j))*x[0] + ((0.794150390208-0.210548756448j))*x[1]**o + ((0.738268145757+0.00132772410895j))*x[1] + ((0.124343921673+0.0346544000738j))*x[2]**o + ((-0.940075555394+0.127859158686j))*x[2]
            ref[(1, 2, 0, 0)]=(0.918494311881-0.175894356374j)/(o+1.)+((0.318280699665+0.432748967883j))+((-0.60488717424+0.175899580852j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.0728202076997-0.691148170455j)*x[0]**o + ((0.768837817799+0.555277872189j))*x[0] + ((0.888949558252-0.0961968262294j))*x[1]**o + ((-0.0961381641926-0.235676506312j))*x[1] + ((0.898500600765+0.746213792309j))*x[2]**o + ((-0.175841901376-0.457285705607j))*x[2]
            ref[(1, 2, 0, 1)]=(1.78745015902+0.650016966079j)/(o+1.)+((0.248428876115-0.0688421698646j))+((-0.0728202076997-0.691148170455j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.130476367393-0.826245772512j)*x[0]**o + ((0.371558371985-0.42933791287j))*x[0] + ((-0.769957826897+0.649356064796j))*x[1]**o + ((0.161983812077-0.0407327597067j))*x[1] + ((0.550937725325-0.496621990913j))*x[2]**o + ((-0.362021254201+0.700940635418j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.219020101571+0.152734073883j)/(o+1.)+((0.0857604649305+0.115434981421j))+((0.130476367393-0.826245772512j))*0.5**o
            arg[(1, 2, 0, 3)]=(0.397500909154+0.650754650228j)*x[0]**o + ((-0.193394771547-0.65409712014j))*x[0] + ((0.0211452072428+0.536424006095j))*x[1]**o + ((0.597098263026+0.878454121659j))*x[1] + ((-0.285381381339-0.787659603988j))*x[2]**o + ((0.390313839168+0.801184199836j))*x[2]
            ref[(1, 2, 0, 3)]=(-0.264236174096-0.251235597893j)/(o+1.)+((0.397008665323+0.512770600678j))+((0.397500909154+0.650754650228j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.562461161648-0.710891340361j)*x[0]**o + ((-0.697888128494-0.226743296846j))*x[0] + ((-0.873075302833-0.432850402873j))*x[1]**o + ((0.113055717069-0.0849912061022j))*x[1] + ((-0.0773602815189+0.146198203534j))*x[2]**o + ((-0.0297130453155-0.30407260647j))*x[2]
            ref[(1, 2, 1, 0)]=(-0.950435584352-0.286652199339j)/(o+1.)+((-0.30727272837-0.307903554709j))+((-0.562461161648-0.710891340361j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.179526771972+0.767085498958j)*x[0]**o + ((-0.564113958472+0.438752360778j))*x[0] + ((-0.768533415353+0.769856767094j))*x[1]**o + ((-0.945121891136-0.802748249754j))*x[1] + ((0.456649721657-0.0280251890608j))*x[2]**o + ((-0.638583274743+0.417349167418j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.311883693696+0.741831578033j)/(o+1.)+((-1.07390956218+0.0266766392207j))+((-0.179526771972+0.767085498958j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.557976646748+0.391492944538j)*x[0]**o + ((0.708139015284+0.436811507481j))*x[0] + ((-0.433089298874+0.811920526172j))*x[1]**o + ((-0.378091676387-0.693727971836j))*x[1] + ((0.844231789849-0.249820231905j))*x[2]**o + ((-0.176608240844-0.902548938355j))*x[2]
            ref[(1, 2, 1, 2)]=(0.411142490975+0.562100294267j)/(o+1.)+((0.0767195490268-0.579732701355j))+((-0.557976646748+0.391492944538j))*0.5**o
            arg[(1, 2, 1, 3)]=(0.854508415845-0.458882238846j)*x[0]**o + ((0.25021045885-0.5243754691j))*x[0] + ((0.2093677753+0.325111339348j))*x[1]**o + ((0.562423447454+0.173752073447j))*x[1] + ((0.525362754842+0.990019826703j))*x[2]**o + ((-0.279539419132+0.50662017073j))*x[2]
            ref[(1, 2, 1, 3)]=(0.734730530142+1.31513116605j)/(o+1.)+((0.266547243585+0.0779983875388j))+((0.854508415845-0.458882238846j))*0.5**o
            arg[(1, 2, 2, 0)]=(0.734128682434+0.500581485019j)*x[0]**o + ((-0.857263040235-0.182883208355j))*x[0] + ((0.823625254656-0.295791530242j))*x[1]**o + ((-0.818894935718+0.724744414349j))*x[1] + ((-0.805215361823-0.594703804279j))*x[2]**o + ((-0.189286311951-0.607373271501j))*x[2]
            ref[(1, 2, 2, 0)]=(0.0184098928327-0.890495334521j)/(o+1.)+((-0.932722143952-0.0327560327538j))+((0.734128682434+0.500581485019j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.415204831201-0.429534118547j)*x[0]**o + ((-0.518121115518-0.00304140636408j))*x[0] + ((-0.330382068274+0.625533357107j))*x[1]**o + ((-0.171815438288+0.87861912719j))*x[1] + ((-0.609458935435-0.488953137026j))*x[2]**o + ((-0.226301099651-0.738664615706j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.939841003709+0.136580220081j)/(o+1.)+((-0.458118826728+0.0684565525601j))+((-0.415204831201-0.429534118547j))*0.5**o
            arg[(1, 2, 2, 2)]=(-0.552217643772+0.0159228937661j)*x[0]**o + ((0.466216699519-0.0924664359703j))*x[0] + ((0.650970904075-0.94290551108j))*x[1]**o + ((-0.210954458622+0.632087389073j))*x[1] + ((0.97655608247-0.631597152463j))*x[2]**o + ((0.266313419829+0.794071705754j))*x[2]
            ref[(1, 2, 2, 2)]=(1.62752698654-1.57450266354j)/(o+1.)+((0.260787830363+0.666846329428j))+((-0.552217643772+0.0159228937661j))*0.5**o
            arg[(1, 2, 2, 3)]=(0.669882481945-0.0474375671186j)*x[0]**o + ((0.544164149334-0.598592594359j))*x[0] + ((-0.198532662918+0.349531318794j))*x[1]**o + ((-0.288696721156-0.509533444126j))*x[1] + ((-0.460997185405+0.912324120054j))*x[2]**o + ((-0.754699868811+0.0424120746626j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.659529848323+1.26185543885j)/(o+1.)+((-0.249616220317-0.532856981911j))+((0.669882481945-0.0474375671186j))*0.5**o
            arg[(1, 2, 3, 0)]=(0.524773932404+0.60645423663j)*x[0]**o + ((-0.315613541681-0.891031182819j))*x[0] + ((0.682945716835+0.162256188674j))*x[1]**o + ((-0.437171252081+0.552666687689j))*x[1] + ((0.839101174194+0.498094422119j))*x[2]**o + ((-0.000430180782754-0.727482273611j))*x[2]
            ref[(1, 2, 3, 0)]=(1.52204689103+0.660350610794j)/(o+1.)+((-0.376607487272-0.53292338437j))+((0.524773932404+0.60645423663j))*0.5**o
            arg[(1, 2, 3, 1)]=(0.611434065641+0.58712917059j)*x[0]**o + ((-0.999859919645-0.7273245774j))*x[0] + ((0.0512956417912+0.938459980841j))*x[1]**o + ((-0.724259299261-0.86655175955j))*x[1] + ((-0.366042078859+0.561175985442j))*x[2]**o + ((-0.56096310821+0.333896520868j))*x[2]
            ref[(1, 2, 3, 1)]=(-0.314746437068+1.49963596628j)/(o+1.)+((-1.14254116356-0.629989908041j))+((0.611434065641+0.58712917059j))*0.5**o
            arg[(1, 2, 3, 2)]=(0.844918260251+0.465186395974j)*x[0]**o + ((-0.13643788005-0.855020446064j))*x[0] + ((-0.0576936732915+0.091954814921j))*x[1]**o + ((-0.842343123396+0.274242558159j))*x[1] + ((0.904852487977+0.645350171207j))*x[2]**o + ((-0.393141928092-0.671563610822j))*x[2]
            ref[(1, 2, 3, 2)]=(0.847158814686+0.737304986128j)/(o+1.)+((-0.685961465769-0.626170749364j))+((0.844918260251+0.465186395974j))*0.5**o
            arg[(1, 2, 3, 3)]=(-0.880482159817+0.450242541363j)*x[0]**o + ((0.0816371876302+0.385725052527j))*x[0] + ((0.905353601535+0.611658806332j))*x[1]**o + ((0.280878018804+0.508738018534j))*x[1] + ((0.686240357796-0.934264892749j))*x[2]**o + ((-0.237001751849+0.79300266452j))*x[2]
            ref[(1, 2, 3, 3)]=(1.59159395933-0.322606086417j)/(o+1.)+((0.0627567272926+0.843732867791j))+((-0.880482159817+0.450242541363j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.0605121180882-0.644359111457j)*x[0]**o + ((0.915262511867-0.403306646683j))*x[0] + ((-0.602796564181-0.171948536375j))*x[1]**o + ((-0.763368985373-0.972473456741j))*x[1] + ((-0.557993320719-0.399762416226j))*x[2]**o + ((0.388057110473-0.0780852925985j))*x[2]
            ref[(2, 0, 0, 0)]=(-1.1607898849-0.571710952601j)/(o+1.)+((0.269975318484-0.726932698011j))+((0.0605121180882-0.644359111457j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.199809121956+0.402769429658j)*x[0]**o + ((-0.817008737012-0.00593103218354j))*x[0] + ((0.225176733423-0.913279069246j))*x[1]**o + ((-0.885942334184-0.470993505303j))*x[1] + ((0.915136537765+0.192828329424j))*x[2]**o + ((0.596919990651+0.733401113273j))*x[2]
            ref[(2, 0, 0, 1)]=(1.14031327119-0.720450739821j)/(o+1.)+((-0.553015540273+0.128238287893j))+((0.199809121956+0.402769429658j))*0.5**o
            arg[(2, 0, 0, 2)]=(0.0729830935667+0.162003576822j)*x[0]**o + ((-0.759117295125-0.586357765682j))*x[0] + ((0.973876458692+0.746152189795j))*x[1]**o + ((-0.0642766459102-0.520678923007j))*x[1] + ((0.835300411606-0.172182482729j))*x[2]**o + ((0.172157912597-0.32553886499j))*x[2]
            ref[(2, 0, 0, 2)]=(1.8091768703+0.573969707065j)/(o+1.)+((-0.325618014219-0.71628777684j))+((0.0729830935667+0.162003576822j))*0.5**o
            arg[(2, 0, 0, 3)]=(0.719533931107+0.667471421499j)*x[0]**o + ((0.989620519481+0.33490750999j))*x[0] + ((0.777449232624+0.619378413045j))*x[1]**o + ((-0.421823523923-0.610917059877j))*x[1] + ((-0.851792831448-0.00122597364249j))*x[2]**o + ((0.162329212641-0.307621713026j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.0743435988243+0.618152439402j)/(o+1.)+((0.365063104099-0.291815631457j))+((0.719533931107+0.667471421499j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.888539353294+0.310951655153j)*x[0]**o + ((0.570970284809+0.962473256165j))*x[0] + ((0.456230077908+0.385878791605j))*x[1]**o + ((0.136420846401-0.212081499408j))*x[1] + ((0.432170503372+0.158144977007j))*x[2]**o + ((0.793627044239+0.366161505794j))*x[2]
            ref[(2, 0, 1, 0)]=(0.88840058128+0.544023768612j)/(o+1.)+((0.750509087725+0.558276631275j))+((-0.888539353294+0.310951655153j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.340304567646+0.155108699662j)*x[0]**o + ((-0.0208859857162+0.951328210606j))*x[0] + ((0.538509306592-0.686356796077j))*x[1]**o + ((0.524109004126-0.198119197423j))*x[1] + ((0.115681628928+0.666484034658j))*x[2]**o + ((-0.895618405104-0.755052173908j))*x[2]
            ref[(2, 0, 1, 1)]=(0.654190935521-0.0198727614197j)/(o+1.)+((-0.196197693347-0.00092158036287j))+((-0.340304567646+0.155108699662j))*0.5**o
            arg[(2, 0, 1, 2)]=(-0.910084513022+0.00913521969035j)*x[0]**o + ((-0.763621034082-0.0880386838307j))*x[0] + ((-0.854615976132-0.924790017443j))*x[1]**o + ((-0.132400386313-0.14317491268j))*x[1] + ((0.0361877442618+0.511358459581j))*x[2]**o + ((0.329677786826-0.225715252344j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.81842823187-0.413431557862j)/(o+1.)+((-0.283171816785-0.228464424428j))+((-0.910084513022+0.00913521969035j))*0.5**o
            arg[(2, 0, 1, 3)]=(-0.21377995843+0.0134572562003j)*x[0]**o + ((-0.0569902718843-0.187535416095j))*x[0] + ((0.663693160585+0.0225321278365j))*x[1]**o + ((0.133900924079-0.904954071675j))*x[1] + ((0.287190410792+0.357852413387j))*x[2]**o + ((0.33165535719+0.973350246726j))*x[2]
            ref[(2, 0, 1, 3)]=(0.950883571377+0.380384541224j)/(o+1.)+((0.204283004692-0.0595696205224j))+((-0.21377995843+0.0134572562003j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.244787606128+0.192974046322j)*x[0]**o + ((0.541819695056-0.730709638111j))*x[0] + ((0.244230505672+0.89951538598j))*x[1]**o + ((-0.179986632566+0.0459151942732j))*x[1] + ((-0.860991731776+0.640892536602j))*x[2]**o + ((0.107611563413-0.146540475497j))*x[2]
            ref[(2, 0, 2, 0)]=(-0.616761226104+1.54040792258j)/(o+1.)+((0.234722312951-0.415667459668j))+((-0.244787606128+0.192974046322j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.624051455247+0.499640528436j)*x[0]**o + ((-0.383943669795+0.493037803064j))*x[0] + ((0.797501961005-0.292608934261j))*x[1]**o + ((0.687549402235+0.780796667539j))*x[1] + ((0.652748845753-0.581062744049j))*x[2]**o + ((-0.402520954724+0.144558888134j))*x[2]
            ref[(2, 0, 2, 1)]=(1.45025080676-0.873671678309j)/(o+1.)+((-0.0494576111421+0.709196679368j))+((-0.624051455247+0.499640528436j))*0.5**o
            arg[(2, 0, 2, 2)]=(0.13122323519+0.249363967342j)*x[0]**o + ((-0.169335254942+0.378036765429j))*x[0] + ((0.377394732257-0.291535986546j))*x[1]**o + ((0.996179867336+0.316923561987j))*x[1] + ((-0.793273940907-0.138748448869j))*x[2]**o + ((-0.666056385362+0.0111299876086j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.41587920865-0.430284435415j)/(o+1.)+((0.0803941135162+0.353045157513j))+((0.13122323519+0.249363967342j))*0.5**o
            arg[(2, 0, 2, 3)]=(-0.417010248901-0.00944679190362j)*x[0]**o + ((-0.420006799117-0.772540547805j))*x[0] + ((0.74246507146-0.1885555564j))*x[1]**o + ((0.527644577108-0.0720236955734j))*x[1] + ((0.775664555818+0.700734750154j))*x[2]**o + ((-0.053911311109-0.940920420834j))*x[2]
            ref[(2, 0, 2, 3)]=(1.51812962728+0.512179193754j)/(o+1.)+((0.026863233441-0.892742332107j))+((-0.417010248901-0.00944679190362j))*0.5**o
            arg[(2, 0, 3, 0)]=(-0.885711476073-0.369086035243j)*x[0]**o + ((0.598408085223-0.779092228796j))*x[0] + ((0.535145443191-0.254407267546j))*x[1]**o + ((0.762978261211-0.835352539656j))*x[1] + ((-0.0545624414698+0.369567552711j))*x[2]**o + ((0.387471314278-0.854296030892j))*x[2]
            ref[(2, 0, 3, 0)]=(0.480583001721+0.115160285164j)/(o+1.)+((0.874428830356-1.23437039967j))+((-0.885711476073-0.369086035243j))*0.5**o
            arg[(2, 0, 3, 1)]=(-0.118349208667+0.517702737092j)*x[0]**o + ((0.295768045857-0.991386142185j))*x[0] + ((-0.431487504621-0.24015864047j))*x[1]**o + ((-0.131001355014-0.247485276521j))*x[1] + ((0.0264996331037+0.918280629796j))*x[2]**o + ((0.611934878623-0.191936785334j))*x[2]
            ref[(2, 0, 3, 1)]=(-0.404987871517+0.678121989326j)/(o+1.)+((0.388350784733-0.71540410202j))+((-0.118349208667+0.517702737092j))*0.5**o
            arg[(2, 0, 3, 2)]=(0.544755365869-0.993728895728j)*x[0]**o + ((-0.4562913435+0.447689747652j))*x[0] + ((-0.310871333948-0.671621017623j))*x[1]**o + ((0.749507993678+0.748906404861j))*x[1] + ((-0.624267507095-0.127494151397j))*x[2]**o + ((-0.550793811464-0.433765431469j))*x[2]
            ref[(2, 0, 3, 2)]=(-0.935138841043-0.79911516902j)/(o+1.)+((-0.128788580643+0.381415360522j))+((0.544755365869-0.993728895728j))*0.5**o
            arg[(2, 0, 3, 3)]=(0.615941916987+0.594705930117j)*x[0]**o + ((0.204866840751-0.305886630978j))*x[0] + ((0.751612343853-0.225353864553j))*x[1]**o + ((0.98968336073+0.318932527398j))*x[1] + ((0.463573306353+0.718568654389j))*x[2]**o + ((0.633326012326-0.895797704686j))*x[2]
            ref[(2, 0, 3, 3)]=(1.21518565021+0.493214789836j)/(o+1.)+((0.913938106904-0.441375904133j))+((0.615941916987+0.594705930117j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.20807837045-0.933061559454j)*x[0]**o + ((-0.347085685086-0.942070919906j))*x[0] + ((0.944175020823+0.447000274969j))*x[1]**o + ((-0.0352816311722-0.869759581667j))*x[1] + ((-0.452309123555-0.849751290626j))*x[2]**o + ((-0.839836474206+0.752127787688j))*x[2]
            ref[(2, 1, 0, 0)]=(0.491865897268-0.402751015657j)/(o+1.)+((-0.611101895232-0.529851356942j))+((-0.20807837045-0.933061559454j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.29909198561+0.671098924686j)*x[0]**o + ((-0.880324503072-0.275154539483j))*x[0] + ((-0.190603108206+0.40911900226j))*x[1]**o + ((-0.405867100814+0.781982493159j))*x[1] + ((-0.360613107641-0.898175742693j))*x[2]**o + ((0.495033467698+0.229592473981j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.551216215847-0.489056740433j)/(o+1.)+((-0.395579068094+0.368210213828j))+((-0.29909198561+0.671098924686j))*0.5**o
            arg[(2, 1, 0, 2)]=(0.504902870459+0.909620506448j)*x[0]**o + ((0.427190534703+0.294413898011j))*x[0] + ((-0.449562697915+0.120487113366j))*x[1]**o + ((0.371836772925-0.883891647318j))*x[1] + ((0.75392693989+0.426853668456j))*x[2]**o + ((0.213528976733+0.40048860489j))*x[2]
            ref[(2, 1, 0, 2)]=(0.304364241975+0.547340781822j)/(o+1.)+((0.50627814218-0.0944945722088j))+((0.504902870459+0.909620506448j))*0.5**o
            arg[(2, 1, 0, 3)]=(-0.576764272914+0.216840364943j)*x[0]**o + ((0.81085097812-0.381080828186j))*x[0] + ((-0.505429523703-0.0591777138242j))*x[1]**o + ((0.392616217038+0.118630358692j))*x[1] + ((0.131229328851+0.610168009659j))*x[2]**o + ((-0.922386008633+0.164264350281j))*x[2]
            ref[(2, 1, 0, 3)]=(-0.374200194852+0.550990295835j)/(o+1.)+((0.140540593262-0.0490930596068j))+((-0.576764272914+0.216840364943j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.809718485947-0.224263793412j)*x[0]**o + ((-0.259285079334-0.417944405719j))*x[0] + ((-0.100146568185-0.512183846668j))*x[1]**o + ((-0.526307256209+0.0416381188933j))*x[1] + ((-0.155420165087+0.669011228537j))*x[2]**o + ((-0.0434085087284+0.530086583624j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.255566733272+0.156827381869j)/(o+1.)+((-0.414500422136+0.0768901483991j))+((0.809718485947-0.224263793412j))*0.5**o
            arg[(2, 1, 1, 1)]=(0.159286822584+0.290869136817j)*x[0]**o + ((0.831773531215-0.0561821156356j))*x[0] + ((-0.655137453674+0.463798736421j))*x[1]**o + ((-0.49084570094-0.781858683306j))*x[1] + ((0.437357548027-0.941987213753j))*x[2]**o + ((0.480744663027+0.733666097752j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.217779905647-0.478188477332j)/(o+1.)+((0.410836246651-0.0521873505949j))+((0.159286822584+0.290869136817j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.771253591164+0.0481800625955j)*x[0]**o + ((0.688832000736+0.200691827779j))*x[0] + ((0.918147530792+0.749490448072j))*x[1]**o + ((0.734037376176+0.847127471516j))*x[1] + ((0.387565964673-0.896271662252j))*x[2]**o + ((0.0618854005869+0.770899181488j))*x[2]
            ref[(2, 1, 1, 2)]=(1.30571349547-0.146781214179j)/(o+1.)+((0.742377388749+0.909359240392j))+((0.771253591164+0.0481800625955j))*0.5**o
            arg[(2, 1, 1, 3)]=(-0.388176569819+0.911183430292j)*x[0]**o + ((0.390621956124-0.901619873762j))*x[0] + ((0.218951156902-0.81145476075j))*x[1]**o + ((-0.336577114322+0.959095546392j))*x[1] + ((0.297767222911-0.182117985926j))*x[2]**o + ((-0.477743413651+0.185571433052j))*x[2]
            ref[(2, 1, 1, 3)]=(0.516718379813-0.993572746677j)/(o+1.)+((-0.211849285925+0.121523552842j))+((-0.388176569819+0.911183430292j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.824990500845-0.577527254709j)*x[0]**o + ((-0.106295301125+0.272975309326j))*x[0] + ((0.51984913479+0.216301235063j))*x[1]**o + ((0.881576701547-0.492975026946j))*x[1] + ((0.198963265148+0.630487056158j))*x[2]**o + ((0.121533638424+0.290617934541j))*x[2]
            ref[(2, 1, 2, 0)]=(0.718812399938+0.846788291221j)/(o+1.)+((0.448407519423+0.0353091084607j))+((-0.824990500845-0.577527254709j))*0.5**o
            arg[(2, 1, 2, 1)]=(0.608427540148-0.203333430363j)*x[0]**o + ((-0.0747423841077+0.377251056481j))*x[0] + ((0.386693319979+0.441067005189j))*x[1]**o + ((0.509317755985-0.0479502716917j))*x[1] + ((0.337789868442-0.322987772293j))*x[2]**o + ((0.74989623352-0.578335155811j))*x[2]
            ref[(2, 1, 2, 1)]=(0.724483188421+0.118079232896j)/(o+1.)+((0.592235802699-0.124517185511j))+((0.608427540148-0.203333430363j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.0699321798961-0.762531581915j)*x[0]**o + ((-0.889820155417+0.862051001944j))*x[0] + ((0.298126322413-0.199540314111j))*x[1]**o + ((0.151563953892-0.442120324929j))*x[1] + ((0.412245356041-0.34470148675j))*x[2]**o + ((-0.343189644719-0.0347005039189j))*x[2]
            ref[(2, 1, 2, 2)]=(0.710371678454-0.54424180086j)/(o+1.)+((-0.540722923122+0.192615086548j))+((0.0699321798961-0.762531581915j))*0.5**o
            arg[(2, 1, 2, 3)]=(0.31333501366+0.828111598001j)*x[0]**o + ((0.517671922536-0.739403156852j))*x[0] + ((0.0426675670226-0.689749204474j))*x[1]**o + ((0.0422217124619-0.882021338777j))*x[1] + ((-0.818927194266-0.375269833308j))*x[2]**o + ((0.190313490022-0.338008331884j))*x[2]
            ref[(2, 1, 2, 3)]=(-0.776259627243-1.06501903778j)/(o+1.)+((0.37510356251-0.979716413757j))+((0.31333501366+0.828111598001j))*0.5**o
            arg[(2, 1, 3, 0)]=(0.673626023977-0.565521622841j)*x[0]**o + ((-0.832374732861-0.577837602418j))*x[0] + ((0.535086772668+0.810880847132j))*x[1]**o + ((-0.107249598422+0.7295170697j))*x[1] + ((0.523195094284-0.886983159584j))*x[2]**o + ((0.99723126773+0.365261849127j))*x[2]
            ref[(2, 1, 3, 0)]=(1.05828186695-0.0761023124518j)/(o+1.)+((0.0288034682233+0.258470658204j))+((0.673626023977-0.565521622841j))*0.5**o
            arg[(2, 1, 3, 1)]=(-0.623226368687-0.857231983946j)*x[0]**o + ((0.0259959678609-0.637907156204j))*x[0] + ((-0.777547775456+0.0854069871481j))*x[1]**o + ((-0.016722268809+0.33095842316j))*x[1] + ((0.628677566148-0.803540379369j))*x[2]**o + ((0.225369643151-0.534168869198j))*x[2]
            ref[(2, 1, 3, 1)]=(-0.148870209308-0.718133392221j)/(o+1.)+((0.117321671101-0.420558801121j))+((-0.623226368687-0.857231983946j))*0.5**o
            arg[(2, 1, 3, 2)]=(-0.774277298325-0.0329299874994j)*x[0]**o + ((-0.645131877944+0.247984137916j))*x[0] + ((-0.0489631121592-0.248874896782j))*x[1]**o + ((-0.852556799102+0.491819357563j))*x[1] + ((-0.824234219616-0.710342034938j))*x[2]**o + ((-0.684896319391+0.271223872142j))*x[2]
            ref[(2, 1, 3, 2)]=(-0.873197331775-0.95921693172j)/(o+1.)+((-1.09129249822+0.50551368381j))+((-0.774277298325-0.0329299874994j))*0.5**o
            arg[(2, 1, 3, 3)]=(0.127430179421-0.937950067672j)*x[0]**o + ((0.00261875990373+0.328849362327j))*x[0] + ((-0.317913922345+0.10283109851j))*x[1]**o + ((0.743947309074-0.120219993873j))*x[1] + ((-0.911924515006+0.0379909331784j))*x[2]**o + ((0.0618735321569+0.504744260208j))*x[2]
            ref[(2, 1, 3, 3)]=(-1.22983843735+0.140822031689j)/(o+1.)+((0.404219800567+0.356686814331j))+((0.127430179421-0.937950067672j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.436995908937+0.55576927072j)*x[0]**o + ((-0.555430268714+0.821945347626j))*x[0] + ((-0.869615615594-0.598036265405j))*x[1]**o + ((0.598347620056+0.924919608015j))*x[1] + ((-0.447534196379+0.282446015508j))*x[2]**o + ((-0.892119124509-0.894230606446j))*x[2]
            ref[(2, 2, 0, 0)]=(-1.31714981197-0.315590249897j)/(o+1.)+((-0.424600886584+0.426317174598j))+((-0.436995908937+0.55576927072j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.924366244363-0.386323716255j)*x[0]**o + ((-0.234360665071+0.0706848718359j))*x[0] + ((-0.631955401253-0.813414624307j))*x[1]**o + ((-0.696125476501+0.635435609875j))*x[1] + ((-0.131979272358-0.611258239148j))*x[2]**o + ((-0.5610040566+0.82806890866j))*x[2]
            ref[(2, 2, 0, 1)]=(-0.763934673612-1.42467286346j)/(o+1.)+((-0.745745099086+0.767094695186j))+((0.924366244363-0.386323716255j))*0.5**o
            arg[(2, 2, 0, 2)]=(0.894218293518+0.88315351712j)*x[0]**o + ((-0.276863646986+0.397320155143j))*x[0] + ((0.722101176138+0.837776214624j))*x[1]**o + ((0.42247420151-0.973974244263j))*x[1] + ((0.1465118729+0.746602119095j))*x[2]**o + ((0.0534590449786+0.752303235001j))*x[2]
            ref[(2, 2, 0, 2)]=(0.868613049038+1.58437833372j)/(o+1.)+((0.0995347997514+0.0878245729404j))+((0.894218293518+0.88315351712j))*0.5**o
            arg[(2, 2, 0, 3)]=(0.89648635899-0.559149050384j)*x[0]**o + ((0.168228198678-0.618301045122j))*x[0] + ((0.0989203441413-0.273090714326j))*x[1]**o + ((-0.887726776392-0.111256288632j))*x[1] + ((-0.0136757663283-0.755553106689j))*x[2]**o + ((-0.217264351522+0.798560128951j))*x[2]
            ref[(2, 2, 0, 3)]=(0.0852445778131-1.02864382101j)/(o+1.)+((-0.468381464618+0.0345013975984j))+((0.89648635899-0.559149050384j))*0.5**o
            arg[(2, 2, 1, 0)]=(-0.708721316546+0.583133255448j)*x[0]**o + ((0.690752898427-0.872833982372j))*x[0] + ((-0.444953512146+0.233613871072j))*x[1]**o + ((-0.152875540749+0.701551872033j))*x[1] + ((0.458476234874-0.166135530357j))*x[2]**o + ((-0.974058633556-0.0565434454472j))*x[2]
            ref[(2, 2, 1, 0)]=(0.0135227227288+0.0674783407158j)/(o+1.)+((-0.218090637939-0.113912777893j))+((-0.708721316546+0.583133255448j))*0.5**o
            arg[(2, 2, 1, 1)]=(0.800735165871+0.992598956362j)*x[0]**o + ((-0.580644142804+0.149676938478j))*x[0] + ((-0.066038672216+0.126797233221j))*x[1]**o + ((0.405076367328+0.735595356452j))*x[1] + ((0.1098644838+0.50265383055j))*x[2]**o + ((0.730278300633-0.160259775143j))*x[2]
            ref[(2, 2, 1, 1)]=(0.043825811584+0.62945106377j)/(o+1.)+((0.277355262578+0.362506259893j))+((0.800735165871+0.992598956362j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.620547854308-0.0231753307465j)*x[0]**o + ((-0.829835834505-0.535122949812j))*x[0] + ((-0.598654749868-0.173152877248j))*x[1]**o + ((-0.323946843196-0.743829974141j))*x[1] + ((-0.839798935937-0.669890222286j))*x[2]**o + ((0.33950999563-0.3813874785j))*x[2]
            ref[(2, 2, 1, 2)]=(-1.43845368581-0.843043099534j)/(o+1.)+((-0.407136341036-0.830170201226j))+((-0.620547854308-0.0231753307465j))*0.5**o
            arg[(2, 2, 1, 3)]=(0.507202597933+0.0579823590335j)*x[0]**o + ((0.0858101331506+0.165419159j))*x[0] + ((-0.650614896454+0.397108802437j))*x[1]**o + ((-0.974174423393-0.306082782948j))*x[1] + ((0.12291253291-0.49045628775j))*x[2]**o + ((-0.818182340856-0.307320809967j))*x[2]
            ref[(2, 2, 1, 3)]=(-0.527702363544-0.0933474853131j)/(o+1.)+((-0.853273315549-0.223992216958j))+((0.507202597933+0.0579823590335j))*0.5**o
            arg[(2, 2, 2, 0)]=(0.978351152684-0.209029491436j)*x[0]**o + ((0.944151140249-0.675628890529j))*x[0] + ((-0.974151881065-0.788349890916j))*x[1]**o + ((-0.830740497391+0.773469387956j))*x[1] + ((-0.556882191025-0.308994032414j))*x[2]**o + ((-0.0688411306837-0.803906158487j))*x[2]
            ref[(2, 2, 2, 0)]=(-1.53103407209-1.09734392333j)/(o+1.)+((0.0222847560872-0.353032830531j))+((0.978351152684-0.209029491436j))*0.5**o
            arg[(2, 2, 2, 1)]=(0.0455918392912-0.462589575452j)*x[0]**o + ((0.58134785051+0.202002968688j))*x[0] + ((-0.977416443906+0.10250736659j))*x[1]**o + ((-0.511620635495+0.505205159964j))*x[1] + ((0.521667277704-0.976827228039j))*x[2]**o + ((-0.877767615783+0.265338391728j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.455749166203-0.874319861449j)/(o+1.)+((-0.404020200384+0.48627326019j))+((0.0455918392912-0.462589575452j))*0.5**o
            arg[(2, 2, 2, 2)]=(-0.207472143826+0.0978585294775j)*x[0]**o + ((0.600703719361-0.340328937638j))*x[0] + ((0.380085792424-0.350473591958j))*x[1]**o + ((-0.242974098095+0.753252453802j))*x[1] + ((0.539582829768-0.327678362749j))*x[2]**o + ((-0.300807674578+0.292554854946j))*x[2]
            ref[(2, 2, 2, 2)]=(0.919668622192-0.678151954707j)/(o+1.)+((0.0284609733437+0.352739185555j))+((-0.207472143826+0.0978585294775j))*0.5**o
            arg[(2, 2, 2, 3)]=(-0.933361419229-0.0438610485565j)*x[0]**o + ((0.720652275925+0.74194591161j))*x[0] + ((-0.490967130914-0.50272448673j))*x[1]**o + ((-0.406490847238+0.478070839597j))*x[1] + ((-0.386228071782+0.248532608185j))*x[2]**o + ((-0.207031497129-0.0571689739479j))*x[2]
            ref[(2, 2, 2, 3)]=(-0.877195202696-0.254191878545j)/(o+1.)+((0.0535649657789+0.58142388863j))+((-0.933361419229-0.0438610485565j))*0.5**o
            arg[(2, 2, 3, 0)]=(0.413903111263+0.685842648563j)*x[0]**o + ((-0.300371305685+0.516906774211j))*x[0] + ((0.705798888135-0.650202249781j))*x[1]**o + ((0.578658204431-0.444238549926j))*x[1] + ((0.31460015678+0.43522966305j))*x[2]**o + ((0.372049550825+0.405653097489j))*x[2]
            ref[(2, 2, 3, 0)]=(1.02039904491-0.21497258673j)/(o+1.)+((0.325168224785+0.239160660887j))+((0.413903111263+0.685842648563j))*0.5**o
            arg[(2, 2, 3, 1)]=(-0.735478814896+0.417617795089j)*x[0]**o + ((0.155982393992-0.860224270299j))*x[0] + ((-0.662712815586+0.0639282695766j))*x[1]**o + ((-0.164041945281+0.784743444922j))*x[1] + ((0.484063061801-0.310641588632j))*x[2]**o + ((0.520562299577-0.0912681053865j))*x[2]
            ref[(2, 2, 3, 1)]=(-0.178649753785-0.246713319056j)/(o+1.)+((0.256251374144-0.0833744653818j))+((-0.735478814896+0.417617795089j))*0.5**o
            arg[(2, 2, 3, 2)]=(-0.22140967379-0.916722101653j)*x[0]**o + ((0.273652854389-0.332113533395j))*x[0] + ((-0.90305644868-0.881729126987j))*x[1]**o + ((0.577019938457-0.569753200358j))*x[1] + ((-0.517249849302-0.23174580079j))*x[2]**o + ((0.640664677761+0.594200638556j))*x[2]
            ref[(2, 2, 3, 2)]=(-1.42030629798-1.11347492778j)/(o+1.)+((0.745668735304-0.153833047598j))+((-0.22140967379-0.916722101653j))*0.5**o
            arg[(2, 2, 3, 3)]=(0.686597198605-0.0162008744667j)*x[0]**o + ((0.874399209729+0.547039298748j))*x[0] + ((-0.498367035448+0.548942342376j))*x[1]**o + ((0.00137228914468+0.901178499305j))*x[1] + ((0.618184151527-0.3360572212j))*x[2]**o + ((0.266506042975-0.586327547035j))*x[2]
            ref[(2, 2, 3, 3)]=(0.119817116079+0.212885121176j)/(o+1.)+((0.571138770925+0.43094512551j))+((0.686597198605-0.0162008744667j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.643732976492-0.342846617883j)*x[0]**o + ((0.248987129672+0.626353879499j))*x[0] + ((0.633419579318+0.975298099383j))*x[1]**o + ((-0.762786199142+0.348188267887j))*x[1]
            ref=(0.633419579318+0.975298099383j)/(o+1.)+((-0.256899534735+0.487271073693j))+((-0.643732976492-0.342846617883j))*0.5**o
        else:
            arg=(-0.914317618651-0.487346437872j)*x[0]**o + ((-0.172327252917+0.597971328733j))*x[0] + ((0.204111421947-0.608424442473j))*x[1]**o + ((0.427456246735+0.354089548937j))*x[1] + ((-0.611335515793-0.844521962652j))*x[2]**o + ((0.781725603286-0.603934182983j))*x[2]
            ref=(-0.407224093846-1.45294640512j)/(o+1.)+((0.518427298552+0.174063347344j))+((-0.914317618651-0.487346437872j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.00453745527168-0.775769127262j)*x[0]**o + ((0.787039692691-0.659278619926j))*x[0] + ((-0.103190978347-0.339831917771j))*x[1]**o + ((0.708205353132+0.14117613575j))*x[1]
            ref[(0,)]=(-0.103190978347-0.339831917771j)/(o+1.)+((0.747622522912-0.259051242088j))+((0.00453745527168-0.775769127262j))*0.5**o
            arg[(1,)]=(0.644614078575-0.267732630598j)*x[0]**o + ((-0.856434148052-0.469118076635j))*x[0] + ((0.708634288126-0.54981766849j))*x[1]**o + ((0.743085653321+0.0941718882039j))*x[1]
            ref[(1,)]=(0.708634288126-0.54981766849j)/(o+1.)+((-0.0566742473654-0.187473094216j))+((0.644614078575-0.267732630598j))*0.5**o
        else:
            arg[(0,)]=(-0.277084818172+0.121103155537j)*x[0]**o + ((0.643973035327-0.778114401154j))*x[0] + ((0.738441710214-0.0500492827431j))*x[1]**o + ((0.907218775046+0.638083813326j))*x[1] + ((0.486879985021+0.623937566809j))*x[2]**o + ((-0.93425080504-0.138678871712j))*x[2]
            ref[(0,)]=(1.22532169523+0.573888284066j)/(o+1.)+((0.308470502666-0.139354729771j))+((-0.277084818172+0.121103155537j))*0.5**o
            arg[(1,)]=(0.838318097353-0.58119077277j)*x[0]**o + ((-0.0591235171755-0.0625947673767j))*x[0] + ((-0.0768312336596+0.395114450962j))*x[1]**o + ((-0.338237120907+0.787392502405j))*x[1] + ((-0.029260440801+0.055189201577j))*x[2]**o + ((-0.530272619184-0.278002432207j))*x[2]
            ref[(1,)]=(-0.106091674461+0.450303652539j)/(o+1.)+((-0.463816628633+0.22339765141j))+((0.838318097353-0.58119077277j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref=numpy.zeros((4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.161931454516+0.365233582257j)*x[0]**o + ((-0.913061921485-0.681517855764j))*x[0] + ((-0.271465909766+0.85640096606j))*x[1]**o + ((0.787773932296+0.740989230587j))*x[1]
            ref[(0, 0)]=(-0.271465909766+0.85640096606j)/(o+1.)+((-0.0626439945947+0.0297356874115j))+((0.161931454516+0.365233582257j))*0.5**o
            arg[(0, 1)]=(0.188070141949-0.48281166884j)*x[0]**o + ((-0.775453872588-0.786422146415j))*x[0] + ((0.503398729853-0.674678678859j))*x[1]**o + ((-0.201459362377+0.151251611664j))*x[1]
            ref[(0, 1)]=(0.503398729853-0.674678678859j)/(o+1.)+((-0.488456617483-0.317585267376j))+((0.188070141949-0.48281166884j))*0.5**o
            arg[(0, 2)]=(-0.436385703576-0.520899736972j)*x[0]**o + ((0.0754571189359-0.623162934377j))*x[0] + ((-0.834834023954+0.562818773212j))*x[1]**o + ((0.0985607332389-0.0782473021963j))*x[1]
            ref[(0, 2)]=(-0.834834023954+0.562818773212j)/(o+1.)+((0.0870089260874-0.350705118287j))+((-0.436385703576-0.520899736972j))*0.5**o
            arg[(1, 0)]=(0.381721008553-0.721065764007j)*x[0]**o + ((-0.504793685477-0.35057059217j))*x[0] + ((-0.88069457416+0.783891323513j))*x[1]**o + ((-0.91770682722+0.60068999226j))*x[1]
            ref[(1, 0)]=(-0.88069457416+0.783891323513j)/(o+1.)+((-0.711250256349+0.125059700045j))+((0.381721008553-0.721065764007j))*0.5**o
            arg[(1, 1)]=(-0.325476311252+0.115768130993j)*x[0]**o + ((-0.0749326157092+0.0842165603503j))*x[0] + ((-0.944651677022+0.17810509215j))*x[1]**o + ((-0.0666226245836+0.403359947086j))*x[1]
            ref[(1, 1)]=(-0.944651677022+0.17810509215j)/(o+1.)+((-0.0707776201464+0.243788253718j))+((-0.325476311252+0.115768130993j))*0.5**o
            arg[(1, 2)]=(-0.219150481459-0.57450806904j)*x[0]**o + ((-0.0716548671181+0.425473034825j))*x[0] + ((-0.83316488712+0.294482572086j))*x[1]**o + ((-0.800551235277+0.851513976272j))*x[1]
            ref[(1, 2)]=(-0.83316488712+0.294482572086j)/(o+1.)+((-0.436103051197+0.638493505549j))+((-0.219150481459-0.57450806904j))*0.5**o
            arg[(2, 0)]=(-0.578218058372+0.958145203907j)*x[0]**o + ((-0.485016350278-0.681543049415j))*x[0] + ((0.966588500944-0.102026981715j))*x[1]**o + ((0.0768841846129-0.421647388771j))*x[1]
            ref[(2, 0)]=(0.966588500944-0.102026981715j)/(o+1.)+((-0.204066082833-0.551595219093j))+((-0.578218058372+0.958145203907j))*0.5**o
            arg[(2, 1)]=(0.799983567447-0.508907529679j)*x[0]**o + ((-0.901763486443-0.855663834184j))*x[0] + ((0.751225157488-0.123535146753j))*x[1]**o + ((-0.0113233340155-0.953487616806j))*x[1]
            ref[(2, 1)]=(0.751225157488-0.123535146753j)/(o+1.)+((-0.456543410229-0.904575725495j))+((0.799983567447-0.508907529679j))*0.5**o
            arg[(2, 2)]=(-0.677939735964-0.691406928324j)*x[0]**o + ((0.75763181263+0.868780044221j))*x[0] + ((-0.566442273284-0.295524883969j))*x[1]**o + ((0.929565799908+0.612996813025j))*x[1]
            ref[(2, 2)]=(-0.566442273284-0.295524883969j)/(o+1.)+((0.843598806269+0.740888428623j))+((-0.677939735964-0.691406928324j))*0.5**o
            arg[(3, 0)]=(-0.580023869338+0.246861166545j)*x[0]**o + ((-0.00140680338925+0.296229967281j))*x[0] + ((0.906861089409+0.547593540862j))*x[1]**o + ((0.0167064716483-0.146172036873j))*x[1]
            ref[(3, 0)]=(0.906861089409+0.547593540862j)/(o+1.)+((0.00764983412951+0.0750289652041j))+((-0.580023869338+0.246861166545j))*0.5**o
            arg[(3, 1)]=(0.129982753698+0.574965898808j)*x[0]**o + ((0.88532521106+0.440784626518j))*x[0] + ((-0.796937120002-0.282124845257j))*x[1]**o + ((0.646846755327+0.912351314202j))*x[1]
            ref[(3, 1)]=(-0.796937120002-0.282124845257j)/(o+1.)+((0.766085983193+0.67656797036j))+((0.129982753698+0.574965898808j))*0.5**o
            arg[(3, 2)]=(0.475575946157-0.332285297447j)*x[0]**o + ((0.124348300024-0.767586439176j))*x[0] + ((0.724210178476-0.602469901429j))*x[1]**o + ((-0.447698705698+0.475182152222j))*x[1]
            ref[(3, 2)]=(0.724210178476-0.602469901429j)/(o+1.)+((-0.161675202837-0.146202143477j))+((0.475575946157-0.332285297447j))*0.5**o
        else:
            arg[(0, 0)]=(-0.358408775638+0.185879457578j)*x[0]**o + ((-0.72648616375-0.705401160722j))*x[0] + ((0.933458365374-0.153030104662j))*x[1]**o + ((0.486115395594-0.370400239299j))*x[1] + ((0.4552487275+0.124204861106j))*x[2]**o + ((0.180598292386-0.839070294099j))*x[2]
            ref[(0, 0)]=(1.38870709287-0.0288252435566j)/(o+1.)+((-0.0298862378853-0.95743584706j))+((-0.358408775638+0.185879457578j))*0.5**o
            arg[(0, 1)]=(0.793635597077-0.569607956532j)*x[0]**o + ((-0.175347973011-0.673403829116j))*x[0] + ((-0.726426695692+0.0186448437218j))*x[1]**o + ((0.295368885439+0.890318282623j))*x[1] + ((-0.233737896874+0.538022958096j))*x[2]**o + ((0.441684342697-0.172213657055j))*x[2]
            ref[(0, 1)]=(-0.960164592565+0.556667801817j)/(o+1.)+((0.280852627562+0.0223503982259j))+((0.793635597077-0.569607956532j))*0.5**o
            arg[(0, 2)]=(-0.0797579021327+0.0157272434119j)*x[0]**o + ((-0.668045617849+0.794828682579j))*x[0] + ((-0.0304702685597-0.573719056395j))*x[1]**o + ((0.518130054157-0.755977242184j))*x[1] + ((-0.0627256187609+0.913948305088j))*x[2]**o + ((0.748393019331-0.642905278491j))*x[2]
            ref[(0, 2)]=(-0.0931958873206+0.340229248693j)/(o+1.)+((0.29923872782-0.302026919048j))+((-0.0797579021327+0.0157272434119j))*0.5**o
            arg[(1, 0)]=(-0.0436013930999-0.0928185244668j)*x[0]**o + ((0.703774043776-0.700630180826j))*x[0] + ((0.594881590036+0.518522897134j))*x[1]**o + ((0.24361252429+0.804309952004j))*x[1] + ((-0.195527711205-0.868323909396j))*x[2]**o + ((-0.889607730451-0.56254518857j))*x[2]
            ref[(1, 0)]=(0.399353878831-0.349801012262j)/(o+1.)+((0.0288894188077-0.229432708696j))+((-0.0436013930999-0.0928185244668j))*0.5**o
            arg[(1, 1)]=(0.730555793381-0.669390166149j)*x[0]**o + ((0.965278756207+0.877194219466j))*x[0] + ((-0.0774839799088+0.53655256568j))*x[1]**o + ((-0.968551218571-0.355298410053j))*x[1] + ((-0.781517876584+0.769251716262j))*x[2]**o + ((0.862733718737+0.894342467924j))*x[2]
            ref[(1, 1)]=(-0.859001856492+1.30580428194j)/(o+1.)+((0.429730628187+0.708119138668j))+((0.730555793381-0.669390166149j))*0.5**o
            arg[(1, 2)]=(-0.121482172464-0.429404153207j)*x[0]**o + ((0.610963253262+0.308360307051j))*x[0] + ((0.935574658496-0.988227364672j))*x[1]**o + ((-0.791165406255+0.341064822401j))*x[1] + ((0.425838108731-0.551391507343j))*x[2]**o + ((-0.110192641484+0.505353150154j))*x[2]
            ref[(1, 2)]=(1.36141276723-1.53961887201j)/(o+1.)+((-0.145197397239+0.577389139803j))+((-0.121482172464-0.429404153207j))*0.5**o
            arg[(2, 0)]=(-0.590700042904-0.36470779587j)*x[0]**o + ((0.500694588114+0.86433514792j))*x[0] + ((-0.360362111369-0.821641372709j))*x[1]**o + ((-0.848546800618-0.251835495442j))*x[1] + ((0.599302098044-0.972971105339j))*x[2]**o + ((0.141138804406+0.727074489108j))*x[2]
            ref[(2, 0)]=(0.238939986675-1.79461247805j)/(o+1.)+((-0.103356704049+0.669787070793j))+((-0.590700042904-0.36470779587j))*0.5**o
            arg[(2, 1)]=(0.966647645312+0.967264932012j)*x[0]**o + ((-0.150373362274+0.34125825143j))*x[0] + ((-0.846989200622-0.900320076199j))*x[1]**o + ((-0.819058333829+0.630928497444j))*x[1] + ((0.698772557486+0.528378273964j))*x[2]**o + ((0.515630934202+0.624156358603j))*x[2]
            ref[(2, 1)]=(-0.148216643137-0.371941802236j)/(o+1.)+((-0.226900380951+0.798171553738j))+((0.966647645312+0.967264932012j))*0.5**o
            arg[(2, 2)]=(-0.12394250912-0.07459981606j)*x[0]**o + ((0.677152046012+0.134702059744j))*x[0] + ((-0.316749734265+0.705846543999j))*x[1]**o + ((0.700575300032+0.343322711027j))*x[1] + ((-0.555386410989-0.756295742749j))*x[2]**o + ((-0.935974680596-0.687316731005j))*x[2]
            ref[(2, 2)]=(-0.872136145254-0.0504491987504j)/(o+1.)+((0.220876332724-0.104645980118j))+((-0.12394250912-0.07459981606j))*0.5**o
            arg[(3, 0)]=(0.55834145066+0.0624036518886j)*x[0]**o + ((-0.369317720707-0.588176163866j))*x[0] + ((0.390389405994-0.0464252329836j))*x[1]**o + ((0.315035226247+0.766985133299j))*x[1] + ((0.946656571064-0.634728867361j))*x[2]**o + ((-0.324166725726+0.461011542438j))*x[2]
            ref[(3, 0)]=(1.33704597706-0.681154100344j)/(o+1.)+((-0.189224610093+0.319910255935j))+((0.55834145066+0.0624036518886j))*0.5**o
            arg[(3, 1)]=(-0.871819210528+0.505504772298j)*x[0]**o + ((-0.945214303392+0.150362530457j))*x[0] + ((-0.565385505798-0.98848655081j))*x[1]**o + ((-0.686407841595+0.569681979386j))*x[1] + ((0.0819760047459-0.986222462106j))*x[2]**o + ((-0.191230242496+0.583010139104j))*x[2]
            ref[(3, 1)]=(-0.483409501052-1.97470901292j)/(o+1.)+((-0.911426193741+0.651527324474j))+((-0.871819210528+0.505504772298j))*0.5**o
            arg[(3, 2)]=(0.274395740049+0.549134302537j)*x[0]**o + ((-0.00136664736465-0.285672959301j))*x[0] + ((0.377878063957-0.701316835618j))*x[1]**o + ((-0.774219214959+0.297274127125j))*x[1] + ((-0.972854187197+0.149270201709j))*x[2]**o + ((0.894121237598+0.448534071587j))*x[2]
            ref[(3, 2)]=(-0.59497612324-0.552046633909j)/(o+1.)+((0.0592676876374+0.230067619705j))+((0.274395740049+0.549134302537j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2),w)
        ref=numpy.zeros((3, 2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.800778771326+0.439789088244j)*x[0]**o + ((0.761708284664+0.073817368693j))*x[0] + ((0.3870671389+0.867055123707j))*x[1]**o + ((-0.94312507653-0.132445725488j))*x[1]
            ref[(0, 0, 0)]=(0.3870671389+0.867055123707j)/(o+1.)+((-0.0907083959327-0.0293141783974j))+((0.800778771326+0.439789088244j))*0.5**o
            arg[(0, 0, 1)]=(-0.385595186994+0.0663714226501j)*x[0]**o + ((0.335403922421-0.277764205505j))*x[0] + ((0.558753877085+0.723577238647j))*x[1]**o + ((0.536011181918-0.526269755735j))*x[1]
            ref[(0, 0, 1)]=(0.558753877085+0.723577238647j)/(o+1.)+((0.43570755217-0.40201698062j))+((-0.385595186994+0.0663714226501j))*0.5**o
            arg[(0, 1, 0)]=(0.926941141055+0.55805650914j)*x[0]**o + ((0.346688266323-0.358946519405j))*x[0] + ((0.935393181151-0.965386432917j))*x[1]**o + ((0.380586092976-0.772706118345j))*x[1]
            ref[(0, 1, 0)]=(0.935393181151-0.965386432917j)/(o+1.)+((0.36363717965-0.565826318875j))+((0.926941141055+0.55805650914j))*0.5**o
            arg[(0, 1, 1)]=(0.11410377292+0.141692883148j)*x[0]**o + ((-0.311735408968+0.573546033588j))*x[0] + ((0.0103233562754-0.71018742367j))*x[1]**o + ((0.013850944998+0.246407400939j))*x[1]
            ref[(0, 1, 1)]=(0.0103233562754-0.71018742367j)/(o+1.)+((-0.148942231985+0.409976717263j))+((0.11410377292+0.141692883148j))*0.5**o
            arg[(1, 0, 0)]=(-0.17875521496+0.29449647558j)*x[0]**o + ((0.634191812096-0.170202685973j))*x[0] + ((0.61106611621+0.4427214933j))*x[1]**o + ((0.678715402915-0.533890863695j))*x[1]
            ref[(1, 0, 0)]=(0.61106611621+0.4427214933j)/(o+1.)+((0.656453607506-0.352046774834j))+((-0.17875521496+0.29449647558j))*0.5**o
            arg[(1, 0, 1)]=(0.58538714374-0.0828278168848j)*x[0]**o + ((-0.940862898242-0.792138942731j))*x[0] + ((0.792720532601+0.744977045927j))*x[1]**o + ((0.883154305994+0.274214687657j))*x[1]
            ref[(1, 0, 1)]=(0.792720532601+0.744977045927j)/(o+1.)+((-0.028854296124-0.258962127537j))+((0.58538714374-0.0828278168848j))*0.5**o
            arg[(1, 1, 0)]=(-0.501862151122-0.492056669939j)*x[0]**o + ((-0.719127522596-0.683716539038j))*x[0] + ((-0.787222782156-0.840841225218j))*x[1]**o + ((0.627628108308+0.367751396534j))*x[1]
            ref[(1, 1, 0)]=(-0.787222782156-0.840841225218j)/(o+1.)+((-0.0457497071438-0.157982571252j))+((-0.501862151122-0.492056669939j))*0.5**o
            arg[(1, 1, 1)]=(0.366548728772+0.547682951754j)*x[0]**o + ((0.731637889995+0.671916466338j))*x[0] + ((-0.437880830361+0.390100088499j))*x[1]**o + ((0.149494077992+0.769387920148j))*x[1]
            ref[(1, 1, 1)]=(-0.437880830361+0.390100088499j)/(o+1.)+((0.440565983994+0.720652193243j))+((0.366548728772+0.547682951754j))*0.5**o
            arg[(2, 0, 0)]=(0.0725312091702-0.0695947220239j)*x[0]**o + ((-0.947142572153-0.99071153533j))*x[0] + ((-0.57336591381+0.866521406015j))*x[1]**o + ((0.873278210404+0.675227554104j))*x[1]
            ref[(2, 0, 0)]=(-0.57336591381+0.866521406015j)/(o+1.)+((-0.0369321808748-0.157741990613j))+((0.0725312091702-0.0695947220239j))*0.5**o
            arg[(2, 0, 1)]=(-0.280740980343-0.488549865765j)*x[0]**o + ((0.967999960398+0.294985021601j))*x[0] + ((0.229209411243-0.168065895291j))*x[1]**o + ((-0.525720744318+0.248005243008j))*x[1]
            ref[(2, 0, 1)]=(0.229209411243-0.168065895291j)/(o+1.)+((0.22113960804+0.271495132305j))+((-0.280740980343-0.488549865765j))*0.5**o
            arg[(2, 1, 0)]=(-0.383203924729-0.942896204775j)*x[0]**o + ((-0.926324892256-0.798078095856j))*x[0] + ((-0.500714650496-0.726040219613j))*x[1]**o + ((-0.654358761934-0.478157798251j))*x[1]
            ref[(2, 1, 0)]=(-0.500714650496-0.726040219613j)/(o+1.)+((-0.790341827095-0.638117947054j))+((-0.383203924729-0.942896204775j))*0.5**o
            arg[(2, 1, 1)]=(-0.284224453998+0.263966465421j)*x[0]**o + ((-0.760378007032+0.217110348962j))*x[0] + ((-0.382037593273-0.190915476692j))*x[1]**o + ((0.573378669951+0.854470433652j))*x[1]
            ref[(2, 1, 1)]=(-0.382037593273-0.190915476692j)/(o+1.)+((-0.0934996685405+0.535790391307j))+((-0.284224453998+0.263966465421j))*0.5**o
        else:
            arg[(0, 0, 0)]=(0.500576020919+0.115099729793j)*x[0]**o + ((-0.206863845578-0.839218879437j))*x[0] + ((0.515978093726+0.748220403064j))*x[1]**o + ((-0.56931690708+0.226959479738j))*x[1] + ((-0.669028274283+0.0546105957305j))*x[2]**o + ((-0.445524147426-0.469021711442j))*x[2]
            ref[(0, 0, 0)]=(-0.153050180557+0.802830998795j)/(o+1.)+((-0.610852450042-0.540640555571j))+((0.500576020919+0.115099729793j))*0.5**o
            arg[(0, 0, 1)]=(0.227992586994-0.494467952821j)*x[0]**o + ((0.810552914211-0.37418629242j))*x[0] + ((-0.185667857801+0.333171927003j))*x[1]**o + ((-0.876571968803-0.335725924572j))*x[1] + ((-0.139046030252+0.183503508898j))*x[2]**o + ((0.218587546949-0.286820268505j))*x[2]
            ref[(0, 0, 1)]=(-0.324713888053+0.5166754359j)/(o+1.)+((0.0762842461785-0.498366242749j))+((0.227992586994-0.494467952821j))*0.5**o
            arg[(0, 1, 0)]=(-0.119007975534-0.856824034219j)*x[0]**o + ((-0.375893125612+0.915595979536j))*x[0] + ((-0.780907116706+0.480539296061j))*x[1]**o + ((0.910688948655-0.957924667759j))*x[1] + ((0.0449489190881-0.185768141666j))*x[2]**o + ((0.512022898198+0.60733950773j))*x[2]
            ref[(0, 1, 0)]=(-0.735958197618+0.294771154395j)/(o+1.)+((0.523409360621+0.282505409754j))+((-0.119007975534-0.856824034219j))*0.5**o
            arg[(0, 1, 1)]=(-0.626131844324-0.639864823036j)*x[0]**o + ((-0.0820922159582+0.303817505282j))*x[0] + ((0.116706765947+0.560896412273j))*x[1]**o + ((0.482647246053+0.976291598305j))*x[1] + ((-0.584323978113+0.713409021035j))*x[2]**o + ((0.646730267036+0.83487316731j))*x[2]
            ref[(0, 1, 1)]=(-0.467617212166+1.27430543331j)/(o+1.)+((0.523642648565+1.05749113545j))+((-0.626131844324-0.639864823036j))*0.5**o
            arg[(1, 0, 0)]=(0.553940192655+0.227025676905j)*x[0]**o + ((-0.117261750647-0.90722921982j))*x[0] + ((0.948525129874-0.244022325067j))*x[1]**o + ((0.20811516008-0.0634251192704j))*x[1] + ((-0.782075510704+0.182291639441j))*x[2]**o + ((-0.861185733245+0.0957014498819j))*x[2]
            ref[(1, 0, 0)]=(0.166449619169-0.0617306856257j)/(o+1.)+((-0.385166161906-0.437476444604j))+((0.553940192655+0.227025676905j))*0.5**o
            arg[(1, 0, 1)]=(0.0322092406882-0.216107712809j)*x[0]**o + ((0.608270444921-0.000720718184008j))*x[0] + ((0.41374131568+0.971231133665j))*x[1]**o + ((0.268005208685-0.391913344105j))*x[1] + ((0.33727250572-0.209114902668j))*x[2]**o + ((0.509650745604+0.633748951533j))*x[2]
            ref[(1, 0, 1)]=(0.7510138214+0.762116230997j)/(o+1.)+((0.692963199605+0.120557444622j))+((0.0322092406882-0.216107712809j))*0.5**o
            arg[(1, 1, 0)]=(-0.708609220097-0.17489644354j)*x[0]**o + ((0.371840779346+0.725615900795j))*x[0] + ((0.548423485768-0.662959672314j))*x[1]**o + ((0.60731453176-0.581091178091j))*x[1] + ((-0.124008120551+0.251596079423j))*x[2]**o + ((0.146621652888+0.429145842753j))*x[2]
            ref[(1, 1, 0)]=(0.424415365218-0.411363592891j)/(o+1.)+((0.562888481997+0.286835282728j))+((-0.708609220097-0.17489644354j))*0.5**o
            arg[(1, 1, 1)]=(0.707458753625-0.2267291112j)*x[0]**o + ((-0.948126688526+0.871619373271j))*x[0] + ((0.840633826761+0.493320121264j))*x[1]**o + ((0.677246826793-0.200718504601j))*x[1] + ((-0.136390976468-0.721225550189j))*x[2]**o + ((-0.223760087414+0.826758009237j))*x[2]
            ref[(1, 1, 1)]=(0.704242850293-0.227905428924j)/(o+1.)+((-0.247319974573+0.748829438954j))+((0.707458753625-0.2267291112j))*0.5**o
            arg[(2, 0, 0)]=(0.284023789322-0.443398382054j)*x[0]**o + ((-0.50996317444+0.985120782693j))*x[0] + ((0.325917182138+0.87299081174j))*x[1]**o + ((-0.724616085019-0.474985551801j))*x[1] + ((-0.182130851619-0.428099681039j))*x[2]**o + ((-0.802377327076+0.923559602721j))*x[2]
            ref[(2, 0, 0)]=(0.143786330519+0.444891130701j)/(o+1.)+((-1.01847829327+0.716847416807j))+((0.284023789322-0.443398382054j))*0.5**o
            arg[(2, 0, 1)]=(0.0136034694793-0.482746384005j)*x[0]**o + ((-0.039455657262+0.994075078313j))*x[0] + ((0.850146583344-0.586595984985j))*x[1]**o + ((-0.0966043736933+0.826513339743j))*x[1] + ((0.648359231156-0.173374451402j))*x[2]**o + ((0.782161242921-0.605542078573j))*x[2]
            ref[(2, 0, 1)]=(1.4985058145-0.759970436387j)/(o+1.)+((0.323050605983+0.607523169741j))+((0.0136034694793-0.482746384005j))*0.5**o
            arg[(2, 1, 0)]=(0.00166502929564+0.658871098173j)*x[0]**o + ((0.00949011809234-0.436887381869j))*x[0] + ((0.331393190923+0.156469066907j))*x[1]**o + ((0.361273642387+0.40963695646j))*x[1] + ((0.389503257108-0.669250019413j))*x[2]**o + ((-0.539965403613+0.5465618242j))*x[2]
            ref[(2, 1, 0)]=(0.720896448031-0.512780952506j)/(o+1.)+((-0.0846008215669+0.259655699395j))+((0.00166502929564+0.658871098173j))*0.5**o
            arg[(2, 1, 1)]=(-0.0609619236699-0.793456277867j)*x[0]**o + ((-0.51074902711-0.204540844899j))*x[0] + ((0.488856633118-0.694995927475j))*x[1]**o + ((-0.608661534242-0.731691615077j))*x[1] + ((-0.313273670177-0.141594597361j))*x[2]**o + ((-0.271878703244-0.168751717756j))*x[2]
            ref[(2, 1, 1)]=(0.175582962941-0.836590524836j)/(o+1.)+((-0.695644632298-0.552492088866j))+((-0.0609619236699-0.793456277867j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 3, 3),w)
        ref=numpy.zeros((3, 3, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.55340662718-0.948820655174j)*x[0]**o + ((-0.181686521798+0.310091842441j))*x[0] + ((0.0780871519009+0.1357645403j))*x[1]**o + ((-0.406361567169-0.0685158836852j))*x[1]
            ref[(0, 0, 0, 0)]=(0.0780871519009+0.1357645403j)/(o+1.)+((-0.294024044483+0.120787979378j))+((0.55340662718-0.948820655174j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.373064785608+0.427181700981j)*x[0]**o + ((-0.048554510236+0.780892173863j))*x[0] + ((0.115834989916+0.373021577522j))*x[1]**o + ((-0.194228680076+0.443920303075j))*x[1]
            ref[(0, 0, 0, 1)]=(0.115834989916+0.373021577522j)/(o+1.)+((-0.121391595156+0.612406238469j))+((-0.373064785608+0.427181700981j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.0319919156972-0.284533525943j)*x[0]**o + ((0.930567261333-0.174061783649j))*x[0] + ((-0.0737469369225+0.58772705059j))*x[1]**o + ((0.203414167247+0.997995215314j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.0737469369225+0.58772705059j)/(o+1.)+((0.56699071429+0.411966715832j))+((0.0319919156972-0.284533525943j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.649913815641+0.767006256662j)*x[0]**o + ((0.631124977976+0.868210017174j))*x[0] + ((0.723364207732+0.139946148201j))*x[1]**o + ((0.961692587867-0.381615921462j))*x[1]
            ref[(0, 0, 1, 0)]=(0.723364207732+0.139946148201j)/(o+1.)+((0.796408782921+0.243297047856j))+((0.649913815641+0.767006256662j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.212576823567+0.967445076825j)*x[0]**o + ((-0.916965633014-0.0602566880361j))*x[0] + ((-0.541999622515+0.264907336416j))*x[1]**o + ((-0.000653713106752+0.672595525477j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.541999622515+0.264907336416j)/(o+1.)+((-0.45880967306+0.30616941872j))+((-0.212576823567+0.967445076825j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.306234575404+0.727389319259j)*x[0]**o + ((0.161146354901-0.0460386001205j))*x[0] + ((0.974792754499+0.824270858965j))*x[1]**o + ((0.922758633808+0.514572905788j))*x[1]
            ref[(0, 0, 1, 2)]=(0.974792754499+0.824270858965j)/(o+1.)+((0.541952494355+0.234267152834j))+((0.306234575404+0.727389319259j))*0.5**o
            arg[(0, 0, 2, 0)]=(-0.84934231812+0.473742770753j)*x[0]**o + ((0.852008371817-0.454615372248j))*x[0] + ((0.733854230869+0.627775651508j))*x[1]**o + ((-0.370883015418-0.235205844143j))*x[1]
            ref[(0, 0, 2, 0)]=(0.733854230869+0.627775651508j)/(o+1.)+((0.240562678199-0.344910608195j))+((-0.84934231812+0.473742770753j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.171326457393+0.657441687107j)*x[0]**o + ((0.117448463388+0.595403973852j))*x[0] + ((-0.189324034882-0.461818217448j))*x[1]**o + ((0.771980231403+0.875824307661j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.189324034882-0.461818217448j)/(o+1.)+((0.444714347395+0.735614140757j))+((0.171326457393+0.657441687107j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.416130342427-0.379600131651j)*x[0]**o + ((0.393778691712+0.598925061845j))*x[0] + ((-0.273616519345+0.540341481794j))*x[1]**o + ((-0.00502062471804+0.491226459494j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.273616519345+0.540341481794j)/(o+1.)+((0.194379033497+0.545075760669j))+((0.416130342427-0.379600131651j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.768384570737-0.399612761518j)*x[0]**o + ((-0.323539557014+0.880161980252j))*x[0] + ((-0.528165909487-0.202624653457j))*x[1]**o + ((0.524266015284+0.149123304297j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.528165909487-0.202624653457j)/(o+1.)+((0.100363229135+0.514642642274j))+((-0.768384570737-0.399612761518j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.167786026519+0.766621054564j)*x[0]**o + ((0.783843631856+0.443423176553j))*x[0] + ((-0.5250980037+0.667281527216j))*x[1]**o + ((-0.951890414179-0.586329516284j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.5250980037+0.667281527216j)/(o+1.)+((-0.0840233911615-0.0714531698653j))+((-0.167786026519+0.766621054564j))*0.5**o
            arg[(0, 1, 0, 2)]=(0.0209151806101+0.396944490253j)*x[0]**o + ((0.728890355312-0.197959285998j))*x[0] + ((-0.787373300325-0.6886069909j))*x[1]**o + ((-0.964070817141-0.381045020045j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.787373300325-0.6886069909j)/(o+1.)+((-0.117590230914-0.289502153022j))+((0.0209151806101+0.396944490253j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.839485898719-0.0877343119995j)*x[0]**o + ((0.2247068202-0.330676713067j))*x[0] + ((0.817558891984-0.494871634456j))*x[1]**o + ((0.0930001231329+0.0992159365809j))*x[1]
            ref[(0, 1, 1, 0)]=(0.817558891984-0.494871634456j)/(o+1.)+((0.158853471667-0.115730388243j))+((0.839485898719-0.0877343119995j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.119567484916+0.946553997034j)*x[0]**o + ((0.438477022032-0.996792301243j))*x[0] + ((-0.867571569424-0.442451871767j))*x[1]**o + ((-0.0662720276191+0.192326985922j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.867571569424-0.442451871767j)/(o+1.)+((0.186102497207-0.402232657661j))+((0.119567484916+0.946553997034j))*0.5**o
            arg[(0, 1, 1, 2)]=(-0.478466907374+0.953814337441j)*x[0]**o + ((0.816355307675+0.434439653363j))*x[0] + ((0.694768831932+0.327325440932j))*x[1]**o + ((-0.0802208193599-0.0492075959958j))*x[1]
            ref[(0, 1, 1, 2)]=(0.694768831932+0.327325440932j)/(o+1.)+((0.368067244158+0.192616028684j))+((-0.478466907374+0.953814337441j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.0943972907869-0.46939111726j)*x[0]**o + ((0.986627809258-0.639817219958j))*x[0] + ((0.0426793518416-0.926673140564j))*x[1]**o + ((-0.0194958905787-0.834244504641j))*x[1]
            ref[(0, 1, 2, 0)]=(0.0426793518416-0.926673140564j)/(o+1.)+((0.48356595934-0.737030862299j))+((-0.0943972907869-0.46939111726j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.115694501384-0.121091194795j)*x[0]**o + ((0.135730538526+0.615344627362j))*x[0] + ((0.10560857597+0.726678343012j))*x[1]**o + ((0.17740352837-0.667699816635j))*x[1]
            ref[(0, 1, 2, 1)]=(0.10560857597+0.726678343012j)/(o+1.)+((0.156567033448-0.0261775946361j))+((-0.115694501384-0.121091194795j))*0.5**o
            arg[(0, 1, 2, 2)]=(0.759659910222-0.860447180751j)*x[0]**o + ((0.222627105585+0.613087440411j))*x[0] + ((-0.906215220026-0.801351025335j))*x[1]**o + ((0.872992325729+0.883501506436j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.906215220026-0.801351025335j)/(o+1.)+((0.547809715657+0.748294473424j))+((0.759659910222-0.860447180751j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.718739521575+0.948180213016j)*x[0]**o + ((0.895799693822-0.937073682379j))*x[0] + ((-0.379771529884+0.128012264572j))*x[1]**o + ((0.219339751018+0.547864639481j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.379771529884+0.128012264572j)/(o+1.)+((0.55756972242-0.194604521449j))+((0.718739521575+0.948180213016j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.460546113914-0.260357985958j)*x[0]**o + ((0.715288773025+0.853362421271j))*x[0] + ((-0.312822618675-0.45590617515j))*x[1]**o + ((-0.868426714376-0.0725283663551j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.312822618675-0.45590617515j)/(o+1.)+((-0.0765689706754+0.390417027458j))+((0.460546113914-0.260357985958j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.335839585636+0.775983927365j)*x[0]**o + ((-0.783100264444+0.214246341957j))*x[0] + ((-0.338047309619-0.0154660482976j))*x[1]**o + ((0.166183745705+0.198834757083j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.338047309619-0.0154660482976j)/(o+1.)+((-0.30845825937+0.20654054952j))+((0.335839585636+0.775983927365j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.713200164269-0.276034787291j)*x[0]**o + ((-0.733843728906+0.122359846428j))*x[0] + ((0.0237415344079+0.994435511043j))*x[1]**o + ((-0.203361757079-0.911514202953j))*x[1]
            ref[(0, 2, 1, 0)]=(0.0237415344079+0.994435511043j)/(o+1.)+((-0.468602742993-0.394577178262j))+((0.713200164269-0.276034787291j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.914494902016-0.209169123503j)*x[0]**o + ((-0.166785600144-0.369369661627j))*x[0] + ((-0.290347169519-0.587801031468j))*x[1]**o + ((-0.780051760176+0.633043037366j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.290347169519-0.587801031468j)/(o+1.)+((-0.47341868016+0.13183668787j))+((0.914494902016-0.209169123503j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.870438202694-0.475401513419j)*x[0]**o + ((0.569574755634-0.785608820975j))*x[0] + ((-0.732357794209-0.0505388789469j))*x[1]**o + ((-0.574991372302-0.443895033429j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.732357794209-0.0505388789469j)/(o+1.)+((-0.00270830833401-0.614751927202j))+((-0.870438202694-0.475401513419j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.709112029337+0.535913820533j)*x[0]**o + ((0.834225285476+0.276993100688j))*x[0] + ((0.495612409319+0.293063646717j))*x[1]**o + ((-0.973503707413-0.91172175796j))*x[1]
            ref[(0, 2, 2, 0)]=(0.495612409319+0.293063646717j)/(o+1.)+((-0.0696392109686-0.317364328636j))+((-0.709112029337+0.535913820533j))*0.5**o
            arg[(0, 2, 2, 1)]=(-0.818150733945+0.911180162101j)*x[0]**o + ((-0.342176990046+0.535355410121j))*x[0] + ((-0.551605533799+0.894615103004j))*x[1]**o + ((-0.792652374695+0.729899566271j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.551605533799+0.894615103004j)/(o+1.)+((-0.567414682371+0.632627488196j))+((-0.818150733945+0.911180162101j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.367280984801+0.377502949739j)*x[0]**o + ((0.454721547865+0.301429220397j))*x[0] + ((0.840313142526-0.227396932914j))*x[1]**o + ((0.0725076182699-0.530779698921j))*x[1]
            ref[(0, 2, 2, 2)]=(0.840313142526-0.227396932914j)/(o+1.)+((0.263614583068-0.114675239262j))+((0.367280984801+0.377502949739j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.150784738706+0.874423886322j)*x[0]**o + ((0.868783417051-0.626546178358j))*x[0] + ((-0.347828300487-0.67106317013j))*x[1]**o + ((0.947719414535-0.382542425088j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.347828300487-0.67106317013j)/(o+1.)+((0.908251415793-0.504544301723j))+((0.150784738706+0.874423886322j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.98896387248-0.152294519658j)*x[0]**o + ((-0.268598578399-0.402327874374j))*x[0] + ((0.178184938499-0.887284181335j))*x[1]**o + ((0.48081934502+0.589894214531j))*x[1]
            ref[(1, 0, 0, 1)]=(0.178184938499-0.887284181335j)/(o+1.)+((0.10611038331+0.0937831700782j))+((-0.98896387248-0.152294519658j))*0.5**o
            arg[(1, 0, 0, 2)]=(0.876269802948+0.695106563297j)*x[0]**o + ((-0.554825720467-0.960679995352j))*x[0] + ((0.673790801411-0.338810964361j))*x[1]**o + ((-0.693138201945-0.00692962684059j))*x[1]
            ref[(1, 0, 0, 2)]=(0.673790801411-0.338810964361j)/(o+1.)+((-0.623981961206-0.483804811096j))+((0.876269802948+0.695106563297j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.500580511206-0.855972407371j)*x[0]**o + ((0.09637515713+0.450279584181j))*x[0] + ((0.0736829844053-0.293359415811j))*x[1]**o + ((0.879644140181-0.496154525837j))*x[1]
            ref[(1, 0, 1, 0)]=(0.0736829844053-0.293359415811j)/(o+1.)+((0.488009648655-0.0229374708279j))+((0.500580511206-0.855972407371j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.955428717024-0.165773307479j)*x[0]**o + ((0.398144632429-0.636002090798j))*x[0] + ((-0.994468170945+0.225350236298j))*x[1]**o + ((0.442283965212+0.522090717138j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.994468170945+0.225350236298j)/(o+1.)+((0.42021429882-0.05695568683j))+((-0.955428717024-0.165773307479j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.54362765421+0.834576386932j)*x[0]**o + ((0.570915802765+0.124041762637j))*x[0] + ((-0.134727947711+0.873829644221j))*x[1]**o + ((0.105582460151-0.346518250649j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.134727947711+0.873829644221j)/(o+1.)+((0.338249131458-0.111238244006j))+((0.54362765421+0.834576386932j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.785806764022-0.394782527145j)*x[0]**o + ((0.562471146224+0.845242072246j))*x[0] + ((0.0775177111535+0.569582809718j))*x[1]**o + ((0.587748994923-0.683966316141j))*x[1]
            ref[(1, 0, 2, 0)]=(0.0775177111535+0.569582809718j)/(o+1.)+((0.575110070574+0.0806378780527j))+((-0.785806764022-0.394782527145j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.329344387045-0.0436797934769j)*x[0]**o + ((-0.817738976134+0.330330448596j))*x[0] + ((0.743804017596+0.315519700318j))*x[1]**o + ((-0.886147694335-0.0828646085571j))*x[1]
            ref[(1, 0, 2, 1)]=(0.743804017596+0.315519700318j)/(o+1.)+((-0.851943335235+0.123732920019j))+((0.329344387045-0.0436797934769j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.395206154684-0.803316352016j)*x[0]**o + ((-0.154218041853+0.127729714265j))*x[0] + ((0.276019030682+0.761646870501j))*x[1]**o + ((0.0619532729918-0.39300192444j))*x[1]
            ref[(1, 0, 2, 2)]=(0.276019030682+0.761646870501j)/(o+1.)+((-0.0461323844306-0.132636105087j))+((-0.395206154684-0.803316352016j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.309030926328-0.0610080988376j)*x[0]**o + ((0.346468707489+0.507765111811j))*x[0] + ((-0.496877096499-0.0769351517294j))*x[1]**o + ((-0.167595542444+0.990586784505j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.496877096499-0.0769351517294j)/(o+1.)+((0.0894365825226+0.749175948158j))+((-0.309030926328-0.0610080988376j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.728892131707+0.736312087464j)*x[0]**o + ((0.741326181797-0.997922713646j))*x[0] + ((0.418904292203+0.472332066554j))*x[1]**o + ((0.790861145494+0.150191903429j))*x[1]
            ref[(1, 1, 0, 1)]=(0.418904292203+0.472332066554j)/(o+1.)+((0.766093663645-0.423865405108j))+((-0.728892131707+0.736312087464j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.635113228843-0.107511436761j)*x[0]**o + ((0.0297952980874-0.0363235290045j))*x[0] + ((-0.500291037781+0.88042189563j))*x[1]**o + ((-0.129874953758+0.354815224082j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.500291037781+0.88042189563j)/(o+1.)+((-0.0500398278352+0.159245847539j))+((0.635113228843-0.107511436761j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.620051934253+0.777601344172j)*x[0]**o + ((-0.359845518591+0.253078840354j))*x[0] + ((-0.929271279138+0.603144399992j))*x[1]**o + ((0.400322887639+0.340092589278j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.929271279138+0.603144399992j)/(o+1.)+((0.0202386845242+0.296585714816j))+((0.620051934253+0.777601344172j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.836417937807+0.102599139722j)*x[0]**o + ((0.292213441808+0.453821697656j))*x[0] + ((0.726309900057+0.460396037605j))*x[1]**o + ((0.639705089277-0.63923771648j))*x[1]
            ref[(1, 1, 1, 1)]=(0.726309900057+0.460396037605j)/(o+1.)+((0.465959265543-0.092708009412j))+((-0.836417937807+0.102599139722j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.0321136238126-0.210542246209j)*x[0]**o + ((-0.161399662053-0.870584219407j))*x[0] + ((-0.524399726449-0.636301369569j))*x[1]**o + ((-0.462423226179-0.456847069806j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.524399726449-0.636301369569j)/(o+1.)+((-0.311911444116-0.663715644606j))+((0.0321136238126-0.210542246209j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.250155839084+0.136013872965j)*x[0]**o + ((0.227244336524-0.691884468415j))*x[0] + ((0.918164992098-0.773518121944j))*x[1]**o + ((-0.83051790028-0.623553225746j))*x[1]
            ref[(1, 1, 2, 0)]=(0.918164992098-0.773518121944j)/(o+1.)+((-0.301636781878-0.65771884708j))+((0.250155839084+0.136013872965j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.697808108406+0.00905073175547j)*x[0]**o + ((0.856467668097+0.611352580474j))*x[0] + ((-0.581124706523-0.415390421415j))*x[1]**o + ((0.732921723287-0.902710874323j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.581124706523-0.415390421415j)/(o+1.)+((0.794694695692-0.145679146924j))+((0.697808108406+0.00905073175547j))*0.5**o
            arg[(1, 1, 2, 2)]=(-0.743199176549+0.657946609556j)*x[0]**o + ((0.833290839676+0.0123224593382j))*x[0] + ((0.525990950183-0.451183172325j))*x[1]**o + ((0.932752245944-0.132760478245j))*x[1]
            ref[(1, 1, 2, 2)]=(0.525990950183-0.451183172325j)/(o+1.)+((0.88302154281-0.0602190094532j))+((-0.743199176549+0.657946609556j))*0.5**o
            arg[(1, 2, 0, 0)]=(0.369194820889-0.130552085591j)*x[0]**o + ((0.587715264352-0.853614857336j))*x[0] + ((0.675961167083+0.302002538879j))*x[1]**o + ((0.133643085854-0.0161454893544j))*x[1]
            ref[(1, 2, 0, 0)]=(0.675961167083+0.302002538879j)/(o+1.)+((0.360679175103-0.434880173345j))+((0.369194820889-0.130552085591j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.900592924332-0.000821894890601j)*x[0]**o + ((0.501504354233+0.620540649042j))*x[0] + ((-0.894006545364-0.150835334121j))*x[1]**o + ((0.134192935813-0.418006319141j))*x[1]
            ref[(1, 2, 0, 1)]=(-0.894006545364-0.150835334121j)/(o+1.)+((0.317848645023+0.101267164951j))+((-0.900592924332-0.000821894890601j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.318529801311-0.356160164015j)*x[0]**o + ((0.578707340605-0.0912349394452j))*x[0] + ((-0.942298290617-0.22319670397j))*x[1]**o + ((0.446870963836+0.879382428396j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.942298290617-0.22319670397j)/(o+1.)+((0.512789152221+0.394073744475j))+((0.318529801311-0.356160164015j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.873331535692+0.290569636058j)*x[0]**o + ((0.523532528316-0.906429419674j))*x[0] + ((-0.972924386461-0.110155245589j))*x[1]**o + ((0.252738688777-0.522033165185j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.972924386461-0.110155245589j)/(o+1.)+((0.388135608547-0.714231292429j))+((-0.873331535692+0.290569636058j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.683467099431+0.508074324447j)*x[0]**o + ((0.733883272712+0.178043498246j))*x[0] + ((0.928530377246+0.0984300559337j))*x[1]**o + ((-0.404857902882-0.426462551473j))*x[1]
            ref[(1, 2, 1, 1)]=(0.928530377246+0.0984300559337j)/(o+1.)+((0.164512684915-0.124209526613j))+((0.683467099431+0.508074324447j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.460369488932-0.699046261355j)*x[0]**o + ((-0.0108040563622+0.864946122073j))*x[0] + ((0.223041671745-0.227680948528j))*x[1]**o + ((-0.434272082618-0.729265540125j))*x[1]
            ref[(1, 2, 1, 2)]=(0.223041671745-0.227680948528j)/(o+1.)+((-0.22253806949+0.0678402909741j))+((-0.460369488932-0.699046261355j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.249440756775-0.613541922909j)*x[0]**o + ((0.868049704853+0.364936432342j))*x[0] + ((0.0473679992945+0.881351092478j))*x[1]**o + ((0.489348111388-0.129233792096j))*x[1]
            ref[(1, 2, 2, 0)]=(0.0473679992945+0.881351092478j)/(o+1.)+((0.67869890812+0.117851320123j))+((-0.249440756775-0.613541922909j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.317368709786-0.824024096342j)*x[0]**o + ((0.732462381755+0.528277628267j))*x[0] + ((0.903402979112-0.818843217393j))*x[1]**o + ((0.566790878063+0.609734894875j))*x[1]
            ref[(1, 2, 2, 1)]=(0.903402979112-0.818843217393j)/(o+1.)+((0.649626629909+0.569006261571j))+((-0.317368709786-0.824024096342j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.290491124243+0.37765832435j)*x[0]**o + ((0.329712230404+0.970856797257j))*x[0] + ((0.165225261262+0.115862810137j))*x[1]**o + ((-0.64444708296+0.472986747687j))*x[1]
            ref[(1, 2, 2, 2)]=(0.165225261262+0.115862810137j)/(o+1.)+((-0.157367426278+0.721921772472j))+((0.290491124243+0.37765832435j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.50511024307+0.993465485964j)*x[0]**o + ((0.607340215755+0.951981676649j))*x[0] + ((0.770248517107+0.519623710632j))*x[1]**o + ((0.566458363339+0.981837742236j))*x[1]
            ref[(2, 0, 0, 0)]=(0.770248517107+0.519623710632j)/(o+1.)+((0.586899289547+0.966909709442j))+((-0.50511024307+0.993465485964j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.0881396572772-0.795801093056j)*x[0]**o + ((-0.749675023484+0.137072327376j))*x[0] + ((0.640743509696+0.843705528761j))*x[1]**o + ((0.520109902686+0.292183412862j))*x[1]
            ref[(2, 0, 0, 1)]=(0.640743509696+0.843705528761j)/(o+1.)+((-0.114782560399+0.214627870119j))+((0.0881396572772-0.795801093056j))*0.5**o
            arg[(2, 0, 0, 2)]=(0.669890620102+0.4870982677j)*x[0]**o + ((0.365425555823+0.932865723076j))*x[0] + ((0.993322816867-0.895408294564j))*x[1]**o + ((-0.619961960435+0.199720748369j))*x[1]
            ref[(2, 0, 0, 2)]=(0.993322816867-0.895408294564j)/(o+1.)+((-0.127268202306+0.566293235723j))+((0.669890620102+0.4870982677j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.104339302045+0.27555804418j)*x[0]**o + ((-0.00158976581309-0.496783865256j))*x[0] + ((0.809594176921+0.415424129126j))*x[1]**o + ((-0.116805024878-0.231200697166j))*x[1]
            ref[(2, 0, 1, 0)]=(0.809594176921+0.415424129126j)/(o+1.)+((-0.0591973953457-0.363992281211j))+((0.104339302045+0.27555804418j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.731633364438-0.95255139097j)*x[0]**o + ((0.0689609278615-0.797452151846j))*x[0] + ((0.94049594339+0.0372832664506j))*x[1]**o + ((-0.433237931319+0.513381524547j))*x[1]
            ref[(2, 0, 1, 1)]=(0.94049594339+0.0372832664506j)/(o+1.)+((-0.182138501729-0.142035313649j))+((-0.731633364438-0.95255139097j))*0.5**o
            arg[(2, 0, 1, 2)]=(-0.465028149718+0.442752936619j)*x[0]**o + ((0.449901810551+0.529137445389j))*x[0] + ((-0.997153188899+0.586795935223j))*x[1]**o + ((-0.112940441633+0.637634580543j))*x[1]
            ref[(2, 0, 1, 2)]=(-0.997153188899+0.586795935223j)/(o+1.)+((0.168480684459+0.583386012966j))+((-0.465028149718+0.442752936619j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.97625646523+0.959148600531j)*x[0]**o + ((-0.618578719997+0.595231007999j))*x[0] + ((-0.500226857768-0.390756149581j))*x[1]**o + ((0.496188540849+0.429416975483j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.500226857768-0.390756149581j)/(o+1.)+((-0.0611950895739+0.512323991741j))+((-0.97625646523+0.959148600531j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.685803600503-0.194859505066j)*x[0]**o + ((-0.347322343872+0.393603594246j))*x[0] + ((0.406003133349+0.615547829003j))*x[1]**o + ((0.866182026438+0.350264604492j))*x[1]
            ref[(2, 0, 2, 1)]=(0.406003133349+0.615547829003j)/(o+1.)+((0.259429841283+0.371934099369j))+((0.685803600503-0.194859505066j))*0.5**o
            arg[(2, 0, 2, 2)]=(0.382791274659+0.282637321487j)*x[0]**o + ((-0.632871536916+0.451903158767j))*x[0] + ((0.0223507959496+0.897195180075j))*x[1]**o + ((-0.77184484012+0.856044859663j))*x[1]
            ref[(2, 0, 2, 2)]=(0.0223507959496+0.897195180075j)/(o+1.)+((-0.702358188518+0.653974009215j))+((0.382791274659+0.282637321487j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.704845759858+0.229858608227j)*x[0]**o + ((0.40154940663+0.781087687714j))*x[0] + ((0.0701744504949-0.891372686877j))*x[1]**o + ((0.840850748558-0.638929650651j))*x[1]
            ref[(2, 1, 0, 0)]=(0.0701744504949-0.891372686877j)/(o+1.)+((0.621200077594+0.071079018532j))+((-0.704845759858+0.229858608227j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.067185536357+0.436226932548j)*x[0]**o + ((-0.8036462141-0.858216329809j))*x[0] + ((-0.430156177669-0.0526888807799j))*x[1]**o + ((0.399855133174+0.709002998824j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.430156177669-0.0526888807799j)/(o+1.)+((-0.201895540463-0.0746066654926j))+((-0.067185536357+0.436226932548j))*0.5**o
            arg[(2, 1, 0, 2)]=(0.495872372268-0.224626033288j)*x[0]**o + ((0.328988274312+0.845847265496j))*x[0] + ((0.699200125156+0.0532044986259j))*x[1]**o + ((-0.221598867966+0.671947816874j))*x[1]
            ref[(2, 1, 0, 2)]=(0.699200125156+0.0532044986259j)/(o+1.)+((0.0536947031726+0.758897541185j))+((0.495872372268-0.224626033288j))*0.5**o
            arg[(2, 1, 1, 0)]=(-0.931482864561+0.420799388704j)*x[0]**o + ((-0.555787231061+0.0482503810858j))*x[0] + ((-0.637212146052-0.0892166143308j))*x[1]**o + ((0.307876781566-0.53447198989j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.637212146052-0.0892166143308j)/(o+1.)+((-0.123955224747-0.243110804402j))+((-0.931482864561+0.420799388704j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.317012567392-0.0622044523355j)*x[0]**o + ((-0.183068468163-0.37235468881j))*x[0] + ((0.435195373046-0.505205239156j))*x[1]**o + ((-0.289134292377+0.422308398692j))*x[1]
            ref[(2, 1, 1, 1)]=(0.435195373046-0.505205239156j)/(o+1.)+((-0.23610138027+0.024976854941j))+((-0.317012567392-0.0622044523355j))*0.5**o
            arg[(2, 1, 1, 2)]=(-0.946752781517-0.742648709986j)*x[0]**o + ((0.369248890256+0.410198537114j))*x[0] + ((0.363947072276+0.184382375244j))*x[1]**o + ((0.290462563213+0.962404708301j))*x[1]
            ref[(2, 1, 1, 2)]=(0.363947072276+0.184382375244j)/(o+1.)+((0.329855726735+0.686301622708j))+((-0.946752781517-0.742648709986j))*0.5**o
            arg[(2, 1, 2, 0)]=(0.315202619236-0.944078190006j)*x[0]**o + ((-0.594679043165+0.844648567804j))*x[0] + ((-0.772415974386+0.950851249371j))*x[1]**o + ((0.977136904203+0.312714115624j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.772415974386+0.950851249371j)/(o+1.)+((0.191228930519+0.578681341714j))+((0.315202619236-0.944078190006j))*0.5**o
            arg[(2, 1, 2, 1)]=(0.66617354567+0.11792347938j)*x[0]**o + ((-0.985561903143-0.317691992443j))*x[0] + ((0.174748822459-0.732239997092j))*x[1]**o + ((0.86873123423+0.839877484265j))*x[1]
            ref[(2, 1, 2, 1)]=(0.174748822459-0.732239997092j)/(o+1.)+((-0.0584153344566+0.261092745911j))+((0.66617354567+0.11792347938j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.251497134598-0.99585819816j)*x[0]**o + ((0.766184207886+0.263602802681j))*x[0] + ((0.0718905878166+0.11518260541j))*x[1]**o + ((-0.583856987617-0.077734748049j))*x[1]
            ref[(2, 1, 2, 2)]=(0.0718905878166+0.11518260541j)/(o+1.)+((0.0911636101347+0.0929340273162j))+((0.251497134598-0.99585819816j))*0.5**o
            arg[(2, 2, 0, 0)]=(0.975838043944+0.10751576941j)*x[0]**o + ((-0.774512405672+0.522822945323j))*x[0] + ((-0.220886454181-0.214238995674j))*x[1]**o + ((0.348329089276-0.954303287028j))*x[1]
            ref[(2, 2, 0, 0)]=(-0.220886454181-0.214238995674j)/(o+1.)+((-0.213091658198-0.215740170853j))+((0.975838043944+0.10751576941j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.515413483343-0.444770679184j)*x[0]**o + ((-0.2369230891-0.661382190141j))*x[0] + ((-0.615218155699+0.424747419375j))*x[1]**o + ((0.582566092695-0.0453170575578j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.615218155699+0.424747419375j)/(o+1.)+((0.172821501797-0.353349623849j))+((0.515413483343-0.444770679184j))*0.5**o
            arg[(2, 2, 0, 2)]=(0.855765827896+0.833527571217j)*x[0]**o + ((0.639959743279-0.161417007985j))*x[0] + ((-0.389605976908-0.749411479768j))*x[1]**o + ((0.913738301015+0.0124445575459j))*x[1]
            ref[(2, 2, 0, 2)]=(-0.389605976908-0.749411479768j)/(o+1.)+((0.776849022147-0.0744862252197j))+((0.855765827896+0.833527571217j))*0.5**o
            arg[(2, 2, 1, 0)]=(-0.786364662482-0.675741121149j)*x[0]**o + ((-0.100726255029+0.218605766776j))*x[0] + ((-0.516250397798+0.43553496101j))*x[1]**o + ((0.395183796352-0.0114098053381j))*x[1]
            ref[(2, 2, 1, 0)]=(-0.516250397798+0.43553496101j)/(o+1.)+((0.147228770661+0.103597980719j))+((-0.786364662482-0.675741121149j))*0.5**o
            arg[(2, 2, 1, 1)]=(-0.969289510895+0.953213541909j)*x[0]**o + ((0.801376022835-0.103255452637j))*x[0] + ((-0.353278251838+0.427423141105j))*x[1]**o + ((-0.430535761121+0.295788459785j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.353278251838+0.427423141105j)/(o+1.)+((0.185420130857+0.0962665035739j))+((-0.969289510895+0.953213541909j))*0.5**o
            arg[(2, 2, 1, 2)]=(0.192643245206-0.532208514429j)*x[0]**o + ((0.0394187496313-0.252988097095j))*x[0] + ((-0.856630364752+0.0578213520838j))*x[1]**o + ((0.0827404866496+0.656785431055j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.856630364752+0.0578213520838j)/(o+1.)+((0.0610796181404+0.20189866698j))+((0.192643245206-0.532208514429j))*0.5**o
            arg[(2, 2, 2, 0)]=(-0.842494429002+0.10722904099j)*x[0]**o + ((-0.69706811355+0.283860134478j))*x[0] + ((-0.200941823574-0.73533879721j))*x[1]**o + ((0.424564937113-0.0716470724018j))*x[1]
            ref[(2, 2, 2, 0)]=(-0.200941823574-0.73533879721j)/(o+1.)+((-0.136251588219+0.106106531038j))+((-0.842494429002+0.10722904099j))*0.5**o
            arg[(2, 2, 2, 1)]=(-0.374772959926+0.587672858943j)*x[0]**o + ((0.313584536125-0.361648982926j))*x[0] + ((0.852084229417-0.547797453622j))*x[1]**o + ((-0.139339643256-0.327587317165j))*x[1]
            ref[(2, 2, 2, 1)]=(0.852084229417-0.547797453622j)/(o+1.)+((0.0871224464344-0.344618150046j))+((-0.374772959926+0.587672858943j))*0.5**o
            arg[(2, 2, 2, 2)]=(0.505503220516-0.0818132360439j)*x[0]**o + ((-0.74512356891-0.789657697233j))*x[0] + ((0.442181061191-0.913980291187j))*x[1]**o + ((0.0420946573321+0.173055568034j))*x[1]
            ref[(2, 2, 2, 2)]=(0.442181061191-0.913980291187j)/(o+1.)+((-0.351514455789-0.3083010646j))+((0.505503220516-0.0818132360439j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.170228885432-0.419438546691j)*x[0]**o + ((0.930847017022-0.520776105417j))*x[0] + ((-0.398223124921+0.918837885411j))*x[1]**o + ((-0.158740356036-0.742381820318j))*x[1] + ((-0.542880709167+0.381793615569j))*x[2]**o + ((-0.460509831085+0.268356598861j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.941103834087+1.30063150098j)/(o+1.)+((0.155798414951-0.497400663437j))+((0.170228885432-0.419438546691j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.858283551218-0.975987390283j)*x[0]**o + ((0.800945953457-0.305792404082j))*x[0] + ((0.458612867128-0.359824371952j))*x[1]**o + ((-0.427172263865+0.441290302548j))*x[1] + ((0.384833778024+0.925701491307j))*x[2]**o + ((-0.87515951612-0.521525590765j))*x[2]
            ref[(0, 0, 0, 1)]=(0.843446645152+0.565877119354j)/(o+1.)+((-0.250692913264-0.19301384615j))+((0.858283551218-0.975987390283j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.341094039143+0.0304293432446j)*x[0]**o + ((-0.966522739374+0.366662124056j))*x[0] + ((0.434028791692+0.947349294573j))*x[1]**o + ((-0.223855226874+0.398167747642j))*x[1] + ((-0.759559060369+0.639818265245j))*x[2]**o + ((0.660323360017+0.199514669217j))*x[2]
            ref[(0, 0, 0, 2)]=(-0.325530268677+1.58716755982j)/(o+1.)+((-0.265027303116+0.482172270457j))+((0.341094039143+0.0304293432446j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.511922089466+0.143832816895j)*x[0]**o + ((-0.652870682933-0.698696804181j))*x[0] + ((-0.729233955019-0.565915672034j))*x[1]**o + ((-0.187995938292+0.0435990470527j))*x[1] + ((0.207225026968+0.981771868826j))*x[2]**o + ((-0.796938600166+0.237719209398j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.522008928051+0.415856196793j)/(o+1.)+((-0.818902610695-0.208689273865j))+((-0.511922089466+0.143832816895j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.851346127173+0.939838228195j)*x[0]**o + ((0.375065489478+0.690376796427j))*x[0] + ((0.832594115811+0.448140353502j))*x[1]**o + ((0.238518769887-0.711884743048j))*x[1] + ((-0.17535747702-0.12428003606j))*x[2]**o + ((0.142902271847-0.438896325641j))*x[2]
            ref[(0, 0, 1, 1)]=(0.657236638792+0.323860317443j)/(o+1.)+((0.378243265606-0.230202136131j))+((0.851346127173+0.939838228195j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.938573297735-0.608635435891j)*x[0]**o + ((-0.821521594444-0.178808281409j))*x[0] + ((0.0951337448436+0.204323158644j))*x[1]**o + ((-0.183637092284+0.50142443599j))*x[1] + ((0.709971565452+0.0952618988289j))*x[2]**o + ((0.70008698137-0.123685762673j))*x[2]
            ref[(0, 0, 1, 2)]=(0.805105310296+0.299585057473j)/(o+1.)+((-0.152535852679+0.099465195954j))+((-0.938573297735-0.608635435891j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.669221706115+0.413300223279j)*x[0]**o + ((-0.34143536859-0.703740024789j))*x[0] + ((0.554115135736-0.757061823908j))*x[1]**o + ((0.753043052679-0.181284626847j))*x[1] + ((-0.470296295313+0.139588973379j))*x[2]**o + ((-0.954802989357-0.784483763606j))*x[2]
            ref[(0, 0, 2, 0)]=(0.0838188404226-0.617472850529j)/(o+1.)+((-0.271597652634-0.834754207621j))+((0.669221706115+0.413300223279j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.944409329512+0.735676430742j)*x[0]**o + ((-0.366346695756-0.63581860549j))*x[0] + ((0.964416047443+0.673214997624j))*x[1]**o + ((0.991395155698+0.853235966681j))*x[1] + ((0.953063406198+0.584609140318j))*x[2]**o + ((-0.47778785307-0.169477798194j))*x[2]
            ref[(0, 0, 2, 1)]=(1.91747945364+1.25782413794j)/(o+1.)+((0.073630303436+0.0239697814988j))+((0.944409329512+0.735676430742j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.842169537334+0.656931000131j)*x[0]**o + ((0.118723575397-0.634066732841j))*x[0] + ((0.731778597618+0.520174116987j))*x[1]**o + ((0.801696584161-0.104974750593j))*x[1] + ((0.546843829525+0.530530801261j))*x[2]**o + ((-0.451159999027+0.398344508708j))*x[2]
            ref[(0, 0, 2, 2)]=(1.27862242714+1.05070491825j)/(o+1.)+((0.234630080266-0.170348487363j))+((0.842169537334+0.656931000131j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.0132346046207+0.254959693267j)*x[0]**o + ((-0.977621506496+0.366808639241j))*x[0] + ((0.802613237696+0.701881688874j))*x[1]**o + ((0.911489706208-0.938172877117j))*x[1] + ((0.824335276238+0.479586801422j))*x[2]**o + ((0.800244331551-0.471688125948j))*x[2]
            ref[(0, 1, 0, 0)]=(1.62694851393+1.1814684903j)/(o+1.)+((0.367056265631-0.521526181912j))+((-0.0132346046207+0.254959693267j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.515547281012-0.136372179613j)*x[0]**o + ((-0.541260328053+0.0997652921391j))*x[0] + ((-0.414725078072-0.62336317207j))*x[1]**o + ((0.246815920656-0.715891943206j))*x[1] + ((0.115292098635+0.867958319818j))*x[2]**o + ((-0.626912399423+0.480151286354j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.299432979438+0.244595147748j)/(o+1.)+((-0.46067840341-0.0679876823566j))+((0.515547281012-0.136372179613j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.0313409619966+0.740726761073j)*x[0]**o + ((0.229873519269+0.0570510420605j))*x[0] + ((0.388464320486+0.731979583668j))*x[1]**o + ((0.278063566134+0.166465891676j))*x[1] + ((0.0183516360122+0.644265415809j))*x[2]**o + ((-0.179616991014+0.677511484956j))*x[2]
            ref[(0, 1, 0, 2)]=(0.406815956498+1.37624499948j)/(o+1.)+((0.164160047194+0.450514209346j))+((-0.0313409619966+0.740726761073j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.750464904053+0.96607272336j)*x[0]**o + ((0.142090694075-0.806546527508j))*x[0] + ((-0.700447064611-0.321239276929j))*x[1]**o + ((0.778945949125-0.407002498216j))*x[1] + ((-0.88552081575-0.118331218926j))*x[2]**o + ((-0.0188966741139+0.276245005884j))*x[2]
            ref[(0, 1, 1, 0)]=(-1.58596788036-0.439570495856j)/(o+1.)+((0.451069984543-0.46865200992j))+((0.750464904053+0.96607272336j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.286481834084-0.0708066735046j)*x[0]**o + ((-0.744093921092-0.74238837086j))*x[0] + ((0.81641914376+0.311766210961j))*x[1]**o + ((0.561494508896-0.623719883774j))*x[1] + ((-0.921977004766+0.218043554764j))*x[2]**o + ((0.582662278021-0.638576480408j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.105557861006+0.529809765725j)/(o+1.)+((0.200031432913-1.00234236752j))+((-0.286481834084-0.0708066735046j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.6889313589+0.269459567577j)*x[0]**o + ((-0.107652522991-0.865989168364j))*x[0] + ((0.297571831943+0.760153005748j))*x[1]**o + ((-0.0442264921066+0.877736106368j))*x[1] + ((-0.700891126894+0.568446940554j))*x[2]**o + ((-0.572318428412-0.799679482196j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.403319294951+1.3285999463j)/(o+1.)+((-0.362098721755-0.393966272096j))+((0.6889313589+0.269459567577j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.155458743811+0.384493860459j)*x[0]**o + ((-0.738176214051-0.136001207686j))*x[0] + ((0.62355107381-0.455610632651j))*x[1]**o + ((0.514729985368-0.451275556694j))*x[1] + ((0.798181122025-0.537080923036j))*x[2]**o + ((-0.0261499315498-0.811784465942j))*x[2]
            ref[(0, 1, 2, 0)]=(1.42173219584-0.992691555687j)/(o+1.)+((-0.124798080116-0.699530615161j))+((0.155458743811+0.384493860459j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.280313975182-0.862114067524j)*x[0]**o + ((0.0944419931801+0.697304409369j))*x[0] + ((-0.17034470867-0.921746540541j))*x[1]**o + ((0.778687138387+0.184284893706j))*x[1] + ((0.263458494475+0.174999178106j))*x[2]**o + ((-0.720739007934+0.478437339629j))*x[2]
            ref[(0, 1, 2, 1)]=(0.0931137858049-0.746747362435j)/(o+1.)+((0.0761950618164+0.680013321352j))+((0.280313975182-0.862114067524j))*0.5**o
            arg[(0, 1, 2, 2)]=(-0.854352188605+0.478936640604j)*x[0]**o + ((0.390195968416-0.935136813137j))*x[0] + ((0.84739002833+0.365829261209j))*x[1]**o + ((0.942769682759-0.277546877479j))*x[1] + ((0.849584701429+0.495089119428j))*x[2]**o + ((0.0128153477328-0.445964098847j))*x[2]
            ref[(0, 1, 2, 2)]=(1.69697472976+0.860918380637j)/(o+1.)+((0.672890499454-0.829323894731j))+((-0.854352188605+0.478936640604j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.644530418083+0.219044316573j)*x[0]**o + ((0.662402766845+0.684250762996j))*x[0] + ((0.905520582423+0.928997334264j))*x[1]**o + ((-0.789743431018+0.244012344692j))*x[1] + ((0.811912255181+0.587359878683j))*x[2]**o + ((-0.624204121898+0.234247443026j))*x[2]
            ref[(0, 2, 0, 0)]=(1.7174328376+1.51635721295j)/(o+1.)+((-0.375772393035+0.581255275357j))+((-0.644530418083+0.219044316573j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.886274017392-0.0977328706848j)*x[0]**o + ((-0.621772393428-0.751610705622j))*x[0] + ((-0.527533956799-0.951184117803j))*x[1]**o + ((-0.910816633762+0.46837979102j))*x[1] + ((-0.52471131205-0.617890734896j))*x[2]**o + ((-0.843004567329-0.168160686816j))*x[2]
            ref[(0, 2, 0, 1)]=(-1.05224526885-1.5690748527j)/(o+1.)+((-1.18779679726-0.225695800709j))+((0.886274017392-0.0977328706848j))*0.5**o
            arg[(0, 2, 0, 2)]=(-0.988673845551+0.901485722049j)*x[0]**o + ((-0.787667136793-0.938373053502j))*x[0] + ((0.599723617043+0.679703228057j))*x[1]**o + ((-0.514635149689-0.134639719432j))*x[1] + ((0.422158830979-0.191036599595j))*x[2]**o + ((0.78302344795+0.354859108164j))*x[2]
            ref[(0, 2, 0, 2)]=(1.02188244802+0.488666628462j)/(o+1.)+((-0.259639419266-0.359076832385j))+((-0.988673845551+0.901485722049j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.0351476865792+0.520535581917j)*x[0]**o + ((0.866827228638+0.824795785705j))*x[0] + ((-0.112687993807-0.784649283033j))*x[1]**o + ((0.639439380901-0.407350437375j))*x[1] + ((-0.948620579717-0.143009704219j))*x[2]**o + ((-0.761519889193-0.545998359479j))*x[2]
            ref[(0, 2, 1, 0)]=(-1.06130857352-0.927658987252j)/(o+1.)+((0.372373360173-0.0642765055747j))+((-0.0351476865792+0.520535581917j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.651272670566+0.194168505459j)*x[0]**o + ((0.649283544396+0.935030018761j))*x[0] + ((-0.573778857097+0.100825287304j))*x[1]**o + ((0.912585663765+0.541290043889j))*x[1] + ((-0.532843801477+0.902471483711j))*x[2]**o + ((-0.58735860993-0.125901782538j))*x[2]
            ref[(0, 2, 1, 1)]=(-1.10662265857+1.00329677102j)/(o+1.)+((0.487255299116+0.675209140056j))+((-0.651272670566+0.194168505459j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.50294005336+0.411074698384j)*x[0]**o + ((0.200792054739+0.134946571958j))*x[0] + ((0.548437862436-0.187793042402j))*x[1]**o + ((0.0635891700583+0.109340579374j))*x[1] + ((-0.378090140808-0.0105136524479j))*x[2]**o + ((-0.443053467893-0.0406740815781j))*x[2]
            ref[(0, 2, 1, 2)]=(0.170347721628-0.19830669485j)/(o+1.)+((-0.0893361215476+0.101806534877j))+((-0.50294005336+0.411074698384j))*0.5**o
            arg[(0, 2, 2, 0)]=(0.259903380048-0.562399429726j)*x[0]**o + ((0.82542759832+0.0272290948298j))*x[0] + ((-0.85477134317+0.298755177183j))*x[1]**o + ((-0.978595869978+0.319459833132j))*x[1] + ((-0.652790996027+0.937284117565j))*x[2]**o + ((0.704309687643-0.148452367269j))*x[2]
            ref[(0, 2, 2, 0)]=(-1.5075623392+1.23603929475j)/(o+1.)+((0.275570707993+0.0991182803461j))+((0.259903380048-0.562399429726j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.345812545294-0.272804883549j)*x[0]**o + ((0.72867381681+0.969388059581j))*x[0] + ((0.538055443928-0.249371421982j))*x[1]**o + ((-0.386616753698+0.515363939688j))*x[1] + ((0.897595007186-0.385190606554j))*x[2]**o + ((0.485351411555+0.0072466586748j))*x[2]
            ref[(0, 2, 2, 1)]=(1.43565045111-0.634562028536j)/(o+1.)+((0.413704237333+0.745999328972j))+((0.345812545294-0.272804883549j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.107455072385-0.983861719833j)*x[0]**o + ((0.66566745445-0.553526138657j))*x[0] + ((0.275489228227-0.514234169569j))*x[1]**o + ((0.710404924218+0.949997841619j))*x[1] + ((0.63989313801+0.666023949896j))*x[2]**o + ((-0.684548270019-0.551881063882j))*x[2]
            ref[(0, 2, 2, 2)]=(0.915382366237+0.151789780327j)/(o+1.)+((0.345762054325-0.0777046804601j))+((0.107455072385-0.983861719833j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.281128002795+0.22416022488j)*x[0]**o + ((-0.47127974797+0.119936446025j))*x[0] + ((0.917684377571+0.45700025327j))*x[1]**o + ((-0.881400555577-0.463305073028j))*x[1] + ((-0.826866854377-0.977539413449j))*x[2]**o + ((-0.454635966175+0.440395098495j))*x[2]
            ref[(1, 0, 0, 0)]=(0.0908175231935-0.520539160179j)/(o+1.)+((-0.903658134861+0.0485132357459j))+((0.281128002795+0.22416022488j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.326539127436+0.151297402007j)*x[0]**o + ((-0.190281141916+0.961339650557j))*x[0] + ((-0.915537751948+0.472601234277j))*x[1]**o + ((-0.548369710189-0.964267191525j))*x[1] + ((0.101349127169-0.703727116905j))*x[2]**o + ((-0.583234497208-0.558559524481j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.814188624779-0.231125882629j)/(o+1.)+((-0.660942674657-0.280743532725j))+((0.326539127436+0.151297402007j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.882007626618-0.0257576172171j)*x[0]**o + ((-0.788692718398+0.368807057888j))*x[0] + ((0.477861655762-0.173071500875j))*x[1]**o + ((-0.75488413048+0.740547419942j))*x[1] + ((0.322374637967-0.436650636896j))*x[2]**o + ((-0.758329538664+0.317009187729j))*x[2]
            ref[(1, 0, 0, 2)]=(0.80023629373-0.60972213777j)/(o+1.)+((-1.15095319377+0.713181832779j))+((-0.882007626618-0.0257576172171j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.0704389103099-0.377637226304j)*x[0]**o + ((0.740805678676-0.545447530677j))*x[0] + ((-0.915756353391-0.568214022813j))*x[1]**o + ((-0.386362329532-0.937344082864j))*x[1] + ((0.145268909745-0.0961029255711j))*x[2]**o + ((0.280065439815+0.360393695626j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.770487443645-0.664316948384j)/(o+1.)+((0.31725439448-0.561198958958j))+((0.0704389103099-0.377637226304j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.619140886594-0.691520171046j)*x[0]**o + ((0.792696350285+0.687889938454j))*x[0] + ((0.171576263054+0.172301895987j))*x[1]**o + ((-0.39966791343+0.577164724052j))*x[1] + ((-0.528441064981-0.87355290101j))*x[2]**o + ((-0.271612571799-0.12147401773j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.356864801927-0.701251005023j)/(o+1.)+((0.060707932528+0.571790322388j))+((-0.619140886594-0.691520171046j))*0.5**o
            arg[(1, 0, 1, 2)]=(-0.534994589697-0.0713345761484j)*x[0]**o + ((-0.573013549134+0.865598576428j))*x[0] + ((0.182438585467-0.987067051237j))*x[1]**o + ((0.549326733863+0.399667926766j))*x[1] + ((0.787844172352-0.356963492942j))*x[2]**o + ((0.823452151222-0.0605949833448j))*x[2]
            ref[(1, 0, 1, 2)]=(0.970282757819-1.34403054418j)/(o+1.)+((0.399882667976+0.602335759925j))+((-0.534994589697-0.0713345761484j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.42943546622+0.491245829481j)*x[0]**o + ((0.293411387072-0.918014275072j))*x[0] + ((-0.51258654664-0.930349079819j))*x[1]**o + ((0.732352677397+0.380990837583j))*x[1] + ((-0.544883654627+0.105349603808j))*x[2]**o + ((-0.482401541477-0.716893803171j))*x[2]
            ref[(1, 0, 2, 0)]=(-1.05747020127-0.824999476011j)/(o+1.)+((0.271681261496-0.62695862033j))+((0.42943546622+0.491245829481j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.665134663654-0.309892658526j)*x[0]**o + ((-0.661659642462+0.61345632431j))*x[0] + ((0.630302347941+0.0541009672661j))*x[1]**o + ((0.117966334834-0.618106585424j))*x[1] + ((0.272034986205-0.718338592709j))*x[2]**o + ((0.469664557405-0.406486112327j))*x[2]
            ref[(1, 0, 2, 1)]=(0.902337334145-0.664237625443j)/(o+1.)+((-0.0370143751111-0.20556818672j))+((0.665134663654-0.309892658526j))*0.5**o
            arg[(1, 0, 2, 2)]=(0.244190789393+0.681856305643j)*x[0]**o + ((-0.34544537169-0.136998093972j))*x[0] + ((0.847634123686-0.360605153224j))*x[1]**o + ((-0.0683059674982-0.0429937707484j))*x[1] + ((-0.262994470255+0.758038571138j))*x[2]**o + ((0.722271007719-0.800828176573j))*x[2]
            ref[(1, 0, 2, 2)]=(0.584639653431+0.397433417914j)/(o+1.)+((0.154259834265-0.490410020647j))+((0.244190789393+0.681856305643j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.836762369211+0.963420431095j)*x[0]**o + ((0.556620465011+0.404880633536j))*x[0] + ((0.807421706171+0.418365581612j))*x[1]**o + ((0.691864008577-0.253504603227j))*x[1] + ((-0.641723567419-0.64955194933j))*x[2]**o + ((0.474483411126+0.77175659505j))*x[2]
            ref[(1, 1, 0, 0)]=(0.165698138751-0.231186367718j)/(o+1.)+((0.861483942357+0.461566312679j))+((0.836762369211+0.963420431095j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.184236340627-0.612227762982j)*x[0]**o + ((0.418924932947+0.980200939704j))*x[0] + ((-0.994460393264-0.0373945958795j))*x[1]**o + ((-0.650413350867-0.241109042233j))*x[1] + ((0.947388504487-0.386938598583j))*x[2]**o + ((0.607997446113-0.10062869208j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.0470718887767-0.424333194462j)/(o+1.)+((0.188254514097+0.319231602696j))+((0.184236340627-0.612227762982j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.71567784872+0.9534665462j)*x[0]**o + ((-0.0705157581038+0.934146500041j))*x[0] + ((-0.643411770984-0.441137558775j))*x[1]**o + ((-0.297821047992-0.841315680932j))*x[1] + ((0.028907645426-0.774160443014j))*x[2]**o + ((-0.39823833085-0.458951041283j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.614504125558-1.21529800179j)/(o+1.)+((-0.383287568473-0.183060111087j))+((0.71567784872+0.9534665462j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.383015028837+0.821083855825j)*x[0]**o + ((-0.272181448204-0.694854017028j))*x[0] + ((-0.928399429824+0.0439628494816j))*x[1]**o + ((0.62530289208+0.534469637642j))*x[1] + ((-0.990630982797+0.658855332532j))*x[2]**o + ((0.348401508527+0.785196480482j))*x[2]
            ref[(1, 1, 1, 0)]=(-1.91903041262+0.702818182013j)/(o+1.)+((0.350761476202+0.312406050548j))+((-0.383015028837+0.821083855825j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.962713830648+0.961342290009j)*x[0]**o + ((-0.0948577624952+0.407869842463j))*x[0] + ((0.108295933129+0.39747870644j))*x[1]**o + ((0.576515111237+0.310881092998j))*x[1] + ((0.582312082492-0.119163468973j))*x[2]**o + ((0.465565616282+0.585174727333j))*x[2]
            ref[(1, 1, 1, 1)]=(0.69060801562+0.278315237468j)/(o+1.)+((0.473611482512+0.651962831397j))+((-0.962713830648+0.961342290009j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.682549229258-0.412344714971j)*x[0]**o + ((0.502957935908-0.934308106755j))*x[0] + ((0.258828175901+0.647011596497j))*x[1]**o + ((-0.731700359531+0.256435848979j))*x[1] + ((0.583561986001+0.47237328846j))*x[2]**o + ((0.668620979367-0.663561470424j))*x[2]
            ref[(1, 1, 1, 2)]=(0.842390161902+1.11938488496j)/(o+1.)+((0.219939277872-0.6707168641j))+((-0.682549229258-0.412344714971j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.677153719862+0.0793877184054j)*x[0]**o + ((0.668401135721-0.693346419968j))*x[0] + ((-0.711446604606-0.980134052031j))*x[1]**o + ((0.00647349258507+0.0993899621683j))*x[1] + ((0.465505543346-0.833204530086j))*x[2]**o + ((0.584164601249+0.595840670729j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.24594106126-1.81333858212j)/(o+1.)+((0.629519614778+0.000942106464864j))+((0.677153719862+0.0793877184054j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.135840516429+0.736714813334j)*x[0]**o + ((0.37922583559-0.964867595479j))*x[0] + ((-0.0856769300332-0.929087158287j))*x[1]**o + ((0.565369552582+0.683305384897j))*x[1] + ((0.0621903855007-0.998885708702j))*x[2]**o + ((-0.488522461869-0.0973274846689j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.0234865445325-1.92797286699j)/(o+1.)+((0.228036463152-0.189444847625j))+((0.135840516429+0.736714813334j))*0.5**o
            arg[(1, 1, 2, 2)]=(-0.750179182845-0.0578264234157j)*x[0]**o + ((0.573615019356-0.517199008006j))*x[0] + ((0.322875111391+0.604354931164j))*x[1]**o + ((-0.333533063839-0.850185927163j))*x[1] + ((-0.909581569817+0.199933443037j))*x[2]**o + ((-0.569848589868+0.624401054169j))*x[2]
            ref[(1, 1, 2, 2)]=(-0.586706458426+0.804288374201j)/(o+1.)+((-0.164883317175-0.3714919405j))+((-0.750179182845-0.0578264234157j))*0.5**o
            arg[(1, 2, 0, 0)]=(0.691964629841+0.720230063443j)*x[0]**o + ((0.566152240952-0.488615729876j))*x[0] + ((-0.481624365117+0.538347285408j))*x[1]**o + ((-0.741401545608-0.772551231799j))*x[1] + ((0.760163511949-0.880136843083j))*x[2]**o + ((0.421836361936-0.73117316354j))*x[2]
            ref[(1, 2, 0, 0)]=(0.278539146833-0.341789557675j)/(o+1.)+((0.12329352864-0.996170062607j))+((0.691964629841+0.720230063443j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.615998648828+0.907334768336j)*x[0]**o + ((0.430930861419-0.225106774075j))*x[0] + ((0.533921912308-0.232061457792j))*x[1]**o + ((-0.356897757568+0.962860899165j))*x[1] + ((0.186489197351+0.8448233415j))*x[2]**o + ((-0.246296251022+0.194058394245j))*x[2]
            ref[(1, 2, 0, 1)]=(0.72041110966+0.612761883708j)/(o+1.)+((-0.0861315735855+0.465906259667j))+((0.615998648828+0.907334768336j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.880133992516+0.106049188441j)*x[0]**o + ((-0.701087425482-0.293379537151j))*x[0] + ((-0.232510060617-0.00555414135033j))*x[1]**o + ((-0.369922878801-0.0207617058892j))*x[1] + ((-0.277332660519-0.94003169747j))*x[2]**o + ((-0.34481073531-0.285481966472j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.509842721136-0.94558583882j)/(o+1.)+((-0.707910519797-0.299811604756j))+((0.880133992516+0.106049188441j))*0.5**o
            arg[(1, 2, 1, 0)]=(0.629471936341+0.787266665542j)*x[0]**o + ((-0.210740098741+0.825154558071j))*x[0] + ((-0.462261135284-0.129625463673j))*x[1]**o + ((0.614113879951-0.732743819718j))*x[1] + ((-0.550463558026+0.450713047331j))*x[2]**o + ((-0.860440747192+0.903007940857j))*x[2]
            ref[(1, 2, 1, 0)]=(-1.01272469331+0.321087583658j)/(o+1.)+((-0.228533482991+0.497709339605j))+((0.629471936341+0.787266665542j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.434678381701-0.67118829793j)*x[0]**o + ((-0.431661243424+0.459402661941j))*x[0] + ((-0.397258365155-0.66876824821j))*x[1]**o + ((-0.38634153365+0.939752044247j))*x[1] + ((0.012410350471+0.201382968242j))*x[2]**o + ((0.758739126988-0.714952025407j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.384848014684-0.467385279968j)/(o+1.)+((-0.0296318250431+0.342101340391j))+((-0.434678381701-0.67118829793j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.0755630156357+0.207889186718j)*x[0]**o + ((-0.335807528512-0.887821133841j))*x[0] + ((0.3971764836+0.0126899524612j))*x[1]**o + ((-0.706606467599+0.461837324681j))*x[1] + ((-0.400799016463+0.0115822593245j))*x[2]**o + ((-0.64409520896+0.535505206045j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.00362253286253+0.0242722117857j)/(o+1.)+((-0.843254602535+0.0547606984423j))+((-0.0755630156357+0.207889186718j))*0.5**o
            arg[(1, 2, 2, 0)]=(0.640993747106-0.333072148722j)*x[0]**o + ((0.384529575752+0.407216996619j))*x[0] + ((-0.831146232911-0.823973735797j))*x[1]**o + ((0.136905511905-0.999728983901j))*x[1] + ((0.128944462738-0.423756967641j))*x[2]**o + ((-0.541304566958+0.66384510681j))*x[2]
            ref[(1, 2, 2, 0)]=(-0.702201770172-1.24773070344j)/(o+1.)+((-0.00993473965055+0.035666559764j))+((0.640993747106-0.333072148722j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.528307330285+0.949291924112j)*x[0]**o + ((-0.389632430116+0.306469821159j))*x[0] + ((-0.501981936464-0.590170826829j))*x[1]**o + ((0.664625580493-0.614098252958j))*x[1] + ((0.551716479747+0.505126977422j))*x[2]**o + ((0.746758052455-0.75258565779j))*x[2]
            ref[(1, 2, 2, 1)]=(0.0497345432829-0.0850438494078j)/(o+1.)+((0.510875601416-0.530107044795j))+((-0.528307330285+0.949291924112j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.302200278988-0.304019892561j)*x[0]**o + ((0.529008234142-0.823626884573j))*x[0] + ((0.602466027884-0.78043551802j))*x[1]**o + ((-0.265413817903-0.216508619036j))*x[1] + ((0.802521649631-0.131075867223j))*x[2]**o + ((-0.781191645089-0.702021445622j))*x[2]
            ref[(1, 2, 2, 2)]=(1.40498767752-0.911511385243j)/(o+1.)+((-0.258798614425-0.871078474616j))+((0.302200278988-0.304019892561j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.00824070382959-0.192066756335j)*x[0]**o + ((-0.549340517567+0.698258503022j))*x[0] + ((0.618735188029-0.311463054737j))*x[1]**o + ((0.161821022087+0.25499426865j))*x[1] + ((0.831681737536+0.366850924755j))*x[2]**o + ((-0.258923485675-0.682466906314j))*x[2]
            ref[(2, 0, 0, 0)]=(1.45041692556+0.0553878700181j)/(o+1.)+((-0.323221490578+0.135392932679j))+((-0.00824070382959-0.192066756335j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.171341435023+0.806716605095j)*x[0]**o + ((-0.125342798634-0.0699010759076j))*x[0] + ((0.309199474994-0.0641964960338j))*x[1]**o + ((0.949248624756+0.839491728789j))*x[1] + ((0.153998334656+0.865223475289j))*x[2]**o + ((0.878044313594-0.706985442514j))*x[2]
            ref[(2, 0, 0, 1)]=(0.46319780965+0.801026979255j)/(o+1.)+((0.850975069858+0.0313026051838j))+((0.171341435023+0.806716605095j))*0.5**o
            arg[(2, 0, 0, 2)]=(-0.0762711063059-0.936725280106j)*x[0]**o + ((-0.240760467805+0.475498283704j))*x[0] + ((0.39827515423-0.108353761281j))*x[1]**o + ((0.577265881548-0.586577758449j))*x[1] + ((0.420465113676+0.608915804267j))*x[2]**o + ((-0.104628721385-0.761753393996j))*x[2]
            ref[(2, 0, 0, 2)]=(0.818740267906+0.500562042986j)/(o+1.)+((0.115938346179-0.43641643437j))+((-0.0762711063059-0.936725280106j))*0.5**o
            arg[(2, 0, 1, 0)]=(-0.0412739910199+0.294765923454j)*x[0]**o + ((-0.919119338398+0.772308351077j))*x[0] + ((-0.264789934069+0.311835257394j))*x[1]**o + ((-0.0316639732488-0.917853130566j))*x[1] + ((-0.88661396675-0.440780580494j))*x[2]**o + ((0.617568448356+0.671919679323j))*x[2]
            ref[(2, 0, 1, 0)]=(-1.15140390082-0.128945323099j)/(o+1.)+((-0.166607431645+0.263187449917j))+((-0.0412739910199+0.294765923454j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.632700532495-0.34988999058j)*x[0]**o + ((0.967113448151+0.613489567312j))*x[0] + ((-0.797216340496+0.280147224662j))*x[1]**o + ((0.146437745689-0.923704650446j))*x[1] + ((0.502472403888-0.289161560773j))*x[2]**o + ((-0.644554711827+0.0143559285379j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.294743936608-0.00901433611117j)/(o+1.)+((0.234498241006-0.147929577298j))+((-0.632700532495-0.34988999058j))*0.5**o
            arg[(2, 0, 1, 2)]=(-0.873107301875+0.490255368154j)*x[0]**o + ((-0.23201231128+0.215243997643j))*x[0] + ((-0.688033315234+0.196118515327j))*x[1]**o + ((-0.496287784084-0.384270373254j))*x[1] + ((0.80759064958+0.755989159712j))*x[2]**o + ((-0.625440206129+0.0186245907941j))*x[2]
            ref[(2, 0, 1, 2)]=(0.119557334346+0.952107675038j)/(o+1.)+((-0.676870150747-0.0752008924081j))+((-0.873107301875+0.490255368154j))*0.5**o
            arg[(2, 0, 2, 0)]=(0.0101890619004-0.754216677513j)*x[0]**o + ((-0.557063702492+0.0421974237504j))*x[0] + ((0.611598703782-0.506117898345j))*x[1]**o + ((-0.45788265751+0.0672780429192j))*x[1] + ((0.833906881295-0.893297295925j))*x[2]**o + ((-0.972675837643+0.301731177639j))*x[2]
            ref[(2, 0, 2, 0)]=(1.44550558508-1.39941519427j)/(o+1.)+((-0.993811098823+0.205603322154j))+((0.0101890619004-0.754216677513j))*0.5**o
            arg[(2, 0, 2, 1)]=(0.360850760413-0.469672528314j)*x[0]**o + ((0.226996773584+0.61941958717j))*x[0] + ((-0.137971788788-0.385215673605j))*x[1]**o + ((-0.896726175544+0.583992801341j))*x[1] + ((0.49278844936+0.948804267013j))*x[2]**o + ((0.480536493708-0.490232419309j))*x[2]
            ref[(2, 0, 2, 1)]=(0.354816660572+0.563588593408j)/(o+1.)+((-0.094596454126+0.356589984601j))+((0.360850760413-0.469672528314j))*0.5**o
            arg[(2, 0, 2, 2)]=(-0.270642031949+0.747269766264j)*x[0]**o + ((-0.822548113019+0.627959345068j))*x[0] + ((-0.964917812827-0.331776348791j))*x[1]**o + ((0.536536539609-0.83241029819j))*x[1] + ((0.709148887631-0.347249935965j))*x[2]**o + ((-0.994332157739+0.487695223591j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.255768925195-0.679026284756j)/(o+1.)+((-0.640171865574+0.141622135234j))+((-0.270642031949+0.747269766264j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.825952971448-0.994396309167j)*x[0]**o + ((0.991394627642+0.484770865286j))*x[0] + ((-0.840606378688-0.403817244681j))*x[1]**o + ((-0.159365849068-0.99383319998j))*x[1] + ((0.635961852469-0.975672929991j))*x[2]**o + ((0.046728127935+0.800302492915j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.204644526219-1.37949017467j)/(o+1.)+((0.439378453255+0.145620079111j))+((-0.825952971448-0.994396309167j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.632491199831+0.922865234364j)*x[0]**o + ((-0.834981970563-0.850363328207j))*x[0] + ((-0.776693141436+0.431719117276j))*x[1]**o + ((-0.972335154442+0.986321239543j))*x[1] + ((0.0320486510483-0.855363436882j))*x[2]**o + ((0.0717686213216+0.127087757895j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.744644490388-0.423644319606j)/(o+1.)+((-0.867774251842+0.131522834616j))+((-0.632491199831+0.922865234364j))*0.5**o
            arg[(2, 1, 0, 2)]=(0.377782507296+0.381791524056j)*x[0]**o + ((-0.448480985912-0.639969426195j))*x[0] + ((0.422625540142-0.874261842532j))*x[1]**o + ((0.30271776625+0.502924104017j))*x[1] + ((0.327593227727-0.40211006785j))*x[2]**o + ((0.0174313066484-0.305925235765j))*x[2]
            ref[(2, 1, 0, 2)]=(0.750218767869-1.27637191038j)/(o+1.)+((-0.0641659565072-0.221485278971j))+((0.377782507296+0.381791524056j))*0.5**o
            arg[(2, 1, 1, 0)]=(-0.718154493391-0.493541779099j)*x[0]**o + ((-0.45599133862-0.0817490523588j))*x[0] + ((-0.0519277877025-0.679337923424j))*x[1]**o + ((-0.749036330982-0.664295997493j))*x[1] + ((0.083705581959+0.707580693752j))*x[2]**o + ((-0.180091536099+0.291740698996j))*x[2]
            ref[(2, 1, 1, 0)]=(0.0317777942565+0.0282427703284j)/(o+1.)+((-0.692559602851-0.227152175428j))+((-0.718154493391-0.493541779099j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.410957025098+0.849015344469j)*x[0]**o + ((-0.773355102618-0.526869536362j))*x[0] + ((0.25851204183-0.35127040965j))*x[1]**o + ((-0.309186231607+0.744945949105j))*x[1] + ((-0.115328638433-0.117954308869j))*x[2]**o + ((0.327418857708+0.0783328603807j))*x[2]
            ref[(2, 1, 1, 1)]=(0.143183403397-0.469224718519j)/(o+1.)+((-0.377561238258+0.148204636562j))+((-0.410957025098+0.849015344469j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.0896297808305+0.00221274214319j)*x[0]**o + ((0.886478430307+0.85031972145j))*x[0] + ((-0.190596852618+0.985252261436j))*x[1]**o + ((-0.0438451667451+0.465558736549j))*x[1] + ((-0.42082056497-0.837681611205j))*x[2]**o + ((0.346489396335+0.790821601543j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.611417417588+0.147570650231j)/(o+1.)+((0.594561329949+1.05335002977j))+((0.0896297808305+0.00221274214319j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.240460135021-0.272965118948j)*x[0]**o + ((0.272525356821+0.237174358537j))*x[0] + ((-0.894862264027+0.627796853913j))*x[1]**o + ((-0.0711741254912+0.00841417442831j))*x[1] + ((-0.0859167526579+0.531883610244j))*x[2]**o + ((-0.953010880194+0.842974278555j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.980779016685+1.15968046416j)/(o+1.)+((-0.375829824432+0.54428140576j))+((-0.240460135021-0.272965118948j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.0397768335583-0.352894114261j)*x[0]**o + ((0.906906612672-0.854422784872j))*x[0] + ((-0.110526347131+0.116781258273j))*x[1]**o + ((-0.388175097969-0.215198691165j))*x[1] + ((-0.496332801251-0.664859972222j))*x[2]**o + ((0.416537919467-0.0100353659374j))*x[2]
            ref[(2, 1, 2, 1)]=(-0.606859148383-0.548078713949j)/(o+1.)+((0.467634717085-0.539828420987j))+((-0.0397768335583-0.352894114261j))*0.5**o
            arg[(2, 1, 2, 2)]=(0.929870379751+0.624705183235j)*x[0]**o + ((0.04273923843+0.960168580363j))*x[0] + ((-0.15707012775-0.145362089475j))*x[1]**o + ((-0.224109855809+0.769805558339j))*x[1] + ((-0.573552144065-0.515915164397j))*x[2]**o + ((-0.591730672964-0.00919087703307j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.730622271815-0.661277253873j)/(o+1.)+((-0.386550645171+0.860391630835j))+((0.929870379751+0.624705183235j))*0.5**o
            arg[(2, 2, 0, 0)]=(-0.63263621601+0.0715474967777j)*x[0]**o + ((-0.186356972456+0.265837916324j))*x[0] + ((0.0537859081254-0.729236221238j))*x[1]**o + ((-0.958223123089-0.991823712908j))*x[1] + ((-0.432129499649+0.457910973102j))*x[2]**o + ((0.348862104492-0.254730261046j))*x[2]
            ref[(2, 2, 0, 0)]=(-0.378343591524-0.271325248136j)/(o+1.)+((-0.397858995527-0.490358028815j))+((-0.63263621601+0.0715474967777j))*0.5**o
            arg[(2, 2, 0, 1)]=(0.357393540822-0.697192460425j)*x[0]**o + ((0.571926296885+0.355474194615j))*x[0] + ((0.561353392579+0.463974153066j))*x[1]**o + ((0.798274479644-0.814236537956j))*x[1] + ((0.455294538297-0.965668942242j))*x[2]**o + ((-0.541075539325-0.143228360104j))*x[2]
            ref[(2, 2, 0, 1)]=(1.01664793088-0.501694789175j)/(o+1.)+((0.414562618602-0.300995351723j))+((0.357393540822-0.697192460425j))*0.5**o
            arg[(2, 2, 0, 2)]=(-0.262012275673-0.162255943144j)*x[0]**o + ((-0.726764050317-0.517596132697j))*x[0] + ((-0.0895513067544+0.392962041069j))*x[1]**o + ((-0.613971129503+0.702035897698j))*x[1] + ((-0.902952584559-0.986491022224j))*x[2]**o + ((-0.115635724872+0.0953674069678j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.992503891314-0.593528981154j)/(o+1.)+((-0.728185452346+0.139903585984j))+((-0.262012275673-0.162255943144j))*0.5**o
            arg[(2, 2, 1, 0)]=(-0.625862280907-0.440340388337j)*x[0]**o + ((-0.308625813017+0.189658948486j))*x[0] + ((-0.111642730152-0.402052559921j))*x[1]**o + ((0.311617292142+0.020370357101j))*x[1] + ((-0.373120269319+0.145328711983j))*x[2]**o + ((-0.243422379307-0.676682469005j))*x[2]
            ref[(2, 2, 1, 0)]=(-0.484762999471-0.256723847938j)/(o+1.)+((-0.120215450091-0.233326581709j))+((-0.625862280907-0.440340388337j))*0.5**o
            arg[(2, 2, 1, 1)]=(-0.172276763136-0.952150001051j)*x[0]**o + ((0.75840060866+0.139091796296j))*x[0] + ((0.541781607077-0.817903712489j))*x[1]**o + ((-0.175205915259-0.458969397346j))*x[1] + ((-0.811577510944-0.231867820713j))*x[2]**o + ((0.224802629151-0.361167710635j))*x[2]
            ref[(2, 2, 1, 1)]=(-0.269795903867-1.0497715332j)/(o+1.)+((0.403998661276-0.340522655843j))+((-0.172276763136-0.952150001051j))*0.5**o
            arg[(2, 2, 1, 2)]=(0.584099059932+0.495151504919j)*x[0]**o + ((0.894712739562-0.807867907882j))*x[0] + ((-0.00405043209708+0.336026453662j))*x[1]**o + ((0.947401286029+0.0433836773041j))*x[1] + ((0.134236333956+0.513518137363j))*x[2]**o + ((-0.0960359612187+0.214894724151j))*x[2]
            ref[(2, 2, 1, 2)]=(0.130185901859+0.849544591026j)/(o+1.)+((0.873039032186-0.274794753214j))+((0.584099059932+0.495151504919j))*0.5**o
            arg[(2, 2, 2, 0)]=(-0.524363784007+0.497794254493j)*x[0]**o + ((-0.121666236972-0.0132961909028j))*x[0] + ((0.135414472346-0.177479771494j))*x[1]**o + ((0.274359429076-0.0182839947123j))*x[1] + ((0.418282724178+0.837001277614j))*x[2]**o + ((-0.352950889074+0.649189754588j))*x[2]
            ref[(2, 2, 2, 0)]=(0.553697196524+0.659521506121j)/(o+1.)+((-0.100128848485+0.308804784486j))+((-0.524363784007+0.497794254493j))*0.5**o
            arg[(2, 2, 2, 1)]=(-0.0365959401007-0.558711954806j)*x[0]**o + ((-0.855213414687+0.160422007495j))*x[0] + ((0.753587186076-0.758976121402j))*x[1]**o + ((-0.636108662139-0.897741503177j))*x[1] + ((-0.545531474458+0.114699725547j))*x[2]**o + ((-0.86791542453-0.337091852482j))*x[2]
            ref[(2, 2, 2, 1)]=(0.208055711618-0.644276395855j)/(o+1.)+((-1.17961875068-0.537205674082j))+((-0.0365959401007-0.558711954806j))*0.5**o
            arg[(2, 2, 2, 2)]=(0.447037529021-0.477296667662j)*x[0]**o + ((0.327961049439-0.486249468599j))*x[0] + ((-0.012555944229+0.590198735758j))*x[1]**o + ((0.160672471057+0.849372021395j))*x[1] + ((0.570692789723-0.255058531925j))*x[2]**o + ((-0.421423289422-0.983976407088j))*x[2]
            ref[(2, 2, 2, 2)]=(0.558136845494+0.335140203832j)/(o+1.)+((0.0336051155374-0.310426927146j))+((0.447037529021-0.477296667662j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.299299963256-0.0378212562969j)*x[0]**o + ((0.690473403245-0.166145725316j))*x[0] + ((0.122194913491-0.326082536946j))*x[1]**o + ((0.221020694423-0.34957421126j))*x[1]
            ref=(0.122194913491-0.326082536946j)/(o+1.)+((0.455747048834-0.257859968288j))+((0.299299963256-0.0378212562969j))*0.5**o
        else:
            arg=(-0.531311518735+0.132349203838j)*x[0]**o + ((-0.871915707882+0.920153398876j))*x[0] + ((0.205498203212-0.496097710058j))*x[1]**o + ((0.432793394128-0.112851777112j))*x[1] + ((0.863239641723+0.530637429341j))*x[2]**o + ((0.25686469441+0.0946398477824j))*x[2]
            ref=(1.06873784493+0.0345397192828j)/(o+1.)+((-0.0911288096724+0.450970734773j))+((-0.531311518735+0.132349203838j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.0829048602085+0.239961263856j)*x[0]**o + ((-0.0616468102182+0.32237138182j))*x[0] + ((-0.743809056768+0.20405616196j))*x[1]**o + ((0.073852141409+0.419157346482j))*x[1]
            ref[(0,)]=(-0.743809056768+0.20405616196j)/(o+1.)+((0.00610266559541+0.370764364151j))+((-0.0829048602085+0.239961263856j))*0.5**o
            arg[(1,)]=(-0.547884481294-0.179936664903j)*x[0]**o + ((-0.0434157055279-0.301072486998j))*x[0] + ((0.0899522311539-0.147395389337j))*x[1]**o + ((0.943195640875+0.0342462103151j))*x[1]
            ref[(1,)]=(0.0899522311539-0.147395389337j)/(o+1.)+((0.449889967673-0.133413138342j))+((-0.547884481294-0.179936664903j))*0.5**o
            arg[(2,)]=(-0.236200765732-0.593069562548j)*x[0]**o + ((-0.551401516219-0.244449700195j))*x[0] + ((0.644088738058+0.726380521573j))*x[1]**o + ((-0.23239394801-0.819689206419j))*x[1]
            ref[(2,)]=(0.644088738058+0.726380521573j)/(o+1.)+((-0.391897732115-0.532069453307j))+((-0.236200765732-0.593069562548j))*0.5**o
            arg[(3,)]=(0.38584347141+0.781784492978j)*x[0]**o + ((0.94004905685+0.524612102523j))*x[0] + ((0.893356561172+0.746997926777j))*x[1]**o + ((0.427357176559-0.345072959614j))*x[1]
            ref[(3,)]=(0.893356561172+0.746997926777j)/(o+1.)+((0.683703116704+0.0897695714547j))+((0.38584347141+0.781784492978j))*0.5**o
        else:
            arg[(0,)]=(-0.474083366297-0.313930910454j)*x[0]**o + ((-0.400200097628-0.669276099895j))*x[0] + ((-0.24572098381+0.442352209343j))*x[1]**o + ((-0.344044270366-0.650131299343j))*x[1] + ((-0.112806082793-0.0458457903195j))*x[2]**o + ((0.958467419891+0.96372548312j))*x[2]
            ref[(0,)]=(-0.358527066604+0.396506419024j)/(o+1.)+((0.107111525949-0.177840958059j))+((-0.474083366297-0.313930910454j))*0.5**o
            arg[(1,)]=(-0.784775634408+0.953417225424j)*x[0]**o + ((0.193308353503+0.778074693694j))*x[0] + ((-0.224325219745+0.290942972329j))*x[1]**o + ((0.5413614147-0.364985897178j))*x[1] + ((-0.915822857156-0.809378490338j))*x[2]**o + ((0.778530136735+0.644852679834j))*x[2]
            ref[(1,)]=(-1.1401480769-0.518435518009j)/(o+1.)+((0.756599952469+0.528970738175j))+((-0.784775634408+0.953417225424j))*0.5**o
            arg[(2,)]=(0.518915449945+0.271282768463j)*x[0]**o + ((0.840994595693+0.929500768847j))*x[0] + ((-0.258235396113+0.60858004764j))*x[1]**o + ((0.422025456173+0.737023886027j))*x[1] + ((-0.735270931602-0.0772296212804j))*x[2]**o + ((-0.326405412739+0.829809915833j))*x[2]
            ref[(2,)]=(-0.993506327716+0.53135042636j)/(o+1.)+((0.468307319564+1.24816728535j))+((0.518915449945+0.271282768463j))*0.5**o
            arg[(3,)]=(0.970469235281+0.164693209852j)*x[0]**o + ((-0.980881145862+0.359926700504j))*x[0] + ((0.920491330187-0.921317626146j))*x[1]**o + ((0.381696317218-0.13970354105j))*x[1] + ((-0.631127688154-0.451216650205j))*x[2]**o + ((0.609819609232+0.755654489479j))*x[2]
            ref[(3,)]=(0.289363642033-1.37253427635j)/(o+1.)+((0.00531739029391+0.487938824467j))+((0.970469235281+0.164693209852j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.74870605304-0.266139892764j)*x[0]**o + ((-0.281002417486-0.600820858266j))*x[0] + ((0.604385058005-0.319595491855j))*x[1]**o + ((-0.100561238045+0.712718204224j))*x[1]
            ref[(0, 0)]=(0.604385058005-0.319595491855j)/(o+1.)+((-0.190781827766+0.0559486729789j))+((0.74870605304-0.266139892764j))*0.5**o
            arg[(0, 1)]=(0.475422508604-0.700349000272j)*x[0]**o + ((0.754708289615+0.775575165956j))*x[0] + ((-0.995502854823-0.639070049132j))*x[1]**o + ((-0.635183846767+0.668226682388j))*x[1]
            ref[(0, 1)]=(-0.995502854823-0.639070049132j)/(o+1.)+((0.0597622214238+0.721900924172j))+((0.475422508604-0.700349000272j))*0.5**o
            arg[(0, 2)]=(-0.622077003138+0.446952476681j)*x[0]**o + ((-0.227565292508-0.673391420508j))*x[0] + ((-0.419269636879-0.0304852358232j))*x[1]**o + ((-0.187163412828+0.939449354146j))*x[1]
            ref[(0, 2)]=(-0.419269636879-0.0304852358232j)/(o+1.)+((-0.207364352668+0.133028966819j))+((-0.622077003138+0.446952476681j))*0.5**o
            arg[(0, 3)]=(0.487755774155-0.496606289602j)*x[0]**o + ((0.725198437069-0.564120594848j))*x[0] + ((0.0316298567834-0.14917939409j))*x[1]**o + ((0.698608732922-0.848393597615j))*x[1]
            ref[(0, 3)]=(0.0316298567834-0.14917939409j)/(o+1.)+((0.711903584996-0.706257096232j))+((0.487755774155-0.496606289602j))*0.5**o
            arg[(1, 0)]=(-0.541948916794-0.52930909322j)*x[0]**o + ((-0.447169590691-0.59781200524j))*x[0] + ((-0.90591783804+0.630424799403j))*x[1]**o + ((0.628680722148-0.78608775869j))*x[1]
            ref[(1, 0)]=(-0.90591783804+0.630424799403j)/(o+1.)+((0.0907555657288-0.691949881965j))+((-0.541948916794-0.52930909322j))*0.5**o
            arg[(1, 1)]=(0.543511424078-0.367709409291j)*x[0]**o + ((-0.300414671315+0.282681152751j))*x[0] + ((-0.517104549472+0.267619299934j))*x[1]**o + ((0.981664832496+0.299328066869j))*x[1]
            ref[(1, 1)]=(-0.517104549472+0.267619299934j)/(o+1.)+((0.34062508059+0.29100460981j))+((0.543511424078-0.367709409291j))*0.5**o
            arg[(1, 2)]=(0.577434626144-0.513845495233j)*x[0]**o + ((-0.0949828657378-0.706288517521j))*x[0] + ((-0.0998228327007+0.60631919268j))*x[1]**o + ((-0.765701641042-0.100363683495j))*x[1]
            ref[(1, 2)]=(-0.0998228327007+0.60631919268j)/(o+1.)+((-0.43034225339-0.403326100508j))+((0.577434626144-0.513845495233j))*0.5**o
            arg[(1, 3)]=(-0.208855507553-0.233660633541j)*x[0]**o + ((0.757899035726-0.19184140382j))*x[0] + ((0.401712213431+0.764313521861j))*x[1]**o + ((0.0869146122353-0.157886643998j))*x[1]
            ref[(1, 3)]=(0.401712213431+0.764313521861j)/(o+1.)+((0.422406823981-0.174864023909j))+((-0.208855507553-0.233660633541j))*0.5**o
        else:
            arg[(0, 0)]=(0.185668120767-0.422504443841j)*x[0]**o + ((-0.117890462363+0.431697400549j))*x[0] + ((0.707731029455+0.559774497844j))*x[1]**o + ((0.6544785667-0.231338175309j))*x[1] + ((-0.298321569233+0.969030070999j))*x[2]**o + ((0.110719123101+0.529999504831j))*x[2]
            ref[(0, 0)]=(0.409409460221+1.52880456884j)/(o+1.)+((0.323653613719+0.365179365035j))+((0.185668120767-0.422504443841j))*0.5**o
            arg[(0, 1)]=(-0.698518279034-0.48922794823j)*x[0]**o + ((-0.138740375105-0.752623534329j))*x[0] + ((-0.529076966187+0.0123170777901j))*x[1]**o + ((0.939842859996-0.872933361063j))*x[1] + ((-0.366717877813-0.764477210799j))*x[2]**o + ((-0.459805191511+0.33230403596j))*x[2]
            ref[(0, 1)]=(-0.895794844-0.752160133009j)/(o+1.)+((0.17064864669-0.646626429716j))+((-0.698518279034-0.48922794823j))*0.5**o
            arg[(0, 2)]=(-0.979900278897-0.280300305831j)*x[0]**o + ((0.643910251075+0.203338317697j))*x[0] + ((-0.213038723392+0.542543346326j))*x[1]**o + ((0.328006461283-0.496106655293j))*x[1] + ((0.699642024261-0.966864668885j))*x[2]**o + ((-0.228030277254+0.974498095181j))*x[2]
            ref[(0, 2)]=(0.486603300869-0.424321322559j)/(o+1.)+((0.371943217552+0.340864878792j))+((-0.979900278897-0.280300305831j))*0.5**o
            arg[(0, 3)]=(0.9579312126+0.226826271265j)*x[0]**o + ((-0.648990404516+0.649378782387j))*x[0] + ((0.554228672969+0.797831178521j))*x[1]**o + ((-0.112915179841+0.361370808487j))*x[1] + ((0.204476413873-0.731411614837j))*x[2]**o + ((0.426598143683+0.204166862698j))*x[2]
            ref[(0, 3)]=(0.758705086843+0.0664195636838j)/(o+1.)+((-0.167653720337+0.607458226786j))+((0.9579312126+0.226826271265j))*0.5**o
            arg[(1, 0)]=(-0.753436748439-0.323005698817j)*x[0]**o + ((0.00286407272116+0.206826887045j))*x[0] + ((-0.359045224169-0.760024305481j))*x[1]**o + ((0.923680804901-0.474787448093j))*x[1] + ((0.628699152015-0.49412663168j))*x[2]**o + ((0.337086736889+0.664413006973j))*x[2]
            ref[(1, 0)]=(0.269653927845-1.25415093716j)/(o+1.)+((0.631815807256+0.198226222963j))+((-0.753436748439-0.323005698817j))*0.5**o
            arg[(1, 1)]=(-0.00233821598637-0.539078390954j)*x[0]**o + ((-0.433789848673+0.178433378784j))*x[0] + ((-0.607459614725+0.833192039957j))*x[1]**o + ((0.398007020789+0.704416845492j))*x[1] + ((-0.601067888966+0.077732529525j))*x[2]**o + ((0.90373125662+0.706401845677j))*x[2]
            ref[(1, 1)]=(-1.20852750369+0.910924569482j)/(o+1.)+((0.433974214368+0.794626034977j))+((-0.00233821598637-0.539078390954j))*0.5**o
            arg[(1, 2)]=(0.826569592432-0.164333036258j)*x[0]**o + ((0.226236585699-0.575228707226j))*x[0] + ((-0.436775597392-0.895174118438j))*x[1]**o + ((-0.454000607659+0.073642153185j))*x[1] + ((-0.1319206537+0.903330544573j))*x[2]**o + ((0.0930442099273+0.424540764491j))*x[2]
            ref[(1, 2)]=(-0.568696251092+0.00815642613492j)/(o+1.)+((-0.0673599060166-0.0385228947751j))+((0.826569592432-0.164333036258j))*0.5**o
            arg[(1, 3)]=(-0.801828599735-0.408580977208j)*x[0]**o + ((-0.488915874115+0.967318463259j))*x[0] + ((0.689751401857-0.90768405001j))*x[1]**o + ((0.752726276135+0.466252035364j))*x[1] + ((-0.807659247253+0.735496044778j))*x[2]**o + ((0.263879915244-0.98240591317j))*x[2]
            ref[(1, 3)]=(-0.117907845396-0.172188005232j)/(o+1.)+((0.263845158632+0.225582292727j))+((-0.801828599735-0.408580977208j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref=numpy.zeros((3, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.331005814743+0.550534893306j)*x[0]**o + ((0.861395294553+0.45797086834j))*x[0] + ((0.527813044473+0.579356320755j))*x[1]**o + ((0.183099785029-0.540440548235j))*x[1]
            ref[(0, 0, 0)]=(0.527813044473+0.579356320755j)/(o+1.)+((0.522247539791-0.0412348399474j))+((-0.331005814743+0.550534893306j))*0.5**o
            arg[(0, 0, 1)]=(-0.105275649522+0.275884147385j)*x[0]**o + ((-0.954607728209-0.282503828937j))*x[0] + ((-0.121932523914-0.825769565968j))*x[1]**o + ((0.671358404105+0.464186734852j))*x[1]
            ref[(0, 0, 1)]=(-0.121932523914-0.825769565968j)/(o+1.)+((-0.141624662052+0.0908414529571j))+((-0.105275649522+0.275884147385j))*0.5**o
            arg[(0, 0, 2)]=(-0.0769987051094-0.0835262328933j)*x[0]**o + ((-0.757989740057+0.971238315025j))*x[0] + ((-0.715062373535-0.138872613967j))*x[1]**o + ((-0.16552291168-0.564703478942j))*x[1]
            ref[(0, 0, 2)]=(-0.715062373535-0.138872613967j)/(o+1.)+((-0.461756325869+0.203267418041j))+((-0.0769987051094-0.0835262328933j))*0.5**o
            arg[(0, 0, 3)]=(-0.693552280878+0.288153149281j)*x[0]**o + ((-0.505622037043+0.800617921943j))*x[0] + ((0.474098904502-0.316374959249j))*x[1]**o + ((0.0863429939459-0.988379994358j))*x[1]
            ref[(0, 0, 3)]=(0.474098904502-0.316374959249j)/(o+1.)+((-0.209639521549-0.0938810362075j))+((-0.693552280878+0.288153149281j))*0.5**o
            arg[(0, 1, 0)]=(-0.460029643216-0.239553285586j)*x[0]**o + ((0.607421510081+0.495749220665j))*x[0] + ((-0.464622773051-0.696912902001j))*x[1]**o + ((-0.891674805377+0.250611939743j))*x[1]
            ref[(0, 1, 0)]=(-0.464622773051-0.696912902001j)/(o+1.)+((-0.142126647648+0.373180580204j))+((-0.460029643216-0.239553285586j))*0.5**o
            arg[(0, 1, 1)]=(-0.115992816276-0.252154653928j)*x[0]**o + ((0.58315164096-0.073679540264j))*x[0] + ((0.660792342628-0.444900231763j))*x[1]**o + ((0.446436099597+0.537471268003j))*x[1]
            ref[(0, 1, 1)]=(0.660792342628-0.444900231763j)/(o+1.)+((0.514793870278+0.23189586387j))+((-0.115992816276-0.252154653928j))*0.5**o
            arg[(0, 1, 2)]=(-0.529599489588+0.184550398351j)*x[0]**o + ((-0.108424476922-0.945002720513j))*x[0] + ((0.614929822993-0.849458785683j))*x[1]**o + ((-0.0206691070457+0.644464859541j))*x[1]
            ref[(0, 1, 2)]=(0.614929822993-0.849458785683j)/(o+1.)+((-0.064546791984-0.150268930486j))+((-0.529599489588+0.184550398351j))*0.5**o
            arg[(0, 1, 3)]=(0.607057795293+0.499485101569j)*x[0]**o + ((-0.304924217662-0.265642237832j))*x[0] + ((-0.225319727051+0.621593611792j))*x[1]**o + ((0.909575286506-0.256020163904j))*x[1]
            ref[(0, 1, 3)]=(-0.225319727051+0.621593611792j)/(o+1.)+((0.302325534422-0.260831200868j))+((0.607057795293+0.499485101569j))*0.5**o
            arg[(0, 2, 0)]=(0.868257220319+0.531339886j)*x[0]**o + ((-0.602974680189-0.424150879571j))*x[0] + ((-0.729118619951-0.628417361629j))*x[1]**o + ((-0.117289814024-0.989123108985j))*x[1]
            ref[(0, 2, 0)]=(-0.729118619951-0.628417361629j)/(o+1.)+((-0.360132247107-0.706636994278j))+((0.868257220319+0.531339886j))*0.5**o
            arg[(0, 2, 1)]=(0.10573388178+0.501603444956j)*x[0]**o + ((-0.591394601019-0.710153027622j))*x[0] + ((0.848686277301-0.858941921571j))*x[1]**o + ((0.736244866373+0.477063887085j))*x[1]
            ref[(0, 2, 1)]=(0.848686277301-0.858941921571j)/(o+1.)+((0.0724251326768-0.116544570268j))+((0.10573388178+0.501603444956j))*0.5**o
            arg[(0, 2, 2)]=(0.138409450669-0.82918065898j)*x[0]**o + ((-0.147360147724+0.989790932756j))*x[0] + ((-0.408624233284-0.481059889307j))*x[1]**o + ((0.813364810187-0.629208517507j))*x[1]
            ref[(0, 2, 2)]=(-0.408624233284-0.481059889307j)/(o+1.)+((0.333002331232+0.180291207625j))+((0.138409450669-0.82918065898j))*0.5**o
            arg[(0, 2, 3)]=(0.0271259175567+0.703662778618j)*x[0]**o + ((0.471317371228-0.0772512010769j))*x[0] + ((-0.493839577021+0.742282770085j))*x[1]**o + ((-0.525778753881-0.563946403124j))*x[1]
            ref[(0, 2, 3)]=(-0.493839577021+0.742282770085j)/(o+1.)+((-0.0272306913266-0.3205988021j))+((0.0271259175567+0.703662778618j))*0.5**o
            arg[(1, 0, 0)]=(0.562220310749-0.257478946576j)*x[0]**o + ((-0.35933165342+0.482533807203j))*x[0] + ((0.952615332995-0.591700081056j))*x[1]**o + ((-0.949168819471-0.434836431311j))*x[1]
            ref[(1, 0, 0)]=(0.952615332995-0.591700081056j)/(o+1.)+((-0.654250236445+0.0238486879463j))+((0.562220310749-0.257478946576j))*0.5**o
            arg[(1, 0, 1)]=(0.998467579095+0.151517347491j)*x[0]**o + ((0.265572925362+0.41558668325j))*x[0] + ((-0.174387405584+0.569220814972j))*x[1]**o + ((-0.846484383178-0.819387494271j))*x[1]
            ref[(1, 0, 1)]=(-0.174387405584+0.569220814972j)/(o+1.)+((-0.290455728908-0.201900405511j))+((0.998467579095+0.151517347491j))*0.5**o
            arg[(1, 0, 2)]=(0.197425908015-0.024108724813j)*x[0]**o + ((-0.4631177059-0.265476659866j))*x[0] + ((-0.526822933295+0.00357922217192j))*x[1]**o + ((-0.551948394864-0.141905341541j))*x[1]
            ref[(1, 0, 2)]=(-0.526822933295+0.00357922217192j)/(o+1.)+((-0.507533050382-0.203691000704j))+((0.197425908015-0.024108724813j))*0.5**o
            arg[(1, 0, 3)]=(-0.0293056811316-0.106970238654j)*x[0]**o + ((0.663087406481-0.382510136256j))*x[0] + ((0.970546062379-0.371687260243j))*x[1]**o + ((-0.591593692064-0.708693065437j))*x[1]
            ref[(1, 0, 3)]=(0.970546062379-0.371687260243j)/(o+1.)+((0.0357468572084-0.545601600846j))+((-0.0293056811316-0.106970238654j))*0.5**o
            arg[(1, 1, 0)]=(-0.90645504407+0.417831509349j)*x[0]**o + ((-0.867689352812+0.826779259075j))*x[0] + ((0.0450397383692+0.244775366496j))*x[1]**o + ((0.51798661928+0.454084915517j))*x[1]
            ref[(1, 1, 0)]=(0.0450397383692+0.244775366496j)/(o+1.)+((-0.174851366766+0.640432087296j))+((-0.90645504407+0.417831509349j))*0.5**o
            arg[(1, 1, 1)]=(0.923211823704+0.290821208963j)*x[0]**o + ((-0.278053809375-0.886716283167j))*x[0] + ((0.423018632907-0.667033225999j))*x[1]**o + ((0.780480789802+0.640830053614j))*x[1]
            ref[(1, 1, 1)]=(0.423018632907-0.667033225999j)/(o+1.)+((0.251213490213-0.122943114776j))+((0.923211823704+0.290821208963j))*0.5**o
            arg[(1, 1, 2)]=(-0.900684942807+0.623256568103j)*x[0]**o + ((0.0939253559848-0.794805435898j))*x[0] + ((0.040201515247+0.372113622945j))*x[1]**o + ((0.581586231273-0.973745704387j))*x[1]
            ref[(1, 1, 2)]=(0.040201515247+0.372113622945j)/(o+1.)+((0.337755793629-0.884275570142j))+((-0.900684942807+0.623256568103j))*0.5**o
            arg[(1, 1, 3)]=(0.360046446099-0.657219698103j)*x[0]**o + ((0.788954674557+0.592878220078j))*x[0] + ((-0.779016297641+0.809093101127j))*x[1]**o + ((0.738738405121+0.625810406518j))*x[1]
            ref[(1, 1, 3)]=(-0.779016297641+0.809093101127j)/(o+1.)+((0.763846539839+0.609344313298j))+((0.360046446099-0.657219698103j))*0.5**o
            arg[(1, 2, 0)]=(0.936726312437-0.129451852434j)*x[0]**o + ((-0.620883616484+0.2274304206j))*x[0] + ((-0.452816748717+0.0908089244482j))*x[1]**o + ((0.0342168200529-0.294589939966j))*x[1]
            ref[(1, 2, 0)]=(-0.452816748717+0.0908089244482j)/(o+1.)+((-0.293333398215-0.0335797596829j))+((0.936726312437-0.129451852434j))*0.5**o
            arg[(1, 2, 1)]=(-0.279670459064+0.982311788654j)*x[0]**o + ((0.429771827853-0.76219055426j))*x[0] + ((0.00637607296678-0.581232572969j))*x[1]**o + ((0.129668252463-0.385418002429j))*x[1]
            ref[(1, 2, 1)]=(0.00637607296678-0.581232572969j)/(o+1.)+((0.279720040158-0.573804278345j))+((-0.279670459064+0.982311788654j))*0.5**o
            arg[(1, 2, 2)]=(0.557543454321+0.32170800788j)*x[0]**o + ((0.128613722978-0.0432149312672j))*x[0] + ((0.515241466868-0.590870366463j))*x[1]**o + ((0.559972927915-0.705831005087j))*x[1]
            ref[(1, 2, 2)]=(0.515241466868-0.590870366463j)/(o+1.)+((0.344293325446-0.374522968177j))+((0.557543454321+0.32170800788j))*0.5**o
            arg[(1, 2, 3)]=(0.977446050346-0.525579779101j)*x[0]**o + ((0.826537200011-0.574336434675j))*x[0] + ((0.720060665245+0.124677334887j))*x[1]**o + ((-0.669472152846-0.510431388887j))*x[1]
            ref[(1, 2, 3)]=(0.720060665245+0.124677334887j)/(o+1.)+((0.0785325235822-0.542383911781j))+((0.977446050346-0.525579779101j))*0.5**o
            arg[(2, 0, 0)]=(-0.120035014511+0.136962584569j)*x[0]**o + ((0.261277922624+0.677634657292j))*x[0] + ((0.910958006727+0.923381310217j))*x[1]**o + ((0.717127331489-0.971476853818j))*x[1]
            ref[(2, 0, 0)]=(0.910958006727+0.923381310217j)/(o+1.)+((0.489202627056-0.146921098263j))+((-0.120035014511+0.136962584569j))*0.5**o
            arg[(2, 0, 1)]=(-0.915030369645+0.616940095066j)*x[0]**o + ((-0.555082953246-0.742129441089j))*x[0] + ((0.388629504693-0.394810849097j))*x[1]**o + ((0.511300798494-0.924281692455j))*x[1]
            ref[(2, 0, 1)]=(0.388629504693-0.394810849097j)/(o+1.)+((-0.0218910773756-0.833205566772j))+((-0.915030369645+0.616940095066j))*0.5**o
            arg[(2, 0, 2)]=(-0.770153012619-0.930707945623j)*x[0]**o + ((-0.231763476587+0.121939501153j))*x[0] + ((-0.811149054617-0.783996747303j))*x[1]**o + ((-0.121011739783+0.0525062102613j))*x[1]
            ref[(2, 0, 2)]=(-0.811149054617-0.783996747303j)/(o+1.)+((-0.176387608185+0.0872228557073j))+((-0.770153012619-0.930707945623j))*0.5**o
            arg[(2, 0, 3)]=(-0.33216537366+0.689442970162j)*x[0]**o + ((-0.18624516022+0.932727236602j))*x[0] + ((0.213679433814+0.190127255389j))*x[1]**o + ((0.547978939515-0.236167951707j))*x[1]
            ref[(2, 0, 3)]=(0.213679433814+0.190127255389j)/(o+1.)+((0.180866889647+0.348279642448j))+((-0.33216537366+0.689442970162j))*0.5**o
            arg[(2, 1, 0)]=(-0.987590534061-0.0192424777401j)*x[0]**o + ((0.304944038435+0.889268998935j))*x[0] + ((-0.965080032749+0.419255381589j))*x[1]**o + ((0.619038851546-0.680958508261j))*x[1]
            ref[(2, 1, 0)]=(-0.965080032749+0.419255381589j)/(o+1.)+((0.46199144499+0.104155245337j))+((-0.987590534061-0.0192424777401j))*0.5**o
            arg[(2, 1, 1)]=(-0.495905719566+0.76187464305j)*x[0]**o + ((0.386652480202-0.110709323843j))*x[0] + ((0.939094089125-0.132489462934j))*x[1]**o + ((0.192149040474-0.801223413259j))*x[1]
            ref[(2, 1, 1)]=(0.939094089125-0.132489462934j)/(o+1.)+((0.289400760338-0.455966368551j))+((-0.495905719566+0.76187464305j))*0.5**o
            arg[(2, 1, 2)]=(0.881596983099-0.491403066451j)*x[0]**o + ((-0.103228457156+0.899103925756j))*x[0] + ((0.117190554991-0.369145507056j))*x[1]**o + ((-0.265435835702-0.0392723890759j))*x[1]
            ref[(2, 1, 2)]=(0.117190554991-0.369145507056j)/(o+1.)+((-0.184332146429+0.42991576834j))+((0.881596983099-0.491403066451j))*0.5**o
            arg[(2, 1, 3)]=(0.813718975691-0.255788869883j)*x[0]**o + ((0.676450816716-0.194300188762j))*x[0] + ((0.120540127521-0.604818229255j))*x[1]**o + ((-0.515956913758+0.633428335233j))*x[1]
            ref[(2, 1, 3)]=(0.120540127521-0.604818229255j)/(o+1.)+((0.0802469514789+0.219564073236j))+((0.813718975691-0.255788869883j))*0.5**o
            arg[(2, 2, 0)]=(-0.961886426539+0.600666175661j)*x[0]**o + ((-0.483337960035-0.842680416063j))*x[0] + ((0.920664790563-0.28181927008j))*x[1]**o + ((-0.166831691962+0.938171212885j))*x[1]
            ref[(2, 2, 0)]=(0.920664790563-0.28181927008j)/(o+1.)+((-0.325084825998+0.0477453984113j))+((-0.961886426539+0.600666175661j))*0.5**o
            arg[(2, 2, 1)]=(-0.911726868126-0.270917276632j)*x[0]**o + ((0.371815616283-0.970747220048j))*x[0] + ((-0.600223207999-0.66813412852j))*x[1]**o + ((-0.232489353233+0.136149950167j))*x[1]
            ref[(2, 2, 1)]=(-0.600223207999-0.66813412852j)/(o+1.)+((0.0696631315252-0.41729863494j))+((-0.911726868126-0.270917276632j))*0.5**o
            arg[(2, 2, 2)]=(0.279282402571-0.741250982865j)*x[0]**o + ((-0.409683618977+0.59413616368j))*x[0] + ((0.853303046272+0.593320969329j))*x[1]**o + ((0.319776168506-0.228945028406j))*x[1]
            ref[(2, 2, 2)]=(0.853303046272+0.593320969329j)/(o+1.)+((-0.0449537252353+0.182595567637j))+((0.279282402571-0.741250982865j))*0.5**o
            arg[(2, 2, 3)]=(-0.447761684164+0.343681753363j)*x[0]**o + ((0.572575146929-0.563892576284j))*x[0] + ((0.438660051196+0.420692109556j))*x[1]**o + ((0.757819821338-0.458927445765j))*x[1]
            ref[(2, 2, 3)]=(0.438660051196+0.420692109556j)/(o+1.)+((0.665197484134-0.511410011024j))+((-0.447761684164+0.343681753363j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.521503056633-0.0299553906036j)*x[0]**o + ((0.617772943931-0.102099826674j))*x[0] + ((-0.644689391158+0.838329557308j))*x[1]**o + ((-0.591507296137-0.991269809765j))*x[1] + ((-0.848095647896-0.53030806337j))*x[2]**o + ((0.694021087362+0.98338021721j))*x[2]
            ref[(0, 0, 0)]=(-1.49278503905+0.308021493938j)/(o+1.)+((0.360143367578-0.0549947096148j))+((-0.521503056633-0.0299553906036j))*0.5**o
            arg[(0, 0, 1)]=(0.498050981621+0.192009115285j)*x[0]**o + ((0.207334056215-0.867680704177j))*x[0] + ((-0.734133965024-0.213838423185j))*x[1]**o + ((-0.99912214833+0.417640415685j))*x[1] + ((-0.736383434329+0.500940872932j))*x[2]**o + ((0.0312089678769+0.487335162239j))*x[2]
            ref[(0, 0, 1)]=(-1.47051739935+0.287102449747j)/(o+1.)+((-0.380289562119+0.0186474368736j))+((0.498050981621+0.192009115285j))*0.5**o
            arg[(0, 0, 2)]=(-0.614799283559+0.423587054809j)*x[0]**o + ((-0.474986290725+0.671176321769j))*x[0] + ((-0.480032245514-0.879112847207j))*x[1]**o + ((-0.536122631233-0.744443539795j))*x[1] + ((-0.57078356057-0.312600083216j))*x[2]**o + ((0.919314459556-0.914377573314j))*x[2]
            ref[(0, 0, 2)]=(-1.05081580608-1.19171293042j)/(o+1.)+((-0.0458972312012-0.49382239567j))+((-0.614799283559+0.423587054809j))*0.5**o
            arg[(0, 0, 3)]=(-0.988816321712-0.169160638788j)*x[0]**o + ((-0.602101273044-0.949029063657j))*x[0] + ((0.396434875154-0.176690408366j))*x[1]**o + ((0.425621197145-0.297458978258j))*x[1] + ((-0.951858849306-0.970450669943j))*x[2]**o + ((-0.622833160163-0.928691608533j))*x[2]
            ref[(0, 0, 3)]=(-0.555423974152-1.14714107831j)/(o+1.)+((-0.399656618031-1.08758982522j))+((-0.988816321712-0.169160638788j))*0.5**o
            arg[(0, 1, 0)]=(-0.10030675663-0.966909844064j)*x[0]**o + ((-0.415597024296+0.589497461666j))*x[0] + ((-0.193726497588+0.231055013179j))*x[1]**o + ((-0.488668833578-0.0206055711497j))*x[1] + ((0.571655392394-0.674691252753j))*x[2]**o + ((0.358887047907+0.385700930698j))*x[2]
            ref[(0, 1, 0)]=(0.377928894806-0.443636239574j)/(o+1.)+((-0.272689404983+0.477296410607j))+((-0.10030675663-0.966909844064j))*0.5**o
            arg[(0, 1, 1)]=(0.923829732493+0.753561583238j)*x[0]**o + ((-0.676557043609-0.171086336268j))*x[0] + ((-0.707189470218+0.030580324507j))*x[1]**o + ((-0.027433438234-0.872758278864j))*x[1] + ((0.539856852679+0.652973859219j))*x[2]**o + ((-0.589037464958+0.320017780426j))*x[2]
            ref[(0, 1, 1)]=(-0.167332617539+0.683554183726j)/(o+1.)+((-0.6465139734-0.361913417353j))+((0.923829732493+0.753561583238j))*0.5**o
            arg[(0, 1, 2)]=(0.22784149939-0.799980148746j)*x[0]**o + ((-0.290132463311+0.887169725111j))*x[0] + ((-0.521101629371+0.402379425464j))*x[1]**o + ((0.276278247791+0.109298251366j))*x[1] + ((0.916914705865-0.563283637306j))*x[2]**o + ((-0.36969253681-0.0116820526029j))*x[2]
            ref[(0, 1, 2)]=(0.395813076494-0.160904211843j)/(o+1.)+((-0.191773376166+0.492392961937j))+((0.22784149939-0.799980148746j))*0.5**o
            arg[(0, 1, 3)]=(0.591457091204-0.0580522674455j)*x[0]**o + ((-0.995470436396-0.871566314084j))*x[0] + ((0.650282571961-0.723646098612j))*x[1]**o + ((-0.491123851088+0.334619572928j))*x[1] + ((-0.675885371046+0.395674424048j))*x[2]**o + ((0.254251337273+0.863347272582j))*x[2]
            ref[(0, 1, 3)]=(-0.0256027990846-0.327971674564j)/(o+1.)+((-0.616171475106+0.163200265713j))+((0.591457091204-0.0580522674455j))*0.5**o
            arg[(0, 2, 0)]=(0.817787026283+0.409342902662j)*x[0]**o + ((0.318189829257+0.7635076164j))*x[0] + ((0.793166268501-0.284485986894j))*x[1]**o + ((-0.823184644014-0.140593261763j))*x[1] + ((0.0989399883426+0.981381868719j))*x[2]**o + ((-0.464709461443-0.705471920534j))*x[2]
            ref[(0, 2, 0)]=(0.892106256843+0.696895881825j)/(o+1.)+((-0.4848521381-0.041278782949j))+((0.817787026283+0.409342902662j))*0.5**o
            arg[(0, 2, 1)]=(-0.806430436351+0.306248057563j)*x[0]**o + ((0.920948039514+0.562817698508j))*x[0] + ((0.526432907882+0.0185162019011j))*x[1]**o + ((-0.651555403655-0.0138395126529j))*x[1] + ((-0.482333973686+0.05845478168j))*x[2]**o + ((0.568388552031+0.00564621964208j))*x[2]
            ref[(0, 2, 1)]=(0.0440989341957+0.0769709835811j)/(o+1.)+((0.418890593945+0.277312202749j))+((-0.806430436351+0.306248057563j))*0.5**o
            arg[(0, 2, 2)]=(0.0391243317063+0.870753578913j)*x[0]**o + ((-0.57373515162-0.947209510412j))*x[0] + ((-0.560842459611+0.360982662383j))*x[1]**o + ((0.0995194050265-0.760918281278j))*x[1] + ((0.810018750862-0.516724047674j))*x[2]**o + ((0.289344534452+0.0804519541784j))*x[2]
            ref[(0, 2, 2)]=(0.24917629125-0.155741385291j)/(o+1.)+((-0.0924356060707-0.813837918756j))+((0.0391243317063+0.870753578913j))*0.5**o
            arg[(0, 2, 3)]=(-0.444744433606+0.845597168101j)*x[0]**o + ((0.737317515035-0.528716015093j))*x[0] + ((0.776016248643-0.838635659592j))*x[1]**o + ((-0.805255760236-0.923279268551j))*x[1] + ((0.40741587734-0.0149350573422j))*x[2]**o + ((-0.444887709372+0.385302799318j))*x[2]
            ref[(0, 2, 3)]=(1.18343212598-0.853570716934j)/(o+1.)+((-0.256412977286-0.533346242162j))+((-0.444744433606+0.845597168101j))*0.5**o
            arg[(1, 0, 0)]=(0.29948583056-0.190700625489j)*x[0]**o + ((0.854358999026-0.688385274477j))*x[0] + ((0.228722450899-0.336526586369j))*x[1]**o + ((-0.735324937013+0.692751378934j))*x[1] + ((-0.746862743285+0.239852656779j))*x[2]**o + ((0.777441780385+0.714619707565j))*x[2]
            ref[(1, 0, 0)]=(-0.518140292386-0.0966739295898j)/(o+1.)+((0.448237921199+0.359492906011j))+((0.29948583056-0.190700625489j))*0.5**o
            arg[(1, 0, 1)]=(0.453907280357+0.201778770978j)*x[0]**o + ((0.0604589828658-0.580732063884j))*x[0] + ((0.140641635751+0.884726787837j))*x[1]**o + ((-0.165539732073-0.912715370263j))*x[1] + ((0.523812412678+0.964292458101j))*x[2]**o + ((0.656602623306+0.0133146595428j))*x[2]
            ref[(1, 0, 1)]=(0.664454048429+1.84901924594j)/(o+1.)+((0.275760937049-0.740066387302j))+((0.453907280357+0.201778770978j))*0.5**o
            arg[(1, 0, 2)]=(-0.0731753998896-0.171568744572j)*x[0]**o + ((-0.27255057659-0.906830024215j))*x[0] + ((0.558782456486-0.976052353557j))*x[1]**o + ((-0.00178953047531-0.907956765012j))*x[1] + ((0.344931974495-0.990082005078j))*x[2]**o + ((-0.822708791453-0.885533005397j))*x[2]
            ref[(1, 0, 2)]=(0.903714430981-1.96613435864j)/(o+1.)+((-0.548524449259-1.35015989731j))+((-0.0731753998896-0.171568744572j))*0.5**o
            arg[(1, 0, 3)]=(-0.737074149576-0.609702241887j)*x[0]**o + ((-0.289499591124+0.56820808868j))*x[0] + ((0.127494395766-0.0166225030902j))*x[1]**o + ((-0.0273330768296-0.955565963565j))*x[1] + ((-0.880279792763+0.499651664732j))*x[2]**o + ((0.833428601961-0.178079236431j))*x[2]
            ref[(1, 0, 3)]=(-0.752785396997+0.483029161642j)/(o+1.)+((0.258297967004-0.282718555658j))+((-0.737074149576-0.609702241887j))*0.5**o
            arg[(1, 1, 0)]=(-0.430227073025-0.717998878776j)*x[0]**o + ((-0.491764886327+0.398016022951j))*x[0] + ((0.509057548269+0.35815034308j))*x[1]**o + ((0.732970290197+0.768957583999j))*x[1] + ((0.622213672732+0.215751709277j))*x[2]**o + ((-0.389029504716-0.0677342676569j))*x[2]
            ref[(1, 1, 0)]=(1.131271221+0.573902052356j)/(o+1.)+((-0.0739120504233+0.549619669647j))+((-0.430227073025-0.717998878776j))*0.5**o
            arg[(1, 1, 1)]=(0.468868630513+0.216089008363j)*x[0]**o + ((0.829306760029+0.297597231432j))*x[0] + ((0.432747625829+0.222917914828j))*x[1]**o + ((0.00234953540324+0.448322286697j))*x[1] + ((-0.517508533347+0.913646769919j))*x[2]**o + ((0.211348285499+0.868581443255j))*x[2]
            ref[(1, 1, 1)]=(-0.0847609075183+1.13656468475j)/(o+1.)+((0.521502290466+0.807250480692j))+((0.468868630513+0.216089008363j))*0.5**o
            arg[(1, 1, 2)]=(0.859750741416-0.83645265253j)*x[0]**o + ((-0.314356015269+0.510439514191j))*x[0] + ((0.0747535796805-0.786572495802j))*x[1]**o + ((-0.360270520343+0.567200470397j))*x[1] + ((0.84936172955-0.491708068605j))*x[2]**o + ((-0.191219689167+0.105914408066j))*x[2]
            ref[(1, 1, 2)]=(0.924115309231-1.27828056441j)/(o+1.)+((-0.43292311239+0.591777196327j))+((0.859750741416-0.83645265253j))*0.5**o
            arg[(1, 1, 3)]=(-0.154734866341+0.664031015651j)*x[0]**o + ((0.530995426607+0.588112212632j))*x[0] + ((-0.0238026369134-0.00273959829485j))*x[1]**o + ((-0.688771959157-0.909207187844j))*x[1] + ((-0.780757723333-0.0903468199264j))*x[2]**o + ((-0.943559669895+0.84753506292j))*x[2]
            ref[(1, 1, 3)]=(-0.804560360246-0.0930864182212j)/(o+1.)+((-0.550668101223+0.263220043854j))+((-0.154734866341+0.664031015651j))*0.5**o
            arg[(1, 2, 0)]=(0.74505345994+0.958162130728j)*x[0]**o + ((0.986841287432+0.43864258585j))*x[0] + ((0.435765479121+0.755223281658j))*x[1]**o + ((0.252586163574-0.775299498431j))*x[1] + ((0.627246938885+0.452202750439j))*x[2]**o + ((-0.738007226704-0.033232293922j))*x[2]
            ref[(1, 2, 0)]=(1.06301241801+1.2074260321j)/(o+1.)+((0.250710112151-0.184944603251j))+((0.74505345994+0.958162130728j))*0.5**o
            arg[(1, 2, 1)]=(-0.816285619526+0.386495297447j)*x[0]**o + ((0.0554409498401-0.212489288077j))*x[0] + ((0.372042633111-0.832108136073j))*x[1]**o + ((0.489628051308+0.408318328352j))*x[1] + ((-0.83347310636+0.524528521096j))*x[2]**o + ((-0.945966290104+0.639922164467j))*x[2]
            ref[(1, 2, 1)]=(-0.461430473249-0.307579614977j)/(o+1.)+((-0.200448644478+0.417875602371j))+((-0.816285619526+0.386495297447j))*0.5**o
            arg[(1, 2, 2)]=(0.820712841538-0.675825113546j)*x[0]**o + ((-0.421427619731-0.205285081286j))*x[0] + ((0.929677453059-0.716069403142j))*x[1]**o + ((-0.868905574702+0.858865239799j))*x[1] + ((-0.904179450868+0.96274790837j))*x[2]**o + ((-0.526821930768-0.516873752447j))*x[2]
            ref[(1, 2, 2)]=(0.0254980021912+0.246678505228j)/(o+1.)+((-0.908577562601+0.0683532030328j))+((0.820712841538-0.675825113546j))*0.5**o
            arg[(1, 2, 3)]=(-0.0957496458357-0.0246282717416j)*x[0]**o + ((0.986642004862-0.527603533136j))*x[0] + ((-0.178908449279-0.281562431747j))*x[1]**o + ((-0.522432443685+0.466065034182j))*x[1] + ((0.557452133755+0.559673990877j))*x[2]**o + ((-0.574443619666+0.624977363012j))*x[2]
            ref[(1, 2, 3)]=(0.378543684476+0.278111559129j)/(o+1.)+((-0.0551170292447+0.281719432029j))+((-0.0957496458357-0.0246282717416j))*0.5**o
            arg[(2, 0, 0)]=(-0.856744523911+0.115456792422j)*x[0]**o + ((0.922672724061+0.241552652125j))*x[0] + ((-0.873605635661-0.286451275342j))*x[1]**o + ((0.220862851944+0.99344884666j))*x[1] + ((0.296277167262-0.236931660847j))*x[2]**o + ((-0.111976196393-0.426585887195j))*x[2]
            ref[(2, 0, 0)]=(-0.577328468399-0.523382936189j)/(o+1.)+((0.515779689806+0.404207805795j))+((-0.856744523911+0.115456792422j))*0.5**o
            arg[(2, 0, 1)]=(0.463218989072+0.427628893117j)*x[0]**o + ((0.85294337602-0.840841392957j))*x[0] + ((-0.288808511996+0.266336213932j))*x[1]**o + ((0.478870738115+0.527044202303j))*x[1] + ((-0.585949399331-0.165934777358j))*x[2]**o + ((-0.422410106846-0.530807135932j))*x[2]
            ref[(2, 0, 1)]=(-0.874757911327+0.100401436574j)/(o+1.)+((0.454702003644-0.422302163293j))+((0.463218989072+0.427628893117j))*0.5**o
            arg[(2, 0, 2)]=(0.369954897064+0.215025115038j)*x[0]**o + ((-0.253476769768+0.400899687563j))*x[0] + ((0.0702713407382-0.0523502615883j))*x[1]**o + ((0.696043231868-0.107479491354j))*x[1] + ((0.111100230557-0.945180623484j))*x[2]**o + ((-0.097869324309-0.117766108785j))*x[2]
            ref[(2, 0, 2)]=(0.181371571295-0.997530885073j)/(o+1.)+((0.172348568896+0.087827043712j))+((0.369954897064+0.215025115038j))*0.5**o
            arg[(2, 0, 3)]=(-0.742093313988-0.483333654105j)*x[0]**o + ((0.373880271946+0.632445555598j))*x[0] + ((0.880910455573+0.10901622143j))*x[1]**o + ((-0.239879373698+0.754430260713j))*x[1] + ((-0.872682030194+0.388936523281j))*x[2]**o + ((-0.693021848986-0.288810048167j))*x[2]
            ref[(2, 0, 3)]=(0.00822842537941+0.497952744711j)/(o+1.)+((-0.279510475369+0.549032884072j))+((-0.742093313988-0.483333654105j))*0.5**o
            arg[(2, 1, 0)]=(0.762238296215-0.362685492325j)*x[0]**o + ((0.572145857118-0.196975477621j))*x[0] + ((-0.846998673735-0.0690094079494j))*x[1]**o + ((-0.573527531416+0.535015069532j))*x[1] + ((0.406684524639-0.775265474686j))*x[2]**o + ((-0.0824248390418+0.976689179133j))*x[2]
            ref[(2, 1, 0)]=(-0.440314149096-0.844274882635j)/(o+1.)+((-0.0419032566701+0.657364385522j))+((0.762238296215-0.362685492325j))*0.5**o
            arg[(2, 1, 1)]=(0.180818288431+0.834930123574j)*x[0]**o + ((-0.755437469747+0.818713549679j))*x[0] + ((0.0155466774326-0.225350553883j))*x[1]**o + ((-0.296833444218+0.0096594662711j))*x[1] + ((-0.798678004587+0.0250843968996j))*x[2]**o + ((0.741976352037-0.191140662348j))*x[2]
            ref[(2, 1, 1)]=(-0.783131327154-0.200266156984j)/(o+1.)+((-0.155147280964+0.318616176801j))+((0.180818288431+0.834930123574j))*0.5**o
            arg[(2, 1, 2)]=(-0.410891780973+0.219637336773j)*x[0]**o + ((0.539772574371-0.157556563321j))*x[0] + ((0.90377517275+0.874405523006j))*x[1]**o + ((-0.132269175587-0.759958293425j))*x[1] + ((-0.701208636132-0.159422705632j))*x[2]**o + ((-0.249006251769-0.337389242283j))*x[2]
            ref[(2, 1, 2)]=(0.202566536618+0.714982817374j)/(o+1.)+((0.0792485735075-0.627452049515j))+((-0.410891780973+0.219637336773j))*0.5**o
            arg[(2, 1, 3)]=(-0.814423557226-0.06917796083j)*x[0]**o + ((-0.304621435235-0.981964936814j))*x[0] + ((0.690249214091-0.0682396916082j))*x[1]**o + ((-0.589491386869-0.79425892633j))*x[1] + ((0.940027130336-0.401195471873j))*x[2]**o + ((0.832650023925-0.593868475701j))*x[2]
            ref[(2, 1, 3)]=(1.63027634443-0.469435163481j)/(o+1.)+((-0.0307313990897-1.18504616942j))+((-0.814423557226-0.06917796083j))*0.5**o
            arg[(2, 2, 0)]=(0.743094206234+0.601402402619j)*x[0]**o + ((0.957755695451+0.988170386082j))*x[0] + ((0.584109337388-0.403329206902j))*x[1]**o + ((0.797566489562-0.376267251792j))*x[1] + ((-0.765958922904+0.691353687632j))*x[2]**o + ((0.318604337394-0.47289101674j))*x[2]
            ref[(2, 2, 0)]=(-0.181849585515+0.28802448073j)/(o+1.)+((1.0369632612+0.069506058775j))+((0.743094206234+0.601402402619j))*0.5**o
            arg[(2, 2, 1)]=(0.548453036785-0.45431539741j)*x[0]**o + ((-0.0484381602115-0.381520385261j))*x[0] + ((0.923728342895+0.936852268658j))*x[1]**o + ((-0.441847943499+0.760017370073j))*x[1] + ((-0.164620966595-0.226172465679j))*x[2]**o + ((0.464346798243+0.344315387873j))*x[2]
            ref[(2, 2, 1)]=(0.7591073763+0.710679802979j)/(o+1.)+((-0.0129696527333+0.361406186343j))+((0.548453036785-0.45431539741j))*0.5**o
            arg[(2, 2, 2)]=(0.254799312803+0.0280163352486j)*x[0]**o + ((0.662625909831+0.743967251507j))*x[0] + ((-0.694266498562+0.100913300463j))*x[1]**o + ((-0.532262417874-0.620708284763j))*x[1] + ((-0.906534648324-0.127321176823j))*x[2]**o + ((0.02808549911-0.840124265974j))*x[2]
            ref[(2, 2, 2)]=(-1.60080114689-0.0264078763597j)/(o+1.)+((0.0792244955335-0.358432649615j))+((0.254799312803+0.0280163352486j))*0.5**o
            arg[(2, 2, 3)]=(0.907069734309+0.138265483951j)*x[0]**o + ((-0.586597967438-0.955632411677j))*x[0] + ((0.13797418959-0.783703273761j))*x[1]**o + ((-0.430261119216-0.725677979011j))*x[1] + ((-0.782611343485+0.775158491822j))*x[2]**o + ((-0.00128050237447+0.799433502165j))*x[2]
            ref[(2, 2, 3)]=(-0.644637153896-0.00854478193907j)/(o+1.)+((-0.509069794514-0.440938444262j))+((0.907069734309+0.138265483951j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 2, 4),w)
        ref=numpy.zeros((4, 3, 2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.131961313408-0.169086275881j)*x[0]**o + ((0.724877505431+0.51700166419j))*x[0] + ((-0.300438511879+0.699039966606j))*x[1]**o + ((-0.971200977301+0.333930942205j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.300438511879+0.699039966606j)/(o+1.)+((-0.123161735935+0.425466303198j))+((0.131961313408-0.169086275881j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.277806171957+0.8891395475j)*x[0]**o + ((0.22879101018-0.369728112001j))*x[0] + ((0.278318478784-0.766814566762j))*x[1]**o + ((0.643575695751+0.607793468455j))*x[1]
            ref[(0, 0, 0, 1)]=(0.278318478784-0.766814566762j)/(o+1.)+((0.436183352965+0.119032678227j))+((0.277806171957+0.8891395475j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.723519107161+0.278977382583j)*x[0]**o + ((-0.758203651947-0.662741395635j))*x[0] + ((0.170915675499-0.46311715732j))*x[1]**o + ((-0.921765189451+0.209369610565j))*x[1]
            ref[(0, 0, 0, 2)]=(0.170915675499-0.46311715732j)/(o+1.)+((-0.839984420699-0.226685892535j))+((0.723519107161+0.278977382583j))*0.5**o
            arg[(0, 0, 0, 3)]=(-0.731512939557+0.269821634181j)*x[0]**o + ((-0.819682587597+0.171152177083j))*x[0] + ((-0.21290639016+0.115622280606j))*x[1]**o + ((-0.683593739976-0.125450954795j))*x[1]
            ref[(0, 0, 0, 3)]=(-0.21290639016+0.115622280606j)/(o+1.)+((-0.751638163787+0.0228506111438j))+((-0.731512939557+0.269821634181j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.182416824549-0.780374515639j)*x[0]**o + ((-0.471509050295+0.474624943062j))*x[0] + ((0.765587804359+0.979768697033j))*x[1]**o + ((0.207377819478-0.660915594616j))*x[1]
            ref[(0, 0, 1, 0)]=(0.765587804359+0.979768697033j)/(o+1.)+((-0.132065615409-0.093145325777j))+((0.182416824549-0.780374515639j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.0393586775387+0.402861546164j)*x[0]**o + ((-0.898852949439+0.275392791052j))*x[0] + ((0.226655343581+0.899295373338j))*x[1]**o + ((-0.23527466947+0.103189138721j))*x[1]
            ref[(0, 0, 1, 1)]=(0.226655343581+0.899295373338j)/(o+1.)+((-0.567063809455+0.189290964887j))+((-0.0393586775387+0.402861546164j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.446167002093+0.69548707259j)*x[0]**o + ((0.703943240143+0.209850828527j))*x[0] + ((-0.73965685788+0.254826963523j))*x[1]**o + ((-0.0463373583625+0.876640551829j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.73965685788+0.254826963523j)/(o+1.)+((0.32880294089+0.543245690178j))+((-0.446167002093+0.69548707259j))*0.5**o
            arg[(0, 0, 1, 3)]=(-0.894407273424+0.350905646377j)*x[0]**o + ((-0.0600794884511+0.440423054225j))*x[0] + ((0.00243103780984-0.116697946584j))*x[1]**o + ((-0.859535832902+0.220939188367j))*x[1]
            ref[(0, 0, 1, 3)]=(0.00243103780984-0.116697946584j)/(o+1.)+((-0.459807660677+0.330681121296j))+((-0.894407273424+0.350905646377j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.826743542794-0.84331368203j)*x[0]**o + ((0.956886665604+0.773274514172j))*x[0] + ((-0.187448995648+0.668080814187j))*x[1]**o + ((0.556997782924+0.552956292739j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.187448995648+0.668080814187j)/(o+1.)+((0.756942224264+0.663115403455j))+((0.826743542794-0.84331368203j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.43522622706-0.957287345873j)*x[0]**o + ((0.486494406836+0.999386566821j))*x[0] + ((0.0484427636024+0.729813922691j))*x[1]**o + ((0.382444321851+0.627855903532j))*x[1]
            ref[(0, 1, 0, 1)]=(0.0484427636024+0.729813922691j)/(o+1.)+((0.434469364343+0.813621235177j))+((0.43522622706-0.957287345873j))*0.5**o
            arg[(0, 1, 0, 2)]=(0.699907509084-0.790547014885j)*x[0]**o + ((-0.314396897931-0.157834814154j))*x[0] + ((-0.680353117499+0.979286820424j))*x[1]**o + ((-0.890930912619+0.0111579838283j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.680353117499+0.979286820424j)/(o+1.)+((-0.602663905275-0.0733384151628j))+((0.699907509084-0.790547014885j))*0.5**o
            arg[(0, 1, 0, 3)]=(-0.862244884136-0.729961367386j)*x[0]**o + ((0.74279936998-0.074714483617j))*x[0] + ((-0.530958814891-0.541298731008j))*x[1]**o + ((-0.27527794954+0.726285501615j))*x[1]
            ref[(0, 1, 0, 3)]=(-0.530958814891-0.541298731008j)/(o+1.)+((0.23376071022+0.325785508999j))+((-0.862244884136-0.729961367386j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.688190134683+0.334137488723j)*x[0]**o + ((0.453247427154-0.364684877919j))*x[0] + ((-0.770107934619-0.664467751867j))*x[1]**o + ((0.629219389746-0.142565378065j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.770107934619-0.664467751867j)/(o+1.)+((0.54123340845-0.253625127992j))+((-0.688190134683+0.334137488723j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.671639179282-0.549695432206j)*x[0]**o + ((0.648945779153+0.552089544739j))*x[0] + ((-0.895425595399-0.445512867926j))*x[1]**o + ((-0.804650491349+0.540337563138j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.895425595399-0.445512867926j)/(o+1.)+((-0.0778523560979+0.546213553938j))+((0.671639179282-0.549695432206j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.255084794621-0.85508216231j)*x[0]**o + ((-0.417145758103-0.172983081998j))*x[0] + ((0.636179330888-0.63348482831j))*x[1]**o + ((0.972259584831-0.362064220705j))*x[1]
            ref[(0, 1, 1, 2)]=(0.636179330888-0.63348482831j)/(o+1.)+((0.277556913364-0.267523651351j))+((0.255084794621-0.85508216231j))*0.5**o
            arg[(0, 1, 1, 3)]=(0.911192862226-0.763116144699j)*x[0]**o + ((-0.796932446283+0.924270193237j))*x[0] + ((-0.122542079593+0.853527434957j))*x[1]**o + ((0.438409561954+0.0263306837481j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.122542079593+0.853527434957j)/(o+1.)+((-0.179261442165+0.475300438493j))+((0.911192862226-0.763116144699j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.827125523187+0.881969754982j)*x[0]**o + ((0.405971839889+0.309263143406j))*x[0] + ((-0.979724222851+0.785597447693j))*x[1]**o + ((-0.628229048268+0.425390307465j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.979724222851+0.785597447693j)/(o+1.)+((-0.111128604189+0.367326725436j))+((-0.827125523187+0.881969754982j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.070017091568-0.576191782406j)*x[0]**o + ((0.814883355359+0.316531830838j))*x[0] + ((-0.323045751505+0.487263359494j))*x[1]**o + ((-0.408369729157+0.778907272953j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.323045751505+0.487263359494j)/(o+1.)+((0.203256813101+0.547719551895j))+((0.070017091568-0.576191782406j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.789395305075+0.297535459913j)*x[0]**o + ((-0.723522058817-0.911205768268j))*x[0] + ((-0.667761938654+0.798222091949j))*x[1]**o + ((0.781946427227-0.616622155226j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.667761938654+0.798222091949j)/(o+1.)+((0.0292121842053-0.763913961747j))+((0.789395305075+0.297535459913j))*0.5**o
            arg[(0, 2, 0, 3)]=(-0.0229897894818+0.0619390621546j)*x[0]**o + ((-0.228409124435+0.934776882628j))*x[0] + ((0.367482057931+0.855456753484j))*x[1]**o + ((0.621971154855+0.41634176237j))*x[1]
            ref[(0, 2, 0, 3)]=(0.367482057931+0.855456753484j)/(o+1.)+((0.19678101521+0.675559322499j))+((-0.0229897894818+0.0619390621546j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.782475990215-0.270206686488j)*x[0]**o + ((0.12358530671-0.346587298451j))*x[0] + ((-0.247634196615+0.188109432741j))*x[1]**o + ((-0.678166931382-0.494467305148j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.247634196615+0.188109432741j)/(o+1.)+((-0.277290812336-0.4205273018j))+((-0.782475990215-0.270206686488j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.722976479904-0.668689503523j)*x[0]**o + ((-0.784340196511+0.42466619414j))*x[0] + ((-0.600522669671-0.347438332939j))*x[1]**o + ((-0.864489402717-0.546836427767j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.600522669671-0.347438332939j)/(o+1.)+((-0.824414799614-0.0610851168134j))+((-0.722976479904-0.668689503523j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.433829186944+0.545477953168j)*x[0]**o + ((0.860517004211-0.362454182603j))*x[0] + ((0.692502260546-0.980892943966j))*x[1]**o + ((-0.746431427261+0.939778746107j))*x[1]
            ref[(0, 2, 1, 2)]=(0.692502260546-0.980892943966j)/(o+1.)+((0.0570427884749+0.288662281752j))+((-0.433829186944+0.545477953168j))*0.5**o
            arg[(0, 2, 1, 3)]=(0.116511050171+0.238071362651j)*x[0]**o + ((0.268364654929+0.0845564143873j))*x[0] + ((-0.651590676296+0.991606343418j))*x[1]**o + ((-0.634191096291-0.22911330261j))*x[1]
            ref[(0, 2, 1, 3)]=(-0.651590676296+0.991606343418j)/(o+1.)+((-0.182913220681-0.0722784441111j))+((0.116511050171+0.238071362651j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.607468682788-0.945280918021j)*x[0]**o + ((0.695980200854-0.470106875812j))*x[0] + ((-0.426461421654-0.38924621099j))*x[1]**o + ((0.85482326291+0.379312941143j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.426461421654-0.38924621099j)/(o+1.)+((0.775401731882-0.0453969673344j))+((-0.607468682788-0.945280918021j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.106877634011+0.964097929341j)*x[0]**o + ((0.537305533273+0.656793512187j))*x[0] + ((0.663446187527+0.671008167361j))*x[1]**o + ((-0.206062626089+0.861505053161j))*x[1]
            ref[(1, 0, 0, 1)]=(0.663446187527+0.671008167361j)/(o+1.)+((0.165621453592+0.759149282674j))+((-0.106877634011+0.964097929341j))*0.5**o
            arg[(1, 0, 0, 2)]=(0.0394873605047-0.952473525673j)*x[0]**o + ((0.201792243904-0.422852203419j))*x[0] + ((-0.755245733767-0.741732930113j))*x[1]**o + ((-0.107321184014-0.740925773974j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.755245733767-0.741732930113j)/(o+1.)+((0.0472355299445-0.581888988696j))+((0.0394873605047-0.952473525673j))*0.5**o
            arg[(1, 0, 0, 3)]=(-0.520262021236-0.568275559407j)*x[0]**o + ((0.37907450615-0.246581512585j))*x[0] + ((0.539851751568-0.382383801303j))*x[1]**o + ((0.609564643543-0.531162460739j))*x[1]
            ref[(1, 0, 0, 3)]=(0.539851751568-0.382383801303j)/(o+1.)+((0.494319574847-0.388871986662j))+((-0.520262021236-0.568275559407j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.957743619676+0.241283346465j)*x[0]**o + ((0.760612679755+0.412706951134j))*x[0] + ((0.103722615153-0.483906800414j))*x[1]**o + ((0.682003539366-0.67166265645j))*x[1]
            ref[(1, 0, 1, 0)]=(0.103722615153-0.483906800414j)/(o+1.)+((0.72130810956-0.129477852658j))+((-0.957743619676+0.241283346465j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.658437330547+0.113572825679j)*x[0]**o + ((-0.0189597814209+0.913633601034j))*x[0] + ((-0.799889804857-0.249416512356j))*x[1]**o + ((0.997772214787-0.0847961049192j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.799889804857-0.249416512356j)/(o+1.)+((0.489406216683+0.414418748058j))+((0.658437330547+0.113572825679j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.735126976749-0.257971692751j)*x[0]**o + ((-1.58439644073e-05-0.452669493338j))*x[0] + ((-0.867148736117+0.346958090388j))*x[1]**o + ((0.292459746406+0.0997851128007j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.867148736117+0.346958090388j)/(o+1.)+((0.146221951221-0.176442190269j))+((0.735126976749-0.257971692751j))*0.5**o
            arg[(1, 0, 1, 3)]=(0.126138778376+0.199150291761j)*x[0]**o + ((-0.810025204845-0.822082841828j))*x[0] + ((0.650720572292-0.385041324993j))*x[1]**o + ((0.375176285944-0.29356444064j))*x[1]
            ref[(1, 0, 1, 3)]=(0.650720572292-0.385041324993j)/(o+1.)+((-0.217424459451-0.557823641234j))+((0.126138778376+0.199150291761j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.596002528834+0.968290004108j)*x[0]**o + ((-0.72180407571-0.0327404580078j))*x[0] + ((-0.145907627475+0.107095929285j))*x[1]**o + ((0.840530382672+0.420162890345j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.145907627475+0.107095929285j)/(o+1.)+((0.0593631534809+0.193711216169j))+((-0.596002528834+0.968290004108j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.688232905832-0.173273599349j)*x[0]**o + ((0.951237922699+0.312331526867j))*x[0] + ((-0.00295826735252+0.695019752008j))*x[1]**o + ((-0.0677877365623+0.971807913269j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.00295826735252+0.695019752008j)/(o+1.)+((0.441725093069+0.642069720068j))+((0.688232905832-0.173273599349j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.138838971999+0.285483497867j)*x[0]**o + ((0.610943776529-0.535621719354j))*x[0] + ((0.86029165346-0.0955557571424j))*x[1]**o + ((-0.345170696033-0.440021674568j))*x[1]
            ref[(1, 1, 0, 2)]=(0.86029165346-0.0955557571424j)/(o+1.)+((0.132886540248-0.487821696961j))+((0.138838971999+0.285483497867j))*0.5**o
            arg[(1, 1, 0, 3)]=(-0.679882176041+0.918707275968j)*x[0]**o + ((0.994873963978+0.14011053882j))*x[0] + ((0.350254865677+0.450742358399j))*x[1]**o + ((-0.726622766696-0.861464744353j))*x[1]
            ref[(1, 1, 0, 3)]=(0.350254865677+0.450742358399j)/(o+1.)+((0.134125598641-0.360677102767j))+((-0.679882176041+0.918707275968j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.244281339655-0.99243551395j)*x[0]**o + ((-0.737133672691-0.771796701007j))*x[0] + ((-0.992236265307-0.639688471739j))*x[1]**o + ((0.290402133912-0.320395725427j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.992236265307-0.639688471739j)/(o+1.)+((-0.223365769389-0.546096213217j))+((0.244281339655-0.99243551395j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.916509697229-0.483683131622j)*x[0]**o + ((0.239136806548+0.108550288469j))*x[0] + ((-0.688905199271+0.607393873082j))*x[1]**o + ((0.848191482252+0.90205820726j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.688905199271+0.607393873082j)/(o+1.)+((0.5436641444+0.505304247864j))+((0.916509697229-0.483683131622j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.410668306827+0.517215097985j)*x[0]**o + ((0.293908856779+0.210521338756j))*x[0] + ((0.268031057599-0.121269308211j))*x[1]**o + ((0.357898161249-0.99865949988j))*x[1]
            ref[(1, 1, 1, 2)]=(0.268031057599-0.121269308211j)/(o+1.)+((0.325903509014-0.394069080562j))+((-0.410668306827+0.517215097985j))*0.5**o
            arg[(1, 1, 1, 3)]=(-0.303236239677+0.219369749452j)*x[0]**o + ((0.96639542701-0.396377242413j))*x[0] + ((-0.986073302821-0.540553088413j))*x[1]**o + ((-0.149482664975-0.0979725686817j))*x[1]
            ref[(1, 1, 1, 3)]=(-0.986073302821-0.540553088413j)/(o+1.)+((0.408456381017-0.247174905547j))+((-0.303236239677+0.219369749452j))*0.5**o
            arg[(1, 2, 0, 0)]=(0.937390010117+0.449326783403j)*x[0]**o + ((0.985464366246-0.356716358251j))*x[0] + ((0.251814523748-0.363406683321j))*x[1]**o + ((0.555658323613+0.242902131335j))*x[1]
            ref[(1, 2, 0, 0)]=(0.251814523748-0.363406683321j)/(o+1.)+((0.770561344929-0.056907113458j))+((0.937390010117+0.449326783403j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.945714762199-0.771589394756j)*x[0]**o + ((0.706898888103+0.622579662168j))*x[0] + ((0.991202947767-0.165445455247j))*x[1]**o + ((0.529896221837-0.664784318226j))*x[1]
            ref[(1, 2, 0, 1)]=(0.991202947767-0.165445455247j)/(o+1.)+((0.61839755497-0.021102328029j))+((-0.945714762199-0.771589394756j))*0.5**o
            arg[(1, 2, 0, 2)]=(-0.365567400443-0.925991252142j)*x[0]**o + ((-0.715547637942+0.756751923615j))*x[0] + ((-0.30318031591+0.830493485213j))*x[1]**o + ((-0.496817759572+0.294912919233j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.30318031591+0.830493485213j)/(o+1.)+((-0.606182698757+0.525832421424j))+((-0.365567400443-0.925991252142j))*0.5**o
            arg[(1, 2, 0, 3)]=(-0.184430558821+0.796181265416j)*x[0]**o + ((-0.844959992614+0.134242881697j))*x[0] + ((0.859679702013+0.517503056906j))*x[1]**o + ((-0.59239607295+0.453169271738j))*x[1]
            ref[(1, 2, 0, 3)]=(0.859679702013+0.517503056906j)/(o+1.)+((-0.718678032782+0.293706076718j))+((-0.184430558821+0.796181265416j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.896708975514+0.926068299509j)*x[0]**o + ((-0.498138885352-0.229925424485j))*x[0] + ((-0.891423275482+0.0950386471581j))*x[1]**o + ((0.460083052266+0.570442766338j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.891423275482+0.0950386471581j)/(o+1.)+((-0.0190279165428+0.170258670927j))+((-0.896708975514+0.926068299509j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.884171178872-0.369598508737j)*x[0]**o + ((-0.142463653612+0.891439625846j))*x[0] + ((-0.0782812544243-0.55424521837j))*x[1]**o + ((-0.0156139534284+0.272077983694j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.0782812544243-0.55424521837j)/(o+1.)+((-0.0790388035203+0.58175880477j))+((-0.884171178872-0.369598508737j))*0.5**o
            arg[(1, 2, 1, 2)]=(0.968258884951-0.166291458262j)*x[0]**o + ((0.631789049552+0.433618274944j))*x[0] + ((-0.650733659442+0.507585606504j))*x[1]**o + ((-0.667164745931+0.103912935667j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.650733659442+0.507585606504j)/(o+1.)+((-0.0176878481892+0.268765605305j))+((0.968258884951-0.166291458262j))*0.5**o
            arg[(1, 2, 1, 3)]=(0.21909372826-0.668209509906j)*x[0]**o + ((-0.102068464847+0.373056288432j))*x[0] + ((-0.961127901563+0.319127294461j))*x[1]**o + ((0.858401966082+0.583163555753j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.961127901563+0.319127294461j)/(o+1.)+((0.378166750617+0.478109922092j))+((0.21909372826-0.668209509906j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.410054116649+0.727317067152j)*x[0]**o + ((0.636716468474+0.77553886858j))*x[0] + ((-0.230651966774-0.46473428796j))*x[1]**o + ((0.764195559493+0.504877134539j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.230651966774-0.46473428796j)/(o+1.)+((0.700456013983+0.640208001559j))+((-0.410054116649+0.727317067152j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.121012118072-0.999353565757j)*x[0]**o + ((0.670993249717-0.754385147541j))*x[0] + ((0.147085854977+0.153767682042j))*x[1]**o + ((-0.76903027574+0.357616915599j))*x[1]
            ref[(2, 0, 0, 1)]=(0.147085854977+0.153767682042j)/(o+1.)+((-0.0490185130113-0.198384115971j))+((-0.121012118072-0.999353565757j))*0.5**o
            arg[(2, 0, 0, 2)]=(-0.155899321403+0.516244212766j)*x[0]**o + ((-0.449838837689+0.347751944337j))*x[0] + ((0.495535801726+0.344150875515j))*x[1]**o + ((-0.54838197039-0.312187677975j))*x[1]
            ref[(2, 0, 0, 2)]=(0.495535801726+0.344150875515j)/(o+1.)+((-0.49911040404+0.0177821331808j))+((-0.155899321403+0.516244212766j))*0.5**o
            arg[(2, 0, 0, 3)]=(-0.636652100921-0.966298641055j)*x[0]**o + ((-0.768154502162+0.374685583441j))*x[0] + ((0.2304115933+0.959787440335j))*x[1]**o + ((-0.234154038308+0.34693547868j))*x[1]
            ref[(2, 0, 0, 3)]=(0.2304115933+0.959787440335j)/(o+1.)+((-0.501154270235+0.360810531061j))+((-0.636652100921-0.966298641055j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.432129322323+0.949821915757j)*x[0]**o + ((-0.0283372563397-0.144610328747j))*x[0] + ((0.801404663957+0.146163576765j))*x[1]**o + ((0.341932000914-0.0112687762908j))*x[1]
            ref[(2, 0, 1, 0)]=(0.801404663957+0.146163576765j)/(o+1.)+((0.156797372287-0.0779395525188j))+((0.432129322323+0.949821915757j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.188145254283-0.0901288731637j)*x[0]**o + ((-0.790912592247+0.325225870576j))*x[0] + ((-0.828888869277+0.626947595596j))*x[1]**o + ((0.426902925983-0.968181236559j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.828888869277+0.626947595596j)/(o+1.)+((-0.182004833132-0.321477682991j))+((-0.188145254283-0.0901288731637j))*0.5**o
            arg[(2, 0, 1, 2)]=(0.269297451947+0.930114435136j)*x[0]**o + ((0.916716128532+0.764963976956j))*x[0] + ((0.940982477241-0.531147578285j))*x[1]**o + ((0.232584245964-0.994126601633j))*x[1]
            ref[(2, 0, 1, 2)]=(0.940982477241-0.531147578285j)/(o+1.)+((0.574650187248-0.114581312338j))+((0.269297451947+0.930114435136j))*0.5**o
            arg[(2, 0, 1, 3)]=(0.830403846621+0.0470232243798j)*x[0]**o + ((-0.279005925425-0.999532049645j))*x[0] + ((0.733184921174+0.0888993924757j))*x[1]**o + ((-0.957537666026-0.554516154719j))*x[1]
            ref[(2, 0, 1, 3)]=(0.733184921174+0.0888993924757j)/(o+1.)+((-0.618271795726-0.777024102182j))+((0.830403846621+0.0470232243798j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.945552782096+0.693736115343j)*x[0]**o + ((-0.00847903995948+0.739396692934j))*x[0] + ((0.579816552882+0.451635035291j))*x[1]**o + ((-0.0701390952271-0.215450864918j))*x[1]
            ref[(2, 1, 0, 0)]=(0.579816552882+0.451635035291j)/(o+1.)+((-0.0393090675933+0.261972914008j))+((-0.945552782096+0.693736115343j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.54371812246+0.298289285745j)*x[0]**o + ((-0.205798826133-0.664065526465j))*x[0] + ((0.178941937792+0.741358889728j))*x[1]**o + ((-0.265776703466+0.269229123088j))*x[1]
            ref[(2, 1, 0, 1)]=(0.178941937792+0.741358889728j)/(o+1.)+((-0.2357877648-0.197418201688j))+((-0.54371812246+0.298289285745j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.610139493476-0.99808147841j)*x[0]**o + ((0.103900861664+0.5546452507j))*x[0] + ((-0.208812081251-0.460446427737j))*x[1]**o + ((-0.939464381876+0.68468558603j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.208812081251-0.460446427737j)/(o+1.)+((-0.417781760106+0.619665418365j))+((-0.610139493476-0.99808147841j))*0.5**o
            arg[(2, 1, 0, 3)]=(0.327630412331-0.352596634007j)*x[0]**o + ((0.944610633104-0.817085310227j))*x[0] + ((0.229189479284+0.232877088188j))*x[1]**o + ((-0.443073056786-0.122710521166j))*x[1]
            ref[(2, 1, 0, 3)]=(0.229189479284+0.232877088188j)/(o+1.)+((0.250768788159-0.469897915697j))+((0.327630412331-0.352596634007j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.47221086788+0.31608790806j)*x[0]**o + ((-0.170143690371+0.938976071982j))*x[0] + ((0.972760592291-0.30116923232j))*x[1]**o + ((-0.343106721763+0.959334729879j))*x[1]
            ref[(2, 1, 1, 0)]=(0.972760592291-0.30116923232j)/(o+1.)+((-0.256625206067+0.949155400931j))+((0.47221086788+0.31608790806j))*0.5**o
            arg[(2, 1, 1, 1)]=(0.912756360704+0.192867540553j)*x[0]**o + ((0.240218826251+0.658378991346j))*x[0] + ((-0.370416285558-0.855004840303j))*x[1]**o + ((-0.241262816508+0.596054086676j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.370416285558-0.855004840303j)/(o+1.)+((-0.00052199512841+0.627216539011j))+((0.912756360704+0.192867540553j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.223083857168-0.685082446472j)*x[0]**o + ((-0.272820795954-0.331163045843j))*x[0] + ((-0.782257799698+0.266035446216j))*x[1]**o + ((0.791669934384-0.361204964639j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.782257799698+0.266035446216j)/(o+1.)+((0.259424569215-0.346184005241j))+((0.223083857168-0.685082446472j))*0.5**o
            arg[(2, 1, 1, 3)]=(-0.0842991676903+0.912007065487j)*x[0]**o + ((0.517361832396-0.754136515291j))*x[0] + ((-0.827603992156-0.905818025334j))*x[1]**o + ((-0.16876882879-0.236440630636j))*x[1]
            ref[(2, 1, 1, 3)]=(-0.827603992156-0.905818025334j)/(o+1.)+((0.174296501803-0.495288572964j))+((-0.0842991676903+0.912007065487j))*0.5**o
            arg[(2, 2, 0, 0)]=(0.413130590345-0.734953541586j)*x[0]**o + ((-0.647966765014+0.372046165534j))*x[0] + ((0.0707591175798+0.191650547497j))*x[1]**o + ((0.415814312375-0.907017756353j))*x[1]
            ref[(2, 2, 0, 0)]=(0.0707591175798+0.191650547497j)/(o+1.)+((-0.11607622632-0.267485795409j))+((0.413130590345-0.734953541586j))*0.5**o
            arg[(2, 2, 0, 1)]=(-0.661841085177+0.395376888857j)*x[0]**o + ((-0.635482356743+0.253338561337j))*x[0] + ((0.0988613656424-0.968615228656j))*x[1]**o + ((-0.201791591383-0.925640471308j))*x[1]
            ref[(2, 2, 0, 1)]=(0.0988613656424-0.968615228656j)/(o+1.)+((-0.418636974063-0.336150954985j))+((-0.661841085177+0.395376888857j))*0.5**o
            arg[(2, 2, 0, 2)]=(0.185523918894-0.238714472163j)*x[0]**o + ((0.286939864101+0.203113496062j))*x[0] + ((0.158768969646-0.306732523219j))*x[1]**o + ((0.0221646865851-0.722506886678j))*x[1]
            ref[(2, 2, 0, 2)]=(0.158768969646-0.306732523219j)/(o+1.)+((0.154552275343-0.259696695308j))+((0.185523918894-0.238714472163j))*0.5**o
            arg[(2, 2, 0, 3)]=(-0.161543978622-0.497479358348j)*x[0]**o + ((-0.191489384155-0.419807135284j))*x[0] + ((-0.877682707986-0.400734215418j))*x[1]**o + ((0.360368875757-0.987154092549j))*x[1]
            ref[(2, 2, 0, 3)]=(-0.877682707986-0.400734215418j)/(o+1.)+((0.084439745801-0.703480613916j))+((-0.161543978622-0.497479358348j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.126539070473-0.133902728631j)*x[0]**o + ((0.376143028174+0.646263912419j))*x[0] + ((0.170664783366-0.334220188665j))*x[1]**o + ((-0.98391343483+0.0720380504069j))*x[1]
            ref[(2, 2, 1, 0)]=(0.170664783366-0.334220188665j)/(o+1.)+((-0.303885203328+0.359150981413j))+((0.126539070473-0.133902728631j))*0.5**o
            arg[(2, 2, 1, 1)]=(-0.360114578751+0.828808996584j)*x[0]**o + ((0.252353007879-0.5540934587j))*x[0] + ((0.90219558411+0.897029096941j))*x[1]**o + ((-0.184622967739+0.124004243961j))*x[1]
            ref[(2, 2, 1, 1)]=(0.90219558411+0.897029096941j)/(o+1.)+((0.0338650200698-0.21504460737j))+((-0.360114578751+0.828808996584j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.498436201148-0.910840725521j)*x[0]**o + ((0.417497489933+0.0734758789901j))*x[0] + ((-0.434298109356-0.291823604555j))*x[1]**o + ((0.996337948857-0.0628556712374j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.434298109356-0.291823604555j)/(o+1.)+((0.706917719395+0.00531010387638j))+((-0.498436201148-0.910840725521j))*0.5**o
            arg[(2, 2, 1, 3)]=(-0.187254450163-0.57275277048j)*x[0]**o + ((-0.00492015469368+0.639625989788j))*x[0] + ((-0.029334237778-0.404686844865j))*x[1]**o + ((0.969142536363+0.435530498766j))*x[1]
            ref[(2, 2, 1, 3)]=(-0.029334237778-0.404686844865j)/(o+1.)+((0.482111190835+0.537578244277j))+((-0.187254450163-0.57275277048j))*0.5**o
            arg[(3, 0, 0, 0)]=(0.417562921526-0.159012808137j)*x[0]**o + ((0.354880511369+0.353281318952j))*x[0] + ((-0.28227102222+0.212573313398j))*x[1]**o + ((-0.721935607346+0.329262580049j))*x[1]
            ref[(3, 0, 0, 0)]=(-0.28227102222+0.212573313398j)/(o+1.)+((-0.183527547988+0.341271949501j))+((0.417562921526-0.159012808137j))*0.5**o
            arg[(3, 0, 0, 1)]=(0.0563203018256+0.527424787254j)*x[0]**o + ((0.154193011925-0.130598230519j))*x[0] + ((-0.0547245448911-0.185182499679j))*x[1]**o + ((0.996686201126-0.998753359706j))*x[1]
            ref[(3, 0, 0, 1)]=(-0.0547245448911-0.185182499679j)/(o+1.)+((0.575439606526-0.564675795113j))+((0.0563203018256+0.527424787254j))*0.5**o
            arg[(3, 0, 0, 2)]=(0.0362821403757+0.632081099996j)*x[0]**o + ((-0.47716869109+0.80000248429j))*x[0] + ((0.0845663381007+0.836146185604j))*x[1]**o + ((0.278420912098-0.804470426782j))*x[1]
            ref[(3, 0, 0, 2)]=(0.0845663381007+0.836146185604j)/(o+1.)+((-0.0993738894964-0.00223397124609j))+((0.0362821403757+0.632081099996j))*0.5**o
            arg[(3, 0, 0, 3)]=(0.0455754020907-0.43036709688j)*x[0]**o + ((-0.803052504707+0.227803669153j))*x[0] + ((-0.445742808523-0.641604796866j))*x[1]**o + ((0.607612536186-0.00609628434997j))*x[1]
            ref[(3, 0, 0, 3)]=(-0.445742808523-0.641604796866j)/(o+1.)+((-0.0977199842605+0.110853692402j))+((0.0455754020907-0.43036709688j))*0.5**o
            arg[(3, 0, 1, 0)]=(-0.482995896717-0.66347709238j)*x[0]**o + ((-0.759640611334+0.411787106868j))*x[0] + ((-0.0728017978242-0.250922225441j))*x[1]**o + ((0.35862600456+0.430260674454j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.0728017978242-0.250922225441j)/(o+1.)+((-0.200507303387+0.421023890661j))+((-0.482995896717-0.66347709238j))*0.5**o
            arg[(3, 0, 1, 1)]=(0.79260718034-0.0479878757159j)*x[0]**o + ((-0.99859378153+0.501243064285j))*x[0] + ((-0.618345705089-0.172752616488j))*x[1]**o + ((0.122620724758+0.937247366587j))*x[1]
            ref[(3, 0, 1, 1)]=(-0.618345705089-0.172752616488j)/(o+1.)+((-0.437986528386+0.719245215436j))+((0.79260718034-0.0479878757159j))*0.5**o
            arg[(3, 0, 1, 2)]=(-0.432309203427-0.0540616066337j)*x[0]**o + ((-0.627468707909-0.756449693035j))*x[0] + ((0.214050706521+0.597371547814j))*x[1]**o + ((0.986889726605+0.704672811856j))*x[1]
            ref[(3, 0, 1, 2)]=(0.214050706521+0.597371547814j)/(o+1.)+((0.179710509348-0.0258884405895j))+((-0.432309203427-0.0540616066337j))*0.5**o
            arg[(3, 0, 1, 3)]=(0.559706297865+0.976842952384j)*x[0]**o + ((-0.877813997309+0.249808784891j))*x[0] + ((-0.0515492788359+0.969035916906j))*x[1]**o + ((0.23911070479-0.353255780563j))*x[1]
            ref[(3, 0, 1, 3)]=(-0.0515492788359+0.969035916906j)/(o+1.)+((-0.319351646259-0.0517234978357j))+((0.559706297865+0.976842952384j))*0.5**o
            arg[(3, 1, 0, 0)]=(0.287718317642+0.65848789442j)*x[0]**o + ((0.61672792076+0.280874481798j))*x[0] + ((-0.200064923999-0.0718358075803j))*x[1]**o + ((-0.814953763384+0.890101841551j))*x[1]
            ref[(3, 1, 0, 0)]=(-0.200064923999-0.0718358075803j)/(o+1.)+((-0.0991129213122+0.585488161675j))+((0.287718317642+0.65848789442j))*0.5**o
            arg[(3, 1, 0, 1)]=(-0.9189853452-0.462997552049j)*x[0]**o + ((0.484598274918+0.2917759158j))*x[0] + ((0.234503280282+0.28640144698j))*x[1]**o + ((-0.290139111429+0.816210779943j))*x[1]
            ref[(3, 1, 0, 1)]=(0.234503280282+0.28640144698j)/(o+1.)+((0.0972295817443+0.553993347871j))+((-0.9189853452-0.462997552049j))*0.5**o
            arg[(3, 1, 0, 2)]=(-0.580448396262-0.00698650236542j)*x[0]**o + ((-0.747015125115-0.926915155856j))*x[0] + ((-0.350895898012-0.0136543096181j))*x[1]**o + ((0.390504284128-0.507805934475j))*x[1]
            ref[(3, 1, 0, 2)]=(-0.350895898012-0.0136543096181j)/(o+1.)+((-0.178255420494-0.717360545165j))+((-0.580448396262-0.00698650236542j))*0.5**o
            arg[(3, 1, 0, 3)]=(-0.776727481456-0.274371633999j)*x[0]**o + ((0.928652277982-0.834236006748j))*x[0] + ((-0.11447361624-0.0297624791342j))*x[1]**o + ((-0.74467398023-0.265066168757j))*x[1]
            ref[(3, 1, 0, 3)]=(-0.11447361624-0.0297624791342j)/(o+1.)+((0.0919891488762-0.549651087753j))+((-0.776727481456-0.274371633999j))*0.5**o
            arg[(3, 1, 1, 0)]=(0.401899100925-0.920125371638j)*x[0]**o + ((-0.107878626769+0.970379684903j))*x[0] + ((-0.784189905596+0.249547258454j))*x[1]**o + ((0.175047523012-0.111137265631j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.784189905596+0.249547258454j)/(o+1.)+((0.0335844481218+0.429621209636j))+((0.401899100925-0.920125371638j))*0.5**o
            arg[(3, 1, 1, 1)]=(0.0559374533441+0.596047402741j)*x[0]**o + ((-0.9117528162-0.818493512886j))*x[0] + ((-0.408958632791-0.476241423163j))*x[1]**o + ((-0.962469099038+0.607899779301j))*x[1]
            ref[(3, 1, 1, 1)]=(-0.408958632791-0.476241423163j)/(o+1.)+((-0.937110957619-0.105296866792j))+((0.0559374533441+0.596047402741j))*0.5**o
            arg[(3, 1, 1, 2)]=(0.376949108132+0.0802195386086j)*x[0]**o + ((0.11021088937-0.528036772153j))*x[0] + ((0.204576832368-0.780895745872j))*x[1]**o + ((-0.634738868808+0.950264087781j))*x[1]
            ref[(3, 1, 1, 2)]=(0.204576832368-0.780895745872j)/(o+1.)+((-0.262263989719+0.211113657814j))+((0.376949108132+0.0802195386086j))*0.5**o
            arg[(3, 1, 1, 3)]=(-0.35098461312+0.878327753299j)*x[0]**o + ((0.44174700101-0.549621800047j))*x[0] + ((-0.237635693445+0.130973682588j))*x[1]**o + ((0.145010964755-0.373738535923j))*x[1]
            ref[(3, 1, 1, 3)]=(-0.237635693445+0.130973682588j)/(o+1.)+((0.293378982883-0.461680167985j))+((-0.35098461312+0.878327753299j))*0.5**o
            arg[(3, 2, 0, 0)]=(0.976056492238-0.543187274928j)*x[0]**o + ((0.443401473575-0.618541821562j))*x[0] + ((-0.72563248014+0.41930096613j))*x[1]**o + ((-0.767653035847+0.24231737339j))*x[1]
            ref[(3, 2, 0, 0)]=(-0.72563248014+0.41930096613j)/(o+1.)+((-0.162125781136-0.188112224086j))+((0.976056492238-0.543187274928j))*0.5**o
            arg[(3, 2, 0, 1)]=(-0.781916375802+0.156827933905j)*x[0]**o + ((-0.578006143285+0.347192136333j))*x[0] + ((0.82391566324-0.00917390837062j))*x[1]**o + ((-0.799925805002+0.83374236899j))*x[1]
            ref[(3, 2, 0, 1)]=(0.82391566324-0.00917390837062j)/(o+1.)+((-0.688965974143+0.590467252661j))+((-0.781916375802+0.156827933905j))*0.5**o
            arg[(3, 2, 0, 2)]=(-0.320666610448-0.628407921903j)*x[0]**o + ((-0.163704934026+0.517327450275j))*x[0] + ((0.573978434929+0.915100431776j))*x[1]**o + ((-0.666170896589+0.196892552306j))*x[1]
            ref[(3, 2, 0, 2)]=(0.573978434929+0.915100431776j)/(o+1.)+((-0.414937915308+0.357110001291j))+((-0.320666610448-0.628407921903j))*0.5**o
            arg[(3, 2, 0, 3)]=(-0.185114952337-0.814478781765j)*x[0]**o + ((-0.125466849872-0.440854357614j))*x[0] + ((-0.65609693638+0.963871520723j))*x[1]**o + ((-0.861911900618-0.260218126379j))*x[1]
            ref[(3, 2, 0, 3)]=(-0.65609693638+0.963871520723j)/(o+1.)+((-0.493689375245-0.350536241996j))+((-0.185114952337-0.814478781765j))*0.5**o
            arg[(3, 2, 1, 0)]=(0.0645129448507-0.886682291753j)*x[0]**o + ((0.943050263237-0.0207025929314j))*x[0] + ((0.507339826226-0.967760015296j))*x[1]**o + ((0.911377981589+0.309030073591j))*x[1]
            ref[(3, 2, 1, 0)]=(0.507339826226-0.967760015296j)/(o+1.)+((0.927214122413+0.14416374033j))+((0.0645129448507-0.886682291753j))*0.5**o
            arg[(3, 2, 1, 1)]=(0.831127026666+0.102048787201j)*x[0]**o + ((-0.800153239279-0.961609113204j))*x[0] + ((-0.457831551502+0.919975521934j))*x[1]**o + ((0.0856797505701-0.500544043511j))*x[1]
            ref[(3, 2, 1, 1)]=(-0.457831551502+0.919975521934j)/(o+1.)+((-0.357236744355-0.731076578358j))+((0.831127026666+0.102048787201j))*0.5**o
            arg[(3, 2, 1, 2)]=(0.81471631407+0.761443362819j)*x[0]**o + ((-0.611009096036+0.0782373851617j))*x[0] + ((-0.65339496894-0.391994658815j))*x[1]**o + ((0.375698066719+0.659725134037j))*x[1]
            ref[(3, 2, 1, 2)]=(-0.65339496894-0.391994658815j)/(o+1.)+((-0.117655514658+0.368981259599j))+((0.81471631407+0.761443362819j))*0.5**o
            arg[(3, 2, 1, 3)]=(0.498048873682-0.990886479108j)*x[0]**o + ((0.0735506200869+0.907643659322j))*x[0] + ((-0.97438052591+0.760347899394j))*x[1]**o + ((0.389999232911+0.0915455201147j))*x[1]
            ref[(3, 2, 1, 3)]=(-0.97438052591+0.760347899394j)/(o+1.)+((0.231774926499+0.499594589718j))+((0.498048873682-0.990886479108j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(-0.880726868975+0.0518018420367j)*x[0]**o + ((-0.328688973845-0.96571492768j))*x[0] + ((0.407172228922-0.636522981223j))*x[1]**o + ((0.821904410878-0.0975034951943j))*x[1] + ((0.351014820922+0.456143564078j))*x[2]**o + ((0.496115525761+0.737617908093j))*x[2]
            ref[(0, 0, 0, 0)]=(0.758187049844-0.180379417145j)/(o+1.)+((0.494665481397-0.16280025739j))+((-0.880726868975+0.0518018420367j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.912621601889-0.0760111293395j)*x[0]**o + ((0.240559951844-0.662918242468j))*x[0] + ((-0.85079120374+0.888008335374j))*x[1]**o + ((0.0643250434459+0.729305966227j))*x[1] + ((-0.205514590357-0.805112745105j))*x[2]**o + ((-0.31764111294-0.328900324972j))*x[2]
            ref[(0, 0, 0, 1)]=(-1.0563057941+0.0828955902688j)/(o+1.)+((-0.00637805882484-0.131256300606j))+((0.912621601889-0.0760111293395j))*0.5**o
            arg[(0, 0, 0, 2)]=(0.186695244744-0.340223789404j)*x[0]**o + ((-0.851216306193-0.532537600895j))*x[0] + ((0.0351559391489+0.00798746947154j))*x[1]**o + ((0.127405992935-0.169387625855j))*x[1] + ((0.485011785156+0.525821660713j))*x[2]**o + ((0.394103308893-0.526888788448j))*x[2]
            ref[(0, 0, 0, 2)]=(0.520167724305+0.533809130185j)/(o+1.)+((-0.164853502182-0.614407007599j))+((0.186695244744-0.340223789404j))*0.5**o
            arg[(0, 0, 0, 3)]=(-0.337341612458+0.410303318209j)*x[0]**o + ((-0.0658873696753-0.661484149326j))*x[0] + ((-0.533244152209+0.286304174957j))*x[1]**o + ((0.232428795788+0.907271401713j))*x[1] + ((0.295747701705-0.783307259027j))*x[2]**o + ((0.113187011194+0.886550216424j))*x[2]
            ref[(0, 0, 0, 3)]=(-0.237496450504-0.49700308407j)/(o+1.)+((0.139864218653+0.566168734406j))+((-0.337341612458+0.410303318209j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.97177280795-0.912537339125j)*x[0]**o + ((0.92026006494+0.338669470046j))*x[0] + ((-0.790063900046-0.0409436517844j))*x[1]**o + ((-0.220829075464+0.584095810218j))*x[1] + ((0.451094568521-0.658587785665j))*x[2]**o + ((-0.286043074918-0.611606254598j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.338969331525-0.699531437449j)/(o+1.)+((0.206693957279+0.155579512833j))+((0.97177280795-0.912537339125j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.786756303454+0.969988734993j)*x[0]**o + ((-0.950059698355-0.235724277601j))*x[0] + ((-0.239762329814-0.118229952054j))*x[1]**o + ((-0.0884681898247+0.913201838651j))*x[1] + ((-0.979590772487+0.0925125020439j))*x[2]**o + ((-0.305075852464+0.698395255172j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.2193531023-0.0257174500099j)/(o+1.)+((-0.671801870322+0.68793640811j))+((-0.786756303454+0.969988734993j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.202029576231+0.134118192819j)*x[0]**o + ((-0.718264346556-0.514360979806j))*x[0] + ((-0.823224342375+0.274723703665j))*x[1]**o + ((0.60976580618+0.942782175272j))*x[1] + ((0.255588397345-0.0900866364157j))*x[2]**o + ((0.173271474577-0.969165046168j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.56763594503+0.184637067249j)/(o+1.)+((0.0323864671005-0.270371925351j))+((-0.202029576231+0.134118192819j))*0.5**o
            arg[(0, 0, 1, 3)]=(0.478354736615+0.0409873119327j)*x[0]**o + ((0.728271447435+0.859577376008j))*x[0] + ((0.420998831648+0.166812164053j))*x[1]**o + ((0.974024694131-0.831684990882j))*x[1] + ((0.631170863999+0.824938372954j))*x[2]**o + ((0.965207071204+0.239525544299j))*x[2]
            ref[(0, 0, 1, 3)]=(1.05216969565+0.991750537008j)/(o+1.)+((1.33375160638+0.133708964712j))+((0.478354736615+0.0409873119327j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.140225774635+0.392353561864j)*x[0]**o + ((0.00613776287016+0.907003561127j))*x[0] + ((0.57366311135-0.510725014936j))*x[1]**o + ((0.973702373445+0.921102849889j))*x[1] + ((-0.0703068839451-0.459624302361j))*x[2]**o + ((-0.406635685695-0.847234324513j))*x[2]
            ref[(0, 1, 0, 0)]=(0.503356227405-0.970349317297j)/(o+1.)+((0.28660222531+0.490436043251j))+((0.140225774635+0.392353561864j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.978879030269+0.342680677885j)*x[0]**o + ((0.714285557467-0.177212223003j))*x[0] + ((-0.313810853992-0.38280265133j))*x[1]**o + ((-0.312915609776+0.745760746893j))*x[1] + ((0.801267040576+0.200399852068j))*x[2]**o + ((0.501480285636-0.951298970508j))*x[2]
            ref[(0, 1, 0, 1)]=(0.487456186584-0.182402799262j)/(o+1.)+((0.451425116664-0.191375223309j))+((0.978879030269+0.342680677885j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.547012292135-0.926896440685j)*x[0]**o + ((-0.224307569386+0.318451590466j))*x[0] + ((-0.168732959987+0.521823896463j))*x[1]**o + ((0.336783215513-0.912706348245j))*x[1] + ((0.589072524164-0.63029393404j))*x[2]**o + ((0.318689774821+0.472586168685j))*x[2]
            ref[(0, 1, 0, 2)]=(0.420339564177-0.108470037577j)/(o+1.)+((0.215582710474-0.0608342945466j))+((-0.547012292135-0.926896440685j))*0.5**o
            arg[(0, 1, 0, 3)]=(0.576583900264-0.11473705562j)*x[0]**o + ((0.0739193782901-0.0733082077885j))*x[0] + ((0.116336860605+0.194364423256j))*x[1]**o + ((0.815022035597+0.114743793542j))*x[1] + ((0.172049800178+0.620675178739j))*x[2]**o + ((-0.922702075959-0.097783907931j))*x[2]
            ref[(0, 1, 0, 3)]=(0.288386660784+0.815039601995j)/(o+1.)+((-0.0168803310359-0.0281741610886j))+((0.576583900264-0.11473705562j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.15663488288+0.265450247777j)*x[0]**o + ((0.355728412821+0.477792164124j))*x[0] + ((0.409525444091-0.0366758874026j))*x[1]**o + ((0.355482970807-0.920075171859j))*x[1] + ((-0.658821732717-0.338013228126j))*x[2]**o + ((0.00538321366853-0.358382474505j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.249296288626-0.374689115529j)/(o+1.)+((0.358297298648-0.40033274112j))+((0.15663488288+0.265450247777j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.408410126051+0.172084093375j)*x[0]**o + ((0.251271253227+0.796405026276j))*x[0] + ((0.0235350914888-0.0647290794005j))*x[1]**o + ((-0.927196723951+0.627239185571j))*x[1] + ((-0.976765074421-0.763939093104j))*x[2]**o + ((-0.0937992788527-0.234396214902j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.953229982932-0.828668172504j)/(o+1.)+((-0.384862374788+0.594623998473j))+((0.408410126051+0.172084093375j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.349605858966-0.184083378937j)*x[0]**o + ((-0.850096519021-0.999490234891j))*x[0] + ((0.633976752858-0.503889861962j))*x[1]**o + ((0.91274729731+0.690773884078j))*x[1] + ((0.375807768091-0.656900078054j))*x[2]**o + ((-0.950973974072+0.401752090645j))*x[2]
            ref[(0, 1, 1, 2)]=(1.00978452095-1.16078994002j)/(o+1.)+((-0.444161597891+0.0465178699158j))+((0.349605858966-0.184083378937j))*0.5**o
            arg[(0, 1, 1, 3)]=(-0.220369465504+0.846151571358j)*x[0]**o + ((-0.437295159817+0.768585944079j))*x[0] + ((-0.958792783252+0.891898224609j))*x[1]**o + ((0.0561130633845+0.0700528601553j))*x[1] + ((0.471602602456-0.0326605539079j))*x[2]**o + ((-0.343502274847-0.240660857804j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.487190180796+0.859237670701j)/(o+1.)+((-0.36234218564+0.298988973215j))+((-0.220369465504+0.846151571358j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.594953480717-0.211228124201j)*x[0]**o + ((0.0715716996102+0.823705089718j))*x[0] + ((-0.70761674639-0.647738821094j))*x[1]**o + ((0.375641780408-0.689254347164j))*x[1] + ((0.279932432667+0.755999371489j))*x[2]**o + ((-0.537298505732-0.52059912153j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.427684313724+0.108260550394j)/(o+1.)+((-0.0450425128572-0.193074189488j))+((-0.594953480717-0.211228124201j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.526918819459+0.516552399095j)*x[0]**o + ((0.0989873572797+0.980072329498j))*x[0] + ((0.312173681563+0.671903290251j))*x[1]**o + ((0.664448236803+0.884624627313j))*x[1] + ((0.91583013745-0.912096878606j))*x[2]**o + ((0.167684466528-0.207839887794j))*x[2]
            ref[(0, 2, 0, 1)]=(1.22800381901-0.240193588355j)/(o+1.)+((0.465560030305+0.828428534508j))+((0.526918819459+0.516552399095j))*0.5**o
            arg[(0, 2, 0, 2)]=(-0.816072987894+0.903395770799j)*x[0]**o + ((-0.134947354608-0.815259513961j))*x[0] + ((-0.162684521705+0.277420425756j))*x[1]**o + ((0.646979056309-0.552497198811j))*x[1] + ((-0.878384420973-0.349568399689j))*x[2]**o + ((-0.530102362554+0.570185734766j))*x[2]
            ref[(0, 2, 0, 2)]=(-1.04106894268-0.0721479739324j)/(o+1.)+((-0.00903533042684-0.398785489003j))+((-0.816072987894+0.903395770799j))*0.5**o
            arg[(0, 2, 0, 3)]=(0.375315408511-0.498319730058j)*x[0]**o + ((-0.90275839873+0.849837496313j))*x[0] + ((0.444126042918-0.195401141178j))*x[1]**o + ((-0.410034017506-0.456296521155j))*x[1] + ((-0.0640305272056+0.0846099560199j))*x[2]**o + ((-0.0889060316283+0.108727771278j))*x[2]
            ref[(0, 2, 0, 3)]=(0.380095515712-0.110791185158j)/(o+1.)+((-0.700849223932+0.251134373218j))+((0.375315408511-0.498319730058j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.499542705001+0.438708016949j)*x[0]**o + ((0.288350364091-0.325852156246j))*x[0] + ((-0.166365232181-0.801590484867j))*x[1]**o + ((0.123711637596+0.886120230035j))*x[1] + ((-0.92418471534+0.263593856775j))*x[2]**o + ((0.176099754299-0.354096113995j))*x[2]
            ref[(0, 2, 1, 0)]=(-1.09054994752-0.537996628093j)/(o+1.)+((0.294080877993+0.103085979897j))+((-0.499542705001+0.438708016949j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.833169339882+0.899684984063j)*x[0]**o + ((-0.692663495426-0.435917798518j))*x[0] + ((0.546195250866+0.986173175439j))*x[1]**o + ((0.103909003973-0.92646510174j))*x[1] + ((0.613625955686-0.221461658349j))*x[2]**o + ((-0.432207786826+0.98195021307j))*x[2]
            ref[(0, 2, 1, 1)]=(1.15982120655+0.76471151709j)/(o+1.)+((-0.510481139139-0.190216343594j))+((0.833169339882+0.899684984063j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.502289045668+0.479681955998j)*x[0]**o + ((0.154181329441+0.171173363756j))*x[0] + ((-0.236452409152+0.615751359657j))*x[1]**o + ((0.959097366979-0.877099475689j))*x[1] + ((-0.0455270185665-0.56644374245j))*x[2]**o + ((0.552207766537-0.100108716571j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.281979427718+0.0493076172068j)/(o+1.)+((0.832743231478-0.403017414252j))+((-0.502289045668+0.479681955998j))*0.5**o
            arg[(0, 2, 1, 3)]=(0.548914195175-0.650226112997j)*x[0]**o + ((0.242674761357+0.5526784726j))*x[0] + ((0.574160976+0.619503067106j))*x[1]**o + ((-0.625340140062-0.453698412336j))*x[1] + ((-0.634030974312-0.246969969209j))*x[2]**o + ((0.190550486801-0.0189790836208j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.059869998312+0.372533097897j)/(o+1.)+((-0.0960574459519+0.0400004883218j))+((0.548914195175-0.650226112997j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.975507252702+0.417929501228j)*x[0]**o + ((0.0758334253853+0.79082085758j))*x[0] + ((-0.491866747837-0.033544014202j))*x[1]**o + ((-0.386117662245+0.318163266507j))*x[1] + ((0.14098499176+0.6664979997j))*x[2]**o + ((-0.314784090771+0.392879476134j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.350881756077+0.632953985498j)/(o+1.)+((-0.312534163815+0.75093180011j))+((-0.975507252702+0.417929501228j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.431779312339+0.252038314764j)*x[0]**o + ((0.342526017774+0.36996437674j))*x[0] + ((-0.850559306991-0.722589909105j))*x[1]**o + ((-0.221190607383+0.454211694647j))*x[1] + ((-0.355094574099-0.869175756046j))*x[2]**o + ((-0.901446260536+0.91286377981j))*x[2]
            ref[(1, 0, 0, 1)]=(-1.20565388109-1.59176566515j)/(o+1.)+((-0.390055425073+0.868519925598j))+((0.431779312339+0.252038314764j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.649604980839+0.781866879499j)*x[0]**o + ((-0.416170802727-0.470220081728j))*x[0] + ((-0.447613876101-0.90970955054j))*x[1]**o + ((0.483617260202+0.692506001339j))*x[1] + ((-0.226300031157-0.357645246024j))*x[2]**o + ((-0.260587641221+0.386202680277j))*x[2]
            ref[(1, 0, 0, 2)]=(-0.673913907258-1.26735479656j)/(o+1.)+((-0.0965705918733+0.304244299944j))+((-0.649604980839+0.781866879499j))*0.5**o
            arg[(1, 0, 0, 3)]=(-0.211248032229-0.556120153541j)*x[0]**o + ((0.113727170217+0.959937738839j))*x[0] + ((0.931280900408+0.503244690312j))*x[1]**o + ((-0.401467862873+0.949716431494j))*x[1] + ((0.101335951267-0.821210966415j))*x[2]**o + ((0.750892476141+0.171314640841j))*x[2]
            ref[(1, 0, 0, 3)]=(1.03261685167-0.317966276103j)/(o+1.)+((0.231575891742+1.04048440559j))+((-0.211248032229-0.556120153541j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.270266944117+0.587829723341j)*x[0]**o + ((-0.634437248984-0.527454738046j))*x[0] + ((-0.275930494178+0.421847737271j))*x[1]**o + ((-0.476563624674+0.75179147265j))*x[1] + ((0.740693186027-0.378891793027j))*x[2]**o + ((-0.409129645208-0.897657199102j))*x[2]
            ref[(1, 0, 1, 0)]=(0.464762691849+0.0429559442441j)/(o+1.)+((-0.760065259433-0.336660232249j))+((0.270266944117+0.587829723341j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.822075107415+0.909852111646j)*x[0]**o + ((-0.180424814349+0.551345850819j))*x[0] + ((0.0602247141867+0.485053495457j))*x[1]**o + ((0.148147978522+0.0659029715016j))*x[1] + ((-0.217786296279-0.228196947872j))*x[2]**o + ((0.0411728348755+0.939375625382j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.157561582092+0.256856547585j)/(o+1.)+((0.00444799952419+0.778312223851j))+((0.822075107415+0.909852111646j))*0.5**o
            arg[(1, 0, 1, 2)]=(-0.445941795225+0.512858560189j)*x[0]**o + ((-0.551595988139+0.477010806652j))*x[0] + ((-0.318715445564-0.276072315688j))*x[1]**o + ((-0.512877476273-0.210140494097j))*x[1] + ((-0.824409935666+0.0433064310911j))*x[2]**o + ((-0.556097754427-0.769857238172j))*x[2]
            ref[(1, 0, 1, 2)]=(-1.14312538123-0.232765884597j)/(o+1.)+((-0.810285609419-0.251493462808j))+((-0.445941795225+0.512858560189j))*0.5**o
            arg[(1, 0, 1, 3)]=(0.975054632349+0.0511173754045j)*x[0]**o + ((-0.198499266589-0.307264902135j))*x[0] + ((-0.00141541938347-0.80196478244j))*x[1]**o + ((-0.649239818132+0.0214561253622j))*x[1] + ((-0.320314596165-0.00526759364259j))*x[2]**o + ((-0.231189277593+0.412554826667j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.321730015548-0.807232376083j)/(o+1.)+((-0.539464181157+0.0633730249473j))+((0.975054632349+0.0511173754045j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.318700708949-0.367200183378j)*x[0]**o + ((0.947431801431+0.539499661891j))*x[0] + ((0.819663798993-0.640827912415j))*x[1]**o + ((-0.558440273771+0.22544296304j))*x[1] + ((0.199058490061+0.381099382444j))*x[2]**o + ((0.362398398305+0.713683423921j))*x[2]
            ref[(1, 1, 0, 0)]=(1.01872228905-0.259728529971j)/(o+1.)+((0.375694962982+0.739313024426j))+((-0.318700708949-0.367200183378j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.133542991115+0.0139112891343j)*x[0]**o + ((-0.113753282809-0.293218133559j))*x[0] + ((0.280735489043+0.479247308051j))*x[1]**o + ((0.387549388212+0.0312244022148j))*x[1] + ((-0.129527960329-0.890725314025j))*x[2]**o + ((-0.665220936973-0.800078378141j))*x[2]
            ref[(1, 1, 0, 1)]=(0.151207528715-0.411478005974j)/(o+1.)+((-0.195712415785-0.531036054743j))+((-0.133542991115+0.0139112891343j))*0.5**o
            arg[(1, 1, 0, 2)]=(-0.249014968492-0.686585052178j)*x[0]**o + ((-0.000488737394888+0.133443969016j))*x[0] + ((0.481675361997+0.928509686372j))*x[1]**o + ((-0.956962480459-0.831868402225j))*x[1] + ((-0.391900288221+0.75061278444j))*x[2]**o + ((-0.0406073211885+0.897066354575j))*x[2]
            ref[(1, 1, 0, 2)]=(0.0897750737754+1.67912247081j)/(o+1.)+((-0.499029269521+0.0993209606828j))+((-0.249014968492-0.686585052178j))*0.5**o
            arg[(1, 1, 0, 3)]=(-0.999411267084-0.539302594534j)*x[0]**o + ((-0.818309876861+0.552595960919j))*x[0] + ((0.644320870706+0.709652516708j))*x[1]**o + ((0.389019348147+0.318319744904j))*x[1] + ((0.175898469989-0.0951022190337j))*x[2]**o + ((-0.101882091481-0.0599513120128j))*x[2]
            ref[(1, 1, 0, 3)]=(0.820219340695+0.614550297674j)/(o+1.)+((-0.265586310098+0.405482196905j))+((-0.999411267084-0.539302594534j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.196021370472-0.704761832294j)*x[0]**o + ((0.492579719851+0.948643931901j))*x[0] + ((0.135165826648+0.201449415061j))*x[1]**o + ((-0.256338913373-0.0655442239838j))*x[1] + ((-0.587270180552-0.652268374525j))*x[2]**o + ((-0.603518248699-0.176374755011j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.452104353905-0.450818959465j)/(o+1.)+((-0.18363872111+0.353362476453j))+((-0.196021370472-0.704761832294j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.188911710843+0.18855166048j)*x[0]**o + ((0.995880971903-0.324314911567j))*x[0] + ((-0.550074670301-0.28785402381j))*x[1]**o + ((-0.747747126949+0.451009427697j))*x[1] + ((-0.30924360883-0.383940322335j))*x[2]**o + ((-0.722605838552+0.485011979335j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.859318279131-0.671794346144j)/(o+1.)+((-0.237235996799+0.305853247733j))+((0.188911710843+0.18855166048j))*0.5**o
            arg[(1, 1, 1, 2)]=(0.126796354457-0.64478222537j)*x[0]**o + ((-0.0628998687459-0.257278136064j))*x[0] + ((0.533580344264+0.760473507454j))*x[1]**o + ((0.924285292621+0.981017961783j))*x[1] + ((0.277183381957-0.752876283568j))*x[2]**o + ((-0.341629162103-0.592804091577j))*x[2]
            ref[(1, 1, 1, 2)]=(0.810763726221+0.00759722388557j)/(o+1.)+((0.259878130886+0.0654678670711j))+((0.126796354457-0.64478222537j))*0.5**o
            arg[(1, 1, 1, 3)]=(-0.268499788949+0.836423757744j)*x[0]**o + ((-0.136581295523+0.211056428994j))*x[0] + ((-0.509925756915+0.420900164445j))*x[1]**o + ((0.569956430289-0.540561873187j))*x[1] + ((0.775823689772+0.115131431526j))*x[2]**o + ((-0.362484665422+0.38176023135j))*x[2]
            ref[(1, 1, 1, 3)]=(0.265897932857+0.53603159597j)/(o+1.)+((0.0354452346719+0.0261273935785j))+((-0.268499788949+0.836423757744j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.259347180911-0.321235525467j)*x[0]**o + ((-0.951091408108+0.823752171012j))*x[0] + ((-0.501369173174+0.670958522203j))*x[1]**o + ((-0.231743489277+0.509279807188j))*x[1] + ((-0.236361787931-0.604872971975j))*x[2]**o + ((-0.865872705787+0.68634445828j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.737730961105+0.0660855502272j)/(o+1.)+((-1.02435380159+1.00968821824j))+((-0.259347180911-0.321235525467j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.653540804586+0.0554555573819j)*x[0]**o + ((0.557972804134-0.892812880655j))*x[0] + ((0.342733607496-0.102573136221j))*x[1]**o + ((0.0161179574756+0.343468763963j))*x[1] + ((0.925046917733+0.288240315055j))*x[2]**o + ((-0.851070986916-0.43376711557j))*x[2]
            ref[(1, 2, 0, 1)]=(1.26778052523+0.185667178834j)/(o+1.)+((-0.138490112653-0.491555616131j))+((-0.653540804586+0.0554555573819j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.634463015925+0.488813956375j)*x[0]**o + ((-0.723145589587+0.0952761544779j))*x[0] + ((0.197078077433-0.82614930055j))*x[1]**o + ((-0.00768964605627+0.399347854577j))*x[1] + ((-0.601026285485+0.795974889663j))*x[2]**o + ((0.253305053033+0.116059322032j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.403948208052-0.030174410887j)/(o+1.)+((-0.238765091305+0.305341665544j))+((0.634463015925+0.488813956375j))*0.5**o
            arg[(1, 2, 0, 3)]=(-0.203629526301+0.62648393943j)*x[0]**o + ((-0.0287710661556+0.0186743341275j))*x[0] + ((0.939320646422+0.391266992004j))*x[1]**o + ((-0.485227090769-0.684147689052j))*x[1] + ((0.563755208998-0.688972341232j))*x[2]**o + ((0.731095130099+0.0289996507866j))*x[2]
            ref[(1, 2, 0, 3)]=(1.50307585542-0.297705349228j)/(o+1.)+((0.108548486587-0.318236852069j))+((-0.203629526301+0.62648393943j))*0.5**o
            arg[(1, 2, 1, 0)]=(0.987160220612-0.190769321882j)*x[0]**o + ((-0.138409609184-0.208880745723j))*x[0] + ((-0.549860978032-0.344096621272j))*x[1]**o + ((0.668292282021+0.158342387874j))*x[1] + ((0.762610238355+0.118682003728j))*x[2]**o + ((-0.0674668006115-0.778635353438j))*x[2]
            ref[(1, 2, 1, 0)]=(0.212749260324-0.225414617544j)/(o+1.)+((0.231207936113-0.414586855643j))+((0.987160220612-0.190769321882j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.439792187417+0.146954796615j)*x[0]**o + ((-0.532474123941-0.194322971888j))*x[0] + ((0.526916107574-0.273383890219j))*x[1]**o + ((0.724321287126-0.622856775494j))*x[1] + ((0.146307914088+0.792374171413j))*x[2]**o + ((-0.687104073779+0.0666203145275j))*x[2]
            ref[(1, 2, 1, 1)]=(0.673224021662+0.518990281195j)/(o+1.)+((-0.247628455297-0.375279716427j))+((0.439792187417+0.146954796615j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.806334025048+0.409211610551j)*x[0]**o + ((0.841210685987+0.394935574582j))*x[0] + ((-0.968456728869-0.735013274252j))*x[1]**o + ((-0.624780665937+0.666629354796j))*x[1] + ((0.269457363772+0.727193557765j))*x[2]**o + ((0.476832481937-0.942208289851j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.698999365097-0.00781971648786j)/(o+1.)+((0.346631250994+0.0596783197635j))+((-0.806334025048+0.409211610551j))*0.5**o
            arg[(1, 2, 1, 3)]=(-0.727661000855-0.720978362324j)*x[0]**o + ((-0.436688552804-0.412670850335j))*x[0] + ((-0.325551035341-0.14374325402j))*x[1]**o + ((0.425073804142-0.148766181652j))*x[1] + ((-0.617074997682-0.446747421646j))*x[2]**o + ((-0.840908280303+0.527430210888j))*x[2]
            ref[(1, 2, 1, 3)]=(-0.942626033023-0.590490675665j)/(o+1.)+((-0.426261514483-0.017003410549j))+((-0.727661000855-0.720978362324j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.117866942773+0.794404210911j)*x[0]**o + ((0.949514689334+0.765624164076j))*x[0] + ((-0.73735437949-0.770010208439j))*x[1]**o + ((0.199424425662-0.278332602475j))*x[1] + ((0.708847450829+0.374330548874j))*x[2]**o + ((-0.991202563126+0.512382863764j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.0285069286617-0.395679659565j)/(o+1.)+((0.0788682759347+0.499837212683j))+((-0.117866942773+0.794404210911j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.748512346252+0.368273240548j)*x[0]**o + ((-0.0457045103356+0.16658898524j))*x[0] + ((-0.159761415346-0.612597068753j))*x[1]**o + ((-0.380974684307-0.753699580082j))*x[1] + ((0.529703491668-0.576399622818j))*x[2]**o + ((0.701313350647+0.133262999403j))*x[2]
            ref[(2, 0, 0, 1)]=(0.369942076322-1.18899669157j)/(o+1.)+((0.137317078002-0.226923797719j))+((0.748512346252+0.368273240548j))*0.5**o
            arg[(2, 0, 0, 2)]=(0.877028442573+0.797769433028j)*x[0]**o + ((-0.0329999419959-0.879114442963j))*x[0] + ((0.266316807437+0.6156067546j))*x[1]**o + ((0.0776701231855+0.857038747709j))*x[1] + ((-0.216855936428-0.598635248475j))*x[2]**o + ((0.26584338329-0.624901221589j))*x[2]
            ref[(2, 0, 0, 2)]=(0.0494608710097+0.0169715061251j)/(o+1.)+((0.15525678224-0.323488458421j))+((0.877028442573+0.797769433028j))*0.5**o
            arg[(2, 0, 0, 3)]=(0.825649416139-0.290489312883j)*x[0]**o + ((0.943974771453-0.163222234521j))*x[0] + ((0.255044115502+0.0505799735808j))*x[1]**o + ((-0.0745924371648+0.234968093308j))*x[1] + ((0.558198057029+0.141946044321j))*x[2]**o + ((0.76792415136-0.492651274378j))*x[2]
            ref[(2, 0, 0, 3)]=(0.813242172531+0.192526017902j)/(o+1.)+((0.818653242824-0.210452707796j))+((0.825649416139-0.290489312883j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.202042735949+0.902217236801j)*x[0]**o + ((-0.0287686086518+0.727901907438j))*x[0] + ((0.238598998392+0.88293407036j))*x[1]**o + ((-0.34667933939-0.118967062068j))*x[1] + ((0.624448674871+0.623230000059j))*x[2]**o + ((-0.11519320881-0.886253944822j))*x[2]
            ref[(2, 0, 1, 0)]=(0.863047673264+1.50616407042j)/(o+1.)+((-0.245320578426-0.138659549726j))+((0.202042735949+0.902217236801j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.258606033482-0.273366263029j)*x[0]**o + ((0.713398744285+0.687281967155j))*x[0] + ((-0.773672139691+0.896638939126j))*x[1]**o + ((-0.0825660815369-0.0830578413499j))*x[1] + ((0.6105592277-0.942777043269j))*x[2]**o + ((0.743412148745-0.508585493463j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.163112911991-0.0461381041438j)/(o+1.)+((0.687122405746+0.0478193161707j))+((-0.258606033482-0.273366263029j))*0.5**o
            arg[(2, 0, 1, 2)]=(-0.950908891787-0.962867331996j)*x[0]**o + ((0.471514462402-0.356571865135j))*x[0] + ((-0.436639333102-0.764728215852j))*x[1]**o + ((-0.561227621858-0.36953487102j))*x[1] + ((0.709413000063+0.348396807329j))*x[2]**o + ((-0.448258571789+0.194087479286j))*x[2]
            ref[(2, 0, 1, 2)]=(0.272773666961-0.416331408522j)/(o+1.)+((-0.268985865622-0.266009628435j))+((-0.950908891787-0.962867331996j))*0.5**o
            arg[(2, 0, 1, 3)]=(-0.96492253385-0.296358994815j)*x[0]**o + ((0.723515164191+0.400358598069j))*x[0] + ((-0.360103973448-0.870948179978j))*x[1]**o + ((0.745906653694-0.590657755347j))*x[1] + ((0.235760294823-0.529179656728j))*x[2]**o + ((-0.285268726871-0.168436803732j))*x[2]
            ref[(2, 0, 1, 3)]=(-0.124343678625-1.40012783671j)/(o+1.)+((0.592076545506-0.179367980505j))+((-0.96492253385-0.296358994815j))*0.5**o
            arg[(2, 1, 0, 0)]=(0.980889520842-0.198389744035j)*x[0]**o + ((0.751160893926+0.918221311218j))*x[0] + ((0.647643585668-0.444553288051j))*x[1]**o + ((0.47939358246-0.733201743153j))*x[1] + ((0.624319501616-0.428916224133j))*x[2]**o + ((-0.941891079685-0.218085226987j))*x[2]
            ref[(2, 1, 0, 0)]=(1.27196308728-0.873469512184j)/(o+1.)+((0.144331698351-0.0165328294608j))+((0.980889520842-0.198389744035j))*0.5**o
            arg[(2, 1, 0, 1)]=(-0.553314232896+0.782213328719j)*x[0]**o + ((0.517319667441+0.683419806273j))*x[0] + ((0.983292969067+0.251789485284j))*x[1]**o + ((0.311267191987-0.22114043845j))*x[1] + ((-0.703272628575-0.726398310959j))*x[2]**o + ((0.622255274459-0.476497367801j))*x[2]
            ref[(2, 1, 0, 1)]=(0.280020340492-0.474608825675j)/(o+1.)+((0.725421066944-0.00710899998907j))+((-0.553314232896+0.782213328719j))*0.5**o
            arg[(2, 1, 0, 2)]=(-0.674502362646+0.463381377117j)*x[0]**o + ((-0.300832847046-0.54532643903j))*x[0] + ((0.954401194863+0.14302048559j))*x[1]**o + ((-0.843280939129-0.0903011211139j))*x[1] + ((0.985518361256+0.230837335248j))*x[2]**o + ((-0.771991684543+0.653501527276j))*x[2]
            ref[(2, 1, 0, 2)]=(1.93991955612+0.373857820838j)/(o+1.)+((-0.958052735359+0.00893698356559j))+((-0.674502362646+0.463381377117j))*0.5**o
            arg[(2, 1, 0, 3)]=(0.99117758974-0.15645464236j)*x[0]**o + ((0.551513976435-0.0458246392965j))*x[0] + ((-0.59732564746+0.30407416618j))*x[1]**o + ((0.148028809694-0.763620733801j))*x[1] + ((-0.732957492214+0.0125145055946j))*x[2]**o + ((-0.860498274745-0.0660133035604j))*x[2]
            ref[(2, 1, 0, 3)]=(-1.33028313967+0.316588671775j)/(o+1.)+((-0.0804777443082-0.437729338329j))+((0.99117758974-0.15645464236j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.622759751818-0.371947928011j)*x[0]**o + ((0.0251556905409+0.568201689476j))*x[0] + ((-0.503158107591+0.757282574421j))*x[1]**o + ((-0.781088535848+0.702262493484j))*x[1] + ((-0.443225005799+0.535063239031j))*x[2]**o + ((-0.876422424548-0.969258330161j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.94638311339+1.29234581345j)/(o+1.)+((-0.816177634928+0.1506029264j))+((0.622759751818-0.371947928011j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.139475035546+0.939449563963j)*x[0]**o + ((-0.77818319889-0.567048342602j))*x[0] + ((-0.1290390401-0.87240306426j))*x[1]**o + ((0.958132655766+0.0607921736522j))*x[1] + ((-0.964375991221-0.248031035517j))*x[2]**o + ((0.278446575594-0.540579261292j))*x[2]
            ref[(2, 1, 1, 1)]=(-1.09341503132-1.12043409978j)/(o+1.)+((0.229198016235-0.52341771512j))+((-0.139475035546+0.939449563963j))*0.5**o
            arg[(2, 1, 1, 2)]=(0.899070089298+0.406203325051j)*x[0]**o + ((-0.156116968493+0.77613338778j))*x[0] + ((0.672793061554-0.120476209538j))*x[1]**o + ((0.525321531394+0.0898981511451j))*x[1] + ((0.0116811088175-0.969999347751j))*x[2]**o + ((0.232138353577+0.46436196076j))*x[2]
            ref[(2, 1, 1, 2)]=(0.684474170371-1.09047555729j)/(o+1.)+((0.300671458239+0.665196749842j))+((0.899070089298+0.406203325051j))*0.5**o
            arg[(2, 1, 1, 3)]=(0.435674979145+0.126561957686j)*x[0]**o + ((-0.521337606918-0.758027297943j))*x[0] + ((-0.0869258031369+0.610480075417j))*x[1]**o + ((-0.0558367375657-0.850586498346j))*x[1] + ((0.560728817629+0.456427856081j))*x[2]**o + ((-0.468808855438+0.630704294424j))*x[2]
            ref[(2, 1, 1, 3)]=(0.473803014492+1.0669079315j)/(o+1.)+((-0.522991599961-0.488954750932j))+((0.435674979145+0.126561957686j))*0.5**o
            arg[(2, 2, 0, 0)]=(0.512580714704+0.00382983853584j)*x[0]**o + ((0.571490795815-0.605002604709j))*x[0] + ((0.722607363915-0.267290537626j))*x[1]**o + ((-0.316183671216-0.516076638036j))*x[1] + ((-0.709538263102-0.302463282395j))*x[2]**o + ((-0.769276569143-0.476496583147j))*x[2]
            ref[(2, 2, 0, 0)]=(0.0130691008127-0.569753820021j)/(o+1.)+((-0.256984722272-0.798787912946j))+((0.512580714704+0.00382983853584j))*0.5**o
            arg[(2, 2, 0, 1)]=(-0.268926824211+0.813338879655j)*x[0]**o + ((0.818644859391+0.0334663982366j))*x[0] + ((0.81958212995-0.677243531626j))*x[1]**o + ((-0.126495668841+0.941415346971j))*x[1] + ((-0.459476583342+0.543230652166j))*x[2]**o + ((-0.0378371536242-0.930886447829j))*x[2]
            ref[(2, 2, 0, 1)]=(0.360105546609-0.134012879461j)/(o+1.)+((0.327156018463+0.0219976486892j))+((-0.268926824211+0.813338879655j))*0.5**o
            arg[(2, 2, 0, 2)]=(0.927814920906+0.750151041974j)*x[0]**o + ((0.723955383366+0.30625020815j))*x[0] + ((-0.164651462467-0.033940209607j))*x[1]**o + ((-0.970477261804-0.0125290555198j))*x[1] + ((-0.760984468038-0.968112995248j))*x[2]**o + ((0.684272459842-0.714933725203j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.925635930504-1.00205320486j)/(o+1.)+((0.218875290702-0.210606286287j))+((0.927814920906+0.750151041974j))*0.5**o
            arg[(2, 2, 0, 3)]=(0.111592441617-0.509455646745j)*x[0]**o + ((0.979093585844-0.847998055328j))*x[0] + ((-0.890159996171-0.130579622477j))*x[1]**o + ((-0.724445408195-0.965211870939j))*x[1] + ((-0.474193897952+0.218335747142j))*x[2]**o + ((0.506966900129-0.914328846253j))*x[2]
            ref[(2, 2, 0, 3)]=(-1.36435389412+0.0877561246648j)/(o+1.)+((0.380807538889-1.36376938626j))+((0.111592441617-0.509455646745j))*0.5**o
            arg[(2, 2, 1, 0)]=(0.23312727558+0.582313025021j)*x[0]**o + ((-0.819826442363-0.79990896072j))*x[0] + ((0.138144814979+0.225024757371j))*x[1]**o + ((0.0680493952148-0.448521353185j))*x[1] + ((0.719667059453-0.220225121295j))*x[2]**o + ((0.764270711148-0.151768970391j))*x[2]
            ref[(2, 2, 1, 0)]=(0.857811874433+0.00479963607646j)/(o+1.)+((0.00624683199998-0.700099642148j))+((0.23312727558+0.582313025021j))*0.5**o
            arg[(2, 2, 1, 1)]=(-0.281848557907-0.827489741249j)*x[0]**o + ((-0.192851653333+0.24955482413j))*x[0] + ((0.940659491661+0.992140308594j))*x[1]**o + ((-0.276111668268-0.260805043428j))*x[1] + ((-0.0240410379624-0.219338226788j))*x[2]**o + ((-0.39626245993+0.59771951498j))*x[2]
            ref[(2, 2, 1, 1)]=(0.916618453699+0.772802081807j)/(o+1.)+((-0.432612890765+0.293234647841j))+((-0.281848557907-0.827489741249j))*0.5**o
            arg[(2, 2, 1, 2)]=(-0.434097411396-0.408025975153j)*x[0]**o + ((0.368683695736-0.691432288782j))*x[0] + ((0.324853068073-0.813740870249j))*x[1]**o + ((-0.632594119165-0.209047096345j))*x[1] + ((0.251411501105+0.0300187262986j))*x[2]**o + ((-0.086128946765-0.0674323918287j))*x[2]
            ref[(2, 2, 1, 2)]=(0.576264569178-0.78372214395j)/(o+1.)+((-0.175019685097-0.483955888478j))+((-0.434097411396-0.408025975153j))*0.5**o
            arg[(2, 2, 1, 3)]=(0.584293083932-0.451718693876j)*x[0]**o + ((0.676205797735+0.962623533409j))*x[0] + ((0.620222950796-0.898610724122j))*x[1]**o + ((-0.856255905503+0.315996605502j))*x[1] + ((-0.0201198669948-0.792856764678j))*x[2]**o + ((-0.769149112719+0.237753541991j))*x[2]
            ref[(2, 2, 1, 3)]=(0.600103083802-1.6914674888j)/(o+1.)+((-0.474599610243+0.758186840451j))+((0.584293083932-0.451718693876j))*0.5**o
            arg[(3, 0, 0, 0)]=(-0.762728488684+0.877444276432j)*x[0]**o + ((0.122507695085-0.946445238106j))*x[0] + ((-0.735970373475-0.964771365956j))*x[1]**o + ((0.407599665375-0.321388525642j))*x[1] + ((0.0137019021009-0.580275711091j))*x[2]**o + ((0.830288556483+0.180265557768j))*x[2]
            ref[(3, 0, 0, 0)]=(-0.722268471374-1.54504707705j)/(o+1.)+((0.680197958472-0.54378410299j))+((-0.762728488684+0.877444276432j))*0.5**o
            arg[(3, 0, 0, 1)]=(0.843866167332+0.298667025157j)*x[0]**o + ((-0.181299816969+0.76799547862j))*x[0] + ((-0.884344825749-0.129743037258j))*x[1]**o + ((-0.537638633151+0.268367504563j))*x[1] + ((0.711250393782+0.464121972769j))*x[2]**o + ((-0.957395476733+0.829642716374j))*x[2]
            ref[(3, 0, 0, 1)]=(-0.173094431967+0.33437893551j)/(o+1.)+((-0.838166963427+0.933002849779j))+((0.843866167332+0.298667025157j))*0.5**o
            arg[(3, 0, 0, 2)]=(0.841302683766+0.367080215158j)*x[0]**o + ((-0.964118715103-0.463114335428j))*x[0] + ((0.693886371223+0.548819192579j))*x[1]**o + ((-0.197890608269-0.116903159035j))*x[1] + ((0.0248663729199-0.146868548593j))*x[2]**o + ((-0.291540809078-0.606824969484j))*x[2]
            ref[(3, 0, 0, 2)]=(0.718752744143+0.401950643985j)/(o+1.)+((-0.726775066225-0.593421231973j))+((0.841302683766+0.367080215158j))*0.5**o
            arg[(3, 0, 0, 3)]=(0.263964885521-0.510022850307j)*x[0]**o + ((0.00505162181706+0.967452787731j))*x[0] + ((-0.83129085478-0.894474194323j))*x[1]**o + ((-0.47341530322+0.887990600563j))*x[1] + ((-0.037603318371-0.930376898143j))*x[2]**o + ((0.250064894823+0.512275363951j))*x[2]
            ref[(3, 0, 0, 3)]=(-0.868894173151-1.82485109247j)/(o+1.)+((-0.10914939329+1.18385937612j))+((0.263964885521-0.510022850307j))*0.5**o
            arg[(3, 0, 1, 0)]=(-0.377125050445-0.364653610746j)*x[0]**o + ((-0.325063580172+0.125174489256j))*x[0] + ((0.635186991276-0.664899767887j))*x[1]**o + ((0.727154567347-0.711943510718j))*x[1] + ((-0.211898450827-0.576441626352j))*x[2]**o + ((0.0309056426719-0.611027074556j))*x[2]
            ref[(3, 0, 1, 0)]=(0.423288540449-1.24134139424j)/(o+1.)+((0.216498314923-0.598898048009j))+((-0.377125050445-0.364653610746j))*0.5**o
            arg[(3, 0, 1, 1)]=(-0.277068767625+0.663722732975j)*x[0]**o + ((0.674681095558-0.357510889739j))*x[0] + ((-0.0786103748515+0.764180615149j))*x[1]**o + ((-0.240776531082+0.740689590265j))*x[1] + ((-0.0852799552502+0.657869468228j))*x[2]**o + ((-0.16990044782-0.876865308893j))*x[2]
            ref[(3, 0, 1, 1)]=(-0.163890330102+1.42205008338j)/(o+1.)+((0.132002058328-0.246843304184j))+((-0.277068767625+0.663722732975j))*0.5**o
            arg[(3, 0, 1, 2)]=(0.174770664397+0.763630167694j)*x[0]**o + ((0.138533423946-0.879273863192j))*x[0] + ((0.0578785582342+0.924944515427j))*x[1]**o + ((0.655091148533+0.253600915599j))*x[1] + ((-0.140281198408+0.0901351958911j))*x[2]**o + ((-0.00186288179065+0.518552073978j))*x[2]
            ref[(3, 0, 1, 2)]=(-0.0824026401734+1.01507971132j)/(o+1.)+((0.395880845344-0.0535604368069j))+((0.174770664397+0.763630167694j))*0.5**o
            arg[(3, 0, 1, 3)]=(0.484625410051-0.881665402173j)*x[0]**o + ((0.636445103303+0.972013694599j))*x[0] + ((-0.443020177153+0.852855464513j))*x[1]**o + ((-0.0619950715669-0.0305165928924j))*x[1] + ((0.996148572655+0.944652272237j))*x[2]**o + ((0.830056798824-0.432931642098j))*x[2]
            ref[(3, 0, 1, 3)]=(0.553128395502+1.79750773675j)/(o+1.)+((0.70225341528+0.254282729804j))+((0.484625410051-0.881665402173j))*0.5**o
            arg[(3, 1, 0, 0)]=(-0.635961641998+0.592693362679j)*x[0]**o + ((0.861620794189-0.176096619596j))*x[0] + ((0.0578280755759+0.0457434584494j))*x[1]**o + ((0.124389301161-0.00895401054602j))*x[1] + ((-0.330779159998+0.462708094314j))*x[2]**o + ((0.976923649128+0.696154916268j))*x[2]
            ref[(3, 1, 0, 0)]=(-0.272951084422+0.508451552764j)/(o+1.)+((0.981466872239+0.255552143063j))+((-0.635961641998+0.592693362679j))*0.5**o
            arg[(3, 1, 0, 1)]=(-0.451023438561-0.890953296221j)*x[0]**o + ((-0.826498599384-0.997178104585j))*x[0] + ((0.780458579196-0.640407530105j))*x[1]**o + ((0.339355122506-0.73610663876j))*x[1] + ((-0.787268386408+0.145679930261j))*x[2]**o + ((-0.265303838197-0.642722279577j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.00680980721235-0.494727599844j)/(o+1.)+((-0.376223657538-1.18800351146j))+((-0.451023438561-0.890953296221j))*0.5**o
            arg[(3, 1, 0, 2)]=(0.20838105143-0.920119070426j)*x[0]**o + ((0.810436495627+0.363699915695j))*x[0] + ((0.885362591881+0.97996304117j))*x[1]**o + ((-0.21563740858+0.463815817102j))*x[1] + ((-0.855879800656+0.758212845945j))*x[2]**o + ((0.272070460137+0.677880369921j))*x[2]
            ref[(3, 1, 0, 2)]=(0.0294827912245+1.73817588712j)/(o+1.)+((0.433434773592+0.752698051359j))+((0.20838105143-0.920119070426j))*0.5**o
            arg[(3, 1, 0, 3)]=(-0.619511404961+0.496848174993j)*x[0]**o + ((0.869967557593-0.94446110528j))*x[0] + ((0.572411076202-0.723015898237j))*x[1]**o + ((0.90380346448-0.222299001087j))*x[1] + ((0.920991443204+0.550926085536j))*x[2]**o + ((-0.967106599092-0.829669533119j))*x[2]
            ref[(3, 1, 0, 3)]=(1.49340251941-0.1720898127j)/(o+1.)+((0.40333221149-0.998214819743j))+((-0.619511404961+0.496848174993j))*0.5**o
            arg[(3, 1, 1, 0)]=(-0.122918255864-0.70072225139j)*x[0]**o + ((0.16714923597-0.538344390911j))*x[0] + ((-0.342215615708+0.457726221541j))*x[1]**o + ((-0.519272660427+0.713692966767j))*x[1] + ((0.618240292082-0.289513996143j))*x[2]**o + ((0.56790023933+0.899290591872j))*x[2]
            ref[(3, 1, 1, 0)]=(0.276024676374+0.168212225398j)/(o+1.)+((0.107888407437+0.537319583864j))+((-0.122918255864-0.70072225139j))*0.5**o
            arg[(3, 1, 1, 1)]=(0.935825313687-0.783621893006j)*x[0]**o + ((0.30035004995-0.668381651979j))*x[0] + ((0.0217460504556+0.961968801955j))*x[1]**o + ((-0.81236547504-0.0996942881619j))*x[1] + ((-0.361373983613-0.917203804669j))*x[2]**o + ((0.622394941975-0.302146373403j))*x[2]
            ref[(3, 1, 1, 1)]=(-0.339627933157+0.0447649972853j)/(o+1.)+((0.0551897584424-0.535111156772j))+((0.935825313687-0.783621893006j))*0.5**o
            arg[(3, 1, 1, 2)]=(0.353401002174-0.571376379386j)*x[0]**o + ((0.875849154901+0.602070564347j))*x[0] + ((-0.821023963089+0.362241313795j))*x[1]**o + ((-0.708062715755-0.784614437792j))*x[1] + ((0.26356998693-0.214312430423j))*x[2]**o + ((0.983678095009-0.855134014138j))*x[2]
            ref[(3, 1, 1, 2)]=(-0.557453976159+0.147928883372j)/(o+1.)+((0.575732267078-0.518838943791j))+((0.353401002174-0.571376379386j))*0.5**o
            arg[(3, 1, 1, 3)]=(-0.584754933414+0.0229166350032j)*x[0]**o + ((-0.912574506572+0.0644342075826j))*x[0] + ((0.99942762389-0.122256895733j))*x[1]**o + ((-0.422953386655+0.914412864965j))*x[1] + ((0.165676907438-0.889736941954j))*x[2]**o + ((0.837352480212+0.865200100901j))*x[2]
            ref[(3, 1, 1, 3)]=(1.16510453133-1.01199383769j)/(o+1.)+((-0.249087706507+0.922023586725j))+((-0.584754933414+0.0229166350032j))*0.5**o
            arg[(3, 2, 0, 0)]=(0.98138281439+0.458541565836j)*x[0]**o + ((-0.422592051767-0.46214318273j))*x[0] + ((0.764701649771+0.710296396851j))*x[1]**o + ((0.056170716441+0.896738910488j))*x[1] + ((-0.855486337165+0.173203596153j))*x[2]**o + ((0.253195907321+0.116488372614j))*x[2]
            ref[(3, 2, 0, 0)]=(-0.0907846873945+0.883499993005j)/(o+1.)+((-0.0566127140026+0.275542050186j))+((0.98138281439+0.458541565836j))*0.5**o
            arg[(3, 2, 0, 1)]=(-0.112631132917+0.814805564909j)*x[0]**o + ((0.54684974568-0.486809564215j))*x[0] + ((-0.068370754253-0.494938157648j))*x[1]**o + ((-0.0216952437561+0.233930599826j))*x[1] + ((-0.724104478842-0.551937928008j))*x[2]**o + ((-0.234356848849+0.328443397524j))*x[2]
            ref[(3, 2, 0, 1)]=(-0.792475233095-1.04687608566j)/(o+1.)+((0.145398826537+0.0377822165676j))+((-0.112631132917+0.814805564909j))*0.5**o
            arg[(3, 2, 0, 2)]=(-0.111717341542-0.009423755473j)*x[0]**o + ((-0.882232914498-0.201236725664j))*x[0] + ((-0.258404111057+0.720046071215j))*x[1]**o + ((0.367506023964+0.835707194591j))*x[1] + ((0.20147377748+0.562222274292j))*x[2]**o + ((-0.0471524339037-0.135190467668j))*x[2]
            ref[(3, 2, 0, 2)]=(-0.0569303335771+1.28226834551j)/(o+1.)+((-0.280939662219+0.249640000629j))+((-0.111717341542-0.009423755473j))*0.5**o
            arg[(3, 2, 0, 3)]=(0.228049347417-0.221205923547j)*x[0]**o + ((-0.456435800722+0.270133900048j))*x[0] + ((0.208450295924-0.344412016898j))*x[1]**o + ((0.192333562235+0.907989421847j))*x[1] + ((-0.433116692423+0.56970778104j))*x[2]**o + ((0.267593384893-0.625844121552j))*x[2]
            ref[(3, 2, 0, 3)]=(-0.2246663965+0.225295764142j)/(o+1.)+((0.00174557320244+0.276139600172j))+((0.228049347417-0.221205923547j))*0.5**o
            arg[(3, 2, 1, 0)]=(0.150017015184-0.548764341632j)*x[0]**o + ((0.550662846596+0.616009767205j))*x[0] + ((0.974879078431+0.605235622213j))*x[1]**o + ((0.481583819986+0.557096073811j))*x[1] + ((-0.795040380073+0.8635750418j))*x[2]**o + ((-0.592642436059+0.862037334054j))*x[2]
            ref[(3, 2, 1, 0)]=(0.179838698359+1.46881066401j)/(o+1.)+((0.219802115262+1.01757158754j))+((0.150017015184-0.548764341632j))*0.5**o
            arg[(3, 2, 1, 1)]=(-0.304165502845+0.296647896144j)*x[0]**o + ((-0.564523637234+0.687017361556j))*x[0] + ((-0.516678991425+0.768064724997j))*x[1]**o + ((-0.15916496587-0.529906547422j))*x[1] + ((0.979691381636+0.745273995109j))*x[2]**o + ((-0.847852042389-0.586764975209j))*x[2]
            ref[(3, 2, 1, 1)]=(0.463012390211+1.51333872011j)/(o+1.)+((-0.785770322746-0.214827080538j))+((-0.304165502845+0.296647896144j))*0.5**o
            arg[(3, 2, 1, 2)]=(-0.0684567112004+0.819486238609j)*x[0]**o + ((-0.133871688939-0.92825366327j))*x[0] + ((-0.271357693325-0.355882865898j))*x[1]**o + ((-0.879708608761-0.326136212881j))*x[1] + ((-0.724514810621-0.851612866721j))*x[2]**o + ((0.453365872752+0.441725492721j))*x[2]
            ref[(3, 2, 1, 2)]=(-0.995872503946-1.20749573262j)/(o+1.)+((-0.280107212474-0.406332191715j))+((-0.0684567112004+0.819486238609j))*0.5**o
            arg[(3, 2, 1, 3)]=(0.645164635108-0.244598085304j)*x[0]**o + ((0.472391925095+0.0841735921344j))*x[0] + ((0.223462638787-0.091550087285j))*x[1]**o + ((-0.448097555308+0.280295131157j))*x[1] + ((0.23792101493-0.0484645228339j))*x[2]**o + ((-0.229009360892+0.329984466142j))*x[2]
            ref[(3, 2, 1, 3)]=(0.461383653717-0.140014610119j)/(o+1.)+((-0.102357495553+0.347226594717j))+((0.645164635108-0.244598085304j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.462698930897-0.428208695553j)*x[0] + ((0.397278986733+0.0530619088237j))*x[1]
            ref=(0.429988958815-0.187573393365j)
        else:
            arg=(-0.639431958418-0.416095089419j)*x[0] + ((0.362455855987+0.899508591231j))*x[1] + ((-0.77945707643-0.812100576209j))*x[2]
            ref=(-0.528216589431-0.164343537198j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.661419048158+0.098974341632j)*x[0] + ((0.371084599399+0.610135646068j))*x[1]
            ref[(0,)]=(0.516251823778+0.35455499385j)
            arg[(1,)]=(-0.187262597949+0.609130284271j)*x[0] + ((-0.607809857377-0.182119529651j))*x[1]
            ref[(1,)]=(-0.397536227663+0.21350537731j)
            arg[(2,)]=(-0.689502875277-0.299155009131j)*x[0] + ((0.261948478256+0.973812936939j))*x[1]
            ref[(2,)]=(-0.21377719851+0.337328963904j)
        else:
            arg[(0,)]=(0.277263523072-0.133262445067j)*x[0] + ((-0.765063339293+0.99780688594j))*x[1] + ((-0.560382257436+0.839435344151j))*x[2]
            ref[(0,)]=(-0.524091036828+0.851989892512j)
            arg[(1,)]=(0.954480085069+0.931673563033j)*x[0] + ((-0.981045230821-0.273094309003j))*x[1] + ((0.744951145423-0.27072873613j))*x[2]
            ref[(1,)]=(0.359192999835+0.19392525895j)
            arg[(2,)]=(-0.133416404825-0.184057761223j)*x[0] + ((-0.865690721262-0.0873264195959j))*x[1] + ((-0.869127603706+0.782945880515j))*x[2]
            ref[(2,)]=(-0.934117364897+0.255780849848j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.0386961892635+0.358917869689j)*x[0] + ((0.0226562266096-0.658473325176j))*x[1]
            ref[(0, 0)]=(-0.00801998132696-0.149777727743j)
            arg[(0, 1)]=(-0.485564082783-0.169052825704j)*x[0] + ((0.0864384529786+0.309479353057j))*x[1]
            ref[(0, 1)]=(-0.199562814902+0.0702132636764j)
            arg[(1, 0)]=(0.230332285721+0.109962034089j)*x[0] + ((0.952513350789-0.688305389152j))*x[1]
            ref[(1, 0)]=(0.591422818255-0.289171677531j)
            arg[(1, 1)]=(-0.761163547885+0.178498894753j)*x[0] + ((-0.698930282356+0.660817815468j))*x[1]
            ref[(1, 1)]=(-0.73004691512+0.41965835511j)
        else:
            arg[(0, 0)]=(-0.464946406052+0.205545637284j)*x[0] + ((0.418137301005-0.370888142979j))*x[1] + ((0.153165550096+0.710147697508j))*x[2]
            ref[(0, 0)]=(0.0531782225245+0.272402595906j)
            arg[(0, 1)]=(0.411940556812-0.194630600505j)*x[0] + ((0.40149612524-0.247788200474j))*x[1] + ((-0.206585234032+0.0811418794062j))*x[2]
            ref[(0, 1)]=(0.30342572401-0.180638460786j)
            arg[(1, 0)]=(0.540757224781+0.753729978977j)*x[0] + ((0.54827180413-0.212664113215j))*x[1] + ((0.941757072464-0.358973606678j))*x[2]
            ref[(1, 0)]=(1.01539305069+0.0910461295418j)
            arg[(1, 1)]=(-0.20217331016+0.4093842845j)*x[0] + ((-0.327948369454-0.924933857756j))*x[1] + ((-0.629930798737-0.653459246947j))*x[2]
            ref[(1, 1)]=(-0.580026239176-0.584504410102j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3),w)
        ref=numpy.zeros((3, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.140647689219+0.85480598993j)*x[0] + ((0.436715714946+0.148797254736j))*x[1]
            ref[(0, 0, 0)]=(0.288681702082+0.501801622333j)
            arg[(0, 0, 1)]=(-0.940105805708+0.782502963742j)*x[0] + ((-0.422785377446-0.963561326969j))*x[1]
            ref[(0, 0, 1)]=(-0.681445591577-0.0905291816134j)
            arg[(0, 0, 2)]=(0.566731988231+0.678001381371j)*x[0] + ((0.0896609172171+0.900305998995j))*x[1]
            ref[(0, 0, 2)]=(0.328196452724+0.789153690183j)
            arg[(0, 1, 0)]=(0.120254838723+0.704074801055j)*x[0] + ((0.893471389487+0.915600470128j))*x[1]
            ref[(0, 1, 0)]=(0.506863114105+0.809837635592j)
            arg[(0, 1, 1)]=(-0.908197398285+0.858676601321j)*x[0] + ((0.72650403971+0.686755693507j))*x[1]
            ref[(0, 1, 1)]=(-0.0908466792871+0.772716147414j)
            arg[(0, 1, 2)]=(0.51704816743+0.707763225657j)*x[0] + ((-0.61785330008-0.99366564301j))*x[1]
            ref[(0, 1, 2)]=(-0.050402566325-0.142951208677j)
            arg[(1, 0, 0)]=(0.808096324685-0.0286394273847j)*x[0] + ((-0.547957535693+0.271695254132j))*x[1]
            ref[(1, 0, 0)]=(0.130069394496+0.121527913374j)
            arg[(1, 0, 1)]=(0.183961729427+0.718392990195j)*x[0] + ((0.271397884763-0.762425371011j))*x[1]
            ref[(1, 0, 1)]=(0.227679807095-0.0220161904076j)
            arg[(1, 0, 2)]=(0.0462514696244+0.403729005368j)*x[0] + ((-0.385950203348+0.878650556883j))*x[1]
            ref[(1, 0, 2)]=(-0.169849366862+0.641189781125j)
            arg[(1, 1, 0)]=(0.327029316247+0.712101626926j)*x[0] + ((0.727905082645+0.922039213897j))*x[1]
            ref[(1, 1, 0)]=(0.527467199446+0.817070420411j)
            arg[(1, 1, 1)]=(-0.721608970984+0.666681933046j)*x[0] + ((0.901366948654-0.278436415375j))*x[1]
            ref[(1, 1, 1)]=(0.089878988835+0.194122758836j)
            arg[(1, 1, 2)]=(0.128318065565+0.902292000874j)*x[0] + ((0.378651156878+0.829193193556j))*x[1]
            ref[(1, 1, 2)]=(0.253484611221+0.865742597215j)
            arg[(2, 0, 0)]=(-0.925302099683+0.601493217694j)*x[0] + ((0.446484209987-0.557364245877j))*x[1]
            ref[(2, 0, 0)]=(-0.239408944848+0.0220644859085j)
            arg[(2, 0, 1)]=(0.320033890173+0.475338860458j)*x[0] + ((-0.589708057141-0.741521101849j))*x[1]
            ref[(2, 0, 1)]=(-0.134837083484-0.133091120696j)
            arg[(2, 0, 2)]=(0.434470536732+0.793848609333j)*x[0] + ((-0.964545855637-0.104538703068j))*x[1]
            ref[(2, 0, 2)]=(-0.265037659452+0.344654953133j)
            arg[(2, 1, 0)]=(-0.564879182799+0.845918886751j)*x[0] + ((0.104217810888-0.991867903928j))*x[1]
            ref[(2, 1, 0)]=(-0.230330685955-0.0729745085889j)
            arg[(2, 1, 1)]=(-0.881363083932+0.403182607572j)*x[0] + ((0.431581079017+0.448645486885j))*x[1]
            ref[(2, 1, 1)]=(-0.224891002458+0.425914047229j)
            arg[(2, 1, 2)]=(0.905433033388+0.150763325824j)*x[0] + ((-0.930187276852+0.733989381717j))*x[1]
            ref[(2, 1, 2)]=(-0.012377121732+0.442376353771j)
        else:
            arg[(0, 0, 0)]=(0.203571865342-0.20362451369j)*x[0] + ((-0.457129828854+0.142568677942j))*x[1] + ((0.77281518732-0.124505641177j))*x[2]
            ref[(0, 0, 0)]=(0.259628611904-0.0927807384624j)
            arg[(0, 0, 1)]=(0.51327201344+0.809380815629j)*x[0] + ((-0.444603311604-0.693159626724j))*x[1] + ((-0.631905121109-0.379794468994j))*x[2]
            ref[(0, 0, 1)]=(-0.281618209636-0.131786640045j)
            arg[(0, 0, 2)]=(-0.894911675156-0.330496487522j)*x[0] + ((0.934964529773+0.212845487836j))*x[1] + ((0.257636837262+0.584409979696j))*x[2]
            ref[(0, 0, 2)]=(0.14884484594+0.233379490005j)
            arg[(0, 1, 0)]=(0.908362002833-0.887541175931j)*x[0] + ((-0.913095651692-0.879675262946j))*x[1] + ((-0.180986259592+0.873373489894j))*x[2]
            ref[(0, 1, 0)]=(-0.092859954226-0.446921474491j)
            arg[(0, 1, 1)]=(0.832483825495+0.0676254393172j)*x[0] + ((0.434009149031+0.658702592907j))*x[1] + ((-0.151567976582+0.798608909104j))*x[2]
            ref[(0, 1, 1)]=(0.557462498972+0.762468470664j)
            arg[(0, 1, 2)]=(-0.312634469721-0.947576914948j)*x[0] + ((-0.872983341894-0.302980667931j))*x[1] + ((0.83847660561-0.763636056428j))*x[2]
            ref[(0, 1, 2)]=(-0.173570603002-1.00709681965j)
            arg[(1, 0, 0)]=(-0.240902326768-0.391796578302j)*x[0] + ((-0.940342509281-0.0750943674216j))*x[1] + ((0.319584192999+0.28692906324j))*x[2]
            ref[(1, 0, 0)]=(-0.430830321525-0.0899809412414j)
            arg[(1, 0, 1)]=(0.729093574499+0.297383411888j)*x[0] + ((0.560990451191-0.178578635541j))*x[1] + ((-0.370976041128+0.389712804687j))*x[2]
            ref[(1, 0, 1)]=(0.459553992281+0.254258790517j)
            arg[(1, 0, 2)]=(-0.789147163021-0.0799722825335j)*x[0] + ((0.851120256202-0.42065569089j))*x[1] + ((-0.654468097787-0.378324165363j))*x[2]
            ref[(1, 0, 2)]=(-0.296247502303-0.439476069393j)
            arg[(1, 1, 0)]=(-0.689956646309+0.111954600006j)*x[0] + ((-0.250282376659+0.16956377941j))*x[1] + ((-0.757937207287+0.299306192672j))*x[2]
            ref[(1, 1, 0)]=(-0.849088115127+0.290412286044j)
            arg[(1, 1, 1)]=(-0.946880843213-0.989668684126j)*x[0] + ((0.456162608266+0.536991755669j))*x[1] + ((0.141464640786-0.491066532055j))*x[2]
            ref[(1, 1, 1)]=(-0.17462679708-0.471871730256j)
            arg[(1, 1, 2)]=(0.163127304022+0.206573578068j)*x[0] + ((0.885161774188-0.299871377948j))*x[1] + ((0.683525628535-0.159903556382j))*x[2]
            ref[(1, 1, 2)]=(0.865907353373-0.126600678131j)
            arg[(2, 0, 0)]=(-0.71066074398+0.135949075386j)*x[0] + ((0.988694023759+0.172532303458j))*x[1] + ((-0.642763556928-0.366651410816j))*x[2]
            ref[(2, 0, 0)]=(-0.182365138575-0.029085015986j)
            arg[(2, 0, 1)]=(-0.680352852781+0.487417567937j)*x[0] + ((-0.0510745808888-0.897050775714j))*x[1] + ((0.858160067794+0.843254835928j))*x[2]
            ref[(2, 0, 1)]=(0.0633663170619+0.216810814076j)
            arg[(2, 0, 2)]=(0.14480010917-0.247708771934j)*x[0] + ((-0.238788801546-0.137853814113j))*x[1] + ((-0.575220059446+0.282205392042j))*x[2]
            ref[(2, 0, 2)]=(-0.334604375911-0.0516785970025j)
            arg[(2, 1, 0)]=(-0.129875688619+0.453270387879j)*x[0] + ((-0.119651022895-0.387451726035j))*x[1] + ((-0.325345145953-0.870343894179j))*x[2]
            ref[(2, 1, 0)]=(-0.287435928733-0.402262616168j)
            arg[(2, 1, 1)]=(0.867492272603+0.852380420558j)*x[0] + ((-0.392254667922-0.603398276583j))*x[1] + ((-0.134488128427+0.267084011156j))*x[2]
            ref[(2, 1, 1)]=(0.170374738127+0.258033077566j)
            arg[(2, 1, 2)]=(-0.981910243248+0.771202480587j)*x[0] + ((0.918215280184-0.568526823715j))*x[1] + ((-0.114850581532+0.494088479361j))*x[2]
            ref[(2, 1, 2)]=(-0.0892727722977+0.348382068116j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 3),w)
        ref=numpy.zeros((2, 2, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.070151933352-0.547003170112j)*x[0] + ((0.246440400655-0.713350539744j))*x[1]
            ref[(0, 0, 0, 0)]=(0.0881442336513-0.630176854928j)
            arg[(0, 0, 0, 1)]=(0.402412854889+0.384057408511j)*x[0] + ((0.0415311734054-0.55143795926j))*x[1]
            ref[(0, 0, 0, 1)]=(0.221972014147-0.0836902753743j)
            arg[(0, 0, 0, 2)]=(-0.939722105313-0.488949857784j)*x[0] + ((0.432854031599-0.679515399134j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.253434036857-0.584232628459j)
            arg[(0, 0, 1, 0)]=(-0.92574567791+0.869328125942j)*x[0] + ((0.469318042959+0.314437854842j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.228213817475+0.591882990392j)
            arg[(0, 0, 1, 1)]=(0.237836814367+0.887026332287j)*x[0] + ((0.150007019499+0.115924198805j))*x[1]
            ref[(0, 0, 1, 1)]=(0.193921916933+0.501475265546j)
            arg[(0, 0, 1, 2)]=(-0.0453224095997+0.00894655575493j)*x[0] + ((-0.598266404822-0.0374388173452j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.321794407211-0.0142461307951j)
            arg[(0, 0, 2, 0)]=(-0.459995507742+0.924512330277j)*x[0] + ((-0.596010141617-0.106189491804j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.528002824679+0.409161419236j)
            arg[(0, 0, 2, 1)]=(0.376126176915+0.272857564692j)*x[0] + ((-0.901062590444-0.842751052134j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.262468206764-0.284946743721j)
            arg[(0, 0, 2, 2)]=(0.784616612798-0.932693725562j)*x[0] + ((0.784319946714-0.593731826099j))*x[1]
            ref[(0, 0, 2, 2)]=(0.784468279756-0.76321277583j)
            arg[(0, 1, 0, 0)]=(0.39755102674+0.645268493749j)*x[0] + ((0.420853211231+0.0626283838521j))*x[1]
            ref[(0, 1, 0, 0)]=(0.409202118986+0.3539484388j)
            arg[(0, 1, 0, 1)]=(-0.646198446459+0.592683545804j)*x[0] + ((-0.123541574966+0.208492370026j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.384870010713+0.400587957915j)
            arg[(0, 1, 0, 2)]=(-0.636847632339-0.175302870337j)*x[0] + ((-0.826692931445-0.60037819438j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.731770281892-0.387840532359j)
            arg[(0, 1, 1, 0)]=(0.989220830057+0.325853019761j)*x[0] + ((0.0969921199479+0.685364617104j))*x[1]
            ref[(0, 1, 1, 0)]=(0.543106475002+0.505608818432j)
            arg[(0, 1, 1, 1)]=(0.102371067442+0.252823260414j)*x[0] + ((-0.107274637451+0.853469462089j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.00245178500426+0.553146361251j)
            arg[(0, 1, 1, 2)]=(-0.724575972824+0.368945220892j)*x[0] + ((0.906592138085+0.997212730973j))*x[1]
            ref[(0, 1, 1, 2)]=(0.0910080826303+0.683078975932j)
            arg[(0, 1, 2, 0)]=(0.82707098952-0.640127208437j)*x[0] + ((-0.816122441649-0.204916536673j))*x[1]
            ref[(0, 1, 2, 0)]=(0.00547427393557-0.422521872555j)
            arg[(0, 1, 2, 1)]=(-0.307804051581-0.495913793694j)*x[0] + ((-0.936016995712-0.786273755532j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.621910523646-0.641093774613j)
            arg[(0, 1, 2, 2)]=(0.819910517555-0.755301506144j)*x[0] + ((-0.515923738185-0.136723031514j))*x[1]
            ref[(0, 1, 2, 2)]=(0.151993389685-0.446012268829j)
            arg[(1, 0, 0, 0)]=(-0.276893472941-0.31541627831j)*x[0] + ((0.65439955353+0.186439461261j))*x[1]
            ref[(1, 0, 0, 0)]=(0.188753040294-0.0644884085246j)
            arg[(1, 0, 0, 1)]=(-0.097780733726+0.868623423365j)*x[0] + ((-0.787464858468+0.0980142513969j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.442622796097+0.483318837381j)
            arg[(1, 0, 0, 2)]=(0.513188362639-0.0592726191121j)*x[0] + ((-0.716862919377+0.712970493972j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.101837278369+0.32684893743j)
            arg[(1, 0, 1, 0)]=(-0.386126521082+0.764147224872j)*x[0] + ((0.0645548068913-0.626678410041j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.160785857095+0.0687344074157j)
            arg[(1, 0, 1, 1)]=(0.214887557908+0.204583449765j)*x[0] + ((0.716711123402-0.610503905576j))*x[1]
            ref[(1, 0, 1, 1)]=(0.465799340655-0.202960227905j)
            arg[(1, 0, 1, 2)]=(-0.209467145754-0.551191073319j)*x[0] + ((0.0988637823312-0.743469385965j))*x[1]
            ref[(1, 0, 1, 2)]=(-0.0553016817114-0.647330229642j)
            arg[(1, 0, 2, 0)]=(0.317760979484+0.579096271239j)*x[0] + ((0.104256761738-0.121200808923j))*x[1]
            ref[(1, 0, 2, 0)]=(0.211008870611+0.228947731158j)
            arg[(1, 0, 2, 1)]=(-0.625399790083+0.661440830127j)*x[0] + ((0.64036399256+0.79307643065j))*x[1]
            ref[(1, 0, 2, 1)]=(0.00748210123863+0.727258630388j)
            arg[(1, 0, 2, 2)]=(-0.369818979536-0.0164566238876j)*x[0] + ((0.530475762362-0.914959220323j))*x[1]
            ref[(1, 0, 2, 2)]=(0.0803283914127-0.465707922105j)
            arg[(1, 1, 0, 0)]=(-0.495316615853-0.545661384333j)*x[0] + ((-0.571581469351+0.925090617742j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.533449042602+0.189714616704j)
            arg[(1, 1, 0, 1)]=(0.181561638491+0.147758078523j)*x[0] + ((-0.239395977318+0.352846590693j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.0289171694135+0.250302334608j)
            arg[(1, 1, 0, 2)]=(0.682301484198-0.698217007186j)*x[0] + ((-0.306767735526-0.558865298276j))*x[1]
            ref[(1, 1, 0, 2)]=(0.187766874336-0.628541152731j)
            arg[(1, 1, 1, 0)]=(0.531375379625+0.306210334803j)*x[0] + ((0.394111497261+0.0245463072805j))*x[1]
            ref[(1, 1, 1, 0)]=(0.462743438443+0.165378321042j)
            arg[(1, 1, 1, 1)]=(0.674763663861+0.218084845849j)*x[0] + ((-0.0209333027083-0.844999382837j))*x[1]
            ref[(1, 1, 1, 1)]=(0.326915180576-0.313457268494j)
            arg[(1, 1, 1, 2)]=(0.614350083764+0.4560164046j)*x[0] + ((0.102030919728-0.10753687815j))*x[1]
            ref[(1, 1, 1, 2)]=(0.358190501746+0.174239763225j)
            arg[(1, 1, 2, 0)]=(0.623731914816+0.249265164666j)*x[0] + ((0.45930177657-0.124661677126j))*x[1]
            ref[(1, 1, 2, 0)]=(0.541516845693+0.0623017437701j)
            arg[(1, 1, 2, 1)]=(0.778565595224-0.544300002392j)*x[0] + ((0.609637952896-0.693769768402j))*x[1]
            ref[(1, 1, 2, 1)]=(0.69410177406-0.619034885397j)
            arg[(1, 1, 2, 2)]=(-0.711184010587-0.469864641803j)*x[0] + ((0.773818842151-0.694870261144j))*x[1]
            ref[(1, 1, 2, 2)]=(0.031317415782-0.582367451474j)
        else:
            arg[(0, 0, 0, 0)]=(0.128573733395-0.789918725938j)*x[0] + ((-0.578187167535-0.851124864142j))*x[1] + ((0.373660239097+0.284460451626j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.0379765975214-0.678291569227j)
            arg[(0, 0, 0, 1)]=(-0.330445584262-0.834479873593j)*x[0] + ((0.207359452394+0.94769600467j))*x[1] + ((-0.384458509331-0.105144483514j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.253772320599+0.00403582378181j)
            arg[(0, 0, 0, 2)]=(-0.0353942779729-0.130597636864j)*x[0] + ((0.55129416359+0.636484074621j))*x[1] + ((0.0887604028783+0.635627591528j))*x[2]
            ref[(0, 0, 0, 2)]=(0.302330144248+0.570757014642j)
            arg[(0, 0, 1, 0)]=(-0.193726420892-0.373448750589j)*x[0] + ((-0.500083722553-0.848646382571j))*x[1] + ((-0.158700095441+0.393483154311j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.426255119443-0.414305989425j)
            arg[(0, 0, 1, 1)]=(0.136709003903+0.403667409851j)*x[0] + ((-0.99120132139-0.162802672715j))*x[1] + ((0.594008743612+0.0756634557067j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.130241786937+0.158264096421j)
            arg[(0, 0, 1, 2)]=(0.651325510761+0.915683867083j)*x[0] + ((0.793927387471-0.845483892431j))*x[1] + ((-0.291463008562-0.0673585746324j))*x[2]
            ref[(0, 0, 1, 2)]=(0.576894944835+0.00142070000986j)
            arg[(0, 0, 2, 0)]=(0.0211897628033-0.523922759809j)*x[0] + ((-0.00935591969965+0.528713574451j))*x[1] + ((-0.414652098485+0.728272489408j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.201409127691+0.366531652025j)
            arg[(0, 0, 2, 1)]=(-0.869488386567+0.0099936185928j)*x[0] + ((-0.427114314527+0.448458343037j))*x[1] + ((-0.592615964199-0.88293357854j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.944609332646-0.212240808455j)
            arg[(0, 0, 2, 2)]=(0.78387428857+0.361838332829j)*x[0] + ((-0.231259979881-0.110933165591j))*x[1] + ((-0.644577031421+0.730706543993j))*x[2]
            ref[(0, 0, 2, 2)]=(-0.0459813613663+0.490805855615j)
            arg[(0, 1, 0, 0)]=(-0.9948819123-0.802877549299j)*x[0] + ((0.561115608695+0.579897652845j))*x[1] + ((-0.811842516578-0.322139870415j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.622804410091-0.272559883435j)
            arg[(0, 1, 0, 1)]=(-0.439819858765-0.371204842461j)*x[0] + ((-0.914952460882-0.535310012875j))*x[1] + ((0.0266469589067+0.69662977796j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.66406268037-0.104942538688j)
            arg[(0, 1, 0, 2)]=(-0.53773978647-0.0530341999294j)*x[0] + ((-0.604735000207-0.588285851844j))*x[1] + ((0.610126054204+0.000169276833464j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.266174366237-0.32057538747j)
            arg[(0, 1, 1, 0)]=(0.673833487084-0.653309613883j)*x[0] + ((-0.911634981181+0.412692173873j))*x[1] + ((0.828152851032+0.445724841386j))*x[2]
            ref[(0, 1, 1, 0)]=(0.295175678467+0.102553700688j)
            arg[(0, 1, 1, 1)]=(0.900049213766+0.0935591839712j)*x[0] + ((-0.282775433808-0.855657886583j))*x[1] + ((-0.258111206644-0.481093536077j))*x[2]
            ref[(0, 1, 1, 1)]=(0.179581286657-0.621596119345j)
            arg[(0, 1, 1, 2)]=(0.48968652649-0.772300001322j)*x[0] + ((-0.74122034006+0.793741563426j))*x[1] + ((-0.134231704605+0.922573212283j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.192882759087+0.472007387193j)
            arg[(0, 1, 2, 0)]=(0.00466537000523+0.60249405309j)*x[0] + ((0.333786205421+0.595717764515j))*x[1] + ((0.175492781111-0.232991258004j))*x[2]
            ref[(0, 1, 2, 0)]=(0.256972178268+0.482610279801j)
            arg[(0, 1, 2, 1)]=(-0.146818675167-0.653446799501j)*x[0] + ((-0.707287951177+0.587878768755j))*x[1] + ((-0.311673810665+0.762744424822j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.582890218505+0.348588197038j)
            arg[(0, 1, 2, 2)]=(0.228359264714+0.380838784245j)*x[0] + ((0.556319436172+0.293350320632j))*x[1] + ((-0.849993497981+0.199198391506j))*x[2]
            ref[(0, 1, 2, 2)]=(-0.0326573985477+0.436693748192j)
            arg[(1, 0, 0, 0)]=(-0.155250924894+0.500291728519j)*x[0] + ((0.351922720767-0.297577240093j))*x[1] + ((0.347419107744+0.787530767697j))*x[2]
            ref[(1, 0, 0, 0)]=(0.272045451809+0.495122628061j)
            arg[(1, 0, 0, 1)]=(0.199602150433-0.387784754951j)*x[0] + ((0.498165005999-0.809534783899j))*x[1] + ((-0.861040667061-0.246301806405j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.0816367553145-0.721810672627j)
            arg[(1, 0, 0, 2)]=(-0.424274469779-0.00222646268593j)*x[0] + ((0.187301440587+0.244381494331j))*x[1] + ((0.546007520679-0.0846846139421j))*x[2]
            ref[(1, 0, 0, 2)]=(0.154517245743+0.0787352088516j)
            arg[(1, 0, 1, 0)]=(-0.651965415854+0.77328081618j)*x[0] + ((0.887802655761+0.631614733671j))*x[1] + ((-0.332095224927+0.447845239803j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.0481289925101+0.926370394827j)
            arg[(1, 0, 1, 1)]=(-0.93948509177+0.654585152269j)*x[0] + ((0.0448782534183+0.0329820051985j))*x[1] + ((-0.580058902006-0.529268142812j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.737332870179+0.0791495073274j)
            arg[(1, 0, 1, 2)]=(0.104098089806-0.767092983087j)*x[0] + ((0.136056032066+0.37630057843j))*x[1] + ((-0.0218751484321-0.153771775792j))*x[2]
            ref[(1, 0, 1, 2)]=(0.10913948672-0.272282090225j)
            arg[(1, 0, 2, 0)]=(-0.0690009011308+0.682856107668j)*x[0] + ((0.175593757697+0.0465036788709j))*x[1] + ((0.812327571309-0.411880603114j))*x[2]
            ref[(1, 0, 2, 0)]=(0.459460213938+0.158739591712j)
            arg[(1, 0, 2, 1)]=(0.217683259225-0.657391916119j)*x[0] + ((0.989869079627+0.836342883495j))*x[1] + ((0.384671793805+0.548419495522j))*x[2]
            ref[(1, 0, 2, 1)]=(0.796112066328+0.363685231449j)
            arg[(1, 0, 2, 2)]=(0.573487220975+0.967815279605j)*x[0] + ((0.0528846385764-0.841297447934j))*x[1] + ((-0.34688003023+0.200841910749j))*x[2]
            ref[(1, 0, 2, 2)]=(0.13974591466+0.16367987121j)
            arg[(1, 1, 0, 0)]=(0.529834206309+0.916065474935j)*x[0] + ((0.562740308039+0.439120990525j))*x[1] + ((0.786388579847+0.0582698783913j))*x[2]
            ref[(1, 1, 0, 0)]=(0.939481547098+0.706728171926j)
            arg[(1, 1, 0, 1)]=(-0.840293999417+0.768786501704j)*x[0] + ((-0.348136322779+0.388647947063j))*x[1] + ((-0.505435048054-0.184370503201j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.846932685125+0.486531972783j)
            arg[(1, 1, 0, 2)]=(0.481137912402-0.0148015305784j)*x[0] + ((-0.400714308028-0.272388150634j))*x[1] + ((0.792102231552-0.418627583772j))*x[2]
            ref[(1, 1, 0, 2)]=(0.436262917963-0.352908632492j)
            arg[(1, 1, 1, 0)]=(-0.748185878497+0.543762064991j)*x[0] + ((0.0109853321285+0.883063596804j))*x[1] + ((-0.898056824387-0.971365774342j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.817628685377+0.227729943727j)
            arg[(1, 1, 1, 1)]=(-0.0831459241558-0.553277766099j)*x[0] + ((0.788996631471-0.876442187337j))*x[1] + ((-0.570162857837-0.258373412673j))*x[2]
            ref[(1, 1, 1, 1)]=(0.067843924739-0.844046683055j)
            arg[(1, 1, 1, 2)]=(0.0622404416933+0.578856283717j)*x[0] + ((0.935940902298-0.42117056893j))*x[1] + ((0.738717780679-0.185126518943j))*x[2]
            ref[(1, 1, 1, 2)]=(0.868449562335-0.0137204020777j)
            arg[(1, 1, 2, 0)]=(0.0151917344534+0.751257851675j)*x[0] + ((0.604630242468+0.237093105883j))*x[1] + ((0.460482168326+0.0207219015228j))*x[2]
            ref[(1, 1, 2, 0)]=(0.540152072624+0.50453642954j)
            arg[(1, 1, 2, 1)]=(0.561745159751+0.263291521594j)*x[0] + ((0.699224160497+0.505859125397j))*x[1] + ((0.992100543537-0.581547690143j))*x[2]
            ref[(1, 1, 2, 1)]=(1.12653493189+0.0938014784242j)
            arg[(1, 1, 2, 2)]=(0.630152914894-0.185706774108j)*x[0] + ((0.771482008794+0.122746165856j))*x[1] + ((-0.976706871746-0.0166786506225j))*x[2]
            ref[(1, 1, 2, 2)]=(0.212464025971-0.0398196294372j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.398664140568+0.720823794698j)*x[0] + ((-0.385148102886-0.406282814483j))*x[1]
            ref=(0.00675801884102+0.157270490107j)
        else:
            arg=(0.536816359156-0.501541199995j)*x[0] + ((-0.210016441187-0.217163391419j))*x[1] + ((0.610182955748+0.717082880398j))*x[2]
            ref=(0.468491436858-0.000810855507711j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.655391282241+0.899942722153j)*x[0] + ((-0.843274046394+0.260031141407j))*x[1]
            ref[(0,)]=(-0.0939413820763+0.57998693178j)
            arg[(1,)]=(0.288164734276-0.911769779189j)*x[0] + ((-0.421966747973-0.365667636912j))*x[1]
            ref[(1,)]=(-0.0669010068484-0.63871870805j)
        else:
            arg[(0,)]=(0.725556052821+0.997394895092j)*x[0] + ((-0.894043493833+0.175401657877j))*x[1] + ((-0.0890439290911-0.299337463707j))*x[2]
            ref[(0,)]=(-0.128765685051+0.436729544631j)
            arg[(1,)]=(-0.837772787959+0.615302272927j)*x[0] + ((0.999901025089+0.00182725178149j))*x[1] + ((0.292686622071+0.656087721105j))*x[2]
            ref[(1,)]=(0.2274074296+0.636608622906j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.73186679232+0.10909699442j)*x[0] + ((-0.273208281953+0.272442535398j))*x[1]
            ref[(0, 0)]=(0.229329255184+0.190769764909j)
            arg[(0, 1)]=(-0.0683323422129+0.881261823553j)*x[0] + ((-0.596446343084-0.988701334083j))*x[1]
            ref[(0, 1)]=(-0.332389342648-0.0537197552653j)
            arg[(0, 2)]=(-0.421969988541+0.150403375101j)*x[0] + ((0.565196360549+0.500634388942j))*x[1]
            ref[(0, 2)]=(0.0716131860042+0.325518882022j)
            arg[(1, 0)]=(0.278750307043-0.138690999219j)*x[0] + ((-0.426632205589-6.830646994e-05j))*x[1]
            ref[(1, 0)]=(-0.073940949273-0.0693796528443j)
            arg[(1, 1)]=(0.500696672646-0.0355871580333j)*x[0] + ((-0.902749195768-0.757114361489j))*x[1]
            ref[(1, 1)]=(-0.201026261561-0.396350759761j)
            arg[(1, 2)]=(0.570298406825-0.12211043798j)*x[0] + ((0.657222511484-0.980214259306j))*x[1]
            ref[(1, 2)]=(0.613760459154-0.551162348643j)
            arg[(2, 0)]=(0.415512490579+0.135165403824j)*x[0] + ((-0.0763976967081-0.558053842974j))*x[1]
            ref[(2, 0)]=(0.169557396935-0.211444219575j)
            arg[(2, 1)]=(-0.0912182836011+0.361529898378j)*x[0] + ((0.401400761408-0.223017855904j))*x[1]
            ref[(2, 1)]=(0.155091238903+0.069256021237j)
            arg[(2, 2)]=(-0.659614514154-0.885592781533j)*x[0] + ((-0.879886151492-0.492454875655j))*x[1]
            ref[(2, 2)]=(-0.769750332823-0.689023828594j)
        else:
            arg[(0, 0)]=(-0.524234499922-0.11109317604j)*x[0] + ((0.393247574907-0.935010767486j))*x[1] + ((0.514744191293+0.197660564338j))*x[2]
            ref[(0, 0)]=(0.191878633139-0.424221689594j)
            arg[(0, 1)]=(-0.588960349064-0.492213798765j)*x[0] + ((0.380271733193-0.812210981377j))*x[1] + ((0.921969206859-0.691848193782j))*x[2]
            ref[(0, 1)]=(0.356640295494-0.998136486962j)
            arg[(0, 2)]=(0.291081026583-0.542549747195j)*x[0] + ((-0.126788423635-0.741545650448j))*x[1] + ((0.0742821852461-0.937400534376j))*x[2]
            ref[(0, 2)]=(0.119287394097-1.11074796601j)
            arg[(1, 0)]=(0.0975974503584-0.358751176718j)*x[0] + ((0.874222395738+0.762165603168j))*x[1] + ((-0.461024671361-0.306344772046j))*x[2]
            ref[(1, 0)]=(0.255397587368+0.0485348272022j)
            arg[(1, 1)]=(0.291888985496-0.872642381724j)*x[0] + ((0.30898298841+0.204023468027j))*x[1] + ((0.227860658499+0.315194755676j))*x[2]
            ref[(1, 1)]=(0.414366316203-0.17671207901j)
            arg[(1, 2)]=(0.684994302176+0.226442474051j)*x[0] + ((-0.0495638164158-0.272952108121j))*x[1] + ((-0.223258314568+0.834358011309j))*x[2]
            ref[(1, 2)]=(0.206086085596+0.393924188619j)
            arg[(2, 0)]=(-0.773286606405+0.178852242513j)*x[0] + ((0.320013158071+0.716105644933j))*x[1] + ((-0.974619633037-0.109643624953j))*x[2]
            ref[(2, 0)]=(-0.713946540686+0.392657131246j)
            arg[(2, 1)]=(-0.703326808962+0.753119769396j)*x[0] + ((-0.65130775979+0.138765880135j))*x[1] + ((0.107890218764-0.101594066667j))*x[2]
            ref[(2, 1)]=(-0.623372174994+0.395145791432j)
            arg[(2, 2)]=(-0.484780953551+0.797917704635j)*x[0] + ((0.475388307063+0.773544168503j))*x[1] + ((0.78279053627-0.823060923587j))*x[2]
            ref[(2, 2)]=(0.386698944891+0.374200474776j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref=numpy.zeros((4, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.359052683997+0.642368344097j)*x[0] + ((0.631054688225-0.211373636945j))*x[1]
            ref[(0, 0, 0)]=(0.495053686111+0.215497353576j)
            arg[(0, 0, 1)]=(0.455073420491-0.146309795266j)*x[0] + ((0.342010235056-0.634746839141j))*x[1]
            ref[(0, 0, 1)]=(0.398541827773-0.390528317204j)
            arg[(0, 0, 2)]=(0.0748969102501+0.843433897456j)*x[0] + ((0.113235141202+0.746740936953j))*x[1]
            ref[(0, 0, 2)]=(0.0940660257263+0.795087417205j)
            arg[(0, 1, 0)]=(0.737447974393-0.204307501964j)*x[0] + ((-0.389492572352+0.867201383697j))*x[1]
            ref[(0, 1, 0)]=(0.173977701021+0.331446940867j)
            arg[(0, 1, 1)]=(-0.975117799538-0.559281056163j)*x[0] + ((-0.49922472936+0.257047040877j))*x[1]
            ref[(0, 1, 1)]=(-0.737171264449-0.151117007643j)
            arg[(0, 1, 2)]=(-0.495861055836+0.523352914607j)*x[0] + ((-0.413992727579-0.0555459063155j))*x[1]
            ref[(0, 1, 2)]=(-0.454926891708+0.233903504146j)
            arg[(1, 0, 0)]=(-0.280556464033+0.128096895183j)*x[0] + ((0.272226192684-0.826868265258j))*x[1]
            ref[(1, 0, 0)]=(-0.00416513567475-0.349385685038j)
            arg[(1, 0, 1)]=(0.392874642292-0.910087404171j)*x[0] + ((-0.944066997558-0.601291477575j))*x[1]
            ref[(1, 0, 1)]=(-0.275596177633-0.755689440873j)
            arg[(1, 0, 2)]=(0.777966075481-0.358876643322j)*x[0] + ((-0.523410881117-0.184786534042j))*x[1]
            ref[(1, 0, 2)]=(0.127277597182-0.271831588682j)
            arg[(1, 1, 0)]=(-0.105299330429+0.427831747199j)*x[0] + ((-0.879044472594+0.00441194260109j))*x[1]
            ref[(1, 1, 0)]=(-0.492171901512+0.2161218449j)
            arg[(1, 1, 1)]=(-0.550361550832-0.975724706094j)*x[0] + ((-0.787278665106-0.643277648139j))*x[1]
            ref[(1, 1, 1)]=(-0.668820107969-0.809501177116j)
            arg[(1, 1, 2)]=(-0.339764592873-0.409664855807j)*x[0] + ((-0.356473768186+0.95977439768j))*x[1]
            ref[(1, 1, 2)]=(-0.34811918053+0.275054770936j)
            arg[(2, 0, 0)]=(-0.217939793565-0.0514598002828j)*x[0] + ((-0.887659955732-0.398619795416j))*x[1]
            ref[(2, 0, 0)]=(-0.552799874649-0.225039797849j)
            arg[(2, 0, 1)]=(0.884796020631+0.0534998427694j)*x[0] + ((0.173609646027+0.252801063207j))*x[1]
            ref[(2, 0, 1)]=(0.529202833329+0.153150452988j)
            arg[(2, 0, 2)]=(0.917111479715+0.943957001946j)*x[0] + ((-0.462610430122+0.734579618313j))*x[1]
            ref[(2, 0, 2)]=(0.227250524796+0.839268310129j)
            arg[(2, 1, 0)]=(0.0312447807566-0.0474905749901j)*x[0] + ((0.571810571478-0.972155489928j))*x[1]
            ref[(2, 1, 0)]=(0.301527676117-0.509823032459j)
            arg[(2, 1, 1)]=(0.438975921922-0.518803859134j)*x[0] + ((0.302435548329-0.286907892687j))*x[1]
            ref[(2, 1, 1)]=(0.370705735125-0.40285587591j)
            arg[(2, 1, 2)]=(-0.293145866224+0.434079113631j)*x[0] + ((-0.492877547634-0.588401163036j))*x[1]
            ref[(2, 1, 2)]=(-0.393011706929-0.0771610247025j)
            arg[(3, 0, 0)]=(0.655908390252+0.469884447003j)*x[0] + ((-0.56342485812-0.824657152869j))*x[1]
            ref[(3, 0, 0)]=(0.046241766066-0.177386352933j)
            arg[(3, 0, 1)]=(0.472980427005-0.0152770711129j)*x[0] + ((-0.0492499251445-0.0700270282742j))*x[1]
            ref[(3, 0, 1)]=(0.21186525093-0.0426520496936j)
            arg[(3, 0, 2)]=(-0.4862820291-0.332578876625j)*x[0] + ((0.580805791019-0.973887723404j))*x[1]
            ref[(3, 0, 2)]=(0.0472618809595-0.653233300014j)
            arg[(3, 1, 0)]=(0.970178764357-0.808262504895j)*x[0] + ((0.26572049778-0.888135796078j))*x[1]
            ref[(3, 1, 0)]=(0.617949631069-0.848199150487j)
            arg[(3, 1, 1)]=(-0.757747456112+0.156951098795j)*x[0] + ((0.795268338372+0.615336227271j))*x[1]
            ref[(3, 1, 1)]=(0.0187604411303+0.386143663033j)
            arg[(3, 1, 2)]=(-0.0062378848702+0.899914773447j)*x[0] + ((-0.304377017374-0.111013491652j))*x[1]
            ref[(3, 1, 2)]=(-0.155307451122+0.394450640897j)
        else:
            arg[(0, 0, 0)]=(-0.818629009144+0.803326569136j)*x[0] + ((-0.482211724209-0.0274993443151j))*x[1] + ((-0.233453337906-0.279246999275j))*x[2]
            ref[(0, 0, 0)]=(-0.767147035629+0.248290112773j)
            arg[(0, 0, 1)]=(-0.184014612478+0.296209750552j)*x[0] + ((0.199134008452-0.338177562127j))*x[1] + ((0.181581093881+0.639047997307j))*x[2]
            ref[(0, 0, 1)]=(0.0983502449279+0.298540092866j)
            arg[(0, 0, 2)]=(-0.518487692007-0.946496437274j)*x[0] + ((0.00203702397404-0.133858654291j))*x[1] + ((-0.0219185420384+0.428085976616j))*x[2]
            ref[(0, 0, 2)]=(-0.269184605036-0.326134557475j)
            arg[(0, 1, 0)]=(-0.182872964872+0.741496735954j)*x[0] + ((0.444586337758-0.242928648081j))*x[1] + ((-0.0785735369726+0.106121835009j))*x[2]
            ref[(0, 1, 0)]=(0.0915699179571+0.302344961441j)
            arg[(0, 1, 1)]=(0.209128522446+0.772846554234j)*x[0] + ((0.713387600893-0.761629528189j))*x[1] + ((-0.743277039398+0.839758644991j))*x[2]
            ref[(0, 1, 1)]=(0.0896195419702+0.425487835518j)
            arg[(0, 1, 2)]=(-0.213308720751-0.98109195485j)*x[0] + ((-0.498568020567+0.496618247289j))*x[1] + ((0.509685393846-0.626593747947j))*x[2]
            ref[(0, 1, 2)]=(-0.101095673736-0.555533727754j)
            arg[(1, 0, 0)]=(0.656399926044-0.041902264661j)*x[0] + ((-0.126585789119+0.734670351851j))*x[1] + ((0.306124068547-0.109137419777j))*x[2]
            ref[(1, 0, 0)]=(0.417969102736+0.291815333707j)
            arg[(1, 0, 1)]=(0.962937214943+0.29637689749j)*x[0] + ((0.019717339436-0.714417472717j))*x[1] + ((-0.0227109242249-0.811151447383j))*x[2]
            ref[(1, 0, 1)]=(0.479971815077-0.614596011305j)
            arg[(1, 0, 2)]=(-0.369237609321-0.608565250931j)*x[0] + ((0.9130310563-0.879533672522j))*x[1] + ((-0.176171130729+0.0355921180556j))*x[2]
            ref[(1, 0, 2)]=(0.183811158125-0.726253402699j)
            arg[(1, 1, 0)]=(0.170630100474-0.758876078045j)*x[0] + ((0.569205091558-0.662912288313j))*x[1] + ((-0.781384234194-0.388898347277j))*x[2]
            ref[(1, 1, 0)]=(-0.0207745210806-0.905343356818j)
            arg[(1, 1, 1)]=(-0.103542755228-0.793518433936j)*x[0] + ((-0.564690845373-0.947662630737j))*x[1] + ((-0.497227011105+0.19871045022j))*x[2]
            ref[(1, 1, 1)]=(-0.582730305852-0.771235307227j)
            arg[(1, 1, 2)]=(-0.738299183654+0.875022615143j)*x[0] + ((0.702949614239+0.173278387723j))*x[1] + ((0.586352741473+0.531462912618j))*x[2]
            ref[(1, 1, 2)]=(0.275501586029+0.789881957742j)
            arg[(2, 0, 0)]=(-0.157566174094-0.0456349835986j)*x[0] + ((0.679436268428-0.692417531701j))*x[1] + ((-0.931606420906-0.255086060177j))*x[2]
            ref[(2, 0, 0)]=(-0.204868163286-0.496569287738j)
            arg[(2, 0, 1)]=(-0.202824718522-0.503432624185j)*x[0] + ((-0.515534630274+0.716155887645j))*x[1] + ((0.214649997897+0.54347481245j))*x[2]
            ref[(2, 0, 1)]=(-0.25185467545+0.378099037955j)
            arg[(2, 0, 2)]=(0.967731851727+0.24216601374j)*x[0] + ((0.936083765871-0.133434710044j))*x[1] + ((0.968507237506-0.993621949265j))*x[2]
            ref[(2, 0, 2)]=(1.43616142755-0.442445322784j)
            arg[(2, 1, 0)]=(0.986228012844-0.129369330257j)*x[0] + ((0.859990810411-0.478438557799j))*x[1] + ((0.133259769154+0.306382911624j))*x[2]
            ref[(2, 1, 0)]=(0.989739296205-0.150712488215j)
            arg[(2, 1, 1)]=(0.986767189021-0.130811345805j)*x[0] + ((0.166455892768-0.103810442702j))*x[1] + ((-0.458718623104+0.529402652964j))*x[2]
            ref[(2, 1, 1)]=(0.347252229342+0.147390432229j)
            arg[(2, 1, 2)]=(-0.269195634254+0.0459310478633j)*x[0] + ((0.108201524774+0.551712185643j))*x[1] + ((0.34606896983-0.856639785325j))*x[2]
            ref[(2, 1, 2)]=(0.092537430175-0.129498275909j)
            arg[(3, 0, 0)]=(0.485192695739+0.248864168234j)*x[0] + ((-0.369586149746-0.323548939102j))*x[1] + ((0.266001368759+0.65432671119j))*x[2]
            ref[(3, 0, 0)]=(0.190803957376+0.28982097016j)
            arg[(3, 0, 1)]=(-0.0809294371211-0.815817947199j)*x[0] + ((-0.902791976271-0.322652064912j))*x[1] + ((-0.713219560102-0.85667770944j))*x[2]
            ref[(3, 0, 1)]=(-0.848470486747-0.997573860776j)
            arg[(3, 0, 2)]=(-0.671240914542+0.739218649282j)*x[0] + ((-0.0320380159383-0.526748768958j))*x[1] + ((-0.843634460084+0.580736047406j))*x[2]
            ref[(3, 0, 2)]=(-0.773456695282+0.396602963865j)
            arg[(3, 1, 0)]=(0.802693217759-0.858219251978j)*x[0] + ((0.757810970891+0.132140061908j))*x[1] + ((0.273389227296+0.476534787448j))*x[2]
            ref[(3, 1, 0)]=(0.916946707973-0.124772201311j)
            arg[(3, 1, 1)]=(-0.0636348056742-0.936692722704j)*x[0] + ((0.626320122417-0.116125219356j))*x[1] + ((-0.901342028143+0.371388334866j))*x[2]
            ref[(3, 1, 1)]=(-0.1693283557-0.340714803597j)
            arg[(3, 1, 2)]=(-0.00416458897228+0.717217899587j)*x[0] + ((-0.443784999157+0.0854683618053j))*x[1] + ((0.156656382077+0.867536106085j))*x[2]
            ref[(3, 1, 2)]=(-0.145646603026+0.835111183739j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 3),w)
        ref=numpy.zeros((2, 3, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.0944319757628+0.691209427752j)*x[0] + ((0.821969495314-0.863641905799j))*x[1]
            ref[(0, 0, 0, 0)]=(0.458200735538-0.0862162390234j)
            arg[(0, 0, 0, 1)]=(-0.828642657144-0.828065554518j)*x[0] + ((0.163555140397+0.458261149007j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.332543758374-0.184902202755j)
            arg[(0, 0, 0, 2)]=(-0.439908605468+0.83240304729j)*x[0] + ((-0.461139145024+0.25703851602j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.450523875246+0.544720781655j)
            arg[(0, 0, 1, 0)]=(0.232090074243+0.722988218481j)*x[0] + ((-0.134977787626-0.440195099749j))*x[1]
            ref[(0, 0, 1, 0)]=(0.0485561433086+0.141396559366j)
            arg[(0, 0, 1, 1)]=(0.0848849100992+0.503007045036j)*x[0] + ((-0.354549376149-0.77733833374j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.134832233025-0.137165644352j)
            arg[(0, 0, 1, 2)]=(0.323713332976+0.179317949113j)*x[0] + ((0.501873061904-0.0829107895989j))*x[1]
            ref[(0, 0, 1, 2)]=(0.41279319744+0.048203579757j)
            arg[(0, 0, 2, 0)]=(0.592478948554-0.106223849103j)*x[0] + ((0.0686704530052+0.307517185768j))*x[1]
            ref[(0, 0, 2, 0)]=(0.330574700779+0.100646668332j)
            arg[(0, 0, 2, 1)]=(0.441102133298-0.851082043695j)*x[0] + ((-0.420541809177-0.511830245622j))*x[1]
            ref[(0, 0, 2, 1)]=(0.0102801620605-0.681456144659j)
            arg[(0, 0, 2, 2)]=(-0.102966807197+0.880618856424j)*x[0] + ((0.401973066443-0.627897881478j))*x[1]
            ref[(0, 0, 2, 2)]=(0.149503129623+0.126360487473j)
            arg[(0, 1, 0, 0)]=(-0.741985699351-0.562190074518j)*x[0] + ((0.555635326383+0.199947673196j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.0931751864839-0.181121200661j)
            arg[(0, 1, 0, 1)]=(-0.045257214198+0.640673626197j)*x[0] + ((-0.720126976061-0.142666686454j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.382692095129+0.249003469872j)
            arg[(0, 1, 0, 2)]=(0.494113005562+0.671476501771j)*x[0] + ((0.0760288192676-0.468951069776j))*x[1]
            ref[(0, 1, 0, 2)]=(0.285070912415+0.101262715997j)
            arg[(0, 1, 1, 0)]=(0.255240442745+0.430267023094j)*x[0] + ((-0.462124269297-0.396553084114j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.103441913276+0.0168569694896j)
            arg[(0, 1, 1, 1)]=(0.278305063074+0.482879503349j)*x[0] + ((-0.320780078931+0.62270854106j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.0212375079282+0.552794022205j)
            arg[(0, 1, 1, 2)]=(0.894770975007-0.703255170512j)*x[0] + ((0.519257993295-0.548698150632j))*x[1]
            ref[(0, 1, 1, 2)]=(0.707014484151-0.625976660572j)
            arg[(0, 1, 2, 0)]=(0.457532074377+0.640790272663j)*x[0] + ((-0.421705782276-0.318971699485j))*x[1]
            ref[(0, 1, 2, 0)]=(0.0179131460503+0.160909286589j)
            arg[(0, 1, 2, 1)]=(0.263893794972-0.938727363543j)*x[0] + ((-0.83880562554-0.217443178204j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.287455915284-0.578085270874j)
            arg[(0, 1, 2, 2)]=(0.572265938876-0.219443259511j)*x[0] + ((0.460693547501+0.450568244303j))*x[1]
            ref[(0, 1, 2, 2)]=(0.516479743188+0.115562492396j)
            arg[(0, 2, 0, 0)]=(0.633024053425+0.997985756857j)*x[0] + ((0.986897115676-0.162117119503j))*x[1]
            ref[(0, 2, 0, 0)]=(0.80996058455+0.417934318677j)
            arg[(0, 2, 0, 1)]=(-0.452488694737-0.287694919811j)*x[0] + ((0.414123046075-0.867696625478j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.019182824331-0.577695772645j)
            arg[(0, 2, 0, 2)]=(-0.441207259023+0.566350518835j)*x[0] + ((-0.286512746786-0.715044974574j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.363860002904-0.0743472278692j)
            arg[(0, 2, 1, 0)]=(-0.842573309221-0.366526256353j)*x[0] + ((-0.329789574907-0.582195010823j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.586181442064-0.474360633588j)
            arg[(0, 2, 1, 1)]=(-0.816819350787+0.399299090529j)*x[0] + ((-0.288348378339+0.432266410369j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.552583864563+0.415782750449j)
            arg[(0, 2, 1, 2)]=(-0.32073056145+0.494678639391j)*x[0] + ((0.81431525959-0.851627944556j))*x[1]
            ref[(0, 2, 1, 2)]=(0.24679234907-0.178474652582j)
            arg[(0, 2, 2, 0)]=(0.674994735412-0.514870087072j)*x[0] + ((0.5130862443-0.723561289401j))*x[1]
            ref[(0, 2, 2, 0)]=(0.594040489856-0.619215688237j)
            arg[(0, 2, 2, 1)]=(-0.997312275953+0.260813147247j)*x[0] + ((-0.305091477839+0.631291362945j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.651201876896+0.446052255096j)
            arg[(0, 2, 2, 2)]=(-0.37830698186-0.108790671393j)*x[0] + ((-0.717562776308+0.807126598014j))*x[1]
            ref[(0, 2, 2, 2)]=(-0.547934879084+0.349167963311j)
            arg[(1, 0, 0, 0)]=(-0.184632579715-0.124100674222j)*x[0] + ((0.0171019172854+0.152453971558j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.0837653312146+0.0141766486678j)
            arg[(1, 0, 0, 1)]=(0.583334320818+0.794135512306j)*x[0] + ((0.578777208776+0.0644875231286j))*x[1]
            ref[(1, 0, 0, 1)]=(0.581055764797+0.429311517717j)
            arg[(1, 0, 0, 2)]=(0.699102762716+0.829666048732j)*x[0] + ((-0.680181201432+0.69710864008j))*x[1]
            ref[(1, 0, 0, 2)]=(0.00946078064207+0.763387344406j)
            arg[(1, 0, 1, 0)]=(-0.12111882743-0.480130472503j)*x[0] + ((-0.562428801429-0.765347117103j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.34177381443-0.622738794803j)
            arg[(1, 0, 1, 1)]=(0.47989786293-0.770863388146j)*x[0] + ((-0.688426662447-0.267805442318j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.104264399759-0.519334415232j)
            arg[(1, 0, 1, 2)]=(0.806783849015-0.691967931106j)*x[0] + ((-0.348049560562+0.904630918242j))*x[1]
            ref[(1, 0, 1, 2)]=(0.229367144226+0.106331493568j)
            arg[(1, 0, 2, 0)]=(-0.668907770307+0.359473920811j)*x[0] + ((-0.653596229867+0.832148522794j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.661252000087+0.595811221803j)
            arg[(1, 0, 2, 1)]=(0.649426267311+0.414918127345j)*x[0] + ((-0.703210494467-0.167313365525j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.0268921135779+0.12380238091j)
            arg[(1, 0, 2, 2)]=(-0.211697665593-0.932723961017j)*x[0] + ((0.0657960793277+0.356968129685j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.0729507931326-0.287877915666j)
            arg[(1, 1, 0, 0)]=(0.446160349115+0.24974244413j)*x[0] + ((0.00205465361336-0.654169615863j))*x[1]
            ref[(1, 1, 0, 0)]=(0.224107501364-0.202213585866j)
            arg[(1, 1, 0, 1)]=(-0.978384909971+0.285692737925j)*x[0] + ((0.384666843311-0.499266517452j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.29685903333-0.106786889764j)
            arg[(1, 1, 0, 2)]=(0.0974198843955+0.565753559812j)*x[0] + ((0.265699542432+0.882618067085j))*x[1]
            ref[(1, 1, 0, 2)]=(0.181559713414+0.724185813449j)
            arg[(1, 1, 1, 0)]=(-0.737116108254-0.961954600219j)*x[0] + ((-0.975053712323+0.473467371665j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.856084910289-0.244243614277j)
            arg[(1, 1, 1, 1)]=(0.917816916239-0.865703190132j)*x[0] + ((0.243040936589+0.831462539192j))*x[1]
            ref[(1, 1, 1, 1)]=(0.580428926414-0.01712032547j)
            arg[(1, 1, 1, 2)]=(0.697627019061-0.996445908009j)*x[0] + ((0.510173827365+0.516247901194j))*x[1]
            ref[(1, 1, 1, 2)]=(0.603900423213-0.240099003407j)
            arg[(1, 1, 2, 0)]=(0.425661235042-0.398862796999j)*x[0] + ((0.465857140906-0.831615239031j))*x[1]
            ref[(1, 1, 2, 0)]=(0.445759187974-0.615239018015j)
            arg[(1, 1, 2, 1)]=(-0.652816687753-0.280990995391j)*x[0] + ((0.266894647083+0.784581678889j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.192961020335+0.251795341749j)
            arg[(1, 1, 2, 2)]=(0.86705350423-0.74173352888j)*x[0] + ((-0.532897377252+0.0691957161667j))*x[1]
            ref[(1, 1, 2, 2)]=(0.167078063489-0.336268906357j)
            arg[(1, 2, 0, 0)]=(0.686516069685-0.621322980292j)*x[0] + ((0.0901415754022-0.0387877790144j))*x[1]
            ref[(1, 2, 0, 0)]=(0.388328822544-0.330055379653j)
            arg[(1, 2, 0, 1)]=(0.25090516129-0.269343717213j)*x[0] + ((0.272987554963+0.27539934557j))*x[1]
            ref[(1, 2, 0, 1)]=(0.261946358127+0.00302781417839j)
            arg[(1, 2, 0, 2)]=(-0.364061442139-0.883626563445j)*x[0] + ((-0.38389754468-0.746139743838j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.373979493409-0.814883153641j)
            arg[(1, 2, 1, 0)]=(-0.5817511065-0.574611478192j)*x[0] + ((-0.170416426275-0.0078592699849j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.376083766387-0.291235374088j)
            arg[(1, 2, 1, 1)]=(-0.363402050165+0.185541705152j)*x[0] + ((-0.650774446312+0.373012695223j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.507088248239+0.279277200188j)
            arg[(1, 2, 1, 2)]=(0.191374632641+0.401135101488j)*x[0] + ((-0.784243697087-0.730667296896j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.296434532223-0.164766097704j)
            arg[(1, 2, 2, 0)]=(-0.328136749221-0.404984196389j)*x[0] + ((-0.391403578174-0.223928178678j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.359770163697-0.314456187533j)
            arg[(1, 2, 2, 1)]=(0.53928414225+0.780514279582j)*x[0] + ((-0.281768481816+0.0489642208579j))*x[1]
            ref[(1, 2, 2, 1)]=(0.128757830217+0.41473925022j)
            arg[(1, 2, 2, 2)]=(-0.207975866979-0.364677652241j)*x[0] + ((0.0456761049427-0.929534709682j))*x[1]
            ref[(1, 2, 2, 2)]=(-0.0811498810183-0.647106180962j)
        else:
            arg[(0, 0, 0, 0)]=(0.843747761319+0.856117005035j)*x[0] + ((0.186234431093-0.622289952693j))*x[1] + ((0.778332704797+0.891563065395j))*x[2]
            ref[(0, 0, 0, 0)]=(0.904157448604+0.562695058869j)
            arg[(0, 0, 0, 1)]=(0.841665550555-0.865472346276j)*x[0] + ((-0.410368751528-0.137878734462j))*x[1] + ((0.291198908109-0.594678835731j))*x[2]
            ref[(0, 0, 0, 1)]=(0.361247853568-0.799014958234j)
            arg[(0, 0, 0, 2)]=(0.333025583189+0.365335068257j)*x[0] + ((-0.0148904825622-0.151029122668j))*x[1] + ((-0.599661309062-0.0517860792205j))*x[2]
            ref[(0, 0, 0, 2)]=(-0.140763104217+0.0812599331841j)
            arg[(0, 0, 1, 0)]=(0.610934630164+0.666392678142j)*x[0] + ((-0.420799381043+0.913314678199j))*x[1] + ((0.486766561342-0.813280371128j))*x[2]
            ref[(0, 0, 1, 0)]=(0.338450905232+0.383213492607j)
            arg[(0, 0, 1, 1)]=(0.210100349953+0.190246472323j)*x[0] + ((-0.392719595661+0.293086589652j))*x[1] + ((0.860476787048+0.242613306658j))*x[2]
            ref[(0, 0, 1, 1)]=(0.33892877067+0.362973184316j)
            arg[(0, 0, 1, 2)]=(-0.490297473749-0.319467957916j)*x[0] + ((-0.526335561481-0.293673782636j))*x[1] + ((0.5667741285-0.199461461316j))*x[2]
            ref[(0, 0, 1, 2)]=(-0.224929453365-0.406301600935j)
            arg[(0, 0, 2, 0)]=(-0.0704335659949+0.517826210615j)*x[0] + ((0.334573581534-0.600742122014j))*x[1] + ((-0.463998653608+0.266156049135j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.0999293190346+0.0916200688677j)
            arg[(0, 0, 2, 1)]=(0.919402692029+0.624882298597j)*x[0] + ((0.622654370677+0.388501538899j))*x[1] + ((0.595661581422+0.924235988604j))*x[2]
            ref[(0, 0, 2, 1)]=(1.06885932206+0.96880991305j)
            arg[(0, 0, 2, 2)]=(-0.583578880094-0.850867599703j)*x[0] + ((0.807550626586-0.653289620086j))*x[1] + ((0.454106470672+0.165871058231j))*x[2]
            ref[(0, 0, 2, 2)]=(0.339039108582-0.669143080779j)
            arg[(0, 1, 0, 0)]=(-0.984799866881-0.288493497859j)*x[0] + ((0.0254031613559+0.302362489257j))*x[1] + ((0.477826434142-0.977515139937j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.240785135692-0.481823074269j)
            arg[(0, 1, 0, 1)]=(-0.603939387949-0.730363723448j)*x[0] + ((0.16849148747+0.221001855559j))*x[1] + ((0.272063219743-0.441137434702j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.0816923403682-0.475249651295j)
            arg[(0, 1, 0, 2)]=(0.819882281979-0.956558441604j)*x[0] + ((-0.238031364671-0.0849597789875j))*x[1] + ((-0.0380630208983-0.971424937339j))*x[2]
            ref[(0, 1, 0, 2)]=(0.271893948205-1.00647157897j)
            arg[(0, 1, 1, 0)]=(0.30237481664+0.135753883916j)*x[0] + ((-0.384139680746-0.348877789057j))*x[1] + ((0.212435978825-0.494770310446j))*x[2]
            ref[(0, 1, 1, 0)]=(0.0653355573595-0.353947107794j)
            arg[(0, 1, 1, 1)]=(0.317808992622+0.738773483623j)*x[0] + ((-0.266043459943+0.796824480605j))*x[1] + ((-0.996347770397-0.449737114476j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.472291118859+0.542930424876j)
            arg[(0, 1, 1, 2)]=(0.965924595695+0.763696092176j)*x[0] + ((-0.152804054993+0.443730398672j))*x[1] + ((0.361507890464-0.419727619467j))*x[2]
            ref[(0, 1, 1, 2)]=(0.587314215583+0.393849435691j)
            arg[(0, 1, 2, 0)]=(-0.25748914518+0.0100457231829j)*x[0] + ((0.308105507265+0.825747288642j))*x[1] + ((0.694826010201-0.364760886088j))*x[2]
            ref[(0, 1, 2, 0)]=(0.372721186143+0.235516062869j)
            arg[(0, 1, 2, 1)]=(-0.125323530673+0.490268323726j)*x[0] + ((0.374249002671+0.87033463378j))*x[1] + ((0.193538975671+0.90012332415j))*x[2]
            ref[(0, 1, 2, 1)]=(0.221232223834+1.13036314083j)
            arg[(0, 1, 2, 2)]=(0.918442189314+0.522161770785j)*x[0] + ((-0.855193535332+0.134371327598j))*x[1] + ((-0.817729546313-0.0631188275494j))*x[2]
            ref[(0, 1, 2, 2)]=(-0.377240446165+0.296707135417j)
            arg[(0, 2, 0, 0)]=(-0.565273222673+0.897759344703j)*x[0] + ((-0.79270659129+0.0786438691732j))*x[1] + ((0.105874969168-0.276005949115j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.626052422398+0.350198632381j)
            arg[(0, 2, 0, 1)]=(0.244871282544+0.664550142837j)*x[0] + ((-0.489640575652-0.138278702956j))*x[1] + ((-0.628951255343+0.108990274473j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.436860274225+0.317630857177j)
            arg[(0, 2, 0, 2)]=(0.368953500359+0.336134352893j)*x[0] + ((-0.359853826059-0.644111499268j))*x[1] + ((0.664156318353-0.910924600055j))*x[2]
            ref[(0, 2, 0, 2)]=(0.336627996327-0.609450873215j)
            arg[(0, 2, 1, 0)]=(-0.763947560198+0.0355785794592j)*x[0] + ((0.973622702372+0.677516581257j))*x[1] + ((-0.822470512342+0.227613443107j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.306397685084+0.470354301912j)
            arg[(0, 2, 1, 1)]=(-0.53114637412-0.761257443481j)*x[0] + ((-0.969409424618-0.341027050108j))*x[1] + ((0.941060151579-0.477810071246j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.27974782358-0.790047282417j)
            arg[(0, 2, 1, 2)]=(0.62861517955+0.689717014866j)*x[0] + ((-0.462490984646+0.985431574158j))*x[1] + ((-0.400001221438+0.680952080833j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.116938513267+1.17805033493j)
            arg[(0, 2, 2, 0)]=(-0.741942641483+0.0749877980952j)*x[0] + ((0.935241374721+0.648780926867j))*x[1] + ((-0.479289779943+0.73222752981j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.142995523353+0.727998127386j)
            arg[(0, 2, 2, 1)]=(0.644593276207+0.104331850153j)*x[0] + ((-0.958904870618-0.560056026325j))*x[1] + ((0.831594898988-0.93071653615j))*x[2]
            ref[(0, 2, 2, 1)]=(0.258641652288-0.693220356161j)
            arg[(0, 2, 2, 2)]=(0.351368578695-0.699731849949j)*x[0] + ((-0.188935344065-0.186275370644j))*x[1] + ((0.793249373608+0.821223961635j))*x[2]
            ref[(0, 2, 2, 2)]=(0.477841304119-0.0323916294792j)
            arg[(1, 0, 0, 0)]=(-0.0886159682427+0.115386209349j)*x[0] + ((-0.358985141433+0.326848025067j))*x[1] + ((-0.630899249216+0.0853754674292j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.539250179446+0.263804850923j)
            arg[(1, 0, 0, 1)]=(-0.658026332407-0.963749480332j)*x[0] + ((-0.650518543219+0.107983721496j))*x[1] + ((-0.0672700316808+0.122111536613j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.687907453654-0.366827111112j)
            arg[(1, 0, 0, 2)]=(0.372933054081-0.859361490132j)*x[0] + ((0.743517058694-0.653131669572j))*x[1] + ((0.331478297037-0.155199742752j))*x[2]
            ref[(1, 0, 0, 2)]=(0.723964204906-0.833846451228j)
            arg[(1, 0, 1, 0)]=(-0.342580476939+0.944258854697j)*x[0] + ((0.318626443851+0.458866000595j))*x[1] + ((-0.305471271655+0.369495614055j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.164712652372+0.886310234674j)
            arg[(1, 0, 1, 1)]=(0.915635032791-0.190910239251j)*x[0] + ((0.166431953615-0.321642772701j))*x[1] + ((-0.349253069778-0.650015609865j))*x[2]
            ref[(1, 0, 1, 1)]=(0.366406958314-0.581284310908j)
            arg[(1, 0, 1, 2)]=(0.56463715797+0.389772241828j)*x[0] + ((-0.836764167702-0.964254815386j))*x[1] + ((0.56295522228+0.397549041343j))*x[2]
            ref[(1, 0, 1, 2)]=(0.145414106274-0.0884667661076j)
            arg[(1, 0, 2, 0)]=(-0.631930204013+0.0716462756405j)*x[0] + ((0.891050879476+0.44838686956j))*x[1] + ((-0.794227610864+0.910339898761j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.267553467701+0.715186521981j)
            arg[(1, 0, 2, 1)]=(0.792868847859-0.371254194168j)*x[0] + ((0.355443161298+0.223734669142j))*x[1] + ((0.407009595648+0.463361468627j))*x[2]
            ref[(1, 0, 2, 1)]=(0.777660802402+0.1579209718j)
            arg[(1, 0, 2, 2)]=(0.972826619502+0.93244320964j)*x[0] + ((-0.171369182217-0.620093052973j))*x[1] + ((-0.0595422311198+0.922448738973j))*x[2]
            ref[(1, 0, 2, 2)]=(0.370957603082+0.61739944782j)
            arg[(1, 1, 0, 0)]=(0.606480568558+0.152981805446j)*x[0] + ((0.712191945435+0.243593846328j))*x[1] + ((0.955041537282-0.209146697145j))*x[2]
            ref[(1, 1, 0, 0)]=(1.13685702564+0.0937144773146j)
            arg[(1, 1, 0, 1)]=(0.530584818603+0.19002919178j)*x[0] + ((-0.0201466391455-0.774867612966j))*x[1] + ((0.761064693368+0.115026579689j))*x[2]
            ref[(1, 1, 0, 1)]=(0.635751436413-0.234905920749j)
            arg[(1, 1, 0, 2)]=(0.709141383169+0.764493934719j)*x[0] + ((-0.496739890827+0.222932542488j))*x[1] + ((-0.656783327391-0.503676166039j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.222190917524+0.241875155584j)
            arg[(1, 1, 1, 0)]=(-0.926076137115+0.575196595102j)*x[0] + ((-0.153833956725-0.161742659754j))*x[1] + ((-0.758237328337-0.620085275087j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.919073711088-0.103315669869j)
            arg[(1, 1, 1, 1)]=(-0.00987091184127-0.805621437453j)*x[0] + ((-0.277642652754-0.822972103754j))*x[1] + ((-0.774712831407+0.845911616091j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.531113198001-0.391340962558j)
            arg[(1, 1, 1, 2)]=(-0.989505839143+0.813373299541j)*x[0] + ((0.150046379019+0.257764377004j))*x[1] + ((0.549982576784+0.919138521805j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.14473844167+0.995138099175j)
            arg[(1, 1, 2, 0)]=(-0.490333886735+0.368275187967j)*x[0] + ((0.302741664861-0.822414982864j))*x[1] + ((-0.409479653301-0.928220646319j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.298535937587-0.691180220608j)
            arg[(1, 1, 2, 1)]=(0.0473684337678+0.333823831289j)*x[0] + ((0.457635083864+0.990400219865j))*x[1] + ((-0.932790061001-0.700328359687j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.213893271685+0.311947845734j)
            arg[(1, 1, 2, 2)]=(0.328693807635+0.753047682092j)*x[0] + ((0.630936348221-0.212239371209j))*x[1] + ((0.810653588291+0.230043042156j))*x[2]
            ref[(1, 1, 2, 2)]=(0.885141872073+0.38542567652j)
            arg[(1, 2, 0, 0)]=(-0.550563589947+0.234937643286j)*x[0] + ((-0.636137970908+0.222302597903j))*x[1] + ((-0.39480142782-0.342938696621j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.790751494337+0.0571507722841j)
            arg[(1, 2, 0, 1)]=(-0.44416034808-0.292490827693j)*x[0] + ((0.072430367148+0.155127277535j))*x[1] + ((0.822731036645+0.145023227491j))*x[2]
            ref[(1, 2, 0, 1)]=(0.225500527856+0.00382983866631j)
            arg[(1, 2, 0, 2)]=(-0.196592473059+0.923797737391j)*x[0] + ((0.747885156132-0.445092754449j))*x[1] + ((-0.57570975298-0.788267341681j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.0122085349533-0.15478117937j)
            arg[(1, 2, 1, 0)]=(-0.343072765002-0.105836589138j)*x[0] + ((0.827640152368-0.593504961737j))*x[1] + ((-0.204421954282-0.497241116088j))*x[2]
            ref[(1, 2, 1, 0)]=(0.140072716542-0.598291333481j)
            arg[(1, 2, 1, 1)]=(-0.719903764353+0.275386419827j)*x[0] + ((0.249223062821-0.695391395571j))*x[1] + ((-0.487265604365+0.00158343699671j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.478973152948-0.209210769374j)
            arg[(1, 2, 1, 2)]=(-0.211196459879+0.00880672683183j)*x[0] + ((-0.571793665878+0.617915217582j))*x[1] + ((-0.337840815566+0.280460975915j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.560415470662+0.453591460164j)
            arg[(1, 2, 2, 0)]=(0.549921282963+0.798320678125j)*x[0] + ((0.241339862996+0.153253763193j))*x[1] + ((-0.348242171071+0.632949343372j))*x[2]
            ref[(1, 2, 2, 0)]=(0.221509487444+0.792261892345j)
            arg[(1, 2, 2, 1)]=(0.564404166302-0.12810282936j)*x[0] + ((0.428766836972-0.928075697658j))*x[1] + ((-0.977882198531-0.0471115758509j))*x[2]
            ref[(1, 2, 2, 1)]=(0.0076444023715-0.551645051435j)
            arg[(1, 2, 2, 2)]=(-0.889198591994+0.792153885288j)*x[0] + ((-0.164181134909+0.724174789377j))*x[1] + ((-0.402481805461-0.184091566863j))*x[2]
            ref[(1, 2, 2, 2)]=(-0.727930766182+0.666118553901j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.0874973759829-0.563699253217j)*x[0]**o + ((0.850487848325-0.899062325104j))*x[0] + ((0.564536210557+0.970054496569j))*x[1]**o + ((0.522731146455+0.993064942849j))*x[1]
            ref=(0.564536210557+0.970054496569j)/(o+1.)+((0.68660949739+0.0470013088729j))+((0.0874973759829-0.563699253217j))*0.5**o
        else:
            arg=(-0.418247131081-0.523637095376j)*x[0]**o + ((-0.069131974637+0.136615921985j))*x[0] + ((0.608534151779+0.25903538188j))*x[1]**o + ((-0.272948393652+0.594888595213j))*x[1] + ((0.944283611534-0.719719630976j))*x[2]**o + ((-0.161665291408-0.981731276829j))*x[2]
            ref=(1.55281776331-0.460684249096j)/(o+1.)+((-0.251872829848-0.125113379816j))+((-0.418247131081-0.523637095376j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.717234195339-0.296833560214j)*x[0]**o + ((0.112842179071+0.159295664455j))*x[0] + ((0.49019117083+0.0959921161631j))*x[1]**o + ((0.940747186221+0.100086431117j))*x[1]
            ref[(0,)]=(0.49019117083+0.0959921161631j)/(o+1.)+((0.526794682646+0.129691047786j))+((-0.717234195339-0.296833560214j))*0.5**o
            arg[(1,)]=(-0.826380463546+0.837867670326j)*x[0]**o + ((0.0261996656572+0.528476029357j))*x[0] + ((0.530161356476+0.128132007345j))*x[1]**o + ((0.380462662117-0.655970722573j))*x[1]
            ref[(1,)]=(0.530161356476+0.128132007345j)/(o+1.)+((0.203331163887-0.0637473466081j))+((-0.826380463546+0.837867670326j))*0.5**o
            arg[(2,)]=(-0.907060446035-0.727816170748j)*x[0]**o + ((-0.464965216849+0.276241949732j))*x[0] + ((0.729713451443-0.482145617183j))*x[1]**o + ((0.341216749668+0.404693001953j))*x[1]
            ref[(2,)]=(0.729713451443-0.482145617183j)/(o+1.)+((-0.0618742335905+0.340467475842j))+((-0.907060446035-0.727816170748j))*0.5**o
            arg[(3,)]=(-0.280952352485+0.631347950678j)*x[0]**o + ((0.399075445485+0.68329675122j))*x[0] + ((0.384318367054+0.198505973645j))*x[1]**o + ((0.200189284421+0.958726584889j))*x[1]
            ref[(3,)]=(0.384318367054+0.198505973645j)/(o+1.)+((0.299632364953+0.821011668054j))+((-0.280952352485+0.631347950678j))*0.5**o
        else:
            arg[(0,)]=(0.160900551816-0.929487374738j)*x[0]**o + ((-0.922234350863-0.246269025744j))*x[0] + ((0.178848054382+0.856260648386j))*x[1]**o + ((0.461069727939+0.288690138302j))*x[1] + ((-0.399910320416+0.663824389553j))*x[2]**o + ((0.158679043493-0.228675704832j))*x[2]
            ref[(0,)]=(-0.221062266035+1.52008503794j)/(o+1.)+((-0.151242789715-0.093127296137j))+((0.160900551816-0.929487374738j))*0.5**o
            arg[(1,)]=(-0.651580979316-0.3078717836j)*x[0]**o + ((0.878057522855-0.0908000671419j))*x[0] + ((0.521391263897+0.110259480964j))*x[1]**o + ((-0.354391108651+0.202977147737j))*x[1] + ((-0.728884430269+0.197227422648j))*x[2]**o + ((-0.6624256524-0.772755983911j))*x[2]
            ref[(1,)]=(-0.207493166372+0.307486903612j)/(o+1.)+((-0.0693796190984-0.330289451658j))+((-0.651580979316-0.3078717836j))*0.5**o
            arg[(2,)]=(0.515989915956+0.450051949583j)*x[0]**o + ((0.408768705988-0.39484620469j))*x[0] + ((0.340640264431+0.691782749861j))*x[1]**o + ((0.525962897806+0.396395240217j))*x[1] + ((0.99714369075+0.258994116745j))*x[2]**o + ((-0.318312555188-0.210564434228j))*x[2]
            ref[(2,)]=(1.33778395518+0.950776866606j)/(o+1.)+((0.308209524303-0.104507699351j))+((0.515989915956+0.450051949583j))*0.5**o
            arg[(3,)]=(0.428163883873-0.249252318611j)*x[0]**o + ((0.443550840273+0.986223407574j))*x[0] + ((-0.140258459013+0.431904242296j))*x[1]**o + ((-0.214650179631-0.581349893102j))*x[1] + ((0.184965176873-0.604712323388j))*x[2]**o + ((-0.154719444919-0.149339420532j))*x[2]
            ref[(3,)]=(0.0447067178596-0.172808081093j)/(o+1.)+((0.0370906078616+0.12776704697j))+((0.428163883873-0.249252318611j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref=numpy.zeros((4, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.745521872999-0.0280899898074j)*x[0]**o + ((-0.166954799331+0.859417952433j))*x[0] + ((0.167840642076+0.781417992642j))*x[1]**o + ((-0.565201624278-0.0837015652149j))*x[1]
            ref[(0, 0)]=(0.167840642076+0.781417992642j)/(o+1.)+((-0.366078211805+0.387858193609j))+((-0.745521872999-0.0280899898074j))*0.5**o
            arg[(0, 1)]=(0.718775330898-0.585806917967j)*x[0]**o + ((0.999130606348+0.703833635613j))*x[0] + ((-0.244340466247+0.154695173576j))*x[1]**o + ((-0.00072459020407+0.473513597133j))*x[1]
            ref[(0, 1)]=(-0.244340466247+0.154695173576j)/(o+1.)+((0.499203008072+0.588673616373j))+((0.718775330898-0.585806917967j))*0.5**o
            arg[(0, 2)]=(0.530658233122-0.347357020003j)*x[0]**o + ((-0.239955869964+0.22341245908j))*x[0] + ((-0.0197607418485+0.928918979626j))*x[1]**o + ((-0.978342053069+0.956477970827j))*x[1]
            ref[(0, 2)]=(-0.0197607418485+0.928918979626j)/(o+1.)+((-0.609148961517+0.589945214954j))+((0.530658233122-0.347357020003j))*0.5**o
            arg[(1, 0)]=(0.735954400174-0.18410374855j)*x[0]**o + ((-0.266078195863-0.301135137431j))*x[0] + ((0.522415357263-0.427256834127j))*x[1]**o + ((0.641151667029+0.894546289833j))*x[1]
            ref[(1, 0)]=(0.522415357263-0.427256834127j)/(o+1.)+((0.187536735583+0.296705576201j))+((0.735954400174-0.18410374855j))*0.5**o
            arg[(1, 1)]=(0.924442310788-0.790333326254j)*x[0]**o + ((0.290500787937-0.0993592010921j))*x[0] + ((-0.981526883941-0.582110629439j))*x[1]**o + ((-0.956356365018+0.777088092757j))*x[1]
            ref[(1, 1)]=(-0.981526883941-0.582110629439j)/(o+1.)+((-0.33292778854+0.338864445833j))+((0.924442310788-0.790333326254j))*0.5**o
            arg[(1, 2)]=(0.818340368616+0.359153312486j)*x[0]**o + ((-0.0179630298174+0.281946010767j))*x[0] + ((-0.720201249006-0.878725492774j))*x[1]**o + ((0.131799739717+0.984284959295j))*x[1]
            ref[(1, 2)]=(-0.720201249006-0.878725492774j)/(o+1.)+((0.0569183549496+0.633115485031j))+((0.818340368616+0.359153312486j))*0.5**o
            arg[(2, 0)]=(0.959409026607-0.33571352098j)*x[0]**o + ((-0.5120198439+0.183303183624j))*x[0] + ((-0.629453992552+0.0593822869362j))*x[1]**o + ((0.583851096016-0.76727172588j))*x[1]
            ref[(2, 0)]=(-0.629453992552+0.0593822869362j)/(o+1.)+((0.0359156260584-0.291984271128j))+((0.959409026607-0.33571352098j))*0.5**o
            arg[(2, 1)]=(-0.184219900047+0.525372413228j)*x[0]**o + ((0.856351928296-0.740266555968j))*x[0] + ((-0.471845179544-0.0929851747406j))*x[1]**o + ((0.00178647668376-0.111985643012j))*x[1]
            ref[(2, 1)]=(-0.471845179544-0.0929851747406j)/(o+1.)+((0.42906920249-0.42612609949j))+((-0.184219900047+0.525372413228j))*0.5**o
            arg[(2, 2)]=(0.53849056444+0.964432808031j)*x[0]**o + ((-0.668004427732+0.0153443752308j))*x[0] + ((0.632836453532+0.393650000864j))*x[1]**o + ((0.992968080825+0.526166658235j))*x[1]
            ref[(2, 2)]=(0.632836453532+0.393650000864j)/(o+1.)+((0.162481826547+0.270755516733j))+((0.53849056444+0.964432808031j))*0.5**o
            arg[(3, 0)]=(-0.440362042362-0.114950138683j)*x[0]**o + ((0.180807453287+0.710583968402j))*x[0] + ((-0.220531426886-0.938074482242j))*x[1]**o + ((0.421425117311+0.97852331508j))*x[1]
            ref[(3, 0)]=(-0.220531426886-0.938074482242j)/(o+1.)+((0.301116285299+0.844553641741j))+((-0.440362042362-0.114950138683j))*0.5**o
            arg[(3, 1)]=(0.304926094382+0.5641202107j)*x[0]**o + ((0.216118196803+0.828977493697j))*x[0] + ((0.948873344157-0.729700443395j))*x[1]**o + ((-0.829241760887+0.264661979944j))*x[1]
            ref[(3, 1)]=(0.948873344157-0.729700443395j)/(o+1.)+((-0.306561782042+0.546819736821j))+((0.304926094382+0.5641202107j))*0.5**o
            arg[(3, 2)]=(-0.620317160476-0.168461545581j)*x[0]**o + ((-0.846548539054+0.561667184832j))*x[0] + ((-0.453150740231-0.893488418926j))*x[1]**o + ((0.65793014319+0.833733993834j))*x[1]
            ref[(3, 2)]=(-0.453150740231-0.893488418926j)/(o+1.)+((-0.0943091979324+0.697700589333j))+((-0.620317160476-0.168461545581j))*0.5**o
        else:
            arg[(0, 0)]=(0.819869064678+0.827921244742j)*x[0]**o + ((-0.841063516504-0.28205934097j))*x[0] + ((-0.269701305595-0.82207511227j))*x[1]**o + ((-0.832287803111+0.119443777007j))*x[1] + ((0.196800884928+0.858721760927j))*x[2]**o + ((-0.617762799148-0.59006010891j))*x[2]
            ref[(0, 0)]=(-0.0729004206666+0.0366466486565j)/(o+1.)+((-1.14555705938-0.376337836436j))+((0.819869064678+0.827921244742j))*0.5**o
            arg[(0, 1)]=(0.0839695693206+0.473400099753j)*x[0]**o + ((-0.141296373915-0.798687344102j))*x[0] + ((-0.137893431645-0.678691197998j))*x[1]**o + ((0.838394363879+0.539980130298j))*x[1] + ((-0.368717516202+0.67833442362j))*x[2]**o + ((-0.740608748983+0.334944140854j))*x[2]
            ref[(0, 1)]=(-0.506610947847-0.000356774377902j)/(o+1.)+((-0.0217553795091+0.038118463525j))+((0.0839695693206+0.473400099753j))*0.5**o
            arg[(0, 2)]=(0.947993897032+0.143108659697j)*x[0]**o + ((-0.652085424903-0.3627725373j))*x[0] + ((0.646817992001-0.123396560572j))*x[1]**o + ((-0.719166557354-0.600002093736j))*x[1] + ((0.658373940449+0.798365659649j))*x[2]**o + ((-0.115296034861-0.881686140404j))*x[2]
            ref[(0, 2)]=(1.30519193245+0.674969099077j)/(o+1.)+((-0.743274008559-0.92223038572j))+((0.947993897032+0.143108659697j))*0.5**o
            arg[(1, 0)]=(0.662530847344-0.898735301217j)*x[0]**o + ((0.0917856897556+0.26316435164j))*x[0] + ((0.440029257598-0.676842630675j))*x[1]**o + ((0.673988902846+0.636671068606j))*x[1] + ((0.0962701751986+0.875076872116j))*x[2]**o + ((0.777917086873+0.185176583024j))*x[2]
            ref[(1, 0)]=(0.536299432797+0.198234241441j)/(o+1.)+((0.771845839737+0.542506001635j))+((0.662530847344-0.898735301217j))*0.5**o
            arg[(1, 1)]=(0.376349974935+0.165834892233j)*x[0]**o + ((0.0588163131099-0.0331792690553j))*x[0] + ((-0.639093066207-0.345676846733j))*x[1]**o + ((0.985553226325-0.446416112195j))*x[1] + ((0.416769647761-0.086743288127j))*x[2]**o + ((0.191749248493-0.257861001508j))*x[2]
            ref[(1, 1)]=(-0.222323418446-0.43242013486j)/(o+1.)+((0.618059393964-0.368728191379j))+((0.376349974935+0.165834892233j))*0.5**o
            arg[(1, 2)]=(0.745704433414-0.620546924483j)*x[0]**o + ((0.606116990228-0.268878114835j))*x[0] + ((0.0335177326086-0.127518903351j))*x[1]**o + ((0.754708694588+0.223358722045j))*x[1] + ((0.118081235367-0.148363105923j))*x[2]**o + ((-0.953522262708+0.406145883635j))*x[2]
            ref[(1, 2)]=(0.151598967975-0.275882009273j)/(o+1.)+((0.203651711054+0.180313245423j))+((0.745704433414-0.620546924483j))*0.5**o
            arg[(2, 0)]=(0.57376164854+0.204516810785j)*x[0]**o + ((0.511863786024+0.127910851999j))*x[0] + ((-0.794548522868+0.884420957268j))*x[1]**o + ((-0.442330663884+0.0515393247593j))*x[1] + ((-0.00310386604892+0.595403946665j))*x[2]**o + ((0.710601887668-0.22078122347j))*x[2]
            ref[(2, 0)]=(-0.797652388917+1.47982490393j)/(o+1.)+((0.390067504904-0.0206655233561j))+((0.57376164854+0.204516810785j))*0.5**o
            arg[(2, 1)]=(-0.386065746602+0.398887270751j)*x[0]**o + ((0.598326507427+0.289486723388j))*x[0] + ((0.454090928795-0.422181499546j))*x[1]**o + ((-0.825926840376+0.173781720348j))*x[1] + ((0.722467286424-0.00754835296357j))*x[2]**o + ((-0.0888014331482+0.780275959228j))*x[2]
            ref[(2, 1)]=(1.17655821522-0.42972985251j)/(o+1.)+((-0.158200883048+0.621772201482j))+((-0.386065746602+0.398887270751j))*0.5**o
            arg[(2, 2)]=(0.815890299113-0.431762946601j)*x[0]**o + ((0.701255482663+0.775163025947j))*x[0] + ((-0.910743227624-0.101660938714j))*x[1]**o + ((0.841620118737-0.306928937648j))*x[1] + ((0.622729455034-0.335097563586j))*x[2]**o + ((-0.113065224598-0.187366379343j))*x[2]
            ref[(2, 2)]=(-0.288013772589-0.436758502299j)/(o+1.)+((0.714905188401+0.140433854478j))+((0.815890299113-0.431762946601j))*0.5**o
            arg[(3, 0)]=(0.128798137777-0.306822357036j)*x[0]**o + ((-0.382546626069+0.138447009383j))*x[0] + ((-0.32197470379+0.491630720569j))*x[1]**o + ((0.612251638172-0.356977664473j))*x[1] + ((-0.913001403908-0.332819243594j))*x[2]**o + ((0.248427599408-0.143054445838j))*x[2]
            ref[(3, 0)]=(-1.2349761077+0.158811476975j)/(o+1.)+((0.239066305755-0.180792550464j))+((0.128798137777-0.306822357036j))*0.5**o
            arg[(3, 1)]=(0.938504765487+0.701208306634j)*x[0]**o + ((0.0663319826039+0.70220953681j))*x[0] + ((0.485302853445-0.412520895407j))*x[1]**o + ((-0.645232820957-0.772809824502j))*x[1] + ((0.80560986272-0.525948084476j))*x[2]**o + ((0.723746393449-0.671214085164j))*x[2]
            ref[(3, 1)]=(1.29091271617-0.938468979884j)/(o+1.)+((0.0724227775479-0.370907186428j))+((0.938504765487+0.701208306634j))*0.5**o
            arg[(3, 2)]=(0.147568399987-0.795136540679j)*x[0]**o + ((0.950436308417-0.278490153512j))*x[0] + ((0.147570851009-0.219089019085j))*x[1]**o + ((-0.374046459232-0.375424996184j))*x[1] + ((-0.185260156569-0.245791448504j))*x[2]**o + ((0.701389610084+0.780183174614j))*x[2]
            ref[(3, 2)]=(-0.0376893055599-0.464880467589j)/(o+1.)+((0.638889729635+0.0631340124592j))+((0.147568399987-0.795136540679j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref=numpy.zeros((2, 3, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.318978736279-0.306427510451j)*x[0]**o + ((-0.535652818879-0.566466366226j))*x[0] + ((0.00730799181278+0.741123266857j))*x[1]**o + ((0.193925234511+0.774908876021j))*x[1]
            ref[(0, 0, 0)]=(0.00730799181278+0.741123266857j)/(o+1.)+((-0.170863792184+0.104221254897j))+((0.318978736279-0.306427510451j))*0.5**o
            arg[(0, 0, 1)]=(0.962960291851+0.0154655531794j)*x[0]**o + ((0.226968954652+0.0028573133883j))*x[0] + ((0.543299915362-0.366374599019j))*x[1]**o + ((0.375133469784+0.86990459034j))*x[1]
            ref[(0, 0, 1)]=(0.543299915362-0.366374599019j)/(o+1.)+((0.301051212218+0.436380951864j))+((0.962960291851+0.0154655531794j))*0.5**o
            arg[(0, 0, 2)]=(-0.996040462742-0.0962301784553j)*x[0]**o + ((0.297125162544+0.984439779455j))*x[0] + ((0.720339564618-0.247206333597j))*x[1]**o + ((-0.947014675368+0.335229755896j))*x[1]
            ref[(0, 0, 2)]=(0.720339564618-0.247206333597j)/(o+1.)+((-0.324944756412+0.659834767676j))+((-0.996040462742-0.0962301784553j))*0.5**o
            arg[(0, 1, 0)]=(-0.109604457327-0.298389064679j)*x[0]**o + ((0.808058830443+0.149322342047j))*x[0] + ((-0.500616583413-0.553798876222j))*x[1]**o + ((-0.000326461634919+0.173761140574j))*x[1]
            ref[(0, 1, 0)]=(-0.500616583413-0.553798876222j)/(o+1.)+((0.403866184404+0.16154174131j))+((-0.109604457327-0.298389064679j))*0.5**o
            arg[(0, 1, 1)]=(0.241266019912-0.232346074191j)*x[0]**o + ((0.138223997345-0.925148505998j))*x[0] + ((-0.355861504741+0.359089830232j))*x[1]**o + ((0.5001775126-0.470039473312j))*x[1]
            ref[(0, 1, 1)]=(-0.355861504741+0.359089830232j)/(o+1.)+((0.319200754972-0.697593989655j))+((0.241266019912-0.232346074191j))*0.5**o
            arg[(0, 1, 2)]=(0.889038381932+0.780378986595j)*x[0]**o + ((0.585880896068-0.666252324874j))*x[0] + ((-0.72525523107+0.971566221291j))*x[1]**o + ((-0.180742583668+0.497685272824j))*x[1]
            ref[(0, 1, 2)]=(-0.72525523107+0.971566221291j)/(o+1.)+((0.2025691562-0.0842835260249j))+((0.889038381932+0.780378986595j))*0.5**o
            arg[(0, 2, 0)]=(0.169367778929-0.253669052016j)*x[0]**o + ((0.848659842088+0.574169697965j))*x[0] + ((-0.447668767238+0.0307743958213j))*x[1]**o + ((0.649099438057+0.917665567307j))*x[1]
            ref[(0, 2, 0)]=(-0.447668767238+0.0307743958213j)/(o+1.)+((0.748879640072+0.745917632636j))+((0.169367778929-0.253669052016j))*0.5**o
            arg[(0, 2, 1)]=(0.992276746444+0.610641586017j)*x[0]**o + ((0.404871221613+0.677586322936j))*x[0] + ((-0.981305505541-0.603480194663j))*x[1]**o + ((-0.247152082832-0.424205284803j))*x[1]
            ref[(0, 2, 1)]=(-0.981305505541-0.603480194663j)/(o+1.)+((0.0788595693904+0.126690519066j))+((0.992276746444+0.610641586017j))*0.5**o
            arg[(0, 2, 2)]=(-0.923993843095+0.299045491896j)*x[0]**o + ((0.408081738094-0.60117536553j))*x[0] + ((-0.358306305028-0.923895327887j))*x[1]**o + ((0.834714437567+0.1254161529j))*x[1]
            ref[(0, 2, 2)]=(-0.358306305028-0.923895327887j)/(o+1.)+((0.621398087831-0.237879606315j))+((-0.923993843095+0.299045491896j))*0.5**o
            arg[(1, 0, 0)]=(0.195496086789-0.618237265578j)*x[0]**o + ((-0.592418293621+0.728347688596j))*x[0] + ((-0.734692671572+0.811560651447j))*x[1]**o + ((0.0715733123545+0.228352180789j))*x[1]
            ref[(1, 0, 0)]=(-0.734692671572+0.811560651447j)/(o+1.)+((-0.260422490633+0.478349934692j))+((0.195496086789-0.618237265578j))*0.5**o
            arg[(1, 0, 1)]=(-0.152645894331-0.194341845939j)*x[0]**o + ((0.0820440349939-0.840598327642j))*x[0] + ((0.55171183826-0.993945171083j))*x[1]**o + ((0.460702297657-0.25365526006j))*x[1]
            ref[(1, 0, 1)]=(0.55171183826-0.993945171083j)/(o+1.)+((0.271373166325-0.547126793851j))+((-0.152645894331-0.194341845939j))*0.5**o
            arg[(1, 0, 2)]=(-0.0604251516538-0.797583102961j)*x[0]**o + ((0.586777993227+0.446717231731j))*x[0] + ((0.438360233748-0.924590258463j))*x[1]**o + ((-0.95578886646+0.975092392855j))*x[1]
            ref[(1, 0, 2)]=(0.438360233748-0.924590258463j)/(o+1.)+((-0.184505436616+0.710904812293j))+((-0.0604251516538-0.797583102961j))*0.5**o
            arg[(1, 1, 0)]=(-0.476468630107-0.506412329391j)*x[0]**o + ((-0.791125689482+0.0212527273274j))*x[0] + ((0.421780364553+0.291317176899j))*x[1]**o + ((0.703806883852-0.100454013265j))*x[1]
            ref[(1, 1, 0)]=(0.421780364553+0.291317176899j)/(o+1.)+((-0.0436594028151-0.0396006429686j))+((-0.476468630107-0.506412329391j))*0.5**o
            arg[(1, 1, 1)]=(0.744153368489+0.142303022635j)*x[0]**o + ((0.181795986914-0.460449152122j))*x[0] + ((0.850376906353-0.700967148145j))*x[1]**o + ((-0.738491870803-0.768020035j))*x[1]
            ref[(1, 1, 1)]=(0.850376906353-0.700967148145j)/(o+1.)+((-0.278347941944-0.614234593561j))+((0.744153368489+0.142303022635j))*0.5**o
            arg[(1, 1, 2)]=(0.981265023489-0.767487064363j)*x[0]**o + ((0.59182608634-0.761824237349j))*x[0] + ((-0.0755740569687+0.731011054717j))*x[1]**o + ((-0.158899492263+0.752159629043j))*x[1]
            ref[(1, 1, 2)]=(-0.0755740569687+0.731011054717j)/(o+1.)+((0.216463297039-0.00483230415332j))+((0.981265023489-0.767487064363j))*0.5**o
            arg[(1, 2, 0)]=(0.414323564951+0.978514579124j)*x[0]**o + ((-0.808309274957+0.57005258495j))*x[0] + ((0.668818632979-0.661389566441j))*x[1]**o + ((0.127322964945-0.358285938247j))*x[1]
            ref[(1, 2, 0)]=(0.668818632979-0.661389566441j)/(o+1.)+((-0.340493155006+0.105883323351j))+((0.414323564951+0.978514579124j))*0.5**o
            arg[(1, 2, 1)]=(-0.411560366456+0.753439759803j)*x[0]**o + ((0.095787904693-0.0125101359698j))*x[0] + ((-0.196557014891-0.754274189692j))*x[1]**o + ((0.0227414624448+0.727500635876j))*x[1]
            ref[(1, 2, 1)]=(-0.196557014891-0.754274189692j)/(o+1.)+((0.0592646835689+0.357495249953j))+((-0.411560366456+0.753439759803j))*0.5**o
            arg[(1, 2, 2)]=(-0.819573570644+0.426596938434j)*x[0]**o + ((0.979802856774-0.824870286897j))*x[0] + ((0.833363327105-0.0153309668179j))*x[1]**o + ((-0.454609474885-0.520317501697j))*x[1]
            ref[(1, 2, 2)]=(0.833363327105-0.0153309668179j)/(o+1.)+((0.262596690945-0.672593894297j))+((-0.819573570644+0.426596938434j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.922376474928-0.239725215108j)*x[0]**o + ((0.616917813336-0.293684562557j))*x[0] + ((-0.400579563075+0.730971829045j))*x[1]**o + ((-0.634997788478-0.417699939477j))*x[1] + ((-0.0622706852179+0.154069891455j))*x[2]**o + ((0.437086670814-0.136230381439j))*x[2]
            ref[(0, 0, 0)]=(-0.462850248293+0.885041720499j)/(o+1.)+((0.209503347836-0.423807441737j))+((-0.922376474928-0.239725215108j))*0.5**o
            arg[(0, 0, 1)]=(0.795909997271-0.311798140795j)*x[0]**o + ((0.498074881434-0.0462177119875j))*x[0] + ((0.723887854374-0.404770117834j))*x[1]**o + ((0.300380149624-0.520965499876j))*x[1] + ((0.0680083148627+0.455442196482j))*x[2]**o + ((-0.551155068306+0.900430380771j))*x[2]
            ref[(0, 0, 1)]=(0.791896169237+0.0506720786481j)/(o+1.)+((0.123649981376+0.166623584454j))+((0.795909997271-0.311798140795j))*0.5**o
            arg[(0, 0, 2)]=(0.723522438426+0.586139517096j)*x[0]**o + ((-0.926059957783-0.466519427825j))*x[0] + ((-0.947623112873-0.802850261134j))*x[1]**o + ((-0.222626175062+0.725587419584j))*x[1] + ((-0.316368778686-0.701724362894j))*x[2]**o + ((0.352891794315+0.131265021605j))*x[2]
            ref[(0, 0, 2)]=(-1.26399189156-1.50457462403j)/(o+1.)+((-0.397897169265+0.195166506682j))+((0.723522438426+0.586139517096j))*0.5**o
            arg[(0, 1, 0)]=(0.129601078293+0.520104009187j)*x[0]**o + ((0.995065182986-0.00384725451548j))*x[0] + ((0.891190970818+0.201643286j))*x[1]**o + ((-0.960655101967+0.974278355787j))*x[1] + ((0.782290484898-0.120291321859j))*x[2]**o + ((0.761361588757-0.673690074104j))*x[2]
            ref[(0, 1, 0)]=(1.67348145572+0.0813519641411j)/(o+1.)+((0.397885834888+0.148370513584j))+((0.129601078293+0.520104009187j))*0.5**o
            arg[(0, 1, 1)]=(0.0555817105853+0.431710656496j)*x[0]**o + ((-0.773196956237+0.723011077106j))*x[0] + ((-0.165405960373-0.594723344636j))*x[1]**o + ((0.0173709735699-0.0519590744486j))*x[1] + ((0.578517248182+0.07570517416j))*x[2]**o + ((-0.760249711285+0.168030156038j))*x[2]
            ref[(0, 1, 1)]=(0.413111287808-0.519018170476j)/(o+1.)+((-0.758037846976+0.419541079348j))+((0.0555817105853+0.431710656496j))*0.5**o
            arg[(0, 1, 2)]=(-0.236587036467-0.442142517021j)*x[0]**o + ((0.697862748683+0.356766806951j))*x[0] + ((0.92295081017-0.162272282944j))*x[1]**o + ((-0.0607966981784+0.355628412728j))*x[1] + ((0.233968065523-0.474890368524j))*x[2]**o + ((-0.854621811171+0.0505765382818j))*x[2]
            ref[(0, 1, 2)]=(1.15691887569-0.637162651468j)/(o+1.)+((-0.108777880333+0.38148587898j))+((-0.236587036467-0.442142517021j))*0.5**o
            arg[(0, 2, 0)]=(-0.0333090798572-0.711899688512j)*x[0]**o + ((-0.588560274204+0.228418681388j))*x[0] + ((0.606505904074+0.955739025753j))*x[1]**o + ((0.0693247618947-0.287016435369j))*x[1] + ((-0.673888021895+0.888087081093j))*x[2]**o + ((-0.193796922892-0.568002202391j))*x[2]
            ref[(0, 2, 0)]=(-0.0673821178213+1.84382610685j)/(o+1.)+((-0.356516217601-0.313299978186j))+((-0.0333090798572-0.711899688512j))*0.5**o
            arg[(0, 2, 1)]=(0.346864790761+0.736920381214j)*x[0]**o + ((0.722766736074+0.815769779133j))*x[0] + ((-0.577524849699+0.238457024668j))*x[1]**o + ((0.59993867456+0.447695783316j))*x[1] + ((0.436385679099-0.598846263014j))*x[2]**o + ((-0.891753814371+0.872721141481j))*x[2]
            ref[(0, 2, 1)]=(-0.1411391706-0.360389238347j)/(o+1.)+((0.215475798132+1.06809335197j))+((0.346864790761+0.736920381214j))*0.5**o
            arg[(0, 2, 2)]=(-0.874910504716-0.993933507249j)*x[0]**o + ((0.989519764603+0.725014913819j))*x[0] + ((0.303322292236+0.981208111043j))*x[1]**o + ((0.571675884208+0.919308205368j))*x[1] + ((0.629139511395-0.334882207682j))*x[2]**o + ((-0.981827751571-0.373665176673j))*x[2]
            ref[(0, 2, 2)]=(0.93246180363+0.646325903361j)/(o+1.)+((0.28968394862+0.635328971257j))+((-0.874910504716-0.993933507249j))*0.5**o
            arg[(1, 0, 0)]=(0.523490991666-0.269598239458j)*x[0]**o + ((-0.0412188954307-0.847901378157j))*x[0] + ((-0.115922832687-0.592150173624j))*x[1]**o + ((-0.862553842587+0.0485318512016j))*x[1] + ((-0.457010240266+0.337110061791j))*x[2]**o + ((-0.0620902927848+0.903749516977j))*x[2]
            ref[(1, 0, 0)]=(-0.572933072953-0.255040111833j)/(o+1.)+((-0.482931515401+0.0521899950109j))+((0.523490991666-0.269598239458j))*0.5**o
            arg[(1, 0, 1)]=(-0.855870733592-0.0690751438279j)*x[0]**o + ((-0.7746923069+0.207907785243j))*x[0] + ((-0.621830402751+0.339866618053j))*x[1]**o + ((0.588492675235+0.104915616025j))*x[1] + ((0.373548329819+0.195130564638j))*x[2]**o + ((0.730539882072+0.979909246068j))*x[2]
            ref[(1, 0, 1)]=(-0.248282072932+0.534997182691j)/(o+1.)+((0.272170125204+0.646366323668j))+((-0.855870733592-0.0690751438279j))*0.5**o
            arg[(1, 0, 2)]=(0.797326632294+0.867489118587j)*x[0]**o + ((-0.665528785561-0.096561187799j))*x[0] + ((0.578225625898-0.614550270009j))*x[1]**o + ((0.559750382596-0.775956079644j))*x[1] + ((0.826163702108+0.20322098997j))*x[2]**o + ((0.617779521613+0.510455801153j))*x[2]
            ref[(1, 0, 2)]=(1.40438932801-0.411329280039j)/(o+1.)+((0.256000559324-0.181030733145j))+((0.797326632294+0.867489118587j))*0.5**o
            arg[(1, 1, 0)]=(0.561649716795-0.968244881589j)*x[0]**o + ((0.704585211844-0.467312080886j))*x[0] + ((-0.859911353218-0.714526576438j))*x[1]**o + ((0.162911099621-0.343851226739j))*x[1] + ((0.880220997025+0.566193061349j))*x[2]**o + ((-0.416725183977-0.756647331074j))*x[2]
            ref[(1, 1, 0)]=(0.0203096438074-0.148333515089j)/(o+1.)+((0.225385563744-0.783905319349j))+((0.561649716795-0.968244881589j))*0.5**o
            arg[(1, 1, 1)]=(-0.691642962613+0.919958334812j)*x[0]**o + ((-0.414849053521-0.956458162016j))*x[0] + ((0.0125951699121+0.384305060921j))*x[1]**o + ((0.267889983195-0.355590463502j))*x[1] + ((-0.516367710901+0.693836248927j))*x[2]**o + ((-0.0935809265819+0.0840327638845j))*x[2]
            ref[(1, 1, 1)]=(-0.503772540989+1.07814130985j)/(o+1.)+((-0.120269998454-0.614007930817j))+((-0.691642962613+0.919958334812j))*0.5**o
            arg[(1, 1, 2)]=(0.205514321608-0.891199546041j)*x[0]**o + ((-0.804575209082-0.724187822813j))*x[0] + ((0.978530708087-0.286948130561j))*x[1]**o + ((0.929574097719-0.197943061367j))*x[1] + ((-0.828035449319+0.0115271320585j))*x[2]**o + ((0.720050891733-0.0963583390205j))*x[2]
            ref[(1, 1, 2)]=(0.150495258768-0.275420998503j)/(o+1.)+((0.422524890185-0.5092446116j))+((0.205514321608-0.891199546041j))*0.5**o
            arg[(1, 2, 0)]=(0.557865263451-0.589448897923j)*x[0]**o + ((0.0699594730863+0.267257739116j))*x[0] + ((0.134859054643+0.21727745303j))*x[1]**o + ((-0.652632098179-0.0369200029382j))*x[1] + ((0.436336656744+0.271464723636j))*x[2]**o + ((-0.793791164822+0.605774569146j))*x[2]
            ref[(1, 2, 0)]=(0.571195711387+0.488742176666j)/(o+1.)+((-0.688231894958+0.418056152662j))+((0.557865263451-0.589448897923j))*0.5**o
            arg[(1, 2, 1)]=(-0.420863398544-0.344287138139j)*x[0]**o + ((0.1971465446-0.885912589224j))*x[0] + ((-0.127608353794+0.900614869066j))*x[1]**o + ((-0.171502995855+0.197481742631j))*x[1] + ((-0.392421468845+0.808010517893j))*x[2]**o + ((0.569928487638+0.95783954105j))*x[2]
            ref[(1, 2, 1)]=(-0.520029822639+1.70862538696j)/(o+1.)+((0.297786018191+0.134704347229j))+((-0.420863398544-0.344287138139j))*0.5**o
            arg[(1, 2, 2)]=(0.642002648629-0.528126468247j)*x[0]**o + ((0.585986151693+0.221944601446j))*x[0] + ((-0.847955340011+0.400735845018j))*x[1]**o + ((-0.416272070216-0.266457879453j))*x[1] + ((-0.72932555233+0.400030509409j))*x[2]**o + ((-0.815062762129+0.488536338621j))*x[2]
            ref[(1, 2, 2)]=(-1.57728089234+0.800766354427j)/(o+1.)+((-0.322674340326+0.222011530307j))+((0.642002648629-0.528126468247j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 4, 2),w)
        ref=numpy.zeros((3, 2, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.907929971645+0.82502673787j)*x[0]**o + ((-0.423455819304-0.54425134169j))*x[0] + ((-0.40159071848-0.43332067896j))*x[1]**o + ((0.392074706878-0.11987524559j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.40159071848-0.43332067896j)/(o+1.)+((-0.0156905562128-0.33206329364j))+((-0.907929971645+0.82502673787j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.994891411994+0.721038070231j)*x[0]**o + ((-0.692803201232+0.513184823624j))*x[0] + ((-0.00056981883529+0.226068573865j))*x[1]**o + ((-0.913722056051+0.850592058606j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.00056981883529+0.226068573865j)/(o+1.)+((-0.803262628641+0.681888441115j))+((-0.994891411994+0.721038070231j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.935751698193-0.985008255969j)*x[0]**o + ((0.3342120499-0.274122327765j))*x[0] + ((0.701733760194+0.607912995371j))*x[1]**o + ((0.387228259302+0.442308423041j))*x[1]
            ref[(0, 0, 1, 0)]=(0.701733760194+0.607912995371j)/(o+1.)+((0.360720154601+0.084093047638j))+((0.935751698193-0.985008255969j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.997663834666-0.419245585447j)*x[0]**o + ((0.252724188313-0.86769074582j))*x[0] + ((0.672138506821+0.306845749403j))*x[1]**o + ((-0.633599063562+0.324345677497j))*x[1]
            ref[(0, 0, 1, 1)]=(0.672138506821+0.306845749403j)/(o+1.)+((-0.190437437625-0.271672534161j))+((0.997663834666-0.419245585447j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.481648007171-0.171371579998j)*x[0]**o + ((-0.162948017024+0.37207062735j))*x[0] + ((0.407977114961+0.788083320518j))*x[1]**o + ((0.551335604046+0.333485898067j))*x[1]
            ref[(0, 0, 2, 0)]=(0.407977114961+0.788083320518j)/(o+1.)+((0.194193793511+0.352778262708j))+((0.481648007171-0.171371579998j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.652770520264+0.692964573056j)*x[0]**o + ((-0.60418791257+0.695688307066j))*x[0] + ((0.646994777018+0.423270700058j))*x[1]**o + ((-0.463348547729-0.652405511476j))*x[1]
            ref[(0, 0, 2, 1)]=(0.646994777018+0.423270700058j)/(o+1.)+((-0.533768230149+0.0216413977951j))+((0.652770520264+0.692964573056j))*0.5**o
            arg[(0, 0, 3, 0)]=(-0.682736645359-0.106437097954j)*x[0]**o + ((0.630484326602+0.862625650978j))*x[0] + ((0.0843696747351+0.575913939321j))*x[1]**o + ((0.245458544471+0.193973683739j))*x[1]
            ref[(0, 0, 3, 0)]=(0.0843696747351+0.575913939321j)/(o+1.)+((0.437971435537+0.528299667359j))+((-0.682736645359-0.106437097954j))*0.5**o
            arg[(0, 0, 3, 1)]=(0.593874615129+0.934598929178j)*x[0]**o + ((0.115017497772+0.14329377019j))*x[0] + ((0.574599730052-0.218941658695j))*x[1]**o + ((0.0757203031454+0.398477679178j))*x[1]
            ref[(0, 0, 3, 1)]=(0.574599730052-0.218941658695j)/(o+1.)+((0.0953689004589+0.270885724684j))+((0.593874615129+0.934598929178j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.146127150905+0.344362474016j)*x[0]**o + ((0.105806901109-0.963294260831j))*x[0] + ((0.594105247255+0.868793755907j))*x[1]**o + ((-0.845158698623-0.950106435787j))*x[1]
            ref[(0, 1, 0, 0)]=(0.594105247255+0.868793755907j)/(o+1.)+((-0.369675898757-0.956700348309j))+((-0.146127150905+0.344362474016j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.0772025835448+0.65184549756j)*x[0]**o + ((-0.932628515299-0.97873866085j))*x[0] + ((-0.0329463802603-0.0383202083441j))*x[1]**o + ((-0.871512663762-0.570325187967j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.0329463802603-0.0383202083441j)/(o+1.)+((-0.902070589531-0.774531924409j))+((-0.0772025835448+0.65184549756j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.233208255115+0.120387500624j)*x[0]**o + ((0.60059203316+0.212290256746j))*x[0] + ((-0.844628391088+0.202230472876j))*x[1]**o + ((-0.67592105053-0.780300599465j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.844628391088+0.202230472876j)/(o+1.)+((-0.0376645086847-0.28400517136j))+((-0.233208255115+0.120387500624j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.777398603337+0.673104894149j)*x[0]**o + ((0.436834796212+0.64126742055j))*x[0] + ((-0.195443892424-0.389346186104j))*x[1]**o + ((-0.361950175961-0.553819701016j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.195443892424-0.389346186104j)/(o+1.)+((0.0374423101252+0.0437238597672j))+((0.777398603337+0.673104894149j))*0.5**o
            arg[(0, 1, 2, 0)]=(0.331785631707+0.0704442730099j)*x[0]**o + ((0.74737943312+0.225237458616j))*x[0] + ((-0.287280253991-0.83505246261j))*x[1]**o + ((0.0225148446807+0.725786573644j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.287280253991-0.83505246261j)/(o+1.)+((0.3849471389+0.47551201613j))+((0.331785631707+0.0704442730099j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.848067166186-0.912442246049j)*x[0]**o + ((0.0447481360071-0.793867127463j))*x[0] + ((-0.478446671691-0.654798255432j))*x[1]**o + ((0.901684811693-0.276919935059j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.478446671691-0.654798255432j)/(o+1.)+((0.47321647385-0.535393531261j))+((-0.848067166186-0.912442246049j))*0.5**o
            arg[(0, 1, 3, 0)]=(0.0901260342651+0.121980396829j)*x[0]**o + ((0.577105404218+0.569262896873j))*x[0] + ((0.99705394955+0.242896166097j))*x[1]**o + ((-0.464901081563-0.0266088255261j))*x[1]
            ref[(0, 1, 3, 0)]=(0.99705394955+0.242896166097j)/(o+1.)+((0.0561021613274+0.271327035674j))+((0.0901260342651+0.121980396829j))*0.5**o
            arg[(0, 1, 3, 1)]=(-0.0889962051093-0.649806253817j)*x[0]**o + ((-0.359186530115+0.103627733225j))*x[0] + ((-0.956368027915-0.655601731401j))*x[1]**o + ((0.739472590838-0.388222917052j))*x[1]
            ref[(0, 1, 3, 1)]=(-0.956368027915-0.655601731401j)/(o+1.)+((0.190143030361-0.142297591913j))+((-0.0889962051093-0.649806253817j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.592865091885-0.0396934109782j)*x[0]**o + ((-0.619173776616+0.0857383236656j))*x[0] + ((-0.769213015867+0.128290578399j))*x[1]**o + ((0.660344575423-0.94662376368j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.769213015867+0.128290578399j)/(o+1.)+((0.0205853994034-0.430442720007j))+((0.592865091885-0.0396934109782j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.607710033216+0.964876689927j)*x[0]**o + ((0.50706288257+0.264737164149j))*x[0] + ((-0.182429904706+0.347226990887j))*x[1]**o + ((-0.415025770693-0.330841623246j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.182429904706+0.347226990887j)/(o+1.)+((0.0460185559385-0.0330522295484j))+((-0.607710033216+0.964876689927j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.984639274325+0.562273061186j)*x[0]**o + ((0.462827944665-0.628289810707j))*x[0] + ((-0.139297794634-0.735160192284j))*x[1]**o + ((-0.187177081716-0.935485396172j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.139297794634-0.735160192284j)/(o+1.)+((0.137825431475-0.78188760344j))+((-0.984639274325+0.562273061186j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.471658789025+0.791017066183j)*x[0]**o + ((0.105337274109-0.914063290316j))*x[0] + ((0.743163489932-0.579742289155j))*x[1]**o + ((-0.916165886483+0.10906610272j))*x[1]
            ref[(1, 0, 1, 1)]=(0.743163489932-0.579742289155j)/(o+1.)+((-0.405414306187-0.402498593798j))+((0.471658789025+0.791017066183j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.711977628528-0.456232982868j)*x[0]**o + ((0.252733031916+0.230163304832j))*x[0] + ((-0.675359431946+0.241291785799j))*x[1]**o + ((0.157319014002+0.307138969109j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.675359431946+0.241291785799j)/(o+1.)+((0.205026022959+0.26865113697j))+((0.711977628528-0.456232982868j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.525803783467+0.63924516239j)*x[0]**o + ((-0.868581088097-0.060435375547j))*x[0] + ((0.519070998659+0.665010970435j))*x[1]**o + ((-0.800494333914+0.780168764405j))*x[1]
            ref[(1, 0, 2, 1)]=(0.519070998659+0.665010970435j)/(o+1.)+((-0.834537711006+0.359866694429j))+((0.525803783467+0.63924516239j))*0.5**o
            arg[(1, 0, 3, 0)]=(-0.70541383823-0.927948384831j)*x[0]**o + ((-0.223662291695-0.864461111048j))*x[0] + ((-0.603598562025+0.800051805249j))*x[1]**o + ((0.248599262198-0.386509652868j))*x[1]
            ref[(1, 0, 3, 0)]=(-0.603598562025+0.800051805249j)/(o+1.)+((0.0124684852515-0.625485381958j))+((-0.70541383823-0.927948384831j))*0.5**o
            arg[(1, 0, 3, 1)]=(0.504669163252-0.402087398948j)*x[0]**o + ((0.414264597725+0.170902945804j))*x[0] + ((-0.918390193074-0.115367231234j))*x[1]**o + ((0.972775537216+0.735076095998j))*x[1]
            ref[(1, 0, 3, 1)]=(-0.918390193074-0.115367231234j)/(o+1.)+((0.69352006747+0.452989520901j))+((0.504669163252-0.402087398948j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.223151998914+0.0670212853964j)*x[0]**o + ((-0.181582023339+0.732329520538j))*x[0] + ((0.469805629246+0.275691699865j))*x[1]**o + ((-0.508686466665-0.16158204712j))*x[1]
            ref[(1, 1, 0, 0)]=(0.469805629246+0.275691699865j)/(o+1.)+((-0.345134245002+0.285373736709j))+((0.223151998914+0.0670212853964j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.388358903984+0.350294955227j)*x[0]**o + ((0.337718322726-0.969799500025j))*x[0] + ((-0.528541463918-0.707875520856j))*x[1]**o + ((0.201942526297+0.921070056895j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.528541463918-0.707875520856j)/(o+1.)+((0.269830424511-0.0243647215652j))+((-0.388358903984+0.350294955227j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.106559401233-0.761041571588j)*x[0]**o + ((0.917298271212-0.944451827836j))*x[0] + ((0.884546245063+0.33771178843j))*x[1]**o + ((0.609115096545+0.855572554493j))*x[1]
            ref[(1, 1, 1, 0)]=(0.884546245063+0.33771178843j)/(o+1.)+((0.763206683878-0.0444396366712j))+((-0.106559401233-0.761041571588j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.0874251265338-0.99267702488j)*x[0]**o + ((-0.660285999293+0.583122872025j))*x[0] + ((0.566474280478-0.160442746611j))*x[1]**o + ((-0.291767493035-0.836808123011j))*x[1]
            ref[(1, 1, 1, 1)]=(0.566474280478-0.160442746611j)/(o+1.)+((-0.476026746164-0.126842625493j))+((-0.0874251265338-0.99267702488j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.118281501909+0.720430657111j)*x[0]**o + ((0.700932866923+0.618545184115j))*x[0] + ((0.775453954969+0.310265680789j))*x[1]**o + ((0.745926298414-0.629687370046j))*x[1]
            ref[(1, 1, 2, 0)]=(0.775453954969+0.310265680789j)/(o+1.)+((0.723429582669-0.00557109296559j))+((-0.118281501909+0.720430657111j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.637114606771+0.295243025199j)*x[0]**o + ((-0.953787838125+0.448937491415j))*x[0] + ((-0.0586595171073+0.641272824069j))*x[1]**o + ((-0.24014489115+0.887408923409j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.0586595171073+0.641272824069j)/(o+1.)+((-0.596966364638+0.668173207412j))+((-0.637114606771+0.295243025199j))*0.5**o
            arg[(1, 1, 3, 0)]=(0.874795601435+0.934691835168j)*x[0]**o + ((-0.452614664261-0.190669728277j))*x[0] + ((0.583936214301+0.0184052419589j))*x[1]**o + ((0.741000334325-0.282233984325j))*x[1]
            ref[(1, 1, 3, 0)]=(0.583936214301+0.0184052419589j)/(o+1.)+((0.144192835032-0.236451856301j))+((0.874795601435+0.934691835168j))*0.5**o
            arg[(1, 1, 3, 1)]=(-0.347342186065-0.840684635242j)*x[0]**o + ((0.797998896508-0.446891290009j))*x[0] + ((0.846718638389+0.964744012421j))*x[1]**o + ((0.243041799934-0.63054563575j))*x[1]
            ref[(1, 1, 3, 1)]=(0.846718638389+0.964744012421j)/(o+1.)+((0.520520348221-0.53871846288j))+((-0.347342186065-0.840684635242j))*0.5**o
            arg[(2, 0, 0, 0)]=(0.0911542459772+0.228191929757j)*x[0]**o + ((0.280214775844-0.419164736498j))*x[0] + ((-0.651578304481-0.368846269777j))*x[1]**o + ((-0.105362420429+0.832094081811j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.651578304481-0.368846269777j)/(o+1.)+((0.0874261777074+0.206464672656j))+((0.0911542459772+0.228191929757j))*0.5**o
            arg[(2, 0, 0, 1)]=(-0.975872571218-0.197710836909j)*x[0]**o + ((-0.635196978383-0.603863780025j))*x[0] + ((-0.42489295834+0.696079022908j))*x[1]**o + ((0.411030496-0.853518402263j))*x[1]
            ref[(2, 0, 0, 1)]=(-0.42489295834+0.696079022908j)/(o+1.)+((-0.112083241192-0.728691091144j))+((-0.975872571218-0.197710836909j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.753108317488-0.160616979473j)*x[0]**o + ((0.927645437266+0.806771214504j))*x[0] + ((-0.413623780925-0.153560875478j))*x[1]**o + ((-0.303066172244-0.839118907761j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.413623780925-0.153560875478j)/(o+1.)+((0.312289632511-0.0161738466283j))+((0.753108317488-0.160616979473j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.547375513215-0.339977288149j)*x[0]**o + ((-0.297557051813+0.468415682411j))*x[0] + ((0.184020146792+0.872137585043j))*x[1]**o + ((-0.204407443316+0.165468508155j))*x[1]
            ref[(2, 0, 1, 1)]=(0.184020146792+0.872137585043j)/(o+1.)+((-0.250982247564+0.316942095283j))+((-0.547375513215-0.339977288149j))*0.5**o
            arg[(2, 0, 2, 0)]=(-0.0848553788623+0.794860763107j)*x[0]**o + ((0.0500538526632-0.00864288885119j))*x[0] + ((0.0664169522916+0.353968188181j))*x[1]**o + ((-0.225593672419-0.883636473836j))*x[1]
            ref[(2, 0, 2, 0)]=(0.0664169522916+0.353968188181j)/(o+1.)+((-0.0877699098777-0.446139681343j))+((-0.0848553788623+0.794860763107j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.724092439547-0.521013223564j)*x[0]**o + ((-0.290199138293+0.898461921595j))*x[0] + ((0.912799915257-0.972307139551j))*x[1]**o + ((0.425951007316+0.377425512435j))*x[1]
            ref[(2, 0, 2, 1)]=(0.912799915257-0.972307139551j)/(o+1.)+((0.0678759345116+0.637943717015j))+((-0.724092439547-0.521013223564j))*0.5**o
            arg[(2, 0, 3, 0)]=(0.213307969025-0.293219676808j)*x[0]**o + ((0.287200682303-0.638143647928j))*x[0] + ((0.483501636586+0.841424525057j))*x[1]**o + ((-0.130580571747-0.0286785029137j))*x[1]
            ref[(2, 0, 3, 0)]=(0.483501636586+0.841424525057j)/(o+1.)+((0.0783100552779-0.333411075421j))+((0.213307969025-0.293219676808j))*0.5**o
            arg[(2, 0, 3, 1)]=(-0.161709070166-0.657690645693j)*x[0]**o + ((-0.40099095247-0.723110366647j))*x[0] + ((-0.457534310611+0.957422418221j))*x[1]**o + ((0.648418384702+0.787940141159j))*x[1]
            ref[(2, 0, 3, 1)]=(-0.457534310611+0.957422418221j)/(o+1.)+((0.123713716116+0.0324148872562j))+((-0.161709070166-0.657690645693j))*0.5**o
            arg[(2, 1, 0, 0)]=(0.0246209533573-0.547734166675j)*x[0]**o + ((0.824171058096-0.426209233109j))*x[0] + ((0.545153159047-0.202711844776j))*x[1]**o + ((0.587135299854-0.912195412248j))*x[1]
            ref[(2, 1, 0, 0)]=(0.545153159047-0.202711844776j)/(o+1.)+((0.705653178975-0.669202322678j))+((0.0246209533573-0.547734166675j))*0.5**o
            arg[(2, 1, 0, 1)]=(0.636516019431+0.242559091142j)*x[0]**o + ((-0.703312989006-0.870579437875j))*x[0] + ((-0.886424431376+0.558059098432j))*x[1]**o + ((0.164717160354-0.868380439922j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.886424431376+0.558059098432j)/(o+1.)+((-0.269297914326-0.869479938898j))+((0.636516019431+0.242559091142j))*0.5**o
            arg[(2, 1, 1, 0)]=(-0.920331301058-0.168453550888j)*x[0]**o + ((0.12949886845+0.0343456425892j))*x[0] + ((-0.194753160875+0.0237836559336j))*x[1]**o + ((-0.581963909145+0.251195369482j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.194753160875+0.0237836559336j)/(o+1.)+((-0.226232520347+0.142770506035j))+((-0.920331301058-0.168453550888j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.252157966928+0.342435305567j)*x[0]**o + ((0.686964583657+0.307863638349j))*x[0] + ((0.188170092818+0.932744095251j))*x[1]**o + ((-0.506970970148-0.57202450548j))*x[1]
            ref[(2, 1, 1, 1)]=(0.188170092818+0.932744095251j)/(o+1.)+((0.0899968067545-0.132080433565j))+((-0.252157966928+0.342435305567j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.851411489039+0.848060414862j)*x[0]**o + ((0.388784866646-0.450196189421j))*x[0] + ((-0.904504974275+0.765323627633j))*x[1]**o + ((0.275656602906-0.332839500878j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.904504974275+0.765323627633j)/(o+1.)+((0.332220734776-0.39151784515j))+((-0.851411489039+0.848060414862j))*0.5**o
            arg[(2, 1, 2, 1)]=(-0.152111357765-0.678953527992j)*x[0]**o + ((0.544399935482+0.0546640329045j))*x[0] + ((0.713180315921+0.239806469243j))*x[1]**o + ((-0.12171686832+0.135887500297j))*x[1]
            ref[(2, 1, 2, 1)]=(0.713180315921+0.239806469243j)/(o+1.)+((0.211341533581+0.0952757666006j))+((-0.152111357765-0.678953527992j))*0.5**o
            arg[(2, 1, 3, 0)]=(-0.111710611361+0.473215021383j)*x[0]**o + ((-0.567037856935+0.993825441648j))*x[0] + ((-0.252890723906-0.940010944416j))*x[1]**o + ((-0.236234092596-0.559766663504j))*x[1]
            ref[(2, 1, 3, 0)]=(-0.252890723906-0.940010944416j)/(o+1.)+((-0.401635974765+0.217029389072j))+((-0.111710611361+0.473215021383j))*0.5**o
            arg[(2, 1, 3, 1)]=(-0.634087609974-0.408316265226j)*x[0]**o + ((0.185960305349+0.0762544671492j))*x[0] + ((-0.823377803713+0.505031611906j))*x[1]**o + ((-0.747674350797+0.318965551172j))*x[1]
            ref[(2, 1, 3, 1)]=(-0.823377803713+0.505031611906j)/(o+1.)+((-0.280857022724+0.197610009161j))+((-0.634087609974-0.408316265226j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.899218801395+0.797863864057j)*x[0]**o + ((-0.939357740286+0.82955571768j))*x[0] + ((-0.165115113629+0.494505006564j))*x[1]**o + ((0.771396850835+0.821240151595j))*x[1] + ((-0.662041791782-0.58471090067j))*x[2]**o + ((-0.11043307836-0.830934209429j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.82715690541-0.0902058941059j)/(o+1.)+((-0.139196983905+0.409930829923j))+((0.899218801395+0.797863864057j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.476195039796-0.100493407665j)*x[0]**o + ((0.376785125668-0.127076956268j))*x[0] + ((0.907409657408-0.417748827584j))*x[1]**o + ((0.410577896447+0.291517061908j))*x[1] + ((0.710082897897+0.88945732765j))*x[2]**o + ((-0.056491357551+0.0240263668295j))*x[2]
            ref[(0, 0, 0, 1)]=(1.61749255531+0.471708500066j)/(o+1.)+((0.365435832282+0.0942332362349j))+((-0.476195039796-0.100493407665j))*0.5**o
            arg[(0, 0, 1, 0)]=(-0.17895837821+0.50058765466j)*x[0]**o + ((-0.52144121181+0.347398640739j))*x[0] + ((0.243214087083+0.398363257565j))*x[1]**o + ((-0.932174034982+0.855913591941j))*x[1] + ((0.683402528905+0.882151160125j))*x[2]**o + ((0.688852545828+0.958656074191j))*x[2]
            ref[(0, 0, 1, 0)]=(0.926616615987+1.28051441769j)/(o+1.)+((-0.382381350482+1.08098415344j))+((-0.17895837821+0.50058765466j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.176877735442+0.928007570385j)*x[0]**o + ((0.263585040523+0.976053367783j))*x[0] + ((-0.773994404457+0.613893893j))*x[1]**o + ((0.946615685146-0.542647112965j))*x[1] + ((-0.110064759537+0.151371426405j))*x[2]**o + ((0.20928598604-0.807104395211j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.884059163994+0.765265319406j)/(o+1.)+((0.709743355855-0.186849070197j))+((0.176877735442+0.928007570385j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.481399510782+0.348891257236j)*x[0]**o + ((0.920116300719-0.837905064098j))*x[0] + ((0.413924024029+0.098690746471j))*x[1]**o + ((-0.321411228596+0.293776485272j))*x[1] + ((-0.22232906028-0.687529182733j))*x[2]**o + ((0.0549197110993+0.670617570598j))*x[2]
            ref[(0, 0, 2, 0)]=(0.19159496375-0.588838436262j)/(o+1.)+((0.326812391611+0.0632444958858j))+((0.481399510782+0.348891257236j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.25722848652-0.0731513869989j)*x[0]**o + ((0.221217179024+0.746672946736j))*x[0] + ((0.916533379824+0.131909773917j))*x[1]**o + ((-0.313856907224+0.0377519645756j))*x[1] + ((-0.911043713715-0.810846521776j))*x[2]**o + ((0.53377843929+0.256559105398j))*x[2]
            ref[(0, 0, 2, 1)]=(0.00548966610948-0.678936747859j)/(o+1.)+((0.220569355545+0.520492008354j))+((0.25722848652-0.0731513869989j))*0.5**o
            arg[(0, 0, 3, 0)]=(-0.606111264479+0.418162870508j)*x[0]**o + ((0.275803080303+0.00693021509691j))*x[0] + ((0.169150127725-0.228347510883j))*x[1]**o + ((0.643030124322+0.189805379212j))*x[1] + ((0.245189134671-0.973363601571j))*x[2]**o + ((-0.808745892868-0.0574528488907j))*x[2]
            ref[(0, 0, 3, 0)]=(0.414339262396-1.20171111245j)/(o+1.)+((0.055043655878+0.0696413727092j))+((-0.606111264479+0.418162870508j))*0.5**o
            arg[(0, 0, 3, 1)]=(0.809206332763-0.61890846241j)*x[0]**o + ((0.228355648551+0.17201296969j))*x[0] + ((-0.210141392703-0.0218015412473j))*x[1]**o + ((0.00713222515768-0.572572779171j))*x[1] + ((-0.0252935041585-0.311518318078j))*x[2]**o + ((-0.0895392330182-0.331495468683j))*x[2]
            ref[(0, 0, 3, 1)]=(-0.235434896862-0.333319859326j)/(o+1.)+((0.0729743203451-0.366027639082j))+((0.809206332763-0.61890846241j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.855926705745+0.818338052338j)*x[0]**o + ((0.00861859993027+0.385145643857j))*x[0] + ((-0.46311347181-0.603421313842j))*x[1]**o + ((-0.526880863463-0.600882895754j))*x[1] + ((0.330935724722-0.0580433864448j))*x[2]**o + ((0.127221932909+0.205058157905j))*x[2]
            ref[(0, 1, 0, 0)]=(-0.132177747088-0.661464700287j)/(o+1.)+((-0.195520165312-0.00533954699588j))+((-0.855926705745+0.818338052338j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.910099264808-0.541185308627j)*x[0]**o + ((-0.861151486277-0.777150372813j))*x[0] + ((-0.450211342435+0.369359930858j))*x[1]**o + ((-0.261162368063-0.194249240586j))*x[1] + ((0.57404822668+0.495975579311j))*x[2]**o + ((-0.502040828257+0.969607161593j))*x[2]
            ref[(0, 1, 0, 1)]=(0.123836884245+0.865335510169j)/(o+1.)+((-0.812177341298-0.000896225903123j))+((-0.910099264808-0.541185308627j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.669735848842+0.676777833717j)*x[0]**o + ((0.0293081210909-0.00272457025422j))*x[0] + ((-0.544618336837+0.937854356873j))*x[1]**o + ((0.368893363867-0.347284645761j))*x[1] + ((-0.895997505474-0.319986239648j))*x[2]**o + ((0.454975873243+0.737443340404j))*x[2]
            ref[(0, 1, 1, 0)]=(-1.44061584231+0.617868117226j)/(o+1.)+((0.426588679101+0.193717062194j))+((-0.669735848842+0.676777833717j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.00611550230959-0.304727427782j)*x[0]**o + ((0.0968236595071+0.651975140847j))*x[0] + ((-0.380363883228-0.635887333569j))*x[1]**o + ((-0.421162365944-0.562802689496j))*x[1] + ((-0.871059572357+0.531694610817j))*x[2]**o + ((0.148862322447+0.684015735152j))*x[2]
            ref[(0, 1, 1, 1)]=(-1.25142345558-0.104192722752j)/(o+1.)+((-0.0877381919947+0.386594093251j))+((-0.00611550230959-0.304727427782j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.780096773992+0.642851232985j)*x[0]**o + ((0.691911820113-0.209654265222j))*x[0] + ((-0.74887775761+0.994726521703j))*x[1]**o + ((-0.343072060916+0.242737063844j))*x[1] + ((0.948447740895+0.270545209053j))*x[2]**o + ((0.822474806069-0.66084230907j))*x[2]
            ref[(0, 1, 2, 0)]=(0.199569983286+1.26527173076j)/(o+1.)+((0.585657282633-0.313879755224j))+((-0.780096773992+0.642851232985j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.532010524388-0.56935365236j)*x[0]**o + ((-0.182295409516+0.577548936088j))*x[0] + ((-0.00773922018131+0.293849428941j))*x[1]**o + ((0.650157602276-0.694208033713j))*x[1] + ((0.377787238078+0.148546501009j))*x[2]**o + ((0.153338882747-0.381279729538j))*x[2]
            ref[(0, 1, 2, 1)]=(0.370048017896+0.442395929951j)/(o+1.)+((0.310600537753-0.248969413582j))+((0.532010524388-0.56935365236j))*0.5**o
            arg[(0, 1, 3, 0)]=(0.0311111230175-0.910794207807j)*x[0]**o + ((0.117811753139-0.115169448773j))*x[0] + ((-0.538022815069-0.304239417779j))*x[1]**o + ((-0.580152969099-0.0788280007491j))*x[1] + ((-0.0782466049467+0.159070777395j))*x[2]**o + ((0.317386768985+0.339692914836j))*x[2]
            ref[(0, 1, 3, 0)]=(-0.616269420015-0.145168640384j)/(o+1.)+((-0.0724772234876+0.0728477326568j))+((0.0311111230175-0.910794207807j))*0.5**o
            arg[(0, 1, 3, 1)]=(0.531038412503+0.188085218974j)*x[0]**o + ((0.294255697053-0.598155112393j))*x[0] + ((0.76589923388-0.645185729328j))*x[1]**o + ((-0.461564763262-0.3191646009j))*x[1] + ((-0.748005573784+0.480248189004j))*x[2]**o + ((-0.49903727066-0.148083980795j))*x[2]
            ref[(0, 1, 3, 1)]=(0.0178936600963-0.164937540324j)/(o+1.)+((-0.333173168434-0.532701847044j))+((0.531038412503+0.188085218974j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.350170781362-0.672483404661j)*x[0]**o + ((0.0279693550639+0.167073186868j))*x[0] + ((-0.997316389215+0.631195523895j))*x[1]**o + ((-0.878027176237-0.700784864781j))*x[1] + ((0.274815491119+0.344449097399j))*x[2]**o + ((0.188677319785+0.975606252925j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.722500898096+0.975644621294j)/(o+1.)+((-0.330690250694+0.220947287506j))+((-0.350170781362-0.672483404661j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.216332425264-0.110368397454j)*x[0]**o + ((0.880071302138-0.630274852664j))*x[0] + ((0.81046180879+0.0306902861094j))*x[1]**o + ((-0.185959253775-0.607867196219j))*x[1] + ((0.443071837894-0.0236093823503j))*x[2]**o + ((-0.258053059525+0.958778874752j))*x[2]
            ref[(1, 0, 0, 1)]=(1.25353364668+0.00708090375904j)/(o+1.)+((0.218029494419-0.139681587065j))+((0.216332425264-0.110368397454j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.838885654794+0.459424455361j)*x[0]**o + ((-0.0110600895902-0.591342020276j))*x[0] + ((-0.439636649918-0.423325318332j))*x[1]**o + ((0.317236764618-0.971997527728j))*x[1] + ((0.601574352694-0.884854560516j))*x[2]**o + ((-0.2312070122-0.958009403318j))*x[2]
            ref[(1, 0, 1, 0)]=(0.161937702776-1.30817987885j)/(o+1.)+((0.037484831414-1.26067447566j))+((0.838885654794+0.459424455361j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.67756621985+0.848157777111j)*x[0]**o + ((-0.879661823887-0.0506411625697j))*x[0] + ((0.651755457898+0.347996359963j))*x[1]**o + ((0.435132632578+0.839807749016j))*x[1] + ((0.297019617705+0.14126446892j))*x[2]**o + ((0.782239328369+0.883835117052j))*x[2]
            ref[(1, 0, 1, 1)]=(0.948775075603+0.489260828883j)/(o+1.)+((0.16885506853+0.836500851749j))+((-0.67756621985+0.848157777111j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.517500899499-0.909949904642j)*x[0]**o + ((-0.265174517414-0.981178777527j))*x[0] + ((0.333248209202+0.330136482043j))*x[1]**o + ((0.0461534519958-0.572318490824j))*x[1] + ((-0.844149103125-0.512080858737j))*x[2]**o + ((-0.0319235205538+0.172678174774j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.510900893924-0.181944376694j)/(o+1.)+((-0.125472292986-0.690409546789j))+((-0.517500899499-0.909949904642j))*0.5**o
            arg[(1, 0, 2, 1)]=(-0.593879517685-0.63729890162j)*x[0]**o + ((0.409790584406+0.928032259233j))*x[0] + ((0.847092367707+0.129123915143j))*x[1]**o + ((0.181417700218-0.373463194687j))*x[1] + ((-0.0855258609124-0.313039848634j))*x[2]**o + ((-0.130563719376+0.90992471068j))*x[2]
            ref[(1, 0, 2, 1)]=(0.761566506794-0.183915933491j)/(o+1.)+((0.230322282624+0.732246887613j))+((-0.593879517685-0.63729890162j))*0.5**o
            arg[(1, 0, 3, 0)]=(0.177909574737-0.521733373745j)*x[0]**o + ((-0.874341569878+0.707230006165j))*x[0] + ((-0.831114170433-0.624867407741j))*x[1]**o + ((-0.185726258291+0.864360911451j))*x[1] + ((0.160153876198+0.87171360818j))*x[2]**o + ((-0.682346739325-0.14226805925j))*x[2]
            ref[(1, 0, 3, 0)]=(-0.670960294234+0.246846200438j)/(o+1.)+((-0.871207283747+0.714661429183j))+((0.177909574737-0.521733373745j))*0.5**o
            arg[(1, 0, 3, 1)]=(0.908264448825-0.919085506262j)*x[0]**o + ((0.349467960714-0.574304491714j))*x[0] + ((-0.358578768865-0.357937473392j))*x[1]**o + ((-0.853833164685+0.923009993979j))*x[1] + ((0.711512035239-0.396834220837j))*x[2]**o + ((0.32124170336-0.258348363779j))*x[2]
            ref[(1, 0, 3, 1)]=(0.352933266375-0.754771694229j)/(o+1.)+((-0.0915617503058+0.0451785692428j))+((0.908264448825-0.919085506262j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.475777506297-0.848362723005j)*x[0]**o + ((0.039660458485-0.403001962261j))*x[0] + ((0.50785189785-0.973006244007j))*x[1]**o + ((0.604950812217+0.980591477939j))*x[1] + ((0.274368204539-0.37979059741j))*x[2]**o + ((-0.101781311186-0.175958095402j))*x[2]
            ref[(1, 1, 0, 0)]=(0.782220102389-1.35279684142j)/(o+1.)+((0.271414979758+0.200815710139j))+((-0.475777506297-0.848362723005j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.664633595106-0.084925842907j)*x[0]**o + ((-0.865526215501+0.410876274906j))*x[0] + ((-0.0280068235531-0.306053866077j))*x[1]**o + ((0.916609306941+0.437496562229j))*x[1] + ((0.926598703666+0.427157965567j))*x[2]**o + ((0.955458610138-0.444834968388j))*x[2]
            ref[(1, 1, 0, 1)]=(0.898591880113+0.12110409949j)/(o+1.)+((0.503270850789+0.201768934374j))+((-0.664633595106-0.084925842907j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.378032402265-0.0820073558023j)*x[0]**o + ((0.0972661199714+0.855038316268j))*x[0] + ((-0.54542364237-0.345281139106j))*x[1]**o + ((-0.8838336566-0.305680312462j))*x[1] + ((0.949567917929+0.24082505974j))*x[2]**o + ((-0.062047025993+0.705360604305j))*x[2]
            ref[(1, 1, 1, 0)]=(0.404144275559-0.104456079367j)/(o+1.)+((-0.424307281311+0.627359304056j))+((0.378032402265-0.0820073558023j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.228400633746+0.585508113297j)*x[0]**o + ((-0.708738061838-0.619779144706j))*x[0] + ((0.620801886207-0.827142524384j))*x[1]**o + ((0.80529533038+0.196552762396j))*x[1] + ((0.109111524332-0.229430499639j))*x[2]**o + ((-0.631806577667+0.163528576114j))*x[2]
            ref[(1, 1, 1, 1)]=(0.729913410539-1.05657302402j)/(o+1.)+((-0.267624654562-0.129848903098j))+((0.228400633746+0.585508113297j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.857223783235+0.257109326088j)*x[0]**o + ((-0.5979464501+0.893395616141j))*x[0] + ((0.805257170644-0.499982651647j))*x[1]**o + ((0.690103736636-0.151438187081j))*x[1] + ((-0.13319164173-0.61403714634j))*x[2]**o + ((-0.819882843542+0.334966188662j))*x[2]
            ref[(1, 1, 2, 0)]=(0.672065528914-1.11401979799j)/(o+1.)+((-0.363862778503+0.538461808861j))+((0.857223783235+0.257109326088j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.0612440417275-0.765375365245j)*x[0]**o + ((-0.173542508465+0.470735121532j))*x[0] + ((0.642481236749+0.560907167327j))*x[1]**o + ((-0.991703115722+0.668199019304j))*x[1] + ((-0.0561475090924-0.497059658882j))*x[2]**o + ((0.838611296949+0.892466822658j))*x[2]
            ref[(1, 1, 2, 1)]=(0.586333727656+0.0638475084446j)/(o+1.)+((-0.163317163619+1.01570048175j))+((0.0612440417275-0.765375365245j))*0.5**o
            arg[(1, 1, 3, 0)]=(0.978777189813-0.557248516608j)*x[0]**o + ((0.297549356643-0.746930978725j))*x[0] + ((0.577332431674+0.567236788862j))*x[1]**o + ((0.51333175933+0.506307992958j))*x[1] + ((-0.349956015866-0.242516899126j))*x[2]**o + ((0.845462518162+0.777121228169j))*x[2]
            ref[(1, 1, 3, 0)]=(0.227376415808+0.324719889737j)/(o+1.)+((0.828171817068+0.268249121201j))+((0.978777189813-0.557248516608j))*0.5**o
            arg[(1, 1, 3, 1)]=(-0.289368871071+0.34039400635j)*x[0]**o + ((0.234016351505-0.499192943863j))*x[0] + ((-0.0272795419983-0.24244152796j))*x[1]**o + ((-0.965316459065-0.0539360444699j))*x[1] + ((0.141549068359-0.211382737659j))*x[2]**o + ((0.760608149688+0.16194905836j))*x[2]
            ref[(1, 1, 3, 1)]=(0.11426952636-0.453824265618j)/(o+1.)+((0.0146540210642-0.195589964986j))+((-0.289368871071+0.34039400635j))*0.5**o
            arg[(2, 0, 0, 0)]=(-0.36557766721+0.726243223643j)*x[0]**o + ((-0.980012177266-0.186542247401j))*x[0] + ((-0.545291716034+0.140096589258j))*x[1]**o + ((-0.859988462329-0.358352916702j))*x[1] + ((0.312617832506-0.133160363745j))*x[2]**o + ((-0.540081927969+0.625900335926j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.232673883528+0.00693622551267j)/(o+1.)+((-1.19004128378+0.0405025859116j))+((-0.36557766721+0.726243223643j))*0.5**o
            arg[(2, 0, 0, 1)]=(0.707564327244+0.620960446103j)*x[0]**o + ((0.0023715209372+0.589910645884j))*x[0] + ((0.589905629186+0.77273698134j))*x[1]**o + ((-0.789105649214-0.512817627601j))*x[1] + ((0.937774936743+0.531843375952j))*x[2]**o + ((0.829515124862+0.465831795083j))*x[2]
            ref[(2, 0, 0, 1)]=(1.52768056593+1.30458035729j)/(o+1.)+((0.0213904982926+0.271462406683j))+((0.707564327244+0.620960446103j))*0.5**o
            arg[(2, 0, 1, 0)]=(0.92426418947+0.728506642936j)*x[0]**o + ((-0.0339491314106+0.364968998935j))*x[0] + ((0.916686548456-0.53365422065j))*x[1]**o + ((0.112498048598+0.194736309942j))*x[1] + ((0.454016232353+0.922893920903j))*x[2]**o + ((-0.888496133888-0.285892866635j))*x[2]
            ref[(2, 0, 1, 0)]=(1.37070278081+0.389239700254j)/(o+1.)+((-0.40497360835+0.136906221121j))+((0.92426418947+0.728506642936j))*0.5**o
            arg[(2, 0, 1, 1)]=(-0.17989150863-0.515326642277j)*x[0]**o + ((0.245722361388+0.638546804737j))*x[0] + ((0.0255750968788-0.397255358163j))*x[1]**o + ((-0.106430854817+0.615834652315j))*x[1] + ((0.0017548345648+0.507999872776j))*x[2]**o + ((0.911906332396-0.677043479406j))*x[2]
            ref[(2, 0, 1, 1)]=(0.0273299314436+0.110744514613j)/(o+1.)+((0.525598919484+0.288668988823j))+((-0.17989150863-0.515326642277j))*0.5**o
            arg[(2, 0, 2, 0)]=(0.627909776067-0.28583127453j)*x[0]**o + ((0.78542835972+0.0285214292501j))*x[0] + ((0.0554672817994-0.415927542111j))*x[1]**o + ((-0.428728179086-0.360963627781j))*x[1] + ((-0.182599079356-0.676504883319j))*x[2]**o + ((-0.223577135062+0.477536544685j))*x[2]
            ref[(2, 0, 2, 0)]=(-0.127131797557-1.09243242543j)/(o+1.)+((0.0665615227857+0.0725471730768j))+((0.627909776067-0.28583127453j))*0.5**o
            arg[(2, 0, 2, 1)]=(-0.644864347697-0.0904537881231j)*x[0]**o + ((0.895085555527+0.169025240795j))*x[0] + ((-0.645525068684-0.6176674955j))*x[1]**o + ((0.506650044953+0.043129089174j))*x[1] + ((0.844008848587-0.439321907718j))*x[2]**o + ((-0.174943876046+0.123907433474j))*x[2]
            ref[(2, 0, 2, 1)]=(0.198483779904-1.05698940322j)/(o+1.)+((0.613395862217+0.168030881722j))+((-0.644864347697-0.0904537881231j))*0.5**o
            arg[(2, 0, 3, 0)]=(-0.200798467539+0.868718353294j)*x[0]**o + ((-0.102015111706+0.727210120617j))*x[0] + ((-0.604387322176+0.885519957067j))*x[1]**o + ((-0.61191684976+0.423588264895j))*x[1] + ((0.0626580499995+0.881170455926j))*x[2]**o + ((0.877930279637+0.61396018608j))*x[2]
            ref[(2, 0, 3, 0)]=(-0.541729272177+1.76669041299j)/(o+1.)+((0.0819991590854+0.882379285796j))+((-0.200798467539+0.868718353294j))*0.5**o
            arg[(2, 0, 3, 1)]=(0.569901849797-0.746360922296j)*x[0]**o + ((-0.598949431966+0.779760463358j))*x[0] + ((-0.514926271913+0.115013815272j))*x[1]**o + ((-0.626247317013-0.42189709607j))*x[1] + ((0.255982219555-0.103415233533j))*x[2]**o + ((0.65752227007-0.291052881941j))*x[2]
            ref[(2, 0, 3, 1)]=(-0.258944052358+0.0115985817392j)/(o+1.)+((-0.283837239455+0.0334052426735j))+((0.569901849797-0.746360922296j))*0.5**o
            arg[(2, 1, 0, 0)]=(-0.753989987171-0.753612813719j)*x[0]**o + ((-0.718056375292-0.18867507014j))*x[0] + ((0.430676049124-0.9225602644j))*x[1]**o + ((0.280872015833+0.0914384440209j))*x[1] + ((-0.376309568433+0.233992784301j))*x[2]**o + ((-0.738760875808+0.970946713946j))*x[2]
            ref[(2, 1, 0, 0)]=(0.054366480691-0.688567480098j)/(o+1.)+((-0.587972617634+0.436855043913j))+((-0.753989987171-0.753612813719j))*0.5**o
            arg[(2, 1, 0, 1)]=(0.213105501056+0.547715174437j)*x[0]**o + ((0.719698427554-0.132601811083j))*x[0] + ((0.424064550452-0.872268261808j))*x[1]**o + ((0.761416906636+0.347500765634j))*x[1] + ((-0.80396807683-0.410497420938j))*x[2]**o + ((0.207934685428-0.60896900216j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.379903526377-1.28276568275j)/(o+1.)+((0.844525009809-0.197035023804j))+((0.213105501056+0.547715174437j))*0.5**o
            arg[(2, 1, 1, 0)]=(0.145234527727-0.499113933806j)*x[0]**o + ((-0.53926071957-0.0802217119237j))*x[0] + ((-0.697225948606-0.880975536384j))*x[1]**o + ((0.124725591539+0.781781601235j))*x[1] + ((-0.139192538453-0.447376887637j))*x[2]**o + ((-0.801142348243-0.445734569025j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.836418487058-1.32835242402j)/(o+1.)+((-0.607838738137+0.127912660143j))+((0.145234527727-0.499113933806j))*0.5**o
            arg[(2, 1, 1, 1)]=(-0.186506802607+0.44943266959j)*x[0]**o + ((-0.209073053884+0.404950613782j))*x[0] + ((0.960215619444+0.263386417814j))*x[1]**o + ((0.806694954989-0.824366998937j))*x[1] + ((-0.721289268837+0.614968780634j))*x[2]**o + ((0.0179166501354-0.67491055877j))*x[2]
            ref[(2, 1, 1, 1)]=(0.238926350607+0.878355198448j)/(o+1.)+((0.30776927562-0.547163471963j))+((-0.186506802607+0.44943266959j))*0.5**o
            arg[(2, 1, 2, 0)]=(-0.123229625064+0.996452442065j)*x[0]**o + ((0.240826242159+0.0998740193965j))*x[0] + ((-0.716054394565-0.193055102601j))*x[1]**o + ((0.890492507876-0.609136321705j))*x[1] + ((-0.740702683084+0.0366840917555j))*x[2]**o + ((0.381758034116-0.796522648262j))*x[2]
            ref[(2, 1, 2, 0)]=(-1.45675707765-0.156371010845j)/(o+1.)+((0.756538392075-0.652892475285j))+((-0.123229625064+0.996452442065j))*0.5**o
            arg[(2, 1, 2, 1)]=(0.705998634411+0.232646507737j)*x[0]**o + ((-0.508574178984+0.25546494064j))*x[0] + ((-0.724274214064-0.197444341817j))*x[1]**o + ((-0.110398769158+0.27579392634j))*x[1] + ((0.80631675577+0.76312094031j))*x[2]**o + ((0.41119428386+0.944821922923j))*x[2]
            ref[(2, 1, 2, 1)]=(0.0820425417055+0.565676598493j)/(o+1.)+((-0.103889332141+0.738040394952j))+((0.705998634411+0.232646507737j))*0.5**o
            arg[(2, 1, 3, 0)]=(0.836176425434-0.357135981474j)*x[0]**o + ((-0.313536075543-0.0956727056991j))*x[0] + ((0.363614295512+0.303281779277j))*x[1]**o + ((-0.297123579617-0.645918344498j))*x[1] + ((-0.644135377227-0.811654001859j))*x[2]**o + ((-0.286292237861-0.467617805461j))*x[2]
            ref[(2, 1, 3, 0)]=(-0.280521081715-0.508372222582j)/(o+1.)+((-0.44847594651-0.604604427829j))+((0.836176425434-0.357135981474j))*0.5**o
            arg[(2, 1, 3, 1)]=(0.423640668173-0.591250686378j)*x[0]**o + ((0.794809469538+0.825200324466j))*x[0] + ((0.128094870333-0.540600112321j))*x[1]**o + ((-0.125302193902-0.0293229536091j))*x[1] + ((-0.0148097515154-0.952719638151j))*x[2]**o + ((-0.601753650335-0.377592259094j))*x[2]
            ref[(2, 1, 3, 1)]=(0.113285118818-1.49331975047j)/(o+1.)+((0.0338768126507+0.209142555882j))+((0.423640668173-0.591250686378j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.600344515422-0.589223771247j)*x[0]**o + ((0.204471363528-0.869776341149j))*x[0] + ((0.821932523762-0.764317108151j))*x[1]**o + ((0.099918269925+0.94781103898j))*x[1]
            ref=(0.821932523762-0.764317108151j)/(o+1.)+((0.152194816726+0.0390173489154j))+((0.600344515422-0.589223771247j))*0.5**o
        else:
            arg=(0.128497626491+0.856143342976j)*x[0]**o + ((0.54619758841-0.20222205468j))*x[0] + ((-0.766044580705+0.0653909181939j))*x[1]**o + ((-0.580186053078+0.695469744725j))*x[1] + ((0.151305250675-0.225499022217j))*x[2]**o + ((0.508197442536+0.450500808507j))*x[2]
            ref=(-0.61473933003-0.160108104023j)/(o+1.)+((0.237104488934+0.471874249276j))+((0.128497626491+0.856143342976j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.995328926572+0.446320757626j)*x[0]**o + ((0.71421447713-0.822306225615j))*x[0] + ((0.460908668693+0.891147028858j))*x[1]**o + ((0.159901490435-0.73058256446j))*x[1]
            ref[(0,)]=(0.460908668693+0.891147028858j)/(o+1.)+((0.437057983782-0.776444395037j))+((0.995328926572+0.446320757626j))*0.5**o
            arg[(1,)]=(0.106997500007-0.0780044096819j)*x[0]**o + ((-0.182040815394+0.0559164756361j))*x[0] + ((0.994090488916+0.998597825313j))*x[1]**o + ((0.520155060447-0.845496978685j))*x[1]
            ref[(1,)]=(0.994090488916+0.998597825313j)/(o+1.)+((0.169057122527-0.394790251524j))+((0.106997500007-0.0780044096819j))*0.5**o
            arg[(2,)]=(-0.115580621663+0.628438431775j)*x[0]**o + ((-0.636668007263-0.342381980554j))*x[0] + ((0.785360809642-0.334602072648j))*x[1]**o + ((-0.18341050638+0.485179051709j))*x[1]
            ref[(2,)]=(0.785360809642-0.334602072648j)/(o+1.)+((-0.410039256822+0.0713985355778j))+((-0.115580621663+0.628438431775j))*0.5**o
        else:
            arg[(0,)]=(0.182487376295+0.952649781062j)*x[0]**o + ((-0.19460311777+0.0113280702863j))*x[0] + ((-0.00813050615797-0.33765472923j))*x[1]**o + ((0.641669836466+0.734588253427j))*x[1] + ((-0.037703565777-0.747081746405j))*x[2]**o + ((0.0430989772719-0.096340196236j))*x[2]
            ref[(0,)]=(-0.045834071935-1.08473647564j)/(o+1.)+((0.245082847984+0.324788063739j))+((0.182487376295+0.952649781062j))*0.5**o
            arg[(1,)]=(-0.816324377919+0.521319633808j)*x[0]**o + ((0.621887581933-0.825612528446j))*x[0] + ((0.0527928243101-0.539579221842j))*x[1]**o + ((-0.67025958609+0.272684035126j))*x[1] + ((-0.726177734073+0.626961946702j))*x[2]**o + ((0.515795346457-0.892138566463j))*x[2]
            ref[(1,)]=(-0.673384909763+0.0873827248601j)/(o+1.)+((0.23371167115-0.722533529891j))+((-0.816324377919+0.521319633808j))*0.5**o
            arg[(2,)]=(-0.734192592963+0.174682137108j)*x[0]**o + ((0.245311307377-0.917846326394j))*x[0] + ((-0.677330529605-0.497706106676j))*x[1]**o + ((0.616773278699+0.350311032599j))*x[1] + ((0.00424158496459+0.950311246469j))*x[2]**o + ((-0.40695855969-0.964231203379j))*x[2]
            ref[(2,)]=(-0.67308894464+0.452605139793j)/(o+1.)+((0.227563013193-0.765883248586j))+((-0.734192592963+0.174682137108j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.665939069782+0.633290200142j)*x[0]**o + ((0.305279178107-0.787864937749j))*x[0] + ((-0.0182036018859+0.69160472026j))*x[1]**o + ((-0.794547653109+0.154875858461j))*x[1]
            ref[(0, 0)]=(-0.0182036018859+0.69160472026j)/(o+1.)+((-0.244634237501-0.316494539644j))+((-0.665939069782+0.633290200142j))*0.5**o
            arg[(0, 1)]=(0.635220142301-0.87845353429j)*x[0]**o + ((-0.98493259476-0.035190096186j))*x[0] + ((0.798370188739+0.228008540594j))*x[1]**o + ((-0.161557396916-0.339504871319j))*x[1]
            ref[(0, 1)]=(0.798370188739+0.228008540594j)/(o+1.)+((-0.573244995838-0.187347483752j))+((0.635220142301-0.87845353429j))*0.5**o
            arg[(1, 0)]=(-0.838222168518+0.957484885957j)*x[0]**o + ((-0.181535801347+0.404193063328j))*x[0] + ((-0.626017087845-0.728619364645j))*x[1]**o + ((-0.450141731702+0.220551562959j))*x[1]
            ref[(1, 0)]=(-0.626017087845-0.728619364645j)/(o+1.)+((-0.315838766525+0.312372313143j))+((-0.838222168518+0.957484885957j))*0.5**o
            arg[(1, 1)]=(-0.330563211848-0.422417804968j)*x[0]**o + ((-0.218222850838+0.547099146618j))*x[0] + ((0.337011098969+0.306518077933j))*x[1]**o + ((0.451008695104+0.0495665661341j))*x[1]
            ref[(1, 1)]=(0.337011098969+0.306518077933j)/(o+1.)+((0.116392922133+0.298332856376j))+((-0.330563211848-0.422417804968j))*0.5**o
            arg[(2, 0)]=(0.125888476829+0.6615270886j)*x[0]**o + ((0.121730897476-0.671794621812j))*x[0] + ((0.373295302759-0.430061848431j))*x[1]**o + ((0.935714235902-0.848324596528j))*x[1]
            ref[(2, 0)]=(0.373295302759-0.430061848431j)/(o+1.)+((0.528722566689-0.76005960917j))+((0.125888476829+0.6615270886j))*0.5**o
            arg[(2, 1)]=(0.411580765495+0.143142426343j)*x[0]**o + ((0.676845931523+0.736017530147j))*x[0] + ((-0.330782809061-0.529369265523j))*x[1]**o + ((-0.462522860504-0.0212083583065j))*x[1]
            ref[(2, 1)]=(-0.330782809061-0.529369265523j)/(o+1.)+((0.107161535509+0.35740458592j))+((0.411580765495+0.143142426343j))*0.5**o
        else:
            arg[(0, 0)]=(-0.744353710538+0.723397153789j)*x[0]**o + ((0.288936726217+0.504864966747j))*x[0] + ((-0.230838817762+0.247012297187j))*x[1]**o + ((0.45941114585+0.652022560999j))*x[1] + ((0.386479179695+0.780469070277j))*x[2]**o + ((0.175820575482-0.454475482195j))*x[2]
            ref[(0, 0)]=(0.155640361933+1.02748136746j)/(o+1.)+((0.462084223774+0.351206022775j))+((-0.744353710538+0.723397153789j))*0.5**o
            arg[(0, 1)]=(0.355673994121-0.458901706723j)*x[0]**o + ((-0.968562712516+0.602076262235j))*x[0] + ((0.515681839145-0.770580739461j))*x[1]**o + ((0.0205252814254+0.0543364465212j))*x[1] + ((0.832228241636+0.8324962835j))*x[2]**o + ((-0.160178338977-0.183652679755j))*x[2]
            ref[(0, 1)]=(1.34791008078+0.0619155440385j)/(o+1.)+((-0.554107885034+0.2363800145j))+((0.355673994121-0.458901706723j))*0.5**o
            arg[(1, 0)]=(0.524368108186-0.0197187505033j)*x[0]**o + ((-0.830826972638-0.349759411017j))*x[0] + ((-0.776588140538+0.317489695597j))*x[1]**o + ((0.446778662978-0.539279828715j))*x[1] + ((0.61628990298-0.902694181042j))*x[2]**o + ((0.805474500691-0.337556380194j))*x[2]
            ref[(1, 0)]=(-0.160298237557-0.585204485445j)/(o+1.)+((0.210713095515-0.613297809963j))+((0.524368108186-0.0197187505033j))*0.5**o
            arg[(1, 1)]=(-0.907682886768-0.573645385771j)*x[0]**o + ((-0.367368550858+0.189333093997j))*x[0] + ((-0.737828889693+0.94908420243j))*x[1]**o + ((0.764464660872+0.662638569669j))*x[1] + ((0.904756245037-0.994117543252j))*x[2]**o + ((-0.398191285595-0.620682244665j))*x[2]
            ref[(1, 1)]=(0.166927355344-0.0450333408228j)/(o+1.)+((-0.000547587790578+0.115644709501j))+((-0.907682886768-0.573645385771j))*0.5**o
            arg[(2, 0)]=(-0.843537102927+0.602948335717j)*x[0]**o + ((0.100350300186+0.104662396023j))*x[0] + ((-0.961247731292-0.301752331906j))*x[1]**o + ((-0.646375953717-0.330228294923j))*x[1] + ((0.219895886846+0.65605091327j))*x[2]**o + ((0.161019515587-0.37687214384j))*x[2]
            ref[(2, 0)]=(-0.741351844446+0.354298581364j)/(o+1.)+((-0.192503068972-0.30121902137j))+((-0.843537102927+0.602948335717j))*0.5**o
            arg[(2, 1)]=(-0.46575165038+0.829452455523j)*x[0]**o + ((-0.708101847539-0.532664659663j))*x[0] + ((-0.495131541736+0.55590247444j))*x[1]**o + ((-0.46696795365+0.984869241195j))*x[1] + ((-0.246753657494+0.607863931357j))*x[2]**o + ((-0.0467280202655+0.837541581801j))*x[2]
            ref[(2, 1)]=(-0.74188519923+1.1637664058j)/(o+1.)+((-0.610898910727+0.644873081666j))+((-0.46575165038+0.829452455523j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref=numpy.zeros((2, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.245654353599+0.208944077007j)*x[0]**o + ((-0.460511761975-0.354987926635j))*x[0] + ((0.336156531151-0.539322788671j))*x[1]**o + ((-0.505957160294-0.330024873397j))*x[1]
            ref[(0, 0, 0)]=(0.336156531151-0.539322788671j)/(o+1.)+((-0.483234461135-0.342506400016j))+((0.245654353599+0.208944077007j))*0.5**o
            arg[(0, 0, 1)]=(0.660359962628+0.0781428545186j)*x[0]**o + ((0.566652527802-0.380616166222j))*x[0] + ((-0.912161709549-0.328428182552j))*x[1]**o + ((-0.87949557614-0.919846843941j))*x[1]
            ref[(0, 0, 1)]=(-0.912161709549-0.328428182552j)/(o+1.)+((-0.156421524169-0.650231505082j))+((0.660359962628+0.0781428545186j))*0.5**o
            arg[(0, 1, 0)]=(0.089011001821+0.84208211093j)*x[0]**o + ((0.551044948627+0.515977724275j))*x[0] + ((0.615012786525+0.961487831445j))*x[1]**o + ((0.535985730005-0.158455585463j))*x[1]
            ref[(0, 1, 0)]=(0.615012786525+0.961487831445j)/(o+1.)+((0.543515339316+0.178761069406j))+((0.089011001821+0.84208211093j))*0.5**o
            arg[(0, 1, 1)]=(0.268489930174+0.327330182987j)*x[0]**o + ((0.506213156513-0.115547930109j))*x[0] + ((-0.121937017138-0.636178678882j))*x[1]**o + ((-0.163685963438-0.0119468630777j))*x[1]
            ref[(0, 1, 1)]=(-0.121937017138-0.636178678882j)/(o+1.)+((0.171263596537-0.0637473965934j))+((0.268489930174+0.327330182987j))*0.5**o
            arg[(0, 2, 0)]=(-0.514933065468+0.552180729671j)*x[0]**o + ((0.211140068865+0.897012025542j))*x[0] + ((-0.956147719703-0.913705594711j))*x[1]**o + ((-0.921882295724-0.523840785386j))*x[1]
            ref[(0, 2, 0)]=(-0.956147719703-0.913705594711j)/(o+1.)+((-0.35537111343+0.186585620078j))+((-0.514933065468+0.552180729671j))*0.5**o
            arg[(0, 2, 1)]=(0.165442910784-0.910823081749j)*x[0]**o + ((-0.598155006191+0.112332669569j))*x[0] + ((-0.446809796669+0.981803736645j))*x[1]**o + ((-0.406997723206-0.385759185593j))*x[1]
            ref[(0, 2, 1)]=(-0.446809796669+0.981803736645j)/(o+1.)+((-0.502576364699-0.136713258012j))+((0.165442910784-0.910823081749j))*0.5**o
            arg[(0, 3, 0)]=(0.0160979319734-0.617087914476j)*x[0]**o + ((-0.70769307913-0.30065266073j))*x[0] + ((-0.661852716465-0.931540563057j))*x[1]**o + ((0.586009711606+0.366768297923j))*x[1]
            ref[(0, 3, 0)]=(-0.661852716465-0.931540563057j)/(o+1.)+((-0.0608416837621+0.0330578185961j))+((0.0160979319734-0.617087914476j))*0.5**o
            arg[(0, 3, 1)]=(-0.0167132897208-0.830148672751j)*x[0]**o + ((-0.605049467519+0.00631033545624j))*x[0] + ((-0.827002549612-0.213625547722j))*x[1]**o + ((0.580878239982+0.956450556192j))*x[1]
            ref[(0, 3, 1)]=(-0.827002549612-0.213625547722j)/(o+1.)+((-0.0120856137685+0.481380445824j))+((-0.0167132897208-0.830148672751j))*0.5**o
            arg[(1, 0, 0)]=(-0.213365290917-0.147500030103j)*x[0]**o + ((-0.553592733875+0.244432009688j))*x[0] + ((-0.00386581667376-0.512886350488j))*x[1]**o + ((-0.934446046922-0.487239206116j))*x[1]
            ref[(1, 0, 0)]=(-0.00386581667376-0.512886350488j)/(o+1.)+((-0.744019390399-0.121403598214j))+((-0.213365290917-0.147500030103j))*0.5**o
            arg[(1, 0, 1)]=(-0.972931289751+0.593226535509j)*x[0]**o + ((-0.251082951531-0.140748114258j))*x[0] + ((-0.353904108244+0.811081541748j))*x[1]**o + ((0.358290351796+0.0150997747298j))*x[1]
            ref[(1, 0, 1)]=(-0.353904108244+0.811081541748j)/(o+1.)+((0.0536037001325-0.0628241697639j))+((-0.972931289751+0.593226535509j))*0.5**o
            arg[(1, 1, 0)]=(0.0553176919131+0.310618254229j)*x[0]**o + ((0.749804892218-0.675609359816j))*x[0] + ((0.800053835302-0.424354068586j))*x[1]**o + ((-0.214272421695-0.57515772525j))*x[1]
            ref[(1, 1, 0)]=(0.800053835302-0.424354068586j)/(o+1.)+((0.267766235261-0.625383542533j))+((0.0553176919131+0.310618254229j))*0.5**o
            arg[(1, 1, 1)]=(0.655146444423-0.125831030893j)*x[0]**o + ((-0.0156025129604+0.181031357113j))*x[0] + ((-0.0476004092829+0.731403201087j))*x[1]**o + ((-0.563412376937-0.21718602925j))*x[1]
            ref[(1, 1, 1)]=(-0.0476004092829+0.731403201087j)/(o+1.)+((-0.289507444949-0.0180773360681j))+((0.655146444423-0.125831030893j))*0.5**o
            arg[(1, 2, 0)]=(0.157144831-0.232509284729j)*x[0]**o + ((-0.823210182193+0.633718041188j))*x[0] + ((-0.738446032039-0.452695334569j))*x[1]**o + ((0.793926152226-0.323194700968j))*x[1]
            ref[(1, 2, 0)]=(-0.738446032039-0.452695334569j)/(o+1.)+((-0.0146420149835+0.15526167011j))+((0.157144831-0.232509284729j))*0.5**o
            arg[(1, 2, 1)]=(0.627065022081+0.229311126998j)*x[0]**o + ((-0.713611510902+0.941878562775j))*x[0] + ((0.852542417197-0.333086351799j))*x[1]**o + ((0.068244697512+0.25592742767j))*x[1]
            ref[(1, 2, 1)]=(0.852542417197-0.333086351799j)/(o+1.)+((-0.322683406695+0.598902995222j))+((0.627065022081+0.229311126998j))*0.5**o
            arg[(1, 3, 0)]=(0.111663485627+0.2150903636j)*x[0]**o + ((0.650333004964-0.97581149751j))*x[0] + ((-0.244085250346+0.308706816314j))*x[1]**o + ((-0.853147105121-0.515425342788j))*x[1]
            ref[(1, 3, 0)]=(-0.244085250346+0.308706816314j)/(o+1.)+((-0.101407050078-0.745618420149j))+((0.111663485627+0.2150903636j))*0.5**o
            arg[(1, 3, 1)]=(0.298256295473-0.58996031007j)*x[0]**o + ((0.554285309249-0.449437479579j))*x[0] + ((0.466844677804-0.0756543065875j))*x[1]**o + ((0.767733228848+0.518547621691j))*x[1]
            ref[(1, 3, 1)]=(0.466844677804-0.0756543065875j)/(o+1.)+((0.661009269049+0.0345550710557j))+((0.298256295473-0.58996031007j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.62317489704+0.844898680774j)*x[0]**o + ((0.324488874134-0.494038991463j))*x[0] + ((0.0685950126014-0.602729228924j))*x[1]**o + ((0.91220389825-0.230619428651j))*x[1] + ((0.323838440304-0.279082195208j))*x[2]**o + ((-0.579778535173-0.374974483045j))*x[2]
            ref[(0, 0, 0)]=(0.392433452906-0.881811424132j)/(o+1.)+((0.328457118605-0.549816451579j))+((-0.62317489704+0.844898680774j))*0.5**o
            arg[(0, 0, 1)]=(0.398504059175+0.471927162974j)*x[0]**o + ((0.955130514147-0.898632252662j))*x[0] + ((0.140556839796+0.392003615989j))*x[1]**o + ((0.713697617289-0.218834530378j))*x[1] + ((0.495502898878-0.636417982559j))*x[2]**o + ((-0.599004608193-0.966414225075j))*x[2]
            ref[(0, 0, 1)]=(0.636059738674-0.244414366569j)/(o+1.)+((0.534911761622-1.04194050406j))+((0.398504059175+0.471927162974j))*0.5**o
            arg[(0, 1, 0)]=(0.747172691946-0.459376344359j)*x[0]**o + ((-0.426019684946-0.647084582465j))*x[0] + ((0.308772126163+0.0015636360874j))*x[1]**o + ((0.574504821157+0.503809388984j))*x[1] + ((0.4630709856+0.303687801139j))*x[2]**o + ((0.520968576339+0.313254454793j))*x[2]
            ref[(0, 1, 0)]=(0.771843111763+0.305251437226j)/(o+1.)+((0.334726856275+0.0849896306564j))+((0.747172691946-0.459376344359j))*0.5**o
            arg[(0, 1, 1)]=(0.439658102718-0.23780150608j)*x[0]**o + ((0.633796162303+0.720819342451j))*x[0] + ((0.969795332639+0.290245050507j))*x[1]**o + ((-0.939234971021+0.807862262151j))*x[1] + ((-0.220810742707-0.507611392281j))*x[2]**o + ((-0.740386236693-0.127762924383j))*x[2]
            ref[(0, 1, 1)]=(0.748984589932-0.217366341774j)/(o+1.)+((-0.522912522705+0.70045934011j))+((0.439658102718-0.23780150608j))*0.5**o
            arg[(0, 2, 0)]=(-0.636399742877-0.0831158970112j)*x[0]**o + ((-0.491545135459-0.762953148622j))*x[0] + ((-0.162883745357+0.601141423899j))*x[1]**o + ((-0.541213366473+0.0395079112282j))*x[1] + ((0.70291756494+0.970103426732j))*x[2]**o + ((0.322884078647-0.892925169242j))*x[2]
            ref[(0, 2, 0)]=(0.540033819583+1.57124485063j)/(o+1.)+((-0.354937211643-0.808185203318j))+((-0.636399742877-0.0831158970112j))*0.5**o
            arg[(0, 2, 1)]=(-0.376684170545-0.21604522592j)*x[0]**o + ((0.0834568784607+0.444512101827j))*x[0] + ((-0.173801657655+0.229160644177j))*x[1]**o + ((-0.290713338426-0.36835458251j))*x[1] + ((-0.15920176832-0.182606913261j))*x[2]**o + ((-0.21707017258+0.153173149154j))*x[2]
            ref[(0, 2, 1)]=(-0.333003425975+0.0465537309157j)/(o+1.)+((-0.212163316273+0.114665334236j))+((-0.376684170545-0.21604522592j))*0.5**o
            arg[(0, 3, 0)]=(-0.221931513963-0.967582979262j)*x[0]**o + ((0.987704797091+0.39663129448j))*x[0] + ((0.720642650986-0.942506930282j))*x[1]**o + ((0.224761295538+0.834144969964j))*x[1] + ((0.879819805473+0.222995393949j))*x[2]**o + ((-0.998728369972-0.265039956401j))*x[2]
            ref[(0, 3, 0)]=(1.60046245646-0.719511536333j)/(o+1.)+((0.106868861328+0.482868154021j))+((-0.221931513963-0.967582979262j))*0.5**o
            arg[(0, 3, 1)]=(0.249502371092+0.269159048677j)*x[0]**o + ((-0.172083530573+0.701028371433j))*x[0] + ((-0.858870180302-0.1269252216j))*x[1]**o + ((-0.189071362171-0.696184103002j))*x[1] + ((-0.114608010576+0.497519662637j))*x[2]**o + ((0.27375587998+0.888526830058j))*x[2]
            ref[(0, 3, 1)]=(-0.973478190878+0.370594441037j)/(o+1.)+((-0.0436995063822+0.446685549245j))+((0.249502371092+0.269159048677j))*0.5**o
            arg[(1, 0, 0)]=(-0.699235306811+0.344063241266j)*x[0]**o + ((0.352469762373+0.356961099184j))*x[0] + ((-0.731891997665+0.321713853101j))*x[1]**o + ((0.878963400451+0.957354974113j))*x[1] + ((0.210908409812+0.295572459881j))*x[2]**o + ((-0.506810799004+0.812090269002j))*x[2]
            ref[(1, 0, 0)]=(-0.520983587853+0.617286312982j)/(o+1.)+((0.36231118191+1.06320317115j))+((-0.699235306811+0.344063241266j))*0.5**o
            arg[(1, 0, 1)]=(0.506483401804+0.021408849096j)*x[0]**o + ((-0.452185867427-0.837573410868j))*x[0] + ((0.380615041624-0.359614045868j))*x[1]**o + ((0.535340266364+0.379876485917j))*x[1] + ((-0.712627965361-0.771170735092j))*x[2]**o + ((-0.951676177655+0.524386889535j))*x[2]
            ref[(1, 0, 1)]=(-0.332012923737-1.13078478096j)/(o+1.)+((-0.434260889359+0.0333449822919j))+((0.506483401804+0.021408849096j))*0.5**o
            arg[(1, 1, 0)]=(-0.400049557359+0.59360460836j)*x[0]**o + ((0.344288778828-0.383822000509j))*x[0] + ((-0.590498628157-0.567532166444j))*x[1]**o + ((-0.195010293836+0.726307858859j))*x[1] + ((-0.776491050314-0.626133824656j))*x[2]**o + ((0.383688843958-0.702879252913j))*x[2]
            ref[(1, 1, 0)]=(-1.36698967847-1.1936659911j)/(o+1.)+((0.266483664475-0.180196697281j))+((-0.400049557359+0.59360460836j))*0.5**o
            arg[(1, 1, 1)]=(0.576863517926+0.684600132822j)*x[0]**o + ((-0.518927217911-0.326390492559j))*x[0] + ((-0.127607254858-0.945217140956j))*x[1]**o + ((0.805894516332+0.230503189086j))*x[1] + ((0.243374609622-0.35339176467j))*x[2]**o + ((-0.526113712298-0.366236244319j))*x[2]
            ref[(1, 1, 1)]=(0.115767354764-1.29860890563j)/(o+1.)+((-0.119573206939-0.231061773896j))+((0.576863517926+0.684600132822j))*0.5**o
            arg[(1, 2, 0)]=(-0.624568402129-0.473855520745j)*x[0]**o + ((0.190230511476+0.518550155479j))*x[0] + ((-0.677980375224+0.237931851027j))*x[1]**o + ((0.769306945251+0.829166171127j))*x[1] + ((-0.431519535088+0.173214723315j))*x[2]**o + ((0.140274949715-0.538951642392j))*x[2]
            ref[(1, 2, 0)]=(-1.10949991031+0.411146574342j)/(o+1.)+((0.549906203221+0.404382342107j))+((-0.624568402129-0.473855520745j))*0.5**o
            arg[(1, 2, 1)]=(-0.610875646168+0.788798501664j)*x[0]**o + ((-0.40129277479-0.431517017142j))*x[0] + ((0.626073334009+0.580252313324j))*x[1]**o + ((0.342481666399-0.0696914188416j))*x[1] + ((-0.773906153366+0.016842046842j))*x[2]**o + ((-0.769304524184+0.178106517795j))*x[2]
            ref[(1, 2, 1)]=(-0.147832819357+0.597094360166j)/(o+1.)+((-0.414057816287-0.161550959094j))+((-0.610875646168+0.788798501664j))*0.5**o
            arg[(1, 3, 0)]=(0.847343811653+0.507124291278j)*x[0]**o + ((-0.808115084721+0.734027783015j))*x[0] + ((0.768105691194-0.153075941505j))*x[1]**o + ((-0.0667405707502+0.386935718792j))*x[1] + ((0.654330845255+0.149593567196j))*x[2]**o + ((-0.480638623386-0.503035620204j))*x[2]
            ref[(1, 3, 0)]=(1.42243653645-0.00348237430914j)/(o+1.)+((-0.677747139429+0.308963940802j))+((0.847343811653+0.507124291278j))*0.5**o
            arg[(1, 3, 1)]=(0.584879694415-0.64971086175j)*x[0]**o + ((0.799111062218-0.0190918564741j))*x[0] + ((0.346211042777-0.131947917696j))*x[1]**o + ((-0.856016032165-0.103327161091j))*x[1] + ((0.918563240774+0.339416562004j))*x[2]**o + ((-0.50864543696-0.291983713346j))*x[2]
            ref[(1, 3, 1)]=(1.26477428355+0.207468644308j)/(o+1.)+((-0.282775203454-0.207201365456j))+((0.584879694415-0.64971086175j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3, 2),w)
        ref=numpy.zeros((2, 4, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.58378202639-0.111593805818j)*x[0]**o + ((0.267152861794-0.507150380707j))*x[0] + ((0.657291949935-0.449496914119j))*x[1]**o + ((0.195851176319+0.0399009632981j))*x[1]
            ref[(0, 0, 0, 0)]=(0.657291949935-0.449496914119j)/(o+1.)+((0.231502019056-0.233624708705j))+((0.58378202639-0.111593805818j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.790699815137+0.125437103852j)*x[0]**o + ((-0.48443071738-0.837374414867j))*x[0] + ((0.673979252976-0.163766140874j))*x[1]**o + ((0.622699165506+0.509872178235j))*x[1]
            ref[(0, 0, 0, 1)]=(0.673979252976-0.163766140874j)/(o+1.)+((0.069134224063-0.163751118316j))+((-0.790699815137+0.125437103852j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.79822160236-0.864322960938j)*x[0]**o + ((-0.94359752582+0.717720770934j))*x[0] + ((-0.235481146272-0.123580930976j))*x[1]**o + ((0.961980330938+0.203351843692j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.235481146272-0.123580930976j)/(o+1.)+((0.00919140255939+0.460536307313j))+((0.79822160236-0.864322960938j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.858385059424-0.526560484089j)*x[0]**o + ((-0.726951291536-0.996196488691j))*x[0] + ((-0.321006977391-0.409873003702j))*x[1]**o + ((0.376649870825+0.880377313318j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.321006977391-0.409873003702j)/(o+1.)+((-0.175150710356-0.0579095876862j))+((-0.858385059424-0.526560484089j))*0.5**o
            arg[(0, 0, 2, 0)]=(-0.163709928017-0.243820132968j)*x[0]**o + ((-0.968243144325+0.307660555002j))*x[0] + ((-0.112067354358-0.46606815914j))*x[1]**o + ((0.477329182459+0.90296826083j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.112067354358-0.46606815914j)/(o+1.)+((-0.245456980933+0.605314407916j))+((-0.163709928017-0.243820132968j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.592214079443+0.235718314878j)*x[0]**o + ((-0.890735800708+0.866849782808j))*x[0] + ((0.172019910694+0.434812214466j))*x[1]**o + ((0.688731554952+0.694362444495j))*x[1]
            ref[(0, 0, 2, 1)]=(0.172019910694+0.434812214466j)/(o+1.)+((-0.101002122878+0.780606113651j))+((-0.592214079443+0.235718314878j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.619037204052-0.394444269135j)*x[0]**o + ((0.714589918497+0.756876274117j))*x[0] + ((-0.244050536313+0.886957490811j))*x[1]**o + ((0.520673615635-0.900589513313j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.244050536313+0.886957490811j)/(o+1.)+((0.617631767066-0.0718566195981j))+((0.619037204052-0.394444269135j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.268238965696-0.718385659477j)*x[0]**o + ((0.0290444696351-0.795894380009j))*x[0] + ((0.132178657037+0.932730749575j))*x[1]**o + ((0.796180871305-0.778350717112j))*x[1]
            ref[(0, 1, 0, 1)]=(0.132178657037+0.932730749575j)/(o+1.)+((0.41261267047-0.787122548561j))+((0.268238965696-0.718385659477j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.706036999342+0.60959183777j)*x[0]**o + ((0.0892960073226+0.184955882751j))*x[0] + ((0.757526760286-0.815896796951j))*x[1]**o + ((-0.318606153044-0.557369019984j))*x[1]
            ref[(0, 1, 1, 0)]=(0.757526760286-0.815896796951j)/(o+1.)+((-0.114655072861-0.186206568616j))+((-0.706036999342+0.60959183777j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.0761751456225+0.901112097915j)*x[0]**o + ((-0.00193407750426-0.148967785722j))*x[0] + ((-0.209573005805+0.845409132846j))*x[1]**o + ((-0.825629691135-0.719879099701j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.209573005805+0.845409132846j)/(o+1.)+((-0.41378188432-0.434423442711j))+((-0.0761751456225+0.901112097915j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.43624970433-0.314279621628j)*x[0]**o + ((0.992447228192-0.498835424j))*x[0] + ((-0.770284986571+0.127096219314j))*x[1]**o + ((-0.600683955107-0.388671519195j))*x[1]
            ref[(0, 1, 2, 0)]=(-0.770284986571+0.127096219314j)/(o+1.)+((0.195881636543-0.443753471597j))+((-0.43624970433-0.314279621628j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.496806725505-0.374311554404j)*x[0]**o + ((-0.128998234918-0.815986713577j))*x[0] + ((-0.143144597725+0.0406924283423j))*x[1]**o + ((0.543319754547-0.696662784836j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.143144597725+0.0406924283423j)/(o+1.)+((0.207160759814-0.756324749207j))+((-0.496806725505-0.374311554404j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.195309383291-0.463458272871j)*x[0]**o + ((0.132416780459-0.840336900802j))*x[0] + ((-0.267612331371+0.543693963808j))*x[1]**o + ((0.450992681765-0.458278835439j))*x[1]
            ref[(0, 2, 0, 0)]=(-0.267612331371+0.543693963808j)/(o+1.)+((0.291704731112-0.649307868121j))+((-0.195309383291-0.463458272871j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.64939729624+0.596774029155j)*x[0]**o + ((-0.0577830500916+0.0407820060108j))*x[0] + ((-0.74032654229+0.0870526456835j))*x[1]**o + ((-0.511097106559+0.745120134654j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.74032654229+0.0870526456835j)/(o+1.)+((-0.284440078325+0.392951070333j))+((0.64939729624+0.596774029155j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.627068572057+0.371470895945j)*x[0]**o + ((-0.217076552875+0.8906304514j))*x[0] + ((0.991382030253-0.29704242335j))*x[1]**o + ((0.792863265449+0.125172009719j))*x[1]
            ref[(0, 2, 1, 0)]=(0.991382030253-0.29704242335j)/(o+1.)+((0.287893356287+0.507901230559j))+((0.627068572057+0.371470895945j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.396055248625+0.528981860296j)*x[0]**o + ((0.484139924584-0.975312445788j))*x[0] + ((-0.360842638947+0.588788840472j))*x[1]**o + ((-0.261077756676+0.696245566291j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.360842638947+0.588788840472j)/(o+1.)+((0.111531083954-0.139533439748j))+((0.396055248625+0.528981860296j))*0.5**o
            arg[(0, 2, 2, 0)]=(0.578310368906+0.942142087401j)*x[0]**o + ((0.150058648216+0.91105918152j))*x[0] + ((-0.948800817521-0.689436024143j))*x[1]**o + ((0.09271963891-0.834639474884j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.948800817521-0.689436024143j)/(o+1.)+((0.121389143563+0.0382098533182j))+((0.578310368906+0.942142087401j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.75596814692+0.699833013677j)*x[0]**o + ((-0.332114801525+0.559712416763j))*x[0] + ((0.683642197549-0.0467300170145j))*x[1]**o + ((0.807341493671+0.337223024103j))*x[1]
            ref[(0, 2, 2, 1)]=(0.683642197549-0.0467300170145j)/(o+1.)+((0.237613346073+0.448467720433j))+((0.75596814692+0.699833013677j))*0.5**o
            arg[(0, 3, 0, 0)]=(-0.511406200262-0.350583952859j)*x[0]**o + ((0.0839275218663+0.892555939273j))*x[0] + ((0.731573662478-0.454467778383j))*x[1]**o + ((0.855718024547+0.655918529494j))*x[1]
            ref[(0, 3, 0, 0)]=(0.731573662478-0.454467778383j)/(o+1.)+((0.469822773207+0.774237234384j))+((-0.511406200262-0.350583952859j))*0.5**o
            arg[(0, 3, 0, 1)]=(-0.810614447518-0.953985473368j)*x[0]**o + ((-0.95972062692+0.496465356282j))*x[0] + ((0.818176721291+0.86664945918j))*x[1]**o + ((-0.625680757579-0.287317267749j))*x[1]
            ref[(0, 3, 0, 1)]=(0.818176721291+0.86664945918j)/(o+1.)+((-0.792700692249+0.104574044266j))+((-0.810614447518-0.953985473368j))*0.5**o
            arg[(0, 3, 1, 0)]=(-0.0904100588961-0.66686897488j)*x[0]**o + ((0.606868419657-0.89267061103j))*x[0] + ((-0.789082148253+0.875075107004j))*x[1]**o + ((-0.90260160338-0.531881025458j))*x[1]
            ref[(0, 3, 1, 0)]=(-0.789082148253+0.875075107004j)/(o+1.)+((-0.147866591861-0.712275818244j))+((-0.0904100588961-0.66686897488j))*0.5**o
            arg[(0, 3, 1, 1)]=(0.232024265642-0.168700932855j)*x[0]**o + ((-0.835413318726-0.431092553499j))*x[0] + ((0.9911534926-0.738400380653j))*x[1]**o + ((-0.253313190611-0.91710519776j))*x[1]
            ref[(0, 3, 1, 1)]=(0.9911534926-0.738400380653j)/(o+1.)+((-0.544363254669-0.674098875629j))+((0.232024265642-0.168700932855j))*0.5**o
            arg[(0, 3, 2, 0)]=(0.845282680884-0.433009052026j)*x[0]**o + ((0.95370624403+0.0137053922182j))*x[0] + ((0.99356540704+0.719821651901j))*x[1]**o + ((-0.775270323969+0.0534414767018j))*x[1]
            ref[(0, 3, 2, 0)]=(0.99356540704+0.719821651901j)/(o+1.)+((0.0892179600306+0.03357343446j))+((0.845282680884-0.433009052026j))*0.5**o
            arg[(0, 3, 2, 1)]=(-0.395563720146+0.900982935792j)*x[0]**o + ((0.764600345169-0.0486070838866j))*x[0] + ((-0.216556691315-0.504867963599j))*x[1]**o + ((0.866887444983+0.141753096172j))*x[1]
            ref[(0, 3, 2, 1)]=(-0.216556691315-0.504867963599j)/(o+1.)+((0.815743895076+0.046573006143j))+((-0.395563720146+0.900982935792j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.989735431039-0.926659363049j)*x[0]**o + ((0.238951152445-0.158978562454j))*x[0] + ((-0.210029851523+0.272582613734j))*x[1]**o + ((-0.427154590211+0.377098576723j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.210029851523+0.272582613734j)/(o+1.)+((-0.0941017188829+0.109060007135j))+((0.989735431039-0.926659363049j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.0362692913571+0.240436337052j)*x[0]**o + ((-0.59775732574-0.8827922661j))*x[0] + ((-0.625288513729-0.38230153902j))*x[1]**o + ((-0.0947691635089-0.282258448234j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.625288513729-0.38230153902j)/(o+1.)+((-0.346263244625-0.582525357167j))+((-0.0362692913571+0.240436337052j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.208754840179-0.0746975446034j)*x[0]**o + ((-0.611855199561-0.547749245252j))*x[0] + ((0.546704682932-0.556661873198j))*x[1]**o + ((-0.810670260628-0.874616118303j))*x[1]
            ref[(1, 0, 1, 0)]=(0.546704682932-0.556661873198j)/(o+1.)+((-0.711262730095-0.711182681777j))+((0.208754840179-0.0746975446034j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.35984386668+0.853298468058j)*x[0]**o + ((0.36523216023+0.705325614904j))*x[0] + ((-0.976156383367+0.238272194492j))*x[1]**o + ((-0.396322172007-0.809347753059j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.976156383367+0.238272194492j)/(o+1.)+((-0.0155450058886-0.0520110690776j))+((0.35984386668+0.853298468058j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.425358421619-0.562041344655j)*x[0]**o + ((0.848878151375-0.109232591418j))*x[0] + ((0.198946578507+0.50088701428j))*x[1]**o + ((0.907156850787+0.208759835465j))*x[1]
            ref[(1, 0, 2, 0)]=(0.198946578507+0.50088701428j)/(o+1.)+((0.878017501081+0.0497636220237j))+((0.425358421619-0.562041344655j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.456773194114-0.735447297592j)*x[0]**o + ((-0.65679089802+0.49324313936j))*x[0] + ((0.349012167701+0.182288950969j))*x[1]**o + ((-0.588892841316-0.487991933124j))*x[1]
            ref[(1, 0, 2, 1)]=(0.349012167701+0.182288950969j)/(o+1.)+((-0.622841869668+0.00262560311794j))+((0.456773194114-0.735447297592j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.580306970241+0.0167064215513j)*x[0]**o + ((-0.967380156686+0.120884101832j))*x[0] + ((-0.428015049598-0.931093741429j))*x[1]**o + ((-0.337242557252-0.644567478959j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.428015049598-0.931093741429j)/(o+1.)+((-0.652311356969-0.261841688564j))+((0.580306970241+0.0167064215513j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.688277685477-0.996798334448j)*x[0]**o + ((-0.296551479865-0.697053805423j))*x[0] + ((-0.488888204145-0.53828801511j))*x[1]**o + ((-0.474222425814-0.148993521748j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.488888204145-0.53828801511j)/(o+1.)+((-0.385386952839-0.423023663586j))+((-0.688277685477-0.996798334448j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.422402000423+0.80645486538j)*x[0]**o + ((0.748695716965+0.542832612149j))*x[0] + ((-0.133832310578-0.364877340234j))*x[1]**o + ((-0.522839791941+0.25708444559j))*x[1]
            ref[(1, 1, 1, 0)]=(-0.133832310578-0.364877340234j)/(o+1.)+((0.112927962512+0.39995852887j))+((-0.422402000423+0.80645486538j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.284276754627+0.152867769956j)*x[0]**o + ((0.718590012748-0.753811037835j))*x[0] + ((-0.0548175776768+0.559578918233j))*x[1]**o + ((-0.275802479936-0.108466795785j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.0548175776768+0.559578918233j)/(o+1.)+((0.221393766406-0.43113891681j))+((0.284276754627+0.152867769956j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.413178448578-0.162036718226j)*x[0]**o + ((-0.203469999241-0.302189851293j))*x[0] + ((-0.118233726285+0.191174918534j))*x[1]**o + ((-0.28401888731+0.395531355367j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.118233726285+0.191174918534j)/(o+1.)+((-0.243744443275+0.046670752037j))+((-0.413178448578-0.162036718226j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.347173357957+0.300939778279j)*x[0]**o + ((-0.643806845001+0.634547160174j))*x[0] + ((0.631938476829-0.652732609341j))*x[1]**o + ((0.577894122567-0.633509315218j))*x[1]
            ref[(1, 1, 2, 1)]=(0.631938476829-0.652732609341j)/(o+1.)+((-0.0329563612168+0.000518922477868j))+((-0.347173357957+0.300939778279j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.941041459123+0.234983948051j)*x[0]**o + ((0.106146489728+0.270400348147j))*x[0] + ((-0.963440552459-0.412097765146j))*x[1]**o + ((0.267274246944-0.0140311358988j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.963440552459-0.412097765146j)/(o+1.)+((0.186710368336+0.128184606124j))+((-0.941041459123+0.234983948051j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.0876649838391+0.490823493616j)*x[0]**o + ((0.456897422249-0.321690530953j))*x[0] + ((0.700676198135-0.515291224364j))*x[1]**o + ((0.742662469528+0.31961283549j))*x[1]
            ref[(1, 2, 0, 1)]=(0.700676198135-0.515291224364j)/(o+1.)+((0.599779945888-0.00103884773129j))+((-0.0876649838391+0.490823493616j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.0191192844386+0.618823484865j)*x[0]**o + ((0.233827993626+0.786008795394j))*x[0] + ((0.914411996918-0.968110230973j))*x[1]**o + ((0.405530814862-0.694797799921j))*x[1]
            ref[(1, 2, 1, 0)]=(0.914411996918-0.968110230973j)/(o+1.)+((0.319679404244+0.0456054977361j))+((-0.0191192844386+0.618823484865j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.054991360478+0.41767975492j)*x[0]**o + ((-0.0182244888506-0.428831725249j))*x[0] + ((-0.152371868166+0.477283843194j))*x[1]**o + ((0.100394331239-0.33544545178j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.152371868166+0.477283843194j)/(o+1.)+((0.041084921194-0.382138588514j))+((0.054991360478+0.41767975492j))*0.5**o
            arg[(1, 2, 2, 0)]=(0.0234422998114-0.0738922839429j)*x[0]**o + ((-0.822047473765-0.136386173549j))*x[0] + ((0.0921394400037+0.336918115118j))*x[1]**o + ((-0.192803214003+0.820457970568j))*x[1]
            ref[(1, 2, 2, 0)]=(0.0921394400037+0.336918115118j)/(o+1.)+((-0.507425343884+0.34203589851j))+((0.0234422998114-0.0738922839429j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.658575088214-0.77705905786j)*x[0]**o + ((-0.729424762236-0.856089250125j))*x[0] + ((-0.268500120851+0.571153888264j))*x[1]**o + ((0.616052248441-0.110404349258j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.268500120851+0.571153888264j)/(o+1.)+((-0.0566862568974-0.483246799691j))+((0.658575088214-0.77705905786j))*0.5**o
            arg[(1, 3, 0, 0)]=(0.852638106833-0.218553842535j)*x[0]**o + ((-0.202002638716-0.30111150614j))*x[0] + ((-0.141190198765+0.778795565854j))*x[1]**o + ((-0.0529103128445+0.972738669602j))*x[1]
            ref[(1, 3, 0, 0)]=(-0.141190198765+0.778795565854j)/(o+1.)+((-0.12745647578+0.335813581731j))+((0.852638106833-0.218553842535j))*0.5**o
            arg[(1, 3, 0, 1)]=(0.000709641155442-0.742403200135j)*x[0]**o + ((-0.306867174112+0.0782451865797j))*x[0] + ((0.542271909482+0.904038228061j))*x[1]**o + ((0.563325762622-0.862360370824j))*x[1]
            ref[(1, 3, 0, 1)]=(0.542271909482+0.904038228061j)/(o+1.)+((0.128229294255-0.392057592122j))+((0.000709641155442-0.742403200135j))*0.5**o
            arg[(1, 3, 1, 0)]=(0.292156712753-0.528553537369j)*x[0]**o + ((0.244585776953+0.0650261013254j))*x[0] + ((-0.616758460575-0.267980890733j))*x[1]**o + ((0.0841367118163+0.578117146321j))*x[1]
            ref[(1, 3, 1, 0)]=(-0.616758460575-0.267980890733j)/(o+1.)+((0.164361244385+0.321571623823j))+((0.292156712753-0.528553537369j))*0.5**o
            arg[(1, 3, 1, 1)]=(-0.292688760718-0.226169795819j)*x[0]**o + ((0.844728499142+0.703278438403j))*x[0] + ((-0.0429252067666-0.929734296995j))*x[1]**o + ((0.010064211494-0.169609250759j))*x[1]
            ref[(1, 3, 1, 1)]=(-0.0429252067666-0.929734296995j)/(o+1.)+((0.427396355318+0.266834593822j))+((-0.292688760718-0.226169795819j))*0.5**o
            arg[(1, 3, 2, 0)]=(-0.221590649873-0.818679463582j)*x[0]**o + ((-0.462906096638+0.257362073245j))*x[0] + ((0.68672258027+0.654298948517j))*x[1]**o + ((-0.0166070939086-0.56048395805j))*x[1]
            ref[(1, 3, 2, 0)]=(0.68672258027+0.654298948517j)/(o+1.)+((-0.239756595273-0.151560942403j))+((-0.221590649873-0.818679463582j))*0.5**o
            arg[(1, 3, 2, 1)]=(-0.789333352997+0.722639311117j)*x[0]**o + ((0.781883639736+0.575830587778j))*x[0] + ((0.237453537639+0.62166714587j))*x[1]**o + ((0.172157676019+0.958490034844j))*x[1]
            ref[(1, 3, 2, 1)]=(0.237453537639+0.62166714587j)/(o+1.)+((0.477020657878+0.767160311311j))+((-0.789333352997+0.722639311117j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(-0.554371133071+0.929175755216j)*x[0]**o + ((0.144244099468-0.160620092423j))*x[0] + ((0.575008184776-0.899763035707j))*x[1]**o + ((0.782410792363-0.0879191963866j))*x[1] + ((-0.984124337758+0.760503121082j))*x[2]**o + ((-0.183644389076+0.134785768703j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.409116152981-0.139259914625j)/(o+1.)+((0.371505251378-0.0568767600529j))+((-0.554371133071+0.929175755216j))*0.5**o
            arg[(0, 0, 0, 1)]=(0.888021647941-0.474084347321j)*x[0]**o + ((-0.414205166697+0.37052837513j))*x[0] + ((-0.429305916401+0.609406269386j))*x[1]**o + ((-0.221299928305+0.102333641716j))*x[1] + ((0.257961042219-0.749177756907j))*x[2]**o + ((0.61058056655+0.159520676978j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.171344874182-0.139771487521j)/(o+1.)+((-0.0124622642261+0.316191346912j))+((0.888021647941-0.474084347321j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.9759756346+0.321353015954j)*x[0]**o + ((-0.991146861706-0.706876639096j))*x[0] + ((0.741309299221-0.906164695958j))*x[1]**o + ((-0.0378922942657-0.479745849023j))*x[1] + ((0.869771593892+0.383093764094j))*x[2]**o + ((0.725681069577+0.464453287069j))*x[2]
            ref[(0, 0, 1, 0)]=(1.61108089311-0.523070931864j)/(o+1.)+((-0.151679043197-0.361084600525j))+((0.9759756346+0.321353015954j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.294283455381-0.528713016008j)*x[0]**o + ((0.351708943005+0.725293436929j))*x[0] + ((0.785120612116+0.537615493308j))*x[1]**o + ((-0.497916029039-0.993203689326j))*x[1] + ((0.805906671317-0.207760657376j))*x[2]**o + ((-0.328311594854+0.67216845107j))*x[2]
            ref[(0, 0, 1, 1)]=(1.59102728343+0.329854835932j)/(o+1.)+((-0.237259340444+0.202129099337j))+((0.294283455381-0.528713016008j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.932341456635+0.880866840072j)*x[0]**o + ((-0.501880281589-0.322665999633j))*x[0] + ((0.078444582249+0.631581784016j))*x[1]**o + ((0.769128253919-0.759779661803j))*x[1] + ((0.182524177298-0.772422705914j))*x[2]**o + ((0.897792406043+0.00173083138405j))*x[2]
            ref[(0, 0, 2, 0)]=(0.260968759547-0.140840921898j)/(o+1.)+((0.582520189187-0.540357415026j))+((0.932341456635+0.880866840072j))*0.5**o
            arg[(0, 0, 2, 1)]=(0.00360533604448+0.301892075632j)*x[0]**o + ((0.72434388074-0.833361229767j))*x[0] + ((-0.97476363092-0.445831447165j))*x[1]**o + ((-0.568680830298-0.765601738522j))*x[1] + ((-0.721837429506+0.108742569157j))*x[2]**o + ((-0.942437620749-0.906027218286j))*x[2]
            ref[(0, 0, 2, 1)]=(-1.69660106043-0.337088878009j)/(o+1.)+((-0.393387285153-1.25249509329j))+((0.00360533604448+0.301892075632j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.385506180951+0.341101735358j)*x[0]**o + ((-0.78265636169-0.42822684276j))*x[0] + ((0.824737143686-0.427536010673j))*x[1]**o + ((0.0897902064443-0.883156620524j))*x[1] + ((-0.110924426629-0.806572684931j))*x[2]**o + ((-0.185798362436-0.850455964296j))*x[2]
            ref[(0, 1, 0, 0)]=(0.713812717058-1.2341086956j)/(o+1.)+((-0.439332258841-1.08091971379j))+((0.385506180951+0.341101735358j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.84487263239-0.9976605242j)*x[0]**o + ((-0.712340151818+0.235660915053j))*x[0] + ((0.00353622473977+0.287233153443j))*x[1]**o + ((-0.314672696174+0.488371062059j))*x[1] + ((0.432198469136+0.21588062217j))*x[2]**o + ((-0.186559864939+0.0572389981462j))*x[2]
            ref[(0, 1, 0, 1)]=(0.435734693876+0.503113775613j)/(o+1.)+((-0.606786356465+0.390635487629j))+((-0.84487263239-0.9976605242j))*0.5**o
            arg[(0, 1, 1, 0)]=(-0.707910394641-0.934500395279j)*x[0]**o + ((0.575678966277+0.450580551224j))*x[0] + ((0.450977865997+0.9825780092j))*x[1]**o + ((0.771461197228-0.858018227415j))*x[1] + ((0.401020950897-0.690042518504j))*x[2]**o + ((-0.466249218771+0.646373040484j))*x[2]
            ref[(0, 1, 1, 0)]=(0.851998816893+0.292535490697j)/(o+1.)+((0.440445472367+0.119467682147j))+((-0.707910394641-0.934500395279j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.974614583068+0.170958375918j)*x[0]**o + ((0.694445623242-0.911927154542j))*x[0] + ((-0.348803111059+0.976569260152j))*x[1]**o + ((-0.627906581629-0.284855900356j))*x[1] + ((-0.694427571156+0.634140301202j))*x[2]**o + ((-0.87594113302-0.777904100975j))*x[2]
            ref[(0, 1, 1, 1)]=(-1.04323068222+1.61070956135j)/(o+1.)+((-0.404701045704-0.987343577936j))+((-0.974614583068+0.170958375918j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.905678374755+0.988703655238j)*x[0]**o + ((0.925560898096+0.693492777936j))*x[0] + ((0.648679592172+0.651425054505j))*x[1]**o + ((-0.245179624599-0.218609428407j))*x[1] + ((-0.66167826156-0.459319916773j))*x[2]**o + ((-0.617480303277-0.367825424348j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.0129986693881+0.192105137732j)/(o+1.)+((0.0314504851098+0.0535289625904j))+((-0.905678374755+0.988703655238j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.110550259677-0.744144432444j)*x[0]**o + ((-0.581640540735-0.697652245509j))*x[0] + ((-0.604139466926-0.361932539224j))*x[1]**o + ((-0.257434296677-0.79644826248j))*x[1] + ((-0.718971608998+0.738517151399j))*x[2]**o + ((0.951960180372+0.962761598047j))*x[2]
            ref[(0, 1, 2, 1)]=(-1.32311107592+0.376584612175j)/(o+1.)+((0.0564426714804-0.265669454971j))+((0.110550259677-0.744144432444j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.836828499967+0.0644353635211j)*x[0]**o + ((0.228435600964-0.418840498554j))*x[0] + ((-0.08800765752+0.0672898367437j))*x[1]**o + ((-0.528621069078+0.108076312177j))*x[1] + ((0.120129504622+0.846231128986j))*x[2]**o + ((-0.551672228277-0.650103386738j))*x[2]
            ref[(0, 2, 0, 0)]=(0.0321218471022+0.913520965729j)/(o+1.)+((-0.425928848196-0.480433786557j))+((-0.836828499967+0.0644353635211j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.0659037782455-0.380591450719j)*x[0]**o + ((0.162072508724-0.350603698485j))*x[0] + ((-0.9008002479-0.399572814644j))*x[1]**o + ((0.628902758912-0.595631043206j))*x[1] + ((-0.0672098714226-0.273037826532j))*x[2]**o + ((0.817609432705-0.625329571236j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.968010119323-0.672610641175j)/(o+1.)+((0.804292350171-0.785782156464j))+((0.0659037782455-0.380591450719j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.967366001111+0.520727119858j)*x[0]**o + ((0.55238045596+0.176797199571j))*x[0] + ((0.819947134792+0.324606379033j))*x[1]**o + ((-0.153984685942+0.189713095563j))*x[1] + ((0.0110370156302-0.753705963957j))*x[2]**o + ((-0.871369139105-0.189074843976j))*x[2]
            ref[(0, 2, 1, 0)]=(0.830984150422-0.429099584924j)/(o+1.)+((-0.236486684544+0.088717725579j))+((0.967366001111+0.520727119858j))*0.5**o
            arg[(0, 2, 1, 1)]=(0.209704744005-0.0477485206874j)*x[0]**o + ((0.314075181407-0.777289922217j))*x[0] + ((-0.575882578172+0.103832111604j))*x[1]**o + ((0.0979906169271-0.541178597605j))*x[1] + ((-0.204360908567-0.54515723702j))*x[2]**o + ((-0.831361817145-0.801575412576j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.780243486739-0.441325125416j)/(o+1.)+((-0.209648009406-1.0600219662j))+((0.209704744005-0.0477485206874j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.776000698888+0.468860766956j)*x[0]**o + ((-0.956552900673+0.553109017234j))*x[0] + ((0.364875846592-0.573363784924j))*x[1]**o + ((0.556484767638-0.352662149471j))*x[1] + ((-0.984746432719-0.979589287377j))*x[2]**o + ((-0.139090213579+0.145335361135j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.619870586127-1.5529530723j)/(o+1.)+((-0.269579173307+0.172891114449j))+((-0.776000698888+0.468860766956j))*0.5**o
            arg[(0, 2, 2, 1)]=(0.128184532888+0.388918378368j)*x[0]**o + ((-0.0538970323551+0.920751827705j))*x[0] + ((-0.713545175238+0.782563071634j))*x[1]**o + ((0.356540547381-0.803435708003j))*x[1] + ((0.093848586668-0.106732252588j))*x[2]**o + ((0.547694382542+0.89031439319j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.61969658857+0.675830819046j)/(o+1.)+((0.425168948784+0.503815256446j))+((0.128184532888+0.388918378368j))*0.5**o
            arg[(0, 3, 0, 0)]=(0.597887064852-0.409062071962j)*x[0]**o + ((-0.534215396434+0.402500806306j))*x[0] + ((0.478305327939+0.541832427228j))*x[1]**o + ((0.14313334399+0.467947353636j))*x[1] + ((-0.875787568327-0.335033402793j))*x[2]**o + ((-0.47349722119-0.887832828993j))*x[2]
            ref[(0, 3, 0, 0)]=(-0.397482240389+0.206799024435j)/(o+1.)+((-0.432289636817-0.00869233452563j))+((0.597887064852-0.409062071962j))*0.5**o
            arg[(0, 3, 0, 1)]=(0.705250022087+0.768274226085j)*x[0]**o + ((-0.883369017409-0.783084768477j))*x[0] + ((0.760540425472+0.935497677361j))*x[1]**o + ((-0.91095424149+0.519147165604j))*x[1] + ((-0.473035462383+0.133067037015j))*x[2]**o + ((-0.0572574418291-0.828916231801j))*x[2]
            ref[(0, 3, 0, 1)]=(0.287504963089+1.06856471438j)/(o+1.)+((-0.925790350364-0.546426917337j))+((0.705250022087+0.768274226085j))*0.5**o
            arg[(0, 3, 1, 0)]=(-0.477250259693+0.740652625689j)*x[0]**o + ((0.338395831003+0.738691073815j))*x[0] + ((-0.0864002558917+0.763076389793j))*x[1]**o + ((0.802170881481+0.975396265843j))*x[1] + ((0.17867517521+0.673691463809j))*x[2]**o + ((-0.633937385674-0.659100981727j))*x[2]
            ref[(0, 3, 1, 0)]=(0.092274919318+1.4367678536j)/(o+1.)+((0.253314663405+0.527493178965j))+((-0.477250259693+0.740652625689j))*0.5**o
            arg[(0, 3, 1, 1)]=(-0.367988267126+0.969720592353j)*x[0]**o + ((0.00920704293455-0.71478001525j))*x[0] + ((0.975679095843+0.213195310421j))*x[1]**o + ((-0.0261851747393-0.0882903561206j))*x[1] + ((-0.974017081125+0.681689695317j))*x[2]**o + ((-0.0305532939148+0.316216580127j))*x[2]
            ref[(0, 3, 1, 1)]=(0.00166201471867+0.894885005738j)/(o+1.)+((-0.0237657128598-0.243426895622j))+((-0.367988267126+0.969720592353j))*0.5**o
            arg[(0, 3, 2, 0)]=(-0.900387002822+0.987069271241j)*x[0]**o + ((-0.0559692733337-0.581324134853j))*x[0] + ((0.171717861372-0.389446620758j))*x[1]**o + ((-0.909266397288-0.0542552830729j))*x[1] + ((-0.413715293418+0.330196766904j))*x[2]**o + ((0.603821665925+0.556649889841j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.241997432046-0.0592498538536j)/(o+1.)+((-0.180707002348-0.0394647640425j))+((-0.900387002822+0.987069271241j))*0.5**o
            arg[(0, 3, 2, 1)]=(0.272805896909-0.390864632582j)*x[0]**o + ((-0.984048526141-0.413404059682j))*x[0] + ((0.723073168131-0.723740848326j))*x[1]**o + ((0.480873450646+0.557174977465j))*x[1] + ((0.800158874486+0.416346196256j))*x[2]**o + ((0.207230920561-0.191734623885j))*x[2]
            ref[(0, 3, 2, 1)]=(1.52323204262-0.30739465207j)/(o+1.)+((-0.147972077467-0.0239818530511j))+((0.272805896909-0.390864632582j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.44105614551-0.168280257135j)*x[0]**o + ((-0.878162120155+0.168952003663j))*x[0] + ((0.897039614309+0.686332843321j))*x[1]**o + ((0.0543253342607-0.750070024699j))*x[1] + ((0.45574877715-0.00854451853358j))*x[2]**o + ((-0.308303266921+0.244624671965j))*x[2]
            ref[(1, 0, 0, 0)]=(1.35278839146+0.677788324787j)/(o+1.)+((-0.566070026408-0.168246674535j))+((-0.44105614551-0.168280257135j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.784280888639-0.959312718643j)*x[0]**o + ((-0.812414108955-0.921845635332j))*x[0] + ((-0.621487530694-0.18908376632j))*x[1]**o + ((0.320846194965-0.817626470085j))*x[1] + ((0.211011632968-0.12733777471j))*x[2]**o + ((0.863547360499-0.896558203267j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.410475897726-0.31642154103j)/(o+1.)+((0.185989723255-1.31801515434j))+((-0.784280888639-0.959312718643j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.663656177819-0.175958795553j)*x[0]**o + ((0.966395362507+0.0267875952162j))*x[0] + ((-0.584330152113-0.842203309528j))*x[1]**o + ((-0.754109797634-0.627675104212j))*x[1] + ((-0.414017605869-0.607659745043j))*x[2]**o + ((0.281093335451+0.839837544623j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.998347757982-1.44986305457j)/(o+1.)+((0.246689450161+0.119475017814j))+((0.663656177819-0.175958795553j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.592911732002-0.940024947771j)*x[0]**o + ((-0.318634562849-0.743860700134j))*x[0] + ((0.0909393746888-0.457553849505j))*x[1]**o + ((-0.54403554096-0.391629218669j))*x[1] + ((0.0236084523869-0.258764308099j))*x[2]**o + ((-0.747693189206+0.0179660079519j))*x[2]
            ref[(1, 0, 1, 1)]=(0.114547827076-0.716318157604j)/(o+1.)+((-0.805181646507-0.558761955425j))+((0.592911732002-0.940024947771j))*0.5**o
            arg[(1, 0, 2, 0)]=(0.285160930725+0.232728703911j)*x[0]**o + ((0.0707668317856-0.0243444133966j))*x[0] + ((-0.0272692337551-0.955703081554j))*x[1]**o + ((0.621449364487-0.347117430577j))*x[1] + ((-0.4073964409-0.968654726405j))*x[2]**o + ((0.588021375708+0.954449164391j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.434665674655-1.92435780796j)/(o+1.)+((0.640118785991+0.291493660208j))+((0.285160930725+0.232728703911j))*0.5**o
            arg[(1, 0, 2, 1)]=(-0.348724307627-0.750368866021j)*x[0]**o + ((-0.851657236827+0.214539032366j))*x[0] + ((0.568733159809-0.521969203881j))*x[1]**o + ((0.144400563729-0.580632549838j))*x[1] + ((-0.737460397407+0.357054756228j))*x[2]**o + ((-0.81541736086+0.17427819578j))*x[2]
            ref[(1, 0, 2, 1)]=(-0.168727237598-0.164914447653j)/(o+1.)+((-0.761337016979-0.0959076608462j))+((-0.348724307627-0.750368866021j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.622212514381+0.115674970848j)*x[0]**o + ((0.253657907174+0.0469975686483j))*x[0] + ((-0.323930709614+0.846985022456j))*x[1]**o + ((0.089315979761-0.865502163149j))*x[1] + ((-0.0322493354387-0.443078324796j))*x[2]**o + ((0.110763491012-0.885232911525j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.356180045053+0.40390669766j)/(o+1.)+((0.226868688973-0.851868753013j))+((-0.622212514381+0.115674970848j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.744408867569-0.243072089309j)*x[0]**o + ((0.0535884362029+0.758132919834j))*x[0] + ((0.258864513307-0.271667869981j))*x[1]**o + ((0.290497571801+0.269343863937j))*x[1] + ((-0.836317878784-0.596649318036j))*x[2]**o + ((-0.85133541205+0.935718013652j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.577453365477-0.868317188017j)/(o+1.)+((-0.253624702023+0.981597398712j))+((0.744408867569-0.243072089309j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.288947747811-0.441416703568j)*x[0]**o + ((0.477426518459+0.674832184761j))*x[0] + ((0.788568776064-0.250477127261j))*x[1]**o + ((0.496794552222-0.648548962143j))*x[1] + ((-0.559130287257+0.838098417399j))*x[2]**o + ((-0.562485905991-0.886380312499j))*x[2]
            ref[(1, 1, 1, 0)]=(0.229438488807+0.587621290138j)/(o+1.)+((0.205867582345-0.43004854494j))+((-0.288947747811-0.441416703568j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.588263656592-0.184715986792j)*x[0]**o + ((-0.335711804511-0.301478301883j))*x[0] + ((-0.798940185835+0.964939777164j))*x[1]**o + ((-0.602973006785+0.782417045305j))*x[1] + ((0.768559338049+0.407911428856j))*x[2]**o + ((-0.885531593212+0.469465732474j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.0303808477868+1.37285120602j)/(o+1.)+((-0.912108202254+0.475202237948j))+((0.588263656592-0.184715986792j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.473193075989-0.914317389345j)*x[0]**o + ((-0.481548151572+0.588907858301j))*x[0] + ((0.55779475156-0.808522530729j))*x[1]**o + ((-0.268578785365-0.0275003573467j))*x[1] + ((0.34822632608+0.228259235402j))*x[2]**o + ((-0.40914387962-0.148695060091j))*x[2]
            ref[(1, 1, 2, 0)]=(0.90602107764-0.580263295327j)/(o+1.)+((-0.579635408278+0.206356220432j))+((-0.473193075989-0.914317389345j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.0243591119111-0.369650629722j)*x[0]**o + ((0.95079269146+0.146556224913j))*x[0] + ((-0.756948084563+0.151829865953j))*x[1]**o + ((0.160364002164-0.265725994225j))*x[1] + ((0.663504967166+0.98875251093j))*x[2]**o + ((-0.498480155412+0.502677547297j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.0934431173978+1.14058237688j)/(o+1.)+((0.306338269106+0.191753888992j))+((-0.0243591119111-0.369650629722j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.0501180577618-0.971435218598j)*x[0]**o + ((0.427749932309-0.0250505864617j))*x[0] + ((-0.0103834748587+0.803302901247j))*x[1]**o + ((-0.184761845475+0.126986893926j))*x[1] + ((-0.796448230999+0.97227861528j))*x[2]**o + ((-0.970778548395+0.0768348593197j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.806831705858+1.77558151653j)/(o+1.)+((-0.36389523078+0.0893855833922j))+((-0.0501180577618-0.971435218598j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.183535057811+0.67640687405j)*x[0]**o + ((0.41116467578-0.431123300907j))*x[0] + ((-0.686653924394+0.314202166865j))*x[1]**o + ((0.927794822631+0.011310406343j))*x[1] + ((-0.635094464213+0.781561182649j))*x[2]**o + ((-0.0131751939144+0.550267723981j))*x[2]
            ref[(1, 2, 0, 1)]=(-1.32174838861+1.09576334951j)/(o+1.)+((0.662892152248+0.0652274147081j))+((-0.183535057811+0.67640687405j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.287114204473+0.0788584937965j)*x[0]**o + ((0.892482718031+0.957274631965j))*x[0] + ((0.0949035892772+0.672499158475j))*x[1]**o + ((0.261451016237+0.433674130177j))*x[1] + ((0.114594517455-0.556975865464j))*x[2]**o + ((0.19270699781+0.298198221777j))*x[2]
            ref[(1, 2, 1, 0)]=(0.209498106732+0.115523293012j)/(o+1.)+((0.673320366039+0.84457349196j))+((-0.287114204473+0.0788584937965j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.209317988182+0.454307478156j)*x[0]**o + ((0.0987792701384-0.447067328338j))*x[0] + ((-0.666507647934+0.880623732512j))*x[1]**o + ((-0.415610274231-0.811640984175j))*x[1] + ((-0.180307512215+0.150301064292j))*x[2]**o + ((0.0214661106703-0.497761685734j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.84681516015+1.0309247968j)/(o+1.)+((-0.147682446711-0.878234999123j))+((-0.209317988182+0.454307478156j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.069841918699-0.0916006133487j)*x[0]**o + ((0.717640562477-0.0154171622079j))*x[0] + ((-0.841120014321-0.696551319891j))*x[1]**o + ((0.612897901422+0.24187343223j))*x[1] + ((-0.405310555344+0.13508633718j))*x[2]**o + ((0.694447591181+0.0842944047562j))*x[2]
            ref[(1, 2, 2, 0)]=(-1.24643056966-0.561464982711j)/(o+1.)+((1.01249302754+0.155375337389j))+((-0.069841918699-0.0916006133487j))*0.5**o
            arg[(1, 2, 2, 1)]=(-0.323390783244-0.796225812494j)*x[0]**o + ((0.38895940411+0.255627694315j))*x[0] + ((-0.488154045445-0.425074119667j))*x[1]**o + ((-0.458205325963-0.186804853111j))*x[1] + ((0.684405174566-0.278690763901j))*x[2]**o + ((-0.216189158398-0.182276664287j))*x[2]
            ref[(1, 2, 2, 1)]=(0.196251129122-0.703764883567j)/(o+1.)+((-0.142717540126-0.0567269115413j))+((-0.323390783244-0.796225812494j))*0.5**o
            arg[(1, 3, 0, 0)]=(0.0808665594101+0.612296736899j)*x[0]**o + ((-0.643057031736-0.294221277439j))*x[0] + ((-0.956063723391-0.853527904494j))*x[1]**o + ((-0.401396165807+0.597591927121j))*x[1] + ((0.2492372385+0.0383498021381j))*x[2]**o + ((-0.819548507634-0.106626287605j))*x[2]
            ref[(1, 3, 0, 0)]=(-0.706826484891-0.815178102356j)/(o+1.)+((-0.932000852589+0.0983721810382j))+((0.0808665594101+0.612296736899j))*0.5**o
            arg[(1, 3, 0, 1)]=(-0.324811996125-0.905343501382j)*x[0]**o + ((0.243280970193-0.0219750014325j))*x[0] + ((-0.416497166896-0.681765538854j))*x[1]**o + ((-0.182622491149-0.0963350053469j))*x[1] + ((-0.366025979314+0.458401551189j))*x[2]**o + ((-0.952067493009+0.476117951168j))*x[2]
            ref[(1, 3, 0, 1)]=(-0.78252314621-0.223363987665j)/(o+1.)+((-0.445704506982+0.178903972194j))+((-0.324811996125-0.905343501382j))*0.5**o
            arg[(1, 3, 1, 0)]=(-0.936392400483-0.403881569067j)*x[0]**o + ((-0.38607043697-0.682533904441j))*x[0] + ((-0.288367732102+0.223723244234j))*x[1]**o + ((-0.596198273535-0.0470165729808j))*x[1] + ((0.713303932593+0.188174884362j))*x[2]**o + ((-0.410180395673-0.751674346185j))*x[2]
            ref[(1, 3, 1, 0)]=(0.424936200491+0.411898128596j)/(o+1.)+((-0.696224553089-0.740612411803j))+((-0.936392400483-0.403881569067j))*0.5**o
            arg[(1, 3, 1, 1)]=(-0.355610678067+0.0119088080679j)*x[0]**o + ((0.52981806522+0.598587217335j))*x[0] + ((0.615604921835+0.210554638666j))*x[1]**o + ((-0.0205177670326+0.716729644631j))*x[1] + ((-0.300588291265+0.0817953783051j))*x[2]**o + ((-0.621214732478-0.588223483477j))*x[2]
            ref[(1, 3, 1, 1)]=(0.31501663057+0.292350016971j)/(o+1.)+((-0.0559572171453+0.363546689245j))+((-0.355610678067+0.0119088080679j))*0.5**o
            arg[(1, 3, 2, 0)]=(0.483437196008+0.465359252591j)*x[0]**o + ((-0.308695208748+0.332884384579j))*x[0] + ((-0.951282688111-0.914210915605j))*x[1]**o + ((0.14693229795+0.419032108024j))*x[1] + ((0.854347846188-0.977352867471j))*x[2]**o + ((-0.480638837139+0.830968375754j))*x[2]
            ref[(1, 3, 2, 0)]=(-0.0969348419228-1.89156378308j)/(o+1.)+((-0.321200873969+0.791442434179j))+((0.483437196008+0.465359252591j))*0.5**o
            arg[(1, 3, 2, 1)]=(0.811540685296-0.601340471487j)*x[0]**o + ((-0.900787397769+0.161965416217j))*x[0] + ((-0.202925638369-0.306663137356j))*x[1]**o + ((0.117267920172-0.128127333691j))*x[1] + ((-0.985162097946+0.273413256556j))*x[2]**o + ((-0.647533924747-0.907470664396j))*x[2]
            ref[(1, 3, 2, 1)]=(-1.18808773631-0.0332498808005j)/(o+1.)+((-0.715526701172-0.436816290935j))+((0.811540685296-0.601340471487j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.807428392526+0.572164579485j)*x[0]**o + ((-0.791162676289+0.569868292078j))*x[0] + ((0.79257980609-0.384810326395j))*x[1]**o + ((0.585206986204+0.118433885098j))*x[1]
            ref=(0.79257980609-0.384810326395j)/(o+1.)+((-0.102977845043+0.344151088588j))+((0.807428392526+0.572164579485j))*0.5**o
        else:
            arg=(-0.193636453015+0.992832756154j)*x[0]**o + ((-0.600098862078-0.725631554365j))*x[0] + ((-0.47635216338-0.942499635928j))*x[1]**o + ((-0.0548266474951+0.726060630801j))*x[1] + ((-0.0432463020845+0.095705997367j))*x[2]**o + ((-0.564495514834-0.269446828973j))*x[2]
            ref=(-0.519598465465-0.846793638561j)/(o+1.)+((-0.609710512204-0.134508876269j))+((-0.193636453015+0.992832756154j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.339996365895+0.152532530897j)*x[0]**o + ((-0.951515634722+0.252528661754j))*x[0] + ((-0.569227258257-0.838516082017j))*x[1]**o + ((-0.896321003468-0.861170505105j))*x[1]
            ref[(0,)]=(-0.569227258257-0.838516082017j)/(o+1.)+((-0.923918319095-0.304320921675j))+((-0.339996365895+0.152532530897j))*0.5**o
            arg[(1,)]=(0.876371725899+0.701776505935j)*x[0]**o + ((-0.813080310993+0.376197808767j))*x[0] + ((0.259997882257-0.943635039444j))*x[1]**o + ((-0.152070067689+0.893191177467j))*x[1]
            ref[(1,)]=(0.259997882257-0.943635039444j)/(o+1.)+((-0.482575189341+0.634694493117j))+((0.876371725899+0.701776505935j))*0.5**o
        else:
            arg[(0,)]=(0.235671186966+0.822347046953j)*x[0]**o + ((-0.423248727016+0.159506123481j))*x[0] + ((0.657152602209-0.392662716242j))*x[1]**o + ((-0.575497358065+0.241368862185j))*x[1] + ((-0.870475963322-0.0719841370076j))*x[2]**o + ((-0.473385376555-0.536995672143j))*x[2]
            ref[(0,)]=(-0.213323361113-0.464646853249j)/(o+1.)+((-0.736065730818-0.0680603432388j))+((0.235671186966+0.822347046953j))*0.5**o
            arg[(1,)]=(-0.434722849845-0.215430162542j)*x[0]**o + ((0.92297416548-0.613426536229j))*x[0] + ((-0.407574940961-0.284696530286j))*x[1]**o + ((0.219641865663-0.110234790808j))*x[1] + ((0.591335219167+0.146959066996j))*x[2]**o + ((0.530233771376-0.808732804316j))*x[2]
            ref[(1,)]=(0.183760278206-0.13773746329j)/(o+1.)+((0.83642490126-0.766197065677j))+((-0.434722849845-0.215430162542j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref=numpy.zeros((2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.421895069389-0.317846801194j)*x[0]**o + ((0.208383676246+0.496932505567j))*x[0] + ((-0.584032168711-0.105887494536j))*x[1]**o + ((0.45437443607+0.0914498254253j))*x[1]
            ref[(0, 0)]=(-0.584032168711-0.105887494536j)/(o+1.)+((0.331379056158+0.294191165496j))+((-0.421895069389-0.317846801194j))*0.5**o
            arg[(0, 1)]=(0.590434985741-0.511481393305j)*x[0]**o + ((0.461542209971+0.652032581096j))*x[0] + ((-0.0254114170263-0.101374083754j))*x[1]**o + ((0.549371236293+0.446042590218j))*x[1]
            ref[(0, 1)]=(-0.0254114170263-0.101374083754j)/(o+1.)+((0.505456723132+0.549037585657j))+((0.590434985741-0.511481393305j))*0.5**o
            arg[(0, 2)]=(-0.961939579609-0.800160369936j)*x[0]**o + ((0.70733291874-0.962514569943j))*x[0] + ((0.938578287782-0.840870623524j))*x[1]**o + ((0.195515686703+0.236774060415j))*x[1]
            ref[(0, 2)]=(0.938578287782-0.840870623524j)/(o+1.)+((0.451424302721-0.362870254764j))+((-0.961939579609-0.800160369936j))*0.5**o
            arg[(1, 0)]=(-0.0619238160589-0.612605562098j)*x[0]**o + ((-0.147912319812+0.526625708132j))*x[0] + ((0.209654173261+0.56553447533j))*x[1]**o + ((0.755526989473-0.684917207045j))*x[1]
            ref[(1, 0)]=(0.209654173261+0.56553447533j)/(o+1.)+((0.30380733483-0.0791457494563j))+((-0.0619238160589-0.612605562098j))*0.5**o
            arg[(1, 1)]=(-0.771497943484+0.485214501944j)*x[0]**o + ((-0.359683329683-0.894644319763j))*x[0] + ((-0.361124996823+0.653594638521j))*x[1]**o + ((-0.563584190273+0.483670360855j))*x[1]
            ref[(1, 1)]=(-0.361124996823+0.653594638521j)/(o+1.)+((-0.461633759978-0.205486979454j))+((-0.771497943484+0.485214501944j))*0.5**o
            arg[(1, 2)]=(-0.88115489778+0.706740365874j)*x[0]**o + ((-0.37016386093+0.746086148873j))*x[0] + ((0.31605345287-0.658991493342j))*x[1]**o + ((-0.166870389534-0.888480144669j))*x[1]
            ref[(1, 2)]=(0.31605345287-0.658991493342j)/(o+1.)+((-0.268517125232-0.0711969978979j))+((-0.88115489778+0.706740365874j))*0.5**o
        else:
            arg[(0, 0)]=(-0.179671495804-0.255808432091j)*x[0]**o + ((0.199828723728-0.640649903709j))*x[0] + ((0.785572621603+0.466358623576j))*x[1]**o + ((0.614696181579-0.222268352043j))*x[1] + ((-0.695296987478+0.468457930088j))*x[2]**o + ((0.506804980819+0.325811986668j))*x[2]
            ref[(0, 0)]=(0.0902756341241+0.934816553663j)/(o+1.)+((0.660664943063-0.268553134542j))+((-0.179671495804-0.255808432091j))*0.5**o
            arg[(0, 1)]=(-0.26218164915+0.765249487477j)*x[0]**o + ((-0.768414972951+0.557965510845j))*x[0] + ((-0.346542387676-0.382426501818j))*x[1]**o + ((-0.0936670263195-0.644911723565j))*x[1] + ((0.84655796003-0.953826550999j))*x[2]**o + ((0.713934197953-0.618213676343j))*x[2]
            ref[(0, 1)]=(0.500015572354-1.33625305282j)/(o+1.)+((-0.074073900659-0.352579944532j))+((-0.26218164915+0.765249487477j))*0.5**o
            arg[(0, 2)]=(-0.638235736687+0.272532848068j)*x[0]**o + ((0.468324651376+0.799386339558j))*x[0] + ((0.371556613317+0.0256397719567j))*x[1]**o + ((-0.616114978903+0.666924486215j))*x[1] + ((-0.653572159966-0.0296526461221j))*x[2]**o + ((-0.904330115074-0.569072469292j))*x[2]
            ref[(0, 2)]=(-0.282015546649-0.00401287416545j)/(o+1.)+((-0.5260602213+0.448619178241j))+((-0.638235736687+0.272532848068j))*0.5**o
            arg[(1, 0)]=(0.73647989156+0.977760417102j)*x[0]**o + ((-0.263066004657-0.628012965785j))*x[0] + ((0.0827538573582-0.410026840956j))*x[1]**o + ((0.203282897769+0.766214553693j))*x[1] + ((-0.578794817643+0.25727907863j))*x[2]**o + ((0.107112106038-0.961788627251j))*x[2]
            ref[(1, 0)]=(-0.496040960284-0.152747762326j)/(o+1.)+((0.023664499575-0.411793519672j))+((0.73647989156+0.977760417102j))*0.5**o
            arg[(1, 1)]=(-0.470157303658+0.839795564999j)*x[0]**o + ((-0.530015452485+0.0937230633399j))*x[0] + ((-0.898571824483+0.746080461207j))*x[1]**o + ((0.999167428674+0.935067752027j))*x[1] + ((0.69797695483+0.545590436058j))*x[2]**o + ((-0.97025267894-0.804217979381j))*x[2]
            ref[(1, 1)]=(-0.200594869653+1.29167089727j)/(o+1.)+((-0.250550351375+0.112286417993j))+((-0.470157303658+0.839795564999j))*0.5**o
            arg[(1, 2)]=(0.363882803465+0.199956275013j)*x[0]**o + ((-0.675371321186-0.490663526009j))*x[0] + ((0.238423958566-0.353642534222j))*x[1]**o + ((-0.404046224095+0.939445243131j))*x[1] + ((-0.0872447475168-0.980332939247j))*x[2]**o + ((0.158865726285-0.979217814266j))*x[2]
            ref[(1, 2)]=(0.151179211049-1.33397547347j)/(o+1.)+((-0.460275909498-0.265218048572j))+((0.363882803465+0.199956275013j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3),w)
        ref=numpy.zeros((3, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.967540189532+0.454656688991j)*x[0]**o + ((-0.215481950325+0.356869105923j))*x[0] + ((0.516851526032+0.607783537974j))*x[1]**o + ((-0.841680728245-0.00734974288221j))*x[1]
            ref[(0, 0, 0)]=(0.516851526032+0.607783537974j)/(o+1.)+((-0.528581339285+0.174759681521j))+((0.967540189532+0.454656688991j))*0.5**o
            arg[(0, 0, 1)]=(0.110215957158+0.87001665904j)*x[0]**o + ((0.21058179115+0.941475702187j))*x[0] + ((0.910480379364-0.71112629293j))*x[1]**o + ((0.00467838122818-0.736231448393j))*x[1]
            ref[(0, 0, 1)]=(0.910480379364-0.71112629293j)/(o+1.)+((0.107630086189+0.102622126897j))+((0.110215957158+0.87001665904j))*0.5**o
            arg[(0, 0, 2)]=(-0.371826042432+0.378437318556j)*x[0]**o + ((-0.163179036084+0.230116130432j))*x[0] + ((0.218449799964-0.119456128978j))*x[1]**o + ((-0.941267049616-0.865776628328j))*x[1]
            ref[(0, 0, 2)]=(0.218449799964-0.119456128978j)/(o+1.)+((-0.55222304285-0.317830248948j))+((-0.371826042432+0.378437318556j))*0.5**o
            arg[(0, 1, 0)]=(-0.287628880696+0.192693293087j)*x[0]**o + ((0.392684070108-0.477151349964j))*x[0] + ((-0.0764741696978-0.466071126139j))*x[1]**o + ((0.719503899548-0.550966887615j))*x[1]
            ref[(0, 1, 0)]=(-0.0764741696978-0.466071126139j)/(o+1.)+((0.556093984828-0.51405911879j))+((-0.287628880696+0.192693293087j))*0.5**o
            arg[(0, 1, 1)]=(-0.723986359239-0.400097739927j)*x[0]**o + ((0.842073720411+0.291457619183j))*x[0] + ((0.521967378637+0.892765700294j))*x[1]**o + ((-0.555604342773+0.865732055809j))*x[1]
            ref[(0, 1, 1)]=(0.521967378637+0.892765700294j)/(o+1.)+((0.143234688819+0.578594837496j))+((-0.723986359239-0.400097739927j))*0.5**o
            arg[(0, 1, 2)]=(-0.18768986626-0.083494362663j)*x[0]**o + ((0.387595823507+0.468251460258j))*x[0] + ((-0.809853313358-0.336809055887j))*x[1]**o + ((0.96942830058+0.124416452159j))*x[1]
            ref[(0, 1, 2)]=(-0.809853313358-0.336809055887j)/(o+1.)+((0.678512062043+0.296333956209j))+((-0.18768986626-0.083494362663j))*0.5**o
            arg[(1, 0, 0)]=(0.227453128114-0.539448967374j)*x[0]**o + ((0.480954198307+0.516720682635j))*x[0] + ((-0.483622360068+0.536456597979j))*x[1]**o + ((0.445263065503-0.035214460549j))*x[1]
            ref[(1, 0, 0)]=(-0.483622360068+0.536456597979j)/(o+1.)+((0.463108631905+0.240753111043j))+((0.227453128114-0.539448967374j))*0.5**o
            arg[(1, 0, 1)]=(-0.784982839562+0.712137707239j)*x[0]**o + ((0.64177122098-0.500506682055j))*x[0] + ((0.955385086385+0.521655555222j))*x[1]**o + ((-0.621336956434+0.00445407695897j))*x[1]
            ref[(1, 0, 1)]=(0.955385086385+0.521655555222j)/(o+1.)+((0.0102171322729-0.248026302548j))+((-0.784982839562+0.712137707239j))*0.5**o
            arg[(1, 0, 2)]=(-0.577258623679+0.33011765792j)*x[0]**o + ((-0.0116185218559-0.663638133444j))*x[0] + ((0.0451494486209-0.0241908466787j))*x[1]**o + ((-0.140347821974-0.504450806535j))*x[1]
            ref[(1, 0, 2)]=(0.0451494486209-0.0241908466787j)/(o+1.)+((-0.075983171915-0.584044469989j))+((-0.577258623679+0.33011765792j))*0.5**o
            arg[(1, 1, 0)]=(-0.976282703393+0.3995476758j)*x[0]**o + ((-0.724814756121+0.153172379825j))*x[0] + ((0.497631460591+0.829145221231j))*x[1]**o + ((0.436517583002+0.433032927786j))*x[1]
            ref[(1, 1, 0)]=(0.497631460591+0.829145221231j)/(o+1.)+((-0.14414858656+0.293102653805j))+((-0.976282703393+0.3995476758j))*0.5**o
            arg[(1, 1, 1)]=(0.35370240594-0.337187238064j)*x[0]**o + ((0.428427284738+0.673877231862j))*x[0] + ((0.869072616698-0.858800287459j))*x[1]**o + ((0.766316977711-0.905740489924j))*x[1]
            ref[(1, 1, 1)]=(0.869072616698-0.858800287459j)/(o+1.)+((0.597372131225-0.115931629031j))+((0.35370240594-0.337187238064j))*0.5**o
            arg[(1, 1, 2)]=(-0.595542549994+0.959059966407j)*x[0]**o + ((0.144074682841-0.635149922155j))*x[0] + ((-0.768050529068-0.605119511287j))*x[1]**o + ((0.931350144617+0.635468013471j))*x[1]
            ref[(1, 1, 2)]=(-0.768050529068-0.605119511287j)/(o+1.)+((0.537712413729+0.000159045657874j))+((-0.595542549994+0.959059966407j))*0.5**o
            arg[(2, 0, 0)]=(0.368816478767+0.501131161901j)*x[0]**o + ((-0.758028382072-0.157193676294j))*x[0] + ((0.274251650067-0.637850625463j))*x[1]**o + ((0.945663336635+0.795699253433j))*x[1]
            ref[(2, 0, 0)]=(0.274251650067-0.637850625463j)/(o+1.)+((0.0938174772819+0.31925278857j))+((0.368816478767+0.501131161901j))*0.5**o
            arg[(2, 0, 1)]=(0.916073050972+0.919068747609j)*x[0]**o + ((0.0141469783979-0.662890313213j))*x[0] + ((-0.274428184903-0.265609893112j))*x[1]**o + ((-0.0488226517857+0.990239994157j))*x[1]
            ref[(2, 0, 1)]=(-0.274428184903-0.265609893112j)/(o+1.)+((-0.0173378366939+0.163674840472j))+((0.916073050972+0.919068747609j))*0.5**o
            arg[(2, 0, 2)]=(-0.574323512644+0.589213020752j)*x[0]**o + ((-0.504446126478+0.692547472716j))*x[0] + ((-0.807424849394+0.363632444856j))*x[1]**o + ((-0.894148313469+0.262332767084j))*x[1]
            ref[(2, 0, 2)]=(-0.807424849394+0.363632444856j)/(o+1.)+((-0.699297219973+0.4774401199j))+((-0.574323512644+0.589213020752j))*0.5**o
            arg[(2, 1, 0)]=(0.31159664637+0.351340332007j)*x[0]**o + ((0.894432212103-0.943558956063j))*x[0] + ((-0.987181503669+0.46486525211j))*x[1]**o + ((-0.0431058998766-0.434650810379j))*x[1]
            ref[(2, 1, 0)]=(-0.987181503669+0.46486525211j)/(o+1.)+((0.425663156113-0.689104883221j))+((0.31159664637+0.351340332007j))*0.5**o
            arg[(2, 1, 1)]=(0.171512498978+0.57031770148j)*x[0]**o + ((-0.51187853175+0.109022848067j))*x[0] + ((0.191609171274-0.0155602622771j))*x[1]**o + ((0.637196919846+0.855425348066j))*x[1]
            ref[(2, 1, 1)]=(0.191609171274-0.0155602622771j)/(o+1.)+((0.0626591940484+0.482224098066j))+((0.171512498978+0.57031770148j))*0.5**o
            arg[(2, 1, 2)]=(0.513073452326+0.237558632402j)*x[0]**o + ((0.416757829336-0.702663029208j))*x[0] + ((0.405722101466+0.212741850217j))*x[1]**o + ((0.514030836857+0.485342446149j))*x[1]
            ref[(2, 1, 2)]=(0.405722101466+0.212741850217j)/(o+1.)+((0.465394333097-0.10866029153j))+((0.513073452326+0.237558632402j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.695092139065-0.321403692497j)*x[0]**o + ((0.785214602259+0.971576790738j))*x[0] + ((0.401092349422+0.747271420139j))*x[1]**o + ((-0.91409191303+0.769285417879j))*x[1] + ((-0.0668018825744+0.432720020374j))*x[2]**o + ((-0.919322360016-0.567247113468j))*x[2]
            ref[(0, 0, 0)]=(0.334290466847+1.17999144051j)/(o+1.)+((-0.524099835393+0.586807547574j))+((-0.695092139065-0.321403692497j))*0.5**o
            arg[(0, 0, 1)]=(-0.952789421797-0.0426639539547j)*x[0]**o + ((0.0355315039482-0.219272973891j))*x[0] + ((0.00421394399921-0.561556711459j))*x[1]**o + ((-0.372318998793-0.07224505822j))*x[1] + ((-0.294024896955+0.138961381676j))*x[2]**o + ((-0.954076539133-0.470135179102j))*x[2]
            ref[(0, 0, 1)]=(-0.289810952956-0.422595329783j)/(o+1.)+((-0.645432016989-0.380826605607j))+((-0.952789421797-0.0426639539547j))*0.5**o
            arg[(0, 0, 2)]=(-0.208971009334-0.971078826901j)*x[0]**o + ((-0.833404663005-0.638589790617j))*x[0] + ((0.499771030203+0.404481405065j))*x[1]**o + ((0.19328982038-0.97916725624j))*x[1] + ((-0.857834194758-0.800376218935j))*x[2]**o + ((-0.868803039668+0.500717226569j))*x[2]
            ref[(0, 0, 2)]=(-0.358063164555-0.39589481387j)/(o+1.)+((-0.754458941147-0.558519910144j))+((-0.208971009334-0.971078826901j))*0.5**o
            arg[(0, 1, 0)]=(0.628177893172-0.117055058311j)*x[0]**o + ((0.706476579796+0.0265569860132j))*x[0] + ((-0.945472229325+0.0827871218111j))*x[1]**o + ((0.911347092129+0.416134339966j))*x[1] + ((0.0903747462155-0.790921700252j))*x[2]**o + ((0.561744856949+0.569563310596j))*x[2]
            ref[(0, 1, 0)]=(-0.855097483109-0.70813457844j)/(o+1.)+((1.08978426444+0.506127318287j))+((0.628177893172-0.117055058311j))*0.5**o
            arg[(0, 1, 1)]=(0.106129068424+0.679236347761j)*x[0]**o + ((0.489342438919-0.997611630539j))*x[0] + ((-0.298272818195-0.952363006116j))*x[1]**o + ((0.789485758518-0.0284911309086j))*x[1] + ((0.160431214398-0.962271380483j))*x[2]**o + ((0.277869971708-0.876088547037j))*x[2]
            ref[(0, 1, 1)]=(-0.137841603798-1.9146343866j)/(o+1.)+((0.778349084572-0.951095654243j))+((0.106129068424+0.679236347761j))*0.5**o
            arg[(0, 1, 2)]=(-0.0878068604513-0.350106678657j)*x[0]**o + ((-0.96399369548-0.595788237129j))*x[0] + ((-0.922519465674-0.845123265004j))*x[1]**o + ((0.134248993527+0.137471736991j))*x[1] + ((-0.0689683869106+0.83977293555j))*x[2]**o + ((-0.976427283944-0.913974919696j))*x[2]
            ref[(0, 1, 2)]=(-0.991487852585-0.00535032945417j)/(o+1.)+((-0.903085992948-0.686145709917j))+((-0.0878068604513-0.350106678657j))*0.5**o
            arg[(1, 0, 0)]=(0.895946002322+0.508950707394j)*x[0]**o + ((0.116065553906+0.714611194114j))*x[0] + ((-0.261533581315+0.330142371866j))*x[1]**o + ((0.38331992147+0.521224642086j))*x[1] + ((-0.656785629328-0.800589703625j))*x[2]**o + ((0.472022090276-0.736250710864j))*x[2]
            ref[(1, 0, 0)]=(-0.918319210644-0.470447331758j)/(o+1.)+((0.485703782826+0.249792562668j))+((0.895946002322+0.508950707394j))*0.5**o
            arg[(1, 0, 1)]=(0.504264085489+0.740513184868j)*x[0]**o + ((0.62680584837+0.796172118469j))*x[0] + ((0.592236021816-0.266763820651j))*x[1]**o + ((-0.271707070929+0.268910109264j))*x[1] + ((-0.158047138769-0.0155813753061j))*x[2]**o + ((0.79061554294-0.151049516638j))*x[2]
            ref[(1, 0, 1)]=(0.434188883047-0.282345195957j)/(o+1.)+((0.57285716019+0.457016355548j))+((0.504264085489+0.740513184868j))*0.5**o
            arg[(1, 0, 2)]=(-0.261904470984-0.0781823560058j)*x[0]**o + ((-0.600895007202+0.670043880442j))*x[0] + ((0.454906249677+0.89497946808j))*x[1]**o + ((-0.418040203478+0.287764067706j))*x[1] + ((0.0713417540902-0.808395485066j))*x[2]**o + ((-0.305862921795-0.230282327788j))*x[2]
            ref[(1, 0, 2)]=(0.526248003767+0.0865839830132j)/(o+1.)+((-0.662399066238+0.36376281018j))+((-0.261904470984-0.0781823560058j))*0.5**o
            arg[(1, 1, 0)]=(0.17040659434+0.489661185219j)*x[0]**o + ((-0.982503351328+0.558918581869j))*x[0] + ((-0.782780299555-0.752979542955j))*x[1]**o + ((-0.382570003052-0.422409549674j))*x[1] + ((0.765218074694+0.0573078637247j))*x[2]**o + ((-0.209080684811-0.33994236489j))*x[2]
            ref[(1, 1, 0)]=(-0.0175622248614-0.69567167923j)/(o+1.)+((-0.787077019595-0.101716666348j))+((0.17040659434+0.489661185219j))*0.5**o
            arg[(1, 1, 1)]=(-0.732550178657-0.664391130247j)*x[0]**o + ((0.713915835368+0.07936301787j))*x[0] + ((0.872593923937-0.147451694998j))*x[1]**o + ((0.0174052319906+0.373592418723j))*x[1] + ((-0.141718628302+0.640115110973j))*x[2]**o + ((0.352760041986+0.3751426894j))*x[2]
            ref[(1, 1, 1)]=(0.730875295636+0.492663415975j)/(o+1.)+((0.542040554672+0.414049062996j))+((-0.732550178657-0.664391130247j))*0.5**o
            arg[(1, 1, 2)]=(0.609828027531+0.95386669939j)*x[0]**o + ((-0.392794659604-0.357881707102j))*x[0] + ((-0.917937621361-0.817825406508j))*x[1]**o + ((-0.982113296136+0.5640151965j))*x[1] + ((-0.025254697114-0.203723485448j))*x[2]**o + ((-0.0813912179091+0.303318040365j))*x[2]
            ref[(1, 1, 2)]=(-0.943192318475-1.02154889196j)/(o+1.)+((-0.728149586824+0.254725764882j))+((0.609828027531+0.95386669939j))*0.5**o
            arg[(2, 0, 0)]=(-0.0206364814079+0.826455459535j)*x[0]**o + ((-0.981167401486+0.460158756674j))*x[0] + ((-0.150085236226-0.148591836028j))*x[1]**o + ((0.00367293540529-0.666764066973j))*x[1] + ((-0.668050551732+0.517083058281j))*x[2]**o + ((-0.49397682997+0.603550449032j))*x[2]
            ref[(2, 0, 0)]=(-0.818135787958+0.368491222253j)/(o+1.)+((-0.735735648025+0.198472569366j))+((-0.0206364814079+0.826455459535j))*0.5**o
            arg[(2, 0, 1)]=(0.366117791728-0.541872681012j)*x[0]**o + ((-0.720316070084-0.749827451977j))*x[0] + ((0.458031185472-0.926914471063j))*x[1]**o + ((-0.951078066812+0.610049709391j))*x[1] + ((-0.110801783557-0.532502043511j))*x[2]**o + ((0.780241905118-0.146038746679j))*x[2]
            ref[(2, 0, 1)]=(0.347229401914-1.45941651457j)/(o+1.)+((-0.445576115889-0.142908244633j))+((0.366117791728-0.541872681012j))*0.5**o
            arg[(2, 0, 2)]=(0.5400101264+0.0971971920201j)*x[0]**o + ((-0.245271551589-0.784797005878j))*x[0] + ((-0.247419633457+0.135542395223j))*x[1]**o + ((-0.583910515654-0.977959490683j))*x[1] + ((-0.221813839149-0.963282959279j))*x[2]**o + ((-0.271007327002-0.315885657683j))*x[2]
            ref[(2, 0, 2)]=(-0.469233472606-0.827740564056j)/(o+1.)+((-0.550094697123-1.03932107712j))+((0.5400101264+0.0971971920201j))*0.5**o
            arg[(2, 1, 0)]=(-0.082424229822-0.910242195522j)*x[0]**o + ((-0.337660648443+0.361567365118j))*x[0] + ((-0.0243998361051-0.528579479221j))*x[1]**o + ((-0.228472905084+0.631839721982j))*x[1] + ((-0.885142963568-0.372465861162j))*x[2]**o + ((0.878410715364-0.505886530168j))*x[2]
            ref[(2, 1, 0)]=(-0.909542799673-0.901045340383j)/(o+1.)+((0.156138580919+0.243760278466j))+((-0.082424229822-0.910242195522j))*0.5**o
            arg[(2, 1, 1)]=(-0.696756292135+0.721374389688j)*x[0]**o + ((-0.226674974042+0.287772875941j))*x[0] + ((0.57628857505-0.977309697284j))*x[1]**o + ((0.94590578436-0.517360226457j))*x[1] + ((0.922186664046+0.132710997874j))*x[2]**o + ((0.624538215713+0.768559409958j))*x[2]
            ref[(2, 1, 1)]=(1.4984752391-0.84459869941j)/(o+1.)+((0.671884513016+0.269486029721j))+((-0.696756292135+0.721374389688j))*0.5**o
            arg[(2, 1, 2)]=(0.404543842577+0.138355699959j)*x[0]**o + ((0.95621886581-0.347621489092j))*x[0] + ((-0.537803336571+0.639038047206j))*x[1]**o + ((-0.0274322352067+0.229486203261j))*x[1] + ((0.791335719788+0.158475195965j))*x[2]**o + ((0.119733617705-0.107681970351j))*x[2]
            ref[(2, 1, 2)]=(0.253532383217+0.797513243171j)/(o+1.)+((0.524260124154-0.112908628091j))+((0.404543842577+0.138355699959j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 3, 4),w)
        ref=numpy.zeros((2, 4, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.23411796126-0.731762243194j)*x[0]**o + ((0.271605752529+0.320775364091j))*x[0] + ((0.166418290633-0.60815960106j))*x[1]**o + ((-0.549135383119-0.25531069329j))*x[1]
            ref[(0, 0, 0, 0)]=(0.166418290633-0.60815960106j)/(o+1.)+((-0.138764815295+0.0327323354003j))+((-0.23411796126-0.731762243194j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.592833938447-0.82374962919j)*x[0]**o + ((-0.617868209124+0.990714328247j))*x[0] + ((0.474444187149-0.406479048055j))*x[1]**o + ((-0.97772992789+0.413081749199j))*x[1]
            ref[(0, 0, 0, 1)]=(0.474444187149-0.406479048055j)/(o+1.)+((-0.797799068507+0.701898038723j))+((-0.592833938447-0.82374962919j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.643157017998-0.624643598552j)*x[0]**o + ((-0.00185392677219+0.219856220443j))*x[0] + ((-0.639114828792+0.357193646029j))*x[1]**o + ((0.928500750934-0.443112236269j))*x[1]
            ref[(0, 0, 0, 2)]=(-0.639114828792+0.357193646029j)/(o+1.)+((0.463323412081-0.111628007913j))+((-0.643157017998-0.624643598552j))*0.5**o
            arg[(0, 0, 0, 3)]=(-0.163997434317+0.559156957842j)*x[0]**o + ((-0.374592074499-0.775721435149j))*x[0] + ((0.901315797229-0.597217029046j))*x[1]**o + ((-0.199663407063-0.00847485465264j))*x[1]
            ref[(0, 0, 0, 3)]=(0.901315797229-0.597217029046j)/(o+1.)+((-0.287127740781-0.392098144901j))+((-0.163997434317+0.559156957842j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.277383929173-0.23359496441j)*x[0]**o + ((-0.257622488408+0.7400567506j))*x[0] + ((-0.0217147874441-0.291210848996j))*x[1]**o + ((-0.599192088301-0.390153941096j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.0217147874441-0.291210848996j)/(o+1.)+((-0.428407288355+0.174951404752j))+((0.277383929173-0.23359496441j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.263635119705+0.69684478768j)*x[0]**o + ((0.911972140227-0.263209940958j))*x[0] + ((0.174302009943-0.671557147109j))*x[1]**o + ((0.595252580611+0.629003633231j))*x[1]
            ref[(0, 0, 1, 1)]=(0.174302009943-0.671557147109j)/(o+1.)+((0.753612360419+0.182896846137j))+((-0.263635119705+0.69684478768j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.732424710116+0.276948442104j)*x[0]**o + ((-0.870395209944+0.880950968348j))*x[0] + ((-0.432757661846+0.279566854702j))*x[1]**o + ((-0.668469488345-0.3050404874j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.432757661846+0.279566854702j)/(o+1.)+((-0.769432349145+0.287955240474j))+((0.732424710116+0.276948442104j))*0.5**o
            arg[(0, 0, 1, 3)]=(0.0865485199077+0.624935141127j)*x[0]**o + ((-0.922291162902+0.25334229285j))*x[0] + ((0.190324619853+0.291867226671j))*x[1]**o + ((-0.130508424367+0.0616585301935j))*x[1]
            ref[(0, 0, 1, 3)]=(0.190324619853+0.291867226671j)/(o+1.)+((-0.526399793634+0.157500411522j))+((0.0865485199077+0.624935141127j))*0.5**o
            arg[(0, 0, 2, 0)]=(0.0172332963169+0.153360974154j)*x[0]**o + ((0.459570805511+0.92300370544j))*x[0] + ((0.922522960746-0.107489762493j))*x[1]**o + ((0.205011026554+0.694257929619j))*x[1]
            ref[(0, 0, 2, 0)]=(0.922522960746-0.107489762493j)/(o+1.)+((0.332290916033+0.80863081753j))+((0.0172332963169+0.153360974154j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.778096532666-0.131482496541j)*x[0]**o + ((-0.911735542327-0.888045597344j))*x[0] + ((-0.74570934047-0.372459734154j))*x[1]**o + ((-0.148149597149-0.414384609632j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.74570934047-0.372459734154j)/(o+1.)+((-0.529942569738-0.651215103488j))+((-0.778096532666-0.131482496541j))*0.5**o
            arg[(0, 0, 2, 2)]=(0.460553180765-0.784730792976j)*x[0]**o + ((0.823592676573-0.904587981035j))*x[0] + ((-0.929106407631+0.43780861208j))*x[1]**o + ((-0.366407091212+0.561922352931j))*x[1]
            ref[(0, 0, 2, 2)]=(-0.929106407631+0.43780861208j)/(o+1.)+((0.22859279268-0.171332814052j))+((0.460553180765-0.784730792976j))*0.5**o
            arg[(0, 0, 2, 3)]=(0.935129292418-0.0955920636624j)*x[0]**o + ((0.73499686062-0.14229917575j))*x[0] + ((0.778009061471-0.201347319848j))*x[1]**o + ((0.943050179285+0.581267662686j))*x[1]
            ref[(0, 0, 2, 3)]=(0.778009061471-0.201347319848j)/(o+1.)+((0.839023519953+0.219484243468j))+((0.935129292418-0.0955920636624j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.899807767728+0.156162789533j)*x[0]**o + ((-0.287822313012-0.58531982362j))*x[0] + ((-0.98934502277-0.27030107281j))*x[1]**o + ((0.430846545046-0.773907863318j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.98934502277-0.27030107281j)/(o+1.)+((0.0715121160173-0.679613843469j))+((-0.899807767728+0.156162789533j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.773102774309-0.547002108687j)*x[0]**o + ((0.287072663985-0.345464194099j))*x[0] + ((-0.711017218497-0.517528035644j))*x[1]**o + ((-0.362631282886+0.247012467331j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.711017218497-0.517528035644j)/(o+1.)+((-0.0377793094503-0.049225863384j))+((0.773102774309-0.547002108687j))*0.5**o
            arg[(0, 1, 0, 2)]=(0.288739647345-0.88890494706j)*x[0]**o + ((-0.109108809311-0.24300131487j))*x[0] + ((0.960675933332-0.39529831929j))*x[1]**o + ((0.907528600155-0.390746026656j))*x[1]
            ref[(0, 1, 0, 2)]=(0.960675933332-0.39529831929j)/(o+1.)+((0.399209895422-0.316873670763j))+((0.288739647345-0.88890494706j))*0.5**o
            arg[(0, 1, 0, 3)]=(0.316970381664-0.684615486399j)*x[0]**o + ((-0.0842999707387+0.981964447833j))*x[0] + ((-0.803932865909-0.684927856597j))*x[1]**o + ((0.196306877402-0.172772076174j))*x[1]
            ref[(0, 1, 0, 3)]=(-0.803932865909-0.684927856597j)/(o+1.)+((0.0560034533318+0.40459618583j))+((0.316970381664-0.684615486399j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.230304476736-0.851353425468j)*x[0]**o + ((-0.447529628534+0.163461133121j))*x[0] + ((-0.863688569396+0.844750358859j))*x[1]**o + ((0.439722357421+0.470078007079j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.863688569396+0.844750358859j)/(o+1.)+((-0.00390363555656+0.3167695701j))+((0.230304476736-0.851353425468j))*0.5**o
            arg[(0, 1, 1, 1)]=(0.998726378369-0.781153322336j)*x[0]**o + ((-0.0471852653638-0.640854815144j))*x[0] + ((0.863350764161-0.267551421803j))*x[1]**o + ((-0.331555043351+0.157167383703j))*x[1]
            ref[(0, 1, 1, 1)]=(0.863350764161-0.267551421803j)/(o+1.)+((-0.189370154357-0.241843715721j))+((0.998726378369-0.781153322336j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.69870792467+0.794816795233j)*x[0]**o + ((0.890336566935+0.7690644388j))*x[0] + ((-0.28281590455+0.146678257315j))*x[1]**o + ((0.857767666767-0.0378897284846j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.28281590455+0.146678257315j)/(o+1.)+((0.874052116851+0.365587355158j))+((0.69870792467+0.794816795233j))*0.5**o
            arg[(0, 1, 1, 3)]=(-0.53981995611-0.105458990566j)*x[0]**o + ((0.349771886096-0.904942531761j))*x[0] + ((-0.556481929288-0.0224563084287j))*x[1]**o + ((-0.946415349837-0.0335952107967j))*x[1]
            ref[(0, 1, 1, 3)]=(-0.556481929288-0.0224563084287j)/(o+1.)+((-0.298321731871-0.469268871279j))+((-0.53981995611-0.105458990566j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.761480475774+0.0327434849699j)*x[0]**o + ((-0.270551647955+0.430778151834j))*x[0] + ((0.850944470512-0.178033357743j))*x[1]**o + ((0.394051936315+0.658682959213j))*x[1]
            ref[(0, 1, 2, 0)]=(0.850944470512-0.178033357743j)/(o+1.)+((0.0617501441799+0.544730555524j))+((-0.761480475774+0.0327434849699j))*0.5**o
            arg[(0, 1, 2, 1)]=(0.568224789416+0.806323171174j)*x[0]**o + ((0.396757609313+0.390427422935j))*x[0] + ((-0.791274261989+0.373171691155j))*x[1]**o + ((-0.641006294388+0.0205893588031j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.791274261989+0.373171691155j)/(o+1.)+((-0.122124342537+0.205508390869j))+((0.568224789416+0.806323171174j))*0.5**o
            arg[(0, 1, 2, 2)]=(0.451818061401+0.0756406970517j)*x[0]**o + ((0.187954499448-0.373271166975j))*x[0] + ((-0.556028846023+0.621193520756j))*x[1]**o + ((-0.685835567227+0.13940980971j))*x[1]
            ref[(0, 1, 2, 2)]=(-0.556028846023+0.621193520756j)/(o+1.)+((-0.24894053389-0.116930678632j))+((0.451818061401+0.0756406970517j))*0.5**o
            arg[(0, 1, 2, 3)]=(0.871662489403-0.501638689167j)*x[0]**o + ((-0.0331894492837+0.762128072088j))*x[0] + ((0.829465149894+0.185395928135j))*x[1]**o + ((0.546503979378-0.340375173538j))*x[1]
            ref[(0, 1, 2, 3)]=(0.829465149894+0.185395928135j)/(o+1.)+((0.256657265047+0.210876449275j))+((0.871662489403-0.501638689167j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.979646953148-0.44044531165j)*x[0]**o + ((0.158314806442-0.272372370744j))*x[0] + ((0.596008870445+0.533720991386j))*x[1]**o + ((0.858309580174+0.0155212959866j))*x[1]
            ref[(0, 2, 0, 0)]=(0.596008870445+0.533720991386j)/(o+1.)+((0.508312193308-0.128425537379j))+((0.979646953148-0.44044531165j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.40281411446+0.258402446136j)*x[0]**o + ((-0.696854170998-0.594611759152j))*x[0] + ((-0.0920150920553+0.949201846772j))*x[1]**o + ((-0.888498771837+0.469891762113j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.0920150920553+0.949201846772j)/(o+1.)+((-0.792676471417-0.0623599985194j))+((0.40281411446+0.258402446136j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.309766041047+0.801309849717j)*x[0]**o + ((-0.731513116186-0.873508006769j))*x[0] + ((-0.486882033867+0.692837509016j))*x[1]**o + ((0.437196811585-0.466141226929j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.486882033867+0.692837509016j)/(o+1.)+((-0.147158152301-0.669824616849j))+((0.309766041047+0.801309849717j))*0.5**o
            arg[(0, 2, 0, 3)]=(-0.00872264959058+0.576308993287j)*x[0]**o + ((-0.39847996288-0.737381438249j))*x[0] + ((0.183726458666+0.92939417674j))*x[1]**o + ((-0.695720877684-0.819580869175j))*x[1]
            ref[(0, 2, 0, 3)]=(0.183726458666+0.92939417674j)/(o+1.)+((-0.547100420282-0.778481153712j))+((-0.00872264959058+0.576308993287j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.0177653702393-0.726417120722j)*x[0]**o + ((0.344856492958+0.175477005564j))*x[0] + ((-0.576725679583+0.672799742684j))*x[1]**o + ((-0.176284821641+0.974203614888j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.576725679583+0.672799742684j)/(o+1.)+((0.0842858356588+0.574840310226j))+((-0.0177653702393-0.726417120722j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.176921458013-0.437647588886j)*x[0]**o + ((0.538925608626+0.750671315245j))*x[0] + ((-0.24116031216+0.141911358487j))*x[1]**o + ((-0.1416582808-0.804659010675j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.24116031216+0.141911358487j)/(o+1.)+((0.198633663913-0.0269938477146j))+((-0.176921458013-0.437647588886j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.0268425846828+0.148998298579j)*x[0]**o + ((-0.23363253439+0.727704801093j))*x[0] + ((0.503767708543+0.695736664755j))*x[1]**o + ((0.0817684166468+0.644597799175j))*x[1]
            ref[(0, 2, 1, 2)]=(0.503767708543+0.695736664755j)/(o+1.)+((-0.0759320588714+0.686151300134j))+((0.0268425846828+0.148998298579j))*0.5**o
            arg[(0, 2, 1, 3)]=(-0.556905979122+0.0203930743046j)*x[0]**o + ((0.249998233133+0.20378105208j))*x[0] + ((-0.582991740156-0.942219444784j))*x[1]**o + ((-0.184711500836-0.976714105639j))*x[1]
            ref[(0, 2, 1, 3)]=(-0.582991740156-0.942219444784j)/(o+1.)+((0.0326433661487-0.386466526779j))+((-0.556905979122+0.0203930743046j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.206883702531-0.177351376502j)*x[0]**o + ((0.708840121525-0.782219084057j))*x[0] + ((-0.0895279474706-0.25982253881j))*x[1]**o + ((-0.373115608906-0.609132949616j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.0895279474706-0.25982253881j)/(o+1.)+((0.16786225631-0.695676016836j))+((-0.206883702531-0.177351376502j))*0.5**o
            arg[(0, 2, 2, 1)]=(-0.152467914171+0.706687592679j)*x[0]**o + ((-0.843271450619-0.849927338311j))*x[0] + ((0.818553258045-0.512401530535j))*x[1]**o + ((0.0228765821861+0.14121782663j))*x[1]
            ref[(0, 2, 2, 1)]=(0.818553258045-0.512401530535j)/(o+1.)+((-0.410197434216-0.354354755841j))+((-0.152467914171+0.706687592679j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.973463473994-0.665355769915j)*x[0]**o + ((-0.827259455655-0.0930287778354j))*x[0] + ((-0.15741457931+0.535200647323j))*x[1]**o + ((-0.89859293297+0.213486300578j))*x[1]
            ref[(0, 2, 2, 2)]=(-0.15741457931+0.535200647323j)/(o+1.)+((-0.862926194313+0.0602287613712j))+((0.973463473994-0.665355769915j))*0.5**o
            arg[(0, 2, 2, 3)]=(0.596037467099-0.330157486432j)*x[0]**o + ((-0.89293866952+0.788215460316j))*x[0] + ((0.472461162035-0.147375921939j))*x[1]**o + ((-0.909650727499+0.752635890026j))*x[1]
            ref[(0, 2, 2, 3)]=(0.472461162035-0.147375921939j)/(o+1.)+((-0.901294698509+0.770425675171j))+((0.596037467099-0.330157486432j))*0.5**o
            arg[(0, 3, 0, 0)]=(0.465890515526-0.534772783462j)*x[0]**o + ((-0.258522799666+0.402455342817j))*x[0] + ((-0.365188071909+0.407780548135j))*x[1]**o + ((-0.747335084336-0.515284378353j))*x[1]
            ref[(0, 3, 0, 0)]=(-0.365188071909+0.407780548135j)/(o+1.)+((-0.502928942001-0.0564145177682j))+((0.465890515526-0.534772783462j))*0.5**o
            arg[(0, 3, 0, 1)]=(-0.04442551515-0.630658937336j)*x[0]**o + ((-0.818631823608+0.220263235481j))*x[0] + ((0.295981455053+0.367916935366j))*x[1]**o + ((-0.524195570394+0.306999329787j))*x[1]
            ref[(0, 3, 0, 1)]=(0.295981455053+0.367916935366j)/(o+1.)+((-0.671413697001+0.263631282634j))+((-0.04442551515-0.630658937336j))*0.5**o
            arg[(0, 3, 0, 2)]=(-0.966082219882-0.23041627616j)*x[0]**o + ((0.168982480417+0.504146924556j))*x[0] + ((-0.30413413047+0.429123269499j))*x[1]**o + ((0.342541413199+0.507861425441j))*x[1]
            ref[(0, 3, 0, 2)]=(-0.30413413047+0.429123269499j)/(o+1.)+((0.255761946808+0.506004174998j))+((-0.966082219882-0.23041627616j))*0.5**o
            arg[(0, 3, 0, 3)]=(0.473638099038+0.868148152347j)*x[0]**o + ((0.983461620213+0.41167938589j))*x[0] + ((0.181032931103+0.471413096935j))*x[1]**o + ((-0.0323257490723-0.388069622083j))*x[1]
            ref[(0, 3, 0, 3)]=(0.181032931103+0.471413096935j)/(o+1.)+((0.47556793557+0.0118048819038j))+((0.473638099038+0.868148152347j))*0.5**o
            arg[(0, 3, 1, 0)]=(-0.890397835784-0.52438734621j)*x[0]**o + ((0.0783932244619+0.944425752633j))*x[0] + ((0.262899580681-0.0429780008603j))*x[1]**o + ((-0.98508373959-0.778177280731j))*x[1]
            ref[(0, 3, 1, 0)]=(0.262899580681-0.0429780008603j)/(o+1.)+((-0.453345257564+0.083124235951j))+((-0.890397835784-0.52438734621j))*0.5**o
            arg[(0, 3, 1, 1)]=(0.59356438199+0.712079636328j)*x[0]**o + ((0.990707160377+0.26342074626j))*x[0] + ((-0.628652620901+0.845507742778j))*x[1]**o + ((-0.700690454034+0.115937910737j))*x[1]
            ref[(0, 3, 1, 1)]=(-0.628652620901+0.845507742778j)/(o+1.)+((0.145008353172+0.189679328498j))+((0.59356438199+0.712079636328j))*0.5**o
            arg[(0, 3, 1, 2)]=(0.332589894056+0.699058636882j)*x[0]**o + ((-0.230681291247+0.00811707802463j))*x[0] + ((0.610190965664-0.462935347411j))*x[1]**o + ((0.849419521629+0.149025926676j))*x[1]
            ref[(0, 3, 1, 2)]=(0.610190965664-0.462935347411j)/(o+1.)+((0.309369115191+0.0785715023501j))+((0.332589894056+0.699058636882j))*0.5**o
            arg[(0, 3, 1, 3)]=(0.693736341459+0.204272530494j)*x[0]**o + ((0.90147467132+0.259603488226j))*x[0] + ((0.442715211632-0.813583883612j))*x[1]**o + ((0.0270703124503+0.056898450699j))*x[1]
            ref[(0, 3, 1, 3)]=(0.442715211632-0.813583883612j)/(o+1.)+((0.464272491885+0.158250969462j))+((0.693736341459+0.204272530494j))*0.5**o
            arg[(0, 3, 2, 0)]=(-0.00855753221562-0.628946974255j)*x[0]**o + ((0.641196609351+0.787659728677j))*x[0] + ((-0.383907742224-0.198328857727j))*x[1]**o + ((0.529183157917+0.0130138221661j))*x[1]
            ref[(0, 3, 2, 0)]=(-0.383907742224-0.198328857727j)/(o+1.)+((0.585189883634+0.400336775421j))+((-0.00855753221562-0.628946974255j))*0.5**o
            arg[(0, 3, 2, 1)]=(0.118872005487-0.675822027963j)*x[0]**o + ((-0.966569242447-0.104880147975j))*x[0] + ((-0.361170195213-0.755006099761j))*x[1]**o + ((-0.234428465766+0.0105950972126j))*x[1]
            ref[(0, 3, 2, 1)]=(-0.361170195213-0.755006099761j)/(o+1.)+((-0.600498854106-0.0471425253813j))+((0.118872005487-0.675822027963j))*0.5**o
            arg[(0, 3, 2, 2)]=(-0.0454345318576-0.341186347458j)*x[0]**o + ((0.0127824020801+0.774739323261j))*x[0] + ((0.951579687759+0.462457298441j))*x[1]**o + ((0.382352434534+0.521020299649j))*x[1]
            ref[(0, 3, 2, 2)]=(0.951579687759+0.462457298441j)/(o+1.)+((0.197567418307+0.647879811455j))+((-0.0454345318576-0.341186347458j))*0.5**o
            arg[(0, 3, 2, 3)]=(-0.0360834354547-0.788939246911j)*x[0]**o + ((-0.646799546263-0.936989187328j))*x[0] + ((0.439668748674+0.81633485045j))*x[1]**o + ((0.61562257488+0.220790077878j))*x[1]
            ref[(0, 3, 2, 3)]=(0.439668748674+0.81633485045j)/(o+1.)+((-0.0155884856913-0.358099554725j))+((-0.0360834354547-0.788939246911j))*0.5**o
            arg[(1, 0, 0, 0)]=(-0.493847683306-0.40282770971j)*x[0]**o + ((0.912201035391+0.454551474445j))*x[0] + ((-0.908743017472-0.652873065859j))*x[1]**o + ((0.304129134586-0.916549704944j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.908743017472-0.652873065859j)/(o+1.)+((0.608165084989-0.230999115249j))+((-0.493847683306-0.40282770971j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.514345918719-0.647078920843j)*x[0]**o + ((-0.196688560231-0.817223132937j))*x[0] + ((0.864289702254+0.454116664317j))*x[1]**o + ((0.880946809203-0.666796129684j))*x[1]
            ref[(1, 0, 0, 1)]=(0.864289702254+0.454116664317j)/(o+1.)+((0.342129124486-0.74200963131j))+((0.514345918719-0.647078920843j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.997218505764-0.758064410155j)*x[0]**o + ((-0.284676023206-0.785941134543j))*x[0] + ((-0.965858931612+0.502266481062j))*x[1]**o + ((0.325856207607+0.276240791775j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.965858931612+0.502266481062j)/(o+1.)+((0.0205900922009-0.254850171384j))+((-0.997218505764-0.758064410155j))*0.5**o
            arg[(1, 0, 0, 3)]=(0.83237947825+0.599324283485j)*x[0]**o + ((0.47317510446-0.113509845556j))*x[0] + ((0.912451601277-0.0134858906659j))*x[1]**o + ((-0.803656304293+0.400016903973j))*x[1]
            ref[(1, 0, 0, 3)]=(0.912451601277-0.0134858906659j)/(o+1.)+((-0.165240599916+0.143253529209j))+((0.83237947825+0.599324283485j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.313474644039-0.473679072195j)*x[0]**o + ((-0.234514048301-0.52003680881j))*x[0] + ((0.826918928668+0.23103507399j))*x[1]**o + ((0.0529997261752-0.053620555801j))*x[1]
            ref[(1, 0, 1, 0)]=(0.826918928668+0.23103507399j)/(o+1.)+((-0.0907571610628-0.286828682305j))+((-0.313474644039-0.473679072195j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.171590578155+0.904401138703j)*x[0]**o + ((0.905094694795-0.813720555448j))*x[0] + ((-0.861355603705+0.0355899469138j))*x[1]**o + ((-0.0922730115124-0.392628324086j))*x[1]
            ref[(1, 0, 1, 1)]=(-0.861355603705+0.0355899469138j)/(o+1.)+((0.406410841641-0.603174439767j))+((-0.171590578155+0.904401138703j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.219768716944+0.222922597188j)*x[0]**o + ((0.823634010189-0.300230850438j))*x[0] + ((0.357789508587-0.691451236425j))*x[1]**o + ((0.0073441297639-0.304829534474j))*x[1]
            ref[(1, 0, 1, 2)]=(0.357789508587-0.691451236425j)/(o+1.)+((0.415489069976-0.302530192456j))+((0.219768716944+0.222922597188j))*0.5**o
            arg[(1, 0, 1, 3)]=(0.667295100024-0.745396757629j)*x[0]**o + ((-0.496440393064+0.344145182842j))*x[0] + ((0.356685602959+0.812779198625j))*x[1]**o + ((0.559696248172+0.61491449287j))*x[1]
            ref[(1, 0, 1, 3)]=(0.356685602959+0.812779198625j)/(o+1.)+((0.031627927554+0.479529837856j))+((0.667295100024-0.745396757629j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.804485321676-0.448524392233j)*x[0]**o + ((0.405259673907+0.557655898786j))*x[0] + ((-0.254346522823-0.517949739323j))*x[1]**o + ((-0.861802070401+0.487173253751j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.254346522823-0.517949739323j)/(o+1.)+((-0.228271198247+0.522414576268j))+((-0.804485321676-0.448524392233j))*0.5**o
            arg[(1, 0, 2, 1)]=(-0.195456350716-0.275473355895j)*x[0]**o + ((0.902007640797-0.508874462926j))*x[0] + ((0.796854223643-0.150742363478j))*x[1]**o + ((0.0626663576475+0.891453875845j))*x[1]
            ref[(1, 0, 2, 1)]=(0.796854223643-0.150742363478j)/(o+1.)+((0.482336999222+0.191289706459j))+((-0.195456350716-0.275473355895j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.00505941758321+0.353041378816j)*x[0]**o + ((-0.408373219487+0.414184481762j))*x[0] + ((-0.990238523025+0.980665287892j))*x[1]**o + ((0.644228511584-0.863025908353j))*x[1]
            ref[(1, 0, 2, 2)]=(-0.990238523025+0.980665287892j)/(o+1.)+((0.117927646049-0.224420713296j))+((-0.00505941758321+0.353041378816j))*0.5**o
            arg[(1, 0, 2, 3)]=(-0.609010901562-0.196174179458j)*x[0]**o + ((0.258846084248+0.539556913902j))*x[0] + ((-0.876769765777+0.786312668677j))*x[1]**o + ((0.283223354801-0.988829995241j))*x[1]
            ref[(1, 0, 2, 3)]=(-0.876769765777+0.786312668677j)/(o+1.)+((0.271034719524-0.22463654067j))+((-0.609010901562-0.196174179458j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.705265177323+0.0125600964874j)*x[0]**o + ((0.227955750331+0.906240365349j))*x[0] + ((-0.426338128153-0.152177058518j))*x[1]**o + ((-0.0808542938925-0.725319637049j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.426338128153-0.152177058518j)/(o+1.)+((0.0735507282191+0.0904603641498j))+((-0.705265177323+0.0125600964874j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.296243600949+0.171685061866j)*x[0]**o + ((0.415791568556+0.313324881885j))*x[0] + ((-0.514779844565-0.19114507543j))*x[1]**o + ((-0.792146879985-0.167343823036j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.514779844565-0.19114507543j)/(o+1.)+((-0.188177655714+0.0729905294244j))+((-0.296243600949+0.171685061866j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.959758232561+0.739453468309j)*x[0]**o + ((-0.203832017983-0.326670513013j))*x[0] + ((-0.914769150717-0.158593114388j))*x[1]**o + ((-0.892095566515-0.117248227392j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.914769150717-0.158593114388j)/(o+1.)+((-0.547963792249-0.221959370203j))+((0.959758232561+0.739453468309j))*0.5**o
            arg[(1, 1, 0, 3)]=(-0.395174859694+0.456921407603j)*x[0]**o + ((-0.757762293177-0.00757151242498j))*x[0] + ((-0.0645999114788+0.730006240462j))*x[1]**o + ((-0.947507438253+0.462475637518j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.0645999114788+0.730006240462j)/(o+1.)+((-0.852634865715+0.227452062547j))+((-0.395174859694+0.456921407603j))*0.5**o
            arg[(1, 1, 1, 0)]=(-0.922286930898+0.672286665531j)*x[0]**o + ((0.289891537705-0.662962485341j))*x[0] + ((0.417677345643+0.206166113273j))*x[1]**o + ((0.736042945524+0.729784919573j))*x[1]
            ref[(1, 1, 1, 0)]=(0.417677345643+0.206166113273j)/(o+1.)+((0.512967241614+0.0334112171157j))+((-0.922286930898+0.672286665531j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.702217135245-0.282412939679j)*x[0]**o + ((-0.599707336473-0.579402578099j))*x[0] + ((0.557644616483-0.88467678633j))*x[1]**o + ((-0.648632943028+0.664038681622j))*x[1]
            ref[(1, 1, 1, 1)]=(0.557644616483-0.88467678633j)/(o+1.)+((-0.62417013975+0.0423180517618j))+((-0.702217135245-0.282412939679j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.0566244702629-0.907761182967j)*x[0]**o + ((0.741582601986-0.825128010091j))*x[0] + ((0.310663814026-0.850965383376j))*x[1]**o + ((-0.664026343956-0.561903455345j))*x[1]
            ref[(1, 1, 1, 2)]=(0.310663814026-0.850965383376j)/(o+1.)+((0.0387781290151-0.693515732718j))+((-0.0566244702629-0.907761182967j))*0.5**o
            arg[(1, 1, 1, 3)]=(0.237718315011+0.098537083276j)*x[0]**o + ((-0.278386497265-0.313725915266j))*x[0] + ((-0.607059497213-0.877670665713j))*x[1]**o + ((-0.89054988488+0.751596614207j))*x[1]
            ref[(1, 1, 1, 3)]=(-0.607059497213-0.877670665713j)/(o+1.)+((-0.584468191073+0.21893534947j))+((0.237718315011+0.098537083276j))*0.5**o
            arg[(1, 1, 2, 0)]=(-0.590210300782+0.687887105263j)*x[0]**o + ((0.70723974431-0.64785468887j))*x[0] + ((-0.822015827679-0.238381316135j))*x[1]**o + ((0.890663081515-0.616324856502j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.822015827679-0.238381316135j)/(o+1.)+((0.798951412912-0.632089772686j))+((-0.590210300782+0.687887105263j))*0.5**o
            arg[(1, 1, 2, 1)]=(0.659010549164-0.227187761569j)*x[0]**o + ((0.895914245734+0.716938132779j))*x[0] + ((0.968920523503+0.42656701944j))*x[1]**o + ((0.414628403012-0.499551001154j))*x[1]
            ref[(1, 1, 2, 1)]=(0.968920523503+0.42656701944j)/(o+1.)+((0.655271324373+0.108693565812j))+((0.659010549164-0.227187761569j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.421680475158+0.530152973439j)*x[0]**o + ((0.699619980862-0.599921622041j))*x[0] + ((0.227291825616+0.506528230529j))*x[1]**o + ((0.085815385312-0.312498995192j))*x[1]
            ref[(1, 1, 2, 2)]=(0.227291825616+0.506528230529j)/(o+1.)+((0.392717683087-0.456210308616j))+((0.421680475158+0.530152973439j))*0.5**o
            arg[(1, 1, 2, 3)]=(-0.188280739755+0.558532268259j)*x[0]**o + ((0.492749799102-0.879588852133j))*x[0] + ((0.442510664233-0.697391753501j))*x[1]**o + ((-0.184100628517-0.305971456454j))*x[1]
            ref[(1, 1, 2, 3)]=(0.442510664233-0.697391753501j)/(o+1.)+((0.154324585292-0.592780154294j))+((-0.188280739755+0.558532268259j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.79955529089+0.614085218836j)*x[0]**o + ((-0.742880026517+0.284210216462j))*x[0] + ((-0.96752355555+0.134491736108j))*x[1]**o + ((0.335099133375-0.718984145118j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.96752355555+0.134491736108j)/(o+1.)+((-0.203890446571-0.217386964328j))+((-0.79955529089+0.614085218836j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.685450213595+0.292707428922j)*x[0]**o + ((0.219742256224-0.0968703230351j))*x[0] + ((0.159084944011+0.0952092164968j))*x[1]**o + ((0.220144801554-0.21154680795j))*x[1]
            ref[(1, 2, 0, 1)]=(0.159084944011+0.0952092164968j)/(o+1.)+((0.219943528889-0.154208565492j))+((0.685450213595+0.292707428922j))*0.5**o
            arg[(1, 2, 0, 2)]=(-0.0209071550258-0.634128942585j)*x[0]**o + ((0.164167019211-0.851149195301j))*x[0] + ((-0.289673080605-0.578257426967j))*x[1]**o + ((0.649026729061+0.37346474011j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.289673080605-0.578257426967j)/(o+1.)+((0.406596874136-0.238842227595j))+((-0.0209071550258-0.634128942585j))*0.5**o
            arg[(1, 2, 0, 3)]=(0.0375573262625+0.285208948917j)*x[0]**o + ((-0.190277443605+0.511738326963j))*x[0] + ((0.775352679721+0.596434592535j))*x[1]**o + ((0.576578316563+0.200807289097j))*x[1]
            ref[(1, 2, 0, 3)]=(0.775352679721+0.596434592535j)/(o+1.)+((0.193150436479+0.35627280803j))+((0.0375573262625+0.285208948917j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.155441574608-0.210623821111j)*x[0]**o + ((0.434396963362-0.59086289589j))*x[0] + ((-0.603260469503+0.935305335147j))*x[1]**o + ((0.38138023153-0.536337759063j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.603260469503+0.935305335147j)/(o+1.)+((0.407888597446-0.563600327476j))+((-0.155441574608-0.210623821111j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.748481476606-0.0641160210895j)*x[0]**o + ((-0.725291765255+0.583904038418j))*x[0] + ((-0.24570867314-0.100218749647j))*x[1]**o + ((0.907079893602+0.795959836855j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.24570867314-0.100218749647j)/(o+1.)+((0.0908940641732+0.689931937637j))+((0.748481476606-0.0641160210895j))*0.5**o
            arg[(1, 2, 1, 2)]=(0.867691043192-0.309422236343j)*x[0]**o + ((-0.354026893021+0.239366656833j))*x[0] + ((-0.0666559534737+0.237303507059j))*x[1]**o + ((0.72768716747-0.249796755997j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.0666559534737+0.237303507059j)/(o+1.)+((0.186830137225-0.00521504958187j))+((0.867691043192-0.309422236343j))*0.5**o
            arg[(1, 2, 1, 3)]=(-0.0578920790182-0.414955141571j)*x[0]**o + ((-0.0654037366567-0.904733603371j))*x[0] + ((-0.509022396821+0.072164190677j))*x[1]**o + ((0.868805199977+0.947460633658j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.509022396821+0.072164190677j)/(o+1.)+((0.40170073166+0.0213635151434j))+((-0.0578920790182-0.414955141571j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.78624973211+0.94798121165j)*x[0]**o + ((-0.0241024770249+0.947285884423j))*x[0] + ((-0.0856453988315-0.423129472389j))*x[1]**o + ((-0.684336502776+0.773092933607j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.0856453988315-0.423129472389j)/(o+1.)+((-0.3542194899+0.860189409015j))+((-0.78624973211+0.94798121165j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.86085066631-0.167233395557j)*x[0]**o + ((0.832063243454+0.952986461499j))*x[0] + ((0.800780293478-0.960910825729j))*x[1]**o + ((0.583784822085+0.42124066228j))*x[1]
            ref[(1, 2, 2, 1)]=(0.800780293478-0.960910825729j)/(o+1.)+((0.70792403277+0.68711356189j))+((0.86085066631-0.167233395557j))*0.5**o
            arg[(1, 2, 2, 2)]=(0.0988651856895+0.803224708546j)*x[0]**o + ((-0.398597143919+0.718620074459j))*x[0] + ((0.00151152749504-0.876982360097j))*x[1]**o + ((-0.616001803538-0.874077773583j))*x[1]
            ref[(1, 2, 2, 2)]=(0.00151152749504-0.876982360097j)/(o+1.)+((-0.507299473729-0.0777288495621j))+((0.0988651856895+0.803224708546j))*0.5**o
            arg[(1, 2, 2, 3)]=(-0.590124458542+0.279647909601j)*x[0]**o + ((0.142048522509-0.215394832011j))*x[0] + ((0.979391089932+0.843844296594j))*x[1]**o + ((-0.953513773761-0.418679399588j))*x[1]
            ref[(1, 2, 2, 3)]=(0.979391089932+0.843844296594j)/(o+1.)+((-0.405732625626-0.317037115799j))+((-0.590124458542+0.279647909601j))*0.5**o
            arg[(1, 3, 0, 0)]=(0.25984715632-0.301798955701j)*x[0]**o + ((-0.33406138126-0.237502474396j))*x[0] + ((0.221383050957-0.0836302723039j))*x[1]**o + ((0.523547606848+0.92110398643j))*x[1]
            ref[(1, 3, 0, 0)]=(0.221383050957-0.0836302723039j)/(o+1.)+((0.0947431127939+0.341800756017j))+((0.25984715632-0.301798955701j))*0.5**o
            arg[(1, 3, 0, 1)]=(0.206766617657-0.00460899077098j)*x[0]**o + ((0.247323097423-0.927277775781j))*x[0] + ((0.799593466468+0.706653998123j))*x[1]**o + ((0.131839311429+0.836333139044j))*x[1]
            ref[(1, 3, 0, 1)]=(0.799593466468+0.706653998123j)/(o+1.)+((0.189581204426-0.0454723183686j))+((0.206766617657-0.00460899077098j))*0.5**o
            arg[(1, 3, 0, 2)]=(0.788494098293+0.468275009601j)*x[0]**o + ((-0.453081308156+0.436448410541j))*x[0] + ((0.527153050711-0.690946101313j))*x[1]**o + ((0.466712033355+0.389273044503j))*x[1]
            ref[(1, 3, 0, 2)]=(0.527153050711-0.690946101313j)/(o+1.)+((0.00681536259981+0.412860727522j))+((0.788494098293+0.468275009601j))*0.5**o
            arg[(1, 3, 0, 3)]=(-0.441973903124+0.568629932559j)*x[0]**o + ((-0.327637442409-0.0648851180236j))*x[0] + ((-0.398841450009-0.00673877297173j))*x[1]**o + ((-0.556165787902+0.563124197017j))*x[1]
            ref[(1, 3, 0, 3)]=(-0.398841450009-0.00673877297173j)/(o+1.)+((-0.441901615156+0.249119539497j))+((-0.441973903124+0.568629932559j))*0.5**o
            arg[(1, 3, 1, 0)]=(-0.060824122822+0.60851921619j)*x[0]**o + ((-0.620709785492-0.603619745782j))*x[0] + ((0.0617377071044-0.847656648304j))*x[1]**o + ((-0.268218655521+0.625409203293j))*x[1]
            ref[(1, 3, 1, 0)]=(0.0617377071044-0.847656648304j)/(o+1.)+((-0.444464220507+0.0108947287555j))+((-0.060824122822+0.60851921619j))*0.5**o
            arg[(1, 3, 1, 1)]=(0.143705652349+0.165394683098j)*x[0]**o + ((0.564623464769+0.194640806289j))*x[0] + ((0.351534139148+0.597322016807j))*x[1]**o + ((0.526518534773+0.0175812520585j))*x[1]
            ref[(1, 3, 1, 1)]=(0.351534139148+0.597322016807j)/(o+1.)+((0.545570999771+0.106111029174j))+((0.143705652349+0.165394683098j))*0.5**o
            arg[(1, 3, 1, 2)]=(-0.13989698994+0.704063254208j)*x[0]**o + ((0.532062410629-0.165207480817j))*x[0] + ((0.735727735987+0.85380091285j))*x[1]**o + ((0.08170991706+0.20470099971j))*x[1]
            ref[(1, 3, 1, 2)]=(0.735727735987+0.85380091285j)/(o+1.)+((0.306886163844+0.0197467594467j))+((-0.13989698994+0.704063254208j))*0.5**o
            arg[(1, 3, 1, 3)]=(-0.391577449488+0.605072981098j)*x[0]**o + ((-0.796397504807-0.504122129995j))*x[0] + ((0.0667195288364-0.718919664806j))*x[1]**o + ((0.708285605309+0.0974082834641j))*x[1]
            ref[(1, 3, 1, 3)]=(0.0667195288364-0.718919664806j)/(o+1.)+((-0.0440559497492-0.203356923266j))+((-0.391577449488+0.605072981098j))*0.5**o
            arg[(1, 3, 2, 0)]=(0.344492268969+0.335626666156j)*x[0]**o + ((0.124256191469+0.445532876878j))*x[0] + ((0.228203512695+0.00898257199405j))*x[1]**o + ((-0.963957527816-0.143812032923j))*x[1]
            ref[(1, 3, 2, 0)]=(0.228203512695+0.00898257199405j)/(o+1.)+((-0.419850668174+0.150860421978j))+((0.344492268969+0.335626666156j))*0.5**o
            arg[(1, 3, 2, 1)]=(0.791177380959+0.896387888642j)*x[0]**o + ((0.145729959694+0.856504077688j))*x[0] + ((-0.15189555474+0.582323045345j))*x[1]**o + ((0.168179427242+0.85227365099j))*x[1]
            ref[(1, 3, 2, 1)]=(-0.15189555474+0.582323045345j)/(o+1.)+((0.156954693468+0.854388864339j))+((0.791177380959+0.896387888642j))*0.5**o
            arg[(1, 3, 2, 2)]=(0.871581653164+0.951727321131j)*x[0]**o + ((-0.395443312609+0.85097099971j))*x[0] + ((0.148573531803-0.0632344876976j))*x[1]**o + ((0.977050475435+0.745279294759j))*x[1]
            ref[(1, 3, 2, 2)]=(0.148573531803-0.0632344876976j)/(o+1.)+((0.290803581413+0.798125147234j))+((0.871581653164+0.951727321131j))*0.5**o
            arg[(1, 3, 2, 3)]=(0.186208481976+0.881306397157j)*x[0]**o + ((0.0251984063727-0.226380239892j))*x[0] + ((-0.268966544918-0.362825804048j))*x[1]**o + ((0.44366135564+0.0452716180976j))*x[1]
            ref[(1, 3, 2, 3)]=(-0.268966544918-0.362825804048j)/(o+1.)+((0.234429881006-0.0905543108974j))+((0.186208481976+0.881306397157j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.397763496832+0.550976339683j)*x[0]**o + ((0.0847760722946-0.940716451878j))*x[0] + ((0.106465298754-0.996620820427j))*x[1]**o + ((-0.974859394449-0.338357202444j))*x[1] + ((0.769890378254-0.497144713255j))*x[2]**o + ((0.635623833905+0.0731395159878j))*x[2]
            ref[(0, 0, 0, 0)]=(0.876355677008-1.49376553368j)/(o+1.)+((-0.127229744125-0.602967069168j))+((0.397763496832+0.550976339683j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.487655126312+0.567243057149j)*x[0]**o + ((-0.647666070556-0.383505506664j))*x[0] + ((0.663736496538-0.905971846227j))*x[1]**o + ((-0.0862239229258-0.587427522658j))*x[1] + ((0.550784777082-0.0277324909032j))*x[2]**o + ((0.23939752653+0.229105773645j))*x[2]
            ref[(0, 0, 0, 1)]=(1.21452127362-0.93370433713j)/(o+1.)+((-0.247246233476-0.370913627838j))+((-0.487655126312+0.567243057149j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.55684142192-0.0513769661015j)*x[0]**o + ((-0.0982833010053-0.626281687866j))*x[0] + ((0.0599800318773+0.214867154759j))*x[1]**o + ((0.0203899948255+0.785392534571j))*x[1] + ((0.0448379950373-0.395491072452j))*x[2]**o + ((0.391849941138+0.113938235852j))*x[2]
            ref[(0, 0, 0, 2)]=(0.104818026915-0.180623917694j)/(o+1.)+((0.156978317479+0.136524541278j))+((-0.55684142192-0.0513769661015j))*0.5**o
            arg[(0, 0, 0, 3)]=(-0.524676831311-0.0614631704245j)*x[0]**o + ((-0.74862884477+0.432280303334j))*x[0] + ((-0.725261626087+0.391092084097j))*x[1]**o + ((-0.185058337053+0.820233970453j))*x[1] + ((-0.901348601974+0.121258521686j))*x[2]**o + ((0.374148037181+0.0649641921634j))*x[2]
            ref[(0, 0, 0, 3)]=(-1.62661022806+0.512350605783j)/(o+1.)+((-0.279769572321+0.658739232975j))+((-0.524676831311-0.0614631704245j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.00256728990636-0.529231438794j)*x[0]**o + ((0.466677972889+0.790247878747j))*x[0] + ((0.167198330512+0.899275016314j))*x[1]**o + ((-0.733154343765-0.318886767438j))*x[1] + ((-0.600160680209+0.230256961959j))*x[2]**o + ((0.100327107122-0.665994022928j))*x[2]
            ref[(0, 0, 1, 0)]=(-0.432962349697+1.12953197827j)/(o+1.)+((-0.0830746318774-0.0973164558095j))+((0.00256728990636-0.529231438794j))*0.5**o
            arg[(0, 0, 1, 1)]=(0.110678553226+0.796240478756j)*x[0]**o + ((0.951475648303-0.264694219425j))*x[0] + ((-0.987531193675-0.982916403934j))*x[1]**o + ((-0.814373982367+0.568173387825j))*x[1] + ((-0.145767598417-0.169220245297j))*x[2]**o + ((-0.266134328355+0.97888885906j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.13329879209-1.15213664923j)/(o+1.)+((-0.0645163312093+0.64118401373j))+((0.110678553226+0.796240478756j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.0240936484242+0.74150831317j)*x[0]**o + ((0.759414024657-0.0523599812684j))*x[0] + ((-0.729544934519+0.560101648598j))*x[1]**o + ((0.919035695817-0.781022671889j))*x[1] + ((-0.749466733413-0.325820743634j))*x[2]**o + ((-0.656731224947+0.0853640402595j))*x[2]
            ref[(0, 0, 1, 2)]=(-1.47901166793+0.234280904965j)/(o+1.)+((0.510859247763-0.374009306449j))+((-0.0240936484242+0.74150831317j))*0.5**o
            arg[(0, 0, 1, 3)]=(0.518309634025-0.560199234052j)*x[0]**o + ((-0.393675480388-0.266857036693j))*x[0] + ((0.58105401057+0.343121586306j))*x[1]**o + ((-0.739452452568+0.448291955494j))*x[1] + ((0.667489865636+0.0251207714845j))*x[2]**o + ((0.929693140455+0.927196089404j))*x[2]
            ref[(0, 0, 1, 3)]=(1.24854387621+0.368242357791j)/(o+1.)+((-0.101717396251+0.554315504102j))+((0.518309634025-0.560199234052j))*0.5**o
            arg[(0, 0, 2, 0)]=(-0.300808269196-0.695489243562j)*x[0]**o + ((-0.795888341614+0.276751737086j))*x[0] + ((-0.00337222887817+0.608582843991j))*x[1]**o + ((-0.871258963915+0.105827027732j))*x[1] + ((-0.833919438075+0.683165368417j))*x[2]**o + ((0.954533315335-0.0219934801276j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.837291666953+1.29174821241j)/(o+1.)+((-0.356306995097+0.180292642345j))+((-0.300808269196-0.695489243562j))*0.5**o
            arg[(0, 0, 2, 1)]=(-0.512875387489-0.558642722779j)*x[0]**o + ((-0.874633525289+0.104180612614j))*x[0] + ((0.409945687956-0.258038626897j))*x[1]**o + ((-0.0915490482406+0.207797950444j))*x[1] + ((-0.827220641735-0.792969391353j))*x[2]**o + ((-0.88452329558-0.113071647226j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.417274953779-1.05100801825j)/(o+1.)+((-0.925352934555+0.0994534579161j))+((-0.512875387489-0.558642722779j))*0.5**o
            arg[(0, 0, 2, 2)]=(-0.036446900699-0.620913499569j)*x[0]**o + ((0.224912955143-0.900731116751j))*x[0] + ((-0.43730717094+0.206026081645j))*x[1]**o + ((-0.778529136966+0.0861719661532j))*x[1] + ((0.0797651588928+0.562849521312j))*x[2]**o + ((-0.666386822069-0.389574323041j))*x[2]
            ref[(0, 0, 2, 2)]=(-0.357542012047+0.768875602957j)/(o+1.)+((-0.610001501946-0.60206673682j))+((-0.036446900699-0.620913499569j))*0.5**o
            arg[(0, 0, 2, 3)]=(0.314393496813-0.350744383732j)*x[0]**o + ((0.437782498497-0.888182517032j))*x[0] + ((-0.219383233922-0.514733548009j))*x[1]**o + ((0.603840988999-0.32817001664j))*x[1] + ((-0.339794362366-0.488507482448j))*x[2]**o + ((0.872927605345+0.780307237203j))*x[2]
            ref[(0, 0, 2, 3)]=(-0.559177596287-1.00324103046j)/(o+1.)+((0.957275546421-0.218022648235j))+((0.314393496813-0.350744383732j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.366686397621+0.372707463131j)*x[0]**o + ((-0.860095383163+0.0981790727017j))*x[0] + ((-0.591000690142+0.573725920808j))*x[1]**o + ((-0.863267839288-0.548088325006j))*x[1] + ((-0.770098694784-0.575902534944j))*x[2]**o + ((0.314781282327+0.404182008256j))*x[2]
            ref[(0, 1, 0, 0)]=(-1.36109938493-0.00217661413608j)/(o+1.)+((-0.704290970062-0.0228636220241j))+((0.366686397621+0.372707463131j))*0.5**o
            arg[(0, 1, 0, 1)]=(0.0432124938515-0.198327700022j)*x[0]**o + ((-0.623756603766-0.489896016134j))*x[0] + ((-0.119641931587-0.465208247842j))*x[1]**o + ((-0.839409993147+0.424995485581j))*x[1] + ((0.802917658824+0.633704811513j))*x[2]**o + ((-0.327319615949-0.066629546159j))*x[2]
            ref[(0, 1, 0, 1)]=(0.683275727236+0.168496563671j)/(o+1.)+((-0.895243106431-0.065765038356j))+((0.0432124938515-0.198327700022j))*0.5**o
            arg[(0, 1, 0, 2)]=(0.00506929336646-0.417088804679j)*x[0]**o + ((-0.451439094428-0.912330606736j))*x[0] + ((0.941426075057-0.0671427416198j))*x[1]**o + ((-0.319613367312+0.131891144003j))*x[1] + ((0.455084044996-0.446796258782j))*x[2]**o + ((0.291965747259-0.510309172274j))*x[2]
            ref[(0, 1, 0, 2)]=(1.39651012005-0.513939000402j)/(o+1.)+((-0.23954335724-0.645374317504j))+((0.00506929336646-0.417088804679j))*0.5**o
            arg[(0, 1, 0, 3)]=(0.430475732246+0.497372506416j)*x[0]**o + ((0.479473808914-0.722714203705j))*x[0] + ((0.213884724936+0.0820463225242j))*x[1]**o + ((-0.991531864065-0.597174674095j))*x[1] + ((-0.0104292640079-0.597294300978j))*x[2]**o + ((0.0470295027284-0.274544817169j))*x[2]
            ref[(0, 1, 0, 3)]=(0.203455460928-0.515247978453j)/(o+1.)+((-0.232514276211-0.797216847485j))+((0.430475732246+0.497372506416j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.690777386147-0.12547633803j)*x[0]**o + ((0.866207679328+0.726369770926j))*x[0] + ((-0.2369608724-0.432099012297j))*x[1]**o + ((0.857444185739-0.844287194792j))*x[1] + ((-0.03129207111-0.583796260113j))*x[2]**o + ((0.128855809065+0.628559751656j))*x[2]
            ref[(0, 1, 1, 0)]=(-0.26825294351-1.01589527241j)/(o+1.)+((0.926253837066+0.255321163895j))+((0.690777386147-0.12547633803j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.0734330021708+0.610078627336j)*x[0]**o + ((0.382597878117+0.561012255603j))*x[0] + ((-0.439281922609+0.869136100135j))*x[1]**o + ((0.393244521326+0.989529075064j))*x[1] + ((-0.196716284309+0.198432091567j))*x[2]**o + ((0.765603604998-0.270734125512j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.635998206918+1.0675681917j)/(o+1.)+((0.770723002221+0.639903602577j))+((-0.0734330021708+0.610078627336j))*0.5**o
            arg[(0, 1, 1, 2)]=(-0.491542967547+0.194617298132j)*x[0]**o + ((0.216645024056-0.573492804024j))*x[0] + ((-0.607218935272-0.883938837512j))*x[1]**o + ((-0.431093771742-0.184180192264j))*x[1] + ((-0.384774246993-0.130443464387j))*x[2]**o + ((0.489641373801-0.443509041068j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.991993182265-1.0143823019j)/(o+1.)+((0.137596313058-0.600591018678j))+((-0.491542967547+0.194617298132j))*0.5**o
            arg[(0, 1, 1, 3)]=(0.246454307983+0.746386982974j)*x[0]**o + ((-0.34894109188-0.019639228494j))*x[0] + ((0.821077870095-0.875002937195j))*x[1]**o + ((-0.639517324199+0.92870373085j))*x[1] + ((-0.909250413852+0.680229112607j))*x[2]**o + ((0.927750092435-0.823685131236j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.0881725437574-0.194773824588j)/(o+1.)+((-0.0303541618225+0.0426896855602j))+((0.246454307983+0.746386982974j))*0.5**o
            arg[(0, 1, 2, 0)]=(-0.293454443456-0.387687095101j)*x[0]**o + ((0.772760497279-0.496240217361j))*x[0] + ((0.355135394571-0.672189049805j))*x[1]**o + ((0.397462243449-0.575043043942j))*x[1] + ((0.753823326974-0.693281708667j))*x[2]**o + ((0.770799951814+0.322488605729j))*x[2]
            ref[(0, 1, 2, 0)]=(1.10895872154-1.36547075847j)/(o+1.)+((0.970511346271-0.374397327787j))+((-0.293454443456-0.387687095101j))*0.5**o
            arg[(0, 1, 2, 1)]=(-0.097260753115+0.179205164836j)*x[0]**o + ((0.634640487453-0.00977086636576j))*x[0] + ((-0.807521866802+0.550562586002j))*x[1]**o + ((-0.492948264627-0.887677531802j))*x[1] + ((0.450231244011-0.522333543514j))*x[2]**o + ((-0.108587182702-0.381777571604j))*x[2]
            ref[(0, 1, 2, 1)]=(-0.357290622791+0.0282290424878j)/(o+1.)+((0.0165525200622-0.639612984886j))+((-0.097260753115+0.179205164836j))*0.5**o
            arg[(0, 1, 2, 2)]=(0.305584578754+0.0969034722779j)*x[0]**o + ((0.661280121728+0.508637966619j))*x[0] + ((0.268463764155-0.497704671766j))*x[1]**o + ((0.82812680371+0.811437227671j))*x[1] + ((-0.240553931756-0.113994584546j))*x[2]**o + ((-0.389478132709+0.647737282634j))*x[2]
            ref[(0, 1, 2, 2)]=(0.0279098323984-0.611699256312j)/(o+1.)+((0.549964396365+0.983906238462j))+((0.305584578754+0.0969034722779j))*0.5**o
            arg[(0, 1, 2, 3)]=(0.962095601487+0.933690874278j)*x[0]**o + ((0.390577077778+0.75754076494j))*x[0] + ((-0.922979495141+0.0456107198996j))*x[1]**o + ((-0.253032359311+0.86016192616j))*x[1] + ((-0.527522684049+0.0347621829042j))*x[2]**o + ((-0.825647891335+0.967092433818j))*x[2]
            ref[(0, 1, 2, 3)]=(-1.45050217919+0.0803729028038j)/(o+1.)+((-0.344051586434+1.29239756246j))+((0.962095601487+0.933690874278j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.85717850262-0.0770046630924j)*x[0]**o + ((-0.920908325554+0.740216732655j))*x[0] + ((0.0409642830392-0.397548471686j))*x[1]**o + ((-0.85140846579+0.0322933829395j))*x[1] + ((0.673490683495-0.679284585345j))*x[2]**o + ((0.44124031767+0.741209210372j))*x[2]
            ref[(0, 2, 0, 0)]=(0.714454966534-1.07683305703j)/(o+1.)+((-0.665538236837+0.756859662983j))+((0.85717850262-0.0770046630924j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.239948773063+0.71883885074j)*x[0]**o + ((0.201569857944+0.39624258352j))*x[0] + ((0.296563028474+0.0772729358048j))*x[1]**o + ((-0.662079918764-0.807569771366j))*x[1] + ((0.193780404253-0.557765623745j))*x[2]**o + ((-0.932635636814-0.0767650623778j))*x[2]
            ref[(0, 2, 0, 1)]=(0.490343432727-0.480492687941j)/(o+1.)+((-0.696572848817-0.244046125112j))+((0.239948773063+0.71883885074j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.104648362872-0.415947880094j)*x[0]**o + ((0.0647538416284+0.717854586309j))*x[0] + ((0.801841078195-0.78678060571j))*x[1]**o + ((0.513770058049+0.911356592281j))*x[1] + ((-0.724363778533+0.639883590419j))*x[2]**o + ((-0.671513056278-0.989763065025j))*x[2]
            ref[(0, 2, 0, 2)]=(0.0774772996622-0.146897015291j)/(o+1.)+((-0.0464945783003+0.319724056783j))+((0.104648362872-0.415947880094j))*0.5**o
            arg[(0, 2, 0, 3)]=(0.636103898391+0.601698349062j)*x[0]**o + ((0.634255347556-0.586120285675j))*x[0] + ((-0.480161293044-0.390895104379j))*x[1]**o + ((0.498533652977+0.151637497816j))*x[1] + ((-0.395768907754+0.549889676468j))*x[2]**o + ((-0.702261776569-0.17446228108j))*x[2]
            ref[(0, 2, 0, 3)]=(-0.875930200798+0.158994572088j)/(o+1.)+((0.215263611982-0.304472534469j))+((0.636103898391+0.601698349062j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.309851211073+0.800987871297j)*x[0]**o + ((-0.30649324678+0.850072677406j))*x[0] + ((0.764614548573+0.932252947477j))*x[1]**o + ((0.35873142318-0.349868731073j))*x[1] + ((0.317953592845-0.00707227992408j))*x[2]**o + ((0.215923572686+0.188780675406j))*x[2]
            ref[(0, 2, 1, 0)]=(1.08256814142+0.925180667553j)/(o+1.)+((0.134080874543+0.34449231087j))+((0.309851211073+0.800987871297j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.97765087196+0.885460857767j)*x[0]**o + ((-0.59963037895-0.97813894398j))*x[0] + ((0.918198299021-0.149177021995j))*x[1]**o + ((-0.699633164776-0.677864763702j))*x[1] + ((-0.245794140934-0.677223555939j))*x[2]**o + ((0.716484280564-0.302077704158j))*x[2]
            ref[(0, 2, 1, 1)]=(0.672404158087-0.826400577934j)/(o+1.)+((-0.291389631581-0.97904070592j))+((-0.97765087196+0.885460857767j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.565970006654+0.230748861675j)*x[0]**o + ((0.0146119009796+0.949323522275j))*x[0] + ((0.800838607262-0.490666201372j))*x[1]**o + ((0.700896076364-0.71943791052j))*x[1] + ((-0.232620197071-0.16667523997j))*x[2]**o + ((-0.531061385113+0.291384906832j))*x[2]
            ref[(0, 2, 1, 2)]=(0.56821841019-0.657341441342j)/(o+1.)+((0.0922232961153+0.260635259294j))+((0.565970006654+0.230748861675j))*0.5**o
            arg[(0, 2, 1, 3)]=(0.163248645862+0.124784495215j)*x[0]**o + ((0.420946594001+0.865946542433j))*x[0] + ((0.836981848122+0.187903136119j))*x[1]**o + ((0.312615286756+0.562931818869j))*x[1] + ((-0.889750307113-0.0797868341327j))*x[2]**o + ((0.596915246678+0.881799932793j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.0527684589909+0.108116301987j)/(o+1.)+((0.665238563717+1.15533914705j))+((0.163248645862+0.124784495215j))*0.5**o
            arg[(0, 2, 2, 0)]=(-0.78798722825+0.508889210927j)*x[0]**o + ((0.438140480515-0.536669340923j))*x[0] + ((-0.425384707482-0.951450027259j))*x[1]**o + ((-0.12321901102-0.226126777597j))*x[1] + ((-0.821704143561-0.0241679142883j))*x[2]**o + ((0.616637867896-0.454536059441j))*x[2]
            ref[(0, 2, 2, 0)]=(-1.24708885104-0.975617941547j)/(o+1.)+((0.465779668696-0.60866608898j))+((-0.78798722825+0.508889210927j))*0.5**o
            arg[(0, 2, 2, 1)]=(-0.848600201432-0.697694240602j)*x[0]**o + ((0.493483882588+0.836724085234j))*x[0] + ((0.782509405084-0.715208101717j))*x[1]**o + ((-0.456240730783-0.881512703355j))*x[1] + ((-0.34690541695+0.242987779395j))*x[2]**o + ((0.663272003881-0.574343468385j))*x[2]
            ref[(0, 2, 2, 1)]=(0.435603988134-0.472220322322j)/(o+1.)+((0.350257577843-0.309566043253j))+((-0.848600201432-0.697694240602j))*0.5**o
            arg[(0, 2, 2, 2)]=(0.620616472222-0.81656629537j)*x[0]**o + ((0.476939551679+0.511885291615j))*x[0] + ((-0.734988099573-0.0128386544118j))*x[1]**o + ((0.356941735327+0.148744295676j))*x[1] + ((-0.704747210038-0.727114588825j))*x[2]**o + ((-0.474861031298-0.550561394552j))*x[2]
            ref[(0, 2, 2, 2)]=(-1.43973530961-0.739953243237j)/(o+1.)+((0.179510127855+0.0550340963694j))+((0.620616472222-0.81656629537j))*0.5**o
            arg[(0, 2, 2, 3)]=(0.733901756774-0.313293607192j)*x[0]**o + ((-0.410162200307-0.370306460384j))*x[0] + ((-0.74597585025+0.0887143367573j))*x[1]**o + ((0.821180542296-0.734601032859j))*x[1] + ((-0.512229313685-0.282373584727j))*x[2]**o + ((0.222131881353+0.541611177798j))*x[2]
            ref[(0, 2, 2, 3)]=(-1.25820516394-0.193659247969j)/(o+1.)+((0.316575111671-0.281648157722j))+((0.733901756774-0.313293607192j))*0.5**o
            arg[(0, 3, 0, 0)]=(-0.177865772852+0.401708787199j)*x[0]**o + ((-0.604903111893-0.648639810566j))*x[0] + ((0.854143385067-0.825062644724j))*x[1]**o + ((-0.450894485374-0.720856173586j))*x[1] + ((-0.183865372306-0.257360345389j))*x[2]**o + ((-0.773066530941+0.248164443647j))*x[2]
            ref[(0, 3, 0, 0)]=(0.670278012761-1.08242299011j)/(o+1.)+((-0.914432064104-0.560665770252j))+((-0.177865772852+0.401708787199j))*0.5**o
            arg[(0, 3, 0, 1)]=(-0.567833917694+0.51573849526j)*x[0]**o + ((0.114223695877-0.280270720988j))*x[0] + ((0.539742090497+0.332522386213j))*x[1]**o + ((0.237480599609+0.0274410827082j))*x[1] + ((0.42516923789-0.686418139088j))*x[2]**o + ((-0.655495163883+0.751906542332j))*x[2]
            ref[(0, 3, 0, 1)]=(0.964911328387-0.353895752875j)/(o+1.)+((-0.151895434199+0.249538452026j))+((-0.567833917694+0.51573849526j))*0.5**o
            arg[(0, 3, 0, 2)]=(0.970409717994-0.4813507017j)*x[0]**o + ((0.852492237054-0.848692382226j))*x[0] + ((-0.168408423371-0.37329608813j))*x[1]**o + ((-0.484743698993+0.0115617608328j))*x[1] + ((0.33587449767+0.601792794536j))*x[2]**o + ((0.0168967042159-0.308530156445j))*x[2]
            ref[(0, 3, 0, 2)]=(0.167466074299+0.228496706406j)/(o+1.)+((0.192322621138-0.572830388919j))+((0.970409717994-0.4813507017j))*0.5**o
            arg[(0, 3, 0, 3)]=(0.465687744837+0.263491228642j)*x[0]**o + ((0.989975077808-0.219673932387j))*x[0] + ((0.106593392814-0.203490909432j))*x[1]**o + ((-0.514976897559+0.695236087361j))*x[1] + ((0.595099777906+0.337251601551j))*x[2]**o + ((-0.0761648716609+0.73249033297j))*x[2]
            ref[(0, 3, 0, 3)]=(0.701693170721+0.133760692119j)/(o+1.)+((0.199416654294+0.604026243972j))+((0.465687744837+0.263491228642j))*0.5**o
            arg[(0, 3, 1, 0)]=(-0.981760584701+0.686148802957j)*x[0]**o + ((0.627228962179+0.0750767691624j))*x[0] + ((-0.280867358503-0.848246875714j))*x[1]**o + ((-0.838656096692-0.546031614648j))*x[1] + ((-0.853658901683+0.12259277703j))*x[2]**o + ((-0.0860940322058-0.730184412399j))*x[2]
            ref[(0, 3, 1, 0)]=(-1.13452626019-0.725654098683j)/(o+1.)+((-0.148760583359-0.600569628942j))+((-0.981760584701+0.686148802957j))*0.5**o
            arg[(0, 3, 1, 1)]=(0.64244614022+0.163743835294j)*x[0]**o + ((0.081765544829-0.173661778025j))*x[0] + ((-0.688768029638+0.293100181124j))*x[1]**o + ((-0.974419055037-0.551974132468j))*x[1] + ((-0.79495132209-0.0641559875583j))*x[2]**o + ((0.878514033692+0.140775903311j))*x[2]
            ref[(0, 3, 1, 1)]=(-1.48371935173+0.228944193566j)/(o+1.)+((-0.00706973825827-0.292430003591j))+((0.64244614022+0.163743835294j))*0.5**o
            arg[(0, 3, 1, 2)]=(0.743389612328+0.577024806655j)*x[0]**o + ((-0.445077302998+0.389590951032j))*x[0] + ((0.0516110974298+0.185577467096j))*x[1]**o + ((0.220889686668-0.241940551538j))*x[1] + ((-0.126155052355+0.100790813764j))*x[2]**o + ((-0.875941216075-0.702658704126j))*x[2]
            ref[(0, 3, 1, 2)]=(-0.0745439549251+0.28636828086j)/(o+1.)+((-0.550064416203-0.277504152316j))+((0.743389612328+0.577024806655j))*0.5**o
            arg[(0, 3, 1, 3)]=(-0.43185564309+0.856748573305j)*x[0]**o + ((-0.481985976325+0.905487043378j))*x[0] + ((0.568730457116+0.213618122696j))*x[1]**o + ((-0.987444531624+0.717485285061j))*x[1] + ((0.924090248196+0.208544079606j))*x[2]**o + ((0.656710876031+0.103922770492j))*x[2]
            ref[(0, 3, 1, 3)]=(1.49282070531+0.422162202303j)/(o+1.)+((-0.406359815959+0.863447549465j))+((-0.43185564309+0.856748573305j))*0.5**o
            arg[(0, 3, 2, 0)]=(-0.270446904486-0.206299759856j)*x[0]**o + ((0.206563470351+0.790567158042j))*x[0] + ((0.198117653633+0.763340325889j))*x[1]**o + ((0.724368888046-0.726763160696j))*x[1] + ((-0.581418400798-0.167422621603j))*x[2]**o + ((0.318298868636+0.275482666921j))*x[2]
            ref[(0, 3, 2, 0)]=(-0.383300747166+0.595917704285j)/(o+1.)+((0.624615613516+0.169643332134j))+((-0.270446904486-0.206299759856j))*0.5**o
            arg[(0, 3, 2, 1)]=(0.00761832296903-0.111719850194j)*x[0]**o + ((0.620683062747+0.415844259694j))*x[0] + ((0.315061340001+0.500393876803j))*x[1]**o + ((0.059131745159+0.485163898129j))*x[1] + ((-0.661694166271+0.494750968737j))*x[2]**o + ((-0.618376132215-0.836785452765j))*x[2]
            ref[(0, 3, 2, 1)]=(-0.346632826271+0.99514484554j)/(o+1.)+((0.0307193378459+0.0321113525294j))+((0.00761832296903-0.111719850194j))*0.5**o
            arg[(0, 3, 2, 2)]=(0.0811617759194+0.912344595038j)*x[0]**o + ((0.892593418009+0.78335573609j))*x[0] + ((-0.538842485377+0.426044329854j))*x[1]**o + ((-0.547349226619-0.967930257078j))*x[1] + ((0.952742536696-0.441309255056j))*x[2]**o + ((-0.232067343605+0.31526793429j))*x[2]
            ref[(0, 3, 2, 2)]=(0.41390005132-0.0152649252012j)/(o+1.)+((0.0565884238927+0.0653467066513j))+((0.0811617759194+0.912344595038j))*0.5**o
            arg[(0, 3, 2, 3)]=(-0.471259436285-0.219051378879j)*x[0]**o + ((0.919669759298+0.590845114388j))*x[0] + ((-0.780921057339+0.638292598966j))*x[1]**o + ((0.935213468725+0.0941067201073j))*x[1] + ((0.0983780698406-0.270235135957j))*x[2]**o + ((0.0311481044358+0.252184951888j))*x[2]
            ref[(0, 3, 2, 3)]=(-0.682542987499+0.368057463009j)/(o+1.)+((0.943015666229+0.468568393192j))+((-0.471259436285-0.219051378879j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.0811532021777+0.571411303389j)*x[0]**o + ((-0.28993970489+0.0539885303836j))*x[0] + ((-0.98899708024-0.0232090174862j))*x[1]**o + ((-0.0907488853541-0.0848485315739j))*x[1] + ((0.00690477024067-0.230131889715j))*x[2]**o + ((-0.236399427323-0.269557977697j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.982092309999-0.253340907202j)/(o+1.)+((-0.308544008783-0.150208989444j))+((0.0811532021777+0.571411303389j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.829793483528-0.375643027628j)*x[0]**o + ((0.350093533453-0.353918043812j))*x[0] + ((-0.546006278959-0.862215752905j))*x[1]**o + ((0.293703249511-0.256464212022j))*x[1] + ((0.784012973643+0.95441047587j))*x[2]**o + ((-0.187957130992-0.553676132643j))*x[2]
            ref[(1, 0, 0, 1)]=(0.238006694684+0.0921947229651j)/(o+1.)+((0.227919825986-0.582029194239j))+((0.829793483528-0.375643027628j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.873223457595+0.336695770525j)*x[0]**o + ((-0.653845585896-0.730447458776j))*x[0] + ((0.493570373594+0.65598250952j))*x[1]**o + ((-0.723157244224+0.790775715052j))*x[1] + ((0.0397326911026-0.678456475769j))*x[2]**o + ((0.316051502598+0.720011595702j))*x[2]
            ref[(1, 0, 0, 2)]=(0.533303064696-0.0224739662492j)/(o+1.)+((-0.53047566376+0.390169925989j))+((-0.873223457595+0.336695770525j))*0.5**o
            arg[(1, 0, 0, 3)]=(0.495411627736+0.399325271179j)*x[0]**o + ((0.959298211921+0.700499409743j))*x[0] + ((-0.587836638959-0.932359371764j))*x[1]**o + ((-0.336245935421+0.802627265857j))*x[1] + ((0.985405303371+0.0235533413954j))*x[2]**o + ((0.618483802214+0.955268940871j))*x[2]
            ref[(1, 0, 0, 3)]=(0.397568664412-0.908806030369j)/(o+1.)+((0.620768039357+1.22919780824j))+((0.495411627736+0.399325271179j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.145060609937-0.341083086376j)*x[0]**o + ((-0.368780341352+0.363852031236j))*x[0] + ((0.0811422847363-0.146085337014j))*x[1]**o + ((-0.656229168702-0.659462658682j))*x[1] + ((0.674812699453+0.713671082302j))*x[2]**o + ((-0.939521004849+0.277426628429j))*x[2]
            ref[(1, 0, 1, 0)]=(0.755954984189+0.567585745288j)/(o+1.)+((-0.982265257451-0.00909199950853j))+((-0.145060609937-0.341083086376j))*0.5**o
            arg[(1, 0, 1, 1)]=(0.864515737377-0.371911702268j)*x[0]**o + ((0.218748898762+0.670044333074j))*x[0] + ((-0.690390461668+0.714130767815j))*x[1]**o + ((0.76035582215-0.49874810278j))*x[1] + ((0.392494356549-0.93962343723j))*x[2]**o + ((-0.56588006598-0.44166405539j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.297896105119-0.225492669415j)/(o+1.)+((0.206612327466-0.135183912548j))+((0.864515737377-0.371911702268j))*0.5**o
            arg[(1, 0, 1, 2)]=(-0.603693892615+0.165694126384j)*x[0]**o + ((-0.451735893678+0.791073655378j))*x[0] + ((0.743996268699+0.841778767392j))*x[1]**o + ((-0.325920280742+0.31107121545j))*x[1] + ((-0.996959858439-0.0342486959855j))*x[2]**o + ((-0.857495837064-0.162857520184j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.252963589739+0.807530071407j)/(o+1.)+((-0.817576005742+0.469643675322j))+((-0.603693892615+0.165694126384j))*0.5**o
            arg[(1, 0, 1, 3)]=(0.95359296339-0.0798960999963j)*x[0]**o + ((-0.550629586974+0.330169523444j))*x[0] + ((-0.435340565243+0.825606056886j))*x[1]**o + ((-0.825800934358-0.769693423519j))*x[1] + ((-0.328201163731+0.30220109336j))*x[2]**o + ((-0.600729160959-0.251741571115j))*x[2]
            ref[(1, 0, 1, 3)]=(-0.763541728973+1.12780715025j)/(o+1.)+((-0.988579841146-0.345632735595j))+((0.95359296339-0.0798960999963j))*0.5**o
            arg[(1, 0, 2, 0)]=(-0.229703369164-0.34390729213j)*x[0]**o + ((-0.440025470907-0.19675442109j))*x[0] + ((-0.79671514555-0.646620992204j))*x[1]**o + ((-0.720300209418-0.108592616702j))*x[1] + ((-0.0340155195472+0.197142687627j))*x[2]**o + ((-0.4558742313+0.544144156805j))*x[2]
            ref[(1, 0, 2, 0)]=(-0.830730665097-0.449478304578j)/(o+1.)+((-0.808099955812+0.119398559506j))+((-0.229703369164-0.34390729213j))*0.5**o
            arg[(1, 0, 2, 1)]=(0.448369997829-0.754848370377j)*x[0]**o + ((-0.805516111272-0.341388065721j))*x[0] + ((0.658695022264+0.935437747876j))*x[1]**o + ((-0.569745117745-0.0202762924022j))*x[1] + ((-0.0618965993158-0.932799613805j))*x[2]**o + ((-0.346196312926+0.66579906877j))*x[2]
            ref[(1, 0, 2, 1)]=(0.596798422949+0.00263813407116j)/(o+1.)+((-0.860728770972+0.152067355323j))+((0.448369997829-0.754848370377j))*0.5**o
            arg[(1, 0, 2, 2)]=(-0.639555360745+0.64251115384j)*x[0]**o + ((-0.938545770781+0.950904978708j))*x[0] + ((-0.364285694823-0.843830357905j))*x[1]**o + ((0.0605521561248-0.100332813554j))*x[1] + ((-0.797507110653-0.49945282216j))*x[2]**o + ((0.264424353514+0.958486936052j))*x[2]
            ref[(1, 0, 2, 2)]=(-1.16179280548-1.34328318007j)/(o+1.)+((-0.306784630571+0.904529550603j))+((-0.639555360745+0.64251115384j))*0.5**o
            arg[(1, 0, 2, 3)]=(0.880131735719-0.431809972079j)*x[0]**o + ((-0.892896242403-0.721735511233j))*x[0] + ((-0.857570319164-0.67853271488j))*x[1]**o + ((-0.306347772039-0.119428211118j))*x[1] + ((-0.21826504625+0.459530762554j))*x[2]**o + ((0.536796382783-0.531895700977j))*x[2]
            ref[(1, 0, 2, 3)]=(-1.07583536541-0.219001952325j)/(o+1.)+((-0.33122381583-0.686529711664j))+((0.880131735719-0.431809972079j))*0.5**o
            arg[(1, 1, 0, 0)]=(0.157670784569-0.319267318181j)*x[0]**o + ((-0.150532084665-0.885025931461j))*x[0] + ((-0.923248579462+0.193043234667j))*x[1]**o + ((-0.464530350203+0.418289080333j))*x[1] + ((0.286464743474+0.508246436754j))*x[2]**o + ((0.685231001695-0.35839033256j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.636783835988+0.701289671421j)/(o+1.)+((0.0350842834134-0.412563591844j))+((0.157670784569-0.319267318181j))*0.5**o
            arg[(1, 1, 0, 1)]=(-0.695586479213+0.276560511371j)*x[0]**o + ((-0.809453345214+0.859059183675j))*x[0] + ((0.528654878806-0.889085908213j))*x[1]**o + ((-0.005124700784-0.714573303191j))*x[1] + ((-0.168571768985+0.629566505827j))*x[2]**o + ((0.468119077309-0.670751278926j))*x[2]
            ref[(1, 1, 0, 1)]=(0.36008310982-0.259519402386j)/(o+1.)+((-0.173229484345-0.263132699221j))+((-0.695586479213+0.276560511371j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.543419499803+0.637873652933j)*x[0]**o + ((-0.509217080469+0.050298057756j))*x[0] + ((0.534404232947+0.726664195934j))*x[1]**o + ((-0.0672432671021-0.775547137988j))*x[1] + ((0.163490456468-0.884336487215j))*x[2]**o + ((-0.74222013895-0.894928528331j))*x[2]
            ref[(1, 1, 0, 2)]=(0.697894689415-0.157672291281j)/(o+1.)+((-0.659340243261-0.810088804281j))+((0.543419499803+0.637873652933j))*0.5**o
            arg[(1, 1, 0, 3)]=(0.810408451492+0.405218706758j)*x[0]**o + ((-0.0112719474117-0.407749451819j))*x[0] + ((0.83006979245+0.675238799795j))*x[1]**o + ((-0.927250575151+0.416764841648j))*x[1] + ((-0.995807833529-0.0684064418694j))*x[2]**o + ((-0.424319972317-0.485155086035j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.165738041079+0.606832357925j)/(o+1.)+((-0.68142124744-0.238069848103j))+((0.810408451492+0.405218706758j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.892699055878+0.49118968339j)*x[0]**o + ((-0.594816464459-0.92567298025j))*x[0] + ((0.102496124807+0.175315312809j))*x[1]**o + ((-0.675395063078+0.906063361804j))*x[1] + ((-0.475000650763+0.374886935224j))*x[2]**o + ((0.79751759137-0.405119520641j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.372504525956+0.550202248033j)/(o+1.)+((-0.236346968084-0.212364569544j))+((0.892699055878+0.49118968339j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.114286048799+0.3703193968j)*x[0]**o + ((-0.193856351193-0.622764263452j))*x[0] + ((0.947259411468-0.881274719774j))*x[1]**o + ((-0.375106638233+0.663586875541j))*x[1] + ((-0.533348404675-0.851545026614j))*x[2]**o + ((0.734667859102+0.145992987127j))*x[2]
            ref[(1, 1, 1, 1)]=(0.413911006793-1.73281974639j)/(o+1.)+((0.0828524348383+0.0934077996082j))+((-0.114286048799+0.3703193968j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.695419753017-0.54354797588j)*x[0]**o + ((0.930182265846-0.70094416007j))*x[0] + ((-0.635076394071+0.748373151971j))*x[1]**o + ((-0.138336222717-0.456318372012j))*x[1] + ((-0.272333107711+0.835659737417j))*x[2]**o + ((0.223994250997+0.351396526164j))*x[2]
            ref[(1, 1, 1, 2)]=(-0.907409501783+1.58403288939j)/(o+1.)+((0.507920147063-0.402933002959j))+((-0.695419753017-0.54354797588j))*0.5**o
            arg[(1, 1, 1, 3)]=(-0.647877057166+0.185604184815j)*x[0]**o + ((-0.116382232509+0.234033222287j))*x[0] + ((0.271312529618-0.420401778479j))*x[1]**o + ((0.576292416051-0.00744811059298j))*x[1] + ((0.804512509123+0.195327814263j))*x[2]**o + ((0.238839575965+0.303822439012j))*x[2]
            ref[(1, 1, 1, 3)]=(1.07582503874-0.225073964216j)/(o+1.)+((0.349374879753+0.265203775353j))+((-0.647877057166+0.185604184815j))*0.5**o
            arg[(1, 1, 2, 0)]=(0.43489256129-0.430036465185j)*x[0]**o + ((0.636673438555+0.0764345900797j))*x[0] + ((-0.646712321783-0.572012388851j))*x[1]**o + ((-0.844871900553-0.824066030917j))*x[1] + ((0.330004856426-0.794531380612j))*x[2]**o + ((0.70061340833-0.976096847347j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.316707465356-1.36654376946j)/(o+1.)+((0.246207473167-0.861864144092j))+((0.43489256129-0.430036465185j))*0.5**o
            arg[(1, 1, 2, 1)]=(-0.77967941802+0.142747997799j)*x[0]**o + ((0.87007933324+0.966892254667j))*x[0] + ((-0.983392712375-0.304368460781j))*x[1]**o + ((-0.50707604914+0.761794669231j))*x[1] + ((0.325355276977-0.0242808468464j))*x[2]**o + ((-0.80734948921-0.956221355758j))*x[2]
            ref[(1, 1, 2, 1)]=(-0.658037435398-0.328649307627j)/(o+1.)+((-0.222173102555+0.38623278407j))+((-0.77967941802+0.142747997799j))*0.5**o
            arg[(1, 1, 2, 2)]=(0.352548468391-0.442545195314j)*x[0]**o + ((0.573014773352-0.355911914062j))*x[0] + ((0.374307043022+0.719039175185j))*x[1]**o + ((0.853211496291+0.667784244482j))*x[1] + ((0.830144223131-0.205981626108j))*x[2]**o + ((-0.951264945995+0.000952332723362j))*x[2]
            ref[(1, 1, 2, 2)]=(1.20445126615+0.513057549077j)/(o+1.)+((0.237480661824+0.156412331572j))+((0.352548468391-0.442545195314j))*0.5**o
            arg[(1, 1, 2, 3)]=(-0.452482333236-0.158267241758j)*x[0]**o + ((0.115630809032+0.401649589441j))*x[0] + ((0.344027901332+0.0560546718203j))*x[1]**o + ((0.769370338188-0.178847163776j))*x[1] + ((-0.630134122608-0.313136120541j))*x[2]**o + ((-0.894744756994+0.527991662896j))*x[2]
            ref[(1, 1, 2, 3)]=(-0.286106221276-0.25708144872j)/(o+1.)+((-0.0048718048867+0.37539704428j))+((-0.452482333236-0.158267241758j))*0.5**o
            arg[(1, 2, 0, 0)]=(0.216607614607+0.864359202664j)*x[0]**o + ((-0.290270511097+0.88730297761j))*x[0] + ((-0.770670763284-0.873630512931j))*x[1]**o + ((-0.0624564577993-0.00789226962398j))*x[1] + ((0.595227868665+0.656707043253j))*x[2]**o + ((0.754142594127-0.499808803839j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.175442894619-0.216923469677j)/(o+1.)+((0.200707812615+0.189800952073j))+((0.216607614607+0.864359202664j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.0902547384164+0.709900171114j)*x[0]**o + ((0.498445158283-0.362206449683j))*x[0] + ((-0.264833232354-0.752228902671j))*x[1]**o + ((-0.160706584692+0.865673653286j))*x[1] + ((0.676409126464-0.480037587148j))*x[2]**o + ((-0.0638251518971-0.976548617294j))*x[2]
            ref[(1, 2, 0, 1)]=(0.41157589411-1.23226648982j)/(o+1.)+((0.136956710847-0.236540706845j))+((0.0902547384164+0.709900171114j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.509797204614+0.742438142285j)*x[0]**o + ((-0.610464372889-0.603131382157j))*x[0] + ((-0.29871176078-0.885430265904j))*x[1]**o + ((-0.0910980728975+0.860856421327j))*x[1] + ((0.450430876374+0.955361408073j))*x[2]**o + ((0.991472559466+0.0741996373181j))*x[2]
            ref[(1, 2, 0, 2)]=(0.151719115594+0.0699311421692j)/(o+1.)+((0.14495505684+0.165962338244j))+((0.509797204614+0.742438142285j))*0.5**o
            arg[(1, 2, 0, 3)]=(-0.87456214463-0.151103199897j)*x[0]**o + ((-0.394012372242+0.512609286474j))*x[0] + ((-0.602121359983+0.97351029116j))*x[1]**o + ((-0.681781837103-0.232987786723j))*x[1] + ((0.938205781101+0.529571631598j))*x[2]**o + ((-0.913077108276-0.718345425996j))*x[2]
            ref[(1, 2, 0, 3)]=(0.336084421118+1.50308192276j)/(o+1.)+((-0.99443565881-0.219361963123j))+((-0.87456214463-0.151103199897j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.829906585732+0.911843413839j)*x[0]**o + ((-0.818216330604+0.675532470172j))*x[0] + ((0.877585022718-0.73455758546j))*x[1]**o + ((-0.262593360819-0.323822378645j))*x[1] + ((0.000960905281063-0.518548185976j))*x[2]**o + ((0.398181368012-0.423813775163j))*x[2]
            ref[(1, 2, 1, 0)]=(0.878545927999-1.25310577144j)/(o+1.)+((-0.341314161706-0.0360518418179j))+((-0.829906585732+0.911843413839j))*0.5**o
            arg[(1, 2, 1, 1)]=(0.134488264811-0.138641684297j)*x[0]**o + ((0.0941958534396+0.631960987967j))*x[0] + ((0.14808649327+0.32538146385j))*x[1]**o + ((-0.423014878152+0.591297077353j))*x[1] + ((0.160455823188+0.74713064918j))*x[2]**o + ((0.0749292371155-0.0864696391765j))*x[2]
            ref[(1, 2, 1, 1)]=(0.308542316458+1.07251211303j)/(o+1.)+((-0.126944893798+0.568394213072j))+((0.134488264811-0.138641684297j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.360949398948+0.761096342549j)*x[0]**o + ((0.798619639424-0.825909396582j))*x[0] + ((-0.696658370863-0.429427154916j))*x[1]**o + ((-0.768835639246+0.402293974739j))*x[1] + ((-0.17029814103+0.925865936897j))*x[2]**o + ((0.118557832615-0.0518860057757j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.866956511893+0.496438781981j)/(o+1.)+((0.0741709163965-0.237750713809j))+((-0.360949398948+0.761096342549j))*0.5**o
            arg[(1, 2, 1, 3)]=(-0.897899292685-0.64285805308j)*x[0]**o + ((0.453181280787-0.915125507554j))*x[0] + ((0.503109648822-0.335071113268j))*x[1]**o + ((-0.76701519508-0.124746446313j))*x[1] + ((0.447032383092-0.586874064501j))*x[2]**o + ((-0.449619990237-0.772747937667j))*x[2]
            ref[(1, 2, 1, 3)]=(0.950142031914-0.921945177769j)/(o+1.)+((-0.381726952265-0.906309945767j))+((-0.897899292685-0.64285805308j))*0.5**o
            arg[(1, 2, 2, 0)]=(-0.607434503285+0.0204241524472j)*x[0]**o + ((0.95838163277+0.59379117436j))*x[0] + ((0.601671729033-0.268336058598j))*x[1]**o + ((0.13898783709-0.0218104823448j))*x[1] + ((0.751354567687-0.291910476968j))*x[2]**o + ((-0.0746262772723+0.673327265424j))*x[2]
            ref[(1, 2, 2, 0)]=(1.35302629672-0.560246535566j)/(o+1.)+((0.511371596294+0.622653978719j))+((-0.607434503285+0.0204241524472j))*0.5**o
            arg[(1, 2, 2, 1)]=(0.35755057906+0.757782703231j)*x[0]**o + ((0.123204104611-0.165830541338j))*x[0] + ((0.967367378552-0.666853784944j))*x[1]**o + ((0.957362989172+0.061062057653j))*x[1] + ((0.842735371898-0.994430167264j))*x[2]**o + ((0.820022156753+0.781122171333j))*x[2]
            ref[(1, 2, 2, 1)]=(1.81010275045-1.66128395221j)/(o+1.)+((0.950294625268+0.338176843824j))+((0.35755057906+0.757782703231j))*0.5**o
            arg[(1, 2, 2, 2)]=(-0.396155005307+0.099697564085j)*x[0]**o + ((0.827773203619-0.746523627163j))*x[0] + ((-0.923935048702-0.267359791127j))*x[1]**o + ((-0.203112376722-0.770380804245j))*x[1] + ((-0.940376912273-0.933961070474j))*x[2]**o + ((0.901065612636+0.606442617998j))*x[2]
            ref[(1, 2, 2, 2)]=(-1.86431196098-1.2013208616j)/(o+1.)+((0.762863219766-0.455230906705j))+((-0.396155005307+0.099697564085j))*0.5**o
            arg[(1, 2, 2, 3)]=(0.113898081756+0.539300050605j)*x[0]**o + ((-0.656721989311-0.925578804047j))*x[0] + ((-0.677618537489-0.1881992008j))*x[1]**o + ((-0.484480405264-0.492513215718j))*x[1] + ((0.576239608296-0.219777041992j))*x[2]**o + ((-0.451921105963-0.465170916868j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.101378929193-0.407976242792j)/(o+1.)+((-0.796561750269-0.941631468317j))+((0.113898081756+0.539300050605j))*0.5**o
            arg[(1, 3, 0, 0)]=(-0.78877026635+0.180378708117j)*x[0]**o + ((-0.875951032586-0.336903907992j))*x[0] + ((0.927243342452-0.865508102608j))*x[1]**o + ((-0.334899139589+0.945093689527j))*x[1] + ((0.812559068581-0.936194848227j))*x[2]**o + ((-0.654716738362+0.486649370527j))*x[2]
            ref[(1, 3, 0, 0)]=(1.73980241103-1.80170295083j)/(o+1.)+((-0.932783455268+0.547419576031j))+((-0.78877026635+0.180378708117j))*0.5**o
            arg[(1, 3, 0, 1)]=(-0.460765286501-0.150740888282j)*x[0]**o + ((0.446776577215+0.618399508339j))*x[0] + ((0.84142138717-0.801383241755j))*x[1]**o + ((0.75580939678-0.480833185581j))*x[1] + ((0.472469524294+0.102557395104j))*x[2]**o + ((-0.533781579939+0.818236344337j))*x[2]
            ref[(1, 3, 0, 1)]=(1.31389091146-0.698825846651j)/(o+1.)+((0.334402197028+0.477901333547j))+((-0.460765286501-0.150740888282j))*0.5**o
            arg[(1, 3, 0, 2)]=(-0.755076661589+0.80577395349j)*x[0]**o + ((0.349297779005-0.862293623109j))*x[0] + ((0.28797138833+0.739933083011j))*x[1]**o + ((-0.421655968875-0.0809980905766j))*x[1] + ((-0.802059974597+0.801893814926j))*x[2]**o + ((-0.478850755759+0.586428706251j))*x[2]
            ref[(1, 3, 0, 2)]=(-0.514088586267+1.54182689794j)/(o+1.)+((-0.275604472815-0.178431503717j))+((-0.755076661589+0.80577395349j))*0.5**o
            arg[(1, 3, 0, 3)]=(0.218500401464+0.837317336734j)*x[0]**o + ((-0.242207504672+0.912941932035j))*x[0] + ((0.218462440764-0.434007690876j))*x[1]**o + ((0.320420523378+0.995378761327j))*x[1] + ((0.0704410237107-0.951363507988j))*x[2]**o + ((0.967670218166-0.814665599426j))*x[2]
            ref[(1, 3, 0, 3)]=(0.288903464475-1.38537119886j)/(o+1.)+((0.522941618436+0.546827546968j))+((0.218500401464+0.837317336734j))*0.5**o
            arg[(1, 3, 1, 0)]=(-0.483836800732+0.457244101516j)*x[0]**o + ((-0.813436932965+0.934262062867j))*x[0] + ((0.734796315796+0.574975474869j))*x[1]**o + ((0.937813776795-0.154745168287j))*x[1] + ((0.371348551167-0.182562845194j))*x[2]**o + ((0.819773750546-0.364167930644j))*x[2]
            ref[(1, 3, 1, 0)]=(1.10614486696+0.392412629675j)/(o+1.)+((0.472075297188+0.207674481968j))+((-0.483836800732+0.457244101516j))*0.5**o
            arg[(1, 3, 1, 1)]=(-0.0871872230822+0.100157305739j)*x[0]**o + ((0.440646581161-0.0330136991904j))*x[0] + ((-0.90655364293-0.421963776598j))*x[1]**o + ((0.931157772017-0.547061348777j))*x[1] + ((0.513413406355-0.331562131969j))*x[2]**o + ((-0.623760610843-0.559041776494j))*x[2]
            ref[(1, 3, 1, 1)]=(-0.393140236575-0.753525908567j)/(o+1.)+((0.374021871168-0.569558412231j))+((-0.0871872230822+0.100157305739j))*0.5**o
            arg[(1, 3, 1, 2)]=(0.27558321783-0.109143898628j)*x[0]**o + ((0.840747029903-0.443074466183j))*x[0] + ((0.588672926016+0.0997350580653j))*x[1]**o + ((-0.69414090804-0.0732957042902j))*x[1] + ((-0.225447383115+0.0672789435469j))*x[2]**o + ((-0.623096714748-0.0310438129275j))*x[2]
            ref[(1, 3, 1, 2)]=(0.363225542901+0.167014001612j)/(o+1.)+((-0.238245296442-0.2737069917j))+((0.27558321783-0.109143898628j))*0.5**o
            arg[(1, 3, 1, 3)]=(0.973353520687-0.903174587519j)*x[0]**o + ((0.276658567623-0.156644817559j))*x[0] + ((-0.613327648247-0.24492687235j))*x[1]**o + ((-0.194010235215-0.443906280398j))*x[1] + ((0.773151972818+0.214233133317j))*x[2]**o + ((0.748661933957-0.187396079674j))*x[2]
            ref[(1, 3, 1, 3)]=(0.159824324572-0.0306937390327j)/(o+1.)+((0.415655133182-0.393973588816j))+((0.973353520687-0.903174587519j))*0.5**o
            arg[(1, 3, 2, 0)]=(0.679808436162-0.50853802726j)*x[0]**o + ((-0.445872736869-0.171224927281j))*x[0] + ((-0.253110890397-0.891418161884j))*x[1]**o + ((0.857933232721+0.402026091741j))*x[1] + ((-0.0501654271765+0.776581825573j))*x[2]**o + ((0.478706486177-0.72456949605j))*x[2]
            ref[(1, 3, 2, 0)]=(-0.303276317573-0.114836336311j)/(o+1.)+((0.445383491015-0.246884165795j))+((0.679808436162-0.50853802726j))*0.5**o
            arg[(1, 3, 2, 1)]=(-0.177347893073-0.961334176419j)*x[0]**o + ((-0.00470624023198-0.542088600644j))*x[0] + ((-0.84251585713+0.297463798023j))*x[1]**o + ((0.612446217257+0.561186004003j))*x[1] + ((0.541332649926-0.331752063523j))*x[2]**o + ((-0.154303383882+0.536421610505j))*x[2]
            ref[(1, 3, 2, 1)]=(-0.301183207203-0.0342882655j)/(o+1.)+((0.226718296572+0.277759506931j))+((-0.177347893073-0.961334176419j))*0.5**o
            arg[(1, 3, 2, 2)]=(-0.0614220522196+0.697755674566j)*x[0]**o + ((0.123731815797+0.817261661284j))*x[0] + ((-0.910358788849+0.76074782866j))*x[1]**o + ((0.768374347074+0.42283380596j))*x[1] + ((-0.136097581623-0.243550038692j))*x[2]**o + ((-0.153052869234+0.03228759826j))*x[2]
            ref[(1, 3, 2, 2)]=(-1.04645637047+0.517197789968j)/(o+1.)+((0.369526646818+0.636191532752j))+((-0.0614220522196+0.697755674566j))*0.5**o
            arg[(1, 3, 2, 3)]=(-0.805800261126-0.832658057027j)*x[0]**o + ((0.397710893765+0.345837673264j))*x[0] + ((-0.525360563396-0.984745801177j))*x[1]**o + ((0.88405379179+0.0826601193842j))*x[1] + ((-0.482526512869-0.681351476053j))*x[2]**o + ((0.943520133364+0.800462581822j))*x[2]
            ref[(1, 3, 2, 3)]=(-1.00788707627-1.66609727723j)/(o+1.)+((1.11264240946+0.614480187235j))+((-0.805800261126-0.832658057027j))*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(0.796147222887+0.539885500409j)*x[0] + ((-0.617952446281+0.830881332093j))*x[1]
            ref=(0.089097388303+0.685383416251j)
        else:
            arg=(0.0402334901234+0.419716278467j)*x[0] + ((0.355539546214+0.25077099796j))*x[1] + ((-0.149318406661-0.184985861707j))*x[2]
            ref=(0.123227314838+0.24275070736j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(0.321065753772+0.780613954102j)*x[0] + ((-0.642005360636-0.135256961217j))*x[1]
            ref[(0,)]=(-0.160469803432+0.322678496442j)
            arg[(1,)]=(0.372178789215-0.752315112843j)*x[0] + ((-0.660279034172+0.941791240535j))*x[1]
            ref[(1,)]=(-0.144050122479+0.0947380638461j)
            arg[(2,)]=(-0.532665005178+0.321477882142j)*x[0] + ((-0.394418532763-0.00728035818794j))*x[1]
            ref[(2,)]=(-0.463541768971+0.157098761977j)
            arg[(3,)]=(0.244200220106-0.171552028638j)*x[0] + ((0.202467870006-0.981716249212j))*x[1]
            ref[(3,)]=(0.223334045056-0.576634138925j)
        else:
            arg[(0,)]=(0.171374568144+0.0953067630031j)*x[0] + ((-0.139269676864-0.323673130108j))*x[1] + ((0.0853611862611-0.043736618j))*x[2]
            ref[(0,)]=(0.0587330387705-0.136051492552j)
            arg[(1,)]=(-0.728748124238-0.142572713931j)*x[0] + ((0.806954792581-0.236609873827j))*x[1] + ((0.406983283384+0.787122370125j))*x[2]
            ref[(1,)]=(0.242594975864+0.203969891183j)
            arg[(2,)]=(-0.314212133463+0.704022573043j)*x[0] + ((0.232432374033-0.855794691179j))*x[1] + ((-0.0778575304171-0.592349011212j))*x[2]
            ref[(2,)]=(-0.0798186449236-0.372060564674j)
            arg[(3,)]=(0.346414576675-0.344216413617j)*x[0] + ((0.192362425835+0.314056879648j))*x[1] + ((0.512261617022+0.283501465708j))*x[2]
            ref[(3,)]=(0.525519309766+0.12667096587j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.649665364292-0.459309316457j)*x[0] + ((-0.908976950484-0.326876642428j))*x[1]
            ref[(0, 0)]=(-0.779321157388-0.393092979443j)
            arg[(0, 1)]=(0.164135382945+0.603167869545j)*x[0] + ((0.869308317348-0.201873569544j))*x[1]
            ref[(0, 1)]=(0.516721850147+0.20064715j)
            arg[(1, 0)]=(-0.540942640126+0.326452476982j)*x[0] + ((-0.7706612786+0.431421700962j))*x[1]
            ref[(1, 0)]=(-0.655801959363+0.378937088972j)
            arg[(1, 1)]=(-0.982798912661-0.0595900429946j)*x[0] + ((0.673974040136-0.598392457816j))*x[1]
            ref[(1, 1)]=(-0.154412436263-0.328991250405j)
            arg[(2, 0)]=(-0.0595690965338-0.744355659851j)*x[0] + ((-0.838026607047-0.372818736515j))*x[1]
            ref[(2, 0)]=(-0.44879785179-0.558587198183j)
            arg[(2, 1)]=(0.8987632199+0.104271955861j)*x[0] + ((-0.68112067831-0.972742931341j))*x[1]
            ref[(2, 1)]=(0.108821270795-0.43423548774j)
        else:
            arg[(0, 0)]=(0.60252562989+0.358285820496j)*x[0] + ((0.00652359806991+0.893561117814j))*x[1] + ((0.99786219789-0.154426857607j))*x[2]
            ref[(0, 0)]=(0.803455712925+0.548710040351j)
            arg[(0, 1)]=(-0.654003024379+0.000476158141066j)*x[0] + ((0.44271939533+0.77690432949j))*x[1] + ((0.624408372808+0.0816051186599j))*x[2]
            ref[(0, 1)]=(0.206562371879+0.429492803146j)
            arg[(1, 0)]=(0.149177099488-0.691699864713j)*x[0] + ((-0.215894680205-0.341248551254j))*x[1] + ((0.480003218485-0.555779479122j))*x[2]
            ref[(1, 0)]=(0.206642818884-0.794363947544j)
            arg[(1, 1)]=(0.237652768405-0.262662965439j)*x[0] + ((0.145384137084+0.330396531859j))*x[1] + ((-0.755939972674+0.479862563425j))*x[2]
            ref[(1, 1)]=(-0.186451533593+0.273798064922j)
            arg[(2, 0)]=(-0.690544261813+0.285632315651j)*x[0] + ((-0.580762111582+0.595194801658j))*x[1] + ((-0.534503774557-0.610134627769j))*x[2]
            ref[(2, 0)]=(-0.902905073976+0.13534624477j)
            arg[(2, 1)]=(0.427518858549+0.501681692524j)*x[0] + ((-0.931139512854-0.00490262000353j))*x[1] + ((-0.680217541178-0.0771907497159j))*x[2]
            ref[(2, 1)]=(-0.591919097742+0.209794161402j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2),w)
        ref=numpy.zeros((2, 3, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(0.965139314878-0.497458435758j)*x[0] + ((-0.92165891057+0.839872200048j))*x[1]
            ref[(0, 0, 0)]=(0.0217402021541+0.171206882145j)
            arg[(0, 0, 1)]=(0.780394150576-0.885775904252j)*x[0] + ((0.447163404141+0.997768722659j))*x[1]
            ref[(0, 0, 1)]=(0.613778777359+0.0559964092034j)
            arg[(0, 1, 0)]=(-0.111919001111+0.165876397913j)*x[0] + ((0.997025476655-0.289558356683j))*x[1]
            ref[(0, 1, 0)]=(0.442553237772-0.0618409793847j)
            arg[(0, 1, 1)]=(0.321011408136+0.506847026121j)*x[0] + ((-0.894538264568-0.976938940713j))*x[1]
            ref[(0, 1, 1)]=(-0.286763428216-0.235045957296j)
            arg[(0, 2, 0)]=(-0.0086832224676-0.63936563402j)*x[0] + ((-0.921775244686+0.251833986872j))*x[1]
            ref[(0, 2, 0)]=(-0.465229233577-0.193765823574j)
            arg[(0, 2, 1)]=(-0.301183461713-0.592362287522j)*x[0] + ((0.105278529563+0.400974733358j))*x[1]
            ref[(0, 2, 1)]=(-0.0979524660749-0.0956937770818j)
            arg[(1, 0, 0)]=(0.946147432709+0.869670592119j)*x[0] + ((-0.223616056252+0.453282646668j))*x[1]
            ref[(1, 0, 0)]=(0.361265688228+0.661476619393j)
            arg[(1, 0, 1)]=(0.944656278447+0.452567563641j)*x[0] + ((-0.465986411943-0.679830511827j))*x[1]
            ref[(1, 0, 1)]=(0.239334933252-0.113631474093j)
            arg[(1, 1, 0)]=(0.890411105818-0.177949757687j)*x[0] + ((-0.164062352675-0.385037021625j))*x[1]
            ref[(1, 1, 0)]=(0.363174376572-0.281493389656j)
            arg[(1, 1, 1)]=(0.313231727644+0.461017696322j)*x[0] + ((0.329437088561-0.597244233851j))*x[1]
            ref[(1, 1, 1)]=(0.321334408103-0.0681132687644j)
            arg[(1, 2, 0)]=(-0.430788969913-0.97177747861j)*x[0] + ((0.975585510301+0.396445336469j))*x[1]
            ref[(1, 2, 0)]=(0.272398270194-0.28766607107j)
            arg[(1, 2, 1)]=(-0.442813773467+0.130962803299j)*x[0] + ((0.357129352337+0.425226823097j))*x[1]
            ref[(1, 2, 1)]=(-0.042842210565+0.278094813198j)
        else:
            arg[(0, 0, 0)]=(0.922689432175-0.994666359859j)*x[0] + ((-0.657975853735+0.00265380637391j))*x[1] + ((-0.885341388733+0.15725000513j))*x[2]
            ref[(0, 0, 0)]=(-0.310313905147-0.417381274178j)
            arg[(0, 0, 1)]=(-0.41262865476-0.462422791316j)*x[0] + ((-0.174557813778-0.915403823096j))*x[1] + ((0.0313863383252+0.324765334011j))*x[2]
            ref[(0, 0, 1)]=(-0.277900065107-0.5265306402j)
            arg[(0, 1, 0)]=(-0.930308323607+0.167739855066j)*x[0] + ((0.190279108519+0.567763381955j))*x[1] + ((0.125994383366+0.981395607379j))*x[2]
            ref[(0, 1, 0)]=(-0.307017415861+0.8584494222j)
            arg[(0, 1, 1)]=(-0.543290282638-0.23300532111j)*x[0] + ((-0.291490542206-0.792844433345j))*x[1] + ((0.871645572732+0.494412126475j))*x[2]
            ref[(0, 1, 1)]=(0.0184323739439-0.26571881399j)
            arg[(0, 2, 0)]=(0.98029293064+0.759219823268j)*x[0] + ((-0.134909831513+0.0662742166737j))*x[1] + ((0.840311085235+0.950526949201j))*x[2]
            ref[(0, 2, 0)]=(0.842847092181+0.888010494572j)
            arg[(0, 2, 1)]=(-0.454590644661-0.195122909711j)*x[0] + ((-0.689181260448+0.770413011495j))*x[1] + ((0.13342825549-0.579805538161j))*x[2]
            ref[(0, 2, 1)]=(-0.505171824809-0.00225771818859j)
            arg[(1, 0, 0)]=(0.325503140682-0.504774077629j)*x[0] + ((0.386322635607+0.0424002761189j))*x[1] + ((-0.770409847605-0.473682506667j))*x[2]
            ref[(1, 0, 0)]=(-0.0292920356583-0.468028154089j)
            arg[(1, 0, 1)]=(-0.51302484088-0.378650572561j)*x[0] + ((0.783472935274-0.0513448451051j))*x[1] + ((0.617019072716+0.526673238256j))*x[2]
            ref[(1, 0, 1)]=(0.443733583555+0.0483389102949j)
            arg[(1, 1, 0)]=(0.283387075562-0.551378250937j)*x[0] + ((-0.445301153691+0.432429382159j))*x[1] + ((0.646868373935-0.197399135295j))*x[2]
            ref[(1, 1, 0)]=(0.242477147903-0.158174002036j)
            arg[(1, 1, 1)]=(0.377214641549-0.984884554798j)*x[0] + ((0.899524514388-0.0618614031023j))*x[1] + ((-0.0335063127636-0.656726831837j))*x[2]
            ref[(1, 1, 1)]=(0.621616421587-0.851736394869j)
            arg[(1, 2, 0)]=(0.84052073036-0.744498234082j)*x[0] + ((0.343745371016+0.816042643235j))*x[1] + ((0.835307668806-0.0286857565375j))*x[2]
            ref[(1, 2, 0)]=(1.00978688509+0.021429326308j)
            arg[(1, 2, 1)]=(0.518763100913-0.45486000262j)*x[0] + ((-0.455722271406+0.401718524349j))*x[1] + ((0.506183527302-0.34924899036j))*x[2]
            ref[(1, 2, 1)]=(0.284612178405-0.201195234316j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 4),w)
        ref=numpy.zeros((4, 3, 3, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.403840052395+0.328394199456j)*x[0] + ((-0.566672636304-0.429524036022j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.48525634435-0.050564918283j)
            arg[(0, 0, 0, 1)]=(0.105372342599+0.147037682872j)*x[0] + ((-0.638284416914+0.797894483865j))*x[1]
            ref[(0, 0, 0, 1)]=(-0.266456037157+0.472466083369j)
            arg[(0, 0, 0, 2)]=(0.737872490433-0.923599752157j)*x[0] + ((0.809668883957-0.770496374175j))*x[1]
            ref[(0, 0, 0, 2)]=(0.773770687195-0.847048063166j)
            arg[(0, 0, 0, 3)]=(0.251013093603+0.840721167482j)*x[0] + ((0.641309181302+0.729589518542j))*x[1]
            ref[(0, 0, 0, 3)]=(0.446161137452+0.785155343012j)
            arg[(0, 0, 1, 0)]=(0.671438836926+0.522299650443j)*x[0] + ((0.017118736956+0.96412788231j))*x[1]
            ref[(0, 0, 1, 0)]=(0.344278786941+0.743213766377j)
            arg[(0, 0, 1, 1)]=(-0.952867437767+0.243551824182j)*x[0] + ((0.300833450569+0.786890875418j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.326016993599+0.5152213498j)
            arg[(0, 0, 1, 2)]=(-0.0173067908584-0.933064266728j)*x[0] + ((0.612506835355-0.668196025287j))*x[1]
            ref[(0, 0, 1, 2)]=(0.297600022248-0.800630146008j)
            arg[(0, 0, 1, 3)]=(-0.347767936695+0.918716638557j)*x[0] + ((-0.0803103148192-0.704695616557j))*x[1]
            ref[(0, 0, 1, 3)]=(-0.214039125757+0.107010511j)
            arg[(0, 0, 2, 0)]=(0.989043257392+0.398195440343j)*x[0] + ((0.77414210039+0.279991912723j))*x[1]
            ref[(0, 0, 2, 0)]=(0.881592678891+0.339093676533j)
            arg[(0, 0, 2, 1)]=(0.112608806792-0.114220145951j)*x[0] + ((-0.2518521411+0.478947119252j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.0696216671541+0.18236348665j)
            arg[(0, 0, 2, 2)]=(0.26907157709-0.738484619435j)*x[0] + ((0.69059580865+0.0559513538093j))*x[1]
            ref[(0, 0, 2, 2)]=(0.47983369287-0.341266632813j)
            arg[(0, 0, 2, 3)]=(0.686069111115-0.513996541034j)*x[0] + ((-0.452556561406-0.444118016598j))*x[1]
            ref[(0, 0, 2, 3)]=(0.116756274855-0.479057278816j)
            arg[(0, 1, 0, 0)]=(-0.448536316995+0.912037920154j)*x[0] + ((-0.461866127172-0.724112522021j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.455201222083+0.0939626990663j)
            arg[(0, 1, 0, 1)]=(-0.823043410787-0.0941072861026j)*x[0] + ((0.154425373551+0.408131242824j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.334309018618+0.157011978361j)
            arg[(0, 1, 0, 2)]=(0.854949049433+0.933187166107j)*x[0] + ((-0.945657617619+0.199096221195j))*x[1]
            ref[(0, 1, 0, 2)]=(-0.0453542840929+0.566141693651j)
            arg[(0, 1, 0, 3)]=(-0.119882270144-0.0881377115344j)*x[0] + ((0.155077108885+0.463183565547j))*x[1]
            ref[(0, 1, 0, 3)]=(0.0175974193707+0.187522927006j)
            arg[(0, 1, 1, 0)]=(-0.530327323552-0.52203195106j)*x[0] + ((0.972966064739+0.844842828361j))*x[1]
            ref[(0, 1, 1, 0)]=(0.221319370593+0.16140543865j)
            arg[(0, 1, 1, 1)]=(-0.460893032913+0.228914073963j)*x[0] + ((0.103472102469-0.212046677505j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.178710465222+0.00843369822902j)
            arg[(0, 1, 1, 2)]=(-0.0158896553028+0.697617027181j)*x[0] + ((0.649618727644+0.180961380982j))*x[1]
            ref[(0, 1, 1, 2)]=(0.31686453617+0.439289204082j)
            arg[(0, 1, 1, 3)]=(0.850244631146+0.648623874867j)*x[0] + ((-0.537735532996-0.370672296938j))*x[1]
            ref[(0, 1, 1, 3)]=(0.156254549075+0.138975788964j)
            arg[(0, 1, 2, 0)]=(-0.0615597969494+0.877538645798j)*x[0] + ((0.873612888334+0.526809726252j))*x[1]
            ref[(0, 1, 2, 0)]=(0.406026545692+0.702174186025j)
            arg[(0, 1, 2, 1)]=(0.484043797732+0.395107124796j)*x[0] + ((0.988800522782-0.561392665317j))*x[1]
            ref[(0, 1, 2, 1)]=(0.736422160257-0.0831427702606j)
            arg[(0, 1, 2, 2)]=(0.459972733538-0.744508812453j)*x[0] + ((-0.345343559067+0.891079029926j))*x[1]
            ref[(0, 1, 2, 2)]=(0.0573145872357+0.0732851087365j)
            arg[(0, 1, 2, 3)]=(-0.928231764373-0.354006003087j)*x[0] + ((0.301003974635-0.22523288928j))*x[1]
            ref[(0, 1, 2, 3)]=(-0.313613894869-0.289619446184j)
            arg[(0, 2, 0, 0)]=(0.572650635522-0.548237614907j)*x[0] + ((-0.472697747854-0.287104961263j))*x[1]
            ref[(0, 2, 0, 0)]=(0.0499764438338-0.417671288085j)
            arg[(0, 2, 0, 1)]=(0.648312860009-0.240784817988j)*x[0] + ((-0.668645911031-0.461510385047j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.0101665255109-0.351147601518j)
            arg[(0, 2, 0, 2)]=(0.239723982005-0.55639946232j)*x[0] + ((-0.482568095177+0.89632566058j))*x[1]
            ref[(0, 2, 0, 2)]=(-0.121422056586+0.16996309913j)
            arg[(0, 2, 0, 3)]=(0.637578181331-0.748617497523j)*x[0] + ((0.881715345004+0.323031924573j))*x[1]
            ref[(0, 2, 0, 3)]=(0.759646763168-0.212792786475j)
            arg[(0, 2, 1, 0)]=(-0.466288255343-0.0215564285127j)*x[0] + ((-0.0962480038319-0.221631190933j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.281268129587-0.121593809723j)
            arg[(0, 2, 1, 1)]=(0.0955860446763-0.971618488701j)*x[0] + ((-0.0691421332399-0.868938673501j))*x[1]
            ref[(0, 2, 1, 1)]=(0.0132219557182-0.920278581101j)
            arg[(0, 2, 1, 2)]=(-0.716447822681+0.00703604559951j)*x[0] + ((-0.734723625117+0.979802271994j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.725585723899+0.493419158797j)
            arg[(0, 2, 1, 3)]=(0.715941317468-0.410659475604j)*x[0] + ((-0.870722003637+0.148116622222j))*x[1]
            ref[(0, 2, 1, 3)]=(-0.0773903430844-0.131271426691j)
            arg[(0, 2, 2, 0)]=(0.87645830217+0.772182511138j)*x[0] + ((-0.286866261266-0.995190862093j))*x[1]
            ref[(0, 2, 2, 0)]=(0.294796020452-0.111504175477j)
            arg[(0, 2, 2, 1)]=(-0.492259863775-0.871912179718j)*x[0] + ((-0.972303747235-0.302491049524j))*x[1]
            ref[(0, 2, 2, 1)]=(-0.732281805505-0.587201614621j)
            arg[(0, 2, 2, 2)]=(0.789096315018-0.769267402924j)*x[0] + ((-0.602211153206-0.894589335813j))*x[1]
            ref[(0, 2, 2, 2)]=(0.0934425809062-0.831928369369j)
            arg[(0, 2, 2, 3)]=(-0.512903490459+0.97142459874j)*x[0] + ((0.241384680229-0.258471270617j))*x[1]
            ref[(0, 2, 2, 3)]=(-0.135759405115+0.356476664062j)
            arg[(1, 0, 0, 0)]=(-0.320349380494-0.133297813058j)*x[0] + ((-0.377583284315-0.385078094307j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.348966332404-0.259187953683j)
            arg[(1, 0, 0, 1)]=(0.765890128408-0.998005360954j)*x[0] + ((-0.280885416076-0.543368440875j))*x[1]
            ref[(1, 0, 0, 1)]=(0.242502356166-0.770686900914j)
            arg[(1, 0, 0, 2)]=(-0.189577406772+0.0564079356399j)*x[0] + ((-0.813678470616+0.546976389849j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.501627938694+0.301692162744j)
            arg[(1, 0, 0, 3)]=(0.884682843501+0.200829169093j)*x[0] + ((0.362434878718+0.414813790447j))*x[1]
            ref[(1, 0, 0, 3)]=(0.62355886111+0.30782147977j)
            arg[(1, 0, 1, 0)]=(-0.924762119257-0.718251106097j)*x[0] + ((0.805573451765+0.831638983326j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.0595943337463+0.0566939386141j)
            arg[(1, 0, 1, 1)]=(0.608639207399+0.710539991399j)*x[0] + ((-0.501321315502+0.699739521945j))*x[1]
            ref[(1, 0, 1, 1)]=(0.0536589459482+0.705139756672j)
            arg[(1, 0, 1, 2)]=(0.766963418259-0.930897671612j)*x[0] + ((0.526954531028-0.620699454186j))*x[1]
            ref[(1, 0, 1, 2)]=(0.646958974643-0.775798562899j)
            arg[(1, 0, 1, 3)]=(-0.0402857624546-0.0254854272146j)*x[0] + ((-0.338191666781+0.36925252847j))*x[1]
            ref[(1, 0, 1, 3)]=(-0.189238714618+0.171883550628j)
            arg[(1, 0, 2, 0)]=(-0.379344093425-0.159316199505j)*x[0] + ((-0.458642427762-0.727527847417j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.418993260594-0.443422023461j)
            arg[(1, 0, 2, 1)]=(0.645739388496+0.630926545176j)*x[0] + ((-0.631901915423+0.849900977303j))*x[1]
            ref[(1, 0, 2, 1)]=(0.0069187365363+0.74041376124j)
            arg[(1, 0, 2, 2)]=(0.985651966983+0.567836103361j)*x[0] + ((0.5576771938+0.624356826556j))*x[1]
            ref[(1, 0, 2, 2)]=(0.771664580392+0.596096464959j)
            arg[(1, 0, 2, 3)]=(0.15184303501-0.492442292077j)*x[0] + ((0.423088369504+0.664273320537j))*x[1]
            ref[(1, 0, 2, 3)]=(0.287465702257+0.0859155142298j)
            arg[(1, 1, 0, 0)]=(-0.128892959257+0.514536998278j)*x[0] + ((0.298739063395-0.257703453186j))*x[1]
            ref[(1, 1, 0, 0)]=(0.084923052069+0.128416772546j)
            arg[(1, 1, 0, 1)]=(-0.86944298732-0.239439390241j)*x[0] + ((0.495155863822+0.127308599975j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.187143561749-0.056065395133j)
            arg[(1, 1, 0, 2)]=(-0.835305142179+0.745538711369j)*x[0] + ((-0.475787847525-0.0500717126819j))*x[1]
            ref[(1, 1, 0, 2)]=(-0.655546494852+0.347733499343j)
            arg[(1, 1, 0, 3)]=(-0.363884900907-0.491575444406j)*x[0] + ((-0.996393771028+0.479054346537j))*x[1]
            ref[(1, 1, 0, 3)]=(-0.680139335968-0.00626054893457j)
            arg[(1, 1, 1, 0)]=(-0.00252343131831+0.850008862018j)*x[0] + ((0.645207681759+0.981730231082j))*x[1]
            ref[(1, 1, 1, 0)]=(0.32134212522+0.91586954655j)
            arg[(1, 1, 1, 1)]=(0.566248993639-0.0583261929769j)*x[0] + ((-0.915614888644-0.922835124547j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.174682947503-0.490580658762j)
            arg[(1, 1, 1, 2)]=(-0.554612816457-0.760778330623j)*x[0] + ((-0.974576190407-0.396187378198j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.764594503432-0.578482854411j)
            arg[(1, 1, 1, 3)]=(0.441364045502+0.945624179482j)*x[0] + ((0.483620887817-0.303015909652j))*x[1]
            ref[(1, 1, 1, 3)]=(0.46249246666+0.321304134915j)
            arg[(1, 1, 2, 0)]=(-0.95575917095+0.139070542043j)*x[0] + ((-0.473759713209+0.127352011732j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.714759442079+0.133211276887j)
            arg[(1, 1, 2, 1)]=(-0.552568584243-0.703439781882j)*x[0] + ((0.138704293878+0.567037224675j))*x[1]
            ref[(1, 1, 2, 1)]=(-0.206932145182-0.0682012786038j)
            arg[(1, 1, 2, 2)]=(-0.488365978073-0.0238139769302j)*x[0] + ((-0.744737802792+0.0731366014456j))*x[1]
            ref[(1, 1, 2, 2)]=(-0.616551890433+0.0246613122577j)
            arg[(1, 1, 2, 3)]=(-0.25120045896+0.619830791442j)*x[0] + ((0.843828872001-0.926642749145j))*x[1]
            ref[(1, 1, 2, 3)]=(0.29631420652-0.153405978852j)
            arg[(1, 2, 0, 0)]=(-0.384554578958+0.108286186556j)*x[0] + ((0.332346195496-0.185146723562j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.026104191731-0.0384302685031j)
            arg[(1, 2, 0, 1)]=(0.801702806184-0.494740513594j)*x[0] + ((-0.262117145323-0.612584258611j))*x[1]
            ref[(1, 2, 0, 1)]=(0.26979283043-0.553662386102j)
            arg[(1, 2, 0, 2)]=(-0.760130013722-0.312305277113j)*x[0] + ((0.710937670159-0.715562207287j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.0245961717817-0.5139337422j)
            arg[(1, 2, 0, 3)]=(0.843663620277+0.232768049451j)*x[0] + ((-0.109401911371-0.187208075219j))*x[1]
            ref[(1, 2, 0, 3)]=(0.367130854453+0.0227799871162j)
            arg[(1, 2, 1, 0)]=(0.270689069584+0.37316535459j)*x[0] + ((-0.51666138109+0.0272575670055j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.122986155753+0.200211460798j)
            arg[(1, 2, 1, 1)]=(0.772310949899-0.730467316332j)*x[0] + ((-0.672733783221-0.643871524287j))*x[1]
            ref[(1, 2, 1, 1)]=(0.0497885833389-0.68716942031j)
            arg[(1, 2, 1, 2)]=(-0.809895464399-0.297059355849j)*x[0] + ((-0.79533650014+0.25861771132j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.80261598227-0.0192208222644j)
            arg[(1, 2, 1, 3)]=(-0.470180298806-0.0504492906098j)*x[0] + ((-0.269498074028+0.95171133837j))*x[1]
            ref[(1, 2, 1, 3)]=(-0.369839186417+0.45063102388j)
            arg[(1, 2, 2, 0)]=(-0.826107721861+0.601359785974j)*x[0] + ((-0.872047747739-0.763635577743j))*x[1]
            ref[(1, 2, 2, 0)]=(-0.8490777348-0.0811378958849j)
            arg[(1, 2, 2, 1)]=(-0.470617104476+0.0931143098391j)*x[0] + ((-0.732032681-0.296275445429j))*x[1]
            ref[(1, 2, 2, 1)]=(-0.601324892738-0.101580567795j)
            arg[(1, 2, 2, 2)]=(0.836716049753+0.145407588392j)*x[0] + ((0.884478193683-0.507144226452j))*x[1]
            ref[(1, 2, 2, 2)]=(0.860597121718-0.18086831903j)
            arg[(1, 2, 2, 3)]=(-0.121674738368-0.690835133634j)*x[0] + ((-0.199687636255+0.227334167326j))*x[1]
            ref[(1, 2, 2, 3)]=(-0.160681187312-0.231750483154j)
            arg[(2, 0, 0, 0)]=(-0.852364875933-0.875355800517j)*x[0] + ((-0.0773274479389-0.581447128936j))*x[1]
            ref[(2, 0, 0, 0)]=(-0.464846161936-0.728401464726j)
            arg[(2, 0, 0, 1)]=(-0.0598355860588+0.980441036569j)*x[0] + ((0.416758252533+0.162144131742j))*x[1]
            ref[(2, 0, 0, 1)]=(0.178461333237+0.571292584155j)
            arg[(2, 0, 0, 2)]=(-0.163254409935+0.782433585434j)*x[0] + ((-0.354379036051+0.359465764007j))*x[1]
            ref[(2, 0, 0, 2)]=(-0.258816722993+0.570949674721j)
            arg[(2, 0, 0, 3)]=(0.727225139555-0.595710014624j)*x[0] + ((0.289134094807+0.496114612072j))*x[1]
            ref[(2, 0, 0, 3)]=(0.508179617181-0.0497977012756j)
            arg[(2, 0, 1, 0)]=(0.170256422263-0.0647805428729j)*x[0] + ((-0.650441710938-0.545624742573j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.240092644338-0.305202642723j)
            arg[(2, 0, 1, 1)]=(-0.866214414866-0.692014205472j)*x[0] + ((-0.166943737794-0.0919872845292j))*x[1]
            ref[(2, 0, 1, 1)]=(-0.51657907633-0.392000745j)
            arg[(2, 0, 1, 2)]=(-0.0195094425425-0.495364159407j)*x[0] + ((0.299432313875-0.188738120083j))*x[1]
            ref[(2, 0, 1, 2)]=(0.139961435666-0.342051139745j)
            arg[(2, 0, 1, 3)]=(-0.512159910667+0.551807684885j)*x[0] + ((0.541068087777+0.143293462774j))*x[1]
            ref[(2, 0, 1, 3)]=(0.014454088555+0.34755057383j)
            arg[(2, 0, 2, 0)]=(-0.281669387495-0.603539720619j)*x[0] + ((-0.886406461025+0.877022563673j))*x[1]
            ref[(2, 0, 2, 0)]=(-0.58403792426+0.136741421527j)
            arg[(2, 0, 2, 1)]=(-0.932835709096+0.709127676389j)*x[0] + ((-0.923696813322+0.672379213757j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.928266261209+0.690753445073j)
            arg[(2, 0, 2, 2)]=(-0.171686752608+0.0136631102412j)*x[0] + ((-0.700312663276-0.465907483243j))*x[1]
            ref[(2, 0, 2, 2)]=(-0.435999707942-0.226122186501j)
            arg[(2, 0, 2, 3)]=(-0.658008832364-0.415201268981j)*x[0] + ((-0.223337926637+0.0449782795728j))*x[1]
            ref[(2, 0, 2, 3)]=(-0.440673379501-0.185111494704j)
            arg[(2, 1, 0, 0)]=(0.626088277043-0.116606750971j)*x[0] + ((-0.806456421331+0.399201570987j))*x[1]
            ref[(2, 1, 0, 0)]=(-0.0901840721443+0.141297410008j)
            arg[(2, 1, 0, 1)]=(-0.561500374886+0.472290388005j)*x[0] + ((-0.449783011218+0.815328856235j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.505641693052+0.64380962212j)
            arg[(2, 1, 0, 2)]=(-0.726684333366+0.428978079112j)*x[0] + ((-0.680273541423-0.939120515944j))*x[1]
            ref[(2, 1, 0, 2)]=(-0.703478937394-0.255071218416j)
            arg[(2, 1, 0, 3)]=(0.207376494217+0.751738689785j)*x[0] + ((0.24237403777-0.200253103124j))*x[1]
            ref[(2, 1, 0, 3)]=(0.224875265993+0.275742793331j)
            arg[(2, 1, 1, 0)]=(-0.139990636235-0.660265843839j)*x[0] + ((-0.646753986567-0.419664350578j))*x[1]
            ref[(2, 1, 1, 0)]=(-0.393372311401-0.539965097209j)
            arg[(2, 1, 1, 1)]=(0.0856551376206+0.486609048958j)*x[0] + ((-0.424964896176+0.231396175985j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.169654879278+0.359002612471j)
            arg[(2, 1, 1, 2)]=(-0.655693958892+0.0848383569569j)*x[0] + ((-0.388886665685+0.474186565782j))*x[1]
            ref[(2, 1, 1, 2)]=(-0.522290312289+0.27951246137j)
            arg[(2, 1, 1, 3)]=(0.801668186058+0.439745924055j)*x[0] + ((-0.555677280848+0.0268267766203j))*x[1]
            ref[(2, 1, 1, 3)]=(0.122995452605+0.233286350338j)
            arg[(2, 1, 2, 0)]=(-0.79719863842-0.753176621445j)*x[0] + ((-0.43161377859+0.969978309414j))*x[1]
            ref[(2, 1, 2, 0)]=(-0.614406208505+0.108400843984j)
            arg[(2, 1, 2, 1)]=(0.516084487546+0.0618932381413j)*x[0] + ((0.607760565194+0.771708802332j))*x[1]
            ref[(2, 1, 2, 1)]=(0.56192252637+0.416801020237j)
            arg[(2, 1, 2, 2)]=(-0.208030372656-0.462617561315j)*x[0] + ((0.351894732493-0.457074335071j))*x[1]
            ref[(2, 1, 2, 2)]=(0.0719321799181-0.459845948193j)
            arg[(2, 1, 2, 3)]=(0.791837637462+0.796399723871j)*x[0] + ((0.699124525173-0.591963799951j))*x[1]
            ref[(2, 1, 2, 3)]=(0.745481081318+0.10221796196j)
            arg[(2, 2, 0, 0)]=(0.381149793424+0.752339393857j)*x[0] + ((-0.0381206239453+0.993209657377j))*x[1]
            ref[(2, 2, 0, 0)]=(0.17151458474+0.872774525617j)
            arg[(2, 2, 0, 1)]=(0.065553110867+0.396489061626j)*x[0] + ((-0.117197417314-0.907753261686j))*x[1]
            ref[(2, 2, 0, 1)]=(-0.0258221532236-0.25563210003j)
            arg[(2, 2, 0, 2)]=(0.834132307613-0.364231184783j)*x[0] + ((0.145388891504-0.016254017785j))*x[1]
            ref[(2, 2, 0, 2)]=(0.489760599559-0.190242601284j)
            arg[(2, 2, 0, 3)]=(-0.914863315711+0.381851241092j)*x[0] + ((-0.783587715929+0.225056430092j))*x[1]
            ref[(2, 2, 0, 3)]=(-0.84922551582+0.303453835592j)
            arg[(2, 2, 1, 0)]=(0.805464707677-0.377856307062j)*x[0] + ((-0.702249316238+0.968011797446j))*x[1]
            ref[(2, 2, 1, 0)]=(0.0516076957191+0.295077745192j)
            arg[(2, 2, 1, 1)]=(0.344039100019+0.328200637461j)*x[0] + ((0.0085890513709-0.716053062584j))*x[1]
            ref[(2, 2, 1, 1)]=(0.176314075695-0.193926212562j)
            arg[(2, 2, 1, 2)]=(-0.779028343367+0.738935564736j)*x[0] + ((0.689080215579-0.306495546332j))*x[1]
            ref[(2, 2, 1, 2)]=(-0.0449740638942+0.216220009202j)
            arg[(2, 2, 1, 3)]=(0.619827432434+0.941464677531j)*x[0] + ((0.117214304645-0.965813051275j))*x[1]
            ref[(2, 2, 1, 3)]=(0.36852086854-0.0121741868716j)
            arg[(2, 2, 2, 0)]=(-0.676783538114-0.782540871272j)*x[0] + ((0.852390267574+0.787157032377j))*x[1]
            ref[(2, 2, 2, 0)]=(0.0878033647302+0.00230808055238j)
            arg[(2, 2, 2, 1)]=(-0.692096233978+0.519671009301j)*x[0] + ((-0.808357107945-0.513561076187j))*x[1]
            ref[(2, 2, 2, 1)]=(-0.750226670961+0.0030549665571j)
            arg[(2, 2, 2, 2)]=(-0.386927062414-0.579876231097j)*x[0] + ((-0.447768381409+0.15222364677j))*x[1]
            ref[(2, 2, 2, 2)]=(-0.417347721912-0.213826292163j)
            arg[(2, 2, 2, 3)]=(0.906795393025-0.500773264599j)*x[0] + ((-0.665359515905+0.370989441963j))*x[1]
            ref[(2, 2, 2, 3)]=(0.12071793856-0.0648919113181j)
            arg[(3, 0, 0, 0)]=(0.576500330881+0.514492749291j)*x[0] + ((-0.010820749647+0.794479065306j))*x[1]
            ref[(3, 0, 0, 0)]=(0.282839790617+0.654485907299j)
            arg[(3, 0, 0, 1)]=(0.795323459367+0.301468894016j)*x[0] + ((0.155063754842+0.68985963128j))*x[1]
            ref[(3, 0, 0, 1)]=(0.475193607105+0.495664262648j)
            arg[(3, 0, 0, 2)]=(0.395515293571-0.690079993703j)*x[0] + ((-0.501762784363+0.350753565579j))*x[1]
            ref[(3, 0, 0, 2)]=(-0.0531237453963-0.169663214062j)
            arg[(3, 0, 0, 3)]=(0.744431386263+0.865208167318j)*x[0] + ((-0.158559405543-0.757639683701j))*x[1]
            ref[(3, 0, 0, 3)]=(0.29293599036+0.0537842418089j)
            arg[(3, 0, 1, 0)]=(-0.775413079428-0.903279828376j)*x[0] + ((0.713062821729+0.836212909598j))*x[1]
            ref[(3, 0, 1, 0)]=(-0.0311751288497-0.0335334593891j)
            arg[(3, 0, 1, 1)]=(0.0266104240826+0.502051250044j)*x[0] + ((0.108086269283+0.923130729413j))*x[1]
            ref[(3, 0, 1, 1)]=(0.0673483466827+0.712590989729j)
            arg[(3, 0, 1, 2)]=(0.690662868765-0.79893510804j)*x[0] + ((-0.392615451961+0.53412359921j))*x[1]
            ref[(3, 0, 1, 2)]=(0.149023708402-0.132405754415j)
            arg[(3, 0, 1, 3)]=(-0.882882898689+0.135369260078j)*x[0] + ((-0.354091373605+0.840076186325j))*x[1]
            ref[(3, 0, 1, 3)]=(-0.618487136147+0.487722723202j)
            arg[(3, 0, 2, 0)]=(-0.0485661829148+0.119824497308j)*x[0] + ((-0.372569783364-0.793033267797j))*x[1]
            ref[(3, 0, 2, 0)]=(-0.210567983139-0.336604385244j)
            arg[(3, 0, 2, 1)]=(0.281979480392+0.00901748025458j)*x[0] + ((0.832787034723+0.0717712157893j))*x[1]
            ref[(3, 0, 2, 1)]=(0.557383257558+0.040394348022j)
            arg[(3, 0, 2, 2)]=(-0.18702316645-0.487510576716j)*x[0] + ((0.0486496100474-0.404892135803j))*x[1]
            ref[(3, 0, 2, 2)]=(-0.0691867782011-0.44620135626j)
            arg[(3, 0, 2, 3)]=(0.547165615364+0.599878407008j)*x[0] + ((-0.363489126014+0.229797131204j))*x[1]
            ref[(3, 0, 2, 3)]=(0.091838244675+0.414837769106j)
            arg[(3, 1, 0, 0)]=(-0.793991374458-0.0702459524991j)*x[0] + ((-0.910673542481+0.146888725831j))*x[1]
            ref[(3, 1, 0, 0)]=(-0.85233245847+0.0383213866658j)
            arg[(3, 1, 0, 1)]=(-0.0267567903815+0.143234260585j)*x[0] + ((-0.245502536843+0.340654563103j))*x[1]
            ref[(3, 1, 0, 1)]=(-0.136129663612+0.241944411844j)
            arg[(3, 1, 0, 2)]=(0.459157300332+0.856929771629j)*x[0] + ((0.521227345114+0.461029090091j))*x[1]
            ref[(3, 1, 0, 2)]=(0.490192322723+0.65897943086j)
            arg[(3, 1, 0, 3)]=(0.0546704235516-0.165611500427j)*x[0] + ((0.556139239747+0.524486246558j))*x[1]
            ref[(3, 1, 0, 3)]=(0.305404831649+0.179437373065j)
            arg[(3, 1, 1, 0)]=(-0.272448505512-0.237973826622j)*x[0] + ((-0.111962512021+0.236034909241j))*x[1]
            ref[(3, 1, 1, 0)]=(-0.192205508766-0.00096945869031j)
            arg[(3, 1, 1, 1)]=(-0.150217306782+0.217942842106j)*x[0] + ((0.942888842435-0.597240706103j))*x[1]
            ref[(3, 1, 1, 1)]=(0.396335767827-0.189648931998j)
            arg[(3, 1, 1, 2)]=(0.620356838391-0.363338978621j)*x[0] + ((0.800919795576-0.810467620014j))*x[1]
            ref[(3, 1, 1, 2)]=(0.710638316983-0.586903299317j)
            arg[(3, 1, 1, 3)]=(0.472351242461+0.96582385762j)*x[0] + ((0.61507175423-0.98659910304j))*x[1]
            ref[(3, 1, 1, 3)]=(0.543711498346-0.01038762271j)
            arg[(3, 1, 2, 0)]=(0.825288789386+0.305459442166j)*x[0] + ((0.701922440252-0.0835871155899j))*x[1]
            ref[(3, 1, 2, 0)]=(0.763605614819+0.110936163288j)
            arg[(3, 1, 2, 1)]=(-0.569634496116+0.993121728324j)*x[0] + ((-0.294143710811-0.322986360873j))*x[1]
            ref[(3, 1, 2, 1)]=(-0.431889103464+0.335067683726j)
            arg[(3, 1, 2, 2)]=(-0.797192638011-0.326908343465j)*x[0] + ((0.744374079802-0.733282535353j))*x[1]
            ref[(3, 1, 2, 2)]=(-0.0264092791044-0.530095439409j)
            arg[(3, 1, 2, 3)]=(-0.948078130142-0.470137831311j)*x[0] + ((-0.160645619957+0.25553118014j))*x[1]
            ref[(3, 1, 2, 3)]=(-0.554361875049-0.107303325585j)
            arg[(3, 2, 0, 0)]=(-0.387982696896+0.538775578278j)*x[0] + ((0.343410876614-0.426916349967j))*x[1]
            ref[(3, 2, 0, 0)]=(-0.0222859101413+0.0559296141554j)
            arg[(3, 2, 0, 1)]=(0.933512181292-0.681459169711j)*x[0] + ((0.700071453373+0.023841835291j))*x[1]
            ref[(3, 2, 0, 1)]=(0.816791817333-0.32880866721j)
            arg[(3, 2, 0, 2)]=(-0.981563168276+0.574579243369j)*x[0] + ((-0.444073458443+0.116438752399j))*x[1]
            ref[(3, 2, 0, 2)]=(-0.712818313359+0.345508997884j)
            arg[(3, 2, 0, 3)]=(-0.361998255408-0.0389113279281j)*x[0] + ((-0.44866722416+0.773214720521j))*x[1]
            ref[(3, 2, 0, 3)]=(-0.405332739784+0.367151696296j)
            arg[(3, 2, 1, 0)]=(0.60299569002-0.0789702632749j)*x[0] + ((-0.309465018952-0.622232124976j))*x[1]
            ref[(3, 2, 1, 0)]=(0.146765335534-0.350601194126j)
            arg[(3, 2, 1, 1)]=(-0.144075613951-0.840313287132j)*x[0] + ((0.149349648924-0.530239353613j))*x[1]
            ref[(3, 2, 1, 1)]=(0.00263701748636-0.685276320372j)
            arg[(3, 2, 1, 2)]=(0.834452333356+0.0142955963677j)*x[0] + ((0.691414960208-0.91837549927j))*x[1]
            ref[(3, 2, 1, 2)]=(0.762933646782-0.452039951451j)
            arg[(3, 2, 1, 3)]=(0.588309351466-0.0712649837392j)*x[0] + ((-0.345095215909-0.124766064291j))*x[1]
            ref[(3, 2, 1, 3)]=(0.121607067779-0.0980155240153j)
            arg[(3, 2, 2, 0)]=(0.523988598194+0.267429335406j)*x[0] + ((0.850255786346+0.804863994405j))*x[1]
            ref[(3, 2, 2, 0)]=(0.68712219227+0.536146664906j)
            arg[(3, 2, 2, 1)]=(0.951480607731-0.103053953405j)*x[0] + ((0.723725318631-0.583836919864j))*x[1]
            ref[(3, 2, 2, 1)]=(0.837602963181-0.343445436634j)
            arg[(3, 2, 2, 2)]=(-0.63659107864+0.79625850835j)*x[0] + ((-0.16336910382-0.661495586481j))*x[1]
            ref[(3, 2, 2, 2)]=(-0.39998009123+0.0673814609345j)
            arg[(3, 2, 2, 3)]=(-0.113079210452+0.10212448568j)*x[0] + ((-0.43407193183+0.35350315757j))*x[1]
            ref[(3, 2, 2, 3)]=(-0.273575571141+0.227813821625j)
        else:
            arg[(0, 0, 0, 0)]=(-0.169529009732-0.413295086048j)*x[0] + ((-0.107855464507+0.723289755403j))*x[1] + ((0.576512641665-0.163000427905j))*x[2]
            ref[(0, 0, 0, 0)]=(0.149564083713+0.0734971207246j)
            arg[(0, 0, 0, 1)]=(0.453224232152+0.329321338414j)*x[0] + ((0.147151584421-0.811314230233j))*x[1] + ((-0.313887171818+0.307842140216j))*x[2]
            ref[(0, 0, 0, 1)]=(0.143244322378-0.0870753758015j)
            arg[(0, 0, 0, 2)]=(-0.0899355085925+0.237410376699j)*x[0] + ((0.407116197069-0.974062891487j))*x[1] + ((0.0592658165381+0.787519868191j))*x[2]
            ref[(0, 0, 0, 2)]=(0.188223252507+0.0254336767013j)
            arg[(0, 0, 0, 3)]=(-0.366536665825-0.0424690901248j)*x[0] + ((0.434319987121+0.426310500276j))*x[1] + ((0.403008829829-0.0478239649208j))*x[2]
            ref[(0, 0, 0, 3)]=(0.235396075562+0.168008722615j)
            arg[(0, 0, 1, 0)]=(0.745898677117+0.991045111091j)*x[0] + ((0.783358889764-0.0613214289738j))*x[1] + ((0.279734457729-0.835691679494j))*x[2]
            ref[(0, 0, 1, 0)]=(0.904496012305+0.0470160013112j)
            arg[(0, 0, 1, 1)]=(-0.245142533037+0.588241878744j)*x[0] + ((-0.603812530482-0.102332386273j))*x[1] + ((-0.35365459233+0.216684375135j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.601304827925+0.351296933803j)
            arg[(0, 0, 1, 2)]=(0.0230338023117-0.859328727353j)*x[0] + ((-0.266112523691+0.796804802033j))*x[1] + ((0.839094438554-0.987797425696j))*x[2]
            ref[(0, 0, 1, 2)]=(0.298007858587-0.525160675508j)
            arg[(0, 0, 1, 3)]=(0.457637449188-0.457068609236j)*x[0] + ((-0.995704357242+0.694771260084j))*x[1] + ((-0.183996244771-0.25285020173j))*x[2]
            ref[(0, 0, 1, 3)]=(-0.361031576413-0.00757377544131j)
            arg[(0, 0, 2, 0)]=(-0.425666876815-0.751859593189j)*x[0] + ((-0.00802834917788+0.678049532709j))*x[1] + ((-0.808830858746+0.941744919037j))*x[2]
            ref[(0, 0, 2, 0)]=(-0.621263042369+0.433967429279j)
            arg[(0, 0, 2, 1)]=(-0.588692530951+0.73421766465j)*x[0] + ((-0.230829616504+0.830473407069j))*x[1] + ((0.441451034691-0.701490801119j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.189035556381+0.4316001353j)
            arg[(0, 0, 2, 2)]=(0.0885563492237-0.273904575807j)*x[0] + ((-0.0396374688346+0.377295089442j))*x[1] + ((-0.548677118149-0.129883434142j))*x[2]
            ref[(0, 0, 2, 2)]=(-0.24987911888-0.0132464602534j)
            arg[(0, 0, 2, 3)]=(-0.529223808255+0.460521158329j)*x[0] + ((-0.351236041072+0.31772242717j))*x[1] + ((0.791610522708+0.510287299868j))*x[2]
            ref[(0, 0, 2, 3)]=(-0.0444246633091+0.644265442684j)
            arg[(0, 1, 0, 0)]=(-0.994392030329-0.443084083721j)*x[0] + ((0.705982171522-0.784576257768j))*x[1] + ((0.90137433745+0.096563055041j))*x[2]
            ref[(0, 1, 0, 0)]=(0.306482239322-0.565548643224j)
            arg[(0, 1, 0, 1)]=(0.500371755501+0.228683275435j)*x[0] + ((-0.813997508524+0.62780749979j))*x[1] + ((-0.740204518527+0.554503679603j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.526915135775+0.705497227414j)
            arg[(0, 1, 0, 2)]=(-0.0906897076378-0.347021368147j)*x[0] + ((-0.386014831281+0.522763359692j))*x[1] + ((-0.47542407147-0.0820372922062j))*x[2]
            ref[(0, 1, 0, 2)]=(-0.476064305195+0.0468523496692j)
            arg[(0, 1, 0, 3)]=(-0.903965277875+0.595257112558j)*x[0] + ((-0.804254395091-0.354387631087j))*x[1] + ((0.414260546249+0.572529077246j))*x[2]
            ref[(0, 1, 0, 3)]=(-0.646979563359+0.406699279358j)
            arg[(0, 1, 1, 0)]=(-0.0973487713231+0.354805793946j)*x[0] + ((-0.498942091557-0.197363468482j))*x[1] + ((0.661771162722-0.143749417843j))*x[2]
            ref[(0, 1, 1, 0)]=(0.032740149921+0.00684645381076j)
            arg[(0, 1, 1, 1)]=(0.780726139029+0.166608848952j)*x[0] + ((-0.506984351502-0.0934854333464j))*x[1] + ((-0.434259134203+0.778555358165j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.0802586733379+0.425839386885j)
            arg[(0, 1, 1, 2)]=(0.372929807539-0.58611496345j)*x[0] + ((0.644483051958+0.430633102932j))*x[1] + ((-0.859335208601+0.26779285526j))*x[2]
            ref[(0, 1, 1, 2)]=(0.0790388254481+0.0561554973716j)
            arg[(0, 1, 1, 3)]=(0.0489724472181+0.854132953536j)*x[0] + ((-0.291802810576-0.575091185083j))*x[1] + ((-0.228130218822+0.545950326841j))*x[2]
            ref[(0, 1, 1, 3)]=(-0.23548029109+0.412496047647j)
            arg[(0, 1, 2, 0)]=(-0.616859563523-0.921757995839j)*x[0] + ((-0.0403201876679-0.500195078865j))*x[1] + ((0.11846433526+0.595316281358j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.269357707966-0.413318396673j)
            arg[(0, 1, 2, 1)]=(0.98439953546+0.358859271707j)*x[0] + ((-0.786986680075+0.539599647325j))*x[1] + ((0.728025266341+0.680280776975j))*x[2]
            ref[(0, 1, 2, 1)]=(0.462719060863+0.789369848003j)
            arg[(0, 1, 2, 2)]=(0.290789220075+0.101672874445j)*x[0] + ((-0.315769698607+0.135164742428j))*x[1] + ((0.781808106847-0.51412358226j))*x[2]
            ref[(0, 1, 2, 2)]=(0.378413814158-0.138642982694j)
            arg[(0, 1, 2, 3)]=(0.483535681764+0.636564690036j)*x[0] + ((-0.462752316752+0.37190742255j))*x[1] + ((-0.284933675321+0.3715119246j))*x[2]
            ref[(0, 1, 2, 3)]=(-0.132075155155+0.689992018593j)
            arg[(0, 2, 0, 0)]=(-0.244302997629+0.145196536251j)*x[0] + ((0.22336030724+0.144722048941j))*x[1] + ((-0.236629984475+0.00830919312593j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.128786337432+0.149113889159j)
            arg[(0, 2, 0, 1)]=(-0.775836993364-0.711582612j)*x[0] + ((0.627565532834-0.643236420691j))*x[1] + ((-0.449686732291-0.218155170563j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.298979096411-0.786487101627j)
            arg[(0, 2, 0, 2)]=(0.450539755128+0.225001855485j)*x[0] + ((-0.697080043782+0.445961286529j))*x[1] + ((-0.674928052228-0.723406627482j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.460734170441-0.0262217427338j)
            arg[(0, 2, 0, 3)]=(-0.417606395751-0.927309785865j)*x[0] + ((0.471729601848-0.407584435121j))*x[1] + ((-0.993765533374-0.464247520446j))*x[2]
            ref[(0, 2, 0, 3)]=(-0.469821163638-0.899570870716j)
            arg[(0, 2, 1, 0)]=(0.747884482673+0.0687916548545j)*x[0] + ((-0.249923429989+0.569883303772j))*x[1] + ((0.884927032444+0.534026956412j))*x[2]
            ref[(0, 2, 1, 0)]=(0.691444042564+0.586350957519j)
            arg[(0, 2, 1, 1)]=(-0.720277185613+0.642573242492j)*x[0] + ((-0.237361935997-0.971329035781j))*x[1] + ((0.932373788697+0.905203084737j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.0126326664569+0.288223645724j)
            arg[(0, 2, 1, 2)]=(0.861451590424-0.841325876947j)*x[0] + ((0.537865527014-0.89872412135j))*x[1] + ((-0.549609492067-0.0426619860746j))*x[2]
            ref[(0, 2, 1, 2)]=(0.424853812686-0.891355992186j)
            arg[(0, 2, 1, 3)]=(0.407820424993+0.974018155493j)*x[0] + ((-0.349469716754-0.260720547575j))*x[1] + ((-0.588871209699+0.0768194342797j))*x[2]
            ref[(0, 2, 1, 3)]=(-0.26526025073+0.395058521099j)
            arg[(0, 2, 2, 0)]=(-0.993503838297+0.664389432606j)*x[0] + ((-0.411815666902+0.318203389645j))*x[1] + ((-0.455272648862-0.910961335886j))*x[2]
            ref[(0, 2, 2, 0)]=(-0.930296077031+0.035815743182j)
            arg[(0, 2, 2, 1)]=(-0.771866839144-0.356220642071j)*x[0] + ((0.043342426646-0.995077034733j))*x[1] + ((0.571564162577+0.787949476941j))*x[2]
            ref[(0, 2, 2, 1)]=(-0.0784801249607-0.281674099932j)
            arg[(0, 2, 2, 2)]=(-0.923209217847+0.899348631587j)*x[0] + ((0.821979824234-0.811060620962j))*x[1] + ((-0.806584506186-0.507372190832j))*x[2]
            ref[(0, 2, 2, 2)]=(-0.4539069499-0.209542090104j)
            arg[(0, 2, 2, 3)]=(-0.551362112781+0.118346998153j)*x[0] + ((0.740625660939+0.593609321146j))*x[1] + ((-0.231393443646+0.659308735763j))*x[2]
            ref[(0, 2, 2, 3)]=(-0.0210649477437+0.685632527531j)
            arg[(1, 0, 0, 0)]=(-0.363003923201-0.83111228203j)*x[0] + ((0.984079119811-0.845548458655j))*x[1] + ((-0.585603815444+0.798567804878j))*x[2]
            ref[(1, 0, 0, 0)]=(0.0177356905829-0.439046467903j)
            arg[(1, 0, 0, 1)]=(0.354117871341+0.871407311037j)*x[0] + ((-0.207529771258-0.955733047187j))*x[1] + ((-0.505640602706-0.309855806164j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.179526251312-0.197090771157j)
            arg[(1, 0, 0, 2)]=(0.689717496228+0.233021583028j)*x[0] + ((-0.431023363698-0.3657316528j))*x[1] + ((0.959004457996-0.356907947259j))*x[2]
            ref[(1, 0, 0, 2)]=(0.608849295263-0.244809008516j)
            arg[(1, 0, 0, 3)]=(-0.174559359319+0.355166806671j)*x[0] + ((0.0692252525673-0.714407275506j))*x[1] + ((-0.160718683736+0.160131379729j))*x[2]
            ref[(1, 0, 0, 3)]=(-0.133026395244-0.0995545445525j)
            arg[(1, 0, 1, 0)]=(-0.619149829994-0.820084884868j)*x[0] + ((-0.855833008398+0.191471268809j))*x[1] + ((0.850378624195+0.491008904724j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.312302107098-0.0688023556676j)
            arg[(1, 0, 1, 1)]=(0.927623557066-0.258885970648j)*x[0] + ((-0.248263643524-0.860884999041j))*x[1] + ((-0.258409535496+0.60312740177j))*x[2]
            ref[(1, 0, 1, 1)]=(0.210475189023-0.258321783959j)
            arg[(1, 0, 1, 2)]=(-0.926996415836+0.0522888977548j)*x[0] + ((-0.922193133652+0.565196612508j))*x[1] + ((0.923631505652+0.758808896509j))*x[2]
            ref[(1, 0, 1, 2)]=(-0.462779021918+0.688147203386j)
            arg[(1, 0, 1, 3)]=(-0.26879113883-0.748527188958j)*x[0] + ((-0.238227459891+0.177431520511j))*x[1] + ((0.602341215458-0.55404732896j))*x[2]
            ref[(1, 0, 1, 3)]=(0.0476613083684-0.562571498704j)
            arg[(1, 0, 2, 0)]=(0.0402167470937-0.174306702002j)*x[0] + ((-0.282911913823-0.324707003735j))*x[1] + ((0.553976501639+0.184846048074j))*x[2]
            ref[(1, 0, 2, 0)]=(0.155640667455-0.157083828832j)
            arg[(1, 0, 2, 1)]=(0.0990456854674+0.201809396091j)*x[0] + ((-0.156483824727+0.564333824751j))*x[1] + ((0.330622024769+0.309629489098j))*x[2]
            ref[(1, 0, 2, 1)]=(0.136591942755+0.53788635497j)
            arg[(1, 0, 2, 2)]=(0.61498942962+0.500460125381j)*x[0] + ((0.453218103636+0.98759532994j))*x[1] + ((-0.0138697321399-0.529614383223j))*x[2]
            ref[(1, 0, 2, 2)]=(0.527168900558+0.479220536049j)
            arg[(1, 0, 2, 3)]=(-0.179011037047-0.598200639618j)*x[0] + ((-0.0975190802429+0.0644733354304j))*x[1] + ((-0.527768848134-0.906862816666j))*x[2]
            ref[(1, 0, 2, 3)]=(-0.402149482712-0.720295060427j)
            arg[(1, 1, 0, 0)]=(-0.314646150517+0.474057067432j)*x[0] + ((-0.16702098964+0.367852392438j))*x[1] + ((-0.518585931584-0.288467532916j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.500126535871+0.276720963477j)
            arg[(1, 1, 0, 1)]=(-0.523955137742+0.20168195092j)*x[0] + ((0.849895824665+0.295755305061j))*x[1] + ((-0.518845855453+0.986247390525j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.096452584265+0.741842323253j)
            arg[(1, 1, 0, 2)]=(0.547002358729+0.585372332018j)*x[0] + ((-0.422056723021+0.478704198185j))*x[1] + ((-0.175677459957-0.531374773821j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.0253659121242+0.266350878191j)
            arg[(1, 1, 0, 3)]=(-0.340010448835+0.654189023943j)*x[0] + ((0.047322979663+0.394939605275j))*x[1] + ((-0.823769672016+0.292545009532j))*x[2]
            ref[(1, 1, 0, 3)]=(-0.558228570594+0.670836819375j)
            arg[(1, 1, 1, 0)]=(-0.401554662208-0.0780080445479j)*x[0] + ((-0.210596534792-0.567374742618j))*x[1] + ((0.926779638723-0.348406461944j))*x[2]
            ref[(1, 1, 1, 0)]=(0.157314220862-0.496894624555j)
            arg[(1, 1, 1, 1)]=(0.653605574059-0.97815083188j)*x[0] + ((0.0272743215228+0.844284433641j))*x[1] + ((-0.186571909362+0.974796386699j))*x[2]
            ref[(1, 1, 1, 1)]=(0.24715399311+0.42046499423j)
            arg[(1, 1, 1, 2)]=(-0.131530090776-0.631977608172j)*x[0] + ((0.450847350548-0.496886193346j))*x[1] + ((0.0840970433693-0.324659769257j))*x[2]
            ref[(1, 1, 1, 2)]=(0.201707151571-0.726761785388j)
            arg[(1, 1, 1, 3)]=(-0.247655397928+0.579817798057j)*x[0] + ((0.406239671048+0.425310742732j))*x[1] + ((0.103412488584-0.692547358853j))*x[2]
            ref[(1, 1, 1, 3)]=(0.130998380852+0.156290590968j)
            arg[(1, 1, 2, 0)]=(-0.368703001202-0.0284269911705j)*x[0] + ((0.277941982214-0.969154640381j))*x[1] + ((-0.396915110374-0.994250135884j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.243838064681-0.995915883718j)
            arg[(1, 1, 2, 1)]=(0.923265742066+0.0843836981529j)*x[0] + ((0.383686306853-0.151752216647j))*x[1] + ((-0.37045197989-0.977937672035j))*x[2]
            ref[(1, 1, 2, 1)]=(0.468250034514-0.522653095264j)
            arg[(1, 1, 2, 2)]=(0.836776708437-0.832979981871j)*x[0] + ((-0.147119399813+0.184586528427j))*x[1] + ((-0.470924931762-0.649348525802j))*x[2]
            ref[(1, 1, 2, 2)]=(0.109366188432-0.648870989623j)
            arg[(1, 1, 2, 3)]=(0.0384337009117-0.855107625792j)*x[0] + ((0.59313810947-0.578409270606j))*x[1] + ((-0.729013940314-0.499530876528j))*x[2]
            ref[(1, 1, 2, 3)]=(-0.048721064966-0.966523886463j)
            arg[(1, 2, 0, 0)]=(0.157307421818+0.927153799007j)*x[0] + ((0.803197600072+0.493321778556j))*x[1] + ((-0.887451647765+0.575163349945j))*x[2]
            ref[(1, 2, 0, 0)]=(0.0365266870626+0.997819463754j)
            arg[(1, 2, 0, 1)]=(0.841861528545-0.316770762912j)*x[0] + ((-0.762470956354-0.0970352340525j))*x[1] + ((-0.416506073944-0.184651841718j))*x[2]
            ref[(1, 2, 0, 1)]=(-0.168557750877-0.299228919341j)
            arg[(1, 2, 0, 2)]=(-0.165979551678+0.312651275604j)*x[0] + ((-0.247795391722-0.193201649351j))*x[1] + ((0.152953942891-0.66856682744j))*x[2]
            ref[(1, 2, 0, 2)]=(-0.130410500255-0.274558600593j)
            arg[(1, 2, 0, 3)]=(0.784696279385-0.70122060128j)*x[0] + ((0.45599222389+0.671104954621j))*x[1] + ((-0.141047918084+0.690867499602j))*x[2]
            ref[(1, 2, 0, 3)]=(0.549820292596+0.330375926471j)
            arg[(1, 2, 1, 0)]=(-0.685896557969-0.242545295526j)*x[0] + ((0.987849225902-0.462241881115j))*x[1] + ((0.228467228375+0.650985791091j))*x[2]
            ref[(1, 2, 1, 0)]=(0.265209948154-0.0269006927748j)
            arg[(1, 2, 1, 1)]=(-0.288402164177+0.818006137856j)*x[0] + ((0.0454617711905+0.810207112781j))*x[1] + ((0.762032678146-0.995934134697j))*x[2]
            ref[(1, 2, 1, 1)]=(0.25954614258+0.31613955797j)
            arg[(1, 2, 1, 2)]=(-0.639043908057+0.399293641182j)*x[0] + ((0.0919505576722+0.0932187100154j))*x[1] + ((0.813351455737-0.407877929945j))*x[2]
            ref[(1, 2, 1, 2)]=(0.133129052676+0.0423172106262j)
            arg[(1, 2, 1, 3)]=(0.114605951144+0.717814544044j)*x[0] + ((0.685922624538-0.778054047792j))*x[1] + ((0.822797696532+0.449666217461j))*x[2]
            ref[(1, 2, 1, 3)]=(0.811663136107+0.194713356857j)
            arg[(1, 2, 2, 0)]=(-0.438499228003+0.895434084763j)*x[0] + ((0.105313260708-0.998755776047j))*x[1] + ((0.925701422721-0.56432282464j))*x[2]
            ref[(1, 2, 2, 0)]=(0.296257727713-0.333822257962j)
            arg[(1, 2, 2, 1)]=(-0.168630472298-0.606852159642j)*x[0] + ((0.592515309682-0.459222013758j))*x[1] + ((0.391286344127-0.977322966058j))*x[2]
            ref[(1, 2, 2, 1)]=(0.407585590756-1.02169856973j)
            arg[(1, 2, 2, 2)]=(-0.752296039849-0.515677801176j)*x[0] + ((0.11921968555+0.330464757806j))*x[1] + ((-0.978158546893-0.475471793106j))*x[2]
            ref[(1, 2, 2, 2)]=(-0.805617450596-0.330342418238j)
            arg[(1, 2, 2, 3)]=(0.488448799205-0.544464325504j)*x[0] + ((-0.986508289795-0.855476318363j))*x[1] + ((0.388801134398-0.996344927701j))*x[2]
            ref[(1, 2, 2, 3)]=(-0.0546291780956-1.19814278578j)
            arg[(2, 0, 0, 0)]=(0.737285927869-0.338017381334j)*x[0] + ((0.819755191811-0.110315759312j))*x[1] + ((0.863530437695-0.0010590645122j))*x[2]
            ref[(2, 0, 0, 0)]=(1.21028577869-0.224696102579j)
            arg[(2, 0, 0, 1)]=(-0.41762983532+0.803540529535j)*x[0] + ((0.91841441587-0.588293220412j))*x[1] + ((-0.614620656261+0.215824235991j))*x[2]
            ref[(2, 0, 0, 1)]=(-0.0569180378556+0.215535772557j)
            arg[(2, 0, 0, 2)]=(0.34342996941+0.945676317768j)*x[0] + ((-0.506603162078+0.459476842005j))*x[1] + ((-0.00332629722901+0.931013294471j))*x[2]
            ref[(2, 0, 0, 2)]=(-0.0832497449486+1.16808322712j)
            arg[(2, 0, 0, 3)]=(0.0856109078263+0.514075224954j)*x[0] + ((-0.882842221427-0.976487778916j))*x[1] + ((-0.162328060183+0.105846962965j))*x[2]
            ref[(2, 0, 0, 3)]=(-0.479779686892-0.178282795498j)
            arg[(2, 0, 1, 0)]=(0.181614768527+0.959308700307j)*x[0] + ((0.552239050912+0.887379540341j))*x[1] + ((-0.182161932603+0.593545971935j))*x[2]
            ref[(2, 0, 1, 0)]=(0.275845943418+1.22011710629j)
            arg[(2, 0, 1, 1)]=(-0.994465781002-0.188885790843j)*x[0] + ((0.750894245159+0.323124887665j))*x[1] + ((0.209474965733+0.356380901689j))*x[2]
            ref[(2, 0, 1, 1)]=(-0.0170482850546+0.245309999255j)
            arg[(2, 0, 1, 2)]=(-0.609361062829-0.14847399803j)*x[0] + ((0.440279484854-0.792574004301j))*x[1] + ((-0.939572178955+0.224066742521j))*x[2]
            ref[(2, 0, 1, 2)]=(-0.554326878465-0.358490629905j)
            arg[(2, 0, 1, 3)]=(0.906291422536+0.130962156739j)*x[0] + ((-0.301709866873+0.848033119695j))*x[1] + ((0.180682260443-0.445520942611j))*x[2]
            ref[(2, 0, 1, 3)]=(0.392631908053+0.266737166912j)
            arg[(2, 0, 2, 0)]=(-0.186253518941+0.605586205684j)*x[0] + ((-0.905922014693+0.383807731637j))*x[1] + ((0.989792045387-0.222271820842j))*x[2]
            ref[(2, 0, 2, 0)]=(-0.0511917441235+0.383561058239j)
            arg[(2, 0, 2, 1)]=(0.395493811318-0.130375521111j)*x[0] + ((-0.830597328736-0.658931565642j))*x[1] + ((-0.904500365905-0.982046769598j))*x[2]
            ref[(2, 0, 2, 1)]=(-0.669801941661-0.885676928176j)
            arg[(2, 0, 2, 2)]=(0.634599400295+0.270657939927j)*x[0] + ((-0.9150922381+0.144107062587j))*x[1] + ((-0.867714628864+0.04354956859j))*x[2]
            ref[(2, 0, 2, 2)]=(-0.574103733334+0.229157285552j)
            arg[(2, 0, 2, 3)]=(-0.337749006114+0.466986428484j)*x[0] + ((0.566841960724+0.731174170134j))*x[1] + ((0.912798969124-0.067728158439j))*x[2]
            ref[(2, 0, 2, 3)]=(0.570945961867+0.56521622009j)
            arg[(2, 1, 0, 0)]=(0.630274983062+0.292807171617j)*x[0] + ((0.955572378113-0.59847363075j))*x[1] + ((-0.398479975347-0.841768985163j))*x[2]
            ref[(2, 1, 0, 0)]=(0.593683692914-0.573717722148j)
            arg[(2, 1, 0, 1)]=(-0.366648224143+0.0886783677228j)*x[0] + ((0.0686736658353-0.692679040732j))*x[1] + ((-0.446067017483+0.500806206051j))*x[2]
            ref[(2, 1, 0, 1)]=(-0.372020787896-0.0515972334792j)
            arg[(2, 1, 0, 2)]=(-0.827010611054+0.281004458106j)*x[0] + ((-0.0397353384825+0.829605155406j))*x[1] + ((0.106343684407+0.83890191565j))*x[2]
            ref[(2, 1, 0, 2)]=(-0.380201132564+0.97475576458j)
            arg[(2, 1, 0, 3)]=(0.661878789607-0.490894333867j)*x[0] + ((0.0256698960958+0.395705222794j))*x[1] + ((0.172049343297+0.680292642217j))*x[2]
            ref[(2, 1, 0, 3)]=(0.4297990145+0.292551765572j)
            arg[(2, 1, 1, 0)]=(0.695704422707+0.18389049791j)*x[0] + ((-0.70448544037+0.871552052401j))*x[1] + ((0.538611232975+0.197960860935j))*x[2]
            ref[(2, 1, 1, 0)]=(0.264915107656+0.626701705623j)
            arg[(2, 1, 1, 1)]=(-0.920498895982-0.973638264494j)*x[0] + ((0.959056686815+0.216781031288j))*x[1] + ((-0.79327048352-0.385416738117j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.377356346344-0.571136985662j)
            arg[(2, 1, 1, 2)]=(-0.88642767623-0.268060899249j)*x[0] + ((-0.209335946131+0.440716391633j))*x[1] + ((-0.319629338387+0.586979907931j))*x[2]
            ref[(2, 1, 1, 2)]=(-0.707696480374+0.379817700157j)
            arg[(2, 1, 1, 3)]=(0.365727137631-0.805496849509j)*x[0] + ((-0.348766011835+0.304359573905j))*x[1] + ((0.116878687633-0.523629470062j))*x[2]
            ref[(2, 1, 1, 3)]=(0.0669199067147-0.512383372833j)
            arg[(2, 1, 2, 0)]=(-0.412055470954-0.824462322386j)*x[0] + ((0.142331084768-0.695261085647j))*x[1] + ((0.448949522932-0.432758932027j))*x[2]
            ref[(2, 1, 2, 0)]=(0.0896125683732-0.97624117003j)
            arg[(2, 1, 2, 1)]=(0.0743595643598-0.283744291316j)*x[0] + ((0.984225884609+0.414869574487j))*x[1] + ((0.547168835932-0.782205287688j))*x[2]
            ref[(2, 1, 2, 1)]=(0.80287714245-0.325540002258j)
            arg[(2, 1, 2, 2)]=(-0.0403430672722-0.877919937461j)*x[0] + ((-0.183078173461-0.787760492708j))*x[1] + ((-0.209819568043-0.394436918217j))*x[2]
            ref[(2, 1, 2, 2)]=(-0.216620404388-1.03005867419j)
            arg[(2, 1, 2, 3)]=(0.731238584237+0.339771850099j)*x[0] + ((-0.881817911125-0.565328312219j))*x[1] + ((0.0950217076003+0.349526631281j))*x[2]
            ref[(2, 1, 2, 3)]=(-0.0277788096434+0.0619850845805j)
            arg[(2, 2, 0, 0)]=(0.284263093002+0.0349636780488j)*x[0] + ((0.830975227235+0.822391693456j))*x[1] + ((0.640012421914-0.343105231754j))*x[2]
            ref[(2, 2, 0, 0)]=(0.877625371076+0.257125069876j)
            arg[(2, 2, 0, 1)]=(0.693353847653+0.831198894896j)*x[0] + ((-0.013659480577+0.00716650626766j))*x[1] + ((-0.0660893987965+0.842473228671j))*x[2]
            ref[(2, 2, 0, 1)]=(0.30680248414+0.840419314917j)
            arg[(2, 2, 0, 2)]=(-0.519915664428+0.50247299291j)*x[0] + ((0.818973708599-0.360550934975j))*x[1] + ((-0.474385369708+0.952375342784j))*x[2]
            ref[(2, 2, 0, 2)]=(-0.0876636627684+0.54714870036j)
            arg[(2, 2, 0, 3)]=(-0.886049458894-0.749058722125j)*x[0] + ((-0.316138391964-0.862608090823j))*x[1] + ((0.167969676134-0.523723899177j))*x[2]
            ref[(2, 2, 0, 3)]=(-0.517109087362-1.06769535606j)
            arg[(2, 2, 1, 0)]=(0.0248267509086-0.0686091913697j)*x[0] + ((-0.405545675421-0.7785519094j))*x[1] + ((-0.435056838284+0.280770774206j))*x[2]
            ref[(2, 2, 1, 0)]=(-0.407887881398-0.283195163282j)
            arg[(2, 2, 1, 1)]=(0.724445034529+0.294565070506j)*x[0] + ((-0.960869311432-0.538420011331j))*x[1] + ((0.90263698984-0.851727696419j))*x[2]
            ref[(2, 2, 1, 1)]=(0.333106356468-0.547791318622j)
            arg[(2, 2, 1, 2)]=(0.599644100452+0.38619348579j)*x[0] + ((-0.857796802236-0.278501764865j))*x[1] + ((-0.579015490732+0.262085723975j))*x[2]
            ref[(2, 2, 1, 2)]=(-0.418584096258+0.18488872245j)
            arg[(2, 2, 1, 3)]=(0.540654310486-0.174022185262j)*x[0] + ((-0.966041720815+0.200229750036j))*x[1] + ((0.651133185762+0.764130462413j))*x[2]
            ref[(2, 2, 1, 3)]=(0.112872887717+0.395169013594j)
            arg[(2, 2, 2, 0)]=(0.886510370661+0.639732307754j)*x[0] + ((0.797002051432-0.35589838078j))*x[1] + ((-0.0605082917292-0.549401426927j))*x[2]
            ref[(2, 2, 2, 0)]=(0.811502065182-0.132783749977j)
            arg[(2, 2, 2, 1)]=(0.0611754431091-0.218385326466j)*x[0] + ((-0.230610898451-0.571550532607j))*x[1] + ((-0.581831699163-0.57538706672j))*x[2]
            ref[(2, 2, 2, 1)]=(-0.375633577252-0.682661462896j)
            arg[(2, 2, 2, 2)]=(0.187467809437-0.10487972324j)*x[0] + ((-0.481024174403-0.822402925435j))*x[1] + ((-0.735464371046-0.212074619201j))*x[2]
            ref[(2, 2, 2, 2)]=(-0.514510368006-0.569678633938j)
            arg[(2, 2, 2, 3)]=(0.83001597194-0.289796347939j)*x[0] + ((0.636192202124+0.702351371624j))*x[1] + ((-0.140325487329+0.780991023823j))*x[2]
            ref[(2, 2, 2, 3)]=(0.662941343368+0.596773023754j)
            arg[(3, 0, 0, 0)]=(-0.560609039296-0.904007486571j)*x[0] + ((0.287208716671+0.649481919338j))*x[1] + ((-0.598758517405-0.840146970156j))*x[2]
            ref[(3, 0, 0, 0)]=(-0.436079420015-0.547336268695j)
            arg[(3, 0, 0, 1)]=(-0.827722176587-0.00728874659448j)*x[0] + ((-0.962605564776+0.000138795295709j))*x[1] + ((-0.351921372851-0.742012798631j))*x[2]
            ref[(3, 0, 0, 1)]=(-1.07112455711-0.374581374965j)
            arg[(3, 0, 0, 2)]=(0.984862153118+0.52497985703j)*x[0] + ((-0.251593021579+0.927009247536j))*x[1] + ((0.775117999926+0.679085774511j))*x[2]
            ref[(3, 0, 0, 2)]=(0.754193565732+1.06553743954j)
            arg[(3, 0, 0, 3)]=(0.0930266630603-0.805672799936j)*x[0] + ((0.453519491004+0.432320544615j))*x[1] + ((-0.815015635793-0.234737452185j))*x[2]
            ref[(3, 0, 0, 3)]=(-0.134234740864-0.304044853753j)
            arg[(3, 0, 1, 0)]=(-0.271484924888+0.531938457441j)*x[0] + ((0.928084612747-0.178982437216j))*x[1] + ((0.424696387972-0.721012936731j))*x[2]
            ref[(3, 0, 1, 0)]=(0.540648037916-0.184028458253j)
            arg[(3, 0, 1, 1)]=(-0.437110070153-0.607683812974j)*x[0] + ((-0.320285225253+0.164023599445j))*x[1] + ((-0.304694708675+0.90478702767j))*x[2]
            ref[(3, 0, 1, 1)]=(-0.531045002041+0.230563407071j)
            arg[(3, 0, 1, 2)]=(0.481570224339-0.655570026202j)*x[0] + ((-0.0863110295756-0.576613602333j))*x[1] + ((0.62238421621-0.289063309221j))*x[2]
            ref[(3, 0, 1, 2)]=(0.508821705487-0.760623468878j)
            arg[(3, 0, 1, 3)]=(-0.547079081906+0.0176285850992j)*x[0] + ((-0.458444000563-0.753920971323j))*x[1] + ((-0.945412712587+0.144265601066j))*x[2]
            ref[(3, 0, 1, 3)]=(-0.975467897528-0.296013392579j)
            arg[(3, 0, 2, 0)]=(-0.0364956643367+0.250184882045j)*x[0] + ((-0.793190300027+0.669190659204j))*x[1] + ((-0.499802871547-0.835356633483j))*x[2]
            ref[(3, 0, 2, 0)]=(-0.664744417955+0.042009453883j)
            arg[(3, 0, 2, 1)]=(0.764994384306+0.51002597934j)*x[0] + ((0.860912496595-0.302174740469j))*x[1] + ((0.256688636712+0.0973996443364j))*x[2]
            ref[(3, 0, 2, 1)]=(0.941297758806+0.152625441604j)
            arg[(3, 0, 2, 2)]=(0.00299609030171+0.589597445363j)*x[0] + ((0.0162817587005-0.107291506197j))*x[1] + ((-0.183809090963-0.355457850009j))*x[2]
            ref[(3, 0, 2, 2)]=(-0.0822656209801+0.0634240445788j)
            arg[(3, 0, 2, 3)]=(0.941603157364+0.566161317652j)*x[0] + ((-0.862112835482-0.702890187098j))*x[1] + ((-0.163426809563+0.623372501809j))*x[2]
            ref[(3, 0, 2, 3)]=(-0.0419682438405+0.243321816182j)
            arg[(3, 1, 0, 0)]=(-0.910382392458-0.648076987455j)*x[0] + ((-0.0391559906263-0.69623400674j))*x[1] + ((-0.38393209782+0.707337030292j))*x[2]
            ref[(3, 1, 0, 0)]=(-0.666735240452-0.318486981951j)
            arg[(3, 1, 0, 1)]=(-0.00574270273417+0.584856015478j)*x[0] + ((-0.403684666986+0.494287187j))*x[1] + ((-0.946094022552-0.00774904230737j))*x[2]
            ref[(3, 1, 0, 1)]=(-0.677760696136+0.535697080086j)
            arg[(3, 1, 0, 2)]=(0.557503985215+0.661356873961j)*x[0] + ((-0.682739780293+0.320502010407j))*x[1] + ((-0.367748855934-0.237578202171j))*x[2]
            ref[(3, 1, 0, 2)]=(-0.246492325506+0.372140341098j)
            arg[(3, 1, 0, 3)]=(0.610810080217-0.564816263556j)*x[0] + ((0.0723246433881-0.499304969171j))*x[1] + ((-0.378475853217-0.413667391983j))*x[2]
            ref[(3, 1, 0, 3)]=(0.152329435194-0.738894312355j)
            arg[(3, 1, 1, 0)]=(-0.162574333361-0.057403319475j)*x[0] + ((0.572222218327-0.623257864855j))*x[1] + ((0.823840274542-0.417167945021j))*x[2]
            ref[(3, 1, 1, 0)]=(0.616744079754-0.548914564676j)
            arg[(3, 1, 1, 1)]=(-0.710653776535+0.674921680427j)*x[0] + ((0.453859955755+0.58484429507j))*x[1] + ((0.567779898323-0.0739416950631j))*x[2]
            ref[(3, 1, 1, 1)]=(0.155493038772+0.592912140217j)
            arg[(3, 1, 1, 2)]=(-0.653800468678+0.841376514309j)*x[0] + ((-0.919399443733-0.754398360818j))*x[1] + ((0.488040690906+0.561511289832j))*x[2]
            ref[(3, 1, 1, 2)]=(-0.542579610753+0.324244721661j)
            arg[(3, 1, 1, 3)]=(0.0562914531042-0.895979578825j)*x[0] + ((0.0729903849055+0.018589699432j))*x[1] + ((-0.453178338986+0.805043037535j))*x[2]
            ref[(3, 1, 1, 3)]=(-0.161948250488-0.0361734209288j)
            arg[(3, 1, 2, 0)]=(-0.182554972767-0.0553093351179j)*x[0] + ((0.631567244238-0.996391025814j))*x[1] + ((-0.210496753836-0.327434928973j))*x[2]
            ref[(3, 1, 2, 0)]=(0.119257758817-0.689567644953j)
            arg[(3, 1, 2, 1)]=(0.266875918834+0.480495046115j)*x[0] + ((0.608509672238-0.462489233478j))*x[1] + ((0.432608945932+0.139820366638j))*x[2]
            ref[(3, 1, 2, 1)]=(0.653997268502+0.0789130896378j)
            arg[(3, 1, 2, 2)]=(0.546652352652+0.289049479406j)*x[0] + ((0.0967152113734+0.690691705438j))*x[1] + ((0.273015097953-0.533009163472j))*x[2]
            ref[(3, 1, 2, 2)]=(0.458191330989+0.223366010686j)
            arg[(3, 1, 2, 3)]=(0.475718418786-0.433642937725j)*x[0] + ((-0.448697827449+0.768064071511j))*x[1] + ((-0.531806129484+0.156218780842j))*x[2]
            ref[(3, 1, 2, 3)]=(-0.252392769074+0.245319957314j)
            arg[(3, 2, 0, 0)]=(0.98856898395-0.0428981602459j)*x[0] + ((0.533236664292+0.829630262649j))*x[1] + ((-0.170317198065-0.664226668834j))*x[2]
            ref[(3, 2, 0, 0)]=(0.675744225089+0.0612527167847j)
            arg[(3, 2, 0, 1)]=(-0.740532914135+0.828380821177j)*x[0] + ((-0.333814806754-0.562975792715j))*x[1] + ((0.675905279382-0.0897570435851j))*x[2]
            ref[(3, 2, 0, 1)]=(-0.199221220753+0.0878239924388j)
            arg[(3, 2, 0, 2)]=(0.0772203090619-0.854017292171j)*x[0] + ((-0.954022797281-0.650265849461j))*x[1] + ((-0.112504000562+0.172905041836j))*x[2]
            ref[(3, 2, 0, 2)]=(-0.494653244391-0.665689049898j)
            arg[(3, 2, 0, 3)]=(0.00839402322265-0.365156337607j)*x[0] + ((-0.091516486536-0.876516425496j))*x[1] + ((0.253978393723+0.0875285485185j))*x[2]
            ref[(3, 2, 0, 3)]=(0.0854279652047-0.577072107292j)
            arg[(3, 2, 1, 0)]=(0.662678559954-0.236991596789j)*x[0] + ((0.759679626866+0.979384977179j))*x[1] + ((-0.268890278935+0.559943343934j))*x[2]
            ref[(3, 2, 1, 0)]=(0.576733953943+0.651168362162j)
            arg[(3, 2, 1, 1)]=(0.465692195241-0.614035443271j)*x[0] + ((-0.0507402645485+0.906906943616j))*x[1] + ((-0.358131244714-0.29083881684j))*x[2]
            ref[(3, 2, 1, 1)]=(0.0284103429896+0.00101634175193j)
            arg[(3, 2, 1, 2)]=(-0.192794888465+0.913443255874j)*x[0] + ((-0.945730386723+0.479715156432j))*x[1] + ((-0.707845848929-0.797548429036j))*x[2]
            ref[(3, 2, 1, 2)]=(-0.923185562058+0.297804991635j)
            arg[(3, 2, 1, 3)]=(-0.260321559437+0.810647839796j)*x[0] + ((0.161033061496-0.752100950131j))*x[1] + ((0.490599042967-0.557242603021j))*x[2]
            ref[(3, 2, 1, 3)]=(0.195655272513-0.249347856678j)
            arg[(3, 2, 2, 0)]=(0.768721706587-0.300412013461j)*x[0] + ((0.258835554464-0.666463862056j))*x[1] + ((-0.26727459876-0.272877415326j))*x[2]
            ref[(3, 2, 2, 0)]=(0.380141331145-0.619876645421j)
            arg[(3, 2, 2, 1)]=(-0.200986914266+0.205124036066j)*x[0] + ((0.710354850329-0.530194513645j))*x[1] + ((-0.630532468168-0.731241167645j))*x[2]
            ref[(3, 2, 2, 1)]=(-0.0605822660531-0.528155822612j)
            arg[(3, 2, 2, 2)]=(-0.276211601879-0.979940029736j)*x[0] + ((-0.854473950336+0.171770055571j))*x[1] + ((-0.638481763839+0.458894549996j))*x[2]
            ref[(3, 2, 2, 2)]=(-0.884583658027-0.174637712085j)
            arg[(3, 2, 2, 3)]=(0.659125655482+0.340746046984j)*x[0] + ((0.917431834163+0.862572397962j))*x[1] + ((-0.311200011549+0.0407557920597j))*x[2]
            ref[(3, 2, 2, 3)]=(0.632678739048+0.622037118503j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.608379052165+0.326723995247j)*x[0] + ((-0.763224245211-0.851188938403j))*x[1]
            ref=(-0.685801648688-0.262232471578j)
        else:
            arg=(0.492025136084+0.33276702634j)*x[0] + ((-0.714390087565-0.174176020421j))*x[1] + ((0.216351467802+0.96627296855j))*x[2]
            ref=(-0.00300674183985+0.562431987234j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.298645054734+0.681096552199j)*x[0] + ((0.377682122582+0.932672537261j))*x[1]
            ref[(0,)]=(0.0395185339241+0.80688454473j)
            arg[(1,)]=(0.340593833666+0.354215481077j)*x[0] + ((0.512318534762+0.662181716975j))*x[1]
            ref[(1,)]=(0.426456184214+0.508198599026j)
        else:
            arg[(0,)]=(0.857775668102+0.885511399241j)*x[0] + ((-0.799095778079-0.805823189761j))*x[1] + ((0.632479542702-0.282759645751j))*x[2]
            ref[(0,)]=(0.345579716363-0.101535718135j)
            arg[(1,)]=(0.185258380179+0.875041759511j)*x[0] + ((-0.729351921672+0.536241680661j))*x[1] + ((0.601620045079+0.50376456342j))*x[2]
            ref[(1,)]=(0.0287632517933+0.957524001796j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(0.0335001270883-0.765363145382j)*x[0] + ((0.090407943592-0.921285450161j))*x[1]
            ref[(0, 0)]=(0.0619540353401-0.843324297772j)
            arg[(0, 1)]=(0.470644915313+0.762025875812j)*x[0] + ((-0.102057955663-0.125038065704j))*x[1]
            ref[(0, 1)]=(0.184293479825+0.318493905054j)
            arg[(0, 2)]=(0.204429309311+0.545940659539j)*x[0] + ((-0.299593650091-0.996867850836j))*x[1]
            ref[(0, 2)]=(-0.0475821703899-0.225463595649j)
            arg[(0, 3)]=(-0.964374583501+0.86309398863j)*x[0] + ((0.646680651899-0.767291547676j))*x[1]
            ref[(0, 3)]=(-0.158846965801+0.047901220477j)
            arg[(1, 0)]=(0.765363558493-0.307716820243j)*x[0] + ((-0.373646828477+0.24911824145j))*x[1]
            ref[(1, 0)]=(0.195858365008-0.0292992893968j)
            arg[(1, 1)]=(0.277680423104-0.817731219851j)*x[0] + ((0.974774959033-0.626698894492j))*x[1]
            ref[(1, 1)]=(0.626227691069-0.722215057172j)
            arg[(1, 2)]=(0.119779371649+0.408628504189j)*x[0] + ((-0.777609746966-0.92033962354j))*x[1]
            ref[(1, 2)]=(-0.328915187658-0.255855559676j)
            arg[(1, 3)]=(-0.671649842604+0.0603665380481j)*x[0] + ((-0.0245414748526-0.248531497322j))*x[1]
            ref[(1, 3)]=(-0.348095658728-0.0940824796371j)
            arg[(2, 0)]=(-0.338079911152-0.401028812104j)*x[0] + ((-0.775252715491-0.530190267938j))*x[1]
            ref[(2, 0)]=(-0.556666313322-0.465609540021j)
            arg[(2, 1)]=(0.0240587901008+0.697112287234j)*x[0] + ((0.253050031544-0.164722454429j))*x[1]
            ref[(2, 1)]=(0.138554410823+0.266194916402j)
            arg[(2, 2)]=(0.133667361231+0.829972638777j)*x[0] + ((-0.986280581223-0.880393412667j))*x[1]
            ref[(2, 2)]=(-0.426306609996-0.0252103869448j)
            arg[(2, 3)]=(-0.193807934121-0.643871930412j)*x[0] + ((-0.446768149443+0.952410371793j))*x[1]
            ref[(2, 3)]=(-0.320288041782+0.154269220691j)
            arg[(3, 0)]=(-0.464581835549+0.718638057908j)*x[0] + ((-0.468010915952+0.733372452216j))*x[1]
            ref[(3, 0)]=(-0.46629637575+0.726005255062j)
            arg[(3, 1)]=(0.639331770157+0.111444387777j)*x[0] + ((-0.723115022305+0.466694015084j))*x[1]
            ref[(3, 1)]=(-0.0418916260739+0.289069201431j)
            arg[(3, 2)]=(-0.593452240579-0.838663623257j)*x[0] + ((0.640244641947+0.418596215146j))*x[1]
            ref[(3, 2)]=(0.0233962006838-0.210033704056j)
            arg[(3, 3)]=(0.0050792601351-0.832534915912j)*x[0] + ((-0.867694965897-0.504663814804j))*x[1]
            ref[(3, 3)]=(-0.431307852881-0.668599365358j)
        else:
            arg[(0, 0)]=(-0.142334243927+0.0624710425352j)*x[0] + ((0.419006095021-0.864292473554j))*x[1] + ((0.678893676944+0.702837376952j))*x[2]
            ref[(0, 0)]=(0.477782764019-0.049492027033j)
            arg[(0, 1)]=(0.125858967905-0.793293644504j)*x[0] + ((-0.829933044304-0.541015535059j))*x[1] + ((-0.407806428446-0.497259134559j))*x[2]
            ref[(0, 1)]=(-0.555940252423-0.915784157061j)
            arg[(0, 2)]=(0.665504946666-0.45602072053j)*x[0] + ((-0.996873962506-0.874636008884j))*x[1] + ((-0.0460506412413+0.359585440876j))*x[2]
            ref[(0, 2)]=(-0.188709828541-0.485535644269j)
            arg[(0, 3)]=(-0.71537347421-0.0633085198932j)*x[0] + ((0.231121188236+0.127716896987j))*x[1] + ((0.428049109377-0.622360894402j))*x[2]
            ref[(0, 3)]=(-0.028101588298-0.278976258654j)
            arg[(1, 0)]=(0.0422305894976+0.63591187019j)*x[0] + ((-0.482502705241-0.0599324095982j))*x[1] + ((0.773519912509-0.885143612777j))*x[2]
            ref[(1, 0)]=(0.166623898383-0.154582076093j)
            arg[(1, 1)]=(0.591767894144-0.492133140285j)*x[0] + ((-0.152768779169+0.0700755107981j))*x[1] + ((0.963687250511+0.153332703448j))*x[2]
            ref[(1, 1)]=(0.701343182742-0.13436246302j)
            arg[(1, 2)]=(0.793910240335+0.410462441426j)*x[0] + ((-0.372215878093-0.142355478129j))*x[1] + ((0.422361140362-0.360586350376j))*x[2]
            ref[(1, 2)]=(0.422027751302-0.0462396935395j)
            arg[(1, 3)]=(-0.66148259438+0.18123366472j)*x[0] + ((-0.477858694935+0.113214668874j))*x[1] + ((0.483231640118+0.643142425051j))*x[2]
            ref[(1, 3)]=(-0.328054824598+0.468795379323j)
            arg[(2, 0)]=(0.365583433904+0.345972349065j)*x[0] + ((0.596023840328-0.72351337774j))*x[1] + ((-0.200170066952-0.80321340728j))*x[2]
            ref[(2, 0)]=(0.38071860364-0.590377217978j)
            arg[(2, 1)]=(-0.262362155126+0.785979286592j)*x[0] + ((-0.78195856841-0.777383082951j))*x[1] + ((0.825423755052-0.553118295928j))*x[2]
            ref[(2, 1)]=(-0.109448484242-0.272261046143j)
            arg[(2, 2)]=(-0.19301813491+0.560103798555j)*x[0] + ((0.986317303976+0.521307312027j))*x[1] + ((0.0442809094575+0.704478858411j))*x[2]
            ref[(2, 2)]=(0.418790039262+0.892944984497j)
            arg[(2, 3)]=(0.336114968729-0.0817675966646j)*x[0] + ((0.288858494366-0.179920926096j))*x[1] + ((0.991768757904-0.401591697904j))*x[2]
            ref[(2, 3)]=(0.8083711105-0.331640110333j)
            arg[(3, 0)]=(0.650210316703-0.985387717255j)*x[0] + ((0.119417875169+0.69649275222j))*x[1] + ((0.25829705599+0.519200069842j))*x[2]
            ref[(3, 0)]=(0.513962623931+0.115152552403j)
            arg[(3, 1)]=(-0.5819527897+0.47964673026j)*x[0] + ((0.634344803957-0.952061721501j))*x[1] + ((-0.56483405321-0.945958317289j))*x[2]
            ref[(3, 1)]=(-0.256221019477-0.709186654265j)
            arg[(3, 2)]=(-0.787050279409+0.270575886572j)*x[0] + ((-0.567660069352-0.563757958021j))*x[1] + ((-0.810494683286+0.659666015005j))*x[2]
            ref[(3, 2)]=(-1.08260251602+0.183241971778j)
            arg[(3, 3)]=(0.507303112732-0.895106788465j)*x[0] + ((-0.738688723379+0.418618005515j))*x[1] + ((0.651664351241-0.181548950605j))*x[2]
            ref[(3, 3)]=(0.210139370298-0.329018866778j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref=numpy.zeros((2, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.873509486007+0.940932614322j)*x[0] + ((-0.0499555619627+0.106781386669j))*x[1]
            ref[(0, 0, 0)]=(-0.461732523985+0.523857000496j)
            arg[(0, 0, 1)]=(-0.548502026803+0.393891670301j)*x[0] + ((-0.86062946411+0.868214035674j))*x[1]
            ref[(0, 0, 1)]=(-0.704565745456+0.631052852987j)
            arg[(0, 1, 0)]=(0.175757456864+0.00503812566446j)*x[0] + ((-0.878113146103+0.762132956679j))*x[1]
            ref[(0, 1, 0)]=(-0.351177844619+0.383585541172j)
            arg[(0, 1, 1)]=(0.498427180925-0.883096621457j)*x[0] + ((0.615854432137+0.772562008985j))*x[1]
            ref[(0, 1, 1)]=(0.557140806531-0.055267306236j)
            arg[(0, 2, 0)]=(-0.666363589898+0.536870823261j)*x[0] + ((-0.230850343552+0.656762259002j))*x[1]
            ref[(0, 2, 0)]=(-0.448606966725+0.596816541131j)
            arg[(0, 2, 1)]=(0.207536795962+0.331790296547j)*x[0] + ((0.995673970768+0.854656411645j))*x[1]
            ref[(0, 2, 1)]=(0.601605383365+0.593223354096j)
            arg[(0, 3, 0)]=(0.344360045483+0.126921062251j)*x[0] + ((-0.46867350729+0.442099462876j))*x[1]
            ref[(0, 3, 0)]=(-0.0621567309037+0.284510262563j)
            arg[(0, 3, 1)]=(-0.973129597161+0.244172493045j)*x[0] + ((-0.280760330647-0.336850232767j))*x[1]
            ref[(0, 3, 1)]=(-0.626944963904-0.0463388698612j)
            arg[(1, 0, 0)]=(-0.347834538383-0.827060673209j)*x[0] + ((0.141689279697+0.951876704487j))*x[1]
            ref[(1, 0, 0)]=(-0.103072629343+0.0624080156388j)
            arg[(1, 0, 1)]=(0.737248049242-0.680176127045j)*x[0] + ((-0.151210011698-0.948029521185j))*x[1]
            ref[(1, 0, 1)]=(0.293019018772-0.814102824115j)
            arg[(1, 1, 0)]=(0.936702794788+0.526232718142j)*x[0] + ((-0.891429131731-0.961824152192j))*x[1]
            ref[(1, 1, 0)]=(0.0226368315283-0.217795717025j)
            arg[(1, 1, 1)]=(-0.896412270025+0.682474941835j)*x[0] + ((0.849977393143-0.113750693078j))*x[1]
            ref[(1, 1, 1)]=(-0.0232174384411+0.284362124378j)
            arg[(1, 2, 0)]=(0.203310894307-0.377348215875j)*x[0] + ((0.987923543678+0.989425173746j))*x[1]
            ref[(1, 2, 0)]=(0.595617218992+0.306038478936j)
            arg[(1, 2, 1)]=(-0.301081182553-0.0582130040234j)*x[0] + ((0.994229690724+0.587243358511j))*x[1]
            ref[(1, 2, 1)]=(0.346574254086+0.264515177244j)
            arg[(1, 3, 0)]=(-0.92924932312+0.0745451742525j)*x[0] + ((0.13325516838+0.513442196144j))*x[1]
            ref[(1, 3, 0)]=(-0.39799707737+0.293993685198j)
            arg[(1, 3, 1)]=(0.825016993377+0.744849393148j)*x[0] + ((0.628798531428+0.799938707867j))*x[1]
            ref[(1, 3, 1)]=(0.726907762403+0.772394050507j)
        else:
            arg[(0, 0, 0)]=(-0.391929934677+0.123170362821j)*x[0] + ((0.506958358478-0.442539162178j))*x[1] + ((-0.100418062415-0.830350531015j))*x[2]
            ref[(0, 0, 0)]=(0.00730518069312-0.574859665186j)
            arg[(0, 0, 1)]=(0.0929592080614+0.562020989103j)*x[0] + ((-0.652103413707+0.117235821926j))*x[1] + ((-0.792081776785+0.0449603237325j))*x[2]
            ref[(0, 0, 1)]=(-0.675612991215+0.362108567381j)
            arg[(0, 1, 0)]=(-0.51659388057+0.855454068474j)*x[0] + ((-0.524684550914+0.620633737178j))*x[1] + ((-0.553460688428-0.696576292848j))*x[2]
            ref[(0, 1, 0)]=(-0.797369559956+0.389755756402j)
            arg[(0, 1, 1)]=(0.498885573815+0.839196025357j)*x[0] + ((0.946732255202+0.530346144673j))*x[1] + ((0.423605180042-0.585253451889j))*x[2]
            ref[(0, 1, 1)]=(0.934611504529+0.392144359071j)
            arg[(0, 2, 0)]=(0.780897123496+0.621255646377j)*x[0] + ((-0.361958497124-0.290552749997j))*x[1] + ((-0.957844792063+0.653320656644j))*x[2]
            ref[(0, 2, 0)]=(-0.269453082845+0.492011776512j)
            arg[(0, 2, 1)]=(-0.394412598939-0.908249630752j)*x[0] + ((-0.322788870097+0.505508659286j))*x[1] + ((-0.176829117275+0.150745296783j))*x[2]
            ref[(0, 2, 1)]=(-0.447015293155-0.125997837341j)
            arg[(0, 3, 0)]=(0.291633847937-0.608665313687j)*x[0] + ((-0.0525455624071+0.260583467809j))*x[1] + ((0.280514161513-0.00175736224749j))*x[2]
            ref[(0, 3, 0)]=(0.259801223522-0.174919604063j)
            arg[(0, 3, 1)]=(0.499610941378+0.832047293948j)*x[0] + ((0.964740288116+0.124312726584j))*x[1] + ((-0.00221264871793+0.260823646688j))*x[2]
            ref[(0, 3, 1)]=(0.731069290388+0.60859183361j)
            arg[(1, 0, 0)]=(0.315507581223+0.891972844122j)*x[0] + ((-0.193079066577-0.468458718137j))*x[1] + ((-0.926459326518+0.140688386505j))*x[2]
            ref[(1, 0, 0)]=(-0.402015405936+0.282101256245j)
            arg[(1, 0, 1)]=(-0.938575988712-0.781725916603j)*x[0] + ((0.466357957969-0.887517786147j))*x[1] + ((0.225184009268-0.540328875362j))*x[2]
            ref[(1, 0, 1)]=(-0.123517010737-1.10478628906j)
            arg[(1, 1, 0)]=(0.0386810348837-0.412321964354j)*x[0] + ((0.598691930187+0.7934686653j))*x[1] + ((-0.531641807942+0.76958955132j))*x[2]
            ref[(1, 1, 0)]=(0.0528655785644+0.575368126133j)
            arg[(1, 1, 1)]=(0.162094997233-0.221825778922j)*x[0] + ((0.250058113-0.753738616527j))*x[1] + ((0.634170880163+0.0138340049596j))*x[2]
            ref[(1, 1, 1)]=(0.523161995198-0.480865195244j)
            arg[(1, 2, 0)]=(-0.468596051804+0.870696445904j)*x[0] + ((-0.762822017553-0.659663618404j))*x[1] + ((0.185000268186-0.361469670733j))*x[2]
            ref[(1, 2, 0)]=(-0.523208900585-0.0752184216166j)
            arg[(1, 2, 1)]=(-0.976206871552+0.327887534108j)*x[0] + ((-0.548737046321-0.141285208184j))*x[1] + ((0.897254773309-0.676754480763j))*x[2]
            ref[(1, 2, 1)]=(-0.313844572282-0.24507607742j)
            arg[(1, 3, 0)]=(-0.445550310435+0.635495621174j)*x[0] + ((0.128774570859+0.397609875873j))*x[1] + ((0.436663484628+0.69105845933j))*x[2]
            ref[(1, 3, 0)]=(0.0599438725258+0.862081978189j)
            arg[(1, 3, 1)]=(0.233035227141+0.618998098882j)*x[0] + ((0.0366589120675-0.965427072592j))*x[1] + ((0.442525122406-0.144137037411j))*x[2]
            ref[(1, 3, 1)]=(0.356109630807-0.245283005561j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4, 2),w)
        ref=numpy.zeros((3, 3, 4, 2),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(-0.649625866093+0.101759645002j)*x[0] + ((-0.510314269129-0.779578741206j))*x[1]
            ref[(0, 0, 0, 0)]=(-0.579970067611-0.338909548102j)
            arg[(0, 0, 0, 1)]=(-0.685716046272-0.0564037718598j)*x[0] + ((0.83423828562-0.53295693433j))*x[1]
            ref[(0, 0, 0, 1)]=(0.0742611196737-0.294680353095j)
            arg[(0, 0, 1, 0)]=(0.269947962434-0.348196036695j)*x[0] + ((0.304129140324-0.526072751781j))*x[1]
            ref[(0, 0, 1, 0)]=(0.287038551379-0.437134394238j)
            arg[(0, 0, 1, 1)]=(-0.954667572706+0.0713454032163j)*x[0] + ((0.647864561401+0.197016768533j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.153401505652+0.134181085874j)
            arg[(0, 0, 2, 0)]=(0.246798726513+0.63388417356j)*x[0] + ((-0.427214785715-0.362542158259j))*x[1]
            ref[(0, 0, 2, 0)]=(-0.0902080296011+0.13567100765j)
            arg[(0, 0, 2, 1)]=(-0.398082031933+0.907127864888j)*x[0] + ((-0.378684912129+0.833548886178j))*x[1]
            ref[(0, 0, 2, 1)]=(-0.388383472031+0.870338375533j)
            arg[(0, 0, 3, 0)]=(0.302485410671-0.356033543013j)*x[0] + ((0.845152424529+0.394288357056j))*x[1]
            ref[(0, 0, 3, 0)]=(0.5738189176+0.0191274070212j)
            arg[(0, 0, 3, 1)]=(0.714366112538-0.194660525521j)*x[0] + ((0.888810827657+0.0546383139853j))*x[1]
            ref[(0, 0, 3, 1)]=(0.801588470097-0.0700111057676j)
            arg[(0, 1, 0, 0)]=(0.330892463416+0.0532171378645j)*x[0] + ((-0.654147901+0.0184838008097j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.161627718792+0.0358504693371j)
            arg[(0, 1, 0, 1)]=(-0.563227871379-0.0807849783497j)*x[0] + ((0.627809362101+0.491278839407j))*x[1]
            ref[(0, 1, 0, 1)]=(0.0322907453609+0.205246930529j)
            arg[(0, 1, 1, 0)]=(0.176612498155+0.488037628965j)*x[0] + ((-0.305853200082-0.585380761807j))*x[1]
            ref[(0, 1, 1, 0)]=(-0.0646203509636-0.0486715664208j)
            arg[(0, 1, 1, 1)]=(0.523313082405+0.791390504239j)*x[0] + ((-0.238172990205+0.153558761876j))*x[1]
            ref[(0, 1, 1, 1)]=(0.1425700461+0.472474633058j)
            arg[(0, 1, 2, 0)]=(0.650062757149+0.2451457563j)*x[0] + ((0.00791943024024-0.838825920953j))*x[1]
            ref[(0, 1, 2, 0)]=(0.328991093694-0.296840082326j)
            arg[(0, 1, 2, 1)]=(-0.814090158332+0.536479810291j)*x[0] + ((-0.212851413389-0.349814692163j))*x[1]
            ref[(0, 1, 2, 1)]=(-0.51347078586+0.0933325590642j)
            arg[(0, 1, 3, 0)]=(0.100026156949-0.2751209043j)*x[0] + ((0.379754255988-0.149428426267j))*x[1]
            ref[(0, 1, 3, 0)]=(0.239890206468-0.212274665283j)
            arg[(0, 1, 3, 1)]=(0.798554555915+0.479081016989j)*x[0] + ((-0.412180481101+0.850842354851j))*x[1]
            ref[(0, 1, 3, 1)]=(0.193187037407+0.66496168592j)
            arg[(0, 2, 0, 0)]=(0.595250976244-0.903128670994j)*x[0] + ((0.774824041093+0.824964459994j))*x[1]
            ref[(0, 2, 0, 0)]=(0.685037508668-0.0390821055j)
            arg[(0, 2, 0, 1)]=(0.102924060737+0.822235026112j)*x[0] + ((-0.467244202286+0.30172112746j))*x[1]
            ref[(0, 2, 0, 1)]=(-0.182160070774+0.561978076786j)
            arg[(0, 2, 1, 0)]=(-0.2055340892+0.492272531393j)*x[0] + ((-0.400204973591+0.223532221913j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.302869531396+0.357902376653j)
            arg[(0, 2, 1, 1)]=(-0.757213092769-0.68787983961j)*x[0] + ((0.559485731608+0.488685556383j))*x[1]
            ref[(0, 2, 1, 1)]=(-0.0988636805807-0.0995971416132j)
            arg[(0, 2, 2, 0)]=(-0.344119459659+0.391640562299j)*x[0] + ((-0.7988068912-0.866097576243j))*x[1]
            ref[(0, 2, 2, 0)]=(-0.571463175429-0.237228506972j)
            arg[(0, 2, 2, 1)]=(-0.569963865803-0.509397079995j)*x[0] + ((0.911011634099-0.483571479948j))*x[1]
            ref[(0, 2, 2, 1)]=(0.170523884148-0.496484279972j)
            arg[(0, 2, 3, 0)]=(0.937607643395+0.372378871991j)*x[0] + ((-0.477130416074+0.120130028862j))*x[1]
            ref[(0, 2, 3, 0)]=(0.23023861366+0.246254450426j)
            arg[(0, 2, 3, 1)]=(0.627954010099-0.437753636418j)*x[0] + ((-0.825273673055-0.98917454807j))*x[1]
            ref[(0, 2, 3, 1)]=(-0.098659831478-0.713464092244j)
            arg[(1, 0, 0, 0)]=(-0.395396705304-0.859913290252j)*x[0] + ((0.133004164993-0.352859708338j))*x[1]
            ref[(1, 0, 0, 0)]=(-0.131196270155-0.606386499295j)
            arg[(1, 0, 0, 1)]=(-0.716581741535-0.279896905436j)*x[0] + ((-0.422952191817+0.997819973593j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.569766966676+0.358961534078j)
            arg[(1, 0, 1, 0)]=(-0.774174312532+0.557836303166j)*x[0] + ((-0.874599700406+0.109412409022j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.824387006469+0.333624356094j)
            arg[(1, 0, 1, 1)]=(0.978031394878-0.879663139803j)*x[0] + ((0.0266981226941-0.238927603207j))*x[1]
            ref[(1, 0, 1, 1)]=(0.502364758786-0.559295371505j)
            arg[(1, 0, 2, 0)]=(-0.960831765067-0.783191170372j)*x[0] + ((0.424173494971-0.971770663623j))*x[1]
            ref[(1, 0, 2, 0)]=(-0.268329135048-0.877480916997j)
            arg[(1, 0, 2, 1)]=(-0.980136294431-0.821753986521j)*x[0] + ((-0.305148943189-0.585890967678j))*x[1]
            ref[(1, 0, 2, 1)]=(-0.64264261881-0.703822477099j)
            arg[(1, 0, 3, 0)]=(0.668088813389-0.879715674548j)*x[0] + ((-0.00645443829116+0.104454035805j))*x[1]
            ref[(1, 0, 3, 0)]=(0.330817187549-0.387630819372j)
            arg[(1, 0, 3, 1)]=(0.101014822215+0.353830403606j)*x[0] + ((0.722956188535-0.315521574045j))*x[1]
            ref[(1, 0, 3, 1)]=(0.411985505375+0.0191544147803j)
            arg[(1, 1, 0, 0)]=(-0.174673242906-0.942960990537j)*x[0] + ((0.0647112995657-0.511691014703j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.0549809716703-0.72732600262j)
            arg[(1, 1, 0, 1)]=(-0.507691769885+0.0906934839876j)*x[0] + ((0.0835337471564+0.242894033689j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.212079011364+0.166793758838j)
            arg[(1, 1, 1, 0)]=(0.00400577092565+0.448533632682j)*x[0] + ((0.80366475934-0.647469392j))*x[1]
            ref[(1, 1, 1, 0)]=(0.403835265133-0.0994678796592j)
            arg[(1, 1, 1, 1)]=(-0.84219943481-0.712491496371j)*x[0] + ((-0.727697282463+0.50020279875j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.784948358637-0.10614434881j)
            arg[(1, 1, 2, 0)]=(-0.106186682994+0.663776903078j)*x[0] + ((-0.372595368115-0.405059634525j))*x[1]
            ref[(1, 1, 2, 0)]=(-0.239391025554+0.129358634277j)
            arg[(1, 1, 2, 1)]=(0.658479798277+0.561766304578j)*x[0] + ((0.650367224873+0.826915370976j))*x[1]
            ref[(1, 1, 2, 1)]=(0.654423511575+0.694340837777j)
            arg[(1, 1, 3, 0)]=(-0.850842666671+0.209323890556j)*x[0] + ((0.236427903012+0.502347889757j))*x[1]
            ref[(1, 1, 3, 0)]=(-0.30720738183+0.355835890156j)
            arg[(1, 1, 3, 1)]=(0.683898330585-0.964549401249j)*x[0] + ((-0.482002889782-0.405352454893j))*x[1]
            ref[(1, 1, 3, 1)]=(0.100947720402-0.684950928071j)
            arg[(1, 2, 0, 0)]=(-0.937747962987+0.621390993456j)*x[0] + ((0.779269985883+0.699296795169j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.0792389885522+0.660343894312j)
            arg[(1, 2, 0, 1)]=(0.215840640341+0.54639491625j)*x[0] + ((0.742775803506-0.384595635026j))*x[1]
            ref[(1, 2, 0, 1)]=(0.479308221924+0.0808996406121j)
            arg[(1, 2, 1, 0)]=(-0.0872216599697+0.268377836787j)*x[0] + ((-0.971328260876-0.651592105529j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.529274960423-0.191607134371j)
            arg[(1, 2, 1, 1)]=(-0.937499199436+0.542841062969j)*x[0] + ((-0.499885099345+0.235273202538j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.71869214939+0.389057132754j)
            arg[(1, 2, 2, 0)]=(0.831659839816+0.234579093586j)*x[0] + ((0.914046906451+0.783225830576j))*x[1]
            ref[(1, 2, 2, 0)]=(0.872853373133+0.508902462081j)
            arg[(1, 2, 2, 1)]=(-0.2358753547+0.885611318343j)*x[0] + ((0.293291950205+0.770584687461j))*x[1]
            ref[(1, 2, 2, 1)]=(0.0287082977523+0.828098002902j)
            arg[(1, 2, 3, 0)]=(0.169963775006+0.685195487866j)*x[0] + ((0.424254593689-0.877912790796j))*x[1]
            ref[(1, 2, 3, 0)]=(0.297109184348-0.0963586514651j)
            arg[(1, 2, 3, 1)]=(0.944834188653+0.554195039984j)*x[0] + ((0.271303453746+0.668101253924j))*x[1]
            ref[(1, 2, 3, 1)]=(0.6080688212+0.611148146954j)
            arg[(2, 0, 0, 0)]=(0.483560348352+0.625484680032j)*x[0] + ((-0.311007703009+0.357164964503j))*x[1]
            ref[(2, 0, 0, 0)]=(0.0862763226713+0.491324822268j)
            arg[(2, 0, 0, 1)]=(0.85561060532-0.434613425926j)*x[0] + ((0.748250662827-0.99563313566j))*x[1]
            ref[(2, 0, 0, 1)]=(0.801930634073-0.715123280793j)
            arg[(2, 0, 1, 0)]=(-0.85523140204+0.409522266391j)*x[0] + ((-0.303208217393-0.271215137876j))*x[1]
            ref[(2, 0, 1, 0)]=(-0.579219809716+0.069153564257j)
            arg[(2, 0, 1, 1)]=(0.241486514797-0.549835317994j)*x[0] + ((-0.214176342761-0.217025898761j))*x[1]
            ref[(2, 0, 1, 1)]=(0.0136550860176-0.383430608378j)
            arg[(2, 0, 2, 0)]=(0.178720349206+0.258565933452j)*x[0] + ((0.146886164589-0.00846794102553j))*x[1]
            ref[(2, 0, 2, 0)]=(0.162803256897+0.125048996213j)
            arg[(2, 0, 2, 1)]=(-0.742089258308+0.946315358019j)*x[0] + ((0.68950400354+0.420562485532j))*x[1]
            ref[(2, 0, 2, 1)]=(-0.0262926273839+0.683438921776j)
            arg[(2, 0, 3, 0)]=(-0.673911604628+0.348909030271j)*x[0] + ((0.0701256960826-0.902518340427j))*x[1]
            ref[(2, 0, 3, 0)]=(-0.301892954273-0.276804655078j)
            arg[(2, 0, 3, 1)]=(0.0029143740709+0.238439316072j)*x[0] + ((-0.135512022248-0.809884230146j))*x[1]
            ref[(2, 0, 3, 1)]=(-0.0662988240884-0.285722457037j)
            arg[(2, 1, 0, 0)]=(-0.513098408615+0.780965789267j)*x[0] + ((0.689444531013-0.125071227783j))*x[1]
            ref[(2, 1, 0, 0)]=(0.088173061199+0.327947280742j)
            arg[(2, 1, 0, 1)]=(0.226692522299+0.0739821197653j)*x[0] + ((-0.247711711505-0.235191682672j))*x[1]
            ref[(2, 1, 0, 1)]=(-0.0105095946031-0.0806047814535j)
            arg[(2, 1, 1, 0)]=(0.0151474431172-0.932338850643j)*x[0] + ((0.678513028042-0.206904690368j))*x[1]
            ref[(2, 1, 1, 0)]=(0.346830235579-0.569621770505j)
            arg[(2, 1, 1, 1)]=(-0.685065876001-0.623709413254j)*x[0] + ((-0.903887367441+0.0691809232234j))*x[1]
            ref[(2, 1, 1, 1)]=(-0.794476621721-0.277264245015j)
            arg[(2, 1, 2, 0)]=(0.96908125778-0.787880534501j)*x[0] + ((0.777805392091-0.701346067214j))*x[1]
            ref[(2, 1, 2, 0)]=(0.873443324936-0.744613300857j)
            arg[(2, 1, 2, 1)]=(-0.955147978171+0.444524982491j)*x[0] + ((-0.513875040077-0.500410950672j))*x[1]
            ref[(2, 1, 2, 1)]=(-0.734511509124-0.0279429840902j)
            arg[(2, 1, 3, 0)]=(-0.281490218373+0.523604013319j)*x[0] + ((0.907245114619-0.384245876615j))*x[1]
            ref[(2, 1, 3, 0)]=(0.312877448123+0.0696790683519j)
            arg[(2, 1, 3, 1)]=(-0.602698706707-0.733093735826j)*x[0] + ((-0.511434931098-0.947935746115j))*x[1]
            ref[(2, 1, 3, 1)]=(-0.557066818903-0.840514740971j)
            arg[(2, 2, 0, 0)]=(-0.488685962273+0.818863544046j)*x[0] + ((-0.489326080623-0.0195988172818j))*x[1]
            ref[(2, 2, 0, 0)]=(-0.489006021448+0.399632363382j)
            arg[(2, 2, 0, 1)]=(0.106226209864+0.481928141136j)*x[0] + ((0.490416089113+0.700362765932j))*x[1]
            ref[(2, 2, 0, 1)]=(0.298321149488+0.591145453534j)
            arg[(2, 2, 1, 0)]=(-0.183643918431+0.551017322168j)*x[0] + ((0.829588161917-0.971124099346j))*x[1]
            ref[(2, 2, 1, 0)]=(0.322972121743-0.210053388589j)
            arg[(2, 2, 1, 1)]=(-0.144553370378+0.53974440668j)*x[0] + ((-0.402447947487+0.382483347032j))*x[1]
            ref[(2, 2, 1, 1)]=(-0.273500658933+0.461113876856j)
            arg[(2, 2, 2, 0)]=(-0.433255877846+0.43172423273j)*x[0] + ((0.740414304641+0.819477816883j))*x[1]
            ref[(2, 2, 2, 0)]=(0.153579213397+0.625601024806j)
            arg[(2, 2, 2, 1)]=(0.761177295351+0.943714668716j)*x[0] + ((0.252385610877-0.164816806584j))*x[1]
            ref[(2, 2, 2, 1)]=(0.506781453114+0.389448931066j)
            arg[(2, 2, 3, 0)]=(0.429754553221+0.830189628253j)*x[0] + ((0.565908861019-0.953820451224j))*x[1]
            ref[(2, 2, 3, 0)]=(0.49783170712-0.0618154114854j)
            arg[(2, 2, 3, 1)]=(0.637176539239+0.0201592637187j)*x[0] + ((-0.175955673322-0.950296023142j))*x[1]
            ref[(2, 2, 3, 1)]=(0.230610432958-0.465068379712j)
        else:
            arg[(0, 0, 0, 0)]=(0.121177035614-0.847591479278j)*x[0] + ((0.168529969818+0.711111600517j))*x[1] + ((0.0704231774226-0.0659900094295j))*x[2]
            ref[(0, 0, 0, 0)]=(0.180065091427-0.101234944095j)
            arg[(0, 0, 0, 1)]=(-0.763805827754-0.437814824447j)*x[0] + ((-0.982728472166+0.767608686053j))*x[1] + ((0.955491834557+0.120498186825j))*x[2]
            ref[(0, 0, 0, 1)]=(-0.395521232682+0.225146024216j)
            arg[(0, 0, 1, 0)]=(-0.34530053817-0.248750956331j)*x[0] + ((-0.0156536727233-0.638360180997j))*x[1] + ((0.724291425373-0.913519621885j))*x[2]
            ref[(0, 0, 1, 0)]=(0.18166860724-0.900315379606j)
            arg[(0, 0, 1, 1)]=(-0.611949883005+0.973328124377j)*x[0] + ((-0.613301177012+0.25358175732j))*x[1] + ((-0.980087347424+0.284474218217j))*x[2]
            ref[(0, 0, 1, 1)]=(-1.10266920372+0.755692049957j)
            arg[(0, 0, 2, 0)]=(0.616772916558+0.549867492633j)*x[0] + ((0.172059988771-0.800434459048j))*x[1] + ((-0.220278356384-0.343067212798j))*x[2]
            ref[(0, 0, 2, 0)]=(0.284277274473-0.296817089607j)
            arg[(0, 0, 2, 1)]=(-0.567513062779-0.312610482172j)*x[0] + ((-0.648982535284-0.570318905232j))*x[1] + ((0.948230105524-0.848696235811j))*x[2]
            ref[(0, 0, 2, 1)]=(-0.13413274627-0.865812811608j)
            arg[(0, 0, 3, 0)]=(-0.254852592022+0.763787114648j)*x[0] + ((-0.347960922517-0.551108728962j))*x[1] + ((0.309300353817-0.53803234186j))*x[2]
            ref[(0, 0, 3, 0)]=(-0.146756580361-0.162676978087j)
            arg[(0, 0, 3, 1)]=(0.3922886216-0.0797726534572j)*x[0] + ((0.428507404662-0.995812325646j))*x[1] + ((0.0520652737212+0.628697162275j))*x[2]
            ref[(0, 0, 3, 1)]=(0.436430649992-0.223443908414j)
            arg[(0, 1, 0, 0)]=(0.426141035209+0.883966730566j)*x[0] + ((0.104084492502-0.781031814264j))*x[1] + ((-0.298669107144+0.172225158536j))*x[2]
            ref[(0, 1, 0, 0)]=(0.115778210284+0.137580037419j)
            arg[(0, 1, 0, 1)]=(0.45563155147+0.574879498864j)*x[0] + ((0.34918061736-0.787450880097j))*x[1] + ((-0.66366019847+0.448699188498j))*x[2]
            ref[(0, 1, 0, 1)]=(0.0705759851803+0.118063903632j)
            arg[(0, 1, 1, 0)]=(0.814772274203+0.83872252731j)*x[0] + ((-0.0210788796085+0.447026939976j))*x[1] + ((0.0814656631002+0.970625291989j))*x[2]
            ref[(0, 1, 1, 0)]=(0.437579528848+1.12818737964j)
            arg[(0, 1, 1, 1)]=(-0.0460591582385-0.0245097560535j)*x[0] + ((-0.580745840961-0.761451294044j))*x[1] + ((-0.334313670054-0.675340584229j))*x[2]
            ref[(0, 1, 1, 1)]=(-0.480559334627-0.730650817163j)
            arg[(0, 1, 2, 0)]=(0.0130183852644-0.00902961146376j)*x[0] + ((-0.548964161651+0.327667876401j))*x[1] + ((-0.817343308104-0.617784083092j))*x[2]
            ref[(0, 1, 2, 0)]=(-0.676644542246-0.149572909078j)
            arg[(0, 1, 2, 1)]=(0.465568750561+0.556522101266j)*x[0] + ((0.294999596465+0.679340648166j))*x[1] + ((0.589146392823+0.277722755321j))*x[2]
            ref[(0, 1, 2, 1)]=(0.674857369924+0.756792752377j)
            arg[(0, 1, 3, 0)]=(0.914871631211-0.946378259324j)*x[0] + ((-0.0571250807314+0.385210687828j))*x[1] + ((0.740256022364+0.702284570848j))*x[2]
            ref[(0, 1, 3, 0)]=(0.799001286422+0.070558499676j)
            arg[(0, 1, 3, 1)]=(0.467215093962-0.661965569457j)*x[0] + ((-0.250456446643-0.685136515067j))*x[1] + ((0.0982026306416+0.455779310165j))*x[2]
            ref[(0, 1, 3, 1)]=(0.15748063898-0.44566138718j)
            arg[(0, 2, 0, 0)]=(0.73201767664+0.739557146648j)*x[0] + ((-0.698906304367-0.373927947523j))*x[1] + ((0.591722346443-0.54983312513j))*x[2]
            ref[(0, 2, 0, 0)]=(0.312416859358-0.0921019630025j)
            arg[(0, 2, 0, 1)]=(0.452987282121+0.0670595568948j)*x[0] + ((-0.953685985382-0.761084826436j))*x[1] + ((0.821384112041+0.26723315035j))*x[2]
            ref[(0, 2, 0, 1)]=(0.16034270439-0.213396059596j)
            arg[(0, 2, 1, 0)]=(-0.822550153527+0.737408680864j)*x[0] + ((-0.767238389814+0.0907369617974j))*x[1] + ((0.0128410775222-0.508866494503j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.788473732909+0.159639574079j)
            arg[(0, 2, 1, 1)]=(-0.780584485864+0.00866586370109j)*x[0] + ((0.729785744777+0.777083830223j))*x[1] + ((0.166118726072+0.437464552042j))*x[2]
            ref[(0, 2, 1, 1)]=(0.0576599924926+0.611607122983j)
            arg[(0, 2, 2, 0)]=(0.763286237141-0.114442991218j)*x[0] + ((-0.995914168049-0.791057067836j))*x[1] + ((0.708380428469+0.219511905178j))*x[2]
            ref[(0, 2, 2, 0)]=(0.237876248781-0.342994076938j)
            arg[(0, 2, 2, 1)]=(0.849102909282-0.364480007669j)*x[0] + ((-0.333145739333+0.88034059029j))*x[1] + ((-0.0653679206987+0.507531213004j))*x[2]
            ref[(0, 2, 2, 1)]=(0.225294624625+0.511695897812j)
            arg[(0, 2, 3, 0)]=(0.267014037055+0.549447832151j)*x[0] + ((-0.773755040524-0.0314717938678j))*x[1] + ((0.172209208188+0.994099290736j))*x[2]
            ref[(0, 2, 3, 0)]=(-0.167265897641+0.75603766451j)
            arg[(0, 2, 3, 1)]=(0.120058417533+0.172531367269j)*x[0] + ((-0.922416693103+0.608111199108j))*x[1] + ((-0.799225928522+0.0827960207608j))*x[2]
            ref[(0, 2, 3, 1)]=(-0.800792102046+0.431719293569j)
            arg[(1, 0, 0, 0)]=(-0.5328546787-0.25823682152j)*x[0] + ((-0.702302489547-0.738876365457j))*x[1] + ((-0.071167825259+0.227164937094j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.653162496753-0.384974124941j)
            arg[(1, 0, 0, 1)]=(0.490140242174+0.0185441285167j)*x[0] + ((0.111884997694+0.728089809507j))*x[1] + ((-0.70756568704-0.214317544778j))*x[2]
            ref[(1, 0, 0, 1)]=(-0.0527702235859+0.266158196623j)
            arg[(1, 0, 1, 0)]=(0.219460093535-0.542771861041j)*x[0] + ((0.621677164427+0.8709425238j))*x[1] + ((0.617143849232+0.923544049634j))*x[2]
            ref[(1, 0, 1, 0)]=(0.729140553597+0.625857356197j)
            arg[(1, 0, 1, 1)]=(0.596707394502+0.401762203786j)*x[0] + ((-0.449725888355-0.115172228662j))*x[1] + ((-0.26982967955+0.0192204688929j))*x[2]
            ref[(1, 0, 1, 1)]=(-0.061424086701+0.152905222009j)
            arg[(1, 0, 2, 0)]=(0.720254332797+0.322347795333j)*x[0] + ((0.781485127643+0.630400962386j))*x[1] + ((0.142397780548-0.645591262452j))*x[2]
            ref[(1, 0, 2, 0)]=(0.822068620494+0.153578747633j)
            arg[(1, 0, 2, 1)]=(0.693736236466+0.192715622837j)*x[0] + ((0.637053938475+0.437402577416j))*x[1] + ((0.35133459666+0.95559758612j))*x[2]
            ref[(1, 0, 2, 1)]=(0.841062385801+0.792857893187j)
            arg[(1, 0, 3, 0)]=(-0.972511310959+0.917781307182j)*x[0] + ((0.341154150735+0.281972084283j))*x[1] + ((0.0771777330327+0.688299981782j))*x[2]
            ref[(1, 0, 3, 0)]=(-0.277089713596+0.944026686623j)
            arg[(1, 0, 3, 1)]=(0.763726724406-0.38548132031j)*x[0] + ((0.509058634202-0.292706085601j))*x[1] + ((0.591573238545+0.428860129728j))*x[2]
            ref[(1, 0, 3, 1)]=(0.932179298576-0.124663638091j)
            arg[(1, 1, 0, 0)]=(0.603465234427+0.37418581633j)*x[0] + ((-0.712733977725-0.958991846853j))*x[1] + ((0.627237181479-0.879307102646j))*x[2]
            ref[(1, 1, 0, 0)]=(0.25898421909-0.732056566585j)
            arg[(1, 1, 0, 1)]=(0.406134154644+0.749931595352j)*x[0] + ((0.713468657247+0.2524260972j))*x[1] + ((0.684763916078+0.262031379236j))*x[2]
            ref[(1, 1, 0, 1)]=(0.902183363984+0.632194535894j)
            arg[(1, 1, 1, 0)]=(-0.607372633036-0.643086593382j)*x[0] + ((0.370046875347-0.517863135807j))*x[1] + ((-0.502249787845+0.528218091202j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.369787772767-0.316365818994j)
            arg[(1, 1, 1, 1)]=(0.473729981006-0.70801105729j)*x[0] + ((-0.69329608991-0.953782714794j))*x[1] + ((-0.341765134406-0.814062358573j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.280665621655-1.23792806533j)
            arg[(1, 1, 2, 0)]=(-0.868752109856-0.319086561211j)*x[0] + ((0.419817542039-0.109949572044j))*x[1] + ((-0.875725331644-0.744018164639j))*x[2]
            ref[(1, 1, 2, 0)]=(-0.66232994973-0.586527148947j)
            arg[(1, 1, 2, 1)]=(0.434141741096+0.140639926842j)*x[0] + ((0.0272980665288+0.446301700761j))*x[1] + ((-0.323735884068-0.143403359089j))*x[2]
            ref[(1, 1, 2, 1)]=(0.0688519617784+0.221769134257j)
            arg[(1, 1, 3, 0)]=(-0.229431544479-0.776652407024j)*x[0] + ((-0.244976721542-0.826362763037j))*x[1] + ((0.147947265095-0.92458235672j))*x[2]
            ref[(1, 1, 3, 0)]=(-0.163230500463-1.26379876339j)
            arg[(1, 1, 3, 1)]=(-0.19718692112-0.774224704797j)*x[0] + ((0.226849555747+0.606835655996j))*x[1] + ((0.102899960344-0.0698094088079j))*x[2]
            ref[(1, 1, 3, 1)]=(0.0662812974853-0.118599228805j)
            arg[(1, 2, 0, 0)]=(0.117866998491-0.228995986623j)*x[0] + ((-0.274478685502+0.758872276611j))*x[1] + ((0.102807747574+0.0486683036768j))*x[2]
            ref[(1, 2, 0, 0)]=(-0.0269019697182+0.289272296833j)
            arg[(1, 2, 0, 1)]=(-0.897185468553-0.323690918577j)*x[0] + ((-0.768294563048+0.977502726291j))*x[1] + ((-0.607837351214+0.316421153558j))*x[2]
            ref[(1, 2, 0, 1)]=(-1.13665869141+0.485116480636j)
            arg[(1, 2, 1, 0)]=(0.166505108087+0.513815587584j)*x[0] + ((0.0487702760593+0.145321733535j))*x[1] + ((0.111979965795+0.40853581626j))*x[2]
            ref[(1, 2, 1, 0)]=(0.163627674971+0.533836568689j)
            arg[(1, 2, 1, 1)]=(-0.45840406398-0.664652845413j)*x[0] + ((-0.0979406112344-0.507611720502j))*x[1] + ((-0.818897157172-0.326876710904j))*x[2]
            ref[(1, 2, 1, 1)]=(-0.687620916193-0.749570638409j)
            arg[(1, 2, 2, 0)]=(-0.652949988819-0.146887723198j)*x[0] + ((0.980614030584+0.229227356067j))*x[1] + ((-0.130158414472+0.204938575721j))*x[2]
            ref[(1, 2, 2, 0)]=(0.0987528136466+0.143639104295j)
            arg[(1, 2, 2, 1)]=(0.61025015027+0.882869081435j)*x[0] + ((-0.994661565643-0.489706547844j))*x[1] + ((-0.545539358982+0.330744879758j))*x[2]
            ref[(1, 2, 2, 1)]=(-0.464975387177+0.361953706674j)
            arg[(1, 2, 3, 0)]=(0.233826940296-0.612793828759j)*x[0] + ((0.888951489693-0.18871601332j))*x[1] + ((0.306729992307+0.875386568748j))*x[2]
            ref[(1, 2, 3, 0)]=(0.714754211148+0.0369383633343j)
            arg[(1, 2, 3, 1)]=(-0.429080108023-0.927076628279j)*x[0] + ((-0.869911850874-0.249834395204j))*x[1] + ((0.472327541826-0.564551215916j))*x[2]
            ref[(1, 2, 3, 1)]=(-0.413332208536-0.8707311197j)
            arg[(2, 0, 0, 0)]=(-0.624178336194+0.0414707713578j)*x[0] + ((-0.961931694244+0.267524531944j))*x[1] + ((0.952960729943-0.95123228692j))*x[2]
            ref[(2, 0, 0, 0)]=(-0.316574650248-0.321118491809j)
            arg[(2, 0, 0, 1)]=(-0.591632510186+0.567417818006j)*x[0] + ((0.984176971651-0.133572107706j))*x[1] + ((0.331079148055+0.461328150423j))*x[2]
            ref[(2, 0, 0, 1)]=(0.36181180476+0.447586930362j)
            arg[(2, 0, 1, 0)]=(0.191165744888+0.818518604358j)*x[0] + ((-0.834548009552+0.0813334812086j))*x[1] + ((0.178474469851-0.23969174575j))*x[2]
            ref[(2, 0, 1, 0)]=(-0.232453897407+0.330080169908j)
            arg[(2, 0, 1, 1)]=(0.437700199018+0.816380594085j)*x[0] + ((0.329578084694+0.785548975427j))*x[1] + ((-0.732110260705+0.592305137649j))*x[2]
            ref[(2, 0, 1, 1)]=(0.0175840115038+1.09711735358j)
            arg[(2, 0, 2, 0)]=(-0.816354984367-0.990447288577j)*x[0] + ((0.0846190976508-0.158698792768j))*x[1] + ((0.970764909552+0.815873604574j))*x[2]
            ref[(2, 0, 2, 0)]=(0.119514511418-0.166636238385j)
            arg[(2, 0, 2, 1)]=(0.990664147991+0.156705141732j)*x[0] + ((0.203402586351+0.498747747243j))*x[1] + ((-0.586126624007+0.387337111056j))*x[2]
            ref[(2, 0, 2, 1)]=(0.303970055167+0.521395000016j)
            arg[(2, 0, 3, 0)]=(-0.328833975838+0.745160416048j)*x[0] + ((-0.898035822023+0.925403993063j))*x[1] + ((0.563327638102+0.465343558593j))*x[2]
            ref[(2, 0, 3, 0)]=(-0.331771079879+1.06795398385j)
            arg[(2, 0, 3, 1)]=(0.163787929945+0.783803619494j)*x[0] + ((0.841204615679-0.772118535537j))*x[1] + ((0.687364681499+0.0421157042106j))*x[2]
            ref[(2, 0, 3, 1)]=(0.846178613562+0.0269003940839j)
            arg[(2, 1, 0, 0)]=(-0.71091226572-0.682501855697j)*x[0] + ((-0.246352525327-0.518731762183j))*x[1] + ((0.435327926163+0.125075260373j))*x[2]
            ref[(2, 1, 0, 0)]=(-0.260968432442-0.538079178753j)
            arg[(2, 1, 0, 1)]=(-0.0442514185124+0.848826099702j)*x[0] + ((0.922896596669-0.0502916968676j))*x[1] + ((-0.017551022811-0.28620892195j))*x[2]
            ref[(2, 1, 0, 1)]=(0.430547077673+0.256162740442j)
            arg[(2, 1, 1, 0)]=(-0.263960112488+0.356269544296j)*x[0] + ((-0.999964651774-0.291188688102j))*x[1] + ((-0.268009578451-0.972373754096j))*x[2]
            ref[(2, 1, 1, 0)]=(-0.765967171357-0.453646448951j)
            arg[(2, 1, 1, 1)]=(-0.60711534654+0.342980029729j)*x[0] + ((-0.733365691304+0.786423126113j))*x[1] + ((-0.476753913639+0.473860455911j))*x[2]
            ref[(2, 1, 1, 1)]=(-0.908617475742+0.801631805877j)
            arg[(2, 1, 2, 0)]=(0.758242022399-0.196443008826j)*x[0] + ((-0.836892901379+0.932652652488j))*x[1] + ((-0.710416727803+0.542682667756j))*x[2]
            ref[(2, 1, 2, 0)]=(-0.394533803392+0.639446155709j)
            arg[(2, 1, 2, 1)]=(-0.273455139614-0.0677816564117j)*x[0] + ((0.782028827046-0.583369777466j))*x[1] + ((0.255737704314+0.2318279228j))*x[2]
            ref[(2, 1, 2, 1)]=(0.382155695873-0.209661755539j)
            arg[(2, 1, 3, 0)]=(0.513063138343+0.574895857134j)*x[0] + ((0.908459884226-0.709457652195j))*x[1] + ((0.917627459164+0.656432042098j))*x[2]
            ref[(2, 1, 3, 0)]=(1.16957524087+0.260935123519j)
            arg[(2, 1, 3, 1)]=(0.811113022369-0.543349344256j)*x[0] + ((-0.502996434541+0.821567514924j))*x[1] + ((0.312675389629+0.353913472086j))*x[2]
            ref[(2, 1, 3, 1)]=(0.310395988728+0.316065821377j)
            arg[(2, 2, 0, 0)]=(0.107453341847+0.942565890204j)*x[0] + ((0.257877545269-0.746732935858j))*x[1] + ((-0.162744829727-0.116388924907j))*x[2]
            ref[(2, 2, 0, 0)]=(0.101293028695+0.0397220147197j)
            arg[(2, 2, 0, 1)]=(-0.470369758374-0.933714035356j)*x[0] + ((0.495238664091-0.895387109166j))*x[1] + ((0.837895812823-0.838233277116j))*x[2]
            ref[(2, 2, 0, 1)]=(0.431382359271-1.33366721082j)
            arg[(2, 2, 1, 0)]=(0.0701948213413-0.819168831224j)*x[0] + ((-0.459052065518-0.812137116054j))*x[1] + ((0.999252260005+0.663121096526j))*x[2]
            ref[(2, 2, 1, 0)]=(0.305197507914-0.484092425376j)
            arg[(2, 2, 1, 1)]=(0.0468302638163-0.295683578491j)*x[0] + ((0.741857985353+0.493179209646j))*x[1] + ((0.0607245718245+0.495380027945j))*x[2]
            ref[(2, 2, 1, 1)]=(0.424706410497+0.34643782955j)
            arg[(2, 2, 2, 0)]=(0.390351415614-0.0803740838413j)*x[0] + ((0.342991582751-0.330172546606j))*x[1] + ((-0.349459510144-0.527830346618j))*x[2]
            ref[(2, 2, 2, 0)]=(0.19194174411-0.469188488533j)
            arg[(2, 2, 2, 1)]=(-0.301625772177+0.621461879067j)*x[0] + ((0.842775776402+0.827197016201j))*x[1] + ((0.576763061846-0.868656324277j))*x[2]
            ref[(2, 2, 2, 1)]=(0.558956533035+0.290001285495j)
            arg[(2, 2, 3, 0)]=(0.16926434292-0.865224594766j)*x[0] + ((0.834535741845+0.971015784424j))*x[1] + ((0.188811480435-0.882786818683j))*x[2]
            ref[(2, 2, 3, 0)]=(0.5963057826-0.388497814512j)
            arg[(2, 2, 3, 1)]=(-0.535731409162+0.64206055383j)*x[0] + ((-0.601233318451+0.741387627263j))*x[1] + ((-0.786405432557+0.319052783511j))*x[2]
            ref[(2, 2, 3, 1)]=(-0.961685080085+0.851250482302j)
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=(-0.0320455651965+0.832654917016j)*x[0]**o + ((-0.0536962869646-0.241431174906j))*x[0] + ((-0.176836981745+0.853057675688j))*x[1]**o + ((0.557253499718+0.19462431769j))*x[1]
            ref=(-0.176836981745+0.853057675688j)/(o+1.)+((0.251778606377-0.0234034286082j))+((-0.0320455651965+0.832654917016j))*0.5**o
        else:
            arg=(0.205182148583-0.137735169247j)*x[0]**o + ((-0.216865426634+0.703412144545j))*x[0] + ((0.632736366019+0.594394086892j))*x[1]**o + ((0.0397954106932+0.859757730598j))*x[1] + ((0.0111513116742-0.151393557176j))*x[2]**o + ((-0.415846998869-0.973999051077j))*x[2]
            ref=(0.643887677693+0.443000529716j)/(o+1.)+((-0.296458507405+0.294585412033j))+((0.205182148583-0.137735169247j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,complex),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.complex_)
        if dim==2:
            arg[(0,)]=(-0.245544131751+0.385811893771j)*x[0]**o + ((-0.237958212132-0.942426373665j))*x[0] + ((0.141210175889-0.517969133395j))*x[1]**o + ((0.40426609882+0.585630717609j))*x[1]
            ref[(0,)]=(0.141210175889-0.517969133395j)/(o+1.)+((0.0831539433442-0.178397828028j))+((-0.245544131751+0.385811893771j))*0.5**o
            arg[(1,)]=(-0.294544051145-0.8218507838j)*x[0]**o + ((0.31215599516-0.00653799726576j))*x[0] + ((-0.444144733917+0.23624051308j))*x[1]**o + ((0.259971334263+0.199502762659j))*x[1]
            ref[(1,)]=(-0.444144733917+0.23624051308j)/(o+1.)+((0.286063664711+0.0964823826967j))+((-0.294544051145-0.8218507838j))*0.5**o
            arg[(2,)]=(-0.397441503719+0.564139372106j)*x[0]**o + ((0.0497868315773+0.58650029392j))*x[0] + ((0.751756306561-0.667690029209j))*x[1]**o + ((0.21237905636-0.951879861237j))*x[1]
            ref[(2,)]=(0.751756306561-0.667690029209j)/(o+1.)+((0.131082943969-0.182689783658j))+((-0.397441503719+0.564139372106j))*0.5**o
            arg[(3,)]=(0.794016554138+0.288608205689j)*x[0]**o + ((-0.436318722114-0.370173995807j))*x[0] + ((-0.872808763669-0.643437382356j))*x[1]**o + ((-0.349678586223+0.546797792748j))*x[1]
            ref[(3,)]=(-0.872808763669-0.643437382356j)/(o+1.)+((-0.392998654169+0.0883118984703j))+((0.794016554138+0.288608205689j))*0.5**o
        else:
            arg[(0,)]=(-0.671698116066+0.8223339147j)*x[0]**o + ((-0.997962344193-0.777682941464j))*x[0] + ((-0.725324349198+0.193658508125j))*x[1]**o + ((0.378618666631-0.863853590426j))*x[1] + ((-0.280638528+0.757017254063j))*x[2]**o + ((0.738786512066-0.46371236037j))*x[2]
            ref[(0,)]=(-1.0059628772+0.950675762188j)/(o+1.)+((0.0597214172517-1.05262444613j))+((-0.671698116066+0.8223339147j))*0.5**o
            arg[(1,)]=(0.263516637659+0.213668567477j)*x[0]**o + ((-0.463253229261+0.692428429343j))*x[0] + ((0.928211401545-0.431931418617j))*x[1]**o + ((-0.830746784201-0.53538774777j))*x[1] + ((-0.633970290138-0.458869311743j))*x[2]**o + ((0.714828410427-0.189914321545j))*x[2]
            ref[(1,)]=(0.294241111407-0.89080073036j)/(o+1.)+((-0.289585801517-0.0164368199859j))+((0.263516637659+0.213668567477j))*0.5**o
            arg[(2,)]=(-0.966512144382-0.881649839788j)*x[0]**o + ((-0.535863240152-0.0392794383288j))*x[0] + ((0.779965091656-0.390638689912j))*x[1]**o + ((-0.709731749949+0.482090270114j))*x[1] + ((-0.869992338229-0.958057619294j))*x[2]**o + ((0.176043795888+0.895032705499j))*x[2]
            ref[(2,)]=(-0.0900272465733-1.34869630921j)/(o+1.)+((-0.534775597107+0.668921768642j))+((-0.966512144382-0.881649839788j))*0.5**o
            arg[(3,)]=(-0.652706319138-0.377956276662j)*x[0]**o + ((0.988353870448+0.714310093416j))*x[0] + ((0.912893465189+0.0257834496564j))*x[1]**o + ((-0.141960217421+0.86911712488j))*x[1] + ((0.93788579297-0.955657930631j))*x[2]**o + ((-0.725186058884+0.829395997103j))*x[2]
            ref[(3,)]=(1.85077925816-0.929874480975j)/(o+1.)+((0.0606037970718+1.2064116077j))+((-0.652706319138-0.377956276662j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4),w)
        ref=numpy.zeros((2, 4),numpy.complex_)
        if dim==2:
            arg[(0, 0)]=(-0.488327920651-0.879350461032j)*x[0]**o + ((-0.068069676896-0.411598976339j))*x[0] + ((0.792458788042+0.351258451553j))*x[1]**o + ((-0.245806600602+0.95510132416j))*x[1]
            ref[(0, 0)]=(0.792458788042+0.351258451553j)/(o+1.)+((-0.156938138749+0.271751173911j))+((-0.488327920651-0.879350461032j))*0.5**o
            arg[(0, 1)]=(0.807893930554-0.102384463069j)*x[0]**o + ((0.644601913488-0.223572004828j))*x[0] + ((0.735259855945-0.338302595009j))*x[1]**o + ((-0.0674433506647-0.0483082977904j))*x[1]
            ref[(0, 1)]=(0.735259855945-0.338302595009j)/(o+1.)+((0.288579281412-0.135940151309j))+((0.807893930554-0.102384463069j))*0.5**o
            arg[(0, 2)]=(0.14701039144+0.639534604436j)*x[0]**o + ((-0.140465469761-0.863047013563j))*x[0] + ((0.224840724574-0.314336371477j))*x[1]**o + ((-0.0785868817326+0.0214605720109j))*x[1]
            ref[(0, 2)]=(0.224840724574-0.314336371477j)/(o+1.)+((-0.109526175747-0.420793220776j))+((0.14701039144+0.639534604436j))*0.5**o
            arg[(0, 3)]=(-0.499453914451+0.869615276974j)*x[0]**o + ((-0.068323085125+0.648902817483j))*x[0] + ((0.981366009867-0.923647774178j))*x[1]**o + ((-0.590425367419+0.078880862069j))*x[1]
            ref[(0, 3)]=(0.981366009867-0.923647774178j)/(o+1.)+((-0.329374226272+0.363891839776j))+((-0.499453914451+0.869615276974j))*0.5**o
            arg[(1, 0)]=(-0.168060720905-0.630021523689j)*x[0]**o + ((0.017293841636+0.653278501657j))*x[0] + ((-0.82521551416-0.913397619201j))*x[1]**o + ((0.606812560094+0.753103708385j))*x[1]
            ref[(1, 0)]=(-0.82521551416-0.913397619201j)/(o+1.)+((0.312053200865+0.703191105021j))+((-0.168060720905-0.630021523689j))*0.5**o
            arg[(1, 1)]=(-0.319102148976-0.303656527038j)*x[0]**o + ((0.585898428138-0.381042497259j))*x[0] + ((0.794927623257-0.532125010525j))*x[1]**o + ((0.508078442578+0.364094126273j))*x[1]
            ref[(1, 1)]=(0.794927623257-0.532125010525j)/(o+1.)+((0.546988435358-0.00847418549304j))+((-0.319102148976-0.303656527038j))*0.5**o
            arg[(1, 2)]=(-0.206471181786-0.75175518909j)*x[0]**o + ((0.424356775177+0.419596842291j))*x[0] + ((-0.39623952108+0.182103115616j))*x[1]**o + ((-0.678679925867-0.620407227669j))*x[1]
            ref[(1, 2)]=(-0.39623952108+0.182103115616j)/(o+1.)+((-0.127161575345-0.100405192689j))+((-0.206471181786-0.75175518909j))*0.5**o
            arg[(1, 3)]=(0.684373940396+0.78243532016j)*x[0]**o + ((0.148901448772-0.16183614929j))*x[0] + ((0.224805909562-0.750629640604j))*x[1]**o + ((0.390203116159-0.230720524326j))*x[1]
            ref[(1, 3)]=(0.224805909562-0.750629640604j)/(o+1.)+((0.269552282466-0.196278336808j))+((0.684373940396+0.78243532016j))*0.5**o
        else:
            arg[(0, 0)]=(0.434935226822-0.73428088627j)*x[0]**o + ((0.70703501226+0.979526130068j))*x[0] + ((-0.608605691789+0.0644253258547j))*x[1]**o + ((0.99954154849-0.640898362446j))*x[1] + ((0.594089505093+0.896343905442j))*x[2]**o + ((0.118368900177+0.233207696031j))*x[2]
            ref[(0, 0)]=(-0.0145161866961+0.960769231296j)/(o+1.)+((0.912472730463+0.285917731826j))+((0.434935226822-0.73428088627j))*0.5**o
            arg[(0, 1)]=(0.413203725589+0.506190162549j)*x[0]**o + ((-0.120934217049+0.857791624171j))*x[0] + ((-0.954062674557-0.637475881136j))*x[1]**o + ((0.57878244022+0.956022827283j))*x[1] + ((-0.709602720177-0.1689683311j))*x[2]**o + ((-0.0666401600739+0.580871685716j))*x[2]
            ref[(0, 1)]=(-1.66366539473-0.806444212236j)/(o+1.)+((0.195604031549+1.19734306859j))+((0.413203725589+0.506190162549j))*0.5**o
            arg[(0, 2)]=(0.73947272594+0.234483218581j)*x[0]**o + ((-0.97151314698+0.81506174677j))*x[0] + ((0.808079908427-0.175029467426j))*x[1]**o + ((0.648914368436-0.801497170585j))*x[1] + ((0.785334460313-0.36935167866j))*x[2]**o + ((0.967489531098+0.483261566868j))*x[2]
            ref[(0, 2)]=(1.59341436874-0.544381146086j)/(o+1.)+((0.322445376277+0.248413071527j))+((0.73947272594+0.234483218581j))*0.5**o
            arg[(0, 3)]=(0.414828803631+0.823124247833j)*x[0]**o + ((0.838855769658+0.326337064076j))*x[0] + ((0.581885895896+0.323064418535j))*x[1]**o + ((-0.071945669731+0.528482790378j))*x[1] + ((-0.303623169904+0.389155586545j))*x[2]**o + ((-0.243812690563+0.901785029018j))*x[2]
            ref[(0, 3)]=(0.278262725991+0.71222000508j)/(o+1.)+((0.261548704682+0.878302441736j))+((0.414828803631+0.823124247833j))*0.5**o
            arg[(1, 0)]=(0.0248013975461+0.596510351839j)*x[0]**o + ((0.819888672787-0.117160156483j))*x[0] + ((-0.879595899714-0.698499160235j))*x[1]**o + ((0.431276635509+0.0087851574997j))*x[1] + ((-0.301971460943-0.630269836881j))*x[2]**o + ((-0.787880978109-0.871700310067j))*x[2]
            ref[(1, 0)]=(-1.18156736066-1.32876899712j)/(o+1.)+((0.231642165094-0.490037654525j))+((0.0248013975461+0.596510351839j))*0.5**o
            arg[(1, 1)]=(0.354010483139+0.751349831511j)*x[0]**o + ((-0.560220094177-0.725129093981j))*x[0] + ((-0.191087898279-0.0883804316607j))*x[1]**o + ((0.131463639758+0.648240353123j))*x[1] + ((-0.0958638581832+0.90135981406j))*x[2]**o + ((0.320766922762+0.435382609734j))*x[2]
            ref[(1, 1)]=(-0.286951756463+0.812979382399j)/(o+1.)+((-0.0539947658288+0.179246934438j))+((0.354010483139+0.751349831511j))*0.5**o
            arg[(1, 2)]=(-0.352731779715-0.109422036839j)*x[0]**o + ((-0.129646826028-0.318939387792j))*x[0] + ((-0.132943525329+0.492496715141j))*x[1]**o + ((0.307914992413+0.549440370221j))*x[1] + ((0.962424069362-0.5055868636j))*x[2]**o + ((-0.960216513674+0.830835314684j))*x[2]
            ref[(1, 2)]=(0.829480544033-0.0130901484591j)/(o+1.)+((-0.390974173645+0.530668148556j))+((-0.352731779715-0.109422036839j))*0.5**o
            arg[(1, 3)]=(-0.980877034911+0.870526401558j)*x[0]**o + ((-0.897832983938-0.338538788766j))*x[0] + ((0.479258523672-0.398488253253j))*x[1]**o + ((-0.150751562916+0.450861155658j))*x[1] + ((-0.364767582578-0.686277393615j))*x[2]**o + ((0.399588491408-0.847753492705j))*x[2]
            ref[(1, 3)]=(0.114490941094-1.08476564687j)/(o+1.)+((-0.324498027724-0.367715562906j))+((-0.980877034911+0.870526401558j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3),w)
        ref=numpy.zeros((2, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0)]=(-0.849988530234+0.306676206398j)*x[0]**o + ((0.296566347522+0.233154903567j))*x[0] + ((0.750701241249+0.82667986418j))*x[1]**o + ((0.42736793647+0.159079110991j))*x[1]
            ref[(0, 0, 0)]=(0.750701241249+0.82667986418j)/(o+1.)+((0.361967141996+0.196117007279j))+((-0.849988530234+0.306676206398j))*0.5**o
            arg[(0, 0, 1)]=(0.683354787123+0.203486408783j)*x[0]**o + ((0.694743345604+0.037513162329j))*x[0] + ((0.180809496849+0.188195715005j))*x[1]**o + ((0.351251432474+0.769005337023j))*x[1]
            ref[(0, 0, 1)]=(0.180809496849+0.188195715005j)/(o+1.)+((0.522997389039+0.403259249676j))+((0.683354787123+0.203486408783j))*0.5**o
            arg[(0, 0, 2)]=(-0.682149231456-0.185883022404j)*x[0]**o + ((0.589510896384-0.805647086513j))*x[0] + ((-0.41862453289+0.0784857702212j))*x[1]**o + ((0.213333354078-0.390339104122j))*x[1]
            ref[(0, 0, 2)]=(-0.41862453289+0.0784857702212j)/(o+1.)+((0.401422125231-0.597993095317j))+((-0.682149231456-0.185883022404j))*0.5**o
            arg[(0, 1, 0)]=(0.905939921104-0.730584263795j)*x[0]**o + ((0.561504682961-0.486104935491j))*x[0] + ((0.887505904695-0.212664330481j))*x[1]**o + ((-0.331915270654-0.816473310417j))*x[1]
            ref[(0, 1, 0)]=(0.887505904695-0.212664330481j)/(o+1.)+((0.114794706154-0.651289122954j))+((0.905939921104-0.730584263795j))*0.5**o
            arg[(0, 1, 1)]=(-0.638103595416+0.344586006849j)*x[0]**o + ((-0.421708138485+0.666599439645j))*x[0] + ((0.984712682445+0.803412775701j))*x[1]**o + ((-0.559742699811+0.728835604164j))*x[1]
            ref[(0, 1, 1)]=(0.984712682445+0.803412775701j)/(o+1.)+((-0.490725419148+0.697717521904j))+((-0.638103595416+0.344586006849j))*0.5**o
            arg[(0, 1, 2)]=(0.302801113285+0.849630597195j)*x[0]**o + ((0.130892042543-0.208951369692j))*x[0] + ((-0.192883363458+0.709630146366j))*x[1]**o + ((0.87655108625-0.695302078684j))*x[1]
            ref[(0, 1, 2)]=(-0.192883363458+0.709630146366j)/(o+1.)+((0.503721564397-0.452126724188j))+((0.302801113285+0.849630597195j))*0.5**o
            arg[(1, 0, 0)]=(-0.859919219916-0.656368299518j)*x[0]**o + ((-0.21899852221-0.271594737249j))*x[0] + ((-0.483751263664+0.132048221289j))*x[1]**o + ((-0.620723011191-0.126632305936j))*x[1]
            ref[(1, 0, 0)]=(-0.483751263664+0.132048221289j)/(o+1.)+((-0.419860766701-0.199113521592j))+((-0.859919219916-0.656368299518j))*0.5**o
            arg[(1, 0, 1)]=(-0.133684858111-0.501391006494j)*x[0]**o + ((0.772196351934+0.978323015256j))*x[0] + ((0.567461088601+0.626862678907j))*x[1]**o + ((-0.239397831211+0.286861688062j))*x[1]
            ref[(1, 0, 1)]=(0.567461088601+0.626862678907j)/(o+1.)+((0.266399260361+0.632592351659j))+((-0.133684858111-0.501391006494j))*0.5**o
            arg[(1, 0, 2)]=(0.189159746816-0.573497488725j)*x[0]**o + ((-0.864569132648-0.0872943787366j))*x[0] + ((-0.623592882843-0.736808251484j))*x[1]**o + ((0.607046289241-0.458143731047j))*x[1]
            ref[(1, 0, 2)]=(-0.623592882843-0.736808251484j)/(o+1.)+((-0.128761421703-0.272719054892j))+((0.189159746816-0.573497488725j))*0.5**o
            arg[(1, 1, 0)]=(0.0861007451471-0.0489024491863j)*x[0]**o + ((0.386713796168+0.228151120926j))*x[0] + ((-0.759668465126-0.743928307654j))*x[1]**o + ((-0.27516749405+0.152383285391j))*x[1]
            ref[(1, 1, 0)]=(-0.759668465126-0.743928307654j)/(o+1.)+((0.0557731510591+0.190267203159j))+((0.0861007451471-0.0489024491863j))*0.5**o
            arg[(1, 1, 1)]=(0.0841092629351+0.599144026386j)*x[0]**o + ((-0.109833346169+0.739040904706j))*x[0] + ((-0.490690285042-0.0410100559957j))*x[1]**o + ((-0.427924607485+0.964161753218j))*x[1]
            ref[(1, 1, 1)]=(-0.490690285042-0.0410100559957j)/(o+1.)+((-0.268878976827+0.851601328962j))+((0.0841092629351+0.599144026386j))*0.5**o
            arg[(1, 1, 2)]=(-0.492452474781+0.258793687992j)*x[0]**o + ((-0.165832480428-0.735689018843j))*x[0] + ((-0.940168967641+0.0367544285295j))*x[1]**o + ((-0.870126945772-0.110291470794j))*x[1]
            ref[(1, 1, 2)]=(-0.940168967641+0.0367544285295j)/(o+1.)+((-0.5179797131-0.422990244818j))+((-0.492452474781+0.258793687992j))*0.5**o
        else:
            arg[(0, 0, 0)]=(-0.786243149481+0.326038608951j)*x[0]**o + ((-0.608853557379+0.790094876878j))*x[0] + ((-0.733955835177+0.108374076246j))*x[1]**o + ((-0.684676099826+0.858504553931j))*x[1] + ((0.821447572062+0.397613532385j))*x[2]**o + ((0.432521938644-0.561641730379j))*x[2]
            ref[(0, 0, 0)]=(0.0874917368855+0.505987608631j)/(o+1.)+((-0.430503859281+0.543478850215j))+((-0.786243149481+0.326038608951j))*0.5**o
            arg[(0, 0, 1)]=(-0.944354997454-0.524493559612j)*x[0]**o + ((0.0999180460057-0.0739516021095j))*x[0] + ((-0.942125966728+0.858910072756j))*x[1]**o + ((-0.786663100646+0.993229255562j))*x[1] + ((0.734487948832+0.841493652511j))*x[2]**o + ((-0.0677171738276-0.897080155018j))*x[2]
            ref[(0, 0, 1)]=(-0.207638017897+1.70040372527j)/(o+1.)+((-0.377231114234+0.0110987492168j))+((-0.944354997454-0.524493559612j))*0.5**o
            arg[(0, 0, 2)]=(0.50440653113+0.711897397031j)*x[0]**o + ((-0.498453635101-0.408723648199j))*x[0] + ((0.229305160518+0.30669891884j))*x[1]**o + ((0.416155447771-0.416351289696j))*x[1] + ((-0.878348096671-0.347836623818j))*x[2]**o + ((-0.711964084976+0.0611539578559j))*x[2]
            ref[(0, 0, 2)]=(-0.649042936153-0.0411377049779j)/(o+1.)+((-0.397131136153-0.381960490019j))+((0.50440653113+0.711897397031j))*0.5**o
            arg[(0, 1, 0)]=(0.0999023229794+0.12464944791j)*x[0]**o + ((-0.644365310712+0.947116934709j))*x[0] + ((0.148048444995-0.191109026895j))*x[1]**o + ((-0.545323528598+0.179654028216j))*x[1] + ((0.799472027631-0.792297074134j))*x[2]**o + ((0.759094824241+0.811995223066j))*x[2]
            ref[(0, 1, 0)]=(0.947520472625-0.983406101029j)/(o+1.)+((-0.215297007535+0.969383092996j))+((0.0999023229794+0.12464944791j))*0.5**o
            arg[(0, 1, 1)]=(0.255558765438-0.492592404656j)*x[0]**o + ((-0.763562310009-0.505946384101j))*x[0] + ((-0.835309475879-0.153786443306j))*x[1]**o + ((0.587660030567+0.374154804846j))*x[1] + ((-0.385258470315+0.227859785643j))*x[2]**o + ((0.510273409774+0.309026135415j))*x[2]
            ref[(0, 1, 1)]=(-1.22056794619+0.0740733423371j)/(o+1.)+((0.167185565166+0.08861727808j))+((0.255558765438-0.492592404656j))*0.5**o
            arg[(0, 1, 2)]=(0.44399243048+0.524303872167j)*x[0]**o + ((-0.246868765285+0.376797770427j))*x[0] + ((-0.783484779582+0.000766577423257j))*x[1]**o + ((-0.774816825973+0.0705324981935j))*x[1] + ((0.419383671389-0.450335084869j))*x[2]**o + ((0.657105369133+0.112684881407j))*x[2]
            ref[(0, 1, 2)]=(-0.364101108193-0.449568507446j)/(o+1.)+((-0.182290111063+0.280007575014j))+((0.44399243048+0.524303872167j))*0.5**o
            arg[(1, 0, 0)]=(-0.823149613385+0.00767700643639j)*x[0]**o + ((-0.925415147413+0.400409262801j))*x[0] + ((-0.432134424938+0.900945355504j))*x[1]**o + ((-0.162300158234+0.983771193562j))*x[1] + ((-0.822580184563-0.536835502992j))*x[2]**o + ((-0.0620359830427+0.927201024413j))*x[2]
            ref[(1, 0, 0)]=(-1.2547146095+0.364109852512j)/(o+1.)+((-0.574875644345+1.15569074039j))+((-0.823149613385+0.00767700643639j))*0.5**o
            arg[(1, 0, 1)]=(0.139551575262-0.206776487089j)*x[0]**o + ((-0.427966395542+0.427750953864j))*x[0] + ((0.719492164819+0.971881235762j))*x[1]**o + ((0.802289945166-0.499150398027j))*x[1] + ((-0.548493923752+0.221237333432j))*x[2]**o + ((-0.0767682265444-0.974535784118j))*x[2]
            ref[(1, 0, 1)]=(0.170998241067+1.19311856919j)/(o+1.)+((0.14877766154-0.522967614141j))+((0.139551575262-0.206776487089j))*0.5**o
            arg[(1, 0, 2)]=(-0.512444360011-0.698960091137j)*x[0]**o + ((-0.691737193645+0.674859098205j))*x[0] + ((0.596823598101-0.467039909889j))*x[1]**o + ((-0.0636585323827-0.771459046126j))*x[1] + ((-0.904730228696-0.651500602702j))*x[2]**o + ((0.339436065271+0.18205068192j))*x[2]
            ref[(1, 0, 2)]=(-0.307906630595-1.11854051259j)/(o+1.)+((-0.207979830378+0.0427253669996j))+((-0.512444360011-0.698960091137j))*0.5**o
            arg[(1, 1, 0)]=(-0.473431314285+0.40575843941j)*x[0]**o + ((-0.742276166697+0.356855034218j))*x[0] + ((-0.0472262659092-0.650898894903j))*x[1]**o + ((-0.653384123888-0.859062592888j))*x[1] + ((-0.440595324169+0.219594105232j))*x[2]**o + ((0.639483109686-0.675860237819j))*x[2]
            ref[(1, 1, 0)]=(-0.487821590078-0.43130478967j)/(o+1.)+((-0.378088590449-0.589033898245j))+((-0.473431314285+0.40575843941j))*0.5**o
            arg[(1, 1, 1)]=(0.586515430511+0.686914465906j)*x[0]**o + ((-0.0301219234195+0.790082934929j))*x[0] + ((0.0961586133307+0.54628463778j))*x[1]**o + ((0.899430851583+0.641323346232j))*x[1] + ((-0.00854719088975-0.0871329501087j))*x[2]**o + ((-0.394847777717+0.865543299594j))*x[2]
            ref[(1, 1, 1)]=(0.0876114224409+0.459151687671j)/(o+1.)+((0.237230575223+1.14847479038j))+((0.586515430511+0.686914465906j))*0.5**o
            arg[(1, 1, 2)]=(-0.053217281991-0.376015964402j)*x[0]**o + ((-0.827226943501+0.360025637536j))*x[0] + ((0.592953903729+0.775480164412j))*x[1]**o + ((-0.292489221597+0.141493764415j))*x[1] + ((-0.480434153597-0.467088604831j))*x[2]**o + ((-0.451039116371-0.500428379828j))*x[2]
            ref[(1, 1, 2)]=(0.112519750132+0.308391559581j)/(o+1.)+((-0.785377640734+0.00054551106131j))+((-0.053217281991-0.376015964402j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrateC_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2, 3),w)
        ref=numpy.zeros((2, 3, 2, 3),numpy.complex_)
        if dim==2:
            arg[(0, 0, 0, 0)]=(0.968453130646+0.604734344961j)*x[0]**o + ((-0.550492447359-0.151168182903j))*x[0] + ((0.347900200313-0.45864087233j))*x[1]**o + ((0.470452798962-0.139226010596j))*x[1]
            ref[(0, 0, 0, 0)]=(0.347900200313-0.45864087233j)/(o+1.)+((-0.0400198241985-0.14519709675j))+((0.968453130646+0.604734344961j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.754541395418+0.397843482906j)*x[0]**o + ((0.474767739141-0.478844797039j))*x[0] + ((0.0934337212259-0.456101187369j))*x[1]**o + ((-0.34263458797+0.329486428902j))*x[1]
            ref[(0, 0, 0, 1)]=(0.0934337212259-0.456101187369j)/(o+1.)+((0.0660665755855-0.0746791840684j))+((-0.754541395418+0.397843482906j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.552336394503-0.768533264993j)*x[0]**o + ((-0.0943153439813-0.676928489652j))*x[0] + ((0.902770127742-0.0724223310566j))*x[1]**o + ((-0.0539382346239-0.619275127334j))*x[1]
            ref[(0, 0, 0, 2)]=(0.902770127742-0.0724223310566j)/(o+1.)+((-0.0741267893026-0.648101808493j))+((-0.552336394503-0.768533264993j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.550685428589-0.395411595395j)*x[0]**o + ((0.845205853812+0.938905682617j))*x[0] + ((-0.0769325754313-0.466232247145j))*x[1]**o + ((0.191290402457+0.481037646815j))*x[1]
            ref[(0, 0, 1, 0)]=(-0.0769325754313-0.466232247145j)/(o+1.)+((0.518248128135+0.709971664716j))+((0.550685428589-0.395411595395j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.40996895778+0.019958867669j)*x[0]**o + ((-0.990902112598-0.0848803117754j))*x[0] + ((-0.926113811331-0.0967507845434j))*x[1]**o + ((-0.00366298180717+0.412864400459j))*x[1]
            ref[(0, 0, 1, 1)]=(-0.926113811331-0.0967507845434j)/(o+1.)+((-0.497282547203+0.163992044342j))+((-0.40996895778+0.019958867669j))*0.5**o
            arg[(0, 0, 1, 2)]=(-0.632132094693-0.152084843836j)*x[0]**o + ((-0.9773753868+0.691644863008j))*x[0] + ((-0.81771302935+0.932616305111j))*x[1]**o + ((-0.399050081444+0.688213382742j))*x[1]
            ref[(0, 0, 1, 2)]=(-0.81771302935+0.932616305111j)/(o+1.)+((-0.688212734122+0.689929122875j))+((-0.632132094693-0.152084843836j))*0.5**o
            arg[(0, 1, 0, 0)]=(-0.566042120254+0.0692422944629j)*x[0]**o + ((0.743490565736-0.402755541669j))*x[0] + ((-0.164355992035-0.744996540458j))*x[1]**o + ((0.00185143761548+0.237158534914j))*x[1]
            ref[(0, 1, 0, 0)]=(-0.164355992035-0.744996540458j)/(o+1.)+((0.372671001676-0.0827985033774j))+((-0.566042120254+0.0692422944629j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.119935784226-0.0184814452383j)*x[0]**o + ((-0.287661451421-0.306373984999j))*x[0] + ((-0.0557965127615-0.244400114937j))*x[1]**o + ((0.121473178081-0.438581321415j))*x[1]
            ref[(0, 1, 0, 1)]=(-0.0557965127615-0.244400114937j)/(o+1.)+((-0.0830941366697-0.372477653207j))+((-0.119935784226-0.0184814452383j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.949068597333+0.674934541304j)*x[0]**o + ((0.129492782243-0.728222277929j))*x[0] + ((0.206186873276-0.169844130732j))*x[1]**o + ((-0.540527426205+0.866119600487j))*x[1]
            ref[(0, 1, 0, 2)]=(0.206186873276-0.169844130732j)/(o+1.)+((-0.205517321981+0.0689486612786j))+((-0.949068597333+0.674934541304j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.408741505107-0.251536298783j)*x[0]**o + ((0.839815698126+0.269798845543j))*x[0] + ((0.0515852180449-0.891222206251j))*x[1]**o + ((0.170342363766-0.817761276211j))*x[1]
            ref[(0, 1, 1, 0)]=(0.0515852180449-0.891222206251j)/(o+1.)+((0.505079030946-0.273981215334j))+((0.408741505107-0.251536298783j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.825845937964+0.506046385862j)*x[0]**o + ((-0.0842029005025+0.702337209094j))*x[0] + ((-0.0244591122539+0.342559543828j))*x[1]**o + ((-0.937296021673-0.2955774443j))*x[1]
            ref[(0, 1, 1, 1)]=(-0.0244591122539+0.342559543828j)/(o+1.)+((-0.510749461088+0.203379882397j))+((-0.825845937964+0.506046385862j))*0.5**o
            arg[(0, 1, 1, 2)]=(-0.309810789347+0.655981935829j)*x[0]**o + ((0.580952023129-0.67259123171j))*x[0] + ((-0.967742273044-0.868829541386j))*x[1]**o + ((-0.195478109761+0.45212300112j))*x[1]
            ref[(0, 1, 1, 2)]=(-0.967742273044-0.868829541386j)/(o+1.)+((0.192736956684-0.110234115295j))+((-0.309810789347+0.655981935829j))*0.5**o
            arg[(0, 2, 0, 0)]=(-0.514703754107+0.229539143937j)*x[0]**o + ((0.744615725239-0.609586335433j))*x[0] + ((0.671571859316-0.327002557868j))*x[1]**o + ((0.132645753748+0.903400436924j))*x[1]
            ref[(0, 2, 0, 0)]=(0.671571859316-0.327002557868j)/(o+1.)+((0.438630739494+0.146907050745j))+((-0.514703754107+0.229539143937j))*0.5**o
            arg[(0, 2, 0, 1)]=(-0.525351384906-0.00497412470477j)*x[0]**o + ((-0.142234284558+0.481611407679j))*x[0] + ((0.516651306313-0.239181905243j))*x[1]**o + ((-0.805404949982+0.925670383119j))*x[1]
            ref[(0, 2, 0, 1)]=(0.516651306313-0.239181905243j)/(o+1.)+((-0.47381961727+0.703640895399j))+((-0.525351384906-0.00497412470477j))*0.5**o
            arg[(0, 2, 0, 2)]=(-0.321853873837-0.238192766058j)*x[0]**o + ((-0.486234066775-0.453613549901j))*x[0] + ((0.600781142831+0.784556394557j))*x[1]**o + ((0.734590103983-0.296723751147j))*x[1]
            ref[(0, 2, 0, 2)]=(0.600781142831+0.784556394557j)/(o+1.)+((0.124178018604-0.375168650524j))+((-0.321853873837-0.238192766058j))*0.5**o
            arg[(0, 2, 1, 0)]=(-0.101306729086+0.667118567338j)*x[0]**o + ((-0.893626219662-0.129218958838j))*x[0] + ((-0.431762661727+0.407286090188j))*x[1]**o + ((0.914442749868-0.0977397885756j))*x[1]
            ref[(0, 2, 1, 0)]=(-0.431762661727+0.407286090188j)/(o+1.)+((0.0104082651031-0.113479373707j))+((-0.101306729086+0.667118567338j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.764126376881-0.636366387572j)*x[0]**o + ((-0.378899660815+0.913987035865j))*x[0] + ((0.528494618603+0.834443733539j))*x[1]**o + ((-0.609360281972+0.301925005472j))*x[1]
            ref[(0, 2, 1, 1)]=(0.528494618603+0.834443733539j)/(o+1.)+((-0.494129971393+0.607956020669j))+((-0.764126376881-0.636366387572j))*0.5**o
            arg[(0, 2, 1, 2)]=(0.0490541862195-0.632479878154j)*x[0]**o + ((0.00925071290163+0.650992609519j))*x[0] + ((-0.780734630102-0.267848027745j))*x[1]**o + ((-0.849646663348-0.0760684812864j))*x[1]
            ref[(0, 2, 1, 2)]=(-0.780734630102-0.267848027745j)/(o+1.)+((-0.420197975223+0.287462064116j))+((0.0490541862195-0.632479878154j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.0351692439323+0.461297325329j)*x[0]**o + ((-0.781134877467+0.0198521873866j))*x[0] + ((0.129385931332+0.562256252881j))*x[1]**o + ((-0.352565650782-0.35155578907j))*x[1]
            ref[(1, 0, 0, 0)]=(0.129385931332+0.562256252881j)/(o+1.)+((-0.566850264125-0.165851800842j))+((0.0351692439323+0.461297325329j))*0.5**o
            arg[(1, 0, 0, 1)]=(-0.400073989083-0.70925462354j)*x[0]**o + ((-0.371435694596+0.740226634259j))*x[0] + ((-0.921452158964-0.843650052826j))*x[1]**o + ((-0.952986910894-0.708001901824j))*x[1]
            ref[(1, 0, 0, 1)]=(-0.921452158964-0.843650052826j)/(o+1.)+((-0.662211302745+0.0161123662176j))+((-0.400073989083-0.70925462354j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.0734694887338+0.612504710035j)*x[0]**o + ((-0.740057374772-0.830054134807j))*x[0] + ((-0.453614418694+0.576957775106j))*x[1]**o + ((-0.554348630855-0.47882277235j))*x[1]
            ref[(1, 0, 0, 2)]=(-0.453614418694+0.576957775106j)/(o+1.)+((-0.647203002813-0.654438453578j))+((-0.0734694887338+0.612504710035j))*0.5**o
            arg[(1, 0, 1, 0)]=(-0.868169547477-0.767563322729j)*x[0]**o + ((-0.863146999817+0.439648552568j))*x[0] + ((-0.394444885689+0.344676151889j))*x[1]**o + ((0.108271851398+0.0567091270023j))*x[1]
            ref[(1, 0, 1, 0)]=(-0.394444885689+0.344676151889j)/(o+1.)+((-0.377437574209+0.248178839785j))+((-0.868169547477-0.767563322729j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.87270208213-0.243350541777j)*x[0]**o + ((-0.759558842954+0.169790934099j))*x[0] + ((0.852926816145+0.22980426132j))*x[1]**o + ((0.601520389874-0.243895017088j))*x[1]
            ref[(1, 0, 1, 1)]=(0.852926816145+0.22980426132j)/(o+1.)+((-0.0790192265401-0.0370520414942j))+((-0.87270208213-0.243350541777j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.0148876349379+0.2995343956j)*x[0]**o + ((-0.439579862006-0.867859954987j))*x[0] + ((0.095495171696+0.14788256467j))*x[1]**o + ((-0.622481568161+0.430794996913j))*x[1]
            ref[(1, 0, 1, 2)]=(0.095495171696+0.14788256467j)/(o+1.)+((-0.531030715083-0.218532479037j))+((0.0148876349379+0.2995343956j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.0607769285593-0.82950550154j)*x[0]**o + ((-0.689687627688+0.71231948016j))*x[0] + ((-0.800471024703-0.227327484378j))*x[1]**o + ((-0.172081403822+0.137792879367j))*x[1]
            ref[(1, 1, 0, 0)]=(-0.800471024703-0.227327484378j)/(o+1.)+((-0.430884515755+0.425056179763j))+((-0.0607769285593-0.82950550154j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.617087426381+0.822053160061j)*x[0]**o + ((0.0532675711788-0.520437552448j))*x[0] + ((-0.721914943326-0.206012979772j))*x[1]**o + ((-0.484978075535+0.0319053952635j))*x[1]
            ref[(1, 1, 0, 1)]=(-0.721914943326-0.206012979772j)/(o+1.)+((-0.215855252178-0.244266078592j))+((0.617087426381+0.822053160061j))*0.5**o
            arg[(1, 1, 0, 2)]=(-0.62795237554-0.25660856323j)*x[0]**o + ((-0.486074445344+0.19609348086j))*x[0] + ((0.36529772146-0.896817372964j))*x[1]**o + ((0.997421778987-0.434676536352j))*x[1]
            ref[(1, 1, 0, 2)]=(0.36529772146-0.896817372964j)/(o+1.)+((0.255673666822-0.119291527746j))+((-0.62795237554-0.25660856323j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.199818928193+0.933212442632j)*x[0]**o + ((-0.203647712513-0.215497361325j))*x[0] + ((0.291177475581+0.153228360232j))*x[1]**o + ((-0.00455530623579-0.0297355078512j))*x[1]
            ref[(1, 1, 1, 0)]=(0.291177475581+0.153228360232j)/(o+1.)+((-0.104101509374-0.122616434588j))+((0.199818928193+0.933212442632j))*0.5**o
            arg[(1, 1, 1, 1)]=(0.649780484492+0.787231473131j)*x[0]**o + ((-0.674927984172+0.103529686967j))*x[0] + ((-0.804682353202-0.984639837628j))*x[1]**o + ((0.18923017353+0.0019819671873j))*x[1]
            ref[(1, 1, 1, 1)]=(-0.804682353202-0.984639837628j)/(o+1.)+((-0.242848905321+0.0527558270772j))+((0.649780484492+0.787231473131j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.236302026375-0.946105980923j)*x[0]**o + ((-0.144794694237-0.81451116669j))*x[0] + ((-0.752995135138+0.927394602324j))*x[1]**o + ((0.879995564206-0.635902029068j))*x[1]
            ref[(1, 1, 1, 2)]=(-0.752995135138+0.927394602324j)/(o+1.)+((0.367600434985-0.725206597879j))+((-0.236302026375-0.946105980923j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.0792153577397+0.935525924828j)*x[0]**o + ((-0.269645728675+0.611523029677j))*x[0] + ((-0.100107083949+0.420346658733j))*x[1]**o + ((0.561149084442+0.720245999372j))*x[1]
            ref[(1, 2, 0, 0)]=(-0.100107083949+0.420346658733j)/(o+1.)+((0.145751677884+0.665884514525j))+((-0.0792153577397+0.935525924828j))*0.5**o
            arg[(1, 2, 0, 1)]=(0.213409957022+0.750677798114j)*x[0]**o + ((-0.792884856015+0.896160127528j))*x[0] + ((0.814875367825-0.295448456523j))*x[1]**o + ((0.687683914711+0.867471398416j))*x[1]
            ref[(1, 2, 0, 1)]=(0.814875367825-0.295448456523j)/(o+1.)+((-0.0526004706521+0.881815762972j))+((0.213409957022+0.750677798114j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.922578485017-0.21159551664j)*x[0]**o + ((-0.174142495155-0.890325478319j))*x[0] + ((-0.432388749421-0.272145947894j))*x[1]**o + ((0.224158840247-0.839022805762j))*x[1]
            ref[(1, 2, 0, 2)]=(-0.432388749421-0.272145947894j)/(o+1.)+((0.025008172546-0.864674142041j))+((0.922578485017-0.21159551664j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.574885521416-0.948274920492j)*x[0]**o + ((0.703070353221-0.876929070704j))*x[0] + ((-0.0085333320367+0.364850575625j))*x[1]**o + ((-0.14279447694+0.0459924656168j))*x[1]
            ref[(1, 2, 1, 0)]=(-0.0085333320367+0.364850575625j)/(o+1.)+((0.28013793814-0.415468302543j))+((-0.574885521416-0.948274920492j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.874483006684+0.75708006395j)*x[0]**o + ((0.404324680204+0.998456281403j))*x[0] + ((-0.406507186635+0.472134188767j))*x[1]**o + ((0.895505801502-0.279010821752j))*x[1]
            ref[(1, 2, 1, 1)]=(-0.406507186635+0.472134188767j)/(o+1.)+((0.649915240853+0.359722729825j))+((-0.874483006684+0.75708006395j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.0446668831768-0.879981894803j)*x[0]**o + ((-0.423155734171-0.710961092623j))*x[0] + ((-0.127313910492+0.930200432753j))*x[1]**o + ((-0.612988648892-0.0832153326692j))*x[1]
            ref[(1, 2, 1, 2)]=(-0.127313910492+0.930200432753j)/(o+1.)+((-0.518072191532-0.397088212646j))+((-0.0446668831768-0.879981894803j))*0.5**o
        else:
            arg[(0, 0, 0, 0)]=(0.709246699765+0.88494858694j)*x[0]**o + ((0.432602866992+0.770727075204j))*x[0] + ((0.771115642699+0.505709359016j))*x[1]**o + ((0.128576925839+0.880260118582j))*x[1] + ((-0.969875398516+0.403346936628j))*x[2]**o + ((-0.932003656221-0.134171947651j))*x[2]
            ref[(0, 0, 0, 0)]=(-0.198759755817+0.909056295644j)/(o+1.)+((-0.185411931695+0.758407623068j))+((0.709246699765+0.88494858694j))*0.5**o
            arg[(0, 0, 0, 1)]=(-0.706930505184+0.736605149887j)*x[0]**o + ((0.0870839628297-0.783900141106j))*x[0] + ((-0.545625080077+0.193236643115j))*x[1]**o + ((-0.707218452549-0.775328278092j))*x[1] + ((0.861797428538-0.426941892582j))*x[2]**o + ((-0.62410892492+0.556893460984j))*x[2]
            ref[(0, 0, 0, 1)]=(0.316172348462-0.233705249467j)/(o+1.)+((-0.62212170732-0.501167479107j))+((-0.706930505184+0.736605149887j))*0.5**o
            arg[(0, 0, 0, 2)]=(-0.161997237086+0.566812979747j)*x[0]**o + ((0.942286883878+0.625826557625j))*x[0] + ((-0.599241525071+0.604947399331j))*x[1]**o + ((-0.217631102009-0.917668445709j))*x[1] + ((0.356347034944-0.623677787345j))*x[2]**o + ((0.688779279078-0.287454014132j))*x[2]
            ref[(0, 0, 0, 2)]=(-0.242894490127-0.0187303880144j)/(o+1.)+((0.706717530473-0.289647951108j))+((-0.161997237086+0.566812979747j))*0.5**o
            arg[(0, 0, 1, 0)]=(0.455296323503-0.984229981663j)*x[0]**o + ((0.676980587882+0.596403119503j))*x[0] + ((0.953797570139-0.514346364512j))*x[1]**o + ((0.765407626726-0.261795673934j))*x[1] + ((-0.237151251559+0.716325483862j))*x[2]**o + ((0.0246480408726-0.0413544379972j))*x[2]
            ref[(0, 0, 1, 0)]=(0.71664631858+0.201979119349j)/(o+1.)+((0.73351812774+0.146626503786j))+((0.455296323503-0.984229981663j))*0.5**o
            arg[(0, 0, 1, 1)]=(-0.112179469808-0.666361684566j)*x[0]**o + ((-0.771338412831-0.975374382087j))*x[0] + ((-0.0436884001935+0.067646689474j))*x[1]**o + ((-0.0202844403972+0.804077900339j))*x[1] + ((-0.702148936448-0.527801413108j))*x[2]**o + ((-0.730602591078+0.750195726333j))*x[2]
            ref[(0, 0, 1, 1)]=(-0.745837336641-0.460154723634j)/(o+1.)+((-0.761112722153+0.289449622292j))+((-0.112179469808-0.666361684566j))*0.5**o
            arg[(0, 0, 1, 2)]=(0.486619704364+0.441733793509j)*x[0]**o + ((0.424730627653+0.507807944099j))*x[0] + ((0.179743563504-0.689712047849j))*x[1]**o + ((0.0865939079481+0.130220119412j))*x[1] + ((-0.0857396851754-0.0110418881871j))*x[2]**o + ((0.194927714466-0.0258532253976j))*x[2]
            ref[(0, 0, 1, 2)]=(0.0940038783288-0.700753936036j)/(o+1.)+((0.353126125034+0.306087419056j))+((0.486619704364+0.441733793509j))*0.5**o
            arg[(0, 1, 0, 0)]=(0.863927756677-0.24830465153j)*x[0]**o + ((0.0146593000501-0.0752504014068j))*x[0] + ((0.937374532558-0.806316434842j))*x[1]**o + ((-0.0204249388993-0.121693831762j))*x[1] + ((0.407890624094-0.879598226012j))*x[2]**o + ((0.60958129878-0.528834813638j))*x[2]
            ref[(0, 1, 0, 0)]=(1.34526515665-1.68591466085j)/(o+1.)+((0.301907829966-0.362889523403j))+((0.863927756677-0.24830465153j))*0.5**o
            arg[(0, 1, 0, 1)]=(-0.00255723680266-0.835715155763j)*x[0]**o + ((0.952246024323-0.203048784337j))*x[0] + ((-0.0840257394425+0.179536342764j))*x[1]**o + ((0.154236949181+0.310467475414j))*x[1] + ((-0.470529288491-0.408213679706j))*x[2]**o + ((0.556974508486-0.0355615237642j))*x[2]
            ref[(0, 1, 0, 1)]=(-0.554555027933-0.228677336942j)/(o+1.)+((0.831728740995+0.0359285836565j))+((-0.00255723680266-0.835715155763j))*0.5**o
            arg[(0, 1, 0, 2)]=(-0.888398709218+0.614626736084j)*x[0]**o + ((-0.842549783904-0.958012802676j))*x[0] + ((0.400913285726+0.345516444081j))*x[1]**o + ((0.595378998216-0.156690216538j))*x[1] + ((0.479153402692+0.737246466647j))*x[2]**o + ((-0.118688526662+0.468435149515j))*x[2]
            ref[(0, 1, 0, 2)]=(0.880066688418+1.08276291073j)/(o+1.)+((-0.182929656175-0.323133934849j))+((-0.888398709218+0.614626736084j))*0.5**o
            arg[(0, 1, 1, 0)]=(0.135197585126+0.306757777918j)*x[0]**o + ((0.433510364973+0.940821019498j))*x[0] + ((0.904568791425+0.527579384381j))*x[1]**o + ((0.325184393628-0.227976508395j))*x[1] + ((-0.487161223093+0.257583485198j))*x[2]**o + ((-0.766280214206-0.554773020968j))*x[2]
            ref[(0, 1, 1, 0)]=(0.417407568332+0.785162869579j)/(o+1.)+((-0.00379272780253+0.0790357450676j))+((0.135197585126+0.306757777918j))*0.5**o
            arg[(0, 1, 1, 1)]=(-0.921993874589+0.965437075291j)*x[0]**o + ((-0.826081256145-0.768116981614j))*x[0] + ((0.675831847879+0.0444850945829j))*x[1]**o + ((-0.614900700368+0.298810719486j))*x[1] + ((0.26549887338+0.845348929381j))*x[2]**o + ((0.482383845892+0.344882044791j))*x[2]
            ref[(0, 1, 1, 1)]=(0.941330721259+0.889834023964j)/(o+1.)+((-0.479299055311-0.0622121086684j))+((-0.921993874589+0.965437075291j))*0.5**o
            arg[(0, 1, 1, 2)]=(0.901810005896-0.00156179997367j)*x[0]**o + ((-0.0982013151561-0.65757651081j))*x[0] + ((-0.425050193917-0.824424461375j))*x[1]**o + ((-0.116553519057-0.995900537278j))*x[1] + ((-0.43047634459+0.349396193921j))*x[2]**o + ((-0.26614918255-0.478614299476j))*x[2]
            ref[(0, 1, 1, 2)]=(-0.855526538506-0.475028267454j)/(o+1.)+((-0.240452008382-1.06604567378j))+((0.901810005896-0.00156179997367j))*0.5**o
            arg[(0, 2, 0, 0)]=(0.497033504678-0.484551495895j)*x[0]**o + ((0.251007268534+0.0910839484978j))*x[0] + ((0.194025012171-0.617253083772j))*x[1]**o + ((0.212127175504+0.840038921277j))*x[1] + ((-0.914471258863-0.979440551515j))*x[2]**o + ((-0.641564113606+0.63674660613j))*x[2]
            ref[(0, 2, 0, 0)]=(-0.720446246692-1.59669363529j)/(o+1.)+((-0.0892148347841+0.783934737952j))+((0.497033504678-0.484551495895j))*0.5**o
            arg[(0, 2, 0, 1)]=(0.999981771594+0.45687866728j)*x[0]**o + ((0.0379951630453-0.11642781686j))*x[0] + ((-0.933874790428-0.140486911879j))*x[1]**o + ((-0.713451591263-0.853130250631j))*x[1] + ((0.620526299804-0.78980947055j))*x[2]**o + ((-0.196562530286+0.589006355695j))*x[2]
            ref[(0, 2, 0, 1)]=(-0.313348490624-0.930296382428j)/(o+1.)+((-0.436009479252-0.190275855898j))+((0.999981771594+0.45687866728j))*0.5**o
            arg[(0, 2, 0, 2)]=(0.58556481362-0.502027594554j)*x[0]**o + ((-0.794979838482-0.117133143082j))*x[0] + ((0.527745668474-0.118273008559j))*x[1]**o + ((-0.213084653663-0.865744780604j))*x[1] + ((-0.624668090467+0.87832220927j))*x[2]**o + ((0.430352790499+0.84123832244j))*x[2]
            ref[(0, 2, 0, 2)]=(-0.0969224219934+0.760049200711j)/(o+1.)+((-0.288855850823-0.0708198006233j))+((0.58556481362-0.502027594554j))*0.5**o
            arg[(0, 2, 1, 0)]=(0.858294600618-0.178360859978j)*x[0]**o + ((-0.806101794019+0.045970969277j))*x[0] + ((-0.921903111817+0.796432529909j))*x[1]**o + ((0.326179006902+0.782395842847j))*x[1] + ((0.603196081167-0.522768586286j))*x[2]**o + ((0.879343560335+0.560615469281j))*x[2]
            ref[(0, 2, 1, 0)]=(-0.31870703065+0.273663943623j)/(o+1.)+((0.199710386609+0.694491140702j))+((0.858294600618-0.178360859978j))*0.5**o
            arg[(0, 2, 1, 1)]=(-0.411624061359+0.243712441436j)*x[0]**o + ((-0.723458211499-0.885055897788j))*x[0] + ((-0.311250197985+0.623128300662j))*x[1]**o + ((-0.966534162543+0.603966828819j))*x[1] + ((-0.345427763738+0.450101637962j))*x[2]**o + ((-0.267986841272-0.6261680037j))*x[2]
            ref[(0, 2, 1, 1)]=(-0.656677961723+1.07322993862j)/(o+1.)+((-0.978989607657-0.453628536334j))+((-0.411624061359+0.243712441436j))*0.5**o
            arg[(0, 2, 1, 2)]=(-0.510886342446-0.0995262269436j)*x[0]**o + ((-0.542295521022+0.421605366105j))*x[0] + ((-0.333143419086+0.0742419866141j))*x[1]**o + ((-0.102243575079-0.736351147219j))*x[1] + ((0.278417735509-0.103043552076j))*x[2]**o + ((0.280252547751+0.902366704042j))*x[2]
            ref[(0, 2, 1, 2)]=(-0.0547256835775-0.0288015654618j)/(o+1.)+((-0.182143274175+0.293810461464j))+((-0.510886342446-0.0995262269436j))*0.5**o
            arg[(1, 0, 0, 0)]=(0.791481468818+0.0452062092251j)*x[0]**o + ((0.626949409766-0.31784782487j))*x[0] + ((-0.41416566872+0.369397127667j))*x[1]**o + ((0.257580385869+0.741797814069j))*x[1] + ((-0.394179366289-0.937542700822j))*x[2]**o + ((-0.502267432969+0.85575287961j))*x[2]
            ref[(1, 0, 0, 0)]=(-0.808345035009-0.568145573154j)/(o+1.)+((0.191131181333+0.639851434405j))+((0.791481468818+0.0452062092251j))*0.5**o
            arg[(1, 0, 0, 1)]=(0.204284849561+0.343343620545j)*x[0]**o + ((-0.286189338942+0.551192844993j))*x[0] + ((0.951342800447+0.0364835726111j))*x[1]**o + ((0.0872274321121-0.691182103179j))*x[1] + ((0.942130634262-0.746872526984j))*x[2]**o + ((-0.744243229562+0.306077359178j))*x[2]
            ref[(1, 0, 0, 1)]=(1.89347343471-0.710388954373j)/(o+1.)+((-0.471602568196+0.0830440504963j))+((0.204284849561+0.343343620545j))*0.5**o
            arg[(1, 0, 0, 2)]=(-0.155357158508+0.0922167094915j)*x[0]**o + ((-0.816986556185+0.14532876048j))*x[0] + ((0.758074763961+0.854668472312j))*x[1]**o + ((-0.17873202067+0.665294219578j))*x[1] + ((-0.580676028287+0.694936827005j))*x[2]**o + ((0.373106780941+0.680593786573j))*x[2]
            ref[(1, 0, 0, 2)]=(0.177398735673+1.54960529932j)/(o+1.)+((-0.311305897957+0.745608383315j))+((-0.155357158508+0.0922167094915j))*0.5**o
            arg[(1, 0, 1, 0)]=(0.521996382897-0.883247122984j)*x[0]**o + ((-0.193698116922+0.661704670467j))*x[0] + ((-0.59676245616-0.851146524604j))*x[1]**o + ((-0.0697543983772-0.5632642229j))*x[1] + ((0.165424177862-0.16393340198j))*x[2]**o + ((-0.272413724614+0.876724740815j))*x[2]
            ref[(1, 0, 1, 0)]=(-0.431338278298-1.01507992658j)/(o+1.)+((-0.267933119956+0.487582594191j))+((0.521996382897-0.883247122984j))*0.5**o
            arg[(1, 0, 1, 1)]=(-0.597022168571+0.124090293547j)*x[0]**o + ((0.434141430349+0.342327685882j))*x[0] + ((-0.382245655577+0.0344617102791j))*x[1]**o + ((0.687504096751+0.96064355261j))*x[1] + ((0.564797889027+0.412114819355j))*x[2]**o + ((-0.349887871594-0.577884839472j))*x[2]
            ref[(1, 0, 1, 1)]=(0.18255223345+0.446576529634j)/(o+1.)+((0.385878827753+0.36254319951j))+((-0.597022168571+0.124090293547j))*0.5**o
            arg[(1, 0, 1, 2)]=(0.614607681499+0.317349049542j)*x[0]**o + ((-0.183956362336+0.685804552557j))*x[0] + ((0.886506384879-0.391811841897j))*x[1]**o + ((0.855257206568+0.142594835601j))*x[1] + ((-0.211141438512+0.500264804559j))*x[2]**o + ((0.0807527615271+0.639639638233j))*x[2]
            ref[(1, 0, 1, 2)]=(0.675364946367+0.108452962662j)/(o+1.)+((0.37602680288+0.734019513195j))+((0.614607681499+0.317349049542j))*0.5**o
            arg[(1, 1, 0, 0)]=(-0.634358153902+0.864236618524j)*x[0]**o + ((-0.578556299808-0.738997490271j))*x[0] + ((-0.068919190406-0.107573825096j))*x[1]**o + ((0.779749694972-0.631194605213j))*x[1] + ((-0.0978308538847+0.135488138817j))*x[2]**o + ((-0.499057912705+0.763617980003j))*x[2]
            ref[(1, 1, 0, 0)]=(-0.166750044291+0.0279143137211j)/(o+1.)+((-0.148932258771-0.30328705774j))+((-0.634358153902+0.864236618524j))*0.5**o
            arg[(1, 1, 0, 1)]=(0.87512720065+0.436336743538j)*x[0]**o + ((0.397012583667-0.381615254851j))*x[0] + ((-0.659793263109-0.423717629127j))*x[1]**o + ((0.259749484078+0.523047922962j))*x[1] + ((-0.138552348593-0.803076123892j))*x[2]**o + ((-0.337839206484-0.774031817302j))*x[2]
            ref[(1, 1, 0, 1)]=(-0.798345611702-1.22679375302j)/(o+1.)+((0.159461430631-0.316299574595j))+((0.87512720065+0.436336743538j))*0.5**o
            arg[(1, 1, 0, 2)]=(0.49076973805+0.0923555618369j)*x[0]**o + ((0.0778173103413-0.567189731222j))*x[0] + ((0.649448691949+0.939657665233j))*x[1]**o + ((-0.430699580217+0.412081407637j))*x[1] + ((-0.964613884369-0.358955007411j))*x[2]**o + ((0.603984378197+0.74166558303j))*x[2]
            ref[(1, 1, 0, 2)]=(-0.31516519242+0.580702657822j)/(o+1.)+((0.125551054161+0.293278629722j))+((0.49076973805+0.0923555618369j))*0.5**o
            arg[(1, 1, 1, 0)]=(0.176146050915-0.802148592909j)*x[0]**o + ((-0.0968009787381-0.456267702289j))*x[0] + ((0.0234586651169+0.376356014253j))*x[1]**o + ((-0.324631238014-0.548354190526j))*x[1] + ((-0.128779642897+0.664508734221j))*x[2]**o + ((0.146311989344+0.255567419936j))*x[2]
            ref[(1, 1, 1, 0)]=(-0.10532097778+1.04086474847j)/(o+1.)+((-0.137560113704-0.374527236439j))+((0.176146050915-0.802148592909j))*0.5**o
            arg[(1, 1, 1, 1)]=(-0.819302095041-0.736155531851j)*x[0]**o + ((0.229071623463-0.352860266181j))*x[0] + ((-0.924810226416+0.0466399643318j))*x[1]**o + ((-0.59764080568+0.572763823777j))*x[1] + ((0.553790480014+0.247748748411j))*x[2]**o + ((0.985986082123-0.749964313442j))*x[2]
            ref[(1, 1, 1, 1)]=(-0.371019746402+0.294388712742j)/(o+1.)+((0.308708449953-0.265030377923j))+((-0.819302095041-0.736155531851j))*0.5**o
            arg[(1, 1, 1, 2)]=(-0.417257920665-0.636007937106j)*x[0]**o + ((0.340463565232+0.972975973154j))*x[0] + ((-0.334383996677+0.458473537289j))*x[1]**o + ((0.0586824387795-0.447086852952j))*x[1] + ((0.763324042752+0.0435307304095j))*x[2]**o + ((0.714690288506+0.707539533528j))*x[2]
            ref[(1, 1, 1, 2)]=(0.428940046075+0.502004267699j)/(o+1.)+((0.556918146259+0.616714326864j))+((-0.417257920665-0.636007937106j))*0.5**o
            arg[(1, 2, 0, 0)]=(-0.54444855472+0.292921995713j)*x[0]**o + ((-0.175314250544-0.999400482872j))*x[0] + ((-0.0658517947581-0.0220994602808j))*x[1]**o + ((-0.227852704431+0.141571713833j))*x[1] + ((0.506272403301+0.376737237455j))*x[2]**o + ((-0.500985455629+0.849504426342j))*x[2]
            ref[(1, 2, 0, 0)]=(0.440420608543+0.354637777174j)/(o+1.)+((-0.452076205302-0.00416217134839j))+((-0.54444855472+0.292921995713j))*0.5**o
            arg[(1, 2, 0, 1)]=(-0.919073784569+0.131611132001j)*x[0]**o + ((-0.960520859815+0.911922227968j))*x[0] + ((0.819248387522-0.039671023605j))*x[1]**o + ((0.010455909653+0.291388855348j))*x[1] + ((-0.620206111369-0.815893057883j))*x[2]**o + ((-0.210852412864-0.281192370491j))*x[2]
            ref[(1, 2, 0, 1)]=(0.199042276153-0.855564081488j)/(o+1.)+((-0.580458681513+0.461059356412j))+((-0.919073784569+0.131611132001j))*0.5**o
            arg[(1, 2, 0, 2)]=(0.400732431336-0.148321135526j)*x[0]**o + ((-0.877889490155-0.466823616869j))*x[0] + ((0.778648474875+0.255968147436j))*x[1]**o + ((-0.511934601865+0.139725642666j))*x[1] + ((-0.031529478491+0.237338571738j))*x[2]**o + ((-0.520034589908+0.0668326680801j))*x[2]
            ref[(1, 2, 0, 2)]=(0.747118996384+0.493306719174j)/(o+1.)+((-0.954929340964-0.130132653061j))+((0.400732431336-0.148321135526j))*0.5**o
            arg[(1, 2, 1, 0)]=(-0.787618256871-0.274894623745j)*x[0]**o + ((0.226197358701+0.0609391884342j))*x[0] + ((0.245171230843+0.936160618317j))*x[1]**o + ((0.91086600817-0.750993122605j))*x[1] + ((0.466252561614-0.827656936589j))*x[2]**o + ((0.835647255361-0.331245072891j))*x[2]
            ref[(1, 2, 1, 0)]=(0.711423792457+0.108503681728j)/(o+1.)+((0.986355311116-0.510649503531j))+((-0.787618256871-0.274894623745j))*0.5**o
            arg[(1, 2, 1, 1)]=(-0.31046886622-0.0967874682275j)*x[0]**o + ((-0.433451294746+0.768629150894j))*x[0] + ((-0.116571340664+0.262298997477j))*x[1]**o + ((-0.605274597785-0.10331462344j))*x[1] + ((0.275475192748-0.769124948894j))*x[2]**o + ((-0.907703589341-0.166379697264j))*x[2]
            ref[(1, 2, 1, 1)]=(0.158903852083-0.506825951417j)/(o+1.)+((-0.973214740937+0.249467415095j))+((-0.31046886622-0.0967874682275j))*0.5**o
            arg[(1, 2, 1, 2)]=(-0.887491875057+0.496077696584j)*x[0]**o + ((0.140837088613+0.429408182456j))*x[0] + ((0.189923021175+0.177835357384j))*x[1]**o + ((0.391897164047-0.0661060550171j))*x[1] + ((-0.304809477079-0.45635399851j))*x[2]**o + ((-0.679460542984+0.318702273846j))*x[2]
            ref[(1, 2, 1, 2)]=(-0.114886455904-0.278518641126j)/(o+1.)+((-0.0733631451622+0.341002200642j))+((-0.887491875057+0.496077696584j))*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.506062550321*x[0]**o + (-0.731087845547)*x[0] + (0.394902960713)*x[1]**o + (0.204374855158)*x[1]
            ref=0.394902960713/(o+1.)+(-0.263356495195)+(-0.506062550321)*0.5**o
        else:
            arg=0.0941685467304*x[0]**o + (0.324719546934)*x[0] + (0.113189416724)*x[1]**o + (-0.126606451046)*x[1] + (0.967006219865)*x[2]**o + (-0.114878476474)*x[2]
            ref=1.08019563659/(o+1.)+(0.0416173097069)+(0.0941685467304)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.219451286052*x[0]**o + (-0.777871521738)*x[0] + (-0.856808739061)*x[1]**o + (0.282607920436)*x[1]
            ref[(0,)]=-0.856808739061/(o+1.)+(-0.247631800651)+(0.219451286052)*0.5**o
            arg[(1,)]=0.458835900538*x[0]**o + (-0.925079674611)*x[0] + (-0.277271912387)*x[1]**o + (0.339625882479)*x[1]
            ref[(1,)]=-0.277271912387/(o+1.)+(-0.292726896066)+(0.458835900538)*0.5**o
        else:
            arg[(0,)]=0.384383454038*x[0]**o + (-0.278617607447)*x[0] + (0.11505181103)*x[1]**o + (0.59185783843)*x[1] + (0.397561670285)*x[2]**o + (-0.192982272653)*x[2]
            ref[(0,)]=0.512613481315/(o+1.)+(0.0601289791646)+(0.384383454038)*0.5**o
            arg[(1,)]=-0.891110421536*x[0]**o + (-0.598771200208)*x[0] + (-0.554215706477)*x[1]**o + (0.483669075995)*x[1] + (0.756340135202)*x[2]**o + (0.434402327167)*x[2]
            ref[(1,)]=0.202124428725/(o+1.)+(0.159650101477)+(-0.891110421536)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref=numpy.zeros((4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.865328346098*x[0]**o + (-0.894331273031)*x[0] + (0.41127965397)*x[1]**o + (-0.663119136102)*x[1]
            ref[(0, 0)]=0.41127965397/(o+1.)+(-0.778725204567)+(-0.865328346098)*0.5**o
            arg[(0, 1)]=-0.220192317669*x[0]**o + (0.782470367812)*x[0] + (0.87916733595)*x[1]**o + (-0.609961858803)*x[1]
            ref[(0, 1)]=0.87916733595/(o+1.)+(0.0862542545044)+(-0.220192317669)*0.5**o
            arg[(0, 2)]=-0.256154187142*x[0]**o + (0.835920672478)*x[0] + (-0.992962333405)*x[1]**o + (0.118015986523)*x[1]
            ref[(0, 2)]=-0.992962333405/(o+1.)+(0.476968329501)+(-0.256154187142)*0.5**o
            arg[(1, 0)]=-0.991311525525*x[0]**o + (0.669135452094)*x[0] + (0.0677434178992)*x[1]**o + (0.201602680728)*x[1]
            ref[(1, 0)]=0.0677434178992/(o+1.)+(0.435369066411)+(-0.991311525525)*0.5**o
            arg[(1, 1)]=-0.780928587962*x[0]**o + (0.941463238384)*x[0] + (0.338982853168)*x[1]**o + (-0.406641279966)*x[1]
            ref[(1, 1)]=0.338982853168/(o+1.)+(0.267410979209)+(-0.780928587962)*0.5**o
            arg[(1, 2)]=-0.452312519979*x[0]**o + (0.590655545711)*x[0] + (-0.583712828088)*x[1]**o + (0.0268101755074)*x[1]
            ref[(1, 2)]=-0.583712828088/(o+1.)+(0.308732860609)+(-0.452312519979)*0.5**o
            arg[(2, 0)]=0.390153459735*x[0]**o + (0.316739559046)*x[0] + (0.969192577447)*x[1]**o + (0.216865402728)*x[1]
            ref[(2, 0)]=0.969192577447/(o+1.)+(0.266802480887)+(0.390153459735)*0.5**o
            arg[(2, 1)]=0.716111609323*x[0]**o + (0.231656178288)*x[0] + (0.557185601218)*x[1]**o + (-0.0837818879907)*x[1]
            ref[(2, 1)]=0.557185601218/(o+1.)+(0.0739371451485)+(0.716111609323)*0.5**o
            arg[(2, 2)]=-0.505313254784*x[0]**o + (-0.682011817263)*x[0] + (-0.546858919983)*x[1]**o + (0.71371813858)*x[1]
            ref[(2, 2)]=-0.546858919983/(o+1.)+(0.0158531606584)+(-0.505313254784)*0.5**o
            arg[(3, 0)]=0.128256066756*x[0]**o + (0.547189936087)*x[0] + (-0.806313746938)*x[1]**o + (-0.226187470544)*x[1]
            ref[(3, 0)]=-0.806313746938/(o+1.)+(0.160501232771)+(0.128256066756)*0.5**o
            arg[(3, 1)]=0.448971893912*x[0]**o + (-0.954580479353)*x[0] + (0.185245745424)*x[1]**o + (-0.459301902073)*x[1]
            ref[(3, 1)]=0.185245745424/(o+1.)+(-0.706941190713)+(0.448971893912)*0.5**o
            arg[(3, 2)]=-0.838644797736*x[0]**o + (0.328822988576)*x[0] + (-0.434232622251)*x[1]**o + (0.907937385329)*x[1]
            ref[(3, 2)]=-0.434232622251/(o+1.)+(0.618380186953)+(-0.838644797736)*0.5**o
        else:
            arg[(0, 0)]=-0.837667635771*x[0]**o + (-0.546488545752)*x[0] + (-0.547058554463)*x[1]**o + (-0.143717589909)*x[1] + (-0.868350247268)*x[2]**o + (-0.53304083186)*x[2]
            ref[(0, 0)]=-1.41540880173/(o+1.)+(-0.61162348376)+(-0.837667635771)*0.5**o
            arg[(0, 1)]=0.815199139819*x[0]**o + (-0.543456641853)*x[0] + (0.459861538857)*x[1]**o + (0.173135109442)*x[1] + (0.785711856451)*x[2]**o + (0.23145427205)*x[2]
            ref[(0, 1)]=1.24557339531/(o+1.)+(-0.0694336301802)+(0.815199139819)*0.5**o
            arg[(0, 2)]=-0.640970988919*x[0]**o + (0.382864489684)*x[0] + (0.0727516878578)*x[1]**o + (-0.887301034298)*x[1] + (0.273575871776)*x[2]**o + (0.197389607371)*x[2]
            ref[(0, 2)]=0.346327559634/(o+1.)+(-0.153523468621)+(-0.640970988919)*0.5**o
            arg[(1, 0)]=-0.0174899622789*x[0]**o + (-0.691346605235)*x[0] + (0.313412755301)*x[1]**o + (-0.152226398543)*x[1] + (0.298709953278)*x[2]**o + (0.768507083655)*x[2]
            ref[(1, 0)]=0.612122708579/(o+1.)+(-0.0375329600615)+(-0.0174899622789)*0.5**o
            arg[(1, 1)]=-0.251292823083*x[0]**o + (-0.282650205897)*x[0] + (0.783854129563)*x[1]**o + (-0.589859380756)*x[1] + (0.378118135589)*x[2]**o + (-0.469678136195)*x[2]
            ref[(1, 1)]=1.16197226515/(o+1.)+(-0.671093861424)+(-0.251292823083)*0.5**o
            arg[(1, 2)]=0.580266744159*x[0]**o + (0.273238943022)*x[0] + (-0.495647682416)*x[1]**o + (0.889318908365)*x[1] + (0.756765583196)*x[2]**o + (-0.414372143884)*x[2]
            ref[(1, 2)]=0.26111790078/(o+1.)+(0.374092853752)+(0.580266744159)*0.5**o
            arg[(2, 0)]=-0.33564444987*x[0]**o + (-0.21624346177)*x[0] + (0.264841716451)*x[1]**o + (0.602965917002)*x[1] + (0.443269926918)*x[2]**o + (-0.738022197991)*x[2]
            ref[(2, 0)]=0.708111643369/(o+1.)+(-0.175649871379)+(-0.33564444987)*0.5**o
            arg[(2, 1)]=-0.888562895123*x[0]**o + (-0.430703715582)*x[0] + (0.307715891509)*x[1]**o + (0.957780462213)*x[1] + (-0.134446885109)*x[2]**o + (0.238749353714)*x[2]
            ref[(2, 1)]=0.1732690064/(o+1.)+(0.382913050173)+(-0.888562895123)*0.5**o
            arg[(2, 2)]=-0.0217796087226*x[0]**o + (0.774038724952)*x[0] + (-0.040409476477)*x[1]**o + (-0.214532323486)*x[1] + (-0.918314181443)*x[2]**o + (0.149136466765)*x[2]
            ref[(2, 2)]=-0.95872365792/(o+1.)+(0.354321434115)+(-0.0217796087226)*0.5**o
            arg[(3, 0)]=0.586929897435*x[0]**o + (0.674405407535)*x[0] + (-0.565694339873)*x[1]**o + (-0.102326042903)*x[1] + (-0.0974196860001)*x[2]**o + (0.740418221963)*x[2]
            ref[(3, 0)]=-0.663114025873/(o+1.)+(0.656248793297)+(0.586929897435)*0.5**o
            arg[(3, 1)]=0.00649680975962*x[0]**o + (-0.508719370866)*x[0] + (0.431410666618)*x[1]**o + (-0.451557440979)*x[1] + (0.246659572607)*x[2]**o + (0.103561356215)*x[2]
            ref[(3, 1)]=0.678070239225/(o+1.)+(-0.428357727815)+(0.00649680975962)*0.5**o
            arg[(3, 2)]=-0.0205145471097*x[0]**o + (0.288166359444)*x[0] + (0.53033768699)*x[1]**o + (0.315380346163)*x[1] + (-0.257670226707)*x[2]**o + (0.524878726404)*x[2]
            ref[(3, 2)]=0.272667460283/(o+1.)+(0.564212716006)+(-0.0205145471097)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4),w)
        ref=numpy.zeros((4, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.0192749074115*x[0]**o + (0.322361481592)*x[0] + (-0.715502886553)*x[1]**o + (0.705787888404)*x[1]
            ref[(0, 0, 0)]=-0.715502886553/(o+1.)+(0.514074684998)+(-0.0192749074115)*0.5**o
            arg[(0, 0, 1)]=0.677975225235*x[0]**o + (-0.172858445964)*x[0] + (0.906743502414)*x[1]**o + (-0.484063774977)*x[1]
            ref[(0, 0, 1)]=0.906743502414/(o+1.)+(-0.328461110471)+(0.677975225235)*0.5**o
            arg[(0, 0, 2)]=-0.181537958175*x[0]**o + (0.393724669933)*x[0] + (0.149464790697)*x[1]**o + (0.957043585387)*x[1]
            ref[(0, 0, 2)]=0.149464790697/(o+1.)+(0.67538412766)+(-0.181537958175)*0.5**o
            arg[(0, 0, 3)]=-0.460307846341*x[0]**o + (0.109880854354)*x[0] + (-0.503559197588)*x[1]**o + (-0.77127659486)*x[1]
            ref[(0, 0, 3)]=-0.503559197588/(o+1.)+(-0.330697870253)+(-0.460307846341)*0.5**o
            arg[(0, 1, 0)]=-0.252019994099*x[0]**o + (-0.479033506063)*x[0] + (-0.513111495185)*x[1]**o + (-0.114557723288)*x[1]
            ref[(0, 1, 0)]=-0.513111495185/(o+1.)+(-0.296795614676)+(-0.252019994099)*0.5**o
            arg[(0, 1, 1)]=0.468423138531*x[0]**o + (0.948349890911)*x[0] + (0.732071176615)*x[1]**o + (0.919023424982)*x[1]
            ref[(0, 1, 1)]=0.732071176615/(o+1.)+(0.933686657947)+(0.468423138531)*0.5**o
            arg[(0, 1, 2)]=-0.981102807616*x[0]**o + (-0.323067046615)*x[0] + (-0.107601648064)*x[1]**o + (0.856736536307)*x[1]
            ref[(0, 1, 2)]=-0.107601648064/(o+1.)+(0.266834744846)+(-0.981102807616)*0.5**o
            arg[(0, 1, 3)]=0.436643607676*x[0]**o + (0.0991606633267)*x[0] + (-0.562508462111)*x[1]**o + (-0.184148383875)*x[1]
            ref[(0, 1, 3)]=-0.562508462111/(o+1.)+(-0.0424938602744)+(0.436643607676)*0.5**o
            arg[(1, 0, 0)]=-0.747663928225*x[0]**o + (-0.297073457043)*x[0] + (-0.494969509176)*x[1]**o + (-0.791909295817)*x[1]
            ref[(1, 0, 0)]=-0.494969509176/(o+1.)+(-0.54449137643)+(-0.747663928225)*0.5**o
            arg[(1, 0, 1)]=0.637299649904*x[0]**o + (-0.88274305869)*x[0] + (-0.687317449548)*x[1]**o + (-0.217337123702)*x[1]
            ref[(1, 0, 1)]=-0.687317449548/(o+1.)+(-0.550040091196)+(0.637299649904)*0.5**o
            arg[(1, 0, 2)]=0.350647204836*x[0]**o + (0.876511602769)*x[0] + (0.0611051649229)*x[1]**o + (-0.555417516342)*x[1]
            ref[(1, 0, 2)]=0.0611051649229/(o+1.)+(0.160547043214)+(0.350647204836)*0.5**o
            arg[(1, 0, 3)]=-0.774963820788*x[0]**o + (0.359158184659)*x[0] + (0.596318071811)*x[1]**o + (-0.49204717245)*x[1]
            ref[(1, 0, 3)]=0.596318071811/(o+1.)+(-0.0664444938952)+(-0.774963820788)*0.5**o
            arg[(1, 1, 0)]=-0.108743306422*x[0]**o + (-0.72702722496)*x[0] + (0.105999309989)*x[1]**o + (-0.852063575938)*x[1]
            ref[(1, 1, 0)]=0.105999309989/(o+1.)+(-0.789545400449)+(-0.108743306422)*0.5**o
            arg[(1, 1, 1)]=-0.0454239641662*x[0]**o + (-0.823351023688)*x[0] + (-0.141920683344)*x[1]**o + (0.546777936062)*x[1]
            ref[(1, 1, 1)]=-0.141920683344/(o+1.)+(-0.138286543813)+(-0.0454239641662)*0.5**o
            arg[(1, 1, 2)]=-0.647255202496*x[0]**o + (-0.564932516015)*x[0] + (-0.0283245734633)*x[1]**o + (-0.640859125557)*x[1]
            ref[(1, 1, 2)]=-0.0283245734633/(o+1.)+(-0.602895820786)+(-0.647255202496)*0.5**o
            arg[(1, 1, 3)]=0.24396951286*x[0]**o + (0.996362932971)*x[0] + (-0.473895629453)*x[1]**o + (-0.399451103715)*x[1]
            ref[(1, 1, 3)]=-0.473895629453/(o+1.)+(0.298455914628)+(0.24396951286)*0.5**o
            arg[(2, 0, 0)]=-0.536365662618*x[0]**o + (-0.844812031804)*x[0] + (0.654747829499)*x[1]**o + (0.555291334026)*x[1]
            ref[(2, 0, 0)]=0.654747829499/(o+1.)+(-0.144760348889)+(-0.536365662618)*0.5**o
            arg[(2, 0, 1)]=0.876344849947*x[0]**o + (0.716048808599)*x[0] + (-0.563922353639)*x[1]**o + (-0.16482361861)*x[1]
            ref[(2, 0, 1)]=-0.563922353639/(o+1.)+(0.275612594995)+(0.876344849947)*0.5**o
            arg[(2, 0, 2)]=0.851329956192*x[0]**o + (0.299276188921)*x[0] + (-0.242502870471)*x[1]**o + (0.234960895911)*x[1]
            ref[(2, 0, 2)]=-0.242502870471/(o+1.)+(0.267118542416)+(0.851329956192)*0.5**o
            arg[(2, 0, 3)]=-0.646202447491*x[0]**o + (-0.171839835394)*x[0] + (-0.560370570461)*x[1]**o + (-0.197131219017)*x[1]
            ref[(2, 0, 3)]=-0.560370570461/(o+1.)+(-0.184485527206)+(-0.646202447491)*0.5**o
            arg[(2, 1, 0)]=0.582893281259*x[0]**o + (0.450550558617)*x[0] + (0.587253501264)*x[1]**o + (0.158541581445)*x[1]
            ref[(2, 1, 0)]=0.587253501264/(o+1.)+(0.304546070031)+(0.582893281259)*0.5**o
            arg[(2, 1, 1)]=-0.0188157284118*x[0]**o + (0.879121618031)*x[0] + (0.370700637714)*x[1]**o + (0.19647409713)*x[1]
            ref[(2, 1, 1)]=0.370700637714/(o+1.)+(0.53779785758)+(-0.0188157284118)*0.5**o
            arg[(2, 1, 2)]=0.948711003234*x[0]**o + (-0.409020271105)*x[0] + (0.0738211636188)*x[1]**o + (-0.477013212019)*x[1]
            ref[(2, 1, 2)]=0.0738211636188/(o+1.)+(-0.443016741562)+(0.948711003234)*0.5**o
            arg[(2, 1, 3)]=-0.821358370026*x[0]**o + (0.752436041583)*x[0] + (-0.684213226527)*x[1]**o + (-0.632776328707)*x[1]
            ref[(2, 1, 3)]=-0.684213226527/(o+1.)+(0.0598298564381)+(-0.821358370026)*0.5**o
            arg[(3, 0, 0)]=-0.0350047413764*x[0]**o + (0.343321015894)*x[0] + (-0.486678526009)*x[1]**o + (-0.831250871276)*x[1]
            ref[(3, 0, 0)]=-0.486678526009/(o+1.)+(-0.243964927691)+(-0.0350047413764)*0.5**o
            arg[(3, 0, 1)]=0.870459614583*x[0]**o + (0.335207283503)*x[0] + (-0.219646980227)*x[1]**o + (-0.821965354474)*x[1]
            ref[(3, 0, 1)]=-0.219646980227/(o+1.)+(-0.243379035486)+(0.870459614583)*0.5**o
            arg[(3, 0, 2)]=0.0205476586061*x[0]**o + (0.628706051689)*x[0] + (-0.570508610539)*x[1]**o + (-0.587104896646)*x[1]
            ref[(3, 0, 2)]=-0.570508610539/(o+1.)+(0.0208005775214)+(0.0205476586061)*0.5**o
            arg[(3, 0, 3)]=-0.407553684902*x[0]**o + (0.602056791064)*x[0] + (0.0475724394909)*x[1]**o + (0.771317396888)*x[1]
            ref[(3, 0, 3)]=0.0475724394909/(o+1.)+(0.686687093976)+(-0.407553684902)*0.5**o
            arg[(3, 1, 0)]=0.393832878986*x[0]**o + (0.816597408846)*x[0] + (0.379592347696)*x[1]**o + (0.675698035203)*x[1]
            ref[(3, 1, 0)]=0.379592347696/(o+1.)+(0.746147722025)+(0.393832878986)*0.5**o
            arg[(3, 1, 1)]=0.0524904656082*x[0]**o + (0.0293752851428)*x[0] + (0.735917629657)*x[1]**o + (0.860299439359)*x[1]
            ref[(3, 1, 1)]=0.735917629657/(o+1.)+(0.444837362251)+(0.0524904656082)*0.5**o
            arg[(3, 1, 2)]=0.219924105828*x[0]**o + (0.180084932631)*x[0] + (0.0414532257251)*x[1]**o + (-0.760451964591)*x[1]
            ref[(3, 1, 2)]=0.0414532257251/(o+1.)+(-0.29018351598)+(0.219924105828)*0.5**o
            arg[(3, 1, 3)]=-0.497190640345*x[0]**o + (-0.468499735348)*x[0] + (-0.332157102729)*x[1]**o + (0.422149091571)*x[1]
            ref[(3, 1, 3)]=-0.332157102729/(o+1.)+(-0.0231753218883)+(-0.497190640345)*0.5**o
        else:
            arg[(0, 0, 0)]=0.0223611222025*x[0]**o + (-0.635324792184)*x[0] + (0.131185780497)*x[1]**o + (-0.43135939458)*x[1] + (-0.604882716648)*x[2]**o + (-0.106916911141)*x[2]
            ref[(0, 0, 0)]=-0.473696936151/(o+1.)+(-0.586800548952)+(0.0223611222025)*0.5**o
            arg[(0, 0, 1)]=-0.59991110771*x[0]**o + (-0.241259574147)*x[0] + (-0.106856816378)*x[1]**o + (0.0206422479216)*x[1] + (-0.141800063571)*x[2]**o + (0.0009065510242)*x[2]
            ref[(0, 0, 1)]=-0.24865687995/(o+1.)+(-0.109855387601)+(-0.59991110771)*0.5**o
            arg[(0, 0, 2)]=-0.815069635749*x[0]**o + (-0.594863263905)*x[0] + (0.560820428011)*x[1]**o + (0.609030719244)*x[1] + (-0.805221723817)*x[2]**o + (0.43104216377)*x[2]
            ref[(0, 0, 2)]=-0.244401295807/(o+1.)+(0.222604809554)+(-0.815069635749)*0.5**o
            arg[(0, 0, 3)]=-0.556009890648*x[0]**o + (0.101367649559)*x[0] + (-0.456032161557)*x[1]**o + (-0.228848649804)*x[1] + (0.859062595601)*x[2]**o + (-0.630413611216)*x[2]
            ref[(0, 0, 3)]=0.403030434043/(o+1.)+(-0.37894730573)+(-0.556009890648)*0.5**o
            arg[(0, 1, 0)]=-0.33132113185*x[0]**o + (0.944762511766)*x[0] + (0.961328394843)*x[1]**o + (0.470438965017)*x[1] + (0.749559555781)*x[2]**o + (-0.789881774506)*x[2]
            ref[(0, 1, 0)]=1.71088795062/(o+1.)+(0.312659851139)+(-0.33132113185)*0.5**o
            arg[(0, 1, 1)]=0.930698615403*x[0]**o + (-0.143634128823)*x[0] + (-0.648491145433)*x[1]**o + (0.428542525134)*x[1] + (0.610273922734)*x[2]**o + (0.726468266829)*x[2]
            ref[(0, 1, 1)]=-0.038217222699/(o+1.)+(0.50568833157)+(0.930698615403)*0.5**o
            arg[(0, 1, 2)]=-0.902963762391*x[0]**o + (-0.76532930874)*x[0] + (-0.850147619111)*x[1]**o + (-0.907459456956)*x[1] + (-0.252478202576)*x[2]**o + (0.475114522031)*x[2]
            ref[(0, 1, 2)]=-1.10262582169/(o+1.)+(-0.598837121833)+(-0.902963762391)*0.5**o
            arg[(0, 1, 3)]=-0.870704331523*x[0]**o + (-0.531530014285)*x[0] + (0.0443572603758)*x[1]**o + (0.450181699199)*x[1] + (-0.544751796871)*x[2]**o + (-0.502559934484)*x[2]
            ref[(0, 1, 3)]=-0.500394536495/(o+1.)+(-0.291954124785)+(-0.870704331523)*0.5**o
            arg[(1, 0, 0)]=0.657039465384*x[0]**o + (0.517955360013)*x[0] + (-0.717124298724)*x[1]**o + (-0.639112717484)*x[1] + (-0.91154287733)*x[2]**o + (-0.851965660609)*x[2]
            ref[(1, 0, 0)]=-1.62866717605/(o+1.)+(-0.48656150904)+(0.657039465384)*0.5**o
            arg[(1, 0, 1)]=0.279968523886*x[0]**o + (-0.317742067896)*x[0] + (-0.485667306384)*x[1]**o + (-0.687073088852)*x[1] + (-0.681136913644)*x[2]**o + (-0.00615076606968)*x[2]
            ref[(1, 0, 1)]=-1.16680422003/(o+1.)+(-0.505482961409)+(0.279968523886)*0.5**o
            arg[(1, 0, 2)]=-0.358933287905*x[0]**o + (-0.269578441128)*x[0] + (0.814405840749)*x[1]**o + (-0.486280163956)*x[1] + (-0.342944972808)*x[2]**o + (0.971254235625)*x[2]
            ref[(1, 0, 2)]=0.471460867941/(o+1.)+(0.107697815271)+(-0.358933287905)*0.5**o
            arg[(1, 0, 3)]=0.924271383018*x[0]**o + (-0.0806172118214)*x[0] + (0.158815541247)*x[1]**o + (0.549567807844)*x[1] + (-0.805280669034)*x[2]**o + (0.208040933094)*x[2]
            ref[(1, 0, 3)]=-0.646465127786/(o+1.)+(0.338495764558)+(0.924271383018)*0.5**o
            arg[(1, 1, 0)]=-0.952012116219*x[0]**o + (0.236057826922)*x[0] + (-0.60521155643)*x[1]**o + (0.813024557106)*x[1] + (0.611645401603)*x[2]**o + (0.695724331432)*x[2]
            ref[(1, 1, 0)]=0.00643384517275/(o+1.)+(0.872403357731)+(-0.952012116219)*0.5**o
            arg[(1, 1, 1)]=-0.0333138603478*x[0]**o + (-0.949551414794)*x[0] + (0.406355549391)*x[1]**o + (-0.977619200407)*x[1] + (-0.395841146556)*x[2]**o + (0.0558759828776)*x[2]
            ref[(1, 1, 1)]=0.0105144028347/(o+1.)+(-0.935647316162)+(-0.0333138603478)*0.5**o
            arg[(1, 1, 2)]=-0.650713699456*x[0]**o + (-0.585833073932)*x[0] + (0.815409878807)*x[1]**o + (0.581606432548)*x[1] + (-0.316613486419)*x[2]**o + (-0.293733796661)*x[2]
            ref[(1, 1, 2)]=0.498796392388/(o+1.)+(-0.148980219022)+(-0.650713699456)*0.5**o
            arg[(1, 1, 3)]=0.838490032264*x[0]**o + (0.766972060305)*x[0] + (0.964178576783)*x[1]**o + (-0.800548870763)*x[1] + (0.688146797659)*x[2]**o + (0.688968623287)*x[2]
            ref[(1, 1, 3)]=1.65232537444/(o+1.)+(0.327695906415)+(0.838490032264)*0.5**o
            arg[(2, 0, 0)]=0.363652102392*x[0]**o + (-0.616071443615)*x[0] + (-0.027482781218)*x[1]**o + (0.369306509078)*x[1] + (-0.236801850106)*x[2]**o + (0.919842392665)*x[2]
            ref[(2, 0, 0)]=-0.264284631324/(o+1.)+(0.336538729064)+(0.363652102392)*0.5**o
            arg[(2, 0, 1)]=-0.952729754842*x[0]**o + (-0.831682426662)*x[0] + (-0.292115653085)*x[1]**o + (-0.796703277421)*x[1] + (-0.0797928234518)*x[2]**o + (0.919562944903)*x[2]
            ref[(2, 0, 1)]=-0.371908476537/(o+1.)+(-0.35441137959)+(-0.952729754842)*0.5**o
            arg[(2, 0, 2)]=0.508496696273*x[0]**o + (0.443223573717)*x[0] + (0.220642680557)*x[1]**o + (-0.922198922529)*x[1] + (0.392553814543)*x[2]**o + (0.00796185915796)*x[2]
            ref[(2, 0, 2)]=0.6131964951/(o+1.)+(-0.235506744827)+(0.508496696273)*0.5**o
            arg[(2, 0, 3)]=0.763763269705*x[0]**o + (-0.533610513095)*x[0] + (0.316112256228)*x[1]**o + (-0.339340384787)*x[1] + (-0.017915960261)*x[2]**o + (-0.707270826188)*x[2]
            ref[(2, 0, 3)]=0.298196295967/(o+1.)+(-0.790110862035)+(0.763763269705)*0.5**o
            arg[(2, 1, 0)]=-0.908425492004*x[0]**o + (-0.331361444381)*x[0] + (-0.39926852072)*x[1]**o + (-0.709292892179)*x[1] + (0.0826203649456)*x[2]**o + (-0.219043248283)*x[2]
            ref[(2, 1, 0)]=-0.316648155775/(o+1.)+(-0.629848792422)+(-0.908425492004)*0.5**o
            arg[(2, 1, 1)]=0.842243684887*x[0]**o + (-0.0926613319012)*x[0] + (0.0912351846715)*x[1]**o + (0.108913106034)*x[1] + (0.571631580237)*x[2]**o + (-0.497843838565)*x[2]
            ref[(2, 1, 1)]=0.662866764909/(o+1.)+(-0.240796032216)+(0.842243684887)*0.5**o
            arg[(2, 1, 2)]=0.649456067247*x[0]**o + (-0.736347111342)*x[0] + (0.668159516546)*x[1]**o + (-0.200661767687)*x[1] + (-0.349450830499)*x[2]**o + (0.460389058817)*x[2]
            ref[(2, 1, 2)]=0.318708686047/(o+1.)+(-0.238309910106)+(0.649456067247)*0.5**o
            arg[(2, 1, 3)]=0.8425952021*x[0]**o + (-0.192306496822)*x[0] + (0.582184569453)*x[1]**o + (-0.986353449046)*x[1] + (-0.193859812089)*x[2]**o + (0.604176959527)*x[2]
            ref[(2, 1, 3)]=0.388324757364/(o+1.)+(-0.28724149317)+(0.8425952021)*0.5**o
            arg[(3, 0, 0)]=-0.690679656754*x[0]**o + (0.935298005954)*x[0] + (-0.182582578811)*x[1]**o + (0.947153467222)*x[1] + (0.477646030739)*x[2]**o + (0.346589715581)*x[2]
            ref[(3, 0, 0)]=0.295063451928/(o+1.)+(1.11452059438)+(-0.690679656754)*0.5**o
            arg[(3, 0, 1)]=0.0748425688489*x[0]**o + (-0.175020419399)*x[0] + (-0.569173249549)*x[1]**o + (0.782894959718)*x[1] + (-0.954369350794)*x[2]**o + (-0.508103707872)*x[2]
            ref[(3, 0, 1)]=-1.52354260034/(o+1.)+(0.0498854162233)+(0.0748425688489)*0.5**o
            arg[(3, 0, 2)]=-0.775133314372*x[0]**o + (0.872392650984)*x[0] + (-0.8250204062)*x[1]**o + (-0.733157941497)*x[1] + (-0.90973594822)*x[2]**o + (-0.37818717246)*x[2]
            ref[(3, 0, 2)]=-1.73475635442/(o+1.)+(-0.119476231487)+(-0.775133314372)*0.5**o
            arg[(3, 0, 3)]=0.705774796558*x[0]**o + (0.626593367337)*x[0] + (0.992321184105)*x[1]**o + (-0.318657248687)*x[1] + (0.659375051616)*x[2]**o + (0.547009034083)*x[2]
            ref[(3, 0, 3)]=1.65169623572/(o+1.)+(0.427472576366)+(0.705774796558)*0.5**o
            arg[(3, 1, 0)]=-0.734945855461*x[0]**o + (0.454282455112)*x[0] + (-0.239762149964)*x[1]**o + (-0.789674853571)*x[1] + (0.431064906758)*x[2]**o + (0.823942481561)*x[2]
            ref[(3, 1, 0)]=0.191302756794/(o+1.)+(0.244275041551)+(-0.734945855461)*0.5**o
            arg[(3, 1, 1)]=0.134320736267*x[0]**o + (-0.207066988776)*x[0] + (-0.362674284642)*x[1]**o + (0.628584437476)*x[1] + (-0.915034617602)*x[2]**o + (0.585798849281)*x[2]
            ref[(3, 1, 1)]=-1.27770890224/(o+1.)+(0.50365814899)+(0.134320736267)*0.5**o
            arg[(3, 1, 2)]=0.214687593987*x[0]**o + (-0.548490380281)*x[0] + (-0.798454219978)*x[1]**o + (0.843460793062)*x[1] + (-0.838042722125)*x[2]**o + (0.453201519058)*x[2]
            ref[(3, 1, 2)]=-1.6364969421/(o+1.)+(0.37408596592)+(0.214687593987)*0.5**o
            arg[(3, 1, 3)]=0.16752156891*x[0]**o + (-0.480453850633)*x[0] + (0.100663041726)*x[1]**o + (0.726028432234)*x[1] + (0.312756308139)*x[2]**o + (-0.625109278824)*x[2]
            ref[(3, 1, 3)]=0.413419349864/(o+1.)+(-0.189767348611)+(0.16752156891)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4, 3),w)
        ref=numpy.zeros((3, 3, 4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.503615775387*x[0]**o + (-0.88482244253)*x[0] + (-0.695917715264)*x[1]**o + (-0.0471958040723)*x[1]
            ref[(0, 0, 0, 0)]=-0.695917715264/(o+1.)+(-0.466009123301)+(0.503615775387)*0.5**o
            arg[(0, 0, 0, 1)]=-0.429804156963*x[0]**o + (-0.393275367366)*x[0] + (-0.706296366227)*x[1]**o + (-0.344795750352)*x[1]
            ref[(0, 0, 0, 1)]=-0.706296366227/(o+1.)+(-0.369035558859)+(-0.429804156963)*0.5**o
            arg[(0, 0, 0, 2)]=-0.549472039857*x[0]**o + (-0.476641648122)*x[0] + (0.696992169134)*x[1]**o + (0.476972938414)*x[1]
            ref[(0, 0, 0, 2)]=0.696992169134/(o+1.)+(0.000165645145583)+(-0.549472039857)*0.5**o
            arg[(0, 0, 1, 0)]=-0.58242965238*x[0]**o + (-0.0838243995189)*x[0] + (-0.952251181008)*x[1]**o + (0.695347553576)*x[1]
            ref[(0, 0, 1, 0)]=-0.952251181008/(o+1.)+(0.305761577029)+(-0.58242965238)*0.5**o
            arg[(0, 0, 1, 1)]=0.746389312012*x[0]**o + (0.323936257809)*x[0] + (-0.066478491834)*x[1]**o + (-0.630055143667)*x[1]
            ref[(0, 0, 1, 1)]=-0.066478491834/(o+1.)+(-0.153059442929)+(0.746389312012)*0.5**o
            arg[(0, 0, 1, 2)]=0.97511904839*x[0]**o + (-0.951139476873)*x[0] + (0.19897255155)*x[1]**o + (0.821259994101)*x[1]
            ref[(0, 0, 1, 2)]=0.19897255155/(o+1.)+(-0.0649397413859)+(0.97511904839)*0.5**o
            arg[(0, 0, 2, 0)]=0.62620073258*x[0]**o + (-0.458897965339)*x[0] + (0.240187421178)*x[1]**o + (0.308506671914)*x[1]
            ref[(0, 0, 2, 0)]=0.240187421178/(o+1.)+(-0.0751956467121)+(0.62620073258)*0.5**o
            arg[(0, 0, 2, 1)]=0.953495777883*x[0]**o + (-0.312832196409)*x[0] + (0.102680451526)*x[1]**o + (-0.844760262052)*x[1]
            ref[(0, 0, 2, 1)]=0.102680451526/(o+1.)+(-0.57879622923)+(0.953495777883)*0.5**o
            arg[(0, 0, 2, 2)]=-0.896030439355*x[0]**o + (0.0440789474458)*x[0] + (-0.399916159273)*x[1]**o + (0.884335148957)*x[1]
            ref[(0, 0, 2, 2)]=-0.399916159273/(o+1.)+(0.464207048201)+(-0.896030439355)*0.5**o
            arg[(0, 0, 3, 0)]=-0.482892536865*x[0]**o + (-0.806677403364)*x[0] + (0.730868040734)*x[1]**o + (-0.178422717233)*x[1]
            ref[(0, 0, 3, 0)]=0.730868040734/(o+1.)+(-0.492550060299)+(-0.482892536865)*0.5**o
            arg[(0, 0, 3, 1)]=0.999441610451*x[0]**o + (-0.931040609677)*x[0] + (-0.792292533163)*x[1]**o + (-0.296703593698)*x[1]
            ref[(0, 0, 3, 1)]=-0.792292533163/(o+1.)+(-0.613872101687)+(0.999441610451)*0.5**o
            arg[(0, 0, 3, 2)]=-0.434356986099*x[0]**o + (0.0313562400365)*x[0] + (-0.203399424436)*x[1]**o + (-0.69741914448)*x[1]
            ref[(0, 0, 3, 2)]=-0.203399424436/(o+1.)+(-0.333031452222)+(-0.434356986099)*0.5**o
            arg[(0, 1, 0, 0)]=0.875558839981*x[0]**o + (-0.789437782839)*x[0] + (0.681069742416)*x[1]**o + (0.0253959707701)*x[1]
            ref[(0, 1, 0, 0)]=0.681069742416/(o+1.)+(-0.382020906035)+(0.875558839981)*0.5**o
            arg[(0, 1, 0, 1)]=0.352040055341*x[0]**o + (0.83347208849)*x[0] + (-0.0487105835534)*x[1]**o + (-0.288913448174)*x[1]
            ref[(0, 1, 0, 1)]=-0.0487105835534/(o+1.)+(0.272279320158)+(0.352040055341)*0.5**o
            arg[(0, 1, 0, 2)]=0.29560604479*x[0]**o + (-0.55961441139)*x[0] + (-0.533854672644)*x[1]**o + (0.263735344517)*x[1]
            ref[(0, 1, 0, 2)]=-0.533854672644/(o+1.)+(-0.147939533436)+(0.29560604479)*0.5**o
            arg[(0, 1, 1, 0)]=-0.848497794271*x[0]**o + (0.353626556249)*x[0] + (-0.819636174596)*x[1]**o + (0.452642499338)*x[1]
            ref[(0, 1, 1, 0)]=-0.819636174596/(o+1.)+(0.403134527793)+(-0.848497794271)*0.5**o
            arg[(0, 1, 1, 1)]=0.647642850287*x[0]**o + (-0.0788650999258)*x[0] + (0.95485745797)*x[1]**o + (-0.57180668941)*x[1]
            ref[(0, 1, 1, 1)]=0.95485745797/(o+1.)+(-0.325335894668)+(0.647642850287)*0.5**o
            arg[(0, 1, 1, 2)]=0.80537516983*x[0]**o + (-0.953804189819)*x[0] + (0.632255823311)*x[1]**o + (0.533326714609)*x[1]
            ref[(0, 1, 1, 2)]=0.632255823311/(o+1.)+(-0.210238737605)+(0.80537516983)*0.5**o
            arg[(0, 1, 2, 0)]=0.896082250305*x[0]**o + (-0.387557761522)*x[0] + (0.0492968170421)*x[1]**o + (-0.272429034394)*x[1]
            ref[(0, 1, 2, 0)]=0.0492968170421/(o+1.)+(-0.329993397958)+(0.896082250305)*0.5**o
            arg[(0, 1, 2, 1)]=-0.521116923555*x[0]**o + (-0.0776371039443)*x[0] + (-0.0667396147182)*x[1]**o + (0.787734715871)*x[1]
            ref[(0, 1, 2, 1)]=-0.0667396147182/(o+1.)+(0.355048805963)+(-0.521116923555)*0.5**o
            arg[(0, 1, 2, 2)]=-0.0754150455148*x[0]**o + (-0.605304488558)*x[0] + (-0.998530754568)*x[1]**o + (-0.717628636061)*x[1]
            ref[(0, 1, 2, 2)]=-0.998530754568/(o+1.)+(-0.66146656231)+(-0.0754150455148)*0.5**o
            arg[(0, 1, 3, 0)]=0.233484702283*x[0]**o + (0.352935710529)*x[0] + (0.806659819007)*x[1]**o + (0.229333686949)*x[1]
            ref[(0, 1, 3, 0)]=0.806659819007/(o+1.)+(0.291134698739)+(0.233484702283)*0.5**o
            arg[(0, 1, 3, 1)]=0.392917488985*x[0]**o + (0.00200099481416)*x[0] + (0.447321002109)*x[1]**o + (0.605937373841)*x[1]
            ref[(0, 1, 3, 1)]=0.447321002109/(o+1.)+(0.303969184327)+(0.392917488985)*0.5**o
            arg[(0, 1, 3, 2)]=-0.158376830024*x[0]**o + (-0.352976872743)*x[0] + (0.233918918817)*x[1]**o + (-0.92486719464)*x[1]
            ref[(0, 1, 3, 2)]=0.233918918817/(o+1.)+(-0.638922033691)+(-0.158376830024)*0.5**o
            arg[(0, 2, 0, 0)]=0.0251841513935*x[0]**o + (-0.397774098275)*x[0] + (0.656674780404)*x[1]**o + (0.823148120072)*x[1]
            ref[(0, 2, 0, 0)]=0.656674780404/(o+1.)+(0.212687010899)+(0.0251841513935)*0.5**o
            arg[(0, 2, 0, 1)]=0.199892326627*x[0]**o + (-0.514069623669)*x[0] + (-0.842946759064)*x[1]**o + (-0.719960273364)*x[1]
            ref[(0, 2, 0, 1)]=-0.842946759064/(o+1.)+(-0.617014948516)+(0.199892326627)*0.5**o
            arg[(0, 2, 0, 2)]=-0.314442902986*x[0]**o + (-0.101904786305)*x[0] + (0.486177822617)*x[1]**o + (0.0844561611508)*x[1]
            ref[(0, 2, 0, 2)]=0.486177822617/(o+1.)+(-0.00872431257717)+(-0.314442902986)*0.5**o
            arg[(0, 2, 1, 0)]=0.317396157694*x[0]**o + (-0.000157379425472)*x[0] + (0.95528440802)*x[1]**o + (0.798236171511)*x[1]
            ref[(0, 2, 1, 0)]=0.95528440802/(o+1.)+(0.399039396043)+(0.317396157694)*0.5**o
            arg[(0, 2, 1, 1)]=0.475211520364*x[0]**o + (0.330420151434)*x[0] + (-0.180935447431)*x[1]**o + (-0.780878812952)*x[1]
            ref[(0, 2, 1, 1)]=-0.180935447431/(o+1.)+(-0.225229330759)+(0.475211520364)*0.5**o
            arg[(0, 2, 1, 2)]=-0.850167248419*x[0]**o + (0.130395864333)*x[0] + (0.458731084034)*x[1]**o + (-0.528128235084)*x[1]
            ref[(0, 2, 1, 2)]=0.458731084034/(o+1.)+(-0.198866185375)+(-0.850167248419)*0.5**o
            arg[(0, 2, 2, 0)]=0.740870488138*x[0]**o + (-0.32473247302)*x[0] + (-0.103902122463)*x[1]**o + (-0.105420609887)*x[1]
            ref[(0, 2, 2, 0)]=-0.103902122463/(o+1.)+(-0.215076541453)+(0.740870488138)*0.5**o
            arg[(0, 2, 2, 1)]=-0.597220788824*x[0]**o + (-0.537855848541)*x[0] + (-0.467185625688)*x[1]**o + (-0.951912933144)*x[1]
            ref[(0, 2, 2, 1)]=-0.467185625688/(o+1.)+(-0.744884390843)+(-0.597220788824)*0.5**o
            arg[(0, 2, 2, 2)]=-0.150486455987*x[0]**o + (0.436526759397)*x[0] + (0.148586678397)*x[1]**o + (0.911734768857)*x[1]
            ref[(0, 2, 2, 2)]=0.148586678397/(o+1.)+(0.674130764127)+(-0.150486455987)*0.5**o
            arg[(0, 2, 3, 0)]=0.274793001621*x[0]**o + (-0.880298754353)*x[0] + (-0.976759160791)*x[1]**o + (0.17492235053)*x[1]
            ref[(0, 2, 3, 0)]=-0.976759160791/(o+1.)+(-0.352688201911)+(0.274793001621)*0.5**o
            arg[(0, 2, 3, 1)]=0.610766153765*x[0]**o + (-0.0517230642791)*x[0] + (0.589830371318)*x[1]**o + (0.742420769198)*x[1]
            ref[(0, 2, 3, 1)]=0.589830371318/(o+1.)+(0.34534885246)+(0.610766153765)*0.5**o
            arg[(0, 2, 3, 2)]=0.96046632794*x[0]**o + (0.168771898655)*x[0] + (-0.714313055622)*x[1]**o + (0.793285788154)*x[1]
            ref[(0, 2, 3, 2)]=-0.714313055622/(o+1.)+(0.481028843405)+(0.96046632794)*0.5**o
            arg[(1, 0, 0, 0)]=0.578432932793*x[0]**o + (0.633580659473)*x[0] + (0.068890102996)*x[1]**o + (0.281346989752)*x[1]
            ref[(1, 0, 0, 0)]=0.068890102996/(o+1.)+(0.457463824613)+(0.578432932793)*0.5**o
            arg[(1, 0, 0, 1)]=-0.487832960397*x[0]**o + (0.211858718344)*x[0] + (-0.786507228166)*x[1]**o + (0.874274682091)*x[1]
            ref[(1, 0, 0, 1)]=-0.786507228166/(o+1.)+(0.543066700217)+(-0.487832960397)*0.5**o
            arg[(1, 0, 0, 2)]=0.218425962078*x[0]**o + (-0.00472768616068)*x[0] + (0.652340711911)*x[1]**o + (0.424106658046)*x[1]
            ref[(1, 0, 0, 2)]=0.652340711911/(o+1.)+(0.209689485943)+(0.218425962078)*0.5**o
            arg[(1, 0, 1, 0)]=-0.835266432415*x[0]**o + (-0.308706056184)*x[0] + (0.344836267071)*x[1]**o + (0.515545011951)*x[1]
            ref[(1, 0, 1, 0)]=0.344836267071/(o+1.)+(0.103419477883)+(-0.835266432415)*0.5**o
            arg[(1, 0, 1, 1)]=-0.101435262986*x[0]**o + (-0.581973735397)*x[0] + (0.361581909801)*x[1]**o + (-0.209515663493)*x[1]
            ref[(1, 0, 1, 1)]=0.361581909801/(o+1.)+(-0.395744699445)+(-0.101435262986)*0.5**o
            arg[(1, 0, 1, 2)]=0.96202202072*x[0]**o + (-0.651542210755)*x[0] + (-0.129099112535)*x[1]**o + (0.132571712906)*x[1]
            ref[(1, 0, 1, 2)]=-0.129099112535/(o+1.)+(-0.259485248925)+(0.96202202072)*0.5**o
            arg[(1, 0, 2, 0)]=0.621341608414*x[0]**o + (0.586110408801)*x[0] + (-0.866314582465)*x[1]**o + (-0.726559942895)*x[1]
            ref[(1, 0, 2, 0)]=-0.866314582465/(o+1.)+(-0.0702247670472)+(0.621341608414)*0.5**o
            arg[(1, 0, 2, 1)]=0.803931479109*x[0]**o + (-0.682331423978)*x[0] + (-0.813348274496)*x[1]**o + (0.964682081465)*x[1]
            ref[(1, 0, 2, 1)]=-0.813348274496/(o+1.)+(0.141175328743)+(0.803931479109)*0.5**o
            arg[(1, 0, 2, 2)]=-0.697514481144*x[0]**o + (-0.561085307811)*x[0] + (0.0233299472873)*x[1]**o + (-0.388021222612)*x[1]
            ref[(1, 0, 2, 2)]=0.0233299472873/(o+1.)+(-0.474553265211)+(-0.697514481144)*0.5**o
            arg[(1, 0, 3, 0)]=0.543874921901*x[0]**o + (0.790660127763)*x[0] + (0.157951198757)*x[1]**o + (0.478006389624)*x[1]
            ref[(1, 0, 3, 0)]=0.157951198757/(o+1.)+(0.634333258693)+(0.543874921901)*0.5**o
            arg[(1, 0, 3, 1)]=-0.792888721834*x[0]**o + (0.53167269635)*x[0] + (-0.563162369901)*x[1]**o + (0.700290641271)*x[1]
            ref[(1, 0, 3, 1)]=-0.563162369901/(o+1.)+(0.61598166881)+(-0.792888721834)*0.5**o
            arg[(1, 0, 3, 2)]=0.772994034528*x[0]**o + (0.346542399463)*x[0] + (-0.0761178242353)*x[1]**o + (-0.565496417294)*x[1]
            ref[(1, 0, 3, 2)]=-0.0761178242353/(o+1.)+(-0.109477008916)+(0.772994034528)*0.5**o
            arg[(1, 1, 0, 0)]=0.0767852816029*x[0]**o + (-0.787816541489)*x[0] + (-0.843531336629)*x[1]**o + (-0.687771730579)*x[1]
            ref[(1, 1, 0, 0)]=-0.843531336629/(o+1.)+(-0.737794136034)+(0.0767852816029)*0.5**o
            arg[(1, 1, 0, 1)]=0.384586862731*x[0]**o + (0.342624217563)*x[0] + (-0.240502111119)*x[1]**o + (-0.341777231041)*x[1]
            ref[(1, 1, 0, 1)]=-0.240502111119/(o+1.)+(0.000423493260935)+(0.384586862731)*0.5**o
            arg[(1, 1, 0, 2)]=0.477265193411*x[0]**o + (-0.180526032228)*x[0] + (-0.815983800055)*x[1]**o + (0.0769170710631)*x[1]
            ref[(1, 1, 0, 2)]=-0.815983800055/(o+1.)+(-0.0518044805827)+(0.477265193411)*0.5**o
            arg[(1, 1, 1, 0)]=-0.611091687698*x[0]**o + (0.332238407038)*x[0] + (0.382494718627)*x[1]**o + (-0.433935737738)*x[1]
            ref[(1, 1, 1, 0)]=0.382494718627/(o+1.)+(-0.0508486653501)+(-0.611091687698)*0.5**o
            arg[(1, 1, 1, 1)]=-0.905350340433*x[0]**o + (-0.451100158021)*x[0] + (0.583473632562)*x[1]**o + (0.435767439228)*x[1]
            ref[(1, 1, 1, 1)]=0.583473632562/(o+1.)+(-0.00766635939654)+(-0.905350340433)*0.5**o
            arg[(1, 1, 1, 2)]=0.307399686744*x[0]**o + (-0.423612642867)*x[0] + (-0.492962741781)*x[1]**o + (-0.481123876534)*x[1]
            ref[(1, 1, 1, 2)]=-0.492962741781/(o+1.)+(-0.4523682597)+(0.307399686744)*0.5**o
            arg[(1, 1, 2, 0)]=0.204632018346*x[0]**o + (-0.104632121208)*x[0] + (-0.117014783611)*x[1]**o + (-0.251578125134)*x[1]
            ref[(1, 1, 2, 0)]=-0.117014783611/(o+1.)+(-0.178105123171)+(0.204632018346)*0.5**o
            arg[(1, 1, 2, 1)]=0.23650967274*x[0]**o + (0.681649458655)*x[0] + (-0.560738944004)*x[1]**o + (-0.825201270563)*x[1]
            ref[(1, 1, 2, 1)]=-0.560738944004/(o+1.)+(-0.0717759059537)+(0.23650967274)*0.5**o
            arg[(1, 1, 2, 2)]=0.193781862672*x[0]**o + (-0.713708549932)*x[0] + (-0.57847419395)*x[1]**o + (0.521705647857)*x[1]
            ref[(1, 1, 2, 2)]=-0.57847419395/(o+1.)+(-0.0960014510375)+(0.193781862672)*0.5**o
            arg[(1, 1, 3, 0)]=-0.764905517492*x[0]**o + (0.437357671516)*x[0] + (0.436182133333)*x[1]**o + (-0.669681219288)*x[1]
            ref[(1, 1, 3, 0)]=0.436182133333/(o+1.)+(-0.116161773886)+(-0.764905517492)*0.5**o
            arg[(1, 1, 3, 1)]=0.792135335229*x[0]**o + (0.121549905292)*x[0] + (0.986133466974)*x[1]**o + (-0.170701810142)*x[1]
            ref[(1, 1, 3, 1)]=0.986133466974/(o+1.)+(-0.0245759524247)+(0.792135335229)*0.5**o
            arg[(1, 1, 3, 2)]=-0.0815781203235*x[0]**o + (-0.288868790989)*x[0] + (-0.106714116732)*x[1]**o + (0.189618603238)*x[1]
            ref[(1, 1, 3, 2)]=-0.106714116732/(o+1.)+(-0.0496250938757)+(-0.0815781203235)*0.5**o
            arg[(1, 2, 0, 0)]=-0.852719033114*x[0]**o + (-0.326607925215)*x[0] + (0.952083543908)*x[1]**o + (-0.335548750618)*x[1]
            ref[(1, 2, 0, 0)]=0.952083543908/(o+1.)+(-0.331078337916)+(-0.852719033114)*0.5**o
            arg[(1, 2, 0, 1)]=0.451249588249*x[0]**o + (0.93802487215)*x[0] + (-0.62015459046)*x[1]**o + (0.389195137823)*x[1]
            ref[(1, 2, 0, 1)]=-0.62015459046/(o+1.)+(0.663610004986)+(0.451249588249)*0.5**o
            arg[(1, 2, 0, 2)]=0.0945309664865*x[0]**o + (0.0598190558794)*x[0] + (-0.0409265644252)*x[1]**o + (0.121247665523)*x[1]
            ref[(1, 2, 0, 2)]=-0.0409265644252/(o+1.)+(0.0905333607011)+(0.0945309664865)*0.5**o
            arg[(1, 2, 1, 0)]=-0.402333555416*x[0]**o + (0.861039581129)*x[0] + (0.171735544263)*x[1]**o + (-0.208500956812)*x[1]
            ref[(1, 2, 1, 0)]=0.171735544263/(o+1.)+(0.326269312159)+(-0.402333555416)*0.5**o
            arg[(1, 2, 1, 1)]=0.986451937768*x[0]**o + (0.894759796479)*x[0] + (0.803168040087)*x[1]**o + (0.636650352521)*x[1]
            ref[(1, 2, 1, 1)]=0.803168040087/(o+1.)+(0.7657050745)+(0.986451937768)*0.5**o
            arg[(1, 2, 1, 2)]=0.615779600238*x[0]**o + (0.330061971475)*x[0] + (-0.123799095483)*x[1]**o + (-0.692559604259)*x[1]
            ref[(1, 2, 1, 2)]=-0.123799095483/(o+1.)+(-0.181248816392)+(0.615779600238)*0.5**o
            arg[(1, 2, 2, 0)]=0.0542200235556*x[0]**o + (-0.908647512638)*x[0] + (0.371192907381)*x[1]**o + (-0.423752359151)*x[1]
            ref[(1, 2, 2, 0)]=0.371192907381/(o+1.)+(-0.666199935895)+(0.0542200235556)*0.5**o
            arg[(1, 2, 2, 1)]=0.681428710717*x[0]**o + (-0.0553195748581)*x[0] + (0.72420179688)*x[1]**o + (0.337105009827)*x[1]
            ref[(1, 2, 2, 1)]=0.72420179688/(o+1.)+(0.140892717484)+(0.681428710717)*0.5**o
            arg[(1, 2, 2, 2)]=-0.723882012488*x[0]**o + (0.566051269952)*x[0] + (-0.426070544877)*x[1]**o + (-0.103509487092)*x[1]
            ref[(1, 2, 2, 2)]=-0.426070544877/(o+1.)+(0.23127089143)+(-0.723882012488)*0.5**o
            arg[(1, 2, 3, 0)]=-0.908679995968*x[0]**o + (0.299123859966)*x[0] + (0.705073543288)*x[1]**o + (-0.0697024439507)*x[1]
            ref[(1, 2, 3, 0)]=0.705073543288/(o+1.)+(0.114710708008)+(-0.908679995968)*0.5**o
            arg[(1, 2, 3, 1)]=-0.332601679834*x[0]**o + (-0.180855131165)*x[0] + (0.414367165736)*x[1]**o + (-0.148162455826)*x[1]
            ref[(1, 2, 3, 1)]=0.414367165736/(o+1.)+(-0.164508793495)+(-0.332601679834)*0.5**o
            arg[(1, 2, 3, 2)]=0.0557035122041*x[0]**o + (0.951035026521)*x[0] + (0.252778933924)*x[1]**o + (-0.494752580713)*x[1]
            ref[(1, 2, 3, 2)]=0.252778933924/(o+1.)+(0.228141222904)+(0.0557035122041)*0.5**o
            arg[(2, 0, 0, 0)]=-0.409103416723*x[0]**o + (0.841821648916)*x[0] + (-0.584243831741)*x[1]**o + (-0.367549658685)*x[1]
            ref[(2, 0, 0, 0)]=-0.584243831741/(o+1.)+(0.237135995115)+(-0.409103416723)*0.5**o
            arg[(2, 0, 0, 1)]=-0.944087488027*x[0]**o + (-0.742501614449)*x[0] + (0.451737008059)*x[1]**o + (0.979644887327)*x[1]
            ref[(2, 0, 0, 1)]=0.451737008059/(o+1.)+(0.118571636439)+(-0.944087488027)*0.5**o
            arg[(2, 0, 0, 2)]=-0.414888533179*x[0]**o + (-0.248028234547)*x[0] + (-0.145956135742)*x[1]**o + (-0.0779834447022)*x[1]
            ref[(2, 0, 0, 2)]=-0.145956135742/(o+1.)+(-0.163005839625)+(-0.414888533179)*0.5**o
            arg[(2, 0, 1, 0)]=0.570083038815*x[0]**o + (0.0397354525775)*x[0] + (-0.411892002415)*x[1]**o + (-0.551384436745)*x[1]
            ref[(2, 0, 1, 0)]=-0.411892002415/(o+1.)+(-0.255824492084)+(0.570083038815)*0.5**o
            arg[(2, 0, 1, 1)]=-0.551350645918*x[0]**o + (0.498746237852)*x[0] + (0.610540640642)*x[1]**o + (-0.037215200291)*x[1]
            ref[(2, 0, 1, 1)]=0.610540640642/(o+1.)+(0.230765518781)+(-0.551350645918)*0.5**o
            arg[(2, 0, 1, 2)]=0.643492521818*x[0]**o + (0.00148470691951)*x[0] + (0.358508695656)*x[1]**o + (0.597698981517)*x[1]
            ref[(2, 0, 1, 2)]=0.358508695656/(o+1.)+(0.299591844218)+(0.643492521818)*0.5**o
            arg[(2, 0, 2, 0)]=-0.367426369617*x[0]**o + (0.921757982801)*x[0] + (-0.76306090593)*x[1]**o + (-0.87740726772)*x[1]
            ref[(2, 0, 2, 0)]=-0.76306090593/(o+1.)+(0.0221753575405)+(-0.367426369617)*0.5**o
            arg[(2, 0, 2, 1)]=0.119072059752*x[0]**o + (-0.825793845129)*x[0] + (0.791192087421)*x[1]**o + (0.108489419495)*x[1]
            ref[(2, 0, 2, 1)]=0.791192087421/(o+1.)+(-0.358652212817)+(0.119072059752)*0.5**o
            arg[(2, 0, 2, 2)]=0.486182990743*x[0]**o + (-0.690220413317)*x[0] + (-0.420567210498)*x[1]**o + (-0.175765679084)*x[1]
            ref[(2, 0, 2, 2)]=-0.420567210498/(o+1.)+(-0.432993046201)+(0.486182990743)*0.5**o
            arg[(2, 0, 3, 0)]=-0.369108162584*x[0]**o + (-0.507368733999)*x[0] + (0.632556629763)*x[1]**o + (-0.715962916995)*x[1]
            ref[(2, 0, 3, 0)]=0.632556629763/(o+1.)+(-0.611665825497)+(-0.369108162584)*0.5**o
            arg[(2, 0, 3, 1)]=-0.441317084805*x[0]**o + (0.514885883366)*x[0] + (-0.622829095788)*x[1]**o + (-0.312366461887)*x[1]
            ref[(2, 0, 3, 1)]=-0.622829095788/(o+1.)+(0.101259710739)+(-0.441317084805)*0.5**o
            arg[(2, 0, 3, 2)]=-0.0910484717242*x[0]**o + (-0.0166848892468)*x[0] + (-0.337091511097)*x[1]**o + (-0.689529285219)*x[1]
            ref[(2, 0, 3, 2)]=-0.337091511097/(o+1.)+(-0.353107087233)+(-0.0910484717242)*0.5**o
            arg[(2, 1, 0, 0)]=-0.597312587809*x[0]**o + (0.0817622697753)*x[0] + (-0.110748325761)*x[1]**o + (0.220083100009)*x[1]
            ref[(2, 1, 0, 0)]=-0.110748325761/(o+1.)+(0.150922684892)+(-0.597312587809)*0.5**o
            arg[(2, 1, 0, 1)]=-0.283250446034*x[0]**o + (-0.715453562289)*x[0] + (-0.372583187906)*x[1]**o + (-0.0946407002961)*x[1]
            ref[(2, 1, 0, 1)]=-0.372583187906/(o+1.)+(-0.405047131293)+(-0.283250446034)*0.5**o
            arg[(2, 1, 0, 2)]=-0.365781196347*x[0]**o + (0.00125770727366)*x[0] + (0.599657547362)*x[1]**o + (0.0697526192824)*x[1]
            ref[(2, 1, 0, 2)]=0.599657547362/(o+1.)+(0.035505163278)+(-0.365781196347)*0.5**o
            arg[(2, 1, 1, 0)]=0.256606785644*x[0]**o + (0.997550858971)*x[0] + (0.212488927237)*x[1]**o + (-0.613346009017)*x[1]
            ref[(2, 1, 1, 0)]=0.212488927237/(o+1.)+(0.192102424977)+(0.256606785644)*0.5**o
            arg[(2, 1, 1, 1)]=0.761245348551*x[0]**o + (-0.835733969825)*x[0] + (0.39013607167)*x[1]**o + (0.786736233478)*x[1]
            ref[(2, 1, 1, 1)]=0.39013607167/(o+1.)+(-0.0244988681735)+(0.761245348551)*0.5**o
            arg[(2, 1, 1, 2)]=0.446664292075*x[0]**o + (0.481753188497)*x[0] + (0.887822992944)*x[1]**o + (-0.0992034613067)*x[1]
            ref[(2, 1, 1, 2)]=0.887822992944/(o+1.)+(0.191274863595)+(0.446664292075)*0.5**o
            arg[(2, 1, 2, 0)]=-0.648302298643*x[0]**o + (0.754629491284)*x[0] + (0.864819700411)*x[1]**o + (0.906639572682)*x[1]
            ref[(2, 1, 2, 0)]=0.864819700411/(o+1.)+(0.830634531983)+(-0.648302298643)*0.5**o
            arg[(2, 1, 2, 1)]=0.485634516767*x[0]**o + (-0.85216918215)*x[0] + (0.41395569649)*x[1]**o + (0.922524310145)*x[1]
            ref[(2, 1, 2, 1)]=0.41395569649/(o+1.)+(0.0351775639977)+(0.485634516767)*0.5**o
            arg[(2, 1, 2, 2)]=0.84584948923*x[0]**o + (0.656502987957)*x[0] + (-0.00771789649105)*x[1]**o + (0.36893760539)*x[1]
            ref[(2, 1, 2, 2)]=-0.00771789649105/(o+1.)+(0.512720296674)+(0.84584948923)*0.5**o
            arg[(2, 1, 3, 0)]=-0.170289794591*x[0]**o + (0.75771703716)*x[0] + (0.413565533079)*x[1]**o + (-0.539887130815)*x[1]
            ref[(2, 1, 3, 0)]=0.413565533079/(o+1.)+(0.108914953173)+(-0.170289794591)*0.5**o
            arg[(2, 1, 3, 1)]=-0.49151434924*x[0]**o + (-0.0439139393541)*x[0] + (0.973555273757)*x[1]**o + (-0.55582369083)*x[1]
            ref[(2, 1, 3, 1)]=0.973555273757/(o+1.)+(-0.299868815092)+(-0.49151434924)*0.5**o
            arg[(2, 1, 3, 2)]=-0.379076043801*x[0]**o + (-0.273327976572)*x[0] + (0.453672993109)*x[1]**o + (0.108111716402)*x[1]
            ref[(2, 1, 3, 2)]=0.453672993109/(o+1.)+(-0.0826081300851)+(-0.379076043801)*0.5**o
            arg[(2, 2, 0, 0)]=-0.193389305342*x[0]**o + (0.161234984927)*x[0] + (-0.0493594704276)*x[1]**o + (0.852587273287)*x[1]
            ref[(2, 2, 0, 0)]=-0.0493594704276/(o+1.)+(0.506911129107)+(-0.193389305342)*0.5**o
            arg[(2, 2, 0, 1)]=0.629967514032*x[0]**o + (-0.958991629403)*x[0] + (-0.0718580376851)*x[1]**o + (-0.511497095198)*x[1]
            ref[(2, 2, 0, 1)]=-0.0718580376851/(o+1.)+(-0.735244362301)+(0.629967514032)*0.5**o
            arg[(2, 2, 0, 2)]=0.747522813912*x[0]**o + (-0.683439813928)*x[0] + (0.345301337134)*x[1]**o + (-0.332763227171)*x[1]
            ref[(2, 2, 0, 2)]=0.345301337134/(o+1.)+(-0.50810152055)+(0.747522813912)*0.5**o
            arg[(2, 2, 1, 0)]=0.651721435348*x[0]**o + (0.386696312885)*x[0] + (0.835627502028)*x[1]**o + (0.350972591645)*x[1]
            ref[(2, 2, 1, 0)]=0.835627502028/(o+1.)+(0.368834452265)+(0.651721435348)*0.5**o
            arg[(2, 2, 1, 1)]=0.456015537426*x[0]**o + (-0.564480085298)*x[0] + (0.452034210861)*x[1]**o + (-0.00281255935368)*x[1]
            ref[(2, 2, 1, 1)]=0.452034210861/(o+1.)+(-0.283646322326)+(0.456015537426)*0.5**o
            arg[(2, 2, 1, 2)]=-0.167568230768*x[0]**o + (0.63214306521)*x[0] + (-0.149347685634)*x[1]**o + (0.721091432778)*x[1]
            ref[(2, 2, 1, 2)]=-0.149347685634/(o+1.)+(0.676617248994)+(-0.167568230768)*0.5**o
            arg[(2, 2, 2, 0)]=0.78388521604*x[0]**o + (-0.315500181532)*x[0] + (0.713561833247)*x[1]**o + (0.16640931872)*x[1]
            ref[(2, 2, 2, 0)]=0.713561833247/(o+1.)+(-0.0745454314058)+(0.78388521604)*0.5**o
            arg[(2, 2, 2, 1)]=-0.43727290902*x[0]**o + (0.439885054346)*x[0] + (-0.731544805603)*x[1]**o + (-0.877928717867)*x[1]
            ref[(2, 2, 2, 1)]=-0.731544805603/(o+1.)+(-0.219021831761)+(-0.43727290902)*0.5**o
            arg[(2, 2, 2, 2)]=-0.866920415183*x[0]**o + (0.470330987375)*x[0] + (0.746701805037)*x[1]**o + (-0.117897291432)*x[1]
            ref[(2, 2, 2, 2)]=0.746701805037/(o+1.)+(0.176216847971)+(-0.866920415183)*0.5**o
            arg[(2, 2, 3, 0)]=0.253607939809*x[0]**o + (0.246745318316)*x[0] + (0.117653571384)*x[1]**o + (0.530148448055)*x[1]
            ref[(2, 2, 3, 0)]=0.117653571384/(o+1.)+(0.388446883186)+(0.253607939809)*0.5**o
            arg[(2, 2, 3, 1)]=0.756334584353*x[0]**o + (-0.500852128461)*x[0] + (-0.455252060505)*x[1]**o + (-0.432020757457)*x[1]
            ref[(2, 2, 3, 1)]=-0.455252060505/(o+1.)+(-0.466436442959)+(0.756334584353)*0.5**o
            arg[(2, 2, 3, 2)]=-0.881058981239*x[0]**o + (-0.504204587854)*x[0] + (0.354054443449)*x[1]**o + (-0.693415016549)*x[1]
            ref[(2, 2, 3, 2)]=0.354054443449/(o+1.)+(-0.598809802202)+(-0.881058981239)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=0.449109414916*x[0]**o + (-0.295382383795)*x[0] + (-0.892187970975)*x[1]**o + (-0.692815166207)*x[1] + (0.700171704338)*x[2]**o + (-0.56507152922)*x[2]
            ref[(0, 0, 0, 0)]=-0.192016266638/(o+1.)+(-0.776634539611)+(0.449109414916)*0.5**o
            arg[(0, 0, 0, 1)]=-0.600481592704*x[0]**o + (-0.750640721098)*x[0] + (0.655755316895)*x[1]**o + (0.175943636503)*x[1] + (0.818177877779)*x[2]**o + (0.183088668175)*x[2]
            ref[(0, 0, 0, 1)]=1.47393319467/(o+1.)+(-0.19580420821)+(-0.600481592704)*0.5**o
            arg[(0, 0, 0, 2)]=-0.786281116572*x[0]**o + (0.557216879439)*x[0] + (-0.406174705742)*x[1]**o + (-0.318704366135)*x[1] + (0.331355145203)*x[2]**o + (-0.355925793523)*x[2]
            ref[(0, 0, 0, 2)]=-0.0748195605391/(o+1.)+(-0.0587066401094)+(-0.786281116572)*0.5**o
            arg[(0, 0, 1, 0)]=0.323825497056*x[0]**o + (-0.188524921259)*x[0] + (-0.398137162645)*x[1]**o + (-0.776475909174)*x[1] + (0.00949878807337)*x[2]**o + (0.0796514833306)*x[2]
            ref[(0, 0, 1, 0)]=-0.388638374572/(o+1.)+(-0.442674673551)+(0.323825497056)*0.5**o
            arg[(0, 0, 1, 1)]=-0.670701191872*x[0]**o + (-0.378388990965)*x[0] + (0.667344943025)*x[1]**o + (-0.946340467487)*x[1] + (0.628301714692)*x[2]**o + (0.037136069642)*x[2]
            ref[(0, 0, 1, 1)]=1.29564665772/(o+1.)+(-0.643796694405)+(-0.670701191872)*0.5**o
            arg[(0, 0, 1, 2)]=0.283695594467*x[0]**o + (-0.849482432791)*x[0] + (-0.627902089989)*x[1]**o + (0.681582048604)*x[1] + (0.923514123971)*x[2]**o + (-0.652245497636)*x[2]
            ref[(0, 0, 1, 2)]=0.295612033982/(o+1.)+(-0.410072940911)+(0.283695594467)*0.5**o
            arg[(0, 0, 2, 0)]=0.104491717408*x[0]**o + (-0.115988123487)*x[0] + (0.926298730939)*x[1]**o + (-0.496117246217)*x[1] + (-0.0775694636877)*x[2]**o + (-0.0568420381901)*x[2]
            ref[(0, 0, 2, 0)]=0.848729267251/(o+1.)+(-0.334473703947)+(0.104491717408)*0.5**o
            arg[(0, 0, 2, 1)]=-0.868804315181*x[0]**o + (0.56342822638)*x[0] + (-0.608091008856)*x[1]**o + (0.371012697492)*x[1] + (-0.60245455034)*x[2]**o + (-0.780243296307)*x[2]
            ref[(0, 0, 2, 1)]=-1.2105455592/(o+1.)+(0.0770988137822)+(-0.868804315181)*0.5**o
            arg[(0, 0, 2, 2)]=0.822109580144*x[0]**o + (0.631054241334)*x[0] + (-0.297855809916)*x[1]**o + (0.62940789624)*x[1] + (0.0200968540998)*x[2]**o + (0.92953619707)*x[2]
            ref[(0, 0, 2, 2)]=-0.277758955816/(o+1.)+(1.09499916732)+(0.822109580144)*0.5**o
            arg[(0, 0, 3, 0)]=0.855356815091*x[0]**o + (0.947009741482)*x[0] + (-0.727505629657)*x[1]**o + (-0.441489000965)*x[1] + (0.758634748704)*x[2]**o + (-0.619320392415)*x[2]
            ref[(0, 0, 3, 0)]=0.0311291190472/(o+1.)+(-0.0568998259492)+(0.855356815091)*0.5**o
            arg[(0, 0, 3, 1)]=-0.995309438196*x[0]**o + (0.855441088961)*x[0] + (0.900735092165)*x[1]**o + (-0.472711541687)*x[1] + (-0.352744692379)*x[2]**o + (-0.0720467745266)*x[2]
            ref[(0, 0, 3, 1)]=0.547990399786/(o+1.)+(0.155341386374)+(-0.995309438196)*0.5**o
            arg[(0, 0, 3, 2)]=0.437256775115*x[0]**o + (0.55261715311)*x[0] + (-0.559861167574)*x[1]**o + (0.64820644951)*x[1] + (-0.875513479987)*x[2]**o + (-0.875446752787)*x[2]
            ref[(0, 0, 3, 2)]=-1.43537464756/(o+1.)+(0.162688424916)+(0.437256775115)*0.5**o
            arg[(0, 1, 0, 0)]=0.945196669908*x[0]**o + (0.0881814128657)*x[0] + (0.111474193583)*x[1]**o + (-0.21905948171)*x[1] + (0.302818500055)*x[2]**o + (0.992703264824)*x[2]
            ref[(0, 1, 0, 0)]=0.414292693638/(o+1.)+(0.43091259799)+(0.945196669908)*0.5**o
            arg[(0, 1, 0, 1)]=0.0565494555648*x[0]**o + (-0.646172590725)*x[0] + (0.442667491013)*x[1]**o + (-0.0653938182558)*x[1] + (0.890017079642)*x[2]**o + (-0.114433845809)*x[2]
            ref[(0, 1, 0, 1)]=1.33268457066/(o+1.)+(-0.413000127395)+(0.0565494555648)*0.5**o
            arg[(0, 1, 0, 2)]=-0.351835121876*x[0]**o + (-0.220677143291)*x[0] + (-0.0306801548484)*x[1]**o + (0.528239491689)*x[1] + (-0.905821141149)*x[2]**o + (-0.131877239976)*x[2]
            ref[(0, 1, 0, 2)]=-0.936501295997/(o+1.)+(0.0878425542113)+(-0.351835121876)*0.5**o
            arg[(0, 1, 1, 0)]=0.122111646112*x[0]**o + (0.509844651997)*x[0] + (0.519489159898)*x[1]**o + (0.578565707151)*x[1] + (0.659754964072)*x[2]**o + (0.797581794312)*x[2]
            ref[(0, 1, 1, 0)]=1.17924412397/(o+1.)+(0.94299607673)+(0.122111646112)*0.5**o
            arg[(0, 1, 1, 1)]=-0.341347332952*x[0]**o + (-0.963127427455)*x[0] + (-0.692521194315)*x[1]**o + (-0.760461725495)*x[1] + (-0.60151128723)*x[2]**o + (-0.092701441275)*x[2]
            ref[(0, 1, 1, 1)]=-1.29403248154/(o+1.)+(-0.908145297112)+(-0.341347332952)*0.5**o
            arg[(0, 1, 1, 2)]=-0.383543764857*x[0]**o + (-0.660956337228)*x[0] + (0.782252193442)*x[1]**o + (0.171653981011)*x[1] + (0.526059496852)*x[2]**o + (-0.642776989729)*x[2]
            ref[(0, 1, 1, 2)]=1.30831169029/(o+1.)+(-0.566039672973)+(-0.383543764857)*0.5**o
            arg[(0, 1, 2, 0)]=0.153245864276*x[0]**o + (0.976046730205)*x[0] + (0.527042224052)*x[1]**o + (0.321543835228)*x[1] + (-0.435022792005)*x[2]**o + (-0.649993015066)*x[2]
            ref[(0, 1, 2, 0)]=0.0920194320468/(o+1.)+(0.323798775183)+(0.153245864276)*0.5**o
            arg[(0, 1, 2, 1)]=-0.257124983456*x[0]**o + (-0.536493078996)*x[0] + (-0.400653677173)*x[1]**o + (0.351983963969)*x[1] + (-0.249695912084)*x[2]**o + (-0.0877959160492)*x[2]
            ref[(0, 1, 2, 1)]=-0.650349589257/(o+1.)+(-0.136152515538)+(-0.257124983456)*0.5**o
            arg[(0, 1, 2, 2)]=0.0858820347347*x[0]**o + (0.361144589102)*x[0] + (-0.440180357577)*x[1]**o + (0.92996182875)*x[1] + (0.92203913915)*x[2]**o + (0.92697255079)*x[2]
            ref[(0, 1, 2, 2)]=0.481858781573/(o+1.)+(1.10903948432)+(0.0858820347347)*0.5**o
            arg[(0, 1, 3, 0)]=0.203245255149*x[0]**o + (0.0763082170839)*x[0] + (0.625812895533)*x[1]**o + (-0.960998782218)*x[1] + (-0.344669241004)*x[2]**o + (-0.960630134516)*x[2]
            ref[(0, 1, 3, 0)]=0.281143654529/(o+1.)+(-0.922660349825)+(0.203245255149)*0.5**o
            arg[(0, 1, 3, 1)]=0.542616514702*x[0]**o + (0.156573501583)*x[0] + (-0.508965684492)*x[1]**o + (-0.591438502145)*x[1] + (0.134183486081)*x[2]**o + (-0.959072481388)*x[2]
            ref[(0, 1, 3, 1)]=-0.374782198412/(o+1.)+(-0.696968740975)+(0.542616514702)*0.5**o
            arg[(0, 1, 3, 2)]=0.899468986612*x[0]**o + (-0.57567924299)*x[0] + (0.218845305702)*x[1]**o + (0.269897665858)*x[1] + (0.250143901875)*x[2]**o + (0.461434381592)*x[2]
            ref[(0, 1, 3, 2)]=0.468989207576/(o+1.)+(0.0778264022305)+(0.899468986612)*0.5**o
            arg[(0, 2, 0, 0)]=0.484913798947*x[0]**o + (0.191316317412)*x[0] + (-0.931150357856)*x[1]**o + (0.483235159794)*x[1] + (0.974783370861)*x[2]**o + (-0.948928767567)*x[2]
            ref[(0, 2, 0, 0)]=0.0436330130044/(o+1.)+(-0.13718864518)+(0.484913798947)*0.5**o
            arg[(0, 2, 0, 1)]=-0.975236987536*x[0]**o + (0.104958851752)*x[0] + (0.700178847813)*x[1]**o + (-0.993835707526)*x[1] + (-0.312769940503)*x[2]**o + (0.963201842116)*x[2]
            ref[(0, 2, 0, 1)]=0.38740890731/(o+1.)+(0.0371624931707)+(-0.975236987536)*0.5**o
            arg[(0, 2, 0, 2)]=-0.902987112869*x[0]**o + (0.668420983806)*x[0] + (-0.196948193273)*x[1]**o + (0.319314514631)*x[1] + (-0.679198765502)*x[2]**o + (-0.665545798423)*x[2]
            ref[(0, 2, 0, 2)]=-0.876146958775/(o+1.)+(0.161094850007)+(-0.902987112869)*0.5**o
            arg[(0, 2, 1, 0)]=0.00169674955324*x[0]**o + (0.436671563979)*x[0] + (0.929685066146)*x[1]**o + (-0.99089574976)*x[1] + (0.440235672619)*x[2]**o + (-0.606849842274)*x[2]
            ref[(0, 2, 1, 0)]=1.36992073877/(o+1.)+(-0.580537014028)+(0.00169674955324)*0.5**o
            arg[(0, 2, 1, 1)]=-0.216458706289*x[0]**o + (-0.175915122279)*x[0] + (0.354169591446)*x[1]**o + (0.910860168539)*x[1] + (0.990406451494)*x[2]**o + (0.25623300101)*x[2]
            ref[(0, 2, 1, 1)]=1.34457604294/(o+1.)+(0.495589023635)+(-0.216458706289)*0.5**o
            arg[(0, 2, 1, 2)]=0.837796941524*x[0]**o + (0.497928945174)*x[0] + (-0.79540983083)*x[1]**o + (-0.176916797968)*x[1] + (-0.323445728233)*x[2]**o + (0.784054335968)*x[2]
            ref[(0, 2, 1, 2)]=-1.11885555906/(o+1.)+(0.552533241587)+(0.837796941524)*0.5**o
            arg[(0, 2, 2, 0)]=-0.793677259401*x[0]**o + (0.417608014851)*x[0] + (-0.178528962753)*x[1]**o + (-0.802878280625)*x[1] + (-0.549558568383)*x[2]**o + (0.804226129144)*x[2]
            ref[(0, 2, 2, 0)]=-0.728087531136/(o+1.)+(0.209477931685)+(-0.793677259401)*0.5**o
            arg[(0, 2, 2, 1)]=0.452810270675*x[0]**o + (0.0305874699554)*x[0] + (0.972667302347)*x[1]**o + (0.0612259077403)*x[1] + (-0.827149091418)*x[2]**o + (-0.803970816617)*x[2]
            ref[(0, 2, 2, 1)]=0.145518210929/(o+1.)+(-0.356078719461)+(0.452810270675)*0.5**o
            arg[(0, 2, 2, 2)]=-0.172534198987*x[0]**o + (0.85467759815)*x[0] + (-0.495672106493)*x[1]**o + (0.772940485887)*x[1] + (-0.158895308291)*x[2]**o + (-0.758729138078)*x[2]
            ref[(0, 2, 2, 2)]=-0.654567414784/(o+1.)+(0.434444472979)+(-0.172534198987)*0.5**o
            arg[(0, 2, 3, 0)]=-0.41775806491*x[0]**o + (-0.965347375557)*x[0] + (-0.346201234309)*x[1]**o + (-0.477714989743)*x[1] + (0.932621564557)*x[2]**o + (-0.043408084292)*x[2]
            ref[(0, 2, 3, 0)]=0.586420330247/(o+1.)+(-0.743235224796)+(-0.41775806491)*0.5**o
            arg[(0, 2, 3, 1)]=0.0932862242858*x[0]**o + (0.633210912173)*x[0] + (-0.224303386359)*x[1]**o + (0.151157503241)*x[1] + (0.929856299898)*x[2]**o + (0.208806277008)*x[2]
            ref[(0, 2, 3, 1)]=0.705552913539/(o+1.)+(0.496587346211)+(0.0932862242858)*0.5**o
            arg[(0, 2, 3, 2)]=0.569881561658*x[0]**o + (0.704437957429)*x[0] + (0.361184091414)*x[1]**o + (0.387811827556)*x[1] + (-0.181542604979)*x[2]**o + (-0.375683813842)*x[2]
            ref[(0, 2, 3, 2)]=0.179641486435/(o+1.)+(0.358282985572)+(0.569881561658)*0.5**o
            arg[(1, 0, 0, 0)]=-0.11029751431*x[0]**o + (0.8064977217)*x[0] + (-0.207662684844)*x[1]**o + (-0.677385293431)*x[1] + (0.968817827925)*x[2]**o + (-0.556468052294)*x[2]
            ref[(1, 0, 0, 0)]=0.761155143081/(o+1.)+(-0.213677812012)+(-0.11029751431)*0.5**o
            arg[(1, 0, 0, 1)]=-0.213808410856*x[0]**o + (0.0568751099526)*x[0] + (0.414119424544)*x[1]**o + (-0.693306757935)*x[1] + (0.014714532911)*x[2]**o + (0.343272149291)*x[2]
            ref[(1, 0, 0, 1)]=0.428833957455/(o+1.)+(-0.146579749346)+(-0.213808410856)*0.5**o
            arg[(1, 0, 0, 2)]=-0.139684764637*x[0]**o + (-0.621200126294)*x[0] + (0.0412034141009)*x[1]**o + (-0.333078433156)*x[1] + (-0.139050242041)*x[2]**o + (0.0580088151789)*x[2]
            ref[(1, 0, 0, 2)]=-0.0978468279403/(o+1.)+(-0.448134872135)+(-0.139684764637)*0.5**o
            arg[(1, 0, 1, 0)]=0.0735786461116*x[0]**o + (0.711575381127)*x[0] + (0.102403512279)*x[1]**o + (0.805589715052)*x[1] + (0.260386473524)*x[2]**o + (0.0309081412601)*x[2]
            ref[(1, 0, 1, 0)]=0.362789985803/(o+1.)+(0.77403661872)+(0.0735786461116)*0.5**o
            arg[(1, 0, 1, 1)]=-0.292772276075*x[0]**o + (-0.125955036816)*x[0] + (-0.259524267299)*x[1]**o + (0.0130292153334)*x[1] + (-0.945991004455)*x[2]**o + (0.99043693243)*x[2]
            ref[(1, 0, 1, 1)]=-1.20551527175/(o+1.)+(0.438755555474)+(-0.292772276075)*0.5**o
            arg[(1, 0, 1, 2)]=-0.600598549091*x[0]**o + (0.285390993329)*x[0] + (-0.853835841567)*x[1]**o + (0.227393379023)*x[1] + (-0.538585155082)*x[2]**o + (-0.694642420662)*x[2]
            ref[(1, 0, 1, 2)]=-1.39242099665/(o+1.)+(-0.090929024155)+(-0.600598549091)*0.5**o
            arg[(1, 0, 2, 0)]=-0.0380684200352*x[0]**o + (-0.7370243806)*x[0] + (0.598256153359)*x[1]**o + (-0.266986632096)*x[1] + (-0.525947266881)*x[2]**o + (0.650835875231)*x[2]
            ref[(1, 0, 2, 0)]=0.0723088864787/(o+1.)+(-0.176587568733)+(-0.0380684200352)*0.5**o
            arg[(1, 0, 2, 1)]=-0.468768349292*x[0]**o + (-0.885229223759)*x[0] + (0.438947344698)*x[1]**o + (0.838876370101)*x[1] + (-0.820703546203)*x[2]**o + (-0.599757055453)*x[2]
            ref[(1, 0, 2, 1)]=-0.381756201505/(o+1.)+(-0.323054954555)+(-0.468768349292)*0.5**o
            arg[(1, 0, 2, 2)]=0.965768909444*x[0]**o + (-0.0458818272684)*x[0] + (-0.467012012411)*x[1]**o + (-0.991952735308)*x[1] + (-0.992263408064)*x[2]**o + (0.692471014693)*x[2]
            ref[(1, 0, 2, 2)]=-1.45927542047/(o+1.)+(-0.172681773941)+(0.965768909444)*0.5**o
            arg[(1, 0, 3, 0)]=-0.267209723654*x[0]**o + (0.032197003653)*x[0] + (-0.019435451769)*x[1]**o + (0.80873765731)*x[1] + (-0.699773778002)*x[2]**o + (0.91506464955)*x[2]
            ref[(1, 0, 3, 0)]=-0.719209229771/(o+1.)+(0.877999655257)+(-0.267209723654)*0.5**o
            arg[(1, 0, 3, 1)]=0.920693720306*x[0]**o + (-0.412950347034)*x[0] + (-0.800731440035)*x[1]**o + (0.0579842837377)*x[1] + (0.595168742252)*x[2]**o + (-0.600005537223)*x[2]
            ref[(1, 0, 3, 1)]=-0.205562697782/(o+1.)+(-0.477485800259)+(0.920693720306)*0.5**o
            arg[(1, 0, 3, 2)]=-0.511163896602*x[0]**o + (0.859481603713)*x[0] + (0.0370423838729)*x[1]**o + (0.150198107106)*x[1] + (0.898372323516)*x[2]**o + (0.900026633546)*x[2]
            ref[(1, 0, 3, 2)]=0.935414707389/(o+1.)+(0.954853172183)+(-0.511163896602)*0.5**o
            arg[(1, 1, 0, 0)]=-0.901671747746*x[0]**o + (0.814374521689)*x[0] + (-0.170072996847)*x[1]**o + (-0.973770058733)*x[1] + (0.0269223753545)*x[2]**o + (-0.734545202206)*x[2]
            ref[(1, 1, 0, 0)]=-0.143150621492/(o+1.)+(-0.446970369625)+(-0.901671747746)*0.5**o
            arg[(1, 1, 0, 1)]=0.564139940593*x[0]**o + (-0.622743505222)*x[0] + (-0.495643925688)*x[1]**o + (0.413559192285)*x[1] + (0.238056454929)*x[2]**o + (-0.459316588052)*x[2]
            ref[(1, 1, 0, 1)]=-0.257587470759/(o+1.)+(-0.334250450495)+(0.564139940593)*0.5**o
            arg[(1, 1, 0, 2)]=-0.714406589678*x[0]**o + (0.204833960953)*x[0] + (-0.573748659977)*x[1]**o + (0.452588890235)*x[1] + (0.259732968081)*x[2]**o + (0.0781035932935)*x[2]
            ref[(1, 1, 0, 2)]=-0.314015691897/(o+1.)+(0.367763222241)+(-0.714406589678)*0.5**o
            arg[(1, 1, 1, 0)]=-0.529276273095*x[0]**o + (0.509330575649)*x[0] + (-0.824971058297)*x[1]**o + (0.252690005713)*x[1] + (0.357363203966)*x[2]**o + (-0.562730487315)*x[2]
            ref[(1, 1, 1, 0)]=-0.467607854331/(o+1.)+(0.0996450470236)+(-0.529276273095)*0.5**o
            arg[(1, 1, 1, 1)]=-0.160314582179*x[0]**o + (-0.0210894885614)*x[0] + (-0.841735421715)*x[1]**o + (0.883178024108)*x[1] + (0.727917792313)*x[2]**o + (0.99511779435)*x[2]
            ref[(1, 1, 1, 1)]=-0.113817629402/(o+1.)+(0.928603164949)+(-0.160314582179)*0.5**o
            arg[(1, 1, 1, 2)]=-0.610114418973*x[0]**o + (0.38310985907)*x[0] + (0.238194861312)*x[1]**o + (0.983741006047)*x[1] + (-0.907649249411)*x[2]**o + (-0.439533118097)*x[2]
            ref[(1, 1, 1, 2)]=-0.669454388099/(o+1.)+(0.46365887351)+(-0.610114418973)*0.5**o
            arg[(1, 1, 2, 0)]=-0.950447536837*x[0]**o + (-0.74436013818)*x[0] + (0.139327255136)*x[1]**o + (-0.420987271764)*x[1] + (0.106513688742)*x[2]**o + (0.351579858459)*x[2]
            ref[(1, 1, 2, 0)]=0.245840943878/(o+1.)+(-0.406883775743)+(-0.950447536837)*0.5**o
            arg[(1, 1, 2, 1)]=-0.475853900018*x[0]**o + (-0.00680410966255)*x[0] + (-0.531085518818)*x[1]**o + (-0.370755465868)*x[1] + (-0.151034716591)*x[2]**o + (0.97201917201)*x[2]
            ref[(1, 1, 2, 1)]=-0.682120235409/(o+1.)+(0.29722979824)+(-0.475853900018)*0.5**o
            arg[(1, 1, 2, 2)]=-0.186464434834*x[0]**o + (-0.755603563631)*x[0] + (-0.601542365657)*x[1]**o + (0.830753488927)*x[1] + (-0.972022973073)*x[2]**o + (0.485963174533)*x[2]
            ref[(1, 1, 2, 2)]=-1.57356533873/(o+1.)+(0.280556549915)+(-0.186464434834)*0.5**o
            arg[(1, 1, 3, 0)]=0.802576398626*x[0]**o + (0.0451433513075)*x[0] + (0.576103517728)*x[1]**o + (0.616841529969)*x[1] + (-0.999434706135)*x[2]**o + (-0.27581038549)*x[2]
            ref[(1, 1, 3, 0)]=-0.423331188407/(o+1.)+(0.193087247893)+(0.802576398626)*0.5**o
            arg[(1, 1, 3, 1)]=0.387008330294*x[0]**o + (-0.174795289352)*x[0] + (0.150550585691)*x[1]**o + (-0.35755095045)*x[1] + (0.634322141421)*x[2]**o + (-0.684720007339)*x[2]
            ref[(1, 1, 3, 1)]=0.784872727113/(o+1.)+(-0.608533123571)+(0.387008330294)*0.5**o
            arg[(1, 1, 3, 2)]=-0.0146564587759*x[0]**o + (0.383232335782)*x[0] + (0.386848760694)*x[1]**o + (-0.0842492183625)*x[1] + (0.014775293608)*x[2]**o + (-0.12314226866)*x[2]
            ref[(1, 1, 3, 2)]=0.401624054302/(o+1.)+(0.0879204243794)+(-0.0146564587759)*0.5**o
            arg[(1, 2, 0, 0)]=0.511207295364*x[0]**o + (0.997892155932)*x[0] + (0.283069176224)*x[1]**o + (-0.0656962833313)*x[1] + (-0.843327143304)*x[2]**o + (-0.0741433545903)*x[2]
            ref[(1, 2, 0, 0)]=-0.56025796708/(o+1.)+(0.429026259005)+(0.511207295364)*0.5**o
            arg[(1, 2, 0, 1)]=-0.0512004228611*x[0]**o + (0.330802495203)*x[0] + (-0.698365155334)*x[1]**o + (0.386793529785)*x[1] + (-0.0442837408424)*x[2]**o + (0.789064535832)*x[2]
            ref[(1, 2, 0, 1)]=-0.742648896177/(o+1.)+(0.75333028041)+(-0.0512004228611)*0.5**o
            arg[(1, 2, 0, 2)]=0.634485672628*x[0]**o + (-0.557726373881)*x[0] + (0.688581033778)*x[1]**o + (-0.687508355201)*x[1] + (-0.582614539508)*x[2]**o + (-0.9325196771)*x[2]
            ref[(1, 2, 0, 2)]=0.10596649427/(o+1.)+(-1.08887720309)+(0.634485672628)*0.5**o
            arg[(1, 2, 1, 0)]=-0.922693565435*x[0]**o + (0.156951290764)*x[0] + (0.000532653498781)*x[1]**o + (-0.712719910398)*x[1] + (-0.348160675573)*x[2]**o + (-0.904289718691)*x[2]
            ref[(1, 2, 1, 0)]=-0.347628022075/(o+1.)+(-0.730029169162)+(-0.922693565435)*0.5**o
            arg[(1, 2, 1, 1)]=-0.3150933622*x[0]**o + (-0.0641430155827)*x[0] + (0.119471556746)*x[1]**o + (-0.193426642367)*x[1] + (-0.595491667246)*x[2]**o + (0.0122002346431)*x[2]
            ref[(1, 2, 1, 1)]=-0.4760201105/(o+1.)+(-0.122684711653)+(-0.3150933622)*0.5**o
            arg[(1, 2, 1, 2)]=-0.778410751559*x[0]**o + (-0.301863843557)*x[0] + (-0.615267225923)*x[1]**o + (-0.307963037303)*x[1] + (-0.455558811124)*x[2]**o + (-0.623400069201)*x[2]
            ref[(1, 2, 1, 2)]=-1.07082603705/(o+1.)+(-0.616613475031)+(-0.778410751559)*0.5**o
            arg[(1, 2, 2, 0)]=0.67479910664*x[0]**o + (0.0908453698698)*x[0] + (0.922505683591)*x[1]**o + (0.948499733641)*x[1] + (-0.55196258053)*x[2]**o + (-0.984310217476)*x[2]
            ref[(1, 2, 2, 0)]=0.370543103062/(o+1.)+(0.0275174430177)+(0.67479910664)*0.5**o
            arg[(1, 2, 2, 1)]=0.817390210916*x[0]**o + (0.453219601908)*x[0] + (0.507825203665)*x[1]**o + (-0.198505014117)*x[1] + (0.0117113518701)*x[2]**o + (0.838371254705)*x[2]
            ref[(1, 2, 2, 1)]=0.519536555536/(o+1.)+(0.546542921248)+(0.817390210916)*0.5**o
            arg[(1, 2, 2, 2)]=0.646917613813*x[0]**o + (-0.686880849747)*x[0] + (-0.401699247613)*x[1]**o + (-0.684220577047)*x[1] + (-0.687802438475)*x[2]**o + (0.405946538942)*x[2]
            ref[(1, 2, 2, 2)]=-1.08950168609/(o+1.)+(-0.482577443926)+(0.646917613813)*0.5**o
            arg[(1, 2, 3, 0)]=0.794430030744*x[0]**o + (-0.319784788052)*x[0] + (-0.222200864151)*x[1]**o + (0.405555665706)*x[1] + (-0.273836440037)*x[2]**o + (0.671637407743)*x[2]
            ref[(1, 2, 3, 0)]=-0.496037304188/(o+1.)+(0.378704142699)+(0.794430030744)*0.5**o
            arg[(1, 2, 3, 1)]=0.270661315757*x[0]**o + (-0.0939108931301)*x[0] + (-0.919635433671)*x[1]**o + (0.566370932463)*x[1] + (0.813865345093)*x[2]**o + (0.582884495464)*x[2]
            ref[(1, 2, 3, 1)]=-0.105770088578/(o+1.)+(0.527672267398)+(0.270661315757)*0.5**o
            arg[(1, 2, 3, 2)]=-0.697327988346*x[0]**o + (-0.0912170243077)*x[0] + (-0.364535156946)*x[1]**o + (0.799732821958)*x[1] + (-0.631971951277)*x[2]**o + (0.724251402357)*x[2]
            ref[(1, 2, 3, 2)]=-0.996507108223/(o+1.)+(0.716383600004)+(-0.697327988346)*0.5**o
            arg[(2, 0, 0, 0)]=-0.882077895643*x[0]**o + (-0.863541782153)*x[0] + (-0.435511384684)*x[1]**o + (-0.643424882808)*x[1] + (0.578261865843)*x[2]**o + (-0.52298049737)*x[2]
            ref[(2, 0, 0, 0)]=0.142750481159/(o+1.)+(-1.01497358117)+(-0.882077895643)*0.5**o
            arg[(2, 0, 0, 1)]=-0.307872051156*x[0]**o + (-0.0111658665147)*x[0] + (0.34345262688)*x[1]**o + (-0.452773981773)*x[1] + (-0.83423503577)*x[2]**o + (-0.783658296923)*x[2]
            ref[(2, 0, 0, 1)]=-0.49078240889/(o+1.)+(-0.623799072605)+(-0.307872051156)*0.5**o
            arg[(2, 0, 0, 2)]=-0.120770775961*x[0]**o + (-0.0829975154743)*x[0] + (0.904494748034)*x[1]**o + (-0.509166718608)*x[1] + (0.651378079566)*x[2]**o + (-0.21802756941)*x[2]
            ref[(2, 0, 0, 2)]=1.5558728276/(o+1.)+(-0.405095901746)+(-0.120770775961)*0.5**o
            arg[(2, 0, 1, 0)]=-0.642647614773*x[0]**o + (-0.393711783247)*x[0] + (0.519221263868)*x[1]**o + (0.989416445948)*x[1] + (0.448655040645)*x[2]**o + (-0.875000788872)*x[2]
            ref[(2, 0, 1, 0)]=0.967876304512/(o+1.)+(-0.139648063086)+(-0.642647614773)*0.5**o
            arg[(2, 0, 1, 1)]=0.857428015696*x[0]**o + (-0.212156486397)*x[0] + (0.978784033807)*x[1]**o + (-0.96835079817)*x[1] + (0.280070863684)*x[2]**o + (-0.0114035878077)*x[2]
            ref[(2, 0, 1, 1)]=1.25885489749/(o+1.)+(-0.595955436187)+(0.857428015696)*0.5**o
            arg[(2, 0, 1, 2)]=0.252554906336*x[0]**o + (0.910696221616)*x[0] + (-0.53203907753)*x[1]**o + (0.200453133605)*x[1] + (-0.487946086507)*x[2]**o + (-0.501877176846)*x[2]
            ref[(2, 0, 1, 2)]=-1.01998516404/(o+1.)+(0.304636089188)+(0.252554906336)*0.5**o
            arg[(2, 0, 2, 0)]=0.360996572073*x[0]**o + (0.410728038987)*x[0] + (-0.910867510708)*x[1]**o + (0.0195818266583)*x[1] + (0.203645138253)*x[2]**o + (-0.553896100856)*x[2]
            ref[(2, 0, 2, 0)]=-0.707222372455/(o+1.)+(-0.0617931176056)+(0.360996572073)*0.5**o
            arg[(2, 0, 2, 1)]=0.960415199148*x[0]**o + (0.061520414407)*x[0] + (0.295573280483)*x[1]**o + (-0.685022899019)*x[1] + (0.53699445651)*x[2]**o + (0.825292254201)*x[2]
            ref[(2, 0, 2, 1)]=0.832567736992/(o+1.)+(0.100894884794)+(0.960415199148)*0.5**o
            arg[(2, 0, 2, 2)]=0.80159677418*x[0]**o + (0.884763596556)*x[0] + (0.917229898606)*x[1]**o + (-0.713063348668)*x[1] + (-0.262388551363)*x[2]**o + (0.134809194757)*x[2]
            ref[(2, 0, 2, 2)]=0.654841347244/(o+1.)+(0.153254721322)+(0.80159677418)*0.5**o
            arg[(2, 0, 3, 0)]=0.494365715094*x[0]**o + (-0.702622809742)*x[0] + (0.369877456294)*x[1]**o + (0.769814199314)*x[1] + (0.175008627222)*x[2]**o + (0.947229236142)*x[2]
            ref[(2, 0, 3, 0)]=0.544886083516/(o+1.)+(0.507210312857)+(0.494365715094)*0.5**o
            arg[(2, 0, 3, 1)]=0.687879941796*x[0]**o + (-0.437593106848)*x[0] + (0.226953352509)*x[1]**o + (0.546201995123)*x[1] + (-0.823885008865)*x[2]**o + (0.185261196356)*x[2]
            ref[(2, 0, 3, 1)]=-0.596931656356/(o+1.)+(0.146935042316)+(0.687879941796)*0.5**o
            arg[(2, 0, 3, 2)]=0.534641894486*x[0]**o + (0.902875001074)*x[0] + (0.97359685735)*x[1]**o + (-0.983539264583)*x[1] + (-0.971377776607)*x[2]**o + (0.264247434764)*x[2]
            ref[(2, 0, 3, 2)]=0.00221908074323/(o+1.)+(0.0917915856272)+(0.534641894486)*0.5**o
            arg[(2, 1, 0, 0)]=-0.730957686164*x[0]**o + (-0.719971573169)*x[0] + (0.359994336921)*x[1]**o + (0.922363950981)*x[1] + (-0.144446699683)*x[2]**o + (-0.668760550601)*x[2]
            ref[(2, 1, 0, 0)]=0.215547637238/(o+1.)+(-0.233184086394)+(-0.730957686164)*0.5**o
            arg[(2, 1, 0, 1)]=-0.706126871577*x[0]**o + (-0.223147406709)*x[0] + (0.264893381808)*x[1]**o + (0.374128271078)*x[1] + (0.251212553153)*x[2]**o + (-0.504241169261)*x[2]
            ref[(2, 1, 0, 1)]=0.516105934961/(o+1.)+(-0.176630152446)+(-0.706126871577)*0.5**o
            arg[(2, 1, 0, 2)]=0.277077661063*x[0]**o + (-0.904498303662)*x[0] + (-0.848510209456)*x[1]**o + (0.654273991081)*x[1] + (0.459201969987)*x[2]**o + (0.0143478115559)*x[2]
            ref[(2, 1, 0, 2)]=-0.389308239469/(o+1.)+(-0.117938250513)+(0.277077661063)*0.5**o
            arg[(2, 1, 1, 0)]=0.773753592907*x[0]**o + (0.605513262825)*x[0] + (-0.339112683353)*x[1]**o + (0.374578024936)*x[1] + (0.515648614802)*x[2]**o + (0.19379216809)*x[2]
            ref[(2, 1, 1, 0)]=0.176535931449/(o+1.)+(0.586941727925)+(0.773753592907)*0.5**o
            arg[(2, 1, 1, 1)]=0.801815478314*x[0]**o + (0.518332468272)*x[0] + (0.403315300912)*x[1]**o + (0.945380395604)*x[1] + (0.916818986173)*x[2]**o + (0.777011632006)*x[2]
            ref[(2, 1, 1, 1)]=1.32013428709/(o+1.)+(1.12036224794)+(0.801815478314)*0.5**o
            arg[(2, 1, 1, 2)]=0.774705115407*x[0]**o + (-0.157299450156)*x[0] + (0.546790431038)*x[1]**o + (0.0607589038449)*x[1] + (0.353704964804)*x[2]**o + (0.717930292939)*x[2]
            ref[(2, 1, 1, 2)]=0.900495395842/(o+1.)+(0.310694873314)+(0.774705115407)*0.5**o
            arg[(2, 1, 2, 0)]=0.12825480404*x[0]**o + (-0.676150072372)*x[0] + (-0.587272788809)*x[1]**o + (-0.197050559215)*x[1] + (0.628484860663)*x[2]**o + (0.807366591949)*x[2]
            ref[(2, 1, 2, 0)]=0.0412120718537/(o+1.)+(-0.0329170198188)+(0.12825480404)*0.5**o
            arg[(2, 1, 2, 1)]=-0.304674505196*x[0]**o + (0.678686783507)*x[0] + (0.955930588752)*x[1]**o + (0.347766568749)*x[1] + (-0.58648692676)*x[2]**o + (0.728289093553)*x[2]
            ref[(2, 1, 2, 1)]=0.369443661992/(o+1.)+(0.877371222905)+(-0.304674505196)*0.5**o
            arg[(2, 1, 2, 2)]=-0.356157123706*x[0]**o + (-0.167354649537)*x[0] + (0.916910518255)*x[1]**o + (-0.698851001855)*x[1] + (0.171450751024)*x[2]**o + (-0.171331715431)*x[2]
            ref[(2, 1, 2, 2)]=1.08836126928/(o+1.)+(-0.518768683411)+(-0.356157123706)*0.5**o
            arg[(2, 1, 3, 0)]=-0.4115496221*x[0]**o + (0.148512380793)*x[0] + (0.119130248372)*x[1]**o + (-0.604212737337)*x[1] + (0.256090157512)*x[2]**o + (-0.085638815022)*x[2]
            ref[(2, 1, 3, 0)]=0.375220405884/(o+1.)+(-0.270669585783)+(-0.4115496221)*0.5**o
            arg[(2, 1, 3, 1)]=0.976332922397*x[0]**o + (0.147129899953)*x[0] + (0.0377614616829)*x[1]**o + (0.448476977338)*x[1] + (0.669657256731)*x[2]**o + (-0.724138995655)*x[2]
            ref[(2, 1, 3, 1)]=0.707418718414/(o+1.)+(-0.0642660591817)+(0.976332922397)*0.5**o
            arg[(2, 1, 3, 2)]=0.394337867911*x[0]**o + (-0.867808011823)*x[0] + (0.591563765168)*x[1]**o + (0.697159520375)*x[1] + (0.900816914844)*x[2]**o + (-0.989273045627)*x[2]
            ref[(2, 1, 3, 2)]=1.49238068001/(o+1.)+(-0.579960768538)+(0.394337867911)*0.5**o
            arg[(2, 2, 0, 0)]=-0.531246629455*x[0]**o + (0.96626479493)*x[0] + (-0.654595938365)*x[1]**o + (0.323663295014)*x[1] + (-0.990822933451)*x[2]**o + (-0.815712999072)*x[2]
            ref[(2, 2, 0, 0)]=-1.64541887182/(o+1.)+(0.237107545436)+(-0.531246629455)*0.5**o
            arg[(2, 2, 0, 1)]=-0.482766275831*x[0]**o + (-0.015842454576)*x[0] + (0.739971416672)*x[1]**o + (0.662102073764)*x[1] + (-0.458410388192)*x[2]**o + (0.444962757781)*x[2]
            ref[(2, 2, 0, 1)]=0.28156102848/(o+1.)+(0.545611188484)+(-0.482766275831)*0.5**o
            arg[(2, 2, 0, 2)]=-0.491424244787*x[0]**o + (-0.50437744098)*x[0] + (0.834778940763)*x[1]**o + (0.863740715977)*x[1] + (0.320603795999)*x[2]**o + (0.136318503992)*x[2]
            ref[(2, 2, 0, 2)]=1.15538273676/(o+1.)+(0.247840889494)+(-0.491424244787)*0.5**o
            arg[(2, 2, 1, 0)]=-0.757593172311*x[0]**o + (0.267969787885)*x[0] + (0.278348292031)*x[1]**o + (0.784991348969)*x[1] + (0.879322367357)*x[2]**o + (-0.128387592381)*x[2]
            ref[(2, 2, 1, 0)]=1.15767065939/(o+1.)+(0.462286772236)+(-0.757593172311)*0.5**o
            arg[(2, 2, 1, 1)]=-0.488148743797*x[0]**o + (0.884538501552)*x[0] + (-0.443739425532)*x[1]**o + (0.83374293986)*x[1] + (-0.00910399219562)*x[2]**o + (0.981358566876)*x[2]
            ref[(2, 2, 1, 1)]=-0.452843417728/(o+1.)+(1.34982000414)+(-0.488148743797)*0.5**o
            arg[(2, 2, 1, 2)]=-0.214124403266*x[0]**o + (-0.836419007174)*x[0] + (-0.896219829542)*x[1]**o + (0.14963968927)*x[1] + (0.786551303899)*x[2]**o + (-0.315472907987)*x[2]
            ref[(2, 2, 1, 2)]=-0.109668525643/(o+1.)+(-0.501126112945)+(-0.214124403266)*0.5**o
            arg[(2, 2, 2, 0)]=-0.0596883967575*x[0]**o + (0.187486885375)*x[0] + (-0.0998239731988)*x[1]**o + (0.476018312737)*x[1] + (-0.102702385617)*x[2]**o + (0.447948829758)*x[2]
            ref[(2, 2, 2, 0)]=-0.202526358816/(o+1.)+(0.555727013935)+(-0.0596883967575)*0.5**o
            arg[(2, 2, 2, 1)]=-0.766634809255*x[0]**o + (-0.162012082126)*x[0] + (0.0783545469725)*x[1]**o + (-0.307751191873)*x[1] + (-0.0738622819621)*x[2]**o + (-0.00100214461835)*x[2]
            ref[(2, 2, 2, 1)]=0.00449226501049/(o+1.)+(-0.235382709308)+(-0.766634809255)*0.5**o
            arg[(2, 2, 2, 2)]=-0.110752164193*x[0]**o + (-0.00148970512967)*x[0] + (0.523743986275)*x[1]**o + (-0.535366370226)*x[1] + (0.434159222781)*x[2]**o + (-0.0468978156305)*x[2]
            ref[(2, 2, 2, 2)]=0.957903209056/(o+1.)+(-0.291876945493)+(-0.110752164193)*0.5**o
            arg[(2, 2, 3, 0)]=-0.936311902954*x[0]**o + (-0.629100552455)*x[0] + (-0.386621678133)*x[1]**o + (0.307893991461)*x[1] + (-0.913649471368)*x[2]**o + (-0.635029201141)*x[2]
            ref[(2, 2, 3, 0)]=-1.3002711495/(o+1.)+(-0.478117881068)+(-0.936311902954)*0.5**o
            arg[(2, 2, 3, 1)]=0.0522019289374*x[0]**o + (-0.316990693899)*x[0] + (0.594838574075)*x[1]**o + (-0.0499881782525)*x[1] + (0.709404921544)*x[2]**o + (-0.411864186238)*x[2]
            ref[(2, 2, 3, 1)]=1.30424349562/(o+1.)+(-0.389421529194)+(0.0522019289374)*0.5**o
            arg[(2, 2, 3, 2)]=-0.106145383658*x[0]**o + (-0.2943992737)*x[0] + (0.658597117737)*x[1]**o + (-0.310909109043)*x[1] + (-0.322713682341)*x[2]**o + (0.563576000375)*x[2]
            ref[(2, 2, 3, 2)]=0.335883435396/(o+1.)+(-0.0208661911842)+(-0.106145383658)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.12125216148*x[0]**o + (-0.692546992252)*x[0] + (0.546939206953)*x[1]**o + (-0.0553482386541)*x[1]
            ref=0.546939206953/(o+1.)+(-0.373947615453)+(-0.12125216148)*0.5**o
        else:
            arg=-0.0847338861208*x[0]**o + (-0.454644291204)*x[0] + (0.27795131225)*x[1]**o + (0.0342696111686)*x[1] + (-0.787993503713)*x[2]**o + (0.968194285892)*x[2]
            ref=-0.510042191463/(o+1.)+(0.273909802928)+(-0.0847338861208)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.780487586109*x[0]**o + (0.802766961729)*x[0] + (-0.303121208798)*x[1]**o + (0.465215669861)*x[1]
            ref[(0,)]=-0.303121208798/(o+1.)+(0.633991315795)+(0.780487586109)*0.5**o
            arg[(1,)]=0.686680477552*x[0]**o + (-0.379090468369)*x[0] + (-0.662462488166)*x[1]**o + (0.476446957857)*x[1]
            ref[(1,)]=-0.662462488166/(o+1.)+(0.0486782447441)+(0.686680477552)*0.5**o
            arg[(2,)]=0.191650940743*x[0]**o + (0.540586498979)*x[0] + (-0.0887154345517)*x[1]**o + (-0.414422683587)*x[1]
            ref[(2,)]=-0.0887154345517/(o+1.)+(0.0630819076962)+(0.191650940743)*0.5**o
            arg[(3,)]=-0.0938961875912*x[0]**o + (0.37892742467)*x[0] + (0.166290949946)*x[1]**o + (-0.0540154217489)*x[1]
            ref[(3,)]=0.166290949946/(o+1.)+(0.16245600146)+(-0.0938961875912)*0.5**o
        else:
            arg[(0,)]=0.168997887588*x[0]**o + (0.32208345695)*x[0] + (-0.0288488606459)*x[1]**o + (0.829249088387)*x[1] + (-0.206666239461)*x[2]**o + (0.206358204283)*x[2]
            ref[(0,)]=-0.235515100107/(o+1.)+(0.67884537481)+(0.168997887588)*0.5**o
            arg[(1,)]=0.340818467163*x[0]**o + (0.372309797827)*x[0] + (0.734666045477)*x[1]**o + (-0.775448622781)*x[1] + (0.808655269903)*x[2]**o + (0.177028880642)*x[2]
            ref[(1,)]=1.54332131538/(o+1.)+(-0.113054972156)+(0.340818467163)*0.5**o
            arg[(2,)]=0.413827837637*x[0]**o + (0.989143061608)*x[0] + (-0.568319372935)*x[1]**o + (0.308387135805)*x[1] + (0.992097180739)*x[2]**o + (-0.701620883469)*x[2]
            ref[(2,)]=0.423777807804/(o+1.)+(0.297954656971)+(0.413827837637)*0.5**o
            arg[(3,)]=-0.872056904158*x[0]**o + (-0.0427814340105)*x[0] + (-0.920499689658)*x[1]**o + (-0.429413228492)*x[1] + (0.0164687400405)*x[2]**o + (-0.786120350947)*x[2]
            ref[(3,)]=-0.904030949618/(o+1.)+(-0.629157506725)+(-0.872056904158)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3),w)
        ref=numpy.zeros((4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.885594486084*x[0]**o + (-0.990728037417)*x[0] + (0.48807084432)*x[1]**o + (0.859705949673)*x[1]
            ref[(0, 0)]=0.48807084432/(o+1.)+(-0.0655110438718)+(0.885594486084)*0.5**o
            arg[(0, 1)]=-0.241764591691*x[0]**o + (-0.633938905595)*x[0] + (0.377600198053)*x[1]**o + (-0.418269263202)*x[1]
            ref[(0, 1)]=0.377600198053/(o+1.)+(-0.526104084398)+(-0.241764591691)*0.5**o
            arg[(0, 2)]=-0.685064129238*x[0]**o + (0.136313261455)*x[0] + (0.829352104392)*x[1]**o + (-0.981858809905)*x[1]
            ref[(0, 2)]=0.829352104392/(o+1.)+(-0.422772774225)+(-0.685064129238)*0.5**o
            arg[(1, 0)]=0.0623824862474*x[0]**o + (-0.27435884219)*x[0] + (0.2358796159)*x[1]**o + (0.880280648828)*x[1]
            ref[(1, 0)]=0.2358796159/(o+1.)+(0.302960903319)+(0.0623824862474)*0.5**o
            arg[(1, 1)]=-0.115121152693*x[0]**o + (-0.41754457318)*x[0] + (-0.871187035007)*x[1]**o + (-0.44079833607)*x[1]
            ref[(1, 1)]=-0.871187035007/(o+1.)+(-0.429171454625)+(-0.115121152693)*0.5**o
            arg[(1, 2)]=-0.326080892245*x[0]**o + (-0.0284722306168)*x[0] + (0.499449644403)*x[1]**o + (0.200818036151)*x[1]
            ref[(1, 2)]=0.499449644403/(o+1.)+(0.0861729027672)+(-0.326080892245)*0.5**o
            arg[(2, 0)]=0.414349890336*x[0]**o + (-0.92480486323)*x[0] + (0.612393852203)*x[1]**o + (-0.20711489621)*x[1]
            ref[(2, 0)]=0.612393852203/(o+1.)+(-0.56595987972)+(0.414349890336)*0.5**o
            arg[(2, 1)]=-0.680698888267*x[0]**o + (-0.117074129005)*x[0] + (0.308006247657)*x[1]**o + (0.209664714998)*x[1]
            ref[(2, 1)]=0.308006247657/(o+1.)+(0.0462952929967)+(-0.680698888267)*0.5**o
            arg[(2, 2)]=0.367960910597*x[0]**o + (-0.645006470242)*x[0] + (-0.669659884138)*x[1]**o + (0.72925316274)*x[1]
            ref[(2, 2)]=-0.669659884138/(o+1.)+(0.0421233462493)+(0.367960910597)*0.5**o
            arg[(3, 0)]=-0.815433780319*x[0]**o + (0.924386787425)*x[0] + (-0.247796710576)*x[1]**o + (-0.888025846805)*x[1]
            ref[(3, 0)]=-0.247796710576/(o+1.)+(0.0181804703098)+(-0.815433780319)*0.5**o
            arg[(3, 1)]=-0.76518299772*x[0]**o + (0.659910295842)*x[0] + (0.286904647861)*x[1]**o + (-0.321318307003)*x[1]
            ref[(3, 1)]=0.286904647861/(o+1.)+(0.169295994419)+(-0.76518299772)*0.5**o
            arg[(3, 2)]=-0.930867146989*x[0]**o + (0.176116178634)*x[0] + (-0.57213327896)*x[1]**o + (-0.0424803825363)*x[1]
            ref[(3, 2)]=-0.57213327896/(o+1.)+(0.066817898049)+(-0.930867146989)*0.5**o
        else:
            arg[(0, 0)]=0.416309749288*x[0]**o + (0.419805953505)*x[0] + (-0.308307653545)*x[1]**o + (-0.934596769471)*x[1] + (-0.788107111936)*x[2]**o + (-0.431258487336)*x[2]
            ref[(0, 0)]=-1.09641476548/(o+1.)+(-0.473024651651)+(0.416309749288)*0.5**o
            arg[(0, 1)]=0.440975925222*x[0]**o + (-0.784845389691)*x[0] + (0.96756872486)*x[1]**o + (0.767055297526)*x[1] + (0.0762862081897)*x[2]**o + (0.193812926679)*x[2]
            ref[(0, 1)]=1.04385493305/(o+1.)+(0.0880114172571)+(0.440975925222)*0.5**o
            arg[(0, 2)]=0.911674486139*x[0]**o + (0.584142938227)*x[0] + (0.0260970735004)*x[1]**o + (0.862631974475)*x[1] + (-0.496813426508)*x[2]**o + (0.209501361468)*x[2]
            ref[(0, 2)]=-0.470716353008/(o+1.)+(0.828138137085)+(0.911674486139)*0.5**o
            arg[(1, 0)]=-0.648996164567*x[0]**o + (-0.061540692502)*x[0] + (-0.991274145213)*x[1]**o + (0.435364219609)*x[1] + (-0.872048800408)*x[2]**o + (-0.84479338301)*x[2]
            ref[(1, 0)]=-1.86332294562/(o+1.)+(-0.235484927952)+(-0.648996164567)*0.5**o
            arg[(1, 1)]=-0.283829228831*x[0]**o + (-0.466040537495)*x[0] + (-0.557769525304)*x[1]**o + (-0.549720121268)*x[1] + (-0.764926575607)*x[2]**o + (-0.411844501287)*x[2]
            ref[(1, 1)]=-1.32269610091/(o+1.)+(-0.713802580025)+(-0.283829228831)*0.5**o
            arg[(1, 2)]=0.106068211869*x[0]**o + (0.31421680427)*x[0] + (0.997863772658)*x[1]**o + (-0.566809183542)*x[1] + (-0.255119725713)*x[2]**o + (0.502873058381)*x[2]
            ref[(1, 2)]=0.742744046945/(o+1.)+(0.125140339555)+(0.106068211869)*0.5**o
            arg[(2, 0)]=-0.684863661253*x[0]**o + (-0.722763169353)*x[0] + (0.948334198837)*x[1]**o + (-0.387874267336)*x[1] + (-0.880400656294)*x[2]**o + (0.270197255906)*x[2]
            ref[(2, 0)]=0.0679335425423/(o+1.)+(-0.420220090392)+(-0.684863661253)*0.5**o
            arg[(2, 1)]=-0.613577480667*x[0]**o + (0.755953749455)*x[0] + (0.894679743432)*x[1]**o + (-0.158566882004)*x[1] + (0.0923688938166)*x[2]**o + (-0.141298941791)*x[2]
            ref[(2, 1)]=0.987048637249/(o+1.)+(0.22804396283)+(-0.613577480667)*0.5**o
            arg[(2, 2)]=-0.608284257415*x[0]**o + (-0.555347363491)*x[0] + (0.638705194507)*x[1]**o + (0.0161333718855)*x[1] + (0.712668769893)*x[2]**o + (0.645907792308)*x[2]
            ref[(2, 2)]=1.3513739644/(o+1.)+(0.0533469003513)+(-0.608284257415)*0.5**o
            arg[(3, 0)]=0.531182754503*x[0]**o + (0.117943172047)*x[0] + (0.578451384554)*x[1]**o + (0.762559427487)*x[1] + (0.852829922976)*x[2]**o + (0.28639753984)*x[2]
            ref[(3, 0)]=1.43128130753/(o+1.)+(0.583450069687)+(0.531182754503)*0.5**o
            arg[(3, 1)]=0.794987700119*x[0]**o + (-0.677091549666)*x[0] + (0.312759115013)*x[1]**o + (-0.401010994172)*x[1] + (-0.806504943199)*x[2]**o + (0.48789997951)*x[2]
            ref[(3, 1)]=-0.493745828186/(o+1.)+(-0.295101282164)+(0.794987700119)*0.5**o
            arg[(3, 2)]=0.48228357172*x[0]**o + (-0.67936383818)*x[0] + (0.0789482520757)*x[1]**o + (-0.712454554883)*x[1] + (-0.31793234199)*x[2]**o + (-0.366524541926)*x[2]
            ref[(3, 2)]=-0.238984089914/(o+1.)+(-0.879171467495)+(0.48228357172)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 3),w)
        ref=numpy.zeros((4, 2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.0503106091488*x[0]**o + (-0.88235967411)*x[0] + (0.160924874401)*x[1]**o + (-0.547167471068)*x[1]
            ref[(0, 0, 0)]=0.160924874401/(o+1.)+(-0.714763572589)+(0.0503106091488)*0.5**o
            arg[(0, 0, 1)]=-0.210315051025*x[0]**o + (-0.893773633816)*x[0] + (0.224473396281)*x[1]**o + (0.597904503449)*x[1]
            ref[(0, 0, 1)]=0.224473396281/(o+1.)+(-0.147934565184)+(-0.210315051025)*0.5**o
            arg[(0, 0, 2)]=-0.714385039388*x[0]**o + (0.823250632822)*x[0] + (-0.820451079324)*x[1]**o + (-0.00912077684112)*x[1]
            ref[(0, 0, 2)]=-0.820451079324/(o+1.)+(0.407064927991)+(-0.714385039388)*0.5**o
            arg[(0, 1, 0)]=-0.421426828679*x[0]**o + (0.476902659162)*x[0] + (-0.142517830884)*x[1]**o + (0.77597790454)*x[1]
            ref[(0, 1, 0)]=-0.142517830884/(o+1.)+(0.626440281851)+(-0.421426828679)*0.5**o
            arg[(0, 1, 1)]=0.215801185693*x[0]**o + (0.269755255787)*x[0] + (-0.538319661195)*x[1]**o + (-0.831782792348)*x[1]
            ref[(0, 1, 1)]=-0.538319661195/(o+1.)+(-0.28101376828)+(0.215801185693)*0.5**o
            arg[(0, 1, 2)]=0.975702202519*x[0]**o + (-0.498318235599)*x[0] + (-0.75264589494)*x[1]**o + (-0.0335687452649)*x[1]
            ref[(0, 1, 2)]=-0.75264589494/(o+1.)+(-0.265943490432)+(0.975702202519)*0.5**o
            arg[(1, 0, 0)]=-0.0426423777523*x[0]**o + (0.836824592668)*x[0] + (-0.313660007727)*x[1]**o + (0.593690227606)*x[1]
            ref[(1, 0, 0)]=-0.313660007727/(o+1.)+(0.715257410137)+(-0.0426423777523)*0.5**o
            arg[(1, 0, 1)]=0.660461143335*x[0]**o + (-0.36802253444)*x[0] + (0.521548361261)*x[1]**o + (0.30987466561)*x[1]
            ref[(1, 0, 1)]=0.521548361261/(o+1.)+(-0.0290739344151)+(0.660461143335)*0.5**o
            arg[(1, 0, 2)]=-0.344684546394*x[0]**o + (0.951631127907)*x[0] + (-0.411221532631)*x[1]**o + (-0.201245570263)*x[1]
            ref[(1, 0, 2)]=-0.411221532631/(o+1.)+(0.375192778822)+(-0.344684546394)*0.5**o
            arg[(1, 1, 0)]=-0.331386929455*x[0]**o + (0.683768143296)*x[0] + (0.107142209081)*x[1]**o + (-0.0682451455336)*x[1]
            ref[(1, 1, 0)]=0.107142209081/(o+1.)+(0.307761498881)+(-0.331386929455)*0.5**o
            arg[(1, 1, 1)]=-0.831238518024*x[0]**o + (-0.447641710998)*x[0] + (-0.633139209903)*x[1]**o + (0.585043152326)*x[1]
            ref[(1, 1, 1)]=-0.633139209903/(o+1.)+(0.0687007206641)+(-0.831238518024)*0.5**o
            arg[(1, 1, 2)]=-0.387154126168*x[0]**o + (0.244342005484)*x[0] + (0.432586971797)*x[1]**o + (0.0274971015617)*x[1]
            ref[(1, 1, 2)]=0.432586971797/(o+1.)+(0.135919553523)+(-0.387154126168)*0.5**o
            arg[(2, 0, 0)]=0.669991080226*x[0]**o + (-0.0463518337959)*x[0] + (-0.705709934605)*x[1]**o + (-0.210680984938)*x[1]
            ref[(2, 0, 0)]=-0.705709934605/(o+1.)+(-0.128516409367)+(0.669991080226)*0.5**o
            arg[(2, 0, 1)]=-0.360846733078*x[0]**o + (-0.700992625142)*x[0] + (0.273136642621)*x[1]**o + (-0.482441928146)*x[1]
            ref[(2, 0, 1)]=0.273136642621/(o+1.)+(-0.591717276644)+(-0.360846733078)*0.5**o
            arg[(2, 0, 2)]=-0.381110029847*x[0]**o + (-0.501730987839)*x[0] + (-0.0981921957031)*x[1]**o + (-0.986090443889)*x[1]
            ref[(2, 0, 2)]=-0.0981921957031/(o+1.)+(-0.743910715864)+(-0.381110029847)*0.5**o
            arg[(2, 1, 0)]=-0.0858244892009*x[0]**o + (0.928599896873)*x[0] + (0.386592097622)*x[1]**o + (-0.140581008841)*x[1]
            ref[(2, 1, 0)]=0.386592097622/(o+1.)+(0.394009444016)+(-0.0858244892009)*0.5**o
            arg[(2, 1, 1)]=0.115585528282*x[0]**o + (0.975795677583)*x[0] + (0.155360227634)*x[1]**o + (0.132255015055)*x[1]
            ref[(2, 1, 1)]=0.155360227634/(o+1.)+(0.554025346319)+(0.115585528282)*0.5**o
            arg[(2, 1, 2)]=-0.0420071503284*x[0]**o + (0.558637694285)*x[0] + (-0.369302338686)*x[1]**o + (-0.552114542715)*x[1]
            ref[(2, 1, 2)]=-0.369302338686/(o+1.)+(0.00326157578494)+(-0.0420071503284)*0.5**o
            arg[(3, 0, 0)]=-0.765362771992*x[0]**o + (-0.521153849626)*x[0] + (0.807981575554)*x[1]**o + (-0.664961723431)*x[1]
            ref[(3, 0, 0)]=0.807981575554/(o+1.)+(-0.593057786529)+(-0.765362771992)*0.5**o
            arg[(3, 0, 1)]=0.996890799785*x[0]**o + (0.547320379005)*x[0] + (0.331731204752)*x[1]**o + (-0.217683381904)*x[1]
            ref[(3, 0, 1)]=0.331731204752/(o+1.)+(0.164818498551)+(0.996890799785)*0.5**o
            arg[(3, 0, 2)]=-0.14197064151*x[0]**o + (-0.329864537309)*x[0] + (0.556567163196)*x[1]**o + (-0.102900920197)*x[1]
            ref[(3, 0, 2)]=0.556567163196/(o+1.)+(-0.216382728753)+(-0.14197064151)*0.5**o
            arg[(3, 1, 0)]=-0.533661214113*x[0]**o + (0.48996475717)*x[0] + (0.500244651401)*x[1]**o + (0.847434765913)*x[1]
            ref[(3, 1, 0)]=0.500244651401/(o+1.)+(0.668699761542)+(-0.533661214113)*0.5**o
            arg[(3, 1, 1)]=0.648067337031*x[0]**o + (-0.267287979081)*x[0] + (-0.831373138415)*x[1]**o + (-0.351497896285)*x[1]
            ref[(3, 1, 1)]=-0.831373138415/(o+1.)+(-0.309392937683)+(0.648067337031)*0.5**o
            arg[(3, 1, 2)]=0.532872254202*x[0]**o + (0.388254205357)*x[0] + (-0.560193816513)*x[1]**o + (0.233584850524)*x[1]
            ref[(3, 1, 2)]=-0.560193816513/(o+1.)+(0.31091952794)+(0.532872254202)*0.5**o
        else:
            arg[(0, 0, 0)]=-0.547506328284*x[0]**o + (0.295638250154)*x[0] + (0.447494389507)*x[1]**o + (0.419062411717)*x[1] + (0.779169090414)*x[2]**o + (0.161133472404)*x[2]
            ref[(0, 0, 0)]=1.22666347992/(o+1.)+(0.437917067138)+(-0.547506328284)*0.5**o
            arg[(0, 0, 1)]=0.0363690230375*x[0]**o + (0.757944320109)*x[0] + (0.104551986647)*x[1]**o + (-0.870592700678)*x[1] + (0.117947026684)*x[2]**o + (0.66378304417)*x[2]
            ref[(0, 0, 1)]=0.222499013331/(o+1.)+(0.275567331801)+(0.0363690230375)*0.5**o
            arg[(0, 0, 2)]=-0.0678629278804*x[0]**o + (0.988623486531)*x[0] + (-0.850246928419)*x[1]**o + (-0.503774995711)*x[1] + (-0.814445806078)*x[2]**o + (-0.0854466022189)*x[2]
            ref[(0, 0, 2)]=-1.6646927345/(o+1.)+(0.1997009443)+(-0.0678629278804)*0.5**o
            arg[(0, 1, 0)]=-0.775658960744*x[0]**o + (0.411042495814)*x[0] + (0.198057754035)*x[1]**o + (0.102196938512)*x[1] + (-0.781086209831)*x[2]**o + (-0.16920533837)*x[2]
            ref[(0, 1, 0)]=-0.583028455796/(o+1.)+(0.172017047978)+(-0.775658960744)*0.5**o
            arg[(0, 1, 1)]=0.0124548818561*x[0]**o + (-0.262278287267)*x[0] + (-0.0239875840968)*x[1]**o + (-0.514485450296)*x[1] + (0.342261709345)*x[2]**o + (0.755085077271)*x[2]
            ref[(0, 1, 1)]=0.318274125248/(o+1.)+(-0.0108393301457)+(0.0124548818561)*0.5**o
            arg[(0, 1, 2)]=0.589079224366*x[0]**o + (-0.196257778935)*x[0] + (-0.0495765385003)*x[1]**o + (0.429163984275)*x[1] + (-0.9648199273)*x[2]**o + (0.725307737711)*x[2]
            ref[(0, 1, 2)]=-1.0143964658/(o+1.)+(0.479106971526)+(0.589079224366)*0.5**o
            arg[(1, 0, 0)]=-0.388920848996*x[0]**o + (-0.181347393954)*x[0] + (0.556606307319)*x[1]**o + (0.0612410084114)*x[1] + (-0.751405226263)*x[2]**o + (0.0850366531126)*x[2]
            ref[(1, 0, 0)]=-0.194798918944/(o+1.)+(-0.0175348662152)+(-0.388920848996)*0.5**o
            arg[(1, 0, 1)]=-0.299237031685*x[0]**o + (0.896531433663)*x[0] + (-0.0904283085526)*x[1]**o + (0.47919932981)*x[1] + (0.843575098083)*x[2]**o + (0.109229233492)*x[2]
            ref[(1, 0, 1)]=0.753146789531/(o+1.)+(0.742479998482)+(-0.299237031685)*0.5**o
            arg[(1, 0, 2)]=0.728801850597*x[0]**o + (0.937548611046)*x[0] + (-0.191615421233)*x[1]**o + (-0.714544296651)*x[1] + (-0.165838702932)*x[2]**o + (0.330953708697)*x[2]
            ref[(1, 0, 2)]=-0.357454124166/(o+1.)+(0.276979011546)+(0.728801850597)*0.5**o
            arg[(1, 1, 0)]=0.597351677367*x[0]**o + (0.368817758696)*x[0] + (0.337278867447)*x[1]**o + (-0.175103364683)*x[1] + (-0.198936541893)*x[2]**o + (-0.699359130982)*x[2]
            ref[(1, 1, 0)]=0.138342325554/(o+1.)+(-0.252822368484)+(0.597351677367)*0.5**o
            arg[(1, 1, 1)]=-0.11336174474*x[0]**o + (0.121222712833)*x[0] + (-0.587238245879)*x[1]**o + (-0.735505314266)*x[1] + (-0.745457001693)*x[2]**o + (0.350742796317)*x[2]
            ref[(1, 1, 1)]=-1.33269524757/(o+1.)+(-0.131769902558)+(-0.11336174474)*0.5**o
            arg[(1, 1, 2)]=0.700819276519*x[0]**o + (-0.892315912206)*x[0] + (0.710601145014)*x[1]**o + (-0.769858362503)*x[1] + (0.712633693869)*x[2]**o + (-0.0557667577796)*x[2]
            ref[(1, 1, 2)]=1.42323483888/(o+1.)+(-0.858970516244)+(0.700819276519)*0.5**o
            arg[(2, 0, 0)]=-0.817835896327*x[0]**o + (-0.690544998471)*x[0] + (-0.168403949366)*x[1]**o + (0.0168046959101)*x[1] + (0.480113301584)*x[2]**o + (0.985375584665)*x[2]
            ref[(2, 0, 0)]=0.311709352218/(o+1.)+(0.155817641052)+(-0.817835896327)*0.5**o
            arg[(2, 0, 1)]=0.821730058029*x[0]**o + (0.974151934358)*x[0] + (0.340083993617)*x[1]**o + (-0.126485413834)*x[1] + (0.434969688162)*x[2]**o + (0.735655232336)*x[2]
            ref[(2, 0, 1)]=0.775053681779/(o+1.)+(0.79166087643)+(0.821730058029)*0.5**o
            arg[(2, 0, 2)]=0.114277066522*x[0]**o + (0.595942694181)*x[0] + (0.0750853935809)*x[1]**o + (-0.239771004856)*x[1] + (-0.0674918805748)*x[2]**o + (-0.616669698508)*x[2]
            ref[(2, 0, 2)]=0.00759351300603/(o+1.)+(-0.130249004591)+(0.114277066522)*0.5**o
            arg[(2, 1, 0)]=0.387494124932*x[0]**o + (0.880158602979)*x[0] + (-0.490864376247)*x[1]**o + (0.112733602588)*x[1] + (0.943656594893)*x[2]**o + (-0.378462090366)*x[2]
            ref[(2, 1, 0)]=0.452792218646/(o+1.)+(0.307215057601)+(0.387494124932)*0.5**o
            arg[(2, 1, 1)]=0.843973211824*x[0]**o + (-0.401909683053)*x[0] + (-0.117085567173)*x[1]**o + (-0.305799718076)*x[1] + (0.482214146478)*x[2]**o + (0.337152354178)*x[2]
            ref[(2, 1, 1)]=0.365128579305/(o+1.)+(-0.185278523476)+(0.843973211824)*0.5**o
            arg[(2, 1, 2)]=-0.233581445167*x[0]**o + (-0.683832165579)*x[0] + (-0.625239543955)*x[1]**o + (-0.598534401625)*x[1] + (0.115609944673)*x[2]**o + (-0.746174431434)*x[2]
            ref[(2, 1, 2)]=-0.509629599282/(o+1.)+(-1.01427049932)+(-0.233581445167)*0.5**o
            arg[(3, 0, 0)]=-0.279975351081*x[0]**o + (0.869922979062)*x[0] + (-0.376174317693)*x[1]**o + (0.876970763474)*x[1] + (0.754890301473)*x[2]**o + (-0.124063033601)*x[2]
            ref[(3, 0, 0)]=0.378715983779/(o+1.)+(0.811415354467)+(-0.279975351081)*0.5**o
            arg[(3, 0, 1)]=0.932864984977*x[0]**o + (-0.0298296077444)*x[0] + (-0.707366357771)*x[1]**o + (-0.791969394037)*x[1] + (-0.342098720204)*x[2]**o + (0.974285391234)*x[2]
            ref[(3, 0, 1)]=-1.04946507797/(o+1.)+(0.0762431947261)+(0.932864984977)*0.5**o
            arg[(3, 0, 2)]=0.730240539295*x[0]**o + (-0.979399350657)*x[0] + (0.637976942925)*x[1]**o + (0.755146086219)*x[1] + (0.419681267418)*x[2]**o + (0.110004580976)*x[2]
            ref[(3, 0, 2)]=1.05765821034/(o+1.)+(-0.0571243417315)+(0.730240539295)*0.5**o
            arg[(3, 1, 0)]=0.941298822017*x[0]**o + (-0.834713248512)*x[0] + (-0.8759400686)*x[1]**o + (0.414587458931)*x[1] + (-0.466937574785)*x[2]**o + (-0.944454824787)*x[2]
            ref[(3, 1, 0)]=-1.34287764339/(o+1.)+(-0.682290307184)+(0.941298822017)*0.5**o
            arg[(3, 1, 1)]=-0.045925098435*x[0]**o + (0.502113494159)*x[0] + (-0.196839616257)*x[1]**o + (-0.80928046986)*x[1] + (-0.223370870712)*x[2]**o + (-0.265016803855)*x[2]
            ref[(3, 1, 1)]=-0.42021048697/(o+1.)+(-0.286091889778)+(-0.045925098435)*0.5**o
            arg[(3, 1, 2)]=-0.871893666162*x[0]**o + (-0.992795731904)*x[0] + (-0.292478624142)*x[1]**o + (0.27798259511)*x[1] + (-0.351984748716)*x[2]**o + (-0.475305820649)*x[2]
            ref[(3, 1, 2)]=-0.644463372858/(o+1.)+(-0.595059478721)+(-0.871893666162)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2, 4),w)
        ref=numpy.zeros((2, 4, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.482622100125*x[0]**o + (-0.371312764141)*x[0] + (0.333179866284)*x[1]**o + (0.526200914219)*x[1]
            ref[(0, 0, 0, 0)]=0.333179866284/(o+1.)+(0.0774440750393)+(0.482622100125)*0.5**o
            arg[(0, 0, 0, 1)]=-0.459567559852*x[0]**o + (-0.145753603574)*x[0] + (-0.744828700918)*x[1]**o + (0.536773616032)*x[1]
            ref[(0, 0, 0, 1)]=-0.744828700918/(o+1.)+(0.195510006229)+(-0.459567559852)*0.5**o
            arg[(0, 0, 0, 2)]=-0.841157309431*x[0]**o + (0.867932808566)*x[0] + (0.628063993947)*x[1]**o + (-0.739462097909)*x[1]
            ref[(0, 0, 0, 2)]=0.628063993947/(o+1.)+(0.0642353553285)+(-0.841157309431)*0.5**o
            arg[(0, 0, 0, 3)]=-0.699219657111*x[0]**o + (-0.150122117978)*x[0] + (0.711486069169)*x[1]**o + (0.785836496903)*x[1]
            ref[(0, 0, 0, 3)]=0.711486069169/(o+1.)+(0.317857189463)+(-0.699219657111)*0.5**o
            arg[(0, 0, 1, 0)]=-0.68369300225*x[0]**o + (0.940829895204)*x[0] + (0.411186375207)*x[1]**o + (-0.480391325428)*x[1]
            ref[(0, 0, 1, 0)]=0.411186375207/(o+1.)+(0.230219284888)+(-0.68369300225)*0.5**o
            arg[(0, 0, 1, 1)]=0.650396139684*x[0]**o + (0.545399292833)*x[0] + (-0.348910677213)*x[1]**o + (-0.572990438377)*x[1]
            ref[(0, 0, 1, 1)]=-0.348910677213/(o+1.)+(-0.0137955727723)+(0.650396139684)*0.5**o
            arg[(0, 0, 1, 2)]=0.832990394416*x[0]**o + (0.785280731895)*x[0] + (-0.310196558803)*x[1]**o + (-0.0681872127881)*x[1]
            ref[(0, 0, 1, 2)]=-0.310196558803/(o+1.)+(0.358546759553)+(0.832990394416)*0.5**o
            arg[(0, 0, 1, 3)]=0.620794931522*x[0]**o + (0.0138285083113)*x[0] + (-0.443152286087)*x[1]**o + (-0.593997542527)*x[1]
            ref[(0, 0, 1, 3)]=-0.443152286087/(o+1.)+(-0.290084517108)+(0.620794931522)*0.5**o
            arg[(0, 1, 0, 0)]=-0.666561102274*x[0]**o + (-0.865110015579)*x[0] + (0.995300839484)*x[1]**o + (0.777146410153)*x[1]
            ref[(0, 1, 0, 0)]=0.995300839484/(o+1.)+(-0.043981802713)+(-0.666561102274)*0.5**o
            arg[(0, 1, 0, 1)]=0.21604383345*x[0]**o + (0.922060752976)*x[0] + (0.0296446472343)*x[1]**o + (-0.0276181560593)*x[1]
            ref[(0, 1, 0, 1)]=0.0296446472343/(o+1.)+(0.447221298458)+(0.21604383345)*0.5**o
            arg[(0, 1, 0, 2)]=-0.553357124089*x[0]**o + (0.404198356234)*x[0] + (-0.98670173147)*x[1]**o + (-0.71815546338)*x[1]
            ref[(0, 1, 0, 2)]=-0.98670173147/(o+1.)+(-0.156978553573)+(-0.553357124089)*0.5**o
            arg[(0, 1, 0, 3)]=0.863849298351*x[0]**o + (-0.0234361446994)*x[0] + (-0.621808165434)*x[1]**o + (-0.601915870418)*x[1]
            ref[(0, 1, 0, 3)]=-0.621808165434/(o+1.)+(-0.312676007559)+(0.863849298351)*0.5**o
            arg[(0, 1, 1, 0)]=0.184231461231*x[0]**o + (0.0276546737035)*x[0] + (-0.942233690728)*x[1]**o + (0.791284880181)*x[1]
            ref[(0, 1, 1, 0)]=-0.942233690728/(o+1.)+(0.409469776942)+(0.184231461231)*0.5**o
            arg[(0, 1, 1, 1)]=-0.78740115963*x[0]**o + (-0.923725121206)*x[0] + (-0.012647442889)*x[1]**o + (-0.173904702003)*x[1]
            ref[(0, 1, 1, 1)]=-0.012647442889/(o+1.)+(-0.548814911605)+(-0.78740115963)*0.5**o
            arg[(0, 1, 1, 2)]=0.954391353487*x[0]**o + (-0.277749988733)*x[0] + (0.0991370293094)*x[1]**o + (0.161825075594)*x[1]
            ref[(0, 1, 1, 2)]=0.0991370293094/(o+1.)+(-0.0579624565694)+(0.954391353487)*0.5**o
            arg[(0, 1, 1, 3)]=-0.538060438461*x[0]**o + (-0.140606788792)*x[0] + (0.486520892591)*x[1]**o + (-0.600658751256)*x[1]
            ref[(0, 1, 1, 3)]=0.486520892591/(o+1.)+(-0.370632770024)+(-0.538060438461)*0.5**o
            arg[(0, 2, 0, 0)]=-0.482689649903*x[0]**o + (0.232930243286)*x[0] + (0.529348859939)*x[1]**o + (0.199509862235)*x[1]
            ref[(0, 2, 0, 0)]=0.529348859939/(o+1.)+(0.216220052761)+(-0.482689649903)*0.5**o
            arg[(0, 2, 0, 1)]=-0.0445702234561*x[0]**o + (-0.739636081561)*x[0] + (0.135360222105)*x[1]**o + (0.494806526521)*x[1]
            ref[(0, 2, 0, 1)]=0.135360222105/(o+1.)+(-0.12241477752)+(-0.0445702234561)*0.5**o
            arg[(0, 2, 0, 2)]=0.923484659973*x[0]**o + (-0.881443540301)*x[0] + (-0.549870211836)*x[1]**o + (-0.170224078295)*x[1]
            ref[(0, 2, 0, 2)]=-0.549870211836/(o+1.)+(-0.525833809298)+(0.923484659973)*0.5**o
            arg[(0, 2, 0, 3)]=0.869454303629*x[0]**o + (0.114973129899)*x[0] + (0.00260183652113)*x[1]**o + (-0.399140283826)*x[1]
            ref[(0, 2, 0, 3)]=0.00260183652113/(o+1.)+(-0.142083576963)+(0.869454303629)*0.5**o
            arg[(0, 2, 1, 0)]=-0.153334273433*x[0]**o + (0.627749898213)*x[0] + (0.5264302688)*x[1]**o + (-0.244657142862)*x[1]
            ref[(0, 2, 1, 0)]=0.5264302688/(o+1.)+(0.191546377675)+(-0.153334273433)*0.5**o
            arg[(0, 2, 1, 1)]=0.377994633953*x[0]**o + (0.0457253478578)*x[0] + (0.0553226795244)*x[1]**o + (0.953938740101)*x[1]
            ref[(0, 2, 1, 1)]=0.0553226795244/(o+1.)+(0.499832043979)+(0.377994633953)*0.5**o
            arg[(0, 2, 1, 2)]=-0.859134338242*x[0]**o + (-0.606822572713)*x[0] + (0.535237639362)*x[1]**o + (0.241437131583)*x[1]
            ref[(0, 2, 1, 2)]=0.535237639362/(o+1.)+(-0.182692720565)+(-0.859134338242)*0.5**o
            arg[(0, 2, 1, 3)]=0.771228762262*x[0]**o + (0.243574205224)*x[0] + (-0.783003103285)*x[1]**o + (0.00594232092901)*x[1]
            ref[(0, 2, 1, 3)]=-0.783003103285/(o+1.)+(0.124758263076)+(0.771228762262)*0.5**o
            arg[(0, 3, 0, 0)]=-0.24772795567*x[0]**o + (-0.392330144505)*x[0] + (0.891991714148)*x[1]**o + (0.857322437169)*x[1]
            ref[(0, 3, 0, 0)]=0.891991714148/(o+1.)+(0.232496146332)+(-0.24772795567)*0.5**o
            arg[(0, 3, 0, 1)]=-0.878622375656*x[0]**o + (-0.214071079604)*x[0] + (-0.358238933728)*x[1]**o + (-0.491146671786)*x[1]
            ref[(0, 3, 0, 1)]=-0.358238933728/(o+1.)+(-0.352608875695)+(-0.878622375656)*0.5**o
            arg[(0, 3, 0, 2)]=-0.161460033836*x[0]**o + (-0.724445550536)*x[0] + (-0.402216434469)*x[1]**o + (0.983489417483)*x[1]
            ref[(0, 3, 0, 2)]=-0.402216434469/(o+1.)+(0.129521933473)+(-0.161460033836)*0.5**o
            arg[(0, 3, 0, 3)]=-0.881613224606*x[0]**o + (-0.211455872257)*x[0] + (0.3672691123)*x[1]**o + (0.726960259695)*x[1]
            ref[(0, 3, 0, 3)]=0.3672691123/(o+1.)+(0.257752193719)+(-0.881613224606)*0.5**o
            arg[(0, 3, 1, 0)]=0.44674587904*x[0]**o + (-0.575863891505)*x[0] + (-0.588506147945)*x[1]**o + (0.33071403129)*x[1]
            ref[(0, 3, 1, 0)]=-0.588506147945/(o+1.)+(-0.122574930107)+(0.44674587904)*0.5**o
            arg[(0, 3, 1, 1)]=-0.972324457948*x[0]**o + (-0.764102402128)*x[0] + (-0.689072595429)*x[1]**o + (0.910044077677)*x[1]
            ref[(0, 3, 1, 1)]=-0.689072595429/(o+1.)+(0.0729708377743)+(-0.972324457948)*0.5**o
            arg[(0, 3, 1, 2)]=-0.925335873896*x[0]**o + (0.391105409249)*x[0] + (0.981863629778)*x[1]**o + (-0.943203355608)*x[1]
            ref[(0, 3, 1, 2)]=0.981863629778/(o+1.)+(-0.276048973179)+(-0.925335873896)*0.5**o
            arg[(0, 3, 1, 3)]=0.855756173507*x[0]**o + (-0.145507325145)*x[0] + (0.0682546998542)*x[1]**o + (-0.0536781961772)*x[1]
            ref[(0, 3, 1, 3)]=0.0682546998542/(o+1.)+(-0.0995927606609)+(0.855756173507)*0.5**o
            arg[(1, 0, 0, 0)]=-0.961310717483*x[0]**o + (-0.0759724344371)*x[0] + (-0.740906480712)*x[1]**o + (-0.0867446201883)*x[1]
            ref[(1, 0, 0, 0)]=-0.740906480712/(o+1.)+(-0.0813585273127)+(-0.961310717483)*0.5**o
            arg[(1, 0, 0, 1)]=-0.128901756858*x[0]**o + (0.960130910789)*x[0] + (0.829164142988)*x[1]**o + (0.648361775196)*x[1]
            ref[(1, 0, 0, 1)]=0.829164142988/(o+1.)+(0.804246342993)+(-0.128901756858)*0.5**o
            arg[(1, 0, 0, 2)]=0.720310592149*x[0]**o + (-0.786304475861)*x[0] + (0.789236407656)*x[1]**o + (-0.0675164063064)*x[1]
            ref[(1, 0, 0, 2)]=0.789236407656/(o+1.)+(-0.426910441084)+(0.720310592149)*0.5**o
            arg[(1, 0, 0, 3)]=0.954484487647*x[0]**o + (-0.0544499470426)*x[0] + (-0.262143178942)*x[1]**o + (-0.25544395013)*x[1]
            ref[(1, 0, 0, 3)]=-0.262143178942/(o+1.)+(-0.154946948586)+(0.954484487647)*0.5**o
            arg[(1, 0, 1, 0)]=-0.335895029293*x[0]**o + (-0.538916123818)*x[0] + (-0.203663877548)*x[1]**o + (0.196579194329)*x[1]
            ref[(1, 0, 1, 0)]=-0.203663877548/(o+1.)+(-0.171168464745)+(-0.335895029293)*0.5**o
            arg[(1, 0, 1, 1)]=0.554782042225*x[0]**o + (0.0276983947595)*x[0] + (-0.47865222868)*x[1]**o + (-0.00782588813931)*x[1]
            ref[(1, 0, 1, 1)]=-0.47865222868/(o+1.)+(0.00993625331012)+(0.554782042225)*0.5**o
            arg[(1, 0, 1, 2)]=-0.481963495054*x[0]**o + (0.0330721310976)*x[0] + (0.170840404343)*x[1]**o + (-0.46188462025)*x[1]
            ref[(1, 0, 1, 2)]=0.170840404343/(o+1.)+(-0.214406244576)+(-0.481963495054)*0.5**o
            arg[(1, 0, 1, 3)]=-0.728176272785*x[0]**o + (0.581124054434)*x[0] + (-0.613384112099)*x[1]**o + (-0.202732853438)*x[1]
            ref[(1, 0, 1, 3)]=-0.613384112099/(o+1.)+(0.189195600498)+(-0.728176272785)*0.5**o
            arg[(1, 1, 0, 0)]=-0.32611846623*x[0]**o + (0.0484910296653)*x[0] + (-0.281050767248)*x[1]**o + (0.667865326106)*x[1]
            ref[(1, 1, 0, 0)]=-0.281050767248/(o+1.)+(0.358178177886)+(-0.32611846623)*0.5**o
            arg[(1, 1, 0, 1)]=0.347672502695*x[0]**o + (0.316409057667)*x[0] + (-0.999516026368)*x[1]**o + (-0.826752591283)*x[1]
            ref[(1, 1, 0, 1)]=-0.999516026368/(o+1.)+(-0.255171766808)+(0.347672502695)*0.5**o
            arg[(1, 1, 0, 2)]=-0.250866543631*x[0]**o + (-0.842706967625)*x[0] + (-0.725662510501)*x[1]**o + (0.0475271333016)*x[1]
            ref[(1, 1, 0, 2)]=-0.725662510501/(o+1.)+(-0.397589917162)+(-0.250866543631)*0.5**o
            arg[(1, 1, 0, 3)]=0.992866887128*x[0]**o + (0.832185484396)*x[0] + (0.869017972275)*x[1]**o + (-0.839208147402)*x[1]
            ref[(1, 1, 0, 3)]=0.869017972275/(o+1.)+(-0.00351133150326)+(0.992866887128)*0.5**o
            arg[(1, 1, 1, 0)]=0.788633385834*x[0]**o + (-0.0781258431703)*x[0] + (0.637569543813)*x[1]**o + (0.152284041065)*x[1]
            ref[(1, 1, 1, 0)]=0.637569543813/(o+1.)+(0.0370790989475)+(0.788633385834)*0.5**o
            arg[(1, 1, 1, 1)]=0.0070429002336*x[0]**o + (0.185414407161)*x[0] + (0.670427364783)*x[1]**o + (-0.207228977861)*x[1]
            ref[(1, 1, 1, 1)]=0.670427364783/(o+1.)+(-0.0109072853499)+(0.0070429002336)*0.5**o
            arg[(1, 1, 1, 2)]=0.707216106992*x[0]**o + (0.770392772675)*x[0] + (0.102272377176)*x[1]**o + (0.521445227949)*x[1]
            ref[(1, 1, 1, 2)]=0.102272377176/(o+1.)+(0.645919000312)+(0.707216106992)*0.5**o
            arg[(1, 1, 1, 3)]=-0.388203101261*x[0]**o + (-0.697114537922)*x[0] + (0.718882555901)*x[1]**o + (0.503136403279)*x[1]
            ref[(1, 1, 1, 3)]=0.718882555901/(o+1.)+(-0.0969890673213)+(-0.388203101261)*0.5**o
            arg[(1, 2, 0, 0)]=-0.421704159152*x[0]**o + (-0.479359448273)*x[0] + (0.397867854032)*x[1]**o + (-0.378703804191)*x[1]
            ref[(1, 2, 0, 0)]=0.397867854032/(o+1.)+(-0.429031626232)+(-0.421704159152)*0.5**o
            arg[(1, 2, 0, 1)]=0.497094124021*x[0]**o + (-0.735910582954)*x[0] + (0.343723651158)*x[1]**o + (0.329673188365)*x[1]
            ref[(1, 2, 0, 1)]=0.343723651158/(o+1.)+(-0.203118697295)+(0.497094124021)*0.5**o
            arg[(1, 2, 0, 2)]=-0.729123251634*x[0]**o + (0.490750363493)*x[0] + (0.90461663537)*x[1]**o + (0.948156255788)*x[1]
            ref[(1, 2, 0, 2)]=0.90461663537/(o+1.)+(0.71945330964)+(-0.729123251634)*0.5**o
            arg[(1, 2, 0, 3)]=-0.143417804389*x[0]**o + (-0.050245244406)*x[0] + (0.523070674971)*x[1]**o + (-0.33294192381)*x[1]
            ref[(1, 2, 0, 3)]=0.523070674971/(o+1.)+(-0.191593584108)+(-0.143417804389)*0.5**o
            arg[(1, 2, 1, 0)]=0.688625497435*x[0]**o + (-0.171363712758)*x[0] + (0.389260937735)*x[1]**o + (-0.287463332307)*x[1]
            ref[(1, 2, 1, 0)]=0.389260937735/(o+1.)+(-0.229413522532)+(0.688625497435)*0.5**o
            arg[(1, 2, 1, 1)]=0.264227183211*x[0]**o + (-0.287585589303)*x[0] + (0.415171649542)*x[1]**o + (0.136541911374)*x[1]
            ref[(1, 2, 1, 1)]=0.415171649542/(o+1.)+(-0.0755218389645)+(0.264227183211)*0.5**o
            arg[(1, 2, 1, 2)]=0.0128943689573*x[0]**o + (-0.000974604134049)*x[0] + (0.505200253175)*x[1]**o + (-0.189042060239)*x[1]
            ref[(1, 2, 1, 2)]=0.505200253175/(o+1.)+(-0.0950083321864)+(0.0128943689573)*0.5**o
            arg[(1, 2, 1, 3)]=0.739202888614*x[0]**o + (-0.786456463042)*x[0] + (-0.973412413024)*x[1]**o + (-0.500823009361)*x[1]
            ref[(1, 2, 1, 3)]=-0.973412413024/(o+1.)+(-0.643639736201)+(0.739202888614)*0.5**o
            arg[(1, 3, 0, 0)]=0.282259771358*x[0]**o + (-0.843174809128)*x[0] + (0.248984592215)*x[1]**o + (-0.815191281546)*x[1]
            ref[(1, 3, 0, 0)]=0.248984592215/(o+1.)+(-0.829183045337)+(0.282259771358)*0.5**o
            arg[(1, 3, 0, 1)]=0.866576652467*x[0]**o + (0.592704770128)*x[0] + (0.724010636247)*x[1]**o + (0.830546035093)*x[1]
            ref[(1, 3, 0, 1)]=0.724010636247/(o+1.)+(0.711625402611)+(0.866576652467)*0.5**o
            arg[(1, 3, 0, 2)]=-0.245488922031*x[0]**o + (0.0026611746119)*x[0] + (-0.888108201754)*x[1]**o + (0.775375232432)*x[1]
            ref[(1, 3, 0, 2)]=-0.888108201754/(o+1.)+(0.389018203522)+(-0.245488922031)*0.5**o
            arg[(1, 3, 0, 3)]=0.30165991848*x[0]**o + (0.126907929961)*x[0] + (-0.133592352508)*x[1]**o + (0.904001523072)*x[1]
            ref[(1, 3, 0, 3)]=-0.133592352508/(o+1.)+(0.515454726517)+(0.30165991848)*0.5**o
            arg[(1, 3, 1, 0)]=-0.0499106252212*x[0]**o + (-0.468616012868)*x[0] + (0.462616444271)*x[1]**o + (-0.147019577813)*x[1]
            ref[(1, 3, 1, 0)]=0.462616444271/(o+1.)+(-0.30781779534)+(-0.0499106252212)*0.5**o
            arg[(1, 3, 1, 1)]=0.0568245735315*x[0]**o + (-0.194415022056)*x[0] + (-0.502781597581)*x[1]**o + (0.871528505237)*x[1]
            ref[(1, 3, 1, 1)]=-0.502781597581/(o+1.)+(0.338556741591)+(0.0568245735315)*0.5**o
            arg[(1, 3, 1, 2)]=0.935833116166*x[0]**o + (-0.0362103994972)*x[0] + (0.637949979203)*x[1]**o + (-0.0420486847546)*x[1]
            ref[(1, 3, 1, 2)]=0.637949979203/(o+1.)+(-0.0391295421259)+(0.935833116166)*0.5**o
            arg[(1, 3, 1, 3)]=-0.693335582132*x[0]**o + (-0.894443272817)*x[0] + (-0.905079925251)*x[1]**o + (0.0552729444694)*x[1]
            ref[(1, 3, 1, 3)]=-0.905079925251/(o+1.)+(-0.419585164174)+(-0.693335582132)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.000736790748734*x[0]**o + (0.705719142039)*x[0] + (0.691981347377)*x[1]**o + (-0.471388081387)*x[1] + (-0.217857756494)*x[2]**o + (0.0519368615355)*x[2]
            ref[(0, 0, 0, 0)]=0.474123590883/(o+1.)+(0.143133961094)+(-0.000736790748734)*0.5**o
            arg[(0, 0, 0, 1)]=-0.714592404327*x[0]**o + (0.783816320544)*x[0] + (-0.481800835109)*x[1]**o + (-0.120620824579)*x[1] + (-0.672398197913)*x[2]**o + (0.121388591091)*x[2]
            ref[(0, 0, 0, 1)]=-1.15419903302/(o+1.)+(0.392292043528)+(-0.714592404327)*0.5**o
            arg[(0, 0, 0, 2)]=-0.413575430721*x[0]**o + (0.261643476213)*x[0] + (0.995216660091)*x[1]**o + (0.0677220413333)*x[1] + (-0.746599482415)*x[2]**o + (0.636170040625)*x[2]
            ref[(0, 0, 0, 2)]=0.248617177676/(o+1.)+(0.482767779086)+(-0.413575430721)*0.5**o
            arg[(0, 0, 0, 3)]=-0.948324257562*x[0]**o + (0.00734784392889)*x[0] + (0.978320545001)*x[1]**o + (0.711160836445)*x[1] + (0.875898917409)*x[2]**o + (-0.575830399505)*x[2]
            ref[(0, 0, 0, 3)]=1.85421946241/(o+1.)+(0.0713391404342)+(-0.948324257562)*0.5**o
            arg[(0, 0, 1, 0)]=0.219248501943*x[0]**o + (0.679512684614)*x[0] + (-0.728469642331)*x[1]**o + (0.0499765155964)*x[1] + (0.294501442977)*x[2]**o + (-0.624257008378)*x[2]
            ref[(0, 0, 1, 0)]=-0.433968199355/(o+1.)+(0.0526160959158)+(0.219248501943)*0.5**o
            arg[(0, 0, 1, 1)]=-0.742019877519*x[0]**o + (-0.485569292461)*x[0] + (-0.73333454219)*x[1]**o + (0.896784849925)*x[1] + (-0.913407276059)*x[2]**o + (-0.779894951115)*x[2]
            ref[(0, 0, 1, 1)]=-1.64674181825/(o+1.)+(-0.184339696825)+(-0.742019877519)*0.5**o
            arg[(0, 0, 1, 2)]=0.753259216771*x[0]**o + (-0.405851035218)*x[0] + (-0.994014166446)*x[1]**o + (0.0116010050933)*x[1] + (-0.719188859506)*x[2]**o + (-0.766360389339)*x[2]
            ref[(0, 0, 1, 2)]=-1.71320302595/(o+1.)+(-0.580305209732)+(0.753259216771)*0.5**o
            arg[(0, 0, 1, 3)]=-0.449367136333*x[0]**o + (-0.179508226129)*x[0] + (-0.404248904388)*x[1]**o + (0.202797699511)*x[1] + (-0.812443233121)*x[2]**o + (-0.220291846142)*x[2]
            ref[(0, 0, 1, 3)]=-1.21669213751/(o+1.)+(-0.0985011863803)+(-0.449367136333)*0.5**o
            arg[(0, 1, 0, 0)]=-0.738404705686*x[0]**o + (-0.100487394899)*x[0] + (-0.40500183848)*x[1]**o + (-0.20989197423)*x[1] + (0.806391165929)*x[2]**o + (0.992773806633)*x[2]
            ref[(0, 1, 0, 0)]=0.401389327449/(o+1.)+(0.341197218752)+(-0.738404705686)*0.5**o
            arg[(0, 1, 0, 1)]=0.911624666343*x[0]**o + (-0.605313803287)*x[0] + (-0.503236421935)*x[1]**o + (-0.807949971907)*x[1] + (0.25132321908)*x[2]**o + (-0.619908573163)*x[2]
            ref[(0, 1, 0, 1)]=-0.251913202855/(o+1.)+(-1.01658617418)+(0.911624666343)*0.5**o
            arg[(0, 1, 0, 2)]=0.742848965108*x[0]**o + (0.767979049616)*x[0] + (-0.442442778955)*x[1]**o + (-0.577788610274)*x[1] + (0.0910389602706)*x[2]**o + (0.145301921669)*x[2]
            ref[(0, 1, 0, 2)]=-0.351403818684/(o+1.)+(0.167746180505)+(0.742848965108)*0.5**o
            arg[(0, 1, 0, 3)]=0.906908411604*x[0]**o + (-0.181200483017)*x[0] + (0.0563718378541)*x[1]**o + (-0.845833954214)*x[1] + (0.0825204459481)*x[2]**o + (0.812395193698)*x[2]
            ref[(0, 1, 0, 3)]=0.138892283802/(o+1.)+(-0.107319621767)+(0.906908411604)*0.5**o
            arg[(0, 1, 1, 0)]=-0.598815324289*x[0]**o + (0.500066141793)*x[0] + (-0.310134204354)*x[1]**o + (0.918863692474)*x[1] + (0.689424106528)*x[2]**o + (0.651898171547)*x[2]
            ref[(0, 1, 1, 0)]=0.379289902173/(o+1.)+(1.03541400291)+(-0.598815324289)*0.5**o
            arg[(0, 1, 1, 1)]=-0.784959170543*x[0]**o + (-0.0322939711209)*x[0] + (0.0899576120411)*x[1]**o + (0.3098393167)*x[1] + (-0.125954556643)*x[2]**o + (-0.385665442614)*x[2]
            ref[(0, 1, 1, 1)]=-0.035996944602/(o+1.)+(-0.0540600485174)+(-0.784959170543)*0.5**o
            arg[(0, 1, 1, 2)]=0.309202597242*x[0]**o + (0.870510608925)*x[0] + (0.249347082146)*x[1]**o + (0.862127495173)*x[1] + (0.429179532101)*x[2]**o + (0.899121264923)*x[2]
            ref[(0, 1, 1, 2)]=0.678526614247/(o+1.)+(1.31587968451)+(0.309202597242)*0.5**o
            arg[(0, 1, 1, 3)]=0.301035804766*x[0]**o + (-0.329731343563)*x[0] + (-0.040574123645)*x[1]**o + (0.578855161605)*x[1] + (0.983155360855)*x[2]**o + (0.44327049332)*x[2]
            ref[(0, 1, 1, 3)]=0.94258123721/(o+1.)+(0.346197155681)+(0.301035804766)*0.5**o
            arg[(0, 2, 0, 0)]=-0.00532146335133*x[0]**o + (-0.89136067604)*x[0] + (-0.642271235319)*x[1]**o + (0.849053426615)*x[1] + (-0.603043196176)*x[2]**o + (0.0276812265711)*x[2]
            ref[(0, 2, 0, 0)]=-1.24531443149/(o+1.)+(-0.00731301142709)+(-0.00532146335133)*0.5**o
            arg[(0, 2, 0, 1)]=0.994852458149*x[0]**o + (0.847691559558)*x[0] + (0.564628324932)*x[1]**o + (-0.592747872982)*x[1] + (0.871832002255)*x[2]**o + (-0.674797283002)*x[2]
            ref[(0, 2, 0, 1)]=1.43646032719/(o+1.)+(-0.209926798213)+(0.994852458149)*0.5**o
            arg[(0, 2, 0, 2)]=-0.833128176981*x[0]**o + (0.467848624486)*x[0] + (-0.0381617413553)*x[1]**o + (-0.76240380205)*x[1] + (-0.802291861338)*x[2]**o + (0.625863185602)*x[2]
            ref[(0, 2, 0, 2)]=-0.840453602694/(o+1.)+(0.165654004019)+(-0.833128176981)*0.5**o
            arg[(0, 2, 0, 3)]=0.663143696815*x[0]**o + (0.0142433202523)*x[0] + (0.0386892167768)*x[1]**o + (0.234381323638)*x[1] + (-0.429257655638)*x[2]**o + (0.920964008781)*x[2]
            ref[(0, 2, 0, 3)]=-0.390568438861/(o+1.)+(0.584794326336)+(0.663143696815)*0.5**o
            arg[(0, 2, 1, 0)]=0.351768017221*x[0]**o + (-0.288851003096)*x[0] + (0.870724901889)*x[1]**o + (-0.0617480250409)*x[1] + (0.810493620373)*x[2]**o + (0.833301252878)*x[2]
            ref[(0, 2, 1, 0)]=1.68121852226/(o+1.)+(0.241351112371)+(0.351768017221)*0.5**o
            arg[(0, 2, 1, 1)]=0.547496107199*x[0]**o + (-0.438810757312)*x[0] + (-0.636374014076)*x[1]**o + (0.587330194863)*x[1] + (-0.202940509963)*x[2]**o + (-0.299658207906)*x[2]
            ref[(0, 2, 1, 1)]=-0.839314524039/(o+1.)+(-0.0755693851774)+(0.547496107199)*0.5**o
            arg[(0, 2, 1, 2)]=0.310026646475*x[0]**o + (0.437788625146)*x[0] + (0.0268346335737)*x[1]**o + (0.747557745673)*x[1] + (0.939966149557)*x[2]**o + (-0.796778684536)*x[2]
            ref[(0, 2, 1, 2)]=0.966800783131/(o+1.)+(0.194283843141)+(0.310026646475)*0.5**o
            arg[(0, 2, 1, 3)]=-0.35567799576*x[0]**o + (-0.0357336429985)*x[0] + (-0.113588103673)*x[1]**o + (-0.348405032512)*x[1] + (0.939563745258)*x[2]**o + (-0.567677088388)*x[2]
            ref[(0, 2, 1, 3)]=0.825975641585/(o+1.)+(-0.47590788195)+(-0.35567799576)*0.5**o
            arg[(0, 3, 0, 0)]=-0.0379974993849*x[0]**o + (-0.648605254264)*x[0] + (-0.94389250304)*x[1]**o + (0.0818100105323)*x[1] + (0.909212165828)*x[2]**o + (-0.729693507737)*x[2]
            ref[(0, 3, 0, 0)]=-0.0346803372118/(o+1.)+(-0.648244375735)+(-0.0379974993849)*0.5**o
            arg[(0, 3, 0, 1)]=-0.506798868725*x[0]**o + (-0.770000876294)*x[0] + (-0.988526611368)*x[1]**o + (-0.223709765017)*x[1] + (0.713457148696)*x[2]**o + (-0.538737065633)*x[2]
            ref[(0, 3, 0, 1)]=-0.275069462673/(o+1.)+(-0.766223853472)+(-0.506798868725)*0.5**o
            arg[(0, 3, 0, 2)]=0.50221251856*x[0]**o + (0.764900374934)*x[0] + (0.818100565228)*x[1]**o + (-0.871161023818)*x[1] + (0.97424917488)*x[2]**o + (0.138510712535)*x[2]
            ref[(0, 3, 0, 2)]=1.79234974011/(o+1.)+(0.0161250318256)+(0.50221251856)*0.5**o
            arg[(0, 3, 0, 3)]=0.301276299794*x[0]**o + (-0.704162972771)*x[0] + (0.277733159423)*x[1]**o + (0.662706652196)*x[1] + (-0.0445983433073)*x[2]**o + (0.655226428722)*x[2]
            ref[(0, 3, 0, 3)]=0.233134816116/(o+1.)+(0.306885054074)+(0.301276299794)*0.5**o
            arg[(0, 3, 1, 0)]=-0.648534916185*x[0]**o + (-0.950223945341)*x[0] + (-0.933049248959)*x[1]**o + (0.39777907711)*x[1] + (0.229773568289)*x[2]**o + (0.97467772627)*x[2]
            ref[(0, 3, 1, 0)]=-0.70327568067/(o+1.)+(0.21111642902)+(-0.648534916185)*0.5**o
            arg[(0, 3, 1, 1)]=-0.599706943137*x[0]**o + (0.413067505413)*x[0] + (0.176363308326)*x[1]**o + (-0.27957062397)*x[1] + (-0.314174650093)*x[2]**o + (0.839022601376)*x[2]
            ref[(0, 3, 1, 1)]=-0.137811341767/(o+1.)+(0.486259741409)+(-0.599706943137)*0.5**o
            arg[(0, 3, 1, 2)]=-0.329441415453*x[0]**o + (0.179147855026)*x[0] + (0.638966009872)*x[1]**o + (-0.765818003024)*x[1] + (0.853966964251)*x[2]**o + (0.000859205470685)*x[2]
            ref[(0, 3, 1, 2)]=1.49293297412/(o+1.)+(-0.292905471264)+(-0.329441415453)*0.5**o
            arg[(0, 3, 1, 3)]=0.189342605068*x[0]**o + (-0.120868961134)*x[0] + (-0.0962785672287)*x[1]**o + (-0.0392842306376)*x[1] + (0.263045591517)*x[2]**o + (-0.585114385259)*x[2]
            ref[(0, 3, 1, 3)]=0.166767024288/(o+1.)+(-0.372633788515)+(0.189342605068)*0.5**o
            arg[(1, 0, 0, 0)]=-0.624673483228*x[0]**o + (-0.284597906687)*x[0] + (-0.0296165925792)*x[1]**o + (0.848379031696)*x[1] + (-0.756913557652)*x[2]**o + (-0.91848125872)*x[2]
            ref[(1, 0, 0, 0)]=-0.786530150231/(o+1.)+(-0.177350066856)+(-0.624673483228)*0.5**o
            arg[(1, 0, 0, 1)]=-0.159846653017*x[0]**o + (-0.542271095418)*x[0] + (0.653322283508)*x[1]**o + (-0.965772760775)*x[1] + (0.470465384381)*x[2]**o + (0.730151298074)*x[2]
            ref[(1, 0, 0, 1)]=1.12378766789/(o+1.)+(-0.38894627906)+(-0.159846653017)*0.5**o
            arg[(1, 0, 0, 2)]=-0.385652793748*x[0]**o + (-0.0698619826668)*x[0] + (0.214481642083)*x[1]**o + (-0.924260691096)*x[1] + (-0.417315810522)*x[2]**o + (-0.745235310507)*x[2]
            ref[(1, 0, 0, 2)]=-0.202834168439/(o+1.)+(-0.869678992135)+(-0.385652793748)*0.5**o
            arg[(1, 0, 0, 3)]=0.52766383284*x[0]**o + (0.939310340689)*x[0] + (-0.42298693841)*x[1]**o + (-0.965817527621)*x[1] + (-0.0685274471037)*x[2]**o + (0.204835382986)*x[2]
            ref[(1, 0, 0, 3)]=-0.491514385514/(o+1.)+(0.089164098027)+(0.52766383284)*0.5**o
            arg[(1, 0, 1, 0)]=0.528413279973*x[0]**o + (-0.418129960763)*x[0] + (-0.969219600507)*x[1]**o + (-0.259703321516)*x[1] + (-0.175372279724)*x[2]**o + (0.444686916095)*x[2]
            ref[(1, 0, 1, 0)]=-1.14459188023/(o+1.)+(-0.116573183092)+(0.528413279973)*0.5**o
            arg[(1, 0, 1, 1)]=-0.193523573873*x[0]**o + (-0.862367617342)*x[0] + (-0.1195996633)*x[1]**o + (-0.672799110045)*x[1] + (-0.550970229568)*x[2]**o + (-0.895129135617)*x[2]
            ref[(1, 0, 1, 1)]=-0.670569892868/(o+1.)+(-1.2151479315)+(-0.193523573873)*0.5**o
            arg[(1, 0, 1, 2)]=0.0276904058479*x[0]**o + (0.00794198718864)*x[0] + (0.913391424552)*x[1]**o + (0.969703971147)*x[1] + (-0.0191688234867)*x[2]**o + (0.0849157902759)*x[2]
            ref[(1, 0, 1, 2)]=0.894222601065/(o+1.)+(0.531280874306)+(0.0276904058479)*0.5**o
            arg[(1, 0, 1, 3)]=-0.679706315649*x[0]**o + (-0.901136124158)*x[0] + (0.525078921564)*x[1]**o + (-0.797802741761)*x[1] + (0.512777457988)*x[2]**o + (-0.45845610791)*x[2]
            ref[(1, 0, 1, 3)]=1.03785637955/(o+1.)+(-1.07869748691)+(-0.679706315649)*0.5**o
            arg[(1, 1, 0, 0)]=0.711226720297*x[0]**o + (-0.828362852772)*x[0] + (-0.273631065177)*x[1]**o + (0.688432920481)*x[1] + (0.731022709609)*x[2]**o + (-0.519028548844)*x[2]
            ref[(1, 1, 0, 0)]=0.457391644431/(o+1.)+(-0.329479240567)+(0.711226720297)*0.5**o
            arg[(1, 1, 0, 1)]=0.197230803741*x[0]**o + (0.936359083963)*x[0] + (0.385840595748)*x[1]**o + (0.757707261791)*x[1] + (-0.360637291391)*x[2]**o + (-0.136271467125)*x[2]
            ref[(1, 1, 0, 1)]=0.025203304357/(o+1.)+(0.778897439315)+(0.197230803741)*0.5**o
            arg[(1, 1, 0, 2)]=-0.878216936248*x[0]**o + (0.883194953831)*x[0] + (-0.830813676659)*x[1]**o + (0.686035627253)*x[1] + (-0.538135310013)*x[2]**o + (0.711782223482)*x[2]
            ref[(1, 1, 0, 2)]=-1.36894898667/(o+1.)+(1.14050640228)+(-0.878216936248)*0.5**o
            arg[(1, 1, 0, 3)]=0.256464873895*x[0]**o + (-0.607386111519)*x[0] + (0.366732273894)*x[1]**o + (-0.550010392084)*x[1] + (-0.893735303471)*x[2]**o + (0.624465270669)*x[2]
            ref[(1, 1, 0, 3)]=-0.527003029577/(o+1.)+(-0.266465616467)+(0.256464873895)*0.5**o
            arg[(1, 1, 1, 0)]=0.904380130953*x[0]**o + (-0.790635906793)*x[0] + (-0.271992707153)*x[1]**o + (-0.773238232258)*x[1] + (-0.621008671112)*x[2]**o + (0.73433912048)*x[2]
            ref[(1, 1, 1, 0)]=-0.893001378264/(o+1.)+(-0.414767509285)+(0.904380130953)*0.5**o
            arg[(1, 1, 1, 1)]=-0.576982011674*x[0]**o + (-0.565303446004)*x[0] + (0.570424686544)*x[1]**o + (-0.211018988305)*x[1] + (-0.0912358291246)*x[2]**o + (-0.147849374584)*x[2]
            ref[(1, 1, 1, 1)]=0.479188857419/(o+1.)+(-0.462085904447)+(-0.576982011674)*0.5**o
            arg[(1, 1, 1, 2)]=-0.396128376663*x[0]**o + (-0.826868291641)*x[0] + (-0.215086416919)*x[1]**o + (-0.696856918606)*x[1] + (0.42716870771)*x[2]**o + (0.204865436192)*x[2]
            ref[(1, 1, 1, 2)]=0.212082290791/(o+1.)+(-0.659429887028)+(-0.396128376663)*0.5**o
            arg[(1, 1, 1, 3)]=-0.869357494237*x[0]**o + (-0.532209965486)*x[0] + (0.980765274095)*x[1]**o + (0.960626696273)*x[1] + (-0.566034187136)*x[2]**o + (0.619751343969)*x[2]
            ref[(1, 1, 1, 3)]=0.414731086959/(o+1.)+(0.524084037378)+(-0.869357494237)*0.5**o
            arg[(1, 2, 0, 0)]=0.0607894299332*x[0]**o + (0.948314035544)*x[0] + (-0.1240321658)*x[1]**o + (0.406208287398)*x[1] + (-0.191302706198)*x[2]**o + (0.0779798609789)*x[2]
            ref[(1, 2, 0, 0)]=-0.315334871998/(o+1.)+(0.71625109196)+(0.0607894299332)*0.5**o
            arg[(1, 2, 0, 1)]=-0.36080893293*x[0]**o + (0.101307169329)*x[0] + (0.0605660228645)*x[1]**o + (0.512599559481)*x[1] + (-0.904398705155)*x[2]**o + (-0.492111450023)*x[2]
            ref[(1, 2, 0, 1)]=-0.843832682291/(o+1.)+(0.0608976393935)+(-0.36080893293)*0.5**o
            arg[(1, 2, 0, 2)]=0.408872912831*x[0]**o + (0.773869638223)*x[0] + (0.0107251340653)*x[1]**o + (0.795027631914)*x[1] + (-0.115304958496)*x[2]**o + (0.314845949621)*x[2]
            ref[(1, 2, 0, 2)]=-0.10457982443/(o+1.)+(0.941871609879)+(0.408872912831)*0.5**o
            arg[(1, 2, 0, 3)]=-0.0438501987295*x[0]**o + (0.367758804547)*x[0] + (-0.990596877709)*x[1]**o + (-0.636216364838)*x[1] + (-0.0955805939388)*x[2]**o + (0.809522822469)*x[2]
            ref[(1, 2, 0, 3)]=-1.08617747165/(o+1.)+(0.270532631089)+(-0.0438501987295)*0.5**o
            arg[(1, 2, 1, 0)]=-0.55755577635*x[0]**o + (0.23199883607)*x[0] + (0.449778806542)*x[1]**o + (0.549578017968)*x[1] + (0.890615324595)*x[2]**o + (0.131587564767)*x[2]
            ref[(1, 2, 1, 0)]=1.34039413114/(o+1.)+(0.456582209402)+(-0.55755577635)*0.5**o
            arg[(1, 2, 1, 1)]=0.827882498927*x[0]**o + (-0.5619287657)*x[0] + (0.0842983416444)*x[1]**o + (-0.777210024141)*x[1] + (-0.0611140997899)*x[2]**o + (0.990243366409)*x[2]
            ref[(1, 2, 1, 1)]=0.0231842418545/(o+1.)+(-0.174447711716)+(0.827882498927)*0.5**o
            arg[(1, 2, 1, 2)]=0.557733439845*x[0]**o + (-0.972892121332)*x[0] + (-0.0352408510925)*x[1]**o + (-0.348606688893)*x[1] + (-0.316771704465)*x[2]**o + (0.888714203011)*x[2]
            ref[(1, 2, 1, 2)]=-0.352012555557/(o+1.)+(-0.216392303607)+(0.557733439845)*0.5**o
            arg[(1, 2, 1, 3)]=-0.611924331321*x[0]**o + (0.0760554385442)*x[0] + (-0.780014744454)*x[1]**o + (-0.890476980455)*x[1] + (-0.229330802059)*x[2]**o + (-0.133062934253)*x[2]
            ref[(1, 2, 1, 3)]=-1.00934554651/(o+1.)+(-0.473742238082)+(-0.611924331321)*0.5**o
            arg[(1, 3, 0, 0)]=-0.996232491544*x[0]**o + (-0.0395265420528)*x[0] + (0.275633511614)*x[1]**o + (0.0290914306902)*x[1] + (-0.245509327746)*x[2]**o + (0.587500520406)*x[2]
            ref[(1, 3, 0, 0)]=0.0301241838679/(o+1.)+(0.288532704522)+(-0.996232491544)*0.5**o
            arg[(1, 3, 0, 1)]=-0.861026493457*x[0]**o + (-0.603358370039)*x[0] + (-0.529878198206)*x[1]**o + (-0.364814412362)*x[1] + (0.523517978988)*x[2]**o + (0.887349223495)*x[2]
            ref[(1, 3, 0, 1)]=-0.00636021921748/(o+1.)+(-0.0404117794532)+(-0.861026493457)*0.5**o
            arg[(1, 3, 0, 2)]=-0.804718923855*x[0]**o + (0.868956915608)*x[0] + (-0.637025299524)*x[1]**o + (-0.348427526107)*x[1] + (0.694728045873)*x[2]**o + (0.349142554612)*x[2]
            ref[(1, 3, 0, 2)]=0.0577027463487/(o+1.)+(0.434835972057)+(-0.804718923855)*0.5**o
            arg[(1, 3, 0, 3)]=0.194465491785*x[0]**o + (-0.640693772908)*x[0] + (0.579514136895)*x[1]**o + (-0.798234880073)*x[1] + (-0.55526507798)*x[2]**o + (0.457845679993)*x[2]
            ref[(1, 3, 0, 3)]=0.0242490589155/(o+1.)+(-0.490541486494)+(0.194465491785)*0.5**o
            arg[(1, 3, 1, 0)]=-0.592485970946*x[0]**o + (0.807855865105)*x[0] + (-0.73749487438)*x[1]**o + (0.0596609277012)*x[1] + (0.600552124798)*x[2]**o + (-0.310174791191)*x[2]
            ref[(1, 3, 1, 0)]=-0.136942749582/(o+1.)+(0.278671000807)+(-0.592485970946)*0.5**o
            arg[(1, 3, 1, 1)]=0.5220575255*x[0]**o + (-0.250090523984)*x[0] + (0.861988985359)*x[1]**o + (-0.38213222423)*x[1] + (0.536958069775)*x[2]**o + (0.846905804031)*x[2]
            ref[(1, 3, 1, 1)]=1.39894705513/(o+1.)+(0.107341527908)+(0.5220575255)*0.5**o
            arg[(1, 3, 1, 2)]=0.780963545899*x[0]**o + (-0.542890872831)*x[0] + (-0.196135749571)*x[1]**o + (0.0927557335491)*x[1] + (-0.197068074006)*x[2]**o + (0.3764829485)*x[2]
            ref[(1, 3, 1, 2)]=-0.393203823577/(o+1.)+(-0.0368260953906)+(0.780963545899)*0.5**o
            arg[(1, 3, 1, 3)]=-0.203189922751*x[0]**o + (0.412182964027)*x[0] + (-0.485035183578)*x[1]**o + (0.416463540491)*x[1] + (-0.287257832773)*x[2]**o + (-0.705546271504)*x[2]
            ref[(1, 3, 1, 3)]=-0.772293016351/(o+1.)+(0.061550116507)+(-0.203189922751)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.300731108369*x[0] + (-0.0213036204254)*x[1]
            ref=0.139713743972
        else:
            arg=0.128685691964*x[0] + (0.945267440529)*x[1] + (0.144885886038)*x[2]
            ref=0.609419509265
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.444288336088*x[0] + (-0.599258989615)*x[1]
            ref[(0,)]=-0.0774853267631
            arg[(1,)]=0.372070133029*x[0] + (-0.13015710672)*x[1]
            ref[(1,)]=0.120956513154
        else:
            arg[(0,)]=0.522387323793*x[0] + (-0.43380346236)*x[1] + (0.330905638283)*x[2]
            ref[(0,)]=0.209744749858
            arg[(1,)]=0.343301499317*x[0] + (-0.298077887422)*x[1] + (-0.527338256214)*x[2]
            ref[(1,)]=-0.241057322159
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.394747162566*x[0] + (0.557742808104)*x[1]
            ref[(0, 0)]=0.476244985335
            arg[(0, 1)]=0.991397736384*x[0] + (-0.744532449457)*x[1]
            ref[(0, 1)]=0.123432643463
            arg[(0, 2)]=-0.770163716524*x[0] + (-0.274105143098)*x[1]
            ref[(0, 2)]=-0.522134429811
            arg[(1, 0)]=-0.433270392993*x[0] + (0.319736373937)*x[1]
            ref[(1, 0)]=-0.0567670095281
            arg[(1, 1)]=-0.0818799174537*x[0] + (-0.521274998356)*x[1]
            ref[(1, 1)]=-0.301577457905
            arg[(1, 2)]=-0.417202130744*x[0] + (-0.577439484075)*x[1]
            ref[(1, 2)]=-0.49732080741
            arg[(2, 0)]=0.794379586685*x[0] + (-0.450409862389)*x[1]
            ref[(2, 0)]=0.171984862148
            arg[(2, 1)]=-0.389259221863*x[0] + (0.671049834769)*x[1]
            ref[(2, 1)]=0.140895306453
            arg[(2, 2)]=0.80945477318*x[0] + (-0.448998654545)*x[1]
            ref[(2, 2)]=0.180228059318
        else:
            arg[(0, 0)]=0.106141280347*x[0] + (0.9269175816)*x[1] + (0.984165928855)*x[2]
            ref[(0, 0)]=1.0086123954
            arg[(0, 1)]=-0.402814424992*x[0] + (-0.39989979082)*x[1] + (-0.527507337333)*x[2]
            ref[(0, 1)]=-0.665110776573
            arg[(0, 2)]=0.92964441682*x[0] + (-0.785146720533)*x[1] + (0.455667265701)*x[2]
            ref[(0, 2)]=0.300082480994
            arg[(1, 0)]=-0.0871781173383*x[0] + (-0.159608543521)*x[1] + (-0.4189819708)*x[2]
            ref[(1, 0)]=-0.33288431583
            arg[(1, 1)]=-0.494832527371*x[0] + (0.866671112505)*x[1] + (-0.994245611958)*x[2]
            ref[(1, 1)]=-0.311203513412
            arg[(1, 2)]=0.444884463988*x[0] + (-0.93474924155)*x[1] + (-0.569862033741)*x[2]
            ref[(1, 2)]=-0.529863405652
            arg[(2, 0)]=-0.822306470299*x[0] + (0.779186960434)*x[1] + (0.00245947544926)*x[2]
            ref[(2, 0)]=-0.020330017208
            arg[(2, 1)]=0.295190043032*x[0] + (0.675512353081)*x[1] + (0.810751299668)*x[2]
            ref[(2, 1)]=0.89072684789
            arg[(2, 2)]=0.830910848962*x[0] + (0.555290494873)*x[1] + (0.622797141864)*x[2]
            ref[(2, 2)]=1.00449924285
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref=numpy.zeros((2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.461320022565*x[0] + (0.830229036302)*x[1]
            ref[(0, 0, 0)]=0.184454506868
            arg[(0, 0, 1)]=-0.264083734668*x[0] + (0.810360782552)*x[1]
            ref[(0, 0, 1)]=0.273138523942
            arg[(0, 1, 0)]=-0.524531196738*x[0] + (-0.535448423293)*x[1]
            ref[(0, 1, 0)]=-0.529989810016
            arg[(0, 1, 1)]=0.344369071632*x[0] + (-0.415543418817)*x[1]
            ref[(0, 1, 1)]=-0.0355871735923
            arg[(0, 2, 0)]=0.929418279094*x[0] + (0.35624173037)*x[1]
            ref[(0, 2, 0)]=0.642830004732
            arg[(0, 2, 1)]=0.718309511585*x[0] + (-0.157626651272)*x[1]
            ref[(0, 2, 1)]=0.280341430156
            arg[(0, 3, 0)]=0.11506836718*x[0] + (0.770609462951)*x[1]
            ref[(0, 3, 0)]=0.442838915065
            arg[(0, 3, 1)]=-0.776274634007*x[0] + (0.723836940957)*x[1]
            ref[(0, 3, 1)]=-0.0262188465248
            arg[(1, 0, 0)]=0.141166392351*x[0] + (-0.73821201495)*x[1]
            ref[(1, 0, 0)]=-0.298522811299
            arg[(1, 0, 1)]=-0.865013981269*x[0] + (-0.112607312957)*x[1]
            ref[(1, 0, 1)]=-0.488810647113
            arg[(1, 1, 0)]=-0.0482916297229*x[0] + (0.813384546278)*x[1]
            ref[(1, 1, 0)]=0.382546458278
            arg[(1, 1, 1)]=0.137971195865*x[0] + (-0.449405167783)*x[1]
            ref[(1, 1, 1)]=-0.155716985959
            arg[(1, 2, 0)]=0.96550034754*x[0] + (0.902922472417)*x[1]
            ref[(1, 2, 0)]=0.934211409978
            arg[(1, 2, 1)]=-0.203814900153*x[0] + (0.826340872164)*x[1]
            ref[(1, 2, 1)]=0.311262986005
            arg[(1, 3, 0)]=0.805091127921*x[0] + (-0.173610534973)*x[1]
            ref[(1, 3, 0)]=0.315740296474
            arg[(1, 3, 1)]=0.642425975698*x[0] + (0.923531416846)*x[1]
            ref[(1, 3, 1)]=0.782978696272
        else:
            arg[(0, 0, 0)]=-0.917859463221*x[0] + (-0.23085259677)*x[1] + (0.72933305257)*x[2]
            ref[(0, 0, 0)]=-0.20968950371
            arg[(0, 0, 1)]=-0.953625644655*x[0] + (0.134094397966)*x[1] + (0.440684110988)*x[2]
            ref[(0, 0, 1)]=-0.189423567851
            arg[(0, 1, 0)]=-0.767568250292*x[0] + (-0.316200349263)*x[1] + (0.154790354514)*x[2]
            ref[(0, 1, 0)]=-0.46448912252
            arg[(0, 1, 1)]=-0.639350861414*x[0] + (0.0140384444863)*x[1] + (-0.471407544131)*x[2]
            ref[(0, 1, 1)]=-0.548359980529
            arg[(0, 2, 0)]=-0.0587535786171*x[0] + (-0.323638094248)*x[1] + (-0.663677301227)*x[2]
            ref[(0, 2, 0)]=-0.523034487046
            arg[(0, 2, 1)]=0.138187519553*x[0] + (-0.605756371741)*x[1] + (-0.425047182274)*x[2]
            ref[(0, 2, 1)]=-0.446308017231
            arg[(0, 3, 0)]=-0.868952443936*x[0] + (-0.627989704582)*x[1] + (-0.90509429314)*x[2]
            ref[(0, 3, 0)]=-1.20101822083
            arg[(0, 3, 1)]=-0.698915005598*x[0] + (-0.988124168233)*x[1] + (-0.715149475212)*x[2]
            ref[(0, 3, 1)]=-1.20109432452
            arg[(1, 0, 0)]=-0.107006743493*x[0] + (0.858172087672)*x[1] + (0.314043956129)*x[2]
            ref[(1, 0, 0)]=0.532604650154
            arg[(1, 0, 1)]=0.116733257484*x[0] + (-0.48410290109)*x[1] + (0.872531824584)*x[2]
            ref[(1, 0, 1)]=0.252581090489
            arg[(1, 1, 0)]=-0.712742004897*x[0] + (-0.170544219988)*x[1] + (0.854323767362)*x[2]
            ref[(1, 1, 0)]=-0.0144812287615
            arg[(1, 1, 1)]=-0.113694905326*x[0] + (0.98519418212)*x[1] + (-0.479999097102)*x[2]
            ref[(1, 1, 1)]=0.195750089846
            arg[(1, 2, 0)]=-0.42561356076*x[0] + (-0.41755765014)*x[1] + (0.665654860199)*x[2]
            ref[(1, 2, 0)]=-0.0887581753505
            arg[(1, 2, 1)]=0.00201364416017*x[0] + (0.211068044789)*x[1] + (-0.801873230763)*x[2]
            ref[(1, 2, 1)]=-0.294395770907
            arg[(1, 3, 0)]=-0.153145675081*x[0] + (-0.459649138032)*x[1] + (0.652981744825)*x[2]
            ref[(1, 3, 0)]=0.0200934658561
            arg[(1, 3, 1)]=0.989937352916*x[0] + (-0.541495270631)*x[1] + (0.765813548893)*x[2]
            ref[(1, 3, 1)]=0.607127815589
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 4),w)
        ref=numpy.zeros((4, 3, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.131767179448*x[0] + (0.530590948595)*x[1]
            ref[(0, 0, 0, 0)]=0.199411884574
            arg[(0, 0, 0, 1)]=-0.908181175366*x[0] + (-0.528323972378)*x[1]
            ref[(0, 0, 0, 1)]=-0.718252573872
            arg[(0, 0, 0, 2)]=-0.560540510981*x[0] + (-0.830112934404)*x[1]
            ref[(0, 0, 0, 2)]=-0.695326722693
            arg[(0, 0, 0, 3)]=0.760337335523*x[0] + (-0.959714705293)*x[1]
            ref[(0, 0, 0, 3)]=-0.0996886848851
            arg[(0, 0, 1, 0)]=0.751518800426*x[0] + (0.872350102138)*x[1]
            ref[(0, 0, 1, 0)]=0.811934451282
            arg[(0, 0, 1, 1)]=-0.480987746902*x[0] + (0.271524372575)*x[1]
            ref[(0, 0, 1, 1)]=-0.104731687163
            arg[(0, 0, 1, 2)]=-0.281255570806*x[0] + (-0.442162317403)*x[1]
            ref[(0, 0, 1, 2)]=-0.361708944104
            arg[(0, 0, 1, 3)]=-0.213157728025*x[0] + (-0.952325384346)*x[1]
            ref[(0, 0, 1, 3)]=-0.582741556185
            arg[(0, 0, 2, 0)]=-0.731702169381*x[0] + (0.788125877378)*x[1]
            ref[(0, 0, 2, 0)]=0.0282118539984
            arg[(0, 0, 2, 1)]=-0.572515600115*x[0] + (0.276108494407)*x[1]
            ref[(0, 0, 2, 1)]=-0.148203552854
            arg[(0, 0, 2, 2)]=-0.204770666115*x[0] + (0.583066063354)*x[1]
            ref[(0, 0, 2, 2)]=0.18914769862
            arg[(0, 0, 2, 3)]=-0.00797097842562*x[0] + (0.181577161205)*x[1]
            ref[(0, 0, 2, 3)]=0.0868030913896
            arg[(0, 1, 0, 0)]=-0.362441083419*x[0] + (0.0477665934753)*x[1]
            ref[(0, 1, 0, 0)]=-0.157337244972
            arg[(0, 1, 0, 1)]=0.231641125683*x[0] + (0.280256895332)*x[1]
            ref[(0, 1, 0, 1)]=0.255949010507
            arg[(0, 1, 0, 2)]=0.299174369893*x[0] + (-0.699334743004)*x[1]
            ref[(0, 1, 0, 2)]=-0.200080186556
            arg[(0, 1, 0, 3)]=0.560226116994*x[0] + (0.10691187972)*x[1]
            ref[(0, 1, 0, 3)]=0.333568998357
            arg[(0, 1, 1, 0)]=0.119608261794*x[0] + (-0.834146651516)*x[1]
            ref[(0, 1, 1, 0)]=-0.357269194861
            arg[(0, 1, 1, 1)]=0.375846409652*x[0] + (-0.512597631053)*x[1]
            ref[(0, 1, 1, 1)]=-0.0683756107005
            arg[(0, 1, 1, 2)]=-0.624456770814*x[0] + (-0.497997051906)*x[1]
            ref[(0, 1, 1, 2)]=-0.56122691136
            arg[(0, 1, 1, 3)]=-0.429327594281*x[0] + (-0.104630867384)*x[1]
            ref[(0, 1, 1, 3)]=-0.266979230832
            arg[(0, 1, 2, 0)]=0.954250549839*x[0] + (0.306129947242)*x[1]
            ref[(0, 1, 2, 0)]=0.63019024854
            arg[(0, 1, 2, 1)]=0.826830254999*x[0] + (0.244288057049)*x[1]
            ref[(0, 1, 2, 1)]=0.535559156024
            arg[(0, 1, 2, 2)]=0.421228514821*x[0] + (-0.388442063258)*x[1]
            ref[(0, 1, 2, 2)]=0.0163932257817
            arg[(0, 1, 2, 3)]=0.473141335322*x[0] + (0.496765833801)*x[1]
            ref[(0, 1, 2, 3)]=0.484953584562
            arg[(0, 2, 0, 0)]=-0.483335371403*x[0] + (0.865545950404)*x[1]
            ref[(0, 2, 0, 0)]=0.1911052895
            arg[(0, 2, 0, 1)]=-0.833239584281*x[0] + (0.598524951906)*x[1]
            ref[(0, 2, 0, 1)]=-0.117357316187
            arg[(0, 2, 0, 2)]=0.370161397123*x[0] + (0.923702132772)*x[1]
            ref[(0, 2, 0, 2)]=0.646931764948
            arg[(0, 2, 0, 3)]=0.680232598381*x[0] + (0.140722776049)*x[1]
            ref[(0, 2, 0, 3)]=0.410477687215
            arg[(0, 2, 1, 0)]=-0.266991861755*x[0] + (-0.510414342839)*x[1]
            ref[(0, 2, 1, 0)]=-0.388703102297
            arg[(0, 2, 1, 1)]=0.869000456056*x[0] + (-0.724876088449)*x[1]
            ref[(0, 2, 1, 1)]=0.0720621838038
            arg[(0, 2, 1, 2)]=-0.105820439092*x[0] + (-0.218468368245)*x[1]
            ref[(0, 2, 1, 2)]=-0.162144403669
            arg[(0, 2, 1, 3)]=0.374398694249*x[0] + (0.986177394298)*x[1]
            ref[(0, 2, 1, 3)]=0.680288044274
            arg[(0, 2, 2, 0)]=-0.176353293503*x[0] + (0.945491338592)*x[1]
            ref[(0, 2, 2, 0)]=0.384569022545
            arg[(0, 2, 2, 1)]=0.710600840521*x[0] + (-0.210637838703)*x[1]
            ref[(0, 2, 2, 1)]=0.249981500909
            arg[(0, 2, 2, 2)]=0.451009700767*x[0] + (-0.617722886805)*x[1]
            ref[(0, 2, 2, 2)]=-0.0833565930188
            arg[(0, 2, 2, 3)]=0.0448128118877*x[0] + (0.48267020721)*x[1]
            ref[(0, 2, 2, 3)]=0.263741509549
            arg[(1, 0, 0, 0)]=-0.712434215054*x[0] + (-0.548361528182)*x[1]
            ref[(1, 0, 0, 0)]=-0.630397871618
            arg[(1, 0, 0, 1)]=-0.979444573988*x[0] + (-0.0623008042804)*x[1]
            ref[(1, 0, 0, 1)]=-0.520872689134
            arg[(1, 0, 0, 2)]=0.320292249501*x[0] + (0.573464637658)*x[1]
            ref[(1, 0, 0, 2)]=0.446878443579
            arg[(1, 0, 0, 3)]=-0.358643640508*x[0] + (0.865604520193)*x[1]
            ref[(1, 0, 0, 3)]=0.253480439842
            arg[(1, 0, 1, 0)]=0.417137772048*x[0] + (0.68432004587)*x[1]
            ref[(1, 0, 1, 0)]=0.550728908959
            arg[(1, 0, 1, 1)]=0.893205482629*x[0] + (-0.427217136454)*x[1]
            ref[(1, 0, 1, 1)]=0.232994173087
            arg[(1, 0, 1, 2)]=-0.975190718919*x[0] + (0.253530026973)*x[1]
            ref[(1, 0, 1, 2)]=-0.360830345973
            arg[(1, 0, 1, 3)]=-0.238488514215*x[0] + (-0.0901560600887)*x[1]
            ref[(1, 0, 1, 3)]=-0.164322287152
            arg[(1, 0, 2, 0)]=-0.872796466771*x[0] + (-0.952421693833)*x[1]
            ref[(1, 0, 2, 0)]=-0.912609080302
            arg[(1, 0, 2, 1)]=0.340160440486*x[0] + (-0.662870992292)*x[1]
            ref[(1, 0, 2, 1)]=-0.161355275903
            arg[(1, 0, 2, 2)]=-0.205278401717*x[0] + (-0.140575159581)*x[1]
            ref[(1, 0, 2, 2)]=-0.172926780649
            arg[(1, 0, 2, 3)]=0.216142148684*x[0] + (-0.458552932918)*x[1]
            ref[(1, 0, 2, 3)]=-0.121205392117
            arg[(1, 1, 0, 0)]=0.265497101664*x[0] + (-0.505079445962)*x[1]
            ref[(1, 1, 0, 0)]=-0.119791172149
            arg[(1, 1, 0, 1)]=0.975528630859*x[0] + (0.198869420101)*x[1]
            ref[(1, 1, 0, 1)]=0.58719902548
            arg[(1, 1, 0, 2)]=0.628900311489*x[0] + (-0.0132206322291)*x[1]
            ref[(1, 1, 0, 2)]=0.30783983963
            arg[(1, 1, 0, 3)]=-0.0580713176302*x[0] + (0.0484080506372)*x[1]
            ref[(1, 1, 0, 3)]=-0.00483163349651
            arg[(1, 1, 1, 0)]=-0.591263453946*x[0] + (0.837582173447)*x[1]
            ref[(1, 1, 1, 0)]=0.12315935975
            arg[(1, 1, 1, 1)]=0.617384527971*x[0] + (-0.725382386904)*x[1]
            ref[(1, 1, 1, 1)]=-0.053998929466
            arg[(1, 1, 1, 2)]=-0.026905833616*x[0] + (-0.298480379185)*x[1]
            ref[(1, 1, 1, 2)]=-0.1626931064
            arg[(1, 1, 1, 3)]=0.706204798533*x[0] + (0.524581146457)*x[1]
            ref[(1, 1, 1, 3)]=0.615392972495
            arg[(1, 1, 2, 0)]=-0.856199108936*x[0] + (-0.404272442368)*x[1]
            ref[(1, 1, 2, 0)]=-0.630235775652
            arg[(1, 1, 2, 1)]=-0.360768990367*x[0] + (-0.0447644801067)*x[1]
            ref[(1, 1, 2, 1)]=-0.202766735237
            arg[(1, 1, 2, 2)]=0.207191702699*x[0] + (0.144989446292)*x[1]
            ref[(1, 1, 2, 2)]=0.176090574496
            arg[(1, 1, 2, 3)]=-0.920683954566*x[0] + (0.492226311897)*x[1]
            ref[(1, 1, 2, 3)]=-0.214228821334
            arg[(1, 2, 0, 0)]=-0.812850572343*x[0] + (-0.912566878315)*x[1]
            ref[(1, 2, 0, 0)]=-0.862708725329
            arg[(1, 2, 0, 1)]=0.860835152453*x[0] + (0.873968624176)*x[1]
            ref[(1, 2, 0, 1)]=0.867401888314
            arg[(1, 2, 0, 2)]=0.445422031619*x[0] + (0.610494485347)*x[1]
            ref[(1, 2, 0, 2)]=0.527958258483
            arg[(1, 2, 0, 3)]=0.17595099454*x[0] + (-0.0714348812246)*x[1]
            ref[(1, 2, 0, 3)]=0.0522580566576
            arg[(1, 2, 1, 0)]=-0.144358900291*x[0] + (0.0571950794381)*x[1]
            ref[(1, 2, 1, 0)]=-0.0435819104265
            arg[(1, 2, 1, 1)]=-0.937911792913*x[0] + (0.962586970473)*x[1]
            ref[(1, 2, 1, 1)]=0.0123375887801
            arg[(1, 2, 1, 2)]=-0.151960586706*x[0] + (0.00525460340792)*x[1]
            ref[(1, 2, 1, 2)]=-0.073352991649
            arg[(1, 2, 1, 3)]=0.268277898949*x[0] + (-0.333708068456)*x[1]
            ref[(1, 2, 1, 3)]=-0.0327150847538
            arg[(1, 2, 2, 0)]=0.339460470714*x[0] + (-0.283962394502)*x[1]
            ref[(1, 2, 2, 0)]=0.027749038106
            arg[(1, 2, 2, 1)]=-0.605402075827*x[0] + (-0.589118436276)*x[1]
            ref[(1, 2, 2, 1)]=-0.597260256051
            arg[(1, 2, 2, 2)]=-0.862118657437*x[0] + (0.525283209819)*x[1]
            ref[(1, 2, 2, 2)]=-0.168417723809
            arg[(1, 2, 2, 3)]=-0.0969665922313*x[0] + (0.463192484221)*x[1]
            ref[(1, 2, 2, 3)]=0.183112945995
            arg[(2, 0, 0, 0)]=-0.1353308727*x[0] + (0.534964796792)*x[1]
            ref[(2, 0, 0, 0)]=0.199816962046
            arg[(2, 0, 0, 1)]=0.380946038262*x[0] + (0.624619280437)*x[1]
            ref[(2, 0, 0, 1)]=0.50278265935
            arg[(2, 0, 0, 2)]=0.513282055935*x[0] + (-0.00340428386587)*x[1]
            ref[(2, 0, 0, 2)]=0.254938886034
            arg[(2, 0, 0, 3)]=-0.302306875223*x[0] + (0.793820590005)*x[1]
            ref[(2, 0, 0, 3)]=0.245756857391
            arg[(2, 0, 1, 0)]=-0.390172786589*x[0] + (0.398749836419)*x[1]
            ref[(2, 0, 1, 0)]=0.00428852491506
            arg[(2, 0, 1, 1)]=0.991938865571*x[0] + (-0.604848168179)*x[1]
            ref[(2, 0, 1, 1)]=0.193545348696
            arg[(2, 0, 1, 2)]=0.109612642988*x[0] + (0.545252674922)*x[1]
            ref[(2, 0, 1, 2)]=0.327432658955
            arg[(2, 0, 1, 3)]=0.955115360609*x[0] + (0.234278995188)*x[1]
            ref[(2, 0, 1, 3)]=0.594697177898
            arg[(2, 0, 2, 0)]=-0.59505596599*x[0] + (0.617759681413)*x[1]
            ref[(2, 0, 2, 0)]=0.0113518577118
            arg[(2, 0, 2, 1)]=-0.967168243709*x[0] + (-0.429998620136)*x[1]
            ref[(2, 0, 2, 1)]=-0.698583431922
            arg[(2, 0, 2, 2)]=-0.219436680815*x[0] + (0.0986776909912)*x[1]
            ref[(2, 0, 2, 2)]=-0.0603794949121
            arg[(2, 0, 2, 3)]=-0.78668564302*x[0] + (0.310846618037)*x[1]
            ref[(2, 0, 2, 3)]=-0.237919512492
            arg[(2, 1, 0, 0)]=-0.282514792823*x[0] + (-0.993291442202)*x[1]
            ref[(2, 1, 0, 0)]=-0.637903117512
            arg[(2, 1, 0, 1)]=0.939927728018*x[0] + (-0.575933151762)*x[1]
            ref[(2, 1, 0, 1)]=0.181997288128
            arg[(2, 1, 0, 2)]=0.394391649835*x[0] + (-0.267526330483)*x[1]
            ref[(2, 1, 0, 2)]=0.0634326596762
            arg[(2, 1, 0, 3)]=-0.0287598168008*x[0] + (0.248456250268)*x[1]
            ref[(2, 1, 0, 3)]=0.109848216734
            arg[(2, 1, 1, 0)]=-0.939505596247*x[0] + (-0.590291353771)*x[1]
            ref[(2, 1, 1, 0)]=-0.764898475009
            arg[(2, 1, 1, 1)]=0.172087864409*x[0] + (-0.661953238703)*x[1]
            ref[(2, 1, 1, 1)]=-0.244932687147
            arg[(2, 1, 1, 2)]=-0.966085200301*x[0] + (0.686243527264)*x[1]
            ref[(2, 1, 1, 2)]=-0.139920836519
            arg[(2, 1, 1, 3)]=0.438684436676*x[0] + (0.0409068493045)*x[1]
            ref[(2, 1, 1, 3)]=0.23979564299
            arg[(2, 1, 2, 0)]=-0.309530684224*x[0] + (0.311427813618)*x[1]
            ref[(2, 1, 2, 0)]=0.00094856469653
            arg[(2, 1, 2, 1)]=0.908565669067*x[0] + (-0.312907273575)*x[1]
            ref[(2, 1, 2, 1)]=0.297829197746
            arg[(2, 1, 2, 2)]=0.352386666787*x[0] + (0.22393237362)*x[1]
            ref[(2, 1, 2, 2)]=0.288159520203
            arg[(2, 1, 2, 3)]=-0.520706820345*x[0] + (-0.931094979581)*x[1]
            ref[(2, 1, 2, 3)]=-0.725900899963
            arg[(2, 2, 0, 0)]=0.139949623362*x[0] + (0.333241015286)*x[1]
            ref[(2, 2, 0, 0)]=0.236595319324
            arg[(2, 2, 0, 1)]=-0.410814141313*x[0] + (-0.0237735730141)*x[1]
            ref[(2, 2, 0, 1)]=-0.217293857164
            arg[(2, 2, 0, 2)]=-0.566895899471*x[0] + (-0.920849462859)*x[1]
            ref[(2, 2, 0, 2)]=-0.743872681165
            arg[(2, 2, 0, 3)]=0.595738117952*x[0] + (0.211454109124)*x[1]
            ref[(2, 2, 0, 3)]=0.403596113538
            arg[(2, 2, 1, 0)]=0.855414156357*x[0] + (-0.151285905172)*x[1]
            ref[(2, 2, 1, 0)]=0.352064125593
            arg[(2, 2, 1, 1)]=0.523034785581*x[0] + (0.989253856155)*x[1]
            ref[(2, 2, 1, 1)]=0.756144320868
            arg[(2, 2, 1, 2)]=0.0437701344623*x[0] + (0.453516596495)*x[1]
            ref[(2, 2, 1, 2)]=0.248643365479
            arg[(2, 2, 1, 3)]=-0.0739325459663*x[0] + (-0.196738284306)*x[1]
            ref[(2, 2, 1, 3)]=-0.135335415136
            arg[(2, 2, 2, 0)]=-0.178609204168*x[0] + (0.858614827039)*x[1]
            ref[(2, 2, 2, 0)]=0.340002811435
            arg[(2, 2, 2, 1)]=-0.42774525932*x[0] + (-0.271462821715)*x[1]
            ref[(2, 2, 2, 1)]=-0.349604040517
            arg[(2, 2, 2, 2)]=0.455427109047*x[0] + (0.537001436338)*x[1]
            ref[(2, 2, 2, 2)]=0.496214272693
            arg[(2, 2, 2, 3)]=-0.399778562029*x[0] + (-0.591816629607)*x[1]
            ref[(2, 2, 2, 3)]=-0.495797595818
            arg[(3, 0, 0, 0)]=-0.144761541109*x[0] + (-0.169087095188)*x[1]
            ref[(3, 0, 0, 0)]=-0.156924318148
            arg[(3, 0, 0, 1)]=-0.40438497109*x[0] + (-0.590254243507)*x[1]
            ref[(3, 0, 0, 1)]=-0.497319607299
            arg[(3, 0, 0, 2)]=0.980114317235*x[0] + (-0.670524987511)*x[1]
            ref[(3, 0, 0, 2)]=0.154794664862
            arg[(3, 0, 0, 3)]=-0.518793876817*x[0] + (0.397983692439)*x[1]
            ref[(3, 0, 0, 3)]=-0.0604050921891
            arg[(3, 0, 1, 0)]=0.381400847926*x[0] + (0.743662075436)*x[1]
            ref[(3, 0, 1, 0)]=0.562531461681
            arg[(3, 0, 1, 1)]=-0.598278116706*x[0] + (0.581805575752)*x[1]
            ref[(3, 0, 1, 1)]=-0.00823627047686
            arg[(3, 0, 1, 2)]=0.0999410652682*x[0] + (-0.670728054004)*x[1]
            ref[(3, 0, 1, 2)]=-0.285393494368
            arg[(3, 0, 1, 3)]=-0.0280411125022*x[0] + (0.403839870033)*x[1]
            ref[(3, 0, 1, 3)]=0.187899378765
            arg[(3, 0, 2, 0)]=0.0255811117567*x[0] + (0.658507925154)*x[1]
            ref[(3, 0, 2, 0)]=0.342044518455
            arg[(3, 0, 2, 1)]=-0.521994942064*x[0] + (0.365922172377)*x[1]
            ref[(3, 0, 2, 1)]=-0.0780363848432
            arg[(3, 0, 2, 2)]=-0.70129617922*x[0] + (0.871938175859)*x[1]
            ref[(3, 0, 2, 2)]=0.0853209983199
            arg[(3, 0, 2, 3)]=0.527897914285*x[0] + (0.198536802966)*x[1]
            ref[(3, 0, 2, 3)]=0.363217358625
            arg[(3, 1, 0, 0)]=-0.530042775459*x[0] + (-0.120064807742)*x[1]
            ref[(3, 1, 0, 0)]=-0.3250537916
            arg[(3, 1, 0, 1)]=0.418739105144*x[0] + (-0.410766275083)*x[1]
            ref[(3, 1, 0, 1)]=0.00398641503058
            arg[(3, 1, 0, 2)]=0.93459423028*x[0] + (0.11074188318)*x[1]
            ref[(3, 1, 0, 2)]=0.52266805673
            arg[(3, 1, 0, 3)]=-0.125909976581*x[0] + (0.473743998343)*x[1]
            ref[(3, 1, 0, 3)]=0.173917010881
            arg[(3, 1, 1, 0)]=-0.270310626754*x[0] + (-0.484914405852)*x[1]
            ref[(3, 1, 1, 0)]=-0.377612516303
            arg[(3, 1, 1, 1)]=0.42277125293*x[0] + (0.416179565111)*x[1]
            ref[(3, 1, 1, 1)]=0.419475409021
            arg[(3, 1, 1, 2)]=0.0632390004955*x[0] + (-0.880583651799)*x[1]
            ref[(3, 1, 1, 2)]=-0.408672325652
            arg[(3, 1, 1, 3)]=0.884781442381*x[0] + (0.265760843353)*x[1]
            ref[(3, 1, 1, 3)]=0.575271142867
            arg[(3, 1, 2, 0)]=0.206516988436*x[0] + (-0.151030842866)*x[1]
            ref[(3, 1, 2, 0)]=0.0277430727848
            arg[(3, 1, 2, 1)]=-0.0199495848504*x[0] + (0.44031939394)*x[1]
            ref[(3, 1, 2, 1)]=0.210184904545
            arg[(3, 1, 2, 2)]=0.526543656378*x[0] + (-0.565171553902)*x[1]
            ref[(3, 1, 2, 2)]=-0.0193139487618
            arg[(3, 1, 2, 3)]=-0.298439698697*x[0] + (0.296680458644)*x[1]
            ref[(3, 1, 2, 3)]=-0.00087962002634
            arg[(3, 2, 0, 0)]=0.0665379503473*x[0] + (0.784643298739)*x[1]
            ref[(3, 2, 0, 0)]=0.425590624543
            arg[(3, 2, 0, 1)]=0.462150020667*x[0] + (0.990552315344)*x[1]
            ref[(3, 2, 0, 1)]=0.726351168006
            arg[(3, 2, 0, 2)]=-0.238347307638*x[0] + (0.317027002959)*x[1]
            ref[(3, 2, 0, 2)]=0.0393398476608
            arg[(3, 2, 0, 3)]=-0.219299618038*x[0] + (-0.550961894993)*x[1]
            ref[(3, 2, 0, 3)]=-0.385130756516
            arg[(3, 2, 1, 0)]=-0.991682351892*x[0] + (0.129348914835)*x[1]
            ref[(3, 2, 1, 0)]=-0.431166718529
            arg[(3, 2, 1, 1)]=-0.117742518021*x[0] + (0.188116318993)*x[1]
            ref[(3, 2, 1, 1)]=0.0351869004859
            arg[(3, 2, 1, 2)]=0.33147957891*x[0] + (0.971361519477)*x[1]
            ref[(3, 2, 1, 2)]=0.651420549194
            arg[(3, 2, 1, 3)]=-0.806278773623*x[0] + (0.607992981023)*x[1]
            ref[(3, 2, 1, 3)]=-0.0991428963
            arg[(3, 2, 2, 0)]=-0.441922910561*x[0] + (-0.656439055198)*x[1]
            ref[(3, 2, 2, 0)]=-0.549180982879
            arg[(3, 2, 2, 1)]=0.774837828589*x[0] + (0.648517004662)*x[1]
            ref[(3, 2, 2, 1)]=0.711677416626
            arg[(3, 2, 2, 2)]=-0.375981597508*x[0] + (-0.206970178296)*x[1]
            ref[(3, 2, 2, 2)]=-0.291475887902
            arg[(3, 2, 2, 3)]=-0.625372419775*x[0] + (-0.145402895514)*x[1]
            ref[(3, 2, 2, 3)]=-0.385387657645
        else:
            arg[(0, 0, 0, 0)]=0.958094170135*x[0] + (0.632221352805)*x[1] + (-0.988895800478)*x[2]
            ref[(0, 0, 0, 0)]=0.300709861231
            arg[(0, 0, 0, 1)]=-0.393188083524*x[0] + (0.29110446284)*x[1] + (0.237101061872)*x[2]
            ref[(0, 0, 0, 1)]=0.0675087205943
            arg[(0, 0, 0, 2)]=0.841057856544*x[0] + (-0.307208292256)*x[1] + (-0.0836493733551)*x[2]
            ref[(0, 0, 0, 2)]=0.225100095466
            arg[(0, 0, 0, 3)]=0.155452628328*x[0] + (0.598639448994)*x[1] + (0.0270702504623)*x[2]
            ref[(0, 0, 0, 3)]=0.390581163892
            arg[(0, 0, 1, 0)]=-0.549663754977*x[0] + (0.588177908933)*x[1] + (0.907459372766)*x[2]
            ref[(0, 0, 1, 0)]=0.472986763361
            arg[(0, 0, 1, 1)]=-0.098751882374*x[0] + (-0.73615930534)*x[1] + (-0.157762748282)*x[2]
            ref[(0, 0, 1, 1)]=-0.496336967998
            arg[(0, 0, 1, 2)]=-0.622033826146*x[0] + (0.770946924854)*x[1] + (0.122644825856)*x[2]
            ref[(0, 0, 1, 2)]=0.135778962282
            arg[(0, 0, 1, 3)]=0.677297979271*x[0] + (0.905194596222)*x[1] + (0.144819065783)*x[2]
            ref[(0, 0, 1, 3)]=0.863655820638
            arg[(0, 0, 2, 0)]=0.219179785327*x[0] + (-0.723476672814)*x[1] + (0.396351681777)*x[2]
            ref[(0, 0, 2, 0)]=-0.0539726028548
            arg[(0, 0, 2, 1)]=-0.0285364630154*x[0] + (-0.925557541067)*x[1] + (-0.490802781884)*x[2]
            ref[(0, 0, 2, 1)]=-0.722448392983
            arg[(0, 0, 2, 2)]=-0.742269162231*x[0] + (-0.14673212285)*x[1] + (0.906226524906)*x[2]
            ref[(0, 0, 2, 2)]=0.00861261991273
            arg[(0, 0, 2, 3)]=-0.676894657789*x[0] + (0.0671658638675)*x[1] + (0.261218775789)*x[2]
            ref[(0, 0, 2, 3)]=-0.174255009066
            arg[(0, 1, 0, 0)]=-0.35190598504*x[0] + (0.683556682368)*x[1] + (-0.577803509592)*x[2]
            ref[(0, 1, 0, 0)]=-0.123076406132
            arg[(0, 1, 0, 1)]=-0.9961911939*x[0] + (-0.698355075235)*x[1] + (-0.930019257156)*x[2]
            ref[(0, 1, 0, 1)]=-1.31228276315
            arg[(0, 1, 0, 2)]=0.144168715138*x[0] + (0.600188424984)*x[1] + (-0.616931078115)*x[2]
            ref[(0, 1, 0, 2)]=0.0637130310035
            arg[(0, 1, 0, 3)]=-0.788721418209*x[0] + (-0.151518452509)*x[1] + (0.440130710431)*x[2]
            ref[(0, 1, 0, 3)]=-0.250054580144
            arg[(0, 1, 1, 0)]=-0.187251735187*x[0] + (0.914266628282)*x[1] + (0.708715073565)*x[2]
            ref[(0, 1, 1, 0)]=0.71786498333
            arg[(0, 1, 1, 1)]=0.100670917207*x[0] + (0.611226231319)*x[1] + (-0.272875081049)*x[2]
            ref[(0, 1, 1, 1)]=0.219511033739
            arg[(0, 1, 1, 2)]=-0.863676616087*x[0] + (0.10845912482)*x[1] + (-0.611905757097)*x[2]
            ref[(0, 1, 1, 2)]=-0.683561624182
            arg[(0, 1, 1, 3)]=0.932327384738*x[0] + (-0.755646758021)*x[1] + (-0.476460471023)*x[2]
            ref[(0, 1, 1, 3)]=-0.149889922153
            arg[(0, 1, 2, 0)]=-0.303222078683*x[0] + (0.273189655977)*x[1] + (-0.711470867085)*x[2]
            ref[(0, 1, 2, 0)]=-0.370751644896
            arg[(0, 1, 2, 1)]=-0.611186964801*x[0] + (-0.119798714916)*x[1] + (-0.826919891811)*x[2]
            ref[(0, 1, 2, 1)]=-0.778952785764
            arg[(0, 1, 2, 2)]=-0.16233973048*x[0] + (0.075421390078)*x[1] + (-0.358982957207)*x[2]
            ref[(0, 1, 2, 2)]=-0.222950648805
            arg[(0, 1, 2, 3)]=-0.905942377405*x[0] + (0.523279710195)*x[1] + (0.128132339428)*x[2]
            ref[(0, 1, 2, 3)]=-0.127265163891
            arg[(0, 2, 0, 0)]=-0.865977734427*x[0] + (-0.980621670812)*x[1] + (-0.736689162014)*x[2]
            ref[(0, 2, 0, 0)]=-1.29164428363
            arg[(0, 2, 0, 1)]=0.741189146773*x[0] + (0.989495573912)*x[1] + (-0.0547330196312)*x[2]
            ref[(0, 2, 0, 1)]=0.837975850527
            arg[(0, 2, 0, 2)]=-0.837018056255*x[0] + (0.769528634558)*x[1] + (-0.202898040083)*x[2]
            ref[(0, 2, 0, 2)]=-0.13519373089
            arg[(0, 2, 0, 3)]=-0.713803644322*x[0] + (-0.444348842383)*x[1] + (-0.573334195762)*x[2]
            ref[(0, 2, 0, 3)]=-0.865743341234
            arg[(0, 2, 1, 0)]=-0.0704668997768*x[0] + (-0.444623750095)*x[1] + (0.321174994076)*x[2]
            ref[(0, 2, 1, 0)]=-0.0969578278977
            arg[(0, 2, 1, 1)]=-0.471239531214*x[0] + (0.597829677616)*x[1] + (0.809377837227)*x[2]
            ref[(0, 2, 1, 1)]=0.467983991815
            arg[(0, 2, 1, 2)]=-0.0623094387615*x[0] + (-0.287005208787)*x[1] + (-0.277882399553)*x[2]
            ref[(0, 2, 1, 2)]=-0.313598523551
            arg[(0, 2, 1, 3)]=0.342831725479*x[0] + (-0.753953413609)*x[1] + (-0.507586746684)*x[2]
            ref[(0, 2, 1, 3)]=-0.459354217407
            arg[(0, 2, 2, 0)]=-0.526428994841*x[0] + (0.795244360487)*x[1] + (0.044256616114)*x[2]
            ref[(0, 2, 2, 0)]=0.15653599088
            arg[(0, 2, 2, 1)]=0.0272013835274*x[0] + (-0.635181846826)*x[1] + (-0.743136381803)*x[2]
            ref[(0, 2, 2, 1)]=-0.675558422551
            arg[(0, 2, 2, 2)]=-0.35686597511*x[0] + (-0.0675833955789)*x[1] + (-0.667984640122)*x[2]
            ref[(0, 2, 2, 2)]=-0.546217005405
            arg[(0, 2, 2, 3)]=0.147025995975*x[0] + (0.503023467519)*x[1] + (0.574854175963)*x[2]
            ref[(0, 2, 2, 3)]=0.612451819728
            arg[(1, 0, 0, 0)]=-0.742573272676*x[0] + (-0.126843654076)*x[1] + (0.519550467795)*x[2]
            ref[(1, 0, 0, 0)]=-0.174933229479
            arg[(1, 0, 0, 1)]=0.734664201302*x[0] + (0.842373031233)*x[1] + (0.624698797935)*x[2]
            ref[(1, 0, 0, 1)]=1.10086801524
            arg[(1, 0, 0, 2)]=0.514667872679*x[0] + (-0.802664436688)*x[1] + (-0.461094626839)*x[2]
            ref[(1, 0, 0, 2)]=-0.374545595424
            arg[(1, 0, 0, 3)]=0.796805117138*x[0] + (-0.0916038800555)*x[1] + (-0.721758395687)*x[2]
            ref[(1, 0, 0, 3)]=-0.00827857930209
            arg[(1, 0, 1, 0)]=-0.360214901262*x[0] + (-0.814294131356)*x[1] + (-0.172837859039)*x[2]
            ref[(1, 0, 1, 0)]=-0.673673445829
            arg[(1, 0, 1, 1)]=0.334846801857*x[0] + (0.0999173259913)*x[1] + (0.104326925417)*x[2]
            ref[(1, 0, 1, 1)]=0.269545526633
            arg[(1, 0, 1, 2)]=-0.0128232751086*x[0] + (-0.439294836486)*x[1] + (-0.546536017268)*x[2]
            ref[(1, 0, 1, 2)]=-0.499327064431
            arg[(1, 0, 1, 3)]=0.980861866025*x[0] + (-0.0371266118662)*x[1] + (-0.535058091279)*x[2]
            ref[(1, 0, 1, 3)]=0.20433858144
            arg[(1, 0, 2, 0)]=0.875588057946*x[0] + (-0.373708242324)*x[1] + (-0.682211576985)*x[2]
            ref[(1, 0, 2, 0)]=-0.0901658806815
            arg[(1, 0, 2, 1)]=-0.77784746432*x[0] + (0.68603738384)*x[1] + (0.0227021457923)*x[2]
            ref[(1, 0, 2, 1)]=-0.0345539673441
            arg[(1, 0, 2, 2)]=0.88869544963*x[0] + (-0.500648875318)*x[1] + (0.616253089268)*x[2]
            ref[(1, 0, 2, 2)]=0.50214983179
            arg[(1, 0, 2, 3)]=-0.227180435783*x[0] + (0.612902525724)*x[1] + (0.560020795515)*x[2]
            ref[(1, 0, 2, 3)]=0.472871442729
            arg[(1, 1, 0, 0)]=-0.801480906101*x[0] + (-0.192167893946)*x[1] + (-0.906858704897)*x[2]
            ref[(1, 1, 0, 0)]=-0.950253752472
            arg[(1, 1, 0, 1)]=0.97115617964*x[0] + (-0.0698057622046)*x[1] + (-0.699300483736)*x[2]
            ref[(1, 1, 0, 1)]=0.101024966849
            arg[(1, 1, 0, 2)]=0.506203718146*x[0] + (-0.0789949044111)*x[1] + (-0.0225418797329)*x[2]
            ref[(1, 1, 0, 2)]=0.202333467001
            arg[(1, 1, 0, 3)]=0.893207970094*x[0] + (-0.281283688711)*x[1] + (-0.489243170579)*x[2]
            ref[(1, 1, 0, 3)]=0.0613405554019
            arg[(1, 1, 1, 0)]=0.447370789487*x[0] + (-0.107073412755)*x[1] + (0.779804565953)*x[2]
            ref[(1, 1, 1, 0)]=0.560050971342
            arg[(1, 1, 1, 1)]=-0.420216997024*x[0] + (-0.983214836301)*x[1] + (-0.981447831205)*x[2]
            ref[(1, 1, 1, 1)]=-1.19243983226
            arg[(1, 1, 1, 2)]=-0.936652287968*x[0] + (-0.628281538985)*x[1] + (-0.869526583397)*x[2]
            ref[(1, 1, 1, 2)]=-1.21723020517
            arg[(1, 1, 1, 3)]=-0.551160179407*x[0] + (0.910393532823)*x[1] + (0.612400158797)*x[2]
            ref[(1, 1, 1, 3)]=0.485816756106
            arg[(1, 1, 2, 0)]=0.397319512797*x[0] + (-0.340624389724)*x[1] + (-0.296072459284)*x[2]
            ref[(1, 1, 2, 0)]=-0.119688668106
            arg[(1, 1, 2, 1)]=-0.279377366234*x[0] + (-0.157545156901)*x[1] + (-0.621400848163)*x[2]
            ref[(1, 1, 2, 1)]=-0.529161685649
            arg[(1, 1, 2, 2)]=-0.943472262938*x[0] + (0.585207972024)*x[1] + (0.641846002947)*x[2]
            ref[(1, 1, 2, 2)]=0.141790856016
            arg[(1, 1, 2, 3)]=0.424806570802*x[0] + (0.106761543942)*x[1] + (-0.924560821259)*x[2]
            ref[(1, 1, 2, 3)]=-0.196496353257
            arg[(1, 2, 0, 0)]=0.965837326147*x[0] + (-0.668734127073)*x[1] + (-0.897126197908)*x[2]
            ref[(1, 2, 0, 0)]=-0.300011499417
            arg[(1, 2, 0, 1)]=-0.00844041571913*x[0] + (-0.753243807259)*x[1] + (0.924648884973)*x[2]
            ref[(1, 2, 0, 1)]=0.081482330997
            arg[(1, 2, 0, 2)]=-0.6637276172*x[0] + (0.238366404888)*x[1] + (0.367783998465)*x[2]
            ref[(1, 2, 0, 2)]=-0.0287886069236
            arg[(1, 2, 0, 3)]=-0.35508707817*x[0] + (0.855958799339)*x[1] + (-0.940046558444)*x[2]
            ref[(1, 2, 0, 3)]=-0.219587418638
            arg[(1, 2, 1, 0)]=0.393074180378*x[0] + (-0.091881658302)*x[1] + (-0.882020236527)*x[2]
            ref[(1, 2, 1, 0)]=-0.290413857226
            arg[(1, 2, 1, 1)]=0.532535738592*x[0] + (-0.34943611114)*x[1] + (0.133488016875)*x[2]
            ref[(1, 2, 1, 1)]=0.158293822163
            arg[(1, 2, 1, 2)]=-0.21187560701*x[0] + (-0.826840722551)*x[1] + (0.650797268533)*x[2]
            ref[(1, 2, 1, 2)]=-0.193959530514
            arg[(1, 2, 1, 3)]=0.234600005034*x[0] + (-0.748105550565)*x[1] + (0.816767283837)*x[2]
            ref[(1, 2, 1, 3)]=0.151630869153
            arg[(1, 2, 2, 0)]=0.0272842456695*x[0] + (0.987584188922)*x[1] + (-0.0145705845567)*x[2]
            ref[(1, 2, 2, 0)]=0.500148925018
            arg[(1, 2, 2, 1)]=0.528582495719*x[0] + (0.969830221936)*x[1] + (0.130792920873)*x[2]
            ref[(1, 2, 2, 1)]=0.814602819264
            arg[(1, 2, 2, 2)]=-0.651616011089*x[0] + (0.585871196946)*x[1] + (0.165993767856)*x[2]
            ref[(1, 2, 2, 2)]=0.0501244768569
            arg[(1, 2, 2, 3)]=0.256145097129*x[0] + (0.26270665625)*x[1] + (0.403862080168)*x[2]
            ref[(1, 2, 2, 3)]=0.461356916774
            arg[(2, 0, 0, 0)]=0.848793054939*x[0] + (0.583737958304)*x[1] + (0.962348654905)*x[2]
            ref[(2, 0, 0, 0)]=1.19743983407
            arg[(2, 0, 0, 1)]=0.144731113268*x[0] + (0.820102770142)*x[1] + (-0.510986548569)*x[2]
            ref[(2, 0, 0, 1)]=0.226923667421
            arg[(2, 0, 0, 2)]=-0.918050885075*x[0] + (0.253509595029)*x[1] + (0.312260474415)*x[2]
            ref[(2, 0, 0, 2)]=-0.176140407816
            arg[(2, 0, 0, 3)]=0.173138520419*x[0] + (-0.829878920773)*x[1] + (0.195306894301)*x[2]
            ref[(2, 0, 0, 3)]=-0.230716753027
            arg[(2, 0, 1, 0)]=-0.915923472548*x[0] + (-0.598599514589)*x[1] + (-0.252863960577)*x[2]
            ref[(2, 0, 1, 0)]=-0.883693473857
            arg[(2, 0, 1, 1)]=0.821659324075*x[0] + (0.805646213146)*x[1] + (-0.702644465837)*x[2]
            ref[(2, 0, 1, 1)]=0.462330535692
            arg[(2, 0, 1, 2)]=0.794446763668*x[0] + (0.476528481682)*x[1] + (0.825956070165)*x[2]
            ref[(2, 0, 1, 2)]=1.04846565776
            arg[(2, 0, 1, 3)]=0.676240401558*x[0] + (0.57323443922)*x[1] + (0.621081921131)*x[2]
            ref[(2, 0, 1, 3)]=0.935278380954
            arg[(2, 0, 2, 0)]=0.866259724352*x[0] + (0.0186873730466)*x[1] + (0.185022127088)*x[2]
            ref[(2, 0, 2, 0)]=0.534984612243
            arg[(2, 0, 2, 1)]=-0.707921058743*x[0] + (0.31323568881)*x[1] + (-0.0714889384378)*x[2]
            ref[(2, 0, 2, 1)]=-0.233087154185
            arg[(2, 0, 2, 2)]=0.463903669976*x[0] + (-0.0914212480916)*x[1] + (-0.441993235597)*x[2]
            ref[(2, 0, 2, 2)]=-0.0347554068564
            arg[(2, 0, 2, 3)]=0.782510487219*x[0] + (0.18956673002)*x[1] + (-0.133439758524)*x[2]
            ref[(2, 0, 2, 3)]=0.419318729358
            arg[(2, 1, 0, 0)]=-0.201773679412*x[0] + (0.469556620295)*x[1] + (0.551760129503)*x[2]
            ref[(2, 1, 0, 0)]=0.409771535193
            arg[(2, 1, 0, 1)]=-0.833138836247*x[0] + (0.418995407462)*x[1] + (-0.425491156371)*x[2]
            ref[(2, 1, 0, 1)]=-0.419817292577
            arg[(2, 1, 0, 2)]=0.810931377027*x[0] + (-0.0575598820902)*x[1] + (0.121577104337)*x[2]
            ref[(2, 1, 0, 2)]=0.437474299637
            arg[(2, 1, 0, 3)]=-0.109774890222*x[0] + (0.121985671848)*x[1] + (-0.839930745623)*x[2]
            ref[(2, 1, 0, 3)]=-0.413859981999
            arg[(2, 1, 1, 0)]=-0.953347557316*x[0] + (-0.801128301785)*x[1] + (-0.0422541735218)*x[2]
            ref[(2, 1, 1, 0)]=-0.898365016311
            arg[(2, 1, 1, 1)]=0.89035023078*x[0] + (-0.31848204231)*x[1] + (-0.190266544723)*x[2]
            ref[(2, 1, 1, 1)]=0.190800821874
            arg[(2, 1, 1, 2)]=-0.833745772094*x[0] + (-0.364823324022)*x[1] + (0.944342324769)*x[2]
            ref[(2, 1, 1, 2)]=-0.127113385673
            arg[(2, 1, 1, 3)]=-0.260408696752*x[0] + (-0.263223566665)*x[1] + (0.317278603477)*x[2]
            ref[(2, 1, 1, 3)]=-0.10317682997
            arg[(2, 1, 2, 0)]=0.91861231899*x[0] + (0.298066851191)*x[1] + (-0.23667568748)*x[2]
            ref[(2, 1, 2, 0)]=0.490001741351
            arg[(2, 1, 2, 1)]=0.744890430478*x[0] + (-0.540365959165)*x[1] + (-0.841982809278)*x[2]
            ref[(2, 1, 2, 1)]=-0.318729168983
            arg[(2, 1, 2, 2)]=0.852329510507*x[0] + (0.765161764044)*x[1] + (-0.499965334946)*x[2]
            ref[(2, 1, 2, 2)]=0.558762969803
            arg[(2, 1, 2, 3)]=0.007127479348*x[0] + (-0.431579472926)*x[1] + (0.588681011519)*x[2]
            ref[(2, 1, 2, 3)]=0.0821145089704
            arg[(2, 2, 0, 0)]=0.970793280891*x[0] + (-0.0217197877539)*x[1] + (0.509651779679)*x[2]
            ref[(2, 2, 0, 0)]=0.729362636408
            arg[(2, 2, 0, 1)]=0.424342298139*x[0] + (0.307439070029)*x[1] + (0.137774699019)*x[2]
            ref[(2, 2, 0, 1)]=0.434778033594
            arg[(2, 2, 0, 2)]=0.564213380918*x[0] + (0.30152708135)*x[1] + (0.158169980198)*x[2]
            ref[(2, 2, 0, 2)]=0.511955221233
            arg[(2, 2, 0, 3)]=0.446469935563*x[0] + (-0.606561710567)*x[1] + (0.732130503322)*x[2]
            ref[(2, 2, 0, 3)]=0.286019364159
            arg[(2, 2, 1, 0)]=-0.795459567297*x[0] + (0.647940028842)*x[1] + (-0.674693629605)*x[2]
            ref[(2, 2, 1, 0)]=-0.41110658403
            arg[(2, 2, 1, 1)]=-0.304022179576*x[0] + (0.996325519427)*x[1] + (-0.391679656027)*x[2]
            ref[(2, 2, 1, 1)]=0.150311841912
            arg[(2, 2, 1, 2)]=-0.893918966631*x[0] + (0.199646900388)*x[1] + (0.930261769412)*x[2]
            ref[(2, 2, 1, 2)]=0.117994851584
            arg[(2, 2, 1, 3)]=0.949609884805*x[0] + (0.407264308226)*x[1] + (-0.592465317888)*x[2]
            ref[(2, 2, 1, 3)]=0.382204437571
            arg[(2, 2, 2, 0)]=0.156274876554*x[0] + (-0.0262061337485)*x[1] + (0.604438034032)*x[2]
            ref[(2, 2, 2, 0)]=0.367253388419
            arg[(2, 2, 2, 1)]=-0.883406710918*x[0] + (-0.247527921957)*x[1] + (0.245040764663)*x[2]
            ref[(2, 2, 2, 1)]=-0.442946934106
            arg[(2, 2, 2, 2)]=0.239489478604*x[0] + (-0.628443956931)*x[1] + (-0.12494943424)*x[2]
            ref[(2, 2, 2, 2)]=-0.256951956283
            arg[(2, 2, 2, 3)]=0.732898218979*x[0] + (-0.890400127072)*x[1] + (-0.77038084574)*x[2]
            ref[(2, 2, 2, 3)]=-0.463941376917
            arg[(3, 0, 0, 0)]=0.871015905033*x[0] + (-0.845425854965)*x[1] + (0.368394840985)*x[2]
            ref[(3, 0, 0, 0)]=0.196992445527
            arg[(3, 0, 0, 1)]=0.634390386853*x[0] + (0.301395431951)*x[1] + (-0.211334452459)*x[2]
            ref[(3, 0, 0, 1)]=0.362225683172
            arg[(3, 0, 0, 2)]=-0.677563533856*x[0] + (-0.698173676177)*x[1] + (-0.764688047094)*x[2]
            ref[(3, 0, 0, 2)]=-1.07021262856
            arg[(3, 0, 0, 3)]=0.462945566536*x[0] + (-0.0682269307586)*x[1] + (-0.146541561779)*x[2]
            ref[(3, 0, 0, 3)]=0.124088536999
            arg[(3, 0, 1, 0)]=-0.17863421045*x[0] + (0.54157137991)*x[1] + (0.982100473183)*x[2]
            ref[(3, 0, 1, 0)]=0.672518821321
            arg[(3, 0, 1, 1)]=-0.220123940505*x[0] + (-0.135683224889)*x[1] + (0.71147864928)*x[2]
            ref[(3, 0, 1, 1)]=0.177835741943
            arg[(3, 0, 1, 2)]=-0.35754502605*x[0] + (0.849086679651)*x[1] + (-0.491585130033)*x[2]
            ref[(3, 0, 1, 2)]=-2.17382161376e-05
            arg[(3, 0, 1, 3)]=-0.765614347012*x[0] + (0.34601183391)*x[1] + (-0.466717846888)*x[2]
            ref[(3, 0, 1, 3)]=-0.443160179995
            arg[(3, 0, 2, 0)]=-0.569939561473*x[0] + (-0.765589588752)*x[1] + (-0.794089448883)*x[2]
            ref[(3, 0, 2, 0)]=-1.06480929955
            arg[(3, 0, 2, 1)]=-0.0989561963046*x[0] + (-0.549107587354)*x[1] + (0.473434094498)*x[2]
            ref[(3, 0, 2, 1)]=-0.0873148445804
            arg[(3, 0, 2, 2)]=-0.815203004187*x[0] + (-0.205769918372)*x[1] + (-0.498217873211)*x[2]
            ref[(3, 0, 2, 2)]=-0.759595397885
            arg[(3, 0, 2, 3)]=0.8280682058*x[0] + (0.189171540499)*x[1] + (-0.565008616064)*x[2]
            ref[(3, 0, 2, 3)]=0.226115565118
            arg[(3, 1, 0, 0)]=-0.719589803435*x[0] + (0.711556075112)*x[1] + (0.940955116503)*x[2]
            ref[(3, 1, 0, 0)]=0.46646069409
            arg[(3, 1, 0, 1)]=-0.127462045115*x[0] + (-0.309108786598)*x[1] + (0.159113322706)*x[2]
            ref[(3, 1, 0, 1)]=-0.138728754503
            arg[(3, 1, 0, 2)]=-0.362999498923*x[0] + (0.207070762887)*x[1] + (-0.106235083285)*x[2]
            ref[(3, 1, 0, 2)]=-0.13108190966
            arg[(3, 1, 0, 3)]=-0.938683000388*x[0] + (-0.464603142675)*x[1] + (-0.0365631890283)*x[2]
            ref[(3, 1, 0, 3)]=-0.719924666046
            arg[(3, 1, 1, 0)]=0.359479065949*x[0] + (-0.946458858228)*x[1] + (0.129613487201)*x[2]
            ref[(3, 1, 1, 0)]=-0.228683152539
            arg[(3, 1, 1, 1)]=-0.198152976669*x[0] + (-0.390969659223)*x[1] + (-0.859293690989)*x[2]
            ref[(3, 1, 1, 1)]=-0.724208163441
            arg[(3, 1, 1, 2)]=0.881524027906*x[0] + (-0.501636636363)*x[1] + (-0.325316307976)*x[2]
            ref[(3, 1, 1, 2)]=0.0272855417834
            arg[(3, 1, 1, 3)]=-0.503304784824*x[0] + (0.797418440629)*x[1] + (-0.829370271923)*x[2]
            ref[(3, 1, 1, 3)]=-0.267628308059
            arg[(3, 1, 2, 0)]=-0.815493220547*x[0] + (-0.347505276877)*x[1] + (0.201260086188)*x[2]
            ref[(3, 1, 2, 0)]=-0.480869205618
            arg[(3, 1, 2, 1)]=0.805289434202*x[0] + (-0.862240962038)*x[1] + (0.0885615946751)*x[2]
            ref[(3, 1, 2, 1)]=0.0158050334192
            arg[(3, 1, 2, 2)]=0.494341868514*x[0] + (-0.176829053703)*x[1] + (0.0285036831163)*x[2]
            ref[(3, 1, 2, 2)]=0.173008248964
            arg[(3, 1, 2, 3)]=0.963925319334*x[0] + (-0.0344929928449)*x[1] + (0.515969569144)*x[2]
            ref[(3, 1, 2, 3)]=0.722700947816
            arg[(3, 2, 0, 0)]=0.637066217932*x[0] + (0.51814788443)*x[1] + (0.97101196641)*x[2]
            ref[(3, 2, 0, 0)]=1.06311303439
            arg[(3, 2, 0, 1)]=-0.647165827976*x[0] + (-0.938185948823)*x[1] + (0.211712391275)*x[2]
            ref[(3, 2, 0, 1)]=-0.686819692762
            arg[(3, 2, 0, 2)]=0.568631867538*x[0] + (-0.988547872572)*x[1] + (-0.3562978376)*x[2]
            ref[(3, 2, 0, 2)]=-0.388106921317
            arg[(3, 2, 0, 3)]=0.788241316005*x[0] + (0.73373926048)*x[1] + (-0.320470447209)*x[2]
            ref[(3, 2, 0, 3)]=0.600755064638
            arg[(3, 2, 1, 0)]=-0.947288247925*x[0] + (0.83487786597)*x[1] + (-0.577103914861)*x[2]
            ref[(3, 2, 1, 0)]=-0.344757148408
            arg[(3, 2, 1, 1)]=0.5573332383*x[0] + (-0.423343407703)*x[1] + (0.74065552214)*x[2]
            ref[(3, 2, 1, 1)]=0.437322676368
            arg[(3, 2, 1, 2)]=0.399555550956*x[0] + (0.823616756733)*x[1] + (-0.31594751925)*x[2]
            ref[(3, 2, 1, 2)]=0.453612394219
            arg[(3, 2, 1, 3)]=-0.336435133898*x[0] + (-0.526898178752)*x[1] + (-0.505202069134)*x[2]
            ref[(3, 2, 1, 3)]=-0.684267690892
            arg[(3, 2, 2, 0)]=-0.96144447536*x[0] + (0.470383526202)*x[1] + (0.69634833279)*x[2]
            ref[(3, 2, 2, 0)]=0.102643691816
            arg[(3, 2, 2, 1)]=-0.216686619085*x[0] + (-0.939443987511)*x[1] + (0.851462719862)*x[2]
            ref[(3, 2, 2, 1)]=-0.152333943367
            arg[(3, 2, 2, 2)]=0.30233582685*x[0] + (0.163871968461)*x[1] + (0.0684344164315)*x[2]
            ref[(3, 2, 2, 2)]=0.267321105871
            arg[(3, 2, 2, 3)]=-0.054888932213*x[0] + (-0.497335634825)*x[1] + (0.342218267394)*x[2]
            ref[(3, 2, 2, 3)]=-0.105003149822
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.120159955521*x[0] + (-0.547227949673)*x[1]
            ref=-0.333693952597
        else:
            arg=-0.363233043866*x[0] + (0.210390303205)*x[1] + (0.703203200841)*x[2]
            ref=0.27518023009
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.455277150685*x[0] + (-0.785415218672)*x[1]
            ref[(0,)]=-0.620346184679
            arg[(1,)]=0.910454695709*x[0] + (-0.0156738311254)*x[1]
            ref[(1,)]=0.447390432292
        else:
            arg[(0,)]=-0.549986250984*x[0] + (-0.550165126032)*x[1] + (-0.20892027707)*x[2]
            ref[(0,)]=-0.654535827043
            arg[(1,)]=0.904747028772*x[0] + (-0.573357010422)*x[1] + (0.675758883642)*x[2]
            ref[(1,)]=0.503574450996
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.0508179189101*x[0] + (0.45882014551)*x[1]
            ref[(0, 0)]=0.2040011133
            arg[(0, 1)]=0.186846435461*x[0] + (-0.107243366388)*x[1]
            ref[(0, 1)]=0.0398015345364
            arg[(0, 2)]=-0.48921850656*x[0] + (-0.337009614701)*x[1]
            ref[(0, 2)]=-0.413114060631
            arg[(0, 3)]=0.460594906351*x[0] + (0.363543706156)*x[1]
            ref[(0, 3)]=0.412069306253
            arg[(1, 0)]=-0.676820389075*x[0] + (0.889313541302)*x[1]
            ref[(1, 0)]=0.106246576113
            arg[(1, 1)]=0.154359729794*x[0] + (0.673015824752)*x[1]
            ref[(1, 1)]=0.413687777273
            arg[(1, 2)]=-0.734616652805*x[0] + (0.565034855937)*x[1]
            ref[(1, 2)]=-0.0847908984337
            arg[(1, 3)]=0.548325294515*x[0] + (0.695645587735)*x[1]
            ref[(1, 3)]=0.621985441125
            arg[(2, 0)]=-0.454976451361*x[0] + (0.729112103734)*x[1]
            ref[(2, 0)]=0.137067826187
            arg[(2, 1)]=-0.351164432046*x[0] + (0.377481514153)*x[1]
            ref[(2, 1)]=0.0131585410533
            arg[(2, 2)]=0.60584973019*x[0] + (-0.392721190172)*x[1]
            ref[(2, 2)]=0.106564270009
            arg[(2, 3)]=-0.372036159486*x[0] + (-0.920213082452)*x[1]
            ref[(2, 3)]=-0.646124620969
        else:
            arg[(0, 0)]=-0.903641425452*x[0] + (0.201932131661)*x[1] + (0.784080824327)*x[2]
            ref[(0, 0)]=0.0411857652681
            arg[(0, 1)]=-0.409550900848*x[0] + (-0.583872063301)*x[1] + (-0.61966305329)*x[2]
            ref[(0, 1)]=-0.80654300872
            arg[(0, 2)]=-0.504794403761*x[0] + (0.0772099858519)*x[1] + (0.86047590179)*x[2]
            ref[(0, 2)]=0.21644574194
            arg[(0, 3)]=-0.584687746287*x[0] + (-0.413910086279)*x[1] + (-0.856746785881)*x[2]
            ref[(0, 3)]=-0.927672309223
            arg[(1, 0)]=-0.875509620667*x[0] + (0.454351467147)*x[1] + (0.468104973787)*x[2]
            ref[(1, 0)]=0.0234734101339
            arg[(1, 1)]=0.211172773409*x[0] + (-0.439462942646)*x[1] + (-0.483011984796)*x[2]
            ref[(1, 1)]=-0.355651077016
            arg[(1, 2)]=-0.0993573433068*x[0] + (-0.0915061075545)*x[1] + (0.807671189235)*x[2]
            ref[(1, 2)]=0.308403869187
            arg[(1, 3)]=0.176500736041*x[0] + (-0.104722226773)*x[1] + (-0.148984129483)*x[2]
            ref[(1, 3)]=-0.0386028101075
            arg[(2, 0)]=0.791219424627*x[0] + (-0.382870818979)*x[1] + (0.434638798381)*x[2]
            ref[(2, 0)]=0.421493702014
            arg[(2, 1)]=-0.968545277514*x[0] + (-0.266449093818)*x[1] + (-0.749158931737)*x[2]
            ref[(2, 1)]=-0.992076651535
            arg[(2, 2)]=0.839722244762*x[0] + (-0.0403674236916)*x[1] + (-0.862429345446)*x[2]
            ref[(2, 2)]=-0.0315372621879
            arg[(2, 3)]=-0.103240622564*x[0] + (-0.223758879596)*x[1] + (0.839406071887)*x[2]
            ref[(2, 3)]=0.256203284864
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref=numpy.zeros((4, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.0910225051827*x[0] + (-0.739949027984)*x[1]
            ref[(0, 0, 0)]=-0.324463261401
            arg[(0, 0, 1)]=0.172863107366*x[0] + (0.958202493427)*x[1]
            ref[(0, 0, 1)]=0.565532800396
            arg[(0, 0, 2)]=-0.567327788362*x[0] + (0.746419318602)*x[1]
            ref[(0, 0, 2)]=0.0895457651203
            arg[(0, 0, 3)]=0.808548550738*x[0] + (0.113219239021)*x[1]
            ref[(0, 0, 3)]=0.46088389488
            arg[(0, 1, 0)]=-0.96330325563*x[0] + (0.1032459822)*x[1]
            ref[(0, 1, 0)]=-0.430028636715
            arg[(0, 1, 1)]=-0.272218516273*x[0] + (-0.610741212795)*x[1]
            ref[(0, 1, 1)]=-0.441479864534
            arg[(0, 1, 2)]=0.221674440916*x[0] + (0.276764429127)*x[1]
            ref[(0, 1, 2)]=0.249219435022
            arg[(0, 1, 3)]=0.339424320901*x[0] + (-0.490130559332)*x[1]
            ref[(0, 1, 3)]=-0.0753531192154
            arg[(0, 2, 0)]=0.798853717575*x[0] + (0.818631982338)*x[1]
            ref[(0, 2, 0)]=0.808742849956
            arg[(0, 2, 1)]=0.495583834526*x[0] + (0.848847042443)*x[1]
            ref[(0, 2, 1)]=0.672215438484
            arg[(0, 2, 2)]=-0.0122178343969*x[0] + (0.271806477731)*x[1]
            ref[(0, 2, 2)]=0.129794321667
            arg[(0, 2, 3)]=-0.870927797166*x[0] + (-0.634112093672)*x[1]
            ref[(0, 2, 3)]=-0.752519945419
            arg[(0, 3, 0)]=0.473991302946*x[0] + (0.98314832367)*x[1]
            ref[(0, 3, 0)]=0.728569813308
            arg[(0, 3, 1)]=0.06962709494*x[0] + (0.827630506335)*x[1]
            ref[(0, 3, 1)]=0.448628800637
            arg[(0, 3, 2)]=0.197566502458*x[0] + (0.407821631172)*x[1]
            ref[(0, 3, 2)]=0.302694066815
            arg[(0, 3, 3)]=-0.545880741398*x[0] + (-0.153485700338)*x[1]
            ref[(0, 3, 3)]=-0.349683220868
            arg[(1, 0, 0)]=-0.134409676056*x[0] + (0.90347602307)*x[1]
            ref[(1, 0, 0)]=0.384533173507
            arg[(1, 0, 1)]=0.250619064777*x[0] + (0.154983544558)*x[1]
            ref[(1, 0, 1)]=0.202801304668
            arg[(1, 0, 2)]=-0.168827741474*x[0] + (0.0975837629955)*x[1]
            ref[(1, 0, 2)]=-0.0356219892395
            arg[(1, 0, 3)]=-0.997310227631*x[0] + (0.901130345351)*x[1]
            ref[(1, 0, 3)]=-0.0480899411397
            arg[(1, 1, 0)]=0.701853609149*x[0] + (0.931749659768)*x[1]
            ref[(1, 1, 0)]=0.816801634459
            arg[(1, 1, 1)]=-0.627390359352*x[0] + (0.99240714995)*x[1]
            ref[(1, 1, 1)]=0.182508395299
            arg[(1, 1, 2)]=0.686112839952*x[0] + (-0.205367660046)*x[1]
            ref[(1, 1, 2)]=0.240372589953
            arg[(1, 1, 3)]=0.780158645152*x[0] + (-0.227766482564)*x[1]
            ref[(1, 1, 3)]=0.276196081294
            arg[(1, 2, 0)]=0.401522008093*x[0] + (0.361489210931)*x[1]
            ref[(1, 2, 0)]=0.381505609512
            arg[(1, 2, 1)]=0.0105252781283*x[0] + (0.930119998461)*x[1]
            ref[(1, 2, 1)]=0.470322638295
            arg[(1, 2, 2)]=-0.312628490542*x[0] + (0.775720049442)*x[1]
            ref[(1, 2, 2)]=0.23154577945
            arg[(1, 2, 3)]=0.17047746587*x[0] + (0.840318130529)*x[1]
            ref[(1, 2, 3)]=0.505397798199
            arg[(1, 3, 0)]=-0.120874883994*x[0] + (-0.281200901692)*x[1]
            ref[(1, 3, 0)]=-0.201037892843
            arg[(1, 3, 1)]=0.903106819881*x[0] + (-0.114042204451)*x[1]
            ref[(1, 3, 1)]=0.394532307715
            arg[(1, 3, 2)]=0.897921367292*x[0] + (-0.15533836972)*x[1]
            ref[(1, 3, 2)]=0.371291498786
            arg[(1, 3, 3)]=-0.283245633606*x[0] + (-0.660435568525)*x[1]
            ref[(1, 3, 3)]=-0.471840601066
            arg[(2, 0, 0)]=-0.582783767596*x[0] + (-0.948703935232)*x[1]
            ref[(2, 0, 0)]=-0.765743851414
            arg[(2, 0, 1)]=-0.495880793342*x[0] + (-0.2398424535)*x[1]
            ref[(2, 0, 1)]=-0.367861623421
            arg[(2, 0, 2)]=-0.790597069106*x[0] + (0.838520369496)*x[1]
            ref[(2, 0, 2)]=0.0239616501951
            arg[(2, 0, 3)]=0.738234986075*x[0] + (-0.648136908335)*x[1]
            ref[(2, 0, 3)]=0.0450490388702
            arg[(2, 1, 0)]=-0.750662305411*x[0] + (0.782077874842)*x[1]
            ref[(2, 1, 0)]=0.0157077847154
            arg[(2, 1, 1)]=-0.133278387504*x[0] + (-0.364997246756)*x[1]
            ref[(2, 1, 1)]=-0.24913781713
            arg[(2, 1, 2)]=-0.549966391951*x[0] + (0.402084015375)*x[1]
            ref[(2, 1, 2)]=-0.0739411882881
            arg[(2, 1, 3)]=-0.857939733314*x[0] + (0.790302026235)*x[1]
            ref[(2, 1, 3)]=-0.0338188535393
            arg[(2, 2, 0)]=-0.922383046697*x[0] + (-0.193051829014)*x[1]
            ref[(2, 2, 0)]=-0.557717437856
            arg[(2, 2, 1)]=0.0886626238799*x[0] + (-0.892642929628)*x[1]
            ref[(2, 2, 1)]=-0.401990152874
            arg[(2, 2, 2)]=-0.765476737078*x[0] + (-0.575842002449)*x[1]
            ref[(2, 2, 2)]=-0.670659369764
            arg[(2, 2, 3)]=0.527414754515*x[0] + (-0.870886221166)*x[1]
            ref[(2, 2, 3)]=-0.171735733326
            arg[(2, 3, 0)]=-0.930413194626*x[0] + (0.761187107864)*x[1]
            ref[(2, 3, 0)]=-0.0846130433812
            arg[(2, 3, 1)]=-0.146137238516*x[0] + (-0.528680151775)*x[1]
            ref[(2, 3, 1)]=-0.337408695145
            arg[(2, 3, 2)]=-0.8309382959*x[0] + (0.819687221856)*x[1]
            ref[(2, 3, 2)]=-0.00562553702205
            arg[(2, 3, 3)]=0.471549634425*x[0] + (-0.633022434173)*x[1]
            ref[(2, 3, 3)]=-0.0807363998737
            arg[(3, 0, 0)]=0.790208447837*x[0] + (0.310873568371)*x[1]
            ref[(3, 0, 0)]=0.550541008104
            arg[(3, 0, 1)]=0.0856302977311*x[0] + (-0.653266633524)*x[1]
            ref[(3, 0, 1)]=-0.283818167896
            arg[(3, 0, 2)]=0.600628446631*x[0] + (-0.251522840771)*x[1]
            ref[(3, 0, 2)]=0.17455280293
            arg[(3, 0, 3)]=-0.862875425025*x[0] + (0.506676059466)*x[1]
            ref[(3, 0, 3)]=-0.178099682779
            arg[(3, 1, 0)]=0.935026967069*x[0] + (-0.317487990494)*x[1]
            ref[(3, 1, 0)]=0.308769488287
            arg[(3, 1, 1)]=0.650171875518*x[0] + (0.0453479163967)*x[1]
            ref[(3, 1, 1)]=0.347759895957
            arg[(3, 1, 2)]=0.023149518636*x[0] + (-0.33649710117)*x[1]
            ref[(3, 1, 2)]=-0.156673791267
            arg[(3, 1, 3)]=0.696899867619*x[0] + (0.497678653033)*x[1]
            ref[(3, 1, 3)]=0.597289260326
            arg[(3, 2, 0)]=-0.937421717429*x[0] + (-0.183381623271)*x[1]
            ref[(3, 2, 0)]=-0.56040167035
            arg[(3, 2, 1)]=-0.814309544405*x[0] + (-0.0838316474838)*x[1]
            ref[(3, 2, 1)]=-0.449070595944
            arg[(3, 2, 2)]=0.307978181613*x[0] + (-0.551722833847)*x[1]
            ref[(3, 2, 2)]=-0.121872326117
            arg[(3, 2, 3)]=-0.123626173845*x[0] + (-0.104881174565)*x[1]
            ref[(3, 2, 3)]=-0.114253674205
            arg[(3, 3, 0)]=0.167042576985*x[0] + (-0.422567734594)*x[1]
            ref[(3, 3, 0)]=-0.127762578805
            arg[(3, 3, 1)]=0.969692753199*x[0] + (-0.419453696833)*x[1]
            ref[(3, 3, 1)]=0.275119528183
            arg[(3, 3, 2)]=0.568446206074*x[0] + (-0.239469009962)*x[1]
            ref[(3, 3, 2)]=0.164488598056
            arg[(3, 3, 3)]=0.526076010658*x[0] + (0.439934514905)*x[1]
            ref[(3, 3, 3)]=0.483005262782
        else:
            arg[(0, 0, 0)]=-0.438131078841*x[0] + (-0.963187450491)*x[1] + (0.847507672773)*x[2]
            ref[(0, 0, 0)]=-0.27690542828
            arg[(0, 0, 1)]=-0.0871202772113*x[0] + (0.655309478971)*x[1] + (-0.747571183714)*x[2]
            ref[(0, 0, 1)]=-0.0896909909769
            arg[(0, 0, 2)]=0.693010605238*x[0] + (-0.615201168996)*x[1] + (0.495905698612)*x[2]
            ref[(0, 0, 2)]=0.286857567427
            arg[(0, 0, 3)]=-0.0765302704183*x[0] + (-0.704621860376)*x[1] + (-0.32678928957)*x[2]
            ref[(0, 0, 3)]=-0.553970710182
            arg[(0, 1, 0)]=-0.681939849739*x[0] + (0.882273689569)*x[1] + (0.516456885645)*x[2]
            ref[(0, 1, 0)]=0.358395362737
            arg[(0, 1, 1)]=-0.474813034348*x[0] + (-0.627286921075)*x[1] + (-0.75921370012)*x[2]
            ref[(0, 1, 1)]=-0.930656827771
            arg[(0, 1, 2)]=-0.484401756184*x[0] + (0.389924216503)*x[1] + (0.872919864005)*x[2]
            ref[(0, 1, 2)]=0.389221162162
            arg[(0, 1, 3)]=0.137692116799*x[0] + (-0.156754602572)*x[1] + (0.73356086974)*x[2]
            ref[(0, 1, 3)]=0.357249191984
            arg[(0, 2, 0)]=0.486711808913*x[0] + (-0.100086727898)*x[1] + (0.840818960868)*x[2]
            ref[(0, 2, 0)]=0.613722020941
            arg[(0, 2, 1)]=0.168552925342*x[0] + (-0.813347011263)*x[1] + (0.823581376038)*x[2]
            ref[(0, 2, 1)]=0.0893936450586
            arg[(0, 2, 2)]=-0.876567581906*x[0] + (0.0784533215187)*x[1] + (-0.330632793726)*x[2]
            ref[(0, 2, 2)]=-0.564373527057
            arg[(0, 2, 3)]=-0.277506571648*x[0] + (-0.752961482695)*x[1] + (-0.262218379371)*x[2]
            ref[(0, 2, 3)]=-0.646343216857
            arg[(0, 3, 0)]=-0.916471975448*x[0] + (0.460915619635)*x[1] + (0.0273488660044)*x[2]
            ref[(0, 3, 0)]=-0.214103744905
            arg[(0, 3, 1)]=-0.34013980421*x[0] + (-0.137213228523)*x[1] + (-0.290501807959)*x[2]
            ref[(0, 3, 1)]=-0.383927420346
            arg[(0, 3, 2)]=-0.429184372181*x[0] + (-0.291842049503)*x[1] + (0.458389351129)*x[2]
            ref[(0, 3, 2)]=-0.131318535277
            arg[(0, 3, 3)]=-0.668262984639*x[0] + (-0.953536361079)*x[1] + (0.554850417281)*x[2]
            ref[(0, 3, 3)]=-0.533474464219
            arg[(1, 0, 0)]=-0.95289660349*x[0] + (0.000717212174793)*x[1] + (0.695562254703)*x[2]
            ref[(1, 0, 0)]=-0.128308568306
            arg[(1, 0, 1)]=-0.640476724409*x[0] + (-0.771575231134)*x[1] + (-0.268633626291)*x[2]
            ref[(1, 0, 1)]=-0.840342790917
            arg[(1, 0, 2)]=0.0699952549426*x[0] + (-0.513856284758)*x[1] + (-0.438002254263)*x[2]
            ref[(1, 0, 2)]=-0.44093164204
            arg[(1, 0, 3)]=-0.150104788997*x[0] + (0.833619249668)*x[1] + (-0.749999965116)*x[2]
            ref[(1, 0, 3)]=-0.0332427522225
            arg[(1, 1, 0)]=-0.0484053861382*x[0] + (-0.520019634725)*x[1] + (-0.316913922263)*x[2]
            ref[(1, 1, 0)]=-0.442669471563
            arg[(1, 1, 1)]=0.109746281017*x[0] + (-0.172417156232)*x[1] + (-0.664547707922)*x[2]
            ref[(1, 1, 1)]=-0.363609291568
            arg[(1, 1, 2)]=0.990990319501*x[0] + (0.677576719087)*x[1] + (0.191451453895)*x[2]
            ref[(1, 1, 2)]=0.930009246241
            arg[(1, 1, 3)]=-0.258505008451*x[0] + (0.591254367983)*x[1] + (-0.622831029659)*x[2]
            ref[(1, 1, 3)]=-0.145040835064
            arg[(1, 2, 0)]=0.209307243176*x[0] + (-0.262831322285)*x[1] + (-0.655434679368)*x[2]
            ref[(1, 2, 0)]=-0.354479379239
            arg[(1, 2, 1)]=-0.165956507518*x[0] + (0.0553167464207)*x[1] + (0.900621335242)*x[2]
            ref[(1, 2, 1)]=0.394990787072
            arg[(1, 2, 2)]=-0.048046490485*x[0] + (0.12119674605)*x[1] + (-0.066850168946)*x[2]
            ref[(1, 2, 2)]=0.0031500433096
            arg[(1, 2, 3)]=0.527316388264*x[0] + (0.845231565563)*x[1] + (0.326994399082)*x[2]
            ref[(1, 2, 3)]=0.849771176454
            arg[(1, 3, 0)]=0.255509745081*x[0] + (0.958104528798)*x[1] + (-0.566643555929)*x[2]
            ref[(1, 3, 0)]=0.323485358975
            arg[(1, 3, 1)]=0.860981493488*x[0] + (-0.956022385109)*x[1] + (-0.137935228841)*x[2]
            ref[(1, 3, 1)]=-0.116488060231
            arg[(1, 3, 2)]=0.7696380713*x[0] + (-0.464327907142)*x[1] + (0.929064675124)*x[2]
            ref[(1, 3, 2)]=0.617187419641
            arg[(1, 3, 3)]=0.667561663232*x[0] + (-0.0668139006427)*x[1] + (-0.404788761365)*x[2]
            ref[(1, 3, 3)]=0.0979795006122
            arg[(2, 0, 0)]=-0.0475221147321*x[0] + (0.449019419923)*x[1] + (0.510192087097)*x[2]
            ref[(2, 0, 0)]=0.455844696144
            arg[(2, 0, 1)]=0.512704582323*x[0] + (-0.116722942742)*x[1] + (-0.906316773196)*x[2]
            ref[(2, 0, 1)]=-0.255167566808
            arg[(2, 0, 2)]=-0.367364389859*x[0] + (-0.781025094675)*x[1] + (0.228997605958)*x[2]
            ref[(2, 0, 2)]=-0.459695939288
            arg[(2, 0, 3)]=-0.511509378858*x[0] + (-0.208489761759)*x[1] + (-0.112475570771)*x[2]
            ref[(2, 0, 3)]=-0.416237355694
            arg[(2, 1, 0)]=0.865989839228*x[0] + (-0.210863117211)*x[1] + (0.183626073233)*x[2]
            ref[(2, 1, 0)]=0.419376397625
            arg[(2, 1, 1)]=0.412064210066*x[0] + (-0.551801264095)*x[1] + (0.711841516126)*x[2]
            ref[(2, 1, 1)]=0.286052231048
            arg[(2, 1, 2)]=0.1029431563*x[0] + (0.118686123952)*x[1] + (0.325389453283)*x[2]
            ref[(2, 1, 2)]=0.273509366767
            arg[(2, 1, 3)]=-0.00271496856387*x[0] + (-0.800490074196)*x[1] + (-0.255149368471)*x[2]
            ref[(2, 1, 3)]=-0.529177205615
            arg[(2, 2, 0)]=-0.566458074092*x[0] + (-0.28469420838)*x[1] + (-0.800291038246)*x[2]
            ref[(2, 2, 0)]=-0.825721660359
            arg[(2, 2, 1)]=-0.114500804642*x[0] + (-0.543341395509)*x[1] + (-0.861707871472)*x[2]
            ref[(2, 2, 1)]=-0.759775035812
            arg[(2, 2, 2)]=-0.25424749299*x[0] + (-0.201098772957)*x[1] + (0.293997766086)*x[2]
            ref[(2, 2, 2)]=-0.0806742499307
            arg[(2, 2, 3)]=0.855060803026*x[0] + (-0.890850207565)*x[1] + (-0.640866843413)*x[2]
            ref[(2, 2, 3)]=-0.338328123976
            arg[(2, 3, 0)]=0.440187153622*x[0] + (-0.99899519236)*x[1] + (-0.275762944252)*x[2]
            ref[(2, 3, 0)]=-0.417285491495
            arg[(2, 3, 1)]=-0.0431434463488*x[0] + (0.557912052724)*x[1] + (0.138418948217)*x[2]
            ref[(2, 3, 1)]=0.326593777296
            arg[(2, 3, 2)]=0.673131770362*x[0] + (-0.346881540266)*x[1] + (-0.700486587079)*x[2]
            ref[(2, 3, 2)]=-0.187118178491
            arg[(2, 3, 3)]=0.776185559598*x[0] + (0.789442691525)*x[1] + (-0.336086148533)*x[2]
            ref[(2, 3, 3)]=0.614771051295
            arg[(3, 0, 0)]=-0.512999728948*x[0] + (0.607598156737)*x[1] + (-0.843652437673)*x[2]
            ref[(3, 0, 0)]=-0.374527004942
            arg[(3, 0, 1)]=-0.948500249258*x[0] + (0.466574209627)*x[1] + (-0.860010759532)*x[2]
            ref[(3, 0, 1)]=-0.670968399581
            arg[(3, 0, 2)]=-0.107384531623*x[0] + (0.00522671273524)*x[1] + (0.168529081964)*x[2]
            ref[(3, 0, 2)]=0.0331856315382
            arg[(3, 0, 3)]=-0.215011116448*x[0] + (0.178772619095)*x[1] + (-0.67107550316)*x[2]
            ref[(3, 0, 3)]=-0.353657000257
            arg[(3, 1, 0)]=-0.800425756612*x[0] + (-0.532012040629)*x[1] + (-0.659678446187)*x[2]
            ref[(3, 1, 0)]=-0.996058121714
            arg[(3, 1, 1)]=-0.116960847337*x[0] + (-0.34874028451)*x[1] + (-0.0561375784743)*x[2]
            ref[(3, 1, 1)]=-0.260919355161
            arg[(3, 1, 2)]=-0.728656809077*x[0] + (-0.706967493485)*x[1] + (-0.724436669264)*x[2]
            ref[(3, 1, 2)]=-1.08003048591
            arg[(3, 1, 3)]=-0.92105251273*x[0] + (-0.824837381905)*x[1] + (-0.0601481873006)*x[2]
            ref[(3, 1, 3)]=-0.903019040967
            arg[(3, 2, 0)]=0.352321258165*x[0] + (-0.242889581687)*x[1] + (0.404429337276)*x[2]
            ref[(3, 2, 0)]=0.256930506877
            arg[(3, 2, 1)]=0.322586477768*x[0] + (0.626108525896)*x[1] + (0.60704224219)*x[2]
            ref[(3, 2, 1)]=0.777868622927
            arg[(3, 2, 2)]=0.153014632587*x[0] + (-0.386587053138)*x[1] + (0.753406342317)*x[2]
            ref[(3, 2, 2)]=0.259916960883
            arg[(3, 2, 3)]=-0.577838369145*x[0] + (-0.94867878145)*x[1] + (-0.13907596055)*x[2]
            ref[(3, 2, 3)]=-0.832796555573
            arg[(3, 3, 0)]=0.765041459955*x[0] + (-0.588641231321)*x[1] + (-0.849961534472)*x[2]
            ref[(3, 3, 0)]=-0.336780652919
            arg[(3, 3, 1)]=0.0338041156*x[0] + (0.0364267205371)*x[1] + (0.0557769947478)*x[2]
            ref[(3, 3, 1)]=0.0630039154424
            arg[(3, 3, 2)]=0.585293731001*x[0] + (-0.465734115828)*x[1] + (-0.990614376272)*x[2]
            ref[(3, 3, 2)]=-0.43552738055
            arg[(3, 3, 3)]=-0.278847531299*x[0] + (-0.793723058813)*x[1] + (0.468700002664)*x[2]
            ref[(3, 3, 3)]=-0.301935293724
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 4),w)
        ref=numpy.zeros((2, 3, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.633467971236*x[0] + (0.250004998636)*x[1]
            ref[(0, 0, 0, 0)]=0.441736484936
            arg[(0, 0, 0, 1)]=0.982894450526*x[0] + (0.81536331175)*x[1]
            ref[(0, 0, 0, 1)]=0.899128881138
            arg[(0, 0, 0, 2)]=-0.38925094532*x[0] + (0.771707336569)*x[1]
            ref[(0, 0, 0, 2)]=0.191228195625
            arg[(0, 0, 0, 3)]=-0.946511414492*x[0] + (0.417094450306)*x[1]
            ref[(0, 0, 0, 3)]=-0.264708482093
            arg[(0, 0, 1, 0)]=0.85759785886*x[0] + (-0.261963045846)*x[1]
            ref[(0, 0, 1, 0)]=0.297817406507
            arg[(0, 0, 1, 1)]=-0.658982149782*x[0] + (-0.0665777391512)*x[1]
            ref[(0, 0, 1, 1)]=-0.362779944467
            arg[(0, 0, 1, 2)]=-0.586912185176*x[0] + (0.79097657913)*x[1]
            ref[(0, 0, 1, 2)]=0.102032196977
            arg[(0, 0, 1, 3)]=0.628221873974*x[0] + (0.198641379492)*x[1]
            ref[(0, 0, 1, 3)]=0.413431626733
            arg[(0, 0, 2, 0)]=-0.182562011874*x[0] + (-0.600070232519)*x[1]
            ref[(0, 0, 2, 0)]=-0.391316122197
            arg[(0, 0, 2, 1)]=-0.282522244738*x[0] + (0.0850410578348)*x[1]
            ref[(0, 0, 2, 1)]=-0.0987405934518
            arg[(0, 0, 2, 2)]=-0.124760551488*x[0] + (0.35026808585)*x[1]
            ref[(0, 0, 2, 2)]=0.112753767181
            arg[(0, 0, 2, 3)]=-0.038590479576*x[0] + (0.310482086896)*x[1]
            ref[(0, 0, 2, 3)]=0.13594580366
            arg[(0, 1, 0, 0)]=0.161568231611*x[0] + (0.167030857587)*x[1]
            ref[(0, 1, 0, 0)]=0.164299544599
            arg[(0, 1, 0, 1)]=-0.95103909449*x[0] + (0.285603848825)*x[1]
            ref[(0, 1, 0, 1)]=-0.332717622833
            arg[(0, 1, 0, 2)]=-0.473478314398*x[0] + (-0.0764452403543)*x[1]
            ref[(0, 1, 0, 2)]=-0.274961777376
            arg[(0, 1, 0, 3)]=0.914731385573*x[0] + (-0.89930329686)*x[1]
            ref[(0, 1, 0, 3)]=0.00771404435683
            arg[(0, 1, 1, 0)]=0.146905018071*x[0] + (-0.329956198285)*x[1]
            ref[(0, 1, 1, 0)]=-0.0915255901069
            arg[(0, 1, 1, 1)]=-0.110526560323*x[0] + (-0.552590634466)*x[1]
            ref[(0, 1, 1, 1)]=-0.331558597394
            arg[(0, 1, 1, 2)]=-0.198923396851*x[0] + (-0.644032450381)*x[1]
            ref[(0, 1, 1, 2)]=-0.421477923616
            arg[(0, 1, 1, 3)]=0.500224286586*x[0] + (-0.480650834169)*x[1]
            ref[(0, 1, 1, 3)]=0.00978672620892
            arg[(0, 1, 2, 0)]=-0.831488803503*x[0] + (0.171354419544)*x[1]
            ref[(0, 1, 2, 0)]=-0.330067191979
            arg[(0, 1, 2, 1)]=-0.959578836934*x[0] + (-0.484399904186)*x[1]
            ref[(0, 1, 2, 1)]=-0.72198937056
            arg[(0, 1, 2, 2)]=0.120926417863*x[0] + (0.330591707573)*x[1]
            ref[(0, 1, 2, 2)]=0.225759062718
            arg[(0, 1, 2, 3)]=-0.495207493595*x[0] + (0.860911863515)*x[1]
            ref[(0, 1, 2, 3)]=0.18285218496
            arg[(0, 2, 0, 0)]=-0.902240714533*x[0] + (0.220328299949)*x[1]
            ref[(0, 2, 0, 0)]=-0.340956207292
            arg[(0, 2, 0, 1)]=0.782892802523*x[0] + (0.203961779363)*x[1]
            ref[(0, 2, 0, 1)]=0.493427290943
            arg[(0, 2, 0, 2)]=0.785589330355*x[0] + (0.354759230064)*x[1]
            ref[(0, 2, 0, 2)]=0.570174280209
            arg[(0, 2, 0, 3)]=0.504539817508*x[0] + (-0.121904769519)*x[1]
            ref[(0, 2, 0, 3)]=0.191317523995
            arg[(0, 2, 1, 0)]=-0.815686129822*x[0] + (-0.0455378751211)*x[1]
            ref[(0, 2, 1, 0)]=-0.430612002472
            arg[(0, 2, 1, 1)]=-0.924850201922*x[0] + (-0.193900478712)*x[1]
            ref[(0, 2, 1, 1)]=-0.559375340317
            arg[(0, 2, 1, 2)]=0.286374889005*x[0] + (0.101026142285)*x[1]
            ref[(0, 2, 1, 2)]=0.193700515645
            arg[(0, 2, 1, 3)]=0.469539798799*x[0] + (0.0220868323668)*x[1]
            ref[(0, 2, 1, 3)]=0.245813315583
            arg[(0, 2, 2, 0)]=-0.956260849124*x[0] + (0.832718886317)*x[1]
            ref[(0, 2, 2, 0)]=-0.0617709814036
            arg[(0, 2, 2, 1)]=0.463625566793*x[0] + (0.136587161727)*x[1]
            ref[(0, 2, 2, 1)]=0.30010636426
            arg[(0, 2, 2, 2)]=-0.728688348257*x[0] + (-0.908872362269)*x[1]
            ref[(0, 2, 2, 2)]=-0.818780355263
            arg[(0, 2, 2, 3)]=0.0847524331349*x[0] + (0.707922976636)*x[1]
            ref[(0, 2, 2, 3)]=0.396337704886
            arg[(1, 0, 0, 0)]=0.925648816901*x[0] + (-0.542706635666)*x[1]
            ref[(1, 0, 0, 0)]=0.191471090618
            arg[(1, 0, 0, 1)]=0.730819226142*x[0] + (0.508338635046)*x[1]
            ref[(1, 0, 0, 1)]=0.619578930594
            arg[(1, 0, 0, 2)]=-0.340238102206*x[0] + (0.259025361682)*x[1]
            ref[(1, 0, 0, 2)]=-0.0406063702619
            arg[(1, 0, 0, 3)]=0.685104181874*x[0] + (0.208965355924)*x[1]
            ref[(1, 0, 0, 3)]=0.447034768899
            arg[(1, 0, 1, 0)]=0.813795927985*x[0] + (-0.38650093755)*x[1]
            ref[(1, 0, 1, 0)]=0.213647495217
            arg[(1, 0, 1, 1)]=0.42848338523*x[0] + (-0.403373745152)*x[1]
            ref[(1, 0, 1, 1)]=0.0125548200388
            arg[(1, 0, 1, 2)]=-0.557147421485*x[0] + (-0.873569893014)*x[1]
            ref[(1, 0, 1, 2)]=-0.71535865725
            arg[(1, 0, 1, 3)]=-0.0689368128275*x[0] + (0.669039566297)*x[1]
            ref[(1, 0, 1, 3)]=0.300051376735
            arg[(1, 0, 2, 0)]=0.138158814928*x[0] + (0.315939071722)*x[1]
            ref[(1, 0, 2, 0)]=0.227048943325
            arg[(1, 0, 2, 1)]=-0.5454496651*x[0] + (0.562308892352)*x[1]
            ref[(1, 0, 2, 1)]=0.00842961362553
            arg[(1, 0, 2, 2)]=0.0890075685197*x[0] + (0.818306995893)*x[1]
            ref[(1, 0, 2, 2)]=0.453657282207
            arg[(1, 0, 2, 3)]=-0.294772818438*x[0] + (-0.782041602104)*x[1]
            ref[(1, 0, 2, 3)]=-0.538407210271
            arg[(1, 1, 0, 0)]=0.295656918891*x[0] + (-0.0795030571455)*x[1]
            ref[(1, 1, 0, 0)]=0.108076930873
            arg[(1, 1, 0, 1)]=0.0828311891009*x[0] + (-0.905019319704)*x[1]
            ref[(1, 1, 0, 1)]=-0.411094065302
            arg[(1, 1, 0, 2)]=0.169914030275*x[0] + (-0.350634404249)*x[1]
            ref[(1, 1, 0, 2)]=-0.0903601869874
            arg[(1, 1, 0, 3)]=0.351519938418*x[0] + (0.948872359811)*x[1]
            ref[(1, 1, 0, 3)]=0.650196149114
            arg[(1, 1, 1, 0)]=0.744399724365*x[0] + (-0.550861097951)*x[1]
            ref[(1, 1, 1, 0)]=0.0967693132068
            arg[(1, 1, 1, 1)]=-0.757156446646*x[0] + (0.175028426194)*x[1]
            ref[(1, 1, 1, 1)]=-0.291064010226
            arg[(1, 1, 1, 2)]=0.678741267006*x[0] + (-0.860358609944)*x[1]
            ref[(1, 1, 1, 2)]=-0.0908086714689
            arg[(1, 1, 1, 3)]=-0.95227943436*x[0] + (0.328230637463)*x[1]
            ref[(1, 1, 1, 3)]=-0.312024398449
            arg[(1, 1, 2, 0)]=0.0948685458264*x[0] + (-0.343405634897)*x[1]
            ref[(1, 1, 2, 0)]=-0.124268544535
            arg[(1, 1, 2, 1)]=-0.556503818137*x[0] + (0.217475968515)*x[1]
            ref[(1, 1, 2, 1)]=-0.169513924811
            arg[(1, 1, 2, 2)]=0.668963849508*x[0] + (0.93889108323)*x[1]
            ref[(1, 1, 2, 2)]=0.803927466369
            arg[(1, 1, 2, 3)]=-0.491614556163*x[0] + (-0.252636860346)*x[1]
            ref[(1, 1, 2, 3)]=-0.372125708254
            arg[(1, 2, 0, 0)]=0.542145652115*x[0] + (-0.148183273004)*x[1]
            ref[(1, 2, 0, 0)]=0.196981189555
            arg[(1, 2, 0, 1)]=0.958016231541*x[0] + (0.606041513591)*x[1]
            ref[(1, 2, 0, 1)]=0.782028872566
            arg[(1, 2, 0, 2)]=0.876528321326*x[0] + (0.488268467184)*x[1]
            ref[(1, 2, 0, 2)]=0.682398394255
            arg[(1, 2, 0, 3)]=0.388613564369*x[0] + (-0.207190252215)*x[1]
            ref[(1, 2, 0, 3)]=0.0907116560768
            arg[(1, 2, 1, 0)]=0.543263348662*x[0] + (-0.530681615723)*x[1]
            ref[(1, 2, 1, 0)]=0.0062908664692
            arg[(1, 2, 1, 1)]=-0.260063250841*x[0] + (0.806493102644)*x[1]
            ref[(1, 2, 1, 1)]=0.273214925901
            arg[(1, 2, 1, 2)]=0.430388260412*x[0] + (-0.457748596528)*x[1]
            ref[(1, 2, 1, 2)]=-0.0136801680583
            arg[(1, 2, 1, 3)]=0.452281483352*x[0] + (-0.37386008844)*x[1]
            ref[(1, 2, 1, 3)]=0.0392106974557
            arg[(1, 2, 2, 0)]=-0.861618220486*x[0] + (0.087283431741)*x[1]
            ref[(1, 2, 2, 0)]=-0.387167394372
            arg[(1, 2, 2, 1)]=0.344193481446*x[0] + (0.312582400595)*x[1]
            ref[(1, 2, 2, 1)]=0.328387941021
            arg[(1, 2, 2, 2)]=0.848247200886*x[0] + (0.0756758211201)*x[1]
            ref[(1, 2, 2, 2)]=0.461961511003
            arg[(1, 2, 2, 3)]=0.137324661271*x[0] + (-0.441459471128)*x[1]
            ref[(1, 2, 2, 3)]=-0.152067404928
        else:
            arg[(0, 0, 0, 0)]=-0.864041368822*x[0] + (0.304433374241)*x[1] + (0.489215400258)*x[2]
            ref[(0, 0, 0, 0)]=-0.0351962971617
            arg[(0, 0, 0, 1)]=-0.0979516307539*x[0] + (-0.632651772592)*x[1] + (0.272127159199)*x[2]
            ref[(0, 0, 0, 1)]=-0.229238122073
            arg[(0, 0, 0, 2)]=0.808759286402*x[0] + (0.877316297846)*x[1] + (-0.867386678219)*x[2]
            ref[(0, 0, 0, 2)]=0.409344453015
            arg[(0, 0, 0, 3)]=-0.177714238501*x[0] + (0.857581577016)*x[1] + (0.39385096719)*x[2]
            ref[(0, 0, 0, 3)]=0.536859152852
            arg[(0, 0, 1, 0)]=-0.97005633987*x[0] + (0.673363603523)*x[1] + (0.624686745652)*x[2]
            ref[(0, 0, 1, 0)]=0.163997004652
            arg[(0, 0, 1, 1)]=-0.737686901461*x[0] + (0.134924134951)*x[1] + (-0.657847596608)*x[2]
            ref[(0, 0, 1, 1)]=-0.630305181559
            arg[(0, 0, 1, 2)]=-0.287123575665*x[0] + (-0.461761155234)*x[1] + (-0.275539035515)*x[2]
            ref[(0, 0, 1, 2)]=-0.512211883207
            arg[(0, 0, 1, 3)]=-0.506920185583*x[0] + (-0.590490996954)*x[1] + (0.421349459225)*x[2]
            ref[(0, 0, 1, 3)]=-0.338030861656
            arg[(0, 0, 2, 0)]=-0.979061834683*x[0] + (0.435174514398)*x[1] + (0.076606761688)*x[2]
            ref[(0, 0, 2, 0)]=-0.233640279299
            arg[(0, 0, 2, 1)]=0.743902586488*x[0] + (-0.954801734575)*x[1] + (-0.373683068208)*x[2]
            ref[(0, 0, 2, 1)]=-0.292291108147
            arg[(0, 0, 2, 2)]=-0.51112407732*x[0] + (-0.124310268756)*x[1] + (0.77796714128)*x[2]
            ref[(0, 0, 2, 2)]=0.0712663976023
            arg[(0, 0, 2, 3)]=0.867614767863*x[0] + (-0.384210658422)*x[1] + (-0.973292741212)*x[2]
            ref[(0, 0, 2, 3)]=-0.244944315886
            arg[(0, 1, 0, 0)]=-0.76249521352*x[0] + (0.188666394675)*x[1] + (-0.441691667559)*x[2]
            ref[(0, 1, 0, 0)]=-0.507760243202
            arg[(0, 1, 0, 1)]=0.131148104373*x[0] + (0.0726462724728)*x[1] + (-0.566692388474)*x[2]
            ref[(0, 1, 0, 1)]=-0.181449005814
            arg[(0, 1, 0, 2)]=0.633532466375*x[0] + (0.823368529065)*x[1] + (0.103991817539)*x[2]
            ref[(0, 1, 0, 2)]=0.78044640649
            arg[(0, 1, 0, 3)]=-0.486231705623*x[0] + (-0.544173381167)*x[1] + (0.658773650249)*x[2]
            ref[(0, 1, 0, 3)]=-0.18581571827
            arg[(0, 1, 1, 0)]=0.314237540916*x[0] + (0.871401013504)*x[1] + (-0.553426184004)*x[2]
            ref[(0, 1, 1, 0)]=0.316106185208
            arg[(0, 1, 1, 1)]=0.76326473038*x[0] + (-0.807254533783)*x[1] + (-0.447536815189)*x[2]
            ref[(0, 1, 1, 1)]=-0.245763309296
            arg[(0, 1, 1, 2)]=-0.195000698263*x[0] + (0.107986899606)*x[1] + (0.530760197685)*x[2]
            ref[(0, 1, 1, 2)]=0.221873199514
            arg[(0, 1, 1, 3)]=-0.697876413817*x[0] + (-0.674083915022)*x[1] + (0.535241355926)*x[2]
            ref[(0, 1, 1, 3)]=-0.418359486456
            arg[(0, 1, 2, 0)]=-0.928425847369*x[0] + (-0.101245999176)*x[1] + (-0.809081459694)*x[2]
            ref[(0, 1, 2, 0)]=-0.91937665312
            arg[(0, 1, 2, 1)]=-0.489734130613*x[0] + (0.0609826395424)*x[1] + (-0.196603018652)*x[2]
            ref[(0, 1, 2, 1)]=-0.312677254861
            arg[(0, 1, 2, 2)]=0.141796281662*x[0] + (-0.752434748048)*x[1] + (-0.238162586015)*x[2]
            ref[(0, 1, 2, 2)]=-0.424400526201
            arg[(0, 1, 2, 3)]=0.387551753937*x[0] + (-0.815733097121)*x[1] + (-0.695946870262)*x[2]
            ref[(0, 1, 2, 3)]=-0.562064106723
            arg[(0, 2, 0, 0)]=0.505231504586*x[0] + (-0.647278381732)*x[1] + (-0.247422489849)*x[2]
            ref[(0, 2, 0, 0)]=-0.194734683498
            arg[(0, 2, 0, 1)]=-0.491217387556*x[0] + (0.399847349779)*x[1] + (-0.0667722714675)*x[2]
            ref[(0, 2, 0, 1)]=-0.0790711546225
            arg[(0, 2, 0, 2)]=0.0104722379422*x[0] + (-0.192356334657)*x[1] + (0.150034627641)*x[2]
            ref[(0, 2, 0, 2)]=-0.0159247345368
            arg[(0, 2, 0, 3)]=0.446816422579*x[0] + (-0.370670723236)*x[1] + (0.30991279521)*x[2]
            ref[(0, 2, 0, 3)]=0.193029247277
            arg[(0, 2, 1, 0)]=-0.599540603496*x[0] + (0.667527979948)*x[1] + (0.328808439926)*x[2]
            ref[(0, 2, 1, 0)]=0.198397908189
            arg[(0, 2, 1, 1)]=0.124047585349*x[0] + (-0.823533217667)*x[1] + (-0.866486024648)*x[2]
            ref[(0, 2, 1, 1)]=-0.782985828483
            arg[(0, 2, 1, 2)]=0.200833106623*x[0] + (0.0505175713151)*x[1] + (-0.0090751545263)*x[2]
            ref[(0, 2, 1, 2)]=0.121137761706
            arg[(0, 2, 1, 3)]=-0.745858263649*x[0] + (-0.805624774841)*x[1] + (-0.887213158291)*x[2]
            ref[(0, 2, 1, 3)]=-1.21934809839
            arg[(0, 2, 2, 0)]=-0.650884340331*x[0] + (-0.639884271727)*x[1] + (0.821226759072)*x[2]
            ref[(0, 2, 2, 0)]=-0.234770926493
            arg[(0, 2, 2, 1)]=-0.185260814445*x[0] + (-0.135115780441)*x[1] + (0.118629114843)*x[2]
            ref[(0, 2, 2, 1)]=-0.100873740021
            arg[(0, 2, 2, 2)]=-0.505128323874*x[0] + (0.968902661043)*x[1] + (0.85550917491)*x[2]
            ref[(0, 2, 2, 2)]=0.659641756039
            arg[(0, 2, 2, 3)]=0.223124550989*x[0] + (0.684884363246)*x[1] + (-0.240601108142)*x[2]
            ref[(0, 2, 2, 3)]=0.333703903046
            arg[(1, 0, 0, 0)]=-0.56779959642*x[0] + (0.295592580915)*x[1] + (0.450387099904)*x[2]
            ref[(1, 0, 0, 0)]=0.0890900421995
            arg[(1, 0, 0, 1)]=0.402695814157*x[0] + (0.929412713461)*x[1] + (0.848884891961)*x[2]
            ref[(1, 0, 0, 1)]=1.09049670979
            arg[(1, 0, 0, 2)]=-0.343252657141*x[0] + (-0.592910398539)*x[1] + (-0.621682191376)*x[2]
            ref[(1, 0, 0, 2)]=-0.778922623528
            arg[(1, 0, 0, 3)]=-0.360724979541*x[0] + (0.287213781863)*x[1] + (-0.949189580149)*x[2]
            ref[(1, 0, 0, 3)]=-0.511350388913
            arg[(1, 0, 1, 0)]=0.664897055564*x[0] + (-0.172993432683)*x[1] + (-0.797697909034)*x[2]
            ref[(1, 0, 1, 0)]=-0.152897143076
            arg[(1, 0, 1, 1)]=0.884773036727*x[0] + (-0.330172169925)*x[1] + (0.795990050672)*x[2]
            ref[(1, 0, 1, 1)]=0.675295458737
            arg[(1, 0, 1, 2)]=0.836991112443*x[0] + (-0.31169069314)*x[1] + (0.997517358693)*x[2]
            ref[(1, 0, 1, 2)]=0.761408888998
            arg[(1, 0, 1, 3)]=0.749230388396*x[0] + (0.245713412543)*x[1] + (-0.874150319917)*x[2]
            ref[(1, 0, 1, 3)]=0.060396740511
            arg[(1, 0, 2, 0)]=0.950001390579*x[0] + (-0.190005542844)*x[1] + (-0.844251375162)*x[2]
            ref[(1, 0, 2, 0)]=-0.0421277637135
            arg[(1, 0, 2, 1)]=0.236697921552*x[0] + (0.358252050492)*x[1] + (0.870796235176)*x[2]
            ref[(1, 0, 2, 1)]=0.73287310361
            arg[(1, 0, 2, 2)]=-0.0299302980163*x[0] + (-0.853161314238)*x[1] + (0.908316750376)*x[2]
            ref[(1, 0, 2, 2)]=0.0126125690607
            arg[(1, 0, 2, 3)]=-0.278241113498*x[0] + (-0.0761591359851)*x[1] + (0.558767233067)*x[2]
            ref[(1, 0, 2, 3)]=0.102183491792
            arg[(1, 1, 0, 0)]=0.0673979946762*x[0] + (0.855337018856)*x[1] + (-0.264454266261)*x[2]
            ref[(1, 1, 0, 0)]=0.329140373636
            arg[(1, 1, 0, 1)]=0.820650369604*x[0] + (0.644260721382)*x[1] + (0.872054099569)*x[2]
            ref[(1, 1, 0, 1)]=1.16848259528
            arg[(1, 1, 0, 2)]=0.631626285477*x[0] + (-0.671041154232)*x[1] + (0.475284906633)*x[2]
            ref[(1, 1, 0, 2)]=0.217935018939
            arg[(1, 1, 0, 3)]=-0.26978281725*x[0] + (-0.974067720765)*x[1] + (0.259588186135)*x[2]
            ref[(1, 1, 0, 3)]=-0.49213117594
            arg[(1, 1, 1, 0)]=-0.130812171924*x[0] + (-0.779812147457)*x[1] + (-0.0424192662904)*x[2]
            ref[(1, 1, 1, 0)]=-0.476521792835
            arg[(1, 1, 1, 1)]=-0.144103384894*x[0] + (-0.197367955926)*x[1] + (0.138653654763)*x[2]
            ref[(1, 1, 1, 1)]=-0.101408843029
            arg[(1, 1, 1, 2)]=0.620333095561*x[0] + (0.114370501108)*x[1] + (0.278980855876)*x[2]
            ref[(1, 1, 1, 2)]=0.506842226273
            arg[(1, 1, 1, 3)]=-0.931186945208*x[0] + (-0.894811714856)*x[1] + (0.444563679851)*x[2]
            ref[(1, 1, 1, 3)]=-0.690717490107
            arg[(1, 1, 2, 0)]=0.265359244961*x[0] + (0.510795901596)*x[1] + (-0.968159958075)*x[2]
            ref[(1, 1, 2, 0)]=-0.0960024057588
            arg[(1, 1, 2, 1)]=-0.833536123933*x[0] + (0.97847387212)*x[1] + (0.145158141301)*x[2]
            ref[(1, 1, 2, 1)]=0.145047944744
            arg[(1, 1, 2, 2)]=0.972465590221*x[0] + (0.939717671569)*x[1] + (0.0679414259345)*x[2]
            ref[(1, 1, 2, 2)]=0.990062343863
            arg[(1, 1, 2, 3)]=-0.993447518591*x[0] + (0.278530191808)*x[1] + (-0.949855275076)*x[2]
            ref[(1, 1, 2, 3)]=-0.83238630093
            arg[(1, 2, 0, 0)]=0.395980251646*x[0] + (0.0876639160723)*x[1] + (0.472484073023)*x[2]
            ref[(1, 2, 0, 0)]=0.478064120371
            arg[(1, 2, 0, 1)]=-0.449726414784*x[0] + (-0.994893478635)*x[1] + (0.970590440282)*x[2]
            ref[(1, 2, 0, 1)]=-0.237014726568
            arg[(1, 2, 0, 2)]=-0.926207233036*x[0] + (0.383660375963)*x[1] + (0.169314580352)*x[2]
            ref[(1, 2, 0, 2)]=-0.186616138361
            arg[(1, 2, 0, 3)]=-0.190978059519*x[0] + (-0.591536452186)*x[1] + (-0.564428105941)*x[2]
            ref[(1, 2, 0, 3)]=-0.673471308823
            arg[(1, 2, 1, 0)]=0.0339564859016*x[0] + (-0.416544977156)*x[1] + (-0.538295631975)*x[2]
            ref[(1, 2, 1, 0)]=-0.460442061614
            arg[(1, 2, 1, 1)]=-0.153744163402*x[0] + (-0.743298876339)*x[1] + (-0.547437076644)*x[2]
            ref[(1, 2, 1, 1)]=-0.722240058193
            arg[(1, 2, 1, 2)]=0.0405252531731*x[0] + (0.811644756216)*x[1] + (-0.652403861234)*x[2]
            ref[(1, 2, 1, 2)]=0.0998830740778
            arg[(1, 2, 1, 3)]=-0.116115889306*x[0] + (0.479324055043)*x[1] + (-0.322903544339)*x[2]
            ref[(1, 2, 1, 3)]=0.0201523106988
            arg[(1, 2, 2, 0)]=0.541513335342*x[0] + (-0.599508815199)*x[1] + (0.331409432325)*x[2]
            ref[(1, 2, 2, 0)]=0.136706976234
            arg[(1, 2, 2, 1)]=-0.202396238933*x[0] + (-0.973224179838)*x[1] + (-0.753221055998)*x[2]
            ref[(1, 2, 2, 1)]=-0.964420737385
            arg[(1, 2, 2, 2)]=-0.931369298696*x[0] + (0.967160967882)*x[1] + (-0.396292295962)*x[2]
            ref[(1, 2, 2, 2)]=-0.180250313387
            arg[(1, 2, 2, 3)]=-0.267096439775*x[0] + (0.625477908665)*x[1] + (-0.618428034113)*x[2]
            ref[(1, 2, 2, 3)]=-0.130023282612
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.71935036346*x[0]**o + (0.294561852586)*x[0] + (-0.933055636371)*x[1]**o + (0.512746446882)*x[1]
            ref=-0.933055636371/(o+1.)+(0.403654149734)+(0.71935036346)*0.5**o
        else:
            arg=0.485761296666*x[0]**o + (-0.53405996614)*x[0] + (0.249086142221)*x[1]**o + (0.80661097036)*x[1] + (0.523120104261)*x[2]**o + (-0.558651621666)*x[2]
            ref=0.772206246481/(o+1.)+(-0.143050308723)+(0.485761296666)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.90423764777*x[0]**o + (0.553170117821)*x[0] + (0.948904081445)*x[1]**o + (0.52134197571)*x[1]
            ref[(0,)]=0.948904081445/(o+1.)+(0.537256046765)+(0.90423764777)*0.5**o
            arg[(1,)]=0.362493943948*x[0]**o + (-0.549334521971)*x[0] + (0.451580135067)*x[1]**o + (-0.335421168646)*x[1]
            ref[(1,)]=0.451580135067/(o+1.)+(-0.442377845309)+(0.362493943948)*0.5**o
            arg[(2,)]=0.856722799403*x[0]**o + (0.641458409363)*x[0] + (-0.996812210484)*x[1]**o + (-0.781668059835)*x[1]
            ref[(2,)]=-0.996812210484/(o+1.)+(-0.0701048252359)+(0.856722799403)*0.5**o
        else:
            arg[(0,)]=0.536441206779*x[0]**o + (0.966629464295)*x[0] + (0.854855909061)*x[1]**o + (-0.571344307765)*x[1] + (-0.327528519759)*x[2]**o + (0.411885621334)*x[2]
            ref[(0,)]=0.527327389303/(o+1.)+(0.403585388932)+(0.536441206779)*0.5**o
            arg[(1,)]=0.584033101912*x[0]**o + (0.18611125605)*x[0] + (0.380148821717)*x[1]**o + (0.303860087365)*x[1] + (-0.431197257054)*x[2]**o + (-0.548554017981)*x[2]
            ref[(1,)]=-0.051048435337/(o+1.)+(-0.0292913372829)+(0.584033101912)*0.5**o
            arg[(2,)]=0.820846772965*x[0]**o + (-0.695666149361)*x[0] + (0.84856630248)*x[1]**o + (-0.330023855281)*x[1] + (0.954001922534)*x[2]**o + (0.172618892017)*x[2]
            ref[(2,)]=1.80256822501/(o+1.)+(-0.426535556312)+(0.820846772965)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.424434470141*x[0]**o + (-0.593802230351)*x[0] + (0.324906465389)*x[1]**o + (-0.630731926103)*x[1]
            ref[(0, 0)]=0.324906465389/(o+1.)+(-0.612267078227)+(0.424434470141)*0.5**o
            arg[(0, 1)]=0.486988482552*x[0]**o + (-0.631618321275)*x[0] + (0.897005289071)*x[1]**o + (-0.562397948845)*x[1]
            ref[(0, 1)]=0.897005289071/(o+1.)+(-0.59700813506)+(0.486988482552)*0.5**o
            arg[(1, 0)]=0.930629915623*x[0]**o + (0.450604164345)*x[0] + (-0.161959314021)*x[1]**o + (-0.275948242839)*x[1]
            ref[(1, 0)]=-0.161959314021/(o+1.)+(0.0873279607531)+(0.930629915623)*0.5**o
            arg[(1, 1)]=0.890740379416*x[0]**o + (-0.345571228481)*x[0] + (0.393930312278)*x[1]**o + (0.910093974146)*x[1]
            ref[(1, 1)]=0.393930312278/(o+1.)+(0.282261372833)+(0.890740379416)*0.5**o
        else:
            arg[(0, 0)]=0.0508175758832*x[0]**o + (-0.260657244913)*x[0] + (-0.763773906481)*x[1]**o + (-0.477365106933)*x[1] + (-0.19966666216)*x[2]**o + (0.0226854955424)*x[2]
            ref[(0, 0)]=-0.963440568641/(o+1.)+(-0.357668428152)+(0.0508175758832)*0.5**o
            arg[(0, 1)]=-0.618370565634*x[0]**o + (-0.636788403199)*x[0] + (-0.721957564827)*x[1]**o + (-0.0922784650839)*x[1] + (-0.0138875152128)*x[2]**o + (0.938285993929)*x[2]
            ref[(0, 1)]=-0.73584508004/(o+1.)+(0.104609562823)+(-0.618370565634)*0.5**o
            arg[(1, 0)]=-0.418040114939*x[0]**o + (-0.132861782569)*x[0] + (-0.624002667414)*x[1]**o + (0.0339224655152)*x[1] + (0.611599281329)*x[2]**o + (0.180850859877)*x[2]
            ref[(1, 0)]=-0.0124033860849/(o+1.)+(0.0409557714113)+(-0.418040114939)*0.5**o
            arg[(1, 1)]=-0.750929247957*x[0]**o + (0.244647532227)*x[0] + (0.054788780227)*x[1]**o + (0.826797318153)*x[1] + (0.47081303162)*x[2]**o + (0.169841432564)*x[2]
            ref[(1, 1)]=0.525601811847/(o+1.)+(0.620643141472)+(-0.750929247957)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref=numpy.zeros((3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.488823615884*x[0]**o + (-0.626557332439)*x[0] + (0.180424460416)*x[1]**o + (0.643557347655)*x[1]
            ref[(0, 0, 0)]=0.180424460416/(o+1.)+(0.00850000760794)+(0.488823615884)*0.5**o
            arg[(0, 0, 1)]=-0.793875731259*x[0]**o + (-0.908744853662)*x[0] + (-0.820854058139)*x[1]**o + (-0.792110483633)*x[1]
            ref[(0, 0, 1)]=-0.820854058139/(o+1.)+(-0.850427668647)+(-0.793875731259)*0.5**o
            arg[(0, 1, 0)]=0.715724822543*x[0]**o + (0.665160470171)*x[0] + (0.507885651184)*x[1]**o + (-0.397044692719)*x[1]
            ref[(0, 1, 0)]=0.507885651184/(o+1.)+(0.134057888726)+(0.715724822543)*0.5**o
            arg[(0, 1, 1)]=0.396288093355*x[0]**o + (0.502384320759)*x[0] + (0.365026144614)*x[1]**o + (-0.145833232859)*x[1]
            ref[(0, 1, 1)]=0.365026144614/(o+1.)+(0.17827554395)+(0.396288093355)*0.5**o
            arg[(0, 2, 0)]=0.669149825833*x[0]**o + (-0.632648731301)*x[0] + (0.0102706759124)*x[1]**o + (-0.919575552328)*x[1]
            ref[(0, 2, 0)]=0.0102706759124/(o+1.)+(-0.776112141814)+(0.669149825833)*0.5**o
            arg[(0, 2, 1)]=-0.102272003127*x[0]**o + (-0.06926032128)*x[0] + (-0.299876169797)*x[1]**o + (0.691911992206)*x[1]
            ref[(0, 2, 1)]=-0.299876169797/(o+1.)+(0.311325835463)+(-0.102272003127)*0.5**o
            arg[(1, 0, 0)]=0.483150681524*x[0]**o + (0.846357855212)*x[0] + (0.619802208053)*x[1]**o + (0.177077130325)*x[1]
            ref[(1, 0, 0)]=0.619802208053/(o+1.)+(0.511717492769)+(0.483150681524)*0.5**o
            arg[(1, 0, 1)]=0.282023187832*x[0]**o + (0.0890685393606)*x[0] + (-0.00617997175389)*x[1]**o + (-0.0774289141797)*x[1]
            ref[(1, 0, 1)]=-0.00617997175389/(o+1.)+(0.00581981259042)+(0.282023187832)*0.5**o
            arg[(1, 1, 0)]=-0.449077037534*x[0]**o + (-0.406974451805)*x[0] + (-0.771967071854)*x[1]**o + (0.184228029071)*x[1]
            ref[(1, 1, 0)]=-0.771967071854/(o+1.)+(-0.111373211367)+(-0.449077037534)*0.5**o
            arg[(1, 1, 1)]=-0.968597646191*x[0]**o + (0.48153177611)*x[0] + (-0.832236969211)*x[1]**o + (-0.919080270035)*x[1]
            ref[(1, 1, 1)]=-0.832236969211/(o+1.)+(-0.218774246963)+(-0.968597646191)*0.5**o
            arg[(1, 2, 0)]=-0.76884909988*x[0]**o + (0.70954935586)*x[0] + (0.180014803631)*x[1]**o + (0.333143682406)*x[1]
            ref[(1, 2, 0)]=0.180014803631/(o+1.)+(0.521346519133)+(-0.76884909988)*0.5**o
            arg[(1, 2, 1)]=-0.809277636089*x[0]**o + (0.407448526621)*x[0] + (0.531562594923)*x[1]**o + (0.945856591851)*x[1]
            ref[(1, 2, 1)]=0.531562594923/(o+1.)+(0.676652559236)+(-0.809277636089)*0.5**o
            arg[(2, 0, 0)]=0.0658402052933*x[0]**o + (-0.359644597152)*x[0] + (0.624639863532)*x[1]**o + (-0.591056244835)*x[1]
            ref[(2, 0, 0)]=0.624639863532/(o+1.)+(-0.475350420994)+(0.0658402052933)*0.5**o
            arg[(2, 0, 1)]=0.165946609666*x[0]**o + (-0.993800442118)*x[0] + (-0.31344581502)*x[1]**o + (0.977025440134)*x[1]
            ref[(2, 0, 1)]=-0.31344581502/(o+1.)+(-0.00838750099208)+(0.165946609666)*0.5**o
            arg[(2, 1, 0)]=0.888586353321*x[0]**o + (-0.513963446797)*x[0] + (-0.405025647297)*x[1]**o + (-0.033238266153)*x[1]
            ref[(2, 1, 0)]=-0.405025647297/(o+1.)+(-0.273600856475)+(0.888586353321)*0.5**o
            arg[(2, 1, 1)]=-0.895843816531*x[0]**o + (-0.275973044473)*x[0] + (0.0381170029351)*x[1]**o + (-0.35497174805)*x[1]
            ref[(2, 1, 1)]=0.0381170029351/(o+1.)+(-0.315472396261)+(-0.895843816531)*0.5**o
            arg[(2, 2, 0)]=0.835267971159*x[0]**o + (0.478522043555)*x[0] + (-0.764997604874)*x[1]**o + (-0.0259015171848)*x[1]
            ref[(2, 2, 0)]=-0.764997604874/(o+1.)+(0.226310263185)+(0.835267971159)*0.5**o
            arg[(2, 2, 1)]=0.663509542299*x[0]**o + (-0.544479034506)*x[0] + (-0.867422417925)*x[1]**o + (0.808294568113)*x[1]
            ref[(2, 2, 1)]=-0.867422417925/(o+1.)+(0.131907766803)+(0.663509542299)*0.5**o
        else:
            arg[(0, 0, 0)]=-0.278666930293*x[0]**o + (-0.930067051052)*x[0] + (-0.113474060598)*x[1]**o + (-0.675646052073)*x[1] + (-0.985262318885)*x[2]**o + (0.149649595866)*x[2]
            ref[(0, 0, 0)]=-1.09873637948/(o+1.)+(-0.72803175363)+(-0.278666930293)*0.5**o
            arg[(0, 0, 1)]=-0.254604881848*x[0]**o + (-0.0126597987726)*x[0] + (0.482560856521)*x[1]**o + (0.870166680251)*x[1] + (0.758024552291)*x[2]**o + (-0.193399373783)*x[2]
            ref[(0, 0, 1)]=1.24058540881/(o+1.)+(0.332053753847)+(-0.254604881848)*0.5**o
            arg[(0, 1, 0)]=0.528748243726*x[0]**o + (-0.276935448528)*x[0] + (0.274186360364)*x[1]**o + (-0.35836480021)*x[1] + (0.306568230694)*x[2]**o + (-0.328808657794)*x[2]
            ref[(0, 1, 0)]=0.580754591057/(o+1.)+(-0.482054453266)+(0.528748243726)*0.5**o
            arg[(0, 1, 1)]=-0.177073849996*x[0]**o + (0.304068220685)*x[0] + (-0.592799377785)*x[1]**o + (-0.125343725551)*x[1] + (-0.757986233749)*x[2]**o + (-0.95697583606)*x[2]
            ref[(0, 1, 1)]=-1.35078561153/(o+1.)+(-0.389125670463)+(-0.177073849996)*0.5**o
            arg[(0, 2, 0)]=0.550477377617*x[0]**o + (-0.153163769218)*x[0] + (-0.217870033702)*x[1]**o + (-0.308640020113)*x[1] + (0.0154819725303)*x[2]**o + (0.914887491023)*x[2]
            ref[(0, 2, 0)]=-0.202388061172/(o+1.)+(0.226541850846)+(0.550477377617)*0.5**o
            arg[(0, 2, 1)]=0.93757894345*x[0]**o + (-0.725013200348)*x[0] + (-0.79880944263)*x[1]**o + (0.616804018984)*x[1] + (0.744231589636)*x[2]**o + (-0.727623365139)*x[2]
            ref[(0, 2, 1)]=-0.0545778529942/(o+1.)+(-0.417916273251)+(0.93757894345)*0.5**o
            arg[(1, 0, 0)]=0.259360161381*x[0]**o + (0.308253827477)*x[0] + (-0.0371820435167)*x[1]**o + (0.666707430232)*x[1] + (-0.0949960645427)*x[2]**o + (-0.366348009951)*x[2]
            ref[(1, 0, 0)]=-0.132178108059/(o+1.)+(0.304306623879)+(0.259360161381)*0.5**o
            arg[(1, 0, 1)]=0.0635423300784*x[0]**o + (0.562840564473)*x[0] + (0.972637495946)*x[1]**o + (0.808887168876)*x[1] + (-0.49448601322)*x[2]**o + (-0.264499143308)*x[2]
            ref[(1, 0, 1)]=0.478151482725/(o+1.)+(0.55361429502)+(0.0635423300784)*0.5**o
            arg[(1, 1, 0)]=0.116208795955*x[0]**o + (0.0321668392043)*x[0] + (0.237399635947)*x[1]**o + (-0.146695501332)*x[1] + (0.794690302476)*x[2]**o + (0.934373897353)*x[2]
            ref[(1, 1, 0)]=1.03208993842/(o+1.)+(0.409922617613)+(0.116208795955)*0.5**o
            arg[(1, 1, 1)]=0.0316389623791*x[0]**o + (-0.398137398161)*x[0] + (0.761709158035)*x[1]**o + (0.0517219592145)*x[1] + (-0.927332614496)*x[2]**o + (-0.916660024818)*x[2]
            ref[(1, 1, 1)]=-0.165623456461/(o+1.)+(-0.631537731883)+(0.0316389623791)*0.5**o
            arg[(1, 2, 0)]=0.564514803915*x[0]**o + (-0.101670845829)*x[0] + (-0.36453258155)*x[1]**o + (-0.531278910171)*x[1] + (-0.140352879851)*x[2]**o + (0.0432505584073)*x[2]
            ref[(1, 2, 0)]=-0.504885461401/(o+1.)+(-0.294849598796)+(0.564514803915)*0.5**o
            arg[(1, 2, 1)]=0.137442694962*x[0]**o + (0.260745211717)*x[0] + (-0.378585317937)*x[1]**o + (-0.474597597367)*x[1] + (0.610748035884)*x[2]**o + (-0.309779156618)*x[2]
            ref[(1, 2, 1)]=0.232162717947/(o+1.)+(-0.261815771134)+(0.137442694962)*0.5**o
            arg[(2, 0, 0)]=0.123229436996*x[0]**o + (0.0112757217255)*x[0] + (-0.831543956802)*x[1]**o + (0.0030909742869)*x[1] + (-0.920656465131)*x[2]**o + (0.980046744922)*x[2]
            ref[(2, 0, 0)]=-1.75220042193/(o+1.)+(0.497206720467)+(0.123229436996)*0.5**o
            arg[(2, 0, 1)]=-0.305984398973*x[0]**o + (-0.331544461809)*x[0] + (-0.726355115253)*x[1]**o + (0.737923598222)*x[1] + (-0.113917173149)*x[2]**o + (-0.0934597777622)*x[2]
            ref[(2, 0, 1)]=-0.840272288401/(o+1.)+(0.156459679325)+(-0.305984398973)*0.5**o
            arg[(2, 1, 0)]=0.791872432312*x[0]**o + (0.271020611672)*x[0] + (0.432019281358)*x[1]**o + (-0.567469883461)*x[1] + (0.761825864282)*x[2]**o + (0.568474396207)*x[2]
            ref[(2, 1, 0)]=1.19384514564/(o+1.)+(0.136012562209)+(0.791872432312)*0.5**o
            arg[(2, 1, 1)]=0.146757158692*x[0]**o + (-0.786213727909)*x[0] + (0.400274043633)*x[1]**o + (0.792864722863)*x[1] + (-0.893192844561)*x[2]**o + (0.99587117392)*x[2]
            ref[(2, 1, 1)]=-0.492918800928/(o+1.)+(0.501261084437)+(0.146757158692)*0.5**o
            arg[(2, 2, 0)]=0.415653387059*x[0]**o + (-0.0479121777978)*x[0] + (0.921188516716)*x[1]**o + (-0.867003105406)*x[1] + (0.877157127227)*x[2]**o + (0.697204393316)*x[2]
            ref[(2, 2, 0)]=1.79834564394/(o+1.)+(-0.108855444944)+(0.415653387059)*0.5**o
            arg[(2, 2, 1)]=0.840137302099*x[0]**o + (0.833040448019)*x[0] + (0.62311547639)*x[1]**o + (-0.855818548327)*x[1] + (-0.300885520829)*x[2]**o + (0.350377148964)*x[2]
            ref[(2, 2, 1)]=0.322229955561/(o+1.)+(0.163799524328)+(0.840137302099)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactZero_fromData_FunctionOnContactZero_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactZero

        assumptions: FunctionOnContactZero(self.domain) exists
                     self.domain supports integral on FunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactZero(self.domain)
        w = FunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4, 4),w)
        ref=numpy.zeros((2, 2, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.837440207862*x[0]**o + (-0.355856657443)*x[0] + (0.131293999405)*x[1]**o + (0.547207670912)*x[1]
            ref[(0, 0, 0, 0)]=0.131293999405/(o+1.)+(0.0956755067345)+(-0.837440207862)*0.5**o
            arg[(0, 0, 0, 1)]=-0.411616627284*x[0]**o + (-0.62665497428)*x[0] + (-0.247076223877)*x[1]**o + (0.90364643777)*x[1]
            ref[(0, 0, 0, 1)]=-0.247076223877/(o+1.)+(0.138495731745)+(-0.411616627284)*0.5**o
            arg[(0, 0, 0, 2)]=0.123483379517*x[0]**o + (0.764581976393)*x[0] + (0.871632063785)*x[1]**o + (0.1957740712)*x[1]
            ref[(0, 0, 0, 2)]=0.871632063785/(o+1.)+(0.480178023796)+(0.123483379517)*0.5**o
            arg[(0, 0, 0, 3)]=-0.359772097659*x[0]**o + (0.938692696735)*x[0] + (-0.0882931533655)*x[1]**o + (0.142373948158)*x[1]
            ref[(0, 0, 0, 3)]=-0.0882931533655/(o+1.)+(0.540533322447)+(-0.359772097659)*0.5**o
            arg[(0, 0, 1, 0)]=0.949100997186*x[0]**o + (-0.468653410716)*x[0] + (-0.24452955917)*x[1]**o + (-0.151125816717)*x[1]
            ref[(0, 0, 1, 0)]=-0.24452955917/(o+1.)+(-0.309889613716)+(0.949100997186)*0.5**o
            arg[(0, 0, 1, 1)]=-0.68169731685*x[0]**o + (0.542961859178)*x[0] + (-0.46790270102)*x[1]**o + (-0.972973885484)*x[1]
            ref[(0, 0, 1, 1)]=-0.46790270102/(o+1.)+(-0.215006013153)+(-0.68169731685)*0.5**o
            arg[(0, 0, 1, 2)]=-0.0915410382012*x[0]**o + (-0.597128621285)*x[0] + (0.890811243856)*x[1]**o + (-0.823914065402)*x[1]
            ref[(0, 0, 1, 2)]=0.890811243856/(o+1.)+(-0.710521343344)+(-0.0915410382012)*0.5**o
            arg[(0, 0, 1, 3)]=-0.942067257984*x[0]**o + (0.398273128287)*x[0] + (0.777761835059)*x[1]**o + (-0.455175986737)*x[1]
            ref[(0, 0, 1, 3)]=0.777761835059/(o+1.)+(-0.0284514292251)+(-0.942067257984)*0.5**o
            arg[(0, 0, 2, 0)]=0.0842934870582*x[0]**o + (0.849281243977)*x[0] + (-0.326788661209)*x[1]**o + (0.630513046589)*x[1]
            ref[(0, 0, 2, 0)]=-0.326788661209/(o+1.)+(0.739897145283)+(0.0842934870582)*0.5**o
            arg[(0, 0, 2, 1)]=0.345230992761*x[0]**o + (0.281930437916)*x[0] + (0.347955921623)*x[1]**o + (0.569661802349)*x[1]
            ref[(0, 0, 2, 1)]=0.347955921623/(o+1.)+(0.425796120133)+(0.345230992761)*0.5**o
            arg[(0, 0, 2, 2)]=-0.284718667111*x[0]**o + (-0.560267012294)*x[0] + (0.686460306227)*x[1]**o + (-0.288895629549)*x[1]
            ref[(0, 0, 2, 2)]=0.686460306227/(o+1.)+(-0.424581320921)+(-0.284718667111)*0.5**o
            arg[(0, 0, 2, 3)]=0.858151171665*x[0]**o + (-0.394301736867)*x[0] + (0.632846783295)*x[1]**o + (-0.964202166845)*x[1]
            ref[(0, 0, 2, 3)]=0.632846783295/(o+1.)+(-0.679251951856)+(0.858151171665)*0.5**o
            arg[(0, 0, 3, 0)]=0.825810242592*x[0]**o + (-0.275489247481)*x[0] + (-0.581675334277)*x[1]**o + (0.88932483982)*x[1]
            ref[(0, 0, 3, 0)]=-0.581675334277/(o+1.)+(0.30691779617)+(0.825810242592)*0.5**o
            arg[(0, 0, 3, 1)]=-0.533917376362*x[0]**o + (-0.726241948814)*x[0] + (-0.825157774233)*x[1]**o + (0.45245590468)*x[1]
            ref[(0, 0, 3, 1)]=-0.825157774233/(o+1.)+(-0.136893022067)+(-0.533917376362)*0.5**o
            arg[(0, 0, 3, 2)]=-0.0416508176597*x[0]**o + (0.0271304199232)*x[0] + (-0.810694735758)*x[1]**o + (0.649205550733)*x[1]
            ref[(0, 0, 3, 2)]=-0.810694735758/(o+1.)+(0.338167985328)+(-0.0416508176597)*0.5**o
            arg[(0, 0, 3, 3)]=-0.18337751078*x[0]**o + (0.800508421594)*x[0] + (0.0560296759365)*x[1]**o + (-0.577473079535)*x[1]
            ref[(0, 0, 3, 3)]=0.0560296759365/(o+1.)+(0.11151767103)+(-0.18337751078)*0.5**o
            arg[(0, 1, 0, 0)]=0.260672117487*x[0]**o + (0.566917498474)*x[0] + (0.905749786635)*x[1]**o + (-0.80348541272)*x[1]
            ref[(0, 1, 0, 0)]=0.905749786635/(o+1.)+(-0.118283957123)+(0.260672117487)*0.5**o
            arg[(0, 1, 0, 1)]=-0.915861205018*x[0]**o + (0.511343612288)*x[0] + (-0.271592766975)*x[1]**o + (0.212096155444)*x[1]
            ref[(0, 1, 0, 1)]=-0.271592766975/(o+1.)+(0.361719883866)+(-0.915861205018)*0.5**o
            arg[(0, 1, 0, 2)]=0.402862330302*x[0]**o + (0.651185371617)*x[0] + (-0.972241142041)*x[1]**o + (0.408710168807)*x[1]
            ref[(0, 1, 0, 2)]=-0.972241142041/(o+1.)+(0.529947770212)+(0.402862330302)*0.5**o
            arg[(0, 1, 0, 3)]=-0.959409318224*x[0]**o + (0.982185643718)*x[0] + (0.830244474743)*x[1]**o + (-0.528812978878)*x[1]
            ref[(0, 1, 0, 3)]=0.830244474743/(o+1.)+(0.22668633242)+(-0.959409318224)*0.5**o
            arg[(0, 1, 1, 0)]=-0.399520769539*x[0]**o + (-0.972724520501)*x[0] + (0.945762686257)*x[1]**o + (-0.933417383232)*x[1]
            ref[(0, 1, 1, 0)]=0.945762686257/(o+1.)+(-0.953070951867)+(-0.399520769539)*0.5**o
            arg[(0, 1, 1, 1)]=-0.145780982702*x[0]**o + (-0.365083879245)*x[0] + (0.70028082405)*x[1]**o + (-0.59148080428)*x[1]
            ref[(0, 1, 1, 1)]=0.70028082405/(o+1.)+(-0.478282341762)+(-0.145780982702)*0.5**o
            arg[(0, 1, 1, 2)]=-0.853510690911*x[0]**o + (0.453198428029)*x[0] + (-0.690511536599)*x[1]**o + (0.502868762085)*x[1]
            ref[(0, 1, 1, 2)]=-0.690511536599/(o+1.)+(0.478033595057)+(-0.853510690911)*0.5**o
            arg[(0, 1, 1, 3)]=-0.771829146604*x[0]**o + (0.497242670843)*x[0] + (-0.459455290824)*x[1]**o + (0.59095227707)*x[1]
            ref[(0, 1, 1, 3)]=-0.459455290824/(o+1.)+(0.544097473957)+(-0.771829146604)*0.5**o
            arg[(0, 1, 2, 0)]=-0.477236882631*x[0]**o + (-0.36286849619)*x[0] + (-0.96748045649)*x[1]**o + (0.77710831314)*x[1]
            ref[(0, 1, 2, 0)]=-0.96748045649/(o+1.)+(0.207119908475)+(-0.477236882631)*0.5**o
            arg[(0, 1, 2, 1)]=-0.483196758414*x[0]**o + (0.852893474321)*x[0] + (0.377703820398)*x[1]**o + (0.504051813473)*x[1]
            ref[(0, 1, 2, 1)]=0.377703820398/(o+1.)+(0.678472643897)+(-0.483196758414)*0.5**o
            arg[(0, 1, 2, 2)]=-0.226089797608*x[0]**o + (-0.571394761723)*x[0] + (-0.591945907353)*x[1]**o + (0.895538295557)*x[1]
            ref[(0, 1, 2, 2)]=-0.591945907353/(o+1.)+(0.162071766917)+(-0.226089797608)*0.5**o
            arg[(0, 1, 2, 3)]=-0.70863652797*x[0]**o + (-0.440113542638)*x[0] + (-0.00915156971992)*x[1]**o + (0.035485293979)*x[1]
            ref[(0, 1, 2, 3)]=-0.00915156971992/(o+1.)+(-0.202314124329)+(-0.70863652797)*0.5**o
            arg[(0, 1, 3, 0)]=0.899908654596*x[0]**o + (-0.112961872748)*x[0] + (-0.780719369953)*x[1]**o + (0.419474164001)*x[1]
            ref[(0, 1, 3, 0)]=-0.780719369953/(o+1.)+(0.153256145626)+(0.899908654596)*0.5**o
            arg[(0, 1, 3, 1)]=0.0932124408016*x[0]**o + (-0.350547591945)*x[0] + (-0.0961801695916)*x[1]**o + (-0.079584437483)*x[1]
            ref[(0, 1, 3, 1)]=-0.0961801695916/(o+1.)+(-0.215066014714)+(0.0932124408016)*0.5**o
            arg[(0, 1, 3, 2)]=-0.782166478807*x[0]**o + (0.685707805302)*x[0] + (0.793512970438)*x[1]**o + (-0.324396063382)*x[1]
            ref[(0, 1, 3, 2)]=0.793512970438/(o+1.)+(0.18065587096)+(-0.782166478807)*0.5**o
            arg[(0, 1, 3, 3)]=0.210159332018*x[0]**o + (-0.9946234651)*x[0] + (0.870368657065)*x[1]**o + (0.260605837617)*x[1]
            ref[(0, 1, 3, 3)]=0.870368657065/(o+1.)+(-0.367008813741)+(0.210159332018)*0.5**o
            arg[(1, 0, 0, 0)]=-0.719578073035*x[0]**o + (-0.423189825444)*x[0] + (0.315740657085)*x[1]**o + (-0.734794120476)*x[1]
            ref[(1, 0, 0, 0)]=0.315740657085/(o+1.)+(-0.57899197296)+(-0.719578073035)*0.5**o
            arg[(1, 0, 0, 1)]=0.908248535438*x[0]**o + (-0.124580823808)*x[0] + (0.0192476649196)*x[1]**o + (-0.233159668091)*x[1]
            ref[(1, 0, 0, 1)]=0.0192476649196/(o+1.)+(-0.17887024595)+(0.908248535438)*0.5**o
            arg[(1, 0, 0, 2)]=-0.185698734494*x[0]**o + (0.559536311934)*x[0] + (0.861704871482)*x[1]**o + (-0.633969856321)*x[1]
            ref[(1, 0, 0, 2)]=0.861704871482/(o+1.)+(-0.0372167721935)+(-0.185698734494)*0.5**o
            arg[(1, 0, 0, 3)]=0.567364561994*x[0]**o + (0.825774196408)*x[0] + (0.736448916493)*x[1]**o + (-0.331838915847)*x[1]
            ref[(1, 0, 0, 3)]=0.736448916493/(o+1.)+(0.246967640281)+(0.567364561994)*0.5**o
            arg[(1, 0, 1, 0)]=-0.55606791414*x[0]**o + (0.466550822815)*x[0] + (0.168520016691)*x[1]**o + (-0.407544579939)*x[1]
            ref[(1, 0, 1, 0)]=0.168520016691/(o+1.)+(0.0295031214383)+(-0.55606791414)*0.5**o
            arg[(1, 0, 1, 1)]=-0.788274477829*x[0]**o + (0.18863638546)*x[0] + (0.583448405652)*x[1]**o + (0.25206768792)*x[1]
            ref[(1, 0, 1, 1)]=0.583448405652/(o+1.)+(0.22035203669)+(-0.788274477829)*0.5**o
            arg[(1, 0, 1, 2)]=-0.307838519391*x[0]**o + (-0.182358411373)*x[0] + (-0.342875681786)*x[1]**o + (-0.338338211121)*x[1]
            ref[(1, 0, 1, 2)]=-0.342875681786/(o+1.)+(-0.260348311247)+(-0.307838519391)*0.5**o
            arg[(1, 0, 1, 3)]=-0.488989196937*x[0]**o + (-0.0895058042767)*x[0] + (-0.611638501908)*x[1]**o + (-0.348430459568)*x[1]
            ref[(1, 0, 1, 3)]=-0.611638501908/(o+1.)+(-0.218968131922)+(-0.488989196937)*0.5**o
            arg[(1, 0, 2, 0)]=-0.22344498497*x[0]**o + (0.126787980848)*x[0] + (0.178925847277)*x[1]**o + (-0.565435952919)*x[1]
            ref[(1, 0, 2, 0)]=0.178925847277/(o+1.)+(-0.219323986035)+(-0.22344498497)*0.5**o
            arg[(1, 0, 2, 1)]=0.183928995736*x[0]**o + (0.100795073994)*x[0] + (-0.877453738528)*x[1]**o + (0.657284582624)*x[1]
            ref[(1, 0, 2, 1)]=-0.877453738528/(o+1.)+(0.379039828309)+(0.183928995736)*0.5**o
            arg[(1, 0, 2, 2)]=-0.596277360727*x[0]**o + (-0.652519553925)*x[0] + (-0.550408279033)*x[1]**o + (-0.279576381307)*x[1]
            ref[(1, 0, 2, 2)]=-0.550408279033/(o+1.)+(-0.466047967616)+(-0.596277360727)*0.5**o
            arg[(1, 0, 2, 3)]=0.717053271038*x[0]**o + (0.0937190624881)*x[0] + (-0.913661219932)*x[1]**o + (0.24649468729)*x[1]
            ref[(1, 0, 2, 3)]=-0.913661219932/(o+1.)+(0.170106874889)+(0.717053271038)*0.5**o
            arg[(1, 0, 3, 0)]=-0.00575848283689*x[0]**o + (0.0760537231078)*x[0] + (-0.639811960294)*x[1]**o + (0.15195925819)*x[1]
            ref[(1, 0, 3, 0)]=-0.639811960294/(o+1.)+(0.114006490649)+(-0.00575848283689)*0.5**o
            arg[(1, 0, 3, 1)]=0.0452438192134*x[0]**o + (0.791582775051)*x[0] + (-0.734931029659)*x[1]**o + (0.999345954631)*x[1]
            ref[(1, 0, 3, 1)]=-0.734931029659/(o+1.)+(0.895464364841)+(0.0452438192134)*0.5**o
            arg[(1, 0, 3, 2)]=0.714520295272*x[0]**o + (-0.519671386328)*x[0] + (0.73532035988)*x[1]**o + (0.321808158513)*x[1]
            ref[(1, 0, 3, 2)]=0.73532035988/(o+1.)+(-0.0989316139075)+(0.714520295272)*0.5**o
            arg[(1, 0, 3, 3)]=-0.671663879319*x[0]**o + (0.916341087574)*x[0] + (0.582269643266)*x[1]**o + (0.52724042748)*x[1]
            ref[(1, 0, 3, 3)]=0.582269643266/(o+1.)+(0.721790757527)+(-0.671663879319)*0.5**o
            arg[(1, 1, 0, 0)]=-0.798325711814*x[0]**o + (-0.470944696518)*x[0] + (-0.652723714978)*x[1]**o + (0.614629508541)*x[1]
            ref[(1, 1, 0, 0)]=-0.652723714978/(o+1.)+(0.0718424060117)+(-0.798325711814)*0.5**o
            arg[(1, 1, 0, 1)]=0.670079435675*x[0]**o + (0.000772591156124)*x[0] + (0.792730868231)*x[1]**o + (0.215064830814)*x[1]
            ref[(1, 1, 0, 1)]=0.792730868231/(o+1.)+(0.107918710985)+(0.670079435675)*0.5**o
            arg[(1, 1, 0, 2)]=-0.308189747648*x[0]**o + (-0.601702553606)*x[0] + (0.765638537406)*x[1]**o + (0.790266898196)*x[1]
            ref[(1, 1, 0, 2)]=0.765638537406/(o+1.)+(0.0942821722955)+(-0.308189747648)*0.5**o
            arg[(1, 1, 0, 3)]=0.419269406274*x[0]**o + (0.854748495571)*x[0] + (0.740555568266)*x[1]**o + (-0.881594936275)*x[1]
            ref[(1, 1, 0, 3)]=0.740555568266/(o+1.)+(-0.0134232203522)+(0.419269406274)*0.5**o
            arg[(1, 1, 1, 0)]=-0.986269463072*x[0]**o + (0.862463935318)*x[0] + (-0.758956542177)*x[1]**o + (-0.353097755537)*x[1]
            ref[(1, 1, 1, 0)]=-0.758956542177/(o+1.)+(0.254683089891)+(-0.986269463072)*0.5**o
            arg[(1, 1, 1, 1)]=0.715549790661*x[0]**o + (-0.925026428142)*x[0] + (0.952156511499)*x[1]**o + (0.911076643139)*x[1]
            ref[(1, 1, 1, 1)]=0.952156511499/(o+1.)+(-0.00697489250151)+(0.715549790661)*0.5**o
            arg[(1, 1, 1, 2)]=-0.724706583591*x[0]**o + (0.88169191562)*x[0] + (-0.060332687826)*x[1]**o + (0.44310724822)*x[1]
            ref[(1, 1, 1, 2)]=-0.060332687826/(o+1.)+(0.66239958192)+(-0.724706583591)*0.5**o
            arg[(1, 1, 1, 3)]=-0.128839104502*x[0]**o + (0.275602181304)*x[0] + (0.704401875174)*x[1]**o + (0.21093048389)*x[1]
            ref[(1, 1, 1, 3)]=0.704401875174/(o+1.)+(0.243266332597)+(-0.128839104502)*0.5**o
            arg[(1, 1, 2, 0)]=0.220659970288*x[0]**o + (0.295871366062)*x[0] + (-0.61147794999)*x[1]**o + (0.337655694931)*x[1]
            ref[(1, 1, 2, 0)]=-0.61147794999/(o+1.)+(0.316763530497)+(0.220659970288)*0.5**o
            arg[(1, 1, 2, 1)]=0.933025911587*x[0]**o + (0.252229008537)*x[0] + (0.358261529382)*x[1]**o + (0.44869520056)*x[1]
            ref[(1, 1, 2, 1)]=0.358261529382/(o+1.)+(0.350462104548)+(0.933025911587)*0.5**o
            arg[(1, 1, 2, 2)]=0.683462977329*x[0]**o + (0.22348343829)*x[0] + (-0.481742410807)*x[1]**o + (0.740251881382)*x[1]
            ref[(1, 1, 2, 2)]=-0.481742410807/(o+1.)+(0.481867659836)+(0.683462977329)*0.5**o
            arg[(1, 1, 2, 3)]=-0.28503823115*x[0]**o + (-0.738499351749)*x[0] + (-0.535130582884)*x[1]**o + (-0.0335490665918)*x[1]
            ref[(1, 1, 2, 3)]=-0.535130582884/(o+1.)+(-0.38602420917)+(-0.28503823115)*0.5**o
            arg[(1, 1, 3, 0)]=-0.115605049026*x[0]**o + (0.909563040993)*x[0] + (0.54891737099)*x[1]**o + (0.257986867764)*x[1]
            ref[(1, 1, 3, 0)]=0.54891737099/(o+1.)+(0.583774954379)+(-0.115605049026)*0.5**o
            arg[(1, 1, 3, 1)]=0.0192000054212*x[0]**o + (0.423794654082)*x[0] + (0.145809799086)*x[1]**o + (0.0157529818112)*x[1]
            ref[(1, 1, 3, 1)]=0.145809799086/(o+1.)+(0.219773817946)+(0.0192000054212)*0.5**o
            arg[(1, 1, 3, 2)]=-0.241098015497*x[0]**o + (0.344691075845)*x[0] + (0.285912014192)*x[1]**o + (0.220279969962)*x[1]
            ref[(1, 1, 3, 2)]=0.285912014192/(o+1.)+(0.282485522904)+(-0.241098015497)*0.5**o
            arg[(1, 1, 3, 3)]=-0.800670684705*x[0]**o + (0.618865940052)*x[0] + (-0.050001213734)*x[1]**o + (-0.59184077352)*x[1]
            ref[(1, 1, 3, 3)]=-0.050001213734/(o+1.)+(0.0135125832659)+(-0.800670684705)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=0.719382790679*x[0]**o + (0.0270842524756)*x[0] + (-0.496926561086)*x[1]**o + (0.611498388966)*x[1] + (0.699631083253)*x[2]**o + (0.057789658445)*x[2]
            ref[(0, 0, 0, 0)]=0.202704522167/(o+1.)+(0.348186149943)+(0.719382790679)*0.5**o
            arg[(0, 0, 0, 1)]=-0.40330318176*x[0]**o + (-0.965649150089)*x[0] + (0.63671260279)*x[1]**o + (0.824742227691)*x[1] + (0.14653992688)*x[2]**o + (0.945748864823)*x[2]
            ref[(0, 0, 0, 1)]=0.78325252967/(o+1.)+(0.402420971213)+(-0.40330318176)*0.5**o
            arg[(0, 0, 0, 2)]=0.182351521745*x[0]**o + (0.920228884065)*x[0] + (-0.710140586168)*x[1]**o + (-0.750671839603)*x[1] + (-0.534961343981)*x[2]**o + (0.797023766949)*x[2]
            ref[(0, 0, 0, 2)]=-1.24510193015/(o+1.)+(0.483290405706)+(0.182351521745)*0.5**o
            arg[(0, 0, 0, 3)]=-0.671111017702*x[0]**o + (-0.984002804641)*x[0] + (0.844834235198)*x[1]**o + (-0.224021478716)*x[1] + (-0.839710510957)*x[2]**o + (-0.610660901331)*x[2]
            ref[(0, 0, 0, 3)]=0.00512372424048/(o+1.)+(-0.909342592344)+(-0.671111017702)*0.5**o
            arg[(0, 0, 1, 0)]=-0.968548569879*x[0]**o + (0.603990401187)*x[0] + (-0.276856987042)*x[1]**o + (0.439689478484)*x[1] + (-0.473640143314)*x[2]**o + (0.585337809477)*x[2]
            ref[(0, 0, 1, 0)]=-0.750497130356/(o+1.)+(0.814508844574)+(-0.968548569879)*0.5**o
            arg[(0, 0, 1, 1)]=0.643119949589*x[0]**o + (0.301719182204)*x[0] + (-0.378922951618)*x[1]**o + (-0.458722717017)*x[1] + (0.841109443248)*x[2]**o + (-0.793203002342)*x[2]
            ref[(0, 0, 1, 1)]=0.46218649163/(o+1.)+(-0.475103268577)+(0.643119949589)*0.5**o
            arg[(0, 0, 1, 2)]=-0.928227499249*x[0]**o + (0.0993061536864)*x[0] + (0.830231952455)*x[1]**o + (0.119761668591)*x[1] + (-0.219700963431)*x[2]**o + (0.21733421056)*x[2]
            ref[(0, 0, 1, 2)]=0.610530989024/(o+1.)+(0.218201016419)+(-0.928227499249)*0.5**o
            arg[(0, 0, 1, 3)]=0.722205559027*x[0]**o + (-0.495619552018)*x[0] + (0.126891316076)*x[1]**o + (-0.362331356751)*x[1] + (-0.41421252291)*x[2]**o + (-0.713570839416)*x[2]
            ref[(0, 0, 1, 3)]=-0.287321206834/(o+1.)+(-0.785760874093)+(0.722205559027)*0.5**o
            arg[(0, 0, 2, 0)]=-0.296161733281*x[0]**o + (0.693576723576)*x[0] + (-0.512630391331)*x[1]**o + (-0.93802956114)*x[1] + (-0.57995583591)*x[2]**o + (0.137063043789)*x[2]
            ref[(0, 0, 2, 0)]=-1.09258622724/(o+1.)+(-0.0536948968875)+(-0.296161733281)*0.5**o
            arg[(0, 0, 2, 1)]=-0.727224407765*x[0]**o + (-0.107815023224)*x[0] + (0.489020796035)*x[1]**o + (-0.370693434204)*x[1] + (-0.796637499646)*x[2]**o + (0.309111227477)*x[2]
            ref[(0, 0, 2, 1)]=-0.307616703611/(o+1.)+(-0.0846986149756)+(-0.727224407765)*0.5**o
            arg[(0, 0, 2, 2)]=0.891492957939*x[0]**o + (0.222000227218)*x[0] + (0.425202284464)*x[1]**o + (-0.652906579884)*x[1] + (-0.144974376515)*x[2]**o + (-0.814345285575)*x[2]
            ref[(0, 0, 2, 2)]=0.280227907949/(o+1.)+(-0.62262581912)+(0.891492957939)*0.5**o
            arg[(0, 0, 2, 3)]=0.950366417212*x[0]**o + (0.3756817144)*x[0] + (-0.010871350952)*x[1]**o + (0.323658742126)*x[1] + (0.305989508542)*x[2]**o + (-0.682698683604)*x[2]
            ref[(0, 0, 2, 3)]=0.29511815759/(o+1.)+(0.00832088646102)+(0.950366417212)*0.5**o
            arg[(0, 0, 3, 0)]=-0.981304231882*x[0]**o + (-0.609598857605)*x[0] + (-0.226820232107)*x[1]**o + (0.845911997067)*x[1] + (-0.180585361951)*x[2]**o + (0.425256869847)*x[2]
            ref[(0, 0, 3, 0)]=-0.407405594058/(o+1.)+(0.330785004654)+(-0.981304231882)*0.5**o
            arg[(0, 0, 3, 1)]=0.193044826353*x[0]**o + (-0.200559164508)*x[0] + (-0.0624197080028)*x[1]**o + (0.553793098171)*x[1] + (0.0936829632821)*x[2]**o + (-0.301489128489)*x[2]
            ref[(0, 0, 3, 1)]=0.0312632552794/(o+1.)+(0.0258724025873)+(0.193044826353)*0.5**o
            arg[(0, 0, 3, 2)]=0.651699563189*x[0]**o + (0.402539688961)*x[0] + (-0.907122822843)*x[1]**o + (0.0896075956716)*x[1] + (0.150164503863)*x[2]**o + (-0.347661109341)*x[2]
            ref[(0, 0, 3, 2)]=-0.75695831898/(o+1.)+(0.072243087646)+(0.651699563189)*0.5**o
            arg[(0, 0, 3, 3)]=0.212532834211*x[0]**o + (0.774060093823)*x[0] + (0.01077445525)*x[1]**o + (0.355948642697)*x[1] + (-0.598350590311)*x[2]**o + (0.13815452587)*x[2]
            ref[(0, 0, 3, 3)]=-0.587576135061/(o+1.)+(0.634081631195)+(0.212532834211)*0.5**o
            arg[(0, 1, 0, 0)]=0.277702811418*x[0]**o + (-0.497314716323)*x[0] + (0.677027041484)*x[1]**o + (-0.734094718546)*x[1] + (0.833592657433)*x[2]**o + (-0.40645584621)*x[2]
            ref[(0, 1, 0, 0)]=1.51061969892/(o+1.)+(-0.81893264054)+(0.277702811418)*0.5**o
            arg[(0, 1, 0, 1)]=-0.77352467797*x[0]**o + (0.144536623813)*x[0] + (-0.271226383148)*x[1]**o + (0.782196981011)*x[1] + (-0.0882178289089)*x[2]**o + (-0.641477449593)*x[2]
            ref[(0, 1, 0, 1)]=-0.359444212057/(o+1.)+(0.142628077616)+(-0.77352467797)*0.5**o
            arg[(0, 1, 0, 2)]=-0.593595399636*x[0]**o + (0.159989839869)*x[0] + (-0.343211794414)*x[1]**o + (-0.319111553414)*x[1] + (-0.890476435832)*x[2]**o + (0.0374597856372)*x[2]
            ref[(0, 1, 0, 2)]=-1.23368823025/(o+1.)+(-0.0608309639535)+(-0.593595399636)*0.5**o
            arg[(0, 1, 0, 3)]=0.628843429436*x[0]**o + (0.503198054189)*x[0] + (0.0611615591337)*x[1]**o + (0.467056774851)*x[1] + (-0.314152727794)*x[2]**o + (-0.0440106538633)*x[2]
            ref[(0, 1, 0, 3)]=-0.25299116866/(o+1.)+(0.463122087588)+(0.628843429436)*0.5**o
            arg[(0, 1, 1, 0)]=-0.781951436061*x[0]**o + (0.307045006278)*x[0] + (-0.222686064241)*x[1]**o + (-0.495509944491)*x[1] + (-0.909168554904)*x[2]**o + (-0.510756527803)*x[2]
            ref[(0, 1, 1, 0)]=-1.13185461914/(o+1.)+(-0.349610733008)+(-0.781951436061)*0.5**o
            arg[(0, 1, 1, 1)]=-0.635395001932*x[0]**o + (0.192363795533)*x[0] + (0.563568587346)*x[1]**o + (-0.0518962160498)*x[1] + (0.30680711469)*x[2]**o + (-0.137510306155)*x[2]
            ref[(0, 1, 1, 1)]=0.870375702036/(o+1.)+(0.00147863666441)+(-0.635395001932)*0.5**o
            arg[(0, 1, 1, 2)]=0.756977725825*x[0]**o + (0.849824844246)*x[0] + (0.781617328937)*x[1]**o + (0.363770345487)*x[1] + (0.356328044112)*x[2]**o + (-0.916991708557)*x[2]
            ref[(0, 1, 1, 2)]=1.13794537305/(o+1.)+(0.148301740589)+(0.756977725825)*0.5**o
            arg[(0, 1, 1, 3)]=0.661480578954*x[0]**o + (-0.410870561727)*x[0] + (-0.301466727565)*x[1]**o + (0.4947901341)*x[1] + (0.30832845869)*x[2]**o + (-0.165097426401)*x[2]
            ref[(0, 1, 1, 3)]=0.00686173112568/(o+1.)+(-0.040588927014)+(0.661480578954)*0.5**o
            arg[(0, 1, 2, 0)]=0.179496877135*x[0]**o + (-0.396827926883)*x[0] + (-0.0721096081342)*x[1]**o + (0.370849083728)*x[1] + (-0.729922533073)*x[2]**o + (-0.684548471722)*x[2]
            ref[(0, 1, 2, 0)]=-0.802032141207/(o+1.)+(-0.355263657438)+(0.179496877135)*0.5**o
            arg[(0, 1, 2, 1)]=0.637948292495*x[0]**o + (-0.310017083663)*x[0] + (-0.230289833724)*x[1]**o + (0.0108690156714)*x[1] + (0.990862292835)*x[2]**o + (0.832277009968)*x[2]
            ref[(0, 1, 2, 1)]=0.760572459112/(o+1.)+(0.266564470988)+(0.637948292495)*0.5**o
            arg[(0, 1, 2, 2)]=0.546936948344*x[0]**o + (-0.274500012288)*x[0] + (0.284269571983)*x[1]**o + (0.389516181024)*x[1] + (0.654271435753)*x[2]**o + (0.940903896708)*x[2]
            ref[(0, 1, 2, 2)]=0.938541007736/(o+1.)+(0.527960032722)+(0.546936948344)*0.5**o
            arg[(0, 1, 2, 3)]=0.355005611834*x[0]**o + (0.399245816427)*x[0] + (-0.32123119334)*x[1]**o + (0.450650717254)*x[1] + (0.911431769733)*x[2]**o + (0.899942805765)*x[2]
            ref[(0, 1, 2, 3)]=0.590200576394/(o+1.)+(0.874919669723)+(0.355005611834)*0.5**o
            arg[(0, 1, 3, 0)]=-0.610364884082*x[0]**o + (0.0878722790684)*x[0] + (0.519008003748)*x[1]**o + (-0.326262411779)*x[1] + (-0.602827786536)*x[2]**o + (-0.686858727846)*x[2]
            ref[(0, 1, 3, 0)]=-0.083819782788/(o+1.)+(-0.462624430278)+(-0.610364884082)*0.5**o
            arg[(0, 1, 3, 1)]=-0.464464932267*x[0]**o + (0.834844938291)*x[0] + (-0.648398275559)*x[1]**o + (-0.184601992218)*x[1] + (0.11124107979)*x[2]**o + (-0.0661719172174)*x[2]
            ref[(0, 1, 3, 1)]=-0.53715719577/(o+1.)+(0.292035514428)+(-0.464464932267)*0.5**o
            arg[(0, 1, 3, 2)]=-0.963058099619*x[0]**o + (-0.159274011145)*x[0] + (-0.308287171112)*x[1]**o + (0.347833702149)*x[1] + (0.926642630616)*x[2]**o + (-0.048608274638)*x[2]
            ref[(0, 1, 3, 2)]=0.618355459504/(o+1.)+(0.0699757081832)+(-0.963058099619)*0.5**o
            arg[(0, 1, 3, 3)]=0.53278225898*x[0]**o + (0.443737512512)*x[0] + (0.146309969388)*x[1]**o + (0.144400636696)*x[1] + (0.195265109032)*x[2]**o + (-0.739667027157)*x[2]
            ref[(0, 1, 3, 3)]=0.34157507842/(o+1.)+(-0.0757644389745)+(0.53278225898)*0.5**o
            arg[(1, 0, 0, 0)]=-0.642938557321*x[0]**o + (0.852958708596)*x[0] + (-0.159477090002)*x[1]**o + (0.624067979067)*x[1] + (0.568545349441)*x[2]**o + (0.996602492437)*x[2]
            ref[(1, 0, 0, 0)]=0.409068259438/(o+1.)+(1.23681459005)+(-0.642938557321)*0.5**o
            arg[(1, 0, 0, 1)]=0.66387422687*x[0]**o + (-0.374733836451)*x[0] + (0.838366245654)*x[1]**o + (-0.711524337022)*x[1] + (-0.886620431481)*x[2]**o + (-0.165445743846)*x[2]
            ref[(1, 0, 0, 1)]=-0.0482541858273/(o+1.)+(-0.62585195866)+(0.66387422687)*0.5**o
            arg[(1, 0, 0, 2)]=-0.0302132258383*x[0]**o + (0.15501726196)*x[0] + (0.161099054973)*x[1]**o + (-0.680987701207)*x[1] + (0.489124628048)*x[2]**o + (-0.391503090962)*x[2]
            ref[(1, 0, 0, 2)]=0.650223683021/(o+1.)+(-0.458736765104)+(-0.0302132258383)*0.5**o
            arg[(1, 0, 0, 3)]=0.00904347655052*x[0]**o + (-0.851116272378)*x[0] + (0.146559791755)*x[1]**o + (-0.667738215938)*x[1] + (-0.304522097965)*x[2]**o + (-0.310373304557)*x[2]
            ref[(1, 0, 0, 3)]=-0.15796230621/(o+1.)+(-0.914613896436)+(0.00904347655052)*0.5**o
            arg[(1, 0, 1, 0)]=-0.220090847167*x[0]**o + (-0.370703512587)*x[0] + (0.335710439788)*x[1]**o + (0.453832411424)*x[1] + (0.773222957631)*x[2]**o + (-0.543893901912)*x[2]
            ref[(1, 0, 1, 0)]=1.10893339742/(o+1.)+(-0.230382501537)+(-0.220090847167)*0.5**o
            arg[(1, 0, 1, 1)]=-0.0878708607936*x[0]**o + (-0.517402276743)*x[0] + (0.32994186318)*x[1]**o + (0.179711059181)*x[1] + (-0.207531605709)*x[2]**o + (0.600396294445)*x[2]
            ref[(1, 0, 1, 1)]=0.122410257472/(o+1.)+(0.131352538441)+(-0.0878708607936)*0.5**o
            arg[(1, 0, 1, 2)]=0.474430849267*x[0]**o + (0.956942455232)*x[0] + (-0.520542425793)*x[1]**o + (-0.622192898514)*x[1] + (-0.82305593143)*x[2]**o + (0.362323764272)*x[2]
            ref[(1, 0, 1, 2)]=-1.34359835722/(o+1.)+(0.348536660495)+(0.474430849267)*0.5**o
            arg[(1, 0, 1, 3)]=-0.296864027015*x[0]**o + (0.0494231691036)*x[0] + (-0.095664338153)*x[1]**o + (0.261042399072)*x[1] + (-0.0198442645392)*x[2]**o + (-0.623741765342)*x[2]
            ref[(1, 0, 1, 3)]=-0.115508602692/(o+1.)+(-0.156638098583)+(-0.296864027015)*0.5**o
            arg[(1, 0, 2, 0)]=-0.515192101628*x[0]**o + (0.623252860353)*x[0] + (-0.761838959991)*x[1]**o + (-0.774151666403)*x[1] + (0.216597019606)*x[2]**o + (-0.864216413858)*x[2]
            ref[(1, 0, 2, 0)]=-0.545241940385/(o+1.)+(-0.507557609954)+(-0.515192101628)*0.5**o
            arg[(1, 0, 2, 1)]=0.030618040151*x[0]**o + (0.737915973982)*x[0] + (-0.859167432717)*x[1]**o + (-0.578744100189)*x[1] + (-0.637738546065)*x[2]**o + (0.973291595112)*x[2]
            ref[(1, 0, 2, 1)]=-1.49690597878/(o+1.)+(0.566231734453)+(0.030618040151)*0.5**o
            arg[(1, 0, 2, 2)]=-0.787345773886*x[0]**o + (-0.141521111178)*x[0] + (-0.426251716589)*x[1]**o + (0.74237283518)*x[1] + (0.952542229599)*x[2]**o + (0.0560663429638)*x[2]
            ref[(1, 0, 2, 2)]=0.52629051301/(o+1.)+(0.328459033483)+(-0.787345773886)*0.5**o
            arg[(1, 0, 2, 3)]=-0.800825355201*x[0]**o + (-0.881034710963)*x[0] + (0.00306292558382)*x[1]**o + (0.692800341664)*x[1] + (-0.934478640161)*x[2]**o + (0.721629968713)*x[2]
            ref[(1, 0, 2, 3)]=-0.931415714577/(o+1.)+(0.266697799707)+(-0.800825355201)*0.5**o
            arg[(1, 0, 3, 0)]=0.799389120768*x[0]**o + (0.388922860205)*x[0] + (-0.194411352884)*x[1]**o + (0.565368478992)*x[1] + (0.515915608666)*x[2]**o + (0.32644941725)*x[2]
            ref[(1, 0, 3, 0)]=0.321504255782/(o+1.)+(0.640370378223)+(0.799389120768)*0.5**o
            arg[(1, 0, 3, 1)]=-0.556714365713*x[0]**o + (-0.498635205203)*x[0] + (-0.599012776889)*x[1]**o + (0.722711070337)*x[1] + (-0.396421272693)*x[2]**o + (0.965115617644)*x[2]
            ref[(1, 0, 3, 1)]=-0.995434049582/(o+1.)+(0.594595741389)+(-0.556714365713)*0.5**o
            arg[(1, 0, 3, 2)]=0.952694675438*x[0]**o + (-0.18632696833)*x[0] + (-0.262725043278)*x[1]**o + (0.489804846336)*x[1] + (-0.482591231083)*x[2]**o + (-0.250588461651)*x[2]
            ref[(1, 0, 3, 2)]=-0.745316274362/(o+1.)+(0.0264447081777)+(0.952694675438)*0.5**o
            arg[(1, 0, 3, 3)]=0.928364447366*x[0]**o + (-0.543950614621)*x[0] + (0.43717804662)*x[1]**o + (-0.361100724287)*x[1] + (0.638873490696)*x[2]**o + (-0.387514451169)*x[2]
            ref[(1, 0, 3, 3)]=1.07605153732/(o+1.)+(-0.646282895038)+(0.928364447366)*0.5**o
            arg[(1, 1, 0, 0)]=-0.202364929958*x[0]**o + (-0.414417604194)*x[0] + (-0.510192020825)*x[1]**o + (-0.755589460053)*x[1] + (0.085940992466)*x[2]**o + (0.802770108042)*x[2]
            ref[(1, 1, 0, 0)]=-0.424251028359/(o+1.)+(-0.183618478103)+(-0.202364929958)*0.5**o
            arg[(1, 1, 0, 1)]=-0.460133534009*x[0]**o + (-0.503666957038)*x[0] + (-0.889352584858)*x[1]**o + (0.804129324056)*x[1] + (0.321957328055)*x[2]**o + (0.0782530171534)*x[2]
            ref[(1, 1, 0, 1)]=-0.567395256803/(o+1.)+(0.189357692086)+(-0.460133534009)*0.5**o
            arg[(1, 1, 0, 2)]=0.538429195256*x[0]**o + (-0.526940606884)*x[0] + (-0.8518188888)*x[1]**o + (0.693528227469)*x[1] + (0.33463503803)*x[2]**o + (0.341612141578)*x[2]
            ref[(1, 1, 0, 2)]=-0.517183850771/(o+1.)+(0.254099881082)+(0.538429195256)*0.5**o
            arg[(1, 1, 0, 3)]=0.556072437072*x[0]**o + (0.34760555652)*x[0] + (0.0455946330401)*x[1]**o + (0.560660750628)*x[1] + (-0.487757075808)*x[2]**o + (0.646311631661)*x[2]
            ref[(1, 1, 0, 3)]=-0.442162442768/(o+1.)+(0.777288969405)+(0.556072437072)*0.5**o
            arg[(1, 1, 1, 0)]=-0.940103829881*x[0]**o + (-0.765167464888)*x[0] + (0.203709827697)*x[1]**o + (0.696314037066)*x[1] + (-0.430913711077)*x[2]**o + (0.787456573749)*x[2]
            ref[(1, 1, 1, 0)]=-0.22720388338/(o+1.)+(0.359301572964)+(-0.940103829881)*0.5**o
            arg[(1, 1, 1, 1)]=-0.585926139746*x[0]**o + (0.738400109991)*x[0] + (-0.870534866203)*x[1]**o + (-0.226272373331)*x[1] + (-0.235435927959)*x[2]**o + (0.427021985071)*x[2]
            ref[(1, 1, 1, 1)]=-1.10597079416/(o+1.)+(0.469574860866)+(-0.585926139746)*0.5**o
            arg[(1, 1, 1, 2)]=-0.224098332971*x[0]**o + (-0.874609508105)*x[0] + (-0.210670602514)*x[1]**o + (-0.184962334006)*x[1] + (-0.808914173048)*x[2]**o + (-0.657284683658)*x[2]
            ref[(1, 1, 1, 2)]=-1.01958477556/(o+1.)+(-0.858428262885)+(-0.224098332971)*0.5**o
            arg[(1, 1, 1, 3)]=-0.436590534319*x[0]**o + (0.296592290386)*x[0] + (-0.950937731618)*x[1]**o + (-0.0386371736764)*x[1] + (0.272003996601)*x[2]**o + (0.47855671695)*x[2]
            ref[(1, 1, 1, 3)]=-0.678933735017/(o+1.)+(0.36825591683)+(-0.436590534319)*0.5**o
            arg[(1, 1, 2, 0)]=-0.0724565084441*x[0]**o + (-0.618935632374)*x[0] + (0.439698685643)*x[1]**o + (-0.731077165116)*x[1] + (-0.539971651431)*x[2]**o + (0.819036046892)*x[2]
            ref[(1, 1, 2, 0)]=-0.100272965787/(o+1.)+(-0.265488375299)+(-0.0724565084441)*0.5**o
            arg[(1, 1, 2, 1)]=-0.470734590879*x[0]**o + (0.101105657823)*x[0] + (0.178349087983)*x[1]**o + (-0.675149708927)*x[1] + (-0.157683097984)*x[2]**o + (-0.0617675434976)*x[2]
            ref[(1, 1, 2, 1)]=0.0206659899997/(o+1.)+(-0.317905797301)+(-0.470734590879)*0.5**o
            arg[(1, 1, 2, 2)]=-0.489690753162*x[0]**o + (0.209449902574)*x[0] + (-0.125316975183)*x[1]**o + (0.0336043168033)*x[1] + (0.297490098559)*x[2]**o + (0.258887504023)*x[2]
            ref[(1, 1, 2, 2)]=0.172173123376/(o+1.)+(0.2509708617)+(-0.489690753162)*0.5**o
            arg[(1, 1, 2, 3)]=-0.165236106659*x[0]**o + (-0.26796428803)*x[0] + (-0.223416555796)*x[1]**o + (0.867213580282)*x[1] + (0.116208253931)*x[2]**o + (-0.225536424853)*x[2]
            ref[(1, 1, 2, 3)]=-0.107208301865/(o+1.)+(0.186856433699)+(-0.165236106659)*0.5**o
            arg[(1, 1, 3, 0)]=0.93968636875*x[0]**o + (0.698773010863)*x[0] + (-0.267258712636)*x[1]**o + (0.745174366085)*x[1] + (-0.147785713627)*x[2]**o + (-0.909035531192)*x[2]
            ref[(1, 1, 3, 0)]=-0.415044426263/(o+1.)+(0.267455922878)+(0.93968636875)*0.5**o
            arg[(1, 1, 3, 1)]=-0.814676765652*x[0]**o + (-0.457191808486)*x[0] + (0.582651621682)*x[1]**o + (0.528894532642)*x[1] + (-0.29302435521)*x[2]**o + (0.815669916481)*x[2]
            ref[(1, 1, 3, 1)]=0.289627266472/(o+1.)+(0.443686320319)+(-0.814676765652)*0.5**o
            arg[(1, 1, 3, 2)]=0.023368650601*x[0]**o + (0.0812229044518)*x[0] + (-0.812302098696)*x[1]**o + (0.437782656136)*x[1] + (-0.515050655821)*x[2]**o + (0.354528575431)*x[2]
            ref[(1, 1, 3, 2)]=-1.32735275452/(o+1.)+(0.436767068009)+(0.023368650601)*0.5**o
            arg[(1, 1, 3, 3)]=-0.529730944144*x[0]**o + (-0.829990294494)*x[0] + (0.832517293035)*x[1]**o + (0.0416834329286)*x[1] + (0.128587732035)*x[2]**o + (-0.570643686978)*x[2]
            ref[(1, 1, 3, 3)]=0.961105025069/(o+1.)+(-0.679475274272)+(-0.529730944144)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.702883884946*x[0]**o + (0.71700961545)*x[0] + (-0.0982086734293)*x[1]**o + (0.592587367755)*x[1]
            ref=-0.0982086734293/(o+1.)+(0.654798491603)+(0.702883884946)*0.5**o
        else:
            arg=0.0610794015745*x[0]**o + (0.698797820136)*x[0] + (0.386413700677)*x[1]**o + (-0.0755708761416)*x[1] + (0.615208087889)*x[2]**o + (0.787041588147)*x[2]
            ref=1.00162178857/(o+1.)+(0.705134266071)+(0.0610794015745)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.0801756200139*x[0]**o + (-0.131808502817)*x[0] + (-0.483464090245)*x[1]**o + (0.463060514547)*x[1]
            ref[(0,)]=-0.483464090245/(o+1.)+(0.165626005865)+(-0.0801756200139)*0.5**o
            arg[(1,)]=-0.584226517731*x[0]**o + (-0.999197670982)*x[0] + (-0.767812643457)*x[1]**o + (-0.417260656005)*x[1]
            ref[(1,)]=-0.767812643457/(o+1.)+(-0.708229163494)+(-0.584226517731)*0.5**o
            arg[(2,)]=-0.663491490767*x[0]**o + (0.415636540698)*x[0] + (0.392296094305)*x[1]**o + (-0.623908846578)*x[1]
            ref[(2,)]=0.392296094305/(o+1.)+(-0.10413615294)+(-0.663491490767)*0.5**o
            arg[(3,)]=-0.233488713575*x[0]**o + (0.0811108673366)*x[0] + (0.246569157077)*x[1]**o + (-0.663622479332)*x[1]
            ref[(3,)]=0.246569157077/(o+1.)+(-0.291255805998)+(-0.233488713575)*0.5**o
        else:
            arg[(0,)]=-0.668361217525*x[0]**o + (-0.120345154074)*x[0] + (0.932487035136)*x[1]**o + (-0.943708151726)*x[1] + (-0.0463346376128)*x[2]**o + (0.035098943655)*x[2]
            ref[(0,)]=0.886152397524/(o+1.)+(-0.514477181072)+(-0.668361217525)*0.5**o
            arg[(1,)]=-0.554285545191*x[0]**o + (0.434750275818)*x[0] + (0.364377966084)*x[1]**o + (-0.137166312379)*x[1] + (-0.433087897991)*x[2]**o + (-0.328077073515)*x[2]
            ref[(1,)]=-0.0687099319067/(o+1.)+(-0.0152465550382)+(-0.554285545191)*0.5**o
            arg[(2,)]=0.403802102277*x[0]**o + (-0.0469508640069)*x[0] + (-0.605768200914)*x[1]**o + (-0.47557153797)*x[1] + (-0.519900835917)*x[2]**o + (-0.992368772289)*x[2]
            ref[(2,)]=-1.12566903683/(o+1.)+(-0.757445587133)+(0.403802102277)*0.5**o
            arg[(3,)]=-0.0842860508952*x[0]**o + (0.874277711497)*x[0] + (0.36384339716)*x[1]**o + (-0.883674278953)*x[1] + (-0.406603137515)*x[2]**o + (0.403625642534)*x[2]
            ref[(3,)]=-0.0427597403552/(o+1.)+(0.197114537539)+(-0.0842860508952)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref=numpy.zeros((2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.34642919788*x[0]**o + (-0.579048749156)*x[0] + (-0.843125780013)*x[1]**o + (-0.171614860152)*x[1]
            ref[(0, 0)]=-0.843125780013/(o+1.)+(-0.375331804654)+(-0.34642919788)*0.5**o
            arg[(0, 1)]=0.834402973112*x[0]**o + (-0.883833580129)*x[0] + (-0.000660401215503)*x[1]**o + (0.594000197877)*x[1]
            ref[(0, 1)]=-0.000660401215503/(o+1.)+(-0.144916691126)+(0.834402973112)*0.5**o
            arg[(0, 2)]=-0.0340578438185*x[0]**o + (-0.927469483805)*x[0] + (0.801483922934)*x[1]**o + (-0.219158218463)*x[1]
            ref[(0, 2)]=0.801483922934/(o+1.)+(-0.573313851134)+(-0.0340578438185)*0.5**o
            arg[(1, 0)]=-0.751945178654*x[0]**o + (0.11629063802)*x[0] + (0.110474362488)*x[1]**o + (-0.00634467929741)*x[1]
            ref[(1, 0)]=0.110474362488/(o+1.)+(0.0549729793612)+(-0.751945178654)*0.5**o
            arg[(1, 1)]=-0.527507263419*x[0]**o + (-0.0694304530857)*x[0] + (0.190055587396)*x[1]**o + (-0.245524893917)*x[1]
            ref[(1, 1)]=0.190055587396/(o+1.)+(-0.157477673502)+(-0.527507263419)*0.5**o
            arg[(1, 2)]=0.585989604262*x[0]**o + (0.233431159564)*x[0] + (-0.388827998748)*x[1]**o + (0.258296211485)*x[1]
            ref[(1, 2)]=-0.388827998748/(o+1.)+(0.245863685525)+(0.585989604262)*0.5**o
        else:
            arg[(0, 0)]=0.0900074463886*x[0]**o + (0.0096861527413)*x[0] + (0.136163443651)*x[1]**o + (-0.882253071072)*x[1] + (0.741866642332)*x[2]**o + (-0.0116590225875)*x[2]
            ref[(0, 0)]=0.878030085983/(o+1.)+(-0.442112970459)+(0.0900074463886)*0.5**o
            arg[(0, 1)]=-0.340900946345*x[0]**o + (-0.216754394344)*x[0] + (-0.309557593274)*x[1]**o + (0.31035196404)*x[1] + (-0.962165427812)*x[2]**o + (-0.252839796274)*x[2]
            ref[(0, 1)]=-1.27172302109/(o+1.)+(-0.0796211132888)+(-0.340900946345)*0.5**o
            arg[(0, 2)]=0.782922687833*x[0]**o + (0.57716807571)*x[0] + (0.783080810855)*x[1]**o + (0.143580475488)*x[1] + (-0.810544197762)*x[2]**o + (-0.578054649357)*x[2]
            ref[(0, 2)]=-0.0274633869071/(o+1.)+(0.0713469509209)+(0.782922687833)*0.5**o
            arg[(1, 0)]=0.0135388835746*x[0]**o + (-0.6633866945)*x[0] + (0.395805133685)*x[1]**o + (-0.163110940966)*x[1] + (0.276953704817)*x[2]**o + (0.700168841836)*x[2]
            ref[(1, 0)]=0.672758838503/(o+1.)+(-0.063164396815)+(0.0135388835746)*0.5**o
            arg[(1, 1)]=-0.249356327689*x[0]**o + (0.313689840754)*x[0] + (0.311757298788)*x[1]**o + (0.333251192313)*x[1] + (-0.324991264148)*x[2]**o + (0.326859402281)*x[2]
            ref[(1, 1)]=-0.01323396536/(o+1.)+(0.486900217675)+(-0.249356327689)*0.5**o
            arg[(1, 2)]=0.787874363119*x[0]**o + (0.00504897491025)*x[0] + (0.0217032176295)*x[1]**o + (0.237701788884)*x[1] + (-0.64244495475)*x[2]**o + (0.63828183928)*x[2]
            ref[(1, 2)]=-0.62074173712/(o+1.)+(0.440516301537)+(0.787874363119)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref=numpy.zeros((3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.342544450516*x[0]**o + (0.82820978008)*x[0] + (-0.313990361698)*x[1]**o + (-0.488354683492)*x[1]
            ref[(0, 0, 0)]=-0.313990361698/(o+1.)+(0.169927548294)+(-0.342544450516)*0.5**o
            arg[(0, 0, 1)]=0.841834778993*x[0]**o + (0.409832942029)*x[0] + (-0.980526179918)*x[1]**o + (-0.837992820304)*x[1]
            ref[(0, 0, 1)]=-0.980526179918/(o+1.)+(-0.214079939138)+(0.841834778993)*0.5**o
            arg[(0, 1, 0)]=-0.0588454756154*x[0]**o + (0.374239787289)*x[0] + (-0.46286528483)*x[1]**o + (0.575991135661)*x[1]
            ref[(0, 1, 0)]=-0.46286528483/(o+1.)+(0.475115461475)+(-0.0588454756154)*0.5**o
            arg[(0, 1, 1)]=-0.604619319158*x[0]**o + (-0.104411239194)*x[0] + (0.742239241193)*x[1]**o + (-0.256794008051)*x[1]
            ref[(0, 1, 1)]=0.742239241193/(o+1.)+(-0.180602623623)+(-0.604619319158)*0.5**o
            arg[(0, 2, 0)]=0.998554297167*x[0]**o + (0.393811133802)*x[0] + (0.537476037165)*x[1]**o + (-0.884312950184)*x[1]
            ref[(0, 2, 0)]=0.537476037165/(o+1.)+(-0.245250908191)+(0.998554297167)*0.5**o
            arg[(0, 2, 1)]=0.989597506147*x[0]**o + (-0.904253585562)*x[0] + (-0.444387654755)*x[1]**o + (0.403180467311)*x[1]
            ref[(0, 2, 1)]=-0.444387654755/(o+1.)+(-0.250536559125)+(0.989597506147)*0.5**o
            arg[(1, 0, 0)]=0.145390660843*x[0]**o + (0.773025760489)*x[0] + (0.242393862645)*x[1]**o + (-0.50388035954)*x[1]
            ref[(1, 0, 0)]=0.242393862645/(o+1.)+(0.134572700474)+(0.145390660843)*0.5**o
            arg[(1, 0, 1)]=-0.200597888813*x[0]**o + (0.252476741536)*x[0] + (-0.716344763121)*x[1]**o + (0.433628333606)*x[1]
            ref[(1, 0, 1)]=-0.716344763121/(o+1.)+(0.343052537571)+(-0.200597888813)*0.5**o
            arg[(1, 1, 0)]=-0.592753053873*x[0]**o + (0.117981200127)*x[0] + (0.372725454918)*x[1]**o + (0.524890809915)*x[1]
            ref[(1, 1, 0)]=0.372725454918/(o+1.)+(0.321436005021)+(-0.592753053873)*0.5**o
            arg[(1, 1, 1)]=-0.310477691494*x[0]**o + (-0.67775155439)*x[0] + (-0.599666653236)*x[1]**o + (-0.398683388548)*x[1]
            ref[(1, 1, 1)]=-0.599666653236/(o+1.)+(-0.538217471469)+(-0.310477691494)*0.5**o
            arg[(1, 2, 0)]=-0.458991036786*x[0]**o + (0.619121905465)*x[0] + (-0.701647000992)*x[1]**o + (-0.0595238150681)*x[1]
            ref[(1, 2, 0)]=-0.701647000992/(o+1.)+(0.279799045198)+(-0.458991036786)*0.5**o
            arg[(1, 2, 1)]=-0.729468608294*x[0]**o + (-0.908823331553)*x[0] + (0.12440379769)*x[1]**o + (-0.953570413872)*x[1]
            ref[(1, 2, 1)]=0.12440379769/(o+1.)+(-0.931196872712)+(-0.729468608294)*0.5**o
            arg[(2, 0, 0)]=0.401246139329*x[0]**o + (0.938002014202)*x[0] + (-0.84604187494)*x[1]**o + (-0.539042938731)*x[1]
            ref[(2, 0, 0)]=-0.84604187494/(o+1.)+(0.199479537735)+(0.401246139329)*0.5**o
            arg[(2, 0, 1)]=0.253628437908*x[0]**o + (0.021506539559)*x[0] + (0.963257561589)*x[1]**o + (-0.0446202993347)*x[1]
            ref[(2, 0, 1)]=0.963257561589/(o+1.)+(-0.0115568798879)+(0.253628437908)*0.5**o
            arg[(2, 1, 0)]=0.0328296672529*x[0]**o + (-0.363864500736)*x[0] + (0.0625088362892)*x[1]**o + (-0.43586828702)*x[1]
            ref[(2, 1, 0)]=0.0625088362892/(o+1.)+(-0.399866393878)+(0.0328296672529)*0.5**o
            arg[(2, 1, 1)]=-0.17279960444*x[0]**o + (0.368682466902)*x[0] + (0.556544723909)*x[1]**o + (-0.896105324155)*x[1]
            ref[(2, 1, 1)]=0.556544723909/(o+1.)+(-0.263711428627)+(-0.17279960444)*0.5**o
            arg[(2, 2, 0)]=0.012720299193*x[0]**o + (-0.932780017512)*x[0] + (0.920371073659)*x[1]**o + (0.928248504983)*x[1]
            ref[(2, 2, 0)]=0.920371073659/(o+1.)+(-0.00226575626471)+(0.012720299193)*0.5**o
            arg[(2, 2, 1)]=-0.202619639133*x[0]**o + (0.334841155273)*x[0] + (0.658950940131)*x[1]**o + (-0.947800693588)*x[1]
            ref[(2, 2, 1)]=0.658950940131/(o+1.)+(-0.306479769158)+(-0.202619639133)*0.5**o
        else:
            arg[(0, 0, 0)]=0.616260452843*x[0]**o + (0.826668469784)*x[0] + (-0.669182830921)*x[1]**o + (0.0638659821717)*x[1] + (0.171975917973)*x[2]**o + (-0.58684082217)*x[2]
            ref[(0, 0, 0)]=-0.497206912948/(o+1.)+(0.151846814893)+(0.616260452843)*0.5**o
            arg[(0, 0, 1)]=0.283481218985*x[0]**o + (0.222693458385)*x[0] + (0.196121274444)*x[1]**o + (0.389293732933)*x[1] + (-0.38739489987)*x[2]**o + (-0.442614825157)*x[2]
            ref[(0, 0, 1)]=-0.191273625426/(o+1.)+(0.0846861830804)+(0.283481218985)*0.5**o
            arg[(0, 1, 0)]=0.366176003028*x[0]**o + (0.128865403261)*x[0] + (-0.784004509491)*x[1]**o + (-0.497999414762)*x[1] + (-0.926647129472)*x[2]**o + (-0.021215037436)*x[2]
            ref[(0, 1, 0)]=-1.71065163896/(o+1.)+(-0.195174524469)+(0.366176003028)*0.5**o
            arg[(0, 1, 1)]=-0.124035376887*x[0]**o + (0.610986984548)*x[0] + (-0.791382085302)*x[1]**o + (0.729396658411)*x[1] + (0.920289133571)*x[2]**o + (-0.129441862832)*x[2]
            ref[(0, 1, 1)]=0.128907048269/(o+1.)+(0.605470890064)+(-0.124035376887)*0.5**o
            arg[(0, 2, 0)]=0.015984907979*x[0]**o + (0.64324167444)*x[0] + (-0.743048911859)*x[1]**o + (0.561355982561)*x[1] + (-0.278191755809)*x[2]**o + (-0.813478371316)*x[2]
            ref[(0, 2, 0)]=-1.02124066767/(o+1.)+(0.195559642842)+(0.015984907979)*0.5**o
            arg[(0, 2, 1)]=-0.85766288847*x[0]**o + (-0.241997827914)*x[0] + (0.247872371804)*x[1]**o + (-0.589271658602)*x[1] + (-0.284902243144)*x[2]**o + (0.928995119356)*x[2]
            ref[(0, 2, 1)]=-0.0370298713393/(o+1.)+(0.0488628164204)+(-0.85766288847)*0.5**o
            arg[(1, 0, 0)]=-0.847236677446*x[0]**o + (-0.902038277816)*x[0] + (-0.771590465673)*x[1]**o + (0.38714773858)*x[1] + (-0.355041842228)*x[2]**o + (0.623771012474)*x[2]
            ref[(1, 0, 0)]=-1.1266323079/(o+1.)+(0.0544402366191)+(-0.847236677446)*0.5**o
            arg[(1, 0, 1)]=-0.704793407523*x[0]**o + (-0.761973681068)*x[0] + (-0.410050338663)*x[1]**o + (0.39498070389)*x[1] + (-0.557404975192)*x[2]**o + (-0.774774361811)*x[2]
            ref[(1, 0, 1)]=-0.967455313855/(o+1.)+(-0.570883669495)+(-0.704793407523)*0.5**o
            arg[(1, 1, 0)]=0.500828572262*x[0]**o + (0.00981942550519)*x[0] + (0.52837386603)*x[1]**o + (-0.00832838007511)*x[1] + (0.387434060596)*x[2]**o + (-0.873153114121)*x[2]
            ref[(1, 1, 0)]=0.915807926626/(o+1.)+(-0.435831034346)+(0.500828572262)*0.5**o
            arg[(1, 1, 1)]=-0.979570734976*x[0]**o + (0.501628268972)*x[0] + (-0.113787604745)*x[1]**o + (0.0691192642442)*x[1] + (0.237930075788)*x[2]**o + (-0.234555761253)*x[2]
            ref[(1, 1, 1)]=0.124142471043/(o+1.)+(0.168095885982)+(-0.979570734976)*0.5**o
            arg[(1, 2, 0)]=-0.420253446649*x[0]**o + (0.580827585121)*x[0] + (-0.941940189842)*x[1]**o + (0.42451722411)*x[1] + (0.0421840377281)*x[2]**o + (0.44522232349)*x[2]
            ref[(1, 2, 0)]=-0.899756152114/(o+1.)+(0.725283566361)+(-0.420253446649)*0.5**o
            arg[(1, 2, 1)]=0.476093651297*x[0]**o + (0.328993320205)*x[0] + (-0.0101168105545)*x[1]**o + (-0.580747180197)*x[1] + (-0.344347737972)*x[2]**o + (-0.115928572303)*x[2]
            ref[(1, 2, 1)]=-0.354464548527/(o+1.)+(-0.183841216148)+(0.476093651297)*0.5**o
            arg[(2, 0, 0)]=0.988009217222*x[0]**o + (-0.633816973058)*x[0] + (-0.977287641184)*x[1]**o + (-0.819154986034)*x[1] + (-0.295009334192)*x[2]**o + (-0.762796489895)*x[2]
            ref[(2, 0, 0)]=-1.27229697538/(o+1.)+(-1.10788422449)+(0.988009217222)*0.5**o
            arg[(2, 0, 1)]=0.0724833123048*x[0]**o + (-0.573127958058)*x[0] + (0.790032131963)*x[1]**o + (-0.166111757998)*x[1] + (0.425529148193)*x[2]**o + (-0.304229596745)*x[2]
            ref[(2, 0, 1)]=1.21556128016/(o+1.)+(-0.5217346564)+(0.0724833123048)*0.5**o
            arg[(2, 1, 0)]=-0.753557173042*x[0]**o + (0.529460384436)*x[0] + (-0.778372946998)*x[1]**o + (0.599925847529)*x[1] + (0.873812156933)*x[2]**o + (0.857867714773)*x[2]
            ref[(2, 1, 0)]=0.0954392099354/(o+1.)+(0.993626973369)+(-0.753557173042)*0.5**o
            arg[(2, 1, 1)]=0.334509556991*x[0]**o + (-0.779351827315)*x[0] + (-0.808033043344)*x[1]**o + (0.176231921638)*x[1] + (-0.772329032815)*x[2]**o + (0.511665381191)*x[2]
            ref[(2, 1, 1)]=-1.58036207616/(o+1.)+(-0.0457272622432)+(0.334509556991)*0.5**o
            arg[(2, 2, 0)]=0.574606024631*x[0]**o + (-0.608936595233)*x[0] + (0.764148120884)*x[1]**o + (0.0115863352799)*x[1] + (-0.705269574453)*x[2]**o + (-0.287522987445)*x[2]
            ref[(2, 2, 0)]=0.0588785464305/(o+1.)+(-0.442436623699)+(0.574606024631)*0.5**o
            arg[(2, 2, 1)]=-0.839949890695*x[0]**o + (0.717725820405)*x[0] + (-0.669537552355)*x[1]**o + (0.113114986135)*x[1] + (0.0284665114482)*x[2]**o + (0.945798305604)*x[2]
            ref[(2, 2, 1)]=-0.641071040907/(o+1.)+(0.888319556072)+(-0.839949890695)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 3, 3),w)
        ref=numpy.zeros((3, 4, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.437197928504*x[0]**o + (0.082764683343)*x[0] + (0.765454513013)*x[1]**o + (-0.405055609664)*x[1]
            ref[(0, 0, 0, 0)]=0.765454513013/(o+1.)+(-0.16114546316)+(-0.437197928504)*0.5**o
            arg[(0, 0, 0, 1)]=-0.649967771192*x[0]**o + (0.360131001019)*x[0] + (0.105792146222)*x[1]**o + (-0.887363024951)*x[1]
            ref[(0, 0, 0, 1)]=0.105792146222/(o+1.)+(-0.263616011966)+(-0.649967771192)*0.5**o
            arg[(0, 0, 0, 2)]=-0.185456779734*x[0]**o + (0.754355999791)*x[0] + (0.568083267741)*x[1]**o + (-0.208546517354)*x[1]
            ref[(0, 0, 0, 2)]=0.568083267741/(o+1.)+(0.272904741218)+(-0.185456779734)*0.5**o
            arg[(0, 0, 1, 0)]=-0.462491812618*x[0]**o + (-0.984892755698)*x[0] + (-0.570024532013)*x[1]**o + (0.0975494008096)*x[1]
            ref[(0, 0, 1, 0)]=-0.570024532013/(o+1.)+(-0.443671677444)+(-0.462491812618)*0.5**o
            arg[(0, 0, 1, 1)]=0.940160436063*x[0]**o + (-0.22082824066)*x[0] + (-0.434727324535)*x[1]**o + (-0.24929676485)*x[1]
            ref[(0, 0, 1, 1)]=-0.434727324535/(o+1.)+(-0.235062502755)+(0.940160436063)*0.5**o
            arg[(0, 0, 1, 2)]=0.816858499154*x[0]**o + (-0.362168031379)*x[0] + (0.673442544297)*x[1]**o + (-0.363898856705)*x[1]
            ref[(0, 0, 1, 2)]=0.673442544297/(o+1.)+(-0.363033444042)+(0.816858499154)*0.5**o
            arg[(0, 0, 2, 0)]=0.0464312230576*x[0]**o + (-0.940021298801)*x[0] + (0.343014002107)*x[1]**o + (0.827111918037)*x[1]
            ref[(0, 0, 2, 0)]=0.343014002107/(o+1.)+(-0.056454690382)+(0.0464312230576)*0.5**o
            arg[(0, 0, 2, 1)]=0.17751348247*x[0]**o + (0.40579863042)*x[0] + (-0.224941848695)*x[1]**o + (-0.35961112145)*x[1]
            ref[(0, 0, 2, 1)]=-0.224941848695/(o+1.)+(0.0230937544846)+(0.17751348247)*0.5**o
            arg[(0, 0, 2, 2)]=-0.662933326773*x[0]**o + (-0.66398627356)*x[0] + (0.163806770321)*x[1]**o + (-0.261377106116)*x[1]
            ref[(0, 0, 2, 2)]=0.163806770321/(o+1.)+(-0.462681689838)+(-0.662933326773)*0.5**o
            arg[(0, 1, 0, 0)]=-0.667322299738*x[0]**o + (0.437116687738)*x[0] + (0.0508243275365)*x[1]**o + (0.37737269606)*x[1]
            ref[(0, 1, 0, 0)]=0.0508243275365/(o+1.)+(0.407244691899)+(-0.667322299738)*0.5**o
            arg[(0, 1, 0, 1)]=0.223014267566*x[0]**o + (-0.323685145538)*x[0] + (0.147664914994)*x[1]**o + (0.00205175155076)*x[1]
            ref[(0, 1, 0, 1)]=0.147664914994/(o+1.)+(-0.160816696994)+(0.223014267566)*0.5**o
            arg[(0, 1, 0, 2)]=-0.729387532725*x[0]**o + (-0.480630080435)*x[0] + (-0.853454049884)*x[1]**o + (-0.989233170443)*x[1]
            ref[(0, 1, 0, 2)]=-0.853454049884/(o+1.)+(-0.734931625439)+(-0.729387532725)*0.5**o
            arg[(0, 1, 1, 0)]=0.291652401367*x[0]**o + (-0.981789058533)*x[0] + (-0.0614571076629)*x[1]**o + (0.0973592558943)*x[1]
            ref[(0, 1, 1, 0)]=-0.0614571076629/(o+1.)+(-0.442214901319)+(0.291652401367)*0.5**o
            arg[(0, 1, 1, 1)]=0.433266335268*x[0]**o + (-0.463564817355)*x[0] + (-0.667434261728)*x[1]**o + (-0.609571814922)*x[1]
            ref[(0, 1, 1, 1)]=-0.667434261728/(o+1.)+(-0.536568316138)+(0.433266335268)*0.5**o
            arg[(0, 1, 1, 2)]=-0.938963934887*x[0]**o + (-0.22311503199)*x[0] + (-0.387826885328)*x[1]**o + (0.122838101564)*x[1]
            ref[(0, 1, 1, 2)]=-0.387826885328/(o+1.)+(-0.050138465213)+(-0.938963934887)*0.5**o
            arg[(0, 1, 2, 0)]=0.382573557934*x[0]**o + (-0.55853476478)*x[0] + (-0.0253109584368)*x[1]**o + (-0.912085946892)*x[1]
            ref[(0, 1, 2, 0)]=-0.0253109584368/(o+1.)+(-0.735310355836)+(0.382573557934)*0.5**o
            arg[(0, 1, 2, 1)]=0.294432966498*x[0]**o + (-0.539211273824)*x[0] + (0.562278713867)*x[1]**o + (-0.981717528519)*x[1]
            ref[(0, 1, 2, 1)]=0.562278713867/(o+1.)+(-0.760464401172)+(0.294432966498)*0.5**o
            arg[(0, 1, 2, 2)]=-0.215669009268*x[0]**o + (0.859902511682)*x[0] + (0.176947929851)*x[1]**o + (0.700974564375)*x[1]
            ref[(0, 1, 2, 2)]=0.176947929851/(o+1.)+(0.780438538029)+(-0.215669009268)*0.5**o
            arg[(0, 2, 0, 0)]=0.772870921087*x[0]**o + (0.946577320687)*x[0] + (-0.501654566357)*x[1]**o + (0.780824006411)*x[1]
            ref[(0, 2, 0, 0)]=-0.501654566357/(o+1.)+(0.863700663549)+(0.772870921087)*0.5**o
            arg[(0, 2, 0, 1)]=-0.838671748496*x[0]**o + (-0.91222267763)*x[0] + (0.982274079834)*x[1]**o + (0.639597731181)*x[1]
            ref[(0, 2, 0, 1)]=0.982274079834/(o+1.)+(-0.136312473224)+(-0.838671748496)*0.5**o
            arg[(0, 2, 0, 2)]=0.364571051642*x[0]**o + (0.204726396264)*x[0] + (-0.717248711074)*x[1]**o + (-0.750877848875)*x[1]
            ref[(0, 2, 0, 2)]=-0.717248711074/(o+1.)+(-0.273075726305)+(0.364571051642)*0.5**o
            arg[(0, 2, 1, 0)]=-0.501084484203*x[0]**o + (0.351295838781)*x[0] + (-0.647837825482)*x[1]**o + (-0.0282839820861)*x[1]
            ref[(0, 2, 1, 0)]=-0.647837825482/(o+1.)+(0.161505928347)+(-0.501084484203)*0.5**o
            arg[(0, 2, 1, 1)]=-0.845685919084*x[0]**o + (0.615355888212)*x[0] + (0.0300446470442)*x[1]**o + (0.623761018537)*x[1]
            ref[(0, 2, 1, 1)]=0.0300446470442/(o+1.)+(0.619558453375)+(-0.845685919084)*0.5**o
            arg[(0, 2, 1, 2)]=0.845458001801*x[0]**o + (-0.620817082637)*x[0] + (0.209559439368)*x[1]**o + (0.868589234266)*x[1]
            ref[(0, 2, 1, 2)]=0.209559439368/(o+1.)+(0.123886075815)+(0.845458001801)*0.5**o
            arg[(0, 2, 2, 0)]=0.165214374035*x[0]**o + (-0.994869769479)*x[0] + (0.115803729935)*x[1]**o + (-0.232651227516)*x[1]
            ref[(0, 2, 2, 0)]=0.115803729935/(o+1.)+(-0.613760498498)+(0.165214374035)*0.5**o
            arg[(0, 2, 2, 1)]=-0.873061098147*x[0]**o + (0.996647495302)*x[0] + (-0.0544928216407)*x[1]**o + (0.780951756393)*x[1]
            ref[(0, 2, 2, 1)]=-0.0544928216407/(o+1.)+(0.888799625848)+(-0.873061098147)*0.5**o
            arg[(0, 2, 2, 2)]=0.533747307033*x[0]**o + (-0.143577308729)*x[0] + (0.833895017104)*x[1]**o + (-0.44375536378)*x[1]
            ref[(0, 2, 2, 2)]=0.833895017104/(o+1.)+(-0.293666336254)+(0.533747307033)*0.5**o
            arg[(0, 3, 0, 0)]=-0.76404822172*x[0]**o + (0.277756029032)*x[0] + (-0.0891270404055)*x[1]**o + (0.151688208448)*x[1]
            ref[(0, 3, 0, 0)]=-0.0891270404055/(o+1.)+(0.21472211874)+(-0.76404822172)*0.5**o
            arg[(0, 3, 0, 1)]=-0.317827554376*x[0]**o + (0.980683998345)*x[0] + (-0.980806649598)*x[1]**o + (0.790065515544)*x[1]
            ref[(0, 3, 0, 1)]=-0.980806649598/(o+1.)+(0.885374756944)+(-0.317827554376)*0.5**o
            arg[(0, 3, 0, 2)]=0.567647591376*x[0]**o + (0.866974491162)*x[0] + (-0.610852107829)*x[1]**o + (0.419262884152)*x[1]
            ref[(0, 3, 0, 2)]=-0.610852107829/(o+1.)+(0.643118687657)+(0.567647591376)*0.5**o
            arg[(0, 3, 1, 0)]=0.324287260914*x[0]**o + (0.749668068093)*x[0] + (-0.419230259625)*x[1]**o + (0.567787320496)*x[1]
            ref[(0, 3, 1, 0)]=-0.419230259625/(o+1.)+(0.658727694294)+(0.324287260914)*0.5**o
            arg[(0, 3, 1, 1)]=0.064381953924*x[0]**o + (0.385558976513)*x[0] + (-0.384975185639)*x[1]**o + (-0.561607630599)*x[1]
            ref[(0, 3, 1, 1)]=-0.384975185639/(o+1.)+(-0.0880243270429)+(0.064381953924)*0.5**o
            arg[(0, 3, 1, 2)]=0.722947264976*x[0]**o + (0.48163751968)*x[0] + (0.447596570279)*x[1]**o + (0.508042258192)*x[1]
            ref[(0, 3, 1, 2)]=0.447596570279/(o+1.)+(0.494839888936)+(0.722947264976)*0.5**o
            arg[(0, 3, 2, 0)]=-0.43905257273*x[0]**o + (0.511199438162)*x[0] + (-0.259142843893)*x[1]**o + (0.361277444462)*x[1]
            ref[(0, 3, 2, 0)]=-0.259142843893/(o+1.)+(0.436238441312)+(-0.43905257273)*0.5**o
            arg[(0, 3, 2, 1)]=0.748373578962*x[0]**o + (-0.178123372501)*x[0] + (0.974821524671)*x[1]**o + (0.414000105085)*x[1]
            ref[(0, 3, 2, 1)]=0.974821524671/(o+1.)+(0.117938366292)+(0.748373578962)*0.5**o
            arg[(0, 3, 2, 2)]=0.67972061312*x[0]**o + (-0.27551716185)*x[0] + (-0.572089135958)*x[1]**o + (-0.0708199092064)*x[1]
            ref[(0, 3, 2, 2)]=-0.572089135958/(o+1.)+(-0.173168535528)+(0.67972061312)*0.5**o
            arg[(1, 0, 0, 0)]=0.261335697154*x[0]**o + (-0.107493850448)*x[0] + (-0.740471263365)*x[1]**o + (-0.0298502233236)*x[1]
            ref[(1, 0, 0, 0)]=-0.740471263365/(o+1.)+(-0.0686720368856)+(0.261335697154)*0.5**o
            arg[(1, 0, 0, 1)]=-0.0861374113885*x[0]**o + (0.990360738432)*x[0] + (0.751155987392)*x[1]**o + (0.368981308591)*x[1]
            ref[(1, 0, 0, 1)]=0.751155987392/(o+1.)+(0.679671023512)+(-0.0861374113885)*0.5**o
            arg[(1, 0, 0, 2)]=0.177010077196*x[0]**o + (0.0420583659065)*x[0] + (0.495693877022)*x[1]**o + (0.188874912342)*x[1]
            ref[(1, 0, 0, 2)]=0.495693877022/(o+1.)+(0.115466639124)+(0.177010077196)*0.5**o
            arg[(1, 0, 1, 0)]=0.304193075219*x[0]**o + (0.473961059244)*x[0] + (0.986621426756)*x[1]**o + (0.663228582174)*x[1]
            ref[(1, 0, 1, 0)]=0.986621426756/(o+1.)+(0.568594820709)+(0.304193075219)*0.5**o
            arg[(1, 0, 1, 1)]=0.948253046139*x[0]**o + (-0.741978013317)*x[0] + (0.26247329021)*x[1]**o + (0.72336017185)*x[1]
            ref[(1, 0, 1, 1)]=0.26247329021/(o+1.)+(-0.00930892073368)+(0.948253046139)*0.5**o
            arg[(1, 0, 1, 2)]=0.163434020612*x[0]**o + (0.0457839705721)*x[0] + (-0.527957794766)*x[1]**o + (0.193999323406)*x[1]
            ref[(1, 0, 1, 2)]=-0.527957794766/(o+1.)+(0.119891646989)+(0.163434020612)*0.5**o
            arg[(1, 0, 2, 0)]=-0.0216113533408*x[0]**o + (-0.256849304673)*x[0] + (0.419034626942)*x[1]**o + (-0.234309224665)*x[1]
            ref[(1, 0, 2, 0)]=0.419034626942/(o+1.)+(-0.245579264669)+(-0.0216113533408)*0.5**o
            arg[(1, 0, 2, 1)]=-0.0282764689645*x[0]**o + (-0.785252260437)*x[0] + (-0.874411099629)*x[1]**o + (-0.182550196234)*x[1]
            ref[(1, 0, 2, 1)]=-0.874411099629/(o+1.)+(-0.483901228335)+(-0.0282764689645)*0.5**o
            arg[(1, 0, 2, 2)]=0.743399404296*x[0]**o + (-0.149081324786)*x[0] + (-0.173000284157)*x[1]**o + (-0.691767359219)*x[1]
            ref[(1, 0, 2, 2)]=-0.173000284157/(o+1.)+(-0.420424342003)+(0.743399404296)*0.5**o
            arg[(1, 1, 0, 0)]=-0.806982274932*x[0]**o + (0.161175741242)*x[0] + (0.538171381443)*x[1]**o + (0.646881259381)*x[1]
            ref[(1, 1, 0, 0)]=0.538171381443/(o+1.)+(0.404028500312)+(-0.806982274932)*0.5**o
            arg[(1, 1, 0, 1)]=0.685659567353*x[0]**o + (0.877054713602)*x[0] + (-0.828068517379)*x[1]**o + (0.848372048129)*x[1]
            ref[(1, 1, 0, 1)]=-0.828068517379/(o+1.)+(0.862713380866)+(0.685659567353)*0.5**o
            arg[(1, 1, 0, 2)]=-0.432595629777*x[0]**o + (-0.296551773187)*x[0] + (-0.442771868653)*x[1]**o + (0.45593489139)*x[1]
            ref[(1, 1, 0, 2)]=-0.442771868653/(o+1.)+(0.0796915591016)+(-0.432595629777)*0.5**o
            arg[(1, 1, 1, 0)]=0.867283952897*x[0]**o + (-0.334428193775)*x[0] + (-0.165368173345)*x[1]**o + (0.804968244439)*x[1]
            ref[(1, 1, 1, 0)]=-0.165368173345/(o+1.)+(0.235270025332)+(0.867283952897)*0.5**o
            arg[(1, 1, 1, 1)]=0.994087112901*x[0]**o + (-0.110820736007)*x[0] + (-0.880651063711)*x[1]**o + (0.614665188661)*x[1]
            ref[(1, 1, 1, 1)]=-0.880651063711/(o+1.)+(0.251922226327)+(0.994087112901)*0.5**o
            arg[(1, 1, 1, 2)]=-0.409330855752*x[0]**o + (-0.777571313378)*x[0] + (-0.350664153476)*x[1]**o + (-0.482478697428)*x[1]
            ref[(1, 1, 1, 2)]=-0.350664153476/(o+1.)+(-0.630025005403)+(-0.409330855752)*0.5**o
            arg[(1, 1, 2, 0)]=-0.101396980828*x[0]**o + (-0.604714074645)*x[0] + (-0.72338864051)*x[1]**o + (-0.826881772142)*x[1]
            ref[(1, 1, 2, 0)]=-0.72338864051/(o+1.)+(-0.715797923393)+(-0.101396980828)*0.5**o
            arg[(1, 1, 2, 1)]=-0.506357571623*x[0]**o + (-0.00195685376592)*x[0] + (0.936337868002)*x[1]**o + (-0.0375218094355)*x[1]
            ref[(1, 1, 2, 1)]=0.936337868002/(o+1.)+(-0.0197393316007)+(-0.506357571623)*0.5**o
            arg[(1, 1, 2, 2)]=-0.84653779744*x[0]**o + (-0.781456122557)*x[0] + (0.493913170566)*x[1]**o + (0.11385074485)*x[1]
            ref[(1, 1, 2, 2)]=0.493913170566/(o+1.)+(-0.333802688853)+(-0.84653779744)*0.5**o
            arg[(1, 2, 0, 0)]=0.985552774968*x[0]**o + (0.476568613308)*x[0] + (-0.017153817049)*x[1]**o + (-0.787854642867)*x[1]
            ref[(1, 2, 0, 0)]=-0.017153817049/(o+1.)+(-0.15564301478)+(0.985552774968)*0.5**o
            arg[(1, 2, 0, 1)]=0.407438417695*x[0]**o + (0.975690293134)*x[0] + (0.229309618293)*x[1]**o + (0.0522649012632)*x[1]
            ref[(1, 2, 0, 1)]=0.229309618293/(o+1.)+(0.513977597198)+(0.407438417695)*0.5**o
            arg[(1, 2, 0, 2)]=-0.804257406998*x[0]**o + (0.637471121005)*x[0] + (-0.443060615421)*x[1]**o + (-0.697013383842)*x[1]
            ref[(1, 2, 0, 2)]=-0.443060615421/(o+1.)+(-0.0297711314187)+(-0.804257406998)*0.5**o
            arg[(1, 2, 1, 0)]=0.038302026756*x[0]**o + (0.880209856929)*x[0] + (-0.619384259397)*x[1]**o + (-0.846748141196)*x[1]
            ref[(1, 2, 1, 0)]=-0.619384259397/(o+1.)+(0.0167308578668)+(0.038302026756)*0.5**o
            arg[(1, 2, 1, 1)]=-0.417755806454*x[0]**o + (0.328319014185)*x[0] + (-0.846556851186)*x[1]**o + (0.741483794753)*x[1]
            ref[(1, 2, 1, 1)]=-0.846556851186/(o+1.)+(0.534901404469)+(-0.417755806454)*0.5**o
            arg[(1, 2, 1, 2)]=-0.882623621997*x[0]**o + (-0.0723576572479)*x[0] + (-0.436696041146)*x[1]**o + (-0.39189712261)*x[1]
            ref[(1, 2, 1, 2)]=-0.436696041146/(o+1.)+(-0.232127389929)+(-0.882623621997)*0.5**o
            arg[(1, 2, 2, 0)]=-0.325552551491*x[0]**o + (-0.218321922003)*x[0] + (0.347184709565)*x[1]**o + (-0.747306304671)*x[1]
            ref[(1, 2, 2, 0)]=0.347184709565/(o+1.)+(-0.482814113337)+(-0.325552551491)*0.5**o
            arg[(1, 2, 2, 1)]=-0.469555698303*x[0]**o + (-0.225271053366)*x[0] + (-0.444288983753)*x[1]**o + (0.703225770482)*x[1]
            ref[(1, 2, 2, 1)]=-0.444288983753/(o+1.)+(0.238977358558)+(-0.469555698303)*0.5**o
            arg[(1, 2, 2, 2)]=-0.958577376182*x[0]**o + (0.782192041938)*x[0] + (-0.32683555769)*x[1]**o + (-0.423402971979)*x[1]
            ref[(1, 2, 2, 2)]=-0.32683555769/(o+1.)+(0.17939453498)+(-0.958577376182)*0.5**o
            arg[(1, 3, 0, 0)]=0.677924951269*x[0]**o + (-0.755833979979)*x[0] + (-0.827703316082)*x[1]**o + (0.0766490066888)*x[1]
            ref[(1, 3, 0, 0)]=-0.827703316082/(o+1.)+(-0.339592486645)+(0.677924951269)*0.5**o
            arg[(1, 3, 0, 1)]=0.131133965719*x[0]**o + (0.840605666424)*x[0] + (-0.383386480569)*x[1]**o + (0.699597432722)*x[1]
            ref[(1, 3, 0, 1)]=-0.383386480569/(o+1.)+(0.770101549573)+(0.131133965719)*0.5**o
            arg[(1, 3, 0, 2)]=-0.595485779679*x[0]**o + (0.844277054418)*x[0] + (0.619993788904)*x[1]**o + (-0.0733560127114)*x[1]
            ref[(1, 3, 0, 2)]=0.619993788904/(o+1.)+(0.385460520853)+(-0.595485779679)*0.5**o
            arg[(1, 3, 1, 0)]=0.281923385683*x[0]**o + (-0.149355380214)*x[0] + (-0.406951817356)*x[1]**o + (0.236506314167)*x[1]
            ref[(1, 3, 1, 0)]=-0.406951817356/(o+1.)+(0.0435754669762)+(0.281923385683)*0.5**o
            arg[(1, 3, 1, 1)]=0.110011031444*x[0]**o + (-0.943863092136)*x[0] + (-0.686371359082)*x[1]**o + (-0.941403484884)*x[1]
            ref[(1, 3, 1, 1)]=-0.686371359082/(o+1.)+(-0.94263328851)+(0.110011031444)*0.5**o
            arg[(1, 3, 1, 2)]=0.689359361148*x[0]**o + (0.207160032279)*x[0] + (0.283896397039)*x[1]**o + (-0.625157619088)*x[1]
            ref[(1, 3, 1, 2)]=0.283896397039/(o+1.)+(-0.208998793404)+(0.689359361148)*0.5**o
            arg[(1, 3, 2, 0)]=0.533278393238*x[0]**o + (-0.731241903567)*x[0] + (0.491412437012)*x[1]**o + (-0.696083839623)*x[1]
            ref[(1, 3, 2, 0)]=0.491412437012/(o+1.)+(-0.713662871595)+(0.533278393238)*0.5**o
            arg[(1, 3, 2, 1)]=-0.460085073109*x[0]**o + (0.884996956248)*x[0] + (-0.210257270863)*x[1]**o + (0.562742720087)*x[1]
            ref[(1, 3, 2, 1)]=-0.210257270863/(o+1.)+(0.723869838168)+(-0.460085073109)*0.5**o
            arg[(1, 3, 2, 2)]=-0.597356142436*x[0]**o + (0.188852006572)*x[0] + (-0.319671400681)*x[1]**o + (0.285066855037)*x[1]
            ref[(1, 3, 2, 2)]=-0.319671400681/(o+1.)+(0.236959430804)+(-0.597356142436)*0.5**o
            arg[(2, 0, 0, 0)]=0.536662752282*x[0]**o + (0.734901792836)*x[0] + (-0.0213289644194)*x[1]**o + (-0.410130467499)*x[1]
            ref[(2, 0, 0, 0)]=-0.0213289644194/(o+1.)+(0.162385662668)+(0.536662752282)*0.5**o
            arg[(2, 0, 0, 1)]=0.340069309972*x[0]**o + (0.093370450804)*x[0] + (0.791632149012)*x[1]**o + (0.773402526766)*x[1]
            ref[(2, 0, 0, 1)]=0.791632149012/(o+1.)+(0.433386488785)+(0.340069309972)*0.5**o
            arg[(2, 0, 0, 2)]=0.627506743731*x[0]**o + (0.686572206487)*x[0] + (0.183332315986)*x[1]**o + (0.937241008111)*x[1]
            ref[(2, 0, 0, 2)]=0.183332315986/(o+1.)+(0.811906607299)+(0.627506743731)*0.5**o
            arg[(2, 0, 1, 0)]=0.687282751748*x[0]**o + (0.080351077343)*x[0] + (0.649098739356)*x[1]**o + (-0.737427449737)*x[1]
            ref[(2, 0, 1, 0)]=0.649098739356/(o+1.)+(-0.328538186197)+(0.687282751748)*0.5**o
            arg[(2, 0, 1, 1)]=-0.912500113677*x[0]**o + (-0.963525620879)*x[0] + (0.70541361826)*x[1]**o + (-0.440730632651)*x[1]
            ref[(2, 0, 1, 1)]=0.70541361826/(o+1.)+(-0.702128126765)+(-0.912500113677)*0.5**o
            arg[(2, 0, 1, 2)]=0.897906169042*x[0]**o + (0.427477634007)*x[0] + (-0.0964953650436)*x[1]**o + (-0.220471922901)*x[1]
            ref[(2, 0, 1, 2)]=-0.0964953650436/(o+1.)+(0.103502855553)+(0.897906169042)*0.5**o
            arg[(2, 0, 2, 0)]=-0.660277297424*x[0]**o + (0.84157772671)*x[0] + (0.938976164889)*x[1]**o + (0.409037858384)*x[1]
            ref[(2, 0, 2, 0)]=0.938976164889/(o+1.)+(0.625307792547)+(-0.660277297424)*0.5**o
            arg[(2, 0, 2, 1)]=-0.103191703423*x[0]**o + (-0.971213168577)*x[0] + (0.207917513569)*x[1]**o + (0.158982435015)*x[1]
            ref[(2, 0, 2, 1)]=0.207917513569/(o+1.)+(-0.406115366781)+(-0.103191703423)*0.5**o
            arg[(2, 0, 2, 2)]=-0.0541613027508*x[0]**o + (-0.997657217558)*x[0] + (-0.0558137144631)*x[1]**o + (-0.32017418667)*x[1]
            ref[(2, 0, 2, 2)]=-0.0558137144631/(o+1.)+(-0.658915702114)+(-0.0541613027508)*0.5**o
            arg[(2, 1, 0, 0)]=-0.998767212141*x[0]**o + (0.235734431522)*x[0] + (0.438703949577)*x[1]**o + (-0.308540143318)*x[1]
            ref[(2, 1, 0, 0)]=0.438703949577/(o+1.)+(-0.0364028558981)+(-0.998767212141)*0.5**o
            arg[(2, 1, 0, 1)]=0.384017310499*x[0]**o + (-0.578798741373)*x[0] + (-0.708705590482)*x[1]**o + (-0.429528868028)*x[1]
            ref[(2, 1, 0, 1)]=-0.708705590482/(o+1.)+(-0.5041638047)+(0.384017310499)*0.5**o
            arg[(2, 1, 0, 2)]=0.0764564103122*x[0]**o + (-0.711450334741)*x[0] + (0.857104692535)*x[1]**o + (0.42757990039)*x[1]
            ref[(2, 1, 0, 2)]=0.857104692535/(o+1.)+(-0.141935217175)+(0.0764564103122)*0.5**o
            arg[(2, 1, 1, 0)]=0.719419235813*x[0]**o + (-0.203648430549)*x[0] + (0.239503429562)*x[1]**o + (-0.130534436421)*x[1]
            ref[(2, 1, 1, 0)]=0.239503429562/(o+1.)+(-0.167091433485)+(0.719419235813)*0.5**o
            arg[(2, 1, 1, 1)]=0.587967228216*x[0]**o + (-0.608515716431)*x[0] + (-0.184370566388)*x[1]**o + (0.22629548246)*x[1]
            ref[(2, 1, 1, 1)]=-0.184370566388/(o+1.)+(-0.191110116985)+(0.587967228216)*0.5**o
            arg[(2, 1, 1, 2)]=0.52403193447*x[0]**o + (-0.525370212389)*x[0] + (-0.384319457892)*x[1]**o + (0.638666309019)*x[1]
            ref[(2, 1, 1, 2)]=-0.384319457892/(o+1.)+(0.0566480483151)+(0.52403193447)*0.5**o
            arg[(2, 1, 2, 0)]=0.491134441315*x[0]**o + (-0.521470203813)*x[0] + (0.802050325395)*x[1]**o + (0.869577181388)*x[1]
            ref[(2, 1, 2, 0)]=0.802050325395/(o+1.)+(0.174053488788)+(0.491134441315)*0.5**o
            arg[(2, 1, 2, 1)]=0.875430398329*x[0]**o + (-0.543431702701)*x[0] + (-0.832340317261)*x[1]**o + (0.652878451478)*x[1]
            ref[(2, 1, 2, 1)]=-0.832340317261/(o+1.)+(0.0547233743885)+(0.875430398329)*0.5**o
            arg[(2, 1, 2, 2)]=-0.670937275333*x[0]**o + (0.131298119486)*x[0] + (-0.0871105792012)*x[1]**o + (0.641374491434)*x[1]
            ref[(2, 1, 2, 2)]=-0.0871105792012/(o+1.)+(0.38633630546)+(-0.670937275333)*0.5**o
            arg[(2, 2, 0, 0)]=0.284324733636*x[0]**o + (0.471211370451)*x[0] + (-0.151090307423)*x[1]**o + (0.57611108319)*x[1]
            ref[(2, 2, 0, 0)]=-0.151090307423/(o+1.)+(0.52366122682)+(0.284324733636)*0.5**o
            arg[(2, 2, 0, 1)]=-0.548604196173*x[0]**o + (0.40209078592)*x[0] + (0.818130887705)*x[1]**o + (-0.554010688621)*x[1]
            ref[(2, 2, 0, 1)]=0.818130887705/(o+1.)+(-0.0759599513502)+(-0.548604196173)*0.5**o
            arg[(2, 2, 0, 2)]=0.776968530942*x[0]**o + (-0.306302710366)*x[0] + (0.127925924934)*x[1]**o + (-0.465860505258)*x[1]
            ref[(2, 2, 0, 2)]=0.127925924934/(o+1.)+(-0.386081607812)+(0.776968530942)*0.5**o
            arg[(2, 2, 1, 0)]=0.82843842684*x[0]**o + (0.464798499703)*x[0] + (-0.906940905344)*x[1]**o + (-0.336177616405)*x[1]
            ref[(2, 2, 1, 0)]=-0.906940905344/(o+1.)+(0.0643104416491)+(0.82843842684)*0.5**o
            arg[(2, 2, 1, 1)]=0.299590407679*x[0]**o + (0.535839011456)*x[0] + (0.47438144474)*x[1]**o + (-0.88257467794)*x[1]
            ref[(2, 2, 1, 1)]=0.47438144474/(o+1.)+(-0.173367833242)+(0.299590407679)*0.5**o
            arg[(2, 2, 1, 2)]=-0.62984535276*x[0]**o + (0.225342112411)*x[0] + (0.0528947217903)*x[1]**o + (-0.68596013749)*x[1]
            ref[(2, 2, 1, 2)]=0.0528947217903/(o+1.)+(-0.23030901254)+(-0.62984535276)*0.5**o
            arg[(2, 2, 2, 0)]=-0.160314751361*x[0]**o + (-0.216237786495)*x[0] + (0.0280522892369)*x[1]**o + (-0.502371389281)*x[1]
            ref[(2, 2, 2, 0)]=0.0280522892369/(o+1.)+(-0.359304587888)+(-0.160314751361)*0.5**o
            arg[(2, 2, 2, 1)]=-0.0934510018621*x[0]**o + (-0.491532309789)*x[0] + (-0.27346242444)*x[1]**o + (-0.29771260606)*x[1]
            ref[(2, 2, 2, 1)]=-0.27346242444/(o+1.)+(-0.394622457925)+(-0.0934510018621)*0.5**o
            arg[(2, 2, 2, 2)]=0.50717214472*x[0]**o + (-0.544371965447)*x[0] + (0.0235156058389)*x[1]**o + (-0.511483894782)*x[1]
            ref[(2, 2, 2, 2)]=0.0235156058389/(o+1.)+(-0.527927930114)+(0.50717214472)*0.5**o
            arg[(2, 3, 0, 0)]=0.737976165003*x[0]**o + (0.959616136445)*x[0] + (-0.210759304758)*x[1]**o + (0.223486354775)*x[1]
            ref[(2, 3, 0, 0)]=-0.210759304758/(o+1.)+(0.59155124561)+(0.737976165003)*0.5**o
            arg[(2, 3, 0, 1)]=-0.831702367912*x[0]**o + (0.0514519194931)*x[0] + (0.851804745514)*x[1]**o + (0.887382269361)*x[1]
            ref[(2, 3, 0, 1)]=0.851804745514/(o+1.)+(0.469417094427)+(-0.831702367912)*0.5**o
            arg[(2, 3, 0, 2)]=-0.0231264189362*x[0]**o + (-0.0436925966338)*x[0] + (0.625694814887)*x[1]**o + (-0.478902625743)*x[1]
            ref[(2, 3, 0, 2)]=0.625694814887/(o+1.)+(-0.261297611188)+(-0.0231264189362)*0.5**o
            arg[(2, 3, 1, 0)]=0.195140869353*x[0]**o + (0.707325582363)*x[0] + (-0.810551458342)*x[1]**o + (-0.774651069983)*x[1]
            ref[(2, 3, 1, 0)]=-0.810551458342/(o+1.)+(-0.0336627438101)+(0.195140869353)*0.5**o
            arg[(2, 3, 1, 1)]=-0.647397587613*x[0]**o + (0.454036103546)*x[0] + (-0.861520942822)*x[1]**o + (0.695616290275)*x[1]
            ref[(2, 3, 1, 1)]=-0.861520942822/(o+1.)+(0.574826196911)+(-0.647397587613)*0.5**o
            arg[(2, 3, 1, 2)]=-0.582273085669*x[0]**o + (-0.571866365931)*x[0] + (-0.445225345329)*x[1]**o + (0.50338725834)*x[1]
            ref[(2, 3, 1, 2)]=-0.445225345329/(o+1.)+(-0.0342395537958)+(-0.582273085669)*0.5**o
            arg[(2, 3, 2, 0)]=0.33469010824*x[0]**o + (0.714197673411)*x[0] + (-0.56563394303)*x[1]**o + (-0.02157308988)*x[1]
            ref[(2, 3, 2, 0)]=-0.56563394303/(o+1.)+(0.346312291765)+(0.33469010824)*0.5**o
            arg[(2, 3, 2, 1)]=0.358100999781*x[0]**o + (-0.460527671727)*x[0] + (-0.640110665237)*x[1]**o + (-0.589073866891)*x[1]
            ref[(2, 3, 2, 1)]=-0.640110665237/(o+1.)+(-0.524800769309)+(0.358100999781)*0.5**o
            arg[(2, 3, 2, 2)]=-0.331903666984*x[0]**o + (0.947246992486)*x[0] + (0.738792536596)*x[1]**o + (-0.24591990824)*x[1]
            ref[(2, 3, 2, 2)]=0.738792536596/(o+1.)+(0.350663542123)+(-0.331903666984)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.467035102458*x[0]**o + (-0.251419058298)*x[0] + (-0.264596358945)*x[1]**o + (-0.560395488902)*x[1] + (0.797693400093)*x[2]**o + (-0.187765216914)*x[2]
            ref[(0, 0, 0, 0)]=0.533097041148/(o+1.)+(-0.499789882057)+(-0.467035102458)*0.5**o
            arg[(0, 0, 0, 1)]=0.869359795442*x[0]**o + (-0.588764364361)*x[0] + (0.64825407781)*x[1]**o + (-0.824899713236)*x[1] + (-0.721315812406)*x[2]**o + (0.35608684492)*x[2]
            ref[(0, 0, 0, 1)]=-0.073061734596/(o+1.)+(-0.528788616338)+(0.869359795442)*0.5**o
            arg[(0, 0, 0, 2)]=-0.349349788323*x[0]**o + (0.265147599224)*x[0] + (-0.463198419516)*x[1]**o + (0.166574116935)*x[1] + (0.259930498856)*x[2]**o + (0.719631828858)*x[2]
            ref[(0, 0, 0, 2)]=-0.20326792066/(o+1.)+(0.575676772508)+(-0.349349788323)*0.5**o
            arg[(0, 0, 1, 0)]=0.991357275156*x[0]**o + (0.975260674904)*x[0] + (0.406603200686)*x[1]**o + (0.725137425042)*x[1] + (0.123671423128)*x[2]**o + (-0.741637730847)*x[2]
            ref[(0, 0, 1, 0)]=0.530274623814/(o+1.)+(0.479380184549)+(0.991357275156)*0.5**o
            arg[(0, 0, 1, 1)]=0.0717048791527*x[0]**o + (-0.864669571825)*x[0] + (0.589075568402)*x[1]**o + (0.498736135366)*x[1] + (-0.511332244529)*x[2]**o + (-0.273457225346)*x[2]
            ref[(0, 0, 1, 1)]=0.0777433238733/(o+1.)+(-0.319695330902)+(0.0717048791527)*0.5**o
            arg[(0, 0, 1, 2)]=0.787329577126*x[0]**o + (0.959414497456)*x[0] + (-0.819175411759)*x[1]**o + (0.141862546882)*x[1] + (-0.919901248833)*x[2]**o + (-0.746601079136)*x[2]
            ref[(0, 0, 1, 2)]=-1.73907666059/(o+1.)+(0.177337982601)+(0.787329577126)*0.5**o
            arg[(0, 0, 2, 0)]=-0.198452145109*x[0]**o + (0.291655596982)*x[0] + (0.751112540817)*x[1]**o + (-0.219910313526)*x[1] + (-0.251157282973)*x[2]**o + (0.286680512708)*x[2]
            ref[(0, 0, 2, 0)]=0.499955257844/(o+1.)+(0.179212898082)+(-0.198452145109)*0.5**o
            arg[(0, 0, 2, 1)]=-0.275212848953*x[0]**o + (-0.211461488304)*x[0] + (0.420190843794)*x[1]**o + (-0.348676384657)*x[1] + (-0.9118860706)*x[2]**o + (0.746608599259)*x[2]
            ref[(0, 0, 2, 1)]=-0.491695226806/(o+1.)+(0.0932353631488)+(-0.275212848953)*0.5**o
            arg[(0, 0, 2, 2)]=-0.0467880899884*x[0]**o + (-0.238759481982)*x[0] + (0.657646690443)*x[1]**o + (-0.676705155695)*x[1] + (-0.87796293555)*x[2]**o + (0.25571023986)*x[2]
            ref[(0, 0, 2, 2)]=-0.220316245107/(o+1.)+(-0.329877198909)+(-0.0467880899884)*0.5**o
            arg[(0, 1, 0, 0)]=-0.632764865144*x[0]**o + (-0.419674133447)*x[0] + (0.287087095243)*x[1]**o + (-0.957962053859)*x[1] + (0.511802830892)*x[2]**o + (-0.421203403032)*x[2]
            ref[(0, 1, 0, 0)]=0.798889926135/(o+1.)+(-0.899419795169)+(-0.632764865144)*0.5**o
            arg[(0, 1, 0, 1)]=0.586019090615*x[0]**o + (-0.167464197058)*x[0] + (0.318252251586)*x[1]**o + (-0.228275970615)*x[1] + (0.985859750073)*x[2]**o + (0.616213932798)*x[2]
            ref[(0, 1, 0, 1)]=1.30411200166/(o+1.)+(0.110236882563)+(0.586019090615)*0.5**o
            arg[(0, 1, 0, 2)]=-0.616986449025*x[0]**o + (0.607737195286)*x[0] + (0.677948518394)*x[1]**o + (-0.524994214574)*x[1] + (-0.17296534319)*x[2]**o + (-0.049883927315)*x[2]
            ref[(0, 1, 0, 2)]=0.504983175204/(o+1.)+(0.0164295266989)+(-0.616986449025)*0.5**o
            arg[(0, 1, 1, 0)]=-0.482060374735*x[0]**o + (-0.235977000039)*x[0] + (0.248386639004)*x[1]**o + (-0.979316344487)*x[1] + (-0.274233529399)*x[2]**o + (-0.364731275135)*x[2]
            ref[(0, 1, 1, 0)]=-0.0258468903957/(o+1.)+(-0.79001230983)+(-0.482060374735)*0.5**o
            arg[(0, 1, 1, 1)]=0.726858624819*x[0]**o + (0.459641633196)*x[0] + (0.543353922391)*x[1]**o + (0.774448718791)*x[1] + (0.505833433035)*x[2]**o + (0.882683934964)*x[2]
            ref[(0, 1, 1, 1)]=1.04918735543/(o+1.)+(1.05838714348)+(0.726858624819)*0.5**o
            arg[(0, 1, 1, 2)]=0.26366552565*x[0]**o + (0.284582770232)*x[0] + (-0.562626960454)*x[1]**o + (0.29362040564)*x[1] + (-0.871269323789)*x[2]**o + (-0.358797340912)*x[2]
            ref[(0, 1, 1, 2)]=-1.43389628424/(o+1.)+(0.10970291748)+(0.26366552565)*0.5**o
            arg[(0, 1, 2, 0)]=0.308311773806*x[0]**o + (0.285324964042)*x[0] + (-0.444922066402)*x[1]**o + (-0.15298794608)*x[1] + (0.965161321714)*x[2]**o + (0.180215393404)*x[2]
            ref[(0, 1, 2, 0)]=0.520239255312/(o+1.)+(0.156276205683)+(0.308311773806)*0.5**o
            arg[(0, 1, 2, 1)]=-0.815295059083*x[0]**o + (-0.0108882075488)*x[0] + (0.472892509617)*x[1]**o + (-0.965423394492)*x[1] + (0.166448404027)*x[2]**o + (-0.730977186792)*x[2]
            ref[(0, 1, 2, 1)]=0.639340913644/(o+1.)+(-0.853644394416)+(-0.815295059083)*0.5**o
            arg[(0, 1, 2, 2)]=0.208659550397*x[0]**o + (0.508169088)*x[0] + (-0.865668424064)*x[1]**o + (-0.877700838456)*x[1] + (0.918174809019)*x[2]**o + (0.954013932603)*x[2]
            ref[(0, 1, 2, 2)]=0.0525063849549/(o+1.)+(0.292241091074)+(0.208659550397)*0.5**o
            arg[(0, 2, 0, 0)]=0.115970702594*x[0]**o + (-0.596644199538)*x[0] + (0.311958551628)*x[1]**o + (-0.51367779422)*x[1] + (0.897012467721)*x[2]**o + (0.44689385797)*x[2]
            ref[(0, 2, 0, 0)]=1.20897101935/(o+1.)+(-0.331714067894)+(0.115970702594)*0.5**o
            arg[(0, 2, 0, 1)]=-0.883990632236*x[0]**o + (0.0758644137398)*x[0] + (0.519820126292)*x[1]**o + (0.723336483182)*x[1] + (0.268551624903)*x[2]**o + (-0.64206429742)*x[2]
            ref[(0, 2, 0, 1)]=0.788371751195/(o+1.)+(0.0785682997512)+(-0.883990632236)*0.5**o
            arg[(0, 2, 0, 2)]=-0.314635954761*x[0]**o + (0.700916840983)*x[0] + (-0.814653449644)*x[1]**o + (0.997648672877)*x[1] + (0.662657126984)*x[2]**o + (0.341155838985)*x[2]
            ref[(0, 2, 0, 2)]=-0.15199632266/(o+1.)+(1.01986067642)+(-0.314635954761)*0.5**o
            arg[(0, 2, 1, 0)]=-0.701455996525*x[0]**o + (-0.927528868263)*x[0] + (-0.821859845343)*x[1]**o + (0.764004357073)*x[1] + (-0.935920041767)*x[2]**o + (0.27494798422)*x[2]
            ref[(0, 2, 1, 0)]=-1.75777988711/(o+1.)+(0.055711736515)+(-0.701455996525)*0.5**o
            arg[(0, 2, 1, 1)]=-0.987802774792*x[0]**o + (0.162767960694)*x[0] + (0.872178319201)*x[1]**o + (0.235947723486)*x[1] + (-0.711027867257)*x[2]**o + (0.799420489256)*x[2]
            ref[(0, 2, 1, 1)]=0.161150451944/(o+1.)+(0.599068086718)+(-0.987802774792)*0.5**o
            arg[(0, 2, 1, 2)]=0.720798305526*x[0]**o + (-0.0694194250118)*x[0] + (0.633468305874)*x[1]**o + (0.773318145296)*x[1] + (0.68574495051)*x[2]**o + (0.897695131918)*x[2]
            ref[(0, 2, 1, 2)]=1.31921325638/(o+1.)+(0.800796926101)+(0.720798305526)*0.5**o
            arg[(0, 2, 2, 0)]=0.408547169332*x[0]**o + (0.301655386939)*x[0] + (-0.436607464818)*x[1]**o + (-0.236770685219)*x[1] + (-0.413946206434)*x[2]**o + (-0.844923468664)*x[2]
            ref[(0, 2, 2, 0)]=-0.850553671252/(o+1.)+(-0.390019383472)+(0.408547169332)*0.5**o
            arg[(0, 2, 2, 1)]=0.947198588167*x[0]**o + (-0.469171065044)*x[0] + (-0.739378505159)*x[1]**o + (-0.666691393377)*x[1] + (-0.945411418115)*x[2]**o + (-0.980112045152)*x[2]
            ref[(0, 2, 2, 1)]=-1.68478992327/(o+1.)+(-1.05798725179)+(0.947198588167)*0.5**o
            arg[(0, 2, 2, 2)]=-0.429781492303*x[0]**o + (-0.97402829724)*x[0] + (-0.51918592526)*x[1]**o + (-0.789073760838)*x[1] + (-0.462571228013)*x[2]**o + (-0.571706309066)*x[2]
            ref[(0, 2, 2, 2)]=-0.981757153273/(o+1.)+(-1.16740418357)+(-0.429781492303)*0.5**o
            arg[(0, 3, 0, 0)]=-0.263918603724*x[0]**o + (-0.818714829908)*x[0] + (0.786991882137)*x[1]**o + (0.844122500849)*x[1] + (0.0637065240462)*x[2]**o + (0.913132558031)*x[2]
            ref[(0, 3, 0, 0)]=0.850698406183/(o+1.)+(0.469270114486)+(-0.263918603724)*0.5**o
            arg[(0, 3, 0, 1)]=0.991415227383*x[0]**o + (-0.1249900782)*x[0] + (0.360603945223)*x[1]**o + (0.339354107033)*x[1] + (-0.837255456212)*x[2]**o + (-0.379983984192)*x[2]
            ref[(0, 3, 0, 1)]=-0.476651510989/(o+1.)+(-0.0828099776793)+(0.991415227383)*0.5**o
            arg[(0, 3, 0, 2)]=0.633617563858*x[0]**o + (0.160811344776)*x[0] + (0.294513185361)*x[1]**o + (-0.4396329347)*x[1] + (-0.780484244542)*x[2]**o + (-0.615396502028)*x[2]
            ref[(0, 3, 0, 2)]=-0.48597105918/(o+1.)+(-0.447109045976)+(0.633617563858)*0.5**o
            arg[(0, 3, 1, 0)]=0.446331678629*x[0]**o + (-0.130760677436)*x[0] + (0.143590252494)*x[1]**o + (0.424751661976)*x[1] + (0.0864170160235)*x[2]**o + (0.836904511639)*x[2]
            ref[(0, 3, 1, 0)]=0.230007268517/(o+1.)+(0.56544774809)+(0.446331678629)*0.5**o
            arg[(0, 3, 1, 1)]=-0.440193249165*x[0]**o + (0.463327231953)*x[0] + (0.963006203231)*x[1]**o + (0.693434238862)*x[1] + (0.085564002406)*x[2]**o + (0.287398747075)*x[2]
            ref[(0, 3, 1, 1)]=1.04857020564/(o+1.)+(0.722080108945)+(-0.440193249165)*0.5**o
            arg[(0, 3, 1, 2)]=0.473408251559*x[0]**o + (-0.000645063632342)*x[0] + (-0.41446579476)*x[1]**o + (-0.0969951871953)*x[1] + (-0.737869409144)*x[2]**o + (-0.402102964047)*x[2]
            ref[(0, 3, 1, 2)]=-1.1523352039/(o+1.)+(-0.249871607437)+(0.473408251559)*0.5**o
            arg[(0, 3, 2, 0)]=-0.779055464612*x[0]**o + (-0.278349392656)*x[0] + (0.60991811458)*x[1]**o + (0.305465620964)*x[1] + (-0.175785292868)*x[2]**o + (-0.838752576285)*x[2]
            ref[(0, 3, 2, 0)]=0.434132821712/(o+1.)+(-0.405818173988)+(-0.779055464612)*0.5**o
            arg[(0, 3, 2, 1)]=-0.620253340826*x[0]**o + (0.132620917419)*x[0] + (0.695198775776)*x[1]**o + (-0.825155368706)*x[1] + (0.316784131256)*x[2]**o + (-0.909962707948)*x[2]
            ref[(0, 3, 2, 1)]=1.01198290703/(o+1.)+(-0.801248579617)+(-0.620253340826)*0.5**o
            arg[(0, 3, 2, 2)]=-0.429008368869*x[0]**o + (0.0984889657434)*x[0] + (-0.425052790882)*x[1]**o + (0.613813253627)*x[1] + (-0.0296434739431)*x[2]**o + (0.869046300778)*x[2]
            ref[(0, 3, 2, 2)]=-0.454696264825/(o+1.)+(0.790674260074)+(-0.429008368869)*0.5**o
            arg[(1, 0, 0, 0)]=0.373078673908*x[0]**o + (-0.0218515532569)*x[0] + (-0.625612752416)*x[1]**o + (0.953124426268)*x[1] + (0.233422498697)*x[2]**o + (0.153255870231)*x[2]
            ref[(1, 0, 0, 0)]=-0.392190253719/(o+1.)+(0.542264371621)+(0.373078673908)*0.5**o
            arg[(1, 0, 0, 1)]=-0.585251702499*x[0]**o + (0.147133779176)*x[0] + (0.419597659646)*x[1]**o + (-0.818120861492)*x[1] + (0.519556084174)*x[2]**o + (0.469302932316)*x[2]
            ref[(1, 0, 0, 1)]=0.939153743819/(o+1.)+(-0.100842075)+(-0.585251702499)*0.5**o
            arg[(1, 0, 0, 2)]=-0.274251150569*x[0]**o + (0.698297797916)*x[0] + (-0.110028059725)*x[1]**o + (0.0396097732196)*x[1] + (0.268217134217)*x[2]**o + (-0.504871303045)*x[2]
            ref[(1, 0, 0, 2)]=0.158189074492/(o+1.)+(0.116518134045)+(-0.274251150569)*0.5**o
            arg[(1, 0, 1, 0)]=0.936775072578*x[0]**o + (-0.291248464914)*x[0] + (-0.941351179304)*x[1]**o + (-0.502168224106)*x[1] + (-0.298246573788)*x[2]**o + (0.145457458454)*x[2]
            ref[(1, 0, 1, 0)]=-1.23959775309/(o+1.)+(-0.323979615283)+(0.936775072578)*0.5**o
            arg[(1, 0, 1, 1)]=-0.435523790161*x[0]**o + (0.760147261326)*x[0] + (-0.738419287353)*x[1]**o + (-0.109767974497)*x[1] + (0.202645692141)*x[2]**o + (0.0595757228961)*x[2]
            ref[(1, 0, 1, 1)]=-0.535773595212/(o+1.)+(0.354977504863)+(-0.435523790161)*0.5**o
            arg[(1, 0, 1, 2)]=-0.814900596046*x[0]**o + (-0.879120262756)*x[0] + (0.280203253752)*x[1]**o + (0.205630602312)*x[1] + (0.533702927043)*x[2]**o + (0.4706185982)*x[2]
            ref[(1, 0, 1, 2)]=0.813906180795/(o+1.)+(-0.101435531122)+(-0.814900596046)*0.5**o
            arg[(1, 0, 2, 0)]=0.925250517271*x[0]**o + (0.150525748617)*x[0] + (-0.985869075246)*x[1]**o + (-0.667137119896)*x[1] + (0.0622223278561)*x[2]**o + (0.714496053859)*x[2]
            ref[(1, 0, 2, 0)]=-0.92364674739/(o+1.)+(0.0989423412901)+(0.925250517271)*0.5**o
            arg[(1, 0, 2, 1)]=0.0280244064024*x[0]**o + (-0.682597733665)*x[0] + (-0.279061667336)*x[1]**o + (0.867472010636)*x[1] + (-0.198134019357)*x[2]**o + (-0.463505922115)*x[2]
            ref[(1, 0, 2, 1)]=-0.477195686693/(o+1.)+(-0.139315822572)+(0.0280244064024)*0.5**o
            arg[(1, 0, 2, 2)]=-0.715343790615*x[0]**o + (0.78890370885)*x[0] + (0.543106958927)*x[1]**o + (0.658466692143)*x[1] + (-0.869443256929)*x[2]**o + (-0.287406653302)*x[2]
            ref[(1, 0, 2, 2)]=-0.326336298001/(o+1.)+(0.579981873845)+(-0.715343790615)*0.5**o
            arg[(1, 1, 0, 0)]=-0.448798615533*x[0]**o + (-0.907206661173)*x[0] + (-0.62233498535)*x[1]**o + (0.845669598091)*x[1] + (0.232246824556)*x[2]**o + (-0.962827839113)*x[2]
            ref[(1, 1, 0, 0)]=-0.390088160794/(o+1.)+(-0.512182451098)+(-0.448798615533)*0.5**o
            arg[(1, 1, 0, 1)]=0.837844194405*x[0]**o + (-0.219082881451)*x[0] + (-0.806054760903)*x[1]**o + (-0.380172038803)*x[1] + (0.174399440469)*x[2]**o + (-0.0415758408915)*x[2]
            ref[(1, 1, 0, 1)]=-0.631655320434/(o+1.)+(-0.320415380572)+(0.837844194405)*0.5**o
            arg[(1, 1, 0, 2)]=0.435278433966*x[0]**o + (0.0141524600393)*x[0] + (0.110536147071)*x[1]**o + (0.778784900048)*x[1] + (0.618533285631)*x[2]**o + (-0.731790448313)*x[2]
            ref[(1, 1, 0, 2)]=0.729069432702/(o+1.)+(0.0305734558871)+(0.435278433966)*0.5**o
            arg[(1, 1, 1, 0)]=-0.384123860942*x[0]**o + (-0.448885597818)*x[0] + (0.164893715788)*x[1]**o + (-0.746698915314)*x[1] + (0.414240494458)*x[2]**o + (0.788617534529)*x[2]
            ref[(1, 1, 1, 0)]=0.579134210246/(o+1.)+(-0.203483489301)+(-0.384123860942)*0.5**o
            arg[(1, 1, 1, 1)]=-0.553047565208*x[0]**o + (0.75596460149)*x[0] + (-0.250277562964)*x[1]**o + (-0.074385663246)*x[1] + (0.930168532162)*x[2]**o + (-0.190051586779)*x[2]
            ref[(1, 1, 1, 1)]=0.679890969199/(o+1.)+(0.245763675733)+(-0.553047565208)*0.5**o
            arg[(1, 1, 1, 2)]=0.0132078076563*x[0]**o + (-0.513134172165)*x[0] + (-0.709542684771)*x[1]**o + (-0.156947916276)*x[1] + (-0.182711134948)*x[2]**o + (-0.240464558683)*x[2]
            ref[(1, 1, 1, 2)]=-0.892253819719/(o+1.)+(-0.455273323562)+(0.0132078076563)*0.5**o
            arg[(1, 1, 2, 0)]=0.0444700912729*x[0]**o + (0.521827119964)*x[0] + (0.125846559569)*x[1]**o + (-0.130188025216)*x[1] + (-0.762879393969)*x[2]**o + (0.0650733205685)*x[2]
            ref[(1, 1, 2, 0)]=-0.637032834401/(o+1.)+(0.228356207658)+(0.0444700912729)*0.5**o
            arg[(1, 1, 2, 1)]=0.315213030023*x[0]**o + (-0.906778342709)*x[0] + (0.186243531143)*x[1]**o + (0.0656169381806)*x[1] + (0.629370760303)*x[2]**o + (0.00654071209618)*x[2]
            ref[(1, 1, 2, 1)]=0.815614291446/(o+1.)+(-0.417310346216)+(0.315213030023)*0.5**o
            arg[(1, 1, 2, 2)]=-0.332361555217*x[0]**o + (0.336701609827)*x[0] + (0.690972279507)*x[1]**o + (0.425225223738)*x[1] + (-0.300505704544)*x[2]**o + (-0.555756135276)*x[2]
            ref[(1, 1, 2, 2)]=0.390466574962/(o+1.)+(0.103085349145)+(-0.332361555217)*0.5**o
            arg[(1, 2, 0, 0)]=0.364866468309*x[0]**o + (-0.85185156529)*x[0] + (0.728894431335)*x[1]**o + (0.487903181422)*x[1] + (0.5736223594)*x[2]**o + (-0.746258220122)*x[2]
            ref[(1, 2, 0, 0)]=1.30251679074/(o+1.)+(-0.555103301995)+(0.364866468309)*0.5**o
            arg[(1, 2, 0, 1)]=0.288904812318*x[0]**o + (0.512435052427)*x[0] + (0.722920936295)*x[1]**o + (-0.815855987112)*x[1] + (0.458442174677)*x[2]**o + (0.965873394577)*x[2]
            ref[(1, 2, 0, 1)]=1.18136311097/(o+1.)+(0.331226229946)+(0.288904812318)*0.5**o
            arg[(1, 2, 0, 2)]=0.123306009679*x[0]**o + (0.208452950887)*x[0] + (-0.264451942098)*x[1]**o + (-0.385973075302)*x[1] + (-0.271030409604)*x[2]**o + (-0.147086493275)*x[2]
            ref[(1, 2, 0, 2)]=-0.535482351703/(o+1.)+(-0.162303308845)+(0.123306009679)*0.5**o
            arg[(1, 2, 1, 0)]=-0.331261371687*x[0]**o + (-0.363018214403)*x[0] + (-0.0837283429243)*x[1]**o + (0.564064125935)*x[1] + (0.175221515604)*x[2]**o + (-0.611077552216)*x[2]
            ref[(1, 2, 1, 0)]=0.0914931726793/(o+1.)+(-0.205015820342)+(-0.331261371687)*0.5**o
            arg[(1, 2, 1, 1)]=0.542963804079*x[0]**o + (0.571019538416)*x[0] + (-0.00435747632607)*x[1]**o + (0.599341613752)*x[1] + (-0.723359916335)*x[2]**o + (0.120862101426)*x[2]
            ref[(1, 2, 1, 1)]=-0.727717392661/(o+1.)+(0.645611626797)+(0.542963804079)*0.5**o
            arg[(1, 2, 1, 2)]=-0.380632851214*x[0]**o + (-0.519011764733)*x[0] + (0.094702409145)*x[1]**o + (0.0123072921403)*x[1] + (0.334435491517)*x[2]**o + (0.416738738037)*x[2]
            ref[(1, 2, 1, 2)]=0.429137900663/(o+1.)+(-0.0449828672781)+(-0.380632851214)*0.5**o
            arg[(1, 2, 2, 0)]=-0.579223364675*x[0]**o + (0.719509567948)*x[0] + (-0.152147299233)*x[1]**o + (0.494703549826)*x[1] + (-0.204241674215)*x[2]**o + (-0.703372309492)*x[2]
            ref[(1, 2, 2, 0)]=-0.356388973449/(o+1.)+(0.255420404141)+(-0.579223364675)*0.5**o
            arg[(1, 2, 2, 1)]=-0.71831136495*x[0]**o + (-0.867282756164)*x[0] + (0.331694301835)*x[1]**o + (-0.429298175526)*x[1] + (-0.484640075549)*x[2]**o + (-0.36307244093)*x[2]
            ref[(1, 2, 2, 1)]=-0.152945773714/(o+1.)+(-0.82982668631)+(-0.71831136495)*0.5**o
            arg[(1, 2, 2, 2)]=0.773106187127*x[0]**o + (-0.924886581354)*x[0] + (-0.138484079732)*x[1]**o + (-0.211938724648)*x[1] + (0.769903385225)*x[2]**o + (0.59945466196)*x[2]
            ref[(1, 2, 2, 2)]=0.631419305493/(o+1.)+(-0.268685322021)+(0.773106187127)*0.5**o
            arg[(1, 3, 0, 0)]=-0.935692034451*x[0]**o + (0.25842470976)*x[0] + (-0.890399207216)*x[1]**o + (0.958472969063)*x[1] + (0.258395253008)*x[2]**o + (-0.543574284533)*x[2]
            ref[(1, 3, 0, 0)]=-0.632003954208/(o+1.)+(0.336661697145)+(-0.935692034451)*0.5**o
            arg[(1, 3, 0, 1)]=-0.177260075383*x[0]**o + (0.462461280258)*x[0] + (-0.418512727238)*x[1]**o + (-0.859841005152)*x[1] + (-0.211802432621)*x[2]**o + (0.681921089918)*x[2]
            ref[(1, 3, 0, 1)]=-0.63031515986/(o+1.)+(0.142270682512)+(-0.177260075383)*0.5**o
            arg[(1, 3, 0, 2)]=-0.0552793199739*x[0]**o + (-0.867545395934)*x[0] + (-0.837998968091)*x[1]**o + (-0.138398330411)*x[1] + (0.0452042592424)*x[2]**o + (0.614951299225)*x[2]
            ref[(1, 3, 0, 2)]=-0.792794708849/(o+1.)+(-0.19549621356)+(-0.0552793199739)*0.5**o
            arg[(1, 3, 1, 0)]=-0.752497761586*x[0]**o + (0.555682953952)*x[0] + (0.873498182146)*x[1]**o + (-0.00792780889225)*x[1] + (0.0165323207742)*x[2]**o + (-0.880982201977)*x[2]
            ref[(1, 3, 1, 0)]=0.89003050292/(o+1.)+(-0.166613528459)+(-0.752497761586)*0.5**o
            arg[(1, 3, 1, 1)]=-0.74977076563*x[0]**o + (0.313703003856)*x[0] + (-0.793540865174)*x[1]**o + (0.746554635686)*x[1] + (0.0575169957505)*x[2]**o + (-0.814277752869)*x[2]
            ref[(1, 3, 1, 1)]=-0.736023869424/(o+1.)+(0.122989943336)+(-0.74977076563)*0.5**o
            arg[(1, 3, 1, 2)]=0.46756346873*x[0]**o + (-0.0435953050944)*x[0] + (0.432202517183)*x[1]**o + (-0.815407198759)*x[1] + (-0.59606904174)*x[2]**o + (0.294303963007)*x[2]
            ref[(1, 3, 1, 2)]=-0.163866524557/(o+1.)+(-0.282349270423)+(0.46756346873)*0.5**o
            arg[(1, 3, 2, 0)]=-0.721953384249*x[0]**o + (0.531825282752)*x[0] + (-0.0037161111124)*x[1]**o + (-0.485975935512)*x[1] + (0.907002213042)*x[2]**o + (0.769002165326)*x[2]
            ref[(1, 3, 2, 0)]=0.90328610193/(o+1.)+(0.407425756283)+(-0.721953384249)*0.5**o
            arg[(1, 3, 2, 1)]=-0.0995896053446*x[0]**o + (0.161048562243)*x[0] + (-0.291816087739)*x[1]**o + (-0.00501888251374)*x[1] + (-0.827852134991)*x[2]**o + (-0.755496052015)*x[2]
            ref[(1, 3, 2, 1)]=-1.11966822273/(o+1.)+(-0.299733186143)+(-0.0995896053446)*0.5**o
            arg[(1, 3, 2, 2)]=0.149439682049*x[0]**o + (-0.419146457941)*x[0] + (-0.698954196404)*x[1]**o + (0.775585615862)*x[1] + (0.964393518008)*x[2]**o + (0.19860001198)*x[2]
            ref[(1, 3, 2, 2)]=0.265439321605/(o+1.)+(0.277519584951)+(0.149439682049)*0.5**o
            arg[(2, 0, 0, 0)]=0.667082624831*x[0]**o + (0.222808476197)*x[0] + (-0.136442341867)*x[1]**o + (-0.0966954262754)*x[1] + (0.334853102014)*x[2]**o + (-0.434616288921)*x[2]
            ref[(2, 0, 0, 0)]=0.198410760147/(o+1.)+(-0.1542516195)+(0.667082624831)*0.5**o
            arg[(2, 0, 0, 1)]=-0.974396902932*x[0]**o + (-0.131300440088)*x[0] + (-0.421448627055)*x[1]**o + (-0.274895203714)*x[1] + (0.163193965546)*x[2]**o + (-0.183283223717)*x[2]
            ref[(2, 0, 0, 1)]=-0.258254661509/(o+1.)+(-0.29473943376)+(-0.974396902932)*0.5**o
            arg[(2, 0, 0, 2)]=0.126302404441*x[0]**o + (0.857771994974)*x[0] + (-0.325945593796)*x[1]**o + (-0.207260115512)*x[1] + (0.107226742892)*x[2]**o + (0.182147486754)*x[2]
            ref[(2, 0, 0, 2)]=-0.218718850903/(o+1.)+(0.416329683108)+(0.126302404441)*0.5**o
            arg[(2, 0, 1, 0)]=-0.551361818091*x[0]**o + (0.18994686787)*x[0] + (0.912825950854)*x[1]**o + (0.705586147027)*x[1] + (-0.257464352536)*x[2]**o + (-0.879942292646)*x[2]
            ref[(2, 0, 1, 0)]=0.655361598318/(o+1.)+(0.00779536112587)+(-0.551361818091)*0.5**o
            arg[(2, 0, 1, 1)]=-0.544255332282*x[0]**o + (-0.208836827261)*x[0] + (0.415987031889)*x[1]**o + (-0.286836367651)*x[1] + (-0.611666369316)*x[2]**o + (-0.338870012945)*x[2]
            ref[(2, 0, 1, 1)]=-0.195679337427/(o+1.)+(-0.417271603929)+(-0.544255332282)*0.5**o
            arg[(2, 0, 1, 2)]=-0.0304559906228*x[0]**o + (-0.0741581320237)*x[0] + (-0.987862262862)*x[1]**o + (0.944688340074)*x[1] + (-0.320850843681)*x[2]**o + (-0.670577158591)*x[2]
            ref[(2, 0, 1, 2)]=-1.30871310654/(o+1.)+(0.0999765247297)+(-0.0304559906228)*0.5**o
            arg[(2, 0, 2, 0)]=0.696540724505*x[0]**o + (0.703848063333)*x[0] + (-0.124795527192)*x[1]**o + (-0.551207090895)*x[1] + (-0.908912940333)*x[2]**o + (-0.515927806785)*x[2]
            ref[(2, 0, 2, 0)]=-1.03370846753/(o+1.)+(-0.181643417174)+(0.696540724505)*0.5**o
            arg[(2, 0, 2, 1)]=0.320965375673*x[0]**o + (-0.14984983651)*x[0] + (-0.317902005587)*x[1]**o + (-0.358692772092)*x[1] + (0.111805368674)*x[2]**o + (-0.418964352976)*x[2]
            ref[(2, 0, 2, 1)]=-0.206096636913/(o+1.)+(-0.463753480789)+(0.320965375673)*0.5**o
            arg[(2, 0, 2, 2)]=-0.11574939787*x[0]**o + (0.513601136147)*x[0] + (-0.885758508941)*x[1]**o + (-0.412587831658)*x[1] + (-0.966627270149)*x[2]**o + (0.231225352743)*x[2]
            ref[(2, 0, 2, 2)]=-1.85238577909/(o+1.)+(0.166119328616)+(-0.11574939787)*0.5**o
            arg[(2, 1, 0, 0)]=-0.494810448887*x[0]**o + (-0.226908883671)*x[0] + (0.0143723815761)*x[1]**o + (0.690297823422)*x[1] + (-0.250831742893)*x[2]**o + (0.502213263792)*x[2]
            ref[(2, 1, 0, 0)]=-0.236459361317/(o+1.)+(0.482801101771)+(-0.494810448887)*0.5**o
            arg[(2, 1, 0, 1)]=0.8320767403*x[0]**o + (0.982047501126)*x[0] + (0.534021161232)*x[1]**o + (-0.230574559938)*x[1] + (0.889073615111)*x[2]**o + (-0.257873916095)*x[2]
            ref[(2, 1, 0, 1)]=1.42309477634/(o+1.)+(0.246799512547)+(0.8320767403)*0.5**o
            arg[(2, 1, 0, 2)]=0.541545366669*x[0]**o + (-0.793437176389)*x[0] + (-0.496340073493)*x[1]**o + (0.979889864186)*x[1] + (0.596759595639)*x[2]**o + (0.12333616631)*x[2]
            ref[(2, 1, 0, 2)]=0.100419522146/(o+1.)+(0.154894427054)+(0.541545366669)*0.5**o
            arg[(2, 1, 1, 0)]=-0.578935903371*x[0]**o + (-0.153184954179)*x[0] + (0.79956510052)*x[1]**o + (-0.746659046083)*x[1] + (0.577456074733)*x[2]**o + (-0.952605163897)*x[2]
            ref[(2, 1, 1, 0)]=1.37702117525/(o+1.)+(-0.92622458208)+(-0.578935903371)*0.5**o
            arg[(2, 1, 1, 1)]=-0.242015497904*x[0]**o + (0.893982255592)*x[0] + (0.60441007704)*x[1]**o + (-0.780307334321)*x[1] + (-0.997319979953)*x[2]**o + (0.505910977679)*x[2]
            ref[(2, 1, 1, 1)]=-0.392909902913/(o+1.)+(0.309792949475)+(-0.242015497904)*0.5**o
            arg[(2, 1, 1, 2)]=0.62198525771*x[0]**o + (0.632277033896)*x[0] + (-0.377147734613)*x[1]**o + (0.582086779628)*x[1] + (0.84256036816)*x[2]**o + (-0.293930700346)*x[2]
            ref[(2, 1, 1, 2)]=0.465412633547/(o+1.)+(0.460216556588)+(0.62198525771)*0.5**o
            arg[(2, 1, 2, 0)]=0.045178941155*x[0]**o + (-0.101219630444)*x[0] + (-0.0945567334051)*x[1]**o + (-0.921742863476)*x[1] + (-0.159893838381)*x[2]**o + (0.40578445073)*x[2]
            ref[(2, 1, 2, 0)]=-0.254450571786/(o+1.)+(-0.308589021595)+(0.045178941155)*0.5**o
            arg[(2, 1, 2, 1)]=-0.408937119646*x[0]**o + (0.331032445312)*x[0] + (-0.821196918544)*x[1]**o + (-0.554775325235)*x[1] + (-0.529396533108)*x[2]**o + (0.537302061797)*x[2]
            ref[(2, 1, 2, 1)]=-1.35059345165/(o+1.)+(0.156779590937)+(-0.408937119646)*0.5**o
            arg[(2, 1, 2, 2)]=-0.33086165105*x[0]**o + (-0.58029735391)*x[0] + (0.180592426219)*x[1]**o + (0.669410667796)*x[1] + (-0.880132461081)*x[2]**o + (0.237378143382)*x[2]
            ref[(2, 1, 2, 2)]=-0.699540034862/(o+1.)+(0.163245728634)+(-0.33086165105)*0.5**o
            arg[(2, 2, 0, 0)]=0.919123408618*x[0]**o + (-0.0835163340306)*x[0] + (0.778663225735)*x[1]**o + (-0.399213820125)*x[1] + (0.804784095308)*x[2]**o + (-0.369488912007)*x[2]
            ref[(2, 2, 0, 0)]=1.58344732104/(o+1.)+(-0.426109533081)+(0.919123408618)*0.5**o
            arg[(2, 2, 0, 1)]=0.485173971515*x[0]**o + (-0.358832653777)*x[0] + (0.414505019328)*x[1]**o + (-0.663505972759)*x[1] + (-0.55504607745)*x[2]**o + (-0.227562596286)*x[2]
            ref[(2, 2, 0, 1)]=-0.140541058122/(o+1.)+(-0.624950611411)+(0.485173971515)*0.5**o
            arg[(2, 2, 0, 2)]=-0.52450166068*x[0]**o + (-0.619122000559)*x[0] + (0.510879610998)*x[1]**o + (0.955595507535)*x[1] + (0.058617606797)*x[2]**o + (0.323821447472)*x[2]
            ref[(2, 2, 0, 2)]=0.569497217795/(o+1.)+(0.330147477224)+(-0.52450166068)*0.5**o
            arg[(2, 2, 1, 0)]=0.370658751083*x[0]**o + (0.928787799895)*x[0] + (-0.0841895781858)*x[1]**o + (0.792862856586)*x[1] + (0.926735588098)*x[2]**o + (-0.152668850983)*x[2]
            ref[(2, 2, 1, 0)]=0.842546009912/(o+1.)+(0.784490902749)+(0.370658751083)*0.5**o
            arg[(2, 2, 1, 1)]=-0.521895988203*x[0]**o + (-0.325472668653)*x[0] + (0.930956982656)*x[1]**o + (0.180030412061)*x[1] + (-0.340023343444)*x[2]**o + (-0.667464938316)*x[2]
            ref[(2, 2, 1, 1)]=0.590933639213/(o+1.)+(-0.406453597454)+(-0.521895988203)*0.5**o
            arg[(2, 2, 1, 2)]=-0.430984506708*x[0]**o + (-0.592050149825)*x[0] + (-0.174304859363)*x[1]**o + (0.523788115238)*x[1] + (-0.937233133805)*x[2]**o + (-0.179831165334)*x[2]
            ref[(2, 2, 1, 2)]=-1.11153799317/(o+1.)+(-0.124046599961)+(-0.430984506708)*0.5**o
            arg[(2, 2, 2, 0)]=-0.68020463853*x[0]**o + (0.768649435438)*x[0] + (0.0585927520482)*x[1]**o + (0.262692841947)*x[1] + (0.049137938057)*x[2]**o + (-0.757509504448)*x[2]
            ref[(2, 2, 2, 0)]=0.107730690105/(o+1.)+(0.136916386468)+(-0.68020463853)*0.5**o
            arg[(2, 2, 2, 1)]=0.485987805288*x[0]**o + (0.785404621337)*x[0] + (0.256210421991)*x[1]**o + (0.0595305337946)*x[1] + (0.724535072615)*x[2]**o + (0.478682305523)*x[2]
            ref[(2, 2, 2, 1)]=0.980745494606/(o+1.)+(0.661808730327)+(0.485987805288)*0.5**o
            arg[(2, 2, 2, 2)]=-0.233849269912*x[0]**o + (0.765729061114)*x[0] + (0.418194146741)*x[1]**o + (0.983578399422)*x[1] + (0.22104461849)*x[2]**o + (0.24949209286)*x[2]
            ref[(2, 2, 2, 2)]=0.639238765231/(o+1.)+(0.999399776698)+(-0.233849269912)*0.5**o
            arg[(2, 3, 0, 0)]=-0.8857538522*x[0]**o + (-0.305541813463)*x[0] + (0.863941852355)*x[1]**o + (0.126863401699)*x[1] + (0.275768605969)*x[2]**o + (0.998510400857)*x[2]
            ref[(2, 3, 0, 0)]=1.13971045832/(o+1.)+(0.409915994546)+(-0.8857538522)*0.5**o
            arg[(2, 3, 0, 1)]=0.228195745445*x[0]**o + (0.527103445822)*x[0] + (0.916786516148)*x[1]**o + (-0.892172300342)*x[1] + (0.868319064609)*x[2]**o + (0.452139629944)*x[2]
            ref[(2, 3, 0, 1)]=1.78510558076/(o+1.)+(0.0435353877123)+(0.228195745445)*0.5**o
            arg[(2, 3, 0, 2)]=0.221092196014*x[0]**o + (-0.42383853845)*x[0] + (-0.269016582057)*x[1]**o + (-0.573727197203)*x[1] + (-0.424406014781)*x[2]**o + (-0.406637537676)*x[2]
            ref[(2, 3, 0, 2)]=-0.693422596838/(o+1.)+(-0.702101636664)+(0.221092196014)*0.5**o
            arg[(2, 3, 1, 0)]=-0.0578158042254*x[0]**o + (0.249519931557)*x[0] + (0.217614667824)*x[1]**o + (0.352981781556)*x[1] + (-0.36597916022)*x[2]**o + (-0.873651640201)*x[2]
            ref[(2, 3, 1, 0)]=-0.148364492396/(o+1.)+(-0.135574963544)+(-0.0578158042254)*0.5**o
            arg[(2, 3, 1, 1)]=0.754162112756*x[0]**o + (0.506479628422)*x[0] + (-0.366875606145)*x[1]**o + (0.532705869753)*x[1] + (0.607570236278)*x[2]**o + (0.760361937744)*x[2]
            ref[(2, 3, 1, 1)]=0.240694630133/(o+1.)+(0.89977371796)+(0.754162112756)*0.5**o
            arg[(2, 3, 1, 2)]=-0.297964763538*x[0]**o + (-0.312071210757)*x[0] + (0.389357534504)*x[1]**o + (0.745715473207)*x[1] + (-0.991235105196)*x[2]**o + (0.473661332633)*x[2]
            ref[(2, 3, 1, 2)]=-0.601877570692/(o+1.)+(0.453652797541)+(-0.297964763538)*0.5**o
            arg[(2, 3, 2, 0)]=0.653585096175*x[0]**o + (-0.269443342666)*x[0] + (0.199453318568)*x[1]**o + (-0.73032690002)*x[1] + (0.823504082454)*x[2]**o + (0.478269365584)*x[2]
            ref[(2, 3, 2, 0)]=1.02295740102/(o+1.)+(-0.260750438551)+(0.653585096175)*0.5**o
            arg[(2, 3, 2, 1)]=-0.942041641399*x[0]**o + (0.385621760067)*x[0] + (0.00129268039087)*x[1]**o + (-0.530598065235)*x[1] + (0.0121124718264)*x[2]**o + (0.911224589925)*x[2]
            ref[(2, 3, 2, 1)]=0.0134051522173/(o+1.)+(0.383124142379)+(-0.942041641399)*0.5**o
            arg[(2, 3, 2, 2)]=0.245010531621*x[0]**o + (-0.715574433308)*x[0] + (-0.716566491203)*x[1]**o + (-0.215009186147)*x[1] + (-0.877498789861)*x[2]**o + (0.715458379496)*x[2]
            ref[(2, 3, 2, 2)]=-1.59406528106/(o+1.)+(-0.10756261998)+(0.245010531621)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.93311403531*x[0]**o + (-0.798592736801)*x[0] + (0.0134675387981)*x[1]**o + (-0.216063715933)*x[1]
            ref=0.0134675387981/(o+1.)+(-0.507328226367)+(0.93311403531)*0.5**o
        else:
            arg=-0.341143154133*x[0]**o + (0.0628087704097)*x[0] + (-0.282022092226)*x[1]**o + (-0.0756935103882)*x[1] + (0.361999546513)*x[2]**o + (-0.269984518944)*x[2]
            ref=0.0799774542868/(o+1.)+(-0.141434629461)+(-0.341143154133)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.388494403442*x[0]**o + (-0.505349083265)*x[0] + (-0.455578702883)*x[1]**o + (0.546210056648)*x[1]
            ref[(0,)]=-0.455578702883/(o+1.)+(0.0204304866917)+(-0.388494403442)*0.5**o
            arg[(1,)]=-0.0461957771853*x[0]**o + (-0.356717362986)*x[0] + (-0.548886881282)*x[1]**o + (0.627734791938)*x[1]
            ref[(1,)]=-0.548886881282/(o+1.)+(0.135508714476)+(-0.0461957771853)*0.5**o
            arg[(2,)]=0.543394238624*x[0]**o + (-0.0423561512093)*x[0] + (-0.310906213422)*x[1]**o + (-0.147291392707)*x[1]
            ref[(2,)]=-0.310906213422/(o+1.)+(-0.0948237719579)+(0.543394238624)*0.5**o
        else:
            arg[(0,)]=-0.702280033957*x[0]**o + (-0.742140246555)*x[0] + (0.0295145589506)*x[1]**o + (0.590389207246)*x[1] + (0.784237158388)*x[2]**o + (0.53426668141)*x[2]
            ref[(0,)]=0.813751717338/(o+1.)+(0.19125782105)+(-0.702280033957)*0.5**o
            arg[(1,)]=0.95266430575*x[0]**o + (0.591541518016)*x[0] + (0.919225449196)*x[1]**o + (0.211546370111)*x[1] + (-0.7885812305)*x[2]**o + (-0.828861815127)*x[2]
            ref[(1,)]=0.130644218696/(o+1.)+(-0.0128869634998)+(0.95266430575)*0.5**o
            arg[(2,)]=0.664422056456*x[0]**o + (0.912622279903)*x[0] + (0.195115750815)*x[1]**o + (-0.448208064892)*x[1] + (0.648838290788)*x[2]**o + (-0.815432213362)*x[2]
            ref[(2,)]=0.843954041604/(o+1.)+(-0.175508999176)+(0.664422056456)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.881136221014*x[0]**o + (-0.0392289429493)*x[0] + (-0.110464381024)*x[1]**o + (0.817982349416)*x[1]
            ref[(0, 0)]=-0.110464381024/(o+1.)+(0.389376703233)+(0.881136221014)*0.5**o
            arg[(0, 1)]=-0.722946278762*x[0]**o + (-0.73742970485)*x[0] + (-0.141777904183)*x[1]**o + (-0.986047130082)*x[1]
            ref[(0, 1)]=-0.141777904183/(o+1.)+(-0.861738417466)+(-0.722946278762)*0.5**o
            arg[(1, 0)]=0.0390158762291*x[0]**o + (-0.949055095555)*x[0] + (0.502000151628)*x[1]**o + (0.156744765736)*x[1]
            ref[(1, 0)]=0.502000151628/(o+1.)+(-0.396155164909)+(0.0390158762291)*0.5**o
            arg[(1, 1)]=-0.0285396181561*x[0]**o + (-0.666030591254)*x[0] + (-0.176375755996)*x[1]**o + (0.00151631069507)*x[1]
            ref[(1, 1)]=-0.176375755996/(o+1.)+(-0.332257140279)+(-0.0285396181561)*0.5**o
        else:
            arg[(0, 0)]=0.347934575832*x[0]**o + (-0.968479882859)*x[0] + (0.305310038187)*x[1]**o + (-0.000524873651037)*x[1] + (0.752203575328)*x[2]**o + (0.342350239791)*x[2]
            ref[(0, 0)]=1.05751361352/(o+1.)+(-0.313327258359)+(0.347934575832)*0.5**o
            arg[(0, 1)]=0.0593193869098*x[0]**o + (0.13104998369)*x[0] + (0.145487238458)*x[1]**o + (-0.171504343467)*x[1] + (0.537424643086)*x[2]**o + (0.962785049354)*x[2]
            ref[(0, 1)]=0.682911881544/(o+1.)+(0.461165344788)+(0.0593193869098)*0.5**o
            arg[(1, 0)]=-0.435432243046*x[0]**o + (-0.0311651090665)*x[0] + (-0.0303474677441)*x[1]**o + (0.976745104152)*x[1] + (0.646833129416)*x[2]**o + (0.293777801165)*x[2]
            ref[(1, 0)]=0.616485661672/(o+1.)+(0.619678898126)+(-0.435432243046)*0.5**o
            arg[(1, 1)]=-0.605623458049*x[0]**o + (0.0905380058816)*x[0] + (-0.711226391653)*x[1]**o + (0.164750618534)*x[1] + (-0.821789610312)*x[2]**o + (-0.149572947157)*x[2]
            ref[(1, 1)]=-1.53301600197/(o+1.)+(0.0528578386293)+(-0.605623458049)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref=numpy.zeros((4, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.499411824856*x[0]**o + (0.254916672141)*x[0] + (-0.67124219401)*x[1]**o + (-0.411479155624)*x[1]
            ref[(0, 0, 0)]=-0.67124219401/(o+1.)+(-0.0782812417414)+(0.499411824856)*0.5**o
            arg[(0, 0, 1)]=0.784366711302*x[0]**o + (0.122782960525)*x[0] + (-0.672327831197)*x[1]**o + (0.542000321067)*x[1]
            ref[(0, 0, 1)]=-0.672327831197/(o+1.)+(0.332391640796)+(0.784366711302)*0.5**o
            arg[(0, 0, 2)]=0.109535628789*x[0]**o + (0.878033332911)*x[0] + (0.18195532248)*x[1]**o + (0.515714070775)*x[1]
            ref[(0, 0, 2)]=0.18195532248/(o+1.)+(0.696873701843)+(0.109535628789)*0.5**o
            arg[(0, 0, 3)]=-0.577697025578*x[0]**o + (-0.92214777363)*x[0] + (-0.162367193348)*x[1]**o + (-0.420686492315)*x[1]
            ref[(0, 0, 3)]=-0.162367193348/(o+1.)+(-0.671417132972)+(-0.577697025578)*0.5**o
            arg[(0, 1, 0)]=-0.83157884344*x[0]**o + (-0.125350102692)*x[0] + (-0.0799890112052)*x[1]**o + (-0.952333339237)*x[1]
            ref[(0, 1, 0)]=-0.0799890112052/(o+1.)+(-0.538841720964)+(-0.83157884344)*0.5**o
            arg[(0, 1, 1)]=-0.520804342826*x[0]**o + (0.595952879665)*x[0] + (-0.0237694142102)*x[1]**o + (0.868457231138)*x[1]
            ref[(0, 1, 1)]=-0.0237694142102/(o+1.)+(0.732205055401)+(-0.520804342826)*0.5**o
            arg[(0, 1, 2)]=0.80382019032*x[0]**o + (0.549479655427)*x[0] + (-0.237575323096)*x[1]**o + (0.203985480099)*x[1]
            ref[(0, 1, 2)]=-0.237575323096/(o+1.)+(0.376732567763)+(0.80382019032)*0.5**o
            arg[(0, 1, 3)]=-0.907415889566*x[0]**o + (0.160712078117)*x[0] + (-0.926359355012)*x[1]**o + (0.277464297787)*x[1]
            ref[(0, 1, 3)]=-0.926359355012/(o+1.)+(0.219088187952)+(-0.907415889566)*0.5**o
            arg[(0, 2, 0)]=0.135943472577*x[0]**o + (0.746522214444)*x[0] + (-0.87848926896)*x[1]**o + (0.719328704279)*x[1]
            ref[(0, 2, 0)]=-0.87848926896/(o+1.)+(0.732925459362)+(0.135943472577)*0.5**o
            arg[(0, 2, 1)]=0.286441991255*x[0]**o + (0.876327769784)*x[0] + (-0.931505342396)*x[1]**o + (-0.869553838512)*x[1]
            ref[(0, 2, 1)]=-0.931505342396/(o+1.)+(0.00338696563591)+(0.286441991255)*0.5**o
            arg[(0, 2, 2)]=-0.146217148352*x[0]**o + (-0.828544901004)*x[0] + (0.775915937924)*x[1]**o + (-0.877228237012)*x[1]
            ref[(0, 2, 2)]=0.775915937924/(o+1.)+(-0.852886569008)+(-0.146217148352)*0.5**o
            arg[(0, 2, 3)]=-0.666014956137*x[0]**o + (-0.948078579104)*x[0] + (-0.67497748266)*x[1]**o + (0.04940878857)*x[1]
            ref[(0, 2, 3)]=-0.67497748266/(o+1.)+(-0.449334895267)+(-0.666014956137)*0.5**o
            arg[(0, 3, 0)]=0.518938420337*x[0]**o + (0.861138693365)*x[0] + (-0.795521646838)*x[1]**o + (-0.673836894252)*x[1]
            ref[(0, 3, 0)]=-0.795521646838/(o+1.)+(0.0936508995566)+(0.518938420337)*0.5**o
            arg[(0, 3, 1)]=0.179935343453*x[0]**o + (0.333746876409)*x[0] + (0.693284002461)*x[1]**o + (0.91677624417)*x[1]
            ref[(0, 3, 1)]=0.693284002461/(o+1.)+(0.62526156029)+(0.179935343453)*0.5**o
            arg[(0, 3, 2)]=-0.547809333499*x[0]**o + (-0.338006094839)*x[0] + (-0.464753806118)*x[1]**o + (-0.112587819639)*x[1]
            ref[(0, 3, 2)]=-0.464753806118/(o+1.)+(-0.225296957239)+(-0.547809333499)*0.5**o
            arg[(0, 3, 3)]=0.453187800881*x[0]**o + (0.867236983804)*x[0] + (-0.0933632098015)*x[1]**o + (0.119827453954)*x[1]
            ref[(0, 3, 3)]=-0.0933632098015/(o+1.)+(0.493532218879)+(0.453187800881)*0.5**o
            arg[(1, 0, 0)]=-0.481807501257*x[0]**o + (-0.627539869113)*x[0] + (-0.00729011136599)*x[1]**o + (0.961251728357)*x[1]
            ref[(1, 0, 0)]=-0.00729011136599/(o+1.)+(0.166855929622)+(-0.481807501257)*0.5**o
            arg[(1, 0, 1)]=-0.120187721238*x[0]**o + (0.396747626273)*x[0] + (-0.833345626519)*x[1]**o + (0.273091147719)*x[1]
            ref[(1, 0, 1)]=-0.833345626519/(o+1.)+(0.334919386996)+(-0.120187721238)*0.5**o
            arg[(1, 0, 2)]=0.588780461837*x[0]**o + (0.726374305133)*x[0] + (-0.0548593376607)*x[1]**o + (0.279569172884)*x[1]
            ref[(1, 0, 2)]=-0.0548593376607/(o+1.)+(0.502971739008)+(0.588780461837)*0.5**o
            arg[(1, 0, 3)]=-0.274266033936*x[0]**o + (-0.397055415719)*x[0] + (0.651000418286)*x[1]**o + (0.157645543518)*x[1]
            ref[(1, 0, 3)]=0.651000418286/(o+1.)+(-0.119704936101)+(-0.274266033936)*0.5**o
            arg[(1, 1, 0)]=0.18593591306*x[0]**o + (-0.999799000227)*x[0] + (-0.955201119905)*x[1]**o + (0.184678267773)*x[1]
            ref[(1, 1, 0)]=-0.955201119905/(o+1.)+(-0.407560366227)+(0.18593591306)*0.5**o
            arg[(1, 1, 1)]=0.956789356321*x[0]**o + (0.424139494512)*x[0] + (-0.287986614721)*x[1]**o + (0.633997363232)*x[1]
            ref[(1, 1, 1)]=-0.287986614721/(o+1.)+(0.529068428872)+(0.956789356321)*0.5**o
            arg[(1, 1, 2)]=-0.859486822204*x[0]**o + (-0.136772921755)*x[0] + (-0.0972325637512)*x[1]**o + (0.0251268838034)*x[1]
            ref[(1, 1, 2)]=-0.0972325637512/(o+1.)+(-0.0558230189758)+(-0.859486822204)*0.5**o
            arg[(1, 1, 3)]=0.531863563878*x[0]**o + (0.610715268006)*x[0] + (0.463129598699)*x[1]**o + (-0.805255061448)*x[1]
            ref[(1, 1, 3)]=0.463129598699/(o+1.)+(-0.0972698967211)+(0.531863563878)*0.5**o
            arg[(1, 2, 0)]=0.0941437939616*x[0]**o + (0.390743071205)*x[0] + (0.207943982294)*x[1]**o + (-0.967848146641)*x[1]
            ref[(1, 2, 0)]=0.207943982294/(o+1.)+(-0.288552537718)+(0.0941437939616)*0.5**o
            arg[(1, 2, 1)]=0.278751236808*x[0]**o + (0.500275851859)*x[0] + (-0.299728090178)*x[1]**o + (-0.723322557542)*x[1]
            ref[(1, 2, 1)]=-0.299728090178/(o+1.)+(-0.111523352842)+(0.278751236808)*0.5**o
            arg[(1, 2, 2)]=0.574456944303*x[0]**o + (0.464020416749)*x[0] + (0.787642046453)*x[1]**o + (0.202436243968)*x[1]
            ref[(1, 2, 2)]=0.787642046453/(o+1.)+(0.333228330358)+(0.574456944303)*0.5**o
            arg[(1, 2, 3)]=-0.321288972502*x[0]**o + (-0.357028594422)*x[0] + (-0.127998005288)*x[1]**o + (0.186080340181)*x[1]
            ref[(1, 2, 3)]=-0.127998005288/(o+1.)+(-0.0854741271206)+(-0.321288972502)*0.5**o
            arg[(1, 3, 0)]=-0.109537017796*x[0]**o + (0.736330175052)*x[0] + (-0.846477451646)*x[1]**o + (0.333493484712)*x[1]
            ref[(1, 3, 0)]=-0.846477451646/(o+1.)+(0.534911829882)+(-0.109537017796)*0.5**o
            arg[(1, 3, 1)]=0.939990281571*x[0]**o + (-0.090430713218)*x[0] + (0.345787675923)*x[1]**o + (0.297051010181)*x[1]
            ref[(1, 3, 1)]=0.345787675923/(o+1.)+(0.103310148481)+(0.939990281571)*0.5**o
            arg[(1, 3, 2)]=-0.12175715212*x[0]**o + (-0.467449601019)*x[0] + (-0.0858284444928)*x[1]**o + (-0.951535149934)*x[1]
            ref[(1, 3, 2)]=-0.0858284444928/(o+1.)+(-0.709492375476)+(-0.12175715212)*0.5**o
            arg[(1, 3, 3)]=0.691666694151*x[0]**o + (0.443598482161)*x[0] + (0.583263851417)*x[1]**o + (-0.788783556906)*x[1]
            ref[(1, 3, 3)]=0.583263851417/(o+1.)+(-0.172592537373)+(0.691666694151)*0.5**o
            arg[(2, 0, 0)]=0.246761338618*x[0]**o + (0.333808538675)*x[0] + (0.704923523818)*x[1]**o + (-0.721743045759)*x[1]
            ref[(2, 0, 0)]=0.704923523818/(o+1.)+(-0.193967253542)+(0.246761338618)*0.5**o
            arg[(2, 0, 1)]=0.866215898492*x[0]**o + (0.562993632999)*x[0] + (-0.606117616532)*x[1]**o + (-0.135055815845)*x[1]
            ref[(2, 0, 1)]=-0.606117616532/(o+1.)+(0.213968908577)+(0.866215898492)*0.5**o
            arg[(2, 0, 2)]=-0.854005409436*x[0]**o + (0.785112266172)*x[0] + (-0.848746240975)*x[1]**o + (-0.429654076631)*x[1]
            ref[(2, 0, 2)]=-0.848746240975/(o+1.)+(0.17772909477)+(-0.854005409436)*0.5**o
            arg[(2, 0, 3)]=0.628666980746*x[0]**o + (0.895559201205)*x[0] + (0.574486741019)*x[1]**o + (0.667605800901)*x[1]
            ref[(2, 0, 3)]=0.574486741019/(o+1.)+(0.781582501053)+(0.628666980746)*0.5**o
            arg[(2, 1, 0)]=-0.593429383118*x[0]**o + (0.0861030796856)*x[0] + (-0.471854199942)*x[1]**o + (0.0201817286041)*x[1]
            ref[(2, 1, 0)]=-0.471854199942/(o+1.)+(0.0531424041449)+(-0.593429383118)*0.5**o
            arg[(2, 1, 1)]=0.655257284741*x[0]**o + (-0.455976119492)*x[0] + (0.184389904247)*x[1]**o + (0.174379554902)*x[1]
            ref[(2, 1, 1)]=0.184389904247/(o+1.)+(-0.140798282295)+(0.655257284741)*0.5**o
            arg[(2, 1, 2)]=-0.518473528419*x[0]**o + (0.420538144828)*x[0] + (0.247491027658)*x[1]**o + (-0.915298926382)*x[1]
            ref[(2, 1, 2)]=0.247491027658/(o+1.)+(-0.247380390777)+(-0.518473528419)*0.5**o
            arg[(2, 1, 3)]=-0.139939007364*x[0]**o + (-0.860801422038)*x[0] + (0.510105369948)*x[1]**o + (-0.477836192026)*x[1]
            ref[(2, 1, 3)]=0.510105369948/(o+1.)+(-0.669318807032)+(-0.139939007364)*0.5**o
            arg[(2, 2, 0)]=-0.359919529857*x[0]**o + (0.204160885117)*x[0] + (-0.324462561259)*x[1]**o + (-0.830251243449)*x[1]
            ref[(2, 2, 0)]=-0.324462561259/(o+1.)+(-0.313045179166)+(-0.359919529857)*0.5**o
            arg[(2, 2, 1)]=0.69653338408*x[0]**o + (-0.947308294028)*x[0] + (0.33715816201)*x[1]**o + (-0.746684206381)*x[1]
            ref[(2, 2, 1)]=0.33715816201/(o+1.)+(-0.846996250204)+(0.69653338408)*0.5**o
            arg[(2, 2, 2)]=0.602160124717*x[0]**o + (0.919067314808)*x[0] + (0.556336223874)*x[1]**o + (-0.684516108603)*x[1]
            ref[(2, 2, 2)]=0.556336223874/(o+1.)+(0.117275603103)+(0.602160124717)*0.5**o
            arg[(2, 2, 3)]=0.931842775869*x[0]**o + (-0.00806172628834)*x[0] + (-0.119726918838)*x[1]**o + (0.906712106064)*x[1]
            ref[(2, 2, 3)]=-0.119726918838/(o+1.)+(0.449325189888)+(0.931842775869)*0.5**o
            arg[(2, 3, 0)]=0.98290924078*x[0]**o + (-0.058275743896)*x[0] + (-0.733015593119)*x[1]**o + (0.978392562917)*x[1]
            ref[(2, 3, 0)]=-0.733015593119/(o+1.)+(0.46005840951)+(0.98290924078)*0.5**o
            arg[(2, 3, 1)]=0.0793607998027*x[0]**o + (-0.407536487634)*x[0] + (-0.861957392698)*x[1]**o + (-0.935147630663)*x[1]
            ref[(2, 3, 1)]=-0.861957392698/(o+1.)+(-0.671342059148)+(0.0793607998027)*0.5**o
            arg[(2, 3, 2)]=-0.0312000650607*x[0]**o + (-0.307734473757)*x[0] + (0.604296019305)*x[1]**o + (-0.896182591363)*x[1]
            ref[(2, 3, 2)]=0.604296019305/(o+1.)+(-0.60195853256)+(-0.0312000650607)*0.5**o
            arg[(2, 3, 3)]=-0.133821155569*x[0]**o + (-0.184417568548)*x[0] + (-0.405248949924)*x[1]**o + (-0.462355253176)*x[1]
            ref[(2, 3, 3)]=-0.405248949924/(o+1.)+(-0.323386410862)+(-0.133821155569)*0.5**o
            arg[(3, 0, 0)]=-0.214825222172*x[0]**o + (0.779864765831)*x[0] + (-0.334277862281)*x[1]**o + (-0.925373868377)*x[1]
            ref[(3, 0, 0)]=-0.334277862281/(o+1.)+(-0.0727545512731)+(-0.214825222172)*0.5**o
            arg[(3, 0, 1)]=0.60930597583*x[0]**o + (-0.654368793364)*x[0] + (-0.645624181293)*x[1]**o + (-0.938845853635)*x[1]
            ref[(3, 0, 1)]=-0.645624181293/(o+1.)+(-0.7966073235)+(0.60930597583)*0.5**o
            arg[(3, 0, 2)]=0.605471697446*x[0]**o + (-0.776040542841)*x[0] + (0.231646789037)*x[1]**o + (0.665034302852)*x[1]
            ref[(3, 0, 2)]=0.231646789037/(o+1.)+(-0.0555031199948)+(0.605471697446)*0.5**o
            arg[(3, 0, 3)]=0.0196739944445*x[0]**o + (-0.0254411039425)*x[0] + (0.436119526379)*x[1]**o + (-0.912129512912)*x[1]
            ref[(3, 0, 3)]=0.436119526379/(o+1.)+(-0.468785308427)+(0.0196739944445)*0.5**o
            arg[(3, 1, 0)]=-0.629053230378*x[0]**o + (-0.0428662263981)*x[0] + (0.586063415057)*x[1]**o + (0.421899212112)*x[1]
            ref[(3, 1, 0)]=0.586063415057/(o+1.)+(0.189516492857)+(-0.629053230378)*0.5**o
            arg[(3, 1, 1)]=-0.909302318339*x[0]**o + (0.888774614365)*x[0] + (-0.889841125179)*x[1]**o + (0.339858401339)*x[1]
            ref[(3, 1, 1)]=-0.889841125179/(o+1.)+(0.614316507852)+(-0.909302318339)*0.5**o
            arg[(3, 1, 2)]=-0.151233627339*x[0]**o + (-0.364551231988)*x[0] + (0.999616532135)*x[1]**o + (0.144434439392)*x[1]
            ref[(3, 1, 2)]=0.999616532135/(o+1.)+(-0.110058396298)+(-0.151233627339)*0.5**o
            arg[(3, 1, 3)]=-0.915648353481*x[0]**o + (0.65208065359)*x[0] + (0.21146291355)*x[1]**o + (0.0163409525914)*x[1]
            ref[(3, 1, 3)]=0.21146291355/(o+1.)+(0.334210803091)+(-0.915648353481)*0.5**o
            arg[(3, 2, 0)]=0.510319700195*x[0]**o + (0.264910649759)*x[0] + (0.281405885951)*x[1]**o + (-0.875732261959)*x[1]
            ref[(3, 2, 0)]=0.281405885951/(o+1.)+(-0.3054108061)+(0.510319700195)*0.5**o
            arg[(3, 2, 1)]=0.32695775744*x[0]**o + (-0.120970025744)*x[0] + (0.371494229706)*x[1]**o + (0.594664512387)*x[1]
            ref[(3, 2, 1)]=0.371494229706/(o+1.)+(0.236847243321)+(0.32695775744)*0.5**o
            arg[(3, 2, 2)]=0.65255543484*x[0]**o + (-0.371409233607)*x[0] + (-0.308825946229)*x[1]**o + (-0.799757917191)*x[1]
            ref[(3, 2, 2)]=-0.308825946229/(o+1.)+(-0.585583575399)+(0.65255543484)*0.5**o
            arg[(3, 2, 3)]=0.190633922463*x[0]**o + (-0.513091065553)*x[0] + (0.940375273352)*x[1]**o + (0.599097901228)*x[1]
            ref[(3, 2, 3)]=0.940375273352/(o+1.)+(0.0430034178374)+(0.190633922463)*0.5**o
            arg[(3, 3, 0)]=0.264014796793*x[0]**o + (-0.973948466917)*x[0] + (-0.0735037308927)*x[1]**o + (-0.186995507104)*x[1]
            ref[(3, 3, 0)]=-0.0735037308927/(o+1.)+(-0.58047198701)+(0.264014796793)*0.5**o
            arg[(3, 3, 1)]=-0.735478209889*x[0]**o + (0.140123973046)*x[0] + (-0.25063565592)*x[1]**o + (-0.0636831122938)*x[1]
            ref[(3, 3, 1)]=-0.25063565592/(o+1.)+(0.0382204303759)+(-0.735478209889)*0.5**o
            arg[(3, 3, 2)]=0.924889161769*x[0]**o + (-0.458492450284)*x[0] + (-0.478682967372)*x[1]**o + (0.760308458963)*x[1]
            ref[(3, 3, 2)]=-0.478682967372/(o+1.)+(0.150908004339)+(0.924889161769)*0.5**o
            arg[(3, 3, 3)]=0.988274001983*x[0]**o + (-0.255358615667)*x[0] + (-0.439469962284)*x[1]**o + (-0.877738405645)*x[1]
            ref[(3, 3, 3)]=-0.439469962284/(o+1.)+(-0.566548510656)+(0.988274001983)*0.5**o
        else:
            arg[(0, 0, 0)]=-0.605807408835*x[0]**o + (-0.535187565039)*x[0] + (0.202775166825)*x[1]**o + (0.536446880103)*x[1] + (-0.348873989672)*x[2]**o + (-0.577782767433)*x[2]
            ref[(0, 0, 0)]=-0.146098822847/(o+1.)+(-0.288261726185)+(-0.605807408835)*0.5**o
            arg[(0, 0, 1)]=-0.274761827569*x[0]**o + (0.207496143788)*x[0] + (0.15013323951)*x[1]**o + (-0.86522187598)*x[1] + (0.37430492896)*x[2]**o + (-0.355679627956)*x[2]
            ref[(0, 0, 1)]=0.524438168471/(o+1.)+(-0.506702680074)+(-0.274761827569)*0.5**o
            arg[(0, 0, 2)]=-0.561564398888*x[0]**o + (0.983473247709)*x[0] + (0.141214941985)*x[1]**o + (0.758159844273)*x[1] + (0.649312874129)*x[2]**o + (0.51644353982)*x[2]
            ref[(0, 0, 2)]=0.790527816114/(o+1.)+(1.1290383159)+(-0.561564398888)*0.5**o
            arg[(0, 0, 3)]=0.922986504242*x[0]**o + (-0.0248743198597)*x[0] + (0.0663115059565)*x[1]**o + (0.546297034169)*x[1] + (-0.235324130353)*x[2]**o + (0.125526153391)*x[2]
            ref[(0, 0, 3)]=-0.169012624397/(o+1.)+(0.32347443385)+(0.922986504242)*0.5**o
            arg[(0, 1, 0)]=-0.849417787732*x[0]**o + (0.912133142794)*x[0] + (0.9487309007)*x[1]**o + (0.45153334789)*x[1] + (0.0997277492742)*x[2]**o + (0.762111589036)*x[2]
            ref[(0, 1, 0)]=1.04845864997/(o+1.)+(1.06288903986)+(-0.849417787732)*0.5**o
            arg[(0, 1, 1)]=-0.605496436483*x[0]**o + (-0.931766887585)*x[0] + (0.713534467796)*x[1]**o + (-0.00217206619675)*x[1] + (0.288570586946)*x[2]**o + (0.64670561463)*x[2]
            ref[(0, 1, 1)]=1.00210505474/(o+1.)+(-0.143616669575)+(-0.605496436483)*0.5**o
            arg[(0, 1, 2)]=-0.0615661752936*x[0]**o + (-0.0878726699405)*x[0] + (-0.234546163243)*x[1]**o + (0.13841643478)*x[1] + (-0.818163910943)*x[2]**o + (0.994981511771)*x[2]
            ref[(0, 1, 2)]=-1.05271007419/(o+1.)+(0.522762638305)+(-0.0615661752936)*0.5**o
            arg[(0, 1, 3)]=0.692234119462*x[0]**o + (-0.488746509508)*x[0] + (0.43301267216)*x[1]**o + (0.416815764869)*x[1] + (-0.852740788086)*x[2]**o + (0.614959282267)*x[2]
            ref[(0, 1, 3)]=-0.419728115927/(o+1.)+(0.271514268814)+(0.692234119462)*0.5**o
            arg[(0, 2, 0)]=0.688682909312*x[0]**o + (-0.16705111368)*x[0] + (0.823814556989)*x[1]**o + (-0.90120705814)*x[1] + (-0.415903407025)*x[2]**o + (-0.613125516195)*x[2]
            ref[(0, 2, 0)]=0.407911149964/(o+1.)+(-0.840691844007)+(0.688682909312)*0.5**o
            arg[(0, 2, 1)]=-0.243127534126*x[0]**o + (0.389936351841)*x[0] + (0.0582125321548)*x[1]**o + (-0.992335424626)*x[1] + (-0.0935106885468)*x[2]**o + (-0.496368527037)*x[2]
            ref[(0, 2, 1)]=-0.035298156392/(o+1.)+(-0.549383799911)+(-0.243127534126)*0.5**o
            arg[(0, 2, 2)]=-0.645725179977*x[0]**o + (0.655895440455)*x[0] + (-0.266916435604)*x[1]**o + (0.823038437007)*x[1] + (0.154100073083)*x[2]**o + (-0.885474187437)*x[2]
            ref[(0, 2, 2)]=-0.112816362521/(o+1.)+(0.296729845013)+(-0.645725179977)*0.5**o
            arg[(0, 2, 3)]=0.560421913907*x[0]**o + (0.142799315827)*x[0] + (-0.357432008906)*x[1]**o + (0.89820826489)*x[1] + (0.97286717781)*x[2]**o + (-0.180889221118)*x[2]
            ref[(0, 2, 3)]=0.615435168904/(o+1.)+(0.430059179799)+(0.560421913907)*0.5**o
            arg[(0, 3, 0)]=0.62113099433*x[0]**o + (-0.00268822912427)*x[0] + (-0.776482196822)*x[1]**o + (-0.580426117654)*x[1] + (-0.227396009617)*x[2]**o + (0.283794257252)*x[2]
            ref[(0, 3, 0)]=-1.00387820644/(o+1.)+(-0.149660044763)+(0.62113099433)*0.5**o
            arg[(0, 3, 1)]=-0.485317386807*x[0]**o + (-0.676190764386)*x[0] + (-0.255812219766)*x[1]**o + (0.409212913622)*x[1] + (0.173602279509)*x[2]**o + (0.545103587596)*x[2]
            ref[(0, 3, 1)]=-0.0822099402575/(o+1.)+(0.139062868416)+(-0.485317386807)*0.5**o
            arg[(0, 3, 2)]=0.409900329486*x[0]**o + (0.140596786749)*x[0] + (0.147952105152)*x[1]**o + (-0.325769601043)*x[1] + (-0.63709182415)*x[2]**o + (0.796355569575)*x[2]
            ref[(0, 3, 2)]=-0.489139718998/(o+1.)+(0.30559137764)+(0.409900329486)*0.5**o
            arg[(0, 3, 3)]=0.871281156747*x[0]**o + (0.117558901829)*x[0] + (-0.940049248412)*x[1]**o + (0.652995377298)*x[1] + (0.501840302415)*x[2]**o + (0.053941712826)*x[2]
            ref[(0, 3, 3)]=-0.438208945998/(o+1.)+(0.412247995977)+(0.871281156747)*0.5**o
            arg[(1, 0, 0)]=-0.635112840336*x[0]**o + (-0.798554637124)*x[0] + (0.684782134617)*x[1]**o + (-0.0817757076311)*x[1] + (0.429384722894)*x[2]**o + (-0.450832581373)*x[2]
            ref[(1, 0, 0)]=1.11416685751/(o+1.)+(-0.665581463064)+(-0.635112840336)*0.5**o
            arg[(1, 0, 1)]=0.489683253506*x[0]**o + (0.677796890213)*x[0] + (-0.907781124874)*x[1]**o + (0.500449093553)*x[1] + (0.0960642528221)*x[2]**o + (-0.391190460286)*x[2]
            ref[(1, 0, 1)]=-0.811716872052/(o+1.)+(0.39352776174)+(0.489683253506)*0.5**o
            arg[(1, 0, 2)]=0.458740094044*x[0]**o + (-0.165749835685)*x[0] + (-0.792568547276)*x[1]**o + (0.693538261788)*x[1] + (0.476552570018)*x[2]**o + (-0.390932068467)*x[2]
            ref[(1, 0, 2)]=-0.316015977258/(o+1.)+(0.0684281788177)+(0.458740094044)*0.5**o
            arg[(1, 0, 3)]=-0.916838636449*x[0]**o + (0.904410496366)*x[0] + (-0.823681642859)*x[1]**o + (0.473963925111)*x[1] + (0.00372002111186)*x[2]**o + (-0.766402967002)*x[2]
            ref[(1, 0, 3)]=-0.819961621747/(o+1.)+(0.305985727238)+(-0.916838636449)*0.5**o
            arg[(1, 1, 0)]=0.758301017623*x[0]**o + (-0.197653586707)*x[0] + (-0.437618991996)*x[1]**o + (0.89418618645)*x[1] + (-0.0162897333315)*x[2]**o + (0.965578636869)*x[2]
            ref[(1, 1, 0)]=-0.453908725328/(o+1.)+(0.831055618306)+(0.758301017623)*0.5**o
            arg[(1, 1, 1)]=-0.00830509099052*x[0]**o + (-0.842304966465)*x[0] + (0.25707300664)*x[1]**o + (0.251538254439)*x[1] + (0.0832987719469)*x[2]**o + (0.52172356092)*x[2]
            ref[(1, 1, 1)]=0.340371778587/(o+1.)+(-0.0345215755532)+(-0.00830509099052)*0.5**o
            arg[(1, 1, 2)]=-0.0525913408398*x[0]**o + (0.00936250109369)*x[0] + (0.882039200698)*x[1]**o + (0.232801040098)*x[1] + (0.676298035861)*x[2]**o + (-0.672140075127)*x[2]
            ref[(1, 1, 2)]=1.55833723656/(o+1.)+(-0.214988266968)+(-0.0525913408398)*0.5**o
            arg[(1, 1, 3)]=0.905177101808*x[0]**o + (-0.771067562379)*x[0] + (0.0775294343425)*x[1]**o + (-0.788874085243)*x[1] + (0.744625307091)*x[2]**o + (-0.673346240763)*x[2]
            ref[(1, 1, 3)]=0.822154741433/(o+1.)+(-1.11664394419)+(0.905177101808)*0.5**o
            arg[(1, 2, 0)]=0.131665917353*x[0]**o + (-0.403393400885)*x[0] + (0.853454944366)*x[1]**o + (-0.211352598413)*x[1] + (-0.647361257012)*x[2]**o + (-0.680996155235)*x[2]
            ref[(1, 2, 0)]=0.206093687354/(o+1.)+(-0.647871077266)+(0.131665917353)*0.5**o
            arg[(1, 2, 1)]=0.135868707169*x[0]**o + (0.177546590421)*x[0] + (0.393769361553)*x[1]**o + (-0.832201012025)*x[1] + (0.143101875373)*x[2]**o + (-0.171794600464)*x[2]
            ref[(1, 2, 1)]=0.536871236926/(o+1.)+(-0.413224511034)+(0.135868707169)*0.5**o
            arg[(1, 2, 2)]=0.655939773824*x[0]**o + (0.268340818947)*x[0] + (-0.975907739866)*x[1]**o + (0.437253328504)*x[1] + (0.137193415584)*x[2]**o + (0.0418178699083)*x[2]
            ref[(1, 2, 2)]=-0.838714324282/(o+1.)+(0.37370600868)+(0.655939773824)*0.5**o
            arg[(1, 2, 3)]=0.266956916005*x[0]**o + (-0.35543537135)*x[0] + (-0.278671404416)*x[1]**o + (0.483183849015)*x[1] + (-0.871349384652)*x[2]**o + (0.179791993232)*x[2]
            ref[(1, 2, 3)]=-1.15002078907/(o+1.)+(0.153770235448)+(0.266956916005)*0.5**o
            arg[(1, 3, 0)]=0.261669735379*x[0]**o + (-0.576093516174)*x[0] + (-0.671610011517)*x[1]**o + (-0.910902505071)*x[1] + (0.17061053004)*x[2]**o + (-0.817288663323)*x[2]
            ref[(1, 3, 0)]=-0.500999481477/(o+1.)+(-1.15214234228)+(0.261669735379)*0.5**o
            arg[(1, 3, 1)]=-0.917460383879*x[0]**o + (0.633443687436)*x[0] + (0.635783254974)*x[1]**o + (0.352427432336)*x[1] + (0.308953509808)*x[2]**o + (-0.203187656025)*x[2]
            ref[(1, 3, 1)]=0.944736764782/(o+1.)+(0.391341731873)+(-0.917460383879)*0.5**o
            arg[(1, 3, 2)]=0.391351484125*x[0]**o + (-0.444917204938)*x[0] + (0.155840414211)*x[1]**o + (-0.237571732922)*x[1] + (-0.576637356627)*x[2]**o + (0.75095484735)*x[2]
            ref[(1, 3, 2)]=-0.420796942416/(o+1.)+(0.0342329547452)+(0.391351484125)*0.5**o
            arg[(1, 3, 3)]=0.909526638519*x[0]**o + (-0.0941279229328)*x[0] + (0.72131924273)*x[1]**o + (-0.982331761617)*x[1] + (0.643560204092)*x[2]**o + (0.588519805163)*x[2]
            ref[(1, 3, 3)]=1.36487944682/(o+1.)+(-0.243969939693)+(0.909526638519)*0.5**o
            arg[(2, 0, 0)]=-0.173257879959*x[0]**o + (0.798353586251)*x[0] + (-0.608974451798)*x[1]**o + (0.860166917971)*x[1] + (-0.685394544848)*x[2]**o + (-0.187568075863)*x[2]
            ref[(2, 0, 0)]=-1.29436899665/(o+1.)+(0.73547621418)+(-0.173257879959)*0.5**o
            arg[(2, 0, 1)]=0.353761339534*x[0]**o + (-0.816724712194)*x[0] + (-0.000167265081088)*x[1]**o + (-0.611751418208)*x[1] + (0.5724276081)*x[2]**o + (-0.807921204091)*x[2]
            ref[(2, 0, 1)]=0.572260343019/(o+1.)+(-1.11819866725)+(0.353761339534)*0.5**o
            arg[(2, 0, 2)]=0.365813562573*x[0]**o + (0.441772906846)*x[0] + (-0.116574183184)*x[1]**o + (0.702281137995)*x[1] + (-0.431310062376)*x[2]**o + (-0.93316568995)*x[2]
            ref[(2, 0, 2)]=-0.54788424556/(o+1.)+(0.105444177446)+(0.365813562573)*0.5**o
            arg[(2, 0, 3)]=-0.300283007201*x[0]**o + (-0.538384860647)*x[0] + (0.274845671252)*x[1]**o + (0.375604842754)*x[1] + (-0.48992209682)*x[2]**o + (-0.835558503904)*x[2]
            ref[(2, 0, 3)]=-0.215076425568/(o+1.)+(-0.499169260898)+(-0.300283007201)*0.5**o
            arg[(2, 1, 0)]=-0.698336335634*x[0]**o + (-0.92431634844)*x[0] + (0.594061066347)*x[1]**o + (0.966444845149)*x[1] + (0.825986564009)*x[2]**o + (0.167423558865)*x[2]
            ref[(2, 1, 0)]=1.42004763036/(o+1.)+(0.104776027787)+(-0.698336335634)*0.5**o
            arg[(2, 1, 1)]=0.302895061756*x[0]**o + (-0.288765717376)*x[0] + (0.759648617891)*x[1]**o + (-0.6580386479)*x[1] + (0.187527612598)*x[2]**o + (0.118453017418)*x[2]
            ref[(2, 1, 1)]=0.947176230489/(o+1.)+(-0.414175673929)+(0.302895061756)*0.5**o
            arg[(2, 1, 2)]=-0.999659341939*x[0]**o + (0.78408531873)*x[0] + (0.646876833181)*x[1]**o + (-0.145650795167)*x[1] + (-0.672502166861)*x[2]**o + (0.872713462633)*x[2]
            ref[(2, 1, 2)]=-0.0256253336797/(o+1.)+(0.755573993098)+(-0.999659341939)*0.5**o
            arg[(2, 1, 3)]=0.89533050972*x[0]**o + (0.305803825257)*x[0] + (-0.740825500862)*x[1]**o + (0.0630305453023)*x[1] + (0.0751506642776)*x[2]**o + (0.131338483812)*x[2]
            ref[(2, 1, 3)]=-0.665674836584/(o+1.)+(0.250086427186)+(0.89533050972)*0.5**o
            arg[(2, 2, 0)]=0.542719139907*x[0]**o + (0.266439642974)*x[0] + (-0.435233718828)*x[1]**o + (0.584365678499)*x[1] + (-0.851069069485)*x[2]**o + (0.981933518996)*x[2]
            ref[(2, 2, 0)]=-1.28630278831/(o+1.)+(0.916369420235)+(0.542719139907)*0.5**o
            arg[(2, 2, 1)]=-0.883121256705*x[0]**o + (-0.32295541551)*x[0] + (0.845715032357)*x[1]**o + (0.296155679352)*x[1] + (-0.27618063432)*x[2]**o + (-0.486387201445)*x[2]
            ref[(2, 2, 1)]=0.569534398037/(o+1.)+(-0.256593468801)+(-0.883121256705)*0.5**o
            arg[(2, 2, 2)]=0.631264072598*x[0]**o + (-0.606957682818)*x[0] + (0.247154129196)*x[1]**o + (0.119395595785)*x[1] + (-0.271390878205)*x[2]**o + (-0.713240440907)*x[2]
            ref[(2, 2, 2)]=-0.0242367490085/(o+1.)+(-0.600401263969)+(0.631264072598)*0.5**o
            arg[(2, 2, 3)]=0.597259289466*x[0]**o + (-0.158196524797)*x[0] + (-0.518656942595)*x[1]**o + (-0.142638116203)*x[1] + (-0.275101702385)*x[2]**o + (-0.158448644001)*x[2]
            ref[(2, 2, 3)]=-0.79375864498/(o+1.)+(-0.2296416425)+(0.597259289466)*0.5**o
            arg[(2, 3, 0)]=0.775851032524*x[0]**o + (-0.497212242449)*x[0] + (-0.324838891369)*x[1]**o + (0.523146610305)*x[1] + (0.434560375944)*x[2]**o + (0.921116100625)*x[2]
            ref[(2, 3, 0)]=0.109721484575/(o+1.)+(0.473525234241)+(0.775851032524)*0.5**o
            arg[(2, 3, 1)]=0.715421529868*x[0]**o + (0.0885587333184)*x[0] + (0.459685615526)*x[1]**o + (0.717246505829)*x[1] + (-0.169731077781)*x[2]**o + (-0.682515445834)*x[2]
            ref[(2, 3, 1)]=0.289954537745/(o+1.)+(0.0616448966569)+(0.715421529868)*0.5**o
            arg[(2, 3, 2)]=0.181440133177*x[0]**o + (-0.953343374379)*x[0] + (0.497929692691)*x[1]**o + (-0.0751968239547)*x[1] + (-0.218726115027)*x[2]**o + (-0.178688672758)*x[2]
            ref[(2, 3, 2)]=0.279203577664/(o+1.)+(-0.603614435546)+(0.181440133177)*0.5**o
            arg[(2, 3, 3)]=-0.430040954654*x[0]**o + (0.0667678820818)*x[0] + (0.469645579014)*x[1]**o + (0.689992474507)*x[1] + (-0.968791512053)*x[2]**o + (-0.170940974742)*x[2]
            ref[(2, 3, 3)]=-0.499145933039/(o+1.)+(0.292909690923)+(-0.430040954654)*0.5**o
            arg[(3, 0, 0)]=0.720439250517*x[0]**o + (-0.256662060371)*x[0] + (0.271789559931)*x[1]**o + (-0.416232442933)*x[1] + (0.157150941022)*x[2]**o + (0.051097328518)*x[2]
            ref[(3, 0, 0)]=0.428940500953/(o+1.)+(-0.310898587393)+(0.720439250517)*0.5**o
            arg[(3, 0, 1)]=-0.50913465669*x[0]**o + (-0.916855073596)*x[0] + (-0.466718313968)*x[1]**o + (0.322568195146)*x[1] + (0.992528309508)*x[2]**o + (-0.12765602181)*x[2]
            ref[(3, 0, 1)]=0.52580999554/(o+1.)+(-0.36097145013)+(-0.50913465669)*0.5**o
            arg[(3, 0, 2)]=-0.158924282168*x[0]**o + (-0.616442596618)*x[0] + (0.557311389046)*x[1]**o + (-0.518378906221)*x[1] + (0.557958681187)*x[2]**o + (0.222939846936)*x[2]
            ref[(3, 0, 2)]=1.11527007023/(o+1.)+(-0.455940827951)+(-0.158924282168)*0.5**o
            arg[(3, 0, 3)]=-0.76668537994*x[0]**o + (-0.259447650336)*x[0] + (0.540862588556)*x[1]**o + (-0.347989768602)*x[1] + (-0.000591156584649)*x[2]**o + (0.624043530941)*x[2]
            ref[(3, 0, 3)]=0.540271431972/(o+1.)+(0.00830305600121)+(-0.76668537994)*0.5**o
            arg[(3, 1, 0)]=-0.361895881081*x[0]**o + (-0.655866705526)*x[0] + (-0.77975225428)*x[1]**o + (-0.0266061094802)*x[1] + (-0.637119001097)*x[2]**o + (0.539102716414)*x[2]
            ref[(3, 1, 0)]=-1.41687125538/(o+1.)+(-0.0716850492959)+(-0.361895881081)*0.5**o
            arg[(3, 1, 1)]=-0.250825346995*x[0]**o + (-0.985222379917)*x[0] + (0.419779229326)*x[1]**o + (-0.850776231249)*x[1] + (0.649745382036)*x[2]**o + (-0.745345245976)*x[2]
            ref[(3, 1, 1)]=1.06952461136/(o+1.)+(-1.29067192857)+(-0.250825346995)*0.5**o
            arg[(3, 1, 2)]=0.219425184542*x[0]**o + (0.575295362883)*x[0] + (-0.876851401134)*x[1]**o + (-0.217649956623)*x[1] + (-0.308582574737)*x[2]**o + (0.513124361859)*x[2]
            ref[(3, 1, 2)]=-1.18543397587/(o+1.)+(0.435384884059)+(0.219425184542)*0.5**o
            arg[(3, 1, 3)]=-0.171656530032*x[0]**o + (-0.689648923909)*x[0] + (0.722249222639)*x[1]**o + (-0.148128184011)*x[1] + (0.781974720308)*x[2]**o + (0.563374241264)*x[2]
            ref[(3, 1, 3)]=1.50422394295/(o+1.)+(-0.137201433328)+(-0.171656530032)*0.5**o
            arg[(3, 2, 0)]=0.494085570976*x[0]**o + (0.739198573001)*x[0] + (0.155676134004)*x[1]**o + (0.892876168271)*x[1] + (-0.359521169372)*x[2]**o + (0.149996915322)*x[2]
            ref[(3, 2, 0)]=-0.203845035367/(o+1.)+(0.891035828297)+(0.494085570976)*0.5**o
            arg[(3, 2, 1)]=-0.255689804745*x[0]**o + (0.854089023801)*x[0] + (-0.25418220357)*x[1]**o + (0.747807343712)*x[1] + (-0.315469726477)*x[2]**o + (-0.619348520719)*x[2]
            ref[(3, 2, 1)]=-0.569651930046/(o+1.)+(0.491273923397)+(-0.255689804745)*0.5**o
            arg[(3, 2, 2)]=0.852552108236*x[0]**o + (0.488186812699)*x[0] + (-0.698691370611)*x[1]**o + (-0.773780632794)*x[1] + (-0.893970750819)*x[2]**o + (-0.705017950453)*x[2]
            ref[(3, 2, 2)]=-1.59266212143/(o+1.)+(-0.495305885274)+(0.852552108236)*0.5**o
            arg[(3, 2, 3)]=0.240671935114*x[0]**o + (-0.0210695736145)*x[0] + (0.218765201919)*x[1]**o + (0.298985466709)*x[1] + (0.0162938393005)*x[2]**o + (-0.855541600324)*x[2]
            ref[(3, 2, 3)]=0.23505904122/(o+1.)+(-0.288812853615)+(0.240671935114)*0.5**o
            arg[(3, 3, 0)]=0.0462870929475*x[0]**o + (-0.849388764179)*x[0] + (-0.474908405803)*x[1]**o + (-0.0264818503027)*x[1] + (-0.236339369675)*x[2]**o + (0.449555077558)*x[2]
            ref[(3, 3, 0)]=-0.711247775478/(o+1.)+(-0.213157768462)+(0.0462870929475)*0.5**o
            arg[(3, 3, 1)]=-0.991559434336*x[0]**o + (0.405657403085)*x[0] + (-0.771944343453)*x[1]**o + (-0.364039983911)*x[1] + (0.205409745234)*x[2]**o + (-0.229125815021)*x[2]
            ref[(3, 3, 1)]=-0.566534598219/(o+1.)+(-0.0937541979238)+(-0.991559434336)*0.5**o
            arg[(3, 3, 2)]=-0.781264642895*x[0]**o + (-0.181605280074)*x[0] + (-0.685252100657)*x[1]**o + (0.483534762273)*x[1] + (-0.394078825519)*x[2]**o + (0.522865221976)*x[2]
            ref[(3, 3, 2)]=-1.07933092618/(o+1.)+(0.412397352088)+(-0.781264642895)*0.5**o
            arg[(3, 3, 3)]=0.917502538772*x[0]**o + (0.438484922417)*x[0] + (0.390559830449)*x[1]**o + (0.199908370713)*x[1] + (-0.72078340933)*x[2]**o + (-0.394223931353)*x[2]
            ref[(3, 3, 3)]=-0.330223578881/(o+1.)+(0.122084680888)+(0.917502538772)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 3, 2),w)
        ref=numpy.zeros((4, 3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.241640161134*x[0]**o + (-0.635566119022)*x[0] + (0.132454345135)*x[1]**o + (-0.161900893438)*x[1]
            ref[(0, 0, 0, 0)]=0.132454345135/(o+1.)+(-0.39873350623)+(0.241640161134)*0.5**o
            arg[(0, 0, 0, 1)]=0.418331324809*x[0]**o + (0.777669672085)*x[0] + (0.990056061545)*x[1]**o + (0.224788188233)*x[1]
            ref[(0, 0, 0, 1)]=0.990056061545/(o+1.)+(0.501228930159)+(0.418331324809)*0.5**o
            arg[(0, 0, 1, 0)]=0.721578255042*x[0]**o + (-0.568634391003)*x[0] + (0.536140617652)*x[1]**o + (0.762234072164)*x[1]
            ref[(0, 0, 1, 0)]=0.536140617652/(o+1.)+(0.0967998405804)+(0.721578255042)*0.5**o
            arg[(0, 0, 1, 1)]=-0.930793216691*x[0]**o + (-0.151692348354)*x[0] + (-0.654160489664)*x[1]**o + (-0.763214373255)*x[1]
            ref[(0, 0, 1, 1)]=-0.654160489664/(o+1.)+(-0.457453360805)+(-0.930793216691)*0.5**o
            arg[(0, 0, 2, 0)]=-0.499226490467*x[0]**o + (-0.411418279739)*x[0] + (-0.841838234405)*x[1]**o + (0.227308676115)*x[1]
            ref[(0, 0, 2, 0)]=-0.841838234405/(o+1.)+(-0.092054801812)+(-0.499226490467)*0.5**o
            arg[(0, 0, 2, 1)]=-0.906723790108*x[0]**o + (0.288513267362)*x[0] + (0.447485448878)*x[1]**o + (-0.124551075941)*x[1]
            ref[(0, 0, 2, 1)]=0.447485448878/(o+1.)+(0.0819810957105)+(-0.906723790108)*0.5**o
            arg[(0, 1, 0, 0)]=-0.392282950347*x[0]**o + (0.39247384953)*x[0] + (-0.60671117571)*x[1]**o + (-0.6662854126)*x[1]
            ref[(0, 1, 0, 0)]=-0.60671117571/(o+1.)+(-0.136905781535)+(-0.392282950347)*0.5**o
            arg[(0, 1, 0, 1)]=0.291731260093*x[0]**o + (-0.592422313777)*x[0] + (0.200658193877)*x[1]**o + (0.289484037301)*x[1]
            ref[(0, 1, 0, 1)]=0.200658193877/(o+1.)+(-0.151469138238)+(0.291731260093)*0.5**o
            arg[(0, 1, 1, 0)]=-0.623700508074*x[0]**o + (-0.00308156775867)*x[0] + (0.365611290751)*x[1]**o + (0.00494390000023)*x[1]
            ref[(0, 1, 1, 0)]=0.365611290751/(o+1.)+(0.000931166120778)+(-0.623700508074)*0.5**o
            arg[(0, 1, 1, 1)]=0.282749690784*x[0]**o + (-0.714116260802)*x[0] + (0.712593924371)*x[1]**o + (0.343175492002)*x[1]
            ref[(0, 1, 1, 1)]=0.712593924371/(o+1.)+(-0.1854703844)+(0.282749690784)*0.5**o
            arg[(0, 1, 2, 0)]=0.346579921481*x[0]**o + (-0.202137340921)*x[0] + (-0.991824210582)*x[1]**o + (-0.465460269283)*x[1]
            ref[(0, 1, 2, 0)]=-0.991824210582/(o+1.)+(-0.333798805102)+(0.346579921481)*0.5**o
            arg[(0, 1, 2, 1)]=0.620863550847*x[0]**o + (-0.669201485798)*x[0] + (0.146540366368)*x[1]**o + (-0.348208916884)*x[1]
            ref[(0, 1, 2, 1)]=0.146540366368/(o+1.)+(-0.508705201341)+(0.620863550847)*0.5**o
            arg[(0, 2, 0, 0)]=0.999574577815*x[0]**o + (-0.82582444971)*x[0] + (0.805539663347)*x[1]**o + (0.099377449595)*x[1]
            ref[(0, 2, 0, 0)]=0.805539663347/(o+1.)+(-0.363223500058)+(0.999574577815)*0.5**o
            arg[(0, 2, 0, 1)]=0.64815512485*x[0]**o + (-0.927303259296)*x[0] + (0.311065106784)*x[1]**o + (0.340094495505)*x[1]
            ref[(0, 2, 0, 1)]=0.311065106784/(o+1.)+(-0.293604381896)+(0.64815512485)*0.5**o
            arg[(0, 2, 1, 0)]=-0.816197950029*x[0]**o + (0.959451561269)*x[0] + (-0.423028694837)*x[1]**o + (-0.650630663433)*x[1]
            ref[(0, 2, 1, 0)]=-0.423028694837/(o+1.)+(0.154410448918)+(-0.816197950029)*0.5**o
            arg[(0, 2, 1, 1)]=0.985025687316*x[0]**o + (0.328794495457)*x[0] + (-0.54192887882)*x[1]**o + (0.415350602883)*x[1]
            ref[(0, 2, 1, 1)]=-0.54192887882/(o+1.)+(0.37207254917)+(0.985025687316)*0.5**o
            arg[(0, 2, 2, 0)]=-0.334527477893*x[0]**o + (0.316731699187)*x[0] + (-0.294602215365)*x[1]**o + (0.274797304219)*x[1]
            ref[(0, 2, 2, 0)]=-0.294602215365/(o+1.)+(0.295764501703)+(-0.334527477893)*0.5**o
            arg[(0, 2, 2, 1)]=-0.863064082035*x[0]**o + (0.194572153304)*x[0] + (-0.0422657015911)*x[1]**o + (0.730623640426)*x[1]
            ref[(0, 2, 2, 1)]=-0.0422657015911/(o+1.)+(0.462597896865)+(-0.863064082035)*0.5**o
            arg[(1, 0, 0, 0)]=-0.191298273301*x[0]**o + (-0.0354392505247)*x[0] + (0.619800075106)*x[1]**o + (0.934773321175)*x[1]
            ref[(1, 0, 0, 0)]=0.619800075106/(o+1.)+(0.449667035325)+(-0.191298273301)*0.5**o
            arg[(1, 0, 0, 1)]=0.944511669933*x[0]**o + (-0.100218546537)*x[0] + (0.979439709765)*x[1]**o + (-0.530521056421)*x[1]
            ref[(1, 0, 0, 1)]=0.979439709765/(o+1.)+(-0.315369801479)+(0.944511669933)*0.5**o
            arg[(1, 0, 1, 0)]=-0.565650850737*x[0]**o + (-0.653071086279)*x[0] + (0.621626434564)*x[1]**o + (-0.456367413932)*x[1]
            ref[(1, 0, 1, 0)]=0.621626434564/(o+1.)+(-0.554719250106)+(-0.565650850737)*0.5**o
            arg[(1, 0, 1, 1)]=-0.0166519764792*x[0]**o + (0.267329106312)*x[0] + (-0.899521732049)*x[1]**o + (0.907958304459)*x[1]
            ref[(1, 0, 1, 1)]=-0.899521732049/(o+1.)+(0.587643705386)+(-0.0166519764792)*0.5**o
            arg[(1, 0, 2, 0)]=0.0827651665251*x[0]**o + (-0.631096374795)*x[0] + (-0.35379765865)*x[1]**o + (-0.90806522227)*x[1]
            ref[(1, 0, 2, 0)]=-0.35379765865/(o+1.)+(-0.769580798533)+(0.0827651665251)*0.5**o
            arg[(1, 0, 2, 1)]=0.988060215681*x[0]**o + (0.436366685394)*x[0] + (-0.0739361062152)*x[1]**o + (0.463617857091)*x[1]
            ref[(1, 0, 2, 1)]=-0.0739361062152/(o+1.)+(0.449992271242)+(0.988060215681)*0.5**o
            arg[(1, 1, 0, 0)]=0.834552064466*x[0]**o + (0.0135731354902)*x[0] + (-0.336614678362)*x[1]**o + (0.0388493805029)*x[1]
            ref[(1, 1, 0, 0)]=-0.336614678362/(o+1.)+(0.0262112579965)+(0.834552064466)*0.5**o
            arg[(1, 1, 0, 1)]=-0.883807285252*x[0]**o + (0.68684328759)*x[0] + (0.28047354289)*x[1]**o + (0.483930492564)*x[1]
            ref[(1, 1, 0, 1)]=0.28047354289/(o+1.)+(0.585386890077)+(-0.883807285252)*0.5**o
            arg[(1, 1, 1, 0)]=0.283617406741*x[0]**o + (0.00712729264848)*x[0] + (-0.329299741571)*x[1]**o + (-0.384521962556)*x[1]
            ref[(1, 1, 1, 0)]=-0.329299741571/(o+1.)+(-0.188697334954)+(0.283617406741)*0.5**o
            arg[(1, 1, 1, 1)]=-0.601727107993*x[0]**o + (-0.774691595205)*x[0] + (0.953165819177)*x[1]**o + (0.941809242864)*x[1]
            ref[(1, 1, 1, 1)]=0.953165819177/(o+1.)+(0.0835588238292)+(-0.601727107993)*0.5**o
            arg[(1, 1, 2, 0)]=0.944564239264*x[0]**o + (0.535585794901)*x[0] + (-0.00427001019812)*x[1]**o + (0.386454455585)*x[1]
            ref[(1, 1, 2, 0)]=-0.00427001019812/(o+1.)+(0.461020125243)+(0.944564239264)*0.5**o
            arg[(1, 1, 2, 1)]=0.938431551109*x[0]**o + (0.202069676769)*x[0] + (0.0427874601313)*x[1]**o + (0.850432423632)*x[1]
            ref[(1, 1, 2, 1)]=0.0427874601313/(o+1.)+(0.526251050201)+(0.938431551109)*0.5**o
            arg[(1, 2, 0, 0)]=-0.56339214659*x[0]**o + (-0.460487174051)*x[0] + (-0.350029442839)*x[1]**o + (-0.854743070319)*x[1]
            ref[(1, 2, 0, 0)]=-0.350029442839/(o+1.)+(-0.657615122185)+(-0.56339214659)*0.5**o
            arg[(1, 2, 0, 1)]=-0.709889428381*x[0]**o + (-0.82138349024)*x[0] + (-0.950178069317)*x[1]**o + (0.56618037631)*x[1]
            ref[(1, 2, 0, 1)]=-0.950178069317/(o+1.)+(-0.127601556965)+(-0.709889428381)*0.5**o
            arg[(1, 2, 1, 0)]=-0.918827231799*x[0]**o + (-0.991878007788)*x[0] + (0.70373578777)*x[1]**o + (-0.939253615893)*x[1]
            ref[(1, 2, 1, 0)]=0.70373578777/(o+1.)+(-0.96556581184)+(-0.918827231799)*0.5**o
            arg[(1, 2, 1, 1)]=-0.471980973802*x[0]**o + (0.620755032348)*x[0] + (-0.984704477255)*x[1]**o + (-0.151092113575)*x[1]
            ref[(1, 2, 1, 1)]=-0.984704477255/(o+1.)+(0.234831459386)+(-0.471980973802)*0.5**o
            arg[(1, 2, 2, 0)]=-0.655049639826*x[0]**o + (-0.764173864748)*x[0] + (-0.733535802487)*x[1]**o + (-0.553244431282)*x[1]
            ref[(1, 2, 2, 0)]=-0.733535802487/(o+1.)+(-0.658709148015)+(-0.655049639826)*0.5**o
            arg[(1, 2, 2, 1)]=0.181310197929*x[0]**o + (-0.683193553977)*x[0] + (0.276274172531)*x[1]**o + (0.105223437859)*x[1]
            ref[(1, 2, 2, 1)]=0.276274172531/(o+1.)+(-0.288985058059)+(0.181310197929)*0.5**o
            arg[(2, 0, 0, 0)]=-0.0546415787229*x[0]**o + (0.820392223315)*x[0] + (0.0617806160682)*x[1]**o + (-0.0407887564032)*x[1]
            ref[(2, 0, 0, 0)]=0.0617806160682/(o+1.)+(0.389801733456)+(-0.0546415787229)*0.5**o
            arg[(2, 0, 0, 1)]=0.0865191736582*x[0]**o + (0.364443305175)*x[0] + (0.35994966793)*x[1]**o + (0.138664120765)*x[1]
            ref[(2, 0, 0, 1)]=0.35994966793/(o+1.)+(0.25155371297)+(0.0865191736582)*0.5**o
            arg[(2, 0, 1, 0)]=-0.342354650817*x[0]**o + (0.944697545386)*x[0] + (-0.13045548508)*x[1]**o + (0.0999899142918)*x[1]
            ref[(2, 0, 1, 0)]=-0.13045548508/(o+1.)+(0.522343729839)+(-0.342354650817)*0.5**o
            arg[(2, 0, 1, 1)]=0.922577245105*x[0]**o + (0.857923202821)*x[0] + (0.708364817859)*x[1]**o + (-0.0998394536359)*x[1]
            ref[(2, 0, 1, 1)]=0.708364817859/(o+1.)+(0.379041874592)+(0.922577245105)*0.5**o
            arg[(2, 0, 2, 0)]=-0.441872010919*x[0]**o + (-0.323940229949)*x[0] + (0.249243618052)*x[1]**o + (0.865255249782)*x[1]
            ref[(2, 0, 2, 0)]=0.249243618052/(o+1.)+(0.270657509916)+(-0.441872010919)*0.5**o
            arg[(2, 0, 2, 1)]=-0.104494043101*x[0]**o + (0.927592596751)*x[0] + (-0.902743530623)*x[1]**o + (0.483089411364)*x[1]
            ref[(2, 0, 2, 1)]=-0.902743530623/(o+1.)+(0.705341004057)+(-0.104494043101)*0.5**o
            arg[(2, 1, 0, 0)]=0.94265197968*x[0]**o + (0.571721797146)*x[0] + (0.70039540982)*x[1]**o + (0.741555122763)*x[1]
            ref[(2, 1, 0, 0)]=0.70039540982/(o+1.)+(0.656638459955)+(0.94265197968)*0.5**o
            arg[(2, 1, 0, 1)]=0.842534539691*x[0]**o + (0.0220911253834)*x[0] + (0.112995483739)*x[1]**o + (-0.247956942861)*x[1]
            ref[(2, 1, 0, 1)]=0.112995483739/(o+1.)+(-0.112932908739)+(0.842534539691)*0.5**o
            arg[(2, 1, 1, 0)]=0.294577559372*x[0]**o + (-0.964337888805)*x[0] + (0.705962337639)*x[1]**o + (0.864572643868)*x[1]
            ref[(2, 1, 1, 0)]=0.705962337639/(o+1.)+(-0.0498826224684)+(0.294577559372)*0.5**o
            arg[(2, 1, 1, 1)]=-0.785015916149*x[0]**o + (0.606769497494)*x[0] + (-0.0430815964845)*x[1]**o + (-0.451124813763)*x[1]
            ref[(2, 1, 1, 1)]=-0.0430815964845/(o+1.)+(0.0778223418653)+(-0.785015916149)*0.5**o
            arg[(2, 1, 2, 0)]=-0.124189370926*x[0]**o + (0.127071810232)*x[0] + (-0.851685464255)*x[1]**o + (0.544096663744)*x[1]
            ref[(2, 1, 2, 0)]=-0.851685464255/(o+1.)+(0.335584236988)+(-0.124189370926)*0.5**o
            arg[(2, 1, 2, 1)]=0.269207604016*x[0]**o + (-0.691572599419)*x[0] + (0.815750982487)*x[1]**o + (-0.362160957464)*x[1]
            ref[(2, 1, 2, 1)]=0.815750982487/(o+1.)+(-0.526866778442)+(0.269207604016)*0.5**o
            arg[(2, 2, 0, 0)]=0.0525853853188*x[0]**o + (0.578604143737)*x[0] + (-0.733258325371)*x[1]**o + (-0.777395370623)*x[1]
            ref[(2, 2, 0, 0)]=-0.733258325371/(o+1.)+(-0.0993956134428)+(0.0525853853188)*0.5**o
            arg[(2, 2, 0, 1)]=-0.369770145244*x[0]**o + (0.366026834418)*x[0] + (0.766411819314)*x[1]**o + (-0.455886566288)*x[1]
            ref[(2, 2, 0, 1)]=0.766411819314/(o+1.)+(-0.0449298659347)+(-0.369770145244)*0.5**o
            arg[(2, 2, 1, 0)]=0.567874347878*x[0]**o + (0.712389090064)*x[0] + (-0.637817405452)*x[1]**o + (-0.7671681552)*x[1]
            ref[(2, 2, 1, 0)]=-0.637817405452/(o+1.)+(-0.0273895325679)+(0.567874347878)*0.5**o
            arg[(2, 2, 1, 1)]=0.461532519945*x[0]**o + (0.54597213801)*x[0] + (0.764872790917)*x[1]**o + (-0.69754615809)*x[1]
            ref[(2, 2, 1, 1)]=0.764872790917/(o+1.)+(-0.0757870100403)+(0.461532519945)*0.5**o
            arg[(2, 2, 2, 0)]=-0.250673058554*x[0]**o + (-0.68407742936)*x[0] + (0.97931706204)*x[1]**o + (-0.261859811116)*x[1]
            ref[(2, 2, 2, 0)]=0.97931706204/(o+1.)+(-0.472968620238)+(-0.250673058554)*0.5**o
            arg[(2, 2, 2, 1)]=-0.541632357445*x[0]**o + (-0.618440250612)*x[0] + (-0.509584521515)*x[1]**o + (0.804599528154)*x[1]
            ref[(2, 2, 2, 1)]=-0.509584521515/(o+1.)+(0.0930796387706)+(-0.541632357445)*0.5**o
            arg[(3, 0, 0, 0)]=0.541563380893*x[0]**o + (0.299018133918)*x[0] + (-0.749430175066)*x[1]**o + (0.187004769077)*x[1]
            ref[(3, 0, 0, 0)]=-0.749430175066/(o+1.)+(0.243011451497)+(0.541563380893)*0.5**o
            arg[(3, 0, 0, 1)]=-0.381285742869*x[0]**o + (-0.630002113672)*x[0] + (0.26606796687)*x[1]**o + (0.795684744423)*x[1]
            ref[(3, 0, 0, 1)]=0.26606796687/(o+1.)+(0.0828413153756)+(-0.381285742869)*0.5**o
            arg[(3, 0, 1, 0)]=0.479442191891*x[0]**o + (0.532999303088)*x[0] + (-0.723435259565)*x[1]**o + (-0.360265550955)*x[1]
            ref[(3, 0, 1, 0)]=-0.723435259565/(o+1.)+(0.0863668760663)+(0.479442191891)*0.5**o
            arg[(3, 0, 1, 1)]=-0.567403307412*x[0]**o + (-0.112761304009)*x[0] + (0.878359513768)*x[1]**o + (-0.200205909422)*x[1]
            ref[(3, 0, 1, 1)]=0.878359513768/(o+1.)+(-0.156483606715)+(-0.567403307412)*0.5**o
            arg[(3, 0, 2, 0)]=0.585906337167*x[0]**o + (-0.564312941666)*x[0] + (0.497546461924)*x[1]**o + (-0.142320137807)*x[1]
            ref[(3, 0, 2, 0)]=0.497546461924/(o+1.)+(-0.353316539736)+(0.585906337167)*0.5**o
            arg[(3, 0, 2, 1)]=-0.217571812916*x[0]**o + (-0.300214025296)*x[0] + (0.981739160107)*x[1]**o + (-0.149664430163)*x[1]
            ref[(3, 0, 2, 1)]=0.981739160107/(o+1.)+(-0.224939227729)+(-0.217571812916)*0.5**o
            arg[(3, 1, 0, 0)]=0.0869945096729*x[0]**o + (-0.179671039726)*x[0] + (-0.275369184204)*x[1]**o + (-0.567407293535)*x[1]
            ref[(3, 1, 0, 0)]=-0.275369184204/(o+1.)+(-0.37353916663)+(0.0869945096729)*0.5**o
            arg[(3, 1, 0, 1)]=0.169068034111*x[0]**o + (0.112900283292)*x[0] + (0.0421515779689)*x[1]**o + (0.106549000572)*x[1]
            ref[(3, 1, 0, 1)]=0.0421515779689/(o+1.)+(0.109724641932)+(0.169068034111)*0.5**o
            arg[(3, 1, 1, 0)]=-0.335365947808*x[0]**o + (-0.985487494956)*x[0] + (0.159721783659)*x[1]**o + (-0.358594076042)*x[1]
            ref[(3, 1, 1, 0)]=0.159721783659/(o+1.)+(-0.672040785499)+(-0.335365947808)*0.5**o
            arg[(3, 1, 1, 1)]=0.302321988704*x[0]**o + (-0.587683239196)*x[0] + (-0.512434709022)*x[1]**o + (-0.816742648128)*x[1]
            ref[(3, 1, 1, 1)]=-0.512434709022/(o+1.)+(-0.702212943662)+(0.302321988704)*0.5**o
            arg[(3, 1, 2, 0)]=0.58382107245*x[0]**o + (0.0750295403506)*x[0] + (0.713753934559)*x[1]**o + (0.963756749741)*x[1]
            ref[(3, 1, 2, 0)]=0.713753934559/(o+1.)+(0.519393145046)+(0.58382107245)*0.5**o
            arg[(3, 1, 2, 1)]=-0.0882971329444*x[0]**o + (0.197817563099)*x[0] + (-0.556308954208)*x[1]**o + (-0.402919633804)*x[1]
            ref[(3, 1, 2, 1)]=-0.556308954208/(o+1.)+(-0.102551035352)+(-0.0882971329444)*0.5**o
            arg[(3, 2, 0, 0)]=0.35730252225*x[0]**o + (-0.398147998086)*x[0] + (0.775010128863)*x[1]**o + (0.335713082195)*x[1]
            ref[(3, 2, 0, 0)]=0.775010128863/(o+1.)+(-0.0312174579455)+(0.35730252225)*0.5**o
            arg[(3, 2, 0, 1)]=-0.813737590573*x[0]**o + (0.599082804115)*x[0] + (0.945311605806)*x[1]**o + (0.358726624451)*x[1]
            ref[(3, 2, 0, 1)]=0.945311605806/(o+1.)+(0.478904714283)+(-0.813737590573)*0.5**o
            arg[(3, 2, 1, 0)]=-0.983453532262*x[0]**o + (0.389346330659)*x[0] + (-0.750011801196)*x[1]**o + (-0.177200579767)*x[1]
            ref[(3, 2, 1, 0)]=-0.750011801196/(o+1.)+(0.106072875446)+(-0.983453532262)*0.5**o
            arg[(3, 2, 1, 1)]=-0.100033927713*x[0]**o + (0.407208855146)*x[0] + (0.391101438309)*x[1]**o + (0.548234756851)*x[1]
            ref[(3, 2, 1, 1)]=0.391101438309/(o+1.)+(0.477721805998)+(-0.100033927713)*0.5**o
            arg[(3, 2, 2, 0)]=0.712534372533*x[0]**o + (0.564777730545)*x[0] + (0.702616521927)*x[1]**o + (-0.731111801131)*x[1]
            ref[(3, 2, 2, 0)]=0.702616521927/(o+1.)+(-0.0831670352929)+(0.712534372533)*0.5**o
            arg[(3, 2, 2, 1)]=-0.198091246404*x[0]**o + (-0.79946604272)*x[0] + (-0.259812851825)*x[1]**o + (-0.702030323913)*x[1]
            ref[(3, 2, 2, 1)]=-0.259812851825/(o+1.)+(-0.750748183317)+(-0.198091246404)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.924573445134*x[0]**o + (-0.956921365508)*x[0] + (-0.163756568303)*x[1]**o + (-0.425917071565)*x[1] + (0.301352706232)*x[2]**o + (-0.60232317872)*x[2]
            ref[(0, 0, 0, 0)]=0.137596137929/(o+1.)+(-0.992580807896)+(-0.924573445134)*0.5**o
            arg[(0, 0, 0, 1)]=0.527571734362*x[0]**o + (0.478731935385)*x[0] + (-0.0581325906551)*x[1]**o + (0.997849298096)*x[1] + (-0.792046661385)*x[2]**o + (0.27970482527)*x[2]
            ref[(0, 0, 0, 1)]=-0.85017925204/(o+1.)+(0.878143029375)+(0.527571734362)*0.5**o
            arg[(0, 0, 1, 0)]=-0.751178942054*x[0]**o + (0.225440352717)*x[0] + (0.202078728088)*x[1]**o + (-0.703183608131)*x[1] + (0.652073480637)*x[2]**o + (-0.444708942655)*x[2]
            ref[(0, 0, 1, 0)]=0.854152208725/(o+1.)+(-0.461226099034)+(-0.751178942054)*0.5**o
            arg[(0, 0, 1, 1)]=0.69579993546*x[0]**o + (0.150329256021)*x[0] + (0.754147961431)*x[1]**o + (0.960867651782)*x[1] + (-0.563274057637)*x[2]**o + (0.499255041329)*x[2]
            ref[(0, 0, 1, 1)]=0.190873903794/(o+1.)+(0.805225974566)+(0.69579993546)*0.5**o
            arg[(0, 0, 2, 0)]=0.477228750496*x[0]**o + (-0.671877637873)*x[0] + (0.150704807338)*x[1]**o + (0.237056872194)*x[1] + (-0.594767477843)*x[2]**o + (0.566850823256)*x[2]
            ref[(0, 0, 2, 0)]=-0.444062670505/(o+1.)+(0.0660150287887)+(0.477228750496)*0.5**o
            arg[(0, 0, 2, 1)]=0.730569800353*x[0]**o + (0.65001430519)*x[0] + (-0.441445171799)*x[1]**o + (0.994101741783)*x[1] + (0.426120022325)*x[2]**o + (0.805341026439)*x[2]
            ref[(0, 0, 2, 1)]=-0.015325149474/(o+1.)+(1.22472853671)+(0.730569800353)*0.5**o
            arg[(0, 1, 0, 0)]=-0.574048637041*x[0]**o + (0.450627148256)*x[0] + (-0.773386247805)*x[1]**o + (-0.429893916334)*x[1] + (0.550900747199)*x[2]**o + (-0.932968955886)*x[2]
            ref[(0, 1, 0, 0)]=-0.222485500605/(o+1.)+(-0.456117861982)+(-0.574048637041)*0.5**o
            arg[(0, 1, 0, 1)]=0.883286986868*x[0]**o + (-0.708318859659)*x[0] + (-0.342467126469)*x[1]**o + (0.381379197386)*x[1] + (-0.0798368210351)*x[2]**o + (0.0596291317513)*x[2]
            ref[(0, 1, 0, 1)]=-0.422303947504/(o+1.)+(-0.133655265261)+(0.883286986868)*0.5**o
            arg[(0, 1, 1, 0)]=-0.549004831041*x[0]**o + (-0.214565523873)*x[0] + (0.68250720684)*x[1]**o + (0.983497686778)*x[1] + (-0.364049322887)*x[2]**o + (0.789384567454)*x[2]
            ref[(0, 1, 1, 0)]=0.318457883953/(o+1.)+(0.779158365179)+(-0.549004831041)*0.5**o
            arg[(0, 1, 1, 1)]=-0.0165346199793*x[0]**o + (0.915677533204)*x[0] + (-0.492257086894)*x[1]**o + (0.869356436836)*x[1] + (-0.208825168079)*x[2]**o + (0.629502452468)*x[2]
            ref[(0, 1, 1, 1)]=-0.701082254973/(o+1.)+(1.20726821125)+(-0.0165346199793)*0.5**o
            arg[(0, 1, 2, 0)]=-0.898531673314*x[0]**o + (0.641283071559)*x[0] + (-0.999948595768)*x[1]**o + (0.0197525990058)*x[1] + (0.166248599196)*x[2]**o + (0.502030563242)*x[2]
            ref[(0, 1, 2, 0)]=-0.833699996572/(o+1.)+(0.581533116904)+(-0.898531673314)*0.5**o
            arg[(0, 1, 2, 1)]=0.159481053767*x[0]**o + (-0.359250696202)*x[0] + (-0.131547763657)*x[1]**o + (0.380335935126)*x[1] + (0.528917144369)*x[2]**o + (0.685038794701)*x[2]
            ref[(0, 1, 2, 1)]=0.397369380712/(o+1.)+(0.353062016813)+(0.159481053767)*0.5**o
            arg[(0, 2, 0, 0)]=-0.297675584026*x[0]**o + (-0.0699916521085)*x[0] + (0.464307457083)*x[1]**o + (0.985163611392)*x[1] + (-0.395987494999)*x[2]**o + (0.755622437987)*x[2]
            ref[(0, 2, 0, 0)]=0.0683199620843/(o+1.)+(0.835397198635)+(-0.297675584026)*0.5**o
            arg[(0, 2, 0, 1)]=0.177453675626*x[0]**o + (0.174280914506)*x[0] + (0.454394788932)*x[1]**o + (-0.060013979483)*x[1] + (0.882161948514)*x[2]**o + (-0.451599922208)*x[2]
            ref[(0, 2, 0, 1)]=1.33655673745/(o+1.)+(-0.168666493592)+(0.177453675626)*0.5**o
            arg[(0, 2, 1, 0)]=0.526437443731*x[0]**o + (0.242206112953)*x[0] + (0.128567304527)*x[1]**o + (-0.914407753164)*x[1] + (-0.405062911854)*x[2]**o + (0.761937522325)*x[2]
            ref[(0, 2, 1, 0)]=-0.276495607327/(o+1.)+(0.0448679410572)+(0.526437443731)*0.5**o
            arg[(0, 2, 1, 1)]=0.681755977346*x[0]**o + (0.319938795018)*x[0] + (-0.824269313551)*x[1]**o + (-0.362947069932)*x[1] + (0.527455942162)*x[2]**o + (0.597595748484)*x[2]
            ref[(0, 2, 1, 1)]=-0.296813371389/(o+1.)+(0.277293736785)+(0.681755977346)*0.5**o
            arg[(0, 2, 2, 0)]=-0.233700162337*x[0]**o + (0.0484387013475)*x[0] + (-0.959158209342)*x[1]**o + (-0.522865532479)*x[1] + (-0.136910159909)*x[2]**o + (0.995139150817)*x[2]
            ref[(0, 2, 2, 0)]=-1.09606836925/(o+1.)+(0.260356159843)+(-0.233700162337)*0.5**o
            arg[(0, 2, 2, 1)]=0.602387883574*x[0]**o + (0.798484018737)*x[0] + (-0.160246949371)*x[1]**o + (0.120066722828)*x[1] + (-0.0920323844548)*x[2]**o + (0.540632036532)*x[2]
            ref[(0, 2, 2, 1)]=-0.252279333826/(o+1.)+(0.729591389049)+(0.602387883574)*0.5**o
            arg[(1, 0, 0, 0)]=-0.365256743797*x[0]**o + (0.236181707468)*x[0] + (-0.566826285762)*x[1]**o + (-0.832585184609)*x[1] + (-0.589524533777)*x[2]**o + (-0.853288689604)*x[2]
            ref[(1, 0, 0, 0)]=-1.15635081954/(o+1.)+(-0.724846083373)+(-0.365256743797)*0.5**o
            arg[(1, 0, 0, 1)]=-0.866852132104*x[0]**o + (0.0904072423756)*x[0] + (0.0277100724971)*x[1]**o + (-0.710108207084)*x[1] + (0.456259223798)*x[2]**o + (0.0941182003582)*x[2]
            ref[(1, 0, 0, 1)]=0.483969296295/(o+1.)+(-0.262791382175)+(-0.866852132104)*0.5**o
            arg[(1, 0, 1, 0)]=-0.711986539869*x[0]**o + (-0.313126636375)*x[0] + (0.183778677227)*x[1]**o + (0.425390105612)*x[1] + (0.837079993275)*x[2]**o + (-0.513678348052)*x[2]
            ref[(1, 0, 1, 0)]=1.0208586705/(o+1.)+(-0.200707439407)+(-0.711986539869)*0.5**o
            arg[(1, 0, 1, 1)]=0.228853001357*x[0]**o + (0.887712797795)*x[0] + (0.518381778233)*x[1]**o + (-0.133412908063)*x[1] + (-0.195627870137)*x[2]**o + (0.626324305261)*x[2]
            ref[(1, 0, 1, 1)]=0.322753908097/(o+1.)+(0.690312097497)+(0.228853001357)*0.5**o
            arg[(1, 0, 2, 0)]=-0.686932613005*x[0]**o + (0.94747030158)*x[0] + (0.785721418595)*x[1]**o + (-0.774633436066)*x[1] + (0.477462796707)*x[2]**o + (0.595002394412)*x[2]
            ref[(1, 0, 2, 0)]=1.2631842153/(o+1.)+(0.383919629963)+(-0.686932613005)*0.5**o
            arg[(1, 0, 2, 1)]=0.302918208192*x[0]**o + (0.0367628548245)*x[0] + (-0.0633851259083)*x[1]**o + (0.66554610969)*x[1] + (0.551917871739)*x[2]**o + (-0.915001671826)*x[2]
            ref[(1, 0, 2, 1)]=0.488532745831/(o+1.)+(-0.106346353656)+(0.302918208192)*0.5**o
            arg[(1, 1, 0, 0)]=-0.696292311117*x[0]**o + (0.698304511321)*x[0] + (-0.433283505763)*x[1]**o + (0.261016705857)*x[1] + (0.693545968421)*x[2]**o + (0.61964519654)*x[2]
            ref[(1, 1, 0, 0)]=0.260262462658/(o+1.)+(0.789483206859)+(-0.696292311117)*0.5**o
            arg[(1, 1, 0, 1)]=0.14873645619*x[0]**o + (0.86876052058)*x[0] + (0.431129858406)*x[1]**o + (0.0747911852091)*x[1] + (0.526988505114)*x[2]**o + (0.928240471943)*x[2]
            ref[(1, 1, 0, 1)]=0.95811836352/(o+1.)+(0.935896088866)+(0.14873645619)*0.5**o
            arg[(1, 1, 1, 0)]=0.772605487378*x[0]**o + (-0.721994999708)*x[0] + (-0.826357674474)*x[1]**o + (0.448598463369)*x[1] + (0.901299843296)*x[2]**o + (-0.0509822788953)*x[2]
            ref[(1, 1, 1, 0)]=0.0749421688225/(o+1.)+(-0.162189407617)+(0.772605487378)*0.5**o
            arg[(1, 1, 1, 1)]=-0.28583456254*x[0]**o + (-0.914754810147)*x[0] + (0.658724628951)*x[1]**o + (-0.0875486707682)*x[1] + (0.0165444730722)*x[2]**o + (-0.492006084496)*x[2]
            ref[(1, 1, 1, 1)]=0.675269102023/(o+1.)+(-0.747154782706)+(-0.28583456254)*0.5**o
            arg[(1, 1, 2, 0)]=0.0359703244298*x[0]**o + (-0.716858727045)*x[0] + (0.123066042728)*x[1]**o + (-0.171566647944)*x[1] + (0.134304534554)*x[2]**o + (-0.828579755741)*x[2]
            ref[(1, 1, 2, 0)]=0.257370577282/(o+1.)+(-0.858502565365)+(0.0359703244298)*0.5**o
            arg[(1, 1, 2, 1)]=0.0901263312479*x[0]**o + (-0.530399447427)*x[0] + (-0.380424840602)*x[1]**o + (0.672585289816)*x[1] + (-0.282017549296)*x[2]**o + (-0.869984484454)*x[2]
            ref[(1, 1, 2, 1)]=-0.662442389899/(o+1.)+(-0.363899321032)+(0.0901263312479)*0.5**o
            arg[(1, 2, 0, 0)]=0.315968596969*x[0]**o + (-0.173020937185)*x[0] + (0.390820070371)*x[1]**o + (-0.810148304276)*x[1] + (-0.939423874761)*x[2]**o + (-0.634079991337)*x[2]
            ref[(1, 2, 0, 0)]=-0.54860380439/(o+1.)+(-0.808624616399)+(0.315968596969)*0.5**o
            arg[(1, 2, 0, 1)]=0.593211673402*x[0]**o + (0.889228351205)*x[0] + (0.909546725762)*x[1]**o + (0.974017167975)*x[1] + (-0.78025540441)*x[2]**o + (-0.302275332932)*x[2]
            ref[(1, 2, 0, 1)]=0.129291321352/(o+1.)+(0.780485093124)+(0.593211673402)*0.5**o
            arg[(1, 2, 1, 0)]=-0.378787346285*x[0]**o + (0.650033108899)*x[0] + (-0.3440946147)*x[1]**o + (0.909804907619)*x[1] + (-0.614503306457)*x[2]**o + (-0.71368644761)*x[2]
            ref[(1, 2, 1, 0)]=-0.958597921157/(o+1.)+(0.423075784454)+(-0.378787346285)*0.5**o
            arg[(1, 2, 1, 1)]=0.228491784327*x[0]**o + (-0.579369088329)*x[0] + (-0.0677502826952)*x[1]**o + (0.642501929316)*x[1] + (0.0683622418495)*x[2]**o + (0.190058568878)*x[2]
            ref[(1, 2, 1, 1)]=0.000611959154279/(o+1.)+(0.126595704933)+(0.228491784327)*0.5**o
            arg[(1, 2, 2, 0)]=0.3839938487*x[0]**o + (0.287029995169)*x[0] + (0.343222759026)*x[1]**o + (-0.834691286045)*x[1] + (0.52364985734)*x[2]**o + (0.254932412534)*x[2]
            ref[(1, 2, 2, 0)]=0.866872616366/(o+1.)+(-0.146364439171)+(0.3839938487)*0.5**o
            arg[(1, 2, 2, 1)]=0.278607898828*x[0]**o + (0.785280046969)*x[0] + (-0.968072672616)*x[1]**o + (0.905756326562)*x[1] + (0.0709611755862)*x[2]**o + (0.106194910156)*x[2]
            ref[(1, 2, 2, 1)]=-0.89711149703/(o+1.)+(0.898615641844)+(0.278607898828)*0.5**o
            arg[(2, 0, 0, 0)]=-0.2252478374*x[0]**o + (-0.699834994539)*x[0] + (0.107174233031)*x[1]**o + (-0.600643427188)*x[1] + (-0.696343175009)*x[2]**o + (-0.38517298016)*x[2]
            ref[(2, 0, 0, 0)]=-0.589168941978/(o+1.)+(-0.842825700943)+(-0.2252478374)*0.5**o
            arg[(2, 0, 0, 1)]=0.891589416002*x[0]**o + (0.189304046839)*x[0] + (-0.225901250592)*x[1]**o + (0.833987748557)*x[1] + (-0.568414980212)*x[2]**o + (0.62708484863)*x[2]
            ref[(2, 0, 0, 1)]=-0.794316230805/(o+1.)+(0.825188322013)+(0.891589416002)*0.5**o
            arg[(2, 0, 1, 0)]=0.440614722945*x[0]**o + (-0.604582139247)*x[0] + (-0.432803452219)*x[1]**o + (-0.0963810816194)*x[1] + (0.033624241802)*x[2]**o + (0.481431724388)*x[2]
            ref[(2, 0, 1, 0)]=-0.399179210417/(o+1.)+(-0.109765748239)+(0.440614722945)*0.5**o
            arg[(2, 0, 1, 1)]=0.673324028893*x[0]**o + (0.480749882817)*x[0] + (0.401372275979)*x[1]**o + (0.202584573172)*x[1] + (-0.156363351343)*x[2]**o + (0.461832278332)*x[2]
            ref[(2, 0, 1, 1)]=0.245008924635/(o+1.)+(0.57258336716)+(0.673324028893)*0.5**o
            arg[(2, 0, 2, 0)]=0.217457931537*x[0]**o + (-0.0636840969675)*x[0] + (0.0358033754856)*x[1]**o + (0.214860503882)*x[1] + (-0.116847581599)*x[2]**o + (-0.100515606295)*x[2]
            ref[(2, 0, 2, 0)]=-0.0810442061139/(o+1.)+(0.0253304003099)+(0.217457931537)*0.5**o
            arg[(2, 0, 2, 1)]=0.428963054714*x[0]**o + (-0.561406030459)*x[0] + (-0.731725011409)*x[1]**o + (0.0702970903685)*x[1] + (0.643636973959)*x[2]**o + (-0.65924365406)*x[2]
            ref[(2, 0, 2, 1)]=-0.0880880374498/(o+1.)+(-0.575176297075)+(0.428963054714)*0.5**o
            arg[(2, 1, 0, 0)]=-0.949204277067*x[0]**o + (-0.857364179625)*x[0] + (-0.733229824527)*x[1]**o + (0.0390384772278)*x[1] + (0.252655905157)*x[2]**o + (0.52065741351)*x[2]
            ref[(2, 1, 0, 0)]=-0.48057391937/(o+1.)+(-0.148834144444)+(-0.949204277067)*0.5**o
            arg[(2, 1, 0, 1)]=0.948540263612*x[0]**o + (0.396438884693)*x[0] + (0.458446133504)*x[1]**o + (-0.482333757927)*x[1] + (-0.0265868469873)*x[2]**o + (-0.965983105184)*x[2]
            ref[(2, 1, 0, 1)]=0.431859286517/(o+1.)+(-0.525938989209)+(0.948540263612)*0.5**o
            arg[(2, 1, 1, 0)]=0.0961745914446*x[0]**o + (-0.508407095834)*x[0] + (0.174073403248)*x[1]**o + (0.0185379683627)*x[1] + (-0.0855634377834)*x[2]**o + (-0.392811712281)*x[2]
            ref[(2, 1, 1, 0)]=0.0885099654644/(o+1.)+(-0.441340419876)+(0.0961745914446)*0.5**o
            arg[(2, 1, 1, 1)]=-0.979083074302*x[0]**o + (0.797024334892)*x[0] + (-0.973053672554)*x[1]**o + (-0.478074866943)*x[1] + (0.821758879312)*x[2]**o + (-0.437996763422)*x[2]
            ref[(2, 1, 1, 1)]=-0.151294793242/(o+1.)+(-0.0595236477363)+(-0.979083074302)*0.5**o
            arg[(2, 1, 2, 0)]=-0.140074972368*x[0]**o + (-0.820989628541)*x[0] + (-0.4308082579)*x[1]**o + (-0.413277336117)*x[1] + (-0.298694317613)*x[2]**o + (-0.108130071391)*x[2]
            ref[(2, 1, 2, 0)]=-0.729502575513/(o+1.)+(-0.671198518025)+(-0.140074972368)*0.5**o
            arg[(2, 1, 2, 1)]=-0.431262689916*x[0]**o + (0.610200264991)*x[0] + (-0.727746144585)*x[1]**o + (-0.111986297707)*x[1] + (0.770849057653)*x[2]**o + (0.253159263864)*x[2]
            ref[(2, 1, 2, 1)]=0.0431029130682/(o+1.)+(0.375686615574)+(-0.431262689916)*0.5**o
            arg[(2, 2, 0, 0)]=0.844941184127*x[0]**o + (0.141920947678)*x[0] + (-0.85856600965)*x[1]**o + (0.109963591145)*x[1] + (-0.875337165394)*x[2]**o + (-0.742715580568)*x[2]
            ref[(2, 2, 0, 0)]=-1.73390317504/(o+1.)+(-0.245415520872)+(0.844941184127)*0.5**o
            arg[(2, 2, 0, 1)]=-0.142438724327*x[0]**o + (-0.337876931995)*x[0] + (0.513487612645)*x[1]**o + (-0.193268351694)*x[1] + (0.932003432685)*x[2]**o + (0.239454243255)*x[2]
            ref[(2, 2, 0, 1)]=1.44549104533/(o+1.)+(-0.145845520217)+(-0.142438724327)*0.5**o
            arg[(2, 2, 1, 0)]=0.11915908668*x[0]**o + (0.0879120581249)*x[0] + (-0.616237717323)*x[1]**o + (-0.73328065471)*x[1] + (0.999800291639)*x[2]**o + (-0.454497308365)*x[2]
            ref[(2, 2, 1, 0)]=0.383562574317/(o+1.)+(-0.549932952475)+(0.11915908668)*0.5**o
            arg[(2, 2, 1, 1)]=-0.896504694093*x[0]**o + (0.309513471333)*x[0] + (-0.869026871887)*x[1]**o + (-0.678127300673)*x[1] + (-0.792183291659)*x[2]**o + (0.718053044033)*x[2]
            ref[(2, 2, 1, 1)]=-1.66121016355/(o+1.)+(0.174719607347)+(-0.896504694093)*0.5**o
            arg[(2, 2, 2, 0)]=-0.360939295626*x[0]**o + (0.915620653884)*x[0] + (0.618253156691)*x[1]**o + (0.109493693799)*x[1] + (-0.935553738722)*x[2]**o + (0.20309195905)*x[2]
            ref[(2, 2, 2, 0)]=-0.31730058203/(o+1.)+(0.614103153366)+(-0.360939295626)*0.5**o
            arg[(2, 2, 2, 1)]=0.775078294725*x[0]**o + (-0.696350688397)*x[0] + (-0.348961081995)*x[1]**o + (-0.310295864289)*x[1] + (-0.852969305449)*x[2]**o + (-0.165622671603)*x[2]
            ref[(2, 2, 2, 1)]=-1.20193038744/(o+1.)+(-0.586134612145)+(0.775078294725)*0.5**o
            arg[(3, 0, 0, 0)]=0.355526238086*x[0]**o + (0.0589550244344)*x[0] + (0.60362391301)*x[1]**o + (0.0200548549583)*x[1] + (-0.144122315367)*x[2]**o + (0.184228055669)*x[2]
            ref[(3, 0, 0, 0)]=0.459501597643/(o+1.)+(0.131618967531)+(0.355526238086)*0.5**o
            arg[(3, 0, 0, 1)]=0.17268987394*x[0]**o + (0.694427049131)*x[0] + (-0.274546623717)*x[1]**o + (-0.244716350511)*x[1] + (0.351005305952)*x[2]**o + (-0.499030895422)*x[2]
            ref[(3, 0, 0, 1)]=0.0764586822347/(o+1.)+(-0.0246600984011)+(0.17268987394)*0.5**o
            arg[(3, 0, 1, 0)]=0.708118260518*x[0]**o + (-0.0919276171372)*x[0] + (0.0776321449614)*x[1]**o + (-0.777235164561)*x[1] + (-0.44737647371)*x[2]**o + (-0.709421246297)*x[2]
            ref[(3, 0, 1, 0)]=-0.369744328748/(o+1.)+(-0.789292013997)+(0.708118260518)*0.5**o
            arg[(3, 0, 1, 1)]=0.929863164599*x[0]**o + (0.410240169355)*x[0] + (0.657515735239)*x[1]**o + (-0.00253219759897)*x[1] + (0.735288063247)*x[2]**o + (0.291838029064)*x[2]
            ref[(3, 0, 1, 1)]=1.39280379849/(o+1.)+(0.34977300041)+(0.929863164599)*0.5**o
            arg[(3, 0, 2, 0)]=-0.919877793571*x[0]**o + (0.212174391213)*x[0] + (-0.67837636811)*x[1]**o + (0.667745055776)*x[1] + (-0.58066830414)*x[2]**o + (-0.670629250631)*x[2]
            ref[(3, 0, 2, 0)]=-1.25904467225/(o+1.)+(0.104645098179)+(-0.919877793571)*0.5**o
            arg[(3, 0, 2, 1)]=0.865968460057*x[0]**o + (0.38841535557)*x[0] + (-0.802823838422)*x[1]**o + (-0.211564334936)*x[1] + (-0.985505097506)*x[2]**o + (0.310692241099)*x[2]
            ref[(3, 0, 2, 1)]=-1.78832893593/(o+1.)+(0.243771630866)+(0.865968460057)*0.5**o
            arg[(3, 1, 0, 0)]=0.50992108633*x[0]**o + (-0.856225741615)*x[0] + (0.990369148593)*x[1]**o + (-0.792834340327)*x[1] + (0.832945355074)*x[2]**o + (0.193247251031)*x[2]
            ref[(3, 1, 0, 0)]=1.82331450367/(o+1.)+(-0.727906415456)+(0.50992108633)*0.5**o
            arg[(3, 1, 0, 1)]=0.404734975398*x[0]**o + (-0.444700496958)*x[0] + (0.274683119363)*x[1]**o + (-0.863683919141)*x[1] + (-0.493172706013)*x[2]**o + (0.311890854496)*x[2]
            ref[(3, 1, 0, 1)]=-0.218489586651/(o+1.)+(-0.498246780801)+(0.404734975398)*0.5**o
            arg[(3, 1, 1, 0)]=0.0798015847228*x[0]**o + (-0.0145436237738)*x[0] + (-0.825308746333)*x[1]**o + (0.324825901495)*x[1] + (-0.291987768392)*x[2]**o + (0.149449801502)*x[2]
            ref[(3, 1, 1, 0)]=-1.11729651472/(o+1.)+(0.229866039611)+(0.0798015847228)*0.5**o
            arg[(3, 1, 1, 1)]=0.108029617601*x[0]**o + (0.00098655615866)*x[0] + (-0.954344803077)*x[1]**o + (-0.534103340039)*x[1] + (0.079221539004)*x[2]**o + (-0.365651873451)*x[2]
            ref[(3, 1, 1, 1)]=-0.875123264073/(o+1.)+(-0.449384328666)+(0.108029617601)*0.5**o
            arg[(3, 1, 2, 0)]=-0.0734587491564*x[0]**o + (-0.253249673151)*x[0] + (-0.726736269758)*x[1]**o + (0.113643752517)*x[1] + (0.673287495548)*x[2]**o + (0.367991817667)*x[2]
            ref[(3, 1, 2, 0)]=-0.0534487742102/(o+1.)+(0.114192948516)+(-0.0734587491564)*0.5**o
            arg[(3, 1, 2, 1)]=0.351249645421*x[0]**o + (0.231817398944)*x[0] + (-0.162996642965)*x[1]**o + (-0.870330686469)*x[1] + (0.655266792585)*x[2]**o + (-0.985128634827)*x[2]
            ref[(3, 1, 2, 1)]=0.49227014962/(o+1.)+(-0.811820961177)+(0.351249645421)*0.5**o
            arg[(3, 2, 0, 0)]=0.624686598123*x[0]**o + (-0.595516457897)*x[0] + (-0.270522467618)*x[1]**o + (0.873364053435)*x[1] + (0.752953861079)*x[2]**o + (-0.40212408068)*x[2]
            ref[(3, 2, 0, 0)]=0.482431393461/(o+1.)+(-0.0621382425709)+(0.624686598123)*0.5**o
            arg[(3, 2, 0, 1)]=0.206392572503*x[0]**o + (0.733857481531)*x[0] + (0.512466395239)*x[1]**o + (-0.727147096059)*x[1] + (0.928022670968)*x[2]**o + (-0.109696052035)*x[2]
            ref[(3, 2, 0, 1)]=1.44048906621/(o+1.)+(-0.0514928332815)+(0.206392572503)*0.5**o
            arg[(3, 2, 1, 0)]=-0.963988982628*x[0]**o + (-0.787234652568)*x[0] + (-0.163425440133)*x[1]**o + (-0.916663336007)*x[1] + (-0.309464075148)*x[2]**o + (-0.145526286884)*x[2]
            ref[(3, 2, 1, 0)]=-0.472889515281/(o+1.)+(-0.92471213773)+(-0.963988982628)*0.5**o
            arg[(3, 2, 1, 1)]=-0.0855134330714*x[0]**o + (-0.33324226632)*x[0] + (-0.0158999562075)*x[1]**o + (0.988545477214)*x[1] + (-0.142296163568)*x[2]**o + (0.33658876587)*x[2]
            ref[(3, 2, 1, 1)]=-0.158196119775/(o+1.)+(0.495945988382)+(-0.0855134330714)*0.5**o
            arg[(3, 2, 2, 0)]=-0.371892349866*x[0]**o + (-0.316836135125)*x[0] + (-0.884081712313)*x[1]**o + (0.292712580236)*x[1] + (-0.57617344724)*x[2]**o + (-0.734279474568)*x[2]
            ref[(3, 2, 2, 0)]=-1.46025515955/(o+1.)+(-0.379201514729)+(-0.371892349866)*0.5**o
            arg[(3, 2, 2, 1)]=-0.296566689087*x[0]**o + (0.678058929416)*x[0] + (-0.802785049141)*x[1]**o + (-0.636781680158)*x[1] + (0.753615295344)*x[2]**o + (0.40196442515)*x[2]
            ref[(3, 2, 2, 1)]=-0.049169753797/(o+1.)+(0.221620837204)+(-0.296566689087)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.0388884642306*x[0] + (0.262066490813)*x[1]
            ref=0.111589013291
        else:
            arg=-0.256141426034*x[0] + (-0.83623582005)*x[1] + (0.496649148791)*x[2]
            ref=-0.297864048646
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.266191371268*x[0] + (-0.26360148766)*x[1]
            ref[(0,)]=0.00129494180386
            arg[(1,)]=-0.124797099526*x[0] + (-0.828110327805)*x[1]
            ref[(1,)]=-0.476453713665
        else:
            arg[(0,)]=-0.0839284600889*x[0] + (-0.526894066253)*x[1] + (0.290478251313)*x[2]
            ref[(0,)]=-0.160172137515
            arg[(1,)]=0.680062619174*x[0] + (0.206255335577)*x[1] + (0.495814997624)*x[2]
            ref[(1,)]=0.691066476187
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.377415939711*x[0] + (0.449041123813)*x[1]
            ref[(0, 0)]=0.0358125920511
            arg[(0, 1)]=-0.208020397484*x[0] + (0.205134372503)*x[1]
            ref[(0, 1)]=-0.0014430124901
            arg[(0, 2)]=0.686509362848*x[0] + (-0.801727085996)*x[1]
            ref[(0, 2)]=-0.0576088615737
            arg[(0, 3)]=-0.911807344895*x[0] + (-0.187811694395)*x[1]
            ref[(0, 3)]=-0.549809519645
            arg[(1, 0)]=0.678923083*x[0] + (-0.478920812576)*x[1]
            ref[(1, 0)]=0.100001135212
            arg[(1, 1)]=-0.119987469122*x[0] + (-0.534170345152)*x[1]
            ref[(1, 1)]=-0.327078907137
            arg[(1, 2)]=-0.180593580339*x[0] + (0.525518389722)*x[1]
            ref[(1, 2)]=0.172462404692
            arg[(1, 3)]=0.264724580075*x[0] + (-0.876184464838)*x[1]
            ref[(1, 3)]=-0.305729942381
            arg[(2, 0)]=-0.920273810794*x[0] + (-0.878217734154)*x[1]
            ref[(2, 0)]=-0.899245772474
            arg[(2, 1)]=-0.745233646225*x[0] + (0.901162993129)*x[1]
            ref[(2, 1)]=0.077964673452
            arg[(2, 2)]=0.903351375878*x[0] + (-0.856194084514)*x[1]
            ref[(2, 2)]=0.023578645682
            arg[(2, 3)]=-0.964994071561*x[0] + (-0.755368873528)*x[1]
            ref[(2, 3)]=-0.860181472544
        else:
            arg[(0, 0)]=0.823037378316*x[0] + (-0.895370409569)*x[1] + (0.703879882083)*x[2]
            ref[(0, 0)]=0.315773425415
            arg[(0, 1)]=0.998081337127*x[0] + (0.469965641573)*x[1] + (-0.262844901098)*x[2]
            ref[(0, 1)]=0.602601038801
            arg[(0, 2)]=-0.545634122466*x[0] + (-0.454475837109)*x[1] + (0.159502374544)*x[2]
            ref[(0, 2)]=-0.420303792516
            arg[(0, 3)]=-0.0819072062384*x[0] + (-0.385699908415)*x[1] + (-0.217370315863)*x[2]
            ref[(0, 3)]=-0.342488715258
            arg[(1, 0)]=0.110829221866*x[0] + (0.536982355215)*x[1] + (-0.0807332702215)*x[2]
            ref[(1, 0)]=0.28353915343
            arg[(1, 1)]=-0.354273391434*x[0] + (-0.861940549877)*x[1] + (-0.61504855175)*x[2]
            ref[(1, 1)]=-0.91563124653
            arg[(1, 2)]=0.700842487592*x[0] + (0.295746635434)*x[1] + (0.390662268828)*x[2]
            ref[(1, 2)]=0.693625695927
            arg[(1, 3)]=-0.864341942537*x[0] + (-0.995104711747)*x[1] + (-0.492538688989)*x[2]
            ref[(1, 3)]=-1.17599267164
            arg[(2, 0)]=-0.840565860996*x[0] + (-0.461771453493)*x[1] + (0.493677479573)*x[2]
            ref[(2, 0)]=-0.404329917458
            arg[(2, 1)]=0.284983764258*x[0] + (-0.716885435084)*x[1] + (0.0251036661311)*x[2]
            ref[(2, 1)]=-0.203399002347
            arg[(2, 2)]=-0.473681634982*x[0] + (0.438732806509)*x[1] + (-0.788610310713)*x[2]
            ref[(2, 2)]=-0.411779569593
            arg[(2, 3)]=0.714479937304*x[0] + (0.299853667155)*x[1] + (0.440998042311)*x[2]
            ref[(2, 3)]=0.727665823385
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 2),w)
        ref=numpy.zeros((3, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.757559118946*x[0] + (0.276023344085)*x[1]
            ref[(0, 0, 0)]=0.516791231516
            arg[(0, 0, 1)]=-0.0769251171464*x[0] + (-0.734135442705)*x[1]
            ref[(0, 0, 1)]=-0.405530279926
            arg[(0, 1, 0)]=-0.293621118466*x[0] + (-0.51764726976)*x[1]
            ref[(0, 1, 0)]=-0.405634194113
            arg[(0, 1, 1)]=-0.921504223107*x[0] + (-0.114488502264)*x[1]
            ref[(0, 1, 1)]=-0.517996362686
            arg[(0, 2, 0)]=0.767672714766*x[0] + (-0.230864282498)*x[1]
            ref[(0, 2, 0)]=0.268404216134
            arg[(0, 2, 1)]=0.360005248532*x[0] + (-0.450721444146)*x[1]
            ref[(0, 2, 1)]=-0.0453580978068
            arg[(0, 3, 0)]=-0.37583160032*x[0] + (-0.0772730140818)*x[1]
            ref[(0, 3, 0)]=-0.226552307201
            arg[(0, 3, 1)]=0.678754786638*x[0] + (0.690020956235)*x[1]
            ref[(0, 3, 1)]=0.684387871436
            arg[(1, 0, 0)]=-0.139533783666*x[0] + (-0.0674541135227)*x[1]
            ref[(1, 0, 0)]=-0.103493948594
            arg[(1, 0, 1)]=-0.754975804148*x[0] + (0.906999022143)*x[1]
            ref[(1, 0, 1)]=0.0760116089975
            arg[(1, 1, 0)]=0.804140477238*x[0] + (-0.439968059642)*x[1]
            ref[(1, 1, 0)]=0.182086208798
            arg[(1, 1, 1)]=0.124451398663*x[0] + (0.314279923178)*x[1]
            ref[(1, 1, 1)]=0.21936566092
            arg[(1, 2, 0)]=-0.250078958727*x[0] + (-0.075033938448)*x[1]
            ref[(1, 2, 0)]=-0.162556448587
            arg[(1, 2, 1)]=-0.516080506774*x[0] + (-0.790986196042)*x[1]
            ref[(1, 2, 1)]=-0.653533351408
            arg[(1, 3, 0)]=-0.483375962662*x[0] + (-0.523352844083)*x[1]
            ref[(1, 3, 0)]=-0.503364403373
            arg[(1, 3, 1)]=-0.867986878699*x[0] + (0.408125661691)*x[1]
            ref[(1, 3, 1)]=-0.229930608504
            arg[(2, 0, 0)]=-0.258880151784*x[0] + (0.846528512405)*x[1]
            ref[(2, 0, 0)]=0.29382418031
            arg[(2, 0, 1)]=-0.0300576255665*x[0] + (-0.418039544828)*x[1]
            ref[(2, 0, 1)]=-0.224048585197
            arg[(2, 1, 0)]=0.044952875613*x[0] + (0.238859254477)*x[1]
            ref[(2, 1, 0)]=0.141906065045
            arg[(2, 1, 1)]=-0.697276984079*x[0] + (0.504770646759)*x[1]
            ref[(2, 1, 1)]=-0.0962531686597
            arg[(2, 2, 0)]=-0.966268762823*x[0] + (0.338226258151)*x[1]
            ref[(2, 2, 0)]=-0.314021252336
            arg[(2, 2, 1)]=-0.458652746263*x[0] + (-0.916621627461)*x[1]
            ref[(2, 2, 1)]=-0.687637186862
            arg[(2, 3, 0)]=-0.606930125364*x[0] + (0.326217761024)*x[1]
            ref[(2, 3, 0)]=-0.14035618217
            arg[(2, 3, 1)]=-0.32615103778*x[0] + (-0.727510397701)*x[1]
            ref[(2, 3, 1)]=-0.526830717741
        else:
            arg[(0, 0, 0)]=-0.722180961727*x[0] + (-0.418556430526)*x[1] + (0.168172365586)*x[2]
            ref[(0, 0, 0)]=-0.486282513334
            arg[(0, 0, 1)]=0.695041183537*x[0] + (0.142108513665)*x[1] + (-0.27551083028)*x[2]
            ref[(0, 0, 1)]=0.280819433461
            arg[(0, 1, 0)]=0.281295845871*x[0] + (0.54505056748)*x[1] + (-0.719623366021)*x[2]
            ref[(0, 1, 0)]=0.0533615236652
            arg[(0, 1, 1)]=0.728975200574*x[0] + (0.256996412147)*x[1] + (-0.152177723679)*x[2]
            ref[(0, 1, 1)]=0.416896944521
            arg[(0, 2, 0)]=-0.770769171135*x[0] + (0.757680842858)*x[1] + (0.673473567525)*x[2]
            ref[(0, 2, 0)]=0.330192619624
            arg[(0, 2, 1)]=-0.382821788874*x[0] + (-0.0707887166393)*x[1] + (-0.16242097293)*x[2]
            ref[(0, 2, 1)]=-0.308015739222
            arg[(0, 3, 0)]=-0.610204333191*x[0] + (0.696613470454)*x[1] + (0.916006241195)*x[2]
            ref[(0, 3, 0)]=0.501207689229
            arg[(0, 3, 1)]=0.143420764231*x[0] + (-0.276064182748)*x[1] + (-0.614535035385)*x[2]
            ref[(0, 3, 1)]=-0.373589226951
            arg[(1, 0, 0)]=-0.927926932228*x[0] + (0.419308796007)*x[1] + (-0.896231587345)*x[2]
            ref[(1, 0, 0)]=-0.702424861783
            arg[(1, 0, 1)]=0.382033613915*x[0] + (0.540764358014)*x[1] + (-0.43235567666)*x[2]
            ref[(1, 0, 1)]=0.245221147634
            arg[(1, 1, 0)]=0.215521423725*x[0] + (-0.928844653348)*x[1] + (0.0451176694492)*x[2]
            ref[(1, 1, 0)]=-0.334102780087
            arg[(1, 1, 1)]=-0.334991480595*x[0] + (-0.617073905512)*x[1] + (0.743431351162)*x[2]
            ref[(1, 1, 1)]=-0.104317017473
            arg[(1, 2, 0)]=0.963323650162*x[0] + (0.410561929185)*x[1] + (0.381792252119)*x[2]
            ref[(1, 2, 0)]=0.877838915733
            arg[(1, 2, 1)]=-0.272619408067*x[0] + (-0.649180481369)*x[1] + (-0.864349890421)*x[2]
            ref[(1, 2, 1)]=-0.893074889929
            arg[(1, 3, 0)]=0.272825357064*x[0] + (-0.3596334139)*x[1] + (0.921895732902)*x[2]
            ref[(1, 3, 0)]=0.417543838033
            arg[(1, 3, 1)]=-0.333199372865*x[0] + (0.00717454148616)*x[1] + (0.51402986992)*x[2]
            ref[(1, 3, 1)]=0.0940025192703
            arg[(2, 0, 0)]=0.797823009774*x[0] + (0.66247952738)*x[1] + (-0.656008870331)*x[2]
            ref[(2, 0, 0)]=0.402146833412
            arg[(2, 0, 1)]=0.676447867572*x[0] + (-0.344769405691)*x[1] + (-0.723362602402)*x[2]
            ref[(2, 0, 1)]=-0.19584207026
            arg[(2, 1, 0)]=-0.488493609157*x[0] + (0.785164437316)*x[1] + (-0.249084410554)*x[2]
            ref[(2, 1, 0)]=0.0237932088024
            arg[(2, 1, 1)]=-0.43936068863*x[0] + (-0.105873768434)*x[1] + (-0.719138704567)*x[2]
            ref[(2, 1, 1)]=-0.632186580815
            arg[(2, 2, 0)]=0.337440332558*x[0] + (0.489166461275)*x[1] + (-0.906098365123)*x[2]
            ref[(2, 2, 0)]=-0.0397457856448
            arg[(2, 2, 1)]=-0.717829133954*x[0] + (-0.918380992359)*x[1] + (0.723055471016)*x[2]
            ref[(2, 2, 1)]=-0.456577327648
            arg[(2, 3, 0)]=-0.947863479281*x[0] + (-0.808357362678)*x[1] + (-0.44577502665)*x[2]
            ref[(2, 3, 0)]=-1.1009979343
            arg[(2, 3, 1)]=-0.610096870152*x[0] + (0.795151246949)*x[1] + (-0.242203796265)*x[2]
            ref[(2, 3, 1)]=-0.0285747097339
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 4, 4),w)
        ref=numpy.zeros((4, 2, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.916348301901*x[0] + (0.138159317365)*x[1]
            ref[(0, 0, 0, 0)]=0.527253809633
            arg[(0, 0, 0, 1)]=0.711845278218*x[0] + (0.896512214245)*x[1]
            ref[(0, 0, 0, 1)]=0.804178746232
            arg[(0, 0, 0, 2)]=0.994572384316*x[0] + (0.0980639033639)*x[1]
            ref[(0, 0, 0, 2)]=0.54631814384
            arg[(0, 0, 0, 3)]=-0.359866977535*x[0] + (0.544346440496)*x[1]
            ref[(0, 0, 0, 3)]=0.0922397314808
            arg[(0, 0, 1, 0)]=-0.189082662593*x[0] + (-0.962479679158)*x[1]
            ref[(0, 0, 1, 0)]=-0.575781170876
            arg[(0, 0, 1, 1)]=0.928128004616*x[0] + (0.141742303887)*x[1]
            ref[(0, 0, 1, 1)]=0.534935154251
            arg[(0, 0, 1, 2)]=-0.329687152512*x[0] + (0.465955925177)*x[1]
            ref[(0, 0, 1, 2)]=0.0681343863327
            arg[(0, 0, 1, 3)]=-0.851476219622*x[0] + (-0.730413678834)*x[1]
            ref[(0, 0, 1, 3)]=-0.790944949228
            arg[(0, 0, 2, 0)]=-0.0273185008256*x[0] + (-0.487776624909)*x[1]
            ref[(0, 0, 2, 0)]=-0.257547562867
            arg[(0, 0, 2, 1)]=-0.686512537241*x[0] + (0.171297380948)*x[1]
            ref[(0, 0, 2, 1)]=-0.257607578146
            arg[(0, 0, 2, 2)]=-0.0741326778067*x[0] + (-0.250087836597)*x[1]
            ref[(0, 0, 2, 2)]=-0.162110257202
            arg[(0, 0, 2, 3)]=-0.488041951025*x[0] + (0.75705693779)*x[1]
            ref[(0, 0, 2, 3)]=0.134507493383
            arg[(0, 0, 3, 0)]=-0.954154995315*x[0] + (0.886244602982)*x[1]
            ref[(0, 0, 3, 0)]=-0.0339551961665
            arg[(0, 0, 3, 1)]=-0.14882668036*x[0] + (-0.888993673822)*x[1]
            ref[(0, 0, 3, 1)]=-0.518910177091
            arg[(0, 0, 3, 2)]=-0.957457984857*x[0] + (0.685037535397)*x[1]
            ref[(0, 0, 3, 2)]=-0.13621022473
            arg[(0, 0, 3, 3)]=-0.456708525633*x[0] + (0.989389424974)*x[1]
            ref[(0, 0, 3, 3)]=0.26634044967
            arg[(0, 1, 0, 0)]=-0.193834333174*x[0] + (0.876608231067)*x[1]
            ref[(0, 1, 0, 0)]=0.341386948946
            arg[(0, 1, 0, 1)]=-0.863063294946*x[0] + (-0.311851694102)*x[1]
            ref[(0, 1, 0, 1)]=-0.587457494524
            arg[(0, 1, 0, 2)]=0.068755569604*x[0] + (-0.700520542704)*x[1]
            ref[(0, 1, 0, 2)]=-0.31588248655
            arg[(0, 1, 0, 3)]=0.348073151189*x[0] + (-0.33270274132)*x[1]
            ref[(0, 1, 0, 3)]=0.00768520493431
            arg[(0, 1, 1, 0)]=0.38714389306*x[0] + (0.672213326056)*x[1]
            ref[(0, 1, 1, 0)]=0.529678609558
            arg[(0, 1, 1, 1)]=0.680773654884*x[0] + (0.538111820559)*x[1]
            ref[(0, 1, 1, 1)]=0.609442737721
            arg[(0, 1, 1, 2)]=0.2102883822*x[0] + (-0.694802544095)*x[1]
            ref[(0, 1, 1, 2)]=-0.242257080948
            arg[(0, 1, 1, 3)]=-0.250656043442*x[0] + (-0.166808556849)*x[1]
            ref[(0, 1, 1, 3)]=-0.208732300146
            arg[(0, 1, 2, 0)]=-0.84819834672*x[0] + (0.532831307296)*x[1]
            ref[(0, 1, 2, 0)]=-0.157683519712
            arg[(0, 1, 2, 1)]=-0.115991340478*x[0] + (0.0853323945007)*x[1]
            ref[(0, 1, 2, 1)]=-0.0153294729887
            arg[(0, 1, 2, 2)]=0.61056895176*x[0] + (0.508330878573)*x[1]
            ref[(0, 1, 2, 2)]=0.559449915167
            arg[(0, 1, 2, 3)]=-0.592162031669*x[0] + (0.0374712531962)*x[1]
            ref[(0, 1, 2, 3)]=-0.277345389236
            arg[(0, 1, 3, 0)]=-0.464993140946*x[0] + (0.250191594566)*x[1]
            ref[(0, 1, 3, 0)]=-0.10740077319
            arg[(0, 1, 3, 1)]=-0.432720082461*x[0] + (0.404930243396)*x[1]
            ref[(0, 1, 3, 1)]=-0.0138949195325
            arg[(0, 1, 3, 2)]=0.430477210609*x[0] + (-0.617108716219)*x[1]
            ref[(0, 1, 3, 2)]=-0.0933157528047
            arg[(0, 1, 3, 3)]=0.59405504727*x[0] + (-0.502077407655)*x[1]
            ref[(0, 1, 3, 3)]=0.045988819807
            arg[(1, 0, 0, 0)]=0.779647582619*x[0] + (-0.198470809982)*x[1]
            ref[(1, 0, 0, 0)]=0.290588386318
            arg[(1, 0, 0, 1)]=0.656475452978*x[0] + (0.98175923432)*x[1]
            ref[(1, 0, 0, 1)]=0.819117343649
            arg[(1, 0, 0, 2)]=-0.911091833533*x[0] + (0.952690443869)*x[1]
            ref[(1, 0, 0, 2)]=0.0207993051681
            arg[(1, 0, 0, 3)]=0.902725744888*x[0] + (-0.647271816454)*x[1]
            ref[(1, 0, 0, 3)]=0.127726964217
            arg[(1, 0, 1, 0)]=-0.967173144456*x[0] + (0.211846323935)*x[1]
            ref[(1, 0, 1, 0)]=-0.37766341026
            arg[(1, 0, 1, 1)]=0.0785332977956*x[0] + (0.942681582837)*x[1]
            ref[(1, 0, 1, 1)]=0.510607440316
            arg[(1, 0, 1, 2)]=-0.653061975674*x[0] + (0.0825039517773)*x[1]
            ref[(1, 0, 1, 2)]=-0.285279011949
            arg[(1, 0, 1, 3)]=0.0810014905809*x[0] + (-0.262527053537)*x[1]
            ref[(1, 0, 1, 3)]=-0.0907627814779
            arg[(1, 0, 2, 0)]=-0.661911157182*x[0] + (-0.654013416525)*x[1]
            ref[(1, 0, 2, 0)]=-0.657962286854
            arg[(1, 0, 2, 1)]=0.425529937541*x[0] + (-0.606104760507)*x[1]
            ref[(1, 0, 2, 1)]=-0.0902874114829
            arg[(1, 0, 2, 2)]=-0.00968790385259*x[0] + (-0.903279003549)*x[1]
            ref[(1, 0, 2, 2)]=-0.456483453701
            arg[(1, 0, 2, 3)]=-0.233799287617*x[0] + (-0.31176517074)*x[1]
            ref[(1, 0, 2, 3)]=-0.272782229179
            arg[(1, 0, 3, 0)]=0.508614467662*x[0] + (-0.844963659834)*x[1]
            ref[(1, 0, 3, 0)]=-0.168174596086
            arg[(1, 0, 3, 1)]=0.0849833494803*x[0] + (0.822860823939)*x[1]
            ref[(1, 0, 3, 1)]=0.45392208671
            arg[(1, 0, 3, 2)]=-0.700638071342*x[0] + (-0.288326573284)*x[1]
            ref[(1, 0, 3, 2)]=-0.494482322313
            arg[(1, 0, 3, 3)]=-0.897437625832*x[0] + (-0.513481312861)*x[1]
            ref[(1, 0, 3, 3)]=-0.705459469346
            arg[(1, 1, 0, 0)]=-0.520309417804*x[0] + (-0.863535249638)*x[1]
            ref[(1, 1, 0, 0)]=-0.691922333721
            arg[(1, 1, 0, 1)]=0.174387456555*x[0] + (0.43821004202)*x[1]
            ref[(1, 1, 0, 1)]=0.306298749287
            arg[(1, 1, 0, 2)]=0.609781345301*x[0] + (0.435387480843)*x[1]
            ref[(1, 1, 0, 2)]=0.522584413072
            arg[(1, 1, 0, 3)]=-0.775622620226*x[0] + (0.0429520540656)*x[1]
            ref[(1, 1, 0, 3)]=-0.36633528308
            arg[(1, 1, 1, 0)]=-0.872197508549*x[0] + (-0.836868789)*x[1]
            ref[(1, 1, 1, 0)]=-0.854533148774
            arg[(1, 1, 1, 1)]=0.122349376869*x[0] + (0.966709321001)*x[1]
            ref[(1, 1, 1, 1)]=0.544529348935
            arg[(1, 1, 1, 2)]=-0.94084579313*x[0] + (0.277783545782)*x[1]
            ref[(1, 1, 1, 2)]=-0.331531123674
            arg[(1, 1, 1, 3)]=0.342137954499*x[0] + (-0.432510403172)*x[1]
            ref[(1, 1, 1, 3)]=-0.0451862243364
            arg[(1, 1, 2, 0)]=0.718104135176*x[0] + (0.0360567217767)*x[1]
            ref[(1, 1, 2, 0)]=0.377080428476
            arg[(1, 1, 2, 1)]=-0.972127820848*x[0] + (-0.814653963913)*x[1]
            ref[(1, 1, 2, 1)]=-0.89339089238
            arg[(1, 1, 2, 2)]=-0.307903754059*x[0] + (-0.969118399727)*x[1]
            ref[(1, 1, 2, 2)]=-0.638511076893
            arg[(1, 1, 2, 3)]=0.350948760879*x[0] + (0.843737554008)*x[1]
            ref[(1, 1, 2, 3)]=0.597343157444
            arg[(1, 1, 3, 0)]=-0.315457547297*x[0] + (0.760685477258)*x[1]
            ref[(1, 1, 3, 0)]=0.22261396498
            arg[(1, 1, 3, 1)]=0.0621157732416*x[0] + (-0.0334051370204)*x[1]
            ref[(1, 1, 3, 1)]=0.0143553181106
            arg[(1, 1, 3, 2)]=0.838909414938*x[0] + (-0.791245866377)*x[1]
            ref[(1, 1, 3, 2)]=0.0238317742808
            arg[(1, 1, 3, 3)]=-0.0920089447463*x[0] + (0.52332134138)*x[1]
            ref[(1, 1, 3, 3)]=0.215656198317
            arg[(2, 0, 0, 0)]=-0.456350790874*x[0] + (0.155094307253)*x[1]
            ref[(2, 0, 0, 0)]=-0.150628241811
            arg[(2, 0, 0, 1)]=0.050378201192*x[0] + (-0.960002567456)*x[1]
            ref[(2, 0, 0, 1)]=-0.454812183132
            arg[(2, 0, 0, 2)]=0.0421217968747*x[0] + (-0.569364022176)*x[1]
            ref[(2, 0, 0, 2)]=-0.263621112651
            arg[(2, 0, 0, 3)]=-0.846029629089*x[0] + (0.32258957586)*x[1]
            ref[(2, 0, 0, 3)]=-0.261720026615
            arg[(2, 0, 1, 0)]=0.982100397979*x[0] + (-0.52214179247)*x[1]
            ref[(2, 0, 1, 0)]=0.229979302754
            arg[(2, 0, 1, 1)]=-0.311863517122*x[0] + (0.33335091418)*x[1]
            ref[(2, 0, 1, 1)]=0.0107436985287
            arg[(2, 0, 1, 2)]=0.040074095005*x[0] + (-0.499788837868)*x[1]
            ref[(2, 0, 1, 2)]=-0.229857371431
            arg[(2, 0, 1, 3)]=-0.121245866951*x[0] + (-0.631877286777)*x[1]
            ref[(2, 0, 1, 3)]=-0.376561576864
            arg[(2, 0, 2, 0)]=-0.635471151499*x[0] + (-0.403050438526)*x[1]
            ref[(2, 0, 2, 0)]=-0.519260795013
            arg[(2, 0, 2, 1)]=-0.134763342846*x[0] + (0.643782940414)*x[1]
            ref[(2, 0, 2, 1)]=0.254509798784
            arg[(2, 0, 2, 2)]=-0.639833496398*x[0] + (0.606633647735)*x[1]
            ref[(2, 0, 2, 2)]=-0.0165999243313
            arg[(2, 0, 2, 3)]=-0.853615387848*x[0] + (-0.807168421872)*x[1]
            ref[(2, 0, 2, 3)]=-0.83039190486
            arg[(2, 0, 3, 0)]=-0.302844804097*x[0] + (0.914574390838)*x[1]
            ref[(2, 0, 3, 0)]=0.305864793371
            arg[(2, 0, 3, 1)]=0.806633009581*x[0] + (0.678653326079)*x[1]
            ref[(2, 0, 3, 1)]=0.74264316783
            arg[(2, 0, 3, 2)]=-0.306728340655*x[0] + (-0.385571693516)*x[1]
            ref[(2, 0, 3, 2)]=-0.346150017085
            arg[(2, 0, 3, 3)]=0.672261426099*x[0] + (0.0353257328848)*x[1]
            ref[(2, 0, 3, 3)]=0.353793579492
            arg[(2, 1, 0, 0)]=-0.49554605648*x[0] + (-0.307033495587)*x[1]
            ref[(2, 1, 0, 0)]=-0.401289776033
            arg[(2, 1, 0, 1)]=-0.0624398089897*x[0] + (-0.198539570256)*x[1]
            ref[(2, 1, 0, 1)]=-0.130489689623
            arg[(2, 1, 0, 2)]=-0.667864227129*x[0] + (0.0453592220273)*x[1]
            ref[(2, 1, 0, 2)]=-0.311252502551
            arg[(2, 1, 0, 3)]=-0.480253617488*x[0] + (-0.737558688098)*x[1]
            ref[(2, 1, 0, 3)]=-0.608906152793
            arg[(2, 1, 1, 0)]=0.274124467491*x[0] + (0.893944444971)*x[1]
            ref[(2, 1, 1, 0)]=0.584034456231
            arg[(2, 1, 1, 1)]=0.682648699138*x[0] + (-0.792459501252)*x[1]
            ref[(2, 1, 1, 1)]=-0.054905401057
            arg[(2, 1, 1, 2)]=0.627086224835*x[0] + (-0.996608985847)*x[1]
            ref[(2, 1, 1, 2)]=-0.184761380506
            arg[(2, 1, 1, 3)]=0.47395069606*x[0] + (0.770194042731)*x[1]
            ref[(2, 1, 1, 3)]=0.622072369395
            arg[(2, 1, 2, 0)]=0.522785765432*x[0] + (-0.427873300205)*x[1]
            ref[(2, 1, 2, 0)]=0.0474562326138
            arg[(2, 1, 2, 1)]=-0.168689802724*x[0] + (0.378210398958)*x[1]
            ref[(2, 1, 2, 1)]=0.104760298117
            arg[(2, 1, 2, 2)]=0.64675156743*x[0] + (-0.0900466551078)*x[1]
            ref[(2, 1, 2, 2)]=0.278352456161
            arg[(2, 1, 2, 3)]=-0.675721261602*x[0] + (-0.102757197684)*x[1]
            ref[(2, 1, 2, 3)]=-0.389239229643
            arg[(2, 1, 3, 0)]=0.3363781758*x[0] + (-0.55731515715)*x[1]
            ref[(2, 1, 3, 0)]=-0.110468490675
            arg[(2, 1, 3, 1)]=-0.862492631125*x[0] + (0.985807993945)*x[1]
            ref[(2, 1, 3, 1)]=0.0616576814099
            arg[(2, 1, 3, 2)]=0.0210767334349*x[0] + (-0.842534216883)*x[1]
            ref[(2, 1, 3, 2)]=-0.410728741724
            arg[(2, 1, 3, 3)]=0.243546722512*x[0] + (-0.435281292986)*x[1]
            ref[(2, 1, 3, 3)]=-0.0958672852371
            arg[(3, 0, 0, 0)]=0.475989151396*x[0] + (-0.605839336561)*x[1]
            ref[(3, 0, 0, 0)]=-0.0649250925826
            arg[(3, 0, 0, 1)]=-0.911503908117*x[0] + (0.645550869413)*x[1]
            ref[(3, 0, 0, 1)]=-0.132976519352
            arg[(3, 0, 0, 2)]=-0.97660792161*x[0] + (0.344090236667)*x[1]
            ref[(3, 0, 0, 2)]=-0.316258842472
            arg[(3, 0, 0, 3)]=0.706238306258*x[0] + (0.158443290282)*x[1]
            ref[(3, 0, 0, 3)]=0.43234079827
            arg[(3, 0, 1, 0)]=0.400379212104*x[0] + (-0.712109747515)*x[1]
            ref[(3, 0, 1, 0)]=-0.155865267706
            arg[(3, 0, 1, 1)]=-0.754257722144*x[0] + (-0.346240003876)*x[1]
            ref[(3, 0, 1, 1)]=-0.55024886301
            arg[(3, 0, 1, 2)]=0.173443910136*x[0] + (-0.61128843865)*x[1]
            ref[(3, 0, 1, 2)]=-0.218922264257
            arg[(3, 0, 1, 3)]=0.57424689539*x[0] + (0.607600874764)*x[1]
            ref[(3, 0, 1, 3)]=0.590923885077
            arg[(3, 0, 2, 0)]=-0.00126465612356*x[0] + (0.761634139906)*x[1]
            ref[(3, 0, 2, 0)]=0.380184741891
            arg[(3, 0, 2, 1)]=0.110185323191*x[0] + (-0.813179715095)*x[1]
            ref[(3, 0, 2, 1)]=-0.351497195952
            arg[(3, 0, 2, 2)]=0.996258985865*x[0] + (-0.983015920139)*x[1]
            ref[(3, 0, 2, 2)]=0.00662153286311
            arg[(3, 0, 2, 3)]=-0.983615896965*x[0] + (0.91695350057)*x[1]
            ref[(3, 0, 2, 3)]=-0.0333311981976
            arg[(3, 0, 3, 0)]=0.649788340335*x[0] + (0.641359390289)*x[1]
            ref[(3, 0, 3, 0)]=0.645573865312
            arg[(3, 0, 3, 1)]=-0.207391042361*x[0] + (0.763146054904)*x[1]
            ref[(3, 0, 3, 1)]=0.277877506272
            arg[(3, 0, 3, 2)]=-0.35377264964*x[0] + (-0.232115618256)*x[1]
            ref[(3, 0, 3, 2)]=-0.292944133948
            arg[(3, 0, 3, 3)]=-0.905781948571*x[0] + (-0.641724964391)*x[1]
            ref[(3, 0, 3, 3)]=-0.773753456481
            arg[(3, 1, 0, 0)]=0.729341983218*x[0] + (0.265184816609)*x[1]
            ref[(3, 1, 0, 0)]=0.497263399914
            arg[(3, 1, 0, 1)]=0.804663504632*x[0] + (0.385806114017)*x[1]
            ref[(3, 1, 0, 1)]=0.595234809324
            arg[(3, 1, 0, 2)]=-0.611572865084*x[0] + (-0.445255456516)*x[1]
            ref[(3, 1, 0, 2)]=-0.5284141608
            arg[(3, 1, 0, 3)]=-0.297482432109*x[0] + (-0.774902061988)*x[1]
            ref[(3, 1, 0, 3)]=-0.536192247049
            arg[(3, 1, 1, 0)]=0.357259930224*x[0] + (-0.778320702323)*x[1]
            ref[(3, 1, 1, 0)]=-0.210530386049
            arg[(3, 1, 1, 1)]=0.240776426451*x[0] + (0.323435784985)*x[1]
            ref[(3, 1, 1, 1)]=0.282106105718
            arg[(3, 1, 1, 2)]=-0.234139867351*x[0] + (0.343820922977)*x[1]
            ref[(3, 1, 1, 2)]=0.054840527813
            arg[(3, 1, 1, 3)]=-0.375459359154*x[0] + (0.0707903427408)*x[1]
            ref[(3, 1, 1, 3)]=-0.152334508206
            arg[(3, 1, 2, 0)]=-0.754458106285*x[0] + (-0.452880985711)*x[1]
            ref[(3, 1, 2, 0)]=-0.603669545998
            arg[(3, 1, 2, 1)]=-0.422751839704*x[0] + (0.606792299713)*x[1]
            ref[(3, 1, 2, 1)]=0.0920202300043
            arg[(3, 1, 2, 2)]=-0.432710282782*x[0] + (-0.143030607254)*x[1]
            ref[(3, 1, 2, 2)]=-0.287870445018
            arg[(3, 1, 2, 3)]=0.775875732385*x[0] + (-0.787643703767)*x[1]
            ref[(3, 1, 2, 3)]=-0.0058839856907
            arg[(3, 1, 3, 0)]=0.983320398459*x[0] + (0.966324246595)*x[1]
            ref[(3, 1, 3, 0)]=0.974822322527
            arg[(3, 1, 3, 1)]=0.940230664014*x[0] + (0.684913835291)*x[1]
            ref[(3, 1, 3, 1)]=0.812572249652
            arg[(3, 1, 3, 2)]=-0.612299588779*x[0] + (-0.145756441423)*x[1]
            ref[(3, 1, 3, 2)]=-0.379028015101
            arg[(3, 1, 3, 3)]=0.781482231819*x[0] + (-0.44109565019)*x[1]
            ref[(3, 1, 3, 3)]=0.170193290815
        else:
            arg[(0, 0, 0, 0)]=-0.540649582523*x[0] + (0.202076083707)*x[1] + (-0.939982209632)*x[2]
            ref[(0, 0, 0, 0)]=-0.639277854224
            arg[(0, 0, 0, 1)]=-0.11755573915*x[0] + (-0.238316073742)*x[1] + (0.585745132359)*x[2]
            ref[(0, 0, 0, 1)]=0.114936659733
            arg[(0, 0, 0, 2)]=0.787937497413*x[0] + (0.592949385686)*x[1] + (-0.15880356034)*x[2]
            ref[(0, 0, 0, 2)]=0.611041661379
            arg[(0, 0, 0, 3)]=-0.188720631305*x[0] + (-0.0479217843299)*x[1] + (0.225618728159)*x[2]
            ref[(0, 0, 0, 3)]=-0.00551184373791
            arg[(0, 0, 1, 0)]=0.721290891134*x[0] + (-0.53472002127)*x[1] + (0.809925419556)*x[2]
            ref[(0, 0, 1, 0)]=0.49824814471
            arg[(0, 0, 1, 1)]=-0.307819875434*x[0] + (-0.160946754623)*x[1] + (0.92269134912)*x[2]
            ref[(0, 0, 1, 1)]=0.226962359532
            arg[(0, 0, 1, 2)]=-0.64741367885*x[0] + (0.431079800854)*x[1] + (-0.883405011518)*x[2]
            ref[(0, 0, 1, 2)]=-0.549869444757
            arg[(0, 0, 1, 3)]=0.35797732162*x[0] + (0.734522284764)*x[1] + (0.162363714384)*x[2]
            ref[(0, 0, 1, 3)]=0.627431660384
            arg[(0, 0, 2, 0)]=0.118687241306*x[0] + (0.327698256075)*x[1] + (0.684388963852)*x[2]
            ref[(0, 0, 2, 0)]=0.565387230616
            arg[(0, 0, 2, 1)]=-0.385143611565*x[0] + (-0.501243076424)*x[1] + (0.626620094473)*x[2]
            ref[(0, 0, 2, 1)]=-0.129883296758
            arg[(0, 0, 2, 2)]=-0.729257757827*x[0] + (0.117441270254)*x[1] + (0.204144951158)*x[2]
            ref[(0, 0, 2, 2)]=-0.203835768208
            arg[(0, 0, 2, 3)]=-0.761648338092*x[0] + (-0.286224115131)*x[1] + (-0.886010311728)*x[2]
            ref[(0, 0, 2, 3)]=-0.966941382476
            arg[(0, 0, 3, 0)]=-0.213933915779*x[0] + (-0.6546085651)*x[1] + (0.839267895864)*x[2]
            ref[(0, 0, 3, 0)]=-0.0146372925076
            arg[(0, 0, 3, 1)]=-0.749638621625*x[0] + (-0.493437791406)*x[1] + (-0.288758031218)*x[2]
            ref[(0, 0, 3, 1)]=-0.765917222125
            arg[(0, 0, 3, 2)]=0.000496018342478*x[0] + (-0.140204379489)*x[1] + (-0.502053212493)*x[2]
            ref[(0, 0, 3, 2)]=-0.320880786819
            arg[(0, 0, 3, 3)]=-0.350318855515*x[0] + (-0.623643467467)*x[1] + (0.158753657152)*x[2]
            ref[(0, 0, 3, 3)]=-0.407604332915
            arg[(0, 1, 0, 0)]=-0.586866458045*x[0] + (0.0365166828216)*x[1] + (0.588734079716)*x[2]
            ref[(0, 1, 0, 0)]=0.0191921522463
            arg[(0, 1, 0, 1)]=-0.950051654695*x[0] + (-0.367703088983)*x[1] + (-0.353883022402)*x[2]
            ref[(0, 1, 0, 1)]=-0.835818883039
            arg[(0, 1, 0, 2)]=-0.400477055173*x[0] + (0.100669840823)*x[1] + (-0.258872912729)*x[2]
            ref[(0, 1, 0, 2)]=-0.279340063539
            arg[(0, 1, 0, 3)]=-0.000582562783094*x[0] + (-0.775359273913)*x[1] + (0.413172075543)*x[2]
            ref[(0, 1, 0, 3)]=-0.181384880577
            arg[(0, 1, 1, 0)]=-0.467702011736*x[0] + (0.908185197514)*x[1] + (0.291459350942)*x[2]
            ref[(0, 1, 1, 0)]=0.36597126836
            arg[(0, 1, 1, 1)]=0.180077410938*x[0] + (-0.390423561217)*x[1] + (0.810276212475)*x[2]
            ref[(0, 1, 1, 1)]=0.299965031098
            arg[(0, 1, 1, 2)]=-0.750496903921*x[0] + (0.435020405475)*x[1] + (0.978467964736)*x[2]
            ref[(0, 1, 1, 2)]=0.331495733145
            arg[(0, 1, 1, 3)]=-0.529878250417*x[0] + (0.280789530421)*x[1] + (-0.77212427198)*x[2]
            ref[(0, 1, 1, 3)]=-0.510606495988
            arg[(0, 1, 2, 0)]=0.151317149725*x[0] + (0.995422348782)*x[1] + (-0.414252031634)*x[2]
            ref[(0, 1, 2, 0)]=0.366243733437
            arg[(0, 1, 2, 1)]=-0.701335598599*x[0] + (-0.06913034416)*x[1] + (0.0950909093266)*x[2]
            ref[(0, 1, 2, 1)]=-0.337687516716
            arg[(0, 1, 2, 2)]=-0.999568829612*x[0] + (-0.741432092531)*x[1] + (-0.219698823917)*x[2]
            ref[(0, 1, 2, 2)]=-0.98034987303
            arg[(0, 1, 2, 3)]=0.645767906968*x[0] + (-0.053192106144)*x[1] + (0.771803896855)*x[2]
            ref[(0, 1, 2, 3)]=0.682189848839
            arg[(0, 1, 3, 0)]=-0.121524214845*x[0] + (-0.36123783348)*x[1] + (0.0723494336622)*x[2]
            ref[(0, 1, 3, 0)]=-0.205206307331
            arg[(0, 1, 3, 1)]=0.0354489925792*x[0] + (-0.152760807672)*x[1] + (0.143868987682)*x[2]
            ref[(0, 1, 3, 1)]=0.0132785862945
            arg[(0, 1, 3, 2)]=-0.346659633647*x[0] + (0.679170258056)*x[1] + (-0.722621459834)*x[2]
            ref[(0, 1, 3, 2)]=-0.195055417712
            arg[(0, 1, 3, 3)]=-0.208424070156*x[0] + (-0.376015223372)*x[1] + (-0.436600110168)*x[2]
            ref[(0, 1, 3, 3)]=-0.510519701848
            arg[(1, 0, 0, 0)]=0.816418640388*x[0] + (-0.472941867782)*x[1] + (-0.409242828691)*x[2]
            ref[(1, 0, 0, 0)]=-0.032883028042
            arg[(1, 0, 0, 1)]=-0.10453712097*x[0] + (0.347863440784)*x[1] + (-0.982189639304)*x[2]
            ref[(1, 0, 0, 1)]=-0.369431659745
            arg[(1, 0, 0, 2)]=0.397971218057*x[0] + (0.552096125717)*x[1] + (0.533020072855)*x[2]
            ref[(1, 0, 0, 2)]=0.741543708315
            arg[(1, 0, 0, 3)]=0.41147068515*x[0] + (-0.477257342277)*x[1] + (-0.121183326215)*x[2]
            ref[(1, 0, 0, 3)]=-0.0934849916712
            arg[(1, 0, 1, 0)]=0.412369671034*x[0] + (-0.68712207376)*x[1] + (0.0163606797243)*x[2]
            ref[(1, 0, 1, 0)]=-0.129195861501
            arg[(1, 0, 1, 1)]=0.797366901539*x[0] + (-0.570456002873)*x[1] + (-0.79622656796)*x[2]
            ref[(1, 0, 1, 1)]=-0.284657834647
            arg[(1, 0, 1, 2)]=0.976903942075*x[0] + (-0.553071568166)*x[1] + (0.265021596823)*x[2]
            ref[(1, 0, 1, 2)]=0.344426985366
            arg[(1, 0, 1, 3)]=-0.879511336237*x[0] + (0.00694673733714)*x[1] + (0.477836131964)*x[2]
            ref[(1, 0, 1, 3)]=-0.197364233467
            arg[(1, 0, 2, 0)]=-0.775337354936*x[0] + (-0.668175767156)*x[1] + (0.333449119176)*x[2]
            ref[(1, 0, 2, 0)]=-0.555032001458
            arg[(1, 0, 2, 1)]=0.0748061005315*x[0] + (0.199826822799)*x[1] + (0.719705184739)*x[2]
            ref[(1, 0, 2, 1)]=0.497169054035
            arg[(1, 0, 2, 2)]=0.684006074436*x[0] + (-0.354626348335)*x[1] + (0.843418836338)*x[2]
            ref[(1, 0, 2, 2)]=0.58639928122
            arg[(1, 0, 2, 3)]=-0.784144668582*x[0] + (-0.0935261938444)*x[1] + (-0.833315642704)*x[2]
            ref[(1, 0, 2, 3)]=-0.855493252565
            arg[(1, 0, 3, 0)]=-0.568086170395*x[0] + (-0.309460142925)*x[1] + (-0.647288404355)*x[2]
            ref[(1, 0, 3, 0)]=-0.762417358838
            arg[(1, 0, 3, 1)]=-0.845004511462*x[0] + (-0.489475793283)*x[1] + (-0.575391815689)*x[2]
            ref[(1, 0, 3, 1)]=-0.954936060217
            arg[(1, 0, 3, 2)]=0.111845799217*x[0] + (0.657434957133)*x[1] + (-0.819322934543)*x[2]
            ref[(1, 0, 3, 2)]=-0.0250210890964
            arg[(1, 0, 3, 3)]=-0.145288940557*x[0] + (0.427625381848)*x[1] + (-0.932960332293)*x[2]
            ref[(1, 0, 3, 3)]=-0.325311945501
            arg[(1, 1, 0, 0)]=0.623024864535*x[0] + (0.567716647001)*x[1] + (-0.776588661904)*x[2]
            ref[(1, 1, 0, 0)]=0.207076424816
            arg[(1, 1, 0, 1)]=0.594615257781*x[0] + (-0.190188574174)*x[1] + (-0.985495034685)*x[2]
            ref[(1, 1, 0, 1)]=-0.290534175539
            arg[(1, 1, 0, 2)]=0.0325184035739*x[0] + (-0.175590208391)*x[1] + (0.25457030259)*x[2]
            ref[(1, 1, 0, 2)]=0.0557492488866
            arg[(1, 1, 0, 3)]=0.152547205446*x[0] + (-0.767200299752)*x[1] + (-0.130992086437)*x[2]
            ref[(1, 1, 0, 3)]=-0.372822590371
            arg[(1, 1, 1, 0)]=-0.335157310847*x[0] + (-0.148069189532)*x[1] + (-0.140367001286)*x[2]
            ref[(1, 1, 1, 0)]=-0.311796750833
            arg[(1, 1, 1, 1)]=0.8772055391*x[0] + (-0.209582745102)*x[1] + (0.772346990054)*x[2]
            ref[(1, 1, 1, 1)]=0.719984892026
            arg[(1, 1, 1, 2)]=-0.643150844196*x[0] + (-0.266950557784)*x[1] + (-0.639489355782)*x[2]
            ref[(1, 1, 1, 2)]=-0.774795378881
            arg[(1, 1, 1, 3)]=-0.0346546787168*x[0] + (0.974898614186)*x[1] + (0.524461289573)*x[2]
            ref[(1, 1, 1, 3)]=0.732352612521
            arg[(1, 1, 2, 0)]=0.680942751308*x[0] + (0.818410152513)*x[1] + (0.594336586344)*x[2]
            ref[(1, 1, 2, 0)]=1.04684474508
            arg[(1, 1, 2, 1)]=-0.261535329381*x[0] + (0.293977942147)*x[1] + (0.675132529236)*x[2]
            ref[(1, 1, 2, 1)]=0.353787571001
            arg[(1, 1, 2, 2)]=0.706989669348*x[0] + (0.726905071999)*x[1] + (0.648936703521)*x[2]
            ref[(1, 1, 2, 2)]=1.04141572243
            arg[(1, 1, 2, 3)]=-0.0241720373834*x[0] + (-0.0253666828337)*x[1] + (-0.225227463609)*x[2]
            ref[(1, 1, 2, 3)]=-0.137383091913
            arg[(1, 1, 3, 0)]=0.222675855056*x[0] + (-0.129369148453)*x[1] + (-0.147675640428)*x[2]
            ref[(1, 1, 3, 0)]=-0.0271844669124
            arg[(1, 1, 3, 1)]=-0.278378550003*x[0] + (-0.191714843246)*x[1] + (0.799930852469)*x[2]
            ref[(1, 1, 3, 1)]=0.16491872961
            arg[(1, 1, 3, 2)]=0.445694803543*x[0] + (0.737129200566)*x[1] + (-0.644684870271)*x[2]
            ref[(1, 1, 3, 2)]=0.269069566919
            arg[(1, 1, 3, 3)]=0.246546381094*x[0] + (-0.407628652424)*x[1] + (0.345130560913)*x[2]
            ref[(1, 1, 3, 3)]=0.0920241447916
            arg[(2, 0, 0, 0)]=0.824377022966*x[0] + (0.24014905863)*x[1] + (-0.304639931468)*x[2]
            ref[(2, 0, 0, 0)]=0.379943075064
            arg[(2, 0, 0, 1)]=-0.907985478253*x[0] + (0.0119156192189)*x[1] + (-0.0281353858399)*x[2]
            ref[(2, 0, 0, 1)]=-0.462102622437
            arg[(2, 0, 0, 2)]=0.298442364497*x[0] + (-0.202215108564)*x[1] + (0.0927183103928)*x[2]
            ref[(2, 0, 0, 2)]=0.0944727831629
            arg[(2, 0, 0, 3)]=-0.918948947978*x[0] + (0.560667577843)*x[1] + (0.65303991685)*x[2]
            ref[(2, 0, 0, 3)]=0.147379273357
            arg[(2, 0, 1, 0)]=0.94099625876*x[0] + (-0.115202542613)*x[1] + (-0.550657945922)*x[2]
            ref[(2, 0, 1, 0)]=0.137567885113
            arg[(2, 0, 1, 1)]=-0.117272947714*x[0] + (-0.128335700181)*x[1] + (0.860808048176)*x[2]
            ref[(2, 0, 1, 1)]=0.30759970014
            arg[(2, 0, 1, 2)]=0.751141103904*x[0] + (0.501156632573)*x[1] + (0.347629680285)*x[2]
            ref[(2, 0, 1, 2)]=0.799963708381
            arg[(2, 0, 1, 3)]=-0.419634487974*x[0] + (0.270614516024)*x[1] + (0.60915845731)*x[2]
            ref[(2, 0, 1, 3)]=0.23006924268
            arg[(2, 0, 2, 0)]=-0.389710028068*x[0] + (-0.842968649274)*x[1] + (0.342225907181)*x[2]
            ref[(2, 0, 2, 0)]=-0.445226385081
            arg[(2, 0, 2, 1)]=-0.566003926481*x[0] + (-0.370535622409)*x[1] + (-0.540209820553)*x[2]
            ref[(2, 0, 2, 1)]=-0.738374684722
            arg[(2, 0, 2, 2)]=0.710999423931*x[0] + (0.241761155774)*x[1] + (0.721422249279)*x[2]
            ref[(2, 0, 2, 2)]=0.837091414492
            arg[(2, 0, 2, 3)]=-0.585371702446*x[0] + (0.630147443722)*x[1] + (0.203837023921)*x[2]
            ref[(2, 0, 2, 3)]=0.124306382598
            arg[(2, 0, 3, 0)]=-0.380896740026*x[0] + (0.125289292453)*x[1] + (0.78580442794)*x[2]
            ref[(2, 0, 3, 0)]=0.265098490183
            arg[(2, 0, 3, 1)]=0.378049608236*x[0] + (-0.512730990379)*x[1] + (-0.501910978407)*x[2]
            ref[(2, 0, 3, 1)]=-0.318296180275
            arg[(2, 0, 3, 2)]=-0.752583330275*x[0] + (0.393714007239)*x[1] + (0.638684751205)*x[2]
            ref[(2, 0, 3, 2)]=0.139907714085
            arg[(2, 0, 3, 3)]=0.383080418406*x[0] + (0.599957030132)*x[1] + (-0.618913546836)*x[2]
            ref[(2, 0, 3, 3)]=0.182061950851
            arg[(2, 1, 0, 0)]=-0.472681548882*x[0] + (0.676797499408)*x[1] + (0.3532817048)*x[2]
            ref[(2, 1, 0, 0)]=0.278698827663
            arg[(2, 1, 0, 1)]=-0.259894188756*x[0] + (0.0525697172928)*x[1] + (0.510415107967)*x[2]
            ref[(2, 1, 0, 1)]=0.151545318252
            arg[(2, 1, 0, 2)]=0.99030906719*x[0] + (0.400935769275)*x[1] + (-0.248472429377)*x[2]
            ref[(2, 1, 0, 2)]=0.571386203544
            arg[(2, 1, 0, 3)]=-0.138698641739*x[0] + (0.824666297501)*x[1] + (0.0840264568047)*x[2]
            ref[(2, 1, 0, 3)]=0.384997056284
            arg[(2, 1, 1, 0)]=0.653507284348*x[0] + (-0.634091747188)*x[1] + (0.906801485276)*x[2]
            ref[(2, 1, 1, 0)]=0.463108511218
            arg[(2, 1, 1, 1)]=-0.2553066903*x[0] + (0.194195757361)*x[1] + (0.859053692383)*x[2]
            ref[(2, 1, 1, 1)]=0.398971379722
            arg[(2, 1, 1, 2)]=0.180363575925*x[0] + (0.643685314442)*x[1] + (-0.38179243005)*x[2]
            ref[(2, 1, 1, 2)]=0.221128230159
            arg[(2, 1, 1, 3)]=0.487165634168*x[0] + (0.0560354667865)*x[1] + (0.0677885928853)*x[2]
            ref[(2, 1, 1, 3)]=0.30549484692
            arg[(2, 1, 2, 0)]=0.906917736562*x[0] + (0.304901015536)*x[1] + (0.158059738244)*x[2]
            ref[(2, 1, 2, 0)]=0.684939245171
            arg[(2, 1, 2, 1)]=0.861227967607*x[0] + (0.768347857658)*x[1] + (-0.259450510802)*x[2]
            ref[(2, 1, 2, 1)]=0.685062657231
            arg[(2, 1, 2, 2)]=0.970282087088*x[0] + (0.690299341167)*x[1] + (-0.400290456016)*x[2]
            ref[(2, 1, 2, 2)]=0.63014548612
            arg[(2, 1, 2, 3)]=0.574142893885*x[0] + (-0.866739581778)*x[1] + (0.139219684427)*x[2]
            ref[(2, 1, 2, 3)]=-0.0766885017328
            arg[(2, 1, 3, 0)]=0.862379337717*x[0] + (0.955425034827)*x[1] + (0.874833230238)*x[2]
            ref[(2, 1, 3, 0)]=1.34631880139
            arg[(2, 1, 3, 1)]=0.0016826526529*x[0] + (0.956338999577)*x[1] + (-0.600328448754)*x[2]
            ref[(2, 1, 3, 1)]=0.178846601738
            arg[(2, 1, 3, 2)]=-0.696116949257*x[0] + (0.66186763611)*x[1] + (-0.261923549184)*x[2]
            ref[(2, 1, 3, 2)]=-0.148086431166
            arg[(2, 1, 3, 3)]=0.712513433479*x[0] + (-0.129035405962)*x[1] + (0.694908069726)*x[2]
            ref[(2, 1, 3, 3)]=0.639193048621
            arg[(3, 0, 0, 0)]=-0.144186306077*x[0] + (-0.0810825755258)*x[1] + (-0.654545522619)*x[2]
            ref[(3, 0, 0, 0)]=-0.439907202111
            arg[(3, 0, 0, 1)]=0.969624406566*x[0] + (0.994181753363)*x[1] + (0.24541856198)*x[2]
            ref[(3, 0, 0, 1)]=1.10461236095
            arg[(3, 0, 0, 2)]=0.517004394783*x[0] + (-0.539823409971)*x[1] + (0.633884881168)*x[2]
            ref[(3, 0, 0, 2)]=0.30553293299
            arg[(3, 0, 0, 3)]=0.989541653652*x[0] + (0.0768263843152)*x[1] + (0.64804172428)*x[2]
            ref[(3, 0, 0, 3)]=0.857204881124
            arg[(3, 0, 1, 0)]=-0.645582543856*x[0] + (0.236600167577)*x[1] + (-0.173602955735)*x[2]
            ref[(3, 0, 1, 0)]=-0.291292666007
            arg[(3, 0, 1, 1)]=0.933517921343*x[0] + (0.278974415308)*x[1] + (0.279418929943)*x[2]
            ref[(3, 0, 1, 1)]=0.745955633297
            arg[(3, 0, 1, 2)]=-0.556574661876*x[0] + (0.595714257364)*x[1] + (-0.972805961596)*x[2]
            ref[(3, 0, 1, 2)]=-0.466833183054
            arg[(3, 0, 1, 3)]=0.720927853851*x[0] + (-0.531802749307)*x[1] + (0.366008656735)*x[2]
            ref[(3, 0, 1, 3)]=0.27756688064
            arg[(3, 0, 2, 0)]=0.30191829755*x[0] + (-0.0482078879157)*x[1] + (-0.9488054011)*x[2]
            ref[(3, 0, 2, 0)]=-0.347547495733
            arg[(3, 0, 2, 1)]=0.68780378739*x[0] + (-0.583311986894)*x[1] + (0.450101039962)*x[2]
            ref[(3, 0, 2, 1)]=0.277296420229
            arg[(3, 0, 2, 2)]=-0.221453585325*x[0] + (0.326158553126)*x[1] + (0.868768169033)*x[2]
            ref[(3, 0, 2, 2)]=0.486736568417
            arg[(3, 0, 2, 3)]=0.667844810646*x[0] + (-0.589773187119)*x[1] + (-0.553093631342)*x[2]
            ref[(3, 0, 2, 3)]=-0.237511003907
            arg[(3, 0, 3, 0)]=-0.504830956598*x[0] + (0.184916680858)*x[1] + (-0.69246334911)*x[2]
            ref[(3, 0, 3, 0)]=-0.506188812425
            arg[(3, 0, 3, 1)]=-0.928256223001*x[0] + (-0.293626068579)*x[1] + (0.60514028348)*x[2]
            ref[(3, 0, 3, 1)]=-0.30837100405
            arg[(3, 0, 3, 2)]=0.265196713947*x[0] + (0.702002591444)*x[1] + (0.791218775874)*x[2]
            ref[(3, 0, 3, 2)]=0.879209040632
            arg[(3, 0, 3, 3)]=0.935599738764*x[0] + (-0.93951444804)*x[1] + (0.748320204421)*x[2]
            ref[(3, 0, 3, 3)]=0.372202747572
            arg[(3, 1, 0, 0)]=0.706897408649*x[0] + (0.112889011488)*x[1] + (0.46658933469)*x[2]
            ref[(3, 1, 0, 0)]=0.643187877414
            arg[(3, 1, 0, 1)]=-0.853129595925*x[0] + (0.0335980456836)*x[1] + (0.13710964896)*x[2]
            ref[(3, 1, 0, 1)]=-0.341210950641
            arg[(3, 1, 0, 2)]=0.728506825494*x[0] + (0.562457591771)*x[1] + (-0.833955398171)*x[2]
            ref[(3, 1, 0, 2)]=0.228504509547
            arg[(3, 1, 0, 3)]=0.336020407872*x[0] + (-0.531565839449)*x[1] + (0.950415693804)*x[2]
            ref[(3, 1, 0, 3)]=0.377435131114
            arg[(3, 1, 1, 0)]=-0.951436176325*x[0] + (0.0541837332607)*x[1] + (-0.74648681056)*x[2]
            ref[(3, 1, 1, 0)]=-0.821869626812
            arg[(3, 1, 1, 1)]=0.824419610619*x[0] + (-0.356914927226)*x[1] + (0.978824395091)*x[2]
            ref[(3, 1, 1, 1)]=0.723164539241
            arg[(3, 1, 1, 2)]=-0.700939097363*x[0] + (0.111261792138)*x[1] + (-0.487427025995)*x[2]
            ref[(3, 1, 1, 2)]=-0.53855216561
            arg[(3, 1, 1, 3)]=0.741412632315*x[0] + (0.49461819875)*x[1] + (-0.336198355551)*x[2]
            ref[(3, 1, 1, 3)]=0.449916237758
            arg[(3, 1, 2, 0)]=0.347869215659*x[0] + (-0.609998538263)*x[1] + (-0.614420078621)*x[2]
            ref[(3, 1, 2, 0)]=-0.438274700612
            arg[(3, 1, 2, 1)]=-0.942841259231*x[0] + (0.648690940994)*x[1] + (0.497542478833)*x[2]
            ref[(3, 1, 2, 1)]=0.101696080298
            arg[(3, 1, 2, 2)]=-0.26219340731*x[0] + (-0.426136153296)*x[1] + (-0.324606982501)*x[2]
            ref[(3, 1, 2, 2)]=-0.506468271553
            arg[(3, 1, 2, 3)]=0.520204748491*x[0] + (-0.909495896109)*x[1] + (-0.407736999742)*x[2]
            ref[(3, 1, 2, 3)]=-0.39851407368
            arg[(3, 1, 3, 0)]=-0.880679009595*x[0] + (0.863462748667)*x[1] + (-0.974303296652)*x[2]
            ref[(3, 1, 3, 0)]=-0.49575977879
            arg[(3, 1, 3, 1)]=0.929933647479*x[0] + (-0.65925529539)*x[1] + (-0.938633879716)*x[2]
            ref[(3, 1, 3, 1)]=-0.333977763813
            arg[(3, 1, 3, 2)]=0.973840115773*x[0] + (0.786193389953)*x[1] + (0.164141110722)*x[2]
            ref[(3, 1, 3, 2)]=0.962087308224
            arg[(3, 1, 3, 3)]=0.100806714163*x[0] + (-0.658499160691)*x[1] + (-0.908503756106)*x[2]
            ref[(3, 1, 3, 3)]=-0.733098101317
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.054273691629*x[0] + (-0.95712913135)*x[1]
            ref=-0.45142771986
        else:
            arg=0.556624822278*x[0] + (-0.172370442333)*x[1] + (-0.235182618095)*x[2]
            ref=0.0745358809251
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.303663350786*x[0] + (0.427122535837)*x[1]
            ref[(0,)]=0.365392943311
            arg[(1,)]=0.788634478653*x[0] + (-0.455467674628)*x[1]
            ref[(1,)]=0.166583402013
            arg[(2,)]=0.442925858956*x[0] + (0.955560508498)*x[1]
            ref[(2,)]=0.699243183727
            arg[(3,)]=-0.60465090671*x[0] + (-0.200567676213)*x[1]
            ref[(3,)]=-0.402609291462
        else:
            arg[(0,)]=-0.578806236025*x[0] + (0.599376531146)*x[1] + (0.504507122799)*x[2]
            ref[(0,)]=0.26253870896
            arg[(1,)]=-0.582890022896*x[0] + (0.40682400463)*x[1] + (-0.619252969695)*x[2]
            ref[(1,)]=-0.39765949398
            arg[(2,)]=0.513380107309*x[0] + (0.995573842317)*x[1] + (-0.68966589574)*x[2]
            ref[(2,)]=0.409644026943
            arg[(3,)]=0.0272108788904*x[0] + (0.418621466653)*x[1] + (-0.48355298459)*x[2]
            ref[(3,)]=-0.0188603195233
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref=numpy.zeros((2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.441397945007*x[0] + (0.0636375847842)*x[1]
            ref[(0, 0)]=0.252517764896
            arg[(0, 1)]=-0.520276483875*x[0] + (-0.416764754464)*x[1]
            ref[(0, 1)]=-0.46852061917
            arg[(0, 2)]=-0.00453143863726*x[0] + (0.876773801306)*x[1]
            ref[(0, 2)]=0.436121181334
            arg[(1, 0)]=-0.251407002027*x[0] + (-0.577384624285)*x[1]
            ref[(1, 0)]=-0.414395813156
            arg[(1, 1)]=0.311254532203*x[0] + (0.3888922053)*x[1]
            ref[(1, 1)]=0.350073368752
            arg[(1, 2)]=0.446115057441*x[0] + (0.0243343774457)*x[1]
            ref[(1, 2)]=0.235224717443
        else:
            arg[(0, 0)]=-0.541322788538*x[0] + (0.387087201266)*x[1] + (0.35030419599)*x[2]
            ref[(0, 0)]=0.0980343043585
            arg[(0, 1)]=-0.399102052407*x[0] + (0.131677156443)*x[1] + (0.321531701658)*x[2]
            ref[(0, 1)]=0.0270534028473
            arg[(0, 2)]=-0.36649116787*x[0] + (-0.326594527229)*x[1] + (0.614450690396)*x[2]
            ref[(0, 2)]=-0.0393175023518
            arg[(1, 0)]=-0.638989317578*x[0] + (0.390414283572)*x[1] + (0.283945611733)*x[2]
            ref[(1, 0)]=0.0176852888636
            arg[(1, 1)]=-0.612676726815*x[0] + (0.523867605127)*x[1] + (-0.659303837019)*x[2]
            ref[(1, 1)]=-0.374056479354
            arg[(1, 2)]=0.749152754127*x[0] + (0.487136817225)*x[1] + (-0.603217468932)*x[2]
            ref[(1, 2)]=0.31653605121
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref=numpy.zeros((2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.200722259373*x[0] + (-0.537440977448)*x[1]
            ref[(0, 0, 0)]=-0.369081618411
            arg[(0, 0, 1)]=0.231268035163*x[0] + (-0.575095258694)*x[1]
            ref[(0, 0, 1)]=-0.171913611766
            arg[(0, 1, 0)]=-0.560655589157*x[0] + (0.647989764697)*x[1]
            ref[(0, 1, 0)]=0.04366708777
            arg[(0, 1, 1)]=-0.920146680235*x[0] + (-0.155088640894)*x[1]
            ref[(0, 1, 1)]=-0.537617660565
            arg[(0, 2, 0)]=0.319003131947*x[0] + (0.605682436013)*x[1]
            ref[(0, 2, 0)]=0.46234278398
            arg[(0, 2, 1)]=-0.335419227162*x[0] + (0.0987887712268)*x[1]
            ref[(0, 2, 1)]=-0.118315227968
            arg[(0, 3, 0)]=0.645080803969*x[0] + (0.00386723292745)*x[1]
            ref[(0, 3, 0)]=0.324474018448
            arg[(0, 3, 1)]=0.1302149567*x[0] + (-0.836141684376)*x[1]
            ref[(0, 3, 1)]=-0.352963363838
            arg[(1, 0, 0)]=0.832611554693*x[0] + (-0.912757983471)*x[1]
            ref[(1, 0, 0)]=-0.0400732143893
            arg[(1, 0, 1)]=-0.782925638491*x[0] + (-0.917908553222)*x[1]
            ref[(1, 0, 1)]=-0.850417095856
            arg[(1, 1, 0)]=-0.965683594792*x[0] + (-0.132229190215)*x[1]
            ref[(1, 1, 0)]=-0.548956392503
            arg[(1, 1, 1)]=-0.844262089705*x[0] + (-0.422918707081)*x[1]
            ref[(1, 1, 1)]=-0.633590398393
            arg[(1, 2, 0)]=-0.217567107024*x[0] + (0.0285399388503)*x[1]
            ref[(1, 2, 0)]=-0.0945135840868
            arg[(1, 2, 1)]=0.708250822017*x[0] + (-0.0747472364274)*x[1]
            ref[(1, 2, 1)]=0.316751792795
            arg[(1, 3, 0)]=-0.707313423846*x[0] + (0.192245717413)*x[1]
            ref[(1, 3, 0)]=-0.257533853216
            arg[(1, 3, 1)]=-0.592956810025*x[0] + (0.89054539715)*x[1]
            ref[(1, 3, 1)]=0.148794293562
        else:
            arg[(0, 0, 0)]=0.0867354984663*x[0] + (0.147626435987)*x[1] + (0.992894357651)*x[2]
            ref[(0, 0, 0)]=0.613628146052
            arg[(0, 0, 1)]=-0.436763813284*x[0] + (0.991651016098)*x[1] + (-0.82238854031)*x[2]
            ref[(0, 0, 1)]=-0.133750668747
            arg[(0, 1, 0)]=0.33365503846*x[0] + (0.608795213729)*x[1] + (-0.0913580216337)*x[2]
            ref[(0, 1, 0)]=0.425546115278
            arg[(0, 1, 1)]=-0.511219342379*x[0] + (-0.961154416418)*x[1] + (-0.306415340118)*x[2]
            ref[(0, 1, 1)]=-0.889394549458
            arg[(0, 2, 0)]=-0.572068192826*x[0] + (-0.236439808197)*x[1] + (0.806554959258)*x[2]
            ref[(0, 2, 0)]=-0.000976520882264
            arg[(0, 2, 1)]=-0.736152586123*x[0] + (0.20396836439)*x[1] + (-0.136717380207)*x[2]
            ref[(0, 2, 1)]=-0.33445080097
            arg[(0, 3, 0)]=-0.449373543775*x[0] + (-0.0626100577933)*x[1] + (0.147656126075)*x[2]
            ref[(0, 3, 0)]=-0.182163737746
            arg[(0, 3, 1)]=0.150488207712*x[0] + (0.270723078283)*x[1] + (0.515037391494)*x[2]
            ref[(0, 3, 1)]=0.468124338745
            arg[(1, 0, 0)]=-0.765258072089*x[0] + (-0.216598173527)*x[1] + (-0.540132068258)*x[2]
            ref[(1, 0, 0)]=-0.760994156937
            arg[(1, 0, 1)]=0.456468315506*x[0] + (-0.775041132487)*x[1] + (-0.7200951784)*x[2]
            ref[(1, 0, 1)]=-0.51933399769
            arg[(1, 1, 0)]=0.00372173414527*x[0] + (-0.899466097946)*x[1] + (0.780772711097)*x[2]
            ref[(1, 1, 0)]=-0.0574858263519
            arg[(1, 1, 1)]=-0.61440113534*x[0] + (0.666229999435)*x[1] + (0.464420450141)*x[2]
            ref[(1, 1, 1)]=0.258124657118
            arg[(1, 2, 0)]=-0.365657162222*x[0] + (0.304435535758)*x[1] + (0.0522661319744)*x[2]
            ref[(1, 2, 0)]=-0.00447774724469
            arg[(1, 2, 1)]=0.274418157999*x[0] + (-0.862895404386)*x[1] + (-0.995602907649)*x[2]
            ref[(1, 2, 1)]=-0.792040077018
            arg[(1, 3, 0)]=0.696480250729*x[0] + (-0.514270758989)*x[1] + (0.33986609422)*x[2]
            ref[(1, 3, 0)]=0.26103779298
            arg[(1, 3, 1)]=-0.292176957804*x[0] + (-0.0191057687584)*x[1] + (0.873427693607)*x[2]
            ref[(1, 3, 1)]=0.281072483522
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 2, 4),w)
        ref=numpy.zeros((2, 2, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.659679818542*x[0] + (0.036849102711)*x[1]
            ref[(0, 0, 0, 0)]=-0.311415357916
            arg[(0, 0, 0, 1)]=-0.533105616061*x[0] + (-0.209938358158)*x[1]
            ref[(0, 0, 0, 1)]=-0.371521987109
            arg[(0, 0, 0, 2)]=-0.957597744236*x[0] + (0.897465867443)*x[1]
            ref[(0, 0, 0, 2)]=-0.0300659383964
            arg[(0, 0, 0, 3)]=0.430663348188*x[0] + (0.635024617772)*x[1]
            ref[(0, 0, 0, 3)]=0.53284398298
            arg[(0, 0, 1, 0)]=-0.803990630928*x[0] + (0.808742545083)*x[1]
            ref[(0, 0, 1, 0)]=0.00237595707712
            arg[(0, 0, 1, 1)]=0.839310766486*x[0] + (-0.434669027219)*x[1]
            ref[(0, 0, 1, 1)]=0.202320869634
            arg[(0, 0, 1, 2)]=-0.381612678523*x[0] + (0.725668280155)*x[1]
            ref[(0, 0, 1, 2)]=0.172027800816
            arg[(0, 0, 1, 3)]=-0.132429446485*x[0] + (-0.801077584652)*x[1]
            ref[(0, 0, 1, 3)]=-0.466753515568
            arg[(0, 1, 0, 0)]=0.131225659446*x[0] + (-0.0657103171493)*x[1]
            ref[(0, 1, 0, 0)]=0.0327576711483
            arg[(0, 1, 0, 1)]=-0.0833810907323*x[0] + (-0.400675533654)*x[1]
            ref[(0, 1, 0, 1)]=-0.242028312193
            arg[(0, 1, 0, 2)]=0.932336544654*x[0] + (-0.828036040621)*x[1]
            ref[(0, 1, 0, 2)]=0.0521502520161
            arg[(0, 1, 0, 3)]=0.588560486888*x[0] + (-0.650210077508)*x[1]
            ref[(0, 1, 0, 3)]=-0.0308247953102
            arg[(0, 1, 1, 0)]=-0.180755733821*x[0] + (-0.843362349577)*x[1]
            ref[(0, 1, 1, 0)]=-0.512059041699
            arg[(0, 1, 1, 1)]=0.470782147097*x[0] + (-0.172546962653)*x[1]
            ref[(0, 1, 1, 1)]=0.149117592222
            arg[(0, 1, 1, 2)]=-0.971424798372*x[0] + (-0.00636151442355)*x[1]
            ref[(0, 1, 1, 2)]=-0.488893156398
            arg[(0, 1, 1, 3)]=-0.780636517916*x[0] + (0.21015100245)*x[1]
            ref[(0, 1, 1, 3)]=-0.285242757733
            arg[(1, 0, 0, 0)]=-0.605315437868*x[0] + (-0.655301373309)*x[1]
            ref[(1, 0, 0, 0)]=-0.630308405589
            arg[(1, 0, 0, 1)]=0.215029178142*x[0] + (0.955339723634)*x[1]
            ref[(1, 0, 0, 1)]=0.585184450888
            arg[(1, 0, 0, 2)]=0.741437130382*x[0] + (0.302319768245)*x[1]
            ref[(1, 0, 0, 2)]=0.521878449313
            arg[(1, 0, 0, 3)]=-0.853900617461*x[0] + (-0.0540704660415)*x[1]
            ref[(1, 0, 0, 3)]=-0.453985541751
            arg[(1, 0, 1, 0)]=-0.768340387651*x[0] + (0.736036229005)*x[1]
            ref[(1, 0, 1, 0)]=-0.0161520793228
            arg[(1, 0, 1, 1)]=-0.846109386295*x[0] + (0.279163725645)*x[1]
            ref[(1, 0, 1, 1)]=-0.283472830325
            arg[(1, 0, 1, 2)]=-0.627647206054*x[0] + (-0.61897160693)*x[1]
            ref[(1, 0, 1, 2)]=-0.623309406492
            arg[(1, 0, 1, 3)]=0.649602130426*x[0] + (0.798865220034)*x[1]
            ref[(1, 0, 1, 3)]=0.72423367523
            arg[(1, 1, 0, 0)]=-0.535639470779*x[0] + (-0.990554605703)*x[1]
            ref[(1, 1, 0, 0)]=-0.763097038241
            arg[(1, 1, 0, 1)]=-0.932821565999*x[0] + (-0.767580740112)*x[1]
            ref[(1, 1, 0, 1)]=-0.850201153056
            arg[(1, 1, 0, 2)]=0.688898842816*x[0] + (0.0156686739706)*x[1]
            ref[(1, 1, 0, 2)]=0.352283758394
            arg[(1, 1, 0, 3)]=-0.703823729271*x[0] + (-0.468620818856)*x[1]
            ref[(1, 1, 0, 3)]=-0.586222274064
            arg[(1, 1, 1, 0)]=0.600658935489*x[0] + (-0.343158690693)*x[1]
            ref[(1, 1, 1, 0)]=0.128750122398
            arg[(1, 1, 1, 1)]=-0.0658446324871*x[0] + (-0.308522267089)*x[1]
            ref[(1, 1, 1, 1)]=-0.187183449788
            arg[(1, 1, 1, 2)]=0.269449246434*x[0] + (0.843148543477)*x[1]
            ref[(1, 1, 1, 2)]=0.556298894955
            arg[(1, 1, 1, 3)]=-0.354342658837*x[0] + (0.286990906989)*x[1]
            ref[(1, 1, 1, 3)]=-0.0336758759242
        else:
            arg[(0, 0, 0, 0)]=0.0713326917575*x[0] + (-0.706866263312)*x[1] + (0.662374832348)*x[2]
            ref[(0, 0, 0, 0)]=0.0134206303964
            arg[(0, 0, 0, 1)]=-0.235805656287*x[0] + (0.729392746283)*x[1] + (-0.983766253038)*x[2]
            ref[(0, 0, 0, 1)]=-0.245089581521
            arg[(0, 0, 0, 2)]=-0.628507824756*x[0] + (0.319935703361)*x[1] + (-0.184644609409)*x[2]
            ref[(0, 0, 0, 2)]=-0.246608365402
            arg[(0, 0, 0, 3)]=0.28901478254*x[0] + (0.660540296591)*x[1] + (0.466377410335)*x[2]
            ref[(0, 0, 0, 3)]=0.707966244733
            arg[(0, 0, 1, 0)]=-0.151533149436*x[0] + (0.244580029264)*x[1] + (0.586410457151)*x[2]
            ref[(0, 0, 1, 0)]=0.339728668489
            arg[(0, 0, 1, 1)]=0.215495022396*x[0] + (-0.867590706107)*x[1] + (-0.711353341163)*x[2]
            ref[(0, 0, 1, 1)]=-0.681724512437
            arg[(0, 0, 1, 2)]=0.510254630416*x[0] + (0.65947514858)*x[1] + (-0.569436947628)*x[2]
            ref[(0, 0, 1, 2)]=0.300146415684
            arg[(0, 0, 1, 3)]=-0.135017475732*x[0] + (0.813734979637)*x[1] + (-0.00469690182405)*x[2]
            ref[(0, 0, 1, 3)]=0.33701030104
            arg[(0, 1, 0, 0)]=-0.098104484817*x[0] + (0.693449042971)*x[1] + (-0.421172106055)*x[2]
            ref[(0, 1, 0, 0)]=0.0870862260494
            arg[(0, 1, 0, 1)]=0.348832155633*x[0] + (0.81671876124)*x[1] + (-0.51691941173)*x[2]
            ref[(0, 1, 0, 1)]=0.324315752572
            arg[(0, 1, 0, 2)]=-0.586852511666*x[0] + (-0.730240715297)*x[1] + (0.0601516896926)*x[2]
            ref[(0, 1, 0, 2)]=-0.628470768635
            arg[(0, 1, 0, 3)]=-0.074517566245*x[0] + (-0.455529451076)*x[1] + (0.940681263627)*x[2]
            ref[(0, 1, 0, 3)]=0.205317123153
            arg[(0, 1, 1, 0)]=0.761952005014*x[0] + (0.211120553751)*x[1] + (0.862361489426)*x[2]
            ref[(0, 1, 1, 0)]=0.917717024095
            arg[(0, 1, 1, 1)]=-0.122157407479*x[0] + (-0.195472875919)*x[1] + (-0.261516800953)*x[2]
            ref[(0, 1, 1, 1)]=-0.289573542176
            arg[(0, 1, 1, 2)]=-0.533153512041*x[0] + (0.70196965631)*x[1] + (0.762442987702)*x[2]
            ref[(0, 1, 1, 2)]=0.465629565985
            arg[(0, 1, 1, 3)]=-0.0447556334445*x[0] + (0.943838568549)*x[1] + (-0.815220885058)*x[2]
            ref[(0, 1, 1, 3)]=0.041931025023
            arg[(1, 0, 0, 0)]=-0.044725561243*x[0] + (-0.899167592152)*x[1] + (0.249129420205)*x[2]
            ref[(1, 0, 0, 0)]=-0.347381866595
            arg[(1, 0, 0, 1)]=-0.583923255546*x[0] + (-0.82576586151)*x[1] + (-0.497107581422)*x[2]
            ref[(1, 0, 0, 1)]=-0.953398349239
            arg[(1, 0, 0, 2)]=0.748148018033*x[0] + (-0.749227424368)*x[1] + (0.782729931327)*x[2]
            ref[(1, 0, 0, 2)]=0.390825262496
            arg[(1, 0, 0, 3)]=-0.299455788678*x[0] + (0.967102295741)*x[1] + (0.998795619148)*x[2]
            ref[(1, 0, 0, 3)]=0.833221063106
            arg[(1, 0, 1, 0)]=-0.749067548129*x[0] + (-0.911835286256)*x[1] + (-0.364118902361)*x[2]
            ref[(1, 0, 1, 0)]=-1.01251086837
            arg[(1, 0, 1, 1)]=-0.885741424769*x[0] + (0.423215946193)*x[1] + (-0.608624001086)*x[2]
            ref[(1, 0, 1, 1)]=-0.535574739831
            arg[(1, 0, 1, 2)]=0.656828069028*x[0] + (0.652920166425)*x[1] + (-0.227602218391)*x[2]
            ref[(1, 0, 1, 2)]=0.541073008531
            arg[(1, 0, 1, 3)]=0.123534303314*x[0] + (-0.691354600356)*x[1] + (0.74181994861)*x[2]
            ref[(1, 0, 1, 3)]=0.0869998257841
            arg[(1, 1, 0, 0)]=0.722160828247*x[0] + (0.908767072229)*x[1] + (-0.0806988087343)*x[2]
            ref[(1, 1, 0, 0)]=0.775114545871
            arg[(1, 1, 0, 1)]=0.101089091534*x[0] + (-0.0939436170114)*x[1] + (-0.225428360406)*x[2]
            ref[(1, 1, 0, 1)]=-0.109141442941
            arg[(1, 1, 0, 2)]=0.817151960063*x[0] + (-0.303413638766)*x[1] + (0.83090915676)*x[2]
            ref[(1, 1, 0, 2)]=0.672323739028
            arg[(1, 1, 0, 3)]=-0.795517970815*x[0] + (0.688771015519)*x[1] + (-0.361082672757)*x[2]
            ref[(1, 1, 0, 3)]=-0.233914814027
            arg[(1, 1, 1, 0)]=0.515426878256*x[0] + (-0.554639043438)*x[1] + (0.385407076958)*x[2]
            ref[(1, 1, 1, 0)]=0.173097455888
            arg[(1, 1, 1, 1)]=0.145619636575*x[0] + (-0.793239447409)*x[1] + (0.943160515147)*x[2]
            ref[(1, 1, 1, 1)]=0.147770352157
            arg[(1, 1, 1, 2)]=-0.863961319176*x[0] + (-0.547197065853)*x[1] + (-0.305226299535)*x[2]
            ref[(1, 1, 1, 2)]=-0.858192342282
            arg[(1, 1, 1, 3)]=-0.112674856373*x[0] + (-0.0585282025451)*x[1] + (0.397734933845)*x[2]
            ref[(1, 1, 1, 3)]=0.113265937463
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.462330485007*x[0]**o + (-0.0636619657605)*x[0] + (-0.552616481056)*x[1]**o + (-0.223521557703)*x[1]
            ref=-0.552616481056/(o+1.)+(-0.143591761732)+(0.462330485007)*0.5**o
        else:
            arg=0.67014403348*x[0]**o + (-0.141705993092)*x[0] + (-0.480877721498)*x[1]**o + (-0.328415614116)*x[1] + (0.8073414071)*x[2]**o + (-0.662526614509)*x[2]
            ref=0.326463685602/(o+1.)+(-0.566324110859)+(0.67014403348)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.544310527468*x[0]**o + (0.463456987401)*x[0] + (0.669887500095)*x[1]**o + (-0.853455063108)*x[1]
            ref[(0,)]=0.669887500095/(o+1.)+(-0.194999037853)+(-0.544310527468)*0.5**o
            arg[(1,)]=0.62991457429*x[0]**o + (-0.0844934158602)*x[0] + (0.882241013558)*x[1]**o + (0.801903456356)*x[1]
            ref[(1,)]=0.882241013558/(o+1.)+(0.358705020248)+(0.62991457429)*0.5**o
        else:
            arg[(0,)]=-0.382094926164*x[0]**o + (0.0685595034484)*x[0] + (0.56582823617)*x[1]**o + (0.367890467617)*x[1] + (0.559136395027)*x[2]**o + (0.0262875252594)*x[2]
            ref[(0,)]=1.1249646312/(o+1.)+(0.231368748163)+(-0.382094926164)*0.5**o
            arg[(1,)]=0.532205204973*x[0]**o + (0.777636329592)*x[0] + (0.48369175575)*x[1]**o + (-0.671312116077)*x[1] + (0.25993912946)*x[2]**o + (-0.0564870800027)*x[2]
            ref[(1,)]=0.74363088521/(o+1.)+(0.0249185667565)+(0.532205204973)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.335503332478*x[0]**o + (0.951917908328)*x[0] + (0.380603890607)*x[1]**o + (0.454873013449)*x[1]
            ref[(0, 0)]=0.380603890607/(o+1.)+(0.703395460889)+(-0.335503332478)*0.5**o
            arg[(0, 1)]=0.40071006618*x[0]**o + (-0.633130169206)*x[0] + (0.833610107852)*x[1]**o + (-0.145751387885)*x[1]
            ref[(0, 1)]=0.833610107852/(o+1.)+(-0.389440778545)+(0.40071006618)*0.5**o
            arg[(0, 2)]=-0.139954525595*x[0]**o + (-0.617485523466)*x[0] + (-0.0275400547146)*x[1]**o + (-0.0772160671622)*x[1]
            ref[(0, 2)]=-0.0275400547146/(o+1.)+(-0.347350795314)+(-0.139954525595)*0.5**o
            arg[(0, 3)]=-0.702318664541*x[0]**o + (0.487136567209)*x[0] + (-0.527946703437)*x[1]**o + (0.991050607744)*x[1]
            ref[(0, 3)]=-0.527946703437/(o+1.)+(0.739093587476)+(-0.702318664541)*0.5**o
            arg[(1, 0)]=-0.0591875390631*x[0]**o + (-0.123290067572)*x[0] + (0.0799631636059)*x[1]**o + (-0.89865475902)*x[1]
            ref[(1, 0)]=0.0799631636059/(o+1.)+(-0.510972413296)+(-0.0591875390631)*0.5**o
            arg[(1, 1)]=0.321484665213*x[0]**o + (0.767075567926)*x[0] + (-0.597918884849)*x[1]**o + (-0.329804816104)*x[1]
            ref[(1, 1)]=-0.597918884849/(o+1.)+(0.218635375911)+(0.321484665213)*0.5**o
            arg[(1, 2)]=-0.717277860391*x[0]**o + (0.630085138066)*x[0] + (-0.629839226578)*x[1]**o + (-0.516226001262)*x[1]
            ref[(1, 2)]=-0.629839226578/(o+1.)+(0.0569295684021)+(-0.717277860391)*0.5**o
            arg[(1, 3)]=-0.943248940885*x[0]**o + (-0.578019477223)*x[0] + (0.0714236323815)*x[1]**o + (-0.246900225593)*x[1]
            ref[(1, 3)]=0.0714236323815/(o+1.)+(-0.412459851408)+(-0.943248940885)*0.5**o
            arg[(2, 0)]=0.00972854600757*x[0]**o + (0.676206986501)*x[0] + (0.636374630118)*x[1]**o + (-0.580428996806)*x[1]
            ref[(2, 0)]=0.636374630118/(o+1.)+(0.0478889948476)+(0.00972854600757)*0.5**o
            arg[(2, 1)]=-0.66302547309*x[0]**o + (-0.585610141812)*x[0] + (0.999905282923)*x[1]**o + (-0.585624598455)*x[1]
            ref[(2, 1)]=0.999905282923/(o+1.)+(-0.585617370133)+(-0.66302547309)*0.5**o
            arg[(2, 2)]=-0.955940129873*x[0]**o + (0.79195402454)*x[0] + (0.261813983275)*x[1]**o + (0.251397008719)*x[1]
            ref[(2, 2)]=0.261813983275/(o+1.)+(0.521675516629)+(-0.955940129873)*0.5**o
            arg[(2, 3)]=-0.372464046213*x[0]**o + (0.361903023565)*x[0] + (0.897379738729)*x[1]**o + (-0.0802036356036)*x[1]
            ref[(2, 3)]=0.897379738729/(o+1.)+(0.140849693981)+(-0.372464046213)*0.5**o
        else:
            arg[(0, 0)]=0.00640120948866*x[0]**o + (0.27974758576)*x[0] + (0.265378312974)*x[1]**o + (0.204533172172)*x[1] + (0.871324357747)*x[2]**o + (-0.0761358188371)*x[2]
            ref[(0, 0)]=1.13670267072/(o+1.)+(0.204072469547)+(0.00640120948866)*0.5**o
            arg[(0, 1)]=-0.231699015697*x[0]**o + (-0.152406377002)*x[0] + (-0.895157687402)*x[1]**o + (-0.0366748178642)*x[1] + (0.190211122966)*x[2]**o + (0.971151175546)*x[2]
            ref[(0, 1)]=-0.704946564436/(o+1.)+(0.39103499034)+(-0.231699015697)*0.5**o
            arg[(0, 2)]=0.261315145131*x[0]**o + (0.682509300217)*x[0] + (-0.966315126628)*x[1]**o + (-0.265499135511)*x[1] + (0.500874212645)*x[2]**o + (-0.0938654899204)*x[2]
            ref[(0, 2)]=-0.465440913983/(o+1.)+(0.161572337393)+(0.261315145131)*0.5**o
            arg[(0, 3)]=-0.518841747502*x[0]**o + (0.467416742008)*x[0] + (-0.976178352936)*x[1]**o + (0.538321645048)*x[1] + (-0.0831783905585)*x[2]**o + (-0.717728674896)*x[2]
            ref[(0, 3)]=-1.05935674349/(o+1.)+(0.14400485608)+(-0.518841747502)*0.5**o
            arg[(1, 0)]=-0.839185710736*x[0]**o + (-0.458847458051)*x[0] + (0.35293784794)*x[1]**o + (0.963731603182)*x[1] + (0.857744391511)*x[2]**o + (0.98507469198)*x[2]
            ref[(1, 0)]=1.21068223945/(o+1.)+(0.744979418556)+(-0.839185710736)*0.5**o
            arg[(1, 1)]=-0.281936370264*x[0]**o + (0.60418576644)*x[0] + (-0.969345305909)*x[1]**o + (0.984795172603)*x[1] + (0.747550296236)*x[2]**o + (-0.79418547888)*x[2]
            ref[(1, 1)]=-0.221795009673/(o+1.)+(0.397397730081)+(-0.281936370264)*0.5**o
            arg[(1, 2)]=0.372807272715*x[0]**o + (-0.793799629451)*x[0] + (-0.481180174564)*x[1]**o + (0.781743638962)*x[1] + (0.467226668786)*x[2]**o + (0.368647161431)*x[2]
            ref[(1, 2)]=-0.0139535057782/(o+1.)+(0.178295585471)+(0.372807272715)*0.5**o
            arg[(1, 3)]=0.0538427756436*x[0]**o + (0.286784465406)*x[0] + (0.2330867827)*x[1]**o + (-0.108917264202)*x[1] + (-0.855943642401)*x[2]**o + (0.65780829809)*x[2]
            ref[(1, 3)]=-0.622856859701/(o+1.)+(0.417837749647)+(0.0538427756436)*0.5**o
            arg[(2, 0)]=-0.232350191954*x[0]**o + (-0.880809920057)*x[0] + (-0.464199315216)*x[1]**o + (0.239965095873)*x[1] + (-0.0842772709532)*x[2]**o + (-0.177522437382)*x[2]
            ref[(2, 0)]=-0.54847658617/(o+1.)+(-0.409183630783)+(-0.232350191954)*0.5**o
            arg[(2, 1)]=-0.594187456155*x[0]**o + (-0.628757629827)*x[0] + (-0.59884428189)*x[1]**o + (-0.460859381201)*x[1] + (0.642450158878)*x[2]**o + (-0.0337846144248)*x[2]
            ref[(2, 1)]=0.0436058769877/(o+1.)+(-0.561700812726)+(-0.594187456155)*0.5**o
            arg[(2, 2)]=-0.718267718613*x[0]**o + (-0.210284297455)*x[0] + (0.344872218734)*x[1]**o + (0.520093715483)*x[1] + (-0.394963251388)*x[2]**o + (0.570299040842)*x[2]
            ref[(2, 2)]=-0.0500910326537/(o+1.)+(0.440054229435)+(-0.718267718613)*0.5**o
            arg[(2, 3)]=0.569021556539*x[0]**o + (-0.520003812169)*x[0] + (-0.292894730169)*x[1]**o + (0.78321329992)*x[1] + (-0.221685761071)*x[2]**o + (-0.212903624805)*x[2]
            ref[(2, 3)]=-0.51458049124/(o+1.)+(0.0251529314726)+(0.569021556539)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3),w)
        ref=numpy.zeros((4, 4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.392458581977*x[0]**o + (0.874041743688)*x[0] + (0.503198180973)*x[1]**o + (-0.495773542444)*x[1]
            ref[(0, 0, 0)]=0.503198180973/(o+1.)+(0.189134100622)+(0.392458581977)*0.5**o
            arg[(0, 0, 1)]=-0.756296021176*x[0]**o + (-0.315466461817)*x[0] + (0.97486652723)*x[1]**o + (0.704045581181)*x[1]
            ref[(0, 0, 1)]=0.97486652723/(o+1.)+(0.194289559682)+(-0.756296021176)*0.5**o
            arg[(0, 0, 2)]=-0.722555637756*x[0]**o + (0.765177239839)*x[0] + (-0.73585291022)*x[1]**o + (-0.640183969962)*x[1]
            ref[(0, 0, 2)]=-0.73585291022/(o+1.)+(0.0624966349388)+(-0.722555637756)*0.5**o
            arg[(0, 1, 0)]=0.0626571102045*x[0]**o + (-0.34873119391)*x[0] + (0.243535072356)*x[1]**o + (-0.532541650181)*x[1]
            ref[(0, 1, 0)]=0.243535072356/(o+1.)+(-0.440636422045)+(0.0626571102045)*0.5**o
            arg[(0, 1, 1)]=-0.48228089855*x[0]**o + (0.211185339711)*x[0] + (0.341109948902)*x[1]**o + (0.566965606889)*x[1]
            ref[(0, 1, 1)]=0.341109948902/(o+1.)+(0.3890754733)+(-0.48228089855)*0.5**o
            arg[(0, 1, 2)]=0.626305911309*x[0]**o + (-0.700130450655)*x[0] + (-0.0404926015247)*x[1]**o + (0.154137335221)*x[1]
            ref[(0, 1, 2)]=-0.0404926015247/(o+1.)+(-0.272996557717)+(0.626305911309)*0.5**o
            arg[(0, 2, 0)]=-0.995067750855*x[0]**o + (0.012100174275)*x[0] + (0.799671199325)*x[1]**o + (-0.00503046609567)*x[1]
            ref[(0, 2, 0)]=0.799671199325/(o+1.)+(0.00353485408969)+(-0.995067750855)*0.5**o
            arg[(0, 2, 1)]=-0.613866008496*x[0]**o + (0.519678746327)*x[0] + (-0.418981734646)*x[1]**o + (0.233982702617)*x[1]
            ref[(0, 2, 1)]=-0.418981734646/(o+1.)+(0.376830724472)+(-0.613866008496)*0.5**o
            arg[(0, 2, 2)]=-0.139229958257*x[0]**o + (-0.708497967816)*x[0] + (0.487450159164)*x[1]**o + (-0.0100667182992)*x[1]
            ref[(0, 2, 2)]=0.487450159164/(o+1.)+(-0.359282343058)+(-0.139229958257)*0.5**o
            arg[(0, 3, 0)]=-0.00407256425673*x[0]**o + (0.14687247946)*x[0] + (-0.900016580664)*x[1]**o + (-0.794518126613)*x[1]
            ref[(0, 3, 0)]=-0.900016580664/(o+1.)+(-0.323822823577)+(-0.00407256425673)*0.5**o
            arg[(0, 3, 1)]=0.856473424103*x[0]**o + (0.47882483408)*x[0] + (0.982635554243)*x[1]**o + (-0.661219738189)*x[1]
            ref[(0, 3, 1)]=0.982635554243/(o+1.)+(-0.0911974520542)+(0.856473424103)*0.5**o
            arg[(0, 3, 2)]=0.510224381407*x[0]**o + (0.395337079486)*x[0] + (0.673872959286)*x[1]**o + (-0.926416261155)*x[1]
            ref[(0, 3, 2)]=0.673872959286/(o+1.)+(-0.265539590835)+(0.510224381407)*0.5**o
            arg[(1, 0, 0)]=-0.547498965737*x[0]**o + (0.102987497985)*x[0] + (0.844583256272)*x[1]**o + (-0.0964766107373)*x[1]
            ref[(1, 0, 0)]=0.844583256272/(o+1.)+(0.0032554436239)+(-0.547498965737)*0.5**o
            arg[(1, 0, 1)]=-0.349743916005*x[0]**o + (-0.750058894308)*x[0] + (0.397089811638)*x[1]**o + (0.697487568344)*x[1]
            ref[(1, 0, 1)]=0.397089811638/(o+1.)+(-0.0262856629819)+(-0.349743916005)*0.5**o
            arg[(1, 0, 2)]=0.920704069542*x[0]**o + (-0.332942680459)*x[0] + (0.669685402695)*x[1]**o + (0.833305556724)*x[1]
            ref[(1, 0, 2)]=0.669685402695/(o+1.)+(0.250181438132)+(0.920704069542)*0.5**o
            arg[(1, 1, 0)]=-0.925229323204*x[0]**o + (-0.775665944563)*x[0] + (-0.677085046604)*x[1]**o + (-0.0729338066724)*x[1]
            ref[(1, 1, 0)]=-0.677085046604/(o+1.)+(-0.424299875617)+(-0.925229323204)*0.5**o
            arg[(1, 1, 1)]=-0.327479228329*x[0]**o + (0.511150889685)*x[0] + (-0.288416816572)*x[1]**o + (-0.280163395979)*x[1]
            ref[(1, 1, 1)]=-0.288416816572/(o+1.)+(0.115493746853)+(-0.327479228329)*0.5**o
            arg[(1, 1, 2)]=0.94453414515*x[0]**o + (0.962554387854)*x[0] + (-0.729424264771)*x[1]**o + (-0.0730348553307)*x[1]
            ref[(1, 1, 2)]=-0.729424264771/(o+1.)+(0.444759766262)+(0.94453414515)*0.5**o
            arg[(1, 2, 0)]=0.540884207329*x[0]**o + (0.192998167139)*x[0] + (-0.0550684988941)*x[1]**o + (0.968796047587)*x[1]
            ref[(1, 2, 0)]=-0.0550684988941/(o+1.)+(0.580897107363)+(0.540884207329)*0.5**o
            arg[(1, 2, 1)]=-0.567958517839*x[0]**o + (-0.668329075117)*x[0] + (-0.0881784530112)*x[1]**o + (-0.600846008416)*x[1]
            ref[(1, 2, 1)]=-0.0881784530112/(o+1.)+(-0.634587541767)+(-0.567958517839)*0.5**o
            arg[(1, 2, 2)]=0.576346975573*x[0]**o + (-0.544630250373)*x[0] + (0.893336226426)*x[1]**o + (0.225523953954)*x[1]
            ref[(1, 2, 2)]=0.893336226426/(o+1.)+(-0.15955314821)+(0.576346975573)*0.5**o
            arg[(1, 3, 0)]=-0.223541667512*x[0]**o + (-0.289955274679)*x[0] + (-0.413280953072)*x[1]**o + (0.36089708415)*x[1]
            ref[(1, 3, 0)]=-0.413280953072/(o+1.)+(0.0354709047353)+(-0.223541667512)*0.5**o
            arg[(1, 3, 1)]=-0.198169716689*x[0]**o + (-0.841662289251)*x[0] + (-0.0753227171591)*x[1]**o + (-0.759088680602)*x[1]
            ref[(1, 3, 1)]=-0.0753227171591/(o+1.)+(-0.800375484927)+(-0.198169716689)*0.5**o
            arg[(1, 3, 2)]=-0.915440075359*x[0]**o + (0.499830042954)*x[0] + (0.373085422895)*x[1]**o + (0.805273584774)*x[1]
            ref[(1, 3, 2)]=0.373085422895/(o+1.)+(0.652551813864)+(-0.915440075359)*0.5**o
            arg[(2, 0, 0)]=-0.954067745103*x[0]**o + (0.759472779055)*x[0] + (0.190587021241)*x[1]**o + (-0.26049680327)*x[1]
            ref[(2, 0, 0)]=0.190587021241/(o+1.)+(0.249487987893)+(-0.954067745103)*0.5**o
            arg[(2, 0, 1)]=-0.25263731278*x[0]**o + (0.0127964227893)*x[0] + (-0.864807033968)*x[1]**o + (0.515252571925)*x[1]
            ref[(2, 0, 1)]=-0.864807033968/(o+1.)+(0.264024497357)+(-0.25263731278)*0.5**o
            arg[(2, 0, 2)]=0.417523840945*x[0]**o + (0.668504401802)*x[0] + (0.880664710577)*x[1]**o + (-0.795117406226)*x[1]
            ref[(2, 0, 2)]=0.880664710577/(o+1.)+(-0.0633065022119)+(0.417523840945)*0.5**o
            arg[(2, 1, 0)]=-0.776029799197*x[0]**o + (0.351544636022)*x[0] + (-0.150039786855)*x[1]**o + (0.524091584289)*x[1]
            ref[(2, 1, 0)]=-0.150039786855/(o+1.)+(0.437818110155)+(-0.776029799197)*0.5**o
            arg[(2, 1, 1)]=-0.8147953198*x[0]**o + (0.619676430491)*x[0] + (0.795896062848)*x[1]**o + (0.039571385886)*x[1]
            ref[(2, 1, 1)]=0.795896062848/(o+1.)+(0.329623908188)+(-0.8147953198)*0.5**o
            arg[(2, 1, 2)]=0.857906103602*x[0]**o + (-0.0302548779938)*x[0] + (-0.49677056716)*x[1]**o + (0.723224888824)*x[1]
            ref[(2, 1, 2)]=-0.49677056716/(o+1.)+(0.346485005415)+(0.857906103602)*0.5**o
            arg[(2, 2, 0)]=-0.110770280036*x[0]**o + (-0.32984933331)*x[0] + (-0.98051311405)*x[1]**o + (-0.57514004128)*x[1]
            ref[(2, 2, 0)]=-0.98051311405/(o+1.)+(-0.452494687295)+(-0.110770280036)*0.5**o
            arg[(2, 2, 1)]=-0.562137785905*x[0]**o + (0.0535443347197)*x[0] + (-0.160955664095)*x[1]**o + (-0.774617533631)*x[1]
            ref[(2, 2, 1)]=-0.160955664095/(o+1.)+(-0.360536599456)+(-0.562137785905)*0.5**o
            arg[(2, 2, 2)]=0.531052056944*x[0]**o + (0.103069816755)*x[0] + (-0.283311662714)*x[1]**o + (0.924465516198)*x[1]
            ref[(2, 2, 2)]=-0.283311662714/(o+1.)+(0.513767666476)+(0.531052056944)*0.5**o
            arg[(2, 3, 0)]=0.613419213744*x[0]**o + (0.791824669495)*x[0] + (0.42837340202)*x[1]**o + (0.319749937661)*x[1]
            ref[(2, 3, 0)]=0.42837340202/(o+1.)+(0.555787303578)+(0.613419213744)*0.5**o
            arg[(2, 3, 1)]=0.181146551002*x[0]**o + (-0.127970801455)*x[0] + (0.0249674768148)*x[1]**o + (-0.58253712601)*x[1]
            ref[(2, 3, 1)]=0.0249674768148/(o+1.)+(-0.355253963733)+(0.181146551002)*0.5**o
            arg[(2, 3, 2)]=0.447955979266*x[0]**o + (-0.297508375747)*x[0] + (0.893289478919)*x[1]**o + (-0.515213094167)*x[1]
            ref[(2, 3, 2)]=0.893289478919/(o+1.)+(-0.406360734957)+(0.447955979266)*0.5**o
            arg[(3, 0, 0)]=-0.288240708922*x[0]**o + (-0.933863602781)*x[0] + (0.677494025044)*x[1]**o + (0.132460954326)*x[1]
            ref[(3, 0, 0)]=0.677494025044/(o+1.)+(-0.400701324227)+(-0.288240708922)*0.5**o
            arg[(3, 0, 1)]=-0.991695797753*x[0]**o + (0.0461972989366)*x[0] + (0.626303773827)*x[1]**o + (0.564233310111)*x[1]
            ref[(3, 0, 1)]=0.626303773827/(o+1.)+(0.305215304524)+(-0.991695797753)*0.5**o
            arg[(3, 0, 2)]=0.985781106621*x[0]**o + (0.590300296746)*x[0] + (0.297933691594)*x[1]**o + (0.74324697457)*x[1]
            ref[(3, 0, 2)]=0.297933691594/(o+1.)+(0.666773635658)+(0.985781106621)*0.5**o
            arg[(3, 1, 0)]=-0.66488534897*x[0]**o + (0.384287393704)*x[0] + (-0.110593793411)*x[1]**o + (0.408123749208)*x[1]
            ref[(3, 1, 0)]=-0.110593793411/(o+1.)+(0.396205571456)+(-0.66488534897)*0.5**o
            arg[(3, 1, 1)]=0.473743889048*x[0]**o + (-0.360528866843)*x[0] + (-0.913797691723)*x[1]**o + (0.0812858946621)*x[1]
            ref[(3, 1, 1)]=-0.913797691723/(o+1.)+(-0.13962148609)+(0.473743889048)*0.5**o
            arg[(3, 1, 2)]=0.639653691133*x[0]**o + (-0.813082292611)*x[0] + (0.155212510879)*x[1]**o + (-0.966659844648)*x[1]
            ref[(3, 1, 2)]=0.155212510879/(o+1.)+(-0.889871068629)+(0.639653691133)*0.5**o
            arg[(3, 2, 0)]=-0.249425594573*x[0]**o + (-0.190680707041)*x[0] + (-0.537516049582)*x[1]**o + (0.526407082858)*x[1]
            ref[(3, 2, 0)]=-0.537516049582/(o+1.)+(0.167863187909)+(-0.249425594573)*0.5**o
            arg[(3, 2, 1)]=-0.577530292604*x[0]**o + (0.274719341172)*x[0] + (-0.483824053215)*x[1]**o + (-0.808583938578)*x[1]
            ref[(3, 2, 1)]=-0.483824053215/(o+1.)+(-0.266932298703)+(-0.577530292604)*0.5**o
            arg[(3, 2, 2)]=0.34060140509*x[0]**o + (0.177233449072)*x[0] + (0.874744557248)*x[1]**o + (-0.874910019878)*x[1]
            ref[(3, 2, 2)]=0.874744557248/(o+1.)+(-0.348838285403)+(0.34060140509)*0.5**o
            arg[(3, 3, 0)]=0.499585596483*x[0]**o + (0.487315910734)*x[0] + (-0.39944696765)*x[1]**o + (-0.569488614425)*x[1]
            ref[(3, 3, 0)]=-0.39944696765/(o+1.)+(-0.0410863518454)+(0.499585596483)*0.5**o
            arg[(3, 3, 1)]=0.328030067204*x[0]**o + (-0.0417841473964)*x[0] + (0.058514030653)*x[1]**o + (0.973670851194)*x[1]
            ref[(3, 3, 1)]=0.058514030653/(o+1.)+(0.465943351899)+(0.328030067204)*0.5**o
            arg[(3, 3, 2)]=-0.477107622363*x[0]**o + (0.571549144108)*x[0] + (0.0450546714414)*x[1]**o + (0.866510829889)*x[1]
            ref[(3, 3, 2)]=0.0450546714414/(o+1.)+(0.719029986998)+(-0.477107622363)*0.5**o
        else:
            arg[(0, 0, 0)]=-0.640230942145*x[0]**o + (-0.161482376891)*x[0] + (-0.158416909611)*x[1]**o + (0.204097774934)*x[1] + (0.488340503844)*x[2]**o + (-0.631229786061)*x[2]
            ref[(0, 0, 0)]=0.329923594233/(o+1.)+(-0.294307194009)+(-0.640230942145)*0.5**o
            arg[(0, 0, 1)]=0.111299436857*x[0]**o + (-0.546009994745)*x[0] + (0.639093040376)*x[1]**o + (0.0642630349916)*x[1] + (0.67194271173)*x[2]**o + (0.189215614877)*x[2]
            ref[(0, 0, 1)]=1.31103575211/(o+1.)+(-0.146265672438)+(0.111299436857)*0.5**o
            arg[(0, 0, 2)]=0.629250219962*x[0]**o + (-0.520979006746)*x[0] + (0.638988973892)*x[1]**o + (-0.715276907192)*x[1] + (-0.00748324455411)*x[2]**o + (0.171986383661)*x[2]
            ref[(0, 0, 2)]=0.631505729338/(o+1.)+(-0.532134765138)+(0.629250219962)*0.5**o
            arg[(0, 1, 0)]=0.59179974284*x[0]**o + (-0.371614928968)*x[0] + (0.865377430336)*x[1]**o + (-0.00309264927097)*x[1] + (-0.612521069701)*x[2]**o + (-0.0725628648953)*x[2]
            ref[(0, 1, 0)]=0.252856360635/(o+1.)+(-0.223635221567)+(0.59179974284)*0.5**o
            arg[(0, 1, 1)]=0.746988335514*x[0]**o + (-0.0555003453428)*x[0] + (-0.362832206059)*x[1]**o + (0.998557946895)*x[1] + (-0.390249376323)*x[2]**o + (0.770035524065)*x[2]
            ref[(0, 1, 1)]=-0.753081582382/(o+1.)+(0.856546562808)+(0.746988335514)*0.5**o
            arg[(0, 1, 2)]=-0.876062859698*x[0]**o + (-0.749470728796)*x[0] + (-0.0606804708763)*x[1]**o + (-0.583564104014)*x[1] + (-0.388410957749)*x[2]**o + (-0.650202652807)*x[2]
            ref[(0, 1, 2)]=-0.449091428625/(o+1.)+(-0.991618742808)+(-0.876062859698)*0.5**o
            arg[(0, 2, 0)]=0.737522678803*x[0]**o + (0.0303457697281)*x[0] + (0.725318486862)*x[1]**o + (0.13294204934)*x[1] + (0.345590494164)*x[2]**o + (-0.407387636076)*x[2]
            ref[(0, 2, 0)]=1.07090898103/(o+1.)+(-0.122049908504)+(0.737522678803)*0.5**o
            arg[(0, 2, 1)]=-0.789220956521*x[0]**o + (-0.802418961042)*x[0] + (-0.151084067756)*x[1]**o + (0.726969355739)*x[1] + (0.590500961301)*x[2]**o + (0.652241124114)*x[2]
            ref[(0, 2, 1)]=0.439416893546/(o+1.)+(0.288395759405)+(-0.789220956521)*0.5**o
            arg[(0, 2, 2)]=-0.742027552038*x[0]**o + (0.70116304054)*x[0] + (0.940425805059)*x[1]**o + (-0.585102419159)*x[1] + (0.729365340751)*x[2]**o + (-0.959107486455)*x[2]
            ref[(0, 2, 2)]=1.66979114581/(o+1.)+(-0.421523432536)+(-0.742027552038)*0.5**o
            arg[(0, 3, 0)]=0.679221820607*x[0]**o + (0.441386568034)*x[0] + (-0.132817392024)*x[1]**o + (0.127936123131)*x[1] + (0.803784457138)*x[2]**o + (0.978495513884)*x[2]
            ref[(0, 3, 0)]=0.670967065114/(o+1.)+(0.773909102525)+(0.679221820607)*0.5**o
            arg[(0, 3, 1)]=0.917948774778*x[0]**o + (0.662603704362)*x[0] + (-0.219257255129)*x[1]**o + (0.548534642699)*x[1] + (-0.0806920989103)*x[2]**o + (0.82112793054)*x[2]
            ref[(0, 3, 1)]=-0.29994935404/(o+1.)+(1.0161331388)+(0.917948774778)*0.5**o
            arg[(0, 3, 2)]=-0.264252581379*x[0]**o + (-0.377487336566)*x[0] + (0.437605843144)*x[1]**o + (0.446597197486)*x[1] + (0.731727047294)*x[2]**o + (0.518513731934)*x[2]
            ref[(0, 3, 2)]=1.16933289044/(o+1.)+(0.293811796427)+(-0.264252581379)*0.5**o
            arg[(1, 0, 0)]=-0.673019000885*x[0]**o + (0.899411807911)*x[0] + (-0.688665127576)*x[1]**o + (0.519889486823)*x[1] + (0.535313061869)*x[2]**o + (0.736894541656)*x[2]
            ref[(1, 0, 0)]=-0.153352065707/(o+1.)+(1.0780979182)+(-0.673019000885)*0.5**o
            arg[(1, 0, 1)]=-0.264021163038*x[0]**o + (-0.722411873021)*x[0] + (0.170794079158)*x[1]**o + (-0.0262597035285)*x[1] + (-0.360941164545)*x[2]**o + (-0.950346577614)*x[2]
            ref[(1, 0, 1)]=-0.190147085387/(o+1.)+(-0.849509077082)+(-0.264021163038)*0.5**o
            arg[(1, 0, 2)]=-0.882323775882*x[0]**o + (-0.247118313339)*x[0] + (0.12218331277)*x[1]**o + (-0.0732832930594)*x[1] + (-0.854928432282)*x[2]**o + (0.196854510602)*x[2]
            ref[(1, 0, 2)]=-0.732745119512/(o+1.)+(-0.0617735478985)+(-0.882323775882)*0.5**o
            arg[(1, 1, 0)]=0.479776058463*x[0]**o + (0.909862004387)*x[0] + (-0.159192789963)*x[1]**o + (0.224109652925)*x[1] + (0.341463195558)*x[2]**o + (-0.627605655976)*x[2]
            ref[(1, 1, 0)]=0.182270405595/(o+1.)+(0.253183000668)+(0.479776058463)*0.5**o
            arg[(1, 1, 1)]=0.0718508184708*x[0]**o + (0.732574498667)*x[0] + (-0.881977107257)*x[1]**o + (-0.217351503698)*x[1] + (-0.806291528322)*x[2]**o + (0.206058236029)*x[2]
            ref[(1, 1, 1)]=-1.68826863558/(o+1.)+(0.360640615499)+(0.0718508184708)*0.5**o
            arg[(1, 1, 2)]=-0.290686787102*x[0]**o + (0.00456364502321)*x[0] + (-0.426050531037)*x[1]**o + (-0.96880609938)*x[1] + (0.324674362882)*x[2]**o + (0.0868245723301)*x[2]
            ref[(1, 1, 2)]=-0.101376168155/(o+1.)+(-0.438708941013)+(-0.290686787102)*0.5**o
            arg[(1, 2, 0)]=-0.766747754872*x[0]**o + (0.897749276945)*x[0] + (0.928517544821)*x[1]**o + (-0.551127126107)*x[1] + (-0.66454516445)*x[2]**o + (0.190908329617)*x[2]
            ref[(1, 2, 0)]=0.263972380371/(o+1.)+(0.268765240227)+(-0.766747754872)*0.5**o
            arg[(1, 2, 1)]=0.360874618404*x[0]**o + (0.489571752228)*x[0] + (-0.99115243483)*x[1]**o + (0.921952756602)*x[1] + (-0.560350852683)*x[2]**o + (0.719444890789)*x[2]
            ref[(1, 2, 1)]=-1.55150328751/(o+1.)+(1.06548469981)+(0.360874618404)*0.5**o
            arg[(1, 2, 2)]=0.648209320736*x[0]**o + (-0.0392705840753)*x[0] + (0.690677539415)*x[1]**o + (-0.0636098840441)*x[1] + (0.188228634528)*x[2]**o + (0.027466683572)*x[2]
            ref[(1, 2, 2)]=0.878906173942/(o+1.)+(-0.0377068922737)+(0.648209320736)*0.5**o
            arg[(1, 3, 0)]=0.975832029501*x[0]**o + (-0.428280287387)*x[0] + (-0.735743525075)*x[1]**o + (-0.304789978676)*x[1] + (0.939963230427)*x[2]**o + (0.980796556084)*x[2]
            ref[(1, 3, 0)]=0.204219705352/(o+1.)+(0.123863145011)+(0.975832029501)*0.5**o
            arg[(1, 3, 1)]=-0.0574692195577*x[0]**o + (-0.227778213599)*x[0] + (-0.838286608674)*x[1]**o + (0.233419202318)*x[1] + (0.745081379416)*x[2]**o + (-0.879838432309)*x[2]
            ref[(1, 3, 1)]=-0.0932052292575/(o+1.)+(-0.437098721795)+(-0.0574692195577)*0.5**o
            arg[(1, 3, 2)]=0.961894605453*x[0]**o + (0.947996676234)*x[0] + (-0.323253735913)*x[1]**o + (-0.479984926641)*x[1] + (-0.523183362414)*x[2]**o + (0.776837209665)*x[2]
            ref[(1, 3, 2)]=-0.846437098327/(o+1.)+(0.622424479629)+(0.961894605453)*0.5**o
            arg[(2, 0, 0)]=-0.327134731301*x[0]**o + (0.584705331383)*x[0] + (-0.896852686645)*x[1]**o + (0.378835932171)*x[1] + (-0.116992124597)*x[2]**o + (-0.761036662669)*x[2]
            ref[(2, 0, 0)]=-1.01384481124/(o+1.)+(0.101252300442)+(-0.327134731301)*0.5**o
            arg[(2, 0, 1)]=-0.322064439722*x[0]**o + (-0.241318409895)*x[0] + (0.539878913294)*x[1]**o + (0.891461263985)*x[1] + (-0.53545796806)*x[2]**o + (-0.531303445519)*x[2]
            ref[(2, 0, 1)]=0.0044209452338/(o+1.)+(0.0594197042852)+(-0.322064439722)*0.5**o
            arg[(2, 0, 2)]=0.439430003992*x[0]**o + (-0.99351826267)*x[0] + (-0.568669494116)*x[1]**o + (-0.805126174959)*x[1] + (-0.85648722858)*x[2]**o + (-0.653509823304)*x[2]
            ref[(2, 0, 2)]=-1.4251567227/(o+1.)+(-1.22607713047)+(0.439430003992)*0.5**o
            arg[(2, 1, 0)]=-0.198334327601*x[0]**o + (-0.503086581697)*x[0] + (-0.0311542316122)*x[1]**o + (-0.837414622451)*x[1] + (0.298750828084)*x[2]**o + (0.456641959773)*x[2]
            ref[(2, 1, 0)]=0.267596596472/(o+1.)+(-0.441929622188)+(-0.198334327601)*0.5**o
            arg[(2, 1, 1)]=-0.953922683612*x[0]**o + (-0.995229219988)*x[0] + (0.356716058597)*x[1]**o + (-0.440809398864)*x[1] + (0.306978659723)*x[2]**o + (0.838667647064)*x[2]
            ref[(2, 1, 1)]=0.66369471832/(o+1.)+(-0.298685485894)+(-0.953922683612)*0.5**o
            arg[(2, 1, 2)]=-0.570048290911*x[0]**o + (0.39529853425)*x[0] + (0.593247725604)*x[1]**o + (0.429463492586)*x[1] + (0.21275754095)*x[2]**o + (0.352686507089)*x[2]
            ref[(2, 1, 2)]=0.806005266554/(o+1.)+(0.588724266962)+(-0.570048290911)*0.5**o
            arg[(2, 2, 0)]=-0.56362144564*x[0]**o + (0.765459049791)*x[0] + (-0.93063983793)*x[1]**o + (-0.106801158743)*x[1] + (-0.0441919625055)*x[2]**o + (-0.346716141436)*x[2]
            ref[(2, 2, 0)]=-0.974831800435/(o+1.)+(0.155970874806)+(-0.56362144564)*0.5**o
            arg[(2, 2, 1)]=0.898771272606*x[0]**o + (-0.684471805185)*x[0] + (0.174117034143)*x[1]**o + (0.44416090525)*x[1] + (0.700939910275)*x[2]**o + (-0.0259361505504)*x[2]
            ref[(2, 2, 1)]=0.875056944418/(o+1.)+(-0.133123525243)+(0.898771272606)*0.5**o
            arg[(2, 2, 2)]=0.00235961989701*x[0]**o + (0.392050486198)*x[0] + (0.677280993685)*x[1]**o + (0.00337835380297)*x[1] + (-0.599167016157)*x[2]**o + (0.206393328981)*x[2]
            ref[(2, 2, 2)]=0.0781139775284/(o+1.)+(0.300911084491)+(0.00235961989701)*0.5**o
            arg[(2, 3, 0)]=0.908373233434*x[0]**o + (-0.248176458028)*x[0] + (0.473921654975)*x[1]**o + (-0.0693340323088)*x[1] + (0.934723841968)*x[2]**o + (0.191210917663)*x[2]
            ref[(2, 3, 0)]=1.40864549694/(o+1.)+(-0.063149786337)+(0.908373233434)*0.5**o
            arg[(2, 3, 1)]=0.795950419411*x[0]**o + (-0.272940358831)*x[0] + (-0.206834687723)*x[1]**o + (-0.0821042023774)*x[1] + (-0.672585247566)*x[2]**o + (-0.351017241381)*x[2]
            ref[(2, 3, 1)]=-0.879419935289/(o+1.)+(-0.353030901294)+(0.795950419411)*0.5**o
            arg[(2, 3, 2)]=-0.348329768798*x[0]**o + (-0.805648258093)*x[0] + (-0.3460870789)*x[1]**o + (0.237528686533)*x[1] + (-0.14188269723)*x[2]**o + (-0.47518315445)*x[2]
            ref[(2, 3, 2)]=-0.487969776131/(o+1.)+(-0.521651363005)+(-0.348329768798)*0.5**o
            arg[(3, 0, 0)]=-0.66014561054*x[0]**o + (-0.945287850848)*x[0] + (0.59365582586)*x[1]**o + (0.826607053282)*x[1] + (0.772706834809)*x[2]**o + (0.30526099079)*x[2]
            ref[(3, 0, 0)]=1.36636266067/(o+1.)+(0.0932900966121)+(-0.66014561054)*0.5**o
            arg[(3, 0, 1)]=0.441637055324*x[0]**o + (0.777088810199)*x[0] + (-0.558266399573)*x[1]**o + (-0.672088500243)*x[1] + (-0.92086495821)*x[2]**o + (0.92139378529)*x[2]
            ref[(3, 0, 1)]=-1.47913135778/(o+1.)+(0.513197047623)+(0.441637055324)*0.5**o
            arg[(3, 0, 2)]=0.288321730394*x[0]**o + (0.29178236425)*x[0] + (-0.0594206787205)*x[1]**o + (0.732102551329)*x[1] + (0.128870450533)*x[2]**o + (-0.584575400369)*x[2]
            ref[(3, 0, 2)]=0.0694497718128/(o+1.)+(0.219654757605)+(0.288321730394)*0.5**o
            arg[(3, 1, 0)]=-0.506737411684*x[0]**o + (0.850707308224)*x[0] + (0.113611037218)*x[1]**o + (-0.24735873102)*x[1] + (-0.417662747748)*x[2]**o + (-0.0753044041361)*x[2]
            ref[(3, 1, 0)]=-0.304051710529/(o+1.)+(0.264022086534)+(-0.506737411684)*0.5**o
            arg[(3, 1, 1)]=-0.689861675603*x[0]**o + (0.139077501708)*x[0] + (0.377797126734)*x[1]**o + (-0.0956408087731)*x[1] + (0.0267108804778)*x[2]**o + (-0.528221645473)*x[2]
            ref[(3, 1, 1)]=0.404508007212/(o+1.)+(-0.242392476269)+(-0.689861675603)*0.5**o
            arg[(3, 1, 2)]=-0.490316888929*x[0]**o + (0.324535142265)*x[0] + (0.646814176154)*x[1]**o + (-0.148117873549)*x[1] + (-0.997672370085)*x[2]**o + (0.713643138085)*x[2]
            ref[(3, 1, 2)]=-0.35085819393/(o+1.)+(0.4450302034)+(-0.490316888929)*0.5**o
            arg[(3, 2, 0)]=0.116125771861*x[0]**o + (0.579229952186)*x[0] + (0.765659450523)*x[1]**o + (-0.794170800199)*x[1] + (-0.241307779829)*x[2]**o + (0.524502430175)*x[2]
            ref[(3, 2, 0)]=0.524351670694/(o+1.)+(0.154780791081)+(0.116125771861)*0.5**o
            arg[(3, 2, 1)]=0.714267175582*x[0]**o + (-0.853072939432)*x[0] + (0.376318300647)*x[1]**o + (0.967397011805)*x[1] + (0.920353073169)*x[2]**o + (0.897113286653)*x[2]
            ref[(3, 2, 1)]=1.29667137382/(o+1.)+(0.505718679513)+(0.714267175582)*0.5**o
            arg[(3, 2, 2)]=0.889176879959*x[0]**o + (-0.642284729861)*x[0] + (-0.435368770678)*x[1]**o + (-0.267824368112)*x[1] + (-0.557399712345)*x[2]**o + (0.427436958372)*x[2]
            ref[(3, 2, 2)]=-0.992768483023/(o+1.)+(-0.2413360698)+(0.889176879959)*0.5**o
            arg[(3, 3, 0)]=-0.162475641619*x[0]**o + (-0.260982831527)*x[0] + (0.448692683627)*x[1]**o + (-0.517378130421)*x[1] + (0.230057486066)*x[2]**o + (-0.230885820269)*x[2]
            ref[(3, 3, 0)]=0.678750169693/(o+1.)+(-0.504623391108)+(-0.162475641619)*0.5**o
            arg[(3, 3, 1)]=-0.238543487647*x[0]**o + (-0.056372715283)*x[0] + (0.824844997368)*x[1]**o + (-0.76667876344)*x[1] + (0.299046731489)*x[2]**o + (-0.283914320072)*x[2]
            ref[(3, 3, 1)]=1.12389172886/(o+1.)+(-0.553482899397)+(-0.238543487647)*0.5**o
            arg[(3, 3, 2)]=-0.220491521505*x[0]**o + (0.52326972978)*x[0] + (0.934499284892)*x[1]**o + (-0.916726823373)*x[1] + (-0.416780789594)*x[2]**o + (-0.961553791298)*x[2]
            ref[(3, 3, 2)]=0.517718495298/(o+1.)+(-0.677505442445)+(-0.220491521505)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactZero_fromData_ReducedFunctionOnContactZero_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactZero

        assumptions: ReducedFunctionOnContactZero(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactZero
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactZero(self.domain)
        w = ReducedFunctionOnContactZero(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 2, 4),w)
        ref=numpy.zeros((2, 3, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.596991098495*x[0]**o + (0.444180547391)*x[0] + (0.7778533256)*x[1]**o + (0.253511266131)*x[1]
            ref[(0, 0, 0, 0)]=0.7778533256/(o+1.)+(0.348845906761)+(0.596991098495)*0.5**o
            arg[(0, 0, 0, 1)]=-0.317658681674*x[0]**o + (-0.217571504171)*x[0] + (-0.562805278456)*x[1]**o + (-0.564381947932)*x[1]
            ref[(0, 0, 0, 1)]=-0.562805278456/(o+1.)+(-0.390976726052)+(-0.317658681674)*0.5**o
            arg[(0, 0, 0, 2)]=0.805393364876*x[0]**o + (0.359240484917)*x[0] + (0.476060448712)*x[1]**o + (0.562108286576)*x[1]
            ref[(0, 0, 0, 2)]=0.476060448712/(o+1.)+(0.460674385746)+(0.805393364876)*0.5**o
            arg[(0, 0, 0, 3)]=0.964210046528*x[0]**o + (0.46917450897)*x[0] + (-0.71989618565)*x[1]**o + (0.642830835494)*x[1]
            ref[(0, 0, 0, 3)]=-0.71989618565/(o+1.)+(0.556002672232)+(0.964210046528)*0.5**o
            arg[(0, 0, 1, 0)]=0.0298888520477*x[0]**o + (-0.0918970840683)*x[0] + (-0.465534033331)*x[1]**o + (-0.984524727144)*x[1]
            ref[(0, 0, 1, 0)]=-0.465534033331/(o+1.)+(-0.538210905606)+(0.0298888520477)*0.5**o
            arg[(0, 0, 1, 1)]=-0.334641714936*x[0]**o + (-0.450759971733)*x[0] + (0.73240315566)*x[1]**o + (0.289110450984)*x[1]
            ref[(0, 0, 1, 1)]=0.73240315566/(o+1.)+(-0.0808247603741)+(-0.334641714936)*0.5**o
            arg[(0, 0, 1, 2)]=0.105526141783*x[0]**o + (0.0630496112171)*x[0] + (0.363094475495)*x[1]**o + (-0.407898901892)*x[1]
            ref[(0, 0, 1, 2)]=0.363094475495/(o+1.)+(-0.172424645337)+(0.105526141783)*0.5**o
            arg[(0, 0, 1, 3)]=0.618704367071*x[0]**o + (-0.618517148567)*x[0] + (-0.0566446473287)*x[1]**o + (-0.877604682726)*x[1]
            ref[(0, 0, 1, 3)]=-0.0566446473287/(o+1.)+(-0.748060915646)+(0.618704367071)*0.5**o
            arg[(0, 1, 0, 0)]=-0.859074878436*x[0]**o + (0.572286781817)*x[0] + (-0.0887593122025)*x[1]**o + (-0.0891256255191)*x[1]
            ref[(0, 1, 0, 0)]=-0.0887593122025/(o+1.)+(0.241580578149)+(-0.859074878436)*0.5**o
            arg[(0, 1, 0, 1)]=-0.72552617947*x[0]**o + (-0.255258464152)*x[0] + (0.803727166396)*x[1]**o + (0.601469648817)*x[1]
            ref[(0, 1, 0, 1)]=0.803727166396/(o+1.)+(0.173105592332)+(-0.72552617947)*0.5**o
            arg[(0, 1, 0, 2)]=0.684876345469*x[0]**o + (0.0977635316493)*x[0] + (-0.097934516726)*x[1]**o + (0.49147281429)*x[1]
            ref[(0, 1, 0, 2)]=-0.097934516726/(o+1.)+(0.29461817297)+(0.684876345469)*0.5**o
            arg[(0, 1, 0, 3)]=0.824939646744*x[0]**o + (-0.647741682257)*x[0] + (-0.846375996421)*x[1]**o + (-0.232619353821)*x[1]
            ref[(0, 1, 0, 3)]=-0.846375996421/(o+1.)+(-0.440180518039)+(0.824939646744)*0.5**o
            arg[(0, 1, 1, 0)]=-0.442704071791*x[0]**o + (0.0751521994174)*x[0] + (-0.511585412083)*x[1]**o + (-0.355900115268)*x[1]
            ref[(0, 1, 1, 0)]=-0.511585412083/(o+1.)+(-0.140373957925)+(-0.442704071791)*0.5**o
            arg[(0, 1, 1, 1)]=0.62239669644*x[0]**o + (-0.862082134556)*x[0] + (0.996489383)*x[1]**o + (-0.69292700816)*x[1]
            ref[(0, 1, 1, 1)]=0.996489383/(o+1.)+(-0.777504571358)+(0.62239669644)*0.5**o
            arg[(0, 1, 1, 2)]=0.733128035487*x[0]**o + (0.425918569506)*x[0] + (0.523765589223)*x[1]**o + (-0.358600068575)*x[1]
            ref[(0, 1, 1, 2)]=0.523765589223/(o+1.)+(0.0336592504658)+(0.733128035487)*0.5**o
            arg[(0, 1, 1, 3)]=-0.818887970798*x[0]**o + (-0.191151077219)*x[0] + (-0.66028219195)*x[1]**o + (-0.707669272048)*x[1]
            ref[(0, 1, 1, 3)]=-0.66028219195/(o+1.)+(-0.449410174634)+(-0.818887970798)*0.5**o
            arg[(0, 2, 0, 0)]=-0.941099882855*x[0]**o + (0.471835619725)*x[0] + (-0.602244678592)*x[1]**o + (-0.46725430908)*x[1]
            ref[(0, 2, 0, 0)]=-0.602244678592/(o+1.)+(0.00229065532239)+(-0.941099882855)*0.5**o
            arg[(0, 2, 0, 1)]=0.510000903879*x[0]**o + (-0.222515635727)*x[0] + (-0.589762805506)*x[1]**o + (0.0573956675904)*x[1]
            ref[(0, 2, 0, 1)]=-0.589762805506/(o+1.)+(-0.0825599840684)+(0.510000903879)*0.5**o
            arg[(0, 2, 0, 2)]=-0.759300712077*x[0]**o + (-0.630495351299)*x[0] + (0.823839843066)*x[1]**o + (0.0663165788288)*x[1]
            ref[(0, 2, 0, 2)]=0.823839843066/(o+1.)+(-0.282089386235)+(-0.759300712077)*0.5**o
            arg[(0, 2, 0, 3)]=0.11754669983*x[0]**o + (0.649372384615)*x[0] + (0.532503193316)*x[1]**o + (0.242791902861)*x[1]
            ref[(0, 2, 0, 3)]=0.532503193316/(o+1.)+(0.446082143738)+(0.11754669983)*0.5**o
            arg[(0, 2, 1, 0)]=-0.194167292104*x[0]**o + (-0.932199049097)*x[0] + (-0.137094959823)*x[1]**o + (-0.377708825525)*x[1]
            ref[(0, 2, 1, 0)]=-0.137094959823/(o+1.)+(-0.654953937311)+(-0.194167292104)*0.5**o
            arg[(0, 2, 1, 1)]=-0.734071321496*x[0]**o + (0.372926974707)*x[0] + (-0.675136305765)*x[1]**o + (-0.849253996777)*x[1]
            ref[(0, 2, 1, 1)]=-0.675136305765/(o+1.)+(-0.238163511035)+(-0.734071321496)*0.5**o
            arg[(0, 2, 1, 2)]=-0.206192081486*x[0]**o + (0.957983874913)*x[0] + (-0.119309184982)*x[1]**o + (0.775033283265)*x[1]
            ref[(0, 2, 1, 2)]=-0.119309184982/(o+1.)+(0.866508579089)+(-0.206192081486)*0.5**o
            arg[(0, 2, 1, 3)]=-0.929951428507*x[0]**o + (0.432108978355)*x[0] + (0.625289282475)*x[1]**o + (0.577169715557)*x[1]
            ref[(0, 2, 1, 3)]=0.625289282475/(o+1.)+(0.504639346956)+(-0.929951428507)*0.5**o
            arg[(1, 0, 0, 0)]=-0.481971406068*x[0]**o + (-0.198141637762)*x[0] + (0.862979021758)*x[1]**o + (0.358508687286)*x[1]
            ref[(1, 0, 0, 0)]=0.862979021758/(o+1.)+(0.080183524762)+(-0.481971406068)*0.5**o
            arg[(1, 0, 0, 1)]=0.157863671913*x[0]**o + (-0.619495151592)*x[0] + (0.786165913968)*x[1]**o + (-0.778990388963)*x[1]
            ref[(1, 0, 0, 1)]=0.786165913968/(o+1.)+(-0.699242770277)+(0.157863671913)*0.5**o
            arg[(1, 0, 0, 2)]=-0.374989210259*x[0]**o + (-0.445873851921)*x[0] + (-0.734692073313)*x[1]**o + (0.567438788148)*x[1]
            ref[(1, 0, 0, 2)]=-0.734692073313/(o+1.)+(0.0607824681135)+(-0.374989210259)*0.5**o
            arg[(1, 0, 0, 3)]=0.658671161602*x[0]**o + (-0.120267998062)*x[0] + (0.388195432365)*x[1]**o + (0.0862964775595)*x[1]
            ref[(1, 0, 0, 3)]=0.388195432365/(o+1.)+(-0.0169857602512)+(0.658671161602)*0.5**o
            arg[(1, 0, 1, 0)]=0.743971960056*x[0]**o + (0.873789605797)*x[0] + (0.30526146047)*x[1]**o + (-0.416854201932)*x[1]
            ref[(1, 0, 1, 0)]=0.30526146047/(o+1.)+(0.228467701933)+(0.743971960056)*0.5**o
            arg[(1, 0, 1, 1)]=0.994966045489*x[0]**o + (0.318933211694)*x[0] + (0.279491118379)*x[1]**o + (-0.457114141778)*x[1]
            ref[(1, 0, 1, 1)]=0.279491118379/(o+1.)+(-0.0690904650421)+(0.994966045489)*0.5**o
            arg[(1, 0, 1, 2)]=0.271804268733*x[0]**o + (0.424850558045)*x[0] + (-0.361630783247)*x[1]**o + (0.234825393932)*x[1]
            ref[(1, 0, 1, 2)]=-0.361630783247/(o+1.)+(0.329837975988)+(0.271804268733)*0.5**o
            arg[(1, 0, 1, 3)]=0.318639443279*x[0]**o + (0.194668333436)*x[0] + (0.36911982686)*x[1]**o + (0.411449329014)*x[1]
            ref[(1, 0, 1, 3)]=0.36911982686/(o+1.)+(0.303058831225)+(0.318639443279)*0.5**o
            arg[(1, 1, 0, 0)]=-0.584787058082*x[0]**o + (0.991320648406)*x[0] + (0.0816351522292)*x[1]**o + (0.620177402765)*x[1]
            ref[(1, 1, 0, 0)]=0.0816351522292/(o+1.)+(0.805749025585)+(-0.584787058082)*0.5**o
            arg[(1, 1, 0, 1)]=-0.0493577461933*x[0]**o + (-0.459221314818)*x[0] + (0.547031074532)*x[1]**o + (-0.284204742687)*x[1]
            ref[(1, 1, 0, 1)]=0.547031074532/(o+1.)+(-0.371713028753)+(-0.0493577461933)*0.5**o
            arg[(1, 1, 0, 2)]=0.391266959356*x[0]**o + (0.741088940626)*x[0] + (0.819891538612)*x[1]**o + (-0.141599061959)*x[1]
            ref[(1, 1, 0, 2)]=0.819891538612/(o+1.)+(0.299744939333)+(0.391266959356)*0.5**o
            arg[(1, 1, 0, 3)]=-0.386634849724*x[0]**o + (0.674147167959)*x[0] + (-0.887326369071)*x[1]**o + (-0.869453308986)*x[1]
            ref[(1, 1, 0, 3)]=-0.887326369071/(o+1.)+(-0.0976530705138)+(-0.386634849724)*0.5**o
            arg[(1, 1, 1, 0)]=-0.21610267495*x[0]**o + (-0.384570053127)*x[0] + (-0.25748851596)*x[1]**o + (-0.755030541702)*x[1]
            ref[(1, 1, 1, 0)]=-0.25748851596/(o+1.)+(-0.569800297414)+(-0.21610267495)*0.5**o
            arg[(1, 1, 1, 1)]=-0.75002632352*x[0]**o + (0.429652032713)*x[0] + (-0.426737134208)*x[1]**o + (-0.626913336367)*x[1]
            ref[(1, 1, 1, 1)]=-0.426737134208/(o+1.)+(-0.0986306518272)+(-0.75002632352)*0.5**o
            arg[(1, 1, 1, 2)]=0.314958886156*x[0]**o + (0.0826850985025)*x[0] + (-0.42504081831)*x[1]**o + (0.130108466543)*x[1]
            ref[(1, 1, 1, 2)]=-0.42504081831/(o+1.)+(0.106396782523)+(0.314958886156)*0.5**o
            arg[(1, 1, 1, 3)]=0.943772375889*x[0]**o + (0.42984364633)*x[0] + (0.0474061660284)*x[1]**o + (0.878606720621)*x[1]
            ref[(1, 1, 1, 3)]=0.0474061660284/(o+1.)+(0.654225183475)+(0.943772375889)*0.5**o
            arg[(1, 2, 0, 0)]=-0.611455014464*x[0]**o + (0.904439447534)*x[0] + (0.693695873458)*x[1]**o + (-0.891756078444)*x[1]
            ref[(1, 2, 0, 0)]=0.693695873458/(o+1.)+(0.0063416845448)+(-0.611455014464)*0.5**o
            arg[(1, 2, 0, 1)]=-0.815896760207*x[0]**o + (-0.298057007888)*x[0] + (-0.00151882498258)*x[1]**o + (0.0953562511809)*x[1]
            ref[(1, 2, 0, 1)]=-0.00151882498258/(o+1.)+(-0.101350378354)+(-0.815896760207)*0.5**o
            arg[(1, 2, 0, 2)]=0.728229564385*x[0]**o + (0.736417761089)*x[0] + (0.386548625414)*x[1]**o + (-0.440395854103)*x[1]
            ref[(1, 2, 0, 2)]=0.386548625414/(o+1.)+(0.148010953493)+(0.728229564385)*0.5**o
            arg[(1, 2, 0, 3)]=-0.0138479651679*x[0]**o + (-0.544000672544)*x[0] + (0.201806557286)*x[1]**o + (-0.573990173032)*x[1]
            ref[(1, 2, 0, 3)]=0.201806557286/(o+1.)+(-0.558995422788)+(-0.0138479651679)*0.5**o
            arg[(1, 2, 1, 0)]=-0.851254141894*x[0]**o + (0.803336171417)*x[0] + (-0.271589515007)*x[1]**o + (-0.168670560841)*x[1]
            ref[(1, 2, 1, 0)]=-0.271589515007/(o+1.)+(0.317332805288)+(-0.851254141894)*0.5**o
            arg[(1, 2, 1, 1)]=-0.677767611576*x[0]**o + (0.390990346878)*x[0] + (-0.430078701234)*x[1]**o + (-0.625114704942)*x[1]
            ref[(1, 2, 1, 1)]=-0.430078701234/(o+1.)+(-0.117062179032)+(-0.677767611576)*0.5**o
            arg[(1, 2, 1, 2)]=-0.940211208088*x[0]**o + (0.960865961306)*x[0] + (0.709593206775)*x[1]**o + (0.640243617269)*x[1]
            ref[(1, 2, 1, 2)]=0.709593206775/(o+1.)+(0.800554789287)+(-0.940211208088)*0.5**o
            arg[(1, 2, 1, 3)]=-0.671771275323*x[0]**o + (-0.148076630391)*x[0] + (-0.397425429334)*x[1]**o + (0.253572195739)*x[1]
            ref[(1, 2, 1, 3)]=-0.397425429334/(o+1.)+(0.0527477826744)+(-0.671771275323)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.288451433966*x[0]**o + (0.0608824941404)*x[0] + (0.336430114451)*x[1]**o + (0.886553013968)*x[1] + (-0.15335670002)*x[2]**o + (0.226514306294)*x[2]
            ref[(0, 0, 0, 0)]=0.183073414431/(o+1.)+(0.586974907201)+(-0.288451433966)*0.5**o
            arg[(0, 0, 0, 1)]=-0.948164341467*x[0]**o + (0.470146196161)*x[0] + (-0.73276743353)*x[1]**o + (-0.710517224371)*x[1] + (-0.959351096932)*x[2]**o + (-0.0301530591254)*x[2]
            ref[(0, 0, 0, 1)]=-1.69211853046/(o+1.)+(-0.135262043668)+(-0.948164341467)*0.5**o
            arg[(0, 0, 0, 2)]=-0.670877963045*x[0]**o + (-0.405550166701)*x[0] + (-0.303093127084)*x[1]**o + (-0.928163202443)*x[1] + (-0.0983968835672)*x[2]**o + (-0.632517539444)*x[2]
            ref[(0, 0, 0, 2)]=-0.401490010651/(o+1.)+(-0.983115454294)+(-0.670877963045)*0.5**o
            arg[(0, 0, 0, 3)]=-0.108185041559*x[0]**o + (0.879599692516)*x[0] + (-0.834258413058)*x[1]**o + (-0.953266969741)*x[1] + (-0.447308533892)*x[2]**o + (0.645423558497)*x[2]
            ref[(0, 0, 0, 3)]=-1.28156694695/(o+1.)+(0.285878140636)+(-0.108185041559)*0.5**o
            arg[(0, 0, 1, 0)]=0.944084559261*x[0]**o + (-0.380705653796)*x[0] + (0.214401818358)*x[1]**o + (0.513400540734)*x[1] + (-0.628202892217)*x[2]**o + (0.363784284913)*x[2]
            ref[(0, 0, 1, 0)]=-0.413801073859/(o+1.)+(0.248239585926)+(0.944084559261)*0.5**o
            arg[(0, 0, 1, 1)]=0.561008147037*x[0]**o + (0.621946234585)*x[0] + (0.233315864098)*x[1]**o + (0.161745935612)*x[1] + (0.283354548146)*x[2]**o + (0.704816671546)*x[2]
            ref[(0, 0, 1, 1)]=0.516670412244/(o+1.)+(0.744254420872)+(0.561008147037)*0.5**o
            arg[(0, 0, 1, 2)]=-0.892940712364*x[0]**o + (-0.846491526364)*x[0] + (-0.353594051632)*x[1]**o + (-0.10360608723)*x[1] + (-0.678371449037)*x[2]**o + (-0.176134046782)*x[2]
            ref[(0, 0, 1, 2)]=-1.03196550067/(o+1.)+(-0.563115830188)+(-0.892940712364)*0.5**o
            arg[(0, 0, 1, 3)]=0.865675619117*x[0]**o + (-0.313506065124)*x[0] + (0.695321089583)*x[1]**o + (0.612787445391)*x[1] + (-0.699317779031)*x[2]**o + (-0.0185119211761)*x[2]
            ref[(0, 0, 1, 3)]=-0.0039966894476/(o+1.)+(0.140384729545)+(0.865675619117)*0.5**o
            arg[(0, 1, 0, 0)]=0.85878702066*x[0]**o + (-0.977783864401)*x[0] + (-0.829999671689)*x[1]**o + (-0.175259919598)*x[1] + (0.721836687713)*x[2]**o + (0.342237622267)*x[2]
            ref[(0, 1, 0, 0)]=-0.108162983976/(o+1.)+(-0.405403080866)+(0.85878702066)*0.5**o
            arg[(0, 1, 0, 1)]=-0.00753384208176*x[0]**o + (-0.324770128274)*x[0] + (-0.547679237712)*x[1]**o + (-0.782903490279)*x[1] + (-0.348305575261)*x[2]**o + (-0.221727012175)*x[2]
            ref[(0, 1, 0, 1)]=-0.895984812973/(o+1.)+(-0.664700315364)+(-0.00753384208176)*0.5**o
            arg[(0, 1, 0, 2)]=0.408214709693*x[0]**o + (0.85099389149)*x[0] + (-0.515280414092)*x[1]**o + (-0.094926192415)*x[1] + (0.175208626563)*x[2]**o + (-0.362129285198)*x[2]
            ref[(0, 1, 0, 2)]=-0.340071787529/(o+1.)+(0.196969206939)+(0.408214709693)*0.5**o
            arg[(0, 1, 0, 3)]=0.621113867827*x[0]**o + (0.436195061815)*x[0] + (-0.462004471612)*x[1]**o + (-0.285423989241)*x[1] + (0.0353658745462)*x[2]**o + (-0.698422506279)*x[2]
            ref[(0, 1, 0, 3)]=-0.426638597066/(o+1.)+(-0.273825716853)+(0.621113867827)*0.5**o
            arg[(0, 1, 1, 0)]=0.844649299704*x[0]**o + (-0.150923809666)*x[0] + (-0.0818989097435)*x[1]**o + (0.944930416634)*x[1] + (0.267420661371)*x[2]**o + (0.474101760107)*x[2]
            ref[(0, 1, 1, 0)]=0.185521751627/(o+1.)+(0.634054183537)+(0.844649299704)*0.5**o
            arg[(0, 1, 1, 1)]=0.81717557431*x[0]**o + (0.566068529028)*x[0] + (-0.312591603053)*x[1]**o + (-0.241591961055)*x[1] + (-0.821808780929)*x[2]**o + (-0.464246898583)*x[2]
            ref[(0, 1, 1, 1)]=-1.13440038398/(o+1.)+(-0.0698851653048)+(0.81717557431)*0.5**o
            arg[(0, 1, 1, 2)]=0.450415418301*x[0]**o + (-0.136676863967)*x[0] + (0.520870467899)*x[1]**o + (0.866084081102)*x[1] + (0.0729344269954)*x[2]**o + (-0.157330225989)*x[2]
            ref[(0, 1, 1, 2)]=0.593804894894/(o+1.)+(0.286038495573)+(0.450415418301)*0.5**o
            arg[(0, 1, 1, 3)]=0.000695218877347*x[0]**o + (-0.326876414161)*x[0] + (-0.988141159572)*x[1]**o + (-0.291214862609)*x[1] + (0.0250712097874)*x[2]**o + (-0.47334530987)*x[2]
            ref[(0, 1, 1, 3)]=-0.963069949785/(o+1.)+(-0.54571829332)+(0.000695218877347)*0.5**o
            arg[(0, 2, 0, 0)]=0.669098509169*x[0]**o + (0.719629159702)*x[0] + (0.503961073726)*x[1]**o + (-0.133450972108)*x[1] + (0.751707024718)*x[2]**o + (0.7109443497)*x[2]
            ref[(0, 2, 0, 0)]=1.25566809844/(o+1.)+(0.648561268647)+(0.669098509169)*0.5**o
            arg[(0, 2, 0, 1)]=0.312052994839*x[0]**o + (0.166905969397)*x[0] + (0.598669737224)*x[1]**o + (-0.572284153015)*x[1] + (-0.776450062066)*x[2]**o + (-0.0244748171307)*x[2]
            ref[(0, 2, 0, 1)]=-0.177780324842/(o+1.)+(-0.214926500375)+(0.312052994839)*0.5**o
            arg[(0, 2, 0, 2)]=0.172516507149*x[0]**o + (-0.773542833563)*x[0] + (-0.271636768025)*x[1]**o + (-0.769358263269)*x[1] + (0.89311331465)*x[2]**o + (-0.967616422361)*x[2]
            ref[(0, 2, 0, 2)]=0.621476546625/(o+1.)+(-1.2552587596)+(0.172516507149)*0.5**o
            arg[(0, 2, 0, 3)]=-0.821954431025*x[0]**o + (-0.925293992307)*x[0] + (0.13886158514)*x[1]**o + (-0.0646513713446)*x[1] + (-0.687433646917)*x[2]**o + (0.438860351554)*x[2]
            ref[(0, 2, 0, 3)]=-0.548572061777/(o+1.)+(-0.275542506049)+(-0.821954431025)*0.5**o
            arg[(0, 2, 1, 0)]=0.273081811721*x[0]**o + (-0.582932683025)*x[0] + (-0.247986894232)*x[1]**o + (-0.19409033879)*x[1] + (-0.042443259579)*x[2]**o + (-0.898467944551)*x[2]
            ref[(0, 2, 1, 0)]=-0.290430153811/(o+1.)+(-0.837745483182)+(0.273081811721)*0.5**o
            arg[(0, 2, 1, 1)]=-0.457510684223*x[0]**o + (0.775199443775)*x[0] + (0.565867712272)*x[1]**o + (-0.456650609081)*x[1] + (0.218363938872)*x[2]**o + (-0.0457564252776)*x[2]
            ref[(0, 2, 1, 1)]=0.784231651144/(o+1.)+(0.136396204708)+(-0.457510684223)*0.5**o
            arg[(0, 2, 1, 2)]=-0.53990235192*x[0]**o + (0.148887884608)*x[0] + (0.030756623301)*x[1]**o + (0.259609551656)*x[1] + (0.388622285301)*x[2]**o + (0.878061810881)*x[2]
            ref[(0, 2, 1, 2)]=0.419378908602/(o+1.)+(0.643279623572)+(-0.53990235192)*0.5**o
            arg[(0, 2, 1, 3)]=0.587428805639*x[0]**o + (0.881442603168)*x[0] + (-0.604808390612)*x[1]**o + (0.549058260117)*x[1] + (-0.113340178336)*x[2]**o + (-0.571766478319)*x[2]
            ref[(0, 2, 1, 3)]=-0.718148568948/(o+1.)+(0.429367192483)+(0.587428805639)*0.5**o
            arg[(1, 0, 0, 0)]=-0.561777704229*x[0]**o + (-0.23264109192)*x[0] + (0.389115838687)*x[1]**o + (0.671075918499)*x[1] + (0.388006885496)*x[2]**o + (-0.587344569249)*x[2]
            ref[(1, 0, 0, 0)]=0.777122724183/(o+1.)+(-0.0744548713351)+(-0.561777704229)*0.5**o
            arg[(1, 0, 0, 1)]=-0.0646107951782*x[0]**o + (0.414224554974)*x[0] + (-0.977819291792)*x[1]**o + (0.862045402406)*x[1] + (0.553904608553)*x[2]**o + (-0.844864854089)*x[2]
            ref[(1, 0, 0, 1)]=-0.423914683238/(o+1.)+(0.215702551645)+(-0.0646107951782)*0.5**o
            arg[(1, 0, 0, 2)]=-0.760762941557*x[0]**o + (0.571508914111)*x[0] + (0.567539824724)*x[1]**o + (-0.234077566912)*x[1] + (-0.913562656648)*x[2]**o + (0.673438235471)*x[2]
            ref[(1, 0, 0, 2)]=-0.346022831923/(o+1.)+(0.505434791335)+(-0.760762941557)*0.5**o
            arg[(1, 0, 0, 3)]=-0.917930895984*x[0]**o + (0.603242822916)*x[0] + (-0.817100969664)*x[1]**o + (-0.10721352171)*x[1] + (-0.142031697177)*x[2]**o + (-0.291568483366)*x[2]
            ref[(1, 0, 0, 3)]=-0.959132666841/(o+1.)+(0.10223040892)+(-0.917930895984)*0.5**o
            arg[(1, 0, 1, 0)]=-0.819149075292*x[0]**o + (-0.77079239607)*x[0] + (-0.34998457958)*x[1]**o + (0.921095616496)*x[1] + (0.866294455956)*x[2]**o + (-0.68272540326)*x[2]
            ref[(1, 0, 1, 0)]=0.516309876376/(o+1.)+(-0.266211091417)+(-0.819149075292)*0.5**o
            arg[(1, 0, 1, 1)]=-0.0518007651367*x[0]**o + (-0.960207724604)*x[0] + (0.833599678577)*x[1]**o + (-0.655874860272)*x[1] + (-0.561148097288)*x[2]**o + (-0.818071503883)*x[2]
            ref[(1, 0, 1, 1)]=0.272451581289/(o+1.)+(-1.21707704438)+(-0.0518007651367)*0.5**o
            arg[(1, 0, 1, 2)]=-0.897353574298*x[0]**o + (0.0726498141043)*x[0] + (-0.82091795191)*x[1]**o + (0.10852183034)*x[1] + (-0.559442758389)*x[2]**o + (-0.537992047878)*x[2]
            ref[(1, 0, 1, 2)]=-1.3803607103/(o+1.)+(-0.178410201717)+(-0.897353574298)*0.5**o
            arg[(1, 0, 1, 3)]=0.697526496563*x[0]**o + (-0.973091758788)*x[0] + (0.981029318565)*x[1]**o + (-0.191582155021)*x[1] + (-0.762511072205)*x[2]**o + (0.687832151349)*x[2]
            ref[(1, 0, 1, 3)]=0.21851824636/(o+1.)+(-0.23842088123)+(0.697526496563)*0.5**o
            arg[(1, 1, 0, 0)]=-0.959852362272*x[0]**o + (-0.272233674104)*x[0] + (0.439261637264)*x[1]**o + (-0.578781244455)*x[1] + (0.561786964105)*x[2]**o + (0.845696008114)*x[2]
            ref[(1, 1, 0, 0)]=1.00104860137/(o+1.)+(-0.00265945522263)+(-0.959852362272)*0.5**o
            arg[(1, 1, 0, 1)]=0.140565991169*x[0]**o + (0.867813335953)*x[0] + (0.662229827564)*x[1]**o + (-0.255098698009)*x[1] + (0.799207617649)*x[2]**o + (-0.424607123504)*x[2]
            ref[(1, 1, 0, 1)]=1.46143744521/(o+1.)+(0.0940537572198)+(0.140565991169)*0.5**o
            arg[(1, 1, 0, 2)]=-0.608979654393*x[0]**o + (-0.271240798022)*x[0] + (-0.367728662573)*x[1]**o + (0.355598756326)*x[1] + (-0.732523728958)*x[2]**o + (-0.760934957046)*x[2]
            ref[(1, 1, 0, 2)]=-1.10025239153/(o+1.)+(-0.338288499371)+(-0.608979654393)*0.5**o
            arg[(1, 1, 0, 3)]=-0.638685131157*x[0]**o + (0.0195016117314)*x[0] + (0.865771675294)*x[1]**o + (0.481500565532)*x[1] + (0.697321920511)*x[2]**o + (0.853145443686)*x[2]
            ref[(1, 1, 0, 3)]=1.56309359581/(o+1.)+(0.677073810475)+(-0.638685131157)*0.5**o
            arg[(1, 1, 1, 0)]=0.573784415639*x[0]**o + (0.859325490588)*x[0] + (-0.299408979024)*x[1]**o + (0.584555866718)*x[1] + (-0.100037753712)*x[2]**o + (0.983932767165)*x[2]
            ref[(1, 1, 1, 0)]=-0.399446732736/(o+1.)+(1.21390706224)+(0.573784415639)*0.5**o
            arg[(1, 1, 1, 1)]=0.392219901489*x[0]**o + (-0.658038324931)*x[0] + (-0.627208717285)*x[1]**o + (0.658833384884)*x[1] + (0.609122033445)*x[2]**o + (-0.0157173153052)*x[2]
            ref[(1, 1, 1, 1)]=-0.0180866838392/(o+1.)+(-0.007461127676)+(0.392219901489)*0.5**o
            arg[(1, 1, 1, 2)]=-0.482982000881*x[0]**o + (-0.0625042174321)*x[0] + (-0.411499345491)*x[1]**o + (-0.811411716642)*x[1] + (-0.669307130611)*x[2]**o + (0.29485275227)*x[2]
            ref[(1, 1, 1, 2)]=-1.0808064761/(o+1.)+(-0.289531590902)+(-0.482982000881)*0.5**o
            arg[(1, 1, 1, 3)]=-0.63307144958*x[0]**o + (-0.780884076182)*x[0] + (0.295086719824)*x[1]**o + (-0.788818796393)*x[1] + (0.87269342964)*x[2]**o + (0.632477971606)*x[2]
            ref[(1, 1, 1, 3)]=1.16778014946/(o+1.)+(-0.468612450484)+(-0.63307144958)*0.5**o
            arg[(1, 2, 0, 0)]=-0.405573251763*x[0]**o + (0.329085045462)*x[0] + (-0.47904087447)*x[1]**o + (-0.263794228972)*x[1] + (0.323321495508)*x[2]**o + (-0.257643334991)*x[2]
            ref[(1, 2, 0, 0)]=-0.155719378962/(o+1.)+(-0.0961762592505)+(-0.405573251763)*0.5**o
            arg[(1, 2, 0, 1)]=-0.146314541589*x[0]**o + (0.502903593057)*x[0] + (0.209835499648)*x[1]**o + (-0.635882182907)*x[1] + (0.657328753805)*x[2]**o + (0.629516740406)*x[2]
            ref[(1, 2, 0, 1)]=0.867164253453/(o+1.)+(0.248269075278)+(-0.146314541589)*0.5**o
            arg[(1, 2, 0, 2)]=-0.534968882853*x[0]**o + (-0.654978788594)*x[0] + (0.538461651732)*x[1]**o + (0.39395366863)*x[1] + (0.759424226818)*x[2]**o + (0.745286877329)*x[2]
            ref[(1, 2, 0, 2)]=1.29788587855/(o+1.)+(0.242130878682)+(-0.534968882853)*0.5**o
            arg[(1, 2, 0, 3)]=0.865066788328*x[0]**o + (-0.674132498492)*x[0] + (0.0189908703856)*x[1]**o + (-0.579099732654)*x[1] + (-0.434466566266)*x[2]**o + (-0.220416993854)*x[2]
            ref[(1, 2, 0, 3)]=-0.41547569588/(o+1.)+(-0.7368246125)+(0.865066788328)*0.5**o
            arg[(1, 2, 1, 0)]=0.540321629479*x[0]**o + (0.755067260263)*x[0] + (-0.8990758562)*x[1]**o + (0.72337320167)*x[1] + (0.163222495319)*x[2]**o + (-0.00717430942706)*x[2]
            ref[(1, 2, 1, 0)]=-0.735853360882/(o+1.)+(0.735633076253)+(0.540321629479)*0.5**o
            arg[(1, 2, 1, 1)]=0.468353903039*x[0]**o + (-0.320034704082)*x[0] + (0.472312964645)*x[1]**o + (-0.712917810973)*x[1] + (-0.700651788425)*x[2]**o + (0.457286328162)*x[2]
            ref[(1, 2, 1, 1)]=-0.22833882378/(o+1.)+(-0.287833093447)+(0.468353903039)*0.5**o
            arg[(1, 2, 1, 2)]=0.865258673089*x[0]**o + (-0.684233665542)*x[0] + (0.754756715812)*x[1]**o + (0.780922924724)*x[1] + (0.795830392698)*x[2]**o + (0.472301438885)*x[2]
            ref[(1, 2, 1, 2)]=1.55058710851/(o+1.)+(0.284495349033)+(0.865258673089)*0.5**o
            arg[(1, 2, 1, 3)]=-0.301728673458*x[0]**o + (-0.522296105971)*x[0] + (-0.574403319573)*x[1]**o + (0.818935402726)*x[1] + (0.62743791645)*x[2]**o + (-0.038062599289)*x[2]
            ref[(1, 2, 1, 3)]=0.0530345968762/(o+1.)+(0.129288348733)+(-0.301728673458)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.0185254758084*x[0]**o + (0.267495890971)*x[0] + (0.647835996847)*x[1]**o + (0.402545457557)*x[1]
            ref=0.647835996847/(o+1.)+(0.335020674264)+(-0.0185254758084)*0.5**o
        else:
            arg=-0.15490142326*x[0]**o + (0.572910315908)*x[0] + (0.652386793385)*x[1]**o + (-0.40546900526)*x[1] + (-0.926012223434)*x[2]**o + (0.390240825512)*x[2]
            ref=-0.273625430048/(o+1.)+(0.278841068079)+(-0.15490142326)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.00908031682109*x[0]**o + (0.642992749522)*x[0] + (-0.312022169083)*x[1]**o + (0.889611790866)*x[1]
            ref[(0,)]=-0.312022169083/(o+1.)+(0.766302270194)+(0.00908031682109)*0.5**o
            arg[(1,)]=0.775508425731*x[0]**o + (-0.10686130303)*x[0] + (-0.478819413881)*x[1]**o + (0.489341131604)*x[1]
            ref[(1,)]=-0.478819413881/(o+1.)+(0.191239914287)+(0.775508425731)*0.5**o
        else:
            arg[(0,)]=0.299360951865*x[0]**o + (0.604512443754)*x[0] + (0.0620409550915)*x[1]**o + (-0.969860052169)*x[1] + (-0.721647144894)*x[2]**o + (-0.683996953222)*x[2]
            ref[(0,)]=-0.659606189802/(o+1.)+(-0.524672280818)+(0.299360951865)*0.5**o
            arg[(1,)]=0.299554861077*x[0]**o + (-0.231860801582)*x[0] + (0.653428455299)*x[1]**o + (-0.80923482887)*x[1] + (0.258397811909)*x[2]**o + (-0.414577517442)*x[2]
            ref[(1,)]=0.911826267208/(o+1.)+(-0.727836573947)+(0.299554861077)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.0241154865024*x[0]**o + (0.883500745813)*x[0] + (-0.381391154381)*x[1]**o + (-0.688270007118)*x[1]
            ref[(0, 0)]=-0.381391154381/(o+1.)+(0.0976153693477)+(0.0241154865024)*0.5**o
            arg[(0, 1)]=0.481571604524*x[0]**o + (-0.567367453526)*x[0] + (-0.64937355338)*x[1]**o + (-0.325881548621)*x[1]
            ref[(0, 1)]=-0.64937355338/(o+1.)+(-0.446624501074)+(0.481571604524)*0.5**o
            arg[(0, 2)]=0.199328169473*x[0]**o + (-0.814954821596)*x[0] + (0.280097672366)*x[1]**o + (-0.955014050038)*x[1]
            ref[(0, 2)]=0.280097672366/(o+1.)+(-0.884984435817)+(0.199328169473)*0.5**o
            arg[(0, 3)]=-0.625099031518*x[0]**o + (0.267657940975)*x[0] + (0.0718174865283)*x[1]**o + (-0.431029838631)*x[1]
            ref[(0, 3)]=0.0718174865283/(o+1.)+(-0.081685948828)+(-0.625099031518)*0.5**o
            arg[(1, 0)]=0.761345796068*x[0]**o + (0.0439586011626)*x[0] + (-0.621858885915)*x[1]**o + (-0.944391491856)*x[1]
            ref[(1, 0)]=-0.621858885915/(o+1.)+(-0.450216445347)+(0.761345796068)*0.5**o
            arg[(1, 1)]=-0.244577428856*x[0]**o + (0.960225580084)*x[0] + (-0.921783652774)*x[1]**o + (-0.683576101467)*x[1]
            ref[(1, 1)]=-0.921783652774/(o+1.)+(0.138324739308)+(-0.244577428856)*0.5**o
            arg[(1, 2)]=0.772698739574*x[0]**o + (-0.169018228617)*x[0] + (0.994734331309)*x[1]**o + (0.233013629018)*x[1]
            ref[(1, 2)]=0.994734331309/(o+1.)+(0.0319977002008)+(0.772698739574)*0.5**o
            arg[(1, 3)]=-0.494727906175*x[0]**o + (0.750131520268)*x[0] + (0.993967168952)*x[1]**o + (-0.414204609277)*x[1]
            ref[(1, 3)]=0.993967168952/(o+1.)+(0.167963455495)+(-0.494727906175)*0.5**o
            arg[(2, 0)]=-0.516083420731*x[0]**o + (-0.0667790062313)*x[0] + (0.662483706673)*x[1]**o + (-0.237098577816)*x[1]
            ref[(2, 0)]=0.662483706673/(o+1.)+(-0.151938792024)+(-0.516083420731)*0.5**o
            arg[(2, 1)]=0.329082613375*x[0]**o + (0.161357186353)*x[0] + (0.0381951904234)*x[1]**o + (-0.523961876963)*x[1]
            ref[(2, 1)]=0.0381951904234/(o+1.)+(-0.181302345305)+(0.329082613375)*0.5**o
            arg[(2, 2)]=0.405005862296*x[0]**o + (-0.258027028988)*x[0] + (0.2457769427)*x[1]**o + (0.128840361259)*x[1]
            ref[(2, 2)]=0.2457769427/(o+1.)+(-0.0645933338643)+(0.405005862296)*0.5**o
            arg[(2, 3)]=0.675127338551*x[0]**o + (0.101236881086)*x[0] + (0.00494817972341)*x[1]**o + (-0.572618919097)*x[1]
            ref[(2, 3)]=0.00494817972341/(o+1.)+(-0.235691019006)+(0.675127338551)*0.5**o
        else:
            arg[(0, 0)]=-0.980409610055*x[0]**o + (-0.5474172988)*x[0] + (-0.74120247649)*x[1]**o + (0.126427874627)*x[1] + (-0.451327646938)*x[2]**o + (0.595892374213)*x[2]
            ref[(0, 0)]=-1.19253012343/(o+1.)+(0.0874514750201)+(-0.980409610055)*0.5**o
            arg[(0, 1)]=0.414238021999*x[0]**o + (0.494678544254)*x[0] + (0.918935995818)*x[1]**o + (0.0694055747432)*x[1] + (-0.267822859131)*x[2]**o + (0.258820437783)*x[2]
            ref[(0, 1)]=0.651113136686/(o+1.)+(0.41145227839)+(0.414238021999)*0.5**o
            arg[(0, 2)]=0.178394781007*x[0]**o + (0.640719645607)*x[0] + (-0.416366010681)*x[1]**o + (-0.476284789828)*x[1] + (-0.227744978227)*x[2]**o + (-0.27506381658)*x[2]
            ref[(0, 2)]=-0.644110988908/(o+1.)+(-0.0553144804005)+(0.178394781007)*0.5**o
            arg[(0, 3)]=-0.327878484761*x[0]**o + (0.185569422621)*x[0] + (0.706172211734)*x[1]**o + (-0.741949578177)*x[1] + (0.592417369631)*x[2]**o + (-0.474424258985)*x[2]
            ref[(0, 3)]=1.29858958137/(o+1.)+(-0.515402207271)+(-0.327878484761)*0.5**o
            arg[(1, 0)]=-0.66204096609*x[0]**o + (0.656865464911)*x[0] + (-0.206308264539)*x[1]**o + (0.755093164545)*x[1] + (0.133677435338)*x[2]**o + (0.577700784765)*x[2]
            ref[(1, 0)]=-0.0726308292013/(o+1.)+(0.994829707111)+(-0.66204096609)*0.5**o
            arg[(1, 1)]=-0.625257409069*x[0]**o + (-0.832091607963)*x[0] + (0.270306928415)*x[1]**o + (0.975544942095)*x[1] + (0.271395605218)*x[2]**o + (-0.870682806062)*x[2]
            ref[(1, 1)]=0.541702533633/(o+1.)+(-0.363614735965)+(-0.625257409069)*0.5**o
            arg[(1, 2)]=-0.820779937316*x[0]**o + (0.349446657532)*x[0] + (-0.68476750742)*x[1]**o + (-0.510788694324)*x[1] + (0.0900704705685)*x[2]**o + (0.538940804101)*x[2]
            ref[(1, 2)]=-0.594697036851/(o+1.)+(0.188799383655)+(-0.820779937316)*0.5**o
            arg[(1, 3)]=-0.787352765194*x[0]**o + (-0.122737651512)*x[0] + (0.342093237346)*x[1]**o + (0.596308853945)*x[1] + (0.166773423662)*x[2]**o + (0.255156609935)*x[2]
            ref[(1, 3)]=0.508866661008/(o+1.)+(0.364363906184)+(-0.787352765194)*0.5**o
            arg[(2, 0)]=-0.400828410989*x[0]**o + (-0.876548185937)*x[0] + (0.541549431062)*x[1]**o + (0.558415082403)*x[1] + (-0.8835909781)*x[2]**o + (0.11419664766)*x[2]
            ref[(2, 0)]=-0.342041547038/(o+1.)+(-0.101968227937)+(-0.400828410989)*0.5**o
            arg[(2, 1)]=-0.955362731769*x[0]**o + (-0.798041886636)*x[0] + (-0.488744802602)*x[1]**o + (0.424178802899)*x[1] + (0.180915909348)*x[2]**o + (0.518107983314)*x[2]
            ref[(2, 1)]=-0.307828893254/(o+1.)+(0.0721224497884)+(-0.955362731769)*0.5**o
            arg[(2, 2)]=0.700736290544*x[0]**o + (0.0818732994501)*x[0] + (0.550881168833)*x[1]**o + (0.768957549468)*x[1] + (-0.42153544248)*x[2]**o + (-0.94613981681)*x[2]
            ref[(2, 2)]=0.129345726353/(o+1.)+(-0.0476544839459)+(0.700736290544)*0.5**o
            arg[(2, 3)]=-0.32149468869*x[0]**o + (0.545682595178)*x[0] + (-0.754411050162)*x[1]**o + (0.712497705548)*x[1] + (-0.688510445179)*x[2]**o + (-0.170356659429)*x[2]
            ref[(2, 3)]=-1.44292149534/(o+1.)+(0.543911820648)+(-0.32149468869)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 4),w)
        ref=numpy.zeros((4, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.81453001735*x[0]**o + (0.674127712481)*x[0] + (0.981994197205)*x[1]**o + (0.952380711086)*x[1]
            ref[(0, 0, 0)]=0.981994197205/(o+1.)+(0.813254211783)+(0.81453001735)*0.5**o
            arg[(0, 0, 1)]=-0.179305632172*x[0]**o + (0.407915252255)*x[0] + (-0.315439104231)*x[1]**o + (0.892598190708)*x[1]
            ref[(0, 0, 1)]=-0.315439104231/(o+1.)+(0.650256721481)+(-0.179305632172)*0.5**o
            arg[(0, 0, 2)]=-0.758717485941*x[0]**o + (-0.660527283963)*x[0] + (-0.661970580916)*x[1]**o + (0.781346269769)*x[1]
            ref[(0, 0, 2)]=-0.661970580916/(o+1.)+(0.0604094929034)+(-0.758717485941)*0.5**o
            arg[(0, 0, 3)]=-0.93735433602*x[0]**o + (-0.147100320548)*x[0] + (0.666007000201)*x[1]**o + (0.85344604717)*x[1]
            ref[(0, 0, 3)]=0.666007000201/(o+1.)+(0.353172863311)+(-0.93735433602)*0.5**o
            arg[(0, 1, 0)]=0.927984511766*x[0]**o + (0.687150908184)*x[0] + (-0.312177352593)*x[1]**o + (-0.955791192427)*x[1]
            ref[(0, 1, 0)]=-0.312177352593/(o+1.)+(-0.134320142122)+(0.927984511766)*0.5**o
            arg[(0, 1, 1)]=0.46433651063*x[0]**o + (-0.585092588888)*x[0] + (0.966697638728)*x[1]**o + (-0.686254220176)*x[1]
            ref[(0, 1, 1)]=0.966697638728/(o+1.)+(-0.635673404532)+(0.46433651063)*0.5**o
            arg[(0, 1, 2)]=-0.67218947765*x[0]**o + (-0.630847076391)*x[0] + (0.483204068489)*x[1]**o + (-0.758393556698)*x[1]
            ref[(0, 1, 2)]=0.483204068489/(o+1.)+(-0.694620316544)+(-0.67218947765)*0.5**o
            arg[(0, 1, 3)]=-0.134560321283*x[0]**o + (-0.740900793508)*x[0] + (-0.396876797462)*x[1]**o + (-0.107728749839)*x[1]
            ref[(0, 1, 3)]=-0.396876797462/(o+1.)+(-0.424314771673)+(-0.134560321283)*0.5**o
            arg[(0, 2, 0)]=-0.343108143022*x[0]**o + (-0.494938846252)*x[0] + (0.0296918195481)*x[1]**o + (0.0678582745155)*x[1]
            ref[(0, 2, 0)]=0.0296918195481/(o+1.)+(-0.213540285868)+(-0.343108143022)*0.5**o
            arg[(0, 2, 1)]=0.566870038763*x[0]**o + (-0.157832031717)*x[0] + (0.743017846246)*x[1]**o + (-0.319668028101)*x[1]
            ref[(0, 2, 1)]=0.743017846246/(o+1.)+(-0.238750029909)+(0.566870038763)*0.5**o
            arg[(0, 2, 2)]=0.941417181264*x[0]**o + (0.210964292274)*x[0] + (0.522971157637)*x[1]**o + (-0.278649354639)*x[1]
            ref[(0, 2, 2)]=0.522971157637/(o+1.)+(-0.0338425311825)+(0.941417181264)*0.5**o
            arg[(0, 2, 3)]=-0.815848812986*x[0]**o + (0.79453124305)*x[0] + (-0.636902679986)*x[1]**o + (-0.877950030411)*x[1]
            ref[(0, 2, 3)]=-0.636902679986/(o+1.)+(-0.0417093936803)+(-0.815848812986)*0.5**o
            arg[(0, 3, 0)]=0.278237135283*x[0]**o + (-0.350345393876)*x[0] + (-0.332241680493)*x[1]**o + (-0.251095266449)*x[1]
            ref[(0, 3, 0)]=-0.332241680493/(o+1.)+(-0.300720330162)+(0.278237135283)*0.5**o
            arg[(0, 3, 1)]=0.922518193603*x[0]**o + (0.528127676839)*x[0] + (-0.769848850305)*x[1]**o + (0.143615590224)*x[1]
            ref[(0, 3, 1)]=-0.769848850305/(o+1.)+(0.335871633532)+(0.922518193603)*0.5**o
            arg[(0, 3, 2)]=0.350494612708*x[0]**o + (0.622676253868)*x[0] + (0.95716805147)*x[1]**o + (0.407784656988)*x[1]
            ref[(0, 3, 2)]=0.95716805147/(o+1.)+(0.515230455428)+(0.350494612708)*0.5**o
            arg[(0, 3, 3)]=-0.794290328205*x[0]**o + (0.368954724521)*x[0] + (0.347759167793)*x[1]**o + (0.512336158054)*x[1]
            ref[(0, 3, 3)]=0.347759167793/(o+1.)+(0.440645441287)+(-0.794290328205)*0.5**o
            arg[(1, 0, 0)]=0.18694147991*x[0]**o + (0.161966124645)*x[0] + (-0.841154306173)*x[1]**o + (-0.619091690301)*x[1]
            ref[(1, 0, 0)]=-0.841154306173/(o+1.)+(-0.228562782828)+(0.18694147991)*0.5**o
            arg[(1, 0, 1)]=-0.351372664066*x[0]**o + (0.81784375345)*x[0] + (-0.312986787058)*x[1]**o + (0.47740580001)*x[1]
            ref[(1, 0, 1)]=-0.312986787058/(o+1.)+(0.64762477673)+(-0.351372664066)*0.5**o
            arg[(1, 0, 2)]=-0.803146857613*x[0]**o + (0.375963703729)*x[0] + (-0.651626004263)*x[1]**o + (-0.55407119813)*x[1]
            ref[(1, 0, 2)]=-0.651626004263/(o+1.)+(-0.0890537472007)+(-0.803146857613)*0.5**o
            arg[(1, 0, 3)]=-0.810293570094*x[0]**o + (-0.772453043858)*x[0] + (-0.966093463225)*x[1]**o + (-0.416091934163)*x[1]
            ref[(1, 0, 3)]=-0.966093463225/(o+1.)+(-0.594272489011)+(-0.810293570094)*0.5**o
            arg[(1, 1, 0)]=0.503132858814*x[0]**o + (-0.642475100359)*x[0] + (0.737174839018)*x[1]**o + (0.00786222898336)*x[1]
            ref[(1, 1, 0)]=0.737174839018/(o+1.)+(-0.317306435688)+(0.503132858814)*0.5**o
            arg[(1, 1, 1)]=0.478412309552*x[0]**o + (0.388994056166)*x[0] + (0.450336984147)*x[1]**o + (0.368386764463)*x[1]
            ref[(1, 1, 1)]=0.450336984147/(o+1.)+(0.378690410314)+(0.478412309552)*0.5**o
            arg[(1, 1, 2)]=-0.941144104769*x[0]**o + (-0.738239824274)*x[0] + (0.590313088031)*x[1]**o + (-0.634634467212)*x[1]
            ref[(1, 1, 2)]=0.590313088031/(o+1.)+(-0.686437145743)+(-0.941144104769)*0.5**o
            arg[(1, 1, 3)]=-0.0646008437518*x[0]**o + (-0.744916196974)*x[0] + (-0.569194729262)*x[1]**o + (0.239949667394)*x[1]
            ref[(1, 1, 3)]=-0.569194729262/(o+1.)+(-0.25248326479)+(-0.0646008437518)*0.5**o
            arg[(1, 2, 0)]=0.0403146556749*x[0]**o + (0.90066569151)*x[0] + (-0.780666903047)*x[1]**o + (0.754685460799)*x[1]
            ref[(1, 2, 0)]=-0.780666903047/(o+1.)+(0.827675576154)+(0.0403146556749)*0.5**o
            arg[(1, 2, 1)]=-0.777671668404*x[0]**o + (-0.044151781972)*x[0] + (-0.0367601372413)*x[1]**o + (-0.726515492106)*x[1]
            ref[(1, 2, 1)]=-0.0367601372413/(o+1.)+(-0.385333637039)+(-0.777671668404)*0.5**o
            arg[(1, 2, 2)]=0.0317031354703*x[0]**o + (0.778552197149)*x[0] + (-0.175313214352)*x[1]**o + (0.872288147935)*x[1]
            ref[(1, 2, 2)]=-0.175313214352/(o+1.)+(0.825420172542)+(0.0317031354703)*0.5**o
            arg[(1, 2, 3)]=-0.475291991214*x[0]**o + (-0.209844098221)*x[0] + (-0.691880978442)*x[1]**o + (0.11839705763)*x[1]
            ref[(1, 2, 3)]=-0.691880978442/(o+1.)+(-0.0457235202959)+(-0.475291991214)*0.5**o
            arg[(1, 3, 0)]=0.176696456946*x[0]**o + (0.238592457864)*x[0] + (-0.033543936996)*x[1]**o + (-0.254839094795)*x[1]
            ref[(1, 3, 0)]=-0.033543936996/(o+1.)+(-0.00812331846529)+(0.176696456946)*0.5**o
            arg[(1, 3, 1)]=-0.0063797229109*x[0]**o + (0.317161863748)*x[0] + (0.415440049836)*x[1]**o + (-0.802698327854)*x[1]
            ref[(1, 3, 1)]=0.415440049836/(o+1.)+(-0.242768232053)+(-0.0063797229109)*0.5**o
            arg[(1, 3, 2)]=0.94366064662*x[0]**o + (0.0607666463567)*x[0] + (0.955917923016)*x[1]**o + (0.883789298006)*x[1]
            ref[(1, 3, 2)]=0.955917923016/(o+1.)+(0.472277972181)+(0.94366064662)*0.5**o
            arg[(1, 3, 3)]=0.306153245735*x[0]**o + (0.101172495796)*x[0] + (-0.83970723835)*x[1]**o + (-0.0454738611673)*x[1]
            ref[(1, 3, 3)]=-0.83970723835/(o+1.)+(0.0278493173144)+(0.306153245735)*0.5**o
            arg[(2, 0, 0)]=-0.471430523489*x[0]**o + (0.374526509153)*x[0] + (0.681094571449)*x[1]**o + (-0.738405712413)*x[1]
            ref[(2, 0, 0)]=0.681094571449/(o+1.)+(-0.18193960163)+(-0.471430523489)*0.5**o
            arg[(2, 0, 1)]=-0.957920742224*x[0]**o + (0.474585211403)*x[0] + (0.55314023514)*x[1]**o + (-0.502036741165)*x[1]
            ref[(2, 0, 1)]=0.55314023514/(o+1.)+(-0.0137257648813)+(-0.957920742224)*0.5**o
            arg[(2, 0, 2)]=0.0211537403557*x[0]**o + (-0.1453178469)*x[0] + (-0.945374015169)*x[1]**o + (-0.799440275423)*x[1]
            ref[(2, 0, 2)]=-0.945374015169/(o+1.)+(-0.472379061161)+(0.0211537403557)*0.5**o
            arg[(2, 0, 3)]=0.284553253519*x[0]**o + (-0.740947708694)*x[0] + (0.688325348425)*x[1]**o + (0.265633091604)*x[1]
            ref[(2, 0, 3)]=0.688325348425/(o+1.)+(-0.237657308545)+(0.284553253519)*0.5**o
            arg[(2, 1, 0)]=-0.0434411732638*x[0]**o + (-0.475200288236)*x[0] + (0.517174041393)*x[1]**o + (0.527762207223)*x[1]
            ref[(2, 1, 0)]=0.517174041393/(o+1.)+(0.0262809594934)+(-0.0434411732638)*0.5**o
            arg[(2, 1, 1)]=-0.0667080699799*x[0]**o + (0.369630160353)*x[0] + (0.251245218151)*x[1]**o + (0.380675554978)*x[1]
            ref[(2, 1, 1)]=0.251245218151/(o+1.)+(0.375152857665)+(-0.0667080699799)*0.5**o
            arg[(2, 1, 2)]=-0.527575542711*x[0]**o + (0.929786957429)*x[0] + (0.283432959182)*x[1]**o + (0.535346283173)*x[1]
            ref[(2, 1, 2)]=0.283432959182/(o+1.)+(0.732566620301)+(-0.527575542711)*0.5**o
            arg[(2, 1, 3)]=0.147214170411*x[0]**o + (-0.446171542406)*x[0] + (-0.880272502574)*x[1]**o + (0.0996523219427)*x[1]
            ref[(2, 1, 3)]=-0.880272502574/(o+1.)+(-0.173259610232)+(0.147214170411)*0.5**o
            arg[(2, 2, 0)]=-0.508244018135*x[0]**o + (0.997089496201)*x[0] + (0.57366946305)*x[1]**o + (0.453835578946)*x[1]
            ref[(2, 2, 0)]=0.57366946305/(o+1.)+(0.725462537573)+(-0.508244018135)*0.5**o
            arg[(2, 2, 1)]=-0.726321762767*x[0]**o + (-0.273840495729)*x[0] + (0.811301982289)*x[1]**o + (0.660059314658)*x[1]
            ref[(2, 2, 1)]=0.811301982289/(o+1.)+(0.193109409465)+(-0.726321762767)*0.5**o
            arg[(2, 2, 2)]=0.754214483944*x[0]**o + (-0.916690532322)*x[0] + (-0.803456215881)*x[1]**o + (0.424819847119)*x[1]
            ref[(2, 2, 2)]=-0.803456215881/(o+1.)+(-0.245935342602)+(0.754214483944)*0.5**o
            arg[(2, 2, 3)]=-0.790418668856*x[0]**o + (-0.505915594597)*x[0] + (-0.267010007108)*x[1]**o + (-0.760283128187)*x[1]
            ref[(2, 2, 3)]=-0.267010007108/(o+1.)+(-0.633099361392)+(-0.790418668856)*0.5**o
            arg[(2, 3, 0)]=0.735897897491*x[0]**o + (0.657208890687)*x[0] + (-0.53910950241)*x[1]**o + (-0.513859453821)*x[1]
            ref[(2, 3, 0)]=-0.53910950241/(o+1.)+(0.0716747184329)+(0.735897897491)*0.5**o
            arg[(2, 3, 1)]=-0.119214008258*x[0]**o + (-0.399997548217)*x[0] + (0.837319168533)*x[1]**o + (0.827639245864)*x[1]
            ref[(2, 3, 1)]=0.837319168533/(o+1.)+(0.213820848824)+(-0.119214008258)*0.5**o
            arg[(2, 3, 2)]=-0.346821264891*x[0]**o + (-0.112901602447)*x[0] + (-0.397573530334)*x[1]**o + (0.929432746254)*x[1]
            ref[(2, 3, 2)]=-0.397573530334/(o+1.)+(0.408265571904)+(-0.346821264891)*0.5**o
            arg[(2, 3, 3)]=-0.053183243394*x[0]**o + (0.0943235002154)*x[0] + (0.368410552298)*x[1]**o + (-0.671604972719)*x[1]
            ref[(2, 3, 3)]=0.368410552298/(o+1.)+(-0.288640736252)+(-0.053183243394)*0.5**o
            arg[(3, 0, 0)]=-0.317726223483*x[0]**o + (-0.516389218218)*x[0] + (-0.474352316494)*x[1]**o + (-0.108501698361)*x[1]
            ref[(3, 0, 0)]=-0.474352316494/(o+1.)+(-0.312445458289)+(-0.317726223483)*0.5**o
            arg[(3, 0, 1)]=0.345566567605*x[0]**o + (-0.680465543573)*x[0] + (-0.488263396286)*x[1]**o + (0.554874439915)*x[1]
            ref[(3, 0, 1)]=-0.488263396286/(o+1.)+(-0.0627955518292)+(0.345566567605)*0.5**o
            arg[(3, 0, 2)]=-0.392082660325*x[0]**o + (-0.209239010811)*x[0] + (0.756827527579)*x[1]**o + (-0.303828033803)*x[1]
            ref[(3, 0, 2)]=0.756827527579/(o+1.)+(-0.256533522307)+(-0.392082660325)*0.5**o
            arg[(3, 0, 3)]=0.659754547379*x[0]**o + (0.399753002516)*x[0] + (0.264285460179)*x[1]**o + (-0.97595076618)*x[1]
            ref[(3, 0, 3)]=0.264285460179/(o+1.)+(-0.288098881832)+(0.659754547379)*0.5**o
            arg[(3, 1, 0)]=-0.700094440697*x[0]**o + (-0.813300247936)*x[0] + (-0.619650580699)*x[1]**o + (-0.250588365486)*x[1]
            ref[(3, 1, 0)]=-0.619650580699/(o+1.)+(-0.531944306711)+(-0.700094440697)*0.5**o
            arg[(3, 1, 1)]=-0.409276949981*x[0]**o + (0.66773206933)*x[0] + (-0.322115321293)*x[1]**o + (0.0510396942281)*x[1]
            ref[(3, 1, 1)]=-0.322115321293/(o+1.)+(0.359385881779)+(-0.409276949981)*0.5**o
            arg[(3, 1, 2)]=-0.687240616927*x[0]**o + (0.350572470771)*x[0] + (0.50996308593)*x[1]**o + (-0.427128044816)*x[1]
            ref[(3, 1, 2)]=0.50996308593/(o+1.)+(-0.0382777870222)+(-0.687240616927)*0.5**o
            arg[(3, 1, 3)]=0.699006343173*x[0]**o + (0.619144229397)*x[0] + (0.445757983226)*x[1]**o + (-0.2271337498)*x[1]
            ref[(3, 1, 3)]=0.445757983226/(o+1.)+(0.196005239799)+(0.699006343173)*0.5**o
            arg[(3, 2, 0)]=-0.462709784097*x[0]**o + (0.792509286024)*x[0] + (0.235336674861)*x[1]**o + (-0.324973026046)*x[1]
            ref[(3, 2, 0)]=0.235336674861/(o+1.)+(0.233768129989)+(-0.462709784097)*0.5**o
            arg[(3, 2, 1)]=0.138096531661*x[0]**o + (0.487007846693)*x[0] + (0.209795125724)*x[1]**o + (0.565604674147)*x[1]
            ref[(3, 2, 1)]=0.209795125724/(o+1.)+(0.52630626042)+(0.138096531661)*0.5**o
            arg[(3, 2, 2)]=0.967737176253*x[0]**o + (-0.566287022486)*x[0] + (0.868744981379)*x[1]**o + (-0.488085813574)*x[1]
            ref[(3, 2, 2)]=0.868744981379/(o+1.)+(-0.52718641803)+(0.967737176253)*0.5**o
            arg[(3, 2, 3)]=0.887018773805*x[0]**o + (0.738449293375)*x[0] + (-0.314650254659)*x[1]**o + (0.858961977156)*x[1]
            ref[(3, 2, 3)]=-0.314650254659/(o+1.)+(0.798705635265)+(0.887018773805)*0.5**o
            arg[(3, 3, 0)]=-0.735051410089*x[0]**o + (0.334873302213)*x[0] + (0.563954099466)*x[1]**o + (-0.194006719772)*x[1]
            ref[(3, 3, 0)]=0.563954099466/(o+1.)+(0.0704332912206)+(-0.735051410089)*0.5**o
            arg[(3, 3, 1)]=-0.675466693231*x[0]**o + (0.254512314613)*x[0] + (-0.251810770641)*x[1]**o + (-0.973087470422)*x[1]
            ref[(3, 3, 1)]=-0.251810770641/(o+1.)+(-0.359287577905)+(-0.675466693231)*0.5**o
            arg[(3, 3, 2)]=-0.716278773927*x[0]**o + (-0.339717122774)*x[0] + (-0.0431409213722)*x[1]**o + (0.975092831164)*x[1]
            ref[(3, 3, 2)]=-0.0431409213722/(o+1.)+(0.317687854195)+(-0.716278773927)*0.5**o
            arg[(3, 3, 3)]=0.63489965999*x[0]**o + (0.756748704674)*x[0] + (-0.926774986442)*x[1]**o + (-0.574790036539)*x[1]
            ref[(3, 3, 3)]=-0.926774986442/(o+1.)+(0.0909793340674)+(0.63489965999)*0.5**o
        else:
            arg[(0, 0, 0)]=0.652085737748*x[0]**o + (0.701652978163)*x[0] + (-0.901906299249)*x[1]**o + (-0.167849692645)*x[1] + (0.354532570721)*x[2]**o + (-0.0759674064897)*x[2]
            ref[(0, 0, 0)]=-0.547373728529/(o+1.)+(0.228917939514)+(0.652085737748)*0.5**o
            arg[(0, 0, 1)]=0.555294206048*x[0]**o + (0.0994692059608)*x[0] + (0.101290816326)*x[1]**o + (-0.272683603935)*x[1] + (0.561847069962)*x[2]**o + (0.503453077766)*x[2]
            ref[(0, 0, 1)]=0.663137886287/(o+1.)+(0.165119339896)+(0.555294206048)*0.5**o
            arg[(0, 0, 2)]=-0.780679722005*x[0]**o + (-0.0665852851355)*x[0] + (0.0180635615283)*x[1]**o + (0.438484750648)*x[1] + (-0.265486489264)*x[2]**o + (-0.982968731331)*x[2]
            ref[(0, 0, 2)]=-0.247422927736/(o+1.)+(-0.30553463291)+(-0.780679722005)*0.5**o
            arg[(0, 0, 3)]=0.449185811134*x[0]**o + (-0.483827215142)*x[0] + (0.667165960351)*x[1]**o + (0.969866482943)*x[1] + (-0.236493658535)*x[2]**o + (0.70594714987)*x[2]
            ref[(0, 0, 3)]=0.430672301816/(o+1.)+(0.595993208835)+(0.449185811134)*0.5**o
            arg[(0, 1, 0)]=-0.848746017474*x[0]**o + (0.565580721237)*x[0] + (0.263981878789)*x[1]**o + (-0.697170149293)*x[1] + (-0.463051389366)*x[2]**o + (-0.39807783088)*x[2]
            ref[(0, 1, 0)]=-0.199069510577/(o+1.)+(-0.264833629468)+(-0.848746017474)*0.5**o
            arg[(0, 1, 1)]=0.960847149961*x[0]**o + (0.127029612011)*x[0] + (-0.608164177696)*x[1]**o + (0.34288969846)*x[1] + (0.776042426358)*x[2]**o + (-0.820673865574)*x[2]
            ref[(0, 1, 1)]=0.167878248662/(o+1.)+(-0.175377277552)+(0.960847149961)*0.5**o
            arg[(0, 1, 2)]=0.126567453015*x[0]**o + (-0.0854231132504)*x[0] + (-0.192155624928)*x[1]**o + (-0.465523867921)*x[1] + (0.232213504123)*x[2]**o + (0.664359739773)*x[2]
            ref[(0, 1, 2)]=0.0400578791957/(o+1.)+(0.0567063793008)+(0.126567453015)*0.5**o
            arg[(0, 1, 3)]=0.102884918406*x[0]**o + (0.194672598492)*x[0] + (-0.241999693342)*x[1]**o + (-0.443811968019)*x[1] + (0.0259881844879)*x[2]**o + (0.722203818132)*x[2]
            ref[(0, 1, 3)]=-0.216011508854/(o+1.)+(0.236532224303)+(0.102884918406)*0.5**o
            arg[(0, 2, 0)]=0.052449308777*x[0]**o + (0.876913214895)*x[0] + (-0.900083737099)*x[1]**o + (0.545150480129)*x[1] + (0.150223134126)*x[2]**o + (0.540441585569)*x[2]
            ref[(0, 2, 0)]=-0.749860602973/(o+1.)+(0.981252640296)+(0.052449308777)*0.5**o
            arg[(0, 2, 1)]=-0.928574561494*x[0]**o + (0.359574281262)*x[0] + (0.900503616107)*x[1]**o + (0.594155121463)*x[1] + (0.5217870998)*x[2]**o + (0.223097938135)*x[2]
            ref[(0, 2, 1)]=1.42229071591/(o+1.)+(0.58841367043)+(-0.928574561494)*0.5**o
            arg[(0, 2, 2)]=-0.390241953897*x[0]**o + (0.795886746343)*x[0] + (-0.401836808344)*x[1]**o + (-0.463490820295)*x[1] + (0.441226593924)*x[2]**o + (0.6878082894)*x[2]
            ref[(0, 2, 2)]=0.0393897855804/(o+1.)+(0.510102107724)+(-0.390241953897)*0.5**o
            arg[(0, 2, 3)]=0.259419463012*x[0]**o + (0.327206215019)*x[0] + (0.212196142067)*x[1]**o + (0.277986768503)*x[1] + (0.964145987778)*x[2]**o + (-0.942617651524)*x[2]
            ref[(0, 2, 3)]=1.17634212984/(o+1.)+(-0.168712334001)+(0.259419463012)*0.5**o
            arg[(0, 3, 0)]=-0.456365406625*x[0]**o + (0.577047928004)*x[0] + (0.407734308154)*x[1]**o + (-0.845663702383)*x[1] + (-0.570739299257)*x[2]**o + (-0.630522302773)*x[2]
            ref[(0, 3, 0)]=-0.163004991103/(o+1.)+(-0.449569038576)+(-0.456365406625)*0.5**o
            arg[(0, 3, 1)]=-0.70634315505*x[0]**o + (-0.564012211038)*x[0] + (-0.177891360453)*x[1]**o + (0.0873740849308)*x[1] + (-0.70483631864)*x[2]**o + (-0.896978769733)*x[2]
            ref[(0, 3, 1)]=-0.882727679093/(o+1.)+(-0.68680844792)+(-0.70634315505)*0.5**o
            arg[(0, 3, 2)]=-0.256657886386*x[0]**o + (0.559889963738)*x[0] + (-0.718966908367)*x[1]**o + (0.343186674335)*x[1] + (0.554321240667)*x[2]**o + (-0.0752294099389)*x[2]
            ref[(0, 3, 2)]=-0.1646456677/(o+1.)+(0.413923614067)+(-0.256657886386)*0.5**o
            arg[(0, 3, 3)]=-0.697608075119*x[0]**o + (-0.699352068398)*x[0] + (0.0257113751416)*x[1]**o + (-0.703122235098)*x[1] + (-0.514642150028)*x[2]**o + (0.748610469996)*x[2]
            ref[(0, 3, 3)]=-0.488930774886/(o+1.)+(-0.32693191675)+(-0.697608075119)*0.5**o
            arg[(1, 0, 0)]=0.378606811445*x[0]**o + (0.0763673749069)*x[0] + (0.537933234564)*x[1]**o + (-0.329461502693)*x[1] + (-0.778317393698)*x[2]**o + (-0.664783006318)*x[2]
            ref[(1, 0, 0)]=-0.240384159133/(o+1.)+(-0.458938567052)+(0.378606811445)*0.5**o
            arg[(1, 0, 1)]=0.775926491358*x[0]**o + (0.919976357686)*x[0] + (-0.158418693602)*x[1]**o + (-0.14175775008)*x[1] + (-0.0450413849875)*x[2]**o + (-0.0030342815426)*x[2]
            ref[(1, 0, 1)]=-0.20346007859/(o+1.)+(0.387592163032)+(0.775926491358)*0.5**o
            arg[(1, 0, 2)]=0.609222717716*x[0]**o + (0.650191230941)*x[0] + (-0.733518293587)*x[1]**o + (0.0524208642792)*x[1] + (-0.419618281509)*x[2]**o + (-0.568269395756)*x[2]
            ref[(1, 0, 2)]=-1.1531365751/(o+1.)+(0.0671713497317)+(0.609222717716)*0.5**o
            arg[(1, 0, 3)]=0.00331588528294*x[0]**o + (0.151767336551)*x[0] + (-0.290155332161)*x[1]**o + (0.0619876283588)*x[1] + (0.0678001044789)*x[2]**o + (0.284770164631)*x[2]
            ref[(1, 0, 3)]=-0.222355227682/(o+1.)+(0.24926256477)+(0.00331588528294)*0.5**o
            arg[(1, 1, 0)]=-0.345708782847*x[0]**o + (0.817337982783)*x[0] + (-0.30606216761)*x[1]**o + (0.837476517107)*x[1] + (0.847586454198)*x[2]**o + (0.776095247909)*x[2]
            ref[(1, 1, 0)]=0.541524286588/(o+1.)+(1.2154548739)+(-0.345708782847)*0.5**o
            arg[(1, 1, 1)]=0.857189804171*x[0]**o + (0.297152875061)*x[0] + (-0.180872515961)*x[1]**o + (0.721643969902)*x[1] + (0.907436678017)*x[2]**o + (-0.130547727304)*x[2]
            ref[(1, 1, 1)]=0.726564162056/(o+1.)+(0.44412455883)+(0.857189804171)*0.5**o
            arg[(1, 1, 2)]=-0.415583751204*x[0]**o + (0.498625393195)*x[0] + (-0.60326488939)*x[1]**o + (0.25640105981)*x[1] + (-0.566546374383)*x[2]**o + (0.923411249827)*x[2]
            ref[(1, 1, 2)]=-1.16981126377/(o+1.)+(0.839218851416)+(-0.415583751204)*0.5**o
            arg[(1, 1, 3)]=0.281514687901*x[0]**o + (-0.454884699606)*x[0] + (-0.671900726711)*x[1]**o + (0.966021685256)*x[1] + (-0.72235175195)*x[2]**o + (-0.93866005316)*x[2]
            ref[(1, 1, 3)]=-1.39425247866/(o+1.)+(-0.213761533755)+(0.281514687901)*0.5**o
            arg[(1, 2, 0)]=-0.954143664671*x[0]**o + (0.625935875032)*x[0] + (0.711645030165)*x[1]**o + (-0.149346225661)*x[1] + (-0.543619256213)*x[2]**o + (-0.406622852136)*x[2]
            ref[(1, 2, 0)]=0.168025773951/(o+1.)+(0.0349833986175)+(-0.954143664671)*0.5**o
            arg[(1, 2, 1)]=0.200432617244*x[0]**o + (-0.675423420771)*x[0] + (0.912130563412)*x[1]**o + (0.762647947191)*x[1] + (-0.619892267444)*x[2]**o + (-0.846607319584)*x[2]
            ref[(1, 2, 1)]=0.292238295968/(o+1.)+(-0.379691396582)+(0.200432617244)*0.5**o
            arg[(1, 2, 2)]=0.906813624007*x[0]**o + (-0.397423826377)*x[0] + (0.563760429298)*x[1]**o + (-0.360830252629)*x[1] + (-0.93677212156)*x[2]**o + (0.130104764174)*x[2]
            ref[(1, 2, 2)]=-0.373011692262/(o+1.)+(-0.314074657416)+(0.906813624007)*0.5**o
            arg[(1, 2, 3)]=0.47193764286*x[0]**o + (0.785760976518)*x[0] + (-0.575799967513)*x[1]**o + (0.310795191637)*x[1] + (-0.602013907113)*x[2]**o + (0.630828038742)*x[2]
            ref[(1, 2, 3)]=-1.17781387463/(o+1.)+(0.863692103448)+(0.47193764286)*0.5**o
            arg[(1, 3, 0)]=0.549503304111*x[0]**o + (0.0464488885381)*x[0] + (0.153342831933)*x[1]**o + (0.593627202898)*x[1] + (-0.691364251048)*x[2]**o + (-0.382697437633)*x[2]
            ref[(1, 3, 0)]=-0.538021419115/(o+1.)+(0.128689326902)+(0.549503304111)*0.5**o
            arg[(1, 3, 1)]=0.616717797704*x[0]**o + (0.257905839368)*x[0] + (-0.989360979082)*x[1]**o + (-0.0366825367993)*x[1] + (0.698765727134)*x[2]**o + (0.179513625335)*x[2]
            ref[(1, 3, 1)]=-0.290595251947/(o+1.)+(0.200368463952)+(0.616717797704)*0.5**o
            arg[(1, 3, 2)]=0.334795367923*x[0]**o + (-0.125575202916)*x[0] + (0.638757297548)*x[1]**o + (-0.220428283645)*x[1] + (-0.742924268181)*x[2]**o + (-0.685693818597)*x[2]
            ref[(1, 3, 2)]=-0.104166970633/(o+1.)+(-0.515848652579)+(0.334795367923)*0.5**o
            arg[(1, 3, 3)]=-0.839047404287*x[0]**o + (0.894191035096)*x[0] + (0.0892034469166)*x[1]**o + (0.509915776786)*x[1] + (-0.522909772169)*x[2]**o + (0.891825966609)*x[2]
            ref[(1, 3, 3)]=-0.433706325253/(o+1.)+(1.14796638925)+(-0.839047404287)*0.5**o
            arg[(2, 0, 0)]=0.548041485515*x[0]**o + (-0.589373287849)*x[0] + (0.584655194711)*x[1]**o + (0.995313342111)*x[1] + (-0.174056852177)*x[2]**o + (-0.17456343336)*x[2]
            ref[(2, 0, 0)]=0.410598342534/(o+1.)+(0.115688310451)+(0.548041485515)*0.5**o
            arg[(2, 0, 1)]=-0.723975395818*x[0]**o + (-0.0203422158809)*x[0] + (-0.0106131884125)*x[1]**o + (-0.261633174363)*x[1] + (0.222287126167)*x[2]**o + (0.676282867018)*x[2]
            ref[(2, 0, 1)]=0.211673937754/(o+1.)+(0.197153738387)+(-0.723975395818)*0.5**o
            arg[(2, 0, 2)]=0.792588975675*x[0]**o + (0.504965942179)*x[0] + (-0.426706119388)*x[1]**o + (-0.437712937324)*x[1] + (-0.418050398105)*x[2]**o + (-0.182540932621)*x[2]
            ref[(2, 0, 2)]=-0.844756517493/(o+1.)+(-0.0576439638831)+(0.792588975675)*0.5**o
            arg[(2, 0, 3)]=-0.178469113172*x[0]**o + (-0.253640779816)*x[0] + (0.926739074499)*x[1]**o + (0.596137324301)*x[1] + (-0.449433423196)*x[2]**o + (-0.58170928488)*x[2]
            ref[(2, 0, 3)]=0.477305651303/(o+1.)+(-0.119606370198)+(-0.178469113172)*0.5**o
            arg[(2, 1, 0)]=0.561044563999*x[0]**o + (-0.980860685749)*x[0] + (0.978678522937)*x[1]**o + (-0.18428278342)*x[1] + (0.655038507326)*x[2]**o + (0.219511652032)*x[2]
            ref[(2, 1, 0)]=1.63371703026/(o+1.)+(-0.472815908569)+(0.561044563999)*0.5**o
            arg[(2, 1, 1)]=-0.973759907355*x[0]**o + (-0.83355269817)*x[0] + (0.690508007784)*x[1]**o + (0.0665813943017)*x[1] + (-0.762484032436)*x[2]**o + (0.604999255586)*x[2]
            ref[(2, 1, 1)]=-0.0719760246523/(o+1.)+(-0.0809860241414)+(-0.973759907355)*0.5**o
            arg[(2, 1, 2)]=0.112779031587*x[0]**o + (-0.928744557868)*x[0] + (0.345596553766)*x[1]**o + (-0.171741919736)*x[1] + (-0.382293120355)*x[2]**o + (0.713199032387)*x[2]
            ref[(2, 1, 2)]=-0.0366965665892/(o+1.)+(-0.193643722608)+(0.112779031587)*0.5**o
            arg[(2, 1, 3)]=0.387565082135*x[0]**o + (-0.00276621697962)*x[0] + (-0.935499857515)*x[1]**o + (0.834971460282)*x[1] + (-0.923561917173)*x[2]**o + (-0.189146500251)*x[2]
            ref[(2, 1, 3)]=-1.85906177469/(o+1.)+(0.321529371526)+(0.387565082135)*0.5**o
            arg[(2, 2, 0)]=0.509783649884*x[0]**o + (-0.702924862477)*x[0] + (0.25058911968)*x[1]**o + (0.845676802537)*x[1] + (-0.697896267316)*x[2]**o + (0.944544913584)*x[2]
            ref[(2, 2, 0)]=-0.447307147636/(o+1.)+(0.543648426822)+(0.509783649884)*0.5**o
            arg[(2, 2, 1)]=0.178541221469*x[0]**o + (-0.787715180464)*x[0] + (0.27381149389)*x[1]**o + (-0.292459995243)*x[1] + (-0.00759662103601)*x[2]**o + (-0.152214343271)*x[2]
            ref[(2, 2, 1)]=0.266214872854/(o+1.)+(-0.616194759489)+(0.178541221469)*0.5**o
            arg[(2, 2, 2)]=0.43535935981*x[0]**o + (0.567300971698)*x[0] + (-0.734405683263)*x[1]**o + (0.517351429527)*x[1] + (-0.251001280801)*x[2]**o + (-0.0390161208628)*x[2]
            ref[(2, 2, 2)]=-0.985406964064/(o+1.)+(0.522818140181)+(0.43535935981)*0.5**o
            arg[(2, 2, 3)]=-0.189333141643*x[0]**o + (0.724343241353)*x[0] + (0.194961342733)*x[1]**o + (0.646271402255)*x[1] + (-0.497602441965)*x[2]**o + (0.598123453121)*x[2]
            ref[(2, 2, 3)]=-0.302641099232/(o+1.)+(0.984369048364)+(-0.189333141643)*0.5**o
            arg[(2, 3, 0)]=-0.90550531114*x[0]**o + (0.790609977749)*x[0] + (-0.209477549423)*x[1]**o + (-0.598084354425)*x[1] + (-0.259736363834)*x[2]**o + (0.459730047617)*x[2]
            ref[(2, 3, 0)]=-0.469213913258/(o+1.)+(0.32612783547)+(-0.90550531114)*0.5**o
            arg[(2, 3, 1)]=-0.123889570491*x[0]**o + (0.870079469277)*x[0] + (0.116636095672)*x[1]**o + (-0.110134055348)*x[1] + (-0.876889231763)*x[2]**o + (-0.241444766923)*x[2]
            ref[(2, 3, 1)]=-0.76025313609/(o+1.)+(0.259250323503)+(-0.123889570491)*0.5**o
            arg[(2, 3, 2)]=0.212845178632*x[0]**o + (-0.519954282105)*x[0] + (-0.0488637607869)*x[1]**o + (0.799283450333)*x[1] + (0.129430383652)*x[2]**o + (-0.892520206596)*x[2]
            ref[(2, 3, 2)]=0.080566622865/(o+1.)+(-0.306595519184)+(0.212845178632)*0.5**o
            arg[(2, 3, 3)]=-0.649120659402*x[0]**o + (0.360520279055)*x[0] + (0.0529261690117)*x[1]**o + (0.691226195413)*x[1] + (0.976770293226)*x[2]**o + (-0.0320756158481)*x[2]
            ref[(2, 3, 3)]=1.02969646224/(o+1.)+(0.50983542931)+(-0.649120659402)*0.5**o
            arg[(3, 0, 0)]=0.688888004213*x[0]**o + (-0.573820064039)*x[0] + (0.59235020889)*x[1]**o + (0.501710644615)*x[1] + (-0.6704761839)*x[2]**o + (-0.790259248819)*x[2]
            ref[(3, 0, 0)]=-0.0781259750097/(o+1.)+(-0.431184334122)+(0.688888004213)*0.5**o
            arg[(3, 0, 1)]=-0.563216595182*x[0]**o + (0.606532584012)*x[0] + (0.327238949693)*x[1]**o + (-0.682324476499)*x[1] + (0.613117095323)*x[2]**o + (-0.929072904813)*x[2]
            ref[(3, 0, 1)]=0.940356045016/(o+1.)+(-0.50243239865)+(-0.563216595182)*0.5**o
            arg[(3, 0, 2)]=-0.538828816337*x[0]**o + (0.0862946656566)*x[0] + (-0.810882576507)*x[1]**o + (-0.3900052645)*x[1] + (0.533907172017)*x[2]**o + (-0.71415661809)*x[2]
            ref[(3, 0, 2)]=-0.27697540449/(o+1.)+(-0.508933608466)+(-0.538828816337)*0.5**o
            arg[(3, 0, 3)]=-0.729101010849*x[0]**o + (-0.60135609085)*x[0] + (-0.858285198279)*x[1]**o + (0.759902404149)*x[1] + (-0.725890136788)*x[2]**o + (0.211090277838)*x[2]
            ref[(3, 0, 3)]=-1.58417533507/(o+1.)+(0.184818295569)+(-0.729101010849)*0.5**o
            arg[(3, 1, 0)]=-0.93907187262*x[0]**o + (-0.810903902933)*x[0] + (-0.00850988976043)*x[1]**o + (-0.755857228683)*x[1] + (-0.208879218935)*x[2]**o + (-0.32359946933)*x[2]
            ref[(3, 1, 0)]=-0.217389108696/(o+1.)+(-0.945180300473)+(-0.93907187262)*0.5**o
            arg[(3, 1, 1)]=0.0420297092059*x[0]**o + (-0.685232064675)*x[0] + (-0.296925649697)*x[1]**o + (0.81122813858)*x[1] + (-0.121271285466)*x[2]**o + (0.596785697387)*x[2]
            ref[(3, 1, 1)]=-0.418196935163/(o+1.)+(0.361390885646)+(0.0420297092059)*0.5**o
            arg[(3, 1, 2)]=0.103034481062*x[0]**o + (0.0420096316017)*x[0] + (0.358201256488)*x[1]**o + (-0.306271961162)*x[1] + (-0.380810038108)*x[2]**o + (-0.411144385381)*x[2]
            ref[(3, 1, 2)]=-0.0226087816205/(o+1.)+(-0.33770335747)+(0.103034481062)*0.5**o
            arg[(3, 1, 3)]=-0.977935499895*x[0]**o + (0.394389817179)*x[0] + (-0.671296105681)*x[1]**o + (-0.636931977774)*x[1] + (-0.0649709269823)*x[2]**o + (0.214350337136)*x[2]
            ref[(3, 1, 3)]=-0.736267032664/(o+1.)+(-0.0140959117298)+(-0.977935499895)*0.5**o
            arg[(3, 2, 0)]=0.76768715211*x[0]**o + (-0.124147043042)*x[0] + (-0.965301984039)*x[1]**o + (-0.62509574728)*x[1] + (0.377087868058)*x[2]**o + (0.627035747755)*x[2]
            ref[(3, 2, 0)]=-0.588214115981/(o+1.)+(-0.0611035212832)+(0.76768715211)*0.5**o
            arg[(3, 2, 1)]=-0.994653283304*x[0]**o + (-0.927165810634)*x[0] + (0.309583294828)*x[1]**o + (-0.298456387712)*x[1] + (-0.762577210657)*x[2]**o + (0.161800351499)*x[2]
            ref[(3, 2, 1)]=-0.452993915829/(o+1.)+(-0.531910923424)+(-0.994653283304)*0.5**o
            arg[(3, 2, 2)]=-0.42584049501*x[0]**o + (-0.551484088841)*x[0] + (0.0424769456156)*x[1]**o + (0.925786400856)*x[1] + (0.606565813999)*x[2]**o + (-0.322109130397)*x[2]
            ref[(3, 2, 2)]=0.649042759614/(o+1.)+(0.0260965908089)+(-0.42584049501)*0.5**o
            arg[(3, 2, 3)]=-0.293190579207*x[0]**o + (0.511454605004)*x[0] + (-0.0559620461212)*x[1]**o + (0.231185953422)*x[1] + (0.565836306178)*x[2]**o + (0.335182142253)*x[2]
            ref[(3, 2, 3)]=0.509874260057/(o+1.)+(0.538911350339)+(-0.293190579207)*0.5**o
            arg[(3, 3, 0)]=0.0509694251395*x[0]**o + (-0.0729230775218)*x[0] + (0.939125666834)*x[1]**o + (-0.545910063727)*x[1] + (-0.924983308505)*x[2]**o + (0.143855834578)*x[2]
            ref[(3, 3, 0)]=0.0141423583291/(o+1.)+(-0.237488653336)+(0.0509694251395)*0.5**o
            arg[(3, 3, 1)]=0.0450901251998*x[0]**o + (0.248418143658)*x[0] + (-0.706390279264)*x[1]**o + (0.170697283345)*x[1] + (-0.661391010665)*x[2]**o + (0.749826221455)*x[2]
            ref[(3, 3, 1)]=-1.36778128993/(o+1.)+(0.584470824229)+(0.0450901251998)*0.5**o
            arg[(3, 3, 2)]=-0.839747910984*x[0]**o + (0.457886938569)*x[0] + (-0.737066695614)*x[1]**o + (-0.524178104358)*x[1] + (-0.408752667335)*x[2]**o + (-0.302962844643)*x[2]
            ref[(3, 3, 2)]=-1.14581936295/(o+1.)+(-0.184627005216)+(-0.839747910984)*0.5**o
            arg[(3, 3, 3)]=0.518793304457*x[0]**o + (-0.249857679312)*x[0] + (-0.887927635964)*x[1]**o + (0.245089132495)*x[1] + (-0.138665147008)*x[2]**o + (-0.346263926093)*x[2]
            ref[(3, 3, 3)]=-1.02659278297/(o+1.)+(-0.175516236455)+(0.518793304457)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2, 2, 4),w)
        ref=numpy.zeros((4, 2, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.219799147432*x[0]**o + (0.409441074361)*x[0] + (-0.754971135538)*x[1]**o + (0.170636114204)*x[1]
            ref[(0, 0, 0, 0)]=-0.754971135538/(o+1.)+(0.290038594282)+(0.219799147432)*0.5**o
            arg[(0, 0, 0, 1)]=-0.571410057595*x[0]**o + (0.958805897571)*x[0] + (0.0328101198028)*x[1]**o + (0.59954628523)*x[1]
            ref[(0, 0, 0, 1)]=0.0328101198028/(o+1.)+(0.7791760914)+(-0.571410057595)*0.5**o
            arg[(0, 0, 0, 2)]=0.843386632293*x[0]**o + (0.904440273089)*x[0] + (0.159173812752)*x[1]**o + (0.287590978962)*x[1]
            ref[(0, 0, 0, 2)]=0.159173812752/(o+1.)+(0.596015626025)+(0.843386632293)*0.5**o
            arg[(0, 0, 0, 3)]=-0.217248637538*x[0]**o + (0.510977990675)*x[0] + (-0.693905447065)*x[1]**o + (-0.830235579632)*x[1]
            ref[(0, 0, 0, 3)]=-0.693905447065/(o+1.)+(-0.159628794479)+(-0.217248637538)*0.5**o
            arg[(0, 0, 1, 0)]=0.234139621332*x[0]**o + (0.494885636822)*x[0] + (0.693840834776)*x[1]**o + (-0.474853679212)*x[1]
            ref[(0, 0, 1, 0)]=0.693840834776/(o+1.)+(0.010015978805)+(0.234139621332)*0.5**o
            arg[(0, 0, 1, 1)]=-0.806249588528*x[0]**o + (-0.301052930795)*x[0] + (0.0719418844219)*x[1]**o + (0.662383120232)*x[1]
            ref[(0, 0, 1, 1)]=0.0719418844219/(o+1.)+(0.180665094719)+(-0.806249588528)*0.5**o
            arg[(0, 0, 1, 2)]=0.94555904361*x[0]**o + (0.149683142995)*x[0] + (-0.859569168749)*x[1]**o + (-0.948000641183)*x[1]
            ref[(0, 0, 1, 2)]=-0.859569168749/(o+1.)+(-0.399158749094)+(0.94555904361)*0.5**o
            arg[(0, 0, 1, 3)]=-0.842751340814*x[0]**o + (0.285445458995)*x[0] + (-0.0235007674694)*x[1]**o + (0.627928262308)*x[1]
            ref[(0, 0, 1, 3)]=-0.0235007674694/(o+1.)+(0.456686860651)+(-0.842751340814)*0.5**o
            arg[(0, 1, 0, 0)]=-0.33584538487*x[0]**o + (-0.738032299836)*x[0] + (-0.974762412646)*x[1]**o + (-0.4117491351)*x[1]
            ref[(0, 1, 0, 0)]=-0.974762412646/(o+1.)+(-0.574890717468)+(-0.33584538487)*0.5**o
            arg[(0, 1, 0, 1)]=0.624058148554*x[0]**o + (0.720228483808)*x[0] + (0.795982997895)*x[1]**o + (0.437164235298)*x[1]
            ref[(0, 1, 0, 1)]=0.795982997895/(o+1.)+(0.578696359553)+(0.624058148554)*0.5**o
            arg[(0, 1, 0, 2)]=0.652500073756*x[0]**o + (-0.442517566167)*x[0] + (0.0397943071255)*x[1]**o + (-0.27538231108)*x[1]
            ref[(0, 1, 0, 2)]=0.0397943071255/(o+1.)+(-0.358949938623)+(0.652500073756)*0.5**o
            arg[(0, 1, 0, 3)]=-0.438252006901*x[0]**o + (-0.0756257243507)*x[0] + (-0.473323790212)*x[1]**o + (-0.354030834378)*x[1]
            ref[(0, 1, 0, 3)]=-0.473323790212/(o+1.)+(-0.214828279364)+(-0.438252006901)*0.5**o
            arg[(0, 1, 1, 0)]=-0.579919879832*x[0]**o + (-0.89820131091)*x[0] + (0.105290857139)*x[1]**o + (0.408179315485)*x[1]
            ref[(0, 1, 1, 0)]=0.105290857139/(o+1.)+(-0.245010997713)+(-0.579919879832)*0.5**o
            arg[(0, 1, 1, 1)]=-0.140932646957*x[0]**o + (-0.646766240673)*x[0] + (0.0379854095286)*x[1]**o + (0.739420618287)*x[1]
            ref[(0, 1, 1, 1)]=0.0379854095286/(o+1.)+(0.0463271888071)+(-0.140932646957)*0.5**o
            arg[(0, 1, 1, 2)]=-0.584062886036*x[0]**o + (0.121232339301)*x[0] + (0.725624612272)*x[1]**o + (0.793585129712)*x[1]
            ref[(0, 1, 1, 2)]=0.725624612272/(o+1.)+(0.457408734507)+(-0.584062886036)*0.5**o
            arg[(0, 1, 1, 3)]=0.513387416588*x[0]**o + (-0.242358813285)*x[0] + (0.367881731165)*x[1]**o + (-0.706829574101)*x[1]
            ref[(0, 1, 1, 3)]=0.367881731165/(o+1.)+(-0.474594193693)+(0.513387416588)*0.5**o
            arg[(1, 0, 0, 0)]=-0.753173845345*x[0]**o + (-0.63300152987)*x[0] + (0.783951118216)*x[1]**o + (-0.724120514566)*x[1]
            ref[(1, 0, 0, 0)]=0.783951118216/(o+1.)+(-0.678561022218)+(-0.753173845345)*0.5**o
            arg[(1, 0, 0, 1)]=-0.325243774045*x[0]**o + (-0.0984883539166)*x[0] + (-0.496001600468)*x[1]**o + (-0.361639472247)*x[1]
            ref[(1, 0, 0, 1)]=-0.496001600468/(o+1.)+(-0.230063913082)+(-0.325243774045)*0.5**o
            arg[(1, 0, 0, 2)]=-0.858374001074*x[0]**o + (-0.518793917832)*x[0] + (0.247264231012)*x[1]**o + (-0.0387856143039)*x[1]
            ref[(1, 0, 0, 2)]=0.247264231012/(o+1.)+(-0.278789766068)+(-0.858374001074)*0.5**o
            arg[(1, 0, 0, 3)]=-0.278649360631*x[0]**o + (0.433297013457)*x[0] + (0.555461558686)*x[1]**o + (0.107188062097)*x[1]
            ref[(1, 0, 0, 3)]=0.555461558686/(o+1.)+(0.270242537777)+(-0.278649360631)*0.5**o
            arg[(1, 0, 1, 0)]=0.287062010431*x[0]**o + (-0.798067318432)*x[0] + (-0.809375000115)*x[1]**o + (0.152751861543)*x[1]
            ref[(1, 0, 1, 0)]=-0.809375000115/(o+1.)+(-0.322657728445)+(0.287062010431)*0.5**o
            arg[(1, 0, 1, 1)]=0.0197823647197*x[0]**o + (0.443989861643)*x[0] + (0.268916496753)*x[1]**o + (-0.575956902786)*x[1]
            ref[(1, 0, 1, 1)]=0.268916496753/(o+1.)+(-0.0659835205716)+(0.0197823647197)*0.5**o
            arg[(1, 0, 1, 2)]=0.693403019082*x[0]**o + (-0.0508623489263)*x[0] + (0.41163316793)*x[1]**o + (0.233410443434)*x[1]
            ref[(1, 0, 1, 2)]=0.41163316793/(o+1.)+(0.091274047254)+(0.693403019082)*0.5**o
            arg[(1, 0, 1, 3)]=-0.667352707935*x[0]**o + (-0.240948165727)*x[0] + (-0.898926055839)*x[1]**o + (0.478750376686)*x[1]
            ref[(1, 0, 1, 3)]=-0.898926055839/(o+1.)+(0.118901105479)+(-0.667352707935)*0.5**o
            arg[(1, 1, 0, 0)]=-0.459521657955*x[0]**o + (-0.308549928009)*x[0] + (-0.321274894393)*x[1]**o + (0.485705288899)*x[1]
            ref[(1, 1, 0, 0)]=-0.321274894393/(o+1.)+(0.0885776804451)+(-0.459521657955)*0.5**o
            arg[(1, 1, 0, 1)]=-0.156816646769*x[0]**o + (0.214890453887)*x[0] + (-0.317873928857)*x[1]**o + (-0.304376922414)*x[1]
            ref[(1, 1, 0, 1)]=-0.317873928857/(o+1.)+(-0.0447432342632)+(-0.156816646769)*0.5**o
            arg[(1, 1, 0, 2)]=0.0625582498166*x[0]**o + (-0.407323219497)*x[0] + (-0.075764326964)*x[1]**o + (0.896379687649)*x[1]
            ref[(1, 1, 0, 2)]=-0.075764326964/(o+1.)+(0.244528234076)+(0.0625582498166)*0.5**o
            arg[(1, 1, 0, 3)]=0.0678015706481*x[0]**o + (0.402468232351)*x[0] + (-0.713079055803)*x[1]**o + (0.0474807643486)*x[1]
            ref[(1, 1, 0, 3)]=-0.713079055803/(o+1.)+(0.22497449835)+(0.0678015706481)*0.5**o
            arg[(1, 1, 1, 0)]=-0.350826249238*x[0]**o + (-0.425381696312)*x[0] + (-0.672903419469)*x[1]**o + (0.211824054695)*x[1]
            ref[(1, 1, 1, 0)]=-0.672903419469/(o+1.)+(-0.106778820808)+(-0.350826249238)*0.5**o
            arg[(1, 1, 1, 1)]=0.47595581991*x[0]**o + (0.351495211561)*x[0] + (-0.352356945622)*x[1]**o + (0.265867472674)*x[1]
            ref[(1, 1, 1, 1)]=-0.352356945622/(o+1.)+(0.308681342117)+(0.47595581991)*0.5**o
            arg[(1, 1, 1, 2)]=-0.388814742507*x[0]**o + (-0.744619214906)*x[0] + (0.651530287284)*x[1]**o + (0.286084438362)*x[1]
            ref[(1, 1, 1, 2)]=0.651530287284/(o+1.)+(-0.229267388272)+(-0.388814742507)*0.5**o
            arg[(1, 1, 1, 3)]=-0.712660492476*x[0]**o + (0.67441491441)*x[0] + (-0.0243905553411)*x[1]**o + (-0.845274699653)*x[1]
            ref[(1, 1, 1, 3)]=-0.0243905553411/(o+1.)+(-0.0854298926213)+(-0.712660492476)*0.5**o
            arg[(2, 0, 0, 0)]=0.972106573948*x[0]**o + (-0.842064818203)*x[0] + (0.584949740091)*x[1]**o + (0.723251242923)*x[1]
            ref[(2, 0, 0, 0)]=0.584949740091/(o+1.)+(-0.0594067876401)+(0.972106573948)*0.5**o
            arg[(2, 0, 0, 1)]=-0.0144703440553*x[0]**o + (-0.0910288119746)*x[0] + (0.727778656531)*x[1]**o + (-0.0775086946247)*x[1]
            ref[(2, 0, 0, 1)]=0.727778656531/(o+1.)+(-0.0842687532997)+(-0.0144703440553)*0.5**o
            arg[(2, 0, 0, 2)]=-0.921443660398*x[0]**o + (-0.639933112998)*x[0] + (-0.0588005446239)*x[1]**o + (0.0177052187664)*x[1]
            ref[(2, 0, 0, 2)]=-0.0588005446239/(o+1.)+(-0.311113947116)+(-0.921443660398)*0.5**o
            arg[(2, 0, 0, 3)]=0.997940216706*x[0]**o + (0.450152125535)*x[0] + (0.304257998509)*x[1]**o + (-0.241146971637)*x[1]
            ref[(2, 0, 0, 3)]=0.304257998509/(o+1.)+(0.104502576949)+(0.997940216706)*0.5**o
            arg[(2, 0, 1, 0)]=-0.297571615046*x[0]**o + (0.323625859559)*x[0] + (0.706774298303)*x[1]**o + (-0.519272712139)*x[1]
            ref[(2, 0, 1, 0)]=0.706774298303/(o+1.)+(-0.0978234262902)+(-0.297571615046)*0.5**o
            arg[(2, 0, 1, 1)]=0.634193891177*x[0]**o + (0.648404774128)*x[0] + (0.822045229248)*x[1]**o + (-0.51502110701)*x[1]
            ref[(2, 0, 1, 1)]=0.822045229248/(o+1.)+(0.0666918335588)+(0.634193891177)*0.5**o
            arg[(2, 0, 1, 2)]=-0.92354575334*x[0]**o + (-0.089926314894)*x[0] + (0.298802662186)*x[1]**o + (-0.913511920831)*x[1]
            ref[(2, 0, 1, 2)]=0.298802662186/(o+1.)+(-0.501719117862)+(-0.92354575334)*0.5**o
            arg[(2, 0, 1, 3)]=0.603809765499*x[0]**o + (-0.501845454962)*x[0] + (-0.0729830570525)*x[1]**o + (-0.69074436857)*x[1]
            ref[(2, 0, 1, 3)]=-0.0729830570525/(o+1.)+(-0.596294911766)+(0.603809765499)*0.5**o
            arg[(2, 1, 0, 0)]=-0.0259465284209*x[0]**o + (-0.777552831609)*x[0] + (-0.273808515263)*x[1]**o + (-0.443107163903)*x[1]
            ref[(2, 1, 0, 0)]=-0.273808515263/(o+1.)+(-0.610329997756)+(-0.0259465284209)*0.5**o
            arg[(2, 1, 0, 1)]=-0.250672892254*x[0]**o + (-0.380227906846)*x[0] + (-0.540124891009)*x[1]**o + (0.260922326808)*x[1]
            ref[(2, 1, 0, 1)]=-0.540124891009/(o+1.)+(-0.0596527900187)+(-0.250672892254)*0.5**o
            arg[(2, 1, 0, 2)]=-0.188173695805*x[0]**o + (0.397870882952)*x[0] + (0.110174550498)*x[1]**o + (-0.643605781661)*x[1]
            ref[(2, 1, 0, 2)]=0.110174550498/(o+1.)+(-0.122867449355)+(-0.188173695805)*0.5**o
            arg[(2, 1, 0, 3)]=0.327408423934*x[0]**o + (0.191997775395)*x[0] + (0.513698826913)*x[1]**o + (0.873526994684)*x[1]
            ref[(2, 1, 0, 3)]=0.513698826913/(o+1.)+(0.532762385039)+(0.327408423934)*0.5**o
            arg[(2, 1, 1, 0)]=0.528523433071*x[0]**o + (-0.175365810973)*x[0] + (0.725179793627)*x[1]**o + (0.890866204771)*x[1]
            ref[(2, 1, 1, 0)]=0.725179793627/(o+1.)+(0.357750196899)+(0.528523433071)*0.5**o
            arg[(2, 1, 1, 1)]=-0.570522302426*x[0]**o + (0.970203438728)*x[0] + (-0.505167185168)*x[1]**o + (0.979355059223)*x[1]
            ref[(2, 1, 1, 1)]=-0.505167185168/(o+1.)+(0.974779248976)+(-0.570522302426)*0.5**o
            arg[(2, 1, 1, 2)]=-0.823120254279*x[0]**o + (-0.310055488823)*x[0] + (-0.0231416857967)*x[1]**o + (0.860454846106)*x[1]
            ref[(2, 1, 1, 2)]=-0.0231416857967/(o+1.)+(0.275199678641)+(-0.823120254279)*0.5**o
            arg[(2, 1, 1, 3)]=-0.980809800347*x[0]**o + (0.722004857381)*x[0] + (0.085931944015)*x[1]**o + (0.590997606848)*x[1]
            ref[(2, 1, 1, 3)]=0.085931944015/(o+1.)+(0.656501232115)+(-0.980809800347)*0.5**o
            arg[(3, 0, 0, 0)]=-0.657586956618*x[0]**o + (-0.422292022105)*x[0] + (-0.611643516543)*x[1]**o + (-0.41752001128)*x[1]
            ref[(3, 0, 0, 0)]=-0.611643516543/(o+1.)+(-0.419906016693)+(-0.657586956618)*0.5**o
            arg[(3, 0, 0, 1)]=0.981839494146*x[0]**o + (0.136652557732)*x[0] + (-0.949226440651)*x[1]**o + (0.211516408269)*x[1]
            ref[(3, 0, 0, 1)]=-0.949226440651/(o+1.)+(0.174084483001)+(0.981839494146)*0.5**o
            arg[(3, 0, 0, 2)]=-0.913346703398*x[0]**o + (0.885586416272)*x[0] + (-0.352903306995)*x[1]**o + (-0.134144900466)*x[1]
            ref[(3, 0, 0, 2)]=-0.352903306995/(o+1.)+(0.375720757903)+(-0.913346703398)*0.5**o
            arg[(3, 0, 0, 3)]=-0.775105800856*x[0]**o + (0.522626751341)*x[0] + (-0.320393601496)*x[1]**o + (-0.643356015376)*x[1]
            ref[(3, 0, 0, 3)]=-0.320393601496/(o+1.)+(-0.0603646320171)+(-0.775105800856)*0.5**o
            arg[(3, 0, 1, 0)]=-0.583699204051*x[0]**o + (0.247957588268)*x[0] + (0.653388396586)*x[1]**o + (0.6685691844)*x[1]
            ref[(3, 0, 1, 0)]=0.653388396586/(o+1.)+(0.458263386334)+(-0.583699204051)*0.5**o
            arg[(3, 0, 1, 1)]=-0.116629107312*x[0]**o + (-0.920416883639)*x[0] + (0.399201865446)*x[1]**o + (-0.541187949414)*x[1]
            ref[(3, 0, 1, 1)]=0.399201865446/(o+1.)+(-0.730802416526)+(-0.116629107312)*0.5**o
            arg[(3, 0, 1, 2)]=-0.41233331161*x[0]**o + (0.857319409308)*x[0] + (-0.467126635853)*x[1]**o + (-0.843969333667)*x[1]
            ref[(3, 0, 1, 2)]=-0.467126635853/(o+1.)+(0.00667503782077)+(-0.41233331161)*0.5**o
            arg[(3, 0, 1, 3)]=0.336146616369*x[0]**o + (0.90994679775)*x[0] + (0.241542086378)*x[1]**o + (0.241856632591)*x[1]
            ref[(3, 0, 1, 3)]=0.241542086378/(o+1.)+(0.57590171517)+(0.336146616369)*0.5**o
            arg[(3, 1, 0, 0)]=-0.101327849955*x[0]**o + (-0.225987042793)*x[0] + (0.0889533369345)*x[1]**o + (0.764932618186)*x[1]
            ref[(3, 1, 0, 0)]=0.0889533369345/(o+1.)+(0.269472787696)+(-0.101327849955)*0.5**o
            arg[(3, 1, 0, 1)]=-0.505204768102*x[0]**o + (-0.259429722574)*x[0] + (0.116913137358)*x[1]**o + (0.867314379698)*x[1]
            ref[(3, 1, 0, 1)]=0.116913137358/(o+1.)+(0.303942328562)+(-0.505204768102)*0.5**o
            arg[(3, 1, 0, 2)]=-0.0573042189568*x[0]**o + (0.591247655513)*x[0] + (-0.432539985242)*x[1]**o + (-0.128958056131)*x[1]
            ref[(3, 1, 0, 2)]=-0.432539985242/(o+1.)+(0.231144799691)+(-0.0573042189568)*0.5**o
            arg[(3, 1, 0, 3)]=0.389751327793*x[0]**o + (-0.132553559524)*x[0] + (-0.960181367246)*x[1]**o + (-0.210567252152)*x[1]
            ref[(3, 1, 0, 3)]=-0.960181367246/(o+1.)+(-0.171560405838)+(0.389751327793)*0.5**o
            arg[(3, 1, 1, 0)]=-0.430612094816*x[0]**o + (0.186723293385)*x[0] + (-0.664923722163)*x[1]**o + (-0.775550977316)*x[1]
            ref[(3, 1, 1, 0)]=-0.664923722163/(o+1.)+(-0.294413841966)+(-0.430612094816)*0.5**o
            arg[(3, 1, 1, 1)]=0.66233339201*x[0]**o + (-0.140194899421)*x[0] + (-0.112519415214)*x[1]**o + (0.467018958853)*x[1]
            ref[(3, 1, 1, 1)]=-0.112519415214/(o+1.)+(0.163412029716)+(0.66233339201)*0.5**o
            arg[(3, 1, 1, 2)]=-0.0706628456056*x[0]**o + (-0.0481669444737)*x[0] + (0.173528026851)*x[1]**o + (0.241484134775)*x[1]
            ref[(3, 1, 1, 2)]=0.173528026851/(o+1.)+(0.0966585951509)+(-0.0706628456056)*0.5**o
            arg[(3, 1, 1, 3)]=-0.433755197154*x[0]**o + (-0.943867269283)*x[0] + (0.439147624224)*x[1]**o + (0.156409550308)*x[1]
            ref[(3, 1, 1, 3)]=0.439147624224/(o+1.)+(-0.393728859488)+(-0.433755197154)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.797807406287*x[0]**o + (0.685208254716)*x[0] + (-0.727627887348)*x[1]**o + (-0.682697522718)*x[1] + (-0.0480620711657)*x[2]**o + (0.468743674744)*x[2]
            ref[(0, 0, 0, 0)]=-0.775689958513/(o+1.)+(0.235627203371)+(-0.797807406287)*0.5**o
            arg[(0, 0, 0, 1)]=0.913215173475*x[0]**o + (-0.982743449969)*x[0] + (-0.514892780831)*x[1]**o + (-0.843799502575)*x[1] + (0.0754037047533)*x[2]**o + (0.327252041706)*x[2]
            ref[(0, 0, 0, 1)]=-0.439489076078/(o+1.)+(-0.749645455419)+(0.913215173475)*0.5**o
            arg[(0, 0, 0, 2)]=-0.234125714444*x[0]**o + (-0.270904367394)*x[0] + (-0.606740076032)*x[1]**o + (-0.594334951175)*x[1] + (-0.00422636821055)*x[2]**o + (-0.0939734372392)*x[2]
            ref[(0, 0, 0, 2)]=-0.610966444243/(o+1.)+(-0.479606377904)+(-0.234125714444)*0.5**o
            arg[(0, 0, 0, 3)]=0.221444466127*x[0]**o + (0.585510978618)*x[0] + (0.101818638037)*x[1]**o + (-0.338629147118)*x[1] + (-0.665533454261)*x[2]**o + (0.0074239011979)*x[2]
            ref[(0, 0, 0, 3)]=-0.563714816224/(o+1.)+(0.127152866349)+(0.221444466127)*0.5**o
            arg[(0, 0, 1, 0)]=-0.65052785321*x[0]**o + (0.292740783552)*x[0] + (-0.283921929932)*x[1]**o + (0.439525698486)*x[1] + (-0.837697399661)*x[2]**o + (0.925508326777)*x[2]
            ref[(0, 0, 1, 0)]=-1.12161932959/(o+1.)+(0.828887404407)+(-0.65052785321)*0.5**o
            arg[(0, 0, 1, 1)]=-0.208404214667*x[0]**o + (0.0704607918528)*x[0] + (-0.402865100906)*x[1]**o + (0.596282465483)*x[1] + (-0.290979608878)*x[2]**o + (-0.872244641031)*x[2]
            ref[(0, 0, 1, 1)]=-0.693844709784/(o+1.)+(-0.102750691847)+(-0.208404214667)*0.5**o
            arg[(0, 0, 1, 2)]=0.0991355854112*x[0]**o + (0.0152491603669)*x[0] + (-0.638347899401)*x[1]**o + (-0.693622818103)*x[1] + (-0.102034591227)*x[2]**o + (0.898914250096)*x[2]
            ref[(0, 0, 1, 2)]=-0.740382490628/(o+1.)+(0.11027029618)+(0.0991355854112)*0.5**o
            arg[(0, 0, 1, 3)]=-0.834302094918*x[0]**o + (-0.50966410171)*x[0] + (-0.864009173973)*x[1]**o + (0.738926582556)*x[1] + (-0.160319247883)*x[2]**o + (0.180885354709)*x[2]
            ref[(0, 0, 1, 3)]=-1.02432842186/(o+1.)+(0.205073917778)+(-0.834302094918)*0.5**o
            arg[(0, 1, 0, 0)]=0.706027705869*x[0]**o + (0.158609897134)*x[0] + (0.955782956596)*x[1]**o + (-0.0979549567345)*x[1] + (-0.64587088456)*x[2]**o + (0.698172574663)*x[2]
            ref[(0, 1, 0, 0)]=0.309912072036/(o+1.)+(0.379413757531)+(0.706027705869)*0.5**o
            arg[(0, 1, 0, 1)]=0.86805961638*x[0]**o + (-0.614332647785)*x[0] + (-0.712165669864)*x[1]**o + (-0.971152369741)*x[1] + (0.315505694332)*x[2]**o + (-0.985909958178)*x[2]
            ref[(0, 1, 0, 1)]=-0.396659975532/(o+1.)+(-1.28569748785)+(0.86805961638)*0.5**o
            arg[(0, 1, 0, 2)]=0.539478538896*x[0]**o + (-0.248811273486)*x[0] + (0.426521818296)*x[1]**o + (0.153751866486)*x[1] + (0.922027465155)*x[2]**o + (0.51758444331)*x[2]
            ref[(0, 1, 0, 2)]=1.34854928345/(o+1.)+(0.211262518155)+(0.539478538896)*0.5**o
            arg[(0, 1, 0, 3)]=-0.653506030922*x[0]**o + (0.203993856524)*x[0] + (-4.55889954505e-05)*x[1]**o + (-0.369579534632)*x[1] + (0.602527691445)*x[2]**o + (-0.929204569281)*x[2]
            ref[(0, 1, 0, 3)]=0.60248210245/(o+1.)+(-0.547395123695)+(-0.653506030922)*0.5**o
            arg[(0, 1, 1, 0)]=-0.489841393162*x[0]**o + (0.0688105741061)*x[0] + (0.829445468003)*x[1]**o + (0.62482125354)*x[1] + (-0.576779644623)*x[2]**o + (0.180733367437)*x[2]
            ref[(0, 1, 1, 0)]=0.25266582338/(o+1.)+(0.437182597542)+(-0.489841393162)*0.5**o
            arg[(0, 1, 1, 1)]=-0.711252421945*x[0]**o + (0.0645113493072)*x[0] + (0.624156699105)*x[1]**o + (-0.498902822856)*x[1] + (-0.60799951761)*x[2]**o + (0.751022234489)*x[2]
            ref[(0, 1, 1, 1)]=0.0161571814956/(o+1.)+(0.15831538047)+(-0.711252421945)*0.5**o
            arg[(0, 1, 1, 2)]=0.876213830356*x[0]**o + (0.103591792578)*x[0] + (0.186376422019)*x[1]**o + (-0.849801330139)*x[1] + (0.0207159364655)*x[2]**o + (-0.226611099834)*x[2]
            ref[(0, 1, 1, 2)]=0.207092358485/(o+1.)+(-0.486410318698)+(0.876213830356)*0.5**o
            arg[(0, 1, 1, 3)]=0.0541929647992*x[0]**o + (-0.462771044731)*x[0] + (0.246592045105)*x[1]**o + (-0.39653542215)*x[1] + (-0.422512476917)*x[2]**o + (-0.818107516729)*x[2]
            ref[(0, 1, 1, 3)]=-0.175920431811/(o+1.)+(-0.838706991805)+(0.0541929647992)*0.5**o
            arg[(1, 0, 0, 0)]=0.890395527363*x[0]**o + (0.212937080324)*x[0] + (0.906790374364)*x[1]**o + (0.360774085263)*x[1] + (-0.0808014454509)*x[2]**o + (0.675873328365)*x[2]
            ref[(1, 0, 0, 0)]=0.825988928913/(o+1.)+(0.624792246976)+(0.890395527363)*0.5**o
            arg[(1, 0, 0, 1)]=0.173506389265*x[0]**o + (-0.806809390975)*x[0] + (0.0596732563989)*x[1]**o + (-0.130174078038)*x[1] + (-0.914406559777)*x[2]**o + (0.456680557394)*x[2]
            ref[(1, 0, 0, 1)]=-0.854733303378/(o+1.)+(-0.240151455809)+(0.173506389265)*0.5**o
            arg[(1, 0, 0, 2)]=0.17593096604*x[0]**o + (0.891211795405)*x[0] + (-0.849119938058)*x[1]**o + (-0.383820593548)*x[1] + (-0.649021270963)*x[2]**o + (0.889751584551)*x[2]
            ref[(1, 0, 0, 2)]=-1.49814120902/(o+1.)+(0.698571393204)+(0.17593096604)*0.5**o
            arg[(1, 0, 0, 3)]=0.737748322951*x[0]**o + (-0.136719600073)*x[0] + (-0.0209223286294)*x[1]**o + (0.174671744722)*x[1] + (-0.326652608828)*x[2]**o + (-0.993243469273)*x[2]
            ref[(1, 0, 0, 3)]=-0.347574937457/(o+1.)+(-0.477645662312)+(0.737748322951)*0.5**o
            arg[(1, 0, 1, 0)]=0.342608024454*x[0]**o + (0.152135895868)*x[0] + (0.792282255999)*x[1]**o + (0.544795510183)*x[1] + (0.717044590747)*x[2]**o + (-0.867497691942)*x[2]
            ref[(1, 0, 1, 0)]=1.50932684675/(o+1.)+(-0.085283142946)+(0.342608024454)*0.5**o
            arg[(1, 0, 1, 1)]=-0.187491991869*x[0]**o + (-0.443216165941)*x[0] + (-0.138422989335)*x[1]**o + (-0.694083381463)*x[1] + (-0.370869323791)*x[2]**o + (-0.514856781707)*x[2]
            ref[(1, 0, 1, 1)]=-0.509292313126/(o+1.)+(-0.826078164555)+(-0.187491991869)*0.5**o
            arg[(1, 0, 1, 2)]=-0.248118613055*x[0]**o + (-0.155050506427)*x[0] + (0.916089595281)*x[1]**o + (-0.921184273876)*x[1] + (-0.306702033157)*x[2]**o + (-0.769852058655)*x[2]
            ref[(1, 0, 1, 2)]=0.609387562124/(o+1.)+(-0.923043419479)+(-0.248118613055)*0.5**o
            arg[(1, 0, 1, 3)]=0.836849764141*x[0]**o + (-0.871816529092)*x[0] + (0.512038712795)*x[1]**o + (-0.533736475031)*x[1] + (-0.587062498154)*x[2]**o + (-0.569835130653)*x[2]
            ref[(1, 0, 1, 3)]=-0.0750237853589/(o+1.)+(-0.987694067388)+(0.836849764141)*0.5**o
            arg[(1, 1, 0, 0)]=-0.543613621018*x[0]**o + (-0.884558995153)*x[0] + (-0.348687819773)*x[1]**o + (0.728169655151)*x[1] + (-0.993644578547)*x[2]**o + (-0.801903055409)*x[2]
            ref[(1, 1, 0, 0)]=-1.34233239832/(o+1.)+(-0.479146197705)+(-0.543613621018)*0.5**o
            arg[(1, 1, 0, 1)]=0.204873863214*x[0]**o + (0.153657431201)*x[0] + (-0.312510618921)*x[1]**o + (0.0178512450079)*x[1] + (0.443794675597)*x[2]**o + (0.53623745742)*x[2]
            ref[(1, 1, 0, 1)]=0.131284056675/(o+1.)+(0.353873066814)+(0.204873863214)*0.5**o
            arg[(1, 1, 0, 2)]=0.234689226268*x[0]**o + (-0.695604628996)*x[0] + (0.0292566474387)*x[1]**o + (-0.00719538214831)*x[1] + (-0.627180355687)*x[2]**o + (0.746603988764)*x[2]
            ref[(1, 1, 0, 2)]=-0.597923708248/(o+1.)+(0.0219019888102)+(0.234689226268)*0.5**o
            arg[(1, 1, 0, 3)]=0.294960950276*x[0]**o + (0.567426042431)*x[0] + (0.36427153273)*x[1]**o + (0.156067805126)*x[1] + (-0.532263878516)*x[2]**o + (0.564833665862)*x[2]
            ref[(1, 1, 0, 3)]=-0.167992345786/(o+1.)+(0.644163756709)+(0.294960950276)*0.5**o
            arg[(1, 1, 1, 0)]=0.212072065737*x[0]**o + (-0.895641161474)*x[0] + (0.129430398339)*x[1]**o + (-0.0701243121782)*x[1] + (-0.367841009677)*x[2]**o + (-0.846926603649)*x[2]
            ref[(1, 1, 1, 0)]=-0.238410611338/(o+1.)+(-0.906346038651)+(0.212072065737)*0.5**o
            arg[(1, 1, 1, 1)]=-0.911038474143*x[0]**o + (-0.333804753094)*x[0] + (-0.206192690516)*x[1]**o + (-0.902467421444)*x[1] + (-0.994694600212)*x[2]**o + (-0.222866271024)*x[2]
            ref[(1, 1, 1, 1)]=-1.20088729073/(o+1.)+(-0.729569222781)+(-0.911038474143)*0.5**o
            arg[(1, 1, 1, 2)]=0.570241061847*x[0]**o + (-0.469582940978)*x[0] + (-0.396283655058)*x[1]**o + (0.523584283416)*x[1] + (0.636490510385)*x[2]**o + (0.967918121981)*x[2]
            ref[(1, 1, 1, 2)]=0.240206855327/(o+1.)+(0.510959732209)+(0.570241061847)*0.5**o
            arg[(1, 1, 1, 3)]=0.382057052777*x[0]**o + (-0.416321337871)*x[0] + (0.964985070048)*x[1]**o + (-0.231014716412)*x[1] + (-0.412029157046)*x[2]**o + (-0.41643119517)*x[2]
            ref[(1, 1, 1, 3)]=0.552955913002/(o+1.)+(-0.531883624727)+(0.382057052777)*0.5**o
            arg[(2, 0, 0, 0)]=-0.536039987597*x[0]**o + (0.554424416493)*x[0] + (0.409800272357)*x[1]**o + (0.604118728133)*x[1] + (0.0467883343071)*x[2]**o + (0.569865348942)*x[2]
            ref[(2, 0, 0, 0)]=0.456588606664/(o+1.)+(0.864204246784)+(-0.536039987597)*0.5**o
            arg[(2, 0, 0, 1)]=0.128626907112*x[0]**o + (-0.436601201326)*x[0] + (0.839111433983)*x[1]**o + (0.0100611679763)*x[1] + (-0.274085988724)*x[2]**o + (0.265389561395)*x[2]
            ref[(2, 0, 0, 1)]=0.565025445259/(o+1.)+(-0.0805752359778)+(0.128626907112)*0.5**o
            arg[(2, 0, 0, 2)]=-0.780173300684*x[0]**o + (-0.129694288921)*x[0] + (-0.111848105499)*x[1]**o + (0.0284084430567)*x[1] + (-0.979651892297)*x[2]**o + (0.573856061282)*x[2]
            ref[(2, 0, 0, 2)]=-1.0914999978/(o+1.)+(0.236285107709)+(-0.780173300684)*0.5**o
            arg[(2, 0, 0, 3)]=0.066699682594*x[0]**o + (-0.827539678631)*x[0] + (-0.115916288936)*x[1]**o + (0.302217104511)*x[1] + (-0.487466327955)*x[2]**o + (0.659542117818)*x[2]
            ref[(2, 0, 0, 3)]=-0.603382616891/(o+1.)+(0.0671097718492)+(0.066699682594)*0.5**o
            arg[(2, 0, 1, 0)]=0.0443868217322*x[0]**o + (0.410880975868)*x[0] + (0.225101358867)*x[1]**o + (-0.333375535641)*x[1] + (-0.626737507423)*x[2]**o + (0.29638626421)*x[2]
            ref[(2, 0, 1, 0)]=-0.401636148556/(o+1.)+(0.186945852219)+(0.0443868217322)*0.5**o
            arg[(2, 0, 1, 1)]=0.776846195708*x[0]**o + (0.838318683355)*x[0] + (0.755717327827)*x[1]**o + (0.21762765221)*x[1] + (0.25919934043)*x[2]**o + (-0.655718877747)*x[2]
            ref[(2, 0, 1, 1)]=1.01491666826/(o+1.)+(0.200113728909)+(0.776846195708)*0.5**o
            arg[(2, 0, 1, 2)]=-0.902834803584*x[0]**o + (-0.816259672379)*x[0] + (0.363660552001)*x[1]**o + (-0.786082642661)*x[1] + (0.584680138087)*x[2]**o + (0.505539080626)*x[2]
            ref[(2, 0, 1, 2)]=0.948340690088/(o+1.)+(-0.548401617207)+(-0.902834803584)*0.5**o
            arg[(2, 0, 1, 3)]=0.39738455419*x[0]**o + (-0.777544921878)*x[0] + (0.792411318797)*x[1]**o + (-0.5422496318)*x[1] + (0.265517355311)*x[2]**o + (0.00782900934884)*x[2]
            ref[(2, 0, 1, 3)]=1.05792867411/(o+1.)+(-0.655982772165)+(0.39738455419)*0.5**o
            arg[(2, 1, 0, 0)]=0.448993861277*x[0]**o + (0.987773613929)*x[0] + (-0.110264699972)*x[1]**o + (0.69816257969)*x[1] + (-0.555930425851)*x[2]**o + (-0.104924457756)*x[2]
            ref[(2, 1, 0, 0)]=-0.666195125822/(o+1.)+(0.790505867931)+(0.448993861277)*0.5**o
            arg[(2, 1, 0, 1)]=0.553693463647*x[0]**o + (0.281848282054)*x[0] + (-0.519207449673)*x[1]**o + (-0.739798705427)*x[1] + (0.792110840658)*x[2]**o + (-0.705612510074)*x[2]
            ref[(2, 1, 0, 1)]=0.272903390985/(o+1.)+(-0.581781466723)+(0.553693463647)*0.5**o
            arg[(2, 1, 0, 2)]=-0.109368921134*x[0]**o + (-0.504436292104)*x[0] + (0.480209071127)*x[1]**o + (-0.499964622937)*x[1] + (-0.184625909704)*x[2]**o + (-0.0719561667806)*x[2]
            ref[(2, 1, 0, 2)]=0.295583161423/(o+1.)+(-0.538178540911)+(-0.109368921134)*0.5**o
            arg[(2, 1, 0, 3)]=0.926864287398*x[0]**o + (-0.402011393425)*x[0] + (0.165232858626)*x[1]**o + (-0.519888551342)*x[1] + (0.525735686715)*x[2]**o + (0.782538884443)*x[2]
            ref[(2, 1, 0, 3)]=0.690968545341/(o+1.)+(-0.0696805301622)+(0.926864287398)*0.5**o
            arg[(2, 1, 1, 0)]=0.260671354167*x[0]**o + (0.758836228131)*x[0] + (0.772944921778)*x[1]**o + (0.371114300684)*x[1] + (-0.184176008534)*x[2]**o + (0.186439399608)*x[2]
            ref[(2, 1, 1, 0)]=0.588768913244/(o+1.)+(0.658194964212)+(0.260671354167)*0.5**o
            arg[(2, 1, 1, 1)]=0.371344454009*x[0]**o + (-0.952283350476)*x[0] + (-0.683700668497)*x[1]**o + (-0.707197410794)*x[1] + (0.829786379439)*x[2]**o + (0.18037986293)*x[2]
            ref[(2, 1, 1, 1)]=0.146085710942/(o+1.)+(-0.739550449169)+(0.371344454009)*0.5**o
            arg[(2, 1, 1, 2)]=-0.619535533962*x[0]**o + (0.19042657104)*x[0] + (0.119377269521)*x[1]**o + (-0.45806439449)*x[1] + (-0.277559810982)*x[2]**o + (0.277645858338)*x[2]
            ref[(2, 1, 1, 2)]=-0.158182541461/(o+1.)+(0.00500401744417)+(-0.619535533962)*0.5**o
            arg[(2, 1, 1, 3)]=0.916715685311*x[0]**o + (-0.855719590659)*x[0] + (0.0617393663409)*x[1]**o + (0.55809109336)*x[1] + (0.708324627381)*x[2]**o + (-0.263911490241)*x[2]
            ref[(2, 1, 1, 3)]=0.770063993722/(o+1.)+(-0.28076999377)+(0.916715685311)*0.5**o
            arg[(3, 0, 0, 0)]=0.295732658261*x[0]**o + (0.111995477957)*x[0] + (0.762166221899)*x[1]**o + (-0.927861876766)*x[1] + (0.147627205314)*x[2]**o + (0.658190252909)*x[2]
            ref[(3, 0, 0, 0)]=0.909793427213/(o+1.)+(-0.0788380729499)+(0.295732658261)*0.5**o
            arg[(3, 0, 0, 1)]=0.599385579208*x[0]**o + (0.218174014717)*x[0] + (-0.971724774536)*x[1]**o + (0.938245178913)*x[1] + (-0.202976666032)*x[2]**o + (0.439325978065)*x[2]
            ref[(3, 0, 0, 1)]=-1.17470144057/(o+1.)+(0.797872585847)+(0.599385579208)*0.5**o
            arg[(3, 0, 0, 2)]=-0.216766442251*x[0]**o + (0.921220380785)*x[0] + (-0.112865976139)*x[1]**o + (-0.49683090384)*x[1] + (-0.502331576215)*x[2]**o + (0.930798436189)*x[2]
            ref[(3, 0, 0, 2)]=-0.615197552354/(o+1.)+(0.677593956567)+(-0.216766442251)*0.5**o
            arg[(3, 0, 0, 3)]=0.669850456552*x[0]**o + (0.967902895375)*x[0] + (0.848609436778)*x[1]**o + (-0.0403121169321)*x[1] + (0.348022206448)*x[2]**o + (0.20429098708)*x[2]
            ref[(3, 0, 0, 3)]=1.19663164323/(o+1.)+(0.565940882762)+(0.669850456552)*0.5**o
            arg[(3, 0, 1, 0)]=-0.749982902935*x[0]**o + (0.234046714064)*x[0] + (-0.930524312259)*x[1]**o + (-0.805639113789)*x[1] + (-0.803753898384)*x[2]**o + (-0.428058629113)*x[2]
            ref[(3, 0, 1, 0)]=-1.73427821064/(o+1.)+(-0.499825514419)+(-0.749982902935)*0.5**o
            arg[(3, 0, 1, 1)]=-0.0890023732483*x[0]**o + (-0.535120400689)*x[0] + (-0.639801359744)*x[1]**o + (-0.964156876028)*x[1] + (0.963708233878)*x[2]**o + (-0.225323591649)*x[2]
            ref[(3, 0, 1, 1)]=0.323906874134/(o+1.)+(-0.862300434183)+(-0.0890023732483)*0.5**o
            arg[(3, 0, 1, 2)]=0.0863344831533*x[0]**o + (-0.20426338658)*x[0] + (-0.0133174321938)*x[1]**o + (0.984022241261)*x[1] + (-0.956068156147)*x[2]**o + (-0.759292960038)*x[2]
            ref[(3, 0, 1, 2)]=-0.969385588341/(o+1.)+(0.0102329473216)+(0.0863344831533)*0.5**o
            arg[(3, 0, 1, 3)]=-0.199693924202*x[0]**o + (0.684607065655)*x[0] + (0.673898617505)*x[1]**o + (-0.249767728601)*x[1] + (-0.736160541776)*x[2]**o + (-0.926548004954)*x[2]
            ref[(3, 0, 1, 3)]=-0.0622619242708/(o+1.)+(-0.24585433395)+(-0.199693924202)*0.5**o
            arg[(3, 1, 0, 0)]=0.278855181878*x[0]**o + (0.963253741099)*x[0] + (0.40207232736)*x[1]**o + (0.901135253451)*x[1] + (0.150030826229)*x[2]**o + (0.564041883765)*x[2]
            ref[(3, 1, 0, 0)]=0.552103153589/(o+1.)+(1.21421543916)+(0.278855181878)*0.5**o
            arg[(3, 1, 0, 1)]=-0.213056087593*x[0]**o + (-0.919115952295)*x[0] + (0.727954840746)*x[1]**o + (0.514610118165)*x[1] + (0.305520929507)*x[2]**o + (0.822734410927)*x[2]
            ref[(3, 1, 0, 1)]=1.03347577025/(o+1.)+(0.209114288399)+(-0.213056087593)*0.5**o
            arg[(3, 1, 0, 2)]=-0.13848016611*x[0]**o + (-0.978757022156)*x[0] + (0.114670064342)*x[1]**o + (-0.946765521198)*x[1] + (0.711821597)*x[2]**o + (0.25915094834)*x[2]
            ref[(3, 1, 0, 2)]=0.826491661342/(o+1.)+(-0.833185797507)+(-0.13848016611)*0.5**o
            arg[(3, 1, 0, 3)]=-0.287785900925*x[0]**o + (0.160900397004)*x[0] + (-0.173912418526)*x[1]**o + (-0.686996834158)*x[1] + (0.592091516997)*x[2]**o + (0.959284692068)*x[2]
            ref[(3, 1, 0, 3)]=0.418179098471/(o+1.)+(0.216594127457)+(-0.287785900925)*0.5**o
            arg[(3, 1, 1, 0)]=-0.614340140529*x[0]**o + (-0.00745819283501)*x[0] + (-0.089635496095)*x[1]**o + (-0.240452140246)*x[1] + (0.0425237145331)*x[2]**o + (-0.565757247637)*x[2]
            ref[(3, 1, 1, 0)]=-0.0471117815619/(o+1.)+(-0.406833790359)+(-0.614340140529)*0.5**o
            arg[(3, 1, 1, 1)]=-0.535375635811*x[0]**o + (0.536582091659)*x[0] + (-0.103470688851)*x[1]**o + (0.162745357465)*x[1] + (0.0692093651291)*x[2]**o + (-0.213582612869)*x[2]
            ref[(3, 1, 1, 1)]=-0.0342613237217/(o+1.)+(0.242872418128)+(-0.535375635811)*0.5**o
            arg[(3, 1, 1, 2)]=-0.27447182123*x[0]**o + (0.110637446212)*x[0] + (0.631935729371)*x[1]**o + (0.582936961624)*x[1] + (0.148297631807)*x[2]**o + (-0.190097997192)*x[2]
            ref[(3, 1, 1, 2)]=0.780233361178/(o+1.)+(0.251738205322)+(-0.27447182123)*0.5**o
            arg[(3, 1, 1, 3)]=0.462978431592*x[0]**o + (-0.482020616752)*x[0] + (-0.866814278276)*x[1]**o + (0.234278511774)*x[1] + (-0.0255364393148)*x[2]**o + (0.130554744591)*x[2]
            ref[(3, 1, 1, 3)]=-0.892350717591/(o+1.)+(-0.0585936801938)+(0.462978431592)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.225261303445*x[0]**o + (-0.615455740121)*x[0] + (-0.971549030244)*x[1]**o + (-0.737793446446)*x[1]
            ref=-0.971549030244/(o+1.)+(-0.676624593284)+(0.225261303445)*0.5**o
        else:
            arg=-0.382224169809*x[0]**o + (-0.00816454563811)*x[0] + (-0.282152952058)*x[1]**o + (-0.335735613822)*x[1] + (-0.504500374644)*x[2]**o + (0.756900282859)*x[2]
            ref=-0.786653326702/(o+1.)+(0.2065000617)+(-0.382224169809)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.4156590759*x[0]**o + (0.765336693944)*x[0] + (-0.508966718347)*x[1]**o + (-0.551215047186)*x[1]
            ref[(0,)]=-0.508966718347/(o+1.)+(0.107060823379)+(-0.4156590759)*0.5**o
            arg[(1,)]=0.303794191308*x[0]**o + (-0.110193677224)*x[0] + (-0.919520531935)*x[1]**o + (0.842727022351)*x[1]
            ref[(1,)]=-0.919520531935/(o+1.)+(0.366266672563)+(0.303794191308)*0.5**o
            arg[(2,)]=-0.200645613878*x[0]**o + (-0.435809011348)*x[0] + (-0.169756649348)*x[1]**o + (0.856088061779)*x[1]
            ref[(2,)]=-0.169756649348/(o+1.)+(0.210139525215)+(-0.200645613878)*0.5**o
            arg[(3,)]=0.368994259977*x[0]**o + (-0.647566275309)*x[0] + (0.940506685963)*x[1]**o + (0.993965472477)*x[1]
            ref[(3,)]=0.940506685963/(o+1.)+(0.173199598584)+(0.368994259977)*0.5**o
        else:
            arg[(0,)]=0.444459629494*x[0]**o + (-0.364022875419)*x[0] + (0.507971437118)*x[1]**o + (0.265681526301)*x[1] + (0.882298304224)*x[2]**o + (-0.331619349724)*x[2]
            ref[(0,)]=1.39026974134/(o+1.)+(-0.214980349421)+(0.444459629494)*0.5**o
            arg[(1,)]=-0.867531716073*x[0]**o + (0.868182251526)*x[0] + (-0.863817896254)*x[1]**o + (-0.566927155158)*x[1] + (-0.19755470587)*x[2]**o + (-0.332902532668)*x[2]
            ref[(1,)]=-1.06137260212/(o+1.)+(-0.0158237181501)+(-0.867531716073)*0.5**o
            arg[(2,)]=0.636862244061*x[0]**o + (-0.716338180134)*x[0] + (-0.126892716203)*x[1]**o + (0.494233675907)*x[1] + (-0.756757877189)*x[2]**o + (-0.367513350155)*x[2]
            ref[(2,)]=-0.883650593392/(o+1.)+(-0.294808927191)+(0.636862244061)*0.5**o
            arg[(3,)]=0.738953953926*x[0]**o + (0.248823843678)*x[0] + (-0.298362904231)*x[1]**o + (0.85122507358)*x[1] + (0.0822646690828)*x[2]**o + (-0.00182106235126)*x[2]
            ref[(3,)]=-0.216098235149/(o+1.)+(0.549113927453)+(0.738953953926)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3),w)
        ref=numpy.zeros((3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.224640487781*x[0]**o + (0.537610723924)*x[0] + (-0.210700000148)*x[1]**o + (-0.210376633904)*x[1]
            ref[(0, 0)]=-0.210700000148/(o+1.)+(0.16361704501)+(0.224640487781)*0.5**o
            arg[(0, 1)]=0.267220766573*x[0]**o + (0.343144339301)*x[0] + (0.659445183562)*x[1]**o + (0.806013258853)*x[1]
            ref[(0, 1)]=0.659445183562/(o+1.)+(0.574578799077)+(0.267220766573)*0.5**o
            arg[(0, 2)]=-0.447984488171*x[0]**o + (0.190773554266)*x[0] + (-0.682990121721)*x[1]**o + (-0.904488727645)*x[1]
            ref[(0, 2)]=-0.682990121721/(o+1.)+(-0.35685758669)+(-0.447984488171)*0.5**o
            arg[(1, 0)]=0.0641540073742*x[0]**o + (0.470088330552)*x[0] + (-0.87216533648)*x[1]**o + (0.345942947487)*x[1]
            ref[(1, 0)]=-0.87216533648/(o+1.)+(0.408015639019)+(0.0641540073742)*0.5**o
            arg[(1, 1)]=0.155977928105*x[0]**o + (-0.463066228933)*x[0] + (-0.0545982776239)*x[1]**o + (0.716070784749)*x[1]
            ref[(1, 1)]=-0.0545982776239/(o+1.)+(0.126502277908)+(0.155977928105)*0.5**o
            arg[(1, 2)]=0.123694674628*x[0]**o + (-0.30857133849)*x[0] + (-0.980478435625)*x[1]**o + (-0.143888395538)*x[1]
            ref[(1, 2)]=-0.980478435625/(o+1.)+(-0.226229867014)+(0.123694674628)*0.5**o
            arg[(2, 0)]=-0.389390773673*x[0]**o + (0.0833264047515)*x[0] + (-0.905430206774)*x[1]**o + (-0.987281468597)*x[1]
            ref[(2, 0)]=-0.905430206774/(o+1.)+(-0.451977531923)+(-0.389390773673)*0.5**o
            arg[(2, 1)]=0.189528271309*x[0]**o + (-0.892157443662)*x[0] + (-0.208113692414)*x[1]**o + (-0.813931246592)*x[1]
            ref[(2, 1)]=-0.208113692414/(o+1.)+(-0.853044345127)+(0.189528271309)*0.5**o
            arg[(2, 2)]=0.792297465992*x[0]**o + (-0.453755297023)*x[0] + (0.27948119289)*x[1]**o + (-0.427292282646)*x[1]
            ref[(2, 2)]=0.27948119289/(o+1.)+(-0.440523789834)+(0.792297465992)*0.5**o
        else:
            arg[(0, 0)]=0.0607125574027*x[0]**o + (-0.868727589175)*x[0] + (0.683261027106)*x[1]**o + (-0.135481210319)*x[1] + (-0.0795441471466)*x[2]**o + (-0.568129806436)*x[2]
            ref[(0, 0)]=0.603716879959/(o+1.)+(-0.786169302965)+(0.0607125574027)*0.5**o
            arg[(0, 1)]=0.565957270219*x[0]**o + (0.748254490899)*x[0] + (0.0116265805227)*x[1]**o + (-0.0441092917102)*x[1] + (-0.44827540657)*x[2]**o + (0.782781839301)*x[2]
            ref[(0, 1)]=-0.436648826047/(o+1.)+(0.743463519245)+(0.565957270219)*0.5**o
            arg[(0, 2)]=0.288242075713*x[0]**o + (-0.725208392626)*x[0] + (0.0443829097488)*x[1]**o + (0.654792747585)*x[1] + (-0.100457129993)*x[2]**o + (-0.412060601423)*x[2]
            ref[(0, 2)]=-0.0560742202438/(o+1.)+(-0.241238123232)+(0.288242075713)*0.5**o
            arg[(1, 0)]=0.625374877679*x[0]**o + (0.0169012139117)*x[0] + (-0.130390726657)*x[1]**o + (-0.266437632281)*x[1] + (-0.101157623288)*x[2]**o + (0.532798321174)*x[2]
            ref[(1, 0)]=-0.231548349945/(o+1.)+(0.141630951402)+(0.625374877679)*0.5**o
            arg[(1, 1)]=-0.963173930078*x[0]**o + (-0.439703135874)*x[0] + (-0.811307999684)*x[1]**o + (0.130240903239)*x[1] + (-0.501040083005)*x[2]**o + (0.401546874358)*x[2]
            ref[(1, 1)]=-1.31234808269/(o+1.)+(0.0460423208615)+(-0.963173930078)*0.5**o
            arg[(1, 2)]=-0.717931749735*x[0]**o + (0.0341656004667)*x[0] + (0.379175216695)*x[1]**o + (-0.453239660934)*x[1] + (0.897055837718)*x[2]**o + (-0.399124503403)*x[2]
            ref[(1, 2)]=1.27623105441/(o+1.)+(-0.409099281936)+(-0.717931749735)*0.5**o
            arg[(2, 0)]=0.965400706183*x[0]**o + (0.800869244612)*x[0] + (-0.149452583106)*x[1]**o + (-0.369428692434)*x[1] + (0.608467374285)*x[2]**o + (-0.20059279381)*x[2]
            ref[(2, 0)]=0.459014791179/(o+1.)+(0.115423879184)+(0.965400706183)*0.5**o
            arg[(2, 1)]=0.398003441576*x[0]**o + (-0.182698981381)*x[0] + (-0.7761407404)*x[1]**o + (-0.668551489069)*x[1] + (-0.744894155985)*x[2]**o + (-0.732345803618)*x[2]
            ref[(2, 1)]=-1.52103489639/(o+1.)+(-0.791798137033)+(0.398003441576)*0.5**o
            arg[(2, 2)]=0.212219181699*x[0]**o + (-0.509526982274)*x[0] + (-0.182243923992)*x[1]**o + (-0.57239133415)*x[1] + (-0.908969979048)*x[2]**o + (0.631819654043)*x[2]
            ref[(2, 2)]=-1.09121390304/(o+1.)+(-0.225049331191)+(0.212219181699)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref=numpy.zeros((3, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.720341497002*x[0]**o + (-0.605081599624)*x[0] + (-0.67385310191)*x[1]**o + (0.642941608478)*x[1]
            ref[(0, 0, 0)]=-0.67385310191/(o+1.)+(0.0189300044266)+(-0.720341497002)*0.5**o
            arg[(0, 0, 1)]=-0.204638942213*x[0]**o + (0.396431718729)*x[0] + (0.165600973575)*x[1]**o + (0.0447668150154)*x[1]
            ref[(0, 0, 1)]=0.165600973575/(o+1.)+(0.220599266872)+(-0.204638942213)*0.5**o
            arg[(0, 0, 2)]=0.470402381022*x[0]**o + (-0.625583168517)*x[0] + (0.84741787291)*x[1]**o + (0.581409072134)*x[1]
            ref[(0, 0, 2)]=0.84741787291/(o+1.)+(-0.0220870481912)+(0.470402381022)*0.5**o
            arg[(0, 0, 3)]=0.584545038049*x[0]**o + (-0.480172765667)*x[0] + (0.295586804463)*x[1]**o + (0.422609149505)*x[1]
            ref[(0, 0, 3)]=0.295586804463/(o+1.)+(-0.0287818080808)+(0.584545038049)*0.5**o
            arg[(0, 1, 0)]=0.636862466077*x[0]**o + (0.505662896462)*x[0] + (-0.260111418616)*x[1]**o + (-0.0455775693722)*x[1]
            ref[(0, 1, 0)]=-0.260111418616/(o+1.)+(0.230042663545)+(0.636862466077)*0.5**o
            arg[(0, 1, 1)]=0.919757376059*x[0]**o + (-0.206396951294)*x[0] + (-0.477922671521)*x[1]**o + (-0.368118483505)*x[1]
            ref[(0, 1, 1)]=-0.477922671521/(o+1.)+(-0.2872577174)+(0.919757376059)*0.5**o
            arg[(0, 1, 2)]=0.497397087912*x[0]**o + (-0.0623651664226)*x[0] + (0.220051212734)*x[1]**o + (-0.106686943942)*x[1]
            ref[(0, 1, 2)]=0.220051212734/(o+1.)+(-0.0845260551822)+(0.497397087912)*0.5**o
            arg[(0, 1, 3)]=-0.223391102546*x[0]**o + (0.945786061407)*x[0] + (0.838545927386)*x[1]**o + (0.369376059475)*x[1]
            ref[(0, 1, 3)]=0.838545927386/(o+1.)+(0.657581060441)+(-0.223391102546)*0.5**o
            arg[(0, 2, 0)]=0.403292752379*x[0]**o + (-0.489995721976)*x[0] + (0.853882608586)*x[1]**o + (-0.994575316576)*x[1]
            ref[(0, 2, 0)]=0.853882608586/(o+1.)+(-0.742285519276)+(0.403292752379)*0.5**o
            arg[(0, 2, 1)]=0.137561457567*x[0]**o + (0.179357873167)*x[0] + (0.0320424262858)*x[1]**o + (0.517452554779)*x[1]
            ref[(0, 2, 1)]=0.0320424262858/(o+1.)+(0.348405213973)+(0.137561457567)*0.5**o
            arg[(0, 2, 2)]=0.725848245428*x[0]**o + (-0.478678045141)*x[0] + (-0.0735602878463)*x[1]**o + (-0.854655404145)*x[1]
            ref[(0, 2, 2)]=-0.0735602878463/(o+1.)+(-0.666666724643)+(0.725848245428)*0.5**o
            arg[(0, 2, 3)]=0.0140442126322*x[0]**o + (0.74980664226)*x[0] + (-0.245298859529)*x[1]**o + (-0.602845421847)*x[1]
            ref[(0, 2, 3)]=-0.245298859529/(o+1.)+(0.0734806102064)+(0.0140442126322)*0.5**o
            arg[(1, 0, 0)]=-0.858495842795*x[0]**o + (-0.9629209671)*x[0] + (-0.224448842543)*x[1]**o + (0.735250820881)*x[1]
            ref[(1, 0, 0)]=-0.224448842543/(o+1.)+(-0.113835073109)+(-0.858495842795)*0.5**o
            arg[(1, 0, 1)]=-0.463592255725*x[0]**o + (0.667057629591)*x[0] + (0.460134635985)*x[1]**o + (0.67049263536)*x[1]
            ref[(1, 0, 1)]=0.460134635985/(o+1.)+(0.668775132476)+(-0.463592255725)*0.5**o
            arg[(1, 0, 2)]=-0.699287238724*x[0]**o + (0.733096851014)*x[0] + (0.590618317543)*x[1]**o + (0.735278617593)*x[1]
            ref[(1, 0, 2)]=0.590618317543/(o+1.)+(0.734187734303)+(-0.699287238724)*0.5**o
            arg[(1, 0, 3)]=-0.792783233632*x[0]**o + (-0.7866073588)*x[0] + (0.248987493788)*x[1]**o + (0.485263386567)*x[1]
            ref[(1, 0, 3)]=0.248987493788/(o+1.)+(-0.150671986117)+(-0.792783233632)*0.5**o
            arg[(1, 1, 0)]=0.551290748301*x[0]**o + (-0.988306130715)*x[0] + (-0.713258719858)*x[1]**o + (0.922317795454)*x[1]
            ref[(1, 1, 0)]=-0.713258719858/(o+1.)+(-0.0329941676301)+(0.551290748301)*0.5**o
            arg[(1, 1, 1)]=-0.690558653878*x[0]**o + (0.523115491007)*x[0] + (-0.68544075674)*x[1]**o + (0.207875618528)*x[1]
            ref[(1, 1, 1)]=-0.68544075674/(o+1.)+(0.365495554768)+(-0.690558653878)*0.5**o
            arg[(1, 1, 2)]=0.437377871744*x[0]**o + (0.570233979172)*x[0] + (-0.282134274792)*x[1]**o + (-0.389634090118)*x[1]
            ref[(1, 1, 2)]=-0.282134274792/(o+1.)+(0.0902999445268)+(0.437377871744)*0.5**o
            arg[(1, 1, 3)]=-0.678352771674*x[0]**o + (0.184614423721)*x[0] + (-0.764890469576)*x[1]**o + (0.58931705192)*x[1]
            ref[(1, 1, 3)]=-0.764890469576/(o+1.)+(0.38696573782)+(-0.678352771674)*0.5**o
            arg[(1, 2, 0)]=0.606612888254*x[0]**o + (-0.874637090195)*x[0] + (-0.909220546292)*x[1]**o + (-0.420580112497)*x[1]
            ref[(1, 2, 0)]=-0.909220546292/(o+1.)+(-0.647608601346)+(0.606612888254)*0.5**o
            arg[(1, 2, 1)]=0.402331897061*x[0]**o + (0.909868065718)*x[0] + (0.0785672786112)*x[1]**o + (0.356744507567)*x[1]
            ref[(1, 2, 1)]=0.0785672786112/(o+1.)+(0.633306286642)+(0.402331897061)*0.5**o
            arg[(1, 2, 2)]=0.740786016432*x[0]**o + (0.638544895721)*x[0] + (0.652453059128)*x[1]**o + (-0.0218855934829)*x[1]
            ref[(1, 2, 2)]=0.652453059128/(o+1.)+(0.308329651119)+(0.740786016432)*0.5**o
            arg[(1, 2, 3)]=-0.237374365262*x[0]**o + (0.485588593112)*x[0] + (-0.282408127161)*x[1]**o + (0.418689750714)*x[1]
            ref[(1, 2, 3)]=-0.282408127161/(o+1.)+(0.452139171913)+(-0.237374365262)*0.5**o
            arg[(2, 0, 0)]=0.756452965416*x[0]**o + (0.170526216496)*x[0] + (0.383297685011)*x[1]**o + (-0.291692815005)*x[1]
            ref[(2, 0, 0)]=0.383297685011/(o+1.)+(-0.0605832992548)+(0.756452965416)*0.5**o
            arg[(2, 0, 1)]=0.316788851902*x[0]**o + (0.177267637655)*x[0] + (0.368647236053)*x[1]**o + (-0.338461073333)*x[1]
            ref[(2, 0, 1)]=0.368647236053/(o+1.)+(-0.0805967178391)+(0.316788851902)*0.5**o
            arg[(2, 0, 2)]=-0.405066856671*x[0]**o + (0.654806456306)*x[0] + (-0.0438633748247)*x[1]**o + (0.796410921759)*x[1]
            ref[(2, 0, 2)]=-0.0438633748247/(o+1.)+(0.725608689033)+(-0.405066856671)*0.5**o
            arg[(2, 0, 3)]=-0.0410807055226*x[0]**o + (-0.289741138076)*x[0] + (-0.77805698362)*x[1]**o + (-0.605293327881)*x[1]
            ref[(2, 0, 3)]=-0.77805698362/(o+1.)+(-0.447517232978)+(-0.0410807055226)*0.5**o
            arg[(2, 1, 0)]=-0.134014909953*x[0]**o + (0.616974870083)*x[0] + (0.548521735671)*x[1]**o + (-0.396888647418)*x[1]
            ref[(2, 1, 0)]=0.548521735671/(o+1.)+(0.110043111333)+(-0.134014909953)*0.5**o
            arg[(2, 1, 1)]=-0.115206850682*x[0]**o + (-0.687963205874)*x[0] + (0.780307004943)*x[1]**o + (0.967453186575)*x[1]
            ref[(2, 1, 1)]=0.780307004943/(o+1.)+(0.139744990351)+(-0.115206850682)*0.5**o
            arg[(2, 1, 2)]=-0.256687718332*x[0]**o + (0.751311474589)*x[0] + (0.641993131961)*x[1]**o + (0.122057106008)*x[1]
            ref[(2, 1, 2)]=0.641993131961/(o+1.)+(0.436684290298)+(-0.256687718332)*0.5**o
            arg[(2, 1, 3)]=-0.831193559041*x[0]**o + (-0.805246197076)*x[0] + (0.734877841048)*x[1]**o + (0.302852947507)*x[1]
            ref[(2, 1, 3)]=0.734877841048/(o+1.)+(-0.251196624784)+(-0.831193559041)*0.5**o
            arg[(2, 2, 0)]=0.836177074188*x[0]**o + (0.134909824644)*x[0] + (0.832048450131)*x[1]**o + (-0.826900290609)*x[1]
            ref[(2, 2, 0)]=0.832048450131/(o+1.)+(-0.345995232982)+(0.836177074188)*0.5**o
            arg[(2, 2, 1)]=0.056044245163*x[0]**o + (-0.210603965287)*x[0] + (-0.85250816012)*x[1]**o + (0.626549110221)*x[1]
            ref[(2, 2, 1)]=-0.85250816012/(o+1.)+(0.207972572467)+(0.056044245163)*0.5**o
            arg[(2, 2, 2)]=0.323536260387*x[0]**o + (-0.16270455102)*x[0] + (0.837352463085)*x[1]**o + (-0.585674070026)*x[1]
            ref[(2, 2, 2)]=0.837352463085/(o+1.)+(-0.374189310523)+(0.323536260387)*0.5**o
            arg[(2, 2, 3)]=0.0682295927199*x[0]**o + (-0.579917589508)*x[0] + (-0.031558688903)*x[1]**o + (0.401597187277)*x[1]
            ref[(2, 2, 3)]=-0.031558688903/(o+1.)+(-0.0891602011156)+(0.0682295927199)*0.5**o
        else:
            arg[(0, 0, 0)]=0.0734685612657*x[0]**o + (0.805316507792)*x[0] + (0.0091105468996)*x[1]**o + (-0.610051633917)*x[1] + (-0.222449661874)*x[2]**o + (-0.114156355517)*x[2]
            ref[(0, 0, 0)]=-0.213339114975/(o+1.)+(0.0405542591788)+(0.0734685612657)*0.5**o
            arg[(0, 0, 1)]=-0.0475265805597*x[0]**o + (0.287537488579)*x[0] + (-0.65505698094)*x[1]**o + (-0.0726352307227)*x[1] + (0.492205159099)*x[2]**o + (0.486320979217)*x[2]
            ref[(0, 0, 1)]=-0.162851821841/(o+1.)+(0.350611618537)+(-0.0475265805597)*0.5**o
            arg[(0, 0, 2)]=-0.761690863632*x[0]**o + (-0.16657389263)*x[0] + (-0.65911261061)*x[1]**o + (-0.379090241198)*x[1] + (-0.455848341858)*x[2]**o + (0.16774316862)*x[2]
            ref[(0, 0, 2)]=-1.11496095247/(o+1.)+(-0.188960482604)+(-0.761690863632)*0.5**o
            arg[(0, 0, 3)]=-0.127656482494*x[0]**o + (0.620294819161)*x[0] + (0.548698496925)*x[1]**o + (-0.858790453451)*x[1] + (0.307752976826)*x[2]**o + (-0.508323303841)*x[2]
            ref[(0, 0, 3)]=0.856451473751/(o+1.)+(-0.373409469065)+(-0.127656482494)*0.5**o
            arg[(0, 1, 0)]=0.790300593715*x[0]**o + (0.762163463663)*x[0] + (0.638082355377)*x[1]**o + (-0.226722752437)*x[1] + (0.0697449756422)*x[2]**o + (0.536969053349)*x[2]
            ref[(0, 1, 0)]=0.707827331019/(o+1.)+(0.536204882288)+(0.790300593715)*0.5**o
            arg[(0, 1, 1)]=-0.924392543117*x[0]**o + (0.596075314427)*x[0] + (-0.253533945297)*x[1]**o + (0.608959666421)*x[1] + (-0.645209181731)*x[2]**o + (0.370689715196)*x[2]
            ref[(0, 1, 1)]=-0.898743127028/(o+1.)+(0.787862348022)+(-0.924392543117)*0.5**o
            arg[(0, 1, 2)]=-0.98850069884*x[0]**o + (-0.112512220064)*x[0] + (-0.133570233374)*x[1]**o + (-0.610222888317)*x[1] + (-0.0546923789144)*x[2]**o + (-0.739493189922)*x[2]
            ref[(0, 1, 2)]=-0.188262612288/(o+1.)+(-0.731114149152)+(-0.98850069884)*0.5**o
            arg[(0, 1, 3)]=0.369659935616*x[0]**o + (-0.494338679609)*x[0] + (0.820856017689)*x[1]**o + (0.376870723793)*x[1] + (-0.513536375565)*x[2]**o + (0.36325082058)*x[2]
            ref[(0, 1, 3)]=0.307319642124/(o+1.)+(0.122891432382)+(0.369659935616)*0.5**o
            arg[(0, 2, 0)]=-0.832336921337*x[0]**o + (0.0156543278444)*x[0] + (-0.772433687987)*x[1]**o + (-0.922391465588)*x[1] + (0.593876552677)*x[2]**o + (0.216490243035)*x[2]
            ref[(0, 2, 0)]=-0.17855713531/(o+1.)+(-0.345123447354)+(-0.832336921337)*0.5**o
            arg[(0, 2, 1)]=-0.745590728341*x[0]**o + (-0.666399722733)*x[0] + (-0.230403772262)*x[1]**o + (0.265592593343)*x[1] + (0.472690385649)*x[2]**o + (-0.743463110165)*x[2]
            ref[(0, 2, 1)]=0.242286613387/(o+1.)+(-0.572135119777)+(-0.745590728341)*0.5**o
            arg[(0, 2, 2)]=-0.73145496595*x[0]**o + (-0.901608705414)*x[0] + (0.662836435056)*x[1]**o + (-0.293070190126)*x[1] + (0.266414852798)*x[2]**o + (0.947814179398)*x[2]
            ref[(0, 2, 2)]=0.929251287854/(o+1.)+(-0.123432358071)+(-0.73145496595)*0.5**o
            arg[(0, 2, 3)]=0.768072140965*x[0]**o + (-0.233561831691)*x[0] + (-0.132453967414)*x[1]**o + (0.265237698988)*x[1] + (-0.956169169646)*x[2]**o + (0.883886686473)*x[2]
            ref[(0, 2, 3)]=-1.08862313706/(o+1.)+(0.457781276885)+(0.768072140965)*0.5**o
            arg[(1, 0, 0)]=-0.214831013828*x[0]**o + (-0.950120755197)*x[0] + (0.431398082948)*x[1]**o + (-0.360945746888)*x[1] + (0.678243877588)*x[2]**o + (-0.783655116242)*x[2]
            ref[(1, 0, 0)]=1.10964196054/(o+1.)+(-1.04736080916)+(-0.214831013828)*0.5**o
            arg[(1, 0, 1)]=0.433788403303*x[0]**o + (-0.474722067522)*x[0] + (0.572949360184)*x[1]**o + (0.0213145485282)*x[1] + (0.609789143779)*x[2]**o + (-0.112393499399)*x[2]
            ref[(1, 0, 1)]=1.18273850396/(o+1.)+(-0.282900509197)+(0.433788403303)*0.5**o
            arg[(1, 0, 2)]=0.833699401497*x[0]**o + (0.366794977984)*x[0] + (-0.801763377644)*x[1]**o + (0.927417763925)*x[1] + (-0.142328837713)*x[2]**o + (-0.415928573912)*x[2]
            ref[(1, 0, 2)]=-0.944092215357/(o+1.)+(0.439142083998)+(0.833699401497)*0.5**o
            arg[(1, 0, 3)]=-0.540291225986*x[0]**o + (0.687100988044)*x[0] + (0.411353820201)*x[1]**o + (-0.563715774264)*x[1] + (0.0638169304087)*x[2]**o + (0.135859925018)*x[2]
            ref[(1, 0, 3)]=0.47517075061/(o+1.)+(0.129622569399)+(-0.540291225986)*0.5**o
            arg[(1, 1, 0)]=0.616872496037*x[0]**o + (0.387322542853)*x[0] + (0.275020386291)*x[1]**o + (-0.421286724244)*x[1] + (-0.714885141458)*x[2]**o + (0.38966806273)*x[2]
            ref[(1, 1, 0)]=-0.439864755167/(o+1.)+(0.177851940669)+(0.616872496037)*0.5**o
            arg[(1, 1, 1)]=0.541864374938*x[0]**o + (0.511165527385)*x[0] + (-0.155013395863)*x[1]**o + (-0.737551097653)*x[1] + (0.874307681687)*x[2]**o + (0.278000455969)*x[2]
            ref[(1, 1, 1)]=0.719294285824/(o+1.)+(0.0258074428502)+(0.541864374938)*0.5**o
            arg[(1, 1, 2)]=-0.406250668335*x[0]**o + (0.133270330373)*x[0] + (-0.0359825499216)*x[1]**o + (-0.460190996611)*x[1] + (0.434379587231)*x[2]**o + (-0.722043686882)*x[2]
            ref[(1, 1, 2)]=0.398397037309/(o+1.)+(-0.52448217656)+(-0.406250668335)*0.5**o
            arg[(1, 1, 3)]=0.704473237245*x[0]**o + (0.390745337582)*x[0] + (0.487113798845)*x[1]**o + (-0.855785190211)*x[1] + (-0.779093141128)*x[2]**o + (-0.907093007553)*x[2]
            ref[(1, 1, 3)]=-0.291979342283/(o+1.)+(-0.686066430091)+(0.704473237245)*0.5**o
            arg[(1, 2, 0)]=0.242805168021*x[0]**o + (-0.256616774988)*x[0] + (-0.533937254864)*x[1]**o + (-0.140414189277)*x[1] + (0.15409520013)*x[2]**o + (-0.0992957771711)*x[2]
            ref[(1, 2, 0)]=-0.379842054734/(o+1.)+(-0.248163370718)+(0.242805168021)*0.5**o
            arg[(1, 2, 1)]=0.678357320821*x[0]**o + (-0.823114501747)*x[0] + (0.00970151763505)*x[1]**o + (-0.632692552752)*x[1] + (-0.843128793786)*x[2]**o + (0.131791763838)*x[2]
            ref[(1, 2, 1)]=-0.833427276151/(o+1.)+(-0.66200764533)+(0.678357320821)*0.5**o
            arg[(1, 2, 2)]=-0.311220110058*x[0]**o + (0.267671718442)*x[0] + (-0.469813925323)*x[1]**o + (0.778102952352)*x[1] + (0.0244454878212)*x[2]**o + (0.26873070496)*x[2]
            ref[(1, 2, 2)]=-0.445368437501/(o+1.)+(0.657252687876)+(-0.311220110058)*0.5**o
            arg[(1, 2, 3)]=-0.149570518382*x[0]**o + (-0.649255819238)*x[0] + (-0.175889234822)*x[1]**o + (-0.428237900673)*x[1] + (-0.803780443101)*x[2]**o + (-0.138745123981)*x[2]
            ref[(1, 2, 3)]=-0.979669677924/(o+1.)+(-0.608119421946)+(-0.149570518382)*0.5**o
            arg[(2, 0, 0)]=-0.595218662691*x[0]**o + (0.721224785712)*x[0] + (-0.770923395317)*x[1]**o + (0.416841640772)*x[1] + (0.573311448406)*x[2]**o + (-0.595340532936)*x[2]
            ref[(2, 0, 0)]=-0.197611946911/(o+1.)+(0.271362946774)+(-0.595218662691)*0.5**o
            arg[(2, 0, 1)]=-0.212881050647*x[0]**o + (-0.430497913482)*x[0] + (-0.0177880650781)*x[1]**o + (-0.785037497328)*x[1] + (-0.791876775858)*x[2]**o + (-0.133257788805)*x[2]
            ref[(2, 0, 1)]=-0.809664840936/(o+1.)+(-0.674396599808)+(-0.212881050647)*0.5**o
            arg[(2, 0, 2)]=0.8745807499*x[0]**o + (-0.33496993605)*x[0] + (-0.359810486157)*x[1]**o + (-0.0124476601728)*x[1] + (0.645751590965)*x[2]**o + (-0.377786404748)*x[2]
            ref[(2, 0, 2)]=0.285941104809/(o+1.)+(-0.362602000486)+(0.8745807499)*0.5**o
            arg[(2, 0, 3)]=0.983259091742*x[0]**o + (-0.26432292358)*x[0] + (0.095266100888)*x[1]**o + (-0.651673248451)*x[1] + (-0.0324008276526)*x[2]**o + (0.131387611538)*x[2]
            ref[(2, 0, 3)]=0.0628652732354/(o+1.)+(-0.392304280247)+(0.983259091742)*0.5**o
            arg[(2, 1, 0)]=-0.497473181743*x[0]**o + (0.846297692308)*x[0] + (-0.949848320115)*x[1]**o + (-0.40622422738)*x[1] + (0.561847362211)*x[2]**o + (-0.557375201525)*x[2]
            ref[(2, 1, 0)]=-0.388000957904/(o+1.)+(-0.0586508682982)+(-0.497473181743)*0.5**o
            arg[(2, 1, 1)]=-0.554067903831*x[0]**o + (0.408472959496)*x[0] + (0.346208297012)*x[1]**o + (0.939324150686)*x[1] + (-0.863655905617)*x[2]**o + (-0.757900427852)*x[2]
            ref[(2, 1, 1)]=-0.517447608606/(o+1.)+(0.294948341165)+(-0.554067903831)*0.5**o
            arg[(2, 1, 2)]=-0.167831402695*x[0]**o + (0.0146815351267)*x[0] + (-0.297478674935)*x[1]**o + (-0.720698646033)*x[1] + (0.0802672565564)*x[2]**o + (-0.0265555098859)*x[2]
            ref[(2, 1, 2)]=-0.217211418378/(o+1.)+(-0.366286310396)+(-0.167831402695)*0.5**o
            arg[(2, 1, 3)]=-0.421702960096*x[0]**o + (-0.835768536781)*x[0] + (-0.807513553949)*x[1]**o + (0.00526411927734)*x[1] + (-0.822869338758)*x[2]**o + (-0.446727729503)*x[2]
            ref[(2, 1, 3)]=-1.63038289271/(o+1.)+(-0.638616073503)+(-0.421702960096)*0.5**o
            arg[(2, 2, 0)]=-0.80047404023*x[0]**o + (0.873873896398)*x[0] + (-0.798542274413)*x[1]**o + (0.17681871495)*x[1] + (0.67759571002)*x[2]**o + (-0.444095013418)*x[2]
            ref[(2, 2, 0)]=-0.120946564393/(o+1.)+(0.303298798965)+(-0.80047404023)*0.5**o
            arg[(2, 2, 1)]=-0.533164731287*x[0]**o + (-0.871237729394)*x[0] + (-0.467403987477)*x[1]**o + (-0.286921763652)*x[1] + (-0.150259165792)*x[2]**o + (0.1457562807)*x[2]
            ref[(2, 2, 1)]=-0.617663153269/(o+1.)+(-0.506201606173)+(-0.533164731287)*0.5**o
            arg[(2, 2, 2)]=-0.231948429946*x[0]**o + (0.716860787018)*x[0] + (-0.668870001611)*x[1]**o + (0.656595644916)*x[1] + (0.244475087224)*x[2]**o + (-0.892841651511)*x[2]
            ref[(2, 2, 2)]=-0.424394914387/(o+1.)+(0.240307390211)+(-0.231948429946)*0.5**o
            arg[(2, 2, 3)]=0.532996676976*x[0]**o + (0.0979862609118)*x[0] + (0.264639626476)*x[1]**o + (0.793371311342)*x[1] + (-0.271467207968)*x[2]**o + (-0.444511792317)*x[2]
            ref[(2, 2, 3)]=-0.00682758149213/(o+1.)+(0.223422889968)+(0.532996676976)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 3, 3),w)
        ref=numpy.zeros((2, 2, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.215161232897*x[0]**o + (0.25410524833)*x[0] + (0.844085209345)*x[1]**o + (-0.360778637971)*x[1]
            ref[(0, 0, 0, 0)]=0.844085209345/(o+1.)+(-0.0533366948205)+(-0.215161232897)*0.5**o
            arg[(0, 0, 0, 1)]=0.775439230446*x[0]**o + (0.419770247144)*x[0] + (-0.143691695571)*x[1]**o + (0.286882952194)*x[1]
            ref[(0, 0, 0, 1)]=-0.143691695571/(o+1.)+(0.353326599669)+(0.775439230446)*0.5**o
            arg[(0, 0, 0, 2)]=-0.696587980491*x[0]**o + (-0.0149834722578)*x[0] + (0.661738634435)*x[1]**o + (-0.228862318623)*x[1]
            ref[(0, 0, 0, 2)]=0.661738634435/(o+1.)+(-0.12192289544)+(-0.696587980491)*0.5**o
            arg[(0, 0, 1, 0)]=-0.968522998949*x[0]**o + (0.0996798285154)*x[0] + (0.295194915451)*x[1]**o + (0.292914271568)*x[1]
            ref[(0, 0, 1, 0)]=0.295194915451/(o+1.)+(0.196297050042)+(-0.968522998949)*0.5**o
            arg[(0, 0, 1, 1)]=0.44177462159*x[0]**o + (-0.978138712126)*x[0] + (-0.0430820877189)*x[1]**o + (0.71776568478)*x[1]
            ref[(0, 0, 1, 1)]=-0.0430820877189/(o+1.)+(-0.130186513673)+(0.44177462159)*0.5**o
            arg[(0, 0, 1, 2)]=-0.965329190786*x[0]**o + (-0.312531338994)*x[0] + (0.774625482516)*x[1]**o + (-0.678192527338)*x[1]
            ref[(0, 0, 1, 2)]=0.774625482516/(o+1.)+(-0.495361933166)+(-0.965329190786)*0.5**o
            arg[(0, 0, 2, 0)]=0.976625035528*x[0]**o + (-0.267188211282)*x[0] + (-0.773788791436)*x[1]**o + (-0.146809635137)*x[1]
            ref[(0, 0, 2, 0)]=-0.773788791436/(o+1.)+(-0.20699892321)+(0.976625035528)*0.5**o
            arg[(0, 0, 2, 1)]=-0.281255510162*x[0]**o + (-0.303340506146)*x[0] + (0.357357021586)*x[1]**o + (0.296416377421)*x[1]
            ref[(0, 0, 2, 1)]=0.357357021586/(o+1.)+(-0.00346206436224)+(-0.281255510162)*0.5**o
            arg[(0, 0, 2, 2)]=-0.321087479488*x[0]**o + (-0.835254474361)*x[0] + (0.395931010172)*x[1]**o + (-0.199504700496)*x[1]
            ref[(0, 0, 2, 2)]=0.395931010172/(o+1.)+(-0.517379587429)+(-0.321087479488)*0.5**o
            arg[(0, 1, 0, 0)]=-0.0994777498428*x[0]**o + (-0.184600601809)*x[0] + (-0.874546876734)*x[1]**o + (-0.971348045217)*x[1]
            ref[(0, 1, 0, 0)]=-0.874546876734/(o+1.)+(-0.577974323513)+(-0.0994777498428)*0.5**o
            arg[(0, 1, 0, 1)]=0.900799825206*x[0]**o + (-0.792154022184)*x[0] + (-0.803218014366)*x[1]**o + (-0.079517018314)*x[1]
            ref[(0, 1, 0, 1)]=-0.803218014366/(o+1.)+(-0.435835520249)+(0.900799825206)*0.5**o
            arg[(0, 1, 0, 2)]=-0.659749933864*x[0]**o + (0.444586749863)*x[0] + (-0.447794014962)*x[1]**o + (-0.85955116774)*x[1]
            ref[(0, 1, 0, 2)]=-0.447794014962/(o+1.)+(-0.207482208939)+(-0.659749933864)*0.5**o
            arg[(0, 1, 1, 0)]=0.00115678491724*x[0]**o + (0.0446621107068)*x[0] + (-0.362725904553)*x[1]**o + (0.39543758158)*x[1]
            ref[(0, 1, 1, 0)]=-0.362725904553/(o+1.)+(0.220049846144)+(0.00115678491724)*0.5**o
            arg[(0, 1, 1, 1)]=0.27294114146*x[0]**o + (0.890374340993)*x[0] + (0.296506121359)*x[1]**o + (0.509121049535)*x[1]
            ref[(0, 1, 1, 1)]=0.296506121359/(o+1.)+(0.699747695264)+(0.27294114146)*0.5**o
            arg[(0, 1, 1, 2)]=-0.044781464788*x[0]**o + (-0.762679101909)*x[0] + (0.961423208746)*x[1]**o + (-0.258223563276)*x[1]
            ref[(0, 1, 1, 2)]=0.961423208746/(o+1.)+(-0.510451332593)+(-0.044781464788)*0.5**o
            arg[(0, 1, 2, 0)]=-0.807845345419*x[0]**o + (0.380496490803)*x[0] + (-0.440480983084)*x[1]**o + (-0.66948813035)*x[1]
            ref[(0, 1, 2, 0)]=-0.440480983084/(o+1.)+(-0.144495819774)+(-0.807845345419)*0.5**o
            arg[(0, 1, 2, 1)]=-0.729960723522*x[0]**o + (-0.436026886467)*x[0] + (-0.333516172314)*x[1]**o + (-0.473275640513)*x[1]
            ref[(0, 1, 2, 1)]=-0.333516172314/(o+1.)+(-0.45465126349)+(-0.729960723522)*0.5**o
            arg[(0, 1, 2, 2)]=-0.0958016438885*x[0]**o + (0.729759628344)*x[0] + (-0.789068085171)*x[1]**o + (0.125139736361)*x[1]
            ref[(0, 1, 2, 2)]=-0.789068085171/(o+1.)+(0.427449682353)+(-0.0958016438885)*0.5**o
            arg[(1, 0, 0, 0)]=-0.0789001041559*x[0]**o + (0.600633928895)*x[0] + (-0.917913380198)*x[1]**o + (0.844371559033)*x[1]
            ref[(1, 0, 0, 0)]=-0.917913380198/(o+1.)+(0.722502743964)+(-0.0789001041559)*0.5**o
            arg[(1, 0, 0, 1)]=0.846651375362*x[0]**o + (0.161341949037)*x[0] + (-0.540165178462)*x[1]**o + (0.492780410198)*x[1]
            ref[(1, 0, 0, 1)]=-0.540165178462/(o+1.)+(0.327061179617)+(0.846651375362)*0.5**o
            arg[(1, 0, 0, 2)]=0.342676995911*x[0]**o + (0.293829914789)*x[0] + (-0.583278252645)*x[1]**o + (0.377807967005)*x[1]
            ref[(1, 0, 0, 2)]=-0.583278252645/(o+1.)+(0.335818940897)+(0.342676995911)*0.5**o
            arg[(1, 0, 1, 0)]=0.528488384836*x[0]**o + (0.937046112248)*x[0] + (-0.448813373875)*x[1]**o + (0.560992303371)*x[1]
            ref[(1, 0, 1, 0)]=-0.448813373875/(o+1.)+(0.749019207809)+(0.528488384836)*0.5**o
            arg[(1, 0, 1, 1)]=-0.357323959967*x[0]**o + (-0.309786802872)*x[0] + (-0.439011496185)*x[1]**o + (-0.0929198587387)*x[1]
            ref[(1, 0, 1, 1)]=-0.439011496185/(o+1.)+(-0.201353330805)+(-0.357323959967)*0.5**o
            arg[(1, 0, 1, 2)]=-0.32910360594*x[0]**o + (0.618917209573)*x[0] + (0.33691231481)*x[1]**o + (0.609190256138)*x[1]
            ref[(1, 0, 1, 2)]=0.33691231481/(o+1.)+(0.614053732856)+(-0.32910360594)*0.5**o
            arg[(1, 0, 2, 0)]=0.267367437703*x[0]**o + (0.459068837784)*x[0] + (-0.772454259459)*x[1]**o + (0.529611790874)*x[1]
            ref[(1, 0, 2, 0)]=-0.772454259459/(o+1.)+(0.494340314329)+(0.267367437703)*0.5**o
            arg[(1, 0, 2, 1)]=0.250001344302*x[0]**o + (0.957418418887)*x[0] + (0.842369276865)*x[1]**o + (0.404409019051)*x[1]
            ref[(1, 0, 2, 1)]=0.842369276865/(o+1.)+(0.680913718969)+(0.250001344302)*0.5**o
            arg[(1, 0, 2, 2)]=0.613479413219*x[0]**o + (0.0272084367651)*x[0] + (-0.338096713528)*x[1]**o + (-0.0954254362295)*x[1]
            ref[(1, 0, 2, 2)]=-0.338096713528/(o+1.)+(-0.0341084997322)+(0.613479413219)*0.5**o
            arg[(1, 1, 0, 0)]=-0.198896098015*x[0]**o + (0.648278599646)*x[0] + (0.887876083971)*x[1]**o + (0.804999612536)*x[1]
            ref[(1, 1, 0, 0)]=0.887876083971/(o+1.)+(0.726639106091)+(-0.198896098015)*0.5**o
            arg[(1, 1, 0, 1)]=-0.21312285587*x[0]**o + (0.624484707744)*x[0] + (-0.68375278913)*x[1]**o + (-0.598588977458)*x[1]
            ref[(1, 1, 0, 1)]=-0.68375278913/(o+1.)+(0.012947865143)+(-0.21312285587)*0.5**o
            arg[(1, 1, 0, 2)]=0.543821542977*x[0]**o + (0.938761374041)*x[0] + (-0.624650940328)*x[1]**o + (0.49942985584)*x[1]
            ref[(1, 1, 0, 2)]=-0.624650940328/(o+1.)+(0.719095614941)+(0.543821542977)*0.5**o
            arg[(1, 1, 1, 0)]=-0.916720961549*x[0]**o + (-0.618730001272)*x[0] + (-0.61444675316)*x[1]**o + (0.0602396738582)*x[1]
            ref[(1, 1, 1, 0)]=-0.61444675316/(o+1.)+(-0.279245163707)+(-0.916720961549)*0.5**o
            arg[(1, 1, 1, 1)]=0.564876658137*x[0]**o + (0.0641299469899)*x[0] + (-0.466775972395)*x[1]**o + (0.535052046662)*x[1]
            ref[(1, 1, 1, 1)]=-0.466775972395/(o+1.)+(0.299590996826)+(0.564876658137)*0.5**o
            arg[(1, 1, 1, 2)]=-0.721585314973*x[0]**o + (-0.2844166357)*x[0] + (0.460372941769)*x[1]**o + (0.641868552103)*x[1]
            ref[(1, 1, 1, 2)]=0.460372941769/(o+1.)+(0.178725958201)+(-0.721585314973)*0.5**o
            arg[(1, 1, 2, 0)]=-0.340842298417*x[0]**o + (0.935200307387)*x[0] + (0.606693176328)*x[1]**o + (0.145925794733)*x[1]
            ref[(1, 1, 2, 0)]=0.606693176328/(o+1.)+(0.54056305106)+(-0.340842298417)*0.5**o
            arg[(1, 1, 2, 1)]=-0.74466232504*x[0]**o + (-0.27671215612)*x[0] + (-0.171324983808)*x[1]**o + (0.91550022683)*x[1]
            ref[(1, 1, 2, 1)]=-0.171324983808/(o+1.)+(0.319394035355)+(-0.74466232504)*0.5**o
            arg[(1, 1, 2, 2)]=0.85370733485*x[0]**o + (0.778942416682)*x[0] + (0.300381936709)*x[1]**o + (-0.437351396332)*x[1]
            ref[(1, 1, 2, 2)]=0.300381936709/(o+1.)+(0.170795510175)+(0.85370733485)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.378535778869*x[0]**o + (-0.103062992225)*x[0] + (0.592017617852)*x[1]**o + (-0.0977932584591)*x[1] + (-0.796577349758)*x[2]**o + (0.0930923192231)*x[2]
            ref[(0, 0, 0, 0)]=-0.204559731906/(o+1.)+(-0.0538819657306)+(-0.378535778869)*0.5**o
            arg[(0, 0, 0, 1)]=-0.0262487711165*x[0]**o + (-0.659428176532)*x[0] + (-0.0835397745899)*x[1]**o + (-0.339182740627)*x[1] + (-0.931958882114)*x[2]**o + (-0.985041431526)*x[2]
            ref[(0, 0, 0, 1)]=-1.0154986567/(o+1.)+(-0.991826174342)+(-0.0262487711165)*0.5**o
            arg[(0, 0, 0, 2)]=-0.166465655539*x[0]**o + (-0.268574481828)*x[0] + (-0.496478199903)*x[1]**o + (0.00816902097979)*x[1] + (0.480927431724)*x[2]**o + (-0.658205124342)*x[2]
            ref[(0, 0, 0, 2)]=-0.0155507681789/(o+1.)+(-0.459305292595)+(-0.166465655539)*0.5**o
            arg[(0, 0, 1, 0)]=-0.710792480889*x[0]**o + (-0.684540729874)*x[0] + (-0.0772374549257)*x[1]**o + (-0.481470254825)*x[1] + (-0.0575085945422)*x[2]**o + (-0.627308708687)*x[2]
            ref[(0, 0, 1, 0)]=-0.134746049468/(o+1.)+(-0.896659846693)+(-0.710792480889)*0.5**o
            arg[(0, 0, 1, 1)]=-0.100333026461*x[0]**o + (0.283140459449)*x[0] + (0.050942627829)*x[1]**o + (0.768094764938)*x[1] + (0.544005713676)*x[2]**o + (0.381779469338)*x[2]
            ref[(0, 0, 1, 1)]=0.594948341505/(o+1.)+(0.716507346862)+(-0.100333026461)*0.5**o
            arg[(0, 0, 1, 2)]=0.134509002327*x[0]**o + (-0.517302844149)*x[0] + (0.732517041913)*x[1]**o + (-0.831050612943)*x[1] + (0.499112878181)*x[2]**o + (0.286757569105)*x[2]
            ref[(0, 0, 1, 2)]=1.23162992009/(o+1.)+(-0.530797943993)+(0.134509002327)*0.5**o
            arg[(0, 0, 2, 0)]=-0.0922448479627*x[0]**o + (0.18960814269)*x[0] + (-0.207550885785)*x[1]**o + (-0.34733668857)*x[1] + (-0.571698915119)*x[2]**o + (0.587121772507)*x[2]
            ref[(0, 0, 2, 0)]=-0.779249800904/(o+1.)+(0.214696613313)+(-0.0922448479627)*0.5**o
            arg[(0, 0, 2, 1)]=0.289234469907*x[0]**o + (-0.191681057514)*x[0] + (-0.207021429811)*x[1]**o + (-0.173998217747)*x[1] + (0.0160600218779)*x[2]**o + (0.766340329407)*x[2]
            ref[(0, 0, 2, 1)]=-0.190961407933/(o+1.)+(0.200330527073)+(0.289234469907)*0.5**o
            arg[(0, 0, 2, 2)]=-0.119003878343*x[0]**o + (-0.439816967925)*x[0] + (-0.509030753932)*x[1]**o + (0.840879741224)*x[1] + (-0.0910136017017)*x[2]**o + (0.597267641899)*x[2]
            ref[(0, 0, 2, 2)]=-0.600044355633/(o+1.)+(0.499165207599)+(-0.119003878343)*0.5**o
            arg[(0, 1, 0, 0)]=0.840716951617*x[0]**o + (0.314589496886)*x[0] + (0.148370435645)*x[1]**o + (-0.839124272958)*x[1] + (-0.623914477049)*x[2]**o + (0.17352378351)*x[2]
            ref[(0, 1, 0, 0)]=-0.475544041404/(o+1.)+(-0.175505496281)+(0.840716951617)*0.5**o
            arg[(0, 1, 0, 1)]=0.609239446685*x[0]**o + (0.564387732452)*x[0] + (-0.678960409091)*x[1]**o + (-0.330424722109)*x[1] + (-0.241420537148)*x[2]**o + (-0.574626333227)*x[2]
            ref[(0, 1, 0, 1)]=-0.920380946239/(o+1.)+(-0.170331661442)+(0.609239446685)*0.5**o
            arg[(0, 1, 0, 2)]=0.783480601464*x[0]**o + (0.341248232645)*x[0] + (-0.757565415002)*x[1]**o + (-0.952714744289)*x[1] + (0.151248437692)*x[2]**o + (0.862808136995)*x[2]
            ref[(0, 1, 0, 2)]=-0.60631697731/(o+1.)+(0.125670812675)+(0.783480601464)*0.5**o
            arg[(0, 1, 1, 0)]=0.966443471566*x[0]**o + (0.746304007157)*x[0] + (0.116953535913)*x[1]**o + (0.0752890515034)*x[1] + (0.55199152594)*x[2]**o + (-0.0513995214559)*x[2]
            ref[(0, 1, 1, 0)]=0.668945061853/(o+1.)+(0.385096768602)+(0.966443471566)*0.5**o
            arg[(0, 1, 1, 1)]=0.726350071678*x[0]**o + (-0.0544481046527)*x[0] + (0.556107790952)*x[1]**o + (0.0854258741532)*x[1] + (-0.978334779225)*x[2]**o + (0.0573757817554)*x[2]
            ref[(0, 1, 1, 1)]=-0.422226988273/(o+1.)+(0.044176775628)+(0.726350071678)*0.5**o
            arg[(0, 1, 1, 2)]=0.859035006399*x[0]**o + (-0.88560653254)*x[0] + (0.0180464944148)*x[1]**o + (0.329190843078)*x[1] + (0.556907643615)*x[2]**o + (0.511872788555)*x[2]
            ref[(0, 1, 1, 2)]=0.57495413803/(o+1.)+(-0.0222714504535)+(0.859035006399)*0.5**o
            arg[(0, 1, 2, 0)]=-0.322219457932*x[0]**o + (0.77985700532)*x[0] + (-0.0613329830772)*x[1]**o + (0.280032648212)*x[1] + (0.475292063878)*x[2]**o + (0.750838846228)*x[2]
            ref[(0, 1, 2, 0)]=0.413959080801/(o+1.)+(0.905364249879)+(-0.322219457932)*0.5**o
            arg[(0, 1, 2, 1)]=-0.00424688286857*x[0]**o + (0.136088035759)*x[0] + (-0.763218351448)*x[1]**o + (0.791150222713)*x[1] + (0.492289839662)*x[2]**o + (-0.109684961177)*x[2]
            ref[(0, 1, 2, 1)]=-0.270928511786/(o+1.)+(0.408776648648)+(-0.00424688286857)*0.5**o
            arg[(0, 1, 2, 2)]=-0.542006281568*x[0]**o + (-0.694099602645)*x[0] + (-0.20005321966)*x[1]**o + (0.163044251363)*x[1] + (0.636181058922)*x[2]**o + (0.737112378347)*x[2]
            ref[(0, 1, 2, 2)]=0.436127839262/(o+1.)+(0.103028513533)+(-0.542006281568)*0.5**o
            arg[(1, 0, 0, 0)]=0.517606070693*x[0]**o + (0.208027424387)*x[0] + (0.143558045986)*x[1]**o + (0.961905996793)*x[1] + (0.338290725521)*x[2]**o + (0.330549037873)*x[2]
            ref[(1, 0, 0, 0)]=0.481848771507/(o+1.)+(0.750241229526)+(0.517606070693)*0.5**o
            arg[(1, 0, 0, 1)]=-0.775463619299*x[0]**o + (0.221024697943)*x[0] + (-0.431784884527)*x[1]**o + (-0.168460824487)*x[1] + (-0.144291462068)*x[2]**o + (-0.777882429505)*x[2]
            ref[(1, 0, 0, 1)]=-0.576076346595/(o+1.)+(-0.362659278025)+(-0.775463619299)*0.5**o
            arg[(1, 0, 0, 2)]=-0.26419546213*x[0]**o + (0.543294202374)*x[0] + (-0.739235064659)*x[1]**o + (-0.717855968629)*x[1] + (0.263534507081)*x[2]**o + (-0.45234206823)*x[2]
            ref[(1, 0, 0, 2)]=-0.475700557578/(o+1.)+(-0.313451917242)+(-0.26419546213)*0.5**o
            arg[(1, 0, 1, 0)]=-0.213009547367*x[0]**o + (0.0154854336683)*x[0] + (0.926429806234)*x[1]**o + (0.35082807028)*x[1] + (0.721453401659)*x[2]**o + (0.322145432943)*x[2]
            ref[(1, 0, 1, 0)]=1.64788320789/(o+1.)+(0.344229468446)+(-0.213009547367)*0.5**o
            arg[(1, 0, 1, 1)]=0.867226677132*x[0]**o + (0.678632843094)*x[0] + (0.652443338879)*x[1]**o + (0.845116228006)*x[1] + (-0.392071058187)*x[2]**o + (-0.229946487571)*x[2]
            ref[(1, 0, 1, 1)]=0.260372280692/(o+1.)+(0.646901291765)+(0.867226677132)*0.5**o
            arg[(1, 0, 1, 2)]=0.434759440776*x[0]**o + (-0.232148179883)*x[0] + (0.0915204585982)*x[1]**o + (0.40005766238)*x[1] + (0.838180388871)*x[2]**o + (-0.654175776874)*x[2]
            ref[(1, 0, 1, 2)]=0.92970084747/(o+1.)+(-0.243133147189)+(0.434759440776)*0.5**o
            arg[(1, 0, 2, 0)]=-0.0718912091106*x[0]**o + (-0.618696710264)*x[0] + (-0.0737666249591)*x[1]**o + (0.0597781481735)*x[1] + (-0.195215047188)*x[2]**o + (0.604901373486)*x[2]
            ref[(1, 0, 2, 0)]=-0.268981672147/(o+1.)+(0.0229914056974)+(-0.0718912091106)*0.5**o
            arg[(1, 0, 2, 1)]=-0.0472238033117*x[0]**o + (0.292496511314)*x[0] + (-0.314651496954)*x[1]**o + (-0.683816567181)*x[1] + (-0.422157215976)*x[2]**o + (0.243958900174)*x[2]
            ref[(1, 0, 2, 1)]=-0.736808712929/(o+1.)+(-0.073680577846)+(-0.0472238033117)*0.5**o
            arg[(1, 0, 2, 2)]=0.340255607422*x[0]**o + (0.613145516852)*x[0] + (-0.591337678995)*x[1]**o + (0.544220783588)*x[1] + (0.818241333249)*x[2]**o + (0.160679971981)*x[2]
            ref[(1, 0, 2, 2)]=0.226903654254/(o+1.)+(0.65902313621)+(0.340255607422)*0.5**o
            arg[(1, 1, 0, 0)]=0.829308628243*x[0]**o + (0.731246084177)*x[0] + (-0.902045023721)*x[1]**o + (0.497978572005)*x[1] + (0.208412089072)*x[2]**o + (0.686557284833)*x[2]
            ref[(1, 1, 0, 0)]=-0.693632934649/(o+1.)+(0.957890970507)+(0.829308628243)*0.5**o
            arg[(1, 1, 0, 1)]=-0.93044772954*x[0]**o + (0.447381432075)*x[0] + (0.0886197715545)*x[1]**o + (-0.322408653204)*x[1] + (0.00220795612653)*x[2]**o + (-0.31502038976)*x[2]
            ref[(1, 1, 0, 1)]=0.090827727681/(o+1.)+(-0.0950238054445)+(-0.93044772954)*0.5**o
            arg[(1, 1, 0, 2)]=-0.068646786736*x[0]**o + (0.374201507822)*x[0] + (0.99215400709)*x[1]**o + (-0.0373188263085)*x[1] + (0.219129947237)*x[2]**o + (0.329123040479)*x[2]
            ref[(1, 1, 0, 2)]=1.21128395433/(o+1.)+(0.333002860996)+(-0.068646786736)*0.5**o
            arg[(1, 1, 1, 0)]=0.0370131864532*x[0]**o + (-0.0590416615837)*x[0] + (-0.825681329649)*x[1]**o + (-0.395489845)*x[1] + (0.165954511425)*x[2]**o + (-0.187090906932)*x[2]
            ref[(1, 1, 1, 0)]=-0.659726818224/(o+1.)+(-0.320811206758)+(0.0370131864532)*0.5**o
            arg[(1, 1, 1, 1)]=-0.633249813659*x[0]**o + (0.391734398636)*x[0] + (0.455186299094)*x[1]**o + (-0.924492464385)*x[1] + (0.516677347327)*x[2]**o + (-0.157762079218)*x[2]
            ref[(1, 1, 1, 1)]=0.971863646421/(o+1.)+(-0.345260072483)+(-0.633249813659)*0.5**o
            arg[(1, 1, 1, 2)]=0.457329721897*x[0]**o + (-0.157508615054)*x[0] + (0.305942139826)*x[1]**o + (-0.877787283762)*x[1] + (0.960965316891)*x[2]**o + (0.880091325073)*x[2]
            ref[(1, 1, 1, 2)]=1.26690745672/(o+1.)+(-0.0776022868715)+(0.457329721897)*0.5**o
            arg[(1, 1, 2, 0)]=0.651851395964*x[0]**o + (-0.179176901775)*x[0] + (-0.302830210257)*x[1]**o + (-0.991008056835)*x[1] + (-0.469444081814)*x[2]**o + (0.801317454292)*x[2]
            ref[(1, 1, 2, 0)]=-0.772274292071/(o+1.)+(-0.184433752159)+(0.651851395964)*0.5**o
            arg[(1, 1, 2, 1)]=-0.0886363386186*x[0]**o + (-0.509462032873)*x[0] + (0.500079502427)*x[1]**o + (0.592477925904)*x[1] + (0.420877565124)*x[2]**o + (0.891916400319)*x[2]
            ref[(1, 1, 2, 1)]=0.920957067552/(o+1.)+(0.487466146675)+(-0.0886363386186)*0.5**o
            arg[(1, 1, 2, 2)]=0.0316296640222*x[0]**o + (0.859607848406)*x[0] + (0.526449079601)*x[1]**o + (0.271582194947)*x[1] + (0.299095345138)*x[2]**o + (-0.092455523564)*x[2]
            ref[(1, 1, 2, 2)]=0.825544424739/(o+1.)+(0.519367259894)+(0.0316296640222)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.0339521431259*x[0] + (-0.661367915722)*x[1]
            ref=-0.347660029424
        else:
            arg=0.558942739505*x[0] + (-0.733777299207)*x[1] + (0.0340209057679)*x[2]
            ref=-0.0704068269671
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.101116957628*x[0] + (0.432460079953)*x[1]
            ref[(0,)]=0.26678851879
            arg[(1,)]=0.609284066999*x[0] + (-0.0729094569469)*x[1]
            ref[(1,)]=0.268187305026
        else:
            arg[(0,)]=-0.236994734145*x[0] + (0.650415806145)*x[1] + (0.94892032589)*x[2]
            ref[(0,)]=0.681170698945
            arg[(1,)]=-0.573471117907*x[0] + (-0.222365148257)*x[1] + (-0.184244370413)*x[2]
            ref[(1,)]=-0.490040318289
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4),w)
        ref=numpy.zeros((3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.312102112247*x[0] + (-0.891161326591)*x[1]
            ref[(0, 0)]=-0.289529607172
            arg[(0, 1)]=0.59687076337*x[0] + (0.626986941545)*x[1]
            ref[(0, 1)]=0.611928852457
            arg[(0, 2)]=-0.251057810603*x[0] + (0.959216868621)*x[1]
            ref[(0, 2)]=0.354079529009
            arg[(0, 3)]=0.300361757227*x[0] + (0.854003941256)*x[1]
            ref[(0, 3)]=0.577182849242
            arg[(1, 0)]=-0.397062130056*x[0] + (-0.840465843753)*x[1]
            ref[(1, 0)]=-0.618763986904
            arg[(1, 1)]=-0.766351219625*x[0] + (0.0247519498015)*x[1]
            ref[(1, 1)]=-0.370799634912
            arg[(1, 2)]=-0.767472847381*x[0] + (0.528379269373)*x[1]
            ref[(1, 2)]=-0.119546789004
            arg[(1, 3)]=0.70632956351*x[0] + (-0.202321847037)*x[1]
            ref[(1, 3)]=0.252003858237
            arg[(2, 0)]=-0.193467782515*x[0] + (0.0946481732122)*x[1]
            ref[(2, 0)]=-0.0494098046515
            arg[(2, 1)]=0.318002023184*x[0] + (-0.768768330879)*x[1]
            ref[(2, 1)]=-0.225383153847
            arg[(2, 2)]=0.533516798823*x[0] + (0.336410595403)*x[1]
            ref[(2, 2)]=0.434963697113
            arg[(2, 3)]=0.822430826125*x[0] + (-0.582477343439)*x[1]
            ref[(2, 3)]=0.119976741343
        else:
            arg[(0, 0)]=-0.666459545738*x[0] + (-0.20547638205)*x[1] + (0.927437251785)*x[2]
            ref[(0, 0)]=0.0277506619983
            arg[(0, 1)]=0.752756237576*x[0] + (-0.0872601844552)*x[1] + (0.638036090197)*x[2]
            ref[(0, 1)]=0.651766071659
            arg[(0, 2)]=0.187000843315*x[0] + (-0.892587646251)*x[1] + (0.793788771951)*x[2]
            ref[(0, 2)]=0.0441009845072
            arg[(0, 3)]=-0.326467624643*x[0] + (0.0526711137703)*x[1] + (-0.0732011901755)*x[2]
            ref[(0, 3)]=-0.173498850524
            arg[(1, 0)]=-0.722358617939*x[0] + (-0.622164019496)*x[1] + (0.495680891769)*x[2]
            ref[(1, 0)]=-0.424420872832
            arg[(1, 1)]=-0.638969128417*x[0] + (-0.00238759027471)*x[1] + (-0.180261633685)*x[2]
            ref[(1, 1)]=-0.410809176188
            arg[(1, 2)]=0.181441677726*x[0] + (0.504281187391)*x[1] + (-0.453355917747)*x[2]
            ref[(1, 2)]=0.116183473685
            arg[(1, 3)]=0.125573206294*x[0] + (0.947770014219)*x[1] + (-0.436389780102)*x[2]
            ref[(1, 3)]=0.318476720205
            arg[(2, 0)]=0.255371814849*x[0] + (-0.27669998446)*x[1] + (0.750624770122)*x[2]
            ref[(2, 0)]=0.364648300255
            arg[(2, 1)]=-0.885776771771*x[0] + (-0.813763122398)*x[1] + (0.408733493246)*x[2]
            ref[(2, 1)]=-0.645403200462
            arg[(2, 2)]=-0.34120097166*x[0] + (0.715412177153)*x[1] + (-0.159595793743)*x[2]
            ref[(2, 2)]=0.107307705876
            arg[(2, 3)]=-0.478778812442*x[0] + (-0.651349264889)*x[1] + (0.502329605769)*x[2]
            ref[(2, 3)]=-0.313899235781
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref=numpy.zeros((3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.578251435278*x[0] + (0.698546871959)*x[1]
            ref[(0, 0, 0)]=0.0601477183409
            arg[(0, 0, 1)]=0.52434095694*x[0] + (0.855868376846)*x[1]
            ref[(0, 0, 1)]=0.690104666893
            arg[(0, 1, 0)]=-0.523904817798*x[0] + (-0.355826307208)*x[1]
            ref[(0, 1, 0)]=-0.439865562503
            arg[(0, 1, 1)]=0.492305457436*x[0] + (0.522461084118)*x[1]
            ref[(0, 1, 1)]=0.507383270777
            arg[(0, 2, 0)]=0.324144715081*x[0] + (-0.692903853568)*x[1]
            ref[(0, 2, 0)]=-0.184379569244
            arg[(0, 2, 1)]=-0.803583061276*x[0] + (0.60267480284)*x[1]
            ref[(0, 2, 1)]=-0.100454129218
            arg[(1, 0, 0)]=-0.890636769831*x[0] + (0.45688503824)*x[1]
            ref[(1, 0, 0)]=-0.216875865795
            arg[(1, 0, 1)]=-0.171353597238*x[0] + (0.270612570832)*x[1]
            ref[(1, 0, 1)]=0.049629486797
            arg[(1, 1, 0)]=-0.347306039427*x[0] + (0.85153010585)*x[1]
            ref[(1, 1, 0)]=0.252112033212
            arg[(1, 1, 1)]=0.817568311367*x[0] + (-0.0435227987124)*x[1]
            ref[(1, 1, 1)]=0.387022756327
            arg[(1, 2, 0)]=0.55635621267*x[0] + (0.691727917526)*x[1]
            ref[(1, 2, 0)]=0.624042065098
            arg[(1, 2, 1)]=-0.927715553798*x[0] + (-0.159572107511)*x[1]
            ref[(1, 2, 1)]=-0.543643830655
            arg[(2, 0, 0)]=0.723475990691*x[0] + (0.276183192118)*x[1]
            ref[(2, 0, 0)]=0.499829591404
            arg[(2, 0, 1)]=0.0136619135728*x[0] + (0.058861089521)*x[1]
            ref[(2, 0, 1)]=0.0362615015469
            arg[(2, 1, 0)]=0.221986215856*x[0] + (-0.390281170063)*x[1]
            ref[(2, 1, 0)]=-0.0841474771034
            arg[(2, 1, 1)]=0.60614555695*x[0] + (0.39895471252)*x[1]
            ref[(2, 1, 1)]=0.502550134735
            arg[(2, 2, 0)]=-0.511402486157*x[0] + (0.615400898029)*x[1]
            ref[(2, 2, 0)]=0.0519992059361
            arg[(2, 2, 1)]=0.799222949653*x[0] + (0.889621163358)*x[1]
            ref[(2, 2, 1)]=0.844422056505
        else:
            arg[(0, 0, 0)]=-0.153870878128*x[0] + (0.0790409038994)*x[1] + (0.674408473186)*x[2]
            ref[(0, 0, 0)]=0.299789249478
            arg[(0, 0, 1)]=0.0149107226856*x[0] + (0.71846341731)*x[1] + (-0.221644498267)*x[2]
            ref[(0, 0, 1)]=0.255864820864
            arg[(0, 1, 0)]=0.0337723866288*x[0] + (0.232996755404)*x[1] + (-0.0618543070381)*x[2]
            ref[(0, 1, 0)]=0.102457417497
            arg[(0, 1, 1)]=0.559983852152*x[0] + (-0.631158480412)*x[1] + (0.403785349485)*x[2]
            ref[(0, 1, 1)]=0.166305360613
            arg[(0, 2, 0)]=-0.561297764412*x[0] + (-0.331612267115)*x[1] + (-0.265946162803)*x[2]
            ref[(0, 2, 0)]=-0.579428097165
            arg[(0, 2, 1)]=0.0476067869007*x[0] + (0.8175386726)*x[1] + (0.894852967646)*x[2]
            ref[(0, 2, 1)]=0.879999213573
            arg[(1, 0, 0)]=-0.620060971966*x[0] + (0.116907327108)*x[1] + (0.864613442032)*x[2]
            ref[(1, 0, 0)]=0.180729898587
            arg[(1, 0, 1)]=0.0739733103075*x[0] + (0.962578800102)*x[1] + (0.694547211636)*x[2]
            ref[(1, 0, 1)]=0.865549661023
            arg[(1, 1, 0)]=0.40508160816*x[0] + (-0.429656956264)*x[1] + (-0.866494101429)*x[2]
            ref[(1, 1, 0)]=-0.445534724767
            arg[(1, 1, 1)]=0.968419833205*x[0] + (-0.661078507464)*x[1] + (0.0765090018621)*x[2]
            ref[(1, 1, 1)]=0.191925163802
            arg[(1, 2, 0)]=0.980938497783*x[0] + (0.859190678765)*x[1] + (-0.249214635766)*x[2]
            ref[(1, 2, 0)]=0.795457270391
            arg[(1, 2, 1)]=0.598033593552*x[0] + (0.696175063791)*x[1] + (0.814719307811)*x[2]
            ref[(1, 2, 1)]=1.05446398258
            arg[(2, 0, 0)]=0.892402836761*x[0] + (-0.769322504497)*x[1] + (0.738442269633)*x[2]
            ref[(2, 0, 0)]=0.430761300949
            arg[(2, 0, 1)]=0.139869727911*x[0] + (-0.956233706026)*x[1] + (0.00385419791983)*x[2]
            ref[(2, 0, 1)]=-0.406254890098
            arg[(2, 1, 0)]=0.0562443750499*x[0] + (0.41907282334)*x[1] + (-0.326885660728)*x[2]
            ref[(2, 1, 0)]=0.0742157688312
            arg[(2, 1, 1)]=-0.268741073444*x[0] + (-0.931122303545)*x[1] + (0.877171919232)*x[2]
            ref[(2, 1, 1)]=-0.161345728878
            arg[(2, 2, 0)]=-0.445290243625*x[0] + (-0.373809740859)*x[1] + (-0.697516282263)*x[2]
            ref[(2, 2, 0)]=-0.758308133374
            arg[(2, 2, 1)]=0.606331747016*x[0] + (-0.105163865761)*x[1] + (-0.251585323164)*x[2]
            ref[(2, 2, 1)]=0.124791279046
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3, 2),w)
        ref=numpy.zeros((2, 3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.15761156566*x[0] + (0.959786962561)*x[1]
            ref[(0, 0, 0, 0)]=0.401087698451
            arg[(0, 0, 0, 1)]=-0.0324458074709*x[0] + (-0.635730627375)*x[1]
            ref[(0, 0, 0, 1)]=-0.334088217423
            arg[(0, 0, 1, 0)]=0.56335051049*x[0] + (0.0623829693446)*x[1]
            ref[(0, 0, 1, 0)]=0.312866739917
            arg[(0, 0, 1, 1)]=0.101368551013*x[0] + (0.783236487945)*x[1]
            ref[(0, 0, 1, 1)]=0.442302519479
            arg[(0, 0, 2, 0)]=-0.254530667771*x[0] + (0.0848944411746)*x[1]
            ref[(0, 0, 2, 0)]=-0.0848181132984
            arg[(0, 0, 2, 1)]=-0.690019425389*x[0] + (-0.90039711519)*x[1]
            ref[(0, 0, 2, 1)]=-0.79520827029
            arg[(0, 1, 0, 0)]=0.95068684004*x[0] + (-0.880356699926)*x[1]
            ref[(0, 1, 0, 0)]=0.0351650700568
            arg[(0, 1, 0, 1)]=0.372301826019*x[0] + (0.201400422231)*x[1]
            ref[(0, 1, 0, 1)]=0.286851124125
            arg[(0, 1, 1, 0)]=-0.672952278902*x[0] + (-0.304720764561)*x[1]
            ref[(0, 1, 1, 0)]=-0.488836521731
            arg[(0, 1, 1, 1)]=0.667853348099*x[0] + (0.612335423937)*x[1]
            ref[(0, 1, 1, 1)]=0.640094386018
            arg[(0, 1, 2, 0)]=-0.112673514079*x[0] + (-0.211610686951)*x[1]
            ref[(0, 1, 2, 0)]=-0.162142100515
            arg[(0, 1, 2, 1)]=-0.843817911189*x[0] + (-0.35196241634)*x[1]
            ref[(0, 1, 2, 1)]=-0.597890163764
            arg[(0, 2, 0, 0)]=0.362908250988*x[0] + (-0.307195587881)*x[1]
            ref[(0, 2, 0, 0)]=0.0278563315536
            arg[(0, 2, 0, 1)]=-0.493607508838*x[0] + (-0.783052730781)*x[1]
            ref[(0, 2, 0, 1)]=-0.63833011981
            arg[(0, 2, 1, 0)]=-0.664850284171*x[0] + (-0.926914699708)*x[1]
            ref[(0, 2, 1, 0)]=-0.79588249194
            arg[(0, 2, 1, 1)]=0.324553986861*x[0] + (-0.670251539577)*x[1]
            ref[(0, 2, 1, 1)]=-0.172848776358
            arg[(0, 2, 2, 0)]=0.770888687231*x[0] + (-0.565537293197)*x[1]
            ref[(0, 2, 2, 0)]=0.102675697017
            arg[(0, 2, 2, 1)]=-0.980071331301*x[0] + (-0.926183683855)*x[1]
            ref[(0, 2, 2, 1)]=-0.953127507578
            arg[(1, 0, 0, 0)]=-0.118577398711*x[0] + (-0.43502730109)*x[1]
            ref[(1, 0, 0, 0)]=-0.276802349901
            arg[(1, 0, 0, 1)]=-0.571427391254*x[0] + (0.8767126936)*x[1]
            ref[(1, 0, 0, 1)]=0.152642651173
            arg[(1, 0, 1, 0)]=-0.870772374492*x[0] + (0.298846950443)*x[1]
            ref[(1, 0, 1, 0)]=-0.285962712025
            arg[(1, 0, 1, 1)]=-0.112367068605*x[0] + (0.761337045086)*x[1]
            ref[(1, 0, 1, 1)]=0.32448498824
            arg[(1, 0, 2, 0)]=-0.120692333876*x[0] + (-0.740918779918)*x[1]
            ref[(1, 0, 2, 0)]=-0.430805556897
            arg[(1, 0, 2, 1)]=-0.346432914549*x[0] + (-0.124668557199)*x[1]
            ref[(1, 0, 2, 1)]=-0.235550735874
            arg[(1, 1, 0, 0)]=-0.565020675863*x[0] + (0.246332959814)*x[1]
            ref[(1, 1, 0, 0)]=-0.159343858024
            arg[(1, 1, 0, 1)]=0.218678545001*x[0] + (-0.19829817437)*x[1]
            ref[(1, 1, 0, 1)]=0.0101901853159
            arg[(1, 1, 1, 0)]=0.541933239516*x[0] + (0.84824144274)*x[1]
            ref[(1, 1, 1, 0)]=0.695087341128
            arg[(1, 1, 1, 1)]=0.789130677218*x[0] + (-0.520889077658)*x[1]
            ref[(1, 1, 1, 1)]=0.13412079978
            arg[(1, 1, 2, 0)]=-0.890291173009*x[0] + (0.590455865779)*x[1]
            ref[(1, 1, 2, 0)]=-0.149917653615
            arg[(1, 1, 2, 1)]=0.397934008447*x[0] + (0.00277268977132)*x[1]
            ref[(1, 1, 2, 1)]=0.200353349109
            arg[(1, 2, 0, 0)]=0.0103114597723*x[0] + (-0.557810605292)*x[1]
            ref[(1, 2, 0, 0)]=-0.27374957276
            arg[(1, 2, 0, 1)]=-0.828741106632*x[0] + (-0.0296984492099)*x[1]
            ref[(1, 2, 0, 1)]=-0.429219777921
            arg[(1, 2, 1, 0)]=0.785170900653*x[0] + (-0.668265979066)*x[1]
            ref[(1, 2, 1, 0)]=0.0584524607936
            arg[(1, 2, 1, 1)]=0.567443393522*x[0] + (0.676240538494)*x[1]
            ref[(1, 2, 1, 1)]=0.621841966008
            arg[(1, 2, 2, 0)]=0.0762988110959*x[0] + (0.713978461501)*x[1]
            ref[(1, 2, 2, 0)]=0.395138636298
            arg[(1, 2, 2, 1)]=-0.501615169203*x[0] + (-0.241374489384)*x[1]
            ref[(1, 2, 2, 1)]=-0.371494829294
        else:
            arg[(0, 0, 0, 0)]=0.566210862658*x[0] + (-0.743581865853)*x[1] + (0.121635018296)*x[2]
            ref[(0, 0, 0, 0)]=-0.0278679924494
            arg[(0, 0, 0, 1)]=0.448664605937*x[0] + (0.723761047351)*x[1] + (0.936017012552)*x[2]
            ref[(0, 0, 0, 1)]=1.05422133292
            arg[(0, 0, 1, 0)]=-0.0801291331524*x[0] + (0.413586085371)*x[1] + (-0.997106205334)*x[2]
            ref[(0, 0, 1, 0)]=-0.331824626558
            arg[(0, 0, 1, 1)]=-0.754648777415*x[0] + (-0.11909880969)*x[1] + (0.506901698383)*x[2]
            ref[(0, 0, 1, 1)]=-0.183422944361
            arg[(0, 0, 2, 0)]=-0.966449447031*x[0] + (-0.0521180533969)*x[1] + (-0.72810717428)*x[2]
            ref[(0, 0, 2, 0)]=-0.873337337354
            arg[(0, 0, 2, 1)]=0.388862028906*x[0] + (0.304402068652)*x[1] + (0.562936803813)*x[2]
            ref[(0, 0, 2, 1)]=0.628100450686
            arg[(0, 1, 0, 0)]=-0.689227385581*x[0] + (-0.0509599260878)*x[1] + (0.0400666299676)*x[2]
            ref[(0, 1, 0, 0)]=-0.350060340851
            arg[(0, 1, 0, 1)]=-0.5456855141*x[0] + (-0.210274959233)*x[1] + (0.265466130759)*x[2]
            ref[(0, 1, 0, 1)]=-0.245247171287
            arg[(0, 1, 1, 0)]=-0.243775911136*x[0] + (-0.456980042256)*x[1] + (-0.26697521506)*x[2]
            ref[(0, 1, 1, 0)]=-0.483865584226
            arg[(0, 1, 1, 1)]=-0.225671613297*x[0] + (0.271046389816)*x[1] + (-0.505959320962)*x[2]
            ref[(0, 1, 1, 1)]=-0.230292272222
            arg[(0, 1, 2, 0)]=-0.609895631531*x[0] + (0.908846608209)*x[1] + (-0.405209314435)*x[2]
            ref[(0, 1, 2, 0)]=-0.0531291688782
            arg[(0, 1, 2, 1)]=-0.494702936035*x[0] + (0.448509349655)*x[1] + (-0.166174209833)*x[2]
            ref[(0, 1, 2, 1)]=-0.106183898107
            arg[(0, 2, 0, 0)]=-0.345355060775*x[0] + (-0.270151251974)*x[1] + (0.972529314502)*x[2]
            ref[(0, 2, 0, 0)]=0.178511500877
            arg[(0, 2, 0, 1)]=-0.11484624645*x[0] + (-0.267259441819)*x[1] + (0.775342478512)*x[2]
            ref[(0, 2, 0, 1)]=0.196618395121
            arg[(0, 2, 1, 0)]=-0.346623350893*x[0] + (0.095529126823)*x[1] + (0.774818249803)*x[2]
            ref[(0, 2, 1, 0)]=0.261862012866
            arg[(0, 2, 1, 1)]=-0.386254220868*x[0] + (0.534900602089)*x[1] + (0.713108066428)*x[2]
            ref[(0, 2, 1, 1)]=0.430877223825
            arg[(0, 2, 2, 0)]=-0.374865407551*x[0] + (-0.174501526577)*x[1] + (0.198820545065)*x[2]
            ref[(0, 2, 2, 0)]=-0.175273194532
            arg[(0, 2, 2, 1)]=0.630049759191*x[0] + (-0.00121668061931)*x[1] + (-0.605770687491)*x[2]
            ref[(0, 2, 2, 1)]=0.01153119554
            arg[(1, 0, 0, 0)]=-0.0290599186014*x[0] + (0.38644775721)*x[1] + (-0.202958042838)*x[2]
            ref[(1, 0, 0, 0)]=0.0772148978854
            arg[(1, 0, 0, 1)]=0.762997578023*x[0] + (-0.564892115439)*x[1] + (0.635556220665)*x[2]
            ref[(1, 0, 0, 1)]=0.416830841625
            arg[(1, 0, 1, 0)]=0.395399088615*x[0] + (-0.519892906672)*x[1] + (-0.0847823147902)*x[2]
            ref[(1, 0, 1, 0)]=-0.104638066423
            arg[(1, 0, 1, 1)]=-0.15554444321*x[0] + (0.647358293557)*x[1] + (0.128437181271)*x[2]
            ref[(1, 0, 1, 1)]=0.310125515809
            arg[(1, 0, 2, 0)]=0.00686537618*x[0] + (0.102239426022)*x[1] + (-0.575258189912)*x[2]
            ref[(1, 0, 2, 0)]=-0.233076693855
            arg[(1, 0, 2, 1)]=-0.859179375885*x[0] + (0.450962186879)*x[1] + (-0.642991824447)*x[2]
            ref[(1, 0, 2, 1)]=-0.525604506726
            arg[(1, 1, 0, 0)]=0.382702025169*x[0] + (0.180851070352)*x[1] + (0.0749443135434)*x[2]
            ref[(1, 1, 0, 0)]=0.319248704532
            arg[(1, 1, 0, 1)]=-0.623654244133*x[0] + (-0.635713934945)*x[1] + (-0.591754350005)*x[2]
            ref[(1, 1, 0, 1)]=-0.925561264542
            arg[(1, 1, 1, 0)]=0.0708359646252*x[0] + (-0.34762417868)*x[1] + (-0.0178657570228)*x[2]
            ref[(1, 1, 1, 0)]=-0.147326985539
            arg[(1, 1, 1, 1)]=0.306397275406*x[0] + (0.880056864931)*x[1] + (-0.470185372478)*x[2]
            ref[(1, 1, 1, 1)]=0.35813438393
            arg[(1, 1, 2, 0)]=0.242229005016*x[0] + (-0.978625463725)*x[1] + (-0.442187422134)*x[2]
            ref[(1, 1, 2, 0)]=-0.589291940421
            arg[(1, 1, 2, 1)]=-0.816646562448*x[0] + (0.579466317654)*x[1] + (0.600887282833)*x[2]
            ref[(1, 1, 2, 1)]=0.181853519019
            arg[(1, 2, 0, 0)]=-0.832577644439*x[0] + (-0.23304459549)*x[1] + (0.0114996911371)*x[2]
            ref[(1, 2, 0, 0)]=-0.527061274396
            arg[(1, 2, 0, 1)]=-0.0529393912568*x[0] + (0.228175163461)*x[1] + (0.286236085104)*x[2]
            ref[(1, 2, 0, 1)]=0.230735928654
            arg[(1, 2, 1, 0)]=0.0432675104672*x[0] + (0.179502521641)*x[1] + (0.827432516012)*x[2]
            ref[(1, 2, 1, 0)]=0.52510127406
            arg[(1, 2, 1, 1)]=0.901457145466*x[0] + (-0.713311022375)*x[1] + (0.252676406933)*x[2]
            ref[(1, 2, 1, 1)]=0.220411265012
            arg[(1, 2, 2, 0)]=0.67422180743*x[0] + (-0.448745636169)*x[1] + (0.519627943439)*x[2]
            ref[(1, 2, 2, 0)]=0.37255205735
            arg[(1, 2, 2, 1)]=0.850645641954*x[0] + (0.643432034122)*x[1] + (0.455854503927)*x[2]
            ref[(1, 2, 2, 1)]=0.974966090001
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.625992031249*x[0] + (0.142364782324)*x[1]
            ref=-0.241813624463
        else:
            arg=-0.688702086549*x[0] + (0.598815004075)*x[1] + (0.0813090221386)*x[2]
            ref=-0.00428903016757
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4,),w)
        ref=numpy.zeros((4,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.530139769131*x[0] + (0.529966247414)*x[1]
            ref[(0,)]=-8.67608588152e-05
            arg[(1,)]=-0.828904215481*x[0] + (0.748162346263)*x[1]
            ref[(1,)]=-0.0403709346092
            arg[(2,)]=0.211036902922*x[0] + (0.498418152737)*x[1]
            ref[(2,)]=0.35472752783
            arg[(3,)]=0.200305272753*x[0] + (-0.392168284347)*x[1]
            ref[(3,)]=-0.0959315057973
        else:
            arg[(0,)]=-0.834806889263*x[0] + (0.261152391377)*x[1] + (-0.0192533729674)*x[2]
            ref[(0,)]=-0.296453935427
            arg[(1,)]=0.967649240791*x[0] + (0.787947165637)*x[1] + (-0.820008623949)*x[2]
            ref[(1,)]=0.467793891239
            arg[(2,)]=-0.682755257095*x[0] + (-0.741778117243)*x[1] + (-0.108259042996)*x[2]
            ref[(2,)]=-0.766396208666
            arg[(3,)]=0.277901054515*x[0] + (-0.650580553971)*x[1] + (-0.819407262993)*x[2]
            ref[(3,)]=-0.596043381225
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2),w)
        ref=numpy.zeros((2, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.0353154286603*x[0] + (0.0943015709676)*x[1]
            ref[(0, 0)]=0.0294930711537
            arg[(0, 1)]=0.314292334635*x[0] + (-0.0742395555662)*x[1]
            ref[(0, 1)]=0.120026389534
            arg[(1, 0)]=-0.773611700219*x[0] + (-0.113027682831)*x[1]
            ref[(1, 0)]=-0.443319691525
            arg[(1, 1)]=-0.178671629132*x[0] + (-0.885130258231)*x[1]
            ref[(1, 1)]=-0.531900943682
        else:
            arg[(0, 0)]=-0.265188122972*x[0] + (0.792465239987)*x[1] + (0.731294647487)*x[2]
            ref[(0, 0)]=0.629285882251
            arg[(0, 1)]=0.013607593241*x[0] + (-0.441108210982)*x[1] + (0.489920169338)*x[2]
            ref[(0, 1)]=0.0312097757985
            arg[(1, 0)]=0.305138000671*x[0] + (-0.83750075908)*x[1] + (-0.0530355858573)*x[2]
            ref[(1, 0)]=-0.292699172133
            arg[(1, 1)]=0.876934981057*x[0] + (-0.125396891853)*x[1] + (0.362141720882)*x[2]
            ref[(1, 1)]=0.556839905043
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 2),w)
        ref=numpy.zeros((4, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.520383744045*x[0] + (0.0724568531045)*x[1]
            ref[(0, 0, 0)]=0.296420298575
            arg[(0, 0, 1)]=-0.668723309773*x[0] + (-0.0290689609574)*x[1]
            ref[(0, 0, 1)]=-0.348896135365
            arg[(0, 1, 0)]=-0.919397875811*x[0] + (-0.158181248859)*x[1]
            ref[(0, 1, 0)]=-0.538789562335
            arg[(0, 1, 1)]=-0.792583750539*x[0] + (0.616437929959)*x[1]
            ref[(0, 1, 1)]=-0.08807291029
            arg[(0, 2, 0)]=0.81972183613*x[0] + (0.379065145624)*x[1]
            ref[(0, 2, 0)]=0.599393490877
            arg[(0, 2, 1)]=0.208534879112*x[0] + (-0.316971518144)*x[1]
            ref[(0, 2, 1)]=-0.054218319516
            arg[(0, 3, 0)]=-0.121072690056*x[0] + (-0.697006071632)*x[1]
            ref[(0, 3, 0)]=-0.409039380844
            arg[(0, 3, 1)]=0.77629715677*x[0] + (-0.80657325957)*x[1]
            ref[(0, 3, 1)]=-0.0151380514004
            arg[(1, 0, 0)]=0.500744040099*x[0] + (-0.0902254156261)*x[1]
            ref[(1, 0, 0)]=0.205259312237
            arg[(1, 0, 1)]=-0.413824442741*x[0] + (-0.870411870528)*x[1]
            ref[(1, 0, 1)]=-0.642118156634
            arg[(1, 1, 0)]=0.359802339871*x[0] + (0.130063649675)*x[1]
            ref[(1, 1, 0)]=0.244932994773
            arg[(1, 1, 1)]=0.609606161365*x[0] + (-0.937946437664)*x[1]
            ref[(1, 1, 1)]=-0.16417013815
            arg[(1, 2, 0)]=-0.156456726616*x[0] + (0.221167992017)*x[1]
            ref[(1, 2, 0)]=0.0323556327002
            arg[(1, 2, 1)]=-0.413629208827*x[0] + (0.881354750731)*x[1]
            ref[(1, 2, 1)]=0.233862770952
            arg[(1, 3, 0)]=0.288177592466*x[0] + (-0.705360617482)*x[1]
            ref[(1, 3, 0)]=-0.208591512508
            arg[(1, 3, 1)]=0.147409614612*x[0] + (-0.48827399341)*x[1]
            ref[(1, 3, 1)]=-0.170432189399
            arg[(2, 0, 0)]=0.889687801364*x[0] + (0.83556323742)*x[1]
            ref[(2, 0, 0)]=0.862625519392
            arg[(2, 0, 1)]=0.966304918061*x[0] + (-0.110084577403)*x[1]
            ref[(2, 0, 1)]=0.428110170329
            arg[(2, 1, 0)]=-0.502147507596*x[0] + (0.927193628273)*x[1]
            ref[(2, 1, 0)]=0.212523060338
            arg[(2, 1, 1)]=0.562698798694*x[0] + (-0.233054571115)*x[1]
            ref[(2, 1, 1)]=0.164822113789
            arg[(2, 2, 0)]=-0.152783485695*x[0] + (-0.716997818482)*x[1]
            ref[(2, 2, 0)]=-0.434890652088
            arg[(2, 2, 1)]=0.173823903959*x[0] + (0.981950167176)*x[1]
            ref[(2, 2, 1)]=0.577887035568
            arg[(2, 3, 0)]=0.124727621953*x[0] + (-0.0681516154485)*x[1]
            ref[(2, 3, 0)]=0.0282880032523
            arg[(2, 3, 1)]=-0.723170839544*x[0] + (-0.173646712323)*x[1]
            ref[(2, 3, 1)]=-0.448408775933
            arg[(3, 0, 0)]=-0.530277772144*x[0] + (0.984224132404)*x[1]
            ref[(3, 0, 0)]=0.22697318013
            arg[(3, 0, 1)]=-0.145604369905*x[0] + (-0.747911386737)*x[1]
            ref[(3, 0, 1)]=-0.446757878321
            arg[(3, 1, 0)]=0.553237380099*x[0] + (-0.83350440961)*x[1]
            ref[(3, 1, 0)]=-0.140133514756
            arg[(3, 1, 1)]=0.0561731816771*x[0] + (0.91484439279)*x[1]
            ref[(3, 1, 1)]=0.485508787233
            arg[(3, 2, 0)]=0.633365143113*x[0] + (0.230353670442)*x[1]
            ref[(3, 2, 0)]=0.431859406778
            arg[(3, 2, 1)]=0.233677513675*x[0] + (0.475805815476)*x[1]
            ref[(3, 2, 1)]=0.354741664575
            arg[(3, 3, 0)]=-0.967664927909*x[0] + (-0.314040661153)*x[1]
            ref[(3, 3, 0)]=-0.640852794531
            arg[(3, 3, 1)]=-0.846648924217*x[0] + (-0.65559740479)*x[1]
            ref[(3, 3, 1)]=-0.751123164504
        else:
            arg[(0, 0, 0)]=-0.12556565367*x[0] + (-0.00917973837465)*x[1] + (-0.359978308291)*x[2]
            ref[(0, 0, 0)]=-0.247361850168
            arg[(0, 0, 1)]=0.90084470416*x[0] + (0.261079885058)*x[1] + (0.0989456088057)*x[2]
            ref[(0, 0, 1)]=0.630435099012
            arg[(0, 1, 0)]=-0.0562764075479*x[0] + (-0.660375687643)*x[1] + (0.196792114332)*x[2]
            ref[(0, 1, 0)]=-0.259929990429
            arg[(0, 1, 1)]=0.897633554813*x[0] + (-0.409090622383)*x[1] + (0.529336256754)*x[2]
            ref[(0, 1, 1)]=0.508939594592
            arg[(0, 2, 0)]=-0.845156861111*x[0] + (-0.374041448077)*x[1] + (-0.0455123157133)*x[2]
            ref[(0, 2, 0)]=-0.632355312451
            arg[(0, 2, 1)]=0.157343475091*x[0] + (0.0275990834928)*x[1] + (-0.929906427273)*x[2]
            ref[(0, 2, 1)]=-0.372481934345
            arg[(0, 3, 0)]=-0.883101214606*x[0] + (0.16786182251)*x[1] + (-0.434173400837)*x[2]
            ref[(0, 3, 0)]=-0.574706396466
            arg[(0, 3, 1)]=-0.11784029788*x[0] + (-0.0178620651041)*x[1] + (0.858517539122)*x[2]
            ref[(0, 3, 1)]=0.361407588069
            arg[(1, 0, 0)]=-0.368738076826*x[0] + (-0.266860897194)*x[1] + (-0.0144847268007)*x[2]
            ref[(1, 0, 0)]=-0.32504185041
            arg[(1, 0, 1)]=-0.239891046878*x[0] + (0.398551304318)*x[1] + (-0.846971266234)*x[2]
            ref[(1, 0, 1)]=-0.344155504397
            arg[(1, 1, 0)]=-0.294287468715*x[0] + (-0.678059982191)*x[1] + (-0.88847775608)*x[2]
            ref[(1, 1, 0)]=-0.930412603493
            arg[(1, 1, 1)]=-0.0747302529567*x[0] + (-0.614188849206)*x[1] + (0.194461689433)*x[2]
            ref[(1, 1, 1)]=-0.247228706365
            arg[(1, 2, 0)]=0.234880641163*x[0] + (-0.67256276968)*x[1] + (-0.453979820894)*x[2]
            ref[(1, 2, 0)]=-0.445830974706
            arg[(1, 2, 1)]=-0.370670255185*x[0] + (-0.626129373611)*x[1] + (0.108156760384)*x[2]
            ref[(1, 2, 1)]=-0.444321434206
            arg[(1, 3, 0)]=-0.40924281225*x[0] + (-0.675381743328)*x[1] + (-0.231155042953)*x[2]
            ref[(1, 3, 0)]=-0.657889799266
            arg[(1, 3, 1)]=-0.90038756572*x[0] + (0.681696896403)*x[1] + (0.211549376692)*x[2]
            ref[(1, 3, 1)]=-0.00357064631285
            arg[(2, 0, 0)]=-0.285177419988*x[0] + (-0.647075272963)*x[1] + (-0.401913347423)*x[2]
            ref[(2, 0, 0)]=-0.667083020187
            arg[(2, 0, 1)]=0.291850462888*x[0] + (0.310279368619)*x[1] + (0.212402145522)*x[2]
            ref[(2, 0, 1)]=0.407265988515
            arg[(2, 1, 0)]=-0.146775203626*x[0] + (0.77984485212)*x[1] + (0.354511626493)*x[2]
            ref[(2, 1, 0)]=0.493790637493
            arg[(2, 1, 1)]=-0.131142786264*x[0] + (-0.65650829901)*x[1] + (0.0462193380706)*x[2]
            ref[(2, 1, 1)]=-0.370715873602
            arg[(2, 2, 0)]=0.835769416676*x[0] + (0.728890733423)*x[1] + (-0.0310635065616)*x[2]
            ref[(2, 2, 0)]=0.766798321768
            arg[(2, 2, 1)]=0.380145996443*x[0] + (0.364785122779)*x[1] + (0.712496090303)*x[2]
            ref[(2, 2, 1)]=0.728713604763
            arg[(2, 3, 0)]=-0.0560300497028*x[0] + (-0.311823270884)*x[1] + (-0.551923487462)*x[2]
            ref[(2, 3, 0)]=-0.459888404024
            arg[(2, 3, 1)]=-0.894332955226*x[0] + (-0.95375108355)*x[1] + (0.142895575365)*x[2]
            ref[(2, 3, 1)]=-0.852594231706
            arg[(3, 0, 0)]=-0.270481547005*x[0] + (-0.796503418297)*x[1] + (-0.787389396623)*x[2]
            ref[(3, 0, 0)]=-0.927187180962
            arg[(3, 0, 1)]=-0.0295672177886*x[0] + (0.788847992344)*x[1] + (0.67457002202)*x[2]
            ref[(3, 0, 1)]=0.716925398288
            arg[(3, 1, 0)]=-0.919866794782*x[0] + (-0.203735967245)*x[1] + (0.0308492519836)*x[2]
            ref[(3, 1, 0)]=-0.546376755022
            arg[(3, 1, 1)]=-0.861453251931*x[0] + (0.810242847103)*x[1] + (0.171696198969)*x[2]
            ref[(3, 1, 1)]=0.0602428970706
            arg[(3, 2, 0)]=0.953682913002*x[0] + (-0.483948445124)*x[1] + (-0.0493438188509)*x[2]
            ref[(3, 2, 0)]=0.210195324514
            arg[(3, 2, 1)]=-0.103066293131*x[0] + (0.879880574755)*x[1] + (-0.933433445334)*x[2]
            ref[(3, 2, 1)]=-0.0783095818548
            arg[(3, 3, 0)]=-0.649235054554*x[0] + (-0.145811828255)*x[1] + (0.328301451264)*x[2]
            ref[(3, 3, 0)]=-0.233372715772
            arg[(3, 3, 1)]=-0.521643452963*x[0] + (0.223938088446)*x[1] + (0.822459184611)*x[2]
            ref[(3, 3, 1)]=0.262376910047
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2, 4),w)
        ref=numpy.zeros((2, 4, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.91968857228*x[0] + (0.792072941354)*x[1]
            ref[(0, 0, 0, 0)]=0.855880756817
            arg[(0, 0, 0, 1)]=-0.546191835968*x[0] + (-0.39678196293)*x[1]
            ref[(0, 0, 0, 1)]=-0.471486899449
            arg[(0, 0, 0, 2)]=-0.872923210429*x[0] + (0.601737871498)*x[1]
            ref[(0, 0, 0, 2)]=-0.135592669466
            arg[(0, 0, 0, 3)]=0.152237350625*x[0] + (-0.158892418705)*x[1]
            ref[(0, 0, 0, 3)]=-0.00332753403979
            arg[(0, 0, 1, 0)]=-0.0476226167032*x[0] + (0.242684139377)*x[1]
            ref[(0, 0, 1, 0)]=0.0975307613371
            arg[(0, 0, 1, 1)]=0.229830356263*x[0] + (-0.884878357254)*x[1]
            ref[(0, 0, 1, 1)]=-0.327524000495
            arg[(0, 0, 1, 2)]=0.49914256146*x[0] + (-0.17485973439)*x[1]
            ref[(0, 0, 1, 2)]=0.162141413535
            arg[(0, 0, 1, 3)]=0.49799542259*x[0] + (0.453640649005)*x[1]
            ref[(0, 0, 1, 3)]=0.475818035798
            arg[(0, 1, 0, 0)]=0.61747493063*x[0] + (0.490257039431)*x[1]
            ref[(0, 1, 0, 0)]=0.55386598503
            arg[(0, 1, 0, 1)]=0.354376461378*x[0] + (0.0137435190258)*x[1]
            ref[(0, 1, 0, 1)]=0.184059990202
            arg[(0, 1, 0, 2)]=-0.895858959089*x[0] + (0.252534585265)*x[1]
            ref[(0, 1, 0, 2)]=-0.321662186912
            arg[(0, 1, 0, 3)]=-0.0898396658076*x[0] + (0.0915257044701)*x[1]
            ref[(0, 1, 0, 3)]=0.000843019331224
            arg[(0, 1, 1, 0)]=0.784044580551*x[0] + (0.000521137276534)*x[1]
            ref[(0, 1, 1, 0)]=0.392282858914
            arg[(0, 1, 1, 1)]=-0.411693930221*x[0] + (-0.121087494297)*x[1]
            ref[(0, 1, 1, 1)]=-0.266390712259
            arg[(0, 1, 1, 2)]=0.49584878176*x[0] + (-0.47184788489)*x[1]
            ref[(0, 1, 1, 2)]=0.0120004484349
            arg[(0, 1, 1, 3)]=0.683532793058*x[0] + (-0.0694478167168)*x[1]
            ref[(0, 1, 1, 3)]=0.30704248817
            arg[(0, 2, 0, 0)]=0.164147099343*x[0] + (0.584153022678)*x[1]
            ref[(0, 2, 0, 0)]=0.374150061011
            arg[(0, 2, 0, 1)]=0.464448897098*x[0] + (0.636426426256)*x[1]
            ref[(0, 2, 0, 1)]=0.550437661677
            arg[(0, 2, 0, 2)]=0.174107794215*x[0] + (-0.600330835145)*x[1]
            ref[(0, 2, 0, 2)]=-0.213111520465
            arg[(0, 2, 0, 3)]=-0.168415627031*x[0] + (0.264182794972)*x[1]
            ref[(0, 2, 0, 3)]=0.0478835839706
            arg[(0, 2, 1, 0)]=0.0376726157774*x[0] + (-0.236691232953)*x[1]
            ref[(0, 2, 1, 0)]=-0.0995093085878
            arg[(0, 2, 1, 1)]=0.523326821367*x[0] + (0.609744890634)*x[1]
            ref[(0, 2, 1, 1)]=0.566535856001
            arg[(0, 2, 1, 2)]=0.131099242791*x[0] + (0.742330086802)*x[1]
            ref[(0, 2, 1, 2)]=0.436714664796
            arg[(0, 2, 1, 3)]=0.962197702217*x[0] + (-0.0234492934245)*x[1]
            ref[(0, 2, 1, 3)]=0.469374204396
            arg[(0, 3, 0, 0)]=-0.903512438868*x[0] + (0.854521465666)*x[1]
            ref[(0, 3, 0, 0)]=-0.0244954866008
            arg[(0, 3, 0, 1)]=-0.891877183839*x[0] + (-0.965578284211)*x[1]
            ref[(0, 3, 0, 1)]=-0.928727734025
            arg[(0, 3, 0, 2)]=0.47530793933*x[0] + (0.782307817888)*x[1]
            ref[(0, 3, 0, 2)]=0.628807878609
            arg[(0, 3, 0, 3)]=-0.477424569204*x[0] + (0.920748880939)*x[1]
            ref[(0, 3, 0, 3)]=0.221662155868
            arg[(0, 3, 1, 0)]=-0.450733135118*x[0] + (0.0230331959175)*x[1]
            ref[(0, 3, 1, 0)]=-0.2138499696
            arg[(0, 3, 1, 1)]=0.410492913984*x[0] + (0.691885576785)*x[1]
            ref[(0, 3, 1, 1)]=0.551189245385
            arg[(0, 3, 1, 2)]=0.905757153819*x[0] + (-0.265204222749)*x[1]
            ref[(0, 3, 1, 2)]=0.320276465535
            arg[(0, 3, 1, 3)]=-0.333761633321*x[0] + (-0.444654400346)*x[1]
            ref[(0, 3, 1, 3)]=-0.389208016834
            arg[(1, 0, 0, 0)]=0.437952656347*x[0] + (0.87524138701)*x[1]
            ref[(1, 0, 0, 0)]=0.656597021678
            arg[(1, 0, 0, 1)]=-0.60509773718*x[0] + (-0.173312983666)*x[1]
            ref[(1, 0, 0, 1)]=-0.389205360423
            arg[(1, 0, 0, 2)]=0.177893521828*x[0] + (0.778910412016)*x[1]
            ref[(1, 0, 0, 2)]=0.478401966922
            arg[(1, 0, 0, 3)]=0.333783384345*x[0] + (0.13876036632)*x[1]
            ref[(1, 0, 0, 3)]=0.236271875332
            arg[(1, 0, 1, 0)]=-0.30354917637*x[0] + (-0.900168175334)*x[1]
            ref[(1, 0, 1, 0)]=-0.601858675852
            arg[(1, 0, 1, 1)]=0.127600443547*x[0] + (0.0240248458808)*x[1]
            ref[(1, 0, 1, 1)]=0.0758126447139
            arg[(1, 0, 1, 2)]=0.916606037544*x[0] + (0.00779709607107)*x[1]
            ref[(1, 0, 1, 2)]=0.462201566807
            arg[(1, 0, 1, 3)]=0.88716714003*x[0] + (-0.309112160104)*x[1]
            ref[(1, 0, 1, 3)]=0.289027489963
            arg[(1, 1, 0, 0)]=0.712133205218*x[0] + (-0.653865442648)*x[1]
            ref[(1, 1, 0, 0)]=0.0291338812847
            arg[(1, 1, 0, 1)]=-0.237209272192*x[0] + (-0.156601415233)*x[1]
            ref[(1, 1, 0, 1)]=-0.196905343713
            arg[(1, 1, 0, 2)]=0.558985088298*x[0] + (0.64893314584)*x[1]
            ref[(1, 1, 0, 2)]=0.603959117069
            arg[(1, 1, 0, 3)]=-0.781497120192*x[0] + (0.0606597085997)*x[1]
            ref[(1, 1, 0, 3)]=-0.360418705796
            arg[(1, 1, 1, 0)]=0.450126376653*x[0] + (-0.144057597696)*x[1]
            ref[(1, 1, 1, 0)]=0.153034389478
            arg[(1, 1, 1, 1)]=0.581808201699*x[0] + (0.485661576861)*x[1]
            ref[(1, 1, 1, 1)]=0.53373488928
            arg[(1, 1, 1, 2)]=0.798442636789*x[0] + (-0.219124986115)*x[1]
            ref[(1, 1, 1, 2)]=0.289658825337
            arg[(1, 1, 1, 3)]=-0.155040817428*x[0] + (0.943877705685)*x[1]
            ref[(1, 1, 1, 3)]=0.394418444128
            arg[(1, 2, 0, 0)]=0.0994322436551*x[0] + (-0.948881706613)*x[1]
            ref[(1, 2, 0, 0)]=-0.424724731479
            arg[(1, 2, 0, 1)]=0.487818970384*x[0] + (-0.294728644156)*x[1]
            ref[(1, 2, 0, 1)]=0.0965451631143
            arg[(1, 2, 0, 2)]=0.00402838083543*x[0] + (0.625912835097)*x[1]
            ref[(1, 2, 0, 2)]=0.314970607966
            arg[(1, 2, 0, 3)]=0.113882672383*x[0] + (-0.795033185016)*x[1]
            ref[(1, 2, 0, 3)]=-0.340575256316
            arg[(1, 2, 1, 0)]=0.751180011927*x[0] + (-0.883982180721)*x[1]
            ref[(1, 2, 1, 0)]=-0.0664010843974
            arg[(1, 2, 1, 1)]=0.27116222084*x[0] + (0.969381943616)*x[1]
            ref[(1, 2, 1, 1)]=0.620272082228
            arg[(1, 2, 1, 2)]=0.0221373655302*x[0] + (0.0905363119889)*x[1]
            ref[(1, 2, 1, 2)]=0.0563368387595
            arg[(1, 2, 1, 3)]=0.0688320589622*x[0] + (0.783489122521)*x[1]
            ref[(1, 2, 1, 3)]=0.426160590742
            arg[(1, 3, 0, 0)]=0.170541464012*x[0] + (0.486711531541)*x[1]
            ref[(1, 3, 0, 0)]=0.328626497776
            arg[(1, 3, 0, 1)]=-0.287002737405*x[0] + (0.879282343575)*x[1]
            ref[(1, 3, 0, 1)]=0.296139803085
            arg[(1, 3, 0, 2)]=-0.0174380314402*x[0] + (0.498294858763)*x[1]
            ref[(1, 3, 0, 2)]=0.240428413661
            arg[(1, 3, 0, 3)]=-0.982543868186*x[0] + (-0.390042139006)*x[1]
            ref[(1, 3, 0, 3)]=-0.686293003596
            arg[(1, 3, 1, 0)]=0.530576956623*x[0] + (0.147217131553)*x[1]
            ref[(1, 3, 1, 0)]=0.338897044088
            arg[(1, 3, 1, 1)]=-0.638096181557*x[0] + (-0.906760821731)*x[1]
            ref[(1, 3, 1, 1)]=-0.772428501644
            arg[(1, 3, 1, 2)]=-0.923019223661*x[0] + (0.965417860843)*x[1]
            ref[(1, 3, 1, 2)]=0.0211993185909
            arg[(1, 3, 1, 3)]=-0.511294237349*x[0] + (-0.398343141921)*x[1]
            ref[(1, 3, 1, 3)]=-0.454818689635
        else:
            arg[(0, 0, 0, 0)]=0.966355068122*x[0] + (-0.139988016448)*x[1] + (0.957878459814)*x[2]
            ref[(0, 0, 0, 0)]=0.892122755743
            arg[(0, 0, 0, 1)]=0.610227217391*x[0] + (-0.0838955998698)*x[1] + (0.0949090709654)*x[2]
            ref[(0, 0, 0, 1)]=0.310620344243
            arg[(0, 0, 0, 2)]=-0.34481525385*x[0] + (0.781738275817)*x[1] + (0.136658219756)*x[2]
            ref[(0, 0, 0, 2)]=0.286790620861
            arg[(0, 0, 0, 3)]=-0.988812508227*x[0] + (-0.437818424923)*x[1] + (0.747390701581)*x[2]
            ref[(0, 0, 0, 3)]=-0.339620115785
            arg[(0, 0, 1, 0)]=-0.100335868764*x[0] + (0.995569220513)*x[1] + (0.925590694525)*x[2]
            ref[(0, 0, 1, 0)]=0.910412023137
            arg[(0, 0, 1, 1)]=0.455283171886*x[0] + (0.42638101278)*x[1] + (-0.457679305441)*x[2]
            ref[(0, 0, 1, 1)]=0.211992439613
            arg[(0, 0, 1, 2)]=0.363232386395*x[0] + (-0.989374711654)*x[1] + (-0.785911241465)*x[2]
            ref[(0, 0, 1, 2)]=-0.706026783362
            arg[(0, 0, 1, 3)]=0.170811567181*x[0] + (0.713480982549)*x[1] + (0.499916025012)*x[2]
            ref[(0, 0, 1, 3)]=0.692104287371
            arg[(0, 1, 0, 0)]=0.467200634354*x[0] + (0.0194649442278)*x[1] + (-0.795667513493)*x[2]
            ref[(0, 1, 0, 0)]=-0.154500967456
            arg[(0, 1, 0, 1)]=0.475741303259*x[0] + (-0.00427263949038)*x[1] + (0.633374068113)*x[2]
            ref[(0, 1, 0, 1)]=0.552421365941
            arg[(0, 1, 0, 2)]=0.761646718748*x[0] + (0.667337346478)*x[1] + (-0.640959923713)*x[2]
            ref[(0, 1, 0, 2)]=0.394012070756
            arg[(0, 1, 0, 3)]=0.473430155655*x[0] + (0.699832340479)*x[1] + (0.860714773617)*x[2]
            ref[(0, 1, 0, 3)]=1.01698863488
            arg[(0, 1, 1, 0)]=-0.471552468729*x[0] + (-0.829219937436)*x[1] + (0.406940896025)*x[2]
            ref[(0, 1, 1, 0)]=-0.44691575507
            arg[(0, 1, 1, 1)]=0.566851937204*x[0] + (0.995043930949)*x[1] + (-0.291120608593)*x[2]
            ref[(0, 1, 1, 1)]=0.63538762978
            arg[(0, 1, 1, 2)]=0.00528507912279*x[0] + (0.13480284208)*x[1] + (0.0377151903755)*x[2]
            ref[(0, 1, 1, 2)]=0.088901555789
            arg[(0, 1, 1, 3)]=-0.0394394483874*x[0] + (0.39744202378)*x[1] + (0.193192929548)*x[2]
            ref[(0, 1, 1, 3)]=0.27559775247
            arg[(0, 2, 0, 0)]=-0.716259264639*x[0] + (-0.0432703781801)*x[1] + (-0.806013405285)*x[2]
            ref[(0, 2, 0, 0)]=-0.782771524052
            arg[(0, 2, 0, 1)]=-0.409782442192*x[0] + (-0.11727220183)*x[1] + (-0.252861836027)*x[2]
            ref[(0, 2, 0, 1)]=-0.389958240024
            arg[(0, 2, 0, 2)]=-0.890368792819*x[0] + (-0.478591567644)*x[1] + (0.128012193457)*x[2]
            ref[(0, 2, 0, 2)]=-0.620474083503
            arg[(0, 2, 0, 3)]=-0.575718479175*x[0] + (0.645483177481)*x[1] + (-0.972789994687)*x[2]
            ref[(0, 2, 0, 3)]=-0.45151264819
            arg[(0, 2, 1, 0)]=0.292179128961*x[0] + (0.107264967883)*x[1] + (-0.446370174639)*x[2]
            ref[(0, 2, 1, 0)]=-0.0234630388971
            arg[(0, 2, 1, 1)]=-0.893331670942*x[0] + (-0.854755310342)*x[1] + (-0.460526042107)*x[2]
            ref[(0, 2, 1, 1)]=-1.1043065117
            arg[(0, 2, 1, 2)]=-0.655160918971*x[0] + (0.395931891609)*x[1] + (0.480065854294)*x[2]
            ref[(0, 2, 1, 2)]=0.110418413466
            arg[(0, 2, 1, 3)]=0.23489861541*x[0] + (0.147233075162)*x[1] + (-0.966648356365)*x[2]
            ref[(0, 2, 1, 3)]=-0.292258332897
            arg[(0, 3, 0, 0)]=-0.0545451681257*x[0] + (0.49855431762)*x[1] + (0.109492391027)*x[2]
            ref[(0, 3, 0, 0)]=0.276750770261
            arg[(0, 3, 0, 1)]=-0.85894048054*x[0] + (0.437912719548)*x[1] + (-0.892475215716)*x[2]
            ref[(0, 3, 0, 1)]=-0.656751488354
            arg[(0, 3, 0, 2)]=-0.0936546474516*x[0] + (-0.349662606454)*x[1] + (-0.885573924596)*x[2]
            ref[(0, 3, 0, 2)]=-0.664445589251
            arg[(0, 3, 0, 3)]=-0.55092473417*x[0] + (0.688667363081)*x[1] + (-0.110912345826)*x[2]
            ref[(0, 3, 0, 3)]=0.0134151415425
            arg[(0, 3, 1, 0)]=0.431747376007*x[0] + (-0.953933460449)*x[1] + (-0.805611920649)*x[2]
            ref[(0, 3, 1, 0)]=-0.663899002546
            arg[(0, 3, 1, 1)]=-0.436295774938*x[0] + (-0.935158024519)*x[1] + (0.756282102803)*x[2]
            ref[(0, 3, 1, 1)]=-0.307585848327
            arg[(0, 3, 1, 2)]=-0.196802517088*x[0] + (0.514827552164)*x[1] + (0.295640258772)*x[2]
            ref[(0, 3, 1, 2)]=0.306832646924
            arg[(0, 3, 1, 3)]=0.386609786913*x[0] + (0.864601339702)*x[1] + (-0.680226726124)*x[2]
            ref[(0, 3, 1, 3)]=0.285492200245
            arg[(1, 0, 0, 0)]=0.442958194854*x[0] + (0.583856155203)*x[1] + (0.856745811683)*x[2]
            ref[(1, 0, 0, 0)]=0.94178008087
            arg[(1, 0, 0, 1)]=-0.657105822802*x[0] + (-0.917401798494)*x[1] + (-0.776216392792)*x[2]
            ref[(1, 0, 0, 1)]=-1.17536200704
            arg[(1, 0, 0, 2)]=-0.176219131983*x[0] + (-0.953233575647)*x[1] + (0.267431010994)*x[2]
            ref[(1, 0, 0, 2)]=-0.431010848318
            arg[(1, 0, 0, 3)]=-0.4552337059*x[0] + (0.648837627284)*x[1] + (0.210471553514)*x[2]
            ref[(1, 0, 0, 3)]=0.202037737449
            arg[(1, 0, 1, 0)]=-0.915741419602*x[0] + (0.0316484856884)*x[1] + (-0.570941743186)*x[2]
            ref[(1, 0, 1, 0)]=-0.72751733855
            arg[(1, 0, 1, 1)]=0.794736055417*x[0] + (-0.348140415721)*x[1] + (-0.485053878371)*x[2]
            ref[(1, 0, 1, 1)]=-0.0192291193378
            arg[(1, 0, 1, 2)]=0.579122643356*x[0] + (0.675061731945)*x[1] + (-0.5717624399)*x[2]
            ref[(1, 0, 1, 2)]=0.3412109677
            arg[(1, 0, 1, 3)]=0.564217319227*x[0] + (0.104241779633)*x[1] + (-0.622287206939)*x[2]
            ref[(1, 0, 1, 3)]=0.0230859459601
            arg[(1, 1, 0, 0)]=-0.370052001726*x[0] + (-0.0220892253765)*x[1] + (-0.50562583522)*x[2]
            ref[(1, 1, 0, 0)]=-0.448883531161
            arg[(1, 1, 0, 1)]=-0.738121198714*x[0] + (-0.240449393239)*x[1] + (-0.563481097217)*x[2]
            ref[(1, 1, 0, 1)]=-0.771025844585
            arg[(1, 1, 0, 2)]=0.932039733293*x[0] + (-0.00735606543949)*x[1] + (-0.440583838871)*x[2]
            ref[(1, 1, 0, 2)]=0.242049914491
            arg[(1, 1, 0, 3)]=0.684415221998*x[0] + (-0.327158767472)*x[1] + (-0.245820319755)*x[2]
            ref[(1, 1, 0, 3)]=0.0557180673857
            arg[(1, 1, 1, 0)]=-0.300475971058*x[0] + (-0.599046024854)*x[1] + (-0.963613406767)*x[2]
            ref[(1, 1, 1, 0)]=-0.931567701339
            arg[(1, 1, 1, 1)]=-0.148763902788*x[0] + (-0.393655794908)*x[1] + (-0.96755626465)*x[2]
            ref[(1, 1, 1, 1)]=-0.754987981173
            arg[(1, 1, 1, 2)]=-0.792445475255*x[0] + (-0.454062297375)*x[1] + (0.967374922378)*x[2]
            ref[(1, 1, 1, 2)]=-0.139566425126
            arg[(1, 1, 1, 3)]=0.786695354915*x[0] + (0.531183524843)*x[1] + (-0.553458939936)*x[2]
            ref[(1, 1, 1, 3)]=0.382209969911
            arg[(1, 2, 0, 0)]=0.976758065055*x[0] + (0.156278971739)*x[1] + (0.30120409357)*x[2]
            ref[(1, 2, 0, 0)]=0.717120565182
            arg[(1, 2, 0, 1)]=-0.404573707678*x[0] + (0.877310435943)*x[1] + (-0.775084913297)*x[2]
            ref[(1, 2, 0, 1)]=-0.151174092516
            arg[(1, 2, 0, 2)]=0.493918632387*x[0] + (-0.627751915192)*x[1] + (-0.876487048449)*x[2]
            ref[(1, 2, 0, 2)]=-0.505160165627
            arg[(1, 2, 0, 3)]=0.217590378398*x[0] + (0.247718506546)*x[1] + (-0.138286881251)*x[2]
            ref[(1, 2, 0, 3)]=0.163511001846
            arg[(1, 2, 1, 0)]=0.310511155745*x[0] + (0.787252938668)*x[1] + (0.634432100851)*x[2]
            ref[(1, 2, 1, 0)]=0.866098097632
            arg[(1, 2, 1, 1)]=-0.753165891833*x[0] + (-0.0988489619392)*x[1] + (0.00339653703654)*x[2]
            ref[(1, 2, 1, 1)]=-0.424309158368
            arg[(1, 2, 1, 2)]=-0.0288074822683*x[0] + (-0.566238083862)*x[1] + (0.861156907899)*x[2]
            ref[(1, 2, 1, 2)]=0.133055670885
            arg[(1, 2, 1, 3)]=-0.0152521885108*x[0] + (0.0281659773917)*x[1] + (0.0806280310572)*x[2]
            ref[(1, 2, 1, 3)]=0.0467709099691
            arg[(1, 3, 0, 0)]=0.0623774781447*x[0] + (0.133485016373)*x[1] + (0.260139506193)*x[2]
            ref[(1, 3, 0, 0)]=0.228001000355
            arg[(1, 3, 0, 1)]=-0.155333789599*x[0] + (0.503318017919)*x[1] + (0.999552960001)*x[2]
            ref[(1, 3, 0, 1)]=0.67376859416
            arg[(1, 3, 0, 2)]=-0.476812628312*x[0] + (0.992139231867)*x[1] + (-0.0645236494865)*x[2]
            ref[(1, 3, 0, 2)]=0.225401477034
            arg[(1, 3, 0, 3)]=0.991184069158*x[0] + (-0.177086276004)*x[1] + (-0.675730123664)*x[2]
            ref[(1, 3, 0, 3)]=0.0691838347452
            arg[(1, 3, 1, 0)]=-0.410412417236*x[0] + (0.0174221459588)*x[1] + (-0.881744610147)*x[2]
            ref[(1, 3, 1, 0)]=-0.637367440712
            arg[(1, 3, 1, 1)]=-0.420861774392*x[0] + (-0.0668301529866)*x[1] + (0.734455631295)*x[2]
            ref[(1, 3, 1, 1)]=0.123381851958
            arg[(1, 3, 1, 2)]=0.481989978718*x[0] + (0.588581403301)*x[1] + (0.347545013542)*x[2]
            ref[(1, 3, 1, 2)]=0.709058197781
            arg[(1, 3, 1, 3)]=-0.189824033632*x[0] + (-0.307598397989)*x[1] + (0.581442508531)*x[2]
            ref[(1, 3, 1, 3)]=0.0420100384553
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank0(self):
        """
        tests integral of rank 0 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.336370851099*x[0]**o + (-0.832038136338)*x[0] + (0.0271938392913)*x[1]**o + (-0.273063213538)*x[1]
            ref=0.0271938392913/(o+1.)+(-0.552550674938)+(-0.336370851099)*0.5**o
        else:
            arg=-0.620596251946*x[0]**o + (0.156705459874)*x[0] + (-0.413791900372)*x[1]**o + (0.0702420467475)*x[1] + (-0.837920667232)*x[2]**o + (0.0493973019805)*x[2]
            ref=-1.2517125676/(o+1.)+(0.138172404301)+(-0.620596251946)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank1(self):
        """
        tests integral of rank 1 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.928701509791*x[0]**o + (0.325078025247)*x[0] + (0.567607083655)*x[1]**o + (0.685240161819)*x[1]
            ref[(0,)]=0.567607083655/(o+1.)+(0.505159093533)+(0.928701509791)*0.5**o
            arg[(1,)]=0.0624804933076*x[0]**o + (-0.667922208898)*x[0] + (0.43663577439)*x[1]**o + (0.881473580886)*x[1]
            ref[(1,)]=0.43663577439/(o+1.)+(0.106775685994)+(0.0624804933076)*0.5**o
        else:
            arg[(0,)]=0.643753454925*x[0]**o + (-0.892353266063)*x[0] + (0.0798735595324)*x[1]**o + (-0.163998855375)*x[1] + (-0.249977509359)*x[2]**o + (0.232111741601)*x[2]
            ref[(0,)]=-0.170103949827/(o+1.)+(-0.412120189918)+(0.643753454925)*0.5**o
            arg[(1,)]=0.252632270723*x[0]**o + (0.553145051824)*x[0] + (-0.972565405543)*x[1]**o + (-0.655906024672)*x[1] + (0.189816869602)*x[2]**o + (0.615917740582)*x[2]
            ref[(1,)]=-0.782748535941/(o+1.)+(0.256578383867)+(0.252632270723)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank2(self):
        """
        tests integral of rank 2 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.824299958497*x[0]**o + (0.548493490968)*x[0] + (-0.376110256686)*x[1]**o + (0.238600811496)*x[1]
            ref[(0, 0)]=-0.376110256686/(o+1.)+(0.393547151232)+(-0.824299958497)*0.5**o
            arg[(0, 1)]=0.528221859627*x[0]**o + (0.570282609367)*x[0] + (0.584882962855)*x[1]**o + (-0.952456172398)*x[1]
            ref[(0, 1)]=0.584882962855/(o+1.)+(-0.191086781515)+(0.528221859627)*0.5**o
            arg[(0, 2)]=-0.0833089633453*x[0]**o + (0.56438584136)*x[0] + (0.00230883119403)*x[1]**o + (-0.773882759386)*x[1]
            ref[(0, 2)]=0.00230883119403/(o+1.)+(-0.104748459013)+(-0.0833089633453)*0.5**o
            arg[(0, 3)]=-0.332942372288*x[0]**o + (0.269729804317)*x[0] + (-0.632102864843)*x[1]**o + (0.655807104594)*x[1]
            ref[(0, 3)]=-0.632102864843/(o+1.)+(0.462768454455)+(-0.332942372288)*0.5**o
            arg[(1, 0)]=-0.0126646794085*x[0]**o + (0.319217050841)*x[0] + (-0.0641084668143)*x[1]**o + (-0.893677227053)*x[1]
            ref[(1, 0)]=-0.0641084668143/(o+1.)+(-0.287230088106)+(-0.0126646794085)*0.5**o
            arg[(1, 1)]=-0.469218084376*x[0]**o + (0.302896097028)*x[0] + (-0.030582216855)*x[1]**o + (0.756764458636)*x[1]
            ref[(1, 1)]=-0.030582216855/(o+1.)+(0.529830277832)+(-0.469218084376)*0.5**o
            arg[(1, 2)]=-0.70218637677*x[0]**o + (0.682318779655)*x[0] + (0.0295273139986)*x[1]**o + (-0.195102416664)*x[1]
            ref[(1, 2)]=0.0295273139986/(o+1.)+(0.243608181495)+(-0.70218637677)*0.5**o
            arg[(1, 3)]=-0.991360087774*x[0]**o + (-0.945870593764)*x[0] + (-0.382189978363)*x[1]**o + (-0.550910735001)*x[1]
            ref[(1, 3)]=-0.382189978363/(o+1.)+(-0.748390664383)+(-0.991360087774)*0.5**o
            arg[(2, 0)]=-0.911267875909*x[0]**o + (-0.112096744821)*x[0] + (-0.0666612270824)*x[1]**o + (-0.896432541003)*x[1]
            ref[(2, 0)]=-0.0666612270824/(o+1.)+(-0.504264642912)+(-0.911267875909)*0.5**o
            arg[(2, 1)]=0.441329207181*x[0]**o + (-0.401594620786)*x[0] + (-0.0494549969235)*x[1]**o + (0.0237140796353)*x[1]
            ref[(2, 1)]=-0.0494549969235/(o+1.)+(-0.188940270575)+(0.441329207181)*0.5**o
            arg[(2, 2)]=-0.823885353185*x[0]**o + (0.542324591118)*x[0] + (-0.864175513309)*x[1]**o + (0.291872507742)*x[1]
            ref[(2, 2)]=-0.864175513309/(o+1.)+(0.41709854943)+(-0.823885353185)*0.5**o
            arg[(2, 3)]=0.445598698629*x[0]**o + (-0.962323066114)*x[0] + (-0.506240176603)*x[1]**o + (0.874593311123)*x[1]
            ref[(2, 3)]=-0.506240176603/(o+1.)+(-0.0438648774956)+(0.445598698629)*0.5**o
            arg[(3, 0)]=-0.213865679644*x[0]**o + (0.00822647950255)*x[0] + (-0.91055993931)*x[1]**o + (-0.739453667895)*x[1]
            ref[(3, 0)]=-0.91055993931/(o+1.)+(-0.365613594196)+(-0.213865679644)*0.5**o
            arg[(3, 1)]=-0.843014901681*x[0]**o + (0.991829163362)*x[0] + (0.652479878967)*x[1]**o + (0.177996995137)*x[1]
            ref[(3, 1)]=0.652479878967/(o+1.)+(0.58491307925)+(-0.843014901681)*0.5**o
            arg[(3, 2)]=-0.0320125099956*x[0]**o + (0.115799785861)*x[0] + (-0.911816785063)*x[1]**o + (0.648577231328)*x[1]
            ref[(3, 2)]=-0.911816785063/(o+1.)+(0.382188508595)+(-0.0320125099956)*0.5**o
            arg[(3, 3)]=-0.58954428245*x[0]**o + (0.417925289168)*x[0] + (0.0641256649627)*x[1]**o + (0.892112521242)*x[1]
            ref[(3, 3)]=0.0641256649627/(o+1.)+(0.655018905205)+(-0.58954428245)*0.5**o
        else:
            arg[(0, 0)]=0.696400224668*x[0]**o + (0.908848886697)*x[0] + (-0.916354061802)*x[1]**o + (0.226988226117)*x[1] + (0.0687063185074)*x[2]**o + (0.858726896557)*x[2]
            ref[(0, 0)]=-0.847647743295/(o+1.)+(0.997282004685)+(0.696400224668)*0.5**o
            arg[(0, 1)]=0.0956940627505*x[0]**o + (0.787537826158)*x[0] + (0.691253005279)*x[1]**o + (-0.0335326276495)*x[1] + (0.626698991418)*x[2]**o + (0.933116097868)*x[2]
            ref[(0, 1)]=1.3179519967/(o+1.)+(0.843560648188)+(0.0956940627505)*0.5**o
            arg[(0, 2)]=-0.712041852529*x[0]**o + (-0.203477994899)*x[0] + (-0.635307612658)*x[1]**o + (-0.429351748488)*x[1] + (-0.347718056005)*x[2]**o + (0.265690847677)*x[2]
            ref[(0, 2)]=-0.983025668662/(o+1.)+(-0.183569447855)+(-0.712041852529)*0.5**o
            arg[(0, 3)]=-0.938752082198*x[0]**o + (0.649102137325)*x[0] + (0.489298939084)*x[1]**o + (-0.724383099109)*x[1] + (-0.170951949126)*x[2]**o + (0.0619988718476)*x[2]
            ref[(0, 3)]=0.318346989957/(o+1.)+(-0.00664104496829)+(-0.938752082198)*0.5**o
            arg[(1, 0)]=0.972112056722*x[0]**o + (0.0766672346864)*x[0] + (-0.850700112789)*x[1]**o + (0.293942437507)*x[1] + (0.815460886025)*x[2]**o + (-0.719251809807)*x[2]
            ref[(1, 0)]=-0.0352392267642/(o+1.)+(-0.174321068807)+(0.972112056722)*0.5**o
            arg[(1, 1)]=0.948496167059*x[0]**o + (0.668583325053)*x[0] + (0.345959026513)*x[1]**o + (-0.955336619503)*x[1] + (-0.433324833057)*x[2]**o + (-0.27092130007)*x[2]
            ref[(1, 1)]=-0.0873658065439/(o+1.)+(-0.27883729726)+(0.948496167059)*0.5**o
            arg[(1, 2)]=0.91549327658*x[0]**o + (0.0803688647852)*x[0] + (-0.857585693501)*x[1]**o + (-0.0205667781241)*x[1] + (-0.546356437235)*x[2]**o + (-0.30912521899)*x[2]
            ref[(1, 2)]=-1.40394213074/(o+1.)+(-0.124661566165)+(0.91549327658)*0.5**o
            arg[(1, 3)]=0.773212208011*x[0]**o + (-0.906903426723)*x[0] + (-0.677403074399)*x[1]**o + (0.479933319171)*x[1] + (0.51179126392)*x[2]**o + (-0.529381915154)*x[2]
            ref[(1, 3)]=-0.165611810479/(o+1.)+(-0.478176011353)+(0.773212208011)*0.5**o
            arg[(2, 0)]=0.152686335448*x[0]**o + (-0.407661451491)*x[0] + (-0.72640207514)*x[1]**o + (-0.472732051232)*x[1] + (-0.57354255302)*x[2]**o + (-0.00964090630917)*x[2]
            ref[(2, 0)]=-1.29994462816/(o+1.)+(-0.445017204516)+(0.152686335448)*0.5**o
            arg[(2, 1)]=0.745057859157*x[0]**o + (-0.251225654786)*x[0] + (-0.602912265252)*x[1]**o + (-0.830715031008)*x[1] + (0.652272319773)*x[2]**o + (-0.0506709488812)*x[2]
            ref[(2, 1)]=0.049360054521/(o+1.)+(-0.566305817338)+(0.745057859157)*0.5**o
            arg[(2, 2)]=-0.481416791506*x[0]**o + (0.686801871991)*x[0] + (-0.262916156874)*x[1]**o + (-0.321035533956)*x[1] + (0.968096225194)*x[2]**o + (-0.960626165427)*x[2]
            ref[(2, 2)]=0.70518006832/(o+1.)+(-0.297429913696)+(-0.481416791506)*0.5**o
            arg[(2, 3)]=-0.791929738945*x[0]**o + (0.713142682254)*x[0] + (-0.0368516176439)*x[1]**o + (-0.21512951049)*x[1] + (-0.999348537883)*x[2]**o + (0.980309266915)*x[2]
            ref[(2, 3)]=-1.03620015553/(o+1.)+(0.73916121934)+(-0.791929738945)*0.5**o
            arg[(3, 0)]=0.405983522755*x[0]**o + (0.205695639997)*x[0] + (-0.500603404479)*x[1]**o + (-0.367162440057)*x[1] + (-0.113165548339)*x[2]**o + (0.050024887618)*x[2]
            ref[(3, 0)]=-0.613768952818/(o+1.)+(-0.055720956221)+(0.405983522755)*0.5**o
            arg[(3, 1)]=-0.0523189316082*x[0]**o + (0.255660966897)*x[0] + (-0.893030865541)*x[1]**o + (0.459179902091)*x[1] + (0.133958278736)*x[2]**o + (0.996471081746)*x[2]
            ref[(3, 1)]=-0.759072586805/(o+1.)+(0.855655975367)+(-0.0523189316082)*0.5**o
            arg[(3, 2)]=0.418816176077*x[0]**o + (-0.0847208546886)*x[0] + (0.525813733338)*x[1]**o + (0.508233094434)*x[1] + (-0.249919223031)*x[2]**o + (-0.163983133568)*x[2]
            ref[(3, 2)]=0.275894510307/(o+1.)+(0.129764553089)+(0.418816176077)*0.5**o
            arg[(3, 3)]=-0.429718479443*x[0]**o + (-0.883327776041)*x[0] + (-0.895629886881)*x[1]**o + (-0.628475242412)*x[1] + (-0.231941979611)*x[2]**o + (0.376499595077)*x[2]
            ref[(3, 3)]=-1.12757186649/(o+1.)+(-0.567651711688)+(-0.429718479443)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank3(self):
        """
        tests integral of rank 3 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 4),w)
        ref=numpy.zeros((3, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.853370184727*x[0]**o + (-0.932462901779)*x[0] + (0.880145982005)*x[1]**o + (0.558864552158)*x[1]
            ref[(0, 0, 0)]=0.880145982005/(o+1.)+(-0.18679917481)+(-0.853370184727)*0.5**o
            arg[(0, 0, 1)]=0.331896994882*x[0]**o + (0.280075068915)*x[0] + (0.263336068782)*x[1]**o + (0.781529070131)*x[1]
            ref[(0, 0, 1)]=0.263336068782/(o+1.)+(0.530802069523)+(0.331896994882)*0.5**o
            arg[(0, 0, 2)]=0.081317501551*x[0]**o + (0.648465928355)*x[0] + (0.0185379835584)*x[1]**o + (-0.615343059482)*x[1]
            ref[(0, 0, 2)]=0.0185379835584/(o+1.)+(0.0165614344364)+(0.081317501551)*0.5**o
            arg[(0, 0, 3)]=0.78630399961*x[0]**o + (-0.989049163846)*x[0] + (0.112059906546)*x[1]**o + (0.392295092905)*x[1]
            ref[(0, 0, 3)]=0.112059906546/(o+1.)+(-0.29837703547)+(0.78630399961)*0.5**o
            arg[(0, 1, 0)]=-0.636201921118*x[0]**o + (-0.0110608174297)*x[0] + (-0.0279266975167)*x[1]**o + (0.0928855761787)*x[1]
            ref[(0, 1, 0)]=-0.0279266975167/(o+1.)+(0.0409123793745)+(-0.636201921118)*0.5**o
            arg[(0, 1, 1)]=-0.434729471305*x[0]**o + (0.710194654892)*x[0] + (-0.21805158579)*x[1]**o + (-0.415245710223)*x[1]
            ref[(0, 1, 1)]=-0.21805158579/(o+1.)+(0.147474472335)+(-0.434729471305)*0.5**o
            arg[(0, 1, 2)]=-0.899204452972*x[0]**o + (-0.754817982586)*x[0] + (0.626109808713)*x[1]**o + (-0.156243106278)*x[1]
            ref[(0, 1, 2)]=0.626109808713/(o+1.)+(-0.455530544432)+(-0.899204452972)*0.5**o
            arg[(0, 1, 3)]=-0.987213656965*x[0]**o + (0.87136505186)*x[0] + (-0.645867395601)*x[1]**o + (0.608974248155)*x[1]
            ref[(0, 1, 3)]=-0.645867395601/(o+1.)+(0.740169650008)+(-0.987213656965)*0.5**o
            arg[(0, 2, 0)]=-0.482118305973*x[0]**o + (-0.804642662449)*x[0] + (-0.641074578377)*x[1]**o + (-0.71310598277)*x[1]
            ref[(0, 2, 0)]=-0.641074578377/(o+1.)+(-0.75887432261)+(-0.482118305973)*0.5**o
            arg[(0, 2, 1)]=0.306056243936*x[0]**o + (0.303733955804)*x[0] + (0.783899055763)*x[1]**o + (-0.576898471454)*x[1]
            ref[(0, 2, 1)]=0.783899055763/(o+1.)+(-0.136582257825)+(0.306056243936)*0.5**o
            arg[(0, 2, 2)]=0.651979414662*x[0]**o + (-0.936573672818)*x[0] + (0.0146552910067)*x[1]**o + (0.711405725975)*x[1]
            ref[(0, 2, 2)]=0.0146552910067/(o+1.)+(-0.112583973422)+(0.651979414662)*0.5**o
            arg[(0, 2, 3)]=-0.507678056111*x[0]**o + (0.676994716871)*x[0] + (-0.464530086003)*x[1]**o + (0.109065783538)*x[1]
            ref[(0, 2, 3)]=-0.464530086003/(o+1.)+(0.393030250205)+(-0.507678056111)*0.5**o
            arg[(1, 0, 0)]=-0.408974139013*x[0]**o + (-0.994600129442)*x[0] + (-0.04878444964)*x[1]**o + (-0.0839643627538)*x[1]
            ref[(1, 0, 0)]=-0.04878444964/(o+1.)+(-0.539282246098)+(-0.408974139013)*0.5**o
            arg[(1, 0, 1)]=0.840312547028*x[0]**o + (0.545579339476)*x[0] + (-0.535224705523)*x[1]**o + (0.0139807389825)*x[1]
            ref[(1, 0, 1)]=-0.535224705523/(o+1.)+(0.279780039229)+(0.840312547028)*0.5**o
            arg[(1, 0, 2)]=-0.626031286226*x[0]**o + (-0.483772340719)*x[0] + (-0.238781906063)*x[1]**o + (-0.720899047681)*x[1]
            ref[(1, 0, 2)]=-0.238781906063/(o+1.)+(-0.6023356942)+(-0.626031286226)*0.5**o
            arg[(1, 0, 3)]=-0.0595876907827*x[0]**o + (0.551059049965)*x[0] + (-0.303027125163)*x[1]**o + (0.399712538958)*x[1]
            ref[(1, 0, 3)]=-0.303027125163/(o+1.)+(0.475385794461)+(-0.0595876907827)*0.5**o
            arg[(1, 1, 0)]=-0.624583527417*x[0]**o + (-0.737529369624)*x[0] + (-0.424251175179)*x[1]**o + (-0.431006092365)*x[1]
            ref[(1, 1, 0)]=-0.424251175179/(o+1.)+(-0.584267730995)+(-0.624583527417)*0.5**o
            arg[(1, 1, 1)]=0.934778207406*x[0]**o + (-0.668746489667)*x[0] + (-0.098700924203)*x[1]**o + (0.24665050899)*x[1]
            ref[(1, 1, 1)]=-0.098700924203/(o+1.)+(-0.211047990339)+(0.934778207406)*0.5**o
            arg[(1, 1, 2)]=0.501456677678*x[0]**o + (-0.434147430543)*x[0] + (-0.799669680066)*x[1]**o + (-0.99323989561)*x[1]
            ref[(1, 1, 2)]=-0.799669680066/(o+1.)+(-0.713693663076)+(0.501456677678)*0.5**o
            arg[(1, 1, 3)]=-0.421572589234*x[0]**o + (-0.0196821373178)*x[0] + (0.129135413374)*x[1]**o + (0.638884562301)*x[1]
            ref[(1, 1, 3)]=0.129135413374/(o+1.)+(0.309601212491)+(-0.421572589234)*0.5**o
            arg[(1, 2, 0)]=0.000276522544026*x[0]**o + (0.352230022695)*x[0] + (-0.640671027589)*x[1]**o + (0.778353652203)*x[1]
            ref[(1, 2, 0)]=-0.640671027589/(o+1.)+(0.565291837449)+(0.000276522544026)*0.5**o
            arg[(1, 2, 1)]=-0.293631296456*x[0]**o + (-0.0225377379068)*x[0] + (0.82926978418)*x[1]**o + (-0.831311656671)*x[1]
            ref[(1, 2, 1)]=0.82926978418/(o+1.)+(-0.426924697289)+(-0.293631296456)*0.5**o
            arg[(1, 2, 2)]=-0.205084546524*x[0]**o + (0.440984210306)*x[0] + (-0.217202222098)*x[1]**o + (0.882502711719)*x[1]
            ref[(1, 2, 2)]=-0.217202222098/(o+1.)+(0.661743461012)+(-0.205084546524)*0.5**o
            arg[(1, 2, 3)]=-0.433346116641*x[0]**o + (-0.399604686776)*x[0] + (-0.0920711990829)*x[1]**o + (-0.349124161534)*x[1]
            ref[(1, 2, 3)]=-0.0920711990829/(o+1.)+(-0.374364424155)+(-0.433346116641)*0.5**o
            arg[(2, 0, 0)]=0.846956873667*x[0]**o + (-0.768117535197)*x[0] + (-0.470698753604)*x[1]**o + (-0.973364865092)*x[1]
            ref[(2, 0, 0)]=-0.470698753604/(o+1.)+(-0.870741200145)+(0.846956873667)*0.5**o
            arg[(2, 0, 1)]=-0.0233485136311*x[0]**o + (0.93469782408)*x[0] + (0.123412095764)*x[1]**o + (-0.442632248769)*x[1]
            ref[(2, 0, 1)]=0.123412095764/(o+1.)+(0.246032787655)+(-0.0233485136311)*0.5**o
            arg[(2, 0, 2)]=-0.643637032245*x[0]**o + (-0.190182115391)*x[0] + (-0.681294193631)*x[1]**o + (0.534196746278)*x[1]
            ref[(2, 0, 2)]=-0.681294193631/(o+1.)+(0.172007315443)+(-0.643637032245)*0.5**o
            arg[(2, 0, 3)]=0.954936719441*x[0]**o + (-0.161589306251)*x[0] + (0.0299406267223)*x[1]**o + (0.955847828496)*x[1]
            ref[(2, 0, 3)]=0.0299406267223/(o+1.)+(0.397129261122)+(0.954936719441)*0.5**o
            arg[(2, 1, 0)]=-0.101783821485*x[0]**o + (-0.290883877946)*x[0] + (-0.360710703509)*x[1]**o + (-0.948272189167)*x[1]
            ref[(2, 1, 0)]=-0.360710703509/(o+1.)+(-0.619578033556)+(-0.101783821485)*0.5**o
            arg[(2, 1, 1)]=-0.120532071662*x[0]**o + (0.552742632483)*x[0] + (0.67576356971)*x[1]**o + (-0.250731542655)*x[1]
            ref[(2, 1, 1)]=0.67576356971/(o+1.)+(0.151005544914)+(-0.120532071662)*0.5**o
            arg[(2, 1, 2)]=0.344744305376*x[0]**o + (-0.871893463539)*x[0] + (0.558826508112)*x[1]**o + (0.255850450481)*x[1]
            ref[(2, 1, 2)]=0.558826508112/(o+1.)+(-0.308021506529)+(0.344744305376)*0.5**o
            arg[(2, 1, 3)]=-0.297104444069*x[0]**o + (0.301421925971)*x[0] + (0.0878981688835)*x[1]**o + (-0.0505654837111)*x[1]
            ref[(2, 1, 3)]=0.0878981688835/(o+1.)+(0.12542822113)+(-0.297104444069)*0.5**o
            arg[(2, 2, 0)]=-0.252960586969*x[0]**o + (0.0272337900164)*x[0] + (-0.272555403378)*x[1]**o + (0.5025880492)*x[1]
            ref[(2, 2, 0)]=-0.272555403378/(o+1.)+(0.264910919608)+(-0.252960586969)*0.5**o
            arg[(2, 2, 1)]=0.478395789136*x[0]**o + (-0.576726331086)*x[0] + (-0.190702972319)*x[1]**o + (-0.663675140769)*x[1]
            ref[(2, 2, 1)]=-0.190702972319/(o+1.)+(-0.620200735928)+(0.478395789136)*0.5**o
            arg[(2, 2, 2)]=0.861031838069*x[0]**o + (0.0190322345869)*x[0] + (-0.268046845614)*x[1]**o + (0.102077545307)*x[1]
            ref[(2, 2, 2)]=-0.268046845614/(o+1.)+(0.0605548899471)+(0.861031838069)*0.5**o
            arg[(2, 2, 3)]=0.440540396768*x[0]**o + (0.250476519979)*x[0] + (-0.56361346827)*x[1]**o + (0.199229193463)*x[1]
            ref[(2, 2, 3)]=-0.56361346827/(o+1.)+(0.224852856721)+(0.440540396768)*0.5**o
        else:
            arg[(0, 0, 0)]=0.0497972680402*x[0]**o + (-0.921169704014)*x[0] + (0.483538696222)*x[1]**o + (0.486153017145)*x[1] + (-0.511461779022)*x[2]**o + (0.145648201734)*x[2]
            ref[(0, 0, 0)]=-0.0279230828001/(o+1.)+(-0.144684242567)+(0.0497972680402)*0.5**o
            arg[(0, 0, 1)]=0.279186720408*x[0]**o + (-0.39582386036)*x[0] + (0.900472985039)*x[1]**o + (-0.968348175019)*x[1] + (0.403884798375)*x[2]**o + (-0.971817244207)*x[2]
            ref[(0, 0, 1)]=1.30435778341/(o+1.)+(-1.16799463979)+(0.279186720408)*0.5**o
            arg[(0, 0, 2)]=0.190532031182*x[0]**o + (-0.210360872873)*x[0] + (-0.865994892632)*x[1]**o + (0.670606456322)*x[1] + (0.0943325692182)*x[2]**o + (0.428644153483)*x[2]
            ref[(0, 0, 2)]=-0.771662323414/(o+1.)+(0.444444868466)+(0.190532031182)*0.5**o
            arg[(0, 0, 3)]=-0.534678669547*x[0]**o + (0.643382953039)*x[0] + (-0.500400058125)*x[1]**o + (-0.977745029183)*x[1] + (-0.282303476656)*x[2]**o + (-0.679760918846)*x[2]
            ref[(0, 0, 3)]=-0.782703534781/(o+1.)+(-0.507061497495)+(-0.534678669547)*0.5**o
            arg[(0, 1, 0)]=0.084716107056*x[0]**o + (0.67560560882)*x[0] + (0.240036967871)*x[1]**o + (0.554456193887)*x[1] + (-0.108996400983)*x[2]**o + (0.544530180966)*x[2]
            ref[(0, 1, 0)]=0.131040566888/(o+1.)+(0.887295991836)+(0.084716107056)*0.5**o
            arg[(0, 1, 1)]=0.999034991876*x[0]**o + (0.627722140165)*x[0] + (-0.444081580248)*x[1]**o + (0.965885230713)*x[1] + (0.0208107293108)*x[2]**o + (-0.0576658902386)*x[2]
            ref[(0, 1, 1)]=-0.423270850937/(o+1.)+(0.76797074032)+(0.999034991876)*0.5**o
            arg[(0, 1, 2)]=0.751870544475*x[0]**o + (0.192821832001)*x[0] + (0.128832378678)*x[1]**o + (0.617158705626)*x[1] + (-0.41541209757)*x[2]**o + (0.21854066823)*x[2]
            ref[(0, 1, 2)]=-0.286579718892/(o+1.)+(0.514260602928)+(0.751870544475)*0.5**o
            arg[(0, 1, 3)]=0.5378824279*x[0]**o + (-0.874644700988)*x[0] + (0.117172189986)*x[1]**o + (0.779157924574)*x[1] + (0.313604046647)*x[2]**o + (-0.406650275856)*x[2]
            ref[(0, 1, 3)]=0.430776236633/(o+1.)+(-0.251068526135)+(0.5378824279)*0.5**o
            arg[(0, 2, 0)]=0.429750744845*x[0]**o + (-0.723224512023)*x[0] + (-0.507055289871)*x[1]**o + (0.514082696426)*x[1] + (-0.437346214221)*x[2]**o + (-0.703348054962)*x[2]
            ref[(0, 2, 0)]=-0.944401504092/(o+1.)+(-0.45624493528)+(0.429750744845)*0.5**o
            arg[(0, 2, 1)]=-0.324383537284*x[0]**o + (-0.352799404681)*x[0] + (-0.419266465509)*x[1]**o + (0.388732010539)*x[1] + (-0.234843490695)*x[2]**o + (0.259905991818)*x[2]
            ref[(0, 2, 1)]=-0.654109956204/(o+1.)+(0.147919298838)+(-0.324383537284)*0.5**o
            arg[(0, 2, 2)]=-0.812425442768*x[0]**o + (-0.771199338388)*x[0] + (-0.417605538568)*x[1]**o + (-0.795797637666)*x[1] + (-0.149308745101)*x[2]**o + (-0.84539874911)*x[2]
            ref[(0, 2, 2)]=-0.56691428367/(o+1.)+(-1.20619786258)+(-0.812425442768)*0.5**o
            arg[(0, 2, 3)]=-0.614969970258*x[0]**o + (0.827815438363)*x[0] + (0.117494213181)*x[1]**o + (-0.178210997314)*x[1] + (0.333279198435)*x[2]**o + (-0.505863750065)*x[2]
            ref[(0, 2, 3)]=0.450773411616/(o+1.)+(0.0718703454922)+(-0.614969970258)*0.5**o
            arg[(1, 0, 0)]=-0.57641645916*x[0]**o + (-0.282810992453)*x[0] + (-0.480164639245)*x[1]**o + (-0.564660595413)*x[1] + (0.343930987972)*x[2]**o + (0.00511211034329)*x[2]
            ref[(1, 0, 0)]=-0.136233651273/(o+1.)+(-0.421179738761)+(-0.57641645916)*0.5**o
            arg[(1, 0, 1)]=0.624799795287*x[0]**o + (0.0391581851151)*x[0] + (-0.704176225333)*x[1]**o + (-0.466342843742)*x[1] + (-0.393224603019)*x[2]**o + (-0.964234981199)*x[2]
            ref[(1, 0, 1)]=-1.09740082835/(o+1.)+(-0.695709819912)+(0.624799795287)*0.5**o
            arg[(1, 0, 2)]=-0.843033089691*x[0]**o + (0.660096455146)*x[0] + (-0.0426936979137)*x[1]**o + (-0.711276191058)*x[1] + (-0.886693521785)*x[2]**o + (0.211850072207)*x[2]
            ref[(1, 0, 2)]=-0.929387219699/(o+1.)+(0.0803351681474)+(-0.843033089691)*0.5**o
            arg[(1, 0, 3)]=0.228256264268*x[0]**o + (-0.340809376625)*x[0] + (-0.937188551503)*x[1]**o + (-0.787668134037)*x[1] + (-0.853601029278)*x[2]**o + (0.195394383949)*x[2]
            ref[(1, 0, 3)]=-1.79078958078/(o+1.)+(-0.466541563357)+(0.228256264268)*0.5**o
            arg[(1, 1, 0)]=0.65861624688*x[0]**o + (-0.398263109377)*x[0] + (0.675681692691)*x[1]**o + (-0.237210456946)*x[1] + (-0.905560302036)*x[2]**o + (-0.470753812846)*x[2]
            ref[(1, 1, 0)]=-0.229878609345/(o+1.)+(-0.553113689585)+(0.65861624688)*0.5**o
            arg[(1, 1, 1)]=0.579153705485*x[0]**o + (-0.954401213998)*x[0] + (-0.467755259234)*x[1]**o + (0.544823128403)*x[1] + (-0.509259135589)*x[2]**o + (0.897579385949)*x[2]
            ref[(1, 1, 1)]=-0.977014394823/(o+1.)+(0.244000650177)+(0.579153705485)*0.5**o
            arg[(1, 1, 2)]=0.501953029848*x[0]**o + (-0.26275344494)*x[0] + (-0.725641300993)*x[1]**o + (0.590807729756)*x[1] + (-0.536042174612)*x[2]**o + (-0.969494942956)*x[2]
            ref[(1, 1, 2)]=-1.2616834756/(o+1.)+(-0.32072032907)+(0.501953029848)*0.5**o
            arg[(1, 1, 3)]=0.520382851144*x[0]**o + (0.0326382533415)*x[0] + (-0.422660333402)*x[1]**o + (0.165363597175)*x[1] + (-0.0501455703403)*x[2]**o + (0.180376541762)*x[2]
            ref[(1, 1, 3)]=-0.472805903742/(o+1.)+(0.189189196139)+(0.520382851144)*0.5**o
            arg[(1, 2, 0)]=0.523915955649*x[0]**o + (-0.795261661317)*x[0] + (0.535989869009)*x[1]**o + (-0.425468744079)*x[1] + (-0.926809495744)*x[2]**o + (-0.903574301486)*x[2]
            ref[(1, 2, 0)]=-0.390819626734/(o+1.)+(-1.06215235344)+(0.523915955649)*0.5**o
            arg[(1, 2, 1)]=-0.391144639023*x[0]**o + (0.687720959035)*x[0] + (0.814628593303)*x[1]**o + (0.741710749289)*x[1] + (0.124954723154)*x[2]**o + (-0.581612001689)*x[2]
            ref[(1, 2, 1)]=0.939583316457/(o+1.)+(0.423909853317)+(-0.391144639023)*0.5**o
            arg[(1, 2, 2)]=0.0278121848695*x[0]**o + (0.410937682978)*x[0] + (-0.19485957319)*x[1]**o + (-0.392524654535)*x[1] + (0.429574098695)*x[2]**o + (-0.713218787529)*x[2]
            ref[(1, 2, 2)]=0.234714525505/(o+1.)+(-0.347402879543)+(0.0278121848695)*0.5**o
            arg[(1, 2, 3)]=-0.730555785714*x[0]**o + (0.188212644525)*x[0] + (-0.0886066499302)*x[1]**o + (-0.125639315912)*x[1] + (-0.941890429196)*x[2]**o + (0.226957545564)*x[2]
            ref[(1, 2, 3)]=-1.03049707913/(o+1.)+(0.144765437089)+(-0.730555785714)*0.5**o
            arg[(2, 0, 0)]=0.57258979771*x[0]**o + (0.0726023242414)*x[0] + (-0.673203900452)*x[1]**o + (-0.704245013038)*x[1] + (-0.53568060515)*x[2]**o + (0.670860235824)*x[2]
            ref[(2, 0, 0)]=-1.2088845056/(o+1.)+(0.0196087735137)+(0.57258979771)*0.5**o
            arg[(2, 0, 1)]=-0.243803467455*x[0]**o + (0.696365391604)*x[0] + (-0.24390481104)*x[1]**o + (-0.90457528385)*x[1] + (-0.358604088002)*x[2]**o + (0.778359801331)*x[2]
            ref[(2, 0, 1)]=-0.602508899042/(o+1.)+(0.285074954542)+(-0.243803467455)*0.5**o
            arg[(2, 0, 2)]=-0.450941504978*x[0]**o + (0.312139330001)*x[0] + (-0.926548846723)*x[1]**o + (0.736714888049)*x[1] + (-0.910352898103)*x[2]**o + (-0.618276453181)*x[2]
            ref[(2, 0, 2)]=-1.83690174483/(o+1.)+(0.215288882435)+(-0.450941504978)*0.5**o
            arg[(2, 0, 3)]=-0.185166129102*x[0]**o + (0.865076134662)*x[0] + (0.0614297722637)*x[1]**o + (0.246522689142)*x[1] + (0.544663194918)*x[2]**o + (-0.426313520069)*x[2]
            ref[(2, 0, 3)]=0.606092967181/(o+1.)+(0.342642651868)+(-0.185166129102)*0.5**o
            arg[(2, 1, 0)]=0.146953796072*x[0]**o + (-0.304070494601)*x[0] + (0.529935985887)*x[1]**o + (0.233505341805)*x[1] + (0.241702499752)*x[2]**o + (-0.820743241135)*x[2]
            ref[(2, 1, 0)]=0.771638485639/(o+1.)+(-0.445654196966)+(0.146953796072)*0.5**o
            arg[(2, 1, 1)]=0.967715692756*x[0]**o + (-0.823316744365)*x[0] + (0.718891684805)*x[1]**o + (0.0302703041096)*x[1] + (-0.220771824442)*x[2]**o + (0.205611219091)*x[2]
            ref[(2, 1, 1)]=0.498119860363/(o+1.)+(-0.293717610582)+(0.967715692756)*0.5**o
            arg[(2, 1, 2)]=0.168649120994*x[0]**o + (-0.110588080173)*x[0] + (-0.15915013285)*x[1]**o + (-0.161656584402)*x[1] + (-0.0213513399228)*x[2]**o + (0.442045492721)*x[2]
            ref[(2, 1, 2)]=-0.180501472773/(o+1.)+(0.0849004140731)+(0.168649120994)*0.5**o
            arg[(2, 1, 3)]=-0.711958717346*x[0]**o + (-0.66084739176)*x[0] + (0.195441453946)*x[1]**o + (-0.728595425096)*x[1] + (0.265371058256)*x[2]**o + (-0.704403499432)*x[2]
            ref[(2, 1, 3)]=0.460812512202/(o+1.)+(-1.04692315814)+(-0.711958717346)*0.5**o
            arg[(2, 2, 0)]=0.282382479211*x[0]**o + (0.618428991608)*x[0] + (-0.97752003893)*x[1]**o + (-0.943961704661)*x[1] + (0.139885986542)*x[2]**o + (0.509378559617)*x[2]
            ref[(2, 2, 0)]=-0.837634052389/(o+1.)+(0.0919229232816)+(0.282382479211)*0.5**o
            arg[(2, 2, 1)]=0.617117180137*x[0]**o + (-0.322147733386)*x[0] + (0.875196371634)*x[1]**o + (0.412158833571)*x[1] + (0.403369458167)*x[2]**o + (0.672493117417)*x[2]
            ref[(2, 2, 1)]=1.2785658298/(o+1.)+(0.381252108801)+(0.617117180137)*0.5**o
            arg[(2, 2, 2)]=0.352300597384*x[0]**o + (0.850469281323)*x[0] + (0.330437393999)*x[1]**o + (0.760033621675)*x[1] + (0.578333927618)*x[2]**o + (0.400834048222)*x[2]
            ref[(2, 2, 2)]=0.908771321617/(o+1.)+(1.00566847561)+(0.352300597384)*0.5**o
            arg[(2, 2, 3)]=-0.433064059902*x[0]**o + (-0.344807629751)*x[0] + (-0.862435691776)*x[1]**o + (-0.189841639)*x[1] + (0.631608550944)*x[2]**o + (0.831827781403)*x[2]
            ref[(2, 2, 3)]=-0.230827140833/(o+1.)+(0.148589256326)+(-0.433064059902)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onFunctionOnContactOne_fromData_FunctionOnContactOne_rank4(self):
        """
        tests integral of rank 4 Data on FunctionOnContactOne

        assumptions: FunctionOnContactOne(self.domain) exists
                     self.domain supports integral on FunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = FunctionOnContactOne(self.domain)
        w = FunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 2, 4, 2),w)
        ref=numpy.zeros((2, 2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.855891946465*x[0]**o + (0.63698149852)*x[0] + (0.138115127867)*x[1]**o + (-0.649700765225)*x[1]
            ref[(0, 0, 0, 0)]=0.138115127867/(o+1.)+(-0.00635963335215)+(0.855891946465)*0.5**o
            arg[(0, 0, 0, 1)]=0.939432347284*x[0]**o + (0.420373735086)*x[0] + (-0.676998756845)*x[1]**o + (0.465586729913)*x[1]
            ref[(0, 0, 0, 1)]=-0.676998756845/(o+1.)+(0.442980232499)+(0.939432347284)*0.5**o
            arg[(0, 0, 1, 0)]=0.686804180346*x[0]**o + (-0.87925004875)*x[0] + (0.982054467711)*x[1]**o + (0.789945007797)*x[1]
            ref[(0, 0, 1, 0)]=0.982054467711/(o+1.)+(-0.0446525204768)+(0.686804180346)*0.5**o
            arg[(0, 0, 1, 1)]=0.030809579384*x[0]**o + (-0.91880771926)*x[0] + (0.96406648084)*x[1]**o + (-0.250008480946)*x[1]
            ref[(0, 0, 1, 1)]=0.96406648084/(o+1.)+(-0.584408100103)+(0.030809579384)*0.5**o
            arg[(0, 0, 2, 0)]=-0.598815714965*x[0]**o + (-0.543652430263)*x[0] + (-0.17734327466)*x[1]**o + (-0.948763411358)*x[1]
            ref[(0, 0, 2, 0)]=-0.17734327466/(o+1.)+(-0.746207920811)+(-0.598815714965)*0.5**o
            arg[(0, 0, 2, 1)]=-0.712037193471*x[0]**o + (-0.0405800807799)*x[0] + (-0.433172614051)*x[1]**o + (0.296987976886)*x[1]
            ref[(0, 0, 2, 1)]=-0.433172614051/(o+1.)+(0.128203948053)+(-0.712037193471)*0.5**o
            arg[(0, 0, 3, 0)]=0.660163864519*x[0]**o + (-9.29428109842e-05)*x[0] + (0.549362533755)*x[1]**o + (-0.828750477641)*x[1]
            ref[(0, 0, 3, 0)]=0.549362533755/(o+1.)+(-0.414421710226)+(0.660163864519)*0.5**o
            arg[(0, 0, 3, 1)]=-0.186423095229*x[0]**o + (0.323326721493)*x[0] + (-0.0373087594644)*x[1]**o + (-0.936166288637)*x[1]
            ref[(0, 0, 3, 1)]=-0.0373087594644/(o+1.)+(-0.306419783572)+(-0.186423095229)*0.5**o
            arg[(0, 1, 0, 0)]=0.989381187603*x[0]**o + (-0.408998728211)*x[0] + (-0.676456738319)*x[1]**o + (0.0917981820278)*x[1]
            ref[(0, 1, 0, 0)]=-0.676456738319/(o+1.)+(-0.158600273092)+(0.989381187603)*0.5**o
            arg[(0, 1, 0, 1)]=0.521705618566*x[0]**o + (-0.552188863758)*x[0] + (-0.0800974640535)*x[1]**o + (-0.856957377704)*x[1]
            ref[(0, 1, 0, 1)]=-0.0800974640535/(o+1.)+(-0.704573120731)+(0.521705618566)*0.5**o
            arg[(0, 1, 1, 0)]=0.220379758928*x[0]**o + (-0.263995237718)*x[0] + (-0.953513296221)*x[1]**o + (-0.163701065627)*x[1]
            ref[(0, 1, 1, 0)]=-0.953513296221/(o+1.)+(-0.213848151672)+(0.220379758928)*0.5**o
            arg[(0, 1, 1, 1)]=0.223036926844*x[0]**o + (-0.937417195297)*x[0] + (-0.244611086097)*x[1]**o + (-0.994488813978)*x[1]
            ref[(0, 1, 1, 1)]=-0.244611086097/(o+1.)+(-0.965953004638)+(0.223036926844)*0.5**o
            arg[(0, 1, 2, 0)]=-0.40945976321*x[0]**o + (-0.965887113646)*x[0] + (-0.445175881922)*x[1]**o + (0.238503009179)*x[1]
            ref[(0, 1, 2, 0)]=-0.445175881922/(o+1.)+(-0.363692052233)+(-0.40945976321)*0.5**o
            arg[(0, 1, 2, 1)]=-0.284764610806*x[0]**o + (-0.503871535703)*x[0] + (0.393870826128)*x[1]**o + (-0.839868256981)*x[1]
            ref[(0, 1, 2, 1)]=0.393870826128/(o+1.)+(-0.671869896342)+(-0.284764610806)*0.5**o
            arg[(0, 1, 3, 0)]=0.555007077931*x[0]**o + (-0.367221322152)*x[0] + (0.392613078756)*x[1]**o + (-0.557190860061)*x[1]
            ref[(0, 1, 3, 0)]=0.392613078756/(o+1.)+(-0.462206091107)+(0.555007077931)*0.5**o
            arg[(0, 1, 3, 1)]=0.737287147476*x[0]**o + (0.456125244086)*x[0] + (0.19189528914)*x[1]**o + (0.150839375899)*x[1]
            ref[(0, 1, 3, 1)]=0.19189528914/(o+1.)+(0.303482309993)+(0.737287147476)*0.5**o
            arg[(1, 0, 0, 0)]=-0.295229585263*x[0]**o + (-0.946374724817)*x[0] + (-0.717372819377)*x[1]**o + (0.0727638283054)*x[1]
            ref[(1, 0, 0, 0)]=-0.717372819377/(o+1.)+(-0.436805448256)+(-0.295229585263)*0.5**o
            arg[(1, 0, 0, 1)]=0.139598430148*x[0]**o + (0.722752622132)*x[0] + (-0.954250291559)*x[1]**o + (0.898257190237)*x[1]
            ref[(1, 0, 0, 1)]=-0.954250291559/(o+1.)+(0.810504906185)+(0.139598430148)*0.5**o
            arg[(1, 0, 1, 0)]=0.980098856236*x[0]**o + (0.804751765557)*x[0] + (0.670841232128)*x[1]**o + (0.647471442513)*x[1]
            ref[(1, 0, 1, 0)]=0.670841232128/(o+1.)+(0.726111604035)+(0.980098856236)*0.5**o
            arg[(1, 0, 1, 1)]=0.0383089555804*x[0]**o + (0.61372406163)*x[0] + (0.308775482219)*x[1]**o + (0.164121325345)*x[1]
            ref[(1, 0, 1, 1)]=0.308775482219/(o+1.)+(0.388922693487)+(0.0383089555804)*0.5**o
            arg[(1, 0, 2, 0)]=-0.0590623364044*x[0]**o + (0.490341493861)*x[0] + (0.729931981196)*x[1]**o + (0.96904408444)*x[1]
            ref[(1, 0, 2, 0)]=0.729931981196/(o+1.)+(0.72969278915)+(-0.0590623364044)*0.5**o
            arg[(1, 0, 2, 1)]=-0.878190485812*x[0]**o + (-0.762511191331)*x[0] + (-0.460167443601)*x[1]**o + (0.62336789964)*x[1]
            ref[(1, 0, 2, 1)]=-0.460167443601/(o+1.)+(-0.0695716458455)+(-0.878190485812)*0.5**o
            arg[(1, 0, 3, 0)]=-0.393075964644*x[0]**o + (0.351027549412)*x[0] + (-0.0667106296455)*x[1]**o + (0.953866728128)*x[1]
            ref[(1, 0, 3, 0)]=-0.0667106296455/(o+1.)+(0.65244713877)+(-0.393075964644)*0.5**o
            arg[(1, 0, 3, 1)]=-0.715956610396*x[0]**o + (0.861478996211)*x[0] + (0.991318514933)*x[1]**o + (0.900547583311)*x[1]
            ref[(1, 0, 3, 1)]=0.991318514933/(o+1.)+(0.881013289761)+(-0.715956610396)*0.5**o
            arg[(1, 1, 0, 0)]=0.45968436134*x[0]**o + (-0.546058750842)*x[0] + (-0.612933920951)*x[1]**o + (0.343004502371)*x[1]
            ref[(1, 1, 0, 0)]=-0.612933920951/(o+1.)+(-0.101527124236)+(0.45968436134)*0.5**o
            arg[(1, 1, 0, 1)]=-0.243505277847*x[0]**o + (-0.636522128557)*x[0] + (-0.496512013669)*x[1]**o + (0.31694723525)*x[1]
            ref[(1, 1, 0, 1)]=-0.496512013669/(o+1.)+(-0.159787446654)+(-0.243505277847)*0.5**o
            arg[(1, 1, 1, 0)]=-0.149653821589*x[0]**o + (0.379870364693)*x[0] + (-0.251427943854)*x[1]**o + (-0.602215445035)*x[1]
            ref[(1, 1, 1, 0)]=-0.251427943854/(o+1.)+(-0.111172540171)+(-0.149653821589)*0.5**o
            arg[(1, 1, 1, 1)]=0.224761151359*x[0]**o + (0.10924824371)*x[0] + (0.527453715246)*x[1]**o + (0.610966917112)*x[1]
            ref[(1, 1, 1, 1)]=0.527453715246/(o+1.)+(0.360107580411)+(0.224761151359)*0.5**o
            arg[(1, 1, 2, 0)]=-0.801948927257*x[0]**o + (-0.279235762212)*x[0] + (0.288901208494)*x[1]**o + (0.378624804554)*x[1]
            ref[(1, 1, 2, 0)]=0.288901208494/(o+1.)+(0.0496945211711)+(-0.801948927257)*0.5**o
            arg[(1, 1, 2, 1)]=-0.973375336142*x[0]**o + (0.725311820233)*x[0] + (0.862316330177)*x[1]**o + (-0.680157242717)*x[1]
            ref[(1, 1, 2, 1)]=0.862316330177/(o+1.)+(0.022577288758)+(-0.973375336142)*0.5**o
            arg[(1, 1, 3, 0)]=-0.0622744639487*x[0]**o + (0.899349815607)*x[0] + (-0.835916335363)*x[1]**o + (0.447208069145)*x[1]
            ref[(1, 1, 3, 0)]=-0.835916335363/(o+1.)+(0.673278942376)+(-0.0622744639487)*0.5**o
            arg[(1, 1, 3, 1)]=0.735274017909*x[0]**o + (0.355378950171)*x[0] + (-0.531993817807)*x[1]**o + (0.663859031945)*x[1]
            ref[(1, 1, 3, 1)]=-0.531993817807/(o+1.)+(0.509618991058)+(0.735274017909)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.964761266638*x[0]**o + (-0.231113525815)*x[0] + (0.230009082396)*x[1]**o + (0.389931041285)*x[1] + (-0.379633921728)*x[2]**o + (0.895446450354)*x[2]
            ref[(0, 0, 0, 0)]=-0.149624839333/(o+1.)+(0.527131982912)+(-0.964761266638)*0.5**o
            arg[(0, 0, 0, 1)]=-0.561826358978*x[0]**o + (-0.210371683458)*x[0] + (0.330974130888)*x[1]**o + (-0.394605701056)*x[1] + (0.931119616394)*x[2]**o + (-0.334087316002)*x[2]
            ref[(0, 0, 0, 1)]=1.26209374728/(o+1.)+(-0.469532350258)+(-0.561826358978)*0.5**o
            arg[(0, 0, 1, 0)]=0.315959329859*x[0]**o + (0.399759555023)*x[0] + (0.908205691276)*x[1]**o + (0.00201982100454)*x[1] + (-0.112085436378)*x[2]**o + (0.70713697368)*x[2]
            ref[(0, 0, 1, 0)]=0.796120254898/(o+1.)+(0.554458174854)+(0.315959329859)*0.5**o
            arg[(0, 0, 1, 1)]=-0.668317530013*x[0]**o + (0.422615853466)*x[0] + (-0.197417483693)*x[1]**o + (0.790193910206)*x[1] + (0.925551167632)*x[2]**o + (-0.0695626890706)*x[2]
            ref[(0, 0, 1, 1)]=0.72813368394/(o+1.)+(0.5716235373)+(-0.668317530013)*0.5**o
            arg[(0, 0, 2, 0)]=-0.258118531381*x[0]**o + (0.108075930302)*x[0] + (-0.931261497075)*x[1]**o + (0.681175644747)*x[1] + (-0.652680454837)*x[2]**o + (-0.897256347191)*x[2]
            ref[(0, 0, 2, 0)]=-1.58394195191/(o+1.)+(-0.054002386071)+(-0.258118531381)*0.5**o
            arg[(0, 0, 2, 1)]=-0.936349888834*x[0]**o + (-0.188633873437)*x[0] + (0.092701790637)*x[1]**o + (0.705884250837)*x[1] + (0.450041076565)*x[2]**o + (0.578867669715)*x[2]
            ref[(0, 0, 2, 1)]=0.542742867202/(o+1.)+(0.548059023558)+(-0.936349888834)*0.5**o
            arg[(0, 0, 3, 0)]=0.226887591253*x[0]**o + (-0.216562992669)*x[0] + (0.3091448379)*x[1]**o + (-0.744213438398)*x[1] + (-0.0271624061264)*x[2]**o + (-0.592494425279)*x[2]
            ref[(0, 0, 3, 0)]=0.281982431773/(o+1.)+(-0.776635428173)+(0.226887591253)*0.5**o
            arg[(0, 0, 3, 1)]=0.103445601772*x[0]**o + (0.729995015003)*x[0] + (0.0688977815744)*x[1]**o + (0.28736283104)*x[1] + (-0.292014180467)*x[2]**o + (0.713393411363)*x[2]
            ref[(0, 0, 3, 1)]=-0.223116398893/(o+1.)+(0.865375628703)+(0.103445601772)*0.5**o
            arg[(0, 1, 0, 0)]=-0.93938121635*x[0]**o + (-0.72261711431)*x[0] + (0.727759478714)*x[1]**o + (-0.543362357633)*x[1] + (0.772897361533)*x[2]**o + (0.823709946847)*x[2]
            ref[(0, 1, 0, 0)]=1.50065684025/(o+1.)+(-0.221134762548)+(-0.93938121635)*0.5**o
            arg[(0, 1, 0, 1)]=-0.348386199984*x[0]**o + (0.187478943201)*x[0] + (0.845381998387)*x[1]**o + (0.163026290243)*x[1] + (-0.580983362707)*x[2]**o + (0.643964979271)*x[2]
            ref[(0, 1, 0, 1)]=0.264398635681/(o+1.)+(0.497235106357)+(-0.348386199984)*0.5**o
            arg[(0, 1, 1, 0)]=0.703944425324*x[0]**o + (0.580929505417)*x[0] + (0.0819619331014)*x[1]**o + (-0.963231402515)*x[1] + (0.187756383983)*x[2]**o + (-0.413789504942)*x[2]
            ref[(0, 1, 1, 0)]=0.269718317085/(o+1.)+(-0.39804570102)+(0.703944425324)*0.5**o
            arg[(0, 1, 1, 1)]=-0.706299986229*x[0]**o + (-0.539618863606)*x[0] + (0.287586538354)*x[1]**o + (-0.00383919698547)*x[1] + (-0.29737183797)*x[2]**o + (-0.910708430055)*x[2]
            ref[(0, 1, 1, 1)]=-0.00978529961621/(o+1.)+(-0.727083245323)+(-0.706299986229)*0.5**o
            arg[(0, 1, 2, 0)]=0.956706543106*x[0]**o + (-0.887140170052)*x[0] + (0.969088451291)*x[1]**o + (0.760802772465)*x[1] + (0.78028739742)*x[2]**o + (-0.698630262943)*x[2]
            ref[(0, 1, 2, 0)]=1.74937584871/(o+1.)+(-0.412483830265)+(0.956706543106)*0.5**o
            arg[(0, 1, 2, 1)]=0.105305826945*x[0]**o + (-0.0134252335064)*x[0] + (-0.880158306873)*x[1]**o + (-0.032294749256)*x[1] + (-0.37484269948)*x[2]**o + (-0.590370685212)*x[2]
            ref[(0, 1, 2, 1)]=-1.25500100635/(o+1.)+(-0.318045333987)+(0.105305826945)*0.5**o
            arg[(0, 1, 3, 0)]=-0.115324155831*x[0]**o + (-0.887012476353)*x[0] + (0.217310832542)*x[1]**o + (-0.639524113707)*x[1] + (0.901189025702)*x[2]**o + (-0.0558666767038)*x[2]
            ref[(0, 1, 3, 0)]=1.11849985824/(o+1.)+(-0.791201633382)+(-0.115324155831)*0.5**o
            arg[(0, 1, 3, 1)]=0.777070115214*x[0]**o + (-0.957824021669)*x[0] + (-0.391250945884)*x[1]**o + (-0.968841754079)*x[1] + (-0.340618985664)*x[2]**o + (0.890066914802)*x[2]
            ref[(0, 1, 3, 1)]=-0.731869931548/(o+1.)+(-0.518299430473)+(0.777070115214)*0.5**o
            arg[(1, 0, 0, 0)]=0.792108045489*x[0]**o + (-0.260060341266)*x[0] + (-0.832104105829)*x[1]**o + (-0.0122761702916)*x[1] + (-0.612711635568)*x[2]**o + (0.0813733728472)*x[2]
            ref[(1, 0, 0, 0)]=-1.4448157414/(o+1.)+(-0.0954815693554)+(0.792108045489)*0.5**o
            arg[(1, 0, 0, 1)]=-0.199210214758*x[0]**o + (-0.813850242705)*x[0] + (-0.529953763852)*x[1]**o + (0.60252813352)*x[1] + (-0.373414181187)*x[2]**o + (-0.354205866066)*x[2]
            ref[(1, 0, 0, 1)]=-0.903367945039/(o+1.)+(-0.282763987625)+(-0.199210214758)*0.5**o
            arg[(1, 0, 1, 0)]=-0.958419023266*x[0]**o + (0.0488504097258)*x[0] + (0.911524843175)*x[1]**o + (0.795093199721)*x[1] + (-0.36248637274)*x[2]**o + (-0.0335087951396)*x[2]
            ref[(1, 0, 1, 0)]=0.549038470435/(o+1.)+(0.405217407153)+(-0.958419023266)*0.5**o
            arg[(1, 0, 1, 1)]=-0.738189563134*x[0]**o + (-0.909428533753)*x[0] + (-0.575722707528)*x[1]**o + (0.0712131407458)*x[1] + (-0.897689298934)*x[2]**o + (-0.283024619378)*x[2]
            ref[(1, 0, 1, 1)]=-1.47341200646/(o+1.)+(-0.560620006193)+(-0.738189563134)*0.5**o
            arg[(1, 0, 2, 0)]=0.132195023287*x[0]**o + (0.68475445034)*x[0] + (-0.996027336406)*x[1]**o + (0.366139172742)*x[1] + (0.909443515179)*x[2]**o + (-0.0189608585813)*x[2]
            ref[(1, 0, 2, 0)]=-0.0865838212273/(o+1.)+(0.51596638225)+(0.132195023287)*0.5**o
            arg[(1, 0, 2, 1)]=0.235797617343*x[0]**o + (-0.264705889014)*x[0] + (-0.225048348091)*x[1]**o + (0.196913267824)*x[1] + (0.289872530977)*x[2]**o + (0.485700991622)*x[2]
            ref[(1, 0, 2, 1)]=0.0648241828864/(o+1.)+(0.208954185216)+(0.235797617343)*0.5**o
            arg[(1, 0, 3, 0)]=-0.980814470009*x[0]**o + (0.572000178702)*x[0] + (0.737537887183)*x[1]**o + (-0.0573671924634)*x[1] + (-0.509294533256)*x[2]**o + (-0.123802398782)*x[2]
            ref[(1, 0, 3, 0)]=0.228243353927/(o+1.)+(0.195415293729)+(-0.980814470009)*0.5**o
            arg[(1, 0, 3, 1)]=-0.134606042837*x[0]**o + (0.230319966665)*x[0] + (0.390798818537)*x[1]**o + (0.959456365296)*x[1] + (-0.758228873367)*x[2]**o + (0.626971481594)*x[2]
            ref[(1, 0, 3, 1)]=-0.36743005483/(o+1.)+(0.908373906778)+(-0.134606042837)*0.5**o
            arg[(1, 1, 0, 0)]=-0.116230081197*x[0]**o + (0.686271950843)*x[0] + (-0.834855005588)*x[1]**o + (0.416827640313)*x[1] + (-0.91932684243)*x[2]**o + (-0.821624082666)*x[2]
            ref[(1, 1, 0, 0)]=-1.75418184802/(o+1.)+(0.140737754245)+(-0.116230081197)*0.5**o
            arg[(1, 1, 0, 1)]=-0.165594155198*x[0]**o + (0.708300626481)*x[0] + (0.761655191476)*x[1]**o + (0.752455185307)*x[1] + (0.978671189621)*x[2]**o + (0.447152589041)*x[2]
            ref[(1, 1, 0, 1)]=1.7403263811/(o+1.)+(0.953954200415)+(-0.165594155198)*0.5**o
            arg[(1, 1, 1, 0)]=-0.257630296736*x[0]**o + (0.9986103695)*x[0] + (0.624917631962)*x[1]**o + (0.0560340542719)*x[1] + (0.215687486625)*x[2]**o + (0.329202112198)*x[2]
            ref[(1, 1, 1, 0)]=0.840605118587/(o+1.)+(0.691923267985)+(-0.257630296736)*0.5**o
            arg[(1, 1, 1, 1)]=0.218516322282*x[0]**o + (-0.851295082019)*x[0] + (0.787919949305)*x[1]**o + (0.14209954634)*x[1] + (0.723706868015)*x[2]**o + (-0.0964710099067)*x[2]
            ref[(1, 1, 1, 1)]=1.51162681732/(o+1.)+(-0.402833272793)+(0.218516322282)*0.5**o
            arg[(1, 1, 2, 0)]=0.836504221372*x[0]**o + (0.626133514258)*x[0] + (-0.841675763655)*x[1]**o + (-0.393034170787)*x[1] + (0.34164509181)*x[2]**o + (0.968816645755)*x[2]
            ref[(1, 1, 2, 0)]=-0.500030671844/(o+1.)+(0.600957994613)+(0.836504221372)*0.5**o
            arg[(1, 1, 2, 1)]=0.875215668388*x[0]**o + (-0.384613430051)*x[0] + (0.321332391448)*x[1]**o + (-0.266675837723)*x[1] + (0.813265409295)*x[2]**o + (-0.0558897302223)*x[2]
            ref[(1, 1, 2, 1)]=1.13459780074/(o+1.)+(-0.353589498998)+(0.875215668388)*0.5**o
            arg[(1, 1, 3, 0)]=0.562877950409*x[0]**o + (-0.21085847866)*x[0] + (0.41535281826)*x[1]**o + (-0.540528317747)*x[1] + (0.760269174403)*x[2]**o + (0.753066531353)*x[2]
            ref[(1, 1, 3, 0)]=1.17562199266/(o+1.)+(0.000839867472881)+(0.562877950409)*0.5**o
            arg[(1, 1, 3, 1)]=0.460367705063*x[0]**o + (-0.859192552602)*x[0] + (-0.153818270996)*x[1]**o + (-0.821869135823)*x[1] + (0.773304292031)*x[2]**o + (-0.419006037207)*x[2]
            ref[(1, 1, 3, 1)]=0.619486021035/(o+1.)+(-1.05003386282)+(0.460367705063)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.899258901875*x[0]**o + (0.635585390878)*x[0] + (0.994258439672)*x[1]**o + (0.205186449118)*x[1]
            ref=0.994258439672/(o+1.)+(0.420385919998)+(-0.899258901875)*0.5**o
        else:
            arg=-0.7509667682*x[0]**o + (-0.707994441681)*x[0] + (0.784857885963)*x[1]**o + (0.799301508682)*x[1] + (0.820815215362)*x[2]**o + (0.71972072767)*x[2]
            ref=1.60567310132/(o+1.)+(0.405513897335)+(-0.7509667682)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2,),w)
        ref=numpy.zeros((2,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.551778752595*x[0]**o + (-0.660102723161)*x[0] + (-0.745072974801)*x[1]**o + (0.467386039877)*x[1]
            ref[(0,)]=-0.745072974801/(o+1.)+(-0.0963583416424)+(-0.551778752595)*0.5**o
            arg[(1,)]=-0.956522075439*x[0]**o + (-0.14423381617)*x[0] + (-0.199729879201)*x[1]**o + (-0.859354269663)*x[1]
            ref[(1,)]=-0.199729879201/(o+1.)+(-0.501794042917)+(-0.956522075439)*0.5**o
        else:
            arg[(0,)]=-0.239229093795*x[0]**o + (-0.900561027759)*x[0] + (0.0529696441618)*x[1]**o + (0.678881745477)*x[1] + (-0.388847727397)*x[2]**o + (0.182465064625)*x[2]
            ref[(0,)]=-0.335878083235/(o+1.)+(-0.0196071088284)+(-0.239229093795)*0.5**o
            arg[(1,)]=0.941316050759*x[0]**o + (0.749606581943)*x[0] + (0.144949834114)*x[1]**o + (-0.662122440351)*x[1] + (-0.646011065738)*x[2]**o + (0.454322733598)*x[2]
            ref[(1,)]=-0.501061231624/(o+1.)+(0.270903437595)+(0.941316050759)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4),w)
        ref=numpy.zeros((4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.560908502723*x[0]**o + (-0.122535623589)*x[0] + (0.826227032478)*x[1]**o + (-0.41550931222)*x[1]
            ref[(0, 0)]=0.826227032478/(o+1.)+(-0.269022467905)+(-0.560908502723)*0.5**o
            arg[(0, 1)]=0.878097144227*x[0]**o + (-0.228269482693)*x[0] + (0.370732906705)*x[1]**o + (-0.458729595457)*x[1]
            ref[(0, 1)]=0.370732906705/(o+1.)+(-0.343499539075)+(0.878097144227)*0.5**o
            arg[(0, 2)]=0.40435852732*x[0]**o + (-0.0860239377584)*x[0] + (-0.896226861247)*x[1]**o + (0.889502866261)*x[1]
            ref[(0, 2)]=-0.896226861247/(o+1.)+(0.401739464251)+(0.40435852732)*0.5**o
            arg[(0, 3)]=0.756573483919*x[0]**o + (-0.0623896790675)*x[0] + (0.508682564682)*x[1]**o + (0.778312944635)*x[1]
            ref[(0, 3)]=0.508682564682/(o+1.)+(0.357961632784)+(0.756573483919)*0.5**o
            arg[(1, 0)]=0.309816913285*x[0]**o + (0.42139072839)*x[0] + (0.283131235872)*x[1]**o + (0.898113455892)*x[1]
            ref[(1, 0)]=0.283131235872/(o+1.)+(0.659752092141)+(0.309816913285)*0.5**o
            arg[(1, 1)]=-0.638043715649*x[0]**o + (0.975091766261)*x[0] + (0.881001075198)*x[1]**o + (0.50799630559)*x[1]
            ref[(1, 1)]=0.881001075198/(o+1.)+(0.741544035926)+(-0.638043715649)*0.5**o
            arg[(1, 2)]=-0.151104080278*x[0]**o + (0.137274694909)*x[0] + (-0.722149342904)*x[1]**o + (0.095421789471)*x[1]
            ref[(1, 2)]=-0.722149342904/(o+1.)+(0.11634824219)+(-0.151104080278)*0.5**o
            arg[(1, 3)]=0.316718437432*x[0]**o + (-0.349157178769)*x[0] + (-0.367075880235)*x[1]**o + (0.715810720496)*x[1]
            ref[(1, 3)]=-0.367075880235/(o+1.)+(0.183326770864)+(0.316718437432)*0.5**o
            arg[(2, 0)]=-0.536071950807*x[0]**o + (0.0846842959768)*x[0] + (-0.613147040921)*x[1]**o + (-0.499877285185)*x[1]
            ref[(2, 0)]=-0.613147040921/(o+1.)+(-0.207596494604)+(-0.536071950807)*0.5**o
            arg[(2, 1)]=0.121943220922*x[0]**o + (-0.755369961906)*x[0] + (0.904334696701)*x[1]**o + (-0.645490035564)*x[1]
            ref[(2, 1)]=0.904334696701/(o+1.)+(-0.700429998735)+(0.121943220922)*0.5**o
            arg[(2, 2)]=-0.393899459941*x[0]**o + (-0.80371333465)*x[0] + (0.0893712950908)*x[1]**o + (-0.225409581935)*x[1]
            ref[(2, 2)]=0.0893712950908/(o+1.)+(-0.514561458293)+(-0.393899459941)*0.5**o
            arg[(2, 3)]=-0.600528528335*x[0]**o + (-0.873645743323)*x[0] + (0.815705607862)*x[1]**o + (-0.594061712255)*x[1]
            ref[(2, 3)]=0.815705607862/(o+1.)+(-0.733853727789)+(-0.600528528335)*0.5**o
            arg[(3, 0)]=0.0552987140473*x[0]**o + (-0.907370979019)*x[0] + (-0.471423463312)*x[1]**o + (0.914298033595)*x[1]
            ref[(3, 0)]=-0.471423463312/(o+1.)+(0.00346352728787)+(0.0552987140473)*0.5**o
            arg[(3, 1)]=-0.0568417088261*x[0]**o + (0.28300307383)*x[0] + (-0.970973828043)*x[1]**o + (0.278294029508)*x[1]
            ref[(3, 1)]=-0.970973828043/(o+1.)+(0.280648551669)+(-0.0568417088261)*0.5**o
            arg[(3, 2)]=0.722096269088*x[0]**o + (0.0572505374505)*x[0] + (0.6443332928)*x[1]**o + (-0.424539594151)*x[1]
            ref[(3, 2)]=0.6443332928/(o+1.)+(-0.18364452835)+(0.722096269088)*0.5**o
            arg[(3, 3)]=-0.317809586974*x[0]**o + (0.671925061538)*x[0] + (-0.48390420382)*x[1]**o + (0.714197519125)*x[1]
            ref[(3, 3)]=-0.48390420382/(o+1.)+(0.693061290332)+(-0.317809586974)*0.5**o
        else:
            arg[(0, 0)]=0.385833719154*x[0]**o + (-0.848888556454)*x[0] + (0.210362175832)*x[1]**o + (-0.679770038377)*x[1] + (-0.474189058872)*x[2]**o + (-0.0204291203671)*x[2]
            ref[(0, 0)]=-0.263826883041/(o+1.)+(-0.774543857599)+(0.385833719154)*0.5**o
            arg[(0, 1)]=0.190858438131*x[0]**o + (0.851693026216)*x[0] + (0.666728230173)*x[1]**o + (0.662337566401)*x[1] + (-0.990775628639)*x[2]**o + (-0.212793984779)*x[2]
            ref[(0, 1)]=-0.324047398466/(o+1.)+(0.650618303919)+(0.190858438131)*0.5**o
            arg[(0, 2)]=0.284726360487*x[0]**o + (-0.634259065763)*x[0] + (-0.338156621506)*x[1]**o + (-0.377746524648)*x[1] + (-0.716107324993)*x[2]**o + (-0.0694474528111)*x[2]
            ref[(0, 2)]=-1.0542639465/(o+1.)+(-0.540726521611)+(0.284726360487)*0.5**o
            arg[(0, 3)]=-0.457772497285*x[0]**o + (0.413793972493)*x[0] + (-0.572918768225)*x[1]**o + (-0.571734197696)*x[1] + (-0.508185989661)*x[2]**o + (0.368135338823)*x[2]
            ref[(0, 3)]=-1.08110475789/(o+1.)+(0.10509755681)+(-0.457772497285)*0.5**o
            arg[(1, 0)]=-0.487882123312*x[0]**o + (-0.213963349561)*x[0] + (-0.629655413387)*x[1]**o + (-0.407642436432)*x[1] + (-0.639246081454)*x[2]**o + (-0.8868826674)*x[2]
            ref[(1, 0)]=-1.26890149484/(o+1.)+(-0.754244226696)+(-0.487882123312)*0.5**o
            arg[(1, 1)]=-0.0784178739952*x[0]**o + (0.502106643341)*x[0] + (0.371403324376)*x[1]**o + (0.794146483538)*x[1] + (0.801576698947)*x[2]**o + (0.944456238087)*x[2]
            ref[(1, 1)]=1.17298002332/(o+1.)+(1.12035468248)+(-0.0784178739952)*0.5**o
            arg[(1, 2)]=-0.320062301982*x[0]**o + (-0.679253589703)*x[0] + (-0.938584308491)*x[1]**o + (-0.621774248755)*x[1] + (0.423267264003)*x[2]**o + (-0.662854077021)*x[2]
            ref[(1, 2)]=-0.515317044489/(o+1.)+(-0.98194095774)+(-0.320062301982)*0.5**o
            arg[(1, 3)]=-0.612358576074*x[0]**o + (-0.076364497062)*x[0] + (-0.702689548511)*x[1]**o + (-0.395453834239)*x[1] + (0.655272264537)*x[2]**o + (0.655759685325)*x[2]
            ref[(1, 3)]=-0.0474172839732/(o+1.)+(0.091970677012)+(-0.612358576074)*0.5**o
            arg[(2, 0)]=0.778622063448*x[0]**o + (-0.102182285599)*x[0] + (-0.177061967262)*x[1]**o + (-0.41535809344)*x[1] + (-0.823626276173)*x[2]**o + (0.129845821038)*x[2]
            ref[(2, 0)]=-1.00068824343/(o+1.)+(-0.193847279)+(0.778622063448)*0.5**o
            arg[(2, 1)]=0.544174299566*x[0]**o + (-0.857820822352)*x[0] + (0.937630198585)*x[1]**o + (0.614061581371)*x[1] + (0.679684993364)*x[2]**o + (-0.875378586164)*x[2]
            ref[(2, 1)]=1.61731519195/(o+1.)+(-0.559568913573)+(0.544174299566)*0.5**o
            arg[(2, 2)]=-0.324948650373*x[0]**o + (-0.860495983339)*x[0] + (-0.756372606169)*x[1]**o + (-0.849592311486)*x[1] + (-0.468783909743)*x[2]**o + (0.302123336122)*x[2]
            ref[(2, 2)]=-1.22515651591/(o+1.)+(-0.703982479351)+(-0.324948650373)*0.5**o
            arg[(2, 3)]=0.643921447361*x[0]**o + (-0.144846139369)*x[0] + (-0.330145662058)*x[1]**o + (0.96310554923)*x[1] + (-0.178704409026)*x[2]**o + (-0.80123221729)*x[2]
            ref[(2, 3)]=-0.508850071084/(o+1.)+(0.00851359628517)+(0.643921447361)*0.5**o
            arg[(3, 0)]=0.900794898869*x[0]**o + (0.724447920187)*x[0] + (0.981831801877)*x[1]**o + (0.482078435807)*x[1] + (0.831173967314)*x[2]**o + (-0.892588217013)*x[2]
            ref[(3, 0)]=1.81300576919/(o+1.)+(0.156969069491)+(0.900794898869)*0.5**o
            arg[(3, 1)]=0.228147452073*x[0]**o + (0.816620661834)*x[0] + (0.974394638849)*x[1]**o + (0.0915746653247)*x[1] + (-0.17071879015)*x[2]**o + (-0.601596832608)*x[2]
            ref[(3, 1)]=0.8036758487/(o+1.)+(0.153299247275)+(0.228147452073)*0.5**o
            arg[(3, 2)]=-0.092321622006*x[0]**o + (0.765719839822)*x[0] + (-0.92203263677)*x[1]**o + (0.634465196175)*x[1] + (0.159052119083)*x[2]**o + (0.386307762869)*x[2]
            ref[(3, 2)]=-0.762980517687/(o+1.)+(0.893246399433)+(-0.092321622006)*0.5**o
            arg[(3, 3)]=-0.90967115511*x[0]**o + (0.203347478601)*x[0] + (0.926794348197)*x[1]**o + (0.19383895199)*x[1] + (0.922408050929)*x[2]**o + (-0.263775197976)*x[2]
            ref[(3, 3)]=1.84920239913/(o+1.)+(0.0667056163074)+(-0.90967115511)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2),w)
        ref=numpy.zeros((3, 3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.272230768648*x[0]**o + (0.51575114372)*x[0] + (0.216543827064)*x[1]**o + (-0.41856567645)*x[1]
            ref[(0, 0, 0)]=0.216543827064/(o+1.)+(0.048592733635)+(0.272230768648)*0.5**o
            arg[(0, 0, 1)]=-0.607703746877*x[0]**o + (-0.456757087843)*x[0] + (-0.199137348114)*x[1]**o + (-0.73789744711)*x[1]
            ref[(0, 0, 1)]=-0.199137348114/(o+1.)+(-0.597327267477)+(-0.607703746877)*0.5**o
            arg[(0, 1, 0)]=0.589724803904*x[0]**o + (0.131111156228)*x[0] + (0.535351785661)*x[1]**o + (-0.0580083682396)*x[1]
            ref[(0, 1, 0)]=0.535351785661/(o+1.)+(0.0365513939941)+(0.589724803904)*0.5**o
            arg[(0, 1, 1)]=-0.747469867876*x[0]**o + (0.645713042122)*x[0] + (-0.505814857948)*x[1]**o + (0.594440075581)*x[1]
            ref[(0, 1, 1)]=-0.505814857948/(o+1.)+(0.620076558851)+(-0.747469867876)*0.5**o
            arg[(0, 2, 0)]=0.4907274951*x[0]**o + (0.52347217397)*x[0] + (0.562942548356)*x[1]**o + (-0.358609423996)*x[1]
            ref[(0, 2, 0)]=0.562942548356/(o+1.)+(0.0824313749871)+(0.4907274951)*0.5**o
            arg[(0, 2, 1)]=0.656990462823*x[0]**o + (-0.0840597938381)*x[0] + (-0.302421208095)*x[1]**o + (0.547913610493)*x[1]
            ref[(0, 2, 1)]=-0.302421208095/(o+1.)+(0.231926908328)+(0.656990462823)*0.5**o
            arg[(1, 0, 0)]=0.265524298211*x[0]**o + (0.606158311962)*x[0] + (0.351100877268)*x[1]**o + (-0.97607832379)*x[1]
            ref[(1, 0, 0)]=0.351100877268/(o+1.)+(-0.184960005914)+(0.265524298211)*0.5**o
            arg[(1, 0, 1)]=-0.199251656531*x[0]**o + (0.383605787599)*x[0] + (0.0867790100078)*x[1]**o + (0.0756473558371)*x[1]
            ref[(1, 0, 1)]=0.0867790100078/(o+1.)+(0.229626571718)+(-0.199251656531)*0.5**o
            arg[(1, 1, 0)]=0.510677300346*x[0]**o + (-0.0788969787543)*x[0] + (0.830865656387)*x[1]**o + (0.388033705335)*x[1]
            ref[(1, 1, 0)]=0.830865656387/(o+1.)+(0.15456836329)+(0.510677300346)*0.5**o
            arg[(1, 1, 1)]=-0.356419726748*x[0]**o + (0.256270156535)*x[0] + (0.241047611471)*x[1]**o + (0.232568445461)*x[1]
            ref[(1, 1, 1)]=0.241047611471/(o+1.)+(0.244419300998)+(-0.356419726748)*0.5**o
            arg[(1, 2, 0)]=-0.906437936675*x[0]**o + (-0.149891925206)*x[0] + (0.846824030658)*x[1]**o + (0.458026260716)*x[1]
            ref[(1, 2, 0)]=0.846824030658/(o+1.)+(0.154067167755)+(-0.906437936675)*0.5**o
            arg[(1, 2, 1)]=0.841240022081*x[0]**o + (0.182868885493)*x[0] + (-0.604748183817)*x[1]**o + (0.983580711428)*x[1]
            ref[(1, 2, 1)]=-0.604748183817/(o+1.)+(0.583224798461)+(0.841240022081)*0.5**o
            arg[(2, 0, 0)]=0.251820398452*x[0]**o + (0.0181766257762)*x[0] + (-0.316892522813)*x[1]**o + (0.793134636709)*x[1]
            ref[(2, 0, 0)]=-0.316892522813/(o+1.)+(0.405655631243)+(0.251820398452)*0.5**o
            arg[(2, 0, 1)]=-0.358237584422*x[0]**o + (-0.124637646193)*x[0] + (-0.849464057865)*x[1]**o + (0.50943211626)*x[1]
            ref[(2, 0, 1)]=-0.849464057865/(o+1.)+(0.192397235034)+(-0.358237584422)*0.5**o
            arg[(2, 1, 0)]=-0.136889097292*x[0]**o + (0.300175141125)*x[0] + (-0.709527694443)*x[1]**o + (-0.92885557466)*x[1]
            ref[(2, 1, 0)]=-0.709527694443/(o+1.)+(-0.314340216767)+(-0.136889097292)*0.5**o
            arg[(2, 1, 1)]=-0.348846575607*x[0]**o + (-0.581845005954)*x[0] + (-0.709472773641)*x[1]**o + (-0.0721069943109)*x[1]
            ref[(2, 1, 1)]=-0.709472773641/(o+1.)+(-0.326976000133)+(-0.348846575607)*0.5**o
            arg[(2, 2, 0)]=0.557874927865*x[0]**o + (0.488223543891)*x[0] + (-0.376635787587)*x[1]**o + (-0.484039271177)*x[1]
            ref[(2, 2, 0)]=-0.376635787587/(o+1.)+(0.00209213635722)+(0.557874927865)*0.5**o
            arg[(2, 2, 1)]=0.113722228708*x[0]**o + (0.576622299633)*x[0] + (-0.490374973176)*x[1]**o + (0.0330188048107)*x[1]
            ref[(2, 2, 1)]=-0.490374973176/(o+1.)+(0.304820552222)+(0.113722228708)*0.5**o
        else:
            arg[(0, 0, 0)]=0.250716262352*x[0]**o + (0.903532369263)*x[0] + (0.729472706977)*x[1]**o + (-0.870245582504)*x[1] + (0.741163524084)*x[2]**o + (-0.232028562525)*x[2]
            ref[(0, 0, 0)]=1.47063623106/(o+1.)+(-0.0993708878828)+(0.250716262352)*0.5**o
            arg[(0, 0, 1)]=-0.678956554018*x[0]**o + (-0.473231607748)*x[0] + (-0.197866547264)*x[1]**o + (0.400370066635)*x[1] + (0.174788286297)*x[2]**o + (-0.433472427456)*x[2]
            ref[(0, 0, 1)]=-0.0230782609676/(o+1.)+(-0.253166984285)+(-0.678956554018)*0.5**o
            arg[(0, 1, 0)]=-0.89483282165*x[0]**o + (0.269117236213)*x[0] + (-0.0606852934516)*x[1]**o + (0.894074870682)*x[1] + (0.40945804962)*x[2]**o + (-0.915415517803)*x[2]
            ref[(0, 1, 0)]=0.348772756168/(o+1.)+(0.123888294546)+(-0.89483282165)*0.5**o
            arg[(0, 1, 1)]=-0.975666135005*x[0]**o + (0.594790096157)*x[0] + (-0.60928829928)*x[1]**o + (-0.661670473324)*x[1] + (0.670614749598)*x[2]**o + (0.23322364212)*x[2]
            ref[(0, 1, 1)]=0.0613264503184/(o+1.)+(0.0831716324767)+(-0.975666135005)*0.5**o
            arg[(0, 2, 0)]=0.740103596001*x[0]**o + (0.534377547411)*x[0] + (-0.418169752085)*x[1]**o + (0.566188745538)*x[1] + (-0.619348965947)*x[2]**o + (-0.604302015255)*x[2]
            ref[(0, 2, 0)]=-1.03751871803/(o+1.)+(0.248132138847)+(0.740103596001)*0.5**o
            arg[(0, 2, 1)]=0.759595835169*x[0]**o + (-0.309155300863)*x[0] + (-0.927210175294)*x[1]**o + (0.900991231987)*x[1] + (-0.422340125503)*x[2]**o + (-0.605769161481)*x[2]
            ref[(0, 2, 1)]=-1.3495503008/(o+1.)+(-0.00696661517841)+(0.759595835169)*0.5**o
            arg[(1, 0, 0)]=0.473205451085*x[0]**o + (0.077648846167)*x[0] + (0.615217216503)*x[1]**o + (-0.827941726005)*x[1] + (-0.0993346261724)*x[2]**o + (0.547376729521)*x[2]
            ref[(1, 0, 0)]=0.515882590331/(o+1.)+(-0.101458075158)+(0.473205451085)*0.5**o
            arg[(1, 0, 1)]=-0.205276750611*x[0]**o + (-0.579044630491)*x[0] + (-0.298993293714)*x[1]**o + (0.160631838683)*x[1] + (-0.853245207251)*x[2]**o + (0.842004941024)*x[2]
            ref[(1, 0, 1)]=-1.15223850096/(o+1.)+(0.211796074608)+(-0.205276750611)*0.5**o
            arg[(1, 1, 0)]=-0.413780960054*x[0]**o + (-0.341484536544)*x[0] + (-0.709400904633)*x[1]**o + (0.754297436161)*x[1] + (-0.541315625742)*x[2]**o + (-0.221109078823)*x[2]
            ref[(1, 1, 0)]=-1.25071653037/(o+1.)+(0.0958519103974)+(-0.413780960054)*0.5**o
            arg[(1, 1, 1)]=0.0275037728911*x[0]**o + (-0.307119671224)*x[0] + (0.441425910449)*x[1]**o + (0.35287849207)*x[1] + (0.301997025494)*x[2]**o + (-0.247952457815)*x[2]
            ref[(1, 1, 1)]=0.743422935943/(o+1.)+(-0.101096818484)+(0.0275037728911)*0.5**o
            arg[(1, 2, 0)]=-0.636424484031*x[0]**o + (-0.451188191617)*x[0] + (-0.912101151068)*x[1]**o + (0.610171425619)*x[1] + (0.931730667956)*x[2]**o + (-0.667669937036)*x[2]
            ref[(1, 2, 0)]=0.0196295168885/(o+1.)+(-0.254343351517)+(-0.636424484031)*0.5**o
            arg[(1, 2, 1)]=0.830027480148*x[0]**o + (-0.487328055954)*x[0] + (0.4424243638)*x[1]**o + (0.234476783723)*x[1] + (-0.371313330144)*x[2]**o + (-0.172820252272)*x[2]
            ref[(1, 2, 1)]=0.0711110336562/(o+1.)+(-0.212835762252)+(0.830027480148)*0.5**o
            arg[(2, 0, 0)]=-0.341578713537*x[0]**o + (0.630870865392)*x[0] + (-0.258990016908)*x[1]**o + (-0.384382761763)*x[1] + (-0.163091373651)*x[2]**o + (-0.366684771735)*x[2]
            ref[(2, 0, 0)]=-0.422081390559/(o+1.)+(-0.060098334053)+(-0.341578713537)*0.5**o
            arg[(2, 0, 1)]=-0.989489827367*x[0]**o + (-0.803857923709)*x[0] + (0.709644052409)*x[1]**o + (0.383796906367)*x[1] + (-0.95054393577)*x[2]**o + (-0.254091933655)*x[2]
            ref[(2, 0, 1)]=-0.240899883361/(o+1.)+(-0.337076475499)+(-0.989489827367)*0.5**o
            arg[(2, 1, 0)]=-0.701490263927*x[0]**o + (-0.440347470946)*x[0] + (-0.461097814797)*x[1]**o + (-0.367977305342)*x[1] + (-0.701123007058)*x[2]**o + (0.584277021908)*x[2]
            ref[(2, 1, 0)]=-1.16222082185/(o+1.)+(-0.11202387719)+(-0.701490263927)*0.5**o
            arg[(2, 1, 1)]=-0.729927766539*x[0]**o + (-0.776989786145)*x[0] + (-0.349578573074)*x[1]**o + (0.388842049825)*x[1] + (0.815200487357)*x[2]**o + (-0.191170077165)*x[2]
            ref[(2, 1, 1)]=0.465621914283/(o+1.)+(-0.289658906742)+(-0.729927766539)*0.5**o
            arg[(2, 2, 0)]=0.466852473304*x[0]**o + (0.000775867498126)*x[0] + (-0.990668041746)*x[1]**o + (-0.184371459775)*x[1] + (0.383245017041)*x[2]**o + (-0.193921754253)*x[2]
            ref[(2, 2, 0)]=-0.607423024705/(o+1.)+(-0.188758673265)+(0.466852473304)*0.5**o
            arg[(2, 2, 1)]=0.842991389118*x[0]**o + (0.998891787337)*x[0] + (0.585842542695)*x[1]**o + (-0.2804965838)*x[1] + (0.9051862933)*x[2]**o + (-0.619317469059)*x[2]
            ref[(2, 2, 1)]=1.49102883599/(o+1.)+(0.0495388672384)+(0.842991389118)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 3, 2, 4),w)
        ref=numpy.zeros((3, 3, 2, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.00270649255248*x[0]**o + (-0.739339723117)*x[0] + (0.0232570256744)*x[1]**o + (0.76053143389)*x[1]
            ref[(0, 0, 0, 0)]=0.0232570256744/(o+1.)+(0.0105958553866)+(-0.00270649255248)*0.5**o
            arg[(0, 0, 0, 1)]=-0.259646174551*x[0]**o + (0.909916750844)*x[0] + (0.145744319642)*x[1]**o + (-0.743048399555)*x[1]
            ref[(0, 0, 0, 1)]=0.145744319642/(o+1.)+(0.0834341756441)+(-0.259646174551)*0.5**o
            arg[(0, 0, 0, 2)]=-0.475983833043*x[0]**o + (0.227271966951)*x[0] + (0.555907421424)*x[1]**o + (-0.680037796024)*x[1]
            ref[(0, 0, 0, 2)]=0.555907421424/(o+1.)+(-0.226382914536)+(-0.475983833043)*0.5**o
            arg[(0, 0, 0, 3)]=-0.755330333928*x[0]**o + (-0.482164513184)*x[0] + (0.305902006969)*x[1]**o + (0.323543935077)*x[1]
            ref[(0, 0, 0, 3)]=0.305902006969/(o+1.)+(-0.0793102890531)+(-0.755330333928)*0.5**o
            arg[(0, 0, 1, 0)]=-0.671800748143*x[0]**o + (-0.401965069434)*x[0] + (-0.318892099142)*x[1]**o + (-0.599755227347)*x[1]
            ref[(0, 0, 1, 0)]=-0.318892099142/(o+1.)+(-0.500860148391)+(-0.671800748143)*0.5**o
            arg[(0, 0, 1, 1)]=-0.384850952467*x[0]**o + (0.345996294488)*x[0] + (0.431214573294)*x[1]**o + (0.0473077751441)*x[1]
            ref[(0, 0, 1, 1)]=0.431214573294/(o+1.)+(0.196652034816)+(-0.384850952467)*0.5**o
            arg[(0, 0, 1, 2)]=-0.333104355586*x[0]**o + (0.985059145856)*x[0] + (-0.52291527779)*x[1]**o + (0.914151820154)*x[1]
            ref[(0, 0, 1, 2)]=-0.52291527779/(o+1.)+(0.949605483005)+(-0.333104355586)*0.5**o
            arg[(0, 0, 1, 3)]=-0.975868316061*x[0]**o + (-0.132051294382)*x[0] + (0.904818989279)*x[1]**o + (0.0456946153386)*x[1]
            ref[(0, 0, 1, 3)]=0.904818989279/(o+1.)+(-0.0431783395215)+(-0.975868316061)*0.5**o
            arg[(0, 1, 0, 0)]=-0.294469451524*x[0]**o + (0.608619444599)*x[0] + (-0.990381378024)*x[1]**o + (-0.375692042342)*x[1]
            ref[(0, 1, 0, 0)]=-0.990381378024/(o+1.)+(0.116463701129)+(-0.294469451524)*0.5**o
            arg[(0, 1, 0, 1)]=-0.384122871058*x[0]**o + (-0.798083647452)*x[0] + (0.136903575087)*x[1]**o + (0.973204900941)*x[1]
            ref[(0, 1, 0, 1)]=0.136903575087/(o+1.)+(0.0875606267448)+(-0.384122871058)*0.5**o
            arg[(0, 1, 0, 2)]=-0.454568812407*x[0]**o + (-0.428693567784)*x[0] + (-0.278577807672)*x[1]**o + (0.534215356559)*x[1]
            ref[(0, 1, 0, 2)]=-0.278577807672/(o+1.)+(0.0527608943872)+(-0.454568812407)*0.5**o
            arg[(0, 1, 0, 3)]=-0.329515011881*x[0]**o + (-0.724520118521)*x[0] + (0.609072118992)*x[1]**o + (0.554304721401)*x[1]
            ref[(0, 1, 0, 3)]=0.609072118992/(o+1.)+(-0.0851076985597)+(-0.329515011881)*0.5**o
            arg[(0, 1, 1, 0)]=-0.477557273955*x[0]**o + (0.603787620737)*x[0] + (0.0875773146578)*x[1]**o + (-0.727437490242)*x[1]
            ref[(0, 1, 1, 0)]=0.0875773146578/(o+1.)+(-0.0618249347528)+(-0.477557273955)*0.5**o
            arg[(0, 1, 1, 1)]=-0.182447564684*x[0]**o + (0.0749691974642)*x[0] + (0.544510073413)*x[1]**o + (0.293458973091)*x[1]
            ref[(0, 1, 1, 1)]=0.544510073413/(o+1.)+(0.184214085278)+(-0.182447564684)*0.5**o
            arg[(0, 1, 1, 2)]=0.412782828166*x[0]**o + (-0.258967253596)*x[0] + (0.567617228751)*x[1]**o + (-0.313588412814)*x[1]
            ref[(0, 1, 1, 2)]=0.567617228751/(o+1.)+(-0.286277833205)+(0.412782828166)*0.5**o
            arg[(0, 1, 1, 3)]=-0.388926682421*x[0]**o + (0.345290136262)*x[0] + (-0.261613013463)*x[1]**o + (-0.0166111018164)*x[1]
            ref[(0, 1, 1, 3)]=-0.261613013463/(o+1.)+(0.164339517223)+(-0.388926682421)*0.5**o
            arg[(0, 2, 0, 0)]=-0.341619051478*x[0]**o + (0.212500335503)*x[0] + (-0.74212978237)*x[1]**o + (0.701877786298)*x[1]
            ref[(0, 2, 0, 0)]=-0.74212978237/(o+1.)+(0.457189060901)+(-0.341619051478)*0.5**o
            arg[(0, 2, 0, 1)]=0.419162143126*x[0]**o + (0.640377757391)*x[0] + (-0.302336313229)*x[1]**o + (0.330575027764)*x[1]
            ref[(0, 2, 0, 1)]=-0.302336313229/(o+1.)+(0.485476392577)+(0.419162143126)*0.5**o
            arg[(0, 2, 0, 2)]=-0.343534808843*x[0]**o + (0.696710511836)*x[0] + (0.698163101792)*x[1]**o + (0.680257733262)*x[1]
            ref[(0, 2, 0, 2)]=0.698163101792/(o+1.)+(0.688484122549)+(-0.343534808843)*0.5**o
            arg[(0, 2, 0, 3)]=-0.879098026252*x[0]**o + (0.335764009392)*x[0] + (-0.288519582679)*x[1]**o + (-0.126472709548)*x[1]
            ref[(0, 2, 0, 3)]=-0.288519582679/(o+1.)+(0.104645649922)+(-0.879098026252)*0.5**o
            arg[(0, 2, 1, 0)]=0.48140942298*x[0]**o + (0.359919537084)*x[0] + (0.605313098596)*x[1]**o + (0.192111494824)*x[1]
            ref[(0, 2, 1, 0)]=0.605313098596/(o+1.)+(0.276015515954)+(0.48140942298)*0.5**o
            arg[(0, 2, 1, 1)]=0.449919484785*x[0]**o + (0.214649170323)*x[0] + (0.455322646036)*x[1]**o + (0.0514514457909)*x[1]
            ref[(0, 2, 1, 1)]=0.455322646036/(o+1.)+(0.133050308057)+(0.449919484785)*0.5**o
            arg[(0, 2, 1, 2)]=0.704516627138*x[0]**o + (-0.0295680529792)*x[0] + (0.557054986845)*x[1]**o + (-0.45678225151)*x[1]
            ref[(0, 2, 1, 2)]=0.557054986845/(o+1.)+(-0.243175152245)+(0.704516627138)*0.5**o
            arg[(0, 2, 1, 3)]=0.821853841035*x[0]**o + (0.997378842994)*x[0] + (0.141829062482)*x[1]**o + (0.0140417366492)*x[1]
            ref[(0, 2, 1, 3)]=0.141829062482/(o+1.)+(0.505710289821)+(0.821853841035)*0.5**o
            arg[(1, 0, 0, 0)]=0.341132661442*x[0]**o + (-0.198088629087)*x[0] + (0.0658275014277)*x[1]**o + (0.73626844249)*x[1]
            ref[(1, 0, 0, 0)]=0.0658275014277/(o+1.)+(0.269089906702)+(0.341132661442)*0.5**o
            arg[(1, 0, 0, 1)]=-0.815673335791*x[0]**o + (-0.664384443818)*x[0] + (0.987622863705)*x[1]**o + (-0.677179109764)*x[1]
            ref[(1, 0, 0, 1)]=0.987622863705/(o+1.)+(-0.670781776791)+(-0.815673335791)*0.5**o
            arg[(1, 0, 0, 2)]=0.784115214545*x[0]**o + (0.298058588224)*x[0] + (-0.513018091863)*x[1]**o + (0.624149726378)*x[1]
            ref[(1, 0, 0, 2)]=-0.513018091863/(o+1.)+(0.461104157301)+(0.784115214545)*0.5**o
            arg[(1, 0, 0, 3)]=0.351541283128*x[0]**o + (0.27257757096)*x[0] + (-0.406287128858)*x[1]**o + (-0.515343043283)*x[1]
            ref[(1, 0, 0, 3)]=-0.406287128858/(o+1.)+(-0.121382736162)+(0.351541283128)*0.5**o
            arg[(1, 0, 1, 0)]=-0.335317535465*x[0]**o + (-0.702429281843)*x[0] + (-0.196556637231)*x[1]**o + (0.368322426646)*x[1]
            ref[(1, 0, 1, 0)]=-0.196556637231/(o+1.)+(-0.167053427599)+(-0.335317535465)*0.5**o
            arg[(1, 0, 1, 1)]=0.059929206893*x[0]**o + (-0.274167260356)*x[0] + (0.0689329187377)*x[1]**o + (-0.555389484114)*x[1]
            ref[(1, 0, 1, 1)]=0.0689329187377/(o+1.)+(-0.414778372235)+(0.059929206893)*0.5**o
            arg[(1, 0, 1, 2)]=-0.130531525528*x[0]**o + (-0.934897646693)*x[0] + (-0.106284144575)*x[1]**o + (-0.708028671205)*x[1]
            ref[(1, 0, 1, 2)]=-0.106284144575/(o+1.)+(-0.821463158949)+(-0.130531525528)*0.5**o
            arg[(1, 0, 1, 3)]=-0.890489437452*x[0]**o + (-0.576084638713)*x[0] + (-0.851415525462)*x[1]**o + (-0.13757289555)*x[1]
            ref[(1, 0, 1, 3)]=-0.851415525462/(o+1.)+(-0.356828767131)+(-0.890489437452)*0.5**o
            arg[(1, 1, 0, 0)]=-0.684833666702*x[0]**o + (-0.538267956124)*x[0] + (0.156359171332)*x[1]**o + (-0.0586385667706)*x[1]
            ref[(1, 1, 0, 0)]=0.156359171332/(o+1.)+(-0.298453261447)+(-0.684833666702)*0.5**o
            arg[(1, 1, 0, 1)]=-0.350600132968*x[0]**o + (-0.335187630839)*x[0] + (-0.58270941715)*x[1]**o + (0.502676798577)*x[1]
            ref[(1, 1, 0, 1)]=-0.58270941715/(o+1.)+(0.0837445838691)+(-0.350600132968)*0.5**o
            arg[(1, 1, 0, 2)]=0.454425391183*x[0]**o + (-0.0143988995636)*x[0] + (-0.978526467036)*x[1]**o + (-0.664006152563)*x[1]
            ref[(1, 1, 0, 2)]=-0.978526467036/(o+1.)+(-0.339202526063)+(0.454425391183)*0.5**o
            arg[(1, 1, 0, 3)]=0.705471206886*x[0]**o + (0.947556756381)*x[0] + (0.107377793568)*x[1]**o + (0.783182820444)*x[1]
            ref[(1, 1, 0, 3)]=0.107377793568/(o+1.)+(0.865369788413)+(0.705471206886)*0.5**o
            arg[(1, 1, 1, 0)]=0.374692568184*x[0]**o + (-0.386415205918)*x[0] + (0.578013981796)*x[1]**o + (-0.743629064752)*x[1]
            ref[(1, 1, 1, 0)]=0.578013981796/(o+1.)+(-0.565022135335)+(0.374692568184)*0.5**o
            arg[(1, 1, 1, 1)]=0.566795010746*x[0]**o + (0.125339337316)*x[0] + (0.929013301283)*x[1]**o + (0.680186122138)*x[1]
            ref[(1, 1, 1, 1)]=0.929013301283/(o+1.)+(0.402762729727)+(0.566795010746)*0.5**o
            arg[(1, 1, 1, 2)]=-0.0332692718408*x[0]**o + (-0.30925589502)*x[0] + (0.633959922139)*x[1]**o + (0.417830361915)*x[1]
            ref[(1, 1, 1, 2)]=0.633959922139/(o+1.)+(0.0542872334478)+(-0.0332692718408)*0.5**o
            arg[(1, 1, 1, 3)]=-0.922770204898*x[0]**o + (-0.165534431501)*x[0] + (-0.737240188571)*x[1]**o + (0.207955276421)*x[1]
            ref[(1, 1, 1, 3)]=-0.737240188571/(o+1.)+(0.0212104224601)+(-0.922770204898)*0.5**o
            arg[(1, 2, 0, 0)]=-0.269592150353*x[0]**o + (-0.602907275872)*x[0] + (-0.0363655794992)*x[1]**o + (-0.421503977724)*x[1]
            ref[(1, 2, 0, 0)]=-0.0363655794992/(o+1.)+(-0.512205626798)+(-0.269592150353)*0.5**o
            arg[(1, 2, 0, 1)]=0.805569530157*x[0]**o + (-0.327657576245)*x[0] + (-0.545200810964)*x[1]**o + (-0.359404277695)*x[1]
            ref[(1, 2, 0, 1)]=-0.545200810964/(o+1.)+(-0.34353092697)+(0.805569530157)*0.5**o
            arg[(1, 2, 0, 2)]=-0.68990948257*x[0]**o + (0.309862683468)*x[0] + (0.757820904584)*x[1]**o + (0.125842092535)*x[1]
            ref[(1, 2, 0, 2)]=0.757820904584/(o+1.)+(0.217852388002)+(-0.68990948257)*0.5**o
            arg[(1, 2, 0, 3)]=-0.46906307133*x[0]**o + (-0.275681609939)*x[0] + (-0.0156198347596)*x[1]**o + (-0.367711728773)*x[1]
            ref[(1, 2, 0, 3)]=-0.0156198347596/(o+1.)+(-0.321696669356)+(-0.46906307133)*0.5**o
            arg[(1, 2, 1, 0)]=0.777524647877*x[0]**o + (-0.300331481301)*x[0] + (0.689011616736)*x[1]**o + (-0.596726489927)*x[1]
            ref[(1, 2, 1, 0)]=0.689011616736/(o+1.)+(-0.448528985614)+(0.777524647877)*0.5**o
            arg[(1, 2, 1, 1)]=0.662076484473*x[0]**o + (0.0814421027926)*x[0] + (-0.943278476556)*x[1]**o + (0.351803478326)*x[1]
            ref[(1, 2, 1, 1)]=-0.943278476556/(o+1.)+(0.21662279056)+(0.662076484473)*0.5**o
            arg[(1, 2, 1, 2)]=-0.963921328181*x[0]**o + (-0.71894191847)*x[0] + (-0.846295861026)*x[1]**o + (0.549349993439)*x[1]
            ref[(1, 2, 1, 2)]=-0.846295861026/(o+1.)+(-0.0847959625154)+(-0.963921328181)*0.5**o
            arg[(1, 2, 1, 3)]=0.349714061729*x[0]**o + (-0.929300546058)*x[0] + (0.635404446182)*x[1]**o + (-0.759294100221)*x[1]
            ref[(1, 2, 1, 3)]=0.635404446182/(o+1.)+(-0.844297323139)+(0.349714061729)*0.5**o
            arg[(2, 0, 0, 0)]=-0.91218603582*x[0]**o + (-0.876594719676)*x[0] + (0.174206963653)*x[1]**o + (0.628825113806)*x[1]
            ref[(2, 0, 0, 0)]=0.174206963653/(o+1.)+(-0.123884802935)+(-0.91218603582)*0.5**o
            arg[(2, 0, 0, 1)]=0.674137699568*x[0]**o + (-0.466200562049)*x[0] + (0.95936990641)*x[1]**o + (0.894210151433)*x[1]
            ref[(2, 0, 0, 1)]=0.95936990641/(o+1.)+(0.214004794692)+(0.674137699568)*0.5**o
            arg[(2, 0, 0, 2)]=-0.731140536554*x[0]**o + (0.528516925579)*x[0] + (0.333947494202)*x[1]**o + (0.151147796717)*x[1]
            ref[(2, 0, 0, 2)]=0.333947494202/(o+1.)+(0.339832361148)+(-0.731140536554)*0.5**o
            arg[(2, 0, 0, 3)]=0.756243634881*x[0]**o + (0.850357344284)*x[0] + (0.893781529205)*x[1]**o + (0.326714185693)*x[1]
            ref[(2, 0, 0, 3)]=0.893781529205/(o+1.)+(0.588535764988)+(0.756243634881)*0.5**o
            arg[(2, 0, 1, 0)]=-0.739314081825*x[0]**o + (0.602155035823)*x[0] + (0.471651096865)*x[1]**o + (-0.914722687706)*x[1]
            ref[(2, 0, 1, 0)]=0.471651096865/(o+1.)+(-0.156283825941)+(-0.739314081825)*0.5**o
            arg[(2, 0, 1, 1)]=-0.10500234011*x[0]**o + (0.816695203226)*x[0] + (-0.0142978626617)*x[1]**o + (-0.906984783386)*x[1]
            ref[(2, 0, 1, 1)]=-0.0142978626617/(o+1.)+(-0.04514479008)+(-0.10500234011)*0.5**o
            arg[(2, 0, 1, 2)]=-0.268997004026*x[0]**o + (0.155059177646)*x[0] + (-0.0493648207131)*x[1]**o + (-0.86155977421)*x[1]
            ref[(2, 0, 1, 2)]=-0.0493648207131/(o+1.)+(-0.353250298282)+(-0.268997004026)*0.5**o
            arg[(2, 0, 1, 3)]=-0.543152596024*x[0]**o + (-0.799638208661)*x[0] + (-0.460961673703)*x[1]**o + (0.965036741677)*x[1]
            ref[(2, 0, 1, 3)]=-0.460961673703/(o+1.)+(0.0826992665077)+(-0.543152596024)*0.5**o
            arg[(2, 1, 0, 0)]=-0.613930411811*x[0]**o + (0.905198131714)*x[0] + (-0.77028412185)*x[1]**o + (0.999632391937)*x[1]
            ref[(2, 1, 0, 0)]=-0.77028412185/(o+1.)+(0.952415261825)+(-0.613930411811)*0.5**o
            arg[(2, 1, 0, 1)]=0.534021563424*x[0]**o + (0.185824742963)*x[0] + (-0.702902854409)*x[1]**o + (-0.141398306137)*x[1]
            ref[(2, 1, 0, 1)]=-0.702902854409/(o+1.)+(0.0222132184131)+(0.534021563424)*0.5**o
            arg[(2, 1, 0, 2)]=-0.235146437226*x[0]**o + (-0.564749233156)*x[0] + (-0.107743093791)*x[1]**o + (-0.986059952186)*x[1]
            ref[(2, 1, 0, 2)]=-0.107743093791/(o+1.)+(-0.775404592671)+(-0.235146437226)*0.5**o
            arg[(2, 1, 0, 3)]=0.127653965599*x[0]**o + (-0.0181949949659)*x[0] + (-0.337596392641)*x[1]**o + (0.467209692805)*x[1]
            ref[(2, 1, 0, 3)]=-0.337596392641/(o+1.)+(0.22450734892)+(0.127653965599)*0.5**o
            arg[(2, 1, 1, 0)]=-0.870970278165*x[0]**o + (-0.839023859635)*x[0] + (0.659903917106)*x[1]**o + (0.483607094704)*x[1]
            ref[(2, 1, 1, 0)]=0.659903917106/(o+1.)+(-0.177708382466)+(-0.870970278165)*0.5**o
            arg[(2, 1, 1, 1)]=-0.636420010563*x[0]**o + (0.82519894129)*x[0] + (-0.903082960947)*x[1]**o + (-0.644554886254)*x[1]
            ref[(2, 1, 1, 1)]=-0.903082960947/(o+1.)+(0.0903220275176)+(-0.636420010563)*0.5**o
            arg[(2, 1, 1, 2)]=0.952799008387*x[0]**o + (-0.756173324813)*x[0] + (-0.61554808748)*x[1]**o + (-0.48118336001)*x[1]
            ref[(2, 1, 1, 2)]=-0.61554808748/(o+1.)+(-0.618678342412)+(0.952799008387)*0.5**o
            arg[(2, 1, 1, 3)]=0.212716626347*x[0]**o + (-0.490011208487)*x[0] + (-0.671424554188)*x[1]**o + (0.874615040601)*x[1]
            ref[(2, 1, 1, 3)]=-0.671424554188/(o+1.)+(0.192301916057)+(0.212716626347)*0.5**o
            arg[(2, 2, 0, 0)]=0.0115234625491*x[0]**o + (-0.669373560682)*x[0] + (-0.201446478286)*x[1]**o + (0.789507622767)*x[1]
            ref[(2, 2, 0, 0)]=-0.201446478286/(o+1.)+(0.0600670310423)+(0.0115234625491)*0.5**o
            arg[(2, 2, 0, 1)]=0.214718856759*x[0]**o + (0.215902272128)*x[0] + (-0.724489773168)*x[1]**o + (-0.943198343922)*x[1]
            ref[(2, 2, 0, 1)]=-0.724489773168/(o+1.)+(-0.363648035897)+(0.214718856759)*0.5**o
            arg[(2, 2, 0, 2)]=-0.129094819283*x[0]**o + (-0.444075731384)*x[0] + (0.276518132775)*x[1]**o + (0.133308813051)*x[1]
            ref[(2, 2, 0, 2)]=0.276518132775/(o+1.)+(-0.155383459166)+(-0.129094819283)*0.5**o
            arg[(2, 2, 0, 3)]=0.0654133902956*x[0]**o + (0.416305502974)*x[0] + (0.0616017034245)*x[1]**o + (0.746703573481)*x[1]
            ref[(2, 2, 0, 3)]=0.0616017034245/(o+1.)+(0.581504538227)+(0.0654133902956)*0.5**o
            arg[(2, 2, 1, 0)]=0.544728946068*x[0]**o + (0.29185495151)*x[0] + (0.657185338835)*x[1]**o + (-0.370707615491)*x[1]
            ref[(2, 2, 1, 0)]=0.657185338835/(o+1.)+(-0.0394263319904)+(0.544728946068)*0.5**o
            arg[(2, 2, 1, 1)]=-0.284490174334*x[0]**o + (0.703249820949)*x[0] + (-0.810279927948)*x[1]**o + (0.562618067369)*x[1]
            ref[(2, 2, 1, 1)]=-0.810279927948/(o+1.)+(0.632933944159)+(-0.284490174334)*0.5**o
            arg[(2, 2, 1, 2)]=-0.61333749283*x[0]**o + (-0.493762753197)*x[0] + (-0.563324455796)*x[1]**o + (-0.346139063634)*x[1]
            ref[(2, 2, 1, 2)]=-0.563324455796/(o+1.)+(-0.419950908416)+(-0.61333749283)*0.5**o
            arg[(2, 2, 1, 3)]=0.145090281406*x[0]**o + (-0.101210057784)*x[0] + (-0.844175572512)*x[1]**o + (-0.795596305916)*x[1]
            ref[(2, 2, 1, 3)]=-0.844175572512/(o+1.)+(-0.44840318185)+(0.145090281406)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=0.836377387924*x[0]**o + (-0.747900897082)*x[0] + (0.89971066042)*x[1]**o + (0.983574985811)*x[1] + (-0.846043436877)*x[2]**o + (0.000809059354322)*x[2]
            ref[(0, 0, 0, 0)]=0.0536672235433/(o+1.)+(0.118241574041)+(0.836377387924)*0.5**o
            arg[(0, 0, 0, 1)]=-0.496554362129*x[0]**o + (0.54746477284)*x[0] + (-0.324068161978)*x[1]**o + (-0.932939571873)*x[1] + (0.681173685569)*x[2]**o + (-0.778440985483)*x[2]
            ref[(0, 0, 0, 1)]=0.357105523592/(o+1.)+(-0.581957892258)+(-0.496554362129)*0.5**o
            arg[(0, 0, 0, 2)]=-0.530547693772*x[0]**o + (-0.854430625573)*x[0] + (-0.617715643058)*x[1]**o + (-0.643935150749)*x[1] + (0.298808456918)*x[2]**o + (0.330989560161)*x[2]
            ref[(0, 0, 0, 2)]=-0.31890718614/(o+1.)+(-0.58368810808)+(-0.530547693772)*0.5**o
            arg[(0, 0, 0, 3)]=-0.887228687183*x[0]**o + (0.29714178165)*x[0] + (0.300307821199)*x[1]**o + (0.309772000324)*x[1] + (-0.279046259324)*x[2]**o + (0.446867259276)*x[2]
            ref[(0, 0, 0, 3)]=0.0212615618748/(o+1.)+(0.526890520625)+(-0.887228687183)*0.5**o
            arg[(0, 0, 1, 0)]=-0.204046749121*x[0]**o + (0.538667741227)*x[0] + (-0.710698956209)*x[1]**o + (0.321964568998)*x[1] + (-0.290224581822)*x[2]**o + (0.871967755267)*x[2]
            ref[(0, 0, 1, 0)]=-1.00092353803/(o+1.)+(0.866300032746)+(-0.204046749121)*0.5**o
            arg[(0, 0, 1, 1)]=-0.561810016077*x[0]**o + (-0.227963062631)*x[0] + (-0.0963586178233)*x[1]**o + (-0.605068490039)*x[1] + (-0.285724033127)*x[2]**o + (-0.13881829841)*x[2]
            ref[(0, 0, 1, 1)]=-0.38208265095/(o+1.)+(-0.48592492554)+(-0.561810016077)*0.5**o
            arg[(0, 0, 1, 2)]=0.573926253861*x[0]**o + (-0.912942987224)*x[0] + (-0.799066347213)*x[1]**o + (-0.105197187138)*x[1] + (-0.894243113549)*x[2]**o + (0.811788779879)*x[2]
            ref[(0, 0, 1, 2)]=-1.69330946076/(o+1.)+(-0.103175697242)+(0.573926253861)*0.5**o
            arg[(0, 0, 1, 3)]=-0.0277638800034*x[0]**o + (-0.415372414901)*x[0] + (-0.384818830985)*x[1]**o + (-0.480390264347)*x[1] + (-0.980501690699)*x[2]**o + (0.97807720334)*x[2]
            ref[(0, 0, 1, 3)]=-1.36532052168/(o+1.)+(0.0411572620461)+(-0.0277638800034)*0.5**o
            arg[(0, 1, 0, 0)]=-0.724556658665*x[0]**o + (0.111275403659)*x[0] + (0.067611990084)*x[1]**o + (-0.0214329534245)*x[1] + (-0.656372964354)*x[2]**o + (0.0483915242453)*x[2]
            ref[(0, 1, 0, 0)]=-0.58876097427/(o+1.)+(0.0691169872398)+(-0.724556658665)*0.5**o
            arg[(0, 1, 0, 1)]=0.495589264589*x[0]**o + (-0.158723809121)*x[0] + (-0.962007767756)*x[1]**o + (0.456181328978)*x[1] + (-0.454516761046)*x[2]**o + (-0.185710839339)*x[2]
            ref[(0, 1, 0, 1)]=-1.4165245288/(o+1.)+(0.0558733402587)+(0.495589264589)*0.5**o
            arg[(0, 1, 0, 2)]=0.967436934436*x[0]**o + (-0.332654905692)*x[0] + (0.440693452873)*x[1]**o + (-0.425896606854)*x[1] + (-0.571681344817)*x[2]**o + (-0.795724031492)*x[2]
            ref[(0, 1, 0, 2)]=-0.130987891944/(o+1.)+(-0.777137772019)+(0.967436934436)*0.5**o
            arg[(0, 1, 0, 3)]=0.91476288964*x[0]**o + (-0.67896854396)*x[0] + (0.689874230647)*x[1]**o + (-0.511285306644)*x[1] + (0.690286060634)*x[2]**o + (-0.281722569189)*x[2]
            ref[(0, 1, 0, 3)]=1.38016029128/(o+1.)+(-0.735988209897)+(0.91476288964)*0.5**o
            arg[(0, 1, 1, 0)]=-0.113139434513*x[0]**o + (-0.691571028564)*x[0] + (-0.337494475406)*x[1]**o + (0.487261703188)*x[1] + (0.252802649557)*x[2]**o + (-0.938084381231)*x[2]
            ref[(0, 1, 1, 0)]=-0.0846918258488/(o+1.)+(-0.571196853304)+(-0.113139434513)*0.5**o
            arg[(0, 1, 1, 1)]=-0.858127876804*x[0]**o + (0.139212435003)*x[0] + (-0.960519465707)*x[1]**o + (-0.505291433491)*x[1] + (-0.694156392828)*x[2]**o + (-0.593520094945)*x[2]
            ref[(0, 1, 1, 1)]=-1.65467585853/(o+1.)+(-0.479799546717)+(-0.858127876804)*0.5**o
            arg[(0, 1, 1, 2)]=-0.207683260816*x[0]**o + (-0.979963112163)*x[0] + (0.717734205352)*x[1]**o + (0.661594109763)*x[1] + (-0.340747197174)*x[2]**o + (-0.296742266666)*x[2]
            ref[(0, 1, 1, 2)]=0.376987008178/(o+1.)+(-0.307555634533)+(-0.207683260816)*0.5**o
            arg[(0, 1, 1, 3)]=-0.140519629918*x[0]**o + (0.400918986523)*x[0] + (-0.601244148703)*x[1]**o + (0.618206335417)*x[1] + (-0.358268606663)*x[2]**o + (0.243809548381)*x[2]
            ref[(0, 1, 1, 3)]=-0.959512755366/(o+1.)+(0.631467435161)+(-0.140519629918)*0.5**o
            arg[(0, 2, 0, 0)]=0.423949607599*x[0]**o + (-0.680949307415)*x[0] + (-0.393592695166)*x[1]**o + (0.239824427304)*x[1] + (-0.821256424685)*x[2]**o + (-0.625573088352)*x[2]
            ref[(0, 2, 0, 0)]=-1.21484911985/(o+1.)+(-0.533348984231)+(0.423949607599)*0.5**o
            arg[(0, 2, 0, 1)]=0.153579749778*x[0]**o + (-0.58725044271)*x[0] + (0.970554764769)*x[1]**o + (-0.992097559405)*x[1] + (-0.0602439309836)*x[2]**o + (-0.67371520685)*x[2]
            ref[(0, 2, 0, 1)]=0.910310833785/(o+1.)+(-1.12653160448)+(0.153579749778)*0.5**o
            arg[(0, 2, 0, 2)]=-0.188729324427*x[0]**o + (-0.920353846414)*x[0] + (0.257445617499)*x[1]**o + (0.679302995666)*x[1] + (-0.82385501484)*x[2]**o + (-0.678628267133)*x[2]
            ref[(0, 2, 0, 2)]=-0.566409397341/(o+1.)+(-0.459839558941)+(-0.188729324427)*0.5**o
            arg[(0, 2, 0, 3)]=0.692366197456*x[0]**o + (-0.771708921114)*x[0] + (0.319464058521)*x[1]**o + (-0.594976163405)*x[1] + (-0.620157618523)*x[2]**o + (-0.323189775922)*x[2]
            ref[(0, 2, 0, 3)]=-0.300693560002/(o+1.)+(-0.844937430221)+(0.692366197456)*0.5**o
            arg[(0, 2, 1, 0)]=0.0260783581139*x[0]**o + (0.334100658655)*x[0] + (0.501059838335)*x[1]**o + (-0.309311640981)*x[1] + (-0.614959739316)*x[2]**o + (0.411440743718)*x[2]
            ref[(0, 2, 1, 0)]=-0.113899900982/(o+1.)+(0.218114880696)+(0.0260783581139)*0.5**o
            arg[(0, 2, 1, 1)]=-0.857234993212*x[0]**o + (-0.753984033715)*x[0] + (-0.388739529911)*x[1]**o + (-0.157776232155)*x[1] + (0.772000017772)*x[2]**o + (-0.424670883231)*x[2]
            ref[(0, 2, 1, 1)]=0.38326048786/(o+1.)+(-0.668215574551)+(-0.857234993212)*0.5**o
            arg[(0, 2, 1, 2)]=0.0806175008118*x[0]**o + (0.725411684033)*x[0] + (0.00313399205676)*x[1]**o + (0.75262791813)*x[1] + (-0.802782814256)*x[2]**o + (0.597363819729)*x[2]
            ref[(0, 2, 1, 2)]=-0.7996488222/(o+1.)+(1.03770171095)+(0.0806175008118)*0.5**o
            arg[(0, 2, 1, 3)]=-0.273973299434*x[0]**o + (-0.818894059576)*x[0] + (0.873666900974)*x[1]**o + (-0.0240299485586)*x[1] + (-0.432510061859)*x[2]**o + (-0.880159809202)*x[2]
            ref[(0, 2, 1, 3)]=0.441156839115/(o+1.)+(-0.861541908668)+(-0.273973299434)*0.5**o
            arg[(1, 0, 0, 0)]=0.0281628165072*x[0]**o + (0.590424796905)*x[0] + (0.145424077925)*x[1]**o + (0.349621561654)*x[1] + (0.606033306771)*x[2]**o + (-0.930997430185)*x[2]
            ref[(1, 0, 0, 0)]=0.751457384696/(o+1.)+(0.00452446418696)+(0.0281628165072)*0.5**o
            arg[(1, 0, 0, 1)]=-0.860937696307*x[0]**o + (-0.0290951254589)*x[0] + (-0.62229093044)*x[1]**o + (-0.52815197916)*x[1] + (0.332453050428)*x[2]**o + (0.247269147309)*x[2]
            ref[(1, 0, 0, 1)]=-0.289837880012/(o+1.)+(-0.154988978655)+(-0.860937696307)*0.5**o
            arg[(1, 0, 0, 2)]=-0.111528534678*x[0]**o + (0.0878505653226)*x[0] + (0.987296504783)*x[1]**o + (-0.865212499241)*x[1] + (-0.485786947302)*x[2]**o + (-0.134524552351)*x[2]
            ref[(1, 0, 0, 2)]=0.501509557481/(o+1.)+(-0.455943243134)+(-0.111528534678)*0.5**o
            arg[(1, 0, 0, 3)]=-0.988977819417*x[0]**o + (-0.691443460089)*x[0] + (0.431255790077)*x[1]**o + (0.609197770238)*x[1] + (-0.474458269425)*x[2]**o + (0.466392765963)*x[2]
            ref[(1, 0, 0, 3)]=-0.0432024793478/(o+1.)+(0.192073538056)+(-0.988977819417)*0.5**o
            arg[(1, 0, 1, 0)]=0.444285770018*x[0]**o + (0.250069905572)*x[0] + (-0.32326075397)*x[1]**o + (0.399629902249)*x[1] + (-0.79711211081)*x[2]**o + (0.553553160026)*x[2]
            ref[(1, 0, 1, 0)]=-1.12037286478/(o+1.)+(0.601626483924)+(0.444285770018)*0.5**o
            arg[(1, 0, 1, 1)]=-0.150745674111*x[0]**o + (-0.558000716062)*x[0] + (0.948631467776)*x[1]**o + (-0.729620572968)*x[1] + (0.00440693699288)*x[2]**o + (0.172762486095)*x[2]
            ref[(1, 0, 1, 1)]=0.953038404769/(o+1.)+(-0.557429401468)+(-0.150745674111)*0.5**o
            arg[(1, 0, 1, 2)]=0.191074294842*x[0]**o + (-0.200532065291)*x[0] + (0.254432174143)*x[1]**o + (-0.731745750804)*x[1] + (0.934948667935)*x[2]**o + (-0.96352747068)*x[2]
            ref[(1, 0, 1, 2)]=1.18938084208/(o+1.)+(-0.947902643388)+(0.191074294842)*0.5**o
            arg[(1, 0, 1, 3)]=-0.191514757533*x[0]**o + (0.36481134083)*x[0] + (-0.923738268413)*x[1]**o + (-0.797453738948)*x[1] + (0.509112235529)*x[2]**o + (-0.413458332565)*x[2]
            ref[(1, 0, 1, 3)]=-0.414626032885/(o+1.)+(-0.423050365341)+(-0.191514757533)*0.5**o
            arg[(1, 1, 0, 0)]=0.761365068958*x[0]**o + (-0.381189352866)*x[0] + (-0.540567673358)*x[1]**o + (0.263851500739)*x[1] + (0.620943140082)*x[2]**o + (-0.31716162257)*x[2]
            ref[(1, 1, 0, 0)]=0.0803754667235/(o+1.)+(-0.217249737349)+(0.761365068958)*0.5**o
            arg[(1, 1, 0, 1)]=-0.600004898267*x[0]**o + (-0.856552132259)*x[0] + (0.538636876442)*x[1]**o + (-0.655435413413)*x[1] + (-0.278981940289)*x[2]**o + (-0.556807775576)*x[2]
            ref[(1, 1, 0, 1)]=0.259654936153/(o+1.)+(-1.03439766062)+(-0.600004898267)*0.5**o
            arg[(1, 1, 0, 2)]=0.825410003868*x[0]**o + (-0.798104151773)*x[0] + (0.809472865879)*x[1]**o + (-0.414929829213)*x[1] + (-0.386441278414)*x[2]**o + (0.718141874004)*x[2]
            ref[(1, 1, 0, 2)]=0.423031587465/(o+1.)+(-0.247446053491)+(0.825410003868)*0.5**o
            arg[(1, 1, 0, 3)]=0.902815970139*x[0]**o + (0.419490616823)*x[0] + (0.313431533214)*x[1]**o + (0.314118229892)*x[1] + (-0.710299455128)*x[2]**o + (0.738959553693)*x[2]
            ref[(1, 1, 0, 3)]=-0.396867921914/(o+1.)+(0.736284200204)+(0.902815970139)*0.5**o
            arg[(1, 1, 1, 0)]=0.500077713227*x[0]**o + (0.385677002825)*x[0] + (-0.171615783722)*x[1]**o + (-0.868602747885)*x[1] + (0.764927372716)*x[2]**o + (0.8937255162)*x[2]
            ref[(1, 1, 1, 0)]=0.593311588994/(o+1.)+(0.20539988557)+(0.500077713227)*0.5**o
            arg[(1, 1, 1, 1)]=0.326637103116*x[0]**o + (-0.469378542088)*x[0] + (0.579538649768)*x[1]**o + (0.56879229673)*x[1] + (-0.361770137987)*x[2]**o + (-0.256582660724)*x[2]
            ref[(1, 1, 1, 1)]=0.217768511782/(o+1.)+(-0.0785844530411)+(0.326637103116)*0.5**o
            arg[(1, 1, 1, 2)]=-0.804225591785*x[0]**o + (0.571704468157)*x[0] + (-0.614374220792)*x[1]**o + (-0.85416170503)*x[1] + (-0.461780348499)*x[2]**o + (0.0762027519778)*x[2]
            ref[(1, 1, 1, 2)]=-1.07615456929/(o+1.)+(-0.103127242447)+(-0.804225591785)*0.5**o
            arg[(1, 1, 1, 3)]=0.57032605263*x[0]**o + (0.406307020661)*x[0] + (0.187091182991)*x[1]**o + (-0.0296921282261)*x[1] + (0.738371716421)*x[2]**o + (-0.940901087261)*x[2]
            ref[(1, 1, 1, 3)]=0.925462899412/(o+1.)+(-0.282143097413)+(0.57032605263)*0.5**o
            arg[(1, 2, 0, 0)]=-0.43203953839*x[0]**o + (-0.360239809707)*x[0] + (-0.297194127969)*x[1]**o + (-0.697248713692)*x[1] + (0.473010421034)*x[2]**o + (0.964050669819)*x[2]
            ref[(1, 2, 0, 0)]=0.175816293064/(o+1.)+(-0.0467189267897)+(-0.43203953839)*0.5**o
            arg[(1, 2, 0, 1)]=0.433063626716*x[0]**o + (0.779261168071)*x[0] + (-0.655604473146)*x[1]**o + (-0.136499357408)*x[1] + (-0.714571300481)*x[2]**o + (0.737630633218)*x[2]
            ref[(1, 2, 0, 1)]=-1.37017577363/(o+1.)+(0.69019622194)+(0.433063626716)*0.5**o
            arg[(1, 2, 0, 2)]=0.0433835744927*x[0]**o + (0.470746639621)*x[0] + (0.344377467606)*x[1]**o + (-0.55680977572)*x[1] + (0.756763223164)*x[2]**o + (-0.713701481)*x[2]
            ref[(1, 2, 0, 2)]=1.10114069077/(o+1.)+(-0.39988230855)+(0.0433835744927)*0.5**o
            arg[(1, 2, 0, 3)]=0.910207348899*x[0]**o + (-0.71613595969)*x[0] + (0.315269417897)*x[1]**o + (-0.470025787376)*x[1] + (0.802819642564)*x[2]**o + (0.482664158361)*x[2]
            ref[(1, 2, 0, 3)]=1.11808906046/(o+1.)+(-0.351748794352)+(0.910207348899)*0.5**o
            arg[(1, 2, 1, 0)]=-0.434411120383*x[0]**o + (-0.489686954502)*x[0] + (-0.989521560088)*x[1]**o + (0.0311859569837)*x[1] + (0.658328735776)*x[2]**o + (-0.697210394754)*x[2]
            ref[(1, 2, 1, 0)]=-0.331192824313/(o+1.)+(-0.577855696136)+(-0.434411120383)*0.5**o
            arg[(1, 2, 1, 1)]=-0.711405487837*x[0]**o + (-0.434720615713)*x[0] + (0.863225950136)*x[1]**o + (0.487870087171)*x[1] + (-0.233484218107)*x[2]**o + (0.273392781491)*x[2]
            ref[(1, 2, 1, 1)]=0.629741732029/(o+1.)+(0.163271126474)+(-0.711405487837)*0.5**o
            arg[(1, 2, 1, 2)]=-0.41665414294*x[0]**o + (-0.640445485008)*x[0] + (-0.571312422699)*x[1]**o + (-0.352712371796)*x[1] + (-0.849508579493)*x[2]**o + (-0.438988231865)*x[2]
            ref[(1, 2, 1, 2)]=-1.42082100219/(o+1.)+(-0.716073044334)+(-0.41665414294)*0.5**o
            arg[(1, 2, 1, 3)]=-0.73629870584*x[0]**o + (-0.152373018925)*x[0] + (-0.00761844828773)*x[1]**o + (-0.156809817165)*x[1] + (0.933757042655)*x[2]**o + (-0.327457214074)*x[2]
            ref[(1, 2, 1, 3)]=0.926138594368/(o+1.)+(-0.318320025082)+(-0.73629870584)*0.5**o
            arg[(2, 0, 0, 0)]=-0.789857674063*x[0]**o + (0.940366614073)*x[0] + (-0.107399172017)*x[1]**o + (0.453981368523)*x[1] + (-0.439897363361)*x[2]**o + (-0.0348311116422)*x[2]
            ref[(2, 0, 0, 0)]=-0.547296535378/(o+1.)+(0.679758435477)+(-0.789857674063)*0.5**o
            arg[(2, 0, 0, 1)]=0.937527897707*x[0]**o + (0.614739863426)*x[0] + (-0.0987644885189)*x[1]**o + (0.646624728646)*x[1] + (-0.0362401385192)*x[2]**o + (-0.135573499898)*x[2]
            ref[(2, 0, 0, 1)]=-0.135004627038/(o+1.)+(0.562895546087)+(0.937527897707)*0.5**o
            arg[(2, 0, 0, 2)]=0.492292463843*x[0]**o + (-0.44616236971)*x[0] + (0.675270949653)*x[1]**o + (-0.9061184703)*x[1] + (0.094983911178)*x[2]**o + (0.317193557109)*x[2]
            ref[(2, 0, 0, 2)]=0.770254860831/(o+1.)+(-0.517543641451)+(0.492292463843)*0.5**o
            arg[(2, 0, 0, 3)]=0.457125456225*x[0]**o + (-0.149052293349)*x[0] + (0.413475346506)*x[1]**o + (-0.984250459112)*x[1] + (0.383115840984)*x[2]**o + (0.131438713988)*x[2]
            ref[(2, 0, 0, 3)]=0.79659118749/(o+1.)+(-0.500932019236)+(0.457125456225)*0.5**o
            arg[(2, 0, 1, 0)]=-0.300478289401*x[0]**o + (-0.0249728278498)*x[0] + (0.0778342570518)*x[1]**o + (-0.761210675797)*x[1] + (-0.979320344734)*x[2]**o + (-0.658380452389)*x[2]
            ref[(2, 0, 1, 0)]=-0.901486087682/(o+1.)+(-0.722281978018)+(-0.300478289401)*0.5**o
            arg[(2, 0, 1, 1)]=-0.771671745829*x[0]**o + (-0.943532936167)*x[0] + (-0.899181896877)*x[1]**o + (0.753388270828)*x[1] + (0.0261625897929)*x[2]**o + (0.248457239932)*x[2]
            ref[(2, 0, 1, 1)]=-0.873019307084/(o+1.)+(0.029156287296)+(-0.771671745829)*0.5**o
            arg[(2, 0, 1, 2)]=0.952611127857*x[0]**o + (0.0553727168818)*x[0] + (0.0928861445062)*x[1]**o + (-0.142908546697)*x[1] + (0.00861902686834)*x[2]**o + (-0.873347684433)*x[2]
            ref[(2, 0, 1, 2)]=0.101505171375/(o+1.)+(-0.480441757124)+(0.952611127857)*0.5**o
            arg[(2, 0, 1, 3)]=-0.811738525957*x[0]**o + (-0.975246703356)*x[0] + (-0.201899890663)*x[1]**o + (0.0197706859387)*x[1] + (-0.399138528587)*x[2]**o + (-0.0790362589186)*x[2]
            ref[(2, 0, 1, 3)]=-0.60103841925/(o+1.)+(-0.517256138168)+(-0.811738525957)*0.5**o
            arg[(2, 1, 0, 0)]=0.715291664829*x[0]**o + (-0.0988844517109)*x[0] + (-0.204597427982)*x[1]**o + (-0.610256595731)*x[1] + (0.725184870918)*x[2]**o + (0.432895637708)*x[2]
            ref[(2, 1, 0, 0)]=0.520587442936/(o+1.)+(-0.138122704867)+(0.715291664829)*0.5**o
            arg[(2, 1, 0, 1)]=-0.196303775651*x[0]**o + (-0.232598069846)*x[0] + (0.641562065862)*x[1]**o + (0.978910961898)*x[1] + (0.838995934451)*x[2]**o + (0.620156964761)*x[2]
            ref[(2, 1, 0, 1)]=1.48055800031/(o+1.)+(0.683234928407)+(-0.196303775651)*0.5**o
            arg[(2, 1, 0, 2)]=0.855761345756*x[0]**o + (0.537898204117)*x[0] + (-0.747700668275)*x[1]**o + (-0.282077115867)*x[1] + (0.37065291565)*x[2]**o + (0.992144696195)*x[2]
            ref[(2, 1, 0, 2)]=-0.377047752625/(o+1.)+(0.623982892223)+(0.855761345756)*0.5**o
            arg[(2, 1, 0, 3)]=0.875801839158*x[0]**o + (0.35694752383)*x[0] + (0.201781085215)*x[1]**o + (0.591406268302)*x[1] + (0.87955650862)*x[2]**o + (-0.634975186005)*x[2]
            ref[(2, 1, 0, 3)]=1.08133759383/(o+1.)+(0.156689303064)+(0.875801839158)*0.5**o
            arg[(2, 1, 1, 0)]=0.108530502735*x[0]**o + (-0.61431878538)*x[0] + (0.390645305834)*x[1]**o + (0.145538256348)*x[1] + (-0.564880976912)*x[2]**o + (0.839563219101)*x[2]
            ref[(2, 1, 1, 0)]=-0.174235671078/(o+1.)+(0.185391345035)+(0.108530502735)*0.5**o
            arg[(2, 1, 1, 1)]=0.448977243758*x[0]**o + (0.530608907234)*x[0] + (-0.783789108209)*x[1]**o + (-0.973037582328)*x[1] + (0.659463382786)*x[2]**o + (-0.407916925096)*x[2]
            ref[(2, 1, 1, 1)]=-0.124325725423/(o+1.)+(-0.425172800095)+(0.448977243758)*0.5**o
            arg[(2, 1, 1, 2)]=0.438243090646*x[0]**o + (-0.776881552728)*x[0] + (-0.250274665864)*x[1]**o + (0.446147654527)*x[1] + (-0.902453520273)*x[2]**o + (0.589631649025)*x[2]
            ref[(2, 1, 1, 2)]=-1.15272818614/(o+1.)+(0.129448875412)+(0.438243090646)*0.5**o
            arg[(2, 1, 1, 3)]=0.260496661413*x[0]**o + (-0.596877479226)*x[0] + (0.676790686771)*x[1]**o + (-0.554567088476)*x[1] + (0.800372239146)*x[2]**o + (0.0171609010384)*x[2]
            ref[(2, 1, 1, 3)]=1.47716292592/(o+1.)+(-0.567141833332)+(0.260496661413)*0.5**o
            arg[(2, 2, 0, 0)]=0.151398800624*x[0]**o + (-0.707743954692)*x[0] + (0.683414170071)*x[1]**o + (-0.143653645237)*x[1] + (-0.285102324432)*x[2]**o + (0.243751118925)*x[2]
            ref[(2, 2, 0, 0)]=0.398311845639/(o+1.)+(-0.303823240502)+(0.151398800624)*0.5**o
            arg[(2, 2, 0, 1)]=0.0712196687354*x[0]**o + (0.464580576872)*x[0] + (-0.0682441941503)*x[1]**o + (-0.921178741346)*x[1] + (0.668153132021)*x[2]**o + (0.933912382431)*x[2]
            ref[(2, 2, 0, 1)]=0.599908937871/(o+1.)+(0.238657108978)+(0.0712196687354)*0.5**o
            arg[(2, 2, 0, 2)]=-0.0103563731911*x[0]**o + (0.237528853487)*x[0] + (0.829312431031)*x[1]**o + (0.270794873778)*x[1] + (0.168496386509)*x[2]**o + (0.164039764883)*x[2]
            ref[(2, 2, 0, 2)]=0.99780881754/(o+1.)+(0.336181746074)+(-0.0103563731911)*0.5**o
            arg[(2, 2, 0, 3)]=-0.0688724562926*x[0]**o + (0.811730079299)*x[0] + (0.742601229263)*x[1]**o + (-0.623373034783)*x[1] + (0.506929917716)*x[2]**o + (-0.10251839896)*x[2]
            ref[(2, 2, 0, 3)]=1.24953114698/(o+1.)+(0.0429193227778)+(-0.0688724562926)*0.5**o
            arg[(2, 2, 1, 0)]=0.657124279322*x[0]**o + (0.65675851385)*x[0] + (0.566809855641)*x[1]**o + (-0.223557694367)*x[1] + (0.881584562887)*x[2]**o + (-0.33324823061)*x[2]
            ref[(2, 2, 1, 0)]=1.44839441853/(o+1.)+(0.0499762944365)+(0.657124279322)*0.5**o
            arg[(2, 2, 1, 1)]=-0.259555638612*x[0]**o + (0.273786941698)*x[0] + (0.706994461638)*x[1]**o + (0.226430439807)*x[1] + (-0.509986278481)*x[2]**o + (0.425240209617)*x[2]
            ref[(2, 2, 1, 1)]=0.197008183157/(o+1.)+(0.462728795561)+(-0.259555638612)*0.5**o
            arg[(2, 2, 1, 2)]=-0.779685708199*x[0]**o + (0.538287212531)*x[0] + (0.492989946957)*x[1]**o + (0.280516159547)*x[1] + (-0.0879140448255)*x[2]**o + (-0.00290939142141)*x[2]
            ref[(2, 2, 1, 2)]=0.405075902131/(o+1.)+(0.407946990329)+(-0.779685708199)*0.5**o
            arg[(2, 2, 1, 3)]=-0.919869715625*x[0]**o + (0.832702246721)*x[0] + (0.706538992144)*x[1]**o + (0.421676360547)*x[1] + (0.321882843331)*x[2]**o + (-0.501396905903)*x[2]
            ref[(2, 2, 1, 3)]=1.02842183548/(o+1.)+(0.376490850683)+(-0.919869715625)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 3, 2, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_Solution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.175430813859*x[0]**o + (-0.802635792605)*x[0] + (-0.14802180998)*x[1]**o + (-0.70828089661)*x[1]
            ref=-0.14802180998/(o+1.)+(-0.755458344608)+(-0.175430813859)*0.5**o
        else:
            arg=-0.820289633686*x[0]**o + (-0.936186448043)*x[0] + (0.927859070952)*x[1]**o + (0.622242956914)*x[1] + (0.711234022913)*x[2]**o + (-0.941126071859)*x[2]
            ref=1.63909309386/(o+1.)+(-0.627534781494)+(-0.820289633686)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_Solution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.284951399538*x[0]**o + (0.44614799643)*x[0] + (-0.899276125431)*x[1]**o + (0.177011262792)*x[1]
            ref[(0,)]=-0.899276125431/(o+1.)+(0.311579629611)+(0.284951399538)*0.5**o
            arg[(1,)]=0.375425765063*x[0]**o + (0.137212828902)*x[0] + (0.969252470382)*x[1]**o + (0.161073268101)*x[1]
            ref[(1,)]=0.969252470382/(o+1.)+(0.149143048502)+(0.375425765063)*0.5**o
            arg[(2,)]=0.456464350475*x[0]**o + (-0.104590960139)*x[0] + (0.149997181145)*x[1]**o + (0.901498741565)*x[1]
            ref[(2,)]=0.149997181145/(o+1.)+(0.398453890713)+(0.456464350475)*0.5**o
        else:
            arg[(0,)]=0.310829136094*x[0]**o + (-0.75651674211)*x[0] + (-0.624634387174)*x[1]**o + (-0.839233179361)*x[1] + (0.640100144318)*x[2]**o + (0.548260784385)*x[2]
            ref[(0,)]=0.0154657571443/(o+1.)+(-0.523744568543)+(0.310829136094)*0.5**o
            arg[(1,)]=0.218828552365*x[0]**o + (-0.677285690281)*x[0] + (-0.787347277008)*x[1]**o + (0.145359321887)*x[1] + (-0.554590456072)*x[2]**o + (0.0528348012908)*x[2]
            ref[(1,)]=-1.34193773308/(o+1.)+(-0.239545783551)+(0.218828552365)*0.5**o
            arg[(2,)]=-0.835669082053*x[0]**o + (-0.979201599383)*x[0] + (0.347141007551)*x[1]**o + (-0.70877954186)*x[1] + (-0.0836921141763)*x[2]**o + (0.673258027544)*x[2]
            ref[(2,)]=0.263448893375/(o+1.)+(-0.507361556849)+(-0.835669082053)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_Solution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref=numpy.zeros((2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.99485617148*x[0]**o + (-0.359310275393)*x[0] + (-0.632154263033)*x[1]**o + (-0.931973163553)*x[1]
            ref[(0, 0)]=-0.632154263033/(o+1.)+(-0.645641719473)+(-0.99485617148)*0.5**o
            arg[(0, 1)]=-0.654219149928*x[0]**o + (0.351634692224)*x[0] + (-0.425004045166)*x[1]**o + (-0.160802817307)*x[1]
            ref[(0, 1)]=-0.425004045166/(o+1.)+(0.0954159374585)+(-0.654219149928)*0.5**o
            arg[(0, 2)]=-0.950476971601*x[0]**o + (-0.594713808624)*x[0] + (-0.232752538391)*x[1]**o + (0.440513689855)*x[1]
            ref[(0, 2)]=-0.232752538391/(o+1.)+(-0.0771000593847)+(-0.950476971601)*0.5**o
            arg[(1, 0)]=-0.602877815336*x[0]**o + (0.791941440854)*x[0] + (0.346364000358)*x[1]**o + (0.753101924853)*x[1]
            ref[(1, 0)]=0.346364000358/(o+1.)+(0.772521682854)+(-0.602877815336)*0.5**o
            arg[(1, 1)]=0.311512658761*x[0]**o + (-0.151623406961)*x[0] + (0.569120369779)*x[1]**o + (-0.882811968672)*x[1]
            ref[(1, 1)]=0.569120369779/(o+1.)+(-0.517217687816)+(0.311512658761)*0.5**o
            arg[(1, 2)]=0.685914713259*x[0]**o + (0.449647263669)*x[0] + (-0.348360995353)*x[1]**o + (-0.358191984633)*x[1]
            ref[(1, 2)]=-0.348360995353/(o+1.)+(0.0457276395182)+(0.685914713259)*0.5**o
        else:
            arg[(0, 0)]=0.898264744718*x[0]**o + (-0.775819683236)*x[0] + (-0.316404873775)*x[1]**o + (-0.902138110748)*x[1] + (-0.169141228098)*x[2]**o + (0.681759846497)*x[2]
            ref[(0, 0)]=-0.485546101873/(o+1.)+(-0.498098973743)+(0.898264744718)*0.5**o
            arg[(0, 1)]=-0.0294192421232*x[0]**o + (-0.0233166115127)*x[0] + (-0.0569078624746)*x[1]**o + (0.941955753767)*x[1] + (-0.819573834241)*x[2]**o + (0.170380432949)*x[2]
            ref[(0, 1)]=-0.876481696716/(o+1.)+(0.544509787601)+(-0.0294192421232)*0.5**o
            arg[(0, 2)]=-0.292122334637*x[0]**o + (0.117565289466)*x[0] + (-0.846487110491)*x[1]**o + (0.670161946921)*x[1] + (0.981796053723)*x[2]**o + (0.0671648591744)*x[2]
            ref[(0, 2)]=0.135308943232/(o+1.)+(0.42744604778)+(-0.292122334637)*0.5**o
            arg[(1, 0)]=-0.994922941914*x[0]**o + (-0.787083415498)*x[0] + (-0.552585130824)*x[1]**o + (0.9160665604)*x[1] + (-0.569742764498)*x[2]**o + (0.6205687866)*x[2]
            ref[(1, 0)]=-1.12232789532/(o+1.)+(0.374775965751)+(-0.994922941914)*0.5**o
            arg[(1, 1)]=-0.62615493464*x[0]**o + (-0.459783868163)*x[0] + (-0.0511908067036)*x[1]**o + (0.0210407295623)*x[1] + (0.0439200520236)*x[2]**o + (0.520954860127)*x[2]
            ref[(1, 1)]=-0.00727075467996/(o+1.)+(0.0411058607632)+(-0.62615493464)*0.5**o
            arg[(1, 2)]=0.513850710241*x[0]**o + (-0.555356259638)*x[0] + (0.507709783903)*x[1]**o + (-0.392757607215)*x[1] + (-0.0336658654749)*x[2]**o + (0.856139669453)*x[2]
            ref[(1, 2)]=0.474043918429/(o+1.)+(-0.0459870986999)+(0.513850710241)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_Solution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4),w)
        ref=numpy.zeros((3, 4, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.246104066537*x[0]**o + (0.188009949513)*x[0] + (0.0619561280076)*x[1]**o + (-0.949600004077)*x[1]
            ref[(0, 0, 0)]=0.0619561280076/(o+1.)+(-0.380795027282)+(-0.246104066537)*0.5**o
            arg[(0, 0, 1)]=0.619474821431*x[0]**o + (-0.281235108884)*x[0] + (-0.016792769826)*x[1]**o + (0.562744067792)*x[1]
            ref[(0, 0, 1)]=-0.016792769826/(o+1.)+(0.140754479454)+(0.619474821431)*0.5**o
            arg[(0, 0, 2)]=-0.432210189277*x[0]**o + (-0.46640712124)*x[0] + (0.576340754067)*x[1]**o + (0.349594276122)*x[1]
            ref[(0, 0, 2)]=0.576340754067/(o+1.)+(-0.0584064225592)+(-0.432210189277)*0.5**o
            arg[(0, 0, 3)]=0.952286805686*x[0]**o + (0.783021289395)*x[0] + (-0.606487239131)*x[1]**o + (-0.0295540942753)*x[1]
            ref[(0, 0, 3)]=-0.606487239131/(o+1.)+(0.37673359756)+(0.952286805686)*0.5**o
            arg[(0, 1, 0)]=0.150422304235*x[0]**o + (0.262878612264)*x[0] + (0.612398110295)*x[1]**o + (0.649889173809)*x[1]
            ref[(0, 1, 0)]=0.612398110295/(o+1.)+(0.456383893037)+(0.150422304235)*0.5**o
            arg[(0, 1, 1)]=0.177587080104*x[0]**o + (0.17256696461)*x[0] + (0.971089612107)*x[1]**o + (0.813771938317)*x[1]
            ref[(0, 1, 1)]=0.971089612107/(o+1.)+(0.493169451463)+(0.177587080104)*0.5**o
            arg[(0, 1, 2)]=-0.192466267345*x[0]**o + (0.773272339914)*x[0] + (-0.506534723709)*x[1]**o + (0.704457335354)*x[1]
            ref[(0, 1, 2)]=-0.506534723709/(o+1.)+(0.738864837634)+(-0.192466267345)*0.5**o
            arg[(0, 1, 3)]=-0.274279735506*x[0]**o + (-0.291831201033)*x[0] + (0.120341156305)*x[1]**o + (0.247007937252)*x[1]
            ref[(0, 1, 3)]=0.120341156305/(o+1.)+(-0.0224116318902)+(-0.274279735506)*0.5**o
            arg[(0, 2, 0)]=0.0753829610682*x[0]**o + (-0.688813725857)*x[0] + (0.0483025059122)*x[1]**o + (0.972756011065)*x[1]
            ref[(0, 2, 0)]=0.0483025059122/(o+1.)+(0.141971142604)+(0.0753829610682)*0.5**o
            arg[(0, 2, 1)]=-0.184796730184*x[0]**o + (-0.0122451930266)*x[0] + (0.886458307386)*x[1]**o + (0.882044887797)*x[1]
            ref[(0, 2, 1)]=0.886458307386/(o+1.)+(0.434899847385)+(-0.184796730184)*0.5**o
            arg[(0, 2, 2)]=0.344421245034*x[0]**o + (0.471821101167)*x[0] + (-0.660769214524)*x[1]**o + (-0.867360106427)*x[1]
            ref[(0, 2, 2)]=-0.660769214524/(o+1.)+(-0.19776950263)+(0.344421245034)*0.5**o
            arg[(0, 2, 3)]=-0.462310526267*x[0]**o + (0.851765670601)*x[0] + (0.29999594612)*x[1]**o + (-0.385229551154)*x[1]
            ref[(0, 2, 3)]=0.29999594612/(o+1.)+(0.233268059724)+(-0.462310526267)*0.5**o
            arg[(0, 3, 0)]=0.044209386296*x[0]**o + (-0.706291711233)*x[0] + (-0.899387743002)*x[1]**o + (0.39637253226)*x[1]
            ref[(0, 3, 0)]=-0.899387743002/(o+1.)+(-0.154959589487)+(0.044209386296)*0.5**o
            arg[(0, 3, 1)]=-0.727637508354*x[0]**o + (-0.086348724871)*x[0] + (-0.627769370685)*x[1]**o + (0.460084980641)*x[1]
            ref[(0, 3, 1)]=-0.627769370685/(o+1.)+(0.186868127885)+(-0.727637508354)*0.5**o
            arg[(0, 3, 2)]=-0.443429108958*x[0]**o + (-0.136707108818)*x[0] + (0.132385925318)*x[1]**o + (-0.802288682449)*x[1]
            ref[(0, 3, 2)]=0.132385925318/(o+1.)+(-0.469497895634)+(-0.443429108958)*0.5**o
            arg[(0, 3, 3)]=0.857706067853*x[0]**o + (0.509298050744)*x[0] + (0.14121017113)*x[1]**o + (0.0171122678674)*x[1]
            ref[(0, 3, 3)]=0.14121017113/(o+1.)+(0.263205159306)+(0.857706067853)*0.5**o
            arg[(1, 0, 0)]=0.381982942888*x[0]**o + (0.384021648018)*x[0] + (-0.276224011671)*x[1]**o + (-0.977610983166)*x[1]
            ref[(1, 0, 0)]=-0.276224011671/(o+1.)+(-0.296794667574)+(0.381982942888)*0.5**o
            arg[(1, 0, 1)]=0.773189001698*x[0]**o + (-0.436957178682)*x[0] + (-0.107031515224)*x[1]**o + (0.412923278225)*x[1]
            ref[(1, 0, 1)]=-0.107031515224/(o+1.)+(-0.0120169502287)+(0.773189001698)*0.5**o
            arg[(1, 0, 2)]=-0.0312029277909*x[0]**o + (-0.238080906978)*x[0] + (0.367060197466)*x[1]**o + (0.276183436053)*x[1]
            ref[(1, 0, 2)]=0.367060197466/(o+1.)+(0.0190512645376)+(-0.0312029277909)*0.5**o
            arg[(1, 0, 3)]=-0.380297343448*x[0]**o + (0.801046906152)*x[0] + (-0.909626358632)*x[1]**o + (-0.104714496121)*x[1]
            ref[(1, 0, 3)]=-0.909626358632/(o+1.)+(0.348166205016)+(-0.380297343448)*0.5**o
            arg[(1, 1, 0)]=-0.368783894852*x[0]**o + (0.224341662262)*x[0] + (-0.67049434806)*x[1]**o + (0.809593883379)*x[1]
            ref[(1, 1, 0)]=-0.67049434806/(o+1.)+(0.516967772821)+(-0.368783894852)*0.5**o
            arg[(1, 1, 1)]=-0.315003665605*x[0]**o + (0.151767413985)*x[0] + (-0.700125894701)*x[1]**o + (0.338610967703)*x[1]
            ref[(1, 1, 1)]=-0.700125894701/(o+1.)+(0.245189190844)+(-0.315003665605)*0.5**o
            arg[(1, 1, 2)]=0.394527351259*x[0]**o + (-0.379728052681)*x[0] + (-0.089949999774)*x[1]**o + (-0.940312314624)*x[1]
            ref[(1, 1, 2)]=-0.089949999774/(o+1.)+(-0.660020183652)+(0.394527351259)*0.5**o
            arg[(1, 1, 3)]=-0.301241689564*x[0]**o + (0.776984712181)*x[0] + (-0.195364274893)*x[1]**o + (-0.616889459302)*x[1]
            ref[(1, 1, 3)]=-0.195364274893/(o+1.)+(0.0800476264395)+(-0.301241689564)*0.5**o
            arg[(1, 2, 0)]=0.0946616427883*x[0]**o + (-0.307621103156)*x[0] + (0.607618812073)*x[1]**o + (0.591670239403)*x[1]
            ref[(1, 2, 0)]=0.607618812073/(o+1.)+(0.142024568123)+(0.0946616427883)*0.5**o
            arg[(1, 2, 1)]=0.485793172303*x[0]**o + (-0.672938695682)*x[0] + (0.907365833536)*x[1]**o + (0.933298682909)*x[1]
            ref[(1, 2, 1)]=0.907365833536/(o+1.)+(0.130179993614)+(0.485793172303)*0.5**o
            arg[(1, 2, 2)]=0.457315473399*x[0]**o + (-0.929529682755)*x[0] + (-0.670528104915)*x[1]**o + (0.33202062481)*x[1]
            ref[(1, 2, 2)]=-0.670528104915/(o+1.)+(-0.298754528973)+(0.457315473399)*0.5**o
            arg[(1, 2, 3)]=0.162672807224*x[0]**o + (-0.784904967393)*x[0] + (0.826852685047)*x[1]**o + (0.523113636964)*x[1]
            ref[(1, 2, 3)]=0.826852685047/(o+1.)+(-0.130895665215)+(0.162672807224)*0.5**o
            arg[(1, 3, 0)]=0.0503077927732*x[0]**o + (0.80519753555)*x[0] + (0.725446937486)*x[1]**o + (0.897948257808)*x[1]
            ref[(1, 3, 0)]=0.725446937486/(o+1.)+(0.851572896679)+(0.0503077927732)*0.5**o
            arg[(1, 3, 1)]=-0.618528871408*x[0]**o + (-0.214413286891)*x[0] + (0.477263908375)*x[1]**o + (0.66740826537)*x[1]
            ref[(1, 3, 1)]=0.477263908375/(o+1.)+(0.226497489239)+(-0.618528871408)*0.5**o
            arg[(1, 3, 2)]=-0.446580258394*x[0]**o + (-0.91756783309)*x[0] + (-0.901191389736)*x[1]**o + (0.740605527923)*x[1]
            ref[(1, 3, 2)]=-0.901191389736/(o+1.)+(-0.0884811525831)+(-0.446580258394)*0.5**o
            arg[(1, 3, 3)]=0.89002307667*x[0]**o + (0.716792930458)*x[0] + (-0.52948772062)*x[1]**o + (-0.366412693718)*x[1]
            ref[(1, 3, 3)]=-0.52948772062/(o+1.)+(0.17519011837)+(0.89002307667)*0.5**o
            arg[(2, 0, 0)]=0.597938510837*x[0]**o + (0.246426711022)*x[0] + (-0.739889745261)*x[1]**o + (-0.850442974969)*x[1]
            ref[(2, 0, 0)]=-0.739889745261/(o+1.)+(-0.302008131973)+(0.597938510837)*0.5**o
            arg[(2, 0, 1)]=-0.800190765757*x[0]**o + (-0.79656477337)*x[0] + (-0.153090633883)*x[1]**o + (0.0800386031189)*x[1]
            ref[(2, 0, 1)]=-0.153090633883/(o+1.)+(-0.358263085126)+(-0.800190765757)*0.5**o
            arg[(2, 0, 2)]=0.430390325343*x[0]**o + (0.911432217544)*x[0] + (-0.670375167237)*x[1]**o + (-0.861063313577)*x[1]
            ref[(2, 0, 2)]=-0.670375167237/(o+1.)+(0.0251844519837)+(0.430390325343)*0.5**o
            arg[(2, 0, 3)]=-0.153728162635*x[0]**o + (0.882449495545)*x[0] + (-0.189410074672)*x[1]**o + (-0.975444649149)*x[1]
            ref[(2, 0, 3)]=-0.189410074672/(o+1.)+(-0.0464975768017)+(-0.153728162635)*0.5**o
            arg[(2, 1, 0)]=0.975724238332*x[0]**o + (0.858206427189)*x[0] + (-0.821959795789)*x[1]**o + (0.341708103264)*x[1]
            ref[(2, 1, 0)]=-0.821959795789/(o+1.)+(0.599957265227)+(0.975724238332)*0.5**o
            arg[(2, 1, 1)]=-0.146799859519*x[0]**o + (-0.452398734186)*x[0] + (-0.568525478194)*x[1]**o + (-0.801922543111)*x[1]
            ref[(2, 1, 1)]=-0.568525478194/(o+1.)+(-0.627160638649)+(-0.146799859519)*0.5**o
            arg[(2, 1, 2)]=0.89922222759*x[0]**o + (0.8103589751)*x[0] + (0.229187811918)*x[1]**o + (0.126193526008)*x[1]
            ref[(2, 1, 2)]=0.229187811918/(o+1.)+(0.468276250554)+(0.89922222759)*0.5**o
            arg[(2, 1, 3)]=-0.0502865332624*x[0]**o + (-0.777042175189)*x[0] + (0.966718205837)*x[1]**o + (-0.524854248675)*x[1]
            ref[(2, 1, 3)]=0.966718205837/(o+1.)+(-0.650948211932)+(-0.0502865332624)*0.5**o
            arg[(2, 2, 0)]=-0.818766154671*x[0]**o + (-0.461255752746)*x[0] + (0.511089548254)*x[1]**o + (-0.445887383396)*x[1]
            ref[(2, 2, 0)]=0.511089548254/(o+1.)+(-0.453571568071)+(-0.818766154671)*0.5**o
            arg[(2, 2, 1)]=-0.298089862062*x[0]**o + (-0.511141533429)*x[0] + (-0.551379254507)*x[1]**o + (-0.0725659943955)*x[1]
            ref[(2, 2, 1)]=-0.551379254507/(o+1.)+(-0.291853763912)+(-0.298089862062)*0.5**o
            arg[(2, 2, 2)]=0.3189868228*x[0]**o + (0.0845019974651)*x[0] + (0.503926156949)*x[1]**o + (-0.402177851612)*x[1]
            ref[(2, 2, 2)]=0.503926156949/(o+1.)+(-0.158837927073)+(0.3189868228)*0.5**o
            arg[(2, 2, 3)]=0.878799126392*x[0]**o + (0.157624537969)*x[0] + (0.320565237796)*x[1]**o + (-0.0293992664081)*x[1]
            ref[(2, 2, 3)]=0.320565237796/(o+1.)+(0.0641126357806)+(0.878799126392)*0.5**o
            arg[(2, 3, 0)]=0.809581199187*x[0]**o + (0.42386785159)*x[0] + (-0.661435678962)*x[1]**o + (0.566970317567)*x[1]
            ref[(2, 3, 0)]=-0.661435678962/(o+1.)+(0.495419084579)+(0.809581199187)*0.5**o
            arg[(2, 3, 1)]=0.396170658567*x[0]**o + (0.169702573474)*x[0] + (-0.300586379393)*x[1]**o + (-0.466820908641)*x[1]
            ref[(2, 3, 1)]=-0.300586379393/(o+1.)+(-0.148559167584)+(0.396170658567)*0.5**o
            arg[(2, 3, 2)]=-0.996986205656*x[0]**o + (-0.959343494958)*x[0] + (0.871432977664)*x[1]**o + (-0.485156816614)*x[1]
            ref[(2, 3, 2)]=0.871432977664/(o+1.)+(-0.722250155786)+(-0.996986205656)*0.5**o
            arg[(2, 3, 3)]=-0.500128244065*x[0]**o + (-0.283174223223)*x[0] + (-0.51591109315)*x[1]**o + (0.492849116592)*x[1]
            ref[(2, 3, 3)]=-0.51591109315/(o+1.)+(0.104837446685)+(-0.500128244065)*0.5**o
        else:
            arg[(0, 0, 0)]=-0.946718525427*x[0]**o + (0.991386936366)*x[0] + (-0.990858227893)*x[1]**o + (0.960456084743)*x[1] + (-0.298081414278)*x[2]**o + (0.837767037815)*x[2]
            ref[(0, 0, 0)]=-1.28893964217/(o+1.)+(1.39480502946)+(-0.946718525427)*0.5**o
            arg[(0, 0, 1)]=-0.0283400276994*x[0]**o + (0.550286812748)*x[0] + (0.956634496291)*x[1]**o + (-0.123707416119)*x[1] + (0.303637881705)*x[2]**o + (-0.651043200443)*x[2]
            ref[(0, 0, 1)]=1.260272378/(o+1.)+(-0.112231901907)+(-0.0283400276994)*0.5**o
            arg[(0, 0, 2)]=0.145042650058*x[0]**o + (0.623028174875)*x[0] + (-0.295588077949)*x[1]**o + (-0.349809566783)*x[1] + (-0.207047049394)*x[2]**o + (0.806488928306)*x[2]
            ref[(0, 0, 2)]=-0.502635127343/(o+1.)+(0.539853768199)+(0.145042650058)*0.5**o
            arg[(0, 0, 3)]=-0.162485014824*x[0]**o + (0.923381579911)*x[0] + (-0.451050615727)*x[1]**o + (-0.052232923427)*x[1] + (0.685176844529)*x[2]**o + (0.494629117311)*x[2]
            ref[(0, 0, 3)]=0.234126228802/(o+1.)+(0.682888886897)+(-0.162485014824)*0.5**o
            arg[(0, 1, 0)]=0.059468421703*x[0]**o + (0.745761056671)*x[0] + (-0.201968425926)*x[1]**o + (-0.479508320839)*x[1] + (-0.0424389591233)*x[2]**o + (-0.0829063133595)*x[2]
            ref[(0, 1, 0)]=-0.244407385049/(o+1.)+(0.0916732112361)+(0.059468421703)*0.5**o
            arg[(0, 1, 1)]=-0.510230001787*x[0]**o + (-0.556762138533)*x[0] + (0.162664836245)*x[1]**o + (0.154987664325)*x[1] + (-0.741973844075)*x[2]**o + (0.985638964931)*x[2]
            ref[(0, 1, 1)]=-0.579309007829/(o+1.)+(0.291932245362)+(-0.510230001787)*0.5**o
            arg[(0, 1, 2)]=-0.807732831171*x[0]**o + (-0.788364016533)*x[0] + (0.138564624173)*x[1]**o + (-0.0715623114549)*x[1] + (-0.235285250433)*x[2]**o + (-0.360347005027)*x[2]
            ref[(0, 1, 2)]=-0.0967206262598/(o+1.)+(-0.610136666507)+(-0.807732831171)*0.5**o
            arg[(0, 1, 3)]=0.679372064088*x[0]**o + (-0.587891225496)*x[0] + (-0.423693367004)*x[1]**o + (0.632871666736)*x[1] + (-0.637321457166)*x[2]**o + (-0.238232129172)*x[2]
            ref[(0, 1, 3)]=-1.06101482417/(o+1.)+(-0.0966258439662)+(0.679372064088)*0.5**o
            arg[(0, 2, 0)]=-0.780813821748*x[0]**o + (-0.156314349489)*x[0] + (0.519952148839)*x[1]**o + (-0.953159875701)*x[1] + (0.954992907271)*x[2]**o + (0.604881101294)*x[2]
            ref[(0, 2, 0)]=1.47494505611/(o+1.)+(-0.252296561948)+(-0.780813821748)*0.5**o
            arg[(0, 2, 1)]=-0.280928134102*x[0]**o + (-0.391575081203)*x[0] + (-0.46355623723)*x[1]**o + (0.932990365764)*x[1] + (-0.75478778546)*x[2]**o + (-0.717845281588)*x[2]
            ref[(0, 2, 1)]=-1.21834402269/(o+1.)+(-0.0882149985132)+(-0.280928134102)*0.5**o
            arg[(0, 2, 2)]=-0.226446174881*x[0]**o + (-0.244834535207)*x[0] + (-0.60919723226)*x[1]**o + (0.297409799817)*x[1] + (-0.0702590062844)*x[2]**o + (-0.0339588847213)*x[2]
            ref[(0, 2, 2)]=-0.679456238545/(o+1.)+(0.00930818994461)+(-0.226446174881)*0.5**o
            arg[(0, 2, 3)]=0.699128128248*x[0]**o + (-0.43473733335)*x[0] + (-0.891656229546)*x[1]**o + (-0.77823563975)*x[1] + (0.6177181206)*x[2]**o + (-0.783436604338)*x[2]
            ref[(0, 2, 3)]=-0.273938108946/(o+1.)+(-0.998204788718)+(0.699128128248)*0.5**o
            arg[(0, 3, 0)]=0.642541875313*x[0]**o + (0.822552525226)*x[0] + (-0.993558664352)*x[1]**o + (0.8623402762)*x[1] + (0.888151822104)*x[2]**o + (-0.0570863141207)*x[2]
            ref[(0, 3, 0)]=-0.105406842247/(o+1.)+(0.813903243653)+(0.642541875313)*0.5**o
            arg[(0, 3, 1)]=0.606648369018*x[0]**o + (0.899701597931)*x[0] + (-0.030377514575)*x[1]**o + (0.12506638451)*x[1] + (0.0014463607446)*x[2]**o + (0.652796585847)*x[2]
            ref[(0, 3, 1)]=-0.0289311538304/(o+1.)+(0.838782284144)+(0.606648369018)*0.5**o
            arg[(0, 3, 2)]=0.595022728939*x[0]**o + (0.0807542940823)*x[0] + (0.478967343068)*x[1]**o + (-0.421329420857)*x[1] + (-0.478425394722)*x[2]**o + (-0.475661186974)*x[2]
            ref[(0, 3, 2)]=0.000541948346541/(o+1.)+(-0.408118156874)+(0.595022728939)*0.5**o
            arg[(0, 3, 3)]=-0.630653451898*x[0]**o + (-0.289261057037)*x[0] + (-0.921854521697)*x[1]**o + (-0.674525089561)*x[1] + (-0.787171002022)*x[2]**o + (-0.787812097261)*x[2]
            ref[(0, 3, 3)]=-1.70902552372/(o+1.)+(-0.875799121929)+(-0.630653451898)*0.5**o
            arg[(1, 0, 0)]=0.0878688733052*x[0]**o + (0.375142191123)*x[0] + (-0.734391488754)*x[1]**o + (0.0370624956131)*x[1] + (0.798062371682)*x[2]**o + (-0.00373458686648)*x[2]
            ref[(1, 0, 0)]=0.0636708829275/(o+1.)+(0.204235049935)+(0.0878688733052)*0.5**o
            arg[(1, 0, 1)]=-0.148042949677*x[0]**o + (-0.903537061028)*x[0] + (-0.683574199874)*x[1]**o + (-0.413079715736)*x[1] + (-0.622016833211)*x[2]**o + (0.0681639816131)*x[2]
            ref[(1, 0, 1)]=-1.30559103309/(o+1.)+(-0.624226397575)+(-0.148042949677)*0.5**o
            arg[(1, 0, 2)]=-0.197773133756*x[0]**o + (0.356290396909)*x[0] + (-0.464790817751)*x[1]**o + (0.977039116741)*x[1] + (0.398899007785)*x[2]**o + (-0.0967755203674)*x[2]
            ref[(1, 0, 2)]=-0.0658918099662/(o+1.)+(0.618276996641)+(-0.197773133756)*0.5**o
            arg[(1, 0, 3)]=-0.915405113254*x[0]**o + (-0.915759586533)*x[0] + (-0.32101896577)*x[1]**o + (0.197687594206)*x[1] + (0.163096924171)*x[2]**o + (-0.545086204885)*x[2]
            ref[(1, 0, 3)]=-0.157922041599/(o+1.)+(-0.631579098606)+(-0.915405113254)*0.5**o
            arg[(1, 1, 0)]=-0.171337052444*x[0]**o + (-0.324855940606)*x[0] + (-0.491102744845)*x[1]**o + (0.295084158727)*x[1] + (0.450228465608)*x[2]**o + (-0.620596571109)*x[2]
            ref[(1, 1, 0)]=-0.0408742792366/(o+1.)+(-0.325184176494)+(-0.171337052444)*0.5**o
            arg[(1, 1, 1)]=-0.326161880988*x[0]**o + (-0.650782266143)*x[0] + (0.878320742862)*x[1]**o + (0.697626620755)*x[1] + (0.696651593453)*x[2]**o + (-0.666141835138)*x[2]
            ref[(1, 1, 1)]=1.57497233631/(o+1.)+(-0.309648740263)+(-0.326161880988)*0.5**o
            arg[(1, 1, 2)]=0.535448741416*x[0]**o + (-0.283089371141)*x[0] + (-0.766903975399)*x[1]**o + (-0.860543002472)*x[1] + (-0.648388048679)*x[2]**o + (0.714186497305)*x[2]
            ref[(1, 1, 2)]=-1.41529202408/(o+1.)+(-0.214722938154)+(0.535448741416)*0.5**o
            arg[(1, 1, 3)]=0.298922608535*x[0]**o + (-0.733952631575)*x[0] + (0.488174215988)*x[1]**o + (-0.191989512136)*x[1] + (0.191440887531)*x[2]**o + (-0.442148356916)*x[2]
            ref[(1, 1, 3)]=0.679615103519/(o+1.)+(-0.684045250314)+(0.298922608535)*0.5**o
            arg[(1, 2, 0)]=0.646140414053*x[0]**o + (0.74294190113)*x[0] + (-0.95599800186)*x[1]**o + (0.0653640405405)*x[1] + (0.341396743813)*x[2]**o + (0.125530023966)*x[2]
            ref[(1, 2, 0)]=-0.614601258048/(o+1.)+(0.466917982818)+(0.646140414053)*0.5**o
            arg[(1, 2, 1)]=-0.00180655898738*x[0]**o + (0.113268783178)*x[0] + (-0.191866556048)*x[1]**o + (-0.658143096804)*x[1] + (-0.362117848763)*x[2]**o + (-0.995633246648)*x[2]
            ref[(1, 2, 1)]=-0.553984404811/(o+1.)+(-0.770253780137)+(-0.00180655898738)*0.5**o
            arg[(1, 2, 2)]=0.483371848456*x[0]**o + (-0.688961652956)*x[0] + (-0.129473399445)*x[1]**o + (-0.277368989776)*x[1] + (-0.36405014997)*x[2]**o + (-0.931148184016)*x[2]
            ref[(1, 2, 2)]=-0.493523549414/(o+1.)+(-0.948739413374)+(0.483371848456)*0.5**o
            arg[(1, 2, 3)]=-0.273688254626*x[0]**o + (0.21438146656)*x[0] + (0.82545392862)*x[1]**o + (-0.685422582917)*x[1] + (-0.562825210818)*x[2]**o + (0.579502773586)*x[2]
            ref[(1, 2, 3)]=0.262628717802/(o+1.)+(0.0542308286139)+(-0.273688254626)*0.5**o
            arg[(1, 3, 0)]=0.060049456139*x[0]**o + (-0.466114796637)*x[0] + (0.619370797748)*x[1]**o + (-0.439194629006)*x[1] + (0.817881313854)*x[2]**o + (0.603427085797)*x[2]
            ref[(1, 3, 0)]=1.4372521116/(o+1.)+(-0.150941169923)+(0.060049456139)*0.5**o
            arg[(1, 3, 1)]=0.232288149847*x[0]**o + (0.23926411168)*x[0] + (-0.58784623739)*x[1]**o + (-0.951456331747)*x[1] + (-0.958074696129)*x[2]**o + (-0.880077327925)*x[2]
            ref[(1, 3, 1)]=-1.54592093352/(o+1.)+(-0.796134773996)+(0.232288149847)*0.5**o
            arg[(1, 3, 2)]=0.8880567636*x[0]**o + (0.651485409095)*x[0] + (0.223842766668)*x[1]**o + (0.2493259721)*x[1] + (-0.0140443946721)*x[2]**o + (-0.0535576125229)*x[2]
            ref[(1, 3, 2)]=0.209798371996/(o+1.)+(0.423626884336)+(0.8880567636)*0.5**o
            arg[(1, 3, 3)]=-0.252693633924*x[0]**o + (-0.230959877784)*x[0] + (0.330557717907)*x[1]**o + (-0.806629490855)*x[1] + (-0.0924053952746)*x[2]**o + (0.719226616619)*x[2]
            ref[(1, 3, 3)]=0.238152322632/(o+1.)+(-0.15918137601)+(-0.252693633924)*0.5**o
            arg[(2, 0, 0)]=-0.669089166116*x[0]**o + (-0.963878994329)*x[0] + (0.460493267485)*x[1]**o + (0.937747187773)*x[1] + (0.775159062734)*x[2]**o + (0.95558123442)*x[2]
            ref[(2, 0, 0)]=1.23565233022/(o+1.)+(0.464724713932)+(-0.669089166116)*0.5**o
            arg[(2, 0, 1)]=0.0833705805453*x[0]**o + (0.123048104178)*x[0] + (0.0882486762621)*x[1]**o + (0.505062487275)*x[1] + (-0.343844530818)*x[2]**o + (0.193647096641)*x[2]
            ref[(2, 0, 1)]=-0.255595854555/(o+1.)+(0.410878844047)+(0.0833705805453)*0.5**o
            arg[(2, 0, 2)]=0.0618072900039*x[0]**o + (-0.224398350386)*x[0] + (-0.0293389420431)*x[1]**o + (-0.0201860697703)*x[1] + (0.396954062302)*x[2]**o + (0.80357315633)*x[2]
            ref[(2, 0, 2)]=0.367615120259/(o+1.)+(0.279494368087)+(0.0618072900039)*0.5**o
            arg[(2, 0, 3)]=0.851998921977*x[0]**o + (0.310704045033)*x[0] + (0.0660044551322)*x[1]**o + (0.32029121467)*x[1] + (0.631368156315)*x[2]**o + (0.345733277408)*x[2]
            ref[(2, 0, 3)]=0.697372611447/(o+1.)+(0.488364268556)+(0.851998921977)*0.5**o
            arg[(2, 1, 0)]=-0.392322015994*x[0]**o + (0.135211227412)*x[0] + (-0.543849176009)*x[1]**o + (-0.601206455219)*x[1] + (-0.43911918757)*x[2]**o + (-0.116456777102)*x[2]
            ref[(2, 1, 0)]=-0.982968363579/(o+1.)+(-0.291226002455)+(-0.392322015994)*0.5**o
            arg[(2, 1, 1)]=0.133973218149*x[0]**o + (-0.0994602118658)*x[0] + (0.157198034327)*x[1]**o + (0.887645649682)*x[1] + (-0.751175880285)*x[2]**o + (0.103959529281)*x[2]
            ref[(2, 1, 1)]=-0.593977845958/(o+1.)+(0.446072483548)+(0.133973218149)*0.5**o
            arg[(2, 1, 2)]=-0.649752481397*x[0]**o + (-0.419284790301)*x[0] + (-0.96130558193)*x[1]**o + (-0.5183607798)*x[1] + (0.326245706348)*x[2]**o + (0.935655580957)*x[2]
            ref[(2, 1, 2)]=-0.635059875582/(o+1.)+(-0.000994994571941)+(-0.649752481397)*0.5**o
            arg[(2, 1, 3)]=-0.227625399425*x[0]**o + (0.228813204111)*x[0] + (-0.493528985757)*x[1]**o + (0.707151586362)*x[1] + (-0.75618037709)*x[2]**o + (-0.395882995461)*x[2]
            ref[(2, 1, 3)]=-1.24970936285/(o+1.)+(0.270040897506)+(-0.227625399425)*0.5**o
            arg[(2, 2, 0)]=-0.617172119655*x[0]**o + (-0.163228021358)*x[0] + (-0.427594189007)*x[1]**o + (0.792391601291)*x[1] + (0.824489826513)*x[2]**o + (0.950559074551)*x[2]
            ref[(2, 2, 0)]=0.396895637506/(o+1.)+(0.789861327242)+(-0.617172119655)*0.5**o
            arg[(2, 2, 1)]=-0.847470359138*x[0]**o + (0.443843023453)*x[0] + (-0.719226638634)*x[1]**o + (-0.509291379376)*x[1] + (-0.8048631935)*x[2]**o + (0.784491529282)*x[2]
            ref[(2, 2, 1)]=-1.52408983213/(o+1.)+(0.35952158668)+(-0.847470359138)*0.5**o
            arg[(2, 2, 2)]=0.211288604884*x[0]**o + (-0.832985027675)*x[0] + (-0.602061010696)*x[1]**o + (-0.132591865677)*x[1] + (0.684878516325)*x[2]**o + (0.466235226832)*x[2]
            ref[(2, 2, 2)]=0.0828175056296/(o+1.)+(-0.24967083326)+(0.211288604884)*0.5**o
            arg[(2, 2, 3)]=-0.72880812469*x[0]**o + (0.371822966205)*x[0] + (-0.807422063745)*x[1]**o + (0.914124897957)*x[1] + (-0.222072313056)*x[2]**o + (0.897736392844)*x[2]
            ref[(2, 2, 3)]=-1.0294943768/(o+1.)+(1.0918421285)+(-0.72880812469)*0.5**o
            arg[(2, 3, 0)]=0.881310350259*x[0]**o + (-0.393857167632)*x[0] + (-0.295867096712)*x[1]**o + (-0.0287302441734)*x[1] + (0.994235724808)*x[2]**o + (0.295841396474)*x[2]
            ref[(2, 3, 0)]=0.698368628096/(o+1.)+(-0.0633730076659)+(0.881310350259)*0.5**o
            arg[(2, 3, 1)]=0.155122279574*x[0]**o + (-0.288543580864)*x[0] + (0.0143530509979)*x[1]**o + (0.0873911302307)*x[1] + (-0.990427215256)*x[2]**o + (0.409336065482)*x[2]
            ref[(2, 3, 1)]=-0.976074164259/(o+1.)+(0.104091807424)+(0.155122279574)*0.5**o
            arg[(2, 3, 2)]=0.500275614316*x[0]**o + (0.35110742781)*x[0] + (-0.841478722708)*x[1]**o + (0.216688524909)*x[1] + (0.977379652609)*x[2]**o + (-0.517136731463)*x[2]
            ref[(2, 3, 2)]=0.1359009299/(o+1.)+(0.0253296106283)+(0.500275614316)*0.5**o
            arg[(2, 3, 3)]=-0.531009983059*x[0]**o + (0.674923823221)*x[0] + (0.234724131388)*x[1]**o + (-0.0597764659185)*x[1] + (0.833318699052)*x[2]**o + (0.511151213617)*x[2]
            ref[(2, 3, 3)]=1.06804283044/(o+1.)+(0.56314928546)+(-0.531009983059)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_Solution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: Solution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = Solution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 2, 3),w)
        ref=numpy.zeros((3, 2, 2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.382027825519*x[0]**o + (-0.465378884855)*x[0] + (-0.146916026612)*x[1]**o + (-0.609536418558)*x[1]
            ref[(0, 0, 0, 0)]=-0.146916026612/(o+1.)+(-0.537457651706)+(0.382027825519)*0.5**o
            arg[(0, 0, 0, 1)]=0.747864262357*x[0]**o + (-0.800830599754)*x[0] + (-0.902310415969)*x[1]**o + (-0.998347508141)*x[1]
            ref[(0, 0, 0, 1)]=-0.902310415969/(o+1.)+(-0.899589053947)+(0.747864262357)*0.5**o
            arg[(0, 0, 0, 2)]=-0.966355973025*x[0]**o + (-0.590035621063)*x[0] + (-0.0366624015259)*x[1]**o + (-0.632270671871)*x[1]
            ref[(0, 0, 0, 2)]=-0.0366624015259/(o+1.)+(-0.611153146467)+(-0.966355973025)*0.5**o
            arg[(0, 0, 1, 0)]=0.759295788743*x[0]**o + (0.0798821094847)*x[0] + (-0.326094358007)*x[1]**o + (-0.887934079102)*x[1]
            ref[(0, 0, 1, 0)]=-0.326094358007/(o+1.)+(-0.404025984809)+(0.759295788743)*0.5**o
            arg[(0, 0, 1, 1)]=-0.248447543948*x[0]**o + (0.412531678167)*x[0] + (-0.334708867969)*x[1]**o + (-0.322236278714)*x[1]
            ref[(0, 0, 1, 1)]=-0.334708867969/(o+1.)+(0.0451476997267)+(-0.248447543948)*0.5**o
            arg[(0, 0, 1, 2)]=-0.3122766246*x[0]**o + (0.0951015438778)*x[0] + (-0.0297535775284)*x[1]**o + (-0.266543545138)*x[1]
            ref[(0, 0, 1, 2)]=-0.0297535775284/(o+1.)+(-0.0857210006299)+(-0.3122766246)*0.5**o
            arg[(0, 1, 0, 0)]=0.366074410243*x[0]**o + (-0.155299402007)*x[0] + (0.469091568688)*x[1]**o + (0.788639581508)*x[1]
            ref[(0, 1, 0, 0)]=0.469091568688/(o+1.)+(0.316670089751)+(0.366074410243)*0.5**o
            arg[(0, 1, 0, 1)]=-0.625151135723*x[0]**o + (-0.888036356541)*x[0] + (0.964363494233)*x[1]**o + (0.828270486206)*x[1]
            ref[(0, 1, 0, 1)]=0.964363494233/(o+1.)+(-0.0298829351675)+(-0.625151135723)*0.5**o
            arg[(0, 1, 0, 2)]=-0.458137404673*x[0]**o + (0.106188138241)*x[0] + (0.559499201611)*x[1]**o + (-0.429279002178)*x[1]
            ref[(0, 1, 0, 2)]=0.559499201611/(o+1.)+(-0.161545431969)+(-0.458137404673)*0.5**o
            arg[(0, 1, 1, 0)]=0.726151689954*x[0]**o + (0.774374940208)*x[0] + (0.0568121671635)*x[1]**o + (-0.579614702448)*x[1]
            ref[(0, 1, 1, 0)]=0.0568121671635/(o+1.)+(0.09738011888)+(0.726151689954)*0.5**o
            arg[(0, 1, 1, 1)]=-0.796842113522*x[0]**o + (-0.126245868162)*x[0] + (0.458795667186)*x[1]**o + (-0.53324841717)*x[1]
            ref[(0, 1, 1, 1)]=0.458795667186/(o+1.)+(-0.329747142666)+(-0.796842113522)*0.5**o
            arg[(0, 1, 1, 2)]=0.780956962952*x[0]**o + (-0.235756262364)*x[0] + (0.656226054668)*x[1]**o + (-0.236010616912)*x[1]
            ref[(0, 1, 1, 2)]=0.656226054668/(o+1.)+(-0.235883439638)+(0.780956962952)*0.5**o
            arg[(1, 0, 0, 0)]=-0.433664850329*x[0]**o + (0.418104216294)*x[0] + (-0.825852651327)*x[1]**o + (-0.775443639072)*x[1]
            ref[(1, 0, 0, 0)]=-0.825852651327/(o+1.)+(-0.178669711389)+(-0.433664850329)*0.5**o
            arg[(1, 0, 0, 1)]=0.506897347511*x[0]**o + (-0.655210297549)*x[0] + (0.81706227278)*x[1]**o + (0.886445739814)*x[1]
            ref[(1, 0, 0, 1)]=0.81706227278/(o+1.)+(0.115617721132)+(0.506897347511)*0.5**o
            arg[(1, 0, 0, 2)]=0.939712337936*x[0]**o + (-0.451954865985)*x[0] + (0.627820424633)*x[1]**o + (0.027267870354)*x[1]
            ref[(1, 0, 0, 2)]=0.627820424633/(o+1.)+(-0.212343497816)+(0.939712337936)*0.5**o
            arg[(1, 0, 1, 0)]=0.692767041893*x[0]**o + (0.682041756815)*x[0] + (0.0297751701332)*x[1]**o + (0.49839577988)*x[1]
            ref[(1, 0, 1, 0)]=0.0297751701332/(o+1.)+(0.590218768347)+(0.692767041893)*0.5**o
            arg[(1, 0, 1, 1)]=-0.88946109458*x[0]**o + (-0.194371237664)*x[0] + (-0.956509053413)*x[1]**o + (0.459522039334)*x[1]
            ref[(1, 0, 1, 1)]=-0.956509053413/(o+1.)+(0.132575400835)+(-0.88946109458)*0.5**o
            arg[(1, 0, 1, 2)]=-0.0515270587968*x[0]**o + (0.815004444237)*x[0] + (-0.235344179408)*x[1]**o + (0.674846115063)*x[1]
            ref[(1, 0, 1, 2)]=-0.235344179408/(o+1.)+(0.74492527965)+(-0.0515270587968)*0.5**o
            arg[(1, 1, 0, 0)]=0.358104691677*x[0]**o + (0.144556938234)*x[0] + (0.413052061756)*x[1]**o + (-0.399455900597)*x[1]
            ref[(1, 1, 0, 0)]=0.413052061756/(o+1.)+(-0.127449481181)+(0.358104691677)*0.5**o
            arg[(1, 1, 0, 1)]=-0.295918840099*x[0]**o + (-0.154087414354)*x[0] + (0.21120410908)*x[1]**o + (-0.271131285959)*x[1]
            ref[(1, 1, 0, 1)]=0.21120410908/(o+1.)+(-0.212609350156)+(-0.295918840099)*0.5**o
            arg[(1, 1, 0, 2)]=-0.230632473916*x[0]**o + (-0.307319039922)*x[0] + (-0.919130673539)*x[1]**o + (0.213898839077)*x[1]
            ref[(1, 1, 0, 2)]=-0.919130673539/(o+1.)+(-0.0467101004225)+(-0.230632473916)*0.5**o
            arg[(1, 1, 1, 0)]=0.694593755229*x[0]**o + (0.379307937492)*x[0] + (-0.547701144671)*x[1]**o + (0.516104690722)*x[1]
            ref[(1, 1, 1, 0)]=-0.547701144671/(o+1.)+(0.447706314107)+(0.694593755229)*0.5**o
            arg[(1, 1, 1, 1)]=0.740791177684*x[0]**o + (-0.428671342542)*x[0] + (0.526987116137)*x[1]**o + (-0.624176223362)*x[1]
            ref[(1, 1, 1, 1)]=0.526987116137/(o+1.)+(-0.526423782952)+(0.740791177684)*0.5**o
            arg[(1, 1, 1, 2)]=0.754304052113*x[0]**o + (-0.340735265283)*x[0] + (-0.702146320893)*x[1]**o + (-0.664549458232)*x[1]
            ref[(1, 1, 1, 2)]=-0.702146320893/(o+1.)+(-0.502642361757)+(0.754304052113)*0.5**o
            arg[(2, 0, 0, 0)]=-0.0363009535824*x[0]**o + (0.410033131032)*x[0] + (0.753018917462)*x[1]**o + (0.947739670904)*x[1]
            ref[(2, 0, 0, 0)]=0.753018917462/(o+1.)+(0.678886400968)+(-0.0363009535824)*0.5**o
            arg[(2, 0, 0, 1)]=-0.867925361276*x[0]**o + (-0.372111485123)*x[0] + (-0.636395334808)*x[1]**o + (0.465553958476)*x[1]
            ref[(2, 0, 0, 1)]=-0.636395334808/(o+1.)+(0.0467212366764)+(-0.867925361276)*0.5**o
            arg[(2, 0, 0, 2)]=-0.261881603516*x[0]**o + (-0.215092211482)*x[0] + (-0.266149498323)*x[1]**o + (0.354695785245)*x[1]
            ref[(2, 0, 0, 2)]=-0.266149498323/(o+1.)+(0.0698017868819)+(-0.261881603516)*0.5**o
            arg[(2, 0, 1, 0)]=-0.795869489732*x[0]**o + (-0.437317080439)*x[0] + (-0.234394126888)*x[1]**o + (0.38899280197)*x[1]
            ref[(2, 0, 1, 0)]=-0.234394126888/(o+1.)+(-0.0241621392345)+(-0.795869489732)*0.5**o
            arg[(2, 0, 1, 1)]=0.00645963629328*x[0]**o + (-0.859593773581)*x[0] + (0.193148704928)*x[1]**o + (-0.205840458765)*x[1]
            ref[(2, 0, 1, 1)]=0.193148704928/(o+1.)+(-0.532717116173)+(0.00645963629328)*0.5**o
            arg[(2, 0, 1, 2)]=-0.151101018639*x[0]**o + (-0.754794001579)*x[0] + (-0.239744484359)*x[1]**o + (-0.131165734198)*x[1]
            ref[(2, 0, 1, 2)]=-0.239744484359/(o+1.)+(-0.442979867889)+(-0.151101018639)*0.5**o
            arg[(2, 1, 0, 0)]=-0.817896966815*x[0]**o + (0.0334007958638)*x[0] + (-0.631468822812)*x[1]**o + (0.473802494285)*x[1]
            ref[(2, 1, 0, 0)]=-0.631468822812/(o+1.)+(0.253601645074)+(-0.817896966815)*0.5**o
            arg[(2, 1, 0, 1)]=-0.599447122141*x[0]**o + (-0.906557674239)*x[0] + (-0.203047933379)*x[1]**o + (0.887815700175)*x[1]
            ref[(2, 1, 0, 1)]=-0.203047933379/(o+1.)+(-0.0093709870324)+(-0.599447122141)*0.5**o
            arg[(2, 1, 0, 2)]=-0.945507398768*x[0]**o + (-0.222240292933)*x[0] + (0.246137159509)*x[1]**o + (0.660282302084)*x[1]
            ref[(2, 1, 0, 2)]=0.246137159509/(o+1.)+(0.219021004576)+(-0.945507398768)*0.5**o
            arg[(2, 1, 1, 0)]=0.462619641919*x[0]**o + (-0.207418580358)*x[0] + (-0.294018885773)*x[1]**o + (-0.693169294842)*x[1]
            ref[(2, 1, 1, 0)]=-0.294018885773/(o+1.)+(-0.4502939376)+(0.462619641919)*0.5**o
            arg[(2, 1, 1, 1)]=-0.281874684323*x[0]**o + (0.408564205702)*x[0] + (0.853297303264)*x[1]**o + (-0.66168893855)*x[1]
            ref[(2, 1, 1, 1)]=0.853297303264/(o+1.)+(-0.126562366424)+(-0.281874684323)*0.5**o
            arg[(2, 1, 1, 2)]=-0.878385898423*x[0]**o + (-0.543418514922)*x[0] + (0.80330040439)*x[1]**o + (-0.879105703674)*x[1]
            ref[(2, 1, 1, 2)]=0.80330040439/(o+1.)+(-0.711262109298)+(-0.878385898423)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.577595182333*x[0]**o + (0.64579757099)*x[0] + (-0.342630001022)*x[1]**o + (0.626084181994)*x[1] + (-0.956885001227)*x[2]**o + (-0.562456839407)*x[2]
            ref[(0, 0, 0, 0)]=-1.29951500225/(o+1.)+(0.354712456789)+(-0.577595182333)*0.5**o
            arg[(0, 0, 0, 1)]=-0.759950114539*x[0]**o + (-0.430930246117)*x[0] + (0.822388248644)*x[1]**o + (0.703925356921)*x[1] + (0.670857333221)*x[2]**o + (0.00028582493442)*x[2]
            ref[(0, 0, 0, 1)]=1.49324558186/(o+1.)+(0.136640467869)+(-0.759950114539)*0.5**o
            arg[(0, 0, 0, 2)]=0.134872885117*x[0]**o + (0.15736509202)*x[0] + (-0.698073775677)*x[1]**o + (0.262651697101)*x[1] + (-0.821300971823)*x[2]**o + (-0.0704780323376)*x[2]
            ref[(0, 0, 0, 2)]=-1.5193747475/(o+1.)+(0.174769378392)+(0.134872885117)*0.5**o
            arg[(0, 0, 1, 0)]=0.789447801702*x[0]**o + (0.00362429038089)*x[0] + (0.807264097406)*x[1]**o + (0.610044180472)*x[1] + (0.346964690351)*x[2]**o + (-0.240660248585)*x[2]
            ref[(0, 0, 1, 0)]=1.15422878776/(o+1.)+(0.186504111133)+(0.789447801702)*0.5**o
            arg[(0, 0, 1, 1)]=-0.0257754417706*x[0]**o + (-0.557205810043)*x[0] + (0.602596707485)*x[1]**o + (-0.174695040752)*x[1] + (-0.693980600093)*x[2]**o + (-0.217351837626)*x[2]
            ref[(0, 0, 1, 1)]=-0.0913838926073/(o+1.)+(-0.474626344211)+(-0.0257754417706)*0.5**o
            arg[(0, 0, 1, 2)]=-0.752891779809*x[0]**o + (0.483653232764)*x[0] + (-0.432544579629)*x[1]**o + (-0.873707179201)*x[1] + (-0.970168665288)*x[2]**o + (-0.0709840148648)*x[2]
            ref[(0, 0, 1, 2)]=-1.40271324492/(o+1.)+(-0.230518980651)+(-0.752891779809)*0.5**o
            arg[(0, 1, 0, 0)]=-0.0139559504281*x[0]**o + (0.930369825744)*x[0] + (-0.978626166239)*x[1]**o + (0.722145365122)*x[1] + (0.504113532613)*x[2]**o + (0.781939540972)*x[2]
            ref[(0, 1, 0, 0)]=-0.474512633626/(o+1.)+(1.21722736592)+(-0.0139559504281)*0.5**o
            arg[(0, 1, 0, 1)]=0.640808465722*x[0]**o + (0.00375965394937)*x[0] + (0.526062503562)*x[1]**o + (-0.216504745121)*x[1] + (0.714668891733)*x[2]**o + (-0.808369379405)*x[2]
            ref[(0, 1, 0, 1)]=1.24073139529/(o+1.)+(-0.510557235288)+(0.640808465722)*0.5**o
            arg[(0, 1, 0, 2)]=-0.450872692336*x[0]**o + (0.42321993363)*x[0] + (0.974857877878)*x[1]**o + (-0.143368183874)*x[1] + (-0.254555189573)*x[2]**o + (0.961937029894)*x[2]
            ref[(0, 1, 0, 2)]=0.720302688305/(o+1.)+(0.620894389825)+(-0.450872692336)*0.5**o
            arg[(0, 1, 1, 0)]=-0.265113106379*x[0]**o + (-0.00259778527648)*x[0] + (0.925052172885)*x[1]**o + (0.977644897863)*x[1] + (-0.694995429578)*x[2]**o + (0.119069010165)*x[2]
            ref[(0, 1, 1, 0)]=0.230056743308/(o+1.)+(0.547058061376)+(-0.265113106379)*0.5**o
            arg[(0, 1, 1, 1)]=-0.599411293598*x[0]**o + (0.206411990907)*x[0] + (0.409356255017)*x[1]**o + (0.373854832174)*x[1] + (-0.0764567410775)*x[2]**o + (-0.216328564433)*x[2]
            ref[(0, 1, 1, 1)]=0.33289951394/(o+1.)+(0.181969129324)+(-0.599411293598)*0.5**o
            arg[(0, 1, 1, 2)]=0.990667317953*x[0]**o + (0.594845033608)*x[0] + (-0.278234451682)*x[1]**o + (0.570457053665)*x[1] + (-0.852975520002)*x[2]**o + (-0.579896757801)*x[2]
            ref[(0, 1, 1, 2)]=-1.13120997168/(o+1.)+(0.292702664736)+(0.990667317953)*0.5**o
            arg[(1, 0, 0, 0)]=-0.983907887592*x[0]**o + (0.664716016921)*x[0] + (0.585991426515)*x[1]**o + (0.528872041246)*x[1] + (0.950953565437)*x[2]**o + (-0.415335815626)*x[2]
            ref[(1, 0, 0, 0)]=1.53694499195/(o+1.)+(0.38912612127)+(-0.983907887592)*0.5**o
            arg[(1, 0, 0, 1)]=-0.0232710833166*x[0]**o + (-0.0980076944996)*x[0] + (-0.531784357975)*x[1]**o + (-0.18563917674)*x[1] + (0.57692521507)*x[2]**o + (0.256492349183)*x[2]
            ref[(1, 0, 0, 1)]=0.0451408570949/(o+1.)+(-0.0135772610285)+(-0.0232710833166)*0.5**o
            arg[(1, 0, 0, 2)]=0.310595476818*x[0]**o + (-0.564920290527)*x[0] + (0.0417915183581)*x[1]**o + (0.862859411158)*x[1] + (0.299647109889)*x[2]**o + (-0.412587714502)*x[2]
            ref[(1, 0, 0, 2)]=0.341438628247/(o+1.)+(-0.0573242969353)+(0.310595476818)*0.5**o
            arg[(1, 0, 1, 0)]=-0.272781194237*x[0]**o + (0.111212903401)*x[0] + (0.3349665609)*x[1]**o + (0.962069883001)*x[1] + (-0.379283575989)*x[2]**o + (0.104080585669)*x[2]
            ref[(1, 0, 1, 0)]=-0.0443170150892/(o+1.)+(0.588681686036)+(-0.272781194237)*0.5**o
            arg[(1, 0, 1, 1)]=-0.84120421006*x[0]**o + (0.0850092233355)*x[0] + (0.563942654378)*x[1]**o + (-0.0976068404906)*x[1] + (0.37519175794)*x[2]**o + (-0.713302306619)*x[2]
            ref[(1, 0, 1, 1)]=0.939134412318/(o+1.)+(-0.362949961887)+(-0.84120421006)*0.5**o
            arg[(1, 0, 1, 2)]=-0.552421419091*x[0]**o + (0.178305328205)*x[0] + (0.115634863508)*x[1]**o + (-0.603658269917)*x[1] + (-0.387430500318)*x[2]**o + (0.699113374188)*x[2]
            ref[(1, 0, 1, 2)]=-0.27179563681/(o+1.)+(0.136880216238)+(-0.552421419091)*0.5**o
            arg[(1, 1, 0, 0)]=0.0327578231864*x[0]**o + (0.058445409574)*x[0] + (0.211559193398)*x[1]**o + (-0.955428211974)*x[1] + (0.203405951027)*x[2]**o + (-0.629829246674)*x[2]
            ref[(1, 1, 0, 0)]=0.414965144425/(o+1.)+(-0.763406024537)+(0.0327578231864)*0.5**o
            arg[(1, 1, 0, 1)]=-0.595067148265*x[0]**o + (0.981830796624)*x[0] + (0.690200806934)*x[1]**o + (-0.804208010015)*x[1] + (0.0869777959957)*x[2]**o + (-0.415621917201)*x[2]
            ref[(1, 1, 0, 1)]=0.77717860293/(o+1.)+(-0.118999565296)+(-0.595067148265)*0.5**o
            arg[(1, 1, 0, 2)]=0.81958014534*x[0]**o + (-0.48934019829)*x[0] + (-0.291337641473)*x[1]**o + (-0.414763180788)*x[1] + (-0.96353095709)*x[2]**o + (0.600923732024)*x[2]
            ref[(1, 1, 0, 2)]=-1.25486859856/(o+1.)+(-0.151589823527)+(0.81958014534)*0.5**o
            arg[(1, 1, 1, 0)]=0.674097968888*x[0]**o + (0.0202990088974)*x[0] + (0.87771656769)*x[1]**o + (-0.653489202072)*x[1] + (-0.451995307015)*x[2]**o + (-0.723808893007)*x[2]
            ref[(1, 1, 1, 0)]=0.425721260674/(o+1.)+(-0.678499543091)+(0.674097968888)*0.5**o
            arg[(1, 1, 1, 1)]=0.76221798138*x[0]**o + (0.117450167161)*x[0] + (0.710923767276)*x[1]**o + (-0.472126735053)*x[1] + (0.800291455102)*x[2]**o + (-0.461415889236)*x[2]
            ref[(1, 1, 1, 1)]=1.51121522238/(o+1.)+(-0.408046228564)+(0.76221798138)*0.5**o
            arg[(1, 1, 1, 2)]=-0.279805654306*x[0]**o + (-0.538455573523)*x[0] + (-0.680581015273)*x[1]**o + (0.796818520625)*x[1] + (0.474587962609)*x[2]**o + (0.688246789903)*x[2]
            ref[(1, 1, 1, 2)]=-0.205993052663/(o+1.)+(0.473304868503)+(-0.279805654306)*0.5**o
            arg[(2, 0, 0, 0)]=-0.314212093282*x[0]**o + (0.896004437979)*x[0] + (0.71917038059)*x[1]**o + (-0.710486296448)*x[1] + (0.973481496147)*x[2]**o + (0.116474445027)*x[2]
            ref[(2, 0, 0, 0)]=1.69265187674/(o+1.)+(0.150996293279)+(-0.314212093282)*0.5**o
            arg[(2, 0, 0, 1)]=-0.960603580965*x[0]**o + (0.434605077966)*x[0] + (0.530501777172)*x[1]**o + (0.968020752458)*x[1] + (0.424575723502)*x[2]**o + (0.205741133472)*x[2]
            ref[(2, 0, 0, 1)]=0.955077500674/(o+1.)+(0.804183481948)+(-0.960603580965)*0.5**o
            arg[(2, 0, 0, 2)]=-0.516867925869*x[0]**o + (0.866475664029)*x[0] + (-0.745012431304)*x[1]**o + (0.705853069646)*x[1] + (-0.0489434050617)*x[2]**o + (0.712665843143)*x[2]
            ref[(2, 0, 0, 2)]=-0.793955836366/(o+1.)+(1.14249728841)+(-0.516867925869)*0.5**o
            arg[(2, 0, 1, 0)]=0.62602846677*x[0]**o + (0.681945497358)*x[0] + (-0.940606988993)*x[1]**o + (0.430706713879)*x[1] + (0.13759789586)*x[2]**o + (0.0404123254733)*x[2]
            ref[(2, 0, 1, 0)]=-0.803009093133/(o+1.)+(0.576532268355)+(0.62602846677)*0.5**o
            arg[(2, 0, 1, 1)]=-0.51318089766*x[0]**o + (0.426775524816)*x[0] + (-0.375537519135)*x[1]**o + (-0.760640464929)*x[1] + (-0.0381832306587)*x[2]**o + (0.0149015354493)*x[2]
            ref[(2, 0, 1, 1)]=-0.413720749794/(o+1.)+(-0.159481702332)+(-0.51318089766)*0.5**o
            arg[(2, 0, 1, 2)]=-0.31850499929*x[0]**o + (0.482709419851)*x[0] + (0.779335141271)*x[1]**o + (0.598227432002)*x[1] + (-0.572210993382)*x[2]**o + (-0.239852076841)*x[2]
            ref[(2, 0, 1, 2)]=0.20712414789/(o+1.)+(0.420542387506)+(-0.31850499929)*0.5**o
            arg[(2, 1, 0, 0)]=0.150136986943*x[0]**o + (-0.582167974176)*x[0] + (-0.597070321452)*x[1]**o + (-0.324646401126)*x[1] + (0.228011568408)*x[2]**o + (0.959915861147)*x[2]
            ref[(2, 1, 0, 0)]=-0.369058753044/(o+1.)+(0.0265507429225)+(0.150136986943)*0.5**o
            arg[(2, 1, 0, 1)]=-0.290554441704*x[0]**o + (0.200057364316)*x[0] + (-0.136757212834)*x[1]**o + (0.760692327895)*x[1] + (-0.768909456839)*x[2]**o + (-0.919900002845)*x[2]
            ref[(2, 1, 0, 1)]=-0.905666669673/(o+1.)+(0.0204248446828)+(-0.290554441704)*0.5**o
            arg[(2, 1, 0, 2)]=-0.561673996278*x[0]**o + (-0.177991888268)*x[0] + (-0.507901652015)*x[1]**o + (-0.127350840247)*x[1] + (0.743033703969)*x[2]**o + (0.0658004341692)*x[2]
            ref[(2, 1, 0, 2)]=0.235132051953/(o+1.)+(-0.119771147173)+(-0.561673996278)*0.5**o
            arg[(2, 1, 1, 0)]=-0.297565448638*x[0]**o + (0.287841682627)*x[0] + (0.430558697813)*x[1]**o + (0.919844095917)*x[1] + (0.197771490961)*x[2]**o + (-0.0154750824356)*x[2]
            ref[(2, 1, 1, 0)]=0.628330188774/(o+1.)+(0.596105348054)+(-0.297565448638)*0.5**o
            arg[(2, 1, 1, 1)]=0.108860453259*x[0]**o + (-0.558749387906)*x[0] + (-0.786463793145)*x[1]**o + (0.0975820433663)*x[1] + (0.236764024747)*x[2]**o + (0.410554220771)*x[2]
            ref[(2, 1, 1, 1)]=-0.549699768398/(o+1.)+(-0.0253065618842)+(0.108860453259)*0.5**o
            arg[(2, 1, 1, 2)]=-0.583227097294*x[0]**o + (-0.349757215398)*x[0] + (0.853137868798)*x[1]**o + (0.880870499636)*x[1] + (-0.651678081468)*x[2]**o + (-0.710185378166)*x[2]
            ref[(2, 1, 1, 2)]=0.201459787329/(o+1.)+(-0.0895360469637)+(-0.583227097294)*0.5**o
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=0.867170717516*x[0] + (-0.179621906704)*x[1]
            ref=0.343774405406
        else:
            arg=0.458891736406*x[0] + (0.291159057319)*x[1] + (0.819156017444)*x[2]
            ref=0.784603405584
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.395584103497*x[0] + (-0.332588047911)*x[1]
            ref[(0,)]=-0.364086075704
            arg[(1,)]=0.875355627838*x[0] + (-0.0389581297895)*x[1]
            ref[(1,)]=0.418198749024
            arg[(2,)]=0.430385067496*x[0] + (0.211998896842)*x[1]
            ref[(2,)]=0.321191982169
        else:
            arg[(0,)]=-0.330103655939*x[0] + (-0.866028846071)*x[1] + (0.0269977902318)*x[2]
            ref[(0,)]=-0.584567355889
            arg[(1,)]=-0.722555537007*x[0] + (-0.792231715639)*x[1] + (0.142666125953)*x[2]
            ref[(1,)]=-0.686060563347
            arg[(2,)]=0.494160877174*x[0] + (-0.935462299088)*x[1] + (-0.241120404356)*x[2]
            ref[(2,)]=-0.341210913135
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2),w)
        ref=numpy.zeros((3, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.468138925587*x[0] + (0.290784785123)*x[1]
            ref[(0, 0)]=0.379461855355
            arg[(0, 1)]=-0.849667286097*x[0] + (0.407071484068)*x[1]
            ref[(0, 1)]=-0.221297901014
            arg[(1, 0)]=-0.583395351449*x[0] + (-0.739037454095)*x[1]
            ref[(1, 0)]=-0.661216402772
            arg[(1, 1)]=-0.381399942518*x[0] + (-0.316611197025)*x[1]
            ref[(1, 1)]=-0.349005569772
            arg[(2, 0)]=8.50566450337e-05*x[0] + (-0.0571014627198)*x[1]
            ref[(2, 0)]=-0.0285082030374
            arg[(2, 1)]=-0.440505464673*x[0] + (-0.819842318367)*x[1]
            ref[(2, 1)]=-0.63017389152
        else:
            arg[(0, 0)]=0.52734569156*x[0] + (-0.345780739342)*x[1] + (-0.0162415446219)*x[2]
            ref[(0, 0)]=0.0826617037979
            arg[(0, 1)]=0.819693181884*x[0] + (0.50411859663)*x[1] + (-0.232234576459)*x[2]
            ref[(0, 1)]=0.545788601027
            arg[(1, 0)]=0.78746577276*x[0] + (0.400365904033)*x[1] + (0.641417469136)*x[2]
            ref[(1, 0)]=0.914624572964
            arg[(1, 1)]=-0.413951200904*x[0] + (0.531490899512)*x[1] + (0.912080871557)*x[2]
            ref[(1, 1)]=0.514810285082
            arg[(2, 0)]=0.64661914681*x[0] + (0.339740477061)*x[1] + (-0.0546284755641)*x[2]
            ref[(2, 0)]=0.465865574154
            arg[(2, 1)]=-0.437698097205*x[0] + (0.529601011067)*x[1] + (0.581956231918)*x[2]
            ref[(2, 1)]=0.33692957289
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(2, 4, 2),w)
        ref=numpy.zeros((2, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.950873984049*x[0] + (0.874108695184)*x[1]
            ref[(0, 0, 0)]=0.912491339617
            arg[(0, 0, 1)]=0.401886040574*x[0] + (-0.929810994632)*x[1]
            ref[(0, 0, 1)]=-0.263962477029
            arg[(0, 1, 0)]=0.170892686354*x[0] + (-0.862390862366)*x[1]
            ref[(0, 1, 0)]=-0.345749088006
            arg[(0, 1, 1)]=0.615760053845*x[0] + (-0.542510374989)*x[1]
            ref[(0, 1, 1)]=0.0366248394283
            arg[(0, 2, 0)]=0.384700369771*x[0] + (0.526726907515)*x[1]
            ref[(0, 2, 0)]=0.455713638643
            arg[(0, 2, 1)]=0.955342680557*x[0] + (-0.717386073537)*x[1]
            ref[(0, 2, 1)]=0.11897830351
            arg[(0, 3, 0)]=0.187791301307*x[0] + (0.582402308663)*x[1]
            ref[(0, 3, 0)]=0.385096804985
            arg[(0, 3, 1)]=0.0327399535209*x[0] + (0.199183169756)*x[1]
            ref[(0, 3, 1)]=0.115961561639
            arg[(1, 0, 0)]=0.499066886057*x[0] + (0.964486283385)*x[1]
            ref[(1, 0, 0)]=0.731776584721
            arg[(1, 0, 1)]=-0.681298491019*x[0] + (0.714877859191)*x[1]
            ref[(1, 0, 1)]=0.0167896840864
            arg[(1, 1, 0)]=-0.464107764596*x[0] + (-0.0775548652755)*x[1]
            ref[(1, 1, 0)]=-0.270831314936
            arg[(1, 1, 1)]=-0.542082334733*x[0] + (-0.452210003418)*x[1]
            ref[(1, 1, 1)]=-0.497146169075
            arg[(1, 2, 0)]=0.847436017729*x[0] + (-0.149653875806)*x[1]
            ref[(1, 2, 0)]=0.348891070961
            arg[(1, 2, 1)]=-0.105500418979*x[0] + (-0.237386151342)*x[1]
            ref[(1, 2, 1)]=-0.171443285161
            arg[(1, 3, 0)]=-0.544360374676*x[0] + (-0.755437404425)*x[1]
            ref[(1, 3, 0)]=-0.649898889551
            arg[(1, 3, 1)]=0.452178430583*x[0] + (0.435720516015)*x[1]
            ref[(1, 3, 1)]=0.443949473299
        else:
            arg[(0, 0, 0)]=0.801969324925*x[0] + (0.463479840673)*x[1] + (0.635031686268)*x[2]
            ref[(0, 0, 0)]=0.950240425933
            arg[(0, 0, 1)]=-0.5104149451*x[0] + (-0.735362985319)*x[1] + (0.402001512196)*x[2]
            ref[(0, 0, 1)]=-0.421888209112
            arg[(0, 1, 0)]=0.647712620454*x[0] + (-0.00645804787846)*x[1] + (0.141748792638)*x[2]
            ref[(0, 1, 0)]=0.391501682607
            arg[(0, 1, 1)]=-0.0680703713026*x[0] + (0.0486147372789)*x[1] + (0.231021030872)*x[2]
            ref[(0, 1, 1)]=0.105782698424
            arg[(0, 2, 0)]=-0.587476765856*x[0] + (-0.0380797416371)*x[1] + (0.421007669071)*x[2]
            ref[(0, 2, 0)]=-0.102274419211
            arg[(0, 2, 1)]=-0.491675362692*x[0] + (0.653758150476)*x[1] + (0.44647459972)*x[2]
            ref[(0, 2, 1)]=0.304278693752
            arg[(0, 3, 0)]=0.235221701647*x[0] + (0.701555963238)*x[1] + (-0.88754429146)*x[2]
            ref[(0, 3, 0)]=0.0246166867125
            arg[(0, 3, 1)]=0.538466162536*x[0] + (0.930735798186)*x[1] + (0.10580933286)*x[2]
            ref[(0, 3, 1)]=0.787505646791
            arg[(1, 0, 0)]=-0.467206491199*x[0] + (-0.626782761995)*x[1] + (0.909182766575)*x[2]
            ref[(1, 0, 0)]=-0.0924032433094
            arg[(1, 0, 1)]=0.173115363207*x[0] + (0.359994749868)*x[1] + (-0.652517700721)*x[2]
            ref[(1, 0, 1)]=-0.059703793823
            arg[(1, 1, 0)]=0.684764659993*x[0] + (0.0159331230349)*x[1] + (-0.0493509464765)*x[2]
            ref[(1, 1, 0)]=0.325673418276
            arg[(1, 1, 1)]=0.0638432449994*x[0] + (-0.937181134578)*x[1] + (0.374455375788)*x[2]
            ref[(1, 1, 1)]=-0.249441256896
            arg[(1, 2, 0)]=-0.0246122041653*x[0] + (0.19180126614)*x[1] + (0.247890238412)*x[2]
            ref[(1, 2, 0)]=0.207539650193
            arg[(1, 2, 1)]=-0.67578364462*x[0] + (-0.452500343387)*x[1] + (0.0153916253849)*x[2]
            ref[(1, 2, 1)]=-0.556446181311
            arg[(1, 3, 0)]=0.976740539733*x[0] + (-0.711209841926)*x[1] + (-0.399720840877)*x[2]
            ref[(1, 3, 0)]=-0.0670950715353
            arg[(1, 3, 1)]=0.271735715238*x[0] + (-0.931544148284)*x[1] + (0.429264595984)*x[2]
            ref[(1, 3, 1)]=-0.115271918531
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedSolution_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedSolution(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedSolution(self.domain)
        x = w.getX()
        arg = Data(0,(4, 3, 4, 2),w)
        ref=numpy.zeros((4, 3, 4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=0.300754577059*x[0] + (-0.18833315412)*x[1]
            ref[(0, 0, 0, 0)]=0.0562107114699
            arg[(0, 0, 0, 1)]=-0.525407924188*x[0] + (-0.587145870507)*x[1]
            ref[(0, 0, 0, 1)]=-0.556276897347
            arg[(0, 0, 1, 0)]=0.667950191744*x[0] + (0.970983635757)*x[1]
            ref[(0, 0, 1, 0)]=0.81946691375
            arg[(0, 0, 1, 1)]=-0.663896289708*x[0] + (0.479894028292)*x[1]
            ref[(0, 0, 1, 1)]=-0.0920011307081
            arg[(0, 0, 2, 0)]=0.220478610017*x[0] + (-0.629580263672)*x[1]
            ref[(0, 0, 2, 0)]=-0.204550826827
            arg[(0, 0, 2, 1)]=0.889967604057*x[0] + (0.0224877161287)*x[1]
            ref[(0, 0, 2, 1)]=0.456227660093
            arg[(0, 0, 3, 0)]=-0.708478177031*x[0] + (-0.163892083611)*x[1]
            ref[(0, 0, 3, 0)]=-0.436185130321
            arg[(0, 0, 3, 1)]=0.938636769482*x[0] + (-0.0643782763256)*x[1]
            ref[(0, 0, 3, 1)]=0.437129246578
            arg[(0, 1, 0, 0)]=-0.0801685498813*x[0] + (0.934236822875)*x[1]
            ref[(0, 1, 0, 0)]=0.427034136497
            arg[(0, 1, 0, 1)]=0.708384247157*x[0] + (0.126024611666)*x[1]
            ref[(0, 1, 0, 1)]=0.417204429411
            arg[(0, 1, 1, 0)]=0.0561035738223*x[0] + (0.308602690223)*x[1]
            ref[(0, 1, 1, 0)]=0.182353132023
            arg[(0, 1, 1, 1)]=0.837537087719*x[0] + (-0.103128902276)*x[1]
            ref[(0, 1, 1, 1)]=0.367204092721
            arg[(0, 1, 2, 0)]=0.941876934151*x[0] + (0.965424040461)*x[1]
            ref[(0, 1, 2, 0)]=0.953650487306
            arg[(0, 1, 2, 1)]=-0.00446718831574*x[0] + (0.625623494118)*x[1]
            ref[(0, 1, 2, 1)]=0.310578152901
            arg[(0, 1, 3, 0)]=-0.966024503968*x[0] + (-0.793804842602)*x[1]
            ref[(0, 1, 3, 0)]=-0.879914673285
            arg[(0, 1, 3, 1)]=0.295399341532*x[0] + (-0.658853579338)*x[1]
            ref[(0, 1, 3, 1)]=-0.181727118903
            arg[(0, 2, 0, 0)]=0.873861355329*x[0] + (0.79438007937)*x[1]
            ref[(0, 2, 0, 0)]=0.834120717349
            arg[(0, 2, 0, 1)]=-0.841076807143*x[0] + (-0.988190075415)*x[1]
            ref[(0, 2, 0, 1)]=-0.914633441279
            arg[(0, 2, 1, 0)]=0.28215807655*x[0] + (0.999292371745)*x[1]
            ref[(0, 2, 1, 0)]=0.640725224148
            arg[(0, 2, 1, 1)]=0.870721099379*x[0] + (-0.785285428197)*x[1]
            ref[(0, 2, 1, 1)]=0.042717835591
            arg[(0, 2, 2, 0)]=-0.0267473934486*x[0] + (0.417568574105)*x[1]
            ref[(0, 2, 2, 0)]=0.195410590328
            arg[(0, 2, 2, 1)]=0.871938037391*x[0] + (0.318921920276)*x[1]
            ref[(0, 2, 2, 1)]=0.595429978833
            arg[(0, 2, 3, 0)]=0.133795154214*x[0] + (-0.931549232017)*x[1]
            ref[(0, 2, 3, 0)]=-0.398877038902
            arg[(0, 2, 3, 1)]=0.0884110040691*x[0] + (-0.225018485061)*x[1]
            ref[(0, 2, 3, 1)]=-0.0683037404957
            arg[(1, 0, 0, 0)]=0.915496244357*x[0] + (0.576375946114)*x[1]
            ref[(1, 0, 0, 0)]=0.745936095236
            arg[(1, 0, 0, 1)]=-0.831228821435*x[0] + (0.853205376862)*x[1]
            ref[(1, 0, 0, 1)]=0.0109882777132
            arg[(1, 0, 1, 0)]=0.196146651391*x[0] + (-0.977651234354)*x[1]
            ref[(1, 0, 1, 0)]=-0.390752291482
            arg[(1, 0, 1, 1)]=-0.275001484951*x[0] + (0.361307961692)*x[1]
            ref[(1, 0, 1, 1)]=0.0431532383703
            arg[(1, 0, 2, 0)]=-0.267715771059*x[0] + (0.372169192936)*x[1]
            ref[(1, 0, 2, 0)]=0.0522267109382
            arg[(1, 0, 2, 1)]=0.277390417655*x[0] + (-0.675556284189)*x[1]
            ref[(1, 0, 2, 1)]=-0.199082933267
            arg[(1, 0, 3, 0)]=-0.0442213290885*x[0] + (0.596101304474)*x[1]
            ref[(1, 0, 3, 0)]=0.275939987693
            arg[(1, 0, 3, 1)]=0.931342804524*x[0] + (-0.37330478118)*x[1]
            ref[(1, 0, 3, 1)]=0.279019011672
            arg[(1, 1, 0, 0)]=0.552563228716*x[0] + (-0.209021347472)*x[1]
            ref[(1, 1, 0, 0)]=0.171770940622
            arg[(1, 1, 0, 1)]=-0.00632263802403*x[0] + (0.262632673369)*x[1]
            ref[(1, 1, 0, 1)]=0.128155017672
            arg[(1, 1, 1, 0)]=-0.00559882152973*x[0] + (-0.426859124245)*x[1]
            ref[(1, 1, 1, 0)]=-0.216228972888
            arg[(1, 1, 1, 1)]=0.101255153652*x[0] + (0.500151538225)*x[1]
            ref[(1, 1, 1, 1)]=0.300703345938
            arg[(1, 1, 2, 0)]=0.756242813133*x[0] + (-0.0213372270399)*x[1]
            ref[(1, 1, 2, 0)]=0.367452793047
            arg[(1, 1, 2, 1)]=0.0367087661834*x[0] + (0.239745204695)*x[1]
            ref[(1, 1, 2, 1)]=0.138226985439
            arg[(1, 1, 3, 0)]=0.564356420693*x[0] + (0.462481271544)*x[1]
            ref[(1, 1, 3, 0)]=0.513418846119
            arg[(1, 1, 3, 1)]=0.298782449601*x[0] + (-0.0815549513825)*x[1]
            ref[(1, 1, 3, 1)]=0.108613749109
            arg[(1, 2, 0, 0)]=-0.984076658882*x[0] + (0.953848478133)*x[1]
            ref[(1, 2, 0, 0)]=-0.0151140903743
            arg[(1, 2, 0, 1)]=-0.752762868314*x[0] + (-0.738958995496)*x[1]
            ref[(1, 2, 0, 1)]=-0.745860931905
            arg[(1, 2, 1, 0)]=-0.327541484664*x[0] + (-0.801924554851)*x[1]
            ref[(1, 2, 1, 0)]=-0.564733019757
            arg[(1, 2, 1, 1)]=0.164817553749*x[0] + (-0.322314602565)*x[1]
            ref[(1, 2, 1, 1)]=-0.0787485244081
            arg[(1, 2, 2, 0)]=0.672943995753*x[0] + (-0.178803491786)*x[1]
            ref[(1, 2, 2, 0)]=0.247070251984
            arg[(1, 2, 2, 1)]=-0.424285571419*x[0] + (0.473594235591)*x[1]
            ref[(1, 2, 2, 1)]=0.0246543320862
            arg[(1, 2, 3, 0)]=0.580037304321*x[0] + (-0.39045803659)*x[1]
            ref[(1, 2, 3, 0)]=0.0947896338656
            arg[(1, 2, 3, 1)]=0.353016715015*x[0] + (-0.820046076825)*x[1]
            ref[(1, 2, 3, 1)]=-0.233514680905
            arg[(2, 0, 0, 0)]=-0.621661882273*x[0] + (0.574144931409)*x[1]
            ref[(2, 0, 0, 0)]=-0.023758475432
            arg[(2, 0, 0, 1)]=-0.917778735854*x[0] + (-0.413775067363)*x[1]
            ref[(2, 0, 0, 1)]=-0.665776901609
            arg[(2, 0, 1, 0)]=-0.672034837289*x[0] + (0.972378696603)*x[1]
            ref[(2, 0, 1, 0)]=0.150171929657
            arg[(2, 0, 1, 1)]=0.526090593452*x[0] + (-0.169174666747)*x[1]
            ref[(2, 0, 1, 1)]=0.178457963352
            arg[(2, 0, 2, 0)]=0.760047064087*x[0] + (0.897585732389)*x[1]
            ref[(2, 0, 2, 0)]=0.828816398238
            arg[(2, 0, 2, 1)]=0.278754234714*x[0] + (-0.327399779853)*x[1]
            ref[(2, 0, 2, 1)]=-0.0243227725691
            arg[(2, 0, 3, 0)]=0.977918881744*x[0] + (-0.425974966664)*x[1]
            ref[(2, 0, 3, 0)]=0.27597195754
            arg[(2, 0, 3, 1)]=0.563382575428*x[0] + (-0.980820988221)*x[1]
            ref[(2, 0, 3, 1)]=-0.208719206397
            arg[(2, 1, 0, 0)]=-0.662990127206*x[0] + (0.0552547487648)*x[1]
            ref[(2, 1, 0, 0)]=-0.303867689221
            arg[(2, 1, 0, 1)]=-0.675596199083*x[0] + (-0.345715429983)*x[1]
            ref[(2, 1, 0, 1)]=-0.510655814533
            arg[(2, 1, 1, 0)]=0.621422428445*x[0] + (-0.668099031545)*x[1]
            ref[(2, 1, 1, 0)]=-0.02333830155
            arg[(2, 1, 1, 1)]=0.242495379679*x[0] + (0.657241547793)*x[1]
            ref[(2, 1, 1, 1)]=0.449868463736
            arg[(2, 1, 2, 0)]=-0.0333338664361*x[0] + (0.217127355956)*x[1]
            ref[(2, 1, 2, 0)]=0.0918967447601
            arg[(2, 1, 2, 1)]=0.602880383749*x[0] + (0.926771296858)*x[1]
            ref[(2, 1, 2, 1)]=0.764825840304
            arg[(2, 1, 3, 0)]=0.246557376913*x[0] + (-0.22966142888)*x[1]
            ref[(2, 1, 3, 0)]=0.00844797401646
            arg[(2, 1, 3, 1)]=0.676325887105*x[0] + (0.821186145953)*x[1]
            ref[(2, 1, 3, 1)]=0.748756016529
            arg[(2, 2, 0, 0)]=-0.185814733644*x[0] + (0.509833654624)*x[1]
            ref[(2, 2, 0, 0)]=0.16200946049
            arg[(2, 2, 0, 1)]=0.614020362299*x[0] + (-0.322944015154)*x[1]
            ref[(2, 2, 0, 1)]=0.145538173572
            arg[(2, 2, 1, 0)]=0.799790351247*x[0] + (-0.025479370565)*x[1]
            ref[(2, 2, 1, 0)]=0.387155490341
            arg[(2, 2, 1, 1)]=-0.918759178431*x[0] + (-0.789006986276)*x[1]
            ref[(2, 2, 1, 1)]=-0.853883082353
            arg[(2, 2, 2, 0)]=-0.30782540701*x[0] + (-0.137312329859)*x[1]
            ref[(2, 2, 2, 0)]=-0.222568868435
            arg[(2, 2, 2, 1)]=-0.850393417357*x[0] + (0.184538071674)*x[1]
            ref[(2, 2, 2, 1)]=-0.332927672841
            arg[(2, 2, 3, 0)]=-0.75604895717*x[0] + (0.612895957249)*x[1]
            ref[(2, 2, 3, 0)]=-0.0715764999605
            arg[(2, 2, 3, 1)]=-0.804274128827*x[0] + (0.446691530289)*x[1]
            ref[(2, 2, 3, 1)]=-0.178791299269
            arg[(3, 0, 0, 0)]=-0.12842844122*x[0] + (0.78056753146)*x[1]
            ref[(3, 0, 0, 0)]=0.32606954512
            arg[(3, 0, 0, 1)]=0.041434901203*x[0] + (-0.987444043919)*x[1]
            ref[(3, 0, 0, 1)]=-0.473004571358
            arg[(3, 0, 1, 0)]=-0.295236374861*x[0] + (0.560119775285)*x[1]
            ref[(3, 0, 1, 0)]=0.132441700212
            arg[(3, 0, 1, 1)]=-0.676005257503*x[0] + (-0.725884926665)*x[1]
            ref[(3, 0, 1, 1)]=-0.700945092084
            arg[(3, 0, 2, 0)]=-0.557447406715*x[0] + (0.143397576875)*x[1]
            ref[(3, 0, 2, 0)]=-0.20702491492
            arg[(3, 0, 2, 1)]=-0.247843228682*x[0] + (-0.716068358424)*x[1]
            ref[(3, 0, 2, 1)]=-0.481955793553
            arg[(3, 0, 3, 0)]=-0.501016146044*x[0] + (0.0002348993401)*x[1]
            ref[(3, 0, 3, 0)]=-0.250390623352
            arg[(3, 0, 3, 1)]=-0.694756579729*x[0] + (-0.287928157466)*x[1]
            ref[(3, 0, 3, 1)]=-0.491342368597
            arg[(3, 1, 0, 0)]=-0.624702844439*x[0] + (0.809490972413)*x[1]
            ref[(3, 1, 0, 0)]=0.0923940639869
            arg[(3, 1, 0, 1)]=-0.127125887075*x[0] + (-0.425113795904)*x[1]
            ref[(3, 1, 0, 1)]=-0.276119841489
            arg[(3, 1, 1, 0)]=-0.884349724599*x[0] + (0.668663336213)*x[1]
            ref[(3, 1, 1, 0)]=-0.107843194193
            arg[(3, 1, 1, 1)]=0.656474683773*x[0] + (-0.600569529793)*x[1]
            ref[(3, 1, 1, 1)]=0.02795257699
            arg[(3, 1, 2, 0)]=0.0487231264303*x[0] + (0.794289226661)*x[1]
            ref[(3, 1, 2, 0)]=0.421506176546
            arg[(3, 1, 2, 1)]=-0.966274463651*x[0] + (0.356497838169)*x[1]
            ref[(3, 1, 2, 1)]=-0.304888312741
            arg[(3, 1, 3, 0)]=0.856371709248*x[0] + (0.440299729658)*x[1]
            ref[(3, 1, 3, 0)]=0.648335719453
            arg[(3, 1, 3, 1)]=0.497361483185*x[0] + (0.276776835336)*x[1]
            ref[(3, 1, 3, 1)]=0.38706915926
            arg[(3, 2, 0, 0)]=-0.00109348790046*x[0] + (-0.158725370693)*x[1]
            ref[(3, 2, 0, 0)]=-0.0799094292967
            arg[(3, 2, 0, 1)]=-0.560344087108*x[0] + (-0.39811020037)*x[1]
            ref[(3, 2, 0, 1)]=-0.479227143739
            arg[(3, 2, 1, 0)]=0.546817516009*x[0] + (-0.648323338099)*x[1]
            ref[(3, 2, 1, 0)]=-0.0507529110447
            arg[(3, 2, 1, 1)]=0.219327050145*x[0] + (0.96059229572)*x[1]
            ref[(3, 2, 1, 1)]=0.589959672933
            arg[(3, 2, 2, 0)]=-0.246958921973*x[0] + (0.289741432288)*x[1]
            ref[(3, 2, 2, 0)]=0.0213912551574
            arg[(3, 2, 2, 1)]=0.650669127782*x[0] + (-0.54197880781)*x[1]
            ref[(3, 2, 2, 1)]=0.0543451599857
            arg[(3, 2, 3, 0)]=-0.901655429569*x[0] + (-0.931418686981)*x[1]
            ref[(3, 2, 3, 0)]=-0.916537058275
            arg[(3, 2, 3, 1)]=0.439896897389*x[0] + (-0.580062843874)*x[1]
            ref[(3, 2, 3, 1)]=-0.0700829732427
        else:
            arg[(0, 0, 0, 0)]=0.24996859121*x[0] + (0.305347985167)*x[1] + (-0.161925472551)*x[2]
            ref[(0, 0, 0, 0)]=0.196695551913
            arg[(0, 0, 0, 1)]=-0.217299183784*x[0] + (-0.607706562152)*x[1] + (-0.0739234729022)*x[2]
            ref[(0, 0, 0, 1)]=-0.449464609419
            arg[(0, 0, 1, 0)]=0.963135369722*x[0] + (0.690839762993)*x[1] + (0.769832475836)*x[2]
            ref[(0, 0, 1, 0)]=1.21190380428
            arg[(0, 0, 1, 1)]=0.602496281333*x[0] + (-0.336754258951)*x[1] + (0.390466126901)*x[2]
            ref[(0, 0, 1, 1)]=0.328104074641
            arg[(0, 0, 2, 0)]=0.539227265328*x[0] + (-0.0400849850862)*x[1] + (0.814321963654)*x[2]
            ref[(0, 0, 2, 0)]=0.656732121948
            arg[(0, 0, 2, 1)]=0.634200786884*x[0] + (0.96745423743)*x[1] + (0.799347145584)*x[2]
            ref[(0, 0, 2, 1)]=1.20050108495
            arg[(0, 0, 3, 0)]=-0.568034912028*x[0] + (-0.559870456261)*x[1] + (-0.522097413961)*x[2]
            ref[(0, 0, 3, 0)]=-0.825001391125
            arg[(0, 0, 3, 1)]=-0.40264129184*x[0] + (0.66129797343)*x[1] + (0.623590395096)*x[2]
            ref[(0, 0, 3, 1)]=0.441123538343
            arg[(0, 1, 0, 0)]=0.66884867704*x[0] + (0.525700563694)*x[1] + (0.992489757473)*x[2]
            ref[(0, 1, 0, 0)]=1.0935194991
            arg[(0, 1, 0, 1)]=-0.460206740103*x[0] + (0.9318082369)*x[1] + (-0.418061260873)*x[2]
            ref[(0, 1, 0, 1)]=0.026770117962
            arg[(0, 1, 1, 0)]=0.958243051252*x[0] + (-0.46844755309)*x[1] + (-0.149101000552)*x[2]
            ref[(0, 1, 1, 0)]=0.170347248805
            arg[(0, 1, 1, 1)]=0.408784456912*x[0] + (0.463615834771)*x[1] + (0.913830901436)*x[2]
            ref[(0, 1, 1, 1)]=0.89311559656
            arg[(0, 1, 2, 0)]=0.544977233935*x[0] + (-0.00295748540245)*x[1] + (-0.360034441197)*x[2]
            ref[(0, 1, 2, 0)]=0.090992653668
            arg[(0, 1, 2, 1)]=0.159858288765*x[0] + (0.0309229029049)*x[1] + (-0.994932646556)*x[2]
            ref[(0, 1, 2, 1)]=-0.402075727443
            arg[(0, 1, 3, 0)]=-0.244039160418*x[0] + (0.537151165063)*x[1] + (-0.799962203313)*x[2]
            ref[(0, 1, 3, 0)]=-0.253425099334
            arg[(0, 1, 3, 1)]=0.407989782108*x[0] + (-0.264933306991)*x[1] + (-0.395022508812)*x[2]
            ref[(0, 1, 3, 1)]=-0.125983016848
            arg[(0, 2, 0, 0)]=0.991390704847*x[0] + (0.488348500019)*x[1] + (0.256780317757)*x[2]
            ref[(0, 2, 0, 0)]=0.868259761311
            arg[(0, 2, 0, 1)]=0.122655411585*x[0] + (0.342579682095)*x[1] + (0.102398781477)*x[2]
            ref[(0, 2, 0, 1)]=0.283816937578
            arg[(0, 2, 1, 0)]=-0.805984499807*x[0] + (0.829778243278)*x[1] + (-0.1407415491)*x[2]
            ref[(0, 2, 1, 0)]=-0.0584739028146
            arg[(0, 2, 1, 1)]=0.664846547949*x[0] + (-0.563105339571)*x[1] + (0.619212605612)*x[2]
            ref[(0, 2, 1, 1)]=0.360476906995
            arg[(0, 2, 2, 0)]=-0.840774359067*x[0] + (-0.0871341801632)*x[1] + (0.0355001811811)*x[2]
            ref[(0, 2, 2, 0)]=-0.446204179025
            arg[(0, 2, 2, 1)]=-0.265807932002*x[0] + (-0.334896710713)*x[1] + (-0.874182396491)*x[2]
            ref[(0, 2, 2, 1)]=-0.737443519603
            arg[(0, 2, 3, 0)]=-0.140132959767*x[0] + (0.514159187128)*x[1] + (-0.086732871703)*x[2]
            ref[(0, 2, 3, 0)]=0.143646677829
            arg[(0, 2, 3, 1)]=-0.707769489102*x[0] + (-0.450977582723)*x[1] + (0.498219592069)*x[2]
            ref[(0, 2, 3, 1)]=-0.330263739878
            arg[(1, 0, 0, 0)]=0.190144495342*x[0] + (-0.561750394471)*x[1] + (-0.642399509247)*x[2]
            ref[(1, 0, 0, 0)]=-0.507002704188
            arg[(1, 0, 0, 1)]=-0.770383398236*x[0] + (-0.922398374793)*x[1] + (-0.40675921322)*x[2]
            ref[(1, 0, 0, 1)]=-1.04977049312
            arg[(1, 0, 1, 0)]=0.91034201807*x[0] + (-0.0921877951407)*x[1] + (0.298210774718)*x[2]
            ref[(1, 0, 1, 0)]=0.558182498823
            arg[(1, 0, 1, 1)]=-0.93995801577*x[0] + (-0.702519207212)*x[1] + (-0.492930544134)*x[2]
            ref[(1, 0, 1, 1)]=-1.06770388356
            arg[(1, 0, 2, 0)]=-0.197392208887*x[0] + (-0.333561482858)*x[1] + (0.677705839266)*x[2]
            ref[(1, 0, 2, 0)]=0.073376073761
            arg[(1, 0, 2, 1)]=-0.744899904609*x[0] + (-0.0657166365077)*x[1] + (-0.300634928447)*x[2]
            ref[(1, 0, 2, 1)]=-0.555625734782
            arg[(1, 0, 3, 0)]=-0.361677886728*x[0] + (-0.748100050953)*x[1] + (0.24590586204)*x[2]
            ref[(1, 0, 3, 0)]=-0.43193603782
            arg[(1, 0, 3, 1)]=-0.847717571493*x[0] + (0.79443729875)*x[1] + (0.0691984528997)*x[2]
            ref[(1, 0, 3, 1)]=0.00795909007862
            arg[(1, 1, 0, 0)]=-0.129523088882*x[0] + (-0.251078105518)*x[1] + (-0.852699618998)*x[2]
            ref[(1, 1, 0, 0)]=-0.616650406699
            arg[(1, 1, 0, 1)]=-0.861396537383*x[0] + (-0.890755088744)*x[1] + (-0.790599748385)*x[2]
            ref[(1, 1, 0, 1)]=-1.27137568726
            arg[(1, 1, 1, 0)]=-0.428745830138*x[0] + (-0.713661889424)*x[1] + (0.181025150173)*x[2]
            ref[(1, 1, 1, 0)]=-0.480691284695
            arg[(1, 1, 1, 1)]=0.595958653444*x[0] + (-0.72036189532)*x[1] + (0.189779338288)*x[2]
            ref[(1, 1, 1, 1)]=0.0326880482061
            arg[(1, 1, 2, 0)]=0.502593132057*x[0] + (-0.199063051304)*x[1] + (-0.943816802432)*x[2]
            ref[(1, 1, 2, 0)]=-0.32014336084
            arg[(1, 1, 2, 1)]=-0.989507453086*x[0] + (-0.265579783113)*x[1] + (0.319451158546)*x[2]
            ref[(1, 1, 2, 1)]=-0.467818038827
            arg[(1, 1, 3, 0)]=-0.369853377142*x[0] + (0.734223266397)*x[1] + (0.201081066466)*x[2]
            ref[(1, 1, 3, 0)]=0.282725477861
            arg[(1, 1, 3, 1)]=0.343757365153*x[0] + (-0.788900514132)*x[1] + (-0.315456746769)*x[2]
            ref[(1, 1, 3, 1)]=-0.380299947873
            arg[(1, 2, 0, 0)]=0.850682445077*x[0] + (-0.876699556797)*x[1] + (0.140897280739)*x[2]
            ref[(1, 2, 0, 0)]=0.0574400845095
            arg[(1, 2, 0, 1)]=-0.542544230218*x[0] + (-0.412397088628)*x[1] + (-0.691574836768)*x[2]
            ref[(1, 2, 0, 1)]=-0.823258077807
            arg[(1, 2, 1, 0)]=0.141814317159*x[0] + (0.367397784902)*x[1] + (-0.167560760244)*x[2]
            ref[(1, 2, 1, 0)]=0.170825670908
            arg[(1, 2, 1, 1)]=-0.696091973233*x[0] + (-0.88242299183)*x[1] + (0.819311886526)*x[2]
            ref[(1, 2, 1, 1)]=-0.379601539269
            arg[(1, 2, 2, 0)]=0.0116342104741*x[0] + (-0.379413462327)*x[1] + (0.911020070975)*x[2]
            ref[(1, 2, 2, 0)]=0.271620409561
            arg[(1, 2, 2, 1)]=0.682244531563*x[0] + (0.469967936411)*x[1] + (0.626492721018)*x[2]
            ref[(1, 2, 2, 1)]=0.889352594496
            arg[(1, 2, 3, 0)]=0.990840021629*x[0] + (-0.252095113365)*x[1] + (0.750169098294)*x[2]
            ref[(1, 2, 3, 0)]=0.744457003279
            arg[(1, 2, 3, 1)]=-0.0226404906763*x[0] + (0.675312554404)*x[1] + (0.0305090942039)*x[2]
            ref[(1, 2, 3, 1)]=0.341590578966
            arg[(2, 0, 0, 0)]=-0.758152650568*x[0] + (0.700283490299)*x[1] + (0.099054773673)*x[2]
            ref[(2, 0, 0, 0)]=0.0205928067021
            arg[(2, 0, 0, 1)]=-0.227433323141*x[0] + (0.695959822999)*x[1] + (0.06239373072)*x[2]
            ref[(2, 0, 0, 1)]=0.265460115289
            arg[(2, 0, 1, 0)]=0.838439414692*x[0] + (0.711075523954)*x[1] + (0.685146448274)*x[2]
            ref[(2, 0, 1, 0)]=1.11733069346
            arg[(2, 0, 1, 1)]=-0.774256798668*x[0] + (-0.226083765369)*x[1] + (-0.210157647399)*x[2]
            ref[(2, 0, 1, 1)]=-0.605249105718
            arg[(2, 0, 2, 0)]=0.290709329846*x[0] + (0.567456754094)*x[1] + (-0.110478956216)*x[2]
            ref[(2, 0, 2, 0)]=0.373843563862
            arg[(2, 0, 2, 1)]=-0.00748358288838*x[0] + (-0.132944514089)*x[1] + (0.889051740502)*x[2]
            ref[(2, 0, 2, 1)]=0.374311821762
            arg[(2, 0, 3, 0)]=-0.103784213596*x[0] + (-0.883144421957)*x[1] + (-0.192742668525)*x[2]
            ref[(2, 0, 3, 0)]=-0.589835652039
            arg[(2, 0, 3, 1)]=0.201769692854*x[0] + (-0.396817441423)*x[1] + (0.512206385275)*x[2]
            ref[(2, 0, 3, 1)]=0.158579318353
            arg[(2, 1, 0, 0)]=-0.956429295813*x[0] + (0.516580574558)*x[1] + (-0.242124183444)*x[2]
            ref[(2, 1, 0, 0)]=-0.340986452349
            arg[(2, 1, 0, 1)]=-0.559726484046*x[0] + (0.641394640555)*x[1] + (0.33588253198)*x[2]
            ref[(2, 1, 0, 1)]=0.208775344245
            arg[(2, 1, 1, 0)]=-0.655863718829*x[0] + (0.800030373571)*x[1] + (0.0318521655918)*x[2]
            ref[(2, 1, 1, 0)]=0.0880094101669
            arg[(2, 1, 1, 1)]=-0.318753940418*x[0] + (-0.50896114723)*x[1] + (-0.721535836758)*x[2]
            ref[(2, 1, 1, 1)]=-0.774625462203
            arg[(2, 1, 2, 0)]=-0.0156889205206*x[0] + (0.915906415847)*x[1] + (0.256176991068)*x[2]
            ref[(2, 1, 2, 0)]=0.578197243197
            arg[(2, 1, 2, 1)]=-0.699229438087*x[0] + (-0.0489331413411)*x[1] + (-0.419163592242)*x[2]
            ref[(2, 1, 2, 1)]=-0.583663085835
            arg[(2, 1, 3, 0)]=-0.146989005468*x[0] + (-0.417757567014)*x[1] + (-0.691355834956)*x[2]
            ref[(2, 1, 3, 0)]=-0.628051203719
            arg[(2, 1, 3, 1)]=0.297157520324*x[0] + (0.849792542555)*x[1] + (-0.731231070987)*x[2]
            ref[(2, 1, 3, 1)]=0.207859495946
            arg[(2, 2, 0, 0)]=0.163199296892*x[0] + (0.443340814307)*x[1] + (-0.655154270583)*x[2]
            ref[(2, 2, 0, 0)]=-0.0243070796923
            arg[(2, 2, 0, 1)]=0.618609833529*x[0] + (-0.450927861101)*x[1] + (-0.492074778304)*x[2]
            ref[(2, 2, 0, 1)]=-0.162196402938
            arg[(2, 2, 1, 0)]=-0.20148264388*x[0] + (-0.223479815027)*x[1] + (0.406687836343)*x[2]
            ref[(2, 2, 1, 0)]=-0.0091373112822
            arg[(2, 2, 1, 1)]=-0.452563754049*x[0] + (-0.996551992488)*x[1] + (0.351597771978)*x[2]
            ref[(2, 2, 1, 1)]=-0.548758987279
            arg[(2, 2, 2, 0)]=-0.134876323849*x[0] + (0.0471587750361)*x[1] + (0.513067741623)*x[2]
            ref[(2, 2, 2, 0)]=0.212675096405
            arg[(2, 2, 2, 1)]=0.170277184615*x[0] + (-0.184967302482)*x[1] + (0.386008418412)*x[2]
            ref[(2, 2, 2, 1)]=0.185659150272
            arg[(2, 2, 3, 0)]=-0.0287718069923*x[0] + (-0.0903029267347)*x[1] + (0.699784042869)*x[2]
            ref[(2, 2, 3, 0)]=0.290354654571
            arg[(2, 2, 3, 1)]=0.673606171387*x[0] + (-0.359418117441)*x[1] + (-0.350343421019)*x[2]
            ref[(2, 2, 3, 1)]=-0.0180776835369
            arg[(3, 0, 0, 0)]=-0.683441423026*x[0] + (-0.745984516934)*x[1] + (0.175413161927)*x[2]
            ref[(3, 0, 0, 0)]=-0.627006389016
            arg[(3, 0, 0, 1)]=0.801654433768*x[0] + (0.305999534898)*x[1] + (-0.320527713302)*x[2]
            ref[(3, 0, 0, 1)]=0.393563127682
            arg[(3, 0, 1, 0)]=0.833170424762*x[0] + (-0.584152701454)*x[1] + (0.541716095839)*x[2]
            ref[(3, 0, 1, 0)]=0.395366909573
            arg[(3, 0, 1, 1)]=0.398905611409*x[0] + (0.589541907741)*x[1] + (0.450420342384)*x[2]
            ref[(3, 0, 1, 1)]=0.719433930767
            arg[(3, 0, 2, 0)]=0.384310995572*x[0] + (-0.903534479407)*x[1] + (-0.102724481007)*x[2]
            ref[(3, 0, 2, 0)]=-0.310973982421
            arg[(3, 0, 2, 1)]=0.300622831247*x[0] + (-0.698174324482)*x[1] + (-0.307737723968)*x[2]
            ref[(3, 0, 2, 1)]=-0.352644608602
            arg[(3, 0, 3, 0)]=-0.471895790107*x[0] + (0.174848652034)*x[1] + (-0.345854653453)*x[2]
            ref[(3, 0, 3, 0)]=-0.321450895763
            arg[(3, 0, 3, 1)]=-0.88973988208*x[0] + (-0.602130975016)*x[1] + (0.182284888583)*x[2]
            ref[(3, 0, 3, 1)]=-0.654792984257
            arg[(3, 1, 0, 0)]=0.393297974922*x[0] + (-0.722903903588)*x[1] + (-0.40712465736)*x[2]
            ref[(3, 1, 0, 0)]=-0.368365293013
            arg[(3, 1, 0, 1)]=-0.310993504965*x[0] + (-0.72970139381)*x[1] + (-0.154778953639)*x[2]
            ref[(3, 1, 0, 1)]=-0.597736926207
            arg[(3, 1, 1, 0)]=0.1761910766*x[0] + (0.688881496035)*x[1] + (-0.899178787013)*x[2]
            ref[(3, 1, 1, 0)]=-0.0170531071895
            arg[(3, 1, 1, 1)]=0.815749220679*x[0] + (-0.938985017621)*x[1] + (0.687674088352)*x[2]
            ref[(3, 1, 1, 1)]=0.282219145705
            arg[(3, 1, 2, 0)]=-0.572256610722*x[0] + (-0.418707656784)*x[1] + (-0.543195952446)*x[2]
            ref[(3, 1, 2, 0)]=-0.767080109976
            arg[(3, 1, 2, 1)]=0.948702680658*x[0] + (0.490219327224)*x[1] + (0.939948088614)*x[2]
            ref[(3, 1, 2, 1)]=1.18943504825
            arg[(3, 1, 3, 0)]=-0.342980460318*x[0] + (0.471256417935)*x[1] + (-0.17384187917)*x[2]
            ref[(3, 1, 3, 0)]=-0.0227829607765
            arg[(3, 1, 3, 1)]=-0.705616790268*x[0] + (-0.204159738061)*x[1] + (-0.834359937735)*x[2]
            ref[(3, 1, 3, 1)]=-0.872068233032
            arg[(3, 2, 0, 0)]=-0.201730941075*x[0] + (-0.133141908159)*x[1] + (0.159440388574)*x[2]
            ref[(3, 2, 0, 0)]=-0.0877162303297
            arg[(3, 2, 0, 1)]=0.541919040058*x[0] + (0.606903122295)*x[1] + (-0.295561427454)*x[2]
            ref[(3, 2, 0, 1)]=0.42663036745
            arg[(3, 2, 1, 0)]=0.383034296105*x[0] + (0.721325261034)*x[1] + (-0.29614352528)*x[2]
            ref[(3, 2, 1, 0)]=0.404108015929
            arg[(3, 2, 1, 1)]=-0.122388001053*x[0] + (-0.528931450838)*x[1] + (-0.900342301829)*x[2]
            ref[(3, 2, 1, 1)]=-0.77583087686
            arg[(3, 2, 2, 0)]=0.0289717123384*x[0] + (0.17455979529)*x[1] + (-0.554914579175)*x[2]
            ref[(3, 2, 2, 0)]=-0.175691535773
            arg[(3, 2, 2, 1)]=-0.681090776641*x[0] + (-0.551996382985)*x[1] + (0.0765883239079)*x[2]
            ref[(3, 2, 2, 1)]=-0.578249417859
            arg[(3, 2, 3, 0)]=0.626678096233*x[0] + (0.856521600345)*x[1] + (-0.507126702338)*x[2]
            ref[(3, 2, 3, 0)]=0.48803649712
            arg[(3, 2, 3, 1)]=0.748884017013*x[0] + (-0.569896654855)*x[1] + (-0.632388342916)*x[2]
            ref[(3, 2, 3, 1)]=-0.226700490379
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 3, 4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.0419383878885*x[0] + (-0.513530090087)*x[1]
            ref=-0.277734238987
        else:
            arg=0.00926835962745*x[0] + (-0.436016188347)*x[1] + (-0.185647009789)*x[2]
            ref=-0.306197419254
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=-0.468929795425*x[0] + (-0.719619396015)*x[1]
            ref[(0,)]=-0.59427459572
            arg[(1,)]=-0.563597178219*x[0] + (-0.996046980612)*x[1]
            ref[(1,)]=-0.779822079415
            arg[(2,)]=0.513245375629*x[0] + (-0.99194711252)*x[1]
            ref[(2,)]=-0.239350868446
        else:
            arg[(0,)]=0.889611917981*x[0] + (-0.731344772455)*x[1] + (-0.368750894198)*x[2]
            ref[(0,)]=-0.105241874336
            arg[(1,)]=-0.46412380255*x[0] + (-0.183767411993)*x[1] + (0.681241229447)*x[2]
            ref[(1,)]=0.0166750074521
            arg[(2,)]=0.531613339387*x[0] + (0.124501820286)*x[1] + (-0.798581912973)*x[2]
            ref[(2,)]=-0.07123337665
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3),w)
        ref=numpy.zeros((2, 3),numpy.float_)
        if dim==2:
            arg[(0, 0)]=-0.221075030843*x[0] + (0.587127661696)*x[1]
            ref[(0, 0)]=0.183026315427
            arg[(0, 1)]=-0.210184752726*x[0] + (0.173539169113)*x[1]
            ref[(0, 1)]=-0.0183227918065
            arg[(0, 2)]=0.221850550168*x[0] + (-0.0148605274109)*x[1]
            ref[(0, 2)]=0.103495011379
            arg[(1, 0)]=0.866750747551*x[0] + (0.501230463874)*x[1]
            ref[(1, 0)]=0.683990605713
            arg[(1, 1)]=0.496099787233*x[0] + (0.203911948349)*x[1]
            ref[(1, 1)]=0.350005867791
            arg[(1, 2)]=0.025231515084*x[0] + (-0.920405702865)*x[1]
            ref[(1, 2)]=-0.44758709389
        else:
            arg[(0, 0)]=0.188417477221*x[0] + (-0.971018187548)*x[1] + (0.695177404778)*x[2]
            ref[(0, 0)]=-0.0437116527749
            arg[(0, 1)]=-0.341655132905*x[0] + (0.0686476528623)*x[1] + (-0.25362195258)*x[2]
            ref[(0, 1)]=-0.263314716311
            arg[(0, 2)]=0.925285915113*x[0] + (0.752847879099)*x[1] + (0.452725693232)*x[2]
            ref[(0, 2)]=1.06542974372
            arg[(1, 0)]=0.259388899171*x[0] + (0.903689879618)*x[1] + (-0.658699573192)*x[2]
            ref[(1, 0)]=0.252189602799
            arg[(1, 1)]=0.303137026007*x[0] + (-0.311421354469)*x[1] + (0.30422789286)*x[2]
            ref[(1, 1)]=0.147971782199
            arg[(1, 2)]=0.278146743436*x[0] + (-0.375079463156)*x[1] + (0.985975360542)*x[2]
            ref[(1, 2)]=0.444521320411
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(4, 4, 3),w)
        ref=numpy.zeros((4, 4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=0.682060552675*x[0] + (0.375148932369)*x[1]
            ref[(0, 0, 0)]=0.528604742522
            arg[(0, 0, 1)]=-0.00228147498567*x[0] + (-0.490246699138)*x[1]
            ref[(0, 0, 1)]=-0.246264087062
            arg[(0, 0, 2)]=-0.627360082085*x[0] + (0.678328031413)*x[1]
            ref[(0, 0, 2)]=0.0254839746641
            arg[(0, 1, 0)]=0.743963206899*x[0] + (-0.656282993586)*x[1]
            ref[(0, 1, 0)]=0.0438401066568
            arg[(0, 1, 1)]=-0.22188224797*x[0] + (0.214764082825)*x[1]
            ref[(0, 1, 1)]=-0.00355908257263
            arg[(0, 1, 2)]=-0.447978092049*x[0] + (-0.283964602246)*x[1]
            ref[(0, 1, 2)]=-0.365971347147
            arg[(0, 2, 0)]=0.559039594538*x[0] + (0.971649085764)*x[1]
            ref[(0, 2, 0)]=0.765344340151
            arg[(0, 2, 1)]=-0.733096334466*x[0] + (0.569211994853)*x[1]
            ref[(0, 2, 1)]=-0.0819421698066
            arg[(0, 2, 2)]=-0.517358703596*x[0] + (-0.475219675205)*x[1]
            ref[(0, 2, 2)]=-0.4962891894
            arg[(0, 3, 0)]=0.952187408976*x[0] + (0.891663217522)*x[1]
            ref[(0, 3, 0)]=0.921925313249
            arg[(0, 3, 1)]=-0.73999881902*x[0] + (0.107511758314)*x[1]
            ref[(0, 3, 1)]=-0.316243530353
            arg[(0, 3, 2)]=-0.125607566707*x[0] + (0.949528045012)*x[1]
            ref[(0, 3, 2)]=0.411960239153
            arg[(1, 0, 0)]=-0.420273495766*x[0] + (0.831981888083)*x[1]
            ref[(1, 0, 0)]=0.205854196158
            arg[(1, 0, 1)]=-0.952073830427*x[0] + (0.635732052658)*x[1]
            ref[(1, 0, 1)]=-0.158170888884
            arg[(1, 0, 2)]=-0.548617485429*x[0] + (0.381850518041)*x[1]
            ref[(1, 0, 2)]=-0.0833834836942
            arg[(1, 1, 0)]=-0.387215984877*x[0] + (0.0240596363672)*x[1]
            ref[(1, 1, 0)]=-0.181578174255
            arg[(1, 1, 1)]=0.947344593085*x[0] + (-0.945948165412)*x[1]
            ref[(1, 1, 1)]=0.000698213836543
            arg[(1, 1, 2)]=-0.716704492768*x[0] + (-0.553242259146)*x[1]
            ref[(1, 1, 2)]=-0.634973375957
            arg[(1, 2, 0)]=0.842995359792*x[0] + (-0.0396545638877)*x[1]
            ref[(1, 2, 0)]=0.401670397952
            arg[(1, 2, 1)]=-0.303298235777*x[0] + (-0.643726321501)*x[1]
            ref[(1, 2, 1)]=-0.473512278639
            arg[(1, 2, 2)]=-0.995869250497*x[0] + (0.796987884675)*x[1]
            ref[(1, 2, 2)]=-0.0994406829108
            arg[(1, 3, 0)]=0.756513184886*x[0] + (0.427377369963)*x[1]
            ref[(1, 3, 0)]=0.591945277425
            arg[(1, 3, 1)]=-0.358532960897*x[0] + (0.154397403042)*x[1]
            ref[(1, 3, 1)]=-0.102067778928
            arg[(1, 3, 2)]=-0.30727559867*x[0] + (-0.354496688905)*x[1]
            ref[(1, 3, 2)]=-0.330886143788
            arg[(2, 0, 0)]=0.564817998332*x[0] + (0.503516012167)*x[1]
            ref[(2, 0, 0)]=0.534167005249
            arg[(2, 0, 1)]=0.779372833143*x[0] + (-0.949749659837)*x[1]
            ref[(2, 0, 1)]=-0.0851884133471
            arg[(2, 0, 2)]=0.0938114784316*x[0] + (0.423909286572)*x[1]
            ref[(2, 0, 2)]=0.258860382502
            arg[(2, 1, 0)]=-0.641735960537*x[0] + (0.289830454251)*x[1]
            ref[(2, 1, 0)]=-0.175952753143
            arg[(2, 1, 1)]=0.914654908766*x[0] + (0.983229563362)*x[1]
            ref[(2, 1, 1)]=0.948942236064
            arg[(2, 1, 2)]=-0.230139415346*x[0] + (-0.0140386148635)*x[1]
            ref[(2, 1, 2)]=-0.122089015105
            arg[(2, 2, 0)]=0.845525450472*x[0] + (-0.25941132211)*x[1]
            ref[(2, 2, 0)]=0.293057064181
            arg[(2, 2, 1)]=0.451384016719*x[0] + (0.58141734794)*x[1]
            ref[(2, 2, 1)]=0.51640068233
            arg[(2, 2, 2)]=0.606571268551*x[0] + (-0.411601792311)*x[1]
            ref[(2, 2, 2)]=0.09748473812
            arg[(2, 3, 0)]=-0.47203484265*x[0] + (0.359571633651)*x[1]
            ref[(2, 3, 0)]=-0.0562316044993
            arg[(2, 3, 1)]=0.0239081518789*x[0] + (0.345131189517)*x[1]
            ref[(2, 3, 1)]=0.184519670698
            arg[(2, 3, 2)]=-0.869247903551*x[0] + (-0.773886889174)*x[1]
            ref[(2, 3, 2)]=-0.821567396362
            arg[(3, 0, 0)]=0.585055877004*x[0] + (0.195884677718)*x[1]
            ref[(3, 0, 0)]=0.390470277361
            arg[(3, 0, 1)]=-0.225314777833*x[0] + (-0.581313079473)*x[1]
            ref[(3, 0, 1)]=-0.403313928653
            arg[(3, 0, 2)]=0.5765956469*x[0] + (0.702090467104)*x[1]
            ref[(3, 0, 2)]=0.639343057002
            arg[(3, 1, 0)]=-0.272615874679*x[0] + (-0.0843041255679)*x[1]
            ref[(3, 1, 0)]=-0.178460000123
            arg[(3, 1, 1)]=-0.0515587438888*x[0] + (0.918228235022)*x[1]
            ref[(3, 1, 1)]=0.433334745566
            arg[(3, 1, 2)]=-0.539855900554*x[0] + (0.87668537625)*x[1]
            ref[(3, 1, 2)]=0.168414737848
            arg[(3, 2, 0)]=0.763321206552*x[0] + (-0.335552221539)*x[1]
            ref[(3, 2, 0)]=0.213884492507
            arg[(3, 2, 1)]=0.588031014199*x[0] + (0.849476869939)*x[1]
            ref[(3, 2, 1)]=0.718753942069
            arg[(3, 2, 2)]=0.313827621855*x[0] + (0.0941393718493)*x[1]
            ref[(3, 2, 2)]=0.203983496852
            arg[(3, 3, 0)]=-0.384101320604*x[0] + (-0.42500717502)*x[1]
            ref[(3, 3, 0)]=-0.404554247812
            arg[(3, 3, 1)]=0.804484802323*x[0] + (0.915321559031)*x[1]
            ref[(3, 3, 1)]=0.859903180677
            arg[(3, 3, 2)]=-0.45989802511*x[0] + (0.755064087587)*x[1]
            ref[(3, 3, 2)]=0.147583031239
        else:
            arg[(0, 0, 0)]=0.140959537326*x[0] + (0.762409414042)*x[1] + (-0.768750402518)*x[2]
            ref[(0, 0, 0)]=0.0673092744252
            arg[(0, 0, 1)]=0.676510371364*x[0] + (0.555975438148)*x[1] + (0.164528373321)*x[2]
            ref[(0, 0, 1)]=0.698507091416
            arg[(0, 0, 2)]=-0.520725962862*x[0] + (0.200194257531)*x[1] + (-0.418186256968)*x[2]
            ref[(0, 0, 2)]=-0.369358981149
            arg[(0, 1, 0)]=0.0047628589545*x[0] + (0.480542839919)*x[1] + (0.500345371372)*x[2]
            ref[(0, 1, 0)]=0.492825535123
            arg[(0, 1, 1)]=0.473232161553*x[0] + (0.0809751281555)*x[1] + (-0.71260707163)*x[2]
            ref[(0, 1, 1)]=-0.0791998909608
            arg[(0, 1, 2)]=-0.77619341577*x[0] + (0.939163706522)*x[1] + (-0.504430509558)*x[2]
            ref[(0, 1, 2)]=-0.170730109403
            arg[(0, 2, 0)]=-0.169970817658*x[0] + (0.0927674981161)*x[1] + (0.295590563944)*x[2]
            ref[(0, 2, 0)]=0.109193622201
            arg[(0, 2, 1)]=-0.339223296904*x[0] + (-0.0666773391551)*x[1] + (-0.0376312141548)*x[2]
            ref[(0, 2, 1)]=-0.221765925107
            arg[(0, 2, 2)]=0.370908820077*x[0] + (-0.966944272256)*x[1] + (0.5684983673)*x[2]
            ref[(0, 2, 2)]=-0.0137685424394
            arg[(0, 3, 0)]=0.76470142829*x[0] + (0.25396363495)*x[1] + (-0.657139621023)*x[2]
            ref[(0, 3, 0)]=0.180762721108
            arg[(0, 3, 1)]=0.146356902748*x[0] + (0.255138357702)*x[1] + (0.685715933572)*x[2]
            ref[(0, 3, 1)]=0.543605597011
            arg[(0, 3, 2)]=-0.801051393454*x[0] + (0.543073296155)*x[1] + (-0.637172348407)*x[2]
            ref[(0, 3, 2)]=-0.447575222853
            arg[(1, 0, 0)]=-0.0751178775252*x[0] + (0.858070211918)*x[1] + (0.651085485379)*x[2]
            ref[(1, 0, 0)]=0.717018909886
            arg[(1, 0, 1)]=-0.4138667108*x[0] + (-0.517151929519)*x[1] + (-0.107127301937)*x[2]
            ref[(1, 0, 1)]=-0.519072971128
            arg[(1, 0, 2)]=-0.418404179514*x[0] + (0.179454100366)*x[1] + (0.106569918223)*x[2]
            ref[(1, 0, 2)]=-0.0661900804627
            arg[(1, 1, 0)]=0.73592097999*x[0] + (-0.438754046744)*x[1] + (-0.351099589126)*x[2]
            ref[(1, 1, 0)]=-0.0269663279399
            arg[(1, 1, 1)]=0.244625585334*x[0] + (-0.263231680451)*x[1] + (0.0174169877024)*x[2]
            ref[(1, 1, 1)]=-0.000594553707336
            arg[(1, 1, 2)]=-0.170723228702*x[0] + (0.484884394647)*x[1] + (-0.308517904103)*x[2]
            ref[(1, 1, 2)]=0.00282163092125
            arg[(1, 2, 0)]=0.600160674081*x[0] + (-0.668911547937)*x[1] + (-0.00355561942729)*x[2]
            ref[(1, 2, 0)]=-0.0361532466417
            arg[(1, 2, 1)]=-0.00558135095198*x[0] + (-0.372797537653)*x[1] + (-0.479765654031)*x[2]
            ref[(1, 2, 1)]=-0.429072271318
            arg[(1, 2, 2)]=0.707019812333*x[0] + (-0.202655753071)*x[1] + (0.939356821842)*x[2]
            ref[(1, 2, 2)]=0.721860440552
            arg[(1, 3, 0)]=-0.650334040002*x[0] + (-0.580758937732)*x[1] + (-0.691704118283)*x[2]
            ref[(1, 3, 0)]=-0.961398548008
            arg[(1, 3, 1)]=0.0734736283103*x[0] + (-0.748884161839)*x[1] + (-0.562404150502)*x[2]
            ref[(1, 3, 1)]=-0.618907342015
            arg[(1, 3, 2)]=-0.486060749572*x[0] + (-0.818603177608)*x[1] + (0.325701876007)*x[2]
            ref[(1, 3, 2)]=-0.489481025587
            arg[(2, 0, 0)]=-0.347075850269*x[0] + (0.268405747566)*x[1] + (-0.585110787662)*x[2]
            ref[(2, 0, 0)]=-0.331890445183
            arg[(2, 0, 1)]=0.746824556861*x[0] + (0.538311260541)*x[1] + (0.196032768054)*x[2]
            ref[(2, 0, 1)]=0.740584292728
            arg[(2, 0, 2)]=-0.305991895744*x[0] + (0.18145962862)*x[1] + (0.211396247485)*x[2]
            ref[(2, 0, 2)]=0.0434319901801
            arg[(2, 1, 0)]=0.182505936305*x[0] + (0.381888433979)*x[1] + (0.64079418941)*x[2]
            ref[(2, 1, 0)]=0.602594279847
            arg[(2, 1, 1)]=-0.325548867087*x[0] + (0.837753298208)*x[1] + (-0.920599251092)*x[2]
            ref[(2, 1, 1)]=-0.204197409985
            arg[(2, 1, 2)]=0.637457875625*x[0] + (-0.137255236113)*x[1] + (0.957668926091)*x[2]
            ref[(2, 1, 2)]=0.728935782801
            arg[(2, 2, 0)]=0.0430289305417*x[0] + (0.00258883541807)*x[1] + (0.434512223916)*x[2]
            ref[(2, 2, 0)]=0.240064994938
            arg[(2, 2, 1)]=-0.973864473941*x[0] + (0.6467059886)*x[1] + (-0.943623087697)*x[2]
            ref[(2, 2, 1)]=-0.635390786519
            arg[(2, 2, 2)]=-0.838760848638*x[0] + (-0.201328921957)*x[1] + (-0.210029633825)*x[2]
            ref[(2, 2, 2)]=-0.62505970221
            arg[(2, 3, 0)]=-0.908261530933*x[0] + (0.454692349024)*x[1] + (0.596011272544)*x[2]
            ref[(2, 3, 0)]=0.0712210453179
            arg[(2, 3, 1)]=-0.928293811673*x[0] + (-0.643811265704)*x[1] + (0.530097427188)*x[2]
            ref[(2, 3, 1)]=-0.521003825095
            arg[(2, 3, 2)]=-0.859562574907*x[0] + (-0.259211868139)*x[1] + (-0.370682792004)*x[2]
            ref[(2, 3, 2)]=-0.744728617525
            arg[(3, 0, 0)]=0.934663794756*x[0] + (-0.189933935052)*x[1] + (0.246305272607)*x[2]
            ref[(3, 0, 0)]=0.495517566156
            arg[(3, 0, 1)]=0.225403821432*x[0] + (-0.913052525788)*x[1] + (0.552064861826)*x[2]
            ref[(3, 0, 1)]=-0.0677919212651
            arg[(3, 0, 2)]=0.974190946785*x[0] + (0.918273852792)*x[1] + (-0.0354110365656)*x[2]
            ref[(3, 0, 2)]=0.928526881506
            arg[(3, 1, 0)]=-0.634625420563*x[0] + (-0.803396398143)*x[1] + (-0.707386864802)*x[2]
            ref[(3, 1, 0)]=-1.07270434175
            arg[(3, 1, 1)]=-0.902106950979*x[0] + (-0.0368215047118)*x[1] + (0.877691363067)*x[2]
            ref[(3, 1, 1)]=-0.0306185463118
            arg[(3, 1, 2)]=0.24332035891*x[0] + (-0.863863991767)*x[1] + (-0.904442787686)*x[2]
            ref[(3, 1, 2)]=-0.762493210272
            arg[(3, 2, 0)]=0.96077236863*x[0] + (0.605008803891)*x[1] + (0.406956351682)*x[2]
            ref[(3, 2, 0)]=0.986368762102
            arg[(3, 2, 1)]=-0.284286867756*x[0] + (0.022918071823)*x[1] + (-0.456961858389)*x[2]
            ref[(3, 2, 1)]=-0.359165327161
            arg[(3, 2, 2)]=-0.941414545968*x[0] + (-0.423358307967)*x[1] + (0.0730833950518)*x[2]
            ref[(3, 2, 2)]=-0.645844729442
            arg[(3, 3, 0)]=0.385660360078*x[0] + (-0.364417139659)*x[1] + (0.689815122281)*x[2]
            ref[(3, 3, 0)]=0.35552917135
            arg[(3, 3, 1)]=0.980935552037*x[0] + (-0.737303481843)*x[1] + (0.0601702417871)*x[2]
            ref[(3, 3, 1)]=0.151901155991
            arg[(3, 3, 2)]=-0.0330791239179*x[0] + (0.203435300493)*x[1] + (-0.998834163901)*x[2]
            ref[(3, 3, 2)]=-0.414238993663
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedContinuousFunction_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedContinuousFunction(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedContinuousFunction(self.domain)
        x = w.getX()
        arg = Data(0,(3, 4, 4, 3),w)
        ref=numpy.zeros((3, 4, 4, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.512643792749*x[0] + (0.72529951436)*x[1]
            ref[(0, 0, 0, 0)]=0.106327860806
            arg[(0, 0, 0, 1)]=0.202407974216*x[0] + (-0.572071849313)*x[1]
            ref[(0, 0, 0, 1)]=-0.184831937549
            arg[(0, 0, 0, 2)]=-0.152828278457*x[0] + (-0.796824905364)*x[1]
            ref[(0, 0, 0, 2)]=-0.47482659191
            arg[(0, 0, 1, 0)]=0.130178096512*x[0] + (-0.954008846494)*x[1]
            ref[(0, 0, 1, 0)]=-0.411915374991
            arg[(0, 0, 1, 1)]=-0.470633012457*x[0] + (-0.823888341641)*x[1]
            ref[(0, 0, 1, 1)]=-0.647260677049
            arg[(0, 0, 1, 2)]=0.735469365759*x[0] + (-0.184624819301)*x[1]
            ref[(0, 0, 1, 2)]=0.275422273229
            arg[(0, 0, 2, 0)]=-0.528996459776*x[0] + (-0.181261432842)*x[1]
            ref[(0, 0, 2, 0)]=-0.355128946309
            arg[(0, 0, 2, 1)]=-0.0807841761788*x[0] + (-0.807205665092)*x[1]
            ref[(0, 0, 2, 1)]=-0.443994920635
            arg[(0, 0, 2, 2)]=0.302251593772*x[0] + (-0.543618254191)*x[1]
            ref[(0, 0, 2, 2)]=-0.12068333021
            arg[(0, 0, 3, 0)]=-0.803544660124*x[0] + (0.39688961377)*x[1]
            ref[(0, 0, 3, 0)]=-0.203327523177
            arg[(0, 0, 3, 1)]=0.275563355869*x[0] + (0.0792106660084)*x[1]
            ref[(0, 0, 3, 1)]=0.177387010939
            arg[(0, 0, 3, 2)]=-0.972634389858*x[0] + (-0.132540973632)*x[1]
            ref[(0, 0, 3, 2)]=-0.552587681745
            arg[(0, 1, 0, 0)]=0.571811568867*x[0] + (0.865529342516)*x[1]
            ref[(0, 1, 0, 0)]=0.718670455691
            arg[(0, 1, 0, 1)]=0.851768760746*x[0] + (0.124394727259)*x[1]
            ref[(0, 1, 0, 1)]=0.488081744003
            arg[(0, 1, 0, 2)]=0.718137919725*x[0] + (-0.326684295167)*x[1]
            ref[(0, 1, 0, 2)]=0.195726812279
            arg[(0, 1, 1, 0)]=-0.982744130388*x[0] + (-0.193866861901)*x[1]
            ref[(0, 1, 1, 0)]=-0.588305496144
            arg[(0, 1, 1, 1)]=-0.817539633492*x[0] + (-0.397752080605)*x[1]
            ref[(0, 1, 1, 1)]=-0.607645857049
            arg[(0, 1, 1, 2)]=-0.050763647403*x[0] + (0.742456066472)*x[1]
            ref[(0, 1, 1, 2)]=0.345846209534
            arg[(0, 1, 2, 0)]=0.748171313759*x[0] + (0.926360749286)*x[1]
            ref[(0, 1, 2, 0)]=0.837266031523
            arg[(0, 1, 2, 1)]=-0.0524574584046*x[0] + (-0.797965736556)*x[1]
            ref[(0, 1, 2, 1)]=-0.42521159748
            arg[(0, 1, 2, 2)]=0.88429942071*x[0] + (0.184719026024)*x[1]
            ref[(0, 1, 2, 2)]=0.534509223367
            arg[(0, 1, 3, 0)]=-0.823608709218*x[0] + (0.513633003893)*x[1]
            ref[(0, 1, 3, 0)]=-0.154987852663
            arg[(0, 1, 3, 1)]=0.82935593164*x[0] + (0.445653698998)*x[1]
            ref[(0, 1, 3, 1)]=0.637504815319
            arg[(0, 1, 3, 2)]=-0.613759687403*x[0] + (0.594942892205)*x[1]
            ref[(0, 1, 3, 2)]=-0.00940839759899
            arg[(0, 2, 0, 0)]=0.00264967586736*x[0] + (0.966104981512)*x[1]
            ref[(0, 2, 0, 0)]=0.48437732869
            arg[(0, 2, 0, 1)]=0.82140079678*x[0] + (0.949805883239)*x[1]
            ref[(0, 2, 0, 1)]=0.885603340009
            arg[(0, 2, 0, 2)]=-0.671928412836*x[0] + (0.724012202674)*x[1]
            ref[(0, 2, 0, 2)]=0.0260418949192
            arg[(0, 2, 1, 0)]=0.806517057054*x[0] + (0.692626505656)*x[1]
            ref[(0, 2, 1, 0)]=0.749571781355
            arg[(0, 2, 1, 1)]=-0.603911173289*x[0] + (-0.327069633)*x[1]
            ref[(0, 2, 1, 1)]=-0.465490403145
            arg[(0, 2, 1, 2)]=0.587811426506*x[0] + (0.896760528373)*x[1]
            ref[(0, 2, 1, 2)]=0.74228597744
            arg[(0, 2, 2, 0)]=-0.572800901604*x[0] + (-0.617520145457)*x[1]
            ref[(0, 2, 2, 0)]=-0.59516052353
            arg[(0, 2, 2, 1)]=-0.429166010935*x[0] + (-0.735984453266)*x[1]
            ref[(0, 2, 2, 1)]=-0.5825752321
            arg[(0, 2, 2, 2)]=0.253612169268*x[0] + (-0.13753304563)*x[1]
            ref[(0, 2, 2, 2)]=0.0580395618191
            arg[(0, 2, 3, 0)]=0.93686555875*x[0] + (-0.79389119102)*x[1]
            ref[(0, 2, 3, 0)]=0.0714871838646
            arg[(0, 2, 3, 1)]=-0.0637377569576*x[0] + (-0.772990459648)*x[1]
            ref[(0, 2, 3, 1)]=-0.418364108303
            arg[(0, 2, 3, 2)]=0.254640363389*x[0] + (-0.993973812762)*x[1]
            ref[(0, 2, 3, 2)]=-0.369666724687
            arg[(0, 3, 0, 0)]=-0.0457593543918*x[0] + (0.914001069761)*x[1]
            ref[(0, 3, 0, 0)]=0.434120857685
            arg[(0, 3, 0, 1)]=-0.389176020593*x[0] + (0.236160040696)*x[1]
            ref[(0, 3, 0, 1)]=-0.0765079899483
            arg[(0, 3, 0, 2)]=-0.795741949096*x[0] + (-0.585140376552)*x[1]
            ref[(0, 3, 0, 2)]=-0.690441162824
            arg[(0, 3, 1, 0)]=0.817731274782*x[0] + (0.159698588876)*x[1]
            ref[(0, 3, 1, 0)]=0.488714931829
            arg[(0, 3, 1, 1)]=-0.174840281231*x[0] + (0.208631884722)*x[1]
            ref[(0, 3, 1, 1)]=0.0168958017453
            arg[(0, 3, 1, 2)]=-0.046064704959*x[0] + (-0.193391215725)*x[1]
            ref[(0, 3, 1, 2)]=-0.119727960342
            arg[(0, 3, 2, 0)]=-0.0762902271553*x[0] + (-0.428131820943)*x[1]
            ref[(0, 3, 2, 0)]=-0.252211024049
            arg[(0, 3, 2, 1)]=-0.740415334606*x[0] + (-0.859871545387)*x[1]
            ref[(0, 3, 2, 1)]=-0.800143439996
            arg[(0, 3, 2, 2)]=-0.624703249737*x[0] + (0.884374383926)*x[1]
            ref[(0, 3, 2, 2)]=0.129835567095
            arg[(0, 3, 3, 0)]=-0.35881767832*x[0] + (-0.650284121791)*x[1]
            ref[(0, 3, 3, 0)]=-0.504550900055
            arg[(0, 3, 3, 1)]=-0.756821614063*x[0] + (0.47213873892)*x[1]
            ref[(0, 3, 3, 1)]=-0.142341437571
            arg[(0, 3, 3, 2)]=-0.232589733164*x[0] + (0.0603425613162)*x[1]
            ref[(0, 3, 3, 2)]=-0.0861235859237
            arg[(1, 0, 0, 0)]=-0.105730910463*x[0] + (0.632623681086)*x[1]
            ref[(1, 0, 0, 0)]=0.263446385311
            arg[(1, 0, 0, 1)]=0.384303098947*x[0] + (0.0644639443481)*x[1]
            ref[(1, 0, 0, 1)]=0.224383521648
            arg[(1, 0, 0, 2)]=-0.567028891297*x[0] + (0.136008913377)*x[1]
            ref[(1, 0, 0, 2)]=-0.21550998896
            arg[(1, 0, 1, 0)]=-0.850971747885*x[0] + (-0.549738080732)*x[1]
            ref[(1, 0, 1, 0)]=-0.700354914308
            arg[(1, 0, 1, 1)]=-0.300054645463*x[0] + (0.147058665494)*x[1]
            ref[(1, 0, 1, 1)]=-0.0764979899845
            arg[(1, 0, 1, 2)]=0.65394404121*x[0] + (-0.35860687829)*x[1]
            ref[(1, 0, 1, 2)]=0.14766858146
            arg[(1, 0, 2, 0)]=-0.892806825199*x[0] + (-0.574430788226)*x[1]
            ref[(1, 0, 2, 0)]=-0.733618806712
            arg[(1, 0, 2, 1)]=-0.584353220462*x[0] + (0.640246548777)*x[1]
            ref[(1, 0, 2, 1)]=0.0279466641573
            arg[(1, 0, 2, 2)]=-0.901126159928*x[0] + (-0.563292039115)*x[1]
            ref[(1, 0, 2, 2)]=-0.732209099521
            arg[(1, 0, 3, 0)]=0.061169443377*x[0] + (-0.426909783963)*x[1]
            ref[(1, 0, 3, 0)]=-0.182870170293
            arg[(1, 0, 3, 1)]=0.511258175873*x[0] + (0.697106021454)*x[1]
            ref[(1, 0, 3, 1)]=0.604182098663
            arg[(1, 0, 3, 2)]=-0.0523004801673*x[0] + (-0.000342240314104)*x[1]
            ref[(1, 0, 3, 2)]=-0.0263213602407
            arg[(1, 1, 0, 0)]=-0.119893502749*x[0] + (-0.701500899399)*x[1]
            ref[(1, 1, 0, 0)]=-0.410697201074
            arg[(1, 1, 0, 1)]=0.285069129555*x[0] + (0.543283516329)*x[1]
            ref[(1, 1, 0, 1)]=0.414176322942
            arg[(1, 1, 0, 2)]=0.982555484759*x[0] + (-0.839051923673)*x[1]
            ref[(1, 1, 0, 2)]=0.0717517805429
            arg[(1, 1, 1, 0)]=0.351333732791*x[0] + (0.839852746446)*x[1]
            ref[(1, 1, 1, 0)]=0.595593239618
            arg[(1, 1, 1, 1)]=-0.200621405428*x[0] + (-0.878485555799)*x[1]
            ref[(1, 1, 1, 1)]=-0.539553480614
            arg[(1, 1, 1, 2)]=0.218448647792*x[0] + (0.538609142298)*x[1]
            ref[(1, 1, 1, 2)]=0.378528895045
            arg[(1, 1, 2, 0)]=0.679340205539*x[0] + (0.949823902719)*x[1]
            ref[(1, 1, 2, 0)]=0.814582054129
            arg[(1, 1, 2, 1)]=0.811487716834*x[0] + (-0.908922768314)*x[1]
            ref[(1, 1, 2, 1)]=-0.0487175257398
            arg[(1, 1, 2, 2)]=-0.45903311003*x[0] + (-0.66368178362)*x[1]
            ref[(1, 1, 2, 2)]=-0.561357446825
            arg[(1, 1, 3, 0)]=0.481365084506*x[0] + (-0.433134461201)*x[1]
            ref[(1, 1, 3, 0)]=0.0241153116523
            arg[(1, 1, 3, 1)]=-0.8777938481*x[0] + (-0.0399166888492)*x[1]
            ref[(1, 1, 3, 1)]=-0.458855268475
            arg[(1, 1, 3, 2)]=0.296958486551*x[0] + (-0.609410893682)*x[1]
            ref[(1, 1, 3, 2)]=-0.156226203565
            arg[(1, 2, 0, 0)]=0.910071740726*x[0] + (-0.949005845997)*x[1]
            ref[(1, 2, 0, 0)]=-0.0194670526358
            arg[(1, 2, 0, 1)]=0.239941123476*x[0] + (-0.0520587294411)*x[1]
            ref[(1, 2, 0, 1)]=0.0939411970172
            arg[(1, 2, 0, 2)]=0.375208378061*x[0] + (0.350164093753)*x[1]
            ref[(1, 2, 0, 2)]=0.362686235907
            arg[(1, 2, 1, 0)]=-0.831387079548*x[0] + (0.508958497372)*x[1]
            ref[(1, 2, 1, 0)]=-0.161214291088
            arg[(1, 2, 1, 1)]=-0.600213274679*x[0] + (0.812156613603)*x[1]
            ref[(1, 2, 1, 1)]=0.105971669462
            arg[(1, 2, 1, 2)]=0.638645874466*x[0] + (0.982341489802)*x[1]
            ref[(1, 2, 1, 2)]=0.810493682134
            arg[(1, 2, 2, 0)]=0.991515243336*x[0] + (0.839387699684)*x[1]
            ref[(1, 2, 2, 0)]=0.91545147151
            arg[(1, 2, 2, 1)]=-0.668649314677*x[0] + (0.236336335424)*x[1]
            ref[(1, 2, 2, 1)]=-0.216156489626
            arg[(1, 2, 2, 2)]=0.599698438109*x[0] + (-0.667616703027)*x[1]
            ref[(1, 2, 2, 2)]=-0.0339591324588
            arg[(1, 2, 3, 0)]=-0.204465981889*x[0] + (-0.0483261314358)*x[1]
            ref[(1, 2, 3, 0)]=-0.126396056662
            arg[(1, 2, 3, 1)]=0.0167401528774*x[0] + (0.870611447103)*x[1]
            ref[(1, 2, 3, 1)]=0.44367579999
            arg[(1, 2, 3, 2)]=-0.966096133236*x[0] + (-0.590654484463)*x[1]
            ref[(1, 2, 3, 2)]=-0.77837530885
            arg[(1, 3, 0, 0)]=0.698649354863*x[0] + (-0.962634416535)*x[1]
            ref[(1, 3, 0, 0)]=-0.131992530836
            arg[(1, 3, 0, 1)]=-0.611449256787*x[0] + (0.757567954138)*x[1]
            ref[(1, 3, 0, 1)]=0.0730593486753
            arg[(1, 3, 0, 2)]=-0.75878033808*x[0] + (-0.35197739092)*x[1]
            ref[(1, 3, 0, 2)]=-0.5553788645
            arg[(1, 3, 1, 0)]=-0.0101787839725*x[0] + (0.0204925041725)*x[1]
            ref[(1, 3, 1, 0)]=0.00515686009997
            arg[(1, 3, 1, 1)]=-0.21164512898*x[0] + (-0.0835671476766)*x[1]
            ref[(1, 3, 1, 1)]=-0.147606138329
            arg[(1, 3, 1, 2)]=0.183741111969*x[0] + (0.94287165508)*x[1]
            ref[(1, 3, 1, 2)]=0.563306383524
            arg[(1, 3, 2, 0)]=-0.987585002038*x[0] + (-0.233848517551)*x[1]
            ref[(1, 3, 2, 0)]=-0.610716759795
            arg[(1, 3, 2, 1)]=-0.0013859241629*x[0] + (0.586420653667)*x[1]
            ref[(1, 3, 2, 1)]=0.292517364752
            arg[(1, 3, 2, 2)]=-0.509520176078*x[0] + (-0.00241598081765)*x[1]
            ref[(1, 3, 2, 2)]=-0.255968078448
            arg[(1, 3, 3, 0)]=-0.573854715707*x[0] + (-0.81846046762)*x[1]
            ref[(1, 3, 3, 0)]=-0.696157591663
            arg[(1, 3, 3, 1)]=-0.939252827984*x[0] + (-0.481423326634)*x[1]
            ref[(1, 3, 3, 1)]=-0.710338077309
            arg[(1, 3, 3, 2)]=-0.22055661706*x[0] + (0.662403673811)*x[1]
            ref[(1, 3, 3, 2)]=0.220923528376
            arg[(2, 0, 0, 0)]=-0.799113033954*x[0] + (0.129436892263)*x[1]
            ref[(2, 0, 0, 0)]=-0.334838070846
            arg[(2, 0, 0, 1)]=0.856033458372*x[0] + (0.59431254218)*x[1]
            ref[(2, 0, 0, 1)]=0.725173000276
            arg[(2, 0, 0, 2)]=0.0424985794813*x[0] + (0.35990039906)*x[1]
            ref[(2, 0, 0, 2)]=0.201199489271
            arg[(2, 0, 1, 0)]=-0.427298780752*x[0] + (-0.129957507295)*x[1]
            ref[(2, 0, 1, 0)]=-0.278628144023
            arg[(2, 0, 1, 1)]=0.0862313931064*x[0] + (-0.495692762035)*x[1]
            ref[(2, 0, 1, 1)]=-0.204730684465
            arg[(2, 0, 1, 2)]=0.17247087556*x[0] + (0.905745137599)*x[1]
            ref[(2, 0, 1, 2)]=0.53910800658
            arg[(2, 0, 2, 0)]=0.116127079713*x[0] + (0.614411260987)*x[1]
            ref[(2, 0, 2, 0)]=0.36526917035
            arg[(2, 0, 2, 1)]=0.379614215521*x[0] + (-0.791571459728)*x[1]
            ref[(2, 0, 2, 1)]=-0.205978622103
            arg[(2, 0, 2, 2)]=-0.680034139568*x[0] + (0.197436927566)*x[1]
            ref[(2, 0, 2, 2)]=-0.241298606001
            arg[(2, 0, 3, 0)]=-0.659078526843*x[0] + (-0.308848394271)*x[1]
            ref[(2, 0, 3, 0)]=-0.483963460557
            arg[(2, 0, 3, 1)]=-0.998034371763*x[0] + (0.70225986566)*x[1]
            ref[(2, 0, 3, 1)]=-0.147887253052
            arg[(2, 0, 3, 2)]=0.0628248193983*x[0] + (0.0544577369119)*x[1]
            ref[(2, 0, 3, 2)]=0.0586412781551
            arg[(2, 1, 0, 0)]=0.651821791426*x[0] + (0.048638939351)*x[1]
            ref[(2, 1, 0, 0)]=0.350230365389
            arg[(2, 1, 0, 1)]=0.971875428874*x[0] + (0.776893595641)*x[1]
            ref[(2, 1, 0, 1)]=0.874384512258
            arg[(2, 1, 0, 2)]=-0.476026965603*x[0] + (-0.0656326106858)*x[1]
            ref[(2, 1, 0, 2)]=-0.270829788145
            arg[(2, 1, 1, 0)]=-0.127622236013*x[0] + (-0.716485116027)*x[1]
            ref[(2, 1, 1, 0)]=-0.42205367602
            arg[(2, 1, 1, 1)]=0.209699116646*x[0] + (0.749977024381)*x[1]
            ref[(2, 1, 1, 1)]=0.479838070514
            arg[(2, 1, 1, 2)]=-0.720591738017*x[0] + (-0.469267174427)*x[1]
            ref[(2, 1, 1, 2)]=-0.594929456222
            arg[(2, 1, 2, 0)]=0.135983188901*x[0] + (-0.786204954813)*x[1]
            ref[(2, 1, 2, 0)]=-0.325110882956
            arg[(2, 1, 2, 1)]=0.269262222904*x[0] + (0.844020748963)*x[1]
            ref[(2, 1, 2, 1)]=0.556641485933
            arg[(2, 1, 2, 2)]=-0.854426864809*x[0] + (0.739361422974)*x[1]
            ref[(2, 1, 2, 2)]=-0.0575327209174
            arg[(2, 1, 3, 0)]=0.197187991638*x[0] + (-0.622311301758)*x[1]
            ref[(2, 1, 3, 0)]=-0.21256165506
            arg[(2, 1, 3, 1)]=0.367077840841*x[0] + (0.193844390258)*x[1]
            ref[(2, 1, 3, 1)]=0.280461115549
            arg[(2, 1, 3, 2)]=0.419134665272*x[0] + (-0.669473184937)*x[1]
            ref[(2, 1, 3, 2)]=-0.125169259832
            arg[(2, 2, 0, 0)]=-0.81754555465*x[0] + (0.975361456797)*x[1]
            ref[(2, 2, 0, 0)]=0.0789079510731
            arg[(2, 2, 0, 1)]=-0.207599443772*x[0] + (-0.519639539029)*x[1]
            ref[(2, 2, 0, 1)]=-0.363619491401
            arg[(2, 2, 0, 2)]=0.175956614654*x[0] + (-0.596647002951)*x[1]
            ref[(2, 2, 0, 2)]=-0.210345194148
            arg[(2, 2, 1, 0)]=-0.429161962191*x[0] + (0.704212597594)*x[1]
            ref[(2, 2, 1, 0)]=0.137525317702
            arg[(2, 2, 1, 1)]=-0.722264652867*x[0] + (-0.657740470705)*x[1]
            ref[(2, 2, 1, 1)]=-0.690002561786
            arg[(2, 2, 1, 2)]=0.161210034843*x[0] + (-0.144291833107)*x[1]
            ref[(2, 2, 1, 2)]=0.00845910086799
            arg[(2, 2, 2, 0)]=0.858906173932*x[0] + (-0.533914254441)*x[1]
            ref[(2, 2, 2, 0)]=0.162495959745
            arg[(2, 2, 2, 1)]=0.752862348695*x[0] + (0.00873778480442)*x[1]
            ref[(2, 2, 2, 1)]=0.38080006675
            arg[(2, 2, 2, 2)]=-0.0443578623159*x[0] + (0.161902640475)*x[1]
            ref[(2, 2, 2, 2)]=0.0587723890798
            arg[(2, 2, 3, 0)]=-0.118420143718*x[0] + (0.863822323073)*x[1]
            ref[(2, 2, 3, 0)]=0.372701089678
            arg[(2, 2, 3, 1)]=-0.162209212709*x[0] + (0.987829873943)*x[1]
            ref[(2, 2, 3, 1)]=0.412810330617
            arg[(2, 2, 3, 2)]=0.303878843043*x[0] + (-0.350886915817)*x[1]
            ref[(2, 2, 3, 2)]=-0.0235040363866
            arg[(2, 3, 0, 0)]=-0.706808586267*x[0] + (0.783137489217)*x[1]
            ref[(2, 3, 0, 0)]=0.0381644514753
            arg[(2, 3, 0, 1)]=-0.426963581518*x[0] + (-0.280673416378)*x[1]
            ref[(2, 3, 0, 1)]=-0.353818498948
            arg[(2, 3, 0, 2)]=-0.32375370242*x[0] + (0.080309219301)*x[1]
            ref[(2, 3, 0, 2)]=-0.121722241559
            arg[(2, 3, 1, 0)]=-0.801801375685*x[0] + (0.336279985505)*x[1]
            ref[(2, 3, 1, 0)]=-0.23276069509
            arg[(2, 3, 1, 1)]=-0.859133707609*x[0] + (-0.525004667596)*x[1]
            ref[(2, 3, 1, 1)]=-0.692069187602
            arg[(2, 3, 1, 2)]=-0.541109645936*x[0] + (0.781324136683)*x[1]
            ref[(2, 3, 1, 2)]=0.120107245373
            arg[(2, 3, 2, 0)]=-0.190132919132*x[0] + (-0.0399146796167)*x[1]
            ref[(2, 3, 2, 0)]=-0.115023799374
            arg[(2, 3, 2, 1)]=0.875237309483*x[0] + (-0.800974161435)*x[1]
            ref[(2, 3, 2, 1)]=0.037131574024
            arg[(2, 3, 2, 2)]=-0.295821855102*x[0] + (0.0251183280629)*x[1]
            ref[(2, 3, 2, 2)]=-0.13535176352
            arg[(2, 3, 3, 0)]=0.444835822826*x[0] + (0.971742684468)*x[1]
            ref[(2, 3, 3, 0)]=0.708289253647
            arg[(2, 3, 3, 1)]=-0.174690025212*x[0] + (-0.390928952307)*x[1]
            ref[(2, 3, 3, 1)]=-0.28280948876
            arg[(2, 3, 3, 2)]=0.157988712697*x[0] + (-0.870145975964)*x[1]
            ref[(2, 3, 3, 2)]=-0.356078631633
        else:
            arg[(0, 0, 0, 0)]=0.168951177765*x[0] + (0.771525073645)*x[1] + (0.919264916569)*x[2]
            ref[(0, 0, 0, 0)]=0.92987058399
            arg[(0, 0, 0, 1)]=0.0100027625245*x[0] + (0.338251672088)*x[1] + (-0.182234738862)*x[2]
            ref[(0, 0, 0, 1)]=0.0830098478753
            arg[(0, 0, 0, 2)]=0.326942062114*x[0] + (-0.67739339605)*x[1] + (-0.44592291457)*x[2]
            ref[(0, 0, 0, 2)]=-0.398187124253
            arg[(0, 0, 1, 0)]=0.0941417811109*x[0] + (-0.487902209332)*x[1] + (-0.57124971543)*x[2]
            ref[(0, 0, 1, 0)]=-0.482505071826
            arg[(0, 0, 1, 1)]=-0.925843622115*x[0] + (-0.470649188161)*x[1] + (-0.30926620619)*x[2]
            ref[(0, 0, 1, 1)]=-0.852879508233
            arg[(0, 0, 1, 2)]=0.441478318636*x[0] + (-0.685130505321)*x[1] + (0.525104469958)*x[2]
            ref[(0, 0, 1, 2)]=0.140726141636
            arg[(0, 0, 2, 0)]=-0.73142036076*x[0] + (-0.81871759908)*x[1] + (0.190547363772)*x[2]
            ref[(0, 0, 2, 0)]=-0.679795298034
            arg[(0, 0, 2, 1)]=0.884709991736*x[0] + (-0.950402593354)*x[1] + (0.109576000988)*x[2]
            ref[(0, 0, 2, 1)]=0.0219416996852
            arg[(0, 0, 2, 2)]=0.41981893925*x[0] + (-0.356161312379)*x[1] + (-0.149754946386)*x[2]
            ref[(0, 0, 2, 2)]=-0.0430486597574
            arg[(0, 0, 3, 0)]=-0.690592782588*x[0] + (0.505383740131)*x[1] + (-0.405307164399)*x[2]
            ref[(0, 0, 3, 0)]=-0.295258103428
            arg[(0, 0, 3, 1)]=0.843866257698*x[0] + (0.287524336588)*x[1] + (0.522202338051)*x[2]
            ref[(0, 0, 3, 1)]=0.826796466169
            arg[(0, 0, 3, 2)]=-0.962105867476*x[0] + (0.192115242878)*x[1] + (0.173122479232)*x[2]
            ref[(0, 0, 3, 2)]=-0.298434072683
            arg[(0, 1, 0, 0)]=-0.583960652417*x[0] + (0.310567818225)*x[1] + (0.156825893712)*x[2]
            ref[(0, 1, 0, 0)]=-0.0582834702404
            arg[(0, 1, 0, 1)]=0.507098611111*x[0] + (0.96168631785)*x[1] + (-0.0143410427159)*x[2]
            ref[(0, 1, 0, 1)]=0.727221943122
            arg[(0, 1, 0, 2)]=0.392536138887*x[0] + (0.831252882325)*x[1] + (0.786839363882)*x[2]
            ref[(0, 1, 0, 2)]=1.00531419255
            arg[(0, 1, 1, 0)]=0.0609264365957*x[0] + (0.121908189102)*x[1] + (0.0941595647211)*x[2]
            ref[(0, 1, 1, 0)]=0.138497095209
            arg[(0, 1, 1, 1)]=0.526067023426*x[0] + (-0.970628733376)*x[1] + (-0.688820178807)*x[2]
            ref[(0, 1, 1, 1)]=-0.566690944379
            arg[(0, 1, 1, 2)]=-0.709190895261*x[0] + (0.337228315682)*x[1] + (0.450732500128)*x[2]
            ref[(0, 1, 1, 2)]=0.0393849602747
            arg[(0, 1, 2, 0)]=-0.521404923544*x[0] + (-0.971853914748)*x[1] + (-0.208453519257)*x[2]
            ref[(0, 1, 2, 0)]=-0.850856178775
            arg[(0, 1, 2, 1)]=-0.599993906744*x[0] + (0.802241689418)*x[1] + (-0.817150107079)*x[2]
            ref[(0, 1, 2, 1)]=-0.307451162203
            arg[(0, 1, 2, 2)]=0.0899563136372*x[0] + (-0.651468080703)*x[1] + (0.0371081755401)*x[2]
            ref[(0, 1, 2, 2)]=-0.262201795763
            arg[(0, 1, 3, 0)]=-0.0945103024083*x[0] + (-0.767461818438)*x[1] + (0.64427020891)*x[2]
            ref[(0, 1, 3, 0)]=-0.108850955968
            arg[(0, 1, 3, 1)]=-0.288988309213*x[0] + (-0.976211849109)*x[1] + (-0.694246194893)*x[2]
            ref[(0, 1, 3, 1)]=-0.979723176607
            arg[(0, 1, 3, 2)]=-0.0302843896627*x[0] + (0.553192617096)*x[1] + (0.193184019486)*x[2]
            ref[(0, 1, 3, 2)]=0.35804612346
            arg[(0, 2, 0, 0)]=-0.447884330598*x[0] + (-0.571292291299)*x[1] + (0.053820727456)*x[2]
            ref[(0, 2, 0, 0)]=-0.48267794722
            arg[(0, 2, 0, 1)]=0.655035181752*x[0] + (0.388156127229)*x[1] + (0.866120515994)*x[2]
            ref[(0, 2, 0, 1)]=0.954655912488
            arg[(0, 2, 0, 2)]=0.968286768862*x[0] + (0.569495289475)*x[1] + (0.309567911955)*x[2]
            ref[(0, 2, 0, 2)]=0.923674985146
            arg[(0, 2, 1, 0)]=-0.0894242376339*x[0] + (0.163102986556)*x[1] + (-0.329600136208)*x[2]
            ref[(0, 2, 1, 0)]=-0.127960693643
            arg[(0, 2, 1, 1)]=0.00253768617247*x[0] + (-0.663720763442)*x[1] + (0.538554728914)*x[2]
            ref[(0, 2, 1, 1)]=-0.0613141741775
            arg[(0, 2, 1, 2)]=-0.356550402299*x[0] + (-0.943640126963)*x[1] + (-0.112415986753)*x[2]
            ref[(0, 2, 1, 2)]=-0.706303258007
            arg[(0, 2, 2, 0)]=0.774743437778*x[0] + (-0.251848266192)*x[1] + (0.599695032165)*x[2]
            ref[(0, 2, 2, 0)]=0.561295101875
            arg[(0, 2, 2, 1)]=-0.829594015639*x[0] + (0.536018879343)*x[1] + (-0.572920756585)*x[2]
            ref[(0, 2, 2, 1)]=-0.43324794644
            arg[(0, 2, 2, 2)]=-0.203039948473*x[0] + (-0.011595077502)*x[1] + (0.255232356428)*x[2]
            ref[(0, 2, 2, 2)]=0.0202986652263
            arg[(0, 2, 3, 0)]=-0.210067531136*x[0] + (0.705847845596)*x[1] + (0.747806788427)*x[2]
            ref[(0, 2, 3, 0)]=0.621793551444
            arg[(0, 2, 3, 1)]=0.765439065124*x[0] + (-0.884825199656)*x[1] + (0.0775559723585)*x[2]
            ref[(0, 2, 3, 1)]=-0.0209150810867
            arg[(0, 2, 3, 2)]=0.102908126918*x[0] + (0.60464894312)*x[1] + (-0.398456069359)*x[2]
            ref[(0, 2, 3, 2)]=0.154550500339
            arg[(0, 3, 0, 0)]=-0.752256888759*x[0] + (0.789323139825)*x[1] + (0.137097387059)*x[2]
            ref[(0, 3, 0, 0)]=0.0870818190623
            arg[(0, 3, 0, 1)]=-0.279615610277*x[0] + (0.709537595074)*x[1] + (0.745097808244)*x[2]
            ref[(0, 3, 0, 1)]=0.587509896521
            arg[(0, 3, 0, 2)]=-0.330443816865*x[0] + (-0.182924007114)*x[1] + (0.384523537032)*x[2]
            ref[(0, 3, 0, 2)]=-0.0644221434736
            arg[(0, 3, 1, 0)]=0.901340338416*x[0] + (-0.96722930651)*x[1] + (0.144702308562)*x[2]
            ref[(0, 3, 1, 0)]=0.0394066702345
            arg[(0, 3, 1, 1)]=-0.021959044844*x[0] + (0.83445533745)*x[1] + (-0.695349905275)*x[2]
            ref[(0, 3, 1, 1)]=0.0585731936657
            arg[(0, 3, 1, 2)]=-0.501883839162*x[0] + (-0.860719945771)*x[1] + (-0.632302765663)*x[2]
            ref[(0, 3, 1, 2)]=-0.997453275298
            arg[(0, 3, 2, 0)]=-0.294192029727*x[0] + (-0.371571744249)*x[1] + (0.380130946909)*x[2]
            ref[(0, 3, 2, 0)]=-0.142816413534
            arg[(0, 3, 2, 1)]=-0.601234973782*x[0] + (-0.886682405422)*x[1] + (-0.196034795569)*x[2]
            ref[(0, 3, 2, 1)]=-0.841976087386
            arg[(0, 3, 2, 2)]=0.0876941344843*x[0] + (0.867080373339)*x[1] + (-0.751338512613)*x[2]
            ref[(0, 3, 2, 2)]=0.101717997605
            arg[(0, 3, 3, 0)]=-0.418954822078*x[0] + (0.840825989198)*x[1] + (0.497702926574)*x[2]
            ref[(0, 3, 3, 0)]=0.459787046847
            arg[(0, 3, 3, 1)]=0.479802299042*x[0] + (0.613705182542)*x[1] + (-0.343048717534)*x[2]
            ref[(0, 3, 3, 1)]=0.375229382025
            arg[(0, 3, 3, 2)]=0.141205754653*x[0] + (-0.78836977332)*x[1] + (-0.812794482412)*x[2]
            ref[(0, 3, 3, 2)]=-0.729979250539
            arg[(1, 0, 0, 0)]=-0.479457519974*x[0] + (0.195713964197)*x[1] + (-0.0858916385265)*x[2]
            ref[(1, 0, 0, 0)]=-0.184817597152
            arg[(1, 0, 0, 1)]=-0.306651830923*x[0] + (0.775556422928)*x[1] + (0.273032796745)*x[2]
            ref[(1, 0, 0, 1)]=0.370968694375
            arg[(1, 0, 0, 2)]=-0.479315615273*x[0] + (0.239566376331)*x[1] + (0.334536364522)*x[2]
            ref[(1, 0, 0, 2)]=0.0473935627896
            arg[(1, 0, 1, 0)]=-0.22439776122*x[0] + (0.746374973092)*x[1] + (-0.478823566219)*x[2]
            ref[(1, 0, 1, 0)]=0.0215768228267
            arg[(1, 0, 1, 1)]=0.260149595031*x[0] + (0.477349418551)*x[1] + (-0.883921355454)*x[2]
            ref[(1, 0, 1, 1)]=-0.0732111709356
            arg[(1, 0, 1, 2)]=-0.510940102121*x[0] + (0.840954030484)*x[1] + (-0.3744910734)*x[2]
            ref[(1, 0, 1, 2)]=-0.0222385725182
            arg[(1, 0, 2, 0)]=-0.723759302734*x[0] + (-0.640297820503)*x[1] + (0.155915182286)*x[2]
            ref[(1, 0, 2, 0)]=-0.604070970475
            arg[(1, 0, 2, 1)]=-0.392317221111*x[0] + (0.99361107463)*x[1] + (0.542121564611)*x[2]
            ref[(1, 0, 2, 1)]=0.571707709065
            arg[(1, 0, 2, 2)]=-0.300815072705*x[0] + (0.727577373709)*x[1] + (0.951874311225)*x[2]
            ref[(1, 0, 2, 2)]=0.689318306115
            arg[(1, 0, 3, 0)]=0.730235101555*x[0] + (-0.111175279406)*x[1] + (-0.346490089311)*x[2]
            ref[(1, 0, 3, 0)]=0.136284866419
            arg[(1, 0, 3, 1)]=-0.64891039898*x[0] + (-0.438918409764)*x[1] + (-0.435172732085)*x[2]
            ref[(1, 0, 3, 1)]=-0.761500770414
            arg[(1, 0, 3, 2)]=0.99471797742*x[0] + (0.42765612547)*x[1] + (0.772333728671)*x[2]
            ref[(1, 0, 3, 2)]=1.09735391578
            arg[(1, 1, 0, 0)]=0.931696306309*x[0] + (-0.276637195393)*x[1] + (0.972597806728)*x[2]
            ref[(1, 1, 0, 0)]=0.813828458822
            arg[(1, 1, 0, 1)]=-0.958670349472*x[0] + (-0.962978328768)*x[1] + (-0.685655148169)*x[2]
            ref[(1, 1, 0, 1)]=-1.3036519132
            arg[(1, 1, 0, 2)]=0.887489622628*x[0] + (-0.0635075869508)*x[1] + (-0.454578618684)*x[2]
            ref[(1, 1, 0, 2)]=0.184701708497
            arg[(1, 1, 1, 0)]=-0.295253960834*x[0] + (-0.983202818749)*x[1] + (0.320190424545)*x[2]
            ref[(1, 1, 1, 0)]=-0.479133177519
            arg[(1, 1, 1, 1)]=-0.345987293758*x[0] + (-0.843837496589)*x[1] + (0.762297274357)*x[2]
            ref[(1, 1, 1, 1)]=-0.213763757995
            arg[(1, 1, 1, 2)]=-0.120994770085*x[0] + (-0.171671363455)*x[1] + (-0.937690948858)*x[2]
            ref[(1, 1, 1, 2)]=-0.615178541199
            arg[(1, 1, 2, 0)]=-0.570919658076*x[0] + (-0.547900997834)*x[1] + (-0.678497294323)*x[2]
            ref[(1, 1, 2, 0)]=-0.898658975117
            arg[(1, 1, 2, 1)]=0.0359299999085*x[0] + (0.737781780529)*x[1] + (0.659852686257)*x[2]
            ref[(1, 1, 2, 1)]=0.716782233347
            arg[(1, 1, 2, 2)]=0.861138076221*x[0] + (-0.872966954692)*x[1] + (-0.399498798859)*x[2]
            ref[(1, 1, 2, 2)]=-0.205663838665
            arg[(1, 1, 3, 0)]=0.00680809648886*x[0] + (0.0270532175173)*x[1] + (-0.158486168175)*x[2]
            ref[(1, 1, 3, 0)]=-0.0623124270845
            arg[(1, 1, 3, 1)]=-0.227897772011*x[0] + (0.934794397441)*x[1] + (0.203490361634)*x[2]
            ref[(1, 1, 3, 1)]=0.455193493532
            arg[(1, 1, 3, 2)]=0.161247528155*x[0] + (0.816779205152)*x[1] + (0.0395759748848)*x[2]
            ref[(1, 1, 3, 2)]=0.508801354096
            arg[(1, 2, 0, 0)]=0.48803026893*x[0] + (-0.31504448902)*x[1] + (0.904108456542)*x[2]
            ref[(1, 2, 0, 0)]=0.538547118226
            arg[(1, 2, 0, 1)]=0.899383488577*x[0] + (-0.148063751621)*x[1] + (-0.636140504275)*x[2]
            ref[(1, 2, 0, 1)]=0.0575896163407
            arg[(1, 2, 0, 2)]=0.104974386898*x[0] + (0.887394238622)*x[1] + (-0.682098234958)*x[2]
            ref[(1, 2, 0, 2)]=0.155135195281
            arg[(1, 2, 1, 0)]=0.558686755225*x[0] + (0.32787885284)*x[1] + (0.310228141841)*x[2]
            ref[(1, 2, 1, 0)]=0.598396874953
            arg[(1, 2, 1, 1)]=0.421237167205*x[0] + (-0.0223467407932)*x[1] + (0.860615467927)*x[2]
            ref[(1, 2, 1, 1)]=0.629752947169
            arg[(1, 2, 1, 2)]=0.597733080976*x[0] + (-0.771545415987)*x[1] + (0.526274652357)*x[2]
            ref[(1, 2, 1, 2)]=0.176231158673
            arg[(1, 2, 2, 0)]=0.387012219136*x[0] + (-0.408198531583)*x[1] + (0.798894383237)*x[2]
            ref[(1, 2, 2, 0)]=0.388854035395
            arg[(1, 2, 2, 1)]=0.301330890417*x[0] + (-0.615306624924)*x[1] + (0.538962623424)*x[2]
            ref[(1, 2, 2, 1)]=0.112493444459
            arg[(1, 2, 2, 2)]=0.265112951583*x[0] + (-0.93823775368)*x[1] + (-0.361427977356)*x[2]
            ref[(1, 2, 2, 2)]=-0.517276389727
            arg[(1, 2, 3, 0)]=-0.967760906933*x[0] + (-0.105486753901)*x[1] + (0.614859928246)*x[2]
            ref[(1, 2, 3, 0)]=-0.229193866294
            arg[(1, 2, 3, 1)]=0.966426763426*x[0] + (0.775285712885)*x[1] + (-0.38530394813)*x[2]
            ref[(1, 2, 3, 1)]=0.67820426409
            arg[(1, 2, 3, 2)]=0.671617241329*x[0] + (0.471389511071)*x[1] + (0.564732986181)*x[2]
            ref[(1, 2, 3, 2)]=0.853869869291
            arg[(1, 3, 0, 0)]=0.931840621823*x[0] + (-0.765089311367)*x[1] + (0.110393711528)*x[2]
            ref[(1, 3, 0, 0)]=0.138572510992
            arg[(1, 3, 0, 1)]=-0.714913620428*x[0] + (0.950192217247)*x[1] + (0.837940718968)*x[2]
            ref[(1, 3, 0, 1)]=0.536609657893
            arg[(1, 3, 0, 2)]=0.0645507457269*x[0] + (-0.404882614075)*x[1] + (0.0822666531552)*x[2]
            ref[(1, 3, 0, 2)]=-0.129032607596
            arg[(1, 3, 1, 0)]=0.13697133938*x[0] + (-0.133460748363)*x[1] + (-0.23666563821)*x[2]
            ref[(1, 3, 1, 0)]=-0.116577523596
            arg[(1, 3, 1, 1)]=0.8286148181*x[0] + (0.0784021959729)*x[1] + (-0.0338378580149)*x[2]
            ref[(1, 3, 1, 1)]=0.436589578029
            arg[(1, 3, 1, 2)]=-0.146163149787*x[0] + (-0.375106008663)*x[1] + (-0.0136297946704)*x[2]
            ref[(1, 3, 1, 2)]=-0.26744947656
            arg[(1, 3, 2, 0)]=0.457299435131*x[0] + (0.171093934037)*x[1] + (0.616478518387)*x[2]
            ref[(1, 3, 2, 0)]=0.622435943778
            arg[(1, 3, 2, 1)]=-0.77102194504*x[0] + (0.592159190274)*x[1] + (-0.856060916625)*x[2]
            ref[(1, 3, 2, 1)]=-0.517461835696
            arg[(1, 3, 2, 2)]=0.419042162997*x[0] + (-0.207289775231)*x[1] + (-0.816583813567)*x[2]
            ref[(1, 3, 2, 2)]=-0.302415712901
            arg[(1, 3, 3, 0)]=-0.0923589732559*x[0] + (0.219038871948)*x[1] + (0.11695334514)*x[2]
            ref[(1, 3, 3, 0)]=0.121816621916
            arg[(1, 3, 3, 1)]=-0.95343906828*x[0] + (-0.0107831081595)*x[1] + (-0.137138556137)*x[2]
            ref[(1, 3, 3, 1)]=-0.550680366289
            arg[(1, 3, 3, 2)]=-0.0591770254616*x[0] + (0.470713665493)*x[1] + (-0.209023143638)*x[2]
            ref[(1, 3, 3, 2)]=0.101256748197
            arg[(2, 0, 0, 0)]=-0.317464335064*x[0] + (-0.573859697593)*x[1] + (-0.856450394628)*x[2]
            ref[(2, 0, 0, 0)]=-0.873887213642
            arg[(2, 0, 0, 1)]=0.563613977283*x[0] + (-0.454713507252)*x[1] + (-0.269441705996)*x[2]
            ref[(2, 0, 0, 1)]=-0.0802706179822
            arg[(2, 0, 0, 2)]=-0.529540137101*x[0] + (0.921799291316)*x[1] + (0.816544110938)*x[2]
            ref[(2, 0, 0, 2)]=0.604401632577
            arg[(2, 0, 1, 0)]=-0.216445136352*x[0] + (0.0856799798794)*x[1] + (-0.0690124309672)*x[2]
            ref[(2, 0, 1, 0)]=-0.09988879372
            arg[(2, 0, 1, 1)]=-0.776954833156*x[0] + (-0.408366425214)*x[1] + (-0.788830423324)*x[2]
            ref[(2, 0, 1, 1)]=-0.987075840847
            arg[(2, 0, 1, 2)]=0.415427726231*x[0] + (-0.172643079744)*x[1] + (0.649310987646)*x[2]
            ref[(2, 0, 1, 2)]=0.446047817067
            arg[(2, 0, 2, 0)]=0.572950594724*x[0] + (-0.835184721803)*x[1] + (0.249255155754)*x[2]
            ref[(2, 0, 2, 0)]=-0.00648948566241
            arg[(2, 0, 2, 1)]=-0.417771586908*x[0] + (0.9803809523)*x[1] + (0.872650011964)*x[2]
            ref[(2, 0, 2, 1)]=0.717629688678
            arg[(2, 0, 2, 2)]=-0.366377585243*x[0] + (-0.940404963612)*x[1] + (0.128262981654)*x[2]
            ref[(2, 0, 2, 2)]=-0.589259783601
            arg[(2, 0, 3, 0)]=-0.397799359257*x[0] + (0.566748238527)*x[1] + (-0.0485370783939)*x[2]
            ref[(2, 0, 3, 0)]=0.0602059004378
            arg[(2, 0, 3, 1)]=0.661852433678*x[0] + (0.299159792797)*x[1] + (0.271908702642)*x[2]
            ref[(2, 0, 3, 1)]=0.616460464558
            arg[(2, 0, 3, 2)]=0.139520093546*x[0] + (-0.733994554493)*x[1] + (0.407297280904)*x[2]
            ref[(2, 0, 3, 2)]=-0.0935885900214
            arg[(2, 1, 0, 0)]=0.715693098624*x[0] + (0.955652147401)*x[1] + (-0.264511426031)*x[2]
            ref[(2, 1, 0, 0)]=0.703416909997
            arg[(2, 1, 0, 1)]=-0.587335683901*x[0] + (0.659647162362)*x[1] + (-0.0235397810356)*x[2]
            ref[(2, 1, 0, 1)]=0.0243858487127
            arg[(2, 1, 0, 2)]=0.86775206321*x[0] + (0.897202775884)*x[1] + (-0.479157006003)*x[2]
            ref[(2, 1, 0, 2)]=0.642898916545
            arg[(2, 1, 1, 0)]=0.229238390567*x[0] + (-0.0122497933748)*x[1] + (-0.212621991751)*x[2]
            ref[(2, 1, 1, 0)]=0.00218330272063
            arg[(2, 1, 1, 1)]=-0.195471045023*x[0] + (-0.178629785306)*x[1] + (-0.132600917702)*x[2]
            ref[(2, 1, 1, 1)]=-0.253350874015
            arg[(2, 1, 1, 2)]=-0.779676095091*x[0] + (-0.270462307074)*x[1] + (-0.307220405857)*x[2]
            ref[(2, 1, 1, 2)]=-0.678679404011
            arg[(2, 1, 2, 0)]=0.697065336765*x[0] + (-0.274345164815)*x[1] + (-0.716781648572)*x[2]
            ref[(2, 1, 2, 0)]=-0.147030738311
            arg[(2, 1, 2, 1)]=-0.747811505502*x[0] + (0.0965370353701)*x[1] + (-0.771203211094)*x[2]
            ref[(2, 1, 2, 1)]=-0.711238840613
            arg[(2, 1, 2, 2)]=-0.813937914169*x[0] + (0.443499957267)*x[1] + (-0.671629574907)*x[2]
            ref[(2, 1, 2, 2)]=-0.521033765904
            arg[(2, 1, 3, 0)]=0.0347678639215*x[0] + (-0.796195936131)*x[1] + (0.084285150778)*x[2]
            ref[(2, 1, 3, 0)]=-0.338571460716
            arg[(2, 1, 3, 1)]=-0.796130798165*x[0] + (-0.997662126321)*x[1] + (-0.00379792907076)*x[2]
            ref[(2, 1, 3, 1)]=-0.898795426778
            arg[(2, 1, 3, 2)]=0.9444857869*x[0] + (0.434976732545)*x[1] + (-0.59312133067)*x[2]
            ref[(2, 1, 3, 2)]=0.393170594387
            arg[(2, 2, 0, 0)]=-0.688043770783*x[0] + (0.468621632454)*x[1] + (0.678334803472)*x[2]
            ref[(2, 2, 0, 0)]=0.229456332571
            arg[(2, 2, 0, 1)]=0.420370793646*x[0] + (-0.103152056016)*x[1] + (0.300793715205)*x[2]
            ref[(2, 2, 0, 1)]=0.309006226417
            arg[(2, 2, 0, 2)]=0.410559299853*x[0] + (-0.480694660009)*x[1] + (-0.234264332602)*x[2]
            ref[(2, 2, 0, 2)]=-0.152199846379
            arg[(2, 2, 1, 0)]=0.742098519516*x[0] + (-0.348898370297)*x[1] + (-0.0582420522682)*x[2]
            ref[(2, 2, 1, 0)]=0.167479048476
            arg[(2, 2, 1, 1)]=-0.438332486209*x[0] + (0.928744711713)*x[1] + (0.495765648067)*x[2]
            ref[(2, 2, 1, 1)]=0.493088936785
            arg[(2, 2, 1, 2)]=-0.956412520439*x[0] + (-0.6393457297)*x[1] + (-0.950593015232)*x[2]
            ref[(2, 2, 1, 2)]=-1.27317563269
            arg[(2, 2, 2, 0)]=-0.790371715076*x[0] + (-0.328302145913)*x[1] + (-0.5935123677)*x[2]
            ref[(2, 2, 2, 0)]=-0.856093114344
            arg[(2, 2, 2, 1)]=-0.142419760779*x[0] + (-0.595685295126)*x[1] + (0.966919302133)*x[2]
            ref[(2, 2, 2, 1)]=0.114407123114
            arg[(2, 2, 2, 2)]=0.0416799694806*x[0] + (-0.562060291395)*x[1] + (-0.399712389987)*x[2]
            ref[(2, 2, 2, 2)]=-0.460046355951
            arg[(2, 2, 3, 0)]=-0.244773137459*x[0] + (-0.611297914599)*x[1] + (-0.778049649503)*x[2]
            ref[(2, 2, 3, 0)]=-0.817060350781
            arg[(2, 2, 3, 1)]=0.948586028608*x[0] + (-0.367302256473)*x[1] + (0.00042523598349)*x[2]
            ref[(2, 2, 3, 1)]=0.290854504059
            arg[(2, 2, 3, 2)]=-0.806296700113*x[0] + (0.426026229946)*x[1] + (0.625584339263)*x[2]
            ref[(2, 2, 3, 2)]=0.122656934548
            arg[(2, 3, 0, 0)]=0.507997407163*x[0] + (0.607542016684)*x[1] + (-0.760731919124)*x[2]
            ref[(2, 3, 0, 0)]=0.177403752362
            arg[(2, 3, 0, 1)]=0.440050004077*x[0] + (0.458481636595)*x[1] + (-0.729534111037)*x[2]
            ref[(2, 3, 0, 1)]=0.0844987648175
            arg[(2, 3, 0, 2)]=-0.612014380777*x[0] + (0.0380814089925)*x[1] + (0.720799721716)*x[2]
            ref[(2, 3, 0, 2)]=0.0734333749657
            arg[(2, 3, 1, 0)]=0.715673861582*x[0] + (-0.576714521319)*x[1] + (-0.584166299045)*x[2]
            ref[(2, 3, 1, 0)]=-0.222603479391
            arg[(2, 3, 1, 1)]=-0.456074655415*x[0] + (0.0921507149818)*x[1] + (0.729532178575)*x[2]
            ref[(2, 3, 1, 1)]=0.182804119071
            arg[(2, 3, 1, 2)]=-0.302563333233*x[0] + (0.549885183098)*x[1] + (-0.0400101891149)*x[2]
            ref[(2, 3, 1, 2)]=0.103655830375
            arg[(2, 3, 2, 0)]=-0.512216679287*x[0] + (0.917884480839)*x[1] + (-0.476904095362)*x[2]
            ref[(2, 3, 2, 0)]=-0.0356181469053
            arg[(2, 3, 2, 1)]=0.457295307327*x[0] + (-0.306177014866)*x[1] + (0.158364594769)*x[2]
            ref[(2, 3, 2, 1)]=0.154741443615
            arg[(2, 3, 2, 2)]=0.0987891368606*x[0] + (0.889717274202)*x[1] + (-0.0685516331767)*x[2]
            ref[(2, 3, 2, 2)]=0.459977388943
            arg[(2, 3, 3, 0)]=-0.058167310296*x[0] + (-0.993131055857)*x[1] + (0.607161729384)*x[2]
            ref[(2, 3, 3, 0)]=-0.222068318384
            arg[(2, 3, 3, 1)]=0.759191453033*x[0] + (0.931175051765)*x[1] + (0.0826711407662)*x[2]
            ref[(2, 3, 3, 1)]=0.886518822782
            arg[(2, 3, 3, 2)]=0.706222008012*x[0] + (-0.650144781803)*x[1] + (0.793331194116)*x[2]
            ref[(2, 3, 3, 2)]=0.424704210162
        res=integrate(arg, where=w_ref)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 4, 4, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank0(self):
        """
        tests integral of rank 0 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(),w)
        if dim==2:
            arg=-0.233140831481*x[0]**o + (-0.791575229759)*x[0] + (-0.037398134035)*x[1]**o + (0.201259085924)*x[1]
            ref=-0.037398134035/(o+1.)+(-0.295158071918)+(-0.233140831481)*0.5**o
        else:
            arg=-0.633080042133*x[0]**o + (-0.374743921926)*x[0] + (-0.938282921697)*x[1]**o + (0.377294589511)*x[1] + (0.457578650581)*x[2]**o + (0.597057584044)*x[2]
            ref=-0.480704271116/(o+1.)+(0.299804125815)+(-0.633080042133)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,float),'wrong type of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank1(self):
        """
        tests integral of rank 1 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3,),w)
        ref=numpy.zeros((3,),numpy.float_)
        if dim==2:
            arg[(0,)]=0.294315458089*x[0]**o + (0.751621742415)*x[0] + (0.493858499433)*x[1]**o + (-0.609094868303)*x[1]
            ref[(0,)]=0.493858499433/(o+1.)+(0.0712634370558)+(0.294315458089)*0.5**o
            arg[(1,)]=-0.0461064640225*x[0]**o + (-0.790428740214)*x[0] + (0.165226998368)*x[1]**o + (-0.427350644297)*x[1]
            ref[(1,)]=0.165226998368/(o+1.)+(-0.608889692256)+(-0.0461064640225)*0.5**o
            arg[(2,)]=-0.404534675377*x[0]**o + (0.170308571928)*x[0] + (-0.569399569035)*x[1]**o + (-0.704471241092)*x[1]
            ref[(2,)]=-0.569399569035/(o+1.)+(-0.267081334582)+(-0.404534675377)*0.5**o
        else:
            arg[(0,)]=-0.139017336703*x[0]**o + (-0.633431590339)*x[0] + (0.735964175877)*x[1]**o + (-0.104217139248)*x[1] + (0.747750888449)*x[2]**o + (-0.307619392971)*x[2]
            ref[(0,)]=1.48371506433/(o+1.)+(-0.522634061279)+(-0.139017336703)*0.5**o
            arg[(1,)]=-0.0157777737775*x[0]**o + (0.0850152064286)*x[0] + (0.211644623042)*x[1]**o + (0.311959895428)*x[1] + (0.779122047457)*x[2]**o + (-0.132984698225)*x[2]
            ref[(1,)]=0.990766670498/(o+1.)+(0.131995201816)+(-0.0157777737775)*0.5**o
            arg[(2,)]=0.0355430832148*x[0]**o + (0.107289206903)*x[0] + (0.946722930674)*x[1]**o + (0.683839481218)*x[1] + (0.412703896373)*x[2]**o + (-0.525221696703)*x[2]
            ref[(2,)]=1.35942682705/(o+1.)+(0.132953495709)+(0.0355430832148)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3,),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank2(self):
        """
        tests integral of rank 2 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(4, 2),w)
        ref=numpy.zeros((4, 2),numpy.float_)
        if dim==2:
            arg[(0, 0)]=0.618460762961*x[0]**o + (-0.633706335935)*x[0] + (0.808323057593)*x[1]**o + (0.50059169815)*x[1]
            ref[(0, 0)]=0.808323057593/(o+1.)+(-0.0665573188921)+(0.618460762961)*0.5**o
            arg[(0, 1)]=-0.770971948955*x[0]**o + (-0.347231769593)*x[0] + (0.521214275823)*x[1]**o + (0.465021858502)*x[1]
            ref[(0, 1)]=0.521214275823/(o+1.)+(0.0588950444544)+(-0.770971948955)*0.5**o
            arg[(1, 0)]=0.580481181848*x[0]**o + (-0.932366614395)*x[0] + (0.596396618367)*x[1]**o + (-0.228396143534)*x[1]
            ref[(1, 0)]=0.596396618367/(o+1.)+(-0.580381378964)+(0.580481181848)*0.5**o
            arg[(1, 1)]=0.0222788847001*x[0]**o + (-0.18696678434)*x[0] + (-0.72224088826)*x[1]**o + (-0.787437289761)*x[1]
            ref[(1, 1)]=-0.72224088826/(o+1.)+(-0.48720203705)+(0.0222788847001)*0.5**o
            arg[(2, 0)]=-0.958492434884*x[0]**o + (-0.488843495568)*x[0] + (-0.648082192697)*x[1]**o + (-0.976181302998)*x[1]
            ref[(2, 0)]=-0.648082192697/(o+1.)+(-0.732512399283)+(-0.958492434884)*0.5**o
            arg[(2, 1)]=0.826038775834*x[0]**o + (0.650714397681)*x[0] + (-0.800281831323)*x[1]**o + (-0.255158127065)*x[1]
            ref[(2, 1)]=-0.800281831323/(o+1.)+(0.197778135308)+(0.826038775834)*0.5**o
            arg[(3, 0)]=0.374897067823*x[0]**o + (0.197414010525)*x[0] + (-0.949247887095)*x[1]**o + (0.63402901131)*x[1]
            ref[(3, 0)]=-0.949247887095/(o+1.)+(0.415721510917)+(0.374897067823)*0.5**o
            arg[(3, 1)]=0.200535253141*x[0]**o + (-0.425535648254)*x[0] + (-0.808227672841)*x[1]**o + (0.613916947087)*x[1]
            ref[(3, 1)]=-0.808227672841/(o+1.)+(0.0941906494164)+(0.200535253141)*0.5**o
        else:
            arg[(0, 0)]=-0.863505002765*x[0]**o + (0.364887090265)*x[0] + (0.616953001114)*x[1]**o + (0.0212705738082)*x[1] + (0.602656488299)*x[2]**o + (-0.965655689779)*x[2]
            ref[(0, 0)]=1.21960948941/(o+1.)+(-0.289749012853)+(-0.863505002765)*0.5**o
            arg[(0, 1)]=-0.312282401347*x[0]**o + (0.457920461925)*x[0] + (-0.906887325408)*x[1]**o + (-0.326091419243)*x[1] + (0.66206036806)*x[2]**o + (0.310361911964)*x[2]
            ref[(0, 1)]=-0.244826957348/(o+1.)+(0.221095477323)+(-0.312282401347)*0.5**o
            arg[(1, 0)]=-0.619579708024*x[0]**o + (-0.852474392408)*x[0] + (0.81735433012)*x[1]**o + (-0.613726570687)*x[1] + (0.482612330731)*x[2]**o + (0.526685243522)*x[2]
            ref[(1, 0)]=1.29996666085/(o+1.)+(-0.469757859787)+(-0.619579708024)*0.5**o
            arg[(1, 1)]=0.249885086808*x[0]**o + (-0.256272463709)*x[0] + (0.0501567842414)*x[1]**o + (0.963750064675)*x[1] + (0.869345952118)*x[2]**o + (-0.989528298387)*x[2]
            ref[(1, 1)]=0.91950273636/(o+1.)+(-0.14102534871)+(0.249885086808)*0.5**o
            arg[(2, 0)]=0.225658176426*x[0]**o + (-0.0121963188691)*x[0] + (0.676882686491)*x[1]**o + (0.768198235549)*x[1] + (0.93372773973)*x[2]**o + (-0.0387186502607)*x[2]
            ref[(2, 0)]=1.61061042622/(o+1.)+(0.358641633209)+(0.225658176426)*0.5**o
            arg[(2, 1)]=0.167746509718*x[0]**o + (0.904636903904)*x[0] + (0.525036089076)*x[1]**o + (0.737603503094)*x[1] + (-0.894973681731)*x[2]**o + (0.355433336226)*x[2]
            ref[(2, 1)]=-0.369937592655/(o+1.)+(0.998836871612)+(0.167746509718)*0.5**o
            arg[(3, 0)]=0.153418287676*x[0]**o + (0.691113175258)*x[0] + (-0.642589130046)*x[1]**o + (0.638606522904)*x[1] + (0.610872813085)*x[2]**o + (-0.824788910887)*x[2]
            ref[(3, 0)]=-0.0317163169603/(o+1.)+(0.252465393637)+(0.153418287676)*0.5**o
            arg[(3, 1)]=0.920408503312*x[0]**o + (0.148279317617)*x[0] + (-0.180262345524)*x[1]**o + (0.00925143723058)*x[1] + (-0.627709722755)*x[2]**o + (-0.481176871757)*x[2]
            ref[(3, 1)]=-0.80797206828/(o+1.)+(-0.161823058454)+(0.920408503312)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (4, 2),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank3(self):
        """
        tests integral of rank 3 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(2, 3, 3),w)
        ref=numpy.zeros((2, 3, 3),numpy.float_)
        if dim==2:
            arg[(0, 0, 0)]=-0.487742560244*x[0]**o + (0.369764861274)*x[0] + (-0.357612132079)*x[1]**o + (-0.871583793557)*x[1]
            ref[(0, 0, 0)]=-0.357612132079/(o+1.)+(-0.250909466141)+(-0.487742560244)*0.5**o
            arg[(0, 0, 1)]=-0.669953231683*x[0]**o + (-0.310962251855)*x[0] + (-0.595719368783)*x[1]**o + (0.841725093813)*x[1]
            ref[(0, 0, 1)]=-0.595719368783/(o+1.)+(0.265381420979)+(-0.669953231683)*0.5**o
            arg[(0, 0, 2)]=-0.348662688596*x[0]**o + (-0.902398583851)*x[0] + (-0.829214647809)*x[1]**o + (-0.228391411328)*x[1]
            ref[(0, 0, 2)]=-0.829214647809/(o+1.)+(-0.565394997589)+(-0.348662688596)*0.5**o
            arg[(0, 1, 0)]=-0.0625427963679*x[0]**o + (0.584817749088)*x[0] + (-0.783743640851)*x[1]**o + (-0.293259728146)*x[1]
            ref[(0, 1, 0)]=-0.783743640851/(o+1.)+(0.145779010471)+(-0.0625427963679)*0.5**o
            arg[(0, 1, 1)]=0.467826414831*x[0]**o + (0.448530417584)*x[0] + (-0.154419997183)*x[1]**o + (-0.0572839086236)*x[1]
            ref[(0, 1, 1)]=-0.154419997183/(o+1.)+(0.19562325448)+(0.467826414831)*0.5**o
            arg[(0, 1, 2)]=0.660839250347*x[0]**o + (0.630425092675)*x[0] + (0.0275266965506)*x[1]**o + (0.629333441694)*x[1]
            ref[(0, 1, 2)]=0.0275266965506/(o+1.)+(0.629879267185)+(0.660839250347)*0.5**o
            arg[(0, 2, 0)]=0.0518925896128*x[0]**o + (-0.874236678023)*x[0] + (0.162302202678)*x[1]**o + (-0.266449316945)*x[1]
            ref[(0, 2, 0)]=0.162302202678/(o+1.)+(-0.570342997484)+(0.0518925896128)*0.5**o
            arg[(0, 2, 1)]=-0.237151968672*x[0]**o + (0.713145635272)*x[0] + (0.786792991537)*x[1]**o + (0.642788489204)*x[1]
            ref[(0, 2, 1)]=0.786792991537/(o+1.)+(0.677967062238)+(-0.237151968672)*0.5**o
            arg[(0, 2, 2)]=0.825274769623*x[0]**o + (0.838744955936)*x[0] + (0.710678744587)*x[1]**o + (-0.434993322207)*x[1]
            ref[(0, 2, 2)]=0.710678744587/(o+1.)+(0.201875816865)+(0.825274769623)*0.5**o
            arg[(1, 0, 0)]=-0.238220673748*x[0]**o + (-0.0744468407387)*x[0] + (0.231224366343)*x[1]**o + (0.340273890495)*x[1]
            ref[(1, 0, 0)]=0.231224366343/(o+1.)+(0.132913524878)+(-0.238220673748)*0.5**o
            arg[(1, 0, 1)]=-0.0489248704094*x[0]**o + (0.19067565018)*x[0] + (0.572087166703)*x[1]**o + (0.520171325853)*x[1]
            ref[(1, 0, 1)]=0.572087166703/(o+1.)+(0.355423488016)+(-0.0489248704094)*0.5**o
            arg[(1, 0, 2)]=0.753337472283*x[0]**o + (0.661948225764)*x[0] + (0.188523737131)*x[1]**o + (-0.0391205495521)*x[1]
            ref[(1, 0, 2)]=0.188523737131/(o+1.)+(0.311413838106)+(0.753337472283)*0.5**o
            arg[(1, 1, 0)]=-0.0453777359036*x[0]**o + (0.806061075972)*x[0] + (0.27293987553)*x[1]**o + (0.301851698114)*x[1]
            ref[(1, 1, 0)]=0.27293987553/(o+1.)+(0.553956387043)+(-0.0453777359036)*0.5**o
            arg[(1, 1, 1)]=-0.424289264874*x[0]**o + (0.440985798749)*x[0] + (0.869103482826)*x[1]**o + (-0.552936347618)*x[1]
            ref[(1, 1, 1)]=0.869103482826/(o+1.)+(-0.0559752744345)+(-0.424289264874)*0.5**o
            arg[(1, 1, 2)]=-0.329210221514*x[0]**o + (0.167652885486)*x[0] + (-0.688657753335)*x[1]**o + (0.146141607322)*x[1]
            ref[(1, 1, 2)]=-0.688657753335/(o+1.)+(0.156897246404)+(-0.329210221514)*0.5**o
            arg[(1, 2, 0)]=0.51952017745*x[0]**o + (0.990607359389)*x[0] + (-0.251568348032)*x[1]**o + (0.346724522826)*x[1]
            ref[(1, 2, 0)]=-0.251568348032/(o+1.)+(0.668665941108)+(0.51952017745)*0.5**o
            arg[(1, 2, 1)]=-0.769902780921*x[0]**o + (-0.290226976088)*x[0] + (-0.659712149379)*x[1]**o + (-0.65490136305)*x[1]
            ref[(1, 2, 1)]=-0.659712149379/(o+1.)+(-0.472564169569)+(-0.769902780921)*0.5**o
            arg[(1, 2, 2)]=0.41496147241*x[0]**o + (0.485141623997)*x[0] + (0.298486597192)*x[1]**o + (0.985887845576)*x[1]
            ref[(1, 2, 2)]=0.298486597192/(o+1.)+(0.735514734786)+(0.41496147241)*0.5**o
        else:
            arg[(0, 0, 0)]=-0.997368038826*x[0]**o + (0.690278933221)*x[0] + (-0.350567905058)*x[1]**o + (0.567404755415)*x[1] + (0.113486780237)*x[2]**o + (0.913991543615)*x[2]
            ref[(0, 0, 0)]=-0.237081124821/(o+1.)+(1.08583761613)+(-0.997368038826)*0.5**o
            arg[(0, 0, 1)]=0.904809158558*x[0]**o + (-0.740600766618)*x[0] + (0.445907479399)*x[1]**o + (-0.703799010836)*x[1] + (0.175035160276)*x[2]**o + (-0.98868081281)*x[2]
            ref[(0, 0, 1)]=0.620942639675/(o+1.)+(-1.21654029513)+(0.904809158558)*0.5**o
            arg[(0, 0, 2)]=-0.882759725676*x[0]**o + (-0.14013917524)*x[0] + (0.322920492622)*x[1]**o + (0.515193687756)*x[1] + (-0.182418401964)*x[2]**o + (0.090102014713)*x[2]
            ref[(0, 0, 2)]=0.140502090658/(o+1.)+(0.232578263615)+(-0.882759725676)*0.5**o
            arg[(0, 1, 0)]=0.922127538369*x[0]**o + (0.6664081132)*x[0] + (-0.756909101367)*x[1]**o + (0.739503372323)*x[1] + (0.100515193464)*x[2]**o + (0.113649118284)*x[2]
            ref[(0, 1, 0)]=-0.656393907903/(o+1.)+(0.759780301904)+(0.922127538369)*0.5**o
            arg[(0, 1, 1)]=0.467163325052*x[0]**o + (0.624400721991)*x[0] + (0.12713445198)*x[1]**o + (0.463527676167)*x[1] + (-0.647037803729)*x[2]**o + (0.400167839389)*x[2]
            ref[(0, 1, 1)]=-0.519903351749/(o+1.)+(0.744048118774)+(0.467163325052)*0.5**o
            arg[(0, 1, 2)]=-0.626034910396*x[0]**o + (0.0817630633876)*x[0] + (0.446299986133)*x[1]**o + (-0.512474870086)*x[1] + (0.373787960756)*x[2]**o + (-0.564871572902)*x[2]
            ref[(0, 1, 2)]=0.820087946888/(o+1.)+(-0.4977916898)+(-0.626034910396)*0.5**o
            arg[(0, 2, 0)]=-0.256954344647*x[0]**o + (0.979577973738)*x[0] + (0.349443095103)*x[1]**o + (0.294668102184)*x[1] + (0.545020174656)*x[2]**o + (-0.301808644316)*x[2]
            ref[(0, 2, 0)]=0.894463269759/(o+1.)+(0.486218715803)+(-0.256954344647)*0.5**o
            arg[(0, 2, 1)]=-0.500853408083*x[0]**o + (0.891844214787)*x[0] + (0.427364930182)*x[1]**o + (-0.315985169447)*x[1] + (-0.0451451895092)*x[2]**o + (0.143170633734)*x[2]
            ref[(0, 2, 1)]=0.382219740673/(o+1.)+(0.359514839537)+(-0.500853408083)*0.5**o
            arg[(0, 2, 2)]=0.884165551303*x[0]**o + (0.438588593604)*x[0] + (0.11801599224)*x[1]**o + (-0.533697084842)*x[1] + (0.466127199377)*x[2]**o + (-0.336460471816)*x[2]
            ref[(0, 2, 2)]=0.584143191617/(o+1.)+(-0.215784481527)+(0.884165551303)*0.5**o
            arg[(1, 0, 0)]=-0.99875635056*x[0]**o + (-0.927476585595)*x[0] + (-0.886208293618)*x[1]**o + (0.0186562436733)*x[1] + (-0.576717266248)*x[2]**o + (-0.520385056116)*x[2]
            ref[(1, 0, 0)]=-1.46292555987/(o+1.)+(-0.714602699019)+(-0.99875635056)*0.5**o
            arg[(1, 0, 1)]=-0.550568056823*x[0]**o + (0.634409315118)*x[0] + (0.46791270406)*x[1]**o + (-0.325969754953)*x[1] + (0.290282534382)*x[2]**o + (0.845034037943)*x[2]
            ref[(1, 0, 1)]=0.758195238442/(o+1.)+(0.576736799053)+(-0.550568056823)*0.5**o
            arg[(1, 0, 2)]=0.259191572378*x[0]**o + (-0.266776568218)*x[0] + (-0.0979497600997)*x[1]**o + (-0.500714268533)*x[1] + (-0.707884028054)*x[2]**o + (0.866379116624)*x[2]
            ref[(1, 0, 2)]=-0.805833788153/(o+1.)+(0.0494441399367)+(0.259191572378)*0.5**o
            arg[(1, 1, 0)]=-0.189224189006*x[0]**o + (0.390807653808)*x[0] + (-0.168619122364)*x[1]**o + (0.163223914487)*x[1] + (0.363491327663)*x[2]**o + (0.118959262294)*x[2]
            ref[(1, 1, 0)]=0.194872205299/(o+1.)+(0.336495415294)+(-0.189224189006)*0.5**o
            arg[(1, 1, 1)]=-0.0528932353302*x[0]**o + (-0.180325780226)*x[0] + (0.545230516483)*x[1]**o + (-0.38955673214)*x[1] + (-0.176388309407)*x[2]**o + (0.79206900893)*x[2]
            ref[(1, 1, 1)]=0.368842207076/(o+1.)+(0.111093248282)+(-0.0528932353302)*0.5**o
            arg[(1, 1, 2)]=0.923122005588*x[0]**o + (0.0273338177857)*x[0] + (0.890102671976)*x[1]**o + (0.595087694542)*x[1] + (0.749884564387)*x[2]**o + (0.524374261409)*x[2]
            ref[(1, 1, 2)]=1.63998723636/(o+1.)+(0.573397886868)+(0.923122005588)*0.5**o
            arg[(1, 2, 0)]=-0.479464483561*x[0]**o + (-0.548317090563)*x[0] + (-0.0810325335504)*x[1]**o + (-0.510697094914)*x[1] + (0.825208301657)*x[2]**o + (-0.00741259634317)*x[2]
            ref[(1, 2, 0)]=0.744175768107/(o+1.)+(-0.53321339091)+(-0.479464483561)*0.5**o
            arg[(1, 2, 1)]=-0.0336736813683*x[0]**o + (-0.629620211265)*x[0] + (0.985908759535)*x[1]**o + (0.143288978064)*x[1] + (0.657487396675)*x[2]**o + (0.429879446726)*x[2]
            ref[(1, 2, 1)]=1.64339615621/(o+1.)+(-0.0282258932373)+(-0.0336736813683)*0.5**o
            arg[(1, 2, 2)]=-0.954514198115*x[0]**o + (0.747589160824)*x[0] + (-0.368606731993)*x[1]**o + (-0.0147599525192)*x[1] + (-0.337752082399)*x[2]**o + (0.574497757254)*x[2]
            ref[(1, 2, 2)]=-0.706358814392/(o+1.)+(0.65366348278)+(-0.954514198115)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (2, 3, 3),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    def test_integrate_onReducedFunctionOnContactOne_fromData_ReducedFunctionOnContactOne_rank4(self):
        """
        tests integral of rank 4 Data on ReducedFunctionOnContactOne

        assumptions: ReducedFunctionOnContactOne(self.domain) exists
                     self.domain supports integral on ReducedFunctionOnContactOne
        """
        o = self.order
        dim = self.domain.getDim()
        w_ref = ReducedFunctionOnContactOne(self.domain)
        w = ReducedFunctionOnContactOne(self.domain)
        x = w.getX()
        arg = Data(0,(3, 2, 3, 4),w)
        ref=numpy.zeros((3, 2, 3, 4),numpy.float_)
        if dim==2:
            arg[(0, 0, 0, 0)]=-0.387033594648*x[0]**o + (0.744326734657)*x[0] + (0.51093900966)*x[1]**o + (0.752396475385)*x[1]
            ref[(0, 0, 0, 0)]=0.51093900966/(o+1.)+(0.748361605021)+(-0.387033594648)*0.5**o
            arg[(0, 0, 0, 1)]=0.782808001364*x[0]**o + (0.539280090475)*x[0] + (-0.963912159037)*x[1]**o + (0.237974822555)*x[1]
            ref[(0, 0, 0, 1)]=-0.963912159037/(o+1.)+(0.388627456515)+(0.782808001364)*0.5**o
            arg[(0, 0, 0, 2)]=0.837264834296*x[0]**o + (-0.00128931380942)*x[0] + (0.984225226177)*x[1]**o + (-0.197123941416)*x[1]
            ref[(0, 0, 0, 2)]=0.984225226177/(o+1.)+(-0.0992066276129)+(0.837264834296)*0.5**o
            arg[(0, 0, 0, 3)]=0.192437744072*x[0]**o + (0.882167648963)*x[0] + (-0.0840774848574)*x[1]**o + (0.103323808804)*x[1]
            ref[(0, 0, 0, 3)]=-0.0840774848574/(o+1.)+(0.492745728884)+(0.192437744072)*0.5**o
            arg[(0, 0, 1, 0)]=-0.709383510464*x[0]**o + (-0.562916383689)*x[0] + (-0.906856578213)*x[1]**o + (0.588467999315)*x[1]
            ref[(0, 0, 1, 0)]=-0.906856578213/(o+1.)+(0.0127758078129)+(-0.709383510464)*0.5**o
            arg[(0, 0, 1, 1)]=-0.912876222131*x[0]**o + (-0.392072806603)*x[0] + (-0.0737651904937)*x[1]**o + (0.0427191536523)*x[1]
            ref[(0, 0, 1, 1)]=-0.0737651904937/(o+1.)+(-0.174676826475)+(-0.912876222131)*0.5**o
            arg[(0, 0, 1, 2)]=-0.908044889841*x[0]**o + (-0.0282152494291)*x[0] + (-0.358555305694)*x[1]**o + (-0.249265815005)*x[1]
            ref[(0, 0, 1, 2)]=-0.358555305694/(o+1.)+(-0.138740532217)+(-0.908044889841)*0.5**o
            arg[(0, 0, 1, 3)]=0.495942005153*x[0]**o + (0.456856776906)*x[0] + (0.948526507251)*x[1]**o + (-0.791670856332)*x[1]
            ref[(0, 0, 1, 3)]=0.948526507251/(o+1.)+(-0.167407039713)+(0.495942005153)*0.5**o
            arg[(0, 0, 2, 0)]=-0.976223094571*x[0]**o + (-0.600113711744)*x[0] + (-0.171042269162)*x[1]**o + (-0.209448572276)*x[1]
            ref[(0, 0, 2, 0)]=-0.171042269162/(o+1.)+(-0.40478114201)+(-0.976223094571)*0.5**o
            arg[(0, 0, 2, 1)]=-0.421471505563*x[0]**o + (0.595723881148)*x[0] + (0.745782278567)*x[1]**o + (0.92839431543)*x[1]
            ref[(0, 0, 2, 1)]=0.745782278567/(o+1.)+(0.762059098289)+(-0.421471505563)*0.5**o
            arg[(0, 0, 2, 2)]=0.157093010556*x[0]**o + (-0.0997416981658)*x[0] + (0.86736998117)*x[1]**o + (0.802825515734)*x[1]
            ref[(0, 0, 2, 2)]=0.86736998117/(o+1.)+(0.351541908784)+(0.157093010556)*0.5**o
            arg[(0, 0, 2, 3)]=0.636733372423*x[0]**o + (-0.368469752888)*x[0] + (0.89867344278)*x[1]**o + (0.47996252378)*x[1]
            ref[(0, 0, 2, 3)]=0.89867344278/(o+1.)+(0.0557463854464)+(0.636733372423)*0.5**o
            arg[(0, 1, 0, 0)]=0.527908762651*x[0]**o + (-0.234571531586)*x[0] + (0.804798313117)*x[1]**o + (-0.612732259086)*x[1]
            ref[(0, 1, 0, 0)]=0.804798313117/(o+1.)+(-0.423651895336)+(0.527908762651)*0.5**o
            arg[(0, 1, 0, 1)]=0.448876283696*x[0]**o + (-0.949564632707)*x[0] + (0.622450576566)*x[1]**o + (-0.735847542031)*x[1]
            ref[(0, 1, 0, 1)]=0.622450576566/(o+1.)+(-0.842706087369)+(0.448876283696)*0.5**o
            arg[(0, 1, 0, 2)]=0.58005264596*x[0]**o + (-0.288162321148)*x[0] + (0.829678259829)*x[1]**o + (0.533129060702)*x[1]
            ref[(0, 1, 0, 2)]=0.829678259829/(o+1.)+(0.122483369777)+(0.58005264596)*0.5**o
            arg[(0, 1, 0, 3)]=0.333025140099*x[0]**o + (0.935702131123)*x[0] + (-0.702690626805)*x[1]**o + (-0.0454442271501)*x[1]
            ref[(0, 1, 0, 3)]=-0.702690626805/(o+1.)+(0.445128951987)+(0.333025140099)*0.5**o
            arg[(0, 1, 1, 0)]=-0.997995830989*x[0]**o + (0.932991049516)*x[0] + (-0.122434723154)*x[1]**o + (0.136907142391)*x[1]
            ref[(0, 1, 1, 0)]=-0.122434723154/(o+1.)+(0.534949095953)+(-0.997995830989)*0.5**o
            arg[(0, 1, 1, 1)]=0.258744715715*x[0]**o + (0.459453313353)*x[0] + (-0.43852181227)*x[1]**o + (0.349673729767)*x[1]
            ref[(0, 1, 1, 1)]=-0.43852181227/(o+1.)+(0.40456352156)+(0.258744715715)*0.5**o
            arg[(0, 1, 1, 2)]=-0.176956100383*x[0]**o + (-0.804261251975)*x[0] + (0.652369793478)*x[1]**o + (-0.546698390938)*x[1]
            ref[(0, 1, 1, 2)]=0.652369793478/(o+1.)+(-0.675479821456)+(-0.176956100383)*0.5**o
            arg[(0, 1, 1, 3)]=-0.716015161221*x[0]**o + (-0.291379994146)*x[0] + (0.924800454903)*x[1]**o + (0.991132867787)*x[1]
            ref[(0, 1, 1, 3)]=0.924800454903/(o+1.)+(0.349876436821)+(-0.716015161221)*0.5**o
            arg[(0, 1, 2, 0)]=0.128810482178*x[0]**o + (-0.1867245204)*x[0] + (-0.505267720558)*x[1]**o + (-0.790804474959)*x[1]
            ref[(0, 1, 2, 0)]=-0.505267720558/(o+1.)+(-0.488764497679)+(0.128810482178)*0.5**o
            arg[(0, 1, 2, 1)]=0.276095347819*x[0]**o + (-0.943865896262)*x[0] + (-0.451432119787)*x[1]**o + (0.0684043760993)*x[1]
            ref[(0, 1, 2, 1)]=-0.451432119787/(o+1.)+(-0.437730760081)+(0.276095347819)*0.5**o
            arg[(0, 1, 2, 2)]=0.00475809359301*x[0]**o + (0.148694744734)*x[0] + (-0.388066956642)*x[1]**o + (-0.998872342441)*x[1]
            ref[(0, 1, 2, 2)]=-0.388066956642/(o+1.)+(-0.425088798854)+(0.00475809359301)*0.5**o
            arg[(0, 1, 2, 3)]=-0.987651697301*x[0]**o + (0.930640346379)*x[0] + (-0.979485773964)*x[1]**o + (-0.989434663618)*x[1]
            ref[(0, 1, 2, 3)]=-0.979485773964/(o+1.)+(-0.0293971586196)+(-0.987651697301)*0.5**o
            arg[(1, 0, 0, 0)]=-0.0162700026228*x[0]**o + (0.992087196284)*x[0] + (0.303641565295)*x[1]**o + (-0.646581315003)*x[1]
            ref[(1, 0, 0, 0)]=0.303641565295/(o+1.)+(0.17275294064)+(-0.0162700026228)*0.5**o
            arg[(1, 0, 0, 1)]=0.0494751975403*x[0]**o + (-0.0300667866906)*x[0] + (-0.835275643806)*x[1]**o + (-0.131909771494)*x[1]
            ref[(1, 0, 0, 1)]=-0.835275643806/(o+1.)+(-0.0809882790924)+(0.0494751975403)*0.5**o
            arg[(1, 0, 0, 2)]=0.224454843131*x[0]**o + (0.0553644287702)*x[0] + (-0.882662855149)*x[1]**o + (0.697497351591)*x[1]
            ref[(1, 0, 0, 2)]=-0.882662855149/(o+1.)+(0.376430890181)+(0.224454843131)*0.5**o
            arg[(1, 0, 0, 3)]=-0.536503454771*x[0]**o + (-0.109129665281)*x[0] + (-0.207045049179)*x[1]**o + (0.132152366253)*x[1]
            ref[(1, 0, 0, 3)]=-0.207045049179/(o+1.)+(0.0115113504863)+(-0.536503454771)*0.5**o
            arg[(1, 0, 1, 0)]=0.396428887879*x[0]**o + (-0.440869537466)*x[0] + (0.253483125476)*x[1]**o + (-0.236408643527)*x[1]
            ref[(1, 0, 1, 0)]=0.253483125476/(o+1.)+(-0.338639090496)+(0.396428887879)*0.5**o
            arg[(1, 0, 1, 1)]=-0.850988297674*x[0]**o + (0.312122057974)*x[0] + (0.0301341461226)*x[1]**o + (-0.00828657727775)*x[1]
            ref[(1, 0, 1, 1)]=0.0301341461226/(o+1.)+(0.151917740348)+(-0.850988297674)*0.5**o
            arg[(1, 0, 1, 2)]=0.192508476828*x[0]**o + (-0.0188870213847)*x[0] + (-0.470271412707)*x[1]**o + (-0.958384421305)*x[1]
            ref[(1, 0, 1, 2)]=-0.470271412707/(o+1.)+(-0.488635721345)+(0.192508476828)*0.5**o
            arg[(1, 0, 1, 3)]=0.798331028538*x[0]**o + (0.324310299238)*x[0] + (0.378472222307)*x[1]**o + (-0.27309069483)*x[1]
            ref[(1, 0, 1, 3)]=0.378472222307/(o+1.)+(0.025609802204)+(0.798331028538)*0.5**o
            arg[(1, 0, 2, 0)]=-0.37271137034*x[0]**o + (-0.703754949764)*x[0] + (0.0573737573536)*x[1]**o + (-0.62316067192)*x[1]
            ref[(1, 0, 2, 0)]=0.0573737573536/(o+1.)+(-0.663457810842)+(-0.37271137034)*0.5**o
            arg[(1, 0, 2, 1)]=0.869144744441*x[0]**o + (-0.534458109966)*x[0] + (0.476371454045)*x[1]**o + (0.771880634439)*x[1]
            ref[(1, 0, 2, 1)]=0.476371454045/(o+1.)+(0.118711262236)+(0.869144744441)*0.5**o
            arg[(1, 0, 2, 2)]=0.00906582578851*x[0]**o + (0.953154780348)*x[0] + (0.926531416001)*x[1]**o + (0.58853643992)*x[1]
            ref[(1, 0, 2, 2)]=0.926531416001/(o+1.)+(0.770845610134)+(0.00906582578851)*0.5**o
            arg[(1, 0, 2, 3)]=-0.0404482481575*x[0]**o + (0.277425438173)*x[0] + (0.788482448647)*x[1]**o + (-0.206396418097)*x[1]
            ref[(1, 0, 2, 3)]=0.788482448647/(o+1.)+(0.0355145100385)+(-0.0404482481575)*0.5**o
            arg[(1, 1, 0, 0)]=0.790523803918*x[0]**o + (-0.502319703563)*x[0] + (0.181547305016)*x[1]**o + (-0.161442334138)*x[1]
            ref[(1, 1, 0, 0)]=0.181547305016/(o+1.)+(-0.33188101885)+(0.790523803918)*0.5**o
            arg[(1, 1, 0, 1)]=-0.446518457946*x[0]**o + (0.710444858946)*x[0] + (0.984137225868)*x[1]**o + (-0.779477195034)*x[1]
            ref[(1, 1, 0, 1)]=0.984137225868/(o+1.)+(-0.0345161680439)+(-0.446518457946)*0.5**o
            arg[(1, 1, 0, 2)]=-0.530521450266*x[0]**o + (-0.987947792215)*x[0] + (-0.814138727613)*x[1]**o + (-0.0690714834618)*x[1]
            ref[(1, 1, 0, 2)]=-0.814138727613/(o+1.)+(-0.528509637839)+(-0.530521450266)*0.5**o
            arg[(1, 1, 0, 3)]=0.459392246084*x[0]**o + (-0.0327346621036)*x[0] + (-0.513414912095)*x[1]**o + (-0.894058873319)*x[1]
            ref[(1, 1, 0, 3)]=-0.513414912095/(o+1.)+(-0.463396767711)+(0.459392246084)*0.5**o
            arg[(1, 1, 1, 0)]=-0.782297231613*x[0]**o + (-0.12596863053)*x[0] + (0.832654194319)*x[1]**o + (0.100835319446)*x[1]
            ref[(1, 1, 1, 0)]=0.832654194319/(o+1.)+(-0.0125666555422)+(-0.782297231613)*0.5**o
            arg[(1, 1, 1, 1)]=-0.774612989347*x[0]**o + (0.985503946718)*x[0] + (0.574354027009)*x[1]**o + (-0.927105287462)*x[1]
            ref[(1, 1, 1, 1)]=0.574354027009/(o+1.)+(0.0291993296279)+(-0.774612989347)*0.5**o
            arg[(1, 1, 1, 2)]=0.251965684393*x[0]**o + (0.95618060588)*x[0] + (0.502563956185)*x[1]**o + (0.142284911485)*x[1]
            ref[(1, 1, 1, 2)]=0.502563956185/(o+1.)+(0.549232758683)+(0.251965684393)*0.5**o
            arg[(1, 1, 1, 3)]=0.169530530044*x[0]**o + (-0.769940768985)*x[0] + (0.650466616224)*x[1]**o + (-0.371780269352)*x[1]
            ref[(1, 1, 1, 3)]=0.650466616224/(o+1.)+(-0.570860519168)+(0.169530530044)*0.5**o
            arg[(1, 1, 2, 0)]=0.76899511817*x[0]**o + (-0.747730543685)*x[0] + (0.461400707609)*x[1]**o + (-0.154167092514)*x[1]
            ref[(1, 1, 2, 0)]=0.461400707609/(o+1.)+(-0.4509488181)+(0.76899511817)*0.5**o
            arg[(1, 1, 2, 1)]=-0.223667804514*x[0]**o + (-0.278936289653)*x[0] + (-0.124706275328)*x[1]**o + (-0.550299560994)*x[1]
            ref[(1, 1, 2, 1)]=-0.124706275328/(o+1.)+(-0.414617925323)+(-0.223667804514)*0.5**o
            arg[(1, 1, 2, 2)]=-0.926548990012*x[0]**o + (-0.499481906441)*x[0] + (-0.385706234247)*x[1]**o + (-0.63098130281)*x[1]
            ref[(1, 1, 2, 2)]=-0.385706234247/(o+1.)+(-0.565231604626)+(-0.926548990012)*0.5**o
            arg[(1, 1, 2, 3)]=0.995044827866*x[0]**o + (0.698335678714)*x[0] + (-0.964614840906)*x[1]**o + (-0.0894180682076)*x[1]
            ref[(1, 1, 2, 3)]=-0.964614840906/(o+1.)+(0.304458805253)+(0.995044827866)*0.5**o
            arg[(2, 0, 0, 0)]=-0.639721936658*x[0]**o + (0.670983318864)*x[0] + (-0.97786997942)*x[1]**o + (0.400905523151)*x[1]
            ref[(2, 0, 0, 0)]=-0.97786997942/(o+1.)+(0.535944421007)+(-0.639721936658)*0.5**o
            arg[(2, 0, 0, 1)]=0.913430833856*x[0]**o + (-0.923977330438)*x[0] + (0.66412952653)*x[1]**o + (0.410523297809)*x[1]
            ref[(2, 0, 0, 1)]=0.66412952653/(o+1.)+(-0.256727016314)+(0.913430833856)*0.5**o
            arg[(2, 0, 0, 2)]=0.621043249013*x[0]**o + (-0.266197213859)*x[0] + (-0.114087137765)*x[1]**o + (0.743960909401)*x[1]
            ref[(2, 0, 0, 2)]=-0.114087137765/(o+1.)+(0.238881847771)+(0.621043249013)*0.5**o
            arg[(2, 0, 0, 3)]=-0.893853974674*x[0]**o + (0.133799177024)*x[0] + (-0.651777367706)*x[1]**o + (-0.900737384221)*x[1]
            ref[(2, 0, 0, 3)]=-0.651777367706/(o+1.)+(-0.383469103599)+(-0.893853974674)*0.5**o
            arg[(2, 0, 1, 0)]=0.0760364503903*x[0]**o + (0.657410903956)*x[0] + (0.334019045913)*x[1]**o + (-0.594237819245)*x[1]
            ref[(2, 0, 1, 0)]=0.334019045913/(o+1.)+(0.0315865423556)+(0.0760364503903)*0.5**o
            arg[(2, 0, 1, 1)]=-0.241243811009*x[0]**o + (-0.623283087501)*x[0] + (0.119081390557)*x[1]**o + (-0.934166835077)*x[1]
            ref[(2, 0, 1, 1)]=0.119081390557/(o+1.)+(-0.778724961289)+(-0.241243811009)*0.5**o
            arg[(2, 0, 1, 2)]=0.0895120850426*x[0]**o + (0.31139867797)*x[0] + (0.670976918453)*x[1]**o + (-0.924975502751)*x[1]
            ref[(2, 0, 1, 2)]=0.670976918453/(o+1.)+(-0.306788412391)+(0.0895120850426)*0.5**o
            arg[(2, 0, 1, 3)]=-0.29973555046*x[0]**o + (0.195836427024)*x[0] + (-0.393495158111)*x[1]**o + (-0.883479520418)*x[1]
            ref[(2, 0, 1, 3)]=-0.393495158111/(o+1.)+(-0.343821546697)+(-0.29973555046)*0.5**o
            arg[(2, 0, 2, 0)]=0.234022097619*x[0]**o + (-0.0799369572211)*x[0] + (0.33954257082)*x[1]**o + (-0.0432708112953)*x[1]
            ref[(2, 0, 2, 0)]=0.33954257082/(o+1.)+(-0.0616038842582)+(0.234022097619)*0.5**o
            arg[(2, 0, 2, 1)]=-0.216522186575*x[0]**o + (0.32328725267)*x[0] + (-0.991885370476)*x[1]**o + (-0.209230281254)*x[1]
            ref[(2, 0, 2, 1)]=-0.991885370476/(o+1.)+(0.0570284857078)+(-0.216522186575)*0.5**o
            arg[(2, 0, 2, 2)]=-0.457777476406*x[0]**o + (-0.465838900737)*x[0] + (0.720262184032)*x[1]**o + (-0.759581957095)*x[1]
            ref[(2, 0, 2, 2)]=0.720262184032/(o+1.)+(-0.612710428916)+(-0.457777476406)*0.5**o
            arg[(2, 0, 2, 3)]=0.202946976871*x[0]**o + (0.89542528583)*x[0] + (-0.352244588884)*x[1]**o + (-0.424585997608)*x[1]
            ref[(2, 0, 2, 3)]=-0.352244588884/(o+1.)+(0.235419644111)+(0.202946976871)*0.5**o
            arg[(2, 1, 0, 0)]=0.756652024475*x[0]**o + (0.366676971754)*x[0] + (-0.0827004560367)*x[1]**o + (-0.675702879167)*x[1]
            ref[(2, 1, 0, 0)]=-0.0827004560367/(o+1.)+(-0.154512953707)+(0.756652024475)*0.5**o
            arg[(2, 1, 0, 1)]=0.924728482888*x[0]**o + (-0.741436650935)*x[0] + (0.765731760462)*x[1]**o + (0.175118868656)*x[1]
            ref[(2, 1, 0, 1)]=0.765731760462/(o+1.)+(-0.283158891139)+(0.924728482888)*0.5**o
            arg[(2, 1, 0, 2)]=-0.523676183505*x[0]**o + (-0.473970696147)*x[0] + (-0.997190071353)*x[1]**o + (0.424130144743)*x[1]
            ref[(2, 1, 0, 2)]=-0.997190071353/(o+1.)+(-0.0249202757021)+(-0.523676183505)*0.5**o
            arg[(2, 1, 0, 3)]=0.0582020784341*x[0]**o + (0.873673709021)*x[0] + (0.346752898224)*x[1]**o + (-0.288533387941)*x[1]
            ref[(2, 1, 0, 3)]=0.346752898224/(o+1.)+(0.29257016054)+(0.0582020784341)*0.5**o
            arg[(2, 1, 1, 0)]=-0.925823546705*x[0]**o + (-0.392335189876)*x[0] + (-0.605765780016)*x[1]**o + (0.248821324655)*x[1]
            ref[(2, 1, 1, 0)]=-0.605765780016/(o+1.)+(-0.0717569326107)+(-0.925823546705)*0.5**o
            arg[(2, 1, 1, 1)]=-0.412535884384*x[0]**o + (0.771217131066)*x[0] + (-0.900658632125)*x[1]**o + (0.846292773689)*x[1]
            ref[(2, 1, 1, 1)]=-0.900658632125/(o+1.)+(0.808754952378)+(-0.412535884384)*0.5**o
            arg[(2, 1, 1, 2)]=-0.20264101129*x[0]**o + (0.350281317725)*x[0] + (0.645880129364)*x[1]**o + (0.895451616547)*x[1]
            ref[(2, 1, 1, 2)]=0.645880129364/(o+1.)+(0.622866467136)+(-0.20264101129)*0.5**o
            arg[(2, 1, 1, 3)]=0.914661512346*x[0]**o + (-0.0820769868067)*x[0] + (-0.4767983218)*x[1]**o + (-0.14865485447)*x[1]
            ref[(2, 1, 1, 3)]=-0.4767983218/(o+1.)+(-0.115365920639)+(0.914661512346)*0.5**o
            arg[(2, 1, 2, 0)]=-0.348871567674*x[0]**o + (-0.390625034797)*x[0] + (0.100253664839)*x[1]**o + (-0.438093543993)*x[1]
            ref[(2, 1, 2, 0)]=0.100253664839/(o+1.)+(-0.414359289395)+(-0.348871567674)*0.5**o
            arg[(2, 1, 2, 1)]=-0.871675978113*x[0]**o + (-0.197677896739)*x[0] + (0.960696720531)*x[1]**o + (0.832109794276)*x[1]
            ref[(2, 1, 2, 1)]=0.960696720531/(o+1.)+(0.317215948769)+(-0.871675978113)*0.5**o
            arg[(2, 1, 2, 2)]=-0.613381729118*x[0]**o + (-0.79945573231)*x[0] + (0.0128455488134)*x[1]**o + (-0.803550731755)*x[1]
            ref[(2, 1, 2, 2)]=0.0128455488134/(o+1.)+(-0.801503232033)+(-0.613381729118)*0.5**o
            arg[(2, 1, 2, 3)]=0.754124757391*x[0]**o + (-0.124769830148)*x[0] + (0.645447446532)*x[1]**o + (0.255626482998)*x[1]
            ref[(2, 1, 2, 3)]=0.645447446532/(o+1.)+(0.0654283264253)+(0.754124757391)*0.5**o
        else:
            arg[(0, 0, 0, 0)]=-0.870890239843*x[0]**o + (0.0829935786008)*x[0] + (-0.58075300693)*x[1]**o + (-0.118189065099)*x[1] + (-0.217355442357)*x[2]**o + (0.89500043065)*x[2]
            ref[(0, 0, 0, 0)]=-0.798108449287/(o+1.)+(0.429902472076)+(-0.870890239843)*0.5**o
            arg[(0, 0, 0, 1)]=-0.289042391566*x[0]**o + (-0.659399953125)*x[0] + (0.733837234062)*x[1]**o + (0.326238455664)*x[1] + (0.526510898899)*x[2]**o + (-0.00531747651667)*x[2]
            ref[(0, 0, 0, 1)]=1.26034813296/(o+1.)+(-0.169239486989)+(-0.289042391566)*0.5**o
            arg[(0, 0, 0, 2)]=-0.714345230354*x[0]**o + (0.490288610774)*x[0] + (0.785230011249)*x[1]**o + (-0.563134041215)*x[1] + (-0.99036413822)*x[2]**o + (0.979595836885)*x[2]
            ref[(0, 0, 0, 2)]=-0.205134126971/(o+1.)+(0.453375203222)+(-0.714345230354)*0.5**o
            arg[(0, 0, 0, 3)]=-0.0278355002296*x[0]**o + (0.742279882677)*x[0] + (0.54884936867)*x[1]**o + (-0.524223990798)*x[1] + (-0.567192814954)*x[2]**o + (-0.841666993113)*x[2]
            ref[(0, 0, 0, 3)]=-0.0183434462836/(o+1.)+(-0.311805550617)+(-0.0278355002296)*0.5**o
            arg[(0, 0, 1, 0)]=0.641068836911*x[0]**o + (0.757927600602)*x[0] + (0.736545433314)*x[1]**o + (0.199991292812)*x[1] + (-0.760859660515)*x[2]**o + (-0.957054130045)*x[2]
            ref[(0, 0, 1, 0)]=-0.0243142272014/(o+1.)+(0.000432381684624)+(0.641068836911)*0.5**o
            arg[(0, 0, 1, 1)]=0.628116069462*x[0]**o + (-0.00160985294519)*x[0] + (0.895850714429)*x[1]**o + (0.990409317828)*x[1] + (0.418526130069)*x[2]**o + (0.326470227465)*x[2]
            ref[(0, 0, 1, 1)]=1.3143768445/(o+1.)+(0.657634846173)+(0.628116069462)*0.5**o
            arg[(0, 0, 1, 2)]=0.442387907405*x[0]**o + (-0.696920315837)*x[0] + (-0.558335572079)*x[1]**o + (0.514827987688)*x[1] + (0.7930505206)*x[2]**o + (0.873437457503)*x[2]
            ref[(0, 0, 1, 2)]=0.234714948522/(o+1.)+(0.345672564677)+(0.442387907405)*0.5**o
            arg[(0, 0, 1, 3)]=0.820133612384*x[0]**o + (0.705643520063)*x[0] + (0.350986662362)*x[1]**o + (-0.162891415016)*x[1] + (-0.513799779565)*x[2]**o + (-0.495120262864)*x[2]
            ref[(0, 0, 1, 3)]=-0.162813117203/(o+1.)+(0.0238159210916)+(0.820133612384)*0.5**o
            arg[(0, 0, 2, 0)]=0.559305653704*x[0]**o + (0.351199698285)*x[0] + (0.130930447961)*x[1]**o + (-0.982001627916)*x[1] + (0.841014976724)*x[2]**o + (-0.535676345162)*x[2]
            ref[(0, 0, 2, 0)]=0.971945424685/(o+1.)+(-0.583239137396)+(0.559305653704)*0.5**o
            arg[(0, 0, 2, 1)]=-0.533229332529*x[0]**o + (-0.487704653674)*x[0] + (-0.106897318004)*x[1]**o + (0.492687506285)*x[1] + (-0.856826907958)*x[2]**o + (0.384097773751)*x[2]
            ref[(0, 0, 2, 1)]=-0.963724225962/(o+1.)+(0.194540313181)+(-0.533229332529)*0.5**o
            arg[(0, 0, 2, 2)]=-0.505059153408*x[0]**o + (0.232017090462)*x[0] + (-0.0304723470887)*x[1]**o + (-0.843701850683)*x[1] + (-0.710529537794)*x[2]**o + (-0.0701200120142)*x[2]
            ref[(0, 0, 2, 2)]=-0.741001884883/(o+1.)+(-0.340902386118)+(-0.505059153408)*0.5**o
            arg[(0, 0, 2, 3)]=-0.361742094483*x[0]**o + (0.0985256930901)*x[0] + (0.648685339866)*x[1]**o + (0.489904437963)*x[1] + (-0.910550419291)*x[2]**o + (-0.296804742807)*x[2]
            ref[(0, 0, 2, 3)]=-0.261865079425/(o+1.)+(0.145812694123)+(-0.361742094483)*0.5**o
            arg[(0, 1, 0, 0)]=-0.755355742985*x[0]**o + (-0.81633304077)*x[0] + (0.346547385906)*x[1]**o + (-0.556463431983)*x[1] + (-0.483642164031)*x[2]**o + (0.231768608876)*x[2]
            ref[(0, 1, 0, 0)]=-0.137094778125/(o+1.)+(-0.570513931939)+(-0.755355742985)*0.5**o
            arg[(0, 1, 0, 1)]=0.31177640673*x[0]**o + (0.30148662752)*x[0] + (-0.547901979549)*x[1]**o + (-0.331419826251)*x[1] + (0.217293086061)*x[2]**o + (-0.0264799381404)*x[2]
            ref[(0, 1, 0, 1)]=-0.330608893488/(o+1.)+(-0.0282065684353)+(0.31177640673)*0.5**o
            arg[(0, 1, 0, 2)]=0.654368221096*x[0]**o + (-0.298814905984)*x[0] + (0.856500035786)*x[1]**o + (0.825305027244)*x[1] + (0.404301328679)*x[2]**o + (0.550990962888)*x[2]
            ref[(0, 1, 0, 2)]=1.26080136446/(o+1.)+(0.538740542074)+(0.654368221096)*0.5**o
            arg[(0, 1, 0, 3)]=-0.546927002735*x[0]**o + (0.65451272981)*x[0] + (0.623151205056)*x[1]**o + (-0.00521127792893)*x[1] + (0.522599232974)*x[2]**o + (0.651939179418)*x[2]
            ref[(0, 1, 0, 3)]=1.14575043803/(o+1.)+(0.650620315649)+(-0.546927002735)*0.5**o
            arg[(0, 1, 1, 0)]=0.0900851602281*x[0]**o + (-0.805453705815)*x[0] + (0.695728870271)*x[1]**o + (-0.750074718044)*x[1] + (0.959445281828)*x[2]**o + (0.0706644488547)*x[2]
            ref[(0, 1, 1, 0)]=1.6551741521/(o+1.)+(-0.742431987502)+(0.0900851602281)*0.5**o
            arg[(0, 1, 1, 1)]=-0.589056988222*x[0]**o + (-0.206684569647)*x[0] + (-0.699302976991)*x[1]**o + (0.69838444098)*x[1] + (0.168117834172)*x[2]**o + (0.495543802262)*x[2]
            ref[(0, 1, 1, 1)]=-0.531185142819/(o+1.)+(0.493621836797)+(-0.589056988222)*0.5**o
            arg[(0, 1, 1, 2)]=0.085058947888*x[0]**o + (0.690526594049)*x[0] + (-0.843993520251)*x[1]**o + (0.201144072815)*x[1] + (-0.510643569695)*x[2]**o + (-0.978299577318)*x[2]
            ref[(0, 1, 1, 2)]=-1.35463708995/(o+1.)+(-0.0433144552271)+(0.085058947888)*0.5**o
            arg[(0, 1, 1, 3)]=0.813521888119*x[0]**o + (0.754553566674)*x[0] + (-0.7354099963)*x[1]**o + (0.0929621871457)*x[1] + (-0.926405918799)*x[2]**o + (0.562268385842)*x[2]
            ref[(0, 1, 1, 3)]=-1.6618159151/(o+1.)+(0.704892069831)+(0.813521888119)*0.5**o
            arg[(0, 1, 2, 0)]=0.0419183171937*x[0]**o + (-0.639408963712)*x[0] + (0.0178489624709)*x[1]**o + (-0.138450046915)*x[1] + (-0.855554331006)*x[2]**o + (-0.540192141243)*x[2]
            ref[(0, 1, 2, 0)]=-0.837705368535/(o+1.)+(-0.659025575935)+(0.0419183171937)*0.5**o
            arg[(0, 1, 2, 1)]=-0.842382909544*x[0]**o + (0.727674814703)*x[0] + (0.657229959506)*x[1]**o + (0.846869587326)*x[1] + (0.479139495806)*x[2]**o + (-0.552512647708)*x[2]
            ref[(0, 1, 2, 1)]=1.13636945531/(o+1.)+(0.51101587716)+(-0.842382909544)*0.5**o
            arg[(0, 1, 2, 2)]=0.177980371498*x[0]**o + (0.0298350271794)*x[0] + (-0.176741752218)*x[1]**o + (0.695441259999)*x[1] + (0.573155425868)*x[2]**o + (-0.589774597896)*x[2]
            ref[(0, 1, 2, 2)]=0.39641367365/(o+1.)+(0.0677508446412)+(0.177980371498)*0.5**o
            arg[(0, 1, 2, 3)]=-0.915685059696*x[0]**o + (-0.748656786557)*x[0] + (0.977036213435)*x[1]**o + (0.334720633031)*x[1] + (0.240402082053)*x[2]**o + (-0.0345057818991)*x[2]
            ref[(0, 1, 2, 3)]=1.21743829549/(o+1.)+(-0.224220967713)+(-0.915685059696)*0.5**o
            arg[(1, 0, 0, 0)]=-0.609489855412*x[0]**o + (-0.715490632067)*x[0] + (0.704348942927)*x[1]**o + (0.664396061685)*x[1] + (0.158523468322)*x[2]**o + (0.340980242319)*x[2]
            ref[(1, 0, 0, 0)]=0.862872411249/(o+1.)+(0.144942835968)+(-0.609489855412)*0.5**o
            arg[(1, 0, 0, 1)]=-0.094668159974*x[0]**o + (0.991630146953)*x[0] + (0.572195510699)*x[1]**o + (-0.741964161108)*x[1] + (-0.747365211115)*x[2]**o + (0.0668432881549)*x[2]
            ref[(1, 0, 0, 1)]=-0.175169700416/(o+1.)+(0.158254637)+(-0.094668159974)*0.5**o
            arg[(1, 0, 0, 2)]=-0.5870018644*x[0]**o + (0.295586335352)*x[0] + (-0.535687432579)*x[1]**o + (0.795864596439)*x[1] + (0.757885363165)*x[2]**o + (-0.892413316039)*x[2]
            ref[(1, 0, 0, 2)]=0.222197930586/(o+1.)+(0.0995188078761)+(-0.5870018644)*0.5**o
            arg[(1, 0, 0, 3)]=-0.758927087141*x[0]**o + (0.75648082237)*x[0] + (0.0568036756044)*x[1]**o + (0.924902245431)*x[1] + (-0.0363692025232)*x[2]**o + (-0.33232424744)*x[2]
            ref[(1, 0, 0, 3)]=0.0204344730812/(o+1.)+(0.674529410181)+(-0.758927087141)*0.5**o
            arg[(1, 0, 1, 0)]=-0.313062252203*x[0]**o + (-0.150226722799)*x[0] + (-0.519849988103)*x[1]**o + (-0.448941129789)*x[1] + (0.289953951973)*x[2]**o + (-0.020850160194)*x[2]
            ref[(1, 0, 1, 0)]=-0.22989603613/(o+1.)+(-0.310009006391)+(-0.313062252203)*0.5**o
            arg[(1, 0, 1, 1)]=0.902850004082*x[0]**o + (0.232291498935)*x[0] + (0.263397859099)*x[1]**o + (-0.275612949984)*x[1] + (0.312514930473)*x[2]**o + (-0.0157668550111)*x[2]
            ref[(1, 0, 1, 1)]=0.575912789573/(o+1.)+(-0.0295441530302)+(0.902850004082)*0.5**o
            arg[(1, 0, 1, 2)]=-0.353700915935*x[0]**o + (0.695436596574)*x[0] + (0.212947567493)*x[1]**o + (0.285481070989)*x[1] + (-0.957024179304)*x[2]**o + (-0.694240434195)*x[2]
            ref[(1, 0, 1, 2)]=-0.744076611811/(o+1.)+(0.143338616684)+(-0.353700915935)*0.5**o
            arg[(1, 0, 1, 3)]=-0.67624954358*x[0]**o + (-0.751584583914)*x[0] + (0.63392411663)*x[1]**o + (-0.0271236878334)*x[1] + (-0.715116905346)*x[2]**o + (0.760957336403)*x[2]
            ref[(1, 0, 1, 3)]=-0.0811927887158/(o+1.)+(-0.00887546767222)+(-0.67624954358)*0.5**o
            arg[(1, 0, 2, 0)]=-0.119952461593*x[0]**o + (-0.889560714208)*x[0] + (-0.867983118808)*x[1]**o + (0.0859967267807)*x[1] + (0.361501631952)*x[2]**o + (-0.777199237848)*x[2]
            ref[(1, 0, 2, 0)]=-0.506481486856/(o+1.)+(-0.790381612638)+(-0.119952461593)*0.5**o
            arg[(1, 0, 2, 1)]=-0.192615583597*x[0]**o + (-0.469161944619)*x[0] + (-0.0286377748196)*x[1]**o + (0.941533744775)*x[1] + (-0.1174201887)*x[2]**o + (-0.134994828937)*x[2]
            ref[(1, 0, 2, 1)]=-0.14605796352/(o+1.)+(0.16868848561)+(-0.192615583597)*0.5**o
            arg[(1, 0, 2, 2)]=-0.49818004632*x[0]**o + (0.732814007076)*x[0] + (0.269772467538)*x[1]**o + (-0.548725369905)*x[1] + (-0.0457873967902)*x[2]**o + (-0.57764992633)*x[2]
            ref[(1, 0, 2, 2)]=0.223985070748/(o+1.)+(-0.19678064458)+(-0.49818004632)*0.5**o
            arg[(1, 0, 2, 3)]=-0.915260295322*x[0]**o + (-0.999309771774)*x[0] + (0.498103154247)*x[1]**o + (0.677006988316)*x[1] + (0.633580145677)*x[2]**o + (0.895733944653)*x[2]
            ref[(1, 0, 2, 3)]=1.13168329992/(o+1.)+(0.286715580597)+(-0.915260295322)*0.5**o
            arg[(1, 1, 0, 0)]=-0.328573270336*x[0]**o + (0.143231661159)*x[0] + (-0.039284721453)*x[1]**o + (-0.51074579214)*x[1] + (-0.999710466937)*x[2]**o + (0.82169647561)*x[2]
            ref[(1, 1, 0, 0)]=-1.03899518839/(o+1.)+(0.227091172314)+(-0.328573270336)*0.5**o
            arg[(1, 1, 0, 1)]=-0.994680049858*x[0]**o + (-0.625318597423)*x[0] + (0.517033279096)*x[1]**o + (-0.618474810046)*x[1] + (-0.0724086006011)*x[2]**o + (-0.913496716202)*x[2]
            ref[(1, 1, 0, 1)]=0.444624678495/(o+1.)+(-1.07864506184)+(-0.994680049858)*0.5**o
            arg[(1, 1, 0, 2)]=0.0396032088881*x[0]**o + (0.536650284397)*x[0] + (-0.863044258303)*x[1]**o + (0.0505765632354)*x[1] + (-0.515416168378)*x[2]**o + (0.158184551604)*x[2]
            ref[(1, 1, 0, 2)]=-1.37846042668/(o+1.)+(0.372705699618)+(0.0396032088881)*0.5**o
            arg[(1, 1, 0, 3)]=0.889145475163*x[0]**o + (0.239322574747)*x[0] + (0.365853727661)*x[1]**o + (-0.437131997453)*x[1] + (-0.522920157119)*x[2]**o + (0.4451400173)*x[2]
            ref[(1, 1, 0, 3)]=-0.157066429458/(o+1.)+(0.123665297297)+(0.889145475163)*0.5**o
            arg[(1, 1, 1, 0)]=-0.292773427047*x[0]**o + (0.706090662883)*x[0] + (0.578803704845)*x[1]**o + (0.0625727818085)*x[1] + (0.260609878595)*x[2]**o + (0.106876971965)*x[2]
            ref[(1, 1, 1, 0)]=0.83941358344/(o+1.)+(0.437770208328)+(-0.292773427047)*0.5**o
            arg[(1, 1, 1, 1)]=-0.39911917935*x[0]**o + (0.968931130886)*x[0] + (-0.774002199395)*x[1]**o + (0.286147957794)*x[1] + (-0.660998643155)*x[2]**o + (0.760495622111)*x[2]
            ref[(1, 1, 1, 1)]=-1.43500084255/(o+1.)+(1.0077873554)+(-0.39911917935)*0.5**o
            arg[(1, 1, 1, 2)]=0.198712486576*x[0]**o + (-0.260036194728)*x[0] + (0.554834320394)*x[1]**o + (0.672829315408)*x[1] + (0.384015820367)*x[2]**o + (0.170556451096)*x[2]
            ref[(1, 1, 1, 2)]=0.938850140761/(o+1.)+(0.291674785888)+(0.198712486576)*0.5**o
            arg[(1, 1, 1, 3)]=0.796220185548*x[0]**o + (-0.852528004354)*x[0] + (-0.666214329432)*x[1]**o + (0.476094302601)*x[1] + (0.226284926831)*x[2]**o + (-0.186507461742)*x[2]
            ref[(1, 1, 1, 3)]=-0.439929402601/(o+1.)+(-0.281470581748)+(0.796220185548)*0.5**o
            arg[(1, 1, 2, 0)]=-0.946272819905*x[0]**o + (-0.696283228561)*x[0] + (-0.0289338354652)*x[1]**o + (0.509437678461)*x[1] + (-0.053519014034)*x[2]**o + (0.786058981701)*x[2]
            ref[(1, 1, 2, 0)]=-0.0824528494992/(o+1.)+(0.2996067158)+(-0.946272819905)*0.5**o
            arg[(1, 1, 2, 1)]=0.473246218721*x[0]**o + (0.667073050641)*x[0] + (-0.328033642609)*x[1]**o + (0.262138033183)*x[1] + (0.482326547388)*x[2]**o + (-0.12533894929)*x[2]
            ref[(1, 1, 2, 1)]=0.154292904779/(o+1.)+(0.401936067267)+(0.473246218721)*0.5**o
            arg[(1, 1, 2, 2)]=-0.181865956682*x[0]**o + (-0.215728550266)*x[0] + (-0.844403799784)*x[1]**o + (-0.154976457501)*x[1] + (0.948403848865)*x[2]**o + (0.529924667364)*x[2]
            ref[(1, 1, 2, 2)]=0.104000049081/(o+1.)+(0.0796098297982)+(-0.181865956682)*0.5**o
            arg[(1, 1, 2, 3)]=-0.409533638994*x[0]**o + (0.0296476185036)*x[0] + (-0.0294254623899)*x[1]**o + (0.0618632203922)*x[1] + (0.473583878376)*x[2]**o + (-0.357450609639)*x[2]
            ref[(1, 1, 2, 3)]=0.444158415986/(o+1.)+(-0.132969885372)+(-0.409533638994)*0.5**o
            arg[(2, 0, 0, 0)]=-0.691830167783*x[0]**o + (-0.661875833131)*x[0] + (-0.329694939897)*x[1]**o + (-0.970831779408)*x[1] + (0.353732916697)*x[2]**o + (-0.99875997957)*x[2]
            ref[(2, 0, 0, 0)]=0.0240379767999/(o+1.)+(-1.31573379605)+(-0.691830167783)*0.5**o
            arg[(2, 0, 0, 1)]=-0.158029294273*x[0]**o + (-0.0405794521321)*x[0] + (0.366633477178)*x[1]**o + (0.960352638038)*x[1] + (-0.325622838806)*x[2]**o + (-0.936052365906)*x[2]
            ref[(2, 0, 0, 1)]=0.0410106383724/(o+1.)+(-0.00813958999976)+(-0.158029294273)*0.5**o
            arg[(2, 0, 0, 2)]=0.692087437259*x[0]**o + (-0.616588120909)*x[0] + (0.300848479775)*x[1]**o + (0.377746033797)*x[1] + (0.68768617365)*x[2]**o + (-0.437242204506)*x[2]
            ref[(2, 0, 0, 2)]=0.988534653424/(o+1.)+(-0.338042145809)+(0.692087437259)*0.5**o
            arg[(2, 0, 0, 3)]=0.401716954979*x[0]**o + (-0.985680866883)*x[0] + (-0.914939978464)*x[1]**o + (-0.635426243257)*x[1] + (-0.295311326538)*x[2]**o + (-0.504037920346)*x[2]
            ref[(2, 0, 0, 3)]=-1.210251305/(o+1.)+(-1.06257251524)+(0.401716954979)*0.5**o
            arg[(2, 0, 1, 0)]=0.0696473983849*x[0]**o + (-0.669713668437)*x[0] + (-0.505361010615)*x[1]**o + (0.723900301038)*x[1] + (0.254448076473)*x[2]**o + (-0.246176873653)*x[2]
            ref[(2, 0, 1, 0)]=-0.250912934142/(o+1.)+(-0.095995120526)+(0.0696473983849)*0.5**o
            arg[(2, 0, 1, 1)]=0.806482464561*x[0]**o + (0.400834970312)*x[0] + (-0.700614677285)*x[1]**o + (-0.695779239925)*x[1] + (0.0339864349711)*x[2]**o + (-0.463974816187)*x[2]
            ref[(2, 0, 1, 1)]=-0.666628242314/(o+1.)+(-0.3794595429)+(0.806482464561)*0.5**o
            arg[(2, 0, 1, 2)]=0.398895736815*x[0]**o + (0.0154155140748)*x[0] + (0.725483593061)*x[1]**o + (0.689850974374)*x[1] + (-0.743157875591)*x[2]**o + (-0.553375759754)*x[2]
            ref[(2, 0, 1, 2)]=-0.01767428253/(o+1.)+(0.0759453643477)+(0.398895736815)*0.5**o
            arg[(2, 0, 1, 3)]=0.721393649704*x[0]**o + (0.871010967022)*x[0] + (0.352474502271)*x[1]**o + (0.548109232952)*x[1] + (0.629282324947)*x[2]**o + (-0.152277172895)*x[2]
            ref[(2, 0, 1, 3)]=0.981756827218/(o+1.)+(0.633421513539)+(0.721393649704)*0.5**o
            arg[(2, 0, 2, 0)]=-0.908034045424*x[0]**o + (0.0377548131983)*x[0] + (0.322477839679)*x[1]**o + (-0.29338432207)*x[1] + (0.848286187082)*x[2]**o + (0.430544367039)*x[2]
            ref[(2, 0, 2, 0)]=1.17076402676/(o+1.)+(0.0874574290834)+(-0.908034045424)*0.5**o
            arg[(2, 0, 2, 1)]=0.701281091766*x[0]**o + (0.437007934653)*x[0] + (-0.270622798525)*x[1]**o + (0.503005942514)*x[1] + (0.554774956778)*x[2]**o + (-0.912778303013)*x[2]
            ref[(2, 0, 2, 1)]=0.284152158254/(o+1.)+(0.0136177870767)+(0.701281091766)*0.5**o
            arg[(2, 0, 2, 2)]=0.405406684707*x[0]**o + (0.166754724951)*x[0] + (-0.481814323148)*x[1]**o + (-0.532644698245)*x[1] + (0.987633845833)*x[2]**o + (0.763809001813)*x[2]
            ref[(2, 0, 2, 2)]=0.505819522685/(o+1.)+(0.19895951426)+(0.405406684707)*0.5**o
            arg[(2, 0, 2, 3)]=-0.149369807757*x[0]**o + (0.501438452325)*x[0] + (0.432594887246)*x[1]**o + (0.837229993272)*x[1] + (-0.0674764446246)*x[2]**o + (-0.15761696853)*x[2]
            ref[(2, 0, 2, 3)]=0.365118442621/(o+1.)+(0.590525738533)+(-0.149369807757)*0.5**o
            arg[(2, 1, 0, 0)]=-0.120716478384*x[0]**o + (0.94151681448)*x[0] + (-0.580816959772)*x[1]**o + (0.496297837029)*x[1] + (0.0301331472874)*x[2]**o + (0.186696050167)*x[2]
            ref[(2, 1, 0, 0)]=-0.550683812485/(o+1.)+(0.812255350838)+(-0.120716478384)*0.5**o
            arg[(2, 1, 0, 1)]=0.64877390797*x[0]**o + (-0.495416719364)*x[0] + (0.255819736729)*x[1]**o + (-0.294094666599)*x[1] + (0.00954746847184)*x[2]**o + (-0.47294768398)*x[2]
            ref[(2, 1, 0, 1)]=0.265367205201/(o+1.)+(-0.631229534972)+(0.64877390797)*0.5**o
            arg[(2, 1, 0, 2)]=0.296089905883*x[0]**o + (-0.787908949122)*x[0] + (0.810350635464)*x[1]**o + (-0.829872441413)*x[1] + (0.114207153658)*x[2]**o + (0.148428517246)*x[2]
            ref[(2, 1, 0, 2)]=0.924557789123/(o+1.)+(-0.734676436645)+(0.296089905883)*0.5**o
            arg[(2, 1, 0, 3)]=-0.00015488980376*x[0]**o + (-0.0421796123281)*x[0] + (-0.0479678011128)*x[1]**o + (-0.132830409499)*x[1] + (0.889702984828)*x[2]**o + (-0.650142550889)*x[2]
            ref[(2, 1, 0, 3)]=0.841735183715/(o+1.)+(-0.412576286358)+(-0.00015488980376)*0.5**o
            arg[(2, 1, 1, 0)]=-0.519003436022*x[0]**o + (0.0641515708468)*x[0] + (-0.459918352934)*x[1]**o + (0.284859923973)*x[1] + (0.779142946228)*x[2]**o + (0.267709147718)*x[2]
            ref[(2, 1, 1, 0)]=0.319224593294/(o+1.)+(0.308360321269)+(-0.519003436022)*0.5**o
            arg[(2, 1, 1, 1)]=-0.917250641866*x[0]**o + (-0.0315724855738)*x[0] + (0.212781940198)*x[1]**o + (0.726747975467)*x[1] + (-0.880706350697)*x[2]**o + (-0.257730219377)*x[2]
            ref[(2, 1, 1, 1)]=-0.667924410498/(o+1.)+(0.218722635258)+(-0.917250641866)*0.5**o
            arg[(2, 1, 1, 2)]=-0.63003428933*x[0]**o + (0.876630900013)*x[0] + (-0.957338716961)*x[1]**o + (0.723671014935)*x[1] + (0.380581389761)*x[2]**o + (-0.84178339366)*x[2]
            ref[(2, 1, 1, 2)]=-0.5767573272/(o+1.)+(0.379259260643)+(-0.63003428933)*0.5**o
            arg[(2, 1, 1, 3)]=0.434079007504*x[0]**o + (0.299971408027)*x[0] + (0.259562864173)*x[1]**o + (0.122361235335)*x[1] + (0.802357821047)*x[2]**o + (-0.00729331336147)*x[2]
            ref[(2, 1, 1, 3)]=1.06192068522/(o+1.)+(0.207519665)+(0.434079007504)*0.5**o
            arg[(2, 1, 2, 0)]=-0.604840594069*x[0]**o + (-0.0602473888619)*x[0] + (-0.33497628604)*x[1]**o + (0.67540496847)*x[1] + (-0.542007933949)*x[2]**o + (0.595769177198)*x[2]
            ref[(2, 1, 2, 0)]=-0.876984219988/(o+1.)+(0.605463378403)+(-0.604840594069)*0.5**o
            arg[(2, 1, 2, 1)]=0.56797710789*x[0]**o + (0.267847769837)*x[0] + (-0.881203575757)*x[1]**o + (0.821079947353)*x[1] + (0.325047518701)*x[2]**o + (-0.726676992308)*x[2]
            ref[(2, 1, 2, 1)]=-0.556156057055/(o+1.)+(0.181125362441)+(0.56797710789)*0.5**o
            arg[(2, 1, 2, 2)]=-0.993559593696*x[0]**o + (-0.0956201986463)*x[0] + (0.287886518918)*x[1]**o + (-0.86934046322)*x[1] + (0.0683846332504)*x[2]**o + (-0.312737374251)*x[2]
            ref[(2, 1, 2, 2)]=0.356271152168/(o+1.)+(-0.638849018059)+(-0.993559593696)*0.5**o
            arg[(2, 1, 2, 3)]=0.0229977423513*x[0]**o + (-0.918389692257)*x[0] + (-0.420112352385)*x[1]**o + (-0.163070928583)*x[1] + (-0.70785122215)*x[2]**o + (-0.651531440707)*x[2]
            ref[(2, 1, 2, 3)]=-1.12796357453/(o+1.)+(-0.866496030773)+(0.0229977423513)*0.5**o
        res=integrate(arg)
        self.assertTrue(isinstance(res,numpy.ndarray),'wrong type of result.')
        self.assertEqual(res.shape, (3, 2, 3, 4),'wrong shape of result.')
        self.assertLess(Lsup(res-ref), self.RES_TOL*Lsup(ref),'wrong result')
    #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
